bkui-vue 2.0.2-beta.47 → 2.0.2-beta.48

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 CHANGED
@@ -363,4 +363,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
363
363
  m 0 ${y?"":"-"}${b}
364
364
  a ${b} ${b} 0 1 1 0 ${y?"-":""}${b*2}
365
365
  a ${b} ${b} 0 1 1 0 ${y?"":"-"}${b*2}
366
- `,E={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},A={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",A,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},wE=(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 CE={extCls:m.string,type:f8(),percent:m.number.def(0),theme:m.theme().def(Li.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:d8(),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"})},NE=a.defineComponent({name:"Progress",props:CE,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(wE,t,C9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(bE,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])}}),Ua=Le(NE),Zg=Symbol("RadioGroup");function Qg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const ev=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Zg,Nm),s=!xm(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}},xE={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:Yr().def(()=>!0)},SE=a.defineComponent({name:"Radio",props:xE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Qg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=ev(),{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()])}}),TE={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:Yr().def(()=>!0)},_E=a.defineComponent({name:"RadioButton",props:TE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Qg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=ev(),{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()])}}),OE={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:Yr().def(()=>!0)},EE=a.defineComponent({name:"RadioGroup",props:OE,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(Zg,{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()])}}),gi=lt(SE,{Group:EE,Button:_E}),Ps=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)])])])])]))])}}),LE=a.defineComponent({name:"Rate",components:{star:Ps},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(Ps,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(Ps,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(Ps,a.mergeProps({editable:!1,rate:0},u),null)]])}}),tv=Le(LE),AE=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),C=a.ref(null),w=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`})),A=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 V=new ResizeObserver(_);const R=()=>{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=()=>{C.value.style.display="block",C.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=w.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||R(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const W=$=>{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?w.value.style[x.value]=re:N.value.style[n.value]=re,W(oe)},te=()=>{if(N.value.style.visibility="hidden",C.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{F(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;w.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},F=()=>{if(!d.value)return!1;const k=w.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=A.value,!g.value)return p.value=!0,!1;P(),a.nextTick(()=>{w.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,P(),t("collapse-change",h.value)},P=()=>{const k=w.value.getBoundingClientRect();B(!h.value),h.value?(w.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),w.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,w.value.style[x.value]=w.value.getAttribute(`data-${x.value}`)||O.value)},B=k=>{const I=()=>{p.value=k,w.value.style.transition="",w.value.removeEventListener("transitionend",I)};w.value.addEventListener("transitionend",I),w.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(()=>{V.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(V.unobserve(y.value),V=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:C,asideRef:w,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)])}}),nv=Le(AE);var Ad=null;function VE(e){return Ad||(Ad=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),Ad(e)}var Vd=null;function kE(e){Vd||(Vd=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Vd(e)}function DE(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 Rs(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function rv(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function df(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(rv(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var IE='.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%}',ff=0,Js=null;function PE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=$E.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)||vi(e)}),o=df(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(){vi(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(ff||(Js=DE(IE)),FE(e),e.__resize_rendered__=df(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),ff++}function RE(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",G0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--ff&&Js&&Js.parentNode.removeChild(Js)}}function ME(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 $E(){var e=df(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(K0(this),this.addEventListener("scroll",G0,!0)),this.__resize_rendered__=t,vi(this))}function G0(){var e=this;K0(this),this.__resize_raf__&&kE(this.__resize_raf__),this.__resize_raf__=VE(function(){var t=ME(e);t&&(e.__resize_last__=t,vi(e))})}function vi(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function FE(e){var t=rv(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=Rs("div",{className:"resize-triggers"}),r=Rs("div",{className:"resize-expand-trigger"}),s=Rs("div"),i=Rs("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},K0(e),e.addEventListener("scroll",G0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function K0(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 av=Symbol("SEARCH_SELECT_PROVIDER_KEY"),HE=e=>{a.provide(av,e)},sv=()=>a.inject(av);var In=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(In||{});const iv=/(\||,|、|\r\n|\n)/gm,ov=/^(\||,|、|\r\n|\n)$/;var Gr=(e=>(e.AND="&",e.OR="|",e))(Gr||{});class Sr{constructor(t,n="default"){ve(this,"id");ve(this,"name");ve(this,"values",[]);ve(this,"condition");ve(this,"logical");ve(this,"nameRenderKey",Qn(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=Qn(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(iv).filter(l=>l.trim()&&!ov.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 BE=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:Gr.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"),(C,w)=>(y.length===0&&w!==0?y.push(g.slice(0,w)):N>=0&&y.push(g.slice(N+C.length,w)),y.push(a.createVNode("span",{class:"is-keyword"},[C])),N=w,C)),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(gi,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(gi,{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()])}}),lv=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:cn},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:In.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=Ka(100,K);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:C,searchData:w}=sv(),S=a.computed(()=>{var U;return((U=u.value)==null?void 0:U.logical)||Gr.OR}),x=a.ref(Qn(10)),O=a.ref(!1);a.watch(N,()=>{e.mode===In.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var q,ae;f.value&&((q=y.value)==null?void 0:q.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":A(U);break}}function E(U){var de;U.preventDefault(),(de=i.value)==null||de.blur();const q=y.value.length;let ae=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<q;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+q)%q;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 A(U){var ae;if(!v)return;U.preventDefault();const q=(ae=y.value)==null?void 0:ae.find(de=>de.id===h.value);q&&P(q)}function _(U){var q,ae,de;if(!((q=o.value)!=null&&q.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((de=u.value)!=null&&de.isCustomMenu){e.mode===In.EDIT&&(F().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===In.EDIT||u.value){u.value&&F().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let V=!1;function R(U){if(!V){if(c.value=!1,e.mode===In.EDIT&&u.value&&!d.value){const q=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!q.length)return;U==null||U.preventDefault();const ae=document.createRange(),de=window.getSelection();ae.selectNodeContents(q.at(-1)),de==null||de.removeAllRanges(),V=!0,setTimeout(()=>{V=!1},200),de.addRange(ae),ne(!0,!1);return}K(),ne(!1,!d.value)}}function D(U){U.preventDefault();const q=U.clipboardData.getData("text").trim();if(!u.value){const ae=J(q);if(ae){u.value=ae,ne(!0,!0);return}l.value=q.split(iv).filter(de=>de.trim()&&!ov.test(de)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(q),g()}function M(U){if(O.value)return;re();const q=U.target.innerText;if(u.value){if(u.value&&!q){x.value=Qn(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=q,g();return}l.value=u.value.isSpecialType()?q:q.replace(u.value.name,"").replace(":",""),g()}function j(U){var q;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&&((q=l.value)!=null&&q.length)&&U.preventDefault();return}F(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function F(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 W()&&((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 q,ae,de;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((q=u.value)!=null&&q.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());C("")}async function P(U,q){var ae,de,ee,ue,ce;if((ae=U.value)!=null&&ae.id){const ge=new Sr({...U,id:U.realId??U.id},q);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 W(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 Sr(U,q??((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 W(u.value.values)&&(u.value.multiple||oe(),e.valueBehavior===Ot.NEED_KEY&&((ce=u.value)!=null&&ce.multiple)&&ne())}function B(U){P(U,"condition")}function z(U){var q;switch(U.id){case"confirm":if(!((q=u.value)!=null&&q.values.length))return;l.value="",F();break;case"cancel":u.value.values=[],f.value=!1;break}}function k(U){u.value&&(u.value.logical=U)}async function I(U,q){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,q)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return C(ae||"校验错误"),!1}return C(""),!0}async function W(U){if(!u.value)return await I(null,U);const{searchItem:q,validate:ae,values:de}=u.value;return ae&&typeof e.validateValues=="function"?await I(q,U??de):(C(""),!0)}async function K(){var q,ae,de,ee,ue;let U=[];if(typeof e.getMenuList=="function"&&(!((q=e.data)!=null&&q.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===In.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:Qn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,realId:ce.id,id:Qn(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:Qn(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),q=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await W(q))return t("add",U||new Sr({...q[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 W(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(),q=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),q.removeAllRanges(),q.addRange(U)}function ne(U=!1,q=!0){U&&setTimeout(K,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&q&&a.nextTick(Q),t("focus",d.value)}function oe(U){var ae;t("add",U??u.value);const q=!((ae=u.value)!=null&&ae.isCustomMenu);u.value=null,l.value="",q&&(ne(!0,q),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(q=>q.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[q,ae]=U.split(":");if(q!=null&&q.trim()){const de=w.value.find(ee=>ee.name===q.trim());if(de){const ee=new Sr({...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 F().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}],F().then(q=>q&&X())}function se(){u.value||(h.value="")}function H(U){O.value=!1,l.value=U.data,M(U)}function G(){O.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:R,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:R,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:P,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:H,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(BE,{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})}}),jE=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}=sv();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 Sr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||Gr.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(lv,{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:In.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)])])}}),kd=40,N9=6,x9=26,zE=32,UE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:zE*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)}}},qE=a.defineComponent({name:"SearchSelect",directives:{clickoutside:cn},props:UE,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=Ka(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(V=>V.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var R;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const V=[];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||Gr.OR,V.push(M);else{let j=e.data.find(P=>P.id===D.id),F="default";j||(j=e.conditions.find(P=>P.id===D.id),j&&(F="condition")),!j&&!((R=D.values)!=null&&R.length)&&(F="text");const L=new Sr(j||D,F);L.values=D.values||[],L.logical=D.logical||Gr.OR,V.push(L)}}c.value=V,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!V.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{PE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{RE(o.value.querySelector(`.${r("search-select-container")}`),f)}),HE({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,V){u.value=`${_.id}_${V}`}function v(_,V){const R=c.value.slice();R.splice(V,1,_),t("update:modelValue",R.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")}`),V=o.value.querySelector(".search-container").clientWidth-N9-2,R=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=V-kd&&j<=R.length-1;){const F=R[j];if(F.clientHeight>x9){d.value=j;return}D+=F?F.clientWidth+N9:0,D>=V-kd&&(M=j),j+=1}if(M===R.length-1&&D<=V){d.value=-1;return}d.value=D>=V-kd?M:M-1}function C(){u.value||i.value.inputFocusForWrapper()}function w(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var V;return!((V=o.value)!=null&&V.contains(_))}function x(_){const V=c.value.slice();V.push(_),y(""),t("update:modelValue",V.map(R=>R.toValue()))}function O(_){const V=c.value.slice();V.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",V.map(R=>R.toValue()))}function T(_){var V;_&&(d.value=-1),_===!1&&((V=o.value.querySelector(`.${r("search-select-container")}`))==null||V.scrollTo(0,0)),l.value=_}function E(_){i.value.inputEnterForWrapper(),t("search",_)}function A(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:C,handleInputFocus:T,handleResize:N,handleClearAll:w,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:O,handleClickSearch:E,localConditions:s,resolveClassName:r,handleSelectedKey:A,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:x9}`.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(jE,{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(lv,{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(pr,{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(as,{class:"select-tips"},null),this.validateStr||""])])])}}),cv=Le(qE);function WE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const uv=B0(Vo);uv.width.default="400";const GE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...uv,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(fs,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}),WE(d)?d:{default:()=>[d]})}}}),dv=Le(GE),S9=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 A,_;let T="";if((A=e.params.customContent)!=null&&A[e.modelValue]){const V=e.params.customContent[e.modelValue];T=V.tip||V.label||""}const E=e.params.vertical?Ia.RIGHT:Ia.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),Na(window,"mousemove",C),Na(window,"touchmove",C),Na(window,"mouseup",w),Na(window,"touchend",w))},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},C=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)}},w=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),Ms(window,"mousemove",C),Ms(window,"touchmove",C),Ms(window,"mouseup",w),Ms(window,"touchend",w))},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()}}),Na=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ms=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},KE=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 W=`${I}`.split(".")[1];return W?W.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}),C=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),W=[];for(let K=1;K<k;K++)W.push(K*I);return e.range?W.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):W.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),w=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 W=e.minValue,K=0;W<=e.maxValue;W+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(W)};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:W}=e.customContent[k];return{tip:I||W||"",label:W||"",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,()=>{V()}),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(),Na(window,"resize",E())});const E=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},A=k=>{var I,W;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=(W=d.value)==null?void 0:W.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}R()}},_=()=>e.range?![g.value,v.value].every((k,I)=>{var W;return k===((W=o.value)==null?void 0:W[I])}):e.modelValue!==o.value,V=()=>{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)))},R=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},F=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:P}=fe(),B=(k,I)=>{let W=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:W,step:I};if(K=e.labelClick(k,te),K===!1)return}W=typeof K=="number"?K:W,console.log("handleStepLabelClick",W),M(W);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${P("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:d,style:w.value,class:`${P("slider-runway")}`,onClick:A},[a.createVNode("div",{style:N.value,class:[`${P("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?C.value.map((W,K)=>K===0||K===C.value.length-1?null:a.createVNode("div",{key:K,style:D(W),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,W)},null)):null,e.customContent?O.value.map((W,K)=>K===0||K===O.value.length-1?null:a.createVNode("div",{key:K,style:D(W.percent),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,W)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${P("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((W,K)=>a.createVNode("div",{key:K,style:D(W.stepWidth),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,W)},[W.stepLabel]));if(e.customContent)return O.value.map((W,K)=>a.createVNode("div",{key:K,style:D(W.percent),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,W)},[W.label]))}()]):void 0,a.createVNode(S9,{ref:f,modelValue:s.value,"onUpdate:modelValue":W=>s.value=W,params:T.value,onEmitChange:R,onResetSize:E},null),e.range?a.createVNode(S9,{ref:u,modelValue:i.value,"onUpdate:modelValue":W=>i.value=W,params:T.value,onEmitChange:R,onResetSize:E},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${P("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(jn,{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(jn,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:F},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),fv=Le(KE);var hv=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(hv||{});const T9={theme:m.theme().def(Li.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:ym(),status:Ce("status",{}).def(hv.UNKNOWN),lineType:bm(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},YE=a.defineComponent({name:"Steps",props:T9,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=>{T9.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(ts,{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(mr,{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])]):""])})])}}),mv=Le(YE),XE=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`})),C=D=>{let M=D;D>=b.value.length&&(M=0),D<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},w=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(()=>{C(f.value+1),T()},s.value))},E=()=>{window.clearTimeout(p.value)},A=()=>{var M;const D=(M=d.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{R()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},V=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}},R=()=>{var M;const D=V((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],R),a.onMounted(()=>{R(),T(),A()}),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:()=>w(D.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((D,M)=>a.createVNode("li",{class:O(M),onMouseover:()=>C(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>C(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>C(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),pv=Le(XE),JE={theme:u8(),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 yi=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function ZE(e){return e}function QE(e){return!!e}const eL={[yi.UPDATE]:ZE,[yi.CHANGE]:QE},tL=a.defineComponent({name:"Switcher",props:JE,emits:eL,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(yi.UPDATE,h),t(yi.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(fo,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),gv=Le(tL);var bi=(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))(bi||{}),Oa=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Oa||{});const vv=Ce("position",{}).def("top");var yv=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(yv||{});const bv=Ce("sortType",{}).def("replace"),nL={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},rL={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:Ei(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},aL={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),tabPosition:vv,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:bv,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff"),beforeChange:{type:Function}},sL={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:vv,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:bv,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...nL},_9=a.defineComponent({name:"TabNav",directives:{bkTooltips:fn},props:sL,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([Oa.LEFT,Oa.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===Oa.LEFT?g.right=0:g.left=0,g}if(e.type===bi.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:C,disabled:w,sortable:S,tips:x,numDisplayType:O}=p.props;if(!C)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:C,disabled:w,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:C,tabNum:w,numDisplayType:S}=v,x=()=>{const A=[this.resolveClassName("tab-header-item")];return N&&A.push(this.resolveClassName("tab-header--disabled")),e===y&&A.push(this.resolveClassName("tab-header--active")),A.join(" ")},O=(A,_)=>!N&&(A||_),T=(A,_)=>O(A.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,A)},[a.createVNode(pt,null,null)]):"",E=()=>["bracket"].includes(S)?`(${w})`:w;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:A=>{A.preventDefault(),c()},onDragenter:A=>{A.preventDefault(),l(b)},onDragleave:A=>{A.preventDefault()},onDragover:A=>{A.preventDefault()},onDragstart:A=>o(b,A),onDrop:A=>{A.preventDefault(),d(b,s)}},[isNaN(w)?a.createVNode("div",null,[C]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[C]),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(w)?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(is,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,C)=>a.createVNode("div",{key:C,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===bi.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])}}),iL=a.defineComponent({name:"Tab",components:{TabNav:_9},props:aL,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){var u;(((u=e.beforeChange)==null?void 0:u.call(e,f))??!0)&&(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===yv.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===Oa.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===bi.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:C,tabDrag:w}=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:C,tabDrag:w};return!s||!Array.isArray(s)?null:a.createVNode(_9,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)])])}}),oL=a.defineComponent({name:"TabPanel",props:rL,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]])}}),wv=lt(iL,{TabPanel:oL});var Cv=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(Cv||{}),Nv=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(Nv||{});const lL=["auto","highlight"],cL=["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"},xv=8,Mn=42;var Io=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Io||{});const Sv={def1:"#FAFBFD",def2:"#F0F1F5"},Ea={large:78,medium:60,small:42},uL=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:Ea.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:Ea.medium},{value:"large",label:e.value.setting.lineHeight.large,height:Ea.large}],Tv=Symbol("bkInitColumns"),dL=60;var Ze=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ze||{});const fL=["asc","desc","null","custom"],Tr=80,Jn={},hL={};Ce("showOverflowTooltipMode",{default:"auto"});const mL=Ce("columnType",{default:"__COL_TYPE_NONE"}),hf=Ce("columnType",{default:""});Ce("full",{default:"full"});Ce("columnSize",{default:"small"});const pL=st(),Y0=Ce("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),gL=Ce("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),vL=Ce("IFilterPropShape",{default:!1,type:[Boolean,Object]});var _v=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(_v||{});const Po=Ce("IColumnType",{default:{width:"100%",label:""},type:[Object]}),yL=Ce("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),Dd=Ce("LabelFunctionStringType",{}),bL=Ce("RenderFunctionStringType",{}),O9=Ce("SpanFunctionStringType",{}),wL=Ce("RowClassFunctionStringType",{}),CL=Ce("RowHeightFunctionNumberType",{});Ce("FunctionNumberType",{});const Zs=e=>Ce("StringNumberType",{}).def(e);Ce("IColumnPropType",{default:{label:void 0,minWidth:Tr},type:[Object]});var Ov=(e=>(e.independent="independent",e.interdependent="interdependent",e))(Ov||{});const NL={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(Po).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ce("columnPick",{}).def("disabled"),height:Zs("auto"),stripe:m.bool.def(!1),minHeight:Zs(Mn),maxHeight:Zs("auto"),rowHeight:CL,headHeight:m.number.def(Mn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ce("ITheadType",{}).def({color:Io.DEF1,height:Mn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ce("boderType",{})),m.string]).def([Cv.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(dL),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:yL,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:Y0,asyncData:m.bool.def(!1),rowHover:m.oneOf(lL).def(Nv.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:hf,headerAlign:hf,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:Mn}}).def(null),appendLastRow:Ce("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},xL={label:Dd,field:Dd,render:bL,width:m.oneOfType([m.number,m.string]),minWidth:Zs(Tr),columnKey:m.string.def(""),showOverflowTooltip:Y0,type:mL,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,pL]).def(!1),sort:gL,filter:vL,colspan:O9.def(1),rowspan:O9.def(1),align:hf,className:wL,prop:Dd,index:m.number.def(void 0)},SL=a.defineComponent({name:"TableColumn",props:xL,setup(e,{}){const t=a.inject(Tv,()=>{}),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:_0(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 TL=e=>!0,_L=e=>!0,OL=e=>!0,EL=e=>!0,$s=(e,t,n,r,s)=>!0,LL=e=>!0,AL=e=>!0,VL=e=>!0,kL=e=>!0,E9=e=>!0,DL=e=>!0,L9=e=>!0,IL=e=>!0,PL=e=>!0,RL={columnPick:TL,columnFilter:_L,columnSort:EL,colFilterSave:OL,rowClick:$s,rowDblclick:$s,rowExpand:LL,select:AL,selectAll:VL,selectionChange:kL,pageLimitChange:E9,pageValueChange:E9,settingChange:DL,scrollBottom:IL,cellClick:L9,cellDblclick:L9,rowMouseEnter:$s,rowMouseLeave:$s,dragend:PL},ML=(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 C=new WeakMap,w=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),w.value=-1e3,N=0,_(b),t==null||t(),b=null;const W=B.target;M(W),g=null},T=dr(B=>{w.value=w.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)},A=qn(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{A.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},V=B=>{if(!f)return;R(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();w.value=B.clientX-k.left,A(b),u=!0,document.addEventListener("mouseup",O)},R=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(W=>{W==null||W.classList.remove("col-pointer-hover"),W==null||W.classList.remove("poiner-left"),W==null||W.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,W=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${W}`)},M=B=>{h||(w.value=-1e3,B.classList.remove("cell-resize"),R(B),C.set(B,!1),document.removeEventListener("mousedown",V))},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:W}=I,K=B.offsetX;W>12&&(W-K<8||K<8&&k>0)?(f=!0,v=K<8?"left":"right",C.get(I)||(C.set(I,!0),I.classList.add("cell-resize"),D(I,v),y=z,document.addEventListener("mousedown",V))):(f=!1,M(I))}},[d.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},F=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=F(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},P=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=F(k);if(z!=null&&z.has(I)){const W=z.get(I);W.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{P(),L()},{immediate:!0,deep:!0}),{dragOffsetX:w}},$L=()=>{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 Ev=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}()}(),mf=typeof window<"u"&&typeof document<"u"&&window.document===document,wi=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")()}(),FL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(wi):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),HL=2;function BL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){FL(i)}function l(){var c=Date.now();if(n){if(c-s<HL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var jL=20,zL=["top","right","bottom","left","width","height","size","weight"],UL=typeof MutationObserver<"u",qL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=BL(this.refresh.bind(this),jL)}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(){!mf||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),UL?(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(){!mf||!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=zL.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}(),Lv=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},Kr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||wi},Av=Ro(0,0,0,0);function Ci(e){return parseFloat(e)||0}function A9(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+Ci(i)},0)}function WL(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]=Ci(o)}return n}function GL(e){var t=e.getBBox();return Ro(0,0,t.width,t.height)}function KL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Av;var r=Kr(e).getComputedStyle(e),s=WL(r),i=s.left+s.right,o=s.top+s.bottom,l=Ci(r.width),c=Ci(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=A9(r,"left","right")+i),Math.round(c+o)!==n&&(c-=A9(r,"top","bottom")+o)),!XL(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 Ro(s.left,s.top,l,c)}var YL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Kr(e).SVGGraphicsElement}:function(e){return e instanceof Kr(e).SVGElement&&typeof e.getBBox=="function"}}();function XL(e){return e===Kr(e).document.documentElement}function JL(e){return mf?YL(e)?GL(e):KL(e):Av}function ZL(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 Lv(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function Ro(e,t,n,r){return{x:e,y:t,width:n,height:r}}var QL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ro(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=JL(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}(),eA=function(){function e(t,n){var r=ZL(n);Lv(this,{target:t,contentRect:r})}return e}(),tA=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Ev,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 Kr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new QL(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 Kr(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 eA(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}(),Vv=typeof WeakMap<"u"?new WeakMap:new Ev,kv=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=qL.getInstance(),r=new tA(t,n,this);Vv.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){kv.prototype[e]=function(){var t;return(t=Vv.get(this))[e].apply(t,arguments)}});var nA=function(){return typeof wi.ResizeObserver<"u"?wi.ResizeObserver:kv}();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)}},rA=e=>sr(e,"auto"),sr=(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},aA=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>cL.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Dv=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?qn(i,n):Cm(i),l=()=>Reflect.apply(o,void 0,[]),c=new nA(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},X0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},sA=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),Ni=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Do(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"?sA(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},iA=(e,t)=>Do(e,t),Cr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Cr(Reflect.apply(e,void 0,t),t):[],oA=(e,t,n)=>{const r=lA(e,t,n);return r!==null?r:$t()},lA=(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,V9=(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]))},xi=(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,cA=(e,t,n,r)=>{const s=xi(e,t,n,r,"colspan"),i=xi(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},Iv=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>Ni(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},uA=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]},dA=(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:Iv(t,e.value??Ze.NULL,n)},e):null,Si=(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,fA=(e,t,n)=>{const r=oA(e,n,t);return r!==void 0&&e[r]!==void 0?Do(e,r):t},hA=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=dA(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},mA=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Fs=e=>a.isProxy(e)?a.toRaw(e):e,pA=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=(H,G={})=>{i.forEach(q=>q.active=!1);const U=i.find(q=>q.col===H);if(U){Object.assign(U,G,{active:!0});return}i.push({col:H,...G,active:!0})},f=(H,G,U)=>{let q=0;return/^\d+\.?\d*(px)?$/.test(`${H[G]}`)&&(q=Number(`${H[G]}`.replace(/px/,"")),$(H,ye.WIDTH,q),M(H,{width:q,left:null,right:null})),/^\d+\.?\d*%$/.test(`${H[G]}`)&&(q=Number(`${H[G]}`.replace(/%/,""))/100*U,$(H,ye.WIDTH,q),M(H,{width:q,left:null,right:null})),q},u=H=>{let G=H,U=Tr;const q=(ee,ue="width")=>{const ce=[];return ee.forEach(ge=>{const Ne=f(ge,ue,H);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=q(p);q(ae,"minWidth").forEach(ee=>{const ue=U>Tr?U:Tr;$(ee,ye.WIDTH,ue),M(ee,{width:ue,left:null,right:null})})},h=(H,G={})=>{const U=o.find(q=>q.col===H);if(U){Object.assign(U,G);return}o.push({col:H,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(H=>!I(H)))},v=()=>{var H,G;return e.rowDraggable?{minWidth:50,width:((H=e.rowDraggable)==null?void 0:H.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},b=(H=["rowspan","colspan"])=>r.some(G=>H.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),C=(H,G,U)=>{let q=U;const ae=xi(H,G,null,null,"colspan"),de={skipCol:!1,skipColLen:0};return q>0&&(de.skipColLen=q,de.skipCol=!0,q=q-1),ae>1&&(de.skipColLen=ae,q=ae-1),{...de,skipColumnNum:q}},w=H=>{if(/^\d+/.test(`${H.minWidth}`))return H.minWidth;let G=Tr;return H.sort&&(G=G+18),H.filter&&(G=G+28),G},S=(H,G)=>{const U=ne(H,ye.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((q,ae)=>{const de=ae.split("_").slice(-1)[0];return Object.assign(q,{[de]:ee=>{U.get(ae).forEach(ue=>Reflect.apply(ue,void 0,[ee,H,G]))}})},{}):{}},x=H=>{if(!H.filter)return null;const G=(ae,de="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de),U=(ae,de)=>{const{match:ee}=H.filter,ue=Ni(de,Xe(H,"field",[H,de]));return ee!=="fuzzy"?ae.includes(ue):ae.some(ce=>G(ce,"img").test(ue))};return typeof H.filter.filterFn=="function"?(ae,de,ee,ue)=>H.filter.filterFn(ae,de,H,ee,ue):(ae,de)=>ae.length?U(ae,de):!0},O=H=>{l.length=0;let G=0;const U=[],q=v();q&&H.unshift(q);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(Ne=>ae(Ne.children??[],ge+1))};ae(H);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,gr,hs,ms,na;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);(((gr=Ae.children)==null?void 0:gr.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=((hs=Ae.children)==null?void 0:hs.length)??0,Tt=((ms=Ae.children)==null?void 0:ms.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),(na=Ae.children)==null||na.forEach(($o,Fo)=>{Ve=Ve+ee($o,ge+1,Ae,Ve+Fo)}),Fe>0?Fe-1:0};let ue=0;return H.forEach((ce,ge)=>{ue=ue+ee(ce,0,null,ue+ge)}),U},T=H=>c.get(H),E=()=>{i.length=0;let H=0;(r||[]).forEach((G,U)=>{const{skipCol:q,skipColumnNum:ae,skipColLen:de}=y.value?C(G,U,H):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(H=ae,!n.has(G)){const{type:ee,fn:ue,scope:ce,active:ge,enabled:Ne}=hA(G,e),Oe=x(G),Ae=e.settings??{},Ve=mA(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]:w(G),[ye.LISTENERS]:new Map,[ye.WIDTH]:G.width,[ye.IS_HIDDEN]:V9(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:q,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:q,skipColumnNum:ae,skipColLen:de},[ye.COL_MIN_WIDTH]:w(G)})})},A=(H,G)=>{$(H,ye.COL_FIXED_STYLE,G)},_=H=>ne(H,ye.COL_FIXED_STYLE)??{},V=H=>ne(H,ye.COL_RECT),R=H=>ne(H,ye.CALC_WIDTH),D=H=>ne(H,ye.WIDTH),M=(H,{left:G,right:U,width:q,height:ae})=>{const de=V(H),ee={left:G??de.left,right:U??de.right,width:q??de.width,height:ae??de.height};$(H,ye.COL_RECT,ee)},j=qn((H,G)=>{r.length=0,r.push(...O(H)),E(),g(),G==null||G()}),F=(H,G=!1)=>{$(H,ye.IS_HIDDEN,G)},L=(H,G)=>{$(H,ye.RESIZE_WIDTH,G)},P=(H,G)=>{const{type:U,fn:q,scope:ae,active:de}=G,ee={[ye.COL_SORT_TYPE]:U,[ye.COL_SORT_FN]:q,[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&&$(H,ue,ee[ue])})},B=(H,G)=>{n.has(H)&&Object.assign(n.get(H)[ye.COL_FILTER_OBJ],G)},z=[ye.WIDTH],k=(H,G=z)=>ne(H,G[0])??ne(H,G[1])??ne(H,G[2]),I=H=>ne(H,ye.IS_HIDDEN)??!1,W=H=>ne(H,ye.COL_UID),K=(H,G,U)=>{[ye.COL_SORT_FN,ye.COL_SORT_SCOPE,ye.COL_SORT_TYPE].includes(G)&&d(H,{[G]:U}),[ye.COL_FILTER_FN,ye.COL_FILTER_VALUES].includes(G)&&h(H,{[G]:U})},te=(H,G)=>{const U=p.findIndex(de=>de===H),q=k(H)-G,ae=p[U+1];ae&&$(ae,ye.WIDTH,k(ae)+q)},$=(H,G,U)=>{K(H,G,U);const q=n.get(H);if(q&&Object.prototype.hasOwnProperty.call(q,G)){if(a.isRef(q[G])){q[G].value=U;return}q[G]=U}},Q=(H,G)=>{const U=G||H.checked||[],q=H.fields||[];r.forEach(ae=>{$(ae,ye.IS_HIDDEN,V9(q,ae,U))})},ne=(H,G)=>{var q;const U=(q=n.get(H))==null?void 0:q[G];return a.isRef(U)?U.value:U},oe=(H,G)=>{var U;return(U=n.get(H))==null?void 0:U[G]},re=(H,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!H.fixed,column_fixed_left:!!H.fixed,column_fixed_right:H.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(H=>{$(H,ye.COL_SORT_ACTIVE,!1),$(H,ye.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const H=p.find(G=>G.type==="selection");H&&($(H,ye.SELECTION_VAL,!1),$(H,ye.SELECTION_INDETERMINATE,!1))},formatColumns:E,flatColumnTemplate:O,isHiddenColumn:I,getColumnId:W,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(H,G)=>({...re(H,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:V,getColumnCustomClass:(H,G)=>{const U=H.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:R,getColumnWidth:D,getLeftColumnsWidth:(H,G=!1)=>{let U=!0,q=0,ae=0;for(;U&&ae<p.length;){if(H===p[ae]){G&&(q=q+D(p[ae])),U=!1;break}q=q+D(p[ae]),ae=ae+1}return q},getGroupAttribute:T,getPreColumn:H=>{const U=p.findIndex(q=>q===H)-1;return p[U]},getColumnIndex:H=>p.findIndex(G=>G===H),resolveEventListener:S,setColumnIsHidden:F,setColumnResizeWidth:L,setColumnSortOption:P,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(H,G)=>{e.colSortBehavior===Ov.independent&&r.forEach(U=>{$(U,ye.COL_SORT_ACTIVE,!1)}),$(H,ye.COL_SORT_ACTIVE,G)},setFixedStyle:A,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},gA=(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:C,bottom:w}=b.getBoundingClientRect(),S=N-C>w-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 C=Number(N);const w=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(C=C+1),t.changePageRowIndex(Number(w),C),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},vA=(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}},yA=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)])}}}),bA=(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:ar.Normal,mode:p0.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(Fn,{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}}},wA=(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(Mn),g=a.ref(1),v=a.computed(()=>{var q,ae,de;return(q=t.slots)!=null&&q.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((de=e.fixedBottom)==null?void 0:de.height)??Mn:0}),{resolveClassName:b}=fe(),{renderScrollLoading:y}=bA(e,t),N=a.computed(()=>Te({[b("table")]:!0},aA(e.border))),C=a.computed(()=>({height:sr(e.height),maxHeight:sr(e.maxHeight),minHeight:sr(e.minHeight)})),w=a.computed(()=>Te({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var de,ee,ue,ce;const q=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",q),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--shadow-left",ae)},x=Cm(()=>{var q,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(q=n.value)==null?void 0:q.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=q=>{o.value=q,x()},T=q=>{g.value=q},E=q=>{l.value=q,x()},A=()=>{var q,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(q=n.value)==null?void 0:q.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")},_=q=>{d.value=q,x()},V=X0(e),R=a.computed(()=>Xe(V,"height",["thead"])*g.value),D=a.computed(()=>{var q;return{"--row-height":`${R.value}px`,"--background-color":Sv[((q=e.thead)==null?void 0:q.color)??Io.DEF1],paddingRight:e.scrollbar?null:`${xv}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Te({[b("table-footer")]:!0,"is-hidden":te.value===0})),F=q=>a.createVNode("div",{ref:n,style:C.value,class:N.value},[q,a.createVNode(yA,null,{default:()=>{var ae,de;return[(de=(ae=t.slots).default)==null?void 0:de.call(ae)]}})]),L=(q,ae,de)=>a.createVNode("div",{ref:r,style:D.value,class:w.value},[q==null?void 0:q(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[de==null?void 0:de()]),ae==null?void 0:ae()]),P=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:P.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${C.value.maxHeight}`)){const q=e.showHead?R.value:0,ae=te.value+q+v.value;return`calc(${C.value.maxHeight} - ${ae}px)`}return null}),I=q=>q-R.value-v.value-te.value,W=(q,ae=!0)=>{if(ae){z.value=I(q);return}z.value=q},K=q=>{z.value=q},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=q=>{te.value=q},ne=qn((...q)=>{t.emit(ze.SCROLL_BOTTOM,{...q})}),oe=()=>{var de,ee,ue,ce;const q=((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=q-ae-(o==null?void 0:o.value)},re=q=>{p.value=q},X=q=>{c.value=u.bottom??0;const ae=q[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 q,ae,de;return{minHeight:`${((q=e.fixedBottom)==null?void 0:q.minHeight)??Mn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((de=e.fixedBottom)==null?void 0:de.height)??null}});a.onMounted(()=>{oe(),A()});const le=()=>{const q=y==null?void 0:y();return q?a.createVNode("div",{style:Z.value,class:pe},[q]):null};return{renderContainer:F,renderHeader:L,renderBody:(q,ae,de)=>a.createVNode(us,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:q,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:q=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[q]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:W,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:O,setDragOffsetX:_,setFixedColumns:q=>{h.length=0,h.push(...q)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:A,refRoot:n,refHead:r,refBody:s,refFooter:i}},CA=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{nr(e.value)&&(i(),s=Dv(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},NA=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}},xA=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(ko,{description:n.value,scene:"part",type:r.value},null)}}),pf=a.defineComponent({name:"TableCell",props:{column:Po,row:m.any.def({}),parentSetting:Y0,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:_v.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:sr(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:C={}}=e.column.showOverflowTooltip,w={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:C,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(w.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(w.showOverflowTooltip,e.column.showOverflowTooltip)),w}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var C;const N=f();return y?((C=N==null?void 0:N.cloneNode)==null?void 0:C.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var E,A;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:C}=e;const w=c(y.allowHtml);let S=()=>w,x={},O="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,C=y.resizerWay||"debounce",S=()=>y.content||w,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])||w)}return e.isHead&&(N=!(((A=(E=e.column)==null?void 0:E.showOverflowTooltip)==null?void 0:A.showHead)??!0),O="auto",S=()=>{var _,V;return((V=(_=f())==null?void 0:_.cloneNode)==null?void 0:V.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:C,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||!nr(y))return;const{mode:N,disabled:C}=d();if(r.value=!C,N==="auto"&&(r.value=U9(y)),N==="static"&&(r.value=!0),r.value){const w=a.ref(d());l===null&&(l=x0(y,{disabled:w.value.disabled,content:w.value.content,mode:w.value.mode,popoverOption:w.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:C}=d();y||(u(),C!==!1&&e.observerResize&&(h=Dv(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):"--"])}}}),Hs=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)])}}),SA=({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=(_,V)=>{V.stopImmediatePropagation(),V.preventDefault(),V.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:V,end:R}=f(),D=V.index<R.index?V.index:R.index,M=V.index<R.index?R.index:V.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{Si(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),A=Si(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:O,disabled:!A,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}):Vg(x),b=()=>{var T;const x=()=>{if(Xe(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),_e.ROW_INDEX);const A=Xe(o,"field",[o,s]),_=Ni(s,A);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:V}=e;if(V)return typeof V=="function"?V({row:s,column:o,index:i}):V}return _},O={expand:()=>l?"":w(),selection:()=>g(),drag:S};return((T=O[o.type])==null?void 0:T.call(O,s,o,i,t))??x()},y=()=>{const x=Ni(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(rs,null,null):a.createVNode(os,null,null);return a.createVNode("span",null,[[O,((E=(T=n.slots).expandContent)==null?void 0:E.call(T,s))??""]])},C=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})},w=()=>{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=>C(O)},[x()])},S=()=>{var E,A,_;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=((A=e.rowDraggable)==null?void 0:A.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(io,{style:`'--font-size: ${O};'`,class:"drag-cell"},null)};return{renderCell:b}},Pv=()=>{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 k9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Bs=32,TA=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:fn},props:{column:Po,height:m.number.def(Bs)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=Pv(),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 P;(P=p.value)==null||P.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)??Bs*y}),C=a.computed(()=>{const{height:L,list:P=[]}=i.value;return L||P.length*Bs}),w=a.computed(()=>{const L=Bs*2;return b.value.length>y?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${w.value}px`,height:/%$/.test(`${C.value}`)?C.value:`${C.value}px`})),x=(L,P="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),P),O=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:P}=A(_,s.value.confirm);if(P||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))},A=(L,P)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:P}),{btnSave:_,btnReset:V}=i.value,R=()=>{const{disabled:L,text:P}=A(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[P]):a.createVNode(Ye,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:O},k9(P)?P:{default:()=>[P]})},D=()=>{const{disabled:L,text:P}=A(V,s.value.reset);return L?"":a.createVNode(Ye,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:E},k9(P)?P:{default:()=>[P]})},M=(L,P)=>{const B=new Set(f.checked);L?B.add(P.value):B.delete(P.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))})},F=L=>L.length?(j(),L.map(P=>a.withDirectives(a.createVNode("div",{key:P.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(P.value),immediateEmitChange:!1,label:P.value,modelValue:f.checked.includes(P.value),onChange:B=>M(B,P)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${P.value}-ref`]=B},[`${P.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:P.tipKey||P.text,placement:"right",disabled:!P.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:Ai.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(so,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(jn,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(xo,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[F(b.value)])]}),a.createVNode("div",{class:"content-footer"},[R(),D()])])})}}),_A=a.defineComponent({name:"HeadSort",props:{column:Po,defaultSort:m.oneOf(fL).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(qi,{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(es,{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 OA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const EA=({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:F=t.getColumnRefAttribute(s,ye.COL_SORT_TYPE)}=M??{},L=j?Ze.NULL:F,P=Iv(s,L,e.sortValFormat);t.setColumnAttribute(s,ye.COL_SORT_TYPE,L),t.setColumnAttribute(s,ye.COL_SORT_FN,P),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(_A,{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})},F=()=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(TA,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:F},null)},p=X0(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 F=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:F,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:C}=fe(),w=C("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,ye.SELECTION_DISABLED),j=t.getColumnAttribute(s,ye.SELECTION_VAL),F=t.getColumnAttribute(s,ye.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:F,modelValue:j,outline:!0,onChange:L=>y(L)},null),a.createVNode(gt,{ref:d,extCls:w,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:F,modelValue:j,onChange:L=>y(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:F}=b();return a.createVNode(pf,{class:M,column:s,headExplain:Xe(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},OA(F)?F:{default:()=>[F]})},O=()=>{if(!t.getColumnAttribute(s,ye.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:uA(t.getColumnRefAttribute(s,ye.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":Sv[((D=e.thead)==null?void 0:D.color)??Io.DEF1]}),E=t.getGroupAttribute(c),A=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(()=>A.value.concat([{"is-head-group":E==null?void 0:E.isGroup,"is-head-group-child":!!(E!=null&&E.parent)}])),V=()=>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},[V()]):a.createVNode("th",a.mergeProps({style:T,class:A.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()])}},LA=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 AA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const VA=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=De("table"),o=$t();let l={};const c=LA(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,V)=>{const R=`${rA(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,ye.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:sr(R,"auto"),minWidth:sr(D,"auto")}},null)})]),f=()=>{const _=X0(e),V={"--row-height":`${Xe(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:V},[n.columnGroup.map((R,D)=>a.createVNode("tr",null,[R.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:F}=EA({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return F()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",V=[...Cr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(Hs,{key:_},{default:()=>{var R,D;return[a.createVNode("tr",{key:_,style:V},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(R=e.appendLastRow).cellRender)==null?void 0:D.call(R,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(Hs,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:V},[n.visibleColumns.map((R,D)=>a.createVNode("td",null,[a.createVNode(pf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,R,D))??R.field??R.prop]}})]))])]})},p=_=>{let V={};const R=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const F=x(M,j,V,_,R,D);return V=M,F}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var D,M;const V=_??r.pageRowList,R=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return V.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(V)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(xA,{emptyText:R.value,filterList:V,list:e.data},null)},y=(_,V,R,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,V,R,D)},N=(_,V,R,D)=>{t.emit(ze.ROW_DBL_CLICK,_,V,R,D)},C=(_,V,R,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,V,R,D)},w=(_,V,R,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,V,R,D)},S=(_,V,R,D,M)=>{var P;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((P=M.get(R))==null?void 0:P.get(D))??{},F=!1;const L=xi(D,null,_,V,"rowspan");return j>1?(j=j-1,F=!0):L>1&&(j=L,F=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:F}),{skipRowLen:j,skipRow:F}},x=(_,V,R,D,M,j,F=!1)=>{const L=D.length,P=[...Cr(e.rowStyle,[_,V]),{"--row-height":`${g(_,V)}px`}],B=[...Cr(e.rowClass,[_,V]),`hover-${e.rowHover}`,V%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,_e.ROW_UID);return[a.createVNode(Hs,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:P,class:B,"data-row-index":V,draggable:!!e.rowDraggable,onClick:k=>y(k,_,V,D),onDblclick:k=>N(k,_,V,D),onMouseenter:k=>C(k,_,V,D),onMouseleave:k=>w(k,_,V,D)},l),[n.visibleColumns.map((k,I)=>{const W=[n.getFixedStlye(k),...Cr(e.cellStyle,[k,I,_,V])],{colspan:K,rowspan:te}=cA(k,I,_,V),{skipCol:$}=n.getColumnAttribute(k,ye.COL_SPAN),{skipRow:Q}=j&&!F?S(_,V,R,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,...Cr(e.cellClass,[k,I,_,V]),{"expand-row":r.getRowAttribute(_,_e.ROW_EXPAND),"is-last":V+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=SA({props:e,rows:r,ctx:t,columns:n,row:_,index:V,column:k,isChild:F,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:V,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:W,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(pf,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:F,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},AA(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),O(_,B)]},O=(_,V,R)=>{if(r.getRowAttribute(_,_e.ROW_EXPAND)){const M=[...V,{row_expend:!0}],F=`${r.getRowAttribute(_,_e.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,P)=>x(L,P,{},_,{},!1,!0)):a.createVNode(Hs,{key:F},{default:()=>{var L,P;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((P=(L=t.slots).expandRow)==null?void 0:P.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,_)},A=()=>{if(s.isShowPagination.value)return a.createVNode(W0,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:A,setDragEvents:v}},kA=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=F=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(F)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(F,e.selectionKey)?iA(F,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Fs(L)===Fs(F)):!1:!1,i=(F,L,P)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Xe(e,"rowHeight",[{index:L,type:P??"tbody",row:F}]):Mn,o=()=>{let F=!1,L=!1;n.value.forEach((P,B)=>{const z=Fs(P);let k=fA(z,$t(),e);const I=s(z);I?F=!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 W=t.get(z);k=W[_e.ROW_UID],W[_e.ROW_INDEX]=B+1,W[_e.ROW_HEIGHT]=i(P,B)}),t.set(Jn,{[_e.ROW_SELECTION]:F,[_e.ROW_SELECTION_INDETERMINATE]:F&&L})},l=(F,L)=>({row:F,index:L??c(F,_e.ROW_INDEX),isSelectAll:c(Jn,_e.ROW_SELECTION)}),c=(F,L)=>{var P;return(P=t.get(F))==null?void 0:P[L]},d=F=>{t.set(hL,{[_e.ROW_SPAN]:F})},f=(F,L)=>Si(e,{row:F,index:L})?c(F,_e.ROW_SELECTION):!0,u=F=>{if(typeof e.isSelectedFn=="function"){x(F,e.isSelectedFn(l(F)));return}x(F,!c(F,_e.ROW_SELECTION))},h=F=>{const L=F??!p();if(t.set(Jn,{[_e.ROW_SELECTION]:L,[_e.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((P,B)=>x(P,L,B));return}r.forEach((P,B)=>x(P,L,B))},p=()=>e.acrossAll?n.value.every((F,L)=>f(F,L)):r.every((F,L)=>f(F,L)),g=()=>e.acrossAll?n.value.some(F=>c(F,_e.ROW_SELECTION)):r.some(F=>c(F,_e.ROW_SELECTION)),v=F=>{h(F)},b=()=>{const F=p();S(Jn,_e.ROW_SELECTION,F),S(Jn,_e.ROW_SELECTION_INDETERMINATE,!F&&g())},y=()=>c(Jn,_e.ROW_SELECTION_INDETERMINATE),N=()=>c(Jn,_e.ROW_SELECTION),C=(F,L)=>{if(L){S(L,_e.ROW_HEIGHT,F);return}n.value.forEach(P=>S(P,_e.ROW_HEIGHT,F))},w=(F,L,P)=>F?c(F,_e.ROW_HEIGHT):i(F,L,P),S=(F,L,P)=>{const B=Fs(F),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=P)},x=(F,L,P)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(F,P))),Si(e,{row:F,index:P??c(F,_e.ROW_INDEX)})&&S(F,_e.ROW_SELECTION,B),b()},O=(F,L)=>{S(F,_e.ROW_INDEX,L)},T=(F,L)=>{S(F,_e.ROW_EXPAND,L)},E=F=>{let L=0;const P=50,B=()=>{const z=L+P;r.push(...F.slice(L,z)),z<F.length&&(L=z,setTimeout(()=>{B()}))};if(F.length>P){B();return}r.push(...F)};return{setRowIndex:O,setRowExpand:T,isRowChecked:f,setPageRowList:F=>{r.length=0,E(F)},setTableRowList:F=>{n.value.length=0,n.value.push(...F),o()},clearSelection:()=>{n.value.forEach(F=>x(F,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:F=>{n.value.forEach(L=>T(L,F??!0))},setRowHeight:C,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(F=>c(F,_e.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((F,L)=>F+w(L),0),changePageRowIndex:(F,L)=>{const P=r[F];r.splice(L,0,P);const B=F<L?F:F+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:w,tableRowList:n,tableRowSchema:t,pageRowList:r}};function DA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const IA=(e,t,n,r)=>{const s=De("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=Pv(),l=uL(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:Ea.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(Ea.small),C=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:C.value});const K={checked:C.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,C.value=O.checkedFields,(K=g.value)==null||K.hide()},A=()=>{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&&C.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));C.value.splice(0,C.value.length,...Q,...$)}else C.value.splice(0,C.value.length,...$)},V=a.computed(()=>(v.limit??0)>0),R=v.sizeList||l,D=a.computed(()=>V.value&&(v.limit?v.limit:0)<=C.value.length),M=(K,te)=>K.disabled||D.value&&!C.value.includes(u(K,te)),j=K=>{y.value=K.value,N.value=K.height},F=K=>({"line-size":!0,"is-medium":y.value==="medium",active:K.value===y.value}),L={marginRight:"12px"},P=()=>R.map(K=>a.createVNode("span",{class:F(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>C.value.length>0&&C.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[C.value],()=>{C.value.length||(c.value=!1),C.value.length&&x.value.every((K,te)=>C.value.includes(u(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{C.value.splice(0,C.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(ns,{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]),V.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),V.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:C.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(xo,{class:"setting-body-fields",modelValue:C.value,"onUpdate:modelValue":re=>C.value=re},DA(K=x.value.map((re,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(ot,{checked:C.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(":"),P()]):""]),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:A},[a.createVNode(Ji,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},PA=a.defineComponent({name:"Table",directives:{bkTooltips:fn},props:NL,emits:RL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=pA(e),r=kA(e),s=NA(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}=wA(e,t),C=(...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=IA(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&C(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),v(oe))}),x=gA(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:E,setDragEvents:A}=VA({props:e,ctx:t,columns:n,rows:r,pagination:s});A(x);const{resolveColumns:_}=$L(),V=a.getCurrentInstance(),R=()=>{var oe;const ne=((oe=V.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(Tv,R);const{renderFixedRows:D,resolveFixedColumnStyle:M}=vA(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:xv)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:F}=ML(n,{afterResize:M}),L=a.ref(!1),P=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),W=qn((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=P(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(C(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;CA(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Lr(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),C(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(()=>[F.value],()=>{h(F.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{W()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{W(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),W(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{W(!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),C(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:C,getRoot:()=>N.value}),()=>i([c(O,S.renderSettings,D),l(r.pageRowList,T,D),o(),d(E())])}}),Rv=lt(PA,{Column:SL}),Mv=Le(XT),RA={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)},MA=a.defineComponent({name:"Timeline",props:RA,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)])]))])}}),$v=Le(MA);var Yt=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Yt||{});const $A={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 FA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function HA(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 BA(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 jA=a.defineComponent({name:"Transfer",props:$A,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]"))?Yt.OBJECT_ARRAY:Yt.BASE_ARRAY:Yt.NOT_ARRAY),o=a.computed(()=>i.value===Yt.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Yt.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case Yt.BASE_ARRAY:return[...new Set(e.sourceList)].map(A=>({value:A}));case Yt.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=HA(d,f,o),{selectSearchQuery:p,selectListSearch:g}=BA(u,l),v=a.computed(()=>[...g.value].sort((A,_)=>{const V=A[c.value],R=_[c.value];return V>R?1:-1})),b=a.computed(()=>[...h.value].sort((A,_)=>{const V=A[c.value],R=_[c.value];return V>R?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(A,_)=>{const V=o.value;return A.some(R=>R[V]===_[V])&&_.disabled},N=()=>{u.value=[...d.value.filter(A=>y(u.value,A))],h.value=[...d.value.filter(A=>!y(u.value,A))],S()},C=()=>{u.value=[...d.value.filter(A=>!y(h.value,A))],h.value=[...d.value.filter(A=>y(h.value,A))],S()},w=(A,_)=>{if(A.disabled)return;const V=A[o.value],R=_?u:h,D=_?h:u,M=R.value.findIndex(j=>j[o.value]===V);D.value.push(...R.value.splice(M,1)),S()},S=()=>{const A=u.value.map(V=>V[o.value]),_=h.value.map(V=>V[o.value]);t("update:targetList",_),t("change",i.value===Yt.BASE_ARRAY?A:u.value.map(V=>a.toRaw(V)),i.value===Yt.BASE_ARRAY?_:h.value.map(V=>a.toRaw(V)),_)},x=A=>{const _=A==="source"?u:h;r.value[A]=s.value[A].length===_.value.length},O=(A,_)=>{const V=_==="source"?u:h;s.value[_]=A?V.value.map(R=>R[o.value]):[]},T=A=>{const _=A==="left",V=_?u:h,R=_?h:u,D=s.value[_?"source":"target"],M=V.value.filter(j=>D.includes(j[o.value]));V.value=V.value.filter(j=>!D.includes(j[o.value])),R.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:C,handleItemClick:w,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(Ki,{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(xo,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},FA(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(jn,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(pr,{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(po,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),Fv=Le(jA);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,zA={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 Pn={__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 Hv=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Hv||{});const UA={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(Hv.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)},qA=e=>({renderEmpty:t=>a.createVNode(ko,{scene:"part",type:t},{default:()=>[e.emptyText]})}),WA=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=>{Lr(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,C,w;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;(w=(C=o.value).callback)==null||w.call(C,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{Lr(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Lr(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)}}},Mo=(e,t)=>{const n=L=>e.schema.get(L),r=(L,P)=>{var B;return(B=n(L))==null?void 0:B[P]},s=(L,P,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),{[P]:B}))},i=L=>e.data.find(P=>c(P)===L),o=(L,P,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),P,B,L));return}s(i(L),P,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,P)=>{const B=e.data.find(z=>c(z)===L);return r(B,P)},N=L=>typeof L=="string"?y(L,he.IS_ROOT):r(L,he.IS_ROOT),C=L=>{const P=e.data.find(B=>c(B)===L);return p(P)},w=L=>{const P=e.data.find(B=>c(B)===L);return l(P)},S=(L,P)=>{s(L,he.IS_LOADING,P)},x=L=>typeof L=="object"?d(L):typeof L=="string"?y(L,he.IS_OPEN):!1,O=(L,P)=>r(r(L,he.PARENT),P),T=L=>x(r(L,he.PARENT)),E=L=>N(L)||x(L)||T(L),A=(L,P)=>{const z=L.split("-").reduce((k,I)=>{const W=Number(I);return Array.isArray(k)?k[W]:k[t.children][W]},t.data);return P&&Object.assign(z,{[he.UUID]:P}),z},_=L=>L[t.children]??[],V=L=>e.data.find(P=>c(P)===L),R=L=>{let P=L;return typeof P=="string"&&(P=V(P)),N(P)?{[t.children]:t.data}:v(P)},D=L=>({[Pn[he.IS_LOADING]]:r(L,he.IS_LOADING),[Pn[he.HAS_CHILD]]:f(L),[Pn[he.IS_MATCH]]:u(L),[Pn[he.IS_CHECKED]]:h(L),[Pn[he.IS_OPEN]]:d(L),[Pn[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:R,getNodePathById:w,getNodeAttrById:y,getNodeParentIdById:C,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:A,getSourceNodeByUID:V,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 W;if(!L)return null;let P=L;Lr(L)&&(P=i(L.getAttribute("data-tree-node")));const B=r(P,he.DEPTH),z=r(P,he.IS_ROOT),k=r(P,he.PARENT),I=z?r(P,he.INDEX):(W=k==null?void 0:k[t.children])==null?void 0:W.findIndex(K=>K===P);return{level:B,target:L,index:I,parent:k,node:P,isRoot:z}}}},Bv="1px dashed #c3cdd7",jv=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:zv(n,e,t,i)},zv=(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}},Uv=(e,t)=>zv(e,t,"label"),GA=(e,t)=>({"--level-line":jv(t,"levelLine",e,Bv,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),KA=(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=()=>jv(t,"levelLine",e,Bv,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},YA=(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}},XA=(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}},JA=(e,t,n,r,s)=>{ZA(e,t,n,{[r]:s})},ZA=(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||{})},xa=e=>e??{__IS_NULL:!0},Qs=(e,t,n)=>Array.isArray(t)?t.some(r=>Qs(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,qv=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,Wv=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=Mo(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 JA(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[Pn[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}},QA=(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:C,resolveScopedSlotParam:w,extendNodeAttr:S,extendNodeScopedData:x}=Mo(n,e),{resolveClassName:O}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:E,deepAutoOpen:A}=Wv(e,n),_=Z=>v(Z)?a.createVNode(ao,{class:[O("tree-icon"),O("node-prefix")]},null):a.createVNode(ro,{class:[O("tree-icon"),O("node-prefix")]},null),V=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:H,style:G}=Z;return a.h(le,{class:se,style:G},H)}return null},R=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??y(Z)?a.createVNode(Qr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(y(Z))return R(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return V(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(rs,{class:O("node-prefix")},null):a.createVNode(os,{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")?V(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(mo,{class:[O("tree-icon"),O("node-prefix")]},null):null},j=(Z,le)=>{const se=C(Z);if(se){const H=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,H),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},F=(Z,le,se)=>{h(Z).forEach(H=>{Array.isArray(le)?le.forEach((G,U)=>{o(H,G,se[U])}):o(H,le,se),F(H,le,se)})},L=Z=>{var le,se,H;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(H=e.async)==null?void 0:H.trigger.includes(Z):!0},P=(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&&(F(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(ft.NODE_CHECKED,n.data.filter(H=>N(H)),n.data.filter(H=>B(H))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>qv(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)=>P(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,H=!0)=>{const G=le===null?!v(Z):!!le;if(G||F(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),H){const U=v(Z)?ft.NODE_EXPAND:ft.NODE_COLLAPSE;t.emit(U,Z,w(Z),d(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(H=>o(xa(H),le,se));return}o(xa(Z),le,se)},W=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,H=!1)=>{const G=xa(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],q=Array.isArray(se)?se:[se];if(H){if(U.forEach((ae,de)=>I(G,ae,q[de])),!p(G)){const ae=C(G);U.forEach((de,ee)=>{f(ae,de)!==se&&K(ae,de,q[ee],H)})}}else U.forEach((ae,de)=>I(G,ae,q[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,H=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let q=xa(U[0]);if((typeof q=="string"||typeof q=="number"||typeof q=="symbol")&&(q=n.data.find(ae=>u(ae)===q)??{[he.IS_NULL]:!0}),!q[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&q.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(q,he.IS_SELECTED,le),i=u(q),H&&t.emit(ft.NODE_SELECTED,{selected:le,node:q}),se&&U.length===1&&W(q,!0,!0),f(q,he.IS_ASYNC)&&L(G)&&E(q).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,H,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 H=ne(Z);if(H.includes("selected")&&Q(Z,!0,!0,!0,se),H.includes("expand")&&(b(Z)||te(Z,le,se)),H.includes("collapse")&&b(Z)&&te(Z,le,se),H.includes("click")){const G=ft.NODE_CLICK;t.emit(G,Z,w(Z),d(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),H=`${se}`.split("-").slice(0,Z+1);if(H.join("-")===se)return!0;const U=H.pop(),q=parseInt(U,10);H.push(`${q+1}`);const ae=H.join("-");return n.data.some(de=>c(de)===ae)},X=Z=>{if(!e.levelLine)return null;const le=H=>({"--depth":H}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((H,G)=>G).filter(H=>re(H,Z)).filter(H=>H>0).map(H=>a.createVNode("span",{style:le(se-H),class:"node-virtual-line"},null))},J=Z=>{var le,se,H,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(H=t.slots).default)==null?void 0:G.call(H,x(Z)):[Uv(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var H,G;const se=D(Z);return a.createVNode("div",{key:u(Z),class:XA(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:KA(Z,e,n,le),class:YA(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=(H=t.slots).nodeAppend)==null?void 0:G.call(H,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:A,asyncNodeClick:E,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:W,setNodeAttribute:K,isIndeterminate:B}},eV=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=Mo(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]"),C=L=>{var B;const P=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(P)},w=(L,P,B)=>{B.forEach(z=>L.classList.remove(z)),P.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const P=N(L),B=C(P);if(B.draggable===!1||h.value&&e.disableDrag(B)){P.classList.add(`${u("tree-drag-disabled")}`);return}P.setAttribute("draggable","true"),P.addEventListener("mouseup",S)},O="drop-before",T="drop-after",E="drop-inner";let A=null;const _=dr(L=>{if(L.preventDefault(),!b)return;const P=N(L);A!==P&&(A==null||A.classList.remove(O,T,E),A=P);const B=l(C(P));y.has(P)||y.set(P,P.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=y.get(P),W=I*g,K=z-k;if(K<W?w(P,[O],[T,E]):K>I-W?w(P,[T],[O,E]):w(P,[E],[O,T]),t.emit(ft.NODE_DRAG_OVER,L,P,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",P.classList.add(`${u("tree-drop-disabled")}`);return}P.classList.add(`${u("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=v;const $=P.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),V=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const P=N(L);L.dataTransfer.setData("text/plain","");const B=P.getAttribute("data-tree-node");v=B,b=P,L.dataTransfer.setData("node-id",B),t.emit(ft.NODE_DRAG_START,L,P)},R=L=>{L.preventDefault(),L.stopPropagation();const P=N(L);if(!P)return;P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(C(P));if(p.value&&e.disableDrop(B))return;const z=v,k=P.getAttribute("data-tree-node");z!==k&&(A!=null&&A.classList.contains(E)?Reflect.apply(j,void 0,[z,k]):(A!=null&&A.classList.contains(T)||A!=null&&A.classList.contains(O))&&Reflect.apply(M,void 0,[z,k]),t.emit(ft.NODE_DROP,L,P,B)),y=new WeakMap,A==null||A.classList.remove(T,O,E),A=null},D=(L,P)=>L!==P,M=(L,P)=>{if(!e.dragSort||!D(L,P))return;const B=s(L),z=s(P);if(!B||!z)return;const k=i(L),I=i(P);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const W=e.children,K=k[W],te=I[W];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),A!=null&&A.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):A!=null&&A.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,P)=>{const B=s(L),z=s(P);let k=null;if(d(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const W=c(L,he.INDEX);k==null||k[e.children].splice(W,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},F=L=>{L.preventDefault();const P=N(L);y.has(P)&&y.delete(P),P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),P.classList.remove(T,O,E),t.emit(ft.NODE_DRAG_LEAVE,L,P)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",V),L.addEventListener("dragover",_),L.addEventListener("dragleave",F),L.addEventListener("drop",R)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",V),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",F),L.removeEventListener("drop",R)}})},tV=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}},nV=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:C}=e,w=[],S=[];let x=0;const O=new WeakMap;function T(L,P,B,z){if(L!=null&&O.has(L)){const k=O.get(L);if(Object.prototype.hasOwnProperty.call(k,P)&&typeof z=="function"&&Reflect.apply(z,self,[k,P,B,L])){if(k[P]===B)return;Object.assign(k,{[P]:B}),T(k[he.PARENT],P,B,z)}}}function E(L){let P=null;return typeof e.nodeKey=="string"&&(P=L[e.nodeKey]||$t()),P||L[he.UUID]||$t()}const A={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,P)=>Qs(L,e.selected,P),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,P,B,z=void 0){let k=z;z===void 0&&typeof A[B]=="function"&&(k=A[B](P,L));const I=Pn[B];if(Object.prototype.hasOwnProperty.call(P,I))return P[I];const W=(y==null?void 0:y.get(P))??void 0;let K;return W&&(K=W[B]),K==null&&(K=k),K}function V(L,P){if(!e.selectable)return!1;const B=Qs(P,e.selected,L);return _(L,P,he.IS_SELECTED,B)}function R(L,P,B){var I;const z=_(L,P,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,P,B){if(!qv(e,{data:L,attributes:B}))return!1;const k=Qs(L,e.checked,P);return _(P,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,P,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 F(L,P=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const W=L[I];if(Array.isArray(W))F(W,P,B,z);else if(typeof W=="object"&&W!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${E(W)}`,$=!!(W[C]||[]).length;let Q=_(te,W,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=R(te,W,B);const ne={[he.DEPTH]:P,[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]:V(te,W),[he.IS_MATCH]:_(te,W,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,W,he.IS_CACHED),[he.IS_ASYNC]:_(te,W,he.IS_ASYNC),[he.IS_LOADING]:_(te,W,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(W,te,ne),ne[he.IS_CHECKED]&&w.push(W),O.set(W,ne),S.push(W),x+=1,Object.prototype.hasOwnProperty.call(W,C)&&F(W[C]||[],P+1,W,K)}}}return F(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(w==null||w.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}=Wv(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((C,w)=>{h(C)==="once"&&N.unshift(w)}),N.length&&N.forEach(C=>y.splice(C,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,C;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((C=e.async)==null?void 0:C.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}},rV=a.defineComponent({name:"Tree",props:UA,emits:zA,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=nV(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}=Mo(r,e),{searchFn:N,isSearchActive:C,refSearch:w,isSearchDisabled:S,isTreeUI:x,showChildNodes:O}=tV(e),T=a.reactive([]),E=re=>{if(C.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)},A=a.computed(()=>r.data.filter(re=>E(re))),{getLastVisibleElement:_,intersectionObserver:V}=WA(e),{renderTreeNode:R,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:F,asyncNodeClick:L,setNodeAttribute:P,isIndeterminate:B}=QA(e,t,r,A,{registerNextLoop:i}),z=Ka(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(Uv(re,e),re);X&&T.push(h(re)),P(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([w],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(xa(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=>{F(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const W=()=>{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:A.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:A.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:A.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:F,scrollToTop:K,asyncNodeClick:L,getData:I,reset:W,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=qA(e);eV(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>R(ie,!C.value||x.value));const X=C.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(V.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),H=y(se[0]);(ie=(Y=V.value)==null?void 0:Y.callback)==null||ie.call(Y,H),t.emit(ft.NODE_ENTER_VIEW,H);return}const le=y(J.slice(-1)[0]);(Z=(pe=V.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(us,{ref:n,style:GA(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:A.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}}),Gv=Le(rV),er="upload";var Cn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Cn||{}),gf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(gf||{}),Nr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Nr||{});const D9=[Cn.BUTTON,Cn.DRAGGABLE,Cn.PICTURE],I9=[gf.FORMDATA,gf.BINARY],Et={type:{type:String,default:"formdata",validator:e=>!e||I9.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${I9.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||D9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${D9.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 P9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const aV=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(er)}-list`,f=a.computed(()=>i.value===Cn.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`},P9(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(Ua,{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(Zr,{class:"action-icon",onClick:O=>g(x,e.files,O)},null),a.createVNode(Ur,{class:"action-icon",onClick:O=>v(x,O)},null)])])],C=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},P9(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]})},w=x=>{var V;const O=(V=x==null?void 0:x.raw)==null?void 0:V.type,[T]=(O==null?void 0:O.split("/"))||"";let A={text:Or,image:oo,application:Or,video:yo,audio:Xi}[T]||Or;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(A=Wi),a.h(A,{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):w(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(mr,{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(Ua,{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(uo,{class:`${d}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(Ur,{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():C(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),R9=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(er)}-trigger`,h=a.computed(()=>i.value===Cn.BUTTON),p=a.computed(()=>i.value===Cn.DRAGGABLE),g=a.computed(()=>i.value===Cn.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})}),C=()=>{y.value.value=null,y.value.click()},w=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:F}=j.target;n("change",Array.from(F))},S=()=>{e.disabled||C()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&C(),j.preventDefault())};function O(j,F){n("remove",j,F),F.stopPropagation(),F.preventDefault()}function T(j,F){n("preview",j,[j],F),F.stopPropagation(),F.preventDefault()}const E=a.ref(!1),A=()=>{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)},F=B=>{B.preventDefault(),E.value=!0},L=()=>{E.value=!1},P=Te({[`${u}__draggable`]:!0});return a.createVNode("div",{class:P,onDragleave:L,onDragover:F,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ma,{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?R(e.file):V()]),V=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(is,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),R=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(Ua,{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(Zr,{class:"action-icon",onClick:F=>T(j,F)},null),a.createVNode(Ur,{class:"action-icon",onClick:F=>O(j,F)},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(Ma,{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 A();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:w},null)])}}});var Id={exports:{}},M9;function sV(){return M9||(M9=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 C=y[0],w=y[1],S=y[2],x=y[3];C+=(w&S|~w&x)+N[0]-680876936|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[3]-1044525330|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[4]-176418897|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[7]-45705983|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[8]+1770035416|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[11]-1990404162|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[12]+1804603682|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[15]+1236535329|0,w=(w<<22|w>>>10)+S|0,C+=(w&x|S&~x)+N[1]-165796510|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[0]-373897302|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[5]-701558691|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[4]-405537848|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[9]+568446438|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[8]+1163531501|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[13]-1444681467|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[12]-1926607734|0,w=(w<<20|w>>>12)+S|0,C+=(w^S^x)+N[5]-378558|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[14]-35309556|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[1]-1530992060|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[10]-1094730640|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[13]+681279174|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[6]+76029189|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[9]-640364487|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[2]-995338651|0,w=(w<<23|w>>>9)+S|0,C+=(S^(w|~x))+N[0]-198630844|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[5]-57434055|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[12]+1700485571|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[1]-2054922799|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[8]+1873313359|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[13]+1309151649|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[4]-145523070|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[9]-343485551|0,w=(w<<21|w>>>11)+S|0,y[0]=C+y[0]|0,y[1]=w+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=y.charCodeAt(C)+(y.charCodeAt(C+1)<<8)+(y.charCodeAt(C+2)<<16)+(y.charCodeAt(C+3)<<24);return N}function o(y){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=y[C]+(y[C+1]<<8)+(y[C+2]<<16)+(y[C+3]<<24);return N}function l(y){var N=y.length,C=[1732584193,-271733879,-1732584194,271733878],w,S,x,O,T,E;for(w=64;w<=N;w+=64)s(C,i(y.substring(w-64,w)));for(y=y.substring(w-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<S;w+=1)x[w>>2]|=y.charCodeAt(w)<<(w%4<<3);if(x[w>>2]|=128<<(w%4<<3),w>55)for(s(C,x),w=0;w<16;w+=1)x[w]=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(C,x),C}function c(y){var N=y.length,C=[1732584193,-271733879,-1732584194,271733878],w,S,x,O,T,E;for(w=64;w<=N;w+=64)s(C,o(y.subarray(w-64,w)));for(y=w-64<N?y.subarray(w-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<S;w+=1)x[w>>2]|=y[w]<<(w%4<<3);if(x[w>>2]|=128<<(w%4<<3),w>55)for(s(C,x),w=0;w<16;w+=1)x[w]=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(C,x),C}function d(y){var N="",C;for(C=0;C<4;C+=1)N+=r[y>>C*8+4&15]+r[y>>C*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,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var w=this.byteLength,S=y(N,w),x=w,O,T,E,A;return C!==n&&(x=y(C,w)),S>x?new ArrayBuffer(0):(O=x-S,T=new ArrayBuffer(O),E=new Uint8Array(T),A=new Uint8Array(this,S,O),E.set(A),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var C=y.length,w=new ArrayBuffer(C),S=new Uint8Array(w),x;for(x=0;x<C;x+=1)S[x]=y.charCodeAt(x);return N?S:w}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,C){var w=new Uint8Array(y.byteLength+N.byteLength);return w.set(new Uint8Array(y)),w.set(new Uint8Array(N),y.byteLength),w}function v(y){var N=[],C=y.length,w;for(w=0;w<C-1;w+=2)N.push(parseInt(y.substr(w,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,C;for(C=64;C<=N;C+=64)s(this._hash,i(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},b.prototype.end=function(y){var N=this._buff,C=N.length,w,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(w=0;w<C;w+=1)S[w>>2]|=N.charCodeAt(w)<<(w%4<<3);return this._finish(S,C),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 C=N,w,S,x;if(y[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,y),C=0;C<16;C+=1)y[C]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(w[2],16),x=parseInt(w[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 C=l(y),w=f(C);return N?v(w):w},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),C=N.length,w;for(this._length+=y.byteLength,w=64;w<=C;w+=64)s(this._hash,o(N.subarray(w-64,w)));return this._buff=w-64<C?new Uint8Array(N.buffer.slice(w-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,C=N.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<C;S+=1)w[S>>2]|=N[S]<<(S%4<<3);return this._finish(w,C),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 C=c(new Uint8Array(y)),w=f(C);return N?v(w):w},b})}(Id)),Id.exports}var iV=sV();const $9=Je(iV),$n="An error occurred during upload";function La(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const oV=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($n);const c=La(t);c&&(l=new Error(c.message||$n)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=La(t);let c=new Error($n);return l&&(c=new Error(l.message||$n)),e.onError(c)}e.onSuccess(La(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))B9(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},Kv=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,lV=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 uV(n,t),i=[];cV(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=La(l);if(l.status<200||l.status>=300){let d=new Error($n);return c&&(d=new Error(c.message||$n)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},cV=(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",Kv.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=La(p);if(p.status<200||p.status>=300){d(v);let b=new Error($n);v&&(b=new Error(v.message||$n)),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))B9(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},uV=(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(Kv.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 F9(e){return Date.now()+e}const dV=(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=F9(o);const p={uid:h.uid,name:h.name,status:Nr.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=Nr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Nr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Nr.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??F9(o),status:p.status??Nr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},fV=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===Cn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Te({[`${s(er)}`]:!0,[`${s(er)}--${e.theme}`]:!0,[`${s(er)}--disabled`]:e.disabled,[`${s(er)}--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}=dV(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 A=E,_=h(A);if(_){n("error",A,u.value,_);return}e.autoUpload&&w(A,T)}}function N(O,T){n("preview",O,T)}function C(O){S(O.raw)}async function w(O,T){var A;if(!e.beforeUpload)return S(O,T);let E;try{E=await((A=e.beforeUpload)==null?void 0:A.call(e,O,T))}catch{E=!1}if(E===!1){p(O);return}S(O,T)}function S(O,T){const{type:E,headers:A,header:_,data:V,formDataAttributes:R,method:D,withCredentials:M,name:j,url:F,sliceUrl:L,mergeUrl:P,chunkSize:B,customRequest:z}=e,{uid:k}=O,I={type:E,headers:A,header:_,withCredentials:M,file:O,data:V,formDataAttributes:R,method:D,filename:j,action:F,sliceUrl:L,mergeUrl:P,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 W=e.sliceUpload?lV:oV;z&&(W=z);const K=W(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 A=T[E];A==null||A.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:C}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(R9,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(er)}__tip`},[e.tip]),a.createVNode(aV,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:C},{innerTrigger:O=>o.value&&a.createVNode(R9,a.mergeProps(d.value,{file:O,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),Yv=Le(fV),Pd=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:N0,Affix:Hm,Alert:jm,AnimateNumber:zm,Backtop:Um,Badge:qm,Breadcrumb:Gm,Button:Ye,Card:vp,Cascader:Gp,Checkbox:ot,CodeDiff:tg,Collapse:rg,ColorPicker:Sg,ConfigProvider:Fm,Container:Tg,DatePicker:wg,Dialog:Og,Divider:Eg,Dropdown:Lg,Exception:ko,FixedNavbar:Ag,Form:kg,InfoBox:Ig,Input:jn,Link:Rg,Loading:Fn,Menu:$g,Message:qg,Modal:fs,Navigation:Wg,Notify:Kg,OverflowTitle:gp,Pagination:W0,PopConfirm:Yg,Popover:gt,Popover2:Xg,Process:Jg,Progress:Ua,Radio:gi,Rate:tv,ResizeLayout:nv,SearchSelect:cv,Select:A0,Sideslider:dv,Slider:fv,Steps:mv,Swiper:pv,Switcher:gv,Tab:wv,Table:Rv,Tag:Ba,TagInput:jp,TimePicker:Mv,Timeline:$v,Transfer:Fv,Tree:Gv,Upload:Yv,VirtualRender:us,scrollbar:E0},Symbol.toStringTag,{value:"Module"})),H9=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(Pd).forEach(s=>{const i=Pd[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,Pd[s])}),n&&Mf(n,t)},hV={createInstall:H9,install:H9()},Xv="2.0.2-beta.47";window.__bkui_vue_version__=Xv;exports.$bkPopover=N0;exports.Affix=Hm;exports.Alert=jm;exports.AnimateNumber=zm;exports.Backtop=Um;exports.Badge=qm;exports.Breadcrumb=Gm;exports.Button=Ye;exports.Card=vp;exports.Cascader=Gp;exports.Checkbox=ot;exports.CodeDiff=tg;exports.Collapse=rg;exports.ColorPicker=Sg;exports.ConfigProvider=Fm;exports.Container=Tg;exports.DatePicker=wg;exports.Dialog=Og;exports.Divider=Eg;exports.Dropdown=Lg;exports.Exception=ko;exports.FixedNavbar=Ag;exports.Form=kg;exports.InfoBox=Ig;exports.Input=jn;exports.Link=Rg;exports.Loading=Fn;exports.Menu=$g;exports.Message=qg;exports.Modal=fs;exports.Navigation=Wg;exports.Notify=Kg;exports.OverflowTitle=gp;exports.Pagination=W0;exports.PopConfirm=Yg;exports.Popover=gt;exports.Popover2=Xg;exports.Process=Jg;exports.Progress=Ua;exports.Radio=gi;exports.Rate=tv;exports.ResizeLayout=nv;exports.SearchSelect=cv;exports.Select=A0;exports.Sideslider=dv;exports.Slider=fv;exports.Steps=mv;exports.Swiper=pv;exports.Switcher=gv;exports.Tab=wv;exports.Table=Rv;exports.Tag=Ba;exports.TagInput=jp;exports.TimePicker=Mv;exports.Timeline=$v;exports.Transfer=Fv;exports.Tree=Gv;exports.Upload=Yv;exports.VirtualRender=us;exports.bkEllipsis=Lw;exports.bkEllipsisInstance=x0;exports.bkLoading=Ym;exports.bkTooltips=fn;exports.clickoutside=cn;exports.default=hV;exports.defaultRootConfig=lr;exports.mousewheel=Fw;exports.overflowTitle=Gw;exports.provideGlobalConfig=Mf;exports.rootProviderKey=Br;exports.scrollbar=E0;exports.setPrefixVariable=Bd;exports.useGlobalConfig=f7;exports.useLocale=De;exports.usePrefix=fe;exports.version=Xv;
366
+ `,E={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},A={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",A,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},wE=(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 CE={extCls:m.string,type:f8(),percent:m.number.def(0),theme:m.theme().def(Li.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:d8(),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"})},NE=a.defineComponent({name:"Progress",props:CE,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(wE,t,C9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(bE,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])}}),Ua=Le(NE),Zg=Symbol("RadioGroup");function Qg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const ev=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Zg,Nm),s=!xm(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}},xE={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:Yr().def(()=>!0)},SE=a.defineComponent({name:"Radio",props:xE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Qg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=ev(),{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()])}}),TE={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:Yr().def(()=>!0)},_E=a.defineComponent({name:"RadioButton",props:TE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Qg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=ev(),{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()])}}),OE={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:Yr().def(()=>!0)},EE=a.defineComponent({name:"RadioGroup",props:OE,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(Zg,{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()])}}),gi=lt(SE,{Group:EE,Button:_E}),Ps=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)])])])])]))])}}),LE=a.defineComponent({name:"Rate",components:{star:Ps},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(Ps,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(Ps,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(Ps,a.mergeProps({editable:!1,rate:0},u),null)]])}}),tv=Le(LE),AE=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),C=a.ref(null),w=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`})),A=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 V=new ResizeObserver(_);const R=()=>{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=()=>{C.value.style.display="block",C.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=w.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||R(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const W=$=>{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?w.value.style[x.value]=re:N.value.style[n.value]=re,W(oe)},te=()=>{if(N.value.style.visibility="hidden",C.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{F(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;w.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},F=()=>{if(!d.value)return!1;const k=w.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=A.value,!g.value)return p.value=!0,!1;P(),a.nextTick(()=>{w.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,P(),t("collapse-change",h.value)},P=()=>{const k=w.value.getBoundingClientRect();B(!h.value),h.value?(w.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),w.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,w.value.style[x.value]=w.value.getAttribute(`data-${x.value}`)||O.value)},B=k=>{const I=()=>{p.value=k,w.value.style.transition="",w.value.removeEventListener("transitionend",I)};w.value.addEventListener("transitionend",I),w.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(()=>{V.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(V.unobserve(y.value),V=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:C,asideRef:w,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)])}}),nv=Le(AE);var Ad=null;function VE(e){return Ad||(Ad=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),Ad(e)}var Vd=null;function kE(e){Vd||(Vd=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Vd(e)}function DE(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 Rs(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function rv(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function df(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(rv(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var IE='.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%}',ff=0,Js=null;function PE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=$E.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)||vi(e)}),o=df(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(){vi(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(ff||(Js=DE(IE)),FE(e),e.__resize_rendered__=df(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),ff++}function RE(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",G0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--ff&&Js&&Js.parentNode.removeChild(Js)}}function ME(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 $E(){var e=df(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(K0(this),this.addEventListener("scroll",G0,!0)),this.__resize_rendered__=t,vi(this))}function G0(){var e=this;K0(this),this.__resize_raf__&&kE(this.__resize_raf__),this.__resize_raf__=VE(function(){var t=ME(e);t&&(e.__resize_last__=t,vi(e))})}function vi(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function FE(e){var t=rv(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=Rs("div",{className:"resize-triggers"}),r=Rs("div",{className:"resize-expand-trigger"}),s=Rs("div"),i=Rs("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},K0(e),e.addEventListener("scroll",G0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function K0(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 av=Symbol("SEARCH_SELECT_PROVIDER_KEY"),HE=e=>{a.provide(av,e)},sv=()=>a.inject(av);var In=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(In||{});const iv=/(\||,|、|\r\n|\n)/gm,ov=/^(\||,|、|\r\n|\n)$/;var Gr=(e=>(e.AND="&",e.OR="|",e))(Gr||{});class Sr{constructor(t,n="default"){ve(this,"id");ve(this,"name");ve(this,"values",[]);ve(this,"condition");ve(this,"logical");ve(this,"nameRenderKey",Qn(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=Qn(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(iv).filter(l=>l.trim()&&!ov.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 BE=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:Gr.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"),(C,w)=>(y.length===0&&w!==0?y.push(g.slice(0,w)):N>=0&&y.push(g.slice(N+C.length,w)),y.push(a.createVNode("span",{class:"is-keyword"},[C])),N=w,C)),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(gi,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(gi,{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()])}}),lv=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:cn},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:In.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=Ka(100,K);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:C,searchData:w}=sv(),S=a.computed(()=>{var U;return((U=u.value)==null?void 0:U.logical)||Gr.OR}),x=a.ref(Qn(10)),O=a.ref(!1);a.watch(N,()=>{e.mode===In.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var q,ae;f.value&&((q=y.value)==null?void 0:q.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":A(U);break}}function E(U){var de;U.preventDefault(),(de=i.value)==null||de.blur();const q=y.value.length;let ae=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<q;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+q)%q;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 A(U){var ae;if(!v)return;U.preventDefault();const q=(ae=y.value)==null?void 0:ae.find(de=>de.id===h.value);q&&P(q)}function _(U){var q,ae,de;if(!((q=o.value)!=null&&q.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((de=u.value)!=null&&de.isCustomMenu){e.mode===In.EDIT&&(F().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===In.EDIT||u.value){u.value&&F().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let V=!1;function R(U){if(!V){if(c.value=!1,e.mode===In.EDIT&&u.value&&!d.value){const q=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!q.length)return;U==null||U.preventDefault();const ae=document.createRange(),de=window.getSelection();ae.selectNodeContents(q.at(-1)),de==null||de.removeAllRanges(),V=!0,setTimeout(()=>{V=!1},200),de.addRange(ae),ne(!0,!1);return}K(),ne(!1,!d.value)}}function D(U){U.preventDefault();const q=U.clipboardData.getData("text").trim();if(!u.value){const ae=J(q);if(ae){u.value=ae,ne(!0,!0);return}l.value=q.split(iv).filter(de=>de.trim()&&!ov.test(de)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(q),g()}function M(U){if(O.value)return;re();const q=U.target.innerText;if(u.value){if(u.value&&!q){x.value=Qn(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=q,g();return}l.value=u.value.isSpecialType()?q:q.replace(u.value.name,"").replace(":",""),g()}function j(U){var q;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&&((q=l.value)!=null&&q.length)&&U.preventDefault();return}F(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function F(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 W()&&((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 q,ae,de;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((q=u.value)!=null&&q.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());C("")}async function P(U,q){var ae,de,ee,ue,ce;if((ae=U.value)!=null&&ae.id){const ge=new Sr({...U,id:U.realId??U.id},q);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 W(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 Sr(U,q??((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 W(u.value.values)&&(u.value.multiple||oe(),e.valueBehavior===Ot.NEED_KEY&&((ce=u.value)!=null&&ce.multiple)&&ne())}function B(U){P(U,"condition")}function z(U){var q;switch(U.id){case"confirm":if(!((q=u.value)!=null&&q.values.length))return;l.value="",F();break;case"cancel":u.value.values=[],f.value=!1;break}}function k(U){u.value&&(u.value.logical=U)}async function I(U,q){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,q)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return C(ae||"校验错误"),!1}return C(""),!0}async function W(U){if(!u.value)return await I(null,U);const{searchItem:q,validate:ae,values:de}=u.value;return ae&&typeof e.validateValues=="function"?await I(q,U??de):(C(""),!0)}async function K(){var q,ae,de,ee,ue;let U=[];if(typeof e.getMenuList=="function"&&(!((q=e.data)!=null&&q.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===In.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:Qn(10),value:Oe});!Ne.length&&!ce.onlyRecommendChildren&&Ne.push({...ce,realId:ce.id,id:Qn(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:Qn(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),q=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await W(q))return t("add",U||new Sr({...q[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 W(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(),q=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),q.removeAllRanges(),q.addRange(U)}function ne(U=!1,q=!0){U&&setTimeout(K,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&q&&a.nextTick(Q),t("focus",d.value)}function oe(U){var ae;t("add",U??u.value);const q=!((ae=u.value)!=null&&ae.isCustomMenu);u.value=null,l.value="",q&&(ne(!0,q),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(q=>q.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[q,ae]=U.split(":");if(q!=null&&q.trim()){const de=w.value.find(ee=>ee.name===q.trim());if(de){const ee=new Sr({...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 F().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}],F().then(q=>q&&X())}function se(){u.value||(h.value="")}function H(U){O.value=!1,l.value=U.data,M(U)}function G(){O.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:R,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:R,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:P,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:H,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(BE,{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})}}),jE=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}=sv();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 Sr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||Gr.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(lv,{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:In.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)])])}}),kd=40,N9=6,x9=26,zE=32,UE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:zE*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)}}},qE=a.defineComponent({name:"SearchSelect",directives:{clickoutside:cn},props:UE,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=Ka(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(V=>V.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var R;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const V=[];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||Gr.OR,V.push(M);else{let j=e.data.find(P=>P.id===D.id),F="default";j||(j=e.conditions.find(P=>P.id===D.id),j&&(F="condition")),!j&&!((R=D.values)!=null&&R.length)&&(F="text");const L=new Sr(j||D,F);L.values=D.values||[],L.logical=D.logical||Gr.OR,V.push(L)}}c.value=V,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!V.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{PE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{RE(o.value.querySelector(`.${r("search-select-container")}`),f)}),HE({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,V){u.value=`${_.id}_${V}`}function v(_,V){const R=c.value.slice();R.splice(V,1,_),t("update:modelValue",R.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")}`),V=o.value.querySelector(".search-container").clientWidth-N9-2,R=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=V-kd&&j<=R.length-1;){const F=R[j];if(F.clientHeight>x9){d.value=j;return}D+=F?F.clientWidth+N9:0,D>=V-kd&&(M=j),j+=1}if(M===R.length-1&&D<=V){d.value=-1;return}d.value=D>=V-kd?M:M-1}function C(){u.value||i.value.inputFocusForWrapper()}function w(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var V;return!((V=o.value)!=null&&V.contains(_))}function x(_){const V=c.value.slice();V.push(_),y(""),t("update:modelValue",V.map(R=>R.toValue()))}function O(_){const V=c.value.slice();V.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",V.map(R=>R.toValue()))}function T(_){var V;_&&(d.value=-1),_===!1&&((V=o.value.querySelector(`.${r("search-select-container")}`))==null||V.scrollTo(0,0)),l.value=_}function E(_){i.value.inputEnterForWrapper(),t("search",_)}function A(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:C,handleInputFocus:T,handleResize:N,handleClearAll:w,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:O,handleClickSearch:E,localConditions:s,resolveClassName:r,handleSelectedKey:A,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:x9}`.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(jE,{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(lv,{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(pr,{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(as,{class:"select-tips"},null),this.validateStr||""])])])}}),cv=Le(qE);function WE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const uv=B0(Vo);uv.width.default="400";const GE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...uv,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(fs,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}),WE(d)?d:{default:()=>[d]})}}}),dv=Le(GE),S9=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 A,_;let T="";if((A=e.params.customContent)!=null&&A[e.modelValue]){const V=e.params.customContent[e.modelValue];T=V.tip||V.label||""}const E=e.params.vertical?Ia.RIGHT:Ia.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),Na(window,"mousemove",C),Na(window,"touchmove",C),Na(window,"mouseup",w),Na(window,"touchend",w))},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},C=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)}},w=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),Ms(window,"mousemove",C),Ms(window,"touchmove",C),Ms(window,"mouseup",w),Ms(window,"touchend",w))},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()}}),Na=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ms=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},KE=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 W=`${I}`.split(".")[1];return W?W.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}),C=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),W=[];for(let K=1;K<k;K++)W.push(K*I);return e.range?W.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):W.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),w=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 W=e.minValue,K=0;W<=e.maxValue;W+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(W)};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:W}=e.customContent[k];return{tip:I||W||"",label:W||"",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,()=>{V()}),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(),Na(window,"resize",E())});const E=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},A=k=>{var I,W;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=(W=d.value)==null?void 0:W.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}R()}},_=()=>e.range?![g.value,v.value].every((k,I)=>{var W;return k===((W=o.value)==null?void 0:W[I])}):e.modelValue!==o.value,V=()=>{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)))},R=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},F=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:P}=fe(),B=(k,I)=>{let W=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:W,step:I};if(K=e.labelClick(k,te),K===!1)return}W=typeof K=="number"?K:W,console.log("handleStepLabelClick",W),M(W);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${P("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:d,style:w.value,class:`${P("slider-runway")}`,onClick:A},[a.createVNode("div",{style:N.value,class:[`${P("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?C.value.map((W,K)=>K===0||K===C.value.length-1?null:a.createVNode("div",{key:K,style:D(W),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,W)},null)):null,e.customContent?O.value.map((W,K)=>K===0||K===O.value.length-1?null:a.createVNode("div",{key:K,style:D(W.percent),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,W)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${P("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((W,K)=>a.createVNode("div",{key:K,style:D(W.stepWidth),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,W)},[W.stepLabel]));if(e.customContent)return O.value.map((W,K)=>a.createVNode("div",{key:K,style:D(W.percent),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,W)},[W.label]))}()]):void 0,a.createVNode(S9,{ref:f,modelValue:s.value,"onUpdate:modelValue":W=>s.value=W,params:T.value,onEmitChange:R,onResetSize:E},null),e.range?a.createVNode(S9,{ref:u,modelValue:i.value,"onUpdate:modelValue":W=>i.value=W,params:T.value,onEmitChange:R,onResetSize:E},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${P("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(jn,{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(jn,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:F},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),fv=Le(KE);var hv=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(hv||{});const T9={theme:m.theme().def(Li.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:ym(),status:Ce("status",{}).def(hv.UNKNOWN),lineType:bm(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},YE=a.defineComponent({name:"Steps",props:T9,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=>{T9.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(ts,{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(mr,{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])]):""])})])}}),mv=Le(YE),XE=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`})),C=D=>{let M=D;D>=b.value.length&&(M=0),D<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},w=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(()=>{C(f.value+1),T()},s.value))},E=()=>{window.clearTimeout(p.value)},A=()=>{var M;const D=(M=d.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{R()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},V=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}},R=()=>{var M;const D=V((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],R),a.onMounted(()=>{R(),T(),A()}),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:()=>w(D.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((D,M)=>a.createVNode("li",{class:O(M),onMouseover:()=>C(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>C(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>C(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),pv=Le(XE),JE={theme:u8(),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 yi=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function ZE(e){return e}function QE(e){return!!e}const eL={[yi.UPDATE]:ZE,[yi.CHANGE]:QE},tL=a.defineComponent({name:"Switcher",props:JE,emits:eL,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(yi.UPDATE,h),t(yi.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(fo,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),gv=Le(tL);var bi=(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))(bi||{}),Oa=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Oa||{});const vv=Ce("position",{}).def("top");var yv=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(yv||{});const bv=Ce("sortType",{}).def("replace"),nL={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},rL={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:Ei(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},aL={active:m.oneOfType([m.number,m.string]).def(""),type:Ce("type",{}).def("border-card"),tabPosition:vv,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:bv,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff"),beforeChange:{type:Function}},sL={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:vv,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:bv,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...nL},_9=a.defineComponent({name:"TabNav",directives:{bkTooltips:fn},props:sL,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([Oa.LEFT,Oa.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===Oa.LEFT?g.right=0:g.left=0,g}if(e.type===bi.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:C,disabled:w,sortable:S,tips:x,numDisplayType:O}=p.props;if(!C)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:C,disabled:w,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:C,tabNum:w,numDisplayType:S}=v,x=()=>{const A=[this.resolveClassName("tab-header-item")];return N&&A.push(this.resolveClassName("tab-header--disabled")),e===y&&A.push(this.resolveClassName("tab-header--active")),A.join(" ")},O=(A,_)=>!N&&(A||_),T=(A,_)=>O(A.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,A)},[a.createVNode(pt,null,null)]):"",E=()=>["bracket"].includes(S)?`(${w})`:w;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:A=>{A.preventDefault(),c()},onDragenter:A=>{A.preventDefault(),l(b)},onDragleave:A=>{A.preventDefault()},onDragover:A=>{A.preventDefault()},onDragstart:A=>o(b,A),onDrop:A=>{A.preventDefault(),d(b,s)}},[isNaN(w)?a.createVNode("div",null,[C]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[C]),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(w)?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(is,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,C)=>a.createVNode("div",{key:C,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===bi.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])}}),iL=a.defineComponent({name:"Tab",components:{TabNav:_9},props:aL,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){var u;(((u=e.beforeChange)==null?void 0:u.call(e,f))??!0)&&(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===yv.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===Oa.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===bi.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:C,tabDrag:w}=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:C,tabDrag:w};return!s||!Array.isArray(s)?null:a.createVNode(_9,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)])])}}),oL=a.defineComponent({name:"TabPanel",props:rL,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]])}}),wv=lt(iL,{TabPanel:oL});var Cv=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(Cv||{}),Nv=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(Nv||{});const lL=["auto","highlight"],cL=["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"},xv=8,Mn=42;var Io=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Io||{});const Sv={def1:"#FAFBFD",def2:"#F0F1F5"},Ea={large:78,medium:60,small:42},uL=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:Ea.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:Ea.medium},{value:"large",label:e.value.setting.lineHeight.large,height:Ea.large}],Tv=Symbol("bkInitColumns"),dL=60;var Ze=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ze||{});const fL=["asc","desc","null","custom"],Tr=80,Jn={},hL={};Ce("showOverflowTooltipMode",{default:"auto"});const mL=Ce("columnType",{default:"__COL_TYPE_NONE"}),hf=Ce("columnType",{default:""});Ce("full",{default:"full"});Ce("columnSize",{default:"small"});const pL=st(),Y0=Ce("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),gL=Ce("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),vL=Ce("IFilterPropShape",{default:!1,type:[Boolean,Object]});var _v=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(_v||{});const Po=Ce("IColumnType",{default:{width:"100%",label:""},type:[Object]}),yL=Ce("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),Dd=Ce("LabelFunctionStringType",{}),bL=Ce("RenderFunctionStringType",{}),O9=Ce("SpanFunctionStringType",{}),wL=Ce("RowClassFunctionStringType",{}),CL=Ce("RowHeightFunctionNumberType",{});Ce("FunctionNumberType",{});const Zs=e=>Ce("StringNumberType",{}).def(e);Ce("IColumnPropType",{default:{label:void 0,minWidth:Tr},type:[Object]});var Ov=(e=>(e.independent="independent",e.interdependent="interdependent",e))(Ov||{});const NL={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(Po).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ce("columnPick",{}).def("disabled"),height:Zs("auto"),stripe:m.bool.def(!1),minHeight:Zs(Mn),maxHeight:Zs("auto"),rowHeight:CL,headHeight:m.number.def(Mn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ce("ITheadType",{}).def({color:Io.DEF1,height:Mn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ce("boderType",{})),m.string]).def([Cv.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(dL),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:yL,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:Y0,asyncData:m.bool.def(!1),rowHover:m.oneOf(lL).def(Nv.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:hf,headerAlign:hf,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:Mn}}).def(null),appendLastRow:Ce("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},xL={label:Dd,field:Dd,render:bL,width:m.oneOfType([m.number,m.string]),minWidth:Zs(Tr),columnKey:m.string.def(""),showOverflowTooltip:Y0,type:mL,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,pL]).def(!1),sort:gL,filter:vL,colspan:O9.def(1),rowspan:O9.def(1),align:hf,className:wL,prop:Dd,index:m.number.def(void 0)},SL=a.defineComponent({name:"TableColumn",props:xL,setup(e,{}){const t=a.inject(Tv,()=>{}),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:_0(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 TL=e=>!0,_L=e=>!0,OL=e=>!0,EL=e=>!0,$s=(e,t,n,r,s)=>!0,LL=e=>!0,AL=e=>!0,VL=e=>!0,kL=e=>!0,E9=e=>!0,DL=e=>!0,L9=e=>!0,IL=e=>!0,PL=e=>!0,RL={columnPick:TL,columnFilter:_L,columnSort:EL,colFilterSave:OL,rowClick:$s,rowDblclick:$s,rowExpand:LL,select:AL,selectAll:VL,selectionChange:kL,pageLimitChange:E9,pageValueChange:E9,settingChange:DL,scrollBottom:IL,cellClick:L9,cellDblclick:L9,rowMouseEnter:$s,rowMouseLeave:$s,dragend:PL},ML=(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 C=new WeakMap,w=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),w.value=-1e3,N=0,_(b),t==null||t(),b=null;const W=B.target;M(W),g=null},T=dr(B=>{w.value=w.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)},A=qn(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{A.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},V=B=>{if(!f)return;R(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();w.value=B.clientX-k.left,A(b),u=!0,document.addEventListener("mouseup",O)},R=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(W=>{W==null||W.classList.remove("col-pointer-hover"),W==null||W.classList.remove("poiner-left"),W==null||W.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,W=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${W}`)},M=B=>{h||(w.value=-1e3,B.classList.remove("cell-resize"),R(B),C.set(B,!1),document.removeEventListener("mousedown",V))},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:W}=I,K=B.offsetX;W>12&&(W-K<8||K<8&&k>0)?(f=!0,v=K<8?"left":"right",C.get(I)||(C.set(I,!0),I.classList.add("cell-resize"),D(I,v),y=z,document.addEventListener("mousedown",V))):(f=!1,M(I))}},[d.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},F=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=F(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},P=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=F(k);if(z!=null&&z.has(I)){const W=z.get(I);W.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{P(),L()},{immediate:!0,deep:!0}),{dragOffsetX:w}},$L=()=>{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 Ev=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}()}(),mf=typeof window<"u"&&typeof document<"u"&&window.document===document,wi=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")()}(),FL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(wi):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),HL=2;function BL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){FL(i)}function l(){var c=Date.now();if(n){if(c-s<HL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var jL=20,zL=["top","right","bottom","left","width","height","size","weight"],UL=typeof MutationObserver<"u",qL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=BL(this.refresh.bind(this),jL)}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(){!mf||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),UL?(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(){!mf||!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=zL.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}(),Lv=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},Kr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||wi},Av=Ro(0,0,0,0);function Ci(e){return parseFloat(e)||0}function A9(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+Ci(i)},0)}function WL(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]=Ci(o)}return n}function GL(e){var t=e.getBBox();return Ro(0,0,t.width,t.height)}function KL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Av;var r=Kr(e).getComputedStyle(e),s=WL(r),i=s.left+s.right,o=s.top+s.bottom,l=Ci(r.width),c=Ci(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=A9(r,"left","right")+i),Math.round(c+o)!==n&&(c-=A9(r,"top","bottom")+o)),!XL(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 Ro(s.left,s.top,l,c)}var YL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Kr(e).SVGGraphicsElement}:function(e){return e instanceof Kr(e).SVGElement&&typeof e.getBBox=="function"}}();function XL(e){return e===Kr(e).document.documentElement}function JL(e){return mf?YL(e)?GL(e):KL(e):Av}function ZL(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 Lv(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function Ro(e,t,n,r){return{x:e,y:t,width:n,height:r}}var QL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ro(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=JL(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}(),eA=function(){function e(t,n){var r=ZL(n);Lv(this,{target:t,contentRect:r})}return e}(),tA=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Ev,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 Kr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new QL(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 Kr(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 eA(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}(),Vv=typeof WeakMap<"u"?new WeakMap:new Ev,kv=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=qL.getInstance(),r=new tA(t,n,this);Vv.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){kv.prototype[e]=function(){var t;return(t=Vv.get(this))[e].apply(t,arguments)}});var nA=function(){return typeof wi.ResizeObserver<"u"?wi.ResizeObserver:kv}();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)}},rA=e=>sr(e,"auto"),sr=(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},aA=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>cL.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Dv=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?qn(i,n):Cm(i),l=()=>Reflect.apply(o,void 0,[]),c=new nA(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},X0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},sA=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),Ni=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Do(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"?sA(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},iA=(e,t)=>Do(e,t),Cr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Cr(Reflect.apply(e,void 0,t),t):[],oA=(e,t,n)=>{const r=lA(e,t,n);return r!==null?r:$t()},lA=(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,V9=(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]))},xi=(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,cA=(e,t,n,r)=>{const s=xi(e,t,n,r,"colspan"),i=xi(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},Iv=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>Ni(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},uA=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]},dA=(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:Iv(t,e.value??Ze.NULL,n)},e):null,Si=(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,fA=(e,t,n)=>{const r=oA(e,n,t);return r!==void 0&&e[r]!==void 0?Do(e,r):t},hA=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=dA(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},mA=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Fs=e=>a.isProxy(e)?a.toRaw(e):e,pA=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=(H,G={})=>{i.forEach(q=>q.active=!1);const U=i.find(q=>q.col===H);if(U){Object.assign(U,G,{active:!0});return}i.push({col:H,...G,active:!0})},f=(H,G,U)=>{let q=0;return/^\d+\.?\d*(px)?$/.test(`${H[G]}`)&&(q=Number(`${H[G]}`.replace(/px/,"")),$(H,ye.WIDTH,q),M(H,{width:q,left:null,right:null})),/^\d+\.?\d*%$/.test(`${H[G]}`)&&(q=Number(`${H[G]}`.replace(/%/,""))/100*U,$(H,ye.WIDTH,q),M(H,{width:q,left:null,right:null})),q},u=H=>{let G=H,U=Tr;const q=(ee,ue="width")=>{const ce=[];return ee.forEach(ge=>{const Ne=f(ge,ue,H);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=q(p);q(ae,"minWidth").forEach(ee=>{const ue=U>Tr?U:Tr;$(ee,ye.WIDTH,ue),M(ee,{width:ue,left:null,right:null})})},h=(H,G={})=>{const U=o.find(q=>q.col===H);if(U){Object.assign(U,G);return}o.push({col:H,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(H=>!I(H)))},v=()=>{var H,G;return e.rowDraggable?{minWidth:50,width:((H=e.rowDraggable)==null?void 0:H.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},b=(H=["rowspan","colspan"])=>r.some(G=>H.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),C=(H,G,U)=>{let q=U;const ae=xi(H,G,null,null,"colspan"),de={skipCol:!1,skipColLen:0};return q>0&&(de.skipColLen=q,de.skipCol=!0,q=q-1),ae>1&&(de.skipColLen=ae,q=ae-1),{...de,skipColumnNum:q}},w=H=>{if(/^\d+/.test(`${H.minWidth}`))return H.minWidth;let G=Tr;return H.sort&&(G=G+18),H.filter&&(G=G+28),G},S=(H,G)=>{const U=ne(H,ye.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((q,ae)=>{const de=ae.split("_").slice(-1)[0];return Object.assign(q,{[de]:ee=>{U.get(ae).forEach(ue=>Reflect.apply(ue,void 0,[ee,H,G]))}})},{}):{}},x=H=>{if(!H.filter)return null;const G=(ae,de="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de),U=(ae,de)=>{const{match:ee}=H.filter,ue=Ni(de,Xe(H,"field",[H,de]));return ee!=="fuzzy"?ae.includes(ue):ae.some(ce=>G(ce,"img").test(ue))};return typeof H.filter.filterFn=="function"?(ae,de,ee,ue)=>H.filter.filterFn(ae,de,H,ee,ue):(ae,de)=>ae.length?U(ae,de):!0},O=H=>{l.length=0;let G=0;const U=[],q=v();q&&H.unshift(q);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(Ne=>ae(Ne.children??[],ge+1))};ae(H);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,gr,hs,ms,na;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);(((gr=Ae.children)==null?void 0:gr.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=((hs=Ae.children)==null?void 0:hs.length)??0,Tt=((ms=Ae.children)==null?void 0:ms.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),(na=Ae.children)==null||na.forEach(($o,Fo)=>{Ve=Ve+ee($o,ge+1,Ae,Ve+Fo)}),Fe>0?Fe-1:0};let ue=0;return H.forEach((ce,ge)=>{ue=ue+ee(ce,0,null,ue+ge)}),U},T=H=>c.get(H),E=()=>{i.length=0;let H=0;(r||[]).forEach((G,U)=>{const{skipCol:q,skipColumnNum:ae,skipColLen:de}=y.value?C(G,U,H):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(H=ae,!n.has(G)){const{type:ee,fn:ue,scope:ce,active:ge,enabled:Ne}=hA(G,e),Oe=x(G),Ae=e.settings??{},Ve=mA(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]:w(G),[ye.LISTENERS]:new Map,[ye.WIDTH]:G.width,[ye.IS_HIDDEN]:V9(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:q,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:q,skipColumnNum:ae,skipColLen:de},[ye.COL_MIN_WIDTH]:w(G)})})},A=(H,G)=>{$(H,ye.COL_FIXED_STYLE,G)},_=H=>ne(H,ye.COL_FIXED_STYLE)??{},V=H=>ne(H,ye.COL_RECT),R=H=>ne(H,ye.CALC_WIDTH),D=H=>ne(H,ye.WIDTH),M=(H,{left:G,right:U,width:q,height:ae})=>{const de=V(H),ee={left:G??de.left,right:U??de.right,width:q??de.width,height:ae??de.height};$(H,ye.COL_RECT,ee)},j=qn((H,G)=>{r.length=0,r.push(...O(H)),E(),g(),G==null||G()}),F=(H,G=!1)=>{$(H,ye.IS_HIDDEN,G)},L=(H,G)=>{$(H,ye.RESIZE_WIDTH,G)},P=(H,G)=>{const{type:U,fn:q,scope:ae,active:de}=G,ee={[ye.COL_SORT_TYPE]:U,[ye.COL_SORT_FN]:q,[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&&$(H,ue,ee[ue])})},B=(H,G)=>{n.has(H)&&Object.assign(n.get(H)[ye.COL_FILTER_OBJ],G)},z=[ye.WIDTH],k=(H,G=z)=>ne(H,G[0])??ne(H,G[1])??ne(H,G[2]),I=H=>ne(H,ye.IS_HIDDEN)??!1,W=H=>ne(H,ye.COL_UID),K=(H,G,U)=>{[ye.COL_SORT_FN,ye.COL_SORT_SCOPE,ye.COL_SORT_TYPE].includes(G)&&d(H,{[G]:U}),[ye.COL_FILTER_FN,ye.COL_FILTER_VALUES].includes(G)&&h(H,{[G]:U})},te=(H,G)=>{const U=p.findIndex(de=>de===H),q=k(H)-G,ae=p[U+1];ae&&$(ae,ye.WIDTH,k(ae)+q)},$=(H,G,U)=>{K(H,G,U);const q=n.get(H);if(q&&Object.prototype.hasOwnProperty.call(q,G)){if(a.isRef(q[G])){q[G].value=U;return}q[G]=U}},Q=(H,G)=>{const U=G||H.checked||[],q=H.fields||[];r.forEach(ae=>{$(ae,ye.IS_HIDDEN,V9(q,ae,U))})},ne=(H,G)=>{var q;const U=(q=n.get(H))==null?void 0:q[G];return a.isRef(U)?U.value:U},oe=(H,G)=>{var U;return(U=n.get(H))==null?void 0:U[G]},re=(H,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!H.fixed,column_fixed_left:!!H.fixed,column_fixed_right:H.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(H=>{$(H,ye.COL_SORT_ACTIVE,!1),$(H,ye.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const H=p.find(G=>G.type==="selection");H&&($(H,ye.SELECTION_VAL,!1),$(H,ye.SELECTION_INDETERMINATE,!1))},formatColumns:E,flatColumnTemplate:O,isHiddenColumn:I,getColumnId:W,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(H,G)=>({...re(H,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:V,getColumnCustomClass:(H,G)=>{const U=H.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:R,getColumnWidth:D,getLeftColumnsWidth:(H,G=!1)=>{let U=!0,q=0,ae=0;for(;U&&ae<p.length;){if(H===p[ae]){G&&(q=q+D(p[ae])),U=!1;break}q=q+D(p[ae]),ae=ae+1}return q},getGroupAttribute:T,getPreColumn:H=>{const U=p.findIndex(q=>q===H)-1;return p[U]},getColumnIndex:H=>p.findIndex(G=>G===H),resolveEventListener:S,setColumnIsHidden:F,setColumnResizeWidth:L,setColumnSortOption:P,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(H,G)=>{e.colSortBehavior===Ov.independent&&r.forEach(U=>{$(U,ye.COL_SORT_ACTIVE,!1)}),$(H,ye.COL_SORT_ACTIVE,G)},setFixedStyle:A,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},gA=(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:C,bottom:w}=b.getBoundingClientRect(),S=N-C>w-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 C=Number(N);const w=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(C=C+1),t.changePageRowIndex(Number(w),C),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},vA=(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}},yA=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)])}}}),bA=(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:ar.Normal,mode:p0.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(Fn,{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}}},wA=(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(Mn),g=a.ref(1),v=a.computed(()=>{var q,ae,de;return(q=t.slots)!=null&&q.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((de=e.fixedBottom)==null?void 0:de.height)??Mn:0}),{resolveClassName:b}=fe(),{renderScrollLoading:y}=bA(e,t),N=a.computed(()=>Te({[b("table")]:!0},aA(e.border))),C=a.computed(()=>({height:sr(e.height),maxHeight:sr(e.maxHeight),minHeight:sr(e.minHeight)})),w=a.computed(()=>Te({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var de,ee,ue,ce;const q=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",q),(ce=(ue=n.value)==null?void 0:ue.style)==null||ce.setProperty("--shadow-left",ae)},x=Cm(()=>{var q,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(q=n.value)==null?void 0:q.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=q=>{o.value=q,x()},T=q=>{g.value=q},E=q=>{l.value=q,x()},A=()=>{var q,ae,de,ee,ue,ce,ge,Ne,Oe,Ae;(ae=(q=n.value)==null?void 0:q.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")},_=q=>{d.value=q,x()},V=X0(e),R=a.computed(()=>Xe(V,"height",["thead"])*g.value),D=a.computed(()=>{var q;return{"--row-height":`${R.value}px`,"--background-color":Sv[((q=e.thead)==null?void 0:q.color)??Io.DEF1],paddingRight:e.scrollbar?null:`${xv}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Te({[b("table-footer")]:!0,"is-hidden":te.value===0})),F=q=>a.createVNode("div",{ref:n,style:C.value,class:N.value},[q,a.createVNode(yA,null,{default:()=>{var ae,de;return[(de=(ae=t.slots).default)==null?void 0:de.call(ae)]}})]),L=(q,ae,de)=>a.createVNode("div",{ref:r,style:D.value,class:w.value},[q==null?void 0:q(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[de==null?void 0:de()]),ae==null?void 0:ae()]),P=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:P.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${C.value.maxHeight}`)){const q=e.showHead?R.value:0,ae=te.value+q+v.value;return`calc(${C.value.maxHeight} - ${ae}px)`}return null}),I=q=>q-R.value-v.value-te.value,W=(q,ae=!0)=>{if(ae){z.value=I(q);return}z.value=q},K=q=>{z.value=q},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=q=>{te.value=q},ne=qn((...q)=>{t.emit(ze.SCROLL_BOTTOM,{...q})}),oe=()=>{var de,ee,ue,ce;const q=((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=q-ae-(o==null?void 0:o.value)},re=q=>{p.value=q},X=q=>{c.value=u.bottom??0;const ae=q[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 q,ae,de;return{minHeight:`${((q=e.fixedBottom)==null?void 0:q.minHeight)??Mn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((de=e.fixedBottom)==null?void 0:de.height)??null}});a.onMounted(()=>{oe(),A()});const le=()=>{const q=y==null?void 0:y();return q?a.createVNode("div",{style:Z.value,class:pe},[q]):null};return{renderContainer:F,renderHeader:L,renderBody:(q,ae,de)=>a.createVNode(us,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:q,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:q=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[q]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:W,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:O,setDragOffsetX:_,setFixedColumns:q=>{h.length=0,h.push(...q)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:A,refRoot:n,refHead:r,refBody:s,refFooter:i}},CA=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{nr(e.value)&&(i(),s=Dv(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},NA=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}},xA=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(ko,{description:n.value,scene:"part",type:r.value},null)}}),pf=a.defineComponent({name:"TableCell",props:{column:Po,row:m.any.def({}),parentSetting:Y0,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:_v.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:sr(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:C={}}=e.column.showOverflowTooltip,w={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:C,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(w.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(w.showOverflowTooltip,e.column.showOverflowTooltip)),w}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var C;const N=f();return y?((C=N==null?void 0:N.cloneNode)==null?void 0:C.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var E,A;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:C}=e;const w=c(y.allowHtml);let S=()=>w,x={},O="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,C=y.resizerWay||"debounce",S=()=>y.content||w,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])||w)}return e.isHead&&(N=!(((A=(E=e.column)==null?void 0:E.showOverflowTooltip)==null?void 0:A.showHead)??!0),O="auto",S=()=>{var _,V;return((V=(_=f())==null?void 0:_.cloneNode)==null?void 0:V.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:C,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||!nr(y))return;const{mode:N,disabled:C}=d();if(r.value=!C,N==="auto"&&(r.value=U9(y)),N==="static"&&(r.value=!0),r.value){const w=a.ref(d());l===null&&(l=x0(y,{disabled:w.value.disabled,content:w.value.content,mode:w.value.mode,popoverOption:w.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:C}=d();y||(u(),C!==!1&&e.observerResize&&(h=Dv(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):"--"])}}}),Hs=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)])}}),SA=({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=(_,V)=>{V.stopImmediatePropagation(),V.preventDefault(),V.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:V,end:R}=f(),D=V.index<R.index?V.index:R.index,M=V.index<R.index?R.index:V.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{Si(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),A=Si(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:O,disabled:!A,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}):Vg(x),b=()=>{var T;const x=()=>{if(Xe(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),_e.ROW_INDEX);const A=Xe(o,"field",[o,s]),_=Ni(s,A);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:V}=e;if(V)return typeof V=="function"?V({row:s,column:o,index:i}):V}return _},O={expand:()=>l?"":w(),selection:()=>g(),drag:S};return((T=O[o.type])==null?void 0:T.call(O,s,o,i,t))??x()},y=()=>{const x=Ni(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(rs,null,null):a.createVNode(os,null,null);return a.createVNode("span",null,[[O,((E=(T=n.slots).expandContent)==null?void 0:E.call(T,s))??""]])},C=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})},w=()=>{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=>C(O)},[x()])},S=()=>{var E,A,_;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=((A=e.rowDraggable)==null?void 0:A.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(io,{style:`'--font-size: ${O};'`,class:"drag-cell"},null)};return{renderCell:b}},Pv=()=>{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 k9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Bs=32,TA=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:fn},props:{column:Po,height:m.number.def(Bs)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=Pv(),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 P;(P=p.value)==null||P.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)??Bs*y}),C=a.computed(()=>{const{height:L,list:P=[]}=i.value;return L||P.length*Bs}),w=a.computed(()=>{const L=Bs*2;return b.value.length>y?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${w.value}px`,height:/%$/.test(`${C.value}`)?C.value:`${C.value}px`})),x=(L,P="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),P),O=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:P}=A(_,s.value.confirm);if(P||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))},A=(L,P)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:P}),{btnSave:_,btnReset:V}=i.value,R=()=>{const{disabled:L,text:P}=A(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[P]):a.createVNode(Ye,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:O},k9(P)?P:{default:()=>[P]})},D=()=>{const{disabled:L,text:P}=A(V,s.value.reset);return L?"":a.createVNode(Ye,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:E},k9(P)?P:{default:()=>[P]})},M=(L,P)=>{const B=new Set(f.checked);L?B.add(P.value):B.delete(P.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))})},F=L=>L.length?(j(),L.map(P=>a.withDirectives(a.createVNode("div",{key:P.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(P.value),immediateEmitChange:!1,label:P.value,modelValue:f.checked.includes(P.value),onChange:B=>M(B,P)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${P.value}-ref`]=B},[`${P.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:P.tipKey||P.text,placement:"right",disabled:!P.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:Ai.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(so,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(jn,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(xo,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[F(b.value)])]}),a.createVNode("div",{class:"content-footer"},[R(),D()])])})}}),_A=a.defineComponent({name:"HeadSort",props:{column:Po,defaultSort:m.oneOf(fL).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(qi,{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(es,{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 OA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const EA=({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:F=t.getColumnRefAttribute(s,ye.COL_SORT_TYPE)}=M??{},L=j?Ze.NULL:F,P=Iv(s,L,e.sortValFormat);t.setColumnAttribute(s,ye.COL_SORT_TYPE,L),t.setColumnAttribute(s,ye.COL_SORT_FN,P),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(_A,{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})},F=()=>{t.setColumnAttribute(s,ye.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(TA,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:F},null)},p=X0(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 F=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:F,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:C}=fe(),w=C("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,ye.SELECTION_DISABLED),j=t.getColumnAttribute(s,ye.SELECTION_VAL),F=t.getColumnAttribute(s,ye.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:F,modelValue:j,outline:!0,onChange:L=>y(L)},null),a.createVNode(gt,{ref:d,extCls:w,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:F,modelValue:j,onChange:L=>y(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:F}=b();return a.createVNode(pf,{class:M,column:s,headExplain:Xe(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},OA(F)?F:{default:()=>[F]})},O=()=>{if(!t.getColumnAttribute(s,ye.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:uA(t.getColumnRefAttribute(s,ye.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":Sv[((D=e.thead)==null?void 0:D.color)??Io.DEF1]}),E=t.getGroupAttribute(c),A=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(()=>A.value.concat([{"is-head-group":E==null?void 0:E.isGroup,"is-head-group-child":!!(E!=null&&E.parent)}])),V=()=>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},[V()]):a.createVNode("th",a.mergeProps({style:T,class:A.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()])}},LA=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 AA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const VA=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=De("table"),o=$t();let l={};const c=LA(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,V)=>{const R=`${rA(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,ye.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:sr(R,"auto"),minWidth:sr(D,"auto")}},null)})]),f=()=>{const _=X0(e),V={"--row-height":`${Xe(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:V},[n.columnGroup.map((R,D)=>a.createVNode("tr",null,[R.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:F}=EA({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return F()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",V=[...Cr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(Hs,{key:_},{default:()=>{var R,D;return[a.createVNode("tr",{key:_,style:V},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(R=e.appendLastRow).cellRender)==null?void 0:D.call(R,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(Hs,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:V},[n.visibleColumns.map((R,D)=>a.createVNode("td",null,[a.createVNode(pf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,R,D))??R.field??R.prop]}})]))])]})},p=_=>{let V={};const R=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const F=x(M,j,V,_,R,D);return V=M,F}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var D,M;const V=_??r.pageRowList,R=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return V.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(V)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(xA,{emptyText:R.value,filterList:V,list:e.data},null)},y=(_,V,R,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,V,R,D)},N=(_,V,R,D)=>{t.emit(ze.ROW_DBL_CLICK,_,V,R,D)},C=(_,V,R,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,V,R,D)},w=(_,V,R,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,V,R,D)},S=(_,V,R,D,M)=>{var P;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((P=M.get(R))==null?void 0:P.get(D))??{},F=!1;const L=xi(D,null,_,V,"rowspan");return j>1?(j=j-1,F=!0):L>1&&(j=L,F=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:F}),{skipRowLen:j,skipRow:F}},x=(_,V,R,D,M,j,F=!1)=>{const L=D.length,P=[...Cr(e.rowStyle,[_,V]),{"--row-height":`${g(_,V)}px`}],B=[...Cr(e.rowClass,[_,V]),`hover-${e.rowHover}`,V%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,_e.ROW_UID);return[a.createVNode(Hs,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:P,class:B,"data-row-index":V,draggable:!!e.rowDraggable,onClick:k=>y(k,_,V,D),onDblclick:k=>N(k,_,V,D),onMouseenter:k=>C(k,_,V,D),onMouseleave:k=>w(k,_,V,D)},l),[n.visibleColumns.map((k,I)=>{const W=[n.getFixedStlye(k),...Cr(e.cellStyle,[k,I,_,V])],{colspan:K,rowspan:te}=cA(k,I,_,V),{skipCol:$}=n.getColumnAttribute(k,ye.COL_SPAN),{skipRow:Q}=j&&!F?S(_,V,R,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,...Cr(e.cellClass,[k,I,_,V]),{"expand-row":r.getRowAttribute(_,_e.ROW_EXPAND),"is-last":V+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=SA({props:e,rows:r,ctx:t,columns:n,row:_,index:V,column:k,isChild:F,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:V,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:W,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(pf,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:F,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},AA(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),O(_,B)]},O=(_,V,R)=>{if(r.getRowAttribute(_,_e.ROW_EXPAND)){const M=[...V,{row_expend:!0}],F=`${r.getRowAttribute(_,_e.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,P)=>x(L,P,{},_,{},!1,!0)):a.createVNode(Hs,{key:F},{default:()=>{var L,P;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((P=(L=t.slots).expandRow)==null?void 0:P.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,_)},A=()=>{if(s.isShowPagination.value)return a.createVNode(W0,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:A,setDragEvents:v}},kA=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=F=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(F)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(F,e.selectionKey)?iA(F,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Fs(L)===Fs(F)):!1:!1,i=(F,L,P)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Xe(e,"rowHeight",[{index:L,type:P??"tbody",row:F}]):Mn,o=()=>{let F=!1,L=!1;n.value.forEach((P,B)=>{const z=Fs(P);let k=fA(z,$t(),e);const I=s(z);I?F=!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 W=t.get(z);k=W[_e.ROW_UID],W[_e.ROW_INDEX]=B+1,W[_e.ROW_HEIGHT]=i(P,B)}),t.set(Jn,{[_e.ROW_SELECTION]:F,[_e.ROW_SELECTION_INDETERMINATE]:F&&L})},l=(F,L)=>({row:F,index:L??c(F,_e.ROW_INDEX),isSelectAll:c(Jn,_e.ROW_SELECTION)}),c=(F,L)=>{var P;return(P=t.get(F))==null?void 0:P[L]},d=F=>{t.set(hL,{[_e.ROW_SPAN]:F})},f=(F,L)=>Si(e,{row:F,index:L})?c(F,_e.ROW_SELECTION):!0,u=F=>{if(typeof e.isSelectedFn=="function"){x(F,e.isSelectedFn(l(F)));return}x(F,!c(F,_e.ROW_SELECTION))},h=F=>{const L=F??!p();if(t.set(Jn,{[_e.ROW_SELECTION]:L,[_e.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((P,B)=>x(P,L,B));return}r.forEach((P,B)=>x(P,L,B))},p=()=>e.acrossAll?n.value.every((F,L)=>f(F,L)):r.every((F,L)=>f(F,L)),g=()=>e.acrossAll?n.value.some(F=>c(F,_e.ROW_SELECTION)):r.some(F=>c(F,_e.ROW_SELECTION)),v=F=>{h(F)},b=()=>{const F=p();S(Jn,_e.ROW_SELECTION,F),S(Jn,_e.ROW_SELECTION_INDETERMINATE,!F&&g())},y=()=>c(Jn,_e.ROW_SELECTION_INDETERMINATE),N=()=>c(Jn,_e.ROW_SELECTION),C=(F,L)=>{if(L){S(L,_e.ROW_HEIGHT,F);return}n.value.forEach(P=>S(P,_e.ROW_HEIGHT,F))},w=(F,L,P)=>F?c(F,_e.ROW_HEIGHT):i(F,L,P),S=(F,L,P)=>{const B=Fs(F),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=P)},x=(F,L,P)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(F,P))),Si(e,{row:F,index:P??c(F,_e.ROW_INDEX)})&&S(F,_e.ROW_SELECTION,B),b()},O=(F,L)=>{S(F,_e.ROW_INDEX,L)},T=(F,L)=>{S(F,_e.ROW_EXPAND,L)},E=F=>{let L=0;const P=50,B=()=>{const z=L+P;r.push(...F.slice(L,z)),z<F.length&&(L=z,setTimeout(()=>{B()}))};if(F.length>P){B();return}r.push(...F)};return{setRowIndex:O,setRowExpand:T,isRowChecked:f,setPageRowList:F=>{r.length=0,E(F)},setTableRowList:F=>{n.value.length=0,n.value.push(...F),o()},clearSelection:()=>{n.value.forEach(F=>x(F,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:F=>{n.value.forEach(L=>T(L,F??!0))},setRowHeight:C,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(F=>c(F,_e.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((F,L)=>F+w(L),0),changePageRowIndex:(F,L)=>{const P=r[F];r.splice(L,0,P);const B=F<L?F:F+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:w,tableRowList:n,tableRowSchema:t,pageRowList:r}};function DA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const IA=(e,t,n,r)=>{const s=De("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=Pv(),l=uL(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:Ea.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(Ea.small),C=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:C.value});const K={checked:C.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,C.value=O.checkedFields,(K=g.value)==null||K.hide()},A=()=>{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&&C.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));C.value.splice(0,C.value.length,...Q,...$)}else C.value.splice(0,C.value.length,...$)},V=a.computed(()=>(v.limit??0)>0),R=v.sizeList||l,D=a.computed(()=>V.value&&(v.limit?v.limit:0)<=C.value.length),M=(K,te)=>K.disabled||D.value&&!C.value.includes(u(K,te)),j=K=>{y.value=K.value,N.value=K.height},F=K=>({"line-size":!0,"is-medium":y.value==="medium",active:K.value===y.value}),L={marginRight:"12px"},P=()=>R.map(K=>a.createVNode("span",{class:F(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>C.value.length>0&&C.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[C.value],()=>{C.value.length||(c.value=!1),C.value.length&&x.value.every((K,te)=>C.value.includes(u(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{C.value.splice(0,C.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(ns,{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]),V.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),V.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:C.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(xo,{class:"setting-body-fields",modelValue:C.value,"onUpdate:modelValue":re=>C.value=re},DA(K=x.value.map((re,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(ot,{checked:C.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(":"),P()]):""]),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:A},[a.createVNode(Ji,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},PA=a.defineComponent({name:"Table",directives:{bkTooltips:fn},props:NL,emits:RL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=pA(e),r=kA(e),s=NA(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}=wA(e,t),C=(...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=IA(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&C(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),v(oe))}),x=gA(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:E,setDragEvents:A}=VA({props:e,ctx:t,columns:n,rows:r,pagination:s});A(x);const{resolveColumns:_}=$L(),V=a.getCurrentInstance(),R=()=>{var oe;const ne=((oe=V.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(Tv,R);const{renderFixedRows:D,resolveFixedColumnStyle:M}=vA(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:xv)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:F}=ML(n,{afterResize:M}),L=a.ref(!1),P=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),W=qn((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=P(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(C(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;CA(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Lr(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),C(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(()=>[F.value],()=>{h(F.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{W()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{W(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),W(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{W(!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),C(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:C,getRoot:()=>N.value}),()=>i([c(O,S.renderSettings,D),l(r.pageRowList,T,D),o(),d(E())])}}),Rv=lt(PA,{Column:SL}),Mv=Le(XT),RA={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)},MA=a.defineComponent({name:"Timeline",props:RA,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)])]))])}}),$v=Le(MA);var Yt=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Yt||{});const $A={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 FA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function HA(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 BA(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 jA=a.defineComponent({name:"Transfer",props:$A,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]"))?Yt.OBJECT_ARRAY:Yt.BASE_ARRAY:Yt.NOT_ARRAY),o=a.computed(()=>i.value===Yt.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Yt.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case Yt.BASE_ARRAY:return[...new Set(e.sourceList)].map(A=>({value:A}));case Yt.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=HA(d,f,o),{selectSearchQuery:p,selectListSearch:g}=BA(u,l),v=a.computed(()=>[...g.value].sort((A,_)=>{const V=A[c.value],R=_[c.value];return V>R?1:-1})),b=a.computed(()=>[...h.value].sort((A,_)=>{const V=A[c.value],R=_[c.value];return V>R?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(A,_)=>{const V=o.value;return A.some(R=>R[V]===_[V])&&_.disabled},N=()=>{u.value=[...d.value.filter(A=>y(u.value,A))],h.value=[...d.value.filter(A=>!y(u.value,A))],S()},C=()=>{u.value=[...d.value.filter(A=>!y(h.value,A))],h.value=[...d.value.filter(A=>y(h.value,A))],S()},w=(A,_)=>{if(A.disabled)return;const V=A[o.value],R=_?u:h,D=_?h:u,M=R.value.findIndex(j=>j[o.value]===V);D.value.push(...R.value.splice(M,1)),S()},S=()=>{const A=u.value.map(V=>V[o.value]),_=h.value.map(V=>V[o.value]);t("update:targetList",_),t("change",i.value===Yt.BASE_ARRAY?A:u.value.map(V=>a.toRaw(V)),i.value===Yt.BASE_ARRAY?_:h.value.map(V=>a.toRaw(V)),_)},x=A=>{const _=A==="source"?u:h;r.value[A]=s.value[A].length===_.value.length},O=(A,_)=>{const V=_==="source"?u:h;s.value[_]=A?V.value.map(R=>R[o.value]):[]},T=A=>{const _=A==="left",V=_?u:h,R=_?h:u,D=s.value[_?"source":"target"],M=V.value.filter(j=>D.includes(j[o.value]));V.value=V.value.filter(j=>!D.includes(j[o.value])),R.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:C,handleItemClick:w,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(Ki,{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(xo,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},FA(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(jn,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(pr,{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(po,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),Fv=Le(jA);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,zA={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 Pn={__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 Hv=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Hv||{});const UA={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(Hv.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)},qA=e=>({renderEmpty:t=>a.createVNode(ko,{scene:"part",type:t},{default:()=>[e.emptyText]})}),WA=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=>{Lr(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,C,w;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;(w=(C=o.value).callback)==null||w.call(C,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{Lr(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Lr(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)}}},Mo=(e,t)=>{const n=L=>e.schema.get(L),r=(L,P)=>{var B;return(B=n(L))==null?void 0:B[P]},s=(L,P,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),{[P]:B}))},i=L=>e.data.find(P=>c(P)===L),o=(L,P,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),P,B,L));return}s(i(L),P,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,P)=>{const B=e.data.find(z=>c(z)===L);return r(B,P)},N=L=>typeof L=="string"?y(L,he.IS_ROOT):r(L,he.IS_ROOT),C=L=>{const P=e.data.find(B=>c(B)===L);return p(P)},w=L=>{const P=e.data.find(B=>c(B)===L);return l(P)},S=(L,P)=>{s(L,he.IS_LOADING,P)},x=L=>typeof L=="object"?d(L):typeof L=="string"?y(L,he.IS_OPEN):!1,O=(L,P)=>r(r(L,he.PARENT),P),T=L=>x(r(L,he.PARENT)),E=L=>N(L)||x(L)||T(L),A=(L,P)=>{const z=L.split("-").reduce((k,I)=>{const W=Number(I);return Array.isArray(k)?k[W]:k[t.children][W]},t.data);return P&&Object.assign(z,{[he.UUID]:P}),z},_=L=>L[t.children]??[],V=L=>e.data.find(P=>c(P)===L),R=L=>{let P=L;return typeof P=="string"&&(P=V(P)),N(P)?{[t.children]:t.data}:v(P)},D=L=>({[Pn[he.IS_LOADING]]:r(L,he.IS_LOADING),[Pn[he.HAS_CHILD]]:f(L),[Pn[he.IS_MATCH]]:u(L),[Pn[he.IS_CHECKED]]:h(L),[Pn[he.IS_OPEN]]:d(L),[Pn[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:R,getNodePathById:w,getNodeAttrById:y,getNodeParentIdById:C,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:A,getSourceNodeByUID:V,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 W;if(!L)return null;let P=L;Lr(L)&&(P=i(L.getAttribute("data-tree-node")));const B=r(P,he.DEPTH),z=r(P,he.IS_ROOT),k=r(P,he.PARENT),I=z?r(P,he.INDEX):(W=k==null?void 0:k[t.children])==null?void 0:W.findIndex(K=>K===P);return{level:B,target:L,index:I,parent:k,node:P,isRoot:z}}}},Bv="1px dashed #c3cdd7",jv=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:zv(n,e,t,i)},zv=(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}},Uv=(e,t)=>zv(e,t,"label"),GA=(e,t)=>({"--level-line":jv(t,"levelLine",e,Bv,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),KA=(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=()=>jv(t,"levelLine",e,Bv,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},YA=(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}},XA=(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}},JA=(e,t,n,r,s)=>{ZA(e,t,n,{[r]:s})},ZA=(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||{})},xa=e=>e??{__IS_NULL:!0},Qs=(e,t,n)=>Array.isArray(t)?t.some(r=>Qs(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,qv=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,Wv=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=Mo(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 JA(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[Pn[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}},QA=(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:C,resolveScopedSlotParam:w,extendNodeAttr:S,extendNodeScopedData:x}=Mo(n,e),{resolveClassName:O}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:E,deepAutoOpen:A}=Wv(e,n),_=Z=>v(Z)?a.createVNode(ao,{class:[O("tree-icon"),O("node-prefix")]},null):a.createVNode(ro,{class:[O("tree-icon"),O("node-prefix")]},null),V=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:H,style:G}=Z;return a.h(le,{class:se,style:G},H)}return null},R=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??y(Z)?a.createVNode(Qr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(y(Z))return R(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return V(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(rs,{class:O("node-prefix")},null):a.createVNode(os,{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")?V(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(mo,{class:[O("tree-icon"),O("node-prefix")]},null):null},j=(Z,le)=>{const se=C(Z);if(se){const H=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,H),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},F=(Z,le,se)=>{h(Z).forEach(H=>{Array.isArray(le)?le.forEach((G,U)=>{o(H,G,se[U])}):o(H,le,se),F(H,le,se)})},L=Z=>{var le,se,H;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(H=e.async)==null?void 0:H.trigger.includes(Z):!0},P=(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&&(F(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(ft.NODE_CHECKED,n.data.filter(H=>N(H)),n.data.filter(H=>B(H))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>qv(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)=>P(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,H=!0)=>{const G=le===null?!v(Z):!!le;if(G||F(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),H){const U=v(Z)?ft.NODE_EXPAND:ft.NODE_COLLAPSE;t.emit(U,Z,w(Z),d(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(H=>o(xa(H),le,se));return}o(xa(Z),le,se)},W=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,H=!1)=>{const G=xa(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],q=Array.isArray(se)?se:[se];if(H){if(U.forEach((ae,de)=>I(G,ae,q[de])),!p(G)){const ae=C(G);U.forEach((de,ee)=>{f(ae,de)!==se&&K(ae,de,q[ee],H)})}}else U.forEach((ae,de)=>I(G,ae,q[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,H=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let q=xa(U[0]);if((typeof q=="string"||typeof q=="number"||typeof q=="symbol")&&(q=n.data.find(ae=>u(ae)===q)??{[he.IS_NULL]:!0}),!q[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&q.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(q,he.IS_SELECTED,le),i=u(q),H&&t.emit(ft.NODE_SELECTED,{selected:le,node:q}),se&&U.length===1&&W(q,!0,!0),f(q,he.IS_ASYNC)&&L(G)&&E(q).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,H,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 H=ne(Z);if(H.includes("selected")&&Q(Z,!0,!0,!0,se),H.includes("expand")&&(b(Z)||te(Z,le,se)),H.includes("collapse")&&b(Z)&&te(Z,le,se),H.includes("click")){const G=ft.NODE_CLICK;t.emit(G,Z,w(Z),d(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),H=`${se}`.split("-").slice(0,Z+1);if(H.join("-")===se)return!0;const U=H.pop(),q=parseInt(U,10);H.push(`${q+1}`);const ae=H.join("-");return n.data.some(de=>c(de)===ae)},X=Z=>{if(!e.levelLine)return null;const le=H=>({"--depth":H}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((H,G)=>G).filter(H=>re(H,Z)).filter(H=>H>0).map(H=>a.createVNode("span",{style:le(se-H),class:"node-virtual-line"},null))},J=Z=>{var le,se,H,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(H=t.slots).default)==null?void 0:G.call(H,x(Z)):[Uv(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var H,G;const se=D(Z);return a.createVNode("div",{key:u(Z),class:XA(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:KA(Z,e,n,le),class:YA(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=(H=t.slots).nodeAppend)==null?void 0:G.call(H,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:A,asyncNodeClick:E,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:W,setNodeAttribute:K,isIndeterminate:B}},eV=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=Mo(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]"),C=L=>{var B;const P=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(P)},w=(L,P,B)=>{B.forEach(z=>L.classList.remove(z)),P.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const P=N(L),B=C(P);if(B.draggable===!1||h.value&&e.disableDrag(B)){P.classList.add(`${u("tree-drag-disabled")}`);return}P.setAttribute("draggable","true"),P.addEventListener("mouseup",S)},O="drop-before",T="drop-after",E="drop-inner";let A=null;const _=dr(L=>{if(L.preventDefault(),!b)return;const P=N(L);A!==P&&(A==null||A.classList.remove(O,T,E),A=P);const B=l(C(P));y.has(P)||y.set(P,P.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=y.get(P),W=I*g,K=z-k;if(K<W?w(P,[O],[T,E]):K>I-W?w(P,[T],[O,E]):w(P,[E],[O,T]),t.emit(ft.NODE_DRAG_OVER,L,P,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",P.classList.add(`${u("tree-drop-disabled")}`);return}P.classList.add(`${u("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=v;const $=P.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),V=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const P=N(L);L.dataTransfer.setData("text/plain","");const B=P.getAttribute("data-tree-node");v=B,b=P,L.dataTransfer.setData("node-id",B),t.emit(ft.NODE_DRAG_START,L,P)},R=L=>{L.preventDefault(),L.stopPropagation();const P=N(L);if(!P)return;P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(C(P));if(p.value&&e.disableDrop(B))return;const z=v,k=P.getAttribute("data-tree-node");z!==k&&(A!=null&&A.classList.contains(E)?Reflect.apply(j,void 0,[z,k]):(A!=null&&A.classList.contains(T)||A!=null&&A.classList.contains(O))&&Reflect.apply(M,void 0,[z,k]),t.emit(ft.NODE_DROP,L,P,B)),y=new WeakMap,A==null||A.classList.remove(T,O,E),A=null},D=(L,P)=>L!==P,M=(L,P)=>{if(!e.dragSort||!D(L,P))return;const B=s(L),z=s(P);if(!B||!z)return;const k=i(L),I=i(P);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const W=e.children,K=k[W],te=I[W];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),A!=null&&A.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):A!=null&&A.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,P)=>{const B=s(L),z=s(P);let k=null;if(d(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const W=c(L,he.INDEX);k==null||k[e.children].splice(W,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},F=L=>{L.preventDefault();const P=N(L);y.has(P)&&y.delete(P),P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),P.classList.remove(T,O,E),t.emit(ft.NODE_DRAG_LEAVE,L,P)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",V),L.addEventListener("dragover",_),L.addEventListener("dragleave",F),L.addEventListener("drop",R)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",V),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",F),L.removeEventListener("drop",R)}})},tV=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}},nV=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:C}=e,w=[],S=[];let x=0;const O=new WeakMap;function T(L,P,B,z){if(L!=null&&O.has(L)){const k=O.get(L);if(Object.prototype.hasOwnProperty.call(k,P)&&typeof z=="function"&&Reflect.apply(z,self,[k,P,B,L])){if(k[P]===B)return;Object.assign(k,{[P]:B}),T(k[he.PARENT],P,B,z)}}}function E(L){let P=null;return typeof e.nodeKey=="string"&&(P=L[e.nodeKey]||$t()),P||L[he.UUID]||$t()}const A={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,P)=>Qs(L,e.selected,P),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,P,B,z=void 0){let k=z;z===void 0&&typeof A[B]=="function"&&(k=A[B](P,L));const I=Pn[B];if(Object.prototype.hasOwnProperty.call(P,I))return P[I];const W=(y==null?void 0:y.get(P))??void 0;let K;return W&&(K=W[B]),K==null&&(K=k),K}function V(L,P){if(!e.selectable)return!1;const B=Qs(P,e.selected,L);return _(L,P,he.IS_SELECTED,B)}function R(L,P,B){var I;const z=_(L,P,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,P,B){if(!qv(e,{data:L,attributes:B}))return!1;const k=Qs(L,e.checked,P);return _(P,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,P,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 F(L,P=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const W=L[I];if(Array.isArray(W))F(W,P,B,z);else if(typeof W=="object"&&W!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${E(W)}`,$=!!(W[C]||[]).length;let Q=_(te,W,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=R(te,W,B);const ne={[he.DEPTH]:P,[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]:V(te,W),[he.IS_MATCH]:_(te,W,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,W,he.IS_CACHED),[he.IS_ASYNC]:_(te,W,he.IS_ASYNC),[he.IS_LOADING]:_(te,W,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(W,te,ne),ne[he.IS_CHECKED]&&w.push(W),O.set(W,ne),S.push(W),x+=1,Object.prototype.hasOwnProperty.call(W,C)&&F(W[C]||[],P+1,W,K)}}}return F(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(w==null||w.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}=Wv(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((C,w)=>{h(C)==="once"&&N.unshift(w)}),N.length&&N.forEach(C=>y.splice(C,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,C;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((C=e.async)==null?void 0:C.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}},rV=a.defineComponent({name:"Tree",props:UA,emits:zA,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=nV(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}=Mo(r,e),{searchFn:N,isSearchActive:C,refSearch:w,isSearchDisabled:S,isTreeUI:x,showChildNodes:O}=tV(e),T=a.reactive([]),E=re=>{if(C.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)},A=a.computed(()=>r.data.filter(re=>E(re))),{getLastVisibleElement:_,intersectionObserver:V}=WA(e),{renderTreeNode:R,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:F,asyncNodeClick:L,setNodeAttribute:P,isIndeterminate:B}=QA(e,t,r,A,{registerNextLoop:i}),z=Ka(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(Uv(re,e),re);X&&T.push(h(re)),P(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([w],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(xa(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=>{F(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const W=()=>{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:A.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:A.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:A.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:F,scrollToTop:K,asyncNodeClick:L,getData:I,reset:W,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=qA(e);eV(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>R(ie,!C.value||x.value));const X=C.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(V.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),H=y(se[0]);(ie=(Y=V.value)==null?void 0:Y.callback)==null||ie.call(Y,H),t.emit(ft.NODE_ENTER_VIEW,H);return}const le=y(J.slice(-1)[0]);(Z=(pe=V.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(us,{ref:n,style:GA(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:A.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}}),Gv=Le(rV),er="upload";var Cn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Cn||{}),gf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(gf||{}),Nr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Nr||{});const D9=[Cn.BUTTON,Cn.DRAGGABLE,Cn.PICTURE],I9=[gf.FORMDATA,gf.BINARY],Et={type:{type:String,default:"formdata",validator:e=>!e||I9.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${I9.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||D9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${D9.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 P9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const aV=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(er)}-list`,f=a.computed(()=>i.value===Cn.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`},P9(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(Ua,{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(Zr,{class:"action-icon",onClick:O=>g(x,e.files,O)},null),a.createVNode(Ur,{class:"action-icon",onClick:O=>v(x,O)},null)])])],C=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},P9(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]})},w=x=>{var V;const O=(V=x==null?void 0:x.raw)==null?void 0:V.type,[T]=(O==null?void 0:O.split("/"))||"";let A={text:Or,image:oo,application:Or,video:yo,audio:Xi}[T]||Or;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(A=Wi),a.h(A,{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):w(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(mr,{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(Ua,{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(uo,{class:`${d}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(Ur,{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():C(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),R9=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(er)}-trigger`,h=a.computed(()=>i.value===Cn.BUTTON),p=a.computed(()=>i.value===Cn.DRAGGABLE),g=a.computed(()=>i.value===Cn.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})}),C=()=>{y.value.value=null,y.value.click()},w=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:F}=j.target;n("change",Array.from(F))},S=()=>{e.disabled||C()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&C(),j.preventDefault())};function O(j,F){n("remove",j,F),F.stopPropagation(),F.preventDefault()}function T(j,F){n("preview",j,[j],F),F.stopPropagation(),F.preventDefault()}const E=a.ref(!1),A=()=>{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)},F=B=>{B.preventDefault(),E.value=!0},L=()=>{E.value=!1},P=Te({[`${u}__draggable`]:!0});return a.createVNode("div",{class:P,onDragleave:L,onDragover:F,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ma,{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?R(e.file):V()]),V=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(is,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),R=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(Ua,{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(Zr,{class:"action-icon",onClick:F=>T(j,F)},null),a.createVNode(Ur,{class:"action-icon",onClick:F=>O(j,F)},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(Ma,{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 A();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:w},null)])}}});var Id={exports:{}},M9;function sV(){return M9||(M9=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 C=y[0],w=y[1],S=y[2],x=y[3];C+=(w&S|~w&x)+N[0]-680876936|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[3]-1044525330|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[4]-176418897|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[7]-45705983|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[8]+1770035416|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[11]-1990404162|0,w=(w<<22|w>>>10)+S|0,C+=(w&S|~w&x)+N[12]+1804603682|0,C=(C<<7|C>>>25)+w|0,x+=(C&w|~C&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+C|0,S+=(x&C|~x&w)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,w+=(S&x|~S&C)+N[15]+1236535329|0,w=(w<<22|w>>>10)+S|0,C+=(w&x|S&~x)+N[1]-165796510|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[0]-373897302|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[5]-701558691|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[4]-405537848|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[9]+568446438|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[8]+1163531501|0,w=(w<<20|w>>>12)+S|0,C+=(w&x|S&~x)+N[13]-1444681467|0,C=(C<<5|C>>>27)+w|0,x+=(C&S|w&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+C|0,S+=(x&w|C&~w)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,w+=(S&C|x&~C)+N[12]-1926607734|0,w=(w<<20|w>>>12)+S|0,C+=(w^S^x)+N[5]-378558|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[14]-35309556|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[1]-1530992060|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[10]-1094730640|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[13]+681279174|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[6]+76029189|0,w=(w<<23|w>>>9)+S|0,C+=(w^S^x)+N[9]-640364487|0,C=(C<<4|C>>>28)+w|0,x+=(C^w^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+C|0,S+=(x^C^w)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,w+=(S^x^C)+N[2]-995338651|0,w=(w<<23|w>>>9)+S|0,C+=(S^(w|~x))+N[0]-198630844|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[5]-57434055|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[12]+1700485571|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[1]-2054922799|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[8]+1873313359|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[13]+1309151649|0,w=(w<<21|w>>>11)+S|0,C+=(S^(w|~x))+N[4]-145523070|0,C=(C<<6|C>>>26)+w|0,x+=(w^(C|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+C|0,S+=(C^(x|~w))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,w+=(x^(S|~C))+N[9]-343485551|0,w=(w<<21|w>>>11)+S|0,y[0]=C+y[0]|0,y[1]=w+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=y.charCodeAt(C)+(y.charCodeAt(C+1)<<8)+(y.charCodeAt(C+2)<<16)+(y.charCodeAt(C+3)<<24);return N}function o(y){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=y[C]+(y[C+1]<<8)+(y[C+2]<<16)+(y[C+3]<<24);return N}function l(y){var N=y.length,C=[1732584193,-271733879,-1732584194,271733878],w,S,x,O,T,E;for(w=64;w<=N;w+=64)s(C,i(y.substring(w-64,w)));for(y=y.substring(w-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<S;w+=1)x[w>>2]|=y.charCodeAt(w)<<(w%4<<3);if(x[w>>2]|=128<<(w%4<<3),w>55)for(s(C,x),w=0;w<16;w+=1)x[w]=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(C,x),C}function c(y){var N=y.length,C=[1732584193,-271733879,-1732584194,271733878],w,S,x,O,T,E;for(w=64;w<=N;w+=64)s(C,o(y.subarray(w-64,w)));for(y=w-64<N?y.subarray(w-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<S;w+=1)x[w>>2]|=y[w]<<(w%4<<3);if(x[w>>2]|=128<<(w%4<<3),w>55)for(s(C,x),w=0;w<16;w+=1)x[w]=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(C,x),C}function d(y){var N="",C;for(C=0;C<4;C+=1)N+=r[y>>C*8+4&15]+r[y>>C*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,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var w=this.byteLength,S=y(N,w),x=w,O,T,E,A;return C!==n&&(x=y(C,w)),S>x?new ArrayBuffer(0):(O=x-S,T=new ArrayBuffer(O),E=new Uint8Array(T),A=new Uint8Array(this,S,O),E.set(A),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var C=y.length,w=new ArrayBuffer(C),S=new Uint8Array(w),x;for(x=0;x<C;x+=1)S[x]=y.charCodeAt(x);return N?S:w}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,C){var w=new Uint8Array(y.byteLength+N.byteLength);return w.set(new Uint8Array(y)),w.set(new Uint8Array(N),y.byteLength),w}function v(y){var N=[],C=y.length,w;for(w=0;w<C-1;w+=2)N.push(parseInt(y.substr(w,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,C;for(C=64;C<=N;C+=64)s(this._hash,i(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},b.prototype.end=function(y){var N=this._buff,C=N.length,w,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(w=0;w<C;w+=1)S[w>>2]|=N.charCodeAt(w)<<(w%4<<3);return this._finish(S,C),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 C=N,w,S,x;if(y[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,y),C=0;C<16;C+=1)y[C]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(w[2],16),x=parseInt(w[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 C=l(y),w=f(C);return N?v(w):w},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),C=N.length,w;for(this._length+=y.byteLength,w=64;w<=C;w+=64)s(this._hash,o(N.subarray(w-64,w)));return this._buff=w-64<C?new Uint8Array(N.buffer.slice(w-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,C=N.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<C;S+=1)w[S>>2]|=N[S]<<(S%4<<3);return this._finish(w,C),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 C=c(new Uint8Array(y)),w=f(C);return N?v(w):w},b})}(Id)),Id.exports}var iV=sV();const $9=Je(iV),$n="An error occurred during upload";function La(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const oV=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($n);const c=La(t);c&&(l=new Error(c.message||$n)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=La(t);let c=new Error($n);return l&&(c=new Error(l.message||$n)),e.onError(c)}e.onSuccess(La(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))B9(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},Kv=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,lV=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 uV(n,t),i=[];cV(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=La(l);if(l.status<200||l.status>=300){let d=new Error($n);return c&&(d=new Error(c.message||$n)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},cV=(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",Kv.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=La(p);if(p.status<200||p.status>=300){d(v);let b=new Error($n);v&&(b=new Error(v.message||$n)),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))B9(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},uV=(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(Kv.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 F9(e){return Date.now()+e}const dV=(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=F9(o);const p={uid:h.uid,name:h.name,status:Nr.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=Nr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Nr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Nr.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??F9(o),status:p.status??Nr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},fV=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===Cn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Te({[`${s(er)}`]:!0,[`${s(er)}--${e.theme}`]:!0,[`${s(er)}--disabled`]:e.disabled,[`${s(er)}--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}=dV(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 A=E,_=h(A);if(_){n("error",A,u.value,_);return}e.autoUpload&&w(A,T)}}function N(O,T){n("preview",O,T)}function C(O){S(O.raw)}async function w(O,T){var A;if(!e.beforeUpload)return S(O,T);let E;try{E=await((A=e.beforeUpload)==null?void 0:A.call(e,O,T))}catch{E=!1}if(E===!1){p(O);return}S(O,T)}function S(O,T){const{type:E,headers:A,header:_,data:V,formDataAttributes:R,method:D,withCredentials:M,name:j,url:F,sliceUrl:L,mergeUrl:P,chunkSize:B,customRequest:z}=e,{uid:k}=O,I={type:E,headers:A,header:_,withCredentials:M,file:O,data:V,formDataAttributes:R,method:D,filename:j,action:F,sliceUrl:L,mergeUrl:P,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 W=e.sliceUpload?lV:oV;z&&(W=z);const K=W(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 A=T[E];A==null||A.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:C}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(R9,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(er)}__tip`},[e.tip]),a.createVNode(aV,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:C},{innerTrigger:O=>o.value&&a.createVNode(R9,a.mergeProps(d.value,{file:O,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),Yv=Le(fV),Pd=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:N0,Affix:Hm,Alert:jm,AnimateNumber:zm,Backtop:Um,Badge:qm,Breadcrumb:Gm,Button:Ye,Card:vp,Cascader:Gp,Checkbox:ot,CodeDiff:tg,Collapse:rg,ColorPicker:Sg,ConfigProvider:Fm,Container:Tg,DatePicker:wg,Dialog:Og,Divider:Eg,Dropdown:Lg,Exception:ko,FixedNavbar:Ag,Form:kg,InfoBox:Ig,Input:jn,Link:Rg,Loading:Fn,Menu:$g,Message:qg,Modal:fs,Navigation:Wg,Notify:Kg,OverflowTitle:gp,Pagination:W0,PopConfirm:Yg,Popover:gt,Popover2:Xg,Process:Jg,Progress:Ua,Radio:gi,Rate:tv,ResizeLayout:nv,SearchSelect:cv,Select:A0,Sideslider:dv,Slider:fv,Steps:mv,Swiper:pv,Switcher:gv,Tab:wv,Table:Rv,Tag:Ba,TagInput:jp,TimePicker:Mv,Timeline:$v,Transfer:Fv,Tree:Gv,Upload:Yv,VirtualRender:us,scrollbar:E0},Symbol.toStringTag,{value:"Module"})),H9=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(Pd).forEach(s=>{const i=Pd[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,Pd[s])}),n&&Mf(n,t)},hV={createInstall:H9,install:H9()},Xv="2.0.2-beta.48";window.__bkui_vue_version__=Xv;exports.$bkPopover=N0;exports.Affix=Hm;exports.Alert=jm;exports.AnimateNumber=zm;exports.Backtop=Um;exports.Badge=qm;exports.Breadcrumb=Gm;exports.Button=Ye;exports.Card=vp;exports.Cascader=Gp;exports.Checkbox=ot;exports.CodeDiff=tg;exports.Collapse=rg;exports.ColorPicker=Sg;exports.ConfigProvider=Fm;exports.Container=Tg;exports.DatePicker=wg;exports.Dialog=Og;exports.Divider=Eg;exports.Dropdown=Lg;exports.Exception=ko;exports.FixedNavbar=Ag;exports.Form=kg;exports.InfoBox=Ig;exports.Input=jn;exports.Link=Rg;exports.Loading=Fn;exports.Menu=$g;exports.Message=qg;exports.Modal=fs;exports.Navigation=Wg;exports.Notify=Kg;exports.OverflowTitle=gp;exports.Pagination=W0;exports.PopConfirm=Yg;exports.Popover=gt;exports.Popover2=Xg;exports.Process=Jg;exports.Progress=Ua;exports.Radio=gi;exports.Rate=tv;exports.ResizeLayout=nv;exports.SearchSelect=cv;exports.Select=A0;exports.Sideslider=dv;exports.Slider=fv;exports.Steps=mv;exports.Swiper=pv;exports.Switcher=gv;exports.Tab=wv;exports.Table=Rv;exports.Tag=Ba;exports.TagInput=jp;exports.TimePicker=Mv;exports.Timeline=$v;exports.Transfer=Fv;exports.Tree=Gv;exports.Upload=Yv;exports.VirtualRender=us;exports.bkEllipsis=Lw;exports.bkEllipsisInstance=x0;exports.bkLoading=Ym;exports.bkTooltips=fn;exports.clickoutside=cn;exports.default=hV;exports.defaultRootConfig=lr;exports.mousewheel=Fw;exports.overflowTitle=Gw;exports.provideGlobalConfig=Mf;exports.rootProviderKey=Br;exports.scrollbar=E0;exports.setPrefixVariable=Bd;exports.useGlobalConfig=f7;exports.useLocale=De;exports.usePrefix=fe;exports.version=Xv;