@abi-software/flatmapvuer 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/flatmapvuer.umd.cjs
CHANGED
|
@@ -16,7 +16,7 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
|
16
16
|
z-index:-1000 !important;
|
|
17
17
|
top:0 !important;
|
|
18
18
|
right:0 !important;
|
|
19
|
-
`,QU=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function pU(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:QU.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function kL(e,t=1,r){var n;Aa||(Aa=document.createElement("textarea"),document.body.appendChild(Aa));const{paddingSize:i,borderSize:a,boxSizing:o,contextStyle:s}=pU(e);Aa.setAttribute("style",`${s};${TU}`),Aa.value=e.value||e.placeholder||"";let h=Aa.scrollHeight;const d={};o==="border-box"?h=h+a:o==="content-box"&&(h=h-i),Aa.value="";const Q=Aa.scrollHeight-i;if(K1(t)){let p=Q*t;o==="border-box"&&(p=p+i+a),h=Math.max(p,h),d.minHeight=`${p}px`}if(K1(r)){let p=Q*r;o==="border-box"&&(p=p+i+a),h=Math.min(p,h)}return d.height=`${h}px`,(n=Aa.parentNode)==null||n.removeChild(Aa),Aa=void 0,d}const mU=pn({id:{type:String,default:void 0},size:u3,disabled:Boolean,modelValue:{type:Ar([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Ar([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:l3},prefixIcon:{type:l3},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ar([Object,Array,String]),default:()=>t5({})},autofocus:{type:Boolean,default:!1}}),gU={[C1]:e=>X1(e),input:e=>X1(e),change:e=>X1(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},yU=["role"],_U=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],vU=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],xU=T.defineComponent({name:"ElInput",inheritAttrs:!1}),bU=T.defineComponent({...xU,props:mU,emits:gU,setup(e,{expose:t,emit:r}){const n=e,i=T.useAttrs(),a=T.useSlots(),o=T.computed(()=>{const me={};return n.containerRole==="combobox"&&(me["aria-haspopup"]=i["aria-haspopup"],me["aria-owns"]=i["aria-owns"],me["aria-expanded"]=i["aria-expanded"]),me}),s=T.computed(()=>[n.type==="textarea"?M.b():b.b(),b.m(_.value),b.is("disabled",x.value),b.is("exceed",Fe.value),{[b.b("group")]:a.prepend||a.append,[b.bm("group","append")]:a.append,[b.bm("group","prepend")]:a.prepend,[b.m("prefix")]:a.prefix||n.prefixIcon,[b.m("suffix")]:a.suffix||n.suffixIcon||n.clearable||n.showPassword,[b.bm("suffix","password-clear")]:Wt.value&&ce.value},i.class]),h=T.computed(()=>[b.e("wrapper"),b.is("focus",rt.value)]),d=Bz({excludeKeys:T.computed(()=>Object.keys(o.value))}),{form:Q,formItem:p}=d3(),{inputId:m}=l5(n,{formItemContext:p}),_=h3(),x=s5(),b=Hr("input"),M=Hr("textarea"),E=T.shallowRef(),O=T.shallowRef(),V=T.ref(!1),k=T.ref(!1),j=T.ref(!1),U=T.ref(),$=T.shallowRef(n.inputStyle),J=T.computed(()=>E.value||O.value),{wrapperRef:tt,isFocused:rt,handleFocus:st,handleBlur:pt}=HQ(J,{afterBlur(){var me;n.validateEvent&&((me=p==null?void 0:p.validate)==null||me.call(p,"blur").catch(ur=>Y1(ur)))}}),Ct=T.computed(()=>{var me;return(me=Q==null?void 0:Q.statusIcon)!=null?me:!1}),Ut=T.computed(()=>(p==null?void 0:p.validateState)||""),ae=T.computed(()=>Ut.value&&Kb[Ut.value]),ge=T.computed(()=>j.value?Oz:Mz),Ft=T.computed(()=>[i.style]),de=T.computed(()=>[n.inputStyle,$.value,{resize:n.resize}]),cr=T.computed(()=>a3(n.modelValue)?"":String(n.modelValue)),Wt=T.computed(()=>n.clearable&&!x.value&&!n.readonly&&!!cr.value&&(rt.value||V.value)),ce=T.computed(()=>n.showPassword&&!x.value&&!n.readonly&&!!cr.value&&(!!cr.value||rt.value)),pe=T.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!x.value&&!n.readonly&&!n.showPassword),be=T.computed(()=>cr.value.length),Fe=T.computed(()=>!!pe.value&&be.value>Number(n.maxlength)),$e=T.computed(()=>!!a.suffix||!!n.suffixIcon||Wt.value||n.showPassword||pe.value||!!Ut.value&&Ct.value),[je,Bt]=aU(E);es(O,me=>{if(zt(),!pe.value||n.resize!=="both")return;const ur=me[0],{width:Jr}=ur.contentRect;U.value={right:`calc(100% - ${Jr+15+6}px)`}});const Zt=()=>{const{type:me,autosize:ur}=n;if(!(!q1||me!=="textarea"||!O.value))if(ur){const Jr=yi(ur)?ur.minRows:void 0,En=yi(ur)?ur.maxRows:void 0,Te=kL(O.value,Jr,En);$.value={overflowY:"hidden",...Te},T.nextTick(()=>{O.value.offsetHeight,$.value=Te})}else $.value={minHeight:kL(O.value).minHeight}},zt=(me=>{let ur=!1;return()=>{var Jr;if(ur||!n.autosize)return;((Jr=O.value)==null?void 0:Jr.offsetParent)===null||(me(),ur=!0)}})(Zt),fe=()=>{const me=J.value,ur=n.formatter?n.formatter(cr.value):cr.value;!me||me.value===ur||(me.value=ur)},Re=async me=>{je();let{value:ur}=me.target;if(n.formatter&&(ur=n.parser?n.parser(ur):ur),!k.value){if(ur===cr.value){fe();return}r(C1,ur),r("input",ur),await T.nextTick(),fe(),Bt()}},Se=me=>{r("change",me.target.value)},He=me=>{r("compositionstart",me),k.value=!0},De=me=>{var ur;r("compositionupdate",me);const Jr=(ur=me.target)==null?void 0:ur.value,En=Jr[Jr.length-1]||"";k.value=!Jb(En)},ze=me=>{r("compositionend",me),k.value&&(k.value=!1,Re(me))},$t=()=>{j.value=!j.value,Dr()},Dr=async()=>{var me;await T.nextTick(),(me=J.value)==null||me.focus()},mn=()=>{var me;return(me=J.value)==null?void 0:me.blur()},Ke=me=>{V.value=!1,r("mouseleave",me)},_r=me=>{V.value=!0,r("mouseenter",me)},jn=me=>{r("keydown",me)},O1=()=>{var me;(me=J.value)==null||me.select()},wn=()=>{r(C1,""),r("change",""),r("clear"),r("input","")};return T.watch(()=>n.modelValue,()=>{var me;T.nextTick(()=>Zt()),n.validateEvent&&((me=p==null?void 0:p.validate)==null||me.call(p,"change").catch(ur=>Y1(ur)))}),T.watch(cr,()=>fe()),T.watch(()=>n.type,async()=>{await T.nextTick(),fe(),Zt()}),T.onMounted(()=>{!n.formatter&&n.parser&&Y1("ElInput","If you set the parser, you also need to set the formatter."),fe(),T.nextTick(Zt)}),t({input:E,textarea:O,ref:J,textareaStyle:de,autosize:T.toRef(n,"autosize"),focus:Dr,blur:mn,select:O1,clear:wn,resizeTextarea:Zt}),(me,ur)=>T.withDirectives((T.openBlock(),T.createElementBlock("div",T.mergeProps(T.unref(o),{class:T.unref(s),style:T.unref(Ft),role:me.containerRole,onMouseenter:_r,onMouseleave:Ke}),[T.createCommentVNode(" input "),me.type!=="textarea"?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createCommentVNode(" prepend slot "),me.$slots.prepend?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(b).be("group","prepend"))},[T.renderSlot(me.$slots,"prepend")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:T.normalizeClass(T.unref(h))},[T.createCommentVNode(" prefix slot "),me.$slots.prefix||me.prefixIcon?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(b).e("prefix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("prefix-inner"))},[T.renderSlot(me.$slots,"prefix"),me.prefixIcon?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(me.prefixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("input",T.mergeProps({id:T.unref(m),ref_key:"input",ref:E,class:T.unref(b).e("inner")},T.unref(d),{minlength:me.minlength,maxlength:me.maxlength,type:me.showPassword?j.value?"text":"password":me.type,disabled:T.unref(x),readonly:me.readonly,autocomplete:me.autocomplete,tabindex:me.tabindex,"aria-label":me.label,placeholder:me.placeholder,style:me.inputStyle,form:me.form,autofocus:me.autofocus,onCompositionstart:He,onCompositionupdate:De,onCompositionend:ze,onInput:Re,onFocus:ur[0]||(ur[0]=(...Jr)=>T.unref(st)&&T.unref(st)(...Jr)),onBlur:ur[1]||(ur[1]=(...Jr)=>T.unref(pt)&&T.unref(pt)(...Jr)),onChange:Se,onKeydown:jn}),null,16,_U),T.createCommentVNode(" suffix slot "),T.unref($e)?(T.openBlock(),T.createElementBlock("span",{key:1,class:T.normalizeClass(T.unref(b).e("suffix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("suffix-inner"))},[!T.unref(Wt)||!T.unref(ce)||!T.unref(pe)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.renderSlot(me.$slots,"suffix"),me.suffixIcon?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(me.suffixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],64)):T.createCommentVNode("v-if",!0),T.unref(Wt)?(T.openBlock(),T.createBlock(T.unref(_i),{key:1,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("clear")]),onMousedown:T.withModifiers(T.unref(ll),["prevent"]),onClick:wn},{default:T.withCtx(()=>[T.createVNode(T.unref(gQ))]),_:1},8,["class","onMousedown"])):T.createCommentVNode("v-if",!0),T.unref(ce)?(T.openBlock(),T.createBlock(T.unref(_i),{key:2,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("password")]),onClick:$t},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ge))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.unref(pe)?(T.openBlock(),T.createElementBlock("span",{key:3,class:T.normalizeClass(T.unref(b).e("count"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("count-inner"))},T.toDisplayString(T.unref(be))+" / "+T.toDisplayString(me.maxlength),3)],2)):T.createCommentVNode("v-if",!0),T.unref(Ut)&&T.unref(ae)&&T.unref(Ct)?(T.openBlock(),T.createBlock(T.unref(_i),{key:4,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("validateIcon"),T.unref(b).is("loading",T.unref(Ut)==="validating")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ae))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0)],2),T.createCommentVNode(" append slot "),me.$slots.append?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(T.unref(b).be("group","append"))},[T.renderSlot(me.$slots,"append")],2)):T.createCommentVNode("v-if",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createCommentVNode(" textarea "),T.createElementVNode("textarea",T.mergeProps({id:T.unref(m),ref_key:"textarea",ref:O,class:T.unref(M).e("inner")},T.unref(d),{minlength:me.minlength,maxlength:me.maxlength,tabindex:me.tabindex,disabled:T.unref(x),readonly:me.readonly,autocomplete:me.autocomplete,style:T.unref(de),"aria-label":me.label,placeholder:me.placeholder,form:me.form,autofocus:me.autofocus,onCompositionstart:He,onCompositionupdate:De,onCompositionend:ze,onInput:Re,onFocus:ur[2]||(ur[2]=(...Jr)=>T.unref(st)&&T.unref(st)(...Jr)),onBlur:ur[3]||(ur[3]=(...Jr)=>T.unref(pt)&&T.unref(pt)(...Jr)),onChange:Se,onKeydown:jn}),null,16,vU),T.unref(pe)?(T.openBlock(),T.createElementBlock("span",{key:0,style:T.normalizeStyle(U.value),class:T.normalizeClass(T.unref(b).e("count"))},T.toDisplayString(T.unref(be))+" / "+T.toDisplayString(me.maxlength),7)):T.createCommentVNode("v-if",!0)],64))],16,yU)),[[T.vShow,me.type!=="hidden"]])}});var LU=Or(bU,[["__file","input.vue"]]);const Qu=Ji(LU),c5=4,wU={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},EU=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),RL=Symbol("scrollbarContextKey"),MU=pn({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),AU="Thumb";var BL=Or(T.defineComponent({__name:"thumb",props:MU,setup(e){const t=e,r=T.inject(RL),n=Hr("scrollbar");r||fz(AU,"can not inject scrollbar context");const i=T.ref(),a=T.ref(),o=T.ref({}),s=T.ref(!1);let h=!1,d=!1,Q=q1?document.onselectstart:null;const p=T.computed(()=>wU[t.vertical?"vertical":"horizontal"]),m=T.computed(()=>EU({size:t.size,move:t.move,bar:p.value})),_=T.computed(()=>i.value[p.value.offset]**2/r.wrapElement[p.value.scrollSize]/t.ratio/a.value[p.value.offset]),x=U=>{var $;if(U.stopPropagation(),U.ctrlKey||[1,2].includes(U.button))return;($=window.getSelection())==null||$.removeAllRanges(),M(U);const J=U.currentTarget;J&&(o.value[p.value.axis]=J[p.value.offset]-(U[p.value.client]-J.getBoundingClientRect()[p.value.direction]))},b=U=>{if(!a.value||!i.value||!r.wrapElement)return;const $=Math.abs(U.target.getBoundingClientRect()[p.value.direction]-U[p.value.client]),J=a.value[p.value.offset]/2,tt=($-J)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=tt*r.wrapElement[p.value.scrollSize]/100},M=U=>{U.stopImmediatePropagation(),h=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",O),Q=document.onselectstart,document.onselectstart=()=>!1},E=U=>{if(!i.value||!a.value||h===!1)return;const $=o.value[p.value.axis];if(!$)return;const J=(i.value.getBoundingClientRect()[p.value.direction]-U[p.value.client])*-1,tt=a.value[p.value.offset]-$,rt=(J-tt)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=rt*r.wrapElement[p.value.scrollSize]/100},O=()=>{h=!1,o.value[p.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",O),j(),d&&(s.value=!1)},V=()=>{d=!1,s.value=!!t.size},k=()=>{d=!0,s.value=h};T.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",O)});const j=()=>{document.onselectstart!==Q&&(document.onselectstart=Q)};return n3(T.toRef(r,"scrollbarElement"),"mousemove",V),n3(T.toRef(r,"scrollbarElement"),"mouseleave",k),(U,$)=>(T.openBlock(),T.createBlock(T.Transition,{name:T.unref(n).b("fade"),persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{ref_key:"instance",ref:i,class:T.normalizeClass([T.unref(n).e("bar"),T.unref(n).is(T.unref(p).key)]),onMousedown:b},[T.createElementVNode("div",{ref_key:"thumb",ref:a,class:T.normalizeClass(T.unref(n).e("thumb")),style:T.normalizeStyle(T.unref(m)),onMousedown:x},null,38)],34),[[T.vShow,U.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const SU=pn({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var CU=Or(T.defineComponent({__name:"bar",props:SU,setup(e,{expose:t}){const r=e,n=T.ref(0),i=T.ref(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-c5,h=o.offsetWidth-c5;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/h*r.ratioX}}}),(o,s)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createVNode(BL,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),T.createVNode(BL,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const HU=pn({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ar([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),OU={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(K1)},IQ="ElScrollbar",VU=T.defineComponent({name:IQ}),IU=T.defineComponent({...VU,props:HU,emits:OU,setup(e,{expose:t,emit:r}){const n=e,i=Hr("scrollbar");let a,o;const s=T.ref(),h=T.ref(),d=T.ref(),Q=T.ref("0"),p=T.ref("0"),m=T.ref(),_=T.ref(1),x=T.ref(1),b=T.computed(()=>{const $={};return n.height&&($.height=J6(n.height)),n.maxHeight&&($.maxHeight=J6(n.maxHeight)),[n.wrapStyle,$]}),M=T.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=T.computed(()=>[i.e("view"),n.viewClass]),O=()=>{var $;h.value&&(($=m.value)==null||$.handleScroll(h.value),r("scroll",{scrollTop:h.value.scrollTop,scrollLeft:h.value.scrollLeft}))};function V($,J){yi($)?h.value.scrollTo($):K1($)&&K1(J)&&h.value.scrollTo($,J)}const k=$=>{if(!K1($)){Y1(IQ,"value must be a number");return}h.value.scrollTop=$},j=$=>{if(!K1($)){Y1(IQ,"value must be a number");return}h.value.scrollLeft=$},U=()=>{if(!h.value)return;const $=h.value.offsetHeight-c5,J=h.value.offsetWidth-c5,tt=$**2/h.value.scrollHeight,rt=J**2/h.value.scrollWidth,st=Math.max(tt,n.minSize),pt=Math.max(rt,n.minSize);_.value=tt/($-tt)/(st/($-st)),x.value=rt/(J-rt)/(pt/(J-pt)),p.value=st+c5<$?`${st}px`:"",Q.value=pt+c5<J?`${pt}px`:""};return T.watch(()=>n.noresize,$=>{$?(a==null||a(),o==null||o()):({stop:a}=es(d,U),o=n3("resize",U))},{immediate:!0}),T.watch(()=>[n.maxHeight,n.height],()=>{n.native||T.nextTick(()=>{var $;U(),h.value&&(($=m.value)==null||$.handleScroll(h.value))})}),T.provide(RL,T.reactive({scrollbarElement:s,wrapElement:h})),T.onMounted(()=>{n.native||T.nextTick(()=>{U()})}),T.onUpdated(()=>U()),t({wrapRef:h,update:U,scrollTo:V,setScrollTop:k,setScrollLeft:j,handleScroll:O}),($,J)=>(T.openBlock(),T.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:T.normalizeClass(T.unref(i).b())},[T.createElementVNode("div",{ref_key:"wrapRef",ref:h,class:T.normalizeClass(T.unref(M)),style:T.normalizeStyle(T.unref(b)),onScroll:O},[(T.openBlock(),T.createBlock(T.resolveDynamicComponent($.tag),{id:$.id,ref_key:"resizeRef",ref:d,class:T.normalizeClass(T.unref(E)),style:T.normalizeStyle($.viewStyle),role:$.role,"aria-label":$.ariaLabel,"aria-orientation":$.ariaOrientation},{default:T.withCtx(()=>[T.renderSlot($.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),$.native?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(CU,{key:0,ref_key:"barRef",ref:m,height:p.value,width:Q.value,always:$.always,"ratio-x":x.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var DU=Or(IU,[["__file","scrollbar.vue"]]);const PU=Ji(DU),DQ=Symbol("popper"),NL=Symbol("popperContent"),FL=pn({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),kU=T.defineComponent({name:"ElPopper",inheritAttrs:!1}),RU=T.defineComponent({...kU,props:FL,setup(e,{expose:t}){const r=e,n=T.ref(),i=T.ref(),a=T.ref(),o=T.ref(),s=T.computed(()=>r.role),h={triggerRef:n,popperInstanceRef:i,contentRef:a,referenceRef:o,role:s};return t(h),T.provide(DQ,h),(d,Q)=>T.renderSlot(d.$slots,"default")}});var BU=Or(RU,[["__file","popper.vue"]]);const jL=pn({arrowOffset:{type:Number,default:5}}),NU=T.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),FU=T.defineComponent({...NU,props:jL,setup(e,{expose:t}){const r=e,n=Hr("popper"),{arrowOffset:i,arrowRef:a,arrowStyle:o}=T.inject(NL,void 0);return T.watch(()=>r.arrowOffset,s=>{i.value=s}),T.onBeforeUnmount(()=>{a.value=void 0}),t({arrowRef:a}),(s,h)=>(T.openBlock(),T.createElementBlock("span",{ref_key:"arrowRef",ref:a,class:T.normalizeClass(T.unref(n).e("arrow")),style:T.normalizeStyle(T.unref(o)),"data-popper-arrow":""},null,6))}});var jU=Or(FU,[["__file","arrow.vue"]]);const PQ="ElOnlyChild",zU=T.defineComponent({name:PQ,setup(e,{slots:t,attrs:r}){var n;const i=T.inject(CL),a=iU((n=i==null?void 0:i.setForwardRef)!=null?n:ll);return()=>{var o;const s=(o=t.default)==null?void 0:o.call(t,r);if(!s)return null;if(s.length>1)return Y1(PQ,"requires exact only one valid child."),null;const h=zL(s);return h?T.withDirectives(T.cloneVNode(h,r),[[a]]):(Y1(PQ,"no valid child node found"),null)}}});function zL(e){if(!e)return null;const t=e;for(const r of t){if(yi(r))switch(r.type){case T.Comment:continue;case T.Text:case"svg":return $L(r);case T.Fragment:return zL(r.children);default:return r}return $L(r)}return null}function $L(e){const t=Hr("only-child");return T.createVNode("span",{class:t.e("content")},[e])}const UL=pn({virtualRef:{type:Ar(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ar(Function)},onMouseleave:{type:Ar(Function)},onClick:{type:Ar(Function)},onKeydown:{type:Ar(Function)},onFocus:{type:Ar(Function)},onBlur:{type:Ar(Function)},onContextmenu:{type:Ar(Function)},id:String,open:Boolean}),$U=T.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),UU=T.defineComponent({...$U,props:UL,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=T.inject(DQ,void 0);nU(i);const a=T.computed(()=>s.value?r.id:void 0),o=T.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=T.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),h=T.computed(()=>s.value?`${r.open}`:void 0);let d;return T.onMounted(()=>{T.watch(()=>r.virtualRef,Q=>{Q&&(i.value=ts(Q))},{immediate:!0}),T.watch(i,(Q,p)=>{d==null||d(),d=void 0,pl(Q)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(m=>{var _;const x=r[m];x&&(Q.addEventListener(m.slice(2).toLowerCase(),x),(_=p==null?void 0:p.removeEventListener)==null||_.call(p,m.slice(2).toLowerCase(),x))}),d=T.watch([a,o,s,h],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,x)=>{a3(m[x])?Q.removeAttribute(_):Q.setAttribute(_,m[x])})},{immediate:!0})),pl(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>p.removeAttribute(m))},{immediate:!0})}),T.onBeforeUnmount(()=>{d==null||d(),d=void 0}),t({triggerRef:i}),(Q,p)=>Q.virtualTriggering?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(T.unref(zU),T.mergeProps({key:0},Q.$attrs,{"aria-controls":T.unref(a),"aria-describedby":T.unref(o),"aria-expanded":T.unref(h),"aria-haspopup":T.unref(s)}),{default:T.withCtx(()=>[T.renderSlot(Q.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var GU=Or(UU,[["__file","trigger.vue"]]);const kQ="focus-trap.focus-after-trapped",RQ="focus-trap.focus-after-released",ZU="focus-trap.focusout-prevented",GL={cancelable:!0,bubbles:!1},WU={cancelable:!0,bubbles:!1},ZL="focusAfterTrapped",WL="focusAfterReleased",qU=Symbol("elFocusTrap"),BQ=T.ref(),pu=T.ref(0),NQ=T.ref(0);let mu=0;const qL=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},XL=(e,t)=>{for(const r of e)if(!XU(r,t))return r},XU=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},KU=e=>{const t=qL(e),r=XL(t,e),n=XL(t.reverse(),e);return[r,n]},YU=e=>e instanceof HTMLInputElement&&"select"in e,f3=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),NQ.value=window.performance.now(),e!==r&&YU(e)&&t&&e.select()}};function KL(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const JU=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=KL(e,n),e.unshift(n)},remove:n=>{var i,a;e=KL(e,n),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},tG=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(f3(n,t),document.activeElement!==r)return},YL=JU(),eG=()=>pu.value>NQ.value,gu=()=>{BQ.value="pointer",pu.value=window.performance.now()},JL=()=>{BQ.value="keyboard",pu.value=window.performance.now()},rG=()=>(T.onMounted(()=>{mu===0&&(document.addEventListener("mousedown",gu),document.addEventListener("touchstart",gu),document.addEventListener("keydown",JL)),mu++}),T.onBeforeUnmount(()=>{mu--,mu<=0&&(document.removeEventListener("mousedown",gu),document.removeEventListener("touchstart",gu),document.removeEventListener("keydown",JL))}),{focusReason:BQ,lastUserFocusTimestamp:pu,lastAutomatedFocusTimestamp:NQ}),yu=e=>new CustomEvent(ZU,{...WU,detail:e}),nG=T.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ZL,WL,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=T.ref();let n,i;const{focusReason:a}=rG();Y$(x=>{e.trapped&&!o.paused&&t("release-requested",x)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=x=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:b,altKey:M,ctrlKey:E,metaKey:O,currentTarget:V,shiftKey:k}=x,{loop:j}=e,U=b===t2.tab&&!M&&!E&&!O,$=document.activeElement;if(U&&$){const J=V,[tt,rt]=KU(J);if(tt&&rt){if(!k&&$===rt){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&f3(tt,!0))}else if(k&&[tt,J].includes($)){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&f3(rt,!0))}}else if($===J){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||x.preventDefault()}}};T.provide(qU,{focusTrapRef:r,onKeydown:s}),T.watch(()=>e.focusTrapEl,x=>{x&&(r.value=x)},{immediate:!0}),T.watch([r],([x],[b])=>{x&&(x.addEventListener("keydown",s),x.addEventListener("focusin",Q),x.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",Q),b.removeEventListener("focusout",p))});const h=x=>{t(ZL,x)},d=x=>t(WL,x),Q=x=>{const b=T.unref(r);if(!b)return;const M=x.target,E=x.relatedTarget,O=M&&b.contains(M);e.trapped||E&&b.contains(E)||(n=E),O&&t("focusin",x),!o.paused&&e.trapped&&(O?i=M:f3(i,!0))},p=x=>{const b=T.unref(r);if(!(o.paused||!b))if(e.trapped){const M=x.relatedTarget;!a3(M)&&!b.contains(M)&&setTimeout(()=>{if(!o.paused&&e.trapped){const E=yu({focusReason:a.value});t("focusout-prevented",E),E.defaultPrevented||f3(i,!0)}},0)}else{const M=x.target;M&&b.contains(M)||t("focusout",x)}};async function m(){await T.nextTick();const x=T.unref(r);if(x){YL.push(o);const b=x.contains(document.activeElement)?n:document.activeElement;if(n=b,!x.contains(b)){const E=new Event(kQ,GL);x.addEventListener(kQ,h),x.dispatchEvent(E),E.defaultPrevented||T.nextTick(()=>{let O=e.focusStartEl;X1(O)||(f3(O),document.activeElement!==O&&(O="first")),O==="first"&&tG(qL(x),!0),(document.activeElement===b||O==="container")&&f3(x)})}}}function _(){const x=T.unref(r);if(x){x.removeEventListener(kQ,h);const b=new CustomEvent(RQ,{...GL,detail:{focusReason:a.value}});x.addEventListener(RQ,d),x.dispatchEvent(b),!b.defaultPrevented&&(a.value=="keyboard"||!eG()||x.contains(document.activeElement))&&f3(n??document.body),x.removeEventListener(RQ,d),YL.remove(o)}}return T.onMounted(()=>{e.trapped&&m(),T.watch(()=>e.trapped,x=>{x?m():_()})}),T.onBeforeUnmount(()=>{e.trapped&&_()}),{onKeydown:s}}});function iG(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var aG=Or(nG,[["render",iG],["__file","focus-trap.vue"]]);const oG=["fixed","absolute"],sG=pn({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ar(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:cu,default:"bottom"},popperOptions:{type:Ar(Object),default:()=>({})},strategy:{type:String,values:oG,default:"absolute"}}),tw=pn({...sG,id:String,style:{type:Ar([String,Array,Object])},className:{type:Ar([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ar([String,Array,Object])},popperStyle:{type:Ar([String,Array,Object])},referenceEl:{type:Ar(Object)},triggerTargetEl:{type:Ar(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),lG={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},cG=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,a={placement:r,strategy:n,...i,modifiers:[...hG(e),...t]};return dG(a,i==null?void 0:i.modifiers),a},uG=e=>{if(q1)return ts(e)};function hG(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function dG(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const fG=0,TG=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=T.inject(DQ,void 0),a=T.ref(),o=T.ref(),s=T.computed(()=>({name:"eventListeners",enabled:!!e.visible})),h=T.computed(()=>{var E;const O=T.unref(a),V=(E=T.unref(o))!=null?E:fG;return{name:"arrow",enabled:!oz(O),options:{element:O,padding:V}}}),d=T.computed(()=>({onFirstUpdate:()=>{x()},...cG(e,[T.unref(h),T.unref(s)])})),Q=T.computed(()=>uG(e.referenceEl)||T.unref(n)),{attributes:p,state:m,styles:_,update:x,forceUpdate:b,instanceRef:M}=q$(Q,r,d);return T.watch(M,E=>t.value=E),T.onMounted(()=>{T.watch(()=>{var E;return(E=T.unref(Q))==null?void 0:E.getBoundingClientRect()},()=>{x()})}),{attributes:p,arrowRef:a,contentRef:r,instanceRef:M,state:m,styles:_,role:i,forceUpdate:b,update:x}},QG=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=IL(),a=Hr("popper"),o=T.computed(()=>T.unref(t).popper),s=T.ref(K1(e.zIndex)?e.zIndex:i()),h=T.computed(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),d=T.computed(()=>[{zIndex:T.unref(s)},T.unref(r).popper,e.popperStyle||{}]),Q=T.computed(()=>n.value==="dialog"?"false":void 0),p=T.computed(()=>T.unref(r).arrow||{});return{ariaModal:Q,arrowStyle:p,contentAttrs:o,contentClass:h,contentStyle:d,contentZIndex:s,updateZIndex:()=>{s.value=K1(e.zIndex)?e.zIndex:i()}}},pG=(e,t)=>{const r=T.ref(!1),n=T.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:d=>{var Q;((Q=d.detail)==null?void 0:Q.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!r.value&&(d.target&&(n.value=d.target),r.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},mG=T.defineComponent({name:"ElPopperContent"}),gG=T.defineComponent({...mG,props:tw,emits:lG,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:a,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:h,onFocusoutPrevented:d,onReleaseRequested:Q}=pG(n,r),{attributes:p,arrowRef:m,contentRef:_,styles:x,instanceRef:b,role:M,update:E}=TG(n),{ariaModal:O,arrowStyle:V,contentAttrs:k,contentClass:j,contentStyle:U,updateZIndex:$}=QG(n,{styles:x,attributes:p,role:M}),J=T.inject(Ml,void 0),tt=T.ref();T.provide(NL,{arrowStyle:V,arrowRef:m,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&T.provide(Ml,{...J,addInputId:ll,removeInputId:ll});let rt;const st=(Ct=!0)=>{E(),Ct&&$()},pt=()=>{st(!1),n.visible&&n.focusOnShow?a.value=!0:n.visible===!1&&(a.value=!1)};return T.onMounted(()=>{T.watch(()=>n.triggerTargetEl,(Ct,Ut)=>{rt==null||rt(),rt=void 0;const ae=T.unref(Ct||_.value),ge=T.unref(Ut||_.value);pl(ae)&&(rt=T.watch([M,()=>n.ariaLabel,O,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((de,cr)=>{a3(Ft[cr])?ae.removeAttribute(de):ae.setAttribute(de,Ft[cr])})},{immediate:!0})),ge!==ae&&pl(ge)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{ge.removeAttribute(Ft)})},{immediate:!0}),T.watch(()=>n.visible,pt,{immediate:!0})}),T.onBeforeUnmount(()=>{rt==null||rt(),rt=void 0}),t({popperContentRef:_,popperInstanceRef:b,updatePopper:st,contentStyle:U}),(Ct,Ut)=>(T.openBlock(),T.createElementBlock("div",T.mergeProps({ref_key:"contentRef",ref:_},T.unref(k),{style:T.unref(U),class:T.unref(j),tabindex:"-1",onMouseenter:Ut[0]||(Ut[0]=ae=>Ct.$emit("mouseenter",ae)),onMouseleave:Ut[1]||(Ut[1]=ae=>Ct.$emit("mouseleave",ae))}),[T.createVNode(T.unref(aG),{trapped:T.unref(a),"trap-on-focus-in":!0,"focus-trap-el":T.unref(_),"focus-start-el":T.unref(i),onFocusAfterTrapped:T.unref(s),onFocusAfterReleased:T.unref(o),onFocusin:T.unref(h),onFocusoutPrevented:T.unref(d),onReleaseRequested:T.unref(Q)},{default:T.withCtx(()=>[T.renderSlot(Ct.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var yG=Or(gG,[["__file","content.vue"]]);const _G=Ji(BU),FQ=Symbol("elTooltip"),H2=pn({...eU,...tw,appendTo:{type:Ar([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Ar(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Al=pn({...UL,disabled:Boolean,trigger:{type:Ar([String,Array]),default:"hover"},triggerKeys:{type:Ar(Array),default:()=>[t2.enter,t2.space]}}),{useModelToggleProps:vG,useModelToggleEmits:xG,useModelToggle:bG}=nL("visible"),LG=pn({...FL,...vG,...H2,...Al,...jL,showArrow:{type:Boolean,default:!0}}),wG=[...xG,"before-show","before-hide","show","hide","open","close"],EG=(e,t)=>Ii(e)?e.includes(t):e===t,u5=(e,t,r)=>n=>{EG(T.unref(e),t)&&r(n)},MG=T.defineComponent({name:"ElTooltipTrigger"}),AG=T.defineComponent({...MG,props:Al,setup(e,{expose:t}){const r=e,n=Hr("tooltip"),{controlled:i,id:a,open:o,onOpen:s,onClose:h,onToggle:d}=T.inject(FQ,void 0),Q=T.ref(null),p=()=>{if(T.unref(i)||r.disabled)return!0},m=T.toRef(r,"trigger"),_=Jo(p,u5(m,"hover",s)),x=Jo(p,u5(m,"hover",h)),b=Jo(p,u5(m,"click",k=>{k.button===0&&d(k)})),M=Jo(p,u5(m,"focus",s)),E=Jo(p,u5(m,"focus",h)),O=Jo(p,u5(m,"contextmenu",k=>{k.preventDefault(),d(k)})),V=Jo(p,k=>{const{code:j}=k;r.triggerKeys.includes(j)&&(k.preventDefault(),d(k))});return t({triggerRef:Q}),(k,j)=>(T.openBlock(),T.createBlock(T.unref(GU),{id:T.unref(a),"virtual-ref":k.virtualRef,open:T.unref(o),"virtual-triggering":k.virtualTriggering,class:T.normalizeClass(T.unref(n).e("trigger")),onBlur:T.unref(E),onClick:T.unref(b),onContextmenu:T.unref(O),onFocus:T.unref(M),onMouseenter:T.unref(_),onMouseleave:T.unref(x),onKeydown:T.unref(V)},{default:T.withCtx(()=>[T.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var SG=Or(AG,[["__file","trigger.vue"]]);const CG=T.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),HG=T.defineComponent({...CG,props:H2,setup(e,{expose:t}){const r=e,{selector:n}=SL(),i=Hr("tooltip"),a=T.ref(null),o=T.ref(!1),{controlled:s,id:h,open:d,trigger:Q,onClose:p,onOpen:m,onShow:_,onHide:x,onBeforeShow:b,onBeforeHide:M}=T.inject(FQ,void 0),E=T.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),O=T.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);T.onBeforeUnmount(()=>{o.value=!0});const V=T.computed(()=>T.unref(O)?!0:T.unref(d)),k=T.computed(()=>r.disabled?!1:T.unref(d)),j=T.computed(()=>r.appendTo||n.value),U=T.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),$=T.computed(()=>!T.unref(d)),J=()=>{x()},tt=()=>{if(T.unref(s))return!0},rt=Jo(tt,()=>{r.enterable&&T.unref(Q)==="hover"&&m()}),st=Jo(tt,()=>{T.unref(Q)==="hover"&&p()}),pt=()=>{var Ft,de;(de=(Ft=a.value)==null?void 0:Ft.updatePopper)==null||de.call(Ft),b==null||b()},Ct=()=>{M==null||M()},Ut=()=>{_(),ge=WR(T.computed(()=>{var Ft;return(Ft=a.value)==null?void 0:Ft.popperContentRef}),()=>{if(T.unref(s))return;T.unref(Q)!=="hover"&&p()})},ae=()=>{r.virtualTriggering||p()};let ge;return T.watch(()=>T.unref(d),Ft=>{Ft||ge==null||ge()},{flush:"post"}),T.watch(()=>r.content,()=>{var Ft,de;(de=(Ft=a.value)==null?void 0:Ft.updatePopper)==null||de.call(Ft)}),t({contentRef:a}),(Ft,de)=>(T.openBlock(),T.createBlock(T.Teleport,{disabled:!Ft.teleported,to:T.unref(j)},[T.createVNode(T.Transition,{name:T.unref(E),onAfterLeave:J,onBeforeEnter:pt,onAfterEnter:Ut,onBeforeLeave:Ct},{default:T.withCtx(()=>[T.unref(V)?T.withDirectives((T.openBlock(),T.createBlock(T.unref(yG),T.mergeProps({key:0,id:T.unref(h),ref_key:"contentRef",ref:a},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":T.unref($),"boundaries-padding":Ft.boundariesPadding,"fallback-placements":Ft.fallbackPlacements,"gpu-acceleration":Ft.gpuAcceleration,offset:Ft.offset,placement:Ft.placement,"popper-options":Ft.popperOptions,strategy:Ft.strategy,effect:Ft.effect,enterable:Ft.enterable,pure:Ft.pure,"popper-class":Ft.popperClass,"popper-style":[Ft.popperStyle,T.unref(U)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:T.unref(k),"z-index":Ft.zIndex,onMouseenter:T.unref(rt),onMouseleave:T.unref(st),onBlur:ae,onClose:T.unref(p)}),{default:T.withCtx(()=>[o.value?T.createCommentVNode("v-if",!0):T.renderSlot(Ft.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[T.vShow,T.unref(k)]]):T.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var OG=Or(HG,[["__file","content.vue"]]);const VG=["innerHTML"],IG={key:1},DG=T.defineComponent({name:"ElTooltip"}),PG=T.defineComponent({...DG,props:LG,emits:wG,setup(e,{expose:t,emit:r}){const n=e;tU();const i=El(),a=T.ref(),o=T.ref(),s=()=>{var E;const O=T.unref(a);O&&((E=O.popperInstanceRef)==null||E.update())},h=T.ref(!1),d=T.ref(),{show:Q,hide:p,hasUpdateHandler:m}=bG({indicator:h,toggleReason:d}),{onOpen:_,onClose:x}=rU({showAfter:T.toRef(n,"showAfter"),hideAfter:T.toRef(n,"hideAfter"),autoClose:T.toRef(n,"autoClose"),open:Q,close:p}),b=T.computed(()=>o3(n.visible)&&!m.value);T.provide(FQ,{controlled:b,id:i,open:T.readonly(h),trigger:T.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{x(E)},onToggle:E=>{T.unref(h)?x(E):_(E)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:s}),T.watch(()=>n.disabled,E=>{E&&h.value&&(h.value=!1)});const M=E=>{var O,V;const k=(V=(O=o.value)==null?void 0:O.contentRef)==null?void 0:V.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return k&&k.contains(j)};return T.onDeactivated(()=>h.value&&p()),t({popperRef:a,contentRef:o,isFocusInsideContent:M,updatePopper:s,onOpen:_,onClose:x,hide:p}),(E,O)=>(T.openBlock(),T.createBlock(T.unref(_G),{ref_key:"popperRef",ref:a,role:E.role},{default:T.withCtx(()=>[T.createVNode(SG,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:T.withCtx(()=>[E.$slots.default?T.renderSlot(E.$slots,"default",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),T.createVNode(OG,{ref_key:"contentRef",ref:o,"aria-label":E.ariaLabel,"boundaries-padding":E.boundariesPadding,content:E.content,disabled:E.disabled,effect:E.effect,enterable:E.enterable,"fallback-placements":E.fallbackPlacements,"hide-after":E.hideAfter,"gpu-acceleration":E.gpuAcceleration,offset:E.offset,persistent:E.persistent,"popper-class":E.popperClass,"popper-style":E.popperStyle,placement:E.placement,"popper-options":E.popperOptions,pure:E.pure,"raw-content":E.rawContent,"reference-el":E.referenceEl,"trigger-target-el":E.triggerTargetEl,"show-after":E.showAfter,strategy:E.strategy,teleported:E.teleported,transition:E.transition,"virtual-triggering":E.virtualTriggering,"z-index":E.zIndex,"append-to":E.appendTo},{default:T.withCtx(()=>[T.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(T.openBlock(),T.createElementBlock("span",{key:0,innerHTML:E.content},null,8,VG)):(T.openBlock(),T.createElementBlock("span",IG,T.toDisplayString(E.content),1))]),E.showArrow?(T.openBlock(),T.createBlock(T.unref(jU),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):T.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var kG=Or(PG,[["__file","tooltip.vue"]]);const jQ=Ji(kG),ew=Symbol("buttonGroupContextKey"),RG=(e,t)=>{tL({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},T.computed(()=>e.type==="text"));const r=T.inject(ew,void 0),n=OQ("button"),{form:i}=d3(),a=h3(T.computed(()=>r==null?void 0:r.size)),o=s5(),s=T.ref(),h=T.useSlots(),d=T.computed(()=>e.type||(r==null?void 0:r.type)||""),Q=T.computed(()=>{var x,b,M;return(M=(b=e.autoInsertSpace)!=null?b:(x=n.value)==null?void 0:x.autoInsertSpace)!=null?M:!1}),p=T.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),m=T.computed(()=>{var x;const b=(x=h.default)==null?void 0:x.call(h);if(Q.value&&(b==null?void 0:b.length)===1){const M=b[0];if((M==null?void 0:M.type)===T.Text){const E=M.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:o,_size:a,_type:d,_ref:s,_props:p,shouldAddSpace:m,handleClick:x=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",x)}}},zQ=pn({size:u3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:l3},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:l3,default:()=>yQ},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ar([String,Object]),default:"button"}}),BG={click:e=>e instanceof MouseEvent};function vi(e,t){NG(e)&&(e="100%");var r=FG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function _u(e){return Math.min(1,Math.max(0,e))}function NG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function FG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function rw(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function vu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function H4(e){return e.length===1?"0"+e:String(e)}function jG(e,t,r){return{r:vi(e,255)*255,g:vi(t,255)*255,b:vi(r,255)*255}}function nw(e,t,r){e=vi(e,255),t=vi(t,255),r=vi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var h=n-i;switch(o=s>.5?h/(2-n-i):h/(n+i),n){case e:a=(t-r)/h+(t<r?6:0);break;case t:a=(r-e)/h+2;break;case r:a=(e-t)/h+4;break}a/=6}return{h:a,s:o,l:s}}function $Q(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function zG(e,t,r){var n,i,a;if(e=vi(e,360),t=vi(t,100),r=vi(r,100),t===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;n=$Q(s,o,e+1/3),i=$Q(s,o,e),a=$Q(s,o,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function iw(e,t,r){e=vi(e,255),t=vi(t,255),r=vi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=n,s=n-i,h=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/s+(t<r?6:0);break;case t:a=(r-e)/s+2;break;case r:a=(e-t)/s+4;break}a/=6}return{h:a,s:h,v:o}}function $G(e,t,r){e=vi(e,360)*6,t=vi(t,100),r=vi(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),o=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,o,a,a,s,r][h],Q=[s,r,r,o,a,a][h],p=[a,a,s,r,r,o][h];return{r:d*255,g:Q*255,b:p*255}}function aw(e,t,r,n){var i=[H4(Math.round(e).toString(16)),H4(Math.round(t).toString(16)),H4(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function UG(e,t,r,n,i){var a=[H4(Math.round(e).toString(16)),H4(Math.round(t).toString(16)),H4(Math.round(r).toString(16)),H4(GG(n))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function GG(e){return Math.round(parseFloat(e)*255).toString(16)}function ow(e){return O2(e)/255}function O2(e){return parseInt(e,16)}function ZG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var UQ={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function WG(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=KG(e)),typeof e=="object"&&(ss(e.r)&&ss(e.g)&&ss(e.b)?(t=jG(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ss(e.h)&&ss(e.s)&&ss(e.v)?(n=vu(e.s),i=vu(e.v),t=$G(e.h,n,i),o=!0,s="hsv"):ss(e.h)&&ss(e.s)&&ss(e.l)&&(n=vu(e.s),a=vu(e.l),t=zG(e.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=rw(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var qG="[-\\+]?\\d+%?",XG="[-\\+]?\\d*\\.\\d+%?",T3="(?:".concat(XG,")|(?:").concat(qG,")"),GQ="[\\s|\\(]+(".concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")\\s*\\)?"),ZQ="[\\s|\\(]+(".concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")\\s*\\)?"),Sa={CSS_UNIT:new RegExp(T3),rgb:new RegExp("rgb"+GQ),rgba:new RegExp("rgba"+ZQ),hsl:new RegExp("hsl"+GQ),hsla:new RegExp("hsla"+ZQ),hsv:new RegExp("hsv"+GQ),hsva:new RegExp("hsva"+ZQ),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function KG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(UQ[e])e=UQ[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Sa.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Sa.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Sa.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Sa.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Sa.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Sa.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Sa.hex8.exec(e),r?{r:O2(r[1]),g:O2(r[2]),b:O2(r[3]),a:ow(r[4]),format:t?"name":"hex8"}:(r=Sa.hex6.exec(e),r?{r:O2(r[1]),g:O2(r[2]),b:O2(r[3]),format:t?"name":"hex"}:(r=Sa.hex4.exec(e),r?{r:O2(r[1]+r[1]),g:O2(r[2]+r[2]),b:O2(r[3]+r[3]),a:ow(r[4]+r[4]),format:t?"name":"hex8"}:(r=Sa.hex3.exec(e),r?{r:O2(r[1]+r[1]),g:O2(r[2]+r[2]),b:O2(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ss(e){return!!Sa.CSS_UNIT.exec(String(e))}var YG=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=ZG(t)),this.originalInput=t;var i=WG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,a=t.r/255,o=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=rw(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=iw(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=iw(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=nw(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=nw(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),aw(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),UG(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(vi(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(vi(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+aw(this.r,this.g,this.b,!1),r=0,n=Object.entries(UQ);r<n.length;r++){var i=n[r],a=i[0],o=i[1];if(t===o)return a}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=_u(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=_u(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=_u(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=_u(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(new e({h:n,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],a=360/t,o=1;o<t;o++)i.push(new e({h:(n+o*a)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Q3(e,t=20){return e.mix("#141414",t).toString()}function JG(e){const t=s5(),r=Hr("button");return T.computed(()=>{let n={};const i=e.color;if(i){const a=new YG(i),o=e.dark?a.tint(20).toString():Q3(a,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Q3(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Q3(a,50):a.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Q3(a,90):a.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Q3(a,50):a.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Q3(a,80):a.tint(80).toString());else{const s=e.dark?Q3(a,30):a.tint(30).toString(),h=a.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":h,"border-color":i,"hover-bg-color":s,"hover-text-color":h,"hover-border-color":s,"active-bg-color":o,"active-border-color":o}),t.value){const d=e.dark?Q3(a,50):a.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const tZ=T.defineComponent({name:"ElButton"}),eZ=T.defineComponent({...tZ,props:zQ,emits:BG,setup(e,{expose:t,emit:r}){const n=e,i=JG(n),a=Hr("button"),{_ref:o,_size:s,_type:h,_disabled:d,_props:Q,shouldAddSpace:p,handleClick:m}=RG(n,r);return t({ref:o,size:s,type:h,disabled:d,shouldAddSpace:p}),(_,x)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.tag),T.mergeProps({ref_key:"_ref",ref:o},T.unref(Q),{class:[T.unref(a).b(),T.unref(a).m(T.unref(h)),T.unref(a).m(T.unref(s)),T.unref(a).is("disabled",T.unref(d)),T.unref(a).is("loading",_.loading),T.unref(a).is("plain",_.plain),T.unref(a).is("round",_.round),T.unref(a).is("circle",_.circle),T.unref(a).is("text",_.text),T.unref(a).is("link",_.link),T.unref(a).is("has-bg",_.bg)],style:T.unref(i),onClick:T.unref(m)}),{default:T.withCtx(()=>[_.loading?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[_.$slots.loading?T.renderSlot(_.$slots,"loading",{key:0}):(T.openBlock(),T.createBlock(T.unref(_i),{key:1,class:T.normalizeClass(T.unref(a).is("loading"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(T.openBlock(),T.createBlock(T.unref(_i),{key:1},{default:T.withCtx(()=>[_.icon?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.icon),{key:0})):T.renderSlot(_.$slots,"icon",{key:1})]),_:3})):T.createCommentVNode("v-if",!0),_.$slots.default?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass({[T.unref(a).em("text","expand")]:T.unref(p)})},[T.renderSlot(_.$slots,"default")],2)):T.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var rZ=Or(eZ,[["__file","button.vue"]]);const nZ={size:zQ.size,type:zQ.type},iZ=T.defineComponent({name:"ElButtonGroup"}),aZ=T.defineComponent({...iZ,props:nZ,setup(e){const t=e;T.provide(ew,T.reactive({size:T.toRef(t,"size"),type:T.toRef(t,"type")}));const r=Hr("button");return(n,i)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`${T.unref(r).b("group")}`)},[T.renderSlot(n.$slots,"default")],2))}});var sw=Or(aZ,[["__file","button-group.vue"]]);const co=Ji(rZ,{ButtonGroup:sw});Ea(sw);var D=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oZ(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const p3=new Map;let lw;q1&&(document.addEventListener("mousedown",e=>lw=e),document.addEventListener("mouseup",e=>{for(const t of p3.values())for(const{documentHandler:r}of t)r(e,lw)}));function cw(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:pl(t.arg)&&r.push(t.arg),function(n,i){const a=t.instance.popperRef,o=n.target,s=i==null?void 0:i.target,h=!t||!t.instance,d=!o||!s,Q=e.contains(o)||e.contains(s),p=e===o,m=r.length&&r.some(x=>x==null?void 0:x.contains(o))||r.length&&r.includes(s),_=a&&(a.contains(o)||a.contains(s));h||d||Q||p||m||_||t.value(n,i)}}const uw={beforeMount(e,t){p3.has(e)||p3.set(e,[]),p3.get(e).push({documentHandler:cw(e,t),bindingFn:t.value})},updated(e,t){p3.has(e)||p3.set(e,[]);const r=p3.get(e),n=r.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:cw(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){p3.delete(e)}},hw={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:u3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},dw={[C1]:e=>X1(e)||K1(e)||o3(e),change:e=>X1(e)||K1(e)||o3(e)},d5=Symbol("checkboxGroupContextKey"),sZ=({model:e,isChecked:t})=>{const r=T.inject(d5,void 0),n=T.computed(()=>{var a,o;const s=(a=r==null?void 0:r.max)==null?void 0:a.value,h=(o=r==null?void 0:r.min)==null?void 0:o.value;return!Ql(s)&&e.value.length>=s&&!t.value||!Ql(h)&&e.value.length<=h&&t.value});return{isDisabled:s5(T.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},lZ=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:a})=>{const o=T.inject(d5,void 0),{formItem:s}=d3(),{emit:h}=T.getCurrentInstance();function d(x){var b,M;return x===e.trueLabel||x===!0?(b=e.trueLabel)!=null?b:!0:(M=e.falseLabel)!=null?M:!1}function Q(x,b){h("change",d(x),b)}function p(x){if(r.value)return;const b=x.target;h("change",d(b.checked),x)}async function m(x){r.value||!n.value&&!i.value&&a.value&&(x.composedPath().some(E=>E.tagName==="LABEL")||(t.value=d([!1,e.falseLabel].includes(t.value)),await T.nextTick(),Q(t.value,x)))}const _=T.computed(()=>(o==null?void 0:o.validateEvent)||e.validateEvent);return T.watch(()=>e.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(x=>Y1(x)))}),{handleChange:p,onClickRoot:m}},cZ=e=>{const t=T.ref(!1),{emit:r}=T.getCurrentInstance(),n=T.inject(d5,void 0),i=T.computed(()=>Ql(n)===!1),a=T.ref(!1),o=T.computed({get(){var s,h;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(h=e.modelValue)!=null?h:t.value},set(s){var h,d;i.value&&Ii(s)?(a.value=((h=n==null?void 0:n.max)==null?void 0:h.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>o.value.length,a.value===!1&&((d=n==null?void 0:n.changeEvent)==null||d.call(n,s))):(r(C1,s),t.value=s)}});return{model:o,isGroup:i,isLimitExceeded:a}},uZ=(e,t,{model:r})=>{const n=T.inject(d5,void 0),i=T.ref(!1),a=T.computed(()=>{const d=r.value;return o3(d)?d:Ii(d)?yi(e.label)?d.map(T.toRaw).some(Q=>Tl(Q,e.label)):d.map(T.toRaw).includes(e.label):d!=null?d===e.trueLabel:!!d}),o=h3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),s=h3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),h=T.computed(()=>!!t.default||!a3(e.label));return{checkboxButtonSize:o,isChecked:a,isFocused:i,checkboxSize:s,hasOwnLabel:h}},hZ=(e,{model:t})=>{function r(){Ii(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},fw=(e,t)=>{const{formItem:r}=d3(),{model:n,isGroup:i,isLimitExceeded:a}=cZ(e),{isFocused:o,isChecked:s,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q}=uZ(e,t,{model:n}),{isDisabled:p}=sZ({model:n,isChecked:s}),{inputId:m,isLabeledByFormItem:_}=l5(e,{formItemContext:r,disableIdGeneration:Q,disableIdManagement:i}),{handleChange:x,onClickRoot:b}=lZ(e,{model:n,isLimitExceeded:a,hasOwnLabel:Q,isDisabled:p,isLabeledByFormItem:_});return hZ(e,{model:n}),{inputId:m,isLabeledByFormItem:_,isChecked:s,isDisabled:p,isFocused:o,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q,model:n,handleChange:x,onClickRoot:b}},dZ=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],fZ=["id","indeterminate","disabled","value","name","tabindex"],TZ=T.defineComponent({name:"ElCheckbox"}),QZ=T.defineComponent({...TZ,props:hw,emits:dw,setup(e){const t=e,r=T.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:a,isDisabled:o,isFocused:s,checkboxSize:h,hasOwnLabel:d,model:Q,handleChange:p,onClickRoot:m}=fw(t,r),_=Hr("checkbox"),x=T.computed(()=>[_.b(),_.m(h.value),_.is("disabled",o.value),_.is("bordered",t.border),_.is("checked",a.value)]),b=T.computed(()=>[_.e("input"),_.is("disabled",o.value),_.is("checked",a.value),_.is("indeterminate",t.indeterminate),_.is("focus",s.value)]);return(M,E)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(!T.unref(d)&&T.unref(i)?"span":"label"),{class:T.normalizeClass(T.unref(x)),"aria-controls":M.indeterminate?M.controls:null,onClick:T.unref(m)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b))},[M.trueLabel||M.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,id:T.unref(n),"onUpdate:modelValue":E[0]||(E[0]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,name:M.name,tabindex:M.tabindex,disabled:T.unref(o),"true-value":M.trueLabel,"false-value":M.falseLabel,onChange:E[1]||(E[1]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[2]||(E[2]=O=>s.value=!0),onBlur:E[3]||(E[3]=O=>s.value=!1),onClick:E[4]||(E[4]=T.withModifiers(()=>{},["stop"]))},null,42,dZ)),[[T.vModelCheckbox,T.unref(Q)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,id:T.unref(n),"onUpdate:modelValue":E[5]||(E[5]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,disabled:T.unref(o),value:M.label,name:M.name,tabindex:M.tabindex,onChange:E[6]||(E[6]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[7]||(E[7]=O=>s.value=!0),onBlur:E[8]||(E[8]=O=>s.value=!1),onClick:E[9]||(E[9]=T.withModifiers(()=>{},["stop"]))},null,42,fZ)),[[T.vModelCheckbox,T.unref(Q)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(_).e("inner"))},null,2)],2),T.unref(d)?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(_).e("label"))},[T.renderSlot(M.$slots,"default"),M.$slots.default?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createTextVNode(T.toDisplayString(M.label),1)],64))],2)):T.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var pZ=Or(QZ,[["__file","checkbox.vue"]]);const mZ=["name","tabindex","disabled","true-value","false-value"],gZ=["name","tabindex","disabled","value"],yZ=T.defineComponent({name:"ElCheckboxButton"}),_Z=T.defineComponent({...yZ,props:hw,emits:dw,setup(e){const t=e,r=T.useSlots(),{isFocused:n,isChecked:i,isDisabled:a,checkboxButtonSize:o,model:s,handleChange:h}=fw(t,r),d=T.inject(d5,void 0),Q=Hr("checkbox"),p=T.computed(()=>{var _,x,b,M;const E=(x=(_=d==null?void 0:d.fill)==null?void 0:_.value)!=null?x:"";return{backgroundColor:E,borderColor:E,color:(M=(b=d==null?void 0:d.textColor)==null?void 0:b.value)!=null?M:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),m=T.computed(()=>[Q.b("button"),Q.bm("button",o.value),Q.is("disabled",a.value),Q.is("checked",i.value),Q.is("focus",n.value)]);return(_,x)=>(T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass(T.unref(m))},[_.trueLabel||_.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,"onUpdate:modelValue":x[0]||(x[0]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(a),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:x[1]||(x[1]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[2]||(x[2]=b=>n.value=!0),onBlur:x[3]||(x[3]=b=>n.value=!1),onClick:x[4]||(x[4]=T.withModifiers(()=>{},["stop"]))},null,42,mZ)),[[T.vModelCheckbox,T.unref(s)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,"onUpdate:modelValue":x[5]||(x[5]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(a),value:_.label,onChange:x[6]||(x[6]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[7]||(x[7]=b=>n.value=!0),onBlur:x[8]||(x[8]=b=>n.value=!1),onClick:x[9]||(x[9]=T.withModifiers(()=>{},["stop"]))},null,42,gZ)),[[T.vModelCheckbox,T.unref(s)]]),_.$slots.default||_.label?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass(T.unref(Q).be("button","inner")),style:T.normalizeStyle(T.unref(i)?T.unref(p):void 0)},[T.renderSlot(_.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(_.label),1)])],6)):T.createCommentVNode("v-if",!0)],2))}});var Tw=Or(_Z,[["__file","checkbox-button.vue"]]);const vZ=pn({modelValue:{type:Ar(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:u3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),xZ={[C1]:e=>Ii(e),change:e=>Ii(e)},bZ=T.defineComponent({name:"ElCheckboxGroup"}),LZ=T.defineComponent({...bZ,props:vZ,emits:xZ,setup(e,{emit:t}){const r=e,n=Hr("checkbox"),{formItem:i}=d3(),{inputId:a,isLabeledByFormItem:o}=l5(r,{formItemContext:i}),s=async d=>{t(C1,d),await T.nextTick(),t("change",d)},h=T.computed({get(){return r.modelValue},set(d){s(d)}});return T.provide(d5,{...uz(T.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:h,changeEvent:s}),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(d=>Y1(d)))}),(d,Q)=>{var p;return T.openBlock(),T.createBlock(T.resolveDynamicComponent(d.tag),{id:T.unref(a),class:T.normalizeClass(T.unref(n).b("group")),role:"group","aria-label":T.unref(o)?void 0:d.label||"checkbox-group","aria-labelledby":T.unref(o)?(p=T.unref(i))==null?void 0:p.labelId:void 0},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Qw=Or(LZ,[["__file","checkbox-group.vue"]]);const xu=Ji(pZ,{CheckboxButton:Tw,CheckboxGroup:Qw});Ea(Tw);const WQ=Ea(Qw),pw=pn({size:u3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),wZ=pn({...pw,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),mw={[C1]:e=>X1(e)||K1(e)||o3(e),[ou]:e=>X1(e)||K1(e)||o3(e)},gw=Symbol("radioGroupKey"),yw=(e,t)=>{const r=T.ref(),n=T.inject(gw,void 0),i=T.computed(()=>!!n),a=T.computed({get(){return i.value?n.modelValue:e.modelValue},set(Q){i.value?n.changeEvent(Q):t&&t(C1,Q),r.value.checked=e.modelValue===e.label}}),o=h3(T.computed(()=>n==null?void 0:n.size)),s=s5(T.computed(()=>n==null?void 0:n.disabled)),h=T.ref(!1),d=T.computed(()=>s.value||i.value&&a.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:h,size:o,disabled:s,tabIndex:d,modelValue:a}},EZ=["value","name","disabled"],MZ=T.defineComponent({name:"ElRadio"}),AZ=T.defineComponent({...MZ,props:wZ,emits:mw,setup(e,{emit:t}){const r=e,n=Hr("radio"),{radioRef:i,radioGroup:a,focus:o,size:s,disabled:h,modelValue:d}=yw(r,t);function Q(){T.nextTick(()=>t("change",d.value))}return(p,m)=>{var _;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("focus",T.unref(o)),T.unref(n).is("bordered",p.border),T.unref(n).is("checked",T.unref(d)===p.label),T.unref(n).m(T.unref(s))])},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(n).e("input"),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("checked",T.unref(d)===p.label)])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m[0]||(m[0]=x=>T.isRef(d)?d.value=x:null),class:T.normalizeClass(T.unref(n).e("original")),value:p.label,name:p.name||((_=T.unref(a))==null?void 0:_.name),disabled:T.unref(h),type:"radio",onFocus:m[1]||(m[1]=x=>o.value=!0),onBlur:m[2]||(m[2]=x=>o.value=!1),onChange:Q,onClick:m[3]||(m[3]=T.withModifiers(()=>{},["stop"]))},null,42,EZ),[[T.vModelRadio,T.unref(d)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("inner"))},null,2)],2),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("label")),onKeydown:m[4]||(m[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(p.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(p.label),1)])],34)],2)}}});var SZ=Or(AZ,[["__file","radio.vue"]]);const CZ=pn({...pw,name:{type:String,default:""}}),HZ=["value","name","disabled"],OZ=T.defineComponent({name:"ElRadioButton"}),VZ=T.defineComponent({...OZ,props:CZ,setup(e){const t=e,r=Hr("radio"),{radioRef:n,focus:i,size:a,disabled:o,modelValue:s,radioGroup:h}=yw(t),d=T.computed(()=>({backgroundColor:(h==null?void 0:h.fill)||"",borderColor:(h==null?void 0:h.fill)||"",boxShadow:h!=null&&h.fill?`-1px 0 0 0 ${h.fill}`:"",color:(h==null?void 0:h.textColor)||""}));return(Q,p)=>{var m;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(r).b("button"),T.unref(r).is("active",T.unref(s)===Q.label),T.unref(r).is("disabled",T.unref(o)),T.unref(r).is("focus",T.unref(i)),T.unref(r).bm("button",T.unref(a))])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=_=>T.isRef(s)?s.value=_:null),class:T.normalizeClass(T.unref(r).be("button","original-radio")),value:Q.label,type:"radio",name:Q.name||((m=T.unref(h))==null?void 0:m.name),disabled:T.unref(o),onFocus:p[1]||(p[1]=_=>i.value=!0),onBlur:p[2]||(p[2]=_=>i.value=!1),onClick:p[3]||(p[3]=T.withModifiers(()=>{},["stop"]))},null,42,HZ),[[T.vModelRadio,T.unref(s)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(r).be("button","inner")),style:T.normalizeStyle(T.unref(s)===Q.label?T.unref(d):{}),onKeydown:p[4]||(p[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(Q.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(Q.label),1)])],38)],2)}}});var _w=Or(VZ,[["__file","radio-button.vue"]]);const IZ=pn({id:{type:String,default:void 0},size:u3,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),DZ=mw,PZ=["id","aria-label","aria-labelledby"],kZ=T.defineComponent({name:"ElRadioGroup"}),RZ=T.defineComponent({...kZ,props:IZ,emits:DZ,setup(e,{emit:t}){const r=e,n=Hr("radio"),i=El(),a=T.ref(),{formItem:o}=d3(),{inputId:s,isLabeledByFormItem:h}=l5(r,{formItemContext:o}),d=p=>{t(C1,p),T.nextTick(()=>t("change",p))};T.onMounted(()=>{const p=a.value.querySelectorAll("[type=radio]"),m=p[0];!Array.from(p).some(_=>_.checked)&&m&&(m.tabIndex=0)});const Q=T.computed(()=>r.name||i.value);return T.provide(gw,T.reactive({...T.toRefs(r),changeEvent:d,name:Q})),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(o==null||o.validate("change").catch(p=>Y1(p)))}),(p,m)=>(T.openBlock(),T.createElementBlock("div",{id:T.unref(s),ref_key:"radioGroupRef",ref:a,class:T.normalizeClass(T.unref(n).b("group")),role:"radiogroup","aria-label":T.unref(h)?void 0:p.label||"radio-group","aria-labelledby":T.unref(h)?T.unref(o).labelId:void 0},[T.renderSlot(p.$slots,"default")],10,PZ))}});var vw=Or(RZ,[["__file","radio-group.vue"]]);const xw=Ji(SZ,{RadioButton:_w,RadioGroup:vw}),bw=Ea(vw);Ea(_w);const Lw=pn({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Yb},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),BZ={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},NZ=T.defineComponent({name:"ElTag"}),FZ=T.defineComponent({...NZ,props:Lw,emits:BZ,setup(e,{emit:t}){const r=e,n=h3(),i=Hr("tag"),a=T.computed(()=>{const{type:h,hit:d,effect:Q,closable:p,round:m}=r;return[i.b(),i.is("closable",p),i.m(h||"primary"),i.m(n.value),i.m(Q),i.is("hit",d),i.is("round",m)]}),o=h=>{t("close",h)},s=h=>{t("click",h)};return(h,d)=>h.disableTransitions?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(o,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)):(T.openBlock(),T.createBlock(T.Transition,{key:1,name:`${T.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(o,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var jZ=Or(FZ,[["__file","tag.vue"]]);const zZ=Ji(jZ),ww=Symbol("rowContextKey"),$Z=pn({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),UZ=T.defineComponent({name:"ElRow"}),GZ=T.defineComponent({...UZ,props:$Z,setup(e){const t=e,r=Hr("row"),n=T.computed(()=>t.gutter);T.provide(ww,{gutter:n});const i=T.computed(()=>{const o={};return t.gutter&&(o.marginRight=o.marginLeft=`-${t.gutter/2}px`),o}),a=T.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(o,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(o.tag),{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var ZZ=Or(GZ,[["__file","row.vue"]]);const ls=Ji(ZZ),WZ=pn({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Ar([Number,Object]),default:()=>t5({})},sm:{type:Ar([Number,Object]),default:()=>t5({})},md:{type:Ar([Number,Object]),default:()=>t5({})},lg:{type:Ar([Number,Object]),default:()=>t5({})},xl:{type:Ar([Number,Object]),default:()=>t5({})}}),qZ=T.defineComponent({name:"ElCol"}),XZ=T.defineComponent({...qZ,props:WZ,setup(e){const t=e,{gutter:r}=T.inject(ww,{gutter:T.computed(()=>0)}),n=Hr("col"),i=T.computed(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),a=T.computed(()=>{const o=[];return["span","offset","pull","push"].forEach(d=>{const Q=t[d];K1(Q)&&(d==="span"?o.push(n.b(`${t[d]}`)):Q>0&&o.push(n.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{K1(t[d])?o.push(n.b(`${d}-${t[d]}`)):yi(t[d])&&Object.entries(t[d]).forEach(([Q,p])=>{o.push(Q!=="span"?n.b(`${d}-${Q}-${p}`):n.b(`${d}-${p}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(o.tag),{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var KZ=Or(XZ,[["__file","col.vue"]]);const m3=Ji(KZ),YZ=T.defineComponent({name:"ElCollapseTransition"}),JZ=T.defineComponent({...YZ,setup(e){const t=Hr("collapse-transition"),r=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},n={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){r(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){r(i)},leaveCancelled(i){r(i)}};return(i,a)=>(T.openBlock(),T.createBlock(T.Transition,T.mergeProps({name:T.unref(t).b()},T.toHandlers(n)),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var bu=Or(JZ,[["__file","collapse-transition.vue"]]);bu.install=e=>{e.component(bu.name,bu)};const tW=bu,eW=pn({color:{type:Ar(Object),required:!0},vertical:{type:Boolean,default:!1}});let qQ=!1;function Sl(e,t){if(!q1)return;const r=function(a){var o;(o=t.drag)==null||o.call(t,a)},n=function(a){var o;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,qQ=!1,(o=t.end)==null||o.call(t,a)},i=function(a){var o;qQ||(a.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),qQ=!0,(o=t.start)==null||o.call(t,a))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const rW=e=>{const t=T.getCurrentInstance(),r=T.shallowRef(),n=T.shallowRef();function i(o){o.target!==r.value&&a(o)}function a(o){if(!n.value||!r.value)return;const h=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:Q}=YT(o);if(e.vertical){let p=Q-h.top;p=Math.max(r.value.offsetHeight/2,p),p=Math.min(p,h.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((p-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let p=d-h.left;p=Math.max(r.value.offsetWidth/2,p),p=Math.min(p,h.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((p-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:a,handleClick:i}},nW=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=T.getCurrentInstance(),a=Hr("color-alpha-slider"),o=T.ref(0),s=T.ref(0),h=T.ref();function d(){if(!r.value||e.vertical)return 0;const O=i.vnode.el,V=e.color.get("alpha");return O?Math.round(V*(O.offsetWidth-r.value.offsetWidth/2)/100):0}function Q(){if(!r.value)return 0;const O=i.vnode.el;if(!e.vertical)return 0;const V=e.color.get("alpha");return O?Math.round(V*(O.offsetHeight-r.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:O,g:V,b:k}=e.color.toRgb();return`linear-gradient(to right, rgba(${O}, ${V}, ${k}, 0) 0%, rgba(${O}, ${V}, ${k}, 1) 100%)`}return""}function m(){o.value=d(),s.value=Q(),h.value=p()}T.onMounted(()=>{if(!t.value||!r.value)return;const O={drag:V=>{n(V)},end:V=>{n(V)}};Sl(t.value,O),Sl(r.value,O),m()}),T.watch(()=>e.color.get("alpha"),()=>m()),T.watch(()=>e.color.value,()=>m());const _=T.computed(()=>[a.b(),a.is("vertical",e.vertical)]),x=T.computed(()=>a.e("bar")),b=T.computed(()=>a.e("thumb")),M=T.computed(()=>({background:h.value})),E=T.computed(()=>({left:J6(o.value),top:J6(s.value)}));return{rootKls:_,barKls:x,barStyle:M,thumbKls:b,thumbStyle:E,update:m}},iW=T.defineComponent({name:"ElColorAlphaSlider"}),aW=T.defineComponent({...iW,props:eW,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:a,handleClick:o}=rW(r),{rootKls:s,barKls:h,barStyle:d,thumbKls:Q,thumbStyle:p,update:m}=nW(r,{bar:n,thumb:i,handleDrag:a});return t({update:m,bar:n,thumb:i}),(_,x)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(s))},[T.createElementVNode("div",{ref_key:"bar",ref:n,class:T.normalizeClass(T.unref(h)),style:T.normalizeStyle(T.unref(d)),onClick:x[0]||(x[0]=(...b)=>T.unref(o)&&T.unref(o)(...b))},null,6),T.createElementVNode("div",{ref_key:"thumb",ref:i,class:T.normalizeClass(T.unref(Q)),style:T.normalizeStyle(T.unref(p))},null,6)],2))}});var oW=Or(aW,[["__file","alpha-slider.vue"]]);const sW=T.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Hr("color-hue-slider"),r=T.getCurrentInstance(),n=T.ref(),i=T.ref(),a=T.ref(0),o=T.ref(0),s=T.computed(()=>e.color.get("hue"));T.watch(()=>s.value,()=>{m()});function h(_){_.target!==n.value&&d(_)}function d(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:M,clientY:E}=YT(_);let O;if(e.vertical){let V=E-b.top;V=Math.min(V,b.height-n.value.offsetHeight/2),V=Math.max(n.value.offsetHeight/2,V),O=Math.round((V-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let V=M-b.left;V=Math.min(V,b.width-n.value.offsetWidth/2),V=Math.max(n.value.offsetWidth/2,V),O=Math.round((V-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}e.color.set("hue",O)}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function p(){if(!n.value)return 0;const _=r.vnode.el;if(!e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function m(){a.value=Q(),o.value=p()}return T.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:x=>{d(x)},end:x=>{d(x)}};Sl(i.value,_),Sl(n.value,_),m()}),{bar:i,thumb:n,thumbLeft:a,thumbTop:o,hueValue:s,handleClick:h,update:m,ns:t}}});function lW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[T.createElementVNode("div",{ref:"bar",class:T.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...o)=>e.handleClick&&e.handleClick(...o))},null,2),T.createElementVNode("div",{ref:"thumb",class:T.normalizeClass(e.ns.e("thumb")),style:T.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var cW=Or(sW,[["render",lW],["__file","hue-slider.vue"]]);const uW=pn({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:u3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Ar(Array)},validateEvent:{type:Boolean,default:!0}}),hW={[C1]:e=>X1(e)||a3(e),[ou]:e=>X1(e)||a3(e),activeChange:e=>X1(e)||a3(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},Ew=Symbol("colorPickerContextKey"),Mw=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},dW=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},fW=function(e){return typeof e=="string"&&e.includes("%")},f5=function(e,t){dW(e)&&(e="100%");const r=fW(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},Aw={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Lu=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${Aw[t]||t}${Aw[r]||r}`},Sw=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${Lu(e)}${Lu(t)}${Lu(r)}`},XQ={A:10,B:11,C:12,D:13,E:14,F:15},O4=function(e){return e.length===2?(XQ[e[0].toUpperCase()]||+e[0])*16+(XQ[e[1].toUpperCase()]||+e[1]):XQ[e[1].toUpperCase()]||+e[1]},TW=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const a=(r+t)/2,o=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:o*100,v:a*100}},Cw=(e,t,r)=>{e=f5(e,255),t=f5(t,255),r=f5(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let a;const o=n,s=n-i,h=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:{a=(t-r)/s+(t<r?6:0);break}case t:{a=(r-e)/s+2;break}case r:{a=(e-t)/s+4;break}}a/=6}return{h:a*360,s:h*100,v:o*100}},Cl=function(e,t,r){e=f5(e,360)*6,t=f5(t,100),r=f5(r,100);const n=Math.floor(e),i=e-n,a=r*(1-t),o=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,o,a,a,s,r][h],Q=[s,r,r,o,a,a][h],p=[a,a,s,r,r,o][h];return{r:Math.round(d*255),g:Math.round(Q*255),b:Math.round(p*255)}};class Hl{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)b4(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)b4(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return Cl(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,a)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,a)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:a,v:o}=TW(n[0],n[1],n[2]);r(i,a,o)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:a,v:o}=Cw(n[0],n[1],n[2]);r(i,a,o)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,a,o;n.length===3?(i=O4(n[0]+n[0]),a=O4(n[1]+n[1]),o=O4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=O4(n.slice(0,2)),a=O4(n.slice(2,4)),o=O4(n.slice(4,6))),n.length===8?this._alpha=O4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:h,v:d}=Cw(i,a,o);r(s,h,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:a}=this;if(this.enableAlpha)switch(a){case"hsl":{const o=Mw(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${Sw(Cl(t,r,n))}${Lu(i*255/100)}`;break}default:{const{r:o,g:s,b:h}=Cl(t,r,n);this.value=`rgba(${o}, ${s}, ${h}, ${this.get("alpha")/100})`}}else switch(a){case"hsl":{const o=Mw(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:o,g:s,b:h}=Cl(t,r,n);this.value=`rgb(${o}, ${s}, ${h})`;break}default:this.value=Sw(Cl(t,r,n))}}}const QW=T.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Hr("color-predefine"),{currentColor:r}=T.inject(Ew),n=T.ref(a(e.colors,e.color));T.watch(()=>r.value,o=>{const s=new Hl;s.fromString(o),n.value.forEach(h=>{h.selected=s.compare(h)})}),T.watchEffect(()=>{n.value=a(e.colors,e.color)});function i(o){e.color.fromString(e.colors[o])}function a(o,s){return o.map(h=>{const d=new Hl;return d.enableAlpha=!0,d.format="rgba",d.fromString(h),d.selected=d.value===s.value,d})}return{rgbaColors:n,handleSelect:i,ns:t}}}),pW=["onClick"];function mW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b())},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("colors"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.rgbaColors,(o,s)=>(T.openBlock(),T.createElementBlock("div",{key:e.colors[s],class:T.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",o._alpha<100),{selected:o.selected}]),onClick:h=>e.handleSelect(s)},[T.createElementVNode("div",{style:T.normalizeStyle({backgroundColor:o.value})},null,4)],10,pW))),128))],2)],2)}var gW=Or(QW,[["render",mW],["__file","predefine.vue"]]);const yW=T.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Hr("color-svpanel"),r=T.getCurrentInstance(),n=T.ref(0),i=T.ref(0),a=T.ref("hsl(0, 100%, 50%)"),o=T.computed(()=>{const d=e.color.get("hue"),Q=e.color.get("value");return{hue:d,value:Q}});function s(){const d=e.color.get("saturation"),Q=e.color.get("value"),p=r.vnode.el,{clientWidth:m,clientHeight:_}=p;i.value=d*m/100,n.value=(100-Q)*_/100,a.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function h(d){const p=r.vnode.el.getBoundingClientRect(),{clientX:m,clientY:_}=YT(d);let x=m-p.left,b=_-p.top;x=Math.max(0,x),x=Math.min(x,p.width),b=Math.max(0,b),b=Math.min(b,p.height),i.value=x,n.value=b,e.color.set({saturation:x/p.width*100,value:100-b/p.height*100})}return T.watch(()=>o.value,()=>{s()}),T.onMounted(()=>{Sl(r.vnode.el,{drag:d=>{h(d)},end:d=>{h(d)}}),s()}),{cursorTop:n,cursorLeft:i,background:a,colorValue:o,handleDrag:h,update:s,ns:t}}}),_W=[T.createElementVNode("div",null,null,-1)];function vW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b()),style:T.normalizeStyle({backgroundColor:e.background})},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("white"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("black"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("cursor")),style:T.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},_W,6)],6)}var xW=Or(yW,[["render",vW],["__file","sv-panel.vue"]]);const bW=["onKeydown"],LW=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],wW=T.defineComponent({name:"ElColorPicker"}),EW=T.defineComponent({...wW,props:uW,emits:hW,setup(e,{expose:t,emit:r}){const n=e,{t:i}=su(),a=Hr("color"),{formItem:o}=d3(),s=h3(),h=s5(),{inputId:d,isLabeledByFormItem:Q}=l5(n,{formItemContext:o}),p=T.ref(),m=T.ref(),_=T.ref(),x=T.ref(),b=T.ref(),M=T.ref(),{isFocused:E,handleFocus:O,handleBlur:V}=HQ(b,{beforeBlur(zt){var fe;return(fe=x.value)==null?void 0:fe.isFocusInsideContent(zt)},afterBlur(){ge(!1),Wt()}}),k=zt=>{if(h.value)return he();O(zt)};let j=!0;const U=T.reactive(new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),$=T.ref(!1),J=T.ref(!1),tt=T.ref(""),rt=T.computed(()=>!n.modelValue&&!J.value?"transparent":ae(U,n.showAlpha)),st=T.computed(()=>!n.modelValue&&!J.value?"":U.value),pt=T.computed(()=>Q.value?void 0:n.label||i("el.colorpicker.defaultLabel")),Ct=T.computed(()=>Q.value?o==null?void 0:o.labelId:void 0),Ut=T.computed(()=>[a.b("picker"),a.is("disabled",h.value),a.bm("picker",s.value),a.is("focused",E.value)]);function ae(zt,fe){if(!(zt instanceof Hl))throw new TypeError("color should be instance of _color Class");const{r:Re,g:Se,b:He}=zt.toRgb();return fe?`rgba(${Re}, ${Se}, ${He}, ${zt.get("alpha")/100})`:`rgb(${Re}, ${Se}, ${He})`}function ge(zt){$.value=zt}const Ft=jb(ge,100,{leading:!0});function de(){h.value||ge(!0)}function cr(){Ft(!1),Wt()}function Wt(){T.nextTick(()=>{n.modelValue?U.fromString(n.modelValue):(U.value="",T.nextTick(()=>{J.value=!1}))})}function ce(){h.value||Ft(!$.value)}function pe(){U.fromString(tt.value)}function be(){const zt=U.value;r(C1,zt),r("change",zt),n.validateEvent&&(o==null||o.validate("change").catch(fe=>Y1(fe))),Ft(!1),T.nextTick(()=>{const fe=new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});U.compare(fe)||Wt()})}function Fe(){Ft(!1),r(C1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(o==null||o.validate("change").catch(zt=>Y1(zt))),Wt()}function $e(zt){if($.value&&(cr(),E.value)){const fe=new FocusEvent("focus",zt);V(fe)}}function je(zt){zt.preventDefault(),zt.stopPropagation(),ge(!1),Wt()}function Bt(zt){switch(zt.code){case t2.enter:case t2.space:zt.preventDefault(),zt.stopPropagation(),de(),M.value.focus();break;case t2.esc:je(zt);break}}function Zt(){b.value.focus()}function he(){b.value.blur()}return T.onMounted(()=>{n.modelValue&&(tt.value=st.value)}),T.watch(()=>n.modelValue,zt=>{zt?zt&&zt!==U.value&&(j=!1,U.fromString(zt)):J.value=!1}),T.watch(()=>st.value,zt=>{tt.value=zt,j&&r("activeChange",zt),j=!0}),T.watch(()=>U.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),T.watch(()=>$.value,()=>{T.nextTick(()=>{var zt,fe,Re;(zt=p.value)==null||zt.update(),(fe=m.value)==null||fe.update(),(Re=_.value)==null||Re.update()})}),T.provide(Ew,{currentColor:st}),t({color:U,show:de,hide:cr,focus:Zt,blur:he}),(zt,fe)=>(T.openBlock(),T.createBlock(T.unref(jQ),{ref_key:"popper",ref:x,visible:$.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[T.unref(a).be("picker","panel"),T.unref(a).b("dropdown"),zt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${T.unref(a).namespace.value}-zoom-in-top`,persistent:"",onHide:fe[2]||(fe[2]=Re=>ge(!1))},{content:T.withCtx(()=>[T.withDirectives((T.openBlock(),T.createElementBlock("div",{onKeydown:T.withKeys(je,["esc"])},[T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("dropdown","main-wrapper"))},[T.createVNode(cW,{ref_key:"hue",ref:p,class:"hue-slider",color:T.unref(U),vertical:""},null,8,["color"]),T.createVNode(xW,{ref_key:"sv",ref:m,color:T.unref(U)},null,8,["color"])],2),zt.showAlpha?(T.openBlock(),T.createBlock(oW,{key:0,ref_key:"alpha",ref:_,color:T.unref(U)},null,8,["color"])):T.createCommentVNode("v-if",!0),zt.predefine?(T.openBlock(),T.createBlock(gW,{key:1,ref:"predefine",color:T.unref(U),colors:zt.predefine},null,8,["color","colors"])):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("dropdown","btns"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a).be("dropdown","value"))},[T.createVNode(T.unref(Qu),{ref_key:"inputRef",ref:M,modelValue:tt.value,"onUpdate:modelValue":fe[0]||(fe[0]=Re=>tt.value=Re),"validate-event":!1,size:"small",onKeyup:T.withKeys(pe,["enter"]),onBlur:pe},null,8,["modelValue","onKeyup"])],2),T.createVNode(T.unref(co),{class:T.normalizeClass(T.unref(a).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),T.createVNode(T.unref(co),{plain:"",size:"small",class:T.normalizeClass(T.unref(a).be("dropdown","btn")),onClick:be},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,bW)),[[T.unref(uw),$e]])]),default:T.withCtx(()=>[T.createElementVNode("div",{id:T.unref(d),ref_key:"triggerRef",ref:b,class:T.normalizeClass(T.unref(Ut)),role:"button","aria-label":T.unref(pt),"aria-labelledby":T.unref(Ct),"aria-description":T.unref(i)("el.colorpicker.description",{color:zt.modelValue||""}),"aria-disabled":T.unref(h),tabindex:T.unref(h)?-1:zt.tabindex,onKeydown:Bt,onFocus:k,onBlur:fe[1]||(fe[1]=(...Re)=>T.unref(V)&&T.unref(V)(...Re))},[T.unref(h)?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(a).be("picker","mask"))},null,2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("picker","trigger")),onClick:ce},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(a).be("picker","color"),T.unref(a).is("alpha",zt.showAlpha)])},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a).be("picker","color-inner")),style:T.normalizeStyle({backgroundColor:T.unref(rt)})},[T.withDirectives(T.createVNode(T.unref(_i),{class:T.normalizeClass([T.unref(a).be("picker","icon"),T.unref(a).is("icon-arrow-down")])},{default:T.withCtx(()=>[T.createVNode(T.unref(s3))]),_:1},8,["class"]),[[T.vShow,zt.modelValue||J.value]]),T.withDirectives(T.createVNode(T.unref(_i),{class:T.normalizeClass([T.unref(a).be("picker","empty"),T.unref(a).is("icon-close")])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class"]),[[T.vShow,!zt.modelValue&&!J.value]])],6)],2)],2)],42,LW)]),_:1},8,["visible","popper-class","transition"]))}});var MW=Or(EW,[["__file","color-picker.vue"]]);const AW=Ji(MW),SW=T.defineComponent({name:"ElContainer"}),CW=T.defineComponent({...SW,props:{direction:{type:String}},setup(e){const t=e,r=T.useSlots(),n=Hr("container"),i=T.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const s=o.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(a,o)=>(T.openBlock(),T.createElementBlock("section",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("vertical",T.unref(i))])},[T.renderSlot(a.$slots,"default")],2))}});var HW=Or(CW,[["__file","container.vue"]]);const OW=T.defineComponent({name:"ElAside"}),VW=T.defineComponent({...OW,props:{width:{type:String,default:null}},setup(e){const t=e,r=Hr("aside"),n=T.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("aside",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Hw=Or(VW,[["__file","aside.vue"]]);const IW=T.defineComponent({name:"ElFooter"}),DW=T.defineComponent({...IW,props:{height:{type:String,default:null}},setup(e){const t=e,r=Hr("footer"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("footer",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Ow=Or(DW,[["__file","footer.vue"]]);const PW=T.defineComponent({name:"ElHeader"}),kW=T.defineComponent({...PW,props:{height:{type:String,default:null}},setup(e){const t=e,r=Hr("header"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("header",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Vw=Or(kW,[["__file","header.vue"]]);const RW=T.defineComponent({name:"ElMain"}),BW=T.defineComponent({...RW,setup(e){const t=Hr("main");return(r,n)=>(T.openBlock(),T.createElementBlock("main",{class:T.normalizeClass(T.unref(t).b())},[T.renderSlot(r.$slots,"default")],2))}});var Iw=Or(BW,[["__file","main.vue"]]);const NW=Ji(HW,{Aside:Hw,Footer:Ow,Header:Vw,Main:Iw});Ea(Hw),Ea(Ow),Ea(Vw);const Dw=Ea(Iw),FW=T.defineComponent({inheritAttrs:!1});function jW(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default")}var zW=Or(FW,[["render",jW],["__file","collection.vue"]]);const $W=T.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function UW(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default")}var GW=Or($W,[["render",UW],["__file","collection-item.vue"]]);const ZW="data-el-collection-item",WW=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),a={...zW,name:t,setup(){const s=T.ref(null),h=new Map,d=()=>{const Q=T.unref(s);if(!Q)return[];const p=Array.from(Q.querySelectorAll(`[${ZW}]`));return[...h.values()].sort((_,x)=>p.indexOf(_.ref)-p.indexOf(x.ref))};T.provide(n,{itemMap:h,getItems:d,collectionRef:s})}},o={...GW,name:r,setup(s,{attrs:h}){const d=T.ref(null),Q=T.inject(n,void 0);T.provide(i,{collectionItemRef:d}),T.onMounted(()=>{const p=T.unref(d);p&&Q.itemMap.set(p,{ref:p,...h})}),T.onBeforeUnmount(()=>{const p=T.unref(d);Q.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:a,ElCollectionItem:o}},KQ=pn({trigger:Al.trigger,effect:{...H2.effect,default:"light"},type:{type:Ar(String)},placement:{type:Ar(String),default:"bottom"},popperOptions:{type:Ar(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Ar([Number,String]),default:0},maxHeight:{type:Ar([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Ar(Object)},teleported:H2.teleported});pn({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:l3}}),pn({onKeydown:{type:Ar(Function)}}),WW("Dropdown");const Pw=Symbol("ElSelectGroup"),wu=Symbol("ElSelect");function qW(e,t){const r=T.inject(wu),n=T.inject(Pw,{disabled:!1}),i=T.computed(()=>r.props.multiple?Q(r.props.modelValue,e.value):Q([r.props.modelValue],e.value)),a=T.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),o=T.computed(()=>e.label||(yi(e.value)?"":e.value)),s=T.computed(()=>e.value||e.label||""),h=T.computed(()=>e.disabled||t.groupDisabled||a.value),d=T.getCurrentInstance(),Q=(_=[],x)=>{if(yi(e.value)){const b=r.props.valueKey;return _&&_.some(M=>T.toRaw(is(M,b))===is(x,b))}else return _&&_.includes(x)},p=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(d.proxy))},m=_=>{const x=new RegExp(dz(_),"i");t.visible=x.test(o.value)||e.created};return T.watch(()=>o.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),T.watch(()=>e.value,(_,x)=>{const{remote:b,valueKey:M}=r.props;if(Tl(_,x)||(r.onOptionDestroy(x,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!b){if(M&&yi(_)&&yi(x)&&_[M]===x[M])return;r.setSelected()}}),T.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:o,currentValue:s,itemSelected:i,isDisabled:h,hoverItem:p,updateOption:m}}const XW=T.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Hr("select"),r=El(),n=T.computed(()=>[t.be("dropdown","item"),t.is("disabled",T.unref(s)),t.is("selected",T.unref(o)),t.is("hovering",T.unref(m))]),i=T.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:o,isDisabled:s,select:h,hoverItem:d,updateOption:Q}=qW(e,i),{visible:p,hover:m}=T.toRefs(i),_=T.getCurrentInstance().proxy;h.onOptionCreate(_),T.onBeforeUnmount(()=>{const b=_.value,{selected:M}=h.states,O=(h.props.multiple?M:[M]).some(V=>V.value===_.value);T.nextTick(()=>{h.states.cachedOptions.get(b)===_&&!O&&h.states.cachedOptions.delete(b)}),h.onOptionDestroy(b,_)});function x(){e.disabled!==!0&&i.groupDisabled!==!0&&h.handleOptionSelect(_)}return{ns:t,id:r,containerKls:n,currentLabel:a,itemSelected:o,isDisabled:s,select:h,hoverItem:d,updateOption:Q,visible:p,hover:m,selectOptionClick:x,states:i}}}),KW=["id","aria-disabled","aria-selected"];function YW(e,t,r,n,i,a){return T.withDirectives((T.openBlock(),T.createElementBlock("li",{id:e.id,class:T.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...o)=>e.hoverItem&&e.hoverItem(...o)),onClick:t[1]||(t[1]=T.withModifiers((...o)=>e.selectOptionClick&&e.selectOptionClick(...o),["stop"]))},[T.renderSlot(e.$slots,"default",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.currentLabel),1)])],42,KW)),[[T.vShow,e.visible]])}var YQ=Or(XW,[["render",YW],["__file","option.vue"]]);const JW=T.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=T.inject(wu),t=Hr("select"),r=T.computed(()=>e.props.popperClass),n=T.computed(()=>e.props.multiple),i=T.computed(()=>e.props.fitInputWidth),a=T.ref("");function o(){var s;a.value=`${(s=e.selectRef)==null?void 0:s.offsetWidth}px`}return T.onMounted(()=>{o(),es(e.selectRef,o)}),{ns:t,minWidth:a,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function tq(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:T.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.renderSlot(e.$slots,"default"),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.ns.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)],6)}var eq=Or(JW,[["render",tq],["__file","select-dropdown.vue"]]);function rq(e){const t=T.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:a=>{const o=a.target.value,s=o[o.length-1]||"";t.value=!Jb(s)},handleCompositionEnd:a=>{t.value&&(t.value=!1,ia(e)&&e(a))}}}const nq=11,iq=(e,t)=>{const{t:r}=su(),n=El(),i=Hr("select"),a=Hr("input"),o=T.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});tL({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},T.computed(()=>e.suffixTransition===!1));const s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.ref(null),p=T.ref(null),m=T.ref(null),_=T.ref(null),x=T.ref(null),b=T.ref(null),M=T.ref(null),E=T.ref(null),O=T.ref(null),{wrapperRef:V,isFocused:k,handleFocus:j,handleBlur:U}=HQ(p,{afterFocus(){e.automaticDropdown&&!$.value&&($.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(Ot){var Kt,Ve;return((Kt=d.value)==null?void 0:Kt.isFocusInsideContent(Ot))||((Ve=Q.value)==null?void 0:Ve.isFocusInsideContent(Ot))},afterBlur(){$.value=!1,o.menuVisibleOnFocus=!1}}),$=T.ref(!1),J=T.ref(),{form:tt,formItem:rt}=d3(),{inputId:st}=l5(e,{formItemContext:rt}),pt=T.computed(()=>e.disabled||(tt==null?void 0:tt.disabled)),Ct=T.computed(()=>e.multiple?Ii(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),Ut=T.computed(()=>e.clearable&&!pt.value&&o.inputHovering&&Ct.value),ae=T.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),ge=T.computed(()=>i.is("reverse",ae.value&&$.value&&e.suffixTransition)),Ft=T.computed(()=>(rt==null?void 0:rt.validateState)||""),de=T.computed(()=>Kb[Ft.value]),cr=T.computed(()=>e.remote?300:0),Wt=T.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!o.inputValue&&o.options.size===0?!1:e.filterable&&o.inputValue&&o.options.size>0&&ce.value===0?e.noMatchText||r("el.select.noMatch"):o.options.size===0?e.noDataText||r("el.select.noData"):null),ce=T.computed(()=>pe.value.filter(Ot=>Ot.visible).length),pe=T.computed(()=>{const Ot=Array.from(o.options.values()),Kt=[];return o.optionValues.forEach(Ve=>{const Ue=Ot.findIndex(Qr=>Qr.value===Ve);Ue>-1&&Kt.push(Ot[Ue])}),Kt.length>=Ot.length?Kt:Ot}),be=T.computed(()=>Array.from(o.cachedOptions.values())),Fe=T.computed(()=>{const Ot=pe.value.filter(Kt=>!Kt.created).some(Kt=>Kt.currentLabel===o.inputValue);return e.filterable&&e.allowCreate&&o.inputValue!==""&&!Ot}),$e=()=>{e.filterable&&ia(e.filterMethod)||e.filterable&&e.remote&&ia(e.remoteMethod)||pe.value.forEach(Ot=>{Ot.updateOption(o.inputValue)})},je=h3(),Bt=T.computed(()=>["small"].includes(je.value)?"small":"default"),Zt=T.computed({get(){return $.value&&Wt.value!==!1},set(Ot){$.value=Ot}}),he=T.computed(()=>Ii(e.modelValue)?e.modelValue.length===0&&!o.inputValue:e.filterable?!o.inputValue:!0),zt=T.computed(()=>{var Ot;const Kt=(Ot=e.placeholder)!=null?Ot:r("el.select.placeholder");return e.multiple||!Ct.value?Kt:o.selectedLabel});T.watch(()=>e.modelValue,(Ot,Kt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(o.inputValue="",fe("")),Se(),!Tl(Ot,Kt)&&e.validateEvent&&(rt==null||rt.validate("change").catch(Ve=>Y1(Ve)))},{flush:"post",deep:!0}),T.watch(()=>$.value,Ot=>{Ot?fe(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),t("visible-change",Ot)}),T.watch(()=>o.options.entries(),()=>{var Ot;if(!q1)return;const Kt=((Ot=s.value)==null?void 0:Ot.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Ql(e.modelValue)||!Array.from(Kt).includes(document.activeElement))&&Se(),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value&&Re()},{flush:"post"}),T.watch(()=>o.hoveringIndex,Ot=>{K1(Ot)&&Ot>-1?J.value=pe.value[Ot]||{}:J.value={},pe.value.forEach(Kt=>{Kt.hover=J.value===Kt})}),T.watchEffect(()=>{o.isBeforeHide||$e()});const fe=Ot=>{o.previousQuery!==Ot&&(o.previousQuery=Ot,e.filterable&&ia(e.filterMethod)?e.filterMethod(Ot):e.filterable&&e.remote&&ia(e.remoteMethod)&&e.remoteMethod(Ot),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value?T.nextTick(Re):T.nextTick(De))},Re=()=>{const Ot=pe.value.filter(Ue=>Ue.visible&&!Ue.disabled&&!Ue.states.groupDisabled),Kt=Ot.find(Ue=>Ue.created),Ve=Ot[0];o.hoveringIndex=u1(pe.value,Kt||Ve)},Se=()=>{if(e.multiple)o.selectedLabel="";else{const Kt=He(e.modelValue);o.selectedLabel=Kt.currentLabel,o.selected=Kt;return}const Ot=[];Ii(e.modelValue)&&e.modelValue.forEach(Kt=>{Ot.push(He(Kt))}),o.selected=Ot},He=Ot=>{let Kt;const Ve=JT(Ot).toLowerCase()==="object",Ue=JT(Ot).toLowerCase()==="null",Qr=JT(Ot).toLowerCase()==="undefined";for(let en=o.cachedOptions.size-1;en>=0;en--){const Ge=be.value[en];if(Ve?is(Ge.value,e.valueKey)===is(Ot,e.valueKey):Ge.value===Ot){Kt={value:Ot,currentLabel:Ge.currentLabel,isDisabled:Ge.isDisabled};break}}if(Kt)return Kt;const Cr=Ve?Ot.label:!Ue&&!Qr?Ot:"";return{value:Ot,currentLabel:Cr}},De=()=>{e.multiple?o.selected.length>0?o.hoveringIndex=Math.min(...o.selected.map(Ot=>pe.value.findIndex(Kt=>mt(Kt)===mt(Ot)))):o.hoveringIndex=-1:o.hoveringIndex=pe.value.findIndex(Ot=>mt(Ot)===mt(o.selected))},ze=()=>{o.selectionWidth=h.value.getBoundingClientRect().width},$t=()=>{o.calculatorWidth=m.value.getBoundingClientRect().width},Dr=()=>{o.collapseItemWidth=E.value.getBoundingClientRect().width},mn=()=>{var Ot,Kt;(Kt=(Ot=d.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},Ke=()=>{var Ot,Kt;(Kt=(Ot=Q.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},_r=()=>{o.inputValue.length>0&&!$.value&&($.value=!0),fe(o.inputValue)},jn=Ot=>{if(o.inputValue=Ot.target.value,e.remote)O1();else return _r()},O1=jb(()=>{_r()},cr.value),wn=Ot=>{Tl(e.modelValue,Ot)||t(ou,Ot)},me=Ot=>az(Ot,Kt=>!o.disabledOptions.has(Kt)),ur=Ot=>{if(e.multiple&&Ot.code!==t2.delete&&Ot.target.value.length<=0){const Kt=e.modelValue.slice(),Ve=me(Kt);if(Ve<0)return;Kt.splice(Ve,1),t(C1,Kt),wn(Kt)}},Jr=(Ot,Kt)=>{const Ve=o.selected.indexOf(Kt);if(Ve>-1&&!pt.value){const Ue=e.modelValue.slice();Ue.splice(Ve,1),t(C1,Ue),wn(Ue),t("remove-tag",Kt.value)}Ot.stopPropagation(),or()},En=Ot=>{Ot.stopPropagation();const Kt=e.multiple?[]:"";if(!X1(Kt))for(const Ve of o.selected)Ve.isDisabled&&Kt.push(Ve.value);t(C1,Kt),wn(Kt),o.hoveringIndex=-1,$.value=!1,t("clear"),or()},Te=Ot=>{if(e.multiple){const Kt=(e.modelValue||[]).slice(),Ve=u1(Kt,Ot.value);Ve>-1?Kt.splice(Ve,1):(e.multipleLimit<=0||Kt.length<e.multipleLimit)&&Kt.push(Ot.value),t(C1,Kt),wn(Kt),Ot.created&&fe(""),e.filterable&&!e.reserveKeyword&&(o.inputValue="")}else t(C1,Ot.value),wn(Ot.value),$.value=!1;or(),!$.value&&T.nextTick(()=>{gn(Ot)})},u1=(Ot=[],Kt)=>{if(!yi(Kt))return Ot.indexOf(Kt);const Ve=e.valueKey;let Ue=-1;return Ot.some((Qr,Cr)=>T.toRaw(is(Qr,Ve))===is(Kt,Ve)?(Ue=Cr,!0):!1),Ue},gn=Ot=>{var Kt,Ve,Ue,Qr,Cr;const Zr=Ii(Ot)?Ot[0]:Ot;let en=null;if(Zr!=null&&Zr.value){const Ge=pe.value.filter(Ur=>Ur.value===Zr.value);Ge.length>0&&(en=Ge[0].$el)}if(d.value&&en){const Ge=(Qr=(Ue=(Ve=(Kt=d.value)==null?void 0:Kt.popperRef)==null?void 0:Ve.contentRef)==null?void 0:Ue.querySelector)==null?void 0:Qr.call(Ue,`.${i.be("dropdown","wrap")}`);Ge&&Qz(Ge,en)}(Cr=O.value)==null||Cr.handleScroll()},hi=Ot=>{o.options.set(Ot.value,Ot),o.cachedOptions.set(Ot.value,Ot),Ot.disabled&&o.disabledOptions.set(Ot.value,Ot)},zn=(Ot,Kt)=>{o.options.get(Ot)===Kt&&o.options.delete(Ot)},{handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr}=rq(Ot=>jn(Ot)),Mn=T.computed(()=>{var Ot,Kt;return(Kt=(Ot=d.value)==null?void 0:Ot.popperRef)==null?void 0:Kt.contentRef}),p1=()=>{T.nextTick(()=>gn(o.selected))},or=()=>{var Ot;(Ot=p.value)==null||Ot.focus()},Fi=()=>{yt()},dn=Ot=>{En(Ot)},yt=Ot=>{if($.value=!1,k.value){const Kt=new FocusEvent("focus",Ot);T.nextTick(()=>U(Kt))}},it=()=>{o.inputValue.length>0?o.inputValue="":$.value=!1},ot=()=>{pt.value||(o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:$.value=!$.value)},dt=()=>{$.value?pe.value[o.hoveringIndex]&&Te(pe.value[o.hoveringIndex]):ot()},mt=Ot=>yi(Ot.value)?is(Ot.value,e.valueKey):Ot.value,At=T.computed(()=>pe.value.filter(Ot=>Ot.visible).every(Ot=>Ot.disabled)),Ht=T.computed(()=>e.multiple?e.collapseTags?o.selected.slice(0,e.maxCollapseTags):o.selected:[]),It=T.computed(()=>e.multiple?e.collapseTags?o.selected.slice(e.maxCollapseTags):[]:[]),Et=Ot=>{if(!$.value){$.value=!0;return}if(!(o.options.size===0||ce.value===0)&&!At.value){Ot==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):Ot==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const Kt=pe.value[o.hoveringIndex];(Kt.disabled===!0||Kt.states.groupDisabled===!0||!Kt.visible)&&Et(Ot),T.nextTick(()=>gn(J.value))}},kt=()=>{if(!h.value)return 0;const Ot=window.getComputedStyle(h.value);return Number.parseFloat(Ot.gap||"6px")},ie=T.computed(()=>{const Ot=kt();return{maxWidth:`${E.value&&e.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-Ot:o.selectionWidth}px`}}),Xt=T.computed(()=>({maxWidth:`${o.selectionWidth}px`})),te=T.computed(()=>({width:`${Math.max(o.calculatorWidth,nq)}px`}));return e.multiple&&!Ii(e.modelValue)&&t(C1,[]),!e.multiple&&Ii(e.modelValue)&&t(C1,""),es(h,ze),es(m,$t),es(b,mn),es(V,mn),es(M,Ke),es(E,Dr),T.onMounted(()=>{Se()}),{inputId:st,contentId:n,nsSelect:i,nsInput:a,states:o,isFocused:k,expanded:$,optionsArray:pe,hoverOption:J,selectSize:je,filteredOptionsCount:ce,resetCalculatorWidth:$t,updateTooltip:mn,updateTagTooltip:Ke,debouncedOnInputChange:O1,onInput:jn,deletePrevTag:ur,deleteTag:Jr,deleteSelected:En,handleOptionSelect:Te,scrollToOption:gn,hasModelValue:Ct,shouldShowPlaceholder:he,currentPlaceholder:zt,showClose:Ut,iconComponent:ae,iconReverse:ge,validateState:Ft,validateIcon:de,showNewOption:Fe,updateOptions:$e,collapseTagSize:Bt,setSelected:Se,selectDisabled:pt,emptyText:Wt,handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr,onOptionCreate:hi,onOptionDestroy:zn,handleMenuEnter:p1,handleFocus:j,focus:or,blur:Fi,handleBlur:U,handleClearClick:dn,handleClickOutside:yt,handleEsc:it,toggleMenu:ot,selectOption:dt,getValueKey:mt,navigateOptions:Et,dropdownMenuVisible:Zt,showTagList:Ht,collapseTagList:It,tagStyle:ie,collapseTagStyle:Xt,inputStyle:te,popperRef:Mn,inputRef:p,tooltipRef:d,tagTooltipRef:Q,calculatorRef:m,prefixRef:_,suffixRef:x,selectRef:s,wrapperRef:V,selectionRef:h,scrollbarRef:O,menuRef:b,tagMenuRef:M,collapseItemRef:E}};var aq=T.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=T.inject(wu);let n=[];return()=>{var i,a;const o=(i=t.default)==null?void 0:i.call(t),s=[];function h(d){Ii(d)&&d.forEach(Q=>{var p,m,_,x;const b=(p=(Q==null?void 0:Q.type)||{})==null?void 0:p.name;b==="ElOptionGroup"?h(!X1(Q.children)&&!Ii(Q.children)&&ia((m=Q.children)==null?void 0:m.default)?(_=Q.children)==null?void 0:_.default():Q.children):b==="ElOption"?s.push((x=Q.props)==null?void 0:x.value):Ii(Q.children)&&h(Q.children)})}return o.length&&h((a=o[0])==null?void 0:a.children),Tl(s,n)||(n=s,r&&(r.states.optionValues=s)),o}}});const oq=pn({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:u3,effect:{type:Ar(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ar(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:H2.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:l3,default:gQ},fitInputWidth:Boolean,suffixIcon:{type:l3,default:s3},tagType:{...Lw.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:Ar(String),values:cu,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),kw="ElSelect",sq=T.defineComponent({name:kw,componentName:kw,components:{ElInput:Qu,ElSelectMenu:eq,ElOption:YQ,ElOptions:aq,ElTag:zZ,ElScrollbar:PU,ElTooltip:jQ,ElIcon:_i},directives:{ClickOutside:uw},props:oq,emits:[C1,ou,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=iq(e,t);return T.provide(wu,T.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),lq=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],cq=["textContent"];function uq(e,t,r,n,i,a){const o=T.resolveComponent("el-tag"),s=T.resolveComponent("el-tooltip"),h=T.resolveComponent("el-icon"),d=T.resolveComponent("el-option"),Q=T.resolveComponent("el-options"),p=T.resolveComponent("el-scrollbar"),m=T.resolveComponent("el-select-menu"),_=T.resolveDirective("click-outside");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"selectRef",class:T.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=x=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=x=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=T.withModifiers((...x)=>e.toggleMenu&&e.toggleMenu(...x),["stop"]))},[T.createVNode(s,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=x=>e.states.isBeforeHide=!1)},{default:T.withCtx(()=>{var x;return[T.createElementVNode("div",{ref:"wrapperRef",class:T.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(T.openBlock(),T.createElementBlock("div",{key:0,ref:"prefixRef",class:T.normalizeClass(e.nsSelect.e("prefix"))},[T.renderSlot(e.$slots,"prefix")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref:"selectionRef",class:T.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?T.renderSlot(e.$slots,"tag",{key:0},()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.showTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.tagStyle),onClose:M=>e.deleteTag(M,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(T.openBlock(),T.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:T.withCtx(()=>[T.createElementVNode("div",{ref:"collapseItemRef",class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.collapseTagStyle)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))}," + "+T.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:T.withCtx(()=>[T.createElementVNode("div",{ref:"tagMenuRef",class:T.normalizeClass(e.nsSelect.e("selection"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.collapseTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{class:"in-tooltip",closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:M=>e.deleteTag(M,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):T.createCommentVNode("v-if",!0)]):T.createCommentVNode("v-if",!0),e.selectDisabled?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[T.withDirectives(T.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=b=>e.states.inputValue=b),type:"text",class:T.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:T.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((x=e.hoverOption)==null?void 0:x.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...b)=>e.handleFocus&&e.handleFocus(...b)),onBlur:t[2]||(t[2]=(...b)=>e.handleBlur&&e.handleBlur(...b)),onKeydown:[t[3]||(t[3]=T.withKeys(T.withModifiers(b=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=T.withKeys(T.withModifiers(b=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=T.withKeys(T.withModifiers((...b)=>e.handleEsc&&e.handleEsc(...b),["stop","prevent"]),["esc"])),t[6]||(t[6]=T.withKeys(T.withModifiers((...b)=>e.selectOption&&e.selectOption(...b),["stop","prevent"]),["enter"])),t[7]||(t[7]=T.withKeys(T.withModifiers((...b)=>e.deletePrevTag&&e.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...b)=>e.handleCompositionStart&&e.handleCompositionStart(...b)),onCompositionupdate:t[9]||(t[9]=(...b)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...b)),onCompositionend:t[10]||(t[10]=(...b)=>e.handleCompositionEnd&&e.handleCompositionEnd(...b)),onInput:t[11]||(t[11]=(...b)=>e.onInput&&e.onInput(...b)),onClick:t[12]||(t[12]=T.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["stop"]))},null,46,lq),[[T.vModelText,e.states.inputValue]]),e.filterable?(T.openBlock(),T.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:T.normalizeClass(e.nsSelect.e("input-calculator")),textContent:T.toDisplayString(e.states.inputValue)},null,10,cq)):T.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[T.createElementVNode("span",null,T.toDisplayString(e.currentPlaceholder),1)],2)):T.createCommentVNode("v-if",!0)],2),T.createElementVNode("div",{ref:"suffixRef",class:T.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(T.openBlock(),T.createBlock(h,{key:0,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(T.openBlock(),T.createBlock(h,{key:1,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(T.openBlock(),T.createBlock(h,{key:2,class:T.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)]}),content:T.withCtx(()=>[T.createVNode(m,{ref:"menuRef"},{default:T.withCtx(()=>[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.nsSelect.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createVNode(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:T.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:T.withCtx(()=>[e.showNewOption?(T.openBlock(),T.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):T.createCommentVNode("v-if",!0),T.createVNode(Q,null,{default:T.withCtx(()=>[T.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[T.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.nsSelect.be("dropdown","loading"))},[T.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass(e.nsSelect.be("dropdown","empty"))},[T.renderSlot(e.$slots,"empty",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.emptyText),1)])],2)):T.createCommentVNode("v-if",!0),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:3,class:T.normalizeClass(e.nsSelect.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,e.handleClickOutside,e.popperRef]])}var hq=Or(sq,[["render",uq],["__file","select.vue"]]);const dq=T.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Hr("select"),r=T.ref(null),n=T.getCurrentInstance(),i=T.ref([]);T.provide(Pw,T.reactive({...T.toRefs(e)}));const a=T.computed(()=>i.value.some(h=>h.visible===!0)),o=h=>{const d=[];return Ii(h.children)&&h.children.forEach(Q=>{var p,m;Q.type&&Q.type.name==="ElOption"&&Q.component&&Q.component.proxy?d.push(Q.component.proxy):(p=Q.children)!=null&&p.length?d.push(...o(Q)):(m=Q.component)!=null&&m.subTree&&d.push(...o(Q.component.subTree))}),d},s=()=>{i.value=o(n.subTree)};return T.onMounted(()=>{s()}),eB(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:a,ns:t}}});function fq(e,t,r,n,i,a){return T.withDirectives((T.openBlock(),T.createElementBlock("ul",{ref:"groupRef",class:T.normalizeClass(e.ns.be("group","wrap"))},[T.createElementVNode("li",{class:T.normalizeClass(e.ns.be("group","title"))},T.toDisplayString(e.label),3),T.createElementVNode("li",null,[T.createElementVNode("ul",{class:T.normalizeClass(e.ns.b("group"))},[T.renderSlot(e.$slots,"default")],2)])],2)),[[T.vShow,e.visible]])}var Rw=Or(dq,[["render",fq],["__file","option-group.vue"]]);const T5=Ji(hq,{Option:YQ,OptionGroup:Rw}),Eu=Ea(YQ);Ea(Rw);const Tq=pn({trigger:Al.trigger,placement:KQ.placement,disabled:Al.disabled,visible:H2.visible,transition:H2.transition,popperOptions:KQ.popperOptions,tabindex:KQ.tabindex,content:H2.content,popperStyle:H2.popperStyle,popperClass:H2.popperClass,enterable:{...H2.enterable,default:!0},effect:{...H2.effect,default:"light"},teleported:H2.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Qq={"update:visible":e=>o3(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},pq="onUpdate:visible",mq=T.defineComponent({name:"ElPopover"}),gq=T.defineComponent({...mq,props:Tq,emits:Qq,setup(e,{expose:t,emit:r}){const n=e,i=T.computed(()=>n[pq]),a=Hr("popover"),o=T.ref(),s=T.computed(()=>{var M;return(M=T.unref(o))==null?void 0:M.popperRef}),h=T.computed(()=>[{width:J6(n.width)},n.popperStyle]),d=T.computed(()=>[a.b(),n.popperClass,{[a.m("plain")]:!!n.content}]),Q=T.computed(()=>n.transition===`${a.namespace.value}-fade-in-linear`),p=()=>{var M;(M=o.value)==null||M.hide()},m=()=>{r("before-enter")},_=()=>{r("before-leave")},x=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:p}),(M,E)=>(T.openBlock(),T.createBlock(T.unref(jQ),T.mergeProps({ref_key:"tooltipRef",ref:o},M.$attrs,{trigger:M.trigger,placement:M.placement,disabled:M.disabled,visible:M.visible,transition:M.transition,"popper-options":M.popperOptions,tabindex:M.tabindex,content:M.content,offset:M.offset,"show-after":M.showAfter,"hide-after":M.hideAfter,"auto-close":M.autoClose,"show-arrow":M.showArrow,"aria-label":M.title,effect:M.effect,enterable:M.enterable,"popper-class":T.unref(d),"popper-style":T.unref(h),teleported:M.teleported,persistent:M.persistent,"gpu-acceleration":T.unref(Q),"onUpdate:visible":T.unref(i),onBeforeShow:m,onBeforeHide:_,onShow:x,onHide:b}),{content:T.withCtx(()=>[M.title?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(a).e("title")),role:"title"},T.toDisplayString(M.title),3)):T.createCommentVNode("v-if",!0),T.renderSlot(M.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(M.content),1)])]),default:T.withCtx(()=>[M.$slots.reference?T.renderSlot(M.$slots,"reference",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var yq=Or(gq,[["__file","popover.vue"]]);const Bw=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var _q={mounted(e,t){Bw(e,t)},updated(e,t){Bw(e,t)}};const Nw=Pz(_q,"popover"),Mu=Ji(yq,{directive:Nw}),Q5="$treeNodeId",Fw=function(e,t){!t||t[Q5]||Object.defineProperty(t,Q5,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},JQ=function(e,t){return e?t[e]:t[Q5]},tp=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},ep=e=>{let t=!0,r=!0,n=!0;for(let i=0,a=e.length;i<a;i++){const o=e[i];(o.checked!==!0||o.indeterminate)&&(t=!1,o.disabled||(n=!1)),(o.checked!==!1||o.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},Au=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=ep(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||Au(i)},Su=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const a=n[t];return a===void 0?"":a}};let vq=0,rp=class ZT{constructor(t){this.id=vq++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)b4(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const a=Su(this,"isLeaf");typeof a=="boolean"&&(this.isLeafByUser=a)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||Fw(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||Fw(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=Su(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return Su(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Su(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof ZT)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=T.reactive(new ZT(t)),t instanceof ZT&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Au(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:o,allWithoutDisable:s}=ep(this.childNodes);!this.isLeaf&&!o&&s&&(this.checked=!1,t=!1);const h=()=>{if(r){const d=this.childNodes;for(let m=0,_=d.length;m<_;m++){const x=d[m];i=i||t!==!1;const b=x.disabled?x.checked:i;x.setChecked(b,r,!0,i)}const{half:Q,all:p}=ep(d);p||(this.checked=p,this.indeterminate=Q)}};if(this.shouldLoadData()){this.loadData(()=>{h(),Au(this)},{checked:t!==!1});return}else h()}const a=this.parent;!a||a.level===0||n||Au(a)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(a=>a.data),n={},i=[];t.forEach((a,o)=>{const s=a[Q5];!!s&&r.findIndex(d=>d[Q5]===s)>=0?n[s]={index:o,data:a}:i.push({index:o,data:a})}),this.store.lazy||r.forEach(a=>{n[a[Q5]]||this.removeChildByData(a)}),i.forEach(({index:a,data:o})=>{this.insertChild({data:o},a)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}};class xq{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)b4(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new rp({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(a){const o=a.root?a.root.childNodes:a.childNodes;if(o.forEach(s=>{s.visible=r.call(s,t,s.data,s),i(s)}),!a.visible&&o.length){let s=!0;s=!o.some(h=>h.visible),a.root?a.root.visible=s===!1:a.visible=s===!1}t&&a.visible&&!a.isLeaf&&(!n||a.loaded)&&a.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof rp)return t;const r=yi(t)?JQ(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(a){(a.root?a.root.childNodes:a.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&t.push(a.data),r(a)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)b4(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let a=i.length-1;a>=0;a--){const o=i[a];this.remove(o.data)}for(let a=0,o=r.length;a<o;a++){const s=r[a];this.append(s,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((h,d)=>h.level-d.level),a=Object.create(null),o=Object.keys(n);i.forEach(h=>h.setChecked(!1,!1));const s=h=>{h.childNodes.forEach(d=>{var Q;a[d.data[t]]=!0,(Q=d.childNodes)!=null&&Q.length&&s(d)})};for(let h=0,d=i.length;h<d;h++){const Q=i[h],p=Q.data[t].toString();if(!o.includes(p)){Q.checked&&!a[p]&&Q.setChecked(!1,!1);continue}if(Q.childNodes.length&&s(Q),Q.isLeaf||this.checkStrictly){Q.setChecked(!0,!1);continue}if(Q.setChecked(!0,!0),r){Q.setChecked(!1,!1);const _=function(x){x.childNodes.forEach(M=>{M.isLeaf||M.setChecked(!1,!1),_(M)})};_(Q)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(a=>{i[(a||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(a=>{i[a]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const bq=T.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=Hr("tree"),r=T.inject("NodeInstance"),n=T.inject("RootTree");return()=>{const i=e.node,{data:a,store:o}=i;return e.renderContent?e.renderContent(T.h,{_self:r,node:i,data:a,store:o}):T.renderSlot(n.ctx.slots,"default",{node:i,data:a},()=>[T.h("span",{class:t.be("node","label")},[i.label])])}}});var Lq=Or(bq,[["__file","tree-node-content.vue"]]);function jw(e){const t=T.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),T.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const zw=Symbol("dragEvents");function wq({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const a=Hr("tree"),o=T.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:Q,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return Q.preventDefault(),!1;Q.dataTransfer.effectAllowed="move";try{Q.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=p,t.emit("node-drag-start",p.node,Q)},h=({event:Q,treeNode:p})=>{const m=p,_=o.value.dropNode;_&&_.node.id!==m.node.id&&A4(_.$el,a.is("drop-inner"));const x=o.value.draggingNode;if(!x||!m)return;let b=!0,M=!0,E=!0,O=!0;typeof e.allowDrop=="function"&&(b=e.allowDrop(x.node,m.node,"prev"),O=M=e.allowDrop(x.node,m.node,"inner"),E=e.allowDrop(x.node,m.node,"next")),Q.dataTransfer.dropEffect=M||b||E?"move":"none",(b||M||E)&&(_==null?void 0:_.node.id)!==m.node.id&&(_&&t.emit("node-drag-leave",x.node,_.node,Q),t.emit("node-drag-enter",x.node,m.node,Q)),b||M||E?o.value.dropNode=m:o.value.dropNode=null,m.node.nextSibling===x.node&&(E=!1),m.node.previousSibling===x.node&&(b=!1),m.node.contains(x.node,!1)&&(M=!1),(x.node===m.node||x.node.contains(m.node))&&(b=!1,M=!1,E=!1);const V=m.$el.querySelector(`.${a.be("node","content")}`).getBoundingClientRect(),k=r.value.getBoundingClientRect();let j;const U=b?M?.25:E?.45:1:-1,$=E?M?.75:b?.55:0:1;let J=-9999;const tt=Q.clientY-V.top;tt<V.height*U?j="before":tt>V.height*$?j="after":M?j="inner":j="none";const rt=m.$el.querySelector(`.${a.be("node","expand-icon")}`).getBoundingClientRect(),st=n.value;j==="before"?J=rt.top-k.top:j==="after"&&(J=rt.bottom-k.top),st.style.top=`${J}px`,st.style.left=`${rt.right-k.left}px`,j==="inner"?mQ(m.$el,a.is("drop-inner")):A4(m.$el,a.is("drop-inner")),o.value.showDropIndicator=j==="before"||j==="after",o.value.allowDrop=o.value.showDropIndicator||O,o.value.dropType=j,t.emit("node-drag-over",x.node,m.node,Q)},d=Q=>{const{draggingNode:p,dropType:m,dropNode:_}=o.value;if(Q.preventDefault(),Q.dataTransfer.dropEffect="move",p&&_){const x={data:p.node.data};m!=="none"&&p.node.remove(),m==="before"?_.node.parent.insertBefore(x,_.node):m==="after"?_.node.parent.insertAfter(x,_.node):m==="inner"&&_.node.insertChild(x),m!=="none"&&i.value.registerNode(x),A4(_.$el,a.is("drop-inner")),t.emit("node-drag-end",p.node,_.node,m,Q),m!=="none"&&t.emit("node-drop",p.node,_.node,m,Q)}p&&!_&&t.emit("node-drag-end",p.node,null,m,Q),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0};return T.provide(zw,{treeNodeDragStart:s,treeNodeDragOver:h,treeNodeDragEnd:d}),{dragState:o}}const Eq=T.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:tW,ElCheckbox:xu,NodeContent:Lq,ElIcon:_i,Loading:yQ},props:{node:{type:rp,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=Hr("tree"),{broadcastExpanded:n}=jw(e),i=T.inject("RootTree"),a=T.ref(!1),o=T.ref(!1),s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.inject(zw),p=T.getCurrentInstance();T.provide("NodeInstance",p),i||Y1("Tree","Can not find node's tree."),e.node.expanded&&(a.value=!0,o.value=!0);const m=i.props.props.children||"children";T.watch(()=>{const tt=e.node.data[m];return tt&&[...tt]},()=>{e.node.updateChildren()}),T.watch(()=>e.node.indeterminate,tt=>{b(e.node.checked,tt)}),T.watch(()=>e.node.checked,tt=>{b(tt,e.node.indeterminate)}),T.watch(()=>e.node.expanded,tt=>{T.nextTick(()=>a.value=tt),tt&&(o.value=!0)});const _=tt=>JQ(i.props.nodeKey,tt.data),x=tt=>{const rt=e.props.class;if(!rt)return{};let st;if(ia(rt)){const{data:pt}=tt;st=rt(pt,tt)}else st=rt;return X1(st)?{[st]:!0}:st},b=(tt,rt)=>{(s.value!==tt||h.value!==rt)&&i.ctx.emit("check-change",e.node.data,tt,rt),s.value=tt,h.value=rt},M=tt=>{tp(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&O(),i.props.checkOnClickNode&&!e.node.disabled&&V(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,p,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,e.node.data,e.node,p)},O=()=>{e.node.isLeaf||(a.value?(i.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},V=(tt,rt)=>{e.node.setChecked(rt.target.checked,!i.props.checkStrictly),T.nextTick(()=>{const st=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:st.getCheckedNodes(),checkedKeys:st.getCheckedKeys(),halfCheckedNodes:st.getHalfCheckedNodes(),halfCheckedKeys:st.getHalfCheckedKeys()})})};return{ns:r,node$:d,tree:i,expanded:a,childNodeRendered:o,oldChecked:s,oldIndeterminate:h,getNodeKey:_,getNodeClass:x,handleSelectChange:b,handleClick:M,handleContextMenu:E,handleExpandIconClick:O,handleCheckChange:V,handleChildNodeExpand:(tt,rt,st)=>{n(rt),i.ctx.emit("node-expand",tt,rt,st)},handleDragStart:tt=>{i.props.draggable&&Q.treeNodeDragStart({event:tt,treeNode:e})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&Q.treeNodeDragOver({event:tt,treeNode:{$el:d.value,node:e.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&Q.treeNodeDragEnd(tt)},CaretRight:_z}}}),Mq=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],Aq=["aria-expanded"];function Sq(e,t,r,n,i,a){const o=T.resolveComponent("el-icon"),s=T.resolveComponent("el-checkbox"),h=T.resolveComponent("loading"),d=T.resolveComponent("node-content"),Q=T.resolveComponent("el-tree-node"),p=T.resolveComponent("el-collapse-transition");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"node$",class:T.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=T.withModifiers((...m)=>e.handleClick&&e.handleClick(...m),["stop"])),onContextmenu:t[2]||(t[2]=(...m)=>e.handleContextMenu&&e.handleContextMenu(...m)),onDragstart:t[3]||(t[3]=T.withModifiers((...m)=>e.handleDragStart&&e.handleDragStart(...m),["stop"])),onDragover:t[4]||(t[4]=T.withModifiers((...m)=>e.handleDragOver&&e.handleDragOver(...m),["stop"])),onDragend:t[5]||(t[5]=T.withModifiers((...m)=>e.handleDragEnd&&e.handleDragEnd(...m),["stop"])),onDrop:t[6]||(t[6]=T.withModifiers((...m)=>e.handleDrop&&e.handleDrop(...m),["stop"]))},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.be("node","content")),style:T.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(T.openBlock(),T.createBlock(o,{key:0,class:T.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:T.withModifiers(e.handleExpandIconClick,["stop"])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.showCheckbox?(T.openBlock(),T.createBlock(s,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=T.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):T.createCommentVNode("v-if",!0),e.node.loading?(T.openBlock(),T.createBlock(o,{key:2,class:T.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:T.withCtx(()=>[T.createVNode(h)]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.createVNode(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),T.createVNode(p,null,{default:T.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?T.withDirectives((T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.node.childNodes,m=>(T.openBlock(),T.createBlock(Q,{key:e.getNodeKey(m),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:m,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,Aq)),[[T.vShow,e.expanded]]):T.createCommentVNode("v-if",!0)]),_:1})],42,Mq)),[[T.vShow,e.node.visible]])}var Cq=Or(Eq,[["render",Sq],["__file","tree-node.vue"]]);function Hq({el$:e},t){const r=Hr("tree"),n=T.shallowRef([]),i=T.shallowRef([]);T.onMounted(()=>{o()}),T.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),T.watch(i,s=>{s.forEach(h=>{h.setAttribute("tabindex","-1")})}),n3(e,"keydown",s=>{const h=s.target;if(!h.className.includes(r.b("node")))return;const d=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const Q=n.value.indexOf(h);let p;if([t2.up,t2.down].includes(d)){if(s.preventDefault(),d===t2.up){p=Q===-1?0:Q!==0?Q-1:n.value.length-1;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p--,p===_){p=-1;break}p<0&&(p=n.value.length-1)}}else{p=Q===-1?0:Q<n.value.length-1?Q+1:0;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p++,p===_){p=-1;break}p>=n.value.length&&(p=0)}}p!==-1&&n.value[p].focus()}[t2.left,t2.right].includes(d)&&(s.preventDefault(),h.click());const m=h.querySelector('[type="checkbox"]');[t2.enter,t2.space].includes(d)&&m&&(s.preventDefault(),m.click())});const o=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const h=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(h.length){h[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const Oq=T.defineComponent({name:"ElTree",components:{ElTreeNode:Cq},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:l3}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=su(),n=Hr("tree"),i=T.ref(new xq({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const a=T.ref(i.value.root),o=T.ref(null),s=T.ref(null),h=T.ref(null),{broadcastExpanded:d}=jw(e),{dragState:Q}=wq({props:e,ctx:t,el$:s,dropIndicator$:h,store:i});Hq({el$:s},i);const p=T.computed(()=>{const{childNodes:Ft}=a.value;return!Ft||Ft.length===0||Ft.every(({visible:de})=>!de)});T.watch(()=>e.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),T.watch(()=>e.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),T.watch(()=>e.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),T.watch(()=>e.data,Ft=>{i.value.setData(Ft)},{deep:!0}),T.watch(()=>e.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const m=Ft=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>JQ(e.nodeKey,Ft.data),x=Ft=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const de=i.value.getNode(Ft);if(!de)return[];const cr=[de.data];let Wt=de.parent;for(;Wt&&Wt!==a.value;)cr.push(Wt.data),Wt=Wt.parent;return cr.reverse()},b=(Ft,de)=>i.value.getCheckedNodes(Ft,de),M=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},O=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[e.nodeKey]:null},V=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,de)},k=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,de)},j=(Ft,de,cr)=>{i.value.setChecked(Ft,de,cr)},U=()=>i.value.getHalfCheckedNodes(),$=()=>i.value.getHalfCheckedKeys(),J=(Ft,de=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");tp(i,t.emit,()=>i.value.setUserCurrentNode(Ft,de))},tt=(Ft,de=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");tp(i,t.emit,()=>i.value.setCurrentNodeKey(Ft,de))},rt=Ft=>i.value.getNode(Ft),st=Ft=>{i.value.remove(Ft)},pt=(Ft,de)=>{i.value.append(Ft,de)},Ct=(Ft,de)=>{i.value.insertBefore(Ft,de)},Ut=(Ft,de)=>{i.value.insertAfter(Ft,de)},ae=(Ft,de,cr)=>{d(de),t.emit("node-expand",Ft,de,cr)},ge=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,de)};return T.provide("RootTree",{ctx:t,props:e,store:i,root:a,currentNode:o,instance:T.getCurrentInstance()}),T.provide(Ml,void 0),{ns:n,store:i,root:a,currentNode:o,dragState:Q,el$:s,dropIndicator$:h,isEmpty:p,filter:m,getNodeKey:_,getNodePath:x,getCheckedNodes:b,getCheckedKeys:M,getCurrentNode:E,getCurrentKey:O,setCheckedNodes:V,setCheckedKeys:k,setChecked:j,getHalfCheckedNodes:U,getHalfCheckedKeys:$,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:rt,remove:st,append:pt,insertBefore:Ct,insertAfter:Ut,handleNodeExpand:ae,updateKeyChildren:ge}}});function Vq(e,t,r,n,i,a){const o=T.resolveComponent("el-tree-node");return T.openBlock(),T.createElementBlock("div",{ref:"el$",class:T.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.root.childNodes,s=>(T.openBlock(),T.createBlock(o,{key:e.getNodeKey(s),node:s,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.e("empty-block"))},[T.renderSlot(e.$slots,"empty",{},()=>{var s;return[T.createElementVNode("span",{class:T.normalizeClass(e.ns.e("empty-text"))},T.toDisplayString((s=e.emptyText)!=null?s:e.t("el.tree.emptyText")),3)]})],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createElementVNode("div",{ref:"dropIndicator$",class:T.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[T.vShow,e.dragState.showDropIndicator]])],2)}var Cu=Or(Oq,[["render",Vq],["__file","tree.vue"]]);Cu.install=e=>{e.component(Cu.name,Cu)};const $w=Cu;function Iq(e){let t;const r=T.ref(!1),n=T.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(m){n.text=m}function a(){const m=n.parent,_=p.ns;if(!m.vLoadingAddClassList){let x=m.getAttribute("loading-number");x=Number.parseInt(x)-1,x?m.setAttribute("loading-number",x.toString()):(A4(m,_.bm("parent","relative")),m.removeAttribute("loading-number")),A4(m,_.bm("parent","hidden"))}o(),Q.unmount()}function o(){var m,_;(_=(m=p.$el)==null?void 0:m.parentNode)==null||_.removeChild(p.$el)}function s(){var m;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(h,400),n.visible=!1,(m=e.closed)==null||m.call(e))}function h(){if(!r.value)return;const m=n.parent;r.value=!1,m.vLoadingAddClassList=void 0,a()}const d=T.defineComponent({name:"ElLoading",setup(m,{expose:_}){const{ns:x,zIndex:b}=sU("loading");return _({ns:x,zIndex:b}),()=>{const M=n.spinner||n.svg,E=T.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...M?{innerHTML:M}:{}},[T.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),O=n.text?T.h("p",{class:x.b("text")},[n.text]):void 0;return T.h(T.Transition,{name:x.b("fade"),onAfterLeave:h},{default:T.withCtx(()=>[T.withDirectives(T.createVNode("div",{style:{backgroundColor:n.background||""},class:[x.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[T.h("div",{class:x.b("spinner")},[E,O])]),[[T.vShow,n.visible]])])})}}}),Q=T.createApp(d),p=Q.mount(document.createElement("div"));return{...T.toRefs(n),setText:i,removeElLoadingChild:o,close:s,handleAfterLeave:h,vm:p,get $el(){return p.$el}}}let Hu;const np=function(e={}){if(!q1)return;const t=Dq(e);if(t.fullscreen&&Hu)return Hu;const r=Iq({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(Hu=void 0)}});Pq(t,t.parent,r),Uw(t,t.parent,r),t.parent.vLoadingAddClassList=()=>Uw(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),T.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(Hu=r),r},Dq=e=>{var t,r,n,i;let a;return X1(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:a}},Pq=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=ml(document.body,"position"),r.originalOverflow.value=ml(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=ml(document.body,"position"),await T.nextTick();for(const a of["top","left"]){const o=a==="top"?"scrollTop":"scrollLeft";i[a]=`${e.target.getBoundingClientRect()[a]+document.body[o]+document.documentElement[o]-Number.parseInt(ml(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])i[a]=`${e.target.getBoundingClientRect()[a]}px`}else r.originalPosition.value=ml(t,"position");for(const[a,o]of Object.entries(i))r.$el.style[a]=o},Uw=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?A4(t,n.bm("parent","relative")):mQ(t,n.bm("parent","relative")),e.fullscreen&&e.lock?mQ(t,n.bm("parent","hidden")):A4(t,n.bm("parent","hidden"))},Ou=Symbol("ElLoading"),Gw=(e,t)=>{var r,n,i,a;const o=t.instance,s=m=>yi(t.value)?t.value[m]:void 0,h=m=>{const _=X1(m)&&(o==null?void 0:o[m])||m;return _&&T.ref(_)},d=m=>h(s(m)||e.getAttribute(`element-loading-${fB(m)}`)),Q=(r=s("fullscreen"))!=null?r:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:Q,target:(n=s("target"))!=null?n:Q?void 0:e,body:(i=s("body"))!=null?i:t.modifiers.body,lock:(a=s("lock"))!=null?a:t.modifiers.lock};e[Ou]={options:p,instance:np(p)}},kq=(e,t)=>{for(const r of Object.keys(t))T.isRef(t[r])&&(t[r].value=e[r])},Vu={mounted(e,t){t.value&&Gw(e,t)},updated(e,t){const r=e[Ou];t.oldValue!==t.value&&(t.value&&!t.oldValue?Gw(e,t):t.value&&t.oldValue?yi(t.value)&&kq(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[Ou])==null||t.instance.close(),e[Ou]=null}},Rq={install(e){e.directive("loading",Vu),e.config.globalProperties.$loading=np},directive:Vu,service:np},cs=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Bq={name:"ExternalResourceCard",components:{Button:co},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:T.shallowRef(Cz)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},Nq={class:"resource-container"};function Fq(e,t,r,n,i,a){const o=co;return T.openBlock(),T.createElementBlock("div",Nq,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.resources,s=>(T.openBlock(),T.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(T.openBlock(),T.createBlock(o,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:h=>a.openUrl(s.url)},{default:T.withCtx(()=>[T.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):T.createCommentVNode("",!0)]))),128))])}const Zw=cs(Bq,[["render",Fq],["__scopeId","data-v-5386b943"]]);function jq(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Iu=new jq,zq=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),$q=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},Uq={name:"ProvenancePopup",components:{Button:co,Container:NW,Icon:_i,ExternalResourceCard:Zw,ElIconArrowUp:iu,ElIconArrowDown:s3,ElIconWarning:qb},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return zq(e)},capitalise:function(e){return $q(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},Ol=e=>(T.pushScopeId("data-v-139dc39a"),e=e(),T.popScopeId(),e),Gq={key:0,class:"main"},Zq={key:0,class:"block"},Wq={class:"title"},qq={key:0,class:"subtitle"},Xq={key:1,class:"block"},Kq={class:"title"},Yq={class:"content-container scrollbar"},Jq={key:0,class:"block"},tX=Ol(()=>T.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),eX={style:{"word-break":"keep-all"}},rX=Ol(()=>T.createElementVNode("i",null,"Origin",-1)),nX=["origin-item-label"],iX={key:0,class:"seperator"},aX={key:1,class:"block"},oX=Ol(()=>T.createElementVNode("div",{class:"attribute-title"},"Components",-1)),sX=["component-item-label"],lX={key:0,class:"seperator"},cX={key:2,class:"block"},uX=Ol(()=>T.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),hX=Ol(()=>T.createElementVNode("span",{style:{"word-break":"keep-all"}},[T.createElementVNode("i",null,"Destination"),T.createTextVNode(" is where the axons terminate ")],-1)),dX=["destination-item-label"],fX={key:0,class:"seperator"};function TX(e,t,r,n,i,a){const o=iu,s=_i,h=s3,d=qb,Q=Mu,p=co,m=Zw,_=Vu;return r.entry?T.withDirectives((T.openBlock(),T.createElementBlock("div",Gq,[r.entry.title?(T.openBlock(),T.createElementBlock("div",Zq,[T.createElementVNode("div",Wq,T.toDisplayString(a.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(T.openBlock(),T.createElementBlock("div",qq,T.toDisplayString(a.provSpeciesDescription),1)):T.createCommentVNode("",!0)])):(T.openBlock(),T.createElementBlock("div",Xq,[T.createElementVNode("div",Kq,T.toDisplayString(r.entry.featureId),1)])),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=x=>e.showDetails=!1)},[T.createTextVNode(" Hide path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(o)]),_:1})],512),[[T.vShow,e.showDetails]]),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=x=>e.showDetails=!0)},[T.createTextVNode(" Show path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(h)]),_:1})],512),[[T.vShow,!e.showDetails]]),T.createVNode(T.Transition,{name:"slide-fade"},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",Yq,[T.createTextVNode(T.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(T.openBlock(),T.createElementBlock("div",Jq,[T.createElementVNode("div",null,[tX,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[T.createElementVNode("span",eX,[rX,T.createTextVNode(" "+T.toDisplayString(a.originDescription),1)])]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.origins,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","origin-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.origins.length-1?(T.openBlock(),T.createElementBlock("div",iX)):T.createCommentVNode("",!0)],8,nX))),128)),T.withDirectives(T.createVNode(p,{class:"button",id:"open-dendrites-button",onClick:a.openDendrites},{default:T.withCtx(()=>[T.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):T.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(T.openBlock(),T.createElementBlock("div",aX,[oX,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.components,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","component-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.components.length-1?(T.openBlock(),T.createElementBlock("div",lX)):T.createCommentVNode("",!0)],8,sX))),128))])):T.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(T.openBlock(),T.createElementBlock("div",cX,[T.createElementVNode("div",null,[uX,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[hX]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.destinations,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","destination-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.destinations.length-1?(T.openBlock(),T.createElementBlock("div",fX)):T.createCommentVNode("",!0)],8,dX))),128)),T.withDirectives(T.createVNode(p,{class:"button",onClick:a.openAxons},{default:T.withCtx(()=>[T.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):T.createCommentVNode("",!0),T.withDirectives(T.createVNode(p,{class:"button",onClick:a.openAll},{default:T.withCtx(()=>[T.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),T.createVNode(m,{resources:a.resources},null,8,["resources"])],512),[[T.vShow,e.showDetails]])]),_:1})])),[[_,e.loading]]):T.createCommentVNode("",!0)}const Ww=cs(Uq,[["render",TX],["__scopeId","data-v-139dc39a"]]);/*! js-cookie v3.0.5 | MIT */function Du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var QX={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ip(e,t){function r(i,a,o){if(!(typeof document>"u")){o=Du({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var h in o)o[h]&&(s+="; "+h,o[h]!==!0&&(s+="="+o[h].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var h=a[s].split("="),d=h.slice(1).join("=");try{var Q=decodeURIComponent(h[0]);if(o[Q]=e.read(d,Q),i===Q)break}catch{}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,a){r(i,"",Du({},a,{expires:-1}))},withAttributes:function(i){return ip(this.converter,Du({},this.attributes,i))},withConverter:function(i){return ip(Du({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ap=ip(QX,{path:"/"}),uo=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},w1=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},us,Vl,Di,ho,g3;const pX=1e4;class mX{constructor(t){us.add(this),Vl.set(this,void 0),Di.set(this,null),ho.set(this,null),t.slice(-1)==="/"?uo(this,Vl,t.slice(0,-1),"f"):uo(this,Vl,t,"f")}get currentUser(){return w1(this,ho,"f")}get currentError(){return w1(this,Di,"f")}async authenticate(t){uo(this,Di,null,"f"),uo(this,ho,null,"f");const r=await w1(this,us,"m",g3).call(this,t,"authenticate");return"error"in r?(ap.remove("annotation-key"),Promise.resolve(w1(this,Di,"f"))):(ap.set("annotation-key",r.session,{secure:!0,expires:1}),uo(this,ho,r.data,"f"),Promise.resolve(w1(this,ho,"f")))}async unauthenticate(t){uo(this,Di,null,"f"),uo(this,ho,null,"f");const r=await w1(this,us,"m",g3).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(w1(this,Di,"f"))}async annotatedItemIds(t,r){const n=await w1(this,us,"m",g3).call(this,t,"items/","GET",{resource:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async drawnFeatures(t,r){const n=await w1(this,us,"m",g3).call(this,t,"features/","GET",{resource:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async itemAnnotations(t,r,n){const i=await w1(this,us,"m",g3).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(w1(this,Di,"f")):Promise.resolve(i)}async annotation(t,r){const n=await w1(this,us,"m",g3).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(w1(this,ho,"f")&&w1(this,ho,"f").canUpdate){const n=Object.assign({creator:w1(this,ho,"f"),created:new Date().toISOString()},r),i=await w1(this,us,"m",g3).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);uo(this,Di,i,"f")}else uo(this,Di,{error:"user cannot add annotation"},"f");return Promise.resolve(w1(this,Di,"f"))}}Vl=new WeakMap,Di=new WeakMap,ho=new WeakMap,us=new WeakSet,g3=async function(t,r,n="GET",i={}){let a=!0;const o=new AbortController;setTimeout(()=>{a&&(console.log("Annotation server timeout..."),o.abort())},pX);const s={method:n,signal:o.signal};let h=`${w1(this,Vl,"f")}/${r}`;const d=ap.get("annotation-key")||"";if(n==="GET"){const p=[];for(const[m,_]of Object.entries(i))p.push(`${m}=${encodeURIComponent(JSON.stringify(_))}`);p.push(`key=${encodeURIComponent(t)}`),p.push(`session=${encodeURIComponent(d)}`),h+="?"+p.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(n==="POST"){const p=Object.assign({key:t,session:d},i);s.body=JSON.stringify(p),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const Q=await fetch(h,s);return a=!1,Q.ok?Promise.resolve(await Q.json()):(uo(this,Di,{error:`${Q.status} ${Q.statusText}`},"f"),Promise.resolve(w1(this,Di,"f")))};const gX={name:"AnnotationTool",components:{Button:co,Col:m3,Input:Qu,Main:Dw,Row:ls,Select:T5,ElIconArrowUp:iu,ElIconArrowDown:s3,ElIconEdit:Zb,ElIconClose:gl},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resource&&this.annotationEntry.featureId}},methods:{evidenceEntered:function(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resource&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resource,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if((this.evidence.length>0||this.comment)&&this.annotationEntry.resource&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resource,item:this.annotationEntry.featureId,body:{evidence:e,comment:this.comment}};this.creator&&(t.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator||(this.$annotator=new mX(`${this.flatmapAPI}annotator`)),this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},V4=e=>(T.pushScopeId("data-v-3d9fe072"),e=e(),T.popScopeId(),e),yX={class:"block"},_X=V4(()=>T.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),vX=V4(()=>T.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),xX=V4(()=>T.createElementVNode("strong",null,"Evidence: ",-1)),bX=["href"],LX=V4(()=>T.createElementVNode("strong",null,"Comment: ",-1)),wX=V4(()=>T.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),EX=V4(()=>T.createElementVNode("strong",null,"Evidvence:",-1)),MX=V4(()=>T.createElementVNode("strong",null,"Comment:",-1)),AX={class:"sub-title"};function SX(e,t,r,n,i,a){const o=ls,s=iu,h=_i,d=s3,Q=Zb,p=m3,m=gl,_=Eu,x=T5,b=Qu,M=co,E=Dw;return T.openBlock(),T.createBlock(E,{class:"main"},{default:T.withCtx(()=>[T.createElementVNode("div",yX,[T.createVNode(o,{class:"info-field"},{default:T.withCtx(()=>[_X]),_:1}),r.annotationEntry?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.displayPair,(O,V)=>T.withDirectives((T.openBlock(),T.createBlock(o,{class:"dialog-text",key:O},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(V)+": ",1),T.createTextVNode(" "+T.toDisplayString(r.annotationEntry[O]),1)]),_:2},1024)),[[T.vShow,r.annotationEntry[O]]])),128)),e.prevSubs.length>0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=O=>e.showSubmissions=!1)},[T.createTextVNode(" Hide previous submissions "),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1})],512),[[T.vShow,e.showSubmissions]]),T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=O=>e.showSubmissions=!0)},[T.createTextVNode(" Show previous "+T.toDisplayString(e.prevSubs.length)+" submission(s) ",1),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(d)]),_:1})],512),[[T.vShow,!e.showSubmissions]]),e.showSubmissions?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(o,{class:"dialog-spacer"}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[vX]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.prevSubs,(O,V)=>(T.openBlock(),T.createElementBlock("div",{class:"entry",key:V},[T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(a.formatTime(O.created)),1),T.createTextVNode(" "+T.toDisplayString(O.creator.name),1)]),_:2},1024),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[xX,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(O.body.evidence,k=>(T.openBlock(),T.createBlock(o,{key:k,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("a",{href:k,target:"_blank"},T.toDisplayString(k),9,bX)]),_:2},1024))),128))]),_:2},1024),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[LX,T.createTextVNode(" "+T.toDisplayString(O.body.comment),1)]),_:2},1024)]))),128))],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0),e.authenticated?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[a.isEditable?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(o,{class:"dialog-spacer"}),e.editing?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[wX]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[EX]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidence,(O,V)=>(T.openBlock(),T.createBlock(o,{key:O},{default:T.withCtx(()=>[T.createVNode(p,{span:20},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.evidence[V]),1)]),_:2},1024),T.createVNode(p,{span:4},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(m,{onClick:k=>a.removeEvidence(V)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),T.createVNode(o,null,{default:T.withCtx(()=>[T.createVNode(b,{size:"small",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[4]||(t[4]=O=>e.newEvidence=O),onChange:t[5]||(t[5]=O=>a.evidenceEntered(O))},{prepend:T.withCtx(()=>[T.createVNode(x,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[3]||(t[3]=O=>e.evidencePrefix=O),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidencePrefixes,O=>(T.openBlock(),T.createBlock(_,{key:O,label:O,value:O},{default:T.withCtx(()=>[T.createVNode(o,null,{default:T.withCtx(()=>[T.createVNode(p,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(O),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),T.createVNode(o,null,{default:T.withCtx(()=>[MX]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(b,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[6]||(t[6]=O=>e.comment=O)},null,8,["modelValue"])]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(M,{class:"button",type:"primary",plain:"",onClick:a.submit},{default:T.withCtx(()=>[T.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(T.openBlock(),T.createBlock(o,{key:0},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(Q,{onClick:t[2]||(t[2]=O=>e.editing=!0)})]),_:1})]),_:1})),e.errorMessage?(T.openBlock(),T.createBlock(o,{key:2,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",AX,T.toDisplayString(e.errorMessage),1)]),_:1})):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)])]),_:1})}const qw=cs(gX,[["render",SX],["__scopeId","data-v-3d9fe072"]]),CX={name:"Tooltip",components:{AnnotationTool:qw,ProvenancePopup:Ww},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},HX={class:"tooltip-container",id:"tooltip-container"};function OX(e,t,r,n,i,a){const o=qw,s=Ww;return T.openBlock(),T.createElementBlock("div",HX,[r.annotationDisplay?(T.openBlock(),T.createBlock(o,{key:0,annotationEntry:r.annotationEntry},null,8,["annotationEntry"])):(T.openBlock(),T.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const op=cs(CX,[["render",OX],["__scopeId","data-v-6190f48d"]]),VX={name:"SelectionsGroup",components:{Checkbox:xu,CheckboxGroup:WQ,Col:m3,Row:ls},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},IX={class:"selections-container"},DX={class:"checkall-display-text"},PX={class:"checkbox-group-inner"},kX={class:"checkbox-container"};function RX(e,t,r,n,i,a){const o=m3,s=xu,h=ls,d=WQ;return T.openBlock(),T.createElementBlock("div",IX,[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(o,{span:12},{default:T.withCtx(()=>[T.createElementVNode("div",DX,T.toDisplayString(r.title),1)]),_:1}),T.createVNode(o,{span:12},{default:T.withCtx(()=>[r.selections&&r.selections.length>1?(T.openBlock(),T.createBlock(s,{key:0,class:"all-checkbox",indeterminate:a.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.checkAll=Q),onChange:a.handleCheckAllChange},{default:T.withCtx(()=>[T.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):T.createCommentVNode("",!0)]),_:1})]),_:1}),T.createVNode(d,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=Q=>e.checkedItems=Q),size:"small",class:"checkbox-group",onChange:a.handleCheckedItemsChange},{default:T.withCtx(()=>[T.createElementVNode("div",PX,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.selections,Q=>(T.openBlock(),T.createBlock(h,{key:Q[r.identifierKey],label:Q[r.identifierKey]},{default:T.withCtx(()=>[T.createElementVNode("div",kX,[T.createVNode(s,{class:"my-checkbox",label:Q[r.identifierKey],onChange:p=>a.visibilityToggle(Q[r.identifierKey],p),checked:!("enabled"in Q)||Q.enabled===!0},{default:T.withCtx(()=>[T.createVNode(h,{class:"checkbox-row"},{default:T.withCtx(()=>[a.hasLineStyles(Q)?(T.openBlock(),T.createBlock(o,{key:0,span:4},{default:T.withCtx(()=>[T.createElementVNode("div",{class:"path-visual",style:T.normalizeStyle(a.getLineStyles(Q))},null,4)]),_:2},1024)):T.createCommentVNode("",!0),T.createVNode(o,{span:20},{default:T.withCtx(()=>[T.createElementVNode("div",{style:T.normalizeStyle(a.getBackgroundStyles(Q))},T.toDisplayString(Q[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const Xw=cs(VX,[["render",RX],["__scopeId","data-v-4d3741da"]]),BX={name:"TreeControls",components:{Checkbox:xu,CheckboxGroup:WQ,ColorPicker:AW,Row:ls,Tree:$w},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},NX=e=>(T.pushScopeId("data-v-df242013"),e=e(),T.popScopeId(),e),FX={class:"container"},jX=NX(()=>T.createElementVNode("div",{class:"title-text"},"Systems",-1)),zX={class:"tree-container"},$X=["onClick","onMouseover"];function UX(e,t,r,n,i,a){const o=m3,s=ls,h=$w;return T.openBlock(),T.createElementBlock("div",FX,[T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(o,{span:12},{default:T.withCtx(()=>[jX]),_:1})]),_:1}),T.createElementVNode("div",zX,[T.createVNode(h,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:a.checkChanged},{default:T.withCtx(({node:d,data:Q})=>[T.createElementVNode("span",{class:T.normalizeClass(["region-tree-node",{activeItem:a.nodeIsActive(Q),hoverItem:a.nodeIsHover(Q)}]),onClick:p=>a.changeActiveByNode(Q),onMouseover:p=>a.changeHoverByNode(Q)},[T.createElementVNode("div",{style:T.normalizeStyle(a.getBackgroundStyles(Q))},T.toDisplayString(d.label),5)],42,$X)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const Kw=cs(BX,[["render",UX],["__scopeId","data-v-df242013"]]),GX={name:"SvgLegends"},ZX=e=>(T.pushScopeId("data-v-88079d87"),e=e(),T.popScopeId(),e),WX={class:"legends-container"},qX={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"},XX=[T.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)],KX=ZX(()=>T.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function YX(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",WX,[(T.openBlock(),T.createElementBlock("svg",qX,XX)),KX])}const Yw=cs(GX,[["render",YX],["__scopeId","data-v-88079d87"]]),JX='<div class="flatmap-marker"><svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#005974"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg></div>',Pu=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},Il={},Jw=async function(e,t){return Il&&Il.hasOwnProperty(t)?Il[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),Il[t]=i,r(i)}).catch(n=>{console.error("Error:",n),Il[t]=t,r(t)})})},ku=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let tK=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await Jw(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const a=i.keys.indexOf("entity"),o=i.keys.indexOf("label");a>-1&&o>-1&&i.values.forEach(s=>{r[s[a]]=s[o],this.uberons.push({id:s[a],name:s[o]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Pu(t),n=[],i=!1;return r.forEach(a=>{i=!1,ku(e.axons,a)&&(i=!0),ku(e.dendrites,a)&&(i=!0),i||n.push(a)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(h=>h.json()).then(h=>{if(this.connectivityExists(h)){let d=JSON.parse(h.values[0][0]);this.processConnectivity(d).then(()=>{s(!0)})}else s(!1)}).catch(h=>{console.error("Error:",h),s(!1)})}),a=await this.pubmedQueryOnIds(e);return await Promise.all([i,a])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),a=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(o=>i.indexOf(o.id)!==-1),this.originsWithDatasets=this.uberons.filter(o=>a.indexOf(o.id)!==-1),this.componentsWithDatasets=this.uberons.filter(o=>n.indexOf(o.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=Pu(e.axons),i=Pu(e.dendrites),a=this.findAllIdsFromConnectivity(e);this.createLabelLookup(a).then(o=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,o)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,o)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,o)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Pu(t),n=[],i=!1;return r.forEach(a=>{i=!1,ku(e.axons,a)&&(i=!0),ku(e.dendrites,a)&&(i=!0),i||n.push(a)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(a=>{a.values.length>0?(this.urls=[this.pubmedSearchUrl(a.values.map(o=>this.stripPMIDPrefix(o[0])))],t(!0)):this.pubmedQueryOnModels(n).then(o=>{t(o)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const eK='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var tE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:D,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(Q){return r.setTimeout(Q,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(Q){r.clearTimeout(Q)};function a(Q,p){var m=Object.prototype.toString.call(Q),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&Q instanceof jQuery||typeof Elements<"u"&&Q instanceof Elements,x=0,b=Q.length;if(_)for(;x<b;x++)p(Q[x]);else p(Q)}function o(Q){if(!Q.getBoundingClientRect)return{width:Q.offsetWidth,height:Q.offsetHeight};var p=Q.getBoundingClientRect();return{width:Math.round(p.width),height:Math.round(p.height)}}function s(Q,p){Object.keys(p).forEach(function(m){Q.style[m]=p[m]})}var h=function(Q,p){var m=0;function _(){var b=[];this.add=function(O){b.push(O)};var M,E;this.call=function(O){for(M=0,E=b.length;M<E;M++)b[M].call(this,O)},this.remove=function(O){var V=[];for(M=0,E=b.length;M<E;M++)b[M]!==O&&V.push(b[M]);b=V},this.length=function(){return b.length}}function x(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var k=document.createElement("div");s(k,O),V.appendChild(k);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var U=document.createElement("div");s(U,O),s(U,{width:"200%",height:"200%"}),j.appendChild(U),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var $=window.getComputedStyle(b),J=$?$.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,rt=0,st=o(b),pt=0,Ct=0,Ut=!0;m=0;var ae=function(){var Wt=b.offsetWidth,ce=b.offsetHeight;k.style.width=Wt+10+"px",k.style.height=ce+10+"px",V.scrollLeft=Wt+10,V.scrollTop=ce+10,j.scrollLeft=Wt+10,j.scrollTop=ce+10},ge=function(){if(Ut){var Wt=b.offsetWidth===0&&b.offsetHeight===0;if(Wt){m||(m=n(function(){m=0,ge()}));return}else Ut=!1}ae()};b.resizeSensor.resetSensor=ge;var Ft=function(){rt=0,tt&&(pt=st.width,Ct=st.height,b.resizedAttached&&b.resizedAttached.call(st))},de=function(){st=o(b),tt=st.width!==pt||st.height!==Ct,tt&&!rt&&(rt=n(Ft)),ge()},cr=function(Wt,ce,pe){Wt.attachEvent?Wt.attachEvent("on"+ce,pe):Wt.addEventListener(ce,pe)};cr(V,"scroll",de),cr(j,"scroll",de),m=n(function(){m=0,ge()})}}a(Q,function(b){x(b,p)}),this.detach=function(b){m||(i(m),m=0),h.detach(Q,b)},this.reset=function(){Q.resizeSensor.resetSensor()}};if(h.reset=function(Q){a(Q,function(p){p.resizeSensor.resetSensor()})},h.detach=function(Q,p){a(Q,function(m){m&&(m.resizedAttached&&typeof p=="function"&&(m.resizedAttached.remove(p),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(Q){for(var p in Q)if(Q.hasOwnProperty(p))for(var m=Q[p].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&h.reset(m[_])});document.addEventListener("DOMContentLoaded",function(Q){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(tE);var rK=tE.exports;const nK=h5(rK);var eE={exports:{}};/**
|
|
19
|
+
`,QU=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function pU(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:QU.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function kL(e,t=1,r){var n;Aa||(Aa=document.createElement("textarea"),document.body.appendChild(Aa));const{paddingSize:i,borderSize:a,boxSizing:o,contextStyle:s}=pU(e);Aa.setAttribute("style",`${s};${TU}`),Aa.value=e.value||e.placeholder||"";let h=Aa.scrollHeight;const d={};o==="border-box"?h=h+a:o==="content-box"&&(h=h-i),Aa.value="";const Q=Aa.scrollHeight-i;if(K1(t)){let p=Q*t;o==="border-box"&&(p=p+i+a),h=Math.max(p,h),d.minHeight=`${p}px`}if(K1(r)){let p=Q*r;o==="border-box"&&(p=p+i+a),h=Math.min(p,h)}return d.height=`${h}px`,(n=Aa.parentNode)==null||n.removeChild(Aa),Aa=void 0,d}const mU=pn({id:{type:String,default:void 0},size:u3,disabled:Boolean,modelValue:{type:Ar([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Ar([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:l3},prefixIcon:{type:l3},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ar([Object,Array,String]),default:()=>t5({})},autofocus:{type:Boolean,default:!1}}),gU={[C1]:e=>X1(e),input:e=>X1(e),change:e=>X1(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},yU=["role"],_U=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],vU=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],xU=T.defineComponent({name:"ElInput",inheritAttrs:!1}),bU=T.defineComponent({...xU,props:mU,emits:gU,setup(e,{expose:t,emit:r}){const n=e,i=T.useAttrs(),a=T.useSlots(),o=T.computed(()=>{const me={};return n.containerRole==="combobox"&&(me["aria-haspopup"]=i["aria-haspopup"],me["aria-owns"]=i["aria-owns"],me["aria-expanded"]=i["aria-expanded"]),me}),s=T.computed(()=>[n.type==="textarea"?M.b():b.b(),b.m(_.value),b.is("disabled",x.value),b.is("exceed",Fe.value),{[b.b("group")]:a.prepend||a.append,[b.bm("group","append")]:a.append,[b.bm("group","prepend")]:a.prepend,[b.m("prefix")]:a.prefix||n.prefixIcon,[b.m("suffix")]:a.suffix||n.suffixIcon||n.clearable||n.showPassword,[b.bm("suffix","password-clear")]:Wt.value&&ce.value},i.class]),h=T.computed(()=>[b.e("wrapper"),b.is("focus",rt.value)]),d=Bz({excludeKeys:T.computed(()=>Object.keys(o.value))}),{form:Q,formItem:p}=d3(),{inputId:m}=l5(n,{formItemContext:p}),_=h3(),x=s5(),b=Hr("input"),M=Hr("textarea"),E=T.shallowRef(),O=T.shallowRef(),V=T.ref(!1),k=T.ref(!1),j=T.ref(!1),U=T.ref(),$=T.shallowRef(n.inputStyle),J=T.computed(()=>E.value||O.value),{wrapperRef:tt,isFocused:rt,handleFocus:st,handleBlur:pt}=HQ(J,{afterBlur(){var me;n.validateEvent&&((me=p==null?void 0:p.validate)==null||me.call(p,"blur").catch(ur=>Y1(ur)))}}),Ct=T.computed(()=>{var me;return(me=Q==null?void 0:Q.statusIcon)!=null?me:!1}),Ut=T.computed(()=>(p==null?void 0:p.validateState)||""),ae=T.computed(()=>Ut.value&&Kb[Ut.value]),ge=T.computed(()=>j.value?Oz:Mz),Ft=T.computed(()=>[i.style]),de=T.computed(()=>[n.inputStyle,$.value,{resize:n.resize}]),cr=T.computed(()=>a3(n.modelValue)?"":String(n.modelValue)),Wt=T.computed(()=>n.clearable&&!x.value&&!n.readonly&&!!cr.value&&(rt.value||V.value)),ce=T.computed(()=>n.showPassword&&!x.value&&!n.readonly&&!!cr.value&&(!!cr.value||rt.value)),pe=T.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!x.value&&!n.readonly&&!n.showPassword),be=T.computed(()=>cr.value.length),Fe=T.computed(()=>!!pe.value&&be.value>Number(n.maxlength)),$e=T.computed(()=>!!a.suffix||!!n.suffixIcon||Wt.value||n.showPassword||pe.value||!!Ut.value&&Ct.value),[je,Bt]=aU(E);es(O,me=>{if(zt(),!pe.value||n.resize!=="both")return;const ur=me[0],{width:Jr}=ur.contentRect;U.value={right:`calc(100% - ${Jr+15+6}px)`}});const Zt=()=>{const{type:me,autosize:ur}=n;if(!(!q1||me!=="textarea"||!O.value))if(ur){const Jr=yi(ur)?ur.minRows:void 0,En=yi(ur)?ur.maxRows:void 0,Te=kL(O.value,Jr,En);$.value={overflowY:"hidden",...Te},T.nextTick(()=>{O.value.offsetHeight,$.value=Te})}else $.value={minHeight:kL(O.value).minHeight}},zt=(me=>{let ur=!1;return()=>{var Jr;if(ur||!n.autosize)return;((Jr=O.value)==null?void 0:Jr.offsetParent)===null||(me(),ur=!0)}})(Zt),fe=()=>{const me=J.value,ur=n.formatter?n.formatter(cr.value):cr.value;!me||me.value===ur||(me.value=ur)},Re=async me=>{je();let{value:ur}=me.target;if(n.formatter&&(ur=n.parser?n.parser(ur):ur),!k.value){if(ur===cr.value){fe();return}r(C1,ur),r("input",ur),await T.nextTick(),fe(),Bt()}},Se=me=>{r("change",me.target.value)},He=me=>{r("compositionstart",me),k.value=!0},De=me=>{var ur;r("compositionupdate",me);const Jr=(ur=me.target)==null?void 0:ur.value,En=Jr[Jr.length-1]||"";k.value=!Jb(En)},ze=me=>{r("compositionend",me),k.value&&(k.value=!1,Re(me))},$t=()=>{j.value=!j.value,Dr()},Dr=async()=>{var me;await T.nextTick(),(me=J.value)==null||me.focus()},mn=()=>{var me;return(me=J.value)==null?void 0:me.blur()},Ke=me=>{V.value=!1,r("mouseleave",me)},_r=me=>{V.value=!0,r("mouseenter",me)},jn=me=>{r("keydown",me)},O1=()=>{var me;(me=J.value)==null||me.select()},wn=()=>{r(C1,""),r("change",""),r("clear"),r("input","")};return T.watch(()=>n.modelValue,()=>{var me;T.nextTick(()=>Zt()),n.validateEvent&&((me=p==null?void 0:p.validate)==null||me.call(p,"change").catch(ur=>Y1(ur)))}),T.watch(cr,()=>fe()),T.watch(()=>n.type,async()=>{await T.nextTick(),fe(),Zt()}),T.onMounted(()=>{!n.formatter&&n.parser&&Y1("ElInput","If you set the parser, you also need to set the formatter."),fe(),T.nextTick(Zt)}),t({input:E,textarea:O,ref:J,textareaStyle:de,autosize:T.toRef(n,"autosize"),focus:Dr,blur:mn,select:O1,clear:wn,resizeTextarea:Zt}),(me,ur)=>T.withDirectives((T.openBlock(),T.createElementBlock("div",T.mergeProps(T.unref(o),{class:T.unref(s),style:T.unref(Ft),role:me.containerRole,onMouseenter:_r,onMouseleave:Ke}),[T.createCommentVNode(" input "),me.type!=="textarea"?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createCommentVNode(" prepend slot "),me.$slots.prepend?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(b).be("group","prepend"))},[T.renderSlot(me.$slots,"prepend")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:T.normalizeClass(T.unref(h))},[T.createCommentVNode(" prefix slot "),me.$slots.prefix||me.prefixIcon?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(b).e("prefix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("prefix-inner"))},[T.renderSlot(me.$slots,"prefix"),me.prefixIcon?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(me.prefixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("input",T.mergeProps({id:T.unref(m),ref_key:"input",ref:E,class:T.unref(b).e("inner")},T.unref(d),{minlength:me.minlength,maxlength:me.maxlength,type:me.showPassword?j.value?"text":"password":me.type,disabled:T.unref(x),readonly:me.readonly,autocomplete:me.autocomplete,tabindex:me.tabindex,"aria-label":me.label,placeholder:me.placeholder,style:me.inputStyle,form:me.form,autofocus:me.autofocus,onCompositionstart:He,onCompositionupdate:De,onCompositionend:ze,onInput:Re,onFocus:ur[0]||(ur[0]=(...Jr)=>T.unref(st)&&T.unref(st)(...Jr)),onBlur:ur[1]||(ur[1]=(...Jr)=>T.unref(pt)&&T.unref(pt)(...Jr)),onChange:Se,onKeydown:jn}),null,16,_U),T.createCommentVNode(" suffix slot "),T.unref($e)?(T.openBlock(),T.createElementBlock("span",{key:1,class:T.normalizeClass(T.unref(b).e("suffix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("suffix-inner"))},[!T.unref(Wt)||!T.unref(ce)||!T.unref(pe)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.renderSlot(me.$slots,"suffix"),me.suffixIcon?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(me.suffixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],64)):T.createCommentVNode("v-if",!0),T.unref(Wt)?(T.openBlock(),T.createBlock(T.unref(_i),{key:1,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("clear")]),onMousedown:T.withModifiers(T.unref(ll),["prevent"]),onClick:wn},{default:T.withCtx(()=>[T.createVNode(T.unref(gQ))]),_:1},8,["class","onMousedown"])):T.createCommentVNode("v-if",!0),T.unref(ce)?(T.openBlock(),T.createBlock(T.unref(_i),{key:2,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("password")]),onClick:$t},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ge))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.unref(pe)?(T.openBlock(),T.createElementBlock("span",{key:3,class:T.normalizeClass(T.unref(b).e("count"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("count-inner"))},T.toDisplayString(T.unref(be))+" / "+T.toDisplayString(me.maxlength),3)],2)):T.createCommentVNode("v-if",!0),T.unref(Ut)&&T.unref(ae)&&T.unref(Ct)?(T.openBlock(),T.createBlock(T.unref(_i),{key:4,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("validateIcon"),T.unref(b).is("loading",T.unref(Ut)==="validating")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ae))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0)],2),T.createCommentVNode(" append slot "),me.$slots.append?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(T.unref(b).be("group","append"))},[T.renderSlot(me.$slots,"append")],2)):T.createCommentVNode("v-if",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createCommentVNode(" textarea "),T.createElementVNode("textarea",T.mergeProps({id:T.unref(m),ref_key:"textarea",ref:O,class:T.unref(M).e("inner")},T.unref(d),{minlength:me.minlength,maxlength:me.maxlength,tabindex:me.tabindex,disabled:T.unref(x),readonly:me.readonly,autocomplete:me.autocomplete,style:T.unref(de),"aria-label":me.label,placeholder:me.placeholder,form:me.form,autofocus:me.autofocus,onCompositionstart:He,onCompositionupdate:De,onCompositionend:ze,onInput:Re,onFocus:ur[2]||(ur[2]=(...Jr)=>T.unref(st)&&T.unref(st)(...Jr)),onBlur:ur[3]||(ur[3]=(...Jr)=>T.unref(pt)&&T.unref(pt)(...Jr)),onChange:Se,onKeydown:jn}),null,16,vU),T.unref(pe)?(T.openBlock(),T.createElementBlock("span",{key:0,style:T.normalizeStyle(U.value),class:T.normalizeClass(T.unref(b).e("count"))},T.toDisplayString(T.unref(be))+" / "+T.toDisplayString(me.maxlength),7)):T.createCommentVNode("v-if",!0)],64))],16,yU)),[[T.vShow,me.type!=="hidden"]])}});var LU=Or(bU,[["__file","input.vue"]]);const Qu=Ji(LU),c5=4,wU={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},EU=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),RL=Symbol("scrollbarContextKey"),MU=pn({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),AU="Thumb";var BL=Or(T.defineComponent({__name:"thumb",props:MU,setup(e){const t=e,r=T.inject(RL),n=Hr("scrollbar");r||fz(AU,"can not inject scrollbar context");const i=T.ref(),a=T.ref(),o=T.ref({}),s=T.ref(!1);let h=!1,d=!1,Q=q1?document.onselectstart:null;const p=T.computed(()=>wU[t.vertical?"vertical":"horizontal"]),m=T.computed(()=>EU({size:t.size,move:t.move,bar:p.value})),_=T.computed(()=>i.value[p.value.offset]**2/r.wrapElement[p.value.scrollSize]/t.ratio/a.value[p.value.offset]),x=U=>{var $;if(U.stopPropagation(),U.ctrlKey||[1,2].includes(U.button))return;($=window.getSelection())==null||$.removeAllRanges(),M(U);const J=U.currentTarget;J&&(o.value[p.value.axis]=J[p.value.offset]-(U[p.value.client]-J.getBoundingClientRect()[p.value.direction]))},b=U=>{if(!a.value||!i.value||!r.wrapElement)return;const $=Math.abs(U.target.getBoundingClientRect()[p.value.direction]-U[p.value.client]),J=a.value[p.value.offset]/2,tt=($-J)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=tt*r.wrapElement[p.value.scrollSize]/100},M=U=>{U.stopImmediatePropagation(),h=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",O),Q=document.onselectstart,document.onselectstart=()=>!1},E=U=>{if(!i.value||!a.value||h===!1)return;const $=o.value[p.value.axis];if(!$)return;const J=(i.value.getBoundingClientRect()[p.value.direction]-U[p.value.client])*-1,tt=a.value[p.value.offset]-$,rt=(J-tt)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=rt*r.wrapElement[p.value.scrollSize]/100},O=()=>{h=!1,o.value[p.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",O),j(),d&&(s.value=!1)},V=()=>{d=!1,s.value=!!t.size},k=()=>{d=!0,s.value=h};T.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",O)});const j=()=>{document.onselectstart!==Q&&(document.onselectstart=Q)};return n3(T.toRef(r,"scrollbarElement"),"mousemove",V),n3(T.toRef(r,"scrollbarElement"),"mouseleave",k),(U,$)=>(T.openBlock(),T.createBlock(T.Transition,{name:T.unref(n).b("fade"),persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{ref_key:"instance",ref:i,class:T.normalizeClass([T.unref(n).e("bar"),T.unref(n).is(T.unref(p).key)]),onMousedown:b},[T.createElementVNode("div",{ref_key:"thumb",ref:a,class:T.normalizeClass(T.unref(n).e("thumb")),style:T.normalizeStyle(T.unref(m)),onMousedown:x},null,38)],34),[[T.vShow,U.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const SU=pn({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var CU=Or(T.defineComponent({__name:"bar",props:SU,setup(e,{expose:t}){const r=e,n=T.ref(0),i=T.ref(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-c5,h=o.offsetWidth-c5;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/h*r.ratioX}}}),(o,s)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createVNode(BL,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),T.createVNode(BL,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const HU=pn({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ar([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),OU={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(K1)},IQ="ElScrollbar",VU=T.defineComponent({name:IQ}),IU=T.defineComponent({...VU,props:HU,emits:OU,setup(e,{expose:t,emit:r}){const n=e,i=Hr("scrollbar");let a,o;const s=T.ref(),h=T.ref(),d=T.ref(),Q=T.ref("0"),p=T.ref("0"),m=T.ref(),_=T.ref(1),x=T.ref(1),b=T.computed(()=>{const $={};return n.height&&($.height=J6(n.height)),n.maxHeight&&($.maxHeight=J6(n.maxHeight)),[n.wrapStyle,$]}),M=T.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=T.computed(()=>[i.e("view"),n.viewClass]),O=()=>{var $;h.value&&(($=m.value)==null||$.handleScroll(h.value),r("scroll",{scrollTop:h.value.scrollTop,scrollLeft:h.value.scrollLeft}))};function V($,J){yi($)?h.value.scrollTo($):K1($)&&K1(J)&&h.value.scrollTo($,J)}const k=$=>{if(!K1($)){Y1(IQ,"value must be a number");return}h.value.scrollTop=$},j=$=>{if(!K1($)){Y1(IQ,"value must be a number");return}h.value.scrollLeft=$},U=()=>{if(!h.value)return;const $=h.value.offsetHeight-c5,J=h.value.offsetWidth-c5,tt=$**2/h.value.scrollHeight,rt=J**2/h.value.scrollWidth,st=Math.max(tt,n.minSize),pt=Math.max(rt,n.minSize);_.value=tt/($-tt)/(st/($-st)),x.value=rt/(J-rt)/(pt/(J-pt)),p.value=st+c5<$?`${st}px`:"",Q.value=pt+c5<J?`${pt}px`:""};return T.watch(()=>n.noresize,$=>{$?(a==null||a(),o==null||o()):({stop:a}=es(d,U),o=n3("resize",U))},{immediate:!0}),T.watch(()=>[n.maxHeight,n.height],()=>{n.native||T.nextTick(()=>{var $;U(),h.value&&(($=m.value)==null||$.handleScroll(h.value))})}),T.provide(RL,T.reactive({scrollbarElement:s,wrapElement:h})),T.onMounted(()=>{n.native||T.nextTick(()=>{U()})}),T.onUpdated(()=>U()),t({wrapRef:h,update:U,scrollTo:V,setScrollTop:k,setScrollLeft:j,handleScroll:O}),($,J)=>(T.openBlock(),T.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:T.normalizeClass(T.unref(i).b())},[T.createElementVNode("div",{ref_key:"wrapRef",ref:h,class:T.normalizeClass(T.unref(M)),style:T.normalizeStyle(T.unref(b)),onScroll:O},[(T.openBlock(),T.createBlock(T.resolveDynamicComponent($.tag),{id:$.id,ref_key:"resizeRef",ref:d,class:T.normalizeClass(T.unref(E)),style:T.normalizeStyle($.viewStyle),role:$.role,"aria-label":$.ariaLabel,"aria-orientation":$.ariaOrientation},{default:T.withCtx(()=>[T.renderSlot($.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),$.native?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(CU,{key:0,ref_key:"barRef",ref:m,height:p.value,width:Q.value,always:$.always,"ratio-x":x.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var DU=Or(IU,[["__file","scrollbar.vue"]]);const PU=Ji(DU),DQ=Symbol("popper"),NL=Symbol("popperContent"),FL=pn({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),kU=T.defineComponent({name:"ElPopper",inheritAttrs:!1}),RU=T.defineComponent({...kU,props:FL,setup(e,{expose:t}){const r=e,n=T.ref(),i=T.ref(),a=T.ref(),o=T.ref(),s=T.computed(()=>r.role),h={triggerRef:n,popperInstanceRef:i,contentRef:a,referenceRef:o,role:s};return t(h),T.provide(DQ,h),(d,Q)=>T.renderSlot(d.$slots,"default")}});var BU=Or(RU,[["__file","popper.vue"]]);const jL=pn({arrowOffset:{type:Number,default:5}}),NU=T.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),FU=T.defineComponent({...NU,props:jL,setup(e,{expose:t}){const r=e,n=Hr("popper"),{arrowOffset:i,arrowRef:a,arrowStyle:o}=T.inject(NL,void 0);return T.watch(()=>r.arrowOffset,s=>{i.value=s}),T.onBeforeUnmount(()=>{a.value=void 0}),t({arrowRef:a}),(s,h)=>(T.openBlock(),T.createElementBlock("span",{ref_key:"arrowRef",ref:a,class:T.normalizeClass(T.unref(n).e("arrow")),style:T.normalizeStyle(T.unref(o)),"data-popper-arrow":""},null,6))}});var jU=Or(FU,[["__file","arrow.vue"]]);const PQ="ElOnlyChild",zU=T.defineComponent({name:PQ,setup(e,{slots:t,attrs:r}){var n;const i=T.inject(CL),a=iU((n=i==null?void 0:i.setForwardRef)!=null?n:ll);return()=>{var o;const s=(o=t.default)==null?void 0:o.call(t,r);if(!s)return null;if(s.length>1)return Y1(PQ,"requires exact only one valid child."),null;const h=zL(s);return h?T.withDirectives(T.cloneVNode(h,r),[[a]]):(Y1(PQ,"no valid child node found"),null)}}});function zL(e){if(!e)return null;const t=e;for(const r of t){if(yi(r))switch(r.type){case T.Comment:continue;case T.Text:case"svg":return $L(r);case T.Fragment:return zL(r.children);default:return r}return $L(r)}return null}function $L(e){const t=Hr("only-child");return T.createVNode("span",{class:t.e("content")},[e])}const UL=pn({virtualRef:{type:Ar(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ar(Function)},onMouseleave:{type:Ar(Function)},onClick:{type:Ar(Function)},onKeydown:{type:Ar(Function)},onFocus:{type:Ar(Function)},onBlur:{type:Ar(Function)},onContextmenu:{type:Ar(Function)},id:String,open:Boolean}),$U=T.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),UU=T.defineComponent({...$U,props:UL,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=T.inject(DQ,void 0);nU(i);const a=T.computed(()=>s.value?r.id:void 0),o=T.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=T.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),h=T.computed(()=>s.value?`${r.open}`:void 0);let d;return T.onMounted(()=>{T.watch(()=>r.virtualRef,Q=>{Q&&(i.value=ts(Q))},{immediate:!0}),T.watch(i,(Q,p)=>{d==null||d(),d=void 0,pl(Q)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(m=>{var _;const x=r[m];x&&(Q.addEventListener(m.slice(2).toLowerCase(),x),(_=p==null?void 0:p.removeEventListener)==null||_.call(p,m.slice(2).toLowerCase(),x))}),d=T.watch([a,o,s,h],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,x)=>{a3(m[x])?Q.removeAttribute(_):Q.setAttribute(_,m[x])})},{immediate:!0})),pl(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>p.removeAttribute(m))},{immediate:!0})}),T.onBeforeUnmount(()=>{d==null||d(),d=void 0}),t({triggerRef:i}),(Q,p)=>Q.virtualTriggering?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(T.unref(zU),T.mergeProps({key:0},Q.$attrs,{"aria-controls":T.unref(a),"aria-describedby":T.unref(o),"aria-expanded":T.unref(h),"aria-haspopup":T.unref(s)}),{default:T.withCtx(()=>[T.renderSlot(Q.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var GU=Or(UU,[["__file","trigger.vue"]]);const kQ="focus-trap.focus-after-trapped",RQ="focus-trap.focus-after-released",ZU="focus-trap.focusout-prevented",GL={cancelable:!0,bubbles:!1},WU={cancelable:!0,bubbles:!1},ZL="focusAfterTrapped",WL="focusAfterReleased",qU=Symbol("elFocusTrap"),BQ=T.ref(),pu=T.ref(0),NQ=T.ref(0);let mu=0;const qL=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},XL=(e,t)=>{for(const r of e)if(!XU(r,t))return r},XU=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},KU=e=>{const t=qL(e),r=XL(t,e),n=XL(t.reverse(),e);return[r,n]},YU=e=>e instanceof HTMLInputElement&&"select"in e,f3=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),NQ.value=window.performance.now(),e!==r&&YU(e)&&t&&e.select()}};function KL(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const JU=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=KL(e,n),e.unshift(n)},remove:n=>{var i,a;e=KL(e,n),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},tG=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(f3(n,t),document.activeElement!==r)return},YL=JU(),eG=()=>pu.value>NQ.value,gu=()=>{BQ.value="pointer",pu.value=window.performance.now()},JL=()=>{BQ.value="keyboard",pu.value=window.performance.now()},rG=()=>(T.onMounted(()=>{mu===0&&(document.addEventListener("mousedown",gu),document.addEventListener("touchstart",gu),document.addEventListener("keydown",JL)),mu++}),T.onBeforeUnmount(()=>{mu--,mu<=0&&(document.removeEventListener("mousedown",gu),document.removeEventListener("touchstart",gu),document.removeEventListener("keydown",JL))}),{focusReason:BQ,lastUserFocusTimestamp:pu,lastAutomatedFocusTimestamp:NQ}),yu=e=>new CustomEvent(ZU,{...WU,detail:e}),nG=T.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ZL,WL,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=T.ref();let n,i;const{focusReason:a}=rG();Y$(x=>{e.trapped&&!o.paused&&t("release-requested",x)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=x=>{if(!e.loop&&!e.trapped||o.paused)return;const{key:b,altKey:M,ctrlKey:E,metaKey:O,currentTarget:V,shiftKey:k}=x,{loop:j}=e,U=b===t2.tab&&!M&&!E&&!O,$=document.activeElement;if(U&&$){const J=V,[tt,rt]=KU(J);if(tt&&rt){if(!k&&$===rt){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&f3(tt,!0))}else if(k&&[tt,J].includes($)){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&f3(rt,!0))}}else if($===J){const pt=yu({focusReason:a.value});t("focusout-prevented",pt),pt.defaultPrevented||x.preventDefault()}}};T.provide(qU,{focusTrapRef:r,onKeydown:s}),T.watch(()=>e.focusTrapEl,x=>{x&&(r.value=x)},{immediate:!0}),T.watch([r],([x],[b])=>{x&&(x.addEventListener("keydown",s),x.addEventListener("focusin",Q),x.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",Q),b.removeEventListener("focusout",p))});const h=x=>{t(ZL,x)},d=x=>t(WL,x),Q=x=>{const b=T.unref(r);if(!b)return;const M=x.target,E=x.relatedTarget,O=M&&b.contains(M);e.trapped||E&&b.contains(E)||(n=E),O&&t("focusin",x),!o.paused&&e.trapped&&(O?i=M:f3(i,!0))},p=x=>{const b=T.unref(r);if(!(o.paused||!b))if(e.trapped){const M=x.relatedTarget;!a3(M)&&!b.contains(M)&&setTimeout(()=>{if(!o.paused&&e.trapped){const E=yu({focusReason:a.value});t("focusout-prevented",E),E.defaultPrevented||f3(i,!0)}},0)}else{const M=x.target;M&&b.contains(M)||t("focusout",x)}};async function m(){await T.nextTick();const x=T.unref(r);if(x){YL.push(o);const b=x.contains(document.activeElement)?n:document.activeElement;if(n=b,!x.contains(b)){const E=new Event(kQ,GL);x.addEventListener(kQ,h),x.dispatchEvent(E),E.defaultPrevented||T.nextTick(()=>{let O=e.focusStartEl;X1(O)||(f3(O),document.activeElement!==O&&(O="first")),O==="first"&&tG(qL(x),!0),(document.activeElement===b||O==="container")&&f3(x)})}}}function _(){const x=T.unref(r);if(x){x.removeEventListener(kQ,h);const b=new CustomEvent(RQ,{...GL,detail:{focusReason:a.value}});x.addEventListener(RQ,d),x.dispatchEvent(b),!b.defaultPrevented&&(a.value=="keyboard"||!eG()||x.contains(document.activeElement))&&f3(n??document.body),x.removeEventListener(RQ,d),YL.remove(o)}}return T.onMounted(()=>{e.trapped&&m(),T.watch(()=>e.trapped,x=>{x?m():_()})}),T.onBeforeUnmount(()=>{e.trapped&&_()}),{onKeydown:s}}});function iG(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var aG=Or(nG,[["render",iG],["__file","focus-trap.vue"]]);const oG=["fixed","absolute"],sG=pn({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ar(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:cu,default:"bottom"},popperOptions:{type:Ar(Object),default:()=>({})},strategy:{type:String,values:oG,default:"absolute"}}),tw=pn({...sG,id:String,style:{type:Ar([String,Array,Object])},className:{type:Ar([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ar([String,Array,Object])},popperStyle:{type:Ar([String,Array,Object])},referenceEl:{type:Ar(Object)},triggerTargetEl:{type:Ar(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),lG={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},cG=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,a={placement:r,strategy:n,...i,modifiers:[...hG(e),...t]};return dG(a,i==null?void 0:i.modifiers),a},uG=e=>{if(q1)return ts(e)};function hG(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function dG(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const fG=0,TG=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=T.inject(DQ,void 0),a=T.ref(),o=T.ref(),s=T.computed(()=>({name:"eventListeners",enabled:!!e.visible})),h=T.computed(()=>{var E;const O=T.unref(a),V=(E=T.unref(o))!=null?E:fG;return{name:"arrow",enabled:!oz(O),options:{element:O,padding:V}}}),d=T.computed(()=>({onFirstUpdate:()=>{x()},...cG(e,[T.unref(h),T.unref(s)])})),Q=T.computed(()=>uG(e.referenceEl)||T.unref(n)),{attributes:p,state:m,styles:_,update:x,forceUpdate:b,instanceRef:M}=q$(Q,r,d);return T.watch(M,E=>t.value=E),T.onMounted(()=>{T.watch(()=>{var E;return(E=T.unref(Q))==null?void 0:E.getBoundingClientRect()},()=>{x()})}),{attributes:p,arrowRef:a,contentRef:r,instanceRef:M,state:m,styles:_,role:i,forceUpdate:b,update:x}},QG=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=IL(),a=Hr("popper"),o=T.computed(()=>T.unref(t).popper),s=T.ref(K1(e.zIndex)?e.zIndex:i()),h=T.computed(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),d=T.computed(()=>[{zIndex:T.unref(s)},T.unref(r).popper,e.popperStyle||{}]),Q=T.computed(()=>n.value==="dialog"?"false":void 0),p=T.computed(()=>T.unref(r).arrow||{});return{ariaModal:Q,arrowStyle:p,contentAttrs:o,contentClass:h,contentStyle:d,contentZIndex:s,updateZIndex:()=>{s.value=K1(e.zIndex)?e.zIndex:i()}}},pG=(e,t)=>{const r=T.ref(!1),n=T.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:d=>{var Q;((Q=d.detail)==null?void 0:Q.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!r.value&&(d.target&&(n.value=d.target),r.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},mG=T.defineComponent({name:"ElPopperContent"}),gG=T.defineComponent({...mG,props:tw,emits:lG,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:a,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:h,onFocusoutPrevented:d,onReleaseRequested:Q}=pG(n,r),{attributes:p,arrowRef:m,contentRef:_,styles:x,instanceRef:b,role:M,update:E}=TG(n),{ariaModal:O,arrowStyle:V,contentAttrs:k,contentClass:j,contentStyle:U,updateZIndex:$}=QG(n,{styles:x,attributes:p,role:M}),J=T.inject(Ml,void 0),tt=T.ref();T.provide(NL,{arrowStyle:V,arrowRef:m,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&T.provide(Ml,{...J,addInputId:ll,removeInputId:ll});let rt;const st=(Ct=!0)=>{E(),Ct&&$()},pt=()=>{st(!1),n.visible&&n.focusOnShow?a.value=!0:n.visible===!1&&(a.value=!1)};return T.onMounted(()=>{T.watch(()=>n.triggerTargetEl,(Ct,Ut)=>{rt==null||rt(),rt=void 0;const ae=T.unref(Ct||_.value),ge=T.unref(Ut||_.value);pl(ae)&&(rt=T.watch([M,()=>n.ariaLabel,O,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((de,cr)=>{a3(Ft[cr])?ae.removeAttribute(de):ae.setAttribute(de,Ft[cr])})},{immediate:!0})),ge!==ae&&pl(ge)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{ge.removeAttribute(Ft)})},{immediate:!0}),T.watch(()=>n.visible,pt,{immediate:!0})}),T.onBeforeUnmount(()=>{rt==null||rt(),rt=void 0}),t({popperContentRef:_,popperInstanceRef:b,updatePopper:st,contentStyle:U}),(Ct,Ut)=>(T.openBlock(),T.createElementBlock("div",T.mergeProps({ref_key:"contentRef",ref:_},T.unref(k),{style:T.unref(U),class:T.unref(j),tabindex:"-1",onMouseenter:Ut[0]||(Ut[0]=ae=>Ct.$emit("mouseenter",ae)),onMouseleave:Ut[1]||(Ut[1]=ae=>Ct.$emit("mouseleave",ae))}),[T.createVNode(T.unref(aG),{trapped:T.unref(a),"trap-on-focus-in":!0,"focus-trap-el":T.unref(_),"focus-start-el":T.unref(i),onFocusAfterTrapped:T.unref(s),onFocusAfterReleased:T.unref(o),onFocusin:T.unref(h),onFocusoutPrevented:T.unref(d),onReleaseRequested:T.unref(Q)},{default:T.withCtx(()=>[T.renderSlot(Ct.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var yG=Or(gG,[["__file","content.vue"]]);const _G=Ji(BU),FQ=Symbol("elTooltip"),H2=pn({...eU,...tw,appendTo:{type:Ar([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Ar(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Al=pn({...UL,disabled:Boolean,trigger:{type:Ar([String,Array]),default:"hover"},triggerKeys:{type:Ar(Array),default:()=>[t2.enter,t2.space]}}),{useModelToggleProps:vG,useModelToggleEmits:xG,useModelToggle:bG}=nL("visible"),LG=pn({...FL,...vG,...H2,...Al,...jL,showArrow:{type:Boolean,default:!0}}),wG=[...xG,"before-show","before-hide","show","hide","open","close"],EG=(e,t)=>Ii(e)?e.includes(t):e===t,u5=(e,t,r)=>n=>{EG(T.unref(e),t)&&r(n)},MG=T.defineComponent({name:"ElTooltipTrigger"}),AG=T.defineComponent({...MG,props:Al,setup(e,{expose:t}){const r=e,n=Hr("tooltip"),{controlled:i,id:a,open:o,onOpen:s,onClose:h,onToggle:d}=T.inject(FQ,void 0),Q=T.ref(null),p=()=>{if(T.unref(i)||r.disabled)return!0},m=T.toRef(r,"trigger"),_=Jo(p,u5(m,"hover",s)),x=Jo(p,u5(m,"hover",h)),b=Jo(p,u5(m,"click",k=>{k.button===0&&d(k)})),M=Jo(p,u5(m,"focus",s)),E=Jo(p,u5(m,"focus",h)),O=Jo(p,u5(m,"contextmenu",k=>{k.preventDefault(),d(k)})),V=Jo(p,k=>{const{code:j}=k;r.triggerKeys.includes(j)&&(k.preventDefault(),d(k))});return t({triggerRef:Q}),(k,j)=>(T.openBlock(),T.createBlock(T.unref(GU),{id:T.unref(a),"virtual-ref":k.virtualRef,open:T.unref(o),"virtual-triggering":k.virtualTriggering,class:T.normalizeClass(T.unref(n).e("trigger")),onBlur:T.unref(E),onClick:T.unref(b),onContextmenu:T.unref(O),onFocus:T.unref(M),onMouseenter:T.unref(_),onMouseleave:T.unref(x),onKeydown:T.unref(V)},{default:T.withCtx(()=>[T.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var SG=Or(AG,[["__file","trigger.vue"]]);const CG=T.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),HG=T.defineComponent({...CG,props:H2,setup(e,{expose:t}){const r=e,{selector:n}=SL(),i=Hr("tooltip"),a=T.ref(null),o=T.ref(!1),{controlled:s,id:h,open:d,trigger:Q,onClose:p,onOpen:m,onShow:_,onHide:x,onBeforeShow:b,onBeforeHide:M}=T.inject(FQ,void 0),E=T.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),O=T.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);T.onBeforeUnmount(()=>{o.value=!0});const V=T.computed(()=>T.unref(O)?!0:T.unref(d)),k=T.computed(()=>r.disabled?!1:T.unref(d)),j=T.computed(()=>r.appendTo||n.value),U=T.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),$=T.computed(()=>!T.unref(d)),J=()=>{x()},tt=()=>{if(T.unref(s))return!0},rt=Jo(tt,()=>{r.enterable&&T.unref(Q)==="hover"&&m()}),st=Jo(tt,()=>{T.unref(Q)==="hover"&&p()}),pt=()=>{var Ft,de;(de=(Ft=a.value)==null?void 0:Ft.updatePopper)==null||de.call(Ft),b==null||b()},Ct=()=>{M==null||M()},Ut=()=>{_(),ge=WR(T.computed(()=>{var Ft;return(Ft=a.value)==null?void 0:Ft.popperContentRef}),()=>{if(T.unref(s))return;T.unref(Q)!=="hover"&&p()})},ae=()=>{r.virtualTriggering||p()};let ge;return T.watch(()=>T.unref(d),Ft=>{Ft||ge==null||ge()},{flush:"post"}),T.watch(()=>r.content,()=>{var Ft,de;(de=(Ft=a.value)==null?void 0:Ft.updatePopper)==null||de.call(Ft)}),t({contentRef:a}),(Ft,de)=>(T.openBlock(),T.createBlock(T.Teleport,{disabled:!Ft.teleported,to:T.unref(j)},[T.createVNode(T.Transition,{name:T.unref(E),onAfterLeave:J,onBeforeEnter:pt,onAfterEnter:Ut,onBeforeLeave:Ct},{default:T.withCtx(()=>[T.unref(V)?T.withDirectives((T.openBlock(),T.createBlock(T.unref(yG),T.mergeProps({key:0,id:T.unref(h),ref_key:"contentRef",ref:a},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":T.unref($),"boundaries-padding":Ft.boundariesPadding,"fallback-placements":Ft.fallbackPlacements,"gpu-acceleration":Ft.gpuAcceleration,offset:Ft.offset,placement:Ft.placement,"popper-options":Ft.popperOptions,strategy:Ft.strategy,effect:Ft.effect,enterable:Ft.enterable,pure:Ft.pure,"popper-class":Ft.popperClass,"popper-style":[Ft.popperStyle,T.unref(U)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:T.unref(k),"z-index":Ft.zIndex,onMouseenter:T.unref(rt),onMouseleave:T.unref(st),onBlur:ae,onClose:T.unref(p)}),{default:T.withCtx(()=>[o.value?T.createCommentVNode("v-if",!0):T.renderSlot(Ft.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[T.vShow,T.unref(k)]]):T.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var OG=Or(HG,[["__file","content.vue"]]);const VG=["innerHTML"],IG={key:1},DG=T.defineComponent({name:"ElTooltip"}),PG=T.defineComponent({...DG,props:LG,emits:wG,setup(e,{expose:t,emit:r}){const n=e;tU();const i=El(),a=T.ref(),o=T.ref(),s=()=>{var E;const O=T.unref(a);O&&((E=O.popperInstanceRef)==null||E.update())},h=T.ref(!1),d=T.ref(),{show:Q,hide:p,hasUpdateHandler:m}=bG({indicator:h,toggleReason:d}),{onOpen:_,onClose:x}=rU({showAfter:T.toRef(n,"showAfter"),hideAfter:T.toRef(n,"hideAfter"),autoClose:T.toRef(n,"autoClose"),open:Q,close:p}),b=T.computed(()=>o3(n.visible)&&!m.value);T.provide(FQ,{controlled:b,id:i,open:T.readonly(h),trigger:T.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{x(E)},onToggle:E=>{T.unref(h)?x(E):_(E)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:s}),T.watch(()=>n.disabled,E=>{E&&h.value&&(h.value=!1)});const M=E=>{var O,V;const k=(V=(O=o.value)==null?void 0:O.contentRef)==null?void 0:V.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return k&&k.contains(j)};return T.onDeactivated(()=>h.value&&p()),t({popperRef:a,contentRef:o,isFocusInsideContent:M,updatePopper:s,onOpen:_,onClose:x,hide:p}),(E,O)=>(T.openBlock(),T.createBlock(T.unref(_G),{ref_key:"popperRef",ref:a,role:E.role},{default:T.withCtx(()=>[T.createVNode(SG,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:T.withCtx(()=>[E.$slots.default?T.renderSlot(E.$slots,"default",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),T.createVNode(OG,{ref_key:"contentRef",ref:o,"aria-label":E.ariaLabel,"boundaries-padding":E.boundariesPadding,content:E.content,disabled:E.disabled,effect:E.effect,enterable:E.enterable,"fallback-placements":E.fallbackPlacements,"hide-after":E.hideAfter,"gpu-acceleration":E.gpuAcceleration,offset:E.offset,persistent:E.persistent,"popper-class":E.popperClass,"popper-style":E.popperStyle,placement:E.placement,"popper-options":E.popperOptions,pure:E.pure,"raw-content":E.rawContent,"reference-el":E.referenceEl,"trigger-target-el":E.triggerTargetEl,"show-after":E.showAfter,strategy:E.strategy,teleported:E.teleported,transition:E.transition,"virtual-triggering":E.virtualTriggering,"z-index":E.zIndex,"append-to":E.appendTo},{default:T.withCtx(()=>[T.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(T.openBlock(),T.createElementBlock("span",{key:0,innerHTML:E.content},null,8,VG)):(T.openBlock(),T.createElementBlock("span",IG,T.toDisplayString(E.content),1))]),E.showArrow?(T.openBlock(),T.createBlock(T.unref(jU),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):T.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var kG=Or(PG,[["__file","tooltip.vue"]]);const jQ=Ji(kG),ew=Symbol("buttonGroupContextKey"),RG=(e,t)=>{tL({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},T.computed(()=>e.type==="text"));const r=T.inject(ew,void 0),n=OQ("button"),{form:i}=d3(),a=h3(T.computed(()=>r==null?void 0:r.size)),o=s5(),s=T.ref(),h=T.useSlots(),d=T.computed(()=>e.type||(r==null?void 0:r.type)||""),Q=T.computed(()=>{var x,b,M;return(M=(b=e.autoInsertSpace)!=null?b:(x=n.value)==null?void 0:x.autoInsertSpace)!=null?M:!1}),p=T.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),m=T.computed(()=>{var x;const b=(x=h.default)==null?void 0:x.call(h);if(Q.value&&(b==null?void 0:b.length)===1){const M=b[0];if((M==null?void 0:M.type)===T.Text){const E=M.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:o,_size:a,_type:d,_ref:s,_props:p,shouldAddSpace:m,handleClick:x=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",x)}}},zQ=pn({size:u3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:l3},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:l3,default:()=>yQ},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ar([String,Object]),default:"button"}}),BG={click:e=>e instanceof MouseEvent};function vi(e,t){NG(e)&&(e="100%");var r=FG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function _u(e){return Math.min(1,Math.max(0,e))}function NG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function FG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function rw(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function vu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function H4(e){return e.length===1?"0"+e:String(e)}function jG(e,t,r){return{r:vi(e,255)*255,g:vi(t,255)*255,b:vi(r,255)*255}}function nw(e,t,r){e=vi(e,255),t=vi(t,255),r=vi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var h=n-i;switch(o=s>.5?h/(2-n-i):h/(n+i),n){case e:a=(t-r)/h+(t<r?6:0);break;case t:a=(r-e)/h+2;break;case r:a=(e-t)/h+4;break}a/=6}return{h:a,s:o,l:s}}function $Q(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function zG(e,t,r){var n,i,a;if(e=vi(e,360),t=vi(t,100),r=vi(r,100),t===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;n=$Q(s,o,e+1/3),i=$Q(s,o,e),a=$Q(s,o,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function iw(e,t,r){e=vi(e,255),t=vi(t,255),r=vi(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,o=n,s=n-i,h=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/s+(t<r?6:0);break;case t:a=(r-e)/s+2;break;case r:a=(e-t)/s+4;break}a/=6}return{h:a,s:h,v:o}}function $G(e,t,r){e=vi(e,360)*6,t=vi(t,100),r=vi(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),o=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,o,a,a,s,r][h],Q=[s,r,r,o,a,a][h],p=[a,a,s,r,r,o][h];return{r:d*255,g:Q*255,b:p*255}}function aw(e,t,r,n){var i=[H4(Math.round(e).toString(16)),H4(Math.round(t).toString(16)),H4(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function UG(e,t,r,n,i){var a=[H4(Math.round(e).toString(16)),H4(Math.round(t).toString(16)),H4(Math.round(r).toString(16)),H4(GG(n))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function GG(e){return Math.round(parseFloat(e)*255).toString(16)}function ow(e){return O2(e)/255}function O2(e){return parseInt(e,16)}function ZG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var UQ={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function WG(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=KG(e)),typeof e=="object"&&(ss(e.r)&&ss(e.g)&&ss(e.b)?(t=jG(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ss(e.h)&&ss(e.s)&&ss(e.v)?(n=vu(e.s),i=vu(e.v),t=$G(e.h,n,i),o=!0,s="hsv"):ss(e.h)&&ss(e.s)&&ss(e.l)&&(n=vu(e.s),a=vu(e.l),t=zG(e.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=rw(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var qG="[-\\+]?\\d+%?",XG="[-\\+]?\\d*\\.\\d+%?",T3="(?:".concat(XG,")|(?:").concat(qG,")"),GQ="[\\s|\\(]+(".concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")\\s*\\)?"),ZQ="[\\s|\\(]+(".concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")[,|\\s]+(").concat(T3,")\\s*\\)?"),Sa={CSS_UNIT:new RegExp(T3),rgb:new RegExp("rgb"+GQ),rgba:new RegExp("rgba"+ZQ),hsl:new RegExp("hsl"+GQ),hsla:new RegExp("hsla"+ZQ),hsv:new RegExp("hsv"+GQ),hsva:new RegExp("hsva"+ZQ),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function KG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(UQ[e])e=UQ[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Sa.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Sa.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Sa.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Sa.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Sa.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Sa.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Sa.hex8.exec(e),r?{r:O2(r[1]),g:O2(r[2]),b:O2(r[3]),a:ow(r[4]),format:t?"name":"hex8"}:(r=Sa.hex6.exec(e),r?{r:O2(r[1]),g:O2(r[2]),b:O2(r[3]),format:t?"name":"hex"}:(r=Sa.hex4.exec(e),r?{r:O2(r[1]+r[1]),g:O2(r[2]+r[2]),b:O2(r[3]+r[3]),a:ow(r[4]+r[4]),format:t?"name":"hex8"}:(r=Sa.hex3.exec(e),r?{r:O2(r[1]+r[1]),g:O2(r[2]+r[2]),b:O2(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function ss(e){return!!Sa.CSS_UNIT.exec(String(e))}var YG=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=ZG(t)),this.originalInput=t;var i=WG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,a=t.r/255,o=t.g/255,s=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=rw(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=iw(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=iw(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=nw(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=nw(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),aw(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),UG(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(vi(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(vi(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+aw(this.r,this.g,this.b,!1),r=0,n=Object.entries(UQ);r<n.length;r++){var i=n[r],a=i[0],o=i[1];if(t===o)return a}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=_u(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=_u(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=_u(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=_u(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(o)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(new e({h:n,s:i,v:a})),a=(a+s)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],a=360/t,o=1;o<t;o++)i.push(new e({h:(n+o*a)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Q3(e,t=20){return e.mix("#141414",t).toString()}function JG(e){const t=s5(),r=Hr("button");return T.computed(()=>{let n={};const i=e.color;if(i){const a=new YG(i),o=e.dark?a.tint(20).toString():Q3(a,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?Q3(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Q3(a,50):a.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":o,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":o}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?Q3(a,90):a.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?Q3(a,50):a.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?Q3(a,80):a.tint(80).toString());else{const s=e.dark?Q3(a,30):a.tint(30).toString(),h=a.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":h,"border-color":i,"hover-bg-color":s,"hover-text-color":h,"hover-border-color":s,"active-bg-color":o,"active-border-color":o}),t.value){const d=e.dark?Q3(a,50):a.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const tZ=T.defineComponent({name:"ElButton"}),eZ=T.defineComponent({...tZ,props:zQ,emits:BG,setup(e,{expose:t,emit:r}){const n=e,i=JG(n),a=Hr("button"),{_ref:o,_size:s,_type:h,_disabled:d,_props:Q,shouldAddSpace:p,handleClick:m}=RG(n,r);return t({ref:o,size:s,type:h,disabled:d,shouldAddSpace:p}),(_,x)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.tag),T.mergeProps({ref_key:"_ref",ref:o},T.unref(Q),{class:[T.unref(a).b(),T.unref(a).m(T.unref(h)),T.unref(a).m(T.unref(s)),T.unref(a).is("disabled",T.unref(d)),T.unref(a).is("loading",_.loading),T.unref(a).is("plain",_.plain),T.unref(a).is("round",_.round),T.unref(a).is("circle",_.circle),T.unref(a).is("text",_.text),T.unref(a).is("link",_.link),T.unref(a).is("has-bg",_.bg)],style:T.unref(i),onClick:T.unref(m)}),{default:T.withCtx(()=>[_.loading?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[_.$slots.loading?T.renderSlot(_.$slots,"loading",{key:0}):(T.openBlock(),T.createBlock(T.unref(_i),{key:1,class:T.normalizeClass(T.unref(a).is("loading"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(T.openBlock(),T.createBlock(T.unref(_i),{key:1},{default:T.withCtx(()=>[_.icon?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.icon),{key:0})):T.renderSlot(_.$slots,"icon",{key:1})]),_:3})):T.createCommentVNode("v-if",!0),_.$slots.default?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass({[T.unref(a).em("text","expand")]:T.unref(p)})},[T.renderSlot(_.$slots,"default")],2)):T.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var rZ=Or(eZ,[["__file","button.vue"]]);const nZ={size:zQ.size,type:zQ.type},iZ=T.defineComponent({name:"ElButtonGroup"}),aZ=T.defineComponent({...iZ,props:nZ,setup(e){const t=e;T.provide(ew,T.reactive({size:T.toRef(t,"size"),type:T.toRef(t,"type")}));const r=Hr("button");return(n,i)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`${T.unref(r).b("group")}`)},[T.renderSlot(n.$slots,"default")],2))}});var sw=Or(aZ,[["__file","button-group.vue"]]);const co=Ji(rZ,{ButtonGroup:sw});Ea(sw);var D=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h5(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oZ(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const p3=new Map;let lw;q1&&(document.addEventListener("mousedown",e=>lw=e),document.addEventListener("mouseup",e=>{for(const t of p3.values())for(const{documentHandler:r}of t)r(e,lw)}));function cw(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:pl(t.arg)&&r.push(t.arg),function(n,i){const a=t.instance.popperRef,o=n.target,s=i==null?void 0:i.target,h=!t||!t.instance,d=!o||!s,Q=e.contains(o)||e.contains(s),p=e===o,m=r.length&&r.some(x=>x==null?void 0:x.contains(o))||r.length&&r.includes(s),_=a&&(a.contains(o)||a.contains(s));h||d||Q||p||m||_||t.value(n,i)}}const uw={beforeMount(e,t){p3.has(e)||p3.set(e,[]),p3.get(e).push({documentHandler:cw(e,t),bindingFn:t.value})},updated(e,t){p3.has(e)||p3.set(e,[]);const r=p3.get(e),n=r.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:cw(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){p3.delete(e)}},hw={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:u3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},dw={[C1]:e=>X1(e)||K1(e)||o3(e),change:e=>X1(e)||K1(e)||o3(e)},d5=Symbol("checkboxGroupContextKey"),sZ=({model:e,isChecked:t})=>{const r=T.inject(d5,void 0),n=T.computed(()=>{var a,o;const s=(a=r==null?void 0:r.max)==null?void 0:a.value,h=(o=r==null?void 0:r.min)==null?void 0:o.value;return!Ql(s)&&e.value.length>=s&&!t.value||!Ql(h)&&e.value.length<=h&&t.value});return{isDisabled:s5(T.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},lZ=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:a})=>{const o=T.inject(d5,void 0),{formItem:s}=d3(),{emit:h}=T.getCurrentInstance();function d(x){var b,M;return x===e.trueLabel||x===!0?(b=e.trueLabel)!=null?b:!0:(M=e.falseLabel)!=null?M:!1}function Q(x,b){h("change",d(x),b)}function p(x){if(r.value)return;const b=x.target;h("change",d(b.checked),x)}async function m(x){r.value||!n.value&&!i.value&&a.value&&(x.composedPath().some(E=>E.tagName==="LABEL")||(t.value=d([!1,e.falseLabel].includes(t.value)),await T.nextTick(),Q(t.value,x)))}const _=T.computed(()=>(o==null?void 0:o.validateEvent)||e.validateEvent);return T.watch(()=>e.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(x=>Y1(x)))}),{handleChange:p,onClickRoot:m}},cZ=e=>{const t=T.ref(!1),{emit:r}=T.getCurrentInstance(),n=T.inject(d5,void 0),i=T.computed(()=>Ql(n)===!1),a=T.ref(!1),o=T.computed({get(){var s,h;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(h=e.modelValue)!=null?h:t.value},set(s){var h,d;i.value&&Ii(s)?(a.value=((h=n==null?void 0:n.max)==null?void 0:h.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>o.value.length,a.value===!1&&((d=n==null?void 0:n.changeEvent)==null||d.call(n,s))):(r(C1,s),t.value=s)}});return{model:o,isGroup:i,isLimitExceeded:a}},uZ=(e,t,{model:r})=>{const n=T.inject(d5,void 0),i=T.ref(!1),a=T.computed(()=>{const d=r.value;return o3(d)?d:Ii(d)?yi(e.label)?d.map(T.toRaw).some(Q=>Tl(Q,e.label)):d.map(T.toRaw).includes(e.label):d!=null?d===e.trueLabel:!!d}),o=h3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),s=h3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),h=T.computed(()=>!!t.default||!a3(e.label));return{checkboxButtonSize:o,isChecked:a,isFocused:i,checkboxSize:s,hasOwnLabel:h}},hZ=(e,{model:t})=>{function r(){Ii(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},fw=(e,t)=>{const{formItem:r}=d3(),{model:n,isGroup:i,isLimitExceeded:a}=cZ(e),{isFocused:o,isChecked:s,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q}=uZ(e,t,{model:n}),{isDisabled:p}=sZ({model:n,isChecked:s}),{inputId:m,isLabeledByFormItem:_}=l5(e,{formItemContext:r,disableIdGeneration:Q,disableIdManagement:i}),{handleChange:x,onClickRoot:b}=lZ(e,{model:n,isLimitExceeded:a,hasOwnLabel:Q,isDisabled:p,isLabeledByFormItem:_});return hZ(e,{model:n}),{inputId:m,isLabeledByFormItem:_,isChecked:s,isDisabled:p,isFocused:o,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q,model:n,handleChange:x,onClickRoot:b}},dZ=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],fZ=["id","indeterminate","disabled","value","name","tabindex"],TZ=T.defineComponent({name:"ElCheckbox"}),QZ=T.defineComponent({...TZ,props:hw,emits:dw,setup(e){const t=e,r=T.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:a,isDisabled:o,isFocused:s,checkboxSize:h,hasOwnLabel:d,model:Q,handleChange:p,onClickRoot:m}=fw(t,r),_=Hr("checkbox"),x=T.computed(()=>[_.b(),_.m(h.value),_.is("disabled",o.value),_.is("bordered",t.border),_.is("checked",a.value)]),b=T.computed(()=>[_.e("input"),_.is("disabled",o.value),_.is("checked",a.value),_.is("indeterminate",t.indeterminate),_.is("focus",s.value)]);return(M,E)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(!T.unref(d)&&T.unref(i)?"span":"label"),{class:T.normalizeClass(T.unref(x)),"aria-controls":M.indeterminate?M.controls:null,onClick:T.unref(m)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b))},[M.trueLabel||M.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,id:T.unref(n),"onUpdate:modelValue":E[0]||(E[0]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,name:M.name,tabindex:M.tabindex,disabled:T.unref(o),"true-value":M.trueLabel,"false-value":M.falseLabel,onChange:E[1]||(E[1]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[2]||(E[2]=O=>s.value=!0),onBlur:E[3]||(E[3]=O=>s.value=!1),onClick:E[4]||(E[4]=T.withModifiers(()=>{},["stop"]))},null,42,dZ)),[[T.vModelCheckbox,T.unref(Q)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,id:T.unref(n),"onUpdate:modelValue":E[5]||(E[5]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,disabled:T.unref(o),value:M.label,name:M.name,tabindex:M.tabindex,onChange:E[6]||(E[6]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[7]||(E[7]=O=>s.value=!0),onBlur:E[8]||(E[8]=O=>s.value=!1),onClick:E[9]||(E[9]=T.withModifiers(()=>{},["stop"]))},null,42,fZ)),[[T.vModelCheckbox,T.unref(Q)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(_).e("inner"))},null,2)],2),T.unref(d)?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(_).e("label"))},[T.renderSlot(M.$slots,"default"),M.$slots.default?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createTextVNode(T.toDisplayString(M.label),1)],64))],2)):T.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var pZ=Or(QZ,[["__file","checkbox.vue"]]);const mZ=["name","tabindex","disabled","true-value","false-value"],gZ=["name","tabindex","disabled","value"],yZ=T.defineComponent({name:"ElCheckboxButton"}),_Z=T.defineComponent({...yZ,props:hw,emits:dw,setup(e){const t=e,r=T.useSlots(),{isFocused:n,isChecked:i,isDisabled:a,checkboxButtonSize:o,model:s,handleChange:h}=fw(t,r),d=T.inject(d5,void 0),Q=Hr("checkbox"),p=T.computed(()=>{var _,x,b,M;const E=(x=(_=d==null?void 0:d.fill)==null?void 0:_.value)!=null?x:"";return{backgroundColor:E,borderColor:E,color:(M=(b=d==null?void 0:d.textColor)==null?void 0:b.value)!=null?M:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),m=T.computed(()=>[Q.b("button"),Q.bm("button",o.value),Q.is("disabled",a.value),Q.is("checked",i.value),Q.is("focus",n.value)]);return(_,x)=>(T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass(T.unref(m))},[_.trueLabel||_.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,"onUpdate:modelValue":x[0]||(x[0]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(a),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:x[1]||(x[1]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[2]||(x[2]=b=>n.value=!0),onBlur:x[3]||(x[3]=b=>n.value=!1),onClick:x[4]||(x[4]=T.withModifiers(()=>{},["stop"]))},null,42,mZ)),[[T.vModelCheckbox,T.unref(s)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,"onUpdate:modelValue":x[5]||(x[5]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(a),value:_.label,onChange:x[6]||(x[6]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[7]||(x[7]=b=>n.value=!0),onBlur:x[8]||(x[8]=b=>n.value=!1),onClick:x[9]||(x[9]=T.withModifiers(()=>{},["stop"]))},null,42,gZ)),[[T.vModelCheckbox,T.unref(s)]]),_.$slots.default||_.label?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass(T.unref(Q).be("button","inner")),style:T.normalizeStyle(T.unref(i)?T.unref(p):void 0)},[T.renderSlot(_.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(_.label),1)])],6)):T.createCommentVNode("v-if",!0)],2))}});var Tw=Or(_Z,[["__file","checkbox-button.vue"]]);const vZ=pn({modelValue:{type:Ar(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:u3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),xZ={[C1]:e=>Ii(e),change:e=>Ii(e)},bZ=T.defineComponent({name:"ElCheckboxGroup"}),LZ=T.defineComponent({...bZ,props:vZ,emits:xZ,setup(e,{emit:t}){const r=e,n=Hr("checkbox"),{formItem:i}=d3(),{inputId:a,isLabeledByFormItem:o}=l5(r,{formItemContext:i}),s=async d=>{t(C1,d),await T.nextTick(),t("change",d)},h=T.computed({get(){return r.modelValue},set(d){s(d)}});return T.provide(d5,{...uz(T.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:h,changeEvent:s}),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(d=>Y1(d)))}),(d,Q)=>{var p;return T.openBlock(),T.createBlock(T.resolveDynamicComponent(d.tag),{id:T.unref(a),class:T.normalizeClass(T.unref(n).b("group")),role:"group","aria-label":T.unref(o)?void 0:d.label||"checkbox-group","aria-labelledby":T.unref(o)?(p=T.unref(i))==null?void 0:p.labelId:void 0},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Qw=Or(LZ,[["__file","checkbox-group.vue"]]);const xu=Ji(pZ,{CheckboxButton:Tw,CheckboxGroup:Qw});Ea(Tw);const WQ=Ea(Qw),pw=pn({size:u3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),wZ=pn({...pw,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),mw={[C1]:e=>X1(e)||K1(e)||o3(e),[ou]:e=>X1(e)||K1(e)||o3(e)},gw=Symbol("radioGroupKey"),yw=(e,t)=>{const r=T.ref(),n=T.inject(gw,void 0),i=T.computed(()=>!!n),a=T.computed({get(){return i.value?n.modelValue:e.modelValue},set(Q){i.value?n.changeEvent(Q):t&&t(C1,Q),r.value.checked=e.modelValue===e.label}}),o=h3(T.computed(()=>n==null?void 0:n.size)),s=s5(T.computed(()=>n==null?void 0:n.disabled)),h=T.ref(!1),d=T.computed(()=>s.value||i.value&&a.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:h,size:o,disabled:s,tabIndex:d,modelValue:a}},EZ=["value","name","disabled"],MZ=T.defineComponent({name:"ElRadio"}),AZ=T.defineComponent({...MZ,props:wZ,emits:mw,setup(e,{emit:t}){const r=e,n=Hr("radio"),{radioRef:i,radioGroup:a,focus:o,size:s,disabled:h,modelValue:d}=yw(r,t);function Q(){T.nextTick(()=>t("change",d.value))}return(p,m)=>{var _;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("focus",T.unref(o)),T.unref(n).is("bordered",p.border),T.unref(n).is("checked",T.unref(d)===p.label),T.unref(n).m(T.unref(s))])},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(n).e("input"),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("checked",T.unref(d)===p.label)])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m[0]||(m[0]=x=>T.isRef(d)?d.value=x:null),class:T.normalizeClass(T.unref(n).e("original")),value:p.label,name:p.name||((_=T.unref(a))==null?void 0:_.name),disabled:T.unref(h),type:"radio",onFocus:m[1]||(m[1]=x=>o.value=!0),onBlur:m[2]||(m[2]=x=>o.value=!1),onChange:Q,onClick:m[3]||(m[3]=T.withModifiers(()=>{},["stop"]))},null,42,EZ),[[T.vModelRadio,T.unref(d)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("inner"))},null,2)],2),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("label")),onKeydown:m[4]||(m[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(p.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(p.label),1)])],34)],2)}}});var SZ=Or(AZ,[["__file","radio.vue"]]);const CZ=pn({...pw,name:{type:String,default:""}}),HZ=["value","name","disabled"],OZ=T.defineComponent({name:"ElRadioButton"}),VZ=T.defineComponent({...OZ,props:CZ,setup(e){const t=e,r=Hr("radio"),{radioRef:n,focus:i,size:a,disabled:o,modelValue:s,radioGroup:h}=yw(t),d=T.computed(()=>({backgroundColor:(h==null?void 0:h.fill)||"",borderColor:(h==null?void 0:h.fill)||"",boxShadow:h!=null&&h.fill?`-1px 0 0 0 ${h.fill}`:"",color:(h==null?void 0:h.textColor)||""}));return(Q,p)=>{var m;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(r).b("button"),T.unref(r).is("active",T.unref(s)===Q.label),T.unref(r).is("disabled",T.unref(o)),T.unref(r).is("focus",T.unref(i)),T.unref(r).bm("button",T.unref(a))])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=_=>T.isRef(s)?s.value=_:null),class:T.normalizeClass(T.unref(r).be("button","original-radio")),value:Q.label,type:"radio",name:Q.name||((m=T.unref(h))==null?void 0:m.name),disabled:T.unref(o),onFocus:p[1]||(p[1]=_=>i.value=!0),onBlur:p[2]||(p[2]=_=>i.value=!1),onClick:p[3]||(p[3]=T.withModifiers(()=>{},["stop"]))},null,42,HZ),[[T.vModelRadio,T.unref(s)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(r).be("button","inner")),style:T.normalizeStyle(T.unref(s)===Q.label?T.unref(d):{}),onKeydown:p[4]||(p[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(Q.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(Q.label),1)])],38)],2)}}});var _w=Or(VZ,[["__file","radio-button.vue"]]);const IZ=pn({id:{type:String,default:void 0},size:u3,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),DZ=mw,PZ=["id","aria-label","aria-labelledby"],kZ=T.defineComponent({name:"ElRadioGroup"}),RZ=T.defineComponent({...kZ,props:IZ,emits:DZ,setup(e,{emit:t}){const r=e,n=Hr("radio"),i=El(),a=T.ref(),{formItem:o}=d3(),{inputId:s,isLabeledByFormItem:h}=l5(r,{formItemContext:o}),d=p=>{t(C1,p),T.nextTick(()=>t("change",p))};T.onMounted(()=>{const p=a.value.querySelectorAll("[type=radio]"),m=p[0];!Array.from(p).some(_=>_.checked)&&m&&(m.tabIndex=0)});const Q=T.computed(()=>r.name||i.value);return T.provide(gw,T.reactive({...T.toRefs(r),changeEvent:d,name:Q})),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(o==null||o.validate("change").catch(p=>Y1(p)))}),(p,m)=>(T.openBlock(),T.createElementBlock("div",{id:T.unref(s),ref_key:"radioGroupRef",ref:a,class:T.normalizeClass(T.unref(n).b("group")),role:"radiogroup","aria-label":T.unref(h)?void 0:p.label||"radio-group","aria-labelledby":T.unref(h)?T.unref(o).labelId:void 0},[T.renderSlot(p.$slots,"default")],10,PZ))}});var vw=Or(RZ,[["__file","radio-group.vue"]]);const xw=Ji(SZ,{RadioButton:_w,RadioGroup:vw}),bw=Ea(vw);Ea(_w);const Lw=pn({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Yb},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),BZ={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},NZ=T.defineComponent({name:"ElTag"}),FZ=T.defineComponent({...NZ,props:Lw,emits:BZ,setup(e,{emit:t}){const r=e,n=h3(),i=Hr("tag"),a=T.computed(()=>{const{type:h,hit:d,effect:Q,closable:p,round:m}=r;return[i.b(),i.is("closable",p),i.m(h||"primary"),i.m(n.value),i.m(Q),i.is("hit",d),i.is("round",m)]}),o=h=>{t("close",h)},s=h=>{t("click",h)};return(h,d)=>h.disableTransitions?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(o,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)):(T.openBlock(),T.createBlock(T.Transition,{key:1,name:`${T.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(_i),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(o,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var jZ=Or(FZ,[["__file","tag.vue"]]);const zZ=Ji(jZ),ww=Symbol("rowContextKey"),$Z=pn({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),UZ=T.defineComponent({name:"ElRow"}),GZ=T.defineComponent({...UZ,props:$Z,setup(e){const t=e,r=Hr("row"),n=T.computed(()=>t.gutter);T.provide(ww,{gutter:n});const i=T.computed(()=>{const o={};return t.gutter&&(o.marginRight=o.marginLeft=`-${t.gutter/2}px`),o}),a=T.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(o,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(o.tag),{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var ZZ=Or(GZ,[["__file","row.vue"]]);const ls=Ji(ZZ),WZ=pn({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Ar([Number,Object]),default:()=>t5({})},sm:{type:Ar([Number,Object]),default:()=>t5({})},md:{type:Ar([Number,Object]),default:()=>t5({})},lg:{type:Ar([Number,Object]),default:()=>t5({})},xl:{type:Ar([Number,Object]),default:()=>t5({})}}),qZ=T.defineComponent({name:"ElCol"}),XZ=T.defineComponent({...qZ,props:WZ,setup(e){const t=e,{gutter:r}=T.inject(ww,{gutter:T.computed(()=>0)}),n=Hr("col"),i=T.computed(()=>{const o={};return r.value&&(o.paddingLeft=o.paddingRight=`${r.value/2}px`),o}),a=T.computed(()=>{const o=[];return["span","offset","pull","push"].forEach(d=>{const Q=t[d];K1(Q)&&(d==="span"?o.push(n.b(`${t[d]}`)):Q>0&&o.push(n.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{K1(t[d])?o.push(n.b(`${d}-${t[d]}`)):yi(t[d])&&Object.entries(t[d]).forEach(([Q,p])=>{o.push(Q!=="span"?n.b(`${d}-${Q}-${p}`):n.b(`${d}-${p}`))})}),r.value&&o.push(n.is("guttered")),[n.b(),o]});return(o,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(o.tag),{class:T.normalizeClass(T.unref(a)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});var KZ=Or(XZ,[["__file","col.vue"]]);const m3=Ji(KZ),YZ=T.defineComponent({name:"ElCollapseTransition"}),JZ=T.defineComponent({...YZ,setup(e){const t=Hr("collapse-transition"),r=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},n={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){r(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){r(i)},leaveCancelled(i){r(i)}};return(i,a)=>(T.openBlock(),T.createBlock(T.Transition,T.mergeProps({name:T.unref(t).b()},T.toHandlers(n)),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var bu=Or(JZ,[["__file","collapse-transition.vue"]]);bu.install=e=>{e.component(bu.name,bu)};const tW=bu,eW=pn({color:{type:Ar(Object),required:!0},vertical:{type:Boolean,default:!1}});let qQ=!1;function Sl(e,t){if(!q1)return;const r=function(a){var o;(o=t.drag)==null||o.call(t,a)},n=function(a){var o;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,qQ=!1,(o=t.end)==null||o.call(t,a)},i=function(a){var o;qQ||(a.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),qQ=!0,(o=t.start)==null||o.call(t,a))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const rW=e=>{const t=T.getCurrentInstance(),r=T.shallowRef(),n=T.shallowRef();function i(o){o.target!==r.value&&a(o)}function a(o){if(!n.value||!r.value)return;const h=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:Q}=YT(o);if(e.vertical){let p=Q-h.top;p=Math.max(r.value.offsetHeight/2,p),p=Math.min(p,h.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((p-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let p=d-h.left;p=Math.max(r.value.offsetWidth/2,p),p=Math.min(p,h.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((p-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:a,handleClick:i}},nW=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=T.getCurrentInstance(),a=Hr("color-alpha-slider"),o=T.ref(0),s=T.ref(0),h=T.ref();function d(){if(!r.value||e.vertical)return 0;const O=i.vnode.el,V=e.color.get("alpha");return O?Math.round(V*(O.offsetWidth-r.value.offsetWidth/2)/100):0}function Q(){if(!r.value)return 0;const O=i.vnode.el;if(!e.vertical)return 0;const V=e.color.get("alpha");return O?Math.round(V*(O.offsetHeight-r.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:O,g:V,b:k}=e.color.toRgb();return`linear-gradient(to right, rgba(${O}, ${V}, ${k}, 0) 0%, rgba(${O}, ${V}, ${k}, 1) 100%)`}return""}function m(){o.value=d(),s.value=Q(),h.value=p()}T.onMounted(()=>{if(!t.value||!r.value)return;const O={drag:V=>{n(V)},end:V=>{n(V)}};Sl(t.value,O),Sl(r.value,O),m()}),T.watch(()=>e.color.get("alpha"),()=>m()),T.watch(()=>e.color.value,()=>m());const _=T.computed(()=>[a.b(),a.is("vertical",e.vertical)]),x=T.computed(()=>a.e("bar")),b=T.computed(()=>a.e("thumb")),M=T.computed(()=>({background:h.value})),E=T.computed(()=>({left:J6(o.value),top:J6(s.value)}));return{rootKls:_,barKls:x,barStyle:M,thumbKls:b,thumbStyle:E,update:m}},iW=T.defineComponent({name:"ElColorAlphaSlider"}),aW=T.defineComponent({...iW,props:eW,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:a,handleClick:o}=rW(r),{rootKls:s,barKls:h,barStyle:d,thumbKls:Q,thumbStyle:p,update:m}=nW(r,{bar:n,thumb:i,handleDrag:a});return t({update:m,bar:n,thumb:i}),(_,x)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(s))},[T.createElementVNode("div",{ref_key:"bar",ref:n,class:T.normalizeClass(T.unref(h)),style:T.normalizeStyle(T.unref(d)),onClick:x[0]||(x[0]=(...b)=>T.unref(o)&&T.unref(o)(...b))},null,6),T.createElementVNode("div",{ref_key:"thumb",ref:i,class:T.normalizeClass(T.unref(Q)),style:T.normalizeStyle(T.unref(p))},null,6)],2))}});var oW=Or(aW,[["__file","alpha-slider.vue"]]);const sW=T.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Hr("color-hue-slider"),r=T.getCurrentInstance(),n=T.ref(),i=T.ref(),a=T.ref(0),o=T.ref(0),s=T.computed(()=>e.color.get("hue"));T.watch(()=>s.value,()=>{m()});function h(_){_.target!==n.value&&d(_)}function d(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:M,clientY:E}=YT(_);let O;if(e.vertical){let V=E-b.top;V=Math.min(V,b.height-n.value.offsetHeight/2),V=Math.max(n.value.offsetHeight/2,V),O=Math.round((V-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let V=M-b.left;V=Math.min(V,b.width-n.value.offsetWidth/2),V=Math.max(n.value.offsetWidth/2,V),O=Math.round((V-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}e.color.set("hue",O)}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function p(){if(!n.value)return 0;const _=r.vnode.el;if(!e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function m(){a.value=Q(),o.value=p()}return T.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:x=>{d(x)},end:x=>{d(x)}};Sl(i.value,_),Sl(n.value,_),m()}),{bar:i,thumb:n,thumbLeft:a,thumbTop:o,hueValue:s,handleClick:h,update:m,ns:t}}});function lW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[T.createElementVNode("div",{ref:"bar",class:T.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...o)=>e.handleClick&&e.handleClick(...o))},null,2),T.createElementVNode("div",{ref:"thumb",class:T.normalizeClass(e.ns.e("thumb")),style:T.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var cW=Or(sW,[["render",lW],["__file","hue-slider.vue"]]);const uW=pn({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:u3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Ar(Array)},validateEvent:{type:Boolean,default:!0}}),hW={[C1]:e=>X1(e)||a3(e),[ou]:e=>X1(e)||a3(e),activeChange:e=>X1(e)||a3(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},Ew=Symbol("colorPickerContextKey"),Mw=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},dW=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},fW=function(e){return typeof e=="string"&&e.includes("%")},f5=function(e,t){dW(e)&&(e="100%");const r=fW(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},Aw={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Lu=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${Aw[t]||t}${Aw[r]||r}`},Sw=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${Lu(e)}${Lu(t)}${Lu(r)}`},XQ={A:10,B:11,C:12,D:13,E:14,F:15},O4=function(e){return e.length===2?(XQ[e[0].toUpperCase()]||+e[0])*16+(XQ[e[1].toUpperCase()]||+e[1]):XQ[e[1].toUpperCase()]||+e[1]},TW=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const a=(r+t)/2,o=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:o*100,v:a*100}},Cw=(e,t,r)=>{e=f5(e,255),t=f5(t,255),r=f5(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let a;const o=n,s=n-i,h=n===0?0:s/n;if(n===i)a=0;else{switch(n){case e:{a=(t-r)/s+(t<r?6:0);break}case t:{a=(r-e)/s+2;break}case r:{a=(e-t)/s+4;break}}a/=6}return{h:a*360,s:h*100,v:o*100}},Cl=function(e,t,r){e=f5(e,360)*6,t=f5(t,100),r=f5(r,100);const n=Math.floor(e),i=e-n,a=r*(1-t),o=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,o,a,a,s,r][h],Q=[s,r,r,o,a,a][h],p=[a,a,s,r,r,o][h];return{r:Math.round(d*255),g:Math.round(Q*255),b:Math.round(p*255)}};class Hl{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)b4(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)b4(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return Cl(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,a)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,a)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:a,v:o}=TW(n[0],n[1],n[2]);r(i,a,o)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,a)=>a>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:a,v:o}=Cw(n[0],n[1],n[2]);r(i,a,o)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,a,o;n.length===3?(i=O4(n[0]+n[0]),a=O4(n[1]+n[1]),o=O4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=O4(n.slice(0,2)),a=O4(n.slice(2,4)),o=O4(n.slice(4,6))),n.length===8?this._alpha=O4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:h,v:d}=Cw(i,a,o);r(s,h,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:a}=this;if(this.enableAlpha)switch(a){case"hsl":{const o=Mw(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${Sw(Cl(t,r,n))}${Lu(i*255/100)}`;break}default:{const{r:o,g:s,b:h}=Cl(t,r,n);this.value=`rgba(${o}, ${s}, ${h}, ${this.get("alpha")/100})`}}else switch(a){case"hsl":{const o=Mw(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(o[1]*100)}%, ${Math.round(o[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:o,g:s,b:h}=Cl(t,r,n);this.value=`rgb(${o}, ${s}, ${h})`;break}default:this.value=Sw(Cl(t,r,n))}}}const QW=T.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Hr("color-predefine"),{currentColor:r}=T.inject(Ew),n=T.ref(a(e.colors,e.color));T.watch(()=>r.value,o=>{const s=new Hl;s.fromString(o),n.value.forEach(h=>{h.selected=s.compare(h)})}),T.watchEffect(()=>{n.value=a(e.colors,e.color)});function i(o){e.color.fromString(e.colors[o])}function a(o,s){return o.map(h=>{const d=new Hl;return d.enableAlpha=!0,d.format="rgba",d.fromString(h),d.selected=d.value===s.value,d})}return{rgbaColors:n,handleSelect:i,ns:t}}}),pW=["onClick"];function mW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b())},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("colors"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.rgbaColors,(o,s)=>(T.openBlock(),T.createElementBlock("div",{key:e.colors[s],class:T.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",o._alpha<100),{selected:o.selected}]),onClick:h=>e.handleSelect(s)},[T.createElementVNode("div",{style:T.normalizeStyle({backgroundColor:o.value})},null,4)],10,pW))),128))],2)],2)}var gW=Or(QW,[["render",mW],["__file","predefine.vue"]]);const yW=T.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Hr("color-svpanel"),r=T.getCurrentInstance(),n=T.ref(0),i=T.ref(0),a=T.ref("hsl(0, 100%, 50%)"),o=T.computed(()=>{const d=e.color.get("hue"),Q=e.color.get("value");return{hue:d,value:Q}});function s(){const d=e.color.get("saturation"),Q=e.color.get("value"),p=r.vnode.el,{clientWidth:m,clientHeight:_}=p;i.value=d*m/100,n.value=(100-Q)*_/100,a.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function h(d){const p=r.vnode.el.getBoundingClientRect(),{clientX:m,clientY:_}=YT(d);let x=m-p.left,b=_-p.top;x=Math.max(0,x),x=Math.min(x,p.width),b=Math.max(0,b),b=Math.min(b,p.height),i.value=x,n.value=b,e.color.set({saturation:x/p.width*100,value:100-b/p.height*100})}return T.watch(()=>o.value,()=>{s()}),T.onMounted(()=>{Sl(r.vnode.el,{drag:d=>{h(d)},end:d=>{h(d)}}),s()}),{cursorTop:n,cursorLeft:i,background:a,colorValue:o,handleDrag:h,update:s,ns:t}}}),_W=[T.createElementVNode("div",null,null,-1)];function vW(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b()),style:T.normalizeStyle({backgroundColor:e.background})},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("white"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("black"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("cursor")),style:T.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},_W,6)],6)}var xW=Or(yW,[["render",vW],["__file","sv-panel.vue"]]);const bW=["onKeydown"],LW=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],wW=T.defineComponent({name:"ElColorPicker"}),EW=T.defineComponent({...wW,props:uW,emits:hW,setup(e,{expose:t,emit:r}){const n=e,{t:i}=su(),a=Hr("color"),{formItem:o}=d3(),s=h3(),h=s5(),{inputId:d,isLabeledByFormItem:Q}=l5(n,{formItemContext:o}),p=T.ref(),m=T.ref(),_=T.ref(),x=T.ref(),b=T.ref(),M=T.ref(),{isFocused:E,handleFocus:O,handleBlur:V}=HQ(b,{beforeBlur(zt){var fe;return(fe=x.value)==null?void 0:fe.isFocusInsideContent(zt)},afterBlur(){ge(!1),Wt()}}),k=zt=>{if(h.value)return he();O(zt)};let j=!0;const U=T.reactive(new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),$=T.ref(!1),J=T.ref(!1),tt=T.ref(""),rt=T.computed(()=>!n.modelValue&&!J.value?"transparent":ae(U,n.showAlpha)),st=T.computed(()=>!n.modelValue&&!J.value?"":U.value),pt=T.computed(()=>Q.value?void 0:n.label||i("el.colorpicker.defaultLabel")),Ct=T.computed(()=>Q.value?o==null?void 0:o.labelId:void 0),Ut=T.computed(()=>[a.b("picker"),a.is("disabled",h.value),a.bm("picker",s.value),a.is("focused",E.value)]);function ae(zt,fe){if(!(zt instanceof Hl))throw new TypeError("color should be instance of _color Class");const{r:Re,g:Se,b:He}=zt.toRgb();return fe?`rgba(${Re}, ${Se}, ${He}, ${zt.get("alpha")/100})`:`rgb(${Re}, ${Se}, ${He})`}function ge(zt){$.value=zt}const Ft=jb(ge,100,{leading:!0});function de(){h.value||ge(!0)}function cr(){Ft(!1),Wt()}function Wt(){T.nextTick(()=>{n.modelValue?U.fromString(n.modelValue):(U.value="",T.nextTick(()=>{J.value=!1}))})}function ce(){h.value||Ft(!$.value)}function pe(){U.fromString(tt.value)}function be(){const zt=U.value;r(C1,zt),r("change",zt),n.validateEvent&&(o==null||o.validate("change").catch(fe=>Y1(fe))),Ft(!1),T.nextTick(()=>{const fe=new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});U.compare(fe)||Wt()})}function Fe(){Ft(!1),r(C1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(o==null||o.validate("change").catch(zt=>Y1(zt))),Wt()}function $e(zt){if($.value&&(cr(),E.value)){const fe=new FocusEvent("focus",zt);V(fe)}}function je(zt){zt.preventDefault(),zt.stopPropagation(),ge(!1),Wt()}function Bt(zt){switch(zt.code){case t2.enter:case t2.space:zt.preventDefault(),zt.stopPropagation(),de(),M.value.focus();break;case t2.esc:je(zt);break}}function Zt(){b.value.focus()}function he(){b.value.blur()}return T.onMounted(()=>{n.modelValue&&(tt.value=st.value)}),T.watch(()=>n.modelValue,zt=>{zt?zt&&zt!==U.value&&(j=!1,U.fromString(zt)):J.value=!1}),T.watch(()=>st.value,zt=>{tt.value=zt,j&&r("activeChange",zt),j=!0}),T.watch(()=>U.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),T.watch(()=>$.value,()=>{T.nextTick(()=>{var zt,fe,Re;(zt=p.value)==null||zt.update(),(fe=m.value)==null||fe.update(),(Re=_.value)==null||Re.update()})}),T.provide(Ew,{currentColor:st}),t({color:U,show:de,hide:cr,focus:Zt,blur:he}),(zt,fe)=>(T.openBlock(),T.createBlock(T.unref(jQ),{ref_key:"popper",ref:x,visible:$.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[T.unref(a).be("picker","panel"),T.unref(a).b("dropdown"),zt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${T.unref(a).namespace.value}-zoom-in-top`,persistent:"",onHide:fe[2]||(fe[2]=Re=>ge(!1))},{content:T.withCtx(()=>[T.withDirectives((T.openBlock(),T.createElementBlock("div",{onKeydown:T.withKeys(je,["esc"])},[T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("dropdown","main-wrapper"))},[T.createVNode(cW,{ref_key:"hue",ref:p,class:"hue-slider",color:T.unref(U),vertical:""},null,8,["color"]),T.createVNode(xW,{ref_key:"sv",ref:m,color:T.unref(U)},null,8,["color"])],2),zt.showAlpha?(T.openBlock(),T.createBlock(oW,{key:0,ref_key:"alpha",ref:_,color:T.unref(U)},null,8,["color"])):T.createCommentVNode("v-if",!0),zt.predefine?(T.openBlock(),T.createBlock(gW,{key:1,ref:"predefine",color:T.unref(U),colors:zt.predefine},null,8,["color","colors"])):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("dropdown","btns"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a).be("dropdown","value"))},[T.createVNode(T.unref(Qu),{ref_key:"inputRef",ref:M,modelValue:tt.value,"onUpdate:modelValue":fe[0]||(fe[0]=Re=>tt.value=Re),"validate-event":!1,size:"small",onKeyup:T.withKeys(pe,["enter"]),onBlur:pe},null,8,["modelValue","onKeyup"])],2),T.createVNode(T.unref(co),{class:T.normalizeClass(T.unref(a).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),T.createVNode(T.unref(co),{plain:"",size:"small",class:T.normalizeClass(T.unref(a).be("dropdown","btn")),onClick:be},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,bW)),[[T.unref(uw),$e]])]),default:T.withCtx(()=>[T.createElementVNode("div",{id:T.unref(d),ref_key:"triggerRef",ref:b,class:T.normalizeClass(T.unref(Ut)),role:"button","aria-label":T.unref(pt),"aria-labelledby":T.unref(Ct),"aria-description":T.unref(i)("el.colorpicker.description",{color:zt.modelValue||""}),"aria-disabled":T.unref(h),tabindex:T.unref(h)?-1:zt.tabindex,onKeydown:Bt,onFocus:k,onBlur:fe[1]||(fe[1]=(...Re)=>T.unref(V)&&T.unref(V)(...Re))},[T.unref(h)?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(a).be("picker","mask"))},null,2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(a).be("picker","trigger")),onClick:ce},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(a).be("picker","color"),T.unref(a).is("alpha",zt.showAlpha)])},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(a).be("picker","color-inner")),style:T.normalizeStyle({backgroundColor:T.unref(rt)})},[T.withDirectives(T.createVNode(T.unref(_i),{class:T.normalizeClass([T.unref(a).be("picker","icon"),T.unref(a).is("icon-arrow-down")])},{default:T.withCtx(()=>[T.createVNode(T.unref(s3))]),_:1},8,["class"]),[[T.vShow,zt.modelValue||J.value]]),T.withDirectives(T.createVNode(T.unref(_i),{class:T.normalizeClass([T.unref(a).be("picker","empty"),T.unref(a).is("icon-close")])},{default:T.withCtx(()=>[T.createVNode(T.unref(gl))]),_:1},8,["class"]),[[T.vShow,!zt.modelValue&&!J.value]])],6)],2)],2)],42,LW)]),_:1},8,["visible","popper-class","transition"]))}});var MW=Or(EW,[["__file","color-picker.vue"]]);const AW=Ji(MW),SW=T.defineComponent({name:"ElContainer"}),CW=T.defineComponent({...SW,props:{direction:{type:String}},setup(e){const t=e,r=T.useSlots(),n=Hr("container"),i=T.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const s=o.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(a,o)=>(T.openBlock(),T.createElementBlock("section",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("vertical",T.unref(i))])},[T.renderSlot(a.$slots,"default")],2))}});var HW=Or(CW,[["__file","container.vue"]]);const OW=T.defineComponent({name:"ElAside"}),VW=T.defineComponent({...OW,props:{width:{type:String,default:null}},setup(e){const t=e,r=Hr("aside"),n=T.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("aside",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Hw=Or(VW,[["__file","aside.vue"]]);const IW=T.defineComponent({name:"ElFooter"}),DW=T.defineComponent({...IW,props:{height:{type:String,default:null}},setup(e){const t=e,r=Hr("footer"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("footer",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Ow=Or(DW,[["__file","footer.vue"]]);const PW=T.defineComponent({name:"ElHeader"}),kW=T.defineComponent({...PW,props:{height:{type:String,default:null}},setup(e){const t=e,r=Hr("header"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,a)=>(T.openBlock(),T.createElementBlock("header",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var Vw=Or(kW,[["__file","header.vue"]]);const RW=T.defineComponent({name:"ElMain"}),BW=T.defineComponent({...RW,setup(e){const t=Hr("main");return(r,n)=>(T.openBlock(),T.createElementBlock("main",{class:T.normalizeClass(T.unref(t).b())},[T.renderSlot(r.$slots,"default")],2))}});var Iw=Or(BW,[["__file","main.vue"]]);const NW=Ji(HW,{Aside:Hw,Footer:Ow,Header:Vw,Main:Iw});Ea(Hw),Ea(Ow),Ea(Vw);const Dw=Ea(Iw),FW=T.defineComponent({inheritAttrs:!1});function jW(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default")}var zW=Or(FW,[["render",jW],["__file","collection.vue"]]);const $W=T.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function UW(e,t,r,n,i,a){return T.renderSlot(e.$slots,"default")}var GW=Or($W,[["render",UW],["__file","collection-item.vue"]]);const ZW="data-el-collection-item",WW=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),a={...zW,name:t,setup(){const s=T.ref(null),h=new Map,d=()=>{const Q=T.unref(s);if(!Q)return[];const p=Array.from(Q.querySelectorAll(`[${ZW}]`));return[...h.values()].sort((_,x)=>p.indexOf(_.ref)-p.indexOf(x.ref))};T.provide(n,{itemMap:h,getItems:d,collectionRef:s})}},o={...GW,name:r,setup(s,{attrs:h}){const d=T.ref(null),Q=T.inject(n,void 0);T.provide(i,{collectionItemRef:d}),T.onMounted(()=>{const p=T.unref(d);p&&Q.itemMap.set(p,{ref:p,...h})}),T.onBeforeUnmount(()=>{const p=T.unref(d);Q.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:a,ElCollectionItem:o}},KQ=pn({trigger:Al.trigger,effect:{...H2.effect,default:"light"},type:{type:Ar(String)},placement:{type:Ar(String),default:"bottom"},popperOptions:{type:Ar(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Ar([Number,String]),default:0},maxHeight:{type:Ar([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Ar(Object)},teleported:H2.teleported});pn({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:l3}}),pn({onKeydown:{type:Ar(Function)}}),WW("Dropdown");const Pw=Symbol("ElSelectGroup"),wu=Symbol("ElSelect");function qW(e,t){const r=T.inject(wu),n=T.inject(Pw,{disabled:!1}),i=T.computed(()=>r.props.multiple?Q(r.props.modelValue,e.value):Q([r.props.modelValue],e.value)),a=T.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),o=T.computed(()=>e.label||(yi(e.value)?"":e.value)),s=T.computed(()=>e.value||e.label||""),h=T.computed(()=>e.disabled||t.groupDisabled||a.value),d=T.getCurrentInstance(),Q=(_=[],x)=>{if(yi(e.value)){const b=r.props.valueKey;return _&&_.some(M=>T.toRaw(is(M,b))===is(x,b))}else return _&&_.includes(x)},p=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(d.proxy))},m=_=>{const x=new RegExp(dz(_),"i");t.visible=x.test(o.value)||e.created};return T.watch(()=>o.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),T.watch(()=>e.value,(_,x)=>{const{remote:b,valueKey:M}=r.props;if(Tl(_,x)||(r.onOptionDestroy(x,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!b){if(M&&yi(_)&&yi(x)&&_[M]===x[M])return;r.setSelected()}}),T.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:o,currentValue:s,itemSelected:i,isDisabled:h,hoverItem:p,updateOption:m}}const XW=T.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Hr("select"),r=El(),n=T.computed(()=>[t.be("dropdown","item"),t.is("disabled",T.unref(s)),t.is("selected",T.unref(o)),t.is("hovering",T.unref(m))]),i=T.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:o,isDisabled:s,select:h,hoverItem:d,updateOption:Q}=qW(e,i),{visible:p,hover:m}=T.toRefs(i),_=T.getCurrentInstance().proxy;h.onOptionCreate(_),T.onBeforeUnmount(()=>{const b=_.value,{selected:M}=h.states,O=(h.props.multiple?M:[M]).some(V=>V.value===_.value);T.nextTick(()=>{h.states.cachedOptions.get(b)===_&&!O&&h.states.cachedOptions.delete(b)}),h.onOptionDestroy(b,_)});function x(){e.disabled!==!0&&i.groupDisabled!==!0&&h.handleOptionSelect(_)}return{ns:t,id:r,containerKls:n,currentLabel:a,itemSelected:o,isDisabled:s,select:h,hoverItem:d,updateOption:Q,visible:p,hover:m,selectOptionClick:x,states:i}}}),KW=["id","aria-disabled","aria-selected"];function YW(e,t,r,n,i,a){return T.withDirectives((T.openBlock(),T.createElementBlock("li",{id:e.id,class:T.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...o)=>e.hoverItem&&e.hoverItem(...o)),onClick:t[1]||(t[1]=T.withModifiers((...o)=>e.selectOptionClick&&e.selectOptionClick(...o),["stop"]))},[T.renderSlot(e.$slots,"default",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.currentLabel),1)])],42,KW)),[[T.vShow,e.visible]])}var YQ=Or(XW,[["render",YW],["__file","option.vue"]]);const JW=T.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=T.inject(wu),t=Hr("select"),r=T.computed(()=>e.props.popperClass),n=T.computed(()=>e.props.multiple),i=T.computed(()=>e.props.fitInputWidth),a=T.ref("");function o(){var s;a.value=`${(s=e.selectRef)==null?void 0:s.offsetWidth}px`}return T.onMounted(()=>{o(),es(e.selectRef,o)}),{ns:t,minWidth:a,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function tq(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:T.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.renderSlot(e.$slots,"default"),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.ns.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)],6)}var eq=Or(JW,[["render",tq],["__file","select-dropdown.vue"]]);function rq(e){const t=T.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:a=>{const o=a.target.value,s=o[o.length-1]||"";t.value=!Jb(s)},handleCompositionEnd:a=>{t.value&&(t.value=!1,ia(e)&&e(a))}}}const nq=11,iq=(e,t)=>{const{t:r}=su(),n=El(),i=Hr("select"),a=Hr("input"),o=T.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});tL({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},T.computed(()=>e.suffixTransition===!1));const s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.ref(null),p=T.ref(null),m=T.ref(null),_=T.ref(null),x=T.ref(null),b=T.ref(null),M=T.ref(null),E=T.ref(null),O=T.ref(null),{wrapperRef:V,isFocused:k,handleFocus:j,handleBlur:U}=HQ(p,{afterFocus(){e.automaticDropdown&&!$.value&&($.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(Ot){var Kt,Ve;return((Kt=d.value)==null?void 0:Kt.isFocusInsideContent(Ot))||((Ve=Q.value)==null?void 0:Ve.isFocusInsideContent(Ot))},afterBlur(){$.value=!1,o.menuVisibleOnFocus=!1}}),$=T.ref(!1),J=T.ref(),{form:tt,formItem:rt}=d3(),{inputId:st}=l5(e,{formItemContext:rt}),pt=T.computed(()=>e.disabled||(tt==null?void 0:tt.disabled)),Ct=T.computed(()=>e.multiple?Ii(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),Ut=T.computed(()=>e.clearable&&!pt.value&&o.inputHovering&&Ct.value),ae=T.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),ge=T.computed(()=>i.is("reverse",ae.value&&$.value&&e.suffixTransition)),Ft=T.computed(()=>(rt==null?void 0:rt.validateState)||""),de=T.computed(()=>Kb[Ft.value]),cr=T.computed(()=>e.remote?300:0),Wt=T.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!o.inputValue&&o.options.size===0?!1:e.filterable&&o.inputValue&&o.options.size>0&&ce.value===0?e.noMatchText||r("el.select.noMatch"):o.options.size===0?e.noDataText||r("el.select.noData"):null),ce=T.computed(()=>pe.value.filter(Ot=>Ot.visible).length),pe=T.computed(()=>{const Ot=Array.from(o.options.values()),Kt=[];return o.optionValues.forEach(Ve=>{const Ue=Ot.findIndex(Qr=>Qr.value===Ve);Ue>-1&&Kt.push(Ot[Ue])}),Kt.length>=Ot.length?Kt:Ot}),be=T.computed(()=>Array.from(o.cachedOptions.values())),Fe=T.computed(()=>{const Ot=pe.value.filter(Kt=>!Kt.created).some(Kt=>Kt.currentLabel===o.inputValue);return e.filterable&&e.allowCreate&&o.inputValue!==""&&!Ot}),$e=()=>{e.filterable&&ia(e.filterMethod)||e.filterable&&e.remote&&ia(e.remoteMethod)||pe.value.forEach(Ot=>{Ot.updateOption(o.inputValue)})},je=h3(),Bt=T.computed(()=>["small"].includes(je.value)?"small":"default"),Zt=T.computed({get(){return $.value&&Wt.value!==!1},set(Ot){$.value=Ot}}),he=T.computed(()=>Ii(e.modelValue)?e.modelValue.length===0&&!o.inputValue:e.filterable?!o.inputValue:!0),zt=T.computed(()=>{var Ot;const Kt=(Ot=e.placeholder)!=null?Ot:r("el.select.placeholder");return e.multiple||!Ct.value?Kt:o.selectedLabel});T.watch(()=>e.modelValue,(Ot,Kt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(o.inputValue="",fe("")),Se(),!Tl(Ot,Kt)&&e.validateEvent&&(rt==null||rt.validate("change").catch(Ve=>Y1(Ve)))},{flush:"post",deep:!0}),T.watch(()=>$.value,Ot=>{Ot?fe(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),t("visible-change",Ot)}),T.watch(()=>o.options.entries(),()=>{var Ot;if(!q1)return;const Kt=((Ot=s.value)==null?void 0:Ot.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Ql(e.modelValue)||!Array.from(Kt).includes(document.activeElement))&&Se(),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value&&Re()},{flush:"post"}),T.watch(()=>o.hoveringIndex,Ot=>{K1(Ot)&&Ot>-1?J.value=pe.value[Ot]||{}:J.value={},pe.value.forEach(Kt=>{Kt.hover=J.value===Kt})}),T.watchEffect(()=>{o.isBeforeHide||$e()});const fe=Ot=>{o.previousQuery!==Ot&&(o.previousQuery=Ot,e.filterable&&ia(e.filterMethod)?e.filterMethod(Ot):e.filterable&&e.remote&&ia(e.remoteMethod)&&e.remoteMethod(Ot),e.defaultFirstOption&&(e.filterable||e.remote)&&ce.value?T.nextTick(Re):T.nextTick(De))},Re=()=>{const Ot=pe.value.filter(Ue=>Ue.visible&&!Ue.disabled&&!Ue.states.groupDisabled),Kt=Ot.find(Ue=>Ue.created),Ve=Ot[0];o.hoveringIndex=u1(pe.value,Kt||Ve)},Se=()=>{if(e.multiple)o.selectedLabel="";else{const Kt=He(e.modelValue);o.selectedLabel=Kt.currentLabel,o.selected=Kt;return}const Ot=[];Ii(e.modelValue)&&e.modelValue.forEach(Kt=>{Ot.push(He(Kt))}),o.selected=Ot},He=Ot=>{let Kt;const Ve=JT(Ot).toLowerCase()==="object",Ue=JT(Ot).toLowerCase()==="null",Qr=JT(Ot).toLowerCase()==="undefined";for(let en=o.cachedOptions.size-1;en>=0;en--){const Ge=be.value[en];if(Ve?is(Ge.value,e.valueKey)===is(Ot,e.valueKey):Ge.value===Ot){Kt={value:Ot,currentLabel:Ge.currentLabel,isDisabled:Ge.isDisabled};break}}if(Kt)return Kt;const Cr=Ve?Ot.label:!Ue&&!Qr?Ot:"";return{value:Ot,currentLabel:Cr}},De=()=>{e.multiple?o.selected.length>0?o.hoveringIndex=Math.min(...o.selected.map(Ot=>pe.value.findIndex(Kt=>mt(Kt)===mt(Ot)))):o.hoveringIndex=-1:o.hoveringIndex=pe.value.findIndex(Ot=>mt(Ot)===mt(o.selected))},ze=()=>{o.selectionWidth=h.value.getBoundingClientRect().width},$t=()=>{o.calculatorWidth=m.value.getBoundingClientRect().width},Dr=()=>{o.collapseItemWidth=E.value.getBoundingClientRect().width},mn=()=>{var Ot,Kt;(Kt=(Ot=d.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},Ke=()=>{var Ot,Kt;(Kt=(Ot=Q.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},_r=()=>{o.inputValue.length>0&&!$.value&&($.value=!0),fe(o.inputValue)},jn=Ot=>{if(o.inputValue=Ot.target.value,e.remote)O1();else return _r()},O1=jb(()=>{_r()},cr.value),wn=Ot=>{Tl(e.modelValue,Ot)||t(ou,Ot)},me=Ot=>az(Ot,Kt=>!o.disabledOptions.has(Kt)),ur=Ot=>{if(e.multiple&&Ot.code!==t2.delete&&Ot.target.value.length<=0){const Kt=e.modelValue.slice(),Ve=me(Kt);if(Ve<0)return;Kt.splice(Ve,1),t(C1,Kt),wn(Kt)}},Jr=(Ot,Kt)=>{const Ve=o.selected.indexOf(Kt);if(Ve>-1&&!pt.value){const Ue=e.modelValue.slice();Ue.splice(Ve,1),t(C1,Ue),wn(Ue),t("remove-tag",Kt.value)}Ot.stopPropagation(),or()},En=Ot=>{Ot.stopPropagation();const Kt=e.multiple?[]:"";if(!X1(Kt))for(const Ve of o.selected)Ve.isDisabled&&Kt.push(Ve.value);t(C1,Kt),wn(Kt),o.hoveringIndex=-1,$.value=!1,t("clear"),or()},Te=Ot=>{if(e.multiple){const Kt=(e.modelValue||[]).slice(),Ve=u1(Kt,Ot.value);Ve>-1?Kt.splice(Ve,1):(e.multipleLimit<=0||Kt.length<e.multipleLimit)&&Kt.push(Ot.value),t(C1,Kt),wn(Kt),Ot.created&&fe(""),e.filterable&&!e.reserveKeyword&&(o.inputValue="")}else t(C1,Ot.value),wn(Ot.value),$.value=!1;or(),!$.value&&T.nextTick(()=>{gn(Ot)})},u1=(Ot=[],Kt)=>{if(!yi(Kt))return Ot.indexOf(Kt);const Ve=e.valueKey;let Ue=-1;return Ot.some((Qr,Cr)=>T.toRaw(is(Qr,Ve))===is(Kt,Ve)?(Ue=Cr,!0):!1),Ue},gn=Ot=>{var Kt,Ve,Ue,Qr,Cr;const Zr=Ii(Ot)?Ot[0]:Ot;let en=null;if(Zr!=null&&Zr.value){const Ge=pe.value.filter(Ur=>Ur.value===Zr.value);Ge.length>0&&(en=Ge[0].$el)}if(d.value&&en){const Ge=(Qr=(Ue=(Ve=(Kt=d.value)==null?void 0:Kt.popperRef)==null?void 0:Ve.contentRef)==null?void 0:Ue.querySelector)==null?void 0:Qr.call(Ue,`.${i.be("dropdown","wrap")}`);Ge&&Qz(Ge,en)}(Cr=O.value)==null||Cr.handleScroll()},hi=Ot=>{o.options.set(Ot.value,Ot),o.cachedOptions.set(Ot.value,Ot),Ot.disabled&&o.disabledOptions.set(Ot.value,Ot)},zn=(Ot,Kt)=>{o.options.get(Ot)===Kt&&o.options.delete(Ot)},{handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr}=rq(Ot=>jn(Ot)),Mn=T.computed(()=>{var Ot,Kt;return(Kt=(Ot=d.value)==null?void 0:Ot.popperRef)==null?void 0:Kt.contentRef}),p1=()=>{T.nextTick(()=>gn(o.selected))},or=()=>{var Ot;(Ot=p.value)==null||Ot.focus()},Fi=()=>{yt()},dn=Ot=>{En(Ot)},yt=Ot=>{if($.value=!1,k.value){const Kt=new FocusEvent("focus",Ot);T.nextTick(()=>U(Kt))}},it=()=>{o.inputValue.length>0?o.inputValue="":$.value=!1},ot=()=>{pt.value||(o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:$.value=!$.value)},dt=()=>{$.value?pe.value[o.hoveringIndex]&&Te(pe.value[o.hoveringIndex]):ot()},mt=Ot=>yi(Ot.value)?is(Ot.value,e.valueKey):Ot.value,At=T.computed(()=>pe.value.filter(Ot=>Ot.visible).every(Ot=>Ot.disabled)),Ht=T.computed(()=>e.multiple?e.collapseTags?o.selected.slice(0,e.maxCollapseTags):o.selected:[]),It=T.computed(()=>e.multiple?e.collapseTags?o.selected.slice(e.maxCollapseTags):[]:[]),Et=Ot=>{if(!$.value){$.value=!0;return}if(!(o.options.size===0||ce.value===0)&&!At.value){Ot==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):Ot==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const Kt=pe.value[o.hoveringIndex];(Kt.disabled===!0||Kt.states.groupDisabled===!0||!Kt.visible)&&Et(Ot),T.nextTick(()=>gn(J.value))}},kt=()=>{if(!h.value)return 0;const Ot=window.getComputedStyle(h.value);return Number.parseFloat(Ot.gap||"6px")},ie=T.computed(()=>{const Ot=kt();return{maxWidth:`${E.value&&e.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-Ot:o.selectionWidth}px`}}),Xt=T.computed(()=>({maxWidth:`${o.selectionWidth}px`})),te=T.computed(()=>({width:`${Math.max(o.calculatorWidth,nq)}px`}));return e.multiple&&!Ii(e.modelValue)&&t(C1,[]),!e.multiple&&Ii(e.modelValue)&&t(C1,""),es(h,ze),es(m,$t),es(b,mn),es(V,mn),es(M,Ke),es(E,Dr),T.onMounted(()=>{Se()}),{inputId:st,contentId:n,nsSelect:i,nsInput:a,states:o,isFocused:k,expanded:$,optionsArray:pe,hoverOption:J,selectSize:je,filteredOptionsCount:ce,resetCalculatorWidth:$t,updateTooltip:mn,updateTagTooltip:Ke,debouncedOnInputChange:O1,onInput:jn,deletePrevTag:ur,deleteTag:Jr,deleteSelected:En,handleOptionSelect:Te,scrollToOption:gn,hasModelValue:Ct,shouldShowPlaceholder:he,currentPlaceholder:zt,showClose:Ut,iconComponent:ae,iconReverse:ge,validateState:Ft,validateIcon:de,showNewOption:Fe,updateOptions:$e,collapseTagSize:Bt,setSelected:Se,selectDisabled:pt,emptyText:Wt,handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr,onOptionCreate:hi,onOptionDestroy:zn,handleMenuEnter:p1,handleFocus:j,focus:or,blur:Fi,handleBlur:U,handleClearClick:dn,handleClickOutside:yt,handleEsc:it,toggleMenu:ot,selectOption:dt,getValueKey:mt,navigateOptions:Et,dropdownMenuVisible:Zt,showTagList:Ht,collapseTagList:It,tagStyle:ie,collapseTagStyle:Xt,inputStyle:te,popperRef:Mn,inputRef:p,tooltipRef:d,tagTooltipRef:Q,calculatorRef:m,prefixRef:_,suffixRef:x,selectRef:s,wrapperRef:V,selectionRef:h,scrollbarRef:O,menuRef:b,tagMenuRef:M,collapseItemRef:E}};var aq=T.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=T.inject(wu);let n=[];return()=>{var i,a;const o=(i=t.default)==null?void 0:i.call(t),s=[];function h(d){Ii(d)&&d.forEach(Q=>{var p,m,_,x;const b=(p=(Q==null?void 0:Q.type)||{})==null?void 0:p.name;b==="ElOptionGroup"?h(!X1(Q.children)&&!Ii(Q.children)&&ia((m=Q.children)==null?void 0:m.default)?(_=Q.children)==null?void 0:_.default():Q.children):b==="ElOption"?s.push((x=Q.props)==null?void 0:x.value):Ii(Q.children)&&h(Q.children)})}return o.length&&h((a=o[0])==null?void 0:a.children),Tl(s,n)||(n=s,r&&(r.states.optionValues=s)),o}}});const oq=pn({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:u3,effect:{type:Ar(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ar(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:H2.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:l3,default:gQ},fitInputWidth:Boolean,suffixIcon:{type:l3,default:s3},tagType:{...Lw.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:Ar(String),values:cu,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),kw="ElSelect",sq=T.defineComponent({name:kw,componentName:kw,components:{ElInput:Qu,ElSelectMenu:eq,ElOption:YQ,ElOptions:aq,ElTag:zZ,ElScrollbar:PU,ElTooltip:jQ,ElIcon:_i},directives:{ClickOutside:uw},props:oq,emits:[C1,ou,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=iq(e,t);return T.provide(wu,T.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),lq=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],cq=["textContent"];function uq(e,t,r,n,i,a){const o=T.resolveComponent("el-tag"),s=T.resolveComponent("el-tooltip"),h=T.resolveComponent("el-icon"),d=T.resolveComponent("el-option"),Q=T.resolveComponent("el-options"),p=T.resolveComponent("el-scrollbar"),m=T.resolveComponent("el-select-menu"),_=T.resolveDirective("click-outside");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"selectRef",class:T.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=x=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=x=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=T.withModifiers((...x)=>e.toggleMenu&&e.toggleMenu(...x),["stop"]))},[T.createVNode(s,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=x=>e.states.isBeforeHide=!1)},{default:T.withCtx(()=>{var x;return[T.createElementVNode("div",{ref:"wrapperRef",class:T.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(T.openBlock(),T.createElementBlock("div",{key:0,ref:"prefixRef",class:T.normalizeClass(e.nsSelect.e("prefix"))},[T.renderSlot(e.$slots,"prefix")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref:"selectionRef",class:T.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?T.renderSlot(e.$slots,"tag",{key:0},()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.showTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.tagStyle),onClose:M=>e.deleteTag(M,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(T.openBlock(),T.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:T.withCtx(()=>[T.createElementVNode("div",{ref:"collapseItemRef",class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.collapseTagStyle)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))}," + "+T.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:T.withCtx(()=>[T.createElementVNode("div",{ref:"tagMenuRef",class:T.normalizeClass(e.nsSelect.e("selection"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.collapseTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(o,{class:"in-tooltip",closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:M=>e.deleteTag(M,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):T.createCommentVNode("v-if",!0)]):T.createCommentVNode("v-if",!0),e.selectDisabled?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[T.withDirectives(T.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=b=>e.states.inputValue=b),type:"text",class:T.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:T.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((x=e.hoverOption)==null?void 0:x.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...b)=>e.handleFocus&&e.handleFocus(...b)),onBlur:t[2]||(t[2]=(...b)=>e.handleBlur&&e.handleBlur(...b)),onKeydown:[t[3]||(t[3]=T.withKeys(T.withModifiers(b=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=T.withKeys(T.withModifiers(b=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=T.withKeys(T.withModifiers((...b)=>e.handleEsc&&e.handleEsc(...b),["stop","prevent"]),["esc"])),t[6]||(t[6]=T.withKeys(T.withModifiers((...b)=>e.selectOption&&e.selectOption(...b),["stop","prevent"]),["enter"])),t[7]||(t[7]=T.withKeys(T.withModifiers((...b)=>e.deletePrevTag&&e.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...b)=>e.handleCompositionStart&&e.handleCompositionStart(...b)),onCompositionupdate:t[9]||(t[9]=(...b)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...b)),onCompositionend:t[10]||(t[10]=(...b)=>e.handleCompositionEnd&&e.handleCompositionEnd(...b)),onInput:t[11]||(t[11]=(...b)=>e.onInput&&e.onInput(...b)),onClick:t[12]||(t[12]=T.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["stop"]))},null,46,lq),[[T.vModelText,e.states.inputValue]]),e.filterable?(T.openBlock(),T.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:T.normalizeClass(e.nsSelect.e("input-calculator")),textContent:T.toDisplayString(e.states.inputValue)},null,10,cq)):T.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[T.createElementVNode("span",null,T.toDisplayString(e.currentPlaceholder),1)],2)):T.createCommentVNode("v-if",!0)],2),T.createElementVNode("div",{ref:"suffixRef",class:T.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(T.openBlock(),T.createBlock(h,{key:0,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(T.openBlock(),T.createBlock(h,{key:1,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(T.openBlock(),T.createBlock(h,{key:2,class:T.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)]}),content:T.withCtx(()=>[T.createVNode(m,{ref:"menuRef"},{default:T.withCtx(()=>[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.nsSelect.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createVNode(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:T.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:T.withCtx(()=>[e.showNewOption?(T.openBlock(),T.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):T.createCommentVNode("v-if",!0),T.createVNode(Q,null,{default:T.withCtx(()=>[T.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[T.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.nsSelect.be("dropdown","loading"))},[T.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass(e.nsSelect.be("dropdown","empty"))},[T.renderSlot(e.$slots,"empty",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.emptyText),1)])],2)):T.createCommentVNode("v-if",!0),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:3,class:T.normalizeClass(e.nsSelect.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,e.handleClickOutside,e.popperRef]])}var hq=Or(sq,[["render",uq],["__file","select.vue"]]);const dq=T.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Hr("select"),r=T.ref(null),n=T.getCurrentInstance(),i=T.ref([]);T.provide(Pw,T.reactive({...T.toRefs(e)}));const a=T.computed(()=>i.value.some(h=>h.visible===!0)),o=h=>{const d=[];return Ii(h.children)&&h.children.forEach(Q=>{var p,m;Q.type&&Q.type.name==="ElOption"&&Q.component&&Q.component.proxy?d.push(Q.component.proxy):(p=Q.children)!=null&&p.length?d.push(...o(Q)):(m=Q.component)!=null&&m.subTree&&d.push(...o(Q.component.subTree))}),d},s=()=>{i.value=o(n.subTree)};return T.onMounted(()=>{s()}),eB(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:a,ns:t}}});function fq(e,t,r,n,i,a){return T.withDirectives((T.openBlock(),T.createElementBlock("ul",{ref:"groupRef",class:T.normalizeClass(e.ns.be("group","wrap"))},[T.createElementVNode("li",{class:T.normalizeClass(e.ns.be("group","title"))},T.toDisplayString(e.label),3),T.createElementVNode("li",null,[T.createElementVNode("ul",{class:T.normalizeClass(e.ns.b("group"))},[T.renderSlot(e.$slots,"default")],2)])],2)),[[T.vShow,e.visible]])}var Rw=Or(dq,[["render",fq],["__file","option-group.vue"]]);const T5=Ji(hq,{Option:YQ,OptionGroup:Rw}),Eu=Ea(YQ);Ea(Rw);const Tq=pn({trigger:Al.trigger,placement:KQ.placement,disabled:Al.disabled,visible:H2.visible,transition:H2.transition,popperOptions:KQ.popperOptions,tabindex:KQ.tabindex,content:H2.content,popperStyle:H2.popperStyle,popperClass:H2.popperClass,enterable:{...H2.enterable,default:!0},effect:{...H2.effect,default:"light"},teleported:H2.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Qq={"update:visible":e=>o3(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},pq="onUpdate:visible",mq=T.defineComponent({name:"ElPopover"}),gq=T.defineComponent({...mq,props:Tq,emits:Qq,setup(e,{expose:t,emit:r}){const n=e,i=T.computed(()=>n[pq]),a=Hr("popover"),o=T.ref(),s=T.computed(()=>{var M;return(M=T.unref(o))==null?void 0:M.popperRef}),h=T.computed(()=>[{width:J6(n.width)},n.popperStyle]),d=T.computed(()=>[a.b(),n.popperClass,{[a.m("plain")]:!!n.content}]),Q=T.computed(()=>n.transition===`${a.namespace.value}-fade-in-linear`),p=()=>{var M;(M=o.value)==null||M.hide()},m=()=>{r("before-enter")},_=()=>{r("before-leave")},x=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:p}),(M,E)=>(T.openBlock(),T.createBlock(T.unref(jQ),T.mergeProps({ref_key:"tooltipRef",ref:o},M.$attrs,{trigger:M.trigger,placement:M.placement,disabled:M.disabled,visible:M.visible,transition:M.transition,"popper-options":M.popperOptions,tabindex:M.tabindex,content:M.content,offset:M.offset,"show-after":M.showAfter,"hide-after":M.hideAfter,"auto-close":M.autoClose,"show-arrow":M.showArrow,"aria-label":M.title,effect:M.effect,enterable:M.enterable,"popper-class":T.unref(d),"popper-style":T.unref(h),teleported:M.teleported,persistent:M.persistent,"gpu-acceleration":T.unref(Q),"onUpdate:visible":T.unref(i),onBeforeShow:m,onBeforeHide:_,onShow:x,onHide:b}),{content:T.withCtx(()=>[M.title?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(a).e("title")),role:"title"},T.toDisplayString(M.title),3)):T.createCommentVNode("v-if",!0),T.renderSlot(M.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(M.content),1)])]),default:T.withCtx(()=>[M.$slots.reference?T.renderSlot(M.$slots,"reference",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var yq=Or(gq,[["__file","popover.vue"]]);const Bw=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var _q={mounted(e,t){Bw(e,t)},updated(e,t){Bw(e,t)}};const Nw=Pz(_q,"popover"),Mu=Ji(yq,{directive:Nw}),Q5="$treeNodeId",Fw=function(e,t){!t||t[Q5]||Object.defineProperty(t,Q5,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},JQ=function(e,t){return e?t[e]:t[Q5]},tp=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},ep=e=>{let t=!0,r=!0,n=!0;for(let i=0,a=e.length;i<a;i++){const o=e[i];(o.checked!==!0||o.indeterminate)&&(t=!1,o.disabled||(n=!1)),(o.checked!==!1||o.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},Au=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=ep(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||Au(i)},Su=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const a=n[t];return a===void 0?"":a}};let vq=0,rp=class ZT{constructor(t){this.id=vq++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)b4(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const a=Su(this,"isLeaf");typeof a=="boolean"&&(this.isLeafByUser=a)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||Fw(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||Fw(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=Su(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return Su(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Su(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof ZT)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=T.reactive(new ZT(t)),t instanceof ZT&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Au(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:o,allWithoutDisable:s}=ep(this.childNodes);!this.isLeaf&&!o&&s&&(this.checked=!1,t=!1);const h=()=>{if(r){const d=this.childNodes;for(let m=0,_=d.length;m<_;m++){const x=d[m];i=i||t!==!1;const b=x.disabled?x.checked:i;x.setChecked(b,r,!0,i)}const{half:Q,all:p}=ep(d);p||(this.checked=p,this.indeterminate=Q)}};if(this.shouldLoadData()){this.loadData(()=>{h(),Au(this)},{checked:t!==!1});return}else h()}const a=this.parent;!a||a.level===0||n||Au(a)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(a=>a.data),n={},i=[];t.forEach((a,o)=>{const s=a[Q5];!!s&&r.findIndex(d=>d[Q5]===s)>=0?n[s]={index:o,data:a}:i.push({index:o,data:a})}),this.store.lazy||r.forEach(a=>{n[a[Q5]]||this.removeChildByData(a)}),i.forEach(({index:a,data:o})=>{this.insertChild({data:o},a)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}};class xq{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)b4(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new rp({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(a){const o=a.root?a.root.childNodes:a.childNodes;if(o.forEach(s=>{s.visible=r.call(s,t,s.data,s),i(s)}),!a.visible&&o.length){let s=!0;s=!o.some(h=>h.visible),a.root?a.root.visible=s===!1:a.visible=s===!1}t&&a.visible&&!a.isLeaf&&(!n||a.loaded)&&a.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof rp)return t;const r=yi(t)?JQ(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(a){(a.root?a.root.childNodes:a.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&t.push(a.data),r(a)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)b4(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let a=i.length-1;a>=0;a--){const o=i[a];this.remove(o.data)}for(let a=0,o=r.length;a<o;a++){const s=r[a];this.append(s,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((h,d)=>h.level-d.level),a=Object.create(null),o=Object.keys(n);i.forEach(h=>h.setChecked(!1,!1));const s=h=>{h.childNodes.forEach(d=>{var Q;a[d.data[t]]=!0,(Q=d.childNodes)!=null&&Q.length&&s(d)})};for(let h=0,d=i.length;h<d;h++){const Q=i[h],p=Q.data[t].toString();if(!o.includes(p)){Q.checked&&!a[p]&&Q.setChecked(!1,!1);continue}if(Q.childNodes.length&&s(Q),Q.isLeaf||this.checkStrictly){Q.setChecked(!0,!1);continue}if(Q.setChecked(!0,!0),r){Q.setChecked(!1,!1);const _=function(x){x.childNodes.forEach(M=>{M.isLeaf||M.setChecked(!1,!1),_(M)})};_(Q)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(a=>{i[(a||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(a=>{i[a]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const bq=T.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=Hr("tree"),r=T.inject("NodeInstance"),n=T.inject("RootTree");return()=>{const i=e.node,{data:a,store:o}=i;return e.renderContent?e.renderContent(T.h,{_self:r,node:i,data:a,store:o}):T.renderSlot(n.ctx.slots,"default",{node:i,data:a},()=>[T.h("span",{class:t.be("node","label")},[i.label])])}}});var Lq=Or(bq,[["__file","tree-node-content.vue"]]);function jw(e){const t=T.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),T.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const zw=Symbol("dragEvents");function wq({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const a=Hr("tree"),o=T.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:Q,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return Q.preventDefault(),!1;Q.dataTransfer.effectAllowed="move";try{Q.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=p,t.emit("node-drag-start",p.node,Q)},h=({event:Q,treeNode:p})=>{const m=p,_=o.value.dropNode;_&&_.node.id!==m.node.id&&A4(_.$el,a.is("drop-inner"));const x=o.value.draggingNode;if(!x||!m)return;let b=!0,M=!0,E=!0,O=!0;typeof e.allowDrop=="function"&&(b=e.allowDrop(x.node,m.node,"prev"),O=M=e.allowDrop(x.node,m.node,"inner"),E=e.allowDrop(x.node,m.node,"next")),Q.dataTransfer.dropEffect=M||b||E?"move":"none",(b||M||E)&&(_==null?void 0:_.node.id)!==m.node.id&&(_&&t.emit("node-drag-leave",x.node,_.node,Q),t.emit("node-drag-enter",x.node,m.node,Q)),b||M||E?o.value.dropNode=m:o.value.dropNode=null,m.node.nextSibling===x.node&&(E=!1),m.node.previousSibling===x.node&&(b=!1),m.node.contains(x.node,!1)&&(M=!1),(x.node===m.node||x.node.contains(m.node))&&(b=!1,M=!1,E=!1);const V=m.$el.querySelector(`.${a.be("node","content")}`).getBoundingClientRect(),k=r.value.getBoundingClientRect();let j;const U=b?M?.25:E?.45:1:-1,$=E?M?.75:b?.55:0:1;let J=-9999;const tt=Q.clientY-V.top;tt<V.height*U?j="before":tt>V.height*$?j="after":M?j="inner":j="none";const rt=m.$el.querySelector(`.${a.be("node","expand-icon")}`).getBoundingClientRect(),st=n.value;j==="before"?J=rt.top-k.top:j==="after"&&(J=rt.bottom-k.top),st.style.top=`${J}px`,st.style.left=`${rt.right-k.left}px`,j==="inner"?mQ(m.$el,a.is("drop-inner")):A4(m.$el,a.is("drop-inner")),o.value.showDropIndicator=j==="before"||j==="after",o.value.allowDrop=o.value.showDropIndicator||O,o.value.dropType=j,t.emit("node-drag-over",x.node,m.node,Q)},d=Q=>{const{draggingNode:p,dropType:m,dropNode:_}=o.value;if(Q.preventDefault(),Q.dataTransfer.dropEffect="move",p&&_){const x={data:p.node.data};m!=="none"&&p.node.remove(),m==="before"?_.node.parent.insertBefore(x,_.node):m==="after"?_.node.parent.insertAfter(x,_.node):m==="inner"&&_.node.insertChild(x),m!=="none"&&i.value.registerNode(x),A4(_.$el,a.is("drop-inner")),t.emit("node-drag-end",p.node,_.node,m,Q),m!=="none"&&t.emit("node-drop",p.node,_.node,m,Q)}p&&!_&&t.emit("node-drag-end",p.node,null,m,Q),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0};return T.provide(zw,{treeNodeDragStart:s,treeNodeDragOver:h,treeNodeDragEnd:d}),{dragState:o}}const Eq=T.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:tW,ElCheckbox:xu,NodeContent:Lq,ElIcon:_i,Loading:yQ},props:{node:{type:rp,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=Hr("tree"),{broadcastExpanded:n}=jw(e),i=T.inject("RootTree"),a=T.ref(!1),o=T.ref(!1),s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.inject(zw),p=T.getCurrentInstance();T.provide("NodeInstance",p),i||Y1("Tree","Can not find node's tree."),e.node.expanded&&(a.value=!0,o.value=!0);const m=i.props.props.children||"children";T.watch(()=>{const tt=e.node.data[m];return tt&&[...tt]},()=>{e.node.updateChildren()}),T.watch(()=>e.node.indeterminate,tt=>{b(e.node.checked,tt)}),T.watch(()=>e.node.checked,tt=>{b(tt,e.node.indeterminate)}),T.watch(()=>e.node.expanded,tt=>{T.nextTick(()=>a.value=tt),tt&&(o.value=!0)});const _=tt=>JQ(i.props.nodeKey,tt.data),x=tt=>{const rt=e.props.class;if(!rt)return{};let st;if(ia(rt)){const{data:pt}=tt;st=rt(pt,tt)}else st=rt;return X1(st)?{[st]:!0}:st},b=(tt,rt)=>{(s.value!==tt||h.value!==rt)&&i.ctx.emit("check-change",e.node.data,tt,rt),s.value=tt,h.value=rt},M=tt=>{tp(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&O(),i.props.checkOnClickNode&&!e.node.disabled&&V(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,p,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,e.node.data,e.node,p)},O=()=>{e.node.isLeaf||(a.value?(i.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},V=(tt,rt)=>{e.node.setChecked(rt.target.checked,!i.props.checkStrictly),T.nextTick(()=>{const st=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:st.getCheckedNodes(),checkedKeys:st.getCheckedKeys(),halfCheckedNodes:st.getHalfCheckedNodes(),halfCheckedKeys:st.getHalfCheckedKeys()})})};return{ns:r,node$:d,tree:i,expanded:a,childNodeRendered:o,oldChecked:s,oldIndeterminate:h,getNodeKey:_,getNodeClass:x,handleSelectChange:b,handleClick:M,handleContextMenu:E,handleExpandIconClick:O,handleCheckChange:V,handleChildNodeExpand:(tt,rt,st)=>{n(rt),i.ctx.emit("node-expand",tt,rt,st)},handleDragStart:tt=>{i.props.draggable&&Q.treeNodeDragStart({event:tt,treeNode:e})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&Q.treeNodeDragOver({event:tt,treeNode:{$el:d.value,node:e.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&Q.treeNodeDragEnd(tt)},CaretRight:_z}}}),Mq=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],Aq=["aria-expanded"];function Sq(e,t,r,n,i,a){const o=T.resolveComponent("el-icon"),s=T.resolveComponent("el-checkbox"),h=T.resolveComponent("loading"),d=T.resolveComponent("node-content"),Q=T.resolveComponent("el-tree-node"),p=T.resolveComponent("el-collapse-transition");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"node$",class:T.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=T.withModifiers((...m)=>e.handleClick&&e.handleClick(...m),["stop"])),onContextmenu:t[2]||(t[2]=(...m)=>e.handleContextMenu&&e.handleContextMenu(...m)),onDragstart:t[3]||(t[3]=T.withModifiers((...m)=>e.handleDragStart&&e.handleDragStart(...m),["stop"])),onDragover:t[4]||(t[4]=T.withModifiers((...m)=>e.handleDragOver&&e.handleDragOver(...m),["stop"])),onDragend:t[5]||(t[5]=T.withModifiers((...m)=>e.handleDragEnd&&e.handleDragEnd(...m),["stop"])),onDrop:t[6]||(t[6]=T.withModifiers((...m)=>e.handleDrop&&e.handleDrop(...m),["stop"]))},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.be("node","content")),style:T.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(T.openBlock(),T.createBlock(o,{key:0,class:T.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:T.withModifiers(e.handleExpandIconClick,["stop"])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.showCheckbox?(T.openBlock(),T.createBlock(s,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=T.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):T.createCommentVNode("v-if",!0),e.node.loading?(T.openBlock(),T.createBlock(o,{key:2,class:T.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:T.withCtx(()=>[T.createVNode(h)]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.createVNode(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),T.createVNode(p,null,{default:T.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?T.withDirectives((T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.node.childNodes,m=>(T.openBlock(),T.createBlock(Q,{key:e.getNodeKey(m),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:m,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,Aq)),[[T.vShow,e.expanded]]):T.createCommentVNode("v-if",!0)]),_:1})],42,Mq)),[[T.vShow,e.node.visible]])}var Cq=Or(Eq,[["render",Sq],["__file","tree-node.vue"]]);function Hq({el$:e},t){const r=Hr("tree"),n=T.shallowRef([]),i=T.shallowRef([]);T.onMounted(()=>{o()}),T.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),T.watch(i,s=>{s.forEach(h=>{h.setAttribute("tabindex","-1")})}),n3(e,"keydown",s=>{const h=s.target;if(!h.className.includes(r.b("node")))return;const d=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const Q=n.value.indexOf(h);let p;if([t2.up,t2.down].includes(d)){if(s.preventDefault(),d===t2.up){p=Q===-1?0:Q!==0?Q-1:n.value.length-1;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p--,p===_){p=-1;break}p<0&&(p=n.value.length-1)}}else{p=Q===-1?0:Q<n.value.length-1?Q+1:0;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p++,p===_){p=-1;break}p>=n.value.length&&(p=0)}}p!==-1&&n.value[p].focus()}[t2.left,t2.right].includes(d)&&(s.preventDefault(),h.click());const m=h.querySelector('[type="checkbox"]');[t2.enter,t2.space].includes(d)&&m&&(s.preventDefault(),m.click())});const o=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const h=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(h.length){h[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const Oq=T.defineComponent({name:"ElTree",components:{ElTreeNode:Cq},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:l3}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=su(),n=Hr("tree"),i=T.ref(new xq({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const a=T.ref(i.value.root),o=T.ref(null),s=T.ref(null),h=T.ref(null),{broadcastExpanded:d}=jw(e),{dragState:Q}=wq({props:e,ctx:t,el$:s,dropIndicator$:h,store:i});Hq({el$:s},i);const p=T.computed(()=>{const{childNodes:Ft}=a.value;return!Ft||Ft.length===0||Ft.every(({visible:de})=>!de)});T.watch(()=>e.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),T.watch(()=>e.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),T.watch(()=>e.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),T.watch(()=>e.data,Ft=>{i.value.setData(Ft)},{deep:!0}),T.watch(()=>e.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const m=Ft=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>JQ(e.nodeKey,Ft.data),x=Ft=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const de=i.value.getNode(Ft);if(!de)return[];const cr=[de.data];let Wt=de.parent;for(;Wt&&Wt!==a.value;)cr.push(Wt.data),Wt=Wt.parent;return cr.reverse()},b=(Ft,de)=>i.value.getCheckedNodes(Ft,de),M=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},O=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[e.nodeKey]:null},V=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,de)},k=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,de)},j=(Ft,de,cr)=>{i.value.setChecked(Ft,de,cr)},U=()=>i.value.getHalfCheckedNodes(),$=()=>i.value.getHalfCheckedKeys(),J=(Ft,de=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");tp(i,t.emit,()=>i.value.setUserCurrentNode(Ft,de))},tt=(Ft,de=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");tp(i,t.emit,()=>i.value.setCurrentNodeKey(Ft,de))},rt=Ft=>i.value.getNode(Ft),st=Ft=>{i.value.remove(Ft)},pt=(Ft,de)=>{i.value.append(Ft,de)},Ct=(Ft,de)=>{i.value.insertBefore(Ft,de)},Ut=(Ft,de)=>{i.value.insertAfter(Ft,de)},ae=(Ft,de,cr)=>{d(de),t.emit("node-expand",Ft,de,cr)},ge=(Ft,de)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,de)};return T.provide("RootTree",{ctx:t,props:e,store:i,root:a,currentNode:o,instance:T.getCurrentInstance()}),T.provide(Ml,void 0),{ns:n,store:i,root:a,currentNode:o,dragState:Q,el$:s,dropIndicator$:h,isEmpty:p,filter:m,getNodeKey:_,getNodePath:x,getCheckedNodes:b,getCheckedKeys:M,getCurrentNode:E,getCurrentKey:O,setCheckedNodes:V,setCheckedKeys:k,setChecked:j,getHalfCheckedNodes:U,getHalfCheckedKeys:$,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:rt,remove:st,append:pt,insertBefore:Ct,insertAfter:Ut,handleNodeExpand:ae,updateKeyChildren:ge}}});function Vq(e,t,r,n,i,a){const o=T.resolveComponent("el-tree-node");return T.openBlock(),T.createElementBlock("div",{ref:"el$",class:T.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.root.childNodes,s=>(T.openBlock(),T.createBlock(o,{key:e.getNodeKey(s),node:s,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.e("empty-block"))},[T.renderSlot(e.$slots,"empty",{},()=>{var s;return[T.createElementVNode("span",{class:T.normalizeClass(e.ns.e("empty-text"))},T.toDisplayString((s=e.emptyText)!=null?s:e.t("el.tree.emptyText")),3)]})],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createElementVNode("div",{ref:"dropIndicator$",class:T.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[T.vShow,e.dragState.showDropIndicator]])],2)}var Cu=Or(Oq,[["render",Vq],["__file","tree.vue"]]);Cu.install=e=>{e.component(Cu.name,Cu)};const $w=Cu;function Iq(e){let t;const r=T.ref(!1),n=T.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(m){n.text=m}function a(){const m=n.parent,_=p.ns;if(!m.vLoadingAddClassList){let x=m.getAttribute("loading-number");x=Number.parseInt(x)-1,x?m.setAttribute("loading-number",x.toString()):(A4(m,_.bm("parent","relative")),m.removeAttribute("loading-number")),A4(m,_.bm("parent","hidden"))}o(),Q.unmount()}function o(){var m,_;(_=(m=p.$el)==null?void 0:m.parentNode)==null||_.removeChild(p.$el)}function s(){var m;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(h,400),n.visible=!1,(m=e.closed)==null||m.call(e))}function h(){if(!r.value)return;const m=n.parent;r.value=!1,m.vLoadingAddClassList=void 0,a()}const d=T.defineComponent({name:"ElLoading",setup(m,{expose:_}){const{ns:x,zIndex:b}=sU("loading");return _({ns:x,zIndex:b}),()=>{const M=n.spinner||n.svg,E=T.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...M?{innerHTML:M}:{}},[T.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),O=n.text?T.h("p",{class:x.b("text")},[n.text]):void 0;return T.h(T.Transition,{name:x.b("fade"),onAfterLeave:h},{default:T.withCtx(()=>[T.withDirectives(T.createVNode("div",{style:{backgroundColor:n.background||""},class:[x.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[T.h("div",{class:x.b("spinner")},[E,O])]),[[T.vShow,n.visible]])])})}}}),Q=T.createApp(d),p=Q.mount(document.createElement("div"));return{...T.toRefs(n),setText:i,removeElLoadingChild:o,close:s,handleAfterLeave:h,vm:p,get $el(){return p.$el}}}let Hu;const np=function(e={}){if(!q1)return;const t=Dq(e);if(t.fullscreen&&Hu)return Hu;const r=Iq({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(Hu=void 0)}});Pq(t,t.parent,r),Uw(t,t.parent,r),t.parent.vLoadingAddClassList=()=>Uw(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),T.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(Hu=r),r},Dq=e=>{var t,r,n,i;let a;return X1(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:a}},Pq=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=ml(document.body,"position"),r.originalOverflow.value=ml(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=ml(document.body,"position"),await T.nextTick();for(const a of["top","left"]){const o=a==="top"?"scrollTop":"scrollLeft";i[a]=`${e.target.getBoundingClientRect()[a]+document.body[o]+document.documentElement[o]-Number.parseInt(ml(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])i[a]=`${e.target.getBoundingClientRect()[a]}px`}else r.originalPosition.value=ml(t,"position");for(const[a,o]of Object.entries(i))r.$el.style[a]=o},Uw=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?A4(t,n.bm("parent","relative")):mQ(t,n.bm("parent","relative")),e.fullscreen&&e.lock?mQ(t,n.bm("parent","hidden")):A4(t,n.bm("parent","hidden"))},Ou=Symbol("ElLoading"),Gw=(e,t)=>{var r,n,i,a;const o=t.instance,s=m=>yi(t.value)?t.value[m]:void 0,h=m=>{const _=X1(m)&&(o==null?void 0:o[m])||m;return _&&T.ref(_)},d=m=>h(s(m)||e.getAttribute(`element-loading-${fB(m)}`)),Q=(r=s("fullscreen"))!=null?r:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:Q,target:(n=s("target"))!=null?n:Q?void 0:e,body:(i=s("body"))!=null?i:t.modifiers.body,lock:(a=s("lock"))!=null?a:t.modifiers.lock};e[Ou]={options:p,instance:np(p)}},kq=(e,t)=>{for(const r of Object.keys(t))T.isRef(t[r])&&(t[r].value=e[r])},Vu={mounted(e,t){t.value&&Gw(e,t)},updated(e,t){const r=e[Ou];t.oldValue!==t.value&&(t.value&&!t.oldValue?Gw(e,t):t.value&&t.oldValue?yi(t.value)&&kq(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[Ou])==null||t.instance.close(),e[Ou]=null}},Rq={install(e){e.directive("loading",Vu),e.config.globalProperties.$loading=np},directive:Vu,service:np},cs=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},Bq={name:"ExternalResourceCard",components:{Button:co},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:T.shallowRef(Cz)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},Nq={class:"resource-container"};function Fq(e,t,r,n,i,a){const o=co;return T.openBlock(),T.createElementBlock("div",Nq,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.resources,s=>(T.openBlock(),T.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(T.openBlock(),T.createBlock(o,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:h=>a.openUrl(s.url)},{default:T.withCtx(()=>[T.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):T.createCommentVNode("",!0)]))),128))])}const Zw=cs(Bq,[["render",Fq],["__scopeId","data-v-5386b943"]]);function jq(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Iu=new jq,zq=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),$q=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},Uq={name:"ProvenancePopup",components:{Button:co,Container:NW,Icon:_i,ExternalResourceCard:Zw,ElIconArrowUp:iu,ElIconArrowDown:s3,ElIconWarning:qb},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return zq(e)},capitalise:function(e){return $q(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){Iu.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},Ol=e=>(T.pushScopeId("data-v-139dc39a"),e=e(),T.popScopeId(),e),Gq={key:0,class:"main"},Zq={key:0,class:"block"},Wq={class:"title"},qq={key:0,class:"subtitle"},Xq={key:1,class:"block"},Kq={class:"title"},Yq={class:"content-container scrollbar"},Jq={key:0,class:"block"},tX=Ol(()=>T.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),eX={style:{"word-break":"keep-all"}},rX=Ol(()=>T.createElementVNode("i",null,"Origin",-1)),nX=["origin-item-label"],iX={key:0,class:"seperator"},aX={key:1,class:"block"},oX=Ol(()=>T.createElementVNode("div",{class:"attribute-title"},"Components",-1)),sX=["component-item-label"],lX={key:0,class:"seperator"},cX={key:2,class:"block"},uX=Ol(()=>T.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),hX=Ol(()=>T.createElementVNode("span",{style:{"word-break":"keep-all"}},[T.createElementVNode("i",null,"Destination"),T.createTextVNode(" is where the axons terminate ")],-1)),dX=["destination-item-label"],fX={key:0,class:"seperator"};function TX(e,t,r,n,i,a){const o=iu,s=_i,h=s3,d=qb,Q=Mu,p=co,m=Zw,_=Vu;return r.entry?T.withDirectives((T.openBlock(),T.createElementBlock("div",Gq,[r.entry.title?(T.openBlock(),T.createElementBlock("div",Zq,[T.createElementVNode("div",Wq,T.toDisplayString(a.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(T.openBlock(),T.createElementBlock("div",qq,T.toDisplayString(a.provSpeciesDescription),1)):T.createCommentVNode("",!0)])):(T.openBlock(),T.createElementBlock("div",Xq,[T.createElementVNode("div",Kq,T.toDisplayString(r.entry.featureId),1)])),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=x=>e.showDetails=!1)},[T.createTextVNode(" Hide path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(o)]),_:1})],512),[[T.vShow,e.showDetails]]),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=x=>e.showDetails=!0)},[T.createTextVNode(" Show path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(h)]),_:1})],512),[[T.vShow,!e.showDetails]]),T.createVNode(T.Transition,{name:"slide-fade"},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",Yq,[T.createTextVNode(T.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(T.openBlock(),T.createElementBlock("div",Jq,[T.createElementVNode("div",null,[tX,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[T.createElementVNode("span",eX,[rX,T.createTextVNode(" "+T.toDisplayString(a.originDescription),1)])]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.origins,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","origin-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.origins.length-1?(T.openBlock(),T.createElementBlock("div",iX)):T.createCommentVNode("",!0)],8,nX))),128)),T.withDirectives(T.createVNode(p,{class:"button",id:"open-dendrites-button",onClick:a.openDendrites},{default:T.withCtx(()=>[T.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):T.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(T.openBlock(),T.createElementBlock("div",aX,[oX,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.components,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","component-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.components.length-1?(T.openBlock(),T.createElementBlock("div",lX)):T.createCommentVNode("",!0)],8,sX))),128))])):T.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(T.openBlock(),T.createElementBlock("div",cX,[T.createElementVNode("div",null,[uX,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[hX]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.destinations,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","destination-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(a.capitalise(x))+" ",1),b!=r.entry.destinations.length-1?(T.openBlock(),T.createElementBlock("div",fX)):T.createCommentVNode("",!0)],8,dX))),128)),T.withDirectives(T.createVNode(p,{class:"button",onClick:a.openAxons},{default:T.withCtx(()=>[T.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):T.createCommentVNode("",!0),T.withDirectives(T.createVNode(p,{class:"button",onClick:a.openAll},{default:T.withCtx(()=>[T.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),T.createVNode(m,{resources:a.resources},null,8,["resources"])],512),[[T.vShow,e.showDetails]])]),_:1})])),[[_,e.loading]]):T.createCommentVNode("",!0)}const Ww=cs(Uq,[["render",TX],["__scopeId","data-v-139dc39a"]]);/*! js-cookie v3.0.5 | MIT */function Du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var QX={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ip(e,t){function r(i,a,o){if(!(typeof document>"u")){o=Du({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var h in o)o[h]&&(s+="; "+h,o[h]!==!0&&(s+="="+o[h].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var h=a[s].split("="),d=h.slice(1).join("=");try{var Q=decodeURIComponent(h[0]);if(o[Q]=e.read(d,Q),i===Q)break}catch{}}return i?o[i]:o}}return Object.create({set:r,get:n,remove:function(i,a){r(i,"",Du({},a,{expires:-1}))},withAttributes:function(i){return ip(this.converter,Du({},this.attributes,i))},withConverter:function(i){return ip(Du({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ap=ip(QX,{path:"/"}),uo=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},w1=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},us,Vl,Di,ho,g3;const pX=1e4;class mX{constructor(t){us.add(this),Vl.set(this,void 0),Di.set(this,null),ho.set(this,null),t.slice(-1)==="/"?uo(this,Vl,t.slice(0,-1),"f"):uo(this,Vl,t,"f")}get currentUser(){return w1(this,ho,"f")}get currentError(){return w1(this,Di,"f")}async authenticate(t){uo(this,Di,null,"f"),uo(this,ho,null,"f");const r=await w1(this,us,"m",g3).call(this,t,"authenticate");return"error"in r?(ap.remove("annotation-key"),Promise.resolve(w1(this,Di,"f"))):(ap.set("annotation-key",r.session,{secure:!0,expires:1}),uo(this,ho,r.data,"f"),Promise.resolve(w1(this,ho,"f")))}async unauthenticate(t){uo(this,Di,null,"f"),uo(this,ho,null,"f");const r=await w1(this,us,"m",g3).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(w1(this,Di,"f"))}async annotatedItemIds(t,r){const n=await w1(this,us,"m",g3).call(this,t,"items/","GET",{resource:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async drawnFeatures(t,r){const n=await w1(this,us,"m",g3).call(this,t,"features/","GET",{resource:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async itemAnnotations(t,r,n){const i=await w1(this,us,"m",g3).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(w1(this,Di,"f")):Promise.resolve(i)}async annotation(t,r){const n=await w1(this,us,"m",g3).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(w1(this,Di,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(w1(this,ho,"f")&&w1(this,ho,"f").canUpdate){const n=Object.assign({creator:w1(this,ho,"f"),created:new Date().toISOString()},r),i=await w1(this,us,"m",g3).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);uo(this,Di,i,"f")}else uo(this,Di,{error:"user cannot add annotation"},"f");return Promise.resolve(w1(this,Di,"f"))}}Vl=new WeakMap,Di=new WeakMap,ho=new WeakMap,us=new WeakSet,g3=async function(t,r,n="GET",i={}){let a=!0;const o=new AbortController;setTimeout(()=>{a&&(console.log("Annotation server timeout..."),o.abort())},pX);const s={method:n,signal:o.signal};let h=`${w1(this,Vl,"f")}/${r}`;const d=ap.get("annotation-key")||"";if(n==="GET"){const p=[];for(const[m,_]of Object.entries(i))p.push(`${m}=${encodeURIComponent(JSON.stringify(_))}`);p.push(`key=${encodeURIComponent(t)}`),p.push(`session=${encodeURIComponent(d)}`),h+="?"+p.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(n==="POST"){const p=Object.assign({key:t,session:d},i);s.body=JSON.stringify(p),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const Q=await fetch(h,s);return a=!1,Q.ok?Promise.resolve(await Q.json()):(uo(this,Di,{error:`${Q.status} ${Q.statusText}`},"f"),Promise.resolve(w1(this,Di,"f")))};const gX={name:"AnnotationTool",components:{Button:co,Col:m3,Input:Qu,Main:Dw,Row:ls,Select:T5,ElIconArrowUp:iu,ElIconArrowDown:s3,ElIconEdit:Zb,ElIconClose:gl},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resource&&this.annotationEntry.featureId}},methods:{evidenceEntered:function(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resource&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resource,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if((this.evidence.length>0||this.comment)&&this.annotationEntry.resource&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resource,item:this.annotationEntry.featureId,body:{evidence:e,comment:this.comment}};this.creator&&(t.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator||(this.$annotator=new mX(`${this.flatmapAPI}annotator`)),this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},V4=e=>(T.pushScopeId("data-v-e803d6aa"),e=e(),T.popScopeId(),e),yX={class:"block"},_X=V4(()=>T.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),vX=V4(()=>T.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),xX=V4(()=>T.createElementVNode("strong",null,"Evidence: ",-1)),bX=["href"],LX=V4(()=>T.createElementVNode("strong",null,"Comment: ",-1)),wX=V4(()=>T.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),EX=V4(()=>T.createElementVNode("strong",null,"Evidence:",-1)),MX=V4(()=>T.createElementVNode("strong",null,"Comment:",-1)),AX={class:"sub-title"};function SX(e,t,r,n,i,a){const o=ls,s=iu,h=_i,d=s3,Q=Zb,p=m3,m=gl,_=Eu,x=T5,b=Qu,M=co,E=Dw;return T.openBlock(),T.createBlock(E,{class:"main"},{default:T.withCtx(()=>[T.createElementVNode("div",yX,[T.createVNode(o,{class:"info-field"},{default:T.withCtx(()=>[_X]),_:1}),r.annotationEntry?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.displayPair,(O,V)=>T.withDirectives((T.openBlock(),T.createBlock(o,{class:"dialog-text",key:O},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(V)+": ",1),T.createTextVNode(" "+T.toDisplayString(r.annotationEntry[O]),1)]),_:2},1024)),[[T.vShow,r.annotationEntry[O]]])),128)),e.prevSubs.length>0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=O=>e.showSubmissions=!1)},[T.createTextVNode(" Hide previous submissions "),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1})],512),[[T.vShow,e.showSubmissions]]),T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=O=>e.showSubmissions=!0)},[T.createTextVNode(" Show previous "+T.toDisplayString(e.prevSubs.length)+" submission(s) ",1),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(d)]),_:1})],512),[[T.vShow,!e.showSubmissions]]),e.showSubmissions?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(o,{class:"dialog-spacer"}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[vX]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.prevSubs,(O,V)=>(T.openBlock(),T.createElementBlock("div",{class:"entry",key:V},[T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(a.formatTime(O.created)),1),T.createTextVNode(" "+T.toDisplayString(O.creator.name),1)]),_:2},1024),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[xX,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(O.body.evidence,k=>(T.openBlock(),T.createBlock(o,{key:k,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("a",{href:k,target:"_blank"},T.toDisplayString(k),9,bX)]),_:2},1024))),128))]),_:2},1024),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[LX,T.createTextVNode(" "+T.toDisplayString(O.body.comment),1)]),_:2},1024)]))),128))],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0),e.authenticated?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[a.isEditable?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(o,{class:"dialog-spacer"}),e.editing?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[wX]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[EX]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidence,(O,V)=>(T.openBlock(),T.createBlock(o,{key:O},{default:T.withCtx(()=>[T.createVNode(p,{span:20},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.evidence[V]),1)]),_:2},1024),T.createVNode(p,{span:4},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(m,{onClick:k=>a.removeEvidence(V)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),T.createVNode(o,null,{default:T.withCtx(()=>[T.createVNode(b,{size:"small",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[4]||(t[4]=O=>e.newEvidence=O),onChange:t[5]||(t[5]=O=>a.evidenceEntered(O))},{prepend:T.withCtx(()=>[T.createVNode(x,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[3]||(t[3]=O=>e.evidencePrefix=O),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidencePrefixes,O=>(T.openBlock(),T.createBlock(_,{key:O,label:O,value:O},{default:T.withCtx(()=>[T.createVNode(o,null,{default:T.withCtx(()=>[T.createVNode(p,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(O),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),T.createVNode(o,null,{default:T.withCtx(()=>[MX]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(b,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[6]||(t[6]=O=>e.comment=O)},null,8,["modelValue"])]),_:1}),T.createVNode(o,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(M,{class:"button",type:"primary",plain:"",onClick:a.submit},{default:T.withCtx(()=>[T.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(T.openBlock(),T.createBlock(o,{key:0},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(Q,{onClick:t[2]||(t[2]=O=>e.editing=!0)})]),_:1})]),_:1})),e.errorMessage?(T.openBlock(),T.createBlock(o,{key:2,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",AX,T.toDisplayString(e.errorMessage),1)]),_:1})):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)])]),_:1})}const qw=cs(gX,[["render",SX],["__scopeId","data-v-e803d6aa"]]),CX={name:"Tooltip",components:{AnnotationTool:qw,ProvenancePopup:Ww},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},HX={class:"tooltip-container",id:"tooltip-container"};function OX(e,t,r,n,i,a){const o=qw,s=Ww;return T.openBlock(),T.createElementBlock("div",HX,[r.annotationDisplay?(T.openBlock(),T.createBlock(o,{key:0,annotationEntry:r.annotationEntry},null,8,["annotationEntry"])):(T.openBlock(),T.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const op=cs(CX,[["render",OX],["__scopeId","data-v-6190f48d"]]),VX={name:"SelectionsGroup",components:{Checkbox:xu,CheckboxGroup:WQ,Col:m3,Row:ls},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},IX={class:"selections-container"},DX={class:"checkall-display-text"},PX={class:"checkbox-group-inner"},kX={class:"checkbox-container"};function RX(e,t,r,n,i,a){const o=m3,s=xu,h=ls,d=WQ;return T.openBlock(),T.createElementBlock("div",IX,[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(o,{span:12},{default:T.withCtx(()=>[T.createElementVNode("div",DX,T.toDisplayString(r.title),1)]),_:1}),T.createVNode(o,{span:12},{default:T.withCtx(()=>[r.selections&&r.selections.length>1?(T.openBlock(),T.createBlock(s,{key:0,class:"all-checkbox",indeterminate:a.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.checkAll=Q),onChange:a.handleCheckAllChange},{default:T.withCtx(()=>[T.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):T.createCommentVNode("",!0)]),_:1})]),_:1}),T.createVNode(d,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=Q=>e.checkedItems=Q),size:"small",class:"checkbox-group",onChange:a.handleCheckedItemsChange},{default:T.withCtx(()=>[T.createElementVNode("div",PX,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.selections,Q=>(T.openBlock(),T.createBlock(h,{key:Q[r.identifierKey],label:Q[r.identifierKey]},{default:T.withCtx(()=>[T.createElementVNode("div",kX,[T.createVNode(s,{class:"my-checkbox",label:Q[r.identifierKey],onChange:p=>a.visibilityToggle(Q[r.identifierKey],p),checked:!("enabled"in Q)||Q.enabled===!0},{default:T.withCtx(()=>[T.createVNode(h,{class:"checkbox-row"},{default:T.withCtx(()=>[a.hasLineStyles(Q)?(T.openBlock(),T.createBlock(o,{key:0,span:4},{default:T.withCtx(()=>[T.createElementVNode("div",{class:"path-visual",style:T.normalizeStyle(a.getLineStyles(Q))},null,4)]),_:2},1024)):T.createCommentVNode("",!0),T.createVNode(o,{span:20},{default:T.withCtx(()=>[T.createElementVNode("div",{style:T.normalizeStyle(a.getBackgroundStyles(Q))},T.toDisplayString(Q[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const Xw=cs(VX,[["render",RX],["__scopeId","data-v-4d3741da"]]),BX={name:"TreeControls",components:{Checkbox:xu,CheckboxGroup:WQ,ColorPicker:AW,Row:ls,Tree:$w},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},NX=e=>(T.pushScopeId("data-v-df242013"),e=e(),T.popScopeId(),e),FX={class:"container"},jX=NX(()=>T.createElementVNode("div",{class:"title-text"},"Systems",-1)),zX={class:"tree-container"},$X=["onClick","onMouseover"];function UX(e,t,r,n,i,a){const o=m3,s=ls,h=$w;return T.openBlock(),T.createElementBlock("div",FX,[T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(o,{span:12},{default:T.withCtx(()=>[jX]),_:1})]),_:1}),T.createElementVNode("div",zX,[T.createVNode(h,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:a.checkChanged},{default:T.withCtx(({node:d,data:Q})=>[T.createElementVNode("span",{class:T.normalizeClass(["region-tree-node",{activeItem:a.nodeIsActive(Q),hoverItem:a.nodeIsHover(Q)}]),onClick:p=>a.changeActiveByNode(Q),onMouseover:p=>a.changeHoverByNode(Q)},[T.createElementVNode("div",{style:T.normalizeStyle(a.getBackgroundStyles(Q))},T.toDisplayString(d.label),5)],42,$X)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const Kw=cs(BX,[["render",UX],["__scopeId","data-v-df242013"]]),GX={name:"SvgLegends"},ZX=e=>(T.pushScopeId("data-v-88079d87"),e=e(),T.popScopeId(),e),WX={class:"legends-container"},qX={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"},XX=[T.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)],KX=ZX(()=>T.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function YX(e,t,r,n,i,a){return T.openBlock(),T.createElementBlock("div",WX,[(T.openBlock(),T.createElementBlock("svg",qX,XX)),KX])}const Yw=cs(GX,[["render",YX],["__scopeId","data-v-88079d87"]]),JX='<div class="flatmap-marker"><svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#005974"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg></div>',Pu=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},Il={},Jw=async function(e,t){return Il&&Il.hasOwnProperty(t)?Il[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),Il[t]=i,r(i)}).catch(n=>{console.error("Error:",n),Il[t]=t,r(t)})})},ku=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let tK=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await Jw(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const a=i.keys.indexOf("entity"),o=i.keys.indexOf("label");a>-1&&o>-1&&i.values.forEach(s=>{r[s[a]]=s[o],this.uberons.push({id:s[a],name:s[o]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Pu(t),n=[],i=!1;return r.forEach(a=>{i=!1,ku(e.axons,a)&&(i=!0),ku(e.dendrites,a)&&(i=!0),i||n.push(a)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(h=>h.json()).then(h=>{if(this.connectivityExists(h)){let d=JSON.parse(h.values[0][0]);this.processConnectivity(d).then(()=>{s(!0)})}else s(!1)}).catch(h=>{console.error("Error:",h),s(!1)})}),a=await this.pubmedQueryOnIds(e);return await Promise.all([i,a])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),a=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(o=>i.indexOf(o.id)!==-1),this.originsWithDatasets=this.uberons.filter(o=>a.indexOf(o.id)!==-1),this.componentsWithDatasets=this.uberons.filter(o=>n.indexOf(o.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=Pu(e.axons),i=Pu(e.dendrites),a=this.findAllIdsFromConnectivity(e);this.createLabelLookup(a).then(o=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,o)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,o)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,o)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=Pu(t),n=[],i=!1;return r.forEach(a=>{i=!1,ku(e.axons,a)&&(i=!0),ku(e.dendrites,a)&&(i=!0),i||n.push(a)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(a=>{a.values.length>0?(this.urls=[this.pubmedSearchUrl(a.values.map(o=>this.stripPMIDPrefix(o[0])))],t(!0)):this.pubmedQueryOnModels(n).then(o=>{t(o)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const eK='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var tE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:D,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(Q){return r.setTimeout(Q,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(Q){r.clearTimeout(Q)};function a(Q,p){var m=Object.prototype.toString.call(Q),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&Q instanceof jQuery||typeof Elements<"u"&&Q instanceof Elements,x=0,b=Q.length;if(_)for(;x<b;x++)p(Q[x]);else p(Q)}function o(Q){if(!Q.getBoundingClientRect)return{width:Q.offsetWidth,height:Q.offsetHeight};var p=Q.getBoundingClientRect();return{width:Math.round(p.width),height:Math.round(p.height)}}function s(Q,p){Object.keys(p).forEach(function(m){Q.style[m]=p[m]})}var h=function(Q,p){var m=0;function _(){var b=[];this.add=function(O){b.push(O)};var M,E;this.call=function(O){for(M=0,E=b.length;M<E;M++)b[M].call(this,O)},this.remove=function(O){var V=[];for(M=0,E=b.length;M<E;M++)b[M]!==O&&V.push(b[M]);b=V},this.length=function(){return b.length}}function x(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var k=document.createElement("div");s(k,O),V.appendChild(k);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var U=document.createElement("div");s(U,O),s(U,{width:"200%",height:"200%"}),j.appendChild(U),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var $=window.getComputedStyle(b),J=$?$.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,rt=0,st=o(b),pt=0,Ct=0,Ut=!0;m=0;var ae=function(){var Wt=b.offsetWidth,ce=b.offsetHeight;k.style.width=Wt+10+"px",k.style.height=ce+10+"px",V.scrollLeft=Wt+10,V.scrollTop=ce+10,j.scrollLeft=Wt+10,j.scrollTop=ce+10},ge=function(){if(Ut){var Wt=b.offsetWidth===0&&b.offsetHeight===0;if(Wt){m||(m=n(function(){m=0,ge()}));return}else Ut=!1}ae()};b.resizeSensor.resetSensor=ge;var Ft=function(){rt=0,tt&&(pt=st.width,Ct=st.height,b.resizedAttached&&b.resizedAttached.call(st))},de=function(){st=o(b),tt=st.width!==pt||st.height!==Ct,tt&&!rt&&(rt=n(Ft)),ge()},cr=function(Wt,ce,pe){Wt.attachEvent?Wt.attachEvent("on"+ce,pe):Wt.addEventListener(ce,pe)};cr(V,"scroll",de),cr(j,"scroll",de),m=n(function(){m=0,ge()})}}a(Q,function(b){x(b,p)}),this.detach=function(b){m||(i(m),m=0),h.detach(Q,b)},this.reset=function(){Q.resizeSensor.resetSensor()}};if(h.reset=function(Q){a(Q,function(p){p.resizeSensor.resetSensor()})},h.detach=function(Q,p){a(Q,function(m){m&&(m.resizedAttached&&typeof p=="function"&&(m.resizedAttached.remove(p),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(Q){for(var p in Q)if(Q.hasOwnProperty(p))for(var m=Q[p].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&h.reset(m[_])});document.addEventListener("DOMContentLoaded",function(Q){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(tE);var rK=tE.exports;const nK=h5(rK);var eE={exports:{}};/**
|
|
20
20
|
* MapLibre GL JS
|
|
21
21
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.0/LICENSE.txt
|
|
22
22
|
*/(function(e,t){(function(r,n){e.exports=n()})(D,function(){var r={},n={};function i(o,s,h){if(n[o]=h,o==="index"){var d="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",Q={};return n.shared(Q),n.index(r,Q),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([d],{type:"text/javascript"}))),r}}i("shared",["exports"],function(o){function s(u,l,f,y){return new(f||(f=Promise))(function(L,C){function H(G){try{B(y.next(G))}catch(X){C(X)}}function P(G){try{B(y.throw(G))}catch(X){C(X)}}function B(G){var X;G.done?L(G.value):(X=G.value,X instanceof f?X:new f(function(Y){Y(X)})).then(H,P)}B((y=y.apply(u,l||[])).next())})}function h(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var d=Q;function Q(u,l){this.x=u,this.y=l}Q.prototype={clone:function(){return new Q(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,l){return this.clone()._rotateAround(u,l)},matMult:function(u){return this.clone()._matMult(u)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var l=u.x-this.x,f=u.y-this.y;return l*l+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,l){return Math.atan2(this.x*l-this.y*u,this.x*u+this.y*l)},_matMult:function(u){var l=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=l,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var l=Math.cos(u),f=Math.sin(u),y=f*this.x+l*this.y;return this.x=l*this.x-f*this.y,this.y=y,this},_rotateAround:function(u,l){var f=Math.cos(u),y=Math.sin(u),L=l.y+y*(this.x-l.x)+f*(this.y-l.y);return this.x=l.x+f*(this.x-l.x)-y*(this.y-l.y),this.y=L,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Q.convert=function(u){return u instanceof Q?u:Array.isArray(u)?new Q(u[0],u[1]):u};var p=h(d),m=_;function _(u,l,f,y){this.cx=3*u,this.bx=3*(f-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=f,this.p2y=y}_.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var f=u,y=0;y<8;y++){var L=this.sampleCurveX(f)-u;if(Math.abs(L)<l)return f;var C=this.sampleCurveDerivativeX(f);if(Math.abs(C)<1e-6)break;f-=L/C}var H=0,P=1;for(f=u,y=0;y<20&&(L=this.sampleCurveX(f),!(Math.abs(L-u)<l));y++)u>L?H=f:P=f,f=.5*(P-H)+H;return f},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var x=h(m);let b,M;function E(){return b==null&&(b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),b}function O(){if(M==null&&(M=!1,E())){const l=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(l){for(let y=0;y<5*5;y++){const L=4*y;l.fillStyle=`rgb(${L},${L+1},${L+2})`,l.fillRect(y%5,Math.floor(y/5),1,1)}const f=l.getImageData(0,0,5,5).data;for(let y=0;y<5*5*4;y++)if(y%4!=3&&f[y]!==y){M=!0;break}}}return M||!1}function V(u,l,f,y){const L=new x(u,l,f,y);return function(C){return L.solve(C)}}const k=V(.25,.1,.25,1);function j(u,l,f){return Math.min(f,Math.max(l,u))}function U(u,l,f){const y=f-l,L=((u-l)%y+y)%y+l;return L===l?f:L}function $(u,...l){for(const f of l)for(const y in f)u[y]=f[y];return u}let J=1;function tt(u,l,f){const y={};for(const L in u)y[L]=l.call(f||this,u[L],L,u);return y}function rt(u,l,f){const y={};for(const L in u)l.call(f||this,u[L],L,u)&&(y[L]=u[L]);return y}function st(u){return Array.isArray(u)?u.map(st):typeof u=="object"&&u?tt(u,st):u}const pt={};function Ct(u){pt[u]||(typeof console<"u"&&console.warn(u),pt[u]=!0)}function Ut(u,l,f){return(f.y-u.y)*(l.x-u.x)>(l.y-u.y)*(f.x-u.x)}function ae(u){let l=0;for(let f,y,L=0,C=u.length,H=C-1;L<C;H=L++)f=u[L],y=u[H],l+=(y.x-f.x)*(f.y+y.y);return l}function ge(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let Ft=null;function de(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const cr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Wt(u,l,f,y,L){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const C=new VideoFrame(u,{timestamp:0});try{const H=C==null?void 0:C.format;if(!H||!H.startsWith("BGR")&&!H.startsWith("RGB"))throw new Error(`Unrecognized format ${H}`);const P=H.startsWith("BGR"),B=new Uint8ClampedArray(y*L*4);if(yield C.copyTo(B,function(G,X,Y,at,lt){const ht=4*Math.max(-X,0),Tt=(Math.max(0,Y)-Y)*at*4+ht,bt=4*at,wt=Math.max(0,X),Rt=Math.max(0,Y);return{rect:{x:wt,y:Rt,width:Math.min(G.width,X+at)-wt,height:Math.min(G.height,Y+lt)-Rt},layout:[{offset:Tt,stride:bt}]}}(u,l,f,y,L)),P)for(let G=0;G<B.length;G+=4){const X=B[G];B[G]=B[G+2],B[G+2]=X}return B}finally{C.close()}})}let ce,pe;const be="AbortError";function Fe(){return new Error(be)}const $e={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function je(u){return $e.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Bt="global-dispatcher";class Zt extends Error{constructor(l,f,y,L){super(`AJAXError: ${f} (${l}): ${y}`),this.status=l,this.statusText=f,this.url=y,this.body=L}}const he=()=>ge(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,zt=function(u,l){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const y=je(u.url);if(y)return y(u,l);if(ge(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,targetMapId:Bt},l)}if(!(/^file:/.test(f=u.url)||/^file:/.test(he())&&!/^\w+:/.test(f))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(y,L){return s(this,void 0,void 0,function*(){const C=new Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,cache:y.cache,referrer:he(),signal:L.signal});y.type==="json"&&C.headers.set("Accept","application/json");const H=yield fetch(C);if(!H.ok){const G=yield H.blob();throw new Zt(H.status,H.statusText,y.url,G)}const P=y.type==="arrayBuffer"||y.type==="image"?H.arrayBuffer():y.type==="json"?H.json():H.text(),B=yield P;if(L.signal.aborted)throw Fe();return{data:B,cacheControl:H.headers.get("Cache-Control"),expires:H.headers.get("Expires")}})}(u,l);if(ge(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,mustQueue:!0,targetMapId:Bt},l)}var f;return function(y,L){return new Promise((C,H)=>{const P=new XMLHttpRequest;P.open(y.method||"GET",y.url,!0),y.type!=="arrayBuffer"&&y.type!=="image"||(P.responseType="arraybuffer");for(const B in y.headers)P.setRequestHeader(B,y.headers[B]);y.type==="json"&&(P.responseType="text",P.setRequestHeader("Accept","application/json")),P.withCredentials=y.credentials==="include",P.onerror=()=>{H(new Error(P.statusText))},P.onload=()=>{if(!L.signal.aborted)if((P.status>=200&&P.status<300||P.status===0)&&P.response!==null){let B=P.response;if(y.type==="json")try{B=JSON.parse(P.response)}catch(G){return void H(G)}C({data:B,cacheControl:P.getResponseHeader("Cache-Control"),expires:P.getResponseHeader("Expires")})}else{const B=new Blob([P.response],{type:P.getResponseHeader("Content-Type")});H(new Zt(P.status,P.statusText,y.url,B))}},L.signal.addEventListener("abort",()=>{P.abort(),H(Fe())}),P.send(y.body)})}(u,l)};function fe(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const l=new URL(u),f=window.location;return l.protocol===f.protocol&&l.host===f.host}function Re(u,l,f){f[u]&&f[u].indexOf(l)!==-1||(f[u]=f[u]||[],f[u].push(l))}function Se(u,l,f){if(f&&f[u]){const y=f[u].indexOf(l);y!==-1&&f[u].splice(y,1)}}class He{constructor(l,f={}){$(this,f),this.type=l}}class De extends He{constructor(l,f={}){super("error",$({error:l},f))}}class ze{on(l,f){return this._listeners=this._listeners||{},Re(l,f,this._listeners),this}off(l,f){return Se(l,f,this._listeners),Se(l,f,this._oneTimeListeners),this}once(l,f){return f?(this._oneTimeListeners=this._oneTimeListeners||{},Re(l,f,this._oneTimeListeners),this):new Promise(y=>this.once(l,y))}fire(l,f){typeof l=="string"&&(l=new He(l,f||{}));const y=l.type;if(this.listens(y)){l.target=this;const L=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const P of L)P.call(this,l);const C=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const P of C)Se(y,P,this._oneTimeListeners),P.call(this,l);const H=this._eventedParent;H&&($(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),H.fire(l))}else l instanceof De&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,f){return this._eventedParent=l,this._eventedParentData=f,this}}var $t={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Dr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function mn(u,l){const f={};for(const y in u)y!=="ref"&&(f[y]=u[y]);return Dr.forEach(y=>{y in l&&(f[y]=l[y])}),f}function Ke(u,l){if(Array.isArray(u)){if(!Array.isArray(l)||u.length!==l.length)return!1;for(let f=0;f<u.length;f++)if(!Ke(u[f],l[f]))return!1;return!0}if(typeof u=="object"&&u!==null&&l!==null){if(typeof l!="object"||Object.keys(u).length!==Object.keys(l).length)return!1;for(const f in u)if(!Ke(u[f],l[f]))return!1;return!0}return u===l}function _r(u,l){u.push(l)}function jn(u,l,f){_r(f,{command:"addSource",args:[u,l[u]]})}function O1(u,l,f){_r(l,{command:"removeSource",args:[u]}),f[u]=!0}function wn(u,l,f,y){O1(u,f,y),jn(u,l,f)}function me(u,l,f){let y;for(y in u[f])if(Object.prototype.hasOwnProperty.call(u[f],y)&&y!=="data"&&!Ke(u[f][y],l[f][y]))return!1;for(y in l[f])if(Object.prototype.hasOwnProperty.call(l[f],y)&&y!=="data"&&!Ke(u[f][y],l[f][y]))return!1;return!0}function ur(u,l,f,y,L,C){u=u||{},l=l||{};for(const H in u)Object.prototype.hasOwnProperty.call(u,H)&&(Ke(u[H],l[H])||f.push({command:C,args:[y,H,l[H],L]}));for(const H in l)Object.prototype.hasOwnProperty.call(l,H)&&!Object.prototype.hasOwnProperty.call(u,H)&&(Ke(u[H],l[H])||f.push({command:C,args:[y,H,l[H],L]}))}function Jr(u){return u.id}function En(u,l){return u[l.id]=l,u}class Te{constructor(l,f,y,L){this.message=(l?`${l}: `:"")+y,L&&(this.identifier=L),f!=null&&f.__line__&&(this.line=f.__line__)}}function u1(u,...l){for(const f of l)for(const y in f)u[y]=f[y];return u}class gn extends Error{constructor(l,f){super(f),this.message=f,this.key=l}}class hi{constructor(l,f=[]){this.parent=l,this.bindings={};for(const[y,L]of f)this.bindings[y]=L}concat(l){return new hi(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const zn={kind:"null"},we={kind:"number"},yr={kind:"string"},dr={kind:"boolean"},Mn={kind:"color"},p1={kind:"object"},or={kind:"value"},Fi={kind:"collator"},dn={kind:"formatted"},yt={kind:"padding"},it={kind:"resolvedImage"},ot={kind:"variableAnchorOffsetCollection"};function dt(u,l){return{kind:"array",itemType:u,N:l}}function mt(u){if(u.kind==="array"){const l=mt(u.itemType);return typeof u.N=="number"?`array<${l}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${l}>`}return u.kind}const At=[zn,we,yr,dr,Mn,dn,p1,dt(or),yt,it,ot];function Ht(u,l){if(l.kind==="error")return null;if(u.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Ht(u.itemType,l.itemType))&&(typeof u.N!="number"||u.N===l.N))return null}else{if(u.kind===l.kind)return null;if(u.kind==="value"){for(const f of At)if(!Ht(f,l))return null}}return`Expected ${mt(u)} but found ${mt(l)} instead.`}function It(u,l){return l.some(f=>f.kind===u.kind)}function Et(u,l){return l.some(f=>f==="null"?u===null:f==="array"?Array.isArray(u):f==="object"?u&&!Array.isArray(u)&&typeof u=="object":f===typeof u)}function kt(u,l){return u.kind==="array"&&l.kind==="array"?u.itemType.kind===l.itemType.kind&&typeof u.N=="number":u.kind===l.kind}const ie=.96422,Xt=.82521,te=4/29,Ot=6/29,Kt=3*Ot*Ot,Ve=Ot*Ot*Ot,Ue=Math.PI/180,Qr=180/Math.PI;function Cr(u){return(u%=360)<0&&(u+=360),u}function Zr([u,l,f,y]){let L,C;const H=Ge((.2225045*(u=en(u))+.7168786*(l=en(l))+.0606169*(f=en(f)))/1);u===l&&l===f?L=C=H:(L=Ge((.4360747*u+.3850649*l+.1430804*f)/ie),C=Ge((.0139322*u+.0971045*l+.7141733*f)/Xt));const P=116*H-16;return[P<0?0:P,500*(L-H),200*(H-C),y]}function en(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Ge(u){return u>Ve?Math.pow(u,1/3):u/Kt+te}function Ur([u,l,f,y]){let L=(u+16)/116,C=isNaN(l)?L:L+l/500,H=isNaN(f)?L:L-f/200;return L=1*e1(L),C=ie*e1(C),H=Xt*e1(H),[vn(3.1338561*C-1.6168667*L-.4906146*H),vn(-.9787684*C+1.9161415*L+.033454*H),vn(.0719453*C-.2289914*L+1.4052427*H),y]}function vn(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function e1(u){return u>Ot?u*u*u:Kt*(u-te)}function h1(u){return parseInt(u.padEnd(2,u),16)/255}function Wn(u,l){return di(l?u/100:u,0,1)}function di(u,l,f){return Math.min(Math.max(l,u),f)}function Z3(u){return!u.some(Number.isNaN)}const $2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Lr{constructor(l,f,y,L=1,C=!0){this.r=l,this.g=f,this.b=y,this.a=L,C||(this.r*=L,this.g*=L,this.b*=L,L||this.overwriteGetter("rgb",[l,f,y,L]))}static parse(l){if(l instanceof Lr)return l;if(typeof l!="string")return;const f=function(y){if((y=y.toLowerCase().trim())==="transparent")return[0,0,0,0];const L=$2[y];if(L){const[H,P,B]=L;return[H/255,P/255,B/255,1]}if(y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(y)){const H=y.length<6?1:2;let P=1;return[h1(y.slice(P,P+=H)),h1(y.slice(P,P+=H)),h1(y.slice(P,P+=H)),h1(y.slice(P,P+H)||"ff")]}if(y.startsWith("rgb")){const H=y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(H){const[P,B,G,X,Y,at,lt,ht,Tt,bt,wt,Rt]=H,Mt=[X||" ",lt||" ",bt].join("");if(Mt===" "||Mt===" /"||Mt===",,"||Mt===",,,"){const Vt=[G,at,Tt].join(""),re=Vt==="%%%"?100:Vt===""?255:0;if(re){const se=[di(+B/re,0,1),di(+Y/re,0,1),di(+ht/re,0,1),wt?Wn(+wt,Rt):1];if(Z3(se))return se}}return}}const C=y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(C){const[H,P,B,G,X,Y,at,lt,ht]=C,Tt=[B||" ",X||" ",at].join("");if(Tt===" "||Tt===" /"||Tt===",,"||Tt===",,,"){const bt=[+P,di(+G,0,100),di(+Y,0,100),lt?Wn(+lt,ht):1];if(Z3(bt))return function([wt,Rt,Mt,Vt]){function re(se){const Be=(se+wt/30)%12,Je=Rt*Math.min(Mt,1-Mt);return Mt-Je*Math.max(-1,Math.min(Be-3,9-Be,1))}return wt=Cr(wt),Rt/=100,Mt/=100,[re(0),re(8),re(4),Vt]}(bt)}}}(l);return f?new Lr(...f,!1):void 0}get rgb(){const{r:l,g:f,b:y,a:L}=this,C=L||1/0;return this.overwriteGetter("rgb",[l/C,f/C,y/C,L])}get hcl(){return this.overwriteGetter("hcl",function(l){const[f,y,L,C]=Zr(l),H=Math.sqrt(y*y+L*L);return[Math.round(1e4*H)?Cr(Math.atan2(L,y)*Qr):NaN,H,f,C]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Zr(this.rgb))}overwriteGetter(l,f){return Object.defineProperty(this,l,{value:f}),f}toString(){const[l,f,y,L]=this.rgb;return`rgba(${[l,f,y].map(C=>Math.round(255*C)).join(",")},${L})`}}Lr.black=new Lr(0,0,0,1),Lr.white=new Lr(1,1,1,1),Lr.transparent=new Lr(0,0,0,0),Lr.red=new Lr(1,0,0,1);class ji{constructor(l,f,y){this.sensitivity=l?f?"variant":"case":f?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,f){return this.collator.compare(l,f)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class an{constructor(l,f,y,L,C){this.text=l,this.image=f,this.scale=y,this.fontStack=L,this.textColor=C}}class An{constructor(l){this.sections=l}static fromString(l){return new An([new an(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof An?l:An.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class r1{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof r1)return l;if(typeof l=="number")return new r1([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const f of l)if(typeof f!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new r1(l)}}toString(){return JSON.stringify(this.values)}}const $n=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class rn{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof rn)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let f=0;f<l.length;f+=2){const y=l[f],L=l[f+1];if(typeof y!="string"||!$n.has(y)||!Array.isArray(L)||L.length!==2||typeof L[0]!="number"||typeof L[1]!="number")return}return new rn(l)}}toString(){return JSON.stringify(this.values)}}class M1{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new M1({name:l,available:!1}):null}}function ri(u,l,f,y){return typeof u=="number"&&u>=0&&u<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof f=="number"&&f>=0&&f<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[u,l,f,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[u,l,f,y]:[u,l,f]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ni(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Lr||u instanceof ji||u instanceof An||u instanceof r1||u instanceof rn||u instanceof M1)return!0;if(Array.isArray(u)){for(const l of u)if(!ni(l))return!1;return!0}if(typeof u=="object"){for(const l in u)if(!ni(u[l]))return!1;return!0}return!1}function Wr(u){if(u===null)return zn;if(typeof u=="string")return yr;if(typeof u=="boolean")return dr;if(typeof u=="number")return we;if(u instanceof Lr)return Mn;if(u instanceof ji)return Fi;if(u instanceof An)return dn;if(u instanceof r1)return yt;if(u instanceof rn)return ot;if(u instanceof M1)return it;if(Array.isArray(u)){const l=u.length;let f;for(const y of u){const L=Wr(y);if(f){if(f===L)continue;f=or;break}f=L}return dt(f||or,l)}return p1}function L2(u){const l=typeof u;return u===null?"":l==="string"||l==="number"||l==="boolean"?String(u):u instanceof Lr||u instanceof An||u instanceof r1||u instanceof rn||u instanceof M1?u.toString():JSON.stringify(u)}class zi{constructor(l,f){this.type=l,this.value=f}static parse(l,f){if(l.length!==2)return f.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!ni(l[1]))return f.error("invalid value");const y=l[1];let L=Wr(y);const C=f.expectedType;return L.kind!=="array"||L.N!==0||!C||C.kind!=="array"||typeof C.N=="number"&&C.N!==0||(L=C),new zi(L,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class cn{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const U2={string:yr,number:we,boolean:dr,object:p1};class m1{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");let y,L=1;const C=l[0];if(C==="array"){let P,B;if(l.length>2){const G=l[1];if(typeof G!="string"||!(G in U2)||G==="object")return f.error('The item type argument of "array" must be one of string, number, boolean',1);P=U2[G],L++}else P=or;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return f.error('The length argument to "array" must be a positive integer literal',2);B=l[2],L++}y=dt(P,B)}else{if(!U2[C])throw new Error(`Types doesn't contain name = ${C}`);y=U2[C]}const H=[];for(;L<l.length;L++){const P=f.parse(l[L],L,or);if(!P)return null;H.push(P)}return new m1(y,H)}evaluate(l){for(let f=0;f<this.args.length;f++){const y=this.args[f].evaluate(l);if(!Ht(this.type,Wr(y)))return y;if(f===this.args.length-1)throw new cn(`Expected value to be of type ${mt(this.type)}, but found ${mt(Wr(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const w2={"to-boolean":dr,"to-color":Mn,"to-number":we,"to-string":yr};class n1{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const y=l[0];if(!w2[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return f.error("Expected one argument.");const L=w2[y],C=[];for(let H=1;H<l.length;H++){const P=f.parse(l[H],H,or);if(!P)return null;C.push(P)}return new n1(L,C)}evaluate(l){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(l);case"color":{let f,y;for(const L of this.args){if(f=L.evaluate(l),y=null,f instanceof Lr)return f;if(typeof f=="string"){const C=l.parseColor(f);if(C)return C}else if(Array.isArray(f)&&(y=f.length<3||f.length>4?`Invalid rbga value ${JSON.stringify(f)}: expected an array containing either three or four numeric values.`:ri(f[0],f[1],f[2],f[3]),!y))return new Lr(f[0]/255,f[1]/255,f[2]/255,f[3])}throw new cn(y||`Could not parse color from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"padding":{let f;for(const y of this.args){f=y.evaluate(l);const L=r1.parse(f);if(L)return L}throw new cn(`Could not parse padding from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"variableAnchorOffsetCollection":{let f;for(const y of this.args){f=y.evaluate(l);const L=rn.parse(f);if(L)return L}throw new cn(`Could not parse variableAnchorOffsetCollection from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"number":{let f=null;for(const y of this.args){if(f=y.evaluate(l),f===null)return 0;const L=Number(f);if(!isNaN(L))return L}throw new cn(`Could not convert ${JSON.stringify(f)} to number.`)}case"formatted":return An.fromString(L2(this.args[0].evaluate(l)));case"resolvedImage":return M1.fromString(L2(this.args[0].evaluate(l)));default:return L2(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const za=["Unknown","Point","LineString","Polygon"];class qr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?za[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(l){let f=this._parseColorCache[l];return f||(f=this._parseColorCache[l]=Lr.parse(l)),f}}class ma{constructor(l,f,y=[],L,C=new hi,H=[]){this.registry=l,this.path=y,this.key=y.map(P=>`[${P}]`).join(""),this.scope=C,this.errors=H,this.expectedType=L,this._isConstant=f}parse(l,f,y,L,C={}){return f?this.concat(f,y,L)._parse(l,C):this._parse(l,C)}_parse(l,f){function y(L,C,H){return H==="assert"?new m1(C,[L]):H==="coerce"?new n1(C,[L]):L}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const L=l[0];if(typeof L!="string")return this.error(`Expression name must be a string, but found ${typeof L} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const C=this.registry[L];if(C){let H=C.parse(l,this);if(!H)return null;if(this.expectedType){const P=this.expectedType,B=H.type;if(P.kind!=="string"&&P.kind!=="number"&&P.kind!=="boolean"&&P.kind!=="object"&&P.kind!=="array"||B.kind!=="value")if(P.kind!=="color"&&P.kind!=="formatted"&&P.kind!=="resolvedImage"||B.kind!=="value"&&B.kind!=="string")if(P.kind!=="padding"||B.kind!=="value"&&B.kind!=="number"&&B.kind!=="array")if(P.kind!=="variableAnchorOffsetCollection"||B.kind!=="value"&&B.kind!=="array"){if(this.checkSubtype(P,B))return null}else H=y(H,P,f.typeAnnotation||"coerce");else H=y(H,P,f.typeAnnotation||"coerce");else H=y(H,P,f.typeAnnotation||"coerce");else H=y(H,P,f.typeAnnotation||"assert")}if(!(H instanceof zi)&&H.type.kind!=="resolvedImage"&&this._isConstant(H)){const P=new qr;try{H=new zi(H.type,H.evaluate(P))}catch(B){return this.error(B.message),null}}return H}return this.error(`Unknown expression "${L}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,f,y){const L=typeof l=="number"?this.path.concat(l):this.path,C=y?this.scope.concat(y):this.scope;return new ma(this.registry,this._isConstant,L,f||null,C,this.errors)}error(l,...f){const y=`${this.key}${f.map(L=>`[${L}]`).join("")}`;this.errors.push(new gn(y,l))}checkSubtype(l,f){const y=Ht(l,f);return y&&this.error(y),y}}class $i{constructor(l,f,y){this.type=Fi,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=f}static parse(l,f){if(l.length!==2)return f.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return f.error("Collator options argument must be an object.");const L=f.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,dr);if(!L)return null;const C=f.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,dr);if(!C)return null;let H=null;return y.locale&&(H=f.parse(y.locale,1,yr),!H)?null:new $i(L,C,H)}evaluate(l){return new ji(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}const I=8192;function Z(u,l){u[0]=Math.min(u[0],l[0]),u[1]=Math.min(u[1],l[1]),u[2]=Math.max(u[2],l[0]),u[3]=Math.max(u[3],l[1])}function F(u,l){return!(u[0]<=l[0]||u[2]>=l[2]||u[1]<=l[1]||u[3]>=l[3])}function q(u,l){const f=(180+u[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,L=Math.pow(2,l.z);return[Math.round(f*L*I),Math.round(y*L*I)]}function nt(u,l,f){const y=u[0]-l[0],L=u[1]-l[1],C=u[0]-f[0],H=u[1]-f[1];return y*H-C*L==0&&y*C<=0&&L*H<=0}function ut(u,l){let f=!1;for(let H=0,P=l.length;H<P;H++){const B=l[H];for(let G=0,X=B.length;G<X-1;G++){if(nt(u,B[G],B[G+1]))return!1;(L=B[G])[1]>(y=u)[1]!=(C=B[G+1])[1]>y[1]&&y[0]<(C[0]-L[0])*(y[1]-L[1])/(C[1]-L[1])+L[0]&&(f=!f)}}var y,L,C;return f}function _t(u,l){for(let f=0;f<l.length;f++)if(ut(u,l[f]))return!0;return!1}function Nt(u,l,f,y){const L=y[0]-f[0],C=y[1]-f[1],H=(u[0]-f[0])*C-L*(u[1]-f[1]),P=(l[0]-f[0])*C-L*(l[1]-f[1]);return H>0&&P<0||H<0&&P>0}function ee(u,l,f){for(const G of f)for(let X=0;X<G.length-1;++X)if((P=[(H=G[X+1])[0]-(C=G[X])[0],H[1]-C[1]])[0]*(B=[(L=l)[0]-(y=u)[0],L[1]-y[1]])[1]-P[1]*B[0]!=0&&Nt(y,L,C,H)&&Nt(C,H,y,L))return!0;var y,L,C,H,P,B;return!1}function _e(u,l){for(let f=0;f<u.length;++f)if(!ut(u[f],l))return!1;for(let f=0;f<u.length-1;++f)if(ee(u[f],u[f+1],l))return!1;return!0}function ve(u,l){for(let f=0;f<l.length;f++)if(_e(u,l[f]))return!0;return!1}function Qe(u,l,f){const y=[];for(let L=0;L<u.length;L++){const C=[];for(let H=0;H<u[L].length;H++){const P=q(u[L][H],f);Z(l,P),C.push(P)}y.push(C)}return y}function ar(u,l,f){const y=[];for(let L=0;L<u.length;L++){const C=Qe(u[L],l,f);y.push(C)}return y}function Sn(u,l,f,y){if(u[0]<f[0]||u[0]>f[2]){const L=.5*y;let C=u[0]-f[0]>L?-y:f[0]-u[0]>L?y:0;C===0&&(C=u[0]-f[2]>L?-y:f[2]-u[0]>L?y:0),u[0]+=C}Z(l,u)}function vr(u,l,f,y){const L=Math.pow(2,y.z)*I,C=[y.x*I,y.y*I],H=[];for(const P of u)for(const B of P){const G=[B.x+C[0],B.y+C[1]];Sn(G,l,f,L),H.push(G)}return H}function i1(u,l,f,y){const L=Math.pow(2,y.z)*I,C=[y.x*I,y.y*I],H=[];for(const B of u){const G=[];for(const X of B){const Y=[X.x+C[0],X.y+C[1]];Z(l,Y),G.push(Y)}H.push(G)}if(l[2]-l[0]<=L/2){(P=l)[0]=P[1]=1/0,P[2]=P[3]=-1/0;for(const B of H)for(const G of B)Sn(G,l,f,L)}var P;return H}class oe{constructor(l,f){this.type=dr,this.geojson=l,this.geometries=f}static parse(l,f){if(l.length!==2)return f.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(ni(l[1])){const y=l[1];if(y.type==="FeatureCollection"){const L=[];for(const C of y.features){const{type:H,coordinates:P}=C.geometry;H==="Polygon"&&L.push(P),H==="MultiPolygon"&&L.push(...P)}if(L.length)return new oe(y,{type:"MultiPolygon",coordinates:L})}else if(y.type==="Feature"){const L=y.geometry.type;if(L==="Polygon"||L==="MultiPolygon")return new oe(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new oe(y,y)}return f.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(f,y){const L=[1/0,1/0,-1/0,-1/0],C=[1/0,1/0,-1/0,-1/0],H=f.canonicalID();if(y.type==="Polygon"){const P=Qe(y.coordinates,C,H),B=vr(f.geometry(),L,C,H);if(!F(L,C))return!1;for(const G of B)if(!ut(G,P))return!1}if(y.type==="MultiPolygon"){const P=ar(y.coordinates,C,H),B=vr(f.geometry(),L,C,H);if(!F(L,C))return!1;for(const G of B)if(!_t(G,P))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(f,y){const L=[1/0,1/0,-1/0,-1/0],C=[1/0,1/0,-1/0,-1/0],H=f.canonicalID();if(y.type==="Polygon"){const P=Qe(y.coordinates,C,H),B=i1(f.geometry(),L,C,H);if(!F(L,C))return!1;for(const G of B)if(!_e(G,P))return!1}if(y.type==="MultiPolygon"){const P=ar(y.coordinates,C,H),B=i1(f.geometry(),L,C,H);if(!F(L,C))return!1;for(const G of B)if(!ve(G,P))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Ye{constructor(l,f){this.type=f.type,this.name=l,this.boundExpression=f}static parse(l,f){if(l.length!==2||typeof l[1]!="string")return f.error("'var' expression requires exactly one string literal argument.");const y=l[1];return f.scope.has(y)?new Ye(y,f.scope.get(y)):f.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class Vr{constructor(l,f,y,L){this.name=l,this.type=f,this._evaluate=y,this.args=L}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,f){const y=l[0],L=Vr.definitions[y];if(!L)return f.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const C=Array.isArray(L)?L[0]:L.type,H=Array.isArray(L)?[[L[1],L[2]]]:L.overloads,P=H.filter(([G])=>!Array.isArray(G)||G.length===l.length-1);let B=null;for(const[G,X]of P){B=new ma(f.registry,qn,f.path,null,f.scope);const Y=[];let at=!1;for(let lt=1;lt<l.length;lt++){const ht=l[lt],Tt=Array.isArray(G)?G[lt-1]:G.type,bt=B.parse(ht,1+Y.length,Tt);if(!bt){at=!0;break}Y.push(bt)}if(!at)if(Array.isArray(G)&&G.length!==Y.length)B.error(`Expected ${G.length} arguments, but found ${Y.length} instead.`);else{for(let lt=0;lt<Y.length;lt++){const ht=Array.isArray(G)?G[lt]:G.type,Tt=Y[lt];B.concat(lt+1).checkSubtype(ht,Tt.type)}if(B.errors.length===0)return new Vr(y,C,X,Y)}}if(P.length===1)f.errors.push(...B.errors);else{const G=(P.length?P:H).map(([Y])=>{return at=Y,Array.isArray(at)?`(${at.map(mt).join(", ")})`:`(${mt(at.type)}...)`;var at}).join(" | "),X=[];for(let Y=1;Y<l.length;Y++){const at=f.parse(l[Y],1+X.length);if(!at)return null;X.push(mt(at.type))}f.error(`Expected arguments of type ${G}, but found (${X.join(", ")}) instead.`)}return null}static register(l,f){Vr.definitions=f;for(const y in f)l[y]=Vr}}function qn(u){if(u instanceof Ye)return qn(u.boundExpression);if(u instanceof Vr&&u.name==="error"||u instanceof $i||u instanceof oe)return!1;const l=u instanceof n1||u instanceof m1;let f=!0;return u.eachChild(y=>{f=l?f&&qn(y):f&&y instanceof zi}),!!f&&Un(u)&&Ns(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Un(u){if(u instanceof Vr&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof oe)return!1;let l=!0;return u.eachChild(f=>{l&&!Un(f)&&(l=!1)}),l}function $a(u){if(u instanceof Vr&&u.name==="feature-state")return!1;let l=!0;return u.eachChild(f=>{l&&!$a(f)&&(l=!1)}),l}function Ns(u,l){if(u instanceof Vr&&l.indexOf(u.name)>=0)return!1;let f=!0;return u.eachChild(y=>{f&&!Ns(y,l)&&(f=!1)}),f}function on(u,l){const f=u.length-1;let y,L,C=0,H=f,P=0;for(;C<=H;)if(P=Math.floor((C+H)/2),y=u[P],L=u[P+1],y<=l){if(P===f||l<L)return P;C=P+1}else{if(!(y>l))throw new cn("Input is not a number.");H=P-1}return 0}class Bo{constructor(l,f,y){this.type=l,this.input=f,this.labels=[],this.outputs=[];for(const[L,C]of y)this.labels.push(L),this.outputs.push(C)}static parse(l,f){if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");const y=f.parse(l[1],1,we);if(!y)return null;const L=[];let C=null;f.expectedType&&f.expectedType.kind!=="value"&&(C=f.expectedType);for(let H=1;H<l.length;H+=2){const P=H===1?-1/0:l[H],B=l[H+1],G=H,X=H+1;if(typeof P!="number")return f.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',G);if(L.length&&L[L.length-1][0]>=P)return f.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',G);const Y=f.parse(B,X,C);if(!Y)return null;C=C||Y.type,L.push([P,Y])}return new Bo(C,y,L)}evaluate(l){const f=this.labels,y=this.outputs;if(f.length===1)return y[0].evaluate(l);const L=this.input.evaluate(l);if(L<=f[0])return y[0].evaluate(l);const C=f.length;return L>=f[C-1]?y[C-1].evaluate(l):y[on(f,L)].evaluate(l)}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function o8(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var G2=E6;function E6(u,l,f,y){this.cx=3*u,this.bx=3*(f-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=f,this.p2y=y}E6.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var f=u,y=0;y<8;y++){var L=this.sampleCurveX(f)-u;if(Math.abs(L)<l)return f;var C=this.sampleCurveDerivativeX(f);if(Math.abs(C)<1e-6)break;f-=L/C}var H=0,P=1;for(f=u,y=0;y<20&&(L=this.sampleCurveX(f),!(Math.abs(L-u)<l));y++)u>L?H=f:P=f,f=.5*(P-H)+H;return f},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var R0=o8(G2);function ga(u,l,f){return u+f*(l-u)}function No(u,l,f){return u.map((y,L)=>ga(y,l[L],f))}const U1={number:ga,color:function(u,l,f,y="rgb"){switch(y){case"rgb":{const[L,C,H,P]=No(u.rgb,l.rgb,f);return new Lr(L,C,H,P,!1)}case"hcl":{const[L,C,H,P]=u.hcl,[B,G,X,Y]=l.hcl;let at,lt;if(isNaN(L)||isNaN(B))isNaN(L)?isNaN(B)?at=NaN:(at=B,H!==1&&H!==0||(lt=G)):(at=L,X!==1&&X!==0||(lt=C));else{let Rt=B-L;B>L&&Rt>180?Rt-=360:B<L&&L-B>180&&(Rt+=360),at=L+f*Rt}const[ht,Tt,bt,wt]=function([Rt,Mt,Vt,re]){return Rt=isNaN(Rt)?0:Rt*Ue,Ur([Vt,Math.cos(Rt)*Mt,Math.sin(Rt)*Mt,re])}([at,lt??ga(C,G,f),ga(H,X,f),ga(P,Y,f)]);return new Lr(ht,Tt,bt,wt,!1)}case"lab":{const[L,C,H,P]=Ur(No(u.lab,l.lab,f));return new Lr(L,C,H,P,!1)}}},array:No,padding:function(u,l,f){return new r1(No(u.values,l.values,f))},variableAnchorOffsetCollection:function(u,l,f){const y=u.values,L=l.values;if(y.length!==L.length)throw new cn(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${l.toString()}`);const C=[];for(let H=0;H<y.length;H+=2){if(y[H]!==L[H])throw new cn(`Cannot interpolate values containing mismatched anchors. from[${H}]: ${y[H]}, to[${H}]: ${L[H]}`);C.push(y[H]);const[P,B]=y[H+1],[G,X]=L[H+1];C.push([ga(P,G,f),ga(B,X,f)])}return new rn(C)}};class V1{constructor(l,f,y,L,C){this.type=l,this.operator=f,this.interpolation=y,this.input=L,this.labels=[],this.outputs=[];for(const[H,P]of C)this.labels.push(H),this.outputs.push(P)}static interpolationFactor(l,f,y,L){let C=0;if(l.name==="exponential")C=Gr(f,l.base,y,L);else if(l.name==="linear")C=Gr(f,1,y,L);else if(l.name==="cubic-bezier"){const H=l.controlPoints;C=new R0(H[0],H[1],H[2],H[3]).solve(Gr(f,1,y,L))}return C}static parse(l,f){let[y,L,C,...H]=l;if(!Array.isArray(L)||L.length===0)return f.error("Expected an interpolation type expression.",1);if(L[0]==="linear")L={name:"linear"};else if(L[0]==="exponential"){const G=L[1];if(typeof G!="number")return f.error("Exponential interpolation requires a numeric base.",1,1);L={name:"exponential",base:G}}else{if(L[0]!=="cubic-bezier")return f.error(`Unknown interpolation type ${String(L[0])}`,1,0);{const G=L.slice(1);if(G.length!==4||G.some(X=>typeof X!="number"||X<0||X>1))return f.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);L={name:"cubic-bezier",controlPoints:G}}}if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");if(C=f.parse(C,2,we),!C)return null;const P=[];let B=null;y==="interpolate-hcl"||y==="interpolate-lab"?B=Mn:f.expectedType&&f.expectedType.kind!=="value"&&(B=f.expectedType);for(let G=0;G<H.length;G+=2){const X=H[G],Y=H[G+1],at=G+3,lt=G+4;if(typeof X!="number")return f.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',at);if(P.length&&P[P.length-1][0]>=X)return f.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',at);const ht=f.parse(Y,lt,B);if(!ht)return null;B=B||ht.type,P.push([X,ht])}return kt(B,we)||kt(B,Mn)||kt(B,yt)||kt(B,ot)||kt(B,dt(we))?new V1(B,y,L,C,P):f.error(`Type ${mt(B)} is not interpolatable.`)}evaluate(l){const f=this.labels,y=this.outputs;if(f.length===1)return y[0].evaluate(l);const L=this.input.evaluate(l);if(L<=f[0])return y[0].evaluate(l);const C=f.length;if(L>=f[C-1])return y[C-1].evaluate(l);const H=on(f,L),P=V1.interpolationFactor(this.interpolation,L,f[H],f[H+1]),B=y[H].evaluate(l),G=y[H+1].evaluate(l);switch(this.operator){case"interpolate":return U1[this.type.kind](B,G,P);case"interpolate-hcl":return U1.color(B,G,P,"hcl");case"interpolate-lab":return U1.color(B,G,P,"lab")}}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Gr(u,l,f,y){const L=y-f,C=u-f;return L===0?0:l===1?C/L:(Math.pow(l,C)-1)/(Math.pow(l,L)-1)}class W3{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expectected at least one argument.");let y=null;const L=f.expectedType;L&&L.kind!=="value"&&(y=L);const C=[];for(const P of l.slice(1)){const B=f.parse(P,1+C.length,y,void 0,{typeAnnotation:"omit"});if(!B)return null;y=y||B.type,C.push(B)}if(!y)throw new Error("No output type");const H=L&&C.some(P=>Ht(L,P.type));return new W3(H?or:y,C)}evaluate(l){let f,y=null,L=0;for(const C of this.args)if(L++,y=C.evaluate(l),y&&y instanceof M1&&!y.available&&(f||(f=y.name),y=null,L===this.args.length&&(y=f)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class q3{constructor(l,f){this.type=f.type,this.bindings=[].concat(l),this.result=f}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const f of this.bindings)l(f[1]);l(this.result)}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let C=1;C<l.length-1;C+=2){const H=l[C];if(typeof H!="string")return f.error(`Expected string, but found ${typeof H} instead.`,C);if(/[^a-zA-Z0-9_]/.test(H))return f.error("Variable names must contain only alphanumeric characters or '_'.",C);const P=f.parse(l[C+1],C+1);if(!P)return null;y.push([H,P])}const L=f.parse(l[l.length-1],l.length-1,f.expectedType,y);return L?new q3(y,L):null}outputDefined(){return this.result.outputDefined()}}class X3{constructor(l,f,y){this.type=l,this.index=f,this.input=y}static parse(l,f){if(l.length!==3)return f.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,we),L=f.parse(l[2],2,dt(f.expectedType||or));return y&&L?new X3(L.type.itemType,y,L):null}evaluate(l){const f=this.index.evaluate(l),y=this.input.evaluate(l);if(f<0)throw new cn(`Array index out of bounds: ${f} < 0.`);if(f>=y.length)throw new cn(`Array index out of bounds: ${f} > ${y.length-1}.`);if(f!==Math.floor(f))throw new cn(`Array index must be an integer, but found ${f} instead.`);return y[f]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class K3{constructor(l,f){this.type=dr,this.needle=l,this.haystack=f}static parse(l,f){if(l.length!==3)return f.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,or),L=f.parse(l[2],2,or);return y&&L?It(y.type,[dr,yr,we,zn,or])?new K3(y,L):f.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`):null}evaluate(l){const f=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!Et(f,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Wr(f))} instead.`);if(!Et(y,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${mt(Wr(y))} instead.`);return y.indexOf(f)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Fs{constructor(l,f,y){this.type=we,this.needle=l,this.haystack=f,this.fromIndex=y}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,or),L=f.parse(l[2],2,or);if(!y||!L)return null;if(!It(y.type,[dr,yr,we,zn,or]))return f.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`);if(l.length===4){const C=f.parse(l[3],3,we);return C?new Fs(y,L,C):null}return new Fs(y,L)}evaluate(l){const f=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!Et(f,["boolean","string","number","null"]))throw new cn(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Wr(f))} instead.`);if(!Et(y,["string","array"]))throw new cn(`Expected second argument to be of type array or string, but found ${mt(Wr(y))} instead.`);if(this.fromIndex){const L=this.fromIndex.evaluate(l);return y.indexOf(f,L)}return y.indexOf(f)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class M6{constructor(l,f,y,L,C,H){this.inputType=l,this.type=f,this.input=y,this.cases=L,this.outputs=C,this.otherwise=H}static parse(l,f){if(l.length<5)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return f.error("Expected an even number of arguments.");let y,L;f.expectedType&&f.expectedType.kind!=="value"&&(L=f.expectedType);const C={},H=[];for(let G=2;G<l.length-1;G+=2){let X=l[G];const Y=l[G+1];Array.isArray(X)||(X=[X]);const at=f.concat(G);if(X.length===0)return at.error("Expected at least one branch label.");for(const ht of X){if(typeof ht!="number"&&typeof ht!="string")return at.error("Branch labels must be numbers or strings.");if(typeof ht=="number"&&Math.abs(ht)>Number.MAX_SAFE_INTEGER)return at.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ht=="number"&&Math.floor(ht)!==ht)return at.error("Numeric branch labels must be integer values.");if(y){if(at.checkSubtype(y,Wr(ht)))return null}else y=Wr(ht);if(C[String(ht)]!==void 0)return at.error("Branch labels must be unique.");C[String(ht)]=H.length}const lt=f.parse(Y,G,L);if(!lt)return null;L=L||lt.type,H.push(lt)}const P=f.parse(l[1],1,or);if(!P)return null;const B=f.parse(l[l.length-1],l.length-1,L);return B?P.type.kind!=="value"&&f.concat(1).checkSubtype(y,P.type)?null:new M6(y,L,P,C,H,B):null}evaluate(l){const f=this.input.evaluate(l);return(Wr(f)===this.inputType&&this.outputs[this.cases[f]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class A6{constructor(l,f,y){this.type=l,this.branches=f,this.otherwise=y}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return f.error("Expected an odd number of arguments.");let y;f.expectedType&&f.expectedType.kind!=="value"&&(y=f.expectedType);const L=[];for(let H=1;H<l.length-1;H+=2){const P=f.parse(l[H],H,dr);if(!P)return null;const B=f.parse(l[H+1],H+1,y);if(!B)return null;L.push([P,B]),y=y||B.type}const C=f.parse(l[l.length-1],l.length-1,y);if(!C)return null;if(!y)throw new Error("Can't infer output type");return new A6(y,L,C)}evaluate(l){for(const[f,y]of this.branches)if(f.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[f,y]of this.branches)l(f),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,f])=>f.outputDefined())&&this.otherwise.outputDefined()}}class Ua{constructor(l,f,y,L){this.type=l,this.input=f,this.beginIndex=y,this.endIndex=L}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,or),L=f.parse(l[2],2,we);if(!y||!L)return null;if(!It(y.type,[dt(or),yr,or]))return f.error(`Expected first argument to be of type array or string, but found ${mt(y.type)} instead`);if(l.length===4){const C=f.parse(l[3],3,we);return C?new Ua(y.type,y,L,C):null}return new Ua(y.type,y,L)}evaluate(l){const f=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!Et(f,["string","array"]))throw new cn(`Expected first argument to be of type array or string, but found ${mt(Wr(f))} instead.`);if(this.endIndex){const L=this.endIndex.evaluate(l);return f.slice(y,L)}return f.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function Y3(u,l){return u==="=="||u==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function S6(u,l,f,y){return y.compare(l,f)===0}function ii(u,l,f){const y=u!=="=="&&u!=="!=";return class BR{constructor(C,H,P){this.type=dr,this.lhs=C,this.rhs=H,this.collator=P,this.hasUntypedArgument=C.type.kind==="value"||H.type.kind==="value"}static parse(C,H){if(C.length!==3&&C.length!==4)return H.error("Expected two or three arguments.");const P=C[0];let B=H.parse(C[1],1,or);if(!B)return null;if(!Y3(P,B.type))return H.concat(1).error(`"${P}" comparisons are not supported for type '${mt(B.type)}'.`);let G=H.parse(C[2],2,or);if(!G)return null;if(!Y3(P,G.type))return H.concat(2).error(`"${P}" comparisons are not supported for type '${mt(G.type)}'.`);if(B.type.kind!==G.type.kind&&B.type.kind!=="value"&&G.type.kind!=="value")return H.error(`Cannot compare types '${mt(B.type)}' and '${mt(G.type)}'.`);y&&(B.type.kind==="value"&&G.type.kind!=="value"?B=new m1(G.type,[B]):B.type.kind!=="value"&&G.type.kind==="value"&&(G=new m1(B.type,[G])));let X=null;if(C.length===4){if(B.type.kind!=="string"&&G.type.kind!=="string"&&B.type.kind!=="value"&&G.type.kind!=="value")return H.error("Cannot use collator to compare non-string types.");if(X=H.parse(C[3],3,Fi),!X)return null}return new BR(B,G,X)}evaluate(C){const H=this.lhs.evaluate(C),P=this.rhs.evaluate(C);if(y&&this.hasUntypedArgument){const B=Wr(H),G=Wr(P);if(B.kind!==G.kind||B.kind!=="string"&&B.kind!=="number")throw new cn(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${B.kind}, ${G.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const B=Wr(H),G=Wr(P);if(B.kind!=="string"||G.kind!=="string")return l(C,H,P)}return this.collator?f(C,H,P,this.collator.evaluate(C)):l(C,H,P)}eachChild(C){C(this.lhs),C(this.rhs),this.collator&&C(this.collator)}outputDefined(){return!0}}}const B0=ii("==",function(u,l,f){return l===f},S6),N0=ii("!=",function(u,l,f){return l!==f},function(u,l,f,y){return!S6(0,l,f,y)}),s8=ii("<",function(u,l,f){return l<f},function(u,l,f,y){return y.compare(l,f)<0}),F0=ii(">",function(u,l,f){return l>f},function(u,l,f,y){return y.compare(l,f)>0}),J3=ii("<=",function(u,l,f){return l<=f},function(u,l,f,y){return y.compare(l,f)<=0}),j0=ii(">=",function(u,l,f){return l>=f},function(u,l,f,y){return y.compare(l,f)>=0});class t4{constructor(l,f,y,L,C){this.type=yr,this.number=l,this.locale=f,this.currency=y,this.minFractionDigits=L,this.maxFractionDigits=C}static parse(l,f){if(l.length!==3)return f.error("Expected two arguments.");const y=f.parse(l[1],1,we);if(!y)return null;const L=l[2];if(typeof L!="object"||Array.isArray(L))return f.error("NumberFormat options argument must be an object.");let C=null;if(L.locale&&(C=f.parse(L.locale,1,yr),!C))return null;let H=null;if(L.currency&&(H=f.parse(L.currency,1,yr),!H))return null;let P=null;if(L["min-fraction-digits"]&&(P=f.parse(L["min-fraction-digits"],1,we),!P))return null;let B=null;return L["max-fraction-digits"]&&(B=f.parse(L["max-fraction-digits"],1,we),!B)?null:new t4(y,C,H,P,B)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class e4{constructor(l){this.type=dn,this.sections=l}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return f.error("First argument must be an image or text section.");const L=[];let C=!1;for(let H=1;H<=l.length-1;++H){const P=l[H];if(C&&typeof P=="object"&&!Array.isArray(P)){C=!1;let B=null;if(P["font-scale"]&&(B=f.parse(P["font-scale"],1,we),!B))return null;let G=null;if(P["text-font"]&&(G=f.parse(P["text-font"],1,dt(yr)),!G))return null;let X=null;if(P["text-color"]&&(X=f.parse(P["text-color"],1,Mn),!X))return null;const Y=L[L.length-1];Y.scale=B,Y.font=G,Y.textColor=X}else{const B=f.parse(l[H],1,or);if(!B)return null;const G=B.type.kind;if(G!=="string"&&G!=="value"&&G!=="null"&&G!=="resolvedImage")return f.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");C=!0,L.push({content:B,scale:null,font:null,textColor:null})}}return new e4(L)}evaluate(l){return new An(this.sections.map(f=>{const y=f.content.evaluate(l);return Wr(y)===it?new an("",y,null,null,null):new an(L2(y),null,f.scale?f.scale.evaluate(l):null,f.font?f.font.evaluate(l).join(","):null,f.textColor?f.textColor.evaluate(l):null)}))}eachChild(l){for(const f of this.sections)l(f.content),f.scale&&l(f.scale),f.font&&l(f.font),f.textColor&&l(f.textColor)}outputDefined(){return!1}}class Z2{constructor(l){this.type=it,this.input=l}static parse(l,f){if(l.length!==2)return f.error("Expected two arguments.");const y=f.parse(l[1],1,yr);return y?new Z2(y):f.error("No image name provided.")}evaluate(l){const f=this.input.evaluate(l),y=M1.fromString(f);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(f)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class r4{constructor(l){this.type=we,this.input=l}static parse(l,f){if(l.length!==2)return f.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=f.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?f.error(`Expected argument of type string or array, but found ${mt(y.type)} instead.`):new r4(y):null}evaluate(l){const f=this.input.evaluate(l);if(typeof f=="string"||Array.isArray(f))return f.length;throw new cn(`Expected value to be of type string or array, but found ${mt(Wr(f))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const Fo={"==":B0,"!=":N0,">":F0,"<":s8,">=":j0,"<=":J3,array:m1,at:X3,boolean:m1,case:A6,coalesce:W3,collator:$i,format:e4,image:Z2,in:K3,"index-of":Fs,interpolate:V1,"interpolate-hcl":V1,"interpolate-lab":V1,length:r4,let:q3,literal:zi,match:M6,number:m1,"number-format":t4,object:m1,slice:Ua,step:Bo,string:m1,"to-boolean":n1,"to-color":n1,"to-number":n1,"to-string":n1,var:Ye,within:oe};function z0(u,[l,f,y,L]){l=l.evaluate(u),f=f.evaluate(u),y=y.evaluate(u);const C=L?L.evaluate(u):1,H=ri(l,f,y,C);if(H)throw new cn(H);return new Lr(l/255,f/255,y/255,C,!1)}function n4(u,l){return u in l}function Ga(u,l){const f=l[u];return f===void 0?null:f}function W2(u){return{type:u}}function i4(u){return{result:"success",value:u}}function ya(u){return{result:"error",value:u}}function E2(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function $0(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function C6(u){return!!u.expression&&u.expression.interpolated}function $r(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function a4(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function l8(u){return u}function H6(u,l){const f=l.type==="color",y=u.stops&&typeof u.stops[0][0]=="object",L=y||!(y||u.property!==void 0),C=u.type||(C6(l)?"exponential":"interval");if(f||l.type==="padding"){const X=f?Lr.parse:r1.parse;(u=u1({},u)).stops&&(u.stops=u.stops.map(Y=>[Y[0],X(Y[1])])),u.default=X(u.default?u.default:l.default)}if(u.colorSpace&&(H=u.colorSpace)!=="rgb"&&H!=="hcl"&&H!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var H;let P,B,G;if(C==="exponential")P=wr;else if(C==="interval")P=q2;else if(C==="categorical"){P=fn,B=Object.create(null);for(const X of u.stops)B[X[0]]=X[1];G=typeof u.stops[0][0]}else{if(C!=="identity")throw new Error(`Unknown function type "${C}"`);P=jo}if(y){const X={},Y=[];for(let ht=0;ht<u.stops.length;ht++){const Tt=u.stops[ht],bt=Tt[0].zoom;X[bt]===void 0&&(X[bt]={zoom:bt,type:u.type,property:u.property,default:u.default,stops:[]},Y.push(bt)),X[bt].stops.push([Tt[0].value,Tt[1]])}const at=[];for(const ht of Y)at.push([X[ht].zoom,H6(X[ht],l)]);const lt={name:"linear"};return{kind:"composite",interpolationType:lt,interpolationFactor:V1.interpolationFactor.bind(void 0,lt),zoomStops:at.map(ht=>ht[0]),evaluate:({zoom:ht},Tt)=>wr({stops:at,base:u.base},l,ht).evaluate(ht,Tt)}}if(L){const X=C==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:X,interpolationFactor:V1.interpolationFactor.bind(void 0,X),zoomStops:u.stops.map(Y=>Y[0]),evaluate:({zoom:Y})=>P(u,l,Y,B,G)}}return{kind:"source",evaluate(X,Y){const at=Y&&Y.properties?Y.properties[u.property]:void 0;return at===void 0?Za(u.default,l.default):P(u,l,at,B,G)}}}function Za(u,l,f){return u!==void 0?u:l!==void 0?l:f!==void 0?f:void 0}function fn(u,l,f,y,L){return Za(typeof f===L?y[f]:void 0,u.default,l.default)}function q2(u,l,f){if($r(f)!=="number")return Za(u.default,l.default);const y=u.stops.length;if(y===1||f<=u.stops[0][0])return u.stops[0][1];if(f>=u.stops[y-1][0])return u.stops[y-1][1];const L=on(u.stops.map(C=>C[0]),f);return u.stops[L][1]}function wr(u,l,f){const y=u.base!==void 0?u.base:1;if($r(f)!=="number")return Za(u.default,l.default);const L=u.stops.length;if(L===1||f<=u.stops[0][0])return u.stops[0][1];if(f>=u.stops[L-1][0])return u.stops[L-1][1];const C=on(u.stops.map(X=>X[0]),f),H=function(X,Y,at,lt){const ht=lt-at,Tt=X-at;return ht===0?0:Y===1?Tt/ht:(Math.pow(Y,Tt)-1)/(Math.pow(Y,ht)-1)}(f,y,u.stops[C][0],u.stops[C+1][0]),P=u.stops[C][1],B=u.stops[C+1][1],G=U1[l.type]||l8;return typeof P.evaluate=="function"?{evaluate(...X){const Y=P.evaluate.apply(void 0,X),at=B.evaluate.apply(void 0,X);if(Y!==void 0&&at!==void 0)return G(Y,at,H,u.colorSpace)}}:G(P,B,H,u.colorSpace)}function jo(u,l,f){switch(l.type){case"color":f=Lr.parse(f);break;case"formatted":f=An.fromString(f.toString());break;case"resolvedImage":f=M1.fromString(f.toString());break;case"padding":f=r1.parse(f);break;default:$r(f)===l.type||l.type==="enum"&&l.values[f]||(f=void 0)}return Za(f,u.default,l.default)}Vr.register(Fo,{error:[{kind:"error"},[yr],(u,[l])=>{throw new cn(l.evaluate(u))}],typeof:[yr,[or],(u,[l])=>mt(Wr(l.evaluate(u)))],"to-rgba":[dt(we,4),[Mn],(u,[l])=>{const[f,y,L,C]=l.evaluate(u).rgb;return[255*f,255*y,255*L,C]}],rgb:[Mn,[we,we,we],z0],rgba:[Mn,[we,we,we,we],z0],has:{type:dr,overloads:[[[yr],(u,[l])=>n4(l.evaluate(u),u.properties())],[[yr,p1],(u,[l,f])=>n4(l.evaluate(u),f.evaluate(u))]]},get:{type:or,overloads:[[[yr],(u,[l])=>Ga(l.evaluate(u),u.properties())],[[yr,p1],(u,[l,f])=>Ga(l.evaluate(u),f.evaluate(u))]]},"feature-state":[or,[yr],(u,[l])=>Ga(l.evaluate(u),u.featureState||{})],properties:[p1,[],u=>u.properties()],"geometry-type":[yr,[],u=>u.geometryType()],id:[or,[],u=>u.id()],zoom:[we,[],u=>u.globals.zoom],"heatmap-density":[we,[],u=>u.globals.heatmapDensity||0],"line-progress":[we,[],u=>u.globals.lineProgress||0],accumulated:[or,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[we,W2(we),(u,l)=>{let f=0;for(const y of l)f+=y.evaluate(u);return f}],"*":[we,W2(we),(u,l)=>{let f=1;for(const y of l)f*=y.evaluate(u);return f}],"-":{type:we,overloads:[[[we,we],(u,[l,f])=>l.evaluate(u)-f.evaluate(u)],[[we],(u,[l])=>-l.evaluate(u)]]},"/":[we,[we,we],(u,[l,f])=>l.evaluate(u)/f.evaluate(u)],"%":[we,[we,we],(u,[l,f])=>l.evaluate(u)%f.evaluate(u)],ln2:[we,[],()=>Math.LN2],pi:[we,[],()=>Math.PI],e:[we,[],()=>Math.E],"^":[we,[we,we],(u,[l,f])=>Math.pow(l.evaluate(u),f.evaluate(u))],sqrt:[we,[we],(u,[l])=>Math.sqrt(l.evaluate(u))],log10:[we,[we],(u,[l])=>Math.log(l.evaluate(u))/Math.LN10],ln:[we,[we],(u,[l])=>Math.log(l.evaluate(u))],log2:[we,[we],(u,[l])=>Math.log(l.evaluate(u))/Math.LN2],sin:[we,[we],(u,[l])=>Math.sin(l.evaluate(u))],cos:[we,[we],(u,[l])=>Math.cos(l.evaluate(u))],tan:[we,[we],(u,[l])=>Math.tan(l.evaluate(u))],asin:[we,[we],(u,[l])=>Math.asin(l.evaluate(u))],acos:[we,[we],(u,[l])=>Math.acos(l.evaluate(u))],atan:[we,[we],(u,[l])=>Math.atan(l.evaluate(u))],min:[we,W2(we),(u,l)=>Math.min(...l.map(f=>f.evaluate(u)))],max:[we,W2(we),(u,l)=>Math.max(...l.map(f=>f.evaluate(u)))],abs:[we,[we],(u,[l])=>Math.abs(l.evaluate(u))],round:[we,[we],(u,[l])=>{const f=l.evaluate(u);return f<0?-Math.round(-f):Math.round(f)}],floor:[we,[we],(u,[l])=>Math.floor(l.evaluate(u))],ceil:[we,[we],(u,[l])=>Math.ceil(l.evaluate(u))],"filter-==":[dr,[yr,or],(u,[l,f])=>u.properties()[l.value]===f.value],"filter-id-==":[dr,[or],(u,[l])=>u.id()===l.value],"filter-type-==":[dr,[yr],(u,[l])=>u.geometryType()===l.value],"filter-<":[dr,[yr,or],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y<L}],"filter-id-<":[dr,[or],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f<y}],"filter->":[dr,[yr,or],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y>L}],"filter-id->":[dr,[or],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f>y}],"filter-<=":[dr,[yr,or],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y<=L}],"filter-id-<=":[dr,[or],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f<=y}],"filter->=":[dr,[yr,or],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y>=L}],"filter-id->=":[dr,[or],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f>=y}],"filter-has":[dr,[or],(u,[l])=>l.value in u.properties()],"filter-has-id":[dr,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[dr,[dt(yr)],(u,[l])=>l.value.indexOf(u.geometryType())>=0],"filter-id-in":[dr,[dt(or)],(u,[l])=>l.value.indexOf(u.id())>=0],"filter-in-small":[dr,[yr,dt(or)],(u,[l,f])=>f.value.indexOf(u.properties()[l.value])>=0],"filter-in-large":[dr,[yr,dt(or)],(u,[l,f])=>function(y,L,C,H){for(;C<=H;){const P=C+H>>1;if(L[P]===y)return!0;L[P]>y?H=P-1:C=P+1}return!1}(u.properties()[l.value],f.value,0,f.value.length-1)],all:{type:dr,overloads:[[[dr,dr],(u,[l,f])=>l.evaluate(u)&&f.evaluate(u)],[W2(dr),(u,l)=>{for(const f of l)if(!f.evaluate(u))return!1;return!0}]]},any:{type:dr,overloads:[[[dr,dr],(u,[l,f])=>l.evaluate(u)||f.evaluate(u)],[W2(dr),(u,l)=>{for(const f of l)if(f.evaluate(u))return!0;return!1}]]},"!":[dr,[dr],(u,[l])=>!l.evaluate(u)],"is-supported-script":[dr,[yr],(u,[l])=>{const f=u.globals&&u.globals.isSupportedScript;return!f||f(l.evaluate(u))}],upcase:[yr,[yr],(u,[l])=>l.evaluate(u).toUpperCase()],downcase:[yr,[yr],(u,[l])=>l.evaluate(u).toLowerCase()],concat:[yr,W2(or),(u,l)=>l.map(f=>L2(f.evaluate(u))).join("")],"resolved-locale":[yr,[Fi],(u,[l])=>l.evaluate(u).resolvedLocale()]});class Xr{constructor(l,f){var y;this.expression=l,this._warningHistory={},this._evaluator=new qr,this._defaultValue=f?(y=f).type==="color"&&a4(y.default)?new Lr(0,0,0,0):y.type==="color"?Lr.parse(y.default)||null:y.type==="padding"?r1.parse(y.default)||null:y.type==="variableAnchorOffsetCollection"?rn.parse(y.default)||null:y.default===void 0?null:y.default:null,this._enumValues=f&&f.type==="enum"?f.values:null}evaluateWithoutErrorHandling(l,f,y,L,C,H){return this._evaluator.globals=l,this._evaluator.feature=f,this._evaluator.featureState=y,this._evaluator.canonical=L,this._evaluator.availableImages=C||null,this._evaluator.formattedSection=H,this.expression.evaluate(this._evaluator)}evaluate(l,f,y,L,C,H){this._evaluator.globals=l,this._evaluator.feature=f||null,this._evaluator.featureState=y||null,this._evaluator.canonical=L,this._evaluator.availableImages=C||null,this._evaluator.formattedSection=H||null;try{const P=this.expression.evaluate(this._evaluator);if(P==null||typeof P=="number"&&P!=P)return this._defaultValue;if(this._enumValues&&!(P in this._enumValues))throw new cn(`Expected value to be one of ${Object.keys(this._enumValues).map(B=>JSON.stringify(B)).join(", ")}, but found ${JSON.stringify(P)} instead.`);return P}catch(P){return this._warningHistory[P.message]||(this._warningHistory[P.message]=!0,typeof console<"u"&&console.warn(P.message)),this._defaultValue}}}function un(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Fo}function M2(u,l){const f=new ma(Fo,qn,[],l?function(L){const C={color:Mn,string:yr,number:we,enum:yr,boolean:dr,formatted:dn,padding:yt,resolvedImage:it,variableAnchorOffsetCollection:ot};return L.type==="array"?dt(C[L.value]||or,L.length):C[L.type]}(l):void 0),y=f.parse(u,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?i4(new Xr(y,l)):ya(f.errors)}class _a{constructor(l,f){this.kind=l,this._styleExpression=f,this.isStateDependent=l!=="constant"&&!$a(f.expression)}evaluateWithoutErrorHandling(l,f,y,L,C,H){return this._styleExpression.evaluateWithoutErrorHandling(l,f,y,L,C,H)}evaluate(l,f,y,L,C,H){return this._styleExpression.evaluate(l,f,y,L,C,H)}}class o4{constructor(l,f,y,L){this.kind=l,this.zoomStops=y,this._styleExpression=f,this.isStateDependent=l!=="camera"&&!$a(f.expression),this.interpolationType=L}evaluateWithoutErrorHandling(l,f,y,L,C,H){return this._styleExpression.evaluateWithoutErrorHandling(l,f,y,L,C,H)}evaluate(l,f,y,L,C,H){return this._styleExpression.evaluate(l,f,y,L,C,H)}interpolationFactor(l,f,y){return this.interpolationType?V1.interpolationFactor(this.interpolationType,l,f,y):0}}function O6(u,l){const f=M2(u,l);if(f.result==="error")return f;const y=f.value.expression,L=Un(y);if(!L&&!E2(l))return ya([new gn("","data expressions not supported")]);const C=Ns(y,["zoom"]);if(!C&&!$0(l))return ya([new gn("","zoom expressions not supported")]);const H=l4(y);return H||C?H instanceof gn?ya([H]):H instanceof V1&&!C6(l)?ya([new gn("",'"interpolate" expressions cannot be used with this property')]):i4(H?new o4(L?"camera":"composite",f.value,H.labels,H instanceof V1?H.interpolation:void 0):new _a(L?"constant":"source",f.value)):ya([new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class s4{constructor(l,f){this._parameters=l,this._specification=f,u1(this,H6(this._parameters,this._specification))}static deserialize(l){return new s4(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function l4(u){let l=null;if(u instanceof q3)l=l4(u.result);else if(u instanceof W3){for(const f of u.args)if(l=l4(f),l)break}else(u instanceof Bo||u instanceof V1)&&u.input instanceof Vr&&u.input.name==="zoom"&&(l=u);return l instanceof gn||u.eachChild(f=>{const y=l4(f);y instanceof gn?l=y:!l&&y?l=new gn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new gn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function js(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const l of u.slice(1))if(!js(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const V6={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Wa(u){if(u==null)return{filter:()=>!0,needGeometry:!1};js(u)||(u=s2(u));const l=M2(u,V6);if(l.result==="error")throw new Error(l.value.map(f=>`${f.key}: ${f.message}`).join(", "));return{filter:(f,y,L)=>l.value.evaluate(f,y,{},L),needGeometry:c4(u)}}function qa(u,l){return u<l?-1:u>l?1:0}function c4(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let l=1;l<u.length;l++)if(c4(u[l]))return!0;return!1}function s2(u){if(!u)return!0;const l=u[0];return u.length<=1?l!=="any":l==="=="?I6(u[1],u[2],"=="):l==="!="?u4(I6(u[1],u[2],"==")):l==="<"||l===">"||l==="<="||l===">="?I6(u[1],u[2],l):l==="any"?(f=u.slice(1),["any"].concat(f.map(s2))):l==="all"?["all"].concat(u.slice(1).map(s2)):l==="none"?["all"].concat(u.slice(1).map(s2).map(u4)):l==="in"?va(u[1],u.slice(2)):l==="!in"?u4(va(u[1],u.slice(2))):l==="has"?D6(u[1]):l==="!has"?u4(D6(u[1])):l!=="within"||u;var f}function I6(u,l,f){switch(u){case"$type":return[`filter-type-${f}`,l];case"$id":return[`filter-id-${f}`,l];default:return[`filter-${f}`,u,l]}}function va(u,l){if(l.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(f=>typeof f!=typeof l[0])?["filter-in-large",u,["literal",l.sort(qa)]]:["filter-in-small",u,["literal",l]]}}function D6(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function u4(u){return["!",u]}function zo(u){const l=typeof u;if(l==="number"||l==="boolean"||l==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let L="[";for(const C of u)L+=`${zo(C)},`;return`${L}]`}const f=Object.keys(u).sort();let y="{";for(let L=0;L<f.length;L++)y+=`${JSON.stringify(f[L])}:${zo(u[f[L]])},`;return`${y}}`}function P6(u){let l="";for(const f of Dr)l+=`/${zo(u[f])}`;return l}function k6(u){const l=u.value;return l?[new Te(u.key,l,"constants have been deprecated as of v8")]:[]}function Cn(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function X2(u){if(Array.isArray(u))return u.map(X2);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const l={};for(const f in u)l[f]=X2(u[f]);return l}return Cn(u)}function g1(u){const l=u.key,f=u.value,y=u.valueSpec||{},L=u.objectElementValidators||{},C=u.style,H=u.styleSpec,P=u.validateSpec;let B=[];const G=$r(f);if(G!=="object")return[new Te(l,f,`object expected, ${G} found`)];for(const X in f){const Y=X.split(".")[0],at=y[Y]||y["*"];let lt;if(L[Y])lt=L[Y];else if(y[Y])lt=P;else if(L["*"])lt=L["*"];else{if(!y["*"]){B.push(new Te(l,f[X],`unknown property "${X}"`));continue}lt=P}B=B.concat(lt({key:(l&&`${l}.`)+X,value:f[X],valueSpec:at,style:C,styleSpec:H,object:f,objectKey:X,validateSpec:P},f))}for(const X in y)L[X]||y[X].required&&y[X].default===void 0&&f[X]===void 0&&B.push(new Te(l,f,`missing required property "${X}"`));return B}function h4(u){const l=u.value,f=u.valueSpec,y=u.style,L=u.styleSpec,C=u.key,H=u.arrayElementValidator||u.validateSpec;if($r(l)!=="array")return[new Te(C,l,`array expected, ${$r(l)} found`)];if(f.length&&l.length!==f.length)return[new Te(C,l,`array length ${f.length} expected, length ${l.length} found`)];if(f["min-length"]&&l.length<f["min-length"])return[new Te(C,l,`array length at least ${f["min-length"]} expected, length ${l.length} found`)];let P={type:f.value,values:f.values};L.$version<7&&(P.function=f.function),$r(f.value)==="object"&&(P=f.value);let B=[];for(let G=0;G<l.length;G++)B=B.concat(H({array:l,arrayIndex:G,value:l[G],valueSpec:P,validateSpec:u.validateSpec,style:y,styleSpec:L,key:`${C}[${G}]`}));return B}function d4(u){const l=u.key,f=u.value,y=u.valueSpec;let L=$r(f);return L==="number"&&f!=f&&(L="NaN"),L!=="number"?[new Te(l,f,`number expected, ${L} found`)]:"minimum"in y&&f<y.minimum?[new Te(l,f,`${f} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&f>y.maximum?[new Te(l,f,`${f} is greater than the maximum value ${y.maximum}`)]:[]}function Pt(u){const l=u.valueSpec,f=Cn(u.value.type);let y,L,C,H={};const P=f!=="categorical"&&u.value.property===void 0,B=!P,G=$r(u.value.stops)==="array"&&$r(u.value.stops[0])==="array"&&$r(u.value.stops[0][0])==="object",X=g1({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(lt){if(f==="identity")return[new Te(lt.key,lt.value,'identity function may not have a "stops" property')];let ht=[];const Tt=lt.value;return ht=ht.concat(h4({key:lt.key,value:Tt,valueSpec:lt.valueSpec,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,arrayElementValidator:Y})),$r(Tt)==="array"&&Tt.length===0&&ht.push(new Te(lt.key,Tt,"array must have at least one stop")),ht},default:function(lt){return lt.validateSpec({key:lt.key,value:lt.value,valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec})}}});return f==="identity"&&P&&X.push(new Te(u.key,u.value,'missing required property "property"')),f==="identity"||u.value.stops||X.push(new Te(u.key,u.value,'missing required property "stops"')),f==="exponential"&&u.valueSpec.expression&&!C6(u.valueSpec)&&X.push(new Te(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(B&&!E2(u.valueSpec)?X.push(new Te(u.key,u.value,"property functions not supported")):P&&!$0(u.valueSpec)&&X.push(new Te(u.key,u.value,"zoom functions not supported"))),f!=="categorical"&&!G||u.value.property!==void 0||X.push(new Te(u.key,u.value,'"property" property is required')),X;function Y(lt){let ht=[];const Tt=lt.value,bt=lt.key;if($r(Tt)!=="array")return[new Te(bt,Tt,`array expected, ${$r(Tt)} found`)];if(Tt.length!==2)return[new Te(bt,Tt,`array length 2 expected, length ${Tt.length} found`)];if(G){if($r(Tt[0])!=="object")return[new Te(bt,Tt,`object expected, ${$r(Tt[0])} found`)];if(Tt[0].zoom===void 0)return[new Te(bt,Tt,"object stop key must have zoom")];if(Tt[0].value===void 0)return[new Te(bt,Tt,"object stop key must have value")];if(C&&C>Cn(Tt[0].zoom))return[new Te(bt,Tt[0].zoom,"stop zoom values must appear in ascending order")];Cn(Tt[0].zoom)!==C&&(C=Cn(Tt[0].zoom),L=void 0,H={}),ht=ht.concat(g1({key:`${bt}[0]`,value:Tt[0],valueSpec:{zoom:{}},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,objectElementValidators:{zoom:d4,value:at}}))}else ht=ht.concat(at({key:`${bt}[0]`,value:Tt[0],valueSpec:{},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec},Tt));return un(X2(Tt[1]))?ht.concat([new Te(`${bt}[1]`,Tt[1],"expressions are not allowed in function stops.")]):ht.concat(lt.validateSpec({key:`${bt}[1]`,value:Tt[1],valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec}))}function at(lt,ht){const Tt=$r(lt.value),bt=Cn(lt.value),wt=lt.value!==null?lt.value:ht;if(y){if(Tt!==y)return[new Te(lt.key,wt,`${Tt} stop domain type must match previous stop domain type ${y}`)]}else y=Tt;if(Tt!=="number"&&Tt!=="string"&&Tt!=="boolean")return[new Te(lt.key,wt,"stop domain value must be a number, string, or boolean")];if(Tt!=="number"&&f!=="categorical"){let Rt=`number expected, ${Tt} found`;return E2(l)&&f===void 0&&(Rt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Te(lt.key,wt,Rt)]}return f!=="categorical"||Tt!=="number"||isFinite(bt)&&Math.floor(bt)===bt?f!=="categorical"&&Tt==="number"&&L!==void 0&&bt<L?[new Te(lt.key,wt,"stop domain values must appear in ascending order")]:(L=bt,f==="categorical"&&bt in H?[new Te(lt.key,wt,"stop domain values must be unique")]:(H[bt]=!0,[])):[new Te(lt.key,wt,`integer expected, found ${bt}`)]}}function Yt(u){const l=(u.expressionContext==="property"?O6:M2)(X2(u.value),u.valueSpec);if(l.result==="error")return l.value.map(y=>new Te(`${u.key}${y.key}`,u.value,y.message));const f=l.value.expression||l.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!f.outputDefined())return[new Te(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!$a(f))return[new Te(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!$a(f))return[new Te(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Ns(f,["zoom","feature-state"]))return[new Te(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Un(f))return[new Te(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Me(u){const l=u.key,f=u.value,y=u.valueSpec,L=[];return Array.isArray(y.values)?y.values.indexOf(Cn(f))===-1&&L.push(new Te(l,f,`expected one of [${y.values.join(", ")}], ${JSON.stringify(f)} found`)):Object.keys(y.values).indexOf(Cn(f))===-1&&L.push(new Te(l,f,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(f)} found`)),L}function nr(u){return js(X2(u.value))?Yt(u1({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):hn(u)}function hn(u){const l=u.value,f=u.key;if($r(l)!=="array")return[new Te(f,l,`array expected, ${$r(l)} found`)];const y=u.styleSpec;let L,C=[];if(l.length<1)return[new Te(f,l,"filter array must have at least 1 element")];switch(C=C.concat(Me({key:`${f}[0]`,value:l[0],valueSpec:y.filter_operator,style:u.style,styleSpec:u.styleSpec})),Cn(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Cn(l[1])==="$type"&&C.push(new Te(f,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&C.push(new Te(f,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(L=$r(l[1]),L!=="string"&&C.push(new Te(`${f}[1]`,l[1],`string expected, ${L} found`)));for(let H=2;H<l.length;H++)L=$r(l[H]),Cn(l[1])==="$type"?C=C.concat(Me({key:`${f}[${H}]`,value:l[H],valueSpec:y.geometry_type,style:u.style,styleSpec:u.styleSpec})):L!=="string"&&L!=="number"&&L!=="boolean"&&C.push(new Te(`${f}[${H}]`,l[H],`string, number, or boolean expected, ${L} found`));break;case"any":case"all":case"none":for(let H=1;H<l.length;H++)C=C.concat(hn({key:`${f}[${H}]`,value:l[H],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":L=$r(l[1]),l.length!==2?C.push(new Te(f,l,`filter array for "${l[0]}" operator must have 2 elements`)):L!=="string"&&C.push(new Te(`${f}[1]`,l[1],`string expected, ${L} found`));break;case"within":L=$r(l[1]),l.length!==2?C.push(new Te(f,l,`filter array for "${l[0]}" operator must have 2 elements`)):L!=="object"&&C.push(new Te(`${f}[1]`,l[1],`object expected, ${L} found`))}return C}function Nr(u,l){const f=u.key,y=u.validateSpec,L=u.style,C=u.styleSpec,H=u.value,P=u.objectKey,B=C[`${l}_${u.layerType}`];if(!B)return[];const G=P.match(/^(.*)-transition$/);if(l==="paint"&&G&&B[G[1]]&&B[G[1]].transition)return y({key:f,value:H,valueSpec:C.transition,style:L,styleSpec:C});const X=u.valueSpec||B[P];if(!X)return[new Te(f,H,`unknown property "${P}"`)];let Y;if($r(H)==="string"&&E2(X)&&!X.tokens&&(Y=/^{([^}]+)}$/.exec(H)))return[new Te(f,H,`"${P}" does not support interpolation syntax
|