bkui-vue 0.0.3-beta.2-3 → 0.0.3-beta.2-5
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 +33 -13
- package/dist/index.umd.js +1 -1
- package/lib/table/components/table-column.d.ts +1 -0
- package/lib/table/index.d.ts +16 -0
- package/lib/table/index.js +39 -9
- package/lib/table/plugins/head-sort.d.ts +7 -0
- package/lib/table/props.d.ts +10 -0
- package/lib/table/table.d.ts +7 -0
- package/lib/table/use-column.d.ts +3 -0
- package/lib/table/utils.d.ts +3 -3
- package/lib/table-column/index.d.ts +3 -0
- package/lib/table-column/index.js +7 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
@@ -45,7 +45,7 @@ ${os(n)}`),a}})}function Pm(e){const t=Object.keys(e),n=t.filter(s=>{var r;retur
|
|
45
45
|
m 0 ${N?"":"-"}${v}
|
46
46
|
a ${v} ${v} 0 1 1 0 ${N?"-":""}${v*2}
|
47
47
|
a ${v} ${v} 0 1 1 0 ${N?"":"-"}${v*2}
|
48
|
-
`,D={d:L,stroke:f||"#f5f5f5","stroke-linecap":d,"stroke-width":m,"fill-opacity":"0",class:"process-circle-trail",style:M},T={d:L,stroke:l||"#13ce66","stroke-linecap":d,"stroke-width":r>0&&m||0,"fill-opacity":"0",class:`process-circle-path ${a(`${c}-circle-trail`)}`,style:S};return i.createVNode("div",{class:"progress-outer-circle",style:C},[i.createVNode("svg",{viewBox:"0 0 100 100"},[i.createVNode("path",D,null),i.createVNode("path",T,null)]),i.createVNode("span",{class:"progress-circle-text",style:h},[n==null?void 0:n.default()])])},Uv=(e,{attrs:t,slots:n})=>{const{resolveClassName:a}=le(),{percent:s,strokeWidth:r,size:o,color:l,titleStyle:d,showText:c,textInside:u,theme:f}=t,h={height:`${r}px`,lineHeight:`${r}px`},m={width:`${s}%`,background:l,animationDuration:"3s"},p=(C=!0)=>(c||n.default)&&(C&&u||!C&&!u)?n==null?void 0:n.default():null;return i.createVNode("div",{class:"progress-outer"},[i.createVNode("div",{class:`${a(`progress-${o||"normal"}`)} progress-bar`,style:h},[i.createVNode("div",{style:m,class:{"progress-inner":!0,[`${a(`${f}`)}`]:!0}},[i.createVNode("div",{class:"inner-text",style:d},[p()])])]),p(!1)])};function eh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const Kv={extCls:g.string,type:$m(),percent:g.number.def(0),theme:g.theme().def(cs.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:Qm(),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},ki=Le(i.defineComponent({name:"Progress",props:Kv,setup(){const{resolveClassName:e}=le();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:a,titleStyle:s,fixed:r}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(r));return(e||this.$slots.default)&&a?this.$slots.default?this.$slots.default():i.createVNode("span",null,[o]):!e||a?null:i.createVNode("span",{class:"progress-text",style:typeof o=="string"?s:void 0},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=i.createVNode(Uv,t,eh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=i.createVNode(Yv,t,eh(e)?e:{default:()=>[e]}));const a={class:we({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return i.createVNode("div",a,[n])}})),th=Symbol("RadioGroup");function nh(){const e=i.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const ah=()=>{const e=i.getCurrentInstance(),{props:t,emit:n}=e,a=i.inject(th,Xd),s=!qd(a),r=i.ref(!1),o=i.ref("default"),l=i.computed(()=>s&&a.props.disabled?!0:t.disabled);s?(o.value=a.props.size,i.watch(()=>a.props.modelValue,u=>{r.value=u===t.label},{immediate:!0})):i.watch(()=>t.modelValue,u=>{u!==""&&(r.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{r.value=u},c=u=>{if(l.value)return;const f=u.target;r.value=f.checked;const h=r.value?t.label:"";n("update:modelValue",h),n("change",h),s&&a.handleChange(e.proxy),i.nextTick(()=>{f.checked!==r.value&&(f.checked=r.value)})};return i.onMounted(()=>{s&&a.register(e.proxy)}),i.onBeforeUnmount(()=>{s&&a.unregister(e.proxy)}),{size:o,isChecked:r,isDisabled:l,setChecked:d,handleChange:c}},Xv={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)},qv=i.defineComponent({name:"Radio",props:Xv,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=nh(),{size:a,isChecked:s,isDisabled:r,setChecked:o,handleChange:l}=ah(),{resolveClassName:d}=le();return{size:a,isFocused:e,isChecked:s,isDisabled:r,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:d}},render(){const e=we({[`${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:i.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return i.createVNode("label",{class:e,tabindex:"0"},[i.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),eN={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()},tN=i.defineComponent({name:"RadioButton",props:eN,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=nh(),{size:a,isChecked:s,isDisabled:r,setChecked:o,handleChange:l}=ah(),{resolveClassName:d}=le();return{isFocused:e,size:a,isChecked:s,isDisabled:r,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:d}},render(){const e=we({[`${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:i.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return i.createVNode("label",{class:e,tabindex:"0"},[i.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),nN={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0),type:g.oneOf(["tab","capsule","card"]).def("tab"),size:g.size()},mr=qe(qv,{Group:i.defineComponent({name:"RadioGroup",props:nN,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=kt(),a=[],s=d=>{a.push(d)},r=d=>{const c=a.indexOf(d);c>-1&&a.splice(c,1)},o=d=>{const c=d.label;a.forEach(u=>{u!==d&&u.setChecked(!1)}),t.emit("update:modelValue",c),t.emit("change",c)};i.provide(th,{props:e,register:s,unregister:r,handleChange:o}),i.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),i.onMounted(()=>{e.modelValue!==""&&a.forEach(d=>{d.setChecked(d.label===e.modelValue)})});const{resolveClassName:l}=le();return{resolveClassName:l}},render(){var e;return i.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:tN}),pr=i.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(16),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=c=>{if(!e.editable)return;const u=c+1;t("chooseRate",u)},a=(c,u)=>{if(!e.editable)return;const f=c+1;t("changeHover",f),i.nextTick(()=>{u.target.classList.add(r("is-hover"))})},s=c=>{e.editable&&i.nextTick(()=>{c.target.classList.remove(r("is-hover"))})},{resolveClassName:r}=le(),o=c=>we({[`${r("is-select")}`]:c<Math.floor(l.value),[`${r("is-edit")}`]:e.editable,[`${r("rate-star")}`]:!0}),l=i.computed(()=>e.hoverRate||e.rate),d={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>i.createVNode("p",{class:`${r("rate-stars")}`},[Array(e.max).fill(1).map((c,u)=>i.createVNode("svg",{class:o(u),style:d,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:f=>a(u,f),onMouseleave:f=>s(f)},[i.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[i.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[i.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[i.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[i.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)])])])])]))])}}),aN=i.defineComponent({name:"Rate",components:{star:pr},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=kt(),s=i.ref(0),r=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=we({[`${n("rate")}`]:!0}),c={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},u=i.computed(()=>{const h=Math.floor(e.modelValue),m=(c.width+3)*h,p=c.width*(e.modelValue-h);return{width:`${m+p}px`}}),f={width:c.width,height:c.height};return i.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=a==null?void 0:a.validate)==null||h.call(a,"change"))}),()=>i.createVNode("p",{class:l},[e.editable?i.createVNode(pr,i.mergeProps({rate:e.modelValue,"hover-rate":s.value,onChooseRate:r,onChangeHover:o,onMouseleave:()=>o(0)},f),null):[i.createVNode(pr,i.mergeProps({rate:5,style:u.value,class:`${n("score-real")}`,editable:!1},f),null),i.createVNode(pr,i.mergeProps({rate:0,editable:!1},f),null)]])}}),ih=Le(aN),iN=i.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:a,loopTime:s,pics:r,list:o,height:l,width:d}=i.toRefs(e),c=i.ref(),u=i.ref(0),f=i.ref(0),h=i.ref(0),m=i.ref(0);let p;const{resolveClassName:C}=le(),v=i.computed(()=>{var j;return((j=o.value)==null?void 0:j.length)>0?o.value:r.value}),N=i.computed(()=>({width:`${f.value*v.value.length}px`,transform:`translateX(-${f.value*u.value}px)`})),I=i.computed(()=>({width:`${f.value}px`,height:`${h.value}px`})),y=j=>{let x=j;j>=v.value.length&&(x=0),j<0&&(x=v.value.length-1),u.value=x,t("index-change",x)},b=j=>{j&&window.open(j,"_blank")},w=j=>[`${C("swiper-img")}`,{[`${C("swiper-link")}`]:j.link},j.class],M=j=>({"background-image":`url(${j.url})`,"background-color":j.color}),S=j=>({[`${C("current-index")}`]:u.value===j}),L=()=>{a.value&&(m.value=window.setTimeout(()=>{y(u.value+1),L()},s.value))},D=()=>{window.clearTimeout(m.value)},T=()=>{var x;const j=(x=c.value)==null?void 0:x.parentElement;!j||!window.ResizeObserver||(p=new ResizeObserver(()=>{J()}),p.observe(j))},E=()=>{var j;(j=p.disconnect)==null||j.call(p)},P=j=>{if(j===void 0)return{height:0,width:0};const x=getComputedStyle(j),$=j.clientWidth-parseFloat(x.paddingTop)-parseFloat(x.paddingBottom);return{height:j.clientHeight-parseFloat(x.paddingLeft)-parseFloat(x.paddingRight),width:$}},J=()=>{var x;const j=P((x=c.value)==null?void 0:x.parentElement);f.value=+d.value>0?d.value:j.width,h.value=+l.value>0?l.value:j.height};return i.watch([l,d],J),i.onMounted(()=>{J(),L(),T()}),i.onBeforeUnmount(()=>{D(),E()}),()=>i.createVNode("section",{class:`${C("swiper-home")}`,ref:c,style:I.value},[i.createVNode("hgroup",{style:N.value,class:`${C("transition")} ${C("swiper-main")}`},[v.value.map(j=>{var x;return i.createVNode("h3",{class:`${C("swiper-card")}`,style:I.value},[((x=n.default)==null?void 0:x.call(n,j))??i.createVNode("span",{class:w(j),style:M(j),onClick:()=>b(j.link)},null)])})]),i.createVNode("ul",{class:`${C("swiper-index")}`},[v.value.map((j,x)=>i.createVNode("li",{class:S(x),onMouseover:()=>y(x)},null))]),i.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-prev")}`,onClick:()=>y(u.value-1)},[i.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)]),i.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-next")}`,onClick:()=>y(u.value+1)},[i.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)])])}}),sh=Le(iN);var sN="__lodash_hash_undefined__";function rN(e){return this.__data__.set(e,sN),this}var oN=rN;function lN(e){return this.__data__.has(e)}var cN=lN,dN=jo,uN=oN,fN=cN;function yr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new dN;++t<n;)this.add(e[t])}yr.prototype.add=yr.prototype.push=uN,yr.prototype.has=fN;var hN=yr;function gN(e,t){for(var n=-1,a=e==null?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}var mN=gN;function pN(e,t){return e.has(t)}var yN=pN,bN=hN,CN=mN,vN=yN,NN=1,wN=2;function MN(e,t,n,a,s,r){var o=n&NN,l=e.length,d=t.length;if(l!=d&&!(o&&d>l))return!1;var c=r.get(e),u=r.get(t);if(c&&u)return c==t&&u==e;var f=-1,h=!0,m=n&wN?new bN:void 0;for(r.set(e,t),r.set(t,e);++f<l;){var p=e[f],C=t[f];if(a)var v=o?a(C,p,f,t,e,r):a(p,C,f,e,t,r);if(v!==void 0){if(v)continue;h=!1;break}if(m){if(!CN(t,function(N,I){if(!vN(m,I)&&(p===N||s(p,N,n,a,r)))return m.push(I)})){h=!1;break}}else if(!(p===C||s(p,C,n,a,r))){h=!1;break}}return r.delete(e),r.delete(t),h}var rh=MN;function IN(e){var t=-1,n=Array(e.size);return e.forEach(function(a,s){n[++t]=[s,a]}),n}var LN=IN;function TN(e){var t=-1,n=Array(e.size);return e.forEach(function(a){n[++t]=a}),n}var SN=TN,oh=Ui,lh=lu,kN=oi,xN=rh,DN=LN,jN=SN,ON=1,EN=2,PN="[object Boolean]",AN="[object Date]",zN="[object Error]",VN="[object Map]",JN="[object Number]",RN="[object RegExp]",QN="[object Set]",$N="[object String]",_N="[object Symbol]",HN="[object ArrayBuffer]",WN="[object DataView]",ch=oh?oh.prototype:void 0,Rl=ch?ch.valueOf:void 0;function FN(e,t,n,a,s,r,o){switch(n){case WN:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case HN:return!(e.byteLength!=t.byteLength||!r(new lh(e),new lh(t)));case PN:case AN:case JN:return kN(+e,+t);case zN:return e.name==t.name&&e.message==t.message;case RN:case $N:return e==t+"";case VN:var l=DN;case QN:var d=a&ON;if(l||(l=jN),e.size!=t.size&&!d)return!1;var c=o.get(e);if(c)return c==t;a|=EN,o.set(e,t);var u=xN(l(e),l(t),a,s,r,o);return o.delete(e),u;case _N:if(Rl)return Rl.call(e)==Rl.call(t)}return!1}var BN=FN;function GN(e,t){for(var n=-1,a=t.length,s=e.length;++n<a;)e[s+n]=t[n];return e}var ZN=GN,YN=ZN,UN=sn;function KN(e,t,n){var a=t(e);return UN(e)?a:YN(a,n(e))}var XN=KN;function qN(e,t){for(var n=-1,a=e==null?0:e.length,s=0,r=[];++n<a;){var o=e[n];t(o,n,e)&&(r[s++]=o)}return r}var ew=qN;function tw(){return[]}var nw=tw,aw=ew,iw=nw,sw=Object.prototype,rw=sw.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,ow=dh?function(e){return e==null?[]:(e=Object(e),aw(dh(e),function(t){return rw.call(e,t)}))}:iw,lw=ow,cw=uu,dw=cw(Object.keys,Object),uw=dw,fw=Cs,hw=uw,gw=Object.prototype,mw=gw.hasOwnProperty;function pw(e){if(!fw(e))return hw(e);var t=[];for(var n in Object(e))mw.call(e,n)&&n!="constructor"&&t.push(n);return t}var uh=pw,yw=Iu,bw=uh,Cw=li;function vw(e){return Cw(e)?yw(e):bw(e)}var Nw=vw,ww=XN,Mw=lw,Iw=Nw;function Lw(e){return ww(e,Iw,Mw)}var Tw=Lw,fh=Tw,Sw=1,kw=Object.prototype,xw=kw.hasOwnProperty;function Dw(e,t,n,a,s,r){var o=n&Sw,l=fh(e),d=l.length,c=fh(t),u=c.length;if(d!=u&&!o)return!1;for(var f=d;f--;){var h=l[f];if(!(o?h in t:xw.call(t,h)))return!1}var m=r.get(e),p=r.get(t);if(m&&p)return m==t&&p==e;var C=!0;r.set(e,t),r.set(t,e);for(var v=o;++f<d;){h=l[f];var N=e[h],I=t[h];if(a)var y=o?a(I,N,h,t,e,r):a(N,I,h,e,t,r);if(!(y===void 0?N===I||s(N,I,n,a,r):y)){C=!1;break}v||(v=h=="constructor")}if(C&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof w=="function"&&w instanceof w)&&(C=!1)}return r.delete(e),r.delete(t),C}var jw=Dw,Ow=$n,Ew=xt,Pw=Ow(Ew,"DataView"),Aw=Pw,zw=$n,Vw=xt,Jw=zw(Vw,"Promise"),Rw=Jw,Qw=$n,$w=xt,_w=Qw($w,"Set"),Hw=_w,Ww=$n,Fw=xt,Bw=Ww(Fw,"WeakMap"),Gw=Bw,Ql=Aw,$l=Do,_l=Rw,Hl=Hw,Wl=Gw,hh=tn,Pa=tu,gh="[object Map]",Zw="[object Object]",mh="[object Promise]",ph="[object Set]",yh="[object WeakMap]",bh="[object DataView]",Yw=Pa(Ql),Uw=Pa($l),Kw=Pa(_l),Xw=Pa(Hl),qw=Pa(Wl),Kn=hh;(Ql&&Kn(new Ql(new ArrayBuffer(1)))!=bh||$l&&Kn(new $l)!=gh||_l&&Kn(_l.resolve())!=mh||Hl&&Kn(new Hl)!=ph||Wl&&Kn(new Wl)!=yh)&&(Kn=function(e){var t=hh(e),n=t==Zw?e.constructor:void 0,a=n?Pa(n):"";if(a)switch(a){case Yw:return bh;case Uw:return gh;case Kw:return mh;case Xw:return ph;case qw:return yh}return t});var Ch=Kn,Fl=iu,eM=rh,tM=BN,nM=jw,vh=Ch,Nh=sn,wh=Ns,aM=Ms,iM=1,Mh="[object Arguments]",Ih="[object Array]",br="[object Object]",sM=Object.prototype,Lh=sM.hasOwnProperty;function rM(e,t,n,a,s,r){var o=Nh(e),l=Nh(t),d=o?Ih:vh(e),c=l?Ih:vh(t);d=d==Mh?br:d,c=c==Mh?br:c;var u=d==br,f=c==br,h=d==c;if(h&&wh(e)){if(!wh(t))return!1;o=!0,u=!1}if(h&&!u)return r||(r=new Fl),o||aM(e)?eM(e,t,n,a,s,r):tM(e,t,d,n,a,s,r);if(!(n&iM)){var m=u&&Lh.call(e,"__wrapped__"),p=f&&Lh.call(t,"__wrapped__");if(m||p){var C=m?e.value():e,v=p?t.value():t;return r||(r=new Fl),s(C,v,n,a,r)}}return h?(r||(r=new Fl),nM(e,t,n,a,s,r)):!1}var oM=rM,lM=oM,Th=Dt;function Sh(e,t,n,a,s){return e===t?!0:e==null||t==null||!Th(e)&&!Th(t)?e!==e&&t!==t:lM(e,t,n,a,Sh,s)}var cM=Sh,dM=cM;function uM(e,t){return dM(e,t)}var fM=uM;const Bl=Xe(fM),Cr=Symbol("BkSelect"),kh=Symbol("BkOptionGroup");function xh(){const e=i.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Gl(e){return{register:(a,s)=>{if(s&&!e.value.has(a))return e.value.set(a,s)},unregister:a=>{e.value.delete(a)}}}function Dh(e,t=200){let n,a=e;return i.customRef((s,r)=>({get(){return s(),a},set(o){clearTimeout(n),o===void 0||o===""?(a=o,r()):n=setTimeout(()=>{a=o,r()},t)}}))}function hM(e,t){const{popoverMinWidth:n}=e;let a=null;const s=i.ref("auto"),r=i.ref(!1),o=()=>{r.value=!r.value},l=()=>{r.value=!1},d=()=>{r.value=!0},c=()=>{var u;s.value=Math.max((u=t.value)==null?void 0:u.offsetWidth,n)};return i.onMounted(()=>{t.value&&(a=ig(t.value,c,60,!0),a.start())}),i.onBeforeUnmount(()=>{a==null||a.stop(),a=null}),{isPopoverShow:r,popperWidth:s,togglePopover:o,hidePopover:l,showPopover:d}}function gM(e,t){const n=Dh(""),a=Dh(""),s=i.computed(()=>a.value||n.value),r=i.ref(!1);return i.watch(s,async()=>{try{r.value=!0,await e(s.value),r.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{customOptionName:n,searchValue:a,curSearchValue:s,searchLoading:r}}function Aa(e=""){return e&&String(e).trim().toLowerCase()}function mM(e,t){if(!e||!t)return!0;const{top:n,bottom:a}=e.getBoundingClientRect(),{top:s,bottom:r}=t.getBoundingClientRect();return n>=s&&a<=r}const xi=i.defineComponent({name:"Option",props:{id:{type:[String,Number,Object],require:!0},name:g.oneOfType([g.number,g.string]),disabled:g.bool.def(!1),order:g.number.def(0)},setup(e,{attrs:t}){const{proxy:n}=i.getCurrentInstance(),a=i.reactive({visible:!0}),{disabled:s,id:r,name:o}=i.toRefs(e),l=i.computed(()=>o.value!==void 0?o.value:t.label),d=i.computed(()=>r.value!==void 0?r.value:t.value),c=i.inject(Cr,null),u=i.inject(kh,null),f=i.computed(()=>{var M;return(M=c==null?void 0:c.selected)==null?void 0:M.some(S=>Bl(S.value,d.value))}),h=i.computed(()=>c==null?void 0:c.multiple),m=i.computed(()=>(c==null?void 0:c.activeOptionValue)===d.value),p=i.computed(()=>(c==null?void 0:c.showSelectedIcon)&&h.value),C=i.computed(()=>c==null?void 0:c.selectedStyle),v=i.computed(()=>c==null?void 0:c.isShowAll),N=i.computed(()=>c==null?void 0:c.allOptionId),I=i.computed(()=>{var S;if(!v.value||d.value===N.value)return s.value;const M=(S=c==null?void 0:c.selected)==null?void 0:S.some(L=>Bl(L.value,N.value));return s.value||v.value&&M}),y=()=>{I.value||(v.value&&N.value===d.value?c==null||c.handleToggleAll():c==null||c.handleOptionSelected(n))},b=()=>{c.activeOptionValue=d.value};i.onBeforeMount(()=>{c==null||c.register(d.value,n),u==null||u.register(d.value,n)}),i.onBeforeUnmount(()=>{c==null||c.unregister(d.value),u==null||u.unregister(d.value)});const{resolveClassName:w}=le();return{...i.toRefs(a),selected:f,multiple:h,isHover:m,showSelectedIcon:p,selectedStyle:C,optionName:l,optionID:d,isDisabled:I,handleOptionClick:y,handleMouseEnter:b,resolveClassName:w}},render(){var t,n;const e=we({"is-selected":this.selected,"is-disabled":this.isDisabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===fs.CHECKBOX,[this.resolveClassName("select-option")]:!0});return i.withDirectives(i.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[this.showSelectedIcon&&this.selectedStyle===fs.CHECKBOX&&i.createVNode(dt,{disabled:this.isDisabled,class:this.resolveClassName("select-checkbox"),modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??i.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===fs.CHECK&&i.createVNode(Wn,{class:this.resolveClassName("select-selected-icon"),width:22,height:22},null)]),[[i.vShow,this.visible]])}}),pM=i.defineComponent({name:"OptionGroup",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=i.getCurrentInstance(),{proxy:a}=n,s=i.inject(Cr,null),r=i.reactive({groupCollapse:e.collapse,visible:!0}),o=i.ref(new Map),{register:l,unregister:d}=Gl(o),c=i.computed(()=>`${e.label} (${[...o.value.values()].filter(h=>h.visible).length})`),u=()=>{!e.collapsible||e.disabled||(r.groupCollapse=!r.groupCollapse,t("update:collapse",r.groupCollapse))};i.provide(kh,i.reactive({...i.toRefs(e),register:l,unregister:d,groupCollapse:i.toRef(r,"groupCollapse")})),i.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,a)}),i.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:f}=le();return{...i.toRefs(r),groupLabel:c,handleToggleCollapse:u,resolveClassName:f}},render(){var a,s;const e=we({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=we({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=we({"default-group-label-icon":!0,collapse:this.groupCollapse});return i.withDirectives(i.createVNode("ul",{class:e},[i.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():i.createVNode("span",{class:"default-group-label"},[this.collapsible&&i.createVNode(ui,{class:n},null),i.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),i.withDirectives(i.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(a=this.$slots).default)==null?void 0:s.call(a)]),[[i.vShow,!this.groupCollapse]])]),[[i.vShow,this.visible]])}}),yM={onContentScroll:Function},bM={list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),maxHeight:g.number,height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Cn("F-scroll-x")),scrollYName:g.string.def(Cn("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60),rowKey:g.string.def(void 0),keepAlive:g.bool.def(!1),autoReset:g.bool.def(!0),wrapperStyle:g.any.def({}),...yM},jh=(e,t)=>{const n=(s={left:0,top:0})=>{const{left:r,top:o}=s;t.value.scrollTo(r,o)};return{fixToTop:s=>{const{id:r,index:o,item:l}=s;let d=typeof o=="number"?o-1:0;if(r!==void 0&&(d=e.list.findIndex(c=>c[e.rowKey]===r)??d),l!==void 0&&(d=e.list.findIndex(c=>l[e.rowKey]===c[e.rowKey])??d),typeof d=="number"){const u=(d>=0?d:0)*e.lineHeight;n({left:0,top:u})}},scrollTo:n}};function Oh(e,t,n,a){let s=0,r=0,o=0,l=0;for(;s<e;s++){if(l=a(s,[s*n,(s+1)*n,"virtual"]),r+l>t){o=t-r;break}r+=l}return{startIndex:s,height:r,diffHeight:o}}function Eh(e,t,n,a,s){if(!s.target)return;const r=s.target.scrollTop,o=s.target.scrollLeft,l=s.target.scrollHeight,d=s.target.offsetHeight,{count:c,groupItemCount:u}=n;let f=0,h=0,m=0;if(typeof e=="number"&&(f=Math.floor(r/e),h=Math.ceil(d/e)+f,m=r%e),typeof e=="function"){const C=Oh(c,r,u,e);f=C.startIndex>0?C.startIndex:0,m=C.diffHeight,h=Oh(c,d,u,e).startIndex+f}const p=l-d-r;return typeof t=="function"&&t(s,f,h,r,m,o,{bottom:p>=0?p:0}),{targetStartIndex:f,targetEndIndex:h,elScrollTop:r,translateY:m,elScrollLeft:o}}class Zl{constructor(t,n){ye(this,"binding");ye(this,"wrapper");ye(this,"delay");this.binding=t,this.wrapper=n;const{throttleDelay:a}=t.value;this.delay=a}render(t){const{lineHeight:n=30,handleScrollCallback:a,pagination:s={},onlyScroll:r}=this.binding.value;if(r){const h=this.wrapper.scrollTop,m=this.wrapper.scrollLeft,p=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;a(t,null,null,h,h,m,{bottom:p>=0?p:0});return}const{startIndex:o,endIndex:l,groupItemCount:d,count:c,scrollTop:u,scrollLeft:f}=s;Eh(n,a,{scrollTop:u,startIndex:o,endIndex:l,groupItemCount:d,count:c,scrollLeft:f},this.wrapper,t)}executeThrottledRender(t){la(this.render.bind(this),this.delay)(t)}install(){var t;(t=this.wrapper)==null||t.addEventListener("scroll",this.executeThrottledRender.bind(this))}uninstall(){var t,n;(n=(t=this.wrapper)==null?void 0:t.removeListener)==null||n.call(t,"scroll",this.executeThrottledRender.bind(this))}setBinding(t){this.binding=t}}let Sn=null;const CM={mounted(e,t){const n=e.parentNode;Sn=new Zl(t,e),n.addEventListener("scroll",Sn.executeThrottledRender.bind(Sn))},updated(e,t){Sn==null||Sn.setBinding(t)},unbind(e){if(e){const t=e.parentNode;if(!t||!Sn)return;t.removeEventListener("scroll",Sn.executeThrottledRender)}}},vM=(e,t)=>{const{renderAs:n,contentAs:a}=e,s=(f,h,m,p,C,v,N)=>{t.emit("content-scroll",[f,{translateY:C,translateX:v,pos:N}])};let r=null;const o=i.computed(()=>({lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent})),l=i.ref(null),d=i.computed(()=>{const f=typeof e.height=="number"?`${e.height}px`:e.height;return{height:f,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??f,...e.wrapperStyle}}),{scrollTo:c,fixToTop:u}=jh(e,l);return t.expose({scrollTo:c,fixToTop:u}),i.onMounted(()=>{r=new Zl(o,l.value),r.install()}),i.onUnmounted(()=>{r==null||r.uninstall()}),{rendAsTag:()=>{var f,h,m,p,C,v,N,I;return i.h(n,{class:e.className,style:d.value,ref:l},[((h=(f=t.slots).beforeContent)==null?void 0:h.call(f))??"",i.h(a,{class:e.contentClassName,style:e.contentStyle},[((p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))??""]),((v=(C=t.slots).afterContent)==null?void 0:v.call(C))??"",((I=(N=t.slots).afterSection)==null?void 0:I.call(N))??""])}}},za=Le(i.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:CM},props:bM,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n,contentAs:a}=e,s=T=>typeof T=="string"?[T]:typeof T=="object"&&!Array.isArray(T)?[T]:T;if(!e.enabled){const{rendAsTag:T}=vM(e,t);return T}const r=i.computed(()=>({lineHeight:e.lineHeight,handleScrollCallback:u,pagination:d,throttleDelay:e.throttleDelay})),o=i.ref(null);let l=null;const d=i.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),c=i.ref([]),u=(T,E,P,J,j,x,$)=>{Object.assign(d,{startIndex:E,endIndex:P,scrollTop:J,translateX:x,translateY:j,scrollLeft:x,pos:$});let U=d.startIndex*e.groupItemCount,Y=(d.endIndex+e.preloadItemCount)*e.groupItemCount;const oe=v.value.length;if(oe<Y){const te=Y-U;c.value=v.value.slice(U,oe),Y=oe+1,U=Y-te,U=U<0?0:U}const F=v.value.slice(U,Y+10);c.value=F,T&&t.emit("content-scroll",[T,d])};i.onMounted(()=>{l=new Zl(r,o.value),l.install()}),i.onUnmounted(()=>{l==null||l.uninstall()});const f=()=>{p(e.list)},h=i.ref(0),m=i.ref(0),p=T=>{if(h.value=Math.ceil((T||[]).length/e.groupItemCount),d.count=h.value,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let P=0;for(let J=0;J<h.value;J++){const j=e.lineHeight.call(this,J,T.slice(J*e.groupItemCount,e.groupItemCount));P+=typeof j=="number"?j:0}m.value=P}else m.value=e.lineHeight*h.value;else m.value=e.abosuteHeight},C=(T={left:0,top:0})=>{const E=o.value;i.nextTick(()=>{Eh(e.lineHeight,u,d,E,{target:E})})},v=i.computed(()=>e.rowKey!==void 0?e.list:(e.list||[]).map((T,E)=>({...T,$index:E}))),N=i.computed(()=>e.scrollPosition==="content"?{top:`${d.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${d.translateY}px)`}:{}),I=i.computed(()=>{const T=typeof e.height=="number"?`${e.height}px`:e.height;return{height:T,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??T,...e.scrollPosition==="container"?N.value:{},...e.wrapperStyle}}),y=i.computed(()=>{const T=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:T?"none":"block"}}),{resolveClassName:b}=le(),w=i.computed(()=>[b("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?b("virtual-content"):""]),M=i.computed(()=>[e.scrollPosition==="content"?b("virtual-content"):"",...s(e.contentClassName)]),S=()=>{f(),C()},{scrollTo:L,fixToTop:D}=jh(e,o);return i.watch(()=>[e.lineHeight,e.height,e.list,e.maxHeight],()=>{l==null||l.setBinding(r),f(),i.nextTick(()=>{C()})},{deep:!0,immediate:!0}),t.expose({reset:S,scrollTo:L,fixToTop:D}),()=>{var T,E,P,J,j,x,$,A;return i.h(n||"div",{ref:o,class:w.value,style:I.value},[((E=(T=t.slots).beforeContent)==null?void 0:E.call(T))??"",i.h(a||"div",{class:M.value,style:{...N.value,...e.contentStyle}},[((J=(P=t.slots).default)==null?void 0:J.call(P,{data:c.value}))??""]),((x=(j=t.slots).afterContent)==null?void 0:x.call(j))??"",i.h("div",{class:[b("virtual-section")],style:y.value}),((A=($=t.slots).afterSection)==null?void 0:A.call($))??""])}}}));var Ph=function(e){return e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke",e}(Ph||{});const NM=i.defineComponent({name:"Tag",props:{theme:us().def(""),closable:g.bool.def(!1),type:me("tagStorkeType",{}).def(Ph.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),size:g.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=le();return{wrapperStyle:i.computed(()=>({borderRadius:e.radius})),handleClose:o=>{o.preventDefault(),o.stopPropagation(),t("close",o)},handleClick:o=>{o.preventDefault(),o.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var t,n;const e={[this.resolveClassName("tag")]:!0,[this.resolveClassName("tag-closable")]:this.closable,[this.resolveClassName("tag-checkable")]:this.checkable,[this.resolveClassName("tag-check")]:this.checked,[this.resolveClassName(`tag-${this.type}`)]:this.type,[this.resolveClassName(`tag-${this.theme}`)]:this.theme,[this.resolveClassName(`tag--${this.size}`)]:!0};return i.createVNode("div",{class:e,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?i.createVNode("span",{class:`${this.resolveClassName("tag-icon")}`},[this.$slots.icon()]):"",i.createVNode("span",{class:`${this.resolveClassName("tag-text")}`},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),this.closable&&i.createVNode(lt,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),Di=Le(NM),wM=i.defineComponent({name:"SelectTagInput",directives:{bkTooltips:Tn},props:{selected:{type:Array,default:()=>[]},tagTheme:us(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=i.inject(Cr,null),{modelValue:s,collapseTags:r,selected:o}=i.toRefs(e),l=i.ref(s.value),d=i.ref(),c=i.ref(null),u=i.computed(()=>o.value.slice(c.value,o.value.length).map(S=>S.label).join(", "));i.watch(s,()=>{l.value=s.value}),i.watch([o,r],()=>{y()},{flush:"post"});const f=S=>{t("remove",S)},h=()=>{var S;(S=d.value)==null||S.focus()},m=()=>{var S;(S=d.value)==null||S.blur()},p=S=>{t("update:modelValue",S.target.value)},C=S=>{switch(S.code){case"Enter":{t("enter",S.target.value,S);break}}t("keydown",S.target.value,S)},v=i.ref([]),N=i.ref(),I=S=>{const L=v.value.map(D=>D==null?void 0:D.$el).filter(D=>!!D);return typeof S=="number"?L[S]:L},y=()=>{r.value&&(c.value=null,setTimeout(()=>{var D,T;const S=I(),L=S.findIndex((E,P)=>P?S[P-1].offsetTop!==E.offsetTop:!1);c.value=L>0?L:null,((D=S[c.value])==null?void 0:D.offsetTop)!==((T=N.value)==null?void 0:T.offsetTop)&&c.value>1&&(c.value-=1)}))},b=Xi(y,150),w=i.ref(),M=new ResizeObserver(()=>{b()});return i.onMounted(()=>{w.value&&M.observe(w.value)}),i.onBeforeUnmount(()=>{w.value&&M.unobserve(w.value)}),{collapseTagRef:N,tagWrapperRef:w,tagsRefs:v,select:a,overflowTagIndex:c,value:l,inputRef:d,overflowContent:u,handleRemoveTag:f,focus:h,blur:m,handleInput:p,handleKeydown:C,resolveClassName:n}},render(){var s,r,o,l,d,c,u,f;const e=(r=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:r.call(s),t=we({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e}),n=we({[this.resolveClassName("select-tag-wrapper")]:!0}),a={display:this.selected.length&&!this.filterable?"none":""};return i.createVNode("div",{class:t,ref:"tagWrapperRef"},[(l=(o=this.$slots)==null?void 0:o.prefix)==null?void 0:l.call(o),i.createVNode("div",{class:n},[((c=(d=this.$slots).default)==null?void 0:c.call(d))??this.selected.map((h,m)=>i.createVNode(Di,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&m>=this.overflowTagIndex?"none":""},ref:p=>this.tagsRefs[m]=p,onClose:()=>this.handleRemoveTag(h.value)},{default:()=>{var p;return[(p=this.select)==null?void 0:p.handleGetLabelByValue(h.value)]}})),i.withDirectives(i.createVNode(Di,{class:this.resolveClassName("select-overflow-tag"),style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},ref:"collapseTagRef"},{default:()=>[i.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),[[i.resolveDirective("bk-tooltips"),{content:this.overflowContent,disabled:!this.overflowTagIndex||!this.collapseTags}]]),i.createVNode("input",{class:this.resolveClassName("select-tag-input"),ref:"inputRef",type:"text",style:a,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),MM=i.defineComponent({name:"Select",directives:{clickoutside:_t},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Lo.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showAll:g.bool.def(!1),allOptionId:g.oneOfType([g.number,g.string]),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:us(),behavior:Kd(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string,noMatchText:g.string,loadingText:g.string,placeholder:g.string,searchPlaceholder:g.string,selectAllText:g.string,scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:Object,customContent:g.bool.def(!1),list:g.arrayOf(g.any).def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!1),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1),keepSearchValue:g.bool.def(!1),prefix:g.string,selectedStyle:_m(),filterOption:{type:Function}},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur","tag-remove","select","deselect"],setup(e,{emit:t}){const n=je("select"),{resolveClassName:a}=le(),{modelValue:s,disabled:r,filterable:o,multiple:l,remoteMethod:d,loading:c,popoverMinWidth:u,showOnInit:f,multipleMode:h,allowCreate:m,customContent:p,showSelectedIcon:C,inputSearch:v,enableVirtualRender:N,showSelectAll:I,showAll:y,allOptionId:b,scrollHeight:w,list:M,displayKey:S,idKey:L,collapseTags:D,autoHeight:T,popoverOptions:E,allowEmptyValues:P,autoFocus:J,keepSearchValue:j,selectedStyle:x,filterOption:$}=i.toRefs(e),A=i.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),U=i.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),Y=i.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),oe=i.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),F=i.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),te=i.computed(()=>e.selectAllText===void 0?n.value.all:e.selectAllText),z=kt(),W=i.ref(),k=i.ref(),O=i.ref(),Q=i.ref(),B=i.ref(),G=i.ref(),ne=i.ref(),_=i.ref(new Map),R=i.computed(()=>[..._.value.values()].sort((de,ue)=>de.order-ue.order)),V=i.ref(new Map),q=i.ref([]),se=i.computed(()=>q.value.reduce((de,ue)=>(de[ue.value]=ue.label,de),{})),H=i.ref(),ie=i.computed(()=>M.value.reduce((de,ue)=>(de[ue[L.value]]=ue[S.value],de),{}));i.watch([_,M],()=>{Uc()}),i.watch(s,()=>{var de;Uc(),e.withValidate&&((de=z==null?void 0:z.validate)==null||de.call(z,"change"))},{deep:!0}),i.watch(q,()=>{var de;(de=ne.value)==null||de.updatePopover(null,St.value)});const Z=i.computed(()=>ge.value?M.value:M.value.filter(de=>{var ue;return Ne.value?!!$.value(Gc.value,de):(ue=Aa(String(de[S.value])))==null?void 0:ue.includes(Aa(Gc.value))})),K=i.computed(()=>r.value||c.value),X=i.computed(()=>q.value.map(de=>{var ue,Me;return((Me=(ue=_.value)==null?void 0:ue.get(de.value))==null?void 0:Me.optionName)||ie.value[de.value]||de.label})),ae=i.computed(()=>{const de=R.value.reduce((ue,Me)=>(Me.disabled||ue.push(Me.optionID),ue),[]);return de.length<=q.value.length&&de.every(ue=>q.value.some(Me=>Me.value===ue))}),pe=i.computed(()=>!!V.value.size),ee=i.computed(()=>!R.value.length),re=i.computed(()=>R.value.length&&R.value.every(de=>!de.visible)),ge=i.computed(()=>o.value&&typeof d.value=="function"),Ne=i.computed(()=>!!($.value&&typeof $.value=="function")),ve=i.computed(()=>!(Zc.value||ee.value||re.value)||p.value),Ie=i.computed(()=>l.value&&I.value&&(!Gc.value||!o.value)),ke=i.computed(()=>l.value&&y.value),De=i.computed(()=>w.value-12-(Ie.value?32:0)),Oe=i.computed(()=>Zc.value?Y.value:re.value||M.value.length&&!Z.value.length?U.value:ee.value?A.value:""),Ae=i.computed(()=>T.value?D.value&&!ra.value:D.value),St=i.computed(()=>Po({theme:`light ${a("select-popover")}`,trigger:"manual",width:B3.value,arrow:!1,placement:"bottom-start",isShow:ra.value,reference:B.value,offset:4,popoverDelay:0,renderType:ds.AUTO},E.value)),{register:Re,unregister:Ze}=Gl(_),{register:xe,unregister:Pn}=Gl(V),{isHover:Fc,setHover:PD,cancelHover:AD}=xh(),Gi=i.ref(!1),F3=()=>{Gi.value||(Gi.value=!0,t("focus"))},Bc=()=>{Gi.value&&(Gi.value=!1,HD(),t("blur"))},{popperWidth:B3,isPopoverShow:ra,hidePopover:Zi,showPopover:G3,togglePopover:zD}=hM({popoverMinWidth:u.value},k),VD=i.computed(()=>(o.value&&v.value||m.value)&&ra.value);i.watch(ra,de=>{t("toggle",ra.value),de?(document.addEventListener("keydown",U3),setTimeout(()=>{Ba(),Z3(),JD()},10)):(j.value||(Y3.value=""),document.removeEventListener("keydown",U3))});const JD=()=>{var ue,Me,Ke;(Ke=((Me=(ue=O.value)==null?void 0:ue.querySelectorAll)==null?void 0:Me.call(ue,".is-selected"))[0])==null||Ke.scrollIntoView({block:"center",behavior:"smooth"})},Z3=()=>{var Me;const de=q.value[0],ue=_.value.get(de==null?void 0:de.value);ue&&!ue.disabled&&ue.visible?H.value=de==null?void 0:de.value:H.value=(Me=R.value.find(Ke=>!Ke.disabled&&Ke.visible))==null?void 0:Me.optionID},RD=de=>{o.value&&(de?R.value.forEach(ue=>{var Me;Ne.value?ue.visible=!!$.value(de,{...ue.$props,...ue.$attrs}):ue.visible=(Me=Aa(String(ue.optionName)))==null?void 0:Me.includes(Aa(de))}):R.value.forEach(ue=>{ue.visible=!0}))},{searchValue:Y3,customOptionName:Yi,curSearchValue:Gc,searchLoading:Zc}=gM(ge.value?d.value:RD,Z3),en=de=>{de!==s.value&&(t("update:modelValue",de,s.value),t("change",de,s.value))},QD=()=>{K.value||(F3(),zD())},$D=de=>{o.value&&(Yi.value=de)},_D=(de,ue)=>{const Me=String(de);if(!m.value||!Me)return;ue.stopPropagation(),ue.preventDefault();const Ke=R.value.find(Za=>Aa(String(Za.optionName))===Aa(Me));if(o.value&&Ke){oo(Ke),Yi.value="";return}_.value.get(Me)||(l.value?(q.value.push({value:Me,label:Me}),en(q.value.map(Za=>Za.value))):(q.value=[{value:Me,label:Me}],en(Me),Zi()),Yi.value="")},oo=de=>{if(!(K.value||!de))if(l.value){const ue=q.value.findIndex(Me=>Me.value===de.optionID);ue>-1?(q.value.splice(ue,1),en(q.value.map(Me=>Me.value)),t("deselect",de.optionID)):(q.value.push({value:de.optionID,label:de.optionName||de.optionID}),en(q.value.map(Me=>Me.value)),t("select",de.optionID)),Ba()}else q.value=[{label:de.optionName||de.optionID,value:de.optionID}],en(de.optionID),t("select",de.optionID),Zi(),Bc()},Ba=()=>{setTimeout(()=>{var de,ue,Me;!v.value&&!m.value?(de=Q.value)==null||de.focus():h.value==="tag"?(ue=B.value)==null||ue.focus():(Me=W.value)==null||Me.focus()},0)},HD=()=>{setTimeout(()=>{var de,ue;h.value==="tag"?(de=B.value)==null||de.blur():(ue=W.value)==null||ue.blur()},0)},WD=de=>{de.stopPropagation(),q.value=[],en(l.value?[]:""),t("clear",l.value?[]:""),Zi()},FD=()=>{H.value=""},BD=()=>{var de;ae.value?q.value=[]:(R.value.forEach(ue=>{ue.disabled||ue.optionID in se.value||q.value.push({value:ue.optionID,label:ue.optionName||ue.optionID})}),(de=M.value)==null||de.forEach(ue=>{ue.disabled||ue[L.value]in se.value||q.value.push({value:ue[L.value],label:ue[S.value]})})),en(q.value.map(ue=>ue.value)),Ba()},GD=()=>{if(!ke.value)return;q.value.findIndex(ue=>ue.value===b.value)>-1?q.value=[]:q.value=[{value:b.value,label:n.value.all}],en(q.value.map(ue=>ue.value)),Ba()},ZD=de=>{const{scrollTop:ue,clientHeight:Me,scrollHeight:Ke}=de.target;ue+Me===Ke&&t("scroll-end")},YD=de=>{if(K.value)return;const ue=q.value.findIndex(Me=>Me.value===de);ue>-1&&(q.value.splice(ue,1),en(q.value.map(Me=>Me.value)),t("tag-remove",de))},Yc=de=>{var Me,Ke;let ue=de;if(typeof ue=="object"){for(const Ga of _.value.keys())if(Bl(Ga,ue)){ue=Ga;break}}return((Ke=(Me=_.value)==null?void 0:Me.get(ue))==null?void 0:Ke.optionName)||ie.value[ue]||se.value[ue]||ue},Uc=()=>{Array.isArray(s.value)?q.value=[...s.value.map(de=>({value:de,label:Yc(de)}))]:s.value!==void 0||P.value.includes(s.value)?q.value=[{value:s.value,label:Yc(s.value)}]:q.value=[]},U3=de=>{var Ke,Ga,Za,K3;if(!ra.value||N.value)return;const ue=R.value.filter(ht=>!ht.disabled&&ht.visible),Me=ue.findIndex(ht=>ht.optionID===H.value);switch(de.code){case"ArrowUp":case"ArrowDown":{de.preventDefault();let ht=0;de.code==="ArrowDown"?ht=Me>=ue.length-1?0:Me+1:ht=Me===0?ue.length-1:Me-1,mM((Ke=ue[ht])==null?void 0:Ke.$el,O.value)||(Za=(Ga=ue[ht])==null?void 0:Ga.$el)==null||Za.scrollIntoView(),H.value=(K3=ue[ht])==null?void 0:K3.optionID;break}case"Backspace":{if(!l.value||!q.value.length||Yi.value.length||de.target===Q.value)return;q.value.pop(),en(q.value.map(ht=>ht.value));break}case"Enter":{const{value:ht}=de.target;if(m.value&&ht||de.target===Q.value)return;const XD=_.value.get(H.value);oo(XD);break}}},UD=({event:de})=>{var Me;const{target:ue}=de;(Me=k.value)!=null&&Me.contains(ue)||k.value===ue||(Zi(),Bc())},KD=()=>{setTimeout(()=>{var de,ue;N.value&&((ue=(de=G.value)==null?void 0:de.reset)==null||ue.call(de))})};return i.provide(Cr,i.reactive({multiple:l,selected:q,activeOptionValue:H,showSelectedIcon:C,isShowAll:ke,allOptionId:b,selectedStyle:x,register:Re,unregister:Ze,registerGroup:xe,unregisterGroup:Pn,handleOptionSelected:oo,handleGetLabelByValue:Yc,handleToggleAll:GD})),i.onMounted(()=>{Uc(),setTimeout(()=>{f.value&&G3(),J.value&&Ba()})}),{t:n,selected:q,isInput:VD,options:R,isDisabled:K,selectedLabel:X,isPopoverShow:ra,isHover:Fc,popperWidth:B3,inputRef:W,triggerRef:k,contentRef:O,searchRef:Q,selectTagInputRef:B,virtualRenderRef:G,popoverRef:ne,searchLoading:Zc,isOptionsEmpty:ee,isSearchEmpty:re,isFocus:Gi,isShowSelectContent:ve,curContentText:Oe,isGroup:pe,searchValue:Y3,customOptionName:Yi,isShowAll:ke,isShowSelectAll:Ie,virtualHeight:De,virtualList:Z,isCollapseTags:Ae,popoverConfig:St,isAllSelected:ae,focusInput:Ba,setHover:PD,cancelHover:AD,handleFocus:F3,handleBlur:Bc,handleTogglePopover:QD,handleClear:WD,hidePopover:Zi,showPopover:G3,handleToggleSelectAll:BD,handleOptionSelected:oo,handleClickOutside:UD,handleScroll:ZD,handleDeleteTag:YD,handleInputChange:$D,handleSelectedAllOptionMouseEnter:FD,handlePopoverShow:KD,localLoadingText:Y,localPlaceholder:oe,localSearchPlaceholder:F,localSelectAllText:te,resolveClassName:a,handleCreateCustomOption:_D}},render(){const e=we({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?i.createVNode(vn,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?i.createVNode(ot,{class:"clear-icon",onClick:this.handleClear},null):i.createVNode(Hn,{class:"angle-up"},null),n=()=>{var d;return this.prefix?()=>i.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[i.createVNode("span",null,[this.prefix])]):(d=this.$slots)!=null&&d.prefix?()=>{var c,u;return(u=(c=this.$slots)==null?void 0:c.prefix)==null?void 0:u.call(c)}:void 0},a=()=>{if(this.isShowSelectAll)return i.createVNode("li",{class:this.resolveClassName("select-option"),onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleSelectAll},[this.selectedStyle==="checkbox"&&i.createVNode(dt,{class:this.resolveClassName("select-checkbox"),modelValue:this.isAllSelected,indeterminate:!this.isAllSelected&&!!this.selected.length},null),this.t.selectAll])},s=()=>{if(!(this.isShowSelectAll||!this.isShowAll))return i.createVNode(xi,{id:this.allOptionId,name:this.t.all},null)},r=()=>{var d,c;return this.multipleMode==="tag"?i.createVNode(wM,{ref:"selectTagInputRef",modelValue:this.customOptionName,"onUpdate:modelValue":u=>this.customOptionName=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.localPlaceholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleCreateCustomOption},{prefix:n(),default:((d=this.$slots)==null?void 0:d.tag)&&(()=>{var u;return(u=this.$slots)==null?void 0:u.tag({selected:this.selected})}),suffix:()=>t()}):i.createVNode(Un,i.mergeProps({ref:"inputRef",type:"text",modelValue:this.isInput?this.customOptionName:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,stopPropagation:!1,onInput:this.handleInputChange,onEnter:this.handleCreateCustomOption},this.prefix?{prefix:this.prefix}:null),{...typeof((c=this.$slots)==null?void 0:c.prefix)=="function"?{prefix:()=>{var u,f;return(f=(u=this.$slots)==null?void 0:u.prefix)==null?void 0:f.call(u)}}:null,suffix:()=>t()})},o=()=>{var d,c;return i.createVNode("div",{class:this.resolveClassName("select-trigger"),style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((c=(d=this.$slots)==null?void 0:d.trigger)==null?void 0:c.call(d,{selected:this.selected}))||r()])},l=()=>{var d,c,u,f;return i.createVNode("div",{class:this.resolveClassName("select-content-wrapper"),ref:"contentRef"},[this.filterable&&!this.inputSearch&&i.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[i.createVNode(Fn,{class:"icon-search",width:16,height:16},null),i.withDirectives(i.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),placeholder:this.localSearchPlaceholder,"onUpdate:modelValue":h=>this.searchValue=h},null),[[i.vModelText,this.searchValue]])]),!this.isShowSelectContent&&i.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&i.createVNode(vn,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),i.createVNode("span",null,[this.curContentText])]),i.createVNode("div",{class:this.resolveClassName("select-content")},[i.createVNode("div",{class:this.enableVirtualRender?"":this.resolveClassName("select-dropdown"),style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[i.withDirectives(i.createVNode("ul",{class:this.resolveClassName("select-options")},[a(),s(),this.enableVirtualRender?i.createVNode(za,{list:this.virtualList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:h})=>{var p,C;const m=((p=this.$slots)==null?void 0:p.optionRender)||((C=this.$slots)==null?void 0:C.virtualScrollRender);return h.map(v=>i.createVNode(xi,{key:v[this.idKey],id:v[this.idKey],name:v[this.displayKey]},typeof m=="function"?{default:()=>m({item:v})}:null))}}):this.list.map(h=>{var m;return i.createVNode(xi,{id:h[this.idKey],name:h[this.displayKey]},(m=this.$slots)!=null&&m.optionRender?{default:()=>{var p,C;return(C=(p=this.$slots)==null?void 0:p.optionRender)==null?void 0:C.call(p,{item:h})}}:null)}),(c=(d=this.$slots)==null?void 0:d.default)==null?void 0:c.call(d),this.scrollLoading&&i.createVNode("li",{class:this.resolveClassName("select-options-loading")},[i.createVNode(vn,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),i.createVNode("span",null,[this.localLoadingText])])]),[[i.vShow,this.isShowSelectContent]])]),((u=this.$slots)==null?void 0:u.extension)&&i.createVNode("div",{class:this.resolveClassName("select-extension")},[(f=this.$slots)==null?void 0:f.extension()])])])};return i.createVNode("div",{class:e},[i.createVNode(pt,i.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>o(),content:()=>l()})])}}),Yl=qe(MM,{Option:xi,Group:pM});function IM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const{propsMixin:LM}=Si,Ul=Object.assign({},LM);Ul.width.default="400",Ul.height.default="100%";const TM=i.defineComponent({name:"Sideslider",props:{...Ul,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,{slots:t,emit:n}){const a=async()=>{let l=!0;typeof e.beforeClose=="function"&&(l=await e.beforeClose()),l&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},r=()=>{setTimeout(()=>{n("hidden")},200)},{resolveClassName:o}=le();return()=>{const l={header:()=>{var u;return i.createVNode(i.Fragment,null,[i.createVNode("div",{class:`${o("sideslider-header")}`},[i.createVNode("div",{class:`${o("sideslider-close")} ${e.direction}`,onClick:()=>{a()}},null),i.createVNode("div",{class:`${o("sideslider-title")} ${e.direction}`},[((u=t.header)==null?void 0:u.call(t))??e.title])])])},default:()=>{var u;return((u=t.default)==null?void 0:u.call(t))??"Content"},footer:()=>t.footer?i.createVNode("div",{class:`${o("sideslider-footer")}`},[t.footer()]):null},d=`${o("sideslider-wrapper")} ${e.scrollable?"scroll-able":""} ${e.extCls}`,c=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return i.createVNode(Si,i.mergeProps(e,{maxHeight:c,class:d,style:`${e.direction}: 0;`,onHidden:r,onShown:s,onClose:a}),IM(l)?l:{default:()=>[l]})}}}),Ah=Le(TM);var zh=function(e){return e.UNKNOWN="",e.ERROR="error",e.LOADING="loading",e}(zh||{});const Vh={theme:g.theme().def(cs.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:Zd(),status:me("status",{}).def(zh.UNKNOWN),lineType:Yd(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func},Jh=Le(i.defineComponent({name:"Steps",props:Vh,emits:["update:curStep","click"],setup(e,{emit:t}){const n=je("steps"),a=je("lang"),s=i.ref([]),r=u=>{const f=[];u.forEach(h=>{typeof h=="string"?f.push(h):f.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...f)},o=u=>{Vh.curStep=u},l=()=>{var u;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}),(u=e.steps)!=null&&u.length&&r(e.steps)};i.watch(()=>a.value,()=>{l()});const d=async u=>{try{e.controllable&&u!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,h)=>{const m=await e.beforeChange(u);m?f(m):h(m)}),t("update:curStep",u),t("click",u))}catch(f){console.warn(f)}};i.onMounted(l),i.watch(()=>e.steps,()=>{r(e.steps)},{deep:!0}),i.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:c}=le();return{defaultSteps:s,jumpTo:d,resolveClassName:c}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",a=we({[`${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",r=f=>this.curStep===f+1,o=f=>{const{icon:h}=f;return h?Object.prototype.toString.call(h)==="[object Object]":typeof f=="string"},l=(f,h)=>(h.icon||(h.icon=f),!isNaN(h.icon)),d=f=>f.status==="loading",c=f=>f.status==="error",u=(f,h)=>r(f)&&this.status==="loading"||d(h)?i.createVNode(fi,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):r(f)&&this.status==="error"||c(h)?i.createVNode(lt,{class:`${this.resolveClassName("steps-icon")}`},null):s(f)?i.createVNode(Wn,{class:`${this.resolveClassName("steps-icon")}`},null):i.createVNode("span",null,[l(f,h)?f+1:i.createVNode(h.icon,null,null)]);return i.createVNode("div",{class:a},[this.defaultSteps.map((f,h)=>{var m,p;return i.createVNode("div",{class:[this.resolveClassName("step"),f.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",r(h)?"current":"",r(h)&&this.status==="error"?"is-error":"",f.status&&r(h)?[`${this.resolveClassName(`step-${f.status}`)}`]:""]},[i.createVNode("span",{class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(f)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${f.status}`)}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(h+1)}},[((p=(m=this.$slots)[h+1])==null?void 0:p.call(m))??u(h,f)]),f.title?i.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[i.createVNode("div",{class:`${this.resolveClassName("step-title")}`,style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(h+1)}},[f.title]),f.description&&i.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:f.description},[f.description])]):""])})])}})),SM={theme:Rm(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)};let vr=function(e){return e.UPDATE="update:modelValue",e.CHANGE="change",e}({});function kM(e){return e}function xM(e){return!!e}const DM={[vr.UPDATE]:kM,[vr.CHANGE]:xM},Rh=Le(i.defineComponent({name:"Switcher",props:SM,emits:DM,setup(e,{emit:t}){const n=kt(),{resolveClassName:a}=le(),s=i.ref(!1),r=i.computed(()=>e.trueValue===l.value),o=i.ref(e.modelValue!==!1),l=i.computed(()=>o.value?e.modelValue:e.value),d=i.computed(()=>{const f={[e.extCls]:!!e.extCls,[`${a("switcher")}`]:!0,[`${a("switcher-outline")}`]:e.isOutline,[`${a("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":r.value,"is-unchecked":!r.value,"is-loading":s.value,[`${a("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${a(`switcher-${e.size}`)}`;f[h]=!0}return f});i.watch(()=>e.modelValue,()=>{var f;o.value=!0,e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),i.watch(()=>e.value,()=>{o.value=!1});const c=f=>{if(f.stopPropagation(),f.preventDefault(),e.disabled||s.value)return;const h=r.value?e.falseValue:e.trueValue,m=!r.value,p=()=>{t(vr.UPDATE,h),t(vr.CHANGE,m)};let C=!0;if(typeof e.beforeChange=="function"&&(C=e.beforeChange(h),typeof C.then=="function"))return s.value=!0,C.then(()=>{p()}).finally(()=>{s.value=!1});C&&p()},u=f=>{(f.code==="Enter"||f.key==="Enter"||f.keyCode===13)&&c(f)};return()=>i.createVNode("div",{class:d.value,onClick:c,tabindex:"0",onKeydown:u},[s.value?i.createVNode(Gs,{class:`${a("switcher-loading")}`},null):"",e.showText?i.createVNode("span",{class:"switcher-text"},[r.value?e.onText:e.offText]):""])}}));var Nr=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(Nr||{}),Qh=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(Qh||{});const jM=["auto","highlight"],OM=["none","row","col","outer","horizontal"],Se={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"},be={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_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},wr=6,yt=42;var Mr=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Mr||{});const $h={def1:"#FAFBFD",def2:"#F0F1F5"},kn={large:78,medium:60,small:42},EM=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:kn.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:kn.medium},{value:"large",label:e.value.setting.lineHeight.large,height:kn.large}],_h="InitColumns",Hh="BKTableCahce",PM="Bk_COlumn_Update_Define",AM=60;var Qe=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Qe||{});const zM=["asc","desc","null","custom"],Xn=80,ji={},Wh={};me("showOverflowTooltipMode",{default:"auto"});const VM=me("columnType",{default:"none"}),Kl=me("columnType",{default:""});me("full",{default:"full"}),me("columnSize",{default:"small"});const JM=rt(),Xl=me("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),RM=me("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),QM=me("IFilterPropShape",{default:!1,type:[Boolean,Object]});var Fh=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(Fh||{});const Oi=me("IColumnType",{default:{width:"100%",label:""},type:[Object]}),Bh=me("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),ql=me("LabelFunctionStringType",{}),$M=me("RenderFunctionStringType",{}),Gh=me("SpanFunctionStringType",{}),_M=me("RowClassFunctionStringType",{}),HM=me("RowHeightFunctionNumberType",{});me("FunctionNumberType",{});const Ir=e=>me("StringNumberType",{}).def(e);me("IColumnPropType",{default:{label:void 0,minWidth:Xn},type:[Object]});var ec=(e=>(e.interdependent="interdependent",e.independent="independent",e))(ec||{});const WM={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(Oi).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:me("columnPick",{}).def("disabled"),height:Ir("auto"),stripe:g.bool.def(!1),minHeight:Ir(yt*2),maxHeight:Ir("auto"),rowHeight:HM.def(yt),headHeight:g.number.def(yt),showHead:g.bool.def(!0),thead:me("ITheadType",{}).def({color:Mr.DEF1,height:yt,isShow:!0}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(me("boderType",{})),g.string]).def([Nr.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),paginationHeight:g.number.def(AM),remotePagination:g.bool.def(!1),acrossAll:g.bool.def(!1),emptyText:g.string,emptyCellText:g.oneOfType([g.string,g.func.def(()=>"")]).def(""),settings:Bh,rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),checked:g.array.def([]),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(Se.ROW_INDEX),showOverflowTooltip:Xl,asyncData:g.bool.def(!1),rowHover:g.oneOf(jM).def(Qh.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0),resizerWay:me("ResizerWay",{default:"debounce"}),observerResize:g.bool.def(!0),align:Kl,headerAlign:Kl,prependStyle:g.style().def({}),colSortBehavior:me("IColSortBehavior",{default:"independent"}),isFlex:g.bool.def(!0),rowDraggable:g.oneOfType([g.func,g.bool,g.object]).def(!1)},FM={label:ql,field:ql,render:$M,width:g.oneOfType([g.number,g.string]),minWidth:Ir(Xn),columnKey:g.string.def(""),showOverflowTooltip:Xl,type:VM,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,JM]).def(!1),sort:RM,filter:QM,colspan:Gh.def(1),rowspan:Gh.def(1),align:Kl,className:_M,prop:ql,index:g.number.def(void 0)},BM=i.defineComponent({name:"TableColumn",props:FM,setup(e){const t=i.inject(_h,(s,r=!1)=>{},!1),n=i.inject(Hh,{queueStack:(s,r)=>r==null?void 0:r()}),a=i.reactive(Object.assign({},e,{field:e.prop||e.field}));return{initColumns:t,bkTableCache:n,column:a}},unmounted(){this.updateColumnDefine(!0)},mounted(){this.updateColumnDefine()},methods:{updateColumnDefine(e=!1){if(e){this.unmountColumn();return}this.updateColumnDefineByParent()},copyProps(e){return Object.keys(e??{}).reduce((t,n)=>{const a=n.replace(/-(\w)/g,(s,r)=>r.toUpperCase());return Object.assign(t,{[a]:e[n]})},{})},updateColumnDefineByParent(){const e=()=>{const n=this._.parent.vnode.children.default()||[],a=[];let s=0;const r=o=>{Array.isArray(o)&&o.forEach(l=>{var c,u,f;if(Array.isArray(l)){r(l);return}let d=!0;if(((c=l.type)==null?void 0:c.name)==="TableColumn"){d=Object.hasOwnProperty.call(l.props||{},"key");const h=Object.assign({index:s},this.copyProps(l.props),{field:l.props.prop||l.props.field,render:(u=l.children)==null?void 0:u.default});a.push(i.unref(h)),s=s+1}(f=l.children)!=null&&f.length&&d&&r(l.children)})};r(n),this.initColumns(a)};typeof this.bkTableCache.queueStack=="function"&&this.bkTableCache.queueStack(PM,e)},unmountColumn(){const e=Object.assign({},this.copyProps(this.$props),{field:this.$props.prop||this.$props.field,render:this.$slots.default});this.initColumns(e,!0)}},render(){var e,t;return i.createVNode(i.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{}})])}});class GM{constructor(){ye(this,"storage");this.storage={}}queueStack(t,n=()=>{}){this.storage[t]&&clearTimeout(this.storage[t]),this.storage[t]=setTimeout(()=>n())}clearQueueStack(t){this.storage[t]&&clearTimeout(this.storage[t])}}var Ve=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",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.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.DRAG_END="dragend",e))(Ve||{});const ZM=e=>!0,YM=e=>!0,UM=e=>!0,KM=e=>!0,Lr=(e,t,n,a,s)=>!0,XM=e=>!0,qM=e=>!0,eI=e=>!0,tI=e=>!0,Zh=e=>!0,nI=e=>!0,Yh=e=>!0,aI={columnPick:ZM,columnFilter:YM,columnSort:KM,colFilterSave:UM,rowClick:Lr,rowDblclick:Lr,rowExpand:XM,select:qM,selectAll:eI,selectionChange:tI,pageLimitChange:Zh,pageValueChange:Zh,settingChange:nI,scrollBottom:e=>!0,cellClick:Yh,cellDblclick:Yh,rowMouseEnter:Lr,rowMouseLeave:Lr,dragend:e=>!0},iI=(e,t=!0,n)=>{const{formatData:a,getColumnAttribute:s,getColumnOrderWidth:r,setColumnAttribute:o}=e,l=x=>s(x,be.LISTENERS),d="HeadColumnResize";let c=function(x){return x.MOUSE_MOVE="onMousemove",x.MOUSE_OUT="onMouseout",x.MOUSE_DOWN="onMousedown",x}({}),u=!1,f=!1,h=!1,m=0,p=null,C=0;const v=i.ref(-1e3),N=[be.RESIZE_WIDTH,be.CALC_WIDTH],I=x=>{x.stopImmediatePropagation(),x.stopPropagation(),x.preventDefault()},y=x=>{var F;I(x),f=!1,h=!1;const $=document.body.style;$.cursor="";const A=x.clientX-m,U=r(p,N)+A,Y=r(p,[be.COL_MIN_WIDTH]);o(p,be.RESIZE_WIDTH,U>Y?U:Y),setTimeout(()=>e.setAllColumnAttribute(be.COL_IS_DRAG,!1)),document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",w),m=0,v.value=-1e3,p=null;const oe=(F=n.value)==null?void 0:F.querySelector("table");oe==null||oe.querySelectorAll("th").forEach(te=>te.style.setProperty("user-select","inherit"))},b=x=>la(()=>{const $=x.clientX-m,A=r(p,N)+$;r(p,[be.COL_MIN_WIDTH])<A&&(v.value=x.clientX-m+C)},60),w=x=>{document.body.style.setProperty("cursor",""),b(x)(),I(x)},M=(x,$)=>{var A,U;ef(x)&&((A=x.style)==null||A.setProperty("cursor",$),((U=x.childNodes)==null?void 0:U.length)>0&&x.childNodes.forEach(Y=>M(Y,$)))},S={[c.MOUSE_DOWN]:(x,$)=>{if(!u)return;f=!0;const A=x.target.closest("th");e.setColumnAttribute($,be.COL_IS_DRAG,!0),e.setColumnAttribute($,be.CALC_WIDTH,A.scrollWidth),document.body.style.setProperty("cursor","col-resize"),p=$,m=x.clientX;const Y=x.target.closest("table");C=m-Y.getBoundingClientRect().left,b(x)(),document.addEventListener("mouseup",y),document.addEventListener("mousemove",w)},[c.MOUSE_MOVE]:(x,$)=>{f&&!h&&(h=!0);const A=x.target.closest("th");if(h&&(A.style.setProperty("user-select","none"),A.classList.remove("col-resize-hover")),!h){if(!A){A.classList.remove("col-resize-hover");return}const U=A.getBoundingClientRect();U.width>12&&U.right-x.pageX<8?(u=!0,M(A,"col-resize"),A.classList.add("col-resize-hover")):(M(A,""),A.classList.remove("col-resize-hover"),u=!1)}},[c.MOUSE_OUT]:(x,$)=>{const A=x.target.closest("th");h||(M(A,""),A.classList.remove("col-resize-hover"))}},L=x=>`${d}_${x}`,D=()=>{a.columns.forEach(x=>{if(x.resizable!==!1){const $=l(x);Object.keys(S).forEach(A=>{const U=L(A);$!=null&&$.has(U)||$.set(U,[]),$.get(U).push(S[A])})}})},T=()=>{a.columns.forEach(x=>{const $=l(x);Object.keys(S).forEach(A=>{const U=L(A);if($!=null&&$.has(U)){const Y=$.get(U);Y.length=0}})})};t&&D();const E={position:"absolute",top:0,bottom:0,left:0,width:"1px",backgroundColor:"#3785FF",transform:"translateX(-50%)"},P=i.computed(()=>e.formatData.layout),J=i.computed(()=>({...E,transform:`translate(${v.value+3}px, ${P.value.translateY}px)`})),j=i.computed(()=>({...E,width:"6px",transform:`translateX(${v.value}px)`}));return{registerResizeEvent:D,resetResizeEvents:T,dragOffsetX:v,dragOffsetXStyle:E,resizeColumnStyle:J,resizeHeadColStyle:j}},tc=(e,t,n)=>{const{formatData:a,isHiddenColumn:s,getColumnId:r,getColumnOrderWidth:o}=t,l=(y,b,w)=>({column_fixed:!!y.fixed,column_fixed_left:y.fixed!=="right",column_fixed_right:y.fixed==="right",shadow:y.fixed==="right"?w-b>2:b>0}),d=y=>{var L;const b=o(y);if(/^\d+/.test(`${b}`))return b;const M=`[data-id="${t.getColumnId(y)}"]`,S=((L=n==null?void 0:n.value)==null?void 0:L.querySelector(M))??{offsetWidth:0};return(S==null?void 0:S.offsetWidth)??0},c=y=>y.fixed==="right"?"right":"left",u={left:(y=!0)=>a.columns.filter(b=>!s(b)&&b.fixed&&b.fixed!=="right").reduce((b,w,M)=>{const S=d(w);return y&&M===0?b:b+S},0),right:(y=!0)=>a.columns.filter(b=>!s(b)&&b.fixed==="right").reduce((b,w,M)=>y&&M===0?b:b+d(w),0)},f=(y,b,w=0)=>{const M=r(b),S=y==="right"?-1:1,L=a.columns.filter(P=>!s(P)),{length:D}=L;let T=y==="right"?D*S:1,E=0;for(T;;){T=T+-1*S;const P=Math.abs(T),J=L[P],j=c(J),x=r(J);if(j===y&&M!==x){const $=o(J);E=E+$}if(M===x)break}return E+w},h=(y,b=!1)=>{if(!y.fixed||s(y))return{};const w={left:0,right:b?wr:-1},M=c(y);return w[M]=f(M,y,w[M]),{[M]:`${w[M]}px`}},m=y=>({width:`${u[y](!1)}px`,backgroundColor:e.thead.color,bottom:"0px"}),p=i.reactive([]),C=y=>{const b={left:!1,right:!1},w=a.columns.filter(M=>!s(M)&&M.fixed).map(M=>{const S=c(M),L=b[S];b[S]=!0;const D=l(M,t.formatData.layout.translateX,y),T=m(S);return{isExist:L,colPos:S,column:M,className:D,style:T}});p.length=0,p.push(...w)},v=y=>{p.forEach(b=>{const w=l(b.column,t.formatData.layout.translateX,y);Object.assign(b.className,w)})},{resolveClassName:N}=le();return{fixedWrapperClass:N("table-fixed"),resolveFixedColumnStyle:h,resolveFixedColumns:C,fixedColumns:p,resolveColumnStyle:m,resolveColumnClass:l,updateFixClass:v}},sI=(e,t)=>{const n=i.toRef(e,"scrollLoading"),a=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Bn.Normal,mode:ml.Default,indicator:null}:n.value,s=i.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var o,l;if(s.value){const{loading:d,size:c,mode:u,title:f,inline:h,indicator:m}=a();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??i.createVNode(vn,{loading:d,size:c,mode:u,title:f,inline:h,indicator:m},null)}}}},rI=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),{...t,...e,current:n}}return t}return{}},oI=e=>{const t=i.ref(0),n=i.ref(0),a=i.computed(()=>e.data),s=i.ref(null),r=i.reactive([]);let o=i.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});const l=()=>{e.pagination&&(s.value=e.remotePagination?o:{...o,count:r.length})},d=()=>{if(!e.pagination||e.remotePagination){t.value=0,n.value=r.length;return}t.value=(o.current-1)*o.limit,n.value=o.current*o.limit},c=i.reactive([]),u=(I,y,b,w,M)=>{typeof y=="function"&&I.sort((S,L)=>y(S,L,w,b,M))},f=(I,y)=>{y.forEach(b=>{u(I,b.schema[be.COL_SORT_FN],b.column,b.schema[be.COL_SORT_TYPE],b.schema[be.COL_SORT_SCOPE])})},h=(I,y)=>{if(typeof y=="function"){const b=I.filter((w,M)=>y(w,M,r));I.length=0,I.push(...b)}return I},m=()=>new Promise(I=>{i.nextTick(()=>{const y=a.value.slice();r.length=0,r.push(...y),I()})}),p=(I,y,b,w,M,S)=>{const L=r.slice();S!=null&&S.length&&f(L,S),c.length=0,c.push(...L.slice(t.value,n.value)),h(c,I),u(c,y,b,w,M),l()},C=I=>{p(null,null,null,null,null,I)},v=I=>{const y=r.slice(),b=I.reduce((w,M)=>h(w,M),y);c.length=0,c.push(...b)},N=()=>{o=rI(e.pagination,o),l(),d(),p()};return N(),i.watch(()=>[e.pagination],()=>{N()},{deep:!0}),{pageData:c,indexData:r,localPagination:s,resolvePageData:p,resolveIndexData:m,resolvePageDataBySortList:C,resetStartEndIndex:d,multiFilter:v,sort:u}};var lI=sn,cI=Ki,dI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uI=/^\w*$/;function fI(e,t){if(lI(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||cI(e)?!0:uI.test(e)||!dI.test(e)||t!=null&&e in Object(t)}var hI=fI,Uh=jo,gI="Expected a function";function nc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gI);var n=function(){var a=arguments,s=t?t.apply(this,a):a[0],r=n.cache;if(r.has(s))return r.get(s);var o=e.apply(this,a);return n.cache=r.set(s,o)||r,o};return n.cache=new(nc.Cache||Uh),n}nc.Cache=Uh;var mI=nc,pI=mI,yI=500;function bI(e){var t=pI(e,function(a){return n.size===yI&&n.clear(),a}),n=t.cache;return t}var CI=bI,vI=CI,NI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wI=/\\(\\)?/g,MI=vI(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(NI,function(n,a,s,r){t.push(s?r.replace(wI,"$1"):a||n)}),t}),II=MI;function LI(e,t){for(var n=-1,a=e==null?0:e.length,s=Array(a);++n<a;)s[n]=t(e[n],n,e);return s}var TI=LI,Kh=Ui,SI=TI,kI=sn,xI=Ki,DI=1/0,Xh=Kh?Kh.prototype:void 0,qh=Xh?Xh.toString:void 0;function e0(e){if(typeof e=="string")return e;if(kI(e))return SI(e,e0)+"";if(xI(e))return qh?qh.call(e):"";var t=e+"";return t=="0"&&1/e==-DI?"-0":t}var jI=e0,OI=jI;function EI(e){return e==null?"":OI(e)}var PI=EI,AI=sn,zI=hI,VI=II,JI=PI;function RI(e,t){return AI(e)?e:zI(e,t)?[e]:VI(JI(e))}var QI=RI,$I=Ki,_I=1/0;function HI(e){if(typeof e=="string"||$I(e))return e;var t=e+"";return t=="0"&&1/e==-_I?"-0":t}var WI=HI,FI=QI,BI=WI;function GI(e,t){t=FI(t,e);for(var n=0,a=t.length;e!=null&&n<a;)e=e[BI(t[n++])];return n&&n==a?e:void 0}var ZI=GI,YI=ZI;function UI(e,t,n){var a=e==null?void 0:YI(e,t);return a===void 0?n:a}var KI=UI;const Tr=Xe(KI);var t0=function(){if(typeof Map<"u")return Map;function e(t,n){var a=-1;return t.some(function(s,r){return s[0]===n?(a=r,!0):!1}),a}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 a=e(this.__entries__,n),s=this.__entries__[a];return s&&s[1]},t.prototype.set=function(n,a){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=a:this.__entries__.push([n,a])},t.prototype.delete=function(n){var a=this.__entries__,s=e(a,n);~s&&a.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,a){a===void 0&&(a=null);for(var s=0,r=this.__entries__;s<r.length;s++){var o=r[s];n.call(a,o[1],o[0])}},t}()}(),ac=typeof window<"u"&&typeof document<"u"&&window.document===document,Sr=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")()}(),XI=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Sr):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),qI=2;function e7(e,t){var n=!1,a=!1,s=0;function r(){n&&(n=!1,e()),a&&l()}function o(){XI(r)}function l(){var d=Date.now();if(n){if(d-s<qI)return;a=!0}else n=!0,a=!1,setTimeout(o,t);s=d}return l}var t7=20,n7=["top","right","bottom","left","width","height","size","weight"],a7=typeof MutationObserver<"u",i7=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=e7(this.refresh.bind(this),t7)}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_,a=n.indexOf(t);~a&&n.splice(a,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(){!ac||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a7?(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(){!ac||!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,a=n===void 0?"":n,s=n7.some(function(r){return!!~a.indexOf(r)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),n0=function(e,t){for(var n=0,a=Object.keys(t);n<a.length;n++){var s=a[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Va=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Sr},a0=xr(0,0,0,0);function kr(e){return parseFloat(e)||0}function i0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(a,s){var r=e["border-"+s+"-width"];return a+kr(r)},0)}function s7(e){for(var t=["top","right","bottom","left"],n={},a=0,s=t;a<s.length;a++){var r=s[a],o=e["padding-"+r];n[r]=kr(o)}return n}function r7(e){var t=e.getBBox();return xr(0,0,t.width,t.height)}function o7(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return a0;var a=Va(e).getComputedStyle(e),s=s7(a),r=s.left+s.right,o=s.top+s.bottom,l=kr(a.width),d=kr(a.height);if(a.boxSizing==="border-box"&&(Math.round(l+r)!==t&&(l-=i0(a,"left","right")+r),Math.round(d+o)!==n&&(d-=i0(a,"top","bottom")+o)),!c7(e)){var c=Math.round(l+r)-t,u=Math.round(d+o)-n;Math.abs(c)!==1&&(l-=c),Math.abs(u)!==1&&(d-=u)}return xr(s.left,s.top,l,d)}var l7=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Va(e).SVGGraphicsElement}:function(e){return e instanceof Va(e).SVGElement&&typeof e.getBBox=="function"}}();function c7(e){return e===Va(e).document.documentElement}function d7(e){return ac?l7(e)?r7(e):o7(e):a0}function u7(e){var t=e.x,n=e.y,a=e.width,s=e.height,r=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(r.prototype);return n0(o,{x:t,y:n,width:a,height:s,top:n,right:t+a,bottom:s+n,left:t}),o}function xr(e,t,n,a){return{x:e,y:t,width:n,height:a}}var f7=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=xr(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=d7(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}(),h7=function(){function e(t,n){var a=u7(n);n0(this,{target:t,contentRect:a})}return e}(),g7=function(){function e(t,n,a){if(this.activeObservations_=[],this.observations_=new t0,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=a}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 Va(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new f7(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 Va(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(a){return new h7(a.target,a.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}(),s0=typeof WeakMap<"u"?new WeakMap:new t0,r0=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=i7.getInstance(),a=new g7(t,n,this);s0.set(this,a)}return e}();["observe","unobserve","disconnect"].forEach(function(e){r0.prototype[e]=function(){var t;return(t=s0.get(this))[e].apply(t,arguments)}});var m7=function(){return typeof Sr.ResizeObserver<"u"?Sr.ResizeObserver:r0}();const Ye=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(a=>Ye(e,a,n)).filter(a=>a!==void 0).at(0)}},p7=e=>ic(e,"auto"),ic=(e,t="100%",n=null)=>{let a="";return/^auto|null|undefined$/gi.test(`${e}`)?a=t:a=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(a=`calc(${a} - ${n})`),a},y7=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>OM.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},b7=(e,t,n=60,a=!1,s="throttle")=>{const r=()=>{typeof t=="function"&&t()},o=s==="debounce"?Xi(r,n):la(r,n),l=()=>Reflect.apply(o,globalThis,[]),d=new m7(()=>{l()});return a&&typeof t=="function"&&t(),{start:()=>{d.observe(e)},disconnect:()=>{d.unobserve(e),d.disconnect()}}},Dr=e=>{const{showHead:t,headHeight:n,thead:a={}}=e;return Object.assign({},{isShow:t,height:n},a)},jr=(e,t)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Tr(e,t),C7=(e,t)=>Tr(e,t),Ei=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ei(Reflect.apply(e,globalThis,t),t):[],v7=(e,t,n)=>{const a=o0(e,t,n);return a!==null?a:nn()},o0=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Se.ROW_INDEX?`__ROW_INDEX_${n}`:Tr(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):null,N7=(e,t,n=0)=>{if(e){const a=e.querySelector(t);if(a)return a.offsetHeight>e.offsetHeight-n}return!1},l0=(e,t,n)=>{const a=r=>r.field??r.id;return(r=>e.some(o=>a(o)===Ye(r,["field","type"],[r])))(t)&&n.length&&!n.includes(Ye(t,["field","type"],[t]))},Or=(e,t,n,a,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:a}]):typeof e[s]=="number"?e[s]:1,w7=(e,t,n,a)=>{const s=Or(e,t,n,a,"colspan"),r=Or(e,t,n,a,"rowspan");return{colspan:s,rowspan:r}},sc=(e,t)=>{var o,l;const n=e.field,a=d=>jr(d,n),s=(d,c)=>{const u=a(d)??"",f=a(c)??"";return typeof u=="number"&&typeof f=="number"?u-f:String.prototype.localeCompare.call(u,f)},r=typeof((o=e.sort)==null?void 0:o.sortFn)=="function"?(l=e.sort)==null?void 0:l.sortFn:s;return t===Qe.NULL?(d,c)=>!0:(d,c)=>r(d,c)*(t===Qe.DESC?-1:1)},c0=e=>{const t={[Qe.NULL]:3,[Qe.ASC]:1,[Qe.DESC]:2};return t[e]===void 0?Qe.ASC:Object.keys(t)[(t[e]+1)%3]},d0=(e,t)=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Qe.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:sc(t,e.value??Qe.NULL)},e):null,Er=(e,{row:t,index:n,isCheckAll:a})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:a}):!0,M7=(e,t,n)=>{const a=v7(e,n,t);return a!==void 0&&e[a]!==void 0?e[a]:t},I7=(e,t)=>{const{value:n,sortFn:a,sortScope:s}=d0(e.sort??t.defaultSort,e)??{};return{type:n,fn:a,scope:s,active:!!e.sort}},L7=e=>{const t=je("table"),n=()=>{const{size:Z,fields:K=[],checked:X=[]}=e.settings,ae=kn[Z]??e.rowHeight??kn.small;return{size:Z,height:ae,fields:K,checked:X}},a=i.reactive({data:[...e.data],dataSchema:new WeakMap,columns:[...e.columns],columnSchema:new WeakMap,settings:n(),layout:{hasScrollY:!1,bottom:0,translateX:0,translateY:0}}),{pageData:s,indexData:r,localPagination:o,resolvePageData:l,resolvePageDataBySortList:d,multiFilter:c,sort:u,resetStartEndIndex:f,resolveIndexData:h}=oI(e),m=(Z,K)=>{if(Z){const{size:X,fields:ae=[],checked:pe=[]}=Z,ee=K??kn[X]??e.rowHeight??kn.small;Object.assign(a.settings,{size:X,height:ee,fields:ae,checked:pe});return}K&&(a.settings.height=K)},p=Z=>{if(/^\d+/.test(`${Z.minWidth}`))return Z.minWidth;let K=Xn;return Z.sort&&(K=K+18),Z.filter&&(K=K+28),K},C=()=>{var Z,K;e.rowDraggable&&a.columns.unshift({minWidth:50,width:((Z=e.rowDraggable)==null?void 0:Z.width)??60,label:((K=e.rowDraggable)==null?void 0:K.label)??t.value.sort,type:"drag"})},v=Z=>{a.columns.length=0,a.columns.push(...Z),C();let K=0;const X=oe(["colspan"]);(a.columns||[]).forEach((ae,pe)=>{const{skipCol:ee,skipColumnNum:re,skipColLen:ge}=X?N(ae,pe,K):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(K=re,!a.columnSchema.has(ae)){const{type:Ne,fn:ve,scope:Ie,active:ke}=I7(ae,e),De=Oe=>Oe.type==="index"?(Ae,St)=>{var Re,Ze;return ve==null?void 0:ve((Re=a.dataSchema.get(Ae))==null?void 0:Re[Se.ROW_INDEX],(Ze=a.dataSchema.get(St))==null?void 0:Ze[Se.ROW_INDEX])}:ve;a.columnSchema.set(ae,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_MIN_WIDTH]:p(ae),[be.LISTENERS]:new Map,[be.WIDTH]:ae.width,[be.IS_HIDDEN]:l0(a.settings.fields,ae,a.settings.checked),[be.COL_SORT_TYPE]:Ne,[be.COL_SORT_FN]:De(ae),[be.COL_FILTER_FN]:void 0,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:Ie,[be.COL_SORT_ACTIVE]:ke,[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:ee,skipColumnNum:re,skipColLen:ge},[be.COL_UID]:nn()})}Object.assign(a.columnSchema.get(ae),{[be.COL_SPAN]:{skipCol:ee,skipColumnNum:re,skipColLen:ge},[be.COL_MIN_WIDTH]:p(ae)})})},N=(Z,K,X)=>{let ae=X;const pe=Or(Z,K,null,null,"colspan"),ee={skipCol:!1,skipColLen:0};return ae>0&&(ee.skipColLen=ae,ee.skipCol=!0,ae=ae-1),pe>1&&(ee.skipColLen=pe,ae=pe-1),{...ee,skipColumnNum:ae}},I=Z=>U(Z,be.COL_FILTER_FN),y=()=>{const Z=a.columns.filter(K=>!j(K)&&typeof I(K)=="function").map(K=>I(K));c(Z)},b=Z=>{const K=U(Z,be.COL_SORT_FN),X=U(Z,be.COL_SORT_TYPE),ae=U(Z,be.COL_SORT_SCOPE);if(X===Qe.NULL){h().then(()=>{l()});return}if(ae==="all"){u(r,K,Z,X,ae),l();return}u(s,K,Z,X,ae)},w=(Z=!1)=>{a.columns.forEach(K=>{$(K,be.COL_SORT_ACTIVE,!1),$(K,be.COL_FILTER_FN,void 0)}),Z&&l()},M=(Z,K)=>{const X=Array.isArray(Z)?Z:[Z],ae=Array.isArray(K)?K:[K];a.columns.forEach(pe=>{X.forEach((ee,re)=>{$(pe,ee,ae[re])})})},S=(Z,K)=>{e.colSortBehavior===ec.independent&&a.columns.forEach(X=>{$(X,be.COL_SORT_ACTIVE,!1)}),$(Z,be.COL_SORT_ACTIVE,K)},L=(Z,K)=>Er(e,{row:Z,index:K})?B(Z,Se.ROW_SELECTION):!0,D=()=>e.acrossAll?a.data.every((Z,K)=>L(Z,K)):s.every((Z,K)=>L(Z,K)),T=()=>e.acrossAll?a.data.some(Z=>B(Z,Se.ROW_SELECTION)):s.some(Z=>B(Z,Se.ROW_SELECTION)),E=Z=>{var K;return((K=a.columnSchema.get(Z))==null?void 0:K[be.IS_HIDDEN])??!1},P=[be.RESIZE_WIDTH,be.CALC_WIDTH,be.WIDTH],J=(Z,K=P)=>{const X=a.columnSchema.get(Z)??{};return X[K[0]]??X[K[1]]??X[K[2]]},j=Z=>{var K;return((K=a.columnSchema.get(Z))==null?void 0:K[be.IS_HIDDEN])??!1},x=Z=>{var K;return(K=a.columnSchema.get(Z))==null?void 0:K[be.COL_UID]},$=(Z,K,X)=>{const ae=a.columnSchema.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,K)&&(ae[K]=X)},A=(Z,K)=>{const X=K||Z.checked||[],ae=Z.fields||[];a.columns.forEach(pe=>{$(pe,be.IS_HIDDEN,l0(ae,pe,X))})},U=(Z,K)=>{var X;return(X=a.columnSchema.get(Z))==null?void 0:X[K]},Y=Z=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn({row:Z}):Array.isArray(e.checked)?e.checked.some(K=>typeof K=="string"?C7(Z,K)===K:K===Z):!1:!1,oe=(Z=["rowspan","colspan"])=>a.columns.some(K=>Z.some(X=>typeof K[X]=="function"||/^\d$/.test(`${K[X]}`))),F=Z=>{a.data.length=0,a.data.push(...Z);let K=!1,X=!1;(Z||[]).forEach((ae,pe)=>{let ee=M7(ae,nn(),e);const re=Y(ae);re?K=!0:X=!0,a.dataSchema.has(ae)||a.dataSchema.set(ae,{[Se.ROW_EXPAND]:!1,[Se.ROW_SELECTION]:re,[Se.ROW_UID]:ee,[Se.ROW_INDEX]:pe+1,[Se.ROW_SELECTION_INDETERMINATE]:!1});const ge=a.dataSchema.get(ae);ee=ge[Se.ROW_UID],ge[Se.ROW_INDEX]=pe+1}),a.dataSchema.set(ji,{[Se.ROW_SELECTION]:K,[Se.ROW_SELECTION_INDETERMINATE]:K&&X}),a.dataSchema.set(Wh,{[Se.ROW_SPAN]:oe(["rowspan"])})},te=Z=>{ne(Z)},z=()=>{const Z=D();W(ji,Se.ROW_SELECTION,Z),W(ji,Se.ROW_SELECTION_INDETERMINATE,!Z&&T())},W=(Z,K,X)=>{const ae=a.dataSchema.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,K)&&(ae[K]=X)},k=(Z,K)=>{let X=K;typeof e.isSelectedFn=="function"&&(X=e.isSelectedFn({row:Z})),Er(e,{row:Z})&&W(Z,Se.ROW_SELECTION,X),z()},O=(Z,K)=>{W(Z,Se.ROW_INDEX,K)},Q=(Z,K)=>{W(Z,Se.ROW_EXPAND,K)},B=(Z,K)=>{var X;return(X=a.dataSchema.get(Z))==null?void 0:X[K]},G=Z=>{if(typeof e.isSelectedFn=="function"){k(Z,e.isSelectedFn({row:Z}));return}k(Z,!B(Z,Se.ROW_SELECTION))},ne=Z=>{const K=Z??!D();if(e.acrossAll){a.data.forEach(X=>k(X,K));return}s.forEach(X=>k(X,K)),a.dataSchema.set(ji,{[Se.ROW_SELECTION]:K,[Se.ROW_SELECTION_INDETERMINATE]:!1})};return{formatColumns:v,formatDataSchema:F,setRowSelection:k,setRowExpand:Q,setRowIndex:O,setColumnAttribute:$,setColumnAttributeBySettings:A,setColumnSortActive:S,setRowSelectionAll:te,setRowIndeterminate:z,setAllColumnAttribute:M,getColumnAttribute:U,getColumnId:x,getColumnOrderWidth:J,getRowSelection:()=>a.data.filter(Z=>B(Z,Se.ROW_SELECTION)),resolveColumnWidth:(Z,K=Xn,X=0)=>{const{width:ae}=Z.getBoundingClientRect()||{},pe=ae-X;let ee=pe;const re=[],ge=(ve,Ie)=>{const ke=U(ve,be.COL_MIN_WIDTH);if(ke===void 0)return Ie<Xn?Xn:Ie;let De=Ie;return/^\d+\.?\d*$/.test(`${ke}`)&&(De=Number(ke)),/^\d+\.?\d*%$/.test(`${ke}`)&&(De=Number(ke)*pe/100),/^\d+\.?\d*px$/i.test(`${ke}`)&&(De=Number(`${ke}`.replace(/px/i,""))),De},Ne=(ve,Ie,ke=!0)=>{const De=ge(ve,Ie),Oe=Ie<De?De:Ie;Object.assign(ve,{calcWidth:Oe}),ke&&(ee=ee-Oe,ee<0&&(ee=0))};if(a.columns.forEach((ve,Ie)=>{if(!j(ve)){const De=String(J(ve,["resizeWidth","width"]));let Oe=!0;if(/^\d+\.?\d*(px)?$/.test(De)){const Ae=Number(De.replace("px",""));Ne(ve,Ae),Oe=!1}if(/^\d+\.?\d*%$/.test(De)){let Ae=K;if(ee>0){const St=Number(De.replace("%",""));Ae=ee*St/100}Ne(ve,Ae),Oe=!1}Oe&&re.push(Ie)}}),re.length>0){let ve=K;ee>0?re.forEach((Ie,ke)=>{ve=ee/(re.length-ke),Ne(a.columns[Ie],ve,!1);const De=U(a.columns[Ie],be.CALC_WIDTH);ee=ee-De}):re.forEach(Ie=>{const ke=ge(a.columns[Ie],Xn);$(a.columns[Ie],be.CALC_WIDTH,ke)})}},isActiveColumn:E,isHiddenColumn:j,resolvePageData:l,resolveByDefColumns:()=>{const Z=[];a.columns.forEach(K=>{const X=a.columnSchema.get(K);typeof(X==null?void 0:X[be.COL_SORT_FN])=="function"&&!((X==null?void 0:X[be.IS_HIDDEN])??!0)&&Z.push({column:K,schema:X})}),d(Z)},resetStartEndIndex:f,toggleAllSelection:ne,setAllRowExpand:Z=>{a.data.forEach(K=>Q(K,Z??!0))},clearSelection:()=>{a.data.forEach(Z=>k(Z,!1))},clearColumnSort:w,toggleRowSelection:G,getRowAttribute:B,filter:y,sortData:b,isCheckedAll:D,hasCheckedRow:T,updateSettings:m,changePageRowIndex:(Z,K)=>{const X=s[Z];s.splice(K,0,X);const ae=Z<K?Z:Z+1;s.splice(ae,1)},pageData:s,localPagination:o,formatData:a,setIndexData:()=>h()}},u0=(e,t)=>{const n=i.reactive(e.columns??[]),a=(o,l=!1)=>{let d=[];Array.isArray(o)?d=o:d=[o],l?d.forEach(c=>{const u=t.findIndex(f=>f.label===c.label&&f.field===c.field);u>=0&&t.splice(u,1)}):(d.forEach(c=>{const u=t.findIndex(f=>f.label===c.label&&f.field===c.field);u>=0?Object.assign(t[u],c):t.push(c)}),t.sort((c,u)=>c.index-u.index)),n.length=0,n.push(...t)};i.watch(()=>[e.columns],()=>{n.length=0,n.push(...e.columns)});const s=()=>n;return{initColumns:a,getColumns:s,getActiveColumn:()=>{var o;if(e.colSortBehavior===ec.independent){const l=[Qe.ASC,Qe.DESC];return(o=s().filter(d=>{var c;return l.includes((c=d.sort)==null?void 0:c.value)}))==null?void 0:o[0]}return null},columns:n}},T7=(e,t,n,a,s)=>{const{resolveClassName:r}=le(),{getColumns:o}=u0(e,t),l=i.ref(yt*10),d=i.ref(yt*10),c=i.ref(yt),u=i.ref(!1),f=i.computed(()=>e.pagination&&e.data.length),h=i.computed(()=>u.value),m=i.computed(()=>we({[r("table")]:!0,"has-footer":f.value,"has-scroll-y":u.value||e.virtualEnabled,[r("table-flex")]:e.isFlex},y7(e.border))),p=we({[r("table-head")]:!0,"has-settings":!!e.settings}),C=i.computed(()=>o()),v=Dr(e),N=i.computed(()=>{var O;return{"--row-height":`${Ye(v,"height",["thead"])}px`,"--scroll-head-left":`-${a.formatData.layout.translateX}px`,"--scroll-left":`${a.formatData.layout.translateX}px`,"--background-color":$h[((O=e.thead)==null?void 0:O.color)??Mr.DEF1]}}),I={[r("table-body")]:!0},y=i.computed(()=>we({[r("table-footer")]:!0,"is-hidden":!e.pagination||!e.data.length})),b=()=>e.height==="number"?`${e.height}px`:typeof e.height=="string"?e.height:"",w=()=>{if(C.value.every(O=>/^\d+\.?\d*(px)?$/gi.test(`${O.width}`))){const O=C.value.reduce((B,G)=>B+Number(`${G.width}`.replace(/px/gi,"")),0),Q=u.value?wr:0;return`${O+Q}px`}return"100%"},M=i.computed(()=>({minHeight:ic(e.minHeight,"auto"),width:w()||"100%",maxWidth:"100%",height:b()})),S=(O,Q)=>{const B=String(O);if(/^\d+\.?\d*$/.test(B))return parseFloat(B);if(/^\d+\.?\d*px$/gi.test(B))return parseFloat(B.replace("px",""));if(/^\d+\.?\d*%$/gi.test(B)){if(typeof Q=="number"){const G=parseFloat(B.replace("%",""));return Q*G/100}return B}return Q??O},L=i.reactive({display:"",minHeight:"",height:"",maxHeight:""}),D=O=>{if(e.showHead){if(!O)return S(e.headHeight,yt)??0;const Q=r("table-head"),B=O.querySelector(Q);return(B==null?void 0:B.offsetHeight)??S(e.headHeight,yt)??0}return 0},T=(O,Q,B)=>{if(/%$/.test(`${O}`))return`calc(${O} - ${Q+B}px)`;if(typeof O=="number"){const G=O-Q-B;return`${G>0?G:0}px`}return O},E=(O,Q)=>/^\d+\.?\d*$/.test(O)?`${O}px`:Q(),P=O=>{const Q=S(e.height);c.value=D(O);const B=e.pagination&&e.data.length?e.paginationHeight:0,G=T(Q,c.value,B),ne=E(Q,()=>{const _=S(e.maxHeight);return T(_,c.value,B)});L.display=s!=null&&s.length?"block":!1,L.minHeight=G,L.height=G,L.maxHeight=ne};i.onMounted(()=>{J(n==null?void 0:n.value)});const J=O=>{if(O){const Q=D(O),B=`.${r("table-body-content")} > table`,G=`.${r("table-body")}`,ne=O.querySelector(G),_=O.querySelector(B);P(O),d.value=((ne==null?void 0:ne.offsetHeight)??yt*10)+Q,l.value=((_==null?void 0:_.offsetHeight)??yt*10)+Q,j(O)}},j=O=>{if(!O)return;const Q=e.virtualEnabled?`.${r("virtual-section")}`:`.${r("table-body-content")}`,B=O.querySelector(`.${r("table-body")}`);u.value=N7(B,Q,0)},x=()=>{let O=0;return u.value&&(O=O+wr),e.border.includes(Nr.OUTER)&&!e.border.includes(Nr.NONE)&&(O=O+2),O},$=i.computed(()=>({...I,"__is-empty":!a.pageData.length})),A=i.computed(()=>({[r("table-body-content")]:!0,[r("stripe")]:e.stripe,"with-virtual-render":e.virtualEnabled})),U={column_drag_line:!0,"offset-x":!0},Y={"scroll-loading":!0,_bottom:!0},oe=i.computed(()=>({[r("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),F={zIndex:-1,width:0,height:0,display:"none"},te=i.computed(()=>({"--footer-height":f.value?`${e.paginationHeight}px`:"0"})),z=i.computed(()=>({right:h.value?`${wr}px`:0,"--fix-height":`${l.value}px`,...te.value})),W=i.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}),k=i.computed(()=>({"--prepend-left":`${a.formatData.layout.translateX}px`,position:"sticky",top:0,zIndex:2,...e.prependStyle||{}}));return{tableClass:m,headClass:p,contentClass:I,footerClass:y,wrapperStyle:M,contentStyle:L,headStyle:N,fixHeight:l,maxFixHeight:d,resetTableHeight:J,updateBorderClass:j,getColumnsWidthOffsetWidth:x,hasFooter:f,hasScrollY:u,hasScrollYRef:h,tableBodyClass:$,tableBodyContentClass:A,resizeColumnClass:U,loadingRowClass:Y,fixedBottomBorder:oe,columnGhostStyle:F,fixedContainerStyle:z,scrollClass:W,prependStyle:k,footerStyle:te}};function S7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const k7=e=>{const{proxy:t}=i.getCurrentInstance(),n=i.ref(t.limit);i.watch(()=>t.limit,o=>{n.value=o}),i.watch(()=>t.limitList,o=>{i.nextTick(()=>{o.includes(n.value)||([n.value]=o)})},{immediate:!0});const a=o=>{n.value=o},{resolveClassName:s}=le();return{limit:n,render:({isFirst:o,isLast:l})=>{let d;return t.showLimit?i.createVNode("div",i.mergeProps({class:{[s("pagination-limit")]:!0,"is-first":o,"is-last":l}},{disabled:t.disabled}),[i.createVNode("div",null,[e.value.eachPage]),i.createVNode(Yl,{class:`${s("pagination-limit-select")}`,clearable:!1,size:"small",withValidate:!1,modelValue:n.value,onChange:a,disabled:t.disabled},S7(d=t.limitList.map((c,u)=>i.createVNode(xi,{id:c,name:`${c}`,key:`${u}_${c}`},null)))?d:{default:()=>[d]}),i.createVNode("div",null,[e.value.strip])]):null}}},qn=5,x7=()=>{const{proxy:e}=i.getCurrentInstance(),t=i.ref(1),n=i.computed(()=>t.value===1),a=i.computed(()=>t.value===e.totalPageNum),s=i.ref(!1),r=i.ref(!1),o=i.computed(()=>{s.value=!1,r.value=!1;const p=[];if(e.totalPageNum<=qn+2){for(let N=2;N<=e.totalPageNum-1;N++)p.push(N);return p}const C=Math.floor(qn/2);e.totalPageNum>qn&&(s.value=t.value-C>2,r.value=t.value+C<e.totalPageNum-1);const v=Math.min(e.totalPageNum-qn,Math.max(2,t.value-C));for(let N=v;N<v+qn;N++)p.push(N);return p});i.watch(()=>e.modelValue,p=>{i.nextTick(()=>{p>=1&&p<=e.totalPageNum?t.value=p:p<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),i.nextTick(()=>{i.watch(()=>e.totalPageNum,p=>{t.value>p&&(t.value=p)})});const l=()=>{n.value||(t.value=t.value-1)},d=()=>{a.value||(t.value=t.value+1)},c=p=>{p!==t.value&&(t.value=p)},u=()=>{t.value=Math.max(1,t.value-qn)},f=()=>{t.value=Math.min(e.totalPageNum,t.value+qn)},{resolveClassName:h}=le();return{current:t,render:({isFirst:p,isLast:C})=>i.createVNode("div",{class:{[`${h("pagination-list")}`]:!0,"is-first":p,"is-last":C}},[i.createVNode("div",{class:{[`${h("pagination-list-pre")}`]:!0,"is-disabled":n.value},onClick:l},[e.prevText||i.createVNode($t,null,null)]),i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===1},key:"1",onClick:()=>c(1)},[i.createTextVNode("1")]),s.value&&i.createVNode("div",{key:"pre-batch",class:`${h("pagination-list-pre-batch")}`,onClick:u},[i.createVNode(pi,null,null)]),o.value.map(v=>i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===v},key:v,onClick:()=>c(v)},[v])),r.value&&i.createVNode("div",{key:"next-batch",class:`${h("pagination-list-next-batch")}`,onClick:f},[i.createVNode(pi,null,null)]),e.totalPageNum>1&&i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>c(e.totalPageNum)},[e.totalPageNum]),i.createVNode("div",{class:{[`${h("pagination-list-pre")}`]:!0,"is-disabled":a.value},onClick:d},[e.nextText||i.createVNode(It,null,null)])])}},D7=()=>{const{proxy:e}=i.getCurrentInstance(),t=i.ref(null),n=i.ref(!1),a=i.ref(1),s=i.computed(()=>a.value===1),r=i.computed(()=>a.value===e.totalPageNum);let o=0;const l=i.computed(()=>{const N=[];for(let I=1;I<=e.totalPageNum;I++)N.push(I);return N});i.watch(()=>e.modelValue,N=>{i.nextTick(()=>{N>=1&&N<=e.totalPageNum?a.value=N:N<1?a.value=1:a.value=e.totalPageNum,o=a.value})},{immediate:!0}),i.nextTick(()=>{i.watch(()=>e.totalPageNum,N=>{a.value>N&&(a.value=N)})});const d=()=>{s.value||(a.value=a.value-1)},c=()=>{r.value||(a.value=a.value+1)},u=()=>{n.value=!0},f=()=>{n.value=!1,o!==a.value&&(a.value=o)},h=N=>{const I=N.target,y=Number(I.textContent);!y||y<1||y>e.totalPageNum||y===a.value||(o=y)},m=N=>{["Enter","NumpadEnter"].includes(N.code)&&(N.preventDefault(),f())},p=N=>{o=N,f()},{resolveClassName:C}=le();return{current:a,render:()=>i.createVNode("div",{class:`${C("pagination-small-list")}`},[i.createVNode("div",{class:{[`${C("pagination-btn-pre")}`]:!0,"is-disabled":s.value},onClick:d},[i.createVNode($t,null,null)]),i.createVNode(pt,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>i.createVNode("div",{class:{[`${C("pagination-picker")}`]:!0,"is-focused":n.value}},[i.createVNode("span",{ref:t,class:`${C("pagination-editor")}`,contenteditable:!0,spellcheck:"false",onFocus:u,onBlur:f,onInput:h,onKeydown:m},[a.value]),i.createVNode("span",null,[i.createTextVNode("/")]),i.createVNode("span",{class:`${C("pagination-small-list-total")}`},[e.totalPageNum])]),content:()=>i.createVNode("div",{class:`${C("pagination-picker-list")}`},[l.value.map(N=>i.createVNode("div",{class:{item:!0,"is-actived":N===a.value},key:N,onClick:()=>p(N)},[N]))])}),i.createVNode("div",{class:{[`${C("pagination-btn-next")}`]:!0,"is-disabled":r.value},onClick:c},[i.createVNode(It,null,null)])])}},j7=e=>({isFirst:t,isLast:n})=>{const{props:a}=i.getCurrentInstance();if(!a.showTotalCount)return null;const{resolveClassName:s}=le();return i.createVNode("div",i.mergeProps({class:{[`${s("pagination-total")}`]:!0,"is-first":t,"is-last":n}},{disabled:a.disabled}),[e.value.total,i.createVNode("div",{class:`${s("pagination-total-num")}`},[a.count]),e.value.strip])},O7={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])},rc=Le(i.defineComponent({name:"Pagination",props:O7,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=je("pagination"),a=i.ref(0),{count:s,limit:r}=i.toRefs(e),o=j7(n),{current:l,render:d}=x7(),{current:c,render:u}=D7(),{limit:f,render:h}=k7(n);i.watch([s,f,r],([p,C])=>{const v=Math.ceil(p/C);a.value=v<1?1:v},{immediate:!0}),i.watch(l,p=>{t.emit("update:modelValue",p),t.emit("change",p)}),i.watch(c,p=>{e.small&&(t.emit("update:modelValue",p),t.emit("change",p))}),i.watch(f,p=>{t.emit("limitChange",p)});const{resolveClassName:m}=le();return{totalPageNum:a,renderTotal:o,renderList:d,renderLimit:h,renderSmallList:u,resolveClassName:m}},render(){const e=we({[`${this.resolveClassName("pagination")}`]:!0,[`${this.resolveClassName(`pagination--${this.size}`)}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return i.createVNode("div",{class:e},[this.layout.map((n,a)=>t[n]({isFirst:a===0,isLast:a===this.layout.length-1}))])}})),f0=i.defineComponent({name:"TableCell",props:{column:Oi,row:g.any.def({}),parentSetting:Xl,title:g.string.def(void 0),observerResize:g.bool.def(!0),isHead:g.bool.def(!1),headExplain:g.string,resizerWay:me("ResizerWay",{default:Fh.DEBOUNCE})},setup(e,{slots:t}){const n=i.ref(),a=i.ref(!1),s=i.computed(()=>({textAlign:e.column.textAlign})),r=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const h={showOverflowTooltip:{content:"",disabled:!e.column.showOverflowTooltip,mode:void 0,resizerWay:void 0,watchCellResize:void 0,popoverOption:{}}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(h.showOverflowTooltip,e.parentSetting),Object.assign(h.showOverflowTooltip,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(h.showOverflowTooltip,e.column.showOverflowTooltip)),h}return{showOverflowTooltip:e.parentSetting}},{showOverflowTooltip:o=!1}=r();let l=null;const d=()=>{let h=!0,{resizerWay:m}=e,p=()=>n.value.innerText,C={},v="auto",N=!0;return typeof o=="boolean"&&(h=!o),typeof o=="object"&&(h=o.disabled,C=o.popoverOption,m=o.resizerWay||"debounce",p=()=>o.content||n.value.innerText,typeof o.content=="function"&&(p=()=>o.content(e.column,e.row)),N=o.watchCellResize,v=o.mode||"auto"),typeof h=="function"&&(h=Reflect.apply(h,this,[e.column,e.row])),e.isHead&&(h=!1,v="auto",p=()=>{var I;return(I=c())==null?void 0:I.innerHTML},e.headExplain&&(v="static",p=()=>e.headExplain)),e.column.explain&&(h=!1,v="static",typeof e.column.explain=="object"&&(p=()=>Ye(e.column.explain,"content",[e.column,e.row]))),{disabled:h,content:p,mode:v,resizerWay:m,watchCellResize:N,popoverOption:C}},c=()=>{var h,m;return e.isHead?(m=(h=n.value)==null?void 0:h.querySelector)==null?void 0:m.call(h,".head-text"):n.value},u=()=>{const h=c();if(!h||!An(h))return;const{mode:m,disabled:p}=d();if(a.value=!p,m==="auto"&&(a.value=n6(h)),m==="static"&&(a.value=!0),a.value){const C=i.ref(d());l===null&&(l=zl(h,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(h),l=null};i.onMounted(()=>{const{disabled:h,resizerWay:m,watchCellResize:p}=d();if(!h&&(u(),p!==!1&&e.observerResize)){let C=b7(n.value,()=>{u()},60,!0,m);C.start(),i.onBeforeUnmount(()=>{C.disconnect(),C=null})}}),i.onBeforeUnmount(()=>{l==null||l.destroyInstance(n.value)});const f=e.headExplain||e.column.explain;return()=>{var h;return i.createVNode("div",{class:["cell",e.column.type,f?"explain":""],style:s.value,ref:n},[(h=t.default)==null?void 0:h.call(t)])}}}),oc=i.defineComponent({name:"TableRow",render(){var e,t;return i.createVNode(i.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),E7=i.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string},emits:["change"],setup(e){const t=je("table"),n=i.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),a=i.computed(()=>e.list.length===0?"empty":"search-empty");return()=>i.createVNode(gr,{scene:"part",type:a.value,description:n.value},null)}});function h0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const P7=i.defineComponent({name:"Settings",props:{settings:Bh,columns:g.arrayOf(Oi).def([])},emits:["change"],setup(e,{emit:t,slots:n}){const{resolveClassName:a}=le(),s=je("table"),r=EM(s),o=(x,$)=>Ye(x,["id","field","type"],[x,$]),l=i.ref(!1),d=i.ref(!1),c=i.computed(()=>{const x={fields:e.columns.map($=>Object.assign({},$,{field:$.field||$.type})),checked:[],limit:0,size:"small",sizeList:r,showLineHeight:!0,trigger:"manual"};return typeof e.settings=="boolean"?x:Object.assign({},x,e.settings)}),u=i.ref(c.value.size||"small"),f=i.ref(kn.small),h=i.ref(c.value.checked||[]),p=`light ${a("table-settings")}`,C=i.computed(()=>c.value.fields||e.columns||[]),v={checkAll:l.value,activeSize:u.value,activeHeight:f.value,checkedFields:c.value.checked||[]},N=()=>{Object.assign(v,{checkAll:l.value,activeSize:u.value,activeHeight:f.value,checkedFields:h.value}),t("change",{checked:h.value,size:u.value,height:f.value,fields:i.unref(C)}),d.value=!1},I=()=>{l.value=v.checkAll,u.value=v.activeSize,f.value=v.activeHeight,h.value=v.checkedFields,d.value=!1},y=()=>{d.value=!0},b=x=>{x.stopImmediatePropagation(),x.stopPropagation(),x.preventDefault(),l.value=!l.value;const $=c.value.fields||e.columns||[],A=$.filter((U,Y)=>U.disabled&&h.value.includes(o(U,Y))).map((U,Y)=>o(U,Y));if(l.value){const U=$.filter(Y=>!Y.disabled).map((Y,oe)=>o(Y,oe));h.value.splice(0,h.value.length,...U,...A)}else h.value.splice(0,h.value.length,...A)},w=i.computed(()=>(c.value.limit??0)>0),M=c.value.sizeList||r,S=i.computed(()=>w.value&&(c.value.limit?c.value.limit:0)<=h.value.length),L=(x,$)=>x.disabled||S.value&&!h.value.includes(o(x,$)),D=x=>{u.value=x.value,f.value=x.height},T=x=>({"line-size":!0,"is-medium":u.value==="medium",active:x.value===u.value}),E={marginRight:"12px"},P=()=>M.map(x=>i.createVNode("span",{class:T(x),onClick:()=>D(x)},[x.label])),J=i.computed(()=>h.value.length>0&&h.value.length<C.value.length),j=i.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return i.watch(()=>[h.value],()=>{h.value.length||(l.value=!1),h.value.length&&C.value.every((x,$)=>h.value.includes(o(x,$)))&&(l.value=!0)},{immediate:!0,deep:!0}),i.watch(()=>[e.settings.checked],()=>{h.value.splice(0,h.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?i.createVNode(pt,i.mergeProps({trigger:c.value.trigger??"manual",isShow:d.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>i.createVNode("span",{class:"table-head-settings",onClick:y},[i.createVNode(Os,{style:"color: #c4c6cc;"},null)]),content:()=>{var $;let x;return i.createVNode("div",{class:"setting-content"},[i.createVNode("div",{class:"setting-head"},[i.createVNode("span",{class:"head-title"},[s.value.setting.title]),i.createVNode(hi,{class:"icon-close-action",onClick:I},null)]),i.createVNode("div",{class:"setting-body"},[i.createVNode("div",{class:"setting-body-title"},[i.createVNode("div",null,[i.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),w.value?i.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(c.value.limit)]):""]),w.value?"":i.createVNode("span",{class:"check-all",onClick:b},[i.createVNode(dt,{label:s.value.setting.fields.selectAll,indeterminate:!!J.value,modelValue:h.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),i.createVNode(hr,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":A=>h.value=A},h0(x=C.value.map((A,U)=>{let Y;return i.createVNode("div",{class:"field-item"},[i.createVNode(dt,{checked:h.value.includes(o(A,U)),label:o(A,U),disabled:L(A,U)},h0(Y=Ye(A,["name","label"],[A,U]))?Y:{default:()=>[Y]})])}))?x:{default:()=>[x]}),($=n.default)==null?void 0:$.call(n),j.value?i.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,i.createTextVNode(":"),P()]):""]),i.createVNode("div",{class:"setting-footer"},[i.createVNode(Ge,{theme:"primary",style:E,onClick:N},{default:()=>[s.value.setting.options.ok]}),i.createVNode(Ge,{style:E,onClick:I},{default:()=>[s.value.setting.options.cancel]})])])}}):""}}),A7=(e,t,n)=>{if(!e.rowDraggable)return{};const a=h=>{e.rowDraggable&&(h==null||h())},s=h=>h.target.closest("tr"),r=(h,m)=>{const{y:p}=m,{top:C,bottom:v}=h.getBoundingClientRect(),N=p-C>v-p?"--bottom":"--top";o(h),h.classList.add(N)},o=(h,m=["--bottom","--top"])=>{m.forEach(p=>h.classList.remove(p))};return{onDragenter:h=>{a(()=>{h.dataTransfer.dropEffect="move";const m=s(h);m.classList.add("--drag-enter"),r(m,h)})},onDragleave:h=>{a(()=>{const m=s(h);o(m,["--drag-enter","--bottom","--top"])})},onDragstart:h=>{a(()=>{s(h).classList.add("--drag-start"),h.dataTransfer.setData("text/plain",null),h.dataTransfer.dropEffect="copy";const{rowIndex:p}=h.target.dataset;h.dataTransfer.setData("data-row-index",p)})},onDragover:h=>{h.preventDefault(),h.dataTransfer.dropEffect="move";const m=s(h);r(m,h)},onDrop:h=>{h.preventDefault(),h.stopPropagation();const m=s(h),{rowIndex:p}=m.dataset;let C=Number(p);const v=h.dataTransfer.getData("data-row-index");m.classList.contains("--bottom")&&(C=C+1),t.changePageRowIndex(Number(v),C),o(m,["--drag-enter","--bottom","--top"]),n.emit(Ve.DRAG_END,{sourceEvent:h,data:t.pageData})}}};function g0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const z7=i.defineComponent({name:"HeadFilter",props:{column:Oi,height:g.number.def(yt)},emits:["change","filterSave"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=je("table"),{column:s}=e,{filter:r}=i.toRefs(e.column),o=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.checked)??[]}),l=i.ref(""),d=i.reactive({isOpen:!1,checked:o.value}),c=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.maxHeight)??yt*15}),u=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.height)||"100%"});i.watch(()=>r.value,()=>{d.checked=o.value},{immediate:!0,deep:!0});const f=i.computed(()=>we({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:d.checked.length,opened:d.isOpen})),h=we({[n("table-head-filter")]:!0}),m=i.ref(null),p=j=>{d.isOpen=j,j&&setTimeout(()=>{m.value.reset()}),j||(l.value="")},C=`light ${n("table-head-filter")}`,v=i.computed(()=>{const{list:j=[]}=r.value,x=j.filter($=>N(l.value).test($.value));return console.log(" filterList: ",x),x}),N=(j,x="ig")=>new RegExp(`${j}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),x),I=(j,x)=>{const{match:$}=r.value,A=jr(x,Ye(s,"field",[s,x]));return $!=="fuzzy"?j.includes(A):j.some(U=>N(U,"img").test(A))},y=typeof r.value.filterFn=="function"?(j,x,$,A)=>r.value.filterFn(j,x,e.column,$,A):(j,x)=>j.length?I(j,x):!0,b=()=>{w(!0),t("filterSave",d.checked),d.isOpen=!1},w=(j=!1)=>{const{disabled:x}=S(L,a.value.confirm);if(x||j){if(r.value==="custom"){t("change",d.checked,null),d.isOpen=!1;return}r.value.checked=d.checked,t("change",d.checked,y)}},M=()=>{d.checked.length&&(d.checked.length=0,d.isOpen=!1,i.nextTick(()=>t("change",d.checked,y)))},S=(j,x)=>({disabled:j==="disabled"||j===!1,text:typeof j=="string"?j:x}),{btnSave:L,btnReset:D}=r.value,T=()=>{const{disabled:j,text:x}=S(L,a.value.confirm);return j?i.createVNode("span",{class:"btn-filter-save disabled"},[x]):i.createVNode(Ge,{theme:"primary",size:"small",style:"width: 56px; margin-right: 8px;",onClick:b},g0(x)?x:{default:()=>[x]})},E=()=>{const{disabled:j,text:x}=S(D,a.value.reset);return j?"":i.createVNode(Ge,{style:"width: 56px;",size:"small",disabled:d.checked.length===0,onClick:M},g0(x)?x:{default:()=>[x]})},P=(j,x)=>{const $=new Set(d.checked);j?$.add(x.value):$.delete(x.value),d.checked.length=0,d.checked.push(...Array.from($)),w()},J=j=>j.data.length?j.data.map(x=>i.createVNode("div",{class:"list-item"},[i.createVNode(dt,{label:x.value,key:x.$index,immediateEmitChange:!1,checked:d.checked.includes(x.value),modelValue:d.checked.includes(x.value),onChange:$=>P($,x)},{default:()=>[`${x.text}`]})])):i.createVNode("div",{class:"list-item is-empty"},[a.value.emptyText]);return()=>i.createVNode(pt,i.mergeProps({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:ds.SHOWN,arrow:!1,offset:0},{theme:C},{onAfterShow:()=>p(!0),onAfterHidden:()=>p(!1)}),{default:()=>i.createVNode($s,{class:f.value},null),content:()=>i.createVNode("div",{class:h},[i.createVNode("div",{style:"padding: 4px 10px;"},[i.createVNode(i.resolveComponent("bk-input"),{modelValue:l.value,"onUpdate:modelValue":j=>l.value=j},null)]),i.createVNode(hr,{class:"content-list"},{default:()=>[i.createVNode(za,{maxHeight:c.value,height:u.value,lineHeight:32,list:v.value,throttleDelay:0,scrollEvent:!0,ref:m,className:"content-items"},{default:J})]}),i.createVNode("div",{class:"content-footer"},[T(),E()])])})}}),V7=i.defineComponent({name:"HeadSort",props:{column:Oi,defaultSort:g.oneOf(zM).def(Qe.NULL),active:g.bool},emits:["change"],setup(e,{emit:t,expose:n}){var d,c;const{resolveClassName:a}=le(),s=((c=(d=e.column)==null?void 0:d.sort)==null?void 0:c.value)??e.defaultSort??Qe.NULL,r=i.ref(s);i.watch(()=>[e.defaultSort],([u])=>{r.value=u});const o=u=>{r.value=u},l=(u,f)=>{u.stopImmediatePropagation(),u.stopPropagation(),u.preventDefault();let h=f;f===Qe.NULL&&(h=c0(f)),r.value===f&&(h=Qe.NULL);const m=sc(e.column,h),p=d0(e.column.sort,e.column);if((p==null?void 0:p.value)==="custom"){t("change",(p==null?void 0:p.sortFn)??m,h);return}t("change",m,h)};return n({setNextSortType:o}),()=>i.createVNode("span",{class:a("head-cell-sort")},[i.createVNode(Ts,{class:["sort-action","sort-asc",e.active&&r.value===Qe.ASC?"active":""],style:"align-items: flex-end;",onClick:u=>l(u,Qe.ASC)},null),i.createVNode(ui,{class:["sort-action","sort-desc",e.active&&r.value===Qe.DESC?"active":""],style:"align-items: flex-start;",onClick:u=>l(u,Qe.DESC)},null)])}});function J7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const R7=(e,t,n,a)=>{var I;const s=i.ref((I=a.formatData.columnSchema.get(n))==null?void 0:I[be.COL_SORT_TYPE]),r=i.computed(()=>{var y;return((y=a.formatData.columnSchema.get(n))==null?void 0:y[be.COL_SORT_ACTIVE])??!1}),o=y=>{const b=a.getColumnAttribute(y,be.LISTENERS);return b?Array.from(b==null?void 0:b.keys()).reduce((w,M)=>{const S=M.split("_").slice(-1)[0];return Object.assign(w,{[S]:L=>{b.get(M).forEach(D=>Reflect.apply(D,globalThis,[L,y]))}})},{}):{}},l=(y,b,w,M)=>y.type==="index"?b(a.getRowAttribute(w,Se.ROW_INDEX),a.getRowAttribute(M,Se.ROW_INDEX)):b(w,M),d=(y,b)=>{if(!a.getColumnAttribute(b,be.COL_IS_DRAG)&&b.sort&&!b.filter){const w=a.getColumnAttribute(b,be.COL_SORT_TYPE);s.value=c0(w);const M=(S,L)=>l(b,sc(b,s.value),S,L);a.setColumnAttribute(b,be.COL_SORT_TYPE,s.value),a.setColumnAttribute(b,be.COL_SORT_FN,M),a.setColumnSortActive(b,!0),a.sortData(b),t.emit(Ve.COLUMN_SORT,{column:i.unref(b),index:y,type:s.value})}},c=y=>{d(y,n)},u=(y,b,w=!1)=>{const M=T=>{if(w){a.setRowSelectionAll(T),t.emit(Ve.ROW_SELECT_ALL,{checked:T,data:e.data});return}a.setRowSelection(y,T),t.emit(Ve.ROW_SELECT,{row:y,index:b,checked:T,data:e.data}),t.emit(Ve.ROW_SELECT_CHANGE,{row:y,index:b,checked:T,data:e.data})},S=a.getRowAttribute(y,Se.ROW_SELECTION_INDETERMINATE),L=a.getRowAttribute(y,Se.ROW_SELECTION),D=Er(e,{row:y,index:b,isCheckAll:w});return i.createVNode(dt,{onChange:M,disabled:!D,modelValue:L,indeterminate:S},null)},f=(y,b)=>{const w=(M,S)=>{const L=(D,T)=>l(y,M,D,T);a.setColumnAttribute(y,be.COL_SORT_TYPE,S),a.setColumnAttribute(y,be.COL_SORT_FN,L),a.sortData(y),a.setColumnSortActive(y,!0),t.emit(Ve.COLUMN_SORT,{column:y,index:b,type:S})};return i.createVNode(V7,{column:y,defaultSort:r.value?s.value:Qe.NULL,onChange:w,active:r.value},null)},h=(y,b)=>{const w=(S,L)=>{const D=(T,E)=>L(S,T,E);a.setColumnAttribute(y,be.COL_FILTER_FN,D),a.filter(),t.emit(Ve.COLUMN_FILTER,{checked:S,column:i.unref(y),index:b})},M=S=>{t.emit(Ve.COLUMN_FILTER_SAVE,{column:y,values:S})};return i.createVNode(z7,{column:y,height:e.headHeight,onChange:w,onFilterSave:M},null)},m=Dr(e),{cellFn:p}=m,C=(y,b)=>typeof p=="function"?p(y,b):typeof y.renderHead=="function"?y.renderHead(y,b):Ye(y,"label",[y,b]),v=(y,b)=>{if(y.type==="selection")return[u(ji,null,!0)];const w=[];y.sort&&w.push(f(y,b)),y.filter&&w.push(h(y,b));const M=C(y,b);w.unshift(i.createVNode("span",{class:"head-text"},[M]));const S=typeof M=="string"?M:void 0,L={"has-sort":!!y.sort,"has-filter":!!y.filter};return i.createVNode(f0,{class:L,title:S,observerResize:e.observerResize,resizerWay:e.resizerWay,isHead:!0,column:y,parentSetting:e.showOverflowTooltip,headExplain:Ye(y.explain,"head",[y])},J7(w)?w:{default:()=>[w]})};return{getTH:(y,b,w)=>i.createVNode("th",i.mergeProps({colspan:1,rowspan:1,"data-id":a.getColumnId(n),class:y,style:b,onClick:()=>c(w)},o(n)),[v(n,w)])}};function Q7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const $7=(e,t,n,a,s,r,o)=>{const l=je("table"),d=nn(),c=i.computed(()=>n.formatData),u=i.computed(()=>c.value.columns),f=i.computed(()=>c.value.settings),h=i.computed(()=>u.value.filter(k=>!n.getColumnAttribute(k,be.IS_HIDDEN))),m=()=>{const{isShow:k=!0}=Dr(e);if(!k)return null;const O=Q=>{const{checked:B=[],size:G,height:ne,fields:_}=Q;n.updateSettings(Q),n.setColumnAttributeBySettings(e.settings,B),B.length&&i.nextTick(()=>{o(r.value)}),t.emit(Ve.SETTING_CHANGE,{checked:B,size:G,height:ne,fields:_})};return[e.settings?i.createVNode(P7,{class:"table-head-settings",settings:e.settings,columns:u.value,onChange:O},{default:()=>{var Q,B;return[(B=(Q=t.slots).setting)==null?void 0:B.call(Q)]}}):"",i.createVNode("table",{cellpadding:0,cellspacing:0},[W(),y()])]},p=k=>{var Q,B;const O=i.computed(()=>e.emptyText===void 0?l.value.emptyText:e.emptyText);return k.length?i.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":d},[W(),S(k)]):((B=(Q=t.slots).empty)==null?void 0:B.call(Q))??i.createVNode(E7,{filterList:k,list:e.data,emptyText:O.value},null)},C=k=>i.createVNode(rc,i.mergeProps({style:"width: 100%;"},k,{modelValue:k.current,onLimitChange:O=>N(O),onChange:O=>I(O)}),null),v=(k,O)=>{const{size:Q,height:B}=f.value;return B!=null?Ye(f.value,"height",["tbody",k,O,Q]):Ye(e,"rowHeight",["tbody",k,O])},N=k=>{Object.assign(e.pagination,{limit:k}),t.emit(Ve.PAGE_LIMIT_CHANGE,k)},I=k=>{Object.assign(e.pagination,{current:k,value:k}),t.emit(Ve.PAGE_VALUE_CHANGE,k)},y=()=>{const k=Dr(e),O={"--row-height":`${Ye(k,"height",["thead"])}px`,backgroundColor:e.thead.color},{resolveFixedColumnStyle:Q}=tc(e,n,s);return i.createVNode(i.Fragment,null,[i.createVNode("thead",{style:O},[i.createVNode(oc,null,{default:()=>[i.createVNode("tr",null,[h.value.map((B,G)=>{var V;const{getTH:ne}=R7(e,t,B,n),_=Object.assign({},Q(B,a.value.hasScrollY),{"--background-color":$h[((V=e.thead)==null?void 0:V.color)??Mr.DEF1]}),R=[P(B,G),b(B),B.align||e.headerAlign||e.align];return ne(R,_,G)})])]})])])},b=(k,O)=>{const Q=k.className;if(Q){if(typeof Q=="function")return Q(O);if(typeof Q=="string")return Q}return""},w=(k,O,Q,B,G)=>{var V;G.has(k)||G.set(k,new WeakMap),G.get(k).has(B)||G.get(k).set(B,{skipRowLen:0,skipRow:!1});let{skipRowLen:ne=0}=((V=G.get(Q))==null?void 0:V.get(B))??{},_=!1;const R=Or(B,null,k,O,"rowspan");return ne>1?(ne=ne-1,_=!0):R>1&&(ne=R,_=!1),Object.assign(G.get(k).get(B),{skipRowLen:ne,skipRow:_}),{skipRowLen:ne,skipRow:_}},M=A7(e,n,t),S=k=>{let O={};const Q=new WeakMap,B=n.getRowAttribute(Wh,Se.ROW_SPAN);return i.createVNode("tbody",null,[k.map((G,ne)=>{const _=D(G,ne,O,k,Q,B);return O=G,_})])},{resolveFixedColumnStyle:L}=tc(e,n,s),D=(k,O,Q,B,G,ne,_=!1)=>{const R=B.length,V=[...Ei(e.rowStyle,[k,O]),{"--row-height":`${v(k,O)}px`}],q=[...Ei(e.rowClass,[k,O]),`hover-${e.rowHover}`,O%2===1&&e.stripe?"stripe-row":""],se=n.getRowAttribute(k,Se.ROW_UID);return[i.createVNode(oc,{key:se},{default:()=>[i.createVNode("tr",i.mergeProps({style:V,class:q,key:o0(k,e,O),"data-row-index":O,onClick:H=>J(H,k,O,B),onDblclick:H=>j(H,k,O,B),onMouseenter:H=>x(H,k,O,B),onMouseleave:H=>$(H,k,O,B),draggable:!!e.rowDraggable},M),[h.value.map((H,ie)=>{const Z=[L(H),...Ei(e.cellStyle,[H,ie,k,O])],{colspan:K,rowspan:X}=w7(H,ie,k,O),{skipCol:ae}=n.getColumnAttribute(H,be.COL_SPAN),{skipRow:pe}=ne&&!_?w(k,ie,Q,H,G):{skipRow:!1},ee={"expand-cell":H.type==="expand"};if(!pe&&!ae){let re;const ge=[E(H,ie),b(H,k),H.align||e.align,...Ei(e.cellClass,[H,ie,k,O]),{"expand-row":n.getRowAttribute(k,Se.ROW_EXPAND),"is-last":O+X>=R}],Ne=(ve,Ie)=>{const ke={event:ve,row:k,column:H,cell:{getValue:()=>z(k,H,O,B,_)},rowIndex:O,columnIndex:ie};t.emit(Ie,ke)};return i.createVNode("td",{class:ge,style:Z,colspan:K,rowspan:X,onClick:ve=>Ne(ve,Ve.CELL_CLICK),onDblclick:ve=>Ne(ve,Ve.CELL_DBL_CLICK)},[i.createVNode(f0,{class:ee,column:H,row:k,parentSetting:e.showOverflowTooltip,observerResize:e.observerResize},Q7(re=z(k,H,O,B,_))?re:{default:()=>[re]})])}return null})])]}),T(k,q)]},T=(k,O,Q)=>{if(n.getRowAttribute(k,Se.ROW_EXPAND)){const G=[...O,{row_expend:!0}],_=`${n.getRowAttribute(k,Se.ROW_UID)}_expand`;return Array.isArray(k.children)?k.children.map((R,V)=>D(R,V,{},k,{},!1,!0)):i.createVNode(oc,{key:_},{default:()=>{var R,V;return[i.createVNode("tr",{class:G},[i.createVNode("td",{colspan:h.value.length,rowspan:1},[((V=(R=t.slots).expandRow)==null?void 0:V.call(R,k))??i.createVNode("div",{class:"expand-cell-ctx"},[i.createTextVNode("Expand Row")])])])]}})}},E=(k,O)=>({[`${d}-column-${O}`]:!1,column_fixed:!!k.fixed,column_fixed_left:!!k.fixed,column_fixed_right:k.fixed==="right"}),P=(k,O)=>({...E(k,O)}),J=(k,O,Q,B)=>{t.emit(Ve.ROW_CLICK,k,O,Q,B)},j=(k,O,Q,B)=>{t.emit(Ve.ROW_DBL_CLICK,k,O,Q,B)},x=(k,O,Q,B)=>{t.emit(Ve.ROW_MOUSE_ENTER,k,O,Q,B)},$=(k,O,Q,B)=>{t.emit(Ve.ROW_MOUSE_LEAVE,k,O,Q,B)},A=k=>{var B,G;const Q=n.getRowAttribute(k,Se.ROW_EXPAND)?i.createVNode(gi,null,null):i.createVNode(vi,null,null);return i.createVNode("span",null,[[Q,((G=(B=t.slots).expandContent)==null?void 0:G.call(B,k))??""]])},U=(k,O,Q,B,G)=>{n.setRowExpand(k,!n.getRowAttribute(k,Se.ROW_EXPAND)),t.emit(Ve.ROW_EXPAND_CLICK,{row:k,column:O,index:Q,rows:B,e:G})},Y=(k,O,Q,B)=>{const G=jr(k,Ye(O,"field",[O,k])),ne=k;return O.render({cell:G,data:ne,row:k,column:O,index:Q,rows:B})},oe=(k,O,Q=!1)=>{const B=R=>{if(Q){n.setRowSelectionAll(R),t.emit(Ve.ROW_SELECT_ALL,{checked:R,data:e.data});return}n.setRowSelection(k,R),t.emit(Ve.ROW_SELECT,{row:k,index:O,checked:R,data:e.data}),t.emit(Ve.ROW_SELECT_CHANGE,{row:k,index:O,checked:R,data:e.data})},G=n.getRowAttribute(k,Se.ROW_SELECTION_INDETERMINATE),ne=n.getRowAttribute(k,Se.ROW_SELECTION),_=Er(e,{row:k,index:O,isCheckAll:Q});return i.createVNode(dt,{onChange:B,disabled:!_,modelValue:ne,indeterminate:G},null)},F=(k,O,Q,B)=>{const G=()=>{var ne,_;return typeof O.render=="function"?Y(k,O,Q,B):((_=(ne=t.slots).expandCell)==null?void 0:_.call(ne,{row:k,column:O,index:Q,rows:B}))??A(k)};return i.createVNode("span",{class:"expand-btn-action",onClick:ne=>U(k,O,Q,B,ne)},[G()])},te=(k,O,Q,B)=>{var R,V,q;const G=((R=e.rowDraggable)==null?void 0:R.render)??e.rowDraggable;if(typeof G=="function")return G(k,O,Q,B);const ne=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((q=e.rowDraggable)==null?void 0:q.icon)??i.createVNode(_s,{class:"drag-cell",style:`'--font-size: ${ne};'`},null)},z=(k,O,Q,B,G=!1)=>{var R;const ne=()=>{if(Ye(O,"type",[O,k])==="index")return n.getRowAttribute(k,Se.ROW_INDEX);const q=Ye(O,"field",[O,k]),se=jr(k,q);if(typeof O.render=="function")return Y(k,O,Q,B);if(typeof se=="boolean")return String(se);if(!se&&typeof se!="number"){const{emptyCellText:H}=e;if(H)return typeof H=="function"?H(k,O,Q,B):H}return typeof se=="object"?JSON.stringify(i.unref(se)):se},_={expand:(V,q,se,H)=>G?"":F(V,q,se,H),selection:(V,q,se,H)=>oe(V,se),drag:te};return((R=_[O.type])==null?void 0:R.call(_,k,O,Q,B))??ne()},W=()=>i.createVNode("colgroup",null,[(h.value||[]).map((k,O)=>{const Q=we({}),B=`${p7(n.getColumnOrderWidth(k))}`.replace(/px$/i,""),G=n.getColumnAttribute(k,be.COL_MIN_WIDTH);return i.createVNode("col",{class:Q,width:B,style:{minWidth:ic(G,"auto")}},null)})]);return{renderTableHeadSchema:m,renderTableBodySchema:p,renderTableFooter:C}},m0=qe(i.defineComponent({name:"Table",props:WM,emits:aI,setup(e,t){const n=i.ref(),a=i.ref(),s=i.ref(),r=i.ref(0),o=new GM,l=i.reactive([]),{initColumns:d,columns:c}=u0(e,l),u=L7(e),{resizeColumnStyle:f,resizeHeadColStyle:h,registerResizeEvent:m}=iI(u,!1,a);i.provide(_h,d),i.provide(Hh,o);const{tableClass:p,headClass:C,footerClass:v,wrapperStyle:N,contentStyle:I,headStyle:y,hasScrollYRef:b,hasFooter:w,footerStyle:M,tableBodyClass:S,resizeColumnClass:L,tableBodyContentClass:D,loadingRowClass:T,columnGhostStyle:E,fixedContainerStyle:P,scrollClass:J,prependStyle:j,resetTableHeight:x}=T7(e,c,n,u,u.pageData),{renderScrollLoading:$}=sI(e,t),{fixedWrapperClass:A,fixedColumns:U,resolveFixedColumns:Y,updateFixClass:oe}=tc(e,u,a),{resolveClassName:F}=le(),te=i.computed(()=>({hasScrollY:b.value})),{renderTableBodySchema:z,renderTableFooter:W,renderTableHeadSchema:k}=$7(e,t,u,te,a,n,x),O=()=>{if(!(n!=null&&n.value))return;const R=n.value.querySelector(`.${F("table-body-content")}`),V=R.querySelector("table");if(V){const q=V.scrollWidth,se=R.clientWidth;r.value=q-se}},Q=i.ref(!0);i.watch(()=>[e.data,c],()=>{u.setIndexData().then(()=>{u.formatColumns(c),u.formatDataSchema(e.data),u.resetStartEndIndex(),Q.value?(u.resolveByDefColumns(),Q.value=!1):u.resolvePageData(),m(),i.nextTick(()=>{O(),Y(r.value),i.nextTick(()=>{x(n.value)})})})},{immediate:!0,deep:!0}),i.watch(()=>[e.height,e.maxHeight,e.minHeight],()=>{i.nextTick(()=>{x(n.value)})}),i.watch(()=>[e.settings],()=>{u.updateSettings(e.settings)},{deep:!0}),i.watch(()=>[e.rowHeight],()=>{u.updateSettings(void 0,e.rowHeight)});const B=R=>{const V=u.formatData.layout.bottom??0,q=R[1],{translateX:se,translateY:H,pos:ie={}}=q;u.formatData.layout.translateY=H,u.formatData.layout.translateX=se,Object.assign(u.formatData.layout,ie||{});const{bottom:Z}=ie;Z<=2&&V>Z&&ba(60,()=>{t.emit(Ve.SCROLL_BOTTOM,{...ie,translateX:se,translateY:H})},!0)(),O(),oe(r.value)},G=(R={left:0,top:0})=>{var V,q;(q=(V=s.value)==null?void 0:V.scrollTo)==null||q.call(V,R)},ne=()=>n.value;t.expose({setRowExpand:u.setRowExpand,setAllRowExpand:u.setAllRowExpand,clearSelection:u.clearSelection,toggleAllSelection:u.toggleAllSelection,toggleRowSelection:u.toggleRowSelection,getSelection:u.getRowSelection,clearSort:u.clearColumnSort,scrollTo:G,getRoot:ne});const _=()=>t.slots.prepend?i.createVNode("div",{style:j.value,class:"prepend-row"},[t.slots.prepend()]):null;return()=>{var R,V;return i.createVNode("div",{class:p.value,style:N.value,ref:n},[i.createVNode("div",{class:C,style:y.value,ref:a},[k(),i.createVNode("div",{class:"col-resize-drag",style:h.value},null)]),i.createVNode(za,i.mergeProps({ref:s,lineHeight:u.formatData.settings.height,height:I.height,class:S.value,wrapperStyle:I,list:u.pageData},J.value,{contentClassName:D.value,onContentScroll:B,throttleDelay:120,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:()=>_(),default:q=>z(q.data),afterSection:()=>[i.createVNode("div",{class:L,style:f.value},null)]}),i.createVNode("div",{class:A,style:P.value},[U.map(({isExist:q,className:se,style:H})=>q?"":i.createVNode("div",{class:se,style:H},null)),i.createVNode("div",{class:T},[$()])]),i.createVNode("div",{class:v.value,style:M.value},[w.value&&W(u.localPagination.value)]),i.createVNode("div",{style:E},[(V=(R=t.slots).default)==null?void 0:V.call(R)])])}}}),{Column:BM}),Ja=12;function _7(e){const t=i.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const r=[];if(t.pageSize>0)for(let o=0;o<t.totalSize;o+=t.pageSize)r.push(s.slice(o,o+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...r),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function H7(e){const{useGroup:t,saveKey:n,displayKey:a,list:s}=i.toRefs(e),r=i.ref([]),o=i.ref({});return i.watch([t,n,a,s],()=>{r.value=[];let l=i.markRaw(s.value);t.value&&(l=l.reduce((d,c)=>{let u=[];return c.children&&(u=c.children.map(f=>({group:{groupId:c[n.value],groupName:c[a.value]},...f}))),d.concat(u)},[])),r.value=l,o.value=l.reduce((d,c)=>(d[c[n.value]]=c,d),{})},{immediate:!0,deep:!0}),{flatList:r,saveKeyMap:o}}const p0=e=>{const t=e.length;let n=0;for(let a=0;a<t;a++)e.charCodeAt(a)&65280&&(n+=1),n+=1;return n},y0=(e,t,n)=>{i.watch([n,t],()=>{s()},{flush:"post"});const a=i.ref(null),s=()=>{t.value&&(a.value=null,setTimeout(()=>{const r=Array.from(e.value.querySelectorAll(".tag-item")),o=r.findIndex((l,d)=>d?r[d-1].offsetTop!==l.offsetTop:!1);a.value=o>0?o-1:null}))};return{overflowTagIndex:a}},b0=i.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function},disabled:g.bool.def(!1)},render(){const{resolveClassName:e}=le(),t=a=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return a.replace(s,'<strong class="highlight-text">$1</strong>')}return a};if(this.tpl)return this.tpl(this.node,t,i.h,this);const n=this.node[this.displayKey];return i.createVNode("div",{class:`${e("selector-node")}`},[i.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),W7=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def(""),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:me("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),isAsyncList:g.bool.def(!1),leftSpace:g.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:()=>({})}}),F7=i.defineComponent({name:"TagRender",directives:{bkTooltips:Tn},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=i.ref(),n=i.ref(!1),a=i.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value,...e.tagOverflowTips}));return i.onMounted(()=>{n.value=sg(t.value)}),{overflowTips:a,tagRef:t}},render(){return this.tpl?this.tpl(this.node,i.h,this):i.withDirectives(i.createVNode("div",{class:"tag",ref:"tagRef"},[i.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[i.resolveDirective("bk-tooltips"),this.overflowTips]])}}),B7=i.defineComponent({name:"TagInput",directives:{bkTooltips:Tn},props:W7(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=kt(),a=je("tagInput"),s=i.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),r=i.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:o}=le(),{maxResult:l}=i.toRefs(e),{pageState:d,initPage:c,pageChange:u}=_7(l),f=i.ref(""),h=i.ref(null),m=i.ref(null),p=i.ref(null),C=i.ref(null),v=i.ref(null),N=i.ref(null),I=i.computed(()=>!e.disabled&&e.hasDeleteIcon),y=i.computed(()=>e.maxData===1),b=i.computed(()=>L.selectedTagList.length===0&&f.value===""&&!s.isEdit),w=i.computed(()=>e.placeholder||a.value.placeholder),M=i.computed(()=>e.clearable&&!e.disabled&&L.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),S=i.computed(()=>({[`${o("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),L=i.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),D=i.computed(()=>L.selectedTagList.map(ee=>ee[e.saveKey])),{flatList:T,saveKeyMap:E}=H7(e),P=i.computed(()=>{if(e.useGroup){const ee={};return d.curPageList.forEach((re,ge)=>{re.__index__=ge,ee[re.group.groupId]||(ee[re.group.groupId]={id:re.group.groupId,name:re.group.groupName,children:[]}),ee[re.group.groupId].children.push(re)}),Object.keys(ee).map(re=>ee[re])}return d.curPageList});i.watch([()=>T.value],()=>{i.nextTick(()=>{A()})},{deep:!0}),i.watch(()=>e.modelValue,ee=>{var re;oe(D.value,ee)||(i.nextTick(()=>{A()}),e.withValidate&&((re=n==null?void 0:n.validate)==null||re.call(n,"change")))}),i.watch(f,Xi(()=>{const ee=d.curPageList.length!==0,{value:re}=f;re!==""&&ee||re===""&&e.trigger==="focus"&&ee?r.isShow=!0:(e.trigger!=="focus"||!ee)&&(r.isShow=!1)},150)),i.watch(()=>r.isShow,ee=>{J(),ee&&v.value&&(i.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",j),v.value.addEventListener("scroll",j))}),i.onMounted(()=>{A()});const J=()=>{var ee;r.offset.crossAxis=y.value?0:(ee=C.value)==null?void 0:ee.offsetLeft},j=()=>{if(d.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:ee,offsetHeight:re,scrollHeight:ge}=v.value;if(ee+re>=ge){const Ne=d.curPage+1;Ne<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{u(Ne)},500))}},x=()=>{var re;return Array.from(((re=p.value)==null?void 0:re.childNodes)||[]).filter(ge=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(ge.nodeType))},$=ee=>{if(!e.disabled){if(ee!=null&&ee.target){const{className:re}=ee.target;(re.indexOf(`${o("tag-input-trigger")}`)>-1||re.indexOf("tag-list")>-1)&&p.value.appendChild(C.value)}clearTimeout(N.value),y.value&&D.value.length&&(L.tagListCache=[...D.value],L.selectedTagListCache=[...L.selectedTagList],f.value=L.selectedTagListCache[0][e.saveKey],K(L.selectedTagList[0],0),k()),s.isEdit=!0,setTimeout(()=>{var re;(re=h.value)==null||re.focus(),e.trigger==="focus"&&L.localList.length!==0&&(U(),r.isShow?J():r.isShow=!0)},200)}},A=()=>{const{saveKey:ee,modelValue:re,displayKey:ge,allowCreate:Ne,trigger:ve,isAsyncList:Ie}=e;if(L.selectedTagList=[],L.localList=T.value,re.length){const ke={};L.selectedTagList=re.map(De=>{const Oe=E.value[De];return ke[De]=1,!Oe&&Ne?{[ee]:De,[ge]:De}:Oe}).filter(De=>De),y.value||(L.localList=L.localList.filter(De=>!ke[De[ee]]))}if(Ie&&f.value){U(f.value),d.curPageList.length&&(r.isShow=!0);return}ve==="focus"&&U()},U=(ee="")=>{const{searchKey:re,filterCallback:ge}=e,Ne=ee.toLowerCase().trim();if(Ne===""){c(L.localList);return}let ve=[];typeof ge=="function"?ve=ge(Ne,re,L.localList)||[]:Array.isArray(re)?ve=L.localList.filter(Ie=>re.some(ke=>Ie[ke].toLowerCase().indexOf(Ne)>-1)):ve=L.localList.filter(Ie=>Ie[re].toLowerCase().indexOf(Ne)>-1),c(ve)},Y=(ee,re)=>{const ge={[`${o("selector-actived")}`]:!0,[`${o("selector-selected")}`]:D.value.includes(ee[e.saveKey])};return e.useGroup?ge[`${o("selector-actived")}`]=ee.__index__===s.focusItemIndex:ge[`${o("selector-actived")}`]=re===s.focusItemIndex,ge};function oe(ee,re){return ee.length!==re.length?!1:re.every((ge,Ne)=>ee[Ne]===ge)}const F=()=>{L.tagListCache=[],L.selectedTagListCache=[],L.selectedTagList=[]},te=()=>{f.value=""},z=()=>{if(y.value)return 0;const re=x().findIndex(({id:ge})=>ge==="tagInputItem");return re>=0?re:0},W=(ee,re,ge=!1)=>{if(!re||!ee)return;let Ne=re;ge&&(Ne=re.nextElementSibling||null),re.parentNode.insertBefore(ee,Ne)},k=ee=>{const{maxData:re,trigger:ge,allowCreate:Ne}=e;if(re===-1||re>D.value.length){const{value:ve}=ee!=null&&ee.target?ee.target:f,Ie=p0(ve);Ie?(U(ve),h.value.style.width=`${Ie*Ja}px`):ge==="focus"&&U()}else Q(),f.value="",r.isShow=!1;s.isEdit=!0,s.focusItemIndex=Ne?-1:0,t("input",f.value)},O=()=>{var ee;r.width=y.value?(ee=m.value)==null?void 0:ee.clientWidth:e.contentWidth,t("focus")},Q=()=>{N.value=setTimeout(()=>{var re;const ee=f.value;if(te(),s.isEdit=!1,e.allowAutoMatch&&ee){if(y.value){const[Ne]=L.tagListCache;ee===Ne&&L.selectedTagListCache.length?Z(L.selectedTagListCache[0],"select"):ne("remove")}const ge=d.curPageList.find(Ne=>Array.isArray(e.searchKey)?e.searchKey.map(Ie=>Ne[Ie]).includes(ee):Ne[e.searchKey]===ee);ge?B(ge,"select"):e.allowCreate&&B(ee,"custom")}r.isShow=!1,t("blur",ee,D.value),(re=n==null?void 0:n.validate)==null||re.call(n,"blur")},200)},B=(ee,re,ge)=>{ge==null||ge.stopPropagation(),!(!ee||ee.disabled)&&(y.value&&F(),Z(ee,re),ne("select"),te(),r.isShow=!1)},G=(ee,re,ge)=>{ge==null||ge.stopPropagation(),K(ee,re),te(),ne("remove",ee),h.value.style.width=`${Ja}px`},ne=(ee,re)=>{t(ee,re),t("update:modelValue",D.value),t("change",D.value)},_=ee=>{ee.stopPropagation();const re=L.selectedTagList;L.selectedTagList=[];const ge=re.filter(Ne=>E.value[Ne[e.saveKey]]);(e.allowCreate&&ge.length!==0||!e.allowCreate)&&!y.value&&L.localList.push(...ge),ne("removeAll")},R=()=>{const ee={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};i.nextTick(()=>{const re=v.value.querySelector(`.${o("selector-actived")}`);if(!re)return;const ge={height:re.clientHeight,yAxis:re.getBoundingClientRect().y};ge.yAxis<ee.yAxis&&(v.value.scrollTop=v.value.scrollTop-(ee.yAxis-ge.yAxis));const Ne=ge.yAxis+ge.height-ee.yAxis;Ne>ee.height&&(v.value.scrollTop=v.value.scrollTop+Ne-ee.height)})},V=(ee,re)=>{const ge=x();W(C.value,ge[ee-1]),L.selectedTagList.splice(ee-1,1),$();const Ne=E.value[re[e.saveKey]];(e.allowCreate&&Ne||!e.allowCreate)&&!y.value&&L.localList.push(re),h.value=`${Ja}px`,ne("remove")},q=ee=>{if(d.isPageLoading)return;let re;const ge=ee.target.value,Ne=p0(ge),ve=z(),Ie=x();switch(ee.code){case"ArrowUp":if(ee.preventDefault(),!r.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=d.curPageList.length-1),R();break;case"ArrowDown":if(ee.preventDefault(),!r.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),R();break;case"ArrowLeft":if(s.isEdit=!0,!Ne){if(ve<1)return;W(C.value,Ie[ve-1]),$()}break;case"ArrowRight":if(s.isEdit=!0,!Ne){if(ve===Ie.length-1)return;W(Ie[ve+1],C.value),$()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&r.isShow||e.allowCreate&&s.focusItemIndex>=0&&r.isShow?B(d.curPageList[s.focusItemIndex],"select",ee):e.allowCreate&&f.value.trim()&&B(f.value,"custom",ee),ee.preventDefault();break;case"Backspace":ve!==0&&!f.value&&(re=L.selectedTagList[ve-1],V(ve,re));break}},se=ee=>{const re=[],ge=ee.split(";"),Ne=/^[a-zA-Z][a-zA-Z_]*/g;return ge.forEach(ve=>{const Ie=ve.match(Ne);if(Ie){const ke=Ie.join("");re.push({[e.saveKey]:ke,[e.displayKey]:ke})}}),re},H=ee=>{if(ee.preventDefault(),y.value)return!1;const{maxData:re,saveKey:ge,displayKey:Ne,pasteFn:ve,allowCreate:Ie}=e,ke=ee.clipboardData.getData("text");let Oe=(ve?ve(ke):se(ke)).map(Ae=>Ae[ge]);if(Oe.length){const Ae=x(),St=z(),Re=L.localList.map(xe=>xe[ge]);if(Oe=Oe.filter(xe=>{const Pn=(xe==null?void 0:xe.trim())&&!D.value.includes(xe);return Ie?Pn:Pn&&Re.includes(xe)}),re!==-1){const xe=L.selectedTagList.length;if(xe<re){const Pn=re-xe;Oe.length>Pn&&(Oe=[...Oe.slice(0,Pn)])}else Oe=[]}const Ze=Ie?Oe.map(xe=>L.localList.find(Fc=>Fc[ge]===xe)??{[ge]:xe,[Ne]:xe}):L.localList.filter(xe=>Oe.includes(xe[ge]));Oe.length&&(L.selectedTagList.splice(St,0,...Ze),W(C.value,Ae[St]),h.value.style.width=`${Ja}px`,L.localList=L.localList.filter(xe=>!Oe.includes(xe[ge])),ne("select"),$())}},ie=ee=>{e.disabled||(W(C.value,ee.currentTarget,!0),h.value.style.width=`${Ja}px`,r.isShow&&J())},Z=(ee,re)=>{if(L.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ge,saveKey:Ne,displayKey:ve,createTagValidator:Ie}=e,ke=z();let De=1,Oe=!1,Ae;const St=Re=>typeof Ie=="function"?Ie(Re):!0;if(re==="custom")if(ge){let Re=ee.split(ge);Re=Re.filter(xe=>(xe==null?void 0:xe.trim())&&!D.value.includes(xe)&&St(xe));const Ze=Re.map(xe=>E.value[xe]||{[Ne]:xe,[ve]:xe});Re.length&&(L.selectedTagList.splice(ke,0,...Ze),De=Ze.length,Oe=!0)}else{const Re=typeof ee=="object";if(Ae=Re?ee[Ne]:ee.trim(),Ae=Ae.replace(/\s+/g,""),Ae!==void 0&&!D.value.includes(Ae)&&St(Ae)){const Ze=E.value[Ae]||(Re?ee:{[Ne]:Ae,[ve]:Ae});L.selectedTagList.splice(ke,0,Ze),Oe=!0}}else ee&&(Ae=ee[Ne],Ae!==void 0&&!D.value.includes(Ae)&&(L.selectedTagList.splice(ke,0,ee),Oe=!0));Oe&&i.nextTick(()=>{for(let Re=1;Re<=De;Re++){const xe=x()[ke+Re];W(xe,C.value)}if(h.value.style.width=`${Ja}px`,!y.value){e.allowNextFocus&&$();const Re=D.value.reduce((Ze,xe)=>(Ze[xe]=1,Ze),{});L.localList=L.localList.filter(Ze=>!Re[Ze[Ne]])}})},K=(ee,re)=>{L.selectedTagList.splice(re,1);const ge=E.value[ee[e.saveKey]];(e.allowCreate&&ge||!e.allowCreate)&&!y.value&&L.localList.push(ee)},X=i.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:ae}=y0(m,X,D),pe=i.computed(()=>L.selectedTagList.reduce((ee,re,ge)=>(ae.value!==null&&ge>=ae.value&&ee.push(re[e.displayKey]),ee),[]));return{popoverProps:r,...i.toRefs(s),...i.toRefs(L),...i.toRefs(d),isShowPlaceholder:b,isShowClear:M,placeholderText:w,curInputValue:f,renderList:P,showTagClose:I,tagInputRef:h,bkTagSelectorRef:m,tagListRef:p,tagInputItemRef:C,selectorListRef:v,triggerClass:S,overflowTagIndex:ae,localCollapseTags:X,collapseTooltip:pe,focusInputTrigger:$,activeClass:Y,handleInput:k,handleFocus:O,handleBlur:Q,handleTagSelected:B,handleTagRemove:G,handleClear:_,tagFocus:ie,handleKeydown:q,handlePaste:H,resolveClassName:o}},render(){return i.createVNode("div",{class:`${this.resolveClassName("tag-input")}`,ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[i.createVNode(pt,i.mergeProps({theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t;return i.createVNode("div",{class:this.triggerClass},[i.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((n,a)=>{const s={boundary:"window",theme:"light",distance:12,content:n[this.tooltipKey],disabled:!this.tooltipKey},r=this.localCollapseTags&&this.overflowTagIndex&&a>=this.overflowTagIndex;return i.withDirectives(i.createVNode("li",{class:"tag-item",style:{display:r?"none":""},onClick:this.tagFocus},[i.createVNode(F7,{node:n,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?i.createVNode(lt,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,a)},null):null]),[[i.resolveDirective("bk-tooltips"),s]])}),i.withDirectives(i.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[i.withDirectives(i.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":n=>this.curInputValue=n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[i.vModelText,this.curInputValue]])]),[[i.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&i.withDirectives(i.createVNode("li",{class:"tag-item"},[i.createVNode("div",{class:"tag"},[i.createVNode("span",{class:"text"},[i.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[i.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]])]),i.withDirectives(i.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[i.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&i.createVNode(ot,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>i.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[i.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?i.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[i.createVNode("span",{class:"group-name"},[e.name,i.createTextVNode(" ("),e.children.length,i.createTextVNode(")")]),i.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,a)=>i.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,a)],onClick:this.handleTagSelected.bind(this,n,"select")},[i.createVNode(b0,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue,disabled:n.disabled},null)]))])]):i.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[i.createVNode(b0,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue,disabled:e.disabled},null)])),this.isPageLoading?i.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[i.createVNode(vn,{theme:"primary",size:Bn.Small},null)]):null])])})])}}),C0=Le(B7),G7={direction:Zd(),align:So().def(ls.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:Yd()},v0=Le(i.defineComponent({name:"Divider",props:G7,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`},{resolveClassName:t}=le();let n;return this.$slots.default&&(n=i.createVNode("div",{class:[t("divider-info"),t(`divider-info-${this.align}`)]},[this.$slots.default()])),i.createVNode("div",{class:[t("divider"),t(`divider-${this.direction}`)],style:e()},[n])}}));var Pr=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid",e))(Pr||{}),Pi=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Pi||{});const N0=me("position",{}).def("top");var w0=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(w0||{});const M0=me("sortType",{}).def("replace"),Z7={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Y7={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,tips:g.string,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:To(),panel:g.string||g.func},U7={active:g.oneOfType([g.number,g.string]).def(""),type:me("type",{}).def("border-card"),tabPosition:N0,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:M0,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3),activeBarSize:g.number.def(2),activeBarColor:g.string.def("#3a84ff")},K7={active:g.oneOfType([g.number,g.string]).def(""),type:me("type",{}).def("border-card"),activeBarColor:g.string.def("#3a84ff"),activeBarSize:g.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:N0,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:M0,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3),...Z7},I0=i.defineComponent({name:"TabNav",directives:{bkTooltips:Tn},props:K7,setup(e){const t=i.ref(null),n=i.computed(()=>{const u={width:0,height:0,bottom:0,left:0};if(!t.value)return u;if([Pi.LEFT,Pi.RIGHT].includes(e.tabPosition)){const{clientHeight:f,offsetTop:h}=t.value,m={width:`${e.activeBarSize}px`,height:`${f}px`,top:`${h}px`,background:e.activeBarColor};return e.tabPosition===Pi.LEFT?m.right=0:m.left=0,m}if(e.type===Pr.UNBORDER_CARD){const{clientWidth:f,offsetLeft:h}=t.value;return{width:`${f}px`,height:`${e.activeBarSize}px`,left:`${h}px`,bottom:0,background:e.activeBarColor}}return u}),a=i.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const u=[];let f=!1;return e.panels.filter((h,m)=>{if(!h.props)return null;const{name:p,label:C,closable:v,visible:N,disabled:I,sortable:y,tips:b}=h.props;if(!N)return!1;e.active===p&&(f=!0);const w=M=>h.slots.label?i.h(h.slots.label):[void 0,""].includes(M)?`选项卡${m+1}`:typeof M=="string"?M:typeof M=="function"?i.h(M):M;return u.push({name:p,closable:v,visible:N,disabled:I,sortable:y,tips:b,tabLabel:w(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),u}),s=i.ref(-1),r=i.ref(-1),o=i.ref(""),l=(u,f)=>u===f,d={handleTabAdd(u){e.tabAdd(u)},dragstart(u,f){r.value=u,o.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(u,f)},dragenter(u){l(o.value,e.guid)&&(s.value=u)},dragend(){s.value=-1,r.value=-1,o.value=null},drop(u,f){if(!l(o.value,e.guid))return!1;e.tabSort(r.value,u,f)},handleTabChange(u){e.tabChange(u)},handleTabRemove(u,f){e.tabRemove(u,f)}},{resolveClassName:c}=le();return{...d,activeRef:t,activeBarStyle:n,navs:a,dragenterIndex:s,dragStartIndex:r,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:c}},render(){const{active:e,closable:t,addable:n,sortable:a,sortType:s,labelHeight:r,dragstart:o,dragenter:l,dragend:d,drop:c}=this,u=()=>this.navs.map((C,v)=>{if(!C)return null;const{name:N,disabled:I,tabLabel:y}=C,b=()=>{const M=[this.resolveClassName("tab-header-item")];return I&&M.push(this.resolveClassName("tab-header--disabled")),e===N&&M.push(this.resolveClassName("tab-header--active")),M.join(" ")},w=(M,S)=>!I&&(M||S);return i.withDirectives(i.createVNode("div",{key:N,onClick:()=>!I&&this.handleTabChange(N),draggable:w(C.sortable,a),onDragstart:M=>o(v,M),ref:e===N?"activeRef":"",onDragenter:M=>{M.preventDefault(),l(v)},onDragleave:M=>{M.preventDefault()},onDragover:M=>{M.preventDefault()},onDragend:M=>{M.preventDefault(),d()},onDrop:M=>{M.preventDefault(),c(v,s)},class:b()},[i.createVNode("div",null,[y]),w(C.closable,t)?i.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(v,C)},[i.createVNode(ot,null,null)]):""]),[[i.resolveDirective("bk-tooltips"),{content:C.tips,disabled:!C.tips}]])}),f=()=>{var v,N;const C=[];return typeof this.$slots.add=="function"?C.push((N=(v=this.$slots).add)==null?void 0:N.call(v,i.h)):n&&C.push(i.createVNode("div",{onClick:this.handleTabAdd},[i.createVNode(Ci,{style:"display:flex;",width:26,height:26},null)])),C.length?i.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[C.map((I,y)=>i.createVNode("div",{class:this.resolveClassName("tab-header-item"),key:y},[I]))]):null},h=()=>this.type===Pr.UNBORDER_CARD?i.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",m=typeof this.$slots.setting=="function"?i.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,p=f();return i.createVNode("div",{style:{lineHeight:`${r}px`},class:this.resolveClassName("tab-header")},[i.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),p||m?"tab-header-auto":""]},[h(),u()]),p,m])}}),L0=qe(i.defineComponent({name:"Tab",components:{TabNav:I0},props:U7,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 a=i.ref(!1),s=i.ref([]),r=i.getCurrentInstance(),o=(u,f=[])=>{const{children:h}=u;return(h||[]).forEach(m=>{let{type:p}=m;p=p.name||p,p==="TabPanel"&&m.component?f.push(m.component):(p===i.Fragment||p==="template")&&o(m,f)}),f},l=()=>{if(t.default){const{children:u}=r.subTree.children[1];if(!u)return;const f=u[0],h=o(f);h.length!==s.value.length&&(s.value=h)}};i.onMounted(()=>{l(),a.value=!0,i.onUpdated(()=>{l()})});const d={tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,f){n("remove",u,f),n("remove-panel",u,f)},tabSort(u,f,h){const m=s.value;if(h===w0.INSERT)if(u<f)m.splice(f+1,0,s[u]),m.splice(u,1);else if(u>f)m.splice(f,0,s[u]),m.splice(u+1,1);else return!1;else{const p=m[f];m[f]=m[u],m[u]=p}s.value=[...m],n("sort",u,f,h),n("sort-change",u,f,h)},tabDrag(u,f){n("drag",u,f),n("on-drag-tab",u,f)}},{resolveClassName:c}=le();return{...d,isMounted:a,panels:s,resolveClassName:c}},render(){var n,a;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Pi.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===Pr.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:r,type:o,closable:l,addable:d,sortable:c,sortType:u,labelHeight:f,scrollStep:h,validateActive:m,changeOnHover:p,changeOnHoverDelay:C,tabPosition:v,activeBarSize:N,activeBarColor:I,tabAdd:y,tabChange:b,tabRemove:w,tabSort:M,tabDrag:S}=this,L={panels:s,active:r,type:o,closable:l,addable:d,sortable:c,sortType:u,labelHeight:f,scrollStep:h,validateActive:m,changeOnHover:p,changeOnHoverDelay:C,tabPosition:v,activeBarSize:N,activeBarColor:I,tabAdd:y,tabChange:b,tabRemove:w,tabSort:M,tabDrag:S};return!s||!Array.isArray(s)?null:i.createVNode(I0,L,this.$slots)};return i.createVNode("div",{class:e()},[t(),i.createVNode("div",{class:this.resolveClassName("tab-content")},[(a=(n=this.$slots).default)==null?void 0:a.call(n)])])}}),{TabPanel:i.defineComponent({name:"TabPanel",props:Y7,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(i.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=le();return i.withDirectives(i.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[i.vShow,e]])}})}),dn={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let T0=1;const S0=(e,t)=>{let n=t;const a=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,r=n.offsetX||10;let o=n.offsetY||30;const{spacing:l=10}=n;dn[a].forEach(h=>{o+=(h.el.offsetHeight||0)+l}),T0+=1;const d=`message_${T0}`;n={...n,offsetX:r,offsetY:o,id:d};const c=document.createElement("div"),u=i.createVNode(e,n);u.props.onDestroy=h=>{X7(h,a,l,s),i.render(null,c)},u.props.onDetail=(h,m)=>{dn[a].forEach(p=>{var C,v;p.props.id!==m&&((v=(C=p.component)==null?void 0:C.exposed)==null||v.setDetailsShow(null,!1))})},i.render(u,c),dn[a].push(u);let f;u.props.getContainer&&An(u.props.getContainer)?f=u.props.getContainer:f=document.body,f.appendChild(c.firstElementChild)};function X7(e,t,n,a){a==null||a();const s=t.startsWith("top")?"top":"bottom";let r=-1;dn[t].forEach((c,u)=>{c.props.id===e&&(r=u)});const l=dn[t][r].el.offsetHeight,d=dn[t].length;for(let c=r;c<d;c++){const u=parseInt(dn[t][c].el.style[s],10)-l-n;dn[t][c].component.props.offsetY=u}dn[t].splice(r,1)}var k0={exports:{}};/*!
|
48
|
+
`,D={d:L,stroke:f||"#f5f5f5","stroke-linecap":d,"stroke-width":m,"fill-opacity":"0",class:"process-circle-trail",style:M},T={d:L,stroke:l||"#13ce66","stroke-linecap":d,"stroke-width":r>0&&m||0,"fill-opacity":"0",class:`process-circle-path ${a(`${c}-circle-trail`)}`,style:S};return i.createVNode("div",{class:"progress-outer-circle",style:C},[i.createVNode("svg",{viewBox:"0 0 100 100"},[i.createVNode("path",D,null),i.createVNode("path",T,null)]),i.createVNode("span",{class:"progress-circle-text",style:h},[n==null?void 0:n.default()])])},Uv=(e,{attrs:t,slots:n})=>{const{resolveClassName:a}=le(),{percent:s,strokeWidth:r,size:o,color:l,titleStyle:d,showText:c,textInside:u,theme:f}=t,h={height:`${r}px`,lineHeight:`${r}px`},m={width:`${s}%`,background:l,animationDuration:"3s"},p=(C=!0)=>(c||n.default)&&(C&&u||!C&&!u)?n==null?void 0:n.default():null;return i.createVNode("div",{class:"progress-outer"},[i.createVNode("div",{class:`${a(`progress-${o||"normal"}`)} progress-bar`,style:h},[i.createVNode("div",{style:m,class:{"progress-inner":!0,[`${a(`${f}`)}`]:!0}},[i.createVNode("div",{class:"inner-text",style:d},[p()])])]),p(!1)])};function eh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const Kv={extCls:g.string,type:$m(),percent:g.number.def(0),theme:g.theme().def(cs.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:Qm(),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},ki=Le(i.defineComponent({name:"Progress",props:Kv,setup(){const{resolveClassName:e}=le();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:a,titleStyle:s,fixed:r}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(r));return(e||this.$slots.default)&&a?this.$slots.default?this.$slots.default():i.createVNode("span",null,[o]):!e||a?null:i.createVNode("span",{class:"progress-text",style:typeof o=="string"?s:void 0},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=i.createVNode(Uv,t,eh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=i.createVNode(Yv,t,eh(e)?e:{default:()=>[e]}));const a={class:we({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return i.createVNode("div",a,[n])}})),th=Symbol("RadioGroup");function nh(){const e=i.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const ah=()=>{const e=i.getCurrentInstance(),{props:t,emit:n}=e,a=i.inject(th,Xd),s=!qd(a),r=i.ref(!1),o=i.ref("default"),l=i.computed(()=>s&&a.props.disabled?!0:t.disabled);s?(o.value=a.props.size,i.watch(()=>a.props.modelValue,u=>{r.value=u===t.label},{immediate:!0})):i.watch(()=>t.modelValue,u=>{u!==""&&(r.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{r.value=u},c=u=>{if(l.value)return;const f=u.target;r.value=f.checked;const h=r.value?t.label:"";n("update:modelValue",h),n("change",h),s&&a.handleChange(e.proxy),i.nextTick(()=>{f.checked!==r.value&&(f.checked=r.value)})};return i.onMounted(()=>{s&&a.register(e.proxy)}),i.onBeforeUnmount(()=>{s&&a.unregister(e.proxy)}),{size:o,isChecked:r,isDisabled:l,setChecked:d,handleChange:c}},Xv={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)},qv=i.defineComponent({name:"Radio",props:Xv,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=nh(),{size:a,isChecked:s,isDisabled:r,setChecked:o,handleChange:l}=ah(),{resolveClassName:d}=le();return{size:a,isFocused:e,isChecked:s,isDisabled:r,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:d}},render(){const e=we({[`${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:i.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return i.createVNode("label",{class:e,tabindex:"0"},[i.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),eN={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()},tN=i.defineComponent({name:"RadioButton",props:eN,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=nh(),{size:a,isChecked:s,isDisabled:r,setChecked:o,handleChange:l}=ah(),{resolveClassName:d}=le();return{isFocused:e,size:a,isChecked:s,isDisabled:r,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:d}},render(){const e=we({[`${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:i.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return i.createVNode("label",{class:e,tabindex:"0"},[i.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),nN={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0),type:g.oneOf(["tab","capsule","card"]).def("tab"),size:g.size()},mr=qe(qv,{Group:i.defineComponent({name:"RadioGroup",props:nN,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=kt(),a=[],s=d=>{a.push(d)},r=d=>{const c=a.indexOf(d);c>-1&&a.splice(c,1)},o=d=>{const c=d.label;a.forEach(u=>{u!==d&&u.setChecked(!1)}),t.emit("update:modelValue",c),t.emit("change",c)};i.provide(th,{props:e,register:s,unregister:r,handleChange:o}),i.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),i.onMounted(()=>{e.modelValue!==""&&a.forEach(d=>{d.setChecked(d.label===e.modelValue)})});const{resolveClassName:l}=le();return{resolveClassName:l}},render(){var e;return i.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:tN}),pr=i.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(16),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=c=>{if(!e.editable)return;const u=c+1;t("chooseRate",u)},a=(c,u)=>{if(!e.editable)return;const f=c+1;t("changeHover",f),i.nextTick(()=>{u.target.classList.add(r("is-hover"))})},s=c=>{e.editable&&i.nextTick(()=>{c.target.classList.remove(r("is-hover"))})},{resolveClassName:r}=le(),o=c=>we({[`${r("is-select")}`]:c<Math.floor(l.value),[`${r("is-edit")}`]:e.editable,[`${r("rate-star")}`]:!0}),l=i.computed(()=>e.hoverRate||e.rate),d={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>i.createVNode("p",{class:`${r("rate-stars")}`},[Array(e.max).fill(1).map((c,u)=>i.createVNode("svg",{class:o(u),style:d,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:f=>a(u,f),onMouseleave:f=>s(f)},[i.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[i.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[i.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[i.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[i.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)])])])])]))])}}),aN=i.defineComponent({name:"Rate",components:{star:pr},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=kt(),s=i.ref(0),r=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=we({[`${n("rate")}`]:!0}),c={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},u=i.computed(()=>{const h=Math.floor(e.modelValue),m=(c.width+3)*h,p=c.width*(e.modelValue-h);return{width:`${m+p}px`}}),f={width:c.width,height:c.height};return i.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=a==null?void 0:a.validate)==null||h.call(a,"change"))}),()=>i.createVNode("p",{class:l},[e.editable?i.createVNode(pr,i.mergeProps({rate:e.modelValue,"hover-rate":s.value,onChooseRate:r,onChangeHover:o,onMouseleave:()=>o(0)},f),null):[i.createVNode(pr,i.mergeProps({rate:5,style:u.value,class:`${n("score-real")}`,editable:!1},f),null),i.createVNode(pr,i.mergeProps({rate:0,editable:!1},f),null)]])}}),ih=Le(aN),iN=i.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:a,loopTime:s,pics:r,list:o,height:l,width:d}=i.toRefs(e),c=i.ref(),u=i.ref(0),f=i.ref(0),h=i.ref(0),m=i.ref(0);let p;const{resolveClassName:C}=le(),v=i.computed(()=>{var j;return((j=o.value)==null?void 0:j.length)>0?o.value:r.value}),N=i.computed(()=>({width:`${f.value*v.value.length}px`,transform:`translateX(-${f.value*u.value}px)`})),I=i.computed(()=>({width:`${f.value}px`,height:`${h.value}px`})),y=j=>{let x=j;j>=v.value.length&&(x=0),j<0&&(x=v.value.length-1),u.value=x,t("index-change",x)},b=j=>{j&&window.open(j,"_blank")},w=j=>[`${C("swiper-img")}`,{[`${C("swiper-link")}`]:j.link},j.class],M=j=>({"background-image":`url(${j.url})`,"background-color":j.color}),S=j=>({[`${C("current-index")}`]:u.value===j}),L=()=>{a.value&&(m.value=window.setTimeout(()=>{y(u.value+1),L()},s.value))},D=()=>{window.clearTimeout(m.value)},T=()=>{var x;const j=(x=c.value)==null?void 0:x.parentElement;!j||!window.ResizeObserver||(p=new ResizeObserver(()=>{J()}),p.observe(j))},E=()=>{var j;(j=p.disconnect)==null||j.call(p)},P=j=>{if(j===void 0)return{height:0,width:0};const x=getComputedStyle(j),$=j.clientWidth-parseFloat(x.paddingTop)-parseFloat(x.paddingBottom);return{height:j.clientHeight-parseFloat(x.paddingLeft)-parseFloat(x.paddingRight),width:$}},J=()=>{var x;const j=P((x=c.value)==null?void 0:x.parentElement);f.value=+d.value>0?d.value:j.width,h.value=+l.value>0?l.value:j.height};return i.watch([l,d],J),i.onMounted(()=>{J(),L(),T()}),i.onBeforeUnmount(()=>{D(),E()}),()=>i.createVNode("section",{class:`${C("swiper-home")}`,ref:c,style:I.value},[i.createVNode("hgroup",{style:N.value,class:`${C("transition")} ${C("swiper-main")}`},[v.value.map(j=>{var x;return i.createVNode("h3",{class:`${C("swiper-card")}`,style:I.value},[((x=n.default)==null?void 0:x.call(n,j))??i.createVNode("span",{class:w(j),style:M(j),onClick:()=>b(j.link)},null)])})]),i.createVNode("ul",{class:`${C("swiper-index")}`},[v.value.map((j,x)=>i.createVNode("li",{class:S(x),onMouseover:()=>y(x)},null))]),i.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-prev")}`,onClick:()=>y(u.value-1)},[i.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)]),i.createVNode("span",{class:`${C("swiper-nav")} ${C("nav-next")}`,onClick:()=>y(u.value+1)},[i.createVNode("i",{class:`${C("swiper-nav-icon")}`},null)])])}}),sh=Le(iN);var sN="__lodash_hash_undefined__";function rN(e){return this.__data__.set(e,sN),this}var oN=rN;function lN(e){return this.__data__.has(e)}var cN=lN,dN=jo,uN=oN,fN=cN;function yr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new dN;++t<n;)this.add(e[t])}yr.prototype.add=yr.prototype.push=uN,yr.prototype.has=fN;var hN=yr;function gN(e,t){for(var n=-1,a=e==null?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}var mN=gN;function pN(e,t){return e.has(t)}var yN=pN,bN=hN,CN=mN,vN=yN,NN=1,wN=2;function MN(e,t,n,a,s,r){var o=n&NN,l=e.length,d=t.length;if(l!=d&&!(o&&d>l))return!1;var c=r.get(e),u=r.get(t);if(c&&u)return c==t&&u==e;var f=-1,h=!0,m=n&wN?new bN:void 0;for(r.set(e,t),r.set(t,e);++f<l;){var p=e[f],C=t[f];if(a)var v=o?a(C,p,f,t,e,r):a(p,C,f,e,t,r);if(v!==void 0){if(v)continue;h=!1;break}if(m){if(!CN(t,function(N,I){if(!vN(m,I)&&(p===N||s(p,N,n,a,r)))return m.push(I)})){h=!1;break}}else if(!(p===C||s(p,C,n,a,r))){h=!1;break}}return r.delete(e),r.delete(t),h}var rh=MN;function IN(e){var t=-1,n=Array(e.size);return e.forEach(function(a,s){n[++t]=[s,a]}),n}var LN=IN;function TN(e){var t=-1,n=Array(e.size);return e.forEach(function(a){n[++t]=a}),n}var SN=TN,oh=Ui,lh=lu,kN=oi,xN=rh,DN=LN,jN=SN,ON=1,EN=2,PN="[object Boolean]",AN="[object Date]",zN="[object Error]",VN="[object Map]",JN="[object Number]",RN="[object RegExp]",QN="[object Set]",$N="[object String]",_N="[object Symbol]",HN="[object ArrayBuffer]",WN="[object DataView]",ch=oh?oh.prototype:void 0,Rl=ch?ch.valueOf:void 0;function FN(e,t,n,a,s,r,o){switch(n){case WN:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case HN:return!(e.byteLength!=t.byteLength||!r(new lh(e),new lh(t)));case PN:case AN:case JN:return kN(+e,+t);case zN:return e.name==t.name&&e.message==t.message;case RN:case $N:return e==t+"";case VN:var l=DN;case QN:var d=a&ON;if(l||(l=jN),e.size!=t.size&&!d)return!1;var c=o.get(e);if(c)return c==t;a|=EN,o.set(e,t);var u=xN(l(e),l(t),a,s,r,o);return o.delete(e),u;case _N:if(Rl)return Rl.call(e)==Rl.call(t)}return!1}var BN=FN;function GN(e,t){for(var n=-1,a=t.length,s=e.length;++n<a;)e[s+n]=t[n];return e}var ZN=GN,YN=ZN,UN=sn;function KN(e,t,n){var a=t(e);return UN(e)?a:YN(a,n(e))}var XN=KN;function qN(e,t){for(var n=-1,a=e==null?0:e.length,s=0,r=[];++n<a;){var o=e[n];t(o,n,e)&&(r[s++]=o)}return r}var ew=qN;function tw(){return[]}var nw=tw,aw=ew,iw=nw,sw=Object.prototype,rw=sw.propertyIsEnumerable,dh=Object.getOwnPropertySymbols,ow=dh?function(e){return e==null?[]:(e=Object(e),aw(dh(e),function(t){return rw.call(e,t)}))}:iw,lw=ow,cw=uu,dw=cw(Object.keys,Object),uw=dw,fw=Cs,hw=uw,gw=Object.prototype,mw=gw.hasOwnProperty;function pw(e){if(!fw(e))return hw(e);var t=[];for(var n in Object(e))mw.call(e,n)&&n!="constructor"&&t.push(n);return t}var uh=pw,yw=Iu,bw=uh,Cw=li;function vw(e){return Cw(e)?yw(e):bw(e)}var Nw=vw,ww=XN,Mw=lw,Iw=Nw;function Lw(e){return ww(e,Iw,Mw)}var Tw=Lw,fh=Tw,Sw=1,kw=Object.prototype,xw=kw.hasOwnProperty;function Dw(e,t,n,a,s,r){var o=n&Sw,l=fh(e),d=l.length,c=fh(t),u=c.length;if(d!=u&&!o)return!1;for(var f=d;f--;){var h=l[f];if(!(o?h in t:xw.call(t,h)))return!1}var m=r.get(e),p=r.get(t);if(m&&p)return m==t&&p==e;var C=!0;r.set(e,t),r.set(t,e);for(var v=o;++f<d;){h=l[f];var N=e[h],I=t[h];if(a)var y=o?a(I,N,h,t,e,r):a(N,I,h,e,t,r);if(!(y===void 0?N===I||s(N,I,n,a,r):y)){C=!1;break}v||(v=h=="constructor")}if(C&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof w=="function"&&w instanceof w)&&(C=!1)}return r.delete(e),r.delete(t),C}var jw=Dw,Ow=$n,Ew=xt,Pw=Ow(Ew,"DataView"),Aw=Pw,zw=$n,Vw=xt,Jw=zw(Vw,"Promise"),Rw=Jw,Qw=$n,$w=xt,_w=Qw($w,"Set"),Hw=_w,Ww=$n,Fw=xt,Bw=Ww(Fw,"WeakMap"),Gw=Bw,Ql=Aw,$l=Do,_l=Rw,Hl=Hw,Wl=Gw,hh=tn,Pa=tu,gh="[object Map]",Zw="[object Object]",mh="[object Promise]",ph="[object Set]",yh="[object WeakMap]",bh="[object DataView]",Yw=Pa(Ql),Uw=Pa($l),Kw=Pa(_l),Xw=Pa(Hl),qw=Pa(Wl),Kn=hh;(Ql&&Kn(new Ql(new ArrayBuffer(1)))!=bh||$l&&Kn(new $l)!=gh||_l&&Kn(_l.resolve())!=mh||Hl&&Kn(new Hl)!=ph||Wl&&Kn(new Wl)!=yh)&&(Kn=function(e){var t=hh(e),n=t==Zw?e.constructor:void 0,a=n?Pa(n):"";if(a)switch(a){case Yw:return bh;case Uw:return gh;case Kw:return mh;case Xw:return ph;case qw:return yh}return t});var Ch=Kn,Fl=iu,eM=rh,tM=BN,nM=jw,vh=Ch,Nh=sn,wh=Ns,aM=Ms,iM=1,Mh="[object Arguments]",Ih="[object Array]",br="[object Object]",sM=Object.prototype,Lh=sM.hasOwnProperty;function rM(e,t,n,a,s,r){var o=Nh(e),l=Nh(t),d=o?Ih:vh(e),c=l?Ih:vh(t);d=d==Mh?br:d,c=c==Mh?br:c;var u=d==br,f=c==br,h=d==c;if(h&&wh(e)){if(!wh(t))return!1;o=!0,u=!1}if(h&&!u)return r||(r=new Fl),o||aM(e)?eM(e,t,n,a,s,r):tM(e,t,d,n,a,s,r);if(!(n&iM)){var m=u&&Lh.call(e,"__wrapped__"),p=f&&Lh.call(t,"__wrapped__");if(m||p){var C=m?e.value():e,v=p?t.value():t;return r||(r=new Fl),s(C,v,n,a,r)}}return h?(r||(r=new Fl),nM(e,t,n,a,s,r)):!1}var oM=rM,lM=oM,Th=Dt;function Sh(e,t,n,a,s){return e===t?!0:e==null||t==null||!Th(e)&&!Th(t)?e!==e&&t!==t:lM(e,t,n,a,Sh,s)}var cM=Sh,dM=cM;function uM(e,t){return dM(e,t)}var fM=uM;const Bl=Xe(fM),Cr=Symbol("BkSelect"),kh=Symbol("BkOptionGroup");function xh(){const e=i.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Gl(e){return{register:(a,s)=>{if(s&&!e.value.has(a))return e.value.set(a,s)},unregister:a=>{e.value.delete(a)}}}function Dh(e,t=200){let n,a=e;return i.customRef((s,r)=>({get(){return s(),a},set(o){clearTimeout(n),o===void 0||o===""?(a=o,r()):n=setTimeout(()=>{a=o,r()},t)}}))}function hM(e,t){const{popoverMinWidth:n}=e;let a=null;const s=i.ref("auto"),r=i.ref(!1),o=()=>{r.value=!r.value},l=()=>{r.value=!1},d=()=>{r.value=!0},c=()=>{var u;s.value=Math.max((u=t.value)==null?void 0:u.offsetWidth,n)};return i.onMounted(()=>{t.value&&(a=ig(t.value,c,60,!0),a.start())}),i.onBeforeUnmount(()=>{a==null||a.stop(),a=null}),{isPopoverShow:r,popperWidth:s,togglePopover:o,hidePopover:l,showPopover:d}}function gM(e,t){const n=Dh(""),a=Dh(""),s=i.computed(()=>a.value||n.value),r=i.ref(!1);return i.watch(s,async()=>{try{r.value=!0,await e(s.value),r.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{customOptionName:n,searchValue:a,curSearchValue:s,searchLoading:r}}function Aa(e=""){return e&&String(e).trim().toLowerCase()}function mM(e,t){if(!e||!t)return!0;const{top:n,bottom:a}=e.getBoundingClientRect(),{top:s,bottom:r}=t.getBoundingClientRect();return n>=s&&a<=r}const xi=i.defineComponent({name:"Option",props:{id:{type:[String,Number,Object],require:!0},name:g.oneOfType([g.number,g.string]),disabled:g.bool.def(!1),order:g.number.def(0)},setup(e,{attrs:t}){const{proxy:n}=i.getCurrentInstance(),a=i.reactive({visible:!0}),{disabled:s,id:r,name:o}=i.toRefs(e),l=i.computed(()=>o.value!==void 0?o.value:t.label),d=i.computed(()=>r.value!==void 0?r.value:t.value),c=i.inject(Cr,null),u=i.inject(kh,null),f=i.computed(()=>{var M;return(M=c==null?void 0:c.selected)==null?void 0:M.some(S=>Bl(S.value,d.value))}),h=i.computed(()=>c==null?void 0:c.multiple),m=i.computed(()=>(c==null?void 0:c.activeOptionValue)===d.value),p=i.computed(()=>(c==null?void 0:c.showSelectedIcon)&&h.value),C=i.computed(()=>c==null?void 0:c.selectedStyle),v=i.computed(()=>c==null?void 0:c.isShowAll),N=i.computed(()=>c==null?void 0:c.allOptionId),I=i.computed(()=>{var S;if(!v.value||d.value===N.value)return s.value;const M=(S=c==null?void 0:c.selected)==null?void 0:S.some(L=>Bl(L.value,N.value));return s.value||v.value&&M}),y=()=>{I.value||(v.value&&N.value===d.value?c==null||c.handleToggleAll():c==null||c.handleOptionSelected(n))},b=()=>{c.activeOptionValue=d.value};i.onBeforeMount(()=>{c==null||c.register(d.value,n),u==null||u.register(d.value,n)}),i.onBeforeUnmount(()=>{c==null||c.unregister(d.value),u==null||u.unregister(d.value)});const{resolveClassName:w}=le();return{...i.toRefs(a),selected:f,multiple:h,isHover:m,showSelectedIcon:p,selectedStyle:C,optionName:l,optionID:d,isDisabled:I,handleOptionClick:y,handleMouseEnter:b,resolveClassName:w}},render(){var t,n;const e=we({"is-selected":this.selected,"is-disabled":this.isDisabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===fs.CHECKBOX,[this.resolveClassName("select-option")]:!0});return i.withDirectives(i.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[this.showSelectedIcon&&this.selectedStyle===fs.CHECKBOX&&i.createVNode(dt,{disabled:this.isDisabled,class:this.resolveClassName("select-checkbox"),modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??i.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===fs.CHECK&&i.createVNode(Wn,{class:this.resolveClassName("select-selected-icon"),width:22,height:22},null)]),[[i.vShow,this.visible]])}}),pM=i.defineComponent({name:"OptionGroup",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=i.getCurrentInstance(),{proxy:a}=n,s=i.inject(Cr,null),r=i.reactive({groupCollapse:e.collapse,visible:!0}),o=i.ref(new Map),{register:l,unregister:d}=Gl(o),c=i.computed(()=>`${e.label} (${[...o.value.values()].filter(h=>h.visible).length})`),u=()=>{!e.collapsible||e.disabled||(r.groupCollapse=!r.groupCollapse,t("update:collapse",r.groupCollapse))};i.provide(kh,i.reactive({...i.toRefs(e),register:l,unregister:d,groupCollapse:i.toRef(r,"groupCollapse")})),i.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,a)}),i.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:f}=le();return{...i.toRefs(r),groupLabel:c,handleToggleCollapse:u,resolveClassName:f}},render(){var a,s;const e=we({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=we({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=we({"default-group-label-icon":!0,collapse:this.groupCollapse});return i.withDirectives(i.createVNode("ul",{class:e},[i.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():i.createVNode("span",{class:"default-group-label"},[this.collapsible&&i.createVNode(ui,{class:n},null),i.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),i.withDirectives(i.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(a=this.$slots).default)==null?void 0:s.call(a)]),[[i.vShow,!this.groupCollapse]])]),[[i.vShow,this.visible]])}}),yM={onContentScroll:Function},bM={list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),maxHeight:g.number,height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Cn("F-scroll-x")),scrollYName:g.string.def(Cn("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60),rowKey:g.string.def(void 0),keepAlive:g.bool.def(!1),autoReset:g.bool.def(!0),wrapperStyle:g.any.def({}),...yM},jh=(e,t)=>{const n=(s={left:0,top:0})=>{const{left:r,top:o}=s;t.value.scrollTo(r,o)};return{fixToTop:s=>{const{id:r,index:o,item:l}=s;let d=typeof o=="number"?o-1:0;if(r!==void 0&&(d=e.list.findIndex(c=>c[e.rowKey]===r)??d),l!==void 0&&(d=e.list.findIndex(c=>l[e.rowKey]===c[e.rowKey])??d),typeof d=="number"){const u=(d>=0?d:0)*e.lineHeight;n({left:0,top:u})}},scrollTo:n}};function Oh(e,t,n,a){let s=0,r=0,o=0,l=0;for(;s<e;s++){if(l=a(s,[s*n,(s+1)*n,"virtual"]),r+l>t){o=t-r;break}r+=l}return{startIndex:s,height:r,diffHeight:o}}function Eh(e,t,n,a,s){if(!s.target)return;const r=s.target.scrollTop,o=s.target.scrollLeft,l=s.target.scrollHeight,d=s.target.offsetHeight,{count:c,groupItemCount:u}=n;let f=0,h=0,m=0;if(typeof e=="number"&&(f=Math.floor(r/e),h=Math.ceil(d/e)+f,m=r%e),typeof e=="function"){const C=Oh(c,r,u,e);f=C.startIndex>0?C.startIndex:0,m=C.diffHeight,h=Oh(c,d,u,e).startIndex+f}const p=l-d-r;return typeof t=="function"&&t(s,f,h,r,m,o,{bottom:p>=0?p:0}),{targetStartIndex:f,targetEndIndex:h,elScrollTop:r,translateY:m,elScrollLeft:o}}class Zl{constructor(t,n){ye(this,"binding");ye(this,"wrapper");ye(this,"delay");this.binding=t,this.wrapper=n;const{throttleDelay:a}=t.value;this.delay=a}render(t){const{lineHeight:n=30,handleScrollCallback:a,pagination:s={},onlyScroll:r}=this.binding.value;if(r){const h=this.wrapper.scrollTop,m=this.wrapper.scrollLeft,p=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;a(t,null,null,h,h,m,{bottom:p>=0?p:0});return}const{startIndex:o,endIndex:l,groupItemCount:d,count:c,scrollTop:u,scrollLeft:f}=s;Eh(n,a,{scrollTop:u,startIndex:o,endIndex:l,groupItemCount:d,count:c,scrollLeft:f},this.wrapper,t)}executeThrottledRender(t){la(this.render.bind(this),this.delay)(t)}install(){var t;(t=this.wrapper)==null||t.addEventListener("scroll",this.executeThrottledRender.bind(this))}uninstall(){var t,n;(n=(t=this.wrapper)==null?void 0:t.removeListener)==null||n.call(t,"scroll",this.executeThrottledRender.bind(this))}setBinding(t){this.binding=t}}let Sn=null;const CM={mounted(e,t){const n=e.parentNode;Sn=new Zl(t,e),n.addEventListener("scroll",Sn.executeThrottledRender.bind(Sn))},updated(e,t){Sn==null||Sn.setBinding(t)},unbind(e){if(e){const t=e.parentNode;if(!t||!Sn)return;t.removeEventListener("scroll",Sn.executeThrottledRender)}}},vM=(e,t)=>{const{renderAs:n,contentAs:a}=e,s=(f,h,m,p,C,v,N)=>{t.emit("content-scroll",[f,{translateY:C,translateX:v,pos:N}])};let r=null;const o=i.computed(()=>({lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent})),l=i.ref(null),d=i.computed(()=>{const f=typeof e.height=="number"?`${e.height}px`:e.height;return{height:f,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??f,...e.wrapperStyle}}),{scrollTo:c,fixToTop:u}=jh(e,l);return t.expose({scrollTo:c,fixToTop:u}),i.onMounted(()=>{r=new Zl(o,l.value),r.install()}),i.onUnmounted(()=>{r==null||r.uninstall()}),{rendAsTag:()=>{var f,h,m,p,C,v,N,I;return i.h(n,{class:e.className,style:d.value,ref:l},[((h=(f=t.slots).beforeContent)==null?void 0:h.call(f))??"",i.h(a,{class:e.contentClassName,style:e.contentStyle},[((p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))??""]),((v=(C=t.slots).afterContent)==null?void 0:v.call(C))??"",((I=(N=t.slots).afterSection)==null?void 0:I.call(N))??""])}}},za=Le(i.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:CM},props:bM,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n,contentAs:a}=e,s=T=>typeof T=="string"?[T]:typeof T=="object"&&!Array.isArray(T)?[T]:T;if(!e.enabled){const{rendAsTag:T}=vM(e,t);return T}const r=i.computed(()=>({lineHeight:e.lineHeight,handleScrollCallback:u,pagination:d,throttleDelay:e.throttleDelay})),o=i.ref(null);let l=null;const d=i.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),c=i.ref([]),u=(T,E,P,J,j,x,$)=>{Object.assign(d,{startIndex:E,endIndex:P,scrollTop:J,translateX:x,translateY:j,scrollLeft:x,pos:$});let U=d.startIndex*e.groupItemCount,Y=(d.endIndex+e.preloadItemCount)*e.groupItemCount;const oe=v.value.length;if(oe<Y){const te=Y-U;c.value=v.value.slice(U,oe),Y=oe+1,U=Y-te,U=U<0?0:U}const F=v.value.slice(U,Y+10);c.value=F,T&&t.emit("content-scroll",[T,d])};i.onMounted(()=>{l=new Zl(r,o.value),l.install()}),i.onUnmounted(()=>{l==null||l.uninstall()});const f=()=>{p(e.list)},h=i.ref(0),m=i.ref(0),p=T=>{if(h.value=Math.ceil((T||[]).length/e.groupItemCount),d.count=h.value,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let P=0;for(let J=0;J<h.value;J++){const j=e.lineHeight.call(this,J,T.slice(J*e.groupItemCount,e.groupItemCount));P+=typeof j=="number"?j:0}m.value=P}else m.value=e.lineHeight*h.value;else m.value=e.abosuteHeight},C=(T={left:0,top:0})=>{const E=o.value;i.nextTick(()=>{Eh(e.lineHeight,u,d,E,{target:E})})},v=i.computed(()=>e.rowKey!==void 0?e.list:(e.list||[]).map((T,E)=>({...T,$index:E}))),N=i.computed(()=>e.scrollPosition==="content"?{top:`${d.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${d.translateY}px)`}:{}),I=i.computed(()=>{const T=typeof e.height=="number"?`${e.height}px`:e.height;return{height:T,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??T,...e.scrollPosition==="container"?N.value:{},...e.wrapperStyle}}),y=i.computed(()=>{const T=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:T?"none":"block"}}),{resolveClassName:b}=le(),w=i.computed(()=>[b("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?b("virtual-content"):""]),M=i.computed(()=>[e.scrollPosition==="content"?b("virtual-content"):"",...s(e.contentClassName)]),S=()=>{f(),C()},{scrollTo:L,fixToTop:D}=jh(e,o);return i.watch(()=>[e.lineHeight,e.height,e.list,e.maxHeight],()=>{l==null||l.setBinding(r),f(),i.nextTick(()=>{C()})},{deep:!0,immediate:!0}),t.expose({reset:S,scrollTo:L,fixToTop:D}),()=>{var T,E,P,J,j,x,$,A;return i.h(n||"div",{ref:o,class:w.value,style:I.value},[((E=(T=t.slots).beforeContent)==null?void 0:E.call(T))??"",i.h(a||"div",{class:M.value,style:{...N.value,...e.contentStyle}},[((J=(P=t.slots).default)==null?void 0:J.call(P,{data:c.value}))??""]),((x=(j=t.slots).afterContent)==null?void 0:x.call(j))??"",i.h("div",{class:[b("virtual-section")],style:y.value}),((A=($=t.slots).afterSection)==null?void 0:A.call($))??""])}}}));var Ph=function(e){return e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke",e}(Ph||{});const NM=i.defineComponent({name:"Tag",props:{theme:us().def(""),closable:g.bool.def(!1),type:me("tagStorkeType",{}).def(Ph.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),size:g.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=le();return{wrapperStyle:i.computed(()=>({borderRadius:e.radius})),handleClose:o=>{o.preventDefault(),o.stopPropagation(),t("close",o)},handleClick:o=>{o.preventDefault(),o.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var t,n;const e={[this.resolveClassName("tag")]:!0,[this.resolveClassName("tag-closable")]:this.closable,[this.resolveClassName("tag-checkable")]:this.checkable,[this.resolveClassName("tag-check")]:this.checked,[this.resolveClassName(`tag-${this.type}`)]:this.type,[this.resolveClassName(`tag-${this.theme}`)]:this.theme,[this.resolveClassName(`tag--${this.size}`)]:!0};return i.createVNode("div",{class:e,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?i.createVNode("span",{class:`${this.resolveClassName("tag-icon")}`},[this.$slots.icon()]):"",i.createVNode("span",{class:`${this.resolveClassName("tag-text")}`},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),this.closable&&i.createVNode(lt,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),Di=Le(NM),wM=i.defineComponent({name:"SelectTagInput",directives:{bkTooltips:Tn},props:{selected:{type:Array,default:()=>[]},tagTheme:us(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=i.inject(Cr,null),{modelValue:s,collapseTags:r,selected:o}=i.toRefs(e),l=i.ref(s.value),d=i.ref(),c=i.ref(null),u=i.computed(()=>o.value.slice(c.value,o.value.length).map(S=>S.label).join(", "));i.watch(s,()=>{l.value=s.value}),i.watch([o,r],()=>{y()},{flush:"post"});const f=S=>{t("remove",S)},h=()=>{var S;(S=d.value)==null||S.focus()},m=()=>{var S;(S=d.value)==null||S.blur()},p=S=>{t("update:modelValue",S.target.value)},C=S=>{switch(S.code){case"Enter":{t("enter",S.target.value,S);break}}t("keydown",S.target.value,S)},v=i.ref([]),N=i.ref(),I=S=>{const L=v.value.map(D=>D==null?void 0:D.$el).filter(D=>!!D);return typeof S=="number"?L[S]:L},y=()=>{r.value&&(c.value=null,setTimeout(()=>{var D,T;const S=I(),L=S.findIndex((E,P)=>P?S[P-1].offsetTop!==E.offsetTop:!1);c.value=L>0?L:null,((D=S[c.value])==null?void 0:D.offsetTop)!==((T=N.value)==null?void 0:T.offsetTop)&&c.value>1&&(c.value-=1)}))},b=Xi(y,150),w=i.ref(),M=new ResizeObserver(()=>{b()});return i.onMounted(()=>{w.value&&M.observe(w.value)}),i.onBeforeUnmount(()=>{w.value&&M.unobserve(w.value)}),{collapseTagRef:N,tagWrapperRef:w,tagsRefs:v,select:a,overflowTagIndex:c,value:l,inputRef:d,overflowContent:u,handleRemoveTag:f,focus:h,blur:m,handleInput:p,handleKeydown:C,resolveClassName:n}},render(){var s,r,o,l,d,c,u,f;const e=(r=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:r.call(s),t=we({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e}),n=we({[this.resolveClassName("select-tag-wrapper")]:!0}),a={display:this.selected.length&&!this.filterable?"none":""};return i.createVNode("div",{class:t,ref:"tagWrapperRef"},[(l=(o=this.$slots)==null?void 0:o.prefix)==null?void 0:l.call(o),i.createVNode("div",{class:n},[((c=(d=this.$slots).default)==null?void 0:c.call(d))??this.selected.map((h,m)=>i.createVNode(Di,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&m>=this.overflowTagIndex?"none":""},ref:p=>this.tagsRefs[m]=p,onClose:()=>this.handleRemoveTag(h.value)},{default:()=>{var p;return[(p=this.select)==null?void 0:p.handleGetLabelByValue(h.value)]}})),i.withDirectives(i.createVNode(Di,{class:this.resolveClassName("select-overflow-tag"),style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},ref:"collapseTagRef"},{default:()=>[i.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),[[i.resolveDirective("bk-tooltips"),{content:this.overflowContent,disabled:!this.overflowTagIndex||!this.collapseTags}]]),i.createVNode("input",{class:this.resolveClassName("select-tag-input"),ref:"inputRef",type:"text",style:a,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),MM=i.defineComponent({name:"Select",directives:{clickoutside:_t},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Lo.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showAll:g.bool.def(!1),allOptionId:g.oneOfType([g.number,g.string]),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:us(),behavior:Kd(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string,noMatchText:g.string,loadingText:g.string,placeholder:g.string,searchPlaceholder:g.string,selectAllText:g.string,scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:Object,customContent:g.bool.def(!1),list:g.arrayOf(g.any).def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!1),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1),keepSearchValue:g.bool.def(!1),prefix:g.string,selectedStyle:_m(),filterOption:{type:Function}},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur","tag-remove","select","deselect"],setup(e,{emit:t}){const n=je("select"),{resolveClassName:a}=le(),{modelValue:s,disabled:r,filterable:o,multiple:l,remoteMethod:d,loading:c,popoverMinWidth:u,showOnInit:f,multipleMode:h,allowCreate:m,customContent:p,showSelectedIcon:C,inputSearch:v,enableVirtualRender:N,showSelectAll:I,showAll:y,allOptionId:b,scrollHeight:w,list:M,displayKey:S,idKey:L,collapseTags:D,autoHeight:T,popoverOptions:E,allowEmptyValues:P,autoFocus:J,keepSearchValue:j,selectedStyle:x,filterOption:$}=i.toRefs(e),A=i.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),U=i.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),Y=i.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),oe=i.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),F=i.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),te=i.computed(()=>e.selectAllText===void 0?n.value.all:e.selectAllText),z=kt(),W=i.ref(),k=i.ref(),O=i.ref(),Q=i.ref(),B=i.ref(),G=i.ref(),ne=i.ref(),_=i.ref(new Map),R=i.computed(()=>[..._.value.values()].sort((de,ue)=>de.order-ue.order)),V=i.ref(new Map),q=i.ref([]),se=i.computed(()=>q.value.reduce((de,ue)=>(de[ue.value]=ue.label,de),{})),H=i.ref(),ie=i.computed(()=>M.value.reduce((de,ue)=>(de[ue[L.value]]=ue[S.value],de),{}));i.watch([_,M],()=>{Uc()}),i.watch(s,()=>{var de;Uc(),e.withValidate&&((de=z==null?void 0:z.validate)==null||de.call(z,"change"))},{deep:!0}),i.watch(q,()=>{var de;(de=ne.value)==null||de.updatePopover(null,St.value)});const Z=i.computed(()=>ge.value?M.value:M.value.filter(de=>{var ue;return Ne.value?!!$.value(Gc.value,de):(ue=Aa(String(de[S.value])))==null?void 0:ue.includes(Aa(Gc.value))})),K=i.computed(()=>r.value||c.value),X=i.computed(()=>q.value.map(de=>{var ue,Me;return((Me=(ue=_.value)==null?void 0:ue.get(de.value))==null?void 0:Me.optionName)||ie.value[de.value]||de.label})),ae=i.computed(()=>{const de=R.value.reduce((ue,Me)=>(Me.disabled||ue.push(Me.optionID),ue),[]);return de.length<=q.value.length&&de.every(ue=>q.value.some(Me=>Me.value===ue))}),pe=i.computed(()=>!!V.value.size),ee=i.computed(()=>!R.value.length),re=i.computed(()=>R.value.length&&R.value.every(de=>!de.visible)),ge=i.computed(()=>o.value&&typeof d.value=="function"),Ne=i.computed(()=>!!($.value&&typeof $.value=="function")),ve=i.computed(()=>!(Zc.value||ee.value||re.value)||p.value),Ie=i.computed(()=>l.value&&I.value&&(!Gc.value||!o.value)),ke=i.computed(()=>l.value&&y.value),De=i.computed(()=>w.value-12-(Ie.value?32:0)),Oe=i.computed(()=>Zc.value?Y.value:re.value||M.value.length&&!Z.value.length?U.value:ee.value?A.value:""),Ae=i.computed(()=>T.value?D.value&&!ra.value:D.value),St=i.computed(()=>Po({theme:`light ${a("select-popover")}`,trigger:"manual",width:B3.value,arrow:!1,placement:"bottom-start",isShow:ra.value,reference:B.value,offset:4,popoverDelay:0,renderType:ds.AUTO},E.value)),{register:Re,unregister:Ze}=Gl(_),{register:xe,unregister:Pn}=Gl(V),{isHover:Fc,setHover:PD,cancelHover:AD}=xh(),Gi=i.ref(!1),F3=()=>{Gi.value||(Gi.value=!0,t("focus"))},Bc=()=>{Gi.value&&(Gi.value=!1,HD(),t("blur"))},{popperWidth:B3,isPopoverShow:ra,hidePopover:Zi,showPopover:G3,togglePopover:zD}=hM({popoverMinWidth:u.value},k),VD=i.computed(()=>(o.value&&v.value||m.value)&&ra.value);i.watch(ra,de=>{t("toggle",ra.value),de?(document.addEventListener("keydown",U3),setTimeout(()=>{Ba(),Z3(),JD()},10)):(j.value||(Y3.value=""),document.removeEventListener("keydown",U3))});const JD=()=>{var ue,Me,Ke;(Ke=((Me=(ue=O.value)==null?void 0:ue.querySelectorAll)==null?void 0:Me.call(ue,".is-selected"))[0])==null||Ke.scrollIntoView({block:"center",behavior:"smooth"})},Z3=()=>{var Me;const de=q.value[0],ue=_.value.get(de==null?void 0:de.value);ue&&!ue.disabled&&ue.visible?H.value=de==null?void 0:de.value:H.value=(Me=R.value.find(Ke=>!Ke.disabled&&Ke.visible))==null?void 0:Me.optionID},RD=de=>{o.value&&(de?R.value.forEach(ue=>{var Me;Ne.value?ue.visible=!!$.value(de,{...ue.$props,...ue.$attrs}):ue.visible=(Me=Aa(String(ue.optionName)))==null?void 0:Me.includes(Aa(de))}):R.value.forEach(ue=>{ue.visible=!0}))},{searchValue:Y3,customOptionName:Yi,curSearchValue:Gc,searchLoading:Zc}=gM(ge.value?d.value:RD,Z3),en=de=>{de!==s.value&&(t("update:modelValue",de,s.value),t("change",de,s.value))},QD=()=>{K.value||(F3(),zD())},$D=de=>{o.value&&(Yi.value=de)},_D=(de,ue)=>{const Me=String(de);if(!m.value||!Me)return;ue.stopPropagation(),ue.preventDefault();const Ke=R.value.find(Za=>Aa(String(Za.optionName))===Aa(Me));if(o.value&&Ke){oo(Ke),Yi.value="";return}_.value.get(Me)||(l.value?(q.value.push({value:Me,label:Me}),en(q.value.map(Za=>Za.value))):(q.value=[{value:Me,label:Me}],en(Me),Zi()),Yi.value="")},oo=de=>{if(!(K.value||!de))if(l.value){const ue=q.value.findIndex(Me=>Me.value===de.optionID);ue>-1?(q.value.splice(ue,1),en(q.value.map(Me=>Me.value)),t("deselect",de.optionID)):(q.value.push({value:de.optionID,label:de.optionName||de.optionID}),en(q.value.map(Me=>Me.value)),t("select",de.optionID)),Ba()}else q.value=[{label:de.optionName||de.optionID,value:de.optionID}],en(de.optionID),t("select",de.optionID),Zi(),Bc()},Ba=()=>{setTimeout(()=>{var de,ue,Me;!v.value&&!m.value?(de=Q.value)==null||de.focus():h.value==="tag"?(ue=B.value)==null||ue.focus():(Me=W.value)==null||Me.focus()},0)},HD=()=>{setTimeout(()=>{var de,ue;h.value==="tag"?(de=B.value)==null||de.blur():(ue=W.value)==null||ue.blur()},0)},WD=de=>{de.stopPropagation(),q.value=[],en(l.value?[]:""),t("clear",l.value?[]:""),Zi()},FD=()=>{H.value=""},BD=()=>{var de;ae.value?q.value=[]:(R.value.forEach(ue=>{ue.disabled||ue.optionID in se.value||q.value.push({value:ue.optionID,label:ue.optionName||ue.optionID})}),(de=M.value)==null||de.forEach(ue=>{ue.disabled||ue[L.value]in se.value||q.value.push({value:ue[L.value],label:ue[S.value]})})),en(q.value.map(ue=>ue.value)),Ba()},GD=()=>{if(!ke.value)return;q.value.findIndex(ue=>ue.value===b.value)>-1?q.value=[]:q.value=[{value:b.value,label:n.value.all}],en(q.value.map(ue=>ue.value)),Ba()},ZD=de=>{const{scrollTop:ue,clientHeight:Me,scrollHeight:Ke}=de.target;ue+Me===Ke&&t("scroll-end")},YD=de=>{if(K.value)return;const ue=q.value.findIndex(Me=>Me.value===de);ue>-1&&(q.value.splice(ue,1),en(q.value.map(Me=>Me.value)),t("tag-remove",de))},Yc=de=>{var Me,Ke;let ue=de;if(typeof ue=="object"){for(const Ga of _.value.keys())if(Bl(Ga,ue)){ue=Ga;break}}return((Ke=(Me=_.value)==null?void 0:Me.get(ue))==null?void 0:Ke.optionName)||ie.value[ue]||se.value[ue]||ue},Uc=()=>{Array.isArray(s.value)?q.value=[...s.value.map(de=>({value:de,label:Yc(de)}))]:s.value!==void 0||P.value.includes(s.value)?q.value=[{value:s.value,label:Yc(s.value)}]:q.value=[]},U3=de=>{var Ke,Ga,Za,K3;if(!ra.value||N.value)return;const ue=R.value.filter(ht=>!ht.disabled&&ht.visible),Me=ue.findIndex(ht=>ht.optionID===H.value);switch(de.code){case"ArrowUp":case"ArrowDown":{de.preventDefault();let ht=0;de.code==="ArrowDown"?ht=Me>=ue.length-1?0:Me+1:ht=Me===0?ue.length-1:Me-1,mM((Ke=ue[ht])==null?void 0:Ke.$el,O.value)||(Za=(Ga=ue[ht])==null?void 0:Ga.$el)==null||Za.scrollIntoView(),H.value=(K3=ue[ht])==null?void 0:K3.optionID;break}case"Backspace":{if(!l.value||!q.value.length||Yi.value.length||de.target===Q.value)return;q.value.pop(),en(q.value.map(ht=>ht.value));break}case"Enter":{const{value:ht}=de.target;if(m.value&&ht||de.target===Q.value)return;const XD=_.value.get(H.value);oo(XD);break}}},UD=({event:de})=>{var Me;const{target:ue}=de;(Me=k.value)!=null&&Me.contains(ue)||k.value===ue||(Zi(),Bc())},KD=()=>{setTimeout(()=>{var de,ue;N.value&&((ue=(de=G.value)==null?void 0:de.reset)==null||ue.call(de))})};return i.provide(Cr,i.reactive({multiple:l,selected:q,activeOptionValue:H,showSelectedIcon:C,isShowAll:ke,allOptionId:b,selectedStyle:x,register:Re,unregister:Ze,registerGroup:xe,unregisterGroup:Pn,handleOptionSelected:oo,handleGetLabelByValue:Yc,handleToggleAll:GD})),i.onMounted(()=>{Uc(),setTimeout(()=>{f.value&&G3(),J.value&&Ba()})}),{t:n,selected:q,isInput:VD,options:R,isDisabled:K,selectedLabel:X,isPopoverShow:ra,isHover:Fc,popperWidth:B3,inputRef:W,triggerRef:k,contentRef:O,searchRef:Q,selectTagInputRef:B,virtualRenderRef:G,popoverRef:ne,searchLoading:Zc,isOptionsEmpty:ee,isSearchEmpty:re,isFocus:Gi,isShowSelectContent:ve,curContentText:Oe,isGroup:pe,searchValue:Y3,customOptionName:Yi,isShowAll:ke,isShowSelectAll:Ie,virtualHeight:De,virtualList:Z,isCollapseTags:Ae,popoverConfig:St,isAllSelected:ae,focusInput:Ba,setHover:PD,cancelHover:AD,handleFocus:F3,handleBlur:Bc,handleTogglePopover:QD,handleClear:WD,hidePopover:Zi,showPopover:G3,handleToggleSelectAll:BD,handleOptionSelected:oo,handleClickOutside:UD,handleScroll:ZD,handleDeleteTag:YD,handleInputChange:$D,handleSelectedAllOptionMouseEnter:FD,handlePopoverShow:KD,localLoadingText:Y,localPlaceholder:oe,localSearchPlaceholder:F,localSelectAllText:te,resolveClassName:a,handleCreateCustomOption:_D}},render(){const e=we({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?i.createVNode(vn,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?i.createVNode(ot,{class:"clear-icon",onClick:this.handleClear},null):i.createVNode(Hn,{class:"angle-up"},null),n=()=>{var d;return this.prefix?()=>i.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[i.createVNode("span",null,[this.prefix])]):(d=this.$slots)!=null&&d.prefix?()=>{var c,u;return(u=(c=this.$slots)==null?void 0:c.prefix)==null?void 0:u.call(c)}:void 0},a=()=>{if(this.isShowSelectAll)return i.createVNode("li",{class:this.resolveClassName("select-option"),onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleSelectAll},[this.selectedStyle==="checkbox"&&i.createVNode(dt,{class:this.resolveClassName("select-checkbox"),modelValue:this.isAllSelected,indeterminate:!this.isAllSelected&&!!this.selected.length},null),this.t.selectAll])},s=()=>{if(!(this.isShowSelectAll||!this.isShowAll))return i.createVNode(xi,{id:this.allOptionId,name:this.t.all},null)},r=()=>{var d,c;return this.multipleMode==="tag"?i.createVNode(wM,{ref:"selectTagInputRef",modelValue:this.customOptionName,"onUpdate:modelValue":u=>this.customOptionName=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.localPlaceholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleCreateCustomOption},{prefix:n(),default:((d=this.$slots)==null?void 0:d.tag)&&(()=>{var u;return(u=this.$slots)==null?void 0:u.tag({selected:this.selected})}),suffix:()=>t()}):i.createVNode(Un,i.mergeProps({ref:"inputRef",type:"text",modelValue:this.isInput?this.customOptionName:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,stopPropagation:!1,onInput:this.handleInputChange,onEnter:this.handleCreateCustomOption},this.prefix?{prefix:this.prefix}:null),{...typeof((c=this.$slots)==null?void 0:c.prefix)=="function"?{prefix:()=>{var u,f;return(f=(u=this.$slots)==null?void 0:u.prefix)==null?void 0:f.call(u)}}:null,suffix:()=>t()})},o=()=>{var d,c;return i.createVNode("div",{class:this.resolveClassName("select-trigger"),style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((c=(d=this.$slots)==null?void 0:d.trigger)==null?void 0:c.call(d,{selected:this.selected}))||r()])},l=()=>{var d,c,u,f;return i.createVNode("div",{class:this.resolveClassName("select-content-wrapper"),ref:"contentRef"},[this.filterable&&!this.inputSearch&&i.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[i.createVNode(Fn,{class:"icon-search",width:16,height:16},null),i.withDirectives(i.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),placeholder:this.localSearchPlaceholder,"onUpdate:modelValue":h=>this.searchValue=h},null),[[i.vModelText,this.searchValue]])]),!this.isShowSelectContent&&i.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&i.createVNode(vn,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),i.createVNode("span",null,[this.curContentText])]),i.createVNode("div",{class:this.resolveClassName("select-content")},[i.createVNode("div",{class:this.enableVirtualRender?"":this.resolveClassName("select-dropdown"),style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[i.withDirectives(i.createVNode("ul",{class:this.resolveClassName("select-options")},[a(),s(),this.enableVirtualRender?i.createVNode(za,{list:this.virtualList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:h})=>{var p,C;const m=((p=this.$slots)==null?void 0:p.optionRender)||((C=this.$slots)==null?void 0:C.virtualScrollRender);return h.map(v=>i.createVNode(xi,{key:v[this.idKey],id:v[this.idKey],name:v[this.displayKey]},typeof m=="function"?{default:()=>m({item:v})}:null))}}):this.list.map(h=>{var m;return i.createVNode(xi,{id:h[this.idKey],name:h[this.displayKey]},(m=this.$slots)!=null&&m.optionRender?{default:()=>{var p,C;return(C=(p=this.$slots)==null?void 0:p.optionRender)==null?void 0:C.call(p,{item:h})}}:null)}),(c=(d=this.$slots)==null?void 0:d.default)==null?void 0:c.call(d),this.scrollLoading&&i.createVNode("li",{class:this.resolveClassName("select-options-loading")},[i.createVNode(vn,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),i.createVNode("span",null,[this.localLoadingText])])]),[[i.vShow,this.isShowSelectContent]])]),((u=this.$slots)==null?void 0:u.extension)&&i.createVNode("div",{class:this.resolveClassName("select-extension")},[(f=this.$slots)==null?void 0:f.extension()])])])};return i.createVNode("div",{class:e},[i.createVNode(pt,i.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>o(),content:()=>l()})])}}),Yl=qe(MM,{Option:xi,Group:pM});function IM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const{propsMixin:LM}=Si,Ul=Object.assign({},LM);Ul.width.default="400",Ul.height.default="100%";const TM=i.defineComponent({name:"Sideslider",props:{...Ul,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,{slots:t,emit:n}){const a=async()=>{let l=!0;typeof e.beforeClose=="function"&&(l=await e.beforeClose()),l&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},r=()=>{setTimeout(()=>{n("hidden")},200)},{resolveClassName:o}=le();return()=>{const l={header:()=>{var u;return i.createVNode(i.Fragment,null,[i.createVNode("div",{class:`${o("sideslider-header")}`},[i.createVNode("div",{class:`${o("sideslider-close")} ${e.direction}`,onClick:()=>{a()}},null),i.createVNode("div",{class:`${o("sideslider-title")} ${e.direction}`},[((u=t.header)==null?void 0:u.call(t))??e.title])])])},default:()=>{var u;return((u=t.default)==null?void 0:u.call(t))??"Content"},footer:()=>t.footer?i.createVNode("div",{class:`${o("sideslider-footer")}`},[t.footer()]):null},d=`${o("sideslider-wrapper")} ${e.scrollable?"scroll-able":""} ${e.extCls}`,c=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return i.createVNode(Si,i.mergeProps(e,{maxHeight:c,class:d,style:`${e.direction}: 0;`,onHidden:r,onShown:s,onClose:a}),IM(l)?l:{default:()=>[l]})}}}),Ah=Le(TM);var zh=function(e){return e.UNKNOWN="",e.ERROR="error",e.LOADING="loading",e}(zh||{});const Vh={theme:g.theme().def(cs.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:Zd(),status:me("status",{}).def(zh.UNKNOWN),lineType:Yd(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func},Jh=Le(i.defineComponent({name:"Steps",props:Vh,emits:["update:curStep","click"],setup(e,{emit:t}){const n=je("steps"),a=je("lang"),s=i.ref([]),r=u=>{const f=[];u.forEach(h=>{typeof h=="string"?f.push(h):f.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...f)},o=u=>{Vh.curStep=u},l=()=>{var u;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}),(u=e.steps)!=null&&u.length&&r(e.steps)};i.watch(()=>a.value,()=>{l()});const d=async u=>{try{e.controllable&&u!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,h)=>{const m=await e.beforeChange(u);m?f(m):h(m)}),t("update:curStep",u),t("click",u))}catch(f){console.warn(f)}};i.onMounted(l),i.watch(()=>e.steps,()=>{r(e.steps)},{deep:!0}),i.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:c}=le();return{defaultSteps:s,jumpTo:d,resolveClassName:c}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",a=we({[`${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",r=f=>this.curStep===f+1,o=f=>{const{icon:h}=f;return h?Object.prototype.toString.call(h)==="[object Object]":typeof f=="string"},l=(f,h)=>(h.icon||(h.icon=f),!isNaN(h.icon)),d=f=>f.status==="loading",c=f=>f.status==="error",u=(f,h)=>r(f)&&this.status==="loading"||d(h)?i.createVNode(fi,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):r(f)&&this.status==="error"||c(h)?i.createVNode(lt,{class:`${this.resolveClassName("steps-icon")}`},null):s(f)?i.createVNode(Wn,{class:`${this.resolveClassName("steps-icon")}`},null):i.createVNode("span",null,[l(f,h)?f+1:i.createVNode(h.icon,null,null)]);return i.createVNode("div",{class:a},[this.defaultSteps.map((f,h)=>{var m,p;return i.createVNode("div",{class:[this.resolveClassName("step"),f.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",r(h)?"current":"",r(h)&&this.status==="error"?"is-error":"",f.status&&r(h)?[`${this.resolveClassName(`step-${f.status}`)}`]:""]},[i.createVNode("span",{class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(f)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${f.status}`)}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(h+1)}},[((p=(m=this.$slots)[h+1])==null?void 0:p.call(m))??u(h,f)]),f.title?i.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[i.createVNode("div",{class:`${this.resolveClassName("step-title")}`,style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(h+1)}},[f.title]),f.description&&i.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:f.description},[f.description])]):""])})])}})),SM={theme:Rm(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)};let vr=function(e){return e.UPDATE="update:modelValue",e.CHANGE="change",e}({});function kM(e){return e}function xM(e){return!!e}const DM={[vr.UPDATE]:kM,[vr.CHANGE]:xM},Rh=Le(i.defineComponent({name:"Switcher",props:SM,emits:DM,setup(e,{emit:t}){const n=kt(),{resolveClassName:a}=le(),s=i.ref(!1),r=i.computed(()=>e.trueValue===l.value),o=i.ref(e.modelValue!==!1),l=i.computed(()=>o.value?e.modelValue:e.value),d=i.computed(()=>{const f={[e.extCls]:!!e.extCls,[`${a("switcher")}`]:!0,[`${a("switcher-outline")}`]:e.isOutline,[`${a("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":r.value,"is-unchecked":!r.value,"is-loading":s.value,[`${a("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${a(`switcher-${e.size}`)}`;f[h]=!0}return f});i.watch(()=>e.modelValue,()=>{var f;o.value=!0,e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),i.watch(()=>e.value,()=>{o.value=!1});const c=f=>{if(f.stopPropagation(),f.preventDefault(),e.disabled||s.value)return;const h=r.value?e.falseValue:e.trueValue,m=!r.value,p=()=>{t(vr.UPDATE,h),t(vr.CHANGE,m)};let C=!0;if(typeof e.beforeChange=="function"&&(C=e.beforeChange(h),typeof C.then=="function"))return s.value=!0,C.then(()=>{p()}).finally(()=>{s.value=!1});C&&p()},u=f=>{(f.code==="Enter"||f.key==="Enter"||f.keyCode===13)&&c(f)};return()=>i.createVNode("div",{class:d.value,onClick:c,tabindex:"0",onKeydown:u},[s.value?i.createVNode(Gs,{class:`${a("switcher-loading")}`},null):"",e.showText?i.createVNode("span",{class:"switcher-text"},[r.value?e.onText:e.offText]):""])}}));var Nr=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(Nr||{}),Qh=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(Qh||{});const jM=["auto","highlight"],OM=["none","row","col","outer","horizontal"],Se={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"},be={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_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},wr=6,yt=42;var Mr=(e=>(e.DEF1="def1",e.DEF2="def2",e))(Mr||{});const $h={def1:"#FAFBFD",def2:"#F0F1F5"},kn={large:78,medium:60,small:42},EM=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:kn.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:kn.medium},{value:"large",label:e.value.setting.lineHeight.large,height:kn.large}],_h="InitColumns",Hh="BKTableCahce",PM="Bk_COlumn_Update_Define",AM=60;var Qe=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Qe||{});const zM=["asc","desc","null","custom"],Xn=80,ji={},Wh={};me("showOverflowTooltipMode",{default:"auto"});const VM=me("columnType",{default:"none"}),Kl=me("columnType",{default:""});me("full",{default:"full"}),me("columnSize",{default:"small"});const JM=rt(),Xl=me("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),RM=me("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),QM=me("IFilterPropShape",{default:!1,type:[Boolean,Object]});var Fh=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(Fh||{});const Oi=me("IColumnType",{default:{width:"100%",label:""},type:[Object]}),Bh=me("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),ql=me("LabelFunctionStringType",{}),$M=me("RenderFunctionStringType",{}),Gh=me("SpanFunctionStringType",{}),_M=me("RowClassFunctionStringType",{}),HM=me("RowHeightFunctionNumberType",{});me("FunctionNumberType",{});const Ir=e=>me("StringNumberType",{}).def(e);me("IColumnPropType",{default:{label:void 0,minWidth:Xn},type:[Object]});var ec=(e=>(e.interdependent="interdependent",e.independent="independent",e))(ec||{});const WM={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(Oi).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:me("columnPick",{}).def("disabled"),height:Ir("auto"),stripe:g.bool.def(!1),minHeight:Ir(yt*2),maxHeight:Ir("auto"),rowHeight:HM.def(yt),headHeight:g.number.def(yt),showHead:g.bool.def(!0),sortValFormat:g.arrayOf(g.any).def([""]),thead:me("ITheadType",{}).def({color:Mr.DEF1,height:yt,isShow:!0}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(me("boderType",{})),g.string]).def([Nr.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),paginationHeight:g.number.def(AM),remotePagination:g.bool.def(!1),acrossAll:g.bool.def(!1),emptyText:g.string,emptyCellText:g.oneOfType([g.string,g.func.def(()=>"")]).def(""),settings:Bh,rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),checked:g.array.def([]),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(Se.ROW_INDEX),showOverflowTooltip:Xl,asyncData:g.bool.def(!1),rowHover:g.oneOf(jM).def(Qh.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0),resizerWay:me("ResizerWay",{default:"debounce"}),observerResize:g.bool.def(!0),align:Kl,headerAlign:Kl,prependStyle:g.style().def({}),colSortBehavior:me("IColSortBehavior",{default:"independent"}),isFlex:g.bool.def(!0),rowDraggable:g.oneOfType([g.func,g.bool,g.object]).def(!1)},FM={label:ql,field:ql,render:$M,width:g.oneOfType([g.number,g.string]),minWidth:Ir(Xn),columnKey:g.string.def(""),showOverflowTooltip:Xl,type:VM,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,JM]).def(!1),sort:RM,filter:QM,colspan:Gh.def(1),rowspan:Gh.def(1),align:Kl,className:_M,prop:ql,index:g.number.def(void 0)},BM=i.defineComponent({name:"TableColumn",props:FM,setup(e){const t=i.inject(_h,(s,r=!1)=>{},!1),n=i.inject(Hh,{queueStack:(s,r)=>r==null?void 0:r()}),a=i.reactive(Object.assign({},e,{field:e.prop||e.field}));return{initColumns:t,bkTableCache:n,column:a}},unmounted(){this.updateColumnDefine(!0)},mounted(){this.updateColumnDefine()},methods:{updateColumnDefine(e=!1){if(e){this.unmountColumn();return}this.updateColumnDefineByParent()},copyProps(e){return Object.keys(e??{}).reduce((t,n)=>{const a=n.replace(/-(\w)/g,(s,r)=>r.toUpperCase());return Object.assign(t,{[a]:e[n]})},{})},updateColumnDefineByParent(){const e=()=>{const n=this._.parent.vnode.children.default()||[],a=[];let s=0;const r=o=>{Array.isArray(o)&&o.forEach(l=>{var c,u,f;if(Array.isArray(l)){r(l);return}let d=!0;if(((c=l.type)==null?void 0:c.name)==="TableColumn"){d=Object.hasOwnProperty.call(l.props||{},"key");const h=Object.assign({index:s},this.copyProps(l.props),{field:l.props.prop||l.props.field,render:(u=l.children)==null?void 0:u.default});a.push(i.unref(h)),s=s+1}(f=l.children)!=null&&f.length&&d&&r(l.children)})};r(n),this.initColumns(a)};typeof this.bkTableCache.queueStack=="function"&&this.bkTableCache.queueStack(PM,e)},unmountColumn(){const e=Object.assign({},this.copyProps(this.$props),{field:this.$props.prop||this.$props.field,render:this.$slots.default});this.initColumns(e,!0)}},render(){var e,t;return i.createVNode(i.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{}})])}});class GM{constructor(){ye(this,"storage");this.storage={}}queueStack(t,n=()=>{}){this.storage[t]&&clearTimeout(this.storage[t]),this.storage[t]=setTimeout(()=>n())}clearQueueStack(t){this.storage[t]&&clearTimeout(this.storage[t])}}var Ve=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",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.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.DRAG_END="dragend",e))(Ve||{});const ZM=e=>!0,YM=e=>!0,UM=e=>!0,KM=e=>!0,Lr=(e,t,n,a,s)=>!0,XM=e=>!0,qM=e=>!0,eI=e=>!0,tI=e=>!0,Zh=e=>!0,nI=e=>!0,Yh=e=>!0,aI={columnPick:ZM,columnFilter:YM,columnSort:KM,colFilterSave:UM,rowClick:Lr,rowDblclick:Lr,rowExpand:XM,select:qM,selectAll:eI,selectionChange:tI,pageLimitChange:Zh,pageValueChange:Zh,settingChange:nI,scrollBottom:e=>!0,cellClick:Yh,cellDblclick:Yh,rowMouseEnter:Lr,rowMouseLeave:Lr,dragend:e=>!0},iI=(e,t=!0,n)=>{const{formatData:a,getColumnAttribute:s,getColumnOrderWidth:r,setColumnAttribute:o}=e,l=x=>s(x,be.LISTENERS),d="HeadColumnResize";let c=function(x){return x.MOUSE_MOVE="onMousemove",x.MOUSE_OUT="onMouseout",x.MOUSE_DOWN="onMousedown",x}({}),u=!1,f=!1,h=!1,m=0,p=null,C=0;const v=i.ref(-1e3),N=[be.RESIZE_WIDTH,be.CALC_WIDTH],I=x=>{x.stopImmediatePropagation(),x.stopPropagation(),x.preventDefault()},y=x=>{var F;I(x),f=!1,h=!1;const $=document.body.style;$.cursor="";const A=x.clientX-m,U=r(p,N)+A,Y=r(p,[be.COL_MIN_WIDTH]);o(p,be.RESIZE_WIDTH,U>Y?U:Y),setTimeout(()=>e.setAllColumnAttribute(be.COL_IS_DRAG,!1)),document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",w),m=0,v.value=-1e3,p=null;const oe=(F=n.value)==null?void 0:F.querySelector("table");oe==null||oe.querySelectorAll("th").forEach(te=>te.style.setProperty("user-select","inherit"))},b=x=>la(()=>{const $=x.clientX-m,A=r(p,N)+$;r(p,[be.COL_MIN_WIDTH])<A&&(v.value=x.clientX-m+C)},60),w=x=>{document.body.style.setProperty("cursor",""),b(x)(),I(x)},M=(x,$)=>{var A,U;ef(x)&&((A=x.style)==null||A.setProperty("cursor",$),((U=x.childNodes)==null?void 0:U.length)>0&&x.childNodes.forEach(Y=>M(Y,$)))},S={[c.MOUSE_DOWN]:(x,$)=>{if(!u)return;f=!0;const A=x.target.closest("th");e.setColumnAttribute($,be.COL_IS_DRAG,!0),e.setColumnAttribute($,be.CALC_WIDTH,A.scrollWidth),document.body.style.setProperty("cursor","col-resize"),p=$,m=x.clientX;const Y=x.target.closest("table");C=m-Y.getBoundingClientRect().left,b(x)(),document.addEventListener("mouseup",y),document.addEventListener("mousemove",w)},[c.MOUSE_MOVE]:(x,$)=>{f&&!h&&(h=!0);const A=x.target.closest("th");if(h&&(A.style.setProperty("user-select","none"),A.classList.remove("col-resize-hover")),!h){if(!A){A.classList.remove("col-resize-hover");return}const U=A.getBoundingClientRect();U.width>12&&U.right-x.pageX<8?(u=!0,M(A,"col-resize"),A.classList.add("col-resize-hover")):(M(A,""),A.classList.remove("col-resize-hover"),u=!1)}},[c.MOUSE_OUT]:(x,$)=>{const A=x.target.closest("th");h||(M(A,""),A.classList.remove("col-resize-hover"))}},L=x=>`${d}_${x}`,D=()=>{a.columns.forEach(x=>{if(x.resizable!==!1){const $=l(x);Object.keys(S).forEach(A=>{const U=L(A);$!=null&&$.has(U)||$.set(U,[]),$.get(U).push(S[A])})}})},T=()=>{a.columns.forEach(x=>{const $=l(x);Object.keys(S).forEach(A=>{const U=L(A);if($!=null&&$.has(U)){const Y=$.get(U);Y.length=0}})})};t&&D();const E={position:"absolute",top:0,bottom:0,left:0,width:"1px",backgroundColor:"#3785FF",transform:"translateX(-50%)"},P=i.computed(()=>e.formatData.layout),J=i.computed(()=>({...E,transform:`translate(${v.value+3}px, ${P.value.translateY}px)`})),j=i.computed(()=>({...E,width:"6px",transform:`translateX(${v.value}px)`}));return{registerResizeEvent:D,resetResizeEvents:T,dragOffsetX:v,dragOffsetXStyle:E,resizeColumnStyle:J,resizeHeadColStyle:j}},tc=(e,t,n)=>{const{formatData:a,isHiddenColumn:s,getColumnId:r,getColumnOrderWidth:o}=t,l=(y,b,w)=>({column_fixed:!!y.fixed,column_fixed_left:y.fixed!=="right",column_fixed_right:y.fixed==="right",shadow:y.fixed==="right"?w-b>2:b>0}),d=y=>{var L;const b=o(y);if(/^\d+/.test(`${b}`))return b;const M=`[data-id="${t.getColumnId(y)}"]`,S=((L=n==null?void 0:n.value)==null?void 0:L.querySelector(M))??{offsetWidth:0};return(S==null?void 0:S.offsetWidth)??0},c=y=>y.fixed==="right"?"right":"left",u={left:(y=!0)=>a.columns.filter(b=>!s(b)&&b.fixed&&b.fixed!=="right").reduce((b,w,M)=>{const S=d(w);return y&&M===0?b:b+S},0),right:(y=!0)=>a.columns.filter(b=>!s(b)&&b.fixed==="right").reduce((b,w,M)=>y&&M===0?b:b+d(w),0)},f=(y,b,w=0)=>{const M=r(b),S=y==="right"?-1:1,L=a.columns.filter(P=>!s(P)),{length:D}=L;let T=y==="right"?D*S:1,E=0;for(T;;){T=T+-1*S;const P=Math.abs(T),J=L[P],j=c(J),x=r(J);if(j===y&&M!==x){const $=o(J);E=E+$}if(M===x)break}return E+w},h=(y,b=!1)=>{if(!y.fixed||s(y))return{};const w={left:0,right:b?wr:-1},M=c(y);return w[M]=f(M,y,w[M]),{[M]:`${w[M]}px`}},m=y=>({width:`${u[y](!1)}px`,backgroundColor:e.thead.color,bottom:"0px"}),p=i.reactive([]),C=y=>{const b={left:!1,right:!1},w=a.columns.filter(M=>!s(M)&&M.fixed).map(M=>{const S=c(M),L=b[S];b[S]=!0;const D=l(M,t.formatData.layout.translateX,y),T=m(S);return{isExist:L,colPos:S,column:M,className:D,style:T}});p.length=0,p.push(...w)},v=y=>{p.forEach(b=>{const w=l(b.column,t.formatData.layout.translateX,y);Object.assign(b.className,w)})},{resolveClassName:N}=le();return{fixedWrapperClass:N("table-fixed"),resolveFixedColumnStyle:h,resolveFixedColumns:C,fixedColumns:p,resolveColumnStyle:m,resolveColumnClass:l,updateFixClass:v}},sI=(e,t)=>{const n=i.toRef(e,"scrollLoading"),a=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Bn.Normal,mode:ml.Default,indicator:null}:n.value,s=i.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var o,l;if(s.value){const{loading:d,size:c,mode:u,title:f,inline:h,indicator:m}=a();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??i.createVNode(vn,{loading:d,size:c,mode:u,title:f,inline:h,indicator:m},null)}}}},rI=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),{...t,...e,current:n}}return t}return{}},oI=e=>{const t=i.ref(0),n=i.ref(0),a=i.computed(()=>e.data),s=i.ref(null),r=i.reactive([]);let o=i.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});const l=()=>{e.pagination&&(s.value=e.remotePagination?o:{...o,count:r.length})},d=()=>{if(!e.pagination||e.remotePagination){t.value=0,n.value=r.length;return}t.value=(o.current-1)*o.limit,n.value=o.current*o.limit},c=i.reactive([]),u=(I,y,b,w,M)=>{typeof y=="function"&&I.sort((S,L)=>y(S,L,w,b,M))},f=(I,y)=>{y.forEach(b=>{u(I,b.schema[be.COL_SORT_FN],b.column,b.schema[be.COL_SORT_TYPE],b.schema[be.COL_SORT_SCOPE])})},h=(I,y)=>{if(typeof y=="function"){const b=I.filter((w,M)=>y(w,M,r));I.length=0,I.push(...b)}return I},m=()=>new Promise(I=>{i.nextTick(()=>{const y=a.value.slice();r.length=0,r.push(...y),I()})}),p=(I,y,b,w,M,S)=>{const L=r.slice();S!=null&&S.length&&f(L,S),c.length=0,c.push(...L.slice(t.value,n.value)),h(c,I),u(c,y,b,w,M),l()},C=I=>{p(null,null,null,null,null,I)},v=I=>{const y=r.slice(),b=I.reduce((w,M)=>h(w,M),y);c.length=0,c.push(...b)},N=()=>{o=rI(e.pagination,o),l(),d(),p()};return N(),i.watch(()=>[e.pagination],()=>{N()},{deep:!0}),{pageData:c,indexData:r,localPagination:s,resolvePageData:p,resolveIndexData:m,resolvePageDataBySortList:C,resetStartEndIndex:d,multiFilter:v,sort:u}};var lI=sn,cI=Ki,dI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uI=/^\w*$/;function fI(e,t){if(lI(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||cI(e)?!0:uI.test(e)||!dI.test(e)||t!=null&&e in Object(t)}var hI=fI,Uh=jo,gI="Expected a function";function nc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gI);var n=function(){var a=arguments,s=t?t.apply(this,a):a[0],r=n.cache;if(r.has(s))return r.get(s);var o=e.apply(this,a);return n.cache=r.set(s,o)||r,o};return n.cache=new(nc.Cache||Uh),n}nc.Cache=Uh;var mI=nc,pI=mI,yI=500;function bI(e){var t=pI(e,function(a){return n.size===yI&&n.clear(),a}),n=t.cache;return t}var CI=bI,vI=CI,NI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wI=/\\(\\)?/g,MI=vI(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(NI,function(n,a,s,r){t.push(s?r.replace(wI,"$1"):a||n)}),t}),II=MI;function LI(e,t){for(var n=-1,a=e==null?0:e.length,s=Array(a);++n<a;)s[n]=t(e[n],n,e);return s}var TI=LI,Kh=Ui,SI=TI,kI=sn,xI=Ki,DI=1/0,Xh=Kh?Kh.prototype:void 0,qh=Xh?Xh.toString:void 0;function e0(e){if(typeof e=="string")return e;if(kI(e))return SI(e,e0)+"";if(xI(e))return qh?qh.call(e):"";var t=e+"";return t=="0"&&1/e==-DI?"-0":t}var jI=e0,OI=jI;function EI(e){return e==null?"":OI(e)}var PI=EI,AI=sn,zI=hI,VI=II,JI=PI;function RI(e,t){return AI(e)?e:zI(e,t)?[e]:VI(JI(e))}var QI=RI,$I=Ki,_I=1/0;function HI(e){if(typeof e=="string"||$I(e))return e;var t=e+"";return t=="0"&&1/e==-_I?"-0":t}var WI=HI,FI=QI,BI=WI;function GI(e,t){t=FI(t,e);for(var n=0,a=t.length;e!=null&&n<a;)e=e[BI(t[n++])];return n&&n==a?e:void 0}var ZI=GI,YI=ZI;function UI(e,t,n){var a=e==null?void 0:YI(e,t);return a===void 0?n:a}var KI=UI;const Tr=Xe(KI);var t0=function(){if(typeof Map<"u")return Map;function e(t,n){var a=-1;return t.some(function(s,r){return s[0]===n?(a=r,!0):!1}),a}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 a=e(this.__entries__,n),s=this.__entries__[a];return s&&s[1]},t.prototype.set=function(n,a){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=a:this.__entries__.push([n,a])},t.prototype.delete=function(n){var a=this.__entries__,s=e(a,n);~s&&a.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,a){a===void 0&&(a=null);for(var s=0,r=this.__entries__;s<r.length;s++){var o=r[s];n.call(a,o[1],o[0])}},t}()}(),ac=typeof window<"u"&&typeof document<"u"&&window.document===document,Sr=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")()}(),XI=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Sr):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),qI=2;function e7(e,t){var n=!1,a=!1,s=0;function r(){n&&(n=!1,e()),a&&l()}function o(){XI(r)}function l(){var d=Date.now();if(n){if(d-s<qI)return;a=!0}else n=!0,a=!1,setTimeout(o,t);s=d}return l}var t7=20,n7=["top","right","bottom","left","width","height","size","weight"],a7=typeof MutationObserver<"u",i7=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=e7(this.refresh.bind(this),t7)}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_,a=n.indexOf(t);~a&&n.splice(a,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(){!ac||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a7?(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(){!ac||!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,a=n===void 0?"":n,s=n7.some(function(r){return!!~a.indexOf(r)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),n0=function(e,t){for(var n=0,a=Object.keys(t);n<a.length;n++){var s=a[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Va=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Sr},a0=xr(0,0,0,0);function kr(e){return parseFloat(e)||0}function i0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(a,s){var r=e["border-"+s+"-width"];return a+kr(r)},0)}function s7(e){for(var t=["top","right","bottom","left"],n={},a=0,s=t;a<s.length;a++){var r=s[a],o=e["padding-"+r];n[r]=kr(o)}return n}function r7(e){var t=e.getBBox();return xr(0,0,t.width,t.height)}function o7(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return a0;var a=Va(e).getComputedStyle(e),s=s7(a),r=s.left+s.right,o=s.top+s.bottom,l=kr(a.width),d=kr(a.height);if(a.boxSizing==="border-box"&&(Math.round(l+r)!==t&&(l-=i0(a,"left","right")+r),Math.round(d+o)!==n&&(d-=i0(a,"top","bottom")+o)),!c7(e)){var c=Math.round(l+r)-t,u=Math.round(d+o)-n;Math.abs(c)!==1&&(l-=c),Math.abs(u)!==1&&(d-=u)}return xr(s.left,s.top,l,d)}var l7=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Va(e).SVGGraphicsElement}:function(e){return e instanceof Va(e).SVGElement&&typeof e.getBBox=="function"}}();function c7(e){return e===Va(e).document.documentElement}function d7(e){return ac?l7(e)?r7(e):o7(e):a0}function u7(e){var t=e.x,n=e.y,a=e.width,s=e.height,r=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(r.prototype);return n0(o,{x:t,y:n,width:a,height:s,top:n,right:t+a,bottom:s+n,left:t}),o}function xr(e,t,n,a){return{x:e,y:t,width:n,height:a}}var f7=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=xr(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=d7(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}(),h7=function(){function e(t,n){var a=u7(n);n0(this,{target:t,contentRect:a})}return e}(),g7=function(){function e(t,n,a){if(this.activeObservations_=[],this.observations_=new t0,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=a}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 Va(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new f7(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 Va(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(a){return new h7(a.target,a.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}(),s0=typeof WeakMap<"u"?new WeakMap:new t0,r0=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=i7.getInstance(),a=new g7(t,n,this);s0.set(this,a)}return e}();["observe","unobserve","disconnect"].forEach(function(e){r0.prototype[e]=function(){var t;return(t=s0.get(this))[e].apply(t,arguments)}});var m7=function(){return typeof Sr.ResizeObserver<"u"?Sr.ResizeObserver:r0}();const Ye=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(a=>Ye(e,a,n)).filter(a=>a!==void 0).at(0)}},p7=e=>ic(e,"auto"),ic=(e,t="100%",n=null)=>{let a="";return/^auto|null|undefined$/gi.test(`${e}`)?a=t:a=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(a=`calc(${a} - ${n})`),a},y7=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>OM.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},b7=(e,t,n=60,a=!1,s="throttle")=>{const r=()=>{typeof t=="function"&&t()},o=s==="debounce"?Xi(r,n):la(r,n),l=()=>Reflect.apply(o,globalThis,[]),d=new m7(()=>{l()});return a&&typeof t=="function"&&t(),{start:()=>{d.observe(e)},disconnect:()=>{d.unobserve(e),d.disconnect()}}},Dr=e=>{const{showHead:t,headHeight:n,thead:a={}}=e;return Object.assign({},{isShow:t,height:n},a)},jr=(e,t,n)=>{let a;(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(a=e);const s=(r,o="ig")=>new RegExp(`${r}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),o);return a=Tr(e,t),n!=null&&n.length&&(n.forEach(r=>{if(typeof r=="function")a=r(a,e,t);else if(typeof a=="string"){const o=a.match(typeof r=="string"?s(r):r);a=(o==null?void 0:o[1])??a}}),/^-?\d+.?\d*$/.test(a)&&(a=Number(a))),a},C7=(e,t)=>Tr(e,t),Ei=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ei(Reflect.apply(e,globalThis,t),t):[],v7=(e,t,n)=>{const a=o0(e,t,n);return a!==null?a:nn()},o0=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Se.ROW_INDEX?`__ROW_INDEX_${n}`:Tr(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):null,N7=(e,t,n=0)=>{if(e){const a=e.querySelector(t);if(a)return a.offsetHeight>e.offsetHeight-n}return!1},l0=(e,t,n)=>{const a=r=>r.field??r.id;return(r=>e.some(o=>a(o)===Ye(r,["field","type"],[r])))(t)&&n.length&&!n.includes(Ye(t,["field","type"],[t]))},Or=(e,t,n,a,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:a}]):typeof e[s]=="number"?e[s]:1,w7=(e,t,n,a)=>{const s=Or(e,t,n,a,"colspan"),r=Or(e,t,n,a,"rowspan");return{colspan:s,rowspan:r}},sc=(e,t,n=[])=>{var l,d;const a=e.field,s=c=>jr(c,a,n),r=(c,u)=>{const f=s(c)??"",h=s(u)??"";return typeof f=="number"&&typeof h=="number"?f-h:String.prototype.localeCompare.call(f,h)},o=typeof((l=e.sort)==null?void 0:l.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:r;return t===Qe.NULL?(c,u)=>!0:(c,u)=>o(c,u)*(t===Qe.DESC?-1:1)},c0=e=>{const t={[Qe.NULL]:3,[Qe.ASC]:1,[Qe.DESC]:2};return t[e]===void 0?Qe.ASC:Object.keys(t)[(t[e]+1)%3]},d0=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Qe.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:sc(t,e.value??Qe.NULL,n)},e):null,Er=(e,{row:t,index:n,isCheckAll:a})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:a}):!0,M7=(e,t,n)=>{const a=v7(e,n,t);return a!==void 0&&e[a]!==void 0?e[a]:t},I7=(e,t)=>{const{value:n,sortFn:a,sortScope:s}=d0(e.sort??t.defaultSort,e)??{};return{type:n,fn:a,scope:s,active:!!e.sort}},L7=e=>{const t=je("table"),n=()=>{const{size:Z,fields:K=[],checked:X=[]}=e.settings,ae=kn[Z]??e.rowHeight??kn.small;return{size:Z,height:ae,fields:K,checked:X}},a=i.reactive({data:[...e.data],dataSchema:new WeakMap,columns:[...e.columns],columnSchema:new WeakMap,settings:n(),layout:{hasScrollY:!1,bottom:0,translateX:0,translateY:0}}),{pageData:s,indexData:r,localPagination:o,resolvePageData:l,resolvePageDataBySortList:d,multiFilter:c,sort:u,resetStartEndIndex:f,resolveIndexData:h}=oI(e),m=(Z,K)=>{if(Z){const{size:X,fields:ae=[],checked:pe=[]}=Z,ee=K??kn[X]??e.rowHeight??kn.small;Object.assign(a.settings,{size:X,height:ee,fields:ae,checked:pe});return}K&&(a.settings.height=K)},p=Z=>{if(/^\d+/.test(`${Z.minWidth}`))return Z.minWidth;let K=Xn;return Z.sort&&(K=K+18),Z.filter&&(K=K+28),K},C=()=>{var Z,K;e.rowDraggable&&a.columns.unshift({minWidth:50,width:((Z=e.rowDraggable)==null?void 0:Z.width)??60,label:((K=e.rowDraggable)==null?void 0:K.label)??t.value.sort,type:"drag"})},v=Z=>{a.columns.length=0,a.columns.push(...Z),C();let K=0;const X=oe(["colspan"]);(a.columns||[]).forEach((ae,pe)=>{const{skipCol:ee,skipColumnNum:re,skipColLen:ge}=X?N(ae,pe,K):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(K=re,!a.columnSchema.has(ae)){const{type:Ne,fn:ve,scope:Ie,active:ke}=I7(ae,e),De=Oe=>Oe.type==="index"?(Ae,St)=>{var Re,Ze;return ve==null?void 0:ve((Re=a.dataSchema.get(Ae))==null?void 0:Re[Se.ROW_INDEX],(Ze=a.dataSchema.get(St))==null?void 0:Ze[Se.ROW_INDEX])}:ve;a.columnSchema.set(ae,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_MIN_WIDTH]:p(ae),[be.LISTENERS]:new Map,[be.WIDTH]:ae.width,[be.IS_HIDDEN]:l0(a.settings.fields,ae,a.settings.checked),[be.COL_SORT_TYPE]:Ne,[be.COL_SORT_FN]:De(ae),[be.COL_FILTER_FN]:void 0,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:Ie,[be.COL_SORT_ACTIVE]:ke,[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:ee,skipColumnNum:re,skipColLen:ge},[be.COL_UID]:nn()})}Object.assign(a.columnSchema.get(ae),{[be.COL_SPAN]:{skipCol:ee,skipColumnNum:re,skipColLen:ge},[be.COL_MIN_WIDTH]:p(ae)})})},N=(Z,K,X)=>{let ae=X;const pe=Or(Z,K,null,null,"colspan"),ee={skipCol:!1,skipColLen:0};return ae>0&&(ee.skipColLen=ae,ee.skipCol=!0,ae=ae-1),pe>1&&(ee.skipColLen=pe,ae=pe-1),{...ee,skipColumnNum:ae}},I=Z=>U(Z,be.COL_FILTER_FN),y=()=>{const Z=a.columns.filter(K=>!j(K)&&typeof I(K)=="function").map(K=>I(K));c(Z)},b=Z=>{const K=U(Z,be.COL_SORT_FN),X=U(Z,be.COL_SORT_TYPE),ae=U(Z,be.COL_SORT_SCOPE);if(X===Qe.NULL){h().then(()=>{l()});return}if(ae==="all"){u(r,K,Z,X,ae),l();return}u(s,K,Z,X,ae)},w=(Z=!1)=>{a.columns.forEach(K=>{$(K,be.COL_SORT_ACTIVE,!1),$(K,be.COL_FILTER_FN,void 0)}),Z&&l()},M=(Z,K)=>{const X=Array.isArray(Z)?Z:[Z],ae=Array.isArray(K)?K:[K];a.columns.forEach(pe=>{X.forEach((ee,re)=>{$(pe,ee,ae[re])})})},S=(Z,K)=>{e.colSortBehavior===ec.independent&&a.columns.forEach(X=>{$(X,be.COL_SORT_ACTIVE,!1)}),$(Z,be.COL_SORT_ACTIVE,K)},L=(Z,K)=>Er(e,{row:Z,index:K})?B(Z,Se.ROW_SELECTION):!0,D=()=>e.acrossAll?a.data.every((Z,K)=>L(Z,K)):s.every((Z,K)=>L(Z,K)),T=()=>e.acrossAll?a.data.some(Z=>B(Z,Se.ROW_SELECTION)):s.some(Z=>B(Z,Se.ROW_SELECTION)),E=Z=>{var K;return((K=a.columnSchema.get(Z))==null?void 0:K[be.IS_HIDDEN])??!1},P=[be.RESIZE_WIDTH,be.CALC_WIDTH,be.WIDTH],J=(Z,K=P)=>{const X=a.columnSchema.get(Z)??{};return X[K[0]]??X[K[1]]??X[K[2]]},j=Z=>{var K;return((K=a.columnSchema.get(Z))==null?void 0:K[be.IS_HIDDEN])??!1},x=Z=>{var K;return(K=a.columnSchema.get(Z))==null?void 0:K[be.COL_UID]},$=(Z,K,X)=>{const ae=a.columnSchema.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,K)&&(ae[K]=X)},A=(Z,K)=>{const X=K||Z.checked||[],ae=Z.fields||[];a.columns.forEach(pe=>{$(pe,be.IS_HIDDEN,l0(ae,pe,X))})},U=(Z,K)=>{var X;return(X=a.columnSchema.get(Z))==null?void 0:X[K]},Y=Z=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn({row:Z}):Array.isArray(e.checked)?e.checked.some(K=>typeof K=="string"?C7(Z,K)===K:K===Z):!1:!1,oe=(Z=["rowspan","colspan"])=>a.columns.some(K=>Z.some(X=>typeof K[X]=="function"||/^\d$/.test(`${K[X]}`))),F=Z=>{a.data.length=0,a.data.push(...Z);let K=!1,X=!1;(Z||[]).forEach((ae,pe)=>{let ee=M7(ae,nn(),e);const re=Y(ae);re?K=!0:X=!0,a.dataSchema.has(ae)||a.dataSchema.set(ae,{[Se.ROW_EXPAND]:!1,[Se.ROW_SELECTION]:re,[Se.ROW_UID]:ee,[Se.ROW_INDEX]:pe+1,[Se.ROW_SELECTION_INDETERMINATE]:!1});const ge=a.dataSchema.get(ae);ee=ge[Se.ROW_UID],ge[Se.ROW_INDEX]=pe+1}),a.dataSchema.set(ji,{[Se.ROW_SELECTION]:K,[Se.ROW_SELECTION_INDETERMINATE]:K&&X}),a.dataSchema.set(Wh,{[Se.ROW_SPAN]:oe(["rowspan"])})},te=Z=>{ne(Z)},z=()=>{const Z=D();W(ji,Se.ROW_SELECTION,Z),W(ji,Se.ROW_SELECTION_INDETERMINATE,!Z&&T())},W=(Z,K,X)=>{const ae=a.dataSchema.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,K)&&(ae[K]=X)},k=(Z,K)=>{let X=K;typeof e.isSelectedFn=="function"&&(X=e.isSelectedFn({row:Z})),Er(e,{row:Z})&&W(Z,Se.ROW_SELECTION,X),z()},O=(Z,K)=>{W(Z,Se.ROW_INDEX,K)},Q=(Z,K)=>{W(Z,Se.ROW_EXPAND,K)},B=(Z,K)=>{var X;return(X=a.dataSchema.get(Z))==null?void 0:X[K]},G=Z=>{if(typeof e.isSelectedFn=="function"){k(Z,e.isSelectedFn({row:Z}));return}k(Z,!B(Z,Se.ROW_SELECTION))},ne=Z=>{const K=Z??!D();if(e.acrossAll){a.data.forEach(X=>k(X,K));return}s.forEach(X=>k(X,K)),a.dataSchema.set(ji,{[Se.ROW_SELECTION]:K,[Se.ROW_SELECTION_INDETERMINATE]:!1})};return{formatColumns:v,formatDataSchema:F,setRowSelection:k,setRowExpand:Q,setRowIndex:O,setColumnAttribute:$,setColumnAttributeBySettings:A,setColumnSortActive:S,setRowSelectionAll:te,setRowIndeterminate:z,setAllColumnAttribute:M,getColumnAttribute:U,getColumnId:x,getColumnOrderWidth:J,getRowSelection:()=>a.data.filter(Z=>B(Z,Se.ROW_SELECTION)),resolveColumnWidth:(Z,K=Xn,X=0)=>{const{width:ae}=Z.getBoundingClientRect()||{},pe=ae-X;let ee=pe;const re=[],ge=(ve,Ie)=>{const ke=U(ve,be.COL_MIN_WIDTH);if(ke===void 0)return Ie<Xn?Xn:Ie;let De=Ie;return/^\d+\.?\d*$/.test(`${ke}`)&&(De=Number(ke)),/^\d+\.?\d*%$/.test(`${ke}`)&&(De=Number(ke)*pe/100),/^\d+\.?\d*px$/i.test(`${ke}`)&&(De=Number(`${ke}`.replace(/px/i,""))),De},Ne=(ve,Ie,ke=!0)=>{const De=ge(ve,Ie),Oe=Ie<De?De:Ie;Object.assign(ve,{calcWidth:Oe}),ke&&(ee=ee-Oe,ee<0&&(ee=0))};if(a.columns.forEach((ve,Ie)=>{if(!j(ve)){const De=String(J(ve,["resizeWidth","width"]));let Oe=!0;if(/^\d+\.?\d*(px)?$/.test(De)){const Ae=Number(De.replace("px",""));Ne(ve,Ae),Oe=!1}if(/^\d+\.?\d*%$/.test(De)){let Ae=K;if(ee>0){const St=Number(De.replace("%",""));Ae=ee*St/100}Ne(ve,Ae),Oe=!1}Oe&&re.push(Ie)}}),re.length>0){let ve=K;ee>0?re.forEach((Ie,ke)=>{ve=ee/(re.length-ke),Ne(a.columns[Ie],ve,!1);const De=U(a.columns[Ie],be.CALC_WIDTH);ee=ee-De}):re.forEach(Ie=>{const ke=ge(a.columns[Ie],Xn);$(a.columns[Ie],be.CALC_WIDTH,ke)})}},isActiveColumn:E,isHiddenColumn:j,resolvePageData:l,resolveByDefColumns:()=>{const Z=[];a.columns.forEach(K=>{const X=a.columnSchema.get(K);typeof(X==null?void 0:X[be.COL_SORT_FN])=="function"&&!((X==null?void 0:X[be.IS_HIDDEN])??!0)&&Z.push({column:K,schema:X})}),d(Z)},resetStartEndIndex:f,toggleAllSelection:ne,setAllRowExpand:Z=>{a.data.forEach(K=>Q(K,Z??!0))},clearSelection:()=>{a.data.forEach(Z=>k(Z,!1))},clearColumnSort:w,toggleRowSelection:G,getRowAttribute:B,filter:y,sortData:b,isCheckedAll:D,hasCheckedRow:T,updateSettings:m,changePageRowIndex:(Z,K)=>{const X=s[Z];s.splice(K,0,X);const ae=Z<K?Z:Z+1;s.splice(ae,1)},pageData:s,localPagination:o,formatData:a,setIndexData:()=>h()}},u0=(e,t)=>{const n=i.reactive(e.columns??[]),a=(o,l=!1)=>{let d=[];Array.isArray(o)?d=o:d=[o],l?d.forEach(c=>{const u=t.findIndex(f=>f.label===c.label&&f.field===c.field);u>=0&&t.splice(u,1)}):(d.forEach(c=>{const u=t.findIndex(f=>f.label===c.label&&f.field===c.field);u>=0?Object.assign(t[u],c):t.push(c)}),t.sort((c,u)=>c.index-u.index)),n.length=0,n.push(...t)};i.watch(()=>[e.columns],()=>{n.length=0,n.push(...e.columns)});const s=()=>n;return{initColumns:a,getColumns:s,getActiveColumn:()=>{var o;if(e.colSortBehavior===ec.independent){const l=[Qe.ASC,Qe.DESC];return(o=s().filter(d=>{var c;return l.includes((c=d.sort)==null?void 0:c.value)}))==null?void 0:o[0]}return null},columns:n}},T7=(e,t,n,a,s)=>{const{resolveClassName:r}=le(),{getColumns:o}=u0(e,t),l=i.ref(yt*10),d=i.ref(yt*10),c=i.ref(yt),u=i.ref(!1),f=i.computed(()=>e.pagination&&e.data.length),h=i.computed(()=>u.value),m=i.computed(()=>we({[r("table")]:!0,"has-footer":f.value,"has-scroll-y":u.value||e.virtualEnabled,[r("table-flex")]:e.isFlex},y7(e.border))),p=we({[r("table-head")]:!0,"has-settings":!!e.settings}),C=i.computed(()=>o()),v=Dr(e),N=i.computed(()=>{var O;return{"--row-height":`${Ye(v,"height",["thead"])}px`,"--scroll-head-left":`-${a.formatData.layout.translateX}px`,"--scroll-left":`${a.formatData.layout.translateX}px`,"--background-color":$h[((O=e.thead)==null?void 0:O.color)??Mr.DEF1]}}),I={[r("table-body")]:!0},y=i.computed(()=>we({[r("table-footer")]:!0,"is-hidden":!e.pagination||!e.data.length})),b=()=>e.height==="number"?`${e.height}px`:typeof e.height=="string"?e.height:"",w=()=>{if(C.value.every(O=>/^\d+\.?\d*(px)?$/gi.test(`${O.width}`))){const O=C.value.reduce((B,G)=>B+Number(`${G.width}`.replace(/px/gi,"")),0),Q=u.value?wr:0;return`${O+Q}px`}return"100%"},M=i.computed(()=>({minHeight:ic(e.minHeight,"auto"),width:w()||"100%",maxWidth:"100%",height:b()})),S=(O,Q)=>{const B=String(O);if(/^\d+\.?\d*$/.test(B))return parseFloat(B);if(/^\d+\.?\d*px$/gi.test(B))return parseFloat(B.replace("px",""));if(/^\d+\.?\d*%$/gi.test(B)){if(typeof Q=="number"){const G=parseFloat(B.replace("%",""));return Q*G/100}return B}return Q??O},L=i.reactive({display:"",minHeight:"",height:"",maxHeight:""}),D=O=>{if(e.showHead){if(!O)return S(e.headHeight,yt)??0;const Q=r("table-head"),B=O.querySelector(Q);return(B==null?void 0:B.offsetHeight)??S(e.headHeight,yt)??0}return 0},T=(O,Q,B)=>{if(/%$/.test(`${O}`))return`calc(${O} - ${Q+B}px)`;if(typeof O=="number"){const G=O-Q-B;return`${G>0?G:0}px`}return O},E=(O,Q)=>/^\d+\.?\d*$/.test(O)?`${O}px`:Q(),P=O=>{const Q=S(e.height);c.value=D(O);const B=e.pagination&&e.data.length?e.paginationHeight:0,G=T(Q,c.value,B),ne=E(Q,()=>{const _=S(e.maxHeight);return T(_,c.value,B)});L.display=s!=null&&s.length?"block":!1,L.minHeight=G,L.height=G,L.maxHeight=ne};i.onMounted(()=>{J(n==null?void 0:n.value)});const J=O=>{if(O){const Q=D(O),B=`.${r("table-body-content")} > table`,G=`.${r("table-body")}`,ne=O.querySelector(G),_=O.querySelector(B);P(O),d.value=((ne==null?void 0:ne.offsetHeight)??yt*10)+Q,l.value=((_==null?void 0:_.offsetHeight)??yt*10)+Q,j(O)}},j=O=>{if(!O)return;const Q=e.virtualEnabled?`.${r("virtual-section")}`:`.${r("table-body-content")}`,B=O.querySelector(`.${r("table-body")}`);u.value=N7(B,Q,0)},x=()=>{let O=0;return u.value&&(O=O+wr),e.border.includes(Nr.OUTER)&&!e.border.includes(Nr.NONE)&&(O=O+2),O},$=i.computed(()=>({...I,"__is-empty":!a.pageData.length})),A=i.computed(()=>({[r("table-body-content")]:!0,[r("stripe")]:e.stripe,"with-virtual-render":e.virtualEnabled})),U={column_drag_line:!0,"offset-x":!0},Y={"scroll-loading":!0,_bottom:!0},oe=i.computed(()=>({[r("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),F={zIndex:-1,width:0,height:0,display:"none"},te=i.computed(()=>({"--footer-height":f.value?`${e.paginationHeight}px`:"0"})),z=i.computed(()=>({right:h.value?`${wr}px`:0,"--fix-height":`${l.value}px`,...te.value})),W=i.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}),k=i.computed(()=>({"--prepend-left":`${a.formatData.layout.translateX}px`,position:"sticky",top:0,zIndex:2,...e.prependStyle||{}}));return{tableClass:m,headClass:p,contentClass:I,footerClass:y,wrapperStyle:M,contentStyle:L,headStyle:N,fixHeight:l,maxFixHeight:d,resetTableHeight:J,updateBorderClass:j,getColumnsWidthOffsetWidth:x,hasFooter:f,hasScrollY:u,hasScrollYRef:h,tableBodyClass:$,tableBodyContentClass:A,resizeColumnClass:U,loadingRowClass:Y,fixedBottomBorder:oe,columnGhostStyle:F,fixedContainerStyle:z,scrollClass:W,prependStyle:k,footerStyle:te}};function S7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const k7=e=>{const{proxy:t}=i.getCurrentInstance(),n=i.ref(t.limit);i.watch(()=>t.limit,o=>{n.value=o}),i.watch(()=>t.limitList,o=>{i.nextTick(()=>{o.includes(n.value)||([n.value]=o)})},{immediate:!0});const a=o=>{n.value=o},{resolveClassName:s}=le();return{limit:n,render:({isFirst:o,isLast:l})=>{let d;return t.showLimit?i.createVNode("div",i.mergeProps({class:{[s("pagination-limit")]:!0,"is-first":o,"is-last":l}},{disabled:t.disabled}),[i.createVNode("div",null,[e.value.eachPage]),i.createVNode(Yl,{class:`${s("pagination-limit-select")}`,clearable:!1,size:"small",withValidate:!1,modelValue:n.value,onChange:a,disabled:t.disabled},S7(d=t.limitList.map((c,u)=>i.createVNode(xi,{id:c,name:`${c}`,key:`${u}_${c}`},null)))?d:{default:()=>[d]}),i.createVNode("div",null,[e.value.strip])]):null}}},qn=5,x7=()=>{const{proxy:e}=i.getCurrentInstance(),t=i.ref(1),n=i.computed(()=>t.value===1),a=i.computed(()=>t.value===e.totalPageNum),s=i.ref(!1),r=i.ref(!1),o=i.computed(()=>{s.value=!1,r.value=!1;const p=[];if(e.totalPageNum<=qn+2){for(let N=2;N<=e.totalPageNum-1;N++)p.push(N);return p}const C=Math.floor(qn/2);e.totalPageNum>qn&&(s.value=t.value-C>2,r.value=t.value+C<e.totalPageNum-1);const v=Math.min(e.totalPageNum-qn,Math.max(2,t.value-C));for(let N=v;N<v+qn;N++)p.push(N);return p});i.watch(()=>e.modelValue,p=>{i.nextTick(()=>{p>=1&&p<=e.totalPageNum?t.value=p:p<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),i.nextTick(()=>{i.watch(()=>e.totalPageNum,p=>{t.value>p&&(t.value=p)})});const l=()=>{n.value||(t.value=t.value-1)},d=()=>{a.value||(t.value=t.value+1)},c=p=>{p!==t.value&&(t.value=p)},u=()=>{t.value=Math.max(1,t.value-qn)},f=()=>{t.value=Math.min(e.totalPageNum,t.value+qn)},{resolveClassName:h}=le();return{current:t,render:({isFirst:p,isLast:C})=>i.createVNode("div",{class:{[`${h("pagination-list")}`]:!0,"is-first":p,"is-last":C}},[i.createVNode("div",{class:{[`${h("pagination-list-pre")}`]:!0,"is-disabled":n.value},onClick:l},[e.prevText||i.createVNode($t,null,null)]),i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===1},key:"1",onClick:()=>c(1)},[i.createTextVNode("1")]),s.value&&i.createVNode("div",{key:"pre-batch",class:`${h("pagination-list-pre-batch")}`,onClick:u},[i.createVNode(pi,null,null)]),o.value.map(v=>i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===v},key:v,onClick:()=>c(v)},[v])),r.value&&i.createVNode("div",{key:"next-batch",class:`${h("pagination-list-next-batch")}`,onClick:f},[i.createVNode(pi,null,null)]),e.totalPageNum>1&&i.createVNode("div",{class:{[`${h("pagination-list-item")}`]:!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>c(e.totalPageNum)},[e.totalPageNum]),i.createVNode("div",{class:{[`${h("pagination-list-pre")}`]:!0,"is-disabled":a.value},onClick:d},[e.nextText||i.createVNode(It,null,null)])])}},D7=()=>{const{proxy:e}=i.getCurrentInstance(),t=i.ref(null),n=i.ref(!1),a=i.ref(1),s=i.computed(()=>a.value===1),r=i.computed(()=>a.value===e.totalPageNum);let o=0;const l=i.computed(()=>{const N=[];for(let I=1;I<=e.totalPageNum;I++)N.push(I);return N});i.watch(()=>e.modelValue,N=>{i.nextTick(()=>{N>=1&&N<=e.totalPageNum?a.value=N:N<1?a.value=1:a.value=e.totalPageNum,o=a.value})},{immediate:!0}),i.nextTick(()=>{i.watch(()=>e.totalPageNum,N=>{a.value>N&&(a.value=N)})});const d=()=>{s.value||(a.value=a.value-1)},c=()=>{r.value||(a.value=a.value+1)},u=()=>{n.value=!0},f=()=>{n.value=!1,o!==a.value&&(a.value=o)},h=N=>{const I=N.target,y=Number(I.textContent);!y||y<1||y>e.totalPageNum||y===a.value||(o=y)},m=N=>{["Enter","NumpadEnter"].includes(N.code)&&(N.preventDefault(),f())},p=N=>{o=N,f()},{resolveClassName:C}=le();return{current:a,render:()=>i.createVNode("div",{class:`${C("pagination-small-list")}`},[i.createVNode("div",{class:{[`${C("pagination-btn-pre")}`]:!0,"is-disabled":s.value},onClick:d},[i.createVNode($t,null,null)]),i.createVNode(pt,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>i.createVNode("div",{class:{[`${C("pagination-picker")}`]:!0,"is-focused":n.value}},[i.createVNode("span",{ref:t,class:`${C("pagination-editor")}`,contenteditable:!0,spellcheck:"false",onFocus:u,onBlur:f,onInput:h,onKeydown:m},[a.value]),i.createVNode("span",null,[i.createTextVNode("/")]),i.createVNode("span",{class:`${C("pagination-small-list-total")}`},[e.totalPageNum])]),content:()=>i.createVNode("div",{class:`${C("pagination-picker-list")}`},[l.value.map(N=>i.createVNode("div",{class:{item:!0,"is-actived":N===a.value},key:N,onClick:()=>p(N)},[N]))])}),i.createVNode("div",{class:{[`${C("pagination-btn-next")}`]:!0,"is-disabled":r.value},onClick:c},[i.createVNode(It,null,null)])])}},j7=e=>({isFirst:t,isLast:n})=>{const{props:a}=i.getCurrentInstance();if(!a.showTotalCount)return null;const{resolveClassName:s}=le();return i.createVNode("div",i.mergeProps({class:{[`${s("pagination-total")}`]:!0,"is-first":t,"is-last":n}},{disabled:a.disabled}),[e.value.total,i.createVNode("div",{class:`${s("pagination-total-num")}`},[a.count]),e.value.strip])},O7={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])},rc=Le(i.defineComponent({name:"Pagination",props:O7,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=je("pagination"),a=i.ref(0),{count:s,limit:r}=i.toRefs(e),o=j7(n),{current:l,render:d}=x7(),{current:c,render:u}=D7(),{limit:f,render:h}=k7(n);i.watch([s,f,r],([p,C])=>{const v=Math.ceil(p/C);a.value=v<1?1:v},{immediate:!0}),i.watch(l,p=>{t.emit("update:modelValue",p),t.emit("change",p)}),i.watch(c,p=>{e.small&&(t.emit("update:modelValue",p),t.emit("change",p))}),i.watch(f,p=>{t.emit("limitChange",p)});const{resolveClassName:m}=le();return{totalPageNum:a,renderTotal:o,renderList:d,renderLimit:h,renderSmallList:u,resolveClassName:m}},render(){const e=we({[`${this.resolveClassName("pagination")}`]:!0,[`${this.resolveClassName(`pagination--${this.size}`)}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return i.createVNode("div",{class:e},[this.layout.map((n,a)=>t[n]({isFirst:a===0,isLast:a===this.layout.length-1}))])}})),f0=i.defineComponent({name:"TableCell",props:{column:Oi,row:g.any.def({}),parentSetting:Xl,title:g.string.def(void 0),observerResize:g.bool.def(!0),isHead:g.bool.def(!1),headExplain:g.string,resizerWay:me("ResizerWay",{default:Fh.DEBOUNCE})},setup(e,{slots:t}){const n=i.ref(),a=i.ref(!1),s=i.computed(()=>({textAlign:e.column.textAlign})),r=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const h={showOverflowTooltip:{content:"",disabled:!e.column.showOverflowTooltip,mode:void 0,resizerWay:void 0,watchCellResize:void 0,popoverOption:{}}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(h.showOverflowTooltip,e.parentSetting),Object.assign(h.showOverflowTooltip,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(h.showOverflowTooltip,e.column.showOverflowTooltip)),h}return{showOverflowTooltip:e.parentSetting}},{showOverflowTooltip:o=!1}=r();let l=null;const d=()=>{let h=!0,{resizerWay:m}=e,p=()=>n.value.innerText,C={},v="auto",N=!0;return typeof o=="boolean"&&(h=!o),typeof o=="object"&&(h=o.disabled,C=o.popoverOption,m=o.resizerWay||"debounce",p=()=>o.content||n.value.innerText,typeof o.content=="function"&&(p=()=>o.content(e.column,e.row)),N=o.watchCellResize,v=o.mode||"auto"),typeof h=="function"&&(h=Reflect.apply(h,this,[e.column,e.row])),e.isHead&&(h=!1,v="auto",p=()=>{var I;return(I=c())==null?void 0:I.innerHTML},e.headExplain&&(v="static",p=()=>e.headExplain)),e.column.explain&&(h=!1,v="static",typeof e.column.explain=="object"&&(p=()=>Ye(e.column.explain,"content",[e.column,e.row]))),{disabled:h,content:p,mode:v,resizerWay:m,watchCellResize:N,popoverOption:C}},c=()=>{var h,m;return e.isHead?(m=(h=n.value)==null?void 0:h.querySelector)==null?void 0:m.call(h,".head-text"):n.value},u=()=>{const h=c();if(!h||!An(h))return;const{mode:m,disabled:p}=d();if(a.value=!p,m==="auto"&&(a.value=n6(h)),m==="static"&&(a.value=!0),a.value){const C=i.ref(d());l===null&&(l=zl(h,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(h),l=null};i.onMounted(()=>{const{disabled:h,resizerWay:m,watchCellResize:p}=d();if(!h&&(u(),p!==!1&&e.observerResize)){let C=b7(n.value,()=>{u()},60,!0,m);C.start(),i.onBeforeUnmount(()=>{C.disconnect(),C=null})}}),i.onBeforeUnmount(()=>{l==null||l.destroyInstance(n.value)});const f=e.headExplain||e.column.explain;return()=>{var h;return i.createVNode("div",{class:["cell",e.column.type,f?"explain":""],style:s.value,ref:n},[(h=t.default)==null?void 0:h.call(t)])}}}),oc=i.defineComponent({name:"TableRow",render(){var e,t;return i.createVNode(i.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),E7=i.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string},emits:["change"],setup(e){const t=je("table"),n=i.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),a=i.computed(()=>e.list.length===0?"empty":"search-empty");return()=>i.createVNode(gr,{scene:"part",type:a.value,description:n.value},null)}});function h0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const P7=i.defineComponent({name:"Settings",props:{settings:Bh,columns:g.arrayOf(Oi).def([])},emits:["change"],setup(e,{emit:t,slots:n}){const{resolveClassName:a}=le(),s=je("table"),r=EM(s),o=(x,$)=>Ye(x,["id","field","type"],[x,$]),l=i.ref(!1),d=i.ref(!1),c=i.computed(()=>{const x={fields:e.columns.map($=>Object.assign({},$,{field:$.field||$.type})),checked:[],limit:0,size:"small",sizeList:r,showLineHeight:!0,trigger:"manual"};return typeof e.settings=="boolean"?x:Object.assign({},x,e.settings)}),u=i.ref(c.value.size||"small"),f=i.ref(kn.small),h=i.ref(c.value.checked||[]),p=`light ${a("table-settings")}`,C=i.computed(()=>c.value.fields||e.columns||[]),v={checkAll:l.value,activeSize:u.value,activeHeight:f.value,checkedFields:c.value.checked||[]},N=()=>{Object.assign(v,{checkAll:l.value,activeSize:u.value,activeHeight:f.value,checkedFields:h.value}),t("change",{checked:h.value,size:u.value,height:f.value,fields:i.unref(C)}),d.value=!1},I=()=>{l.value=v.checkAll,u.value=v.activeSize,f.value=v.activeHeight,h.value=v.checkedFields,d.value=!1},y=()=>{d.value=!0},b=x=>{x.stopImmediatePropagation(),x.stopPropagation(),x.preventDefault(),l.value=!l.value;const $=c.value.fields||e.columns||[],A=$.filter((U,Y)=>U.disabled&&h.value.includes(o(U,Y))).map((U,Y)=>o(U,Y));if(l.value){const U=$.filter(Y=>!Y.disabled).map((Y,oe)=>o(Y,oe));h.value.splice(0,h.value.length,...U,...A)}else h.value.splice(0,h.value.length,...A)},w=i.computed(()=>(c.value.limit??0)>0),M=c.value.sizeList||r,S=i.computed(()=>w.value&&(c.value.limit?c.value.limit:0)<=h.value.length),L=(x,$)=>x.disabled||S.value&&!h.value.includes(o(x,$)),D=x=>{u.value=x.value,f.value=x.height},T=x=>({"line-size":!0,"is-medium":u.value==="medium",active:x.value===u.value}),E={marginRight:"12px"},P=()=>M.map(x=>i.createVNode("span",{class:T(x),onClick:()=>D(x)},[x.label])),J=i.computed(()=>h.value.length>0&&h.value.length<C.value.length),j=i.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return i.watch(()=>[h.value],()=>{h.value.length||(l.value=!1),h.value.length&&C.value.every((x,$)=>h.value.includes(o(x,$)))&&(l.value=!0)},{immediate:!0,deep:!0}),i.watch(()=>[e.settings.checked],()=>{h.value.splice(0,h.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?i.createVNode(pt,i.mergeProps({trigger:c.value.trigger??"manual",isShow:d.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>i.createVNode("span",{class:"table-head-settings",onClick:y},[i.createVNode(Os,{style:"color: #c4c6cc;"},null)]),content:()=>{var $;let x;return i.createVNode("div",{class:"setting-content"},[i.createVNode("div",{class:"setting-head"},[i.createVNode("span",{class:"head-title"},[s.value.setting.title]),i.createVNode(hi,{class:"icon-close-action",onClick:I},null)]),i.createVNode("div",{class:"setting-body"},[i.createVNode("div",{class:"setting-body-title"},[i.createVNode("div",null,[i.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),w.value?i.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(c.value.limit)]):""]),w.value?"":i.createVNode("span",{class:"check-all",onClick:b},[i.createVNode(dt,{label:s.value.setting.fields.selectAll,indeterminate:!!J.value,modelValue:h.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),i.createVNode(hr,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":A=>h.value=A},h0(x=C.value.map((A,U)=>{let Y;return i.createVNode("div",{class:"field-item"},[i.createVNode(dt,{checked:h.value.includes(o(A,U)),label:o(A,U),disabled:L(A,U)},h0(Y=Ye(A,["name","label"],[A,U]))?Y:{default:()=>[Y]})])}))?x:{default:()=>[x]}),($=n.default)==null?void 0:$.call(n),j.value?i.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,i.createTextVNode(":"),P()]):""]),i.createVNode("div",{class:"setting-footer"},[i.createVNode(Ge,{theme:"primary",style:E,onClick:N},{default:()=>[s.value.setting.options.ok]}),i.createVNode(Ge,{style:E,onClick:I},{default:()=>[s.value.setting.options.cancel]})])])}}):""}}),A7=(e,t,n)=>{if(!e.rowDraggable)return{};const a=h=>{e.rowDraggable&&(h==null||h())},s=h=>h.target.closest("tr"),r=(h,m)=>{const{y:p}=m,{top:C,bottom:v}=h.getBoundingClientRect(),N=p-C>v-p?"--bottom":"--top";o(h),h.classList.add(N)},o=(h,m=["--bottom","--top"])=>{m.forEach(p=>h.classList.remove(p))};return{onDragenter:h=>{a(()=>{h.dataTransfer.dropEffect="move";const m=s(h);m.classList.add("--drag-enter"),r(m,h)})},onDragleave:h=>{a(()=>{const m=s(h);o(m,["--drag-enter","--bottom","--top"])})},onDragstart:h=>{a(()=>{s(h).classList.add("--drag-start"),h.dataTransfer.setData("text/plain",null),h.dataTransfer.dropEffect="copy";const{rowIndex:p}=h.target.dataset;h.dataTransfer.setData("data-row-index",p)})},onDragover:h=>{h.preventDefault(),h.dataTransfer.dropEffect="move";const m=s(h);r(m,h)},onDrop:h=>{h.preventDefault(),h.stopPropagation();const m=s(h),{rowIndex:p}=m.dataset;let C=Number(p);const v=h.dataTransfer.getData("data-row-index");m.classList.contains("--bottom")&&(C=C+1),t.changePageRowIndex(Number(v),C),o(m,["--drag-enter","--bottom","--top"]),n.emit(Ve.DRAG_END,{sourceEvent:h,data:t.pageData})}}};function g0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const z7=i.defineComponent({name:"HeadFilter",props:{column:Oi,height:g.number.def(yt)},emits:["change","filterSave"],setup(e,{emit:t}){const{resolveClassName:n}=le(),a=je("table"),{column:s}=e,{filter:r}=i.toRefs(e.column),o=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.checked)??[]}),l=i.ref(""),d=i.reactive({isOpen:!1,checked:o.value}),c=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.maxHeight)??yt*15}),u=i.computed(()=>{var j;return((j=r.value)==null?void 0:j.height)||"100%"});i.watch(()=>r.value,()=>{d.checked=o.value},{immediate:!0,deep:!0});const f=i.computed(()=>we({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:d.checked.length,opened:d.isOpen})),h=we({[n("table-head-filter")]:!0}),m=i.ref(null),p=j=>{d.isOpen=j,j&&setTimeout(()=>{m.value.reset()}),j||(l.value="")},C=`light ${n("table-head-filter")}`,v=i.computed(()=>{const{list:j=[]}=r.value,x=j.filter($=>N(l.value).test($.value));return console.log(" filterList: ",x),x}),N=(j,x="ig")=>new RegExp(`${j}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),x),I=(j,x)=>{const{match:$}=r.value,A=jr(x,Ye(s,"field",[s,x]));return $!=="fuzzy"?j.includes(A):j.some(U=>N(U,"img").test(A))},y=typeof r.value.filterFn=="function"?(j,x,$,A)=>r.value.filterFn(j,x,e.column,$,A):(j,x)=>j.length?I(j,x):!0,b=()=>{w(!0),t("filterSave",d.checked),d.isOpen=!1},w=(j=!1)=>{const{disabled:x}=S(L,a.value.confirm);if(x||j){if(r.value==="custom"){t("change",d.checked,null),d.isOpen=!1;return}r.value.checked=d.checked,t("change",d.checked,y)}},M=()=>{d.checked.length&&(d.checked.length=0,d.isOpen=!1,i.nextTick(()=>t("change",d.checked,y)))},S=(j,x)=>({disabled:j==="disabled"||j===!1,text:typeof j=="string"?j:x}),{btnSave:L,btnReset:D}=r.value,T=()=>{const{disabled:j,text:x}=S(L,a.value.confirm);return j?i.createVNode("span",{class:"btn-filter-save disabled"},[x]):i.createVNode(Ge,{theme:"primary",size:"small",style:"width: 56px; margin-right: 8px;",onClick:b},g0(x)?x:{default:()=>[x]})},E=()=>{const{disabled:j,text:x}=S(D,a.value.reset);return j?"":i.createVNode(Ge,{style:"width: 56px;",size:"small",disabled:d.checked.length===0,onClick:M},g0(x)?x:{default:()=>[x]})},P=(j,x)=>{const $=new Set(d.checked);j?$.add(x.value):$.delete(x.value),d.checked.length=0,d.checked.push(...Array.from($)),w()},J=j=>j.data.length?j.data.map(x=>i.createVNode("div",{class:"list-item"},[i.createVNode(dt,{label:x.value,key:x.$index,immediateEmitChange:!1,checked:d.checked.includes(x.value),modelValue:d.checked.includes(x.value),onChange:$=>P($,x)},{default:()=>[`${x.text}`]})])):i.createVNode("div",{class:"list-item is-empty"},[a.value.emptyText]);return()=>i.createVNode(pt,i.mergeProps({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:ds.SHOWN,arrow:!1,offset:0},{theme:C},{onAfterShow:()=>p(!0),onAfterHidden:()=>p(!1)}),{default:()=>i.createVNode($s,{class:f.value},null),content:()=>i.createVNode("div",{class:h},[i.createVNode("div",{style:"padding: 4px 10px;"},[i.createVNode(i.resolveComponent("bk-input"),{modelValue:l.value,"onUpdate:modelValue":j=>l.value=j},null)]),i.createVNode(hr,{class:"content-list"},{default:()=>[i.createVNode(za,{maxHeight:c.value,height:u.value,lineHeight:32,list:v.value,throttleDelay:0,scrollEvent:!0,ref:m,className:"content-items"},{default:J})]}),i.createVNode("div",{class:"content-footer"},[T(),E()])])})}}),V7=i.defineComponent({name:"HeadSort",props:{column:Oi,defaultSort:g.oneOf(zM).def(Qe.NULL),active:g.bool,sortValFormat:g.arrayOf(g.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var d,c;const{resolveClassName:a}=le(),s=((c=(d=e.column)==null?void 0:d.sort)==null?void 0:c.value)??e.defaultSort??Qe.NULL,r=i.ref(s);i.watch(()=>[e.defaultSort],([u])=>{r.value=u});const o=u=>{r.value=u},l=(u,f)=>{u.stopImmediatePropagation(),u.stopPropagation(),u.preventDefault();let h=f;f===Qe.NULL&&(h=c0(f)),r.value===f&&(h=Qe.NULL);const m=sc(e.column,h,e.sortValFormat),p=d0(e.column.sort,e.column,e.sortValFormat);if((p==null?void 0:p.value)==="custom"){t("change",(p==null?void 0:p.sortFn)??m,h);return}t("change",m,h)};return n({setNextSortType:o}),()=>i.createVNode("span",{class:a("head-cell-sort")},[i.createVNode(Ts,{class:["sort-action","sort-asc",e.active&&r.value===Qe.ASC?"active":""],style:"align-items: flex-end;",onClick:u=>l(u,Qe.ASC)},null),i.createVNode(ui,{class:["sort-action","sort-desc",e.active&&r.value===Qe.DESC?"active":""],style:"align-items: flex-start;",onClick:u=>l(u,Qe.DESC)},null)])}});function J7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const R7=(e,t,n,a)=>{var I;const s=i.ref((I=a.formatData.columnSchema.get(n))==null?void 0:I[be.COL_SORT_TYPE]),r=i.computed(()=>{var y;return((y=a.formatData.columnSchema.get(n))==null?void 0:y[be.COL_SORT_ACTIVE])??!1}),o=y=>{const b=a.getColumnAttribute(y,be.LISTENERS);return b?Array.from(b==null?void 0:b.keys()).reduce((w,M)=>{const S=M.split("_").slice(-1)[0];return Object.assign(w,{[S]:L=>{b.get(M).forEach(D=>Reflect.apply(D,globalThis,[L,y]))}})},{}):{}},l=(y,b,w,M)=>y.type==="index"?b(a.getRowAttribute(w,Se.ROW_INDEX),a.getRowAttribute(M,Se.ROW_INDEX)):b(w,M),d=(y,b)=>{if(!a.getColumnAttribute(b,be.COL_IS_DRAG)&&b.sort&&!b.filter){const w=a.getColumnAttribute(b,be.COL_SORT_TYPE);s.value=c0(w);const M=(S,L)=>l(b,sc(b,s.value,e.sortValFormat),S,L);a.setColumnAttribute(b,be.COL_SORT_TYPE,s.value),a.setColumnAttribute(b,be.COL_SORT_FN,M),a.setColumnSortActive(b,!0),a.sortData(b),t.emit(Ve.COLUMN_SORT,{column:i.unref(b),index:y,type:s.value})}},c=y=>{d(y,n)},u=(y,b,w=!1)=>{const M=T=>{if(w){a.setRowSelectionAll(T),t.emit(Ve.ROW_SELECT_ALL,{checked:T,data:e.data});return}a.setRowSelection(y,T),t.emit(Ve.ROW_SELECT,{row:y,index:b,checked:T,data:e.data}),t.emit(Ve.ROW_SELECT_CHANGE,{row:y,index:b,checked:T,data:e.data})},S=a.getRowAttribute(y,Se.ROW_SELECTION_INDETERMINATE),L=a.getRowAttribute(y,Se.ROW_SELECTION),D=Er(e,{row:y,index:b,isCheckAll:w});return i.createVNode(dt,{onChange:M,disabled:!D,modelValue:L,indeterminate:S},null)},f=(y,b)=>{const w=(M,S)=>{const L=(D,T)=>l(y,M,D,T);a.setColumnAttribute(y,be.COL_SORT_TYPE,S),a.setColumnAttribute(y,be.COL_SORT_FN,L),a.sortData(y),a.setColumnSortActive(y,!0),t.emit(Ve.COLUMN_SORT,{column:y,index:b,type:S})};return i.createVNode(V7,{column:y,defaultSort:r.value?s.value:Qe.NULL,onChange:w,active:r.value},null)},h=(y,b)=>{const w=(S,L)=>{const D=(T,E)=>L(S,T,E);a.setColumnAttribute(y,be.COL_FILTER_FN,D),a.filter(),t.emit(Ve.COLUMN_FILTER,{checked:S,column:i.unref(y),index:b})},M=S=>{t.emit(Ve.COLUMN_FILTER_SAVE,{column:y,values:S})};return i.createVNode(z7,{column:y,height:e.headHeight,onChange:w,onFilterSave:M},null)},m=Dr(e),{cellFn:p}=m,C=(y,b)=>typeof p=="function"?p(y,b):typeof y.renderHead=="function"?y.renderHead(y,b):Ye(y,"label",[y,b]),v=(y,b)=>{if(y.type==="selection")return[u(ji,null,!0)];const w=[];y.sort&&w.push(f(y,b)),y.filter&&w.push(h(y,b));const M=C(y,b);w.unshift(i.createVNode("span",{class:"head-text"},[M]));const S=typeof M=="string"?M:void 0,L={"has-sort":!!y.sort,"has-filter":!!y.filter};return i.createVNode(f0,{class:L,title:S,observerResize:e.observerResize,resizerWay:e.resizerWay,isHead:!0,column:y,parentSetting:e.showOverflowTooltip,headExplain:Ye(y.explain,"head",[y])},J7(w)?w:{default:()=>[w]})};return{getTH:(y,b,w)=>i.createVNode("th",i.mergeProps({colspan:1,rowspan:1,"data-id":a.getColumnId(n),class:y,style:b,onClick:()=>c(w)},o(n)),[v(n,w)])}};function Q7(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const $7=(e,t,n,a,s,r,o)=>{const l=je("table"),d=nn(),c=i.computed(()=>n.formatData),u=i.computed(()=>c.value.columns),f=i.computed(()=>c.value.settings),h=i.computed(()=>u.value.filter(k=>!n.getColumnAttribute(k,be.IS_HIDDEN))),m=()=>{const{isShow:k=!0}=Dr(e);if(!k)return null;const O=Q=>{const{checked:B=[],size:G,height:ne,fields:_}=Q;n.updateSettings(Q),n.setColumnAttributeBySettings(e.settings,B),B.length&&i.nextTick(()=>{o(r.value)}),t.emit(Ve.SETTING_CHANGE,{checked:B,size:G,height:ne,fields:_})};return[e.settings?i.createVNode(P7,{class:"table-head-settings",settings:e.settings,columns:u.value,onChange:O},{default:()=>{var Q,B;return[(B=(Q=t.slots).setting)==null?void 0:B.call(Q)]}}):"",i.createVNode("table",{cellpadding:0,cellspacing:0},[W(),y()])]},p=k=>{var Q,B;const O=i.computed(()=>e.emptyText===void 0?l.value.emptyText:e.emptyText);return k.length?i.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":d},[W(),S(k)]):((B=(Q=t.slots).empty)==null?void 0:B.call(Q))??i.createVNode(E7,{filterList:k,list:e.data,emptyText:O.value},null)},C=k=>i.createVNode(rc,i.mergeProps({style:"width: 100%;"},k,{modelValue:k.current,onLimitChange:O=>N(O),onChange:O=>I(O)}),null),v=(k,O)=>{const{size:Q,height:B}=f.value;return B!=null?Ye(f.value,"height",["tbody",k,O,Q]):Ye(e,"rowHeight",["tbody",k,O])},N=k=>{Object.assign(e.pagination,{limit:k}),t.emit(Ve.PAGE_LIMIT_CHANGE,k)},I=k=>{Object.assign(e.pagination,{current:k,value:k}),t.emit(Ve.PAGE_VALUE_CHANGE,k)},y=()=>{const k=Dr(e),O={"--row-height":`${Ye(k,"height",["thead"])}px`,backgroundColor:e.thead.color},{resolveFixedColumnStyle:Q}=tc(e,n,s);return i.createVNode(i.Fragment,null,[i.createVNode("thead",{style:O},[i.createVNode(oc,null,{default:()=>[i.createVNode("tr",null,[h.value.map((B,G)=>{var V;const{getTH:ne}=R7(e,t,B,n),_=Object.assign({},Q(B,a.value.hasScrollY),{"--background-color":$h[((V=e.thead)==null?void 0:V.color)??Mr.DEF1]}),R=[P(B,G),b(B),B.align||e.headerAlign||e.align];return ne(R,_,G)})])]})])])},b=(k,O)=>{const Q=k.className;if(Q){if(typeof Q=="function")return Q(O);if(typeof Q=="string")return Q}return""},w=(k,O,Q,B,G)=>{var V;G.has(k)||G.set(k,new WeakMap),G.get(k).has(B)||G.get(k).set(B,{skipRowLen:0,skipRow:!1});let{skipRowLen:ne=0}=((V=G.get(Q))==null?void 0:V.get(B))??{},_=!1;const R=Or(B,null,k,O,"rowspan");return ne>1?(ne=ne-1,_=!0):R>1&&(ne=R,_=!1),Object.assign(G.get(k).get(B),{skipRowLen:ne,skipRow:_}),{skipRowLen:ne,skipRow:_}},M=A7(e,n,t),S=k=>{let O={};const Q=new WeakMap,B=n.getRowAttribute(Wh,Se.ROW_SPAN);return i.createVNode("tbody",null,[k.map((G,ne)=>{const _=D(G,ne,O,k,Q,B);return O=G,_})])},{resolveFixedColumnStyle:L}=tc(e,n,s),D=(k,O,Q,B,G,ne,_=!1)=>{const R=B.length,V=[...Ei(e.rowStyle,[k,O]),{"--row-height":`${v(k,O)}px`}],q=[...Ei(e.rowClass,[k,O]),`hover-${e.rowHover}`,O%2===1&&e.stripe?"stripe-row":""],se=n.getRowAttribute(k,Se.ROW_UID);return[i.createVNode(oc,{key:se},{default:()=>[i.createVNode("tr",i.mergeProps({style:V,class:q,key:o0(k,e,O),"data-row-index":O,onClick:H=>J(H,k,O,B),onDblclick:H=>j(H,k,O,B),onMouseenter:H=>x(H,k,O,B),onMouseleave:H=>$(H,k,O,B),draggable:!!e.rowDraggable},M),[h.value.map((H,ie)=>{const Z=[L(H),...Ei(e.cellStyle,[H,ie,k,O])],{colspan:K,rowspan:X}=w7(H,ie,k,O),{skipCol:ae}=n.getColumnAttribute(H,be.COL_SPAN),{skipRow:pe}=ne&&!_?w(k,ie,Q,H,G):{skipRow:!1},ee={"expand-cell":H.type==="expand"};if(!pe&&!ae){let re;const ge=[E(H,ie),b(H,k),H.align||e.align,...Ei(e.cellClass,[H,ie,k,O]),{"expand-row":n.getRowAttribute(k,Se.ROW_EXPAND),"is-last":O+X>=R}],Ne=(ve,Ie)=>{const ke={event:ve,row:k,column:H,cell:{getValue:()=>z(k,H,O,B,_)},rowIndex:O,columnIndex:ie};t.emit(Ie,ke)};return i.createVNode("td",{class:ge,style:Z,colspan:K,rowspan:X,onClick:ve=>Ne(ve,Ve.CELL_CLICK),onDblclick:ve=>Ne(ve,Ve.CELL_DBL_CLICK)},[i.createVNode(f0,{class:ee,column:H,row:k,parentSetting:e.showOverflowTooltip,observerResize:e.observerResize},Q7(re=z(k,H,O,B,_))?re:{default:()=>[re]})])}return null})])]}),T(k,q)]},T=(k,O,Q)=>{if(n.getRowAttribute(k,Se.ROW_EXPAND)){const G=[...O,{row_expend:!0}],_=`${n.getRowAttribute(k,Se.ROW_UID)}_expand`;return Array.isArray(k.children)?k.children.map((R,V)=>D(R,V,{},k,{},!1,!0)):i.createVNode(oc,{key:_},{default:()=>{var R,V;return[i.createVNode("tr",{class:G},[i.createVNode("td",{colspan:h.value.length,rowspan:1},[((V=(R=t.slots).expandRow)==null?void 0:V.call(R,k))??i.createVNode("div",{class:"expand-cell-ctx"},[i.createTextVNode("Expand Row")])])])]}})}},E=(k,O)=>({[`${d}-column-${O}`]:!1,column_fixed:!!k.fixed,column_fixed_left:!!k.fixed,column_fixed_right:k.fixed==="right"}),P=(k,O)=>({...E(k,O)}),J=(k,O,Q,B)=>{t.emit(Ve.ROW_CLICK,k,O,Q,B)},j=(k,O,Q,B)=>{t.emit(Ve.ROW_DBL_CLICK,k,O,Q,B)},x=(k,O,Q,B)=>{t.emit(Ve.ROW_MOUSE_ENTER,k,O,Q,B)},$=(k,O,Q,B)=>{t.emit(Ve.ROW_MOUSE_LEAVE,k,O,Q,B)},A=k=>{var B,G;const Q=n.getRowAttribute(k,Se.ROW_EXPAND)?i.createVNode(gi,null,null):i.createVNode(vi,null,null);return i.createVNode("span",null,[[Q,((G=(B=t.slots).expandContent)==null?void 0:G.call(B,k))??""]])},U=(k,O,Q,B,G)=>{n.setRowExpand(k,!n.getRowAttribute(k,Se.ROW_EXPAND)),t.emit(Ve.ROW_EXPAND_CLICK,{row:k,column:O,index:Q,rows:B,e:G})},Y=(k,O,Q,B)=>{const G=jr(k,Ye(O,"field",[O,k])),ne=k;return O.render({cell:G,data:ne,row:k,column:O,index:Q,rows:B})},oe=(k,O,Q=!1)=>{const B=R=>{if(Q){n.setRowSelectionAll(R),t.emit(Ve.ROW_SELECT_ALL,{checked:R,data:e.data});return}n.setRowSelection(k,R),t.emit(Ve.ROW_SELECT,{row:k,index:O,checked:R,data:e.data}),t.emit(Ve.ROW_SELECT_CHANGE,{row:k,index:O,checked:R,data:e.data})},G=n.getRowAttribute(k,Se.ROW_SELECTION_INDETERMINATE),ne=n.getRowAttribute(k,Se.ROW_SELECTION),_=Er(e,{row:k,index:O,isCheckAll:Q});return i.createVNode(dt,{onChange:B,disabled:!_,modelValue:ne,indeterminate:G},null)},F=(k,O,Q,B)=>{const G=()=>{var ne,_;return typeof O.render=="function"?Y(k,O,Q,B):((_=(ne=t.slots).expandCell)==null?void 0:_.call(ne,{row:k,column:O,index:Q,rows:B}))??A(k)};return i.createVNode("span",{class:"expand-btn-action",onClick:ne=>U(k,O,Q,B,ne)},[G()])},te=(k,O,Q,B)=>{var R,V,q;const G=((R=e.rowDraggable)==null?void 0:R.render)??e.rowDraggable;if(typeof G=="function")return G(k,O,Q,B);const ne=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((q=e.rowDraggable)==null?void 0:q.icon)??i.createVNode(_s,{class:"drag-cell",style:`'--font-size: ${ne};'`},null)},z=(k,O,Q,B,G=!1)=>{var R;const ne=()=>{if(Ye(O,"type",[O,k])==="index")return n.getRowAttribute(k,Se.ROW_INDEX);const q=Ye(O,"field",[O,k]),se=jr(k,q);if(typeof O.render=="function")return Y(k,O,Q,B);if(typeof se=="boolean")return String(se);if(!se&&typeof se!="number"){const{emptyCellText:H}=e;if(H)return typeof H=="function"?H(k,O,Q,B):H}return typeof se=="object"?JSON.stringify(i.unref(se)):se},_={expand:(V,q,se,H)=>G?"":F(V,q,se,H),selection:(V,q,se,H)=>oe(V,se),drag:te};return((R=_[O.type])==null?void 0:R.call(_,k,O,Q,B))??ne()},W=()=>i.createVNode("colgroup",null,[(h.value||[]).map((k,O)=>{const Q=we({}),B=`${p7(n.getColumnOrderWidth(k))}`.replace(/px$/i,""),G=n.getColumnAttribute(k,be.COL_MIN_WIDTH);return i.createVNode("col",{class:Q,width:B,style:{minWidth:ic(G,"auto")}},null)})]);return{renderTableHeadSchema:m,renderTableBodySchema:p,renderTableFooter:C}},m0=qe(i.defineComponent({name:"Table",props:WM,emits:aI,setup(e,t){const n=i.ref(),a=i.ref(),s=i.ref(),r=i.ref(0),o=new GM,l=i.reactive([]),{initColumns:d,columns:c}=u0(e,l),u=L7(e),{resizeColumnStyle:f,resizeHeadColStyle:h,registerResizeEvent:m}=iI(u,!1,a);i.provide(_h,d),i.provide(Hh,o);const{tableClass:p,headClass:C,footerClass:v,wrapperStyle:N,contentStyle:I,headStyle:y,hasScrollYRef:b,hasFooter:w,footerStyle:M,tableBodyClass:S,resizeColumnClass:L,tableBodyContentClass:D,loadingRowClass:T,columnGhostStyle:E,fixedContainerStyle:P,scrollClass:J,prependStyle:j,resetTableHeight:x}=T7(e,c,n,u,u.pageData),{renderScrollLoading:$}=sI(e,t),{fixedWrapperClass:A,fixedColumns:U,resolveFixedColumns:Y,updateFixClass:oe}=tc(e,u,a),{resolveClassName:F}=le(),te=i.computed(()=>({hasScrollY:b.value})),{renderTableBodySchema:z,renderTableFooter:W,renderTableHeadSchema:k}=$7(e,t,u,te,a,n,x),O=()=>{if(!(n!=null&&n.value))return;const R=n.value.querySelector(`.${F("table-body-content")}`),V=R.querySelector("table");if(V){const q=V.scrollWidth,se=R.clientWidth;r.value=q-se}},Q=i.ref(!0);i.watch(()=>[e.data,c],()=>{u.setIndexData().then(()=>{u.formatColumns(c),u.formatDataSchema(e.data),u.resetStartEndIndex(),Q.value?(u.resolveByDefColumns(),Q.value=!1):u.resolvePageData(),m(),i.nextTick(()=>{O(),Y(r.value),i.nextTick(()=>{x(n.value)})})})},{immediate:!0,deep:!0}),i.watch(()=>[e.height,e.maxHeight,e.minHeight],()=>{i.nextTick(()=>{x(n.value)})}),i.watch(()=>[e.settings],()=>{u.updateSettings(e.settings)},{deep:!0}),i.watch(()=>[e.rowHeight],()=>{u.updateSettings(void 0,e.rowHeight)});const B=R=>{const V=u.formatData.layout.bottom??0,q=R[1],{translateX:se,translateY:H,pos:ie={}}=q;u.formatData.layout.translateY=H,u.formatData.layout.translateX=se,Object.assign(u.formatData.layout,ie||{});const{bottom:Z}=ie;Z<=2&&V>Z&&ba(60,()=>{t.emit(Ve.SCROLL_BOTTOM,{...ie,translateX:se,translateY:H})},!0)(),O(),oe(r.value)},G=(R={left:0,top:0})=>{var V,q;(q=(V=s.value)==null?void 0:V.scrollTo)==null||q.call(V,R)},ne=()=>n.value;t.expose({setRowExpand:u.setRowExpand,setAllRowExpand:u.setAllRowExpand,clearSelection:u.clearSelection,toggleAllSelection:u.toggleAllSelection,toggleRowSelection:u.toggleRowSelection,getSelection:u.getRowSelection,clearSort:u.clearColumnSort,scrollTo:G,getRoot:ne});const _=()=>t.slots.prepend?i.createVNode("div",{style:j.value,class:"prepend-row"},[t.slots.prepend()]):null;return()=>{var R,V;return i.createVNode("div",{class:p.value,style:N.value,ref:n},[i.createVNode("div",{class:C,style:y.value,ref:a},[k(),i.createVNode("div",{class:"col-resize-drag",style:h.value},null)]),i.createVNode(za,i.mergeProps({ref:s,lineHeight:u.formatData.settings.height,height:I.height,class:S.value,wrapperStyle:I,list:u.pageData},J.value,{contentClassName:D.value,onContentScroll:B,throttleDelay:120,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:()=>_(),default:q=>z(q.data),afterSection:()=>[i.createVNode("div",{class:L,style:f.value},null)]}),i.createVNode("div",{class:A,style:P.value},[U.map(({isExist:q,className:se,style:H})=>q?"":i.createVNode("div",{class:se,style:H},null)),i.createVNode("div",{class:T},[$()])]),i.createVNode("div",{class:v.value,style:M.value},[w.value&&W(u.localPagination.value)]),i.createVNode("div",{style:E},[(V=(R=t.slots).default)==null?void 0:V.call(R)])])}}}),{Column:BM}),Ja=12;function _7(e){const t=i.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const r=[];if(t.pageSize>0)for(let o=0;o<t.totalSize;o+=t.pageSize)r.push(s.slice(o,o+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...r),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function H7(e){const{useGroup:t,saveKey:n,displayKey:a,list:s}=i.toRefs(e),r=i.ref([]),o=i.ref({});return i.watch([t,n,a,s],()=>{r.value=[];let l=i.markRaw(s.value);t.value&&(l=l.reduce((d,c)=>{let u=[];return c.children&&(u=c.children.map(f=>({group:{groupId:c[n.value],groupName:c[a.value]},...f}))),d.concat(u)},[])),r.value=l,o.value=l.reduce((d,c)=>(d[c[n.value]]=c,d),{})},{immediate:!0,deep:!0}),{flatList:r,saveKeyMap:o}}const p0=e=>{const t=e.length;let n=0;for(let a=0;a<t;a++)e.charCodeAt(a)&65280&&(n+=1),n+=1;return n},y0=(e,t,n)=>{i.watch([n,t],()=>{s()},{flush:"post"});const a=i.ref(null),s=()=>{t.value&&(a.value=null,setTimeout(()=>{const r=Array.from(e.value.querySelectorAll(".tag-item")),o=r.findIndex((l,d)=>d?r[d-1].offsetTop!==l.offsetTop:!1);a.value=o>0?o-1:null}))};return{overflowTagIndex:a}},b0=i.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function},disabled:g.bool.def(!1)},render(){const{resolveClassName:e}=le(),t=a=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return a.replace(s,'<strong class="highlight-text">$1</strong>')}return a};if(this.tpl)return this.tpl(this.node,t,i.h,this);const n=this.node[this.displayKey];return i.createVNode("div",{class:`${e("selector-node")}`},[i.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),W7=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def(""),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:me("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),isAsyncList:g.bool.def(!1),leftSpace:g.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:()=>({})}}),F7=i.defineComponent({name:"TagRender",directives:{bkTooltips:Tn},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=i.ref(),n=i.ref(!1),a=i.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value,...e.tagOverflowTips}));return i.onMounted(()=>{n.value=sg(t.value)}),{overflowTips:a,tagRef:t}},render(){return this.tpl?this.tpl(this.node,i.h,this):i.withDirectives(i.createVNode("div",{class:"tag",ref:"tagRef"},[i.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[i.resolveDirective("bk-tooltips"),this.overflowTips]])}}),B7=i.defineComponent({name:"TagInput",directives:{bkTooltips:Tn},props:W7(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=kt(),a=je("tagInput"),s=i.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),r=i.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:o}=le(),{maxResult:l}=i.toRefs(e),{pageState:d,initPage:c,pageChange:u}=_7(l),f=i.ref(""),h=i.ref(null),m=i.ref(null),p=i.ref(null),C=i.ref(null),v=i.ref(null),N=i.ref(null),I=i.computed(()=>!e.disabled&&e.hasDeleteIcon),y=i.computed(()=>e.maxData===1),b=i.computed(()=>L.selectedTagList.length===0&&f.value===""&&!s.isEdit),w=i.computed(()=>e.placeholder||a.value.placeholder),M=i.computed(()=>e.clearable&&!e.disabled&&L.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),S=i.computed(()=>({[`${o("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),L=i.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),D=i.computed(()=>L.selectedTagList.map(ee=>ee[e.saveKey])),{flatList:T,saveKeyMap:E}=H7(e),P=i.computed(()=>{if(e.useGroup){const ee={};return d.curPageList.forEach((re,ge)=>{re.__index__=ge,ee[re.group.groupId]||(ee[re.group.groupId]={id:re.group.groupId,name:re.group.groupName,children:[]}),ee[re.group.groupId].children.push(re)}),Object.keys(ee).map(re=>ee[re])}return d.curPageList});i.watch([()=>T.value],()=>{i.nextTick(()=>{A()})},{deep:!0}),i.watch(()=>e.modelValue,ee=>{var re;oe(D.value,ee)||(i.nextTick(()=>{A()}),e.withValidate&&((re=n==null?void 0:n.validate)==null||re.call(n,"change")))}),i.watch(f,Xi(()=>{const ee=d.curPageList.length!==0,{value:re}=f;re!==""&&ee||re===""&&e.trigger==="focus"&&ee?r.isShow=!0:(e.trigger!=="focus"||!ee)&&(r.isShow=!1)},150)),i.watch(()=>r.isShow,ee=>{J(),ee&&v.value&&(i.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",j),v.value.addEventListener("scroll",j))}),i.onMounted(()=>{A()});const J=()=>{var ee;r.offset.crossAxis=y.value?0:(ee=C.value)==null?void 0:ee.offsetLeft},j=()=>{if(d.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:ee,offsetHeight:re,scrollHeight:ge}=v.value;if(ee+re>=ge){const Ne=d.curPage+1;Ne<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{u(Ne)},500))}},x=()=>{var re;return Array.from(((re=p.value)==null?void 0:re.childNodes)||[]).filter(ge=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(ge.nodeType))},$=ee=>{if(!e.disabled){if(ee!=null&&ee.target){const{className:re}=ee.target;(re.indexOf(`${o("tag-input-trigger")}`)>-1||re.indexOf("tag-list")>-1)&&p.value.appendChild(C.value)}clearTimeout(N.value),y.value&&D.value.length&&(L.tagListCache=[...D.value],L.selectedTagListCache=[...L.selectedTagList],f.value=L.selectedTagListCache[0][e.saveKey],K(L.selectedTagList[0],0),k()),s.isEdit=!0,setTimeout(()=>{var re;(re=h.value)==null||re.focus(),e.trigger==="focus"&&L.localList.length!==0&&(U(),r.isShow?J():r.isShow=!0)},200)}},A=()=>{const{saveKey:ee,modelValue:re,displayKey:ge,allowCreate:Ne,trigger:ve,isAsyncList:Ie}=e;if(L.selectedTagList=[],L.localList=T.value,re.length){const ke={};L.selectedTagList=re.map(De=>{const Oe=E.value[De];return ke[De]=1,!Oe&&Ne?{[ee]:De,[ge]:De}:Oe}).filter(De=>De),y.value||(L.localList=L.localList.filter(De=>!ke[De[ee]]))}if(Ie&&f.value){U(f.value),d.curPageList.length&&(r.isShow=!0);return}ve==="focus"&&U()},U=(ee="")=>{const{searchKey:re,filterCallback:ge}=e,Ne=ee.toLowerCase().trim();if(Ne===""){c(L.localList);return}let ve=[];typeof ge=="function"?ve=ge(Ne,re,L.localList)||[]:Array.isArray(re)?ve=L.localList.filter(Ie=>re.some(ke=>Ie[ke].toLowerCase().indexOf(Ne)>-1)):ve=L.localList.filter(Ie=>Ie[re].toLowerCase().indexOf(Ne)>-1),c(ve)},Y=(ee,re)=>{const ge={[`${o("selector-actived")}`]:!0,[`${o("selector-selected")}`]:D.value.includes(ee[e.saveKey])};return e.useGroup?ge[`${o("selector-actived")}`]=ee.__index__===s.focusItemIndex:ge[`${o("selector-actived")}`]=re===s.focusItemIndex,ge};function oe(ee,re){return ee.length!==re.length?!1:re.every((ge,Ne)=>ee[Ne]===ge)}const F=()=>{L.tagListCache=[],L.selectedTagListCache=[],L.selectedTagList=[]},te=()=>{f.value=""},z=()=>{if(y.value)return 0;const re=x().findIndex(({id:ge})=>ge==="tagInputItem");return re>=0?re:0},W=(ee,re,ge=!1)=>{if(!re||!ee)return;let Ne=re;ge&&(Ne=re.nextElementSibling||null),re.parentNode.insertBefore(ee,Ne)},k=ee=>{const{maxData:re,trigger:ge,allowCreate:Ne}=e;if(re===-1||re>D.value.length){const{value:ve}=ee!=null&&ee.target?ee.target:f,Ie=p0(ve);Ie?(U(ve),h.value.style.width=`${Ie*Ja}px`):ge==="focus"&&U()}else Q(),f.value="",r.isShow=!1;s.isEdit=!0,s.focusItemIndex=Ne?-1:0,t("input",f.value)},O=()=>{var ee;r.width=y.value?(ee=m.value)==null?void 0:ee.clientWidth:e.contentWidth,t("focus")},Q=()=>{N.value=setTimeout(()=>{var re;const ee=f.value;if(te(),s.isEdit=!1,e.allowAutoMatch&&ee){if(y.value){const[Ne]=L.tagListCache;ee===Ne&&L.selectedTagListCache.length?Z(L.selectedTagListCache[0],"select"):ne("remove")}const ge=d.curPageList.find(Ne=>Array.isArray(e.searchKey)?e.searchKey.map(Ie=>Ne[Ie]).includes(ee):Ne[e.searchKey]===ee);ge?B(ge,"select"):e.allowCreate&&B(ee,"custom")}r.isShow=!1,t("blur",ee,D.value),(re=n==null?void 0:n.validate)==null||re.call(n,"blur")},200)},B=(ee,re,ge)=>{ge==null||ge.stopPropagation(),!(!ee||ee.disabled)&&(y.value&&F(),Z(ee,re),ne("select"),te(),r.isShow=!1)},G=(ee,re,ge)=>{ge==null||ge.stopPropagation(),K(ee,re),te(),ne("remove",ee),h.value.style.width=`${Ja}px`},ne=(ee,re)=>{t(ee,re),t("update:modelValue",D.value),t("change",D.value)},_=ee=>{ee.stopPropagation();const re=L.selectedTagList;L.selectedTagList=[];const ge=re.filter(Ne=>E.value[Ne[e.saveKey]]);(e.allowCreate&&ge.length!==0||!e.allowCreate)&&!y.value&&L.localList.push(...ge),ne("removeAll")},R=()=>{const ee={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};i.nextTick(()=>{const re=v.value.querySelector(`.${o("selector-actived")}`);if(!re)return;const ge={height:re.clientHeight,yAxis:re.getBoundingClientRect().y};ge.yAxis<ee.yAxis&&(v.value.scrollTop=v.value.scrollTop-(ee.yAxis-ge.yAxis));const Ne=ge.yAxis+ge.height-ee.yAxis;Ne>ee.height&&(v.value.scrollTop=v.value.scrollTop+Ne-ee.height)})},V=(ee,re)=>{const ge=x();W(C.value,ge[ee-1]),L.selectedTagList.splice(ee-1,1),$();const Ne=E.value[re[e.saveKey]];(e.allowCreate&&Ne||!e.allowCreate)&&!y.value&&L.localList.push(re),h.value=`${Ja}px`,ne("remove")},q=ee=>{if(d.isPageLoading)return;let re;const ge=ee.target.value,Ne=p0(ge),ve=z(),Ie=x();switch(ee.code){case"ArrowUp":if(ee.preventDefault(),!r.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=d.curPageList.length-1),R();break;case"ArrowDown":if(ee.preventDefault(),!r.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),R();break;case"ArrowLeft":if(s.isEdit=!0,!Ne){if(ve<1)return;W(C.value,Ie[ve-1]),$()}break;case"ArrowRight":if(s.isEdit=!0,!Ne){if(ve===Ie.length-1)return;W(Ie[ve+1],C.value),$()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&r.isShow||e.allowCreate&&s.focusItemIndex>=0&&r.isShow?B(d.curPageList[s.focusItemIndex],"select",ee):e.allowCreate&&f.value.trim()&&B(f.value,"custom",ee),ee.preventDefault();break;case"Backspace":ve!==0&&!f.value&&(re=L.selectedTagList[ve-1],V(ve,re));break}},se=ee=>{const re=[],ge=ee.split(";"),Ne=/^[a-zA-Z][a-zA-Z_]*/g;return ge.forEach(ve=>{const Ie=ve.match(Ne);if(Ie){const ke=Ie.join("");re.push({[e.saveKey]:ke,[e.displayKey]:ke})}}),re},H=ee=>{if(ee.preventDefault(),y.value)return!1;const{maxData:re,saveKey:ge,displayKey:Ne,pasteFn:ve,allowCreate:Ie}=e,ke=ee.clipboardData.getData("text");let Oe=(ve?ve(ke):se(ke)).map(Ae=>Ae[ge]);if(Oe.length){const Ae=x(),St=z(),Re=L.localList.map(xe=>xe[ge]);if(Oe=Oe.filter(xe=>{const Pn=(xe==null?void 0:xe.trim())&&!D.value.includes(xe);return Ie?Pn:Pn&&Re.includes(xe)}),re!==-1){const xe=L.selectedTagList.length;if(xe<re){const Pn=re-xe;Oe.length>Pn&&(Oe=[...Oe.slice(0,Pn)])}else Oe=[]}const Ze=Ie?Oe.map(xe=>L.localList.find(Fc=>Fc[ge]===xe)??{[ge]:xe,[Ne]:xe}):L.localList.filter(xe=>Oe.includes(xe[ge]));Oe.length&&(L.selectedTagList.splice(St,0,...Ze),W(C.value,Ae[St]),h.value.style.width=`${Ja}px`,L.localList=L.localList.filter(xe=>!Oe.includes(xe[ge])),ne("select"),$())}},ie=ee=>{e.disabled||(W(C.value,ee.currentTarget,!0),h.value.style.width=`${Ja}px`,r.isShow&&J())},Z=(ee,re)=>{if(L.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ge,saveKey:Ne,displayKey:ve,createTagValidator:Ie}=e,ke=z();let De=1,Oe=!1,Ae;const St=Re=>typeof Ie=="function"?Ie(Re):!0;if(re==="custom")if(ge){let Re=ee.split(ge);Re=Re.filter(xe=>(xe==null?void 0:xe.trim())&&!D.value.includes(xe)&&St(xe));const Ze=Re.map(xe=>E.value[xe]||{[Ne]:xe,[ve]:xe});Re.length&&(L.selectedTagList.splice(ke,0,...Ze),De=Ze.length,Oe=!0)}else{const Re=typeof ee=="object";if(Ae=Re?ee[Ne]:ee.trim(),Ae=Ae.replace(/\s+/g,""),Ae!==void 0&&!D.value.includes(Ae)&&St(Ae)){const Ze=E.value[Ae]||(Re?ee:{[Ne]:Ae,[ve]:Ae});L.selectedTagList.splice(ke,0,Ze),Oe=!0}}else ee&&(Ae=ee[Ne],Ae!==void 0&&!D.value.includes(Ae)&&(L.selectedTagList.splice(ke,0,ee),Oe=!0));Oe&&i.nextTick(()=>{for(let Re=1;Re<=De;Re++){const xe=x()[ke+Re];W(xe,C.value)}if(h.value.style.width=`${Ja}px`,!y.value){e.allowNextFocus&&$();const Re=D.value.reduce((Ze,xe)=>(Ze[xe]=1,Ze),{});L.localList=L.localList.filter(Ze=>!Re[Ze[Ne]])}})},K=(ee,re)=>{L.selectedTagList.splice(re,1);const ge=E.value[ee[e.saveKey]];(e.allowCreate&&ge||!e.allowCreate)&&!y.value&&L.localList.push(ee)},X=i.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:ae}=y0(m,X,D),pe=i.computed(()=>L.selectedTagList.reduce((ee,re,ge)=>(ae.value!==null&&ge>=ae.value&&ee.push(re[e.displayKey]),ee),[]));return{popoverProps:r,...i.toRefs(s),...i.toRefs(L),...i.toRefs(d),isShowPlaceholder:b,isShowClear:M,placeholderText:w,curInputValue:f,renderList:P,showTagClose:I,tagInputRef:h,bkTagSelectorRef:m,tagListRef:p,tagInputItemRef:C,selectorListRef:v,triggerClass:S,overflowTagIndex:ae,localCollapseTags:X,collapseTooltip:pe,focusInputTrigger:$,activeClass:Y,handleInput:k,handleFocus:O,handleBlur:Q,handleTagSelected:B,handleTagRemove:G,handleClear:_,tagFocus:ie,handleKeydown:q,handlePaste:H,resolveClassName:o}},render(){return i.createVNode("div",{class:`${this.resolveClassName("tag-input")}`,ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[i.createVNode(pt,i.mergeProps({theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t;return i.createVNode("div",{class:this.triggerClass},[i.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((n,a)=>{const s={boundary:"window",theme:"light",distance:12,content:n[this.tooltipKey],disabled:!this.tooltipKey},r=this.localCollapseTags&&this.overflowTagIndex&&a>=this.overflowTagIndex;return i.withDirectives(i.createVNode("li",{class:"tag-item",style:{display:r?"none":""},onClick:this.tagFocus},[i.createVNode(F7,{node:n,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?i.createVNode(lt,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,a)},null):null]),[[i.resolveDirective("bk-tooltips"),s]])}),i.withDirectives(i.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[i.withDirectives(i.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":n=>this.curInputValue=n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[i.vModelText,this.curInputValue]])]),[[i.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&i.withDirectives(i.createVNode("li",{class:"tag-item"},[i.createVNode("div",{class:"tag"},[i.createVNode("span",{class:"text"},[i.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[i.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]])]),i.withDirectives(i.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[i.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&i.createVNode(ot,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>i.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[i.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?i.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[i.createVNode("span",{class:"group-name"},[e.name,i.createTextVNode(" ("),e.children.length,i.createTextVNode(")")]),i.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,a)=>i.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,a)],onClick:this.handleTagSelected.bind(this,n,"select")},[i.createVNode(b0,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue,disabled:n.disabled},null)]))])]):i.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[i.createVNode(b0,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue,disabled:e.disabled},null)])),this.isPageLoading?i.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[i.createVNode(vn,{theme:"primary",size:Bn.Small},null)]):null])])})])}}),C0=Le(B7),G7={direction:Zd(),align:So().def(ls.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:Yd()},v0=Le(i.defineComponent({name:"Divider",props:G7,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`},{resolveClassName:t}=le();let n;return this.$slots.default&&(n=i.createVNode("div",{class:[t("divider-info"),t(`divider-info-${this.align}`)]},[this.$slots.default()])),i.createVNode("div",{class:[t("divider"),t(`divider-${this.direction}`)],style:e()},[n])}}));var Pr=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid",e))(Pr||{}),Pi=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Pi||{});const N0=me("position",{}).def("top");var w0=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(w0||{});const M0=me("sortType",{}).def("replace"),Z7={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Y7={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,tips:g.string,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:To(),panel:g.string||g.func},U7={active:g.oneOfType([g.number,g.string]).def(""),type:me("type",{}).def("border-card"),tabPosition:N0,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:M0,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3),activeBarSize:g.number.def(2),activeBarColor:g.string.def("#3a84ff")},K7={active:g.oneOfType([g.number,g.string]).def(""),type:me("type",{}).def("border-card"),activeBarColor:g.string.def("#3a84ff"),activeBarSize:g.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:N0,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:M0,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3),...Z7},I0=i.defineComponent({name:"TabNav",directives:{bkTooltips:Tn},props:K7,setup(e){const t=i.ref(null),n=i.computed(()=>{const u={width:0,height:0,bottom:0,left:0};if(!t.value)return u;if([Pi.LEFT,Pi.RIGHT].includes(e.tabPosition)){const{clientHeight:f,offsetTop:h}=t.value,m={width:`${e.activeBarSize}px`,height:`${f}px`,top:`${h}px`,background:e.activeBarColor};return e.tabPosition===Pi.LEFT?m.right=0:m.left=0,m}if(e.type===Pr.UNBORDER_CARD){const{clientWidth:f,offsetLeft:h}=t.value;return{width:`${f}px`,height:`${e.activeBarSize}px`,left:`${h}px`,bottom:0,background:e.activeBarColor}}return u}),a=i.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const u=[];let f=!1;return e.panels.filter((h,m)=>{if(!h.props)return null;const{name:p,label:C,closable:v,visible:N,disabled:I,sortable:y,tips:b}=h.props;if(!N)return!1;e.active===p&&(f=!0);const w=M=>h.slots.label?i.h(h.slots.label):[void 0,""].includes(M)?`选项卡${m+1}`:typeof M=="string"?M:typeof M=="function"?i.h(M):M;return u.push({name:p,closable:v,visible:N,disabled:I,sortable:y,tips:b,tabLabel:w(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),u}),s=i.ref(-1),r=i.ref(-1),o=i.ref(""),l=(u,f)=>u===f,d={handleTabAdd(u){e.tabAdd(u)},dragstart(u,f){r.value=u,o.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(u,f)},dragenter(u){l(o.value,e.guid)&&(s.value=u)},dragend(){s.value=-1,r.value=-1,o.value=null},drop(u,f){if(!l(o.value,e.guid))return!1;e.tabSort(r.value,u,f)},handleTabChange(u){e.tabChange(u)},handleTabRemove(u,f){e.tabRemove(u,f)}},{resolveClassName:c}=le();return{...d,activeRef:t,activeBarStyle:n,navs:a,dragenterIndex:s,dragStartIndex:r,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:c}},render(){const{active:e,closable:t,addable:n,sortable:a,sortType:s,labelHeight:r,dragstart:o,dragenter:l,dragend:d,drop:c}=this,u=()=>this.navs.map((C,v)=>{if(!C)return null;const{name:N,disabled:I,tabLabel:y}=C,b=()=>{const M=[this.resolveClassName("tab-header-item")];return I&&M.push(this.resolveClassName("tab-header--disabled")),e===N&&M.push(this.resolveClassName("tab-header--active")),M.join(" ")},w=(M,S)=>!I&&(M||S);return i.withDirectives(i.createVNode("div",{key:N,onClick:()=>!I&&this.handleTabChange(N),draggable:w(C.sortable,a),onDragstart:M=>o(v,M),ref:e===N?"activeRef":"",onDragenter:M=>{M.preventDefault(),l(v)},onDragleave:M=>{M.preventDefault()},onDragover:M=>{M.preventDefault()},onDragend:M=>{M.preventDefault(),d()},onDrop:M=>{M.preventDefault(),c(v,s)},class:b()},[i.createVNode("div",null,[y]),w(C.closable,t)?i.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(v,C)},[i.createVNode(ot,null,null)]):""]),[[i.resolveDirective("bk-tooltips"),{content:C.tips,disabled:!C.tips}]])}),f=()=>{var v,N;const C=[];return typeof this.$slots.add=="function"?C.push((N=(v=this.$slots).add)==null?void 0:N.call(v,i.h)):n&&C.push(i.createVNode("div",{onClick:this.handleTabAdd},[i.createVNode(Ci,{style:"display:flex;",width:26,height:26},null)])),C.length?i.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[C.map((I,y)=>i.createVNode("div",{class:this.resolveClassName("tab-header-item"),key:y},[I]))]):null},h=()=>this.type===Pr.UNBORDER_CARD?i.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",m=typeof this.$slots.setting=="function"?i.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,p=f();return i.createVNode("div",{style:{lineHeight:`${r}px`},class:this.resolveClassName("tab-header")},[i.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),p||m?"tab-header-auto":""]},[h(),u()]),p,m])}}),L0=qe(i.defineComponent({name:"Tab",components:{TabNav:I0},props:U7,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 a=i.ref(!1),s=i.ref([]),r=i.getCurrentInstance(),o=(u,f=[])=>{const{children:h}=u;return(h||[]).forEach(m=>{let{type:p}=m;p=p.name||p,p==="TabPanel"&&m.component?f.push(m.component):(p===i.Fragment||p==="template")&&o(m,f)}),f},l=()=>{if(t.default){const{children:u}=r.subTree.children[1];if(!u)return;const f=u[0],h=o(f);h.length!==s.value.length&&(s.value=h)}};i.onMounted(()=>{l(),a.value=!0,i.onUpdated(()=>{l()})});const d={tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,f){n("remove",u,f),n("remove-panel",u,f)},tabSort(u,f,h){const m=s.value;if(h===w0.INSERT)if(u<f)m.splice(f+1,0,s[u]),m.splice(u,1);else if(u>f)m.splice(f,0,s[u]),m.splice(u+1,1);else return!1;else{const p=m[f];m[f]=m[u],m[u]=p}s.value=[...m],n("sort",u,f,h),n("sort-change",u,f,h)},tabDrag(u,f){n("drag",u,f),n("on-drag-tab",u,f)}},{resolveClassName:c}=le();return{...d,isMounted:a,panels:s,resolveClassName:c}},render(){var n,a;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Pi.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===Pr.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:r,type:o,closable:l,addable:d,sortable:c,sortType:u,labelHeight:f,scrollStep:h,validateActive:m,changeOnHover:p,changeOnHoverDelay:C,tabPosition:v,activeBarSize:N,activeBarColor:I,tabAdd:y,tabChange:b,tabRemove:w,tabSort:M,tabDrag:S}=this,L={panels:s,active:r,type:o,closable:l,addable:d,sortable:c,sortType:u,labelHeight:f,scrollStep:h,validateActive:m,changeOnHover:p,changeOnHoverDelay:C,tabPosition:v,activeBarSize:N,activeBarColor:I,tabAdd:y,tabChange:b,tabRemove:w,tabSort:M,tabDrag:S};return!s||!Array.isArray(s)?null:i.createVNode(I0,L,this.$slots)};return i.createVNode("div",{class:e()},[t(),i.createVNode("div",{class:this.resolveClassName("tab-content")},[(a=(n=this.$slots).default)==null?void 0:a.call(n)])])}}),{TabPanel:i.defineComponent({name:"TabPanel",props:Y7,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(i.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=le();return i.withDirectives(i.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[i.vShow,e]])}})}),dn={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let T0=1;const S0=(e,t)=>{let n=t;const a=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,r=n.offsetX||10;let o=n.offsetY||30;const{spacing:l=10}=n;dn[a].forEach(h=>{o+=(h.el.offsetHeight||0)+l}),T0+=1;const d=`message_${T0}`;n={...n,offsetX:r,offsetY:o,id:d};const c=document.createElement("div"),u=i.createVNode(e,n);u.props.onDestroy=h=>{X7(h,a,l,s),i.render(null,c)},u.props.onDetail=(h,m)=>{dn[a].forEach(p=>{var C,v;p.props.id!==m&&((v=(C=p.component)==null?void 0:C.exposed)==null||v.setDetailsShow(null,!1))})},i.render(u,c),dn[a].push(u);let f;u.props.getContainer&&An(u.props.getContainer)?f=u.props.getContainer:f=document.body,f.appendChild(c.firstElementChild)};function X7(e,t,n,a){a==null||a();const s=t.startsWith("top")?"top":"bottom";let r=-1;dn[t].forEach((c,u)=>{c.props.id===e&&(r=u)});const l=dn[t][r].el.offsetHeight,d=dn[t].length;for(let c=r;c<d;c++){const u=parseInt(dn[t][c].el.style[s],10)-l-n;dn[t][c].component.props.offsetY=u}dn[t].splice(r,1)}var k0={exports:{}};/*!
|
49
49
|
* clipboard.js v2.0.11
|
50
50
|
* https://clipboardjs.com/
|
51
51
|
*
|