bkui-vue 2.0.2-beta.43 → 2.0.2-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/locale/ja-jp.esm.js +2 -0
- package/dist/locale/ja-jp.esm.js.map +1 -0
- package/dist/locale/ja-jp.umd.js +2 -0
- package/dist/locale/ja-jp.umd.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/locale/index.d.ts +1 -0
- package/lib/locale/index.js +169 -1
- package/lib/locale/lang/ja-jp.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -358,4 +358,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
358
358
|
m 0 ${y?"":"-"}${b}
|
359
359
|
a ${b} ${b} 0 1 1 0 ${y?"-":""}${b*2}
|
360
360
|
a ${b} ${b} 0 1 1 0 ${y?"":"-"}${b*2}
|
361
|
-
`,E={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${d}-circle-trail`)}`,style:O};return a.createVNode("div",{style:v,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",E,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},YO=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=fe(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:d,textInside:f,theme:u}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(v=!0)=>(d||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${u}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function c9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const XO={extCls:m.string,type:Q5(),percent:m.number.def(0),theme:m.theme().def(Oi.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:Z5(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},JO=a.defineComponent({name:"Progress",props:XO,setup(){const{resolveClassName:e}=fe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(YO,t,c9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(KO,t,c9(e)?e:{default:()=>[e]}));const r={class:Te({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),ja=Le(JO),Fg=Symbol("RadioGroup");function Hg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Bg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Fg,um),s=!dm(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,u=>{i.value=u===t.label},{immediate:!0})):a.watch(()=>t.modelValue,u=>{u!==""&&(i.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{i.value=u},f=u=>{if(c.value||o.value)return;const h=u.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const v=i.value?t.label:"";return n("update:modelValue",v),n("change",v),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:d,handleChange:f}},ZO={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:Kr().def(()=>!0)},QO=a.defineComponent({name:"Radio",props:ZO,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Bg(),{resolveClassName:c}=fe();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Te({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),eE={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:Kr().def(()=>!0)},tE=a.defineComponent({name:"RadioButton",props:eE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Bg(),{resolveClassName:c}=fe();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Te({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),nE={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:Kr().def(()=>!0)},rE=a.defineComponent({name:"RadioGroup",props:nE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Bt(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=c=>{const d=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(Fg,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=fe();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),mi=lt(QO,{Group:rE,Button:tE}),Ds=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},r=(d,f)=>{if(!e.editable)return;const u=d+1;t("changeHover",u),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=d=>{e.editable&&a.nextTick(()=>{d.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=fe(),o=d=>Te({[`${i("is-select")}`]:d<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:u=>r(f,u),onMouseleave:u=>s(u)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),aE=a.defineComponent({name:"Rate",components:{star:Ds},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),r=Bt(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=Te({[`${n("rate")}`]:!0}),d={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const h=Math.floor(e.modelValue),p=(d.width+3)*h,g=d.width*(e.modelValue-h);return{width:`${p+g}px`}}),u={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(Ds,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(Ds,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(Ds,a.mergeProps({editable:!1,rate:0},u),null)]])}}),jg=Le(aE),sE=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:d,collapsible:f,isCollapsed:u}=a.toRefs(e),h=a.ref(u.value),p=a.ref(!0),g=a.ref(!1),v=a.ref(null),b=a.ref({}),y=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),O=a.computed(()=>{let k=r.value;return l.value!==3&&typeof k!="number"?`${l.value}px`:(typeof k=="number"&&(k=k<=l.value?`${l.value}px`:`${k}px`),k)}),T=a.computed(()=>f.value&&u.value?{[x.value]:"0px"}:{[x.value]:O.value}),E=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>d.value?typeof d.value=="boolean"?50:d.value:0),_=()=>{const k=y.value.getBoundingClientRect();v.value=S.value?k.width:k.height};let A=new ResizeObserver(_);const P=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${b.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${b.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${b.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${b.value.aside.height}px 0`;break}},D=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=k=>Math.min(o.value,Math.max(l.value,k),v.value-i.value),j=k=>{t("before-resize",k);const I=C.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const q=$=>{t("resizing",$)},K=$=>{let Q;switch(n.value){case"top":Q=$.clientY-b.value.mouse.clientY;break;case"right":Q=b.value.mouse.clientX-$.clientX;break;case"bottom":Q=b.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-b.value.mouse.clientX}const ne=b.value.aside[x.value]+Q,oe=M(ne)+s.value,re=`${oe}px`;c.value?C.value.style[x.value]=re:N.value.style[n.value]=re,q(oe)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},H=()=>{if(!d.value)return!1;const k=C.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=V.value,!g.value)return p.value=!0,!1;R(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,R(),t("collapse-change",h.value)},R=()=>{const k=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||O.value)},B=k=>{const I=()=>{p.value=k,C.value.style.transition="",C.value.removeEventListener("transitionend",I)};C.value.addEventListener("transitionend",I),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(u,()=>{h.value=u.value,L(h.value)}),a.onMounted(()=>{A.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(A.unobserve(y.value),A=null)});const{resolveClassName:z}=fe();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:v,state:b,vertical:S,cssPropKey:x,bkResizeLayoutRef:y,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:E,asideStyle:T,handleMousedown:j,setCollapse:L,resolveClassName:z}},render(){var t,n,r,s,i,o;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(Ct,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(Ft,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),zg=Le(sE);var _d=null;function iE(e){return _d||(_d=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),_d(e)}var Od=null;function oE(e){Od||(Od=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Od(e)}function lE(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function Is(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Ug(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function rf(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(Ug(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var cE='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',af=0,Xs=null;function uE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=hE.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||pi(e)}),o=rf(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){pi(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(af||(Xs=lE(cE)),mE(e),e.__resize_rendered__=rf(e).rendered,window.MutationObserver){var d=new MutationObserver(e.__resize_mutation_handler__);d.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=d}}e.__resize_listeners__.push(t),af++}function dE(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",H0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--af&&Xs&&Xs.parentNode.removeChild(Xs)}}function fE(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function hE(){var e=rf(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(B0(this),this.addEventListener("scroll",H0,!0)),this.__resize_rendered__=t,pi(this))}function H0(){var e=this;B0(this),this.__resize_raf__&&oE(this.__resize_raf__),this.__resize_raf__=iE(function(){var t=fE(e);t&&(e.__resize_last__=t,pi(e))})}function pi(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function mE(e){var t=Ug(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=Is("div",{className:"resize-triggers"}),r=Is("div",{className:"resize-expand-trigger"}),s=Is("div"),i=Is("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},B0(e),e.addEventListener("scroll",H0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function B0(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,d=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=d,n.scrollTop=f}var Ot=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(Ot||{});const Wg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),pE=e=>{a.provide(Wg,e)},qg=()=>a.inject(Wg);var Dn=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(Dn||{});const Gg=/(\||,|、|\r\n|\n)/gm,Kg=/^(\||,|、|\r\n|\n)$/;var qr=(e=>(e.AND="&",e.OR="|",e))(qr||{});class xr{constructor(t,n="default"){ve(this,"id");ve(this,"name");ve(this,"values",[]);ve(this,"condition");ve(this,"logical");ve(this,"nameRenderKey",Zn(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Zn(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(Gg).filter(l=>l.trim()&&!Kg.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const gE=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:qr.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=De("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const d=a.computed(()=>{var g,v;return(g=e.list)!=null&&g.length?(v=e.keyword)!=null&&v.length?e.list.filter(b=>b.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:v}=e;if(!(v!=null&&v.trim().length)||!g.toLocaleLowerCase().includes(v.toLocaleLowerCase().trim()))return g;const b=v.trim().length,y=[];let N=-1;return v=v.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${v}`,"igm"),(w,C)=>(y.length===0&&C!==0?y.push(g.slice(0,C)):N>=0&&y.push(g.slice(N+w.length,C)),y.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&y.push(g.slice(N+b)),y.length?y:g}function u(g){var v;return(v=g.value)!=null&&v.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,v){g.stopPropagation(),g.preventDefault(),o(v)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:d,getSearchNode:u,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:i=>this.handleSelectedChange(i,s)},[a.createVNode(ot,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(mi,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(mi,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Yg=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:ln},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:Dn.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=De("searchSelect"),{resolveClassName:s}=fe(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),d=a.ref(!1),f=a.ref(!1),u=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=qa(100,K);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:w,searchData:C}=qg(),S=a.computed(()=>{var U;return((U=u.value)==null?void 0:U.logical)||qr.OR}),x=a.ref(Zn(10)),O=a.ref(!1);a.watch(N,()=>{e.mode===Dn.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var W,ae;f.value&&((W=y.value)==null?void 0:W.some(de=>!de.disabled))?v||(h.value=e.valueBehavior===Ot.NEED_KEY&&((ae=y.value.find(de=>!de.disabled))==null?void 0:ae.id)||"",v=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),v=!1,e.valueBehavior!==Ot.NEED_KEY&&(h.value=""))});function T(U){switch(U.code){case"ArrowDown":case"ArrowUp":E(U);break;case"Enter":case"NumpadEnter":V(U);break}}function E(U){var de;U.preventDefault(),(de=i.value)==null||de.blur();const W=y.value.length;let ae=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<W;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+W)%W;const ue=y.value[ae];if(ue&&!ue.disabled){const ce=document.getElementById(ue.id);ce==null||ce.focus(),h.value=ue.id;break}}}function V(U){var ae;if(!v)return;U.preventDefault();const W=(ae=y.value)==null?void 0:ae.find(de=>de.id===h.value);W&&R(W)}function _(U){var W,ae,de;if(!((W=o.value)!=null&&W.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((de=u.value)!=null&&de.isCustomMenu){e.mode===Dn.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===Dn.EDIT||u.value){u.value&&H().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let A=!1;function P(U){if(!A){if(c.value=!1,e.mode===Dn.EDIT&&u.value&&!d.value){const W=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!W.length)return;U==null||U.preventDefault();const ae=document.createRange(),de=window.getSelection();ae.selectNodeContents(W.at(-1)),de==null||de.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),de.addRange(ae),ne(!0,!1);return}K(),ne(!1,!d.value)}}function D(U){U.preventDefault();const W=U.clipboardData.getData("text").trim();if(!u.value){const ae=J(W);if(ae){u.value=ae,ne(!0,!0);return}l.value=W.split(Gg).filter(de=>de.trim()&&!Kg.test(de)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(W),g()}function M(U){if(O.value)return;re();const W=U.target.innerText;if(u.value){if(u.value&&!W){x.value=Zn(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=W,g();return}l.value=u.value.isSpecialType()?W:W.replace(u.value.name,"").replace(":",""),g()}function j(U){var W;if(!O.value)switch(U.code){case"Enter":case"NumpadEnter":if(U.preventDefault(),e.valueBehavior===Ot.NEED_KEY&&y.value.some(ae=>ae.id===h.value)){!u.value&&((W=l.value)!=null&&W.length)&&U.preventDefault();return}H(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function H(U){var ae,de,ee;return U==null||U.preventDefault(),await new Promise(ue=>setTimeout(ue,0)),u.value?l.value?await $():!((ae=u.value)!=null&&ae.isSpecialType())&&((de=u.value)==null?void 0:de.values.length)<1?(c.value=!c.value,!1):(await q()&&((ee=u.value)!=null&&ee.isCustomMenu&&(f.value=!1),oe()),!1):!l.value||e.valueBehavior===Ot.NEED_KEY?void 0:await te()}function L(U){var W,ae,de;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((W=u.value)!=null&&W.values.length){if(u.value.type==="text"||!((ae=u.value.children)!=null&&ae.length))return;U.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const Ne=((de=ge==null?void 0:ge.dataset)==null?void 0:de.index)||-1;u.value.values.splice(+Ne,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(u.value=null,l.value="",K());w("")}async function R(U,W){var ae,de,ee,ue,ce;if((ae=U.value)!=null&&ae.id){const ge=new xr({...U,id:U.realId??U.id},W);if(ge.addValues(U.value.name,!1),e.valueBehavior===Ot.NEED_KEY&&h.value){oe(ge),ne(!0),h.value="";return}if(u.value=ge,!await q(u.value.values)){u.value=null;return}oe(u.value),ne(!0),h.value="";return}if(!u.value||((de=u.value)==null?void 0:de.type)==="condition"){u.value=new xr(U,W??((ee=u.value)==null?void 0:ee.type)),l.value="";const ge=((ue=u.value)==null?void 0:ue.type)==="condition";ge||t("selectKey",{id:U.id,name:U.name,values:[]}),ge&&oe(),f.value=ge||!!u.value.children.length,ne(e.valueBehavior===Ot.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}u.value&&(u.value.addValue(U),a.nextTick(Y)),await q(u.value.values)&&(u.value.multiple||oe(),e.valueBehavior===Ot.NEED_KEY&&((ce=u.value)!=null&&ce.multiple)&&ne())}function B(U){R(U,"condition")}function z(U){var W;switch(U.id){case"confirm":if(!((W=u.value)!=null&&W.values.length))return;l.value="",H();break;case"cancel":u.value.values=[],f.value=!1;break}}function k(U){u.value&&(u.value.logical=U)}async function I(U,W){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,W)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return w(ae||"校验错误"),!1}return w(""),!0}async function q(U){if(!u.value)return await I(null,U);const{searchItem:W,validate:ae,values:de}=u.value;return ae&&typeof e.validateValues=="function"?await I(W,U??de):(w(""),!0)}async function K(){var W,ae,de,ee,ue;let U=[];if(typeof e.getMenuList=="function"&&(!((W=e.data)!=null&&W.length)&&!u.value||u.value&&u.value.type!=="condition"&&(((ae=u.value.searchItem)==null?void 0:ae.async)===void 0||u.value.searchItem.async===!0)))p.value=!0,U=await e.getMenuList((de=u.value)==null?void 0:de.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(u!=null&&u.value)u.value.type==="condition"?U=e.conditions:(!((ue=u.value.values)!=null&&ue.length)||u.value.multiple||e.mode===Dn.EDIT)&&(U=u.value.children.filter(ce=>ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))U=e.data.filter(ce=>!ce.isSelected).slice();else for(const ce of e.data.filter(ge=>!ge.isSelected))if(ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){U.push(ce);const Ne=[];for(const Oe of ce.children||[])Ne.push({...ce,realId:ce.id,id:Zn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,realId:ce.id,id:Zn(10),value:{id:l.value,name:l.value}}),U.push(...Ne)}else{const Ne=[];for(const Oe of ce.children||[])Oe.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&Ne.push({...ce,realId:ce.id,id:Zn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,value:{id:l.value,name:l.value}}),U.push(...Ne)}if(y.value=U,console.log("list",U),e.valueBehavior===Ot.NEED_KEY){const ce=U.find(ge=>!ge.disabled);ce&&(!h.value||h.value&&!U.some(ge=>ge.id===h.value))&&(h.value=ce.id)}}async function te(){const U=J(l.value),W=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await q(W))return t("add",U||new xr({...W[0]},"text")),l.value="",K(),!0}async function $(){let U=[];if(u.value.isSpecialType()){const ae=J(l.value);ae&&(u.value=ae,U=ae.values)}if(U=U.length?U:u.value.str2Values(l.value),!!await q(U))return u.value.type==="text"?(u.value.name=l.value,u.value.id=l.value):u.value.values=U,t("add",u.value),l.value="",u.value=null,ne(!0),!0}function Q(){if(!i.value)return;const U=document.createRange(),W=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),W.removeAllRanges(),W.addRange(U)}function ne(U=!1,W=!0){U&&setTimeout(K,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&W&&a.nextTick(Q),t("focus",d.value)}function oe(U){var ae;t("add",U??u.value);const W=!((ae=u.value)!=null&&ae.isCustomMenu);u.value=null,l.value="",W&&(ne(!0,W),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(W=>W.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[W,ae]=U.split(":");if(W!=null&&W.trim()){const de=C.value.find(ee=>ee.name===W.trim());if(de){const ee=new xr({...de},"default");return ee.addValues(ae),ee}}}function Y(){var U;(U=l.value)!=null&&U.length&&(l.value="",Array.from(i.value.childNodes).forEach(ae=>{var de;ae.nodeType===Node.TEXT_NODE&&((de=ae.textContent)!=null&&de.trim())&&i.value.removeChild(ae)}))}function ie(){var U;(U=i.value)==null||U.focus()}async function pe(){await H().then(U=>U&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,u.value=null,a.nextTick(X)}function le(U){u.value.values=[{id:U,name:U}],H().then(W=>W&&X())}function se(){u.value||(h.value="")}function F(U){O.value=!1,l.value=U.data,M(U)}function G(){O.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:P,isFocus:d,refleshMenuHover:se}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:b,menuList:y,menuHoverId:h,isFocus:d,isComposition:O,usingItem:u,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:E,handleClickOutside:_,handleInputFocus:P,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:R,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:G}},render(){var f,u;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((u=this.menuList)!=null&&u.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,v;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:b=>b.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(v=(g=this.usingItem)==null?void 0:g.values)==null?void 0:v.map((b,y)=>a.createVNode("span",{key:y,"data-id":b.id,"data-index":y,"data-key":b.name,"data-type":"value"},[b.name,y<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},d=()=>{var h,p,g,v,b;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(gE,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(v=this.usingItem)==null?void 0:v.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(y=>y.id))||[],showLogical:(b=this.usingItem)==null?void 0:b.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(gt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:d})}}),vE=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:i,onEditBlur:o,editKey:l}=qg();function c(g){t("delete",g)}function d(g,v,b){g.preventDefault(),g.stopPropagation(),s(v,b),t("selectKey",{id:v.id,name:v.name,values:v.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,v){i(g,v)}function u(g){g||o()}function h(g){var v;return!((v=r.value)!=null&&v.contains(g))}function p(g){const v=new xr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||qr.OR,v}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:d,handleInputOutside:h,handleAddSelected:f,handleInputFocus:u}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Yg,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:Dn.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(it,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),Ed=40,u9=6,d9=26,yE=32,bE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:yE*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:Ot.ALL,validator(e){return[Ot.ALL,Ot.NEED_KEY].includes(e)}}},wE=a.defineComponent({name:"SearchSelect",directives:{clickoutside:ln},props:bE,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=De("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),d=a.ref(-1),f=qa(32,N),u=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(A=>A.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var P;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const A=[];for(const D of _){const M=c.value.find(j=>j.id===D.id&&j.name===D.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(D))M.values=D.values||[],M.logical=D.logical||qr.OR,A.push(M);else{let j=e.data.find(R=>R.id===D.id),H="default";j||(j=e.conditions.find(R=>R.id===D.id),j&&(H="condition")),!j&&!((P=D.values)!=null&&P.length)&&(H="text");const L=new xr(j||D,H);L.values=D.values||[],L.logical=D.logical||qr.OR,A.push(L)}}c.value=A,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!A.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{uE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{dE(o.value.querySelector(`.${r("search-select-container")}`),f)}),pE({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,A){u.value=`${_.id}_${A}`}function v(_,A){const P=c.value.slice();P.splice(A,1,_),t("update:modelValue",P.map(D=>D.toValue())),u.value=""}function b(){u.value="",y("")}function y(_){h.value=_||""}function N(){if(l.value||c.value.length<1){d.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),A=o.value.querySelector(".search-container").clientWidth-u9-2,P=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=A-Ed&&j<=P.length-1;){const H=P[j];if(H.clientHeight>d9){d.value=j;return}D+=H?H.clientWidth+u9:0,D>=A-Ed&&(M=j),j+=1}if(M===P.length-1&&D<=A){d.value=-1;return}d.value=D>=A-Ed?M:M-1}function w(){u.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var A;return!((A=o.value)!=null&&A.contains(_))}function x(_){const A=c.value.slice();A.push(_),y(""),t("update:modelValue",A.map(P=>P.toValue()))}function O(_){const A=c.value.slice();A.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",A.map(P=>P.toValue()))}function T(_){var A;_&&(d.value=-1),_===!1&&((A=o.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),l.value=_}function E(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:O,handleClickSearch:E,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:d9}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(vE,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Yg,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(pt,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(mr,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(ns,{class:"select-tips"},null),this.validateStr||""])])])}}),Xg=Le(wE);function CE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Jg=I0(Oo);Jg.width.default="400";const NE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...Jg,title:m.string.def(""),direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:i}=fe(),o=async()=>{let d=!0;typeof e.beforeClose=="function"&&(d=await e.beforeClose()),d&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const d={header:()=>{var u;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(Ft,null,null):a.createVNode(Ct,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((u=r.header)==null?void 0:u.call(r))??e.title])])])},default:()=>{var u;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(u=r.default)==null?void 0:u.call(r)])}};r.footer&&Object.assign(d,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(ds,a.mergeProps(f,{width:e.width,class:{[i("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:o,onHidden:c,onShown:l}),CE(d)?d:{default:()=>[d]})}}}),Zg=Le(NE),f9=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),d=a.ref(0),f=a.ref(0),u=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const A=e.params.customContent[e.modelValue];T=A.tip||A.label||""}const E=e.params.vertical?ka.RIGHT:ka.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:E}:{content:"",placement:E}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),v=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),b=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),y=T=>{e.params.disable||(T.preventDefault(),N(T),wa(window,"mousemove",w),wa(window,"touchmove",w),wa(window,"mouseup",C),wa(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let E=0;e.params.vertical?(d.value=T.clientY,E=(s.value-d.value)/e.params.sliderSize*100):(f.value=T.clientX,E=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+E,S(l.value)}},C=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),Ps(window,"mousemove",w),Ps(window,"touchmove",w),Ps(window,"mouseup",C),Ps(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const E=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/E)*E*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=fe();return{renderDom:()=>a.createVNode("div",{ref:h,style:v.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:y},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(gt,{boundary:document.body,content:p.value.content,placement:p.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[b.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),wa=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ps=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},xE=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(null),u=a.ref(null),h=a.ref(null),p=a.computed(()=>{const k=[e.minValue,e.maxValue,e.step].map(I=>{const q=`${I}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,k)}),g=a.computed(()=>Math.min(s.value,i.value)),v=a.computed(()=>Math.max(s.value,i.value)),b=a.computed(()=>e.range?`${100*(v.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),y=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:b.value,bottom:y.value}:{width:b.value,left:y.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=(e.maxValue-e.minValue)/e.step,I=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<k;K++)q.push(K*I);return e.range?q.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=100*e.step/(e.maxValue-e.minValue),I=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(q)};I.push(te)}return I}),x=a.computed(()=>Array.isArray(e.modelValue)),O=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((k,I)=>Number(k)-Number(I)).filter(k=>Number(k)>=e.minValue&&Number(k)<=e.maxValue).map(k=>{const{tip:I}=e.customContent[k],{label:q}=e.customContent[k];return{tip:I||q||"",label:q||"",percent:(Number(k)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,k=>{e.range?n("update:modelValue",[g.value,v.value]):n("update:modelValue",k),l.value=k}),a.watch(()=>i.value,k=>{n("update:modelValue",[g.value,v.value]),c.value=k}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),E(),wa(window,"resize",E())});const E=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},V=k=>{var I,q;if(k.stopPropagation(),!e.disable){if(E(),e.vertical){const K=(I=d.value)==null?void 0:I.getBoundingClientRect().bottom;M((K-k.clientY)/r.value*100)}else{const K=(q=d.value)==null?void 0:q.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}P()}},_=()=>e.range?![g.value,v.value].every((k,I)=>{var q;return k===((q=o.value)==null?void 0:q[I])}):e.modelValue!==o.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const k=e.modelValue;e.range&&Array.isArray(k)?k[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):k[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):k[0]<e.minValue?n("update:modelValue",[e.minValue,k[1]]):k[1]>e.maxValue?n("update:modelValue",[k[0],e.maxValue]):(s.value=Number(k[0]),i.value=Number(k[1]),_()&&(o.value=k.slice())):!e.range&&typeof k=="number"&&!isNaN(k)&&(k<e.minValue?n("update:modelValue",e.minValue):k>e.maxValue?n("update:modelValue",e.maxValue):(s.value=k,_()&&(o.value=k)))},P=async()=>{await a.nextTick(),n("change",e.range?[g.value,v.value]:e.modelValue)},D=k=>e.vertical?{bottom:`${k}%`}:{left:`${k}%`},M=k=>{if(!e.range){f.value.setPosition(k);return}const I=e.minValue+k*(e.maxValue-e.minValue)/100;Math.abs(g.value-I)<Math.abs(v.value-I)?h.value=s.value<i.value?f.value:u.value:h.value=s.value>i.value?f.value:u.value,h.value.setPosition(k)},j=k=>{if(k==="")return;const I=parseFloat(k);I<e.minValue?(l.value=e.minValue,s.value=e.minValue):I>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=I},H=k=>{if(k==="")return;const I=parseFloat(k.toString());I<e.minValue?(c.value=e.minValue,i.value=e.minValue):I>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=I},L=k=>{let I=0;return k==="start"?I=e.vertical?e.maxValue:e.minValue:I=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(I)?"0":"1"},{resolveClassName:R}=fe(),B=(k,I)=>{let q=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:q,step:I};if(K=e.labelClick(k,te),K===!1)return}q=typeof K=="number"?K:q,console.log("handleStepLabelClick",q),M(q);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${R("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:d,style:C.value,class:`${R("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${R("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((q,K)=>K===0||K===w.value.length-1?null:a.createVNode("div",{key:K,style:D(q),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):null,e.customContent?O.value.map((q,K)=>K===0||K===O.value.length-1?null:a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${R("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:L("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:L("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.stepWidth),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.stepLabel]));if(e.customContent)return O.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.label]))}()]):void 0,a.createVNode(f9,{ref:f,modelValue:s.value,"onUpdate:modelValue":q=>s.value=q,params:T.value,onEmitChange:P,onResetSize:E},null),e.range?a.createVNode(f9,{ref:u,modelValue:i.value,"onUpdate:modelValue":q=>i.value=q,params:T.value,onEmitChange:P,onResetSize:E},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${R("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(Bn,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Bn,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),Qg=Le(xE);var ev=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(ev||{});const h9={theme:m.theme().def(Oi.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:im(),status:Ce("status",{}).def(ev.UNKNOWN),lineType:om(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},SE=a.defineComponent({name:"Steps",props:h9,emits:["update:curStep","click"],setup(e,{emit:t}){const n=De("steps"),r=De("lang"),s=a.ref([]),i=f=>{const u=[];f.forEach(h=>{typeof h=="string"?u.push(h):u.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...u)},o=f=>{h9.curStep=f},l=()=>{var f;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,h)=>{const p=await e.beforeChange(f);p?u(p):h(p)}),t("update:curStep",f),t("click",f))}catch(u){console.warn(u)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:d}=fe();return{defaultSteps:s,jumpTo:c,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Te({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=u=>this.curStep>u+1||this.defaultSteps[u].status==="done",i=u=>this.curStep===u+1,o=u=>{const{icon:h}=u;return h?Object.prototype.toString.call(h)==="[object Object]":typeof u=="string"},l=(u,h)=>(h.icon||(h.icon=u),!isNaN(h.icon)),c=u=>u.status==="loading",d=u=>u.status==="error",f=(u,h)=>i(u)&&this.status==="loading"||c(h)?a.createVNode(Qa,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(u)&&this.status==="error"||d(h)?a.createVNode(it,{class:`${this.resolveClassName("steps-icon")}`},null):s(u)?a.createVNode(hr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(u,h)?u+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((u,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),u.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",u.status&&i(h)?[`${this.resolveClassName(`step-${u.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(u)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${u.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,u)]),u.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(h+1)}},[u.title]),u.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:u.description},[u.description])]):""])})])}}),tv=Le(SE),TE=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),d=a.ref(),f=a.ref(0),u=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:v}=fe(),b=a.computed(()=>{var D;return((D=o.value)==null?void 0:D.length)>0?o.value:i.value}),y=a.computed(()=>({width:`${u.value*b.value.length}px`,transform:`translateX(-${u.value*f.value}px)`})),N=a.computed(()=>({width:`${u.value}px`,height:`${h.value}px`})),w=D=>{let M=D;D>=b.value.length&&(M=0),D<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},C=D=>{D&&window.open(D,"_blank")},S=D=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:D.link},D.class],x=D=>({"background-image":`url(${D.url})`,"background-color":D.color}),O=D=>({[`${v("current-index")}`]:f.value===D}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},E=()=>{window.clearTimeout(p.value)},V=()=>{var M;const D=(M=d.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{P()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},A=D=>{if(D===void 0)return{height:0,width:0};const M=getComputedStyle(D),j=D.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:D.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},P=()=>{var M;const D=A((M=d.value)==null?void 0:M.parentElement);u.value=+c.value>0?c.value:D.width,h.value=+l.value>0?l.value:D.height};return a.watch([l,c],P),a.onMounted(()=>{P(),T(),V()}),a.onBeforeUnmount(()=>{E(),_()}),()=>a.createVNode("section",{ref:d,style:N.value,class:`${v("swiper-home")}`},[a.createVNode("hgroup",{style:y.value,class:`${v("transition")} ${v("swiper-main")}`},[b.value.map(D=>{var M;return a.createVNode("h3",{style:N.value,class:`${v("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,D))??a.createVNode("span",{style:x(D),class:S(D),onClick:()=>C(D.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((D,M)=>a.createVNode("li",{class:O(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),nv=Le(TE),_E={theme:J5(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let gi=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function OE(e){return e}function EE(e){return!!e}const LE={[gi.UPDATE]:OE,[gi.CHANGE]:EE},AE=a.defineComponent({name:"Switcher",props:_E,emits:LE,setup(e,{emit:t}){const n=Bt(),{resolveClassName:r}=fe(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const u={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;u[h]=!0}return u});a.watch(()=>e.modelValue,()=>{var u;o.value=!0,e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const d=u=>{if(u.stopPropagation(),u.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(gi.UPDATE,h),t(gi.CHANGE,p)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(h),typeof v.then=="function"))return s.value=!0,v.then(()=>{g()}).finally(()=>{s.value=!1});v&&g()},f=u=>{(u.code==="Enter"||u.key==="Enter"||u.keyCode===13)&&d(u)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:d,onKeydown:f},[s.value?a.createVNode(co,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),rv=Le(AE);var vi=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(vi||{}),Ta=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Ta||{});const av=Ce("position",{}).def("top");var sv=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(sv||{});const iv=Ce("sortType",{}).def("replace"),VE={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},kE={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:_i(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},DE={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),tabPosition:av,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:iv,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff")},IE={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:av,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:iv,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...VE},m9=a.defineComponent({name:"TabNav",directives:{bkTooltips:un},props:IE,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([Ta.LEFT,Ta.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===Ta.LEFT?g.right=0:g.left=0,g}if(e.type===vi.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let u=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:v,label:b,num:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:O}=p.props;if(!w)return!1;e.active===v&&(u=!0);const T=E=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(E)?`选项卡${g+1}`:typeof E=="string"?E:typeof E=="function"?a.h(E):E;return f.push({name:v,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:O,tabLabel:T(b),tabNum:y}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,u)=>f===u,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,u){i.value=f,o.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,u)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,u){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,u)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,u){e.tabRemove(f,u)}},{resolveClassName:d}=fe();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:d}=this,f=()=>this.tableNavList.map((v,b)=>{if(!v)return null;const{name:y,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=v,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===y&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},O=(V,_)=>!N&&(V||_),T=(V,_)=>O(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(pt,null,null)]):"",E=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:y,ref:e===y?"activeRef":"tabLabelRef",class:x(),draggable:O(v.sortable,r),onClick:()=>!N&&this.handleTabChange(y),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(b)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(b,V),onDrop:V=>{V.preventDefault(),d(b,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[E()]),T==null?void 0:T(v,b)])]),isNaN(C)?T==null?void 0:T(v,b):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips||"",disabled:!v.tips}]])}),u=()=>{var b,y;const v=[];return typeof this.$slots.add=="function"?v.push((y=(b=this.$slots).add)==null?void 0:y.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(as,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===vi.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=u();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),PE=a.defineComponent({name:"Tab",components:{TabNav:m9},props:DE,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const r=a.ref(!1),s=a.ref([]),i=a.getCurrentInstance(),o=(f,u=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?u.push(p.component):(g===a.Fragment||g==="template")&&o(p,u)}),u},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const u=f[0],h=o(u);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,u){n("remove",f,u),n("remove-panel",f,u)},tabSort(f,u,h){const p=s.value;if(h===sv.INSERT)if(f<u)p.splice(u+1,0,s[f]),p.splice(f,1);else if(f>u)p.splice(u,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[u];p[u]=p[f],p[f]=g}s.value=[...p],n("sort",f,u,h),n("sort-change",f,u,h)},tabDrag(f,u){n("drag",f,u),n("on-drag-tab",f,u)}},{resolveClassName:d}=fe();return{...c,isMounted:r,panels:s,resolveClassName:d}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Ta.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===vi.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode(m9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),RE=a.defineComponent({name:"TabPanel",props:kE,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=fe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),ov=lt(PE,{TabPanel:RE});var lv=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(lv||{}),cv=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(cv||{});const ME=["auto","highlight"],$E=["none","row","col","outer","horizontal"],_e={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},ye={COL_UID:"col_$uuid",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},uv=8,Rn=42;var Ao=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Ao||{});const dv={def1:"#FAFBFD",def2:"#F0F1F5"},_a={large:78,medium:60,small:42},FE=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:_a.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:_a.medium},{value:"large",label:e.value.setting.lineHeight.large,height:_a.large}],fv=Symbol("bkInitColumns"),HE=60;var Ze=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ze||{});const BE=["asc","desc","null","custom"],Sr=80,Xn={},jE={};Ce("showOverflowTooltipMode",{default:"auto"});const zE=Ce("columnType",{default:"__COL_TYPE_NONE"}),sf=Ce("columnType",{default:""});Ce("full",{default:"full"});Ce("columnSize",{default:"small"});const UE=st(),j0=Ce("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),WE=Ce("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),qE=Ce("IFilterPropShape",{default:!1,type:[Boolean,Object]});var hv=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(hv||{});const Vo=Ce("IColumnType",{default:{width:"100%",label:""},type:[Object]}),GE=Ce("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),Ld=Ce("LabelFunctionStringType",{}),KE=Ce("RenderFunctionStringType",{}),p9=Ce("SpanFunctionStringType",{}),YE=Ce("RowClassFunctionStringType",{}),XE=Ce("RowHeightFunctionNumberType",{});Ce("FunctionNumberType",{});const Js=e=>Ce("StringNumberType",{}).def(e);Ce("IColumnPropType",{default:{label:void 0,minWidth:Sr},type:[Object]});var mv=(e=>(e.independent="independent",e.interdependent="interdependent",e))(mv||{});const JE={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(Vo).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ce("columnPick",{}).def("disabled"),height:Js("auto"),stripe:m.bool.def(!1),minHeight:Js(Rn),maxHeight:Js("auto"),rowHeight:XE,headHeight:m.number.def(Rn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ce("ITheadType",{}).def({color:Ao.DEF1,height:Rn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ce("boderType",{})),m.string]).def([lv.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(HE),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(st),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:GE,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(_e.ROW_INDEX),showOverflowTooltip:j0,asyncData:m.bool.def(!1),rowHover:m.oneOf(ME).def(cv.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:Ce("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:sf,headerAlign:sf,prependStyle:m.style().def({}),colSortBehavior:Ce("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:Ce("FixedBottomOption",{default:{position:"relative",height:Rn}}).def(null),appendLastRow:Ce("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},ZE={label:Ld,field:Ld,render:KE,width:m.oneOfType([m.number,m.string]),minWidth:Js(Sr),columnKey:m.string.def(""),showOverflowTooltip:j0,type:zE,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,UE]).def(!1),sort:WE,filter:qE,colspan:p9.def(1),rowspan:p9.def(1),align:sf,className:YE,prop:Ld,index:m.number.def(void 0)},QE=a.defineComponent({name:"TableColumn",props:ZE,setup(e,{}){const t=a.inject(fv,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:b0(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var ze=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(ze||{});const eL=e=>!0,tL=e=>!0,nL=e=>!0,rL=e=>!0,Rs=(e,t,n,r,s)=>!0,aL=e=>!0,sL=e=>!0,iL=e=>!0,oL=e=>!0,g9=e=>!0,lL=e=>!0,v9=e=>!0,cL=e=>!0,uL=e=>!0,dL={columnPick:eL,columnFilter:tL,columnSort:rL,colFilterSave:nL,rowClick:Rs,rowDblclick:Rs,rowExpand:aL,select:sL,selectAll:iL,selectionChange:oL,pageLimitChange:g9,pageValueChange:g9,settingChange:lL,scrollBottom:cL,cellClick:v9,cellDblclick:v9,rowMouseEnter:Rs,rowMouseLeave:Rs,dragend:uL},fL=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,ye.LISTENERS),c="HeadColumnResize";let d=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,u=!1,h=!1,p=0,g=null,v="right",b=null,y=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[ye.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},O=B=>{x(B),u=!1,h=!1;const z=r(g,S)+N,k=r(g,[ye.COL_MIN_WIDTH]),I=z>k?z:k;i(g,I),s(g,ye.WIDTH,I),document.removeEventListener("mouseup",O),C.value=-1e3,N=0,_(b),t==null||t(),b=null;const q=B.target;M(q),g=null},T=ur(B=>{C.value=C.value+B}),E=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const k=r(g,S)+z;r(g,[ye.COL_MIN_WIDTH])<k&&T(z)},V=Un(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},A=B=>{if(!f)return;P(B.target),p=B.clientX;const z=v==="left"?o(y):y;s(z,ye.COL_IS_DRAG,!0),g=z,b=B.target.closest("table");const k=b.getBoundingClientRect();C.value=B.clientX-k.left,V(b),u=!0,document.addEventListener("mouseup",O)},P=B=>{var k,I;((I=(k=B==null?void 0:B.parentElement)==null?void 0:k.parentElement)==null?void 0:I.querySelectorAll(".col-pointer-hover")).forEach(q=>{q==null||q.classList.remove("col-pointer-hover"),q==null||q.classList.remove("poiner-left"),q==null||q.classList.remove("poiner-right")})},D=(B,z)=>{const k=B.parentElement;k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${z}`);const I=z==="right"?k.nextElementSibling:k.previousElementSibling,q=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${q}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),P(B),w.set(B,!1),document.removeEventListener("mousedown",A))},j={[d.MOUSE_MOVE]:(B,z,k)=>{if(x(B),u){h=!0,E(B);return}const I=B.target;if(!h){if(!I)return;const{offsetWidth:q}=I,K=B.offsetX;q>12&&(q-K<8||K<8&&k>0)?(f=!0,v=K<8?"left":"right",w.get(I)||(w.set(I,!0),I.classList.add("cell-resize"),D(I,v),y=z,document.addEventListener("mousedown",A))):(f=!1,M(I))}},[d.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},H=B=>`${c}_${B}`,L=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,ye.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},R=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);if(z!=null&&z.has(I)){const q=z.get(I);q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{R(),L()},{immediate:!0,deep:!0}),{dragOffsetX:C}},hL=()=>{const e=[];let t=0;const n=new WeakMap,r=d=>a.isRef(d)?a.unref(d):a.toRaw(d),s=d=>Object.keys(d??{}).reduce((f,u)=>{const h=u.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(d[u])})},{}),i=d=>(n.has(d)||n.set(d,$t()),n.get(d)),o=(d,f,u)=>{var h,p;if((h=d==null?void 0:d.component)!=null&&h.subTree){l((p=d==null?void 0:d.component)==null?void 0:p.subTree,f);return}if(typeof d=="function")return d();if(Array.isArray(d)){d.forEach(g=>l(g,f));return}if(Array.isArray(d==null?void 0:d.children)){d.children.forEach(g=>l(g,f));return}if(!u&&a.isVNode(d)&&(d!=null&&d.children)&&typeof(d==null?void 0:d.children)=="object"){Object.keys(d.children).forEach(g=>l(d.children[g],f));return}},l=(d,f)=>{var h,p,g;let u=f;if(!(!d||((h=d.type)==null?void 0:h.name)==="Table")){if(((p=d.type)==null?void 0:p.name)==="TableColumn"){const v=Object.assign({index:t},s(d.props),{field:d.props.prop||d.props.field,render:d.props.render??((g=d.children)==null?void 0:g.default),uniqueId:i(d),children:[]}),b=(f==null?void 0:f.children)??e;b.some(y=>y.uniqueId===v.uniqueId)||(b.push(v),t=t+1,d.children&&o(d,v,!0));return}o(d,u)}};return{resolveColumns:d=>{var u,h,p,g;e.length=0,t=0;const f=d==null?void 0:d.find(v=>{var b;return((b=v.type)==null?void 0:b.name)==="GhostBody"});return f&&((u=f.component)!=null&&u.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(v=>l(v))),e.sort((v,b)=>v.index-b.index),e}}};var pv=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var s=0,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),of=typeof window<"u"&&typeof document<"u"&&window.document===document,yi=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),mL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yi):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),pL=2;function gL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){mL(i)}function l(){var c=Date.now();if(n){if(c-s<pL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var vL=20,yL=["top","right","bottom","left","width","height","size","weight"],bL=typeof MutationObserver<"u",wL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=gL(this.refresh.bind(this),vL)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!of||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),bL?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!of||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,s=yL.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),gv=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Gr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||yi},vv=ko(0,0,0,0);function bi(e){return parseFloat(e)||0}function y9(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+bi(i)},0)}function CL(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=bi(o)}return n}function NL(e){var t=e.getBBox();return ko(0,0,t.width,t.height)}function xL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return vv;var r=Gr(e).getComputedStyle(e),s=CL(r),i=s.left+s.right,o=s.top+s.bottom,l=bi(r.width),c=bi(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=y9(r,"left","right")+i),Math.round(c+o)!==n&&(c-=y9(r,"top","bottom")+o)),!TL(e)){var d=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(d)!==1&&(l-=d),Math.abs(f)!==1&&(c-=f)}return ko(s.left,s.top,l,c)}var SL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Gr(e).SVGGraphicsElement}:function(e){return e instanceof Gr(e).SVGElement&&typeof e.getBBox=="function"}}();function TL(e){return e===Gr(e).document.documentElement}function _L(e){return of?SL(e)?NL(e):xL(e):vv}function OL(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return gv(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function ko(e,t,n,r){return{x:e,y:t,width:n,height:r}}var EL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ko(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=_L(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),LL=function(){function e(t,n){var r=OL(n);gv(this,{target:t,contentRect:r})}return e}(),AL=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new pv,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new EL(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new LL(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),yv=typeof WeakMap<"u"?new WeakMap:new pv,bv=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wL.getInstance(),r=new AL(t,n,this);yv.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){bv.prototype[e]=function(){var t;return(t=yv.get(this))[e].apply(t,arguments)}});var VL=function(){return typeof yi.ResizeObserver<"u"?yi.ResizeObserver:bv}();const Xe=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Xe(e,r,n)).filter(r=>r!==void 0).at(0)}},kL=e=>ar(e,"auto"),ar=(e,t="100%",n=null)=>{let r="";return/^null|undefined$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},DL=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>$E.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},wv=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?Un(i,n):cm(i),l=()=>Reflect.apply(o,void 0,[]),c=new VL(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},z0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},IL=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),wi=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Lo(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?IL(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},PL=(e,t)=>Lo(e,t),wr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?wr(Reflect.apply(e,void 0,t),t):[],RL=(e,t,n)=>{const r=ML(e,t,n);return r!==null?r:$t()},ML=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===_e.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,b9=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===Xe(i,["field","type"],[i])))(t)&&n.length&&!n.includes(Xe(t,["field","type"],[t]))},Ci=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,$L=(e,t,n,r)=>{const s=Ci(e,t,n,r,"colspan"),i=Ci(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},Cv=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>wi(u,r,n),i=e.type==="index",o=(u,h,p,g)=>{const v=i?p:s(u)??"",b=i?g:s(h)??"";return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},l=typeof((d=e.sort)==null?void 0:d.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(u,h,p,g)=>l(u,h,p,g)*(t===Ze.DESC?-1:1);return t===Ze.NULL?(u,h)=>!0:c},FL=e=>{const t={[Ze.NULL]:3,[Ze.ASC]:1,[Ze.DESC]:2};return t[e]===void 0?Ze.ASC:Object.keys(t)[(t[e]+1)%3]},HL=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Ze.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:Cv(t,e.value??Ze.NULL,n)},e):null,Ni=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,BL=(e,t,n)=>{const r=RL(e,n,t);return r!==void 0&&e[r]!==void 0?Lo(e,r):t},jL=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=HL(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},zL=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Ms=e=>a.isProxy(e)?a.toRaw(e):e,UL=e=>{const t=De("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=$t(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,d=(F,G={})=>{i.forEach(W=>W.active=!1);const U=i.find(W=>W.col===F);if(U){Object.assign(U,G,{active:!0});return}i.push({col:F,...G,active:!0})},f=(F,G,U)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/px/,"")),$(F,ye.WIDTH,W),M(F,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/%/,""))/100*U,$(F,ye.WIDTH,W),M(F,{width:W,left:null,right:null})),W},u=F=>{let G=F,U=Sr;const W=(ee,ue="width")=>{const ce=[];return ee.forEach(ge=>{const Ne=f(ge,ue,F);G=G-Ne,[void 0,null,"auto","undefined","null",""].includes(ge[ue])&&ce.push(ge)}),G>0&&ce.length&&(U=G/ce.length),ce},ae=W(p);W(ae,"minWidth").forEach(ee=>{const ue=U>Sr?U:Sr;$(ee,ye.WIDTH,ue),M(ee,{width:ue,left:null,right:null})})},h=(F,G={})=>{const U=o.find(W=>W.col===F);if(U){Object.assign(U,G);return}o.push({col:F,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!I(F)))},v=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},b=(F=["rowspan","colspan"])=>r.some(G=>F.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),w=(F,G,U)=>{let W=U;const ae=Ci(F,G,null,null,"colspan"),de={skipCol:!1,skipColLen:0};return W>0&&(de.skipColLen=W,de.skipCol=!0,W=W-1),ae>1&&(de.skipColLen=ae,W=ae-1),{...de,skipColumnNum:W}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Sr;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},S=(F,G)=>{const U=ne(F,ye.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((W,ae)=>{const de=ae.split("_").slice(-1)[0];return Object.assign(W,{[de]:ee=>{U.get(ae).forEach(ue=>Reflect.apply(ue,void 0,[ee,F,G]))}})},{}):{}},x=F=>{if(!F.filter)return null;const G=(ae,de="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de),U=(ae,de)=>{const{match:ee}=F.filter,ue=wi(de,Xe(F,"field",[F,de]));return ee!=="fuzzy"?ae.includes(ue):ae.some(ce=>G(ce,"img").test(ue))};return typeof F.filter.filterFn=="function"?(ae,de,ee,ue)=>F.filter.filterFn(ae,de,F,ee,ue):(ae,de)=>ae.length?U(ae,de):!0},O=F=>{l.length=0;let G=0;const U=[],W=v();W&&F.unshift(W);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(Ne=>ae(Ne.children??[],ge+1))};ae(F);const de=(ce,ge)=>{if(ce){const Ne=c.get(ce);Ne.thColspan=Ne.thColspan+ge,Ne.offsetLeft=Ne.offsetLeft+ge,de(Ne.parent,ge)}},ee=(ce,ge,Ne,Oe)=>{var Re,pr,fs,hs,ta;const Ae=a.toRaw(ce);let Ve=Oe;l[ge]===void 0&&(l[ge]=[]);const Ie=!!(((Re=Ae.children)==null?void 0:Re.length)??!1);(((pr=Ae.children)==null?void 0:pr.length)??!1)||U.push(Ae),c.has(Ae)||c.set(Ae,{thColspan:1,thRowspan:1,isGroup:Ie,offsetLeft:Oe});const St=c.get(Ae),Fe=((fs=Ae.children)==null?void 0:fs.length)??0,Tt=((hs=Ae.children)==null?void 0:hs.length)??1,je=Fe>0?1:G-ge,ke=Ve+(Fe>0?Fe-1:0);return Object.assign(St,{thColspan:Tt>0?Tt:1,parent:Ne,thRowspan:je,offsetLeft:ke}),l[ge].push(Ae),Tt>1&&de(Ne,Tt-1),(ta=Ae.children)==null||ta.forEach((Io,Po)=>{Ve=Ve+ee(Io,ge+1,Ae,Ve+Po)}),Fe>0?Fe-1:0};let ue=0;return F.forEach((ce,ge)=>{ue=ue+ee(ce,0,null,ue+ge)}),U},T=F=>c.get(F),E=()=>{i.length=0;let F=0;(r||[]).forEach((G,U)=>{const{skipCol:W,skipColumnNum:ae,skipColLen:de}=y.value?w(G,U,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=ae,!n.has(G)){const{type:ee,fn:ue,scope:ce,active:ge,enabled:Ne}=jL(G,e),Oe=x(G),Ae=e.settings??{},Ve=zL(G);Ve.enabled&&h(G,{[ye.COL_FILTER_FN]:Oe,[ye.COL_FILTER_VALUES]:Ve.checked??[]}),Ne&&d(G,{[ye.COL_SORT_TYPE]:ee,[ye.COL_SORT_FN]:ue,[ye.COL_SORT_SCOPE]:ce}),n.set(G,{[ye.CALC_WIDTH]:void 0,[ye.RESIZE_WIDTH]:void 0,[ye.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[ye.COL_MIN_WIDTH]:C(G),[ye.LISTENERS]:new Map,[ye.WIDTH]:G.width,[ye.IS_HIDDEN]:b9(Ae.fields??[],G,Ae.checked??[]),[ye.COL_SORT_TYPE]:a.ref(ee),[ye.COL_SORT_FN]:ue,[ye.COL_FILTER_OBJ]:Ve,[ye.COL_FILTER_FN]:Oe,[ye.COL_FILTER_SCOPE]:void 0,[ye.COL_SORT_SCOPE]:ce,[ye.COL_SORT_ACTIVE]:a.ref(ge),[ye.COL_IS_DRAG]:!1,[ye.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:de},[ye.COL_UID]:$t(),[ye.SELECTION_DISABLED]:!1,[ye.SELECTION_INDETERMINATE]:!1,[ye.SELECTION_VAL]:!1,[ye.COL_RESIZEABLE]:G.resizable!==!1,[ye.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[ye.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:de},[ye.COL_MIN_WIDTH]:C(G)})})},V=(F,G)=>{$(F,ye.COL_FIXED_STYLE,G)},_=F=>ne(F,ye.COL_FIXED_STYLE)??{},A=F=>ne(F,ye.COL_RECT),P=F=>ne(F,ye.CALC_WIDTH),D=F=>ne(F,ye.WIDTH),M=(F,{left:G,right:U,width:W,height:ae})=>{const de=A(F),ee={left:G??de.left,right:U??de.right,width:W??de.width,height:ae??de.height};$(F,ye.COL_RECT,ee)},j=Un((F,G)=>{r.length=0,r.push(...O(F)),E(),g(),G==null||G()}),H=(F,G=!1)=>{$(F,ye.IS_HIDDEN,G)},L=(F,G)=>{$(F,ye.RESIZE_WIDTH,G)},R=(F,G)=>{const{type:U,fn:W,scope:ae,active:de}=G,ee={[ye.COL_SORT_TYPE]:U,[ye.COL_SORT_FN]:W,[ye.COL_SORT_ACTIVE]:de,[ye.COL_SORT_SCOPE]:ae};[ye.COL_SORT_TYPE,ye.COL_SORT_FN,ye.COL_SORT_ACTIVE,ye.COL_SORT_SCOPE].forEach(ue=>{ee[ue]!==void 0&&$(F,ue,ee[ue])})},B=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[ye.COL_FILTER_OBJ],G)},z=[ye.WIDTH],k=(F,G=z)=>ne(F,G[0])??ne(F,G[1])??ne(F,G[2]),I=F=>ne(F,ye.IS_HIDDEN)??!1,q=F=>ne(F,ye.COL_UID),K=(F,G,U)=>{[ye.COL_SORT_FN,ye.COL_SORT_SCOPE,ye.COL_SORT_TYPE].includes(G)&&d(F,{[G]:U}),[ye.COL_FILTER_FN,ye.COL_FILTER_VALUES].includes(G)&&h(F,{[G]:U})},te=(F,G)=>{const U=p.findIndex(de=>de===F),W=k(F)-G,ae=p[U+1];ae&&$(ae,ye.WIDTH,k(ae)+W)},$=(F,G,U)=>{K(F,G,U);const W=n.get(F);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=U;return}W[G]=U}},Q=(F,G)=>{const U=G||F.checked||[],W=F.fields||[];r.forEach(ae=>{$(ae,ye.IS_HIDDEN,b9(W,ae,U))})},ne=(F,G)=>{var W;const U=(W=n.get(F))==null?void 0:W[G];return a.isRef(U)?U.value:U},oe=(F,G)=>{var U;return(U=n.get(F))==null?void 0:U[G]},re=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:y,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,ye.COL_SORT_ACTIVE,!1),$(F,ye.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(G=>G.type==="selection");F&&($(F,ye.SELECTION_VAL,!1),$(F,ye.SELECTION_INDETERMINATE,!1))},formatColumns:E,flatColumnTemplate:O,isHiddenColumn:I,getColumnId:q,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(F,G)=>({...re(F,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:A,getColumnCustomClass:(F,G)=>{const U=F.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:P,getColumnWidth:D,getLeftColumnsWidth:(F,G=!1)=>{let U=!0,W=0,ae=0;for(;U&&ae<p.length;){if(F===p[ae]){G&&(W=W+D(p[ae])),U=!1;break}W=W+D(p[ae]),ae=ae+1}return W},getGroupAttribute:T,getPreColumn:F=>{const U=p.findIndex(W=>W===F)-1;return p[U]},getColumnIndex:F=>p.findIndex(G=>G===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:L,setColumnSortOption:R,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,G)=>{e.colSortBehavior===mv.independent&&r.forEach(U=>{$(U,ye.COL_SORT_ACTIVE,!1)}),$(F,ye.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},WL=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(b=>{r.addEventListener(b,y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(b,y)=>{if(y==="--top"){b.parentNode.insertBefore(r,b);return}if(b.nextElementSibling===null){b.parentNode.append(r);return}b.parentNode.insertBefore(r,b.nextElementSibling)},l=b=>{e.rowDraggable&&(b==null||b())},c=b=>b.target.closest("tr"),d=(b,y)=>{const{y:N}=y,{top:w,bottom:C}=b.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(b),b.classList.add(S),o(b,S)},f=(b,y=["--bottom","--top"])=>{y.forEach(N=>b.classList.remove(N))};return{onDragenter:b=>{const y=c(b);b.preventDefault(),b.stopPropagation(),l(()=>{b.dataTransfer.dropEffect="move",y.classList.add("--drag-enter"),d(y,b),s=y})},onDragleave:b=>{l(()=>{const y=c(b);i=y.classList.contains("--bottom")?"--bottom":"--top",f(y,["--drag-enter","--bottom","--top"])})},onDragstart:b=>{l(()=>{const y=c(b);r.style.setProperty("height",`${y.offsetHeight}px`),r.style.setProperty("width",`${y.offsetWidth}px`),y.classList.add("--drag-start"),b.dataTransfer.setDragImage(y,0,0),b.dataTransfer.setData("text/plain",null),b.dataTransfer.dropEffect="move";const{rowIndex:N}=b.target.dataset;b.dataTransfer.setData("data-row-index",N)})},onDragover:b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move";const y=c(b);d(y,b)},onDragend:b=>{var S;if(b.preventDefault(),b.stopPropagation(),r.remove(),!s)return;const y=s,{rowIndex:N}=y.dataset;let w=Number(N);const C=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},qL=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:u}=r.value;for(let p=u-1;p>=0;p--){const g=r.value[p],v=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:v}),t.setFixedStyle(g,{right:`${f}px`}),f=f+v}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},GL=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),KL=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:rr.Normal,mode:l0.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,d;if(s.value){const{loading:f,size:u,mode:h,title:p,inline:g,indicator:v}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode($n,{loading:f,size:u,mode:h,title:p,inline:g,indicator:v},null)}return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??null}}},YL=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),d=a.ref(-1e4),f=a.ref(0),u=a.reactive({}),h=a.reactive([]),p=a.ref(Rn),g=a.ref(1),v=a.computed(()=>{var W,ae,de;return(W=t.slots)!=null&&W.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((de=e.fixedBottom)==null?void 0:de.height)??Rn:0}),{resolveClassName:b}=fe(),{renderScrollLoading:y}=KL(e,t),N=a.computed(()=>Te({[b("table")]:!0},DL(e.border))),w=a.computed(()=>({height:ar(e.height),maxHeight:ar(e.maxHeight),minHeight:ar(e.minHeight)})),C=a.computed(()=>Te({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var de,ee,ue,ce;const W=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,ae=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--shadow-right",W),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--shadow-left",ae)},x=cm(()=>{var W,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x",`${d.value+o.value}px`),(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--drag-offset-h-x",`${d.value-2}px`),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--translate-y",`${l.value}px`),(Ne=(ge=n.value)==null?void 0:ge.style)==null||Ne.setProperty("--translate-x",`${o.value}px`),(Ae=(Oe=n.value)==null?void 0:Oe.style)==null||Ae.setProperty("--translate-x-1",`-${o.value}px`),S()}),O=W=>{o.value=W,x()},T=W=>{g.value=W},E=W=>{l.value=W,x()},V=()=>{var W,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x","-1000px"),(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--translate-y","0px"),(Ne=(ge=n.value)==null?void 0:ge.style)==null||Ne.setProperty("--translate-x","0px"),(Ae=(Oe=n.value)==null?void 0:Oe.style)==null||Ae.setProperty("--translate-x-1","0px")},_=W=>{d.value=W,x()},A=z0(e),P=a.computed(()=>Xe(A,"height",["thead"])*g.value),D=a.computed(()=>{var W;return{"--row-height":`${P.value}px`,"--background-color":dv[((W=e.thead)==null?void 0:W.color)??Ao.DEF1],paddingRight:e.scrollbar?null:`${uv}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Te({[b("table-footer")]:!0,"is-hidden":te.value===0})),H=W=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[W,a.createVNode(GL,null,{default:()=>{var ae,de;return[(de=(ae=t.slots).default)==null?void 0:de.call(ae)]}})]),L=(W,ae,de)=>a.createVNode("div",{ref:r,style:D.value,class:C.value},[W==null?void 0:W(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[de==null?void 0:de()]),ae==null?void 0:ae()]),R=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:R.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const W=e.showHead?P.value:0,ae=te.value+W+v.value;return`calc(${w.value.maxHeight} - ${ae}px)`}return null}),I=W=>W-P.value-v.value-te.value,q=(W,ae=!0)=>{if(ae){z.value=I(W);return}z.value=W},K=W=>{z.value=W},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=W=>{te.value=W},ne=Un((...W)=>{t.emit(ze.SCROLL_BOTTOM,{...W})}),oe=()=>{var de,ee,ue,ce;const W=((ee=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ee.scrollWidth)??0,ae=((ce=(ue=s.value)==null?void 0:ue.refRoot)==null?void 0:ce.offsetWidth)??0;f.value=W-ae-(o==null?void 0:o.value)},re=W=>{p.value=W},X=W=>{c.value=u.bottom??0;const ae=W[1],{translateX:de,translateY:ee,pos:ue={}}=ae;O(de),E(ee),oe(),Object.assign(u,ue||{});const{bottom:ce}=ue;ce<=2&&c.value>ce&&ne({...ue,translateX:de,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[b("table-body-content")]:!0,[b("stripe")]:e.stripe})),ie=a.computed(()=>({[b("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=b("table-fixed-bottom"),Z=a.computed(()=>{var W,ae,de;return{minHeight:`${((W=e.fixedBottom)==null?void 0:W.minHeight)??Rn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((de=e.fixedBottom)==null?void 0:de.height)??null}});a.onMounted(()=>{oe(),V()});const le=()=>{const W=y==null?void 0:y();return W?a.createVNode("div",{style:Z.value,class:pe},[W]):null};return{renderContainer:H,renderHeader:L,renderBody:(W,ae,de)=>a.createVNode(cs,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:W,maxHeight:k.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>ae==null?void 0:ae((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:ie.value},[de==null?void 0:de()])]}),renderFooter:W=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[W]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:q,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:O,setDragOffsetX:_,setFixedColumns:W=>{h.length=0,h.push(...W)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},XL=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{tr(e.value)&&(i(),s=wv(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},JL=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},ZL=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=De("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Eo,{description:n.value,scene:"part",type:r.value},null)}}),lf=a.defineComponent({name:"TableCell",props:{column:Vo,row:m.any.def({}),parentSetting:j0,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:Ce("ResizerWay",{default:hv.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:ar(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:y="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var w;const N=f();return y?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var E,V;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(y.allowHtml);let S=()=>C,x={},O="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,w=y.resizerWay||"debounce",S=()=>y.content||C,typeof y.content=="function"&&(S=()=>y.content(e.column,e.row)),T=y.watchCellResize,O=y.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof y=="boolean"&&(_=!y),typeof y=="object"&&(_=y.disabled),N=_,O="static",typeof e.column.explain=="object"&&(S=()=>Xe(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(E=e.column)==null?void 0:E.showOverflowTooltip)==null?void 0:V.showHead)??!0),O="auto",S=()=>{var _,A;return((A=(_=f())==null?void 0:_.cloneNode)==null?void 0:A.call(_,!0))??""},e.headExplain&&(O="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:O,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var y,N;return e.isHead?(N=(y=n.value)==null?void 0:y.querySelector)==null?void 0:N.call(y,".head-text"):n.value},u=()=>{const y=f();if(!y||!tr(y))return;const{mode:N,disabled:w}=d();if(r.value=!w,N==="auto"&&(r.value=k9(y)),N==="static"&&(r.value=!0),r.value){const C=a.ref(d());l===null&&(l=g0(y,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:w}=d();y||(u(),w!==!1&&e.observerResize&&(h=wv(n.value,()=>{u()},60,!0,N),h.start()))};let g=null;const v=()=>{e.intersectionObserver&&(g=new IntersectionObserver(y=>{if(y[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{v(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const b=e.headExplain||e.column.explain;return()=>{var y;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,b?"explain":""]},[s.value?(y=t.default)==null?void 0:y.call(t):"--"])}}}),$s=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),QL=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:d,getStore:f,setStore:u,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),d.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,ye.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,ye.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(ze.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},O=()=>{if(d.value){const _=u(s,i);if(_){const{start:A,end:P}=f(),D=A.index<P.index?A.index:P.index,M=A.index<P.index?P.index:A.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{Ni(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(ze.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,_e.ROW_SELECTION_INDETERMINATE),E=t.getRowAttribute(s,_e.ROW_SELECTION),V=Ni(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:O,disabled:!V,indeterminate:T,modelValue:E,onChange:x},null)},v=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(O=>O===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):yg(x),b=()=>{var T;const x=()=>{if(Xe(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),_e.ROW_INDEX);const V=Xe(o,"field",[o,s]),_=wi(s,V);if(typeof o.render=="function")return y();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(v(_)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:o,index:i}):A}return _},O={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=O[o.type])==null?void 0:T.call(O,s,o,i,t))??x()},y=()=>{const x=wi(s,Xe(o,"field",[o,s])),O=s;return o.render({cell:x,data:O,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,E;const O=t.getRowAttribute(s,_e.ROW_EXPAND)?a.createVNode(ts,null,null):a.createVNode(ss,null,null);return a.createVNode("span",null,[[O,((E=(T=n.slots).expandContent)==null?void 0:E.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,_e.ROW_EXPAND)),n.emit(ze.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var O,T;return typeof o.render=="function"?y():((T=(O=n.slots).expandCell)==null?void 0:T.call(O,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:O=>w(O)},[x()])},S=()=>{var E,V,_;const x=((E=e.rowDraggable)==null?void 0:E.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const O=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(ao,{style:`'--font-size: ${O};'`,class:"drag-cell"},null)};return{renderCell:b}},Nv=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const d=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,u=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(d){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return u&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),u=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(u==null?void 0:u.marginSize)+(u==null?void 0:u.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function w9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Fs=32,eA=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:un},props:{column:Vo,height:m.number.def(Fs)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=Nv(),s=De("table"),i=a.computed(()=>{var L;return(L=e.column)==null?void 0:L.filter}),o=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.checked)??[]}),l=a.ref(""),c=a.ref(),d=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,L=>{f.checked.length=0,f.checked=[],f.checked.push(...L.value)},{deep:!0});const u=a.computed(()=>Te({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=Te({[n("table-head-filter")]:!0}),p=a.ref(null),g=L=>{f.isOpen=L,L&&setTimeout(()=>{var R;(R=p.value)==null||R.reset()}),L||(l.value="")},v=`light ${n("table-head-filter")}`,b=a.computed(()=>{const{list:L=[]}=i.value;return L.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),y=5,N=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.maxHeight)??Fs*y}),w=a.computed(()=>{const{height:L,list:R=[]}=i.value;return L||R.length*Fs}),C=a.computed(()=>{const L=Fs*2;return b.value.length>y?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(L,R="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),R),O=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:R}=V(_,s.value.confirm);if(R||L){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},E=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(L,R)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:R}),{btnSave:_,btnReset:A}=i.value,P=()=>{const{disabled:L,text:R}=V(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[R]):a.createVNode(Ye,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:O},w9(R)?R:{default:()=>[R]})},D=()=>{const{disabled:L,text:R}=V(A,s.value.reset);return L?"":a.createVNode(Ye,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:E},w9(R)?R:{default:()=>[R]})},M=(L,R)=>{const B=new Set(f.checked);L?B.add(R.value):B.delete(R.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(L=>setTimeout(L,0)),b.value.forEach(L=>{Object.prototype.hasOwnProperty.call(L,"showOverflowTooltip")||(L.showOverflowTooltip=r(`list-item-${L.value}-ref`,c,d))})},H=L=>L.length?(j(),L.map(R=>a.withDirectives(a.createVNode("div",{key:R.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(R.value),immediateEmitChange:!1,label:R.value,modelValue:f.checked.includes(R.value),onChange:B=>M(B,R)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${R.value}-ref`]=B},[`${R.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:R.tipKey||R.text,placement:"right",disabled:!R.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(gt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:Ei.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(ro,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(Bn,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(wo,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(b.value)])]}),a.createVNode("div",{class:"content-footer"},[P(),D()])])})}}),tA=a.defineComponent({name:"HeadSort",props:{column:Vo,defaultSort:m.oneOf(BE).def(Ze.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,d;const{resolveClassName:r}=fe(),s=((d=(c=e.column)==null?void 0:c.sort)==null?void 0:d.value)??e.defaultSort??Ze.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,u)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:u,isCancel:u===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(zi,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===Ze.ASC?"active":""],onClick:f=>l(f,Ze.ASC)},null),a.createVNode(Za,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===Ze.DESC?"active":""],onClick:f=>l(f,Ze.DESC)},null)])}});function nA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const rA=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var D;const o=a.ref(t.getColumnAttribute(s,ye.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,ye.COL_SORT_ACTIVE)),c=a.toRaw(s),d=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,ye.COL_SORT_TYPE)}=M??{},L=j?Ze.NULL:H,R=Cv(s,L,e.sortValFormat);t.setColumnAttribute(s,ye.COL_SORT_TYPE,L),t.setColumnAttribute(s,ye.COL_SORT_FN,R),t.setColumnSortActive(s,L!==Ze.NULL),o.value=L,l.value=L!==Ze.NULL,r.emit(ze.COLUMN_SORT,{column:s,index:i,type:L})},u=()=>a.createVNode(tA,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=L=>{r.emit(ze.COLUMN_FILTER,{checked:L,column:a.unref(s),index:i})},j=L=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,L),r.emit(ze.COLUMN_FILTER_SAVE,{values:L})},H=()=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(eA,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=z0(e),{cellFn:g}=p,v=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):Xe(s,"label",[i]),b=()=>{const M=[];s.sort&&M.push(u()),s.filter&&M.push(h());const j=v();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:L}},y=(M,j="current")=>{t.setColumnAttribute(s,ye.SELECTION_VAL,M),t.setColumnAttribute(s,ye.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(ze.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{y(!0,M)},{resolveClassName:w}=fe(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,ye.SELECTION_DISABLED),j=t.getColumnAttribute(s,ye.SELECTION_VAL),H=t.getColumnAttribute(s,ye.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:L=>y(L)},null),a.createVNode(gt,{ref:d,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,onChange:L=>y(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=b();return a.createVNode(lf,{class:M,column:s,headExplain:Xe(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},nA(H)?H:{default:()=>[H]})},O=()=>{if(!t.getColumnAttribute(s,ye.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:FL(t.getColumnRefAttribute(s,ye.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":dv[((D=e.thead)==null?void 0:D.color)??Ao.DEF1]}),E=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(E==null?void 0:E.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":E==null?void 0:E.isGroup,"is-head-group-child":!!(E!=null&&E.parent)}])),A=()=>Xe(s,"label",[i,s]);return{getTH:()=>E!=null&&E.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:E==null?void 0:E.thColspan,rowspan:E==null?void 0:E.thRowspan},[A()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:E==null?void 0:E.thColspan,"data-id":t.getColumnId(s),rowspan:E==null?void 0:E.thRowspan,onClick:()=>O()},t.resolveEventListener(s,i)),[x()])}},aA=e=>{const t=a.ref(!1),n={start:null,end:null},r=u=>{u.key==="Shift"&&(t.value=!0)},s=u=>{u.key==="Shift"&&(t.value=!1,c())},i=(u,h)=>{n.start={index:h??null,row:u??null}},o=()=>{i()},l=(u,h)=>n.start===null&&n.end===null?(n.start={index:h,row:u},!1):(n.end={index:h,row:u},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function sA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const iA=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=De("table"),o=$t();let l={};const c=aA(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,A)=>{const P=`${kL(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,ye.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:ar(P,"auto"),minWidth:ar(D,"auto")}},null)})]),f=()=>{const _=z0(e),A={"--row-height":`${Xe(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:A},[n.columnGroup.map((P,D)=>a.createVNode("tr",null,[P.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=rA({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",A=[...wr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode($s,{key:_},{default:()=>{var P,D;return[a.createVNode("tr",{key:_,style:A},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(P=e.appendLastRow).cellRender)==null?void 0:D.call(P,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode($s,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:A},[n.visibleColumns.map((P,D)=>a.createVNode("td",null,[a.createVNode(lf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,P,D))??P.field??P.prop]}})]))])]})},p=_=>{let A={};const P=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,A,_,P,D);return A=M,H}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var D,M;const A=_??r.pageRowList,P=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return A.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(A)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(ZL,{emptyText:P.value,filterList:A,list:e.data},null)},y=(_,A,P,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,A,P,D)},N=(_,A,P,D)=>{t.emit(ze.ROW_DBL_CLICK,_,A,P,D)},w=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,A,P,D)},C=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,A,P,D)},S=(_,A,P,D,M)=>{var R;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((R=M.get(P))==null?void 0:R.get(D))??{},H=!1;const L=Ci(D,null,_,A,"rowspan");return j>1?(j=j-1,H=!0):L>1&&(j=L,H=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,A,P,D,M,j,H=!1)=>{const L=D.length,R=[...wr(e.rowStyle,[_,A]),{"--row-height":`${g(_,A)}px`}],B=[...wr(e.rowClass,[_,A]),`hover-${e.rowHover}`,A%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,_e.ROW_UID);return[a.createVNode($s,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:R,class:B,"data-row-index":A,draggable:!!e.rowDraggable,onClick:k=>y(k,_,A,D),onDblclick:k=>N(k,_,A,D),onMouseenter:k=>w(k,_,A,D),onMouseleave:k=>C(k,_,A,D)},l),[n.visibleColumns.map((k,I)=>{const q=[n.getFixedStlye(k),...wr(e.cellStyle,[k,I,_,A])],{colspan:K,rowspan:te}=$L(k,I,_,A),{skipCol:$}=n.getColumnAttribute(k,ye.COL_SPAN),{skipRow:Q}=j&&!H?S(_,A,P,k,M):{skipRow:!1},ne={"expand-cell":k.type==="expand"};if(!Q&&!$){let oe;const re=[n.getColumnClass(k,I),n.getColumnCustomClass(k,_),k.align||e.align,...wr(e.cellClass,[k,I,_,A]),{"expand-row":r.getRowAttribute(_,_e.ROW_EXPAND),"is-last":A+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=QL({props:e,rows:r,ctx:t,columns:n,row:_,index:A,column:k,isChild:H,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:A,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:q,class:re,colspan:K,"data-id":X,rowspan:te,onClick:pe=>ie(pe,ze.CELL_CLICK),onDblclick:pe=>ie(pe,ze.CELL_DBL_CLICK)},[a.createVNode(lf,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},sA(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),O(_,B)]},O=(_,A,P)=>{if(r.getRowAttribute(_,_e.ROW_EXPAND)){const M=[...A,{row_expend:!0}],H=`${r.getRowAttribute(_,_e.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,R)=>x(L,R,{},_,{},!1,!0)):a.createVNode($s,{key:H},{default:()=>{var L,R;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((R=(L=t.slots).expandRow)==null?void 0:R.call(L,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(ze.PAGE_LIMIT_CHANGE,_)},E=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(ze.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(ze.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(F0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>E(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:u,renderTBody:b,renderTFoot:V,setDragEvents:v}},oA=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?PL(H,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Ms(L)===Ms(H)):!1:!1,i=(H,L,R)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Xe(e,"rowHeight",[{index:L,type:R??"tbody",row:H}]):Rn,o=()=>{let H=!1,L=!1;n.value.forEach((R,B)=>{const z=Ms(R);let k=BL(z,$t(),e);const I=s(z);I?H=!0:L=!0,t.has(z)||t.set(z,{[_e.ROW_EXPAND]:!1,[_e.ROW_SELECTION]:I,[_e.ROW_UID]:k,[_e.ROW_INDEX]:B+1,[_e.ROW_SELECTION_INDETERMINATE]:!1});const q=t.get(z);k=q[_e.ROW_UID],q[_e.ROW_INDEX]=B+1,q[_e.ROW_HEIGHT]=i(R,B)}),t.set(Xn,{[_e.ROW_SELECTION]:H,[_e.ROW_SELECTION_INDETERMINATE]:H&&L})},l=(H,L)=>({row:H,index:L??c(H,_e.ROW_INDEX),isSelectAll:c(Xn,_e.ROW_SELECTION)}),c=(H,L)=>{var R;return(R=t.get(H))==null?void 0:R[L]},d=H=>{t.set(jE,{[_e.ROW_SPAN]:H})},f=(H,L)=>Ni(e,{row:H,index:L})?c(H,_e.ROW_SELECTION):!0,u=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,_e.ROW_SELECTION))},h=H=>{const L=H??!p();if(t.set(Xn,{[_e.ROW_SELECTION]:L,[_e.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((R,B)=>x(R,L,B));return}r.forEach((R,B)=>x(R,L,B))},p=()=>e.acrossAll?n.value.every((H,L)=>f(H,L)):r.every((H,L)=>f(H,L)),g=()=>e.acrossAll?n.value.some(H=>c(H,_e.ROW_SELECTION)):r.some(H=>c(H,_e.ROW_SELECTION)),v=H=>{h(H)},b=()=>{const H=p();S(Xn,_e.ROW_SELECTION,H),S(Xn,_e.ROW_SELECTION_INDETERMINATE,!H&&g())},y=()=>c(Xn,_e.ROW_SELECTION_INDETERMINATE),N=()=>c(Xn,_e.ROW_SELECTION),w=(H,L)=>{if(L){S(L,_e.ROW_HEIGHT,H);return}n.value.forEach(R=>S(R,_e.ROW_HEIGHT,H))},C=(H,L,R)=>H?c(H,_e.ROW_HEIGHT):i(H,L,R),S=(H,L,R)=>{const B=Ms(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=R)},x=(H,L,R)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,R))),Ni(e,{row:H,index:R??c(H,_e.ROW_INDEX)})&&S(H,_e.ROW_SELECTION,B),b()},O=(H,L)=>{S(H,_e.ROW_INDEX,L)},T=(H,L)=>{S(H,_e.ROW_EXPAND,L)},E=H=>{let L=0;const R=50,B=()=>{const z=L+R;r.push(...H.slice(L,z)),z<H.length&&(L=z,setTimeout(()=>{B()}))};if(H.length>R){B();return}r.push(...H)};return{setRowIndex:O,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,E(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(L=>T(L,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,_e.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,L)=>H+C(L),0),changePageRowIndex:(H,L)=>{const R=r[H];r.splice(L,0,R);const B=H<L?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function lA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const cA=(e,t,n,r)=>{const s=De("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=Nv(),l=FE(s),c=a.ref(!1),d=a.ref(),f=a.ref([]),u=(K,te)=>Xe(K,["id","field","type"],[K,te]),h=()=>({enabled:!0,fields:e.columns.map(K=>Object.assign({},K,{field:K.field||K.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:_a.small}),p=K=>typeof K=="boolean"&&K!==!1?h():K?Object.assign({},h(),K):{enabled:!1},g=a.ref(null),v=a.reactive(h()),b=K=>{Object.assign(v,p(K))};a.watch(()=>[e.settings],()=>{b(e.settings)},{immediate:!0,deep:!0});const y=a.ref(v.size||"small"),N=a.ref(_a.small),w=a.ref(v.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>v.fields||e.columns||[]),O={checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:v.checked||[]},T=()=>{var te;Object.assign(O,{checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:w.value});const K={checked:w.value,size:y.value,height:N.value,fields:a.unref(x)};Object.assign(v,K),n.setColumnAttributeBySettings(v,K.checked),n.setVisibleColumns(),r==null||r(K),(te=g.value)==null||te.hide(),t.emit(ze.SETTING_CHANGE,K)},E=()=>{var K;c.value=O.checkAll,y.value=O.activeSize,N.value=O.activeHeight,w.value=O.checkedFields,(K=g.value)==null||K.hide()},V=()=>{var K;v.trigger==="manual"&&((K=g.value)==null||K.show())},_=K=>{K.stopImmediatePropagation(),K.stopPropagation(),K.preventDefault(),c.value=!c.value;const te=v.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(u(Q,ne))).map((Q,ne)=>u(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,oe)=>u(ne,oe));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},A=a.computed(()=>(v.limit??0)>0),P=v.sizeList||l,D=a.computed(()=>A.value&&(v.limit?v.limit:0)<=w.value.length),M=(K,te)=>K.disabled||D.value&&!w.value.includes(u(K,te)),j=K=>{y.value=K.value,N.value=K.height},H=K=>({"line-size":!0,"is-medium":y.value==="medium",active:K.value===y.value}),L={marginRight:"12px"},R=()=>P.map(K=>a.createVNode("span",{class:H(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((K,te)=>w.value.includes(u(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...v.checked)},{immediate:!0,deep:!0});const k=async()=>{await new Promise(K=>setTimeout(K,0)),x.value.forEach((K,te)=>{Object.prototype.hasOwnProperty.call(K,"showOverflowTooltip")||(K.showOverflowTooltip=o(`field-item-${Xe(K,["id","field","type"],[K,te])}-ref`,d,f))})},I=()=>{var $,Q,ne,oe;let K;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||k(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(es,{class:"icon-close-action",onClick:E},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),A.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),A.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(wo,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":re=>w.value=re},lA(K=x.value.map((re,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(ot,{checked:w.value.includes(u(re,X)),disabled:M(re,X),label:u(re,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${Xe(re,["id","field","type"],[re,X])}-ref`]=J},[Xe(re,["name","label"],[re,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Xe(re,["name","label"],[re,X]),disabled:!re.showOverflowTooltip}]])]})])))?K:{default:()=>[K]}),(oe=(ne=t.slots).setting)==null?void 0:oe.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),R()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ye,{style:L,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Ye,{style:L,onClick:E},{default:()=>[s.value.setting.options.cancel]})])])};return{options:v,renderSettings:()=>e.settings?a.createVNode(gt,a.mergeProps({ref:g,extCls:v.extCls,arrow:!0,placement:"bottom-end",trigger:v.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Yi,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},uA=a.defineComponent({name:"Table",directives:{bkTooltips:un},props:JE,emits:dL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=UL(e),r=oA(e),s=JL(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:d,setBodyHeight:f,setFootHeight:u,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:v,getBodyHeight:b,refBody:y,refRoot:N}=YL(e,t),w=(...ne)=>{var oe;return(oe=y.value)==null?void 0:oe.scrollTo(...ne)};typeof e.rowHeight=="function"?v(ne=>r.getRowHeight(ne.rows[0],ne.index)):v(e.rowHeight);const S=cA(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),v(oe))}),x=WL(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:E,setDragEvents:V}=iA({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=hL(),A=a.getCurrentInstance(),P=()=>{var oe;const ne=((oe=A.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(fv,P);const{renderFixedRows:D,resolveFixedColumnStyle:M}=qL(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:uv)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=fL(n,{afterResize:M}),L=a.ref(!1),R=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const oe=(s.options.current-1)*s.options.limit,re=oe+s.options.limit;return ne.slice(oe,re)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(oe=>{var re;!n.isHiddenColumn(oe.col)&&oe[ye.COL_FILTER_FN]&&((re=oe[ye.COL_FILTER_VALUES])!=null&&re.length)&&(ne=ne.filter((X,J)=>oe[ye.COL_FILTER_FN](oe[ye.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(oe=>{!n.isHiddenColumn(oe.col)&&oe[ye.COL_SORT_FN]&&oe.active&&ne.sort((re,X)=>{let J=null,Y=null;return oe.col.type==="index"&&(J=r.getRowAttribute(re,_e.ROW_INDEX),Y=r.getRowAttribute(X,_e.ROW_INDEX)),oe[ye.COL_SORT_FN](re,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),k=()=>{u(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},I=a.ref(!1),q=Un((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=R(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(w(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;XL(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Er(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{K.value=!1})});const $=()=>{if(e.virtualEnabled){let oe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const re=b(Number(`${e.maxHeight}`.replace("px","")));if(oe>re){f(re,!1);return}}f(oe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{q(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,oe)=>{var re,X;ne<oe&&((X=(re=y==null?void 0:y.value)==null?void 0:re.updateScroll)==null||X.call(re),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(O,S.renderSettings,D),l(r.pageRowList,T,D),o(),d(E())])}}),xv=lt(uA,{Column:QE}),Sv=Le(TT),dA={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},fA=a.defineComponent({name:"Timeline",props:dA,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=fe(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",d=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Te({},`${s} ${o} ${l} ${d} ${c} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}),Tv=Le(fA);var Kt=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Kt||{});const hA={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function mA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function pA(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function gA(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const vA=a.defineComponent({name:"Transfer",props:hA,emits:["change","update:targetList"],setup(e,{emit:t}){const n=De("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?Kt.OBJECT_ARRAY:Kt.BASE_ARRAY:Kt.NOT_ARRAY),o=a.computed(()=>i.value===Kt.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Kt.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case Kt.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case Kt.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=pA(d,f,o),{selectSearchQuery:p,selectListSearch:g}=gA(u,l),v=a.computed(()=>[...g.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1})),b=a.computed(()=>[...h.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(V,_)=>{const A=o.value;return V.some(P=>P[A]===_[A])&&_.disabled},N=()=>{u.value=[...d.value.filter(V=>y(u.value,V))],h.value=[...d.value.filter(V=>!y(u.value,V))],S()},w=()=>{u.value=[...d.value.filter(V=>!y(h.value,V))],h.value=[...d.value.filter(V=>y(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const A=V[o.value],P=_?u:h,D=_?h:u,M=P.value.findIndex(j=>j[o.value]===A);D.value.push(...P.value.splice(M,1)),S()},S=()=>{const V=u.value.map(A=>A[o.value]),_=h.value.map(A=>A[o.value]);t("update:targetList",_),t("change",i.value===Kt.BASE_ARRAY?V:u.value.map(A=>a.toRaw(A)),i.value===Kt.BASE_ARRAY?_:h.value.map(A=>a.toRaw(A)),_)},x=V=>{const _=V==="source"?u:h;r.value[V]=s.value[V].length===_.value.length},O=(V,_)=>{const A=_==="source"?u:h;s.value[_]=V?A.value.map(P=>P[o.value]):[]},T=V=>{const _=V==="left",A=_?u:h,P=_?h:u,D=s.value[_?"source":"target"],M=A.value.filter(j=>D.includes(j[o.value]));A.value=A.value.filter(j=>!D.includes(j[o.value])),P.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:E}=fe();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:v,selectedListSort:b,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:O,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:E}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",d=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,u=c?!t.length:!n.length,h=!!this.multipleSelectList[d].length&&!this.multipleSelectAllValue[d],p=this.multipleSelectList[d].length,g=()=>{u||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(ot,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[d],"onUpdate:modelValue":v=>this.multipleSelectAllValue[d]=v,indeterminate:h,label:f,onChange:v=>this.handleAllChecked(v,d)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:u},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",d=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[d])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(qi,{class:this.resolveClassName("icon")},null):a.createVNode(it,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const d=l==="left",f=l==="left"?"source":"target",u=d?t:n,h=d?"source-option":"target-option",p=d?"left-empty-content":"right-empty-content",g=e?a.createVNode(wo,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},mA(c=u.map(v=>a.createVNode("div",null,[a.createVNode(ot,{class:"checkbox-item",label:v[this.settingCode]},{default:()=>{var b,y;return[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(v=>{var b,y;return a.createVNode("li",{key:v[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(v,d)},[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)])})]);return u.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(Bn,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(mr,{class:this.resolveClassName("icon-search")},null)}),o("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(Ct,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(Ft,null,null)])]):a.createVNode(ho,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),_v=Le(vA);var ft=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(ft||{});const It=(...e)=>!0,yA={nodeClick:It,nodeCollapse:It,nodeExpand:It,nodeChecked:It,nodeDragStart:It,nodeDragOver:It,nodeDragLeave:It,nodeDragSort:It,nodeDrop:It,nodeEnterView:It,nodeSelected:It};var he=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(he||{});const In={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Ov=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Ov||{});const bA={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:Ce("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([st(),m.func]).def("fuzzy"),resultType:st().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(Ce("nodeContentActionType",{}).def(Ov.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},wA=e=>({renderEmpty:t=>a.createVNode(Eo,{scene:"part",type:t},{default:()=>[e.emptyText]})}),CA=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{Er(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const v=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(b){b.forEach(y=>{var N,w,C;if(console.log("entry",y.target),y.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,y))??y;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{Er(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Er(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...v)=>{p==null||p(...v)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,v=p.querySelectorAll("[data-tree-node]"),b=g+h;return Array.from(v).filter(N=>N.offsetHeight+N.offsetTop>=b&&N.offsetTop<b)}}},Do=(e,t)=>{const n=L=>e.schema.get(L),r=(L,R)=>{var B;return(B=n(L))==null?void 0:B[R]},s=(L,R,B,z)=>{if(!e.schema.has(L)){console.warn("node is not in schema, please check",z,L);return}e.schema.set(L,Object.assign({},n(L),{[R]:B}))},i=L=>e.data.find(R=>c(R)===L),o=(L,R,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),R,B,L));return}s(i(L),R,B,L)},l=L=>r(L,he.PATH),c=L=>r(L,he.UUID),d=L=>r(L,he.IS_OPEN),f=L=>r(L,he.HAS_CHILD),u=L=>r(L,he.IS_MATCH),h=L=>r(L,he.IS_CHECKED),p=L=>r(r(L,he.PARENT),he.UUID),g=L=>r(L,he.IS_LOADING),v=L=>r(L,he.PARENT),b=L=>r(L,he.IS_MATCH),y=(L,R)=>{const B=e.data.find(z=>c(z)===L);return r(B,R)},N=L=>typeof L=="string"?y(L,he.IS_ROOT):r(L,he.IS_ROOT),w=L=>{const R=e.data.find(B=>c(B)===L);return p(R)},C=L=>{const R=e.data.find(B=>c(B)===L);return l(R)},S=(L,R)=>{s(L,he.IS_LOADING,R)},x=L=>typeof L=="object"?d(L):typeof L=="string"?y(L,he.IS_OPEN):!1,O=(L,R)=>r(r(L,he.PARENT),R),T=L=>x(r(L,he.PARENT)),E=L=>N(L)||x(L)||T(L),V=(L,R)=>{const z=L.split("-").reduce((k,I)=>{const q=Number(I);return Array.isArray(k)?k[q]:k[t.children][q]},t.data);return R&&Object.assign(z,{[he.UUID]:R}),z},_=L=>L[t.children]??[],A=L=>e.data.find(R=>c(R)===L),P=L=>{let R=L;return typeof R=="string"&&(R=A(R)),N(R)?{[t.children]:t.data}:v(R)},D=L=>({[In[he.IS_LOADING]]:r(L,he.IS_LOADING),[In[he.HAS_CHILD]]:f(L),[In[he.IS_MATCH]]:u(L),[In[he.IS_CHECKED]]:h(L),[In[he.IS_OPEN]]:d(L),[In[he.IS_ROOT]]:N(L),fullPath:r(L,he.PATH),uuid:c(L),parent:r(L,he.PARENT),parentId:c(r(L,he.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:P,getNodePathById:C,getNodeAttrById:y,getNodeParentIdById:w,getParentNodeAttr:O,getParentNode:v,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:d,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:u,isNodeLoading:g,checkNodeIsOpen:E,getSourceNodeByPath:V,getSourceNodeByUID:A,isMatchedNode:b,resolveScopedSlotParam:D,setTreeNodeLoading:S,extendNodeAttr:L=>Object.assign({},L,{[he.TREE_NODE_ATTR]:D(L)}),getChildNodes:_,extendNodeScopedData:L=>({data:L,attributes:D(L)}),getIntersectionResponse:L=>{var q;if(!L)return null;let R=L;Er(L)&&(R=i(L.getAttribute("data-tree-node")));const B=r(R,he.DEPTH),z=r(R,he.IS_ROOT),k=r(R,he.PARENT),I=z?r(R,he.INDEX):(q=k==null?void 0:k[t.children])==null?void 0:q.findIndex(K=>K===R);return{level:B,target:L,index:I,parent:k,node:R,isRoot:z}}}},Ev="1px dashed #c3cdd7",Lv=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:Av(n,e,t,i)},Av=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},Vv=(e,t)=>Av(e,t,"label"),NA=(e,t)=>({"--level-line":Lv(t,"levelLine",e,Ev,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),xA=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[he.DEPTH];if(r){const l=["node"],c=()=>Lv(t,"levelLine",e,Ev,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},SA=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=fe();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},TA=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=fe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},_A=(e,t,n,r,s)=>{OA(e,t,n,{[r]:s})},OA=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},Ca=e=>e??{__IS_NULL:!0},Zs=(e,t,n)=>Array.isArray(t)?t.some(r=>Zs(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,kv=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,Dv=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=Do(t,e),l=(f,u)=>{if(typeof f=="object"&&f!==null){n(u,he.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return _A(r(u),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:u=null,cache:h=!0}=e.async||{};if(typeof u=="function"&&s(f,he.IS_ASYNC)){if(n(f,he.IS_ASYNC_INIT,!0),!s(f,he.IS_CACHED)){n(f,he.IS_CACHED,h);const p=i(f),g=u(f,v=>l(v,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(v=>l(v,f)).catch(v=>console.error("load remote data error:",v)).finally(()=>{o(f,!1),n(f,he.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},d=()=>{const f=t.data.filter(u=>s(u,he.IS_ASYNC)&&u[In[he.IS_OPEN]]&&!s(u,he.IS_ASYNC_INIT));f.length&&Promise.all(f.map(u=>c(u))).then(()=>{d()}).catch(u=>{console.warn(u)})};return{asyncNodeClick:c,deepAutoOpen:d}},EA=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:d,getNodeAttr:f,getNodeId:u,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:v,isNodeOpened:b,isNodeLoading:y,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=Do(n,e),{resolveClassName:O}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:E,deepAutoOpen:V}=Dv(e,n),_=Z=>v(Z)?a.createVNode(no,{class:[O("tree-icon"),O("node-prefix")]},null):a.createVNode(to,{class:[O("tree-icon"),O("node-prefix")]},null),A=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:le,className:se,text:F,style:G}=Z;return a.h(le,{class:se,style:G},F)}return null},P=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??y(Z)?a.createVNode(Zr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(y(Z))return P(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return A(le);if(le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!se)return v(Z)?a.createVNode(ts,{class:O("node-prefix")},null):a.createVNode(ss,{class:O("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let le=null;return typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_type"),le!=="default")?A(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(fo,{class:[O("tree-icon"),O("node-prefix")]},null):null},j=(Z,le)=>{const se=w(Z);if(se){const F=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,F),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},H=(Z,le,se)=>{h(Z).forEach(F=>{Array.isArray(le)?le.forEach((G,U)=>{o(F,G,se[U])}):o(F,le,se),H(F,le,se)})},L=Z=>{var le,se,F;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},R=(Z,le,se)=>{se==null||se.preventDefault(),se==null||se.stopImmediatePropagation(),se==null||se.stopPropagation(),o(Z,he.IS_CHECKED,!!le),le&&o(Z,he.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(ft.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>kv(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:ie},[a.createVNode(ot,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(le,se)=>R(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,F=!0)=>{const G=le===null?!v(Z):!!le;if(G||H(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),F){const U=v(Z)?ft.NODE_EXPAND:ft.NODE_COLLAPSE;t.emit(U,Z,C(Z),d(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(F=>o(Ca(F),le,se));return}o(Ca(Z),le,se)},q=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,F=!1)=>{const G=Ca(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],W=Array.isArray(se)?se:[se];if(F){if(U.forEach((ae,de)=>I(G,ae,W[de])),!p(G)){const ae=w(G);U.forEach((de,ee)=>{f(ae,de)!==se&&K(ae,de,W[ee],F)})}}else U.forEach((ae,de)=>I(G,ae,W[de]))},te=(Z,le,se)=>{if(v(Z)){k(Z,!1,le,!0);return}L(se)&&E(Z).finally(()=>{f(Z,he.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>k(Z,!0,le,!0)}):k(Z,!0,le,!0)})},$=(Z,le)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(le,Z,"expand")},Q=(Z,le=!0,se=!0,F=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let W=Ca(U[0]);if((typeof W=="string"||typeof W=="number"||typeof W=="symbol")&&(W=n.data.find(ae=>u(ae)===W)??{[he.IS_NULL]:!0}),!W[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&W.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,he.IS_SELECTED,!le),e.selected&&e.selected!==i&&l(e.selected,he.IS_SELECTED,!le),o(W,he.IS_SELECTED,le),i=u(W),F&&t.emit(ft.NODE_SELECTED,{selected:le,node:W}),se&&U.length===1&&q(W,!0,!0),f(W,he.IS_ASYNC)&&L(G)&&E(W).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,F,G)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],oe=(Z,le,se)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,se),F.includes("expand")&&(b(Z)||te(Z,le,se)),F.includes("collapse")&&b(Z)&&te(Z,le,se),F.includes("click")){const G=ft.NODE_CLICK;t.emit(G,Z,C(Z),d(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),F=`${se}`.split("-").slice(0,Z+1);if(F.join("-")===se)return!0;const U=F.pop(),W=parseInt(U,10);F.push(`${W+1}`);const ae=F.join("-");return n.data.some(de=>c(de)===ae)},X=Z=>{if(!e.levelLine)return null;const le=F=>({"--depth":F}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((F,G)=>G).filter(F=>re(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:le(se-F),class:"node-virtual-line"},null))},J=Z=>{var le,se,F,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(F=t.slots).default)==null?void 0:G.call(F,x(Z)):[Vv(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var F,G;const se=D(Z);return a.createVNode("div",{key:u(Z),class:TA(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:xA(Z,e,n,le),class:SA(Z,n.schema,e,le),onClick:U=>oe(Z,U,"click")},[a.createVNode("div",{class:[O("node-action"),se?"":"empty-child"],onClick:U=>$(U,Z)},[se]),a.createVNode("div",{class:O("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:O("node-text")},[J(Z)]),(G=(F=t.slots).nodeAppend)==null?void 0:G.call(F,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:E,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:q,setNodeAttribute:K,isIndeterminate:B}},LA=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=Do(r,e),{resolveClassName:u}=fe(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let v="",b=null,y=new WeakMap;const N=L=>L.target.closest("[data-tree-node]"),w=L=>{var B;const R=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(R)},C=(L,R,B)=>{B.forEach(z=>L.classList.remove(z)),R.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const R=N(L),B=w(R);if(B.draggable===!1||h.value&&e.disableDrag(B)){R.classList.add(`${u("tree-drag-disabled")}`);return}R.setAttribute("draggable","true"),R.addEventListener("mouseup",S)},O="drop-before",T="drop-after",E="drop-inner";let V=null;const _=ur(L=>{if(L.preventDefault(),!b)return;const R=N(L);V!==R&&(V==null||V.classList.remove(O,T,E),V=R);const B=l(w(R));y.has(R)||y.set(R,R.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=y.get(R),q=I*g,K=z-k;if(K<q?C(R,[O],[T,E]):K>I-q?C(R,[T],[O,E]):C(R,[E],[O,T]),t.emit(ft.NODE_DRAG_OVER,L,R,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",R.classList.add(`${u("tree-drop-disabled")}`);return}R.classList.add(`${u("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=v;const $=R.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),A=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const R=N(L);L.dataTransfer.setData("text/plain","");const B=R.getAttribute("data-tree-node");v=B,b=R,L.dataTransfer.setData("node-id",B),t.emit(ft.NODE_DRAG_START,L,R)},P=L=>{L.preventDefault(),L.stopPropagation();const R=N(L);if(!R)return;R.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(w(R));if(p.value&&e.disableDrop(B))return;const z=v,k=R.getAttribute("data-tree-node");z!==k&&(V!=null&&V.classList.contains(E)?Reflect.apply(j,void 0,[z,k]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(O))&&Reflect.apply(M,void 0,[z,k]),t.emit(ft.NODE_DROP,L,R,B)),y=new WeakMap,V==null||V.classList.remove(T,O,E),V=null},D=(L,R)=>L!==R,M=(L,R)=>{if(!e.dragSort||!D(L,R))return;const B=s(L),z=s(R);if(!B||!z)return;const k=i(L),I=i(R);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const q=e.children,K=k[q],te=I[q];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(O),te.splice(Q,0,B),te.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),K.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),t.emit(ft.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(L,R)=>{const B=s(L),z=s(R);let k=null;if(d(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const q=c(L,he.INDEX);k==null||k[e.children].splice(q,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=L=>{L.preventDefault();const R=N(L);y.has(R)&&y.delete(R),R.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),R.classList.remove(T,O,E),t.emit(ft.NODE_DRAG_LEAVE,L,R)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",A),L.addEventListener("dragover",_),L.addEventListener("dragleave",H),L.addEventListener("drop",P)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",A),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",H),L.removeEventListener("drop",P)}})},AA=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,d=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:v="fuzzy"}=t.value,y=typeof v=="function"?v:v==="fuzzy"?o:i;return`${g}`.length===0?!1:l(y,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),u=a.computed(()=>n==="tree");return{searchFn:d,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:u,showChildNodes:r}},VA=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const O=new WeakMap;function T(L,R,B,z){if(L!=null&&O.has(L)){const k=O.get(L);if(Object.prototype.hasOwnProperty.call(k,R)&&typeof z=="function"&&Reflect.apply(z,self,[k,R,B,L])){if(k[R]===B)return;Object.assign(k,{[R]:B}),T(k[he.PARENT],R,B,z)}}}function E(L){let R=null;return typeof e.nodeKey=="string"&&(R=L[e.nodeKey]||$t()),R||L[he.UUID]||$t()}const V={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,R)=>Zs(L,e.selected,R),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,R,B,z=void 0){let k=z;z===void 0&&typeof V[B]=="function"&&(k=V[B](R,L));const I=In[B];if(Object.prototype.hasOwnProperty.call(R,I))return R[I];const q=(y==null?void 0:y.get(R))??void 0;let K;return q&&(K=q[B]),K==null&&(K=k),K}function A(L,R){if(!e.selectable)return!1;const B=Zs(R,e.selected,L);return _(L,R,he.IS_SELECTED,B)}function P(L,R,B){var I;const z=_(L,R,he.IS_OPEN),k=O.has(B)?(I=O.get(B))==null?void 0:I[he.IS_OPEN]:!0;return z&&k}function D(L,R,B){if(!kv(e,{data:L,attributes:B}))return!1;const k=Zs(L,e.checked,R);return _(R,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,R,B,z){return L[he.IS_INDETERMINATE]=(z[e.children]||[]).some(k=>{var I;return!(((I=O.get(k))==null?void 0:I[he.IS_CHECKED])??!1)}),!0}function H(L,R=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const q=L[I];if(Array.isArray(q))H(q,R,B,z);else if(typeof q=="object"&&q!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${E(q)}`,$=!!(q[w]||[]).length;let Q=_(te,q,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=P(te,q,B);const ne={[he.DEPTH]:R,[he.INDEX]:I,[he.UUID]:te,[he.PARENT]:B,[he.HAS_CHILD]:$,[he.PATH]:K,[he.IS_ROOT]:B===null,[he.ORDER]:x,[he.IS_SELECTED]:A(te,q),[he.IS_MATCH]:_(te,q,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,q,he.IS_CACHED),[he.IS_ASYNC]:_(te,q,he.IS_ASYNC),[he.IS_LOADING]:_(te,q,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(q,te,ne),ne[he.IS_CHECKED]&&C.push(q),O.set(q,ne),S.push(q),x+=1,Object.prototype.hasOwnProperty.call(q,w)&&H(q[w]||[],R+1,q,K)}}}return H(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(L=>{T(L,he.IS_CHECKED,!0,j)})),[S,O]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=Dv(e,o),d=b=>{s.push(b)},f=(b,y,N=!0)=>{N&&r.has(b)&&r.delete(b),r.set(b,y)},u=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),h=b=>{const y=u(b);return y!==null&&Reflect.apply(y.fn,void 0,[]),(y==null?void 0:y.type)??"once"},p=()=>{Array.from(r.keys()).forEach(b=>{const y=r.get(b);if(Array.isArray(y)){const N=[];y.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>y.splice(w,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,w;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{i.length=0,s.forEach(y=>{Reflect.apply(y,void 0,[b]),i.push(()=>Reflect.apply(y,void 0,[b]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=b=>{f("afterDataUpdate",b)};return(v=e.async)!=null&&v.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:d}},kA=a.defineComponent({name:"Tree",props:bA,emits:yA,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=VA(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:d,isNodeMatched:f,hasChildNode:u,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:v,getParentNode:b,getIntersectionResponse:y}=Do(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:O}=AA(e),T=a.reactive([]),E=re=>{if(w.value){if(O){const J=`${h(re)??""}-`;return o(re)&&(f(re)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(re)&&f(re)}return o(re)},V=a.computed(()=>r.data.filter(re=>E(re))),{getLastVisibleElement:_,intersectionObserver:A}=CA(e),{renderTreeNode:P,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:L,setNodeAttribute:R,isIndeterminate:B}=EA(e,t,r,V,{registerNextLoop:i}),z=qa(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(Vv(re,e),re);X&&T.push(h(re)),R(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(Ca(re),he.IS_CHECKED,X),J&&t.emit(ft.NODE_CHECKED,r.data.filter(Y=>d(Y)),r.data.filter(Y=>B(Y)))};s(re=>{H(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const q=()=>{var re;(re=n.value)==null||re.reset()},K=re=>{if(re==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(re,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re.id)+1});return}if(re.index>=0){n.value.fixToTop({index:re.index});return}const X=p(re);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(re,X=!0,J=!1)=>{k(v(re),X,J)};t.expose({handleTreeNodeClick:D,isNodeChecked:d,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:u,setOpen:M,setChecked:k,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:K,asyncNodeClick:L,getData:I,reset:q,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=wA(e);LA(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>P(ie,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([re,X,J])=>{var Y,ie,pe,Z;if(A.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),F=y(se[0]);(ie=(Y=A.value)==null?void 0:Y.callback)==null||ie.call(Y,F),t.emit(ft.NODE_ENTER_VIEW,F);return}const le=y(J.slice(-1)[0]);(Z=(pe=A.value)==null?void 0:pe.callback)==null||Z.call(pe,le),t.emit(ft.NODE_ENTER_VIEW,le);return}},{resolveClassName:oe}=fe();return()=>a.createVNode(cs,{ref:n,style:NA(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}}),Iv=Le(kA),Qn="upload";var yn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(yn||{}),cf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(cf||{}),Cr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Cr||{});const C9=[yn.BUTTON,yn.DRAGGABLE,yn.PICTURE],N9=[cf.FORMDATA,cf.BINARY],Et={type:{type:String,default:"formdata",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${N9.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||C9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${C9.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function x9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const DA=a.defineComponent({name:"UploadList",props:{theme:Et.theme,disabled:Et.disabled,files:Et.files,multiple:Et.multiple,isShowPreview:Et.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=De("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),d=`${s(Qn)}-list`,f=a.computed(()=>i.value===yn.PICTURE),u=a.computed(()=>f.value&&!l.value),h=a.computed(()=>Te({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--disabled`]:o.value}));function p(x){const O=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${O[T]}`}function g(x,O,T){n("preview",x,O,T)}function v(x,O){n("remove",x,O)}function b(x,O){n("retry",x,O)}const y=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},x9(x=e.files.map(O=>{const T=Te({[`${d}__item`]:!0,[`${d}__item-picture`]:!0,[`${d}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):N(O)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ja,{width:50,class:`${d}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${d}__picture-item-actions`},[c.value&&a.createVNode(Jr,{class:"action-icon",onClick:O=>g(x,e.files,O)},null),a.createVNode(zr,{class:"action-icon",onClick:O=>v(x,O)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},x9(x=e.files.map(O=>{const T=Te({[`${d}__item`]:!0,[`${d}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):S(O)])}))?x:{default:()=>[x]})},C=x=>{var A;const O=(A=x==null?void 0:x.raw)==null?void 0:A.type,[T]=(O==null?void 0:O.split("/"))||"";let V={text:_r,image:so,application:_r,video:go,audio:Ki}[T]||_r;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(V=Ui),a.h(V,{class:`${d}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${d}__item-icon`},[x.isPic?a.createVNode("img",{class:`${d}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${d}__item-summary`},[a.createVNode("div",{class:`${d}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${d}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(hr,{class:`${d}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ja,{class:`${d}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${d}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${d}__item-actions`},[x.status==="fail"&&a.createVNode(lo,{class:`${d}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(zr,{class:`${d}__item-del-icon`,onClick:O=>v(x,O)},null)])])];return()=>{var x,O,T;return a.createVNode(a.Fragment,null,[u.value?(O=t==null?void 0:t.innerTrigger)==null?void 0:O.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?y():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),S9=a.defineComponent({name:"UploadTrigger",props:{theme:Et.theme,disabled:Et.disabled,multiple:Et.multiple,accept:Et.accept,file:{type:Object},selectChange:Et.selectChange,isShowPreview:Et.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=De("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,file:l,multiple:c,accept:d,isShowPreview:f}=a.toRefs(e),u=`${s(Qn)}-trigger`,h=a.computed(()=>i.value===yn.BUTTON),p=a.computed(()=>i.value===yn.DRAGGABLE),g=a.computed(()=>i.value===yn.PICTURE),v=a.computed(()=>g.value&&!c.value),b=a.computed(()=>g.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),y=a.ref(null),N=a.computed(()=>{var j;return Te({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:v.value,[`${u}--has-file`]:l.value??!1,[`${u}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${u}--dragover`]:E.value,[`${u}--disabled`]:o.value})}),w=()=>{y.value.value=null,y.value.click()},C=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function O(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const E=a.ref(!1),V=()=>{const j=B=>{var k;if(o.value)return;if(B.preventDefault(),E.value=!1,e.selectChange&&((k=e.selectChange)==null?void 0:k.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),E.value=!0},L=()=>{E.value=!1},R=Te({[`${u}__draggable`]:!0});return a.createVNode("div",{class:R,onDragleave:L,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Pa,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${u}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?P(e.file):A()]),A=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(as,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),P=j=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(ja,{width:50,class:`${u}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[f.value&&a.createVNode(Jr,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(zr,{class:"action-icon",onClick:H=>O(j,H)},null)])])],D=()=>a.createVNode(Ye,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Pa,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return D();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:y,class:`${u}__input-file`,accept:b.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var Ad={exports:{}},T9;function IA(){return T9||(T9=1,function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(y,N){var w=y[0],C=y[1],S=y[2],x=y[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,y[0]=w+y[0]|0,y[1]=C+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y.charCodeAt(w)+(y.charCodeAt(w+1)<<8)+(y.charCodeAt(w+2)<<16)+(y.charCodeAt(w+3)<<24);return N}function o(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y[w]+(y[w+1]<<8)+(y[w+2]<<16)+(y[w+3]<<24);return N}function l(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,O,T,E;for(C=64;C<=N;C+=64)s(w,i(y.substring(C-64,C)));for(y=y.substring(C-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return O=N*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(O[2],16),E=parseInt(O[1],16)||0,x[14]=T,x[15]=E,s(w,x),w}function c(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,O,T,E;for(C=64;C<=N;C+=64)s(w,o(y.subarray(C-64,C)));for(y=C-64<N?y.subarray(C-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return O=N*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(O[2],16),E=parseInt(O[1],16)||0,x[14]=T,x[15]=E,s(w,x),w}function d(y){var N="",w;for(w=0;w<4;w+=1)N+=r[y>>w*8+4&15]+r[y>>w*8&15];return N}function f(y){var N;for(N=0;N<y.length;N+=1)y[N]=d(y[N]);return y.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=y(N,C),x=C,O,T,E,V;return w!==n&&(x=y(w,C)),S>x?new ArrayBuffer(0):(O=x-S,T=new ArrayBuffer(O),E=new Uint8Array(T),V=new Uint8Array(this,S,O),E.set(V),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var w=y.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=y.charCodeAt(x);return N?S:C}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,w){var C=new Uint8Array(y.byteLength+N.byteLength);return C.set(new Uint8Array(y)),C.set(new Uint8Array(N),y.byteLength),C}function v(y){var N=[],w=y.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(y.substr(C,2),16));return String.fromCharCode.apply(String,N)}function b(){this.reset()}return b.prototype.append=function(y){return this.appendBinary(u(y)),this},b.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},b.prototype.end=function(y){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(y,N){var w=N,C,S,x;if(y[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,y),w=0;w<16;w+=1)y[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,y[14]=S,y[15]=x,s(this._hash,y)},b.hash=function(y,N){return b.hashBinary(u(y),N)},b.hashBinary=function(y,N){var w=l(y),C=f(w);return N?v(C):C},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),w=N.length,C;for(this._length+=y.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var y=b.prototype.getState.call(this);return y.buff=p(y.buff),y},b.ArrayBuffer.prototype.setState=function(y){return y.buff=h(y.buff,!0),b.prototype.setState.call(this,y)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(y,N){var w=c(new Uint8Array(y)),C=f(w);return N?v(C):C},b})}(Ad)),Ad.exports}var PA=IA();const _9=Je(PA),Mn="An error occurred during upload";function Oa(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const RA=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(Mn);const c=Oa(t);c&&(l=new Error(c.message||Mn)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=Oa(t);let c=new Error(Mn);return l&&(c=new Error(l.message||Mn)),e.onError(c)}e.onSuccess(Oa(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const c=l.name,d=l.value;t.setRequestHeader(c,d)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))L9(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},Pv=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,MA=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await FA(n,t),i=[];$A(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=Oa(l);if(l.status<200||l.status>=300){let d=new Error(Mn);return c&&(d=new Error(c.message||Mn)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},$A=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,d)=>{const f=o*i,u=Math.min(t.size,f+i),h=new FormData;if(e.data){let v=e.data;Array.isArray(v)||(v=[v]),v.forEach(b=>{for(const[y,N]of Object.entries(b))Array.isArray(N)?h.append(y,...N):h.append(y,N)})}if(e.formDataAttributes){let v=e.formDataAttributes;Array.isArray(v)||(v=[v]),v.forEach(b=>{Array.isArray(b.value)?h.append(b.name,...b.value):h.append(b.name,b.value)})}h.append("file",Pv.call(t,f,u)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const v=Oa(p);if(p.status<200||p.status>=300){d(v);let b=new Error(Mn);v&&(b=new Error(v.message||Mn)),e.onError(b)}else c("reponseText")}},p.upload.addEventListener("progress",v=>{const b=v;e.onProgress(b,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(v=>{const b=v.name,y=v.value;p.setRequestHeader(b,y)});else{const v=e.header.name,b=e.header.value;p.setRequestHeader(v,b)}const g=e.headers||{};if(g instanceof Headers)g.forEach((v,b)=>p.setRequestHeader(b,v));else for(const[v,b]of Object.entries(g))L9(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},FA=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new _9.ArrayBuffer,l=new FileReader;function c(){const d=i*t,f=d+t>=e.size?e.size:d+t;l.readAsArrayBuffer(Pv.call(e,d,f))}l.onload=d=>{if(o.append(d.target.result),i+=1,i<s)c();else{const f=o.end(),u=new _9;u.append(f),u.append(e.name);const h=u.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function O9(e){return Date.now()+e}const HA=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var b;o+=1,h.uid=O9(o);const p={uid:h.uid,name:h.name,status:Cr.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let v=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(y){console.error(y)}p.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(p.name))&&(p.status=Cr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Cr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Cr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),s.value.push(p),v}async function c(h){var v;const p=h instanceof File?i(h):h,g=b=>{var y;t.onRemove(b,s.value),s.value.splice(s.value.indexOf(p),1),(y=b.url)!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((v=e.beforeRemove)==null?void 0:v.call(e,p,s.value))!==!1&&g(p):g(p)}async function d(h,p,g){const v=i(p);v&&(v.status="fail",v.statusText=h.message,v.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function u(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??O9(o),status:p.status??Cr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},BA=a.defineComponent({name:"Upload",props:Et,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=fe(),i=a.shallowRef({}),o=a.computed(()=>e.theme===yn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Te({[`${s(Qn)}`]:!0,[`${s(Qn)}--${e.theme}`]:!0,[`${s(Qn)}--disabled`]:e.disabled,[`${s(Qn)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),d=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(O,T){x(O),n("delete",O,T)}const{fileList:u,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:v,handleError:b}=HA(e,{onRemove:f});function y(O){if(!O.length)return;if(e.limit>1&&u.value.length+O.length>e.limit){n("exceed",O,u.value);return}!e.multiple&&e.limit===1&&(u.value=[]);let T=O;(!e.multiple||e.limit===1)&&(T=O.slice(0,1));for(const E of T){const V=E,_=h(V);if(_){n("error",V,u.value,_);return}e.autoUpload&&C(V,T)}}function N(O,T){n("preview",O,T)}function w(O){S(O.raw)}async function C(O,T){var V;if(!e.beforeUpload)return S(O,T);let E;try{E=await((V=e.beforeUpload)==null?void 0:V.call(e,O,T))}catch{E=!1}if(E===!1){p(O);return}S(O,T)}function S(O,T){const{type:E,headers:V,header:_,data:A,formDataAttributes:P,method:D,withCredentials:M,name:j,url:H,sliceUrl:L,mergeUrl:R,chunkSize:B,customRequest:z}=e,{uid:k}=O,I={type:E,headers:V,header:_,withCredentials:M,file:O,data:A,formDataAttributes:P,method:D,filename:j,action:H,sliceUrl:L,mergeUrl:R,chunkSize:B,onProgress:te=>{g(te,O),n("progress",te,O,u.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))v(te,O),n("success",te,O,u.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");b(ne,O,te),n("error",O,u.value,ne)}delete i.value[k]},onError:te=>{b(te,O),n("error",O,u.value,te),delete i.value[k]},onComplete:()=>{T&&T.indexOf(O)===T.length-1&&n("done",u.value)}};let q=e.sliceUpload?MA:RA;z&&(q=z);const K=q(I);i.value[k]=K,K instanceof Promise&&K.then(I.onSuccess,I.onError)}function x(O){let T=i.value;O&&(T={[O.uid]:i.value[O.uid]}),Object.keys(T).forEach(E=>{if(T[E]instanceof XMLHttpRequest){const V=T[E];V==null||V.abort()}delete i.value[E]})}return a.onBeforeUnmount(()=>{u.value.forEach(({url:O})=>{O!=null&&O.startsWith("blob:")&&URL.revokeObjectURL(O)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(S9,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(Qn)}__tip`},[e.tip]),a.createVNode(DA,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:O=>o.value&&a.createVNode(S9,a.mergeProps(d.value,{file:O,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),Rv=Le(BA),Vd=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:p0,Affix:Em,Alert:Am,AnimateNumber:Vm,Backtop:km,Badge:Dm,Breadcrumb:Pm,Button:Ye,Card:sp,Cascader:Pp,Checkbox:ot,CodeDiff:jp,Collapse:Up,ColorPicker:dg,ConfigProvider:Om,Container:fg,DatePicker:og,Dialog:mg,Divider:pg,Dropdown:gg,Exception:Eo,FixedNavbar:vg,Form:bg,InfoBox:Cg,Input:Bn,Link:xg,Loading:$n,Menu:Tg,Message:kg,Modal:ds,Navigation:Dg,Notify:Pg,OverflowTitle:ap,Pagination:F0,PopConfirm:Rg,Popover:gt,Popover2:Mg,Process:$g,Progress:ja,Radio:mi,Rate:jg,ResizeLayout:zg,SearchSelect:Xg,Select:x0,Sideslider:Zg,Slider:Qg,Steps:tv,Swiper:nv,Switcher:rv,Tab:ov,Table:xv,Tag:Fa,TagInput:Ap,TimePicker:Sv,Timeline:Tv,Transfer:_v,Tree:Iv,Upload:Rv,VirtualRender:cs,scrollbar:C0},Symbol.toStringTag,{value:"Module"})),E9=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(Vd).forEach(s=>{const i=Vd[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,Vd[s])}),n&&Af(n,t)},jA={createInstall:E9,install:E9()},Mv="2.0.2-beta.43";window.__bkui_vue_version__=Mv;exports.$bkPopover=p0;exports.Affix=Em;exports.Alert=Am;exports.AnimateNumber=Vm;exports.Backtop=km;exports.Badge=Dm;exports.Breadcrumb=Pm;exports.Button=Ye;exports.Card=sp;exports.Cascader=Pp;exports.Checkbox=ot;exports.CodeDiff=jp;exports.Collapse=Up;exports.ColorPicker=dg;exports.ConfigProvider=Om;exports.Container=fg;exports.DatePicker=og;exports.Dialog=mg;exports.Divider=pg;exports.Dropdown=gg;exports.Exception=Eo;exports.FixedNavbar=vg;exports.Form=bg;exports.InfoBox=Cg;exports.Input=Bn;exports.Link=xg;exports.Loading=$n;exports.Menu=Tg;exports.Message=kg;exports.Modal=ds;exports.Navigation=Dg;exports.Notify=Pg;exports.OverflowTitle=ap;exports.Pagination=F0;exports.PopConfirm=Rg;exports.Popover=gt;exports.Popover2=Mg;exports.Process=$g;exports.Progress=ja;exports.Radio=mi;exports.Rate=jg;exports.ResizeLayout=zg;exports.SearchSelect=Xg;exports.Select=x0;exports.Sideslider=Zg;exports.Slider=Qg;exports.Steps=tv;exports.Swiper=nv;exports.Switcher=rv;exports.Tab=ov;exports.Table=xv;exports.Tag=Fa;exports.TagInput=Ap;exports.TimePicker=Sv;exports.Timeline=Tv;exports.Transfer=_v;exports.Tree=Iv;exports.Upload=Rv;exports.VirtualRender=cs;exports.bkEllipsis=rw;exports.bkEllipsisInstance=g0;exports.bkLoading=Mm;exports.bkTooltips=un;exports.clickoutside=ln;exports.default=jA;exports.defaultRootConfig=or;exports.mousewheel=hw;exports.overflowTitle=Cw;exports.provideGlobalConfig=Af;exports.rootProviderKey=Hr;exports.scrollbar=C0;exports.setPrefixVariable=Md;exports.useGlobalConfig=Q8;exports.useLocale=De;exports.usePrefix=fe;exports.version=Mv;
|
361
|
+
`,E={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${d}-circle-trail`)}`,style:O};return a.createVNode("div",{style:v,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",E,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},YO=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=fe(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:d,textInside:f,theme:u}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(v=!0)=>(d||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${u}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function c9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const XO={extCls:m.string,type:Q5(),percent:m.number.def(0),theme:m.theme().def(Oi.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:Z5(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},JO=a.defineComponent({name:"Progress",props:XO,setup(){const{resolveClassName:e}=fe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(YO,t,c9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(KO,t,c9(e)?e:{default:()=>[e]}));const r={class:Te({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),ja=Le(JO),Fg=Symbol("RadioGroup");function Hg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Bg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Fg,um),s=!dm(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,u=>{i.value=u===t.label},{immediate:!0})):a.watch(()=>t.modelValue,u=>{u!==""&&(i.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{i.value=u},f=u=>{if(c.value||o.value)return;const h=u.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const v=i.value?t.label:"";return n("update:modelValue",v),n("change",v),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:d,handleChange:f}},ZO={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:Kr().def(()=>!0)},QO=a.defineComponent({name:"Radio",props:ZO,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Bg(),{resolveClassName:c}=fe();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Te({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),eE={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:Kr().def(()=>!0)},tE=a.defineComponent({name:"RadioButton",props:eE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Bg(),{resolveClassName:c}=fe();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Te({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),nE={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:Kr().def(()=>!0)},rE=a.defineComponent({name:"RadioGroup",props:nE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Bt(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=c=>{const d=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(Fg,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=fe();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),mi=lt(QO,{Group:rE,Button:tE}),Ds=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},r=(d,f)=>{if(!e.editable)return;const u=d+1;t("changeHover",u),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=d=>{e.editable&&a.nextTick(()=>{d.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=fe(),o=d=>Te({[`${i("is-select")}`]:d<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:u=>r(f,u),onMouseleave:u=>s(u)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),aE=a.defineComponent({name:"Rate",components:{star:Ds},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),r=Bt(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=Te({[`${n("rate")}`]:!0}),d={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const h=Math.floor(e.modelValue),p=(d.width+3)*h,g=d.width*(e.modelValue-h);return{width:`${p+g}px`}}),u={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(Ds,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(Ds,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(Ds,a.mergeProps({editable:!1,rate:0},u),null)]])}}),jg=Le(aE),sE=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:d,collapsible:f,isCollapsed:u}=a.toRefs(e),h=a.ref(u.value),p=a.ref(!0),g=a.ref(!1),v=a.ref(null),b=a.ref({}),y=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),O=a.computed(()=>{let k=r.value;return l.value!==3&&typeof k!="number"?`${l.value}px`:(typeof k=="number"&&(k=k<=l.value?`${l.value}px`:`${k}px`),k)}),T=a.computed(()=>f.value&&u.value?{[x.value]:"0px"}:{[x.value]:O.value}),E=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>d.value?typeof d.value=="boolean"?50:d.value:0),_=()=>{const k=y.value.getBoundingClientRect();v.value=S.value?k.width:k.height};let A=new ResizeObserver(_);const P=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${b.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${b.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${b.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${b.value.aside.height}px 0`;break}},D=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=k=>Math.min(o.value,Math.max(l.value,k),v.value-i.value),j=k=>{t("before-resize",k);const I=C.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const q=$=>{t("resizing",$)},K=$=>{let Q;switch(n.value){case"top":Q=$.clientY-b.value.mouse.clientY;break;case"right":Q=b.value.mouse.clientX-$.clientX;break;case"bottom":Q=b.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-b.value.mouse.clientX}const ne=b.value.aside[x.value]+Q,oe=M(ne)+s.value,re=`${oe}px`;c.value?C.value.style[x.value]=re:N.value.style[n.value]=re,q(oe)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},H=()=>{if(!d.value)return!1;const k=C.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=V.value,!g.value)return p.value=!0,!1;R(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,R(),t("collapse-change",h.value)},R=()=>{const k=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||O.value)},B=k=>{const I=()=>{p.value=k,C.value.style.transition="",C.value.removeEventListener("transitionend",I)};C.value.addEventListener("transitionend",I),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(u,()=>{h.value=u.value,L(h.value)}),a.onMounted(()=>{A.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(A.unobserve(y.value),A=null)});const{resolveClassName:z}=fe();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:v,state:b,vertical:S,cssPropKey:x,bkResizeLayoutRef:y,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:E,asideStyle:T,handleMousedown:j,setCollapse:L,resolveClassName:z}},render(){var t,n,r,s,i,o;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(Ct,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(Ft,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),zg=Le(sE);var _d=null;function iE(e){return _d||(_d=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),_d(e)}var Od=null;function oE(e){Od||(Od=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Od(e)}function lE(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function Is(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Ug(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function rf(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(Ug(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var cE='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',af=0,Xs=null;function uE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=hE.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||pi(e)}),o=rf(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){pi(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(af||(Xs=lE(cE)),mE(e),e.__resize_rendered__=rf(e).rendered,window.MutationObserver){var d=new MutationObserver(e.__resize_mutation_handler__);d.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=d}}e.__resize_listeners__.push(t),af++}function dE(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",H0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--af&&Xs&&Xs.parentNode.removeChild(Xs)}}function fE(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function hE(){var e=rf(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(B0(this),this.addEventListener("scroll",H0,!0)),this.__resize_rendered__=t,pi(this))}function H0(){var e=this;B0(this),this.__resize_raf__&&oE(this.__resize_raf__),this.__resize_raf__=iE(function(){var t=fE(e);t&&(e.__resize_last__=t,pi(e))})}function pi(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function mE(e){var t=Ug(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=Is("div",{className:"resize-triggers"}),r=Is("div",{className:"resize-expand-trigger"}),s=Is("div"),i=Is("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},B0(e),e.addEventListener("scroll",H0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function B0(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,d=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=d,n.scrollTop=f}var Ot=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(Ot||{});const Wg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),pE=e=>{a.provide(Wg,e)},qg=()=>a.inject(Wg);var Dn=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(Dn||{});const Gg=/(\||,|、|\r\n|\n)/gm,Kg=/^(\||,|、|\r\n|\n)$/;var qr=(e=>(e.AND="&",e.OR="|",e))(qr||{});class xr{constructor(t,n="default"){ve(this,"id");ve(this,"name");ve(this,"values",[]);ve(this,"condition");ve(this,"logical");ve(this,"nameRenderKey",Zn(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Zn(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(Gg).filter(l=>l.trim()&&!Kg.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const gE=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:qr.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=De("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const d=a.computed(()=>{var g,v;return(g=e.list)!=null&&g.length?(v=e.keyword)!=null&&v.length?e.list.filter(b=>b.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:v}=e;if(!(v!=null&&v.trim().length)||!g.toLocaleLowerCase().includes(v.toLocaleLowerCase().trim()))return g;const b=v.trim().length,y=[];let N=-1;return v=v.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${v}`,"igm"),(w,C)=>(y.length===0&&C!==0?y.push(g.slice(0,C)):N>=0&&y.push(g.slice(N+w.length,C)),y.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&y.push(g.slice(N+b)),y.length?y:g}function u(g){var v;return(v=g.value)!=null&&v.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,v){g.stopPropagation(),g.preventDefault(),o(v)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:d,getSearchNode:u,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:i=>this.handleSelectedChange(i,s)},[a.createVNode(ot,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(mi,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(mi,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Yg=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:ln},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:Dn.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=De("searchSelect"),{resolveClassName:s}=fe(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),d=a.ref(!1),f=a.ref(!1),u=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=qa(100,K);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:w,searchData:C}=qg(),S=a.computed(()=>{var U;return((U=u.value)==null?void 0:U.logical)||qr.OR}),x=a.ref(Zn(10)),O=a.ref(!1);a.watch(N,()=>{e.mode===Dn.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var W,ae;f.value&&((W=y.value)==null?void 0:W.some(de=>!de.disabled))?v||(h.value=e.valueBehavior===Ot.NEED_KEY&&((ae=y.value.find(de=>!de.disabled))==null?void 0:ae.id)||"",v=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),v=!1,e.valueBehavior!==Ot.NEED_KEY&&(h.value=""))});function T(U){switch(U.code){case"ArrowDown":case"ArrowUp":E(U);break;case"Enter":case"NumpadEnter":V(U);break}}function E(U){var de;U.preventDefault(),(de=i.value)==null||de.blur();const W=y.value.length;let ae=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<W;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+W)%W;const ue=y.value[ae];if(ue&&!ue.disabled){const ce=document.getElementById(ue.id);ce==null||ce.focus(),h.value=ue.id;break}}}function V(U){var ae;if(!v)return;U.preventDefault();const W=(ae=y.value)==null?void 0:ae.find(de=>de.id===h.value);W&&R(W)}function _(U){var W,ae,de;if(!((W=o.value)!=null&&W.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((de=u.value)!=null&&de.isCustomMenu){e.mode===Dn.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===Dn.EDIT||u.value){u.value&&H().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let A=!1;function P(U){if(!A){if(c.value=!1,e.mode===Dn.EDIT&&u.value&&!d.value){const W=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!W.length)return;U==null||U.preventDefault();const ae=document.createRange(),de=window.getSelection();ae.selectNodeContents(W.at(-1)),de==null||de.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),de.addRange(ae),ne(!0,!1);return}K(),ne(!1,!d.value)}}function D(U){U.preventDefault();const W=U.clipboardData.getData("text").trim();if(!u.value){const ae=J(W);if(ae){u.value=ae,ne(!0,!0);return}l.value=W.split(Gg).filter(de=>de.trim()&&!Kg.test(de)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(W),g()}function M(U){if(O.value)return;re();const W=U.target.innerText;if(u.value){if(u.value&&!W){x.value=Zn(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=W,g();return}l.value=u.value.isSpecialType()?W:W.replace(u.value.name,"").replace(":",""),g()}function j(U){var W;if(!O.value)switch(U.code){case"Enter":case"NumpadEnter":if(U.preventDefault(),e.valueBehavior===Ot.NEED_KEY&&y.value.some(ae=>ae.id===h.value)){!u.value&&((W=l.value)!=null&&W.length)&&U.preventDefault();return}H(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function H(U){var ae,de,ee;return U==null||U.preventDefault(),await new Promise(ue=>setTimeout(ue,0)),u.value?l.value?await $():!((ae=u.value)!=null&&ae.isSpecialType())&&((de=u.value)==null?void 0:de.values.length)<1?(c.value=!c.value,!1):(await q()&&((ee=u.value)!=null&&ee.isCustomMenu&&(f.value=!1),oe()),!1):!l.value||e.valueBehavior===Ot.NEED_KEY?void 0:await te()}function L(U){var W,ae,de;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((W=u.value)!=null&&W.values.length){if(u.value.type==="text"||!((ae=u.value.children)!=null&&ae.length))return;U.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const Ne=((de=ge==null?void 0:ge.dataset)==null?void 0:de.index)||-1;u.value.values.splice(+Ne,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(u.value=null,l.value="",K());w("")}async function R(U,W){var ae,de,ee,ue,ce;if((ae=U.value)!=null&&ae.id){const ge=new xr({...U,id:U.realId??U.id},W);if(ge.addValues(U.value.name,!1),e.valueBehavior===Ot.NEED_KEY&&h.value){oe(ge),ne(!0),h.value="";return}if(u.value=ge,!await q(u.value.values)){u.value=null;return}oe(u.value),ne(!0),h.value="";return}if(!u.value||((de=u.value)==null?void 0:de.type)==="condition"){u.value=new xr(U,W??((ee=u.value)==null?void 0:ee.type)),l.value="";const ge=((ue=u.value)==null?void 0:ue.type)==="condition";ge||t("selectKey",{id:U.id,name:U.name,values:[]}),ge&&oe(),f.value=ge||!!u.value.children.length,ne(e.valueBehavior===Ot.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}u.value&&(u.value.addValue(U),a.nextTick(Y)),await q(u.value.values)&&(u.value.multiple||oe(),e.valueBehavior===Ot.NEED_KEY&&((ce=u.value)!=null&&ce.multiple)&&ne())}function B(U){R(U,"condition")}function z(U){var W;switch(U.id){case"confirm":if(!((W=u.value)!=null&&W.values.length))return;l.value="",H();break;case"cancel":u.value.values=[],f.value=!1;break}}function k(U){u.value&&(u.value.logical=U)}async function I(U,W){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,W)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return w(ae||"校验错误"),!1}return w(""),!0}async function q(U){if(!u.value)return await I(null,U);const{searchItem:W,validate:ae,values:de}=u.value;return ae&&typeof e.validateValues=="function"?await I(W,U??de):(w(""),!0)}async function K(){var W,ae,de,ee,ue;let U=[];if(typeof e.getMenuList=="function"&&(!((W=e.data)!=null&&W.length)&&!u.value||u.value&&u.value.type!=="condition"&&(((ae=u.value.searchItem)==null?void 0:ae.async)===void 0||u.value.searchItem.async===!0)))p.value=!0,U=await e.getMenuList((de=u.value)==null?void 0:de.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(u!=null&&u.value)u.value.type==="condition"?U=e.conditions:(!((ue=u.value.values)!=null&&ue.length)||u.value.multiple||e.mode===Dn.EDIT)&&(U=u.value.children.filter(ce=>ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))U=e.data.filter(ce=>!ce.isSelected).slice();else for(const ce of e.data.filter(ge=>!ge.isSelected))if(ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){U.push(ce);const Ne=[];for(const Oe of ce.children||[])Ne.push({...ce,realId:ce.id,id:Zn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,realId:ce.id,id:Zn(10),value:{id:l.value,name:l.value}}),U.push(...Ne)}else{const Ne=[];for(const Oe of ce.children||[])Oe.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&Ne.push({...ce,realId:ce.id,id:Zn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,value:{id:l.value,name:l.value}}),U.push(...Ne)}if(y.value=U,console.log("list",U),e.valueBehavior===Ot.NEED_KEY){const ce=U.find(ge=>!ge.disabled);ce&&(!h.value||h.value&&!U.some(ge=>ge.id===h.value))&&(h.value=ce.id)}}async function te(){const U=J(l.value),W=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await q(W))return t("add",U||new xr({...W[0]},"text")),l.value="",K(),!0}async function $(){let U=[];if(u.value.isSpecialType()){const ae=J(l.value);ae&&(u.value=ae,U=ae.values)}if(U=U.length?U:u.value.str2Values(l.value),!!await q(U))return u.value.type==="text"?(u.value.name=l.value,u.value.id=l.value):u.value.values=U,t("add",u.value),l.value="",u.value=null,ne(!0),!0}function Q(){if(!i.value)return;const U=document.createRange(),W=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),W.removeAllRanges(),W.addRange(U)}function ne(U=!1,W=!0){U&&setTimeout(K,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&W&&a.nextTick(Q),t("focus",d.value)}function oe(U){var ae;t("add",U??u.value);const W=!((ae=u.value)!=null&&ae.isCustomMenu);u.value=null,l.value="",W&&(ne(!0,W),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(W=>W.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[W,ae]=U.split(":");if(W!=null&&W.trim()){const de=C.value.find(ee=>ee.name===W.trim());if(de){const ee=new xr({...de},"default");return ee.addValues(ae),ee}}}function Y(){var U;(U=l.value)!=null&&U.length&&(l.value="",Array.from(i.value.childNodes).forEach(ae=>{var de;ae.nodeType===Node.TEXT_NODE&&((de=ae.textContent)!=null&&de.trim())&&i.value.removeChild(ae)}))}function ie(){var U;(U=i.value)==null||U.focus()}async function pe(){await H().then(U=>U&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,u.value=null,a.nextTick(X)}function le(U){u.value.values=[{id:U,name:U}],H().then(W=>W&&X())}function se(){u.value||(h.value="")}function F(U){O.value=!1,l.value=U.data,M(U)}function G(){O.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:P,isFocus:d,refleshMenuHover:se}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:b,menuList:y,menuHoverId:h,isFocus:d,isComposition:O,usingItem:u,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:E,handleClickOutside:_,handleInputFocus:P,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:R,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:G}},render(){var f,u;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((u=this.menuList)!=null&&u.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,v;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:b=>b.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(v=(g=this.usingItem)==null?void 0:g.values)==null?void 0:v.map((b,y)=>a.createVNode("span",{key:y,"data-id":b.id,"data-index":y,"data-key":b.name,"data-type":"value"},[b.name,y<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},d=()=>{var h,p,g,v,b;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(gE,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(v=this.usingItem)==null?void 0:v.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(y=>y.id))||[],showLogical:(b=this.usingItem)==null?void 0:b.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(gt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:d})}}),vE=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:i,onEditBlur:o,editKey:l}=qg();function c(g){t("delete",g)}function d(g,v,b){g.preventDefault(),g.stopPropagation(),s(v,b),t("selectKey",{id:v.id,name:v.name,values:v.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,v){i(g,v)}function u(g){g||o()}function h(g){var v;return!((v=r.value)!=null&&v.contains(g))}function p(g){const v=new xr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||qr.OR,v}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:d,handleInputOutside:h,handleAddSelected:f,handleInputFocus:u}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Yg,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:Dn.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(it,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),Ed=40,u9=6,d9=26,yE=32,bE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:yE*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:Ot.ALL,validator(e){return[Ot.ALL,Ot.NEED_KEY].includes(e)}}},wE=a.defineComponent({name:"SearchSelect",directives:{clickoutside:ln},props:bE,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=De("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),d=a.ref(-1),f=qa(32,N),u=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(A=>A.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var P;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const A=[];for(const D of _){const M=c.value.find(j=>j.id===D.id&&j.name===D.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(D))M.values=D.values||[],M.logical=D.logical||qr.OR,A.push(M);else{let j=e.data.find(R=>R.id===D.id),H="default";j||(j=e.conditions.find(R=>R.id===D.id),j&&(H="condition")),!j&&!((P=D.values)!=null&&P.length)&&(H="text");const L=new xr(j||D,H);L.values=D.values||[],L.logical=D.logical||qr.OR,A.push(L)}}c.value=A,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!A.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{uE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{dE(o.value.querySelector(`.${r("search-select-container")}`),f)}),pE({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,A){u.value=`${_.id}_${A}`}function v(_,A){const P=c.value.slice();P.splice(A,1,_),t("update:modelValue",P.map(D=>D.toValue())),u.value=""}function b(){u.value="",y("")}function y(_){h.value=_||""}function N(){if(l.value||c.value.length<1){d.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),A=o.value.querySelector(".search-container").clientWidth-u9-2,P=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=A-Ed&&j<=P.length-1;){const H=P[j];if(H.clientHeight>d9){d.value=j;return}D+=H?H.clientWidth+u9:0,D>=A-Ed&&(M=j),j+=1}if(M===P.length-1&&D<=A){d.value=-1;return}d.value=D>=A-Ed?M:M-1}function w(){u.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var A;return!((A=o.value)!=null&&A.contains(_))}function x(_){const A=c.value.slice();A.push(_),y(""),t("update:modelValue",A.map(P=>P.toValue()))}function O(_){const A=c.value.slice();A.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",A.map(P=>P.toValue()))}function T(_){var A;_&&(d.value=-1),_===!1&&((A=o.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),l.value=_}function E(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:O,handleClickSearch:E,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:d9}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(vE,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Yg,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(pt,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(mr,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(ns,{class:"select-tips"},null),this.validateStr||""])])])}}),Xg=Le(wE);function CE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Jg=I0(Oo);Jg.width.default="400";const NE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...Jg,title:m.string.def(""),direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:i}=fe(),o=async()=>{let d=!0;typeof e.beforeClose=="function"&&(d=await e.beforeClose()),d&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const d={header:()=>{var u;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(Ft,null,null):a.createVNode(Ct,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((u=r.header)==null?void 0:u.call(r))??e.title])])])},default:()=>{var u;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(u=r.default)==null?void 0:u.call(r)])}};r.footer&&Object.assign(d,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(ds,a.mergeProps(f,{width:e.width,class:{[i("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:o,onHidden:c,onShown:l}),CE(d)?d:{default:()=>[d]})}}}),Zg=Le(NE),f9=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),d=a.ref(0),f=a.ref(0),u=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const A=e.params.customContent[e.modelValue];T=A.tip||A.label||""}const E=e.params.vertical?ka.RIGHT:ka.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:E}:{content:"",placement:E}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),v=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),b=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),y=T=>{e.params.disable||(T.preventDefault(),N(T),wa(window,"mousemove",w),wa(window,"touchmove",w),wa(window,"mouseup",C),wa(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let E=0;e.params.vertical?(d.value=T.clientY,E=(s.value-d.value)/e.params.sliderSize*100):(f.value=T.clientX,E=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+E,S(l.value)}},C=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),Ps(window,"mousemove",w),Ps(window,"touchmove",w),Ps(window,"mouseup",C),Ps(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const E=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/E)*E*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=fe();return{renderDom:()=>a.createVNode("div",{ref:h,style:v.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:y},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(gt,{boundary:document.body,content:p.value.content,placement:p.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[b.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),wa=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ps=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},xE=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(null),u=a.ref(null),h=a.ref(null),p=a.computed(()=>{const k=[e.minValue,e.maxValue,e.step].map(I=>{const q=`${I}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,k)}),g=a.computed(()=>Math.min(s.value,i.value)),v=a.computed(()=>Math.max(s.value,i.value)),b=a.computed(()=>e.range?`${100*(v.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),y=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:b.value,bottom:y.value}:{width:b.value,left:y.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=(e.maxValue-e.minValue)/e.step,I=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<k;K++)q.push(K*I);return e.range?q.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=100*e.step/(e.maxValue-e.minValue),I=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(q)};I.push(te)}return I}),x=a.computed(()=>Array.isArray(e.modelValue)),O=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((k,I)=>Number(k)-Number(I)).filter(k=>Number(k)>=e.minValue&&Number(k)<=e.maxValue).map(k=>{const{tip:I}=e.customContent[k],{label:q}=e.customContent[k];return{tip:I||q||"",label:q||"",percent:(Number(k)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,k=>{e.range?n("update:modelValue",[g.value,v.value]):n("update:modelValue",k),l.value=k}),a.watch(()=>i.value,k=>{n("update:modelValue",[g.value,v.value]),c.value=k}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),E(),wa(window,"resize",E())});const E=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},V=k=>{var I,q;if(k.stopPropagation(),!e.disable){if(E(),e.vertical){const K=(I=d.value)==null?void 0:I.getBoundingClientRect().bottom;M((K-k.clientY)/r.value*100)}else{const K=(q=d.value)==null?void 0:q.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}P()}},_=()=>e.range?![g.value,v.value].every((k,I)=>{var q;return k===((q=o.value)==null?void 0:q[I])}):e.modelValue!==o.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const k=e.modelValue;e.range&&Array.isArray(k)?k[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):k[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):k[0]<e.minValue?n("update:modelValue",[e.minValue,k[1]]):k[1]>e.maxValue?n("update:modelValue",[k[0],e.maxValue]):(s.value=Number(k[0]),i.value=Number(k[1]),_()&&(o.value=k.slice())):!e.range&&typeof k=="number"&&!isNaN(k)&&(k<e.minValue?n("update:modelValue",e.minValue):k>e.maxValue?n("update:modelValue",e.maxValue):(s.value=k,_()&&(o.value=k)))},P=async()=>{await a.nextTick(),n("change",e.range?[g.value,v.value]:e.modelValue)},D=k=>e.vertical?{bottom:`${k}%`}:{left:`${k}%`},M=k=>{if(!e.range){f.value.setPosition(k);return}const I=e.minValue+k*(e.maxValue-e.minValue)/100;Math.abs(g.value-I)<Math.abs(v.value-I)?h.value=s.value<i.value?f.value:u.value:h.value=s.value>i.value?f.value:u.value,h.value.setPosition(k)},j=k=>{if(k==="")return;const I=parseFloat(k);I<e.minValue?(l.value=e.minValue,s.value=e.minValue):I>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=I},H=k=>{if(k==="")return;const I=parseFloat(k.toString());I<e.minValue?(c.value=e.minValue,i.value=e.minValue):I>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=I},L=k=>{let I=0;return k==="start"?I=e.vertical?e.maxValue:e.minValue:I=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(I)?"0":"1"},{resolveClassName:R}=fe(),B=(k,I)=>{let q=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:q,step:I};if(K=e.labelClick(k,te),K===!1)return}q=typeof K=="number"?K:q,console.log("handleStepLabelClick",q),M(q);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${R("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:d,style:C.value,class:`${R("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${R("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((q,K)=>K===0||K===w.value.length-1?null:a.createVNode("div",{key:K,style:D(q),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):null,e.customContent?O.value.map((q,K)=>K===0||K===O.value.length-1?null:a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${R("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:L("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:L("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.stepWidth),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.stepLabel]));if(e.customContent)return O.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.label]))}()]):void 0,a.createVNode(f9,{ref:f,modelValue:s.value,"onUpdate:modelValue":q=>s.value=q,params:T.value,onEmitChange:P,onResetSize:E},null),e.range?a.createVNode(f9,{ref:u,modelValue:i.value,"onUpdate:modelValue":q=>i.value=q,params:T.value,onEmitChange:P,onResetSize:E},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${R("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(Bn,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Bn,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),Qg=Le(xE);var ev=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(ev||{});const h9={theme:m.theme().def(Oi.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:im(),status:Ce("status",{}).def(ev.UNKNOWN),lineType:om(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},SE=a.defineComponent({name:"Steps",props:h9,emits:["update:curStep","click"],setup(e,{emit:t}){const n=De("steps"),r=De("lang"),s=a.ref([]),i=f=>{const u=[];f.forEach(h=>{typeof h=="string"?u.push(h):u.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...u)},o=f=>{h9.curStep=f},l=()=>{var f;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,h)=>{const p=await e.beforeChange(f);p?u(p):h(p)}),t("update:curStep",f),t("click",f))}catch(u){console.warn(u)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:d}=fe();return{defaultSteps:s,jumpTo:c,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Te({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=u=>this.curStep>u+1||this.defaultSteps[u].status==="done",i=u=>this.curStep===u+1,o=u=>{const{icon:h}=u;return h?Object.prototype.toString.call(h)==="[object Object]":typeof u=="string"},l=(u,h)=>(h.icon||(h.icon=u),!isNaN(h.icon)),c=u=>u.status==="loading",d=u=>u.status==="error",f=(u,h)=>i(u)&&this.status==="loading"||c(h)?a.createVNode(Qa,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(u)&&this.status==="error"||d(h)?a.createVNode(it,{class:`${this.resolveClassName("steps-icon")}`},null):s(u)?a.createVNode(hr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(u,h)?u+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((u,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),u.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",u.status&&i(h)?[`${this.resolveClassName(`step-${u.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(u)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${u.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,u)]),u.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(h+1)}},[u.title]),u.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:u.description},[u.description])]):""])})])}}),tv=Le(SE),TE=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),d=a.ref(),f=a.ref(0),u=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:v}=fe(),b=a.computed(()=>{var D;return((D=o.value)==null?void 0:D.length)>0?o.value:i.value}),y=a.computed(()=>({width:`${u.value*b.value.length}px`,transform:`translateX(-${u.value*f.value}px)`})),N=a.computed(()=>({width:`${u.value}px`,height:`${h.value}px`})),w=D=>{let M=D;D>=b.value.length&&(M=0),D<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},C=D=>{D&&window.open(D,"_blank")},S=D=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:D.link},D.class],x=D=>({"background-image":`url(${D.url})`,"background-color":D.color}),O=D=>({[`${v("current-index")}`]:f.value===D}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},E=()=>{window.clearTimeout(p.value)},V=()=>{var M;const D=(M=d.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{P()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},A=D=>{if(D===void 0)return{height:0,width:0};const M=getComputedStyle(D),j=D.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:D.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},P=()=>{var M;const D=A((M=d.value)==null?void 0:M.parentElement);u.value=+c.value>0?c.value:D.width,h.value=+l.value>0?l.value:D.height};return a.watch([l,c],P),a.onMounted(()=>{P(),T(),V()}),a.onBeforeUnmount(()=>{E(),_()}),()=>a.createVNode("section",{ref:d,style:N.value,class:`${v("swiper-home")}`},[a.createVNode("hgroup",{style:y.value,class:`${v("transition")} ${v("swiper-main")}`},[b.value.map(D=>{var M;return a.createVNode("h3",{style:N.value,class:`${v("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,D))??a.createVNode("span",{style:x(D),class:S(D),onClick:()=>C(D.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((D,M)=>a.createVNode("li",{class:O(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),nv=Le(TE),_E={theme:J5(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let gi=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function OE(e){return e}function EE(e){return!!e}const LE={[gi.UPDATE]:OE,[gi.CHANGE]:EE},AE=a.defineComponent({name:"Switcher",props:_E,emits:LE,setup(e,{emit:t}){const n=Bt(),{resolveClassName:r}=fe(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const u={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;u[h]=!0}return u});a.watch(()=>e.modelValue,()=>{var u;o.value=!0,e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const d=u=>{if(u.stopPropagation(),u.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(gi.UPDATE,h),t(gi.CHANGE,p)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(h),typeof v.then=="function"))return s.value=!0,v.then(()=>{g()}).finally(()=>{s.value=!1});v&&g()},f=u=>{(u.code==="Enter"||u.key==="Enter"||u.keyCode===13)&&d(u)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:d,onKeydown:f},[s.value?a.createVNode(co,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),rv=Le(AE);var vi=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(vi||{}),Ta=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Ta||{});const av=Ce("position",{}).def("top");var sv=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(sv||{});const iv=Ce("sortType",{}).def("replace"),VE={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},kE={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:_i(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},DE={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),tabPosition:av,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:iv,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff")},IE={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:av,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:iv,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...VE},m9=a.defineComponent({name:"TabNav",directives:{bkTooltips:un},props:IE,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([Ta.LEFT,Ta.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===Ta.LEFT?g.right=0:g.left=0,g}if(e.type===vi.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let u=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:v,label:b,num:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:O}=p.props;if(!w)return!1;e.active===v&&(u=!0);const T=E=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(E)?`选项卡${g+1}`:typeof E=="string"?E:typeof E=="function"?a.h(E):E;return f.push({name:v,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:O,tabLabel:T(b),tabNum:y}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,u)=>f===u,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,u){i.value=f,o.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,u)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,u){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,u)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,u){e.tabRemove(f,u)}},{resolveClassName:d}=fe();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:d}=this,f=()=>this.tableNavList.map((v,b)=>{if(!v)return null;const{name:y,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=v,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===y&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},O=(V,_)=>!N&&(V||_),T=(V,_)=>O(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(pt,null,null)]):"",E=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:y,ref:e===y?"activeRef":"tabLabelRef",class:x(),draggable:O(v.sortable,r),onClick:()=>!N&&this.handleTabChange(y),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(b)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(b,V),onDrop:V=>{V.preventDefault(),d(b,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[E()]),T==null?void 0:T(v,b)])]),isNaN(C)?T==null?void 0:T(v,b):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips||"",disabled:!v.tips}]])}),u=()=>{var b,y;const v=[];return typeof this.$slots.add=="function"?v.push((y=(b=this.$slots).add)==null?void 0:y.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(as,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===vi.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=u();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),PE=a.defineComponent({name:"Tab",components:{TabNav:m9},props:DE,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const r=a.ref(!1),s=a.ref([]),i=a.getCurrentInstance(),o=(f,u=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?u.push(p.component):(g===a.Fragment||g==="template")&&o(p,u)}),u},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const u=f[0],h=o(u);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,u){n("remove",f,u),n("remove-panel",f,u)},tabSort(f,u,h){const p=s.value;if(h===sv.INSERT)if(f<u)p.splice(u+1,0,s[f]),p.splice(f,1);else if(f>u)p.splice(u,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[u];p[u]=p[f],p[f]=g}s.value=[...p],n("sort",f,u,h),n("sort-change",f,u,h)},tabDrag(f,u){n("drag",f,u),n("on-drag-tab",f,u)}},{resolveClassName:d}=fe();return{...c,isMounted:r,panels:s,resolveClassName:d}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Ta.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===vi.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode(m9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),RE=a.defineComponent({name:"TabPanel",props:kE,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=fe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),ov=lt(PE,{TabPanel:RE});var lv=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(lv||{}),cv=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(cv||{});const ME=["auto","highlight"],$E=["none","row","col","outer","horizontal"],_e={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},ye={COL_UID:"col_$uuid",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},uv=8,Rn=42;var Ao=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Ao||{});const dv={def1:"#FAFBFD",def2:"#F0F1F5"},_a={large:78,medium:60,small:42},FE=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:_a.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:_a.medium},{value:"large",label:e.value.setting.lineHeight.large,height:_a.large}],fv=Symbol("bkInitColumns"),HE=60;var Ze=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ze||{});const BE=["asc","desc","null","custom"],Sr=80,Xn={},jE={};Ce("showOverflowTooltipMode",{default:"auto"});const zE=Ce("columnType",{default:"__COL_TYPE_NONE"}),sf=Ce("columnType",{default:""});Ce("full",{default:"full"});Ce("columnSize",{default:"small"});const UE=st(),j0=Ce("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),WE=Ce("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),qE=Ce("IFilterPropShape",{default:!1,type:[Boolean,Object]});var hv=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(hv||{});const Vo=Ce("IColumnType",{default:{width:"100%",label:""},type:[Object]}),GE=Ce("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),Ld=Ce("LabelFunctionStringType",{}),KE=Ce("RenderFunctionStringType",{}),p9=Ce("SpanFunctionStringType",{}),YE=Ce("RowClassFunctionStringType",{}),XE=Ce("RowHeightFunctionNumberType",{});Ce("FunctionNumberType",{});const Js=e=>Ce("StringNumberType",{}).def(e);Ce("IColumnPropType",{default:{label:void 0,minWidth:Sr},type:[Object]});var mv=(e=>(e.independent="independent",e.interdependent="interdependent",e))(mv||{});const JE={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(Vo).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ce("columnPick",{}).def("disabled"),height:Js("auto"),stripe:m.bool.def(!1),minHeight:Js(Rn),maxHeight:Js("auto"),rowHeight:XE,headHeight:m.number.def(Rn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ce("ITheadType",{}).def({color:Ao.DEF1,height:Rn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ce("boderType",{})),m.string]).def([lv.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(HE),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(st),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:GE,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(_e.ROW_INDEX),showOverflowTooltip:j0,asyncData:m.bool.def(!1),rowHover:m.oneOf(ME).def(cv.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:Ce("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:sf,headerAlign:sf,prependStyle:m.style().def({}),colSortBehavior:Ce("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:Ce("FixedBottomOption",{default:{position:"relative",height:Rn}}).def(null),appendLastRow:Ce("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},ZE={label:Ld,field:Ld,render:KE,width:m.oneOfType([m.number,m.string]),minWidth:Js(Sr),columnKey:m.string.def(""),showOverflowTooltip:j0,type:zE,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,UE]).def(!1),sort:WE,filter:qE,colspan:p9.def(1),rowspan:p9.def(1),align:sf,className:YE,prop:Ld,index:m.number.def(void 0)},QE=a.defineComponent({name:"TableColumn",props:ZE,setup(e,{}){const t=a.inject(fv,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:b0(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var ze=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(ze||{});const eL=e=>!0,tL=e=>!0,nL=e=>!0,rL=e=>!0,Rs=(e,t,n,r,s)=>!0,aL=e=>!0,sL=e=>!0,iL=e=>!0,oL=e=>!0,g9=e=>!0,lL=e=>!0,v9=e=>!0,cL=e=>!0,uL=e=>!0,dL={columnPick:eL,columnFilter:tL,columnSort:rL,colFilterSave:nL,rowClick:Rs,rowDblclick:Rs,rowExpand:aL,select:sL,selectAll:iL,selectionChange:oL,pageLimitChange:g9,pageValueChange:g9,settingChange:lL,scrollBottom:cL,cellClick:v9,cellDblclick:v9,rowMouseEnter:Rs,rowMouseLeave:Rs,dragend:uL},fL=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,ye.LISTENERS),c="HeadColumnResize";let d=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,u=!1,h=!1,p=0,g=null,v="right",b=null,y=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[ye.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},O=B=>{x(B),u=!1,h=!1;const z=r(g,S)+N,k=r(g,[ye.COL_MIN_WIDTH]),I=z>k?z:k;i(g,I),s(g,ye.WIDTH,I),document.removeEventListener("mouseup",O),C.value=-1e3,N=0,_(b),t==null||t(),b=null;const q=B.target;M(q),g=null},T=ur(B=>{C.value=C.value+B}),E=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const k=r(g,S)+z;r(g,[ye.COL_MIN_WIDTH])<k&&T(z)},V=Un(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},A=B=>{if(!f)return;P(B.target),p=B.clientX;const z=v==="left"?o(y):y;s(z,ye.COL_IS_DRAG,!0),g=z,b=B.target.closest("table");const k=b.getBoundingClientRect();C.value=B.clientX-k.left,V(b),u=!0,document.addEventListener("mouseup",O)},P=B=>{var k,I;((I=(k=B==null?void 0:B.parentElement)==null?void 0:k.parentElement)==null?void 0:I.querySelectorAll(".col-pointer-hover")).forEach(q=>{q==null||q.classList.remove("col-pointer-hover"),q==null||q.classList.remove("poiner-left"),q==null||q.classList.remove("poiner-right")})},D=(B,z)=>{const k=B.parentElement;k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${z}`);const I=z==="right"?k.nextElementSibling:k.previousElementSibling,q=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${q}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),P(B),w.set(B,!1),document.removeEventListener("mousedown",A))},j={[d.MOUSE_MOVE]:(B,z,k)=>{if(x(B),u){h=!0,E(B);return}const I=B.target;if(!h){if(!I)return;const{offsetWidth:q}=I,K=B.offsetX;q>12&&(q-K<8||K<8&&k>0)?(f=!0,v=K<8?"left":"right",w.get(I)||(w.set(I,!0),I.classList.add("cell-resize"),D(I,v),y=z,document.addEventListener("mousedown",A))):(f=!1,M(I))}},[d.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},H=B=>`${c}_${B}`,L=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,ye.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},R=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);if(z!=null&&z.has(I)){const q=z.get(I);q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{R(),L()},{immediate:!0,deep:!0}),{dragOffsetX:C}},hL=()=>{const e=[];let t=0;const n=new WeakMap,r=d=>a.isRef(d)?a.unref(d):a.toRaw(d),s=d=>Object.keys(d??{}).reduce((f,u)=>{const h=u.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(d[u])})},{}),i=d=>(n.has(d)||n.set(d,$t()),n.get(d)),o=(d,f,u)=>{var h,p;if((h=d==null?void 0:d.component)!=null&&h.subTree){l((p=d==null?void 0:d.component)==null?void 0:p.subTree,f);return}if(typeof d=="function")return d();if(Array.isArray(d)){d.forEach(g=>l(g,f));return}if(Array.isArray(d==null?void 0:d.children)){d.children.forEach(g=>l(g,f));return}if(!u&&a.isVNode(d)&&(d!=null&&d.children)&&typeof(d==null?void 0:d.children)=="object"){Object.keys(d.children).forEach(g=>l(d.children[g],f));return}},l=(d,f)=>{var h,p,g;let u=f;if(!(!d||((h=d.type)==null?void 0:h.name)==="Table")){if(((p=d.type)==null?void 0:p.name)==="TableColumn"){const v=Object.assign({index:t},s(d.props),{field:d.props.prop||d.props.field,render:d.props.render??((g=d.children)==null?void 0:g.default),uniqueId:i(d),children:[]}),b=(f==null?void 0:f.children)??e;b.some(y=>y.uniqueId===v.uniqueId)||(b.push(v),t=t+1,d.children&&o(d,v,!0));return}o(d,u)}};return{resolveColumns:d=>{var u,h,p,g;e.length=0,t=0;const f=d==null?void 0:d.find(v=>{var b;return((b=v.type)==null?void 0:b.name)==="GhostBody"});return f&&((u=f.component)!=null&&u.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(v=>l(v))),e.sort((v,b)=>v.index-b.index),e}}};var pv=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var s=0,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),of=typeof window<"u"&&typeof document<"u"&&window.document===document,yi=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),mL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yi):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),pL=2;function gL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){mL(i)}function l(){var c=Date.now();if(n){if(c-s<pL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var vL=20,yL=["top","right","bottom","left","width","height","size","weight"],bL=typeof MutationObserver<"u",wL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=gL(this.refresh.bind(this),vL)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!of||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),bL?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!of||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,s=yL.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),gv=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Gr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||yi},vv=ko(0,0,0,0);function bi(e){return parseFloat(e)||0}function y9(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+bi(i)},0)}function CL(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=bi(o)}return n}function NL(e){var t=e.getBBox();return ko(0,0,t.width,t.height)}function xL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return vv;var r=Gr(e).getComputedStyle(e),s=CL(r),i=s.left+s.right,o=s.top+s.bottom,l=bi(r.width),c=bi(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=y9(r,"left","right")+i),Math.round(c+o)!==n&&(c-=y9(r,"top","bottom")+o)),!TL(e)){var d=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(d)!==1&&(l-=d),Math.abs(f)!==1&&(c-=f)}return ko(s.left,s.top,l,c)}var SL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Gr(e).SVGGraphicsElement}:function(e){return e instanceof Gr(e).SVGElement&&typeof e.getBBox=="function"}}();function TL(e){return e===Gr(e).document.documentElement}function _L(e){return of?SL(e)?NL(e):xL(e):vv}function OL(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return gv(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function ko(e,t,n,r){return{x:e,y:t,width:n,height:r}}var EL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ko(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=_L(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),LL=function(){function e(t,n){var r=OL(n);gv(this,{target:t,contentRect:r})}return e}(),AL=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new pv,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new EL(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new LL(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),yv=typeof WeakMap<"u"?new WeakMap:new pv,bv=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=wL.getInstance(),r=new AL(t,n,this);yv.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){bv.prototype[e]=function(){var t;return(t=yv.get(this))[e].apply(t,arguments)}});var VL=function(){return typeof yi.ResizeObserver<"u"?yi.ResizeObserver:bv}();const Xe=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Xe(e,r,n)).filter(r=>r!==void 0).at(0)}},kL=e=>ar(e,"auto"),ar=(e,t="100%",n=null)=>{let r="";return/^null|undefined$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},DL=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>$E.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},wv=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?Un(i,n):cm(i),l=()=>Reflect.apply(o,void 0,[]),c=new VL(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},z0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},IL=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),wi=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Lo(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?IL(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},PL=(e,t)=>Lo(e,t),wr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?wr(Reflect.apply(e,void 0,t),t):[],RL=(e,t,n)=>{const r=ML(e,t,n);return r!==null?r:$t()},ML=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===_e.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,b9=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===Xe(i,["field","type"],[i])))(t)&&n.length&&!n.includes(Xe(t,["field","type"],[t]))},Ci=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,$L=(e,t,n,r)=>{const s=Ci(e,t,n,r,"colspan"),i=Ci(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},Cv=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>wi(u,r,n),i=e.type==="index",o=(u,h,p,g)=>{const v=i?p:s(u)??"",b=i?g:s(h)??"";return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},l=typeof((d=e.sort)==null?void 0:d.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(u,h,p,g)=>l(u,h,p,g)*(t===Ze.DESC?-1:1);return t===Ze.NULL?(u,h)=>!0:c},FL=e=>{const t={[Ze.NULL]:3,[Ze.ASC]:1,[Ze.DESC]:2};return t[e]===void 0?Ze.ASC:Object.keys(t)[(t[e]+1)%3]},HL=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Ze.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:Cv(t,e.value??Ze.NULL,n)},e):null,Ni=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,BL=(e,t,n)=>{const r=RL(e,n,t);return r!==void 0&&e[r]!==void 0?Lo(e,r):t},jL=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=HL(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},zL=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Ms=e=>a.isProxy(e)?a.toRaw(e):e,UL=e=>{const t=De("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=$t(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,d=(F,G={})=>{i.forEach(W=>W.active=!1);const U=i.find(W=>W.col===F);if(U){Object.assign(U,G,{active:!0});return}i.push({col:F,...G,active:!0})},f=(F,G,U)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/px/,"")),$(F,ye.WIDTH,W),M(F,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/%/,""))/100*U,$(F,ye.WIDTH,W),M(F,{width:W,left:null,right:null})),W},u=F=>{let G=F,U=Sr;const W=(ee,ue="width")=>{const ce=[];return ee.forEach(ge=>{const Ne=f(ge,ue,F);G=G-Ne,[void 0,null,"auto","undefined","null",""].includes(ge[ue])&&ce.push(ge)}),G>0&&ce.length&&(U=G/ce.length),ce},ae=W(p);W(ae,"minWidth").forEach(ee=>{const ue=U>Sr?U:Sr;$(ee,ye.WIDTH,ue),M(ee,{width:ue,left:null,right:null})})},h=(F,G={})=>{const U=o.find(W=>W.col===F);if(U){Object.assign(U,G);return}o.push({col:F,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!I(F)))},v=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},b=(F=["rowspan","colspan"])=>r.some(G=>F.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),w=(F,G,U)=>{let W=U;const ae=Ci(F,G,null,null,"colspan"),de={skipCol:!1,skipColLen:0};return W>0&&(de.skipColLen=W,de.skipCol=!0,W=W-1),ae>1&&(de.skipColLen=ae,W=ae-1),{...de,skipColumnNum:W}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Sr;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},S=(F,G)=>{const U=ne(F,ye.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((W,ae)=>{const de=ae.split("_").slice(-1)[0];return Object.assign(W,{[de]:ee=>{U.get(ae).forEach(ue=>Reflect.apply(ue,void 0,[ee,F,G]))}})},{}):{}},x=F=>{if(!F.filter)return null;const G=(ae,de="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de),U=(ae,de)=>{const{match:ee}=F.filter,ue=wi(de,Xe(F,"field",[F,de]));return ee!=="fuzzy"?ae.includes(ue):ae.some(ce=>G(ce,"img").test(ue))};return typeof F.filter.filterFn=="function"?(ae,de,ee,ue)=>F.filter.filterFn(ae,de,F,ee,ue):(ae,de)=>ae.length?U(ae,de):!0},O=F=>{l.length=0;let G=0;const U=[],W=v();W&&F.unshift(W);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(Ne=>ae(Ne.children??[],ge+1))};ae(F);const de=(ce,ge)=>{if(ce){const Ne=c.get(ce);Ne.thColspan=Ne.thColspan+ge,Ne.offsetLeft=Ne.offsetLeft+ge,de(Ne.parent,ge)}},ee=(ce,ge,Ne,Oe)=>{var Re,pr,fs,hs,ta;const Ae=a.toRaw(ce);let Ve=Oe;l[ge]===void 0&&(l[ge]=[]);const Ie=!!(((Re=Ae.children)==null?void 0:Re.length)??!1);(((pr=Ae.children)==null?void 0:pr.length)??!1)||U.push(Ae),c.has(Ae)||c.set(Ae,{thColspan:1,thRowspan:1,isGroup:Ie,offsetLeft:Oe});const St=c.get(Ae),Fe=((fs=Ae.children)==null?void 0:fs.length)??0,Tt=((hs=Ae.children)==null?void 0:hs.length)??1,je=Fe>0?1:G-ge,ke=Ve+(Fe>0?Fe-1:0);return Object.assign(St,{thColspan:Tt>0?Tt:1,parent:Ne,thRowspan:je,offsetLeft:ke}),l[ge].push(Ae),Tt>1&&de(Ne,Tt-1),(ta=Ae.children)==null||ta.forEach((Io,Po)=>{Ve=Ve+ee(Io,ge+1,Ae,Ve+Po)}),Fe>0?Fe-1:0};let ue=0;return F.forEach((ce,ge)=>{ue=ue+ee(ce,0,null,ue+ge)}),U},T=F=>c.get(F),E=()=>{i.length=0;let F=0;(r||[]).forEach((G,U)=>{const{skipCol:W,skipColumnNum:ae,skipColLen:de}=y.value?w(G,U,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=ae,!n.has(G)){const{type:ee,fn:ue,scope:ce,active:ge,enabled:Ne}=jL(G,e),Oe=x(G),Ae=e.settings??{},Ve=zL(G);Ve.enabled&&h(G,{[ye.COL_FILTER_FN]:Oe,[ye.COL_FILTER_VALUES]:Ve.checked??[]}),Ne&&d(G,{[ye.COL_SORT_TYPE]:ee,[ye.COL_SORT_FN]:ue,[ye.COL_SORT_SCOPE]:ce}),n.set(G,{[ye.CALC_WIDTH]:void 0,[ye.RESIZE_WIDTH]:void 0,[ye.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[ye.COL_MIN_WIDTH]:C(G),[ye.LISTENERS]:new Map,[ye.WIDTH]:G.width,[ye.IS_HIDDEN]:b9(Ae.fields??[],G,Ae.checked??[]),[ye.COL_SORT_TYPE]:a.ref(ee),[ye.COL_SORT_FN]:ue,[ye.COL_FILTER_OBJ]:Ve,[ye.COL_FILTER_FN]:Oe,[ye.COL_FILTER_SCOPE]:void 0,[ye.COL_SORT_SCOPE]:ce,[ye.COL_SORT_ACTIVE]:a.ref(ge),[ye.COL_IS_DRAG]:!1,[ye.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:de},[ye.COL_UID]:$t(),[ye.SELECTION_DISABLED]:!1,[ye.SELECTION_INDETERMINATE]:!1,[ye.SELECTION_VAL]:!1,[ye.COL_RESIZEABLE]:G.resizable!==!1,[ye.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[ye.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:de},[ye.COL_MIN_WIDTH]:C(G)})})},V=(F,G)=>{$(F,ye.COL_FIXED_STYLE,G)},_=F=>ne(F,ye.COL_FIXED_STYLE)??{},A=F=>ne(F,ye.COL_RECT),P=F=>ne(F,ye.CALC_WIDTH),D=F=>ne(F,ye.WIDTH),M=(F,{left:G,right:U,width:W,height:ae})=>{const de=A(F),ee={left:G??de.left,right:U??de.right,width:W??de.width,height:ae??de.height};$(F,ye.COL_RECT,ee)},j=Un((F,G)=>{r.length=0,r.push(...O(F)),E(),g(),G==null||G()}),H=(F,G=!1)=>{$(F,ye.IS_HIDDEN,G)},L=(F,G)=>{$(F,ye.RESIZE_WIDTH,G)},R=(F,G)=>{const{type:U,fn:W,scope:ae,active:de}=G,ee={[ye.COL_SORT_TYPE]:U,[ye.COL_SORT_FN]:W,[ye.COL_SORT_ACTIVE]:de,[ye.COL_SORT_SCOPE]:ae};[ye.COL_SORT_TYPE,ye.COL_SORT_FN,ye.COL_SORT_ACTIVE,ye.COL_SORT_SCOPE].forEach(ue=>{ee[ue]!==void 0&&$(F,ue,ee[ue])})},B=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[ye.COL_FILTER_OBJ],G)},z=[ye.WIDTH],k=(F,G=z)=>ne(F,G[0])??ne(F,G[1])??ne(F,G[2]),I=F=>ne(F,ye.IS_HIDDEN)??!1,q=F=>ne(F,ye.COL_UID),K=(F,G,U)=>{[ye.COL_SORT_FN,ye.COL_SORT_SCOPE,ye.COL_SORT_TYPE].includes(G)&&d(F,{[G]:U}),[ye.COL_FILTER_FN,ye.COL_FILTER_VALUES].includes(G)&&h(F,{[G]:U})},te=(F,G)=>{const U=p.findIndex(de=>de===F),W=k(F)-G,ae=p[U+1];ae&&$(ae,ye.WIDTH,k(ae)+W)},$=(F,G,U)=>{K(F,G,U);const W=n.get(F);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=U;return}W[G]=U}},Q=(F,G)=>{const U=G||F.checked||[],W=F.fields||[];r.forEach(ae=>{$(ae,ye.IS_HIDDEN,b9(W,ae,U))})},ne=(F,G)=>{var W;const U=(W=n.get(F))==null?void 0:W[G];return a.isRef(U)?U.value:U},oe=(F,G)=>{var U;return(U=n.get(F))==null?void 0:U[G]},re=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:y,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,ye.COL_SORT_ACTIVE,!1),$(F,ye.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(G=>G.type==="selection");F&&($(F,ye.SELECTION_VAL,!1),$(F,ye.SELECTION_INDETERMINATE,!1))},formatColumns:E,flatColumnTemplate:O,isHiddenColumn:I,getColumnId:q,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(F,G)=>({...re(F,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:A,getColumnCustomClass:(F,G)=>{const U=F.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:P,getColumnWidth:D,getLeftColumnsWidth:(F,G=!1)=>{let U=!0,W=0,ae=0;for(;U&&ae<p.length;){if(F===p[ae]){G&&(W=W+D(p[ae])),U=!1;break}W=W+D(p[ae]),ae=ae+1}return W},getGroupAttribute:T,getPreColumn:F=>{const U=p.findIndex(W=>W===F)-1;return p[U]},getColumnIndex:F=>p.findIndex(G=>G===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:L,setColumnSortOption:R,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,G)=>{e.colSortBehavior===mv.independent&&r.forEach(U=>{$(U,ye.COL_SORT_ACTIVE,!1)}),$(F,ye.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},WL=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(b=>{r.addEventListener(b,y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(b,y)=>{if(y==="--top"){b.parentNode.insertBefore(r,b);return}if(b.nextElementSibling===null){b.parentNode.append(r);return}b.parentNode.insertBefore(r,b.nextElementSibling)},l=b=>{e.rowDraggable&&(b==null||b())},c=b=>b.target.closest("tr"),d=(b,y)=>{const{y:N}=y,{top:w,bottom:C}=b.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(b),b.classList.add(S),o(b,S)},f=(b,y=["--bottom","--top"])=>{y.forEach(N=>b.classList.remove(N))};return{onDragenter:b=>{const y=c(b);b.preventDefault(),b.stopPropagation(),l(()=>{b.dataTransfer.dropEffect="move",y.classList.add("--drag-enter"),d(y,b),s=y})},onDragleave:b=>{l(()=>{const y=c(b);i=y.classList.contains("--bottom")?"--bottom":"--top",f(y,["--drag-enter","--bottom","--top"])})},onDragstart:b=>{l(()=>{const y=c(b);r.style.setProperty("height",`${y.offsetHeight}px`),r.style.setProperty("width",`${y.offsetWidth}px`),y.classList.add("--drag-start"),b.dataTransfer.setDragImage(y,0,0),b.dataTransfer.setData("text/plain",null),b.dataTransfer.dropEffect="move";const{rowIndex:N}=b.target.dataset;b.dataTransfer.setData("data-row-index",N)})},onDragover:b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move";const y=c(b);d(y,b)},onDragend:b=>{var S;if(b.preventDefault(),b.stopPropagation(),r.remove(),!s)return;const y=s,{rowIndex:N}=y.dataset;let w=Number(N);const C=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},qL=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:u}=r.value;for(let p=u-1;p>=0;p--){const g=r.value[p],v=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:v}),t.setFixedStyle(g,{right:`${f}px`}),f=f+v}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},GL=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),KL=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:rr.Normal,mode:l0.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,d;if(s.value){const{loading:f,size:u,mode:h,title:p,inline:g,indicator:v}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode($n,{loading:f,size:u,mode:h,title:p,inline:g,indicator:v},null)}return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??null}}},YL=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),d=a.ref(-1e4),f=a.ref(0),u=a.reactive({}),h=a.reactive([]),p=a.ref(Rn),g=a.ref(1),v=a.computed(()=>{var W,ae,de;return(W=t.slots)!=null&&W.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((de=e.fixedBottom)==null?void 0:de.height)??Rn:0}),{resolveClassName:b}=fe(),{renderScrollLoading:y}=KL(e,t),N=a.computed(()=>Te({[b("table")]:!0},DL(e.border))),w=a.computed(()=>({height:ar(e.height),maxHeight:ar(e.maxHeight),minHeight:ar(e.minHeight)})),C=a.computed(()=>Te({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var de,ee,ue,ce;const W=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,ae=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--shadow-right",W),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--shadow-left",ae)},x=cm(()=>{var W,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x",`${d.value+o.value}px`),(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--drag-offset-h-x",`${d.value-2}px`),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--translate-y",`${l.value}px`),(Ne=(ge=n.value)==null?void 0:ge.style)==null||Ne.setProperty("--translate-x",`${o.value}px`),(Ae=(Oe=n.value)==null?void 0:Oe.style)==null||Ae.setProperty("--translate-x-1",`-${o.value}px`),S()}),O=W=>{o.value=W,x()},T=W=>{g.value=W},E=W=>{l.value=W,x()},V=()=>{var W,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x","-1000px"),(ee=(de=n.value)==null?void 0:de.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--translate-y","0px"),(Ne=(ge=n.value)==null?void 0:ge.style)==null||Ne.setProperty("--translate-x","0px"),(Ae=(Oe=n.value)==null?void 0:Oe.style)==null||Ae.setProperty("--translate-x-1","0px")},_=W=>{d.value=W,x()},A=z0(e),P=a.computed(()=>Xe(A,"height",["thead"])*g.value),D=a.computed(()=>{var W;return{"--row-height":`${P.value}px`,"--background-color":dv[((W=e.thead)==null?void 0:W.color)??Ao.DEF1],paddingRight:e.scrollbar?null:`${uv}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Te({[b("table-footer")]:!0,"is-hidden":te.value===0})),H=W=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[W,a.createVNode(GL,null,{default:()=>{var ae,de;return[(de=(ae=t.slots).default)==null?void 0:de.call(ae)]}})]),L=(W,ae,de)=>a.createVNode("div",{ref:r,style:D.value,class:C.value},[W==null?void 0:W(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[de==null?void 0:de()]),ae==null?void 0:ae()]),R=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:R.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const W=e.showHead?P.value:0,ae=te.value+W+v.value;return`calc(${w.value.maxHeight} - ${ae}px)`}return null}),I=W=>W-P.value-v.value-te.value,q=(W,ae=!0)=>{if(ae){z.value=I(W);return}z.value=W},K=W=>{z.value=W},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=W=>{te.value=W},ne=Un((...W)=>{t.emit(ze.SCROLL_BOTTOM,{...W})}),oe=()=>{var de,ee,ue,ce;const W=((ee=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ee.scrollWidth)??0,ae=((ce=(ue=s.value)==null?void 0:ue.refRoot)==null?void 0:ce.offsetWidth)??0;f.value=W-ae-(o==null?void 0:o.value)},re=W=>{p.value=W},X=W=>{c.value=u.bottom??0;const ae=W[1],{translateX:de,translateY:ee,pos:ue={}}=ae;O(de),E(ee),oe(),Object.assign(u,ue||{});const{bottom:ce}=ue;ce<=2&&c.value>ce&&ne({...ue,translateX:de,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[b("table-body-content")]:!0,[b("stripe")]:e.stripe})),ie=a.computed(()=>({[b("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=b("table-fixed-bottom"),Z=a.computed(()=>{var W,ae,de;return{minHeight:`${((W=e.fixedBottom)==null?void 0:W.minHeight)??Rn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((de=e.fixedBottom)==null?void 0:de.height)??null}});a.onMounted(()=>{oe(),V()});const le=()=>{const W=y==null?void 0:y();return W?a.createVNode("div",{style:Z.value,class:pe},[W]):null};return{renderContainer:H,renderHeader:L,renderBody:(W,ae,de)=>a.createVNode(cs,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:W,maxHeight:k.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>ae==null?void 0:ae((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:ie.value},[de==null?void 0:de()])]}),renderFooter:W=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[W]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:q,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:O,setDragOffsetX:_,setFixedColumns:W=>{h.length=0,h.push(...W)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},XL=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{tr(e.value)&&(i(),s=wv(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},JL=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},ZL=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=De("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Eo,{description:n.value,scene:"part",type:r.value},null)}}),lf=a.defineComponent({name:"TableCell",props:{column:Vo,row:m.any.def({}),parentSetting:j0,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:Ce("ResizerWay",{default:hv.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:ar(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:y="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var w;const N=f();return y?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var E,V;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(y.allowHtml);let S=()=>C,x={},O="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,w=y.resizerWay||"debounce",S=()=>y.content||C,typeof y.content=="function"&&(S=()=>y.content(e.column,e.row)),T=y.watchCellResize,O=y.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof y=="boolean"&&(_=!y),typeof y=="object"&&(_=y.disabled),N=_,O="static",typeof e.column.explain=="object"&&(S=()=>Xe(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(E=e.column)==null?void 0:E.showOverflowTooltip)==null?void 0:V.showHead)??!0),O="auto",S=()=>{var _,A;return((A=(_=f())==null?void 0:_.cloneNode)==null?void 0:A.call(_,!0))??""},e.headExplain&&(O="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:O,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var y,N;return e.isHead?(N=(y=n.value)==null?void 0:y.querySelector)==null?void 0:N.call(y,".head-text"):n.value},u=()=>{const y=f();if(!y||!tr(y))return;const{mode:N,disabled:w}=d();if(r.value=!w,N==="auto"&&(r.value=k9(y)),N==="static"&&(r.value=!0),r.value){const C=a.ref(d());l===null&&(l=g0(y,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:w}=d();y||(u(),w!==!1&&e.observerResize&&(h=wv(n.value,()=>{u()},60,!0,N),h.start()))};let g=null;const v=()=>{e.intersectionObserver&&(g=new IntersectionObserver(y=>{if(y[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{v(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const b=e.headExplain||e.column.explain;return()=>{var y;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,b?"explain":""]},[s.value?(y=t.default)==null?void 0:y.call(t):"--"])}}}),$s=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),QL=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:d,getStore:f,setStore:u,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),d.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,ye.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,ye.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(ze.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},O=()=>{if(d.value){const _=u(s,i);if(_){const{start:A,end:P}=f(),D=A.index<P.index?A.index:P.index,M=A.index<P.index?P.index:A.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{Ni(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(ze.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,_e.ROW_SELECTION_INDETERMINATE),E=t.getRowAttribute(s,_e.ROW_SELECTION),V=Ni(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:O,disabled:!V,indeterminate:T,modelValue:E,onChange:x},null)},v=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(O=>O===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):yg(x),b=()=>{var T;const x=()=>{if(Xe(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),_e.ROW_INDEX);const V=Xe(o,"field",[o,s]),_=wi(s,V);if(typeof o.render=="function")return y();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(v(_)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:o,index:i}):A}return _},O={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=O[o.type])==null?void 0:T.call(O,s,o,i,t))??x()},y=()=>{const x=wi(s,Xe(o,"field",[o,s])),O=s;return o.render({cell:x,data:O,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,E;const O=t.getRowAttribute(s,_e.ROW_EXPAND)?a.createVNode(ts,null,null):a.createVNode(ss,null,null);return a.createVNode("span",null,[[O,((E=(T=n.slots).expandContent)==null?void 0:E.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,_e.ROW_EXPAND)),n.emit(ze.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var O,T;return typeof o.render=="function"?y():((T=(O=n.slots).expandCell)==null?void 0:T.call(O,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:O=>w(O)},[x()])},S=()=>{var E,V,_;const x=((E=e.rowDraggable)==null?void 0:E.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const O=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(ao,{style:`'--font-size: ${O};'`,class:"drag-cell"},null)};return{renderCell:b}},Nv=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const d=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,u=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(d){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return u&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),u=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(u==null?void 0:u.marginSize)+(u==null?void 0:u.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function w9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Fs=32,eA=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:un},props:{column:Vo,height:m.number.def(Fs)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=Nv(),s=De("table"),i=a.computed(()=>{var L;return(L=e.column)==null?void 0:L.filter}),o=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.checked)??[]}),l=a.ref(""),c=a.ref(),d=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,L=>{f.checked.length=0,f.checked=[],f.checked.push(...L.value)},{deep:!0});const u=a.computed(()=>Te({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=Te({[n("table-head-filter")]:!0}),p=a.ref(null),g=L=>{f.isOpen=L,L&&setTimeout(()=>{var R;(R=p.value)==null||R.reset()}),L||(l.value="")},v=`light ${n("table-head-filter")}`,b=a.computed(()=>{const{list:L=[]}=i.value;return L.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),y=5,N=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.maxHeight)??Fs*y}),w=a.computed(()=>{const{height:L,list:R=[]}=i.value;return L||R.length*Fs}),C=a.computed(()=>{const L=Fs*2;return b.value.length>y?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(L,R="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),R),O=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:R}=V(_,s.value.confirm);if(R||L){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},E=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(L,R)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:R}),{btnSave:_,btnReset:A}=i.value,P=()=>{const{disabled:L,text:R}=V(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[R]):a.createVNode(Ye,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:O},w9(R)?R:{default:()=>[R]})},D=()=>{const{disabled:L,text:R}=V(A,s.value.reset);return L?"":a.createVNode(Ye,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:E},w9(R)?R:{default:()=>[R]})},M=(L,R)=>{const B=new Set(f.checked);L?B.add(R.value):B.delete(R.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(L=>setTimeout(L,0)),b.value.forEach(L=>{Object.prototype.hasOwnProperty.call(L,"showOverflowTooltip")||(L.showOverflowTooltip=r(`list-item-${L.value}-ref`,c,d))})},H=L=>L.length?(j(),L.map(R=>a.withDirectives(a.createVNode("div",{key:R.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(R.value),immediateEmitChange:!1,label:R.value,modelValue:f.checked.includes(R.value),onChange:B=>M(B,R)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${R.value}-ref`]=B},[`${R.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:R.tipKey||R.text,placement:"right",disabled:!R.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(gt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:Ei.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(ro,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(Bn,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(wo,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(b.value)])]}),a.createVNode("div",{class:"content-footer"},[P(),D()])])})}}),tA=a.defineComponent({name:"HeadSort",props:{column:Vo,defaultSort:m.oneOf(BE).def(Ze.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,d;const{resolveClassName:r}=fe(),s=((d=(c=e.column)==null?void 0:c.sort)==null?void 0:d.value)??e.defaultSort??Ze.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,u)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:u,isCancel:u===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(zi,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===Ze.ASC?"active":""],onClick:f=>l(f,Ze.ASC)},null),a.createVNode(Za,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===Ze.DESC?"active":""],onClick:f=>l(f,Ze.DESC)},null)])}});function nA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const rA=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var D;const o=a.ref(t.getColumnAttribute(s,ye.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,ye.COL_SORT_ACTIVE)),c=a.toRaw(s),d=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,ye.COL_SORT_TYPE)}=M??{},L=j?Ze.NULL:H,R=Cv(s,L,e.sortValFormat);t.setColumnAttribute(s,ye.COL_SORT_TYPE,L),t.setColumnAttribute(s,ye.COL_SORT_FN,R),t.setColumnSortActive(s,L!==Ze.NULL),o.value=L,l.value=L!==Ze.NULL,r.emit(ze.COLUMN_SORT,{column:s,index:i,type:L})},u=()=>a.createVNode(tA,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=L=>{r.emit(ze.COLUMN_FILTER,{checked:L,column:a.unref(s),index:i})},j=L=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,L),r.emit(ze.COLUMN_FILTER_SAVE,{values:L})},H=()=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(eA,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=z0(e),{cellFn:g}=p,v=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):Xe(s,"label",[i]),b=()=>{const M=[];s.sort&&M.push(u()),s.filter&&M.push(h());const j=v();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:L}},y=(M,j="current")=>{t.setColumnAttribute(s,ye.SELECTION_VAL,M),t.setColumnAttribute(s,ye.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(ze.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{y(!0,M)},{resolveClassName:w}=fe(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,ye.SELECTION_DISABLED),j=t.getColumnAttribute(s,ye.SELECTION_VAL),H=t.getColumnAttribute(s,ye.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:L=>y(L)},null),a.createVNode(gt,{ref:d,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,onChange:L=>y(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=b();return a.createVNode(lf,{class:M,column:s,headExplain:Xe(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},nA(H)?H:{default:()=>[H]})},O=()=>{if(!t.getColumnAttribute(s,ye.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:FL(t.getColumnRefAttribute(s,ye.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":dv[((D=e.thead)==null?void 0:D.color)??Ao.DEF1]}),E=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(E==null?void 0:E.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":E==null?void 0:E.isGroup,"is-head-group-child":!!(E!=null&&E.parent)}])),A=()=>Xe(s,"label",[i,s]);return{getTH:()=>E!=null&&E.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:E==null?void 0:E.thColspan,rowspan:E==null?void 0:E.thRowspan},[A()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:E==null?void 0:E.thColspan,"data-id":t.getColumnId(s),rowspan:E==null?void 0:E.thRowspan,onClick:()=>O()},t.resolveEventListener(s,i)),[x()])}},aA=e=>{const t=a.ref(!1),n={start:null,end:null},r=u=>{u.key==="Shift"&&(t.value=!0)},s=u=>{u.key==="Shift"&&(t.value=!1,c())},i=(u,h)=>{n.start={index:h??null,row:u??null}},o=()=>{i()},l=(u,h)=>n.start===null&&n.end===null?(n.start={index:h,row:u},!1):(n.end={index:h,row:u},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function sA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const iA=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=De("table"),o=$t();let l={};const c=aA(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,A)=>{const P=`${kL(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,ye.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:ar(P,"auto"),minWidth:ar(D,"auto")}},null)})]),f=()=>{const _=z0(e),A={"--row-height":`${Xe(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:A},[n.columnGroup.map((P,D)=>a.createVNode("tr",null,[P.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=rA({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",A=[...wr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode($s,{key:_},{default:()=>{var P,D;return[a.createVNode("tr",{key:_,style:A},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(P=e.appendLastRow).cellRender)==null?void 0:D.call(P,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode($s,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:A},[n.visibleColumns.map((P,D)=>a.createVNode("td",null,[a.createVNode(lf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,P,D))??P.field??P.prop]}})]))])]})},p=_=>{let A={};const P=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,A,_,P,D);return A=M,H}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var D,M;const A=_??r.pageRowList,P=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return A.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(A)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(ZL,{emptyText:P.value,filterList:A,list:e.data},null)},y=(_,A,P,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,A,P,D)},N=(_,A,P,D)=>{t.emit(ze.ROW_DBL_CLICK,_,A,P,D)},w=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,A,P,D)},C=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,A,P,D)},S=(_,A,P,D,M)=>{var R;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((R=M.get(P))==null?void 0:R.get(D))??{},H=!1;const L=Ci(D,null,_,A,"rowspan");return j>1?(j=j-1,H=!0):L>1&&(j=L,H=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,A,P,D,M,j,H=!1)=>{const L=D.length,R=[...wr(e.rowStyle,[_,A]),{"--row-height":`${g(_,A)}px`}],B=[...wr(e.rowClass,[_,A]),`hover-${e.rowHover}`,A%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,_e.ROW_UID);return[a.createVNode($s,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:R,class:B,"data-row-index":A,draggable:!!e.rowDraggable,onClick:k=>y(k,_,A,D),onDblclick:k=>N(k,_,A,D),onMouseenter:k=>w(k,_,A,D),onMouseleave:k=>C(k,_,A,D)},l),[n.visibleColumns.map((k,I)=>{const q=[n.getFixedStlye(k),...wr(e.cellStyle,[k,I,_,A])],{colspan:K,rowspan:te}=$L(k,I,_,A),{skipCol:$}=n.getColumnAttribute(k,ye.COL_SPAN),{skipRow:Q}=j&&!H?S(_,A,P,k,M):{skipRow:!1},ne={"expand-cell":k.type==="expand"};if(!Q&&!$){let oe;const re=[n.getColumnClass(k,I),n.getColumnCustomClass(k,_),k.align||e.align,...wr(e.cellClass,[k,I,_,A]),{"expand-row":r.getRowAttribute(_,_e.ROW_EXPAND),"is-last":A+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=QL({props:e,rows:r,ctx:t,columns:n,row:_,index:A,column:k,isChild:H,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:A,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:q,class:re,colspan:K,"data-id":X,rowspan:te,onClick:pe=>ie(pe,ze.CELL_CLICK),onDblclick:pe=>ie(pe,ze.CELL_DBL_CLICK)},[a.createVNode(lf,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},sA(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),O(_,B)]},O=(_,A,P)=>{if(r.getRowAttribute(_,_e.ROW_EXPAND)){const M=[...A,{row_expend:!0}],H=`${r.getRowAttribute(_,_e.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,R)=>x(L,R,{},_,{},!1,!0)):a.createVNode($s,{key:H},{default:()=>{var L,R;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((R=(L=t.slots).expandRow)==null?void 0:R.call(L,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(ze.PAGE_LIMIT_CHANGE,_)},E=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(ze.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(ze.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(F0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>E(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:u,renderTBody:b,renderTFoot:V,setDragEvents:v}},oA=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?PL(H,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Ms(L)===Ms(H)):!1:!1,i=(H,L,R)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Xe(e,"rowHeight",[{index:L,type:R??"tbody",row:H}]):Rn,o=()=>{let H=!1,L=!1;n.value.forEach((R,B)=>{const z=Ms(R);let k=BL(z,$t(),e);const I=s(z);I?H=!0:L=!0,t.has(z)||t.set(z,{[_e.ROW_EXPAND]:!1,[_e.ROW_SELECTION]:I,[_e.ROW_UID]:k,[_e.ROW_INDEX]:B+1,[_e.ROW_SELECTION_INDETERMINATE]:!1});const q=t.get(z);k=q[_e.ROW_UID],q[_e.ROW_INDEX]=B+1,q[_e.ROW_HEIGHT]=i(R,B)}),t.set(Xn,{[_e.ROW_SELECTION]:H,[_e.ROW_SELECTION_INDETERMINATE]:H&&L})},l=(H,L)=>({row:H,index:L??c(H,_e.ROW_INDEX),isSelectAll:c(Xn,_e.ROW_SELECTION)}),c=(H,L)=>{var R;return(R=t.get(H))==null?void 0:R[L]},d=H=>{t.set(jE,{[_e.ROW_SPAN]:H})},f=(H,L)=>Ni(e,{row:H,index:L})?c(H,_e.ROW_SELECTION):!0,u=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,_e.ROW_SELECTION))},h=H=>{const L=H??!p();if(t.set(Xn,{[_e.ROW_SELECTION]:L,[_e.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((R,B)=>x(R,L,B));return}r.forEach((R,B)=>x(R,L,B))},p=()=>e.acrossAll?n.value.every((H,L)=>f(H,L)):r.every((H,L)=>f(H,L)),g=()=>e.acrossAll?n.value.some(H=>c(H,_e.ROW_SELECTION)):r.some(H=>c(H,_e.ROW_SELECTION)),v=H=>{h(H)},b=()=>{const H=p();S(Xn,_e.ROW_SELECTION,H),S(Xn,_e.ROW_SELECTION_INDETERMINATE,!H&&g())},y=()=>c(Xn,_e.ROW_SELECTION_INDETERMINATE),N=()=>c(Xn,_e.ROW_SELECTION),w=(H,L)=>{if(L){S(L,_e.ROW_HEIGHT,H);return}n.value.forEach(R=>S(R,_e.ROW_HEIGHT,H))},C=(H,L,R)=>H?c(H,_e.ROW_HEIGHT):i(H,L,R),S=(H,L,R)=>{const B=Ms(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=R)},x=(H,L,R)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,R))),Ni(e,{row:H,index:R??c(H,_e.ROW_INDEX)})&&S(H,_e.ROW_SELECTION,B),b()},O=(H,L)=>{S(H,_e.ROW_INDEX,L)},T=(H,L)=>{S(H,_e.ROW_EXPAND,L)},E=H=>{let L=0;const R=50,B=()=>{const z=L+R;r.push(...H.slice(L,z)),z<H.length&&(L=z,setTimeout(()=>{B()}))};if(H.length>R){B();return}r.push(...H)};return{setRowIndex:O,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,E(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(L=>T(L,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,_e.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,L)=>H+C(L),0),changePageRowIndex:(H,L)=>{const R=r[H];r.splice(L,0,R);const B=H<L?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function lA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const cA=(e,t,n,r)=>{const s=De("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=Nv(),l=FE(s),c=a.ref(!1),d=a.ref(),f=a.ref([]),u=(K,te)=>Xe(K,["id","field","type"],[K,te]),h=()=>({enabled:!0,fields:e.columns.map(K=>Object.assign({},K,{field:K.field||K.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:_a.small}),p=K=>typeof K=="boolean"&&K!==!1?h():K?Object.assign({},h(),K):{enabled:!1},g=a.ref(null),v=a.reactive(h()),b=K=>{Object.assign(v,p(K))};a.watch(()=>[e.settings],()=>{b(e.settings)},{immediate:!0,deep:!0});const y=a.ref(v.size||"small"),N=a.ref(_a.small),w=a.ref(v.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>v.fields||e.columns||[]),O={checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:v.checked||[]},T=()=>{var te;Object.assign(O,{checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:w.value});const K={checked:w.value,size:y.value,height:N.value,fields:a.unref(x)};Object.assign(v,K),n.setColumnAttributeBySettings(v,K.checked),n.setVisibleColumns(),r==null||r(K),(te=g.value)==null||te.hide(),t.emit(ze.SETTING_CHANGE,K)},E=()=>{var K;c.value=O.checkAll,y.value=O.activeSize,N.value=O.activeHeight,w.value=O.checkedFields,(K=g.value)==null||K.hide()},V=()=>{var K;v.trigger==="manual"&&((K=g.value)==null||K.show())},_=K=>{K.stopImmediatePropagation(),K.stopPropagation(),K.preventDefault(),c.value=!c.value;const te=v.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(u(Q,ne))).map((Q,ne)=>u(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,oe)=>u(ne,oe));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},A=a.computed(()=>(v.limit??0)>0),P=v.sizeList||l,D=a.computed(()=>A.value&&(v.limit?v.limit:0)<=w.value.length),M=(K,te)=>K.disabled||D.value&&!w.value.includes(u(K,te)),j=K=>{y.value=K.value,N.value=K.height},H=K=>({"line-size":!0,"is-medium":y.value==="medium",active:K.value===y.value}),L={marginRight:"12px"},R=()=>P.map(K=>a.createVNode("span",{class:H(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((K,te)=>w.value.includes(u(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...v.checked)},{immediate:!0,deep:!0});const k=async()=>{await new Promise(K=>setTimeout(K,0)),x.value.forEach((K,te)=>{Object.prototype.hasOwnProperty.call(K,"showOverflowTooltip")||(K.showOverflowTooltip=o(`field-item-${Xe(K,["id","field","type"],[K,te])}-ref`,d,f))})},I=()=>{var $,Q,ne,oe;let K;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||k(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(es,{class:"icon-close-action",onClick:E},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),A.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),A.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(wo,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":re=>w.value=re},lA(K=x.value.map((re,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(ot,{checked:w.value.includes(u(re,X)),disabled:M(re,X),label:u(re,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${Xe(re,["id","field","type"],[re,X])}-ref`]=J},[Xe(re,["name","label"],[re,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Xe(re,["name","label"],[re,X]),disabled:!re.showOverflowTooltip}]])]})])))?K:{default:()=>[K]}),(oe=(ne=t.slots).setting)==null?void 0:oe.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),R()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ye,{style:L,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Ye,{style:L,onClick:E},{default:()=>[s.value.setting.options.cancel]})])])};return{options:v,renderSettings:()=>e.settings?a.createVNode(gt,a.mergeProps({ref:g,extCls:v.extCls,arrow:!0,placement:"bottom-end",trigger:v.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Yi,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},uA=a.defineComponent({name:"Table",directives:{bkTooltips:un},props:JE,emits:dL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=UL(e),r=oA(e),s=JL(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:d,setBodyHeight:f,setFootHeight:u,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:v,getBodyHeight:b,refBody:y,refRoot:N}=YL(e,t),w=(...ne)=>{var oe;return(oe=y.value)==null?void 0:oe.scrollTo(...ne)};typeof e.rowHeight=="function"?v(ne=>r.getRowHeight(ne.rows[0],ne.index)):v(e.rowHeight);const S=cA(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),v(oe))}),x=WL(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:E,setDragEvents:V}=iA({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=hL(),A=a.getCurrentInstance(),P=()=>{var oe;const ne=((oe=A.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(fv,P);const{renderFixedRows:D,resolveFixedColumnStyle:M}=qL(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:uv)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=fL(n,{afterResize:M}),L=a.ref(!1),R=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const oe=(s.options.current-1)*s.options.limit,re=oe+s.options.limit;return ne.slice(oe,re)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(oe=>{var re;!n.isHiddenColumn(oe.col)&&oe[ye.COL_FILTER_FN]&&((re=oe[ye.COL_FILTER_VALUES])!=null&&re.length)&&(ne=ne.filter((X,J)=>oe[ye.COL_FILTER_FN](oe[ye.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(oe=>{!n.isHiddenColumn(oe.col)&&oe[ye.COL_SORT_FN]&&oe.active&&ne.sort((re,X)=>{let J=null,Y=null;return oe.col.type==="index"&&(J=r.getRowAttribute(re,_e.ROW_INDEX),Y=r.getRowAttribute(X,_e.ROW_INDEX)),oe[ye.COL_SORT_FN](re,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),k=()=>{u(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},I=a.ref(!1),q=Un((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=R(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(w(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;XL(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Er(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{K.value=!1})});const $=()=>{if(e.virtualEnabled){let oe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const re=b(Number(`${e.maxHeight}`.replace("px","")));if(oe>re){f(re,!1);return}}f(oe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{q(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,oe)=>{var re,X;ne<oe&&((X=(re=y==null?void 0:y.value)==null?void 0:re.updateScroll)==null||X.call(re),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(O,S.renderSettings,D),l(r.pageRowList,T,D),o(),d(E())])}}),xv=lt(uA,{Column:QE}),Sv=Le(TT),dA={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},fA=a.defineComponent({name:"Timeline",props:dA,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=fe(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",d=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Te({},`${s} ${o} ${l} ${d} ${c} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}),Tv=Le(fA);var Kt=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Kt||{});const hA={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function mA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function pA(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function gA(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const vA=a.defineComponent({name:"Transfer",props:hA,emits:["change","update:targetList"],setup(e,{emit:t}){const n=De("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?Kt.OBJECT_ARRAY:Kt.BASE_ARRAY:Kt.NOT_ARRAY),o=a.computed(()=>i.value===Kt.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Kt.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case Kt.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case Kt.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=pA(d,f,o),{selectSearchQuery:p,selectListSearch:g}=gA(u,l),v=a.computed(()=>[...g.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1})),b=a.computed(()=>[...h.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(V,_)=>{const A=o.value;return V.some(P=>P[A]===_[A])&&_.disabled},N=()=>{u.value=[...d.value.filter(V=>y(u.value,V))],h.value=[...d.value.filter(V=>!y(u.value,V))],S()},w=()=>{u.value=[...d.value.filter(V=>!y(h.value,V))],h.value=[...d.value.filter(V=>y(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const A=V[o.value],P=_?u:h,D=_?h:u,M=P.value.findIndex(j=>j[o.value]===A);D.value.push(...P.value.splice(M,1)),S()},S=()=>{const V=u.value.map(A=>A[o.value]),_=h.value.map(A=>A[o.value]);t("update:targetList",_),t("change",i.value===Kt.BASE_ARRAY?V:u.value.map(A=>a.toRaw(A)),i.value===Kt.BASE_ARRAY?_:h.value.map(A=>a.toRaw(A)),_)},x=V=>{const _=V==="source"?u:h;r.value[V]=s.value[V].length===_.value.length},O=(V,_)=>{const A=_==="source"?u:h;s.value[_]=V?A.value.map(P=>P[o.value]):[]},T=V=>{const _=V==="left",A=_?u:h,P=_?h:u,D=s.value[_?"source":"target"],M=A.value.filter(j=>D.includes(j[o.value]));A.value=A.value.filter(j=>!D.includes(j[o.value])),P.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:E}=fe();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:v,selectedListSort:b,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:O,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:E}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",d=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,u=c?!t.length:!n.length,h=!!this.multipleSelectList[d].length&&!this.multipleSelectAllValue[d],p=this.multipleSelectList[d].length,g=()=>{u||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(ot,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[d],"onUpdate:modelValue":v=>this.multipleSelectAllValue[d]=v,indeterminate:h,label:f,onChange:v=>this.handleAllChecked(v,d)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:u},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",d=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[d])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(qi,{class:this.resolveClassName("icon")},null):a.createVNode(it,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const d=l==="left",f=l==="left"?"source":"target",u=d?t:n,h=d?"source-option":"target-option",p=d?"left-empty-content":"right-empty-content",g=e?a.createVNode(wo,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},mA(c=u.map(v=>a.createVNode("div",null,[a.createVNode(ot,{class:"checkbox-item",label:v[this.settingCode]},{default:()=>{var b,y;return[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(v=>{var b,y;return a.createVNode("li",{key:v[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(v,d)},[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)])})]);return u.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(Bn,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(mr,{class:this.resolveClassName("icon-search")},null)}),o("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(Ct,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(Ft,null,null)])]):a.createVNode(ho,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),_v=Le(vA);var ft=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(ft||{});const It=(...e)=>!0,yA={nodeClick:It,nodeCollapse:It,nodeExpand:It,nodeChecked:It,nodeDragStart:It,nodeDragOver:It,nodeDragLeave:It,nodeDragSort:It,nodeDrop:It,nodeEnterView:It,nodeSelected:It};var he=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(he||{});const In={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Ov=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Ov||{});const bA={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:Ce("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([st(),m.func]).def("fuzzy"),resultType:st().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(Ce("nodeContentActionType",{}).def(Ov.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},wA=e=>({renderEmpty:t=>a.createVNode(Eo,{scene:"part",type:t},{default:()=>[e.emptyText]})}),CA=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{Er(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const v=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(b){b.forEach(y=>{var N,w,C;if(console.log("entry",y.target),y.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,y))??y;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{Er(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Er(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...v)=>{p==null||p(...v)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,v=p.querySelectorAll("[data-tree-node]"),b=g+h;return Array.from(v).filter(N=>N.offsetHeight+N.offsetTop>=b&&N.offsetTop<b)}}},Do=(e,t)=>{const n=L=>e.schema.get(L),r=(L,R)=>{var B;return(B=n(L))==null?void 0:B[R]},s=(L,R,B,z)=>{if(!e.schema.has(L)){console.warn("node is not in schema, please check",z,L);return}e.schema.set(L,Object.assign({},n(L),{[R]:B}))},i=L=>e.data.find(R=>c(R)===L),o=(L,R,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),R,B,L));return}s(i(L),R,B,L)},l=L=>r(L,he.PATH),c=L=>r(L,he.UUID),d=L=>r(L,he.IS_OPEN),f=L=>r(L,he.HAS_CHILD),u=L=>r(L,he.IS_MATCH),h=L=>r(L,he.IS_CHECKED),p=L=>r(r(L,he.PARENT),he.UUID),g=L=>r(L,he.IS_LOADING),v=L=>r(L,he.PARENT),b=L=>r(L,he.IS_MATCH),y=(L,R)=>{const B=e.data.find(z=>c(z)===L);return r(B,R)},N=L=>typeof L=="string"?y(L,he.IS_ROOT):r(L,he.IS_ROOT),w=L=>{const R=e.data.find(B=>c(B)===L);return p(R)},C=L=>{const R=e.data.find(B=>c(B)===L);return l(R)},S=(L,R)=>{s(L,he.IS_LOADING,R)},x=L=>typeof L=="object"?d(L):typeof L=="string"?y(L,he.IS_OPEN):!1,O=(L,R)=>r(r(L,he.PARENT),R),T=L=>x(r(L,he.PARENT)),E=L=>N(L)||x(L)||T(L),V=(L,R)=>{const z=L.split("-").reduce((k,I)=>{const q=Number(I);return Array.isArray(k)?k[q]:k[t.children][q]},t.data);return R&&Object.assign(z,{[he.UUID]:R}),z},_=L=>L[t.children]??[],A=L=>e.data.find(R=>c(R)===L),P=L=>{let R=L;return typeof R=="string"&&(R=A(R)),N(R)?{[t.children]:t.data}:v(R)},D=L=>({[In[he.IS_LOADING]]:r(L,he.IS_LOADING),[In[he.HAS_CHILD]]:f(L),[In[he.IS_MATCH]]:u(L),[In[he.IS_CHECKED]]:h(L),[In[he.IS_OPEN]]:d(L),[In[he.IS_ROOT]]:N(L),fullPath:r(L,he.PATH),uuid:c(L),parent:r(L,he.PARENT),parentId:c(r(L,he.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:P,getNodePathById:C,getNodeAttrById:y,getNodeParentIdById:w,getParentNodeAttr:O,getParentNode:v,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:d,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:u,isNodeLoading:g,checkNodeIsOpen:E,getSourceNodeByPath:V,getSourceNodeByUID:A,isMatchedNode:b,resolveScopedSlotParam:D,setTreeNodeLoading:S,extendNodeAttr:L=>Object.assign({},L,{[he.TREE_NODE_ATTR]:D(L)}),getChildNodes:_,extendNodeScopedData:L=>({data:L,attributes:D(L)}),getIntersectionResponse:L=>{var q;if(!L)return null;let R=L;Er(L)&&(R=i(L.getAttribute("data-tree-node")));const B=r(R,he.DEPTH),z=r(R,he.IS_ROOT),k=r(R,he.PARENT),I=z?r(R,he.INDEX):(q=k==null?void 0:k[t.children])==null?void 0:q.findIndex(K=>K===R);return{level:B,target:L,index:I,parent:k,node:R,isRoot:z}}}},Ev="1px dashed #c3cdd7",Lv=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:Av(n,e,t,i)},Av=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},Vv=(e,t)=>Av(e,t,"label"),NA=(e,t)=>({"--level-line":Lv(t,"levelLine",e,Ev,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),xA=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[he.DEPTH];if(r){const l=["node"],c=()=>Lv(t,"levelLine",e,Ev,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},SA=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=fe();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},TA=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=fe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},_A=(e,t,n,r,s)=>{OA(e,t,n,{[r]:s})},OA=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},Ca=e=>e??{__IS_NULL:!0},Zs=(e,t,n)=>Array.isArray(t)?t.some(r=>Zs(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,kv=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,Dv=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=Do(t,e),l=(f,u)=>{if(typeof f=="object"&&f!==null){n(u,he.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return _A(r(u),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:u=null,cache:h=!0}=e.async||{};if(typeof u=="function"&&s(f,he.IS_ASYNC)){if(n(f,he.IS_ASYNC_INIT,!0),!s(f,he.IS_CACHED)){n(f,he.IS_CACHED,h);const p=i(f),g=u(f,v=>l(v,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(v=>l(v,f)).catch(v=>console.error("load remote data error:",v)).finally(()=>{o(f,!1),n(f,he.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},d=()=>{const f=t.data.filter(u=>s(u,he.IS_ASYNC)&&u[In[he.IS_OPEN]]&&!s(u,he.IS_ASYNC_INIT));f.length&&Promise.all(f.map(u=>c(u))).then(()=>{d()}).catch(u=>{console.warn(u)})};return{asyncNodeClick:c,deepAutoOpen:d}},EA=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:d,getNodeAttr:f,getNodeId:u,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:v,isNodeOpened:b,isNodeLoading:y,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=Do(n,e),{resolveClassName:O}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:E,deepAutoOpen:V}=Dv(e,n),_=Z=>v(Z)?a.createVNode(no,{class:[O("tree-icon"),O("node-prefix")]},null):a.createVNode(to,{class:[O("tree-icon"),O("node-prefix")]},null),A=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:le,className:se,text:F,style:G}=Z;return a.h(le,{class:se,style:G},F)}return null},P=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??y(Z)?a.createVNode(Zr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(y(Z))return P(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return A(le);if(le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!se)return v(Z)?a.createVNode(ts,{class:O("node-prefix")},null):a.createVNode(ss,{class:O("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let le=null;return typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_type"),le!=="default")?A(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(fo,{class:[O("tree-icon"),O("node-prefix")]},null):null},j=(Z,le)=>{const se=w(Z);if(se){const F=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,F),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},H=(Z,le,se)=>{h(Z).forEach(F=>{Array.isArray(le)?le.forEach((G,U)=>{o(F,G,se[U])}):o(F,le,se),H(F,le,se)})},L=Z=>{var le,se,F;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},R=(Z,le,se)=>{se==null||se.preventDefault(),se==null||se.stopImmediatePropagation(),se==null||se.stopPropagation(),o(Z,he.IS_CHECKED,!!le),le&&o(Z,he.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(ft.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>kv(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:ie},[a.createVNode(ot,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(le,se)=>R(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,F=!0)=>{const G=le===null?!v(Z):!!le;if(G||H(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),F){const U=v(Z)?ft.NODE_EXPAND:ft.NODE_COLLAPSE;t.emit(U,Z,C(Z),d(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(F=>o(Ca(F),le,se));return}o(Ca(Z),le,se)},q=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,F=!1)=>{const G=Ca(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],W=Array.isArray(se)?se:[se];if(F){if(U.forEach((ae,de)=>I(G,ae,W[de])),!p(G)){const ae=w(G);U.forEach((de,ee)=>{f(ae,de)!==se&&K(ae,de,W[ee],F)})}}else U.forEach((ae,de)=>I(G,ae,W[de]))},te=(Z,le,se)=>{if(v(Z)){k(Z,!1,le,!0);return}L(se)&&E(Z).finally(()=>{f(Z,he.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>k(Z,!0,le,!0)}):k(Z,!0,le,!0)})},$=(Z,le)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(le,Z,"expand")},Q=(Z,le=!0,se=!0,F=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let W=Ca(U[0]);if((typeof W=="string"||typeof W=="number"||typeof W=="symbol")&&(W=n.data.find(ae=>u(ae)===W)??{[he.IS_NULL]:!0}),!W[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&W.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,he.IS_SELECTED,!le),e.selected&&e.selected!==i&&l(e.selected,he.IS_SELECTED,!le),o(W,he.IS_SELECTED,le),i=u(W),F&&t.emit(ft.NODE_SELECTED,{selected:le,node:W}),se&&U.length===1&&q(W,!0,!0),f(W,he.IS_ASYNC)&&L(G)&&E(W).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,F,G)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],oe=(Z,le,se)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,se),F.includes("expand")&&(b(Z)||te(Z,le,se)),F.includes("collapse")&&b(Z)&&te(Z,le,se),F.includes("click")){const G=ft.NODE_CLICK;t.emit(G,Z,C(Z),d(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),F=`${se}`.split("-").slice(0,Z+1);if(F.join("-")===se)return!0;const U=F.pop(),W=parseInt(U,10);F.push(`${W+1}`);const ae=F.join("-");return n.data.some(de=>c(de)===ae)},X=Z=>{if(!e.levelLine)return null;const le=F=>({"--depth":F}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((F,G)=>G).filter(F=>re(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:le(se-F),class:"node-virtual-line"},null))},J=Z=>{var le,se,F,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(F=t.slots).default)==null?void 0:G.call(F,x(Z)):[Vv(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var F,G;const se=D(Z);return a.createVNode("div",{key:u(Z),class:TA(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:xA(Z,e,n,le),class:SA(Z,n.schema,e,le),onClick:U=>oe(Z,U,"click")},[a.createVNode("div",{class:[O("node-action"),se?"":"empty-child"],onClick:U=>$(U,Z)},[se]),a.createVNode("div",{class:O("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:O("node-text")},[J(Z)]),(G=(F=t.slots).nodeAppend)==null?void 0:G.call(F,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:E,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:q,setNodeAttribute:K,isIndeterminate:B}},LA=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=Do(r,e),{resolveClassName:u}=fe(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let v="",b=null,y=new WeakMap;const N=L=>L.target.closest("[data-tree-node]"),w=L=>{var B;const R=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(R)},C=(L,R,B)=>{B.forEach(z=>L.classList.remove(z)),R.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const R=N(L),B=w(R);if(B.draggable===!1||h.value&&e.disableDrag(B)){R.classList.add(`${u("tree-drag-disabled")}`);return}R.setAttribute("draggable","true"),R.addEventListener("mouseup",S)},O="drop-before",T="drop-after",E="drop-inner";let V=null;const _=ur(L=>{if(L.preventDefault(),!b)return;const R=N(L);V!==R&&(V==null||V.classList.remove(O,T,E),V=R);const B=l(w(R));y.has(R)||y.set(R,R.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=y.get(R),q=I*g,K=z-k;if(K<q?C(R,[O],[T,E]):K>I-q?C(R,[T],[O,E]):C(R,[E],[O,T]),t.emit(ft.NODE_DRAG_OVER,L,R,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",R.classList.add(`${u("tree-drop-disabled")}`);return}R.classList.add(`${u("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=v;const $=R.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),A=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const R=N(L);L.dataTransfer.setData("text/plain","");const B=R.getAttribute("data-tree-node");v=B,b=R,L.dataTransfer.setData("node-id",B),t.emit(ft.NODE_DRAG_START,L,R)},P=L=>{L.preventDefault(),L.stopPropagation();const R=N(L);if(!R)return;R.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(w(R));if(p.value&&e.disableDrop(B))return;const z=v,k=R.getAttribute("data-tree-node");z!==k&&(V!=null&&V.classList.contains(E)?Reflect.apply(j,void 0,[z,k]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(O))&&Reflect.apply(M,void 0,[z,k]),t.emit(ft.NODE_DROP,L,R,B)),y=new WeakMap,V==null||V.classList.remove(T,O,E),V=null},D=(L,R)=>L!==R,M=(L,R)=>{if(!e.dragSort||!D(L,R))return;const B=s(L),z=s(R);if(!B||!z)return;const k=i(L),I=i(R);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const q=e.children,K=k[q],te=I[q];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(O),te.splice(Q,0,B),te.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),K.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),t.emit(ft.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(L,R)=>{const B=s(L),z=s(R);let k=null;if(d(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const q=c(L,he.INDEX);k==null||k[e.children].splice(q,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=L=>{L.preventDefault();const R=N(L);y.has(R)&&y.delete(R),R.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),R.classList.remove(T,O,E),t.emit(ft.NODE_DRAG_LEAVE,L,R)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",A),L.addEventListener("dragover",_),L.addEventListener("dragleave",H),L.addEventListener("drop",P)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",A),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",H),L.removeEventListener("drop",P)}})},AA=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,d=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:v="fuzzy"}=t.value,y=typeof v=="function"?v:v==="fuzzy"?o:i;return`${g}`.length===0?!1:l(y,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),u=a.computed(()=>n==="tree");return{searchFn:d,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:u,showChildNodes:r}},VA=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const O=new WeakMap;function T(L,R,B,z){if(L!=null&&O.has(L)){const k=O.get(L);if(Object.prototype.hasOwnProperty.call(k,R)&&typeof z=="function"&&Reflect.apply(z,self,[k,R,B,L])){if(k[R]===B)return;Object.assign(k,{[R]:B}),T(k[he.PARENT],R,B,z)}}}function E(L){let R=null;return typeof e.nodeKey=="string"&&(R=L[e.nodeKey]||$t()),R||L[he.UUID]||$t()}const V={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,R)=>Zs(L,e.selected,R),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,R,B,z=void 0){let k=z;z===void 0&&typeof V[B]=="function"&&(k=V[B](R,L));const I=In[B];if(Object.prototype.hasOwnProperty.call(R,I))return R[I];const q=(y==null?void 0:y.get(R))??void 0;let K;return q&&(K=q[B]),K==null&&(K=k),K}function A(L,R){if(!e.selectable)return!1;const B=Zs(R,e.selected,L);return _(L,R,he.IS_SELECTED,B)}function P(L,R,B){var I;const z=_(L,R,he.IS_OPEN),k=O.has(B)?(I=O.get(B))==null?void 0:I[he.IS_OPEN]:!0;return z&&k}function D(L,R,B){if(!kv(e,{data:L,attributes:B}))return!1;const k=Zs(L,e.checked,R);return _(R,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,R,B,z){return L[he.IS_INDETERMINATE]=(z[e.children]||[]).some(k=>{var I;return!(((I=O.get(k))==null?void 0:I[he.IS_CHECKED])??!1)}),!0}function H(L,R=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const q=L[I];if(Array.isArray(q))H(q,R,B,z);else if(typeof q=="object"&&q!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${E(q)}`,$=!!(q[w]||[]).length;let Q=_(te,q,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=P(te,q,B);const ne={[he.DEPTH]:R,[he.INDEX]:I,[he.UUID]:te,[he.PARENT]:B,[he.HAS_CHILD]:$,[he.PATH]:K,[he.IS_ROOT]:B===null,[he.ORDER]:x,[he.IS_SELECTED]:A(te,q),[he.IS_MATCH]:_(te,q,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,q,he.IS_CACHED),[he.IS_ASYNC]:_(te,q,he.IS_ASYNC),[he.IS_LOADING]:_(te,q,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(q,te,ne),ne[he.IS_CHECKED]&&C.push(q),O.set(q,ne),S.push(q),x+=1,Object.prototype.hasOwnProperty.call(q,w)&&H(q[w]||[],R+1,q,K)}}}return H(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(L=>{T(L,he.IS_CHECKED,!0,j)})),[S,O]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=Dv(e,o),d=b=>{s.push(b)},f=(b,y,N=!0)=>{N&&r.has(b)&&r.delete(b),r.set(b,y)},u=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),h=b=>{const y=u(b);return y!==null&&Reflect.apply(y.fn,void 0,[]),(y==null?void 0:y.type)??"once"},p=()=>{Array.from(r.keys()).forEach(b=>{const y=r.get(b);if(Array.isArray(y)){const N=[];y.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>y.splice(w,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,w;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{i.length=0,s.forEach(y=>{Reflect.apply(y,void 0,[b]),i.push(()=>Reflect.apply(y,void 0,[b]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=b=>{f("afterDataUpdate",b)};return(v=e.async)!=null&&v.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:d}},kA=a.defineComponent({name:"Tree",props:bA,emits:yA,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=VA(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:d,isNodeMatched:f,hasChildNode:u,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:v,getParentNode:b,getIntersectionResponse:y}=Do(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:O}=AA(e),T=a.reactive([]),E=re=>{if(w.value){if(O){const J=`${h(re)??""}-`;return o(re)&&(f(re)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(re)&&f(re)}return o(re)},V=a.computed(()=>r.data.filter(re=>E(re))),{getLastVisibleElement:_,intersectionObserver:A}=CA(e),{renderTreeNode:P,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:L,setNodeAttribute:R,isIndeterminate:B}=EA(e,t,r,V,{registerNextLoop:i}),z=qa(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(Vv(re,e),re);X&&T.push(h(re)),R(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(Ca(re),he.IS_CHECKED,X),J&&t.emit(ft.NODE_CHECKED,r.data.filter(Y=>d(Y)),r.data.filter(Y=>B(Y)))};s(re=>{H(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const q=()=>{var re;(re=n.value)==null||re.reset()},K=re=>{if(re==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(re,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re.id)+1});return}if(re.index>=0){n.value.fixToTop({index:re.index});return}const X=p(re);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(re,X=!0,J=!1)=>{k(v(re),X,J)};t.expose({handleTreeNodeClick:D,isNodeChecked:d,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:u,setOpen:M,setChecked:k,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:K,asyncNodeClick:L,getData:I,reset:q,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=wA(e);LA(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>P(ie,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([re,X,J])=>{var Y,ie,pe,Z;if(A.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),F=y(se[0]);(ie=(Y=A.value)==null?void 0:Y.callback)==null||ie.call(Y,F),t.emit(ft.NODE_ENTER_VIEW,F);return}const le=y(J.slice(-1)[0]);(Z=(pe=A.value)==null?void 0:pe.callback)==null||Z.call(pe,le),t.emit(ft.NODE_ENTER_VIEW,le);return}},{resolveClassName:oe}=fe();return()=>a.createVNode(cs,{ref:n,style:NA(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}}),Iv=Le(kA),Qn="upload";var yn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(yn||{}),cf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(cf||{}),Cr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Cr||{});const C9=[yn.BUTTON,yn.DRAGGABLE,yn.PICTURE],N9=[cf.FORMDATA,cf.BINARY],Et={type:{type:String,default:"formdata",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${N9.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||C9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${C9.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function x9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const DA=a.defineComponent({name:"UploadList",props:{theme:Et.theme,disabled:Et.disabled,files:Et.files,multiple:Et.multiple,isShowPreview:Et.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=De("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),d=`${s(Qn)}-list`,f=a.computed(()=>i.value===yn.PICTURE),u=a.computed(()=>f.value&&!l.value),h=a.computed(()=>Te({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--disabled`]:o.value}));function p(x){const O=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${O[T]}`}function g(x,O,T){n("preview",x,O,T)}function v(x,O){n("remove",x,O)}function b(x,O){n("retry",x,O)}const y=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},x9(x=e.files.map(O=>{const T=Te({[`${d}__item`]:!0,[`${d}__item-picture`]:!0,[`${d}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):N(O)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ja,{width:50,class:`${d}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${d}__picture-item-actions`},[c.value&&a.createVNode(Jr,{class:"action-icon",onClick:O=>g(x,e.files,O)},null),a.createVNode(zr,{class:"action-icon",onClick:O=>v(x,O)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},x9(x=e.files.map(O=>{const T=Te({[`${d}__item`]:!0,[`${d}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):S(O)])}))?x:{default:()=>[x]})},C=x=>{var A;const O=(A=x==null?void 0:x.raw)==null?void 0:A.type,[T]=(O==null?void 0:O.split("/"))||"";let V={text:_r,image:so,application:_r,video:go,audio:Ki}[T]||_r;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(V=Ui),a.h(V,{class:`${d}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${d}__item-icon`},[x.isPic?a.createVNode("img",{class:`${d}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${d}__item-summary`},[a.createVNode("div",{class:`${d}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${d}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(hr,{class:`${d}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ja,{class:`${d}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${d}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${d}__item-actions`},[x.status==="fail"&&a.createVNode(lo,{class:`${d}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(zr,{class:`${d}__item-del-icon`,onClick:O=>v(x,O)},null)])])];return()=>{var x,O,T;return a.createVNode(a.Fragment,null,[u.value?(O=t==null?void 0:t.innerTrigger)==null?void 0:O.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?y():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),S9=a.defineComponent({name:"UploadTrigger",props:{theme:Et.theme,disabled:Et.disabled,multiple:Et.multiple,accept:Et.accept,file:{type:Object},selectChange:Et.selectChange,isShowPreview:Et.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=De("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,file:l,multiple:c,accept:d,isShowPreview:f}=a.toRefs(e),u=`${s(Qn)}-trigger`,h=a.computed(()=>i.value===yn.BUTTON),p=a.computed(()=>i.value===yn.DRAGGABLE),g=a.computed(()=>i.value===yn.PICTURE),v=a.computed(()=>g.value&&!c.value),b=a.computed(()=>g.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),y=a.ref(null),N=a.computed(()=>{var j;return Te({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:v.value,[`${u}--has-file`]:l.value??!1,[`${u}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${u}--dragover`]:E.value,[`${u}--disabled`]:o.value})}),w=()=>{y.value.value=null,y.value.click()},C=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function O(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const E=a.ref(!1),V=()=>{const j=B=>{var k;if(o.value)return;if(B.preventDefault(),E.value=!1,e.selectChange&&((k=e.selectChange)==null?void 0:k.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),E.value=!0},L=()=>{E.value=!1},R=Te({[`${u}__draggable`]:!0});return a.createVNode("div",{class:R,onDragleave:L,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Pa,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${u}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?P(e.file):A()]),A=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(as,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),P=j=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(ja,{width:50,class:`${u}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[f.value&&a.createVNode(Jr,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(zr,{class:"action-icon",onClick:H=>O(j,H)},null)])])],D=()=>a.createVNode(Ye,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Pa,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return D();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:y,class:`${u}__input-file`,accept:b.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var Ad={exports:{}},T9;function IA(){return T9||(T9=1,function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(y,N){var w=y[0],C=y[1],S=y[2],x=y[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,y[0]=w+y[0]|0,y[1]=C+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y.charCodeAt(w)+(y.charCodeAt(w+1)<<8)+(y.charCodeAt(w+2)<<16)+(y.charCodeAt(w+3)<<24);return N}function o(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y[w]+(y[w+1]<<8)+(y[w+2]<<16)+(y[w+3]<<24);return N}function l(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,O,T,E;for(C=64;C<=N;C+=64)s(w,i(y.substring(C-64,C)));for(y=y.substring(C-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return O=N*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(O[2],16),E=parseInt(O[1],16)||0,x[14]=T,x[15]=E,s(w,x),w}function c(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,O,T,E;for(C=64;C<=N;C+=64)s(w,o(y.subarray(C-64,C)));for(y=C-64<N?y.subarray(C-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return O=N*8,O=O.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(O[2],16),E=parseInt(O[1],16)||0,x[14]=T,x[15]=E,s(w,x),w}function d(y){var N="",w;for(w=0;w<4;w+=1)N+=r[y>>w*8+4&15]+r[y>>w*8&15];return N}function f(y){var N;for(N=0;N<y.length;N+=1)y[N]=d(y[N]);return y.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=y(N,C),x=C,O,T,E,V;return w!==n&&(x=y(w,C)),S>x?new ArrayBuffer(0):(O=x-S,T=new ArrayBuffer(O),E=new Uint8Array(T),V=new Uint8Array(this,S,O),E.set(V),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var w=y.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=y.charCodeAt(x);return N?S:C}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,w){var C=new Uint8Array(y.byteLength+N.byteLength);return C.set(new Uint8Array(y)),C.set(new Uint8Array(N),y.byteLength),C}function v(y){var N=[],w=y.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(y.substr(C,2),16));return String.fromCharCode.apply(String,N)}function b(){this.reset()}return b.prototype.append=function(y){return this.appendBinary(u(y)),this},b.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},b.prototype.end=function(y){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(y,N){var w=N,C,S,x;if(y[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,y),w=0;w<16;w+=1)y[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,y[14]=S,y[15]=x,s(this._hash,y)},b.hash=function(y,N){return b.hashBinary(u(y),N)},b.hashBinary=function(y,N){var w=l(y),C=f(w);return N?v(C):C},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),w=N.length,C;for(this._length+=y.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var y=b.prototype.getState.call(this);return y.buff=p(y.buff),y},b.ArrayBuffer.prototype.setState=function(y){return y.buff=h(y.buff,!0),b.prototype.setState.call(this,y)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(y,N){var w=c(new Uint8Array(y)),C=f(w);return N?v(C):C},b})}(Ad)),Ad.exports}var PA=IA();const _9=Je(PA),Mn="An error occurred during upload";function Oa(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const RA=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(Mn);const c=Oa(t);c&&(l=new Error(c.message||Mn)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=Oa(t);let c=new Error(Mn);return l&&(c=new Error(l.message||Mn)),e.onError(c)}e.onSuccess(Oa(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const c=l.name,d=l.value;t.setRequestHeader(c,d)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))L9(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},Pv=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,MA=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await FA(n,t),i=[];$A(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=Oa(l);if(l.status<200||l.status>=300){let d=new Error(Mn);return c&&(d=new Error(c.message||Mn)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},$A=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,d)=>{const f=o*i,u=Math.min(t.size,f+i),h=new FormData;if(e.data){let v=e.data;Array.isArray(v)||(v=[v]),v.forEach(b=>{for(const[y,N]of Object.entries(b))Array.isArray(N)?h.append(y,...N):h.append(y,N)})}if(e.formDataAttributes){let v=e.formDataAttributes;Array.isArray(v)||(v=[v]),v.forEach(b=>{Array.isArray(b.value)?h.append(b.name,...b.value):h.append(b.name,b.value)})}h.append("file",Pv.call(t,f,u)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const v=Oa(p);if(p.status<200||p.status>=300){d(v);let b=new Error(Mn);v&&(b=new Error(v.message||Mn)),e.onError(b)}else c("reponseText")}},p.upload.addEventListener("progress",v=>{const b=v;e.onProgress(b,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(v=>{const b=v.name,y=v.value;p.setRequestHeader(b,y)});else{const v=e.header.name,b=e.header.value;p.setRequestHeader(v,b)}const g=e.headers||{};if(g instanceof Headers)g.forEach((v,b)=>p.setRequestHeader(b,v));else for(const[v,b]of Object.entries(g))L9(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},FA=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new _9.ArrayBuffer,l=new FileReader;function c(){const d=i*t,f=d+t>=e.size?e.size:d+t;l.readAsArrayBuffer(Pv.call(e,d,f))}l.onload=d=>{if(o.append(d.target.result),i+=1,i<s)c();else{const f=o.end(),u=new _9;u.append(f),u.append(e.name);const h=u.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function O9(e){return Date.now()+e}const HA=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var b;o+=1,h.uid=O9(o);const p={uid:h.uid,name:h.name,status:Cr.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let v=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(y){console.error(y)}p.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(p.name))&&(p.status=Cr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Cr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Cr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),s.value.push(p),v}async function c(h){var v;const p=h instanceof File?i(h):h,g=b=>{var y;t.onRemove(b,s.value),s.value.splice(s.value.indexOf(p),1),(y=b.url)!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((v=e.beforeRemove)==null?void 0:v.call(e,p,s.value))!==!1&&g(p):g(p)}async function d(h,p,g){const v=i(p);v&&(v.status="fail",v.statusText=h.message,v.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function u(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??O9(o),status:p.status??Cr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},BA=a.defineComponent({name:"Upload",props:Et,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=fe(),i=a.shallowRef({}),o=a.computed(()=>e.theme===yn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Te({[`${s(Qn)}`]:!0,[`${s(Qn)}--${e.theme}`]:!0,[`${s(Qn)}--disabled`]:e.disabled,[`${s(Qn)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),d=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(O,T){x(O),n("delete",O,T)}const{fileList:u,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:v,handleError:b}=HA(e,{onRemove:f});function y(O){if(!O.length)return;if(e.limit>1&&u.value.length+O.length>e.limit){n("exceed",O,u.value);return}!e.multiple&&e.limit===1&&(u.value=[]);let T=O;(!e.multiple||e.limit===1)&&(T=O.slice(0,1));for(const E of T){const V=E,_=h(V);if(_){n("error",V,u.value,_);return}e.autoUpload&&C(V,T)}}function N(O,T){n("preview",O,T)}function w(O){S(O.raw)}async function C(O,T){var V;if(!e.beforeUpload)return S(O,T);let E;try{E=await((V=e.beforeUpload)==null?void 0:V.call(e,O,T))}catch{E=!1}if(E===!1){p(O);return}S(O,T)}function S(O,T){const{type:E,headers:V,header:_,data:A,formDataAttributes:P,method:D,withCredentials:M,name:j,url:H,sliceUrl:L,mergeUrl:R,chunkSize:B,customRequest:z}=e,{uid:k}=O,I={type:E,headers:V,header:_,withCredentials:M,file:O,data:A,formDataAttributes:P,method:D,filename:j,action:H,sliceUrl:L,mergeUrl:R,chunkSize:B,onProgress:te=>{g(te,O),n("progress",te,O,u.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))v(te,O),n("success",te,O,u.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");b(ne,O,te),n("error",O,u.value,ne)}delete i.value[k]},onError:te=>{b(te,O),n("error",O,u.value,te),delete i.value[k]},onComplete:()=>{T&&T.indexOf(O)===T.length-1&&n("done",u.value)}};let q=e.sliceUpload?MA:RA;z&&(q=z);const K=q(I);i.value[k]=K,K instanceof Promise&&K.then(I.onSuccess,I.onError)}function x(O){let T=i.value;O&&(T={[O.uid]:i.value[O.uid]}),Object.keys(T).forEach(E=>{if(T[E]instanceof XMLHttpRequest){const V=T[E];V==null||V.abort()}delete i.value[E]})}return a.onBeforeUnmount(()=>{u.value.forEach(({url:O})=>{O!=null&&O.startsWith("blob:")&&URL.revokeObjectURL(O)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(S9,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(Qn)}__tip`},[e.tip]),a.createVNode(DA,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:O=>o.value&&a.createVNode(S9,a.mergeProps(d.value,{file:O,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),Rv=Le(BA),Vd=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:p0,Affix:Em,Alert:Am,AnimateNumber:Vm,Backtop:km,Badge:Dm,Breadcrumb:Pm,Button:Ye,Card:sp,Cascader:Pp,Checkbox:ot,CodeDiff:jp,Collapse:Up,ColorPicker:dg,ConfigProvider:Om,Container:fg,DatePicker:og,Dialog:mg,Divider:pg,Dropdown:gg,Exception:Eo,FixedNavbar:vg,Form:bg,InfoBox:Cg,Input:Bn,Link:xg,Loading:$n,Menu:Tg,Message:kg,Modal:ds,Navigation:Dg,Notify:Pg,OverflowTitle:ap,Pagination:F0,PopConfirm:Rg,Popover:gt,Popover2:Mg,Process:$g,Progress:ja,Radio:mi,Rate:jg,ResizeLayout:zg,SearchSelect:Xg,Select:x0,Sideslider:Zg,Slider:Qg,Steps:tv,Swiper:nv,Switcher:rv,Tab:ov,Table:xv,Tag:Fa,TagInput:Ap,TimePicker:Sv,Timeline:Tv,Transfer:_v,Tree:Iv,Upload:Rv,VirtualRender:cs,scrollbar:C0},Symbol.toStringTag,{value:"Module"})),E9=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(Vd).forEach(s=>{const i=Vd[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,Vd[s])}),n&&Af(n,t)},jA={createInstall:E9,install:E9()},Mv="2.0.2-beta.44";window.__bkui_vue_version__=Mv;exports.$bkPopover=p0;exports.Affix=Em;exports.Alert=Am;exports.AnimateNumber=Vm;exports.Backtop=km;exports.Badge=Dm;exports.Breadcrumb=Pm;exports.Button=Ye;exports.Card=sp;exports.Cascader=Pp;exports.Checkbox=ot;exports.CodeDiff=jp;exports.Collapse=Up;exports.ColorPicker=dg;exports.ConfigProvider=Om;exports.Container=fg;exports.DatePicker=og;exports.Dialog=mg;exports.Divider=pg;exports.Dropdown=gg;exports.Exception=Eo;exports.FixedNavbar=vg;exports.Form=bg;exports.InfoBox=Cg;exports.Input=Bn;exports.Link=xg;exports.Loading=$n;exports.Menu=Tg;exports.Message=kg;exports.Modal=ds;exports.Navigation=Dg;exports.Notify=Pg;exports.OverflowTitle=ap;exports.Pagination=F0;exports.PopConfirm=Rg;exports.Popover=gt;exports.Popover2=Mg;exports.Process=$g;exports.Progress=ja;exports.Radio=mi;exports.Rate=jg;exports.ResizeLayout=zg;exports.SearchSelect=Xg;exports.Select=x0;exports.Sideslider=Zg;exports.Slider=Qg;exports.Steps=tv;exports.Swiper=nv;exports.Switcher=rv;exports.Tab=ov;exports.Table=xv;exports.Tag=Fa;exports.TagInput=Ap;exports.TimePicker=Sv;exports.Timeline=Tv;exports.Transfer=_v;exports.Tree=Iv;exports.Upload=Rv;exports.VirtualRender=cs;exports.bkEllipsis=rw;exports.bkEllipsisInstance=g0;exports.bkLoading=Mm;exports.bkTooltips=un;exports.clickoutside=ln;exports.default=jA;exports.defaultRootConfig=or;exports.mousewheel=hw;exports.overflowTitle=Cw;exports.provideGlobalConfig=Af;exports.rootProviderKey=Hr;exports.scrollbar=C0;exports.setPrefixVariable=Md;exports.useGlobalConfig=Q8;exports.useLocale=De;exports.usePrefix=fe;exports.version=Mv;
|