3 lines
24 KiB
JavaScript
3 lines
24 KiB
JavaScript
import{o as b,_ as x,r as B,$ as h,bo as L,bp as w,M as P,aH as he,ao as ie,a8 as Ne,l as je,y as W,Y as y,a$ as S,ad as Ee,q as F,a_ as z,aD as ze,ap as _,aI as J,Z as $,a6 as X,w as ge,c as Le,b4 as $e,bn as Ue,aw as Pe,aB as qe,aj as ye,F as Y,I as K}from"./@vue.861e8bf0.js";function ue(e){return(ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function me(e){return function(t){if(Array.isArray(t))return ne(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||be(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function be(e,t){if(e){if(typeof e=="string")return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function N(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=be(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var o=0,g=function(){};return{s:g,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(c){throw c},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var m,r=!0,v=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return r=c.done,c},e:function(c){v=!0,m=c},f:function(){try{r||n.return==null||n.return()}finally{if(v)throw m}}}}var ae={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(e,t){var n=F(null);return Pe(function(){e.autofocus&&n.value.focus()}),qe(function(){e.autofocus&&n.value.focus()}),{handleInput:function(o){t.emit("input",o),t.emit("update:modelValue",o.target.value)},handleChange:function(o){t.emit("change",o),t.emit("update:modelValue",o.target.value)},handleFocus:function(o){t.emit("focus",o)},handleBlur:function(o){t.emit("blur",o)},input:n,handleEscape:function(o){n.value.blur(),t.emit("escape",o)}}}},He={class:"vue-input"},_e=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];ae.render=function(e,t,n,o,g,m){return b(),x("div",He,[B(e.$slots,"prepend"),h("input",{ref:"input",autocomplete:n.autocomplete,modelValue:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onInput:t[0]||(t[0]=function(){return o.handleInput&&o.handleInput.apply(o,arguments)}),onChange:t[1]||(t[1]=function(){return o.handleChange&&o.handleChange.apply(o,arguments)}),onFocus:t[2]||(t[2]=function(){return o.handleFocus&&o.handleFocus.apply(o,arguments)}),onBlur:t[3]||(t[3]=function(){return o.handleBlur&&o.handleBlur.apply(o,arguments)}),onKeyup:t[4]||(t[4]=L(w(function(){return o.handleEscape&&o.handleEscape.apply(o,arguments)},["exact"]),["esc"])),tabindex:n.tabindex,autofocus:n.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(n.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(n.comboboxUid,"-combobox")},null,40,_e),B(e.$slots,"append")])},ae.__file="src/components/input.vue";var oe={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return ue(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(e,t){return{dataAttrs:ye("dataAttrs"),handleClick:function(n){t.emit("click",n)}}}};oe.render=function(e,t,n,o,g,m){return b(),x("ul",ie({class:["vue-tags",{collapsed:n.collapseTags}],onMousedown:t[0]||(t[0]=w(function(){},["prevent"])),tabindex:"-1",onClick:t[1]||(t[1]=function(){return o.handleClick&&o.handleClick.apply(o,arguments)})},o.dataAttrs),[(b(!0),x(P,null,he(n.modelValue,function(r){return b(),x(P,{key:r.key},[r.group?$("v-if",!0):(b(),x("li",{key:0,class:Y(["vue-tag",{selected:r.selected}])},[B(e.$slots,"default",{option:r},function(){return[h("span",null,K(r.label),1)]})],2))],64)}),128))],16)},oe.__file="src/components/tags.vue";var le={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return ue(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(e,t){return{dataAttrs:ye("dataAttrs"),handleClickItem:function(n,o){o.disabled||t.emit("click-item",n,o)},handleMouseenter:function(n,o){t.emit("mouseenter",n,o)}}}},Ze=["id","aria-multiselectable","aria-busy","aria-disabled"],Re=["onClick","onMouseenter","id","aria-selected","aria-disabled"];le.render=function(e,t,n,o,g,m){return b(),x("ul",ie({class:"vue-dropdown",style:{maxHeight:n.maxHeight+"px"},onMousedown:t[0]||(t[0]=w(function(){},["prevent"]))},o.dataAttrs,{role:"listbox",id:"vs".concat(n.comboboxUid,"-listbox"),"aria-multiselectable":o.dataAttrs["data-multiple"],"aria-busy":o.dataAttrs["data-loading"],"aria-disabled":o.dataAttrs["data-disabled"]}),[(b(!0),x(P,null,he(n.modelValue,function(r,v){return b(),x(P,{key:r.key},[r.visible&&r.hidden===!1?(b(),x("li",{key:0,onClick:function(c){return o.handleClickItem(c,r)},class:Y(["vue-dropdown-item",{selected:r.selected,disabled:r.disabled,highlighted:r.originalIndex===n.highlightedOriginalIndex,group:r.group}]),onMouseenter:function(c){return o.handleMouseenter(c,r)},role:"option",id:"vs".concat(n.comboboxUid,"-option-").concat(v),"aria-selected":!!r.selected||!!r.disabled&&void 0,"aria-disabled":r.disabled},[B(e.$slots,"default",{option:r},function(){return[h("span",null,K(r.label),1)]})],42,Re)):$("v-if",!0)],64)}),128))],16,Ze)},le.__file="src/components/dropdown.vue";var xe=function(e,t,n){var o=n.valueBy;return o(e)===o(t)},U=function(e,t,n){var o=n.valueBy;return e.some(function(g){return xe(g,t,{valueBy:o})})},D=function(e,t,n){var o=n.valueBy;return e.find(function(g){return o(g)===t})},ee=function(e,t,n){var o=n.max,g=n.valueBy;return U(e,t,{valueBy:g})||e.length>=o?e:e.concat(t)},te=function(e,t,n){var o=n.min,g=n.valueBy;return U(e,t,{valueBy:g})===!1||e.length<=o?e:e.filter(function(m){return xe(m,t,{valueBy:g})===!1})},G=function(e){return y(function(){return typeof e.value=="function"?e.value:typeof e.value=="string"?function(t){return e.value.split(".").reduce(function(n,o){return n[o]},t)}:function(t){return t}})},We=function(e,t){var n=y(function(){return e.value.reduce(function(r,v){return Object.assign(r,(c={},d=v.originalIndex,f=v,d in c?Object.defineProperty(c,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[d]=f,c));var c,d,f},{})}),o=function(r){var v=n.value[r];return v!==void 0&&g(v)!==!1&&(t.value=r,!0)},g=function(r){return!r.disabled&&!r.hidden&&r.visible},m=y(function(){return e.value.some(function(r){return g(r)})});return S(function(){if(m.value===!1&&(t.value=null),t.value!==null&&e.value.length<=t.value){var r,v=N(e.value.reverse());try{for(v.s();!(r=v.n()).done;){var c=r.value;if(o(c.originalIndex))break}}catch(V){v.e(V)}finally{v.f()}}if(t.value===null||g(e.value[t.value])===!1){var d,f=N(e.value);try{for(f.s();!(d=f.n()).done;){var j=d.value;if(o(j.originalIndex))break}}catch(V){f.e(V)}finally{f.f()}}}),{pointerForward:function(){if(m.value!==!1&&t.value!==null)for(var r=t.value+1,v=0;r!==t.value&&v++<e.value.length&&(e.value.length<=r&&(r=0),!o(r));)++r},pointerBackward:function(){if(m.value!==!1&&t.value!==null)for(var r=t.value-1,v=0;r!==t.value&&v++<e.value.length&&(r<0&&(r=e.value.length-1),!o(r));)--r},pointerSet:o}},re=Ne({name:"vue-select",inheritAttrs:!1,props:{modelValue:{required:!0},emptyModelValue:{},options:{required:!0,type:Array},labelBy:{type:[String,Function]},valueBy:{type:[String,Function]},disabledBy:{default:"disabled",type:[String,Function]},groupBy:{default:"group",type:[String,Function]},visibleOptions:{type:Array,default:null},multiple:{default:!1,type:Boolean},min:{default:0,type:Number},max:{default:1/0,type:Number},searchable:{default:!1,type:Boolean},searchPlaceholder:{default:"Type to search",type:String},clearOnSelect:{default:!1,type:Boolean},clearOnClose:{default:!1,type:Boolean},taggable:{default:!1,type:Boolean},collapseTags:{default:!1,type:Boolean},autocomplete:{default:"off",type:String},disabled:{default:!1,type:Boolean},loading:{default:!1,type:Boolean},closeOnSelect:{default:!1,type:Boolean},hideSelected:{default:!1,type:Boolean},placeholder:{default:"Select option",type:String},tabindex:{default:0,type:Number},autofocus:{default:!1,type:Boolean},maxHeight:{default:300,type:Number},openDirection:{type:String,validator:function(e){return["top","bottom"].includes(e)}}},emits:["selected","removed","update:modelValue","focus","blur","toggle","opened","closed","search:input","search:change","search:focus","search:blur"],setup:function(e,t){var n=function(a){var l=je({}),u=G(W(a,"labelBy"));S(function(){return l.labelBy=u.value});var i=G(W(a,"valueBy"));S(function(){return l.valueBy=i.value});var k=G(W(a,"disabledBy"));S(function(){return l.disabledBy=k.value});var p=G(W(a,"groupBy"));S(function(){return l.groupBy=p.value});var M=y(function(){return a.multiple?a.min:Math.min(1,a.min)});S(function(){return l.min=M.value});var C=y(function(){return a.multiple?a.max:1});return S(function(){return l.max=C.value}),S(function(){return l.options=a.options}),l}(e),o=y(function(){var a;return(a=e.emptyModelValue)!==null&&a!==void 0?a:null}),g=Ee(),m=F(),r=F(),v=F(),c=y(function(){var a;return(a=v.value)===null||a===void 0?void 0:a._.refs.input}),d=F(!1);z(function(){return d.value},function(){var a,l;d.value?(t.emit("opened"),t.emit("focus"),e.searchable?(c.value!==document.activeElement&&c.value.focus(),t.emit("search:focus")):(a=m.value)===null||a===void 0||a.focus()):(e.searchable?(c.value===document.activeElement&&c.value.blur(),e.clearOnClose&&pe(),t.emit("search:blur")):(l=m.value)===null||l===void 0||l.blur(),t.emit("closed"),t.emit("blur")),t.emit("toggle")});var f=function(){e.disabled||(d.value=!0)},j=function(a){var l;!((l=m.value)===null||l===void 0)&&l.contains(a==null?void 0:a.relatedTarget)?setTimeout(function(){var u;(u=m.value)===null||u===void 0||u.focus()}):d.value=!1};z(function(){return e.disabled},function(){return j()});var V=F(""),we=y(function(){return new RegExp(V.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i")}),Be=y(function(){return V.value?n.options.filter(function(a){return we.value.test(n.labelBy(a))}):void 0}),s=F([]),A=y(function(){return new Set(s.value.map(function(a){return n.valueBy(a)}))}),de=function(){if(e.multiple){if(Array.isArray(e.modelValue)===!1||s.value.length!==e.modelValue.length||Object.keys(s.value).some(function(a){return s.value[a]!==D(n.options,e.modelValue[a],{valueBy:n.valueBy})}))return!1}else if(s.value.length===0&&e.modelValue!==o.value||s.value.length===1&&e.modelValue===o.value||s.value[0]!==D(n.options,e.modelValue,{valueBy:n.valueBy}))return!1;return!0},se=function(){if(!de()){s.value=[];var a,l=N(e.multiple?e.modelValue:e.modelValue===o.value?[]:[e.modelValue]);try{for(l.s();!(a=l.n()).done;){var u=a.value,i=D(n.options,u,{valueBy:n.valueBy});U(n.options,i,{valueBy:n.valueBy})!==!1&&(s.value=ee(s.value,i,{max:1/0,valueBy:n.valueBy}))}}catch(k){l.e(k)}finally{l.f()}}};se(),z(function(){return e.modelValue},function(){return se()},{deep:!0}),z(function(){return n.options},function(){s.value=n.options.filter(function(a){return A.value.has(n.valueBy(a))})},{deep:!0});var ce,Ie=function(a,l){(l=l.originalOption).value.every(function(u){var i=D(n.options,u,{valueBy:n.valueBy});return U(s.value,i,{valueBy:n.valueBy})})?l.value.forEach(function(u){var i=D(n.options,u,{valueBy:n.valueBy});s.value=te(s.value,i,{min:n.min,valueBy:n.valueBy}),t.emit("removed",i)}):l.value.forEach(function(u){var i=D(n.options,u,{valueBy:n.valueBy});U(s.value,i,{valueBy:n.valueBy})||(s.value=ee(s.value,i,{max:n.max,valueBy:n.valueBy}),t.emit("selected",i))})},ke=function(a,l){if(l=l.originalOption,U(s.value,l,{valueBy:n.valueBy}))s.value=te(s.value,l,{min:n.min,valueBy:n.valueBy}),t.emit("removed",l);else{if(!e.multiple&&s.value.length===1){var u=s.value[0];s.value=te(s.value,s.value[0],{min:0,valueBy:n.valueBy}),t.emit("removed",u)}s.value=ee(s.value,l,{max:n.max,valueBy:n.valueBy}),t.emit("selected",l)}},Me=function(){if(!de()){var a=s.value.map(function(l){return n.valueBy(l)});e.multiple?t.emit("update:modelValue",a):a.length?t.emit("update:modelValue",a[0]):t.emit("update:modelValue",o.value)}},pe=function(){c.value.value="",c.value.dispatchEvent(new Event("input")),c.value.dispatchEvent(new Event("change"))},Oe=y(function(){var a,l;return(l=(a=e.visibleOptions)!==null&&a!==void 0?a:Be.value)!==null&&l!==void 0?l:n.options}),Z=F(0),I=y(function(){var a,l=new Set(Oe.value.map(function(p){return n.valueBy(p)})),u=n.options.map(function(p,M){var C,O={key:n.valueBy(p),label:n.labelBy(p),group:(C=n.groupBy(p))!==null&&C!==void 0&&C,originalIndex:M,originalOption:p};return O.selected=O.group?p.value.every(function(T){return A.value.has(T)}):A.value.has(n.valueBy(p)),O.disabled=O.group?n.disabledBy(p)||p.value.every(function(T){var De=D(n.options,T,{valueBy:n.valueBy});return n.disabledBy(De)}):n.disabledBy(p),O.visible=O.group?p.value.some(function(T){return l.has(T)}):l.has(n.valueBy(p)),O.hidden=!!e.hideSelected&&(O.group?p.value.every(function(T){return A.value.has(T)}):A.value.has(n.valueBy(p))),O}),i=N(u);try{for(i.s();!(a=i.n()).done;){var k=a.value;k.group!==!1&&k.disabled&&function(){var p=new Set(k.originalOption.value);u.filter(function(M){return p.has(n.valueBy(M.originalOption))}).forEach(function(M){return M.disabled=!0})}()}}catch(p){i.e(p)}finally{i.f()}return u}),Q=We(I,Z),Fe=Q.pointerForward,Ve=Q.pointerBackward,q=Q.pointerSet,R="",Se=/^[\w]$/,Ae=y(function(){var a=me(n.options.keys());return a.slice(Z.value).concat(a.slice(0,Z.value))}),H=function(){var a,l=(a=m.value)===null||a===void 0?void 0:a.querySelector(".highlighted");if(l&&r.value){var u,i=getComputedStyle(l);for(u=0;l.offsetTop+parseFloat(i.height)+parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)>r.value.$el.clientHeight+r.value.$el.scrollTop&&u++<I.value.length;)r.value.$el.scrollTop=r.value.$el.scrollTop+parseFloat(i.height)+parseFloat(i.paddingTop)+parseFloat(i.paddingBottom);for(u=0;l.offsetTop<r.value.$el.scrollTop&&u++<I.value.length;)r.value.$el.scrollTop=r.value.$el.scrollTop-parseFloat(i.height)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)}};z(function(){return[d.value,n.options,A.value]},function(a,l){(l==null?void 0:l[0])!==!0&&d.value!==!1&&s.value.length!==0&&(q(n.options.findIndex(function(u){return A.value.has(n.valueBy(u))})),_(H))},{deep:!0,immediate:!0});var ve=y(function(){return{"data-is-focusing":d.value,"data-visible-length":I.value.filter(function(a){return a.visible&&a.hidden===!1}).length,"data-not-selected-length":n.options.length-I.value.filter(function(a){return a.selected}).length,"data-selected-length":I.value.filter(function(a){return a.selected}).length,"data-addable":I.value.filter(function(a){return a.selected}).length<n.max,"data-removable":I.value.filter(function(a){return a.selected}).length>n.min,"data-total-length":n.options.length,"data-multiple":e.multiple,"data-loading":e.loading,"data-disabled":e.disabled}});ze("dataAttrs",ve);var E=y(function(){return I.value.filter(function(a){return a.selected}).filter(function(a){return!a.group})}),Ce=y(function(){return e.multiple?E.value.length===0?e.placeholder:E.value.length===1?"1 option selected":E.value.length+" options selected":E.value.length===0?e.placeholder:E.value[0].label+""}),Te=y(function(){var a=E.value.map(function(l){return l.originalOption});return e.multiple?a:a[0]||o.value}),fe=F();return z(function(){return[e.openDirection,d.value]},function(){var a,l;fe.value=(l=(a=e.openDirection)!==null&&a!==void 0?a:function(){if(m.value!==void 0&&window!==void 0)return window.innerHeight-m.value.getBoundingClientRect().bottom>=e.maxHeight?"bottom":"top"}())!==null&&l!==void 0?l:"bottom"},{immediate:!0}),{instance:g,isFocusing:d,wrapper:m,dropdown:r,input:v,focus:f,blur:j,toggle:function(){d.value?j():f()},searchingInputValue:V,handleInputForInput:function(a){t.emit("search:input",a)},handleChangeForInput:function(a){t.emit("search:change",a)},handleFocusForInput:function(a){f()},handleBlurForInput:function(a){j()},optionsWithInfo:I,addOrRemoveOption:function(a,l){e.disabled||(l.group&&e.multiple?Ie(a,l):ke(a,l),Me(),e.closeOnSelect===!0&&(d.value=!1),e.clearOnSelect===!0&&V.value&&pe())},dataAttrs:ve,innerPlaceholder:Ce,selected:Te,highlightedOriginalIndex:Z,pointerForward:function(){Fe(),_(H)},pointerBackward:function(){Ve(),_(H)},pointerFirst:function(){var a,l=N(n.options.keys());try{for(l.s();!(a=l.n()).done;){var u=a.value;if(q(u))break}}catch(i){l.e(i)}finally{l.f()}_(H)},pointerLast:function(){var a,l=N(me(n.options.keys()).reverse());try{for(l.s();!(a=l.n()).done;){var u=a.value;if(q(u))break}}catch(i){l.e(i)}finally{l.f()}_(H)},typeAhead:function(a){var l,u;if(!e.searchable){var i=!1;if(Se.test(a.key)?(R+=a.key.toLowerCase(),i=!0):a.code==="Space"&&(R+=" "),i){var k,p=N(Ae.value);try{for(p.s();!(k=p.n()).done;){var M=k.value;if(((u=(l=n.labelBy(n.options[M]))===null||l===void 0?void 0:l.toLowerCase())===null||u===void 0?void 0:u.startsWith(R))===!0&&q(M))break}}catch(C){p.e(C)}finally{p.f()}clearTimeout(ce),ce=setTimeout(function(){R=""},500)}}},pointerSet:q,direction:fe}},components:{VInput:ae,VTags:oe,VDropdown:le}});re.__VERSION__="2.10.4";var Ge=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],Ye={class:"vue-select-header"},Ke={key:0,class:"vue-input"},Qe=["placeholder","autocomplete"],Je=["onClick"],Xe=h("span",{class:"icon loading"},[h("div"),h("div"),h("div")],-1),et={key:0,class:"vue-select-input-wrapper"},tt=h("span",{class:"icon loading"},[h("div"),h("div"),h("div")],-1);re.render=function(e,t,n,o,g,m){var r=J("v-tags"),v=J("v-input"),c=J("v-dropdown");return b(),x("div",ie({ref:"wrapper",class:["vue-select",["direction-".concat(e.direction)]],tabindex:e.isFocusing?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return e.focus&&e.focus.apply(e,arguments)}),onBlur:t[10]||(t[10]=function(d){return!e.searchable&&e.blur(d)})},Object.assign({},e.dataAttrs,e.$attrs),{onKeypress:t[11]||(t[11]=L(w(function(){return e.highlightedOriginalIndex!==null&&e.addOrRemoveOption(e.$event,e.optionsWithInfo[e.highlightedOriginalIndex])},["prevent","exact"]),["enter"])),onKeydown:[t[12]||(t[12]=L(w(function(){return e.pointerForward&&e.pointerForward.apply(e,arguments)},["prevent","exact"]),["down"])),t[13]||(t[13]=L(w(function(){return e.pointerBackward&&e.pointerBackward.apply(e,arguments)},["prevent","exact"]),["up"])),t[14]||(t[14]=L(w(function(){return e.pointerFirst&&e.pointerFirst.apply(e,arguments)},["prevent","exact"]),["home"])),t[15]||(t[15]=L(w(function(){return e.pointerLast&&e.pointerLast.apply(e,arguments)},["prevent","exact"]),["end"])),t[16]||(t[16]=function(){return e.typeAhead&&e.typeAhead.apply(e,arguments)})],id:"vs".concat(e.instance.uid,"-combobox"),role:e.searchable?"combobox":null,"aria-expanded":e.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(e.instance.uid,"-listbox"),"aria-activedescendant":e.highlightedOriginalIndex===null?null:"vs".concat(e.instance.uid,"-option-").concat(e.highlightedOriginalIndex),"aria-busy":e.loading,"aria-disabled":e.disabled}),[h("div",Ye,[e.multiple&&e.taggable&&e.modelValue.length===0||e.searchable===!1&&e.taggable===!1?(b(),x("div",Ke,[B(e.$slots,"label",{selected:e.selected},function(){return[h("input",{placeholder:e.innerPlaceholder,autocomplete:e.autocomplete,readonly:"",onClick:t[0]||(t[0]=function(){return e.focus&&e.focus.apply(e,arguments)})},null,8,Qe)]})])):$("v-if",!0),e.multiple&&e.taggable?(b(),x(P,{key:1},[X(r,{modelValue:e.optionsWithInfo,"collapse-tags":e.collapseTags,tabindex:"-1",onClick:e.focus},{default:ge(function(d){var f=d.option;return[B(e.$slots,"tag",{option:f.originalOption,remove:function(){return e.addOrRemoveOption(e.$event,f)}},function(){return[h("span",null,K(f.label),1),h("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:w(function(){return e.addOrRemoveOption(e.$event,f)},["prevent","stop"])},null,8,Je)]})]}),_:3},8,["modelValue","collapse-tags","onClick"]),B(e.$slots,"toggle",{isFocusing:e.isFocusing,toggle:e.toggle},function(){return[h("span",{class:Y(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[1]||(t[1]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[2]||(t[2]=w(function(){},["prevent","stop"]))},null,34)]})],64)):(b(),x(P,{key:2},[e.searchable?(b(),Le(v,{key:0,ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[3]||(t[3]=function(d){return e.searchingInputValue=d}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):$("v-if",!0),e.loading?B(e.$slots,"loading",{key:1},function(){return[Xe]}):B(e.$slots,"toggle",{key:2,isFocusing:e.isFocusing,toggle:e.toggle},function(){return[h("span",{class:Y(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[4]||(t[4]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[5]||(t[5]=w(function(){},["prevent","stop"]))},null,34)]})],64))]),e.multiple&&e.taggable&&e.searchable?(b(),x("div",et,[$e(X(v,{ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[6]||(t[6]=function(d){return e.searchingInputValue=d}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[Ue,e.isFocusing]]),e.loading?B(e.$slots,"loading",{key:0},function(){return[tt]}):$("v-if",!0)])):$("v-if",!0),X(c,{ref:"dropdown",modelValue:e.optionsWithInfo,"onUpdate:modelValue":t[7]||(t[7]=function(d){return e.optionsWithInfo=d}),onClickItem:e.addOrRemoveOption,onMouseenter:t[8]||(t[8]=function(d,f){return e.pointerSet(f.originalIndex)}),comboboxUid:e.instance.uid,maxHeight:e.maxHeight,highlightedOriginalIndex:e.highlightedOriginalIndex},{default:ge(function(d){var f=d.option;return[B(e.$slots,"dropdown-item",{option:f.originalOption},function(){return[h("span",null,K(f.label),1)]})]}),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,Ge)},re.__file="src/index.vue";export{re as Y};
|