mirror of
https://github.com/nextcloud/server.git
synced 2026-10-16 03:51:45 +02:00
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
4 lines
42 KiB
JavaScript
4 lines
42 KiB
JavaScript
import{f as qe,o as p,i as g,h as L,t as A,k as B,m as R,ae as ke,j as y,I as S,P as x,F as fe,E as oe,l as K,Y as Fe,O as Z,c as $,G as ee,S as De,L as te,M as ge,g as M,w as C,n as J,T as Ae,aj as me,b as Re,a6 as q,r as D,x as Ee,aw as Je,ax as Xe,at as Ye,ay as Ge,az as Qe,aA as Ze,a8 as et,au as tt,R as ot,aB as it,aC as st,aD as nt,aE as at,aF as lt,ah as rt,z as ct,aG as dt,J as ht,aH as ut,a as pt,d as ft,aa as gt,a5 as mt,ab as yt,aI as bt,aJ as wt,al as vt,$ as St,aK as xt,aL as Ot,a3 as Lt,a2 as Ct,aM as _t,aN as Bt,aO as Vt,y as Tt,H as $t,aP as kt,p as Ft,aQ as Dt,D as At,X as Rt,aR as Et,aS as Pt,aT as Nt,V as Mt,aU as It,aV as jt,ac as zt,aW as Kt,af as Ht,ao as Wt,aX as Ut,aY as qt,ar as Jt,a7 as Xt,aZ as Yt,aq as Gt,a_ as Qt,Q as Zt,a1 as eo,q as to,a$ as oo,b0 as io,b1 as so,b2 as no,am as ao,ak as lo,ad as ro,b3 as co,b4 as ho,a9 as uo,a4 as po,b5 as fo,a0 as go,u as mo,K as yo,av as bo,Z as wo,U as vo,s as So,b6 as xo,B as Oo,v as Lo,b7 as Co,an as _o,ai as Bo,b8 as Vo,C as To,A as $o,b9 as ko,as as Fo}from"./preload-helper-DzJkBi1V.chunk.mjs";import{r as Pe,o as G,p as k,q as ie,s as Do,t as H,v as ye,w as Ao,x as Ro,y as Eo,z as Po}from"./NcModal-4-A9Rcea.chunk.mjs";import{e as No,f as Mo,i as Io}from"./Check-tS38t_gr.chunk.mjs";import{_ as se,r as jo,a3 as zo,b as Q,N as Ko}from"./Web-DDUTyEWH.chunk.mjs";import{N as Ho}from"./Plus-DzjZZu8f.chunk.mjs";import{_ as Wo}from"./NcTextField.vue_vue_type_script_setup_true_lang-BC2b-ESm.chunk.mjs";import{c as _e}from"./formatRelative-B3kQyuPX.chunk.mjs";const xs=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Je,BaseTransitionPropsValidators:Xe,Comment:Ye,EffectScope:Ge,Fragment:fe,ReactiveEffect:Qe,Static:Ze,Teleport:et,Text:tt,Transition:Ae,TransitionGroup:ot,VueElement:it,callWithAsyncErrorHandling:st,callWithErrorHandling:nt,camelize:at,capitalize:lt,cloneVNode:rt,computed:ct,createApp:qe,createBlock:$,createCommentVNode:B,createElementBlock:g,createElementVNode:L,createRenderer:dt,createSlots:Ee,createStaticVNode:ht,createTextVNode:K,createVNode:M,customRef:ut,defineAsyncComponent:pt,defineComponent:Re,defineCustomElement:ft,effectScope:gt,getCurrentInstance:mt,getCurrentScope:yt,getTransitionRawChildren:bt,guardReactiveProps:x,h:q,handleError:wt,hasInjectionContext:vt,inject:St,isProxy:xt,isReactive:Ot,isReadonly:Lt,isRef:Ct,isShallow:_t,isVNode:Bt,markRaw:Vt,mergeModels:Tt,mergeProps:R,nextTick:$t,nodeOps:kt,normalizeClass:J,normalizeProps:S,normalizeStyle:Ft,onActivated:Dt,onBeforeMount:At,onBeforeUnmount:Rt,onBeforeUpdate:Et,onDeactivated:Pt,onErrorCaptured:Nt,onMounted:Mt,onRenderTracked:It,onRenderTriggered:jt,onScopeDispose:zt,onServerPrefetch:Kt,onUnmounted:Ht,onUpdated:Wt,onWatcherCleanup:Ut,openBlock:p,patchProp:qt,popScopeId:Jt,provide:Xt,proxyRefs:Yt,pushScopeId:Gt,queuePostFlushCb:Qt,reactive:Zt,readonly:eo,ref:to,render:oo,renderList:oe,renderSlot:y,resolveComponent:D,resolveDirective:ke,resolveDynamicComponent:ee,resolveTransitionHooks:io,setBlockTracking:so,setTransitionHooks:no,shallowReactive:ao,shallowReadonly:lo,shallowRef:ro,ssrContextKey:co,toDisplayString:A,toHandlerKey:ho,toHandlers:De,toRaw:uo,toRef:po,toRefs:fo,toValue:go,unref:mo,useAttrs:yo,useCssModule:bo,useCssVars:wo,useId:vo,useModel:So,useSSRContext:xo,useSlots:Oo,useTemplateRef:Lo,useTransitionState:Co,vModelCheckbox:_o,vModelText:Bo,vShow:ge,version:Vo,warn:me,watch:To,watchEffect:$o,watchSyncEffect:ko,withCtx:C,withDirectives:te,withKeys:Fe,withModifiers:Z,withScopeId:Fo},Symbol.toStringTag,{value:"Module"})),Uo={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},qo=["aria-hidden","aria-label"],Jo=["fill","width","height"],Xo={d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},Yo={key:0};function Go(e,t,o,i,n,s){return p(),g("span",R(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon chevron-down-icon",role:"img",onClick:t[0]||(t[0]=l=>e.$emit("click",l))}),[(p(),g("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[L("path",Xo,[o.title?(p(),g("title",Yo,A(o.title),1)):B("",!0)])],8,Jo))],16,qo)}const Qo=se(Uo,[["render",Go]]),Zo={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ei=["aria-hidden","aria-label"],ti=["fill","width","height"],oi={d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},ii={key:0};function si(e,t,o,i,n,s){return p(),g("span",R(e.$attrs,{"aria-hidden":o.title?null:"true","aria-label":o.title,class:"material-design-icon close-icon",role:"img",onClick:t[0]||(t[0]=l=>e.$emit("click",l))}),[(p(),g("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[L("path",oi,[o.title?(p(),g("title",ii,A(o.title),1)):B("",!0)])],8,ti))],16,ei)}const ni=se(Zo,[["render",si]]);function ne(){return typeof window<"u"}function U(e){return Ne(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function F(e){var t;return(t=(Ne(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ne(e){return ne()?e instanceof Node||e instanceof O(e).Node:!1}function V(e){return ne()?e instanceof Element||e instanceof O(e).Element:!1}function E(e){return ne()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function Be(e){return!ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}function ae(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=T(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&n!=="inline"&&n!=="contents"}function ai(e){return/^(table|td|th)$/.test(U(e))}function le(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const li=/transform|translate|scale|rotate|perspective|filter/,ri=/paint|layout|strict|content/,P=e=>!!e&&e!=="none";let ue;function we(e){const t=V(e)?T(e):e;return P(t.transform)||P(t.translate)||P(t.scale)||P(t.rotate)||P(t.perspective)||!ve()&&(P(t.backdropFilter)||P(t.filter))||li.test(t.willChange||"")||ri.test(t.contain||"")}function ci(e){let t=I(e);for(;E(t)&&!X(t);){if(we(t))return t;if(le(t))return null;t=I(t)}return null}function ve(){return ue==null&&(ue=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ue}function X(e){return/^(html|body|#document)$/.test(U(e))}function T(e){return O(e).getComputedStyle(e)}function re(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function I(e){if(U(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Be(e)&&e.host||F(e);return Be(t)?t.host:t}function Me(e){const t=I(e);return X(t)?(e.ownerDocument||e).body:E(t)&&ae(t)?t:Me(t)}function Y(e,t,o){var i;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=Me(e),s=n===((i=e.ownerDocument)==null?void 0:i.body),l=O(n);if(s){const a=be(l);return t.concat(l,l.visualViewport||[],ae(n)?n:[],a&&o?Y(a):[])}else return t.concat(n,Y(n,[],o))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ie(e){const t=T(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=E(e),s=n?e.offsetWidth:o,l=n?e.offsetHeight:i,a=ie(o)!==s||ie(i)!==l;return a&&(o=s,i=l),{width:o,height:i,$:a}}function Se(e){return V(e)?e:e.contextElement}function W(e){const t=Se(e);if(!E(t))return k(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:s}=Ie(t);let l=(s?ie(o.width):o.width)/i,a=(s?ie(o.height):o.height)/n;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const di=k(0);function je(e){const t=O(e);return!ve()||!t.visualViewport?di:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hi(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===O(e)}function j(e,t,o,i){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),s=Se(e);let l=k(1);t&&(i?V(i)&&(l=W(i)):l=W(e));const a=hi(s,o,i)?je(s):k(0);let d=(n.left+a.x)/l.x,c=(n.top+a.y)/l.y,h=n.width/l.x,f=n.height/l.y;if(s&&i){const r=O(s),u=V(i)?O(i):i;let v=r,m=be(v);for(;m&&u!==v;){const b=W(m),w=m.getBoundingClientRect(),_=T(m),z=w.left+(m.clientLeft+parseFloat(_.paddingLeft))*b.x,de=w.top+(m.clientTop+parseFloat(_.paddingTop))*b.y;d*=b.x,c*=b.y,h*=b.x,f*=b.y,d+=z,c+=de,v=O(m),m=be(v)}}return Pe({width:h,height:f,x:d,y:c})}function ce(e,t){const o=re(e).scrollLeft;return t?t.left+o:j(F(e)).left+o}function ze(e,t){const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-ce(e,o),n=o.top+t.scrollTop;return{x:i,y:n}}function ui(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const s=n==="fixed",l=F(i),a=t?le(t.floating):!1;if(i===l||a&&s)return o;let d={scrollLeft:0,scrollTop:0},c=k(1);const h=k(0),f=E(i);if((f||!s)&&((U(i)!=="body"||ae(l))&&(d=re(i)),f)){const u=j(i);c=W(i),h.x=u.x+i.clientLeft,h.y=u.y+i.clientTop}const r=l&&!f&&!s?ze(l,d):k(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-d.scrollLeft*c.x+h.x+r.x,y:o.y*c.y-d.scrollTop*c.y+h.y+r.y}}function pi(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function fi(e){const t=re(e),o=e.ownerDocument.body,i=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-t.scrollLeft+ce(e);const l=-t.scrollTop;return T(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-i),{width:i,height:n,x:s,y:l}}const gi=25;function mi(e,t,o){o===void 0&&(o="viewport");const i=o==="layoutViewport",n=O(e),s=F(e),l=n.visualViewport;let a=s.clientWidth,d=s.clientHeight,c=0,h=0;if(l){const f=!ve()||t==="fixed";i?f||(c=-l.offsetLeft,h=-l.offsetTop):(a=l.width,d=l.height,f&&(c=l.offsetLeft,h=l.offsetTop))}if(ce(s)<=0){const f=s.ownerDocument,r=f.body,u=getComputedStyle(r),v=f.compatMode==="CSS1Compat"&&parseFloat(u.marginLeft)+parseFloat(u.marginRight)||0,m=Math.abs(s.clientWidth-r.clientWidth-v),b=getComputedStyle(s).scrollbarGutter==="stable both-edges"?m/2:m;b<=gi&&(a-=b)}return{width:a,height:d,x:c,y:h}}function yi(e,t){const o=j(e,!0,t==="fixed"),i=o.top+e.clientTop,n=o.left+e.clientLeft,s=W(e),l=e.clientWidth*s.x,a=e.clientHeight*s.y,d=n*s.x,c=i*s.y;return{width:l,height:a,x:d,y:c}}function Ve(e,t,o){let i;if(t==="viewport"||t==="layoutViewport")i=mi(e,o,t);else if(t==="document")i=fi(F(e));else if(V(t))i=yi(t,o);else{const n=je(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pe(i)}function bi(e,t){const o=t.get(e);if(o)return o;let i=Y(e,[],!1).filter(a=>V(a)&&U(a)!=="body"),n=null;const s=T(e).position==="fixed";let l=s?I(e):e;for(;V(l)&&!X(l);){const a=T(l),d=we(l),c=n?n.position:s?"fixed":"";!d&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(h=>h!==l):n=a,l=I(l)}return t.set(e,i),i}function wi(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const s=[...o==="clippingAncestors"?le(t)?[]:bi(t,this._c):[].concat(o),i],l=Ve(t,s[0],n);let a=l.top,d=l.right,c=l.bottom,h=l.left;for(let f=1;f<s.length;f++){const r=Ve(t,s[f],n);a=H(r.top,a),d=ye(r.right,d),c=ye(r.bottom,c),h=H(r.left,h)}return{width:d-h,height:c-a,x:h,y:a}}function vi(e){const{width:t,height:o}=Ie(e);return{width:t,height:o}}function Si(e,t,o){const i=E(t),n=F(t),s=o==="fixed",l=j(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=k(0);if((i||!s)&&((U(t)!=="body"||ae(n))&&(a=re(t)),i)){const r=j(t,!0,s,t);d.x=r.x+t.clientLeft,d.y=r.y+t.clientTop}!i&&n&&(d.x=ce(n));const c=n&&!i&&!s?ze(n,a):k(0),h=l.left+a.scrollLeft-d.x-c.x,f=l.top+a.scrollTop-d.y-c.y;return{x:h,y:f,width:l.width,height:l.height}}function pe(e){return T(e).position==="static"}function Te(e,t){if(!E(e)||T(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return F(e)===o&&(o=o.ownerDocument.body),o}function Ke(e,t){const o=O(e);if(le(e))return o;if(!E(e)){let n=I(e);for(;n&&!X(n);){if(V(n)&&!pe(n))return n;n=I(n)}return o}let i=Te(e,t);for(;i&&ai(i)&&pe(i);)i=Te(i,t);return i&&X(i)&&pe(i)&&!we(i)?o:i||ci(e)||o}const xi=async function(e){const t=this.getOffsetParent||Ke,o=this.getDimensions,i=await o(e.floating);return{reference:Si(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Oi(e){return T(e).direction==="rtl"}const Li={convertOffsetParentRelativeRectToViewportRelativeRect:ui,getDocumentElement:F,getClippingRect:wi,getOffsetParent:Ke,getElementRects:xi,getClientRects:pi,getDimensions:vi,getScale:W,isElement:V,isRTL:Oi};function He(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ci(e,t,o){let i=null,n;const s=F(e);function l(){var h;clearTimeout(n),(h=i)==null||h.disconnect(),i=null}function a(h,f){h===void 0&&(h=!1),f===void 0&&(f=1),l();const r=e.getBoundingClientRect(),{left:u,top:v,width:m,height:b}=r;if(h||t(),!m||!b)return;const w=G(v),_=G(s.clientWidth-(u+m)),z=G(s.clientHeight-(v+b)),de=G(u),Oe={rootMargin:-w+"px "+-_+"px "+-z+"px "+-de+"px",threshold:H(0,ye(1,f))||1};let Le=!0;function Ce(Ue){const he=Ue[0].intersectionRatio;if(!He(r,e.getBoundingClientRect()))return a();if(he!==f){if(!Le)return a();he?a(!1,he):n=setTimeout(()=>{a(!1,1e-7)},1e3)}Le=!1}try{i=new IntersectionObserver(Ce,{...Oe,root:s.ownerDocument})}catch{i=new IntersectionObserver(Ce,Oe)}i.observe(e)}const d=O(e),c=()=>a(o);return d.addEventListener("resize",c),a(!0),()=>{d.removeEventListener("resize",c),l()}}function _i(e,t,o,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,c=Se(e),h=n||s?[...c?Y(c):[],...t?Y(t):[]]:[];h.forEach(w=>{n&&w.addEventListener("scroll",o),s&&w.addEventListener("resize",o)});const f=c&&a?Ci(c,o,s):null;let r=-1,u=null;l&&(u=new ResizeObserver(w=>{let[_]=w;_&&_.target===c&&u&&t&&(u.unobserve(t),cancelAnimationFrame(r),r=requestAnimationFrame(()=>{var z;(z=u)==null||z.observe(t)})),o()}),c&&!d&&u.observe(c),t&&u.observe(t));let v,m=d?j(e):null;d&&b();function b(){const w=j(e);m&&!He(m,w)&&o(),m=w,v=requestAnimationFrame(b)}return o(),()=>{var w;h.forEach(_=>{n&&_.removeEventListener("scroll",o),s&&_.removeEventListener("resize",o)}),f?.(),(w=u)==null||w.disconnect(),u=null,d&&cancelAnimationFrame(v)}}const Bi=Ro,Vi=Eo,Ti=Ao,$i=Po,ki=(e,t,o)=>{const i=new Map,n=o??{},s={...Li,...n.platform,_c:i};return Do(e,t,{...n,platform:s})},Fi={mounted(e,{instance:t}){if(t.appendToBody){document.body.appendChild(e);const{height:o,top:i,left:n,width:s}=t.$refs.toggle.getBoundingClientRect(),l=window.scrollX||window.pageXOffset,a=window.scrollY||window.pageYOffset;e.unbindPosition=t.calculatePosition(e,t,{width:s+"px",left:l+n+"px",top:a+i+o+"px"})}},unmounted(e,{instance:t}){t.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}},Di={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(e){this.mutableLoading=e}},methods:{toggleLoading(e=null){return e==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=e}}},Ai={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){const e=this.$refs.dropdownMenu?.children[this.typeAheadPointer]||!1;if(e){const t=this.getDropdownViewport(),{top:o,bottom:i,height:n}=e.getBoundingClientRect();if(o<t.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(i>t.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(t.height-n)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Ri={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){if(this.resetFocusOnOptionsChange){for(let e=0;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}}},open(e){e&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let e=this.typeAheadPointer-1;e>=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadSelect(){const e=this.filteredOptions[this.typeAheadPointer];e&&this.selectable(e)&&this.select(e)},typeAheadToLastSelected(){const e=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1;e!==-1&&(this.typeAheadPointer=e)}}};function Ei(e){const t={};return Object.keys(e).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}let Pi=0;function Ni(){return++Pi}const xe=(e,t)=>{const o=e.__vccOpts||e;for(const[i,n]of t)o[i]=n;return o},Mi={},Ii={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"};function ji(e,t){return p(),g("svg",Ii,[...t[0]||(t[0]=[L("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1)])])}const zi=xe(Mi,[["render",ji]]),Ki={},Hi={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"};function Wi(e,t){return p(),g("svg",Hi,[...t[0]||(t[0]=[L("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1)])])}const Ui=xe(Ki,[["render",Wi]]),$e={Deselect:zi,OpenIndicator:Ui},qi={components:{...$e},directives:{appendToBody:Fi},mixins:[Ai,Ri,Di],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},ariaLabelCombobox:{type:String,default:"Search for options"},ariaLabelListbox:{type:String,default:"Options"},ariaLabelClearSelected:{type:String,default:"Clear selected"},ariaLabelDeselectOption:{type:Function,default:e=>`Deselect ${e}`},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:()=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?Object.hasOwn(e,this.label)?e[this.label]:me(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}.
|
|
https://vue-select.org/api/props.html#getoptionlabel`):e}},getOptionKey:{type:Function,default(e){if(typeof e!="object")return e;try{return Object.hasOwn(e,"id")?e.id:Ei(e)}catch{return me()}}},onTab:{type:Function,default(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(e,t,o){return(t||"").toLocaleLowerCase().indexOf(o.toLocaleLowerCase())>-1}},filter:{type:Function,default(e,t){return e.filter(o=>{let i=this.getOptionLabel(o);return typeof i=="number"&&(i=i.toString()),this.filterBy(o,i,t)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default({clearSearchOnSelect:e,multiple:t}){return e&&!t}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:e=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,t,{width:o,top:i,left:n}){e.style.top=i,e.style.left=n,e.style.width=o}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:t,mutableLoading:o}){return e?!1:t&&!o}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:()=>Ni()}},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],data(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let e=this.modelValue;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:{id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":`vs-${this.uid}__listbox`,"aria-owns":`vs-${this.uid}__listbox`,"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search,...this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs-${this.uid}__option-${this.typeAheadPointer}`}:{}},events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:t=>this.search=t.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:{...e,deselect:this.deselect},footer:{...e,deselect:this.deselect}}},childComponents(){return{...$e,...this.components}},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const e=i=>this.limit!==null?i.slice(0,this.limit):i,t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e(t);const o=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length)try{const i=this.createOption(this.search);this.optionExists(i)||o.unshift(i)}catch{}return e(o)},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(e,t){const o=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(e,t,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&o()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple(){this.clearSelection()},open(e){this.$emit(e?"open":"close")},search(e){e.length&&(this.open=!0)}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(e){Array.isArray(e)?this.$data._value=e.map(t=>this.findOptionFromReducedValue(t)):this.$data._value=this.findOptionFromReducedValue(e)},select(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&(this.$emit("option:created",e),this.pushTag(e)),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect(e){this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(t=>!this.optionComparator(t,e))),this.$emit("option:deselected",e)},keyboardDeselect(e,t){this.deselect(e);const o=this.deselectButtons?.[t+1],i=this.deselectButtons?.[t-1],n=o??i;n?n.focus():this.searchEl.focus()},clearSelection(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect(){this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(()=>this.$refs.search.focus())},updateValue(e){typeof this.modelValue>"u"&&(this.$data._value=e),e!==null&&(Array.isArray(e)?e=e.map(t=>this.reduce(t)):e=this.reduce(e)),this.$emit("update:modelValue",e)},toggleDropdown(e){const t=e.target!==this.searchEl;t&&e.preventDefault();const o=[...this.deselectButtons||[],...this.$refs.clearButton?[this.$refs.clearButton]:[]];if(this.searchEl===void 0||o.filter(Boolean).some(i=>i.contains(e.target)||i===e.target)){e.preventDefault();return}this.open&&t?(this.open=!1,this.searchEl.blur()):this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(e){return this.selectedValue.some(t=>this.optionComparator(t,e))},isOptionDeselectable(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},hasKeyboardFocusBorder(e){return this.keyboardFocusBorder&&this.isKeyboardNavigation?e===this.typeAheadPointer:!1},optionComparator(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue(e){const t=i=>JSON.stringify(this.reduce(i))===JSON.stringify(e),o=[...this.options,...this.pushedTags].filter(t);return o.length===1?o[0]:o.find(i=>this.optionComparator(i,this.$data._value))||e},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let e=null;this.multiple&&(e=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(e)}},optionExists(e){return this.optionList.some(t=>this.optionComparator(t,e))},optionAriaSelected(e){return this.selectable(e)?String(this.isOptionSelected(e)):null},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.open=!1},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:e,multiple:t}=this;this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:t})&&(this.search=""),this.closeSearchOptions();return}this.search.length===0&&this.options.length===0&&this.closeSearchOptions()},onSearchFocus(){this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onMouseMove(e,t){this.isKeyboardNavigation=!1,this.selectable(e)&&(this.typeAheadPointer=t)},onSearchKeyDown(e){const t=n=>{if(n.preventDefault(),!this.open){this.open=!0;return}return!this.isComposing&&this.typeAheadSelect()},o={8:()=>this.maybeDeleteValue(),9:()=>this.onTab(),27:()=>this.onEscape(),38:n=>{if(n.preventDefault(),this.isKeyboardNavigation=!0,!this.open){this.open=!0;return}return this.typeAheadUp()},40:n=>{if(n.preventDefault(),this.isKeyboardNavigation=!0,!this.open){this.open=!0;return}return this.typeAheadDown()}};this.selectOnKeyCodes.forEach(n=>o[n]=t);const i=this.mapKeydown(o,this);if(typeof i[e.keyCode]=="function")return i[e.keyCode](e)},onSearchKeyPress(e){!this.open&&e.keyCode===32&&(e.preventDefault(),this.open=!0)}}},Ji=["id","dir"],Xi={ref:"toggle",class:"vs__dropdown-toggle"},Yi=["disabled","title","aria-label","onMousedown","onKeydown"],Gi={ref:"actions",class:"vs__actions"},Qi=["disabled","title","aria-label"],Zi={class:"vs__spinner"},es=["id","aria-label","aria-multiselectable"],ts=["id","aria-selected","onMousemove","onClick"],os={key:0,class:"vs__no-options"},is=["id","aria-label"];function ss(e,t,o,i,n,s){const l=ke("append-to-body");return p(),g("div",{id:`v-select-${o.uid}`,dir:o.dir,class:J(["v-select",s.stateClasses])},[y(e.$slots,"header",S(x(s.scope.header))),L("div",Xi,[L("div",{ref:"selectedOptions",class:"vs__selected-options",onMousedown:t[0]||(t[0]=(...a)=>s.toggleDropdown&&s.toggleDropdown(...a))},[(p(!0),g(fe,null,oe(s.selectedValue,(a,d)=>y(e.$slots,"selected-option-container",{option:s.normalizeOptionForSlot(a),deselect:s.deselect,multiple:o.multiple,disabled:o.disabled},()=>[(p(),g("span",{key:o.getOptionKey(a),class:"vs__selected"},[y(e.$slots,"selected-option",R({ref_for:!0},s.normalizeOptionForSlot(a)),()=>[K(A(o.getOptionLabel(a)),1)]),o.multiple?(p(),g("button",{key:0,ref_for:!0,ref:c=>n.deselectButtons[d]=c,disabled:o.disabled,type:"button",class:"vs__deselect",title:o.ariaLabelDeselectOption(o.getOptionLabel(a)),"aria-label":o.ariaLabelDeselectOption(o.getOptionLabel(a)),onMousedown:Z(c=>s.deselect(a),["stop"]),onKeydown:Fe(c=>s.keyboardDeselect(a,d),["enter"])},[(p(),$(ee(s.childComponents.Deselect)))],40,Yi)):B("",!0)]))])),256)),y(e.$slots,"search",S(x(s.scope.search)),()=>[L("input",R({class:"vs__search"},s.scope.search.attributes,De(s.scope.search.events,!0)),null,16)])],544),L("div",Gi,[te(L("button",{ref:"clearButton",disabled:o.disabled,type:"button",class:"vs__clear",title:o.ariaLabelClearSelected,"aria-label":o.ariaLabelClearSelected,onClick:t[1]||(t[1]=(...a)=>s.clearSelection&&s.clearSelection(...a))},[(p(),$(ee(s.childComponents.Deselect)))],8,Qi),[[ge,s.showClearButton]]),o.noDrop?B("",!0):(p(),g("button",{key:0,ref:"openIndicatorButton",class:"vs__open-indicator-button",type:"button",tabindex:"-1","aria-hidden":"true",onMousedown:t[2]||(t[2]=(...a)=>s.toggleDropdown&&s.toggleDropdown(...a))},[y(e.$slots,"open-indicator",S(x(s.scope.openIndicator)),()=>[(p(),$(ee(s.childComponents.OpenIndicator),S(x(s.scope.openIndicator.attributes)),null,16))])],544)),y(e.$slots,"spinner",S(x(s.scope.spinner)),()=>[te(L("div",Zi," Loading... ",512),[[ge,e.mutableLoading]])])],512)],512),M(Ae,{name:o.transition},{default:C(()=>[s.dropdownOpen?te((p(),g("ul",{id:`vs-${o.uid}__listbox`,ref:"dropdownMenu",key:`vs-${o.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox","aria-label":o.ariaLabelListbox,"aria-multiselectable":o.multiple?"true":null,tabindex:"-1",onMousedown:t[3]||(t[3]=Z((...a)=>s.onMousedown&&s.onMousedown(...a),["prevent"])),onMouseup:t[4]||(t[4]=(...a)=>s.onMouseUp&&s.onMouseUp(...a))},[y(e.$slots,"list-header",S(x(s.scope.listHeader))),(p(!0),g(fe,null,oe(s.filteredOptions,(a,d)=>(p(),g("li",{id:`vs-${o.uid}__option-${d}`,key:o.getOptionKey(a),role:"option",class:J(["vs__dropdown-option",{"vs__dropdown-option--deselect":s.isOptionDeselectable(a)&&d===e.typeAheadPointer,"vs__dropdown-option--selected":s.isOptionSelected(a),"vs__dropdown-option--highlight":d===e.typeAheadPointer,"vs__dropdown-option--kb-focus":s.hasKeyboardFocusBorder(d),"vs__dropdown-option--disabled":!o.selectable(a)}]),"aria-selected":s.optionAriaSelected(a),onMousemove:c=>s.onMouseMove(a,d),onClick:Z(c=>o.selectable(a)?s.select(a):null,["prevent","stop"])},[y(e.$slots,"option",R({ref_for:!0},s.normalizeOptionForSlot(a)),()=>[K(A(o.getOptionLabel(a)),1)])],42,ts))),128)),s.filteredOptions.length===0?(p(),g("li",os,[y(e.$slots,"no-options",S(x(s.scope.noOptions)),()=>[t[5]||(t[5]=K(" Sorry, no matching options. ",-1))])])):B("",!0),y(e.$slots,"list-footer",S(x(s.scope.listFooter)))],40,es)),[[l]]):(p(),g("ul",{key:1,id:`vs-${o.uid}__listbox`,role:"listbox","aria-label":o.ariaLabelListbox,style:{display:"none",visibility:"hidden"}},null,8,is))]),_:3},8,["name"]),y(e.$slots,"footer",S(x(s.scope.footer)))],10,Ji)}const N=xe(qi,[["render",ss]]);function We(e,t){const o=[];let i=0,n=e.toLowerCase().indexOf(t.toLowerCase(),i),s=0;for(;n>-1&&s++<e.length;)i=n+t.length,o.push({start:n,end:i}),n=e.toLowerCase().indexOf(t.toLowerCase(),i);return o}const ns=Re({name:"NcHighlight",props:{text:{type:String,default:""},search:{type:String,default:""},highlight:{type:Array,default:()=>[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=We(this.text,this.search),e.forEach((t,o)=>{t.end<t.start&&(e[o]={start:t.end,end:t.start})}),e=e.reduce((t,o)=>(o.start<this.text.length&&o.end>0&&t.push({start:o.start<0?0:o.start,end:o.end>this.text.length?this.text.length:o.end}),t),[]),e.sort((t,o)=>t.start-o.start),e=e.reduce((t,o)=>{if(!t.length)t.push(o);else{const i=t.length-1;t[i].end>=o.start?t[i]={start:t[i].start,end:Math.max(t[i].end,o.end)}:t.push(o)}return t},[])),e},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const e=[];let t=0,o=0;for(;t<this.text.length;){const i=this.ranges[o];if(i.start===t){e.push({...i,highlight:!0,text:this.text.slice(i.start,i.end)}),o++,t=i.end,o>=this.ranges.length&&t<this.text.length&&(e.push({start:t,end:this.text.length,highlight:!1,text:this.text.slice(t)}),t=this.text.length);continue}e.push({start:t,end:i.start,highlight:!1,text:this.text.slice(t,i.start)}),t=i.start}return e}},render(){return this.ranges.length?q("span",{},this.chunks.map(e=>e.highlight?q("strong",{},e.text):e.text)):q("span",{},this.text)}}),as={name:"NcEllipsisedOption",components:{NcHighlight:ns},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?We(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}},ls=["title"];function rs(e,t,o,i,n,s){const l=D("NcHighlight");return p(),g("span",{dir:"auto",class:"name-parts",title:o.name},[M(l,{class:"name-parts__first",text:s.part1,search:o.search,highlight:s.highlight1},null,8,["text","search","highlight"]),s.part2?(p(),$(l,{key:0,class:"name-parts__last",text:s.part2,search:o.search,highlight:s.highlight2},null,8,["text","search","highlight"])):B("",!0)],8,ls)}const cs=se(as,[["render",rs],["__scopeId","data-v-c843f2cd"]]);jo(zo);const ds={name:"NcSelect",components:{ChevronDown:Qo,NcEllipsisedOption:cs,NcIconSvgWrapper:Ko,NcLoadingIcon:Ho,NcTextField:Wo,VueSelect:N},props:{...N.props,...N.mixins.reduce((e,t)=>({...e,...t.props}),{}),ariaLabelClearSelected:{type:String,default:Q("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:Q("Options")},ariaLabelDeselectOption:{type:Function,default:e=>Q("Deselect {option}",{option:e})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:()=>q(ni,{size:20,fillColor:"var(--vs-controls-color)",style:[{cursor:"pointer"}]})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:e,open:t})=>e?!1:t},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>_e()},inputLabel:{type:String,default:null},helperText:{type:String,default:""},error:{type:Boolean,default:!1},success:{type:Boolean,default:!1},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(e,t){return{...e,27:o=>{t.open&&o.stopPropagation(),e[27](o)}}}},uid:{type:String,default:()=>_e()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","update:modelValue"],setup(){const e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline"));return{avatarSize:e-2*t,isLegacy:Io,mdiAlertCircleOutline:Mo,mdiCheck:No}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.modelValue===null||Array.isArray(this.modelValue)&&this.modelValue.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(e,t,{width:o})=>{e.style.width=o;const i={name:"addClass",fn(){return e.classList.add("vs__dropdown-menu--floating","nc-select__dropdown"),{}}},n={name:"togglePlacementClass",fn({placement:l}){return t.$el.classList.toggle("select--drop-up",l==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",l==="top"),{}}},s=()=>{ki(t.$refs.toggle,e,{placement:this.placement,middleware:[Ti(),i,n,Bi(({placement:l})=>l.startsWith("top")?10:-1),Vi({limiter:$i()})]}).then(({x:l,y:a})=>{Object.assign(e.style,{left:`${l}px`,top:`${a}px`,width:`${t.$refs.toggle.getBoundingClientRect().width}px`})})};return _i(t.$refs.toggle,e,s)}},localFilterBy(){return this.filterBy??N.props.filterBy.default},localLabel(){return this.label??N.props.label.default},propsToForward(){const e=[...Object.keys(N.props),...N.mixins.flatMap(t=>Object.keys(t.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([t,o])=>e.includes(t))),calculatePosition:this.localCalculatePosition,closeOnSelect:!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}}},mounted(){!this.labelOutside&&!this.inputLabel&&this.ariaLabelCombobox,this.inputLabel&&this.ariaLabelCombobox},methods:{t:Q,forwardedSlots(){return Object.keys(this.$slots).filter(e=>e!=="footer")}}},hs=["for"],us=["id"];function ps(e,t,o,i,n,s){const l=D("NcTextField"),a=D("ChevronDown"),d=D("NcEllipsisedOption"),c=D("NcLoadingIcon"),h=D("NcIconSvgWrapper"),f=D("VueSelect");return p(),$(f,R({class:["select nc-select",{"select--legacy":i.isLegacy,"select--no-wrap":o.noWrap}]},s.propsToForward,{onSearch:t[0]||(t[0]=r=>n.search=r),"onUpdate:modelValue":t[1]||(t[1]=r=>e.$emit("update:modelValue",r))}),Ee({search:C(({attributes:r,events:u})=>[M(l,{id:r.id,class:J(["vs__search",[o.inputClass]]),type:r.type,modelValue:r.value,placeholder:o.multiple||o.modelValue?"":o.placeholder||"",label:!o.labelOutside&&!o.multiple&&o.inputLabel?o.inputLabel:"",labelOutside:o.labelOutside||o.multiple,disabled:o.disabled,required:s.inputRequired,role:r.role,tabindex:r.tabindex,readonly:r.readonly,autocomplete:r.autocomplete,"aria-label":r["aria-label"],"aria-describedby":[r["aria-describedby"],o.helperText?`${o.inputId}-helper-text`:null].filter(Boolean).join(" ")||void 0,"aria-autocomplete":r["aria-autocomplete"],"aria-controls":r["aria-controls"],"aria-owns":r["aria-owns"],"aria-expanded":r["aria-expanded"],"aria-activedescendant":r["aria-activedescendant"],onKeydown:u.keydown,onKeypress:u.keypress,onFocus:u.focus,onBlur:u.blur,onCompositionstart:u.compositionstart,onCompositionend:u.compositionend,"onUpdate:modelValue":v=>u.input({target:{value:v}})},null,8,["id","class","type","modelValue","placeholder","label","labelOutside","disabled","required","role","tabindex","readonly","autocomplete","aria-label","aria-describedby","aria-autocomplete","aria-controls","aria-owns","aria-expanded","aria-activedescendant","onKeydown","onKeypress","onFocus","onBlur","onCompositionstart","onCompositionend","onUpdate:modelValue"])]),"open-indicator":C(({attributes:r})=>[M(a,R(r,{fillColor:"var(--vs-controls-color)",style:{cursor:o.disabled?null:"pointer"},size:20}),null,16,["style"])]),option:C(r=>[y(e.$slots,"option",S(x(r)),()=>[M(d,{name:String(r[s.localLabel]),search:n.search},null,8,["name","search"])])]),"selected-option":C(r=>[y(e.$slots,"selected-option",S(x(r)),()=>[M(d,{name:String(r[s.localLabel]),search:n.search},null,8,["name","search"])])]),spinner:C(r=>[r.loading?(p(),$(c,{key:0})):B("",!0)]),"no-options":C(()=>[K(A(s.t("No results")),1)]),_:2},[o.multiple&&!o.labelOutside&&o.inputLabel?{name:"header",fn:C(()=>[L("label",{for:o.inputId,class:"select__label"},A(o.inputLabel),9,hs)]),key:"0"}:void 0,o.helperText||e.$slots.footer?{name:"footer",fn:C(r=>[o.helperText?(p(),g("p",{key:0,id:`${o.inputId}-helper-text`,class:J(["select__helper-text",{"select__helper-text--error":o.error,"select__helper-text--success":o.success}])},[o.success?(p(),$(h,{key:0,class:"select__helper-text-icon",path:i.mdiCheck,inline:""},null,8,["path"])):o.error?(p(),$(h,{key:1,class:"select__helper-text-icon",path:i.mdiAlertCircleOutline,inline:""},null,8,["path"])):B("",!0),K(" "+A(o.helperText),1)],10,us)):B("",!0),y(e.$slots,"footer",S(x(r)))]),key:"1"}:void 0,oe(s.forwardedSlots(),r=>({name:r,fn:C(u=>[y(e.$slots,r,S(x(u)))])}))]),1040,["class"])}const fs=se(ds,[["render",ps]]),Os=Object.freeze(Object.defineProperty({__proto__:null,default:fs},Symbol.toStringTag,{value:"Module"}));export{Qo as C,ni as I,fs as N,ns as _,cs as a,Os as i,xs as v};
|
|
//# sourceMappingURL=index-DXfRJOJi.chunk.mjs.map
|