@xtctwins/tctwins-bimx-engine 0.1.58 → 0.1.59
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/README.md +4 -4
- package/dist/{AnnotationTool-CUIzdmot.mjs → AnnotationTool-CIrdSDen.mjs} +2 -2
- package/dist/BIMX_Viewer_Lib.es.js +1 -1
- package/dist/BIMX_Viewer_Lib.umd.js +1 -1
- package/dist/{CommentTool-B0u5h1zk.mjs → CommentTool-DvGt-HKZ.mjs} +2 -2
- package/dist/{HiddenTool-Cgyu6HWM.mjs → HiddenTool-BQ_tDOBU.mjs} +1 -1
- package/dist/{InspectorTool-BmzSaHcH.mjs → InspectorTool-Dtl-phTP.mjs} +4 -4
- package/dist/{MeasureTool-CdAGx0wM.mjs → MeasureTool-1NkpxSgS.mjs} +6 -6
- package/dist/{NavigateTool-D05Zqq8P.mjs → NavigateTool-CKl-lXmw.mjs} +1 -1
- package/dist/{RoamTool-COdXW0jT.mjs → RoamTool-Bn-QyBkX.mjs} +1 -1
- package/dist/{ScreenShotTool-CGwB2oea.mjs → ScreenShotTool-DZUGNQF_.mjs} +4 -4
- package/dist/{SectionTool-DLKJct7n.mjs → SectionTool-Ccu5Nwjc.mjs} +6 -6
- package/dist/{SettingTool-BEzBBv3V.mjs → SettingTool-CzrQtqmP.mjs} +6 -6
- package/dist/{StructureTree-Csq04kCj.mjs → StructureTree-FOfnE5OY.mjs} +7 -7
- package/dist/{alert-Bxh5-6H1.mjs → alert-DL_h9R0N.mjs} +2 -2
- package/dist/{closeButton-CF-3iyIU.mjs → closeButton-Bgok51WD.mjs} +1 -1
- package/dist/{debounce-CY3yeoDR.mjs → debounce-WOcAJQlK.mjs} +1 -1
- package/dist/{el-checkbox-DjMz_8Xl.mjs → el-checkbox-D0uFDu_D.mjs} +4 -4
- package/dist/{el-input-B4qlWPIl.mjs → el-input-lPrPNw3V.mjs} +1 -1
- package/dist/{el-input-number-v2OF-yvI.mjs → el-input-number-DEx_X36H.mjs} +4 -4
- package/dist/{index-CO3K10cL.mjs → index-C9di6jCP.mjs} +1 -1
- package/dist/{index-C2tHHLr1.mjs → index-CZqCQLSG.mjs} +12 -12
- package/dist/{index-De5flGDQ.mjs → index-bS7T6ZyK.mjs} +1 -1
- package/dist/{isEqual-KB5yiBC6.mjs → isEqual-B8mSoj2P.mjs} +1 -1
- package/dist/{panel.vue_vue_type_style_index_0_lang-CVd-P7xE.mjs → panel.vue_vue_type_style_index_0_lang-WpQPoozB.mjs} +2 -2
- package/dist/{tallPanel-CDzE0q-I.mjs → tallPanel-CLMuUFHG.mjs} +2 -2
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:b,curr
|
|
|
17
17
|
z-index:-1000 !important;
|
|
18
18
|
top:0 !important;
|
|
19
19
|
right:0 !important;
|
|
20
|
-
`,BI=["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 CI(x){const T=window.getComputedStyle(x),l=T.getPropertyValue("box-sizing"),b=Number.parseFloat(T.getPropertyValue("padding-bottom"))+Number.parseFloat(T.getPropertyValue("padding-top")),M=Number.parseFloat(T.getPropertyValue("border-bottom-width"))+Number.parseFloat(T.getPropertyValue("border-top-width"));return{contextStyle:BI.map(m=>`${m}:${T.getPropertyValue(m)}`).join(";"),paddingSize:b,borderSize:M,boxSizing:l}}function G0(x,T=1,l){var b;Qs||(Qs=document.createElement("textarea"),document.body.appendChild(Qs));const{paddingSize:M,borderSize:_,boxSizing:m,contextStyle:p}=CI(x);Qs.setAttribute("style",`${p};${wI}`),Qs.value=x.value||x.placeholder||"";let g=Qs.scrollHeight;const f={};m==="border-box"?g=g+_:m==="content-box"&&(g=g-M),Qs.value="";const v=Qs.scrollHeight-M;if(oi(T)){let A=v*T;m==="border-box"&&(A=A+M+_),g=Math.max(A,g),f.minHeight=`${A}px`}if(oi(l)){let A=v*l;m==="border-box"&&(A=A+M+_),g=Math.min(A,g)}return f.height=`${g}px`,(b=Qs.parentNode)==null||b.removeChild(Qs),Qs=void 0,f}const xI=mi({id:{type:String,default:void 0},size:Lo,disabled:Boolean,modelValue:{type:Ur([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:Ur([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:Do},prefixIcon:{type:Do},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ur([Object,Array,String]),default:()=>Dk({})},autofocus:Boolean,rows:{type:Number,default:2},...Hs(["ariaLabel"])}),PI={[gi]:x=>cn(x),input:x=>cn(x),change:x=>cn(x),focus:x=>x instanceof FocusEvent,blur:x=>x instanceof FocusEvent,clear:()=>!0,mouseleave:x=>x instanceof MouseEvent,mouseenter:x=>x instanceof MouseEvent,keydown:x=>x instanceof Event,compositionstart:x=>x instanceof CompositionEvent,compositionupdate:x=>x instanceof CompositionEvent,compositionend:x=>x instanceof CompositionEvent},EI=d.defineComponent({name:"ElInput",inheritAttrs:!1}),MI=d.defineComponent({...EI,props:xI,emits:PI,setup(x,{expose:T,emit:l}){const b=x,M=d.useAttrs(),_=d.useSlots(),m=d.computed(()=>{const le={};return b.containerRole==="combobox"&&(le["aria-haspopup"]=M["aria-haspopup"],le["aria-owns"]=M["aria-owns"],le["aria-expanded"]=M["aria-expanded"]),le}),p=d.computed(()=>[b.type==="textarea"?E.b():P.b(),P.m(w.value),P.is("disabled",B.value),P.is("exceed",Ie.value),{[P.b("group")]:_.prepend||_.append,[P.m("prefix")]:_.prefix||b.prefixIcon,[P.m("suffix")]:_.suffix||b.suffixIcon||b.clearable||b.showPassword,[P.bm("suffix","password-clear")]:ee.value&&de.value,[P.b("hidden")]:b.type==="hidden"},M.class]),g=d.computed(()=>[P.e("wrapper"),P.is("focus",j.value)]),f=Ok({excludeKeys:d.computed(()=>Object.keys(m.value))}),{form:v,formItem:A}=No(),{inputId:y}=Ha(b,{formItemContext:A}),w=Oo(),B=Lu(),P=ei("input"),E=ei("textarea"),S=d.shallowRef(),I=d.shallowRef(),F=d.ref(!1),N=d.ref(!1),O=d.ref(),V=d.shallowRef(b.inputStyle),G=d.computed(()=>S.value||I.value),{wrapperRef:U,isFocused:j}=Q0(G,{afterBlur(){var le;b.validateEvent&&((le=A==null?void 0:A.validate)==null||le.call(A,"blur").catch(Ee=>Pi(Ee)))}}),K=d.computed(()=>{var le;return(le=v==null?void 0:v.statusIcon)!=null?le:!1}),$=d.computed(()=>(A==null?void 0:A.validateState)||""),W=d.computed(()=>$.value&&h0[$.value]),L=d.computed(()=>N.value?wn.View:wn.Hide),z=d.computed(()=>[M.style]),H=d.computed(()=>[b.inputStyle,V.value,{resize:b.resize}]),Z=d.computed(()=>to(b.modelValue)?"":String(b.modelValue)),ee=d.computed(()=>b.clearable&&!B.value&&!b.readonly&&!!Z.value&&(j.value||F.value)),de=d.computed(()=>b.showPassword&&!B.value&&!b.readonly&&!!Z.value&&(!!Z.value||j.value)),Y=d.computed(()=>b.showWordLimit&&!!b.maxlength&&(b.type==="text"||b.type==="textarea")&&!B.value&&!b.readonly&&!b.showPassword),Ce=d.computed(()=>Z.value.length),Ie=d.computed(()=>!!Y.value&&Ce.value>Number(b.maxlength)),ye=d.computed(()=>!!_.suffix||!!b.suffixIcon||ee.value||b.showPassword||Y.value||!!$.value&&K.value),[me,Be]=lI(S);So(I,le=>{if(Me(),!Y.value||b.resize!=="both")return;const Ee=le[0],{width:We}=Ee.contentRect;O.value={right:`calc(100% - ${We+15+6}px)`}});const ve=()=>{const{type:le,autosize:Ee}=b;if(!(!Bn||le!=="textarea"||!I.value))if(Ee){const We=jn(Ee)?Ee.minRows:void 0,ze=jn(Ee)?Ee.maxRows:void 0,Je=G0(I.value,We,ze);V.value={overflowY:"hidden",...Je},d.nextTick(()=>{I.value.offsetHeight,V.value=Je})}else V.value={minHeight:G0(I.value).minHeight}},Me=(le=>{let Ee=!1;return()=>{var We;if(Ee||!b.autosize)return;((We=I.value)==null?void 0:We.offsetParent)===null||(le(),Ee=!0)}})(ve),Le=()=>{const le=G.value,Ee=b.formatter?b.formatter(Z.value):Z.value;!le||le.value===Ee||(le.value=Ee)},Ue=async le=>{me();let{value:Ee}=le.target;if(b.formatter&&(Ee=b.parser?b.parser(Ee):Ee),!Xe.value){if(Ee===Z.value){Le();return}l(gi,Ee),l("input",Ee),await d.nextTick(),Le(),Be()}},_e=le=>{l("change",le.target.value)},{isComposing:Xe,handleCompositionStart:we,handleCompositionUpdate:oe,handleCompositionEnd:Ae}=z0({emit:l,afterComposition:Ue}),h=()=>{N.value=!N.value,De()},De=async()=>{var le;await d.nextTick(),(le=G.value)==null||le.focus()},je=()=>{var le;return(le=G.value)==null?void 0:le.blur()},ae=le=>{F.value=!1,l("mouseleave",le)},ue=le=>{F.value=!0,l("mouseenter",le)},ce=le=>{l("keydown",le)},re=()=>{var le;(le=G.value)==null||le.select()},fe=()=>{l(gi,""),l("change",""),l("clear"),l("input","")};return d.watch(()=>b.modelValue,()=>{var le;d.nextTick(()=>ve()),b.validateEvent&&((le=A==null?void 0:A.validate)==null||le.call(A,"change").catch(Ee=>Pi(Ee)))}),d.watch(Z,()=>Le()),d.watch(()=>b.type,async()=>{await d.nextTick(),Le(),ve()}),d.onMounted(()=>{!b.formatter&&b.parser&&Pi("ElInput","If you set the parser, you also need to set the formatter."),Le(),d.nextTick(ve)}),T({input:S,textarea:I,ref:G,textareaStyle:H,autosize:d.toRef(b,"autosize"),isComposing:Xe,focus:De,blur:je,select:re,clear:fe,resizeTextarea:ve}),(le,Ee)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps(d.unref(m),{class:[d.unref(p),{[d.unref(P).bm("group","append")]:le.$slots.append,[d.unref(P).bm("group","prepend")]:le.$slots.prepend}],style:d.unref(z),role:le.containerRole,onMouseenter:ue,onMouseleave:ae}),[d.createCommentVNode(" input "),le.type!=="textarea"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createCommentVNode(" prepend slot "),le.$slots.prepend?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(d.unref(P).be("group","prepend"))},[d.renderSlot(le.$slots,"prepend")],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{ref_key:"wrapperRef",ref:U,class:d.normalizeClass(d.unref(g))},[d.createCommentVNode(" prefix slot "),le.$slots.prefix||le.prefixIcon?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(P).e("prefix"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("prefix-inner"))},[d.renderSlot(le.$slots,"prefix"),le.prefixIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(P).e("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(le.prefixIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("input",d.mergeProps({id:d.unref(y),ref_key:"input",ref:S,class:d.unref(P).e("inner")},d.unref(f),{minlength:le.minlength,maxlength:le.maxlength,type:le.showPassword?N.value?"text":"password":le.type,disabled:d.unref(B),readonly:le.readonly,autocomplete:le.autocomplete,tabindex:le.tabindex,"aria-label":le.ariaLabel,placeholder:le.placeholder,style:le.inputStyle,form:le.form,autofocus:le.autofocus,onCompositionstart:d.unref(we),onCompositionupdate:d.unref(oe),onCompositionend:d.unref(Ae),onInput:Ue,onChange:_e,onKeydown:ce}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),d.createCommentVNode(" suffix slot "),d.unref(ye)?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(P).e("suffix"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("suffix-inner"))},[!d.unref(ee)||!d.unref(de)||!d.unref(Y)?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.renderSlot(le.$slots,"suffix"),le.suffixIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(P).e("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(le.suffixIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],64)):d.createCommentVNode("v-if",!0),d.unref(ee)?(d.openBlock(),d.createBlock(d.unref(mn),{key:1,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("clear")]),onMousedown:d.withModifiers(d.unref(yu),["prevent"]),onClick:fe},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.CircleClose))]),_:1},8,["class","onMousedown"])):d.createCommentVNode("v-if",!0),d.unref(de)?(d.openBlock(),d.createBlock(d.unref(mn),{key:2,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("password")]),onClick:h},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(L))))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),d.unref(Y)?(d.openBlock(),d.createElementBlock("span",{key:3,class:d.normalizeClass(d.unref(P).e("count"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("count-inner"))},d.toDisplayString(d.unref(Ce))+" / "+d.toDisplayString(le.maxlength),3)],2)):d.createCommentVNode("v-if",!0),d.unref($)&&d.unref(W)&&d.unref(K)?(d.openBlock(),d.createBlock(d.unref(mn),{key:4,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("validateIcon"),d.unref(P).is("loading",d.unref($)==="validating")])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(W))))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],2)):d.createCommentVNode("v-if",!0)],2),d.createCommentVNode(" append slot "),le.$slots.append?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(d.unref(P).be("group","append"))},[d.renderSlot(le.$slots,"append")],2)):d.createCommentVNode("v-if",!0)],64)):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[d.createCommentVNode(" textarea "),d.createElementVNode("textarea",d.mergeProps({id:d.unref(y),ref_key:"textarea",ref:I,class:[d.unref(E).e("inner"),d.unref(P).is("focus",d.unref(j))]},d.unref(f),{minlength:le.minlength,maxlength:le.maxlength,tabindex:le.tabindex,disabled:d.unref(B),readonly:le.readonly,autocomplete:le.autocomplete,style:d.unref(H),"aria-label":le.ariaLabel,placeholder:le.placeholder,form:le.form,autofocus:le.autofocus,rows:le.rows,onCompositionstart:d.unref(we),onCompositionupdate:d.unref(oe),onCompositionend:d.unref(Ae),onInput:Ue,onChange:_e,onKeydown:ce}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend"]),d.unref(Y)?(d.openBlock(),d.createElementBlock("span",{key:0,style:d.normalizeStyle(O.value),class:d.normalizeClass(d.unref(P).e("count"))},d.toDisplayString(d.unref(Ce))+" / "+d.toDisplayString(le.maxlength),7)):d.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var SI=ti(MI,[["__file","input.vue"]]);const Ou=Vn(SI),Pl=4,TI={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"}},kI=({move:x,size:T,bar:l})=>({[l.size]:T,transform:`translate${l.axis}(${x}%)`}),BA=Symbol("scrollbarContextKey"),II=mi({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),FI="Thumb";var W0=ti(d.defineComponent({__name:"thumb",props:II,setup(x){const T=x,l=d.inject(BA),b=ei("scrollbar");l||fh(FI,"can not inject scrollbar context");const M=d.ref(),_=d.ref(),m=d.ref({}),p=d.ref(!1);let g=!1,f=!1,v=Bn?document.onselectstart:null;const A=d.computed(()=>TI[T.vertical?"vertical":"horizontal"]),y=d.computed(()=>kI({size:T.size,move:T.move,bar:A.value})),w=d.computed(()=>M.value[A.value.offset]**2/l.wrapElement[A.value.scrollSize]/T.ratio/_.value[A.value.offset]),B=V=>{var G;if(V.stopPropagation(),V.ctrlKey||[1,2].includes(V.button))return;(G=window.getSelection())==null||G.removeAllRanges(),E(V);const U=V.currentTarget;U&&(m.value[A.value.axis]=U[A.value.offset]-(V[A.value.client]-U.getBoundingClientRect()[A.value.direction]))},P=V=>{if(!_.value||!M.value||!l.wrapElement)return;const G=Math.abs(V.target.getBoundingClientRect()[A.value.direction]-V[A.value.client]),U=_.value[A.value.offset]/2,j=(G-U)*100*w.value/M.value[A.value.offset];l.wrapElement[A.value.scroll]=j*l.wrapElement[A.value.scrollSize]/100},E=V=>{V.stopImmediatePropagation(),g=!0,document.addEventListener("mousemove",S),document.addEventListener("mouseup",I),v=document.onselectstart,document.onselectstart=()=>!1},S=V=>{if(!M.value||!_.value||g===!1)return;const G=m.value[A.value.axis];if(!G)return;const U=(M.value.getBoundingClientRect()[A.value.direction]-V[A.value.client])*-1,j=_.value[A.value.offset]-G,K=(U-j)*100*w.value/M.value[A.value.offset];l.wrapElement[A.value.scroll]=K*l.wrapElement[A.value.scrollSize]/100},I=()=>{g=!1,m.value[A.value.axis]=0,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",I),O(),f&&(p.value=!1)},F=()=>{f=!1,p.value=!!T.size},N=()=>{f=!0,p.value=g};d.onBeforeUnmount(()=>{O(),document.removeEventListener("mouseup",I)});const O=()=>{document.onselectstart!==v&&(document.onselectstart=v)};return Sn(d.toRef(l,"scrollbarElement"),"mousemove",F),Sn(d.toRef(l,"scrollbarElement"),"mouseleave",N),(V,G)=>(d.openBlock(),d.createBlock(d.Transition,{name:d.unref(b).b("fade"),persisted:""},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("div",{ref_key:"instance",ref:M,class:d.normalizeClass([d.unref(b).e("bar"),d.unref(b).is(d.unref(A).key)]),onMousedown:P},[d.createElementVNode("div",{ref_key:"thumb",ref:_,class:d.normalizeClass(d.unref(b).e("thumb")),style:d.normalizeStyle(d.unref(y)),onMousedown:B},null,38)],34),[[d.vShow,V.always||p.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const DI=mi({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var RI=ti(d.defineComponent({__name:"bar",props:DI,setup(x,{expose:T}){const l=x,b=d.inject(BA),M=d.ref(0),_=d.ref(0),m=d.ref(""),p=d.ref(""),g=d.ref(1),f=d.ref(1);return T({handleScroll:y=>{if(y){const w=y.offsetHeight-Pl,B=y.offsetWidth-Pl;_.value=y.scrollTop*100/w*g.value,M.value=y.scrollLeft*100/B*f.value}},update:()=>{const y=b==null?void 0:b.wrapElement;if(!y)return;const w=y.offsetHeight-Pl,B=y.offsetWidth-Pl,P=w**2/y.scrollHeight,E=B**2/y.scrollWidth,S=Math.max(P,l.minSize),I=Math.max(E,l.minSize);g.value=P/(w-P)/(S/(w-S)),f.value=E/(B-E)/(I/(B-I)),p.value=S+Pl<w?`${S}px`:"",m.value=I+Pl<B?`${I}px`:""}}),(y,w)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(W0,{move:M.value,ratio:f.value,size:m.value,always:y.always},null,8,["move","ratio","size","always"]),d.createVNode(W0,{move:_.value,ratio:g.value,size:p.value,vertical:"",always:y.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const LI=mi({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ur([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,...Hs(["ariaLabel","ariaOrientation"])}),OI={scroll:({scrollTop:x,scrollLeft:T})=>[x,T].every(oi)},CA="ElScrollbar",NI=d.defineComponent({name:CA}),UI=d.defineComponent({...NI,props:LI,emits:OI,setup(x,{expose:T,emit:l}){const b=x,M=ei("scrollbar");let _,m,p=0,g=0;const f=d.ref(),v=d.ref(),A=d.ref(),y=d.ref(),w=d.computed(()=>{const O={};return b.height&&(O.height=Ah(b.height)),b.maxHeight&&(O.maxHeight=Ah(b.maxHeight)),[b.wrapStyle,O]}),B=d.computed(()=>[b.wrapClass,M.e("wrap"),{[M.em("wrap","hidden-default")]:!b.native}]),P=d.computed(()=>[M.e("view"),b.viewClass]),E=()=>{var O;v.value&&((O=y.value)==null||O.handleScroll(v.value),p=v.value.scrollTop,g=v.value.scrollLeft,l("scroll",{scrollTop:v.value.scrollTop,scrollLeft:v.value.scrollLeft}))};function S(O,V){jn(O)?v.value.scrollTo(O):oi(O)&&oi(V)&&v.value.scrollTo(O,V)}const I=O=>{if(!oi(O)){Pi(CA,"value must be a number");return}v.value.scrollTop=O},F=O=>{if(!oi(O)){Pi(CA,"value must be a number");return}v.value.scrollLeft=O},N=()=>{var O;(O=y.value)==null||O.update()};return d.watch(()=>b.noresize,O=>{O?(_==null||_(),m==null||m()):({stop:_}=So(A,N),m=Sn("resize",N))},{immediate:!0}),d.watch(()=>[b.maxHeight,b.height],()=>{b.native||d.nextTick(()=>{var O;N(),v.value&&((O=y.value)==null||O.handleScroll(v.value))})}),d.provide(BA,d.reactive({scrollbarElement:f,wrapElement:v})),d.onActivated(()=>{v.value.scrollTop=p,v.value.scrollLeft=g}),d.onMounted(()=>{b.native||d.nextTick(()=>{N()})}),d.onUpdated(()=>N()),T({wrapRef:v,update:N,scrollTo:S,setScrollTop:I,setScrollLeft:F,handleScroll:E}),(O,V)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"scrollbarRef",ref:f,class:d.normalizeClass(d.unref(M).b())},[d.createElementVNode("div",{ref_key:"wrapRef",ref:v,class:d.normalizeClass(d.unref(B)),style:d.normalizeStyle(d.unref(w)),onScroll:E},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.tag),{id:O.id,ref_key:"resizeRef",ref:A,class:d.normalizeClass(d.unref(P)),style:d.normalizeStyle(O.viewStyle),role:O.role,"aria-label":O.ariaLabel,"aria-orientation":O.ariaOrientation},{default:d.withCtx(()=>[d.renderSlot(O.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),O.native?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createBlock(RI,{key:0,ref_key:"barRef",ref:y,always:O.always,"min-size":O.minSize},null,8,["always","min-size"]))],2))}});var jI=ti(UI,[["__file","scrollbar.vue"]]);const Uo=Vn(jI),xA=Symbol("popper"),K0=Symbol("popperContent"),X0=mi({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),VI=d.defineComponent({name:"ElPopper",inheritAttrs:!1}),HI=d.defineComponent({...VI,props:X0,setup(x,{expose:T}){const l=x,b=d.ref(),M=d.ref(),_=d.ref(),m=d.ref(),p=d.computed(()=>l.role),g={triggerRef:b,popperInstanceRef:M,contentRef:_,referenceRef:m,role:p};return T(g),d.provide(xA,g),(f,v)=>d.renderSlot(f.$slots,"default")}});var QI=ti(HI,[["__file","popper.vue"]]);const $0=mi({arrowOffset:{type:Number,default:5}}),zI=d.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),GI=d.defineComponent({...zI,props:$0,setup(x,{expose:T}){const l=x,b=ei("popper"),{arrowOffset:M,arrowRef:_,arrowStyle:m}=d.inject(K0,void 0);return d.watch(()=>l.arrowOffset,p=>{M.value=p}),d.onBeforeUnmount(()=>{_.value=void 0}),T({arrowRef:_}),(p,g)=>(d.openBlock(),d.createElementBlock("span",{ref_key:"arrowRef",ref:_,class:d.normalizeClass(d.unref(b).e("arrow")),style:d.normalizeStyle(d.unref(m)),"data-popper-arrow":""},null,6))}});var WI=ti(GI,[["__file","arrow.vue"]]);const PA="ElOnlyChild",KI=d.defineComponent({name:PA,setup(x,{slots:T,attrs:l}){var b;const M=d.inject(U0),_=nI((b=M==null?void 0:M.setForwardRef)!=null?b:yu);return()=>{var m;const p=(m=T.default)==null?void 0:m.call(T,l);if(!p)return null;if(p.length>1)return Pi(PA,"requires exact only one valid child."),null;const g=Y0(p);return g?d.withDirectives(d.cloneVNode(g,l),[[_]]):(Pi(PA,"no valid child node found"),null)}}});function Y0(x){if(!x)return null;const T=x;for(const l of T){if(jn(l))switch(l.type){case d.Comment:continue;case d.Text:case"svg":return J0(l);case d.Fragment:return Y0(l.children);default:return l}return J0(l)}return null}function J0(x){const T=ei("only-child");return d.createVNode("span",{class:T.e("content")},[x])}const Z0=mi({virtualRef:{type:Ur(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ur(Function)},onMouseleave:{type:Ur(Function)},onClick:{type:Ur(Function)},onKeydown:{type:Ur(Function)},onFocus:{type:Ur(Function)},onBlur:{type:Ur(Function)},onContextmenu:{type:Ur(Function)},id:String,open:Boolean}),XI=d.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),$I=d.defineComponent({...XI,props:Z0,setup(x,{expose:T}){const l=x,{role:b,triggerRef:M}=d.inject(xA,void 0);iI(M);const _=d.computed(()=>p.value?l.id:void 0),m=d.computed(()=>{if(b&&b.value==="tooltip")return l.open&&l.id?l.id:void 0}),p=d.computed(()=>{if(b&&b.value!=="tooltip")return b.value}),g=d.computed(()=>p.value?`${l.open}`:void 0);let f;const v=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return d.onMounted(()=>{d.watch(()=>l.virtualRef,A=>{A&&(M.value=Mo(A))},{immediate:!0}),d.watch(M,(A,y)=>{f==null||f(),f=void 0,Ua(A)&&(v.forEach(w=>{var B;const P=l[w];P&&(A.addEventListener(w.slice(2).toLowerCase(),P),(B=y==null?void 0:y.removeEventListener)==null||B.call(y,w.slice(2).toLowerCase(),P))}),f=d.watch([_,m,p,g],w=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((B,P)=>{to(w[P])?A.removeAttribute(B):A.setAttribute(B,w[P])})},{immediate:!0})),Ua(y)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(w=>y.removeAttribute(w))},{immediate:!0})}),d.onBeforeUnmount(()=>{if(f==null||f(),f=void 0,M.value&&Ua(M.value)){const A=M.value;v.forEach(y=>{const w=l[y];w&&A.removeEventListener(y.slice(2).toLowerCase(),w)}),M.value=void 0}}),T({triggerRef:M}),(A,y)=>A.virtualTriggering?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createBlock(d.unref(KI),d.mergeProps({key:0},A.$attrs,{"aria-controls":d.unref(_),"aria-describedby":d.unref(m),"aria-expanded":d.unref(g),"aria-haspopup":d.unref(p)}),{default:d.withCtx(()=>[d.renderSlot(A.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var YI=ti($I,[["__file","trigger.vue"]]);const EA="focus-trap.focus-after-trapped",MA="focus-trap.focus-after-released",JI="focus-trap.focusout-prevented",q0={cancelable:!0,bubbles:!1},ZI={cancelable:!0,bubbles:!1},ey="focusAfterTrapped",ty="focusAfterReleased",qI=Symbol("elFocusTrap"),SA=d.ref(),wh=d.ref(0),TA=d.ref(0);let Bh=0;const ry=x=>{const T=[],l=document.createTreeWalker(x,NodeFilter.SHOW_ELEMENT,{acceptNode:b=>{const M=b.tagName==="INPUT"&&b.type==="hidden";return b.disabled||b.hidden||M?NodeFilter.FILTER_SKIP:b.tabIndex>=0||b===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)T.push(l.currentNode);return T},iy=(x,T)=>{for(const l of x)if(!eF(l,T))return l},eF=(x,T)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(x).visibility==="hidden")return!0;for(;x;){if(T&&x===T)return!1;if(getComputedStyle(x).display==="none")return!0;x=x.parentElement}return!1},tF=x=>{const T=ry(x),l=iy(T,x),b=iy(T.reverse(),x);return[l,b]},rF=x=>x instanceof HTMLInputElement&&"select"in x,ha=(x,T)=>{if(x&&x.focus){const l=document.activeElement;x.focus({preventScroll:!0}),TA.value=window.performance.now(),x!==l&&rF(x)&&T&&x.select()}};function ny(x,T){const l=[...x],b=x.indexOf(T);return b!==-1&&l.splice(b,1),l}const iF=()=>{let x=[];return{push:b=>{const M=x[0];M&&b!==M&&M.pause(),x=ny(x,b),x.unshift(b)},remove:b=>{var M,_;x=ny(x,b),(_=(M=x[0])==null?void 0:M.resume)==null||_.call(M)}}},nF=(x,T=!1)=>{const l=document.activeElement;for(const b of x)if(ha(b,T),document.activeElement!==l)return},sy=iF(),sF=()=>wh.value>TA.value,Ch=()=>{SA.value="pointer",wh.value=window.performance.now()},oy=()=>{SA.value="keyboard",wh.value=window.performance.now()},oF=()=>(d.onMounted(()=>{Bh===0&&(document.addEventListener("mousedown",Ch),document.addEventListener("touchstart",Ch),document.addEventListener("keydown",oy)),Bh++}),d.onBeforeUnmount(()=>{Bh--,Bh<=0&&(document.removeEventListener("mousedown",Ch),document.removeEventListener("touchstart",Ch),document.removeEventListener("keydown",oy))}),{focusReason:SA,lastUserFocusTimestamp:wh,lastAutomatedFocusTimestamp:TA}),xh=x=>new CustomEvent(JI,{...ZI,detail:x}),aF=d.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ey,ty,"focusin","focusout","focusout-prevented","release-requested"],setup(x,{emit:T}){const l=d.ref();let b,M;const{focusReason:_}=oF();Z2(B=>{x.trapped&&!m.paused&&T("release-requested",B)});const m={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},p=B=>{if(!x.loop&&!x.trapped||m.paused)return;const{key:P,altKey:E,ctrlKey:S,metaKey:I,currentTarget:F,shiftKey:N}=B,{loop:O}=x,V=P===us.tab&&!E&&!S&&!I,G=document.activeElement;if(V&&G){const U=F,[j,K]=tF(U);if(j&&K){if(!N&&G===K){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||(B.preventDefault(),O&&ha(j,!0))}else if(N&&[j,U].includes(G)){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||(B.preventDefault(),O&&ha(K,!0))}}else if(G===U){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||B.preventDefault()}}};d.provide(qI,{focusTrapRef:l,onKeydown:p}),d.watch(()=>x.focusTrapEl,B=>{B&&(l.value=B)},{immediate:!0}),d.watch([l],([B],[P])=>{B&&(B.addEventListener("keydown",p),B.addEventListener("focusin",v),B.addEventListener("focusout",A)),P&&(P.removeEventListener("keydown",p),P.removeEventListener("focusin",v),P.removeEventListener("focusout",A))});const g=B=>{T(ey,B)},f=B=>T(ty,B),v=B=>{const P=d.unref(l);if(!P)return;const E=B.target,S=B.relatedTarget,I=E&&P.contains(E);x.trapped||S&&P.contains(S)||(b=S),I&&T("focusin",B),!m.paused&&x.trapped&&(I?M=E:ha(M,!0))},A=B=>{const P=d.unref(l);if(!(m.paused||!P))if(x.trapped){const E=B.relatedTarget;!to(E)&&!P.contains(E)&&setTimeout(()=>{if(!m.paused&&x.trapped){const S=xh({focusReason:_.value});T("focusout-prevented",S),S.defaultPrevented||ha(M,!0)}},0)}else{const E=B.target;E&&P.contains(E)||T("focusout",B)}};async function y(){await d.nextTick();const B=d.unref(l);if(B){sy.push(m);const P=B.contains(document.activeElement)?b:document.activeElement;if(b=P,!B.contains(P)){const S=new Event(EA,q0);B.addEventListener(EA,g),B.dispatchEvent(S),S.defaultPrevented||d.nextTick(()=>{let I=x.focusStartEl;cn(I)||(ha(I),document.activeElement!==I&&(I="first")),I==="first"&&nF(ry(B),!0),(document.activeElement===P||I==="container")&&ha(B)})}}}function w(){const B=d.unref(l);if(B){B.removeEventListener(EA,g);const P=new CustomEvent(MA,{...q0,detail:{focusReason:_.value}});B.addEventListener(MA,f),B.dispatchEvent(P),!P.defaultPrevented&&(_.value=="keyboard"||!sF()||B.contains(document.activeElement))&&ha(b??document.body),B.removeEventListener(MA,f),sy.remove(m)}}return d.onMounted(()=>{x.trapped&&y(),d.watch(()=>x.trapped,B=>{B?y():w()})}),d.onBeforeUnmount(()=>{x.trapped&&w(),l.value&&(l.value.removeEventListener("keydown",p),l.value.removeEventListener("focusin",v),l.value.removeEventListener("focusout",A),l.value=void 0)}),{onKeydown:p}}});function lF(x,T,l,b,M,_){return d.renderSlot(x.$slots,"default",{handleKeydown:x.onKeydown})}var uF=ti(aF,[["render",lF],["__file","focus-trap.vue"]]);const cF=["fixed","absolute"],hF=mi({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ur(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:yl,default:"bottom"},popperOptions:{type:Ur(Object),default:()=>({})},strategy:{type:String,values:cF,default:"absolute"}}),ay=mi({...hF,id:String,style:{type:Ur([String,Array,Object])},className:{type:Ur([String,Array,Object])},effect:{type:Ur(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ur([String,Array,Object])},popperStyle:{type:Ur([String,Array,Object])},referenceEl:{type:Ur(Object)},triggerTargetEl:{type:Ur(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Hs(["ariaLabel"])}),dF={mouseenter:x=>x instanceof MouseEvent,mouseleave:x=>x instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},fF=(x,T=[])=>{const{placement:l,strategy:b,popperOptions:M}=x,_={placement:l,strategy:b,...M,modifiers:[...pF(x),...T]};return vF(_,M==null?void 0:M.modifiers),_},AF=x=>{if(Bn)return Mo(x)};function pF(x){const{offset:T,gpuAcceleration:l,fallbackPlacements:b}=x;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:b}},{name:"computeStyles",options:{gpuAcceleration:l}}]}function vF(x,T){T&&(x.modifiers=[...x.modifiers,...T??[]])}const mF=0,gF=x=>{const{popperInstanceRef:T,contentRef:l,triggerRef:b,role:M}=d.inject(xA,void 0),_=d.ref(),m=d.ref(),p=d.computed(()=>({name:"eventListeners",enabled:!!x.visible})),g=d.computed(()=>{var S;const I=d.unref(_),F=(S=d.unref(m))!=null?S:mF;return{name:"arrow",enabled:!wk(I),options:{element:I,padding:F}}}),f=d.computed(()=>({onFirstUpdate:()=>{B()},...fF(x,[d.unref(g),d.unref(p)])})),v=d.computed(()=>AF(x.referenceEl)||d.unref(b)),{attributes:A,state:y,styles:w,update:B,forceUpdate:P,instanceRef:E}=$2(v,l,f);return d.watch(E,S=>T.value=S),d.onMounted(()=>{d.watch(()=>{var S;return(S=d.unref(v))==null?void 0:S.getBoundingClientRect()},()=>{B()})}),{attributes:A,arrowRef:_,contentRef:l,instanceRef:E,state:y,styles:w,role:M,forceUpdate:P,update:B}},_F=(x,{attributes:T,styles:l,role:b})=>{const{nextZIndex:M}=aI(),_=ei("popper"),m=d.computed(()=>d.unref(T).popper),p=d.ref(oi(x.zIndex)?x.zIndex:M()),g=d.computed(()=>[_.b(),_.is("pure",x.pure),_.is(x.effect),x.popperClass]),f=d.computed(()=>[{zIndex:d.unref(p)},d.unref(l).popper,x.popperStyle||{}]),v=d.computed(()=>b.value==="dialog"?"false":void 0),A=d.computed(()=>d.unref(l).arrow||{});return{ariaModal:v,arrowStyle:A,contentAttrs:m,contentClass:g,contentStyle:f,contentZIndex:p,updateZIndex:()=>{p.value=oi(x.zIndex)?x.zIndex:M()}}},yF=(x,T)=>{const l=d.ref(!1),b=d.ref();return{focusStartRef:b,trapped:l,onFocusAfterReleased:f=>{var v;((v=f.detail)==null?void 0:v.focusReason)!=="pointer"&&(b.value="first",T("blur"))},onFocusAfterTrapped:()=>{T("focus")},onFocusInTrap:f=>{x.visible&&!l.value&&(f.target&&(b.value=f.target),l.value=!0)},onFocusoutPrevented:f=>{x.trapping||(f.detail.focusReason==="pointer"&&f.preventDefault(),l.value=!1)},onReleaseRequested:()=>{l.value=!1,T("close")}}},bF=d.defineComponent({name:"ElPopperContent"}),wF=d.defineComponent({...bF,props:ay,emits:dF,setup(x,{expose:T,emit:l}){const b=x,{focusStartRef:M,trapped:_,onFocusAfterReleased:m,onFocusAfterTrapped:p,onFocusInTrap:g,onFocusoutPrevented:f,onReleaseRequested:v}=yF(b,l),{attributes:A,arrowRef:y,contentRef:w,styles:B,instanceRef:P,role:E,update:S}=gF(b),{ariaModal:I,arrowStyle:F,contentAttrs:N,contentClass:O,contentStyle:V,updateZIndex:G}=_F(b,{styles:B,attributes:A,role:E}),U=d.inject(Ru,void 0),j=d.ref();d.provide(K0,{arrowStyle:F,arrowRef:y,arrowOffset:j}),U&&d.provide(Ru,{...U,addInputId:yu,removeInputId:yu});let K;const $=(L=!0)=>{S(),L&&G()},W=()=>{$(!1),b.visible&&b.focusOnShow?_.value=!0:b.visible===!1&&(_.value=!1)};return d.onMounted(()=>{d.watch(()=>b.triggerTargetEl,(L,z)=>{K==null||K(),K=void 0;const H=d.unref(L||w.value),Z=d.unref(z||w.value);Ua(H)&&(K=d.watch([E,()=>b.ariaLabel,I,()=>b.id],ee=>{["role","aria-label","aria-modal","id"].forEach((de,Y)=>{to(ee[Y])?H.removeAttribute(de):H.setAttribute(de,ee[Y])})},{immediate:!0})),Z!==H&&Ua(Z)&&["role","aria-label","aria-modal","id"].forEach(ee=>{Z.removeAttribute(ee)})},{immediate:!0}),d.watch(()=>b.visible,W,{immediate:!0})}),d.onBeforeUnmount(()=>{K==null||K(),K=void 0}),T({popperContentRef:w,popperInstanceRef:P,updatePopper:$,contentStyle:V}),(L,z)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps({ref_key:"contentRef",ref:w},d.unref(N),{style:d.unref(V),class:d.unref(O),tabindex:"-1",onMouseenter:H=>L.$emit("mouseenter",H),onMouseleave:H=>L.$emit("mouseleave",H)}),[d.createVNode(d.unref(uF),{trapped:d.unref(_),"trap-on-focus-in":!0,"focus-trap-el":d.unref(w),"focus-start-el":d.unref(M),onFocusAfterTrapped:d.unref(p),onFocusAfterReleased:d.unref(m),onFocusin:d.unref(g),onFocusoutPrevented:d.unref(f),onReleaseRequested:d.unref(v)},{default:d.withCtx(()=>[d.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var BF=ti(wF,[["__file","content.vue"]]);const CF=Vn(QI),kA=Symbol("elTooltip"),IA=mi({...tI,...ay,appendTo:{type:Ur([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Ur(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Hs(["ariaLabel"])}),ly=mi({...Z0,disabled:Boolean,trigger:{type:Ur([String,Array]),default:"hover"},triggerKeys:{type:Ur(Array),default:()=>[us.enter,us.space]}}),{useModelToggleProps:xF,useModelToggleEmits:PF,useModelToggle:EF}=d0("visible"),MF=mi({...X0,...xF,...IA,...ly,...$0,showArrow:{type:Boolean,default:!0}}),SF=[...PF,"before-show","before-hide","show","hide","open","close"],TF=(x,T)=>Yn(x)?x.includes(T):x===T,El=(x,T,l)=>b=>{TF(d.unref(x),T)&&l(b)},kF=d.defineComponent({name:"ElTooltipTrigger"}),IF=d.defineComponent({...kF,props:ly,setup(x,{expose:T}){const l=x,b=ei("tooltip"),{controlled:M,id:_,open:m,onOpen:p,onClose:g,onToggle:f}=d.inject(kA,void 0),v=d.ref(null),A=()=>{if(d.unref(M)||l.disabled)return!0},y=d.toRef(l,"trigger"),w=Eo(A,El(y,"hover",p)),B=Eo(A,El(y,"hover",g)),P=Eo(A,El(y,"click",N=>{N.button===0&&f(N)})),E=Eo(A,El(y,"focus",p)),S=Eo(A,El(y,"focus",g)),I=Eo(A,El(y,"contextmenu",N=>{N.preventDefault(),f(N)})),F=Eo(A,N=>{const{code:O}=N;l.triggerKeys.includes(O)&&(N.preventDefault(),f(N))});return T({triggerRef:v}),(N,O)=>(d.openBlock(),d.createBlock(d.unref(YI),{id:d.unref(_),"virtual-ref":N.virtualRef,open:d.unref(m),"virtual-triggering":N.virtualTriggering,class:d.normalizeClass(d.unref(b).e("trigger")),onBlur:d.unref(S),onClick:d.unref(P),onContextmenu:d.unref(I),onFocus:d.unref(E),onMouseenter:d.unref(w),onMouseleave:d.unref(B),onKeydown:d.unref(F)},{default:d.withCtx(()=>[d.renderSlot(N.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var FF=ti(IF,[["__file","trigger.vue"]]);const DF=mi({to:{type:Ur([String,Object]),required:!0},disabled:Boolean});var RF=ti(d.defineComponent({__name:"teleport",props:DF,setup(x){return(T,l)=>T.disabled?d.renderSlot(T.$slots,"default",{key:0}):(d.openBlock(),d.createBlock(d.Teleport,{key:1,to:T.to},[d.renderSlot(T.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const LF=Vn(RF),OF=d.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),NF=d.defineComponent({...OF,props:IA,setup(x,{expose:T}){const l=x,{selector:b}=N0(),M=ei("tooltip"),_=d.ref(null);let m;const{controlled:p,id:g,open:f,trigger:v,onClose:A,onOpen:y,onShow:w,onHide:B,onBeforeShow:P,onBeforeHide:E}=d.inject(kA,void 0),S=d.computed(()=>l.transition||`${M.namespace.value}-fade-in-linear`),I=d.computed(()=>process.env.NODE_ENV==="test"?!0:l.persistent);d.onBeforeUnmount(()=>{m==null||m()});const F=d.computed(()=>d.unref(I)?!0:d.unref(f)),N=d.computed(()=>l.disabled?!1:d.unref(f)),O=d.computed(()=>l.appendTo||b.value),V=d.computed(()=>{var Z;return(Z=l.style)!=null?Z:{}}),G=d.computed(()=>!d.unref(f)),U=()=>{B()},j=()=>{if(d.unref(p))return!0},K=Eo(j,()=>{l.enterable&&d.unref(v)==="hover"&&y()}),$=Eo(j,()=>{d.unref(v)==="hover"&&A()}),W=()=>{var Z,ee;(ee=(Z=_.value)==null?void 0:Z.updatePopper)==null||ee.call(Z),P==null||P()},L=()=>{E==null||E()},z=()=>{w(),m=yE(d.computed(()=>{var Z;return(Z=_.value)==null?void 0:Z.popperContentRef}),()=>{if(d.unref(p))return;d.unref(v)!=="hover"&&A()})},H=()=>{l.virtualTriggering||A()};return d.watch(()=>d.unref(f),Z=>{Z||m==null||m()},{flush:"post"}),d.watch(()=>l.content,()=>{var Z,ee;(ee=(Z=_.value)==null?void 0:Z.updatePopper)==null||ee.call(Z)}),T({contentRef:_}),(Z,ee)=>(d.openBlock(),d.createBlock(d.unref(LF),{disabled:!Z.teleported,to:d.unref(O)},{default:d.withCtx(()=>[d.createVNode(d.Transition,{name:d.unref(S),onAfterLeave:U,onBeforeEnter:W,onAfterEnter:z,onBeforeLeave:L},{default:d.withCtx(()=>[d.unref(F)?d.withDirectives((d.openBlock(),d.createBlock(d.unref(BF),d.mergeProps({key:0,id:d.unref(g),ref_key:"contentRef",ref:_},Z.$attrs,{"aria-label":Z.ariaLabel,"aria-hidden":d.unref(G),"boundaries-padding":Z.boundariesPadding,"fallback-placements":Z.fallbackPlacements,"gpu-acceleration":Z.gpuAcceleration,offset:Z.offset,placement:Z.placement,"popper-options":Z.popperOptions,strategy:Z.strategy,effect:Z.effect,enterable:Z.enterable,pure:Z.pure,"popper-class":Z.popperClass,"popper-style":[Z.popperStyle,d.unref(V)],"reference-el":Z.referenceEl,"trigger-target-el":Z.triggerTargetEl,visible:d.unref(N),"z-index":Z.zIndex,onMouseenter:d.unref(K),onMouseleave:d.unref($),onBlur:H,onClose:d.unref(A)}),{default:d.withCtx(()=>[d.renderSlot(Z.$slots,"default")]),_: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"])),[[d.vShow,d.unref(N)]]):d.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var UF=ti(NF,[["__file","content.vue"]]);const jF=d.defineComponent({name:"ElTooltip"}),VF=d.defineComponent({...jF,props:MF,emits:SF,setup(x,{expose:T,emit:l}){const b=x;eI();const M=Du(),_=d.ref(),m=d.ref(),p=()=>{var S;const I=d.unref(_);I&&((S=I.popperInstanceRef)==null||S.update())},g=d.ref(!1),f=d.ref(),{show:v,hide:A,hasUpdateHandler:y}=EF({indicator:g,toggleReason:f}),{onOpen:w,onClose:B}=rI({showAfter:d.toRef(b,"showAfter"),hideAfter:d.toRef(b,"hideAfter"),autoClose:d.toRef(b,"autoClose"),open:v,close:A}),P=d.computed(()=>js(b.visible)&&!y.value);d.provide(kA,{controlled:P,id:M,open:d.readonly(g),trigger:d.toRef(b,"trigger"),onOpen:S=>{w(S)},onClose:S=>{B(S)},onToggle:S=>{d.unref(g)?B(S):w(S)},onShow:()=>{l("show",f.value)},onHide:()=>{l("hide",f.value)},onBeforeShow:()=>{l("before-show",f.value)},onBeforeHide:()=>{l("before-hide",f.value)},updatePopper:p}),d.watch(()=>b.disabled,S=>{S&&g.value&&(g.value=!1)});const E=S=>{var I,F;const N=(F=(I=m.value)==null?void 0:I.contentRef)==null?void 0:F.popperContentRef,O=(S==null?void 0:S.relatedTarget)||document.activeElement;return N&&N.contains(O)};return d.onDeactivated(()=>g.value&&A()),T({popperRef:_,contentRef:m,isFocusInsideContent:E,updatePopper:p,onOpen:w,onClose:B,hide:A}),(S,I)=>(d.openBlock(),d.createBlock(d.unref(CF),{ref_key:"popperRef",ref:_,role:S.role},{default:d.withCtx(()=>[d.createVNode(FF,{disabled:S.disabled,trigger:S.trigger,"trigger-keys":S.triggerKeys,"virtual-ref":S.virtualRef,"virtual-triggering":S.virtualTriggering},{default:d.withCtx(()=>[S.$slots.default?d.renderSlot(S.$slots,"default",{key:0}):d.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),d.createVNode(UF,{ref_key:"contentRef",ref:m,"aria-label":S.ariaLabel,"boundaries-padding":S.boundariesPadding,content:S.content,disabled:S.disabled,effect:S.effect,enterable:S.enterable,"fallback-placements":S.fallbackPlacements,"hide-after":S.hideAfter,"gpu-acceleration":S.gpuAcceleration,offset:S.offset,persistent:S.persistent,"popper-class":S.popperClass,"popper-style":S.popperStyle,placement:S.placement,"popper-options":S.popperOptions,pure:S.pure,"raw-content":S.rawContent,"reference-el":S.referenceEl,"trigger-target-el":S.triggerTargetEl,"show-after":S.showAfter,strategy:S.strategy,teleported:S.teleported,transition:S.transition,"virtual-triggering":S.virtualTriggering,"z-index":S.zIndex,"append-to":S.appendTo},{default:d.withCtx(()=>[d.renderSlot(S.$slots,"content",{},()=>[S.rawContent?(d.openBlock(),d.createElementBlock("span",{key:0,innerHTML:S.content},null,8,["innerHTML"])):(d.openBlock(),d.createElementBlock("span",{key:1},d.toDisplayString(S.content),1))]),S.showArrow?(d.openBlock(),d.createBlock(d.unref(WI),{key:0,"arrow-offset":S.arrowOffset},null,8,["arrow-offset"])):d.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 HF=ti(VF,[["__file","tooltip.vue"]]);const FA=Vn(HF),da=new Map;if(Bn){let x;document.addEventListener("mousedown",T=>x=T),document.addEventListener("mouseup",T=>{if(x){for(const l of da.values())for(const{documentHandler:b}of l)b(T,x);x=void 0}})}function uy(x,T){let l=[];return Array.isArray(T.arg)?l=T.arg:Ua(T.arg)&&l.push(T.arg),function(b,M){const _=T.instance.popperRef,m=b.target,p=M==null?void 0:M.target,g=!T||!T.instance,f=!m||!p,v=x.contains(m)||x.contains(p),A=x===m,y=l.length&&l.some(B=>B==null?void 0:B.contains(m))||l.length&&l.includes(p),w=_&&(_.contains(m)||_.contains(p));g||f||v||A||y||w||T.value(b,M)}}const QF={beforeMount(x,T){da.has(x)||da.set(x,[]),da.get(x).push({documentHandler:uy(x,T),bindingFn:T.value})},updated(x,T){da.has(x)||da.set(x,[]);const l=da.get(x),b=l.findIndex(_=>_.bindingFn===T.oldValue),M={documentHandler:uy(x,T),bindingFn:T.value};b>=0?l.splice(b,1,M):l.push(M)},unmounted(x){da.delete(x)}},zF=100,GF=600,cy={beforeMount(x,T){const l=T.value,{interval:b=zF,delay:M=GF}=en(l)?{}:l;let _,m;const p=()=>en(l)?l():l.handler(),g=()=>{m&&(clearTimeout(m),m=void 0),_&&(clearInterval(_),_=void 0)};x.addEventListener("mousedown",f=>{f.button===0&&(g(),p(),document.addEventListener("mouseup",()=>g(),{once:!0}),m=setTimeout(()=>{_=setInterval(()=>{p()},b)},M))})}},hy={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Lo,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Hs(["ariaControls"])},dy={[gi]:x=>cn(x)||oi(x)||js(x),change:x=>cn(x)||oi(x)||js(x)},Ml=Symbol("checkboxGroupContextKey"),WF=({model:x,isChecked:T})=>{const l=d.inject(Ml,void 0),b=d.computed(()=>{var _,m;const p=(_=l==null?void 0:l.max)==null?void 0:_.value,g=(m=l==null?void 0:l.min)==null?void 0:m.value;return!bs(p)&&x.value.length>=p&&!T.value||!bs(g)&&x.value.length<=g&&T.value});return{isDisabled:Lu(d.computed(()=>(l==null?void 0:l.disabled.value)||b.value)),isLimitDisabled:b}},KF=(x,{model:T,isLimitExceeded:l,hasOwnLabel:b,isDisabled:M,isLabeledByFormItem:_})=>{const m=d.inject(Ml,void 0),{formItem:p}=No(),{emit:g}=d.getCurrentInstance();function f(B){var P,E,S,I;return[!0,x.trueValue,x.trueLabel].includes(B)?(E=(P=x.trueValue)!=null?P:x.trueLabel)!=null?E:!0:(I=(S=x.falseValue)!=null?S:x.falseLabel)!=null?I:!1}function v(B,P){g("change",f(B),P)}function A(B){if(l.value)return;const P=B.target;g("change",f(P.checked),B)}async function y(B){l.value||!b.value&&!M.value&&_.value&&(B.composedPath().some(S=>S.tagName==="LABEL")||(T.value=f([!1,x.falseValue,x.falseLabel].includes(T.value)),await d.nextTick(),v(T.value,B)))}const w=d.computed(()=>(m==null?void 0:m.validateEvent)||x.validateEvent);return d.watch(()=>x.modelValue,()=>{w.value&&(p==null||p.validate("change").catch(B=>Pi(B)))}),{handleChange:A,onClickRoot:y}},XF=x=>{const T=d.ref(!1),{emit:l}=d.getCurrentInstance(),b=d.inject(Ml,void 0),M=d.computed(()=>bs(b)===!1),_=d.ref(!1),m=d.computed({get(){var p,g;return M.value?(p=b==null?void 0:b.modelValue)==null?void 0:p.value:(g=x.modelValue)!=null?g:T.value},set(p){var g,f;M.value&&Yn(p)?(_.value=((g=b==null?void 0:b.max)==null?void 0:g.value)!==void 0&&p.length>(b==null?void 0:b.max.value)&&p.length>m.value.length,_.value===!1&&((f=b==null?void 0:b.changeEvent)==null||f.call(b,p))):(l(gi,p),T.value=p)}});return{model:m,isGroup:M,isLimitExceeded:_}},$F=(x,T,{model:l})=>{const b=d.inject(Ml,void 0),M=d.ref(!1),_=d.computed(()=>ml(x.value)?x.label:x.value),m=d.computed(()=>{const v=l.value;return js(v)?v:Yn(v)?jn(_.value)?v.map(d.toRaw).some(A=>dh(A,_.value)):v.map(d.toRaw).includes(_.value):v!=null?v===x.trueValue||v===x.trueLabel:!!v}),p=Oo(d.computed(()=>{var v;return(v=b==null?void 0:b.size)==null?void 0:v.value}),{prop:!0}),g=Oo(d.computed(()=>{var v;return(v=b==null?void 0:b.size)==null?void 0:v.value})),f=d.computed(()=>!!T.default||!ml(_.value));return{checkboxButtonSize:p,isChecked:m,isFocused:M,checkboxSize:g,hasOwnLabel:f,actualValue:_}},fy=(x,T)=>{const{formItem:l}=No(),{model:b,isGroup:M,isLimitExceeded:_}=XF(x),{isFocused:m,isChecked:p,checkboxButtonSize:g,checkboxSize:f,hasOwnLabel:v,actualValue:A}=$F(x,T,{model:b}),{isDisabled:y}=WF({model:b,isChecked:p}),{inputId:w,isLabeledByFormItem:B}=Ha(x,{formItemContext:l,disableIdGeneration:v,disableIdManagement:M}),{handleChange:P,onClickRoot:E}=KF(x,{model:b,isLimitExceeded:_,hasOwnLabel:v,isDisabled:y,isLabeledByFormItem:B});return(()=>{function I(){var F,N;Yn(b.value)&&!b.value.includes(A.value)?b.value.push(A.value):b.value=(N=(F=x.trueValue)!=null?F:x.trueLabel)!=null?N:!0}x.checked&&I()})(),vh({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>M.value&&ml(x.value))),vh({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>!!x.trueLabel)),vh({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>!!x.falseLabel)),{inputId:w,isLabeledByFormItem:B,isChecked:p,isDisabled:y,isFocused:m,checkboxButtonSize:g,checkboxSize:f,hasOwnLabel:v,model:b,actualValue:A,handleChange:P,onClickRoot:E}},YF=d.defineComponent({name:"ElCheckbox"}),JF=d.defineComponent({...YF,props:hy,emits:dy,setup(x){const T=x,l=d.useSlots(),{inputId:b,isLabeledByFormItem:M,isChecked:_,isDisabled:m,isFocused:p,checkboxSize:g,hasOwnLabel:f,model:v,actualValue:A,handleChange:y,onClickRoot:w}=fy(T,l),B=ei("checkbox"),P=d.computed(()=>[B.b(),B.m(g.value),B.is("disabled",m.value),B.is("bordered",T.border),B.is("checked",_.value)]),E=d.computed(()=>[B.e("input"),B.is("disabled",m.value),B.is("checked",_.value),B.is("indeterminate",T.indeterminate),B.is("focus",p.value)]);return(S,I)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(!d.unref(f)&&d.unref(M)?"span":"label"),{class:d.normalizeClass(d.unref(P)),"aria-controls":S.indeterminate?S.ariaControls:null,onClick:d.unref(w)},{default:d.withCtx(()=>{var F,N;return[d.createElementVNode("span",{class:d.normalizeClass(d.unref(E))},[S.trueValue||S.falseValue||S.trueLabel||S.falseLabel?d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:0,id:d.unref(b),"onUpdate:modelValue":O=>d.isRef(v)?v.value=O:null,class:d.normalizeClass(d.unref(B).e("original")),type:"checkbox",indeterminate:S.indeterminate,name:S.name,tabindex:S.tabindex,disabled:d.unref(m),"true-value":(F=S.trueValue)!=null?F:S.trueLabel,"false-value":(N=S.falseValue)!=null?N:S.falseLabel,onChange:d.unref(y),onFocus:O=>p.value=!0,onBlur:O=>p.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(v)]]):d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:1,id:d.unref(b),"onUpdate:modelValue":O=>d.isRef(v)?v.value=O:null,class:d.normalizeClass(d.unref(B).e("original")),type:"checkbox",indeterminate:S.indeterminate,disabled:d.unref(m),value:d.unref(A),name:S.name,tabindex:S.tabindex,onChange:d.unref(y),onFocus:O=>p.value=!0,onBlur:O=>p.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(v)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(B).e("inner"))},null,2)],2),d.unref(f)?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(B).e("label"))},[d.renderSlot(S.$slots,"default"),S.$slots.default?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createTextVNode(d.toDisplayString(S.label),1)],64))],2)):d.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var ZF=ti(JF,[["__file","checkbox.vue"]]);const qF=d.defineComponent({name:"ElCheckboxButton"}),eD=d.defineComponent({...qF,props:hy,emits:dy,setup(x){const T=x,l=d.useSlots(),{isFocused:b,isChecked:M,isDisabled:_,checkboxButtonSize:m,model:p,actualValue:g,handleChange:f}=fy(T,l),v=d.inject(Ml,void 0),A=ei("checkbox"),y=d.computed(()=>{var B,P,E,S;const I=(P=(B=v==null?void 0:v.fill)==null?void 0:B.value)!=null?P:"";return{backgroundColor:I,borderColor:I,color:(S=(E=v==null?void 0:v.textColor)==null?void 0:E.value)!=null?S:"",boxShadow:I?`-1px 0 0 0 ${I}`:void 0}}),w=d.computed(()=>[A.b("button"),A.bm("button",m.value),A.is("disabled",_.value),A.is("checked",M.value),A.is("focus",b.value)]);return(B,P)=>{var E,S;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass(d.unref(w))},[B.trueValue||B.falseValue||B.trueLabel||B.falseLabel?d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:0,"onUpdate:modelValue":I=>d.isRef(p)?p.value=I:null,class:d.normalizeClass(d.unref(A).be("button","original")),type:"checkbox",name:B.name,tabindex:B.tabindex,disabled:d.unref(_),"true-value":(E=B.trueValue)!=null?E:B.trueLabel,"false-value":(S=B.falseValue)!=null?S:B.falseLabel,onChange:d.unref(f),onFocus:I=>b.value=!0,onBlur:I=>b.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(p)]]):d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:1,"onUpdate:modelValue":I=>d.isRef(p)?p.value=I:null,class:d.normalizeClass(d.unref(A).be("button","original")),type:"checkbox",name:B.name,tabindex:B.tabindex,disabled:d.unref(_),value:d.unref(g),onChange:d.unref(f),onFocus:I=>b.value=!0,onBlur:I=>b.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(p)]]),B.$slots.default||B.label?(d.openBlock(),d.createElementBlock("span",{key:2,class:d.normalizeClass(d.unref(A).be("button","inner")),style:d.normalizeStyle(d.unref(M)?d.unref(y):void 0)},[d.renderSlot(B.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(B.label),1)])],6)):d.createCommentVNode("v-if",!0)],2)}}});var Ay=ti(eD,[["__file","checkbox-button.vue"]]);const tD=mi({modelValue:{type:Ur(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Lo,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),rD={[gi]:x=>Yn(x),change:x=>Yn(x)},iD=d.defineComponent({name:"ElCheckboxGroup"}),nD=d.defineComponent({...iD,props:tD,emits:rD,setup(x,{emit:T}){const l=x,b=ei("checkbox"),{formItem:M}=No(),{inputId:_,isLabeledByFormItem:m}=Ha(l,{formItemContext:M}),p=async f=>{T(gi,f),await d.nextTick(),T("change",f)},g=d.computed({get(){return l.modelValue},set(f){p(f)}});return d.provide(Ml,{...a0(d.toRefs(l),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:g,changeEvent:p}),d.watch(()=>l.modelValue,()=>{l.validateEvent&&(M==null||M.validate("change").catch(f=>Pi(f)))}),(f,v)=>{var A;return d.openBlock(),d.createBlock(d.resolveDynamicComponent(f.tag),{id:d.unref(_),class:d.normalizeClass(d.unref(b).b("group")),role:"group","aria-label":d.unref(m)?void 0:f.ariaLabel||"checkbox-group","aria-labelledby":d.unref(m)?(A=d.unref(M))==null?void 0:A.labelId:void 0},{default:d.withCtx(()=>[d.renderSlot(f.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var py=ti(nD,[["__file","checkbox-group.vue"]]);const vy=Vn(ZF,{CheckboxButton:Ay,CheckboxGroup:py});gl(Ay);const sD=gl(py),my=mi({modelValue:{type:[String,Number,Boolean],default:void 0},size:Lo,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),oD=mi({...my,border:Boolean}),gy={[gi]:x=>cn(x)||oi(x)||js(x),[ro]:x=>cn(x)||oi(x)||js(x)},_y=Symbol("radioGroupKey"),yy=(x,T)=>{const l=d.ref(),b=d.inject(_y,void 0),M=d.computed(()=>!!b),_=d.computed(()=>ml(x.value)?x.label:x.value),m=d.computed({get(){return M.value?b.modelValue:x.modelValue},set(A){M.value?b.changeEvent(A):T&&T(gi,A),l.value.checked=x.modelValue===_.value}}),p=Oo(d.computed(()=>b==null?void 0:b.size)),g=Lu(d.computed(()=>b==null?void 0:b.disabled)),f=d.ref(!1),v=d.computed(()=>g.value||M.value&&m.value!==_.value?-1:0);return vh({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},d.computed(()=>M.value&&ml(x.value))),{radioRef:l,isGroup:M,radioGroup:b,focus:f,size:p,disabled:g,tabIndex:v,modelValue:m,actualValue:_}},aD=d.defineComponent({name:"ElRadio"}),lD=d.defineComponent({...aD,props:oD,emits:gy,setup(x,{emit:T}){const l=x,b=ei("radio"),{radioRef:M,radioGroup:_,focus:m,size:p,disabled:g,modelValue:f,actualValue:v}=yy(l,T);function A(){d.nextTick(()=>T("change",f.value))}return(y,w)=>{var B;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass([d.unref(b).b(),d.unref(b).is("disabled",d.unref(g)),d.unref(b).is("focus",d.unref(m)),d.unref(b).is("bordered",y.border),d.unref(b).is("checked",d.unref(f)===d.unref(v)),d.unref(b).m(d.unref(p))])},[d.createElementVNode("span",{class:d.normalizeClass([d.unref(b).e("input"),d.unref(b).is("disabled",d.unref(g)),d.unref(b).is("checked",d.unref(f)===d.unref(v))])},[d.withDirectives(d.createElementVNode("input",{ref_key:"radioRef",ref:M,"onUpdate:modelValue":P=>d.isRef(f)?f.value=P:null,class:d.normalizeClass(d.unref(b).e("original")),value:d.unref(v),name:y.name||((B=d.unref(_))==null?void 0:B.name),disabled:d.unref(g),checked:d.unref(f)===d.unref(v),type:"radio",onFocus:P=>m.value=!0,onBlur:P=>m.value=!1,onChange:A,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[d.vModelRadio,d.unref(f)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(b).e("inner"))},null,2)],2),d.createElementVNode("span",{class:d.normalizeClass(d.unref(b).e("label")),onKeydown:d.withModifiers(()=>{},["stop"])},[d.renderSlot(y.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(y.label),1)])],42,["onKeydown"])],2)}}});var uD=ti(lD,[["__file","radio.vue"]]);const cD=mi({...my}),hD=d.defineComponent({name:"ElRadioButton"}),dD=d.defineComponent({...hD,props:cD,setup(x){const T=x,l=ei("radio"),{radioRef:b,focus:M,size:_,disabled:m,modelValue:p,radioGroup:g,actualValue:f}=yy(T),v=d.computed(()=>({backgroundColor:(g==null?void 0:g.fill)||"",borderColor:(g==null?void 0:g.fill)||"",boxShadow:g!=null&&g.fill?`-1px 0 0 0 ${g.fill}`:"",color:(g==null?void 0:g.textColor)||""}));return(A,y)=>{var w;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass([d.unref(l).b("button"),d.unref(l).is("active",d.unref(p)===d.unref(f)),d.unref(l).is("disabled",d.unref(m)),d.unref(l).is("focus",d.unref(M)),d.unref(l).bm("button",d.unref(_))])},[d.withDirectives(d.createElementVNode("input",{ref_key:"radioRef",ref:b,"onUpdate:modelValue":B=>d.isRef(p)?p.value=B:null,class:d.normalizeClass(d.unref(l).be("button","original-radio")),value:d.unref(f),type:"radio",name:A.name||((w=d.unref(g))==null?void 0:w.name),disabled:d.unref(m),onFocus:B=>M.value=!0,onBlur:B=>M.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[d.vModelRadio,d.unref(p)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(l).be("button","inner")),style:d.normalizeStyle(d.unref(p)===d.unref(f)?d.unref(v):{}),onKeydown:d.withModifiers(()=>{},["stop"])},[d.renderSlot(A.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(A.label),1)])],46,["onKeydown"])],2)}}});var by=ti(dD,[["__file","radio-button.vue"]]);const fD=mi({id:{type:String,default:void 0},size:Lo,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),AD=gy,pD=d.defineComponent({name:"ElRadioGroup"}),vD=d.defineComponent({...pD,props:fD,emits:AD,setup(x,{emit:T}){const l=x,b=ei("radio"),M=Du(),_=d.ref(),{formItem:m}=No(),{inputId:p,isLabeledByFormItem:g}=Ha(l,{formItemContext:m}),f=A=>{T(gi,A),d.nextTick(()=>T("change",A))};d.onMounted(()=>{const A=_.value.querySelectorAll("[type=radio]"),y=A[0];!Array.from(A).some(w=>w.checked)&&y&&(y.tabIndex=0)});const v=d.computed(()=>l.name||M.value);return d.provide(_y,d.reactive({...d.toRefs(l),changeEvent:f,name:v})),d.watch(()=>l.modelValue,()=>{l.validateEvent&&(m==null||m.validate("change").catch(A=>Pi(A)))}),(A,y)=>(d.openBlock(),d.createElementBlock("div",{id:d.unref(p),ref_key:"radioGroupRef",ref:_,class:d.normalizeClass(d.unref(b).b("group")),role:"radiogroup","aria-label":d.unref(g)?void 0:A.ariaLabel||"radio-group","aria-labelledby":d.unref(g)?d.unref(m).labelId:void 0},[d.renderSlot(A.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var wy=ti(vD,[["__file","radio-group.vue"]]);const mD=Vn(uD,{RadioButton:by,RadioGroup:wy}),gD=gl(wy);gl(by);const DA=mi({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:uA},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),_D={close:x=>x instanceof MouseEvent,click:x=>x instanceof MouseEvent},yD=d.defineComponent({name:"ElTag"}),bD=d.defineComponent({...yD,props:DA,emits:_D,setup(x,{emit:T}){const l=x,b=Oo(),M=ei("tag"),_=d.computed(()=>{const{type:g,hit:f,effect:v,closable:A,round:y}=l;return[M.b(),M.is("closable",A),M.m(g||"primary"),M.m(b.value),M.m(v),M.is("hit",f),M.is("round",y)]}),m=g=>{T("close",g)},p=g=>{T("click",g)};return(g,f)=>g.disableTransitions?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(_)),style:d.normalizeStyle({backgroundColor:g.color}),onClick:p},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(M).e("content"))},[d.renderSlot(g.$slots,"default")],2),g.closable?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(M).e("close")),onClick:d.withModifiers(m,["stop"])},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Close))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0)],6)):(d.openBlock(),d.createBlock(d.Transition,{key:1,name:`${d.unref(M).namespace.value}-zoom-in-center`,appear:""},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(d.unref(_)),style:d.normalizeStyle({backgroundColor:g.color}),onClick:p},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(M).e("content"))},[d.renderSlot(g.$slots,"default")],2),g.closable?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(M).e("close")),onClick:d.withModifiers(m,["stop"])},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Close))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var wD=ti(bD,[["__file","tag.vue"]]);const BD=Vn(wD),CD=d.defineComponent({name:"ElCollapseTransition"}),xD=d.defineComponent({...CD,setup(x){const T=ei("collapse-transition"),l=M=>{M.style.maxHeight="",M.style.overflow=M.dataset.oldOverflow,M.style.paddingTop=M.dataset.oldPaddingTop,M.style.paddingBottom=M.dataset.oldPaddingBottom},b={beforeEnter(M){M.dataset||(M.dataset={}),M.dataset.oldPaddingTop=M.style.paddingTop,M.dataset.oldPaddingBottom=M.style.paddingBottom,M.style.height&&(M.dataset.elExistsHeight=M.style.height),M.style.maxHeight=0,M.style.paddingTop=0,M.style.paddingBottom=0},enter(M){requestAnimationFrame(()=>{M.dataset.oldOverflow=M.style.overflow,M.dataset.elExistsHeight?M.style.maxHeight=M.dataset.elExistsHeight:M.scrollHeight!==0?M.style.maxHeight=`${M.scrollHeight}px`:M.style.maxHeight=0,M.style.paddingTop=M.dataset.oldPaddingTop,M.style.paddingBottom=M.dataset.oldPaddingBottom,M.style.overflow="hidden"})},afterEnter(M){M.style.maxHeight="",M.style.overflow=M.dataset.oldOverflow},enterCancelled(M){l(M)},beforeLeave(M){M.dataset||(M.dataset={}),M.dataset.oldPaddingTop=M.style.paddingTop,M.dataset.oldPaddingBottom=M.style.paddingBottom,M.dataset.oldOverflow=M.style.overflow,M.style.maxHeight=`${M.scrollHeight}px`,M.style.overflow="hidden"},leave(M){M.scrollHeight!==0&&(M.style.maxHeight=0,M.style.paddingTop=0,M.style.paddingBottom=0)},afterLeave(M){l(M)},leaveCancelled(M){l(M)}};return(M,_)=>(d.openBlock(),d.createBlock(d.Transition,d.mergeProps({name:d.unref(T).b()},d.toHandlers(b)),{default:d.withCtx(()=>[d.renderSlot(M.$slots,"default")]),_:3},16,["name"]))}});var PD=ti(xD,[["__file","collapse-transition.vue"]]);const ED=Vn(PD),MD=mi({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Lo,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:x=>x===null||oi(x)||["min","max"].includes(x),default:null},name:String,placeholder:String,precision:{type:Number,validator:x=>x>=0&&x===Number.parseInt(`${x}`,10)},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),SD={[ro]:(x,T)=>T!==x,blur:x=>x instanceof FocusEvent,focus:x=>x instanceof FocusEvent,[io]:x=>oi(x)||to(x),[gi]:x=>oi(x)||to(x)},TD=d.defineComponent({name:"ElInputNumber"}),kD=d.defineComponent({...TD,props:MD,emits:SD,setup(x,{expose:T,emit:l}){const b=x,{t:M}=mh(),_=ei("input-number"),m=d.ref(),p=d.reactive({currentValue:b.modelValue,userInput:null}),{formItem:g}=No(),f=d.computed(()=>oi(b.modelValue)&&b.modelValue<=b.min),v=d.computed(()=>oi(b.modelValue)&&b.modelValue>=b.max),A=d.computed(()=>{const H=S(b.step);return bs(b.precision)?Math.max(S(b.modelValue),H):(H>b.precision&&Pi("InputNumber","precision should not be less than the decimal places of step"),b.precision)}),y=d.computed(()=>b.controls&&b.controlsPosition==="right"),w=Oo(),B=Lu(),P=d.computed(()=>{if(p.userInput!==null)return p.userInput;let H=p.currentValue;if(to(H))return"";if(oi(H)){if(Number.isNaN(H))return"";bs(b.precision)||(H=H.toFixed(b.precision))}return H}),E=(H,Z)=>{if(bs(Z)&&(Z=A.value),Z===0)return Math.round(H);let ee=String(H);const de=ee.indexOf(".");if(de===-1||!ee.replace(".","").split("")[de+Z])return H;const Ie=ee.length;return ee.charAt(Ie-1)==="5"&&(ee=`${ee.slice(0,Math.max(0,Ie-1))}6`),Number.parseFloat(Number(ee).toFixed(Z))},S=H=>{if(to(H))return 0;const Z=H.toString(),ee=Z.indexOf(".");let de=0;return ee!==-1&&(de=Z.length-ee-1),de},I=(H,Z=1)=>oi(H)?E(H+b.step*Z):p.currentValue,F=()=>{if(b.readonly||B.value||v.value)return;const H=Number(P.value)||0,Z=I(H);V(Z),l(io,p.currentValue),L()},N=()=>{if(b.readonly||B.value||f.value)return;const H=Number(P.value)||0,Z=I(H,-1);V(Z),l(io,p.currentValue),L()},O=(H,Z)=>{const{max:ee,min:de,step:Y,precision:Ce,stepStrictly:Ie,valueOnClear:ye}=b;ee<de&&fh("InputNumber","min should not be greater than max.");let me=Number(H);if(to(H)||Number.isNaN(me))return null;if(H===""){if(ye===null)return null;me=cn(ye)?{min:de,max:ee}[ye]:ye}return Ie&&(me=E(Math.round(me/Y)*Y,Ce)),bs(Ce)||(me=E(me,Ce)),(me>ee||me<de)&&(me=me>ee?ee:de,Z&&l(gi,me)),me},V=(H,Z=!0)=>{var ee;const de=p.currentValue,Y=O(H);if(!Z){l(gi,Y);return}de===Y&&H||(p.userInput=null,l(gi,Y),de!==Y&&l(ro,Y,de),b.validateEvent&&((ee=g==null?void 0:g.validate)==null||ee.call(g,"change").catch(Ce=>Pi(Ce))),p.currentValue=Y)},G=H=>{p.userInput=H;const Z=H===""?null:Number(H);l(io,Z),V(Z,!1)},U=H=>{const Z=H!==""?Number(H):"";(oi(Z)&&!Number.isNaN(Z)||H==="")&&V(Z),L(),p.userInput=null},j=()=>{var H,Z;(Z=(H=m.value)==null?void 0:H.focus)==null||Z.call(H)},K=()=>{var H,Z;(Z=(H=m.value)==null?void 0:H.blur)==null||Z.call(H)},$=H=>{l("focus",H)},W=H=>{var Z;p.userInput=null,l("blur",H),b.validateEvent&&((Z=g==null?void 0:g.validate)==null||Z.call(g,"blur").catch(ee=>Pi(ee)))},L=()=>{p.currentValue!==b.modelValue&&(p.currentValue=b.modelValue)},z=H=>{document.activeElement===H.target&&H.preventDefault()};return d.watch(()=>b.modelValue,(H,Z)=>{const ee=O(H,!0);p.userInput===null&&ee!==Z&&(p.currentValue=ee)},{immediate:!0}),d.onMounted(()=>{var H;const{min:Z,max:ee,modelValue:de}=b,Y=(H=m.value)==null?void 0:H.input;if(Y.setAttribute("role","spinbutton"),Number.isFinite(ee)?Y.setAttribute("aria-valuemax",String(ee)):Y.removeAttribute("aria-valuemax"),Number.isFinite(Z)?Y.setAttribute("aria-valuemin",String(Z)):Y.removeAttribute("aria-valuemin"),Y.setAttribute("aria-valuenow",p.currentValue||p.currentValue===0?String(p.currentValue):""),Y.setAttribute("aria-disabled",String(B.value)),!oi(de)&&de!=null){let Ce=Number(de);Number.isNaN(Ce)&&(Ce=null),l(gi,Ce)}Y.addEventListener("wheel",z,{passive:!1})}),d.onUpdated(()=>{var H,Z;const ee=(H=m.value)==null?void 0:H.input;ee==null||ee.setAttribute("aria-valuenow",`${(Z=p.currentValue)!=null?Z:""}`)}),T({focus:j,blur:K}),(H,Z)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([d.unref(_).b(),d.unref(_).m(d.unref(w)),d.unref(_).is("disabled",d.unref(B)),d.unref(_).is("without-controls",!H.controls),d.unref(_).is("controls-right",d.unref(y))]),onDragstart:d.withModifiers(()=>{},["prevent"])},[H.controls?d.withDirectives((d.openBlock(),d.createElementBlock("span",{key:0,role:"button","aria-label":d.unref(M)("el.inputNumber.decrease"),class:d.normalizeClass([d.unref(_).e("decrease"),d.unref(_).is("disabled",d.unref(f))]),onKeydown:d.withKeys(N,["enter"])},[d.renderSlot(H.$slots,"decrease-icon",{},()=>[d.createVNode(d.unref(mn),null,{default:d.withCtx(()=>[d.unref(y)?(d.openBlock(),d.createBlock(d.unref(wn.ArrowDown),{key:0})):(d.openBlock(),d.createBlock(d.unref(wn.Minus),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[d.unref(cy),N]]):d.createCommentVNode("v-if",!0),H.controls?d.withDirectives((d.openBlock(),d.createElementBlock("span",{key:1,role:"button","aria-label":d.unref(M)("el.inputNumber.increase"),class:d.normalizeClass([d.unref(_).e("increase"),d.unref(_).is("disabled",d.unref(v))]),onKeydown:d.withKeys(F,["enter"])},[d.renderSlot(H.$slots,"increase-icon",{},()=>[d.createVNode(d.unref(mn),null,{default:d.withCtx(()=>[d.unref(y)?(d.openBlock(),d.createBlock(d.unref(wn.ArrowUp),{key:0})):(d.openBlock(),d.createBlock(d.unref(wn.Plus),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[d.unref(cy),F]]):d.createCommentVNode("v-if",!0),d.createVNode(d.unref(Ou),{id:H.id,ref_key:"input",ref:m,type:"number",step:H.step,"model-value":d.unref(P),placeholder:H.placeholder,readonly:H.readonly,disabled:d.unref(B),size:d.unref(w),max:H.max,min:H.min,name:H.name,"aria-label":H.ariaLabel,"validate-event":!1,onKeydown:[d.withKeys(d.withModifiers(F,["prevent"]),["up"]),d.withKeys(d.withModifiers(N,["prevent"]),["down"])],onBlur:W,onFocus:$,onInput:G,onChange:U},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var ID=ti(kD,[["__file","input-number.vue"]]);const FD=Vn(ID),By=Symbol("ElSelectGroup"),Nu=Symbol("ElSelect");function DD(x,T){const l=d.inject(Nu),b=d.inject(By,{disabled:!1}),M=d.computed(()=>v(la(l.props.modelValue),x.value)),_=d.computed(()=>{var w;if(l.props.multiple){const B=la((w=l.props.modelValue)!=null?w:[]);return!M.value&&B.length>=l.props.multipleLimit&&l.props.multipleLimit>0}else return!1}),m=d.computed(()=>x.label||(jn(x.value)?"":x.value)),p=d.computed(()=>x.value||x.label||""),g=d.computed(()=>x.disabled||T.groupDisabled||_.value),f=d.getCurrentInstance(),v=(w=[],B)=>{if(jn(x.value)){const P=l.props.valueKey;return w&&w.some(E=>d.toRaw(Io(E,P))===Io(B,P))}else return w&&w.includes(B)},A=()=>{!x.disabled&&!b.disabled&&(l.states.hoveringIndex=l.optionsArray.indexOf(f.proxy))},y=w=>{const B=new RegExp(Ek(w),"i");T.visible=B.test(m.value)||x.created};return d.watch(()=>m.value,()=>{!x.created&&!l.props.remote&&l.setSelected()}),d.watch(()=>x.value,(w,B)=>{const{remote:P,valueKey:E}=l.props;if(w!==B&&(l.onOptionDestroy(B,f.proxy),l.onOptionCreate(f.proxy)),!x.created&&!P){if(E&&jn(w)&&jn(B)&&w[E]===B[E])return;l.setSelected()}}),d.watch(()=>b.disabled,()=>{T.groupDisabled=b.disabled},{immediate:!0}),{select:l,currentLabel:m,currentValue:p,itemSelected:M,isDisabled:g,hoverItem:A,updateOption:y}}const RD=d.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(x){const T=ei("select"),l=Du(),b=d.computed(()=>[T.be("dropdown","item"),T.is("disabled",d.unref(p)),T.is("selected",d.unref(m)),T.is("hovering",d.unref(y))]),M=d.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:_,itemSelected:m,isDisabled:p,select:g,hoverItem:f,updateOption:v}=DD(x,M),{visible:A,hover:y}=d.toRefs(M),w=d.getCurrentInstance().proxy;g.onOptionCreate(w),d.onBeforeUnmount(()=>{const P=w.value,{selected:E}=g.states,I=(g.props.multiple?E:[E]).some(F=>F.value===w.value);d.nextTick(()=>{g.states.cachedOptions.get(P)===w&&!I&&g.states.cachedOptions.delete(P)}),g.onOptionDestroy(P,w)});function B(){p.value||g.handleOptionSelect(w)}return{ns:T,id:l,containerKls:b,currentLabel:_,itemSelected:m,isDisabled:p,select:g,hoverItem:f,updateOption:v,visible:A,hover:y,selectOptionClick:B,states:M}}});function LD(x,T,l,b,M,_){return d.withDirectives((d.openBlock(),d.createElementBlock("li",{id:x.id,class:d.normalizeClass(x.containerKls),role:"option","aria-disabled":x.isDisabled||void 0,"aria-selected":x.itemSelected,onMouseenter:x.hoverItem,onClick:d.withModifiers(x.selectOptionClick,["stop"])},[d.renderSlot(x.$slots,"default",{},()=>[d.createElementVNode("span",null,d.toDisplayString(x.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[d.vShow,x.visible]])}var RA=ti(RD,[["render",LD],["__file","option.vue"]]);const OD=d.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const x=d.inject(Nu),T=ei("select"),l=d.computed(()=>x.props.popperClass),b=d.computed(()=>x.props.multiple),M=d.computed(()=>x.props.fitInputWidth),_=d.ref("");function m(){var p;_.value=`${(p=x.selectRef)==null?void 0:p.offsetWidth}px`}return d.onMounted(()=>{m(),So(x.selectRef,m)}),{ns:T,minWidth:_,popperClass:l,isMultiple:b,isFitInputWidth:M}}});function ND(x,T,l,b,M,_){return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([x.ns.b("dropdown"),x.ns.is("multiple",x.isMultiple),x.popperClass]),style:d.normalizeStyle({[x.isFitInputWidth?"width":"minWidth"]:x.minWidth})},[x.$slots.header?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.be("dropdown","header"))},[d.renderSlot(x.$slots,"header")],2)):d.createCommentVNode("v-if",!0),d.renderSlot(x.$slots,"default"),x.$slots.footer?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(x.ns.be("dropdown","footer"))},[d.renderSlot(x.$slots,"footer")],2)):d.createCommentVNode("v-if",!0)],6)}var UD=ti(OD,[["render",ND],["__file","select-dropdown.vue"]]);const jD=11,VD=(x,T)=>{const{t:l}=mh(),b=Du(),M=ei("select"),_=ei("input"),m=d.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:x.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),p=d.ref(null),g=d.ref(null),f=d.ref(null),v=d.ref(null),A=d.ref(null),y=d.ref(null),w=d.ref(null),B=d.ref(null),P=d.ref(null),E=d.ref(null),S=d.ref(null),I=d.ref(null),{isComposing:F,handleCompositionStart:N,handleCompositionUpdate:O,handleCompositionEnd:V}=z0({afterComposition:Pt=>_t(Pt)}),{wrapperRef:G,isFocused:U,handleBlur:j}=Q0(A,{afterFocus(){x.automaticDropdown&&!K.value&&(K.value=!0,m.menuVisibleOnFocus=!0)},beforeBlur(Pt){var Xt,er;return((Xt=f.value)==null?void 0:Xt.isFocusInsideContent(Pt))||((er=v.value)==null?void 0:er.isFocusInsideContent(Pt))},afterBlur(){K.value=!1,m.menuVisibleOnFocus=!1}}),K=d.ref(!1),$=d.ref(),{form:W,formItem:L}=No(),{inputId:z}=Ha(x,{formItemContext:L}),{valueOnClear:H,isEmptyValue:Z}=vI(x),ee=d.computed(()=>x.disabled||(W==null?void 0:W.disabled)),de=d.computed(()=>Yn(x.modelValue)?x.modelValue.length>0:!Z(x.modelValue)),Y=d.computed(()=>x.clearable&&!ee.value&&m.inputHovering&&de.value),Ce=d.computed(()=>x.remote&&x.filterable&&!x.remoteShowSuffix?"":x.suffixIcon),Ie=d.computed(()=>M.is("reverse",Ce.value&&K.value)),ye=d.computed(()=>(L==null?void 0:L.validateState)||""),me=d.computed(()=>h0[ye.value]),Be=d.computed(()=>x.remote?300:0),ve=d.computed(()=>x.loading?x.loadingText||l("el.select.loading"):x.remote&&!m.inputValue&&m.options.size===0?!1:x.filterable&&m.inputValue&&m.options.size>0&&Pe.value===0?x.noMatchText||l("el.select.noMatch"):m.options.size===0?x.noDataText||l("el.select.noData"):null),Pe=d.computed(()=>Me.value.filter(Pt=>Pt.visible).length),Me=d.computed(()=>{const Pt=Array.from(m.options.values()),Xt=[];return m.optionValues.forEach(er=>{const Hr=Pt.findIndex(hn=>hn.value===er);Hr>-1&&Xt.push(Pt[Hr])}),Xt.length>=Pt.length?Xt:Pt}),Le=d.computed(()=>Array.from(m.cachedOptions.values())),Ue=d.computed(()=>{const Pt=Me.value.filter(Xt=>!Xt.created).some(Xt=>Xt.currentLabel===m.inputValue);return x.filterable&&x.allowCreate&&m.inputValue!==""&&!Pt}),_e=()=>{x.filterable&&en(x.filterMethod)||x.filterable&&x.remote&&en(x.remoteMethod)||Me.value.forEach(Pt=>{var Xt;(Xt=Pt.updateOption)==null||Xt.call(Pt,m.inputValue)})},Xe=Oo(),we=d.computed(()=>["small"].includes(Xe.value)?"small":"default"),oe=d.computed({get(){return K.value&&ve.value!==!1},set(Pt){K.value=Pt}}),Ae=d.computed(()=>{if(x.multiple&&!bs(x.modelValue))return la(x.modelValue).length===0&&!m.inputValue;const Pt=Yn(x.modelValue)?x.modelValue[0]:x.modelValue;return x.filterable||bs(Pt)?!m.inputValue:!0}),h=d.computed(()=>{var Pt;const Xt=(Pt=x.placeholder)!=null?Pt:l("el.select.placeholder");return x.multiple||!de.value?Xt:m.selectedLabel}),De=d.computed(()=>Qf?null:"mouseenter");d.watch(()=>x.modelValue,(Pt,Xt)=>{x.multiple&&x.filterable&&!x.reserveKeyword&&(m.inputValue="",je("")),ue(),!dh(Pt,Xt)&&x.validateEvent&&(L==null||L.validate("change").catch(er=>Pi(er)))},{flush:"post",deep:!0}),d.watch(()=>K.value,Pt=>{Pt?je(m.inputValue):(m.inputValue="",m.previousQuery=null,m.isBeforeHide=!0),T("visible-change",Pt)}),d.watch(()=>m.options.entries(),()=>{var Pt;if(!Bn)return;const Xt=((Pt=p.value)==null?void 0:Pt.querySelectorAll("input"))||[];(!x.filterable&&!x.defaultFirstOption&&!bs(x.modelValue)||!Array.from(Xt).includes(document.activeElement))&&ue(),x.defaultFirstOption&&(x.filterable||x.remote)&&Pe.value&&ae()},{flush:"post"}),d.watch(()=>m.hoveringIndex,Pt=>{oi(Pt)&&Pt>-1?$.value=Me.value[Pt]||{}:$.value={},Me.value.forEach(Xt=>{Xt.hover=$.value===Xt})}),d.watchEffect(()=>{m.isBeforeHide||_e()});const je=Pt=>{m.previousQuery===Pt||F.value||(m.previousQuery=Pt,x.filterable&&en(x.filterMethod)?x.filterMethod(Pt):x.filterable&&x.remote&&en(x.remoteMethod)&&x.remoteMethod(Pt),x.defaultFirstOption&&(x.filterable||x.remote)&&Pe.value?d.nextTick(ae):d.nextTick(re))},ae=()=>{const Pt=Me.value.filter(Hr=>Hr.visible&&!Hr.disabled&&!Hr.states.groupDisabled),Xt=Pt.find(Hr=>Hr.created),er=Pt[0];m.hoveringIndex=qe(Me.value,Xt||er)},ue=()=>{if(x.multiple)m.selectedLabel="";else{const Xt=Yn(x.modelValue)?x.modelValue[0]:x.modelValue,er=ce(Xt);m.selectedLabel=er.currentLabel,m.selected=er;return}const Pt=[];bs(x.modelValue)||la(x.modelValue).forEach(Xt=>{Pt.push(ce(Xt))}),m.selected=Pt},ce=Pt=>{let Xt;const er=zf(Pt).toLowerCase()==="object",Hr=zf(Pt).toLowerCase()==="null",hn=zf(Pt).toLowerCase()==="undefined";for(let ke=m.cachedOptions.size-1;ke>=0;ke--){const Re=Le.value[ke];if(er?Io(Re.value,x.valueKey)===Io(Pt,x.valueKey):Re.value===Pt){Xt={value:Pt,currentLabel:Re.currentLabel,get isDisabled(){return Re.isDisabled}};break}}if(Xt)return Xt;const be=er?Pt.label:!Hr&&!hn?Pt:"";return{value:Pt,currentLabel:be}},re=()=>{x.multiple?m.hoveringIndex=Me.value.findIndex(Pt=>m.selected.some(Xt=>yi(Xt)===yi(Pt))):m.hoveringIndex=Me.value.findIndex(Pt=>yi(Pt)===yi(m.selected))},fe=()=>{m.selectionWidth=g.value.getBoundingClientRect().width},le=()=>{m.calculatorWidth=y.value.getBoundingClientRect().width},Ee=()=>{m.collapseItemWidth=S.value.getBoundingClientRect().width},We=()=>{var Pt,Xt;(Xt=(Pt=f.value)==null?void 0:Pt.updatePopper)==null||Xt.call(Pt)},ze=()=>{var Pt,Xt;(Xt=(Pt=v.value)==null?void 0:Pt.updatePopper)==null||Xt.call(Pt)},Je=()=>{m.inputValue.length>0&&!K.value&&(K.value=!0),je(m.inputValue)},_t=Pt=>{if(m.inputValue=Pt.target.value,x.remote)at();else return Je()},at=aA(()=>{Je()},Be.value),yt=Pt=>{dh(x.modelValue,Pt)||T(ro,Pt)},rt=Pt=>bk(Pt,Xt=>!m.disabledOptions.has(Xt)),xt=Pt=>{if(x.multiple&&Pt.code!==us.delete&&Pt.target.value.length<=0){const Xt=la(x.modelValue).slice(),er=rt(Xt);if(er<0)return;const Hr=Xt[er];Xt.splice(er,1),T(gi,Xt),yt(Xt),T("remove-tag",Hr)}},It=(Pt,Xt)=>{const er=m.selected.indexOf(Xt);if(er>-1&&!ee.value){const Hr=la(x.modelValue).slice();Hr.splice(er,1),T(gi,Hr),yt(Hr),T("remove-tag",Xt.value)}Pt.stopPropagation(),rr()},Ot=Pt=>{Pt.stopPropagation();const Xt=x.multiple?[]:H.value;if(x.multiple)for(const er of m.selected)er.isDisabled&&Xt.push(er.value);T(gi,Xt),yt(Xt),m.hoveringIndex=-1,K.value=!1,T("clear"),rr()},$e=Pt=>{var Xt;if(x.multiple){const er=la((Xt=x.modelValue)!=null?Xt:[]).slice(),Hr=qe(er,Pt.value);Hr>-1?er.splice(Hr,1):(x.multipleLimit<=0||er.length<x.multipleLimit)&&er.push(Pt.value),T(gi,er),yt(er),Pt.created&&je(""),x.filterable&&!x.reserveKeyword&&(m.inputValue="")}else T(gi,Pt.value),yt(Pt.value),K.value=!1;rr(),!K.value&&d.nextTick(()=>{lt(Pt)})},qe=(Pt=[],Xt)=>{if(!jn(Xt))return Pt.indexOf(Xt);const er=x.valueKey;let Hr=-1;return Pt.some((hn,be)=>d.toRaw(Io(hn,er))===Io(Xt,er)?(Hr=be,!0):!1),Hr},lt=Pt=>{var Xt,er,Hr,hn,be;const Te=Yn(Pt)?Pt[0]:Pt;let ke=null;if(Te!=null&&Te.value){const Re=Me.value.filter(Qe=>Qe.value===Te.value);Re.length>0&&(ke=Re[0].$el)}if(f.value&&ke){const Re=(hn=(Hr=(er=(Xt=f.value)==null?void 0:Xt.popperRef)==null?void 0:er.contentRef)==null?void 0:Hr.querySelector)==null?void 0:hn.call(Hr,`.${M.be("dropdown","wrap")}`);Re&&Tk(Re,ke)}(be=I.value)==null||be.handleScroll()},gt=Pt=>{m.options.set(Pt.value,Pt),m.cachedOptions.set(Pt.value,Pt),Pt.disabled&&m.disabledOptions.set(Pt.value,Pt)},Ft=(Pt,Xt)=>{m.options.get(Pt)===Xt&&m.options.delete(Pt)},jt=d.computed(()=>{var Pt,Xt;return(Xt=(Pt=f.value)==null?void 0:Pt.popperRef)==null?void 0:Xt.contentRef}),Gt=()=>{m.isBeforeHide=!1,d.nextTick(()=>lt(m.selected))},rr=()=>{var Pt;(Pt=A.value)==null||Pt.focus()},lr=()=>{wr()},vr=Pt=>{Ot(Pt)},wr=Pt=>{if(K.value=!1,U.value){const Xt=new FocusEvent("focus",Pt);d.nextTick(()=>j(Xt))}},qt=()=>{m.inputValue.length>0?m.inputValue="":K.value=!1},ai=()=>{ee.value||(Qf&&(m.inputHovering=!0),m.menuVisibleOnFocus?m.menuVisibleOnFocus=!1:K.value=!K.value)},wt=()=>{K.value?Me.value[m.hoveringIndex]&&$e(Me.value[m.hoveringIndex]):ai()},yi=Pt=>jn(Pt.value)?Io(Pt.value,x.valueKey):Pt.value,ri=d.computed(()=>Me.value.filter(Pt=>Pt.visible).every(Pt=>Pt.disabled)),jr=d.computed(()=>x.multiple?x.collapseTags?m.selected.slice(0,x.maxCollapseTags):m.selected:[]),Ri=d.computed(()=>x.multiple?x.collapseTags?m.selected.slice(x.maxCollapseTags):[]:[]),ii=Pt=>{if(!K.value){K.value=!0;return}if(!(m.options.size===0||m.filteredOptionsCount===0||F.value)&&!ri.value){Pt==="next"?(m.hoveringIndex++,m.hoveringIndex===m.options.size&&(m.hoveringIndex=0)):Pt==="prev"&&(m.hoveringIndex--,m.hoveringIndex<0&&(m.hoveringIndex=m.options.size-1));const Xt=Me.value[m.hoveringIndex];(Xt.disabled===!0||Xt.states.groupDisabled===!0||!Xt.visible)&&ii(Pt),d.nextTick(()=>lt($.value))}},Xr=()=>{if(!g.value)return 0;const Pt=window.getComputedStyle(g.value);return Number.parseFloat(Pt.gap||"6px")},Di=d.computed(()=>{const Pt=Xr();return{maxWidth:`${S.value&&x.maxCollapseTags===1?m.selectionWidth-m.collapseItemWidth-Pt:m.selectionWidth}px`}}),li=d.computed(()=>({maxWidth:`${m.selectionWidth}px`})),Qi=d.computed(()=>({width:`${Math.max(m.calculatorWidth,jD)}px`}));return So(g,fe),So(y,le),So(P,We),So(G,We),So(E,ze),So(S,Ee),d.onMounted(()=>{ue()}),{inputId:z,contentId:b,nsSelect:M,nsInput:_,states:m,isFocused:U,expanded:K,optionsArray:Me,hoverOption:$,selectSize:Xe,filteredOptionsCount:Pe,resetCalculatorWidth:le,updateTooltip:We,updateTagTooltip:ze,debouncedOnInputChange:at,onInput:_t,deletePrevTag:xt,deleteTag:It,deleteSelected:Ot,handleOptionSelect:$e,scrollToOption:lt,hasModelValue:de,shouldShowPlaceholder:Ae,currentPlaceholder:h,mouseEnterEventName:De,showClose:Y,iconComponent:Ce,iconReverse:Ie,validateState:ye,validateIcon:me,showNewOption:Ue,updateOptions:_e,collapseTagSize:we,setSelected:ue,selectDisabled:ee,emptyText:ve,handleCompositionStart:N,handleCompositionUpdate:O,handleCompositionEnd:V,onOptionCreate:gt,onOptionDestroy:Ft,handleMenuEnter:Gt,focus:rr,blur:lr,handleClearClick:vr,handleClickOutside:wr,handleEsc:qt,toggleMenu:ai,selectOption:wt,getValueKey:yi,navigateOptions:ii,dropdownMenuVisible:oe,showTagList:jr,collapseTagList:Ri,tagStyle:Di,collapseTagStyle:li,inputStyle:Qi,popperRef:jt,inputRef:A,tooltipRef:f,tagTooltipRef:v,calculatorRef:y,prefixRef:w,suffixRef:B,selectRef:p,wrapperRef:G,selectionRef:g,scrollbarRef:I,menuRef:P,tagMenuRef:E,collapseItemRef:S}};var HD=d.defineComponent({name:"ElOptions",setup(x,{slots:T}){const l=d.inject(Nu);let b=[];return()=>{var M,_;const m=(M=T.default)==null?void 0:M.call(T),p=[];function g(f){Yn(f)&&f.forEach(v=>{var A,y,w,B;const P=(A=(v==null?void 0:v.type)||{})==null?void 0:A.name;P==="ElOptionGroup"?g(!cn(v.children)&&!Yn(v.children)&&en((y=v.children)==null?void 0:y.default)?(w=v.children)==null?void 0:w.default():v.children):P==="ElOption"?p.push((B=v.props)==null?void 0:B.value):Yn(v.children)&&g(v.children)})}return m.length&&g((_=m[0])==null?void 0:_.children),dh(p,b)||(b=p,l&&(l.states.optionValues=p)),m}}});const QD=mi({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Lo,effect:{type:Ur(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ur(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:IA.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Do,default:wn.CircleClose},fitInputWidth:Boolean,suffixIcon:{type:Do,default:wn.ArrowDown},tagType:{...DA.type,default:"info"},tagEffect:{...DA.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Ur(String),values:yl,default:"bottom-start"},fallbackPlacements:{type:Ur(Array),default:["bottom-start","top-start","right","left"]},...pI,...Hs(["ariaLabel"])}),Cy="ElSelect",zD=d.defineComponent({name:Cy,componentName:Cy,components:{ElSelectMenu:UD,ElOption:RA,ElOptions:HD,ElTag:BD,ElScrollbar:Uo,ElTooltip:FA,ElIcon:mn},directives:{ClickOutside:QF},props:QD,emits:[gi,ro,"remove-tag","clear","visible-change","focus","blur"],setup(x,{emit:T}){const l=VD(x,T);return d.provide(Nu,d.reactive({props:x,states:l.states,optionsArray:l.optionsArray,handleOptionSelect:l.handleOptionSelect,onOptionCreate:l.onOptionCreate,onOptionDestroy:l.onOptionDestroy,selectRef:l.selectRef,setSelected:l.setSelected})),{...l}}});function GD(x,T,l,b,M,_){const m=d.resolveComponent("el-tag"),p=d.resolveComponent("el-tooltip"),g=d.resolveComponent("el-icon"),f=d.resolveComponent("el-option"),v=d.resolveComponent("el-options"),A=d.resolveComponent("el-scrollbar"),y=d.resolveComponent("el-select-menu"),w=d.resolveDirective("click-outside");return d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref:"selectRef",class:d.normalizeClass([x.nsSelect.b(),x.nsSelect.m(x.selectSize)]),[d.toHandlerKey(x.mouseEnterEventName)]:B=>x.states.inputHovering=!0,onMouseleave:B=>x.states.inputHovering=!1},[d.createVNode(p,{ref:"tooltipRef",visible:x.dropdownMenuVisible,placement:x.placement,teleported:x.teleported,"popper-class":[x.nsSelect.e("popper"),x.popperClass],"popper-options":x.popperOptions,"fallback-placements":x.fallbackPlacements,effect:x.effect,pure:"",trigger:"click",transition:`${x.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:x.persistent,onBeforeShow:x.handleMenuEnter,onHide:B=>x.states.isBeforeHide=!1},{default:d.withCtx(()=>{var B;return[d.createElementVNode("div",{ref:"wrapperRef",class:d.normalizeClass([x.nsSelect.e("wrapper"),x.nsSelect.is("focused",x.isFocused),x.nsSelect.is("hovering",x.states.inputHovering),x.nsSelect.is("filterable",x.filterable),x.nsSelect.is("disabled",x.selectDisabled)]),onClick:d.withModifiers(x.toggleMenu,["prevent","stop"])},[x.$slots.prefix?(d.openBlock(),d.createElementBlock("div",{key:0,ref:"prefixRef",class:d.normalizeClass(x.nsSelect.e("prefix"))},[d.renderSlot(x.$slots,"prefix")],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{ref:"selectionRef",class:d.normalizeClass([x.nsSelect.e("selection"),x.nsSelect.is("near",x.multiple&&!x.$slots.prefix&&!!x.states.selected.length)])},[x.multiple?d.renderSlot(x.$slots,"tag",{key:0},()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.showTagList,P=>(d.openBlock(),d.createElementBlock("div",{key:x.getValueKey(P),class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{closable:!x.selectDisabled&&!P.isDisabled,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",style:d.normalizeStyle(x.tagStyle),onClose:E=>x.deleteTag(E,P)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))},[d.renderSlot(x.$slots,"label",{label:P.currentLabel,value:P.value},()=>[d.createTextVNode(d.toDisplayString(P.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),x.collapseTags&&x.states.selected.length>x.maxCollapseTags?(d.openBlock(),d.createBlock(p,{key:0,ref:"tagTooltipRef",disabled:x.dropdownMenuVisible||!x.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:x.effect,placement:"bottom",teleported:x.teleported},{default:d.withCtx(()=>[d.createElementVNode("div",{ref:"collapseItemRef",class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{closable:!1,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",style:d.normalizeStyle(x.collapseTagStyle)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))}," + "+d.toDisplayString(x.states.selected.length-x.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:d.withCtx(()=>[d.createElementVNode("div",{ref:"tagMenuRef",class:d.normalizeClass(x.nsSelect.e("selection"))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.collapseTagList,P=>(d.openBlock(),d.createElementBlock("div",{key:x.getValueKey(P),class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{class:"in-tooltip",closable:!x.selectDisabled&&!P.isDisabled,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",onClose:E=>x.deleteTag(E,P)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))},[d.renderSlot(x.$slots,"label",{label:P.currentLabel,value:P.value},()=>[d.createTextVNode(d.toDisplayString(P.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):d.createCommentVNode("v-if",!0)]):d.createCommentVNode("v-if",!0),x.selectDisabled?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass([x.nsSelect.e("selected-item"),x.nsSelect.e("input-wrapper"),x.nsSelect.is("hidden",!x.filterable)])},[d.withDirectives(d.createElementVNode("input",{id:x.inputId,ref:"inputRef","onUpdate:modelValue":P=>x.states.inputValue=P,type:"text",name:x.name,class:d.normalizeClass([x.nsSelect.e("input"),x.nsSelect.is(x.selectSize)]),disabled:x.selectDisabled,autocomplete:x.autocomplete,style:d.normalizeStyle(x.inputStyle),role:"combobox",readonly:!x.filterable,spellcheck:"false","aria-activedescendant":((B=x.hoverOption)==null?void 0:B.id)||"","aria-controls":x.contentId,"aria-expanded":x.dropdownMenuVisible,"aria-label":x.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[d.withKeys(d.withModifiers(P=>x.navigateOptions("next"),["stop","prevent"]),["down"]),d.withKeys(d.withModifiers(P=>x.navigateOptions("prev"),["stop","prevent"]),["up"]),d.withKeys(d.withModifiers(x.handleEsc,["stop","prevent"]),["esc"]),d.withKeys(d.withModifiers(x.selectOption,["stop","prevent"]),["enter"]),d.withKeys(d.withModifiers(x.deletePrevTag,["stop"]),["delete"])],onCompositionstart:x.handleCompositionStart,onCompositionupdate:x.handleCompositionUpdate,onCompositionend:x.handleCompositionEnd,onInput:x.onInput,onClick:d.withModifiers(x.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[d.vModelText,x.states.inputValue]]),x.filterable?(d.openBlock(),d.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:d.normalizeClass(x.nsSelect.e("input-calculator")),textContent:d.toDisplayString(x.states.inputValue)},null,10,["textContent"])):d.createCommentVNode("v-if",!0)],2)),x.shouldShowPlaceholder?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass([x.nsSelect.e("selected-item"),x.nsSelect.e("placeholder"),x.nsSelect.is("transparent",!x.hasModelValue||x.expanded&&!x.states.inputValue)])},[x.hasModelValue?d.renderSlot(x.$slots,"label",{key:0,label:x.currentPlaceholder,value:x.modelValue},()=>[d.createElementVNode("span",null,d.toDisplayString(x.currentPlaceholder),1)]):(d.openBlock(),d.createElementBlock("span",{key:1},d.toDisplayString(x.currentPlaceholder),1))],2)):d.createCommentVNode("v-if",!0)],2),d.createElementVNode("div",{ref:"suffixRef",class:d.normalizeClass(x.nsSelect.e("suffix"))},[x.iconComponent&&!x.showClose?(d.openBlock(),d.createBlock(g,{key:0,class:d.normalizeClass([x.nsSelect.e("caret"),x.nsSelect.e("icon"),x.iconReverse])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.iconComponent)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),x.showClose&&x.clearIcon?(d.openBlock(),d.createBlock(g,{key:1,class:d.normalizeClass([x.nsSelect.e("caret"),x.nsSelect.e("icon")]),onClick:x.handleClearClick},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.clearIcon)))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0),x.validateState&&x.validateIcon?(d.openBlock(),d.createBlock(g,{key:2,class:d.normalizeClass([x.nsInput.e("icon"),x.nsInput.e("validateIcon")])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.validateIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:d.withCtx(()=>[d.createVNode(y,{ref:"menuRef"},{default:d.withCtx(()=>[x.$slots.header?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.nsSelect.be("dropdown","header")),onClick:d.withModifiers(()=>{},["stop"])},[d.renderSlot(x.$slots,"header")],10,["onClick"])):d.createCommentVNode("v-if",!0),d.withDirectives(d.createVNode(A,{id:x.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":x.nsSelect.be("dropdown","wrap"),"view-class":x.nsSelect.be("dropdown","list"),class:d.normalizeClass([x.nsSelect.is("empty",x.filteredOptionsCount===0)]),role:"listbox","aria-label":x.ariaLabel,"aria-orientation":"vertical"},{default:d.withCtx(()=>[x.showNewOption?(d.openBlock(),d.createBlock(f,{key:0,value:x.states.inputValue,created:!0},null,8,["value"])):d.createCommentVNode("v-if",!0),d.createVNode(v,null,{default:d.withCtx(()=>[d.renderSlot(x.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[d.vShow,x.states.options.size>0&&!x.loading]]),x.$slots.loading&&x.loading?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(x.nsSelect.be("dropdown","loading"))},[d.renderSlot(x.$slots,"loading")],2)):x.loading||x.filteredOptionsCount===0?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(x.nsSelect.be("dropdown","empty"))},[d.renderSlot(x.$slots,"empty",{},()=>[d.createElementVNode("span",null,d.toDisplayString(x.emptyText),1)])],2)):d.createCommentVNode("v-if",!0),x.$slots.footer?(d.openBlock(),d.createElementBlock("div",{key:3,class:d.normalizeClass(x.nsSelect.be("dropdown","footer")),onClick:d.withModifiers(()=>{},["stop"])},[d.renderSlot(x.$slots,"footer")],10,["onClick"])):d.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow","onHide"])],16,["onMouseleave"])),[[w,x.handleClickOutside,x.popperRef]])}var WD=ti(zD,[["render",GD],["__file","select.vue"]]);const KD=d.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(x){const T=ei("select"),l=d.ref(null),b=d.getCurrentInstance(),M=d.ref([]);d.provide(By,d.reactive({...d.toRefs(x)}));const _=d.computed(()=>M.value.some(f=>f.visible===!0)),m=f=>{var v,A;return((v=f.type)==null?void 0:v.name)==="ElOption"&&!!((A=f.component)!=null&&A.proxy)},p=f=>{const v=la(f),A=[];return v.forEach(y=>{var w,B;m(y)?A.push(y.component.proxy):(w=y.children)!=null&&w.length?A.push(...p(y.children)):(B=y.component)!=null&&B.subTree&&A.push(...p(y.component.subTree))}),A},g=()=>{M.value=p(b.subTree)};return d.onMounted(()=>{g()}),EE(l,g,{attributes:!0,subtree:!0,childList:!0}),{groupRef:l,visible:_,ns:T}}});function XD(x,T,l,b,M,_){return d.withDirectives((d.openBlock(),d.createElementBlock("ul",{ref:"groupRef",class:d.normalizeClass(x.ns.be("group","wrap"))},[d.createElementVNode("li",{class:d.normalizeClass(x.ns.be("group","title"))},d.toDisplayString(x.label),3),d.createElementVNode("li",null,[d.createElementVNode("ul",{class:d.normalizeClass(x.ns.b("group"))},[d.renderSlot(x.$slots,"default")],2)])],2)),[[d.vShow,x.visible]])}var xy=ti(KD,[["render",XD],["__file","option-group.vue"]]);const $D=Vn(WD,{Option:RA,OptionGroup:xy}),YD=gl(RA);gl(xy);const Py=Symbol("sliderContextKey"),JD=mi({modelValue:{type:Ur([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Lo,inputSize:Lo,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Ur(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Ur(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:yl,default:"top"},marks:{type:Ur(Object)},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),LA=x=>oi(x)||Yn(x)&&x.every(oi),ZD={[gi]:LA,[io]:LA,[ro]:LA},qD=(x,T,l)=>{const b=d.ref();return d.onMounted(async()=>{x.range?(Array.isArray(x.modelValue)?(T.firstValue=Math.max(x.min,x.modelValue[0]),T.secondValue=Math.min(x.max,x.modelValue[1])):(T.firstValue=x.min,T.secondValue=x.max),T.oldValue=[T.firstValue,T.secondValue]):(typeof x.modelValue!="number"||Number.isNaN(x.modelValue)?T.firstValue=x.min:T.firstValue=Math.min(x.max,Math.max(x.min,x.modelValue)),T.oldValue=T.firstValue),Sn(window,"resize",l),await d.nextTick(),l()}),{sliderWrapper:b}},eR=x=>d.computed(()=>x.marks?Object.keys(x.marks).map(Number.parseFloat).sort((l,b)=>l-b).filter(l=>l<=x.max&&l>=x.min).map(l=>({point:l,position:(l-x.min)*100/(x.max-x.min),mark:x.marks[l]})):[]),tR=(x,T,l)=>{const{form:b,formItem:M}=No(),_=d.shallowRef(),m=d.ref(),p=d.ref(),g={firstButton:m,secondButton:p},f=d.computed(()=>x.disabled||(b==null?void 0:b.disabled)||!1),v=d.computed(()=>Math.min(T.firstValue,T.secondValue)),A=d.computed(()=>Math.max(T.firstValue,T.secondValue)),y=d.computed(()=>x.range?`${100*(A.value-v.value)/(x.max-x.min)}%`:`${100*(T.firstValue-x.min)/(x.max-x.min)}%`),w=d.computed(()=>x.range?`${100*(v.value-x.min)/(x.max-x.min)}%`:"0%"),B=d.computed(()=>x.vertical?{height:x.height}:{}),P=d.computed(()=>x.vertical?{height:y.value,bottom:w.value}:{width:y.value,left:w.value}),E=()=>{_.value&&(T.sliderSize=_.value[`client${x.vertical?"Height":"Width"}`])},S=W=>{const L=x.min+W*(x.max-x.min)/100;if(!x.range)return m;let z;return Math.abs(v.value-L)<Math.abs(A.value-L)?z=T.firstValue<T.secondValue?"firstButton":"secondButton":z=T.firstValue>T.secondValue?"firstButton":"secondButton",g[z]},I=W=>{const L=S(W);return L.value.setPosition(W),L},F=W=>{T.firstValue=W??x.min,O(x.range?[v.value,A.value]:W??x.min)},N=W=>{T.secondValue=W,x.range&&O([v.value,A.value])},O=W=>{l(gi,W),l(io,W)},V=async()=>{await d.nextTick(),l(ro,x.range?[v.value,A.value]:x.modelValue)},G=W=>{var L,z,H,Z,ee,de;if(f.value||T.dragging)return;E();let Y=0;if(x.vertical){const Ce=(H=(z=(L=W.touches)==null?void 0:L.item(0))==null?void 0:z.clientY)!=null?H:W.clientY;Y=(_.value.getBoundingClientRect().bottom-Ce)/T.sliderSize*100}else{const Ce=(de=(ee=(Z=W.touches)==null?void 0:Z.item(0))==null?void 0:ee.clientX)!=null?de:W.clientX,Ie=_.value.getBoundingClientRect().left;Y=(Ce-Ie)/T.sliderSize*100}if(!(Y<0||Y>100))return I(Y)};return{elFormItem:M,slider:_,firstButton:m,secondButton:p,sliderDisabled:f,minValue:v,maxValue:A,runwayStyle:B,barStyle:P,resetSize:E,setPosition:I,emitChange:V,onSliderWrapperPrevent:W=>{var L,z;((L=g.firstButton.value)!=null&&L.dragging||(z=g.secondButton.value)!=null&&z.dragging)&&W.preventDefault()},onSliderClick:W=>{G(W)&&V()},onSliderDown:async W=>{const L=G(W);L&&(await d.nextTick(),L.value.onButtonDown(W))},onSliderMarkerDown:W=>{f.value||T.dragging||I(W)},setFirstValue:F,setSecondValue:N}},{left:rR,down:iR,right:nR,up:sR,home:oR,end:aR,pageUp:lR,pageDown:uR}=us,cR=(x,T,l)=>{const b=d.ref(),M=d.ref(!1),_=d.computed(()=>T.value instanceof Function),m=d.computed(()=>_.value&&T.value(x.modelValue)||x.modelValue),p=aA(()=>{l.value&&(M.value=!0)},50),g=aA(()=>{l.value&&(M.value=!1)},50);return{tooltip:b,tooltipVisible:M,formatValue:m,displayTooltip:p,hideTooltip:g}},hR=(x,T,l)=>{const{disabled:b,min:M,max:_,step:m,showTooltip:p,precision:g,sliderSize:f,formatTooltip:v,emitChange:A,resetSize:y,updateDragging:w}=d.inject(Py),{tooltip:B,tooltipVisible:P,formatValue:E,displayTooltip:S,hideTooltip:I}=cR(x,v,p),F=d.ref(),N=d.computed(()=>`${(x.modelValue-M.value)/(_.value-M.value)*100}%`),O=d.computed(()=>x.vertical?{bottom:N.value}:{left:N.value}),V=()=>{T.hovering=!0,S()},G=()=>{T.hovering=!1,T.dragging||I()},U=ye=>{b.value||(ye.preventDefault(),de(ye),window.addEventListener("mousemove",Y),window.addEventListener("touchmove",Y),window.addEventListener("mouseup",Ce),window.addEventListener("touchend",Ce),window.addEventListener("contextmenu",Ce),F.value.focus())},j=ye=>{b.value||(T.newPosition=Number.parseFloat(N.value)+ye/(_.value-M.value)*100,Ie(T.newPosition),A())},K=()=>{j(-m.value)},$=()=>{j(m.value)},W=()=>{j(-m.value*4)},L=()=>{j(m.value*4)},z=()=>{b.value||(Ie(0),A())},H=()=>{b.value||(Ie(100),A())},Z=ye=>{let me=!0;[rR,iR].includes(ye.key)?K():[nR,sR].includes(ye.key)?$():ye.key===oR?z():ye.key===aR?H():ye.key===uR?W():ye.key===lR?L():me=!1,me&&ye.preventDefault()},ee=ye=>{let me,Be;return ye.type.startsWith("touch")?(Be=ye.touches[0].clientY,me=ye.touches[0].clientX):(Be=ye.clientY,me=ye.clientX),{clientX:me,clientY:Be}},de=ye=>{T.dragging=!0,T.isClick=!0;const{clientX:me,clientY:Be}=ee(ye);x.vertical?T.startY=Be:T.startX=me,T.startPosition=Number.parseFloat(N.value),T.newPosition=T.startPosition},Y=ye=>{if(T.dragging){T.isClick=!1,S(),y();let me;const{clientX:Be,clientY:ve}=ee(ye);x.vertical?(T.currentY=ve,me=(T.startY-T.currentY)/f.value*100):(T.currentX=Be,me=(T.currentX-T.startX)/f.value*100),T.newPosition=T.startPosition+me,Ie(T.newPosition)}},Ce=()=>{T.dragging&&(setTimeout(()=>{T.dragging=!1,T.hovering||I(),T.isClick||Ie(T.newPosition),A()},0),window.removeEventListener("mousemove",Y),window.removeEventListener("touchmove",Y),window.removeEventListener("mouseup",Ce),window.removeEventListener("touchend",Ce),window.removeEventListener("contextmenu",Ce))},Ie=async ye=>{if(ye===null||Number.isNaN(+ye))return;ye<0?ye=0:ye>100&&(ye=100);const me=100/((_.value-M.value)/m.value);let ve=Math.round(ye/me)*me*(_.value-M.value)*.01+M.value;ve=Number.parseFloat(ve.toFixed(g.value)),ve!==x.modelValue&&l(gi,ve),!T.dragging&&x.modelValue!==T.oldValue&&(T.oldValue=x.modelValue),await d.nextTick(),T.dragging&&S(),B.value.updatePopper()};return d.watch(()=>T.dragging,ye=>{w(ye)}),Sn(F,"touchstart",U,{passive:!1}),{disabled:b,button:F,tooltip:B,tooltipVisible:P,showTooltip:p,wrapperStyle:O,formatValue:E,handleMouseEnter:V,handleMouseLeave:G,onButtonDown:U,onKeyDown:Z,setPosition:Ie}},dR=(x,T,l,b)=>({stops:d.computed(()=>{if(!x.showStops||x.min>x.max)return[];if(x.step===0)return Pi("ElSlider","step should not be 0."),[];const m=(x.max-x.min)/x.step,p=100*x.step/(x.max-x.min),g=Array.from({length:m-1}).map((f,v)=>(v+1)*p);return x.range?g.filter(f=>f<100*(l.value-x.min)/(x.max-x.min)||f>100*(b.value-x.min)/(x.max-x.min)):g.filter(f=>f>100*(T.firstValue-x.min)/(x.max-x.min))}),getStopStyle:m=>x.vertical?{bottom:`${m}%`}:{left:`${m}%`}}),fR=(x,T,l,b,M,_)=>{const m=f=>{M(gi,f),M(io,f)},p=()=>x.range?![l.value,b.value].every((f,v)=>f===T.oldValue[v]):x.modelValue!==T.oldValue,g=()=>{var f,v;x.min>x.max&&fh("Slider","min should not be greater than max.");const A=x.modelValue;x.range&&Array.isArray(A)?A[1]<x.min?m([x.min,x.min]):A[0]>x.max?m([x.max,x.max]):A[0]<x.min?m([x.min,A[1]]):A[1]>x.max?m([A[0],x.max]):(T.firstValue=A[0],T.secondValue=A[1],p()&&(x.validateEvent&&((f=_==null?void 0:_.validate)==null||f.call(_,"change").catch(y=>Pi(y))),T.oldValue=A.slice())):!x.range&&typeof A=="number"&&!Number.isNaN(A)&&(A<x.min?m(x.min):A>x.max?m(x.max):(T.firstValue=A,p()&&(x.validateEvent&&((v=_==null?void 0:_.validate)==null||v.call(_,"change").catch(y=>Pi(y))),T.oldValue=A)))};g(),d.watch(()=>T.dragging,f=>{f||g()}),d.watch(()=>x.modelValue,(f,v)=>{T.dragging||Array.isArray(f)&&Array.isArray(v)&&f.every((A,y)=>A===v[y])&&T.firstValue===f[0]&&T.secondValue===f[1]||g()},{deep:!0}),d.watch(()=>[x.min,x.max],()=>{g()})},AR=mi({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:yl,default:"top"}}),pR={[gi]:x=>oi(x)},vR=d.defineComponent({name:"ElSliderButton"}),mR=d.defineComponent({...vR,props:AR,emits:pR,setup(x,{expose:T,emit:l}){const b=x,M=ei("slider"),_=d.reactive({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:b.modelValue}),{disabled:m,button:p,tooltip:g,showTooltip:f,tooltipVisible:v,wrapperStyle:A,formatValue:y,handleMouseEnter:w,handleMouseLeave:B,onButtonDown:P,onKeyDown:E,setPosition:S}=hR(b,_,l),{hovering:I,dragging:F}=d.toRefs(_);return T({onButtonDown:P,onKeyDown:E,setPosition:S,hovering:I,dragging:F}),(N,O)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"button",ref:p,class:d.normalizeClass([d.unref(M).e("button-wrapper"),{hover:d.unref(I),dragging:d.unref(F)}]),style:d.normalizeStyle(d.unref(A)),tabindex:d.unref(m)?-1:0,onMouseenter:d.unref(w),onMouseleave:d.unref(B),onMousedown:d.unref(P),onFocus:d.unref(w),onBlur:d.unref(B),onKeydown:d.unref(E)},[d.createVNode(d.unref(FA),{ref_key:"tooltip",ref:g,visible:d.unref(v),placement:N.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":N.tooltipClass,disabled:!d.unref(f),persistent:""},{content:d.withCtx(()=>[d.createElementVNode("span",null,d.toDisplayString(d.unref(y)),1)]),default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass([d.unref(M).e("button"),{hover:d.unref(I),dragging:d.unref(F)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var Ey=ti(mR,[["__file","button.vue"]]);const gR=mi({mark:{type:Ur([String,Object]),default:void 0}});var _R=d.defineComponent({name:"ElSliderMarker",props:gR,setup(x){const T=ei("slider"),l=d.computed(()=>cn(x.mark)?x.mark:x.mark.label),b=d.computed(()=>cn(x.mark)?void 0:x.mark.style);return()=>d.h("div",{class:T.e("marks-text"),style:b.value},l.value)}});const yR=d.defineComponent({name:"ElSlider"}),bR=d.defineComponent({...yR,props:JD,emits:ZD,setup(x,{expose:T,emit:l}){const b=x,M=ei("slider"),{t:_}=mh(),m=d.reactive({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:p,slider:g,firstButton:f,secondButton:v,sliderDisabled:A,minValue:y,maxValue:w,runwayStyle:B,barStyle:P,resetSize:E,emitChange:S,onSliderWrapperPrevent:I,onSliderClick:F,onSliderDown:N,onSliderMarkerDown:O,setFirstValue:V,setSecondValue:G}=tR(b,m,l),{stops:U,getStopStyle:j}=dR(b,m,y,w),{inputId:K,isLabeledByFormItem:$}=Ha(b,{formItemContext:p}),W=Oo(),L=d.computed(()=>b.inputSize||W.value),z=d.computed(()=>b.ariaLabel||_("el.slider.defaultLabel",{min:b.min,max:b.max})),H=d.computed(()=>b.range?b.rangeStartLabel||_("el.slider.defaultRangeStartLabel"):z.value),Z=d.computed(()=>b.formatValueText?b.formatValueText(me.value):`${me.value}`),ee=d.computed(()=>b.rangeEndLabel||_("el.slider.defaultRangeEndLabel")),de=d.computed(()=>b.formatValueText?b.formatValueText(Be.value):`${Be.value}`),Y=d.computed(()=>[M.b(),M.m(W.value),M.is("vertical",b.vertical),{[M.m("with-input")]:b.showInput}]),Ce=eR(b);fR(b,m,y,w,l,p);const Ie=d.computed(()=>{const Me=[b.min,b.max,b.step].map(Le=>{const Ue=`${Le}`.split(".")[1];return Ue?Ue.length:0});return Math.max.apply(null,Me)}),{sliderWrapper:ye}=qD(b,m,E),{firstValue:me,secondValue:Be,sliderSize:ve}=d.toRefs(m),Pe=Me=>{m.dragging=Me};return Sn(ye,"touchstart",I,{passive:!1}),Sn(ye,"touchmove",I,{passive:!1}),d.provide(Py,{...d.toRefs(b),sliderSize:ve,disabled:A,precision:Ie,emitChange:S,resetSize:E,updateDragging:Pe}),T({onSliderClick:F}),(Me,Le)=>{var Ue,_e;return d.openBlock(),d.createElementBlock("div",{id:Me.range?d.unref(K):void 0,ref_key:"sliderWrapper",ref:ye,class:d.normalizeClass(d.unref(Y)),role:Me.range?"group":void 0,"aria-label":Me.range&&!d.unref($)?d.unref(z):void 0,"aria-labelledby":Me.range&&d.unref($)?(Ue=d.unref(p))==null?void 0:Ue.labelId:void 0},[d.createElementVNode("div",{ref_key:"slider",ref:g,class:d.normalizeClass([d.unref(M).e("runway"),{"show-input":Me.showInput&&!Me.range},d.unref(M).is("disabled",d.unref(A))]),style:d.normalizeStyle(d.unref(B)),onMousedown:d.unref(N),onTouchstartPassive:d.unref(N)},[d.createElementVNode("div",{class:d.normalizeClass(d.unref(M).e("bar")),style:d.normalizeStyle(d.unref(P))},null,6),d.createVNode(Ey,{id:Me.range?void 0:d.unref(K),ref_key:"firstButton",ref:f,"model-value":d.unref(me),vertical:Me.vertical,"tooltip-class":Me.tooltipClass,placement:Me.placement,role:"slider","aria-label":Me.range||!d.unref($)?d.unref(H):void 0,"aria-labelledby":!Me.range&&d.unref($)?(_e=d.unref(p))==null?void 0:_e.labelId:void 0,"aria-valuemin":Me.min,"aria-valuemax":Me.range?d.unref(Be):Me.max,"aria-valuenow":d.unref(me),"aria-valuetext":d.unref(Z),"aria-orientation":Me.vertical?"vertical":"horizontal","aria-disabled":d.unref(A),"onUpdate:modelValue":d.unref(V)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),Me.range?(d.openBlock(),d.createBlock(Ey,{key:0,ref_key:"secondButton",ref:v,"model-value":d.unref(Be),vertical:Me.vertical,"tooltip-class":Me.tooltipClass,placement:Me.placement,role:"slider","aria-label":d.unref(ee),"aria-valuemin":d.unref(me),"aria-valuemax":Me.max,"aria-valuenow":d.unref(Be),"aria-valuetext":d.unref(de),"aria-orientation":Me.vertical?"vertical":"horizontal","aria-disabled":d.unref(A),"onUpdate:modelValue":d.unref(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):d.createCommentVNode("v-if",!0),Me.showStops?(d.openBlock(),d.createElementBlock("div",{key:1},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(U),(Xe,we)=>(d.openBlock(),d.createElementBlock("div",{key:we,class:d.normalizeClass(d.unref(M).e("stop")),style:d.normalizeStyle(d.unref(j)(Xe))},null,6))),128))])):d.createCommentVNode("v-if",!0),d.unref(Ce).length>0?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createElementVNode("div",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Ce),(Xe,we)=>(d.openBlock(),d.createElementBlock("div",{key:we,style:d.normalizeStyle(d.unref(j)(Xe.position)),class:d.normalizeClass([d.unref(M).e("stop"),d.unref(M).e("marks-stop")])},null,6))),128))]),d.createElementVNode("div",{class:d.normalizeClass(d.unref(M).e("marks"))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Ce),(Xe,we)=>(d.openBlock(),d.createBlock(d.unref(_R),{key:we,mark:Xe.mark,style:d.normalizeStyle(d.unref(j)(Xe.position)),onMousedown:d.withModifiers(oe=>d.unref(O)(Xe.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):d.createCommentVNode("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),Me.showInput&&!Me.range?(d.openBlock(),d.createBlock(d.unref(FD),{key:0,ref:"input","model-value":d.unref(me),class:d.normalizeClass(d.unref(M).e("input")),step:Me.step,disabled:d.unref(A),controls:Me.showInputControls,min:Me.min,max:Me.max,precision:d.unref(Ie),debounce:Me.debounce,size:d.unref(L),"onUpdate:modelValue":d.unref(V),onChange:d.unref(S)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):d.createCommentVNode("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var wR=ti(bR,[["__file","slider.vue"]]);const My=Vn(wR),BR=mi({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:Ik},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Do},activeActionIcon:{type:Do},activeIcon:{type:Do},inactiveIcon:{type:Do},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:Ur(Function)},id:String,tabindex:{type:[String,Number]},...Hs(["ariaLabel"])}),CR={[gi]:x=>js(x)||cn(x)||oi(x),[ro]:x=>js(x)||cn(x)||oi(x),[io]:x=>js(x)||cn(x)||oi(x)},OA="ElSwitch",xR=d.defineComponent({name:OA}),PR=d.defineComponent({...xR,props:BR,emits:CR,setup(x,{expose:T,emit:l}){const b=x,{formItem:M}=No(),_=Oo(),m=ei("switch"),{inputId:p}=Ha(b,{formItemContext:M}),g=Lu(d.computed(()=>b.loading)),f=d.ref(b.modelValue!==!1),v=d.ref(),A=d.ref(),y=d.computed(()=>[m.b(),m.m(_.value),m.is("disabled",g.value),m.is("checked",S.value)]),w=d.computed(()=>[m.e("label"),m.em("label","left"),m.is("active",!S.value)]),B=d.computed(()=>[m.e("label"),m.em("label","right"),m.is("active",S.value)]),P=d.computed(()=>({width:Ah(b.width)}));d.watch(()=>b.modelValue,()=>{f.value=!0});const E=d.computed(()=>f.value?b.modelValue:!1),S=d.computed(()=>E.value===b.activeValue);[b.activeValue,b.inactiveValue].includes(E.value)||(l(gi,b.inactiveValue),l(ro,b.inactiveValue),l(io,b.inactiveValue)),d.watch(S,O=>{var V;v.value.checked=O,b.validateEvent&&((V=M==null?void 0:M.validate)==null||V.call(M,"change").catch(G=>Pi(G)))});const I=()=>{const O=S.value?b.inactiveValue:b.activeValue;l(gi,O),l(ro,O),l(io,O),d.nextTick(()=>{v.value.checked=S.value})},F=()=>{if(g.value)return;const{beforeChange:O}=b;if(!O){I();return}const V=O();[y_(V),js(V)].includes(!0)||fh(OA,"beforeChange must return type `Promise<boolean>` or `boolean`"),y_(V)?V.then(U=>{U&&I()}).catch(U=>{Pi(OA,`some error occurred: ${U}`)}):V&&I()},N=()=>{var O,V;(V=(O=v.value)==null?void 0:O.focus)==null||V.call(O)};return d.onMounted(()=>{v.value.checked=S.value}),T({focus:N,checked:S}),(O,V)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(d.unref(y)),onClick:d.withModifiers(F,["prevent"])},[d.createElementVNode("input",{id:d.unref(p),ref_key:"input",ref:v,class:d.normalizeClass(d.unref(m).e("input")),type:"checkbox",role:"switch","aria-checked":d.unref(S),"aria-disabled":d.unref(g),"aria-label":O.ariaLabel,name:O.name,"true-value":O.activeValue,"false-value":O.inactiveValue,disabled:d.unref(g),tabindex:O.tabindex,onChange:I,onKeydown:d.withKeys(F,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!O.inlinePrompt&&(O.inactiveIcon||O.inactiveText)?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(w))},[O.inactiveIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.inactiveIcon)))]),_:1})):d.createCommentVNode("v-if",!0),!O.inactiveIcon&&O.inactiveText?(d.openBlock(),d.createElementBlock("span",{key:1,"aria-hidden":d.unref(S)},d.toDisplayString(O.inactiveText),9,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("span",{ref_key:"core",ref:A,class:d.normalizeClass(d.unref(m).e("core")),style:d.normalizeStyle(d.unref(P))},[O.inlinePrompt?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(d.unref(m).e("inner"))},[O.activeIcon||O.inactiveIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(m).is("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(S)?O.activeIcon:O.inactiveIcon)))]),_:1},8,["class"])):O.activeText||O.inactiveText?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(m).is("text")),"aria-hidden":!d.unref(S)},d.toDisplayString(d.unref(S)?O.activeText:O.inactiveText),11,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{class:d.normalizeClass(d.unref(m).e("action"))},[O.loading?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(m).is("loading"))},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Loading))]),_:1},8,["class"])):d.unref(S)?d.renderSlot(O.$slots,"active-action",{key:1},()=>[O.activeActionIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.activeActionIcon)))]),_:1})):d.createCommentVNode("v-if",!0)]):d.unref(S)?d.createCommentVNode("v-if",!0):d.renderSlot(O.$slots,"inactive-action",{key:2},()=>[O.inactiveActionIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.inactiveActionIcon)))]),_:1})):d.createCommentVNode("v-if",!0)])],2)],6),!O.inlinePrompt&&(O.activeIcon||O.activeText)?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(B))},[O.activeIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.activeIcon)))]),_:1})):d.createCommentVNode("v-if",!0),!O.activeIcon&&O.activeText?(d.openBlock(),d.createElementBlock("span",{key:1,"aria-hidden":!d.unref(S)},d.toDisplayString(O.activeText),9,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0)],10,["onClick"]))}});var ER=ti(PR,[["__file","switch.vue"]]);const MR=Vn(ER),Sl="$treeNodeId",Sy=function(x,T){!T||T[Sl]||Object.defineProperty(T,Sl,{value:x.id,enumerable:!1,configurable:!1,writable:!1})},NA=function(x,T){return x?T[x]:T[Sl]},UA=(x,T,l)=>{const b=x.value.currentNode;l();const M=x.value.currentNode;b!==M&&T("current-change",M?M.data:null,M)},jA=x=>{let T=!0,l=!0,b=!0;for(let M=0,_=x.length;M<_;M++){const m=x[M];(m.checked!==!0||m.indeterminate)&&(T=!1,m.disabled||(b=!1)),(m.checked!==!1||m.indeterminate)&&(l=!1)}return{all:T,none:l,allWithoutDisable:b,half:!T&&!l}},Uu=function(x){if(x.childNodes.length===0||x.loading)return;const{all:T,none:l,half:b}=jA(x.childNodes);T?(x.checked=!0,x.indeterminate=!1):b?(x.checked=!1,x.indeterminate=!0):l&&(x.checked=!1,x.indeterminate=!1);const M=x.parent;!M||M.level===0||x.store.checkStrictly||Uu(M)},Ph=function(x,T){const l=x.store.props,b=x.data||{},M=l[T];if(typeof M=="function")return M(b,x);if(typeof M=="string")return b[M];if(typeof M>"u"){const _=b[T];return _===void 0?"":_}};let SR=0,VA=class Hf{constructor(T){this.id=SR++,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 l in T)bu(T,l)&&(this[l]=T[l]);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 l=T.props;if(l&&typeof l.isLeaf<"u"){const _=Ph(this,"isLeaf");typeof _=="boolean"&&(this.isLeafByUser=_)}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.isLeafByUser&&this.expand(),Array.isArray(this.data)||Sy(this,this.data),!this.data)return;const b=T.defaultExpandedKeys,M=T.key;M&&b&&b.includes(this.key)&&this.expand(null,T.autoExpandParent),M&&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)||Sy(this,T),this.data=T,this.childNodes=[];let l;this.level===0&&Array.isArray(this.data)?l=this.data:l=Ph(this,"children")||[];for(let b=0,M=l.length;b<M;b++)this.insertChild({data:l[b]})}get label(){return Ph(this,"label")}get key(){const T=this.store.key;return this.data?this.data[T]:null}get disabled(){return Ph(this,"disabled")}get nextSibling(){const T=this.parent;if(T){const l=T.childNodes.indexOf(this);if(l>-1)return T.childNodes[l+1]}return null}get previousSibling(){const T=this.parent;if(T){const l=T.childNodes.indexOf(this);if(l>-1)return l>0?T.childNodes[l-1]:null}return null}contains(T,l=!0){return(this.childNodes||[]).some(b=>b===T||l&&b.contains(T))}remove(){const T=this.parent;T&&T.removeChild(this)}insertChild(T,l,b){if(!T)throw new Error("InsertChild error: child is required.");if(!(T instanceof Hf)){if(!b){const M=this.getChildren(!0);M.includes(T.data)||(typeof l>"u"||l<0?M.push(T.data):M.splice(l,0,T.data))}Object.assign(T,{parent:this,store:this.store}),T=d.reactive(new Hf(T)),T instanceof Hf&&T.initialize()}T.level=this.level+1,typeof l>"u"||l<0?this.childNodes.push(T):this.childNodes.splice(l,0,T),this.updateLeafState()}insertBefore(T,l){let b;l&&(b=this.childNodes.indexOf(l)),this.insertChild(T,b)}insertAfter(T,l){let b;l&&(b=this.childNodes.indexOf(l),b!==-1&&(b+=1)),this.insertChild(T,b)}removeChild(T){const l=this.getChildren()||[],b=l.indexOf(T.data);b>-1&&l.splice(b,1);const M=this.childNodes.indexOf(T);M>-1&&(this.store&&this.store.deregisterNode(T),T.parent=null,this.childNodes.splice(M,1)),this.updateLeafState()}removeChildByData(T){let l=null;for(let b=0;b<this.childNodes.length;b++)if(this.childNodes[b].data===T){l=this.childNodes[b];break}l&&this.removeChild(l)}expand(T,l){const b=()=>{if(l){let M=this.parent;for(;M.level>0;)M.expanded=!0,M=M.parent}this.expanded=!0,T&&T(),this.childNodes.forEach(M=>{M.canFocus=!0})};this.shouldLoadData()?this.loadData(M=>{Array.isArray(M)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Uu(this),b())}):b()}doCreateChildren(T,l={}){T.forEach(b=>{this.insertChild(Object.assign({data:b},l),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,l,b,M){if(this.indeterminate=T==="half",this.checked=T===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:m,allWithoutDisable:p}=jA(this.childNodes);!this.isLeaf&&!m&&p&&(this.checked=!1,T=!1);const g=()=>{if(l){const f=this.childNodes;for(let y=0,w=f.length;y<w;y++){const B=f[y];M=M||T!==!1;const P=B.disabled?B.checked:M;B.setChecked(P,l,!0,M)}const{half:v,all:A}=jA(f);A||(this.checked=A,this.indeterminate=v)}};if(this.shouldLoadData()){this.loadData(()=>{g(),Uu(this)},{checked:T!==!1});return}else g()}const _=this.parent;!_||_.level===0||b||Uu(_)}getChildren(T=!1){if(this.level===0)return this.data;const l=this.data;if(!l)return null;const b=this.store.props;let M="children";return b&&(M=b.children||"children"),l[M]===void 0&&(l[M]=null),T&&!l[M]&&(l[M]=[]),l[M]}updateChildren(){const T=this.getChildren()||[],l=this.childNodes.map(_=>_.data),b={},M=[];T.forEach((_,m)=>{const p=_[Sl];!!p&&l.findIndex(f=>f[Sl]===p)>=0?b[p]={index:m,data:_}:M.push({index:m,data:_})}),this.store.lazy||l.forEach(_=>{b[_[Sl]]||this.removeChildByData(_)}),M.forEach(({index:_,data:m})=>{this.insertChild({data:m},_)}),this.updateLeafState()}loadData(T,l={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(l).length)){this.loading=!0;const b=_=>{this.childNodes=[],this.doCreateChildren(_,l),this.loaded=!0,this.loading=!1,this.updateLeafState(),T&&T.call(this,_)},M=()=>{this.loading=!1};this.store.load(this,b,M)}else T&&T.call(this)}eachNode(T){const l=[this];for(;l.length;){const b=l.shift();l.unshift(...b.childNodes),T(b)}}reInitChecked(){this.store.checkStrictly||Uu(this)}};class TR{constructor(T){this.currentNode=null,this.currentNodeKey=null;for(const l in T)bu(T,l)&&(this[l]=T[l]);this.nodesMap={}}initialize(){if(this.root=new VA({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const T=this.load;T(this.root,l=>{this.root.doCreateChildren(l),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(T){const l=this.filterNodeMethod,b=this.lazy,M=function(_){const m=_.root?_.root.childNodes:_.childNodes;if(m.forEach(p=>{p.visible=l.call(p,T,p.data,p),M(p)}),!_.visible&&m.length){let p=!0;p=!m.some(g=>g.visible),_.root?_.root.visible=p===!1:_.visible=p===!1}T&&_.visible&&!_.isLeaf&&(!b||_.loaded)&&_.expand()};M(this)}setData(T){T!==this.root.data?(this.root.setData(T),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(T){if(T instanceof VA)return T;const l=jn(T)?NA(this.key,T):T;return this.nodesMap[l]||null}insertBefore(T,l){const b=this.getNode(l);b.parent.insertBefore({data:T},b)}insertAfter(T,l){const b=this.getNode(l);b.parent.insertAfter({data:T},b)}remove(T){const l=this.getNode(T);l&&l.parent&&(l===this.currentNode&&(this.currentNode=null),l.parent.removeChild(l))}append(T,l){const b=ml(l)?this.root:this.getNode(l);b&&b.insertChild({data:T})}_initDefaultCheckedNodes(){const T=this.defaultCheckedKeys||[],l=this.nodesMap;T.forEach(b=>{const M=l[b];M&&M.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 l=this.key;!T||!T.data||(l?T.key!==void 0&&(this.nodesMap[T.key]=T):this.nodesMap[T.id]=T)}deregisterNode(T){!this.key||!T||!T.data||(T.childNodes.forEach(b=>{this.deregisterNode(b)}),delete this.nodesMap[T.key])}getCheckedNodes(T=!1,l=!1){const b=[],M=function(_){(_.root?_.root.childNodes:_.childNodes).forEach(p=>{(p.checked||l&&p.indeterminate)&&(!T||T&&p.isLeaf)&&b.push(p.data),M(p)})};return M(this),b}getCheckedKeys(T=!1){return this.getCheckedNodes(T).map(l=>(l||{})[this.key])}getHalfCheckedNodes(){const T=[],l=function(b){(b.root?b.root.childNodes:b.childNodes).forEach(_=>{_.indeterminate&&T.push(_.data),l(_)})};return l(this),T}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(T=>(T||{})[this.key])}_getAllNodes(){const T=[],l=this.nodesMap;for(const b in l)bu(l,b)&&T.push(l[b]);return T}updateChildren(T,l){const b=this.nodesMap[T];if(!b)return;const M=b.childNodes;for(let _=M.length-1;_>=0;_--){const m=M[_];this.remove(m.data)}for(let _=0,m=l.length;_<m;_++){const p=l[_];this.append(p,b.data)}}_setCheckedKeys(T,l=!1,b){const M=this._getAllNodes().sort((g,f)=>g.level-f.level),_=Object.create(null),m=Object.keys(b);M.forEach(g=>g.setChecked(!1,!1));const p=g=>{g.childNodes.forEach(f=>{var v;_[f.data[T]]=!0,(v=f.childNodes)!=null&&v.length&&p(f)})};for(let g=0,f=M.length;g<f;g++){const v=M[g],A=v.data[T].toString();if(!m.includes(A)){v.checked&&!_[A]&&v.setChecked(!1,!1);continue}if(v.childNodes.length&&p(v),v.isLeaf||this.checkStrictly){v.setChecked(!0,!1);continue}if(v.setChecked(!0,!0),l){v.setChecked(!1,!1);const w=function(B){B.childNodes.forEach(E=>{E.isLeaf||E.setChecked(!1,!1),w(E)})};w(v)}}}setCheckedNodes(T,l=!1){const b=this.key,M={};T.forEach(_=>{M[(_||{})[b]]=!0}),this._setCheckedKeys(b,l,M)}setCheckedKeys(T,l=!1){this.defaultCheckedKeys=T;const b=this.key,M={};T.forEach(_=>{M[_]=!0}),this._setCheckedKeys(b,l,M)}setDefaultExpandedKeys(T){T=T||[],this.defaultExpandedKeys=T,T.forEach(l=>{const b=this.getNode(l);b&&b.expand(null,this.autoExpandParent)})}setChecked(T,l,b){const M=this.getNode(T);M&&M.setChecked(!!l,b)}getCurrentNode(){return this.currentNode}setCurrentNode(T){const l=this.currentNode;l&&(l.isCurrent=!1),this.currentNode=T,this.currentNode.isCurrent=!0}setUserCurrentNode(T,l=!0){const b=T[this.key],M=this.nodesMap[b];this.setCurrentNode(M),l&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(T,l=!0){if(T==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const b=this.getNode(T);b&&(this.setCurrentNode(b),l&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const kR=d.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(x){const T=ei("tree"),l=d.inject("NodeInstance"),b=d.inject("RootTree");return()=>{const M=x.node,{data:_,store:m}=M;return x.renderContent?x.renderContent(d.h,{_self:l,node:M,data:_,store:m}):d.renderSlot(b.ctx.slots,"default",{node:M,data:_},()=>[d.h("span",{class:T.be("node","label")},[M.label])])}}});var IR=ti(kR,[["__file","tree-node-content.vue"]]);function Ty(x){const T=d.inject("TreeNodeMap",null),l={treeNodeExpand:b=>{x.node!==b&&x.node.collapse()},children:[]};return T&&T.children.push(l),d.provide("TreeNodeMap",l),{broadcastExpanded:b=>{if(x.accordion)for(const M of l.children)M.treeNodeExpand(b)}}}const ky=Symbol("dragEvents");function FR({props:x,ctx:T,el$:l,dropIndicator$:b,store:M}){const _=ei("tree"),m=d.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),p=({event:v,treeNode:A})=>{if(typeof x.allowDrag=="function"&&!x.allowDrag(A.node))return v.preventDefault(),!1;v.dataTransfer.effectAllowed="move";try{v.dataTransfer.setData("text/plain","")}catch{}m.value.draggingNode=A,T.emit("node-drag-start",A.node,v)},g=({event:v,treeNode:A})=>{const y=A,w=m.value.dropNode;w&&w.node.id!==y.node.id&&lA(w.$el,_.is("drop-inner"));const B=m.value.draggingNode;if(!B||!y)return;let P=!0,E=!0,S=!0,I=!0;typeof x.allowDrop=="function"&&(P=x.allowDrop(B.node,y.node,"prev"),I=E=x.allowDrop(B.node,y.node,"inner"),S=x.allowDrop(B.node,y.node,"next")),v.dataTransfer.dropEffect=E||P||S?"move":"none",(P||E||S)&&(w==null?void 0:w.node.id)!==y.node.id&&(w&&T.emit("node-drag-leave",B.node,w.node,v),T.emit("node-drag-enter",B.node,y.node,v)),P||E||S?m.value.dropNode=y:m.value.dropNode=null,y.node.nextSibling===B.node&&(S=!1),y.node.previousSibling===B.node&&(P=!1),y.node.contains(B.node,!1)&&(E=!1),(B.node===y.node||B.node.contains(y.node))&&(P=!1,E=!1,S=!1);const F=y.$el.querySelector(`.${_.be("node","content")}`).getBoundingClientRect(),N=l.value.getBoundingClientRect();let O;const V=P?E?.25:S?.45:1:-1,G=S?E?.75:P?.55:0:1;let U=-9999;const j=v.clientY-F.top;j<F.height*V?O="before":j>F.height*G?O="after":E?O="inner":O="none";const K=y.$el.querySelector(`.${_.be("node","expand-icon")}`).getBoundingClientRect(),$=b.value;O==="before"?U=K.top-N.top:O==="after"&&(U=K.bottom-N.top),$.style.top=`${U}px`,$.style.left=`${K.right-N.left}px`,O==="inner"?Sk(y.$el,_.is("drop-inner")):lA(y.$el,_.is("drop-inner")),m.value.showDropIndicator=O==="before"||O==="after",m.value.allowDrop=m.value.showDropIndicator||I,m.value.dropType=O,T.emit("node-drag-over",B.node,y.node,v)},f=v=>{const{draggingNode:A,dropType:y,dropNode:w}=m.value;if(v.preventDefault(),v.dataTransfer.dropEffect="move",A&&w){const B={data:A.node.data};y!=="none"&&A.node.remove(),y==="before"?w.node.parent.insertBefore(B,w.node):y==="after"?w.node.parent.insertAfter(B,w.node):y==="inner"&&w.node.insertChild(B),y!=="none"&&(M.value.registerNode(B),M.value.key&&A.node.eachNode(P=>{var E;(E=M.value.nodesMap[P.data[M.value.key]])==null||E.setChecked(P.checked,!M.value.checkStrictly)})),lA(w.$el,_.is("drop-inner")),T.emit("node-drag-end",A.node,w.node,y,v),y!=="none"&&T.emit("node-drop",A.node,w.node,y,v)}A&&!w&&T.emit("node-drag-end",A.node,null,y,v),m.value.showDropIndicator=!1,m.value.draggingNode=null,m.value.dropNode=null,m.value.allowDrop=!0};return d.provide(ky,{treeNodeDragStart:p,treeNodeDragOver:g,treeNodeDragEnd:f}),{dragState:m}}const DR=d.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:ED,ElCheckbox:vy,NodeContent:IR,ElIcon:mn,Loading:wn.Loading},props:{node:{type:VA,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(x,T){const l=ei("tree"),{broadcastExpanded:b}=Ty(x),M=d.inject("RootTree"),_=d.ref(!1),m=d.ref(!1),p=d.ref(null),g=d.ref(null),f=d.ref(null),v=d.inject(ky),A=d.getCurrentInstance();d.provide("NodeInstance",A),M||Pi("Tree","Can not find node's tree."),x.node.expanded&&(_.value=!0,m.value=!0);const y=M.props.props.children||"children";d.watch(()=>{const j=x.node.data[y];return j&&[...j]},()=>{x.node.updateChildren()}),d.watch(()=>x.node.indeterminate,j=>{P(x.node.checked,j)}),d.watch(()=>x.node.checked,j=>{P(j,x.node.indeterminate)}),d.watch(()=>x.node.childNodes.length,()=>x.node.reInitChecked()),d.watch(()=>x.node.expanded,j=>{d.nextTick(()=>_.value=j),j&&(m.value=!0)});const w=j=>NA(M.props.nodeKey,j.data),B=j=>{const K=x.props.class;if(!K)return{};let $;if(en(K)){const{data:W}=j;$=K(W,j)}else $=K;return cn($)?{[$]:!0}:$},P=(j,K)=>{(p.value!==j||g.value!==K)&&M.ctx.emit("check-change",x.node.data,j,K),p.value=j,g.value=K},E=j=>{UA(M.store,M.ctx.emit,()=>M.store.value.setCurrentNode(x.node)),M.currentNode.value=x.node,M.props.expandOnClickNode&&I(),M.props.checkOnClickNode&&!x.node.disabled&&F(null,{target:{checked:!x.node.checked}}),M.ctx.emit("node-click",x.node.data,x.node,A,j)},S=j=>{M.instance.vnode.props.onNodeContextmenu&&(j.stopPropagation(),j.preventDefault()),M.ctx.emit("node-contextmenu",j,x.node.data,x.node,A)},I=()=>{x.node.isLeaf||(_.value?(M.ctx.emit("node-collapse",x.node.data,x.node,A),x.node.collapse()):(x.node.expand(),T.emit("node-expand",x.node.data,x.node,A)))},F=(j,K)=>{x.node.setChecked(K.target.checked,!M.props.checkStrictly),d.nextTick(()=>{const $=M.store.value;M.ctx.emit("check",x.node.data,{checkedNodes:$.getCheckedNodes(),checkedKeys:$.getCheckedKeys(),halfCheckedNodes:$.getHalfCheckedNodes(),halfCheckedKeys:$.getHalfCheckedKeys()})})};return{ns:l,node$:f,tree:M,expanded:_,childNodeRendered:m,oldChecked:p,oldIndeterminate:g,getNodeKey:w,getNodeClass:B,handleSelectChange:P,handleClick:E,handleContextMenu:S,handleExpandIconClick:I,handleCheckChange:F,handleChildNodeExpand:(j,K,$)=>{b(K),M.ctx.emit("node-expand",j,K,$)},handleDragStart:j=>{M.props.draggable&&v.treeNodeDragStart({event:j,treeNode:x})},handleDragOver:j=>{j.preventDefault(),M.props.draggable&&v.treeNodeDragOver({event:j,treeNode:{$el:f.value,node:x.node}})},handleDrop:j=>{j.preventDefault()},handleDragEnd:j=>{M.props.draggable&&v.treeNodeDragEnd(j)},CaretRight:wn.CaretRight}}});function RR(x,T,l,b,M,_){const m=d.resolveComponent("el-icon"),p=d.resolveComponent("el-checkbox"),g=d.resolveComponent("loading"),f=d.resolveComponent("node-content"),v=d.resolveComponent("el-tree-node"),A=d.resolveComponent("el-collapse-transition");return d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref:"node$",class:d.normalizeClass([x.ns.b("node"),x.ns.is("expanded",x.expanded),x.ns.is("current",x.node.isCurrent),x.ns.is("hidden",!x.node.visible),x.ns.is("focusable",!x.node.disabled),x.ns.is("checked",!x.node.disabled&&x.node.checked),x.getNodeClass(x.node)]),role:"treeitem",tabindex:"-1","aria-expanded":x.expanded,"aria-disabled":x.node.disabled,"aria-checked":x.node.checked,draggable:x.tree.props.draggable,"data-key":x.getNodeKey(x.node),onClick:d.withModifiers(x.handleClick,["stop"]),onContextmenu:x.handleContextMenu,onDragstart:d.withModifiers(x.handleDragStart,["stop"]),onDragover:d.withModifiers(x.handleDragOver,["stop"]),onDragend:d.withModifiers(x.handleDragEnd,["stop"]),onDrop:d.withModifiers(x.handleDrop,["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(x.ns.be("node","content")),style:d.normalizeStyle({paddingLeft:(x.node.level-1)*x.tree.props.indent+"px"})},[x.tree.props.icon||x.CaretRight?(d.openBlock(),d.createBlock(m,{key:0,class:d.normalizeClass([x.ns.be("node","expand-icon"),x.ns.is("leaf",x.node.isLeaf),{expanded:!x.node.isLeaf&&x.expanded}]),onClick:d.withModifiers(x.handleExpandIconClick,["stop"])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.tree.props.icon||x.CaretRight)))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0),x.showCheckbox?(d.openBlock(),d.createBlock(p,{key:1,"model-value":x.node.checked,indeterminate:x.node.indeterminate,disabled:!!x.node.disabled,onClick:d.withModifiers(()=>{},["stop"]),onChange:x.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):d.createCommentVNode("v-if",!0),x.node.loading?(d.openBlock(),d.createBlock(m,{key:2,class:d.normalizeClass([x.ns.be("node","loading-icon"),x.ns.is("loading")])},{default:d.withCtx(()=>[d.createVNode(g)]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),d.createVNode(f,{node:x.node,"render-content":x.renderContent},null,8,["node","render-content"])],6),d.createVNode(A,null,{default:d.withCtx(()=>[!x.renderAfterExpand||x.childNodeRendered?d.withDirectives((d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.be("node","children")),role:"group","aria-expanded":x.expanded},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.node.childNodes,y=>(d.openBlock(),d.createBlock(v,{key:x.getNodeKey(y),"render-content":x.renderContent,"render-after-expand":x.renderAfterExpand,"show-checkbox":x.showCheckbox,node:y,accordion:x.accordion,props:x.props,onNodeExpand:x.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[d.vShow,x.expanded]]):d.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[d.vShow,x.node.visible]])}var LR=ti(DR,[["render",RR],["__file","tree-node.vue"]]);function OR({el$:x},T){const l=ei("tree"),b=d.shallowRef([]),M=d.shallowRef([]);d.onMounted(()=>{m()}),d.onUpdated(()=>{b.value=Array.from(x.value.querySelectorAll("[role=treeitem]")),M.value=Array.from(x.value.querySelectorAll("input[type=checkbox]"))}),d.watch(M,p=>{p.forEach(g=>{g.setAttribute("tabindex","-1")})}),Sn(x,"keydown",p=>{const g=p.target;if(!g.className.includes(l.b("node")))return;const f=p.code;b.value=Array.from(x.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`));const v=b.value.indexOf(g);let A;if([us.up,us.down].includes(f)){if(p.preventDefault(),f===us.up){A=v===-1?0:v!==0?v-1:b.value.length-1;const w=A;for(;!T.value.getNode(b.value[A].dataset.key).canFocus;){if(A--,A===w){A=-1;break}A<0&&(A=b.value.length-1)}}else{A=v===-1?0:v<b.value.length-1?v+1:0;const w=A;for(;!T.value.getNode(b.value[A].dataset.key).canFocus;){if(A++,A===w){A=-1;break}A>=b.value.length&&(A=0)}}A!==-1&&b.value[A].focus()}[us.left,us.right].includes(f)&&(p.preventDefault(),g.click());const y=g.querySelector('[type="checkbox"]');[us.enter,us.space].includes(f)&&y&&(p.preventDefault(),y.click())});const m=()=>{var p;b.value=Array.from(x.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`)),M.value=Array.from(x.value.querySelectorAll("input[type=checkbox]"));const g=x.value.querySelectorAll(`.${l.is("checked")}[role=treeitem]`);if(g.length){g[0].setAttribute("tabindex","0");return}(p=b.value[0])==null||p.setAttribute("tabindex","0")}}const NR=d.defineComponent({name:"ElTree",components:{ElTreeNode:LR},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:Do}},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(x,T){const{t:l}=mh(),b=ei("tree"),M=d.inject(Nu,null),_=d.ref(new TR({key:x.nodeKey,data:x.data,lazy:x.lazy,props:x.props,load:x.load,currentNodeKey:x.currentNodeKey,checkStrictly:x.checkStrictly,checkDescendants:x.checkDescendants,defaultCheckedKeys:x.defaultCheckedKeys,defaultExpandedKeys:x.defaultExpandedKeys,autoExpandParent:x.autoExpandParent,defaultExpandAll:x.defaultExpandAll,filterNodeMethod:x.filterNodeMethod}));_.value.initialize();const m=d.ref(_.value.root),p=d.ref(null),g=d.ref(null),f=d.ref(null),{broadcastExpanded:v}=Ty(x),{dragState:A}=FR({props:x,ctx:T,el$:g,dropIndicator$:f,store:_});OR({el$:g},_);const y=d.computed(()=>{const{childNodes:de}=m.value,Y=M?M.hasFilteredOptions!==0:!1;return(!de||de.length===0||de.every(({visible:Ce})=>!Ce))&&!Y});d.watch(()=>x.currentNodeKey,de=>{_.value.setCurrentNodeKey(de)}),d.watch(()=>x.defaultCheckedKeys,de=>{_.value.setDefaultCheckedKey(de)}),d.watch(()=>x.defaultExpandedKeys,de=>{_.value.setDefaultExpandedKeys(de)}),d.watch(()=>x.data,de=>{_.value.setData(de)},{deep:!0}),d.watch(()=>x.checkStrictly,de=>{_.value.checkStrictly=de});const w=de=>{if(!x.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");_.value.filter(de)},B=de=>NA(x.nodeKey,de.data),P=de=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const Y=_.value.getNode(de);if(!Y)return[];const Ce=[Y.data];let Ie=Y.parent;for(;Ie&&Ie!==m.value;)Ce.push(Ie.data),Ie=Ie.parent;return Ce.reverse()},E=(de,Y)=>_.value.getCheckedNodes(de,Y),S=de=>_.value.getCheckedKeys(de),I=()=>{const de=_.value.getCurrentNode();return de?de.data:null},F=()=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const de=I();return de?de[x.nodeKey]:null},N=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");_.value.setCheckedNodes(de,Y)},O=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");_.value.setCheckedKeys(de,Y)},V=(de,Y,Ce)=>{_.value.setChecked(de,Y,Ce)},G=()=>_.value.getHalfCheckedNodes(),U=()=>_.value.getHalfCheckedKeys(),j=(de,Y=!0)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");UA(_,T.emit,()=>{v(de),_.value.setUserCurrentNode(de,Y)})},K=(de,Y=!0)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");UA(_,T.emit,()=>{v(),_.value.setCurrentNodeKey(de,Y)})},$=de=>_.value.getNode(de),W=de=>{_.value.remove(de)},L=(de,Y)=>{_.value.append(de,Y)},z=(de,Y)=>{_.value.insertBefore(de,Y)},H=(de,Y)=>{_.value.insertAfter(de,Y)},Z=(de,Y,Ce)=>{v(Y),T.emit("node-expand",de,Y,Ce)},ee=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");_.value.updateChildren(de,Y)};return d.provide("RootTree",{ctx:T,props:x,store:_,root:m,currentNode:p,instance:d.getCurrentInstance()}),d.provide(Ru,void 0),{ns:b,store:_,root:m,currentNode:p,dragState:A,el$:g,dropIndicator$:f,isEmpty:y,filter:w,getNodeKey:B,getNodePath:P,getCheckedNodes:E,getCheckedKeys:S,getCurrentNode:I,getCurrentKey:F,setCheckedNodes:N,setCheckedKeys:O,setChecked:V,getHalfCheckedNodes:G,getHalfCheckedKeys:U,setCurrentNode:j,setCurrentKey:K,t:l,getNode:$,remove:W,append:L,insertBefore:z,insertAfter:H,handleNodeExpand:Z,updateKeyChildren:ee}}});function UR(x,T,l,b,M,_){const m=d.resolveComponent("el-tree-node");return d.openBlock(),d.createElementBlock("div",{ref:"el$",class:d.normalizeClass([x.ns.b(),x.ns.is("dragging",!!x.dragState.draggingNode),x.ns.is("drop-not-allow",!x.dragState.allowDrop),x.ns.is("drop-inner",x.dragState.dropType==="inner"),{[x.ns.m("highlight-current")]:x.highlightCurrent}]),role:"tree"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.root.childNodes,p=>(d.openBlock(),d.createBlock(m,{key:x.getNodeKey(p),node:p,props:x.props,accordion:x.accordion,"render-after-expand":x.renderAfterExpand,"show-checkbox":x.showCheckbox,"render-content":x.renderContent,onNodeExpand:x.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),x.isEmpty?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.e("empty-block"))},[d.renderSlot(x.$slots,"empty",{},()=>{var p;return[d.createElementVNode("span",{class:d.normalizeClass(x.ns.e("empty-text"))},d.toDisplayString((p=x.emptyText)!=null?p:x.t("el.tree.emptyText")),3)]})],2)):d.createCommentVNode("v-if",!0),d.withDirectives(d.createElementVNode("div",{ref:"dropIndicator$",class:d.normalizeClass(x.ns.e("drop-indicator"))},null,2),[[d.vShow,x.dragState.showDropIndicator]])],2)}var jR=ti(NR,[["render",UR],["__file","tree.vue"]]);const VR=Vn(jR),Nr=vE();let fa={BIMX_CONFIGS:{viewerManager:!1,Toolbar:!1,RoamTool:!1},BimViewer:{viewerManager:!1}};const HR="http://bimkk-api-test.tctwins.com",Er="https://bimkk-oss-test.oss-cn-beijing.aliyuncs.com",QR="http://convert-test.tctwins.com",zR={isMember:!1,isInShare:!1,isShareHost:!1,isShareClient:!1},GR={file:!1,image:!1,record:!1,text:!1,video:!1},Iy={offsetX:0,offsetY:0},WR={pos:"right-bottom",posNum:[0,0]},KR=120,XR="blue",$R=!1,YR="right",JR="left",ZR=0,qR=0,eL=0,tL=0,rL={pos:"bottom",posNum:[18]},iL={pos:"bottom",posNum:[70]},nL={pos:"bottom",posNum:[70]};dr.BIMX_CONFIGS=void 0;function sL(){dr.BIMX_CONFIGS={isMobile:!1,isPc:!1,showRoam:!0,showTree:!1,userInfo:zR,annoLimit:GR,commentOffset:Iy,measureOffset:Iy,skyboxImg:void 0,topHeight:ZR,leftWidth:tL,bottomHeight:eL,rightWidth:qR,inspectorPos:YR,treePos:JR,commentPos:rL,annotationPos:iL,roamPos:nL,navCubePos:WR,navCubeSize:KR,themeColor:XR,hideTool:$R}}function Fy(x=""){Nr.emit("BIMX_CONFIGS",x)}function Dy(x){for(const T in x)Vi(T,x[T],!1);Fy()}function Vi(x,T,l=!0){T&&(dr.BIMX_CONFIGS[x]=T,l&&(x=="isMobile"||x=="measureOffset"||x=="commentOffset"||x=="navCubePos"||x=="navCubeSize")&&Fy(x))}function Nt(x){return dr.BIMX_CONFIGS[x]}const Hi=pE.defineStore("toolbar",{state:()=>({tools:[{id:0,key:"tree",name:"结构树",hasActiveState:!0,component:"StructureTree",isShowDelimiter:!1,img:"tree",imgActive:"tree-active",isActive:!1},{id:1,key:"reseta",name:"复位",hasActiveState:!1,component:"",isShowDelimiter:!0,img:"home-page",imgActive:"home-page",isActive:!1},{id:2,key:"roam",name:"漫游",hasActiveState:!0,component:"RoamTool",isShowDelimiter:!0,img:"roam",imgActive:"roam-active",isActive:!1},{id:3,key:"measure",name:"测量",hasActiveState:!0,component:"MeasureTool",isShowDelimiter:!1,img:"measure",imgActive:"measure-active",isActive:!1},{id:4,key:"section",name:"剖切",hasActiveState:!0,component:"SectionTool",isShowDelimiter:!0,img:"slicing",imgActive:"slicing-active",isActive:!1},{id:5,key:"comment",name:"批注",hasActiveState:!0,component:"CommentTool",isShowDelimiter:!1,img:"annotations",imgActive:"annotations-active",isActive:!1},{id:6,key:"anno",name:"标注",hasActiveState:!0,component:"AnnotationTool",isShowDelimiter:!0,img:"label",imgActive:"label-active",isActive:!1},{id:7,key:"screenshot",name:"截图",hasActiveState:!0,component:"ScreenShotTool",isShowDelimiter:!1,img:"screenshot",imgActive:"screenshot-active",isActive:!1},{id:8,key:"inspector",name:"属性",hasActiveState:!0,component:"InspectorTool",isShowDelimiter:!1,img:"detailed-information",imgActive:"detailed-information-active",isActive:!1},{id:9,key:"setting",name:"设置",hasActiveState:!0,component:"SettingTool",isShowDelimiter:!0,img:"settings",imgActive:"settings-active",isActive:!1},{id:10,key:"fullscreena",name:"全屏",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"full",imgActive:"full-small",isActive:!1},{id:11,key:"resetb",name:"复位2",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"home",imgActive:"home",isActive:!1},{id:12,key:"navigate",name:"导航",hasActiveState:!0,component:"NavigateTool",isShowDelimiter:!1,img:"best-view",imgActive:"best-view-active",isActive:!1},{id:13,key:"fullscreenb",name:"全屏2",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"full-screen",imgActive:"full-screen-exit",isActive:!1},{id:14,key:"share",name:"分享",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"shared",imgActive:"shared",isActive:!1},{id:15,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate",imgActive:"cooperate",isActive:!1},{id:16,key:"hidden",name:"隐藏",hasActiveState:!0,component:"HiddenTool",isShowDelimiter:!1,img:"more",imgActive:"more-active",isActive:!1}],webExtraTools:[{id:17,key:"enjoy",name:"共享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"enjoy-icon",imgActive:"enjoyed-icon",isActive:!1},{id:18,key:"share",name:"分享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"share-icon",imgActive:"shared-icon",isActive:!1},{id:19,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate-icon",imgActive:"cooperated-icon",isActive:!1}],visibleToolIds:[],readyToolIds:[]}),actions:{toggleToolVisibility(x){const T=this.visibleToolIds.indexOf(x);T===-1?this.visibleToolIds.push(x):this.visibleToolIds.splice(T,1)},setEnableTools(x){this.visibleToolIds=x},setEnableToolsByKey(x){let T=[];Nt("isMobile")?T=Ry(x,aL):T=Ry(x,lL);const l=[];for(let b=0;b<T.length;b++){const M=this.tools.find(_=>_.key===T[b]);M&&l.push(M.id)}this.visibleToolIds=this.visibleToolIds.concat(l)},setToolActiveStatus(x,T){const l=this.tools.find(b=>b.id===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setToolActiveStatusBykey(x,T){const l=this.tools.find(b=>b.key===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setAllToolClose(x=[]){if(x.length>0){for(let T=0;T<this.visibleToolIds.length;T++)x.includes(this.visibleToolIds[T])||(this.tools[this.visibleToolIds[T]].isActive=!1);for(let T=0;T<this.webExtraTools.length;T++)x.includes(this.webExtraTools[T].id)||(this.webExtraTools[T].isActive=!1)}else{for(let T=0;T<this.visibleToolIds.length;T++)this.tools[this.visibleToolIds[T]].isActive=!1;for(let T=0;T<this.webExtraTools.length;T++)this.webExtraTools[T].isActive=!1}},setWebExtraToolActiveStatus(x,T){const l=this.webExtraTools.find(b=>b.id===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setWebExtraToolActiveStatusBykey(x,T){const l=this.webExtraTools.find(b=>b.key===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setReadyById(x){this.tools.find(l=>l.id===x)&&this.readyToolIds.push(x)},ifToolAllReady(){for(let x=0;x<this.visibleTools.length;x++){const T=this.visibleTools[x];if(T.component!=""&&!this.readyTools.includes(T.id))return!1}return!0},setReadyTools(x){this.readyToolIds=[]}},getters:{visibleTools:x=>x.visibleToolIds.map(T=>x.tools.find(l=>l.id===T)).filter(T=>!!T),readyTools:x=>x.readyToolIds,visibleComponents:x=>x.tools.filter(T=>x.visibleToolIds.includes(T.id)).map(T=>T.component),getKeyById:x=>T=>{var l;return(l=x.tools.find(b=>b.id===T))==null?void 0:l.key},getToolById:x=>T=>x.tools.find(l=>l.id===T),getWebExtraTool:x=>x.webExtraTools,hasActiveState:x=>T=>{const l=x.tools.find(b=>b.id===T);return l?l.hasActiveState:!1},isToolEnable:x=>T=>{const l=x.tools.find(b=>b.id===T);return l?x.visibleToolIds.includes(l.id):!1},isToolActive:x=>T=>{const l=x.tools.find(b=>b.id===T);if(!l){const b=x.webExtraTools.find(M=>M.id===T);return b?b.isActive:!1}return l?l.isActive:!1},isToolActiveBykey:x=>T=>{const l=x.tools.find(b=>b.key===T);return l?l.isActive:!1}}});function Tl(){return Hi()}function oL(){Hi().setAllToolClose(),Hi().setReadyTools([]),Hi().setEnableTools([])}let aL=["tree","resetb","navigate","roam","measure","section","comment","anno","hidden","inspector","setting","fullscreenb","share","cooperate","phone"],lL=["tree","reseta","roam","measure","section","comment","anno","screenshot","inspector","setting","fullscreena"];function Ry(x,T){const l={};T.forEach((M,_)=>{l[M]=_});const b=x.filter(M=>l.hasOwnProperty(M)).map(M=>({value:M,index:l[M]}));return b.sort((M,_)=>M.index-_.index),b.map(M=>M.value)}let Ly=!1;fa.BIMX_CONFIGS.viewerManager||(Nr.on("BIMX_CONFIGS",x=>{window.BimViewer?qn.ConfigViewer(x):Ly=!0}),fa.BIMX_CONFIGS.viewerManager=!0);const uL=()=>{qn.SetAllClose(),window.BimViewer.setEdgesEnabled(!1),Ly&&qn.ConfigViewer()};fa.BimViewer.viewerManager||(Nr.on("BimViewer",uL),fa.BimViewer.viewerManager=!0);class qn{static ConfigViewer(T=""){if(T==""){if(dr.BIMX_CONFIGS.isMobile&&(window.BimViewer.setIsTouch(!0),window.BimViewer.navCubeMode.visible=!1),dr.BIMX_CONFIGS.measureOffset&&window.BimViewer.setMeasureOffSet(Nt("measureOffset").offsetX,Nt("measureOffset").offsetY),dr.BIMX_CONFIGS.commentOffset&&window.BimViewer.setCommentsOffset(Nt("commentOffset").offsetX,Nt("commentOffset").offsetY),dr.BIMX_CONFIGS.navCubePos){let l=function(){let _=0,m=0;return Nt("navCubePos").pos.includes("left")?_+=parseInt(Nt("leftWidth")):Nt("navCubePos").pos.includes("right")&&(_+=parseInt(Nt("rightWidth"))),Nt("navCubePos").pos.includes("top")?m+=parseInt(Nt("topHeight")):Nt("navCubePos").pos.includes("bottom")&&(m+=parseInt(Nt("bottomHeight"))),[_,m]};const b=Nt("navCubePos").pos?Nt("navCubePos").pos:"right-bottom",M=l();b.includes("right")&&window.BimViewer.setNavCubePosition("right",M[0]),b.includes("top")&&window.BimViewer.setNavCubePosition("top",M[1]),b.includes("left")&&window.BimViewer.setNavCubePosition("left",M[0]),b.includes("bottom")&&window.BimViewer.setNavCubePosition("bottom",M[1])}dr.BIMX_CONFIGS.navCubeSize&&window.BimViewer.setNavCubeSize(Nt("navCubeSize"));return}switch(T){case"isMobile":window.BimViewer.setIsTouch(dr.BIMX_CONFIGS.isMobile),window.BimViewer.navCubeMode.visible=!dr.BIMX_CONFIGS.isMobile;break;case"measureOffset":window.BimViewer.setCommentsOffset(Nt("measureOffset").offsetX,Nt("measureOffset").offsetY);break;case"commentOffset":window.BimViewer.setCommentsOffset(Nt("commentOffset").offsetX,Nt("commentOffset").offsetY);break;case"navCubePos":const l=Nt("navCubePos").pos?Nt("navCubePos").pos:"right-bottom",b=Nt("navCubePos").posNum?Nt("navCubePos").posNum:[0,l.includes("top")?Nt("topHeight"):0];l.includes("right")&&window.BimViewer.setNavCubePosition("right",b[0]),l.includes("left")&&window.BimViewer.setNavCubePosition("left",b[0]),l.includes("top")&&window.BimViewer.setNavCubePosition("top",b[1]),l.includes("bottom")&&window.BimViewer.setNavCubePosition("bottom",b[1]);break;case"navCubeSize":window.BimViewer.setNavCubeSize(Nt("navCubeSize"));break}}static SaveViewerState(T){T.measure&&(this.viewerState.measureType=T.measure)}static SetToolActiveById(T,l=!Hi().isToolActive(T)){const b=Hi().getKeyById(T);b?this.SetToolActiveByKey(b,l):console.log("no such key:",T)}static SetToolActiveByKey(T,l=!Hi().isToolActiveBykey(T)){switch(T){case"tree":break;case"reseta":window.BimViewer.resetView();break;case"resetb":window.BimViewer.resetView();break;case"roam":window.BimViewer.SetFirstPersonModeActive(l);break;case"measure":window.BimViewer.measureTool.setActive(l),l&&window.BimViewer.measureTool.setActiveByType(this.viewerState.measureType,l);break;case"section":window.BimViewer.SetSectionToolActive(l);break;case"comment":l?setTimeout(()=>{window.BimViewer.SetCommentsToolActive(l)},100):window.BimViewer.SetCommentsToolActive(l);break;case"anno":window.BimViewer.SetAnnotationToolActive(l);break;case"screenshot":break;case"inspector":break;case"fullscreena":l?document.documentElement.requestFullscreen():document.exitFullscreen&&document.exitFullscreen();break;case"hidden":window.BimViewer.disableClickEvent=l;break;case"cooperate":break;case"share":break;case"navigate":break;case"setting":break;default:console.log("no such key:",T);break}}static SetAllClose(){window.BimViewer.closeAll()}static DestroyViewer(){window.BimViewer.destroy(),console.log("旧模型已销毁")}static showRequestBusy(T,l){window.BimViewer.showSpinner(T),l&&l()}}Ii(qn,"viewerState",{measureType:"distance"});const cL={key:0,class:"tree_btn mobile_toggle"},hL=["src"],dL={key:1,class:"cooperate_btn mobile_toggle"},fL=["src"],AL={key:2,class:"fullscreen_btn mobile_toggle"},pL=["src"],vL={key:3,class:"mobile_toolbar"},mL={class:"tctwins_toolbar"},gL=["onClick"],_L={key:0,class:"tctwins_btn"},yL=["src"],bL=d.defineComponent({__name:"mobileToolbar",props:["visibleTools"],emits:["emitHandler"],setup(x,{emit:T}){const l=Hi();d.onMounted(()=>{dr.BIMX_CONFIGS.showTree&&l.setToolActiveStatus(0,!0)});const b=T,M=g=>{b("emitHandler",g)},_=d.ref(!1),m=g=>{l.isToolActive(g)||g!=13&&g!=10&&(l.setAllToolClose(),qn.SetAllClose()),(g===10||g==13)&&(l.isToolActive(g)?(_.value=!1,Nr.emit("mobileFullscreen",!1)):(_.value=!0,Nr.emit("mobileFullscreen",!0)));const f=l.getToolById(g);p(f)},p=g=>{var f;g.id!=10&&g.id!=13&&qn.SetToolActiveByKey(g.key),l.setToolActiveStatus(g.id),M({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,status:(f=l.getToolById(g.id))==null?void 0:f.isActive}})};return(g,f)=>{var A,y,w,B,P;const v=Uo;return d.openBlock(),d.createElementBlock(d.Fragment,null,[!_.value&&x.visibleTools&&d.unref(l).isToolEnable(0)?(d.openBlock(),d.createElementBlock("div",cL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(0)&&d.unref(l).hasActiveState(0)}]),onClick:f[0]||(f[0]=E=>m(0))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${d.unref(l).isToolActive(0)?(y=d.unref(l).getToolById(0))==null?void 0:y.imgActive:(A=d.unref(l).getToolById(0))==null?void 0:A.img}.svg`},null,8,hL)],2)])):d.createCommentVNode("",!0),!_.value&&x.visibleTools&&d.unref(l).isToolEnable(15)?(d.openBlock(),d.createElementBlock("div",dL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(15)&&d.unref(l).hasActiveState(15)}]),onClick:f[1]||(f[1]=E=>m(15))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${d.unref(l).isToolActive(15)?(B=d.unref(l).getToolById(15))==null?void 0:B.imgActive:(w=d.unref(l).getToolById(15))==null?void 0:w.img}.svg`},null,8,fL)],2)])):d.createCommentVNode("",!0),_.value?(d.openBlock(),d.createElementBlock("div",AL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(13)&&d.unref(l).hasActiveState(13)}]),onClick:f[2]||(f[2]=E=>m(13))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${(P=d.unref(l).getToolById(13))==null?void 0:P.imgActive}.svg`},null,8,pL)],2)])):d.createCommentVNode("",!0),_.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",vL,[d.createVNode(v,null,{default:d.withCtx(()=>[d.createElementVNode("div",mL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.visibleTools,E=>(d.openBlock(),d.createElementBlock("div",{key:E.id,class:"tctwins_btn_group",onClick:S=>m(E.id)},[E.id!==0&&E.id!==15?(d.openBlock(),d.createElementBlock("div",_L,[d.createElementVNode("img",{class:"img",src:`${d.unref(Er)}/bim-viewer/action-bar/${E.isActive?E.imgActive:E.img}.svg`},null,8,yL)])):d.createCommentVNode("",!0)],8,gL))),128))])]),_:1})]))],64)}}}),Tn=(x,T)=>{const l=x.__vccOpts||x;for(const[b,M]of T)l[b]=M;return l},wL=Tn(bL,[["__scopeId","data-v-5f120313"]]),BL={class:"bimx-tools-wrapper"},CL=["src"],xL={class:"tctwins_toolbar_wrapper"},PL={class:"tctwins_toolbar"},EL=["onClick"],ML=["src"],SL={key:0,class:"splitLine"},TL={class:"right_operate_panel"},kL=["onClick"],IL=["src"],FL=Tn(d.defineComponent({__name:"Toolbar",props:["visibleTools"],emits:["emitHandler"],setup(x,{emit:T}){d.onMounted(()=>{dr.BIMX_CONFIGS.showTree&&M.setToolActiveStatus(0,!0)}),fa.BIMX_CONFIGS.Toolbar||(Nr.on("BIMX_CONFIGS",()=>{dr.BIMX_CONFIGS.showTree&&M.setToolActiveStatus(0,!0)}),fa.BIMX_CONFIGS.Toolbar=!0);const l=T,b=g=>{l("emitHandler",g)},M=Hi(),_=g=>{M.isToolActive(g.id)||g.id!=13&&g.id!=10&&g.id!=1&&(M.setAllToolClose(),qn.SetAllClose()),m(g)},m=g=>{qn.SetToolActiveByKey(g.key),M.setToolActiveStatus(g.id),b({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,toolKey:g.key,status:g.isActive}})},p=g=>{M.isToolActive(g.id)||M.setAllToolClose(),M.setWebExtraToolActiveStatus(g.id),b({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,toolKey:g.key,status:g.isActive}})};return(g,f)=>{const v=FA;return d.openBlock(),d.createElementBlock("div",BL,[x.visibleTools&&d.unref(M).isToolEnable(0)?(d.openBlock(),d.createElementBlock("div",{key:0,class:"structure_tree_toggle",onClick:f[0]||(f[0]=A=>_(x.visibleTools[0]))},[d.createVNode(v,{content:x.visibleTools[0].name,placement:"top",effect:"light"},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["toggle_btn",{toggle_active:x.visibleTools[0].isActive&&x.visibleTools[0].hasActiveState}])},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${x.visibleTools[0].isActive?x.visibleTools[0].imgActive:x.visibleTools[0].img}.png`},null,8,CL)],2)]),_:1},8,["content"])])):d.createCommentVNode("",!0),d.createElementVNode("div",xL,[d.createElementVNode("div",PL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.visibleTools,(A,y)=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"tctwins_btn-group",onClick:w=>_(A)},[d.createVNode(v,{content:A.name,placement:"top",effect:"light"},{default:d.withCtx(()=>[A.id!==0&&A.id!==15?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:A.isActive&&A.hasActiveState}])},[d.createElementVNode("img",{class:"img",src:`${d.unref(Er)}/bim-viewer/action-bar/${A.isActive?A.imgActive:A.img}.png`,alt:""},null,8,ML)],2)):d.createCommentVNode("",!0)]),_:2},1032,["content"]),A.isShowDelimiter&&y!=x.visibleTools.length-1?(d.openBlock(),d.createElementBlock("div",SL)):d.createCommentVNode("",!0)],8,EL))),128))])]),d.createElementVNode("div",TL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(M).getWebExtraTool,A=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"opreate_panel_item",onClick:y=>p(A)},[d.createVNode(v,{effect:"light",content:A.name,placement:"left"},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["toggle_btn",{toggle_active:A.isActive&&A.hasActiveState}])},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/${A.isActive&&A.key!="cooperate"?A.imgActive:A.img}.png`,alt:""},null,8,IL)],2)]),_:2},1032,["content"])],8,kL))),128))])])}}}),[["__scopeId","data-v-7d41c29b"]]),DL="0.1.25";async function RL(){try{return(await Al.get(`${HR}/oss/sts`)).data.data}catch(x){throw console.error("Error fetching data:",x),x}}async function Oy(){try{const x=await RL();return new fE({region:"oss-cn-beijing",accessKeyId:x.accessKeyId,accessKeySecret:x.accessKeySecret,stsToken:x.securityToken,bucket:x.bucketName})}catch(x){console.log("getSTStoken() throw an error: ",x)}}class Ny{static async getBuffer(T,l,b){try{const _=await(await Oy()).get(T);l(_.content.buffer)}catch(M){b&&b(M)}}static async requestFileFromOSS(T,l,b,M){try{const _=await Oy();if(l){const m=await _.get(`${T}/metadata.json`);b(JSON.parse(m.content))}else{const m=await _.get(`${T}/index.json`);b(JSON.parse(m.content))}}catch(_){console.error("请求文件失败:",_),M(_)}}}const ju=x=>{const T=x.lastIndexOf(".");let l=[];return T!==-1&&(l=[x.slice(0,T),x.slice(T+1)]),l[0]},Uy=[];function LL(x){const{viewer:T}=window.BimViewer,{scene:l}=T,b=l.models[x];if(!b){console.error("没有找到正确的模型,无法检测构建异常");return}OL({points:NL(b.aabbs),epsilon:100,min_samples:l.numObjects/4>=1?l.numObjects/4:1},M=>{if(M.noise.length>0){const{noise:_}=M;for(const m in _)Uy.push(l.objectIds[_[m]]);console.log("old aabb",T.scene.aabb),window.BimViewer.updateAABB(Uy,()=>{console.log("new aabb",T.scene.aabb),T.cameraFlight.jumpTo({aabb:T.scene.aabb})})}if(M.labels_count>1){const{labels:_}=M;let m;const p=M.change_indices,g=[];for(let f=0;f<p.length;f++)m=p[f],f==p.length-1?g.push(l.objectIds.slice(m,_.length)):g.push(l.objectIds.slice(m,p[f+1]));window.BimViewer.setPartialObjectIds(g)}})}function OL(x,T){console.log("start dbscan..."),fetch(`${QR}/dbscan/convert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}).then(l=>(l.ok,l.json())).then(l=>{if(l&&l.error)throw new Error(l.error);l.noise.length>0||l.labels_count>1?(T(l),console.log("DBSCAN Result:",`noise:${l.noise}`,`labels_count:${l.labels_count}`)):(console.log("DBSCAN Result:",l),console.log("DBSCAN Result: no outlier"))}).catch(l=>{console.error("DBSCAN failed:",l)})}function NL(x){const T=[];for(let l=0;l<x.length;l++){const b=x[l],M=[(b[0]+b[3])/2,(b[1]+b[4])/2,(b[2]+b[5])/2];T.push(M)}return T}function UL(x,T,l=!1,b){const M=new Date().getTime();window.BimViewer.loadModel(x,T,()=>{b&&b({code:200,result:x+"模型加载完成!"})},_=>{b&&b({code:-1,result:x+"模型加载失败!",msg:_})}),window.BimViewer.modelsExplorer.on("modelLoaded",()=>{const m=new Date().getTime()-M;console.log(`加载时长: ${m/1e3} s`),l||LL(x)})}var jL={"./node_modules/@xtctwins/tctwins-core/dist/tctwins-core.es5.js":(x,T,l)=>{l.r(T),l.d(T,{AlphaFormat:()=>ub,AmbientLight:()=>I1,AngleMeasurementsControl:()=>jo,AngleMeasurementsMouseControl:()=>Ga,AngleMeasurementsPlugin:()=>Vu,AngleMeasurementsTouchControl:()=>zj,AnnotationsPlugin:()=>$j,BCFViewpointsPlugin:()=>gQ,Bitmap:()=>tw,ByteType:()=>qy,CameraMemento:()=>L1,CameraPath:()=>PQ,CameraPathAnimation:()=>hc,Canvas:()=>S1,ClampToEdgeWrapping:()=>ts,Component:()=>Ve,CompressedMediaType:()=>Zj,Configs:()=>qh,CubicBezierCurve:()=>NQ,Curve:()=>cc,DefaultLoadingManager:()=>s1,DepthFormat:()=>fb,DepthStencilFormat:()=>Ab,DirLight:()=>Xo,DistanceMeasurementsControl:()=>Wp,DistanceMeasurementsMouseControl:()=>y1,DistanceMeasurementsPlugin:()=>wQ,DistanceMeasurementsTouchControl:()=>BQ,EdgeMaterial:()=>Kh,EmphasisMaterial:()=>Mi,FloatType:()=>nb,Fresnel:()=>iH,Frustum:()=>Za,FrustumPlane:()=>Ja,GIFMediaType:()=>Jj,GLTFDefaultDataSource:()=>C1,GLTFLoaderPlugin:()=>Dee,HalfFloatType:()=>sb,ImagePlane:()=>kQ,IntType:()=>rb,JPEGMediaType:()=>yb,KTX2TextureTranscoder:()=>Vl,LambertMaterial:()=>XV,LightMap:()=>RQ,LineSet:()=>_1,LinearEncoding:()=>cs,LinearFilter:()=>Fn,LinearMipMapLinearFilter:()=>Rl,LinearMipMapNearestFilter:()=>Qu,LinearMipmapLinearFilter:()=>Ka,LinearMipmapNearestFilter:()=>Yj,Loader:()=>o1,LoadingManager:()=>n1,LocaleService:()=>x1,LuminanceAlphaFormat:()=>db,LuminanceFormat:()=>hb,Map:()=>ue,Marker:()=>tn,Mesh:()=>ir,MetallicMaterial:()=>JV,MirroredRepeatWrapping:()=>Ho,ModelMemento:()=>OQ,NavCubePlugin:()=>Lee,NearestFilter:()=>Wa,NearestMipMapLinearFilter:()=>Dl,NearestMipMapNearestFilter:()=>Hu,NearestMipmapLinearFilter:()=>Zy,NearestMipmapNearestFilter:()=>Jy,Node:()=>va,ObjectsKdTree3:()=>ae,ObjectsMemento:()=>O1,PNGMediaType:()=>bb,Path:()=>UQ,PerformanceModel:()=>VQ,PhongMaterial:()=>hi,Plugin:()=>Qe,PointLight:()=>IQ,PointerLens:()=>Le,QuadraticBezierCurve:()=>jQ,Queue:()=>ce,RGBAFormat:()=>zu,RGBAIntegerFormat:()=>_b,RGBA_ASTC_10x10_Format:()=>sp,RGBA_ASTC_10x5_Format:()=>rp,RGBA_ASTC_10x6_Format:()=>ip,RGBA_ASTC_10x8_Format:()=>np,RGBA_ASTC_12x10_Format:()=>op,RGBA_ASTC_12x12_Format:()=>ap,RGBA_ASTC_4x4_Format:()=>Hh,RGBA_ASTC_5x4_Format:()=>$A,RGBA_ASTC_5x5_Format:()=>YA,RGBA_ASTC_6x5_Format:()=>JA,RGBA_ASTC_6x6_Format:()=>ZA,RGBA_ASTC_8x5_Format:()=>qA,RGBA_ASTC_8x6_Format:()=>ep,RGBA_ASTC_8x8_Format:()=>tp,RGBA_BPTC_Format:()=>Qh,RGBA_ETC2_EAC_Format:()=>Vh,RGBA_PVRTC_2BPPV1_Format:()=>KA,RGBA_PVRTC_4BPPV1_Format:()=>Uh,RGBA_S3TC_DXT1_Format:()=>Lh,RGBA_S3TC_DXT3_Format:()=>Oh,RGBA_S3TC_DXT5_Format:()=>Wu,RGBFormat:()=>cb,RGB_ETC1_Format:()=>XA,RGB_ETC2_Format:()=>jh,RGB_PVRTC_2BPPV1_Format:()=>WA,RGB_PVRTC_4BPPV1_Format:()=>Nh,RGB_S3TC_DXT1_Format:()=>Gu,RGFormat:()=>mb,RGIntegerFormat:()=>gb,ReadableGeometry:()=>Wr,RedFormat:()=>pb,RedIntegerFormat:()=>vb,ReflectionMap:()=>DQ,Renderer:()=>j1,RepeatWrapping:()=>Ei,Scene:()=>gd,SceneModel:()=>zl,SceneModelMesh:()=>iw,SceneModelTransform:()=>d1,SectionBox:()=>rv,SectionPlane:()=>Rh,SectionPlanesPlugin:()=>qee,ShortType:()=>eb,Skybox:()=>iv,SkyboxesPlugin:()=>nte,SpecularMaterial:()=>eH,SplineCurve:()=>Ad,SpriteMarker:()=>LQ,StoreyViewsPlugin:()=>ite,Texture:()=>Ll,TextureTranscoder:()=>HQ,TreeViewPlugin:()=>ste,UnsignedByteType:()=>GA,UnsignedInt248Type:()=>lb,UnsignedIntType:()=>ib,UnsignedShort4444Type:()=>ob,UnsignedShort5551Type:()=>ab,UnsignedShortType:()=>tb,VBOGeometry:()=>qb,Viewer:()=>w7,WebIFCLoaderPlugin:()=>mte,WorkerPool:()=>l1,XTCDefaultDataSource:()=>HP,XTCLoaderPlugin:()=>fte,buildBoxGeometry:()=>Xh,buildBoxLinesGeometry:()=>$h,buildCylinderGeometry:()=>Ps,buildGridGeometry:()=>ew,buildPlaneGeometry:()=>gp,buildSphereGeometry:()=>Yh,buildTorusGeometry:()=>Go,buildVectorTextGeometry:()=>aH,createRTCViewMat:()=>it,frustumIntersectsAABB3:()=>x6,getKTX2TextureTranscoder:()=>u1,getPlaneRTCPos:()=>St,load3DSGeometry:()=>nH,loadOBJGeometry:()=>sH,math:()=>h,rtcToWorldPos:()=>Et,sRGBEncoding:()=>bi,setFrustum:()=>C6,stats:()=>re,utils:()=>wt,worldToRTCPos:()=>mt,worldToRTCPositions:()=>dt});var b=p().mark(zx),M=p().mark(Cg);function _(o,i){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(o);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,e)}return t}function m(o){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?_(Object(t),!0).forEach(function(e){H(o,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(t,e))})}return o}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return i};var o,i={},t=Object.prototype,e=t.hasOwnProperty,r=Object.defineProperty||function(ut,ct,ft){ut[ct]=ft.value},s=typeof Symbol=="function"?Symbol:{},n=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function c(ut,ct,ft){return Object.defineProperty(ut,ct,{value:ft,enumerable:!0,configurable:!0,writable:!0}),ut[ct]}try{c({},"")}catch{c=function(ft,Ct,kt){return ft[Ct]=kt}}function C(ut,ct,ft,Ct){var kt=ct&&ct.prototype instanceof te?ct:te,Tt=Object.create(kt.prototype),$t=new Ze(Ct||[]);return r(Tt,"_invoke",{value:Ge(ut,ft,$t)}),Tt}function k(ut,ct,ft){try{return{type:"normal",arg:ut.call(ct,ft)}}catch(Ct){return{type:"throw",arg:Ct}}}i.wrap=C;var D="suspendedStart",Q="suspendedYield",X="executing",R="completed",q={};function te(){}function se(){}function ie(){}var he={};c(he,n,function(){return this});var ge=Object.getPrototypeOf,pe=ge&&ge(ge(ot([])));pe&&pe!==t&&e.call(pe,n)&&(he=pe);var xe=ie.prototype=te.prototype=Object.create(he);function Se(ut){["next","throw","return"].forEach(function(ct){c(ut,ct,function(ft){return this._invoke(ct,ft)})})}function Oe(ut,ct){function ft(kt,Tt,$t,or){var mr=k(ut[kt],ut,Tt);if(mr.type!=="throw"){var ur=mr.arg,Mr=ur.value;return Mr&&Z(Mr)=="object"&&e.call(Mr,"__await")?ct.resolve(Mr.__await).then(function(Kt){ft("next",Kt,$t,or)},function(Kt){ft("throw",Kt,$t,or)}):ct.resolve(Mr).then(function(Kt){ur.value=Kt,$t(ur)},function(Kt){return ft("throw",Kt,$t,or)})}or(mr.arg)}var Ct;r(this,"_invoke",{value:function(Tt,$t){function or(){return new ct(function(mr,ur){ft(Tt,$t,mr,ur)})}return Ct=Ct?Ct.then(or,or):or()}})}function Ge(ut,ct,ft){var Ct=D;return function(kt,Tt){if(Ct===X)throw Error("Generator is already running");if(Ct===R){if(kt==="throw")throw Tt;return{value:o,done:!0}}for(ft.method=kt,ft.arg=Tt;;){var $t=ft.delegate;if($t){var or=Ye($t,ft);if(or){if(or===q)continue;return or}}if(ft.method==="next")ft.sent=ft._sent=ft.arg;else if(ft.method==="throw"){if(Ct===D)throw Ct=R,ft.arg;ft.dispatchException(ft.arg)}else ft.method==="return"&&ft.abrupt("return",ft.arg);Ct=X;var mr=k(ut,ct,ft);if(mr.type==="normal"){if(Ct=ft.done?R:Q,mr.arg===q)continue;return{value:mr.arg,done:ft.done}}mr.type==="throw"&&(Ct=R,ft.method="throw",ft.arg=mr.arg)}}}function Ye(ut,ct){var ft=ct.method,Ct=ut.iterator[ft];if(Ct===o)return ct.delegate=null,ft==="throw"&&ut.iterator.return&&(ct.method="return",ct.arg=o,Ye(ut,ct),ct.method==="throw")||ft!=="return"&&(ct.method="throw",ct.arg=new TypeError("The iterator does not provide a '"+ft+"' method")),q;var kt=k(Ct,ut.iterator,ct.arg);if(kt.type==="throw")return ct.method="throw",ct.arg=kt.arg,ct.delegate=null,q;var Tt=kt.arg;return Tt?Tt.done?(ct[ut.resultName]=Tt.value,ct.next=ut.nextLoc,ct.method!=="return"&&(ct.method="next",ct.arg=o),ct.delegate=null,q):Tt:(ct.method="throw",ct.arg=new TypeError("iterator result is not an object"),ct.delegate=null,q)}function He(ut){var ct={tryLoc:ut[0]};1 in ut&&(ct.catchLoc=ut[1]),2 in ut&&(ct.finallyLoc=ut[2],ct.afterLoc=ut[3]),this.tryEntries.push(ct)}function Ne(ut){var ct=ut.completion||{};ct.type="normal",delete ct.arg,ut.completion=ct}function Ze(ut){this.tryEntries=[{tryLoc:"root"}],ut.forEach(He,this),this.reset(!0)}function ot(ut){if(ut||ut===""){var ct=ut[n];if(ct)return ct.call(ut);if(typeof ut.next=="function")return ut;if(!isNaN(ut.length)){var ft=-1,Ct=function kt(){for(;++ft<ut.length;)if(e.call(ut,ft))return kt.value=ut[ft],kt.done=!1,kt;return kt.value=o,kt.done=!0,kt};return Ct.next=Ct}}throw new TypeError(Z(ut)+" is not iterable")}return se.prototype=ie,r(xe,"constructor",{value:ie,configurable:!0}),r(ie,"constructor",{value:se,configurable:!0}),se.displayName=c(ie,u,"GeneratorFunction"),i.isGeneratorFunction=function(ut){var ct=typeof ut=="function"&&ut.constructor;return!!ct&&(ct===se||(ct.displayName||ct.name)==="GeneratorFunction")},i.mark=function(ut){return Object.setPrototypeOf?Object.setPrototypeOf(ut,ie):(ut.__proto__=ie,c(ut,u,"GeneratorFunction")),ut.prototype=Object.create(xe),ut},i.awrap=function(ut){return{__await:ut}},Se(Oe.prototype),c(Oe.prototype,a,function(){return this}),i.AsyncIterator=Oe,i.async=function(ut,ct,ft,Ct,kt){kt===void 0&&(kt=Promise);var Tt=new Oe(C(ut,ct,ft,Ct),kt);return i.isGeneratorFunction(ct)?Tt:Tt.next().then(function($t){return $t.done?$t.value:Tt.next()})},Se(xe),c(xe,u,"Generator"),c(xe,n,function(){return this}),c(xe,"toString",function(){return"[object Generator]"}),i.keys=function(ut){var ct=Object(ut),ft=[];for(var Ct in ct)ft.push(Ct);return ft.reverse(),function kt(){for(;ft.length;){var Tt=ft.pop();if(Tt in ct)return kt.value=Tt,kt.done=!1,kt}return kt.done=!0,kt}},i.values=ot,Ze.prototype={constructor:Ze,reset:function(ct){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(Ne),!ct)for(var ft in this)ft.charAt(0)==="t"&&e.call(this,ft)&&!isNaN(+ft.slice(1))&&(this[ft]=o)},stop:function(){this.done=!0;var ct=this.tryEntries[0].completion;if(ct.type==="throw")throw ct.arg;return this.rval},dispatchException:function(ct){if(this.done)throw ct;var ft=this;function Ct(ur,Mr){return $t.type="throw",$t.arg=ct,ft.next=ur,Mr&&(ft.method="next",ft.arg=o),!!Mr}for(var kt=this.tryEntries.length-1;kt>=0;--kt){var Tt=this.tryEntries[kt],$t=Tt.completion;if(Tt.tryLoc==="root")return Ct("end");if(Tt.tryLoc<=this.prev){var or=e.call(Tt,"catchLoc"),mr=e.call(Tt,"finallyLoc");if(or&&mr){if(this.prev<Tt.catchLoc)return Ct(Tt.catchLoc,!0);if(this.prev<Tt.finallyLoc)return Ct(Tt.finallyLoc)}else if(or){if(this.prev<Tt.catchLoc)return Ct(Tt.catchLoc,!0)}else{if(!mr)throw Error("try statement without catch or finally");if(this.prev<Tt.finallyLoc)return Ct(Tt.finallyLoc)}}}},abrupt:function(ct,ft){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var kt=this.tryEntries[Ct];if(kt.tryLoc<=this.prev&&e.call(kt,"finallyLoc")&&this.prev<kt.finallyLoc){var Tt=kt;break}}Tt&&(ct==="break"||ct==="continue")&&Tt.tryLoc<=ft&&ft<=Tt.finallyLoc&&(Tt=null);var $t=Tt?Tt.completion:{};return $t.type=ct,$t.arg=ft,Tt?(this.method="next",this.next=Tt.finallyLoc,q):this.complete($t)},complete:function(ct,ft){if(ct.type==="throw")throw ct.arg;return ct.type==="break"||ct.type==="continue"?this.next=ct.arg:ct.type==="return"?(this.rval=this.arg=ct.arg,this.method="return",this.next="end"):ct.type==="normal"&&ft&&(this.next=ft),q},finish:function(ct){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var Ct=this.tryEntries[ft];if(Ct.finallyLoc===ct)return this.complete(Ct.completion,Ct.afterLoc),Ne(Ct),q}},catch:function(ct){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var Ct=this.tryEntries[ft];if(Ct.tryLoc===ct){var kt=Ct.completion;if(kt.type==="throw"){var Tt=kt.arg;Ne(Ct)}return Tt}}throw Error("illegal catch attempt")},delegateYield:function(ct,ft,Ct){return this.delegate={iterator:ot(ct),resultName:ft,nextLoc:Ct},this.method==="next"&&(this.arg=o),q}},i}function g(o,i,t,e,r,s,n){try{var a=o[s](n),u=a.value}catch(c){return void t(c)}a.done?i(u):Promise.resolve(u).then(e,r)}function f(o){return function(){var i=this,t=arguments;return new Promise(function(e,r){var s=o.apply(i,t);function n(u){g(s,e,r,n,a,"next",u)}function a(u){g(s,e,r,n,a,"throw",u)}n(void 0)})}}function v(o){return w(o)||y(o)||S(o)||A()}function A(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
20
|
+
`,BI=["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 CI(x){const T=window.getComputedStyle(x),l=T.getPropertyValue("box-sizing"),b=Number.parseFloat(T.getPropertyValue("padding-bottom"))+Number.parseFloat(T.getPropertyValue("padding-top")),M=Number.parseFloat(T.getPropertyValue("border-bottom-width"))+Number.parseFloat(T.getPropertyValue("border-top-width"));return{contextStyle:BI.map(m=>`${m}:${T.getPropertyValue(m)}`).join(";"),paddingSize:b,borderSize:M,boxSizing:l}}function G0(x,T=1,l){var b;Qs||(Qs=document.createElement("textarea"),document.body.appendChild(Qs));const{paddingSize:M,borderSize:_,boxSizing:m,contextStyle:p}=CI(x);Qs.setAttribute("style",`${p};${wI}`),Qs.value=x.value||x.placeholder||"";let g=Qs.scrollHeight;const f={};m==="border-box"?g=g+_:m==="content-box"&&(g=g-M),Qs.value="";const v=Qs.scrollHeight-M;if(oi(T)){let A=v*T;m==="border-box"&&(A=A+M+_),g=Math.max(A,g),f.minHeight=`${A}px`}if(oi(l)){let A=v*l;m==="border-box"&&(A=A+M+_),g=Math.min(A,g)}return f.height=`${g}px`,(b=Qs.parentNode)==null||b.removeChild(Qs),Qs=void 0,f}const xI=mi({id:{type:String,default:void 0},size:Lo,disabled:Boolean,modelValue:{type:Ur([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:Ur([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:Do},prefixIcon:{type:Do},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ur([Object,Array,String]),default:()=>Dk({})},autofocus:Boolean,rows:{type:Number,default:2},...Hs(["ariaLabel"])}),PI={[gi]:x=>cn(x),input:x=>cn(x),change:x=>cn(x),focus:x=>x instanceof FocusEvent,blur:x=>x instanceof FocusEvent,clear:()=>!0,mouseleave:x=>x instanceof MouseEvent,mouseenter:x=>x instanceof MouseEvent,keydown:x=>x instanceof Event,compositionstart:x=>x instanceof CompositionEvent,compositionupdate:x=>x instanceof CompositionEvent,compositionend:x=>x instanceof CompositionEvent},EI=d.defineComponent({name:"ElInput",inheritAttrs:!1}),MI=d.defineComponent({...EI,props:xI,emits:PI,setup(x,{expose:T,emit:l}){const b=x,M=d.useAttrs(),_=d.useSlots(),m=d.computed(()=>{const le={};return b.containerRole==="combobox"&&(le["aria-haspopup"]=M["aria-haspopup"],le["aria-owns"]=M["aria-owns"],le["aria-expanded"]=M["aria-expanded"]),le}),p=d.computed(()=>[b.type==="textarea"?E.b():P.b(),P.m(w.value),P.is("disabled",B.value),P.is("exceed",Ie.value),{[P.b("group")]:_.prepend||_.append,[P.m("prefix")]:_.prefix||b.prefixIcon,[P.m("suffix")]:_.suffix||b.suffixIcon||b.clearable||b.showPassword,[P.bm("suffix","password-clear")]:ee.value&&de.value,[P.b("hidden")]:b.type==="hidden"},M.class]),g=d.computed(()=>[P.e("wrapper"),P.is("focus",j.value)]),f=Ok({excludeKeys:d.computed(()=>Object.keys(m.value))}),{form:v,formItem:A}=No(),{inputId:y}=Ha(b,{formItemContext:A}),w=Oo(),B=Lu(),P=ei("input"),E=ei("textarea"),S=d.shallowRef(),I=d.shallowRef(),F=d.ref(!1),N=d.ref(!1),O=d.ref(),V=d.shallowRef(b.inputStyle),G=d.computed(()=>S.value||I.value),{wrapperRef:U,isFocused:j}=Q0(G,{afterBlur(){var le;b.validateEvent&&((le=A==null?void 0:A.validate)==null||le.call(A,"blur").catch(Ee=>Pi(Ee)))}}),K=d.computed(()=>{var le;return(le=v==null?void 0:v.statusIcon)!=null?le:!1}),$=d.computed(()=>(A==null?void 0:A.validateState)||""),W=d.computed(()=>$.value&&h0[$.value]),L=d.computed(()=>N.value?wn.View:wn.Hide),z=d.computed(()=>[M.style]),H=d.computed(()=>[b.inputStyle,V.value,{resize:b.resize}]),Z=d.computed(()=>to(b.modelValue)?"":String(b.modelValue)),ee=d.computed(()=>b.clearable&&!B.value&&!b.readonly&&!!Z.value&&(j.value||F.value)),de=d.computed(()=>b.showPassword&&!B.value&&!b.readonly&&!!Z.value&&(!!Z.value||j.value)),Y=d.computed(()=>b.showWordLimit&&!!b.maxlength&&(b.type==="text"||b.type==="textarea")&&!B.value&&!b.readonly&&!b.showPassword),Ce=d.computed(()=>Z.value.length),Ie=d.computed(()=>!!Y.value&&Ce.value>Number(b.maxlength)),ye=d.computed(()=>!!_.suffix||!!b.suffixIcon||ee.value||b.showPassword||Y.value||!!$.value&&K.value),[me,Be]=lI(S);So(I,le=>{if(Me(),!Y.value||b.resize!=="both")return;const Ee=le[0],{width:We}=Ee.contentRect;O.value={right:`calc(100% - ${We+15+6}px)`}});const ve=()=>{const{type:le,autosize:Ee}=b;if(!(!Bn||le!=="textarea"||!I.value))if(Ee){const We=jn(Ee)?Ee.minRows:void 0,ze=jn(Ee)?Ee.maxRows:void 0,Je=G0(I.value,We,ze);V.value={overflowY:"hidden",...Je},d.nextTick(()=>{I.value.offsetHeight,V.value=Je})}else V.value={minHeight:G0(I.value).minHeight}},Me=(le=>{let Ee=!1;return()=>{var We;if(Ee||!b.autosize)return;((We=I.value)==null?void 0:We.offsetParent)===null||(le(),Ee=!0)}})(ve),Le=()=>{const le=G.value,Ee=b.formatter?b.formatter(Z.value):Z.value;!le||le.value===Ee||(le.value=Ee)},Ue=async le=>{me();let{value:Ee}=le.target;if(b.formatter&&(Ee=b.parser?b.parser(Ee):Ee),!Xe.value){if(Ee===Z.value){Le();return}l(gi,Ee),l("input",Ee),await d.nextTick(),Le(),Be()}},_e=le=>{l("change",le.target.value)},{isComposing:Xe,handleCompositionStart:we,handleCompositionUpdate:oe,handleCompositionEnd:Ae}=z0({emit:l,afterComposition:Ue}),h=()=>{N.value=!N.value,De()},De=async()=>{var le;await d.nextTick(),(le=G.value)==null||le.focus()},je=()=>{var le;return(le=G.value)==null?void 0:le.blur()},ae=le=>{F.value=!1,l("mouseleave",le)},ue=le=>{F.value=!0,l("mouseenter",le)},ce=le=>{l("keydown",le)},re=()=>{var le;(le=G.value)==null||le.select()},fe=()=>{l(gi,""),l("change",""),l("clear"),l("input","")};return d.watch(()=>b.modelValue,()=>{var le;d.nextTick(()=>ve()),b.validateEvent&&((le=A==null?void 0:A.validate)==null||le.call(A,"change").catch(Ee=>Pi(Ee)))}),d.watch(Z,()=>Le()),d.watch(()=>b.type,async()=>{await d.nextTick(),Le(),ve()}),d.onMounted(()=>{!b.formatter&&b.parser&&Pi("ElInput","If you set the parser, you also need to set the formatter."),Le(),d.nextTick(ve)}),T({input:S,textarea:I,ref:G,textareaStyle:H,autosize:d.toRef(b,"autosize"),isComposing:Xe,focus:De,blur:je,select:re,clear:fe,resizeTextarea:ve}),(le,Ee)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps(d.unref(m),{class:[d.unref(p),{[d.unref(P).bm("group","append")]:le.$slots.append,[d.unref(P).bm("group","prepend")]:le.$slots.prepend}],style:d.unref(z),role:le.containerRole,onMouseenter:ue,onMouseleave:ae}),[d.createCommentVNode(" input "),le.type!=="textarea"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createCommentVNode(" prepend slot "),le.$slots.prepend?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(d.unref(P).be("group","prepend"))},[d.renderSlot(le.$slots,"prepend")],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{ref_key:"wrapperRef",ref:U,class:d.normalizeClass(d.unref(g))},[d.createCommentVNode(" prefix slot "),le.$slots.prefix||le.prefixIcon?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(P).e("prefix"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("prefix-inner"))},[d.renderSlot(le.$slots,"prefix"),le.prefixIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(P).e("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(le.prefixIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("input",d.mergeProps({id:d.unref(y),ref_key:"input",ref:S,class:d.unref(P).e("inner")},d.unref(f),{minlength:le.minlength,maxlength:le.maxlength,type:le.showPassword?N.value?"text":"password":le.type,disabled:d.unref(B),readonly:le.readonly,autocomplete:le.autocomplete,tabindex:le.tabindex,"aria-label":le.ariaLabel,placeholder:le.placeholder,style:le.inputStyle,form:le.form,autofocus:le.autofocus,onCompositionstart:d.unref(we),onCompositionupdate:d.unref(oe),onCompositionend:d.unref(Ae),onInput:Ue,onChange:_e,onKeydown:ce}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),d.createCommentVNode(" suffix slot "),d.unref(ye)?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(P).e("suffix"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("suffix-inner"))},[!d.unref(ee)||!d.unref(de)||!d.unref(Y)?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.renderSlot(le.$slots,"suffix"),le.suffixIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(P).e("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(le.suffixIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],64)):d.createCommentVNode("v-if",!0),d.unref(ee)?(d.openBlock(),d.createBlock(d.unref(mn),{key:1,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("clear")]),onMousedown:d.withModifiers(d.unref(yu),["prevent"]),onClick:fe},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.CircleClose))]),_:1},8,["class","onMousedown"])):d.createCommentVNode("v-if",!0),d.unref(de)?(d.openBlock(),d.createBlock(d.unref(mn),{key:2,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("password")]),onClick:h},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(L))))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),d.unref(Y)?(d.openBlock(),d.createElementBlock("span",{key:3,class:d.normalizeClass(d.unref(P).e("count"))},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(P).e("count-inner"))},d.toDisplayString(d.unref(Ce))+" / "+d.toDisplayString(le.maxlength),3)],2)):d.createCommentVNode("v-if",!0),d.unref($)&&d.unref(W)&&d.unref(K)?(d.openBlock(),d.createBlock(d.unref(mn),{key:4,class:d.normalizeClass([d.unref(P).e("icon"),d.unref(P).e("validateIcon"),d.unref(P).is("loading",d.unref($)==="validating")])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(W))))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],2)):d.createCommentVNode("v-if",!0)],2),d.createCommentVNode(" append slot "),le.$slots.append?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(d.unref(P).be("group","append"))},[d.renderSlot(le.$slots,"append")],2)):d.createCommentVNode("v-if",!0)],64)):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[d.createCommentVNode(" textarea "),d.createElementVNode("textarea",d.mergeProps({id:d.unref(y),ref_key:"textarea",ref:I,class:[d.unref(E).e("inner"),d.unref(P).is("focus",d.unref(j))]},d.unref(f),{minlength:le.minlength,maxlength:le.maxlength,tabindex:le.tabindex,disabled:d.unref(B),readonly:le.readonly,autocomplete:le.autocomplete,style:d.unref(H),"aria-label":le.ariaLabel,placeholder:le.placeholder,form:le.form,autofocus:le.autofocus,rows:le.rows,onCompositionstart:d.unref(we),onCompositionupdate:d.unref(oe),onCompositionend:d.unref(Ae),onInput:Ue,onChange:_e,onKeydown:ce}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend"]),d.unref(Y)?(d.openBlock(),d.createElementBlock("span",{key:0,style:d.normalizeStyle(O.value),class:d.normalizeClass(d.unref(P).e("count"))},d.toDisplayString(d.unref(Ce))+" / "+d.toDisplayString(le.maxlength),7)):d.createCommentVNode("v-if",!0)],64))],16,["role"]))}});var SI=ti(MI,[["__file","input.vue"]]);const Ou=Vn(SI),Pl=4,TI={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"}},kI=({move:x,size:T,bar:l})=>({[l.size]:T,transform:`translate${l.axis}(${x}%)`}),BA=Symbol("scrollbarContextKey"),II=mi({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),FI="Thumb";var W0=ti(d.defineComponent({__name:"thumb",props:II,setup(x){const T=x,l=d.inject(BA),b=ei("scrollbar");l||fh(FI,"can not inject scrollbar context");const M=d.ref(),_=d.ref(),m=d.ref({}),p=d.ref(!1);let g=!1,f=!1,v=Bn?document.onselectstart:null;const A=d.computed(()=>TI[T.vertical?"vertical":"horizontal"]),y=d.computed(()=>kI({size:T.size,move:T.move,bar:A.value})),w=d.computed(()=>M.value[A.value.offset]**2/l.wrapElement[A.value.scrollSize]/T.ratio/_.value[A.value.offset]),B=V=>{var G;if(V.stopPropagation(),V.ctrlKey||[1,2].includes(V.button))return;(G=window.getSelection())==null||G.removeAllRanges(),E(V);const U=V.currentTarget;U&&(m.value[A.value.axis]=U[A.value.offset]-(V[A.value.client]-U.getBoundingClientRect()[A.value.direction]))},P=V=>{if(!_.value||!M.value||!l.wrapElement)return;const G=Math.abs(V.target.getBoundingClientRect()[A.value.direction]-V[A.value.client]),U=_.value[A.value.offset]/2,j=(G-U)*100*w.value/M.value[A.value.offset];l.wrapElement[A.value.scroll]=j*l.wrapElement[A.value.scrollSize]/100},E=V=>{V.stopImmediatePropagation(),g=!0,document.addEventListener("mousemove",S),document.addEventListener("mouseup",I),v=document.onselectstart,document.onselectstart=()=>!1},S=V=>{if(!M.value||!_.value||g===!1)return;const G=m.value[A.value.axis];if(!G)return;const U=(M.value.getBoundingClientRect()[A.value.direction]-V[A.value.client])*-1,j=_.value[A.value.offset]-G,K=(U-j)*100*w.value/M.value[A.value.offset];l.wrapElement[A.value.scroll]=K*l.wrapElement[A.value.scrollSize]/100},I=()=>{g=!1,m.value[A.value.axis]=0,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",I),O(),f&&(p.value=!1)},F=()=>{f=!1,p.value=!!T.size},N=()=>{f=!0,p.value=g};d.onBeforeUnmount(()=>{O(),document.removeEventListener("mouseup",I)});const O=()=>{document.onselectstart!==v&&(document.onselectstart=v)};return Sn(d.toRef(l,"scrollbarElement"),"mousemove",F),Sn(d.toRef(l,"scrollbarElement"),"mouseleave",N),(V,G)=>(d.openBlock(),d.createBlock(d.Transition,{name:d.unref(b).b("fade"),persisted:""},{default:d.withCtx(()=>[d.withDirectives(d.createElementVNode("div",{ref_key:"instance",ref:M,class:d.normalizeClass([d.unref(b).e("bar"),d.unref(b).is(d.unref(A).key)]),onMousedown:P},[d.createElementVNode("div",{ref_key:"thumb",ref:_,class:d.normalizeClass(d.unref(b).e("thumb")),style:d.normalizeStyle(d.unref(y)),onMousedown:B},null,38)],34),[[d.vShow,V.always||p.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const DI=mi({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var RI=ti(d.defineComponent({__name:"bar",props:DI,setup(x,{expose:T}){const l=x,b=d.inject(BA),M=d.ref(0),_=d.ref(0),m=d.ref(""),p=d.ref(""),g=d.ref(1),f=d.ref(1);return T({handleScroll:y=>{if(y){const w=y.offsetHeight-Pl,B=y.offsetWidth-Pl;_.value=y.scrollTop*100/w*g.value,M.value=y.scrollLeft*100/B*f.value}},update:()=>{const y=b==null?void 0:b.wrapElement;if(!y)return;const w=y.offsetHeight-Pl,B=y.offsetWidth-Pl,P=w**2/y.scrollHeight,E=B**2/y.scrollWidth,S=Math.max(P,l.minSize),I=Math.max(E,l.minSize);g.value=P/(w-P)/(S/(w-S)),f.value=E/(B-E)/(I/(B-I)),p.value=S+Pl<w?`${S}px`:"",m.value=I+Pl<B?`${I}px`:""}}),(y,w)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(W0,{move:M.value,ratio:f.value,size:m.value,always:y.always},null,8,["move","ratio","size","always"]),d.createVNode(W0,{move:_.value,ratio:g.value,size:p.value,vertical:"",always:y.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const LI=mi({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ur([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,...Hs(["ariaLabel","ariaOrientation"])}),OI={scroll:({scrollTop:x,scrollLeft:T})=>[x,T].every(oi)},CA="ElScrollbar",NI=d.defineComponent({name:CA}),UI=d.defineComponent({...NI,props:LI,emits:OI,setup(x,{expose:T,emit:l}){const b=x,M=ei("scrollbar");let _,m,p=0,g=0;const f=d.ref(),v=d.ref(),A=d.ref(),y=d.ref(),w=d.computed(()=>{const O={};return b.height&&(O.height=Ah(b.height)),b.maxHeight&&(O.maxHeight=Ah(b.maxHeight)),[b.wrapStyle,O]}),B=d.computed(()=>[b.wrapClass,M.e("wrap"),{[M.em("wrap","hidden-default")]:!b.native}]),P=d.computed(()=>[M.e("view"),b.viewClass]),E=()=>{var O;v.value&&((O=y.value)==null||O.handleScroll(v.value),p=v.value.scrollTop,g=v.value.scrollLeft,l("scroll",{scrollTop:v.value.scrollTop,scrollLeft:v.value.scrollLeft}))};function S(O,V){jn(O)?v.value.scrollTo(O):oi(O)&&oi(V)&&v.value.scrollTo(O,V)}const I=O=>{if(!oi(O)){Pi(CA,"value must be a number");return}v.value.scrollTop=O},F=O=>{if(!oi(O)){Pi(CA,"value must be a number");return}v.value.scrollLeft=O},N=()=>{var O;(O=y.value)==null||O.update()};return d.watch(()=>b.noresize,O=>{O?(_==null||_(),m==null||m()):({stop:_}=So(A,N),m=Sn("resize",N))},{immediate:!0}),d.watch(()=>[b.maxHeight,b.height],()=>{b.native||d.nextTick(()=>{var O;N(),v.value&&((O=y.value)==null||O.handleScroll(v.value))})}),d.provide(BA,d.reactive({scrollbarElement:f,wrapElement:v})),d.onActivated(()=>{v.value.scrollTop=p,v.value.scrollLeft=g}),d.onMounted(()=>{b.native||d.nextTick(()=>{N()})}),d.onUpdated(()=>N()),T({wrapRef:v,update:N,scrollTo:S,setScrollTop:I,setScrollLeft:F,handleScroll:E}),(O,V)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"scrollbarRef",ref:f,class:d.normalizeClass(d.unref(M).b())},[d.createElementVNode("div",{ref_key:"wrapRef",ref:v,class:d.normalizeClass(d.unref(B)),style:d.normalizeStyle(d.unref(w)),onScroll:E},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.tag),{id:O.id,ref_key:"resizeRef",ref:A,class:d.normalizeClass(d.unref(P)),style:d.normalizeStyle(O.viewStyle),role:O.role,"aria-label":O.ariaLabel,"aria-orientation":O.ariaOrientation},{default:d.withCtx(()=>[d.renderSlot(O.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),O.native?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createBlock(RI,{key:0,ref_key:"barRef",ref:y,always:O.always,"min-size":O.minSize},null,8,["always","min-size"]))],2))}});var jI=ti(UI,[["__file","scrollbar.vue"]]);const Uo=Vn(jI),xA=Symbol("popper"),K0=Symbol("popperContent"),X0=mi({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),VI=d.defineComponent({name:"ElPopper",inheritAttrs:!1}),HI=d.defineComponent({...VI,props:X0,setup(x,{expose:T}){const l=x,b=d.ref(),M=d.ref(),_=d.ref(),m=d.ref(),p=d.computed(()=>l.role),g={triggerRef:b,popperInstanceRef:M,contentRef:_,referenceRef:m,role:p};return T(g),d.provide(xA,g),(f,v)=>d.renderSlot(f.$slots,"default")}});var QI=ti(HI,[["__file","popper.vue"]]);const $0=mi({arrowOffset:{type:Number,default:5}}),zI=d.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),GI=d.defineComponent({...zI,props:$0,setup(x,{expose:T}){const l=x,b=ei("popper"),{arrowOffset:M,arrowRef:_,arrowStyle:m}=d.inject(K0,void 0);return d.watch(()=>l.arrowOffset,p=>{M.value=p}),d.onBeforeUnmount(()=>{_.value=void 0}),T({arrowRef:_}),(p,g)=>(d.openBlock(),d.createElementBlock("span",{ref_key:"arrowRef",ref:_,class:d.normalizeClass(d.unref(b).e("arrow")),style:d.normalizeStyle(d.unref(m)),"data-popper-arrow":""},null,6))}});var WI=ti(GI,[["__file","arrow.vue"]]);const PA="ElOnlyChild",KI=d.defineComponent({name:PA,setup(x,{slots:T,attrs:l}){var b;const M=d.inject(U0),_=nI((b=M==null?void 0:M.setForwardRef)!=null?b:yu);return()=>{var m;const p=(m=T.default)==null?void 0:m.call(T,l);if(!p)return null;if(p.length>1)return Pi(PA,"requires exact only one valid child."),null;const g=Y0(p);return g?d.withDirectives(d.cloneVNode(g,l),[[_]]):(Pi(PA,"no valid child node found"),null)}}});function Y0(x){if(!x)return null;const T=x;for(const l of T){if(jn(l))switch(l.type){case d.Comment:continue;case d.Text:case"svg":return J0(l);case d.Fragment:return Y0(l.children);default:return l}return J0(l)}return null}function J0(x){const T=ei("only-child");return d.createVNode("span",{class:T.e("content")},[x])}const Z0=mi({virtualRef:{type:Ur(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ur(Function)},onMouseleave:{type:Ur(Function)},onClick:{type:Ur(Function)},onKeydown:{type:Ur(Function)},onFocus:{type:Ur(Function)},onBlur:{type:Ur(Function)},onContextmenu:{type:Ur(Function)},id:String,open:Boolean}),XI=d.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),$I=d.defineComponent({...XI,props:Z0,setup(x,{expose:T}){const l=x,{role:b,triggerRef:M}=d.inject(xA,void 0);iI(M);const _=d.computed(()=>p.value?l.id:void 0),m=d.computed(()=>{if(b&&b.value==="tooltip")return l.open&&l.id?l.id:void 0}),p=d.computed(()=>{if(b&&b.value!=="tooltip")return b.value}),g=d.computed(()=>p.value?`${l.open}`:void 0);let f;const v=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return d.onMounted(()=>{d.watch(()=>l.virtualRef,A=>{A&&(M.value=Mo(A))},{immediate:!0}),d.watch(M,(A,y)=>{f==null||f(),f=void 0,Ua(A)&&(v.forEach(w=>{var B;const P=l[w];P&&(A.addEventListener(w.slice(2).toLowerCase(),P),(B=y==null?void 0:y.removeEventListener)==null||B.call(y,w.slice(2).toLowerCase(),P))}),f=d.watch([_,m,p,g],w=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((B,P)=>{to(w[P])?A.removeAttribute(B):A.setAttribute(B,w[P])})},{immediate:!0})),Ua(y)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(w=>y.removeAttribute(w))},{immediate:!0})}),d.onBeforeUnmount(()=>{if(f==null||f(),f=void 0,M.value&&Ua(M.value)){const A=M.value;v.forEach(y=>{const w=l[y];w&&A.removeEventListener(y.slice(2).toLowerCase(),w)}),M.value=void 0}}),T({triggerRef:M}),(A,y)=>A.virtualTriggering?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createBlock(d.unref(KI),d.mergeProps({key:0},A.$attrs,{"aria-controls":d.unref(_),"aria-describedby":d.unref(m),"aria-expanded":d.unref(g),"aria-haspopup":d.unref(p)}),{default:d.withCtx(()=>[d.renderSlot(A.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var YI=ti($I,[["__file","trigger.vue"]]);const EA="focus-trap.focus-after-trapped",MA="focus-trap.focus-after-released",JI="focus-trap.focusout-prevented",q0={cancelable:!0,bubbles:!1},ZI={cancelable:!0,bubbles:!1},ey="focusAfterTrapped",ty="focusAfterReleased",qI=Symbol("elFocusTrap"),SA=d.ref(),wh=d.ref(0),TA=d.ref(0);let Bh=0;const ry=x=>{const T=[],l=document.createTreeWalker(x,NodeFilter.SHOW_ELEMENT,{acceptNode:b=>{const M=b.tagName==="INPUT"&&b.type==="hidden";return b.disabled||b.hidden||M?NodeFilter.FILTER_SKIP:b.tabIndex>=0||b===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)T.push(l.currentNode);return T},iy=(x,T)=>{for(const l of x)if(!eF(l,T))return l},eF=(x,T)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(x).visibility==="hidden")return!0;for(;x;){if(T&&x===T)return!1;if(getComputedStyle(x).display==="none")return!0;x=x.parentElement}return!1},tF=x=>{const T=ry(x),l=iy(T,x),b=iy(T.reverse(),x);return[l,b]},rF=x=>x instanceof HTMLInputElement&&"select"in x,ha=(x,T)=>{if(x&&x.focus){const l=document.activeElement;x.focus({preventScroll:!0}),TA.value=window.performance.now(),x!==l&&rF(x)&&T&&x.select()}};function ny(x,T){const l=[...x],b=x.indexOf(T);return b!==-1&&l.splice(b,1),l}const iF=()=>{let x=[];return{push:b=>{const M=x[0];M&&b!==M&&M.pause(),x=ny(x,b),x.unshift(b)},remove:b=>{var M,_;x=ny(x,b),(_=(M=x[0])==null?void 0:M.resume)==null||_.call(M)}}},nF=(x,T=!1)=>{const l=document.activeElement;for(const b of x)if(ha(b,T),document.activeElement!==l)return},sy=iF(),sF=()=>wh.value>TA.value,Ch=()=>{SA.value="pointer",wh.value=window.performance.now()},oy=()=>{SA.value="keyboard",wh.value=window.performance.now()},oF=()=>(d.onMounted(()=>{Bh===0&&(document.addEventListener("mousedown",Ch),document.addEventListener("touchstart",Ch),document.addEventListener("keydown",oy)),Bh++}),d.onBeforeUnmount(()=>{Bh--,Bh<=0&&(document.removeEventListener("mousedown",Ch),document.removeEventListener("touchstart",Ch),document.removeEventListener("keydown",oy))}),{focusReason:SA,lastUserFocusTimestamp:wh,lastAutomatedFocusTimestamp:TA}),xh=x=>new CustomEvent(JI,{...ZI,detail:x}),aF=d.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ey,ty,"focusin","focusout","focusout-prevented","release-requested"],setup(x,{emit:T}){const l=d.ref();let b,M;const{focusReason:_}=oF();Z2(B=>{x.trapped&&!m.paused&&T("release-requested",B)});const m={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},p=B=>{if(!x.loop&&!x.trapped||m.paused)return;const{key:P,altKey:E,ctrlKey:S,metaKey:I,currentTarget:F,shiftKey:N}=B,{loop:O}=x,V=P===us.tab&&!E&&!S&&!I,G=document.activeElement;if(V&&G){const U=F,[j,K]=tF(U);if(j&&K){if(!N&&G===K){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||(B.preventDefault(),O&&ha(j,!0))}else if(N&&[j,U].includes(G)){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||(B.preventDefault(),O&&ha(K,!0))}}else if(G===U){const W=xh({focusReason:_.value});T("focusout-prevented",W),W.defaultPrevented||B.preventDefault()}}};d.provide(qI,{focusTrapRef:l,onKeydown:p}),d.watch(()=>x.focusTrapEl,B=>{B&&(l.value=B)},{immediate:!0}),d.watch([l],([B],[P])=>{B&&(B.addEventListener("keydown",p),B.addEventListener("focusin",v),B.addEventListener("focusout",A)),P&&(P.removeEventListener("keydown",p),P.removeEventListener("focusin",v),P.removeEventListener("focusout",A))});const g=B=>{T(ey,B)},f=B=>T(ty,B),v=B=>{const P=d.unref(l);if(!P)return;const E=B.target,S=B.relatedTarget,I=E&&P.contains(E);x.trapped||S&&P.contains(S)||(b=S),I&&T("focusin",B),!m.paused&&x.trapped&&(I?M=E:ha(M,!0))},A=B=>{const P=d.unref(l);if(!(m.paused||!P))if(x.trapped){const E=B.relatedTarget;!to(E)&&!P.contains(E)&&setTimeout(()=>{if(!m.paused&&x.trapped){const S=xh({focusReason:_.value});T("focusout-prevented",S),S.defaultPrevented||ha(M,!0)}},0)}else{const E=B.target;E&&P.contains(E)||T("focusout",B)}};async function y(){await d.nextTick();const B=d.unref(l);if(B){sy.push(m);const P=B.contains(document.activeElement)?b:document.activeElement;if(b=P,!B.contains(P)){const S=new Event(EA,q0);B.addEventListener(EA,g),B.dispatchEvent(S),S.defaultPrevented||d.nextTick(()=>{let I=x.focusStartEl;cn(I)||(ha(I),document.activeElement!==I&&(I="first")),I==="first"&&nF(ry(B),!0),(document.activeElement===P||I==="container")&&ha(B)})}}}function w(){const B=d.unref(l);if(B){B.removeEventListener(EA,g);const P=new CustomEvent(MA,{...q0,detail:{focusReason:_.value}});B.addEventListener(MA,f),B.dispatchEvent(P),!P.defaultPrevented&&(_.value=="keyboard"||!sF()||B.contains(document.activeElement))&&ha(b??document.body),B.removeEventListener(MA,f),sy.remove(m)}}return d.onMounted(()=>{x.trapped&&y(),d.watch(()=>x.trapped,B=>{B?y():w()})}),d.onBeforeUnmount(()=>{x.trapped&&w(),l.value&&(l.value.removeEventListener("keydown",p),l.value.removeEventListener("focusin",v),l.value.removeEventListener("focusout",A),l.value=void 0)}),{onKeydown:p}}});function lF(x,T,l,b,M,_){return d.renderSlot(x.$slots,"default",{handleKeydown:x.onKeydown})}var uF=ti(aF,[["render",lF],["__file","focus-trap.vue"]]);const cF=["fixed","absolute"],hF=mi({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ur(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:yl,default:"bottom"},popperOptions:{type:Ur(Object),default:()=>({})},strategy:{type:String,values:cF,default:"absolute"}}),ay=mi({...hF,id:String,style:{type:Ur([String,Array,Object])},className:{type:Ur([String,Array,Object])},effect:{type:Ur(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ur([String,Array,Object])},popperStyle:{type:Ur([String,Array,Object])},referenceEl:{type:Ur(Object)},triggerTargetEl:{type:Ur(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Hs(["ariaLabel"])}),dF={mouseenter:x=>x instanceof MouseEvent,mouseleave:x=>x instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},fF=(x,T=[])=>{const{placement:l,strategy:b,popperOptions:M}=x,_={placement:l,strategy:b,...M,modifiers:[...pF(x),...T]};return vF(_,M==null?void 0:M.modifiers),_},AF=x=>{if(Bn)return Mo(x)};function pF(x){const{offset:T,gpuAcceleration:l,fallbackPlacements:b}=x;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:b}},{name:"computeStyles",options:{gpuAcceleration:l}}]}function vF(x,T){T&&(x.modifiers=[...x.modifiers,...T??[]])}const mF=0,gF=x=>{const{popperInstanceRef:T,contentRef:l,triggerRef:b,role:M}=d.inject(xA,void 0),_=d.ref(),m=d.ref(),p=d.computed(()=>({name:"eventListeners",enabled:!!x.visible})),g=d.computed(()=>{var S;const I=d.unref(_),F=(S=d.unref(m))!=null?S:mF;return{name:"arrow",enabled:!wk(I),options:{element:I,padding:F}}}),f=d.computed(()=>({onFirstUpdate:()=>{B()},...fF(x,[d.unref(g),d.unref(p)])})),v=d.computed(()=>AF(x.referenceEl)||d.unref(b)),{attributes:A,state:y,styles:w,update:B,forceUpdate:P,instanceRef:E}=$2(v,l,f);return d.watch(E,S=>T.value=S),d.onMounted(()=>{d.watch(()=>{var S;return(S=d.unref(v))==null?void 0:S.getBoundingClientRect()},()=>{B()})}),{attributes:A,arrowRef:_,contentRef:l,instanceRef:E,state:y,styles:w,role:M,forceUpdate:P,update:B}},_F=(x,{attributes:T,styles:l,role:b})=>{const{nextZIndex:M}=aI(),_=ei("popper"),m=d.computed(()=>d.unref(T).popper),p=d.ref(oi(x.zIndex)?x.zIndex:M()),g=d.computed(()=>[_.b(),_.is("pure",x.pure),_.is(x.effect),x.popperClass]),f=d.computed(()=>[{zIndex:d.unref(p)},d.unref(l).popper,x.popperStyle||{}]),v=d.computed(()=>b.value==="dialog"?"false":void 0),A=d.computed(()=>d.unref(l).arrow||{});return{ariaModal:v,arrowStyle:A,contentAttrs:m,contentClass:g,contentStyle:f,contentZIndex:p,updateZIndex:()=>{p.value=oi(x.zIndex)?x.zIndex:M()}}},yF=(x,T)=>{const l=d.ref(!1),b=d.ref();return{focusStartRef:b,trapped:l,onFocusAfterReleased:f=>{var v;((v=f.detail)==null?void 0:v.focusReason)!=="pointer"&&(b.value="first",T("blur"))},onFocusAfterTrapped:()=>{T("focus")},onFocusInTrap:f=>{x.visible&&!l.value&&(f.target&&(b.value=f.target),l.value=!0)},onFocusoutPrevented:f=>{x.trapping||(f.detail.focusReason==="pointer"&&f.preventDefault(),l.value=!1)},onReleaseRequested:()=>{l.value=!1,T("close")}}},bF=d.defineComponent({name:"ElPopperContent"}),wF=d.defineComponent({...bF,props:ay,emits:dF,setup(x,{expose:T,emit:l}){const b=x,{focusStartRef:M,trapped:_,onFocusAfterReleased:m,onFocusAfterTrapped:p,onFocusInTrap:g,onFocusoutPrevented:f,onReleaseRequested:v}=yF(b,l),{attributes:A,arrowRef:y,contentRef:w,styles:B,instanceRef:P,role:E,update:S}=gF(b),{ariaModal:I,arrowStyle:F,contentAttrs:N,contentClass:O,contentStyle:V,updateZIndex:G}=_F(b,{styles:B,attributes:A,role:E}),U=d.inject(Ru,void 0),j=d.ref();d.provide(K0,{arrowStyle:F,arrowRef:y,arrowOffset:j}),U&&d.provide(Ru,{...U,addInputId:yu,removeInputId:yu});let K;const $=(L=!0)=>{S(),L&&G()},W=()=>{$(!1),b.visible&&b.focusOnShow?_.value=!0:b.visible===!1&&(_.value=!1)};return d.onMounted(()=>{d.watch(()=>b.triggerTargetEl,(L,z)=>{K==null||K(),K=void 0;const H=d.unref(L||w.value),Z=d.unref(z||w.value);Ua(H)&&(K=d.watch([E,()=>b.ariaLabel,I,()=>b.id],ee=>{["role","aria-label","aria-modal","id"].forEach((de,Y)=>{to(ee[Y])?H.removeAttribute(de):H.setAttribute(de,ee[Y])})},{immediate:!0})),Z!==H&&Ua(Z)&&["role","aria-label","aria-modal","id"].forEach(ee=>{Z.removeAttribute(ee)})},{immediate:!0}),d.watch(()=>b.visible,W,{immediate:!0})}),d.onBeforeUnmount(()=>{K==null||K(),K=void 0}),T({popperContentRef:w,popperInstanceRef:P,updatePopper:$,contentStyle:V}),(L,z)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps({ref_key:"contentRef",ref:w},d.unref(N),{style:d.unref(V),class:d.unref(O),tabindex:"-1",onMouseenter:H=>L.$emit("mouseenter",H),onMouseleave:H=>L.$emit("mouseleave",H)}),[d.createVNode(d.unref(uF),{trapped:d.unref(_),"trap-on-focus-in":!0,"focus-trap-el":d.unref(w),"focus-start-el":d.unref(M),onFocusAfterTrapped:d.unref(p),onFocusAfterReleased:d.unref(m),onFocusin:d.unref(g),onFocusoutPrevented:d.unref(f),onReleaseRequested:d.unref(v)},{default:d.withCtx(()=>[d.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var BF=ti(wF,[["__file","content.vue"]]);const CF=Vn(QI),kA=Symbol("elTooltip"),IA=mi({...tI,...ay,appendTo:{type:Ur([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Ur(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Hs(["ariaLabel"])}),ly=mi({...Z0,disabled:Boolean,trigger:{type:Ur([String,Array]),default:"hover"},triggerKeys:{type:Ur(Array),default:()=>[us.enter,us.space]}}),{useModelToggleProps:xF,useModelToggleEmits:PF,useModelToggle:EF}=d0("visible"),MF=mi({...X0,...xF,...IA,...ly,...$0,showArrow:{type:Boolean,default:!0}}),SF=[...PF,"before-show","before-hide","show","hide","open","close"],TF=(x,T)=>Yn(x)?x.includes(T):x===T,El=(x,T,l)=>b=>{TF(d.unref(x),T)&&l(b)},kF=d.defineComponent({name:"ElTooltipTrigger"}),IF=d.defineComponent({...kF,props:ly,setup(x,{expose:T}){const l=x,b=ei("tooltip"),{controlled:M,id:_,open:m,onOpen:p,onClose:g,onToggle:f}=d.inject(kA,void 0),v=d.ref(null),A=()=>{if(d.unref(M)||l.disabled)return!0},y=d.toRef(l,"trigger"),w=Eo(A,El(y,"hover",p)),B=Eo(A,El(y,"hover",g)),P=Eo(A,El(y,"click",N=>{N.button===0&&f(N)})),E=Eo(A,El(y,"focus",p)),S=Eo(A,El(y,"focus",g)),I=Eo(A,El(y,"contextmenu",N=>{N.preventDefault(),f(N)})),F=Eo(A,N=>{const{code:O}=N;l.triggerKeys.includes(O)&&(N.preventDefault(),f(N))});return T({triggerRef:v}),(N,O)=>(d.openBlock(),d.createBlock(d.unref(YI),{id:d.unref(_),"virtual-ref":N.virtualRef,open:d.unref(m),"virtual-triggering":N.virtualTriggering,class:d.normalizeClass(d.unref(b).e("trigger")),onBlur:d.unref(S),onClick:d.unref(P),onContextmenu:d.unref(I),onFocus:d.unref(E),onMouseenter:d.unref(w),onMouseleave:d.unref(B),onKeydown:d.unref(F)},{default:d.withCtx(()=>[d.renderSlot(N.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var FF=ti(IF,[["__file","trigger.vue"]]);const DF=mi({to:{type:Ur([String,Object]),required:!0},disabled:Boolean});var RF=ti(d.defineComponent({__name:"teleport",props:DF,setup(x){return(T,l)=>T.disabled?d.renderSlot(T.$slots,"default",{key:0}):(d.openBlock(),d.createBlock(d.Teleport,{key:1,to:T.to},[d.renderSlot(T.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const LF=Vn(RF),OF=d.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),NF=d.defineComponent({...OF,props:IA,setup(x,{expose:T}){const l=x,{selector:b}=N0(),M=ei("tooltip"),_=d.ref(null);let m;const{controlled:p,id:g,open:f,trigger:v,onClose:A,onOpen:y,onShow:w,onHide:B,onBeforeShow:P,onBeforeHide:E}=d.inject(kA,void 0),S=d.computed(()=>l.transition||`${M.namespace.value}-fade-in-linear`),I=d.computed(()=>process.env.NODE_ENV==="test"?!0:l.persistent);d.onBeforeUnmount(()=>{m==null||m()});const F=d.computed(()=>d.unref(I)?!0:d.unref(f)),N=d.computed(()=>l.disabled?!1:d.unref(f)),O=d.computed(()=>l.appendTo||b.value),V=d.computed(()=>{var Z;return(Z=l.style)!=null?Z:{}}),G=d.computed(()=>!d.unref(f)),U=()=>{B()},j=()=>{if(d.unref(p))return!0},K=Eo(j,()=>{l.enterable&&d.unref(v)==="hover"&&y()}),$=Eo(j,()=>{d.unref(v)==="hover"&&A()}),W=()=>{var Z,ee;(ee=(Z=_.value)==null?void 0:Z.updatePopper)==null||ee.call(Z),P==null||P()},L=()=>{E==null||E()},z=()=>{w(),m=yE(d.computed(()=>{var Z;return(Z=_.value)==null?void 0:Z.popperContentRef}),()=>{if(d.unref(p))return;d.unref(v)!=="hover"&&A()})},H=()=>{l.virtualTriggering||A()};return d.watch(()=>d.unref(f),Z=>{Z||m==null||m()},{flush:"post"}),d.watch(()=>l.content,()=>{var Z,ee;(ee=(Z=_.value)==null?void 0:Z.updatePopper)==null||ee.call(Z)}),T({contentRef:_}),(Z,ee)=>(d.openBlock(),d.createBlock(d.unref(LF),{disabled:!Z.teleported,to:d.unref(O)},{default:d.withCtx(()=>[d.createVNode(d.Transition,{name:d.unref(S),onAfterLeave:U,onBeforeEnter:W,onAfterEnter:z,onBeforeLeave:L},{default:d.withCtx(()=>[d.unref(F)?d.withDirectives((d.openBlock(),d.createBlock(d.unref(BF),d.mergeProps({key:0,id:d.unref(g),ref_key:"contentRef",ref:_},Z.$attrs,{"aria-label":Z.ariaLabel,"aria-hidden":d.unref(G),"boundaries-padding":Z.boundariesPadding,"fallback-placements":Z.fallbackPlacements,"gpu-acceleration":Z.gpuAcceleration,offset:Z.offset,placement:Z.placement,"popper-options":Z.popperOptions,strategy:Z.strategy,effect:Z.effect,enterable:Z.enterable,pure:Z.pure,"popper-class":Z.popperClass,"popper-style":[Z.popperStyle,d.unref(V)],"reference-el":Z.referenceEl,"trigger-target-el":Z.triggerTargetEl,visible:d.unref(N),"z-index":Z.zIndex,onMouseenter:d.unref(K),onMouseleave:d.unref($),onBlur:H,onClose:d.unref(A)}),{default:d.withCtx(()=>[d.renderSlot(Z.$slots,"default")]),_: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"])),[[d.vShow,d.unref(N)]]):d.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var UF=ti(NF,[["__file","content.vue"]]);const jF=d.defineComponent({name:"ElTooltip"}),VF=d.defineComponent({...jF,props:MF,emits:SF,setup(x,{expose:T,emit:l}){const b=x;eI();const M=Du(),_=d.ref(),m=d.ref(),p=()=>{var S;const I=d.unref(_);I&&((S=I.popperInstanceRef)==null||S.update())},g=d.ref(!1),f=d.ref(),{show:v,hide:A,hasUpdateHandler:y}=EF({indicator:g,toggleReason:f}),{onOpen:w,onClose:B}=rI({showAfter:d.toRef(b,"showAfter"),hideAfter:d.toRef(b,"hideAfter"),autoClose:d.toRef(b,"autoClose"),open:v,close:A}),P=d.computed(()=>js(b.visible)&&!y.value);d.provide(kA,{controlled:P,id:M,open:d.readonly(g),trigger:d.toRef(b,"trigger"),onOpen:S=>{w(S)},onClose:S=>{B(S)},onToggle:S=>{d.unref(g)?B(S):w(S)},onShow:()=>{l("show",f.value)},onHide:()=>{l("hide",f.value)},onBeforeShow:()=>{l("before-show",f.value)},onBeforeHide:()=>{l("before-hide",f.value)},updatePopper:p}),d.watch(()=>b.disabled,S=>{S&&g.value&&(g.value=!1)});const E=S=>{var I,F;const N=(F=(I=m.value)==null?void 0:I.contentRef)==null?void 0:F.popperContentRef,O=(S==null?void 0:S.relatedTarget)||document.activeElement;return N&&N.contains(O)};return d.onDeactivated(()=>g.value&&A()),T({popperRef:_,contentRef:m,isFocusInsideContent:E,updatePopper:p,onOpen:w,onClose:B,hide:A}),(S,I)=>(d.openBlock(),d.createBlock(d.unref(CF),{ref_key:"popperRef",ref:_,role:S.role},{default:d.withCtx(()=>[d.createVNode(FF,{disabled:S.disabled,trigger:S.trigger,"trigger-keys":S.triggerKeys,"virtual-ref":S.virtualRef,"virtual-triggering":S.virtualTriggering},{default:d.withCtx(()=>[S.$slots.default?d.renderSlot(S.$slots,"default",{key:0}):d.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),d.createVNode(UF,{ref_key:"contentRef",ref:m,"aria-label":S.ariaLabel,"boundaries-padding":S.boundariesPadding,content:S.content,disabled:S.disabled,effect:S.effect,enterable:S.enterable,"fallback-placements":S.fallbackPlacements,"hide-after":S.hideAfter,"gpu-acceleration":S.gpuAcceleration,offset:S.offset,persistent:S.persistent,"popper-class":S.popperClass,"popper-style":S.popperStyle,placement:S.placement,"popper-options":S.popperOptions,pure:S.pure,"raw-content":S.rawContent,"reference-el":S.referenceEl,"trigger-target-el":S.triggerTargetEl,"show-after":S.showAfter,strategy:S.strategy,teleported:S.teleported,transition:S.transition,"virtual-triggering":S.virtualTriggering,"z-index":S.zIndex,"append-to":S.appendTo},{default:d.withCtx(()=>[d.renderSlot(S.$slots,"content",{},()=>[S.rawContent?(d.openBlock(),d.createElementBlock("span",{key:0,innerHTML:S.content},null,8,["innerHTML"])):(d.openBlock(),d.createElementBlock("span",{key:1},d.toDisplayString(S.content),1))]),S.showArrow?(d.openBlock(),d.createBlock(d.unref(WI),{key:0,"arrow-offset":S.arrowOffset},null,8,["arrow-offset"])):d.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 HF=ti(VF,[["__file","tooltip.vue"]]);const FA=Vn(HF),da=new Map;if(Bn){let x;document.addEventListener("mousedown",T=>x=T),document.addEventListener("mouseup",T=>{if(x){for(const l of da.values())for(const{documentHandler:b}of l)b(T,x);x=void 0}})}function uy(x,T){let l=[];return Array.isArray(T.arg)?l=T.arg:Ua(T.arg)&&l.push(T.arg),function(b,M){const _=T.instance.popperRef,m=b.target,p=M==null?void 0:M.target,g=!T||!T.instance,f=!m||!p,v=x.contains(m)||x.contains(p),A=x===m,y=l.length&&l.some(B=>B==null?void 0:B.contains(m))||l.length&&l.includes(p),w=_&&(_.contains(m)||_.contains(p));g||f||v||A||y||w||T.value(b,M)}}const QF={beforeMount(x,T){da.has(x)||da.set(x,[]),da.get(x).push({documentHandler:uy(x,T),bindingFn:T.value})},updated(x,T){da.has(x)||da.set(x,[]);const l=da.get(x),b=l.findIndex(_=>_.bindingFn===T.oldValue),M={documentHandler:uy(x,T),bindingFn:T.value};b>=0?l.splice(b,1,M):l.push(M)},unmounted(x){da.delete(x)}},zF=100,GF=600,cy={beforeMount(x,T){const l=T.value,{interval:b=zF,delay:M=GF}=en(l)?{}:l;let _,m;const p=()=>en(l)?l():l.handler(),g=()=>{m&&(clearTimeout(m),m=void 0),_&&(clearInterval(_),_=void 0)};x.addEventListener("mousedown",f=>{f.button===0&&(g(),p(),document.addEventListener("mouseup",()=>g(),{once:!0}),m=setTimeout(()=>{_=setInterval(()=>{p()},b)},M))})}},hy={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Lo,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Hs(["ariaControls"])},dy={[gi]:x=>cn(x)||oi(x)||js(x),change:x=>cn(x)||oi(x)||js(x)},Ml=Symbol("checkboxGroupContextKey"),WF=({model:x,isChecked:T})=>{const l=d.inject(Ml,void 0),b=d.computed(()=>{var _,m;const p=(_=l==null?void 0:l.max)==null?void 0:_.value,g=(m=l==null?void 0:l.min)==null?void 0:m.value;return!bs(p)&&x.value.length>=p&&!T.value||!bs(g)&&x.value.length<=g&&T.value});return{isDisabled:Lu(d.computed(()=>(l==null?void 0:l.disabled.value)||b.value)),isLimitDisabled:b}},KF=(x,{model:T,isLimitExceeded:l,hasOwnLabel:b,isDisabled:M,isLabeledByFormItem:_})=>{const m=d.inject(Ml,void 0),{formItem:p}=No(),{emit:g}=d.getCurrentInstance();function f(B){var P,E,S,I;return[!0,x.trueValue,x.trueLabel].includes(B)?(E=(P=x.trueValue)!=null?P:x.trueLabel)!=null?E:!0:(I=(S=x.falseValue)!=null?S:x.falseLabel)!=null?I:!1}function v(B,P){g("change",f(B),P)}function A(B){if(l.value)return;const P=B.target;g("change",f(P.checked),B)}async function y(B){l.value||!b.value&&!M.value&&_.value&&(B.composedPath().some(S=>S.tagName==="LABEL")||(T.value=f([!1,x.falseValue,x.falseLabel].includes(T.value)),await d.nextTick(),v(T.value,B)))}const w=d.computed(()=>(m==null?void 0:m.validateEvent)||x.validateEvent);return d.watch(()=>x.modelValue,()=>{w.value&&(p==null||p.validate("change").catch(B=>Pi(B)))}),{handleChange:A,onClickRoot:y}},XF=x=>{const T=d.ref(!1),{emit:l}=d.getCurrentInstance(),b=d.inject(Ml,void 0),M=d.computed(()=>bs(b)===!1),_=d.ref(!1),m=d.computed({get(){var p,g;return M.value?(p=b==null?void 0:b.modelValue)==null?void 0:p.value:(g=x.modelValue)!=null?g:T.value},set(p){var g,f;M.value&&Yn(p)?(_.value=((g=b==null?void 0:b.max)==null?void 0:g.value)!==void 0&&p.length>(b==null?void 0:b.max.value)&&p.length>m.value.length,_.value===!1&&((f=b==null?void 0:b.changeEvent)==null||f.call(b,p))):(l(gi,p),T.value=p)}});return{model:m,isGroup:M,isLimitExceeded:_}},$F=(x,T,{model:l})=>{const b=d.inject(Ml,void 0),M=d.ref(!1),_=d.computed(()=>ml(x.value)?x.label:x.value),m=d.computed(()=>{const v=l.value;return js(v)?v:Yn(v)?jn(_.value)?v.map(d.toRaw).some(A=>dh(A,_.value)):v.map(d.toRaw).includes(_.value):v!=null?v===x.trueValue||v===x.trueLabel:!!v}),p=Oo(d.computed(()=>{var v;return(v=b==null?void 0:b.size)==null?void 0:v.value}),{prop:!0}),g=Oo(d.computed(()=>{var v;return(v=b==null?void 0:b.size)==null?void 0:v.value})),f=d.computed(()=>!!T.default||!ml(_.value));return{checkboxButtonSize:p,isChecked:m,isFocused:M,checkboxSize:g,hasOwnLabel:f,actualValue:_}},fy=(x,T)=>{const{formItem:l}=No(),{model:b,isGroup:M,isLimitExceeded:_}=XF(x),{isFocused:m,isChecked:p,checkboxButtonSize:g,checkboxSize:f,hasOwnLabel:v,actualValue:A}=$F(x,T,{model:b}),{isDisabled:y}=WF({model:b,isChecked:p}),{inputId:w,isLabeledByFormItem:B}=Ha(x,{formItemContext:l,disableIdGeneration:v,disableIdManagement:M}),{handleChange:P,onClickRoot:E}=KF(x,{model:b,isLimitExceeded:_,hasOwnLabel:v,isDisabled:y,isLabeledByFormItem:B});return(()=>{function I(){var F,N;Yn(b.value)&&!b.value.includes(A.value)?b.value.push(A.value):b.value=(N=(F=x.trueValue)!=null?F:x.trueLabel)!=null?N:!0}x.checked&&I()})(),vh({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>M.value&&ml(x.value))),vh({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>!!x.trueLabel)),vh({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},d.computed(()=>!!x.falseLabel)),{inputId:w,isLabeledByFormItem:B,isChecked:p,isDisabled:y,isFocused:m,checkboxButtonSize:g,checkboxSize:f,hasOwnLabel:v,model:b,actualValue:A,handleChange:P,onClickRoot:E}},YF=d.defineComponent({name:"ElCheckbox"}),JF=d.defineComponent({...YF,props:hy,emits:dy,setup(x){const T=x,l=d.useSlots(),{inputId:b,isLabeledByFormItem:M,isChecked:_,isDisabled:m,isFocused:p,checkboxSize:g,hasOwnLabel:f,model:v,actualValue:A,handleChange:y,onClickRoot:w}=fy(T,l),B=ei("checkbox"),P=d.computed(()=>[B.b(),B.m(g.value),B.is("disabled",m.value),B.is("bordered",T.border),B.is("checked",_.value)]),E=d.computed(()=>[B.e("input"),B.is("disabled",m.value),B.is("checked",_.value),B.is("indeterminate",T.indeterminate),B.is("focus",p.value)]);return(S,I)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(!d.unref(f)&&d.unref(M)?"span":"label"),{class:d.normalizeClass(d.unref(P)),"aria-controls":S.indeterminate?S.ariaControls:null,onClick:d.unref(w)},{default:d.withCtx(()=>{var F,N;return[d.createElementVNode("span",{class:d.normalizeClass(d.unref(E))},[S.trueValue||S.falseValue||S.trueLabel||S.falseLabel?d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:0,id:d.unref(b),"onUpdate:modelValue":O=>d.isRef(v)?v.value=O:null,class:d.normalizeClass(d.unref(B).e("original")),type:"checkbox",indeterminate:S.indeterminate,name:S.name,tabindex:S.tabindex,disabled:d.unref(m),"true-value":(F=S.trueValue)!=null?F:S.trueLabel,"false-value":(N=S.falseValue)!=null?N:S.falseLabel,onChange:d.unref(y),onFocus:O=>p.value=!0,onBlur:O=>p.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(v)]]):d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:1,id:d.unref(b),"onUpdate:modelValue":O=>d.isRef(v)?v.value=O:null,class:d.normalizeClass(d.unref(B).e("original")),type:"checkbox",indeterminate:S.indeterminate,disabled:d.unref(m),value:d.unref(A),name:S.name,tabindex:S.tabindex,onChange:d.unref(y),onFocus:O=>p.value=!0,onBlur:O=>p.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(v)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(B).e("inner"))},null,2)],2),d.unref(f)?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(B).e("label"))},[d.renderSlot(S.$slots,"default"),S.$slots.default?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createTextVNode(d.toDisplayString(S.label),1)],64))],2)):d.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var ZF=ti(JF,[["__file","checkbox.vue"]]);const qF=d.defineComponent({name:"ElCheckboxButton"}),eD=d.defineComponent({...qF,props:hy,emits:dy,setup(x){const T=x,l=d.useSlots(),{isFocused:b,isChecked:M,isDisabled:_,checkboxButtonSize:m,model:p,actualValue:g,handleChange:f}=fy(T,l),v=d.inject(Ml,void 0),A=ei("checkbox"),y=d.computed(()=>{var B,P,E,S;const I=(P=(B=v==null?void 0:v.fill)==null?void 0:B.value)!=null?P:"";return{backgroundColor:I,borderColor:I,color:(S=(E=v==null?void 0:v.textColor)==null?void 0:E.value)!=null?S:"",boxShadow:I?`-1px 0 0 0 ${I}`:void 0}}),w=d.computed(()=>[A.b("button"),A.bm("button",m.value),A.is("disabled",_.value),A.is("checked",M.value),A.is("focus",b.value)]);return(B,P)=>{var E,S;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass(d.unref(w))},[B.trueValue||B.falseValue||B.trueLabel||B.falseLabel?d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:0,"onUpdate:modelValue":I=>d.isRef(p)?p.value=I:null,class:d.normalizeClass(d.unref(A).be("button","original")),type:"checkbox",name:B.name,tabindex:B.tabindex,disabled:d.unref(_),"true-value":(E=B.trueValue)!=null?E:B.trueLabel,"false-value":(S=B.falseValue)!=null?S:B.falseLabel,onChange:d.unref(f),onFocus:I=>b.value=!0,onBlur:I=>b.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(p)]]):d.withDirectives((d.openBlock(),d.createElementBlock("input",{key:1,"onUpdate:modelValue":I=>d.isRef(p)?p.value=I:null,class:d.normalizeClass(d.unref(A).be("button","original")),type:"checkbox",name:B.name,tabindex:B.tabindex,disabled:d.unref(_),value:d.unref(g),onChange:d.unref(f),onFocus:I=>b.value=!0,onBlur:I=>b.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[d.vModelCheckbox,d.unref(p)]]),B.$slots.default||B.label?(d.openBlock(),d.createElementBlock("span",{key:2,class:d.normalizeClass(d.unref(A).be("button","inner")),style:d.normalizeStyle(d.unref(M)?d.unref(y):void 0)},[d.renderSlot(B.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(B.label),1)])],6)):d.createCommentVNode("v-if",!0)],2)}}});var Ay=ti(eD,[["__file","checkbox-button.vue"]]);const tD=mi({modelValue:{type:Ur(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Lo,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),rD={[gi]:x=>Yn(x),change:x=>Yn(x)},iD=d.defineComponent({name:"ElCheckboxGroup"}),nD=d.defineComponent({...iD,props:tD,emits:rD,setup(x,{emit:T}){const l=x,b=ei("checkbox"),{formItem:M}=No(),{inputId:_,isLabeledByFormItem:m}=Ha(l,{formItemContext:M}),p=async f=>{T(gi,f),await d.nextTick(),T("change",f)},g=d.computed({get(){return l.modelValue},set(f){p(f)}});return d.provide(Ml,{...a0(d.toRefs(l),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:g,changeEvent:p}),d.watch(()=>l.modelValue,()=>{l.validateEvent&&(M==null||M.validate("change").catch(f=>Pi(f)))}),(f,v)=>{var A;return d.openBlock(),d.createBlock(d.resolveDynamicComponent(f.tag),{id:d.unref(_),class:d.normalizeClass(d.unref(b).b("group")),role:"group","aria-label":d.unref(m)?void 0:f.ariaLabel||"checkbox-group","aria-labelledby":d.unref(m)?(A=d.unref(M))==null?void 0:A.labelId:void 0},{default:d.withCtx(()=>[d.renderSlot(f.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var py=ti(nD,[["__file","checkbox-group.vue"]]);const vy=Vn(ZF,{CheckboxButton:Ay,CheckboxGroup:py});gl(Ay);const sD=gl(py),my=mi({modelValue:{type:[String,Number,Boolean],default:void 0},size:Lo,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),oD=mi({...my,border:Boolean}),gy={[gi]:x=>cn(x)||oi(x)||js(x),[ro]:x=>cn(x)||oi(x)||js(x)},_y=Symbol("radioGroupKey"),yy=(x,T)=>{const l=d.ref(),b=d.inject(_y,void 0),M=d.computed(()=>!!b),_=d.computed(()=>ml(x.value)?x.label:x.value),m=d.computed({get(){return M.value?b.modelValue:x.modelValue},set(A){M.value?b.changeEvent(A):T&&T(gi,A),l.value.checked=x.modelValue===_.value}}),p=Oo(d.computed(()=>b==null?void 0:b.size)),g=Lu(d.computed(()=>b==null?void 0:b.disabled)),f=d.ref(!1),v=d.computed(()=>g.value||M.value&&m.value!==_.value?-1:0);return vh({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},d.computed(()=>M.value&&ml(x.value))),{radioRef:l,isGroup:M,radioGroup:b,focus:f,size:p,disabled:g,tabIndex:v,modelValue:m,actualValue:_}},aD=d.defineComponent({name:"ElRadio"}),lD=d.defineComponent({...aD,props:oD,emits:gy,setup(x,{emit:T}){const l=x,b=ei("radio"),{radioRef:M,radioGroup:_,focus:m,size:p,disabled:g,modelValue:f,actualValue:v}=yy(l,T);function A(){d.nextTick(()=>T("change",f.value))}return(y,w)=>{var B;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass([d.unref(b).b(),d.unref(b).is("disabled",d.unref(g)),d.unref(b).is("focus",d.unref(m)),d.unref(b).is("bordered",y.border),d.unref(b).is("checked",d.unref(f)===d.unref(v)),d.unref(b).m(d.unref(p))])},[d.createElementVNode("span",{class:d.normalizeClass([d.unref(b).e("input"),d.unref(b).is("disabled",d.unref(g)),d.unref(b).is("checked",d.unref(f)===d.unref(v))])},[d.withDirectives(d.createElementVNode("input",{ref_key:"radioRef",ref:M,"onUpdate:modelValue":P=>d.isRef(f)?f.value=P:null,class:d.normalizeClass(d.unref(b).e("original")),value:d.unref(v),name:y.name||((B=d.unref(_))==null?void 0:B.name),disabled:d.unref(g),checked:d.unref(f)===d.unref(v),type:"radio",onFocus:P=>m.value=!0,onBlur:P=>m.value=!1,onChange:A,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[d.vModelRadio,d.unref(f)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(b).e("inner"))},null,2)],2),d.createElementVNode("span",{class:d.normalizeClass(d.unref(b).e("label")),onKeydown:d.withModifiers(()=>{},["stop"])},[d.renderSlot(y.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(y.label),1)])],42,["onKeydown"])],2)}}});var uD=ti(lD,[["__file","radio.vue"]]);const cD=mi({...my}),hD=d.defineComponent({name:"ElRadioButton"}),dD=d.defineComponent({...hD,props:cD,setup(x){const T=x,l=ei("radio"),{radioRef:b,focus:M,size:_,disabled:m,modelValue:p,radioGroup:g,actualValue:f}=yy(T),v=d.computed(()=>({backgroundColor:(g==null?void 0:g.fill)||"",borderColor:(g==null?void 0:g.fill)||"",boxShadow:g!=null&&g.fill?`-1px 0 0 0 ${g.fill}`:"",color:(g==null?void 0:g.textColor)||""}));return(A,y)=>{var w;return d.openBlock(),d.createElementBlock("label",{class:d.normalizeClass([d.unref(l).b("button"),d.unref(l).is("active",d.unref(p)===d.unref(f)),d.unref(l).is("disabled",d.unref(m)),d.unref(l).is("focus",d.unref(M)),d.unref(l).bm("button",d.unref(_))])},[d.withDirectives(d.createElementVNode("input",{ref_key:"radioRef",ref:b,"onUpdate:modelValue":B=>d.isRef(p)?p.value=B:null,class:d.normalizeClass(d.unref(l).be("button","original-radio")),value:d.unref(f),type:"radio",name:A.name||((w=d.unref(g))==null?void 0:w.name),disabled:d.unref(m),onFocus:B=>M.value=!0,onBlur:B=>M.value=!1,onClick:d.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[d.vModelRadio,d.unref(p)]]),d.createElementVNode("span",{class:d.normalizeClass(d.unref(l).be("button","inner")),style:d.normalizeStyle(d.unref(p)===d.unref(f)?d.unref(v):{}),onKeydown:d.withModifiers(()=>{},["stop"])},[d.renderSlot(A.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(A.label),1)])],46,["onKeydown"])],2)}}});var by=ti(dD,[["__file","radio-button.vue"]]);const fD=mi({id:{type:String,default:void 0},size:Lo,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),AD=gy,pD=d.defineComponent({name:"ElRadioGroup"}),vD=d.defineComponent({...pD,props:fD,emits:AD,setup(x,{emit:T}){const l=x,b=ei("radio"),M=Du(),_=d.ref(),{formItem:m}=No(),{inputId:p,isLabeledByFormItem:g}=Ha(l,{formItemContext:m}),f=A=>{T(gi,A),d.nextTick(()=>T("change",A))};d.onMounted(()=>{const A=_.value.querySelectorAll("[type=radio]"),y=A[0];!Array.from(A).some(w=>w.checked)&&y&&(y.tabIndex=0)});const v=d.computed(()=>l.name||M.value);return d.provide(_y,d.reactive({...d.toRefs(l),changeEvent:f,name:v})),d.watch(()=>l.modelValue,()=>{l.validateEvent&&(m==null||m.validate("change").catch(A=>Pi(A)))}),(A,y)=>(d.openBlock(),d.createElementBlock("div",{id:d.unref(p),ref_key:"radioGroupRef",ref:_,class:d.normalizeClass(d.unref(b).b("group")),role:"radiogroup","aria-label":d.unref(g)?void 0:A.ariaLabel||"radio-group","aria-labelledby":d.unref(g)?d.unref(m).labelId:void 0},[d.renderSlot(A.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var wy=ti(vD,[["__file","radio-group.vue"]]);const mD=Vn(uD,{RadioButton:by,RadioGroup:wy}),gD=gl(wy);gl(by);const DA=mi({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:uA},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),_D={close:x=>x instanceof MouseEvent,click:x=>x instanceof MouseEvent},yD=d.defineComponent({name:"ElTag"}),bD=d.defineComponent({...yD,props:DA,emits:_D,setup(x,{emit:T}){const l=x,b=Oo(),M=ei("tag"),_=d.computed(()=>{const{type:g,hit:f,effect:v,closable:A,round:y}=l;return[M.b(),M.is("closable",A),M.m(g||"primary"),M.m(b.value),M.m(v),M.is("hit",f),M.is("round",y)]}),m=g=>{T("close",g)},p=g=>{T("click",g)};return(g,f)=>g.disableTransitions?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(_)),style:d.normalizeStyle({backgroundColor:g.color}),onClick:p},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(M).e("content"))},[d.renderSlot(g.$slots,"default")],2),g.closable?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(M).e("close")),onClick:d.withModifiers(m,["stop"])},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Close))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0)],6)):(d.openBlock(),d.createBlock(d.Transition,{key:1,name:`${d.unref(M).namespace.value}-zoom-in-center`,appear:""},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(d.unref(_)),style:d.normalizeStyle({backgroundColor:g.color}),onClick:p},[d.createElementVNode("span",{class:d.normalizeClass(d.unref(M).e("content"))},[d.renderSlot(g.$slots,"default")],2),g.closable?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(M).e("close")),onClick:d.withModifiers(m,["stop"])},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Close))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var wD=ti(bD,[["__file","tag.vue"]]);const BD=Vn(wD),CD=d.defineComponent({name:"ElCollapseTransition"}),xD=d.defineComponent({...CD,setup(x){const T=ei("collapse-transition"),l=M=>{M.style.maxHeight="",M.style.overflow=M.dataset.oldOverflow,M.style.paddingTop=M.dataset.oldPaddingTop,M.style.paddingBottom=M.dataset.oldPaddingBottom},b={beforeEnter(M){M.dataset||(M.dataset={}),M.dataset.oldPaddingTop=M.style.paddingTop,M.dataset.oldPaddingBottom=M.style.paddingBottom,M.style.height&&(M.dataset.elExistsHeight=M.style.height),M.style.maxHeight=0,M.style.paddingTop=0,M.style.paddingBottom=0},enter(M){requestAnimationFrame(()=>{M.dataset.oldOverflow=M.style.overflow,M.dataset.elExistsHeight?M.style.maxHeight=M.dataset.elExistsHeight:M.scrollHeight!==0?M.style.maxHeight=`${M.scrollHeight}px`:M.style.maxHeight=0,M.style.paddingTop=M.dataset.oldPaddingTop,M.style.paddingBottom=M.dataset.oldPaddingBottom,M.style.overflow="hidden"})},afterEnter(M){M.style.maxHeight="",M.style.overflow=M.dataset.oldOverflow},enterCancelled(M){l(M)},beforeLeave(M){M.dataset||(M.dataset={}),M.dataset.oldPaddingTop=M.style.paddingTop,M.dataset.oldPaddingBottom=M.style.paddingBottom,M.dataset.oldOverflow=M.style.overflow,M.style.maxHeight=`${M.scrollHeight}px`,M.style.overflow="hidden"},leave(M){M.scrollHeight!==0&&(M.style.maxHeight=0,M.style.paddingTop=0,M.style.paddingBottom=0)},afterLeave(M){l(M)},leaveCancelled(M){l(M)}};return(M,_)=>(d.openBlock(),d.createBlock(d.Transition,d.mergeProps({name:d.unref(T).b()},d.toHandlers(b)),{default:d.withCtx(()=>[d.renderSlot(M.$slots,"default")]),_:3},16,["name"]))}});var PD=ti(xD,[["__file","collapse-transition.vue"]]);const ED=Vn(PD),MD=mi({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Lo,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:x=>x===null||oi(x)||["min","max"].includes(x),default:null},name:String,placeholder:String,precision:{type:Number,validator:x=>x>=0&&x===Number.parseInt(`${x}`,10)},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),SD={[ro]:(x,T)=>T!==x,blur:x=>x instanceof FocusEvent,focus:x=>x instanceof FocusEvent,[io]:x=>oi(x)||to(x),[gi]:x=>oi(x)||to(x)},TD=d.defineComponent({name:"ElInputNumber"}),kD=d.defineComponent({...TD,props:MD,emits:SD,setup(x,{expose:T,emit:l}){const b=x,{t:M}=mh(),_=ei("input-number"),m=d.ref(),p=d.reactive({currentValue:b.modelValue,userInput:null}),{formItem:g}=No(),f=d.computed(()=>oi(b.modelValue)&&b.modelValue<=b.min),v=d.computed(()=>oi(b.modelValue)&&b.modelValue>=b.max),A=d.computed(()=>{const H=S(b.step);return bs(b.precision)?Math.max(S(b.modelValue),H):(H>b.precision&&Pi("InputNumber","precision should not be less than the decimal places of step"),b.precision)}),y=d.computed(()=>b.controls&&b.controlsPosition==="right"),w=Oo(),B=Lu(),P=d.computed(()=>{if(p.userInput!==null)return p.userInput;let H=p.currentValue;if(to(H))return"";if(oi(H)){if(Number.isNaN(H))return"";bs(b.precision)||(H=H.toFixed(b.precision))}return H}),E=(H,Z)=>{if(bs(Z)&&(Z=A.value),Z===0)return Math.round(H);let ee=String(H);const de=ee.indexOf(".");if(de===-1||!ee.replace(".","").split("")[de+Z])return H;const Ie=ee.length;return ee.charAt(Ie-1)==="5"&&(ee=`${ee.slice(0,Math.max(0,Ie-1))}6`),Number.parseFloat(Number(ee).toFixed(Z))},S=H=>{if(to(H))return 0;const Z=H.toString(),ee=Z.indexOf(".");let de=0;return ee!==-1&&(de=Z.length-ee-1),de},I=(H,Z=1)=>oi(H)?E(H+b.step*Z):p.currentValue,F=()=>{if(b.readonly||B.value||v.value)return;const H=Number(P.value)||0,Z=I(H);V(Z),l(io,p.currentValue),L()},N=()=>{if(b.readonly||B.value||f.value)return;const H=Number(P.value)||0,Z=I(H,-1);V(Z),l(io,p.currentValue),L()},O=(H,Z)=>{const{max:ee,min:de,step:Y,precision:Ce,stepStrictly:Ie,valueOnClear:ye}=b;ee<de&&fh("InputNumber","min should not be greater than max.");let me=Number(H);if(to(H)||Number.isNaN(me))return null;if(H===""){if(ye===null)return null;me=cn(ye)?{min:de,max:ee}[ye]:ye}return Ie&&(me=E(Math.round(me/Y)*Y,Ce)),bs(Ce)||(me=E(me,Ce)),(me>ee||me<de)&&(me=me>ee?ee:de,Z&&l(gi,me)),me},V=(H,Z=!0)=>{var ee;const de=p.currentValue,Y=O(H);if(!Z){l(gi,Y);return}de===Y&&H||(p.userInput=null,l(gi,Y),de!==Y&&l(ro,Y,de),b.validateEvent&&((ee=g==null?void 0:g.validate)==null||ee.call(g,"change").catch(Ce=>Pi(Ce))),p.currentValue=Y)},G=H=>{p.userInput=H;const Z=H===""?null:Number(H);l(io,Z),V(Z,!1)},U=H=>{const Z=H!==""?Number(H):"";(oi(Z)&&!Number.isNaN(Z)||H==="")&&V(Z),L(),p.userInput=null},j=()=>{var H,Z;(Z=(H=m.value)==null?void 0:H.focus)==null||Z.call(H)},K=()=>{var H,Z;(Z=(H=m.value)==null?void 0:H.blur)==null||Z.call(H)},$=H=>{l("focus",H)},W=H=>{var Z;p.userInput=null,l("blur",H),b.validateEvent&&((Z=g==null?void 0:g.validate)==null||Z.call(g,"blur").catch(ee=>Pi(ee)))},L=()=>{p.currentValue!==b.modelValue&&(p.currentValue=b.modelValue)},z=H=>{document.activeElement===H.target&&H.preventDefault()};return d.watch(()=>b.modelValue,(H,Z)=>{const ee=O(H,!0);p.userInput===null&&ee!==Z&&(p.currentValue=ee)},{immediate:!0}),d.onMounted(()=>{var H;const{min:Z,max:ee,modelValue:de}=b,Y=(H=m.value)==null?void 0:H.input;if(Y.setAttribute("role","spinbutton"),Number.isFinite(ee)?Y.setAttribute("aria-valuemax",String(ee)):Y.removeAttribute("aria-valuemax"),Number.isFinite(Z)?Y.setAttribute("aria-valuemin",String(Z)):Y.removeAttribute("aria-valuemin"),Y.setAttribute("aria-valuenow",p.currentValue||p.currentValue===0?String(p.currentValue):""),Y.setAttribute("aria-disabled",String(B.value)),!oi(de)&&de!=null){let Ce=Number(de);Number.isNaN(Ce)&&(Ce=null),l(gi,Ce)}Y.addEventListener("wheel",z,{passive:!1})}),d.onUpdated(()=>{var H,Z;const ee=(H=m.value)==null?void 0:H.input;ee==null||ee.setAttribute("aria-valuenow",`${(Z=p.currentValue)!=null?Z:""}`)}),T({focus:j,blur:K}),(H,Z)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([d.unref(_).b(),d.unref(_).m(d.unref(w)),d.unref(_).is("disabled",d.unref(B)),d.unref(_).is("without-controls",!H.controls),d.unref(_).is("controls-right",d.unref(y))]),onDragstart:d.withModifiers(()=>{},["prevent"])},[H.controls?d.withDirectives((d.openBlock(),d.createElementBlock("span",{key:0,role:"button","aria-label":d.unref(M)("el.inputNumber.decrease"),class:d.normalizeClass([d.unref(_).e("decrease"),d.unref(_).is("disabled",d.unref(f))]),onKeydown:d.withKeys(N,["enter"])},[d.renderSlot(H.$slots,"decrease-icon",{},()=>[d.createVNode(d.unref(mn),null,{default:d.withCtx(()=>[d.unref(y)?(d.openBlock(),d.createBlock(d.unref(wn.ArrowDown),{key:0})):(d.openBlock(),d.createBlock(d.unref(wn.Minus),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[d.unref(cy),N]]):d.createCommentVNode("v-if",!0),H.controls?d.withDirectives((d.openBlock(),d.createElementBlock("span",{key:1,role:"button","aria-label":d.unref(M)("el.inputNumber.increase"),class:d.normalizeClass([d.unref(_).e("increase"),d.unref(_).is("disabled",d.unref(v))]),onKeydown:d.withKeys(F,["enter"])},[d.renderSlot(H.$slots,"increase-icon",{},()=>[d.createVNode(d.unref(mn),null,{default:d.withCtx(()=>[d.unref(y)?(d.openBlock(),d.createBlock(d.unref(wn.ArrowUp),{key:0})):(d.openBlock(),d.createBlock(d.unref(wn.Plus),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[d.unref(cy),F]]):d.createCommentVNode("v-if",!0),d.createVNode(d.unref(Ou),{id:H.id,ref_key:"input",ref:m,type:"number",step:H.step,"model-value":d.unref(P),placeholder:H.placeholder,readonly:H.readonly,disabled:d.unref(B),size:d.unref(w),max:H.max,min:H.min,name:H.name,"aria-label":H.ariaLabel,"validate-event":!1,onKeydown:[d.withKeys(d.withModifiers(F,["prevent"]),["up"]),d.withKeys(d.withModifiers(N,["prevent"]),["down"])],onBlur:W,onFocus:$,onInput:G,onChange:U},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var ID=ti(kD,[["__file","input-number.vue"]]);const FD=Vn(ID),By=Symbol("ElSelectGroup"),Nu=Symbol("ElSelect");function DD(x,T){const l=d.inject(Nu),b=d.inject(By,{disabled:!1}),M=d.computed(()=>v(la(l.props.modelValue),x.value)),_=d.computed(()=>{var w;if(l.props.multiple){const B=la((w=l.props.modelValue)!=null?w:[]);return!M.value&&B.length>=l.props.multipleLimit&&l.props.multipleLimit>0}else return!1}),m=d.computed(()=>x.label||(jn(x.value)?"":x.value)),p=d.computed(()=>x.value||x.label||""),g=d.computed(()=>x.disabled||T.groupDisabled||_.value),f=d.getCurrentInstance(),v=(w=[],B)=>{if(jn(x.value)){const P=l.props.valueKey;return w&&w.some(E=>d.toRaw(Io(E,P))===Io(B,P))}else return w&&w.includes(B)},A=()=>{!x.disabled&&!b.disabled&&(l.states.hoveringIndex=l.optionsArray.indexOf(f.proxy))},y=w=>{const B=new RegExp(Ek(w),"i");T.visible=B.test(m.value)||x.created};return d.watch(()=>m.value,()=>{!x.created&&!l.props.remote&&l.setSelected()}),d.watch(()=>x.value,(w,B)=>{const{remote:P,valueKey:E}=l.props;if(w!==B&&(l.onOptionDestroy(B,f.proxy),l.onOptionCreate(f.proxy)),!x.created&&!P){if(E&&jn(w)&&jn(B)&&w[E]===B[E])return;l.setSelected()}}),d.watch(()=>b.disabled,()=>{T.groupDisabled=b.disabled},{immediate:!0}),{select:l,currentLabel:m,currentValue:p,itemSelected:M,isDisabled:g,hoverItem:A,updateOption:y}}const RD=d.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(x){const T=ei("select"),l=Du(),b=d.computed(()=>[T.be("dropdown","item"),T.is("disabled",d.unref(p)),T.is("selected",d.unref(m)),T.is("hovering",d.unref(y))]),M=d.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:_,itemSelected:m,isDisabled:p,select:g,hoverItem:f,updateOption:v}=DD(x,M),{visible:A,hover:y}=d.toRefs(M),w=d.getCurrentInstance().proxy;g.onOptionCreate(w),d.onBeforeUnmount(()=>{const P=w.value,{selected:E}=g.states,I=(g.props.multiple?E:[E]).some(F=>F.value===w.value);d.nextTick(()=>{g.states.cachedOptions.get(P)===w&&!I&&g.states.cachedOptions.delete(P)}),g.onOptionDestroy(P,w)});function B(){p.value||g.handleOptionSelect(w)}return{ns:T,id:l,containerKls:b,currentLabel:_,itemSelected:m,isDisabled:p,select:g,hoverItem:f,updateOption:v,visible:A,hover:y,selectOptionClick:B,states:M}}});function LD(x,T,l,b,M,_){return d.withDirectives((d.openBlock(),d.createElementBlock("li",{id:x.id,class:d.normalizeClass(x.containerKls),role:"option","aria-disabled":x.isDisabled||void 0,"aria-selected":x.itemSelected,onMouseenter:x.hoverItem,onClick:d.withModifiers(x.selectOptionClick,["stop"])},[d.renderSlot(x.$slots,"default",{},()=>[d.createElementVNode("span",null,d.toDisplayString(x.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[d.vShow,x.visible]])}var RA=ti(RD,[["render",LD],["__file","option.vue"]]);const OD=d.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const x=d.inject(Nu),T=ei("select"),l=d.computed(()=>x.props.popperClass),b=d.computed(()=>x.props.multiple),M=d.computed(()=>x.props.fitInputWidth),_=d.ref("");function m(){var p;_.value=`${(p=x.selectRef)==null?void 0:p.offsetWidth}px`}return d.onMounted(()=>{m(),So(x.selectRef,m)}),{ns:T,minWidth:_,popperClass:l,isMultiple:b,isFitInputWidth:M}}});function ND(x,T,l,b,M,_){return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([x.ns.b("dropdown"),x.ns.is("multiple",x.isMultiple),x.popperClass]),style:d.normalizeStyle({[x.isFitInputWidth?"width":"minWidth"]:x.minWidth})},[x.$slots.header?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.be("dropdown","header"))},[d.renderSlot(x.$slots,"header")],2)):d.createCommentVNode("v-if",!0),d.renderSlot(x.$slots,"default"),x.$slots.footer?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(x.ns.be("dropdown","footer"))},[d.renderSlot(x.$slots,"footer")],2)):d.createCommentVNode("v-if",!0)],6)}var UD=ti(OD,[["render",ND],["__file","select-dropdown.vue"]]);const jD=11,VD=(x,T)=>{const{t:l}=mh(),b=Du(),M=ei("select"),_=ei("input"),m=d.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:x.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),p=d.ref(null),g=d.ref(null),f=d.ref(null),v=d.ref(null),A=d.ref(null),y=d.ref(null),w=d.ref(null),B=d.ref(null),P=d.ref(null),E=d.ref(null),S=d.ref(null),I=d.ref(null),{isComposing:F,handleCompositionStart:N,handleCompositionUpdate:O,handleCompositionEnd:V}=z0({afterComposition:Pt=>_t(Pt)}),{wrapperRef:G,isFocused:U,handleBlur:j}=Q0(A,{afterFocus(){x.automaticDropdown&&!K.value&&(K.value=!0,m.menuVisibleOnFocus=!0)},beforeBlur(Pt){var Xt,er;return((Xt=f.value)==null?void 0:Xt.isFocusInsideContent(Pt))||((er=v.value)==null?void 0:er.isFocusInsideContent(Pt))},afterBlur(){K.value=!1,m.menuVisibleOnFocus=!1}}),K=d.ref(!1),$=d.ref(),{form:W,formItem:L}=No(),{inputId:z}=Ha(x,{formItemContext:L}),{valueOnClear:H,isEmptyValue:Z}=vI(x),ee=d.computed(()=>x.disabled||(W==null?void 0:W.disabled)),de=d.computed(()=>Yn(x.modelValue)?x.modelValue.length>0:!Z(x.modelValue)),Y=d.computed(()=>x.clearable&&!ee.value&&m.inputHovering&&de.value),Ce=d.computed(()=>x.remote&&x.filterable&&!x.remoteShowSuffix?"":x.suffixIcon),Ie=d.computed(()=>M.is("reverse",Ce.value&&K.value)),ye=d.computed(()=>(L==null?void 0:L.validateState)||""),me=d.computed(()=>h0[ye.value]),Be=d.computed(()=>x.remote?300:0),ve=d.computed(()=>x.loading?x.loadingText||l("el.select.loading"):x.remote&&!m.inputValue&&m.options.size===0?!1:x.filterable&&m.inputValue&&m.options.size>0&&Pe.value===0?x.noMatchText||l("el.select.noMatch"):m.options.size===0?x.noDataText||l("el.select.noData"):null),Pe=d.computed(()=>Me.value.filter(Pt=>Pt.visible).length),Me=d.computed(()=>{const Pt=Array.from(m.options.values()),Xt=[];return m.optionValues.forEach(er=>{const Hr=Pt.findIndex(hn=>hn.value===er);Hr>-1&&Xt.push(Pt[Hr])}),Xt.length>=Pt.length?Xt:Pt}),Le=d.computed(()=>Array.from(m.cachedOptions.values())),Ue=d.computed(()=>{const Pt=Me.value.filter(Xt=>!Xt.created).some(Xt=>Xt.currentLabel===m.inputValue);return x.filterable&&x.allowCreate&&m.inputValue!==""&&!Pt}),_e=()=>{x.filterable&&en(x.filterMethod)||x.filterable&&x.remote&&en(x.remoteMethod)||Me.value.forEach(Pt=>{var Xt;(Xt=Pt.updateOption)==null||Xt.call(Pt,m.inputValue)})},Xe=Oo(),we=d.computed(()=>["small"].includes(Xe.value)?"small":"default"),oe=d.computed({get(){return K.value&&ve.value!==!1},set(Pt){K.value=Pt}}),Ae=d.computed(()=>{if(x.multiple&&!bs(x.modelValue))return la(x.modelValue).length===0&&!m.inputValue;const Pt=Yn(x.modelValue)?x.modelValue[0]:x.modelValue;return x.filterable||bs(Pt)?!m.inputValue:!0}),h=d.computed(()=>{var Pt;const Xt=(Pt=x.placeholder)!=null?Pt:l("el.select.placeholder");return x.multiple||!de.value?Xt:m.selectedLabel}),De=d.computed(()=>Qf?null:"mouseenter");d.watch(()=>x.modelValue,(Pt,Xt)=>{x.multiple&&x.filterable&&!x.reserveKeyword&&(m.inputValue="",je("")),ue(),!dh(Pt,Xt)&&x.validateEvent&&(L==null||L.validate("change").catch(er=>Pi(er)))},{flush:"post",deep:!0}),d.watch(()=>K.value,Pt=>{Pt?je(m.inputValue):(m.inputValue="",m.previousQuery=null,m.isBeforeHide=!0),T("visible-change",Pt)}),d.watch(()=>m.options.entries(),()=>{var Pt;if(!Bn)return;const Xt=((Pt=p.value)==null?void 0:Pt.querySelectorAll("input"))||[];(!x.filterable&&!x.defaultFirstOption&&!bs(x.modelValue)||!Array.from(Xt).includes(document.activeElement))&&ue(),x.defaultFirstOption&&(x.filterable||x.remote)&&Pe.value&&ae()},{flush:"post"}),d.watch(()=>m.hoveringIndex,Pt=>{oi(Pt)&&Pt>-1?$.value=Me.value[Pt]||{}:$.value={},Me.value.forEach(Xt=>{Xt.hover=$.value===Xt})}),d.watchEffect(()=>{m.isBeforeHide||_e()});const je=Pt=>{m.previousQuery===Pt||F.value||(m.previousQuery=Pt,x.filterable&&en(x.filterMethod)?x.filterMethod(Pt):x.filterable&&x.remote&&en(x.remoteMethod)&&x.remoteMethod(Pt),x.defaultFirstOption&&(x.filterable||x.remote)&&Pe.value?d.nextTick(ae):d.nextTick(re))},ae=()=>{const Pt=Me.value.filter(Hr=>Hr.visible&&!Hr.disabled&&!Hr.states.groupDisabled),Xt=Pt.find(Hr=>Hr.created),er=Pt[0];m.hoveringIndex=qe(Me.value,Xt||er)},ue=()=>{if(x.multiple)m.selectedLabel="";else{const Xt=Yn(x.modelValue)?x.modelValue[0]:x.modelValue,er=ce(Xt);m.selectedLabel=er.currentLabel,m.selected=er;return}const Pt=[];bs(x.modelValue)||la(x.modelValue).forEach(Xt=>{Pt.push(ce(Xt))}),m.selected=Pt},ce=Pt=>{let Xt;const er=zf(Pt).toLowerCase()==="object",Hr=zf(Pt).toLowerCase()==="null",hn=zf(Pt).toLowerCase()==="undefined";for(let ke=m.cachedOptions.size-1;ke>=0;ke--){const Re=Le.value[ke];if(er?Io(Re.value,x.valueKey)===Io(Pt,x.valueKey):Re.value===Pt){Xt={value:Pt,currentLabel:Re.currentLabel,get isDisabled(){return Re.isDisabled}};break}}if(Xt)return Xt;const be=er?Pt.label:!Hr&&!hn?Pt:"";return{value:Pt,currentLabel:be}},re=()=>{x.multiple?m.hoveringIndex=Me.value.findIndex(Pt=>m.selected.some(Xt=>yi(Xt)===yi(Pt))):m.hoveringIndex=Me.value.findIndex(Pt=>yi(Pt)===yi(m.selected))},fe=()=>{m.selectionWidth=g.value.getBoundingClientRect().width},le=()=>{m.calculatorWidth=y.value.getBoundingClientRect().width},Ee=()=>{m.collapseItemWidth=S.value.getBoundingClientRect().width},We=()=>{var Pt,Xt;(Xt=(Pt=f.value)==null?void 0:Pt.updatePopper)==null||Xt.call(Pt)},ze=()=>{var Pt,Xt;(Xt=(Pt=v.value)==null?void 0:Pt.updatePopper)==null||Xt.call(Pt)},Je=()=>{m.inputValue.length>0&&!K.value&&(K.value=!0),je(m.inputValue)},_t=Pt=>{if(m.inputValue=Pt.target.value,x.remote)at();else return Je()},at=aA(()=>{Je()},Be.value),yt=Pt=>{dh(x.modelValue,Pt)||T(ro,Pt)},rt=Pt=>bk(Pt,Xt=>!m.disabledOptions.has(Xt)),xt=Pt=>{if(x.multiple&&Pt.code!==us.delete&&Pt.target.value.length<=0){const Xt=la(x.modelValue).slice(),er=rt(Xt);if(er<0)return;const Hr=Xt[er];Xt.splice(er,1),T(gi,Xt),yt(Xt),T("remove-tag",Hr)}},It=(Pt,Xt)=>{const er=m.selected.indexOf(Xt);if(er>-1&&!ee.value){const Hr=la(x.modelValue).slice();Hr.splice(er,1),T(gi,Hr),yt(Hr),T("remove-tag",Xt.value)}Pt.stopPropagation(),rr()},Ot=Pt=>{Pt.stopPropagation();const Xt=x.multiple?[]:H.value;if(x.multiple)for(const er of m.selected)er.isDisabled&&Xt.push(er.value);T(gi,Xt),yt(Xt),m.hoveringIndex=-1,K.value=!1,T("clear"),rr()},$e=Pt=>{var Xt;if(x.multiple){const er=la((Xt=x.modelValue)!=null?Xt:[]).slice(),Hr=qe(er,Pt.value);Hr>-1?er.splice(Hr,1):(x.multipleLimit<=0||er.length<x.multipleLimit)&&er.push(Pt.value),T(gi,er),yt(er),Pt.created&&je(""),x.filterable&&!x.reserveKeyword&&(m.inputValue="")}else T(gi,Pt.value),yt(Pt.value),K.value=!1;rr(),!K.value&&d.nextTick(()=>{lt(Pt)})},qe=(Pt=[],Xt)=>{if(!jn(Xt))return Pt.indexOf(Xt);const er=x.valueKey;let Hr=-1;return Pt.some((hn,be)=>d.toRaw(Io(hn,er))===Io(Xt,er)?(Hr=be,!0):!1),Hr},lt=Pt=>{var Xt,er,Hr,hn,be;const Te=Yn(Pt)?Pt[0]:Pt;let ke=null;if(Te!=null&&Te.value){const Re=Me.value.filter(Qe=>Qe.value===Te.value);Re.length>0&&(ke=Re[0].$el)}if(f.value&&ke){const Re=(hn=(Hr=(er=(Xt=f.value)==null?void 0:Xt.popperRef)==null?void 0:er.contentRef)==null?void 0:Hr.querySelector)==null?void 0:hn.call(Hr,`.${M.be("dropdown","wrap")}`);Re&&Tk(Re,ke)}(be=I.value)==null||be.handleScroll()},gt=Pt=>{m.options.set(Pt.value,Pt),m.cachedOptions.set(Pt.value,Pt),Pt.disabled&&m.disabledOptions.set(Pt.value,Pt)},Ft=(Pt,Xt)=>{m.options.get(Pt)===Xt&&m.options.delete(Pt)},jt=d.computed(()=>{var Pt,Xt;return(Xt=(Pt=f.value)==null?void 0:Pt.popperRef)==null?void 0:Xt.contentRef}),Gt=()=>{m.isBeforeHide=!1,d.nextTick(()=>lt(m.selected))},rr=()=>{var Pt;(Pt=A.value)==null||Pt.focus()},lr=()=>{wr()},vr=Pt=>{Ot(Pt)},wr=Pt=>{if(K.value=!1,U.value){const Xt=new FocusEvent("focus",Pt);d.nextTick(()=>j(Xt))}},qt=()=>{m.inputValue.length>0?m.inputValue="":K.value=!1},ai=()=>{ee.value||(Qf&&(m.inputHovering=!0),m.menuVisibleOnFocus?m.menuVisibleOnFocus=!1:K.value=!K.value)},wt=()=>{K.value?Me.value[m.hoveringIndex]&&$e(Me.value[m.hoveringIndex]):ai()},yi=Pt=>jn(Pt.value)?Io(Pt.value,x.valueKey):Pt.value,ri=d.computed(()=>Me.value.filter(Pt=>Pt.visible).every(Pt=>Pt.disabled)),jr=d.computed(()=>x.multiple?x.collapseTags?m.selected.slice(0,x.maxCollapseTags):m.selected:[]),Ri=d.computed(()=>x.multiple?x.collapseTags?m.selected.slice(x.maxCollapseTags):[]:[]),ii=Pt=>{if(!K.value){K.value=!0;return}if(!(m.options.size===0||m.filteredOptionsCount===0||F.value)&&!ri.value){Pt==="next"?(m.hoveringIndex++,m.hoveringIndex===m.options.size&&(m.hoveringIndex=0)):Pt==="prev"&&(m.hoveringIndex--,m.hoveringIndex<0&&(m.hoveringIndex=m.options.size-1));const Xt=Me.value[m.hoveringIndex];(Xt.disabled===!0||Xt.states.groupDisabled===!0||!Xt.visible)&&ii(Pt),d.nextTick(()=>lt($.value))}},Xr=()=>{if(!g.value)return 0;const Pt=window.getComputedStyle(g.value);return Number.parseFloat(Pt.gap||"6px")},Di=d.computed(()=>{const Pt=Xr();return{maxWidth:`${S.value&&x.maxCollapseTags===1?m.selectionWidth-m.collapseItemWidth-Pt:m.selectionWidth}px`}}),li=d.computed(()=>({maxWidth:`${m.selectionWidth}px`})),Qi=d.computed(()=>({width:`${Math.max(m.calculatorWidth,jD)}px`}));return So(g,fe),So(y,le),So(P,We),So(G,We),So(E,ze),So(S,Ee),d.onMounted(()=>{ue()}),{inputId:z,contentId:b,nsSelect:M,nsInput:_,states:m,isFocused:U,expanded:K,optionsArray:Me,hoverOption:$,selectSize:Xe,filteredOptionsCount:Pe,resetCalculatorWidth:le,updateTooltip:We,updateTagTooltip:ze,debouncedOnInputChange:at,onInput:_t,deletePrevTag:xt,deleteTag:It,deleteSelected:Ot,handleOptionSelect:$e,scrollToOption:lt,hasModelValue:de,shouldShowPlaceholder:Ae,currentPlaceholder:h,mouseEnterEventName:De,showClose:Y,iconComponent:Ce,iconReverse:Ie,validateState:ye,validateIcon:me,showNewOption:Ue,updateOptions:_e,collapseTagSize:we,setSelected:ue,selectDisabled:ee,emptyText:ve,handleCompositionStart:N,handleCompositionUpdate:O,handleCompositionEnd:V,onOptionCreate:gt,onOptionDestroy:Ft,handleMenuEnter:Gt,focus:rr,blur:lr,handleClearClick:vr,handleClickOutside:wr,handleEsc:qt,toggleMenu:ai,selectOption:wt,getValueKey:yi,navigateOptions:ii,dropdownMenuVisible:oe,showTagList:jr,collapseTagList:Ri,tagStyle:Di,collapseTagStyle:li,inputStyle:Qi,popperRef:jt,inputRef:A,tooltipRef:f,tagTooltipRef:v,calculatorRef:y,prefixRef:w,suffixRef:B,selectRef:p,wrapperRef:G,selectionRef:g,scrollbarRef:I,menuRef:P,tagMenuRef:E,collapseItemRef:S}};var HD=d.defineComponent({name:"ElOptions",setup(x,{slots:T}){const l=d.inject(Nu);let b=[];return()=>{var M,_;const m=(M=T.default)==null?void 0:M.call(T),p=[];function g(f){Yn(f)&&f.forEach(v=>{var A,y,w,B;const P=(A=(v==null?void 0:v.type)||{})==null?void 0:A.name;P==="ElOptionGroup"?g(!cn(v.children)&&!Yn(v.children)&&en((y=v.children)==null?void 0:y.default)?(w=v.children)==null?void 0:w.default():v.children):P==="ElOption"?p.push((B=v.props)==null?void 0:B.value):Yn(v.children)&&g(v.children)})}return m.length&&g((_=m[0])==null?void 0:_.children),dh(p,b)||(b=p,l&&(l.states.optionValues=p)),m}}});const QD=mi({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Lo,effect:{type:Ur(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ur(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:IA.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Do,default:wn.CircleClose},fitInputWidth:Boolean,suffixIcon:{type:Do,default:wn.ArrowDown},tagType:{...DA.type,default:"info"},tagEffect:{...DA.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Ur(String),values:yl,default:"bottom-start"},fallbackPlacements:{type:Ur(Array),default:["bottom-start","top-start","right","left"]},...pI,...Hs(["ariaLabel"])}),Cy="ElSelect",zD=d.defineComponent({name:Cy,componentName:Cy,components:{ElSelectMenu:UD,ElOption:RA,ElOptions:HD,ElTag:BD,ElScrollbar:Uo,ElTooltip:FA,ElIcon:mn},directives:{ClickOutside:QF},props:QD,emits:[gi,ro,"remove-tag","clear","visible-change","focus","blur"],setup(x,{emit:T}){const l=VD(x,T);return d.provide(Nu,d.reactive({props:x,states:l.states,optionsArray:l.optionsArray,handleOptionSelect:l.handleOptionSelect,onOptionCreate:l.onOptionCreate,onOptionDestroy:l.onOptionDestroy,selectRef:l.selectRef,setSelected:l.setSelected})),{...l}}});function GD(x,T,l,b,M,_){const m=d.resolveComponent("el-tag"),p=d.resolveComponent("el-tooltip"),g=d.resolveComponent("el-icon"),f=d.resolveComponent("el-option"),v=d.resolveComponent("el-options"),A=d.resolveComponent("el-scrollbar"),y=d.resolveComponent("el-select-menu"),w=d.resolveDirective("click-outside");return d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref:"selectRef",class:d.normalizeClass([x.nsSelect.b(),x.nsSelect.m(x.selectSize)]),[d.toHandlerKey(x.mouseEnterEventName)]:B=>x.states.inputHovering=!0,onMouseleave:B=>x.states.inputHovering=!1},[d.createVNode(p,{ref:"tooltipRef",visible:x.dropdownMenuVisible,placement:x.placement,teleported:x.teleported,"popper-class":[x.nsSelect.e("popper"),x.popperClass],"popper-options":x.popperOptions,"fallback-placements":x.fallbackPlacements,effect:x.effect,pure:"",trigger:"click",transition:`${x.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:x.persistent,onBeforeShow:x.handleMenuEnter,onHide:B=>x.states.isBeforeHide=!1},{default:d.withCtx(()=>{var B;return[d.createElementVNode("div",{ref:"wrapperRef",class:d.normalizeClass([x.nsSelect.e("wrapper"),x.nsSelect.is("focused",x.isFocused),x.nsSelect.is("hovering",x.states.inputHovering),x.nsSelect.is("filterable",x.filterable),x.nsSelect.is("disabled",x.selectDisabled)]),onClick:d.withModifiers(x.toggleMenu,["prevent","stop"])},[x.$slots.prefix?(d.openBlock(),d.createElementBlock("div",{key:0,ref:"prefixRef",class:d.normalizeClass(x.nsSelect.e("prefix"))},[d.renderSlot(x.$slots,"prefix")],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{ref:"selectionRef",class:d.normalizeClass([x.nsSelect.e("selection"),x.nsSelect.is("near",x.multiple&&!x.$slots.prefix&&!!x.states.selected.length)])},[x.multiple?d.renderSlot(x.$slots,"tag",{key:0},()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.showTagList,P=>(d.openBlock(),d.createElementBlock("div",{key:x.getValueKey(P),class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{closable:!x.selectDisabled&&!P.isDisabled,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",style:d.normalizeStyle(x.tagStyle),onClose:E=>x.deleteTag(E,P)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))},[d.renderSlot(x.$slots,"label",{label:P.currentLabel,value:P.value},()=>[d.createTextVNode(d.toDisplayString(P.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),x.collapseTags&&x.states.selected.length>x.maxCollapseTags?(d.openBlock(),d.createBlock(p,{key:0,ref:"tagTooltipRef",disabled:x.dropdownMenuVisible||!x.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:x.effect,placement:"bottom",teleported:x.teleported},{default:d.withCtx(()=>[d.createElementVNode("div",{ref:"collapseItemRef",class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{closable:!1,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",style:d.normalizeStyle(x.collapseTagStyle)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))}," + "+d.toDisplayString(x.states.selected.length-x.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:d.withCtx(()=>[d.createElementVNode("div",{ref:"tagMenuRef",class:d.normalizeClass(x.nsSelect.e("selection"))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.collapseTagList,P=>(d.openBlock(),d.createElementBlock("div",{key:x.getValueKey(P),class:d.normalizeClass(x.nsSelect.e("selected-item"))},[d.createVNode(m,{class:"in-tooltip",closable:!x.selectDisabled&&!P.isDisabled,size:x.collapseTagSize,type:x.tagType,effect:x.tagEffect,"disable-transitions":"",onClose:E=>x.deleteTag(E,P)},{default:d.withCtx(()=>[d.createElementVNode("span",{class:d.normalizeClass(x.nsSelect.e("tags-text"))},[d.renderSlot(x.$slots,"label",{label:P.currentLabel,value:P.value},()=>[d.createTextVNode(d.toDisplayString(P.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):d.createCommentVNode("v-if",!0)]):d.createCommentVNode("v-if",!0),x.selectDisabled?d.createCommentVNode("v-if",!0):(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass([x.nsSelect.e("selected-item"),x.nsSelect.e("input-wrapper"),x.nsSelect.is("hidden",!x.filterable)])},[d.withDirectives(d.createElementVNode("input",{id:x.inputId,ref:"inputRef","onUpdate:modelValue":P=>x.states.inputValue=P,type:"text",name:x.name,class:d.normalizeClass([x.nsSelect.e("input"),x.nsSelect.is(x.selectSize)]),disabled:x.selectDisabled,autocomplete:x.autocomplete,style:d.normalizeStyle(x.inputStyle),role:"combobox",readonly:!x.filterable,spellcheck:"false","aria-activedescendant":((B=x.hoverOption)==null?void 0:B.id)||"","aria-controls":x.contentId,"aria-expanded":x.dropdownMenuVisible,"aria-label":x.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[d.withKeys(d.withModifiers(P=>x.navigateOptions("next"),["stop","prevent"]),["down"]),d.withKeys(d.withModifiers(P=>x.navigateOptions("prev"),["stop","prevent"]),["up"]),d.withKeys(d.withModifiers(x.handleEsc,["stop","prevent"]),["esc"]),d.withKeys(d.withModifiers(x.selectOption,["stop","prevent"]),["enter"]),d.withKeys(d.withModifiers(x.deletePrevTag,["stop"]),["delete"])],onCompositionstart:x.handleCompositionStart,onCompositionupdate:x.handleCompositionUpdate,onCompositionend:x.handleCompositionEnd,onInput:x.onInput,onClick:d.withModifiers(x.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[d.vModelText,x.states.inputValue]]),x.filterable?(d.openBlock(),d.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:d.normalizeClass(x.nsSelect.e("input-calculator")),textContent:d.toDisplayString(x.states.inputValue)},null,10,["textContent"])):d.createCommentVNode("v-if",!0)],2)),x.shouldShowPlaceholder?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass([x.nsSelect.e("selected-item"),x.nsSelect.e("placeholder"),x.nsSelect.is("transparent",!x.hasModelValue||x.expanded&&!x.states.inputValue)])},[x.hasModelValue?d.renderSlot(x.$slots,"label",{key:0,label:x.currentPlaceholder,value:x.modelValue},()=>[d.createElementVNode("span",null,d.toDisplayString(x.currentPlaceholder),1)]):(d.openBlock(),d.createElementBlock("span",{key:1},d.toDisplayString(x.currentPlaceholder),1))],2)):d.createCommentVNode("v-if",!0)],2),d.createElementVNode("div",{ref:"suffixRef",class:d.normalizeClass(x.nsSelect.e("suffix"))},[x.iconComponent&&!x.showClose?(d.openBlock(),d.createBlock(g,{key:0,class:d.normalizeClass([x.nsSelect.e("caret"),x.nsSelect.e("icon"),x.iconReverse])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.iconComponent)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),x.showClose&&x.clearIcon?(d.openBlock(),d.createBlock(g,{key:1,class:d.normalizeClass([x.nsSelect.e("caret"),x.nsSelect.e("icon")]),onClick:x.handleClearClick},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.clearIcon)))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0),x.validateState&&x.validateIcon?(d.openBlock(),d.createBlock(g,{key:2,class:d.normalizeClass([x.nsInput.e("icon"),x.nsInput.e("validateIcon")])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.validateIcon)))]),_:1},8,["class"])):d.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:d.withCtx(()=>[d.createVNode(y,{ref:"menuRef"},{default:d.withCtx(()=>[x.$slots.header?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.nsSelect.be("dropdown","header")),onClick:d.withModifiers(()=>{},["stop"])},[d.renderSlot(x.$slots,"header")],10,["onClick"])):d.createCommentVNode("v-if",!0),d.withDirectives(d.createVNode(A,{id:x.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":x.nsSelect.be("dropdown","wrap"),"view-class":x.nsSelect.be("dropdown","list"),class:d.normalizeClass([x.nsSelect.is("empty",x.filteredOptionsCount===0)]),role:"listbox","aria-label":x.ariaLabel,"aria-orientation":"vertical"},{default:d.withCtx(()=>[x.showNewOption?(d.openBlock(),d.createBlock(f,{key:0,value:x.states.inputValue,created:!0},null,8,["value"])):d.createCommentVNode("v-if",!0),d.createVNode(v,null,{default:d.withCtx(()=>[d.renderSlot(x.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[d.vShow,x.states.options.size>0&&!x.loading]]),x.$slots.loading&&x.loading?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(x.nsSelect.be("dropdown","loading"))},[d.renderSlot(x.$slots,"loading")],2)):x.loading||x.filteredOptionsCount===0?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(x.nsSelect.be("dropdown","empty"))},[d.renderSlot(x.$slots,"empty",{},()=>[d.createElementVNode("span",null,d.toDisplayString(x.emptyText),1)])],2)):d.createCommentVNode("v-if",!0),x.$slots.footer?(d.openBlock(),d.createElementBlock("div",{key:3,class:d.normalizeClass(x.nsSelect.be("dropdown","footer")),onClick:d.withModifiers(()=>{},["stop"])},[d.renderSlot(x.$slots,"footer")],10,["onClick"])):d.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow","onHide"])],16,["onMouseleave"])),[[w,x.handleClickOutside,x.popperRef]])}var WD=ti(zD,[["render",GD],["__file","select.vue"]]);const KD=d.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(x){const T=ei("select"),l=d.ref(null),b=d.getCurrentInstance(),M=d.ref([]);d.provide(By,d.reactive({...d.toRefs(x)}));const _=d.computed(()=>M.value.some(f=>f.visible===!0)),m=f=>{var v,A;return((v=f.type)==null?void 0:v.name)==="ElOption"&&!!((A=f.component)!=null&&A.proxy)},p=f=>{const v=la(f),A=[];return v.forEach(y=>{var w,B;m(y)?A.push(y.component.proxy):(w=y.children)!=null&&w.length?A.push(...p(y.children)):(B=y.component)!=null&&B.subTree&&A.push(...p(y.component.subTree))}),A},g=()=>{M.value=p(b.subTree)};return d.onMounted(()=>{g()}),EE(l,g,{attributes:!0,subtree:!0,childList:!0}),{groupRef:l,visible:_,ns:T}}});function XD(x,T,l,b,M,_){return d.withDirectives((d.openBlock(),d.createElementBlock("ul",{ref:"groupRef",class:d.normalizeClass(x.ns.be("group","wrap"))},[d.createElementVNode("li",{class:d.normalizeClass(x.ns.be("group","title"))},d.toDisplayString(x.label),3),d.createElementVNode("li",null,[d.createElementVNode("ul",{class:d.normalizeClass(x.ns.b("group"))},[d.renderSlot(x.$slots,"default")],2)])],2)),[[d.vShow,x.visible]])}var xy=ti(KD,[["render",XD],["__file","option-group.vue"]]);const $D=Vn(WD,{Option:RA,OptionGroup:xy}),YD=gl(RA);gl(xy);const Py=Symbol("sliderContextKey"),JD=mi({modelValue:{type:Ur([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Lo,inputSize:Lo,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Ur(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Ur(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:yl,default:"top"},marks:{type:Ur(Object)},validateEvent:{type:Boolean,default:!0},...Hs(["ariaLabel"])}),LA=x=>oi(x)||Yn(x)&&x.every(oi),ZD={[gi]:LA,[io]:LA,[ro]:LA},qD=(x,T,l)=>{const b=d.ref();return d.onMounted(async()=>{x.range?(Array.isArray(x.modelValue)?(T.firstValue=Math.max(x.min,x.modelValue[0]),T.secondValue=Math.min(x.max,x.modelValue[1])):(T.firstValue=x.min,T.secondValue=x.max),T.oldValue=[T.firstValue,T.secondValue]):(typeof x.modelValue!="number"||Number.isNaN(x.modelValue)?T.firstValue=x.min:T.firstValue=Math.min(x.max,Math.max(x.min,x.modelValue)),T.oldValue=T.firstValue),Sn(window,"resize",l),await d.nextTick(),l()}),{sliderWrapper:b}},eR=x=>d.computed(()=>x.marks?Object.keys(x.marks).map(Number.parseFloat).sort((l,b)=>l-b).filter(l=>l<=x.max&&l>=x.min).map(l=>({point:l,position:(l-x.min)*100/(x.max-x.min),mark:x.marks[l]})):[]),tR=(x,T,l)=>{const{form:b,formItem:M}=No(),_=d.shallowRef(),m=d.ref(),p=d.ref(),g={firstButton:m,secondButton:p},f=d.computed(()=>x.disabled||(b==null?void 0:b.disabled)||!1),v=d.computed(()=>Math.min(T.firstValue,T.secondValue)),A=d.computed(()=>Math.max(T.firstValue,T.secondValue)),y=d.computed(()=>x.range?`${100*(A.value-v.value)/(x.max-x.min)}%`:`${100*(T.firstValue-x.min)/(x.max-x.min)}%`),w=d.computed(()=>x.range?`${100*(v.value-x.min)/(x.max-x.min)}%`:"0%"),B=d.computed(()=>x.vertical?{height:x.height}:{}),P=d.computed(()=>x.vertical?{height:y.value,bottom:w.value}:{width:y.value,left:w.value}),E=()=>{_.value&&(T.sliderSize=_.value[`client${x.vertical?"Height":"Width"}`])},S=W=>{const L=x.min+W*(x.max-x.min)/100;if(!x.range)return m;let z;return Math.abs(v.value-L)<Math.abs(A.value-L)?z=T.firstValue<T.secondValue?"firstButton":"secondButton":z=T.firstValue>T.secondValue?"firstButton":"secondButton",g[z]},I=W=>{const L=S(W);return L.value.setPosition(W),L},F=W=>{T.firstValue=W??x.min,O(x.range?[v.value,A.value]:W??x.min)},N=W=>{T.secondValue=W,x.range&&O([v.value,A.value])},O=W=>{l(gi,W),l(io,W)},V=async()=>{await d.nextTick(),l(ro,x.range?[v.value,A.value]:x.modelValue)},G=W=>{var L,z,H,Z,ee,de;if(f.value||T.dragging)return;E();let Y=0;if(x.vertical){const Ce=(H=(z=(L=W.touches)==null?void 0:L.item(0))==null?void 0:z.clientY)!=null?H:W.clientY;Y=(_.value.getBoundingClientRect().bottom-Ce)/T.sliderSize*100}else{const Ce=(de=(ee=(Z=W.touches)==null?void 0:Z.item(0))==null?void 0:ee.clientX)!=null?de:W.clientX,Ie=_.value.getBoundingClientRect().left;Y=(Ce-Ie)/T.sliderSize*100}if(!(Y<0||Y>100))return I(Y)};return{elFormItem:M,slider:_,firstButton:m,secondButton:p,sliderDisabled:f,minValue:v,maxValue:A,runwayStyle:B,barStyle:P,resetSize:E,setPosition:I,emitChange:V,onSliderWrapperPrevent:W=>{var L,z;((L=g.firstButton.value)!=null&&L.dragging||(z=g.secondButton.value)!=null&&z.dragging)&&W.preventDefault()},onSliderClick:W=>{G(W)&&V()},onSliderDown:async W=>{const L=G(W);L&&(await d.nextTick(),L.value.onButtonDown(W))},onSliderMarkerDown:W=>{f.value||T.dragging||I(W)},setFirstValue:F,setSecondValue:N}},{left:rR,down:iR,right:nR,up:sR,home:oR,end:aR,pageUp:lR,pageDown:uR}=us,cR=(x,T,l)=>{const b=d.ref(),M=d.ref(!1),_=d.computed(()=>T.value instanceof Function),m=d.computed(()=>_.value&&T.value(x.modelValue)||x.modelValue),p=aA(()=>{l.value&&(M.value=!0)},50),g=aA(()=>{l.value&&(M.value=!1)},50);return{tooltip:b,tooltipVisible:M,formatValue:m,displayTooltip:p,hideTooltip:g}},hR=(x,T,l)=>{const{disabled:b,min:M,max:_,step:m,showTooltip:p,precision:g,sliderSize:f,formatTooltip:v,emitChange:A,resetSize:y,updateDragging:w}=d.inject(Py),{tooltip:B,tooltipVisible:P,formatValue:E,displayTooltip:S,hideTooltip:I}=cR(x,v,p),F=d.ref(),N=d.computed(()=>`${(x.modelValue-M.value)/(_.value-M.value)*100}%`),O=d.computed(()=>x.vertical?{bottom:N.value}:{left:N.value}),V=()=>{T.hovering=!0,S()},G=()=>{T.hovering=!1,T.dragging||I()},U=ye=>{b.value||(ye.preventDefault(),de(ye),window.addEventListener("mousemove",Y),window.addEventListener("touchmove",Y),window.addEventListener("mouseup",Ce),window.addEventListener("touchend",Ce),window.addEventListener("contextmenu",Ce),F.value.focus())},j=ye=>{b.value||(T.newPosition=Number.parseFloat(N.value)+ye/(_.value-M.value)*100,Ie(T.newPosition),A())},K=()=>{j(-m.value)},$=()=>{j(m.value)},W=()=>{j(-m.value*4)},L=()=>{j(m.value*4)},z=()=>{b.value||(Ie(0),A())},H=()=>{b.value||(Ie(100),A())},Z=ye=>{let me=!0;[rR,iR].includes(ye.key)?K():[nR,sR].includes(ye.key)?$():ye.key===oR?z():ye.key===aR?H():ye.key===uR?W():ye.key===lR?L():me=!1,me&&ye.preventDefault()},ee=ye=>{let me,Be;return ye.type.startsWith("touch")?(Be=ye.touches[0].clientY,me=ye.touches[0].clientX):(Be=ye.clientY,me=ye.clientX),{clientX:me,clientY:Be}},de=ye=>{T.dragging=!0,T.isClick=!0;const{clientX:me,clientY:Be}=ee(ye);x.vertical?T.startY=Be:T.startX=me,T.startPosition=Number.parseFloat(N.value),T.newPosition=T.startPosition},Y=ye=>{if(T.dragging){T.isClick=!1,S(),y();let me;const{clientX:Be,clientY:ve}=ee(ye);x.vertical?(T.currentY=ve,me=(T.startY-T.currentY)/f.value*100):(T.currentX=Be,me=(T.currentX-T.startX)/f.value*100),T.newPosition=T.startPosition+me,Ie(T.newPosition)}},Ce=()=>{T.dragging&&(setTimeout(()=>{T.dragging=!1,T.hovering||I(),T.isClick||Ie(T.newPosition),A()},0),window.removeEventListener("mousemove",Y),window.removeEventListener("touchmove",Y),window.removeEventListener("mouseup",Ce),window.removeEventListener("touchend",Ce),window.removeEventListener("contextmenu",Ce))},Ie=async ye=>{if(ye===null||Number.isNaN(+ye))return;ye<0?ye=0:ye>100&&(ye=100);const me=100/((_.value-M.value)/m.value);let ve=Math.round(ye/me)*me*(_.value-M.value)*.01+M.value;ve=Number.parseFloat(ve.toFixed(g.value)),ve!==x.modelValue&&l(gi,ve),!T.dragging&&x.modelValue!==T.oldValue&&(T.oldValue=x.modelValue),await d.nextTick(),T.dragging&&S(),B.value.updatePopper()};return d.watch(()=>T.dragging,ye=>{w(ye)}),Sn(F,"touchstart",U,{passive:!1}),{disabled:b,button:F,tooltip:B,tooltipVisible:P,showTooltip:p,wrapperStyle:O,formatValue:E,handleMouseEnter:V,handleMouseLeave:G,onButtonDown:U,onKeyDown:Z,setPosition:Ie}},dR=(x,T,l,b)=>({stops:d.computed(()=>{if(!x.showStops||x.min>x.max)return[];if(x.step===0)return Pi("ElSlider","step should not be 0."),[];const m=(x.max-x.min)/x.step,p=100*x.step/(x.max-x.min),g=Array.from({length:m-1}).map((f,v)=>(v+1)*p);return x.range?g.filter(f=>f<100*(l.value-x.min)/(x.max-x.min)||f>100*(b.value-x.min)/(x.max-x.min)):g.filter(f=>f>100*(T.firstValue-x.min)/(x.max-x.min))}),getStopStyle:m=>x.vertical?{bottom:`${m}%`}:{left:`${m}%`}}),fR=(x,T,l,b,M,_)=>{const m=f=>{M(gi,f),M(io,f)},p=()=>x.range?![l.value,b.value].every((f,v)=>f===T.oldValue[v]):x.modelValue!==T.oldValue,g=()=>{var f,v;x.min>x.max&&fh("Slider","min should not be greater than max.");const A=x.modelValue;x.range&&Array.isArray(A)?A[1]<x.min?m([x.min,x.min]):A[0]>x.max?m([x.max,x.max]):A[0]<x.min?m([x.min,A[1]]):A[1]>x.max?m([A[0],x.max]):(T.firstValue=A[0],T.secondValue=A[1],p()&&(x.validateEvent&&((f=_==null?void 0:_.validate)==null||f.call(_,"change").catch(y=>Pi(y))),T.oldValue=A.slice())):!x.range&&typeof A=="number"&&!Number.isNaN(A)&&(A<x.min?m(x.min):A>x.max?m(x.max):(T.firstValue=A,p()&&(x.validateEvent&&((v=_==null?void 0:_.validate)==null||v.call(_,"change").catch(y=>Pi(y))),T.oldValue=A)))};g(),d.watch(()=>T.dragging,f=>{f||g()}),d.watch(()=>x.modelValue,(f,v)=>{T.dragging||Array.isArray(f)&&Array.isArray(v)&&f.every((A,y)=>A===v[y])&&T.firstValue===f[0]&&T.secondValue===f[1]||g()},{deep:!0}),d.watch(()=>[x.min,x.max],()=>{g()})},AR=mi({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:yl,default:"top"}}),pR={[gi]:x=>oi(x)},vR=d.defineComponent({name:"ElSliderButton"}),mR=d.defineComponent({...vR,props:AR,emits:pR,setup(x,{expose:T,emit:l}){const b=x,M=ei("slider"),_=d.reactive({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:b.modelValue}),{disabled:m,button:p,tooltip:g,showTooltip:f,tooltipVisible:v,wrapperStyle:A,formatValue:y,handleMouseEnter:w,handleMouseLeave:B,onButtonDown:P,onKeyDown:E,setPosition:S}=hR(b,_,l),{hovering:I,dragging:F}=d.toRefs(_);return T({onButtonDown:P,onKeyDown:E,setPosition:S,hovering:I,dragging:F}),(N,O)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"button",ref:p,class:d.normalizeClass([d.unref(M).e("button-wrapper"),{hover:d.unref(I),dragging:d.unref(F)}]),style:d.normalizeStyle(d.unref(A)),tabindex:d.unref(m)?-1:0,onMouseenter:d.unref(w),onMouseleave:d.unref(B),onMousedown:d.unref(P),onFocus:d.unref(w),onBlur:d.unref(B),onKeydown:d.unref(E)},[d.createVNode(d.unref(FA),{ref_key:"tooltip",ref:g,visible:d.unref(v),placement:N.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":N.tooltipClass,disabled:!d.unref(f),persistent:""},{content:d.withCtx(()=>[d.createElementVNode("span",null,d.toDisplayString(d.unref(y)),1)]),default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass([d.unref(M).e("button"),{hover:d.unref(I),dragging:d.unref(F)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var Ey=ti(mR,[["__file","button.vue"]]);const gR=mi({mark:{type:Ur([String,Object]),default:void 0}});var _R=d.defineComponent({name:"ElSliderMarker",props:gR,setup(x){const T=ei("slider"),l=d.computed(()=>cn(x.mark)?x.mark:x.mark.label),b=d.computed(()=>cn(x.mark)?void 0:x.mark.style);return()=>d.h("div",{class:T.e("marks-text"),style:b.value},l.value)}});const yR=d.defineComponent({name:"ElSlider"}),bR=d.defineComponent({...yR,props:JD,emits:ZD,setup(x,{expose:T,emit:l}){const b=x,M=ei("slider"),{t:_}=mh(),m=d.reactive({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:p,slider:g,firstButton:f,secondButton:v,sliderDisabled:A,minValue:y,maxValue:w,runwayStyle:B,barStyle:P,resetSize:E,emitChange:S,onSliderWrapperPrevent:I,onSliderClick:F,onSliderDown:N,onSliderMarkerDown:O,setFirstValue:V,setSecondValue:G}=tR(b,m,l),{stops:U,getStopStyle:j}=dR(b,m,y,w),{inputId:K,isLabeledByFormItem:$}=Ha(b,{formItemContext:p}),W=Oo(),L=d.computed(()=>b.inputSize||W.value),z=d.computed(()=>b.ariaLabel||_("el.slider.defaultLabel",{min:b.min,max:b.max})),H=d.computed(()=>b.range?b.rangeStartLabel||_("el.slider.defaultRangeStartLabel"):z.value),Z=d.computed(()=>b.formatValueText?b.formatValueText(me.value):`${me.value}`),ee=d.computed(()=>b.rangeEndLabel||_("el.slider.defaultRangeEndLabel")),de=d.computed(()=>b.formatValueText?b.formatValueText(Be.value):`${Be.value}`),Y=d.computed(()=>[M.b(),M.m(W.value),M.is("vertical",b.vertical),{[M.m("with-input")]:b.showInput}]),Ce=eR(b);fR(b,m,y,w,l,p);const Ie=d.computed(()=>{const Me=[b.min,b.max,b.step].map(Le=>{const Ue=`${Le}`.split(".")[1];return Ue?Ue.length:0});return Math.max.apply(null,Me)}),{sliderWrapper:ye}=qD(b,m,E),{firstValue:me,secondValue:Be,sliderSize:ve}=d.toRefs(m),Pe=Me=>{m.dragging=Me};return Sn(ye,"touchstart",I,{passive:!1}),Sn(ye,"touchmove",I,{passive:!1}),d.provide(Py,{...d.toRefs(b),sliderSize:ve,disabled:A,precision:Ie,emitChange:S,resetSize:E,updateDragging:Pe}),T({onSliderClick:F}),(Me,Le)=>{var Ue,_e;return d.openBlock(),d.createElementBlock("div",{id:Me.range?d.unref(K):void 0,ref_key:"sliderWrapper",ref:ye,class:d.normalizeClass(d.unref(Y)),role:Me.range?"group":void 0,"aria-label":Me.range&&!d.unref($)?d.unref(z):void 0,"aria-labelledby":Me.range&&d.unref($)?(Ue=d.unref(p))==null?void 0:Ue.labelId:void 0},[d.createElementVNode("div",{ref_key:"slider",ref:g,class:d.normalizeClass([d.unref(M).e("runway"),{"show-input":Me.showInput&&!Me.range},d.unref(M).is("disabled",d.unref(A))]),style:d.normalizeStyle(d.unref(B)),onMousedown:d.unref(N),onTouchstartPassive:d.unref(N)},[d.createElementVNode("div",{class:d.normalizeClass(d.unref(M).e("bar")),style:d.normalizeStyle(d.unref(P))},null,6),d.createVNode(Ey,{id:Me.range?void 0:d.unref(K),ref_key:"firstButton",ref:f,"model-value":d.unref(me),vertical:Me.vertical,"tooltip-class":Me.tooltipClass,placement:Me.placement,role:"slider","aria-label":Me.range||!d.unref($)?d.unref(H):void 0,"aria-labelledby":!Me.range&&d.unref($)?(_e=d.unref(p))==null?void 0:_e.labelId:void 0,"aria-valuemin":Me.min,"aria-valuemax":Me.range?d.unref(Be):Me.max,"aria-valuenow":d.unref(me),"aria-valuetext":d.unref(Z),"aria-orientation":Me.vertical?"vertical":"horizontal","aria-disabled":d.unref(A),"onUpdate:modelValue":d.unref(V)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),Me.range?(d.openBlock(),d.createBlock(Ey,{key:0,ref_key:"secondButton",ref:v,"model-value":d.unref(Be),vertical:Me.vertical,"tooltip-class":Me.tooltipClass,placement:Me.placement,role:"slider","aria-label":d.unref(ee),"aria-valuemin":d.unref(me),"aria-valuemax":Me.max,"aria-valuenow":d.unref(Be),"aria-valuetext":d.unref(de),"aria-orientation":Me.vertical?"vertical":"horizontal","aria-disabled":d.unref(A),"onUpdate:modelValue":d.unref(G)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):d.createCommentVNode("v-if",!0),Me.showStops?(d.openBlock(),d.createElementBlock("div",{key:1},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(U),(Xe,we)=>(d.openBlock(),d.createElementBlock("div",{key:we,class:d.normalizeClass(d.unref(M).e("stop")),style:d.normalizeStyle(d.unref(j)(Xe))},null,6))),128))])):d.createCommentVNode("v-if",!0),d.unref(Ce).length>0?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createElementVNode("div",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Ce),(Xe,we)=>(d.openBlock(),d.createElementBlock("div",{key:we,style:d.normalizeStyle(d.unref(j)(Xe.position)),class:d.normalizeClass([d.unref(M).e("stop"),d.unref(M).e("marks-stop")])},null,6))),128))]),d.createElementVNode("div",{class:d.normalizeClass(d.unref(M).e("marks"))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Ce),(Xe,we)=>(d.openBlock(),d.createBlock(d.unref(_R),{key:we,mark:Xe.mark,style:d.normalizeStyle(d.unref(j)(Xe.position)),onMousedown:d.withModifiers(oe=>d.unref(O)(Xe.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):d.createCommentVNode("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),Me.showInput&&!Me.range?(d.openBlock(),d.createBlock(d.unref(FD),{key:0,ref:"input","model-value":d.unref(me),class:d.normalizeClass(d.unref(M).e("input")),step:Me.step,disabled:d.unref(A),controls:Me.showInputControls,min:Me.min,max:Me.max,precision:d.unref(Ie),debounce:Me.debounce,size:d.unref(L),"onUpdate:modelValue":d.unref(V),onChange:d.unref(S)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):d.createCommentVNode("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var wR=ti(bR,[["__file","slider.vue"]]);const My=Vn(wR),BR=mi({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:Ik},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Do},activeActionIcon:{type:Do},activeIcon:{type:Do},inactiveIcon:{type:Do},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:Ur(Function)},id:String,tabindex:{type:[String,Number]},...Hs(["ariaLabel"])}),CR={[gi]:x=>js(x)||cn(x)||oi(x),[ro]:x=>js(x)||cn(x)||oi(x),[io]:x=>js(x)||cn(x)||oi(x)},OA="ElSwitch",xR=d.defineComponent({name:OA}),PR=d.defineComponent({...xR,props:BR,emits:CR,setup(x,{expose:T,emit:l}){const b=x,{formItem:M}=No(),_=Oo(),m=ei("switch"),{inputId:p}=Ha(b,{formItemContext:M}),g=Lu(d.computed(()=>b.loading)),f=d.ref(b.modelValue!==!1),v=d.ref(),A=d.ref(),y=d.computed(()=>[m.b(),m.m(_.value),m.is("disabled",g.value),m.is("checked",S.value)]),w=d.computed(()=>[m.e("label"),m.em("label","left"),m.is("active",!S.value)]),B=d.computed(()=>[m.e("label"),m.em("label","right"),m.is("active",S.value)]),P=d.computed(()=>({width:Ah(b.width)}));d.watch(()=>b.modelValue,()=>{f.value=!0});const E=d.computed(()=>f.value?b.modelValue:!1),S=d.computed(()=>E.value===b.activeValue);[b.activeValue,b.inactiveValue].includes(E.value)||(l(gi,b.inactiveValue),l(ro,b.inactiveValue),l(io,b.inactiveValue)),d.watch(S,O=>{var V;v.value.checked=O,b.validateEvent&&((V=M==null?void 0:M.validate)==null||V.call(M,"change").catch(G=>Pi(G)))});const I=()=>{const O=S.value?b.inactiveValue:b.activeValue;l(gi,O),l(ro,O),l(io,O),d.nextTick(()=>{v.value.checked=S.value})},F=()=>{if(g.value)return;const{beforeChange:O}=b;if(!O){I();return}const V=O();[y_(V),js(V)].includes(!0)||fh(OA,"beforeChange must return type `Promise<boolean>` or `boolean`"),y_(V)?V.then(U=>{U&&I()}).catch(U=>{Pi(OA,`some error occurred: ${U}`)}):V&&I()},N=()=>{var O,V;(V=(O=v.value)==null?void 0:O.focus)==null||V.call(O)};return d.onMounted(()=>{v.value.checked=S.value}),T({focus:N,checked:S}),(O,V)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(d.unref(y)),onClick:d.withModifiers(F,["prevent"])},[d.createElementVNode("input",{id:d.unref(p),ref_key:"input",ref:v,class:d.normalizeClass(d.unref(m).e("input")),type:"checkbox",role:"switch","aria-checked":d.unref(S),"aria-disabled":d.unref(g),"aria-label":O.ariaLabel,name:O.name,"true-value":O.activeValue,"false-value":O.inactiveValue,disabled:d.unref(g),tabindex:O.tabindex,onChange:I,onKeydown:d.withKeys(F,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!O.inlinePrompt&&(O.inactiveIcon||O.inactiveText)?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(d.unref(w))},[O.inactiveIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.inactiveIcon)))]),_:1})):d.createCommentVNode("v-if",!0),!O.inactiveIcon&&O.inactiveText?(d.openBlock(),d.createElementBlock("span",{key:1,"aria-hidden":d.unref(S)},d.toDisplayString(O.inactiveText),9,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("span",{ref_key:"core",ref:A,class:d.normalizeClass(d.unref(m).e("core")),style:d.normalizeStyle(d.unref(P))},[O.inlinePrompt?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(d.unref(m).e("inner"))},[O.activeIcon||O.inactiveIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(m).is("icon"))},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(S)?O.activeIcon:O.inactiveIcon)))]),_:1},8,["class"])):O.activeText||O.inactiveText?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(m).is("text")),"aria-hidden":!d.unref(S)},d.toDisplayString(d.unref(S)?O.activeText:O.inactiveText),11,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0),d.createElementVNode("div",{class:d.normalizeClass(d.unref(m).e("action"))},[O.loading?(d.openBlock(),d.createBlock(d.unref(mn),{key:0,class:d.normalizeClass(d.unref(m).is("loading"))},{default:d.withCtx(()=>[d.createVNode(d.unref(wn.Loading))]),_:1},8,["class"])):d.unref(S)?d.renderSlot(O.$slots,"active-action",{key:1},()=>[O.activeActionIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.activeActionIcon)))]),_:1})):d.createCommentVNode("v-if",!0)]):d.unref(S)?d.createCommentVNode("v-if",!0):d.renderSlot(O.$slots,"inactive-action",{key:2},()=>[O.inactiveActionIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.inactiveActionIcon)))]),_:1})):d.createCommentVNode("v-if",!0)])],2)],6),!O.inlinePrompt&&(O.activeIcon||O.activeText)?(d.openBlock(),d.createElementBlock("span",{key:1,class:d.normalizeClass(d.unref(B))},[O.activeIcon?(d.openBlock(),d.createBlock(d.unref(mn),{key:0},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(O.activeIcon)))]),_:1})):d.createCommentVNode("v-if",!0),!O.activeIcon&&O.activeText?(d.openBlock(),d.createElementBlock("span",{key:1,"aria-hidden":!d.unref(S)},d.toDisplayString(O.activeText),9,["aria-hidden"])):d.createCommentVNode("v-if",!0)],2)):d.createCommentVNode("v-if",!0)],10,["onClick"]))}});var ER=ti(PR,[["__file","switch.vue"]]);const MR=Vn(ER),Sl="$treeNodeId",Sy=function(x,T){!T||T[Sl]||Object.defineProperty(T,Sl,{value:x.id,enumerable:!1,configurable:!1,writable:!1})},NA=function(x,T){return x?T[x]:T[Sl]},UA=(x,T,l)=>{const b=x.value.currentNode;l();const M=x.value.currentNode;b!==M&&T("current-change",M?M.data:null,M)},jA=x=>{let T=!0,l=!0,b=!0;for(let M=0,_=x.length;M<_;M++){const m=x[M];(m.checked!==!0||m.indeterminate)&&(T=!1,m.disabled||(b=!1)),(m.checked!==!1||m.indeterminate)&&(l=!1)}return{all:T,none:l,allWithoutDisable:b,half:!T&&!l}},Uu=function(x){if(x.childNodes.length===0||x.loading)return;const{all:T,none:l,half:b}=jA(x.childNodes);T?(x.checked=!0,x.indeterminate=!1):b?(x.checked=!1,x.indeterminate=!0):l&&(x.checked=!1,x.indeterminate=!1);const M=x.parent;!M||M.level===0||x.store.checkStrictly||Uu(M)},Ph=function(x,T){const l=x.store.props,b=x.data||{},M=l[T];if(typeof M=="function")return M(b,x);if(typeof M=="string")return b[M];if(typeof M>"u"){const _=b[T];return _===void 0?"":_}};let SR=0,VA=class Hf{constructor(T){this.id=SR++,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 l in T)bu(T,l)&&(this[l]=T[l]);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 l=T.props;if(l&&typeof l.isLeaf<"u"){const _=Ph(this,"isLeaf");typeof _=="boolean"&&(this.isLeafByUser=_)}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.isLeafByUser&&this.expand(),Array.isArray(this.data)||Sy(this,this.data),!this.data)return;const b=T.defaultExpandedKeys,M=T.key;M&&b&&b.includes(this.key)&&this.expand(null,T.autoExpandParent),M&&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)||Sy(this,T),this.data=T,this.childNodes=[];let l;this.level===0&&Array.isArray(this.data)?l=this.data:l=Ph(this,"children")||[];for(let b=0,M=l.length;b<M;b++)this.insertChild({data:l[b]})}get label(){return Ph(this,"label")}get key(){const T=this.store.key;return this.data?this.data[T]:null}get disabled(){return Ph(this,"disabled")}get nextSibling(){const T=this.parent;if(T){const l=T.childNodes.indexOf(this);if(l>-1)return T.childNodes[l+1]}return null}get previousSibling(){const T=this.parent;if(T){const l=T.childNodes.indexOf(this);if(l>-1)return l>0?T.childNodes[l-1]:null}return null}contains(T,l=!0){return(this.childNodes||[]).some(b=>b===T||l&&b.contains(T))}remove(){const T=this.parent;T&&T.removeChild(this)}insertChild(T,l,b){if(!T)throw new Error("InsertChild error: child is required.");if(!(T instanceof Hf)){if(!b){const M=this.getChildren(!0);M.includes(T.data)||(typeof l>"u"||l<0?M.push(T.data):M.splice(l,0,T.data))}Object.assign(T,{parent:this,store:this.store}),T=d.reactive(new Hf(T)),T instanceof Hf&&T.initialize()}T.level=this.level+1,typeof l>"u"||l<0?this.childNodes.push(T):this.childNodes.splice(l,0,T),this.updateLeafState()}insertBefore(T,l){let b;l&&(b=this.childNodes.indexOf(l)),this.insertChild(T,b)}insertAfter(T,l){let b;l&&(b=this.childNodes.indexOf(l),b!==-1&&(b+=1)),this.insertChild(T,b)}removeChild(T){const l=this.getChildren()||[],b=l.indexOf(T.data);b>-1&&l.splice(b,1);const M=this.childNodes.indexOf(T);M>-1&&(this.store&&this.store.deregisterNode(T),T.parent=null,this.childNodes.splice(M,1)),this.updateLeafState()}removeChildByData(T){let l=null;for(let b=0;b<this.childNodes.length;b++)if(this.childNodes[b].data===T){l=this.childNodes[b];break}l&&this.removeChild(l)}expand(T,l){const b=()=>{if(l){let M=this.parent;for(;M.level>0;)M.expanded=!0,M=M.parent}this.expanded=!0,T&&T(),this.childNodes.forEach(M=>{M.canFocus=!0})};this.shouldLoadData()?this.loadData(M=>{Array.isArray(M)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Uu(this),b())}):b()}doCreateChildren(T,l={}){T.forEach(b=>{this.insertChild(Object.assign({data:b},l),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,l,b,M){if(this.indeterminate=T==="half",this.checked=T===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:m,allWithoutDisable:p}=jA(this.childNodes);!this.isLeaf&&!m&&p&&(this.checked=!1,T=!1);const g=()=>{if(l){const f=this.childNodes;for(let y=0,w=f.length;y<w;y++){const B=f[y];M=M||T!==!1;const P=B.disabled?B.checked:M;B.setChecked(P,l,!0,M)}const{half:v,all:A}=jA(f);A||(this.checked=A,this.indeterminate=v)}};if(this.shouldLoadData()){this.loadData(()=>{g(),Uu(this)},{checked:T!==!1});return}else g()}const _=this.parent;!_||_.level===0||b||Uu(_)}getChildren(T=!1){if(this.level===0)return this.data;const l=this.data;if(!l)return null;const b=this.store.props;let M="children";return b&&(M=b.children||"children"),l[M]===void 0&&(l[M]=null),T&&!l[M]&&(l[M]=[]),l[M]}updateChildren(){const T=this.getChildren()||[],l=this.childNodes.map(_=>_.data),b={},M=[];T.forEach((_,m)=>{const p=_[Sl];!!p&&l.findIndex(f=>f[Sl]===p)>=0?b[p]={index:m,data:_}:M.push({index:m,data:_})}),this.store.lazy||l.forEach(_=>{b[_[Sl]]||this.removeChildByData(_)}),M.forEach(({index:_,data:m})=>{this.insertChild({data:m},_)}),this.updateLeafState()}loadData(T,l={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(l).length)){this.loading=!0;const b=_=>{this.childNodes=[],this.doCreateChildren(_,l),this.loaded=!0,this.loading=!1,this.updateLeafState(),T&&T.call(this,_)},M=()=>{this.loading=!1};this.store.load(this,b,M)}else T&&T.call(this)}eachNode(T){const l=[this];for(;l.length;){const b=l.shift();l.unshift(...b.childNodes),T(b)}}reInitChecked(){this.store.checkStrictly||Uu(this)}};class TR{constructor(T){this.currentNode=null,this.currentNodeKey=null;for(const l in T)bu(T,l)&&(this[l]=T[l]);this.nodesMap={}}initialize(){if(this.root=new VA({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const T=this.load;T(this.root,l=>{this.root.doCreateChildren(l),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(T){const l=this.filterNodeMethod,b=this.lazy,M=function(_){const m=_.root?_.root.childNodes:_.childNodes;if(m.forEach(p=>{p.visible=l.call(p,T,p.data,p),M(p)}),!_.visible&&m.length){let p=!0;p=!m.some(g=>g.visible),_.root?_.root.visible=p===!1:_.visible=p===!1}T&&_.visible&&!_.isLeaf&&(!b||_.loaded)&&_.expand()};M(this)}setData(T){T!==this.root.data?(this.root.setData(T),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(T){if(T instanceof VA)return T;const l=jn(T)?NA(this.key,T):T;return this.nodesMap[l]||null}insertBefore(T,l){const b=this.getNode(l);b.parent.insertBefore({data:T},b)}insertAfter(T,l){const b=this.getNode(l);b.parent.insertAfter({data:T},b)}remove(T){const l=this.getNode(T);l&&l.parent&&(l===this.currentNode&&(this.currentNode=null),l.parent.removeChild(l))}append(T,l){const b=ml(l)?this.root:this.getNode(l);b&&b.insertChild({data:T})}_initDefaultCheckedNodes(){const T=this.defaultCheckedKeys||[],l=this.nodesMap;T.forEach(b=>{const M=l[b];M&&M.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 l=this.key;!T||!T.data||(l?T.key!==void 0&&(this.nodesMap[T.key]=T):this.nodesMap[T.id]=T)}deregisterNode(T){!this.key||!T||!T.data||(T.childNodes.forEach(b=>{this.deregisterNode(b)}),delete this.nodesMap[T.key])}getCheckedNodes(T=!1,l=!1){const b=[],M=function(_){(_.root?_.root.childNodes:_.childNodes).forEach(p=>{(p.checked||l&&p.indeterminate)&&(!T||T&&p.isLeaf)&&b.push(p.data),M(p)})};return M(this),b}getCheckedKeys(T=!1){return this.getCheckedNodes(T).map(l=>(l||{})[this.key])}getHalfCheckedNodes(){const T=[],l=function(b){(b.root?b.root.childNodes:b.childNodes).forEach(_=>{_.indeterminate&&T.push(_.data),l(_)})};return l(this),T}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(T=>(T||{})[this.key])}_getAllNodes(){const T=[],l=this.nodesMap;for(const b in l)bu(l,b)&&T.push(l[b]);return T}updateChildren(T,l){const b=this.nodesMap[T];if(!b)return;const M=b.childNodes;for(let _=M.length-1;_>=0;_--){const m=M[_];this.remove(m.data)}for(let _=0,m=l.length;_<m;_++){const p=l[_];this.append(p,b.data)}}_setCheckedKeys(T,l=!1,b){const M=this._getAllNodes().sort((g,f)=>g.level-f.level),_=Object.create(null),m=Object.keys(b);M.forEach(g=>g.setChecked(!1,!1));const p=g=>{g.childNodes.forEach(f=>{var v;_[f.data[T]]=!0,(v=f.childNodes)!=null&&v.length&&p(f)})};for(let g=0,f=M.length;g<f;g++){const v=M[g],A=v.data[T].toString();if(!m.includes(A)){v.checked&&!_[A]&&v.setChecked(!1,!1);continue}if(v.childNodes.length&&p(v),v.isLeaf||this.checkStrictly){v.setChecked(!0,!1);continue}if(v.setChecked(!0,!0),l){v.setChecked(!1,!1);const w=function(B){B.childNodes.forEach(E=>{E.isLeaf||E.setChecked(!1,!1),w(E)})};w(v)}}}setCheckedNodes(T,l=!1){const b=this.key,M={};T.forEach(_=>{M[(_||{})[b]]=!0}),this._setCheckedKeys(b,l,M)}setCheckedKeys(T,l=!1){this.defaultCheckedKeys=T;const b=this.key,M={};T.forEach(_=>{M[_]=!0}),this._setCheckedKeys(b,l,M)}setDefaultExpandedKeys(T){T=T||[],this.defaultExpandedKeys=T,T.forEach(l=>{const b=this.getNode(l);b&&b.expand(null,this.autoExpandParent)})}setChecked(T,l,b){const M=this.getNode(T);M&&M.setChecked(!!l,b)}getCurrentNode(){return this.currentNode}setCurrentNode(T){const l=this.currentNode;l&&(l.isCurrent=!1),this.currentNode=T,this.currentNode.isCurrent=!0}setUserCurrentNode(T,l=!0){const b=T[this.key],M=this.nodesMap[b];this.setCurrentNode(M),l&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(T,l=!0){if(T==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const b=this.getNode(T);b&&(this.setCurrentNode(b),l&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const kR=d.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(x){const T=ei("tree"),l=d.inject("NodeInstance"),b=d.inject("RootTree");return()=>{const M=x.node,{data:_,store:m}=M;return x.renderContent?x.renderContent(d.h,{_self:l,node:M,data:_,store:m}):d.renderSlot(b.ctx.slots,"default",{node:M,data:_},()=>[d.h("span",{class:T.be("node","label")},[M.label])])}}});var IR=ti(kR,[["__file","tree-node-content.vue"]]);function Ty(x){const T=d.inject("TreeNodeMap",null),l={treeNodeExpand:b=>{x.node!==b&&x.node.collapse()},children:[]};return T&&T.children.push(l),d.provide("TreeNodeMap",l),{broadcastExpanded:b=>{if(x.accordion)for(const M of l.children)M.treeNodeExpand(b)}}}const ky=Symbol("dragEvents");function FR({props:x,ctx:T,el$:l,dropIndicator$:b,store:M}){const _=ei("tree"),m=d.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),p=({event:v,treeNode:A})=>{if(typeof x.allowDrag=="function"&&!x.allowDrag(A.node))return v.preventDefault(),!1;v.dataTransfer.effectAllowed="move";try{v.dataTransfer.setData("text/plain","")}catch{}m.value.draggingNode=A,T.emit("node-drag-start",A.node,v)},g=({event:v,treeNode:A})=>{const y=A,w=m.value.dropNode;w&&w.node.id!==y.node.id&&lA(w.$el,_.is("drop-inner"));const B=m.value.draggingNode;if(!B||!y)return;let P=!0,E=!0,S=!0,I=!0;typeof x.allowDrop=="function"&&(P=x.allowDrop(B.node,y.node,"prev"),I=E=x.allowDrop(B.node,y.node,"inner"),S=x.allowDrop(B.node,y.node,"next")),v.dataTransfer.dropEffect=E||P||S?"move":"none",(P||E||S)&&(w==null?void 0:w.node.id)!==y.node.id&&(w&&T.emit("node-drag-leave",B.node,w.node,v),T.emit("node-drag-enter",B.node,y.node,v)),P||E||S?m.value.dropNode=y:m.value.dropNode=null,y.node.nextSibling===B.node&&(S=!1),y.node.previousSibling===B.node&&(P=!1),y.node.contains(B.node,!1)&&(E=!1),(B.node===y.node||B.node.contains(y.node))&&(P=!1,E=!1,S=!1);const F=y.$el.querySelector(`.${_.be("node","content")}`).getBoundingClientRect(),N=l.value.getBoundingClientRect();let O;const V=P?E?.25:S?.45:1:-1,G=S?E?.75:P?.55:0:1;let U=-9999;const j=v.clientY-F.top;j<F.height*V?O="before":j>F.height*G?O="after":E?O="inner":O="none";const K=y.$el.querySelector(`.${_.be("node","expand-icon")}`).getBoundingClientRect(),$=b.value;O==="before"?U=K.top-N.top:O==="after"&&(U=K.bottom-N.top),$.style.top=`${U}px`,$.style.left=`${K.right-N.left}px`,O==="inner"?Sk(y.$el,_.is("drop-inner")):lA(y.$el,_.is("drop-inner")),m.value.showDropIndicator=O==="before"||O==="after",m.value.allowDrop=m.value.showDropIndicator||I,m.value.dropType=O,T.emit("node-drag-over",B.node,y.node,v)},f=v=>{const{draggingNode:A,dropType:y,dropNode:w}=m.value;if(v.preventDefault(),v.dataTransfer.dropEffect="move",A&&w){const B={data:A.node.data};y!=="none"&&A.node.remove(),y==="before"?w.node.parent.insertBefore(B,w.node):y==="after"?w.node.parent.insertAfter(B,w.node):y==="inner"&&w.node.insertChild(B),y!=="none"&&(M.value.registerNode(B),M.value.key&&A.node.eachNode(P=>{var E;(E=M.value.nodesMap[P.data[M.value.key]])==null||E.setChecked(P.checked,!M.value.checkStrictly)})),lA(w.$el,_.is("drop-inner")),T.emit("node-drag-end",A.node,w.node,y,v),y!=="none"&&T.emit("node-drop",A.node,w.node,y,v)}A&&!w&&T.emit("node-drag-end",A.node,null,y,v),m.value.showDropIndicator=!1,m.value.draggingNode=null,m.value.dropNode=null,m.value.allowDrop=!0};return d.provide(ky,{treeNodeDragStart:p,treeNodeDragOver:g,treeNodeDragEnd:f}),{dragState:m}}const DR=d.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:ED,ElCheckbox:vy,NodeContent:IR,ElIcon:mn,Loading:wn.Loading},props:{node:{type:VA,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(x,T){const l=ei("tree"),{broadcastExpanded:b}=Ty(x),M=d.inject("RootTree"),_=d.ref(!1),m=d.ref(!1),p=d.ref(null),g=d.ref(null),f=d.ref(null),v=d.inject(ky),A=d.getCurrentInstance();d.provide("NodeInstance",A),M||Pi("Tree","Can not find node's tree."),x.node.expanded&&(_.value=!0,m.value=!0);const y=M.props.props.children||"children";d.watch(()=>{const j=x.node.data[y];return j&&[...j]},()=>{x.node.updateChildren()}),d.watch(()=>x.node.indeterminate,j=>{P(x.node.checked,j)}),d.watch(()=>x.node.checked,j=>{P(j,x.node.indeterminate)}),d.watch(()=>x.node.childNodes.length,()=>x.node.reInitChecked()),d.watch(()=>x.node.expanded,j=>{d.nextTick(()=>_.value=j),j&&(m.value=!0)});const w=j=>NA(M.props.nodeKey,j.data),B=j=>{const K=x.props.class;if(!K)return{};let $;if(en(K)){const{data:W}=j;$=K(W,j)}else $=K;return cn($)?{[$]:!0}:$},P=(j,K)=>{(p.value!==j||g.value!==K)&&M.ctx.emit("check-change",x.node.data,j,K),p.value=j,g.value=K},E=j=>{UA(M.store,M.ctx.emit,()=>M.store.value.setCurrentNode(x.node)),M.currentNode.value=x.node,M.props.expandOnClickNode&&I(),M.props.checkOnClickNode&&!x.node.disabled&&F(null,{target:{checked:!x.node.checked}}),M.ctx.emit("node-click",x.node.data,x.node,A,j)},S=j=>{M.instance.vnode.props.onNodeContextmenu&&(j.stopPropagation(),j.preventDefault()),M.ctx.emit("node-contextmenu",j,x.node.data,x.node,A)},I=()=>{x.node.isLeaf||(_.value?(M.ctx.emit("node-collapse",x.node.data,x.node,A),x.node.collapse()):(x.node.expand(),T.emit("node-expand",x.node.data,x.node,A)))},F=(j,K)=>{x.node.setChecked(K.target.checked,!M.props.checkStrictly),d.nextTick(()=>{const $=M.store.value;M.ctx.emit("check",x.node.data,{checkedNodes:$.getCheckedNodes(),checkedKeys:$.getCheckedKeys(),halfCheckedNodes:$.getHalfCheckedNodes(),halfCheckedKeys:$.getHalfCheckedKeys()})})};return{ns:l,node$:f,tree:M,expanded:_,childNodeRendered:m,oldChecked:p,oldIndeterminate:g,getNodeKey:w,getNodeClass:B,handleSelectChange:P,handleClick:E,handleContextMenu:S,handleExpandIconClick:I,handleCheckChange:F,handleChildNodeExpand:(j,K,$)=>{b(K),M.ctx.emit("node-expand",j,K,$)},handleDragStart:j=>{M.props.draggable&&v.treeNodeDragStart({event:j,treeNode:x})},handleDragOver:j=>{j.preventDefault(),M.props.draggable&&v.treeNodeDragOver({event:j,treeNode:{$el:f.value,node:x.node}})},handleDrop:j=>{j.preventDefault()},handleDragEnd:j=>{M.props.draggable&&v.treeNodeDragEnd(j)},CaretRight:wn.CaretRight}}});function RR(x,T,l,b,M,_){const m=d.resolveComponent("el-icon"),p=d.resolveComponent("el-checkbox"),g=d.resolveComponent("loading"),f=d.resolveComponent("node-content"),v=d.resolveComponent("el-tree-node"),A=d.resolveComponent("el-collapse-transition");return d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref:"node$",class:d.normalizeClass([x.ns.b("node"),x.ns.is("expanded",x.expanded),x.ns.is("current",x.node.isCurrent),x.ns.is("hidden",!x.node.visible),x.ns.is("focusable",!x.node.disabled),x.ns.is("checked",!x.node.disabled&&x.node.checked),x.getNodeClass(x.node)]),role:"treeitem",tabindex:"-1","aria-expanded":x.expanded,"aria-disabled":x.node.disabled,"aria-checked":x.node.checked,draggable:x.tree.props.draggable,"data-key":x.getNodeKey(x.node),onClick:d.withModifiers(x.handleClick,["stop"]),onContextmenu:x.handleContextMenu,onDragstart:d.withModifiers(x.handleDragStart,["stop"]),onDragover:d.withModifiers(x.handleDragOver,["stop"]),onDragend:d.withModifiers(x.handleDragEnd,["stop"]),onDrop:d.withModifiers(x.handleDrop,["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(x.ns.be("node","content")),style:d.normalizeStyle({paddingLeft:(x.node.level-1)*x.tree.props.indent+"px"})},[x.tree.props.icon||x.CaretRight?(d.openBlock(),d.createBlock(m,{key:0,class:d.normalizeClass([x.ns.be("node","expand-icon"),x.ns.is("leaf",x.node.isLeaf),{expanded:!x.node.isLeaf&&x.expanded}]),onClick:d.withModifiers(x.handleExpandIconClick,["stop"])},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.tree.props.icon||x.CaretRight)))]),_:1},8,["class","onClick"])):d.createCommentVNode("v-if",!0),x.showCheckbox?(d.openBlock(),d.createBlock(p,{key:1,"model-value":x.node.checked,indeterminate:x.node.indeterminate,disabled:!!x.node.disabled,onClick:d.withModifiers(()=>{},["stop"]),onChange:x.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):d.createCommentVNode("v-if",!0),x.node.loading?(d.openBlock(),d.createBlock(m,{key:2,class:d.normalizeClass([x.ns.be("node","loading-icon"),x.ns.is("loading")])},{default:d.withCtx(()=>[d.createVNode(g)]),_:1},8,["class"])):d.createCommentVNode("v-if",!0),d.createVNode(f,{node:x.node,"render-content":x.renderContent},null,8,["node","render-content"])],6),d.createVNode(A,null,{default:d.withCtx(()=>[!x.renderAfterExpand||x.childNodeRendered?d.withDirectives((d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.be("node","children")),role:"group","aria-expanded":x.expanded},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.node.childNodes,y=>(d.openBlock(),d.createBlock(v,{key:x.getNodeKey(y),"render-content":x.renderContent,"render-after-expand":x.renderAfterExpand,"show-checkbox":x.showCheckbox,node:y,accordion:x.accordion,props:x.props,onNodeExpand:x.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[d.vShow,x.expanded]]):d.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[d.vShow,x.node.visible]])}var LR=ti(DR,[["render",RR],["__file","tree-node.vue"]]);function OR({el$:x},T){const l=ei("tree"),b=d.shallowRef([]),M=d.shallowRef([]);d.onMounted(()=>{m()}),d.onUpdated(()=>{b.value=Array.from(x.value.querySelectorAll("[role=treeitem]")),M.value=Array.from(x.value.querySelectorAll("input[type=checkbox]"))}),d.watch(M,p=>{p.forEach(g=>{g.setAttribute("tabindex","-1")})}),Sn(x,"keydown",p=>{const g=p.target;if(!g.className.includes(l.b("node")))return;const f=p.code;b.value=Array.from(x.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`));const v=b.value.indexOf(g);let A;if([us.up,us.down].includes(f)){if(p.preventDefault(),f===us.up){A=v===-1?0:v!==0?v-1:b.value.length-1;const w=A;for(;!T.value.getNode(b.value[A].dataset.key).canFocus;){if(A--,A===w){A=-1;break}A<0&&(A=b.value.length-1)}}else{A=v===-1?0:v<b.value.length-1?v+1:0;const w=A;for(;!T.value.getNode(b.value[A].dataset.key).canFocus;){if(A++,A===w){A=-1;break}A>=b.value.length&&(A=0)}}A!==-1&&b.value[A].focus()}[us.left,us.right].includes(f)&&(p.preventDefault(),g.click());const y=g.querySelector('[type="checkbox"]');[us.enter,us.space].includes(f)&&y&&(p.preventDefault(),y.click())});const m=()=>{var p;b.value=Array.from(x.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`)),M.value=Array.from(x.value.querySelectorAll("input[type=checkbox]"));const g=x.value.querySelectorAll(`.${l.is("checked")}[role=treeitem]`);if(g.length){g[0].setAttribute("tabindex","0");return}(p=b.value[0])==null||p.setAttribute("tabindex","0")}}const NR=d.defineComponent({name:"ElTree",components:{ElTreeNode:LR},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:Do}},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(x,T){const{t:l}=mh(),b=ei("tree"),M=d.inject(Nu,null),_=d.ref(new TR({key:x.nodeKey,data:x.data,lazy:x.lazy,props:x.props,load:x.load,currentNodeKey:x.currentNodeKey,checkStrictly:x.checkStrictly,checkDescendants:x.checkDescendants,defaultCheckedKeys:x.defaultCheckedKeys,defaultExpandedKeys:x.defaultExpandedKeys,autoExpandParent:x.autoExpandParent,defaultExpandAll:x.defaultExpandAll,filterNodeMethod:x.filterNodeMethod}));_.value.initialize();const m=d.ref(_.value.root),p=d.ref(null),g=d.ref(null),f=d.ref(null),{broadcastExpanded:v}=Ty(x),{dragState:A}=FR({props:x,ctx:T,el$:g,dropIndicator$:f,store:_});OR({el$:g},_);const y=d.computed(()=>{const{childNodes:de}=m.value,Y=M?M.hasFilteredOptions!==0:!1;return(!de||de.length===0||de.every(({visible:Ce})=>!Ce))&&!Y});d.watch(()=>x.currentNodeKey,de=>{_.value.setCurrentNodeKey(de)}),d.watch(()=>x.defaultCheckedKeys,de=>{_.value.setDefaultCheckedKey(de)}),d.watch(()=>x.defaultExpandedKeys,de=>{_.value.setDefaultExpandedKeys(de)}),d.watch(()=>x.data,de=>{_.value.setData(de)},{deep:!0}),d.watch(()=>x.checkStrictly,de=>{_.value.checkStrictly=de});const w=de=>{if(!x.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");_.value.filter(de)},B=de=>NA(x.nodeKey,de.data),P=de=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const Y=_.value.getNode(de);if(!Y)return[];const Ce=[Y.data];let Ie=Y.parent;for(;Ie&&Ie!==m.value;)Ce.push(Ie.data),Ie=Ie.parent;return Ce.reverse()},E=(de,Y)=>_.value.getCheckedNodes(de,Y),S=de=>_.value.getCheckedKeys(de),I=()=>{const de=_.value.getCurrentNode();return de?de.data:null},F=()=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const de=I();return de?de[x.nodeKey]:null},N=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");_.value.setCheckedNodes(de,Y)},O=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");_.value.setCheckedKeys(de,Y)},V=(de,Y,Ce)=>{_.value.setChecked(de,Y,Ce)},G=()=>_.value.getHalfCheckedNodes(),U=()=>_.value.getHalfCheckedKeys(),j=(de,Y=!0)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");UA(_,T.emit,()=>{v(de),_.value.setUserCurrentNode(de,Y)})},K=(de,Y=!0)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");UA(_,T.emit,()=>{v(),_.value.setCurrentNodeKey(de,Y)})},$=de=>_.value.getNode(de),W=de=>{_.value.remove(de)},L=(de,Y)=>{_.value.append(de,Y)},z=(de,Y)=>{_.value.insertBefore(de,Y)},H=(de,Y)=>{_.value.insertAfter(de,Y)},Z=(de,Y,Ce)=>{v(Y),T.emit("node-expand",de,Y,Ce)},ee=(de,Y)=>{if(!x.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");_.value.updateChildren(de,Y)};return d.provide("RootTree",{ctx:T,props:x,store:_,root:m,currentNode:p,instance:d.getCurrentInstance()}),d.provide(Ru,void 0),{ns:b,store:_,root:m,currentNode:p,dragState:A,el$:g,dropIndicator$:f,isEmpty:y,filter:w,getNodeKey:B,getNodePath:P,getCheckedNodes:E,getCheckedKeys:S,getCurrentNode:I,getCurrentKey:F,setCheckedNodes:N,setCheckedKeys:O,setChecked:V,getHalfCheckedNodes:G,getHalfCheckedKeys:U,setCurrentNode:j,setCurrentKey:K,t:l,getNode:$,remove:W,append:L,insertBefore:z,insertAfter:H,handleNodeExpand:Z,updateKeyChildren:ee}}});function UR(x,T,l,b,M,_){const m=d.resolveComponent("el-tree-node");return d.openBlock(),d.createElementBlock("div",{ref:"el$",class:d.normalizeClass([x.ns.b(),x.ns.is("dragging",!!x.dragState.draggingNode),x.ns.is("drop-not-allow",!x.dragState.allowDrop),x.ns.is("drop-inner",x.dragState.dropType==="inner"),{[x.ns.m("highlight-current")]:x.highlightCurrent}]),role:"tree"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.root.childNodes,p=>(d.openBlock(),d.createBlock(m,{key:x.getNodeKey(p),node:p,props:x.props,accordion:x.accordion,"render-after-expand":x.renderAfterExpand,"show-checkbox":x.showCheckbox,"render-content":x.renderContent,onNodeExpand:x.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),x.isEmpty?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(x.ns.e("empty-block"))},[d.renderSlot(x.$slots,"empty",{},()=>{var p;return[d.createElementVNode("span",{class:d.normalizeClass(x.ns.e("empty-text"))},d.toDisplayString((p=x.emptyText)!=null?p:x.t("el.tree.emptyText")),3)]})],2)):d.createCommentVNode("v-if",!0),d.withDirectives(d.createElementVNode("div",{ref:"dropIndicator$",class:d.normalizeClass(x.ns.e("drop-indicator"))},null,2),[[d.vShow,x.dragState.showDropIndicator]])],2)}var jR=ti(NR,[["render",UR],["__file","tree.vue"]]);const VR=Vn(jR),Nr=vE();let fa={BIMX_CONFIGS:{viewerManager:!1,Toolbar:!1,RoamTool:!1},BimViewer:{viewerManager:!1}};const HR="https://bimkk-api-abtest.tctwins.com",Er="https://bimkk-oss-production.oss-cn-beijing.aliyuncs.com",QR="https://convert-abtest.tctwins.com",zR={isMember:!1,isInShare:!1,isShareHost:!1,isShareClient:!1},GR={file:!1,image:!1,record:!1,text:!1,video:!1},Iy={offsetX:0,offsetY:0},WR={pos:"right-bottom",posNum:[0,0]},KR=120,XR="blue",$R=!1,YR="right",JR="left",ZR=0,qR=0,eL=0,tL=0,rL={pos:"bottom",posNum:[18]},iL={pos:"bottom",posNum:[70]},nL={pos:"bottom",posNum:[70]};dr.BIMX_CONFIGS=void 0;function sL(){dr.BIMX_CONFIGS={isMobile:!1,isPc:!1,showRoam:!0,showTree:!1,userInfo:zR,annoLimit:GR,commentOffset:Iy,measureOffset:Iy,skyboxImg:void 0,topHeight:ZR,leftWidth:tL,bottomHeight:eL,rightWidth:qR,inspectorPos:YR,treePos:JR,commentPos:rL,annotationPos:iL,roamPos:nL,navCubePos:WR,navCubeSize:KR,themeColor:XR,hideTool:$R}}function Fy(x=""){Nr.emit("BIMX_CONFIGS",x)}function Dy(x){for(const T in x)Vi(T,x[T],!1);Fy()}function Vi(x,T,l=!0){T&&(dr.BIMX_CONFIGS[x]=T,l&&(x=="isMobile"||x=="measureOffset"||x=="commentOffset"||x=="navCubePos"||x=="navCubeSize")&&Fy(x))}function Nt(x){return dr.BIMX_CONFIGS[x]}const Hi=pE.defineStore("toolbar",{state:()=>({tools:[{id:0,key:"tree",name:"结构树",hasActiveState:!0,component:"StructureTree",isShowDelimiter:!1,img:"tree",imgActive:"tree-active",isActive:!1},{id:1,key:"reseta",name:"复位",hasActiveState:!1,component:"",isShowDelimiter:!0,img:"home-page",imgActive:"home-page",isActive:!1},{id:2,key:"roam",name:"漫游",hasActiveState:!0,component:"RoamTool",isShowDelimiter:!0,img:"roam",imgActive:"roam-active",isActive:!1},{id:3,key:"measure",name:"测量",hasActiveState:!0,component:"MeasureTool",isShowDelimiter:!1,img:"measure",imgActive:"measure-active",isActive:!1},{id:4,key:"section",name:"剖切",hasActiveState:!0,component:"SectionTool",isShowDelimiter:!0,img:"slicing",imgActive:"slicing-active",isActive:!1},{id:5,key:"comment",name:"批注",hasActiveState:!0,component:"CommentTool",isShowDelimiter:!1,img:"annotations",imgActive:"annotations-active",isActive:!1},{id:6,key:"anno",name:"标注",hasActiveState:!0,component:"AnnotationTool",isShowDelimiter:!0,img:"label",imgActive:"label-active",isActive:!1},{id:7,key:"screenshot",name:"截图",hasActiveState:!0,component:"ScreenShotTool",isShowDelimiter:!1,img:"screenshot",imgActive:"screenshot-active",isActive:!1},{id:8,key:"inspector",name:"属性",hasActiveState:!0,component:"InspectorTool",isShowDelimiter:!1,img:"detailed-information",imgActive:"detailed-information-active",isActive:!1},{id:9,key:"setting",name:"设置",hasActiveState:!0,component:"SettingTool",isShowDelimiter:!0,img:"settings",imgActive:"settings-active",isActive:!1},{id:10,key:"fullscreena",name:"全屏",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"full",imgActive:"full-small",isActive:!1},{id:11,key:"resetb",name:"复位2",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"home",imgActive:"home",isActive:!1},{id:12,key:"navigate",name:"导航",hasActiveState:!0,component:"NavigateTool",isShowDelimiter:!1,img:"best-view",imgActive:"best-view-active",isActive:!1},{id:13,key:"fullscreenb",name:"全屏2",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"full-screen",imgActive:"full-screen-exit",isActive:!1},{id:14,key:"share",name:"分享",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"shared",imgActive:"shared",isActive:!1},{id:15,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate",imgActive:"cooperate",isActive:!1},{id:16,key:"hidden",name:"隐藏",hasActiveState:!0,component:"HiddenTool",isShowDelimiter:!1,img:"more",imgActive:"more-active",isActive:!1}],webExtraTools:[{id:17,key:"enjoy",name:"共享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"enjoy-icon",imgActive:"enjoyed-icon",isActive:!1},{id:18,key:"share",name:"分享",hasActiveState:!0,component:"",isShowDelimiter:!1,img:"share-icon",imgActive:"shared-icon",isActive:!1},{id:19,key:"cooperate",name:"协同",hasActiveState:!1,component:"",isShowDelimiter:!1,img:"cooperate-icon",imgActive:"cooperated-icon",isActive:!1}],visibleToolIds:[],readyToolIds:[]}),actions:{toggleToolVisibility(x){const T=this.visibleToolIds.indexOf(x);T===-1?this.visibleToolIds.push(x):this.visibleToolIds.splice(T,1)},setEnableTools(x){this.visibleToolIds=x},setEnableToolsByKey(x){let T=[];Nt("isMobile")?T=Ry(x,aL):T=Ry(x,lL);const l=[];for(let b=0;b<T.length;b++){const M=this.tools.find(_=>_.key===T[b]);M&&l.push(M.id)}this.visibleToolIds=this.visibleToolIds.concat(l)},setToolActiveStatus(x,T){const l=this.tools.find(b=>b.id===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setToolActiveStatusBykey(x,T){const l=this.tools.find(b=>b.key===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setAllToolClose(x=[]){if(x.length>0){for(let T=0;T<this.visibleToolIds.length;T++)x.includes(this.visibleToolIds[T])||(this.tools[this.visibleToolIds[T]].isActive=!1);for(let T=0;T<this.webExtraTools.length;T++)x.includes(this.webExtraTools[T].id)||(this.webExtraTools[T].isActive=!1)}else{for(let T=0;T<this.visibleToolIds.length;T++)this.tools[this.visibleToolIds[T]].isActive=!1;for(let T=0;T<this.webExtraTools.length;T++)this.webExtraTools[T].isActive=!1}},setWebExtraToolActiveStatus(x,T){const l=this.webExtraTools.find(b=>b.id===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setWebExtraToolActiveStatusBykey(x,T){const l=this.webExtraTools.find(b=>b.key===x);l&&(l.isActive=T!==void 0?T:!l.isActive)},setReadyById(x){this.tools.find(l=>l.id===x)&&this.readyToolIds.push(x)},ifToolAllReady(){for(let x=0;x<this.visibleTools.length;x++){const T=this.visibleTools[x];if(T.component!=""&&!this.readyTools.includes(T.id))return!1}return!0},setReadyTools(x){this.readyToolIds=[]}},getters:{visibleTools:x=>x.visibleToolIds.map(T=>x.tools.find(l=>l.id===T)).filter(T=>!!T),readyTools:x=>x.readyToolIds,visibleComponents:x=>x.tools.filter(T=>x.visibleToolIds.includes(T.id)).map(T=>T.component),getKeyById:x=>T=>{var l;return(l=x.tools.find(b=>b.id===T))==null?void 0:l.key},getToolById:x=>T=>x.tools.find(l=>l.id===T),getWebExtraTool:x=>x.webExtraTools,hasActiveState:x=>T=>{const l=x.tools.find(b=>b.id===T);return l?l.hasActiveState:!1},isToolEnable:x=>T=>{const l=x.tools.find(b=>b.id===T);return l?x.visibleToolIds.includes(l.id):!1},isToolActive:x=>T=>{const l=x.tools.find(b=>b.id===T);if(!l){const b=x.webExtraTools.find(M=>M.id===T);return b?b.isActive:!1}return l?l.isActive:!1},isToolActiveBykey:x=>T=>{const l=x.tools.find(b=>b.key===T);return l?l.isActive:!1}}});function Tl(){return Hi()}function oL(){Hi().setAllToolClose(),Hi().setReadyTools([]),Hi().setEnableTools([])}let aL=["tree","resetb","navigate","roam","measure","section","comment","anno","hidden","inspector","setting","fullscreenb","share","cooperate","phone"],lL=["tree","reseta","roam","measure","section","comment","anno","screenshot","inspector","setting","fullscreena"];function Ry(x,T){const l={};T.forEach((M,_)=>{l[M]=_});const b=x.filter(M=>l.hasOwnProperty(M)).map(M=>({value:M,index:l[M]}));return b.sort((M,_)=>M.index-_.index),b.map(M=>M.value)}let Ly=!1;fa.BIMX_CONFIGS.viewerManager||(Nr.on("BIMX_CONFIGS",x=>{window.BimViewer?qn.ConfigViewer(x):Ly=!0}),fa.BIMX_CONFIGS.viewerManager=!0);const uL=()=>{qn.SetAllClose(),window.BimViewer.setEdgesEnabled(!1),Ly&&qn.ConfigViewer()};fa.BimViewer.viewerManager||(Nr.on("BimViewer",uL),fa.BimViewer.viewerManager=!0);class qn{static ConfigViewer(T=""){if(T==""){if(dr.BIMX_CONFIGS.isMobile&&(window.BimViewer.setIsTouch(!0),window.BimViewer.navCubeMode.visible=!1),dr.BIMX_CONFIGS.measureOffset&&window.BimViewer.setMeasureOffSet(Nt("measureOffset").offsetX,Nt("measureOffset").offsetY),dr.BIMX_CONFIGS.commentOffset&&window.BimViewer.setCommentsOffset(Nt("commentOffset").offsetX,Nt("commentOffset").offsetY),dr.BIMX_CONFIGS.navCubePos){let l=function(){let _=0,m=0;return Nt("navCubePos").pos.includes("left")?_+=parseInt(Nt("leftWidth")):Nt("navCubePos").pos.includes("right")&&(_+=parseInt(Nt("rightWidth"))),Nt("navCubePos").pos.includes("top")?m+=parseInt(Nt("topHeight")):Nt("navCubePos").pos.includes("bottom")&&(m+=parseInt(Nt("bottomHeight"))),[_,m]};const b=Nt("navCubePos").pos?Nt("navCubePos").pos:"right-bottom",M=l();b.includes("right")&&window.BimViewer.setNavCubePosition("right",M[0]),b.includes("top")&&window.BimViewer.setNavCubePosition("top",M[1]),b.includes("left")&&window.BimViewer.setNavCubePosition("left",M[0]),b.includes("bottom")&&window.BimViewer.setNavCubePosition("bottom",M[1])}dr.BIMX_CONFIGS.navCubeSize&&window.BimViewer.setNavCubeSize(Nt("navCubeSize"));return}switch(T){case"isMobile":window.BimViewer.setIsTouch(dr.BIMX_CONFIGS.isMobile),window.BimViewer.navCubeMode.visible=!dr.BIMX_CONFIGS.isMobile;break;case"measureOffset":window.BimViewer.setCommentsOffset(Nt("measureOffset").offsetX,Nt("measureOffset").offsetY);break;case"commentOffset":window.BimViewer.setCommentsOffset(Nt("commentOffset").offsetX,Nt("commentOffset").offsetY);break;case"navCubePos":const l=Nt("navCubePos").pos?Nt("navCubePos").pos:"right-bottom",b=Nt("navCubePos").posNum?Nt("navCubePos").posNum:[0,l.includes("top")?Nt("topHeight"):0];l.includes("right")&&window.BimViewer.setNavCubePosition("right",b[0]),l.includes("left")&&window.BimViewer.setNavCubePosition("left",b[0]),l.includes("top")&&window.BimViewer.setNavCubePosition("top",b[1]),l.includes("bottom")&&window.BimViewer.setNavCubePosition("bottom",b[1]);break;case"navCubeSize":window.BimViewer.setNavCubeSize(Nt("navCubeSize"));break}}static SaveViewerState(T){T.measure&&(this.viewerState.measureType=T.measure)}static SetToolActiveById(T,l=!Hi().isToolActive(T)){const b=Hi().getKeyById(T);b?this.SetToolActiveByKey(b,l):console.log("no such key:",T)}static SetToolActiveByKey(T,l=!Hi().isToolActiveBykey(T)){switch(T){case"tree":break;case"reseta":window.BimViewer.resetView();break;case"resetb":window.BimViewer.resetView();break;case"roam":window.BimViewer.SetFirstPersonModeActive(l);break;case"measure":window.BimViewer.measureTool.setActive(l),l&&window.BimViewer.measureTool.setActiveByType(this.viewerState.measureType,l);break;case"section":window.BimViewer.SetSectionToolActive(l);break;case"comment":l?setTimeout(()=>{window.BimViewer.SetCommentsToolActive(l)},100):window.BimViewer.SetCommentsToolActive(l);break;case"anno":window.BimViewer.SetAnnotationToolActive(l);break;case"screenshot":break;case"inspector":break;case"fullscreena":l?document.documentElement.requestFullscreen():document.exitFullscreen&&document.exitFullscreen();break;case"hidden":window.BimViewer.disableClickEvent=l;break;case"cooperate":break;case"share":break;case"navigate":break;case"setting":break;default:console.log("no such key:",T);break}}static SetAllClose(){window.BimViewer.closeAll()}static DestroyViewer(){window.BimViewer.destroy(),console.log("旧模型已销毁")}static showRequestBusy(T,l){window.BimViewer.showSpinner(T),l&&l()}}Ii(qn,"viewerState",{measureType:"distance"});const cL={key:0,class:"tree_btn mobile_toggle"},hL=["src"],dL={key:1,class:"cooperate_btn mobile_toggle"},fL=["src"],AL={key:2,class:"fullscreen_btn mobile_toggle"},pL=["src"],vL={key:3,class:"mobile_toolbar"},mL={class:"tctwins_toolbar"},gL=["onClick"],_L={key:0,class:"tctwins_btn"},yL=["src"],bL=d.defineComponent({__name:"mobileToolbar",props:["visibleTools"],emits:["emitHandler"],setup(x,{emit:T}){const l=Hi();d.onMounted(()=>{dr.BIMX_CONFIGS.showTree&&l.setToolActiveStatus(0,!0)});const b=T,M=g=>{b("emitHandler",g)},_=d.ref(!1),m=g=>{l.isToolActive(g)||g!=13&&g!=10&&(l.setAllToolClose(),qn.SetAllClose()),(g===10||g==13)&&(l.isToolActive(g)?(_.value=!1,Nr.emit("mobileFullscreen",!1)):(_.value=!0,Nr.emit("mobileFullscreen",!0)));const f=l.getToolById(g);p(f)},p=g=>{var f;g.id!=10&&g.id!=13&&qn.SetToolActiveByKey(g.key),l.setToolActiveStatus(g.id),M({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,status:(f=l.getToolById(g.id))==null?void 0:f.isActive}})};return(g,f)=>{var A,y,w,B,P;const v=Uo;return d.openBlock(),d.createElementBlock(d.Fragment,null,[!_.value&&x.visibleTools&&d.unref(l).isToolEnable(0)?(d.openBlock(),d.createElementBlock("div",cL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(0)&&d.unref(l).hasActiveState(0)}]),onClick:f[0]||(f[0]=E=>m(0))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${d.unref(l).isToolActive(0)?(y=d.unref(l).getToolById(0))==null?void 0:y.imgActive:(A=d.unref(l).getToolById(0))==null?void 0:A.img}.svg`},null,8,hL)],2)])):d.createCommentVNode("",!0),!_.value&&x.visibleTools&&d.unref(l).isToolEnable(15)?(d.openBlock(),d.createElementBlock("div",dL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(15)&&d.unref(l).hasActiveState(15)}]),onClick:f[1]||(f[1]=E=>m(15))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${d.unref(l).isToolActive(15)?(B=d.unref(l).getToolById(15))==null?void 0:B.imgActive:(w=d.unref(l).getToolById(15))==null?void 0:w.img}.svg`},null,8,fL)],2)])):d.createCommentVNode("",!0),_.value?(d.openBlock(),d.createElementBlock("div",AL,[d.createElementVNode("div",{class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:d.unref(l).isToolActive(13)&&d.unref(l).hasActiveState(13)}]),onClick:f[2]||(f[2]=E=>m(13))},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${(P=d.unref(l).getToolById(13))==null?void 0:P.imgActive}.svg`},null,8,pL)],2)])):d.createCommentVNode("",!0),_.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",vL,[d.createVNode(v,null,{default:d.withCtx(()=>[d.createElementVNode("div",mL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.visibleTools,E=>(d.openBlock(),d.createElementBlock("div",{key:E.id,class:"tctwins_btn_group",onClick:S=>m(E.id)},[E.id!==0&&E.id!==15?(d.openBlock(),d.createElementBlock("div",_L,[d.createElementVNode("img",{class:"img",src:`${d.unref(Er)}/bim-viewer/action-bar/${E.isActive?E.imgActive:E.img}.svg`},null,8,yL)])):d.createCommentVNode("",!0)],8,gL))),128))])]),_:1})]))],64)}}}),Tn=(x,T)=>{const l=x.__vccOpts||x;for(const[b,M]of T)l[b]=M;return l},wL=Tn(bL,[["__scopeId","data-v-5f120313"]]),BL={class:"bimx-tools-wrapper"},CL=["src"],xL={class:"tctwins_toolbar_wrapper"},PL={class:"tctwins_toolbar"},EL=["onClick"],ML=["src"],SL={key:0,class:"splitLine"},TL={class:"right_operate_panel"},kL=["onClick"],IL=["src"],FL=Tn(d.defineComponent({__name:"Toolbar",props:["visibleTools"],emits:["emitHandler"],setup(x,{emit:T}){d.onMounted(()=>{dr.BIMX_CONFIGS.showTree&&M.setToolActiveStatus(0,!0)}),fa.BIMX_CONFIGS.Toolbar||(Nr.on("BIMX_CONFIGS",()=>{dr.BIMX_CONFIGS.showTree&&M.setToolActiveStatus(0,!0)}),fa.BIMX_CONFIGS.Toolbar=!0);const l=T,b=g=>{l("emitHandler",g)},M=Hi(),_=g=>{M.isToolActive(g.id)||g.id!=13&&g.id!=10&&g.id!=1&&(M.setAllToolClose(),qn.SetAllClose()),m(g)},m=g=>{qn.SetToolActiveByKey(g.key),M.setToolActiveStatus(g.id),b({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,toolKey:g.key,status:g.isActive}})},p=g=>{M.isToolActive(g.id)||M.setAllToolClose(),M.setWebExtraToolActiveStatus(g.id),b({isTool:!1,event_target:"ToolBar",event_name:"clickTool",content:{toolId:g.id,toolKey:g.key,status:g.isActive}})};return(g,f)=>{const v=FA;return d.openBlock(),d.createElementBlock("div",BL,[x.visibleTools&&d.unref(M).isToolEnable(0)?(d.openBlock(),d.createElementBlock("div",{key:0,class:"structure_tree_toggle",onClick:f[0]||(f[0]=A=>_(x.visibleTools[0]))},[d.createVNode(v,{content:x.visibleTools[0].name,placement:"top",effect:"light"},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["toggle_btn",{toggle_active:x.visibleTools[0].isActive&&x.visibleTools[0].hasActiveState}])},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/action-bar/${x.visibleTools[0].isActive?x.visibleTools[0].imgActive:x.visibleTools[0].img}.png`},null,8,CL)],2)]),_:1},8,["content"])])):d.createCommentVNode("",!0),d.createElementVNode("div",xL,[d.createElementVNode("div",PL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.visibleTools,(A,y)=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"tctwins_btn-group",onClick:w=>_(A)},[d.createVNode(v,{content:A.name,placement:"top",effect:"light"},{default:d.withCtx(()=>[A.id!==0&&A.id!==15?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["tctwins_btn",{tctwins_btn_active:A.isActive&&A.hasActiveState}])},[d.createElementVNode("img",{class:"img",src:`${d.unref(Er)}/bim-viewer/action-bar/${A.isActive?A.imgActive:A.img}.png`,alt:""},null,8,ML)],2)):d.createCommentVNode("",!0)]),_:2},1032,["content"]),A.isShowDelimiter&&y!=x.visibleTools.length-1?(d.openBlock(),d.createElementBlock("div",SL)):d.createCommentVNode("",!0)],8,EL))),128))])]),d.createElementVNode("div",TL,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(M).getWebExtraTool,A=>(d.openBlock(),d.createElementBlock("div",{key:A.id,class:"opreate_panel_item",onClick:y=>p(A)},[d.createVNode(v,{effect:"light",content:A.name,placement:"left"},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["toggle_btn",{toggle_active:A.isActive&&A.hasActiveState}])},[d.createElementVNode("img",{src:`${d.unref(Er)}/bim-viewer/${A.isActive&&A.key!="cooperate"?A.imgActive:A.img}.png`,alt:""},null,8,IL)],2)]),_:2},1032,["content"])],8,kL))),128))])])}}}),[["__scopeId","data-v-7d41c29b"]]),DL="0.1.25";async function RL(){try{return(await Al.get(`${HR}/oss/sts`)).data.data}catch(x){throw console.error("Error fetching data:",x),x}}async function Oy(){try{const x=await RL();return new fE({region:"oss-cn-beijing",accessKeyId:x.accessKeyId,accessKeySecret:x.accessKeySecret,stsToken:x.securityToken,bucket:x.bucketName})}catch(x){console.log("getSTStoken() throw an error: ",x)}}class Ny{static async getBuffer(T,l,b){try{const _=await(await Oy()).get(T);l(_.content.buffer)}catch(M){b&&b(M)}}static async requestFileFromOSS(T,l,b,M){try{const _=await Oy();if(l){const m=await _.get(`${T}/metadata.json`);b(JSON.parse(m.content))}else{const m=await _.get(`${T}/index.json`);b(JSON.parse(m.content))}}catch(_){console.error("请求文件失败:",_),M(_)}}}const ju=x=>{const T=x.lastIndexOf(".");let l=[];return T!==-1&&(l=[x.slice(0,T),x.slice(T+1)]),l[0]},Uy=[];function LL(x){const{viewer:T}=window.BimViewer,{scene:l}=T,b=l.models[x];if(!b){console.error("没有找到正确的模型,无法检测构建异常");return}OL({points:NL(b.aabbs),epsilon:100,min_samples:l.numObjects/4>=1?l.numObjects/4:1},M=>{if(M.noise.length>0){const{noise:_}=M;for(const m in _)Uy.push(l.objectIds[_[m]]);console.log("old aabb",T.scene.aabb),window.BimViewer.updateAABB(Uy,()=>{console.log("new aabb",T.scene.aabb),T.cameraFlight.jumpTo({aabb:T.scene.aabb})})}if(M.labels_count>1){const{labels:_}=M;let m;const p=M.change_indices,g=[];for(let f=0;f<p.length;f++)m=p[f],f==p.length-1?g.push(l.objectIds.slice(m,_.length)):g.push(l.objectIds.slice(m,p[f+1]));window.BimViewer.setPartialObjectIds(g)}})}function OL(x,T){console.log("start dbscan..."),fetch(`${QR}/dbscan/convert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}).then(l=>(l.ok,l.json())).then(l=>{if(l&&l.error)throw new Error(l.error);l.noise.length>0||l.labels_count>1?(T(l),console.log("DBSCAN Result:",`noise:${l.noise}`,`labels_count:${l.labels_count}`)):(console.log("DBSCAN Result:",l),console.log("DBSCAN Result: no outlier"))}).catch(l=>{console.error("DBSCAN failed:",l)})}function NL(x){const T=[];for(let l=0;l<x.length;l++){const b=x[l],M=[(b[0]+b[3])/2,(b[1]+b[4])/2,(b[2]+b[5])/2];T.push(M)}return T}function UL(x,T,l=!1,b){const M=new Date().getTime();window.BimViewer.loadModel(x,T,()=>{b&&b({code:200,result:x+"模型加载完成!"})},_=>{b&&b({code:-1,result:x+"模型加载失败!",msg:_})}),window.BimViewer.modelsExplorer.on("modelLoaded",()=>{const m=new Date().getTime()-M;console.log(`加载时长: ${m/1e3} s`),l||LL(x)})}var jL={"./node_modules/@xtctwins/tctwins-core/dist/tctwins-core.es5.js":(x,T,l)=>{l.r(T),l.d(T,{AlphaFormat:()=>ub,AmbientLight:()=>I1,AngleMeasurementsControl:()=>jo,AngleMeasurementsMouseControl:()=>Ga,AngleMeasurementsPlugin:()=>Vu,AngleMeasurementsTouchControl:()=>zj,AnnotationsPlugin:()=>$j,BCFViewpointsPlugin:()=>gQ,Bitmap:()=>tw,ByteType:()=>qy,CameraMemento:()=>L1,CameraPath:()=>PQ,CameraPathAnimation:()=>hc,Canvas:()=>S1,ClampToEdgeWrapping:()=>ts,Component:()=>Ve,CompressedMediaType:()=>Zj,Configs:()=>qh,CubicBezierCurve:()=>NQ,Curve:()=>cc,DefaultLoadingManager:()=>s1,DepthFormat:()=>fb,DepthStencilFormat:()=>Ab,DirLight:()=>Xo,DistanceMeasurementsControl:()=>Wp,DistanceMeasurementsMouseControl:()=>y1,DistanceMeasurementsPlugin:()=>wQ,DistanceMeasurementsTouchControl:()=>BQ,EdgeMaterial:()=>Kh,EmphasisMaterial:()=>Mi,FloatType:()=>nb,Fresnel:()=>iH,Frustum:()=>Za,FrustumPlane:()=>Ja,GIFMediaType:()=>Jj,GLTFDefaultDataSource:()=>C1,GLTFLoaderPlugin:()=>Dee,HalfFloatType:()=>sb,ImagePlane:()=>kQ,IntType:()=>rb,JPEGMediaType:()=>yb,KTX2TextureTranscoder:()=>Vl,LambertMaterial:()=>XV,LightMap:()=>RQ,LineSet:()=>_1,LinearEncoding:()=>cs,LinearFilter:()=>Fn,LinearMipMapLinearFilter:()=>Rl,LinearMipMapNearestFilter:()=>Qu,LinearMipmapLinearFilter:()=>Ka,LinearMipmapNearestFilter:()=>Yj,Loader:()=>o1,LoadingManager:()=>n1,LocaleService:()=>x1,LuminanceAlphaFormat:()=>db,LuminanceFormat:()=>hb,Map:()=>ue,Marker:()=>tn,Mesh:()=>ir,MetallicMaterial:()=>JV,MirroredRepeatWrapping:()=>Ho,ModelMemento:()=>OQ,NavCubePlugin:()=>Lee,NearestFilter:()=>Wa,NearestMipMapLinearFilter:()=>Dl,NearestMipMapNearestFilter:()=>Hu,NearestMipmapLinearFilter:()=>Zy,NearestMipmapNearestFilter:()=>Jy,Node:()=>va,ObjectsKdTree3:()=>ae,ObjectsMemento:()=>O1,PNGMediaType:()=>bb,Path:()=>UQ,PerformanceModel:()=>VQ,PhongMaterial:()=>hi,Plugin:()=>Qe,PointLight:()=>IQ,PointerLens:()=>Le,QuadraticBezierCurve:()=>jQ,Queue:()=>ce,RGBAFormat:()=>zu,RGBAIntegerFormat:()=>_b,RGBA_ASTC_10x10_Format:()=>sp,RGBA_ASTC_10x5_Format:()=>rp,RGBA_ASTC_10x6_Format:()=>ip,RGBA_ASTC_10x8_Format:()=>np,RGBA_ASTC_12x10_Format:()=>op,RGBA_ASTC_12x12_Format:()=>ap,RGBA_ASTC_4x4_Format:()=>Hh,RGBA_ASTC_5x4_Format:()=>$A,RGBA_ASTC_5x5_Format:()=>YA,RGBA_ASTC_6x5_Format:()=>JA,RGBA_ASTC_6x6_Format:()=>ZA,RGBA_ASTC_8x5_Format:()=>qA,RGBA_ASTC_8x6_Format:()=>ep,RGBA_ASTC_8x8_Format:()=>tp,RGBA_BPTC_Format:()=>Qh,RGBA_ETC2_EAC_Format:()=>Vh,RGBA_PVRTC_2BPPV1_Format:()=>KA,RGBA_PVRTC_4BPPV1_Format:()=>Uh,RGBA_S3TC_DXT1_Format:()=>Lh,RGBA_S3TC_DXT3_Format:()=>Oh,RGBA_S3TC_DXT5_Format:()=>Wu,RGBFormat:()=>cb,RGB_ETC1_Format:()=>XA,RGB_ETC2_Format:()=>jh,RGB_PVRTC_2BPPV1_Format:()=>WA,RGB_PVRTC_4BPPV1_Format:()=>Nh,RGB_S3TC_DXT1_Format:()=>Gu,RGFormat:()=>mb,RGIntegerFormat:()=>gb,ReadableGeometry:()=>Wr,RedFormat:()=>pb,RedIntegerFormat:()=>vb,ReflectionMap:()=>DQ,Renderer:()=>j1,RepeatWrapping:()=>Ei,Scene:()=>gd,SceneModel:()=>zl,SceneModelMesh:()=>iw,SceneModelTransform:()=>d1,SectionBox:()=>rv,SectionPlane:()=>Rh,SectionPlanesPlugin:()=>qee,ShortType:()=>eb,Skybox:()=>iv,SkyboxesPlugin:()=>nte,SpecularMaterial:()=>eH,SplineCurve:()=>Ad,SpriteMarker:()=>LQ,StoreyViewsPlugin:()=>ite,Texture:()=>Ll,TextureTranscoder:()=>HQ,TreeViewPlugin:()=>ste,UnsignedByteType:()=>GA,UnsignedInt248Type:()=>lb,UnsignedIntType:()=>ib,UnsignedShort4444Type:()=>ob,UnsignedShort5551Type:()=>ab,UnsignedShortType:()=>tb,VBOGeometry:()=>qb,Viewer:()=>w7,WebIFCLoaderPlugin:()=>mte,WorkerPool:()=>l1,XTCDefaultDataSource:()=>HP,XTCLoaderPlugin:()=>fte,buildBoxGeometry:()=>Xh,buildBoxLinesGeometry:()=>$h,buildCylinderGeometry:()=>Ps,buildGridGeometry:()=>ew,buildPlaneGeometry:()=>gp,buildSphereGeometry:()=>Yh,buildTorusGeometry:()=>Go,buildVectorTextGeometry:()=>aH,createRTCViewMat:()=>it,frustumIntersectsAABB3:()=>x6,getKTX2TextureTranscoder:()=>u1,getPlaneRTCPos:()=>St,load3DSGeometry:()=>nH,loadOBJGeometry:()=>sH,math:()=>h,rtcToWorldPos:()=>Et,sRGBEncoding:()=>bi,setFrustum:()=>C6,stats:()=>re,utils:()=>wt,worldToRTCPos:()=>mt,worldToRTCPositions:()=>dt});var b=p().mark(zx),M=p().mark(Cg);function _(o,i){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(o);i&&(e=e.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,e)}return t}function m(o){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?_(Object(t),!0).forEach(function(e){H(o,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(t,e))})}return o}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return i};var o,i={},t=Object.prototype,e=t.hasOwnProperty,r=Object.defineProperty||function(ut,ct,ft){ut[ct]=ft.value},s=typeof Symbol=="function"?Symbol:{},n=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function c(ut,ct,ft){return Object.defineProperty(ut,ct,{value:ft,enumerable:!0,configurable:!0,writable:!0}),ut[ct]}try{c({},"")}catch{c=function(ft,Ct,kt){return ft[Ct]=kt}}function C(ut,ct,ft,Ct){var kt=ct&&ct.prototype instanceof te?ct:te,Tt=Object.create(kt.prototype),$t=new Ze(Ct||[]);return r(Tt,"_invoke",{value:Ge(ut,ft,$t)}),Tt}function k(ut,ct,ft){try{return{type:"normal",arg:ut.call(ct,ft)}}catch(Ct){return{type:"throw",arg:Ct}}}i.wrap=C;var D="suspendedStart",Q="suspendedYield",X="executing",R="completed",q={};function te(){}function se(){}function ie(){}var he={};c(he,n,function(){return this});var ge=Object.getPrototypeOf,pe=ge&&ge(ge(ot([])));pe&&pe!==t&&e.call(pe,n)&&(he=pe);var xe=ie.prototype=te.prototype=Object.create(he);function Se(ut){["next","throw","return"].forEach(function(ct){c(ut,ct,function(ft){return this._invoke(ct,ft)})})}function Oe(ut,ct){function ft(kt,Tt,$t,or){var mr=k(ut[kt],ut,Tt);if(mr.type!=="throw"){var ur=mr.arg,Mr=ur.value;return Mr&&Z(Mr)=="object"&&e.call(Mr,"__await")?ct.resolve(Mr.__await).then(function(Kt){ft("next",Kt,$t,or)},function(Kt){ft("throw",Kt,$t,or)}):ct.resolve(Mr).then(function(Kt){ur.value=Kt,$t(ur)},function(Kt){return ft("throw",Kt,$t,or)})}or(mr.arg)}var Ct;r(this,"_invoke",{value:function(Tt,$t){function or(){return new ct(function(mr,ur){ft(Tt,$t,mr,ur)})}return Ct=Ct?Ct.then(or,or):or()}})}function Ge(ut,ct,ft){var Ct=D;return function(kt,Tt){if(Ct===X)throw Error("Generator is already running");if(Ct===R){if(kt==="throw")throw Tt;return{value:o,done:!0}}for(ft.method=kt,ft.arg=Tt;;){var $t=ft.delegate;if($t){var or=Ye($t,ft);if(or){if(or===q)continue;return or}}if(ft.method==="next")ft.sent=ft._sent=ft.arg;else if(ft.method==="throw"){if(Ct===D)throw Ct=R,ft.arg;ft.dispatchException(ft.arg)}else ft.method==="return"&&ft.abrupt("return",ft.arg);Ct=X;var mr=k(ut,ct,ft);if(mr.type==="normal"){if(Ct=ft.done?R:Q,mr.arg===q)continue;return{value:mr.arg,done:ft.done}}mr.type==="throw"&&(Ct=R,ft.method="throw",ft.arg=mr.arg)}}}function Ye(ut,ct){var ft=ct.method,Ct=ut.iterator[ft];if(Ct===o)return ct.delegate=null,ft==="throw"&&ut.iterator.return&&(ct.method="return",ct.arg=o,Ye(ut,ct),ct.method==="throw")||ft!=="return"&&(ct.method="throw",ct.arg=new TypeError("The iterator does not provide a '"+ft+"' method")),q;var kt=k(Ct,ut.iterator,ct.arg);if(kt.type==="throw")return ct.method="throw",ct.arg=kt.arg,ct.delegate=null,q;var Tt=kt.arg;return Tt?Tt.done?(ct[ut.resultName]=Tt.value,ct.next=ut.nextLoc,ct.method!=="return"&&(ct.method="next",ct.arg=o),ct.delegate=null,q):Tt:(ct.method="throw",ct.arg=new TypeError("iterator result is not an object"),ct.delegate=null,q)}function He(ut){var ct={tryLoc:ut[0]};1 in ut&&(ct.catchLoc=ut[1]),2 in ut&&(ct.finallyLoc=ut[2],ct.afterLoc=ut[3]),this.tryEntries.push(ct)}function Ne(ut){var ct=ut.completion||{};ct.type="normal",delete ct.arg,ut.completion=ct}function Ze(ut){this.tryEntries=[{tryLoc:"root"}],ut.forEach(He,this),this.reset(!0)}function ot(ut){if(ut||ut===""){var ct=ut[n];if(ct)return ct.call(ut);if(typeof ut.next=="function")return ut;if(!isNaN(ut.length)){var ft=-1,Ct=function kt(){for(;++ft<ut.length;)if(e.call(ut,ft))return kt.value=ut[ft],kt.done=!1,kt;return kt.value=o,kt.done=!0,kt};return Ct.next=Ct}}throw new TypeError(Z(ut)+" is not iterable")}return se.prototype=ie,r(xe,"constructor",{value:ie,configurable:!0}),r(ie,"constructor",{value:se,configurable:!0}),se.displayName=c(ie,u,"GeneratorFunction"),i.isGeneratorFunction=function(ut){var ct=typeof ut=="function"&&ut.constructor;return!!ct&&(ct===se||(ct.displayName||ct.name)==="GeneratorFunction")},i.mark=function(ut){return Object.setPrototypeOf?Object.setPrototypeOf(ut,ie):(ut.__proto__=ie,c(ut,u,"GeneratorFunction")),ut.prototype=Object.create(xe),ut},i.awrap=function(ut){return{__await:ut}},Se(Oe.prototype),c(Oe.prototype,a,function(){return this}),i.AsyncIterator=Oe,i.async=function(ut,ct,ft,Ct,kt){kt===void 0&&(kt=Promise);var Tt=new Oe(C(ut,ct,ft,Ct),kt);return i.isGeneratorFunction(ct)?Tt:Tt.next().then(function($t){return $t.done?$t.value:Tt.next()})},Se(xe),c(xe,u,"Generator"),c(xe,n,function(){return this}),c(xe,"toString",function(){return"[object Generator]"}),i.keys=function(ut){var ct=Object(ut),ft=[];for(var Ct in ct)ft.push(Ct);return ft.reverse(),function kt(){for(;ft.length;){var Tt=ft.pop();if(Tt in ct)return kt.value=Tt,kt.done=!1,kt}return kt.done=!0,kt}},i.values=ot,Ze.prototype={constructor:Ze,reset:function(ct){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(Ne),!ct)for(var ft in this)ft.charAt(0)==="t"&&e.call(this,ft)&&!isNaN(+ft.slice(1))&&(this[ft]=o)},stop:function(){this.done=!0;var ct=this.tryEntries[0].completion;if(ct.type==="throw")throw ct.arg;return this.rval},dispatchException:function(ct){if(this.done)throw ct;var ft=this;function Ct(ur,Mr){return $t.type="throw",$t.arg=ct,ft.next=ur,Mr&&(ft.method="next",ft.arg=o),!!Mr}for(var kt=this.tryEntries.length-1;kt>=0;--kt){var Tt=this.tryEntries[kt],$t=Tt.completion;if(Tt.tryLoc==="root")return Ct("end");if(Tt.tryLoc<=this.prev){var or=e.call(Tt,"catchLoc"),mr=e.call(Tt,"finallyLoc");if(or&&mr){if(this.prev<Tt.catchLoc)return Ct(Tt.catchLoc,!0);if(this.prev<Tt.finallyLoc)return Ct(Tt.finallyLoc)}else if(or){if(this.prev<Tt.catchLoc)return Ct(Tt.catchLoc,!0)}else{if(!mr)throw Error("try statement without catch or finally");if(this.prev<Tt.finallyLoc)return Ct(Tt.finallyLoc)}}}},abrupt:function(ct,ft){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var kt=this.tryEntries[Ct];if(kt.tryLoc<=this.prev&&e.call(kt,"finallyLoc")&&this.prev<kt.finallyLoc){var Tt=kt;break}}Tt&&(ct==="break"||ct==="continue")&&Tt.tryLoc<=ft&&ft<=Tt.finallyLoc&&(Tt=null);var $t=Tt?Tt.completion:{};return $t.type=ct,$t.arg=ft,Tt?(this.method="next",this.next=Tt.finallyLoc,q):this.complete($t)},complete:function(ct,ft){if(ct.type==="throw")throw ct.arg;return ct.type==="break"||ct.type==="continue"?this.next=ct.arg:ct.type==="return"?(this.rval=this.arg=ct.arg,this.method="return",this.next="end"):ct.type==="normal"&&ft&&(this.next=ft),q},finish:function(ct){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var Ct=this.tryEntries[ft];if(Ct.finallyLoc===ct)return this.complete(Ct.completion,Ct.afterLoc),Ne(Ct),q}},catch:function(ct){for(var ft=this.tryEntries.length-1;ft>=0;--ft){var Ct=this.tryEntries[ft];if(Ct.tryLoc===ct){var kt=Ct.completion;if(kt.type==="throw"){var Tt=kt.arg;Ne(Ct)}return Tt}}throw Error("illegal catch attempt")},delegateYield:function(ct,ft,Ct){return this.delegate={iterator:ot(ct),resultName:ft,nextLoc:Ct},this.method==="next"&&(this.arg=o),q}},i}function g(o,i,t,e,r,s,n){try{var a=o[s](n),u=a.value}catch(c){return void t(c)}a.done?i(u):Promise.resolve(u).then(e,r)}function f(o){return function(){var i=this,t=arguments;return new Promise(function(e,r){var s=o.apply(i,t);function n(u){g(s,e,r,n,a,"next",u)}function a(u){g(s,e,r,n,a,"throw",u)}n(void 0)})}}function v(o){return w(o)||y(o)||S(o)||A()}function A(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
21
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function w(o){if(Array.isArray(o))return I(o)}function B(o,i){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=S(o))||i){t&&(o=t);var e=0,r=function(){};return{s:r,n:function(){return e>=o.length?{done:!0}:{done:!1,value:o[e++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
22
22
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,n=!0,a=!1;return{s:function(){t=t.call(o)},n:function(){var c=t.next();return n=c.done,c},e:function(c){a=!0,s=c},f:function(){try{n||t.return==null||t.return()}finally{if(a)throw s}}}}function P(o,i){return N(o)||F(o,i)||S(o,i)||E()}function E(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
23
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(o,i){if(o){if(typeof o=="string")return I(o,i);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(o,i):void 0}}function I(o,i){(i==null||i>o.length)&&(i=o.length);for(var t=0,e=Array(i);t<i;t++)e[t]=o[t];return e}function F(o,i){var t=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(t!=null){var e,r,s,n,a=[],u=!0,c=!1;try{if(s=(t=t.call(o)).next,i===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(e=s.call(t)).done)&&(a.push(e.value),a.length!==i);u=!0);}catch(C){c=!0,r=C}finally{try{if(!u&&t.return!=null&&(n=t.return(),Object(n)!==n))return}finally{if(c)throw r}}return a}}function N(o){if(Array.isArray(o))return o}function O(o,i,t){return i=W(i),V(o,U()?Reflect.construct(i,t||[],W(o).constructor):i.apply(o,t))}function V(o,i){if(i&&(Z(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(o)}function G(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function U(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U=function(){return!!o})()}function j(o,i,t,e){var r=K(W(o.prototype),i,t);return function(s){return r.apply(t,s)}}function K(){return K=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(o,i,t){var e=$(o,i);if(e){var r=Object.getOwnPropertyDescriptor(e,i);return r.get?r.get.call(arguments.length<3?o:t):r.value}},K.apply(null,arguments)}function $(o,i){for(;!{}.hasOwnProperty.call(o,i)&&(o=W(o))!==null;);return o}function W(o){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},W(o)}function L(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),i&&z(o,i)}function z(o,i){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(o,i)}function H(o,i,t){return(i=Ce(i))in o?Object.defineProperty(o,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[i]=t,o}function Z(o){"@babel/helpers - typeof";return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Z(o)}function ee(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function de(o,i){for(var t=0;t<i.length;t++){var e=i[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,Ce(e.key),e)}}function Y(o,i,t){return i&&de(o.prototype,i),t&&de(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function Ce(o){var i=Ie(o,"string");return Z(i)=="symbol"?i:i+""}function Ie(o,i){if(Z(o)!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var e=t.call(o,i||"default");if(Z(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}function ye(o){return new ve(o,0)}function me(o){return function(){return new Be(o.apply(this,arguments))}}function Be(o){var i,t;function e(s,n){try{var a=o[s](n),u=a.value,c=u instanceof ve;Promise.resolve(c?u.v:u).then(function(C){if(c){var k=s==="return"?"return":"next";if(!u.k||C.done)return e(k,C);C=o[k](C).value}r(a.done?"return":"normal",C)},function(C){e("throw",C)})}catch(C){r("throw",C)}}function r(s,n){switch(s){case"return":i.resolve({value:n,done:!0});break;case"throw":i.reject(n);break;default:i.resolve({value:n,done:!1})}(i=i.next)?e(i.key,i.arg):t=null}this._invoke=function(s,n){return new Promise(function(a,u){var c={key:s,arg:n,resolve:a,reject:u,next:null};t?t=t.next=c:(i=t=c,e(s,n))})},typeof o.return!="function"&&(this.return=void 0)}Be.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Be.prototype.next=function(o){return this._invoke("next",o)},Be.prototype.throw=function(o){return this._invoke("throw",o)},Be.prototype.return=function(o){return this._invoke("return",o)};function ve(o,i){this.v=o,this.k=i}function Pe(o){var i,t,e,r=2;for(typeof Symbol<"u"&&(t=Symbol.asyncIterator,e=Symbol.iterator);r--;){if(t&&(i=o[t])!=null)return i.call(o);if(e&&(i=o[e])!=null)return new Me(i.call(o));t="@@asyncIterator",e="@@iterator"}throw new TypeError("Object is not async iterable")}function Me(o){function i(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(r){return{value:r,done:e}})}return Me=function(e){this.s=e,this.n=e.next},Me.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return r===void 0?Promise.resolve({value:e,done:!0}):i(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return r===void 0?Promise.reject(e):i(r.apply(this.s,arguments))}},new Me(o)}var Le=function(){function o(i){var t=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ee(this,o),this.viewer=i,this.scene=this.viewer.scene,this._lensCursorDiv=document.createElement("div"),this._lensCursorDiv.setAttribute("class","pointerLensCursor"),document.body.append(this._lensCursorDiv),this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red",this._lensCursorDiv.style.borderRadius="20px",this._lensCursorDiv.style.width="10px",this._lensCursorDiv.style.height="10px",this._lensCursorDiv.style.margin="-200px -200px",this._lensCursorDiv.style.zIndex="100000",this._lensCursorDiv.style.position="absolute",this._lensCursorDiv.style.pointerEvents="none",this._lensContainer=document.createElement("div"),this._lensContainer.setAttribute("class","pointerLens"),this._lensContainer.style.border="1px solid black",this._lensContainer.style.background="white",this._lensContainer.style.borderRadius="50%",this._lensContainer.style.width="300px",this._lensContainer.style.height="300px",this._lensContainer.style.marginTop="85px",this._lensContainer.style.marginLeft="25px",this._lensContainer.style.zIndex="15000",this._lensContainer.style.position="absolute",this._lensContainer.style.pointerEvents="none",this._lensContainer.style.visibility="hidden",this._lensCanvas=document.createElement("canvas"),this._lensCanvas.style.borderRadius="50%",this._lensCanvas.style.width="300px",this._lensCanvas.style.height="300px",this._lensCanvas.style.zIndex="15000",this._lensCanvas.style.pointerEvents="none",document.body.appendChild(this._lensContainer),this._lensContainer.appendChild(this._lensCanvas),this._lensCanvasContext=this._lensCanvas.getContext("2d"),this._canvasElement=this.viewer.scene.canvas.canvas,this._canvasPos=null,this._snappedCanvasPos=null,this._lensPosToggle=!0,this._zoomLevel=e.zoomFactor!==void 0?e.zoomFactor:2,this._active=e.active!==!1,this._visible=!1,this._snapped=!1,this._onViewerRendering=this.viewer.scene.on("rendering",function(){t._active&&t._visible&&t.update()})}return Y(o,[{key:"update",value:function(){if(!(!this._active||!this._visible)&&this._canvasPos){var t=this._lensContainer.getBoundingClientRect(),e=this._canvasElement.getBoundingClientRect(),r=this._canvasPos[0]<t.right&&this._canvasPos[0]>t.left&&this._canvasPos[1]<t.bottom&&this._canvasPos[1]>t.top;this._lensContainer.style.marginLeft="25px",r&&(this._lensPosToggle?this._lensContainer.style.marginTop="".concat(e.bottom-e.top-this._lensCanvas.height-85,"px"):this._lensContainer.style.marginTop="85px",this._lensPosToggle=!this._lensPosToggle),this._lensCanvasContext.clearRect(0,0,this._lensCanvas.width,this._lensCanvas.height);var s=Math.max(this._lensCanvas.width,this._lensCanvas.height)/this._zoomLevel;this._lensCanvasContext.drawImage(this._canvasElement,this._canvasPos[0]-s/2,this._canvasPos[1]-s/2,s,s,0,0,this._lensCanvas.width,this._lensCanvas.height);var n=[(t.left+t.right)/2,(t.top+t.bottom)/2];if(this._snappedCanvasPos){var a=this._snappedCanvasPos[0]-this._canvasPos[0],u=this._snappedCanvasPos[1]-this._canvasPos[1];this._lensCursorDiv.style.marginLeft="".concat(n[0]+a*this._zoomLevel-10,"px"),this._lensCursorDiv.style.marginTop="".concat(n[1]+u*this._zoomLevel-10,"px")}else this._lensCursorDiv.style.marginLeft="".concat(n[0]-10,"px"),this._lensCursorDiv.style.marginTop="".concat(n[1]-10,"px")}}},{key:"zoomFactor",get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.update()}},{key:"canvasPos",get:function(){return this._canvasPos},set:function(t){this._canvasPos=t,this.update()}},{key:"snappedCanvasPos",get:function(){return this._snappedCanvasPos},set:function(t){this._snappedCanvasPos=t,this.update()}},{key:"snapped",get:function(){return this._snapped},set:function(t){this._snapped=t,t?(this._lensCursorDiv.style.background="greenyellow",this._lensCursorDiv.style.border="2px solid green"):(this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red")}},{key:"active",get:function(){return this._active},set:function(t){this._active=t,this._lensContainer.style.visibility=t&&this._visible?"visible":"hidden",(!t||!this._visible)&&(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"visible",get:function(){return this._visible},set:function(t){this._visible=t,this._lensContainer.style.visibility=t&&this._active?"visible":"hidden",(!t||!this._active)&&(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"destroy",value:function(){this._destroyed||(this.viewer.scene.off(this._onViewerRendering),this._lensContainer.removeChild(this._lensCanvas),document.body.removeChild(this._lensContainer),this._destroyed=!0)}}])}(),Ue=!0,_e=Ue?Float64Array:Float32Array,Xe=new _e(3),we=new _e(16),oe=new _e(16),Ae=new _e(4),h={setDoublePrecisionEnabled:function(i){Ue=i,_e=Ue?Float64Array:Float32Array},getDoublePrecisionEnabled:function(){return Ue},MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId:function(i,t){var e=t.indexOf("#");return e===i.length&&t.startsWith(i)?t.substring(e+1):t},globalizeObjectId:function(i,t){return i+"#"+t},safeInv:function(i){var t=1/i;return isNaN(t)||!isFinite(t)?1:t},vec2:function(i){return new _e(i||2)},vec3:function(i){return new _e(i||3)},vec4:function(i){return new _e(i||4)},mat3:function(i){return new _e(i||9)},mat3ToMat4:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _e(16);return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=0,t[4]=i[3],t[5]=i[4],t[6]=i[5],t[7]=0,t[8]=i[6],t[9]=i[7],t[10]=i[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},mat4:function(i){return new _e(i||16)},mat4ToMat3:function(i,t){},doublesToFloats:function(i,t,e){for(var r=new _e(2),s=0,n=i.length;s<n;s++)h.splitDouble(i[s],r),t[s]=r[0],e[s]=r[1]},splitDouble:function(i,t){var e=_e.from([i])[0],r=i-e;t[0]=e,t[1]=r},createUUID:function(){for(var o=[],i=0;i<256;i++)o[i]=(i<16?"0":"")+i.toString(16);return function(){var t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,r=Math.random()*4294967295|0,s=Math.random()*4294967295|0;return"".concat(o[t&255]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255],"-").concat(o[e&255]).concat(o[e>>8&255],"-").concat(o[e>>16&15|64]).concat(o[e>>24&255],"-").concat(o[r&63|128]).concat(o[r>>8&255],"-").concat(o[r>>16&255]).concat(o[r>>24&255]).concat(o[s&255]).concat(o[s>>8&255]).concat(o[s>>16&255]).concat(o[s>>24&255])}}(),clamp:function(i,t,e){return Math.max(t,Math.min(e,i))},fmod:function(i,t){if(i<t)return console.error("math.fmod : Attempting to find modulus within negative range - would be infinite loop - ignoring"),i;for(;t<=i;)i-=t;return i},compareVec3:function(i,t){return i[0]===t[0]&&i[1]===t[1]&&i[2]===t[2]},negateVec3:function(i,t){return t||(t=i),t[0]=-i[0],t[1]=-i[1],t[2]=-i[2],t},negateVec4:function(i,t){return t||(t=i),t[0]=-i[0],t[1]=-i[1],t[2]=-i[2],t[3]=-i[3],t},addVec4:function(i,t,e){return e||(e=i),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e[3]=i[3]+t[3],e},addVec4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]+t,e[1]=i[1]+t,e[2]=i[2]+t,e[3]=i[3]+t,e},addVec3:function(i,t,e){return e||(e=i),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e},addVec3Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]+t,e[1]=i[1]+t,e[2]=i[2]+t,e},subVec4:function(i,t,e){return e||(e=i),e[0]=i[0]-t[0],e[1]=i[1]-t[1],e[2]=i[2]-t[2],e[3]=i[3]-t[3],e},subVec3:function(i,t,e){return e||(e=i),e[0]=i[0]-t[0],e[1]=i[1]-t[1],e[2]=i[2]-t[2],e},subVec2:function(i,t,e){return e||(e=i),e[0]=i[0]-t[0],e[1]=i[1]-t[1],e},geometricMeanVec2:function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];for(var r=new _e(t[0]),s=1;s<t.length;s++)r[0]+=t[s][0],r[1]+=t[s][1];return r[0]/=t.length,r[1]/=t.length,r},subVec4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]-t,e[3]=i[3]-t,e},subScalarVec4:function(i,t,e){return e||(e=i),e[0]=t-i[0],e[1]=t-i[1],e[2]=t-i[2],e[3]=t-i[3],e},mulVec4:function(i,t,e){return e||(e=i),e[0]=i[0]*t[0],e[1]=i[1]*t[1],e[2]=i[2]*t[2],e[3]=i[3]*t[3],e},mulVec4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]*t,e[1]=i[1]*t,e[2]=i[2]*t,e[3]=i[3]*t,e},mulVec3Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]*t,e[1]=i[1]*t,e[2]=i[2]*t,e},mulVec2Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]*t,e[1]=i[1]*t,e},divVec3:function(i,t,e){return e||(e=i),e[0]=i[0]/t[0],e[1]=i[1]/t[1],e[2]=i[2]/t[2],e},divVec4:function(i,t,e){return e||(e=i),e[0]=i[0]/t[0],e[1]=i[1]/t[1],e[2]=i[2]/t[2],e[3]=i[3]/t[3],e},divScalarVec3:function(i,t,e){return e||(e=t),e[0]=i/t[0],e[1]=i/t[1],e[2]=i/t[2],e},divVec3Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]/t,e[1]=i[1]/t,e[2]=i[2]/t,e},divVec4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]/t,e[1]=i[1]/t,e[2]=i[2]/t,e[3]=i[3]/t,e},divScalarVec4:function(i,t,e){return e||(e=t),e[0]=i/t[0],e[1]=i/t[1],e[2]=i/t[2],e[3]=i/t[3],e},dotVec4:function(i,t){return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]*t[3]},cross3Vec4:function(i,t){var e=i[0],r=i[1],s=i[2],n=t[0],a=t[1],u=t[2];return[r*u-s*a,s*n-e*u,e*a-r*n,0]},cross3Vec3:function(i,t,e){e||(e=i);var r=i[0],s=i[1],n=i[2],a=t[0],u=t[1],c=t[2];return e[0]=s*c-n*u,e[1]=n*a-r*c,e[2]=r*u-s*a,e},sqLenVec4:function(i){return h.dotVec4(i,i)},lenVec4:function(i){return Math.sqrt(h.sqLenVec4(i))},dotVec3:function(i,t){return i[0]*t[0]+i[1]*t[1]+i[2]*t[2]},dotVec2:function(i,t){return i[0]*t[0]+i[1]*t[1]},sqLenVec3:function(i){return h.dotVec3(i,i)},sqLenVec2:function(i){return h.dotVec2(i,i)},lenVec3:function(i){return Math.sqrt(h.sqLenVec3(i))},distVec3:function(){var o=new _e(3);return function(i,t){return h.lenVec3(h.subVec3(i,t,o))}}(),lenVec2:function(i){return Math.sqrt(h.sqLenVec2(i))},distVec2:function(){var o=new _e(2);return function(i,t){return h.lenVec2(h.subVec2(i,t,o))}}(),rcpVec3:function(i,t){return h.divScalarVec3(1,i,t)},normalizeVec4:function(i,t){var e=1/h.lenVec4(i);return h.mulVec4Scalar(i,e,t)},normalizeVec3:function(i,t){var e=1/h.lenVec3(i);return h.mulVec3Scalar(i,e,t)},normalizeVec2:function(i,t){var e=1/h.lenVec2(i);return h.mulVec2Scalar(i,e,t)},angleVec3:function(i,t){var e=h.dotVec3(i,t)/Math.sqrt(h.sqLenVec3(i)*h.sqLenVec3(t));return e=e<-1?-1:e>1?1:e,Math.acos(e)},vec3FromMat4Scale:function(){var o=new _e(3);return function(i,t){return o[0]=i[0],o[1]=i[1],o[2]=i[2],t[0]=h.lenVec3(o),o[0]=i[4],o[1]=i[5],o[2]=i[6],t[1]=h.lenVec3(o),o[0]=i[8],o[1]=i[9],o[2]=i[10],t[2]=h.lenVec3(o),t}}(),vecToArray:function(){function o(i){return Math.round(i*1e5)/1e5}return function(i){i=Array.prototype.slice.call(i);for(var t=0,e=i.length;t<e;t++)i[t]=o(i[t]);return i}}(),xyzArrayToObject:function(i){return{x:i[0],y:i[1],z:i[2]}},xyzObjectToArray:function(i,t){return t=t||h.vec3(),t[0]=i.x,t[1]=i.y,t[2]=i.z,t},dupMat4:function(i){return i.slice(0,16)},mat4To3:function(i){return[i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]]},m4s:function(i){return[i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i]},setMat4ToZeroes:function(){return h.m4s(0)},setMat4ToOnes:function(){return h.m4s(1)},diagonalMat4v:function(i){return new _e([i[0],0,0,0,0,i[1],0,0,0,0,i[2],0,0,0,0,i[3]])},diagonalMat4c:function(i,t,e,r){return h.diagonalMat4v([i,t,e,r])},diagonalMat4s:function(i){return h.diagonalMat4c(i,i,i,i)},identityMat4:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new _e(16);return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i},identityMat3:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new _e(9);return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=1,i[5]=0,i[6]=0,i[7]=0,i[8]=1,i},isIdentityMat4:function(i){return!(i[0]!==1||i[1]!==0||i[2]!==0||i[3]!==0||i[4]!==0||i[5]!==1||i[6]!==0||i[7]!==0||i[8]!==0||i[9]!==0||i[10]!==1||i[11]!==0||i[12]!==0||i[13]!==0||i[14]!==0||i[15]!==1)},negateMat4:function(i,t){return t||(t=i),t[0]=-i[0],t[1]=-i[1],t[2]=-i[2],t[3]=-i[3],t[4]=-i[4],t[5]=-i[5],t[6]=-i[6],t[7]=-i[7],t[8]=-i[8],t[9]=-i[9],t[10]=-i[10],t[11]=-i[11],t[12]=-i[12],t[13]=-i[13],t[14]=-i[14],t[15]=-i[15],t},addMat4:function(i,t,e){return e||(e=i),e[0]=i[0]+t[0],e[1]=i[1]+t[1],e[2]=i[2]+t[2],e[3]=i[3]+t[3],e[4]=i[4]+t[4],e[5]=i[5]+t[5],e[6]=i[6]+t[6],e[7]=i[7]+t[7],e[8]=i[8]+t[8],e[9]=i[9]+t[9],e[10]=i[10]+t[10],e[11]=i[11]+t[11],e[12]=i[12]+t[12],e[13]=i[13]+t[13],e[14]=i[14]+t[14],e[15]=i[15]+t[15],e},addMat4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]+t,e[1]=i[1]+t,e[2]=i[2]+t,e[3]=i[3]+t,e[4]=i[4]+t,e[5]=i[5]+t,e[6]=i[6]+t,e[7]=i[7]+t,e[8]=i[8]+t,e[9]=i[9]+t,e[10]=i[10]+t,e[11]=i[11]+t,e[12]=i[12]+t,e[13]=i[13]+t,e[14]=i[14]+t,e[15]=i[15]+t,e},addScalarMat4:function(i,t,e){return h.addMat4Scalar(t,i,e)},subMat4:function(i,t,e){return e||(e=i),e[0]=i[0]-t[0],e[1]=i[1]-t[1],e[2]=i[2]-t[2],e[3]=i[3]-t[3],e[4]=i[4]-t[4],e[5]=i[5]-t[5],e[6]=i[6]-t[6],e[7]=i[7]-t[7],e[8]=i[8]-t[8],e[9]=i[9]-t[9],e[10]=i[10]-t[10],e[11]=i[11]-t[11],e[12]=i[12]-t[12],e[13]=i[13]-t[13],e[14]=i[14]-t[14],e[15]=i[15]-t[15],e},subMat4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]-t,e[3]=i[3]-t,e[4]=i[4]-t,e[5]=i[5]-t,e[6]=i[6]-t,e[7]=i[7]-t,e[8]=i[8]-t,e[9]=i[9]-t,e[10]=i[10]-t,e[11]=i[11]-t,e[12]=i[12]-t,e[13]=i[13]-t,e[14]=i[14]-t,e[15]=i[15]-t,e},subScalarMat4:function(i,t,e){return e||(e=t),e[0]=i-t[0],e[1]=i-t[1],e[2]=i-t[2],e[3]=i-t[3],e[4]=i-t[4],e[5]=i-t[5],e[6]=i-t[6],e[7]=i-t[7],e[8]=i-t[8],e[9]=i-t[9],e[10]=i-t[10],e[11]=i-t[11],e[12]=i-t[12],e[13]=i-t[13],e[14]=i-t[14],e[15]=i-t[15],e},mulMat4:function(i,t,e){e||(e=i);var r=i[0],s=i[1],n=i[2],a=i[3],u=i[4],c=i[5],C=i[6],k=i[7],D=i[8],Q=i[9],X=i[10],R=i[11],q=i[12],te=i[13],se=i[14],ie=i[15],he=t[0],ge=t[1],pe=t[2],xe=t[3],Se=t[4],Oe=t[5],Ge=t[6],Ye=t[7],He=t[8],Ne=t[9],Ze=t[10],ot=t[11],ut=t[12],ct=t[13],ft=t[14],Ct=t[15];return e[0]=he*r+ge*u+pe*D+xe*q,e[1]=he*s+ge*c+pe*Q+xe*te,e[2]=he*n+ge*C+pe*X+xe*se,e[3]=he*a+ge*k+pe*R+xe*ie,e[4]=Se*r+Oe*u+Ge*D+Ye*q,e[5]=Se*s+Oe*c+Ge*Q+Ye*te,e[6]=Se*n+Oe*C+Ge*X+Ye*se,e[7]=Se*a+Oe*k+Ge*R+Ye*ie,e[8]=He*r+Ne*u+Ze*D+ot*q,e[9]=He*s+Ne*c+Ze*Q+ot*te,e[10]=He*n+Ne*C+Ze*X+ot*se,e[11]=He*a+Ne*k+Ze*R+ot*ie,e[12]=ut*r+ct*u+ft*D+Ct*q,e[13]=ut*s+ct*c+ft*Q+Ct*te,e[14]=ut*n+ct*C+ft*X+Ct*se,e[15]=ut*a+ct*k+ft*R+Ct*ie,e},mulMat3:function(i,t,e){e||(e=new _e(9));var r=i[0],s=i[3],n=i[6],a=i[1],u=i[4],c=i[7],C=i[2],k=i[5],D=i[8],Q=t[0],X=t[3],R=t[6],q=t[1],te=t[4],se=t[7],ie=t[2],he=t[5],ge=t[8];return e[0]=r*Q+s*q+n*ie,e[3]=r*X+s*te+n*he,e[6]=r*R+s*se+n*ge,e[1]=a*Q+u*q+c*ie,e[4]=a*X+u*te+c*he,e[7]=a*R+u*se+c*ge,e[2]=C*Q+k*q+D*ie,e[5]=C*X+k*te+D*he,e[8]=C*R+k*se+D*ge,e},mulMat4Scalar:function(i,t,e){return e||(e=i),e[0]=i[0]*t,e[1]=i[1]*t,e[2]=i[2]*t,e[3]=i[3]*t,e[4]=i[4]*t,e[5]=i[5]*t,e[6]=i[6]*t,e[7]=i[7]*t,e[8]=i[8]*t,e[9]=i[9]*t,e[10]=i[10]*t,e[11]=i[11]*t,e[12]=i[12]*t,e[13]=i[13]*t,e[14]=i[14]*t,e[15]=i[15]*t,e},mulMat4v4:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4(),r=t[0],s=t[1],n=t[2],a=t[3];return e[0]=i[0]*r+i[4]*s+i[8]*n+i[12]*a,e[1]=i[1]*r+i[5]*s+i[9]*n+i[13]*a,e[2]=i[2]*r+i[6]*s+i[10]*n+i[14]*a,e[3]=i[3]*r+i[7]*s+i[11]*n+i[15]*a,e},transposeMat4:function(i,t){var e=i[4],r=i[14],s=i[8],n=i[13],a=i[12],u=i[9];if(!t||i===t){var c=i[1],C=i[2],k=i[3],D=i[6],Q=i[7],X=i[11];return i[1]=e,i[2]=s,i[3]=a,i[4]=c,i[6]=u,i[7]=n,i[8]=C,i[9]=D,i[11]=r,i[12]=k,i[13]=Q,i[14]=X,i}return t[0]=i[0],t[1]=e,t[2]=s,t[3]=a,t[4]=i[1],t[5]=i[5],t[6]=u,t[7]=n,t[8]=i[2],t[9]=i[6],t[10]=i[10],t[11]=r,t[12]=i[3],t[13]=i[7],t[14]=i[11],t[15]=i[15],t},transposeMat3:function(i,t){if(t===i){var e=i[1],r=i[2],s=i[5];t[1]=i[3],t[2]=i[6],t[3]=e,t[5]=i[7],t[6]=r,t[7]=s}else t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8];return t},determinantMat4:function(i){var t=i[0],e=i[1],r=i[2],s=i[3],n=i[4],a=i[5],u=i[6],c=i[7],C=i[8],k=i[9],D=i[10],Q=i[11],X=i[12],R=i[13],q=i[14],te=i[15];return X*k*u*s-C*R*u*s-X*a*D*s+n*R*D*s+C*a*q*s-n*k*q*s-X*k*r*c+C*R*r*c+X*e*D*c-t*R*D*c-C*e*q*c+t*k*q*c+X*a*r*Q-n*R*r*Q-X*e*u*Q+t*R*u*Q+n*e*q*Q-t*a*q*Q-C*a*r*te+n*k*r*te+C*e*u*te-t*k*u*te-n*e*D*te+t*a*D*te},inverseMat4:function(i,t){t||(t=i);var e=i[0],r=i[1],s=i[2],n=i[3],a=i[4],u=i[5],c=i[6],C=i[7],k=i[8],D=i[9],Q=i[10],X=i[11],R=i[12],q=i[13],te=i[14],se=i[15],ie=e*u-r*a,he=e*c-s*a,ge=e*C-n*a,pe=r*c-s*u,xe=r*C-n*u,Se=s*C-n*c,Oe=k*q-D*R,Ge=k*te-Q*R,Ye=k*se-X*R,He=D*te-Q*q,Ne=D*se-X*q,Ze=Q*se-X*te,ot=1/(ie*Ze-he*Ne+ge*He+pe*Ye-xe*Ge+Se*Oe);return t[0]=(u*Ze-c*Ne+C*He)*ot,t[1]=(-r*Ze+s*Ne-n*He)*ot,t[2]=(q*Se-te*xe+se*pe)*ot,t[3]=(-D*Se+Q*xe-X*pe)*ot,t[4]=(-a*Ze+c*Ye-C*Ge)*ot,t[5]=(e*Ze-s*Ye+n*Ge)*ot,t[6]=(-R*Se+te*ge-se*he)*ot,t[7]=(k*Se-Q*ge+X*he)*ot,t[8]=(a*Ne-u*Ye+C*Oe)*ot,t[9]=(-e*Ne+r*Ye-n*Oe)*ot,t[10]=(R*xe-q*ge+se*ie)*ot,t[11]=(-k*xe+D*ge-X*ie)*ot,t[12]=(-a*He+u*Ge-c*Oe)*ot,t[13]=(e*He-r*Ge+s*Oe)*ot,t[14]=(-R*pe+q*he-te*ie)*ot,t[15]=(k*pe-D*he+Q*ie)*ot,t},traceMat4:function(i){return i[0]+i[5]+i[10]+i[15]},translationMat4v:function(i,t){var e=t||h.identityMat4();return e[12]=i[0],e[13]=i[1],e[14]=i[2],e},translationMat3v:function(i,t){var e=t||h.identityMat3();return e[6]=i[0],e[7]=i[1],e},translationMat4c:function(){var o=new _e(3);return function(i,t,e,r){return o[0]=i,o[1]=t,o[2]=e,h.translationMat4v(o,r)}}(),translationMat4s:function(i,t){return h.translationMat4c(i,i,i,t)},translateMat4v:function(i,t){return h.translateMat4c(i[0],i[1],i[2],t)},translateMat4c:function(i,t,e,r){var s=r[3];r[0]+=s*i,r[1]+=s*t,r[2]+=s*e;var n=r[7];r[4]+=n*i,r[5]+=n*t,r[6]+=n*e;var a=r[11];r[8]+=a*i,r[9]+=a*t,r[10]+=a*e;var u=r[15];return r[12]+=u*i,r[13]+=u*t,r[14]+=u*e,r},setMat4Translation:function(i,t,e){return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=i[15],e},rotationMat4v:function(i,t,e){var r=h.normalizeVec4([t[0],t[1],t[2],0],[]),s=Math.sin(i),n=Math.cos(i),a=1-n,u=r[0],c=r[1],C=r[2],k,D,Q,X,R,q;return k=u*c,D=c*C,Q=C*u,X=u*s,R=c*s,q=C*s,e=e||h.mat4(),e[0]=a*u*u+n,e[1]=a*k+q,e[2]=a*Q-R,e[3]=0,e[4]=a*k-q,e[5]=a*c*c+n,e[6]=a*D+X,e[7]=0,e[8]=a*Q+R,e[9]=a*D-X,e[10]=a*C*C+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},rotationMat4c:function(i,t,e,r,s){return h.rotationMat4v(i,[t,e,r],s)},scalingMat4v:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.identityMat4();return t[0]=i[0],t[5]=i[1],t[10]=i[2],t},scalingMat3v:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.identityMat3();return t[0]=i[0],t[4]=i[1],t},scalingMat4c:function(){var o=new _e(3);return function(i,t,e,r){return o[0]=i,o[1]=t,o[2]=e,h.scalingMat4v(o,r)}}(),scaleMat4c:function(i,t,e,r){return r[0]*=i,r[4]*=t,r[8]*=e,r[1]*=i,r[5]*=t,r[9]*=e,r[2]*=i,r[6]*=t,r[10]*=e,r[3]*=i,r[7]*=t,r[11]*=e,r},scaleMat4v:function(i,t){var e=i[0],r=i[1],s=i[2];return t[0]*=e,t[4]*=r,t[8]*=s,t[1]*=e,t[5]*=r,t[9]*=s,t[2]*=e,t[6]*=r,t[10]*=s,t[3]*=e,t[7]*=r,t[11]*=s,t},scalingMat4s:function(i){return h.scalingMat4c(i,i,i)},rotationTranslationMat4:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.mat4(),r=i[0],s=i[1],n=i[2],a=i[3],u=r+r,c=s+s,C=n+n,k=r*u,D=r*c,Q=r*C,X=s*c,R=s*C,q=n*C,te=a*u,se=a*c,ie=a*C;return e[0]=1-(X+q),e[1]=D+ie,e[2]=Q-se,e[3]=0,e[4]=D-ie,e[5]=1-(k+q),e[6]=R+te,e[7]=0,e[8]=Q+se,e[9]=R-te,e[10]=1-(k+X),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e},mat4ToEuler:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4(),r=h.clamp,s=i[0],n=i[4],a=i[8],u=i[1],c=i[5],C=i[9],k=i[2],D=i[6],Q=i[10];return t==="XYZ"?(e[1]=Math.asin(r(a,-1,1)),Math.abs(a)<.99999?(e[0]=Math.atan2(-C,Q),e[2]=Math.atan2(-n,s)):(e[0]=Math.atan2(D,c),e[2]=0)):t==="YXZ"?(e[0]=Math.asin(-r(C,-1,1)),Math.abs(C)<.99999?(e[1]=Math.atan2(a,Q),e[2]=Math.atan2(u,c)):(e[1]=Math.atan2(-k,s),e[2]=0)):t==="ZXY"?(e[0]=Math.asin(r(D,-1,1)),Math.abs(D)<.99999?(e[1]=Math.atan2(-k,Q),e[2]=Math.atan2(-n,c)):(e[1]=0,e[2]=Math.atan2(u,s))):t==="ZYX"?(e[1]=Math.asin(-r(k,-1,1)),Math.abs(k)<.99999?(e[0]=Math.atan2(D,Q),e[2]=Math.atan2(u,s)):(e[0]=0,e[2]=Math.atan2(-n,c))):t==="YZX"?(e[2]=Math.asin(r(u,-1,1)),Math.abs(u)<.99999?(e[0]=Math.atan2(-C,c),e[1]=Math.atan2(-k,s)):(e[0]=0,e[1]=Math.atan2(a,Q))):t==="XZY"&&(e[2]=Math.asin(-r(n,-1,1)),Math.abs(n)<.99999?(e[0]=Math.atan2(D,c),e[1]=Math.atan2(a,s)):(e[0]=Math.atan2(-C,Q),e[1]=0)),e},composeMat4:function(i,t,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h.mat4();return h.quaternionToRotationMat4(t,r),h.scaleMat4v(e,r),h.translateMat4v(i,r),r},decomposeMat4:function(){var o=new _e(3),i=new _e(16);return function(e,r,s,n){o[0]=e[0],o[1]=e[1],o[2]=e[2];var a=h.lenVec3(o);o[0]=e[4],o[1]=e[5],o[2]=e[6];var u=h.lenVec3(o);o[8]=e[8],o[9]=e[9],o[10]=e[10];var c=h.lenVec3(o),C=h.determinantMat4(e);C<0&&(a=-a),r[0]=e[12],r[1]=e[13],r[2]=e[14],i.set(e);var k=1/a,D=1/u,Q=1/c;return i[0]*=k,i[1]*=k,i[2]*=k,i[4]*=D,i[5]*=D,i[6]*=D,i[8]*=Q,i[9]*=Q,i[10]*=Q,h.mat4ToQuaternion(i,s),n[0]=a,n[1]=u,n[2]=c,this}}(),getColMat4:function(i,t){var e=t*4;return[i[e],i[e+1],i[e+2],i[e+3]]},setRowMat4:function(i,t,e){i[t]=e[0],i[t+4]=e[1],i[t+8]=e[2],i[t+12]=e[3]},lookAtMat4v:function(i,t,e,r){r||(r=h.mat4());var s=i[0],n=i[1],a=i[2],u=e[0],c=e[1],C=e[2],k=t[0],D=t[1],Q=t[2];if(s===k&&n===D&&a===Q)return h.identityMat4();var X,R,q,te,se,ie,he,ge,pe,xe;return X=s-k,R=n-D,q=a-Q,xe=1/Math.sqrt(X*X+R*R+q*q),X*=xe,R*=xe,q*=xe,te=c*q-C*R,se=C*X-u*q,ie=u*R-c*X,xe=Math.sqrt(te*te+se*se+ie*ie),xe?(xe=1/xe,te*=xe,se*=xe,ie*=xe):(te=0,se=0,ie=0),he=R*ie-q*se,ge=q*te-X*ie,pe=X*se-R*te,xe=Math.sqrt(he*he+ge*ge+pe*pe),xe?(xe=1/xe,he*=xe,ge*=xe,pe*=xe):(he=0,ge=0,pe=0),r[0]=te,r[1]=he,r[2]=X,r[3]=0,r[4]=se,r[5]=ge,r[6]=R,r[7]=0,r[8]=ie,r[9]=pe,r[10]=q,r[11]=0,r[12]=-(te*s+se*n+ie*a),r[13]=-(he*s+ge*n+pe*a),r[14]=-(X*s+R*n+q*a),r[15]=1,r},lookAtMat4c:function(i,t,e,r,s,n,a,u,c){return h.lookAtMat4v([i,t,e],[r,s,n],[a,u,c],[])},orthoMat4c:function(i,t,e,r,s,n,a){a||(a=h.mat4());var u=t-i,c=r-e,C=n-s;return a[0]=2/u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/c,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/C,a[11]=0,a[12]=-(i+t)/u,a[13]=-(r+e)/c,a[14]=-(n+s)/C,a[15]=1,a},frustumMat4v:function(i,t,e){e||(e=h.mat4());var r=[i[0],i[1],i[2],0],s=[t[0],t[1],t[2],0];h.addVec4(s,r,we),h.subVec4(s,r,oe);var n=2*r[2],a=oe[0],u=oe[1],c=oe[2];return e[0]=n/a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n/u,e[6]=0,e[7]=0,e[8]=we[0]/a,e[9]=we[1]/u,e[10]=-we[2]/c,e[11]=-1,e[12]=0,e[13]=0,e[14]=-n*s[2]/c,e[15]=0,e},frustumMat4:function(i,t,e,r,s,n,a){a||(a=h.mat4());var u=t-i,c=r-e,C=n-s;return a[0]=s*2/u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=s*2/c,a[6]=0,a[7]=0,a[8]=(t+i)/u,a[9]=(r+e)/c,a[10]=-(n+s)/C,a[11]=-1,a[12]=0,a[13]=0,a[14]=-(n*s*2)/C,a[15]=0,a},perspectiveMat4:function(i,t,e,r,s){var n=[],a=[];return n[2]=e,a[2]=r,a[1]=n[2]*Math.tan(i/2),n[1]=-a[1],a[0]=a[1]*t,n[0]=-a[0],h.frustumMat4v(n,a,s)},compareMat4:function(i,t){return i[0]===t[0]&&i[1]===t[1]&&i[2]===t[2]&&i[3]===t[3]&&i[4]===t[4]&&i[5]===t[5]&&i[6]===t[6]&&i[7]===t[7]&&i[8]===t[8]&&i[9]===t[9]&&i[10]===t[10]&&i[11]===t[11]&&i[12]===t[12]&&i[13]===t[13]&&i[14]===t[14]&&i[15]===t[15]},transformPoint3:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec3(),r=t[0],s=t[1],n=t[2];return e[0]=i[0]*r+i[4]*s+i[8]*n+i[12],e[1]=i[1]*r+i[5]*s+i[9]*n+i[13],e[2]=i[2]*r+i[6]*s+i[10]*n+i[14],e},transformPoint4:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4();return e[0]=i[0]*t[0]+i[4]*t[1]+i[8]*t[2]+i[12]*t[3],e[1]=i[1]*t[0]+i[5]*t[1]+i[9]*t[2]+i[13]*t[3],e[2]=i[2]*t[0]+i[6]*t[1]+i[10]*t[2]+i[14]*t[3],e[3]=i[3]*t[0]+i[7]*t[1]+i[11]*t[2]+i[15]*t[3],e},transformPoints3:function(i,t,e){for(var r=e||[],s=t.length,n,a,u,c,C=i[0],k=i[1],D=i[2],Q=i[3],X=i[4],R=i[5],q=i[6],te=i[7],se=i[8],ie=i[9],he=i[10],ge=i[11],pe=i[12],xe=i[13],Se=i[14],Oe=i[15],Ge,Ye=0;Ye<s;++Ye)c=t[Ye],n=c[0],a=c[1],u=c[2],Ge=r[Ye]||(r[Ye]=[0,0,0]),Ge[0]=C*n+X*a+se*u+pe,Ge[1]=k*n+R*a+ie*u+xe,Ge[2]=D*n+q*a+he*u+Se,Ge[3]=Q*n+te*a+ge*u+Oe;return r.length=s,r},transformPositions3:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,r,s=t.length,n,a,u,c=i[0],C=i[1],k=i[2];i[3];var D=i[4],Q=i[5],X=i[6];i[7];var R=i[8],q=i[9],te=i[10];i[11];var se=i[12],ie=i[13],he=i[14];for(i[15],r=0;r<s;r+=3)n=t[r+0],a=t[r+1],u=t[r+2],e[r+0]=c*n+D*a+R*u+se,e[r+1]=C*n+Q*a+q*u+ie,e[r+2]=k*n+X*a+te*u+he;return e},transformPositions4:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,r,s=t.length,n,a,u,c=i[0],C=i[1],k=i[2],D=i[3],Q=i[4],X=i[5],R=i[6],q=i[7],te=i[8],se=i[9],ie=i[10],he=i[11],ge=i[12],pe=i[13],xe=i[14],Se=i[15];for(r=0;r<s;r+=4)n=t[r+0],a=t[r+1],u=t[r+2],e[r+0]=c*n+Q*a+te*u+ge,e[r+1]=C*n+X*a+se*u+pe,e[r+2]=k*n+R*a+ie*u+xe,e[r+3]=D*n+q*a+he*u+Se;return e},transformVec3:function(i,t,e){var r=t[0],s=t[1],n=t[2];return e=e||this.vec3(),e[0]=i[0]*r+i[4]*s+i[8]*n,e[1]=i[1]*r+i[5]*s+i[9]*n,e[2]=i[2]*r+i[6]*s+i[10]*n,e},transformVec4:function(i,t,e){var r=t[0],s=t[1],n=t[2],a=t[3];return e=e||h.vec4(),e[0]=i[0]*r+i[4]*s+i[8]*n+i[12]*a,e[1]=i[1]*r+i[5]*s+i[9]*n+i[13]*a,e[2]=i[2]*r+i[6]*s+i[10]*n+i[14]*a,e[3]=i[3]*r+i[7]*s+i[11]*n+i[15]*a,e},rotateVec2:function(i,t,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i,s=Math.cos(e),n=Math.sin(e),a=i[0]-t[0],u=i[1]-t[1];return r[0]=a*s-u*n+t[0],r[1]=a*n+u*s+t[1],i},rotateVec3X:function(i,t,e,r){var s=[],n=[];return s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2],n[0]=s[0],n[1]=s[1]*Math.cos(e)-s[2]*Math.sin(e),n[2]=s[1]*Math.sin(e)+s[2]*Math.cos(e),r[0]=n[0]+t[0],r[1]=n[1]+t[1],r[2]=n[2]+t[2],r},rotateVec3Y:function(i,t,e,r){var s=[],n=[];return s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2],n[0]=s[2]*Math.sin(e)+s[0]*Math.cos(e),n[1]=s[1],n[2]=s[2]*Math.cos(e)-s[0]*Math.sin(e),r[0]=n[0]+t[0],r[1]=n[1]+t[1],r[2]=n[2]+t[2],r},rotateVec3Z:function(i,t,e,r){var s=[],n=[];return s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2],n[0]=s[0]*Math.cos(e)-s[1]*Math.sin(e),n[1]=s[0]*Math.sin(e)+s[1]*Math.cos(e),n[2]=s[2],r[0]=n[0]+t[0],r[1]=n[1]+t[1],r[2]=n[2]+t[2],r},projectVec4:function(i,t){var e=1/i[3];return t=t||h.vec2(),t[0]=i[0]*e,t[1]=i[1]*e,t},unprojectVec3:function(){var o=new _e(16),i=new _e(16),t=new _e(16);return function(e,r,s,n){return this.transformVec3(this.mulMat4(this.inverseMat4(r,o),this.inverseMat4(s,i),t),e,n)}}(),lerpVec3:function(i,t,e,r,s,n){var a=n||h.vec3(),u=(i-t)/(e-t);return a[0]=r[0]+u*(s[0]-r[0]),a[1]=r[1]+u*(s[1]-r[1]),a[2]=r[2]+u*(s[2]-r[2]),a},lerpMat4:function(i,t,e,r,s,n){var a=n||h.mat4(),u=(i-t)/(e-t);return a[0]=r[0]+u*(s[0]-r[0]),a[1]=r[1]+u*(s[1]-r[1]),a[2]=r[2]+u*(s[2]-r[2]),a[3]=r[3]+u*(s[3]-r[3]),a[4]=r[4]+u*(s[4]-r[4]),a[5]=r[5]+u*(s[5]-r[5]),a[6]=r[6]+u*(s[6]-r[6]),a[7]=r[7]+u*(s[7]-r[7]),a[8]=r[8]+u*(s[8]-r[8]),a[9]=r[9]+u*(s[9]-r[9]),a[10]=r[10]+u*(s[10]-r[10]),a[11]=r[11]+u*(s[11]-r[11]),a[12]=r[12]+u*(s[12]-r[12]),a[13]=r[13]+u*(s[13]-r[13]),a[14]=r[14]+u*(s[14]-r[14]),a[15]=r[15]+u*(s[15]-r[15]),a},flatten:function(i){var t=[],e,r,s,n,a;for(e=0,r=i.length;e<r;e++)for(a=i[e],s=0,n=a.length;s<n;s++)t.push(a[s]);return t},identityQuaternion:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.vec4();return i[0]=0,i[1]=0,i[2]=0,i[3]=1,i},eulerToQuaternion:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4(),r=i[0]*h.DEGTORAD/2,s=i[1]*h.DEGTORAD/2,n=i[2]*h.DEGTORAD/2,a=Math.cos(r),u=Math.cos(s),c=Math.cos(n),C=Math.sin(r),k=Math.sin(s),D=Math.sin(n);return t==="XYZ"?(e[0]=C*u*c+a*k*D,e[1]=a*k*c-C*u*D,e[2]=a*u*D+C*k*c,e[3]=a*u*c-C*k*D):t==="YXZ"?(e[0]=C*u*c+a*k*D,e[1]=a*k*c-C*u*D,e[2]=a*u*D-C*k*c,e[3]=a*u*c+C*k*D):t==="ZXY"?(e[0]=C*u*c-a*k*D,e[1]=a*k*c+C*u*D,e[2]=a*u*D+C*k*c,e[3]=a*u*c-C*k*D):t==="ZYX"?(e[0]=C*u*c-a*k*D,e[1]=a*k*c+C*u*D,e[2]=a*u*D-C*k*c,e[3]=a*u*c+C*k*D):t==="YZX"?(e[0]=C*u*c+a*k*D,e[1]=a*k*c+C*u*D,e[2]=a*u*D-C*k*c,e[3]=a*u*c-C*k*D):t==="XZY"&&(e[0]=C*u*c-a*k*D,e[1]=a*k*c-C*u*D,e[2]=a*u*D+C*k*c,e[3]=a*u*c+C*k*D),e},mat4ToQuaternion:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.vec4(),e=i[0],r=i[4],s=i[8],n=i[1],a=i[5],u=i[9],c=i[2],C=i[6],k=i[10],D,Q=e+a+k;return Q>0?(D=.5/Math.sqrt(Q+1),t[3]=.25/D,t[0]=(C-u)*D,t[1]=(s-c)*D,t[2]=(n-r)*D):e>a&&e>k?(D=2*Math.sqrt(1+e-a-k),t[3]=(C-u)/D,t[0]=.25*D,t[1]=(r+n)/D,t[2]=(s+c)/D):a>k?(D=2*Math.sqrt(1+a-e-k),t[3]=(s-c)/D,t[0]=(r+n)/D,t[1]=.25*D,t[2]=(u+C)/D):(D=2*Math.sqrt(1+k-e-a),t[3]=(n-r)/D,t[0]=(s+c)/D,t[1]=(u+C)/D,t[2]=.25*D),t},vec3PairToQuaternion:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4(),r=Math.sqrt(h.dotVec3(i,i)*h.dotVec3(t,t)),s=r+h.dotVec3(i,t);return s<1e-8*r?(s=0,Math.abs(i[0])>Math.abs(i[2])?(e[0]=-i[1],e[1]=i[0],e[2]=0):(e[0]=0,e[1]=-i[2],e[2]=i[1])):h.cross3Vec3(i,t,e),e[3]=s,h.normalizeQuaternion(e)},angleAxisToQuaternion:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.vec4(),e=i[3]/2,r=Math.sin(e);return t[0]=r*i[0],t[1]=r*i[1],t[2]=r*i[2],t[3]=Math.cos(e),t},quaternionToEuler:function(){var o=new _e(16);return function(i,t,e){return e=e||h.vec3(),h.quaternionToRotationMat4(i,o),h.mat4ToEuler(o,t,e),e}}(),mulQuaternions:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec4(),r=i[0],s=i[1],n=i[2],a=i[3],u=t[0],c=t[1],C=t[2],k=t[3];return e[0]=a*u+r*k+s*C-n*c,e[1]=a*c+s*k+n*u-r*C,e[2]=a*C+n*k+r*c-s*u,e[3]=a*k-r*u-s*c-n*C,e},vec3ApplyQuaternion:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.vec3(),r=t[0],s=t[1],n=t[2],a=i[0],u=i[1],c=i[2],C=i[3],k=C*r+u*n-c*s,D=C*s+c*r-a*n,Q=C*n+a*s-u*r,X=-a*r-u*s-c*n;return e[0]=k*C+X*-a+D*-c-Q*-u,e[1]=D*C+X*-u+Q*-a-k*-c,e[2]=Q*C+X*-c+k*-u-D*-a,e},quaternionToMat4:function(i,t){t=h.identityMat4(t);var e=i[0],r=i[1],s=i[2],n=i[3],a=2*e,u=2*r,c=2*s,C=a*n,k=u*n,D=c*n,Q=a*e,X=u*e,R=c*e,q=u*r,te=c*r,se=c*s;return t[0]=1-(q+se),t[1]=X+D,t[2]=R-k,t[4]=X-D,t[5]=1-(Q+se),t[6]=te+C,t[8]=R+k,t[9]=te-C,t[10]=1-(Q+q),t},quaternionToRotationMat4:function(i,t){var e=i[0],r=i[1],s=i[2],n=i[3],a=e+e,u=r+r,c=s+s,C=e*a,k=e*u,D=e*c,Q=r*u,X=r*c,R=s*c,q=n*a,te=n*u,se=n*c;return t[0]=1-(Q+R),t[4]=k-se,t[8]=D+te,t[1]=k+se,t[5]=1-(C+R),t[9]=X-q,t[2]=D-te,t[6]=X+q,t[10]=1-(C+Q),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i,e=h.lenVec4([i[0],i[1],i[2],i[3]]);return t[0]=i[0]/e,t[1]=i[1]/e,t[2]=i[2]/e,t[3]=i[3]/e,t},conjugateQuaternion:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return t[0]=-i[0],t[1]=-i[1],t[2]=-i[2],t[3]=i[3],t},inverseQuaternion:function(i,t){return h.normalizeQuaternion(h.conjugateQuaternion(i,t))},quaternionToAngleAxis:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.vec4();i=h.normalizeQuaternion(i,Ae);var e=i[3],r=2*Math.acos(e),s=Math.sqrt(1-e*e);return s<.001?(t[0]=i[0],t[1]=i[1],t[2]=i[2]):(t[0]=i[0]/s,t[1]=i[1]/s,t[2]=i[2]/s),t[3]=r,t},AABB3:function(i){return new _e(i||6)},AABB2:function(i){return new _e(i||4)},OBB3:function(i){return new _e(i||32)},OBB2:function(i){return new _e(i||16)},Sphere3:function(i,t,e,r){return new _e([i,t,e,r])},transformOBB3:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,r,s=t.length,n,a,u,c=i[0],C=i[1],k=i[2],D=i[3],Q=i[4],X=i[5],R=i[6],q=i[7],te=i[8],se=i[9],ie=i[10],he=i[11],ge=i[12],pe=i[13],xe=i[14],Se=i[15];for(r=0;r<s;r+=4)n=t[r+0],a=t[r+1],u=t[r+2],e[r+0]=c*n+Q*a+te*u+ge,e[r+1]=C*n+X*a+se*u+pe,e[r+2]=k*n+R*a+ie*u+xe,e[r+3]=D*n+q*a+he*u+Se;return e},containsAABB3:function(i,t){var e=i[0]<=t[0]&&t[3]<=i[3]&&i[1]<=t[1]&&t[4]<=i[4]&&i[2]<=t[2]&&t[5]<=i[5];return e},getAABB3Diag:function(){var o=new _e(3),i=new _e(3),t=new _e(3);return function(e){return o[0]=e[0],o[1]=e[1],o[2]=e[2],i[0]=e[3],i[1]=e[4],i[2]=e[5],h.subVec3(i,o,t),Math.abs(h.lenVec3(t))}}(),getAABB3DiagPoint:function(){var o=new _e(3),i=new _e(3),t=new _e(3);return function(e,r){o[0]=e[0],o[1]=e[1],o[2]=e[2],i[0]=e[3],i[1]=e[4],i[2]=e[5];var s=h.subVec3(i,o,t),n=r[0]-e[0],a=e[3]-r[0],u=r[1]-e[1],c=e[4]-r[1],C=r[2]-e[2],k=e[5]-r[2];return s[0]+=n>a?n:a,s[1]+=u>c?u:c,s[2]+=C>k?C:k,Math.abs(h.lenVec3(s))}}(),getAABB3Area:function(i){var t=i[3]-i[0],e=i[4]-i[1],r=i[5]-i[2];return t*e*r},getAABB3Center:function(i,t){var e=t||h.vec3();return e[0]=(i[0]+i[3])/2,e[1]=(i[1]+i[4])/2,e[2]=(i[2]+i[5])/2,e},getAABB2Center:function(i,t){var e=t||h.vec2();return e[0]=(i[2]+i[0])/2,e[1]=(i[3]+i[1])/2,e},collapseAABB3:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.AABB3();return i[0]=h.MAX_DOUBLE,i[1]=h.MAX_DOUBLE,i[2]=h.MAX_DOUBLE,i[3]=h.MIN_DOUBLE,i[4]=h.MIN_DOUBLE,i[5]=h.MIN_DOUBLE,i},AABB3ToOBB3:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.OBB3();return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,t[4]=i[3],t[5]=i[1],t[6]=i[2],t[7]=1,t[8]=i[3],t[9]=i[4],t[10]=i[2],t[11]=1,t[12]=i[0],t[13]=i[4],t[14]=i[2],t[15]=1,t[16]=i[0],t[17]=i[1],t[18]=i[5],t[19]=1,t[20]=i[3],t[21]=i[1],t[22]=i[5],t[23]=1,t[24]=i[3],t[25]=i[4],t[26]=i[5],t[27]=1,t[28]=i[0],t[29]=i[4],t[30]=i[5],t[31]=1,t},positions3ToAABB3:function(){var o=new _e(3);return function(i,t,e){t=t||h.AABB3();for(var r=h.MAX_DOUBLE,s=h.MAX_DOUBLE,n=h.MAX_DOUBLE,a=h.MIN_DOUBLE,u=h.MIN_DOUBLE,c=h.MIN_DOUBLE,C,k,D,Q=0,X=i.length;Q<X;Q+=3)e?(o[0]=i[Q+0],o[1]=i[Q+1],o[2]=i[Q+2],h.decompressPosition(o,e,o),C=o[0],k=o[1],D=o[2]):(C=i[Q+0],k=i[Q+1],D=i[Q+2]),C<r&&(r=C),k<s&&(s=k),D<n&&(n=D),C>a&&(a=C),k>u&&(u=k),D>c&&(c=D);return t[0]=r,t[1]=s,t[2]=n,t[3]=a,t[4]=u,t[5]=c,t}}(),OBB3ToAABB3:function(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.AABB3(),e=h.MAX_DOUBLE,r=h.MAX_DOUBLE,s=h.MAX_DOUBLE,n=h.MIN_DOUBLE,a=h.MIN_DOUBLE,u=h.MIN_DOUBLE,c,C,k,D=0,Q=i.length;D<Q;D+=4)c=i[D+0],C=i[D+1],k=i[D+2],c<e&&(e=c),C<r&&(r=C),k<s&&(s=k),c>n&&(n=c),C>a&&(a=C),k>u&&(u=k);return t[0]=e,t[1]=r,t[2]=s,t[3]=n,t[4]=a,t[5]=u,t},points3ToAABB3:function(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.AABB3(),e=h.MAX_DOUBLE,r=h.MAX_DOUBLE,s=h.MAX_DOUBLE,n=h.MIN_DOUBLE,a=h.MIN_DOUBLE,u=h.MIN_DOUBLE,c,C,k,D=0,Q=i.length;D<Q;D++)c=i[D][0],C=i[D][1],k=i[D][2],c<e&&(e=c),C<r&&(r=C),k<s&&(s=k),c>n&&(n=c),C>a&&(a=C),k>u&&(u=k);return t[0]=e,t[1]=r,t[2]=s,t[3]=n,t[4]=a,t[5]=u,t},points3ToSphere3:function(){var o=new _e(3);return function(i,t){t=t||h.vec4();var e=0,r=0,s=0,n,a=i.length;for(n=0;n<a;n++)e+=i[n][0],r+=i[n][1],s+=i[n][2];t[0]=e/a,t[1]=r/a,t[2]=s/a;var u=0,c;for(n=0;n<a;n++)c=Math.abs(h.lenVec3(h.subVec3(i[n],t,o))),c>u&&(u=c);return t[3]=u,t}}(),positions3ToSphere3:function(){var o=new _e(3),i=new _e(3);return function(t,e){e=e||h.vec4();var r=0,s=0,n=0,a,u=t.length,c=0;for(a=0;a<u;a+=3)r+=t[a],s+=t[a+1],n+=t[a+2];var C=u/3;e[0]=r/C,e[1]=s/C,e[2]=n/C;var k;for(a=0;a<u;a+=3)o[0]=t[a],o[1]=t[a+1],o[2]=t[a+2],k=Math.abs(h.lenVec3(h.subVec3(o,e,i))),k>c&&(c=k);return e[3]=c,e}}(),OBB3ToSphere3:function(){var o=new _e(3),i=new _e(3);return function(t,e){e=e||h.vec4();var r=0,s=0,n=0,a,u=t.length,c=u/4;for(a=0;a<u;a+=4)r+=t[a+0],s+=t[a+1],n+=t[a+2];e[0]=r/c,e[1]=s/c,e[2]=n/c;var C=0,k;for(a=0;a<u;a+=4)o[0]=t[a+0],o[1]=t[a+1],o[2]=t[a+2],k=Math.abs(h.lenVec3(h.subVec3(o,e,i))),k>C&&(C=k);return e[3]=C,e}}(),getSphere3Center:function(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.vec3();return t[0]=i[0],t[1]=i[1],t[2]=i[2],t},getPositionsCenter:function(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.vec3(),e=0,r=0,s=0,n=0,a=i.length;n<a;n+=3)e+=i[n+0],r+=i[n+1],s+=i[n+2];var u=i.length/3;return t[0]=e/u,t[1]=r/u,t[2]=s/u,t},expandAABB3:function(i,t){return i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]>t[2]&&(i[2]=t[2]),i[3]<t[3]&&(i[3]=t[3]),i[4]<t[4]&&(i[4]=t[4]),i[5]<t[5]&&(i[5]=t[5]),i},expandAABB3Point3:function(i,t){return i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]>t[2]&&(i[2]=t[2]),i[3]<t[0]&&(i[3]=t[0]),i[4]<t[1]&&(i[4]=t[1]),i[5]<t[2]&&(i[5]=t[2]),i},expandAABB3Points3:function(i,t){for(var e,r,s,n=0,a=t.length;n<a;n+=3)e=t[n],r=t[n+1],s=t[n+2],i[0]>e&&(i[0]=e),i[1]>r&&(i[1]=r),i[2]>s&&(i[2]=s),i[3]<e&&(i[3]=e),i[4]<r&&(i[4]=r),i[5]<s&&(i[5]=s);return i},collapseAABB2:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.AABB2();return i[0]=h.MAX_DOUBLE,i[1]=h.MAX_DOUBLE,i[2]=h.MIN_DOUBLE,i[3]=h.MIN_DOUBLE,i},point3AABB3Intersect:function(i,t){return i[0]>t[0]||i[3]<t[0]||i[1]>t[1]||i[4]<t[1]||i[2]>t[2]||i[5]<t[2]},point3AABB3AbsoluteIntersect:function(i,t){return i[0]<=t[0]&&i[3]>=t[0]&&i[1]<=t[1]&&i[4]>=t[1]&&i[2]<=t[2]&&i[5]>=t[2]},planeAABB3Intersect:function(i,t,e){var r,s;i[0]>0?(r=i[0]*e[0],s=i[0]*e[3]):(r=i[0]*e[3],s=i[0]*e[0]),i[1]>0?(r+=i[1]*e[1],s+=i[1]*e[4]):(r+=i[1]*e[4],s+=i[1]*e[1]),i[2]>0?(r+=i[2]*e[2],s+=i[2]*e[5]):(r+=i[2]*e[5],s+=i[2]*e[2]);var n=r<=-t&&s<=-t;if(n)return-1;var a=r>=-t&&s>=-t;return a?1:0},OBB3ToAABB2:function(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.AABB2(),e=h.MAX_DOUBLE,r=h.MAX_DOUBLE,s=h.MIN_DOUBLE,n=h.MIN_DOUBLE,a,u,c,C,k=0,D=i.length;k<D;k+=4)a=i[k+0],u=i[k+1],c=i[k+3]||1,C=1/c,a*=C,u*=C,a<e&&(e=a),u<r&&(r=u),a>s&&(s=a),u>n&&(n=u);return t[0]=e,t[1]=r,t[2]=s,t[3]=n,t},expandAABB2:function(i,t){return i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[2]&&(i[2]=t[2]),i[3]<t[3]&&(i[3]=t[3]),i},expandAABB2Point2:function(i,t){return i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]<t[0]&&(i[2]=t[0]),i[3]<t[1]&&(i[3]=t[1]),i},AABB2ToCanvas:function(i,t,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i,s=(i[0]+1)*.5,n=(i[1]+1)*.5,a=(i[2]+1)*.5,u=(i[3]+1)*.5;return r[0]=Math.floor(s*t),r[1]=e-Math.floor(u*e),r[2]=Math.floor(a*t),r[3]=e-Math.floor(n*e),r},tangentQuadraticBezier:function(i,t,e,r){return 2*(1-i)*(e-t)+2*i*(r-e)},tangentQuadraticBezier3:function(i,t,e,r,s){return-3*t*(1-i)*(1-i)+3*e*(1-i)*(1-i)-6*i*e*(1-i)+6*i*r*(1-i)-3*i*i*r+3*i*i*s},tangentSpline:function(i){var t=6*i*i-6*i,e=3*i*i-4*i+1,r=-6*i*i+6*i,s=3*i*i-2*i;return t+e+r+s},catmullRomInterpolate:function(i,t,e,r,s){var n=(e-i)*.5,a=(r-t)*.5,u=s*s,c=s*u;return(2*t-2*e+n+a)*c+(-3*t+3*e-2*n-a)*u+n*s+t},b2p0:function(i,t){var e=1-i;return e*e*t},b2p1:function(i,t){return 2*(1-i)*i*t},b2p2:function(i,t){return i*i*t},b2:function(i,t,e,r){return this.b2p0(i,t)+this.b2p1(i,e)+this.b2p2(i,r)},b3p0:function(i,t){var e=1-i;return e*e*e*t},b3p1:function(i,t){var e=1-i;return 3*e*e*i*t},b3p2:function(i,t){var e=1-i;return 3*e*i*i*t},b3p3:function(i,t){return i*i*i*t},b3:function(i,t,e,r,s){return this.b3p0(i,t)+this.b3p1(i,e)+this.b3p2(i,r)+this.b3p3(i,s)},triangleNormal:function(i,t,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:h.vec3(),s=t[0]-i[0],n=t[1]-i[1],a=t[2]-i[2],u=e[0]-i[0],c=e[1]-i[1],C=e[2]-i[2],k=n*C-a*c,D=a*u-s*C,Q=s*c-n*u,X=Math.sqrt(k*k+D*D+Q*Q);return X===0?(r[0]=0,r[1]=0,r[2]=0):(r[0]=k/X,r[1]=D/X,r[2]=Q/X),r},rayTriangleIntersect:function(){var o=new _e(3),i=new _e(3),t=new _e(3),e=new _e(3),r=new _e(3);return function(s,n,a,u,c,C){C=C||h.vec3();var k=1e-6,D=h.subVec3(u,a,o),Q=h.subVec3(c,a,i),X=h.cross3Vec3(n,Q,t),R=h.dotVec3(D,X);if(R<k)return null;var q=h.subVec3(s,a,e),te=h.dotVec3(q,X);if(te<0||te>R)return null;var se=h.cross3Vec3(q,D,r),ie=h.dotVec3(n,se);if(ie<0||te+ie>R)return null;var he=h.dotVec3(Q,se)/R;return C[0]=s[0]+he*n[0],C[1]=s[1]+he*n[1],C[2]=s[2]+he*n[2],C}}(),rayPlaneIntersect:function(){var o=new _e(3),i=new _e(3),t=new _e(3),e=new _e(3);return function(r,s,n,a,u,c){c=c||h.vec3(),s=h.normalizeVec3(s,o);var C=h.subVec3(a,n,i),k=h.subVec3(u,n,t),D=h.cross3Vec3(C,k,e);h.normalizeVec3(D,D);var Q=-h.dotVec3(n,D),X=-(h.dotVec3(r,D)+Q)/h.dotVec3(s,D);return c[0]=r[0]+X*s[0],c[1]=r[1]+X*s[1],c[2]=r[2]+X*s[2],c}}(),cartesianToBarycentric:function(){var o=new _e(3),i=new _e(3),t=new _e(3);return function(e,r,s,n,a){var u=h.subVec3(n,r,o),c=h.subVec3(s,r,i),C=h.subVec3(e,r,t),k=h.dotVec3(u,u),D=h.dotVec3(u,c),Q=h.dotVec3(u,C),X=h.dotVec3(c,c),R=h.dotVec3(c,C),q=k*X-D*D;if(q===0)return null;var te=1/q,se=(X*Q-D*R)*te,ie=(k*R-D*Q)*te;return a[0]=1-se-ie,a[1]=ie,a[2]=se,a}}(),barycentricInsideTriangle:function(i){var t=i[1],e=i[2];return e>=0&&t>=0&&e+t<1},barycentricToCartesian:function(i,t,e,r){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:h.vec3(),n=i[0],a=i[1],u=i[2];return s[0]=t[0]*n+e[0]*a+r[0]*u,s[1]=t[1]*n+e[1]*a+r[1]*u,s[2]=t[2]*n+e[2]*a+r[2]*u,s},mergeVertices:function(i,t,e,r){var s={},n=[],a=[],u=t?[]:null,c=e?[]:null,C=[],k,D,Q,X,R=4,q=Math.pow(10,R),te,se,ie=0;for(te=0,se=i.length;te<se;te+=3)k=i[te],D=i[te+1],Q=i[te+2],X="".concat(Math.round(k*q),"_").concat(Math.round(D*q),"_").concat(Math.round(Q*q)),s[X]===void 0&&(s[X]=a.length/3,a.push(k),a.push(D),a.push(Q),t&&(u.push(t[te]),u.push(t[te+1]),u.push(t[te+2])),e&&(c.push(e[ie]),c.push(e[ie+1]))),n[te/3]=s[X],ie+=2;for(te=0,se=r.length;te<se;te++)C[te]=n[r[te]];var he={positions:a,indices:C};return u&&(he.normals=u),c&&(he.uv=c),he},buildNormals:function(){var o=new _e(3),i=new _e(3),t=new _e(3),e=new _e(3),r=new _e(3),s=new _e(3);return function(n,a,u){var c,C,k=new Array(n.length/3),D,Q,X;for(c=0,C=a.length;c<C;c+=3){D=a[c],Q=a[c+1],X=a[c+2],o[0]=n[D*3],o[1]=n[D*3+1],o[2]=n[D*3+2],i[0]=n[Q*3],i[1]=n[Q*3+1],i[2]=n[Q*3+2],t[0]=n[X*3],t[1]=n[X*3+1],t[2]=n[X*3+2],h.subVec3(i,o,e),h.subVec3(t,o,r);var R=h.vec3();h.normalizeVec3(h.cross3Vec3(e,r,s),R),k[D]||(k[D]=[]),k[Q]||(k[Q]=[]),k[X]||(k[X]=[]),k[D].push(R),k[Q].push(R),k[X].push(R)}u=u&&u.length===n.length?u:new Float32Array(n.length);var q,te,se,ie;for(c=0,C=k.length;c<C;c++){q=k[c].length,te=0,se=0,ie=0;for(var he=0;he<q;he++)te+=k[c][he][0],se+=k[c][he][1],ie+=k[c][he][2];u[c*3]=te/q,u[c*3+1]=se/q,u[c*3+2]=ie/q}return u}}(),buildTangents:function(){var o=new _e(3),i=new _e(3),t=new _e(3),e=new _e(3),r=new _e(3),s=new _e(3),n=new _e(3);return function(a,u,c){for(var C=new Float32Array(a.length),k=0;k<u.length;k+=3){var D=u[k],Q=a.subarray(D*3,D*3+3),X=c.subarray(D*2,D*2+2);D=u[k+1];var R=a.subarray(D*3,D*3+3),q=c.subarray(D*2,D*2+2);D=u[k+2];for(var te=a.subarray(D*3,D*3+3),se=c.subarray(D*2,D*2+2),ie=h.subVec3(R,Q,o),he=h.subVec3(te,Q,i),ge=h.subVec2(q,X,t),pe=h.subVec2(se,X,e),xe=1/(ge[0]*pe[1]-ge[1]*pe[0]),Se=h.mulVec3Scalar(h.subVec3(h.mulVec3Scalar(ie,pe[1],r),h.mulVec3Scalar(he,ge[1],s),n),xe,s),Oe=void 0,Ge=0;Ge<3;Ge++)Oe=u[k+Ge]*3,C[Oe]+=Se[0],C[Oe+1]+=Se[1],C[Oe+2]+=Se[2]}return C}}(),buildPickTriangles:function(i,t,e){for(var r=t.length,s=e?new Uint16Array(r*9):new Float32Array(r*9),n=new Uint8Array(r*12),a=0,u,c=0,C=0,k,D,Q,X,R,q=0;q<r;q+=3)R=a>>24&255,X=a>>16&255,Q=a>>8&255,D=a&255,k=t[q],u=k*3,s[c++]=i[u],s[c++]=i[u+1],s[c++]=i[u+2],n[C++]=D,n[C++]=Q,n[C++]=X,n[C++]=R,k=t[q+1],u=k*3,s[c++]=i[u],s[c++]=i[u+1],s[c++]=i[u+2],n[C++]=D,n[C++]=Q,n[C++]=X,n[C++]=R,k=t[q+2],u=k*3,s[c++]=i[u],s[c++]=i[u+1],s[c++]=i[u+2],n[C++]=D,n[C++]=Q,n[C++]=X,n[C++]=R,a++;return{positions:s,colors:n}},faceToVertexNormals:function(i,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.smoothNormalsAngleThreshold||20,s={},n=[],a={},u,c,C,k,D,Q=4,X=Math.pow(10,Q),R,q,te,se,ie,he;for(q=0,se=i.length;q<se;q+=3){R=q/3,c=i[q],C=i[q+1],k=i[q+2],D="".concat(Math.round(c*X),"_").concat(Math.round(C*X),"_").concat(Math.round(k*X)),s[D]===void 0?s[D]=[R]:s[D].push(R);var ge=h.normalizeVec3([t[q],t[q+1],t[q+2]]);n[R]=ge,u=h.vec4([ge[0],ge[1],ge[2],1]),a[R]=u}for(D in s)if(s.hasOwnProperty(D)){var pe=s[D],xe=pe.length;for(q=0;q<xe;q++){var Se=pe[q];for(u=a[Se],te=0;te<xe;te++)if(q!==te){var Oe=pe[te];ie=n[Se],he=n[Oe];var Ge=Math.abs(h.angleVec3(ie,he)/h.DEGTORAD);Ge<r&&(u[0]+=he[0],u[1]+=he[1],u[2]+=he[2],u[3]+=1)}}}for(q=0,se=t.length;q<se;q+=3)u=a[q/3],t[q+0]=u[0]/u[3],t[q+1]=u[1]/u[3],t[q+2]=u[2]/u[3]},transformRay:function(){var o=new _e(4),i=new _e(4);return function(t,e,r,s,n){o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=1,h.transformVec4(t,o,i),s[0]=i[0],s[1]=i[1],s[2]=i[2],o[0]=r[0],o[1]=r[1],o[2]=r[2],h.transformVec3(t,o,i),h.normalizeVec3(i),n[0]=i[0],n[1]=i[1],n[2]=i[2]}}(),canvasPosToWorldRay:function(){var o=new _e(16),i=new _e(4),t=new _e(4),e=function(s,n,a,u,c){c[0]=s,c[1]=n,c[2]=a,c[3]=1,h.transformVec4(o,c,c),u||h.mulVec4Scalar(c,1/c[3])};return function(r,s,n,a,u,c,C){var k=a==="ortho";h.mulMat4(n,s,o),h.inverseMat4(o,o);var D=2*u[0]/r.width-1,Q=1-2*u[1]/r.height;e(D,Q,-1,k,i),e(D,Q,1,k,t),c[0]=i[0],c[1]=i[1],c[2]=i[2],h.subVec3(t,i,C),h.normalizeVec3(C)}}(),canvasPosToLocalRay:function(){var o=new _e(3),i=new _e(3);return function(t,e,r,s,n,a,u,c){h.canvasPosToWorldRay(t,e,r,s,a,o,i),h.worldRayToLocalRay(n,o,i,u,c)}}(),worldRayToLocalRay:function(){var o=new _e(16),i=new _e(4),t=new _e(4);return function(e,r,s,n,a){var u=h.inverseMat4(e,o);i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=1,h.transformVec4(u,i,t),n[0]=t[0],n[1]=t[1],n[2]=t[2],h.transformVec3(u,s,a)}}(),buildKDTree:function(){var o=10,i=20,t=new Float32Array;function e(r,s,n,a){var u=new _e(6),c={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:u};u[0]=u[1]=u[2]=Number.POSITIVE_INFINITY,u[3]=u[4]=u[5]=Number.NEGATIVE_INFINITY;var C,k;for(C=0,k=r.length;C<k;++C)for(var D=r[C]*3,Q=0;Q<3;++Q){var X=s[D+Q]*3;n[X]<u[0]&&(u[0]=n[X]),n[X]>u[3]&&(u[3]=n[X]),n[X+1]<u[1]&&(u[1]=n[X+1]),n[X+1]>u[4]&&(u[4]=n[X+1]),n[X+2]<u[2]&&(u[2]=n[X+2]),n[X+2]>u[5]&&(u[5]=n[X+2])}if(r.length<i||a>o)return c.triangles=r,c.leaf=!0,c;t[0]=u[3]-u[0],t[1]=u[4]-u[1],t[2]=u[5]-u[2];var R=0;t[1]>t[R]&&(R=1),t[2]>t[R]&&(R=2),c.splitDim=R;var q=(u[R]+u[R+3])/2,te=new Array(r.length),se=0,ie=new Array(r.length),he=0;for(C=0,k=r.length;C<k;++C){var D=r[C]*3,ge=s[D],pe=s[D+1],xe=s[D+2],Se=ge*3,Oe=pe*3,Ge=xe*3;n[Se+R]<=q||n[Oe+R]<=q||n[Ge+R]<=q?te[se++]=r[C]:ie[he++]=r[C]}return te.length=se,ie.length=he,c.left=e(te,s,n,a+1),c.right=e(ie,s,n,a+1),c}return function(r,s){for(var n=r.length/3,a=new Array(n),u=0;u<n;++u)a[u]=u;return e(a,r,s,0)}}(),decompressPosition:function(i,t,e){e=e||i,e[0]=i[0]*t[0]+t[12],e[1]=i[1]*t[5]+t[13],e[2]=i[2]*t[10]+t[14]},decompressPositions:function(i,t){for(var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Float32Array(i.length),r=0,s=i.length;r<s;r+=3)e[r+0]=i[r+0]*t[0]+t[12],e[r+1]=i[r+1]*t[5]+t[13],e[r+2]=i[r+2]*t[10]+t[14];return e},decompressUV:function(i,t,e){e[0]=i[0]*t[0]+t[6],e[1]=i[1]*t[4]+t[7]},decompressUVs:function(i,t){for(var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Float32Array(i.length),r=0,s=i.length;r<s;r+=3)e[r+0]=i[r+0]*t[0]+t[6],e[r+1]=i[r+1]*t[4]+t[7];return e},octDecodeVec2:function(i,t){var e=i[0],r=i[1];e=(2*e+1)/255,r=(2*r+1)/255;var s=1-Math.abs(e)-Math.abs(r);s<0&&(e=(1-Math.abs(r))*(e>=0?1:-1),r=(1-Math.abs(e))*(r>=0?1:-1));var n=Math.sqrt(e*e+r*r+s*s);return t[0]=e/n,t[1]=r/n,t[2]=s/n,t},octDecodeVec2s:function(i,t){for(var e=0,r=0,s=i.length;e<s;e+=2){var n=i[e+0],a=i[e+1];n=(2*n+1)/255,a=(2*a+1)/255;var u=1-Math.abs(n)-Math.abs(a);u<0&&(n=(1-Math.abs(a))*(n>=0?1:-1),a=(1-Math.abs(n))*(a>=0?1:-1));var c=Math.sqrt(n*n+a*a+u*u);t[r+0]=n/c,t[r+1]=a/c,t[r+2]=u/c,r+=3}return t}};h.buildEdgeIndices=function(){var o=[],i=[],t=[],e=[],r=[],s=0,n=new Uint16Array(3),a=new Uint16Array(3),u=new Uint16Array(3),c=h.vec3(),C=h.vec3(),k=h.vec3(),D=h.vec3(),Q=h.vec3(),X=h.vec3(),R=h.vec3();function q(se,ie){var he={},ge,pe,xe,Se,Oe=4,Ge=Math.pow(10,Oe),Ye,He,Ne=0;for(Ye=0,He=se.length;Ye<He;Ye+=3)ge=se[Ye],pe=se[Ye+1],xe=se[Ye+2],Se=Math.round(ge*Ge)+"_"+Math.round(pe*Ge)+"_"+Math.round(xe*Ge),he[Se]===void 0&&(he[Se]=Ne/3,o[Ne++]=ge,o[Ne++]=pe,o[Ne++]=xe),i[Ye/3]=he[Se];for(Ye=0,He=ie.length;Ye<He;Ye++)e[Ye]=i[ie[Ye]],t[e[Ye]]=ie[Ye]}function te(se,ie){s=0;for(var he=0,ge=se;he<ge;he+=3){var pe=e[he]*3,xe=e[he+1]*3,Se=e[he+2]*3;ie?(n[0]=o[pe],n[1]=o[pe+1],n[2]=o[pe+2],a[0]=o[xe],a[1]=o[xe+1],a[2]=o[xe+2],u[0]=o[Se],u[1]=o[Se+1],u[2]=o[Se+2],h.decompressPosition(n,ie,c),h.decompressPosition(a,ie,C),h.decompressPosition(u,ie,k)):(c[0]=o[pe],c[1]=o[pe+1],c[2]=o[pe+2],C[0]=o[xe],C[1]=o[xe+1],C[2]=o[xe+2],k[0]=o[Se],k[1]=o[Se+1],k[2]=o[Se+2]),h.subVec3(k,C,D),h.subVec3(c,C,Q),h.cross3Vec3(D,Q,X),h.normalizeVec3(X,R);var Oe=r[s]||(r[s]={normal:h.vec3()});Oe.normal[0]=R[0],Oe.normal[1]=R[1],Oe.normal[2]=R[2],s++}}return function(se,ie,he,ge){q(se,ie),te(ie.length,he);for(var pe=[],xe=Math.cos(h.DEGTORAD*ge),Se={},Oe,Ge,Ye,He,Ne,Ze=!1,ot,ut,ct,ft,Ct,kt,Tt=0,$t=ie.length;Tt<$t;Tt+=3)for(var or=Tt/3,mr=0;mr<3;mr++)Oe=e[Tt+mr],Ge=e[Tt+(mr+1)%3],Ye=Math.min(Oe,Ge),He=Math.max(Oe,Ge),Ne=Ye+","+He,Se[Ne]===void 0?Se[Ne]={index1:Ye,index2:He,face1:or,face2:void 0}:Se[Ne].face2=or;for(Ne in Se)ot=Se[Ne],!(ot.face2!==void 0&&(ut=r[ot.face1].normal,ct=r[ot.face2].normal,ft=h.dotVec3(ut,ct),ft>xe))&&(Ct=t[ot.index1],kt=t[ot.index2],(!Ze&&Ct>65535||kt>65535)&&(Ze=!0),pe.push(Ct),pe.push(kt));return Ze?new Uint32Array(pe):new Uint16Array(pe)}}(),h.planeClipsPositions3=function(o,i,t){for(var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:3,r=0,s=t.length;r<s;r+=e){Xe[0]=t[r+0]-o[0],Xe[1]=t[r+1]-o[1],Xe[2]=t[r+2]-o[2];var n=Xe[0]*i[0]+Xe[1]*i[1]+Xe[2]*i[2];if(n<0)return!0}return!1};var De=15,je=new Float32Array(3),ae=function(){function o(i){var t=this;if(ee(this,o),!i)throw"Parameter expected: cfg";if(!i.viewer)throw"Parameter expected: cfg.viewer";this.viewer=i.viewer,this._maxTreeDepth=i.maxTreeDepth||De,this._root=null,this._needsRebuild=!0,this._onModelLoaded=this.viewer.scene.on("modelLoaded",function(e){t._needsRebuild=!0}),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",function(e){t._needsRebuild=!0}),this.viewer.scene.aabb.on("aabb",function(){t._needsRebuild=!0})}return Y(o,[{key:"root",get:function(){return this._needsRebuild&&this._rebuild(),this._root}},{key:"_rebuild",value:function(){var t=this.viewer,e=t.scene,r=0;this._root={aabb:e.getAABB()};for(var s in e.objects){var n=e.objects[s];this._insertEntity(this._root,n,r+1)}this._needsRebuild=!1}},{key:"_insertEntity",value:function(t,e,r){var s=e.aabb;if(r>=this._maxTreeDepth){t.entities=t.entities||[],t.entities.push(e);return}if(t.left&&h.containsAABB3(t.left.aabb,s)){this._insertEntity(t.left,e,r+1);return}if(t.right&&h.containsAABB3(t.right.aabb,s)){this._insertEntity(t.right,e,r+1);return}var n=t.aabb;je[0]=n[3]-n[0],je[1]=n[4]-n[1],je[2]=n[5]-n[2];var a=0;if(je[1]>je[a]&&(a=1),je[2]>je[a]&&(a=2),!t.left){var u=n.slice();if(u[a+3]=(n[a]+n[a+3])/2,t.left={aabb:u},h.containsAABB3(u,s)){this._insertEntity(t.left,e,r+1);return}}if(!t.right){var c=n.slice();if(c[a]=(n[a]+n[a+3])/2,t.right={aabb:c},h.containsAABB3(c,s)){this._insertEntity(t.right,e,r+1);return}}t.entities=t.entities||[],t.entities.push(e)}},{key:"destroy",value:function(){var t=this.viewer.scene;t.off(this._onModelLoaded),t.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}])}(),ue=function(){function o(i,t){ee(this,o),this.items=i||[],this._lastUniqueId=(t||0)+1}return Y(o,[{key:"addItem",value:function(){var t;if(arguments.length===2){var e=arguments[0];if(t=arguments[1],this.items[e])throw"ID clash: '"+e+"'";return this.items[e]=t,e}else for(t=arguments[0]||{};;){var r=this._lastUniqueId++;if(!this.items[r])return this.items[r]=t,r}}},{key:"removeItem",value:function(t){var e=this.items[t];return delete this.items[t],e}}])}(),ce=function(){function o(){ee(this,o),this._head=[],this._headLength=0,this._tail=[],this._index=0,this._length=0}return Y(o,[{key:"length",get:function(){return this._length}},{key:"shift",value:function(){if(this._index>=this._headLength){var t=this._head;if(t.length=0,this._head=this._tail,this._tail=t,this._index=0,this._headLength=this._head.length,!this._headLength)return}var e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}},{key:"push",value:function(t){return this._length++,this._tail.push(t),this}},{key:"unshift",value:function(t){return this._head[--this._index]=t,this._length++,this}}])}(),re={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};function fe(o,i){if(o.nodeType===o.TEXT_NODE){var t=o.nodeValue;if(t.match(/^\s+$/)===null)return t}else if(o.nodeType===o.ELEMENT_NODE||o.nodeType===o.DOCUMENT_NODE){var e={type:o.nodeName,children:[]};if(o.nodeType===o.ELEMENT_NODE)for(var r=0;r<o.attributes.length;r++){var s=o.attributes[r],n=i[s.nodeName]||s.nodeName;e[n]=s.nodeValue}for(var a=0;a<o.childNodes.length;a++){var u=o.childNodes[a],r=fe(u,i);r&&e.children.push(r)}return e}}function le(o){return JSON.parse(JSON.stringify(o))}var Ee=[["0",10],["A",26],["a",26],["_",1],["$",1]].map(function(o){for(var i=[],t=o[0].charCodeAt(0),e=t+o[1],r=t;r<e;++r)i.push(r);return String.fromCharCode.apply(null,i)}).join("");function We(o,i){var t=!i||i===4?[0,6,12,18]:[0,6];return t.map(function(e){return Ee.substr(parseInt(o/(1<<e))%64,1)}).reverse().join("")}function ze(o){var i=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30].map(function(t){return parseInt(o.substr(t,2),16)});return We(i[0],2)+[1,4,7,10,13].map(function(t){return We((i[t]<<16)+(i[t+1]<<8)+i[t+2])}).join("")}function Je(o,i){var t=[],e=function(s){s.type===i&&t.push(s),(s.children||[]).forEach(function(n){e(n)})};return e(o),t}function _t(o){return new Promise(function(i,t){setTimeout(i,o)})}function at(o){return new Promise(function(i,t){var e=new XMLHttpRequest;e.open(o.method||"GET",o.url,!0),e.onload=function(r){e.readyState===4&&(e.status===200?i(e.responseXML):t(e.statusText))},e.send(null)})}var yt=function(){for(var o={},i=window.location.search.substring(1),t=i.split("&"),e=0;e<t.length;e++){var r=t[e].split("=");if(typeof o[r[0]]>"u")o[r[0]]=decodeURIComponent(r[1]);else if(typeof o[r[0]]=="string"){var s=[o[r[0]],decodeURIComponent(r[1])];o[r[0]]=s}else o[r[0]].push(decodeURIComponent(r[1]))}return o}();function rt(o,i,t){var e=function(n){};i=i||e,t=t||e;var r=new XMLHttpRequest;r.overrideMimeType("application/json"),r.open("GET",o,!0),r.addEventListener("load",function(s){var n=s.target.response;if(this.status===200){var a;try{a=JSON.parse(n)}catch(u){t("utils.loadJSON(): Failed to parse JSON response - ".concat(u))}i(a)}else if(this.status===0){console.warn("loadFile: HTTP Status 0 received.");try{i(JSON.parse(n))}catch(u){t("utils.loadJSON(): Failed to parse JSON response - ".concat(u))}}else t(s)},!1),r.addEventListener("error",function(s){t(s)},!1),r.send(null)}function xt(o,i,t){var e=function(Q){};i=i||e,t=t||e;var r=/^data:(.*?)(;base64)?,(.*)$/,s=o.match(r);if(s){var n=!!s[2],a=s[3];a=window.decodeURIComponent(a),n&&(a=window.atob(a));try{for(var u=new ArrayBuffer(a.length),c=new Uint8Array(u),C=0;C<a.length;C++)c[C]=a.charCodeAt(C);er.scheduleTask(function(){i(u)})}catch(D){er.scheduleTask(function(){t(D)})}}else{var k=new XMLHttpRequest;k.open("GET",o,!0),k.responseType="arraybuffer",k.onreadystatechange=function(){k.readyState===4&&(k.status===200?i(k.response):t("loadArrayBuffer error : "+k.response))},k.send(null)}}function It(o){return o&&!o.propertyIsEnumerable("length")&&Z(o)==="object"&&typeof o.length=="number"}function Ot(o){return typeof o=="string"||o instanceof String}function $e(o){return!isNaN(parseFloat(o))&&isFinite(o)}function qe(o){return wt.isString(o)||wt.isNumeric(o)}function lt(o,i){if(!o||!i)return!1;var t=wt.isNumeric(o)||wt.isString(o)?"".concat(o):o.id,e=wt.isNumeric(i)||wt.isString(i)?"".concat(i):i.id;return t===e}function gt(o){return typeof o=="function"}function Ft(o){var i={}.constructor;return!!o&&o.constructor===i}function jt(o){return wt.apply(o,{})}function Gt(o,i){for(var t in o)o.hasOwnProperty(t)&&(i[t]=o[t]);return i}function rr(o,i){for(var t in o)o.hasOwnProperty(t)&&o[t]!==void 0&&o[t]!==null&&(i[t]=o[t]);return i}function lr(o,i){for(var t in o)o.hasOwnProperty(t)&&(i[t]===void 0||i[t]===null)&&(i[t]=o[t]);return i}function vr(o){for(var i in o)if(o.hasOwnProperty(i))return!1;return!0}function wr(o){return wt.isNumeric(o)?"".concat(o):"'".concat(o,"'")}function qt(o,i){var t=new o.constructor(o.length+i.length);return t.set(o),t.set(i,o.length),t}function ai(o){var i=[];function t(e){e.id=e.uuid,delete e.oid,i.push(e);var r=e.children;if(r)for(var s=0,n=r.length;s<n;s++){var a=r[s];a.parent=e.id,t(r[s])}e.children=[]}return t(o),i}var wt={xmlToJson:fe,clone:le,compressGuid:ze,findNodeOfType:Je,timeout:_t,httpRequest:at,loadJSON:rt,loadArraybuffer:xt,queryString:yt,isArray:It,isString:Ot,isNumeric:$e,isID:qe,isSameComponent:lt,isFunction:gt,isObject:Ft,copy:jt,apply:Gt,apply2:rr,applyIf:lr,isEmptyObject:vr,inQuotes:wr,concat:qt,flattenParentChildHierarchy:ai},yi={},ri=new ue,jr=new ce,Ri={sceneId:null,time:null,startTime:null,prevTime:null,deltaTime:null},ii=10,Xr=[],Di=30,li=0,Qi,Pt=0;function Xt(){this.version="1.0.0",this.scenes={},this._superTypes={},this._addScene=function(o){if(o.id){if(er.scenes[o.id]){console.error("[ERROR] Scene ".concat(wt.inQuotes(o.id)," already exists"));return}}else o.id=ri.addItem({});er.scenes[o.id]=o;var i=o.ticksPerOcclusionTest,t=o.ticksPerRender;yi[o.id]={ticksPerOcclusionTest:i,ticksPerRender:t,renderCountdown:t},re.components.scenes++,o.once("destroyed",function(){ri.removeItem(o.id),delete er.scenes[o.id],delete yi[o.id],re.components.scenes--})},this.clear=function(){var o;for(var i in er.scenes)er.scenes.hasOwnProperty(i)&&(o=er.scenes[i],i==="default.scene"?o.clear():(o.destroy(),delete er.scenes[o.id]))},this.scheduleTask=function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;jr.push(o),jr.push(i)},this.runTasks=function(){for(var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,i=new Date().getTime(),t,e,r=0;jr.length>0&&(o<0||i<o);)t=jr.shift(),e=jr.shift(),e?t.call(e):t(),i=new Date().getTime(),r++;return r},this.getNumTasks=function(){return jr.length}}var er=new Xt,Hr=function(){var i=Date.now();if(Qi=i-li,li>0&&Qi>0){var t=1e3/Qi;Pt+=t,Xr.push(t),Xr.length>=Di&&(Pt-=Xr.shift()),re.frame.fps=Math.round(Pt/Xr.length)}for(var e in er.scenes)er.scenes[e].compile();Te(i),li=i},hn=function(){function o(i,t){ee(this,o),H(this,"worker",null);var e=new Blob(["setInterval(() => postMessage(0), ".concat(t,");")]),r=URL.createObjectURL(e);this.worker=new Worker(r),this.worker.onmessage=i}return Y(o,[{key:"stop",value:function(){this.worker.terminate()}}])}();new hn(Hr,100);var be=function(){var i=Date.now();if(Qi=i-li,li>0&&Qi>0){var t=1e3/Qi;Pt+=t,Xr.push(t),Xr.length>=Di&&(Pt-=Xr.shift()),re.frame.fps=Math.round(Pt/Xr.length)}Te(i),ke(i),Re(),window.requestPostAnimationFrame!==void 0?window.requestPostAnimationFrame(Hr):requestAnimationFrame(be)};be();function Te(o){var i=er.runTasks(o+ii),t=er.getNumTasks();re.frame.tasksRun=i,re.frame.tasksScheduled=t,re.frame.tasksBudget=ii}function ke(o){Ri.time=o;for(var i in er.scenes)if(er.scenes.hasOwnProperty(i)){var t=er.scenes[i];Ri.sceneId=i,Ri.startTime=t.startTime,Ri.deltaTime=Ri.prevTime!=null?Ri.time-Ri.prevTime:0,t.fire("tick",Ri,!0)}Ri.prevTime=o}function Re(){var o=er.scenes,i=!1,t,e,r,s,n;for(n in o)o.hasOwnProperty(n)&&(t=o[n],e=yi[n],e||(e=yi[n]={}),r=t.ticksPerOcclusionTest,e.ticksPerOcclusionTest!==r&&(e.ticksPerOcclusionTest=r,e.renderCountdown=r),--t.occlusionTestCountdown<=0&&(t.doOcclusionTest(),t.occlusionTestCountdown=r),s=t.ticksPerRender,e.ticksPerRender!==s&&(e.ticksPerRender=s,e.renderCountdown=s),--e.renderCountdown===0&&(t.render(i),e.renderCountdown=s))}var Qe=function(){function o(i,t,e){ee(this,o),this.id=e&&e.id?e.id:i,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}return Y(o,[{key:"scheduleTask",value:function(t){er.scheduleTask(t,null)}},{key:"fire",value:function(t,e,r){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),r!==!0&&(this._events[t]=e||!0);var s=this._eventSubs[t],n;if(s)for(var a in s)s.hasOwnProperty(a)&&(n=s[a],this._eventCallDepth++,this._eventCallDepth<300?n.callback.call(n.scope,e):this.error("fire: potential stack overflow from recursive event '"+t+"' - dropping this event"),this._eventCallDepth--)}},{key:"on",value:function(t,e,r){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new ue),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});var s=this._eventSubs[t];s?this._eventSubsNum[t]++:(s={},this._eventSubs[t]=s,this._eventSubsNum[t]=1);var n=this._subIdMap.addItem();s[n]={callback:e,scope:r||this},this._subIdEvents[n]=t;var a=this._events[t];return a!==void 0&&e.call(r||this,a),n}},{key:"off",value:function(t){if(t!=null&&this._subIdEvents){var e=this._subIdEvents[t];if(e){delete this._subIdEvents[t];var r=this._eventSubs[e];r&&(delete r[t],this._eventSubsNum[e]--),this._subIdMap.removeItem(t)}}}},{key:"once",value:function(t,e,r){var s=this,n=this.on(t,function(a){s.off(n),e.call(r||this,a)},r)}},{key:"hasSubs",value:function(t){return this._eventSubsNum&&this._eventSubsNum[t]>0}},{key:"log",value:function(t){console.log("[xtctwins plugin ".concat(this.id,"]: ").concat(t))}},{key:"warn",value:function(t){console.warn("[xtctwins plugin ".concat(this.id,"]: ").concat(t))}},{key:"error",value:function(t){console.error("[xtctwins plugin ".concat(this.id,"]: ").concat(t))}},{key:"send",value:function(t,e){}},{key:"destroy",value:function(){this.viewer.removePlugin(this)}}])}(),Ve=function(){function o(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ee(this,o),this.scene=null,this.type==="Scene")this.scene=this,this.viewer=t.viewer;else{if(i.type==="Scene")this.scene=i;else if(i instanceof o)this.scene=i.scene;else throw"Invalid param: owner must be a Component";this._owner=i}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,i&&i._own(this)}return Y(o,[{key:"type",get:function(){return"Component"}},{key:"isComponent",get:function(){return!0}},{key:"glRedraw",value:function(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}},{key:"glResort",value:function(){this._renderer&&this._renderer.needStateSort()}},{key:"owner",get:function(){return this._owner}},{key:"isType",value:function(t){return this.type===t}},{key:"fire",value:function(t,e,r){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),r!==!0&&(this._events[t]=e||!0);var s=this._eventSubs[t],n;if(s)for(var a in s)s.hasOwnProperty(a)&&(n=s[a],this._eventCallDepth++,this._eventCallDepth<300?n.callback.call(n.scope,e):this.error("fire: potential stack overflow from recursive event '"+t+"' - dropping this event"),this._eventCallDepth--)}},{key:"on",value:function(t,e,r){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new ue),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});var s=this._eventSubs[t];s?this._eventSubsNum[t]++:(s={},this._eventSubs[t]=s,this._eventSubsNum[t]=1);var n=this._subIdMap.addItem();s[n]={callback:e,scope:r||this},this._subIdEvents[n]=t;var a=this._events[t];return a!==void 0&&e.call(r||this,a),n}},{key:"off",value:function(t){if(t!=null&&this._subIdEvents){var e=this._subIdEvents[t];if(e){delete this._subIdEvents[t];var r=this._eventSubs[e];r&&(delete r[t],this._eventSubsNum[e]--),this._subIdMap.removeItem(t)}}}},{key:"once",value:function(t,e,r){var s=this,n=this.on(t,function(a){s.off(n),e.call(r||this,a)},r)}},{key:"hasSubs",value:function(t){return this._eventSubsNum&&this._eventSubsNum[t]>0}},{key:"log",value:function(t){t="[LOG]"+this._message(t),window.console.log(t),this.scene.fire("log",t)}},{key:"_message",value:function(t){return" ["+this.type+" "+wt.inQuotes(this.id)+"]: "+t}},{key:"warn",value:function(t){t="[WARN]"+this._message(t),window.console.warn(t),this.scene.fire("warn",t)}},{key:"error",value:function(t){t="[ERROR]"+this._message(t),window.console.error(t),this.scene.fire("error",t)}},{key:"_attach",value:function(t){var e=t.name;if(!e){this.error("Component 'name' expected");return}var r=t.component,s=t.sceneDefault,n=t.sceneSingleton,a=t.type,u=t.on,c=t.recompiles!==!1,C=!1;if(r&&(wt.isNumeric(r)||wt.isString(r))){var k=r;if(r=this.scene.components[k],!r){this.error("Component not found: "+wt.inQuotes(k));return}}if(!r){if(n===!0){var D=this.scene.types[a];for(var Q in D)if(D.hasOwnProperty){r=D[Q];break}if(!r)return this.error("Scene has no default component for '"+e+"'"),null}else if(s===!0&&(r=this.scene[e],!r))return this.error("Scene has no default component for '"+e+"'"),null}if(r){if(r.scene.id!==this.scene.id){this.error("Not in same scene: "+r.type+" "+wt.inQuotes(r.id));return}if(a&&!r.isType(a)){this.error("Expected a "+a+" type or subtype: "+r.type+" "+wt.inQuotes(r.id));return}}this._attachments||(this._attachments={});var X=this._attached[e],R,q,te;if(X){if(r&&X.id===r.id)return;var se=this._attachments[X.id];for(R=se.subs,q=0,te=R.length;q<te;q++)X.off(R[q]);delete this._attached[e],delete this._attachments[X.id];var ie=se.params.onDetached;ie&&(wt.isFunction(ie)?ie(X):ie.scope?ie.callback.call(ie.scope,X):ie.callback(X)),se.managingLifecycle&&X.destroy()}if(r){var he={params:t,component:r,subs:[],managingLifecycle:C};he.subs.push(r.once("destroyed",function(){he.params.component=null,this._attach(he.params)},this)),c&&he.subs.push(r.on("dirty",function(){this.fire("dirty",this)},this)),this._attached[e]=r,this._attachments[r.id]=he;var ge=t.onAttached;if(ge&&(wt.isFunction(ge)?ge(r):ge.scope?ge.callback.call(ge.scope,r):ge.callback(r)),u){var pe,xe,Se,Oe;for(pe in u)if(u.hasOwnProperty(pe)){if(xe=u[pe],wt.isFunction(xe)?(Se=xe,Oe=null):(Se=xe.callback,Oe=xe.scope),!Se)continue;he.subs.push(r.on(pe,Se,Oe))}}}return c&&this.fire("dirty",this),this.fire(e,r),r}},{key:"_checkComponent",value:function(t,e){if(!e.isComponent)if(wt.isID(e)){var r=e;if(e=this.scene.components[r],!e){this.error("Component not found: "+r);return}}else{this.error("Expected a Component or ID");return}if(t!==e.type){this.error("Expected a "+t+" Component");return}if(e.scene.id!==this.scene.id){this.error("Not in same scene: "+e.type);return}return e}},{key:"_checkComponent2",value:function(t,e){if(!e.isComponent)if(wt.isID(e)){var r=e;if(e=this.scene.components[r],!e){this.error("Component not found: "+r);return}}else{this.error("Expected a Component or ID");return}if(e.scene.id!==this.scene.id){this.error("Not in same scene: "+e.type);return}for(var s=0,n=t.length;s<n;s++)if(t[s]===e.type)return e;return this.error("Expected component types: "+t),null}},{key:"_own",value:function(t){var e=this;this._ownedComponents||(this._ownedComponents={}),this._ownedComponents[t.id]||(this._ownedComponents[t.id]=t),t.once("destroyed",function(){delete e._ownedComponents[t.id]},this)}},{key:"_needUpdate",value:function(t){this._updateScheduled||(this._updateScheduled=!0,t===0?this._doUpdate():er.scheduleTask(this._doUpdate,this))}},{key:"_doUpdate",value:function(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}},{key:"scheduleTask",value:function(t){er.scheduleTask(t,null)}},{key:"_update",value:function(){}},{key:"clear",value:function(){if(this._ownedComponents){for(var t in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(t)){var e=this._ownedComponents[t];e.destroy(),delete this._ownedComponents[t]}}}},{key:"destroy",value:function(t){if(!this.destroyed){this.fire("destroyed",this.destroyed=!0);var e,r,s,n,a,u;if(this._attachments){for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(r=this._attachments[e],s=r.component,n=r.subs,a=0,u=n.length;a<u;a++)s.off(n[a]);r.managingLifecycle&&s.destroy()}}if(this._ownedComponents)for(e in this._ownedComponents)this._ownedComponents.hasOwnProperty(e)&&(s=this._ownedComponents[e],s.destroy(),delete this._ownedComponents[e]);this.scene._removeComponent(this),this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this._updateScheduled=!1}}}])}(),nt=h.vec3(),it=function(){var o=new Float64Array(16),i=new Float64Array(4),t=new Float64Array(4);return function(e,r,s){return s=s||o,i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=1,h.transformVec4(e,i,t),h.setMat4Translation(e,t,s),s.slice()}}();function mt(o,i,t){var e=Float32Array.from([o[0]])[0],r=o[0]-e,s=Float32Array.from([o[1]])[0],n=o[1]-s,a=Float32Array.from([o[2]])[0],u=o[2]-a;i[0]=e,i[1]=s,i[2]=a,t[0]=r,t[1]=n,t[2]=u}function dt(o,i,t){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e3,r=h.getPositionsCenter(o,nt),s=Math.round(r[0]/e)*e,n=Math.round(r[1]/e)*e,a=Math.round(r[2]/e)*e;t[0]=s,t[1]=n,t[2]=a;var u=t[0]!==0||t[1]!==0||t[2]!==0;if(u)for(var c=0,C=o.length;c<C;c+=3)i[c+0]=o[c+0]-s,i[c+1]=o[c+1]-n,i[c+2]=o[c+2]-a;return u}function Et(o,i,t){return t[0]=o[0]+i[0],t[1]=o[1]+i[1],t[2]=o[2]+i[2],t}function St(o,i,t,e){var r=h.dotVec3(i,t)+o,s=h.normalizeVec3(i,nt);return h.mulVec3Scalar(s,-r,e),e}var Ke={VISIBLE:1,CULLED:4,PICKABLE:8,CLIPPABLE:16,COLLIDABLE:32,CAST_SHADOW:64,RECEIVE_SHADOW:128,XRAYED:256,HIGHLIGHTED:512,SELECTED:1024,EDGES:2048,BACKFACES:4096,TRANSPARENT:8192},fr=new Float32Array([0,0,0]),zr=new Uint16Array([0,0,0]);h.OBB3();var Sr=function(){function o(i,t,e,r,s,n){ee(this,o),this._isObject=t,this.scene=i.scene,this.model=i,this.meshes=r,this._numPrimitives=0;for(var a=0,u=this.meshes.length;a<u;a++){var c=this.meshes[a];c.parent=this,c.entity=this,this._numPrimitives+=c.numPrimitives}this.id=e,this.originalSystemId=h.unglobalizeObjectId(i.id,e),this._flags=s,this._aabb=h.AABB3(),this._aabbDirty=!0,this._offset=h.vec3(),this._colorizeUpdated=!1,this._opacityUpdated=!1,this._origin_opacity=-1,this._lodCullable=!!n,this._culled=!1,this._culledVFC=!1,this._culledLOD=!1,this._isObject&&i.scene._registerObject(this)}return Y(o,[{key:"_transformDirty",value:function(){this._aabbDirty=!0,this.model._transformDirty()}},{key:"_sceneModelDirty",value:function(){this._aabbDirty=!0;for(var t=0,e=this.meshes.length;t<e;t++)this.meshes[t]._sceneModelDirty()}},{key:"aabb",get:function(){if(this._aabbDirty){h.collapseAABB3(this._aabb);for(var t=0,e=this.meshes.length;t<e;t++)h.expandAABB3(this._aabb,this.meshes[t].aabb);this._aabbDirty=!1}return this._aabb}},{key:"isEntity",get:function(){return!0}},{key:"isModel",get:function(){return!1}},{key:"isObject",get:function(){return this._isObject}},{key:"numPrimitives",get:function(){return this._numPrimitives}},{key:"numTriangles",get:function(){return this._numPrimitives}},{key:"visible",get:function(){return this._getFlag(Ke.VISIBLE)},set:function(t){if(!!(this._flags&Ke.VISIBLE)!==t){t?this._flags=this._flags|Ke.VISIBLE:this._flags=this._flags&~Ke.VISIBLE;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setVisible(this._flags);this._isObject&&this.model.scene._objectVisibilityUpdated(this),this.model.glRedraw()}}},{key:"highlighted",get:function(){return this._getFlag(Ke.HIGHLIGHTED)},set:function(t){if(!!(this._flags&Ke.HIGHLIGHTED)!==t){t?this._flags=this._flags|Ke.HIGHLIGHTED:this._flags=this._flags&~Ke.HIGHLIGHTED;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setHighlighted(this._flags);this._isObject&&this.model.scene._objectHighlightedUpdated(this),this.model.glRedraw()}}},{key:"xrayed",get:function(){return this._getFlag(Ke.XRAYED)},set:function(t){if(!!(this._flags&Ke.XRAYED)!==t){t?this._flags=this._flags|Ke.XRAYED:this._flags=this._flags&~Ke.XRAYED;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setXRayed(this._flags);this._isObject&&this.model.scene._objectXRayedUpdated(this),this.model.glRedraw()}}},{key:"selected",get:function(){return this._getFlag(Ke.SELECTED)},set:function(t){if(!!(this._flags&Ke.SELECTED)!==t){t?this._flags=this._flags|Ke.SELECTED:this._flags=this._flags&~Ke.SELECTED;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setSelected(this._flags);this._isObject&&this.model.scene._objectSelectedUpdated(this),this.model.glRedraw()}}},{key:"edges",get:function(){return this._getFlag(Ke.EDGES)},set:function(t){if(!!(this._flags&Ke.EDGES)!==t){t?this._flags=this._flags|Ke.EDGES:this._flags=this._flags&~Ke.EDGES;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setEdges(this._flags);this.model.glRedraw()}}},{key:"culledVFC",get:function(){return!!this._culledVFC},set:function(t){this._culledVFC=t,this._setCulled()}},{key:"culledLOD",get:function(){return!!this._culledLOD},set:function(t){this._culledLOD=t,this._setCulled()}},{key:"culled",get:function(){return!!this._culled},set:function(t){this._culled=t,this._setCulled()}},{key:"_setCulled",value:function(){var t=!!this._culled||!!(this._culledLOD&&this._lodCullable)||!!this._culledVFC;if(!!(this._flags&Ke.CULLED)!==t){t?this._flags=this._flags|Ke.CULLED:this._flags=this._flags&~Ke.CULLED;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setCulled(this._flags);this.model.glRedraw()}}},{key:"clippable",get:function(){return this._getFlag(Ke.CLIPPABLE)},set:function(t){if(!!(this._flags&Ke.CLIPPABLE)!==t){t?this._flags=this._flags|Ke.CLIPPABLE:this._flags=this._flags&~Ke.CLIPPABLE;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setClippable(this._flags);this.model.glRedraw()}}},{key:"collidable",get:function(){return this._getFlag(Ke.COLLIDABLE)},set:function(t){if(!!(this._flags&Ke.COLLIDABLE)!==t){t?this._flags=this._flags|Ke.COLLIDABLE:this._flags=this._flags&~Ke.COLLIDABLE;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setCollidable(this._flags)}}},{key:"pickable",get:function(){return this._getFlag(Ke.PICKABLE)},set:function(t){if(!!(this._flags&Ke.PICKABLE)!==t){t?this._flags=this._flags|Ke.PICKABLE:this._flags=this._flags&~Ke.PICKABLE;for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setPickable(this._flags)}}},{key:"colorize",get:function(){if(this.meshes.length===0)return null;var t=this.meshes[0]._colorize;return fr[0]=t[0]/255,fr[1]=t[1]/255,fr[2]=t[2]/255,fr},set:function(t){if(t){zr[0]=Math.floor(t[0]*255),zr[1]=Math.floor(t[1]*255),zr[2]=Math.floor(t[2]*255);for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setColorize(zr)}else for(var s=0,n=this.meshes.length;s<n;s++)this.meshes[s]._setColorize(null);if(this._isObject){var a=!!t;this.scene._objectColorizeUpdated(this,a),this._colorizeUpdated=a}this.model.glRedraw()}},{key:"opacity",get:function(){return this.meshes.length>0?this.meshes[0]._colorize[3]/255:1},set:function(t){if(this.meshes.length!==0){var e=t!=null,r=this.meshes[0]._colorize[3],s=255;if(e){if(t<0?t=0:t>1&&(t=1),s=Math.floor(t*255),r===s)return}else if(s=255,r===s)return;for(var n=0,a=this.meshes.length;n<a;n++)this.meshes[n]._setOpacity(s,this._flags);this._isObject&&(this.scene._objectOpacityUpdated(this,e),this._opacityUpdated=e),this.model.glRedraw()}}},{key:"origin_opacity",get:function(){return this._origin_opacity==-1&&(this._origin_opacity=this.opacity),this._origin_opacity},set:function(t){this._origin_opacity=t}},{key:"offset",get:function(){return this._offset},set:function(t){t?(this._offset[0]=t[0],this._offset[1]=t[1],this._offset[2]=t[2]):(this._offset[0]=0,this._offset[1]=0,this._offset[2]=0);for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._setOffset(this._offset);this._aabbDirty=!0,this.model._aabbDirty=!0,this.scene._aabbDirty=!0,this.scene._objectOffsetUpdated(this,t),this.model.glRedraw()}},{key:"saoEnabled",get:function(){return this.model.saoEnabled}},{key:"getEachVertex",value:function(t){for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e].getEachVertex(t)}},{key:"_getFlag",value:function(t){return!!(this._flags&t)}},{key:"_finalize",value:function(){var t=this.model.scene;this._isObject&&(this.visible&&t._objectVisibilityUpdated(this),this.highlighted&&t._objectHighlightedUpdated(this),this.xrayed&&t._objectXRayedUpdated(this),this.selected&&t._objectSelectedUpdated(this));for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._finalize(this._flags)}},{key:"_finalize2",value:function(){for(var t=0,e=this.meshes.length;t<e;t++)this.meshes[t]._finalize2()}},{key:"_destroy",value:function(){var t=this.model.scene;this._isObject&&(t._deregisterObject(this),this.visible&&t._deRegisterVisibleObject(this),this.xrayed&&t._deRegisterXRayedObject(this),this.selected&&t._deRegisterSelectedObject(this),this.highlighted&&t._deRegisterHighlightedObject(this),this._colorizeUpdated&&this.scene._deRegisterColorizedObject(this),this._opacityUpdated&&this.scene._deRegisterOpacityObject(this),this._offset&&(this._offset[0]!==0||this._offset[1]!==0||this._offset[2]!==0)&&this.scene._deRegisterOffsetObject(this));for(var e=0,r=this.meshes.length;e<r;e++)this.meshes[e]._destroy();t._aabbDirty=!0}}])}(),dn=h.vec4(),_i=h.vec4(),tn=function(o){function i(t,e){var r;return ee(this,i),r=O(this,i,[t,e]),r.id=e.id,r._entity=null,r._visible=null,r._worldPos=h.vec3(),r._origin=h.vec3(),r._rtcPos=h.vec3(),r._viewPos=h.vec3(),r._canvasPos=h.vec2(),r._occludable=!1,r._onCameraViewMatrix=r.scene.camera.on("matrix",function(){r._viewPosDirty=!0,r._needUpdate()}),r._onCameraProjMatrix=r.scene.camera.on("projMatrix",function(){r._canvasPosDirty=!0,r._needUpdate()}),r._onEntityDestroyed=null,r._onEntityModelDestroyed=null,r._renderer.addMarker(r),r.entity=e.entity,r.worldPos=e.worldPos,r.occludable=e.occludable,r}return L(i,o),Y(i,[{key:"_update",value:function(){if(this._viewPosDirty&&(h.transformPoint3(this.scene.camera.viewMatrix,this._worldPos,this._viewPos),this._viewPosDirty=!1,this._canvasPosDirty=!0,this.fire("viewPos",this._viewPos)),this._canvasPosDirty){dn.set(this._viewPos),dn[3]=1,h.transformPoint4(this.scene.camera.projMatrix,dn,_i);var e=this.scene.canvas.boundary;this._canvasPos[0]=Math.floor((1+_i[0]/_i[3])*e[2]/2),this._canvasPos[1]=Math.floor((1-_i[1]/_i[3])*e[3]/2),this._canvasPosDirty=!1,this.fire("canvasPos",this._canvasPos)}}},{key:"_setVisible",value:function(e){this._visible,this._visible=e,this.fire("visible",this._visible)}},{key:"entity",get:function(){return this._entity},set:function(e){var r=this;if(this._entity){if(this._entity===e)return;this._onEntityDestroyed!==null&&(this._entity.model?this._entity.model.off(this._onEntityDestroyed):this._entity.off(this._onEntityDestroyed),this._onEntityDestroyed=null),this._onEntityModelDestroyed!==null&&(this._entity.model&&this._entity.model.off(this._onEntityModelDestroyed),this._onEntityModelDestroyed=null)}this._entity=e,this._entity&&(this._entity instanceof Sr?this._onEntityModelDestroyed=this._entity.model.on("destroyed",function(){r._entity=null,r._onEntityModelDestroyed=null}):this._onEntityDestroyed=this._entity.on("destroyed",function(){r._entity=null,r._onEntityDestroyed=null})),this.fire("entity",this._entity,!0)}},{key:"occludable",get:function(){return this._occludable},set:function(e){e=!!e,e!==this._occludable&&(this._occludable=e,this._occludable&&this._renderer.markerWorldPosUpdated(this))}},{key:"worldPos",get:function(){return this._worldPos},set:function(e){this._worldPos.set(e||[0,0,0]),mt(this._worldPos,this._origin,this._rtcPos),this._occludable&&this._renderer.markerWorldPosUpdated(this),this._viewPosDirty=!0,this.fire("worldPos",this._worldPos),this._needUpdate()}},{key:"origin",get:function(){return this._origin}},{key:"rtcPos",get:function(){return this._rtcPos}},{key:"viewPos",get:function(){return this._update(),this._viewPos}},{key:"canvasPos",get:function(){return this._update(),this._canvasPos}},{key:"visible",get:function(){return!!this._visible}},{key:"destroy",value:function(){this.fire("destroyed",!0),this.scene.camera.off(this._onCameraViewMatrix),this.scene.camera.off(this._onCameraProjMatrix),this._entity&&(this._onEntityDestroyed!==null&&this._entity.model.off(this._onEntityDestroyed),this._onEntityModelDestroyed!==null&&this._entity.model.off(this._onEntityModelDestroyed)),this._renderer.removeMarker(this),j(i,"destroy",this)([])}}])}(Ve),Zr=function(){function o(i){var t=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ee(this,o),this._color=e.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=e.thickness||1,this._thicknessClickable=e.thicknessClickable||6,this._visible=!0,this._culled=!1;var r=this._wire,s=r.style;s.border="solid "+this._thickness+"px "+this._color,s.position="absolute",s["z-index"]=e.zIndex===void 0?"2000001":e.zIndex,s.width="0px",s.height="0px",s.display="block",s.top="0px",s.left="0px",s["-webkit-transform-origin"]="0 0",s["-moz-transform-origin"]="0 0",s["-ms-transform-origin"]="0 0",s["-o-transform-origin"]="0 0",s["transform-origin"]="0 0",s["-webkit-transform"]="rotate(0deg)",s["-moz-transform"]="rotate(0deg)",s["-ms-transform"]="rotate(0deg)",s["-o-transform"]="rotate(0deg)",s.transform="rotate(0deg)",s.opacity=1,s["pointer-events"]="none",e.onContextMenu,i.appendChild(r);var n=this._wireClickable,a=n.style;a.border="solid "+this._thicknessClickable+"px "+this._color,a.position="absolute",a["z-index"]=e.zIndex===void 0?"2000002":e.zIndex+1,a.width="0px",a.height="0px",a.display="block",a.top="0px",a.left="0px",a["-webkit-transform-origin"]="0 0",a["-moz-transform-origin"]="0 0",a["-ms-transform-origin"]="0 0",a["-o-transform-origin"]="0 0",a["transform-origin"]="0 0",a["-webkit-transform"]="rotate(0deg)",a["-moz-transform"]="rotate(0deg)",a["-ms-transform"]="rotate(0deg)",a["-o-transform"]="rotate(0deg)",a.transform="rotate(0deg)",a.opacity=0,a["pointer-events"]="none",e.onContextMenu,i.appendChild(n),e.onMouseOver&&n.addEventListener("mouseover",function(u){e.onMouseOver(u,t)}),e.onMouseLeave&&n.addEventListener("mouseleave",function(u){e.onMouseLeave(u,t)}),e.onMouseWheel&&n.addEventListener("wheel",function(u){e.onMouseWheel(u,t)}),e.onMouseDown&&n.addEventListener("mousedown",function(u){e.onMouseDown(u,t)}),e.onMouseClick&&n.addEventListener("click",function(u){e.onMouseClick(u,t)}),e.onTouchStart&&n.addEventListener("touchstart",function(u){e.onTouchStart(u,t)}),e.onMouseUp&&n.addEventListener("mouseup",function(u){e.onMouseUp(u,t)}),e.onMouseMove&&n.addEventListener("mousemove",function(u){e.onMouseMove(u,t)}),e.onContextMenu&&n.addEventListener("contextmenu",function(u){e.onContextMenu(u,t),u.preventDefault()}),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}return Y(o,[{key:"visible",get:function(){return this._wire.style.display==="block"}},{key:"_update",value:function(){var t=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),e=Math.atan2(this._y2-this._y1,this._x2-this._x1)*180/Math.PI,r=this._wire.style;r.width=Math.round(t)+"px",r.left=Math.round(this._x1)+"px",r.top=Math.round(this._y1)+"px",r["-webkit-transform"]="rotate("+e+"deg)",r["-moz-transform"]="rotate("+e+"deg)",r["-ms-transform"]="rotate("+e+"deg)",r["-o-transform"]="rotate("+e+"deg)",r.transform="rotate("+e+"deg)";var s=this._wireClickable.style;s.width=Math.round(t)+"px",s.left=Math.round(this._x1)+"px",s.top=Math.round(this._y1)+"px",s["-webkit-transform"]="rotate("+e+"deg)",s["-moz-transform"]="rotate("+e+"deg)",s["-ms-transform"]="rotate("+e+"deg)",s["-o-transform"]="rotate("+e+"deg)",s.transform="rotate("+e+"deg)"}},{key:"setStartAndEnd",value:function(t,e,r,s){this._x1=t,this._y1=e,this._x2=r,this._y2=s,this._update()}},{key:"setColor",value:function(t){this._color=t||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}},{key:"setOpacity",value:function(t){this._wire.style.opacity=t}},{key:"setVisible",value:function(t){this._visible!==t&&(this._visible=!!t,this._wire.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setCulled",value:function(t){this._culled!==t&&(this._culled=!!t,this._wire.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setClickable",value:function(t){this._wireClickable.style["pointer-events"]=t?"all":"none"}},{key:"setHighlighted",value:function(t){this._highlighted!==t&&(this._highlighted=!!t,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}},{key:"destroy",value:function(t){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}])}(),zi=function(){function o(i){var t=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ee(this,o),this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var r=this._dot,s=r.style;s["border-radius"]="25px",s.border="solid 2px white",s.background="lightgreen",s.position="absolute",s["z-index"]=e.zIndex===void 0?"40000005":e.zIndex,s.width="10px",s.height="10px",s.display=e.visible!==!1?"block":"none",s.top="0px",s.left="0px",s["box-shadow"]="0 2px 5px 0 #182A3D;",s.opacity=1,s["pointer-events"]="none",e.onContextMenu,i.appendChild(r);var n=this._dotClickable,a=n.style;a["border-radius"]="35px",a.border="solid 10px white",a.position="absolute",a["z-index"]=e.zIndex===void 0?"40000007":e.zIndex+1,a.width="10px",a.height="10px",a.display="block",a.top="0px",a.left="0px",a.opacity=0,a["pointer-events"]="none",e.onContextMenu,i.appendChild(n),n.addEventListener("click",function(u){i.dispatchEvent(new MouseEvent("mouseover",u))}),e.onMouseOver&&n.addEventListener("mouseover",function(u){e.onMouseOver(u,t),i.dispatchEvent(new MouseEvent("mouseover",u))}),e.onMouseLeave&&n.addEventListener("mouseleave",function(u){e.onMouseLeave(u,t)}),e.onMouseWheel&&n.addEventListener("wheel",function(u){e.onMouseWheel(u,t)}),e.onMouseDown&&n.addEventListener("mousedown",function(u){e.onMouseDown(u,t)}),e.onMouseClick&&n.addEventListener("click",function(u){e.onMouseClick(u,t)}),e.onTouchStart&&n.addEventListener("touchstart",function(u){e.onTouchStart(u,t)}),e.onMouseUp&&n.addEventListener("mouseup",function(u){e.onMouseUp(u,t)}),e.onMouseMove&&n.addEventListener("mousemove",function(u){e.onMouseMove(u,t)}),e.onContextMenu&&n.addEventListener("contextmenu",function(u){e.onContextMenu(u,t),u.preventDefault()}),this.setPos(e.x||0,e.y||0),this.setFillColor(e.fillColor),this.setBorderColor(e.borderColor)}return Y(o,[{key:"setPos",value:function(t,e){this._x=t,this._y=e;var r=this._dot.style;r.left=Math.round(t)-4+"px",r.top=Math.round(e)-4+"px";var s=this._dotClickable.style;s.left=Math.round(t)-9+"px",s.top=Math.round(e)-9+"px"}},{key:"setFillColor",value:function(t){this._dot.style.background=t||"lightgreen"}},{key:"setBorderColor",value:function(t){this._dot.style.border="solid 2px"+(t||"black")}},{key:"setOpacity",value:function(t){this._dot.style.opacity=t}},{key:"setVisible",value:function(t){this._visible!==t&&(this._visible=!!t,this._dot.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setCulled",value:function(t){this._culled!==t&&(this._culled=!!t,this._dot.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setClickable",value:function(t){this._dotClickable.style["pointer-events"]=t?"all":"none"}},{key:"setHighlighted",value:function(t){this._highlighted!==t&&(this._highlighted=!!t,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}},{key:"destroy",value:function(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}])}(),oo=function(){function o(i){var t=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ee(this,o),this._highlightClass="viewer-ruler-label-highlighted",this._prefix=e.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var r=this._label,s=r.style;s["border-radius"]="5px",s.color="white",s.padding="4px",s.border="solid 1px",s.borderRadius="20px",s.background="lightgreen",s.position="absolute",s["z-index"]=e.zIndex===void 0?"5000005":e.zIndex,s.width="auto",s.height="auto",s.fontSize="14px",s.display="block",s.top="0px",s.left="0px",s["pointer-events"]="all",s.opacity=1,e.onContextMenu,r.innerText="",i.appendChild(r),this.setPos(e.x||0,e.y||0),this.setFillColor(e.fillColor),this.setBorderColor(e.fillColor),this.setText(e.text),e.onMouseOver&&r.addEventListener("mouseover",function(n){e.onMouseOver(n,t),n.preventDefault()}),e.onMouseLeave&&r.addEventListener("mouseleave",function(n){e.onMouseLeave(n,t),n.preventDefault()}),e.onMouseWheel&&r.addEventListener("wheel",function(n){e.onMouseWheel(n,t)}),e.onMouseDown&&r.addEventListener("mousedown",function(n){e.onMouseDown(n,t)}),e.onMouseClick&&r.addEventListener("click",function(n){e.onMouseClick(n,t)}),e.onTouchStart&&r.addEventListener("touchstart",function(n){e.onTouchStart(n,t)}),e.onMouseUp&&r.addEventListener("mouseup",function(n){e.onMouseUp(n,t)}),e.onMouseMove&&r.addEventListener("mousemove",function(n){e.onMouseMove(n,t)}),e.onContextMenu&&r.addEventListener("contextmenu",function(n){e.onContextMenu(n,t),n.preventDefault()})}return Y(o,[{key:"setPos",value:function(t,e){this._x=t,this._y=e;var r=this._label.style;r.left=Math.round(t)-20+"px",r.top=Math.round(e)-12+"px"}},{key:"setPosOnWire",value:function(t,e,r,s){var n=t+(r-t)*.5,a=e+(s-e)*.5,u=this._label.style;u.left=Math.round(n)-20+"px",u.top=Math.round(a)-12+"px"}},{key:"setPosBetweenWires",value:function(t,e,r,s,n,a){var u=(t+r+n)/3,c=(e+s+a)/3,C=this._label.style;C.left=Math.round(u)-20+"px",C.top=Math.round(c)-12+"px"}},{key:"setText",value:function(t){this._label.innerHTML=this._prefix+(t||"")}},{key:"setFillColor",value:function(t){this._fillColor=t||"lightgreen",this._label.style.background=this._fillColor}},{key:"setBorderColor",value:function(t){this._borderColor=t||"white",this._label.style.border="solid 1px "+this._borderColor}},{key:"setOpacity",value:function(t){this._label.style.opacity=t}},{key:"setVisible",value:function(t){this._visible!==t&&(this._visible=!!t,this._label.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setCulled",value:function(t){this._culled!==t&&(this._culled=!!t,this._label.style.display=this._visible&&!this._culled?"block":"none")}},{key:"setHighlighted",value:function(t){this._highlighted!==t&&(this._highlighted=!!t,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}},{key:"setClickable",value:function(t){this._label.style["pointer-events"]=t?"all":"none"}},{key:"destroy",value:function(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}])}(),kn=h.vec3(),ao=h.vec3(),Fl=function(o){function i(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ee(this,i),e=O(this,i,[t.viewer.scene,r]),e.plugin=t,e._container=r.container,!e._container)throw"config missing: container";e._color=r.color?r.color:t.defaultColor,e._borderColor=t.defaultColor?t.defaultColor:"white";var s=e.plugin.viewer.scene;e._originMarker=new tn(s,r.origin),e._cornerMarker=new tn(s,r.corner),e._targetMarker=new tn(s,r.target),e._originWorld=h.vec3(),e._cornerWorld=h.vec3(),e._targetWorld=h.vec3(),e._wp=new Float64Array(12),e._vp=new Float64Array(12),e._pp=new Float64Array(12),e._cp=new Int16Array(6);var n=r.onMouseOver?function(R){r.onMouseOver(R,e),e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",R))}:null,a=r.onMouseLeave?function(R){r.onMouseLeave(R,e),e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",R))}:null,u=r.onMouseClick?function(R){r.onMouseClick(R,e),e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("click",R))}:null,c=r.onTouchStart?function(R){r.onTouchStart(R,e),R.preventDefault(),e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("touchstart",R))}:null,C=r.onContextMenu?function(R){r.onContextMenu(R,e)}:null,k=function(q){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",q))},D=function(q){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",q))},Q=function(q){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",q))},X=function(q){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",q))};return e._originDot=new zi(e._container,{fillColor:e._color,borderColor:e._borderColor,zIndex:t.zIndex!==void 0?t.zIndex+2:void 0,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._cornerDot=new zi(e._container,{fillColor:e._color,borderColor:e._borderColor,zIndex:t.zIndex!==void 0?t.zIndex+2:void 0,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._targetDot=new zi(e._container,{fillColor:e._color,borderColor:e._borderColor,zIndex:t.zIndex!==void 0?t.zIndex+2:void 0,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._originWire=new Zr(e._container,{color:e._color||"#0065FC",thickness:1,zIndex:t.zIndex,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._targetWire=new Zr(e._container,{color:e._color||"red",thickness:1,zIndex:t.zIndex!==void 0?t.zIndex+1:void 0,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._angleLabel=new oo(e._container,{fillColor:e._color||"#0065FC",borderColor:e._borderColor,prefix:"",text:"",zIndex:t.zIndex+2,onMouseOver:n,onMouseLeave:a,onMouseWheel:k,onMouseDown:D,onMouseClick:u,onTouchStart:c,onMouseUp:Q,onMouseMove:X,onContextMenu:C}),e._wpDirty=!1,e._vpDirty=!1,e._cpDirty=!1,e._visible=!1,e._originVisible=!1,e._cornerVisible=!1,e._targetVisible=!1,e._originWireVisible=!1,e._targetWireVisible=!1,e._angleVisible=!1,e._labelsVisible=!1,e._clickable=!1,e._originMarker.on("worldPos",function(R){e._originWorld.set(R||[0,0,0]),e._wpDirty=!0,e._needUpdate(0)}),e._cornerMarker.on("worldPos",function(R){e._cornerWorld.set(R||[0,0,0]),e._wpDirty=!0,e._needUpdate(0)}),e._targetMarker.on("worldPos",function(R){e._targetWorld.set(R||[0,0,0]),e._wpDirty=!0,e._needUpdate(0)}),e._onViewMatrix=s.camera.on("viewMatrix",function(){e._vpDirty=!0,e._needUpdate(0)}),e._onProjMatrix=s.camera.on("projMatrix",function(){e._cpDirty=!0,e._needUpdate()}),e._onCanvasBoundary=s.canvas.on("boundary",function(){e._cpDirty=!0,e._needUpdate(0)}),e._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",function(){e._sectionPlanesDirty=!0,e._needUpdate()}),e.precision=r.precision!==void 0?r.precision:2,e.approximate=r.approximate,e.visible=r.visible,e.originVisible=r.originVisible,e.cornerVisible=r.cornerVisible,e.targetVisible=r.targetVisible,e.originWireVisible=r.originWireVisible,e.targetWireVisible=r.targetWireVisible,e.angleVisible=r.angleVisible,e.labelsVisible=r.labelsVisible,e}return L(i,o),Y(i,[{key:"_update",value:function(){if(this._visible){var e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(h.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp)){this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),this._targetDot.setCulled(!0);return}else this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1);this._sectionPlanesDirty=!0}if(this._cpDirty){var r=-.3,s=this._originMarker.viewPos[2],n=this._cornerMarker.viewPos[2],a=this._targetMarker.viewPos[2];if(s>r||n>r||a>r){this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),this._angleLabel.setCulled(!0);return}h.transformPositions4(e.camera.project.matrix,this._vp,this._pp);for(var u=this._pp,c=this._cp,C=e.canvas.canvas,k=C.getBoundingClientRect(),D=this._container.getBoundingClientRect(),Q=k.top-D.top,X=k.left-D.left,R=e.canvas.boundary,q=R[2],te=R[3],se=0,ie=0,he=u.length;ie<he;ie+=4)c[se]=X+Math.floor((1+u[ie+0]/u[ie+3])*q/2),c[se+1]=Q+Math.floor((1-u[ie+1]/u[ie+3])*te/2),se+=2;this._originDot.setPos(c[0],c[1]),this._cornerDot.setPos(c[2],c[3]),this._targetDot.setPos(c[4],c[5]),this._originWire.setStartAndEnd(c[0],c[1],c[2],c[3]),this._targetWire.setStartAndEnd(c[2],c[3],c[4],c[5]),this._angleLabel.setPosBetweenWires(c[0],c[1],c[2],c[3],c[4],c[5]),h.subVec3(this._originWorld,this._cornerWorld,kn),h.subVec3(this._targetWorld,this._cornerWorld,ao);var ge=(kn[0]!==0||kn[1]!==0||kn[2]!==0)&&(ao[0]!==0||ao[1]!==0||ao[2]!==0);if(ge){var pe=this._approximate?" ":" = ";h.normalizeVec3(kn),h.normalizeVec3(ao);var xe=Math.abs(h.angleVec3(kn,ao));this._angle=xe/h.DEGTORAD,this._angleLabel.setText(pe+this._angle.toFixed(this._precision)+"°")}else this._angleLabel.setText("");this._originDot.setVisible(this._visible&&this._originVisible),this._cornerDot.setVisible(this._visible&&this._cornerVisible),this._targetDot.setVisible(this._visible&&this._targetVisible),this._originWire.setVisible(this._visible&&this._originWireVisible),this._targetWire.setVisible(this._visible&&this._targetWireVisible),this._angleLabel.setCulled(!(this._visible&&this._angleVisible&&this.labelsVisible)),this._cpDirty=!1}}}},{key:"_isSliced",value:function(e){for(var r=this.scene._sectionPlanesState.sectionPlanes,s=0,n=r.length;s<n;s++){var a=r[s];if(h.planeClipsPositions3(a.pos,a.dir,e,4))return!0}return!1}},{key:"approximate",get:function(){return this._approximate},set:function(e){e=e!==!1,this._approximate!==e&&(this._approximate=e,this._cpDirty=!0,this._needUpdate(0))}},{key:"precision",get:function(){return this._precision},set:function(e){this._precision!==e&&(this._precision=e,this._cpDirty=!0,this._needUpdate(0))}},{key:"origin",get:function(){return this._originMarker}},{key:"corner",get:function(){return this._cornerMarker}},{key:"target",get:function(){return this._targetMarker}},{key:"angle",get:function(){return this._update(),this._angle}},{key:"color",get:function(){return this._color},set:function(e){this._originDot.setFillColor(e),this._cornerDot.setFillColor(e),this._targetDot.setFillColor(e),this._originWire.setColor(e||"blue"),this._targetWire.setColor(e||"red"),this._angleLabel.setFillColor(e||"#0065FC"),this._color=e}},{key:"visible",get:function(){return this._visible},set:function(e){e=e!==!1,this._visible=e,this._originDot.setVisible(this._visible&&this._originVisible),this._cornerDot.setVisible(this._visible&&this._cornerVisible),this._targetDot.setVisible(this._visible&&this._targetVisible),this._originWire.setVisible(this._visible&&this._originWireVisible),this._targetWire.setVisible(this._visible&&this._targetWireVisible),this._angleLabel.setVisible(this._visible&&this._angleVisible),this._cpDirty=!0,this._needUpdate()}},{key:"originVisible",get:function(){return this._originVisible},set:function(e){e=e!==!1,this._originVisible=e,this._originDot.setVisible(this._visible&&this._originVisible),this._cpDirty=!0,this._needUpdate()}},{key:"cornerVisible",get:function(){return this._cornerVisible},set:function(e){e=e!==!1,this._cornerVisible=e,this._cornerDot.setVisible(this._visible&&this._cornerVisible),this._cpDirty=!0,this._needUpdate()}},{key:"targetVisible",get:function(){return this._targetVisible},set:function(e){e=e!==!1,this._targetVisible=e,this._targetDot.setVisible(this._visible&&this._targetVisible),this._cpDirty=!0,this._needUpdate()}},{key:"originWireVisible",get:function(){return this._originWireVisible},set:function(e){e=e!==!1,this._originWireVisible=e,this._originWire.setVisible(this._visible&&this._originWireVisible),this._cpDirty=!0,this._needUpdate()}},{key:"targetWireVisible",get:function(){return this._targetWireVisible},set:function(e){e=e!==!1,this._targetWireVisible=e,this._targetWire.setVisible(this._visible&&this._targetWireVisible),this._cpDirty=!0,this._needUpdate()}},{key:"angleVisible",get:function(){return this._angleVisible},set:function(e){e=e!==!1,this._angleVisible=e,this._angleLabel.setVisible(this._visible&&this._angleVisible),this._cpDirty=!0,this._needUpdate()}},{key:"labelsVisible",get:function(){return this._labelsVisible},set:function(e){e=e!==void 0?!!e:this.plugin.defaultLabelsVisible,this._labelsVisible=e;var r=this._visible&&this._labelsVisible;this._angleLabel.setVisible(r),this._cpDirty=!0,this._needUpdate()}},{key:"setHighlighted",value:function(e){this._originDot.setHighlighted(e),this._cornerDot.setHighlighted(e),this._targetDot.setHighlighted(e),this._originWire.setHighlighted(e),this._targetWire.setHighlighted(e),this._angleLabel.setHighlighted(e)}},{key:"clickable",get:function(){return this._clickable},set:function(e){e=!!e,this._clickable=e,this._originDot.setClickable(this._clickable),this._cornerDot.setClickable(this._clickable),this._targetDot.setClickable(this._clickable),this._originWire.setClickable(this._clickable),this._targetWire.setClickable(this._clickable),this._angleLabel.setClickable(this._clickable)}},{key:"destroy",value:function(){var e=this.plugin.viewer.scene;this._onViewMatrix&&e.camera.off(this._onViewMatrix),this._onProjMatrix&&e.camera.off(this._onProjMatrix),this._onCanvasBoundary&&e.canvas.off(this._onCanvasBoundary),this._onSectionPlaneUpdated&&e.off(this._onSectionPlaneUpdated),this._originDot.destroy(),this._cornerDot.destroy(),this._targetDot.destroy(),this._originWire.destroy(),this._targetWire.destroy(),this._angleLabel.destroy(),j(i,"destroy",this)([])}}])}(Ve),jo=function(o){function i(){return ee(this,i),O(this,i,arguments)}return L(i,o),Y(i,[{key:"active",get:function(){},set:function(e){}},{key:"snapping",get:function(){return!0},set:function(e){}},{key:"activate",value:function(){}},{key:"deactivate",value:function(){}},{key:"reset",value:function(){}},{key:"destroy",value:function(){}}])}(Ve),xs=0,In=1,Vo=2,Ga=function(o){function i(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(this,i),e=O(this,i,[t.viewer.scene]),e.cfg=r,e._canvasToPagePos=r.canvasToPagePos,e.pointerLens=r.pointerLens,e._active=!1,e._activate=!1,e._mouseState=xs,e._currentAngleMeasurement=null,e._initMarkerDiv(),e._onMouseHoverSurface=null,e._onHoverNothing=null,e._onPickedNothing=null,e._onPickedSurface=null,e._onInputMouseDown=null,e._onInputMouseUp=null,e._snapping=r.snapping!==!1,e._attachPlugin(t,r),e._offsetX=r._offsetX|0,e._offsetY=r._offsetY|0,e}return L(i,o),Y(i,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myAnglePivotMarker");var r=this.scene.canvas.canvas;r.parentNode.insertBefore(e,r),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this.markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){this.markerDiv&&(this.markerDiv.parentNode.removeChild(this.markerDiv),this.markerDiv=null)}},{key:"_attachPlugin",value:function(e){this.angleMeasurementsPlugin=e,this.plugin=e}},{key:"offsetX",get:function(){return this._offsetX},set:function(e){this._offsetX=e}},{key:"offsetY",get:function(){return this._offsetY},set:function(e){this._offsetY=e}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"mouseState",get:function(){return this._mouseState},set:function(e){this._mouseState=e}},{key:"activate",value:function(){var e=this;if(!this._activate){this.markerDiv||this._initMarkerDiv();var r=this.angleMeasurementsPlugin,s=!1;r.on("mouseOver",function(te){s=!0}),r.on("mouseLeave",function(te){s=!1}),r.on("measureDelete",function(te){s=!1});var n=this.scene;n.input;var a=n.canvas.canvas,u=20,c=r.viewer.cameraControl,C=this.pointerLens,k=!1,D=null,Q=0,X=0,R=h.vec3(),q=h.vec2();this._currentAngleMeasurement=null,this._onMouseHoverSurface=c.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",function(te){if(e._active&&!s){te.snappedToVertex||te.snappedToEdge?(C&&(C.visible=!0,C.canvasPos=te.canvasPos,C.snappedCanvasPos=te.snappedCanvasPos||te.canvasPos,C.snapped=!0),e.markerDiv.style.background="greenyellow",e.markerDiv.style.border="2px solid green"):(C&&(C.visible=!0,C.canvasPos=te.canvasPos,C.snappedCanvasPos=te.canvasPos,C.snapped=!1),e.markerDiv.style.background="pink",e.markerDiv.style.border="2px solid red");var se=te.snappedCanvasPos||te.canvasPos;switch(k=!0,D=te.entity,R.set(te.worldPos),q.set(se),e._mouseState){case xs:a.getBoundingClientRect();var ie=window.pageXOffset||document.documentElement.scrollLeft,he=window.pageYOffset||document.documentElement.scrollTop,ge=ie,pe=he;e.markerDiv.style.marginLeft="".concat(e._offsetX+ge+se[0]-5,"px"),e.markerDiv.style.marginTop="".concat(e._offsetY+pe+se[1]-5,"px");break;case In:e._currentAngleMeasurement&&(e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.angleVisible=!1,e._currentAngleMeasurement.corner.worldPos=te.worldPos,e._currentAngleMeasurement.corner.entity=te.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",a.style.cursor="pointer";break;case Vo:e._currentAngleMeasurement&&(e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.target.worldPos=te.worldPos,e._currentAngleMeasurement.target.entity=te.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",a.style.cursor="pointer";break}}}),a.addEventListener("mousedown",this._onMouseDown=function(te){e._active&&te.which===1&&(Q=te.clientX,X=te.clientY)}),a.addEventListener("mouseup",this._onMouseUp=function(te){if(e._active&&!s&&te.which===1&&!(te.clientX>Q+u||te.clientX<Q-u||te.clientY>X+u||te.clientY<X-u))switch(e._mouseState){case xs:k&&(e._currentAngleMeasurement=r.createMeasurement({id:h.createUUID(),origin:{worldPos:R},corner:{worldPos:R},target:{worldPos:R},precision:r.precision,approximate:!0}),e._currentAngleMeasurement.clickable=!1,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.angleVisible=!1,e._currentAngleMeasurement.origin.entity=D,e._mouseState=In,r.fire("measurementStart",e._currentAngleMeasurement));break;case In:k?(e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.corner.entity=D,e._mouseState=Vo):e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null,D=null,e._mouseState=xs,r.fire("measurementCancel",e._currentAngleMeasurement));break;case Vo:k?(e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.target.entity=D,e._currentAngleMeasurement.clickable=!0,D=null,r.fire("measurementEnd",e._currentAngleMeasurement),e._currentAngleMeasurement=null,e._mouseState=xs):e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null,D=null,e._mouseState=xs,r.fire("measurementCancel",e._currentAngleMeasurement));break}}),this._onMouseHoverOff=c.on(this._snapping?"hoverSnapOrSurfaceOff":"hoverOff",function(te){if(e._active&&!s&&(k=!1,C&&(C.visible=!0,C.pointerPos=te.canvasPos,C.snappedCanvasPos=te.snappedCanvasPos||te.canvasPos,C.snapped=!1),e.markerDiv.style.marginLeft="-100px",e.markerDiv.style.marginTop="-100px",e._currentAngleMeasurement)){switch(e._mouseState){case xs:e._currentAngleMeasurement.originVisible=!1;break;case In:e._currentAngleMeasurement.cornerVisible=!1,e._currentAngleMeasurement.originWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1;break;case Vo:e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1;break}a.style.cursor="default"}}),this._activate=!0}}},{key:"deactivate",value:function(){if(this._active){this.pointerLens&&(this.pointerLens.visible=!1),this.reset();var e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);var r=this.angleMeasurementsPlugin.viewer.cameraControl;r.off(this._onMouseHoverSurface),r.off(this._onPickedSurface),r.off(this._onHoverNothing),r.off(this._onPickedNothing),this._currentAngleMeasurement=null,this._active=!1}}},{key:"reset",value:function(){this._active&&(this._currentAngleMeasurement&&(this.angleMeasurementsPlugin.fire("measurementCancel",this._currentAngleMeasurement),this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._mouseState=xs)}},{key:"destroy",value:function(){this.deactivate(),this._destroyMarkerDiv(),this.pointerLens&&this.pointerLens.destroy(),j(i,"destroy",this)([])}}])}(jo),Vu=function(o){function i(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(this,i),e=O(this,i,["AngleMeasurements",t]),e._container=r.container||t.viewerElement||document.body,e._defaultControl=null,e._measurements={},e.defaultColor=r.defaultColor!==void 0?r.defaultColor:"#0065fc",e.defaultLabelsVisible=r.defaultLabelsVisible!==!1,e.zIndex=r.zIndex||1e4,e.precision=r.precision!==void 0?r.precision:2,e._onMouseOver=function(s,n){e.fire("mouseOver",{plugin:e,angleMeasurement:n,measurement:n,event:s})},e._onMouseLeave=function(s,n){e.fire("mouseLeave",{plugin:e,angleMeasurement:n,measurement:n,event:s})},e._onMouseClick=function(s,n){e.fire("clickMeasure",{plugin:e,angleMeasurement:n,measurement:n,event:s})},e._onTouchStart=function(s,n){e.fire("touchMeasure",{plugin:e,angleMeasurement:n,measurement:n,event:s})},e._onContextMenu=function(s,n){e.fire("contextMenu",{plugin:e,angleMeasurement:n,measurement:n,event:s})},e}return L(i,o),Y(i,[{key:"precision",get:function(){return this._precision},set:function(e){if(this._precision!=e&&(this._precision=e,this.measureNum>0))for(var r in this.measurements)this.measurements[r].precision=e}},{key:"measureNum",get:function(){return Object.keys(this.measurements).length}},{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,r){}},{key:"control",get:function(){return this._defaultControl||(this._defaultControl=new Ga(this,{})),this._defaultControl}},{key:"measurements",get:function(){return this._measurements}},{key:"createMeasurement",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.viewer.scene.components[r.id]&&(this.error("Viewer scene component with this ID already exists: "+r.id),delete r.id);var s=r.origin,n=r.corner,a=r.target,u=new Fl(this,{id:r.id,plugin:this,container:this._container,origin:{entity:s.entity,worldPos:s.worldPos},corner:{entity:n.entity,worldPos:n.worldPos},target:{entity:a.entity,worldPos:a.worldPos},borderColor:r.borderColor,color:r.color,visible:r.visible,originVisible:!0,originWireVisible:!0,cornerVisible:!0,targetWireVisible:!0,targetVisible:!0,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onMouseClick:this._onMouseClick,onTouchStart:this._onTouchStart,onContextMenu:this._onContextMenu,precision:this._precision});return this._measurements[u.id]=u,u.on("destroyed",function(){delete e._measurements[u.id]}),u.clickable=!0,this.fire("measurementCreated",u),u}},{key:"destroyMeasurement",value:function(e){var r=this._measurements[e];if(!r){this.log("AngleMeasurement not found: "+e);return}r.destroy(),this.fire("measurementDestroyed",r)}},{key:"setLabelsShown",value:function(e){for(var r=0,s=Object.entries(this.measurements);r<s.length;r++){var n=P(s[r],2);n[0];var a=n[1];a.labelShown=e}}},{key:"setMeasurementsShown",value:function(e){for(var r in this.measurements)this.measurements[r].visible=e}},{key:"clear",value:function(){for(var e=Object.keys(this._measurements),r=0,s=e.length;r<s;r++)this.destroyMeasurement(e[r])}},{key:"destroy",value:function(){this.clear(),j(i,"destroy",this)([])}}])}(Qe),fn=function(){function o(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ee(this,o),this.viewer=i,this.scene=this.viewer.scene,this._circleDiv=document.createElement("div"),this._circleDiv.id=t.id,this.viewer.scene.canvas.canvas.parentNode.insertBefore(this._circleDiv,this.viewer.scene.canvas.canvas),this._circleDiv.style.backgroundColor="transparent",this._circleDiv.style.border="2px solid green",this._circleDiv.style.borderRadius="50px",this._circleDiv.style.width="50px",this._circleDiv.style.height="50px",this._circleDiv.style.margin="-200px -200px",this._circleDiv.style.zIndex="100000",this._circleDiv.style.position="absolute",this._circleDiv.style.pointerEvents="none",this._circlePos=null,this._circleMaxRadius=200,this._circleMinRadius=2,this._active=t.active!==!1,this._visible=!1,this._running=!1,this._destroyed=!1}return Y(o,[{key:"start",value:function(t){var e=this;if(!this._destroyed){this._circlePos=t,this._running=!1,this._circleRadius=this._circleMaxRadius,this._circleDiv.style.borderRadius="".concat(this._circleRadius,"px"),this._circleDiv.style.marginLeft="".concat(this._circlePos[0]-this._circleRadius,"px"),this._circleDiv.style.marginTop="".concat(this._circlePos[1]-this._circleRadius,"px");var r=this._circleMaxRadius,s=2,n,a=300,u=function(C){if(e._running){n||(n=C);var k=C-n,D=Math.min(k/a,1),Q=r+(s-r)*D;e._circleRadius=Q,e._circleDiv.style.width="".concat(e._circleRadius,"px"),e._circleDiv.style.height="".concat(e._circleRadius,"px"),e._circleDiv.style.marginLeft="".concat(e._circlePos[0]-e._circleRadius/2,"px"),e._circleDiv.style.marginTop="".concat(e._circlePos[1]-e._circleRadius/2,"px"),D<1&&requestAnimationFrame(u)}};this._running=!0,requestAnimationFrame(u),this._circleDiv.style.visibility="visible"}}},{key:"stop",value:function(){this._destroyed||(this._running=!1,this._circleRadius=this._circleMaxRadius,this._circleDiv.style.borderRadius="".concat(this._circleRadius,"px"),this._circleDiv.style.visibility="hidden")}},{key:"durationMs",get:function(){return this._durationMs},set:function(t){this.stop(),this._durationMs=t}},{key:"destroy",value:function(){this._destroyed||(this.stop(),this._circleDiv&&this._circleDiv.parentNode.removeChild(this._circleDiv),this._destroyed=!0)}}])}(),Gr=0,Ky=1,Th=2,kh=3,Xy=4,Ih=5,Fh=6,$y=7,Dh=8,zA=7,zj=function(o){function i(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(this,i),e=O(this,i,[t.viewer.scene]),e.pointerLens=r.pointerLens,e.pointerCircle=new fn(t.viewer,{id:"angleMeasure_Circle"}),e._active=!1,e._activate=!1,e._initMarkerDiv(),e._currentAngleMeasurement=null,e._onCanvasTouchStart=null,e._onCanvasTouchEnd=null,e._longTouchTimeoutMs=300,e._snapping=r.snapping!==!1,e._snapToEdge=r.snapping!==!1,e._snapToVertex=r.snapping!==!1,e._touchState=Gr,e._attachPlugin(t,r),e._offsetX=r._offsetX|0,e._offsetY=r._offsetY|0,e}return L(i,o),Y(i,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myAngleMeasureTouchMarker");var r=this.scene.canvas.canvas;r.parentNode.insertBefore(e,r),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this.markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){this.markerDiv&&(this.markerDiv.parentNode.removeChild(this.markerDiv),this.markerDiv=null)}},{key:"_attachPlugin",value:function(e){this.angleMeasurementsPlugin=e,this.plugin=e}},{key:"offsetX",get:function(){return this._offsetX},set:function(e){this._offsetX=e}},{key:"offsetY",get:function(){return this._offsetY},set:function(e){this._offsetY=e}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"touchState",get:function(){return this._touchState},set:function(e){this._touchState=e}},{key:"activate",value:function(){var e=this;if(!this._activate){var r=this.plugin,s=this.scene,n=s.canvas.canvas;r.pointerLens;var a=h.vec3(),u=20,c=null;this._touchState=Gr;var C=h.vec2(),k=h.vec2(),D=h.vec2(),Q=null,X=function(){e.plugin.viewer.cameraControl.active=!1},R=function(){e.plugin.viewer.cameraControl.active=!0},q=function(){c&&(clearTimeout(c),c=null),e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null),R(),e._touchState=Gr};n.addEventListener("touchstart",this._onCanvasTouchStart=function(te){if(e._active&&te.isTrusted){var se=te.touches.length;if(se!==1){c&&(clearTimeout(c),c=null);return}var ie=te.touches[0],he=ie.clientX,ge=ie.clientY;switch(C.set([he+e.offsetX,ge+e.offsetY]),k.set([he+e.offsetX,ge+e.offsetY]),e._touchState){case Gr:if(se!==1&&c!==null){q();return}var pe=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping});if(pe&&pe.snapped)a.set(pe.worldPos),e.pointerCircle.start(pe.snappedCanvasPos);else{var xe=s.pick({canvasPos:k,pickSurface:!0});if(xe&&xe.worldPos)a.set(xe.worldPos),e.pointerCircle.start(xe.canvasPos);else return}c=setTimeout(function(){se!==1||k[0]>C[0]+u||k[0]<C[0]-u||k[1]>C[1]+u||k[1]<C[1]-u||(e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=C,e.pointerLens.cursorPos=C),e.pointerLens&&(e.pointerLens.canvasPos=k,e.pointerLens.snapped=!1),e.pointerLens&&(e.pointerLens.cursorPos=pe.canvasPos,e.pointerLens.snapped=!0),e._currentAngleMeasurement?e._currentAngleMeasurement.origin.worldPos=a:(e._currentAngleMeasurement=r.createMeasurement({id:h.createUUID(),origin:{worldPos:pe.worldPos,entity:pe.entity},corner:{worldPos:pe.worldPos,entity:pe.entity},target:{worldPos:pe.worldPos,entity:pe.entity},precision:r.precision}),e._currentAngleMeasurement.clickable=!1,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!1,e._currentAngleMeasurement.cornerVisible=!1,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1),r.fire("measurementStart",e._currentAngleMeasurement),e._touchState=Th,X())},e._longTouchTimeoutMs),e._touchState=Ky,Q=ie.identifier;break;case kh:if(se!==1&&c!==null){clearTimeout(c),c=null;return}se===1&&(c=setTimeout(function(){if(c=null,!(se!==1||k[0]>C[0]+u||k[0]<C[0]-u||k[1]>C[1]+u||k[1]<C[1]-u)){e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=C,e.pointerLens.snapped=!1);var Se=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping});if(Se&&Se.snapped)e.pointerLens&&(e.pointerLens.cursorPos=Se.snappedCanvasPos,e.pointerLens.snapped=!0),e.pointerCircle.start(Se.snappedCanvasPos),a.set(Se.worldPos),e._currentAngleMeasurement.corner.worldPos=Se.worldPos,e._currentAngleMeasurement.corner.entity=Se.entity,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1,e.angleMeasurementsPlugin.fire("measurementStart",e._currentAngleMeasurement);else{var Oe=s.pick({canvasPos:k,pickSurface:!0});Oe&&Oe.worldPos?(e.pointerLens&&(e.pointerLens.cursorPos=Oe.canvasPos,e.pointerLens.snapped=!1),e.pointerCircle.start(Oe.canvasPos),a.set(Oe.worldPos),e._currentAngleMeasurement.corner.worldPos=Oe.worldPos,e._currentAngleMeasurement.corner.entity=Oe.entity,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1,e.angleMeasurementsPlugin.fire("measurementStart",e._currentAngleMeasurement)):e.pointerLens&&(e.pointerLens.cursorPos=null,e.pointerLens.snapped=!1)}e._touchState=Ih,X()}},e._longTouchTimeoutMs),e._touchState=Xy),Q=ie.identifier;break;case Fh:if(se!==1&&c!==null){clearTimeout(c),c=null;return}se===1&&(c=setTimeout(function(){if(c=null,!(se!==1||k[0]>C[0]+u||k[0]<C[0]-u||k[1]>C[1]+u||k[1]<C[1]-u)){e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=C,e.pointerLens.snapped=!1);var Se=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping});if(Se&&Se.snapped)e.pointerLens&&(e.pointerLens.cursorPos=Se.snappedCanvasPos,e.pointerLens.snapped=!0),e.pointerCircle.start(Se.snappedCanvasPos),a.set(Se.worldPos),e._currentAngleMeasurement.target.worldPos=Se.worldPos,e._currentAngleMeasurement.target.entity=Se.entity,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e.angleMeasurementsPlugin.fire("measurementStart",e._currentAngleMeasurement);else{var Oe=s.pick({canvasPos:k,pickSurface:!0});Oe&&Oe.worldPos?(e.pointerLens&&(e.pointerLens.cursorPos=Oe.canvasPos,e.pointerLens.snapped=!1),e.pointerCircle.start(Oe.canvasPos),a.set(Oe.worldPos),e._currentAngleMeasurement.target.worldPos=Oe.worldPos,e._currentAngleMeasurement.target.entity=Oe.entity,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.angleVisible=!0,r.fire("measurementStart",e._currentAngleMeasurement)):e.pointerLens&&(e.pointerLens.cursorPos=null,e.pointerLens.snapped=!1)}e._touchState=Dh,X()}},e._longTouchTimeoutMs),e._touchState=$y),Q=ie.identifier;break;default:c!==null&&(clearTimeout(c),c=null),e._touchState=zA;return}}},{passive:!0}),n.addEventListener("touchmove",function(te){if(e._active){e.pointerCircle.stop();var se=te.touches.length;if(se!==1||te.changedTouches.length!==1){c&&(clearTimeout(c),c=null);return}var ie=te.touches[0],he=ie.clientX,ge=ie.clientY;if(ie.identifier===Q){k.set([he+e.offsetX,ge+e.offsetY]);var pe,xe;switch(e._touchState){case Th:e.pointerLens&&(e.pointerLens.canvasPos=k),pe=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping}),pe&&pe.snapped?(e.pointerLens&&(e.pointerLens.snappedCanvasPos=pe.snappedCanvasPos,e.pointerLens.snapped=!0),a.set(pe.worldPos),e._currentAngleMeasurement.origin.worldPos=pe.worldPos):(xe=s.pick({canvasPos:k,pickSurface:!0}),xe&&xe.worldPos?(e.pointerLens&&(e.pointerLens.cursorPos=xe.canvasPos,e.pointerLens.snapped=!1),a.set(xe.worldPos),e._currentAngleMeasurement.origin.worldPos=xe.worldPos):e.pointerLens&&(e.pointerLens.cursorPos=null,e.pointerLens.snapped=!1)),e._touchState=Th;break;case Ih:if(se!==1&&c!==null){clearTimeout(c),c=null,e.pointerLens&&(e.pointerLens.visible=!1),e._touchState=zA;return}e.pointerLens&&(e.pointerLens.canvasPos=k),pe=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping}),pe&&pe.worldPos?(e.pointerLens&&(e.pointerLens.cursorPos=pe.snappedCanvasPos,e.pointerLens.snapped=!0),e._currentAngleMeasurement.corner.worldPos=pe.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1):(xe=s.pick({canvasPos:k,pickSurface:!0}),xe&&xe.worldPos&&(e.pointerLens&&(e.pointerLens.cursorPos=xe.canvasPos,e.pointerLens.snapped=!1),e._currentAngleMeasurement.corner.worldPos=xe.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1)),e._touchState=Ih;break;case Dh:if(se!==1&&c!==null){clearTimeout(c),c=null,e.pointerLens&&(e.pointerLens.visible=!1),e._touchState=zA;return}e.pointerLens&&(e.pointerLens.canvasPos=k),pe=s.pick({canvasPos:k,snapToVertex:e._snapping,snapToEdge:e._snapping}),pe&&pe.worldPos?(e.pointerLens&&(e.pointerLens.cursorPos=pe.snappedCanvasPos,e.pointerLens.snapped=!0),e._currentAngleMeasurement.target.worldPos=pe.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.angleVisible=!0):(xe=s.pick({canvasPos:k,pickSurface:!0}),xe&&xe.worldPos&&(e.pointerLens&&(e.pointerLens.cursorPos=xe.canvasPos,e.pointerLens.snapped=!1),e._currentAngleMeasurement.target.worldPos=xe.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.angleVisible=!0)),e._touchState=Dh;break}}}},{passive:!0}),n.addEventListener("touchend",this._onCanvasTouchEnd=function(te){if(e._active){e.pointerCircle.stop();var se=te.changedTouches.length;if(se===1){var ie=te.changedTouches[0],he=ie.clientX,ge=ie.clientY;if(ie.identifier===Q)switch(c&&(clearTimeout(c),c=null),D.set([he,ge]),e._touchState){case Ky:{if(se!==1||he>C[0]+u||he<C[0]-u||ge>C[1]+u||ge<C[1]-u){e._touchState=Gr;return}var pe=s.pick({canvasPos:k,pickSurface:!0});pe&&pe.worldPos?(e._currentAngleMeasurement=r.createMeasurement({id:h.createUUID(),origin:{worldPos:pe.worldPos},corner:{worldPos:pe.worldPos},target:{worldPos:pe.worldPos},precision:r.precision}),e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!1,e._currentAngleMeasurement.cornerVisible=!1,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1,e._touchState=kh):(e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null),e._touchState=Gr)}R();break;case Th:e.pointerLens&&(e.pointerLens.visible=!1),e._currentAngleMeasurement?e._touchState=kh:(e.pointerLens&&(e.pointerLens.snapped=!1,e.pointerLens.visible=!1),e._touchState=Gr),R();break;case Xy:{if(se!==1||he>C[0]+u||he<C[0]-u||ge>C[1]+u||ge<C[1]-u){e._touchState=kh;return}var xe=s.pick({canvasPos:k,pickSurface:!0});xe&&xe.worldPos?(e._currentAngleMeasurement.corner.worldPos=xe.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!1,e._currentAngleMeasurement.targetVisible=!1,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.angleVisible=!1,e._touchState=Fh):(e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null),e._touchState=Gr)}R();break;case Ih:e.pointerLens&&(e.pointerLens.visible=!1),e._touchState=Fh,R();break;case $y:{if(se!==1||he>C[0]+u||he<C[0]-u||ge>C[1]+u||ge<C[1]-u){e._touchState=Fh;return}var Se=s.pick({canvasPos:k,pickSurface:!0});Se&&Se.worldPos?(e._currentAngleMeasurement.target.worldPos=Se.worldPos,e._currentAngleMeasurement.originVisible=!0,e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.cornerWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.clickable=!0,e.angleMeasurementsPlugin.fire("measurementEnd",e._currentAngleMeasurement),e._currentAngleMeasurement=null):e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null),e._touchState=Gr}R();break;case Dh:e.pointerLens&&(e.pointerLens.visible=!1),!e._currentAngleMeasurement||!e._currentAngleMeasurement.targetVisible?(e._currentAngleMeasurement&&(e._currentAngleMeasurement.destroy(),e._currentAngleMeasurement=null),e._touchState=Gr):(e._currentAngleMeasurement.clickable=!0,e.angleMeasurementsPlugin.fire("measurementEnd",e._currentAngleMeasurement),e._currentAngleMeasurement=null,e._touchState=Gr),R();break}}}},{passive:!0}),n.addEventListener("touchcancel",this._onCanvasTouchEnd),this._activate=!0}}},{key:"deactivate",value:function(){if(this._active){this.plugin.pointerLens&&(this.plugin.pointerLens.visible=!1),this.reset();var e=this.plugin.viewer.scene.canvas.canvas;e.removeEventListener("touchstart",this._onCanvasTouchStart),e.removeEventListener("touchend",this._onCanvasTouchEnd),e.removeEventListener("touchcancel",this._onCanvasTouchEnd),this._currentAngleMeasurement&&(this.angleMeasurementsPlugin.fire("measurementCancel",this._currentAngleMeasurement),this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._active=!1,this.plugin.viewer.cameraControl.active=!0}}},{key:"reset",value:function(){this._active&&this._currentAngleMeasurement&&(this.angleMeasurementsPlugin.fire("measurementCancel",this._currentAngleMeasurement),this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null)}},{key:"destroy",value:function(){this.deactivate(),this._destroyMarkerDiv(),this.pointerLens&&this.pointerLens.destroy(),this.pointerCircle&&this.pointerCircle.destroy(),j(i,"destroy",this)([])}}])}(jo),Gj=function(o){function i(t,e){var r;if(ee(this,i),r=O(this,i,[t,e]),r.plugin=e.plugin,r._container=e.container,!r._container)throw"config missing: container";if(!e.markerElement&&!e.markerHTML)throw"config missing: need either markerElement or markerHTML";if(!e.labelElement&&!e.labelHTML)throw"config missing: need either labelElement or labelHTML";return r._htmlDirty=!1,e.markerElement?(r._marker=e.markerElement,r._marker.addEventListener("click",r._onMouseClickedExternalMarker=function(){r.plugin.fire("markerClicked",r)}),r._marker.addEventListener("dblclick",r._onMouseDblClickedExternalMarker=function(){r.plugin.fire("markerDoubleClicked",r)}),r._marker.addEventListener("mouseenter",r._onMouseEnterExternalMarker=function(){r.plugin.fire("markerMouseEnter",r)}),r._marker.addEventListener("mouseleave",r._onMouseLeaveExternalMarker=function(){r.plugin.fire("markerMouseLeave",r)}),r._markerExternal=!0):(r._markerHTML=e.markerHTML,r._htmlDirty=!0,r._markerExternal=!1),e.labelElement?(r._label=e.labelElement,r._labelExternal=!0):(r._labelHTML=e.labelHTML,r._htmlDirty=!0,r._labelExternal=!1),r._markerShown=!!e.markerShown,r._labelShown=!!e.labelShown,r._values=e.values||{},r._layoutDirty=!0,r._visibilityDirty=!0,r._buildHTML(),r._onTick=r.scene.on("tick",function(){r._htmlDirty&&(r._buildHTML(),r._htmlDirty=!1,r._layoutDirty=!0,r._visibilityDirty=!0),(r._layoutDirty||r._visibilityDirty)&&(r._markerShown||r._labelShown)&&(r._updatePosition(),r._layoutDirty=!1),r._visibilityDirty&&(r._marker.style.visibility=r.visible&&r._markerShown?"visible":"hidden",r._label.style.visibility=r.visible&&r._markerShown&&r._labelShown?"visible":"hidden",r._visibilityDirty=!1)}),r.on("canvasPos",function(){r._layoutDirty=!0}),r.on("visible",function(){r._visibilityDirty=!0}),r.setMarkerShown(e.markerShown!==!1),r.setLabelShown(e.labelShown),r.eye=e.eye?e.eye.slice():null,r.look=e.look?e.look.slice():null,r.up=e.up?e.up.slice():null,r.projection=e.projection,r}return L(i,o),Y(i,[{key:"_buildHTML",value:function(){var e=this;if(!this._markerExternal){this._marker&&(this._container.removeChild(this._marker),this._marker=null);var r=this._markerHTML||"<p></p>";wt.isArray(r)&&(r=r.join("")),r=this._renderTemplate(r.trim());var s=document.createRange().createContextualFragment(r);this._marker=s.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",function(){e.plugin.fire("markerClicked",e)}),this._marker.addEventListener("dblclick",function(){e.plugin.fire("markerDoubleClicked",e)}),this._marker.addEventListener("mouseenter",function(){e.plugin.fire("markerMouseEnter",e)}),this._marker.addEventListener("mouseleave",function(){e.plugin.fire("markerMouseLeave",e)}),this._marker.addEventListener("wheel",function(u){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",u))})}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);var n=this._labelHTML||"<p></p>";wt.isArray(n)&&(n=n.join("")),n=this._renderTemplate(n.trim());var a=document.createRange().createContextualFragment(n);this._label=a.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",function(u){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",u))})}}},{key:"_updatePosition",value:function(){var e=this.scene.canvas.boundary,r=e[0],s=e[1],n=this.canvasPos;this._marker.style.left=Math.floor(r+n[0])-12+"px",this._marker.style.top=Math.floor(s+n[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;var a=20,u=-17;this._label.style.left=20+Math.floor(r+n[0]+a)+"px",this._label.style.top=Math.floor(s+n[1]+u)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}},{key:"_renderTemplate",value:function(e){for(var r in this._values)if(this._values.hasOwnProperty(r)){var s=this._values[r];e=e.replace(new RegExp("{{"+r+"}}","g"),s)}return e}},{key:"setMarkerShown",value:function(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}},{key:"getMarkerShown",value:function(){return this._markerShown}},{key:"setLabelShown",value:function(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}},{key:"getLabelShown",value:function(){return this._labelShown}},{key:"setField",value:function(e,r){this._values[e]=r||"",this._htmlDirty=!0}},{key:"getField",value:function(e){return this._values[e]}},{key:"setValues",value:function(e){for(var r in e)if(e.hasOwnProperty(r)){var s=e[r];this.setField(r,s)}}},{key:"getValues",value:function(){return this._values}},{key:"destroy",value:function(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("dblclick",this._onMouseDblClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),j(i,"destroy",this)([])}}])}(tn),Wj=h.vec3(),Kj=h.vec3(),Xj=h.vec3(),$j=function(o){function i(t,e){var r;return ee(this,i),r=O(this,i,["Annotations",t]),r._labelHTML=e.labelHTML||"<div></div>",r._markerHTML=e.markerHTML||"<div></div>",r._container=e.container||document.body,r._values=e.values||{},r.annotations={},r.surfaceOffset=e.surfaceOffset,r}return L(i,o),Y(i,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,r){switch(e){case"clearAnnotations":this.clear();break}}},{key:"surfaceOffset",get:function(){return this._surfaceOffset},set:function(e){e==null&&(e=.3),this._surfaceOffset=e}},{key:"createAnnotation",value:function(e){var r=this;this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id);var s,n;if(e.pickResult=e.pickResult||e.pickRecord,e.pickResult){var a=e.pickResult;if(!a.worldPos||!a.worldNormal)this.error("Param 'pickResult' does not have both worldPos and worldNormal");else{var u=h.normalizeVec3(a.worldNormal,Wj),c=h.mulVec3Scalar(u,this._surfaceOffset,Kj),C=h.addVec3(a.worldPos,c,Xj);s=C,n=a.entity}}else s=e.worldPos,n=e.entity;var k=null;e.markerElementId&&(k=document.getElementById(e.markerElementId),k||this.error("Can't find DOM element for 'markerElementId' value '"+e.markerElementId+"' - defaulting to internally-generated empty DIV"));var D=null;e.labelElementId&&(D=document.getElementById(e.labelElementId),D||this.error("Can't find DOM element for 'labelElementId' value '"+e.labelElementId+"' - defaulting to internally-generated empty DIV"));var Q=new Gj(this.viewer.scene,{id:e.id,plugin:this,entity:n,worldPos:s,container:this._container,markerElement:k,labelElement:D,markerHTML:e.markerHTML||this._markerHTML,labelHTML:e.labelHTML||this._labelHTML,occludable:e.occludable,values:wt.apply(e.values,wt.apply(this._values,{})),markerShown:e.markerShown,labelShown:e.labelShown,eye:e.eye,look:e.look,up:e.up,projection:e.projection,visible:e.visible!==!1});return this.annotations[Q.id]=Q,Q.on("destroyed",function(){delete r.annotations[Q.id],r.fire("annotationDestroyed",Q.id)}),this.fire("annotationCreated",Q.id),Q}},{key:"destroyAnnotation",value:function(e){var r=this.annotations[e];if(!r){this.log("Annotation not found: "+e);return}r.destroy()}},{key:"setAllVisible",value:function(e){for(var r in this.annotations)this.annotations[r].setMarkerShown(e)}},{key:"clear",value:function(){for(var e=Object.keys(this.annotations),r=0,s=e.length;r<s;r++)this.destroyAnnotation(e[r])}},{key:"destroy",value:function(){this.clear(),j(i,"destroy",this)([])}}])}(Qe),Yy=new ue({}),ui=function(){function o(i){ee(this,o),this.id=Yy.addItem({});for(var t in i)i.hasOwnProperty(t)&&(this[t]=i[t])}return Y(o,[{key:"destroy",value:function(){Yy.removeItem(this.id)}}])}();h.vec3();var Rh=function(o){function i(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ee(this,i),e=O(this,i,[t,r]),e._state=new ui({active:!0,pos:h.vec3(),dir:h.vec3(),dist:0}),e.controlId=r.controlId?r.controlId:null,e.planeId=r.planeId!=null&&r.planeId!=-1?r.planeId:-1,e.box=r.box?r.box:null,e.active=r.active,e.pos=r.pos,e.dir=r.dir,e.posRangeMin=r.pos,e.enableClip=r.enableClip?r.enableClip:!1,e.scene._sectionPlaneCreated(e),e}return L(i,o),Y(i,[{key:"type",get:function(){return"SectionPlane"}},{key:"control",get:function(){return this._control},set:function(e){this._control=e}},{key:"active",get:function(){return this._state.active},set:function(e){this._state.active=e!==!1,this.glRedraw(),this.fire("active",this._state.active)}},{key:"pos",get:function(){return this._state.pos},set:function(e){this._state.pos.set(e||[0,0,0]),this._state.dist=-h.dotVec3(this._state.pos,this._state.dir),this.fire("pos",this._state.pos),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dir",get:function(){return this._state.dir},set:function(e){this._state.dir.set(e||[0,0,-1]),this._state.dist=-h.dotVec3(this._state.pos,this._state.dir),this.glRedraw(),this.fire("dir",this._state.dir),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dist",get:function(){return this._state.dist}},{key:"flipDir",value:function(){var e=this._state.dir;e[0]*=-1,e[1]*=-1,e[2]*=-1,this._state.dist=-h.dotVec3(this._state.pos,this._state.dir),this.fire("dir",this._state.dir),this.glRedraw()}},{key:"destroy",value:function(){this._state.destroy(),this.scene._sectionPlaneDestroyed(this),j(i,"destroy",this)([])}}])}(Ve),Ei=1e3,ts=1001,Ho=1002,Wa=1003,Hu=1004,Jy=1004,Zy=1005,Dl=1005,Fn=1006,Yj=1007,Qu=1007,Ka=1008,Rl=1008,GA=1009,qy=1010,eb=1011,tb=1012,rb=1013,ib=1014,nb=1015,sb=1016,ob=1017,ab=1018,lb=1020,ub=1021,cb=1022,zu=1023,hb=1024,db=1025,fb=1026,Ab=1027,pb=1028,vb=1029,mb=1030,gb=1031,_b=1033,Gu=33776,Lh=33777,Oh=33778,Wu=33779,Nh=35840,WA=35841,Uh=35842,KA=35843,XA=36196,jh=37492,Vh=37496,Hh=37808,$A=37809,YA=37810,JA=37811,ZA=37812,qA=37813,ep=37814,tp=37815,rp=37816,ip=37817,np=37818,sp=37819,op=37820,ap=37821,Qh=36492,cs=3e3,bi=3001,Jj=1e4,yb=10001,bb=10002,Zj=10003,qj=function(i){i._material._state.type==="LambertMaterial"?(this.vertex=tV(i),this.fragment=rV(i)):(this.vertex=iV(i),this.fragment=nV(i))},Aa={};Aa[cs]="linearToLinear",Aa[bi]="sRGBToLinear";function wb(o){if(!o.receivesShadow)return!1;var i=o.scene._lightsState.lights;if(!i||i.length===0)return!1;for(var t=0,e=i.length;t<e;t++)if(i[t].castsShadow)return!0;return!1}function eV(o){if(!o._geometry._state.uvBuf)return!1;var i=o._material;return!!(i._ambientMap||i._occlusionMap||i._baseColorMap||i._diffuseMap||i._alphaMap||i._specularMap||i._glossinessMap||i._specularGlossinessMap||i._emissiveMap||i._metallicMap||i._roughnessMap||i._metallicRoughnessMap||i._reflectivityMap||i._normalMap)}function Bb(o){var i=o._geometry._state.primitiveName;return!!((o._geometry._state.autoVertexNormals||o._geometry._state.normalsBuf)&&(i==="triangles"||i==="triangle-strip"||i==="triangle-fan"))}function tV(o){var i=o.scene,t=o.scene._sectionPlanesState,e=o.scene._lightsState,r=o._geometry._state,s=o._state.billboard,n=o._state.stationary,a=t.getNumAllocatedSectionPlanes()>0,u=!!r.compressGeometry,c=[];if(c.push("#version 300 es"),c.push("// Lambertian drawing vertex shader"),c.push("in vec3 position;"),c.push("uniform mat4 modelMatrix;"),c.push("uniform mat4 viewMatrix;"),c.push("uniform mat4 projMatrix;"),c.push("uniform vec4 colorize;"),c.push("uniform vec3 offset;"),u&&c.push("uniform mat4 positionsDecodeMatrix;"),i.logarithmicDepthBufferEnabled&&(c.push("uniform float logDepthBufFC;"),c.push("out float vFragDepth;"),c.push("bool isPerspectiveMatrix(mat4 m) {"),c.push(" return (m[2][3] == - 1.0);"),c.push("}"),c.push("out float isPerspective;")),a&&c.push("out vec4 vWorldPosition;"),c.push("uniform vec4 lightAmbient;"),c.push("uniform vec4 materialColor;"),c.push("uniform vec3 materialEmissive;"),r.normalsBuf){c.push("in vec3 normal;"),c.push("uniform mat4 modelNormalMatrix;"),c.push("uniform mat4 viewNormalMatrix;");for(var C=0,k=e.lights.length;C<k;C++){var D=e.lights[C];D.type!=="ambient"&&(c.push("uniform vec4 lightColor"+C+";"),D.type==="dir"&&c.push("uniform vec3 lightDir"+C+";"),D.type==="point"&&c.push("uniform vec3 lightPos"+C+";"),D.type==="spot"&&(c.push("uniform vec3 lightPos"+C+";"),c.push("uniform vec3 lightDir"+C+";")))}u&&(c.push("vec3 octDecode(vec2 oct) {"),c.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),c.push(" if (v.z < 0.0) {"),c.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),c.push(" }"),c.push(" return normalize(v);"),c.push("}"))}if(c.push("out vec4 vColor;"),r.primitiveName==="points"&&c.push("uniform float pointSize;"),(s==="spherical"||s==="cylindrical")&&(c.push("void billboard(inout mat4 mat) {"),c.push(" mat[0][0] = 1.0;"),c.push(" mat[0][1] = 0.0;"),c.push(" mat[0][2] = 0.0;"),s==="spherical"&&(c.push(" mat[1][0] = 0.0;"),c.push(" mat[1][1] = 1.0;"),c.push(" mat[1][2] = 0.0;")),c.push(" mat[2][0] = 0.0;"),c.push(" mat[2][1] = 0.0;"),c.push(" mat[2][2] =1.0;"),c.push("}")),c.push("void main(void) {"),c.push("vec4 localPosition = vec4(position, 1.0); "),c.push("vec4 worldPosition;"),u&&c.push("localPosition = positionsDecodeMatrix * localPosition;"),r.normalsBuf&&(u?c.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):c.push("vec4 localNormal = vec4(normal, 0.0); "),c.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),c.push("mat4 viewNormalMatrix2 = viewNormalMatrix;")),c.push("mat4 viewMatrix2 = viewMatrix;"),c.push("mat4 modelMatrix2 = modelMatrix;"),n&&c.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;"),s==="spherical"||s==="cylindrical"?(c.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),c.push("billboard(modelMatrix2);"),c.push("billboard(viewMatrix2);"),c.push("billboard(modelViewMatrix);"),r.normalsBuf&&(c.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),c.push("billboard(modelNormalMatrix2);"),c.push("billboard(viewNormalMatrix2);"),c.push("billboard(modelViewNormalMatrix);")),c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = viewMatrix2 * worldPosition; ")),r.normalsBuf&&c.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);"),c.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),c.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),c.push("float lambertian = 1.0;"),r.normalsBuf)for(var Q=0,X=e.lights.length;Q<X;Q++){var R=e.lights[Q];if(R.type!=="ambient"){if(R.type==="dir")R.space==="view"?c.push("viewLightDir = normalize(lightDir"+Q+");"):c.push("viewLightDir = normalize((viewMatrix2 * vec4(lightDir"+Q+", 0.0)).xyz);");else if(R.type==="point")R.space==="view"?c.push("viewLightDir = -normalize(lightPos"+Q+" - viewPosition.xyz);"):c.push("viewLightDir = -normalize((viewMatrix2 * vec4(lightPos"+Q+", 0.0)).xyz);");else if(R.type==="spot")R.space==="view"?c.push("viewLightDir = normalize(lightDir"+Q+");"):c.push("viewLightDir = normalize((viewMatrix2 * vec4(lightDir"+Q+", 0.0)).xyz);");else continue;c.push("lambertian = max(dot(-viewNormal, viewLightDir), 0.0);"),c.push("reflectedColor += lambertian * (lightColor"+Q+".rgb * lightColor"+Q+".a);")}}return c.push("vColor = vec4((lightAmbient.rgb * lightAmbient.a * materialColor.rgb) + materialEmissive.rgb + (reflectedColor * materialColor.rgb), materialColor.a) * colorize;"),a&&c.push("vWorldPosition = worldPosition;"),r.primitiveName==="points"&&c.push("gl_PointSize = pointSize;"),c.push("vec4 clipPos = projMatrix * viewPosition;"),i.logarithmicDepthBufferEnabled&&(c.push("vFragDepth = 1.0 + clipPos.w;"),c.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),c.push("gl_Position = clipPos;"),c.push("}"),c}function rV(o){var i=o.scene,t=i._sectionPlanesState;o._material._state;var e=o._geometry._state,r=t.getNumAllocatedSectionPlanes()>0,s=i.gammaOutput,n=[];if(n.push("#version 300 es"),n.push("// Lambertian drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),i.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),r){n.push("in vec4 vWorldPosition;"),n.push("uniform bool clippable;");for(var a=0,u=t.getNumAllocatedSectionPlanes();a<u;a++)n.push("uniform bool sectionPlaneActive"+a+";"),n.push("uniform vec3 sectionPlanePos"+a+";"),n.push("uniform vec3 sectionPlaneDir"+a+";")}if(n.push("in vec4 vColor;"),s&&(n.push("uniform float gammaFactor;"),n.push(" vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),n.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),n.push("}")),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push("if (clippable) {"),n.push(" float dist = 0.0;");for(var c=0,C=t.getNumAllocatedSectionPlanes();c<C;c++)n.push("if (sectionPlaneActive"+c+") {"),n.push(" dist += clamp(dot(-sectionPlaneDir"+c+".xyz, vWorldPosition.xyz - sectionPlanePos"+c+".xyz), 0.0, 1000.0);"),n.push("}");n.push(" if (dist > 0.0) { discard; }"),n.push("}")}return e.primitiveName==="points"&&(n.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),n.push("float r = dot(cxy, cxy);"),n.push("if (r > 1.0) {"),n.push(" discard;"),n.push("}")),i.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s?n.push("outColor = linearToGamma(vColor, gammaFactor);"):n.push("outColor = vColor;"),n.push("}"),n}function iV(o){var i=o.scene;o._material;var t=o._state,e=i._sectionPlanesState,r=o._geometry._state,s=i._lightsState,n,a=t.billboard,u=t.background,c=t.stationary,C=eV(o),k=Bb(o),D=e.getNumAllocatedSectionPlanes()>0,Q=wb(o),X=!!r.compressGeometry,R=[];if(R.push("#version 300 es"),R.push("// Drawing vertex shader"),R.push("in vec3 position;"),X&&R.push("uniform mat4 positionsDecodeMatrix;"),R.push("uniform mat4 modelMatrix;"),R.push("uniform mat4 viewMatrix;"),R.push("uniform mat4 projMatrix;"),R.push("out vec3 vViewPosition;"),R.push("uniform vec3 offset;"),D&&R.push("out vec4 vWorldPosition;"),i.logarithmicDepthBufferEnabled&&(R.push("uniform float logDepthBufFC;"),R.push("out float vFragDepth;"),R.push("bool isPerspectiveMatrix(mat4 m) {"),R.push(" return (m[2][3] == - 1.0);"),R.push("}"),R.push("out float isPerspective;")),s.lightMaps.length>0&&R.push("out vec3 vWorldNormal;"),k){R.push("in vec3 normal;"),R.push("uniform mat4 modelNormalMatrix;"),R.push("uniform mat4 viewNormalMatrix;"),R.push("out vec3 vViewNormal;");for(var q=0,te=s.lights.length;q<te;q++)n=s.lights[q],n.type!=="ambient"&&(n.type==="dir"&&R.push("uniform vec3 lightDir"+q+";"),n.type==="point"&&R.push("uniform vec3 lightPos"+q+";"),n.type==="spot"&&(R.push("uniform vec3 lightPos"+q+";"),R.push("uniform vec3 lightDir"+q+";")),n.type==="dir"&&n.space==="view"||R.push("out vec4 vViewLightReverseDirAndDist"+q+";"));X&&(R.push("vec3 octDecode(vec2 oct) {"),R.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),R.push(" if (v.z < 0.0) {"),R.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),R.push(" }"),R.push(" return normalize(v);"),R.push("}"))}if(C&&(R.push("in vec2 uv;"),R.push("out vec2 vUV;"),X&&R.push("uniform mat3 uvDecodeMatrix;")),r.colors&&(R.push("in vec4 color;"),R.push("out vec4 vColor;")),r.primitiveName==="points"&&R.push("uniform float pointSize;"),(a==="spherical"||a==="cylindrical")&&(R.push("void billboard(inout mat4 mat) {"),R.push(" mat[0][0] = 1.0;"),R.push(" mat[0][1] = 0.0;"),R.push(" mat[0][2] = 0.0;"),a==="spherical"&&(R.push(" mat[1][0] = 0.0;"),R.push(" mat[1][1] = 1.0;"),R.push(" mat[1][2] = 0.0;")),R.push(" mat[2][0] = 0.0;"),R.push(" mat[2][1] = 0.0;"),R.push(" mat[2][2] =1.0;"),R.push("}")),Q){R.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(var se=0,ie=s.lights.length;se<ie;se++)s.lights[se].castsShadow&&(R.push("uniform mat4 shadowViewMatrix"+se+";"),R.push("uniform mat4 shadowProjMatrix"+se+";"),R.push("out vec4 vShadowPosFromLight"+se+";"))}if(R.push("void main(void) {"),R.push("vec4 localPosition = vec4(position, 1.0); "),R.push("vec4 worldPosition;"),X&&R.push("localPosition = positionsDecodeMatrix * localPosition;"),k&&(X?R.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):R.push("vec4 localNormal = vec4(normal, 0.0); "),R.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),R.push("mat4 viewNormalMatrix2 = viewNormalMatrix;")),R.push("mat4 viewMatrix2 = viewMatrix;"),R.push("mat4 modelMatrix2 = modelMatrix;"),c?R.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;"):u&&R.push("viewMatrix2[3] = vec4(0.0, 0.0, 0.0 ,1.0);"),a==="spherical"||a==="cylindrical"?(R.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),R.push("billboard(modelMatrix2);"),R.push("billboard(viewMatrix2);"),R.push("billboard(modelViewMatrix);"),k&&(R.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),R.push("billboard(modelNormalMatrix2);"),R.push("billboard(viewNormalMatrix2);"),R.push("billboard(modelViewNormalMatrix);")),R.push("worldPosition = modelMatrix2 * localPosition;"),R.push("worldPosition.xyz = worldPosition.xyz + offset;"),R.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(R.push("worldPosition = modelMatrix2 * localPosition;"),R.push("worldPosition.xyz = worldPosition.xyz + offset;"),R.push("vec4 viewPosition = viewMatrix2 * worldPosition; ")),k){R.push("vec3 worldNormal = (modelNormalMatrix2 * localNormal).xyz; "),s.lightMaps.length>0&&R.push("vWorldNormal = worldNormal;"),R.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),R.push("vec3 tmpVec3;"),R.push("float lightDist;");for(var he=0,ge=s.lights.length;he<ge;he++)n=s.lights[he],n.type!=="ambient"&&(n.type==="dir"&&n.space==="world"&&(R.push("tmpVec3 = vec3(viewMatrix2 * vec4(lightDir"+he+", 0.0) ).xyz;"),R.push("vViewLightReverseDirAndDist"+he+" = vec4(-tmpVec3, 0.0);")),n.type==="point"&&(n.space==="world"?(R.push("tmpVec3 = (viewMatrix2 * vec4(lightPos"+he+", 1.0)).xyz - viewPosition.xyz;"),R.push("lightDist = abs(length(tmpVec3));")):(R.push("tmpVec3 = lightPos"+he+".xyz - viewPosition.xyz;"),R.push("lightDist = abs(length(tmpVec3));")),R.push("vViewLightReverseDirAndDist"+he+" = vec4(tmpVec3, lightDist);")))}if(C&&(X?R.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"):R.push("vUV = uv;")),r.colors&&R.push("vColor = color;"),r.primitiveName==="points"&&R.push("gl_PointSize = pointSize;"),D&&R.push("vWorldPosition = worldPosition;"),R.push(" vViewPosition = viewPosition.xyz;"),R.push("vec4 clipPos = projMatrix * viewPosition;"),i.logarithmicDepthBufferEnabled&&(R.push("vFragDepth = 1.0 + clipPos.w;"),R.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),u&&R.push("clipPos.z = clipPos.w;"),R.push("gl_Position = clipPos;"),Q){R.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);"),R.push("vec4 tempx; ");for(var pe=0,xe=s.lights.length;pe<xe;pe++)s.lights[pe].castsShadow&&R.push("vShadowPosFromLight"+pe+" = texUnitConverter * shadowProjMatrix"+pe+" * (shadowViewMatrix"+pe+" * worldPosition); ")}return R.push("}"),R}function nV(o){var i=o.scene;i.canvas.gl;var t=o._material,e=o._geometry._state,r=o.scene._sectionPlanesState,s=o.scene._lightsState,n=o._material._state,a=r.getNumAllocatedSectionPlanes()>0,u=Bb(o),c=e.uvBuf,C=n.type==="PhongMaterial",k=n.type==="MetallicMaterial",D=n.type==="SpecularMaterial",Q=wb(o);i.gammaInput;var X=i.gammaOutput,R=[];if(R.push("#version 300 es"),R.push("// Drawing fragment shader"),R.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),R.push("precision highp float;"),R.push("precision highp int;"),R.push("#else"),R.push("precision mediump float;"),R.push("precision mediump int;"),R.push("#endif"),i.logarithmicDepthBufferEnabled&&(R.push("in float isPerspective;"),R.push("uniform float logDepthBufFC;"),R.push("in float vFragDepth;")),Q&&(R.push("float unpackDepth (vec4 color) {"),R.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),R.push(" return dot(color, bitShift);"),R.push("}")),R.push("uniform float gammaFactor;"),R.push("vec4 linearToLinear( in vec4 value ) {"),R.push(" return value;"),R.push("}"),R.push("vec4 sRGBToLinear( in vec4 value ) {"),R.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),R.push("}"),R.push("vec4 gammaToLinear( in vec4 value) {"),R.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),R.push("}"),X&&(R.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),R.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),R.push("}")),a){R.push("in vec4 vWorldPosition;"),R.push("uniform bool clippable;");for(var q=0;q<r.getNumAllocatedSectionPlanes();q++)R.push("uniform bool sectionPlaneActive"+q+";"),R.push("uniform vec3 sectionPlanePos"+q+";"),R.push("uniform vec3 sectionPlaneDir"+q+";")}if(u&&(s.lightMaps.length>0&&(R.push("uniform samplerCube lightMap;"),R.push("uniform mat4 viewNormalMatrix;")),s.reflectionMaps.length>0&&R.push("uniform samplerCube reflectionMap;"),(s.lightMaps.length>0||s.reflectionMaps.length>0)&&R.push("uniform mat4 viewMatrix;"),R.push("#define PI 3.14159265359"),R.push("#define RECIPROCAL_PI 0.31830988618"),R.push("#define RECIPROCAL_PI2 0.15915494"),R.push("#define EPSILON 1e-6"),R.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),R.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),R.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),R.push("}"),R.push("struct IncidentLight {"),R.push(" vec3 color;"),R.push(" vec3 direction;"),R.push("};"),R.push("struct ReflectedLight {"),R.push(" vec3 diffuse;"),R.push(" vec3 specular;"),R.push("};"),R.push("struct Geometry {"),R.push(" vec3 position;"),R.push(" vec3 viewNormal;"),R.push(" vec3 worldNormal;"),R.push(" vec3 viewEyeDir;"),R.push("};"),R.push("struct Material {"),R.push(" vec3 diffuseColor;"),R.push(" float specularRoughness;"),R.push(" vec3 specularColor;"),R.push(" float shine;"),R.push("};"),C&&((s.lightMaps.length>0||s.reflectionMaps.length>0)&&(R.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.lightMaps.length>0&&(R.push(" vec3 irradiance = "+Aa[s.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),R.push(" irradiance *= PI;"),R.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),R.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),s.reflectionMaps.length>0&&(R.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),R.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),R.push(" radiance *= PI;"),R.push(" reflectedLight.specular += radiance;")),R.push("}")),R.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),R.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),R.push(" vec3 irradiance = dotNL * directLight.color * PI;"),R.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),R.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),R.push("}")),(k||D)&&(R.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),R.push(" float r = ggxRoughness + 0.0001;"),R.push(" return (2.0 / (r * r) - 2.0);"),R.push("}"),R.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),R.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),R.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),R.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),R.push("}"),s.reflectionMaps.length>0&&(R.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),R.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),R.push(" vec3 envMapColor = "+Aa[s.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),R.push(" return envMapColor;"),R.push("}")),R.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),R.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),R.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),R.push("}"),R.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),R.push(" float a2 = ( alpha * alpha );"),R.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),R.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),R.push(" return 1.0 / ( gl * gv );"),R.push("}"),R.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),R.push(" float a2 = ( alpha * alpha );"),R.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),R.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),R.push(" return 0.5 / max( gv + gl, EPSILON );"),R.push("}"),R.push("float D_GGX(const in float alpha, const in float dotNH) {"),R.push(" float a2 = ( alpha * alpha );"),R.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),R.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),R.push("}"),R.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),R.push(" float alpha = ( roughness * roughness );"),R.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),R.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),R.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),R.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),R.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),R.push(" vec3 F = F_Schlick( specularColor, dotLH );"),R.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),R.push(" float D = D_GGX( alpha, dotNH );"),R.push(" return F * (G * D);"),R.push("}"),R.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),R.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),R.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),R.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),R.push(" vec4 r = roughness * c0 + c1;"),R.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),R.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),R.push(" return specularColor * AB.x + AB.y;"),R.push("}"),(s.lightMaps.length>0||s.reflectionMaps.length>0)&&(R.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.lightMaps.length>0&&(R.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),R.push(" irradiance *= PI;"),R.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),R.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),s.reflectionMaps.length>0&&(R.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),R.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),R.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),R.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),R.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),R.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),R.push("}")),R.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),R.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),R.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),R.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),R.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),R.push("}"))),R.push("in vec3 vViewPosition;"),e.colors&&R.push("in vec4 vColor;"),c&&(u&&t._normalMap||t._ambientMap||t._baseColorMap||t._diffuseMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._occlusionMap||t._alphaMap)&&R.push("in vec2 vUV;"),u&&(s.lightMaps.length>0&&R.push("in vec3 vWorldNormal;"),R.push("in vec3 vViewNormal;")),n.ambient&&R.push("uniform vec3 materialAmbient;"),n.baseColor&&R.push("uniform vec3 materialBaseColor;"),n.alpha!==void 0&&n.alpha!==null&&R.push("uniform vec4 materialAlphaModeCutoff;"),n.emissive&&R.push("uniform vec3 materialEmissive;"),n.diffuse&&R.push("uniform vec3 materialDiffuse;"),n.glossiness!==void 0&&n.glossiness!==null&&R.push("uniform float materialGlossiness;"),n.shininess!==void 0&&n.shininess!==null&&R.push("uniform float materialShininess;"),n.specular&&R.push("uniform vec3 materialSpecular;"),n.metallic!==void 0&&n.metallic!==null&&R.push("uniform float materialMetallic;"),n.roughness!==void 0&&n.roughness!==null&&R.push("uniform float materialRoughness;"),n.specularF0!==void 0&&n.specularF0!==null&&R.push("uniform float materialSpecularF0;"),c&&t._ambientMap&&(R.push("uniform sampler2D ambientMap;"),t._ambientMap._state.matrix&&R.push("uniform mat4 ambientMapMatrix;")),c&&t._baseColorMap&&(R.push("uniform sampler2D baseColorMap;"),t._baseColorMap._state.matrix&&R.push("uniform mat4 baseColorMapMatrix;")),c&&t._diffuseMap&&(R.push("uniform sampler2D diffuseMap;"),t._diffuseMap._state.matrix&&R.push("uniform mat4 diffuseMapMatrix;")),c&&t._emissiveMap&&(R.push("uniform sampler2D emissiveMap;"),t._emissiveMap._state.matrix&&R.push("uniform mat4 emissiveMapMatrix;")),u&&c&&t._metallicMap&&(R.push("uniform sampler2D metallicMap;"),t._metallicMap._state.matrix&&R.push("uniform mat4 metallicMapMatrix;")),u&&c&&t._roughnessMap&&(R.push("uniform sampler2D roughnessMap;"),t._roughnessMap._state.matrix&&R.push("uniform mat4 roughnessMapMatrix;")),u&&c&&t._metallicRoughnessMap&&(R.push("uniform sampler2D metallicRoughnessMap;"),t._metallicRoughnessMap._state.matrix&&R.push("uniform mat4 metallicRoughnessMapMatrix;")),u&&t._normalMap&&(R.push("uniform sampler2D normalMap;"),t._normalMap._state.matrix&&R.push("uniform mat4 normalMapMatrix;"),R.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),R.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),R.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),R.push(" vec2 st0 = dFdx( uv.st );"),R.push(" vec2 st1 = dFdy( uv.st );"),R.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),R.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),R.push(" vec3 N = normalize( surf_norm );"),R.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),R.push(" mat3 tsn = mat3( S, T, N );"),R.push(" return normalize( tsn * mapN );"),R.push("}")),c&&t._occlusionMap&&(R.push("uniform sampler2D occlusionMap;"),t._occlusionMap._state.matrix&&R.push("uniform mat4 occlusionMapMatrix;")),c&&t._alphaMap&&(R.push("uniform sampler2D alphaMap;"),t._alphaMap._state.matrix&&R.push("uniform mat4 alphaMapMatrix;")),u&&c&&t._specularMap&&(R.push("uniform sampler2D specularMap;"),t._specularMap._state.matrix&&R.push("uniform mat4 specularMapMatrix;")),u&&c&&t._glossinessMap&&(R.push("uniform sampler2D glossinessMap;"),t._glossinessMap._state.matrix&&R.push("uniform mat4 glossinessMapMatrix;")),u&&c&&t._specularGlossinessMap&&(R.push("uniform sampler2D materialSpecularGlossinessMap;"),t._specularGlossinessMap._state.matrix&&R.push("uniform mat4 materialSpecularGlossinessMapMatrix;")),u&&(t._diffuseFresnel||t._specularFresnel||t._alphaFresnel||t._emissiveFresnel||t._reflectivityFresnel)&&(R.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),R.push(" float fr = abs(dot(eyeDir, normal));"),R.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),R.push(" return pow(finalFr, power);"),R.push("}"),t._diffuseFresnel&&(R.push("uniform float diffuseFresnelCenterBias;"),R.push("uniform float diffuseFresnelEdgeBias;"),R.push("uniform float diffuseFresnelPower;"),R.push("uniform vec3 diffuseFresnelCenterColor;"),R.push("uniform vec3 diffuseFresnelEdgeColor;")),t._specularFresnel&&(R.push("uniform float specularFresnelCenterBias;"),R.push("uniform float specularFresnelEdgeBias;"),R.push("uniform float specularFresnelPower;"),R.push("uniform vec3 specularFresnelCenterColor;"),R.push("uniform vec3 specularFresnelEdgeColor;")),t._alphaFresnel&&(R.push("uniform float alphaFresnelCenterBias;"),R.push("uniform float alphaFresnelEdgeBias;"),R.push("uniform float alphaFresnelPower;"),R.push("uniform vec3 alphaFresnelCenterColor;"),R.push("uniform vec3 alphaFresnelEdgeColor;")),t._reflectivityFresnel&&(R.push("uniform float materialSpecularF0FresnelCenterBias;"),R.push("uniform float materialSpecularF0FresnelEdgeBias;"),R.push("uniform float materialSpecularF0FresnelPower;"),R.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),R.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),t._emissiveFresnel&&(R.push("uniform float emissiveFresnelCenterBias;"),R.push("uniform float emissiveFresnelEdgeBias;"),R.push("uniform float emissiveFresnelPower;"),R.push("uniform vec3 emissiveFresnelCenterColor;"),R.push("uniform vec3 emissiveFresnelEdgeColor;"))),R.push("uniform vec4 lightAmbient;"),u)for(var te=0,se=s.lights.length;te<se;te++){var ie=s.lights[te];ie.type!=="ambient"&&(R.push("uniform vec4 lightColor"+te+";"),ie.type==="point"&&R.push("uniform vec3 lightAttenuation"+te+";"),ie.type==="dir"&&ie.space==="view"&&R.push("uniform vec3 lightDir"+te+";"),ie.type==="point"&&ie.space==="view"?R.push("uniform vec3 lightPos"+te+";"):R.push("in vec4 vViewLightReverseDirAndDist"+te+";"))}if(Q)for(var he=0,ge=s.lights.length;he<ge;he++)s.lights[he].castsShadow&&(R.push("in vec4 vShadowPosFromLight"+he+";"),R.push("uniform sampler2D shadowMap"+he+";"));if(R.push("uniform vec4 colorize;"),R.push("out vec4 outColor;"),R.push("void main(void) {"),a){R.push("if (clippable) {"),R.push(" float dist = 0.0;");for(var q=0;q<r.getNumAllocatedSectionPlanes();q++)R.push("if (sectionPlaneActive"+q+") {"),R.push(" dist += clamp(dot(-sectionPlaneDir"+q+".xyz, vWorldPosition.xyz - sectionPlanePos"+q+".xyz), 0.0, 1000.0);"),R.push("}");R.push(" if (dist > 0.0) { discard; }"),R.push("}")}if(e.primitiveName==="points"&&(R.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),R.push("float r = dot(cxy, cxy);"),R.push("if (r > 1.0) {"),R.push(" discard;"),R.push("}")),R.push("float occlusion = 1.0;"),n.ambient?R.push("vec3 ambientColor = materialAmbient;"):R.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);"),n.diffuse?R.push("vec3 diffuseColor = materialDiffuse;"):n.baseColor?R.push("vec3 diffuseColor = materialBaseColor;"):R.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);"),e.colors&&R.push("diffuseColor *= vColor.rgb;"),n.emissive?R.push("vec3 emissiveColor = materialEmissive;"):R.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);"),n.specular?R.push("vec3 specular = materialSpecular;"):R.push("vec3 specular = vec3(1.0, 1.0, 1.0);"),n.alpha!==void 0?R.push("float alpha = materialAlphaModeCutoff[0];"):R.push("float alpha = 1.0;"),e.colors&&R.push("alpha *= vColor.a;"),n.glossiness!==void 0?R.push("float glossiness = materialGlossiness;"):R.push("float glossiness = 1.0;"),n.metallic!==void 0?R.push("float metallic = materialMetallic;"):R.push("float metallic = 1.0;"),n.roughness!==void 0?R.push("float roughness = materialRoughness;"):R.push("float roughness = 1.0;"),n.specularF0!==void 0?R.push("float specularF0 = materialSpecularF0;"):R.push("float specularF0 = 1.0;"),c&&(u&&t._normalMap||t._ambientMap||t._baseColorMap||t._diffuseMap||t._occlusionMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._alphaMap)&&(R.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),R.push("vec2 textureCoord;")),c&&t._ambientMap&&(t._ambientMap._state.matrix?R.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),R.push("ambientTexel = "+Aa[t._ambientMap._state.encoding]+"(ambientTexel);"),R.push("ambientColor *= ambientTexel.rgb;")),c&&t._diffuseMap&&(t._diffuseMap._state.matrix?R.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),R.push("diffuseTexel = "+Aa[t._diffuseMap._state.encoding]+"(diffuseTexel);"),R.push("diffuseColor *= diffuseTexel.rgb;"),R.push("alpha *= diffuseTexel.a;")),c&&t._baseColorMap&&(t._baseColorMap._state.matrix?R.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),R.push("baseColorTexel = "+Aa[t._baseColorMap._state.encoding]+"(baseColorTexel);"),R.push("diffuseColor *= baseColorTexel.rgb;"),R.push("alpha *= baseColorTexel.a;")),c&&t._emissiveMap&&(t._emissiveMap._state.matrix?R.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),R.push("emissiveTexel = "+Aa[t._emissiveMap._state.encoding]+"(emissiveTexel);"),R.push("emissiveColor = emissiveTexel.rgb;")),c&&t._alphaMap&&(t._alphaMap._state.matrix?R.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("alpha *= texture(alphaMap, textureCoord).r;")),c&&t._occlusionMap&&(t._occlusionMap._state.matrix?R.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("occlusion *= texture(occlusionMap, textureCoord).r;")),u&&(s.lights.length>0||s.lightMaps.length>0||s.reflectionMaps.length>0)){c&&t._normalMap?(t._normalMap._state.matrix?R.push("textureCoord = (normalMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):R.push("vec3 viewNormal = normalize(vViewNormal);"),c&&t._specularMap&&(t._specularMap._state.matrix?R.push("textureCoord = (specularMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("specular *= texture(specularMap, textureCoord).rgb;")),c&&t._glossinessMap&&(t._glossinessMap._state.matrix?R.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("glossiness *= texture(glossinessMap, textureCoord).r;")),c&&t._specularGlossinessMap&&(t._specularGlossinessMap._state.matrix?R.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),R.push("specular *= specGlossRGB.rgb;"),R.push("glossiness *= specGlossRGB.a;")),c&&t._metallicMap&&(t._metallicMap._state.matrix?R.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("metallic *= texture(metallicMap, textureCoord).r;")),c&&t._roughnessMap&&(t._roughnessMap._state.matrix?R.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("roughness *= texture(roughnessMap, textureCoord).r;")),c&&t._metallicRoughnessMap&&(t._metallicRoughnessMap._state.matrix?R.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):R.push("textureCoord = texturePos.xy;"),R.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),R.push("metallic *= metalRoughRGB.b;"),R.push("roughness *= metalRoughRGB.g;")),R.push("vec3 viewEyeDir = normalize(-vViewPosition);"),t._diffuseFresnel&&(R.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),R.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),t._specularFresnel&&(R.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),R.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),t._alphaFresnel&&(R.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),R.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),t._emissiveFresnel&&(R.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),R.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),R.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),R.push(" discard;"),R.push("}"),R.push("IncidentLight light;"),R.push("Material material;"),R.push("Geometry geometry;"),R.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),R.push("vec3 viewLightDir;"),C&&(R.push("material.diffuseColor = diffuseColor;"),R.push("material.specularColor = specular;"),R.push("material.shine = materialShininess;")),D&&(R.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),R.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),R.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),R.push("material.specularColor = specular;")),k&&(R.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),R.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),R.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),R.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),R.push("geometry.position = vViewPosition;"),s.lightMaps.length>0&&R.push("geometry.worldNormal = normalize(vWorldNormal);"),R.push("geometry.viewNormal = viewNormal;"),R.push("geometry.viewEyeDir = viewEyeDir;"),C&&(s.lightMaps.length>0||s.reflectionMaps.length>0)&&R.push("computePhongLightMapping(geometry, material, reflectedLight);"),(D||k)&&(s.lightMaps.length>0||s.reflectionMaps.length>0)&&R.push("computePBRLightMapping(geometry, material, reflectedLight);"),R.push("float shadow = 1.0;"),R.push("float shadowAcneRemover = 0.007;"),R.push("vec3 fragmentDepth;"),R.push("float texelSize = 1.0 / 1024.0;"),R.push("float amountInLight = 0.0;"),R.push("vec3 shadowCoord;"),R.push("vec4 rgbaDepth;"),R.push("float depth;");for(var pe=0,xe=s.lights.length;pe<xe;pe++){var Se=s.lights[pe];Se.type!=="ambient"&&(Se.type==="dir"&&Se.space==="view"?R.push("viewLightDir = -normalize(lightDir"+pe+");"):Se.type==="point"&&Se.space==="view"?R.push("viewLightDir = normalize(lightPos"+pe+" - vViewPosition);"):R.push("viewLightDir = normalize(vViewLightReverseDirAndDist"+pe+".xyz);"),Q&&Se.castsShadow?(R.push("shadow = 0.0;"),R.push("fragmentDepth = vShadowPosFromLight"+pe+".xyz;"),R.push("fragmentDepth.z -= shadowAcneRemover;"),R.push("for (int x = -3; x <= 3; x++) {"),R.push(" for (int y = -3; y <= 3; y++) {"),R.push(" float texelDepth = unpackDepth(texture(shadowMap"+pe+", fragmentDepth.xy + vec2(x, y) * texelSize));"),R.push(" if (fragmentDepth.z < texelDepth) {"),R.push(" shadow += 1.0;"),R.push(" }"),R.push(" }"),R.push("}"),R.push("shadow = shadow / 9.0;"),R.push("light.color = lightColor"+pe+".rgb * (lightColor"+pe+".a * shadow);")):R.push("light.color = lightColor"+pe+".rgb * (lightColor"+pe+".a );"),R.push("light.direction = viewLightDir;"),C&&R.push("computePhongLighting(light, geometry, material, reflectedLight);"),(D||k)&&R.push("computePBRLighting(light, geometry, material, reflectedLight);"))}C?R.push("vec3 outgoingLight = (lightAmbient.rgb * lightAmbient.a * diffuseColor) + ((occlusion * (( reflectedLight.diffuse + reflectedLight.specular)))) + emissiveColor;"):R.push("vec3 outgoingLight = (occlusion * (reflectedLight.diffuse)) + (occlusion * reflectedLight.specular) + emissiveColor;")}else R.push("ambientColor *= (lightAmbient.rgb * lightAmbient.a);"),R.push("vec3 outgoingLight = emissiveColor + ambientColor;");return R.push("vec4 fragColor = vec4(outgoingLight, alpha) * colorize;"),X&&R.push("fragColor = linearToGamma(fragColor, gammaFactor);"),R.push("outColor = fragColor;"),i.logarithmicDepthBufferEnabled&&R.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),R.push("}"),R}var Cb=function(){function o(i,t,e){if(ee(this,o),this.allocated=!1,this.compiled=!1,this.handle=i.createShader(t),!this.handle){this.errors=["Failed to allocate"];return}if(this.allocated=!0,i.shaderSource(this.handle,e),i.compileShader(this.handle),this.compiled=i.getShaderParameter(this.handle,i.COMPILE_STATUS),!this.compiled&&!i.isContextLost()){for(var r=e.split(`
|