k||j
k?k:P,w&&n(st,j)),j},E=(L,w=!0)=>{var k;const P=l.currentValue,M=x(L);w?P!==M&&(l.userInput=null,n(st,M),n(an,M,P),r.validateEvent&&((k=s==null?void 0:s.validate)==null||k.call(s,"change").catch(V=>{})),l.currentValue=M):n(st,M)},O=L=>{l.userInput=L;const w=L===""?null:Number(L);n(Er,w),E(w,!1)},T=L=>{const w=L!==""?Number(L):"";(vt(w)&&!Number.isNaN(w)||L==="")&&E(w),l.userInput=null},C=L=>{n("focus",L)},I=L=>{var w;n("blur",L),r.validateEvent&&((w=s==null?void 0:s.validate)==null||w.call(s,"blur").catch(k=>{}))};return Ee(()=>r.modelValue,L=>{const w=x(l.userInput),k=x(L,!0);vt(w)||w&&w===k||(l.currentValue=k,l.userInput=null)},{immediate:!0}),lt(()=>{var L;const{min:w,max:k,modelValue:P}=r,M=(L=i.value)==null?void 0:L.input;if(M.setAttribute("role","spinbutton"),Number.isFinite(k)?M.setAttribute("aria-valuemax",String(k)):M.removeAttribute("aria-valuemax"),Number.isFinite(w)?M.setAttribute("aria-valuemin",String(w)):M.removeAttribute("aria-valuemin"),M.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),M.setAttribute("aria-disabled",String(v.value)),!vt(P)&&P!=null){let V=Number(P);Number.isNaN(V)&&(V=null),n(st,V)}}),Wr(()=>{var L,w;const k=(L=i.value)==null?void 0:L.input;k==null||k.setAttribute("aria-valuenow",`${(w=l.currentValue)!=null?w:""}`)}),t({focus:()=>{var L,w;(w=(L=i.value)==null?void 0:L.focus)==null||w.call(L)},blur:()=>{var L,w;(w=(L=i.value)==null?void 0:L.blur)==null||w.call(L)}}),(L,w)=>(F(),Z("div",{class:z([h(a).b(),h(a).m(h(p)),h(a).is("disabled",h(v)),h(a).is("without-controls",!L.controls),h(a).is("controls-right",h(f))]),onDragstart:w[1]||(w[1]=Qe(()=>{},["prevent"]))},[L.controls?tt((F(),Z("span",{key:0,role:"button","aria-label":h(o)("el.inputNumber.decrease"),class:z([h(a).e("decrease"),h(a).is("disabled",h(c))]),onKeydown:kt(A,["enter"])},[ee(h(je),null,{default:pe(()=>[h(f)?(F(),_e(h(Ti),{key:0})):(F(),_e(h(O7),{key:1}))]),_:1})],42,QE)),[[h(zu),A]]):be("v-if",!0),L.controls?tt((F(),Z("span",{key:1,role:"button","aria-label":h(o)("el.inputNumber.increase"),class:z([h(a).e("increase"),h(a).is("disabled",h(u))]),onKeydown:kt(b,["enter"])},[ee(h(je),null,{default:pe(()=>[h(f)?(F(),_e(h(zd),{key:0})):(F(),_e(h(jm),{key:1}))]),_:1})],42,ex)),[[h(zu),b]]):be("v-if",!0),ee(h(Pn),{id:L.id,ref_key:"input",ref:i,type:"number",step:L.step,"model-value":h(m),placeholder:L.placeholder,readonly:L.readonly,disabled:h(v),size:h(p),max:L.max,min:L.min,name:L.name,label:L.label,"validate-event":!1,onWheel:w[0]||(w[0]=Qe(()=>{},["prevent"])),onKeydown:[kt(Qe(b,["prevent"]),["up"]),kt(Qe(A,["prevent"]),["down"])],onBlur:I,onFocus:C,onInput:O,onChange:T},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","label","onKeydown"])],34))}});let k3;Md=Bt(Be(nx,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]])),k3=Symbol("ElSelectGroup"),gc=Symbol("ElSelect");const S$=ie({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Me("select"),n=fo(),r=N(()=>[t.be("dropdown","item"),t.is("disabled",h(l)),{selected:h(i),hover:h(d)}]),o=Ot({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:a,itemSelected:i,isDisabled:l,select:s,hoverItem:c}=function(p,v){const m=ze(gc),g=ze(k3,{disabled:!1}),_=N(()=>ct(p.value)),y=N(()=>m.props.multiple?T(m.props.modelValue,p.value):C(p.value,m.props.modelValue)),b=N(()=>{if(m.props.multiple){const L=m.props.modelValue||[];return!y.value&&L.length>=m.props.multipleLimit&&m.props.multipleLimit>0}return!1}),A=N(()=>p.label||(_.value?"":p.value)),x=N(()=>p.value||p.label||""),E=N(()=>p.disabled||v.groupDisabled||b.value),O=et(),T=(L=[],w)=>{if(_.value){const k=m.props.valueKey;return L&&L.some(P=>gt(Bn(P,k))===Bn(w,k))}return L&&L.includes(w)},C=(L,w)=>{if(_.value){const{valueKey:k}=m.props;return Bn(L,k)===Bn(w,k)}return L===w};Ee(()=>A.value,()=>{p.created||m.props.remote||m.setSelected()}),Ee(()=>p.value,(L,w)=>{const{remote:k,valueKey:P}=m.props;if(Object.is(L,w)||(m.onOptionDestroy(w,O.proxy),m.onOptionCreate(O.proxy)),!p.created&&!k){if(P&&ct(L)&&ct(w)&&L[P]===w[P])return;m.setSelected()}}),Ee(()=>g.disabled,()=>{v.groupDisabled=g.disabled},{immediate:!0});const{queryChange:I}=gt(m);return Ee(I,L=>{const{query:w}=h(L),k=new RegExp(b6(w),"i");v.visible=k.test(A.value)||p.created,v.visible||m.filteredOptionsCount--},{immediate:!0}),{select:m,currentLabel:A,currentValue:x,itemSelected:y,isDisabled:E,hoverItem:()=>{p.disabled||g.disabled||(m.hoverIndex=m.optionsArray.indexOf(O.proxy))}}}(e,o),{visible:u,hover:d}=hn(o),f=et().proxy;return s.onOptionCreate(f),nn(()=>{const p=f.value,{selected:v}=s,m=(s.props.multiple?v:[v]).some(g=>g.value===f.value);Ne(()=>{s.cachedOptions.get(p)!==f||m||s.cachedOptions.delete(p)}),s.onOptionDestroy(p,f)}),{ns:t,id:n,containerKls:r,currentLabel:a,itemSelected:i,isDisabled:l,select:s,hoverItem:c,visible:u,hover:d,selectOptionClick:function(){e.disabled!==!0&&o.groupDisabled!==!0&&s.handleOptionSelect(f)},states:o}}}),C$=["id","aria-disabled","aria-selected"];var O3=Be(S$,[["render",function(e,t,n,r,o,a){return tt((F(),Z("li",{id:e.id,class:z(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...i)=>e.hoverItem&&e.hoverItem(...i)),onClick:t[1]||(t[1]=Qe((...i)=>e.selectOptionClick&&e.selectOptionClick(...i),["stop"]))},[Ve(e.$slots,"default",{},()=>[ne("span",null,Pe(e.currentLabel),1)])],42,C$)),[[xt,e.visible]])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const k$=ie({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ze(gc),t=Me("select"),n=N(()=>e.props.popperClass),r=N(()=>e.props.multiple),o=N(()=>e.props.fitInputWidth),a=U("");function i(){var l;a.value=`${(l=e.selectWrapper)==null?void 0:l.offsetWidth}px`}return lt(()=>{i(),Kr(e.selectWrapper,i)}),{ns:t,minWidth:a,popperClass:n,isMultiple:r,isFitInputWidth:o}}});var O$=Be(k$,[["render",function(e,t,n,r,o,a){return F(),Z("div",{class:z([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:We({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[Ve(e.$slots,"default")],6)}],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);const T$=(e,t,n)=>{const{t:r}=Ht(),o=Me("select");Vi({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},N(()=>e.suffixTransition===!1));const a=U(null),i=U(null),l=U(null),s=U(null),c=U(null),u=U(null),d=U(null),f=U(null),p=U(),v=cn({query:""}),m=cn(""),g=U([]);let _=0;const{form:y,formItem:b}=tr(),A=N(()=>!e.filterable||e.multiple||!t.visible),x=N(()=>e.disabled||(y==null?void 0:y.disabled)),E=N(()=>{const W=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!=="";return e.clearable&&!x.value&&t.inputHovering&&W}),O=N(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),T=N(()=>o.is("reverse",O.value&&t.visible&&e.suffixTransition)),C=N(()=>(y==null?void 0:y.statusIcon)&&(b==null?void 0:b.validateState)&&Zf[b==null?void 0:b.validateState]),I=N(()=>e.remote?300:0),L=N(()=>e.loading?e.loadingText||r("el.select.loading"):(!e.remote||t.query!==""||t.options.size!==0)&&(e.filterable&&t.query&&t.options.size>0&&t.filteredOptionsCount===0?e.noMatchText||r("el.select.noMatch"):t.options.size===0?e.noDataText||r("el.select.noData"):null)),w=N(()=>{const W=Array.from(t.options.values()),ae=[];return g.value.forEach(xe=>{const te=W.findIndex(ue=>ue.currentLabel===xe);te>-1&&ae.push(W[te])}),ae.length>=W.length?ae:W}),k=N(()=>Array.from(t.cachedOptions.values())),P=N(()=>{const W=w.value.filter(ae=>!ae.created).some(ae=>ae.currentLabel===t.query);return e.filterable&&e.allowCreate&&t.query!==""&&!W}),M=On(),V=N(()=>["small"].includes(M.value)?"small":"default"),S=N({get:()=>t.visible&&L.value!==!1,set(W){t.visible=W}});Ee([()=>x.value,()=>M.value,()=>y==null?void 0:y.size],()=>{Ne(()=>{R()})}),Ee(()=>e.placeholder,W=>{t.cachedPlaceHolder=t.currentPlaceholder=W,e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(t.currentPlaceholder="")}),Ee(()=>e.modelValue,(W,ae)=>{e.multiple&&(R(),W&&W.length>0||i.value&&t.query!==""?t.currentPlaceholder="":t.currentPlaceholder=t.cachedPlaceHolder,e.filterable&&!e.reserveKeyword&&(t.query="",j(t.query))),G(),e.filterable&&!e.multiple&&(t.inputLength=20),!ho(W,ae)&&e.validateEvent&&(b==null||b.validate("change").catch(xe=>{}))},{flush:"post",deep:!0}),Ee(()=>t.visible,W=>{var ae,xe,te,ue,q;W?((xe=(ae=s.value)==null?void 0:ae.updatePopper)==null||xe.call(ae),e.filterable&&(t.filteredOptionsCount=t.optionsCount,t.query=e.remote?"":t.selectedLabel,(ue=(te=l.value)==null?void 0:te.focus)==null||ue.call(te),e.multiple?(q=i.value)==null||q.focus():t.selectedLabel&&(t.currentPlaceholder=`${t.selectedLabel}`,t.selectedLabel=""),j(t.query),e.multiple||e.remote||(v.value.query="",is(v),is(m)))):(e.filterable&&(qe(e.filterMethod)&&e.filterMethod(""),qe(e.remoteMethod)&&e.remoteMethod("")),t.query="",t.previousQuery=null,t.selectedLabel="",t.inputLength=20,t.menuVisibleOnFocus=!1,J(),Ne(()=>{i.value&&i.value.value===""&&t.selected.length===0&&(t.currentPlaceholder=t.cachedPlaceHolder)}),e.multiple||(t.selected&&(e.filterable&&e.allowCreate&&t.createdSelected&&t.createdLabel?t.selectedLabel=t.createdLabel:t.selectedLabel=t.selected.currentLabel,e.filterable&&(t.query=t.selectedLabel)),e.filterable&&(t.currentPlaceholder=t.cachedPlaceHolder))),n.emit("visible-change",W)}),Ee(()=>t.options.entries(),()=>{var W,ae,xe;if(!Et)return;(ae=(W=s.value)==null?void 0:W.updatePopper)==null||ae.call(W),e.multiple&&R();const te=((xe=d.value)==null?void 0:xe.querySelectorAll("input"))||[];(e.filterable||e.defaultFirstOption||Dn(e.modelValue))&&Array.from(te).includes(document.activeElement)||G(),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&$()},{flush:"post"}),Ee(()=>t.hoverIndex,W=>{vt(W)&&W>-1?p.value=w.value[W]||{}:p.value={},w.value.forEach(ae=>{ae.hover=p.value===ae})});const R=()=>{Ne(()=>{var W,ae;if(!a.value)return;const xe=a.value.$el.querySelector("input");_=_||(xe.clientHeight>0?xe.clientHeight+2:0);const te=u.value,ue=getComputedStyle(xe).getPropertyValue(o.cssVarName("input-height")),q=Number.parseFloat(ue)||(Oe=>I7[Oe||"default"])(M.value||(y==null?void 0:y.size)),ke=M.value||q===_||_<=0?q:_;xe.offsetParent!==null&&(xe.style.height=(t.selected.length===0?ke:Math.max(te?te.clientHeight+(te.clientHeight>ke?6:0):0,ke))-2+"px"),t.visible&&L.value!==!1&&((ae=(W=s.value)==null?void 0:W.updatePopper)==null||ae.call(W))})},j=async W=>{t.previousQuery===W||t.isOnComposition||(t.previousQuery!==null||!qe(e.filterMethod)&&!qe(e.remoteMethod)?(t.previousQuery=W,Ne(()=>{var ae,xe;t.visible&&((xe=(ae=s.value)==null?void 0:ae.updatePopper)==null||xe.call(ae))}),t.hoverIndex=-1,e.multiple&&e.filterable&&Ne(()=>{if(!x.value){const ae=15*i.value.value.length+20;t.inputLength=e.collapseTags?Math.min(50,ae):ae,H()}R()}),e.remote&&qe(e.remoteMethod)?(t.hoverIndex=-1,e.remoteMethod(W)):qe(e.filterMethod)?(e.filterMethod(W),is(m)):(t.filteredOptionsCount=t.optionsCount,v.value.query=W,is(v),is(m)),e.defaultFirstOption&&(e.filterable||e.remote)&&t.filteredOptionsCount&&(await Ne(),$())):t.previousQuery=W)},H=()=>{t.currentPlaceholder!==""&&(t.currentPlaceholder=i.value.value?"":t.cachedPlaceHolder)},$=()=>{const W=w.value.filter(te=>te.visible&&!te.disabled&&!te.states.groupDisabled),ae=W.find(te=>te.created),xe=W[0];t.hoverIndex=we(w.value,ae||xe)},G=()=>{var W;if(!e.multiple){const xe=B(e.modelValue);return(W=xe.props)!=null&&W.created?(t.createdLabel=xe.props.value,t.createdSelected=!0):t.createdSelected=!1,t.selectedLabel=xe.currentLabel,t.selected=xe,void(e.filterable&&(t.query=t.selectedLabel))}t.selectedLabel="";const ae=[];Array.isArray(e.modelValue)&&e.modelValue.forEach(xe=>{ae.push(B(xe))}),t.selected=ae,Ne(()=>{R()})},B=W=>{let ae;const xe=Bc(W).toLowerCase()==="object",te=Bc(W).toLowerCase()==="null",ue=Bc(W).toLowerCase()==="undefined";for(let ke=t.cachedOptions.size-1;ke>=0;ke--){const Oe=k.value[ke];if(xe?Bn(Oe.value,e.valueKey)===Bn(W,e.valueKey):Oe.value===W){ae={value:W,currentLabel:Oe.currentLabel,isDisabled:Oe.isDisabled};break}}if(ae)return ae;const q={value:W,currentLabel:xe?W.label:te||ue?"":W};return e.multiple&&(q.hitState=!1),q},J=()=>{setTimeout(()=>{const W=e.valueKey;e.multiple?t.selected.length>0?t.hoverIndex=Math.min.apply(null,t.selected.map(ae=>w.value.findIndex(xe=>Bn(xe,W)===Bn(ae,W)))):t.hoverIndex=-1:t.hoverIndex=w.value.findIndex(ae=>Ce(ae)===Ce(t.selected))},300)},Y=()=>{var W;t.inputWidth=(W=a.value)==null?void 0:W.$el.offsetWidth},oe=Dr(()=>{e.filterable&&t.query!==t.selectedLabel&&(t.query=t.selectedLabel,j(t.query))},I.value),he=Dr(W=>{j(W.target.value)},I.value),se=W=>{ho(e.modelValue,W)||n.emit(an,W)},Ae=W=>function(ae,xe,te){var ue=ae==null?0:ae.length;if(!ue)return-1;var q=ue-1;return te!==void 0&&(q=S6(te),q=te<0?sN(ue+q,0):cN(q,ue-1)),y9(ae,l2(xe),q,!0)}(W,ae=>!t.disabledOptions.has(ae)),K=(W,ae)=>{const xe=t.selected.indexOf(ae);if(xe>-1&&!x.value){const te=e.modelValue.slice();te.splice(xe,1),n.emit(st,te),se(te),n.emit("remove-tag",ae.value)}W.stopPropagation(),de()},Q=W=>{W.stopPropagation();const ae=e.multiple?[]:"";if(!Je(ae))for(const xe of t.selected)xe.isDisabled&&ae.push(xe.value);n.emit(st,ae),se(ae),t.hoverIndex=-1,t.visible=!1,n.emit("clear"),de()},fe=W=>{var ae;if(e.multiple){const xe=(e.modelValue||[]).slice(),te=we(xe,W.value);te>-1?xe.splice(te,1):(e.multipleLimit<=0||xe.length {s(),Wu(this)},{checked:t!==!1});s()}const a=this.parent;a&&a.level!==0&&(r||Wu(a))}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let o="children";return r&&(o=r.children||"children"),n[o]===void 0&&(n[o]=null),t&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(a=>a.data),r={},o=[];t.forEach((a,i)=>{const l=a[Ol];l&&n.findIndex(s=>s[Ol]===l)>=0?r[l]={index:i,data:a}:o.push({index:i,data:a})}),this.store.lazy||n.forEach(a=>{r[a[Ol]]||this.removeChildByData(a)}),o.forEach(({index:a,data:i})=>{this.insertChild({data:i},a)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy!==!0||!this.store.load||this.loaded||this.loading&&!Object.keys(n).length)t&&t.call(this);else{this.loading=!0;const r=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)};this.store.load(this,r)}}}class Qj{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const n in t)ft(t,n)&&(this[n]=t[n]);this.nodesMap={}}initialize(){this.root=new Tl({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load?(0,this.load)(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()}):this._initDefaultCheckedNodes()}filter(t){const n=this.filterNodeMethod,r=this.lazy,o=function(a){const i=a.root?a.root.childNodes:a.childNodes;if(i.forEach(l=>{l.visible=n.call(l,t,l.data,l),o(l)}),!a.visible&&i.length){let l=!0;l=!i.some(s=>s.visible),a.root?a.root.visible=l===!1:a.visible=l===!1}t&&(!a.visible||a.isLeaf||r||a.expand())};o(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof Tl)return t;const n=ct(t)?v0(this.key,t):t;return this.nodesMap[n]||null}insertBefore(t,n){const r=this.getNode(n);r.parent.insertBefore({data:t},r)}insertAfter(t,n){const r=this.getNode(n);r.parent.insertAfter({data:t},r)}remove(t){const n=this.getNode(t);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(t,n){const r=n?this.getNode(n):this.root;r&&r.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],n=this.nodesMap;t.forEach(r=>{const o=n[r];o&&o.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 n=this.key;t&&t.data&&(n?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){this.key&&t&&t.data&&(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,n=!1){const r=[],o=function(a){(a.root?a.root.childNodes:a.childNodes).forEach(i=>{(i.checked||n&&i.indeterminate)&&(!t||t&&i.isLeaf)&&r.push(i.data),o(i)})};return o(this),r}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const t=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(o=>{o.indeterminate&&t.push(o.data),n(o)})};return n(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],n=this.nodesMap;for(const r in n)ft(n,r)&&t.push(n[r]);return t}updateChildren(t,n){const r=this.nodesMap[t];if(!r)return;const o=r.childNodes;for(let a=o.length-1;a>=0;a--){const i=o[a];this.remove(i.data)}for(let a=0,i=n.length;as.level-l.level),a=Object.create(null),i=Object.keys(r);o.forEach(l=>l.setChecked(!1,!1));for(let l=0,s=o.length;l -1&&_.splice(y,1)}else g.subForm()};return lt(function(){f.mounted()}),nn(function(){m(),d.destroyed=!0,f.unmount()}),Wr(function(){f.updated()}),Ee(c,function(g){g?function(){if(a){var _,y=_C(o,a);y&&(v?(_=ro(y.getSubForm())).push(p):_=p,y.subForm(_))}}():m()},{immediate:!0}),Ee(function(){return Vt(l.value)},function(g){f.$handle.isBreakWatch()||g.length===d.renderRule.length&&g.every(function(_){return d.renderRule.indexOf(_)>-1})||(f.$handle.reloadRule(l.value),o.setupState.renderRule())}),Ee(function(){return r.option},function(){f.initOptions(),p.refresh()},{deep:!0}),Ee(s,function(g){JSON.stringify(g||{})!==d.updateValue&&(p.config.forceCoverValue?p.coverValue(g||{}):p.setValue(g||{}))},{deep:!0}),Ee(function(){return r.disabled},function(g){p.disabled(!!g)}),ot(ot({fc:rr(f),parent:a&&rr(a),fapi:rr(p)},hn(d)),{},{refresh:function(){++d.unique},renderRule:function(){d.renderRule=Vt(l.value||[])},updateValue:function(g){d.destroyed||(d.updateValue=JSON.stringify(g),o.emit("update:modelValue",g))}})},created:function(){var r=et();r.setupState.fc.init(),r.emit("update:api",r.setupState.fapi),r.props.disabled&&r.setupState.fapi.disabled(!0)}})}var bC=["props"],AC=["class","style","directives"],wC=["on"],fi=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=[].concat(bC,Vt(r.normal||[])),a=[].concat(AC,Vt(r.array||[])),i=[].concat(wC,Vt(r.functional||[])),l=r.props||[];return t.reduce(function(s,c){for(var u in c)if(s[u])if(l.indexOf(u)>-1)s[u]=e([c[u]],s[u]);else if(o.indexOf(u)>-1)s[u]=ot(ot({},s[u]),c[u]);else if(a.indexOf(u)>-1){var d=s[u]instanceof Array?s[u]:[s[u]],f=c[u]instanceof Array?c[u]:[c[u]];s[u]=[].concat(Vt(d),Vt(f))}else if(i.indexOf(u)>-1)for(var p in c[u])if(s[u][p]){var v=s[u][p]instanceof Array?s[u][p]:[s[u][p]],m=c[u][p]instanceof Array?c[u][p]:[c[u][p]];s[u][p]=[].concat(Vt(v),Vt(m))}else s[u][p]=c[u][p];else if(u==="hook")for(var g in c[u])s[u][g]?s[u][g]=LU(s[u][g],c[u][g]):s[u][g]=c[u][g];else s[u]=c[u];else o.indexOf(u)>-1||i.indexOf(u)>-1||l.indexOf(u)>-1?s[u]=ot({},c[u]):a.indexOf(u)>-1?s[u]=c[u]instanceof Array?Vt(c[u]):Ur(c[u])==="object"?ot({},c[u]):c[u]:s[u]=c[u];return s},n)},LU=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Z3=["type","slot","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],T0=["validate","children","control"],D0=["effect"];function EC(){return[].concat(Z3,Vt(bC),Vt(AC),Vt(wC),T0,D0)}function xC(e,t,n){return"[form-create ".concat(e,"]: ").concat(t)+(n?`
rule: `+JSON.stringify(n.getRule?n.getRule():n):"")}function Q3(e,t){console.error(xC("err",e,t))}function L0(e){var t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}var e4="[[FORM-CREATE-PREFIX-",t4="-FORM-CREATE-SUFFIX]]",SC="$FN:",CC="$FNX:",kC="$GLOBAL:",Zu="function";function OC(e,t){return JSON.stringify(Ju([],e,!0),function(n,r){if(!r||r._isVue!==!0){if(Ur(r)!==Zu)return r;if(r.__json)return r.__json;if(r.__origin&&(r=r.__origin),!r.__emit)return e4+r+t4}},t)}function TC(e){return new Function("return "+e)()}function hi(e,t){if(e&&Ue.String(e)&&e.length>4){var n=e.trim(),r=!1;try{if(n.indexOf(t4)>0&&n.indexOf(e4)===0)n=n.replace(t4,"").replace(e4,""),r=!0;else if(n.indexOf(SC)===0)n=n.replace(SC,""),r=!0;else{if(n.indexOf(kC)===0){var o=n.replace(kC,"");return n=function(){for(var i=arguments.length,l=new Array(i),s=0;s3&&arguments[3]!==void 0?arguments[3]:{});return t&&(Ue.Function(t)?t(a):a.props(t)),a}}function o4(e,t,n,r,o){this._data=ut({props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0},{type:e,title:t,field:n,value:r,props:o||{}}),this.event=this.on}function VC(e){e.forEach(function(t){o4.prototype[t]=function(n){return mi(this._data,Mn({},t,arguments.length<2?n:Mn({},n,arguments[1]))),this}})}ut(o4.prototype,{getRule:function(){return this._data},setProp:function(e,t){return oo(this._data,e,t),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=n4(this._data),e}}),VC(EC());var RU=Xn("");function MU(e,t,n){var r=RU("",t);return r._data.type=e,r._data.title=n,r}function PC(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function NC(e){if(typeof XMLHttpRequest<"u"){var t,n=new XMLHttpRequest,r=e.action;n.onerror=function(a){e.onError(a)},n.onload=function(){if(n.status<200||n.status>=300)return e.onError(function(a,i,l){var s="fail to ".concat(a," ").concat(l.status,"'"),c=new Error(s);return c.status=l.status,c.url=a,c}(r,0,n),PC(n));e.onSuccess(PC(n))},n.open(e.method||"get",r,!0),e.data&&((e.dataType||"").toLowerCase()!=="json"?(t=new FormData,Object.keys(e.data).map(function(a){t.append(a,e.data[a])})):(t=JSON.stringify(e.data),n.setRequestHeader("content-type","application/json"))),e.withCredentials&&"withCredentials"in n&&(n.withCredentials=!0);var o=e.headers||{};Object.keys(o).forEach(function(a){o[a]!==null&&n.setRequestHeader(a,o[a])}),n.send(t)}}function I0(e){return pi(e)}function VU(e){function t(a){return Ue.Undef(a)?a=e.fields():Array.isArray(a)||(a=[a]),a}function n(a,i,l){t(a).forEach(function(s){e.getCtxs(s).forEach(function(c){oo(c.rule,i,l),e.$render.clearCache(c)})})}function r(){var a=e.subForm;return Object.keys(a).reduce(function(i,l){var s=a[l];return s&&(Array.isArray(s)?i.push.apply(i,Vt(s)):i.push(s)),i},[])}var o={get config(){return e.options},set config(a){e.fc.options.value=a},get options(){return e.options},set options(a){e.fc.options.value=a},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return o.parent?o.parent.top:o},get children(){return r()},formData:function(a){return t(a).reduce(function(i,l){var s=e.getFieldCtx(l);return s&&(i[s.field]=I0(s.rule.value)),i},{})},getValue:function(a){var i=e.getFieldCtx(a);if(i)return I0(i.rule.value)},coverValue:function(a){var i=ot({},a||{});e.deferSyncValue(function(){o.fields().forEach(function(l){var s=e.fieldCtx[l];if(s){var c=Hn(a,l);s.forEach(function(u){u.rule.value=c?a[l]:void 0}),delete i[l]}}),ut(e.appendData,i)})},setValue:function(a){var i=a;arguments.length>=2&&(i=Mn({},a,arguments[1])),e.deferSyncValue(function(){Object.keys(i).forEach(function(l){var s=e.fieldCtx[l];if(!s)return e.appendData[l]=i[l];s.forEach(function(c){c.rule.value=i[l]})})})},removeField:function(a){var i=e.getCtx(a);return e.deferSyncValue(function(){e.getCtxs(a).forEach(function(l){l.rm()})},!0),i?i.origin:void 0},removeRule:function(a){var i=a&&Qu(a);if(i)return i.rm(),i.origin},fields:function(){return e.fields()},append:function(a,i,l){var s,c=e.sort.length-1,u=e.getCtx(i);if(u)if(l){if(s=u.getPending("children",u.rule.children),!Array.isArray(s))return;c=u.rule.children.length-1}else c=u.root.indexOf(u.origin),s=u.root;else s=e.rules;s.splice(c+1,0,a)},prepend:function(a,i,l){var s,c=0,u=e.getCtx(i);if(u)if(l){if(s=u.getPending("children",u.rule.children),!Array.isArray(s))return}else c=u.root.indexOf(u.origin),s=u.root;else s=e.rules;s.splice(c,0,a)},hidden:function(a,i){n(i,"hidden",!!a),e.refresh()},hiddenStatus:function(a){var i=e.getCtx(a);if(i)return!!i.rule.hidden},display:function(a,i){n(i,"display",!!a),e.refresh()},displayStatus:function(a){var i=e.getCtx(a);if(i)return!!i.rule.display},disabled:function(a,i){t(i).forEach(function(l){e.getCtxs(l).forEach(function(s){oo(s.rule.props,"disabled",!!a)})}),e.refresh()},all:function(a){return Object.keys(e.ctxs).map(function(i){var l=e.ctxs[i];return a?l.origin:l.rule})},model:function(a){return e.fields().reduce(function(i,l){var s=e.fieldCtx[l][0];return i[l]=a?s.origin:s.rule,i},{})},component:function(a){return Object.keys(e.nameCtx).reduce(function(i,l){var s=e.nameCtx[l].map(function(c){return a?c.origin:c.rule});return i[l]=s.length===1?s[0]:s,i},{})},bind:function(){return o.form},reload:function(a){e.reloadRule(a)},updateOptions:function(a){e.fc.updateOptions(a),o.refresh()},onSubmit:function(a){o.updateOptions({onSubmit:a})},sync:function(a){if(Array.isArray(a))a.forEach(function(l){return o.sync(l)});else{var i=Ue.Object(a)?Qu(a):e.getCtxs(a);i&&((i=Array.isArray(i)?i:[i]).forEach(function(l){if(!l.deleted){var s=e.subForm[l.id];s&&(Array.isArray(s)?s.forEach(function(c){c.refresh()}):s&&s.refresh()),e.$render.clearCache(l)}}),e.refresh())}},refresh:function(){r().forEach(function(a){a.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions:function(){e.$manager.updateOptions(e.options),o.refresh()},hideForm:function(a){e.vm.setupState.isShow=!a},changeStatus:function(){return e.changeStatus},clearChangeStatus:function(){e.changeStatus=!1},updateRule:function(a,i){e.getCtxs(a).forEach(function(l){ut(l.rule,i)})},updateRules:function(a){Object.keys(a).forEach(function(i){o.updateRule(i,a[i])})},mergeRule:function(a,i){e.getCtxs(a).forEach(function(l){mi(l.rule,i)})},mergeRules:function(a){Object.keys(a).forEach(function(i){o.mergeRule(i,a[i])})},getRule:function(a,i){var l=e.getCtx(a);if(l)return i?l.origin:l.rule},setEffect:function(a,i,l){var s=e.getCtx(a);s&&i&&(i[0]==="$"&&(i=i.substr(1)),Hn(s.rule,"$"+i)&&oo(s.rule,"$"+i,l),Hn(s.rule,"effect")||(s.rule.effect={}),oo(s.rule.effect,i,l))},clearEffectData:function(a,i){var l=e.getCtx(a);l&&(i&&i[0]==="$"&&(i=i.substr(1)),l.clearEffectData(i),o.sync(a))},updateValidate:function(a,i,l){l?o.mergeRule(a,{validate:i}):n(a,"validate",i)},updateValidates:function(a,i){Object.keys(a).forEach(function(l){o.updateValidate(l,a[l],i)})},refreshValidate:function(){o.refresh()},resetFields:function(a){t(a).forEach(function(i){e.getCtxs(i).forEach(function(l){e.$render.clearCache(l),l.rule.value=I0(l.defaultValue)})})},method:function(a,i){var l=o.el(a);if(!l||!l[i])throw new Error(xC("err","".concat(i,"\u65B9\u6CD5\u4E0D\u5B58\u5728")));return function(){return l[i].apply(l,arguments)}},exec:function(a,i){for(var l=arguments.length,s=new Array(l>2?l-2:0),c=2;c {t(function(a){return Te.matchAll(/\w+|\[(\w*)]/g,a).map(i=>i[0]==="[]"?"":i[1]||i[0])}(r),o,n,0)}),n}return null}const P4={transitional:tO,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Te.isObject(e);if(o&&Te.isHTMLForm(e)&&(e=new FormData(e)),Te.isFormData(e))return r?JSON.stringify(oO(e)):e;if(Te.isArrayBuffer(e)||Te.isBuffer(e)||Te.isStream(e)||Te.isFile(e)||Te.isBlob(e))return e;if(Te.isArrayBufferView(e))return e.buffer;if(Te.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(i,l){return q0(i,new Zo.classes.URLSearchParams,Object.assign({visitor:function(s,c,u,d){return Zo.isNode&&Te.isBuffer(s)?(this.append(c,s.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},l))}(e,this.formSerializer).toString();if((a=Te.isFileList(e))||n.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return q0(a?{"files[]":e}:e,i&&new i,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(i,l,s){if(Te.isString(i))try{return(l||JSON.parse)(i),Te.trim(i)}catch(c){if(c.name!=="SyntaxError")throw c}return(s||JSON.stringify)(i)}(e)):e}],transformResponse:[function(e){const t=this.transitional||P4.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(e&&Te.isString(e)&&(n&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Pt.from(a,Pt.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zo.classes.FormData,Blob:Zo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],e=>{P4.headers[e]={}});const N4=P4,uG=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aO=Symbol("internals");function dd(e){return e&&String(e).trim().toLowerCase()}function G0(e){return e===!1||e==null?e:Te.isArray(e)?e.map(G0):String(e)}function F4(e,t,n,r,o){return Te.isFunction(r)?r.call(this,t,n):(o&&(t=n),Te.isString(t)?Te.isString(r)?t.indexOf(r)!==-1:Te.isRegExp(r)?r.test(t):void 0:void 0)}class W0{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,s,c){const u=dd(s);if(!u)throw new Error("header name must be a non-empty string");const d=Te.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||s]=G0(l))}const i=(l,s)=>Te.forEach(l,(c,u)=>a(c,u,s));return Te.isPlainObject(t)||t instanceof this.constructor?i(t,n):Te.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((l=>{const s={};let c,u,d;return l&&l.split(`
`).forEach(function(f){d=f.indexOf(":"),c=f.substring(0,d).trim().toLowerCase(),u=f.substring(d+1).trim(),!c||s[c]&&uG[c]||(c==="set-cookie"?s[c]?s[c].push(u):s[c]=[u]:s[c]=s[c]?s[c]+", "+u:u)}),s})(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=dd(t)){const r=Te.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return function(a){const i=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=l.exec(a);)i[s[1]]=s[2];return i}(o);if(Te.isFunction(n))return n.call(this,o,r);if(Te.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dd(t)){const r=Te.findKey(this,t);return!(!r||this[r]===void 0||n&&!F4(0,this[r],r,n))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=dd(i)){const l=Te.findKey(r,i);!l||n&&!F4(0,r[l],l,n)||(delete r[l],o=!0)}}return Te.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];t&&!F4(0,this[a],a,t,!0)||(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Te.forEach(this,(o,a)=>{const i=Te.findKey(r,a);if(i)return n[i]=G0(o),void delete n[a];const l=t?function(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(c,u,d)=>u.toUpperCase()+d)}(a):String(a).trim();l!==a&&delete n[a],n[l]=G0(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Te.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const n=(this[aO]=this[aO]={accessors:{}}).accessors,r=this.prototype;function o(a){const i=dd(a);n[i]||(function(l,s){const c=Te.toCamelCase(" "+s);["get","set","has"].forEach(u=>{Object.defineProperty(l,u+c,{value:function(d,f,p){return this[u].call(this,s,d,f,p)},configurable:!0})})}(r,a),n[i]=!0)}return Te.isArray(t)?t.forEach(o):o(t),this}}W0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(W0.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Te.freezeMethods(W0);const Ta=W0;function B4(e,t){const n=this||N4,r=t||n,o=Ta.from(r.headers);let a=r.data;return Te.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function iO(e){return!(!e||!e.__CANCEL__)}function pd(e,t,n){Pt.call(this,e??"canceled",Pt.ERR_CANCELED,t,n),this.name="CanceledError"}Te.inherits(pd,Pt,{__CANCEL__:!0});const dG=Zo.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];Te.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Te.isString(r)&&i.push("path="+r),Te.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function lO(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}(e,t):t}const pG=Zo.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(o){let a=o;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(o){const a=Te.isString(o)?r(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return!0};function sO(e,t){let n=0;const r=function(o,a){o=o||10;const i=new Array(o),l=new Array(o);let s,c=0,u=0;return a=a!==void 0?a:1e3,function(d){const f=Date.now(),p=l[u];s||(s=f),i[c]=d,l[c]=f;let v=u,m=0;for(;v!==c;)m+=i[v++],v%=o;if(c=(c+1)%o,c===u&&(u=(u+1)%o),f-s{const a=o.loaded,i=o.lengthComputable?o.total:void 0,l=a-n,s=r(l);n=a;const c={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&a<=i?(i-a)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const fG=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,n){let r=e.data;const o=Ta.from(e.headers).normalize();let a,i,{responseType:l,withXSRFToken:s}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(Te.isFormData(r)){if(Zo.hasStandardBrowserEnv||Zo.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((i=o.getContentType())!==!1){const[v,...m]=i?i.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([v||"multipart/form-data",...m].join("; "))}}let u=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(v+":"+m))}const d=lO(e.baseURL,e.url);function f(){if(!u)return;const v=Ta.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());(function(m,g,_){const y=_.config.validateStatus;_.status&&y&&!y(_.status)?g(new Pt("Request failed with status code "+_.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(_.status/100)-4],_.config,_.request,_)):m(_)})(function(m){t(m),c()},function(m){n(m),c()},{data:l&&l!=="text"&&l!=="json"?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:v,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),Qk(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&u.readyState===4&&(u.status!==0||u.responseURL&&u.responseURL.indexOf("file:")===0)&&setTimeout(f)},u.onabort=function(){u&&(n(new Pt("Request aborted",Pt.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new Pt("Network Error",Pt.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||tO;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),n(new Pt(v,m.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,e,u)),u=null},Zo.hasStandardBrowserEnv&&(s&&Te.isFunction(s)&&(s=s(e)),s||s!==!1&&pG(d))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&dG.read(e.xsrfCookieName);v&&o.set(e.xsrfHeaderName,v)}r===void 0&&o.setContentType(null),"setRequestHeader"in u&&Te.forEach(o.toJSON(),function(v,m){u.setRequestHeader(m,v)}),Te.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),l&&l!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",sO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",sO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=v=>{u&&(n(!v||v.type?new pd(null,e,u):v),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const p=function(v){const m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(v);return m&&m[1]||""}(d);p&&Zo.protocols.indexOf(p)===-1?n(new Pt("Unsupported protocol "+p+":",Pt.ERR_BAD_REQUEST,e)):u.send(r||null)})},cO={http:null,xhr:fG};Te.forEach(cO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const uO=e=>`- ${e}`,hG=e=>Te.isFunction(e)||e===null||e===!1,dO=e=>{e=Te.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a0;)a[d.data[t]]=!0,d=d.parent;if(c.isLeaf||this.checkStrictly)c.setChecked(!0,!1);else if(c.setChecked(!0,!0),n){c.setChecked(!1,!1);const f=function(p){p.childNodes.forEach(v=>{v.isLeaf||v.setChecked(!1,!1),f(v)})};f(c)}}}setCheckedNodes(t,n=!1){const r=this.key,o={};t.forEach(a=>{o[(a||{})[r]]=!0}),this._setCheckedKeys(r,n,o)}setCheckedKeys(t,n=!1){this.defaultCheckedKeys=t;const r=this.key,o={};t.forEach(a=>{o[a]=!0}),this._setCheckedKeys(r,n,o)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(t,n,r){const o=this.getNode(t);o&&o.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,n=!0){const r=t[this.key],o=this.nodesMap[r];this.setCurrentNode(o),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,n=!0){if(t==null)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);const r=this.getNode(t);r&&(this.setCurrentNode(r),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const eH=ie({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=Me("tree"),n=ze("NodeInstance"),r=ze("RootTree");return()=>{const o=e.node,{data:a,store:i}=o;return e.renderContent?e.renderContent(at,{_self:n,node:o,data:a,store:i}):r.ctx.slots.default?r.ctx.slots.default({node:o,data:a}):at("span",{class:t.be("node","label")},[o.label])}}});var tH=Be(eH,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function yS(e){const t=ze("TreeNodeMap",null),n={treeNodeExpand:r=>{e.node!==r&&e.node.collapse()},children:[]};return t&&t.children.push(n),yt("TreeNodeMap",n),{broadcastExpanded:r=>{if(e.accordion)for(const o of n.children)o.treeNodeExpand(r)}}}const _S=Symbol("dragEvents"),nH=ie({name:"ElTreeNode",components:{ElCollapseTransition:t2,ElCheckbox:Or,NodeContent:tH,ElIcon:je,Loading:ba},props:{node:{type:Tl,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const n=Me("tree"),{broadcastExpanded:r}=yS(e),o=ze("RootTree"),a=U(!1),i=U(!1),l=U(null),s=U(null),c=U(null),u=ze(_S),d=et();yt("NodeInstance",d),e.node.expanded&&(a.value=!0,i.value=!0);const f=o.props.props.children||"children";Ee(()=>{const g=e.node.data[f];return g&&[...g]},()=>{e.node.updateChildren()}),Ee(()=>e.node.indeterminate,g=>{p(e.node.checked,g)}),Ee(()=>e.node.checked,g=>{p(g,e.node.indeterminate)}),Ee(()=>e.node.expanded,g=>{Ne(()=>a.value=g),g&&(i.value=!0)});const p=(g,_)=>{l.value===g&&s.value===_||o.ctx.emit("check-change",e.node.data,g,_),l.value=g,s.value=_},v=()=>{e.node.isLeaf||(a.value?(o.ctx.emit("node-collapse",e.node.data,e.node,d),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,d)))},m=(g,_)=>{e.node.setChecked(_.target.checked,!o.props.checkStrictly),Ne(()=>{const y=o.store.value;o.ctx.emit("check",e.node.data,{checkedNodes:y.getCheckedNodes(),checkedKeys:y.getCheckedKeys(),halfCheckedNodes:y.getHalfCheckedNodes(),halfCheckedKeys:y.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:o,expanded:a,childNodeRendered:i,oldChecked:l,oldIndeterminate:s,getNodeKey:g=>v0(o.props.nodeKey,g.data),getNodeClass:g=>{const _=e.props.class;if(!_)return{};let y;if(qe(_)){const{data:b}=g;y=_(b,g)}else y=_;return Je(y)?{[y]:!0}:y},handleSelectChange:p,handleClick:g=>{g0(o.store,o.ctx.emit,()=>o.store.value.setCurrentNode(e.node)),o.currentNode.value=e.node,o.props.expandOnClickNode&&v(),o.props.checkOnClickNode&&!e.node.disabled&&m(null,{target:{checked:!e.node.checked}}),o.ctx.emit("node-click",e.node.data,e.node,d,g)},handleContextMenu:g=>{o.instance.vnode.props.onNodeContextmenu&&(g.stopPropagation(),g.preventDefault()),o.ctx.emit("node-contextmenu",g,e.node.data,e.node,d)},handleExpandIconClick:v,handleCheckChange:m,handleChildNodeExpand:(g,_,y)=>{r(_),o.ctx.emit("node-expand",g,_,y)},handleDragStart:g=>{o.props.draggable&&u.treeNodeDragStart({event:g,treeNode:e})},handleDragOver:g=>{g.preventDefault(),o.props.draggable&&u.treeNodeDragOver({event:g,treeNode:{$el:c.value,node:e.node}})},handleDrop:g=>{g.preventDefault()},handleDragEnd:g=>{o.props.draggable&&u.treeNodeDragEnd(g)},CaretRight:x7}}}),rH=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],oH=["aria-expanded"],aH=ie({name:"ElTree",components:{ElTreeNode:Be(nH,[["render",function(e,t,n,r,o,a){const i=Ke("el-icon"),l=Ke("el-checkbox"),s=Ke("loading"),c=Ke("node-content"),u=Ke("el-tree-node"),d=Ke("el-collapse-transition");return tt((F(),Z("div",{ref:"node$",class:z([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=Qe((...f)=>e.handleClick&&e.handleClick(...f),["stop"])),onContextmenu:t[2]||(t[2]=(...f)=>e.handleContextMenu&&e.handleContextMenu(...f)),onDragstart:t[3]||(t[3]=Qe((...f)=>e.handleDragStart&&e.handleDragStart(...f),["stop"])),onDragover:t[4]||(t[4]=Qe((...f)=>e.handleDragOver&&e.handleDragOver(...f),["stop"])),onDragend:t[5]||(t[5]=Qe((...f)=>e.handleDragEnd&&e.handleDragEnd(...f),["stop"])),onDrop:t[6]||(t[6]=Qe((...f)=>e.handleDrop&&e.handleDrop(...f),["stop"]))},[ne("div",{class:z(e.ns.be("node","content")),style:We({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(F(),_e(i,{key:0,class:z([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Qe(e.handleExpandIconClick,["stop"])},{default:pe(()=>[(F(),_e(_t(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):be("v-if",!0),e.showCheckbox?(F(),_e(l,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Qe(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):be("v-if",!0),e.node.loading?(F(),_e(i,{key:2,class:z([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:pe(()=>[ee(s)]),_:1},8,["class"])):be("v-if",!0),ee(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),ee(d,null,{default:pe(()=>[!e.renderAfterExpand||e.childNodeRendered?tt((F(),Z("div",{key:0,class:z(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(F(!0),Z(Ge,null,St(e.node.childNodes,f=>(F(),_e(u,{key:e.getNodeKey(f),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:f,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,oH)),[[xt,e.expanded]]):be("v-if",!0)]),_:1})],42,rH)),[[xt,e.node.visible]])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]])},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:mn}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:n}=Ht(),r=Me("tree"),o=U(new Qj({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));o.value.initialize();const a=U(o.value.root),i=U(null),l=U(null),s=U(null),{broadcastExpanded:c}=yS(e),{dragState:u}=function({props:p,ctx:v,el$:m,dropIndicator$:g,store:_}){const y=Me("tree"),b=U({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return yt(_S,{treeNodeDragStart:({event:A,treeNode:x})=>{if(typeof p.allowDrag=="function"&&!p.allowDrag(x.node))return A.preventDefault(),!1;A.dataTransfer.effectAllowed="move";try{A.dataTransfer.setData("text/plain","")}catch{}b.value.draggingNode=x,v.emit("node-drag-start",x.node,A)},treeNodeDragOver:({event:A,treeNode:x})=>{const E=x,O=b.value.dropNode;O&&O.node.id!==E.node.id&&Xr(O.$el,y.is("drop-inner"));const T=b.value.draggingNode;if(!T||!E)return;let C=!0,I=!0,L=!0,w=!0;typeof p.allowDrop=="function"&&(C=p.allowDrop(T.node,E.node,"prev"),w=I=p.allowDrop(T.node,E.node,"inner"),L=p.allowDrop(T.node,E.node,"next")),A.dataTransfer.dropEffect=I||C||L?"move":"none",(C||I||L)&&(O==null?void 0:O.node.id)!==E.node.id&&(O&&v.emit("node-drag-leave",T.node,O.node,A),v.emit("node-drag-enter",T.node,E.node,A)),(C||I||L)&&(b.value.dropNode=E),E.node.nextSibling===T.node&&(L=!1),E.node.previousSibling===T.node&&(C=!1),E.node.contains(T.node,!1)&&(I=!1),(T.node===E.node||T.node.contains(E.node))&&(C=!1,I=!1,L=!1);const k=E.$el.querySelector(`.${y.be("node","content")}`).getBoundingClientRect(),P=m.value.getBoundingClientRect();let M;const V=C?I?.25:L?.45:1:-1,S=L?I?.75:C?.55:0:1;let R=-9999;const j=A.clientY-k.top;M=j1?l-1:0),c=1;c=0&&(s=-1),s>-1&&(r=t.slice(0,s),a=t.slice(s+1,l>-1?l:t.length),o=e(a)),l>-1&&(r=r||t.slice(0,l),i=t.slice(l,t.length)),r=function(c,u){if(c.startsWith("/"))return c;if(!c)return u;const d=u.split("/"),f=c.split("/"),p=f[f.length-1];p!==".."&&p!=="."||f.push("");let v,m,g=d.length-1;for(v=0;v=0?t.mod(this.m):t},e.prototype.revert=function(t){return t},e.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},e.prototype.mulTo=function(t,n,r){t.multiplyTo(n,r),this.reduce(r)},e.prototype.sqrTo=function(t,n){t.squareTo(n),this.reduce(n)},e}(),dT=function(){function e(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<