bkui-vue 2.0.1-beta.105 → 2.0.1-beta.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +0 -130
- package/lib/affix/affix.variable.css +1 -261
- package/lib/alert/alert.css +3 -133
- package/lib/alert/alert.variable.css +1 -261
- package/lib/backtop/backtop.css +3 -133
- package/lib/backtop/backtop.variable.css +4 -394
- package/lib/badge/badge.css +26 -156
- package/lib/badge/badge.variable.css +1 -261
- package/lib/breadcrumb/breadcrumb.css +5 -135
- package/lib/breadcrumb/breadcrumb.variable.css +6 -396
- package/lib/button/button.css +143 -273
- package/lib/button/button.variable.css +1 -261
- package/lib/card/card.css +4 -134
- package/lib/card/card.variable.css +5 -395
- package/lib/cascader/cascader.css +23 -153
- package/lib/cascader/cascader.variable.css +24 -414
- package/lib/checkbox/checkbox.css +10 -140
- package/lib/checkbox/checkbox.variable.css +1 -261
- package/lib/code-diff/code-diff.css +0 -130
- package/lib/code-diff/code-diff.variable.css +1 -261
- package/lib/collapse/collapse.css +1 -131
- package/lib/collapse/collapse.variable.css +1 -261
- package/lib/collapse-transition/collapse-transition.css +0 -130
- package/lib/collapse-transition/collapse-transition.variable.css +1 -261
- package/lib/color-picker/color-picker.css +0 -130
- package/lib/color-picker/color-picker.variable.css +1 -261
- package/lib/config-provider/config-provider.css +0 -130
- package/lib/config-provider/config-provider.variable.css +1 -261
- package/lib/container/container.css +0 -130
- package/lib/container/container.variable.css +1 -391
- package/lib/date-picker/date-picker.css +17 -147
- package/lib/date-picker/date-picker.variable.css +1 -261
- package/lib/dialog/dialog.css +8 -138
- package/lib/dialog/dialog.variable.css +9 -399
- package/lib/divider/divider.css +3 -133
- package/lib/divider/divider.variable.css +1 -261
- package/lib/dropdown/dropdown.css +0 -130
- package/lib/dropdown/dropdown.variable.css +1 -391
- package/lib/exception/exception.css +0 -130
- package/lib/exception/exception.variable.css +1 -261
- package/lib/fixed-navbar/fixed-navbar.css +4 -134
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -261
- package/lib/form/form.css +0 -130
- package/lib/form/form.variable.css +1 -261
- package/lib/image/image-viewer.css +0 -130
- package/lib/image/image-viewer.variable.css +1 -261
- package/lib/image/image.css +0 -130
- package/lib/image/image.variable.css +1 -391
- package/lib/index.js +1 -1
- package/lib/info-box/info-box.css +4 -134
- package/lib/info-box/info-box.variable.css +1 -261
- package/lib/input/input.css +75 -205
- package/lib/input/input.variable.css +76 -466
- package/lib/link/link.css +16 -146
- package/lib/link/link.variable.css +1 -261
- package/lib/loading/loading.css +16 -146
- package/lib/loading/loading.variable.css +17 -407
- package/lib/menu/menu.css +20 -150
- package/lib/menu/menu.variable.css +21 -411
- package/lib/menu/submenu.css +0 -130
- package/lib/menu/submenu.variable.css +1 -261
- package/lib/message/message.css +21 -151
- package/lib/message/message.variable.css +1 -261
- package/lib/modal/modal.css +4 -134
- package/lib/modal/modal.variable.css +5 -395
- package/lib/navigation/navigation.css +2 -132
- package/lib/navigation/navigation.variable.css +1 -261
- package/lib/notify/notify.css +7 -137
- package/lib/notify/notify.variable.css +1 -261
- package/lib/pagination/pagination.css +1 -131
- package/lib/pagination/pagination.variable.css +1 -261
- package/lib/pop-confirm/pop-confirm.css +0 -130
- package/lib/pop-confirm/pop-confirm.variable.css +1 -261
- package/lib/popover/popover.css +0 -130
- package/lib/popover/popover.variable.css +1 -261
- package/lib/process/process.css +13 -143
- package/lib/process/process.variable.css +1 -261
- package/lib/progress/progress.css +4 -134
- package/lib/progress/progress.variable.css +5 -395
- package/lib/radio/radio.css +42 -172
- package/lib/radio/radio.variable.css +1 -261
- package/lib/rate/rate.css +0 -130
- package/lib/rate/rate.variable.css +1 -261
- package/lib/resize-layout/resize-layout.css +0 -130
- package/lib/resize-layout/resize-layout.variable.css +1 -261
- package/lib/scrollbar/css/scrollbar.css +0 -130
- package/lib/scrollbar/css/scrollbar.variable.css +1 -261
- package/lib/search-select/search-select.css +33 -163
- package/lib/search-select/search-select.variable.css +34 -424
- package/lib/select/select.css +39 -169
- package/lib/select/select.variable.css +40 -430
- package/lib/sideslider/sideslider.css +1 -131
- package/lib/sideslider/sideslider.variable.css +1 -261
- package/lib/slider/slider.css +5 -135
- package/lib/slider/slider.variable.css +1 -261
- package/lib/steps/steps.css +38 -168
- package/lib/steps/steps.variable.css +1 -261
- package/lib/styles/mixins/animate.css +0 -130
- package/lib/styles/mixins/animate.variable.css +1 -261
- package/lib/styles/mixins/mixins.css +0 -130
- package/lib/styles/mixins/mixins.variable.css +0 -130
- package/lib/styles/mixins/popper.css +0 -130
- package/lib/styles/mixins/popper.variable.css +1 -261
- package/lib/styles/mixins/scroll.css +0 -130
- package/lib/styles/mixins/scroll.variable.css +1 -261
- package/lib/styles/reset.css +0 -130
- package/lib/styles/reset.variable.css +1 -261
- package/lib/styles/themes/themes.less +130 -299
- package/lib/swiper/swiper.css +0 -130
- package/lib/swiper/swiper.variable.css +1 -261
- package/lib/switcher/switcher.css +17 -147
- package/lib/switcher/switcher.variable.css +18 -408
- package/lib/tab/tab.css +26 -156
- package/lib/tab/tab.variable.css +1 -261
- package/lib/table/plugins/head-filter.css +0 -130
- package/lib/table/plugins/head-filter.variable.css +1 -261
- package/lib/table/plugins/head-sort.css +0 -130
- package/lib/table/plugins/head-sort.variable.css +1 -261
- package/lib/table/plugins/settings.css +0 -130
- package/lib/table/plugins/settings.variable.css +1 -261
- package/lib/table/table.css +189 -319
- package/lib/table/table.variable.css +190 -580
- package/lib/tag/tag.css +5 -135
- package/lib/tag/tag.variable.css +1 -261
- package/lib/tag-input/tag-input.css +18 -148
- package/lib/tag-input/tag-input.variable.css +1 -261
- package/lib/time-picker/time-picker.css +0 -130
- package/lib/time-picker/time-picker.variable.css +1 -261
- package/lib/timeline/timeline.css +19 -149
- package/lib/timeline/timeline.variable.css +1 -261
- package/lib/transfer/transfer.css +19 -149
- package/lib/transfer/transfer.variable.css +1 -261
- package/lib/tree/tree.css +10 -140
- package/lib/tree/tree.variable.css +11 -401
- package/lib/upload/upload.css +27 -157
- package/lib/upload/upload.variable.css +28 -418
- package/lib/virtual-render/virtual-render.css +0 -130
- package/lib/virtual-render/virtual-render.variable.css +1 -391
- package/package.json +1 -1
- package/lib/styles/themes/themes.css +0 -130
- package/lib/styles/themes/themes.variable.css +0 -130
package/dist/index.cjs.js
CHANGED
@@ -384,4 +384,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
384
384
|
m 0 ${w?"":"-"}${N}
|
385
385
|
a ${N} ${N} 0 1 1 0 ${w?"-":""}${N*2}
|
386
386
|
a ${N} ${N} 0 1 1 0 ${w?"":"-"}${N*2}
|
387
|
-
`,D={d:L,stroke:f||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:T},V={d:L,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":o>0&&y||0,"fill-opacity":"0",class:`process-circle-path ${r(`${h}-circle-trail`)}`,style:k};return a.createVNode("div",{style:C,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",D,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:g,class:"progress-circle-text"},[n==null?void 0:n.default()])])},aK=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=_e(),{percent:s,strokeWidth:o,size:c,color:u,titleStyle:d,showText:h,textInside:m,theme:f}=t,g={height:`${o}px`,lineHeight:`${o}px`},y={width:`${s}%`,background:u,animationDuration:"3s"},b=(C=!0)=>(h||n.default)&&(C&&m||!C&&!m)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:g,class:`${r(`progress-${c||"normal"}`)} progress-bar`},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`${r(`${f}`)}`]:!0}},[a.createVNode("div",{style:d,class:"inner-text"},[b()])])]),b(!1)])};function Am(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const sK={extCls:v.string,type:yS(),percent:v.number.def(0),theme:v.theme().def(_u.PRIMARY),size:v.size(),width:v.number.def(126),strokeWidth:v.number,strokeLinecap:vS(),textInside:v.bool.def(!1),showText:v.bool.def(!0),color:v.string,bgColor:v.string,fixed:v.number.validate(e=>e>=0&&e<=20).def(0),format:v.func.def(e=>`${e}%`),titleStyle:v.object.def({fontSize:"16px",verticalAlign:"middle"})},iK=a.defineComponent({name:"Progress",props:sK,setup(){const{resolveClassName:e}=_e();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var u;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:o}=this.$props,c=t((u=this.validPercent(n))==null?void 0:u.toFixed(o));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||r?null:a.createVNode("span",{style:typeof c=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(aK,t,Am(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(rK,t,Am(e)?e:{default:()=>[e]}));const r={class:Ue({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),Ho=Ze(iK),E4=Symbol("RadioGroup");function O4(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const L4=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(E4,Vg),s=!Dg(r),o=a.ref(!1),c=a.ref(!1),u=a.ref("default"),d=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(u.value=r.props.size,a.watch(()=>r.props.modelValue,f=>{o.value=f===t.label},{immediate:!0})):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const h=(f=!0)=>{o.value=f},m=f=>{if(d.value||c.value)return;const g=f.target,y=g.checked;Promise.resolve(s?r.props.beforeChange(y):t.beforeChange(y)).then(b=>{if(b){o.value=g.checked;const C=o.value?t.label:"";return n("update:modelValue",C),n("change",C),s&&r.handleChange(e.proxy),a.nextTick(()=>{g.checked!==o.value&&(g.checked=o.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{g.checked=o.value}).finally(()=>{c.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:u,isChecked:o,isDisabled:d,setChecked:h,handleChange:m}},oK={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),beforeChange:Ci().def(()=>!0)},lK=a.defineComponent({name:"Radio",props:oK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=O4(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:u}=L4(),{resolveClassName:d}=_e();return{size:r,isFocused:e,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:u,resolveClassName:d}},render(){const e=Ue({[`${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()])}}),cK={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),size:v.size(),beforeChange:Ci().def(()=>!0)},uK=a.defineComponent({name:"RadioButton",props:cK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=O4(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:u}=L4(),{resolveClassName:d}=_e();return{isFocused:e,size:r,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:u,resolveClassName:d}},render(){const e=Ue({[`${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()])}}),dK={name:v.string.def(""),modelValue:v.oneOfType([v.bool,v.string,v.number]),disabled:v.bool,withValidate:v.bool.def(!0),type:v.oneOf(["tab","capsule","card"]).def("tab"),size:v.size(),beforeChange:Ci().def(()=>!0)},fK=a.defineComponent({name:"RadioGroup",props:dK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=dr(),r=[],s=d=>{r.push(d)},o=d=>{const h=r.indexOf(d);h>-1&&r.splice(h,1)},c=d=>{const h=d.label;r.forEach(m=>{m!==d&&m.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};a.provide(E4,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(d=>{d.setChecked(d.label===e.modelValue)})});const{resolveClassName:u}=_e();return{resolveClassName:u}},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()])}}),cu=ln(lK,{Group:fK,Button:uK}),bc=a.defineComponent({name:"Star",props:{rate:v.number.def(0),width:v.number.def(16),height:v.number.def(16),editable:v.bool.def(!0),hoverRate:v.number.def(0),max:v.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=h=>{if(!e.editable)return;const m=h+1;t("chooseRate",m)},r=(h,m)=>{if(!e.editable)return;const f=h+1;t("changeHover",f),a.nextTick(()=>{m.target.classList.add(o("is-hover"))})},s=h=>{e.editable&&a.nextTick(()=>{h.target.classList.remove(o("is-hover"))})},{resolveClassName:o}=_e(),c=h=>Ue({[`${o("is-select")}`]:h<Math.floor(u.value),[`${o("is-edit")}`]:e.editable,[`${o("rate-star")}`]:!0}),u=a.computed(()=>e.hoverRate||e.rate),d={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${o("rate-stars")}`},[Array(e.max).fill(1).map((h,m)=>a.createVNode("svg",{style:d,class:c(m),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(m),onMouseenter:f=>r(m,f),onMouseleave:f=>s(f)},[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)])])])])]))])}}),hK=a.defineComponent({name:"Rate",components:{star:bc},props:{modelValue:v.number.def(0),size:v.size(),editable:v.bool.def(!0),withValidate:v.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=_e(),r=dr(),s=a.ref(0),o=g=>{e.editable&&(t("update:modelValue",g),t("change",g))},c=g=>{s.value=g,t("hover-change",g)},u=Ue({[`${n("rate")}`]:!0}),h={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},m=a.computed(()=>{const g=Math.floor(e.modelValue),y=(h.width+3)*g,b=h.width*(e.modelValue-g);return{width:`${y+b}px`}}),f={width:h.width,height:h.height};return a.watch(()=>e.modelValue,()=>{var g;e.withValidate&&((g=r==null?void 0:r.validate)==null||g.call(r,"change"))}),()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(bc,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:c,onChooseRate:o,onMouseleave:()=>c(0)},f),null):[a.createVNode(bc,a.mergeProps({style:m.value,class:`${n("score-real")}`,editable:!1,rate:5},f),null),a.createVNode(bc,a.mergeProps({editable:!1,rate:0},f),null)]])}}),A4=Ze(hK),mK=a.defineComponent({name:"ResizeLayout",props:{placement:v.placement().def("left"),min:v.number.def(3),max:v.number.def(1/0),triggerWidth:v.number.def(5),triggerOffset:v.number.def(3),initialDivide:v.oneOfType([String,Number]).def("20%"),immediate:v.bool,disabled:v.bool,collapsible:v.bool,isCollapsed:v.bool.def(!1),autoMinimize:v.oneOfType([Boolean,Number]).def(!1),border:v.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:o,max:c,min:u,immediate:d,autoMinimize:h,collapsible:m,isCollapsed:f}=a.toRefs(e),g=a.ref(f.value),y=a.ref(!0),b=a.ref(!1),C=a.ref(null),N=a.ref({}),w=a.ref(null),E=a.ref(null),x=a.ref(null),_=a.ref(null),O=a.computed(()=>["left","right"].includes(n.value)),T=a.computed(()=>O.value?"width":"height"),k=a.computed(()=>{let R=r.value;return u.value!==3&&typeof R!="number"?`${u.value}px`:(typeof R=="number"&&(R=R<=u.value?`${u.value}px`:`${R}px`),R)}),L=a.computed(()=>m.value&&f.value?{[T.value]:"0px"}:{[T.value]:k.value}),D=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[T.value]:`${o.value}px`})),V=a.computed(()=>h.value?typeof h.value=="boolean"?50:h.value:0),A=()=>{const R=w.value.getBoundingClientRect();C.value=O.value?R.width:R.height};let I=new ResizeObserver(A);const W=()=>{switch(E.value.style.visibility="visible",n.value){case"left":E.value.style.inset=`0 auto auto ${N.value.aside.width}px`;break;case"right":E.value.style.inset=`0 ${N.value.aside.width}px auto auto`;break;case"top":E.value.style.inset=`${N.value.aside.height}px auto auto 0`;break;case"bottom":E.value.style.inset=`auto auto ${N.value.aside.height}px 0`;break}},B=()=>{x.value.style.display="block",x.value.style.cursor=O.value?"col-resize":"row-resize"},U=R=>Math.min(c.value,Math.max(u.value,R),C.value-o.value),K=R=>{t("before-resize",R);const z=_.value.getBoundingClientRect();N.value=Object.freeze({mouse:{clientX:R.clientX,clientY:R.clientY},aside:{width:z.width,height:z.height}}),B(),d.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=Y=>{t("resizing",Y)},ne=Y=>{let de;switch(n.value){case"top":de=Y.clientY-N.value.mouse.clientY;break;case"right":de=N.value.mouse.clientX-Y.clientX;break;case"bottom":de=N.value.mouse.clientY-Y.clientY;break;case"left":de=Y.clientX-N.value.mouse.clientX}const se=N.value.aside[T.value]+de,pe=U(se)+s.value,ve=`${pe}px`;d.value?_.value.style[T.value]=ve:E.value.style[n.value]=ve,Q(pe)},oe=()=>{if(E.value.style.visibility="hidden",x.value.style.display="none",document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",oe),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{j(),t("after-resize",parseFloat(E.value.style[n.value]))}),d.value)return!1;_.value.style[T.value]=E.value.style[n.value]};document.addEventListener("mousemove",ne),document.addEventListener("mouseup",oe)},j=()=>{if(!h.value)return!1;const R=_.value.getBoundingClientRect();if(b.value=g.value=R[T.value]<=V.value,!b.value)return y.value=!0,!1;ee(),a.nextTick(()=>{_.value.setAttribute(`data-${T.value}`,L.value[T.value])})},P=R=>{g.value=typeof R=="boolean"?R:!g.value,ee(),t("collapse-change",g.value)},ee=()=>{const R=_.value.getBoundingClientRect();J(!g.value),g.value?(_.value.setAttribute(`data-${T.value}`,`${R[T.value]}px`),_.value.style[T.value]=e.collapsible?"0px":"5px"):(y.value=!0,_.value.style[T.value]=_.value.getAttribute(`data-${T.value}`)||k.value)},J=R=>{const z=()=>{y.value=R,_.value.style.transition="",_.value.removeEventListener("transitionend",z)};_.value.addEventListener("transitionend",z),_.value.style.transition=`${T.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(f,()=>{g.value=f.value,P(g.value)}),a.onMounted(()=>{I.observe(w.value)}),a.onBeforeUnmount(()=>{w.value&&(I.unobserve(w.value),I=null)});const{resolveClassName:q}=_e();return{collapsed:g,asideContentVisible:y,minimized:b,limitMax:C,state:N,vertical:O,cssPropKey:T,bkResizeLayoutRef:w,resizeProxyRef:E,resizeMaskRef:x,asideRef:_,triggerStyle:D,asideStyle:L,handleMousedown:K,setCollapse:P,resolveClassName:q}},render(){var t,n,r,s,o,c;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(kn,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(cr,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),$4=Ze(mK);var d0=null;function gK(e){return d0||(d0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),d0(e)}var f0=null;function pK(e){f0||(f0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),f0(e)}function vK(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 wc(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function V4(e,t,n){var r=window.getComputedStyle(e,n||null)||{display:"none"};return r[t]}function eh(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(V4(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var yK='.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%}',th=0,Fc=null;function bK(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=NK.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||uu(e)}),c=eh(e),u=c.detached,d=c.rendered;e.__resize_observer_triggered__=u===!1&&d===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){uu(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(th||(Fc=vK(yK)),xK(e),e.__resize_rendered__=eh(e).rendered,window.MutationObserver){var h=new MutationObserver(e.__resize_mutation_handler__);h.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=h}}e.__resize_listeners__.push(t),th++}function wK(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",I2),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--th&&Fc&&Fc.parentNode.removeChild(Fc)}}function CK(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==r?{width:s,height:o}:null}function NK(){var e=eh(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(P2(this),this.addEventListener("scroll",I2,!0)),this.__resize_rendered__=t,uu(this))}function I2(){var e=this;P2(this),this.__resize_raf__&&pK(this.__resize_raf__),this.__resize_raf__=gK(function(){var t=CK(e);t&&(e.__resize_last__=t,uu(e))})}function uu(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function xK(e){var t=V4(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=wc("div",{className:"resize-triggers"}),r=wc("div",{className:"resize-expand-trigger"}),s=wc("div"),o=wc("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:o},P2(e),e.addEventListener("scroll",I2,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function P2(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,o=s.scrollWidth,c=s.scrollHeight,u=n.offsetWidth,d=n.offsetHeight,h=n.scrollWidth,m=n.scrollHeight;s.scrollLeft=o,s.scrollTop=c,r.style.width=u+1+"px",r.style.height=d+1+"px",n.scrollLeft=h,n.scrollTop=m}var Yn=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(Yn||{});const D4=Symbol("SEARCH_SELECT_PROVIDER_KEY"),_K=e=>{a.provide(D4,e)},k4=()=>a.inject(D4);var La=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(La||{});const I4=/(\||,|、|\r\n|\n)/gm,P4=/^(\||,|、|\r\n|\n)$/;var bi=(e=>(e.AND="&",e.OR="|",e))(bi||{});class Js{constructor(t,n="default"){$e(this,"id");$e(this,"name");$e(this,"values",[]);$e(this,"condition");$e(this,"logical");$e(this,"nameRenderKey",us(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=us(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(o=>o.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),o=r(s);return[{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}]}return n.map(s=>{const o=this.values.find(u=>u.name===s);if(o)return o;const c=r(s);return{id:c?c.id:s,name:c?c.name:s,disabled:!!(c!=null&&c.disabled)}})}addValues(t,n=!0){const r=t.split(I4).filter(u=>u.trim()&&!P4.test(u)),s=n?this.values.map(u=>u.name):[],c=[...r,...s].filter(u=>u.trim()).join(this.logical);this.values=this.str2Values(c)}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 SK=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:bi.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=_e(),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),o=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function c(b){t("selectItem",b)}function u(b){t("selectCondition",b)}function d(b){t("footerClick",b)}const h=a.computed(()=>{var b,C;return(b=e.list)!=null&&b.length?(C=e.keyword)!=null&&C.length?e.list.filter(N=>N.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function m(b){if(!b)return b;let{keyword:C}=e;const N=C.length;if(!(C!=null&&C.trim().length)||!b.toLocaleLowerCase().includes(C.toLocaleLowerCase()))return b;const w=[];let E=-1;return C=C.replace(/([.*/]{1})/gim,"\\$1"),b.replace(new RegExp(`${C}`,"igm"),(x,_)=>(w.length===0&&_!==0?w.push(b.slice(0,_)):E>=0&&w.push(b.slice(E+x.length,_)),w.push(a.createVNode("span",{class:"is-keyword"},[x])),E=_,x)),E>=0&&w.push(b.slice(E+N)),w.length?w:b}function f(b){var C;return(C=b.value)!=null&&C.name?[a.createVNode("span",{class:"menu-name"},[b.name,a.createTextVNode(":")]),b.value.name]:m(b.name)}function g(b,C){b.stopPropagation(),b.preventDefault(),c(C)}function y(b){t("update:logical",b)}return{handleClick:c,handleClickCondition:u,handleClickFooterBtn:d,handleSelectedChange:g,handleLogicalChange:y,filterList:h,getSearchNode:f,localFooterBtns:s,resolveClassName:r,resolveContentStyles:o,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:o=>this.handleSelectedChange(o,s)},[a.createVNode(on,{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(cu,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(cu,{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()])}}),M4=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Ir},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:La.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=dt("searchSelect"),{resolveClassName:s}=_e(),o=a.ref(null),c=a.ref(null),u=a.ref(""),d=a.ref(!1),h=a.ref(!1),m=a.ref(!1),f=a.ref(e.defaultUsingItem),g=a.ref(""),y=a.ref(!1),b=jo(100,Q);let C=!1;const N=a.ref([]),w=a.ref([]),{editKey:E,onValidate:x,searchData:_}=k4(),O=a.computed(()=>{var te;return((te=f.value)==null?void 0:te.logical)||bi.OR}),T=a.ref(us(10));a.watch(E,()=>{e.mode===La.DEFAULT&&E.value&&(m.value=!1)}),a.watch([w,m],()=>{var ce,F;m.value&&((ce=w.value)==null?void 0:ce.some(G=>!G.disabled))?C||(g.value=e.valueBehavior===Yn.NEED_KEY&&((F=w.value.find(G=>!G.disabled))==null?void 0:F.id)||"",C=!0,document.addEventListener("keydown",k)):(document.removeEventListener("keydown",k),C=!1,e.valueBehavior!==Yn.NEED_KEY&&(g.value=""))});function k(te){switch(te.code){case"ArrowDown":case"ArrowUp":L(te);break;case"Enter":case"NumpadEnter":D(te);break}}function L(te){var G;te.preventDefault(),(G=o.value)==null||G.blur();const ce=w.value.length;let F=w.value.findIndex(ye=>ye.id===g.value);for(let ye=0;ye<ce;ye++){F=(F+(te.code==="ArrowDown"?1:-1)+ce)%ce;const ge=w.value[F];if(ge&&!ge.disabled){const X=document.getElementById(ge.id);X==null||X.focus(),g.value=ge.id;break}}}function D(te){var F;if(!C)return;te.preventDefault();const ce=(F=w.value)==null?void 0:F.find(G=>G.id===g.value);ce&&P(ce)}function V(te){var ce,F,G;if(!((ce=c.value)!=null&&ce.contains(te.target)||!((F=e.clickOutside)!=null&&F.call(e,te.target,c.value)))){if((G=f.value)!=null&&G.isCustomMenu){e.mode===La.EDIT&&(K().then(ye=>ye&&pe()),m.value=!1);return}if(e.mode===La.EDIT||f.value){f.value&&K().then(ye=>ye&&pe()),f.value||t("focus",!1);return}h.value=!1,m.value=!1,t("focus",h.value)}}let A=!1;function I(te){if(!A){if(d.value=!1,e.mode===La.EDIT&&f.value&&!h.value){const ce=Array.from(o.value.querySelectorAll(`[data-type="${f.value.values.length?"value":f.value.type}"]`));if(!ce.length)return;te==null||te.preventDefault();const F=document.createRange(),G=window.getSelection();F.selectNodeContents(ce.at(-1)),G==null||G.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),G.addRange(F),de(!0,!1);return}Q(),de(!1,!h.value)}}function W(te){te.preventDefault();const ce=te.clipboardData.getData("text").trim();if(!f.value){const F=ve(ce);if(F){f.value=F,de(!0,!0);return}u.value=ce.split(I4).filter(G=>G.trim()&&!P4.test(G)).join(` ${O.value} `),o.value.innerText=u.value,de(),b();return}f.value.addValues(ce),b()}function B(te){const ce=te.target.innerText.trim();if(f.value){if(f.value&&!ce){T.value=us(10),g.value="",f.value=null,u.value="",setTimeout(()=>{de(!0,!0),a.nextTick(Y)},200);return}}else{u.value=ce,b();return}u.value=f.value.isSpecialType()?ce:ce.replace(f.value.name,"").replace(":","").trim(),b()}function U(te){var ce;switch(te.code){case"Enter":case"NumpadEnter":if(e.valueBehavior===Yn.NEED_KEY&&w.value.some(F=>F.id===g.value)){!f.value&&((ce=u.value)!=null&&ce.length)&&te.preventDefault();return}K(te).then(F=>F&&pe());break;case"Backspace":j(te);default:d.value=!1;break}}async function K(te){var F,G,ye;return te==null||te.preventDefault(),await new Promise(ge=>setTimeout(ge,0)),f.value?u.value?await oe():!((F=f.value)!=null&&F.isSpecialType())&&((G=f.value)==null?void 0:G.values.length)<1?(d.value=!d.value,!1):(await z()&&((ye=f.value)!=null&&ye.isCustomMenu&&(m.value=!1),se()),!1):!u.value||e.valueBehavior===Yn.NEED_KEY?void 0:await ne()}function j(te){var ce,F,G;if(!f.value&&!u.value){g.value="",t("delete"),setTimeout(Q,16);return}if((ce=f.value)!=null&&ce.values.length){if(f.value.type==="text"||!((F=f.value.children)!=null&&F.length))return;te.preventDefault();const ye=window.getSelection();if((ye==null?void 0:ye.rangeCount)>0){let fe=ye.getRangeAt(0).startContainer;for(;fe&&fe.parentNode!==o.value;)fe=fe.parentNode;const Ne=((G=fe==null?void 0:fe.dataset)==null?void 0:G.index)||-1;f.value.values.splice(+Ne,1),u.value="",de(!1,!1);return}}else u.value||(f.value=null,u.value="",Q());x("")}async function P(te,ce){var F,G,ye,ge,X;if((F=te.value)!=null&&F.id){const fe=new Js({...te,id:te.realId??te.id},ce);if(fe.addValues(te.value.name,!1),e.valueBehavior===Yn.NEED_KEY&&g.value){se(fe),de(!0),g.value="";return}if(f.value=fe,!await z(f.value.values)){f.value=null;return}se(f.value),de(!0),g.value="";return}if(!f.value||((G=f.value)==null?void 0:G.type)==="condition"){f.value=new Js(te,ce??((ye=f.value)==null?void 0:ye.type)),u.value="";const fe=((ge=f.value)==null?void 0:ge.type)==="condition";fe||t("selectKey",{id:te.id,name:te.name,values:[]}),fe&&se(),m.value=fe||!!f.value.children.length,de(e.valueBehavior===Yn.NEED_KEY&&!!g.value),typeof e.getMenuList=="function"&&a.nextTick(Y);return}f.value&&(f.value.addValue(te),a.nextTick(ie)),await z(f.value.values)&&(f.value.multiple||se(),e.valueBehavior===Yn.NEED_KEY&&((X=f.value)!=null&&X.multiple)&&de())}function ee(te){P(te,"condition")}function J(te){var ce;switch(te.id){case"confirm":if(!((ce=f.value)!=null&&ce.values.length))return;u.value="",K();break;case"cancel":f.value.values=[],m.value=!1;break}}function q(te){f.value&&(f.value.logical=te)}async function R(te,ce){if(typeof e.validateValues=="function"){let F="";try{F=await e.validateValues(te??null,ce)}catch{F=!1}if(typeof F=="string"||F===!1)return x(F||"校验错误"),!1}return x(""),!0}async function z(te){if(!f.value)return await R(null,te);const{searchItem:ce,validate:F,values:G}=f.value;return F&&typeof e.validateValues=="function"?await R(ce,te??G):(x(""),!0)}async function Q(){var ce,F,G,ye,ge;let te=[];if(typeof e.getMenuList=="function"&&(!((ce=e.data)!=null&&ce.length)&&!f.value||f.value&&f.value.type!=="condition"&&(((F=f.value.searchItem)==null?void 0:F.async)===void 0||f.value.searchItem.async===!0)))y.value=!0,te=await e.getMenuList((G=f.value)==null?void 0:G.searchItem,u.value).catch(()=>[]),y.value=!1;else if(f!=null&&f.value)f.value.type==="condition"?te=e.conditions:(!((ge=f.value.values)!=null&&ge.length)||f.value.multiple||e.mode===La.EDIT)&&(te=f.value.children.filter(X=>X.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())));else if(!((ye=u.value)!=null&&ye.length))te=e.data.filter(X=>!X.isSelected).slice();else for(const X of e.data.filter(fe=>!fe.isSelected))if(X.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())){te.push(X);const Ne=[];for(const Le of X.children||[])Ne.push({...X,realId:X.id,id:us(10),value:Le});!Ne.length&&!X.onlyRecommendChildren&&Ne.push({...X,realId:X.id,id:us(10),value:{id:u.value,name:u.value}}),te.push(...Ne)}else{const Ne=[];for(const Le of X.children||[])Le.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())&&Ne.push({...X,realId:X.id,id:us(10),value:Le});!Ne.length&&!X.onlyRecommendChildren&&Ne.push({...X,value:{id:u.value,name:u.value}}),te.push(...Ne)}if(w.value=te,e.valueBehavior===Yn.NEED_KEY){const X=te.find(fe=>!fe.disabled);X&&(!g.value||g.value&&!te.some(fe=>fe.id===g.value))&&(g.value=X.id)}}async function ne(){const te=ve(u.value),ce=(te==null?void 0:te.values)||[{id:u.value,name:u.value}];if(await z(ce))return t("add",te||new Js({...ce[0]},"text")),u.value="",Q(),!0}async function oe(){let te=[];if(f.value.isSpecialType()){const F=ve(u.value);F&&(f.value=F,te=F.values)}if(te=te.length?te:f.value.str2Values(u.value),!!await z(te))return f.value.type==="text"?(f.value.name=u.value,f.value.id=u.value):f.value.values=te,t("add",f.value),u.value="",f.value=null,de(!0),!0}function Y(){if(!o.value)return;const te=document.createRange(),ce=window.getSelection();te.selectNodeContents(o.value),te.collapse(!1),ce.removeAllRanges(),ce.addRange(te)}function de(te=!1,ce=!0){te&&setTimeout(Q,16),h.value=!0,m.value=!0,d.value=!1,!e.getMenuList&&ce&&a.nextTick(Y),t("focus",h.value)}function se(te){var F;t("add",te??f.value);const ce=!((F=f.value)!=null&&F.isCustomMenu);f.value=null,u.value="",ce&&(de(!0,ce),a.nextTick(pe))}function pe(){o.value&&(u.value="",a.nextTick(()=>o.value.innerText=""))}function ve(te){const[ce,F]=te.split(":");if(ce!=null&&ce.trim()){const G=_.value.find(ye=>ye.name===ce.trim());if(G){const ye=new Js({...G},"default");return ye.addValues(F),ye}}}function ie(){var te;(te=u.value)!=null&&te.length&&(u.value="",Array.from(o.value.childNodes).forEach(F=>{var G;F.nodeType===Node.TEXT_NODE&&((G=F.textContent)!=null&&G.trim())&&o.value.removeChild(F)}))}function le(){var te;(te=o.value)==null||te.focus()}async function re(){await K().then(te=>te&&pe()),m.value=!1,o.value.blur()}function be(){u.value="",d.value=!1,m.value=!1,f.value=null,a.nextTick(pe)}function ae(te){f.value.values=[{id:te,name:te}],K().then(ce=>ce&&pe())}function Ce(){f.value||(g.value="")}return n({inputFocusForWrapper:le,inputEnterForWrapper:re,inputClearForWrapper:be,handleInputFocus:I,isFocus:h,refleshMenuHover:Ce}),{popoverRef:c,inputRef:o,keyword:u,loading:y,remoteMenuList:N,menuList:w,menuHoverId:g,isFocus:h,usingItem:f,showPopover:m,showNoSelectValueError:d,debounceSetMenuList:b,documentArrowEvent:L,handleClickOutside:V,handleInputFocus:I,handleInputChange:B,handleInputPaste:W,handleLogicalChange:q,handleInputKeyup:U,handleSelectItem:P,handleSelectConditionItem:ee,handleMenuFooterClick:J,resolveClassName:s,inputFocusForWrapper:le,inputEnterForWrapper:re,inputClearForWrapper:be,deleteInputTextNode:ie,customPanelSubmit:ae,refleshMenuHover:Ce,t:r,inputKey:T}},render(){var m,f;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},o=!((m=this.keyword)!=null&&m.length)&&!(t!=null&&t.length)&&n,c=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((f=this.menuList)!=null&&f.length)),u=!this.usingItem&&this.showCondition,d=()=>{var g,y,b,C;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((g=this.keyword)!=null&&g.length),"input-after":o},contenteditable:!0,"data-placeholder":!r&&!this.keyword?this.placeholder:"","data-tips":n||"",spellcheck:"false",onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((y=this.usingItem)==null?void 0:y.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:N=>N.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(C=(b=this.usingItem)==null?void 0:b.values)==null?void 0:C.map((N,w)=>a.createVNode("span",{key:w,"data-id":N.id,"data-index":w,"data-key":N.name,"data-type":"value"},[N.name,w<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},h=()=>{var g,y,b,C,N;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(g=this.usingItem)!=null&&g.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(y=this.usingItem.values)==null?void 0:y[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(b=this.menuList)!=null&&b.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(SK,{conditions:u?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(C=this.usingItem)==null?void 0:C.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(w=>w.id))||[],showLogical:(N=this.usingItem)==null?void 0:N.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Cn,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:c,placement:"bottom-start",theme:"light",trigger:"manual"},{default:d,content:h})}}),TK=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:o,onEditBlur:c,editKey:u}=k4();function d(b){t("delete",b)}function h(b,C,N){b.preventDefault(),b.stopPropagation(),s(C,N),t("selectKey",{id:C.id,name:C.name,values:C.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function m(b,C){o(b,C)}function f(b){b||c()}function g(b){var C;return!((C=r.value)!=null&&C.contains(b))}function y(b){const C=new Js(b.searchItem,b.type);return C.values=b.values.slice(),C.logical=b.logical||bi.OR,C}return{inputRef:n,selectedInputRef:r,editKey:u,copySelectedItem:y,handleDeleteSelected:d,handleEditSelected:h,handleInputOutside:g,handleAddSelected:m,handleInputFocus:f}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(M4,{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:La.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(sn,{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)])])}}),h0=40,$m=6,Vm=26,EK=32,OK={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:EK*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:Yn.ALL,validator(e){return[Yn.ALL,Yn.NEED_KEY].includes(e)}}},LK=a.defineComponent({name:"SearchSelect",directives:{clickoutside:Ir},props:OK,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=_e(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),o=a.ref(null),c=a.ref(null),u=a.ref(!1),d=a.ref([]),h=a.ref(-1),m=jo(32,E),f=a.ref(""),g=a.ref(""),y=a.shallowRef([]);a.watch(()=>e.data,()=>{y.value=JSON.parse(JSON.stringify(e.data));for(const A of y.value||[])A.isSelected=e.uniqueSelect&&e.modelValue.some(I=>I.id===A.id)},{immediate:!0}),a.watch(()=>e.modelValue,A=>{var W;if(!(A!=null&&A.length)){d.value=[];for(const B of y.value||[])B.isSelected=!1;return}const I=[];for(const B of A){const U=d.value.find(K=>K.id===B.id&&K.name===B.name);if((U==null?void 0:U.toValueKey())===JSON.stringify(B))U.values=B.values||[],U.logical=B.logical||bi.OR,I.push(U);else{let K=e.data.find(ee=>ee.id===B.id),j="default";K||(K=e.conditions.find(ee=>ee.id===B.id),K&&(j="condition")),!K&&!((W=B.values)!=null&&W.length)&&(j="text");const P=new Js(K||B,j);P.values=B.values||[],P.logical=B.logical||bi.OR,I.push(P)}}d.value=I,y.value=JSON.parse(JSON.stringify(e.data||[]));for(const B of y.value)B.isSelected=e.uniqueSelect&&!!I.some(U=>U.id===B.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{bK(c.value.querySelector(`.${r("search-select-container")}`),m),m()}),a.onBeforeUnmount(()=>{wK(c.value.querySelector(`.${r("search-select-container")}`),m)}),_K({onEditClick:b,onEditEnter:C,onEditBlur:N,onValidate:w,editKey:f,searchData:a.computed(()=>e.data),isClickOutside:O});function b(A,I){f.value=`${A.id}_${I}`}function C(A,I){const W=d.value.slice();W.splice(I,1,A),t("update:modelValue",W.map(B=>B.toValue())),f.value=""}function N(){f.value="",w("")}function w(A){g.value=A||""}function E(){if(u.value||d.value.length<1){h.value=-1;return}const A=c.value.querySelector(`.${r("search-select-container")}`),I=c.value.querySelector(".search-container").clientWidth-$m-2,W=A.querySelectorAll(".search-container-selected:not(.overflow-selected)");let B=0,U=0,K=0;for(;U===0&&B<=I-h0&&K<=W.length-1;){const j=W[K];if(j.clientHeight>Vm){h.value=K;return}B+=j?j.clientWidth+$m:0,B>=I-h0&&(U=K),K+=1}if(U===W.length-1&&B<=I){h.value=-1;return}h.value=B>=I-h0?U:U-1}function x(){f.value||o.value.inputFocusForWrapper()}function _(){d.value=[],h.value=-1,o.value.inputClearForWrapper(),t("update:modelValue",[])}function O(A){var I;return!((I=c.value)!=null&&I.contains(A))}function T(A){const I=d.value.slice();I.push(A),w(""),t("update:modelValue",I.map(W=>W.toValue()))}function k(A){const I=d.value.slice();I.splice(typeof A=="number"?A:d.value.length-1,1),w(""),o.value.refleshMenuHover(),t("update:modelValue",I.map(W=>W.toValue()))}function L(A){var I;A&&(h.value=-1),A===!1&&((I=c.value.querySelector(`.${r("search-select-container")}`))==null||I.scrollTo(0,0)),u.value=A}function D(A){o.value.inputEnterForWrapper(),t("search",A)}function V(A){t("selectKey",A)}return{inputRef:o,wrapRef:c,isFocus:u,copyData:y,selectedList:d,overflowIndex:h,validateStr:g,onEditClick:b,onEditEnter:C,handleWrapClick:x,handleInputFocus:L,handleResize:E,handleClearAll:_,handleInputOutside:O,handleAddSelected:T,handleDeleteSelected:k,handleClickSearch:D,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Vm}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:o=>{var c,u;return(u=(c=this.$slots).menu)==null?void 0:u.call(c,o)}}:{});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(TK,{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(M4,{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(wn,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(Ss,{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(el,{class:"select-tips"},null),this.validateStr||""])])])}}),R4=Ze(LK);function AK(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const F4=Fv(xd);F4.width.default="400";const $K=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...F4,title:v.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:o}=_e(),c=async()=>{let h=!0;typeof e.beforeClose=="function"&&(h=await e.beforeClose()),h&&(t("update:isShow",!1),t("closed"),t("animation-end"))},u=()=>{t("shown")},d=()=>{t("hidden")};return()=>{const h={header:()=>{var f;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${o("sideslider-header")}`},[a.createVNode("div",{class:`${o("sideslider-close")}`,onClick:c},[e.direction==="left"?a.createVNode(cr,null,null):a.createVNode(kn,null,null)]),a.createVNode("div",{class:`${o("sideslider-title")}`},[((f=r.header)==null?void 0:f.call(r))??e.title])])])},default:()=>{var f;return a.createVNode("div",{class:`${o("sideslider-content")}`},[(f=r.default)==null?void 0:f.call(r)])}};r.footer&&Object.assign(h,{footer:()=>a.createVNode("div",{class:`${o("sideslider-footer")}`},[r.footer()])});const m={...n};return s.vnode.scopeId&&(m[s.vnode.scopeId]=""),a.createVNode(ol,a.mergeProps(m,{width:e.width,class:{[o("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:c,onHidden:d,onShown:u}),AK(h)?h:{default:()=>[h]})}}}),H4=Ze($K),Dm=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),o=a.ref(0),c=a.ref(0),u=a.ref(null),d=a.ref(e.modelValue),h=a.ref(0),m=a.ref(0),f=a.ref(!1),g=a.ref(null),y=a.computed(()=>{var V,A;let L="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const I=e.params.customContent[e.modelValue];L=I.tip||I.label||""}const D=e.params.vertical?Ao.RIGHT:Ao.TOP;return(A=e.params)!=null&&A.showTip?{content:e.params.formatterTipLabel(`${L||(e==null?void 0:e.modelValue)||"0"}`),placement:D}:{content:"",placement:D}}),b=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),C=a.computed(()=>e.params.vertical?{bottom:b.value}:{left:b.value}),N=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),w=L=>{e.params.disable||(L.preventDefault(),E(L),vo(window,"mousemove",x),vo(window,"touchmove",x),vo(window,"mouseup",_),vo(window,"touchend",_))},E=L=>{n.value=!0,r.value=!0,e.params.vertical?s.value=L.clientY:o.value=L.clientX,c.value=parseFloat(b.value),u.value=c.value},x=L=>{if(n.value){r.value=!1,t("resetSize");let D=0;e.params.vertical?(h.value=L.clientY,D=(s.value-h.value)/e.params.sliderSize*100):(m.value=L.clientX,D=(m.value-o.value)/e.params.sliderSize*100),u.value=c.value+D,O(u.value)}},_=()=>{f.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(O(u.value),t("emitChange"))},0),Cc(window,"mousemove",x),Cc(window,"touchmove",x),Cc(window,"mouseup",_),Cc(window,"touchend",_))},O=L=>{if(L===null||isNaN(L))return;L<0?u.value=0:L>100&&(u.value=100);const D=100/((e.params.maxValue-e.params.minValue)/e.params.step);let A=Math.round(L/D)*D*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;A=parseFloat(A.toFixed(e.params.precision)),t("update:modelValue",A),!n.value&&e.modelValue!==d.value&&(d.value=e.modelValue)},{resolveClassName:T}=_e();return{renderDom:()=>a.createVNode("div",{ref:g,style:C.value,class:[`${T("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:L=>L.stopPropagation(),onMousedown:w},[y.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Cn,{boundary:document.body,content:y.value.content,placement:y.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"]},[N.value])]):null]),setPosition:O,tip:y}},render(){return this.renderDom()}}),vo=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Cc=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},VK=a.defineComponent({name:"Slider",props:{modelValue:v.oneOfType([v.arrayOf(v.number),v.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),o=a.ref(null),c=a.ref(null),u=a.ref(0),d=a.ref(0),h=a.ref(null),m=a.ref(null),f=a.ref(null),g=a.ref(null),y=a.computed(()=>{const R=[e.minValue,e.maxValue,e.step].map(z=>{const Q=`${z}`.split(".")[1];return Q?Q.length:0});return Math.max.apply(null,R)}),b=a.computed(()=>Math.min(s.value,o.value)),C=a.computed(()=>Math.max(s.value,o.value)),N=a.computed(()=>e.range?`${100*(C.value-b.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),w=a.computed(()=>e.range?`${100*(b.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),E=a.computed(()=>e.vertical?{height:N.value,bottom:w.value}:{width:N.value,left:w.value}),x=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const R=(e.maxValue-e.minValue)/e.step,z=100*e.step/(e.maxValue-e.minValue),Q=[];for(let ne=1;ne<R;ne++)Q.push(ne*z);return e.range?Q.filter(ne=>ne<100*(b.value-e.minValue)/(e.maxValue-e.minValue)||ne>100*(C.value-e.minValue)/(e.maxValue-e.minValue)):Q.filter(ne=>ne>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),_=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),O=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const R=100*e.step/(e.maxValue-e.minValue),z=[];for(let Q=e.minValue,ne=0;Q<=e.maxValue;Q+=e.step,ne++){const oe={stepWidth:ne*R,stepLabel:e.formatterLabel(Q)};z.push(oe)}return z}),T=a.computed(()=>Array.isArray(e.modelValue)),k=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((R,z)=>Number(R)-Number(z)).filter(R=>Number(R)>=e.minValue&&Number(R)<=e.maxValue).map(R=>{const{tip:z}=e.customContent[R],{label:Q}=e.customContent[R];return{tip:z||Q||"",label:Q||"",percent:(Number(R)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),L=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{I()}),a.watch(()=>s.value,R=>{e.range?n("update:modelValue",[b.value,C.value]):n("update:modelValue",R),u.value=R}),a.watch(()=>o.value,R=>{n("update:modelValue",[b.value,C.value]),d.value=R}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),D(),vo(window,"resize",D())});const D=()=>{h.value&&(r.value=h.value[`client${e.vertical?"Height":"Width"}`])},V=R=>{var z,Q;if(R.stopPropagation(),!e.disable){if(D(),e.vertical){const ne=(z=h.value)==null?void 0:z.getBoundingClientRect().bottom;U((ne-R.clientY)/r.value*100)}else{const ne=(Q=h.value)==null?void 0:Q.getBoundingClientRect().left;U((R.clientX-ne)/r.value*100)}W()}},A=()=>e.range?![b.value,C.value].every((R,z)=>R===c.value[z]):e.modelValue!==c.value,I=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const R=e.modelValue;e.range&&Array.isArray(R)?R[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):R[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):R[0]<e.minValue?n("update:modelValue",[e.minValue,R[1]]):R[1]>e.maxValue?n("update:modelValue",[R[0],e.maxValue]):(s.value=Number(R[0]),o.value=Number(R[1]),A()&&(c.value=R.slice())):!e.range&&typeof R=="number"&&!isNaN(R)&&(R<e.minValue?n("update:modelValue",e.minValue):R>e.maxValue?n("update:modelValue",e.maxValue):(s.value=R,A()&&(c.value=R)))},W=async()=>{await a.nextTick(),n("change",e.range?[b.value,C.value]:e.modelValue)},B=R=>e.vertical?{bottom:`${R}%`}:{left:`${R}%`},U=R=>{if(!e.range){m.value.setPosition(R);return}const z=e.minValue+R*(e.maxValue-e.minValue)/100;Math.abs(b.value-z)<Math.abs(C.value-z)?g.value=s.value<o.value?m.value:f.value:g.value=s.value>o.value?m.value:f.value,g.value.setPosition(R)},K=R=>{if(R==="")return;const z=parseFloat(R);z<e.minValue?(u.value=e.minValue,s.value=e.minValue):z>e.maxValue?(u.value=e.maxValue,s.value=e.maxValue):s.value=z},j=R=>{if(R==="")return;const z=parseFloat(R.toString());z<e.minValue?(d.value=e.minValue,o.value=e.minValue):z>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=z},P=R=>{let z=0;return R==="start"?z=e.vertical?e.maxValue:e.minValue:z=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(z)?"0":"1"},{resolveClassName:ee}=_e(),J=(R,z)=>{let Q=z.stepWidth??z.percent??z;if(e.labelClick){R.stopPropagation(),R.stopImmediatePropagation(),R.preventDefault();let ne;if(typeof e.labelClick=="function"){const oe={percent:Q,step:z};if(ne=e.labelClick(R,oe),ne===!1)return}Q=typeof ne=="number"?ne:Q,console.log("handleStepLabelClick",Q),U(Q);return}};return{renderDom:()=>{var R,z;return a.createVNode("div",{class:[`${ee("slider")}`,e.extCls]},[(R=t.start)==null?void 0:R.call(t),a.createVNode("div",{ref:h,style:_.value,class:`${ee("slider-runway")}`,onClick:V},[a.createVNode("div",{style:E.value,class:[`${ee("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?x.value.map((Q,ne)=>ne===0||ne===x.value.length-1?null:a.createVNode("div",{key:ne,style:B(Q),class:[`${ee("slider-interval")}`,{vertical:e.vertical}],onClick:oe=>J(oe,Q)},null)):null,e.customContent?k.value.map((Q,ne)=>ne===0||ne===k.value.length-1?null:a.createVNode("div",{key:ne,style:B(Q.percent),class:[`${ee("slider-interval")}`,{vertical:e.vertical}],onClick:oe=>J(oe,Q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${ee("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:P("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:P("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return O.value.map((Q,ne)=>a.createVNode("div",{key:ne,style:B(Q.stepWidth),class:[`${ee("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:oe=>J(oe,Q)},[Q.stepLabel]));if(e.customContent)return k.value.map((Q,ne)=>a.createVNode("div",{key:ne,style:B(Q.percent),class:[`${ee("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:oe=>J(oe,Q)},[Q.label]))}()]):void 0,a.createVNode(Dm,{ref:m,modelValue:s.value,"onUpdate:modelValue":Q=>s.value=Q,params:L.value,onEmitChange:W,onResetSize:D},null),e.range?a.createVNode(Dm,{ref:f,modelValue:o.value,"onUpdate:modelValue":Q=>o.value=Q,params:L.value,onEmitChange:W,onResetSize:D},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${ee("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(Ma,{max:e.maxValue,min:e.minValue,modelValue:u.value,type:"number",onChange:K},null)]),T.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Ma,{max:e.maxValue,min:e.minValue,modelValue:d.value,type:"number",onChange:j},null)])]:void 0]):void 0,(z=t.end)==null?void 0:z.call(t)])}}},render(){return this.renderDom()}}),B4=Ze(VK);var z4=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(z4||{});const km={theme:v.theme().def(_u.PRIMARY),size:v.size(),curStep:v.number.def(1),controllable:v.bool.def(!1),direction:Og(),status:Ie("status",{}).def(z4.UNKNOWN),lineType:Lg(),extCls:v.string,steps:v.array.def([]),beforeChange:v.func},DK=a.defineComponent({name:"Steps",props:km,emits:["update:curStep","click"],setup(e,{emit:t}){const n=dt("steps"),r=dt("lang"),s=a.ref([]),o=m=>{const f=[];m.forEach(g=>{typeof g=="string"?f.push(g):f.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:g.border??!0})}),s.value.splice(0,s.value.length,...f)},c=m=>{km.curStep=m},u=()=>{var m;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}),(m=e.steps)!=null&&m.length&&o(e.steps)};a.watch(()=>r.value,()=>{u()});const d=async m=>{try{e.controllable&&m!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,g)=>{const y=await e.beforeChange(m);y?f(y):g(y)}),t("update:curStep",m),t("click",m))}catch(f){console.warn(f)}};a.onMounted(u),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:h}=_e();return{defaultSteps:s,jumpTo:d,resolveClassName:h}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ue({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=f=>this.curStep>f+1||this.defaultSteps[f].status==="done",o=f=>this.curStep===f+1,c=f=>{const{icon:g}=f;return g?Object.prototype.toString.call(g)==="[object Object]":typeof f=="string"},u=(f,g)=>(g.icon||(g.icon=f),!isNaN(g.icon)),d=f=>f.status==="loading",h=f=>f.status==="error",m=(f,g)=>o(f)&&this.status==="loading"||d(g)?a.createVNode(Jo,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(f)&&this.status==="error"||h(g)?a.createVNode(sn,{class:`${this.resolveClassName("steps-icon")}`},null):s(f)?a.createVNode(_s,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[u(f,g)?f+1:a.createVNode(g.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((f,g)=>{var y,b;return a.createVNode("div",{class:[this.resolveClassName("step"),f.title?"":this.resolveClassName("step-no-content"),s(g)?"done":"",o(g)?"current":"",o(g)&&this.status==="error"?"is-error":"",f.status&&o(g)?[`${this.resolveClassName(`step-${f.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(f)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${f.status}`)}`],onClick:()=>{this.jumpTo(g+1)}},[((b=(y=this.$slots)[g+1])==null?void 0:b.call(y))??m(g,f)]),f.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(g+1)}},[f.title]),f.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:f.description},[f.description])]):""])})])}}),U4=Ze(DK),kK=a.defineComponent({name:"Swiper",props:{isLoop:v.bool.def(!0),loopTime:v.number.def(8e3),pics:v.array.def([]),list:v.array.def([]),height:v.number,width:v.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:o,list:c,height:u,width:d}=a.toRefs(e),h=a.ref(),m=a.ref(0),f=a.ref(0),g=a.ref(0),y=a.ref(0);let b;const{resolveClassName:C}=_e(),N=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),w=a.computed(()=>({width:`${f.value*N.value.length}px`,transform:`translateX(-${f.value*m.value}px)`})),E=a.computed(()=>({width:`${f.value}px`,height:`${g.value}px`})),x=B=>{let U=B;B>=N.value.length&&(U=0),B<0&&(U=N.value.length-1),m.value=U,t("index-change",U)},_=B=>{B&&window.open(B,"_blank")},O=B=>[`${C("swiper-img")}`,{[`${C("swiper-link")}`]:B.link},B.class],T=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),k=B=>({[`${C("current-index")}`]:m.value===B}),L=()=>{r.value&&(y.value=window.setTimeout(()=>{x(m.value+1),L()},s.value))},D=()=>{window.clearTimeout(y.value)},V=()=>{var U;const B=(U=h.value)==null?void 0:U.parentElement;!B||!window.ResizeObserver||(b=new ResizeObserver(()=>{W()}),b.observe(B))},A=()=>{var B;(B=b.disconnect)==null||B.call(b)},I=B=>{if(B===void 0)return{height:0,width:0};const U=getComputedStyle(B),K=B.clientWidth-parseFloat(U.paddingTop)-parseFloat(U.paddingBottom);return{height:B.clientHeight-parseFloat(U.paddingLeft)-parseFloat(U.paddingRight),width:K}},W=()=>{var U;const B=I((U=h.value)==null?void 0:U.parentElement);f.value=+d.value>0?d.value:B.width,g.value=+u.value>0?u.value:B.height};return a.watch([u,d],W),a.onMounted(()=>{W(),L(),V()}),a.onBeforeUnmount(()=>{D(),A()}),()=>a.createVNode("section",{ref:h,style:E.value,class:`${C("swiper-home")}`},[a.createVNode("hgroup",{style:w.value,class:`${C("transition")} ${C("swiper-main")}`},[N.value.map(B=>{var U;return a.createVNode("h3",{style:E.value,class:`${C("swiper-card")}`},[((U=n.default)==null?void 0:U.call(n,B))??a.createVNode("span",{style:T(B),class:O(B),onClick:()=>_(B.link)},null)])})]),a.createVNode("ul",{class:`${C("swiper-index")}`},[N.value.map((B,U)=>a.createVNode("li",{class:k(U),onMouseover:()=>x(U)},null))]),a.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-prev")}`,onClick:()=>x(m.value-1)},[a.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-next")}`,onClick:()=>x(m.value+1)},[a.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)])])}}),j4=Ze(kK),IK={theme:pS(),size:v.size(),disabled:v.bool,showText:v.bool,isOutline:v.bool,onText:v.string.def("ON"),offText:v.string.def("OFF"),isSquare:v.bool,extCls:v.string,beforeChange:v.func.def(void 0),trueValue:v.oneOfType([v.string,v.number,v.bool]).def(!0),falseValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),value:v.oneOfType([v.string,v.number,v.bool]).def(!1),modelValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),withValidate:v.bool.def(!0)};let du=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function PK(e){return e}function MK(e){return!!e}const RK={[du.UPDATE]:PK,[du.CHANGE]:MK},FK=a.defineComponent({name:"Switcher",props:IK,emits:RK,setup(e,{emit:t}){const n=dr(),{resolveClassName:r}=_e(),s=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),d=a.computed(()=>{const f={[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":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const g=`${r(`switcher-${e.size}`)}`;f[g]=!0}return f});a.watch(()=>e.modelValue,()=>{var f;c.value=!0,e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.watch(()=>e.value,()=>{c.value=!1});const h=f=>{if(f.stopPropagation(),f.preventDefault(),e.disabled||s.value)return;const g=o.value?e.falseValue:e.trueValue,y=!o.value,b=()=>{t(du.UPDATE,g),t(du.CHANGE,y)};let C=!0;if(typeof e.beforeChange=="function"&&(C=e.beforeChange(g),typeof C.then=="function"))return s.value=!0,C.then(()=>{b()}).finally(()=>{s.value=!1});C&&b()},m=f=>{(f.code==="Enter"||f.key==="Enter"||f.keyCode===13)&&h(f)};return()=>a.createVNode("div",{class:d.value,tabindex:"0",onClick:h,onKeydown:m},[s.value?a.createVNode(sd,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}),W4=Ze(FK);var fu=(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))(fu||{}),No=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(No||{});const G4=Ie("position",{}).def("top");var K4=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(K4||{});const Y4=Ie("sortType",{}).def("replace"),HK={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},BK={name:v.oneOfType([v.number,v.string]).def(""),label:v.string||v.func,tips:v.string,closable:v.bool,visible:v.bool.def(!0),disabled:v.bool,sortable:v.bool,renderDirective:xu(),panel:v.string||v.func,num:v.number.def(void 0),numDisplayType:v.string.def("default")},zK={active:v.oneOfType([v.number,v.string]).def(""),type:Ie("type",{}).def("border-card"),tabPosition:G4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Y4,labelHeight:v.number.def(50),extCls:v.string.def(""),validateActive:v.bool.def(!0),activeBarSize:v.number.def(2),activeBarColor:v.string.def("#3a84ff")},UK={active:v.oneOfType([v.number,v.string]).def(""),type:Ie("type",{}).def("border-card"),activeBarColor:v.string.def("#3a84ff"),activeBarSize:v.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:G4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Y4,labelHeight:v.number.def(50),validateActive:v.bool.def(!0),...HK},Im=a.defineComponent({name:"TabNav",directives:{bkTooltips:Rr},props:UK,setup(e){const t=a.ref(null),n=a.computed(()=>{const m={width:0,height:0,bottom:0,left:0};if(!t.value)return m;if([No.LEFT,No.RIGHT].includes(e.tabPosition)){const{clientHeight:g,offsetTop:y}=t.value,b={width:`${e.activeBarSize}px`,height:`${g}px`,top:`${y}px`,background:e.activeBarColor};return e.tabPosition===No.LEFT?b.right=0:b.left=0,b}if(e.type===fu.UNBORDER_CARD){const{clientWidth:g,offsetLeft:y}=t.value;return{width:`${g}px`,height:`${e.activeBarSize}px`,left:`${y}px`,bottom:0,background:e.activeBarColor}}return m}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const m=[];let f=!1;return e.panels.filter((y,b)=>{if(!y.props)return null;const{name:C,label:N,num:w,closable:E,visible:x,disabled:_,sortable:O,tips:T,numDisplayType:k}=y.props;if(!x)return!1;e.active===C&&(f=!0);const L=D=>y.slots.label?a.h(y.slots.label):[void 0,""].includes(D)?`选项卡${b+1}`:typeof D=="string"?D:typeof D=="function"?a.h(D):D;return m.push({name:C,closable:E,visible:x,disabled:_,sortable:O,tips:T,numDisplayType:k,tabLabel:L(N),tabNum:w}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),m}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),u=(m,f)=>m===f,d={handleTabAdd(m){e.tabAdd(m)},dragstart(m,f){o.value=m,c.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(m,f)},dragenter(m){u(c.value,e.guid)&&(s.value=m)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(m,f){if(!u(c.value,e.guid))return!1;e.tabSort(o.value,m,f)},handleTabChange(m){e.tabChange(m)},handleTabRemove(m,f){e.tabRemove(m,f)}},{resolveClassName:h}=_e();return{...d,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:h}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:o,dragstart:c,dragenter:u,dragend:d,drop:h}=this,m=()=>this.tableNavList.map((C,N)=>{if(!C)return null;const{name:w,disabled:E,tabLabel:x,tabNum:_,numDisplayType:O}=C,T=()=>{const V=[this.resolveClassName("tab-header-item")];return E&&V.push(this.resolveClassName("tab-header--disabled")),e===w&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},k=(V,A)=>!E&&(V||A),L=(V,A)=>k(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(A,V)},[a.createVNode(wn,null,null)]):"",D=()=>["bracket"].includes(O)?`(${_})`:_;return a.withDirectives(a.createVNode("div",{key:w,ref:e===w?"activeRef":"tabLabelRef",class:T(),draggable:k(C.sortable,r),onClick:()=>!E&&this.handleTabChange(w),onDragend:V=>{V.preventDefault(),d()},onDragenter:V=>{V.preventDefault(),u(N)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>c(N,V),onDrop:V=>{V.preventDefault(),h(N,s)}},[isNaN(_)?a.createVNode("div",null,[x]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[x]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${O}`)},[D()]),L==null?void 0:L(C,N)])]),isNaN(_)?L==null?void 0:L(C,N):""]),[[a.resolveDirective("bk-tooltips"),{content:C.tips||"",disabled:!C.tips}]])}),f=()=>{var N,w;const C=[];return typeof this.$slots.add=="function"?C.push((w=(N=this.$slots).add)==null?void 0:w.call(N,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(nl,{style:"display:flex;",width:26,height:26},null)])),C.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[C.map((E,x)=>a.createVNode("div",{key:x,class:this.resolveClassName("tab-header-item")},[E]))]):null},g=()=>this.type===fu.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",y=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,b=f();return a.createVNode("div",{style:{lineHeight:`${o}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),b||y?"tab-header-auto":""]},[g(),m()]),b,y])}}),jK=a.defineComponent({name:"Tab",components:{TabNav:Im},props:zK,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([]),o=a.getCurrentInstance(),c=(m,f=[])=>{const{children:g}=m;return(g||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?f.push(y.component):(b===a.Fragment||b==="template")&&c(y,f)}),f},u=()=>{if(t.default){const{children:m}=o.subTree.children[1];if(!m)return;const f=m[0],g=c(f);g.length!==s.value.length&&(s.value=g)}};a.onMounted(()=>{u(),r.value=!0,a.onUpdated(()=>{u()})});const d={tabAdd(m){n("add",{e:m}),n("add-panel",{e:m})},tabChange(m){n("change",m),n("tab-change",m),n("update:active",m)},tabRemove(m,f){n("remove",m,f),n("remove-panel",m,f)},tabSort(m,f,g){const y=s.value;if(g===K4.INSERT)if(m<f)y.splice(f+1,0,s[m]),y.splice(m,1);else if(m>f)y.splice(f,0,s[m]),y.splice(m+1,1);else return!1;else{const b=y[f];y[f]=y[m],y[m]=b}s.value=[...y],n("sort",m,f,g),n("sort-change",m,f,g)},tabDrag(m,f){n("drag",m,f),n("on-drag-tab",m,f)}},{resolveClassName:h}=_e();return{...d,isMounted:r,panels:s,resolveClassName:h}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===No.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===fu.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:u,addable:d,sortable:h,sortType:m,labelHeight:f,validateActive:g,tabPosition:y,activeBarSize:b,activeBarColor:C,tabAdd:N,tabChange:w,tabRemove:E,tabSort:x,tabDrag:_}=this,O={panels:s,active:o,type:c,closable:u,addable:d,sortable:h,sortType:m,labelHeight:f,validateActive:g,tabPosition:y,activeBarSize:b,activeBarColor:C,tabAdd:N,tabChange:w,tabRemove:E,tabSort:x,tabDrag:_};return!s||!Array.isArray(s)?null:a.createVNode(Im,O,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)])])}}),WK=a.defineComponent({name:"TabPanel",props:BK,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}=_e();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),X4=ln(jK,{TabPanel:WK});var q4=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(q4||{}),J4=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(J4||{});const GK=["auto","highlight"],KK=["none","row","col","outer","horizontal"],Xe={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SOURCE_DATA:"row_source_data",ROW_SKIP_CFG:"row_skip_config",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},Ve={COL_UID:"col_$uuid",COL_SOURCE_DATA:"col_source_data",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_CELL_RENDER:"col_cell_render",COL_TEXT_RENDER:"col_text_render",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",HEAD_CELL_RENDER:"head_cell_render",HEAD_TEXT_RENDER:"head_text_render",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"},Z4=8,Va=42;var Td=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Td||{});const Q4={def1:"#FAFBFD",def2:"#F0F1F5"},xo={large:78,medium:60,small:42},YK=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:xo.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:xo.medium},{value:"large",label:e.value.setting.lineHeight.large,height:xo.large}],e5=Symbol("bkInitColumns"),XK=60;var Ut=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ut||{});const qK=["asc","desc","null","custom"],Zs=80,os={},JK={};Ie("showOverflowTooltipMode",{default:"auto"});const ZK=Ie("columnType",{default:"__COL_TYPE_NONE"}),nh=Ie("columnType",{default:""});Ie("full",{default:"full"});Ie("columnSize",{default:"small"});const QK=an(),M2=Ie("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),eY=Ie("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),tY=Ie("IFilterPropShape",{default:!1,type:[Boolean,Object]});var t5=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(t5||{});const Ed=Ie("IColumnType",{default:{width:"100%",label:""},type:[Object]}),nY=Ie("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),m0=Ie("LabelFunctionStringType",{}),rY=Ie("RenderFunctionStringType",{}),Pm=Ie("SpanFunctionStringType",{}),aY=Ie("RowClassFunctionStringType",{}),sY=Ie("RowHeightFunctionNumberType",{});Ie("FunctionNumberType",{});const Hc=e=>Ie("StringNumberType",{}).def(e);Ie("IColumnPropType",{default:{label:void 0,minWidth:Zs},type:[Object]});var n5=(e=>(e.independent="independent",e.interdependent="interdependent",e))(n5||{});const iY={data:v.arrayOf(v.any).def([]),columns:v.arrayOf(Ed).def([]),activeColumn:v.oneOfType([v.number.def(-1),v.arrayOf(v.number.def(-1))]),columnPick:Ie("columnPick",{}).def("disabled"),height:Hc("auto"),stripe:v.bool.def(!1),minHeight:Hc(Va),maxHeight:Hc("auto"),rowHeight:sY,headHeight:v.number.def(Va),showHead:v.bool.def(!0),sortValFormat:v.arrayOf(v.any).def([""]),thead:Ie("ITheadType",{}).def({color:Td.DEF1,height:Va,isShow:!0}),virtualEnabled:v.bool.def(!1),border:v.oneOfType([v.arrayOf(Ie("boderType",{})),v.string]).def([q4.ROW]),pagination:v.oneOfType([v.bool.def(!1),v.object.def({})]).def(!1),paginationHeight:v.number.def(XK),remotePagination:v.bool.def(!1),acrossAll:v.bool.def(!1),emptyText:v.string,emptyCellText:v.oneOfType([v.string,v.func]).def(""),isEmptyCell:v.oneOfType([v.arrayOf(an),v.arrayOf(null),v.arrayOf(void 0),v.func]).def(["",void 0,null]),settings:nY,rowClass:v.oneOfType([v.string,v.object,v.func]).def({}),rowStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellClass:v.oneOfType([v.string,v.object,v.func]).def({}),scrollLoading:v.oneOfType([v.object,v.bool]).def(void 0),reserveExpand:v.bool.def(!1),selectionKey:v.string.def(""),checked:v.array.def([]),isSelectedFn:v.func.def(void 0),rowKey:v.oneOfType([v.string,v.func]).def(Xe.ROW_INDEX),showOverflowTooltip:M2,asyncData:v.bool.def(!1),rowHover:v.oneOf(GK).def(J4.HIGHLIGHT),defaultSort:v.shape({}).def({}),isRowSelectEnable:v.oneOfType([v.func.def(()=>!0),v.bool.def(!0)]).def(!0),resizerWay:Ie("ResizerWay",{default:"debounce"}),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),align:nh,headerAlign:nh,prependStyle:v.style().def({}),colSortBehavior:Ie("IColSortBehavior",{default:"independent"}),isFlex:v.bool.def(!0),rowDraggable:v.oneOfType([v.func,v.bool,v.object]).def(!1),shiftMultiChecked:v.bool.def(!1),scrollbar:v.bool.def(!0),fixedBottom:Ie("FixedBottomOption",{default:{position:"relative",height:Va}}).def(null),appendLastRow:Ie("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},oY={label:m0,field:m0,render:rY,width:v.oneOfType([v.number,v.string]),minWidth:Hc(Zs),columnKey:v.string.def(""),showOverflowTooltip:M2,type:ZK,resizable:v.bool.def(!0),fixed:v.oneOfType([v.bool,QK]).def(!1),sort:eY,filter:tY,colspan:Pm.def(1),rowspan:Pm.def(1),align:nh,className:aY,prop:m0,index:v.number.def(void 0)},lY=a.defineComponent({name:"TableColumn",props:oY,setup(e,{}){const t=a.inject(e5,()=>{}),n={},r=(s,o)=>{const c=a.toRaw(o);return Object.keys(c).every(d=>typeof c[d]=="function"?s[d]!==void 0:d==="children"?!0:bn.isEqual(s[d],o[d]))};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 Lt=(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))(Lt||{});const cY=e=>!0,uY=e=>!0,dY=e=>!0,fY=e=>!0,Nc=(e,t,n,r,s)=>!0,hY=e=>!0,mY=e=>!0,gY=e=>!0,pY=e=>!0,Mm=e=>!0,vY=e=>!0,Rm=e=>!0,yY=e=>!0,bY=e=>!0,wY={columnPick:cY,columnFilter:uY,columnSort:fY,colFilterSave:dY,rowClick:Nc,rowDblclick:Nc,rowExpand:hY,select:mY,selectAll:gY,selectionChange:pY,pageLimitChange:Mm,pageValueChange:Mm,settingChange:vY,scrollBottom:yY,cellClick:Rm,cellDblclick:Rm,rowMouseEnter:Nc,rowMouseLeave:Nc,dragend:bY},CY=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:o,getPreColumn:c}=e,u=J=>n(J,Ve.LISTENERS),d="HeadColumnResize";let h=function(J){return J.MOUSE_DOWN="onMousedown",J.MOUSE_MOVE="onMousemove",J.MOUSE_OUT="onMouseout",J}({}),m=!1,f=!1,g=!1,y=0,b=null,C="right",N=null,w=null,E=0;const x=new WeakMap,_=a.ref(-1e3),O=[Ve.WIDTH],T=J=>{J.stopImmediatePropagation(),J.stopPropagation(),J.preventDefault()},k=J=>{T(J),f=!1,g=!1;const q=r(b,O)+E,R=r(b,[Ve.COL_MIN_WIDTH]),z=q>R?q:R;o(b,z),s(b,Ve.WIDTH,z),document.removeEventListener("mouseup",k),_.value=-1e3,E=0,A(N),t==null||t(),N=null;const Q=J.target;U(Q),b=null},L=bn.throttle(J=>{_.value=_.value+J}),D=J=>{T(J),document.body.style.setProperty("user-select","none");const q=J.clientX-y;E=E+q,y=J.clientX;const R=r(b,O)+q;r(b,[Ve.COL_MIN_WIDTH])<R&&L(q)},V=bn.debounce(J=>{document.body.style.setProperty("user-select","none"),J==null||J.classList.add("col-resize-hover")}),A=J=>{V.cancel(),document.body.style.removeProperty("user-select"),J==null||J.classList.remove("col-resize-hover")},I=J=>{if(!m)return;W(J.target),y=J.clientX;const q=C==="left"?c(w):w;s(q,Ve.COL_IS_DRAG,!0),b=q,N=J.target.closest("table");const R=N.getBoundingClientRect();_.value=J.clientX-R.left,V(N),f=!0,document.addEventListener("mouseup",k)},W=J=>{var R,z;((z=(R=J==null?void 0:J.parentElement)==null?void 0:R.parentElement)==null?void 0:z.querySelectorAll(".col-pointer-hover")).forEach(Q=>{Q==null||Q.classList.remove("col-pointer-hover"),Q==null||Q.classList.remove("poiner-left"),Q==null||Q.classList.remove("poiner-right")})},B=(J,q)=>{const R=J.parentElement;R==null||R.classList.add("col-pointer-hover"),R==null||R.classList.add(`poiner-${q}`);const z=q==="right"?R.nextElementSibling:R.previousElementSibling,Q=q==="right"?"left":"right";z==null||z.classList.add("col-pointer-hover"),z==null||z.classList.add(`poiner-${Q}`)},U=J=>{g||(_.value=-1e3,J.classList.remove("cell-resize"),W(J),x.set(J,!1),document.removeEventListener("mousedown",I))},K={[h.MOUSE_MOVE]:(J,q,R)=>{if(T(J),f){g=!0,D(J);return}const z=J.target;if(!g){if(!z)return;const{offsetWidth:Q}=z,ne=J.offsetX;Q>12&&(Q-ne<8||ne<8&&R>0)?(m=!0,C=ne<8?"left":"right",x.get(z)||(x.set(z,!0),z.classList.add("cell-resize"),B(z,C),w=q,document.addEventListener("mousedown",I))):(m=!1,U(z))}},[h.MOUSE_OUT]:(J,q,R)=>{const z=J.target;U(z)}},j=J=>`${d}_${J}`,P=()=>{e.tableColumnList.forEach(J=>{if(e.getColumnAttribute(J,Ve.COL_RESIZEABLE)){const q=u(J);Object.keys(K).forEach(R=>{const z=j(R);q!=null&&q.has(z)||q.set(z,[]),q.get(z).push(K[R])})}})},ee=()=>{e.tableColumnList.forEach(J=>{const q=u(J);Object.keys(K).forEach(R=>{const z=j(R);if(q!=null&&q.has(z)){const Q=q.get(z);Q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{ee(),P()},{immediate:!0,deep:!0}),{dragOffsetX:_}},NY=()=>{const e=[];let t=0;const n=new WeakMap,r=h=>a.isRef(h)?a.unref(h):a.toRaw(h),s=h=>Object.keys(h??{}).reduce((m,f)=>{const g=f.replace(/-(\w)/g,(y,b)=>b.toUpperCase());return Object.assign(m,{[g]:r(h[f])})},{}),o=h=>(n.has(h)||n.set(h,lr()),n.get(h)),c=(h,m,f)=>{var g,y;if((g=h==null?void 0:h.component)!=null&&g.subTree){u((y=h==null?void 0:h.component)==null?void 0:y.subTree,m);return}if(typeof h=="function")return h();if(Array.isArray(h)){h.forEach(b=>u(b,m));return}if(Array.isArray(h==null?void 0:h.children)){h.children.forEach(b=>u(b,m));return}if(!f&&a.isVNode(h)&&(h!=null&&h.children)&&typeof(h==null?void 0:h.children)=="object"){Object.keys(h.children).forEach(b=>u(h.children[b],m));return}},u=(h,m)=>{var g,y,b;let f=m;if(!(!h||((g=h.type)==null?void 0:g.name)==="Table")){if(((y=h.type)==null?void 0:y.name)==="TableColumn"){const C=Object.assign({index:t},s(h.props),{field:h.props.prop||h.props.field,render:h.props.render??((b=h.children)==null?void 0:b.default),uniqueId:o(h),children:[]}),N=(m==null?void 0:m.children)??e;N.some(w=>w.uniqueId===C.uniqueId)||(N.push(C),t=t+1,h.children&&c(h,C,!0));return}c(h,f)}};return{resolveColumns:h=>{var f,g,y,b;e.length=0,t=0;const m=h==null?void 0:h.find(C=>{var N;return((N=C.type)==null?void 0:N.name)==="GhostBody"});return m&&((f=m.component)!=null&&f.subTree?u((g=m.component)==null?void 0:g.subTree):(((b=(y=m.children)==null?void 0:y.default)==null?void 0:b.call(y))??[]).forEach(C=>u(C))),e.sort((C,N)=>C.index-N.index),e}}};var r5=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,o){return s[0]===n?(r=o,!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,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(r,c[1],c[0])}},t}()}(),rh=typeof window<"u"&&typeof document<"u"&&window.document===document,hu=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")()}(),xY=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(hu):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),_Y=2;function SY(e,t){var n=!1,r=!1,s=0;function o(){n&&(n=!1,e()),r&&u()}function c(){xY(o)}function u(){var d=Date.now();if(n){if(d-s<_Y)return;r=!0}else n=!0,r=!1,setTimeout(c,t);s=d}return u}var TY=20,EY=["top","right","bottom","left","width","height","size","weight"],OY=typeof MutationObserver<"u",LY=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=SY(this.refresh.bind(this),TY)}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(){!rh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),OY?(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(){!rh||!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=EY.some(function(o){return!!~r.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),a5=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},wi=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||hu},s5=Od(0,0,0,0);function mu(e){return parseFloat(e)||0}function Fm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var o=e["border-"+s+"-width"];return r+mu(o)},0)}function AY(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var o=s[r],c=e["padding-"+o];n[o]=mu(c)}return n}function $Y(e){var t=e.getBBox();return Od(0,0,t.width,t.height)}function VY(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return s5;var r=wi(e).getComputedStyle(e),s=AY(r),o=s.left+s.right,c=s.top+s.bottom,u=mu(r.width),d=mu(r.height);if(r.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=Fm(r,"left","right")+o),Math.round(d+c)!==n&&(d-=Fm(r,"top","bottom")+c)),!kY(e)){var h=Math.round(u+o)-t,m=Math.round(d+c)-n;Math.abs(h)!==1&&(u-=h),Math.abs(m)!==1&&(d-=m)}return Od(s.left,s.top,u,d)}var DY=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof wi(e).SVGGraphicsElement}:function(e){return e instanceof wi(e).SVGElement&&typeof e.getBBox=="function"}}();function kY(e){return e===wi(e).document.documentElement}function IY(e){return rh?DY(e)?$Y(e):VY(e):s5}function PY(e){var t=e.x,n=e.y,r=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return a5(c,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),c}function Od(e,t,n,r){return{x:e,y:t,width:n,height:r}}var MY=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Od(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=IY(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}(),RY=function(){function e(t,n){var r=PY(n);a5(this,{target:t,contentRect:r})}return e}(),FY=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new r5,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 wi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new MY(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 wi(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 RY(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}(),i5=typeof WeakMap<"u"?new WeakMap:new r5,o5=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=LY.getInstance(),r=new FY(t,n,this);i5.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){o5.prototype[e]=function(){var t;return(t=i5.get(this))[e].apply(t,arguments)}});var HY=function(){return typeof hu.ResizeObserver<"u"?hu.ResizeObserver:o5}();const Bt=(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=>Bt(e,r,n)).filter(r=>r!==void 0).at(0)}},BY=e=>ps(e,"auto"),ps=(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},zY=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>KK.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},l5=(e,t,n=60,r=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?wu(o,n):$g(o),u=()=>Reflect.apply(c,void 0,[]),d=new HY(()=>{u()});return r&&typeof t=="function"&&t(),{start:()=>{d.observe(e)},disconnect:()=>{d.unobserve(e),d.disconnect()}}},R2=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},UY=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),gu=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Sd(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const o=r.match(typeof s=="string"?UY(s):s);r=(o==null?void 0:o[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},jY=(e,t)=>Sd(e,t),Ys=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ys(Reflect.apply(e,void 0,t),t):[],WY=(e,t,n)=>{const r=GY(e,t,n);return r!==null?r:lr()},GY=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Xe.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,Hm=(e,t,n)=>{const r=o=>o.field??o.id;return(o=>e.some(c=>r(c)===Bt(o,["field","type"],[o])))(t)&&n.length&&!n.includes(Bt(t,["field","type"],[t]))},pu=(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,KY=(e,t,n,r)=>{const s=pu(e,t,n,r,"colspan"),o=pu(e,t,n,r,"rowspan");return{colspan:s,rowspan:o}},c5=(e,t,n=[])=>{var h,m;const r=e.field,s=f=>gu(f,r,n),o=e.type==="index",c=(f,g,y,b)=>{const C=o?y:s(f)??"",N=o?b:s(g)??"";return typeof C=="number"&&typeof N=="number"?C-N:String.prototype.localeCompare.call(C,N)},u=typeof((h=e.sort)==null?void 0:h.sortFn)=="function"?(m=e.sort)==null?void 0:m.sortFn:c,d=(f,g,y,b)=>u(f,g,y,b)*(t===Ut.DESC?-1:1);return t===Ut.NULL?(f,g)=>!0:d},YY=e=>{const t={[Ut.NULL]:3,[Ut.ASC]:1,[Ut.DESC]:2};return t[e]===void 0?Ut.ASC:Object.keys(t)[(t[e]+1)%3]},XY=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Ut.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:c5(t,e.value??Ut.NULL,n)},e):null,vu=(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,qY=(e,t,n)=>{const r=WY(e,n,t);return r!==void 0&&e[r]!==void 0?Sd(e,r):t},JY=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=XY(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},ZY=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},xc=e=>a.isProxy(e)?a.toRaw(e):e,QY=e=>{const t=dt("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=lr(),o=a.reactive([]),c=a.reactive([]),u=a.reactive([]),d=new WeakMap,h=(F,G={})=>{o.forEach(ge=>ge.active=!1);const ye=o.find(ge=>ge.col===F);if(ye){Object.assign(ye,G,{active:!0});return}o.push({col:F,...G,active:!0})},m=(F,G,ye)=>{let ge=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(ge=Number(`${F[G]}`.replace(/px/,"")),Y(F,Ve.WIDTH,ge),U(F,{width:ge,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(ge=Number(`${F[G]}`.replace(/%/,""))/100*ye,Y(F,Ve.WIDTH,ge),U(F,{width:ge,left:null,right:null})),ge},f=F=>{let G=F,ye=Zs;const ge=(Ne,Le="width")=>{const Me=[];return Ne.forEach(ze=>{const Qe=m(ze,Le,F);G=G-Qe,[void 0,null,"auto","undefined","null",""].includes(ze[Le])&&Me.push(ze)}),G>0&&Me.length&&(ye=G/Me.length),Me},X=ge(y);ge(X,"minWidth").forEach(Ne=>{const Le=ye>Zs?ye:Zs;Y(Ne,Ve.WIDTH,Le),U(Ne,{width:Le,left:null,right:null})})},g=(F,G={})=>{const ye=c.find(ge=>ge.col===F);if(ye){Object.assign(ye,G);return}c.push({col:F,...G})},y=a.reactive([]),b=()=>{y.length=0,y.push(...r.filter(F=>!z(F)))},C=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},N=(F=["rowspan","colspan"])=>r.some(G=>F.some(ye=>typeof G[ye]=="function"||/^\d$/.test(`${G[ye]}`))),w=a.computed(()=>N(["colspan"])),E=a.computed(()=>N(["rowspan"])),x=(F,G,ye)=>{let ge=ye;const X=pu(F,G,null,null,"colspan"),fe={skipCol:!1,skipColLen:0};return ge>0&&(fe.skipColLen=ge,fe.skipCol=!0,ge=ge-1),X>1&&(fe.skipColLen=X,ge=X-1),{...fe,skipColumnNum:ge}},_=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Zs;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},O=(F,G)=>{const ye=se(F,Ve.LISTENERS);return ye?Array.from(ye==null?void 0:ye.keys()).reduce((ge,X)=>{const fe=X.split("_").slice(-1)[0];return Object.assign(ge,{[fe]:Ne=>{ye.get(X).forEach(Le=>Reflect.apply(Le,void 0,[Ne,F,G]))}})},{}):{}},T=F=>{if(!F.filter)return null;const G=(X,fe="ig")=>new RegExp(`${X}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fe),ye=(X,fe)=>{const{match:Ne}=F.filter,Le=gu(fe,Bt(F,"field",[F,fe]));return Ne!=="fuzzy"?X.includes(Le):X.some(Me=>G(Me,"img").test(Le))};return typeof F.filter.filterFn=="function"?(X,fe,Ne,Le)=>F.filter.filterFn(X,fe,F,Ne,Le):(X,fe)=>X.length?ye(X,fe):!0},k=F=>{u.length=0;let G=0;const ye=[],ge=C();ge&&F.unshift(ge);const X=(Me,ze=1)=>{Me.length&&G<ze&&(G=ze),Me.forEach(Qe=>X(Qe.children??[],ze+1))};X(F);const fe=(Me,ze)=>{if(Me){const Qe=d.get(Me);Qe.thColspan=Qe.thColspan+ze,Qe.offsetLeft=Qe.offsetLeft+ze,fe(Qe.parent,ze)}},Ne=(Me,ze,Qe,at)=>{var da,Ba,za,Ts,Ua;const Ke=a.toRaw(Me);let xt=at;u[ze]===void 0&&(u[ze]=[]);const Et=!!(((da=Ke.children)==null?void 0:da.length)??!1);(((Ba=Ke.children)==null?void 0:Ba.length)??!1)||ye.push(Ke),d.has(Ke)||d.set(Ke,{thColspan:1,thRowspan:1,isGroup:Et,offsetLeft:at});const Mn=d.get(Ke),ct=((za=Ke.children)==null?void 0:za.length)??0,et=((Ts=Ke.children)==null?void 0:Ts.length)??1,mt=ct>0?1:G-ze,Fr=xt+(ct>0?ct-1:0);return Object.assign(Mn,{thColspan:et>0?et:1,parent:Qe,thRowspan:mt,offsetLeft:Fr}),u[ze].push(Ke),et>1&&fe(Qe,et-1),(Ua=Ke.children)==null||Ua.forEach((Di,ki)=>{xt=xt+Ne(Di,ze+1,Ke,xt+ki)}),ct>0?ct-1:0};let Le=0;return F.forEach((Me,ze)=>{Le=Le+Ne(Me,0,null,Le+ze)}),ye},L=F=>d.get(F),D=()=>{o.length=0;let F=0;(r||[]).forEach((G,ye)=>{const{skipCol:ge,skipColumnNum:X,skipColLen:fe}=w.value?x(G,ye,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=X,!n.has(G)){const{type:Ne,fn:Le,scope:Me,active:ze,enabled:Qe}=JY(G,e),at=T(G),Ke=e.settings??{},xt=ZY(G);xt.enabled&&g(G,{[Ve.COL_FILTER_FN]:at,[Ve.COL_FILTER_VALUES]:xt.checked??[]}),Qe&&h(G,{[Ve.COL_SORT_TYPE]:Ne,[Ve.COL_SORT_FN]:Le,[Ve.COL_SORT_SCOPE]:Me}),n.set(G,{[Ve.CALC_WIDTH]:void 0,[Ve.RESIZE_WIDTH]:void 0,[Ve.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[Ve.COL_MIN_WIDTH]:_(G),[Ve.LISTENERS]:new Map,[Ve.WIDTH]:G.width,[Ve.IS_HIDDEN]:Hm(Ke.fields??[],G,Ke.checked??[]),[Ve.COL_SORT_TYPE]:a.ref(Ne),[Ve.COL_SORT_FN]:Le,[Ve.COL_FILTER_OBJ]:xt,[Ve.COL_FILTER_FN]:at,[Ve.COL_FILTER_SCOPE]:void 0,[Ve.COL_SORT_SCOPE]:Me,[Ve.COL_SORT_ACTIVE]:a.ref(ze),[Ve.COL_IS_DRAG]:!1,[Ve.COL_SPAN]:{skipCol:ge,skipColumnNum:X,skipColLen:fe},[Ve.COL_UID]:lr(),[Ve.SELECTION_DISABLED]:!1,[Ve.SELECTION_INDETERMINATE]:!1,[Ve.SELECTION_VAL]:!1,[Ve.COL_RESIZEABLE]:G.resizable!==!1,[Ve.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[Ve.COL_SPAN]:{skipCol:ge,skipColumnNum:X,skipColLen:fe},[Ve.COL_MIN_WIDTH]:_(G)})})},V=(F,G)=>{Y(F,Ve.COL_FIXED_STYLE,G)},A=F=>se(F,Ve.COL_FIXED_STYLE)??{},I=F=>se(F,Ve.COL_RECT),W=F=>se(F,Ve.CALC_WIDTH),B=F=>se(F,Ve.WIDTH),U=(F,{left:G,right:ye,width:ge,height:X})=>{const fe=I(F),Ne={left:G??fe.left,right:ye??fe.right,width:ge??fe.width,height:X??fe.height};Y(F,Ve.COL_RECT,Ne)},K=bn.debounce((F,G)=>{r.length=0,r.push(...k(F)),D(),b(),G==null||G()}),j=(F,G=!1)=>{Y(F,Ve.IS_HIDDEN,G)},P=(F,G)=>{Y(F,Ve.RESIZE_WIDTH,G)},ee=(F,G)=>{const{type:ye,fn:ge,scope:X,active:fe}=G,Ne={[Ve.COL_SORT_TYPE]:ye,[Ve.COL_SORT_FN]:ge,[Ve.COL_SORT_ACTIVE]:fe,[Ve.COL_SORT_SCOPE]:X};[Ve.COL_SORT_TYPE,Ve.COL_SORT_FN,Ve.COL_SORT_ACTIVE,Ve.COL_SORT_SCOPE].forEach(Le=>{Ne[Le]!==void 0&&Y(F,Le,Ne[Le])})},J=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[Ve.COL_FILTER_OBJ],G)},q=[Ve.WIDTH],R=(F,G=q)=>se(F,G[0])??se(F,G[1])??se(F,G[2]),z=F=>se(F,Ve.IS_HIDDEN)??!1,Q=F=>se(F,Ve.COL_UID),ne=(F,G,ye)=>{[Ve.COL_SORT_FN,Ve.COL_SORT_SCOPE,Ve.COL_SORT_TYPE].includes(G)&&h(F,{[G]:ye}),[Ve.COL_FILTER_FN,Ve.COL_FILTER_VALUES].includes(G)&&g(F,{[G]:ye})},oe=(F,G)=>{const ye=y.findIndex(fe=>fe===F),ge=R(F)-G,X=y[ye+1];X&&Y(X,Ve.WIDTH,R(X)+ge)},Y=(F,G,ye)=>{ne(F,G,ye);const ge=n.get(F);if(ge&&Object.prototype.hasOwnProperty.call(ge,G)){if(a.isRef(ge[G])){ge[G].value=ye;return}ge[G]=ye}},de=(F,G)=>{const ye=G||F.checked||[],ge=F.fields||[];r.forEach(X=>{Y(X,Ve.IS_HIDDEN,Hm(ge,X,ye))})},se=(F,G)=>{var ge;const ye=(ge=n.get(F))==null?void 0:ge[G];return a.isRef(ye)?ye.value:ye},pe=(F,G)=>{var ye;return(ye=n.get(F))==null?void 0:ye[G]},ve=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:w,needRowSpan:E,tableColumnSchema:n,tableColumnList:r,visibleColumns:y,debounceUpdateColumns:K,sortColumns:o,filterColumns:c,columnGroup:u,columnGroupMap:d,clearColumnSort:()=>{r.forEach(F=>{Y(F,Ve.COL_SORT_ACTIVE,!1),Y(F,Ve.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=y.find(G=>G.type==="selection");F&&(Y(F,Ve.SELECTION_VAL,!1),Y(F,Ve.SELECTION_INDETERMINATE,!1))},formatColumns:D,flatColumnTemplate:k,isHiddenColumn:z,getColumnId:Q,getColumnOrderWidth:R,getColumnAttribute:se,getHeadColumnClass:(F,G)=>({...ve(F,G)}),getColumnClass:ve,getFixedStlye:A,getColumnRect:I,getColumnCustomClass:(F,G)=>{const ye=F.className;if(ye){if(typeof ye=="function")return ye(G);if(typeof ye=="string")return ye}return""},getColumnRefAttribute:pe,getColumnCalcWidth:W,getColumnWidth:B,getLeftColumnsWidth:(F,G=!1)=>{let ye=!0,ge=0,X=0;for(;ye&&X<y.length;){if(F===y[X]){G&&(ge=ge+B(y[X])),ye=!1;break}ge=ge+B(y[X]),X=X+1}return ge},getGroupAttribute:L,getPreColumn:F=>{const ye=y.findIndex(ge=>ge===F)-1;return y[ye]},getColumnIndex:F=>y.findIndex(G=>G===F),resolveEventListener:O,setColumnIsHidden:j,setColumnResizeWidth:P,setColumnSortOption:ee,setColumnFilterOption:J,setColumnAttributeBySettings:de,setColumnAttribute:Y,setColumnSortActive:(F,G)=>{e.colSortBehavior===n5.independent&&r.forEach(ye=>{Y(ye,Ve.COL_SORT_ACTIVE,!1)}),Y(F,Ve.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:U,setVisibleColumns:b,setNextColumnWidth:oe,resolveColsCalcWidth:f}},eX=(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(N=>{r.addEventListener(N,w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move"})});let s=null,o="";const c=(N,w)=>{if(w==="--top"){N.parentNode.insertBefore(r,N);return}if(N.nextElementSibling===null){N.parentNode.append(r);return}N.parentNode.insertBefore(r,N.nextElementSibling)},u=N=>{e.rowDraggable&&(N==null||N())},d=N=>N.target.closest("tr"),h=(N,w)=>{const{y:E}=w,{top:x,bottom:_}=N.getBoundingClientRect(),O=E-x>_-E?"--bottom":"--top";m(N),N.classList.add(O),c(N,O)},m=(N,w=["--bottom","--top"])=>{w.forEach(E=>N.classList.remove(E))};return{onDragenter:N=>{const w=d(N);N.preventDefault(),N.stopPropagation(),u(()=>{N.dataTransfer.dropEffect="move",w.classList.add("--drag-enter"),h(w,N),s=w})},onDragleave:N=>{u(()=>{const w=d(N);o=w.classList.contains("--bottom")?"--bottom":"--top",m(w,["--drag-enter","--bottom","--top"])})},onDragstart:N=>{u(()=>{const w=d(N);r.style.setProperty("height",`${w.offsetHeight}px`),r.style.setProperty("width",`${w.offsetWidth}px`),w.classList.add("--drag-start"),N.dataTransfer.setDragImage(w,0,0),N.dataTransfer.setData("text/plain",null),N.dataTransfer.dropEffect="move";const{rowIndex:E}=N.target.dataset;N.dataTransfer.setData("data-row-index",E)})},onDragover:N=>{N.preventDefault(),N.stopPropagation(),N.dataTransfer.dropEffect="move";const w=d(N);h(w,N)},onDragend:N=>{var O;if(N.preventDefault(),N.stopPropagation(),r.remove(),!s)return;const w=s,{rowIndex:E}=w.dataset;let x=Number(E);const _=(O=N.target.dataset)==null?void 0:O.rowIndex;o==="--bottom"&&(x=x+1),t.changePageRowIndex(Number(_),x),s=null,o="",n.emit(Lt.DRAG_END,{sourceEvent:N,data:t.pageRowList})}}},tX=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(m=>!!m.fixed&&m.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(m=>!!m.fixed&&m.fixed==="right")),s=a.reactive({left:0,width:"0"}),o=a.reactive({right:0,width:"0"}),c=()=>{let m=0;const{length:f}=r.value;for(let y=f-1;y>=0;y--){const b=r.value[y],C=t.getColumnWidth(b);t.setColumnRect(b,{right:m,width:C}),t.setFixedStyle(b,{right:`${m}px`}),m=m+C}let g=0;n.value.forEach(y=>{const b=t.getColumnWidth(y);t.setColumnRect(y,{left:g,width:b}),t.setFixedStyle(y,{left:`${g}px`}),g=g+b}),s.width=`${g}px`,o.width=`${m}px`},u=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,d=()=>{if(r.value.length>0)return a.createVNode("div",{style:o,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[u(),d()],resolveFixedColumnStyle:c}},nX=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)])}}}),rX=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var c;return typeof n.value=="boolean"?{loading:!!n.value||(((c=e.fixedBottom)==null?void 0:c.loading)??!1),inline:!0,title:"",size:gs.Normal,mode:s2.Default,indicator:null}:n.value},s=a.computed(()=>{var c;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((c=e.fixedBottom)==null?void 0:c.loading)??!1)});return{renderScrollLoading:()=>{var c,u,d,h;if(s.value){const{loading:m,size:f,mode:g,title:y,inline:b,indicator:C}=r();return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??a.createVNode(ka,{loading:m,size:f,mode:g,title:y,inline:b,indicator:C},null)}return((h=(d=t.slots).fixedBottom)==null?void 0:h.call(d))??null}}},aX=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),o=a.ref(null),c=a.ref(0),u=a.ref(0),d=a.ref(0),h=a.ref(-1e4),m=a.ref(0),f=a.reactive({}),g=a.reactive([]),y=a.ref(Va),b=a.ref(1),C=a.computed(()=>{var ge,X,fe;return(ge=t.slots)!=null&&ge.fixedBottom&&((X=e.fixedBottom)==null?void 0:X.position)==="relative"?((fe=e.fixedBottom)==null?void 0:fe.height)??Va:0}),{resolveClassName:N}=_e(),{renderScrollLoading:w}=rX(e,t),E=a.computed(()=>Ue({[N("table")]:!0},zY(e.border))),x=a.computed(()=>({height:ps(e.height),maxHeight:ps(e.maxHeight),minHeight:ps(e.minHeight)})),_=a.computed(()=>Ue({[N("table-head")]:!0,"has-settings":!!e.settings,"has-group":b.value>1})),O=()=>{var fe,Ne,Le,Me;const ge=m.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,X=c.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--shadow-right",ge),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--shadow-left",X)},T=$g(()=>{var ge,X,fe,Ne,Le,Me,ze,Qe,at,Ke;(X=(ge=n.value)==null?void 0:ge.style)==null||X.setProperty("--drag-offset-x",`${h.value+c.value}px`),(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--drag-offset-h-x",`${h.value-2}px`),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--translate-y",`${u.value}px`),(Qe=(ze=n.value)==null?void 0:ze.style)==null||Qe.setProperty("--translate-x",`${c.value}px`),(Ke=(at=n.value)==null?void 0:at.style)==null||Ke.setProperty("--translate-x-1",`-${c.value}px`),O()}),k=ge=>{c.value=ge,T()},L=ge=>{b.value=ge},D=ge=>{u.value=ge,T()},V=()=>{var ge,X,fe,Ne,Le,Me,ze,Qe,at,Ke;(X=(ge=n.value)==null?void 0:ge.style)==null||X.setProperty("--drag-offset-x","-1000px"),(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--drag-offset-h-x","-1000px"),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--translate-y","0px"),(Qe=(ze=n.value)==null?void 0:ze.style)==null||Qe.setProperty("--translate-x","0px"),(Ke=(at=n.value)==null?void 0:at.style)==null||Ke.setProperty("--translate-x-1","0px")},A=ge=>{h.value=ge,T()},I=R2(e),W=a.computed(()=>Bt(I,"height",["thead"])*b.value),B=a.computed(()=>{var ge;return{"--row-height":`${W.value}px`,"--background-color":Q4[((ge=e.thead)==null?void 0:ge.color)??Td.DEF1],paddingRight:e.scrollbar?null:`${Z4}px`}}),U={[N("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},K=a.computed(()=>Ue({[N("table-footer")]:!0,"is-hidden":oe.value===0})),j=ge=>a.createVNode("div",{ref:n,style:x.value,class:E.value},[ge,a.createVNode(nX,null,{default:()=>{var X,fe;return[(fe=(X=t.slots).default)==null?void 0:fe.call(X)]}})]),P=(ge,X,fe)=>a.createVNode("div",{ref:r,style:B.value,class:_.value},[ge==null?void 0:ge(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:be},[fe==null?void 0:fe()]),X==null?void 0:X()]),ee=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),J=()=>t.slots.prepend?a.createVNode("div",{style:ee.value,class:"prepend-row"},[t.slots.prepend()]):null,q=a.ref("auto"),R=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${x.value.maxHeight}`)){const ge=e.showHead?W.value:0,X=oe.value+ge+C.value;return`calc(${x.value.maxHeight} - ${X}px)`}return null}),z=ge=>ge-W.value-C.value-oe.value,Q=(ge,X=!0)=>{if(X){q.value=z(ge);return}q.value=ge},ne=ge=>{q.value=ge},oe=a.ref(0),Y=a.computed(()=>({"--footer-height":`${oe.value}px`})),de=ge=>{oe.value=ge},se=bn.debounce((...ge)=>{t.emit(Lt.SCROLL_BOTTOM,{...ge})}),pe=()=>{var fe,Ne,Le,Me;const ge=((Ne=(fe=s.value)==null?void 0:fe.refRoot)==null?void 0:Ne.scrollWidth)??0,X=((Me=(Le=s.value)==null?void 0:Le.refRoot)==null?void 0:Me.offsetWidth)??0;m.value=ge-X-(c==null?void 0:c.value)},ve=ge=>{y.value=ge},ie=ge=>{d.value=f.bottom??0;const X=ge[1],{translateX:fe,translateY:Ne,pos:Le={}}=X;k(fe),D(Ne),pe(),Object.assign(f,Le||{});const{bottom:Me}=Le;Me<=2&&d.value>Me&&se({...Le,translateX:fe,translateY:Ne})},le={column_drag_line:!0,"offset-x":!0,"resize-column":!0},re=a.computed(()=>({[N("table-body-content")]:!0,[N("stripe")]:e.stripe})),be=a.computed(()=>({[N("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),ae=N("table-fixed-bottom"),Ce=a.computed(()=>{var ge,X,fe;return{minHeight:`${((ge=e.fixedBottom)==null?void 0:ge.minHeight)??Va}px`,position:((X=e.fixedBottom)==null?void 0:X.position)??"absolute",height:((fe=e.fixedBottom)==null?void 0:fe.height)??null}});a.onMounted(()=>{pe(),V()});const te=()=>{const ge=w==null?void 0:w();return ge?a.createVNode("div",{style:Ce.value,class:ae},[ge]):null};return{renderContainer:j,renderHeader:P,renderBody:(ge,X,fe)=>a.createVNode(cl,{ref:s,height:q.value,class:U,contentClassName:re.value,enabled:e.virtualEnabled,lineHeight:y.value,list:ge,maxHeight:R.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:ie},{beforeContent:()=>J(),default:Ne=>X==null?void 0:X((Ne==null?void 0:Ne.data)??[]),afterSection:()=>[a.createVNode("div",{class:le},null),a.createVNode("div",{class:be.value},[fe==null?void 0:fe()])]}),renderFooter:ge=>a.createVNode("div",{ref:o,style:Y.value,class:K.value},[ge]),renderFixedBottom:()=>te(),getBodyHeight:z,setBodyHeight:Q,setVirtualBodyHeight:ne,setFootHeight:de,setTranslateX:k,setDragOffsetX:A,setFixedColumns:ge=>{g.length=0,g.push(...ge)},setOffsetRight:pe,setLineHeight:ve,setHeaderRowCount:L,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:o}},sX=(e,t,n=[],r=!0)=>{let s=null;const o=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{na(e.value)&&(o(),s=l5(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},iX=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=u=>{Object.assign(t,{enabled:!!e.pagination},u),t.current>r.value&&(t.current=1)},o=(u=!0)=>{n.value=!u};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 c=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:c,setPagination:s,disabledPagination:o}},oX=a.defineComponent({name:"BodyEmpty",props:{list:v.array.def([]),filterList:v.array.def([]),emptyText:v.string},emits:["change"],setup(e){const t=dt("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(_d,{description:n.value,scene:"part",type:r.value},null)}}),ah=a.defineComponent({name:"TableCell",props:{column:Ed,row:v.any.def({}),parentSetting:M2,title:v.string.def(void 0),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),isHead:v.bool.def(!1),isExpandChild:v.bool.def(!1),headExplain:v.string,resizerWay:Ie("ResizerWay",{default:t5.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),o=a.computed(()=>({textAlign:e.column.textAlign,minWidth:ps(e.column.minWidth,null)})),c=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:w="",mode:E=void 0,popoverOption:x={}}=e.column.showOverflowTooltip,_={showOverflowTooltip:{content:w,disabled:!e.column.showOverflowTooltip,mode:E,resizerWay:void 0,watchCellResize:void 0,popoverOption:x,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(_.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(_.showOverflowTooltip,e.column.showOverflowTooltip)),_}return{showOverflowTooltip:e.parentSetting}};let u=null;const d=(w=!1)=>{var x;const E=m();return w?((x=E==null?void 0:E.cloneNode)==null?void 0:x.call(E,!0))??"":(E==null?void 0:E.innerText)??""},h=()=>{var D,V;const{showOverflowTooltip:w=!1}=c();let E=!0,{resizerWay:x}=e;const _=d(w.allowHtml);let O=()=>_,T={},k="auto",L=!0;if(typeof w=="boolean"&&(E=!w),typeof w=="object"&&(E=w.disabled,T=w.popoverOption,x=w.resizerWay||"debounce",O=()=>w.content||_,typeof w.content=="function"&&(O=()=>w.content(e.column,e.row)),L=w.watchCellResize,k=w.mode||"auto"),typeof E=="function"&&(E=Reflect.apply(E,this,[e.column,e.row])),e.column.explain){let A=!0;typeof w=="boolean"&&(A=!w),typeof w=="object"&&(A=w.disabled),E=A,k="static",typeof e.column.explain=="object"&&(O=()=>Bt(e.column.explain,"content",[e.column,e.row])||_)}return e.isHead&&(E=!(((V=(D=e.column)==null?void 0:D.showOverflowTooltip)==null?void 0:V.showHead)??!0),k="auto",O=()=>{var A,I;return((I=(A=m())==null?void 0:A.cloneNode)==null?void 0:I.call(A,!0))??""},e.headExplain&&(k="static",O=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(E=!0),{disabled:E,content:O,mode:k,resizerWay:x,watchCellResize:L,popoverOption:T}},m=()=>{var w,E;return e.isHead?(E=(w=n.value)==null?void 0:w.querySelector)==null?void 0:E.call(w,".head-text"):n.value},f=()=>{const w=m();if(!w||!na(w))return;const{mode:E,disabled:x}=h();if(r.value=!x,E==="auto"&&(r.value=eg(w)),E==="static"&&(r.value=!0),r.value){const _=a.ref(h());u===null&&(u=f2(w,{disabled:_.value.disabled,content:_.value.content,mode:_.value.mode,popoverOption:_.value.popoverOption}))}else u==null||u.destroyInstance(w),u=null};let g=null;const y=()=>{const{disabled:w,resizerWay:E,watchCellResize:x}=h();w||(f(),x!==!1&&e.observerResize&&(g=l5(n.value,()=>{f()},60,!0,E),g.start()))};let b=null;const C=()=>{e.intersectionObserver&&(b=new IntersectionObserver(w=>{if(w[0].intersectionRatio<=0){s.value=!1,u==null||u.destroyInstance(n.value);return}s.value=!0,y()},{threshold:.5}),b==null||b.observe(n.value))};a.onMounted(()=>{C(),s.value&&y()}),a.onBeforeUnmount(()=>{g==null||g.disconnect(),g=null,u==null||u.destroyInstance(n.value),b==null||b.disconnect(),b=null});const N=e.headExplain||e.column.explain;return()=>{var w;return a.createVNode("div",{ref:n,style:o.value,class:["cell",e.column.type,N?"explain":""]},[s.value?(w=t.default)==null?void 0:w.call(t):"--"])}}}),_c=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)])}}),lX=({props:e,rows:t,ctx:n,columns:r,row:s,index:o,column:c,isChild:u=!1,multiShiftKey:d})=>{const{isShiftKeyDown:h,getStore:m,setStore:f,setStoreStart:g,clearStoreStart:y}=d,b=()=>{const T=(A,I)=>{I.stopImmediatePropagation(),I.preventDefault(),I.stopPropagation(),h.value||(A?g(s,o):y()),t.setRowSelection(s,A),r.setColumnAttribute(c,Ve.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(c,Ve.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(Lt.ROW_SELECT,{row:s,index:o,checked:A,data:e.data}),n.emit(Lt.ROW_SELECT_CHANGE,{row:s,index:o,checked:A,data:e.data})},k=()=>{if(h.value){const A=f(s,o);if(A){const{start:I,end:W}=m(),B=I.index<W.index?I.index:W.index,U=I.index<W.index?W.index:I.index;(t.pageRowList.slice(B,U+1)??[]).forEach(K=>{vu(e,{row:s,index:o,isCheckAll:!1})&&t.setRowSelection(K,!0)})}return n.emit(Lt.ROW_SELECT,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(Lt.ROW_SELECT_CHANGE,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!A)}return Promise.resolve(!0)},L=t.getRowAttribute(s,Xe.ROW_SELECTION_INDETERMINATE),D=t.getRowAttribute(s,Xe.ROW_SELECTION),V=vu(e,{row:s,index:o,isCheckAll:!1});return a.createVNode(on,{beforeChange:k,disabled:!V,indeterminate:L,modelValue:D,onChange:T},null)},C=T=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(k=>k===T):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:T,row:s,column:c}):bn.isEmpty(T),N=()=>{var L;const T=()=>{if(Bt(c,"type",[c,s])==="index")return t.getRowAttribute(a.toRaw(s),Xe.ROW_INDEX);const V=Bt(c,"field",[c,s]),A=gu(s,V);if(typeof c.render=="function")return w();if(typeof A=="boolean"||typeof A=="number")return`${A}`;if(typeof A=="object"&&A!==null)return JSON.stringify(a.unref(A));if(C(A)){const{emptyCellText:I}=e;if(I)return typeof I=="function"?I({row:s,column:c,index:o}):I}return A},k={expand:()=>u?"":_(),selection:()=>b(),drag:O};return((L=k[c.type])==null?void 0:L.call(k,s,c,o,t))??T()},w=()=>{const T=gu(s,Bt(c,"field",[c,s])),k=s;return c.render({cell:T,data:k,row:s,column:c,index:o,rows:t.tableRowList.value})},E=()=>{var L,D;const k=t.getRowAttribute(s,Xe.ROW_EXPAND)?a.createVNode(Qo,null,null):a.createVNode(rl,null,null);return a.createVNode("span",null,[[k,((D=(L=n.slots).expandContent)==null?void 0:D.call(L,s))??""]])},x=T=>{t.setRowExpand(s,!t.getRowAttribute(s,Xe.ROW_EXPAND)),n.emit(Lt.ROW_EXPAND_CLICK,{row:s,column:c,index:o,rows:t.tableRowList.value,e:T})},_=()=>{const T=()=>{var k,L;return typeof c.render=="function"?w():((L=(k=n.slots).expandCell)==null?void 0:L.call(k,{row:s,column:c,index:o,rows:t}))??E()};return a.createVNode("span",{class:"expand-btn-action",onClick:k=>x(k)},[T()])},O=()=>{var D,V,A;const T=((D=e.rowDraggable)==null?void 0:D.render)??e.rowDraggable;if(typeof T=="function")return T(s,c,o,t.tableRowList.value);const k=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((A=e.rowDraggable)==null?void 0:A.icon)??a.createVNode(ed,{style:`'--font-size: ${k};'`,class:"drag-cell"},null)};return{renderCell:N}},u5=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(g){const y=g.trim().split(" ").map(b=>Number.parseFloat(b));return y.length===1?{distanceLeft:y.at(0),distanceRight:y.at(0)}:y.length===2?{distanceLeft:y.at(1),distanceRight:y.at(1)}:y.length===3||y.length===4?{distanceLeft:y.at(y.length-1),distanceRight:y.at(1)}:{distanceLeft:0,distanceRight:0}}const o=getComputedStyle(n),c=o.getPropertyValue("padding"),u=o.getPropertyValue("margin"),d=o.getPropertyValue("border");r.borderSize=Number.parseFloat(o.getPropertyValue("border-left-width"))+Number.parseFloat(o.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(o.getPropertyValue("padding-left"))+Number.parseFloat(o.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(o.getPropertyValue("margin-left"))+Number.parseFloat(o.getPropertyValue("margin-right"));const h=c!==""&&c!=="0px"&&c!==void 0,m=u!==""&&u!=="0px"&&u!==void 0,f=d!==""&&d.indexOf("0px")===-1&&d!==void 0;if(h){const{distanceLeft:g,distanceRight:y}=s(c);r.paddingSize=g+y}if(m){const{distanceLeft:g,distanceRight:y}=s(u);r.marginSize=g+y}return f&&(r.borderSize=Number.parseFloat(o.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var u,d;const o=s.value[n],c=(u=r.value)==null?void 0:u.querySelector(".bk-checkbox-label");if(o&&c){const m=e(o),f=e(c),g=e(r.value),y=(o==null?void 0:o.offsetWidth)+(m==null?void 0:m.borderSize)+(m==null?void 0:m.marginSize)+(m==null?void 0:m.paddingSize)+(g==null?void 0:g.borderSize)+(g==null?void 0:g.marginSize)+(g==null?void 0:g.paddingSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize),b=((d=r.value)==null?void 0:d.offsetWidth)||0;if((o==null?void 0:o.offsetWidth)>b||16+y>b)return!0}return!1}}};function Bm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Sc=32,cX=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:Rr},props:{column:Ed,height:v.number.def(Sc)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=_e(),{resolveOverflowTips:r}=u5(),s=dt("table"),o=a.computed(()=>{var P;return(P=e.column)==null?void 0:P.filter}),c=a.computed(()=>{var P;return((P=o.value)==null?void 0:P.checked)??[]}),u=a.ref(""),d=a.ref(),h=a.ref([]),m=a.reactive({isOpen:!1,checked:[]});m.checked.push(...c.value),a.watch(()=>c,P=>{m.checked.length=0,m.checked=[],m.checked.push(...P.value)},{deep:!0});const f=a.computed(()=>Ue({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:m.checked.length,opened:m.isOpen})),g=Ue({[n("table-head-filter")]:!0}),y=a.ref(null),b=P=>{m.isOpen=P,P&&setTimeout(()=>{var ee;(ee=y.value)==null||ee.reset()}),P||(u.value="")},C=`light ${n("table-head-filter")}`,N=a.computed(()=>{const{list:P=[]}=o.value;return P.filter(J=>{const q=T(u.value);return q.test(J.label)||q.test(J.text)||q.test(J.value)})}),w=5,E=a.computed(()=>{var P;return((P=o.value)==null?void 0:P.maxHeight)??Sc*w}),x=a.computed(()=>{const{height:P,list:ee=[]}=o.value;return P||ee.length*Sc}),_=a.computed(()=>{const P=Sc*2;return N.value.length>w?E.value:P}),O=a.computed(()=>({maxHeight:`${E.value}px`,minHeight:`${_.value}px`,height:/%$/.test(`${x.value}`)?x.value:`${x.value}px`})),T=(P,ee="ig")=>new RegExp(`${P}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ee),k=()=>{L(!0),t("filterSave",m.checked),m.isOpen=!1},L=(P=!1)=>{const{disabled:ee}=V(A,s.value.confirm);if(ee||P){if(o.value==="custom"){t("change",m.checked,null),m.isOpen=!1;return}t("change",m.checked)}},D=()=>{m.checked.length&&(m.checked.length=0,m.isOpen=!1,t("change",m.checked),t("reset",m.checked))},V=(P,ee)=>({disabled:P==="disabled"||P===!1,text:typeof P=="string"?P:ee}),{btnSave:A,btnReset:I}=o.value,W=()=>{const{disabled:P,text:ee}=V(A,s.value.confirm);return P?a.createVNode("span",{class:"btn-filter-save disabled"},[ee]):a.createVNode(Ht,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:k},Bm(ee)?ee:{default:()=>[ee]})},B=()=>{const{disabled:P,text:ee}=V(I,s.value.reset);return P?"":a.createVNode(Ht,{style:"width: 56px;",disabled:m.checked.length===0,size:"small",onClick:D},Bm(ee)?ee:{default:()=>[ee]})},U=(P,ee)=>{const J=new Set(m.checked);P?J.add(ee.value):J.delete(ee.value),m.checked.length=0,m.checked.push(...Array.from(J)),o.value.checked=[...m.checked],L()},K=async()=>{await new Promise(P=>setTimeout(P,0)),N.value.forEach(P=>{Object.prototype.hasOwnProperty.call(P,"showOverflowTooltip")||(P.showOverflowTooltip=r(`list-item-${P.value}-ref`,d,h))})},j=P=>P.length?(K(),P.map(ee=>a.withDirectives(a.createVNode("div",{key:ee.value,ref:d,class:"list-item"},[a.createVNode(on,{checked:m.checked.includes(ee.value),immediateEmitChange:!1,label:ee.value,modelValue:m.checked.includes(ee.value),onChange:J=>U(J,ee)},{default:()=>[a.createVNode("span",{ref:J=>h.value[`list-item-${ee.value}-ref`]=J},[`${ee.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:ee.tipKey||ee.text,placement:"right",disabled:!ee.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(Cn,a.mergeProps({arrow:!1,isShow:m.isOpen,offset:0,placement:"bottom-start",renderType:Su.SHOWN,trigger:"click"},{theme:C},{onAfterHidden:()=>b(!1),onAfterShow:()=>b(!0)}),{default:()=>a.createVNode(Qu,{class:f.value},null),content:()=>a.createVNode("div",{class:g},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(Ma,{modelValue:u.value,"onUpdate:modelValue":P=>u.value=P},null)]),a.createVNode(pd,{class:"content-list"},{default:()=>[a.createVNode("div",{style:O.value,class:"content-items"},[j(N.value)])]}),a.createVNode("div",{class:"content-footer"},[W(),B()])])})}}),uX=a.defineComponent({name:"HeadSort",props:{column:Ed,defaultSort:v.oneOf(qK).def(Ut.NULL),active:v.bool,sortValFormat:v.arrayOf(v.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var d,h;const{resolveClassName:r}=_e(),s=((h=(d=e.column)==null?void 0:d.sort)==null?void 0:h.value)??e.defaultSort??Ut.NULL,o=a.ref(s);a.watch(()=>[e.defaultSort],([m])=>{o.value=m},{immediate:!0});const c=m=>{o.value=m},u=(m,f)=>{m.stopImmediatePropagation(),m.stopPropagation(),m.preventDefault(),t("change",{type:f,isCancel:f===o.value})};return n({setNextSortType:c}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Fu,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&o.value===Ut.ASC?"active":""],onClick:m=>u(m,Ut.ASC)},null),a.createVNode(qo,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&o.value===Ut.DESC?"active":""],onClick:m=>u(m,Ut.DESC)},null)])}});function dX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const fX=({props:e,columns:t,rows:n,ctx:r,column:s,index:o})=>{var B;const c=a.ref(t.getColumnAttribute(s,Ve.COL_SORT_TYPE)),u=a.ref(t.getColumnAttribute(s,Ve.COL_SORT_ACTIVE)),d=a.toRaw(s),h=a.ref(null),m=U=>{const{isCancel:K,type:j=t.getColumnRefAttribute(s,Ve.COL_SORT_TYPE)}=U??{},P=K?Ut.NULL:j,ee=c5(s,P,e.sortValFormat);t.setColumnAttribute(s,Ve.COL_SORT_TYPE,P),t.setColumnAttribute(s,Ve.COL_SORT_FN,ee),t.setColumnSortActive(s,P!==Ut.NULL),c.value=P,u.value=P!==Ut.NULL,r.emit(Lt.COLUMN_SORT,{column:s,index:o,type:P})},f=()=>a.createVNode(uX,{active:u.value,column:s,defaultSort:c.value,sortValFormat:e.sortValFormat,onChange:m},null),g=()=>{const U=P=>{r.emit(Lt.COLUMN_FILTER,{checked:P,column:a.unref(s),index:o})},K=P=>{t.setColumnAttribute(s,Ve.COL_FILTER_VALUES,P),r.emit(Lt.COLUMN_FILTER_SAVE,{values:P})},j=()=>{t.setColumnAttribute(s,Ve.COL_FILTER_VALUES,[]),r.emit(Lt.COLUMN_FILTER,{checked:[],column:a.unref(s),index:o})};return a.createVNode(cX,{height:e.headHeight,column:s,onChange:U,onFilterSave:K,onReset:j},null)},y=R2(e),{cellFn:b}=y,C=()=>typeof b=="function"?b({index:o,column:s}):typeof s.renderHead=="function"?s.renderHead({index:o,column:s}):Bt(s,"label",[o]),N=()=>{const U=[];s.sort&&U.push(f()),s.filter&&U.push(g());const K=C();U.unshift(a.createVNode("span",{class:"head-text"},[K]));const j=typeof K=="string"?K:void 0,P={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:U,showTitle:j,headClass:P}},w=(U,K="current")=>{t.setColumnAttribute(s,Ve.SELECTION_VAL,U),t.setColumnAttribute(s,Ve.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(U),r.emit(Lt.ROW_SELECT_ALL,{checked:U,data:e.data,type:K})},E=U=>{w(!0,U)},{resolveClassName:x}=_e(),_=x("across-page-popover"),O=()=>{const U=t.getColumnAttribute(s,Ve.SELECTION_DISABLED),K=t.getColumnAttribute(s,Ve.SELECTION_VAL),j=t.getColumnAttribute(s,Ve.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(on,{disabled:U,indeterminate:j,modelValue:K,outline:!0,onChange:P=>w(P)},null),a.createVNode(Cn,{ref:h,extCls:_,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:()=>E("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>E("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(on,{disabled:U,indeterminate:j,modelValue:K,onChange:P=>w(P)},null)},T=()=>{if(s.type==="selection")return[O()];const{headClass:U,showTitle:K,cells:j}=N();return a.createVNode(ah,{class:U,column:s,headExplain:Bt(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:K},dX(j)?j:{default:()=>[j]})},k=()=>{if(!t.getColumnAttribute(s,Ve.COL_IS_DRAG)&&s.sort&&!s.filter){const K={isCancel:!1,type:YY(t.getColumnRefAttribute(s,Ve.COL_SORT_TYPE))};m(K)}},L=Object.assign(t.getFixedStlye(s),{"--background-color":Q4[((B=e.thead)==null?void 0:B.color)??Td.DEF1]}),D=t.getGroupAttribute(d),V=a.computed(()=>[t.getHeadColumnClass(s,o),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(D==null?void 0:D.offsetLeft)+1===t.visibleColumns.length}]),A=a.computed(()=>V.value.concat([{"is-head-group":D==null?void 0:D.isGroup,"is-head-group-child":!!(D!=null&&D.parent)}])),I=()=>Bt(s,"label",[o,s]);return{getTH:()=>D!=null&&D.isGroup?a.createVNode("th",{style:L,class:A.value,colspan:D==null?void 0:D.thColspan,rowspan:D==null?void 0:D.thRowspan},[I()]):a.createVNode("th",a.mergeProps({style:L,class:V.value,colspan:D==null?void 0:D.thColspan,"data-id":t.getColumnId(s),rowspan:D==null?void 0:D.thRowspan,onClick:()=>k()},t.resolveEventListener(s,o)),[T()])}},hX=e=>{const t=a.ref(!1),n={start:null,end:null},r=f=>{f.key==="Shift"&&(t.value=!0)},s=f=>{f.key==="Shift"&&(t.value=!1,d())},o=(f,g)=>{n.start={index:g??null,row:f??null}},c=()=>{o()},u=(f,g)=>n.start===null&&n.end===null?(n.start={index:g,row:f},!1):(n.end={index:g,row:f},!0),d=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:u,getStore:()=>n,clearStore:d,setStoreStart:o,clearStoreStart:c,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function mX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gX=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const o=dt("table"),c=lr();let u={};const d=hX(e),h=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((A,I)=>{const W=`${BY(n.getColumnOrderWidth(A))}`.replace(/px$/i,""),B=n.getColumnAttribute(A,Ve.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:ps(W,"auto"),minWidth:ps(B,"auto")}},null)})]),m=()=>{const A=R2(e),I={"--row-height":`${Bt(A,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:I},[n.columnGroup.map((W,B)=>a.createVNode("tr",null,[W.map((U,K)=>{if(n.isHiddenColumn(U))return null;const{getTH:j}=fX({props:e,ctx:t,columns:n,column:U,index:K,rows:r,rowIndex:B});return j()})]))])])},f=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[h(),m()]):null,g=()=>{const A="append-last-row",I=[...Ys(e.rowStyle,[]),{"--row-height":`${b(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(_c,{key:A},{default:()=>{var W,B;return[a.createVNode("tr",{key:A,style:I},[a.createVNode("td",{colspan:n.visibleColumns.length},[((B=(W=e.appendLastRow).cellRender)==null?void 0:B.call(W,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(_c,{key:A},{default:()=>[a.createVNode("tr",{key:A,style:I},[n.visibleColumns.map((W,B)=>a.createVNode("td",null,[a.createVNode(ah,null,{default:()=>{var U,K;return[((K=(U=e.appendLastRow).cellRender)==null?void 0:K.call(U,W,B))??W.field??W.prop]}})]))])]})},y=A=>{let I={};const W=new WeakMap,B=n.needRowSpan.value;return a.createVNode("tbody",null,[A.map((U,K)=>{const j=T(U,K,I,A,W,B);return I=U,j}),g()])},b=r.getRowHeight,C=A=>{u=A},N=A=>{var B,U;const I=A??r.pageRowList,W=a.computed(()=>e.emptyText===void 0?o.value.emptyText:e.emptyText);return I.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":c},[h(),y(I)]):((U=(B=t.slots).empty)==null?void 0:U.call(B))??a.createVNode(oX,{emptyText:W.value,filterList:I,list:e.data},null)},w=(A,I,W,B)=>{var K;((K=A.target)==null?void 0:K.tagName)!=="INPUT"&&t.emit(Lt.ROW_CLICK,A,I,W,B)},E=(A,I,W,B)=>{t.emit(Lt.ROW_DBL_CLICK,A,I,W,B)},x=(A,I,W,B)=>{t.emit(Lt.ROW_MOUSE_ENTER,A,I,W,B)},_=(A,I,W,B)=>{t.emit(Lt.ROW_MOUSE_LEAVE,A,I,W,B)},O=(A,I,W,B,U)=>{var ee;U.has(A)||U.set(A,new WeakMap),U.get(A).has(B)||U.get(A).set(B,{skipRowLen:0,skipRow:!1});let{skipRowLen:K=0}=((ee=U.get(W))==null?void 0:ee.get(B))??{},j=!1;const P=pu(B,null,A,I,"rowspan");return K>1?(K=K-1,j=!0):P>1&&(K=P,j=!1),Object.assign(U.get(A).get(B),{skipRowLen:K,skipRow:j}),{skipRowLen:K,skipRow:j}},T=(A,I,W,B,U,K,j=!1)=>{const P=B.length,ee=[...Ys(e.rowStyle,[A,I]),{"--row-height":`${b(A,I)}px`}],J=[...Ys(e.rowClass,[A,I]),`hover-${e.rowHover}`,I%2===1&&e.stripe?"stripe-row":""],q=r.getRowAttribute(A,Xe.ROW_UID);return[a.createVNode(_c,{key:q},{default:()=>[a.createVNode("tr",a.mergeProps({key:q,style:ee,class:J,"data-row-index":I,draggable:!!e.rowDraggable,onClick:R=>w(R,A,I,B),onDblclick:R=>E(R,A,I,B),onMouseenter:R=>x(R,A,I,B),onMouseleave:R=>_(R,A,I,B)},u),[n.visibleColumns.map((R,z)=>{const Q=[n.getFixedStlye(R),...Ys(e.cellStyle,[R,z,A,I])],{colspan:ne,rowspan:oe}=KY(R,z,A,I),{skipCol:Y}=n.getColumnAttribute(R,Ve.COL_SPAN),{skipRow:de}=K&&!j?O(A,I,W,R,U):{skipRow:!1},se={"expand-cell":R.type==="expand"};if(!de&&!Y){let pe;const ve=[n.getColumnClass(R,z),n.getColumnCustomClass(R,A),R.align||e.align,...Ys(e.cellClass,[R,z,A,I]),{"expand-row":r.getRowAttribute(A,Xe.ROW_EXPAND),"is-last":I+oe>=P}],ie=`${q}_${z}`,le=`${q}_${z}_cell`,{renderCell:re}=lX({props:e,rows:r,ctx:t,columns:n,row:A,index:I,column:R,isChild:j,multiShiftKey:d}),be=(ae,Ce)=>{const te={event:ae,row:A,column:R,cell:{getValue:()=>re()},rowIndex:I,columnIndex:z};t.emit(Ce,te)};return a.createVNode("td",{key:ie,style:Q,class:ve,colspan:ne,"data-id":ie,rowspan:oe,onClick:ae=>be(ae,Lt.CELL_CLICK),onDblclick:ae=>be(ae,Lt.CELL_DBL_CLICK)},[a.createVNode(ah,{key:le,class:se,column:R,"data-id":le,intersectionObserver:e.intersectionObserver,isExpandChild:j,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:A},mX(pe=re())?pe:{default:()=>[pe]})])}return null})])]}),k(A,J)]},k=(A,I,W)=>{if(r.getRowAttribute(A,Xe.ROW_EXPAND)){const U=[...I,{row_expend:!0}],j=`${r.getRowAttribute(A,Xe.ROW_UID)}_expand`;return Array.isArray(A.children)?A.children.map((P,ee)=>T(P,ee,{},A,{},!1,!0)):a.createVNode(_c,{key:j},{default:()=>{var P,ee;return[a.createVNode("tr",{class:U},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((ee=(P=t.slots).expandRow)==null?void 0:ee.call(P,A))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},L=A=>{s.setPagination({limit:A}),t.emit(Lt.PAGE_LIMIT_CHANGE,A)},D=A=>{if(typeof e.pagination=="object"&&A!==s.options.current){s.setPagination({current:A,value:A}),t.emit(Lt.PAGE_VALUE_CHANGE,A);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(Lt.PAGE_VALUE_CHANGE,A)},V=()=>{if(s.isShowPagination.value)return a.createVNode(k2,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:A=>D(A),onLimitChange:A=>L(A)}),null)};return a.onUnmounted(()=>{d.removeMultiCheckedEvents()}),{renderColumns:f,renderTBody:N,renderTFoot:V,setDragEvents:C}},pX=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=j=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(u(j)):Array.isArray(e.checked)?e.checked.some(P=>typeof P!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(j,e.selectionKey)?jY(j,e.selectionKey)===P:(console.warn("props.selectionKey is undefined or null or empty"),!1):xc(P)===xc(j)):!1:!1,o=(j,P,ee)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Bt(e,"rowHeight",[{index:P,type:ee??"tbody",row:j}]):Va,c=()=>{let j=!1,P=!1;n.value.forEach((ee,J)=>{const q=xc(ee);let R=qY(q,lr(),e);const z=s(q);z?j=!0:P=!0,t.has(q)||t.set(q,{[Xe.ROW_EXPAND]:!1,[Xe.ROW_SELECTION]:z,[Xe.ROW_UID]:R,[Xe.ROW_INDEX]:J+1,[Xe.ROW_SELECTION_INDETERMINATE]:!1});const Q=t.get(q);R=Q[Xe.ROW_UID],Q[Xe.ROW_INDEX]=J+1,Q[Xe.ROW_HEIGHT]=o(ee,J)}),t.set(os,{[Xe.ROW_SELECTION]:j,[Xe.ROW_SELECTION_INDETERMINATE]:j&&P})},u=(j,P)=>({row:j,index:P??d(j,Xe.ROW_INDEX),isSelectAll:d(os,Xe.ROW_SELECTION)}),d=(j,P)=>{var ee;return(ee=t.get(j))==null?void 0:ee[P]},h=j=>{t.set(JK,{[Xe.ROW_SPAN]:j})},m=(j,P)=>vu(e,{row:j,index:P})?d(j,Xe.ROW_SELECTION):!0,f=j=>{if(typeof e.isSelectedFn=="function"){T(j,e.isSelectedFn(u(j)));return}T(j,!d(j,Xe.ROW_SELECTION))},g=j=>{const P=j??!y();if(t.set(os,{[Xe.ROW_SELECTION]:P,[Xe.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((ee,J)=>T(ee,P,J));return}r.forEach((ee,J)=>T(ee,P,J))},y=()=>e.acrossAll?n.value.every((j,P)=>m(j,P)):r.every((j,P)=>m(j,P)),b=()=>e.acrossAll?n.value.some(j=>d(j,Xe.ROW_SELECTION)):r.some(j=>d(j,Xe.ROW_SELECTION)),C=j=>{g(j)},N=()=>{const j=y();O(os,Xe.ROW_SELECTION,j),O(os,Xe.ROW_SELECTION_INDETERMINATE,!j&&b())},w=()=>d(os,Xe.ROW_SELECTION_INDETERMINATE),E=()=>d(os,Xe.ROW_SELECTION),x=(j,P)=>{if(P){O(P,Xe.ROW_HEIGHT,j);return}n.value.forEach(ee=>O(ee,Xe.ROW_HEIGHT,j))},_=(j,P,ee)=>j?d(j,Xe.ROW_HEIGHT):o(j,P,ee),O=(j,P,ee)=>{const J=xc(j),q=t.get(J);q&&Object.prototype.hasOwnProperty.call(q,P)&&(q[P]=ee)},T=(j,P,ee)=>{let J=P;typeof e.isSelectedFn=="function"&&(J=e.isSelectedFn(u(j,ee))),vu(e,{row:j,index:ee??d(j,Xe.ROW_INDEX)})&&O(j,Xe.ROW_SELECTION,J),N()},k=(j,P)=>{O(j,Xe.ROW_INDEX,P)},L=(j,P)=>{O(j,Xe.ROW_EXPAND,P)},D=j=>{let P=0;const ee=50,J=()=>{const q=P+ee;r.push(...j.slice(P,q)),q<j.length&&(P=q,setTimeout(()=>{J()}))};if(j.length>ee){J();return}r.push(...j)};return{setRowIndex:k,setRowExpand:L,isRowChecked:m,setPageRowList:j=>{r.length=0,D(j)},setTableRowList:j=>{n.value.length=0,n.value.push(...j),c()},clearSelection:()=>{n.value.forEach(j=>T(j,!1))},formatDataSchema:c,toggleRowSelection:f,setRowSelectionAll:C,setRowSelection:T,setAllRowExpand:j=>{n.value.forEach(P=>L(P,j??!0))},setRowHeight:x,setTableIsNeedRowSpan:h,getRowAttribute:d,getRowSelection:()=>n.value.filter(j=>d(j,Xe.ROW_SELECTION)),getRowIndeterminate:w,getRowCheckedAllValue:E,getCurrentPageRowsHeight:()=>r.reduce((j,P)=>j+_(P),0),changePageRowIndex:(j,P)=>{const ee=r[j];r.splice(P,0,ee);const J=j<P?j:j+1;r.splice(J,1)},toggleAllSelection:g,getRowHeight:_,tableRowList:n,tableRowSchema:t,pageRowList:r}};function vX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const yX=(e,t,n,r)=>{const s=dt("table"),{resolveClassName:o}=_e(),{resolveOverflowTips:c}=u5(),u=YK(s),d=a.ref(!1),h=a.ref(),m=a.ref([]),f=(ne,oe)=>Bt(ne,["id","field","type"],[ne,oe]),g=()=>({enabled:!0,fields:e.columns.map(ne=>Object.assign({},ne,{field:ne.field||ne.type})),checked:[],limit:0,size:"small",sizeList:u,showLineHeight:!0,extCls:"",trigger:"manual",height:xo.small}),y=ne=>typeof ne=="boolean"&&ne!==!1?g():ne?Object.assign({},g(),ne):{enabled:!1},b=a.ref(null),C=a.reactive(g()),N=ne=>{Object.assign(C,y(ne))};a.watch(()=>[e.settings],()=>{N(e.settings)},{immediate:!0,deep:!0});const w=a.ref(C.size||"small"),E=a.ref(xo.small),x=a.ref(C.checked||[]),O=`light ${o("table-settings")}`,T=a.computed(()=>C.fields||e.columns||[]),k={checkAll:d.value,activeSize:w.value,activeHeight:E.value,checkedFields:C.checked||[]},L=()=>{var oe;Object.assign(k,{checkAll:d.value,activeSize:w.value,activeHeight:E.value,checkedFields:x.value});const ne={checked:x.value,size:w.value,height:E.value,fields:a.unref(T)};Object.assign(C,ne),n.setColumnAttributeBySettings(C,ne.checked),n.setVisibleColumns(),r==null||r(ne),(oe=b.value)==null||oe.hide(),t.emit(Lt.SETTING_CHANGE,ne)},D=()=>{var ne;d.value=k.checkAll,w.value=k.activeSize,E.value=k.activeHeight,x.value=k.checkedFields,(ne=b.value)==null||ne.hide()},V=()=>{var ne;C.trigger==="manual"&&((ne=b.value)==null||ne.show())},A=ne=>{ne.stopImmediatePropagation(),ne.stopPropagation(),ne.preventDefault(),d.value=!d.value;const oe=C.fields||e.columns||[],Y=oe.filter((de,se)=>de.disabled&&x.value.includes(f(de,se))).map((de,se)=>f(de,se));if(d.value){const de=oe.filter(se=>!se.disabled).map((se,pe)=>f(se,pe));x.value.splice(0,x.value.length,...de,...Y)}else x.value.splice(0,x.value.length,...Y)},I=a.computed(()=>(C.limit??0)>0),W=C.sizeList||u,B=a.computed(()=>I.value&&(C.limit?C.limit:0)<=x.value.length),U=(ne,oe)=>ne.disabled||B.value&&!x.value.includes(f(ne,oe)),K=ne=>{w.value=ne.value,E.value=ne.height},j=ne=>({"line-size":!0,"is-medium":w.value==="medium",active:ne.value===w.value}),P={marginRight:"12px"},ee=()=>W.map(ne=>a.createVNode("span",{class:j(ne),onClick:()=>K(ne)},[ne.label])),J=a.computed(()=>x.value.length>0&&x.value.length<T.value.length),q=a.computed(()=>typeof C.showLineHeight=="boolean"?C.showLineHeight:!0);a.watch(()=>[x.value],()=>{x.value.length||(d.value=!1),x.value.length&&T.value.every((ne,oe)=>x.value.includes(f(ne,oe)))&&(d.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{x.value.splice(0,x.value.length,...C.checked)},{immediate:!0,deep:!0});const R=async()=>{await new Promise(ne=>setTimeout(ne,0)),T.value.forEach((ne,oe)=>{Object.prototype.hasOwnProperty.call(ne,"showOverflowTooltip")||(ne.showOverflowTooltip=c(`field-item-${Bt(ne,["id","field","type"],[ne,oe])}-ref`,h,m))})},z=()=>{var Y,de,se,pe;let ne;const oe=(de=(Y=t.slots).settings)==null?void 0:de.call(Y);return oe||R(),oe??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(Zo,{class:"icon-close-action",onClick:D},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]),I.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(C.limit)]):""]),I.value?"":a.createVNode("span",{class:"check-all",onClick:A},[a.createVNode(on,{indeterminate:!!J.value,label:s.value.setting.fields.selectAll,modelValue:x.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(pd,{class:"setting-body-fields",modelValue:x.value,"onUpdate:modelValue":ve=>x.value=ve},vX(ne=T.value.map((ve,ie)=>a.createVNode("div",{ref:h,class:"field-item"},[a.createVNode(on,{checked:x.value.includes(f(ve,ie)),disabled:U(ve,ie),label:f(ve,ie)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:le=>m.value[`field-item-${Bt(ve,["id","field","type"],[ve,ie])}-ref`]=le},[Bt(ve,["name","label"],[ve,ie])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Bt(ve,["name","label"],[ve,ie]),disabled:!ve.showOverflowTooltip}]])]})])))?ne:{default:()=>[ne]}),(pe=(se=t.slots).setting)==null?void 0:pe.call(se),q.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),ee()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ht,{style:P,theme:"primary",onClick:L},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Ht,{style:P,onClick:D},{default:()=>[s.value.setting.options.cancel]})])])};return{options:C,renderSettings:()=>e.settings?a.createVNode(Cn,a.mergeProps({ref:b,extCls:C.extCls,arrow:!0,placement:"bottom-end",trigger:C.trigger??"manual"},{theme:O}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Wu,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[z()])}):null}},bX=a.defineComponent({name:"Table",directives:{bkTooltips:Rr},props:iY,emits:wY,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=QY(e),r=pX(e),s=iX(e),{renderContainer:o,renderFixedBottom:c,renderBody:u,renderHeader:d,renderFooter:h,setBodyHeight:m,setFootHeight:f,setDragOffsetX:g,setOffsetRight:y,setHeaderRowCount:b,setLineHeight:C,getBodyHeight:N,refBody:w,refRoot:E}=aX(e,t),x=(...se)=>{var pe;return(pe=w.value)==null?void 0:pe.scrollTo(...se)};typeof e.rowHeight=="function"?C(se=>r.getRowHeight(se.rows[0],se.index)):C(e.rowHeight);const O=yX(e,t,n,({checked:se,height:pe})=>{(se==null?void 0:se.length)>0&&x(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(pe),C(pe))}),T=eX(e,r,t),{renderColumns:k,renderTBody:L,renderTFoot:D,setDragEvents:V}=gX({props:e,ctx:t,columns:n,rows:r,pagination:s});V(T);const{resolveColumns:A}=NY(),I=a.getCurrentInstance(),W=()=>{var pe;const se=((pe=I.subTree)==null?void 0:pe.children)??[];n.debounceUpdateColumns(A(se),()=>{b(n.columnGroup.length)})};a.provide(e5,W);const{renderFixedRows:B,resolveFixedColumnStyle:U}=tX(e,n),K=()=>{var pe;const se=((pe=E.value)==null?void 0:pe.offsetWidth)-(e.scrollbar?1:Z4)||0;n.resolveColsCalcWidth(se),U()},{dragOffsetX:j}=CY(n,{afterResize:U}),P=a.ref(!1),ee=se=>{if(!s.isShowPagination.value||e.remotePagination)return se;const pe=(s.options.current-1)*s.options.limit,ve=pe+s.options.limit;return se.slice(pe,ve)},J=()=>{let se=r.tableRowList.value.slice();return n.filterColumns.forEach(pe=>{var ve;!n.isHiddenColumn(pe.col)&&pe[Ve.COL_FILTER_FN]&&((ve=pe[Ve.COL_FILTER_VALUES])!=null&&ve.length)&&(se=se.filter((ie,le)=>pe[Ve.COL_FILTER_FN](pe[Ve.COL_FILTER_VALUES],ie,le,e.data)))}),n.sortColumns.forEach(pe=>{!n.isHiddenColumn(pe.col)&&pe[Ve.COL_SORT_FN]&&pe.active&&se.sort((ve,ie)=>{let le=null,re=null;return pe.col.type==="index"&&(le=r.getRowAttribute(ve,Xe.ROW_INDEX),re=r.getRowAttribute(ie,Xe.ROW_INDEX)),pe[Ve.COL_SORT_FN](ve,ie,le,re)})}),se},q=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),R=()=>{f(q.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&m(Number(`${e.height}`.replace("px","")))},z=a.ref(!1),Q=bn.debounce((se=!0)=>{const pe=J();e.remotePagination||s.setPagination({count:pe.length});const ve=ee(pe);r.setPageRowList(ve),se&&(z.value=!0),a.nextTick(()=>{y(),Y(),z.value&&(x(0,0),z.value=!1)})},64),ne=a.ref(!1);let oe=null;sX(E,()=>{if(!ne.value){if(ne.value=!0,e.virtualEnabled&&bn.isElement(E.value)){if(P.value){setTimeout(()=>{P.value=!1});return}const se=E.value.offsetHeight;P.value=!0,m(se),y()}K(),y(),x(0,0);return}oe&&clearTimeout(oe),oe=setTimeout(()=>{ne.value=!1})});const Y=()=>{if(e.virtualEnabled){let pe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const ve=N(Number(`${e.maxHeight}`.replace("px","")));if(pe>ve){m(ve,!1);return}}m(pe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{b(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[j.value],()=>{g(j.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>K())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{Q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{Q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{R()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),Q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{Q(!1)},{immediate:!0});const de=a.computed(()=>r.pageRowList.length);return a.watch(de,(se,pe)=>{var ve,ie;se<pe&&((ie=(ve=w==null?void 0:w.value)==null?void 0:ve.updateScroll)==null||ie.call(ve),x(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:x,getRoot:()=>E.value}),()=>o([d(k,O.renderSettings,B),u(r.pageRowList,L,B),c(),h(D())])}}),d5=ln(bX,{Column:lY});function wX(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r<s;)o[r]=e[r+t];return o}var CX=wX,NX=CX;function xX(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:NX(e,t,n)}var _X=xX;function SX(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o<s;)if(t(e[o],o,e))return o;return-1}var TX=SX;function EX(e){return e!==e}var OX=EX;function LX(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var AX=LX,$X=TX,VX=OX,DX=AX;function kX(e,t,n){return t===t?DX(e,t,n):$X(e,VX,n)}var f5=kX,IX=f5;function PX(e,t){for(var n=e.length;n--&&IX(t,e[n],0)>-1;);return n}var MX=PX,RX=f5;function FX(e,t){for(var n=-1,r=e.length;++n<r&&RX(t,e[n],0)>-1;);return n}var HX=FX;function BX(e){return e.split("")}var zX=BX,UX="\\ud800-\\udfff",jX="\\u0300-\\u036f",WX="\\ufe20-\\ufe2f",GX="\\u20d0-\\u20ff",KX=jX+WX+GX,YX="\\ufe0e\\ufe0f",XX="\\u200d",qX=RegExp("["+XX+UX+KX+YX+"]");function JX(e){return qX.test(e)}var ZX=JX,h5="\\ud800-\\udfff",QX="\\u0300-\\u036f",eq="\\ufe20-\\ufe2f",tq="\\u20d0-\\u20ff",nq=QX+eq+tq,rq="\\ufe0e\\ufe0f",aq="["+h5+"]",sh="["+nq+"]",ih="\\ud83c[\\udffb-\\udfff]",sq="(?:"+sh+"|"+ih+")",m5="[^"+h5+"]",g5="(?:\\ud83c[\\udde6-\\uddff]){2}",p5="[\\ud800-\\udbff][\\udc00-\\udfff]",iq="\\u200d",v5=sq+"?",y5="["+rq+"]?",oq="(?:"+iq+"(?:"+[m5,g5,p5].join("|")+")"+y5+v5+")*",lq=y5+v5+oq,cq="(?:"+[m5+sh+"?",sh,g5,p5,aq].join("|")+")",uq=RegExp(ih+"(?="+ih+")|"+cq+lq,"g");function dq(e){return e.match(uq)||[]}var fq=dq,hq=zX,mq=ZX,gq=fq;function pq(e){return mq(e)?gq(e):hq(e)}var vq=pq,yq=Kv,bq=mg,wq=_X,Cq=MX,Nq=HX,zm=vq,xq=Yv;function _q(e,t,n){if(e=xq(e),e&&(n||t===void 0))return bq(e);if(!e||!(t=yq(t)))return e;var r=zm(e),s=zm(t),o=Nq(r,s),c=Cq(r,s)+1;return wq(r,o,c).join("")}var Sq=_q;const Tq=jt(Sq),Um=a.defineComponent({name:"ListTagRender",props:{node:v.object,searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]),displayKey:v.string,searchKeyword:v.string,tpl:{type:Function},disabled:v.bool.def(!1)},render(){const{resolveClassName:e}=_e(),t=r=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return r.replace(s,'<strong class="highlight-text">$1</strong>')}return r};if(this.tpl)return this.tpl(this.node,t,a.h,this);const n=this.node[this.displayKey];return a.createVNode("div",{class:`${e("selector-node")}`},[a.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),Eq=()=>({modelValue:v.arrayOf(v.string).def([]),placeholder:v.string.def(""),list:v.arrayOf(v.object).def([]),disabled:v.bool.def(!1),tooltipKey:v.string.def(""),saveKey:v.string.def("id"),displayKey:v.string.def("name"),hasDeleteIcon:v.bool.def(!1),clearable:v.bool.def(!0),trigger:Ie("treeTriggerType",{}).def("search"),searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]).def("name"),useGroup:v.bool.def(!1),allowCreate:v.bool.def(!1),clearTextSpace:v.bool.def(!0),maxData:v.number.def(-1),maxResult:v.number.def(10),contentMaxHeight:v.number.def(300),contentWidth:v.number.def(190),separator:v.string.def(""),allowNextFocus:v.bool.def(!0),allowAutoMatch:v.bool.def(!1),showClearOnlyHover:v.bool.def(!1),isAsyncList:v.bool.def(!1),leftSpace:v.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}}),Oq=a.defineComponent({name:"TagRender",directives:{bkTooltips:Rr},props:{node:v.object,displayKey:v.string,tooltipKey:v.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),r=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!qc.has(e.node,e.tooltipKey)||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=Y_(t.value)}),{overflowTips:r,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),Lq=a.defineComponent({name:"TagInput",directives:{bkTooltips:Rr},props:Eq(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=dr(),r=dt("tagInput"),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:c}=_e(),{maxResult:u}=a.toRefs(e),{pageState:d,initPage:h,pageChange:m}=lI(u),f=a.ref(""),g=a.ref(null),y=a.ref(null),b=a.ref(null),C=a.ref(null),N=a.ref(null),w=a.ref(),E=a.ref(null),x=a.computed(()=>!e.disabled&&e.hasDeleteIcon),_=a.computed(()=>e.maxData===1),O=a.computed(()=>D.selectedTagList.length===0&&f.value===""&&!s.isEdit),T=a.computed(()=>e.placeholder||r.value.placeholder),k=a.computed(()=>e.clearable&&!e.disabled&&D.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),L=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),D=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),V=a.computed(()=>D.selectedTagList.map(X=>X[e.saveKey])),{flatList:A,saveKeyMap:I}=cI(e),W=a.computed(()=>{if(e.useGroup){const X={};return d.curPageList.forEach((fe,Ne)=>{var ze,Qe,at;const Le=(ze=fe.group)==null?void 0:ze.groupId,Me=(Qe=fe.group)==null?void 0:Qe.groupName;fe.__index__=Ne,Le&&!X[Le]&&(X[Le]={id:Le,name:Me,children:[]}),(at=X==null?void 0:X[Le])==null||at.children.push(fe)}),Object.keys(X).map(fe=>X[fe])}return d.curPageList});a.watch([()=>A.value],()=>{a.nextTick(()=>{P()})},{deep:!0}),a.watch(()=>e.modelValue,X=>{var fe;q(V.value,X)||(a.nextTick(()=>{P()}),e.withValidate&&((fe=n==null?void 0:n.validate)==null||fe.call(n,"change")))}),a.watch(f,wu(()=>{const X=d.curPageList.length!==0,{value:fe}=f;fe!==""&&X||fe===""&&e.trigger==="focus"&&X?o.isShow=!0:(e.trigger!=="focus"||!X)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,X=>{B(),X&&N.value&&(a.nextTick(()=>{N.value.scrollTop=0}),N.value.removeEventListener("scroll",U),N.value.addEventListener("scroll",U))}),a.onMounted(()=>{P()});const B=()=>{var X;o.offset.crossAxis=_.value?0:(X=C.value)==null?void 0:X.offsetLeft},U=()=>{if(d.isPageLoading||N.value.scrollTop===0)return;const{scrollTop:X,offsetHeight:fe,scrollHeight:Ne}=N.value;if(X+fe>=Ne){const Le=d.curPage+1;Le<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{m(Le)},500))}},K=()=>{var fe;return Array.from(((fe=b.value)==null?void 0:fe.childNodes)||[]).filter(Ne=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(Ne.nodeType))},j=X=>{if(!e.disabled){if(X!=null&&X.target){const{className:fe}=X.target;(fe.indexOf(`${c("tag-input-trigger")}`)>-1||fe.indexOf("tag-list")>-1)&&b.value.appendChild(C.value)}clearTimeout(E.value),_.value&&V.value.length&&(D.tagListCache=[...V.value],D.selectedTagListCache=[...D.selectedTagList],f.value=D.selectedTagListCache[0][e.saveKey],F(D.selectedTagList[0],0),oe()),s.isEdit=!0,setTimeout(()=>{var fe;(fe=g.value)==null||fe.focus(),e.trigger==="focus"&&D.localList.length!==0&&(ee(),o.isShow?B():o.isShow=!0)},200)}},P=()=>{const{saveKey:X,modelValue:fe,displayKey:Ne,allowCreate:Le,trigger:Me,isAsyncList:ze}=e;if(D.selectedTagList=[],D.localList=A.value,fe.length){const Qe={};D.selectedTagList=fe.map(at=>{const Ke=I.value[at];return Qe[at]=1,!Ke&&Le?{[X]:at,[Ne]:at}:Ke}).filter(at=>at),_.value||(D.localList=D.localList.filter(at=>!Qe[at[X]]))}if(ze&&f.value){ee(f.value),d.curPageList.length&&(o.isShow=!0);return}Me==="focus"&&ee()},ee=(X="")=>{const{searchKey:fe,filterCallback:Ne}=e,Le=X.toLowerCase().trim();if(Le===""){h(D.localList);return}let Me=[];typeof Ne=="function"?Me=Ne(Le,fe,D.localList)||[]:Array.isArray(fe)?Me=D.localList.filter(ze=>fe.some(Qe=>ze[Qe].toLowerCase().indexOf(Le)>-1)):Me=D.localList.filter(ze=>ze[fe].toLowerCase().indexOf(Le)>-1),h(Me)},J=(X,fe)=>{const Ne={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:V.value.includes(X[e.saveKey])};return e.useGroup?Ne[`${c("selector-actived")}`]=X.__index__===s.focusItemIndex:Ne[`${c("selector-actived")}`]=fe===s.focusItemIndex,Ne};function q(X,fe){return X.length!==fe.length?!1:fe.every((Ne,Le)=>X[Le]===Ne)}const R=()=>{D.tagListCache=[],D.selectedTagListCache=[],D.selectedTagList=[]},z=()=>{f.value="",g.value.style.width=`${as}px`},Q=()=>{if(_.value)return 0;const fe=K().filter(Ne=>Ne.className!=="").findIndex(({id:Ne})=>Ne==="tagInputItem");return fe>=0?fe:0},ne=(X,fe,Ne=!1)=>{if(!fe||!X)return;let Le=fe;Ne&&(Le=fe.nextElementSibling||null),fe.parentNode.insertBefore(X,Le)},oe=X=>{const{maxData:fe,trigger:Ne,allowCreate:Le}=e;if(fe===-1||fe>V.value.length){const{value:Me}=X!=null&&X.target?X.target:f,ze=a9(Me);ze?(ee(Me),a.nextTick(()=>{const Qe=w.value.getBoundingClientRect().width||ze*as;g.value.style.width=`${Qe}px`})):Ne==="focus"&&ee()}else de(),f.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=Le?-1:0,t("input",f.value)},Y=()=>{var X;o.width=_.value?(X=y.value)==null?void 0:X.clientWidth:e.contentWidth,t("focus")},de=()=>{E.value=setTimeout(()=>{var fe;const X=f.value;if(z(),s.isEdit=!1,e.allowAutoMatch&&X){if(_.value){const[Le]=D.tagListCache;X===Le&&D.selectedTagListCache.length&&ce(D.selectedTagListCache[0],"select")}const Ne=d.curPageList.find(Le=>Array.isArray(e.searchKey)?e.searchKey.map(ze=>Le[ze]).includes(X):Le[e.searchKey]===X);Ne?se(Ne,"select"):e.allowCreate&&se(X,"custom")}o.isShow=!1,t("blur",X,V.value),(fe=n==null?void 0:n.validate)==null||fe.call(n,"blur")},200)},se=(X,fe,Ne)=>{Ne==null||Ne.stopPropagation(),!(!X||X.disabled)&&(_.value&&R(),ce(X,fe),ve("select"),z(),o.isShow=!1)},pe=(X,fe,Ne)=>{Ne==null||Ne.stopPropagation(),F(X,fe),z(),ve("remove",X),g.value.style.width=`${as}px`},ve=(X,fe)=>{t(X,fe),t("update:modelValue",V.value),t("change",V.value)},ie=X=>{X.stopPropagation();const fe=D.selectedTagList;D.selectedTagList=[];const Ne=fe.filter(Le=>I.value[Le[e.saveKey]]);(e.allowCreate&&Ne.length!==0||!e.allowCreate)&&!_.value&&D.localList.push(...Ne),ve("removeAll")},le=()=>{const X={height:N.value.clientHeight,yAxis:N.value.getBoundingClientRect().y};a.nextTick(()=>{const fe=N.value.querySelector(`.${c("selector-actived")}`);if(!fe)return;const Ne={height:fe.clientHeight,yAxis:fe.getBoundingClientRect().y};Ne.yAxis<X.yAxis&&(N.value.scrollTop=N.value.scrollTop-(X.yAxis-Ne.yAxis));const Le=Ne.yAxis+Ne.height-X.yAxis;Le>X.height&&(N.value.scrollTop=N.value.scrollTop+Le-X.height)})},re=(X,fe)=>{const Ne=K();ne(C.value,Ne[X-1]),D.selectedTagList.splice(X-1,1),j();const Le=fe&&I.value[fe[e.saveKey]];(e.allowCreate&&Le||!e.allowCreate)&&!_.value&&D.localList.push(fe),g.value.style.width=`${as}px`,ve("remove")},be=X=>{if(d.isPageLoading||X.isComposing)return;let fe;const Ne=X.target.value,Le=a9(Ne),Me=Q(),ze=K();switch(X.code){case"ArrowUp":if(X.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=d.curPageList.length-1),le();break;case"ArrowDown":if(X.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>d.curPageList.length-1?d.curPageList.length:s.focusItemIndex,s.focusItemIndex===d.curPageList.length&&(s.focusItemIndex=0),le();break;case"ArrowLeft":if(s.isEdit=!0,!Le){if(Me<1)return;ne(C.value,ze[Me-1]),j()}break;case"ArrowRight":if(s.isEdit=!0,!Le){if(Me===ze.length-1)return;ne(ze[Me+1],C.value),j()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?se(d.curPageList[s.focusItemIndex],"select",X):e.allowCreate&&f.value.trim()&&se(f.value,"custom",X),X.preventDefault();break;case"Backspace":Me!==0&&!f.value&&(fe=D.selectedTagList[Me-1],re(Me,fe));break}},ae=X=>{const fe=[];return X.split(";").forEach(Le=>{Tq(Le)&&fe.push({[e.saveKey]:Le,[e.displayKey]:Le})}),fe},Ce=X=>{X.preventDefault();const{maxData:fe,saveKey:Ne,displayKey:Le,pasteFn:Me,allowCreate:ze}=e,Qe=X.clipboardData.getData("text");let Ke=(Me?Me(Qe):ae(Qe)).map(xt=>xt[Ne]);if(Ke.length){const xt=K(),Et=Q(),Mn=D.localList.map(et=>et[Ne]);if(Ke=Ke.filter(et=>{const mt=(et==null?void 0:et.trim())&&!V.value.includes(et);return ze?mt:mt&&Mn.includes(et)}),fe!==-1){const et=D.selectedTagList.length;if(et<fe){const mt=fe-et;Ke.length>mt&&(Ke=[...Ke.slice(0,mt)])}else Ke=[]}const ct=ze?Ke.map(et=>D.localList.find(Fr=>Fr[Ne]===et)??{[Ne]:et,[Le]:et}):D.localList.filter(et=>Ke.includes(et[Ne]));Ke.length&&(D.selectedTagList.splice(Et,0,...ct),ne(C.value,xt[Et]),g.value.style.width=`${as}px`,D.localList=D.localList.filter(et=>!Ke.includes(et[Ne])),ve("select"),j())}z()},te=X=>{e.disabled||(ne(C.value,X.currentTarget,!0),g.value.style.width=`${as}px`,o.isShow&&B())},ce=(X,fe)=>{if(D.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:Ne,saveKey:Le,displayKey:Me,createTagValidator:ze,clearTextSpace:Qe}=e,at=Q();let Ke=1,xt=!1,Et;const Mn=ct=>typeof ze=="function"?ze(ct):!0;if(fe==="custom")if(Ne){let ct=X.split(Ne);ct=ct.filter(mt=>(mt==null?void 0:mt.trim())&&!V.value.includes(mt)&&Mn(mt));const et=ct.map(mt=>I.value[mt]||{[Le]:mt,[Me]:mt});ct.length&&(D.selectedTagList.splice(at,0,...et),Ke=et.length,xt=!0)}else{const ct=typeof X=="object";if(Et=ct?X[Le]:X.trim(),Qe&&(Et=Et.replace(/\s+/g,"")),Et!==void 0&&!V.value.includes(Et)&&Mn(Et)){const et=I.value[Et]||(ct?X:{[Le]:Et,[Me]:Et});D.selectedTagList.splice(at,0,et),xt=!0}}else X&&(Et=X[Le],Et!==void 0&&!V.value.includes(Et)&&(D.selectedTagList.splice(at,0,X),xt=!0));xt&&a.nextTick(()=>{for(let ct=1;ct<=Ke;ct++){const mt=K()[at+ct];ne(mt,C.value)}if(g.value.style.width=`${as}px`,!_.value){e.allowNextFocus&&j();const ct=V.value.reduce((et,mt)=>(et[mt]=1,et),{});D.localList=D.localList.filter(et=>!ct[et[Le]])}})},F=(X,fe)=>{D.selectedTagList.splice(fe,1);const Ne=I.value[X[e.saveKey]];(e.allowCreate&&Ne||!e.allowCreate)&&!_.value&&D.localList.push(X)},G=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:ye}=zp(y,G,V),ge=a.computed(()=>D.selectedTagList.reduce((X,fe,Ne)=>(ye.value!==null&&Ne>=ye.value&&X.push(fe[e.displayKey]),X),[]));return{popoverProps:o,...a.toRefs(s),...a.toRefs(D),...a.toRefs(d),isShowPlaceholder:O,isShowClear:k,placeholderText:T,curInputValue:f,renderList:W,showTagClose:x,tagInputRef:g,bkTagSelectorRef:y,tagListRef:b,tagInputItemRef:C,inputValueRef:w,selectorListRef:N,triggerClass:L,overflowTagIndex:ye,localCollapseTags:G,collapseTooltip:ge,focusInputTrigger:j,activeClass:J,handleInput:oe,handleFocus:Y,handleBlur:de,handleTagSelected:se,handleTagRemove:pe,handleClear:ie,tagFocus:te,handleKeydown:be,handlePaste:Ce,resolveClassName:c}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Cn,a.mergeProps({arrow:!1,placement:"bottom-start",theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",referenceCls:this.resolveClassName("tag-input-popover-reference")},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const s=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:s?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(Oq,{displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl},null),this.showTagClose&&a.createVNode(sn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,r)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,spellcheck:"false",type:"text",onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]]),a.createVNode("div",{key:"inputValuePlaceholder",ref:"inputValueRef",style:"position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"},[this.curInputValue])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&a.createVNode(wn,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Um,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Um,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(ka,{size:gs.Small,theme:"primary"},null)]):null])])})])}}),b5=Ze(Lq),w5=Ze(QR),Aq={list:v.arrayOf(v.shape({tag:v.string,content:v.oneOfType([v.string,v.object]),type:v.string,size:v.string,color:v.string,icon:v.func,filled:v.bool,border:v.bool,nodeType:v.timelineNodeType()}).isRequired),titleAble:v.bool.def(!1)},$q=a.defineComponent({name:"Timeline",props:Aq,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=_e(),s=o=>{t("select",o)};return a.watch(()=>e.list,()=>{n.value=e.list.map(o=>({tag:o.tag,content:o.content,type:o.type,size:o.size,color:o.color,icon:o.icon,filled:o.filled,border:o.border??!0,nodeType:o.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"),o=["blue","red","green","yellow","gray"],c=r.type?`${s}-${r.type}`:`${s}-default`,u=r.size?`${s}-${r.size}`:"",d=r.filled?`${s}-filled`:"",h=r.color&&o.includes(r.color)?`${s}-${r.color}`:"",m=e(r)?`${s}-custom`:"";return Ue({},`${s} ${c} ${u} ${h} ${d} ${m}`)},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)])]))])}}),C5=Ze($q);var Cr=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Cr||{});const Vq={title:v.arrayOf(v.string).def([]),extCls:v.string.def(""),searchPlaceholder:v.string.def(""),settingKey:v.string.def("id"),displayKey:v.string.def("value"),sortKey:v.string.def("value"),showOverflowTips:v.bool.def(!1),searchable:v.bool.def(!1),sortable:v.bool.def(!1),sourceList:v.arrayOf(v.any).def([]),targetList:v.arrayOf(v.any).def([]),emptyContent:v.arrayOf(v.string).def([]),multiple:v.bool.def(!1)};function Dq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function kq(e,t,n){const r=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(r.value=[],s.value=[]),e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?s.value.push(u):r.value.push(u)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:r,selectedList:s}}function Iq(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const Pq=a.defineComponent({name:"Transfer",props:Vq,emits:["change","update:targetList"],setup(e,{emit:t}){const n=dt("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),o=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(A=>A.toString().includes("[object Object]"))?Cr.OBJECT_ARRAY:Cr.BASE_ARRAY:Cr.NOT_ARRAY),c=a.computed(()=>o.value===Cr.BASE_ARRAY?"value":e.settingKey),u=a.computed(()=>o.value===Cr.BASE_ARRAY?"value":e.displayKey),d=a.computed(()=>e.sortKey||u.value),h=a.computed(()=>{switch(o.value){case Cr.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case Cr.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:m}=a.toRefs(e),{selectList:f,selectedList:g}=kq(h,m,c),{selectSearchQuery:y,selectListSearch:b}=Iq(f,u),C=a.computed(()=>[...b.value].sort((V,A)=>{const I=V[d.value],W=A[d.value];return I>W?1:-1})),N=a.computed(()=>[...g.value].sort((V,A)=>{const I=V[d.value],W=A[d.value];return I>W?1:-1}));a.watch(()=>[f,g],()=>{e.multiple||O()},{deep:!0});const w=(V,A)=>{const I=c.value;return V.some(W=>W[I]===A[I])&&A.disabled},E=()=>{f.value=[...h.value.filter(V=>w(f.value,V))],g.value=[...h.value.filter(V=>!w(f.value,V))],O()},x=()=>{f.value=[...h.value.filter(V=>!w(g.value,V))],g.value=[...h.value.filter(V=>w(g.value,V))],O()},_=(V,A)=>{if(V.disabled)return;const I=V[c.value],W=A?f:g,B=A?g:f,U=W.value.findIndex(K=>K[c.value]===I);B.value.push(...W.value.splice(U,1)),O()},O=()=>{const V=f.value.map(I=>I[c.value]),A=g.value.map(I=>I[c.value]);t("update:targetList",A),t("change",o.value===Cr.BASE_ARRAY?V:f.value.map(I=>a.toRaw(I)),o.value===Cr.BASE_ARRAY?A:g.value.map(I=>a.toRaw(I)),A)},T=V=>{const A=V==="source"?f:g;r.value[V]=s.value[V].length===A.value.length},k=(V,A)=>{const I=A==="source"?f:g;s.value[A]=V?I.value.map(W=>W[c.value]):[]},L=V=>{const A=V==="left",I=A?f:g,W=A?g:f,B=s.value[A?"source":"target"],U=I.value.filter(K=>B.includes(K[c.value]));I.value=I.value.filter(K=>!B.includes(K[c.value])),W.value.push(...U),s.value[A?"source":"target"]=[],O()},{resolveClassName:D}=_e();return{selectSearchQuery:y,selectListSearch:b,selectedList:g,selectListSort:C,selectedListSort:N,settingCode:c,displayCode:u,allToRight:E,allToLeft:x,handleItemClick:_,t:n,handleAllChecked:k,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:L,handleItemChecked:T,resolveClassName:D}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=u=>{const d=u==="left-header",h=d?"source":"target",m=d?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,f=d?!t.length:!n.length,g=!!this.multipleSelectList[h].length&&!this.multipleSelectAllValue[h],y=this.multipleSelectList[h].length,b=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(on,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[h],"onUpdate:modelValue":C=>this.multipleSelectAllValue[h]=C,indeterminate:g,label:m,onChange:C=>this.handleAllChecked(C,h)},null):a.createVNode(a.Fragment,null,[`${m}(${d?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[y]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[d?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:f},onClick:()=>b()},[d?this.t.selectAll:this.t.removeAll])])},s=u=>{const d=u==="left-empty-content",h=(d?this.emptyContent[0]:this.emptyContent[1])??(d?this.t.noData:this.t.noSelected);return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[h])},o=(u,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":u.disabled}]},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(zu,{class:this.resolveClassName("icon")},null):a.createVNode(sn,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),c=u=>{let d;const h=u==="left",m=u==="left"?"source":"target",f=h?t:n,g=h?"source-option":"target-option",y=h?"left-empty-content":"right-empty-content",b=e?a.createVNode(pd,{class:"content is-flex",modelValue:this.multipleSelectList[m],"onUpdate:modelValue":C=>this.multipleSelectList[m]=C,onChange:()=>this.handleItemChecked(m)},Dq(d=f.map(C=>a.createVNode("div",null,[a.createVNode(on,{class:"checkbox-item",label:C[this.settingCode]},{default:()=>{var N,w;return[((w=(N=this.$slots)[g])==null?void 0:w.call(N,C))??o(C,h)]}})])))?d:{default:()=>[d]}):a.createVNode("ul",{class:["content",this.searchable&&h?"is-search":""]},[f.map(C=>{var N,w;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(C,h)},[((w=(N=this.$slots)[g])==null?void 0:w.call(N,C))??o(C,h)])})]);return f.length?b:s(y)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(Ma,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(Ss,{class:this.resolveClassName("icon-search")},null)}),c("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(kn,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(cr,null,null)])]):a.createVNode(ld,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),c("right")])])}}),N5=Ze(Pq);var $n=(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_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))($n||{});const br=(...e)=>!0,Mq={nodeClick:br,nodeCollapse:br,nodeExpand:br,nodeChecked:br,nodeDragStart:br,nodeDragOver:br,nodeDragLeave:br,nodeDrop:br,nodeEnterView:br,nodeSelected:br};var Oe=(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))(Oe||{});const Aa={__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 x5=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(x5||{});const Rq={data:v.arrayOf(v.any).def([]),label:v.oneOfType([v.func.def(void 0),v.string.def("label")]),nodeKey:v.string.def(void 0),children:v.string.def("children"),indent:v.number.def(16),lineHeight:v.number.def(32),height:v.number,levelLine:v.oneOfType([v.bool.def(!1),v.func.def(void 0),v.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:v.bool.def(!1),prefixIcon:v.oneOfType([v.func.def(()=>{}),v.bool.def(!1)]).def(!0),async:v.shape({callback:v.func.def(void 0),cache:v.bool.def(!0),deepAutoOpen:Ie("columnType",{}).def("once")}),offsetLeft:v.number.def(5),search:v.oneOfType([v.shape({value:v.oneOfType([v.number,v.string,v.bool]).def(""),match:v.oneOfType([an(),v.func]).def("fuzzy"),resultType:an().def("tree"),showChildNodes:v.bool.def(!1)}),v.string,v.number,v.bool]).def(void 0),emptyText:v.string.def("没有数据"),draggable:v.bool.def(!1),disableDrag:v.func,disableDrop:v.func,dragSort:v.bool.def(!1),selectable:v.oneOfType([v.bool,v.func]).def(!0),disabledFolderSelectable:v.bool.def(!1),showCheckbox:v.oneOfType([v.bool,v.func]).def(!1),checked:v.arrayOf(v.any).def([]),showNodeTypeIcon:v.bool.def(!0),selected:v.oneOfType([v.string,v.number,v.object]),autoCheckChildren:v.oneOfType([v.bool,v.func]).def(!0),autoOpenParentNode:v.bool.def(!0),expandAll:v.bool.def(!1),nodeContentAction:v.oneOfType([v.arrayOf(Ie("nodeContentActionType",{}).def(x5.CLICK)),v.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:v.bool.def(!1),checkStrictly:v.bool.def(!0),intersectionObserver:v.oneOfType([v.bool.def(!1),v.shape({enabled:v.bool.def(!1),callback:v.func.def(void 0)})]).def(!1)},Fq=e=>({renderEmpty:t=>a.createVNode(_d,{scene:"part",type:t},{default:()=>[e.emptyText]})}),Hq=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const o=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,c=a.computed(o),u=g=>g instanceof NodeList?Array.from(g):Array.isArray(g)?g:[g];return{unobserveAll:()=>{r==null||r.forEach(g=>{bn.isElement(g)&&(n==null||n.unobserve(g))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:c,initIntersectionObserver:(g,y,b)=>{if(c.value.enabled){if(!g){console.error("intersectionObserver.target is undefined");return}r=u(g);const C=Object.assign({rootMargin:"0px"},y);n=new IntersectionObserver(function(N){N.forEach(w=>{var E,x,_;if(console.log("entry",w.target),w.isIntersecting){const O=((E=b==null?void 0:b.beforeResponse)==null?void 0:E.call(b,w))??w;(_=(x=c.value).callback)==null||_.call(x,O),c.value.once&&n.unobserve(w.target)}})},C),r.forEach(N=>{bn.isElement(N)&&n.observe(N)})}},initRootMutationObserver:(g,y)=>{if(c.value.enabled&&!e.virtualRender&&bn.isElement(g)){const b={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...C)=>{y==null||y(...C)}),s.observe(g,b)}},getLastVisibleElement:(g,y)=>{const{offsetHeight:b}=y,C=y.querySelectorAll("[data-tree-node]"),N=b+g;return Array.from(C).filter(E=>E.offsetHeight+E.offsetTop>=N&&E.offsetTop<N)}}},Ld=(e,t)=>{const n=P=>e.schema.get(P),r=(P,ee)=>{var J;return(J=n(P))==null?void 0:J[ee]},s=(P,ee,J,q)=>{if(!e.schema.has(P)){console.warn("node is not in schema, please check",q,P);return}e.schema.set(P,Object.assign({},n(P),{[ee]:J}))},o=P=>e.data.find(ee=>d(ee)===P),c=(P,ee,J)=>{if(Array.isArray(P)){Array.prototype.forEach.call(P,q=>s(o(q),ee,J,P));return}s(o(P),ee,J,P)},u=P=>r(P,Oe.PATH),d=P=>r(P,Oe.UUID),h=P=>r(P,Oe.IS_OPEN),m=P=>r(P,Oe.HAS_CHILD),f=P=>r(P,Oe.IS_MATCH),g=P=>r(P,Oe.IS_CHECKED),y=P=>r(r(P,Oe.PARENT),Oe.UUID),b=P=>r(P,Oe.IS_LOADING),C=P=>r(P,Oe.PARENT),N=P=>r(P,Oe.IS_MATCH),w=(P,ee)=>{const J=e.data.find(q=>d(q)===P);return r(J,ee)},E=P=>typeof P=="string"?w(P,Oe.IS_ROOT):r(P,Oe.IS_ROOT),x=P=>{const ee=e.data.find(J=>d(J)===P);return y(ee)},_=P=>{const ee=e.data.find(J=>d(J)===P);return u(ee)},O=(P,ee)=>{s(P,Oe.IS_LOADING,ee)},T=P=>typeof P=="object"?h(P):typeof P=="string"?w(P,Oe.IS_OPEN):!1,k=(P,ee)=>r(r(P,Oe.PARENT),ee),L=P=>T(r(P,Oe.PARENT)),D=P=>E(P)||T(P)||L(P),V=(P,ee)=>{const q=P.split("-").reduce((R,z)=>{const Q=Number(z);return Array.isArray(R)?R[Q]:R[t.children][Q]},t.data);return ee&&Object.assign(q,{[Oe.UUID]:ee}),q},A=P=>P[t.children]??[],I=P=>e.data.find(ee=>d(ee)===P),W=P=>E(P)?{[t.children]:t.data}:C(P),B=P=>({[Aa[Oe.IS_LOADING]]:r(P,Oe.IS_LOADING),[Aa[Oe.HAS_CHILD]]:m(P),[Aa[Oe.IS_MATCH]]:f(P),[Aa[Oe.IS_CHECKED]]:g(P),[Aa[Oe.IS_OPEN]]:h(P),[Aa[Oe.IS_ROOT]]:E(P),fullPath:r(P,Oe.PATH),uuid:d(P),parent:r(P,Oe.PARENT),parentId:d(r(P,Oe.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:d,getNodeById:o,getNodeParentId:y,getParentNodeData:W,getNodePathById:_,getNodeAttrById:w,getNodeParentIdById:x,getParentNodeAttr:k,getParentNode:C,setNodeAttr:s,setNodeAttrById:c,getNodePath:u,isRootNode:E,isNodeOpened:h,hasChildNode:m,isItemOpen:T,isNodeChecked:g,isNodeMatched:f,isNodeLoading:b,checkNodeIsOpen:D,getSourceNodeByPath:V,getSourceNodeByUID:I,isMatchedNode:N,resolveScopedSlotParam:B,setTreeNodeLoading:O,extendNodeAttr:P=>Object.assign({},P,{[Oe.TREE_NODE_ATTR]:B(P)}),getChildNodes:A,extendNodeScopedData:P=>({data:P,attributes:B(P)}),getIntersectionResponse:P=>{var Q;if(!P)return null;let ee=P;bn.isElement(P)&&(ee=o(P.getAttribute("data-tree-node")));const J=r(ee,Oe.DEPTH),q=r(ee,Oe.IS_ROOT),R=r(ee,Oe.PARENT),z=q?r(ee,Oe.INDEX):(Q=R==null?void 0:R[t.children])==null?void 0:Q.findIndex(ne=>ne===ee);return{level:J,target:P,index:z,parent:R,node:ee,isRoot:q}}}},_5="1px dashed #c3cdd7",S5=(e,t,n=null,r=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?r:s:T5(n,e,t,o)},T5=(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 o=s.apply(void 0,[e,...r]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},E5=(e,t)=>T5(e,t,"label"),Bq=(e,t)=>({"--level-line":S5(t,"levelLine",e,_5,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),zq=(e,t,n,r=!0)=>{var c;const{schema:s}=n,o=(c=s.get(e))==null?void 0:c[Oe.DEPTH];if(r){const u=["node"],d=()=>S5(t,"levelLine",e,_5,null,u);return{"--depth":o,...typeof t.levelLine=="function"?{"--level-line":d()}:{}}}return{}},Uq=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:o}=t.get(e)||{},{resolveClassName:c}=_e();return{"is-root":s,[`${c("tree-node")}`]:!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},jq=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=_e();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},Wq=(e,t,n,r,s)=>{Gq(e,t,n,{[r]:s})},Gq=(e,t,n,r)=>{const o=e.split("-").reduce((c,u)=>{const d=Number(u);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,r||{})},yo=e=>e??{__IS_NULL:!0},Bc=(e,t,n)=>Array.isArray(t)?t.some(r=>Bc(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,O5=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,L5=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Ld(t,e),u=(m,f)=>{if(typeof m=="object"&&m!==null){n(f,Oe.IS_OPEN,!0);const g=Array.isArray(m)?m:[m];return Wq(r(f),e.data,e.children,e.children,g),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:f=null,cache:g=!0}=e.async||{};if(typeof f=="function"&&s(m,Oe.IS_ASYNC)){if(n(m,Oe.IS_ASYNC_INIT,!0),!s(m,Oe.IS_CACHED)){n(m,Oe.IS_CACHED,g);const y=o(m),b=f(m,C=>u(C,m),y);if(typeof b=="object"&&b!==null)return c(m,!0),b instanceof Promise?Promise.resolve(b.then(C=>u(C,m)).catch(C=>console.error("load remote data error:",C)).finally(()=>{c(m,!1),n(m,Oe.IS_CACHED,!0)})):(u(b,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},h=()=>{const m=t.data.filter(f=>s(f,Oe.IS_ASYNC)&&f[Aa[Oe.IS_OPEN]]&&!s(f,Oe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(f=>d(f))).then(()=>{h()}).catch(f=>{console.warn(f)})};return{asyncNodeClick:d,deepAutoOpen:h}},Kq=(e,t,n,r,s)=>{let o=e.selected;const{setNodeAttr:c,setNodeAttrById:u,getNodePath:d,getSchemaVal:h,getNodeAttr:m,getNodeId:f,getChildNodes:g,isRootNode:y,hasChildNode:b,isItemOpen:C,isNodeOpened:N,isNodeLoading:w,isNodeChecked:E,getParentNode:x,resolveScopedSlotParam:_,extendNodeAttr:O,extendNodeScopedData:T}=Ld(n,e),{resolveClassName:k}=_e(),{registerNextLoop:L}=s,{asyncNodeClick:D,deepAutoOpen:V}=L5(e,n),A=ae=>C(ae)?a.createVNode(Zu,{class:[k("tree-icon"),k("node-prefix")]},null):a.createVNode(Ju,{class:[k("tree-icon"),k("node-prefix")]},null),I=ae=>{if(typeof ae=="string")return ae;if(typeof ae=="object"&&ae!==null){if(a.isVNode(ae))return ae;const{node:Ce,className:te,text:ce,style:F}=ae;return a.h(Ce,{class:te,style:F},ce)}return null},W=ae=>{var Ce,te;return((te=(Ce=t.slots).nodeLoading)==null?void 0:te.call(Ce,le(ae)))??w(ae)?a.createVNode(Li,null,null):""},B=ae=>{if(t.slots.nodeAction)return t.slots.nodeAction(le(ae));let Ce=null;if(w(ae))return W(ae);if(typeof e.prefixIcon=="function"&&(Ce=e.prefixIcon(le(ae),"node_action"),Ce!=="default"))return I(Ce);if(Ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const te=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(ae):e.autoCheckChildren;if(b(ae)||ae.async||!te)return C(ae)?a.createVNode(Qo,{class:k("node-prefix")},null):a.createVNode(rl,{class:k("node-prefix")},null)}return null},U=ae=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(le(ae));let Ce=null;return typeof e.prefixIcon=="function"&&(Ce=e.prefixIcon(le(ae),"node_type"),Ce!=="default")?I(Ce):Ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(ae)||b(ae)?A(ae):a.createVNode(od,{class:[k("tree-icon"),k("node-prefix")]},null):null},K=(ae,Ce)=>{const te=x(ae);if(te){const ce=Ce||(g(te)||[]).some(F=>E(F));c(te,Oe.IS_CHECKED,ce),c(te,Oe.IS_INDETERMINATE,(g(te)||[]).some(F=>!E(F)||ee(F))),y(te)||K(te,Ce)}},j=(ae,Ce,te)=>{g(ae).forEach(ce=>{Array.isArray(Ce)?Ce.forEach((F,G)=>{c(ce,F,te[G])}):c(ce,Ce,te),j(ce,Ce,te)})},P=(ae,Ce,te)=>{te==null||te.preventDefault(),te==null||te.stopImmediatePropagation(),te==null||te.stopPropagation(),c(ae,Oe.IS_CHECKED,!!Ce),Ce&&c(ae,Oe.IS_INDETERMINATE,!1),e.checkStrictly&&(j(ae,[Oe.IS_CHECKED,Oe.IS_INDETERMINATE],[!!Ce,!1]),K(ae,Ce)),t.emit($n.NODE_CHECKED,n.data.filter(ce=>E(ce)),n.data.filter(ce=>ee(ce))),se(ae,te)},ee=ae=>E(ae)&&m(ae,Oe.IS_INDETERMINATE),J=ae=>O5(e,T(ae))?a.createVNode("span",{onClick:re},[a.createVNode(on,{indeterminate:ee(ae),modelValue:E(ae),size:"small",onChange:(Ce,te)=>P(ae,!!Ce,te)},null)]):null,q=(ae,Ce=null,te=null,ce=!0)=>{const F=Ce===null?!C(ae):!!Ce;if(F||j(ae,Oe.IS_OPEN,F),c(ae,Oe.IS_OPEN,F),ce){const G=C(ae)?$n.NODE_EXPAND:$n.NODE_COLLAPSE;t.emit(G,ae,_(ae),h(ae),te)}},R=(ae,Ce,te)=>{if(Array.isArray(ae)){ae.forEach(ce=>c(yo(ce),Ce,te));return}c(yo(ae),Ce,te)},z=(ae,Ce=!0,te=!1)=>{Q(ae,Oe.IS_OPEN,Ce,te&&Ce)},Q=(ae,Ce,te,ce=!1)=>{const F=yo(ae);if(F[Oe.IS_NULL])return;const G=Array.isArray(Ce)?Ce:[Ce],ye=Array.isArray(te)?te:[te];if(ce){if(G.forEach((ge,X)=>R(F,ge,ye[X])),!y(F)){const ge=x(F);G.forEach((X,fe)=>{m(ge,X)!==te&&Q(ge,X,ye[fe],ce)})}}else G.forEach((ge,X)=>R(F,ge,ye[X]))},ne=(ae,Ce)=>{if(C(ae)){q(ae,!1,Ce,!0);return}D(ae).finally(()=>{m(ae,Oe.IS_LOADING)?L("setNodeOpenedAfterLoading",{type:"once",fn:()=>q(ae,!0,Ce,!0)}):q(ae,!0,Ce,!0)})},oe=(ae,Ce)=>{ae.stopImmediatePropagation(),ae.stopPropagation(),ae.preventDefault(),ne(Ce,ae)},Y=(ae,Ce=!0,te=!0,ce=!1)=>{const F=Array.isArray(ae)?ae:[ae];if(!F.length)return;let G=yo(F[0]);if((typeof G=="string"||typeof G=="number"||typeof G=="symbol")&&(G=n.data.find(ye=>f(ye)===G)??{[Oe.IS_NULL]:!0}),!G[Oe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(ae)||e.disabledFolderSelectable&&G.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}o!=null&&u(o,Oe.IS_SELECTED,!Ce),e.selected&&e.selected!==o&&u(e.selected,Oe.IS_SELECTED,!Ce),c(G,Oe.IS_SELECTED,Ce),o=f(G),ce&&t.emit($n.NODE_SELECTED,{selected:Ce,node:G}),te&&F.length===1&&z(G,!0,!0),m(G,Oe.IS_ASYNC)&&D(G).then(()=>{a.nextTick(()=>{F.shift(),Y(F,Ce,te)})})}},de=ae=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:ae}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],se=(ae,Ce)=>{const te=de(ae);if(te.includes("selected")&&Y(ae,!0,!0,!0),te.includes("expand")&&(N(ae)||ne(ae,Ce)),te.includes("collapse")&&N(ae)&&ne(ae,Ce),te.includes("click")){const ce=$n.NODE_CLICK;t.emit(ce,ae,_(ae),h(ae),Ce)}},pe=(ae,Ce)=>{if(y(Ce))return!1;const te=d(Ce),ce=`${te}`.split("-").slice(0,ae+1);if(ce.join("-")===te)return!0;const G=ce.pop(),ye=parseInt(G,10);ce.push(`${ye+1}`);const ge=ce.join("-");return n.data.some(X=>d(X)===ge)},ve=ae=>{if(!e.levelLine)return null;const Ce=ce=>({"--depth":ce}),te=(m(ae,Oe.DEPTH)??0)+1;return new Array(te).fill("").map((ce,F)=>F).filter(ce=>pe(ce,ae)).filter(ce=>ce>0).map(ce=>a.createVNode("span",{style:Ce(te-ce),class:"node-virtual-line"},null))},ie=ae=>{var Ce,te,ce,F;return t.slots.node?(te=(Ce=t.slots).node)==null?void 0:te.call(Ce,le(ae)):t.slots.default?(F=(ce=t.slots).default)==null?void 0:F.call(ce,T(ae)):[E5(ae,e)]},le=ae=>e.keepSlotData?T(ae):O(ae),re=ae=>{ae.stopImmediatePropagation(),ae.stopPropagation()};return{renderTreeNode:(ae,Ce=!0)=>{var te,ce;return a.createVNode("div",{key:f(ae),class:jq(ae,n.schema),"data-tree-node":f(ae)},[a.createVNode("div",{style:zq(ae,e,n,Ce),class:Uq(ae,n.schema,e,Ce),onClick:F=>se(ae,F)},[a.createVNode("div",{class:[k("node-action")],onClick:F=>oe(F,ae)},[B(ae)]),a.createVNode("div",{class:k("node-content")},[[J(ae),U(ae)],a.createVNode("span",{class:k("node-text")},[ie(ae)]),(ce=(te=t.slots).nodeAppend)==null?void 0:ce.call(te,le(ae))]),Ce&&ve(ae)])])},handleTreeNodeClick:ne,deepAutoOpen:V,asyncNodeClick:D,setNodeAction:R,setNodeOpened:q,setSelect:Y,setOpen:z,setNodeAttribute:Q,isIndeterminate:ee}},Yq=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:o,getNodeParentIdById:c,extendNodeAttr:u,getNodeAttrById:d,getNodePathById:h,isRootNode:m}=Ld(r,e),{resolveClassName:f}=_e(),g=a.computed(()=>typeof e.disableDrag=="function"),y=a.computed(()=>typeof e.disableDrop=="function");let b="";const C=V=>V.target.closest("[data-tree-node]"),N=V=>{var I;const A=(I=V==null?void 0:V.dataset)==null?void 0:I.treeNode;return s(A)},w=V=>{C(V).removeEventListener("mouseup",w)},E=V=>{const A=C(V),I=N(A);if(I.draggable===!1||g.value&&e.disableDrag(I)){A.classList.add(`${f("tree-drag-disabled")}`);return}A.setAttribute("draggable","true"),A.addEventListener("mouseup",w)},x=V=>{V.preventDefault();const A=C(V),I=u(N(A));if(t.emit($n.NODE_DRAG_OVER,V,A,I),y.value&&(e!=null&&e.disableDrop(I))){V.dataTransfer.effectAllowed="move",V.dataTransfer.dropEffect="none",A.classList.add(`${f("tree-drop-disabled")}`);return}A.classList.add(`${f("tree-drop-active")}`);let W=V.dataTransfer.getData("node-id");W=b;const B=A.getAttribute("data-tree-node"),U=T(W,B)?"move":"none";V.dataTransfer.effectAllowed=U,V.dataTransfer.dropEffect=U},_=V=>{V.dataTransfer.effectAllowed="move",V.dataTransfer.dropEffect="move";const A=C(V);V.dataTransfer.setData("text/plain","");const I=A.getAttribute("data-tree-node");b=I,V.dataTransfer.setData("node-id",I),t.emit($n.NODE_DRAG_START,V,A)},O=V=>{V.preventDefault(),V.stopPropagation();const A=C(V);A.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`);const I=u(N(A));if(y.value&&e.disableDrop(I))return;const W=b,B=A.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:L,void 0,[W,B]),t.emit($n.NODE_DROP,V,A,I)},T=(V,A)=>{const I=h(V),W=h(A),B=c(V),U=c(A);return B===U?!0:I.indexOf(W)===-1&&W.indexOf(I)===-1},k=(V,A)=>{if(!T(V,A))return;const I=JSON.parse(JSON.stringify(s(V))),W=JSON.parse(JSON.stringify(s(A))),B=o(V),U=o(A),K=d(V,Oe.INDEX),j=d(A,Oe.INDEX);B==null||B[e.children].splice(K,1,W),U==null||U[e.children].splice(j,1,I)},L=(V,A)=>{const I=s(V),W=s(A);let B=null;if(m(V))B=e.data;else{const U=c(V);if(U!=null){B=s(U);const K=d(V,Oe.INDEX);B==null||B[e.children].splice(K,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(I)},D=V=>{V.preventDefault();const A=C(V);A.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`),t.emit($n.NODE_DRAG_LEAVE,V,A)};a.onMounted(()=>{if(e.draggable&&n.value){const V=n.value.$el;V.addEventListener("mousedown",E),V.addEventListener("dragstart",_),V.addEventListener("dragover",x),V.addEventListener("dragleave",D),V.addEventListener("drop",O)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const V=n.value.$el;V.removeEventListener("mousedown",E),V.removeEventListener("dragstart",_),V.removeEventListener("dragover",x),V.removeEventListener("dragleave",D),V.removeEventListener("drop",O)}})},Xq=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=g=>["string","number","boolean"].includes(typeof g),o=(g,y)=>g===y,c=(g,y)=>new RegExp(`${g}`,"i").test(`${y}`),u=(g,y)=>Reflect.apply(g,void 0,y),d=t.value===void 0||t.value===!1,h=(g,y)=>{if(d)return!0;if(s(t.value))return`${t.value}`.length===0?!1:u(c,[t.value,g,y]);const{value:b="",match:C="fuzzy"}=t.value,w=typeof C=="function"?C:C==="fuzzy"?c:o;return`${b}`.length===0?!1:u(w,[b,g,y])},m=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:g=""}=t.value;return`${g}`.length>0}),f=a.computed(()=>n==="tree");return{searchFn:h,refSearch:t,isSearchActive:m,isSearchDisabled:d,resultType:n,isTreeUI:f,showChildNodes:r}},qq=e=>{var C;const t=(N=void 0,w=null)=>{const{data:E,children:x}=e,_=[],O=[];let T=0;const k=new WeakMap;function L(P,ee,J,q){if(P!=null&&k.has(P)){const R=k.get(P);if(Object.prototype.hasOwnProperty.call(R,ee)&&typeof q=="function"&&Reflect.apply(q,self,[R,ee,J,P])){if(R[ee]===J)return;Object.assign(R,{[ee]:J}),L(R[Oe.PARENT],ee,J,q)}}}function D(P){let ee=null;return typeof e.nodeKey=="string"&&(ee=P[e.nodeKey]||lr()),ee||P[Oe.UUID]||lr()}const V={[Oe.IS_OPEN]:()=>!!e.expandAll,[Oe.IS_CHECKED]:()=>!1,[Oe.IS_MATCH]:()=>!1,[Oe.IS_SELECTED]:(P,ee)=>Bc(P,e.selected,ee),[Oe.IS_CACHED]:()=>!1,[Oe.IS_ASYNC]:()=>null,[Oe.IS_LOADING]:()=>!1};function A(P,ee,J,q=void 0){let R=q;q===void 0&&typeof V[J]=="function"&&(R=V[J](ee,P));const z=Aa[J];if(Object.prototype.hasOwnProperty.call(ee,z))return ee[z];const Q=(w==null?void 0:w.get(ee))??void 0;let ne;return Q&&(ne=Q[J]),ne==null&&(ne=R),ne}function I(P,ee){if(!e.selectable)return!1;const J=Bc(ee,e.selected,P);return A(P,ee,Oe.IS_SELECTED,J)}function W(P,ee,J){var z;const q=A(P,ee,Oe.IS_OPEN),R=k.has(J)?(z=k.get(J))==null?void 0:z[Oe.IS_OPEN]:!0;return q&&R}function B(P,ee,J){if(!O5(e,{data:P,attributes:J}))return!1;const R=Bc(P,e.checked,ee);return A(ee,P,Oe.IS_CHECKED,R)}function U(P){return!((P==null?void 0:P[Oe.IS_OPEN])??!1)}function K(P,ee,J,q){return P[Oe.IS_INDETERMINATE]=(q[e.children]||[]).some(R=>{var z;return!(((z=k.get(R))==null?void 0:z[Oe.IS_CHECKED])??!1)}),!0}function j(P,ee=0,J=null,q=null){const R=P.length;for(let z=0;z<R;z++){const Q=P[z];if(Array.isArray(Q))j(Q,ee,J,q);else if(typeof Q=="object"&&Q!==null){const ne=q!==null?`${q}-${z}`:`${z}`,oe=`${D(Q)}`,Y=!!(Q[x]||[]).length;let de=A(oe,Q,Oe.IS_OPEN);e.autoOpenParentNode?de&&L(J,Oe.IS_OPEN,!0,U):de=W(oe,Q,J);const se={[Oe.DEPTH]:ee,[Oe.INDEX]:z,[Oe.UUID]:oe,[Oe.PARENT]:J,[Oe.HAS_CHILD]:Y,[Oe.PATH]:ne,[Oe.IS_ROOT]:J===null,[Oe.ORDER]:T,[Oe.IS_SELECTED]:I(oe,Q),[Oe.IS_MATCH]:A(oe,Q,Oe.IS_MATCH),[Oe.IS_OPEN]:de,[Oe.IS_CHECKED]:void 0,[Oe.IS_CACHED]:A(oe,Q,Oe.IS_CACHED),[Oe.IS_ASYNC]:A(oe,Q,Oe.IS_ASYNC),[Oe.IS_LOADING]:A(oe,Q,Oe.IS_LOADING),[Oe.IS_INDETERMINATE]:!1};se[Oe.IS_CHECKED]=B(Q,oe,se),se[Oe.IS_CHECKED]&&_.push(Q),k.set(Q,se),O.push(Q),T+=1,Object.prototype.hasOwnProperty.call(Q,x)&&j(Q[x]||[],ee+1,Q,ne)}}}return j(N??E),e.showCheckbox!==!1&&e.checkStrictly&&(_==null||_.forEach(P=>{L(P,Oe.IS_CHECKED,!0,K)})),[O,k]},n=t(),r=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:u,deepAutoOpen:d}=L5(e,c),h=N=>{s.push(N)},m=(N,w,E=!0)=>{E&&r.has(N)&&r.delete(N),r.set(N,w)},f=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),g=N=>{const w=f(N);return w!==null&&Reflect.apply(w.fn,void 0,[]),(w==null?void 0:w.type)??"once"},y=()=>{Array.from(r.keys()).forEach(N=>{const w=r.get(N);if(Array.isArray(w)){const E=[];w.forEach((x,_)=>{g(x)==="once"&&E.unshift(_)}),E.length&&E.forEach(x=>w.splice(x,1)),w.length===0&&r.delete(N)}else g(w)==="once"&&r.delete(N)})};a.watch(()=>[e.data],N=>{var E,x;const w=t(N[0],c.schema);c.data=w[0],c.schema=w[1],(E=e.async)!=null&&E.callback&&((x=e.async)==null?void 0:x.deepAutoOpen)==="every"&&d(),y()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,N=>{o.length=0,s.forEach(w=>{Reflect.apply(w,void 0,[N]),o.push(()=>Reflect.apply(w,void 0,[N]))}),m("afterSelectWatch",o)},{immediate:!0})});const b=N=>{m("afterDataUpdate",N)};return(C=e.async)!=null&&C.callback&&d(),{flatData:c,asyncNodeClick:u,deepAutoOpen:d,afterDataUpdate:b,registerNextLoop:m,onSelected:h}},Jq=a.defineComponent({name:"Tree",props:Rq,emits:Mq,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:o}=qq(e),{checkNodeIsOpen:c,isRootNode:u,isNodeOpened:d,isNodeChecked:h,isNodeMatched:m,hasChildNode:f,getNodePath:g,getNodeId:y,getNodeAttr:b,getParentNode:C,getIntersectionResponse:N}=Ld(r,e),{searchFn:w,isSearchActive:E,refSearch:x,isSearchDisabled:_,isTreeUI:O,showChildNodes:T}=Xq(e),k=a.reactive([]),L=se=>{if(E.value){if(T){const ve=`${g(se)??""}-`;return c(se)&&(m(se)||k.some(ie=>ve.indexOf(`${ie}-`)===0))}return c(se)&&m(se)}return c(se)},D=a.computed(()=>r.data.filter(se=>L(se))),{getLastVisibleElement:V,intersectionObserver:A}=Hq(e),{renderTreeNode:I,handleTreeNodeClick:W,setOpen:B,setNodeAction:U,setSelect:K,asyncNodeClick:j,setNodeAttribute:P,isIndeterminate:ee}=Kq(e,t,r,D,{registerNextLoop:o}),J=jo(120,()=>{k.length=0,r.data.forEach(se=>{const pe=w(E5(se,e),se);pe&&k.push(g(se)),P(se,[Oe.IS_MATCH],[pe],O.value&&pe)})});_||a.watch([x],()=>{J()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{Q()})});const q=(se,pe=!0,ve=!1)=>{U(yo(se),Oe.IS_CHECKED,pe),ve&&t.emit($n.NODE_CHECKED,r.data.filter(ie=>h(ie)),r.data.filter(ie=>ee(ie)))};s(se=>{K(se,!0,e.autoOpenParentNode,!0)});const R=()=>r;a.watch(()=>[e.checked],()=>{q(e.checked,!0)});const z=()=>{var se;(se=n.value)==null||se.reset()},Q=se=>{if(se==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(se,e.nodeKey)){n.value.fixToTop({index:D.value.findIndex(ve=>ve[e.nodeKey]===se[e.nodeKey])+1});return}if(se.id!==void 0&&se.id!==null){n.value.fixToTop({index:D.value.findIndex(ve=>ve[e.nodeKey]===se.id)+1});return}if(se.index>=0){n.value.fixToTop({index:se.index});return}const pe=y(se);if(pe){n.value.fixToTop({index:D.value.findIndex(ve=>y(ve)===pe)+1});return}};t.expose({handleTreeNodeClick:W,isNodeChecked:h,isRootNode:u,isNodeOpened:d,isNodeMatched:m,hasChildNode:f,setOpen:B,setChecked:q,setNodeAction:U,setNodeOpened:B,setSelect:K,scrollToTop:Q,asyncNodeClick:j,getData:R,reset:z,getNodeAttr:b,getParentNode:C});const{renderEmpty:ne}=Fq(e);Yq(e,t,n,r);const oe=se=>{var ve,ie;if(se.length)return se.map(le=>I(le,!E.value||O.value));const pe=E.value?"search-empty":"empty";return((ie=(ve=t.slots).empty)==null?void 0:ie.call(ve))??ne(pe)},Y=([se,pe,ve])=>{var ie,le,re,be;if(A.value.enabled&&se.offset.y>5){if(!e.virtualRender){const Ce=V(se.offset.y,n.value.refRoot),te=N(Ce[0]);(le=(ie=A.value)==null?void 0:ie.callback)==null||le.call(ie,te),t.emit($n.NODE_ENTER_VIEW,te);return}const ae=N(ve.slice(-1)[0]);(be=(re=A.value)==null?void 0:re.callback)==null||be.call(re,ae),t.emit($n.NODE_ENTER_VIEW,ae);return}},{resolveClassName:de}=_e();return()=>a.createVNode(cl,{ref:n,style:Bq(null,e),height:e.height,class:de("tree"),contentClassName:de("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:D.value,rowKey:Oe.UUID,throttleDelay:0,onContentScroll:Y},{default:se=>oe(se.data||[])})}}),A5=Ze(Jq),fs="upload";var ra=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ra||{}),oh=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(oh||{}),Xs=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Xs||{});const jm=[ra.BUTTON,ra.DRAGGABLE,ra.PICTURE],Wm=[oh.FORMDATA,oh.BINARY],Xn={type:{type:String,default:"formdata",validator:e=>!e||Wm.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Wm.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||jm.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${jm.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 Gm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Zq=a.defineComponent({name:"UploadList",props:{theme:Xn.theme,disabled:Xn.disabled,files:Xn.files,multiple:Xn.multiple,isShowPreview:Xn.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=_e(),{theme:o,disabled:c,multiple:u,isShowPreview:d}=a.toRefs(e),h=`${s(fs)}-list`,m=a.computed(()=>o.value===ra.PICTURE),f=a.computed(()=>m.value&&!u.value),g=a.computed(()=>Ue({[h]:!0,[`${h}--${o.value}`]:!0,[`${h}--disabled`]:c.value}));function y(T){const k=["Bytes","KB","MB","GB","TB"],L=Math.floor(Math.log(T)/Math.log(1024));return`${(T/1024**L).toFixed(2)}${k[L]}`}function b(T,k,L){n("preview",T,k,L)}function C(T,k){n("remove",T,k)}function N(T,k){n("retry",T,k)}const w=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${h}__item`},Gm(T=e.files.map(k=>{const L=Ue({[`${h}__item`]:!0,[`${h}__item-picture`]:!0,[`${h}__item--${k.status}`]:!0});return a.createVNode("li",{key:k.uid,class:L},[t!=null&&t.file?t.file({file:k}):E(k)])}))?T:{default:()=>[T]})},E=T=>[a.withDirectives(a.createVNode("img",{class:`${h}__picture-item-thumbnail`,alt:"",src:T.url},null),[[a.vShow,T.status!=="uploading"]]),a.createVNode(a.Fragment,null,[T.status==="uploading"&&a.createVNode(Ho,{width:50,class:`${h}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:T.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!c.value&&a.createVNode("div",{class:`${h}__picture-item-actions`},[d.value&&a.createVNode(Oi,{class:"action-icon",onClick:k=>b(T,e.files,k)},null),a.createVNode(pi,{class:"action-icon",onClick:k=>C(T,k)},null)])])],x=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${h}__item`},Gm(T=e.files.map(k=>{const L=Ue({[`${h}__item`]:!0,[`${h}__item--${k.status}`]:!0});return a.createVNode("li",{key:k.uid,class:L},[t!=null&&t.file?t.file({file:k}):O(k)])}))?T:{default:()=>[T]})},_=T=>{var I;const k=(I=T==null?void 0:T.raw)==null?void 0:I.type,[L]=(k==null?void 0:k.split("/"))||"";let V={text:ei,image:td,application:ei,video:dd,audio:ju}[L]||ei;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(k)&&(V=Hu),a.h(V,{class:`${h}__item-file-icon`})},O=T=>[a.createVNode("div",{class:`${h}__item-icon`},[T.isPic?a.createVNode("img",{class:`${h}__item-thumbnail`,alt:"",src:T.url},null):_(T)]),a.createVNode("div",{class:`${h}__item-summary`},[a.createVNode("div",{class:`${h}__item-name`,title:T.name},[T.name]),T.status!=="uploading"&&a.createVNode("div",{class:`${h}__item-message`,title:T.statusText},[T.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(_s,{class:`${h}__item-message-success-icon`},null),T.statusText||r.value.uploadSuccess]),T.status==="fail"&&a.createVNode(a.Fragment,null,[T.statusText||r.value.uploadFailed])]),T.status==="uploading"&&a.createVNode(Ho,{class:`${h}__item-progress`,percent:T.percentage,showText:!1,size:"small"},null),T.status!=="fail"&&a.createVNode("div",{class:`${h}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${h}__item-speed-size`},[y(T.size)]),[[a.vShow,T.size]]),a.withDirectives(a.createVNode("span",{class:`${h}__item-speed-percentage`},[T.percentage,a.createTextVNode("%")]),[[a.vShow,T.status==="uploading"]])]),!c.value&&a.createVNode("div",{class:`${h}__item-actions`},[T.status==="fail"&&a.createVNode(ad,{class:`${h}__item-retry-icon`,onClick:k=>N(T,k)},null),a.createVNode(pi,{class:`${h}__item-del-icon`,onClick:k=>C(T,k)},null)])])];return()=>{var T,k,L;return a.createVNode(a.Fragment,null,[f.value?(k=t==null?void 0:t.innerTrigger)==null?void 0:k.call(t,(T=e.files)==null?void 0:T[0]):a.createVNode("ul",{class:g.value},[m.value?w():x(),(L=t==null?void 0:t.innerTrigger)==null?void 0:L.call(t)])])}}}),Km=a.defineComponent({name:"UploadTrigger",props:{theme:Xn.theme,disabled:Xn.disabled,multiple:Xn.multiple,accept:Xn.accept,file:{type:Object},selectChange:Xn.selectChange,isShowPreview:Xn.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=_e(),{theme:o,disabled:c,file:u,multiple:d,accept:h,isShowPreview:m}=a.toRefs(e),f=`${s(fs)}-trigger`,g=a.computed(()=>o.value===ra.BUTTON),y=a.computed(()=>o.value===ra.DRAGGABLE),b=a.computed(()=>o.value===ra.PICTURE),C=a.computed(()=>b.value&&!d.value),N=a.computed(()=>b.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value),w=a.ref(null),E=a.computed(()=>{var K;return Ue({[f]:!0,[`${f}--${o.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:u.value??!1,[`${f}--${(K=u.value)==null?void 0:K.status}`]:u.value??!1,[`${f}--dragover`]:D.value,[`${f}--disabled`]:c.value})}),x=()=>{w.value.value=null,w.value.click()},_=K=>{var P;if(e.selectChange&&((P=e.selectChange)==null?void 0:P.call(e,K))===!1)return!1;const{files:j}=K.target;n("change",Array.from(j))},O=()=>{e.disabled||x()},T=K=>{K.defaultPrevented||K.target!==K.currentTarget||((K.code==="Enter"||K.code==="Space")&&x(),K.preventDefault())};function k(K,j){n("remove",K,j),j.stopPropagation(),j.preventDefault()}function L(K,j){n("preview",K,[K],j),j.stopPropagation(),j.preventDefault()}const D=a.ref(!1),V=()=>{const K=J=>{var R;if(c.value)return;if(J.preventDefault(),D.value=!1,e.selectChange&&((R=e.selectChange)==null?void 0:R.call(e,J))===!1)return!1;const q=Array.from(J.dataTransfer.files);n("change",q)},j=J=>{J.preventDefault(),D.value=!0},P=()=>{D.value=!1},ee=Ue({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ee,onDragleave:P,onDragover:j,onDrop:K},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Do,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},A=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?W(e.file):I()]),I=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(nl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),W=K=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:K.url},null),[[a.vShow,K.status!=="uploading"]]),a.createVNode(a.Fragment,null,[K.status==="uploading"&&a.createVNode(Ho,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:K.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[m.value&&a.createVNode(Oi,{class:"action-icon",onClick:j=>L(K,j)},null),a.createVNode(pi,{class:"action-icon",onClick:j=>k(K,j)},null)])])],B=()=>a.createVNode(Ht,{disabled:c.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Do,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),U=()=>{if(g.value)return B();if(y.value)return V();if(b.value)return A()};return()=>{var K;return a.createVNode("div",{class:E.value,tabindex:"0",onClick:O,onKeydown:T},[t.trigger?[t.trigger(),(K=t==null?void 0:t.default)==null?void 0:K.call(t)]:U(),a.createVNode("input",{ref:w,class:`${f}__input-file`,accept:N.value,disabled:c.value,multiple:d.value,tabindex:"-1",type:"file",onChange:_},null)])}}});var $5={exports:{}};(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(w,E){var x=w[0],_=w[1],O=w[2],T=w[3];x+=(_&O|~_&T)+E[0]-680876936|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[1]-389564586|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[2]+606105819|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[3]-1044525330|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[4]-176418897|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[5]+1200080426|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[6]-1473231341|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[7]-45705983|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[8]+1770035416|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[9]-1958414417|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[10]-42063|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[11]-1990404162|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[12]+1804603682|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[13]-40341101|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[14]-1502002290|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[15]+1236535329|0,_=(_<<22|_>>>10)+O|0,x+=(_&T|O&~T)+E[1]-165796510|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[6]-1069501632|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[11]+643717713|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[0]-373897302|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[5]-701558691|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[10]+38016083|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[15]-660478335|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[4]-405537848|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[9]+568446438|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[14]-1019803690|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[3]-187363961|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[8]+1163531501|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[13]-1444681467|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[2]-51403784|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[7]+1735328473|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[12]-1926607734|0,_=(_<<20|_>>>12)+O|0,x+=(_^O^T)+E[5]-378558|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[8]-2022574463|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[11]+1839030562|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[14]-35309556|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[1]-1530992060|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[4]+1272893353|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[7]-155497632|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[10]-1094730640|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[13]+681279174|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[0]-358537222|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[3]-722521979|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[6]+76029189|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[9]-640364487|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[12]-421815835|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[15]+530742520|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[2]-995338651|0,_=(_<<23|_>>>9)+O|0,x+=(O^(_|~T))+E[0]-198630844|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[7]+1126891415|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[14]-1416354905|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[5]-57434055|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[12]+1700485571|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[3]-1894986606|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[10]-1051523|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[1]-2054922799|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[8]+1873313359|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[15]-30611744|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[6]-1560198380|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[13]+1309151649|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[4]-145523070|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[11]-1120210379|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[2]+718787259|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[9]-343485551|0,_=(_<<21|_>>>11)+O|0,w[0]=x+w[0]|0,w[1]=_+w[1]|0,w[2]=O+w[2]|0,w[3]=T+w[3]|0}function o(w){var E=[],x;for(x=0;x<64;x+=4)E[x>>2]=w.charCodeAt(x)+(w.charCodeAt(x+1)<<8)+(w.charCodeAt(x+2)<<16)+(w.charCodeAt(x+3)<<24);return E}function c(w){var E=[],x;for(x=0;x<64;x+=4)E[x>>2]=w[x]+(w[x+1]<<8)+(w[x+2]<<16)+(w[x+3]<<24);return E}function u(w){var E=w.length,x=[1732584193,-271733879,-1732584194,271733878],_,O,T,k,L,D;for(_=64;_<=E;_+=64)s(x,o(w.substring(_-64,_)));for(w=w.substring(_-64),O=w.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<O;_+=1)T[_>>2]|=w.charCodeAt(_)<<(_%4<<3);if(T[_>>2]|=128<<(_%4<<3),_>55)for(s(x,T),_=0;_<16;_+=1)T[_]=0;return k=E*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(k[2],16),D=parseInt(k[1],16)||0,T[14]=L,T[15]=D,s(x,T),x}function d(w){var E=w.length,x=[1732584193,-271733879,-1732584194,271733878],_,O,T,k,L,D;for(_=64;_<=E;_+=64)s(x,c(w.subarray(_-64,_)));for(w=_-64<E?w.subarray(_-64):new Uint8Array(0),O=w.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<O;_+=1)T[_>>2]|=w[_]<<(_%4<<3);if(T[_>>2]|=128<<(_%4<<3),_>55)for(s(x,T),_=0;_<16;_+=1)T[_]=0;return k=E*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(k[2],16),D=parseInt(k[1],16)||0,T[14]=L,T[15]=D,s(x,T),x}function h(w){var E="",x;for(x=0;x<4;x+=1)E+=r[w>>x*8+4&15]+r[w>>x*8&15];return E}function m(w){var E;for(E=0;E<w.length;E+=1)w[E]=h(w[E]);return w.join("")}m(u("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function w(E,x){return E=E|0||0,E<0?Math.max(E+x,0):Math.min(E,x)}ArrayBuffer.prototype.slice=function(E,x){var _=this.byteLength,O=w(E,_),T=_,k,L,D,V;return x!==n&&(T=w(x,_)),O>T?new ArrayBuffer(0):(k=T-O,L=new ArrayBuffer(k),D=new Uint8Array(L),V=new Uint8Array(this,O,k),D.set(V),L)}}();function f(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function g(w,E){var x=w.length,_=new ArrayBuffer(x),O=new Uint8Array(_),T;for(T=0;T<x;T+=1)O[T]=w.charCodeAt(T);return E?O:_}function y(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function b(w,E,x){var _=new Uint8Array(w.byteLength+E.byteLength);return _.set(new Uint8Array(w)),_.set(new Uint8Array(E),w.byteLength),x?_:_.buffer}function C(w){var E=[],x=w.length,_;for(_=0;_<x-1;_+=2)E.push(parseInt(w.substr(_,2),16));return String.fromCharCode.apply(String,E)}function N(){this.reset()}return N.prototype.append=function(w){return this.appendBinary(f(w)),this},N.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var E=this._buff.length,x;for(x=64;x<=E;x+=64)s(this._hash,o(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},N.prototype.end=function(w){var E=this._buff,x=E.length,_,O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(_=0;_<x;_+=1)O[_>>2]|=E.charCodeAt(_)<<(_%4<<3);return this._finish(O,x),T=m(this._hash),w&&(T=C(T)),this.reset(),T},N.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},N.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},N.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},N.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},N.prototype._finish=function(w,E){var x=E,_,O,T;if(w[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,w),x=0;x<16;x+=1)w[x]=0;_=this._length*8,_=_.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(_[2],16),T=parseInt(_[1],16)||0,w[14]=O,w[15]=T,s(this._hash,w)},N.hash=function(w,E){return N.hashBinary(f(w),E)},N.hashBinary=function(w,E){var x=u(w),_=m(x);return E?C(_):_},N.ArrayBuffer=function(){this.reset()},N.ArrayBuffer.prototype.append=function(w){var E=b(this._buff.buffer,w,!0),x=E.length,_;for(this._length+=w.byteLength,_=64;_<=x;_+=64)s(this._hash,c(E.subarray(_-64,_)));return this._buff=_-64<x?new Uint8Array(E.buffer.slice(_-64)):new Uint8Array(0),this},N.ArrayBuffer.prototype.end=function(w){var E=this._buff,x=E.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],O,T;for(O=0;O<x;O+=1)_[O>>2]|=E[O]<<(O%4<<3);return this._finish(_,x),T=m(this._hash),w&&(T=C(T)),this.reset(),T},N.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},N.ArrayBuffer.prototype.getState=function(){var w=N.prototype.getState.call(this);return w.buff=y(w.buff),w},N.ArrayBuffer.prototype.setState=function(w){return w.buff=g(w.buff,!0),N.prototype.setState.call(this,w)},N.ArrayBuffer.prototype.destroy=N.prototype.destroy,N.ArrayBuffer.prototype._finish=N.prototype._finish,N.ArrayBuffer.hash=function(w,E){var x=d(new Uint8Array(w)),_=m(x);return E?C(_):_},N})})($5);var Qq=$5.exports;const Ym=jt(Qq),Da="An error occurred during upload";function _o(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const eJ=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",u=>{const d=u;d.percent=u.total>0?u.loaded/u.total*100:0,e.onProgress(d)});const o=new FormData;if(s&&e.data){let u=e.data;Array.isArray(u)||(u=[u]),u.forEach(d=>{for(const[h,m]of Object.entries(d))Array.isArray(m)?o.append(h,...m):o.append(h,m)})}if(s&&e.formDataAttributes){let u=e.formDataAttributes;Array.isArray(u)||(u=[u]),u.forEach(d=>{Array.isArray(d.value)?o.append(d.name,...d.value):o.append(d.name,d.value)})}if(s&&o.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let u=new Error(Da);const d=_o(t);d&&(u=new Error(d.message||Da)),console.log(d,u),e.onError(u)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const u=_o(t);let d=new Error(Da);return u&&(d=new Error(u.message||Da)),e.onError(d)}e.onSuccess(_o(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(u=>{const d=u.name,h=u.value;t.setRequestHeader(d,h)});else{const u=e.header.name,d=e.header.value;t.setRequestHeader(u,d)}const c=e.headers||{};if(c instanceof Headers)c.forEach((u,d)=>t.setRequestHeader(d,u));else for(const[u,d]of Object.entries(c))Jm(d)||t.setRequestHeader(u,String(d));return t.send(s?o:e.file),t},V5=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,tJ=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 rJ(n,t),o=[];nJ(e,n,r,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:r,hash:s},u=new XMLHttpRequest;u.open(e.method,e.mergeUrl,!0),u.onreadystatechange=()=>{if(u.readyState===4){const d=_o(u);if(u.status<200||u.status>=300){let h=new Error(Da);return d&&(h=new Error(d.message||Da)),e.onError(h)}e.onSuccess(d)}},u.onloadend=()=>{e.onComplete()},u.setRequestHeader("Content-type","application/JSON"),u.send(JSON.stringify(c))})},nJ=(e,t,n,r,s,o)=>{for(let c=0;c<n;c++){const u=new Promise((d,h)=>{const m=c*o,f=Math.min(t.size,m+o),g=new FormData;if(e.data){let C=e.data;Array.isArray(C)||(C=[C]),C.forEach(N=>{for(const[w,E]of Object.entries(N))Array.isArray(E)?g.append(w,...E):g.append(w,E)})}if(e.formDataAttributes){let C=e.formDataAttributes;Array.isArray(C)||(C=[C]),C.forEach(N=>{Array.isArray(N.value)?g.append(N.name,...N.value):g.append(N.name,N.value)})}g.append("file",V5.call(t,m,f)),g.append("name",t.name),g.append("total",n.toString()),g.append("index",c.toString()),g.append("size",t.size.toString()),g.append("hash",r.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const C=_o(y);if(y.status<200||y.status>=300){h(C);let N=new Error(Da);C&&(N=new Error(C.message||Da)),e.onError(N)}else d("reponseText")}},y.upload.addEventListener("progress",C=>{const N=C;e.onProgress(N,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(C=>{const N=C.name,w=C.value;y.setRequestHeader(N,w)});else{const C=e.header.name,N=e.header.value;y.setRequestHeader(C,N)}const b=e.headers||{};if(b instanceof Headers)b.forEach((C,N)=>y.setRequestHeader(N,C));else for(const[C,N]of Object.entries(b))Jm(N)||y.setRequestHeader(C,String(N));y.send(g)});s.push(u)}},rJ=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let o=0;const c=new Ym.ArrayBuffer,u=new FileReader;function d(){const h=o*t,m=h+t>=e.size?e.size:h+t;u.readAsArrayBuffer(V5.call(e,h,m))}u.onload=h=>{if(c.append(h.target.result),o+=1,o<s)d();else{const m=c.end(),f=new Ym;f.append(m),f.append(e.name);const g=f.end();n(g)}},u.onerror=()=>{r(new Error("File slice failed"))},d()}).catch(n=>{console.log(n)});function Xm(e){return Date.now()+e}const aJ=(e,t)=>{const n=a.computed(()=>{var g;return typeof e.size=="number"?e.size:(g=e==null?void 0:e.size)==null?void 0:g.maxImgSize}),r=a.computed(()=>{var g;return typeof e.size=="number"?e.size:(g=e==null?void 0:e.size)==null?void 0:g.maxImgSize}),s=a.ref([]);function o(g){return s.value.find(y=>y.uid===g.uid)}let c=0;function u(g){var N;c+=1,g.uid=Xm(c);const y={uid:g.uid,name:g.name,status:Xs.NEW,size:g.size,raw:g},b=g.type.startsWith("image/");let C=null;if(b){try{y.url=window.URL.createObjectURL(g)}catch(w){console.error(w)}y.isPic=!0}return e.validateName&&!((N=e.validateName)!=null&&N.test(y.name))&&(y.status=Xs.FAIL,y.statusText="invalid filename",C=new Error(y.statusText)),b&&g.size>n.value*1024**2&&(y.status=Xs.FAIL,y.statusText="invalid file size",C=new Error(y.statusText)),!b&&g.size>r.value*1024**2&&(y.status=Xs.FAIL,y.statusText="invalid file size",C=new Error(y.statusText)),s.value.push(y),C}async function d(g){var C;const y=g instanceof File?o(g):g,b=N=>{var w;t.onRemove(N,s.value),s.value.splice(s.value.indexOf(y),1),(w=N.url)!=null&&w.startsWith("blob:")&&URL.revokeObjectURL(N.url)};e.beforeRemove?await((C=e.beforeRemove)==null?void 0:C.call(e,y,s.value))!==!1&&b(y):b(y)}async function h(g,y,b){const C=o(y);C&&(C.status="fail",C.statusText=g.message,C.response=b)}async function m(g,y){const b=o(y);b&&(b.status="success",b.response=g)}async function f(g,y){const b=o(y);b&&(b.status="uploading",b.percentage=Math.round(g.percent))}return a.watch(()=>e.files,g=>{s.value=g.map(y=>(c+=1,{...y,uid:y.uid??Xm(c),status:y.status??Xs.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:u,handleRemove:d,handleError:h,handleSuccess:m,handleProgress:f}},sJ=a.defineComponent({name:"Upload",props:Xn,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=_e(),o=a.shallowRef({}),c=a.computed(()=>e.theme===ra.PICTURE),u=a.computed(()=>c.value&&!e.multiple),d=a.computed(()=>Ue({[`${s(fs)}`]:!0,[`${s(fs)}--${e.theme}`]:!0,[`${s(fs)}--disabled`]:e.disabled,[`${s(fs)}--single-picture`]:u.value,[e.extCls]:e.extCls??!1})),h=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function m(k,L){T(k),n("delete",k,L)}const{fileList:f,handlePreprocess:g,handleRemove:y,handleProgress:b,handleSuccess:C,handleError:N}=aJ(e,{onRemove:m});function w(k){if(!k.length)return;if(e.limit>1&&f.value.length+k.length>e.limit){n("exceed",k,f.value);return}!e.multiple&&e.limit===1&&(f.value=[]);let L=k;(!e.multiple||e.limit===1)&&(L=k.slice(0,1));for(const D of L){const V=D,A=g(V);if(A){n("error",V,f.value,A);return}e.autoUpload&&_(V,L)}}function E(k,L){n("preview",k,L)}function x(k){O(k.raw)}async function _(k,L){var V;if(!e.beforeUpload)return O(k,L);let D;try{D=await((V=e.beforeUpload)==null?void 0:V.call(e,k,L))}catch{D=!1}if(D===!1){y(k);return}O(k,L)}function O(k,L){const{type:D,headers:V,header:A,data:I,formDataAttributes:W,method:B,withCredentials:U,name:K,url:j,sliceUrl:P,mergeUrl:ee,chunkSize:J,customRequest:q}=e,{uid:R}=k,z={type:D,headers:V,header:A,withCredentials:U,file:k,data:I,formDataAttributes:W,method:B,filename:K,action:j,sliceUrl:P,mergeUrl:ee,chunkSize:J,onProgress:oe=>{b(oe,k),n("progress",oe,k,f.value)},onSuccess:oe=>{var de;const Y=oe;if((de=e==null?void 0:e.handleResCode)!=null&&de.call(e,Y))C(oe,k),n("success",oe,k,f.value);else{const se=new Error((Y==null?void 0:Y.message)||"unknow error");N(se,k,oe),n("error",k,f.value,se)}delete o.value[R]},onError:oe=>{N(oe,k),n("error",k,f.value,oe),delete o.value[R]},onComplete:()=>{L&&L.indexOf(k)===L.length-1&&n("done",f.value)}};let Q=e.sliceUpload?tJ:eJ;q&&(Q=q);const ne=Q(z);o.value[R]=ne,ne instanceof Promise&&ne.then(z.onSuccess,z.onError)}function T(k){let L=o.value;k&&(L={[k.uid]:o.value[k.uid]}),Object.keys(L).forEach(D=>{if(L[D]instanceof XMLHttpRequest){const V=L[D];V==null||V.abort()}delete o.value[D]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:k})=>{k!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(k)})}),r({handlePreview:E,handleRemove:y,handleRetry:x}),()=>a.createVNode("div",{class:d.value},[!c.value&&a.createVNode(Km,a.mergeProps(h.value,{onChange:w}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(fs)}__tip`},[e.tip]),a.createVNode(Zq,{disabled:e.disabled,files:f.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:E,onRemove:y,onRetry:x},{innerTrigger:k=>c.value&&a.createVNode(Km,a.mergeProps(h.value,{file:k,onChange:w,onPreview:E,onRemove:y}),t),file:t.file})])}}),D5=Ze(sJ),g0=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:md,Affix:ep,Alert:np,AnimateNumber:rp,Backtop:ap,Badge:sp,Breadcrumb:op,Button:Ht,Card:Rp,Cascader:Yp,Checkbox:on,CodeDiff:rv,Collapse:sv,ColorPicker:cv,ConfigProvider:Qg,Container:uv,DatePicker:Ov,Dialog:Bv,Divider:zv,Dropdown:Uv,Exception:_d,FixedNavbar:jv,Form:Xv,InfoBox:Jv,Input:Ma,Link:Qv,Loading:ka,Menu:t4,Message:c4,Modal:ol,Navigation:u4,Notify:f4,OverflowTitle:Mp,Pagination:k2,PopConfirm:_4,Popover:Cn,Popover2:S4,Process:T4,Progress:Ho,Radio:cu,Rate:A4,ResizeLayout:$4,SearchSelect:R4,Select:D2,Sideslider:H4,Slider:B4,Steps:U4,Swiper:j4,Switcher:W4,Tab:X4,Table:d5,Tag:Mo,TagInput:b5,TimePicker:w5,Timeline:C5,Transfer:N5,Tree:A5,Upload:D5,VirtualRender:cl,scrollbar:$2},Symbol.toStringTag,{value:"Module"})),qm=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(g0).forEach(s=>{const o=g0[s];"install"in o?t.use(o,{prefix:r}):t.component(r+s,g0[s])}),n&&Eh(n,t)},iJ={createInstall:qm,install:qm()},oJ=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:md},Symbol.toStringTag,{value:"Module"})),k5="2.0.1-beta.105";window.__bkui_vue_version__=k5;exports.$bkPopover=md;exports.Affix=ep;exports.Alert=np;exports.AnimateNumber=rp;exports.Backtop=ap;exports.Badge=sp;exports.Breadcrumb=op;exports.Button=Ht;exports.Card=Rp;exports.Cascader=Yp;exports.Checkbox=on;exports.CodeDiff=rv;exports.Collapse=sv;exports.ColorPicker=cv;exports.ConfigProvider=Qg;exports.Container=uv;exports.DatePicker=Ov;exports.Dialog=Bv;exports.Divider=zv;exports.Dropdown=Uv;exports.Exception=_d;exports.FixedNavbar=jv;exports.Form=Xv;exports.InfoBox=Jv;exports.Input=Ma;exports.Link=Qv;exports.Loading=ka;exports.Menu=t4;exports.Message=c4;exports.Modal=ol;exports.Navigation=u4;exports.Notify=f4;exports.OverflowTitle=Mp;exports.Pagination=k2;exports.PopConfirm=_4;exports.Popover=Cn;exports.Popover2=S4;exports.Process=T4;exports.Progress=Ho;exports.Radio=cu;exports.Rate=A4;exports.ResizeLayout=$4;exports.SearchSelect=R4;exports.Select=D2;exports.Sideslider=H4;exports.Slider=B4;exports.Steps=U4;exports.Swiper=j4;exports.Switcher=W4;exports.Tab=X4;exports.Table=d5;exports.Tag=Mo;exports.TagInput=b5;exports.TimePicker=w5;exports.Timeline=C5;exports.Transfer=N5;exports.Tree=A5;exports.Upload=D5;exports.VirtualRender=cl;exports.bkEllipsis=Ok;exports.bkEllipsisInstance=f2;exports.bkLoading=cp;exports.bkTooltips=Rr;exports.clickoutside=Ir;exports.default=iJ;exports.defaultRootConfig=bs;exports.mousewheel=Bk;exports.overflowTitle=Xk;exports.plugins=oJ;exports.provideGlobalConfig=Eh;exports.rootProviderKey=hi;exports.scrollbar=$2;exports.setPrefixVariable=C0;exports.useGlobalConfig=S$;exports.useLocale=dt;exports.usePrefix=_e;exports.version=k5;
|
387
|
+
`,D={d:L,stroke:f||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:T},V={d:L,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":o>0&&y||0,"fill-opacity":"0",class:`process-circle-path ${r(`${h}-circle-trail`)}`,style:k};return a.createVNode("div",{style:C,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",D,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:g,class:"progress-circle-text"},[n==null?void 0:n.default()])])},aK=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=_e(),{percent:s,strokeWidth:o,size:c,color:u,titleStyle:d,showText:h,textInside:m,theme:f}=t,g={height:`${o}px`,lineHeight:`${o}px`},y={width:`${s}%`,background:u,animationDuration:"3s"},b=(C=!0)=>(h||n.default)&&(C&&m||!C&&!m)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:g,class:`${r(`progress-${c||"normal"}`)} progress-bar`},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`${r(`${f}`)}`]:!0}},[a.createVNode("div",{style:d,class:"inner-text"},[b()])])]),b(!1)])};function Am(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const sK={extCls:v.string,type:yS(),percent:v.number.def(0),theme:v.theme().def(_u.PRIMARY),size:v.size(),width:v.number.def(126),strokeWidth:v.number,strokeLinecap:vS(),textInside:v.bool.def(!1),showText:v.bool.def(!0),color:v.string,bgColor:v.string,fixed:v.number.validate(e=>e>=0&&e<=20).def(0),format:v.func.def(e=>`${e}%`),titleStyle:v.object.def({fontSize:"16px",verticalAlign:"middle"})},iK=a.defineComponent({name:"Progress",props:sK,setup(){const{resolveClassName:e}=_e();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var u;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:o}=this.$props,c=t((u=this.validPercent(n))==null?void 0:u.toFixed(o));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||r?null:a.createVNode("span",{style:typeof c=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(aK,t,Am(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(rK,t,Am(e)?e:{default:()=>[e]}));const r={class:Ue({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),Ho=Ze(iK),E4=Symbol("RadioGroup");function O4(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const L4=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(E4,Vg),s=!Dg(r),o=a.ref(!1),c=a.ref(!1),u=a.ref("default"),d=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(u.value=r.props.size,a.watch(()=>r.props.modelValue,f=>{o.value=f===t.label},{immediate:!0})):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const h=(f=!0)=>{o.value=f},m=f=>{if(d.value||c.value)return;const g=f.target,y=g.checked;Promise.resolve(s?r.props.beforeChange(y):t.beforeChange(y)).then(b=>{if(b){o.value=g.checked;const C=o.value?t.label:"";return n("update:modelValue",C),n("change",C),s&&r.handleChange(e.proxy),a.nextTick(()=>{g.checked!==o.value&&(g.checked=o.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{g.checked=o.value}).finally(()=>{c.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:u,isChecked:o,isDisabled:d,setChecked:h,handleChange:m}},oK={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),beforeChange:Ci().def(()=>!0)},lK=a.defineComponent({name:"Radio",props:oK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=O4(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:u}=L4(),{resolveClassName:d}=_e();return{size:r,isFocused:e,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:u,resolveClassName:d}},render(){const e=Ue({[`${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()])}}),cK={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),size:v.size(),beforeChange:Ci().def(()=>!0)},uK=a.defineComponent({name:"RadioButton",props:cK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=O4(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:u}=L4(),{resolveClassName:d}=_e();return{isFocused:e,size:r,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:u,resolveClassName:d}},render(){const e=Ue({[`${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()])}}),dK={name:v.string.def(""),modelValue:v.oneOfType([v.bool,v.string,v.number]),disabled:v.bool,withValidate:v.bool.def(!0),type:v.oneOf(["tab","capsule","card"]).def("tab"),size:v.size(),beforeChange:Ci().def(()=>!0)},fK=a.defineComponent({name:"RadioGroup",props:dK,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=dr(),r=[],s=d=>{r.push(d)},o=d=>{const h=r.indexOf(d);h>-1&&r.splice(h,1)},c=d=>{const h=d.label;r.forEach(m=>{m!==d&&m.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};a.provide(E4,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(d=>{d.setChecked(d.label===e.modelValue)})});const{resolveClassName:u}=_e();return{resolveClassName:u}},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()])}}),cu=ln(lK,{Group:fK,Button:uK}),bc=a.defineComponent({name:"Star",props:{rate:v.number.def(0),width:v.number.def(16),height:v.number.def(16),editable:v.bool.def(!0),hoverRate:v.number.def(0),max:v.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=h=>{if(!e.editable)return;const m=h+1;t("chooseRate",m)},r=(h,m)=>{if(!e.editable)return;const f=h+1;t("changeHover",f),a.nextTick(()=>{m.target.classList.add(o("is-hover"))})},s=h=>{e.editable&&a.nextTick(()=>{h.target.classList.remove(o("is-hover"))})},{resolveClassName:o}=_e(),c=h=>Ue({[`${o("is-select")}`]:h<Math.floor(u.value),[`${o("is-edit")}`]:e.editable,[`${o("rate-star")}`]:!0}),u=a.computed(()=>e.hoverRate||e.rate),d={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${o("rate-stars")}`},[Array(e.max).fill(1).map((h,m)=>a.createVNode("svg",{style:d,class:c(m),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(m),onMouseenter:f=>r(m,f),onMouseleave:f=>s(f)},[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)])])])])]))])}}),hK=a.defineComponent({name:"Rate",components:{star:bc},props:{modelValue:v.number.def(0),size:v.size(),editable:v.bool.def(!0),withValidate:v.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=_e(),r=dr(),s=a.ref(0),o=g=>{e.editable&&(t("update:modelValue",g),t("change",g))},c=g=>{s.value=g,t("hover-change",g)},u=Ue({[`${n("rate")}`]:!0}),h={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},m=a.computed(()=>{const g=Math.floor(e.modelValue),y=(h.width+3)*g,b=h.width*(e.modelValue-g);return{width:`${y+b}px`}}),f={width:h.width,height:h.height};return a.watch(()=>e.modelValue,()=>{var g;e.withValidate&&((g=r==null?void 0:r.validate)==null||g.call(r,"change"))}),()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(bc,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:c,onChooseRate:o,onMouseleave:()=>c(0)},f),null):[a.createVNode(bc,a.mergeProps({style:m.value,class:`${n("score-real")}`,editable:!1,rate:5},f),null),a.createVNode(bc,a.mergeProps({editable:!1,rate:0},f),null)]])}}),A4=Ze(hK),mK=a.defineComponent({name:"ResizeLayout",props:{placement:v.placement().def("left"),min:v.number.def(3),max:v.number.def(1/0),triggerWidth:v.number.def(5),triggerOffset:v.number.def(3),initialDivide:v.oneOfType([String,Number]).def("20%"),immediate:v.bool,disabled:v.bool,collapsible:v.bool,isCollapsed:v.bool.def(!1),autoMinimize:v.oneOfType([Boolean,Number]).def(!1),border:v.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:o,max:c,min:u,immediate:d,autoMinimize:h,collapsible:m,isCollapsed:f}=a.toRefs(e),g=a.ref(f.value),y=a.ref(!0),b=a.ref(!1),C=a.ref(null),N=a.ref({}),w=a.ref(null),E=a.ref(null),x=a.ref(null),_=a.ref(null),O=a.computed(()=>["left","right"].includes(n.value)),T=a.computed(()=>O.value?"width":"height"),k=a.computed(()=>{let R=r.value;return u.value!==3&&typeof R!="number"?`${u.value}px`:(typeof R=="number"&&(R=R<=u.value?`${u.value}px`:`${R}px`),R)}),L=a.computed(()=>m.value&&f.value?{[T.value]:"0px"}:{[T.value]:k.value}),D=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[T.value]:`${o.value}px`})),V=a.computed(()=>h.value?typeof h.value=="boolean"?50:h.value:0),A=()=>{const R=w.value.getBoundingClientRect();C.value=O.value?R.width:R.height};let I=new ResizeObserver(A);const W=()=>{switch(E.value.style.visibility="visible",n.value){case"left":E.value.style.inset=`0 auto auto ${N.value.aside.width}px`;break;case"right":E.value.style.inset=`0 ${N.value.aside.width}px auto auto`;break;case"top":E.value.style.inset=`${N.value.aside.height}px auto auto 0`;break;case"bottom":E.value.style.inset=`auto auto ${N.value.aside.height}px 0`;break}},B=()=>{x.value.style.display="block",x.value.style.cursor=O.value?"col-resize":"row-resize"},U=R=>Math.min(c.value,Math.max(u.value,R),C.value-o.value),K=R=>{t("before-resize",R);const z=_.value.getBoundingClientRect();N.value=Object.freeze({mouse:{clientX:R.clientX,clientY:R.clientY},aside:{width:z.width,height:z.height}}),B(),d.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=Y=>{t("resizing",Y)},ne=Y=>{let de;switch(n.value){case"top":de=Y.clientY-N.value.mouse.clientY;break;case"right":de=N.value.mouse.clientX-Y.clientX;break;case"bottom":de=N.value.mouse.clientY-Y.clientY;break;case"left":de=Y.clientX-N.value.mouse.clientX}const se=N.value.aside[T.value]+de,pe=U(se)+s.value,ve=`${pe}px`;d.value?_.value.style[T.value]=ve:E.value.style[n.value]=ve,Q(pe)},oe=()=>{if(E.value.style.visibility="hidden",x.value.style.display="none",document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",oe),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{j(),t("after-resize",parseFloat(E.value.style[n.value]))}),d.value)return!1;_.value.style[T.value]=E.value.style[n.value]};document.addEventListener("mousemove",ne),document.addEventListener("mouseup",oe)},j=()=>{if(!h.value)return!1;const R=_.value.getBoundingClientRect();if(b.value=g.value=R[T.value]<=V.value,!b.value)return y.value=!0,!1;ee(),a.nextTick(()=>{_.value.setAttribute(`data-${T.value}`,L.value[T.value])})},P=R=>{g.value=typeof R=="boolean"?R:!g.value,ee(),t("collapse-change",g.value)},ee=()=>{const R=_.value.getBoundingClientRect();J(!g.value),g.value?(_.value.setAttribute(`data-${T.value}`,`${R[T.value]}px`),_.value.style[T.value]=e.collapsible?"0px":"5px"):(y.value=!0,_.value.style[T.value]=_.value.getAttribute(`data-${T.value}`)||k.value)},J=R=>{const z=()=>{y.value=R,_.value.style.transition="",_.value.removeEventListener("transitionend",z)};_.value.addEventListener("transitionend",z),_.value.style.transition=`${T.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(f,()=>{g.value=f.value,P(g.value)}),a.onMounted(()=>{I.observe(w.value)}),a.onBeforeUnmount(()=>{w.value&&(I.unobserve(w.value),I=null)});const{resolveClassName:q}=_e();return{collapsed:g,asideContentVisible:y,minimized:b,limitMax:C,state:N,vertical:O,cssPropKey:T,bkResizeLayoutRef:w,resizeProxyRef:E,resizeMaskRef:x,asideRef:_,triggerStyle:D,asideStyle:L,handleMousedown:K,setCollapse:P,resolveClassName:q}},render(){var t,n,r,s,o,c;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(kn,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(cr,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),$4=Ze(mK);var d0=null;function gK(e){return d0||(d0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),d0(e)}var f0=null;function pK(e){f0||(f0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),f0(e)}function vK(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 wc(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function V4(e,t,n){var r=window.getComputedStyle(e,n||null)||{display:"none"};return r[t]}function eh(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(V4(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var yK='.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%}',th=0,Fc=null;function bK(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=NK.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||uu(e)}),c=eh(e),u=c.detached,d=c.rendered;e.__resize_observer_triggered__=u===!1&&d===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){uu(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(th||(Fc=vK(yK)),xK(e),e.__resize_rendered__=eh(e).rendered,window.MutationObserver){var h=new MutationObserver(e.__resize_mutation_handler__);h.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=h}}e.__resize_listeners__.push(t),th++}function wK(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",I2),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--th&&Fc&&Fc.parentNode.removeChild(Fc)}}function CK(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==r?{width:s,height:o}:null}function NK(){var e=eh(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(P2(this),this.addEventListener("scroll",I2,!0)),this.__resize_rendered__=t,uu(this))}function I2(){var e=this;P2(this),this.__resize_raf__&&pK(this.__resize_raf__),this.__resize_raf__=gK(function(){var t=CK(e);t&&(e.__resize_last__=t,uu(e))})}function uu(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function xK(e){var t=V4(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=wc("div",{className:"resize-triggers"}),r=wc("div",{className:"resize-expand-trigger"}),s=wc("div"),o=wc("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:o},P2(e),e.addEventListener("scroll",I2,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function P2(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,o=s.scrollWidth,c=s.scrollHeight,u=n.offsetWidth,d=n.offsetHeight,h=n.scrollWidth,m=n.scrollHeight;s.scrollLeft=o,s.scrollTop=c,r.style.width=u+1+"px",r.style.height=d+1+"px",n.scrollLeft=h,n.scrollTop=m}var Yn=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(Yn||{});const D4=Symbol("SEARCH_SELECT_PROVIDER_KEY"),_K=e=>{a.provide(D4,e)},k4=()=>a.inject(D4);var La=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(La||{});const I4=/(\||,|、|\r\n|\n)/gm,P4=/^(\||,|、|\r\n|\n)$/;var bi=(e=>(e.AND="&",e.OR="|",e))(bi||{});class Js{constructor(t,n="default"){$e(this,"id");$e(this,"name");$e(this,"values",[]);$e(this,"condition");$e(this,"logical");$e(this,"nameRenderKey",us(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=us(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(o=>o.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),o=r(s);return[{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}]}return n.map(s=>{const o=this.values.find(u=>u.name===s);if(o)return o;const c=r(s);return{id:c?c.id:s,name:c?c.name:s,disabled:!!(c!=null&&c.disabled)}})}addValues(t,n=!0){const r=t.split(I4).filter(u=>u.trim()&&!P4.test(u)),s=n?this.values.map(u=>u.name):[],c=[...r,...s].filter(u=>u.trim()).join(this.logical);this.values=this.str2Values(c)}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 SK=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:bi.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=_e(),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),o=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function c(b){t("selectItem",b)}function u(b){t("selectCondition",b)}function d(b){t("footerClick",b)}const h=a.computed(()=>{var b,C;return(b=e.list)!=null&&b.length?(C=e.keyword)!=null&&C.length?e.list.filter(N=>N.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function m(b){if(!b)return b;let{keyword:C}=e;const N=C.length;if(!(C!=null&&C.trim().length)||!b.toLocaleLowerCase().includes(C.toLocaleLowerCase()))return b;const w=[];let E=-1;return C=C.replace(/([.*/]{1})/gim,"\\$1"),b.replace(new RegExp(`${C}`,"igm"),(x,_)=>(w.length===0&&_!==0?w.push(b.slice(0,_)):E>=0&&w.push(b.slice(E+x.length,_)),w.push(a.createVNode("span",{class:"is-keyword"},[x])),E=_,x)),E>=0&&w.push(b.slice(E+N)),w.length?w:b}function f(b){var C;return(C=b.value)!=null&&C.name?[a.createVNode("span",{class:"menu-name"},[b.name,a.createTextVNode(":")]),b.value.name]:m(b.name)}function g(b,C){b.stopPropagation(),b.preventDefault(),c(C)}function y(b){t("update:logical",b)}return{handleClick:c,handleClickCondition:u,handleClickFooterBtn:d,handleSelectedChange:g,handleLogicalChange:y,filterList:h,getSearchNode:f,localFooterBtns:s,resolveClassName:r,resolveContentStyles:o,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:o=>this.handleSelectedChange(o,s)},[a.createVNode(on,{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(cu,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(cu,{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()])}}),M4=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Ir},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:La.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=dt("searchSelect"),{resolveClassName:s}=_e(),o=a.ref(null),c=a.ref(null),u=a.ref(""),d=a.ref(!1),h=a.ref(!1),m=a.ref(!1),f=a.ref(e.defaultUsingItem),g=a.ref(""),y=a.ref(!1),b=jo(100,Q);let C=!1;const N=a.ref([]),w=a.ref([]),{editKey:E,onValidate:x,searchData:_}=k4(),O=a.computed(()=>{var te;return((te=f.value)==null?void 0:te.logical)||bi.OR}),T=a.ref(us(10));a.watch(E,()=>{e.mode===La.DEFAULT&&E.value&&(m.value=!1)}),a.watch([w,m],()=>{var ce,F;m.value&&((ce=w.value)==null?void 0:ce.some(G=>!G.disabled))?C||(g.value=e.valueBehavior===Yn.NEED_KEY&&((F=w.value.find(G=>!G.disabled))==null?void 0:F.id)||"",C=!0,document.addEventListener("keydown",k)):(document.removeEventListener("keydown",k),C=!1,e.valueBehavior!==Yn.NEED_KEY&&(g.value=""))});function k(te){switch(te.code){case"ArrowDown":case"ArrowUp":L(te);break;case"Enter":case"NumpadEnter":D(te);break}}function L(te){var G;te.preventDefault(),(G=o.value)==null||G.blur();const ce=w.value.length;let F=w.value.findIndex(ye=>ye.id===g.value);for(let ye=0;ye<ce;ye++){F=(F+(te.code==="ArrowDown"?1:-1)+ce)%ce;const ge=w.value[F];if(ge&&!ge.disabled){const X=document.getElementById(ge.id);X==null||X.focus(),g.value=ge.id;break}}}function D(te){var F;if(!C)return;te.preventDefault();const ce=(F=w.value)==null?void 0:F.find(G=>G.id===g.value);ce&&P(ce)}function V(te){var ce,F,G;if(!((ce=c.value)!=null&&ce.contains(te.target)||!((F=e.clickOutside)!=null&&F.call(e,te.target,c.value)))){if((G=f.value)!=null&&G.isCustomMenu){e.mode===La.EDIT&&(K().then(ye=>ye&&pe()),m.value=!1);return}if(e.mode===La.EDIT||f.value){f.value&&K().then(ye=>ye&&pe()),f.value||t("focus",!1);return}h.value=!1,m.value=!1,t("focus",h.value)}}let A=!1;function I(te){if(!A){if(d.value=!1,e.mode===La.EDIT&&f.value&&!h.value){const ce=Array.from(o.value.querySelectorAll(`[data-type="${f.value.values.length?"value":f.value.type}"]`));if(!ce.length)return;te==null||te.preventDefault();const F=document.createRange(),G=window.getSelection();F.selectNodeContents(ce.at(-1)),G==null||G.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),G.addRange(F),de(!0,!1);return}Q(),de(!1,!h.value)}}function W(te){te.preventDefault();const ce=te.clipboardData.getData("text").trim();if(!f.value){const F=ve(ce);if(F){f.value=F,de(!0,!0);return}u.value=ce.split(I4).filter(G=>G.trim()&&!P4.test(G)).join(` ${O.value} `),o.value.innerText=u.value,de(),b();return}f.value.addValues(ce),b()}function B(te){const ce=te.target.innerText.trim();if(f.value){if(f.value&&!ce){T.value=us(10),g.value="",f.value=null,u.value="",setTimeout(()=>{de(!0,!0),a.nextTick(Y)},200);return}}else{u.value=ce,b();return}u.value=f.value.isSpecialType()?ce:ce.replace(f.value.name,"").replace(":","").trim(),b()}function U(te){var ce;switch(te.code){case"Enter":case"NumpadEnter":if(e.valueBehavior===Yn.NEED_KEY&&w.value.some(F=>F.id===g.value)){!f.value&&((ce=u.value)!=null&&ce.length)&&te.preventDefault();return}K(te).then(F=>F&&pe());break;case"Backspace":j(te);default:d.value=!1;break}}async function K(te){var F,G,ye;return te==null||te.preventDefault(),await new Promise(ge=>setTimeout(ge,0)),f.value?u.value?await oe():!((F=f.value)!=null&&F.isSpecialType())&&((G=f.value)==null?void 0:G.values.length)<1?(d.value=!d.value,!1):(await z()&&((ye=f.value)!=null&&ye.isCustomMenu&&(m.value=!1),se()),!1):!u.value||e.valueBehavior===Yn.NEED_KEY?void 0:await ne()}function j(te){var ce,F,G;if(!f.value&&!u.value){g.value="",t("delete"),setTimeout(Q,16);return}if((ce=f.value)!=null&&ce.values.length){if(f.value.type==="text"||!((F=f.value.children)!=null&&F.length))return;te.preventDefault();const ye=window.getSelection();if((ye==null?void 0:ye.rangeCount)>0){let fe=ye.getRangeAt(0).startContainer;for(;fe&&fe.parentNode!==o.value;)fe=fe.parentNode;const Ne=((G=fe==null?void 0:fe.dataset)==null?void 0:G.index)||-1;f.value.values.splice(+Ne,1),u.value="",de(!1,!1);return}}else u.value||(f.value=null,u.value="",Q());x("")}async function P(te,ce){var F,G,ye,ge,X;if((F=te.value)!=null&&F.id){const fe=new Js({...te,id:te.realId??te.id},ce);if(fe.addValues(te.value.name,!1),e.valueBehavior===Yn.NEED_KEY&&g.value){se(fe),de(!0),g.value="";return}if(f.value=fe,!await z(f.value.values)){f.value=null;return}se(f.value),de(!0),g.value="";return}if(!f.value||((G=f.value)==null?void 0:G.type)==="condition"){f.value=new Js(te,ce??((ye=f.value)==null?void 0:ye.type)),u.value="";const fe=((ge=f.value)==null?void 0:ge.type)==="condition";fe||t("selectKey",{id:te.id,name:te.name,values:[]}),fe&&se(),m.value=fe||!!f.value.children.length,de(e.valueBehavior===Yn.NEED_KEY&&!!g.value),typeof e.getMenuList=="function"&&a.nextTick(Y);return}f.value&&(f.value.addValue(te),a.nextTick(ie)),await z(f.value.values)&&(f.value.multiple||se(),e.valueBehavior===Yn.NEED_KEY&&((X=f.value)!=null&&X.multiple)&&de())}function ee(te){P(te,"condition")}function J(te){var ce;switch(te.id){case"confirm":if(!((ce=f.value)!=null&&ce.values.length))return;u.value="",K();break;case"cancel":f.value.values=[],m.value=!1;break}}function q(te){f.value&&(f.value.logical=te)}async function R(te,ce){if(typeof e.validateValues=="function"){let F="";try{F=await e.validateValues(te??null,ce)}catch{F=!1}if(typeof F=="string"||F===!1)return x(F||"校验错误"),!1}return x(""),!0}async function z(te){if(!f.value)return await R(null,te);const{searchItem:ce,validate:F,values:G}=f.value;return F&&typeof e.validateValues=="function"?await R(ce,te??G):(x(""),!0)}async function Q(){var ce,F,G,ye,ge;let te=[];if(typeof e.getMenuList=="function"&&(!((ce=e.data)!=null&&ce.length)&&!f.value||f.value&&f.value.type!=="condition"&&(((F=f.value.searchItem)==null?void 0:F.async)===void 0||f.value.searchItem.async===!0)))y.value=!0,te=await e.getMenuList((G=f.value)==null?void 0:G.searchItem,u.value).catch(()=>[]),y.value=!1;else if(f!=null&&f.value)f.value.type==="condition"?te=e.conditions:(!((ge=f.value.values)!=null&&ge.length)||f.value.multiple||e.mode===La.EDIT)&&(te=f.value.children.filter(X=>X.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())));else if(!((ye=u.value)!=null&&ye.length))te=e.data.filter(X=>!X.isSelected).slice();else for(const X of e.data.filter(fe=>!fe.isSelected))if(X.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())){te.push(X);const Ne=[];for(const Le of X.children||[])Ne.push({...X,realId:X.id,id:us(10),value:Le});!Ne.length&&!X.onlyRecommendChildren&&Ne.push({...X,realId:X.id,id:us(10),value:{id:u.value,name:u.value}}),te.push(...Ne)}else{const Ne=[];for(const Le of X.children||[])Le.name.toLocaleLowerCase().includes(u.value.toLocaleLowerCase())&&Ne.push({...X,realId:X.id,id:us(10),value:Le});!Ne.length&&!X.onlyRecommendChildren&&Ne.push({...X,value:{id:u.value,name:u.value}}),te.push(...Ne)}if(w.value=te,e.valueBehavior===Yn.NEED_KEY){const X=te.find(fe=>!fe.disabled);X&&(!g.value||g.value&&!te.some(fe=>fe.id===g.value))&&(g.value=X.id)}}async function ne(){const te=ve(u.value),ce=(te==null?void 0:te.values)||[{id:u.value,name:u.value}];if(await z(ce))return t("add",te||new Js({...ce[0]},"text")),u.value="",Q(),!0}async function oe(){let te=[];if(f.value.isSpecialType()){const F=ve(u.value);F&&(f.value=F,te=F.values)}if(te=te.length?te:f.value.str2Values(u.value),!!await z(te))return f.value.type==="text"?(f.value.name=u.value,f.value.id=u.value):f.value.values=te,t("add",f.value),u.value="",f.value=null,de(!0),!0}function Y(){if(!o.value)return;const te=document.createRange(),ce=window.getSelection();te.selectNodeContents(o.value),te.collapse(!1),ce.removeAllRanges(),ce.addRange(te)}function de(te=!1,ce=!0){te&&setTimeout(Q,16),h.value=!0,m.value=!0,d.value=!1,!e.getMenuList&&ce&&a.nextTick(Y),t("focus",h.value)}function se(te){var F;t("add",te??f.value);const ce=!((F=f.value)!=null&&F.isCustomMenu);f.value=null,u.value="",ce&&(de(!0,ce),a.nextTick(pe))}function pe(){o.value&&(u.value="",a.nextTick(()=>o.value.innerText=""))}function ve(te){const[ce,F]=te.split(":");if(ce!=null&&ce.trim()){const G=_.value.find(ye=>ye.name===ce.trim());if(G){const ye=new Js({...G},"default");return ye.addValues(F),ye}}}function ie(){var te;(te=u.value)!=null&&te.length&&(u.value="",Array.from(o.value.childNodes).forEach(F=>{var G;F.nodeType===Node.TEXT_NODE&&((G=F.textContent)!=null&&G.trim())&&o.value.removeChild(F)}))}function le(){var te;(te=o.value)==null||te.focus()}async function re(){await K().then(te=>te&&pe()),m.value=!1,o.value.blur()}function be(){u.value="",d.value=!1,m.value=!1,f.value=null,a.nextTick(pe)}function ae(te){f.value.values=[{id:te,name:te}],K().then(ce=>ce&&pe())}function Ce(){f.value||(g.value="")}return n({inputFocusForWrapper:le,inputEnterForWrapper:re,inputClearForWrapper:be,handleInputFocus:I,isFocus:h,refleshMenuHover:Ce}),{popoverRef:c,inputRef:o,keyword:u,loading:y,remoteMenuList:N,menuList:w,menuHoverId:g,isFocus:h,usingItem:f,showPopover:m,showNoSelectValueError:d,debounceSetMenuList:b,documentArrowEvent:L,handleClickOutside:V,handleInputFocus:I,handleInputChange:B,handleInputPaste:W,handleLogicalChange:q,handleInputKeyup:U,handleSelectItem:P,handleSelectConditionItem:ee,handleMenuFooterClick:J,resolveClassName:s,inputFocusForWrapper:le,inputEnterForWrapper:re,inputClearForWrapper:be,deleteInputTextNode:ie,customPanelSubmit:ae,refleshMenuHover:Ce,t:r,inputKey:T}},render(){var m,f;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},o=!((m=this.keyword)!=null&&m.length)&&!(t!=null&&t.length)&&n,c=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((f=this.menuList)!=null&&f.length)),u=!this.usingItem&&this.showCondition,d=()=>{var g,y,b,C;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((g=this.keyword)!=null&&g.length),"input-after":o},contenteditable:!0,"data-placeholder":!r&&!this.keyword?this.placeholder:"","data-tips":n||"",spellcheck:"false",onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((y=this.usingItem)==null?void 0:y.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:N=>N.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(C=(b=this.usingItem)==null?void 0:b.values)==null?void 0:C.map((N,w)=>a.createVNode("span",{key:w,"data-id":N.id,"data-index":w,"data-key":N.name,"data-type":"value"},[N.name,w<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},h=()=>{var g,y,b,C,N;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(g=this.usingItem)!=null&&g.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(y=this.usingItem.values)==null?void 0:y[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(b=this.menuList)!=null&&b.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(SK,{conditions:u?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(C=this.usingItem)==null?void 0:C.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(w=>w.id))||[],showLogical:(N=this.usingItem)==null?void 0:N.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Cn,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:c,placement:"bottom-start",theme:"light",trigger:"manual"},{default:d,content:h})}}),TK=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:o,onEditBlur:c,editKey:u}=k4();function d(b){t("delete",b)}function h(b,C,N){b.preventDefault(),b.stopPropagation(),s(C,N),t("selectKey",{id:C.id,name:C.name,values:C.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function m(b,C){o(b,C)}function f(b){b||c()}function g(b){var C;return!((C=r.value)!=null&&C.contains(b))}function y(b){const C=new Js(b.searchItem,b.type);return C.values=b.values.slice(),C.logical=b.logical||bi.OR,C}return{inputRef:n,selectedInputRef:r,editKey:u,copySelectedItem:y,handleDeleteSelected:d,handleEditSelected:h,handleInputOutside:g,handleAddSelected:m,handleInputFocus:f}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(M4,{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:La.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(sn,{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)])])}}),h0=40,$m=6,Vm=26,EK=32,OK={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:EK*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:Yn.ALL,validator(e){return[Yn.ALL,Yn.NEED_KEY].includes(e)}}},LK=a.defineComponent({name:"SearchSelect",directives:{clickoutside:Ir},props:OK,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=_e(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),o=a.ref(null),c=a.ref(null),u=a.ref(!1),d=a.ref([]),h=a.ref(-1),m=jo(32,E),f=a.ref(""),g=a.ref(""),y=a.shallowRef([]);a.watch(()=>e.data,()=>{y.value=JSON.parse(JSON.stringify(e.data));for(const A of y.value||[])A.isSelected=e.uniqueSelect&&e.modelValue.some(I=>I.id===A.id)},{immediate:!0}),a.watch(()=>e.modelValue,A=>{var W;if(!(A!=null&&A.length)){d.value=[];for(const B of y.value||[])B.isSelected=!1;return}const I=[];for(const B of A){const U=d.value.find(K=>K.id===B.id&&K.name===B.name);if((U==null?void 0:U.toValueKey())===JSON.stringify(B))U.values=B.values||[],U.logical=B.logical||bi.OR,I.push(U);else{let K=e.data.find(ee=>ee.id===B.id),j="default";K||(K=e.conditions.find(ee=>ee.id===B.id),K&&(j="condition")),!K&&!((W=B.values)!=null&&W.length)&&(j="text");const P=new Js(K||B,j);P.values=B.values||[],P.logical=B.logical||bi.OR,I.push(P)}}d.value=I,y.value=JSON.parse(JSON.stringify(e.data||[]));for(const B of y.value)B.isSelected=e.uniqueSelect&&!!I.some(U=>U.id===B.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{bK(c.value.querySelector(`.${r("search-select-container")}`),m),m()}),a.onBeforeUnmount(()=>{wK(c.value.querySelector(`.${r("search-select-container")}`),m)}),_K({onEditClick:b,onEditEnter:C,onEditBlur:N,onValidate:w,editKey:f,searchData:a.computed(()=>e.data),isClickOutside:O});function b(A,I){f.value=`${A.id}_${I}`}function C(A,I){const W=d.value.slice();W.splice(I,1,A),t("update:modelValue",W.map(B=>B.toValue())),f.value=""}function N(){f.value="",w("")}function w(A){g.value=A||""}function E(){if(u.value||d.value.length<1){h.value=-1;return}const A=c.value.querySelector(`.${r("search-select-container")}`),I=c.value.querySelector(".search-container").clientWidth-$m-2,W=A.querySelectorAll(".search-container-selected:not(.overflow-selected)");let B=0,U=0,K=0;for(;U===0&&B<=I-h0&&K<=W.length-1;){const j=W[K];if(j.clientHeight>Vm){h.value=K;return}B+=j?j.clientWidth+$m:0,B>=I-h0&&(U=K),K+=1}if(U===W.length-1&&B<=I){h.value=-1;return}h.value=B>=I-h0?U:U-1}function x(){f.value||o.value.inputFocusForWrapper()}function _(){d.value=[],h.value=-1,o.value.inputClearForWrapper(),t("update:modelValue",[])}function O(A){var I;return!((I=c.value)!=null&&I.contains(A))}function T(A){const I=d.value.slice();I.push(A),w(""),t("update:modelValue",I.map(W=>W.toValue()))}function k(A){const I=d.value.slice();I.splice(typeof A=="number"?A:d.value.length-1,1),w(""),o.value.refleshMenuHover(),t("update:modelValue",I.map(W=>W.toValue()))}function L(A){var I;A&&(h.value=-1),A===!1&&((I=c.value.querySelector(`.${r("search-select-container")}`))==null||I.scrollTo(0,0)),u.value=A}function D(A){o.value.inputEnterForWrapper(),t("search",A)}function V(A){t("selectKey",A)}return{inputRef:o,wrapRef:c,isFocus:u,copyData:y,selectedList:d,overflowIndex:h,validateStr:g,onEditClick:b,onEditEnter:C,handleWrapClick:x,handleInputFocus:L,handleResize:E,handleClearAll:_,handleInputOutside:O,handleAddSelected:T,handleDeleteSelected:k,handleClickSearch:D,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Vm}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:o=>{var c,u;return(u=(c=this.$slots).menu)==null?void 0:u.call(c,o)}}:{});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(TK,{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(M4,{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(wn,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(Ss,{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(el,{class:"select-tips"},null),this.validateStr||""])])])}}),R4=Ze(LK);function AK(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const F4=Fv(xd);F4.width.default="400";const $K=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...F4,title:v.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:o}=_e(),c=async()=>{let h=!0;typeof e.beforeClose=="function"&&(h=await e.beforeClose()),h&&(t("update:isShow",!1),t("closed"),t("animation-end"))},u=()=>{t("shown")},d=()=>{t("hidden")};return()=>{const h={header:()=>{var f;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${o("sideslider-header")}`},[a.createVNode("div",{class:`${o("sideslider-close")}`,onClick:c},[e.direction==="left"?a.createVNode(cr,null,null):a.createVNode(kn,null,null)]),a.createVNode("div",{class:`${o("sideslider-title")}`},[((f=r.header)==null?void 0:f.call(r))??e.title])])])},default:()=>{var f;return a.createVNode("div",{class:`${o("sideslider-content")}`},[(f=r.default)==null?void 0:f.call(r)])}};r.footer&&Object.assign(h,{footer:()=>a.createVNode("div",{class:`${o("sideslider-footer")}`},[r.footer()])});const m={...n};return s.vnode.scopeId&&(m[s.vnode.scopeId]=""),a.createVNode(ol,a.mergeProps(m,{width:e.width,class:{[o("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:c,onHidden:d,onShown:u}),AK(h)?h:{default:()=>[h]})}}}),H4=Ze($K),Dm=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),o=a.ref(0),c=a.ref(0),u=a.ref(null),d=a.ref(e.modelValue),h=a.ref(0),m=a.ref(0),f=a.ref(!1),g=a.ref(null),y=a.computed(()=>{var V,A;let L="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const I=e.params.customContent[e.modelValue];L=I.tip||I.label||""}const D=e.params.vertical?Ao.RIGHT:Ao.TOP;return(A=e.params)!=null&&A.showTip?{content:e.params.formatterTipLabel(`${L||(e==null?void 0:e.modelValue)||"0"}`),placement:D}:{content:"",placement:D}}),b=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),C=a.computed(()=>e.params.vertical?{bottom:b.value}:{left:b.value}),N=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),w=L=>{e.params.disable||(L.preventDefault(),E(L),vo(window,"mousemove",x),vo(window,"touchmove",x),vo(window,"mouseup",_),vo(window,"touchend",_))},E=L=>{n.value=!0,r.value=!0,e.params.vertical?s.value=L.clientY:o.value=L.clientX,c.value=parseFloat(b.value),u.value=c.value},x=L=>{if(n.value){r.value=!1,t("resetSize");let D=0;e.params.vertical?(h.value=L.clientY,D=(s.value-h.value)/e.params.sliderSize*100):(m.value=L.clientX,D=(m.value-o.value)/e.params.sliderSize*100),u.value=c.value+D,O(u.value)}},_=()=>{f.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(O(u.value),t("emitChange"))},0),Cc(window,"mousemove",x),Cc(window,"touchmove",x),Cc(window,"mouseup",_),Cc(window,"touchend",_))},O=L=>{if(L===null||isNaN(L))return;L<0?u.value=0:L>100&&(u.value=100);const D=100/((e.params.maxValue-e.params.minValue)/e.params.step);let A=Math.round(L/D)*D*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;A=parseFloat(A.toFixed(e.params.precision)),t("update:modelValue",A),!n.value&&e.modelValue!==d.value&&(d.value=e.modelValue)},{resolveClassName:T}=_e();return{renderDom:()=>a.createVNode("div",{ref:g,style:C.value,class:[`${T("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:L=>L.stopPropagation(),onMousedown:w},[y.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Cn,{boundary:document.body,content:y.value.content,placement:y.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"]},[N.value])]):null]),setPosition:O,tip:y}},render(){return this.renderDom()}}),vo=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Cc=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},VK=a.defineComponent({name:"Slider",props:{modelValue:v.oneOfType([v.arrayOf(v.number),v.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),o=a.ref(null),c=a.ref(null),u=a.ref(0),d=a.ref(0),h=a.ref(null),m=a.ref(null),f=a.ref(null),g=a.ref(null),y=a.computed(()=>{const R=[e.minValue,e.maxValue,e.step].map(z=>{const Q=`${z}`.split(".")[1];return Q?Q.length:0});return Math.max.apply(null,R)}),b=a.computed(()=>Math.min(s.value,o.value)),C=a.computed(()=>Math.max(s.value,o.value)),N=a.computed(()=>e.range?`${100*(C.value-b.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),w=a.computed(()=>e.range?`${100*(b.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),E=a.computed(()=>e.vertical?{height:N.value,bottom:w.value}:{width:N.value,left:w.value}),x=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const R=(e.maxValue-e.minValue)/e.step,z=100*e.step/(e.maxValue-e.minValue),Q=[];for(let ne=1;ne<R;ne++)Q.push(ne*z);return e.range?Q.filter(ne=>ne<100*(b.value-e.minValue)/(e.maxValue-e.minValue)||ne>100*(C.value-e.minValue)/(e.maxValue-e.minValue)):Q.filter(ne=>ne>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),_=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),O=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const R=100*e.step/(e.maxValue-e.minValue),z=[];for(let Q=e.minValue,ne=0;Q<=e.maxValue;Q+=e.step,ne++){const oe={stepWidth:ne*R,stepLabel:e.formatterLabel(Q)};z.push(oe)}return z}),T=a.computed(()=>Array.isArray(e.modelValue)),k=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((R,z)=>Number(R)-Number(z)).filter(R=>Number(R)>=e.minValue&&Number(R)<=e.maxValue).map(R=>{const{tip:z}=e.customContent[R],{label:Q}=e.customContent[R];return{tip:z||Q||"",label:Q||"",percent:(Number(R)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),L=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{I()}),a.watch(()=>s.value,R=>{e.range?n("update:modelValue",[b.value,C.value]):n("update:modelValue",R),u.value=R}),a.watch(()=>o.value,R=>{n("update:modelValue",[b.value,C.value]),d.value=R}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),D(),vo(window,"resize",D())});const D=()=>{h.value&&(r.value=h.value[`client${e.vertical?"Height":"Width"}`])},V=R=>{var z,Q;if(R.stopPropagation(),!e.disable){if(D(),e.vertical){const ne=(z=h.value)==null?void 0:z.getBoundingClientRect().bottom;U((ne-R.clientY)/r.value*100)}else{const ne=(Q=h.value)==null?void 0:Q.getBoundingClientRect().left;U((R.clientX-ne)/r.value*100)}W()}},A=()=>e.range?![b.value,C.value].every((R,z)=>R===c.value[z]):e.modelValue!==c.value,I=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const R=e.modelValue;e.range&&Array.isArray(R)?R[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):R[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):R[0]<e.minValue?n("update:modelValue",[e.minValue,R[1]]):R[1]>e.maxValue?n("update:modelValue",[R[0],e.maxValue]):(s.value=Number(R[0]),o.value=Number(R[1]),A()&&(c.value=R.slice())):!e.range&&typeof R=="number"&&!isNaN(R)&&(R<e.minValue?n("update:modelValue",e.minValue):R>e.maxValue?n("update:modelValue",e.maxValue):(s.value=R,A()&&(c.value=R)))},W=async()=>{await a.nextTick(),n("change",e.range?[b.value,C.value]:e.modelValue)},B=R=>e.vertical?{bottom:`${R}%`}:{left:`${R}%`},U=R=>{if(!e.range){m.value.setPosition(R);return}const z=e.minValue+R*(e.maxValue-e.minValue)/100;Math.abs(b.value-z)<Math.abs(C.value-z)?g.value=s.value<o.value?m.value:f.value:g.value=s.value>o.value?m.value:f.value,g.value.setPosition(R)},K=R=>{if(R==="")return;const z=parseFloat(R);z<e.minValue?(u.value=e.minValue,s.value=e.minValue):z>e.maxValue?(u.value=e.maxValue,s.value=e.maxValue):s.value=z},j=R=>{if(R==="")return;const z=parseFloat(R.toString());z<e.minValue?(d.value=e.minValue,o.value=e.minValue):z>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=z},P=R=>{let z=0;return R==="start"?z=e.vertical?e.maxValue:e.minValue:z=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(z)?"0":"1"},{resolveClassName:ee}=_e(),J=(R,z)=>{let Q=z.stepWidth??z.percent??z;if(e.labelClick){R.stopPropagation(),R.stopImmediatePropagation(),R.preventDefault();let ne;if(typeof e.labelClick=="function"){const oe={percent:Q,step:z};if(ne=e.labelClick(R,oe),ne===!1)return}Q=typeof ne=="number"?ne:Q,console.log("handleStepLabelClick",Q),U(Q);return}};return{renderDom:()=>{var R,z;return a.createVNode("div",{class:[`${ee("slider")}`,e.extCls]},[(R=t.start)==null?void 0:R.call(t),a.createVNode("div",{ref:h,style:_.value,class:`${ee("slider-runway")}`,onClick:V},[a.createVNode("div",{style:E.value,class:[`${ee("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?x.value.map((Q,ne)=>ne===0||ne===x.value.length-1?null:a.createVNode("div",{key:ne,style:B(Q),class:[`${ee("slider-interval")}`,{vertical:e.vertical}],onClick:oe=>J(oe,Q)},null)):null,e.customContent?k.value.map((Q,ne)=>ne===0||ne===k.value.length-1?null:a.createVNode("div",{key:ne,style:B(Q.percent),class:[`${ee("slider-interval")}`,{vertical:e.vertical}],onClick:oe=>J(oe,Q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${ee("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:P("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:P("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return O.value.map((Q,ne)=>a.createVNode("div",{key:ne,style:B(Q.stepWidth),class:[`${ee("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:oe=>J(oe,Q)},[Q.stepLabel]));if(e.customContent)return k.value.map((Q,ne)=>a.createVNode("div",{key:ne,style:B(Q.percent),class:[`${ee("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:oe=>J(oe,Q)},[Q.label]))}()]):void 0,a.createVNode(Dm,{ref:m,modelValue:s.value,"onUpdate:modelValue":Q=>s.value=Q,params:L.value,onEmitChange:W,onResetSize:D},null),e.range?a.createVNode(Dm,{ref:f,modelValue:o.value,"onUpdate:modelValue":Q=>o.value=Q,params:L.value,onEmitChange:W,onResetSize:D},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${ee("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(Ma,{max:e.maxValue,min:e.minValue,modelValue:u.value,type:"number",onChange:K},null)]),T.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Ma,{max:e.maxValue,min:e.minValue,modelValue:d.value,type:"number",onChange:j},null)])]:void 0]):void 0,(z=t.end)==null?void 0:z.call(t)])}}},render(){return this.renderDom()}}),B4=Ze(VK);var z4=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(z4||{});const km={theme:v.theme().def(_u.PRIMARY),size:v.size(),curStep:v.number.def(1),controllable:v.bool.def(!1),direction:Og(),status:Ie("status",{}).def(z4.UNKNOWN),lineType:Lg(),extCls:v.string,steps:v.array.def([]),beforeChange:v.func},DK=a.defineComponent({name:"Steps",props:km,emits:["update:curStep","click"],setup(e,{emit:t}){const n=dt("steps"),r=dt("lang"),s=a.ref([]),o=m=>{const f=[];m.forEach(g=>{typeof g=="string"?f.push(g):f.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:g.border??!0})}),s.value.splice(0,s.value.length,...f)},c=m=>{km.curStep=m},u=()=>{var m;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}),(m=e.steps)!=null&&m.length&&o(e.steps)};a.watch(()=>r.value,()=>{u()});const d=async m=>{try{e.controllable&&m!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,g)=>{const y=await e.beforeChange(m);y?f(y):g(y)}),t("update:curStep",m),t("click",m))}catch(f){console.warn(f)}};a.onMounted(u),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:h}=_e();return{defaultSteps:s,jumpTo:d,resolveClassName:h}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ue({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=f=>this.curStep>f+1||this.defaultSteps[f].status==="done",o=f=>this.curStep===f+1,c=f=>{const{icon:g}=f;return g?Object.prototype.toString.call(g)==="[object Object]":typeof f=="string"},u=(f,g)=>(g.icon||(g.icon=f),!isNaN(g.icon)),d=f=>f.status==="loading",h=f=>f.status==="error",m=(f,g)=>o(f)&&this.status==="loading"||d(g)?a.createVNode(Jo,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(f)&&this.status==="error"||h(g)?a.createVNode(sn,{class:`${this.resolveClassName("steps-icon")}`},null):s(f)?a.createVNode(_s,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[u(f,g)?f+1:a.createVNode(g.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((f,g)=>{var y,b;return a.createVNode("div",{class:[this.resolveClassName("step"),f.title?"":this.resolveClassName("step-no-content"),s(g)?"done":"",o(g)?"current":"",o(g)&&this.status==="error"?"is-error":"",f.status&&o(g)?[`${this.resolveClassName(`step-${f.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(f)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${f.status}`)}`],onClick:()=>{this.jumpTo(g+1)}},[((b=(y=this.$slots)[g+1])==null?void 0:b.call(y))??m(g,f)]),f.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(g+1)}},[f.title]),f.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:f.description},[f.description])]):""])})])}}),U4=Ze(DK),kK=a.defineComponent({name:"Swiper",props:{isLoop:v.bool.def(!0),loopTime:v.number.def(8e3),pics:v.array.def([]),list:v.array.def([]),height:v.number,width:v.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:o,list:c,height:u,width:d}=a.toRefs(e),h=a.ref(),m=a.ref(0),f=a.ref(0),g=a.ref(0),y=a.ref(0);let b;const{resolveClassName:C}=_e(),N=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),w=a.computed(()=>({width:`${f.value*N.value.length}px`,transform:`translateX(-${f.value*m.value}px)`})),E=a.computed(()=>({width:`${f.value}px`,height:`${g.value}px`})),x=B=>{let U=B;B>=N.value.length&&(U=0),B<0&&(U=N.value.length-1),m.value=U,t("index-change",U)},_=B=>{B&&window.open(B,"_blank")},O=B=>[`${C("swiper-img")}`,{[`${C("swiper-link")}`]:B.link},B.class],T=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),k=B=>({[`${C("current-index")}`]:m.value===B}),L=()=>{r.value&&(y.value=window.setTimeout(()=>{x(m.value+1),L()},s.value))},D=()=>{window.clearTimeout(y.value)},V=()=>{var U;const B=(U=h.value)==null?void 0:U.parentElement;!B||!window.ResizeObserver||(b=new ResizeObserver(()=>{W()}),b.observe(B))},A=()=>{var B;(B=b.disconnect)==null||B.call(b)},I=B=>{if(B===void 0)return{height:0,width:0};const U=getComputedStyle(B),K=B.clientWidth-parseFloat(U.paddingTop)-parseFloat(U.paddingBottom);return{height:B.clientHeight-parseFloat(U.paddingLeft)-parseFloat(U.paddingRight),width:K}},W=()=>{var U;const B=I((U=h.value)==null?void 0:U.parentElement);f.value=+d.value>0?d.value:B.width,g.value=+u.value>0?u.value:B.height};return a.watch([u,d],W),a.onMounted(()=>{W(),L(),V()}),a.onBeforeUnmount(()=>{D(),A()}),()=>a.createVNode("section",{ref:h,style:E.value,class:`${C("swiper-home")}`},[a.createVNode("hgroup",{style:w.value,class:`${C("transition")} ${C("swiper-main")}`},[N.value.map(B=>{var U;return a.createVNode("h3",{style:E.value,class:`${C("swiper-card")}`},[((U=n.default)==null?void 0:U.call(n,B))??a.createVNode("span",{style:T(B),class:O(B),onClick:()=>_(B.link)},null)])})]),a.createVNode("ul",{class:`${C("swiper-index")}`},[N.value.map((B,U)=>a.createVNode("li",{class:k(U),onMouseover:()=>x(U)},null))]),a.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-prev")}`,onClick:()=>x(m.value-1)},[a.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-next")}`,onClick:()=>x(m.value+1)},[a.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)])])}}),j4=Ze(kK),IK={theme:pS(),size:v.size(),disabled:v.bool,showText:v.bool,isOutline:v.bool,onText:v.string.def("ON"),offText:v.string.def("OFF"),isSquare:v.bool,extCls:v.string,beforeChange:v.func.def(void 0),trueValue:v.oneOfType([v.string,v.number,v.bool]).def(!0),falseValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),value:v.oneOfType([v.string,v.number,v.bool]).def(!1),modelValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),withValidate:v.bool.def(!0)};let du=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function PK(e){return e}function MK(e){return!!e}const RK={[du.UPDATE]:PK,[du.CHANGE]:MK},FK=a.defineComponent({name:"Switcher",props:IK,emits:RK,setup(e,{emit:t}){const n=dr(),{resolveClassName:r}=_e(),s=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),d=a.computed(()=>{const f={[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":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const g=`${r(`switcher-${e.size}`)}`;f[g]=!0}return f});a.watch(()=>e.modelValue,()=>{var f;c.value=!0,e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.watch(()=>e.value,()=>{c.value=!1});const h=f=>{if(f.stopPropagation(),f.preventDefault(),e.disabled||s.value)return;const g=o.value?e.falseValue:e.trueValue,y=!o.value,b=()=>{t(du.UPDATE,g),t(du.CHANGE,y)};let C=!0;if(typeof e.beforeChange=="function"&&(C=e.beforeChange(g),typeof C.then=="function"))return s.value=!0,C.then(()=>{b()}).finally(()=>{s.value=!1});C&&b()},m=f=>{(f.code==="Enter"||f.key==="Enter"||f.keyCode===13)&&h(f)};return()=>a.createVNode("div",{class:d.value,tabindex:"0",onClick:h,onKeydown:m},[s.value?a.createVNode(sd,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}),W4=Ze(FK);var fu=(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))(fu||{}),No=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(No||{});const G4=Ie("position",{}).def("top");var K4=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(K4||{});const Y4=Ie("sortType",{}).def("replace"),HK={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},BK={name:v.oneOfType([v.number,v.string]).def(""),label:v.string||v.func,tips:v.string,closable:v.bool,visible:v.bool.def(!0),disabled:v.bool,sortable:v.bool,renderDirective:xu(),panel:v.string||v.func,num:v.number.def(void 0),numDisplayType:v.string.def("default")},zK={active:v.oneOfType([v.number,v.string]).def(""),type:Ie("type",{}).def("border-card"),tabPosition:G4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Y4,labelHeight:v.number.def(50),extCls:v.string.def(""),validateActive:v.bool.def(!0),activeBarSize:v.number.def(2),activeBarColor:v.string.def("#3a84ff")},UK={active:v.oneOfType([v.number,v.string]).def(""),type:Ie("type",{}).def("border-card"),activeBarColor:v.string.def("#3a84ff"),activeBarSize:v.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:G4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Y4,labelHeight:v.number.def(50),validateActive:v.bool.def(!0),...HK},Im=a.defineComponent({name:"TabNav",directives:{bkTooltips:Rr},props:UK,setup(e){const t=a.ref(null),n=a.computed(()=>{const m={width:0,height:0,bottom:0,left:0};if(!t.value)return m;if([No.LEFT,No.RIGHT].includes(e.tabPosition)){const{clientHeight:g,offsetTop:y}=t.value,b={width:`${e.activeBarSize}px`,height:`${g}px`,top:`${y}px`,background:e.activeBarColor};return e.tabPosition===No.LEFT?b.right=0:b.left=0,b}if(e.type===fu.UNBORDER_CARD){const{clientWidth:g,offsetLeft:y}=t.value;return{width:`${g}px`,height:`${e.activeBarSize}px`,left:`${y}px`,bottom:0,background:e.activeBarColor}}return m}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const m=[];let f=!1;return e.panels.filter((y,b)=>{if(!y.props)return null;const{name:C,label:N,num:w,closable:E,visible:x,disabled:_,sortable:O,tips:T,numDisplayType:k}=y.props;if(!x)return!1;e.active===C&&(f=!0);const L=D=>y.slots.label?a.h(y.slots.label):[void 0,""].includes(D)?`选项卡${b+1}`:typeof D=="string"?D:typeof D=="function"?a.h(D):D;return m.push({name:C,closable:E,visible:x,disabled:_,sortable:O,tips:T,numDisplayType:k,tabLabel:L(N),tabNum:w}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),m}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),u=(m,f)=>m===f,d={handleTabAdd(m){e.tabAdd(m)},dragstart(m,f){o.value=m,c.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(m,f)},dragenter(m){u(c.value,e.guid)&&(s.value=m)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(m,f){if(!u(c.value,e.guid))return!1;e.tabSort(o.value,m,f)},handleTabChange(m){e.tabChange(m)},handleTabRemove(m,f){e.tabRemove(m,f)}},{resolveClassName:h}=_e();return{...d,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:h}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:o,dragstart:c,dragenter:u,dragend:d,drop:h}=this,m=()=>this.tableNavList.map((C,N)=>{if(!C)return null;const{name:w,disabled:E,tabLabel:x,tabNum:_,numDisplayType:O}=C,T=()=>{const V=[this.resolveClassName("tab-header-item")];return E&&V.push(this.resolveClassName("tab-header--disabled")),e===w&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},k=(V,A)=>!E&&(V||A),L=(V,A)=>k(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(A,V)},[a.createVNode(wn,null,null)]):"",D=()=>["bracket"].includes(O)?`(${_})`:_;return a.withDirectives(a.createVNode("div",{key:w,ref:e===w?"activeRef":"tabLabelRef",class:T(),draggable:k(C.sortable,r),onClick:()=>!E&&this.handleTabChange(w),onDragend:V=>{V.preventDefault(),d()},onDragenter:V=>{V.preventDefault(),u(N)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>c(N,V),onDrop:V=>{V.preventDefault(),h(N,s)}},[isNaN(_)?a.createVNode("div",null,[x]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[x]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${O}`)},[D()]),L==null?void 0:L(C,N)])]),isNaN(_)?L==null?void 0:L(C,N):""]),[[a.resolveDirective("bk-tooltips"),{content:C.tips||"",disabled:!C.tips}]])}),f=()=>{var N,w;const C=[];return typeof this.$slots.add=="function"?C.push((w=(N=this.$slots).add)==null?void 0:w.call(N,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(nl,{style:"display:flex;",width:26,height:26},null)])),C.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[C.map((E,x)=>a.createVNode("div",{key:x,class:this.resolveClassName("tab-header-item")},[E]))]):null},g=()=>this.type===fu.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",y=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,b=f();return a.createVNode("div",{style:{lineHeight:`${o}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),b||y?"tab-header-auto":""]},[g(),m()]),b,y])}}),jK=a.defineComponent({name:"Tab",components:{TabNav:Im},props:zK,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([]),o=a.getCurrentInstance(),c=(m,f=[])=>{const{children:g}=m;return(g||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?f.push(y.component):(b===a.Fragment||b==="template")&&c(y,f)}),f},u=()=>{if(t.default){const{children:m}=o.subTree.children[1];if(!m)return;const f=m[0],g=c(f);g.length!==s.value.length&&(s.value=g)}};a.onMounted(()=>{u(),r.value=!0,a.onUpdated(()=>{u()})});const d={tabAdd(m){n("add",{e:m}),n("add-panel",{e:m})},tabChange(m){n("change",m),n("tab-change",m),n("update:active",m)},tabRemove(m,f){n("remove",m,f),n("remove-panel",m,f)},tabSort(m,f,g){const y=s.value;if(g===K4.INSERT)if(m<f)y.splice(f+1,0,s[m]),y.splice(m,1);else if(m>f)y.splice(f,0,s[m]),y.splice(m+1,1);else return!1;else{const b=y[f];y[f]=y[m],y[m]=b}s.value=[...y],n("sort",m,f,g),n("sort-change",m,f,g)},tabDrag(m,f){n("drag",m,f),n("on-drag-tab",m,f)}},{resolveClassName:h}=_e();return{...d,isMounted:r,panels:s,resolveClassName:h}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===No.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===fu.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:u,addable:d,sortable:h,sortType:m,labelHeight:f,validateActive:g,tabPosition:y,activeBarSize:b,activeBarColor:C,tabAdd:N,tabChange:w,tabRemove:E,tabSort:x,tabDrag:_}=this,O={panels:s,active:o,type:c,closable:u,addable:d,sortable:h,sortType:m,labelHeight:f,validateActive:g,tabPosition:y,activeBarSize:b,activeBarColor:C,tabAdd:N,tabChange:w,tabRemove:E,tabSort:x,tabDrag:_};return!s||!Array.isArray(s)?null:a.createVNode(Im,O,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)])])}}),WK=a.defineComponent({name:"TabPanel",props:BK,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}=_e();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),X4=ln(jK,{TabPanel:WK});var q4=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(q4||{}),J4=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(J4||{});const GK=["auto","highlight"],KK=["none","row","col","outer","horizontal"],Xe={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SOURCE_DATA:"row_source_data",ROW_SKIP_CFG:"row_skip_config",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},Ve={COL_UID:"col_$uuid",COL_SOURCE_DATA:"col_source_data",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_CELL_RENDER:"col_cell_render",COL_TEXT_RENDER:"col_text_render",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",HEAD_CELL_RENDER:"head_cell_render",HEAD_TEXT_RENDER:"head_text_render",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"},Z4=8,Va=42;var Td=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Td||{});const Q4={def1:"#FAFBFD",def2:"#F0F1F5"},xo={large:78,medium:60,small:42},YK=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:xo.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:xo.medium},{value:"large",label:e.value.setting.lineHeight.large,height:xo.large}],e5=Symbol("bkInitColumns"),XK=60;var Ut=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Ut||{});const qK=["asc","desc","null","custom"],Zs=80,os={},JK={};Ie("showOverflowTooltipMode",{default:"auto"});const ZK=Ie("columnType",{default:"__COL_TYPE_NONE"}),nh=Ie("columnType",{default:""});Ie("full",{default:"full"});Ie("columnSize",{default:"small"});const QK=an(),M2=Ie("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),eY=Ie("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),tY=Ie("IFilterPropShape",{default:!1,type:[Boolean,Object]});var t5=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(t5||{});const Ed=Ie("IColumnType",{default:{width:"100%",label:""},type:[Object]}),nY=Ie("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),m0=Ie("LabelFunctionStringType",{}),rY=Ie("RenderFunctionStringType",{}),Pm=Ie("SpanFunctionStringType",{}),aY=Ie("RowClassFunctionStringType",{}),sY=Ie("RowHeightFunctionNumberType",{});Ie("FunctionNumberType",{});const Hc=e=>Ie("StringNumberType",{}).def(e);Ie("IColumnPropType",{default:{label:void 0,minWidth:Zs},type:[Object]});var n5=(e=>(e.independent="independent",e.interdependent="interdependent",e))(n5||{});const iY={data:v.arrayOf(v.any).def([]),columns:v.arrayOf(Ed).def([]),activeColumn:v.oneOfType([v.number.def(-1),v.arrayOf(v.number.def(-1))]),columnPick:Ie("columnPick",{}).def("disabled"),height:Hc("auto"),stripe:v.bool.def(!1),minHeight:Hc(Va),maxHeight:Hc("auto"),rowHeight:sY,headHeight:v.number.def(Va),showHead:v.bool.def(!0),sortValFormat:v.arrayOf(v.any).def([""]),thead:Ie("ITheadType",{}).def({color:Td.DEF1,height:Va,isShow:!0}),virtualEnabled:v.bool.def(!1),border:v.oneOfType([v.arrayOf(Ie("boderType",{})),v.string]).def([q4.ROW]),pagination:v.oneOfType([v.bool.def(!1),v.object.def({})]).def(!1),paginationHeight:v.number.def(XK),remotePagination:v.bool.def(!1),acrossAll:v.bool.def(!1),emptyText:v.string,emptyCellText:v.oneOfType([v.string,v.func]).def(""),isEmptyCell:v.oneOfType([v.arrayOf(an),v.arrayOf(null),v.arrayOf(void 0),v.func]).def(["",void 0,null]),settings:nY,rowClass:v.oneOfType([v.string,v.object,v.func]).def({}),rowStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellClass:v.oneOfType([v.string,v.object,v.func]).def({}),scrollLoading:v.oneOfType([v.object,v.bool]).def(void 0),reserveExpand:v.bool.def(!1),selectionKey:v.string.def(""),checked:v.array.def([]),isSelectedFn:v.func.def(void 0),rowKey:v.oneOfType([v.string,v.func]).def(Xe.ROW_INDEX),showOverflowTooltip:M2,asyncData:v.bool.def(!1),rowHover:v.oneOf(GK).def(J4.HIGHLIGHT),defaultSort:v.shape({}).def({}),isRowSelectEnable:v.oneOfType([v.func.def(()=>!0),v.bool.def(!0)]).def(!0),resizerWay:Ie("ResizerWay",{default:"debounce"}),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),align:nh,headerAlign:nh,prependStyle:v.style().def({}),colSortBehavior:Ie("IColSortBehavior",{default:"independent"}),isFlex:v.bool.def(!0),rowDraggable:v.oneOfType([v.func,v.bool,v.object]).def(!1),shiftMultiChecked:v.bool.def(!1),scrollbar:v.bool.def(!0),fixedBottom:Ie("FixedBottomOption",{default:{position:"relative",height:Va}}).def(null),appendLastRow:Ie("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},oY={label:m0,field:m0,render:rY,width:v.oneOfType([v.number,v.string]),minWidth:Hc(Zs),columnKey:v.string.def(""),showOverflowTooltip:M2,type:ZK,resizable:v.bool.def(!0),fixed:v.oneOfType([v.bool,QK]).def(!1),sort:eY,filter:tY,colspan:Pm.def(1),rowspan:Pm.def(1),align:nh,className:aY,prop:m0,index:v.number.def(void 0)},lY=a.defineComponent({name:"TableColumn",props:oY,setup(e,{}){const t=a.inject(e5,()=>{}),n={},r=(s,o)=>{const c=a.toRaw(o);return Object.keys(c).every(d=>typeof c[d]=="function"?s[d]!==void 0:d==="children"?!0:bn.isEqual(s[d],o[d]))};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 Lt=(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))(Lt||{});const cY=e=>!0,uY=e=>!0,dY=e=>!0,fY=e=>!0,Nc=(e,t,n,r,s)=>!0,hY=e=>!0,mY=e=>!0,gY=e=>!0,pY=e=>!0,Mm=e=>!0,vY=e=>!0,Rm=e=>!0,yY=e=>!0,bY=e=>!0,wY={columnPick:cY,columnFilter:uY,columnSort:fY,colFilterSave:dY,rowClick:Nc,rowDblclick:Nc,rowExpand:hY,select:mY,selectAll:gY,selectionChange:pY,pageLimitChange:Mm,pageValueChange:Mm,settingChange:vY,scrollBottom:yY,cellClick:Rm,cellDblclick:Rm,rowMouseEnter:Nc,rowMouseLeave:Nc,dragend:bY},CY=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:o,getPreColumn:c}=e,u=J=>n(J,Ve.LISTENERS),d="HeadColumnResize";let h=function(J){return J.MOUSE_DOWN="onMousedown",J.MOUSE_MOVE="onMousemove",J.MOUSE_OUT="onMouseout",J}({}),m=!1,f=!1,g=!1,y=0,b=null,C="right",N=null,w=null,E=0;const x=new WeakMap,_=a.ref(-1e3),O=[Ve.WIDTH],T=J=>{J.stopImmediatePropagation(),J.stopPropagation(),J.preventDefault()},k=J=>{T(J),f=!1,g=!1;const q=r(b,O)+E,R=r(b,[Ve.COL_MIN_WIDTH]),z=q>R?q:R;o(b,z),s(b,Ve.WIDTH,z),document.removeEventListener("mouseup",k),_.value=-1e3,E=0,A(N),t==null||t(),N=null;const Q=J.target;U(Q),b=null},L=bn.throttle(J=>{_.value=_.value+J}),D=J=>{T(J),document.body.style.setProperty("user-select","none");const q=J.clientX-y;E=E+q,y=J.clientX;const R=r(b,O)+q;r(b,[Ve.COL_MIN_WIDTH])<R&&L(q)},V=bn.debounce(J=>{document.body.style.setProperty("user-select","none"),J==null||J.classList.add("col-resize-hover")}),A=J=>{V.cancel(),document.body.style.removeProperty("user-select"),J==null||J.classList.remove("col-resize-hover")},I=J=>{if(!m)return;W(J.target),y=J.clientX;const q=C==="left"?c(w):w;s(q,Ve.COL_IS_DRAG,!0),b=q,N=J.target.closest("table");const R=N.getBoundingClientRect();_.value=J.clientX-R.left,V(N),f=!0,document.addEventListener("mouseup",k)},W=J=>{var R,z;((z=(R=J==null?void 0:J.parentElement)==null?void 0:R.parentElement)==null?void 0:z.querySelectorAll(".col-pointer-hover")).forEach(Q=>{Q==null||Q.classList.remove("col-pointer-hover"),Q==null||Q.classList.remove("poiner-left"),Q==null||Q.classList.remove("poiner-right")})},B=(J,q)=>{const R=J.parentElement;R==null||R.classList.add("col-pointer-hover"),R==null||R.classList.add(`poiner-${q}`);const z=q==="right"?R.nextElementSibling:R.previousElementSibling,Q=q==="right"?"left":"right";z==null||z.classList.add("col-pointer-hover"),z==null||z.classList.add(`poiner-${Q}`)},U=J=>{g||(_.value=-1e3,J.classList.remove("cell-resize"),W(J),x.set(J,!1),document.removeEventListener("mousedown",I))},K={[h.MOUSE_MOVE]:(J,q,R)=>{if(T(J),f){g=!0,D(J);return}const z=J.target;if(!g){if(!z)return;const{offsetWidth:Q}=z,ne=J.offsetX;Q>12&&(Q-ne<8||ne<8&&R>0)?(m=!0,C=ne<8?"left":"right",x.get(z)||(x.set(z,!0),z.classList.add("cell-resize"),B(z,C),w=q,document.addEventListener("mousedown",I))):(m=!1,U(z))}},[h.MOUSE_OUT]:(J,q,R)=>{const z=J.target;U(z)}},j=J=>`${d}_${J}`,P=()=>{e.tableColumnList.forEach(J=>{if(e.getColumnAttribute(J,Ve.COL_RESIZEABLE)){const q=u(J);Object.keys(K).forEach(R=>{const z=j(R);q!=null&&q.has(z)||q.set(z,[]),q.get(z).push(K[R])})}})},ee=()=>{e.tableColumnList.forEach(J=>{const q=u(J);Object.keys(K).forEach(R=>{const z=j(R);if(q!=null&&q.has(z)){const Q=q.get(z);Q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{ee(),P()},{immediate:!0,deep:!0}),{dragOffsetX:_}},NY=()=>{const e=[];let t=0;const n=new WeakMap,r=h=>a.isRef(h)?a.unref(h):a.toRaw(h),s=h=>Object.keys(h??{}).reduce((m,f)=>{const g=f.replace(/-(\w)/g,(y,b)=>b.toUpperCase());return Object.assign(m,{[g]:r(h[f])})},{}),o=h=>(n.has(h)||n.set(h,lr()),n.get(h)),c=(h,m,f)=>{var g,y;if((g=h==null?void 0:h.component)!=null&&g.subTree){u((y=h==null?void 0:h.component)==null?void 0:y.subTree,m);return}if(typeof h=="function")return h();if(Array.isArray(h)){h.forEach(b=>u(b,m));return}if(Array.isArray(h==null?void 0:h.children)){h.children.forEach(b=>u(b,m));return}if(!f&&a.isVNode(h)&&(h!=null&&h.children)&&typeof(h==null?void 0:h.children)=="object"){Object.keys(h.children).forEach(b=>u(h.children[b],m));return}},u=(h,m)=>{var g,y,b;let f=m;if(!(!h||((g=h.type)==null?void 0:g.name)==="Table")){if(((y=h.type)==null?void 0:y.name)==="TableColumn"){const C=Object.assign({index:t},s(h.props),{field:h.props.prop||h.props.field,render:h.props.render??((b=h.children)==null?void 0:b.default),uniqueId:o(h),children:[]}),N=(m==null?void 0:m.children)??e;N.some(w=>w.uniqueId===C.uniqueId)||(N.push(C),t=t+1,h.children&&c(h,C,!0));return}c(h,f)}};return{resolveColumns:h=>{var f,g,y,b;e.length=0,t=0;const m=h==null?void 0:h.find(C=>{var N;return((N=C.type)==null?void 0:N.name)==="GhostBody"});return m&&((f=m.component)!=null&&f.subTree?u((g=m.component)==null?void 0:g.subTree):(((b=(y=m.children)==null?void 0:y.default)==null?void 0:b.call(y))??[]).forEach(C=>u(C))),e.sort((C,N)=>C.index-N.index),e}}};var r5=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,o){return s[0]===n?(r=o,!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,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(r,c[1],c[0])}},t}()}(),rh=typeof window<"u"&&typeof document<"u"&&window.document===document,hu=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")()}(),xY=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(hu):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),_Y=2;function SY(e,t){var n=!1,r=!1,s=0;function o(){n&&(n=!1,e()),r&&u()}function c(){xY(o)}function u(){var d=Date.now();if(n){if(d-s<_Y)return;r=!0}else n=!0,r=!1,setTimeout(c,t);s=d}return u}var TY=20,EY=["top","right","bottom","left","width","height","size","weight"],OY=typeof MutationObserver<"u",LY=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=SY(this.refresh.bind(this),TY)}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(){!rh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),OY?(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(){!rh||!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=EY.some(function(o){return!!~r.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),a5=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},wi=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||hu},s5=Od(0,0,0,0);function mu(e){return parseFloat(e)||0}function Fm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var o=e["border-"+s+"-width"];return r+mu(o)},0)}function AY(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var o=s[r],c=e["padding-"+o];n[o]=mu(c)}return n}function $Y(e){var t=e.getBBox();return Od(0,0,t.width,t.height)}function VY(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return s5;var r=wi(e).getComputedStyle(e),s=AY(r),o=s.left+s.right,c=s.top+s.bottom,u=mu(r.width),d=mu(r.height);if(r.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=Fm(r,"left","right")+o),Math.round(d+c)!==n&&(d-=Fm(r,"top","bottom")+c)),!kY(e)){var h=Math.round(u+o)-t,m=Math.round(d+c)-n;Math.abs(h)!==1&&(u-=h),Math.abs(m)!==1&&(d-=m)}return Od(s.left,s.top,u,d)}var DY=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof wi(e).SVGGraphicsElement}:function(e){return e instanceof wi(e).SVGElement&&typeof e.getBBox=="function"}}();function kY(e){return e===wi(e).document.documentElement}function IY(e){return rh?DY(e)?$Y(e):VY(e):s5}function PY(e){var t=e.x,n=e.y,r=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return a5(c,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),c}function Od(e,t,n,r){return{x:e,y:t,width:n,height:r}}var MY=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Od(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=IY(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}(),RY=function(){function e(t,n){var r=PY(n);a5(this,{target:t,contentRect:r})}return e}(),FY=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new r5,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 wi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new MY(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 wi(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 RY(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}(),i5=typeof WeakMap<"u"?new WeakMap:new r5,o5=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=LY.getInstance(),r=new FY(t,n,this);i5.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){o5.prototype[e]=function(){var t;return(t=i5.get(this))[e].apply(t,arguments)}});var HY=function(){return typeof hu.ResizeObserver<"u"?hu.ResizeObserver:o5}();const Bt=(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=>Bt(e,r,n)).filter(r=>r!==void 0).at(0)}},BY=e=>ps(e,"auto"),ps=(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},zY=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>KK.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},l5=(e,t,n=60,r=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?wu(o,n):$g(o),u=()=>Reflect.apply(c,void 0,[]),d=new HY(()=>{u()});return r&&typeof t=="function"&&t(),{start:()=>{d.observe(e)},disconnect:()=>{d.unobserve(e),d.disconnect()}}},R2=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},UY=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),gu=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Sd(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const o=r.match(typeof s=="string"?UY(s):s);r=(o==null?void 0:o[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},jY=(e,t)=>Sd(e,t),Ys=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ys(Reflect.apply(e,void 0,t),t):[],WY=(e,t,n)=>{const r=GY(e,t,n);return r!==null?r:lr()},GY=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Xe.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,Hm=(e,t,n)=>{const r=o=>o.field??o.id;return(o=>e.some(c=>r(c)===Bt(o,["field","type"],[o])))(t)&&n.length&&!n.includes(Bt(t,["field","type"],[t]))},pu=(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,KY=(e,t,n,r)=>{const s=pu(e,t,n,r,"colspan"),o=pu(e,t,n,r,"rowspan");return{colspan:s,rowspan:o}},c5=(e,t,n=[])=>{var h,m;const r=e.field,s=f=>gu(f,r,n),o=e.type==="index",c=(f,g,y,b)=>{const C=o?y:s(f)??"",N=o?b:s(g)??"";return typeof C=="number"&&typeof N=="number"?C-N:String.prototype.localeCompare.call(C,N)},u=typeof((h=e.sort)==null?void 0:h.sortFn)=="function"?(m=e.sort)==null?void 0:m.sortFn:c,d=(f,g,y,b)=>u(f,g,y,b)*(t===Ut.DESC?-1:1);return t===Ut.NULL?(f,g)=>!0:d},YY=e=>{const t={[Ut.NULL]:3,[Ut.ASC]:1,[Ut.DESC]:2};return t[e]===void 0?Ut.ASC:Object.keys(t)[(t[e]+1)%3]},XY=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Ut.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:c5(t,e.value??Ut.NULL,n)},e):null,vu=(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,qY=(e,t,n)=>{const r=WY(e,n,t);return r!==void 0&&e[r]!==void 0?Sd(e,r):t},JY=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=XY(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},ZY=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},xc=e=>a.isProxy(e)?a.toRaw(e):e,QY=e=>{const t=dt("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=lr(),o=a.reactive([]),c=a.reactive([]),u=a.reactive([]),d=new WeakMap,h=(F,G={})=>{o.forEach(ge=>ge.active=!1);const ye=o.find(ge=>ge.col===F);if(ye){Object.assign(ye,G,{active:!0});return}o.push({col:F,...G,active:!0})},m=(F,G,ye)=>{let ge=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(ge=Number(`${F[G]}`.replace(/px/,"")),Y(F,Ve.WIDTH,ge),U(F,{width:ge,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(ge=Number(`${F[G]}`.replace(/%/,""))/100*ye,Y(F,Ve.WIDTH,ge),U(F,{width:ge,left:null,right:null})),ge},f=F=>{let G=F,ye=Zs;const ge=(Ne,Le="width")=>{const Me=[];return Ne.forEach(ze=>{const Qe=m(ze,Le,F);G=G-Qe,[void 0,null,"auto","undefined","null",""].includes(ze[Le])&&Me.push(ze)}),G>0&&Me.length&&(ye=G/Me.length),Me},X=ge(y);ge(X,"minWidth").forEach(Ne=>{const Le=ye>Zs?ye:Zs;Y(Ne,Ve.WIDTH,Le),U(Ne,{width:Le,left:null,right:null})})},g=(F,G={})=>{const ye=c.find(ge=>ge.col===F);if(ye){Object.assign(ye,G);return}c.push({col:F,...G})},y=a.reactive([]),b=()=>{y.length=0,y.push(...r.filter(F=>!z(F)))},C=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},N=(F=["rowspan","colspan"])=>r.some(G=>F.some(ye=>typeof G[ye]=="function"||/^\d$/.test(`${G[ye]}`))),w=a.computed(()=>N(["colspan"])),E=a.computed(()=>N(["rowspan"])),x=(F,G,ye)=>{let ge=ye;const X=pu(F,G,null,null,"colspan"),fe={skipCol:!1,skipColLen:0};return ge>0&&(fe.skipColLen=ge,fe.skipCol=!0,ge=ge-1),X>1&&(fe.skipColLen=X,ge=X-1),{...fe,skipColumnNum:ge}},_=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Zs;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},O=(F,G)=>{const ye=se(F,Ve.LISTENERS);return ye?Array.from(ye==null?void 0:ye.keys()).reduce((ge,X)=>{const fe=X.split("_").slice(-1)[0];return Object.assign(ge,{[fe]:Ne=>{ye.get(X).forEach(Le=>Reflect.apply(Le,void 0,[Ne,F,G]))}})},{}):{}},T=F=>{if(!F.filter)return null;const G=(X,fe="ig")=>new RegExp(`${X}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fe),ye=(X,fe)=>{const{match:Ne}=F.filter,Le=gu(fe,Bt(F,"field",[F,fe]));return Ne!=="fuzzy"?X.includes(Le):X.some(Me=>G(Me,"img").test(Le))};return typeof F.filter.filterFn=="function"?(X,fe,Ne,Le)=>F.filter.filterFn(X,fe,F,Ne,Le):(X,fe)=>X.length?ye(X,fe):!0},k=F=>{u.length=0;let G=0;const ye=[],ge=C();ge&&F.unshift(ge);const X=(Me,ze=1)=>{Me.length&&G<ze&&(G=ze),Me.forEach(Qe=>X(Qe.children??[],ze+1))};X(F);const fe=(Me,ze)=>{if(Me){const Qe=d.get(Me);Qe.thColspan=Qe.thColspan+ze,Qe.offsetLeft=Qe.offsetLeft+ze,fe(Qe.parent,ze)}},Ne=(Me,ze,Qe,at)=>{var da,Ba,za,Ts,Ua;const Ke=a.toRaw(Me);let xt=at;u[ze]===void 0&&(u[ze]=[]);const Et=!!(((da=Ke.children)==null?void 0:da.length)??!1);(((Ba=Ke.children)==null?void 0:Ba.length)??!1)||ye.push(Ke),d.has(Ke)||d.set(Ke,{thColspan:1,thRowspan:1,isGroup:Et,offsetLeft:at});const Mn=d.get(Ke),ct=((za=Ke.children)==null?void 0:za.length)??0,et=((Ts=Ke.children)==null?void 0:Ts.length)??1,mt=ct>0?1:G-ze,Fr=xt+(ct>0?ct-1:0);return Object.assign(Mn,{thColspan:et>0?et:1,parent:Qe,thRowspan:mt,offsetLeft:Fr}),u[ze].push(Ke),et>1&&fe(Qe,et-1),(Ua=Ke.children)==null||Ua.forEach((Di,ki)=>{xt=xt+Ne(Di,ze+1,Ke,xt+ki)}),ct>0?ct-1:0};let Le=0;return F.forEach((Me,ze)=>{Le=Le+Ne(Me,0,null,Le+ze)}),ye},L=F=>d.get(F),D=()=>{o.length=0;let F=0;(r||[]).forEach((G,ye)=>{const{skipCol:ge,skipColumnNum:X,skipColLen:fe}=w.value?x(G,ye,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=X,!n.has(G)){const{type:Ne,fn:Le,scope:Me,active:ze,enabled:Qe}=JY(G,e),at=T(G),Ke=e.settings??{},xt=ZY(G);xt.enabled&&g(G,{[Ve.COL_FILTER_FN]:at,[Ve.COL_FILTER_VALUES]:xt.checked??[]}),Qe&&h(G,{[Ve.COL_SORT_TYPE]:Ne,[Ve.COL_SORT_FN]:Le,[Ve.COL_SORT_SCOPE]:Me}),n.set(G,{[Ve.CALC_WIDTH]:void 0,[Ve.RESIZE_WIDTH]:void 0,[Ve.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[Ve.COL_MIN_WIDTH]:_(G),[Ve.LISTENERS]:new Map,[Ve.WIDTH]:G.width,[Ve.IS_HIDDEN]:Hm(Ke.fields??[],G,Ke.checked??[]),[Ve.COL_SORT_TYPE]:a.ref(Ne),[Ve.COL_SORT_FN]:Le,[Ve.COL_FILTER_OBJ]:xt,[Ve.COL_FILTER_FN]:at,[Ve.COL_FILTER_SCOPE]:void 0,[Ve.COL_SORT_SCOPE]:Me,[Ve.COL_SORT_ACTIVE]:a.ref(ze),[Ve.COL_IS_DRAG]:!1,[Ve.COL_SPAN]:{skipCol:ge,skipColumnNum:X,skipColLen:fe},[Ve.COL_UID]:lr(),[Ve.SELECTION_DISABLED]:!1,[Ve.SELECTION_INDETERMINATE]:!1,[Ve.SELECTION_VAL]:!1,[Ve.COL_RESIZEABLE]:G.resizable!==!1,[Ve.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[Ve.COL_SPAN]:{skipCol:ge,skipColumnNum:X,skipColLen:fe},[Ve.COL_MIN_WIDTH]:_(G)})})},V=(F,G)=>{Y(F,Ve.COL_FIXED_STYLE,G)},A=F=>se(F,Ve.COL_FIXED_STYLE)??{},I=F=>se(F,Ve.COL_RECT),W=F=>se(F,Ve.CALC_WIDTH),B=F=>se(F,Ve.WIDTH),U=(F,{left:G,right:ye,width:ge,height:X})=>{const fe=I(F),Ne={left:G??fe.left,right:ye??fe.right,width:ge??fe.width,height:X??fe.height};Y(F,Ve.COL_RECT,Ne)},K=bn.debounce((F,G)=>{r.length=0,r.push(...k(F)),D(),b(),G==null||G()}),j=(F,G=!1)=>{Y(F,Ve.IS_HIDDEN,G)},P=(F,G)=>{Y(F,Ve.RESIZE_WIDTH,G)},ee=(F,G)=>{const{type:ye,fn:ge,scope:X,active:fe}=G,Ne={[Ve.COL_SORT_TYPE]:ye,[Ve.COL_SORT_FN]:ge,[Ve.COL_SORT_ACTIVE]:fe,[Ve.COL_SORT_SCOPE]:X};[Ve.COL_SORT_TYPE,Ve.COL_SORT_FN,Ve.COL_SORT_ACTIVE,Ve.COL_SORT_SCOPE].forEach(Le=>{Ne[Le]!==void 0&&Y(F,Le,Ne[Le])})},J=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[Ve.COL_FILTER_OBJ],G)},q=[Ve.WIDTH],R=(F,G=q)=>se(F,G[0])??se(F,G[1])??se(F,G[2]),z=F=>se(F,Ve.IS_HIDDEN)??!1,Q=F=>se(F,Ve.COL_UID),ne=(F,G,ye)=>{[Ve.COL_SORT_FN,Ve.COL_SORT_SCOPE,Ve.COL_SORT_TYPE].includes(G)&&h(F,{[G]:ye}),[Ve.COL_FILTER_FN,Ve.COL_FILTER_VALUES].includes(G)&&g(F,{[G]:ye})},oe=(F,G)=>{const ye=y.findIndex(fe=>fe===F),ge=R(F)-G,X=y[ye+1];X&&Y(X,Ve.WIDTH,R(X)+ge)},Y=(F,G,ye)=>{ne(F,G,ye);const ge=n.get(F);if(ge&&Object.prototype.hasOwnProperty.call(ge,G)){if(a.isRef(ge[G])){ge[G].value=ye;return}ge[G]=ye}},de=(F,G)=>{const ye=G||F.checked||[],ge=F.fields||[];r.forEach(X=>{Y(X,Ve.IS_HIDDEN,Hm(ge,X,ye))})},se=(F,G)=>{var ge;const ye=(ge=n.get(F))==null?void 0:ge[G];return a.isRef(ye)?ye.value:ye},pe=(F,G)=>{var ye;return(ye=n.get(F))==null?void 0:ye[G]},ve=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:w,needRowSpan:E,tableColumnSchema:n,tableColumnList:r,visibleColumns:y,debounceUpdateColumns:K,sortColumns:o,filterColumns:c,columnGroup:u,columnGroupMap:d,clearColumnSort:()=>{r.forEach(F=>{Y(F,Ve.COL_SORT_ACTIVE,!1),Y(F,Ve.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=y.find(G=>G.type==="selection");F&&(Y(F,Ve.SELECTION_VAL,!1),Y(F,Ve.SELECTION_INDETERMINATE,!1))},formatColumns:D,flatColumnTemplate:k,isHiddenColumn:z,getColumnId:Q,getColumnOrderWidth:R,getColumnAttribute:se,getHeadColumnClass:(F,G)=>({...ve(F,G)}),getColumnClass:ve,getFixedStlye:A,getColumnRect:I,getColumnCustomClass:(F,G)=>{const ye=F.className;if(ye){if(typeof ye=="function")return ye(G);if(typeof ye=="string")return ye}return""},getColumnRefAttribute:pe,getColumnCalcWidth:W,getColumnWidth:B,getLeftColumnsWidth:(F,G=!1)=>{let ye=!0,ge=0,X=0;for(;ye&&X<y.length;){if(F===y[X]){G&&(ge=ge+B(y[X])),ye=!1;break}ge=ge+B(y[X]),X=X+1}return ge},getGroupAttribute:L,getPreColumn:F=>{const ye=y.findIndex(ge=>ge===F)-1;return y[ye]},getColumnIndex:F=>y.findIndex(G=>G===F),resolveEventListener:O,setColumnIsHidden:j,setColumnResizeWidth:P,setColumnSortOption:ee,setColumnFilterOption:J,setColumnAttributeBySettings:de,setColumnAttribute:Y,setColumnSortActive:(F,G)=>{e.colSortBehavior===n5.independent&&r.forEach(ye=>{Y(ye,Ve.COL_SORT_ACTIVE,!1)}),Y(F,Ve.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:U,setVisibleColumns:b,setNextColumnWidth:oe,resolveColsCalcWidth:f}},eX=(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(N=>{r.addEventListener(N,w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move"})});let s=null,o="";const c=(N,w)=>{if(w==="--top"){N.parentNode.insertBefore(r,N);return}if(N.nextElementSibling===null){N.parentNode.append(r);return}N.parentNode.insertBefore(r,N.nextElementSibling)},u=N=>{e.rowDraggable&&(N==null||N())},d=N=>N.target.closest("tr"),h=(N,w)=>{const{y:E}=w,{top:x,bottom:_}=N.getBoundingClientRect(),O=E-x>_-E?"--bottom":"--top";m(N),N.classList.add(O),c(N,O)},m=(N,w=["--bottom","--top"])=>{w.forEach(E=>N.classList.remove(E))};return{onDragenter:N=>{const w=d(N);N.preventDefault(),N.stopPropagation(),u(()=>{N.dataTransfer.dropEffect="move",w.classList.add("--drag-enter"),h(w,N),s=w})},onDragleave:N=>{u(()=>{const w=d(N);o=w.classList.contains("--bottom")?"--bottom":"--top",m(w,["--drag-enter","--bottom","--top"])})},onDragstart:N=>{u(()=>{const w=d(N);r.style.setProperty("height",`${w.offsetHeight}px`),r.style.setProperty("width",`${w.offsetWidth}px`),w.classList.add("--drag-start"),N.dataTransfer.setDragImage(w,0,0),N.dataTransfer.setData("text/plain",null),N.dataTransfer.dropEffect="move";const{rowIndex:E}=N.target.dataset;N.dataTransfer.setData("data-row-index",E)})},onDragover:N=>{N.preventDefault(),N.stopPropagation(),N.dataTransfer.dropEffect="move";const w=d(N);h(w,N)},onDragend:N=>{var O;if(N.preventDefault(),N.stopPropagation(),r.remove(),!s)return;const w=s,{rowIndex:E}=w.dataset;let x=Number(E);const _=(O=N.target.dataset)==null?void 0:O.rowIndex;o==="--bottom"&&(x=x+1),t.changePageRowIndex(Number(_),x),s=null,o="",n.emit(Lt.DRAG_END,{sourceEvent:N,data:t.pageRowList})}}},tX=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(m=>!!m.fixed&&m.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(m=>!!m.fixed&&m.fixed==="right")),s=a.reactive({left:0,width:"0"}),o=a.reactive({right:0,width:"0"}),c=()=>{let m=0;const{length:f}=r.value;for(let y=f-1;y>=0;y--){const b=r.value[y],C=t.getColumnWidth(b);t.setColumnRect(b,{right:m,width:C}),t.setFixedStyle(b,{right:`${m}px`}),m=m+C}let g=0;n.value.forEach(y=>{const b=t.getColumnWidth(y);t.setColumnRect(y,{left:g,width:b}),t.setFixedStyle(y,{left:`${g}px`}),g=g+b}),s.width=`${g}px`,o.width=`${m}px`},u=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,d=()=>{if(r.value.length>0)return a.createVNode("div",{style:o,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[u(),d()],resolveFixedColumnStyle:c}},nX=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)])}}}),rX=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var c;return typeof n.value=="boolean"?{loading:!!n.value||(((c=e.fixedBottom)==null?void 0:c.loading)??!1),inline:!0,title:"",size:gs.Normal,mode:s2.Default,indicator:null}:n.value},s=a.computed(()=>{var c;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((c=e.fixedBottom)==null?void 0:c.loading)??!1)});return{renderScrollLoading:()=>{var c,u,d,h;if(s.value){const{loading:m,size:f,mode:g,title:y,inline:b,indicator:C}=r();return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??a.createVNode(ka,{loading:m,size:f,mode:g,title:y,inline:b,indicator:C},null)}return((h=(d=t.slots).fixedBottom)==null?void 0:h.call(d))??null}}},aX=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),o=a.ref(null),c=a.ref(0),u=a.ref(0),d=a.ref(0),h=a.ref(-1e4),m=a.ref(0),f=a.reactive({}),g=a.reactive([]),y=a.ref(Va),b=a.ref(1),C=a.computed(()=>{var ge,X,fe;return(ge=t.slots)!=null&&ge.fixedBottom&&((X=e.fixedBottom)==null?void 0:X.position)==="relative"?((fe=e.fixedBottom)==null?void 0:fe.height)??Va:0}),{resolveClassName:N}=_e(),{renderScrollLoading:w}=rX(e,t),E=a.computed(()=>Ue({[N("table")]:!0},zY(e.border))),x=a.computed(()=>({height:ps(e.height),maxHeight:ps(e.maxHeight),minHeight:ps(e.minHeight)})),_=a.computed(()=>Ue({[N("table-head")]:!0,"has-settings":!!e.settings,"has-group":b.value>1})),O=()=>{var fe,Ne,Le,Me;const ge=m.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,X=c.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--shadow-right",ge),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--shadow-left",X)},T=$g(()=>{var ge,X,fe,Ne,Le,Me,ze,Qe,at,Ke;(X=(ge=n.value)==null?void 0:ge.style)==null||X.setProperty("--drag-offset-x",`${h.value+c.value}px`),(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--drag-offset-h-x",`${h.value-2}px`),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--translate-y",`${u.value}px`),(Qe=(ze=n.value)==null?void 0:ze.style)==null||Qe.setProperty("--translate-x",`${c.value}px`),(Ke=(at=n.value)==null?void 0:at.style)==null||Ke.setProperty("--translate-x-1",`-${c.value}px`),O()}),k=ge=>{c.value=ge,T()},L=ge=>{b.value=ge},D=ge=>{u.value=ge,T()},V=()=>{var ge,X,fe,Ne,Le,Me,ze,Qe,at,Ke;(X=(ge=n.value)==null?void 0:ge.style)==null||X.setProperty("--drag-offset-x","-1000px"),(Ne=(fe=n.value)==null?void 0:fe.style)==null||Ne.setProperty("--drag-offset-h-x","-1000px"),(Me=(Le=n.value)==null?void 0:Le.style)==null||Me.setProperty("--translate-y","0px"),(Qe=(ze=n.value)==null?void 0:ze.style)==null||Qe.setProperty("--translate-x","0px"),(Ke=(at=n.value)==null?void 0:at.style)==null||Ke.setProperty("--translate-x-1","0px")},A=ge=>{h.value=ge,T()},I=R2(e),W=a.computed(()=>Bt(I,"height",["thead"])*b.value),B=a.computed(()=>{var ge;return{"--row-height":`${W.value}px`,"--background-color":Q4[((ge=e.thead)==null?void 0:ge.color)??Td.DEF1],paddingRight:e.scrollbar?null:`${Z4}px`}}),U={[N("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},K=a.computed(()=>Ue({[N("table-footer")]:!0,"is-hidden":oe.value===0})),j=ge=>a.createVNode("div",{ref:n,style:x.value,class:E.value},[ge,a.createVNode(nX,null,{default:()=>{var X,fe;return[(fe=(X=t.slots).default)==null?void 0:fe.call(X)]}})]),P=(ge,X,fe)=>a.createVNode("div",{ref:r,style:B.value,class:_.value},[ge==null?void 0:ge(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:be},[fe==null?void 0:fe()]),X==null?void 0:X()]),ee=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),J=()=>t.slots.prepend?a.createVNode("div",{style:ee.value,class:"prepend-row"},[t.slots.prepend()]):null,q=a.ref("auto"),R=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${x.value.maxHeight}`)){const ge=e.showHead?W.value:0,X=oe.value+ge+C.value;return`calc(${x.value.maxHeight} - ${X}px)`}return null}),z=ge=>ge-W.value-C.value-oe.value,Q=(ge,X=!0)=>{if(X){q.value=z(ge);return}q.value=ge},ne=ge=>{q.value=ge},oe=a.ref(0),Y=a.computed(()=>({"--footer-height":`${oe.value}px`})),de=ge=>{oe.value=ge},se=bn.debounce((...ge)=>{t.emit(Lt.SCROLL_BOTTOM,{...ge})}),pe=()=>{var fe,Ne,Le,Me;const ge=((Ne=(fe=s.value)==null?void 0:fe.refRoot)==null?void 0:Ne.scrollWidth)??0,X=((Me=(Le=s.value)==null?void 0:Le.refRoot)==null?void 0:Me.offsetWidth)??0;m.value=ge-X-(c==null?void 0:c.value)},ve=ge=>{y.value=ge},ie=ge=>{d.value=f.bottom??0;const X=ge[1],{translateX:fe,translateY:Ne,pos:Le={}}=X;k(fe),D(Ne),pe(),Object.assign(f,Le||{});const{bottom:Me}=Le;Me<=2&&d.value>Me&&se({...Le,translateX:fe,translateY:Ne})},le={column_drag_line:!0,"offset-x":!0,"resize-column":!0},re=a.computed(()=>({[N("table-body-content")]:!0,[N("stripe")]:e.stripe})),be=a.computed(()=>({[N("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),ae=N("table-fixed-bottom"),Ce=a.computed(()=>{var ge,X,fe;return{minHeight:`${((ge=e.fixedBottom)==null?void 0:ge.minHeight)??Va}px`,position:((X=e.fixedBottom)==null?void 0:X.position)??"absolute",height:((fe=e.fixedBottom)==null?void 0:fe.height)??null}});a.onMounted(()=>{pe(),V()});const te=()=>{const ge=w==null?void 0:w();return ge?a.createVNode("div",{style:Ce.value,class:ae},[ge]):null};return{renderContainer:j,renderHeader:P,renderBody:(ge,X,fe)=>a.createVNode(cl,{ref:s,height:q.value,class:U,contentClassName:re.value,enabled:e.virtualEnabled,lineHeight:y.value,list:ge,maxHeight:R.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:ie},{beforeContent:()=>J(),default:Ne=>X==null?void 0:X((Ne==null?void 0:Ne.data)??[]),afterSection:()=>[a.createVNode("div",{class:le},null),a.createVNode("div",{class:be.value},[fe==null?void 0:fe()])]}),renderFooter:ge=>a.createVNode("div",{ref:o,style:Y.value,class:K.value},[ge]),renderFixedBottom:()=>te(),getBodyHeight:z,setBodyHeight:Q,setVirtualBodyHeight:ne,setFootHeight:de,setTranslateX:k,setDragOffsetX:A,setFixedColumns:ge=>{g.length=0,g.push(...ge)},setOffsetRight:pe,setLineHeight:ve,setHeaderRowCount:L,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:o}},sX=(e,t,n=[],r=!0)=>{let s=null;const o=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{na(e.value)&&(o(),s=l5(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},iX=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=u=>{Object.assign(t,{enabled:!!e.pagination},u),t.current>r.value&&(t.current=1)},o=(u=!0)=>{n.value=!u};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 c=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:c,setPagination:s,disabledPagination:o}},oX=a.defineComponent({name:"BodyEmpty",props:{list:v.array.def([]),filterList:v.array.def([]),emptyText:v.string},emits:["change"],setup(e){const t=dt("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(_d,{description:n.value,scene:"part",type:r.value},null)}}),ah=a.defineComponent({name:"TableCell",props:{column:Ed,row:v.any.def({}),parentSetting:M2,title:v.string.def(void 0),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),isHead:v.bool.def(!1),isExpandChild:v.bool.def(!1),headExplain:v.string,resizerWay:Ie("ResizerWay",{default:t5.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),o=a.computed(()=>({textAlign:e.column.textAlign,minWidth:ps(e.column.minWidth,null)})),c=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:w="",mode:E=void 0,popoverOption:x={}}=e.column.showOverflowTooltip,_={showOverflowTooltip:{content:w,disabled:!e.column.showOverflowTooltip,mode:E,resizerWay:void 0,watchCellResize:void 0,popoverOption:x,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(_.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(_.showOverflowTooltip,e.column.showOverflowTooltip)),_}return{showOverflowTooltip:e.parentSetting}};let u=null;const d=(w=!1)=>{var x;const E=m();return w?((x=E==null?void 0:E.cloneNode)==null?void 0:x.call(E,!0))??"":(E==null?void 0:E.innerText)??""},h=()=>{var D,V;const{showOverflowTooltip:w=!1}=c();let E=!0,{resizerWay:x}=e;const _=d(w.allowHtml);let O=()=>_,T={},k="auto",L=!0;if(typeof w=="boolean"&&(E=!w),typeof w=="object"&&(E=w.disabled,T=w.popoverOption,x=w.resizerWay||"debounce",O=()=>w.content||_,typeof w.content=="function"&&(O=()=>w.content(e.column,e.row)),L=w.watchCellResize,k=w.mode||"auto"),typeof E=="function"&&(E=Reflect.apply(E,this,[e.column,e.row])),e.column.explain){let A=!0;typeof w=="boolean"&&(A=!w),typeof w=="object"&&(A=w.disabled),E=A,k="static",typeof e.column.explain=="object"&&(O=()=>Bt(e.column.explain,"content",[e.column,e.row])||_)}return e.isHead&&(E=!(((V=(D=e.column)==null?void 0:D.showOverflowTooltip)==null?void 0:V.showHead)??!0),k="auto",O=()=>{var A,I;return((I=(A=m())==null?void 0:A.cloneNode)==null?void 0:I.call(A,!0))??""},e.headExplain&&(k="static",O=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(E=!0),{disabled:E,content:O,mode:k,resizerWay:x,watchCellResize:L,popoverOption:T}},m=()=>{var w,E;return e.isHead?(E=(w=n.value)==null?void 0:w.querySelector)==null?void 0:E.call(w,".head-text"):n.value},f=()=>{const w=m();if(!w||!na(w))return;const{mode:E,disabled:x}=h();if(r.value=!x,E==="auto"&&(r.value=eg(w)),E==="static"&&(r.value=!0),r.value){const _=a.ref(h());u===null&&(u=f2(w,{disabled:_.value.disabled,content:_.value.content,mode:_.value.mode,popoverOption:_.value.popoverOption}))}else u==null||u.destroyInstance(w),u=null};let g=null;const y=()=>{const{disabled:w,resizerWay:E,watchCellResize:x}=h();w||(f(),x!==!1&&e.observerResize&&(g=l5(n.value,()=>{f()},60,!0,E),g.start()))};let b=null;const C=()=>{e.intersectionObserver&&(b=new IntersectionObserver(w=>{if(w[0].intersectionRatio<=0){s.value=!1,u==null||u.destroyInstance(n.value);return}s.value=!0,y()},{threshold:.5}),b==null||b.observe(n.value))};a.onMounted(()=>{C(),s.value&&y()}),a.onBeforeUnmount(()=>{g==null||g.disconnect(),g=null,u==null||u.destroyInstance(n.value),b==null||b.disconnect(),b=null});const N=e.headExplain||e.column.explain;return()=>{var w;return a.createVNode("div",{ref:n,style:o.value,class:["cell",e.column.type,N?"explain":""]},[s.value?(w=t.default)==null?void 0:w.call(t):"--"])}}}),_c=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)])}}),lX=({props:e,rows:t,ctx:n,columns:r,row:s,index:o,column:c,isChild:u=!1,multiShiftKey:d})=>{const{isShiftKeyDown:h,getStore:m,setStore:f,setStoreStart:g,clearStoreStart:y}=d,b=()=>{const T=(A,I)=>{I.stopImmediatePropagation(),I.preventDefault(),I.stopPropagation(),h.value||(A?g(s,o):y()),t.setRowSelection(s,A),r.setColumnAttribute(c,Ve.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(c,Ve.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(Lt.ROW_SELECT,{row:s,index:o,checked:A,data:e.data}),n.emit(Lt.ROW_SELECT_CHANGE,{row:s,index:o,checked:A,data:e.data})},k=()=>{if(h.value){const A=f(s,o);if(A){const{start:I,end:W}=m(),B=I.index<W.index?I.index:W.index,U=I.index<W.index?W.index:I.index;(t.pageRowList.slice(B,U+1)??[]).forEach(K=>{vu(e,{row:s,index:o,isCheckAll:!1})&&t.setRowSelection(K,!0)})}return n.emit(Lt.ROW_SELECT,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(Lt.ROW_SELECT_CHANGE,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!A)}return Promise.resolve(!0)},L=t.getRowAttribute(s,Xe.ROW_SELECTION_INDETERMINATE),D=t.getRowAttribute(s,Xe.ROW_SELECTION),V=vu(e,{row:s,index:o,isCheckAll:!1});return a.createVNode(on,{beforeChange:k,disabled:!V,indeterminate:L,modelValue:D,onChange:T},null)},C=T=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(k=>k===T):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:T,row:s,column:c}):bn.isEmpty(T),N=()=>{var L;const T=()=>{if(Bt(c,"type",[c,s])==="index")return t.getRowAttribute(a.toRaw(s),Xe.ROW_INDEX);const V=Bt(c,"field",[c,s]),A=gu(s,V);if(typeof c.render=="function")return w();if(typeof A=="boolean"||typeof A=="number")return`${A}`;if(typeof A=="object"&&A!==null)return JSON.stringify(a.unref(A));if(C(A)){const{emptyCellText:I}=e;if(I)return typeof I=="function"?I({row:s,column:c,index:o}):I}return A},k={expand:()=>u?"":_(),selection:()=>b(),drag:O};return((L=k[c.type])==null?void 0:L.call(k,s,c,o,t))??T()},w=()=>{const T=gu(s,Bt(c,"field",[c,s])),k=s;return c.render({cell:T,data:k,row:s,column:c,index:o,rows:t.tableRowList.value})},E=()=>{var L,D;const k=t.getRowAttribute(s,Xe.ROW_EXPAND)?a.createVNode(Qo,null,null):a.createVNode(rl,null,null);return a.createVNode("span",null,[[k,((D=(L=n.slots).expandContent)==null?void 0:D.call(L,s))??""]])},x=T=>{t.setRowExpand(s,!t.getRowAttribute(s,Xe.ROW_EXPAND)),n.emit(Lt.ROW_EXPAND_CLICK,{row:s,column:c,index:o,rows:t.tableRowList.value,e:T})},_=()=>{const T=()=>{var k,L;return typeof c.render=="function"?w():((L=(k=n.slots).expandCell)==null?void 0:L.call(k,{row:s,column:c,index:o,rows:t}))??E()};return a.createVNode("span",{class:"expand-btn-action",onClick:k=>x(k)},[T()])},O=()=>{var D,V,A;const T=((D=e.rowDraggable)==null?void 0:D.render)??e.rowDraggable;if(typeof T=="function")return T(s,c,o,t.tableRowList.value);const k=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((A=e.rowDraggable)==null?void 0:A.icon)??a.createVNode(ed,{style:`'--font-size: ${k};'`,class:"drag-cell"},null)};return{renderCell:N}},u5=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(g){const y=g.trim().split(" ").map(b=>Number.parseFloat(b));return y.length===1?{distanceLeft:y.at(0),distanceRight:y.at(0)}:y.length===2?{distanceLeft:y.at(1),distanceRight:y.at(1)}:y.length===3||y.length===4?{distanceLeft:y.at(y.length-1),distanceRight:y.at(1)}:{distanceLeft:0,distanceRight:0}}const o=getComputedStyle(n),c=o.getPropertyValue("padding"),u=o.getPropertyValue("margin"),d=o.getPropertyValue("border");r.borderSize=Number.parseFloat(o.getPropertyValue("border-left-width"))+Number.parseFloat(o.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(o.getPropertyValue("padding-left"))+Number.parseFloat(o.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(o.getPropertyValue("margin-left"))+Number.parseFloat(o.getPropertyValue("margin-right"));const h=c!==""&&c!=="0px"&&c!==void 0,m=u!==""&&u!=="0px"&&u!==void 0,f=d!==""&&d.indexOf("0px")===-1&&d!==void 0;if(h){const{distanceLeft:g,distanceRight:y}=s(c);r.paddingSize=g+y}if(m){const{distanceLeft:g,distanceRight:y}=s(u);r.marginSize=g+y}return f&&(r.borderSize=Number.parseFloat(o.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var u,d;const o=s.value[n],c=(u=r.value)==null?void 0:u.querySelector(".bk-checkbox-label");if(o&&c){const m=e(o),f=e(c),g=e(r.value),y=(o==null?void 0:o.offsetWidth)+(m==null?void 0:m.borderSize)+(m==null?void 0:m.marginSize)+(m==null?void 0:m.paddingSize)+(g==null?void 0:g.borderSize)+(g==null?void 0:g.marginSize)+(g==null?void 0:g.paddingSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize),b=((d=r.value)==null?void 0:d.offsetWidth)||0;if((o==null?void 0:o.offsetWidth)>b||16+y>b)return!0}return!1}}};function Bm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Sc=32,cX=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:Rr},props:{column:Ed,height:v.number.def(Sc)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=_e(),{resolveOverflowTips:r}=u5(),s=dt("table"),o=a.computed(()=>{var P;return(P=e.column)==null?void 0:P.filter}),c=a.computed(()=>{var P;return((P=o.value)==null?void 0:P.checked)??[]}),u=a.ref(""),d=a.ref(),h=a.ref([]),m=a.reactive({isOpen:!1,checked:[]});m.checked.push(...c.value),a.watch(()=>c,P=>{m.checked.length=0,m.checked=[],m.checked.push(...P.value)},{deep:!0});const f=a.computed(()=>Ue({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:m.checked.length,opened:m.isOpen})),g=Ue({[n("table-head-filter")]:!0}),y=a.ref(null),b=P=>{m.isOpen=P,P&&setTimeout(()=>{var ee;(ee=y.value)==null||ee.reset()}),P||(u.value="")},C=`light ${n("table-head-filter")}`,N=a.computed(()=>{const{list:P=[]}=o.value;return P.filter(J=>{const q=T(u.value);return q.test(J.label)||q.test(J.text)||q.test(J.value)})}),w=5,E=a.computed(()=>{var P;return((P=o.value)==null?void 0:P.maxHeight)??Sc*w}),x=a.computed(()=>{const{height:P,list:ee=[]}=o.value;return P||ee.length*Sc}),_=a.computed(()=>{const P=Sc*2;return N.value.length>w?E.value:P}),O=a.computed(()=>({maxHeight:`${E.value}px`,minHeight:`${_.value}px`,height:/%$/.test(`${x.value}`)?x.value:`${x.value}px`})),T=(P,ee="ig")=>new RegExp(`${P}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ee),k=()=>{L(!0),t("filterSave",m.checked),m.isOpen=!1},L=(P=!1)=>{const{disabled:ee}=V(A,s.value.confirm);if(ee||P){if(o.value==="custom"){t("change",m.checked,null),m.isOpen=!1;return}t("change",m.checked)}},D=()=>{m.checked.length&&(m.checked.length=0,m.isOpen=!1,t("change",m.checked),t("reset",m.checked))},V=(P,ee)=>({disabled:P==="disabled"||P===!1,text:typeof P=="string"?P:ee}),{btnSave:A,btnReset:I}=o.value,W=()=>{const{disabled:P,text:ee}=V(A,s.value.confirm);return P?a.createVNode("span",{class:"btn-filter-save disabled"},[ee]):a.createVNode(Ht,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:k},Bm(ee)?ee:{default:()=>[ee]})},B=()=>{const{disabled:P,text:ee}=V(I,s.value.reset);return P?"":a.createVNode(Ht,{style:"width: 56px;",disabled:m.checked.length===0,size:"small",onClick:D},Bm(ee)?ee:{default:()=>[ee]})},U=(P,ee)=>{const J=new Set(m.checked);P?J.add(ee.value):J.delete(ee.value),m.checked.length=0,m.checked.push(...Array.from(J)),o.value.checked=[...m.checked],L()},K=async()=>{await new Promise(P=>setTimeout(P,0)),N.value.forEach(P=>{Object.prototype.hasOwnProperty.call(P,"showOverflowTooltip")||(P.showOverflowTooltip=r(`list-item-${P.value}-ref`,d,h))})},j=P=>P.length?(K(),P.map(ee=>a.withDirectives(a.createVNode("div",{key:ee.value,ref:d,class:"list-item"},[a.createVNode(on,{checked:m.checked.includes(ee.value),immediateEmitChange:!1,label:ee.value,modelValue:m.checked.includes(ee.value),onChange:J=>U(J,ee)},{default:()=>[a.createVNode("span",{ref:J=>h.value[`list-item-${ee.value}-ref`]=J},[`${ee.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:ee.tipKey||ee.text,placement:"right",disabled:!ee.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(Cn,a.mergeProps({arrow:!1,isShow:m.isOpen,offset:0,placement:"bottom-start",renderType:Su.SHOWN,trigger:"click"},{theme:C},{onAfterHidden:()=>b(!1),onAfterShow:()=>b(!0)}),{default:()=>a.createVNode(Qu,{class:f.value},null),content:()=>a.createVNode("div",{class:g},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(Ma,{modelValue:u.value,"onUpdate:modelValue":P=>u.value=P},null)]),a.createVNode(pd,{class:"content-list"},{default:()=>[a.createVNode("div",{style:O.value,class:"content-items"},[j(N.value)])]}),a.createVNode("div",{class:"content-footer"},[W(),B()])])})}}),uX=a.defineComponent({name:"HeadSort",props:{column:Ed,defaultSort:v.oneOf(qK).def(Ut.NULL),active:v.bool,sortValFormat:v.arrayOf(v.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var d,h;const{resolveClassName:r}=_e(),s=((h=(d=e.column)==null?void 0:d.sort)==null?void 0:h.value)??e.defaultSort??Ut.NULL,o=a.ref(s);a.watch(()=>[e.defaultSort],([m])=>{o.value=m},{immediate:!0});const c=m=>{o.value=m},u=(m,f)=>{m.stopImmediatePropagation(),m.stopPropagation(),m.preventDefault(),t("change",{type:f,isCancel:f===o.value})};return n({setNextSortType:c}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Fu,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&o.value===Ut.ASC?"active":""],onClick:m=>u(m,Ut.ASC)},null),a.createVNode(qo,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&o.value===Ut.DESC?"active":""],onClick:m=>u(m,Ut.DESC)},null)])}});function dX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const fX=({props:e,columns:t,rows:n,ctx:r,column:s,index:o})=>{var B;const c=a.ref(t.getColumnAttribute(s,Ve.COL_SORT_TYPE)),u=a.ref(t.getColumnAttribute(s,Ve.COL_SORT_ACTIVE)),d=a.toRaw(s),h=a.ref(null),m=U=>{const{isCancel:K,type:j=t.getColumnRefAttribute(s,Ve.COL_SORT_TYPE)}=U??{},P=K?Ut.NULL:j,ee=c5(s,P,e.sortValFormat);t.setColumnAttribute(s,Ve.COL_SORT_TYPE,P),t.setColumnAttribute(s,Ve.COL_SORT_FN,ee),t.setColumnSortActive(s,P!==Ut.NULL),c.value=P,u.value=P!==Ut.NULL,r.emit(Lt.COLUMN_SORT,{column:s,index:o,type:P})},f=()=>a.createVNode(uX,{active:u.value,column:s,defaultSort:c.value,sortValFormat:e.sortValFormat,onChange:m},null),g=()=>{const U=P=>{r.emit(Lt.COLUMN_FILTER,{checked:P,column:a.unref(s),index:o})},K=P=>{t.setColumnAttribute(s,Ve.COL_FILTER_VALUES,P),r.emit(Lt.COLUMN_FILTER_SAVE,{values:P})},j=()=>{t.setColumnAttribute(s,Ve.COL_FILTER_VALUES,[]),r.emit(Lt.COLUMN_FILTER,{checked:[],column:a.unref(s),index:o})};return a.createVNode(cX,{height:e.headHeight,column:s,onChange:U,onFilterSave:K,onReset:j},null)},y=R2(e),{cellFn:b}=y,C=()=>typeof b=="function"?b({index:o,column:s}):typeof s.renderHead=="function"?s.renderHead({index:o,column:s}):Bt(s,"label",[o]),N=()=>{const U=[];s.sort&&U.push(f()),s.filter&&U.push(g());const K=C();U.unshift(a.createVNode("span",{class:"head-text"},[K]));const j=typeof K=="string"?K:void 0,P={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:U,showTitle:j,headClass:P}},w=(U,K="current")=>{t.setColumnAttribute(s,Ve.SELECTION_VAL,U),t.setColumnAttribute(s,Ve.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(U),r.emit(Lt.ROW_SELECT_ALL,{checked:U,data:e.data,type:K})},E=U=>{w(!0,U)},{resolveClassName:x}=_e(),_=x("across-page-popover"),O=()=>{const U=t.getColumnAttribute(s,Ve.SELECTION_DISABLED),K=t.getColumnAttribute(s,Ve.SELECTION_VAL),j=t.getColumnAttribute(s,Ve.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(on,{disabled:U,indeterminate:j,modelValue:K,outline:!0,onChange:P=>w(P)},null),a.createVNode(Cn,{ref:h,extCls:_,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:()=>E("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>E("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(on,{disabled:U,indeterminate:j,modelValue:K,onChange:P=>w(P)},null)},T=()=>{if(s.type==="selection")return[O()];const{headClass:U,showTitle:K,cells:j}=N();return a.createVNode(ah,{class:U,column:s,headExplain:Bt(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:K},dX(j)?j:{default:()=>[j]})},k=()=>{if(!t.getColumnAttribute(s,Ve.COL_IS_DRAG)&&s.sort&&!s.filter){const K={isCancel:!1,type:YY(t.getColumnRefAttribute(s,Ve.COL_SORT_TYPE))};m(K)}},L=Object.assign(t.getFixedStlye(s),{"--background-color":Q4[((B=e.thead)==null?void 0:B.color)??Td.DEF1]}),D=t.getGroupAttribute(d),V=a.computed(()=>[t.getHeadColumnClass(s,o),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(D==null?void 0:D.offsetLeft)+1===t.visibleColumns.length}]),A=a.computed(()=>V.value.concat([{"is-head-group":D==null?void 0:D.isGroup,"is-head-group-child":!!(D!=null&&D.parent)}])),I=()=>Bt(s,"label",[o,s]);return{getTH:()=>D!=null&&D.isGroup?a.createVNode("th",{style:L,class:A.value,colspan:D==null?void 0:D.thColspan,rowspan:D==null?void 0:D.thRowspan},[I()]):a.createVNode("th",a.mergeProps({style:L,class:V.value,colspan:D==null?void 0:D.thColspan,"data-id":t.getColumnId(s),rowspan:D==null?void 0:D.thRowspan,onClick:()=>k()},t.resolveEventListener(s,o)),[T()])}},hX=e=>{const t=a.ref(!1),n={start:null,end:null},r=f=>{f.key==="Shift"&&(t.value=!0)},s=f=>{f.key==="Shift"&&(t.value=!1,d())},o=(f,g)=>{n.start={index:g??null,row:f??null}},c=()=>{o()},u=(f,g)=>n.start===null&&n.end===null?(n.start={index:g,row:f},!1):(n.end={index:g,row:f},!0),d=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:u,getStore:()=>n,clearStore:d,setStoreStart:o,clearStoreStart:c,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function mX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gX=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const o=dt("table"),c=lr();let u={};const d=hX(e),h=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((A,I)=>{const W=`${BY(n.getColumnOrderWidth(A))}`.replace(/px$/i,""),B=n.getColumnAttribute(A,Ve.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:ps(W,"auto"),minWidth:ps(B,"auto")}},null)})]),m=()=>{const A=R2(e),I={"--row-height":`${Bt(A,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:I},[n.columnGroup.map((W,B)=>a.createVNode("tr",null,[W.map((U,K)=>{if(n.isHiddenColumn(U))return null;const{getTH:j}=fX({props:e,ctx:t,columns:n,column:U,index:K,rows:r,rowIndex:B});return j()})]))])])},f=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[h(),m()]):null,g=()=>{const A="append-last-row",I=[...Ys(e.rowStyle,[]),{"--row-height":`${b(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(_c,{key:A},{default:()=>{var W,B;return[a.createVNode("tr",{key:A,style:I},[a.createVNode("td",{colspan:n.visibleColumns.length},[((B=(W=e.appendLastRow).cellRender)==null?void 0:B.call(W,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(_c,{key:A},{default:()=>[a.createVNode("tr",{key:A,style:I},[n.visibleColumns.map((W,B)=>a.createVNode("td",null,[a.createVNode(ah,null,{default:()=>{var U,K;return[((K=(U=e.appendLastRow).cellRender)==null?void 0:K.call(U,W,B))??W.field??W.prop]}})]))])]})},y=A=>{let I={};const W=new WeakMap,B=n.needRowSpan.value;return a.createVNode("tbody",null,[A.map((U,K)=>{const j=T(U,K,I,A,W,B);return I=U,j}),g()])},b=r.getRowHeight,C=A=>{u=A},N=A=>{var B,U;const I=A??r.pageRowList,W=a.computed(()=>e.emptyText===void 0?o.value.emptyText:e.emptyText);return I.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":c},[h(),y(I)]):((U=(B=t.slots).empty)==null?void 0:U.call(B))??a.createVNode(oX,{emptyText:W.value,filterList:I,list:e.data},null)},w=(A,I,W,B)=>{var K;((K=A.target)==null?void 0:K.tagName)!=="INPUT"&&t.emit(Lt.ROW_CLICK,A,I,W,B)},E=(A,I,W,B)=>{t.emit(Lt.ROW_DBL_CLICK,A,I,W,B)},x=(A,I,W,B)=>{t.emit(Lt.ROW_MOUSE_ENTER,A,I,W,B)},_=(A,I,W,B)=>{t.emit(Lt.ROW_MOUSE_LEAVE,A,I,W,B)},O=(A,I,W,B,U)=>{var ee;U.has(A)||U.set(A,new WeakMap),U.get(A).has(B)||U.get(A).set(B,{skipRowLen:0,skipRow:!1});let{skipRowLen:K=0}=((ee=U.get(W))==null?void 0:ee.get(B))??{},j=!1;const P=pu(B,null,A,I,"rowspan");return K>1?(K=K-1,j=!0):P>1&&(K=P,j=!1),Object.assign(U.get(A).get(B),{skipRowLen:K,skipRow:j}),{skipRowLen:K,skipRow:j}},T=(A,I,W,B,U,K,j=!1)=>{const P=B.length,ee=[...Ys(e.rowStyle,[A,I]),{"--row-height":`${b(A,I)}px`}],J=[...Ys(e.rowClass,[A,I]),`hover-${e.rowHover}`,I%2===1&&e.stripe?"stripe-row":""],q=r.getRowAttribute(A,Xe.ROW_UID);return[a.createVNode(_c,{key:q},{default:()=>[a.createVNode("tr",a.mergeProps({key:q,style:ee,class:J,"data-row-index":I,draggable:!!e.rowDraggable,onClick:R=>w(R,A,I,B),onDblclick:R=>E(R,A,I,B),onMouseenter:R=>x(R,A,I,B),onMouseleave:R=>_(R,A,I,B)},u),[n.visibleColumns.map((R,z)=>{const Q=[n.getFixedStlye(R),...Ys(e.cellStyle,[R,z,A,I])],{colspan:ne,rowspan:oe}=KY(R,z,A,I),{skipCol:Y}=n.getColumnAttribute(R,Ve.COL_SPAN),{skipRow:de}=K&&!j?O(A,I,W,R,U):{skipRow:!1},se={"expand-cell":R.type==="expand"};if(!de&&!Y){let pe;const ve=[n.getColumnClass(R,z),n.getColumnCustomClass(R,A),R.align||e.align,...Ys(e.cellClass,[R,z,A,I]),{"expand-row":r.getRowAttribute(A,Xe.ROW_EXPAND),"is-last":I+oe>=P}],ie=`${q}_${z}`,le=`${q}_${z}_cell`,{renderCell:re}=lX({props:e,rows:r,ctx:t,columns:n,row:A,index:I,column:R,isChild:j,multiShiftKey:d}),be=(ae,Ce)=>{const te={event:ae,row:A,column:R,cell:{getValue:()=>re()},rowIndex:I,columnIndex:z};t.emit(Ce,te)};return a.createVNode("td",{key:ie,style:Q,class:ve,colspan:ne,"data-id":ie,rowspan:oe,onClick:ae=>be(ae,Lt.CELL_CLICK),onDblclick:ae=>be(ae,Lt.CELL_DBL_CLICK)},[a.createVNode(ah,{key:le,class:se,column:R,"data-id":le,intersectionObserver:e.intersectionObserver,isExpandChild:j,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:A},mX(pe=re())?pe:{default:()=>[pe]})])}return null})])]}),k(A,J)]},k=(A,I,W)=>{if(r.getRowAttribute(A,Xe.ROW_EXPAND)){const U=[...I,{row_expend:!0}],j=`${r.getRowAttribute(A,Xe.ROW_UID)}_expand`;return Array.isArray(A.children)?A.children.map((P,ee)=>T(P,ee,{},A,{},!1,!0)):a.createVNode(_c,{key:j},{default:()=>{var P,ee;return[a.createVNode("tr",{class:U},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((ee=(P=t.slots).expandRow)==null?void 0:ee.call(P,A))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},L=A=>{s.setPagination({limit:A}),t.emit(Lt.PAGE_LIMIT_CHANGE,A)},D=A=>{if(typeof e.pagination=="object"&&A!==s.options.current){s.setPagination({current:A,value:A}),t.emit(Lt.PAGE_VALUE_CHANGE,A);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(Lt.PAGE_VALUE_CHANGE,A)},V=()=>{if(s.isShowPagination.value)return a.createVNode(k2,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:A=>D(A),onLimitChange:A=>L(A)}),null)};return a.onUnmounted(()=>{d.removeMultiCheckedEvents()}),{renderColumns:f,renderTBody:N,renderTFoot:V,setDragEvents:C}},pX=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=j=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(u(j)):Array.isArray(e.checked)?e.checked.some(P=>typeof P!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(j,e.selectionKey)?jY(j,e.selectionKey)===P:(console.warn("props.selectionKey is undefined or null or empty"),!1):xc(P)===xc(j)):!1:!1,o=(j,P,ee)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Bt(e,"rowHeight",[{index:P,type:ee??"tbody",row:j}]):Va,c=()=>{let j=!1,P=!1;n.value.forEach((ee,J)=>{const q=xc(ee);let R=qY(q,lr(),e);const z=s(q);z?j=!0:P=!0,t.has(q)||t.set(q,{[Xe.ROW_EXPAND]:!1,[Xe.ROW_SELECTION]:z,[Xe.ROW_UID]:R,[Xe.ROW_INDEX]:J+1,[Xe.ROW_SELECTION_INDETERMINATE]:!1});const Q=t.get(q);R=Q[Xe.ROW_UID],Q[Xe.ROW_INDEX]=J+1,Q[Xe.ROW_HEIGHT]=o(ee,J)}),t.set(os,{[Xe.ROW_SELECTION]:j,[Xe.ROW_SELECTION_INDETERMINATE]:j&&P})},u=(j,P)=>({row:j,index:P??d(j,Xe.ROW_INDEX),isSelectAll:d(os,Xe.ROW_SELECTION)}),d=(j,P)=>{var ee;return(ee=t.get(j))==null?void 0:ee[P]},h=j=>{t.set(JK,{[Xe.ROW_SPAN]:j})},m=(j,P)=>vu(e,{row:j,index:P})?d(j,Xe.ROW_SELECTION):!0,f=j=>{if(typeof e.isSelectedFn=="function"){T(j,e.isSelectedFn(u(j)));return}T(j,!d(j,Xe.ROW_SELECTION))},g=j=>{const P=j??!y();if(t.set(os,{[Xe.ROW_SELECTION]:P,[Xe.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((ee,J)=>T(ee,P,J));return}r.forEach((ee,J)=>T(ee,P,J))},y=()=>e.acrossAll?n.value.every((j,P)=>m(j,P)):r.every((j,P)=>m(j,P)),b=()=>e.acrossAll?n.value.some(j=>d(j,Xe.ROW_SELECTION)):r.some(j=>d(j,Xe.ROW_SELECTION)),C=j=>{g(j)},N=()=>{const j=y();O(os,Xe.ROW_SELECTION,j),O(os,Xe.ROW_SELECTION_INDETERMINATE,!j&&b())},w=()=>d(os,Xe.ROW_SELECTION_INDETERMINATE),E=()=>d(os,Xe.ROW_SELECTION),x=(j,P)=>{if(P){O(P,Xe.ROW_HEIGHT,j);return}n.value.forEach(ee=>O(ee,Xe.ROW_HEIGHT,j))},_=(j,P,ee)=>j?d(j,Xe.ROW_HEIGHT):o(j,P,ee),O=(j,P,ee)=>{const J=xc(j),q=t.get(J);q&&Object.prototype.hasOwnProperty.call(q,P)&&(q[P]=ee)},T=(j,P,ee)=>{let J=P;typeof e.isSelectedFn=="function"&&(J=e.isSelectedFn(u(j,ee))),vu(e,{row:j,index:ee??d(j,Xe.ROW_INDEX)})&&O(j,Xe.ROW_SELECTION,J),N()},k=(j,P)=>{O(j,Xe.ROW_INDEX,P)},L=(j,P)=>{O(j,Xe.ROW_EXPAND,P)},D=j=>{let P=0;const ee=50,J=()=>{const q=P+ee;r.push(...j.slice(P,q)),q<j.length&&(P=q,setTimeout(()=>{J()}))};if(j.length>ee){J();return}r.push(...j)};return{setRowIndex:k,setRowExpand:L,isRowChecked:m,setPageRowList:j=>{r.length=0,D(j)},setTableRowList:j=>{n.value.length=0,n.value.push(...j),c()},clearSelection:()=>{n.value.forEach(j=>T(j,!1))},formatDataSchema:c,toggleRowSelection:f,setRowSelectionAll:C,setRowSelection:T,setAllRowExpand:j=>{n.value.forEach(P=>L(P,j??!0))},setRowHeight:x,setTableIsNeedRowSpan:h,getRowAttribute:d,getRowSelection:()=>n.value.filter(j=>d(j,Xe.ROW_SELECTION)),getRowIndeterminate:w,getRowCheckedAllValue:E,getCurrentPageRowsHeight:()=>r.reduce((j,P)=>j+_(P),0),changePageRowIndex:(j,P)=>{const ee=r[j];r.splice(P,0,ee);const J=j<P?j:j+1;r.splice(J,1)},toggleAllSelection:g,getRowHeight:_,tableRowList:n,tableRowSchema:t,pageRowList:r}};function vX(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const yX=(e,t,n,r)=>{const s=dt("table"),{resolveClassName:o}=_e(),{resolveOverflowTips:c}=u5(),u=YK(s),d=a.ref(!1),h=a.ref(),m=a.ref([]),f=(ne,oe)=>Bt(ne,["id","field","type"],[ne,oe]),g=()=>({enabled:!0,fields:e.columns.map(ne=>Object.assign({},ne,{field:ne.field||ne.type})),checked:[],limit:0,size:"small",sizeList:u,showLineHeight:!0,extCls:"",trigger:"manual",height:xo.small}),y=ne=>typeof ne=="boolean"&&ne!==!1?g():ne?Object.assign({},g(),ne):{enabled:!1},b=a.ref(null),C=a.reactive(g()),N=ne=>{Object.assign(C,y(ne))};a.watch(()=>[e.settings],()=>{N(e.settings)},{immediate:!0,deep:!0});const w=a.ref(C.size||"small"),E=a.ref(xo.small),x=a.ref(C.checked||[]),O=`light ${o("table-settings")}`,T=a.computed(()=>C.fields||e.columns||[]),k={checkAll:d.value,activeSize:w.value,activeHeight:E.value,checkedFields:C.checked||[]},L=()=>{var oe;Object.assign(k,{checkAll:d.value,activeSize:w.value,activeHeight:E.value,checkedFields:x.value});const ne={checked:x.value,size:w.value,height:E.value,fields:a.unref(T)};Object.assign(C,ne),n.setColumnAttributeBySettings(C,ne.checked),n.setVisibleColumns(),r==null||r(ne),(oe=b.value)==null||oe.hide(),t.emit(Lt.SETTING_CHANGE,ne)},D=()=>{var ne;d.value=k.checkAll,w.value=k.activeSize,E.value=k.activeHeight,x.value=k.checkedFields,(ne=b.value)==null||ne.hide()},V=()=>{var ne;C.trigger==="manual"&&((ne=b.value)==null||ne.show())},A=ne=>{ne.stopImmediatePropagation(),ne.stopPropagation(),ne.preventDefault(),d.value=!d.value;const oe=C.fields||e.columns||[],Y=oe.filter((de,se)=>de.disabled&&x.value.includes(f(de,se))).map((de,se)=>f(de,se));if(d.value){const de=oe.filter(se=>!se.disabled).map((se,pe)=>f(se,pe));x.value.splice(0,x.value.length,...de,...Y)}else x.value.splice(0,x.value.length,...Y)},I=a.computed(()=>(C.limit??0)>0),W=C.sizeList||u,B=a.computed(()=>I.value&&(C.limit?C.limit:0)<=x.value.length),U=(ne,oe)=>ne.disabled||B.value&&!x.value.includes(f(ne,oe)),K=ne=>{w.value=ne.value,E.value=ne.height},j=ne=>({"line-size":!0,"is-medium":w.value==="medium",active:ne.value===w.value}),P={marginRight:"12px"},ee=()=>W.map(ne=>a.createVNode("span",{class:j(ne),onClick:()=>K(ne)},[ne.label])),J=a.computed(()=>x.value.length>0&&x.value.length<T.value.length),q=a.computed(()=>typeof C.showLineHeight=="boolean"?C.showLineHeight:!0);a.watch(()=>[x.value],()=>{x.value.length||(d.value=!1),x.value.length&&T.value.every((ne,oe)=>x.value.includes(f(ne,oe)))&&(d.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{x.value.splice(0,x.value.length,...C.checked)},{immediate:!0,deep:!0});const R=async()=>{await new Promise(ne=>setTimeout(ne,0)),T.value.forEach((ne,oe)=>{Object.prototype.hasOwnProperty.call(ne,"showOverflowTooltip")||(ne.showOverflowTooltip=c(`field-item-${Bt(ne,["id","field","type"],[ne,oe])}-ref`,h,m))})},z=()=>{var Y,de,se,pe;let ne;const oe=(de=(Y=t.slots).settings)==null?void 0:de.call(Y);return oe||R(),oe??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(Zo,{class:"icon-close-action",onClick:D},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]),I.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(C.limit)]):""]),I.value?"":a.createVNode("span",{class:"check-all",onClick:A},[a.createVNode(on,{indeterminate:!!J.value,label:s.value.setting.fields.selectAll,modelValue:x.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(pd,{class:"setting-body-fields",modelValue:x.value,"onUpdate:modelValue":ve=>x.value=ve},vX(ne=T.value.map((ve,ie)=>a.createVNode("div",{ref:h,class:"field-item"},[a.createVNode(on,{checked:x.value.includes(f(ve,ie)),disabled:U(ve,ie),label:f(ve,ie)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:le=>m.value[`field-item-${Bt(ve,["id","field","type"],[ve,ie])}-ref`]=le},[Bt(ve,["name","label"],[ve,ie])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Bt(ve,["name","label"],[ve,ie]),disabled:!ve.showOverflowTooltip}]])]})])))?ne:{default:()=>[ne]}),(pe=(se=t.slots).setting)==null?void 0:pe.call(se),q.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),ee()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ht,{style:P,theme:"primary",onClick:L},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Ht,{style:P,onClick:D},{default:()=>[s.value.setting.options.cancel]})])])};return{options:C,renderSettings:()=>e.settings?a.createVNode(Cn,a.mergeProps({ref:b,extCls:C.extCls,arrow:!0,placement:"bottom-end",trigger:C.trigger??"manual"},{theme:O}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Wu,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[z()])}):null}},bX=a.defineComponent({name:"Table",directives:{bkTooltips:Rr},props:iY,emits:wY,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=QY(e),r=pX(e),s=iX(e),{renderContainer:o,renderFixedBottom:c,renderBody:u,renderHeader:d,renderFooter:h,setBodyHeight:m,setFootHeight:f,setDragOffsetX:g,setOffsetRight:y,setHeaderRowCount:b,setLineHeight:C,getBodyHeight:N,refBody:w,refRoot:E}=aX(e,t),x=(...se)=>{var pe;return(pe=w.value)==null?void 0:pe.scrollTo(...se)};typeof e.rowHeight=="function"?C(se=>r.getRowHeight(se.rows[0],se.index)):C(e.rowHeight);const O=yX(e,t,n,({checked:se,height:pe})=>{(se==null?void 0:se.length)>0&&x(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(pe),C(pe))}),T=eX(e,r,t),{renderColumns:k,renderTBody:L,renderTFoot:D,setDragEvents:V}=gX({props:e,ctx:t,columns:n,rows:r,pagination:s});V(T);const{resolveColumns:A}=NY(),I=a.getCurrentInstance(),W=()=>{var pe;const se=((pe=I.subTree)==null?void 0:pe.children)??[];n.debounceUpdateColumns(A(se),()=>{b(n.columnGroup.length)})};a.provide(e5,W);const{renderFixedRows:B,resolveFixedColumnStyle:U}=tX(e,n),K=()=>{var pe;const se=((pe=E.value)==null?void 0:pe.offsetWidth)-(e.scrollbar?1:Z4)||0;n.resolveColsCalcWidth(se),U()},{dragOffsetX:j}=CY(n,{afterResize:U}),P=a.ref(!1),ee=se=>{if(!s.isShowPagination.value||e.remotePagination)return se;const pe=(s.options.current-1)*s.options.limit,ve=pe+s.options.limit;return se.slice(pe,ve)},J=()=>{let se=r.tableRowList.value.slice();return n.filterColumns.forEach(pe=>{var ve;!n.isHiddenColumn(pe.col)&&pe[Ve.COL_FILTER_FN]&&((ve=pe[Ve.COL_FILTER_VALUES])!=null&&ve.length)&&(se=se.filter((ie,le)=>pe[Ve.COL_FILTER_FN](pe[Ve.COL_FILTER_VALUES],ie,le,e.data)))}),n.sortColumns.forEach(pe=>{!n.isHiddenColumn(pe.col)&&pe[Ve.COL_SORT_FN]&&pe.active&&se.sort((ve,ie)=>{let le=null,re=null;return pe.col.type==="index"&&(le=r.getRowAttribute(ve,Xe.ROW_INDEX),re=r.getRowAttribute(ie,Xe.ROW_INDEX)),pe[Ve.COL_SORT_FN](ve,ie,le,re)})}),se},q=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),R=()=>{f(q.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&m(Number(`${e.height}`.replace("px","")))},z=a.ref(!1),Q=bn.debounce((se=!0)=>{const pe=J();e.remotePagination||s.setPagination({count:pe.length});const ve=ee(pe);r.setPageRowList(ve),se&&(z.value=!0),a.nextTick(()=>{y(),Y(),z.value&&(x(0,0),z.value=!1)})},64),ne=a.ref(!1);let oe=null;sX(E,()=>{if(!ne.value){if(ne.value=!0,e.virtualEnabled&&bn.isElement(E.value)){if(P.value){setTimeout(()=>{P.value=!1});return}const se=E.value.offsetHeight;P.value=!0,m(se),y()}K(),y(),x(0,0);return}oe&&clearTimeout(oe),oe=setTimeout(()=>{ne.value=!1})});const Y=()=>{if(e.virtualEnabled){let pe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const ve=N(Number(`${e.maxHeight}`.replace("px","")));if(pe>ve){m(ve,!1);return}}m(pe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{b(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[j.value],()=>{g(j.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>K())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{Q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{Q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{R()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),Q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{Q(!1)},{immediate:!0});const de=a.computed(()=>r.pageRowList.length);return a.watch(de,(se,pe)=>{var ve,ie;se<pe&&((ie=(ve=w==null?void 0:w.value)==null?void 0:ve.updateScroll)==null||ie.call(ve),x(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:x,getRoot:()=>E.value}),()=>o([d(k,O.renderSettings,B),u(r.pageRowList,L,B),c(),h(D())])}}),d5=ln(bX,{Column:lY});function wX(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r<s;)o[r]=e[r+t];return o}var CX=wX,NX=CX;function xX(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:NX(e,t,n)}var _X=xX;function SX(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o<s;)if(t(e[o],o,e))return o;return-1}var TX=SX;function EX(e){return e!==e}var OX=EX;function LX(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var AX=LX,$X=TX,VX=OX,DX=AX;function kX(e,t,n){return t===t?DX(e,t,n):$X(e,VX,n)}var f5=kX,IX=f5;function PX(e,t){for(var n=e.length;n--&&IX(t,e[n],0)>-1;);return n}var MX=PX,RX=f5;function FX(e,t){for(var n=-1,r=e.length;++n<r&&RX(t,e[n],0)>-1;);return n}var HX=FX;function BX(e){return e.split("")}var zX=BX,UX="\\ud800-\\udfff",jX="\\u0300-\\u036f",WX="\\ufe20-\\ufe2f",GX="\\u20d0-\\u20ff",KX=jX+WX+GX,YX="\\ufe0e\\ufe0f",XX="\\u200d",qX=RegExp("["+XX+UX+KX+YX+"]");function JX(e){return qX.test(e)}var ZX=JX,h5="\\ud800-\\udfff",QX="\\u0300-\\u036f",eq="\\ufe20-\\ufe2f",tq="\\u20d0-\\u20ff",nq=QX+eq+tq,rq="\\ufe0e\\ufe0f",aq="["+h5+"]",sh="["+nq+"]",ih="\\ud83c[\\udffb-\\udfff]",sq="(?:"+sh+"|"+ih+")",m5="[^"+h5+"]",g5="(?:\\ud83c[\\udde6-\\uddff]){2}",p5="[\\ud800-\\udbff][\\udc00-\\udfff]",iq="\\u200d",v5=sq+"?",y5="["+rq+"]?",oq="(?:"+iq+"(?:"+[m5,g5,p5].join("|")+")"+y5+v5+")*",lq=y5+v5+oq,cq="(?:"+[m5+sh+"?",sh,g5,p5,aq].join("|")+")",uq=RegExp(ih+"(?="+ih+")|"+cq+lq,"g");function dq(e){return e.match(uq)||[]}var fq=dq,hq=zX,mq=ZX,gq=fq;function pq(e){return mq(e)?gq(e):hq(e)}var vq=pq,yq=Kv,bq=mg,wq=_X,Cq=MX,Nq=HX,zm=vq,xq=Yv;function _q(e,t,n){if(e=xq(e),e&&(n||t===void 0))return bq(e);if(!e||!(t=yq(t)))return e;var r=zm(e),s=zm(t),o=Nq(r,s),c=Cq(r,s)+1;return wq(r,o,c).join("")}var Sq=_q;const Tq=jt(Sq),Um=a.defineComponent({name:"ListTagRender",props:{node:v.object,searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]),displayKey:v.string,searchKeyword:v.string,tpl:{type:Function},disabled:v.bool.def(!1)},render(){const{resolveClassName:e}=_e(),t=r=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return r.replace(s,'<strong class="highlight-text">$1</strong>')}return r};if(this.tpl)return this.tpl(this.node,t,a.h,this);const n=this.node[this.displayKey];return a.createVNode("div",{class:`${e("selector-node")}`},[a.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),Eq=()=>({modelValue:v.arrayOf(v.string).def([]),placeholder:v.string.def(""),list:v.arrayOf(v.object).def([]),disabled:v.bool.def(!1),tooltipKey:v.string.def(""),saveKey:v.string.def("id"),displayKey:v.string.def("name"),hasDeleteIcon:v.bool.def(!1),clearable:v.bool.def(!0),trigger:Ie("treeTriggerType",{}).def("search"),searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]).def("name"),useGroup:v.bool.def(!1),allowCreate:v.bool.def(!1),clearTextSpace:v.bool.def(!0),maxData:v.number.def(-1),maxResult:v.number.def(10),contentMaxHeight:v.number.def(300),contentWidth:v.number.def(190),separator:v.string.def(""),allowNextFocus:v.bool.def(!0),allowAutoMatch:v.bool.def(!1),showClearOnlyHover:v.bool.def(!1),isAsyncList:v.bool.def(!1),leftSpace:v.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}}),Oq=a.defineComponent({name:"TagRender",directives:{bkTooltips:Rr},props:{node:v.object,displayKey:v.string,tooltipKey:v.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),r=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!qc.has(e.node,e.tooltipKey)||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=Y_(t.value)}),{overflowTips:r,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),Lq=a.defineComponent({name:"TagInput",directives:{bkTooltips:Rr},props:Eq(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=dr(),r=dt("tagInput"),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:c}=_e(),{maxResult:u}=a.toRefs(e),{pageState:d,initPage:h,pageChange:m}=lI(u),f=a.ref(""),g=a.ref(null),y=a.ref(null),b=a.ref(null),C=a.ref(null),N=a.ref(null),w=a.ref(),E=a.ref(null),x=a.computed(()=>!e.disabled&&e.hasDeleteIcon),_=a.computed(()=>e.maxData===1),O=a.computed(()=>D.selectedTagList.length===0&&f.value===""&&!s.isEdit),T=a.computed(()=>e.placeholder||r.value.placeholder),k=a.computed(()=>e.clearable&&!e.disabled&&D.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),L=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),D=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),V=a.computed(()=>D.selectedTagList.map(X=>X[e.saveKey])),{flatList:A,saveKeyMap:I}=cI(e),W=a.computed(()=>{if(e.useGroup){const X={};return d.curPageList.forEach((fe,Ne)=>{var ze,Qe,at;const Le=(ze=fe.group)==null?void 0:ze.groupId,Me=(Qe=fe.group)==null?void 0:Qe.groupName;fe.__index__=Ne,Le&&!X[Le]&&(X[Le]={id:Le,name:Me,children:[]}),(at=X==null?void 0:X[Le])==null||at.children.push(fe)}),Object.keys(X).map(fe=>X[fe])}return d.curPageList});a.watch([()=>A.value],()=>{a.nextTick(()=>{P()})},{deep:!0}),a.watch(()=>e.modelValue,X=>{var fe;q(V.value,X)||(a.nextTick(()=>{P()}),e.withValidate&&((fe=n==null?void 0:n.validate)==null||fe.call(n,"change")))}),a.watch(f,wu(()=>{const X=d.curPageList.length!==0,{value:fe}=f;fe!==""&&X||fe===""&&e.trigger==="focus"&&X?o.isShow=!0:(e.trigger!=="focus"||!X)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,X=>{B(),X&&N.value&&(a.nextTick(()=>{N.value.scrollTop=0}),N.value.removeEventListener("scroll",U),N.value.addEventListener("scroll",U))}),a.onMounted(()=>{P()});const B=()=>{var X;o.offset.crossAxis=_.value?0:(X=C.value)==null?void 0:X.offsetLeft},U=()=>{if(d.isPageLoading||N.value.scrollTop===0)return;const{scrollTop:X,offsetHeight:fe,scrollHeight:Ne}=N.value;if(X+fe>=Ne){const Le=d.curPage+1;Le<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{m(Le)},500))}},K=()=>{var fe;return Array.from(((fe=b.value)==null?void 0:fe.childNodes)||[]).filter(Ne=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(Ne.nodeType))},j=X=>{if(!e.disabled){if(X!=null&&X.target){const{className:fe}=X.target;(fe.indexOf(`${c("tag-input-trigger")}`)>-1||fe.indexOf("tag-list")>-1)&&b.value.appendChild(C.value)}clearTimeout(E.value),_.value&&V.value.length&&(D.tagListCache=[...V.value],D.selectedTagListCache=[...D.selectedTagList],f.value=D.selectedTagListCache[0][e.saveKey],F(D.selectedTagList[0],0),oe()),s.isEdit=!0,setTimeout(()=>{var fe;(fe=g.value)==null||fe.focus(),e.trigger==="focus"&&D.localList.length!==0&&(ee(),o.isShow?B():o.isShow=!0)},200)}},P=()=>{const{saveKey:X,modelValue:fe,displayKey:Ne,allowCreate:Le,trigger:Me,isAsyncList:ze}=e;if(D.selectedTagList=[],D.localList=A.value,fe.length){const Qe={};D.selectedTagList=fe.map(at=>{const Ke=I.value[at];return Qe[at]=1,!Ke&&Le?{[X]:at,[Ne]:at}:Ke}).filter(at=>at),_.value||(D.localList=D.localList.filter(at=>!Qe[at[X]]))}if(ze&&f.value){ee(f.value),d.curPageList.length&&(o.isShow=!0);return}Me==="focus"&&ee()},ee=(X="")=>{const{searchKey:fe,filterCallback:Ne}=e,Le=X.toLowerCase().trim();if(Le===""){h(D.localList);return}let Me=[];typeof Ne=="function"?Me=Ne(Le,fe,D.localList)||[]:Array.isArray(fe)?Me=D.localList.filter(ze=>fe.some(Qe=>ze[Qe].toLowerCase().indexOf(Le)>-1)):Me=D.localList.filter(ze=>ze[fe].toLowerCase().indexOf(Le)>-1),h(Me)},J=(X,fe)=>{const Ne={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:V.value.includes(X[e.saveKey])};return e.useGroup?Ne[`${c("selector-actived")}`]=X.__index__===s.focusItemIndex:Ne[`${c("selector-actived")}`]=fe===s.focusItemIndex,Ne};function q(X,fe){return X.length!==fe.length?!1:fe.every((Ne,Le)=>X[Le]===Ne)}const R=()=>{D.tagListCache=[],D.selectedTagListCache=[],D.selectedTagList=[]},z=()=>{f.value="",g.value.style.width=`${as}px`},Q=()=>{if(_.value)return 0;const fe=K().filter(Ne=>Ne.className!=="").findIndex(({id:Ne})=>Ne==="tagInputItem");return fe>=0?fe:0},ne=(X,fe,Ne=!1)=>{if(!fe||!X)return;let Le=fe;Ne&&(Le=fe.nextElementSibling||null),fe.parentNode.insertBefore(X,Le)},oe=X=>{const{maxData:fe,trigger:Ne,allowCreate:Le}=e;if(fe===-1||fe>V.value.length){const{value:Me}=X!=null&&X.target?X.target:f,ze=a9(Me);ze?(ee(Me),a.nextTick(()=>{const Qe=w.value.getBoundingClientRect().width||ze*as;g.value.style.width=`${Qe}px`})):Ne==="focus"&&ee()}else de(),f.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=Le?-1:0,t("input",f.value)},Y=()=>{var X;o.width=_.value?(X=y.value)==null?void 0:X.clientWidth:e.contentWidth,t("focus")},de=()=>{E.value=setTimeout(()=>{var fe;const X=f.value;if(z(),s.isEdit=!1,e.allowAutoMatch&&X){if(_.value){const[Le]=D.tagListCache;X===Le&&D.selectedTagListCache.length&&ce(D.selectedTagListCache[0],"select")}const Ne=d.curPageList.find(Le=>Array.isArray(e.searchKey)?e.searchKey.map(ze=>Le[ze]).includes(X):Le[e.searchKey]===X);Ne?se(Ne,"select"):e.allowCreate&&se(X,"custom")}o.isShow=!1,t("blur",X,V.value),(fe=n==null?void 0:n.validate)==null||fe.call(n,"blur")},200)},se=(X,fe,Ne)=>{Ne==null||Ne.stopPropagation(),!(!X||X.disabled)&&(_.value&&R(),ce(X,fe),ve("select"),z(),o.isShow=!1)},pe=(X,fe,Ne)=>{Ne==null||Ne.stopPropagation(),F(X,fe),z(),ve("remove",X),g.value.style.width=`${as}px`},ve=(X,fe)=>{t(X,fe),t("update:modelValue",V.value),t("change",V.value)},ie=X=>{X.stopPropagation();const fe=D.selectedTagList;D.selectedTagList=[];const Ne=fe.filter(Le=>I.value[Le[e.saveKey]]);(e.allowCreate&&Ne.length!==0||!e.allowCreate)&&!_.value&&D.localList.push(...Ne),ve("removeAll")},le=()=>{const X={height:N.value.clientHeight,yAxis:N.value.getBoundingClientRect().y};a.nextTick(()=>{const fe=N.value.querySelector(`.${c("selector-actived")}`);if(!fe)return;const Ne={height:fe.clientHeight,yAxis:fe.getBoundingClientRect().y};Ne.yAxis<X.yAxis&&(N.value.scrollTop=N.value.scrollTop-(X.yAxis-Ne.yAxis));const Le=Ne.yAxis+Ne.height-X.yAxis;Le>X.height&&(N.value.scrollTop=N.value.scrollTop+Le-X.height)})},re=(X,fe)=>{const Ne=K();ne(C.value,Ne[X-1]),D.selectedTagList.splice(X-1,1),j();const Le=fe&&I.value[fe[e.saveKey]];(e.allowCreate&&Le||!e.allowCreate)&&!_.value&&D.localList.push(fe),g.value.style.width=`${as}px`,ve("remove")},be=X=>{if(d.isPageLoading||X.isComposing)return;let fe;const Ne=X.target.value,Le=a9(Ne),Me=Q(),ze=K();switch(X.code){case"ArrowUp":if(X.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=d.curPageList.length-1),le();break;case"ArrowDown":if(X.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>d.curPageList.length-1?d.curPageList.length:s.focusItemIndex,s.focusItemIndex===d.curPageList.length&&(s.focusItemIndex=0),le();break;case"ArrowLeft":if(s.isEdit=!0,!Le){if(Me<1)return;ne(C.value,ze[Me-1]),j()}break;case"ArrowRight":if(s.isEdit=!0,!Le){if(Me===ze.length-1)return;ne(ze[Me+1],C.value),j()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?se(d.curPageList[s.focusItemIndex],"select",X):e.allowCreate&&f.value.trim()&&se(f.value,"custom",X),X.preventDefault();break;case"Backspace":Me!==0&&!f.value&&(fe=D.selectedTagList[Me-1],re(Me,fe));break}},ae=X=>{const fe=[];return X.split(";").forEach(Le=>{Tq(Le)&&fe.push({[e.saveKey]:Le,[e.displayKey]:Le})}),fe},Ce=X=>{X.preventDefault();const{maxData:fe,saveKey:Ne,displayKey:Le,pasteFn:Me,allowCreate:ze}=e,Qe=X.clipboardData.getData("text");let Ke=(Me?Me(Qe):ae(Qe)).map(xt=>xt[Ne]);if(Ke.length){const xt=K(),Et=Q(),Mn=D.localList.map(et=>et[Ne]);if(Ke=Ke.filter(et=>{const mt=(et==null?void 0:et.trim())&&!V.value.includes(et);return ze?mt:mt&&Mn.includes(et)}),fe!==-1){const et=D.selectedTagList.length;if(et<fe){const mt=fe-et;Ke.length>mt&&(Ke=[...Ke.slice(0,mt)])}else Ke=[]}const ct=ze?Ke.map(et=>D.localList.find(Fr=>Fr[Ne]===et)??{[Ne]:et,[Le]:et}):D.localList.filter(et=>Ke.includes(et[Ne]));Ke.length&&(D.selectedTagList.splice(Et,0,...ct),ne(C.value,xt[Et]),g.value.style.width=`${as}px`,D.localList=D.localList.filter(et=>!Ke.includes(et[Ne])),ve("select"),j())}z()},te=X=>{e.disabled||(ne(C.value,X.currentTarget,!0),g.value.style.width=`${as}px`,o.isShow&&B())},ce=(X,fe)=>{if(D.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:Ne,saveKey:Le,displayKey:Me,createTagValidator:ze,clearTextSpace:Qe}=e,at=Q();let Ke=1,xt=!1,Et;const Mn=ct=>typeof ze=="function"?ze(ct):!0;if(fe==="custom")if(Ne){let ct=X.split(Ne);ct=ct.filter(mt=>(mt==null?void 0:mt.trim())&&!V.value.includes(mt)&&Mn(mt));const et=ct.map(mt=>I.value[mt]||{[Le]:mt,[Me]:mt});ct.length&&(D.selectedTagList.splice(at,0,...et),Ke=et.length,xt=!0)}else{const ct=typeof X=="object";if(Et=ct?X[Le]:X.trim(),Qe&&(Et=Et.replace(/\s+/g,"")),Et!==void 0&&!V.value.includes(Et)&&Mn(Et)){const et=I.value[Et]||(ct?X:{[Le]:Et,[Me]:Et});D.selectedTagList.splice(at,0,et),xt=!0}}else X&&(Et=X[Le],Et!==void 0&&!V.value.includes(Et)&&(D.selectedTagList.splice(at,0,X),xt=!0));xt&&a.nextTick(()=>{for(let ct=1;ct<=Ke;ct++){const mt=K()[at+ct];ne(mt,C.value)}if(g.value.style.width=`${as}px`,!_.value){e.allowNextFocus&&j();const ct=V.value.reduce((et,mt)=>(et[mt]=1,et),{});D.localList=D.localList.filter(et=>!ct[et[Le]])}})},F=(X,fe)=>{D.selectedTagList.splice(fe,1);const Ne=I.value[X[e.saveKey]];(e.allowCreate&&Ne||!e.allowCreate)&&!_.value&&D.localList.push(X)},G=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:ye}=zp(y,G,V),ge=a.computed(()=>D.selectedTagList.reduce((X,fe,Ne)=>(ye.value!==null&&Ne>=ye.value&&X.push(fe[e.displayKey]),X),[]));return{popoverProps:o,...a.toRefs(s),...a.toRefs(D),...a.toRefs(d),isShowPlaceholder:O,isShowClear:k,placeholderText:T,curInputValue:f,renderList:W,showTagClose:x,tagInputRef:g,bkTagSelectorRef:y,tagListRef:b,tagInputItemRef:C,inputValueRef:w,selectorListRef:N,triggerClass:L,overflowTagIndex:ye,localCollapseTags:G,collapseTooltip:ge,focusInputTrigger:j,activeClass:J,handleInput:oe,handleFocus:Y,handleBlur:de,handleTagSelected:se,handleTagRemove:pe,handleClear:ie,tagFocus:te,handleKeydown:be,handlePaste:Ce,resolveClassName:c}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Cn,a.mergeProps({arrow:!1,placement:"bottom-start",theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",referenceCls:this.resolveClassName("tag-input-popover-reference")},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const s=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:s?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(Oq,{displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl},null),this.showTagClose&&a.createVNode(sn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,r)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,spellcheck:"false",type:"text",onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]]),a.createVNode("div",{key:"inputValuePlaceholder",ref:"inputValueRef",style:"position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"},[this.curInputValue])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&a.createVNode(wn,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Um,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Um,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(ka,{size:gs.Small,theme:"primary"},null)]):null])])})])}}),b5=Ze(Lq),w5=Ze(QR),Aq={list:v.arrayOf(v.shape({tag:v.string,content:v.oneOfType([v.string,v.object]),type:v.string,size:v.string,color:v.string,icon:v.func,filled:v.bool,border:v.bool,nodeType:v.timelineNodeType()}).isRequired),titleAble:v.bool.def(!1)},$q=a.defineComponent({name:"Timeline",props:Aq,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=_e(),s=o=>{t("select",o)};return a.watch(()=>e.list,()=>{n.value=e.list.map(o=>({tag:o.tag,content:o.content,type:o.type,size:o.size,color:o.color,icon:o.icon,filled:o.filled,border:o.border??!0,nodeType:o.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"),o=["blue","red","green","yellow","gray"],c=r.type?`${s}-${r.type}`:`${s}-default`,u=r.size?`${s}-${r.size}`:"",d=r.filled?`${s}-filled`:"",h=r.color&&o.includes(r.color)?`${s}-${r.color}`:"",m=e(r)?`${s}-custom`:"";return Ue({},`${s} ${c} ${u} ${h} ${d} ${m}`)},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)])]))])}}),C5=Ze($q);var Cr=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Cr||{});const Vq={title:v.arrayOf(v.string).def([]),extCls:v.string.def(""),searchPlaceholder:v.string.def(""),settingKey:v.string.def("id"),displayKey:v.string.def("value"),sortKey:v.string.def("value"),showOverflowTips:v.bool.def(!1),searchable:v.bool.def(!1),sortable:v.bool.def(!1),sourceList:v.arrayOf(v.any).def([]),targetList:v.arrayOf(v.any).def([]),emptyContent:v.arrayOf(v.string).def([]),multiple:v.bool.def(!1)};function Dq(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function kq(e,t,n){const r=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(r.value=[],s.value=[]),e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?s.value.push(u):r.value.push(u)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:r,selectedList:s}}function Iq(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const Pq=a.defineComponent({name:"Transfer",props:Vq,emits:["change","update:targetList"],setup(e,{emit:t}){const n=dt("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),o=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(A=>A.toString().includes("[object Object]"))?Cr.OBJECT_ARRAY:Cr.BASE_ARRAY:Cr.NOT_ARRAY),c=a.computed(()=>o.value===Cr.BASE_ARRAY?"value":e.settingKey),u=a.computed(()=>o.value===Cr.BASE_ARRAY?"value":e.displayKey),d=a.computed(()=>e.sortKey||u.value),h=a.computed(()=>{switch(o.value){case Cr.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case Cr.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:m}=a.toRefs(e),{selectList:f,selectedList:g}=kq(h,m,c),{selectSearchQuery:y,selectListSearch:b}=Iq(f,u),C=a.computed(()=>[...b.value].sort((V,A)=>{const I=V[d.value],W=A[d.value];return I>W?1:-1})),N=a.computed(()=>[...g.value].sort((V,A)=>{const I=V[d.value],W=A[d.value];return I>W?1:-1}));a.watch(()=>[f,g],()=>{e.multiple||O()},{deep:!0});const w=(V,A)=>{const I=c.value;return V.some(W=>W[I]===A[I])&&A.disabled},E=()=>{f.value=[...h.value.filter(V=>w(f.value,V))],g.value=[...h.value.filter(V=>!w(f.value,V))],O()},x=()=>{f.value=[...h.value.filter(V=>!w(g.value,V))],g.value=[...h.value.filter(V=>w(g.value,V))],O()},_=(V,A)=>{if(V.disabled)return;const I=V[c.value],W=A?f:g,B=A?g:f,U=W.value.findIndex(K=>K[c.value]===I);B.value.push(...W.value.splice(U,1)),O()},O=()=>{const V=f.value.map(I=>I[c.value]),A=g.value.map(I=>I[c.value]);t("update:targetList",A),t("change",o.value===Cr.BASE_ARRAY?V:f.value.map(I=>a.toRaw(I)),o.value===Cr.BASE_ARRAY?A:g.value.map(I=>a.toRaw(I)),A)},T=V=>{const A=V==="source"?f:g;r.value[V]=s.value[V].length===A.value.length},k=(V,A)=>{const I=A==="source"?f:g;s.value[A]=V?I.value.map(W=>W[c.value]):[]},L=V=>{const A=V==="left",I=A?f:g,W=A?g:f,B=s.value[A?"source":"target"],U=I.value.filter(K=>B.includes(K[c.value]));I.value=I.value.filter(K=>!B.includes(K[c.value])),W.value.push(...U),s.value[A?"source":"target"]=[],O()},{resolveClassName:D}=_e();return{selectSearchQuery:y,selectListSearch:b,selectedList:g,selectListSort:C,selectedListSort:N,settingCode:c,displayCode:u,allToRight:E,allToLeft:x,handleItemClick:_,t:n,handleAllChecked:k,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:L,handleItemChecked:T,resolveClassName:D}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=u=>{const d=u==="left-header",h=d?"source":"target",m=d?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,f=d?!t.length:!n.length,g=!!this.multipleSelectList[h].length&&!this.multipleSelectAllValue[h],y=this.multipleSelectList[h].length,b=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(on,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[h],"onUpdate:modelValue":C=>this.multipleSelectAllValue[h]=C,indeterminate:g,label:m,onChange:C=>this.handleAllChecked(C,h)},null):a.createVNode(a.Fragment,null,[`${m}(${d?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[y]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[d?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:f},onClick:()=>b()},[d?this.t.selectAll:this.t.removeAll])])},s=u=>{const d=u==="left-empty-content",h=(d?this.emptyContent[0]:this.emptyContent[1])??(d?this.t.noData:this.t.noSelected);return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[h])},o=(u,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":u.disabled}]},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(zu,{class:this.resolveClassName("icon")},null):a.createVNode(sn,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),c=u=>{let d;const h=u==="left",m=u==="left"?"source":"target",f=h?t:n,g=h?"source-option":"target-option",y=h?"left-empty-content":"right-empty-content",b=e?a.createVNode(pd,{class:"content is-flex",modelValue:this.multipleSelectList[m],"onUpdate:modelValue":C=>this.multipleSelectList[m]=C,onChange:()=>this.handleItemChecked(m)},Dq(d=f.map(C=>a.createVNode("div",null,[a.createVNode(on,{class:"checkbox-item",label:C[this.settingCode]},{default:()=>{var N,w;return[((w=(N=this.$slots)[g])==null?void 0:w.call(N,C))??o(C,h)]}})])))?d:{default:()=>[d]}):a.createVNode("ul",{class:["content",this.searchable&&h?"is-search":""]},[f.map(C=>{var N,w;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(C,h)},[((w=(N=this.$slots)[g])==null?void 0:w.call(N,C))??o(C,h)])})]);return f.length?b:s(y)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(Ma,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(Ss,{class:this.resolveClassName("icon-search")},null)}),c("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(kn,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(cr,null,null)])]):a.createVNode(ld,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),c("right")])])}}),N5=Ze(Pq);var $n=(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_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))($n||{});const br=(...e)=>!0,Mq={nodeClick:br,nodeCollapse:br,nodeExpand:br,nodeChecked:br,nodeDragStart:br,nodeDragOver:br,nodeDragLeave:br,nodeDrop:br,nodeEnterView:br,nodeSelected:br};var Oe=(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))(Oe||{});const Aa={__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 x5=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(x5||{});const Rq={data:v.arrayOf(v.any).def([]),label:v.oneOfType([v.func.def(void 0),v.string.def("label")]),nodeKey:v.string.def(void 0),children:v.string.def("children"),indent:v.number.def(16),lineHeight:v.number.def(32),height:v.number,levelLine:v.oneOfType([v.bool.def(!1),v.func.def(void 0),v.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:v.bool.def(!1),prefixIcon:v.oneOfType([v.func.def(()=>{}),v.bool.def(!1)]).def(!0),async:v.shape({callback:v.func.def(void 0),cache:v.bool.def(!0),deepAutoOpen:Ie("columnType",{}).def("once")}),offsetLeft:v.number.def(5),search:v.oneOfType([v.shape({value:v.oneOfType([v.number,v.string,v.bool]).def(""),match:v.oneOfType([an(),v.func]).def("fuzzy"),resultType:an().def("tree"),showChildNodes:v.bool.def(!1)}),v.string,v.number,v.bool]).def(void 0),emptyText:v.string.def("没有数据"),draggable:v.bool.def(!1),disableDrag:v.func,disableDrop:v.func,dragSort:v.bool.def(!1),selectable:v.oneOfType([v.bool,v.func]).def(!0),disabledFolderSelectable:v.bool.def(!1),showCheckbox:v.oneOfType([v.bool,v.func]).def(!1),checked:v.arrayOf(v.any).def([]),showNodeTypeIcon:v.bool.def(!0),selected:v.oneOfType([v.string,v.number,v.object]),autoCheckChildren:v.oneOfType([v.bool,v.func]).def(!0),autoOpenParentNode:v.bool.def(!0),expandAll:v.bool.def(!1),nodeContentAction:v.oneOfType([v.arrayOf(Ie("nodeContentActionType",{}).def(x5.CLICK)),v.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:v.bool.def(!1),checkStrictly:v.bool.def(!0),intersectionObserver:v.oneOfType([v.bool.def(!1),v.shape({enabled:v.bool.def(!1),callback:v.func.def(void 0)})]).def(!1)},Fq=e=>({renderEmpty:t=>a.createVNode(_d,{scene:"part",type:t},{default:()=>[e.emptyText]})}),Hq=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const o=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,c=a.computed(o),u=g=>g instanceof NodeList?Array.from(g):Array.isArray(g)?g:[g];return{unobserveAll:()=>{r==null||r.forEach(g=>{bn.isElement(g)&&(n==null||n.unobserve(g))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:c,initIntersectionObserver:(g,y,b)=>{if(c.value.enabled){if(!g){console.error("intersectionObserver.target is undefined");return}r=u(g);const C=Object.assign({rootMargin:"0px"},y);n=new IntersectionObserver(function(N){N.forEach(w=>{var E,x,_;if(console.log("entry",w.target),w.isIntersecting){const O=((E=b==null?void 0:b.beforeResponse)==null?void 0:E.call(b,w))??w;(_=(x=c.value).callback)==null||_.call(x,O),c.value.once&&n.unobserve(w.target)}})},C),r.forEach(N=>{bn.isElement(N)&&n.observe(N)})}},initRootMutationObserver:(g,y)=>{if(c.value.enabled&&!e.virtualRender&&bn.isElement(g)){const b={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...C)=>{y==null||y(...C)}),s.observe(g,b)}},getLastVisibleElement:(g,y)=>{const{offsetHeight:b}=y,C=y.querySelectorAll("[data-tree-node]"),N=b+g;return Array.from(C).filter(E=>E.offsetHeight+E.offsetTop>=N&&E.offsetTop<N)}}},Ld=(e,t)=>{const n=P=>e.schema.get(P),r=(P,ee)=>{var J;return(J=n(P))==null?void 0:J[ee]},s=(P,ee,J,q)=>{if(!e.schema.has(P)){console.warn("node is not in schema, please check",q,P);return}e.schema.set(P,Object.assign({},n(P),{[ee]:J}))},o=P=>e.data.find(ee=>d(ee)===P),c=(P,ee,J)=>{if(Array.isArray(P)){Array.prototype.forEach.call(P,q=>s(o(q),ee,J,P));return}s(o(P),ee,J,P)},u=P=>r(P,Oe.PATH),d=P=>r(P,Oe.UUID),h=P=>r(P,Oe.IS_OPEN),m=P=>r(P,Oe.HAS_CHILD),f=P=>r(P,Oe.IS_MATCH),g=P=>r(P,Oe.IS_CHECKED),y=P=>r(r(P,Oe.PARENT),Oe.UUID),b=P=>r(P,Oe.IS_LOADING),C=P=>r(P,Oe.PARENT),N=P=>r(P,Oe.IS_MATCH),w=(P,ee)=>{const J=e.data.find(q=>d(q)===P);return r(J,ee)},E=P=>typeof P=="string"?w(P,Oe.IS_ROOT):r(P,Oe.IS_ROOT),x=P=>{const ee=e.data.find(J=>d(J)===P);return y(ee)},_=P=>{const ee=e.data.find(J=>d(J)===P);return u(ee)},O=(P,ee)=>{s(P,Oe.IS_LOADING,ee)},T=P=>typeof P=="object"?h(P):typeof P=="string"?w(P,Oe.IS_OPEN):!1,k=(P,ee)=>r(r(P,Oe.PARENT),ee),L=P=>T(r(P,Oe.PARENT)),D=P=>E(P)||T(P)||L(P),V=(P,ee)=>{const q=P.split("-").reduce((R,z)=>{const Q=Number(z);return Array.isArray(R)?R[Q]:R[t.children][Q]},t.data);return ee&&Object.assign(q,{[Oe.UUID]:ee}),q},A=P=>P[t.children]??[],I=P=>e.data.find(ee=>d(ee)===P),W=P=>E(P)?{[t.children]:t.data}:C(P),B=P=>({[Aa[Oe.IS_LOADING]]:r(P,Oe.IS_LOADING),[Aa[Oe.HAS_CHILD]]:m(P),[Aa[Oe.IS_MATCH]]:f(P),[Aa[Oe.IS_CHECKED]]:g(P),[Aa[Oe.IS_OPEN]]:h(P),[Aa[Oe.IS_ROOT]]:E(P),fullPath:r(P,Oe.PATH),uuid:d(P),parent:r(P,Oe.PARENT),parentId:d(r(P,Oe.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:d,getNodeById:o,getNodeParentId:y,getParentNodeData:W,getNodePathById:_,getNodeAttrById:w,getNodeParentIdById:x,getParentNodeAttr:k,getParentNode:C,setNodeAttr:s,setNodeAttrById:c,getNodePath:u,isRootNode:E,isNodeOpened:h,hasChildNode:m,isItemOpen:T,isNodeChecked:g,isNodeMatched:f,isNodeLoading:b,checkNodeIsOpen:D,getSourceNodeByPath:V,getSourceNodeByUID:I,isMatchedNode:N,resolveScopedSlotParam:B,setTreeNodeLoading:O,extendNodeAttr:P=>Object.assign({},P,{[Oe.TREE_NODE_ATTR]:B(P)}),getChildNodes:A,extendNodeScopedData:P=>({data:P,attributes:B(P)}),getIntersectionResponse:P=>{var Q;if(!P)return null;let ee=P;bn.isElement(P)&&(ee=o(P.getAttribute("data-tree-node")));const J=r(ee,Oe.DEPTH),q=r(ee,Oe.IS_ROOT),R=r(ee,Oe.PARENT),z=q?r(ee,Oe.INDEX):(Q=R==null?void 0:R[t.children])==null?void 0:Q.findIndex(ne=>ne===ee);return{level:J,target:P,index:z,parent:R,node:ee,isRoot:q}}}},_5="1px dashed #c3cdd7",S5=(e,t,n=null,r=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?r:s:T5(n,e,t,o)},T5=(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 o=s.apply(void 0,[e,...r]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},E5=(e,t)=>T5(e,t,"label"),Bq=(e,t)=>({"--level-line":S5(t,"levelLine",e,_5,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),zq=(e,t,n,r=!0)=>{var c;const{schema:s}=n,o=(c=s.get(e))==null?void 0:c[Oe.DEPTH];if(r){const u=["node"],d=()=>S5(t,"levelLine",e,_5,null,u);return{"--depth":o,...typeof t.levelLine=="function"?{"--level-line":d()}:{}}}return{}},Uq=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:o}=t.get(e)||{},{resolveClassName:c}=_e();return{"is-root":s,[`${c("tree-node")}`]:!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},jq=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=_e();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},Wq=(e,t,n,r,s)=>{Gq(e,t,n,{[r]:s})},Gq=(e,t,n,r)=>{const o=e.split("-").reduce((c,u)=>{const d=Number(u);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,r||{})},yo=e=>e??{__IS_NULL:!0},Bc=(e,t,n)=>Array.isArray(t)?t.some(r=>Bc(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,O5=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,L5=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Ld(t,e),u=(m,f)=>{if(typeof m=="object"&&m!==null){n(f,Oe.IS_OPEN,!0);const g=Array.isArray(m)?m:[m];return Wq(r(f),e.data,e.children,e.children,g),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:f=null,cache:g=!0}=e.async||{};if(typeof f=="function"&&s(m,Oe.IS_ASYNC)){if(n(m,Oe.IS_ASYNC_INIT,!0),!s(m,Oe.IS_CACHED)){n(m,Oe.IS_CACHED,g);const y=o(m),b=f(m,C=>u(C,m),y);if(typeof b=="object"&&b!==null)return c(m,!0),b instanceof Promise?Promise.resolve(b.then(C=>u(C,m)).catch(C=>console.error("load remote data error:",C)).finally(()=>{c(m,!1),n(m,Oe.IS_CACHED,!0)})):(u(b,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},h=()=>{const m=t.data.filter(f=>s(f,Oe.IS_ASYNC)&&f[Aa[Oe.IS_OPEN]]&&!s(f,Oe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(f=>d(f))).then(()=>{h()}).catch(f=>{console.warn(f)})};return{asyncNodeClick:d,deepAutoOpen:h}},Kq=(e,t,n,r,s)=>{let o=e.selected;const{setNodeAttr:c,setNodeAttrById:u,getNodePath:d,getSchemaVal:h,getNodeAttr:m,getNodeId:f,getChildNodes:g,isRootNode:y,hasChildNode:b,isItemOpen:C,isNodeOpened:N,isNodeLoading:w,isNodeChecked:E,getParentNode:x,resolveScopedSlotParam:_,extendNodeAttr:O,extendNodeScopedData:T}=Ld(n,e),{resolveClassName:k}=_e(),{registerNextLoop:L}=s,{asyncNodeClick:D,deepAutoOpen:V}=L5(e,n),A=ae=>C(ae)?a.createVNode(Zu,{class:[k("tree-icon"),k("node-prefix")]},null):a.createVNode(Ju,{class:[k("tree-icon"),k("node-prefix")]},null),I=ae=>{if(typeof ae=="string")return ae;if(typeof ae=="object"&&ae!==null){if(a.isVNode(ae))return ae;const{node:Ce,className:te,text:ce,style:F}=ae;return a.h(Ce,{class:te,style:F},ce)}return null},W=ae=>{var Ce,te;return((te=(Ce=t.slots).nodeLoading)==null?void 0:te.call(Ce,le(ae)))??w(ae)?a.createVNode(Li,null,null):""},B=ae=>{if(t.slots.nodeAction)return t.slots.nodeAction(le(ae));let Ce=null;if(w(ae))return W(ae);if(typeof e.prefixIcon=="function"&&(Ce=e.prefixIcon(le(ae),"node_action"),Ce!=="default"))return I(Ce);if(Ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const te=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(ae):e.autoCheckChildren;if(b(ae)||ae.async||!te)return C(ae)?a.createVNode(Qo,{class:k("node-prefix")},null):a.createVNode(rl,{class:k("node-prefix")},null)}return null},U=ae=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(le(ae));let Ce=null;return typeof e.prefixIcon=="function"&&(Ce=e.prefixIcon(le(ae),"node_type"),Ce!=="default")?I(Ce):Ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(ae)||b(ae)?A(ae):a.createVNode(od,{class:[k("tree-icon"),k("node-prefix")]},null):null},K=(ae,Ce)=>{const te=x(ae);if(te){const ce=Ce||(g(te)||[]).some(F=>E(F));c(te,Oe.IS_CHECKED,ce),c(te,Oe.IS_INDETERMINATE,(g(te)||[]).some(F=>!E(F)||ee(F))),y(te)||K(te,Ce)}},j=(ae,Ce,te)=>{g(ae).forEach(ce=>{Array.isArray(Ce)?Ce.forEach((F,G)=>{c(ce,F,te[G])}):c(ce,Ce,te),j(ce,Ce,te)})},P=(ae,Ce,te)=>{te==null||te.preventDefault(),te==null||te.stopImmediatePropagation(),te==null||te.stopPropagation(),c(ae,Oe.IS_CHECKED,!!Ce),Ce&&c(ae,Oe.IS_INDETERMINATE,!1),e.checkStrictly&&(j(ae,[Oe.IS_CHECKED,Oe.IS_INDETERMINATE],[!!Ce,!1]),K(ae,Ce)),t.emit($n.NODE_CHECKED,n.data.filter(ce=>E(ce)),n.data.filter(ce=>ee(ce))),se(ae,te)},ee=ae=>E(ae)&&m(ae,Oe.IS_INDETERMINATE),J=ae=>O5(e,T(ae))?a.createVNode("span",{onClick:re},[a.createVNode(on,{indeterminate:ee(ae),modelValue:E(ae),size:"small",onChange:(Ce,te)=>P(ae,!!Ce,te)},null)]):null,q=(ae,Ce=null,te=null,ce=!0)=>{const F=Ce===null?!C(ae):!!Ce;if(F||j(ae,Oe.IS_OPEN,F),c(ae,Oe.IS_OPEN,F),ce){const G=C(ae)?$n.NODE_EXPAND:$n.NODE_COLLAPSE;t.emit(G,ae,_(ae),h(ae),te)}},R=(ae,Ce,te)=>{if(Array.isArray(ae)){ae.forEach(ce=>c(yo(ce),Ce,te));return}c(yo(ae),Ce,te)},z=(ae,Ce=!0,te=!1)=>{Q(ae,Oe.IS_OPEN,Ce,te&&Ce)},Q=(ae,Ce,te,ce=!1)=>{const F=yo(ae);if(F[Oe.IS_NULL])return;const G=Array.isArray(Ce)?Ce:[Ce],ye=Array.isArray(te)?te:[te];if(ce){if(G.forEach((ge,X)=>R(F,ge,ye[X])),!y(F)){const ge=x(F);G.forEach((X,fe)=>{m(ge,X)!==te&&Q(ge,X,ye[fe],ce)})}}else G.forEach((ge,X)=>R(F,ge,ye[X]))},ne=(ae,Ce)=>{if(C(ae)){q(ae,!1,Ce,!0);return}D(ae).finally(()=>{m(ae,Oe.IS_LOADING)?L("setNodeOpenedAfterLoading",{type:"once",fn:()=>q(ae,!0,Ce,!0)}):q(ae,!0,Ce,!0)})},oe=(ae,Ce)=>{ae.stopImmediatePropagation(),ae.stopPropagation(),ae.preventDefault(),ne(Ce,ae)},Y=(ae,Ce=!0,te=!0,ce=!1)=>{const F=Array.isArray(ae)?ae:[ae];if(!F.length)return;let G=yo(F[0]);if((typeof G=="string"||typeof G=="number"||typeof G=="symbol")&&(G=n.data.find(ye=>f(ye)===G)??{[Oe.IS_NULL]:!0}),!G[Oe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(ae)||e.disabledFolderSelectable&&G.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}o!=null&&u(o,Oe.IS_SELECTED,!Ce),e.selected&&e.selected!==o&&u(e.selected,Oe.IS_SELECTED,!Ce),c(G,Oe.IS_SELECTED,Ce),o=f(G),ce&&t.emit($n.NODE_SELECTED,{selected:Ce,node:G}),te&&F.length===1&&z(G,!0,!0),m(G,Oe.IS_ASYNC)&&D(G).then(()=>{a.nextTick(()=>{F.shift(),Y(F,Ce,te)})})}},de=ae=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:ae}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],se=(ae,Ce)=>{const te=de(ae);if(te.includes("selected")&&Y(ae,!0,!0,!0),te.includes("expand")&&(N(ae)||ne(ae,Ce)),te.includes("collapse")&&N(ae)&&ne(ae,Ce),te.includes("click")){const ce=$n.NODE_CLICK;t.emit(ce,ae,_(ae),h(ae),Ce)}},pe=(ae,Ce)=>{if(y(Ce))return!1;const te=d(Ce),ce=`${te}`.split("-").slice(0,ae+1);if(ce.join("-")===te)return!0;const G=ce.pop(),ye=parseInt(G,10);ce.push(`${ye+1}`);const ge=ce.join("-");return n.data.some(X=>d(X)===ge)},ve=ae=>{if(!e.levelLine)return null;const Ce=ce=>({"--depth":ce}),te=(m(ae,Oe.DEPTH)??0)+1;return new Array(te).fill("").map((ce,F)=>F).filter(ce=>pe(ce,ae)).filter(ce=>ce>0).map(ce=>a.createVNode("span",{style:Ce(te-ce),class:"node-virtual-line"},null))},ie=ae=>{var Ce,te,ce,F;return t.slots.node?(te=(Ce=t.slots).node)==null?void 0:te.call(Ce,le(ae)):t.slots.default?(F=(ce=t.slots).default)==null?void 0:F.call(ce,T(ae)):[E5(ae,e)]},le=ae=>e.keepSlotData?T(ae):O(ae),re=ae=>{ae.stopImmediatePropagation(),ae.stopPropagation()};return{renderTreeNode:(ae,Ce=!0)=>{var te,ce;return a.createVNode("div",{key:f(ae),class:jq(ae,n.schema),"data-tree-node":f(ae)},[a.createVNode("div",{style:zq(ae,e,n,Ce),class:Uq(ae,n.schema,e,Ce),onClick:F=>se(ae,F)},[a.createVNode("div",{class:[k("node-action")],onClick:F=>oe(F,ae)},[B(ae)]),a.createVNode("div",{class:k("node-content")},[[J(ae),U(ae)],a.createVNode("span",{class:k("node-text")},[ie(ae)]),(ce=(te=t.slots).nodeAppend)==null?void 0:ce.call(te,le(ae))]),Ce&&ve(ae)])])},handleTreeNodeClick:ne,deepAutoOpen:V,asyncNodeClick:D,setNodeAction:R,setNodeOpened:q,setSelect:Y,setOpen:z,setNodeAttribute:Q,isIndeterminate:ee}},Yq=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:o,getNodeParentIdById:c,extendNodeAttr:u,getNodeAttrById:d,getNodePathById:h,isRootNode:m}=Ld(r,e),{resolveClassName:f}=_e(),g=a.computed(()=>typeof e.disableDrag=="function"),y=a.computed(()=>typeof e.disableDrop=="function");let b="";const C=V=>V.target.closest("[data-tree-node]"),N=V=>{var I;const A=(I=V==null?void 0:V.dataset)==null?void 0:I.treeNode;return s(A)},w=V=>{C(V).removeEventListener("mouseup",w)},E=V=>{const A=C(V),I=N(A);if(I.draggable===!1||g.value&&e.disableDrag(I)){A.classList.add(`${f("tree-drag-disabled")}`);return}A.setAttribute("draggable","true"),A.addEventListener("mouseup",w)},x=V=>{V.preventDefault();const A=C(V),I=u(N(A));if(t.emit($n.NODE_DRAG_OVER,V,A,I),y.value&&(e!=null&&e.disableDrop(I))){V.dataTransfer.effectAllowed="move",V.dataTransfer.dropEffect="none",A.classList.add(`${f("tree-drop-disabled")}`);return}A.classList.add(`${f("tree-drop-active")}`);let W=V.dataTransfer.getData("node-id");W=b;const B=A.getAttribute("data-tree-node"),U=T(W,B)?"move":"none";V.dataTransfer.effectAllowed=U,V.dataTransfer.dropEffect=U},_=V=>{V.dataTransfer.effectAllowed="move",V.dataTransfer.dropEffect="move";const A=C(V);V.dataTransfer.setData("text/plain","");const I=A.getAttribute("data-tree-node");b=I,V.dataTransfer.setData("node-id",I),t.emit($n.NODE_DRAG_START,V,A)},O=V=>{V.preventDefault(),V.stopPropagation();const A=C(V);A.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`);const I=u(N(A));if(y.value&&e.disableDrop(I))return;const W=b,B=A.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:L,void 0,[W,B]),t.emit($n.NODE_DROP,V,A,I)},T=(V,A)=>{const I=h(V),W=h(A),B=c(V),U=c(A);return B===U?!0:I.indexOf(W)===-1&&W.indexOf(I)===-1},k=(V,A)=>{if(!T(V,A))return;const I=JSON.parse(JSON.stringify(s(V))),W=JSON.parse(JSON.stringify(s(A))),B=o(V),U=o(A),K=d(V,Oe.INDEX),j=d(A,Oe.INDEX);B==null||B[e.children].splice(K,1,W),U==null||U[e.children].splice(j,1,I)},L=(V,A)=>{const I=s(V),W=s(A);let B=null;if(m(V))B=e.data;else{const U=c(V);if(U!=null){B=s(U);const K=d(V,Oe.INDEX);B==null||B[e.children].splice(K,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(I)},D=V=>{V.preventDefault();const A=C(V);A.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`),t.emit($n.NODE_DRAG_LEAVE,V,A)};a.onMounted(()=>{if(e.draggable&&n.value){const V=n.value.$el;V.addEventListener("mousedown",E),V.addEventListener("dragstart",_),V.addEventListener("dragover",x),V.addEventListener("dragleave",D),V.addEventListener("drop",O)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const V=n.value.$el;V.removeEventListener("mousedown",E),V.removeEventListener("dragstart",_),V.removeEventListener("dragover",x),V.removeEventListener("dragleave",D),V.removeEventListener("drop",O)}})},Xq=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=g=>["string","number","boolean"].includes(typeof g),o=(g,y)=>g===y,c=(g,y)=>new RegExp(`${g}`,"i").test(`${y}`),u=(g,y)=>Reflect.apply(g,void 0,y),d=t.value===void 0||t.value===!1,h=(g,y)=>{if(d)return!0;if(s(t.value))return`${t.value}`.length===0?!1:u(c,[t.value,g,y]);const{value:b="",match:C="fuzzy"}=t.value,w=typeof C=="function"?C:C==="fuzzy"?c:o;return`${b}`.length===0?!1:u(w,[b,g,y])},m=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:g=""}=t.value;return`${g}`.length>0}),f=a.computed(()=>n==="tree");return{searchFn:h,refSearch:t,isSearchActive:m,isSearchDisabled:d,resultType:n,isTreeUI:f,showChildNodes:r}},qq=e=>{var C;const t=(N=void 0,w=null)=>{const{data:E,children:x}=e,_=[],O=[];let T=0;const k=new WeakMap;function L(P,ee,J,q){if(P!=null&&k.has(P)){const R=k.get(P);if(Object.prototype.hasOwnProperty.call(R,ee)&&typeof q=="function"&&Reflect.apply(q,self,[R,ee,J,P])){if(R[ee]===J)return;Object.assign(R,{[ee]:J}),L(R[Oe.PARENT],ee,J,q)}}}function D(P){let ee=null;return typeof e.nodeKey=="string"&&(ee=P[e.nodeKey]||lr()),ee||P[Oe.UUID]||lr()}const V={[Oe.IS_OPEN]:()=>!!e.expandAll,[Oe.IS_CHECKED]:()=>!1,[Oe.IS_MATCH]:()=>!1,[Oe.IS_SELECTED]:(P,ee)=>Bc(P,e.selected,ee),[Oe.IS_CACHED]:()=>!1,[Oe.IS_ASYNC]:()=>null,[Oe.IS_LOADING]:()=>!1};function A(P,ee,J,q=void 0){let R=q;q===void 0&&typeof V[J]=="function"&&(R=V[J](ee,P));const z=Aa[J];if(Object.prototype.hasOwnProperty.call(ee,z))return ee[z];const Q=(w==null?void 0:w.get(ee))??void 0;let ne;return Q&&(ne=Q[J]),ne==null&&(ne=R),ne}function I(P,ee){if(!e.selectable)return!1;const J=Bc(ee,e.selected,P);return A(P,ee,Oe.IS_SELECTED,J)}function W(P,ee,J){var z;const q=A(P,ee,Oe.IS_OPEN),R=k.has(J)?(z=k.get(J))==null?void 0:z[Oe.IS_OPEN]:!0;return q&&R}function B(P,ee,J){if(!O5(e,{data:P,attributes:J}))return!1;const R=Bc(P,e.checked,ee);return A(ee,P,Oe.IS_CHECKED,R)}function U(P){return!((P==null?void 0:P[Oe.IS_OPEN])??!1)}function K(P,ee,J,q){return P[Oe.IS_INDETERMINATE]=(q[e.children]||[]).some(R=>{var z;return!(((z=k.get(R))==null?void 0:z[Oe.IS_CHECKED])??!1)}),!0}function j(P,ee=0,J=null,q=null){const R=P.length;for(let z=0;z<R;z++){const Q=P[z];if(Array.isArray(Q))j(Q,ee,J,q);else if(typeof Q=="object"&&Q!==null){const ne=q!==null?`${q}-${z}`:`${z}`,oe=`${D(Q)}`,Y=!!(Q[x]||[]).length;let de=A(oe,Q,Oe.IS_OPEN);e.autoOpenParentNode?de&&L(J,Oe.IS_OPEN,!0,U):de=W(oe,Q,J);const se={[Oe.DEPTH]:ee,[Oe.INDEX]:z,[Oe.UUID]:oe,[Oe.PARENT]:J,[Oe.HAS_CHILD]:Y,[Oe.PATH]:ne,[Oe.IS_ROOT]:J===null,[Oe.ORDER]:T,[Oe.IS_SELECTED]:I(oe,Q),[Oe.IS_MATCH]:A(oe,Q,Oe.IS_MATCH),[Oe.IS_OPEN]:de,[Oe.IS_CHECKED]:void 0,[Oe.IS_CACHED]:A(oe,Q,Oe.IS_CACHED),[Oe.IS_ASYNC]:A(oe,Q,Oe.IS_ASYNC),[Oe.IS_LOADING]:A(oe,Q,Oe.IS_LOADING),[Oe.IS_INDETERMINATE]:!1};se[Oe.IS_CHECKED]=B(Q,oe,se),se[Oe.IS_CHECKED]&&_.push(Q),k.set(Q,se),O.push(Q),T+=1,Object.prototype.hasOwnProperty.call(Q,x)&&j(Q[x]||[],ee+1,Q,ne)}}}return j(N??E),e.showCheckbox!==!1&&e.checkStrictly&&(_==null||_.forEach(P=>{L(P,Oe.IS_CHECKED,!0,K)})),[O,k]},n=t(),r=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:u,deepAutoOpen:d}=L5(e,c),h=N=>{s.push(N)},m=(N,w,E=!0)=>{E&&r.has(N)&&r.delete(N),r.set(N,w)},f=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),g=N=>{const w=f(N);return w!==null&&Reflect.apply(w.fn,void 0,[]),(w==null?void 0:w.type)??"once"},y=()=>{Array.from(r.keys()).forEach(N=>{const w=r.get(N);if(Array.isArray(w)){const E=[];w.forEach((x,_)=>{g(x)==="once"&&E.unshift(_)}),E.length&&E.forEach(x=>w.splice(x,1)),w.length===0&&r.delete(N)}else g(w)==="once"&&r.delete(N)})};a.watch(()=>[e.data],N=>{var E,x;const w=t(N[0],c.schema);c.data=w[0],c.schema=w[1],(E=e.async)!=null&&E.callback&&((x=e.async)==null?void 0:x.deepAutoOpen)==="every"&&d(),y()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,N=>{o.length=0,s.forEach(w=>{Reflect.apply(w,void 0,[N]),o.push(()=>Reflect.apply(w,void 0,[N]))}),m("afterSelectWatch",o)},{immediate:!0})});const b=N=>{m("afterDataUpdate",N)};return(C=e.async)!=null&&C.callback&&d(),{flatData:c,asyncNodeClick:u,deepAutoOpen:d,afterDataUpdate:b,registerNextLoop:m,onSelected:h}},Jq=a.defineComponent({name:"Tree",props:Rq,emits:Mq,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:o}=qq(e),{checkNodeIsOpen:c,isRootNode:u,isNodeOpened:d,isNodeChecked:h,isNodeMatched:m,hasChildNode:f,getNodePath:g,getNodeId:y,getNodeAttr:b,getParentNode:C,getIntersectionResponse:N}=Ld(r,e),{searchFn:w,isSearchActive:E,refSearch:x,isSearchDisabled:_,isTreeUI:O,showChildNodes:T}=Xq(e),k=a.reactive([]),L=se=>{if(E.value){if(T){const ve=`${g(se)??""}-`;return c(se)&&(m(se)||k.some(ie=>ve.indexOf(`${ie}-`)===0))}return c(se)&&m(se)}return c(se)},D=a.computed(()=>r.data.filter(se=>L(se))),{getLastVisibleElement:V,intersectionObserver:A}=Hq(e),{renderTreeNode:I,handleTreeNodeClick:W,setOpen:B,setNodeAction:U,setSelect:K,asyncNodeClick:j,setNodeAttribute:P,isIndeterminate:ee}=Kq(e,t,r,D,{registerNextLoop:o}),J=jo(120,()=>{k.length=0,r.data.forEach(se=>{const pe=w(E5(se,e),se);pe&&k.push(g(se)),P(se,[Oe.IS_MATCH],[pe],O.value&&pe)})});_||a.watch([x],()=>{J()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{Q()})});const q=(se,pe=!0,ve=!1)=>{U(yo(se),Oe.IS_CHECKED,pe),ve&&t.emit($n.NODE_CHECKED,r.data.filter(ie=>h(ie)),r.data.filter(ie=>ee(ie)))};s(se=>{K(se,!0,e.autoOpenParentNode,!0)});const R=()=>r;a.watch(()=>[e.checked],()=>{q(e.checked,!0)});const z=()=>{var se;(se=n.value)==null||se.reset()},Q=se=>{if(se==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(se,e.nodeKey)){n.value.fixToTop({index:D.value.findIndex(ve=>ve[e.nodeKey]===se[e.nodeKey])+1});return}if(se.id!==void 0&&se.id!==null){n.value.fixToTop({index:D.value.findIndex(ve=>ve[e.nodeKey]===se.id)+1});return}if(se.index>=0){n.value.fixToTop({index:se.index});return}const pe=y(se);if(pe){n.value.fixToTop({index:D.value.findIndex(ve=>y(ve)===pe)+1});return}};t.expose({handleTreeNodeClick:W,isNodeChecked:h,isRootNode:u,isNodeOpened:d,isNodeMatched:m,hasChildNode:f,setOpen:B,setChecked:q,setNodeAction:U,setNodeOpened:B,setSelect:K,scrollToTop:Q,asyncNodeClick:j,getData:R,reset:z,getNodeAttr:b,getParentNode:C});const{renderEmpty:ne}=Fq(e);Yq(e,t,n,r);const oe=se=>{var ve,ie;if(se.length)return se.map(le=>I(le,!E.value||O.value));const pe=E.value?"search-empty":"empty";return((ie=(ve=t.slots).empty)==null?void 0:ie.call(ve))??ne(pe)},Y=([se,pe,ve])=>{var ie,le,re,be;if(A.value.enabled&&se.offset.y>5){if(!e.virtualRender){const Ce=V(se.offset.y,n.value.refRoot),te=N(Ce[0]);(le=(ie=A.value)==null?void 0:ie.callback)==null||le.call(ie,te),t.emit($n.NODE_ENTER_VIEW,te);return}const ae=N(ve.slice(-1)[0]);(be=(re=A.value)==null?void 0:re.callback)==null||be.call(re,ae),t.emit($n.NODE_ENTER_VIEW,ae);return}},{resolveClassName:de}=_e();return()=>a.createVNode(cl,{ref:n,style:Bq(null,e),height:e.height,class:de("tree"),contentClassName:de("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:D.value,rowKey:Oe.UUID,throttleDelay:0,onContentScroll:Y},{default:se=>oe(se.data||[])})}}),A5=Ze(Jq),fs="upload";var ra=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ra||{}),oh=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(oh||{}),Xs=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Xs||{});const jm=[ra.BUTTON,ra.DRAGGABLE,ra.PICTURE],Wm=[oh.FORMDATA,oh.BINARY],Xn={type:{type:String,default:"formdata",validator:e=>!e||Wm.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Wm.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||jm.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${jm.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 Gm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Zq=a.defineComponent({name:"UploadList",props:{theme:Xn.theme,disabled:Xn.disabled,files:Xn.files,multiple:Xn.multiple,isShowPreview:Xn.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=_e(),{theme:o,disabled:c,multiple:u,isShowPreview:d}=a.toRefs(e),h=`${s(fs)}-list`,m=a.computed(()=>o.value===ra.PICTURE),f=a.computed(()=>m.value&&!u.value),g=a.computed(()=>Ue({[h]:!0,[`${h}--${o.value}`]:!0,[`${h}--disabled`]:c.value}));function y(T){const k=["Bytes","KB","MB","GB","TB"],L=Math.floor(Math.log(T)/Math.log(1024));return`${(T/1024**L).toFixed(2)}${k[L]}`}function b(T,k,L){n("preview",T,k,L)}function C(T,k){n("remove",T,k)}function N(T,k){n("retry",T,k)}const w=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${h}__item`},Gm(T=e.files.map(k=>{const L=Ue({[`${h}__item`]:!0,[`${h}__item-picture`]:!0,[`${h}__item--${k.status}`]:!0});return a.createVNode("li",{key:k.uid,class:L},[t!=null&&t.file?t.file({file:k}):E(k)])}))?T:{default:()=>[T]})},E=T=>[a.withDirectives(a.createVNode("img",{class:`${h}__picture-item-thumbnail`,alt:"",src:T.url},null),[[a.vShow,T.status!=="uploading"]]),a.createVNode(a.Fragment,null,[T.status==="uploading"&&a.createVNode(Ho,{width:50,class:`${h}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:T.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!c.value&&a.createVNode("div",{class:`${h}__picture-item-actions`},[d.value&&a.createVNode(Oi,{class:"action-icon",onClick:k=>b(T,e.files,k)},null),a.createVNode(pi,{class:"action-icon",onClick:k=>C(T,k)},null)])])],x=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${h}__item`},Gm(T=e.files.map(k=>{const L=Ue({[`${h}__item`]:!0,[`${h}__item--${k.status}`]:!0});return a.createVNode("li",{key:k.uid,class:L},[t!=null&&t.file?t.file({file:k}):O(k)])}))?T:{default:()=>[T]})},_=T=>{var I;const k=(I=T==null?void 0:T.raw)==null?void 0:I.type,[L]=(k==null?void 0:k.split("/"))||"";let V={text:ei,image:td,application:ei,video:dd,audio:ju}[L]||ei;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(k)&&(V=Hu),a.h(V,{class:`${h}__item-file-icon`})},O=T=>[a.createVNode("div",{class:`${h}__item-icon`},[T.isPic?a.createVNode("img",{class:`${h}__item-thumbnail`,alt:"",src:T.url},null):_(T)]),a.createVNode("div",{class:`${h}__item-summary`},[a.createVNode("div",{class:`${h}__item-name`,title:T.name},[T.name]),T.status!=="uploading"&&a.createVNode("div",{class:`${h}__item-message`,title:T.statusText},[T.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(_s,{class:`${h}__item-message-success-icon`},null),T.statusText||r.value.uploadSuccess]),T.status==="fail"&&a.createVNode(a.Fragment,null,[T.statusText||r.value.uploadFailed])]),T.status==="uploading"&&a.createVNode(Ho,{class:`${h}__item-progress`,percent:T.percentage,showText:!1,size:"small"},null),T.status!=="fail"&&a.createVNode("div",{class:`${h}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${h}__item-speed-size`},[y(T.size)]),[[a.vShow,T.size]]),a.withDirectives(a.createVNode("span",{class:`${h}__item-speed-percentage`},[T.percentage,a.createTextVNode("%")]),[[a.vShow,T.status==="uploading"]])]),!c.value&&a.createVNode("div",{class:`${h}__item-actions`},[T.status==="fail"&&a.createVNode(ad,{class:`${h}__item-retry-icon`,onClick:k=>N(T,k)},null),a.createVNode(pi,{class:`${h}__item-del-icon`,onClick:k=>C(T,k)},null)])])];return()=>{var T,k,L;return a.createVNode(a.Fragment,null,[f.value?(k=t==null?void 0:t.innerTrigger)==null?void 0:k.call(t,(T=e.files)==null?void 0:T[0]):a.createVNode("ul",{class:g.value},[m.value?w():x(),(L=t==null?void 0:t.innerTrigger)==null?void 0:L.call(t)])])}}}),Km=a.defineComponent({name:"UploadTrigger",props:{theme:Xn.theme,disabled:Xn.disabled,multiple:Xn.multiple,accept:Xn.accept,file:{type:Object},selectChange:Xn.selectChange,isShowPreview:Xn.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=_e(),{theme:o,disabled:c,file:u,multiple:d,accept:h,isShowPreview:m}=a.toRefs(e),f=`${s(fs)}-trigger`,g=a.computed(()=>o.value===ra.BUTTON),y=a.computed(()=>o.value===ra.DRAGGABLE),b=a.computed(()=>o.value===ra.PICTURE),C=a.computed(()=>b.value&&!d.value),N=a.computed(()=>b.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value),w=a.ref(null),E=a.computed(()=>{var K;return Ue({[f]:!0,[`${f}--${o.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:u.value??!1,[`${f}--${(K=u.value)==null?void 0:K.status}`]:u.value??!1,[`${f}--dragover`]:D.value,[`${f}--disabled`]:c.value})}),x=()=>{w.value.value=null,w.value.click()},_=K=>{var P;if(e.selectChange&&((P=e.selectChange)==null?void 0:P.call(e,K))===!1)return!1;const{files:j}=K.target;n("change",Array.from(j))},O=()=>{e.disabled||x()},T=K=>{K.defaultPrevented||K.target!==K.currentTarget||((K.code==="Enter"||K.code==="Space")&&x(),K.preventDefault())};function k(K,j){n("remove",K,j),j.stopPropagation(),j.preventDefault()}function L(K,j){n("preview",K,[K],j),j.stopPropagation(),j.preventDefault()}const D=a.ref(!1),V=()=>{const K=J=>{var R;if(c.value)return;if(J.preventDefault(),D.value=!1,e.selectChange&&((R=e.selectChange)==null?void 0:R.call(e,J))===!1)return!1;const q=Array.from(J.dataTransfer.files);n("change",q)},j=J=>{J.preventDefault(),D.value=!0},P=()=>{D.value=!1},ee=Ue({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ee,onDragleave:P,onDragover:j,onDrop:K},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Do,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},A=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?W(e.file):I()]),I=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(nl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),W=K=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:K.url},null),[[a.vShow,K.status!=="uploading"]]),a.createVNode(a.Fragment,null,[K.status==="uploading"&&a.createVNode(Ho,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:K.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[m.value&&a.createVNode(Oi,{class:"action-icon",onClick:j=>L(K,j)},null),a.createVNode(pi,{class:"action-icon",onClick:j=>k(K,j)},null)])])],B=()=>a.createVNode(Ht,{disabled:c.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Do,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),U=()=>{if(g.value)return B();if(y.value)return V();if(b.value)return A()};return()=>{var K;return a.createVNode("div",{class:E.value,tabindex:"0",onClick:O,onKeydown:T},[t.trigger?[t.trigger(),(K=t==null?void 0:t.default)==null?void 0:K.call(t)]:U(),a.createVNode("input",{ref:w,class:`${f}__input-file`,accept:N.value,disabled:c.value,multiple:d.value,tabindex:"-1",type:"file",onChange:_},null)])}}});var $5={exports:{}};(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(w,E){var x=w[0],_=w[1],O=w[2],T=w[3];x+=(_&O|~_&T)+E[0]-680876936|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[1]-389564586|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[2]+606105819|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[3]-1044525330|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[4]-176418897|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[5]+1200080426|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[6]-1473231341|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[7]-45705983|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[8]+1770035416|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[9]-1958414417|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[10]-42063|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[11]-1990404162|0,_=(_<<22|_>>>10)+O|0,x+=(_&O|~_&T)+E[12]+1804603682|0,x=(x<<7|x>>>25)+_|0,T+=(x&_|~x&O)+E[13]-40341101|0,T=(T<<12|T>>>20)+x|0,O+=(T&x|~T&_)+E[14]-1502002290|0,O=(O<<17|O>>>15)+T|0,_+=(O&T|~O&x)+E[15]+1236535329|0,_=(_<<22|_>>>10)+O|0,x+=(_&T|O&~T)+E[1]-165796510|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[6]-1069501632|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[11]+643717713|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[0]-373897302|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[5]-701558691|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[10]+38016083|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[15]-660478335|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[4]-405537848|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[9]+568446438|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[14]-1019803690|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[3]-187363961|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[8]+1163531501|0,_=(_<<20|_>>>12)+O|0,x+=(_&T|O&~T)+E[13]-1444681467|0,x=(x<<5|x>>>27)+_|0,T+=(x&O|_&~O)+E[2]-51403784|0,T=(T<<9|T>>>23)+x|0,O+=(T&_|x&~_)+E[7]+1735328473|0,O=(O<<14|O>>>18)+T|0,_+=(O&x|T&~x)+E[12]-1926607734|0,_=(_<<20|_>>>12)+O|0,x+=(_^O^T)+E[5]-378558|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[8]-2022574463|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[11]+1839030562|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[14]-35309556|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[1]-1530992060|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[4]+1272893353|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[7]-155497632|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[10]-1094730640|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[13]+681279174|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[0]-358537222|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[3]-722521979|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[6]+76029189|0,_=(_<<23|_>>>9)+O|0,x+=(_^O^T)+E[9]-640364487|0,x=(x<<4|x>>>28)+_|0,T+=(x^_^O)+E[12]-421815835|0,T=(T<<11|T>>>21)+x|0,O+=(T^x^_)+E[15]+530742520|0,O=(O<<16|O>>>16)+T|0,_+=(O^T^x)+E[2]-995338651|0,_=(_<<23|_>>>9)+O|0,x+=(O^(_|~T))+E[0]-198630844|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[7]+1126891415|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[14]-1416354905|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[5]-57434055|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[12]+1700485571|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[3]-1894986606|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[10]-1051523|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[1]-2054922799|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[8]+1873313359|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[15]-30611744|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[6]-1560198380|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[13]+1309151649|0,_=(_<<21|_>>>11)+O|0,x+=(O^(_|~T))+E[4]-145523070|0,x=(x<<6|x>>>26)+_|0,T+=(_^(x|~O))+E[11]-1120210379|0,T=(T<<10|T>>>22)+x|0,O+=(x^(T|~_))+E[2]+718787259|0,O=(O<<15|O>>>17)+T|0,_+=(T^(O|~x))+E[9]-343485551|0,_=(_<<21|_>>>11)+O|0,w[0]=x+w[0]|0,w[1]=_+w[1]|0,w[2]=O+w[2]|0,w[3]=T+w[3]|0}function o(w){var E=[],x;for(x=0;x<64;x+=4)E[x>>2]=w.charCodeAt(x)+(w.charCodeAt(x+1)<<8)+(w.charCodeAt(x+2)<<16)+(w.charCodeAt(x+3)<<24);return E}function c(w){var E=[],x;for(x=0;x<64;x+=4)E[x>>2]=w[x]+(w[x+1]<<8)+(w[x+2]<<16)+(w[x+3]<<24);return E}function u(w){var E=w.length,x=[1732584193,-271733879,-1732584194,271733878],_,O,T,k,L,D;for(_=64;_<=E;_+=64)s(x,o(w.substring(_-64,_)));for(w=w.substring(_-64),O=w.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<O;_+=1)T[_>>2]|=w.charCodeAt(_)<<(_%4<<3);if(T[_>>2]|=128<<(_%4<<3),_>55)for(s(x,T),_=0;_<16;_+=1)T[_]=0;return k=E*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(k[2],16),D=parseInt(k[1],16)||0,T[14]=L,T[15]=D,s(x,T),x}function d(w){var E=w.length,x=[1732584193,-271733879,-1732584194,271733878],_,O,T,k,L,D;for(_=64;_<=E;_+=64)s(x,c(w.subarray(_-64,_)));for(w=_-64<E?w.subarray(_-64):new Uint8Array(0),O=w.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_=0;_<O;_+=1)T[_>>2]|=w[_]<<(_%4<<3);if(T[_>>2]|=128<<(_%4<<3),_>55)for(s(x,T),_=0;_<16;_+=1)T[_]=0;return k=E*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(k[2],16),D=parseInt(k[1],16)||0,T[14]=L,T[15]=D,s(x,T),x}function h(w){var E="",x;for(x=0;x<4;x+=1)E+=r[w>>x*8+4&15]+r[w>>x*8&15];return E}function m(w){var E;for(E=0;E<w.length;E+=1)w[E]=h(w[E]);return w.join("")}m(u("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function w(E,x){return E=E|0||0,E<0?Math.max(E+x,0):Math.min(E,x)}ArrayBuffer.prototype.slice=function(E,x){var _=this.byteLength,O=w(E,_),T=_,k,L,D,V;return x!==n&&(T=w(x,_)),O>T?new ArrayBuffer(0):(k=T-O,L=new ArrayBuffer(k),D=new Uint8Array(L),V=new Uint8Array(this,O,k),D.set(V),L)}}();function f(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function g(w,E){var x=w.length,_=new ArrayBuffer(x),O=new Uint8Array(_),T;for(T=0;T<x;T+=1)O[T]=w.charCodeAt(T);return E?O:_}function y(w){return String.fromCharCode.apply(null,new Uint8Array(w))}function b(w,E,x){var _=new Uint8Array(w.byteLength+E.byteLength);return _.set(new Uint8Array(w)),_.set(new Uint8Array(E),w.byteLength),x?_:_.buffer}function C(w){var E=[],x=w.length,_;for(_=0;_<x-1;_+=2)E.push(parseInt(w.substr(_,2),16));return String.fromCharCode.apply(String,E)}function N(){this.reset()}return N.prototype.append=function(w){return this.appendBinary(f(w)),this},N.prototype.appendBinary=function(w){this._buff+=w,this._length+=w.length;var E=this._buff.length,x;for(x=64;x<=E;x+=64)s(this._hash,o(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},N.prototype.end=function(w){var E=this._buff,x=E.length,_,O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(_=0;_<x;_+=1)O[_>>2]|=E.charCodeAt(_)<<(_%4<<3);return this._finish(O,x),T=m(this._hash),w&&(T=C(T)),this.reset(),T},N.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},N.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},N.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},N.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},N.prototype._finish=function(w,E){var x=E,_,O,T;if(w[x>>2]|=128<<(x%4<<3),x>55)for(s(this._hash,w),x=0;x<16;x+=1)w[x]=0;_=this._length*8,_=_.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(_[2],16),T=parseInt(_[1],16)||0,w[14]=O,w[15]=T,s(this._hash,w)},N.hash=function(w,E){return N.hashBinary(f(w),E)},N.hashBinary=function(w,E){var x=u(w),_=m(x);return E?C(_):_},N.ArrayBuffer=function(){this.reset()},N.ArrayBuffer.prototype.append=function(w){var E=b(this._buff.buffer,w,!0),x=E.length,_;for(this._length+=w.byteLength,_=64;_<=x;_+=64)s(this._hash,c(E.subarray(_-64,_)));return this._buff=_-64<x?new Uint8Array(E.buffer.slice(_-64)):new Uint8Array(0),this},N.ArrayBuffer.prototype.end=function(w){var E=this._buff,x=E.length,_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],O,T;for(O=0;O<x;O+=1)_[O>>2]|=E[O]<<(O%4<<3);return this._finish(_,x),T=m(this._hash),w&&(T=C(T)),this.reset(),T},N.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},N.ArrayBuffer.prototype.getState=function(){var w=N.prototype.getState.call(this);return w.buff=y(w.buff),w},N.ArrayBuffer.prototype.setState=function(w){return w.buff=g(w.buff,!0),N.prototype.setState.call(this,w)},N.ArrayBuffer.prototype.destroy=N.prototype.destroy,N.ArrayBuffer.prototype._finish=N.prototype._finish,N.ArrayBuffer.hash=function(w,E){var x=d(new Uint8Array(w)),_=m(x);return E?C(_):_},N})})($5);var Qq=$5.exports;const Ym=jt(Qq),Da="An error occurred during upload";function _o(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const eJ=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",u=>{const d=u;d.percent=u.total>0?u.loaded/u.total*100:0,e.onProgress(d)});const o=new FormData;if(s&&e.data){let u=e.data;Array.isArray(u)||(u=[u]),u.forEach(d=>{for(const[h,m]of Object.entries(d))Array.isArray(m)?o.append(h,...m):o.append(h,m)})}if(s&&e.formDataAttributes){let u=e.formDataAttributes;Array.isArray(u)||(u=[u]),u.forEach(d=>{Array.isArray(d.value)?o.append(d.name,...d.value):o.append(d.name,d.value)})}if(s&&o.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let u=new Error(Da);const d=_o(t);d&&(u=new Error(d.message||Da)),console.log(d,u),e.onError(u)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const u=_o(t);let d=new Error(Da);return u&&(d=new Error(u.message||Da)),e.onError(d)}e.onSuccess(_o(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(u=>{const d=u.name,h=u.value;t.setRequestHeader(d,h)});else{const u=e.header.name,d=e.header.value;t.setRequestHeader(u,d)}const c=e.headers||{};if(c instanceof Headers)c.forEach((u,d)=>t.setRequestHeader(d,u));else for(const[u,d]of Object.entries(c))Jm(d)||t.setRequestHeader(u,String(d));return t.send(s?o:e.file),t},V5=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,tJ=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 rJ(n,t),o=[];nJ(e,n,r,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:r,hash:s},u=new XMLHttpRequest;u.open(e.method,e.mergeUrl,!0),u.onreadystatechange=()=>{if(u.readyState===4){const d=_o(u);if(u.status<200||u.status>=300){let h=new Error(Da);return d&&(h=new Error(d.message||Da)),e.onError(h)}e.onSuccess(d)}},u.onloadend=()=>{e.onComplete()},u.setRequestHeader("Content-type","application/JSON"),u.send(JSON.stringify(c))})},nJ=(e,t,n,r,s,o)=>{for(let c=0;c<n;c++){const u=new Promise((d,h)=>{const m=c*o,f=Math.min(t.size,m+o),g=new FormData;if(e.data){let C=e.data;Array.isArray(C)||(C=[C]),C.forEach(N=>{for(const[w,E]of Object.entries(N))Array.isArray(E)?g.append(w,...E):g.append(w,E)})}if(e.formDataAttributes){let C=e.formDataAttributes;Array.isArray(C)||(C=[C]),C.forEach(N=>{Array.isArray(N.value)?g.append(N.name,...N.value):g.append(N.name,N.value)})}g.append("file",V5.call(t,m,f)),g.append("name",t.name),g.append("total",n.toString()),g.append("index",c.toString()),g.append("size",t.size.toString()),g.append("hash",r.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const C=_o(y);if(y.status<200||y.status>=300){h(C);let N=new Error(Da);C&&(N=new Error(C.message||Da)),e.onError(N)}else d("reponseText")}},y.upload.addEventListener("progress",C=>{const N=C;e.onProgress(N,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(C=>{const N=C.name,w=C.value;y.setRequestHeader(N,w)});else{const C=e.header.name,N=e.header.value;y.setRequestHeader(C,N)}const b=e.headers||{};if(b instanceof Headers)b.forEach((C,N)=>y.setRequestHeader(N,C));else for(const[C,N]of Object.entries(b))Jm(N)||y.setRequestHeader(C,String(N));y.send(g)});s.push(u)}},rJ=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let o=0;const c=new Ym.ArrayBuffer,u=new FileReader;function d(){const h=o*t,m=h+t>=e.size?e.size:h+t;u.readAsArrayBuffer(V5.call(e,h,m))}u.onload=h=>{if(c.append(h.target.result),o+=1,o<s)d();else{const m=c.end(),f=new Ym;f.append(m),f.append(e.name);const g=f.end();n(g)}},u.onerror=()=>{r(new Error("File slice failed"))},d()}).catch(n=>{console.log(n)});function Xm(e){return Date.now()+e}const aJ=(e,t)=>{const n=a.computed(()=>{var g;return typeof e.size=="number"?e.size:(g=e==null?void 0:e.size)==null?void 0:g.maxImgSize}),r=a.computed(()=>{var g;return typeof e.size=="number"?e.size:(g=e==null?void 0:e.size)==null?void 0:g.maxImgSize}),s=a.ref([]);function o(g){return s.value.find(y=>y.uid===g.uid)}let c=0;function u(g){var N;c+=1,g.uid=Xm(c);const y={uid:g.uid,name:g.name,status:Xs.NEW,size:g.size,raw:g},b=g.type.startsWith("image/");let C=null;if(b){try{y.url=window.URL.createObjectURL(g)}catch(w){console.error(w)}y.isPic=!0}return e.validateName&&!((N=e.validateName)!=null&&N.test(y.name))&&(y.status=Xs.FAIL,y.statusText="invalid filename",C=new Error(y.statusText)),b&&g.size>n.value*1024**2&&(y.status=Xs.FAIL,y.statusText="invalid file size",C=new Error(y.statusText)),!b&&g.size>r.value*1024**2&&(y.status=Xs.FAIL,y.statusText="invalid file size",C=new Error(y.statusText)),s.value.push(y),C}async function d(g){var C;const y=g instanceof File?o(g):g,b=N=>{var w;t.onRemove(N,s.value),s.value.splice(s.value.indexOf(y),1),(w=N.url)!=null&&w.startsWith("blob:")&&URL.revokeObjectURL(N.url)};e.beforeRemove?await((C=e.beforeRemove)==null?void 0:C.call(e,y,s.value))!==!1&&b(y):b(y)}async function h(g,y,b){const C=o(y);C&&(C.status="fail",C.statusText=g.message,C.response=b)}async function m(g,y){const b=o(y);b&&(b.status="success",b.response=g)}async function f(g,y){const b=o(y);b&&(b.status="uploading",b.percentage=Math.round(g.percent))}return a.watch(()=>e.files,g=>{s.value=g.map(y=>(c+=1,{...y,uid:y.uid??Xm(c),status:y.status??Xs.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:u,handleRemove:d,handleError:h,handleSuccess:m,handleProgress:f}},sJ=a.defineComponent({name:"Upload",props:Xn,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=_e(),o=a.shallowRef({}),c=a.computed(()=>e.theme===ra.PICTURE),u=a.computed(()=>c.value&&!e.multiple),d=a.computed(()=>Ue({[`${s(fs)}`]:!0,[`${s(fs)}--${e.theme}`]:!0,[`${s(fs)}--disabled`]:e.disabled,[`${s(fs)}--single-picture`]:u.value,[e.extCls]:e.extCls??!1})),h=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function m(k,L){T(k),n("delete",k,L)}const{fileList:f,handlePreprocess:g,handleRemove:y,handleProgress:b,handleSuccess:C,handleError:N}=aJ(e,{onRemove:m});function w(k){if(!k.length)return;if(e.limit>1&&f.value.length+k.length>e.limit){n("exceed",k,f.value);return}!e.multiple&&e.limit===1&&(f.value=[]);let L=k;(!e.multiple||e.limit===1)&&(L=k.slice(0,1));for(const D of L){const V=D,A=g(V);if(A){n("error",V,f.value,A);return}e.autoUpload&&_(V,L)}}function E(k,L){n("preview",k,L)}function x(k){O(k.raw)}async function _(k,L){var V;if(!e.beforeUpload)return O(k,L);let D;try{D=await((V=e.beforeUpload)==null?void 0:V.call(e,k,L))}catch{D=!1}if(D===!1){y(k);return}O(k,L)}function O(k,L){const{type:D,headers:V,header:A,data:I,formDataAttributes:W,method:B,withCredentials:U,name:K,url:j,sliceUrl:P,mergeUrl:ee,chunkSize:J,customRequest:q}=e,{uid:R}=k,z={type:D,headers:V,header:A,withCredentials:U,file:k,data:I,formDataAttributes:W,method:B,filename:K,action:j,sliceUrl:P,mergeUrl:ee,chunkSize:J,onProgress:oe=>{b(oe,k),n("progress",oe,k,f.value)},onSuccess:oe=>{var de;const Y=oe;if((de=e==null?void 0:e.handleResCode)!=null&&de.call(e,Y))C(oe,k),n("success",oe,k,f.value);else{const se=new Error((Y==null?void 0:Y.message)||"unknow error");N(se,k,oe),n("error",k,f.value,se)}delete o.value[R]},onError:oe=>{N(oe,k),n("error",k,f.value,oe),delete o.value[R]},onComplete:()=>{L&&L.indexOf(k)===L.length-1&&n("done",f.value)}};let Q=e.sliceUpload?tJ:eJ;q&&(Q=q);const ne=Q(z);o.value[R]=ne,ne instanceof Promise&&ne.then(z.onSuccess,z.onError)}function T(k){let L=o.value;k&&(L={[k.uid]:o.value[k.uid]}),Object.keys(L).forEach(D=>{if(L[D]instanceof XMLHttpRequest){const V=L[D];V==null||V.abort()}delete o.value[D]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:k})=>{k!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(k)})}),r({handlePreview:E,handleRemove:y,handleRetry:x}),()=>a.createVNode("div",{class:d.value},[!c.value&&a.createVNode(Km,a.mergeProps(h.value,{onChange:w}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(fs)}__tip`},[e.tip]),a.createVNode(Zq,{disabled:e.disabled,files:f.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:E,onRemove:y,onRetry:x},{innerTrigger:k=>c.value&&a.createVNode(Km,a.mergeProps(h.value,{file:k,onChange:w,onPreview:E,onRemove:y}),t),file:t.file})])}}),D5=Ze(sJ),g0=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:md,Affix:ep,Alert:np,AnimateNumber:rp,Backtop:ap,Badge:sp,Breadcrumb:op,Button:Ht,Card:Rp,Cascader:Yp,Checkbox:on,CodeDiff:rv,Collapse:sv,ColorPicker:cv,ConfigProvider:Qg,Container:uv,DatePicker:Ov,Dialog:Bv,Divider:zv,Dropdown:Uv,Exception:_d,FixedNavbar:jv,Form:Xv,InfoBox:Jv,Input:Ma,Link:Qv,Loading:ka,Menu:t4,Message:c4,Modal:ol,Navigation:u4,Notify:f4,OverflowTitle:Mp,Pagination:k2,PopConfirm:_4,Popover:Cn,Popover2:S4,Process:T4,Progress:Ho,Radio:cu,Rate:A4,ResizeLayout:$4,SearchSelect:R4,Select:D2,Sideslider:H4,Slider:B4,Steps:U4,Swiper:j4,Switcher:W4,Tab:X4,Table:d5,Tag:Mo,TagInput:b5,TimePicker:w5,Timeline:C5,Transfer:N5,Tree:A5,Upload:D5,VirtualRender:cl,scrollbar:$2},Symbol.toStringTag,{value:"Module"})),qm=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(g0).forEach(s=>{const o=g0[s];"install"in o?t.use(o,{prefix:r}):t.component(r+s,g0[s])}),n&&Eh(n,t)},iJ={createInstall:qm,install:qm()},oJ=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:md},Symbol.toStringTag,{value:"Module"})),k5="2.0.1-beta.107";window.__bkui_vue_version__=k5;exports.$bkPopover=md;exports.Affix=ep;exports.Alert=np;exports.AnimateNumber=rp;exports.Backtop=ap;exports.Badge=sp;exports.Breadcrumb=op;exports.Button=Ht;exports.Card=Rp;exports.Cascader=Yp;exports.Checkbox=on;exports.CodeDiff=rv;exports.Collapse=sv;exports.ColorPicker=cv;exports.ConfigProvider=Qg;exports.Container=uv;exports.DatePicker=Ov;exports.Dialog=Bv;exports.Divider=zv;exports.Dropdown=Uv;exports.Exception=_d;exports.FixedNavbar=jv;exports.Form=Xv;exports.InfoBox=Jv;exports.Input=Ma;exports.Link=Qv;exports.Loading=ka;exports.Menu=t4;exports.Message=c4;exports.Modal=ol;exports.Navigation=u4;exports.Notify=f4;exports.OverflowTitle=Mp;exports.Pagination=k2;exports.PopConfirm=_4;exports.Popover=Cn;exports.Popover2=S4;exports.Process=T4;exports.Progress=Ho;exports.Radio=cu;exports.Rate=A4;exports.ResizeLayout=$4;exports.SearchSelect=R4;exports.Select=D2;exports.Sideslider=H4;exports.Slider=B4;exports.Steps=U4;exports.Swiper=j4;exports.Switcher=W4;exports.Tab=X4;exports.Table=d5;exports.Tag=Mo;exports.TagInput=b5;exports.TimePicker=w5;exports.Timeline=C5;exports.Transfer=N5;exports.Tree=A5;exports.Upload=D5;exports.VirtualRender=cl;exports.bkEllipsis=Ok;exports.bkEllipsisInstance=f2;exports.bkLoading=cp;exports.bkTooltips=Rr;exports.clickoutside=Ir;exports.default=iJ;exports.defaultRootConfig=bs;exports.mousewheel=Bk;exports.overflowTitle=Xk;exports.plugins=oJ;exports.provideGlobalConfig=Eh;exports.rootProviderKey=hi;exports.scrollbar=$2;exports.setPrefixVariable=C0;exports.useGlobalConfig=S$;exports.useLocale=dt;exports.usePrefix=_e;exports.version=k5;
|