import{an as V,ao as Te,ap as ze,aq as He,ar as We,as as Ke,at as Q,au as N,av as ee,aw as qe,ax as he,ay as Ue,c as f,o as u,H as b,a as x,b as q,I as w,J as v,F as me,z as ue,e as P,G as te,t as z,f as I,X as re,V as E,az as Fe,w as ae,g as be,x as F,a2 as we,d as ve,T as Je,_ as oe,k as Xe,a0 as G,r as K,h as Z,l as Oe,aA as Ye,U as Qe,aB as Ze,i as Ge,aC as et}from"./logreader-main.mjs";function ne(){return typeof window<"u"}function W(e){return ke(e)?(e.nodeName||"").toLowerCase():"#document"}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function T(e){var t;return(t=(ke(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ke(e){return ne()?e instanceof Node||e instanceof O(e).Node:!1}function _(e){return ne()?e instanceof Element||e instanceof O(e).Element:!1}function B(e){return ne()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function Se(e){return!ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}const tt=new Set(["inline","contents"]);function J(e){const{overflow:t,overflowX:o,overflowY:n,display:s}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!tt.has(s)}const ot=new Set(["table","td","th"]);function nt(e){return ot.has(W(e))}const it=[":popover-open",":modal"];function ie(e){return it.some(t=>{try{return e.matches(t)}catch{return!1}})}const st=["transform","translate","scale","rotate","perspective"],lt=["transform","translate","scale","rotate","perspective","filter"],rt=["paint","layout","strict","content"];function pe(e){const t=fe(),o=_(e)?$(e):e;return st.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||lt.some(n=>(o.willChange||"").includes(n))||rt.some(n=>(o.contain||"").includes(n))}function at(e){let t=k(e);for(;B(t)&&!H(t);){if(pe(t))return t;if(ie(t))return null;t=k(t)}return null}function fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ct=new Set(["html","body","#document"]);function H(e){return ct.has(W(e))}function $(e){return O(e).getComputedStyle(e)}function se(e){return _(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function k(e){if(W(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Se(e)&&e.host||T(e);return Se(t)?t.host:t}function De(e){const t=k(e);return H(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&J(t)?t:De(t)}function U(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=De(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),r=O(s);if(i){const l=de(r);return t.concat(r,r.visualViewport||[],J(s)?s:[],l&&o?U(l):[])}return t.concat(s,U(s,[],o))}function de(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ae(e){const t=$(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=B(e),i=s?e.offsetWidth:o,r=s?e.offsetHeight:n,l=ee(o)!==i||ee(n)!==r;return l&&(o=i,n=r),{width:o,height:n,$:l}}function ge(e){return _(e)?e:e.contextElement}function j(e){const t=ge(e);if(!B(t))return V(1);const o=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ae(t);let r=(i?ee(o.width):o.width)/n,l=(i?ee(o.height):o.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ht=V(0);function Pe(e){const t=O(e);return!fe()||!t.visualViewport?ht:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ut(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==O(e)?!1:t}function R(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),i=ge(e);let r=V(1);t&&(n?_(n)&&(r=j(n)):r=j(e));const l=ut(i,o,n)?Pe(i):V(0);let a=(s.left+l.x)/r.x,h=(s.top+l.y)/r.y,c=s.width/r.x,d=s.height/r.y;if(i){const g=O(i),p=n&&_(n)?O(n):n;let S=g,m=de(S);for(;m&&n&&p!==S;){const L=j(m),y=m.getBoundingClientRect(),C=$(m),D=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*L.x,X=y.top+(m.clientTop+parseFloat(C.paddingTop))*L.y;a*=L.x,h*=L.y,c*=L.x,d*=L.y,a+=D,h+=X,S=O(m),m=de(S)}}return Te({width:c,height:d,x:a,y:h})}function le(e,t){const o=se(e).scrollLeft;return t?t.left+o:R(T(e)).left+o}function Ee(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-le(e,o),s=o.top+t.scrollTop;return{x:n,y:s}}function dt(e){let{elements:t,rect:o,offsetParent:n,strategy:s}=e;const i=s==="fixed",r=T(n),l=t?ie(t.floating):!1;if(n===r||l&&i)return o;let a={scrollLeft:0,scrollTop:0},h=V(1);const c=V(0),d=B(n);if((d||!d&&!i)&&((W(n)!=="body"||J(r))&&(a=se(n)),B(n))){const p=R(n);h=j(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}const g=r&&!d&&!i?Ee(r,a):V(0);return{width:o.width*h.x,height:o.height*h.y,x:o.x*h.x-a.scrollLeft*h.x+c.x+g.x,y:o.y*h.y-a.scrollTop*h.y+c.y+g.y}}function pt(e){return Array.from(e.getClientRects())}function ft(e){const t=T(e),o=se(e),n=e.ownerDocument.body,s=N(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=N(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+le(e);const l=-o.scrollTop;return $(n).direction==="rtl"&&(r+=N(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:r,y:l}}const xe=25;function gt(e,t){const o=O(e),n=T(e),s=o.visualViewport;let i=n.clientWidth,r=n.clientHeight,l=0,a=0;if(s){i=s.width,r=s.height;const c=fe();(!c||c&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}const h=le(n);if(h<=0){const c=n.ownerDocument,d=c.body,g=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,S=Math.abs(n.clientWidth-d.clientWidth-p);S<=xe&&(i-=S)}else h<=xe&&(i+=h);return{width:i,height:r,x:l,y:a}}const yt=new Set(["absolute","fixed"]);function mt(e,t){const o=R(e,!0,t==="fixed"),n=o.top+e.clientTop,s=o.left+e.clientLeft,i=B(e)?j(e):V(1),r=e.clientWidth*i.x,l=e.clientHeight*i.y,a=s*i.x,h=n*i.y;return{width:r,height:l,x:a,y:h}}function Le(e,t,o){let n;if(t==="viewport")n=gt(e,o);else if(t==="document")n=ft(T(e));else if(_(t))n=mt(t,o);else{const s=Pe(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Te(n)}function Re(e,t){const o=k(e);return o===t||!_(o)||H(o)?!1:$(o).position==="fixed"||Re(o,t)}function bt(e,t){const o=t.get(e);if(o)return o;let n=U(e,[],!1).filter(l=>_(l)&&W(l)!=="body"),s=null;const i=$(e).position==="fixed";let r=i?k(e):e;for(;_(r)&&!H(r);){const l=$(r),a=pe(r);!a&&l.position==="fixed"&&(s=null),(i?!a&&!s:!a&&l.position==="static"&&s&&yt.has(s.position)||J(r)&&!a&&Re(e,r))?n=n.filter(h=>h!==r):s=l,r=k(r)}return t.set(e,n),n}function wt(e){let{element:t,boundary:o,rootBoundary:n,strategy:s}=e;const i=[...o==="clippingAncestors"?ie(t)?[]:bt(t,this._c):[].concat(o),n],r=i[0],l=i.reduce((a,h)=>{const c=Le(t,h,s);return a.top=N(c.top,a.top),a.right=he(c.right,a.right),a.bottom=he(c.bottom,a.bottom),a.left=N(c.left,a.left),a},Le(t,r,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vt(e){const{width:t,height:o}=Ae(e);return{width:t,height:o}}function Ot(e,t,o){const n=B(t),s=T(t),i=o==="fixed",r=R(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=V(0);function h(){a.x=le(s)}if(n||!n&&!i)if((W(t)!=="body"||J(s))&&(l=se(t)),n){const p=R(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else s&&h();i&&!n&&s&&h();const c=s&&!n&&!i?Ee(s,l):V(0),d=r.left+l.scrollLeft-a.x-c.x,g=r.top+l.scrollTop-a.y-c.y;return{x:d,y:g,width:r.width,height:r.height}}function ce(e){return $(e).position==="static"}function Ce(e,t){if(!B(e)||$(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return T(e)===o&&(o=o.ownerDocument.body),o}function Me(e,t){const o=O(e);if(ie(e))return o;if(!B(e)){let s=k(e);for(;s&&!H(s);){if(_(s)&&!ce(s))return s;s=k(s)}return o}let n=Ce(e,t);for(;n&&nt(n)&&ce(n);)n=Ce(n,t);return n&&H(n)&&ce(n)&&!pe(n)?o:n||at(e)||o}const St=async function(e){const t=this.getOffsetParent||Me,o=this.getDimensions,n=await o(e.floating);return{reference:Ot(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xt(e){return $(e).direction==="rtl"}const Lt={convertOffsetParentRelativeRectToViewportRelativeRect:dt,getDocumentElement:T,getClippingRect:wt,getOffsetParent:Me,getElementRects:St,getClientRects:pt,getDimensions:vt,getScale:j,isElement:_,isRTL:xt};function Ne(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t){let o=null,n;const s=T(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const h=e.getBoundingClientRect(),{left:c,top:d,width:g,height:p}=h;if(l||t(),!g||!p)return;const S=Q(d),m=Q(s.clientWidth-(c+g)),L=Q(s.clientHeight-(d+p)),y=Q(c),C={rootMargin:-S+"px "+-m+"px "+-L+"px "+-y+"px",threshold:N(0,he(1,a))||1};let D=!0;function X(je){const Y=je[0].intersectionRatio;if(Y!==a){if(!D)return r();Y?r(!1,Y):n=setTimeout(()=>{r(!1,1e-7)},1e3)}Y===1&&!Ne(h,e.getBoundingClientRect())&&r(),D=!1}try{o=new IntersectionObserver(X,{...C,root:s.ownerDocument})}catch{o=new IntersectionObserver(X,C)}o.observe(e)}return r(!0),i}function _t(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,h=ge(e),c=s||i?[...h?U(h):[],...U(t)]:[];c.forEach(y=>{s&&y.addEventListener("scroll",o,{passive:!0}),i&&y.addEventListener("resize",o)});const d=h&&l?Ct(h,o):null;let g=-1,p=null;r&&(p=new ResizeObserver(y=>{let[C]=y;C&&C.target===h&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(t)})),o()}),h&&!a&&p.observe(h),p.observe(t));let S,m=a?R(e):null;a&&L();function L(){const y=R(e);m&&!Ne(m,y)&&o(),m=y,S=requestAnimationFrame(L)}return o(),()=>{var y;c.forEach(C=>{s&&C.removeEventListener("scroll",o),i&&C.removeEventListener("resize",o)}),d?.(),(y=p)==null||y.disconnect(),p=null,a&&cancelAnimationFrame(S)}}const $t=ze,Vt=We,Bt=He,Tt=Ke,Ft=(e,t,o)=>{const n=new Map,s={platform:Lt,...o},i={...s.platform,_c:n};return qe(e,t,{...s,platform:i})};var kt=Object.defineProperty,Dt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,$e=(e,t,o)=>t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,M=(e,t)=>{for(var o in t||(t={}))Pt.call(t,o)&&$e(e,o,t[o]);if(_e)for(var o of _e(t))Et.call(t,o)&&$e(e,o,t[o]);return e},Ve=(e,t)=>Dt(e,At(t));const Rt={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var e;const t=((e=this.$refs.dropdownMenu)==null?void 0:e.children[this.typeAheadPointer])||!1;if(t){const o=this.getDropdownViewport(),{top:n,bottom:s,height:i}=t.getBoundingClientRect();if(no.bottom)return this.$refs.dropdownMenu.scrollTop=t.offsetTop-(o.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Mt={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let e=0;e=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},It={},jt={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},zt=x("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),Ht=[zt];function Wt(e,t){return u(),f("svg",jt,Ht)}const Kt=ye(It,[["render",Wt]]),qt={},Ut={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Jt=x("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),Xt=[Jt];function Yt(e,t){return u(),f("svg",Ut,Xt)}const Qt=ye(qt,[["render",Yt]]),Be={Deselect:Kt,OpenIndicator:Qt},Zt={mounted(e,{instance:t}){if(t.appendToBody){const{height:o,top:n,left:s,width:i}=t.$refs.toggle.getBoundingClientRect();let r=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset;e.unbindPosition=t.calculatePosition(e,t,{width:i+"px",left:r+s+"px",top:l+n+o+"px"}),document.body.appendChild(e)}},unmounted(e,{instance:t}){t.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};function Gt(e){const t={};return Object.keys(e).sort().forEach(o=>{t[o]=e[o]}),JSON.stringify(t)}let eo=0;function to(){return++eo}const oo={components:M({},Be),directives:{appendToBody:Zt},mixins:[Rt,Mt,Nt],compatConfig:{MODE:3},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"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},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"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:e=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn(`[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 e.hasOwnProperty("id")?e.id:Gt(e)}catch(t){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option. https://vue-select.org/api/props.html#getoptionkey`,e,t)}}},onTab:{type:Function,default:function(){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 n=this.getOptionLabel(o);return typeof n=="number"&&(n=n.toString()),this.filterBy(o,n,t)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default:function({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,t)=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,t,{width:o,top:n,left:s}){e.style.top=n,e.style.left=s,e.style.width=o}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:t,mutableLoading:o}){return e?!1:t&&!o}},uid:{type:[String,Number],default:()=>to()}},data(){return{search:"",open:!1,isComposing:!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:M({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,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,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:Ve(M({},e),{deselect:this.deselect}),footer:Ve(M({},e),{deselect:this.deselect})}},childComponents(){return M(M({},Be),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=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;const t=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){const o=this.createOption(this.search);this.optionExists(o)||t.unshift(o)}return t},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")}},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)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},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];if(this.searchEl===void 0||o.filter(Boolean).some(n=>n.contains(e.target)||n===e.target)){e.preventDefault();return}this.open&&t?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},optionComparator(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue(e){const t=n=>JSON.stringify(this.reduce(n))===JSON.stringify(e),o=[...this.options,...this.pushedTags].filter(t);return o.length===1?o[0]:o.find(n=>this.optionComparator(n,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))},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},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}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(e){const t=s=>(s.preventDefault(),!this.isComposing&&this.typeAheadSelect()),o={8:s=>this.maybeDeleteValue(),9:s=>this.onTab(),27:s=>this.onEscape(),38:s=>(s.preventDefault(),this.typeAheadUp()),40:s=>(s.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(s=>o[s]=t);const n=this.mapKeydown(o,this);if(typeof n[e.keyCode]=="function")return n[e.keyCode](e)}}},no=["dir"],io=["id","aria-expanded","aria-owns"],so={ref:"selectedOptions",class:"vs__selected-options"},lo=["disabled","title","aria-label","onClick"],ro={ref:"actions",class:"vs__actions"},ao=["disabled"],co={class:"vs__spinner"},ho=["id"],uo=["id","aria-selected","onMouseover","onClick"],po={key:0,class:"vs__no-options"},fo=te(" Sorry, no matching options. "),go=["id"];function yo(e,t,o,n,s,i){const r=Ue("append-to-body");return u(),f("div",{dir:o.dir,class:ve(["v-select",i.stateClasses])},[b(e.$slots,"header",w(v(i.scope.header))),x("div",{id:`vs${o.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${o.uid}__listbox`,"aria-label":"Search for option",onMousedown:t[1]||(t[1]=l=>i.toggleDropdown(l))},[x("div",so,[(u(!0),f(me,null,ue(i.selectedValue,(l,a)=>b(e.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(l),deselect:i.deselect,multiple:o.multiple,disabled:o.disabled},()=>[(u(),f("span",{key:o.getOptionKey(l),class:"vs__selected"},[b(e.$slots,"selected-option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)]),o.multiple?(u(),f("button",{key:0,ref_for:!0,ref:h=>s.deselectButtons[a]=h,disabled:o.disabled,type:"button",class:"vs__deselect",title:`Deselect ${o.getOptionLabel(l)}`,"aria-label":`Deselect ${o.getOptionLabel(l)}`,onClick:h=>i.deselect(l)},[(u(),I(re(i.childComponents.Deselect)))],8,lo)):P("",!0)]))])),256)),b(e.$slots,"search",w(v(i.scope.search)),()=>[x("input",E({class:"vs__search"},i.scope.search.attributes,Fe(i.scope.search.events)),null,16)])],512),x("div",ro,[ae(x("button",{ref:"clearButton",disabled:o.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:t[0]||(t[0]=(...l)=>i.clearSelection&&i.clearSelection(...l))},[(u(),I(re(i.childComponents.Deselect)))],8,ao),[[be,i.showClearButton]]),b(e.$slots,"open-indicator",w(v(i.scope.openIndicator)),()=>[o.noDrop?P("",!0):(u(),I(re(i.childComponents.OpenIndicator),w(E({key:0},i.scope.openIndicator.attributes)),null,16))]),b(e.$slots,"spinner",w(v(i.scope.spinner)),()=>[ae(x("div",co,"Loading...",512),[[be,e.mutableLoading]])])],512)],40,io),q(Je,{name:o.transition},{default:F(()=>[i.dropdownOpen?ae((u(),f("ul",{id:`vs${o.uid}__listbox`,ref:"dropdownMenu",key:`vs${o.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:t[2]||(t[2]=we((...l)=>i.onMousedown&&i.onMousedown(...l),["prevent"])),onMouseup:t[3]||(t[3]=(...l)=>i.onMouseUp&&i.onMouseUp(...l))},[b(e.$slots,"list-header",w(v(i.scope.listHeader))),(u(!0),f(me,null,ue(i.filteredOptions,(l,a)=>(u(),f("li",{id:`vs${o.uid}__option-${a}`,key:o.getOptionKey(l),role:"option",class:ve(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(l)&&a===e.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(l),"vs__dropdown-option--highlight":a===e.typeAheadPointer,"vs__dropdown-option--disabled":!o.selectable(l)}]),"aria-selected":a===e.typeAheadPointer?!0:null,onMouseover:h=>o.selectable(l)?e.typeAheadPointer=a:null,onClick:we(h=>o.selectable(l)?i.select(l):null,["prevent","stop"])},[b(e.$slots,"option",w(v(i.normalizeOptionForSlot(l))),()=>[te(z(o.getOptionLabel(l)),1)])],42,uo))),128)),i.filteredOptions.length===0?(u(),f("li",po,[b(e.$slots,"no-options",w(v(i.scope.noOptions)),()=>[fo])])):P("",!0),b(e.$slots,"list-footer",w(v(i.scope.listFooter)))],40,ho)),[[r]]):(u(),f("ul",{key:1,id:`vs${o.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,go))]),_:3},8,["name"]),b(e.$slots,"footer",w(v(i.scope.footer)))],10,no)}const A=ye(oo,[["render",yo]]),mo={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},bo=["aria-hidden","aria-label"],wo=["fill","width","height"],vo={d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},Oo={key:0};function So(e,t,o,n,s,i){return u(),f("span",E(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]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",vo,[o.title?(u(),f("title",Oo,z(o.title),1)):P("",!0)])],8,wo))],16,bo)}const xo=oe(mo,[["render",So]]),Lo={name:"CloseIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Co=["aria-hidden","aria-label"],_o=["fill","width","height"],$o={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"},Vo={key:0};function Bo(e,t,o,n,s,i){return u(),f("span",E(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]=r=>e.$emit("click",r))}),[(u(),f("svg",{fill:o.fillColor,class:"material-design-icon__svg",width:o.size,height:o.size,viewBox:"0 0 24 24"},[x("path",$o,[o.title?(u(),f("title",Vo,z(o.title),1)):P("",!0)])],8,_o))],16,Co)}const To=oe(Lo,[["render",Bo]]);function Ie(e,t){const o=[];let n=0,s=e.toLowerCase().indexOf(t.toLowerCase(),n),i=0;for(;s>-1&&i++[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=Ie(this.text,this.search),e.forEach((t,o)=>{t.end(o.start0&&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 n=t.length-1;t[n].end>=o.start?t[n]={start:t[n].start,end:Math.max(t[n].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.ranges.length&&te.highlight?G("strong",{},e.text):e.text)):G("span",{},this.text)}}),ko={name:"NcEllipsisedOption",components:{NcHighlight:Fo},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?Ie(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}},Do=["title"];function Ao(e,t,o,n,s,i){const r=K("NcHighlight");return u(),f("span",{dir:"auto",class:"name-parts",title:o.name},[q(r,{class:"name-parts__first",text:i.part1,search:o.search,highlight:i.highlight1},null,8,["text","search","highlight"]),i.part2?(u(),I(r,{key:0,class:"name-parts__last",text:i.part2,search:o.search,highlight:i.highlight2},null,8,["text","search","highlight"])):P("",!0)],8,Do)}const Po=oe(ko,[["render",Ao],["__scopeId","data-v-a612f185"]]);Ge(et);const Eo={name:"NcSelect",components:{ChevronDown:xo,NcEllipsisedOption:Po,NcLoadingIcon:Ye,VueSelect:A},props:{...A.props,...A.mixins.reduce((e,t)=>({...e,...t.props}),{}),ariaLabelClearSelected:{type:String,default:Z("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:Z("Options")},ariaLabelDeselectOption:{type:Function,default:e=>Z("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:()=>G(To,{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:()=>Oe()},inputLabel:{type:String,default:null},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:()=>Oe()},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:Ze}},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 n={name:"addClass",fn(){return e.classList.add("vs__dropdown-menu--floating"),{}}},s={name:"togglePlacementClass",fn({placement:r}){return t.$el.classList.toggle("select--drop-up",r==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",r==="top"),{}}},i=()=>{Ft(t.$refs.toggle,e,{placement:this.placement,middleware:[$t(-1),n,s,Bt(),Vt({limiter:Tt()})]}).then(({x:r,y:l})=>{Object.assign(e.style,{left:`${r}px`,top:`${l}px`,width:`${t.$refs.toggle.getBoundingClientRect().width}px`})})};return _t(t.$refs.toggle,e,i)}},localFilterBy(){return this.filterBy??A.props.filterBy.default},localLabel(){return this.label??A.props.label.default},propsToForward(){const e=[...Object.keys(A.props),...A.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:Z}},Ro=["for"],Mo=["required"];function No(e,t,o,n,s,i){const r=K("ChevronDown"),l=K("NcEllipsisedOption"),a=K("NcLoadingIcon"),h=K("VueSelect");return u(),I(h,E({class:["select",{"select--legacy":n.isLegacy,"select--no-wrap":o.noWrap}]},i.propsToForward,{onSearch:t[0]||(t[0]=c=>s.search=c),"onUpdate:modelValue":t[1]||(t[1]=c=>e.$emit("update:modelValue",c))}),Qe({search:F(({attributes:c,events:d})=>[x("input",E({class:["vs__search",[o.inputClass]]},c,{required:i.inputRequired,dir:"auto"},Fe(d,!0)),null,16,Mo)]),"open-indicator":F(({attributes:c})=>[q(r,E(c,{fillColor:"var(--vs-controls-color)",style:{cursor:o.disabled?null:"pointer"},size:26}),null,16,["style"])]),option:F(c=>[b(e.$slots,"option",w(v(c)),()=>[q(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),"selected-option":F(c=>[b(e.$slots,"selected-option",w(v(c)),()=>[q(l,{name:String(c[i.localLabel]),search:s.search},null,8,["name","search"])])]),spinner:F(c=>[c.loading?(u(),I(a,{key:0})):P("",!0)]),"no-options":F(()=>[te(z(i.t("No results")),1)]),_:2},[!o.labelOutside&&o.inputLabel?{name:"header",fn:F(()=>[x("label",{for:o.inputId,class:"select__label"},z(o.inputLabel),9,Ro)]),key:"0"}:void 0,ue(e.$slots,(c,d)=>({name:d,fn:F(g=>[b(e.$slots,d,w(v(g)))])}))]),1040,["class"])}const jo=oe(Eo,[["render",No]]);export{jo as default}; //# sourceMappingURL=index-BNSUgrug.chunk.mjs.map