mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-15 16:22:44 +00:00
234 lines
212 KiB
JavaScript
234 lines
212 KiB
JavaScript
import{P as sn,Q as cn,S as dn,b as It,i as Yt,a3 as Re,az as Se,aA as Nl,aB as Te,w as qt,aj as Ao,ai as Ml,ak as Bl,al as jo,n as Pe,g as ve,e as zl,c as Fo,f as z,m as Lt,h as Ko,aq as Un,l as Io,aC as Pa,aD as Hl,p as vt,aE as Wl,as as Ua,aF as $l,aG as Lo,ah as Vl,a1 as H,aH as Ul,aI as Xl,aJ as Gl,am as Yl,d as gt,U as ql,Y as Xa,aK as Jl,aL as br,aM as Zl,ac as ko,Z as _n,aN as Ql,O as pa,k as Aa,a5 as ei,aO as ti,a2 as lr,ar as ni,aP as ai,aQ as ri}from"./index.9d6da31d.js";import{d as He,c as N,j as W,w as ce,o as pt,bP as oi,bQ as li,b as Ra,aI as k,n as Gt,t as Ie,i as mr,aV as Ke,bA as ii,u as ui,x as si,y as ci,aY as No,p as Mo,r as Xn,h as Ye,aU as vn,aZ as di,g as Bo,s as vi}from"./arco.9755215d.js";import{_ as zo,b as Ho,o as Wo,c as wr,t as $o,p as xn,P as fi,d as Vo,u as kt,A as Uo,e as Xo,f as Ga,g as yr,E as Go,h as Yo,i as qo,j as hi,k as ba,C as Ya,a as Jo,l as gi}from"./dep-71c4f289.efb2c598.js";import{d as ir,T as Zo,u as pi,a as bi,P as mi}from"./index.f3cc6098.js";import{i as Sn,b as Qo,_ as el,d as wi,l as ze,I as yi}from"./index.3871c524.js";import{_ as qa,r as yn,i as Ci,s as $n,v as tl}from"./form-model.539cba92.js";function Cr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function xr(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Cr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var xi={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v20H2V2zm2 2v16h16V4H4zm9 2.5V11h4.5v2H13v4.5h-2V13H6.5v-2H11V6.5h2z"}}]},Si=He({name:"AddRectangleIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-add-rectangle",r.value]),i=N(()=>xr(xr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(xi,u.value)}});const Oi=Si;function Sr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Or(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Sr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Ri={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 3a9 9 0 100 18 9 9 0 000-18zM1 12a11 11 0 1122 0 11 11 0 01-22 0zm9.5-5.41L15.91 12l-5.41 5.41L9.09 16l4-4-4-4 1.41-1.41z"}}]},Ei=He({name:"ChevronRightCircleIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-chevron-right-circle",r.value]),i=N(()=>Or(Or({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(Ri,u.value)}});const _i=Ei;function Rr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Er(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Rr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Di={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.83 1.42l5.75 5.75L7.75 22H2v-5.75L16.83 1.42zm0 8.68l2.92-2.93-2.92-2.93-2.93 2.93 2.93 2.93zm-4.34-1.51L4 17.07V20h2.93l8.48-8.49L12.5 8.6z"}}]},Ti=He({name:"Edit1Icon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-edit-1",r.value]),i=N(()=>Er(Er({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(Di,u.value)}});const Pi=Ti;function _r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Dr(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?_r(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):_r(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Ai={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.57 3h18.86l-6.93 9.82V21h-5v-8.18L2.57 3zm3.86 2l5.07 7.18V19h1v-6.82L17.57 5H6.43z"}}]},ji=He({name:"FilterIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-filter",r.value]),i=N(()=>Dr(Dr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(Ai,u.value)}});const Fi=ji;function Tr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Pr(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Tr(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Tr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Ki={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v20H2V2zm2 2v16h16V4H4zm2.5 7h11v2h-11v-2z"}}]},Ii=He({name:"MinusRectangleIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-minus-rectangle",r.value]),i=N(()=>Pr(Pr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(Ki,u.value)}});const Li=Ii;function Ar(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function jr(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ar(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ar(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var ki={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6.75 2.25h3v3h-3v-3zm7.5 0h3v3h-3v-3zm-7.5 5.5h3v3h-3v-3zm7.5 0h3v3h-3v-3zm-7.5 5.5h3v3h-3v-3zm7.5 0h3v3h-3v-3zm-7.5 5.5h3v3h-3v-3zm7.5 0h3v3h-3v-3z"}}]},Ni=He({name:"MoveIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-move",r.value]),i=N(()=>jr(jr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(ki,u.value)}});const hc=Ni;function Fr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Kr(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Fr(Object(a),!0).forEach(function(n){dn(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Fr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Mi={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 .85l9.66 5.57v11.16L12 23.15l-9.66-5.57V6.42L12 .85zm0 2.3L4.34 7.58v8.84L12 20.85l7.66-4.43V7.58L12 3.15zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]},Bi=He({name:"SettingIcon",props:{size:{type:String},onClick:{type:Function}},setup(t,e){var{attrs:a}=e,n=N(()=>t.size),{className:r,style:o}=sn(n),l=N(()=>["t-icon","t-icon-setting",r.value]),i=N(()=>Kr(Kr({},o.value),a.style)),u=N(()=>({class:l.value,style:i.value,onClick:s=>{var v;return(v=t.onClick)===null||v===void 0?void 0:v.call(t,{e:s})}}));return()=>cn(Mi,u.value)}});const zi=Bi;/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Hi={container:{type:[String,Function],default:function(){return function(){return window}}},content:{type:[String,Function]},default:{type:[String,Function]},offsetBottom:{type:Number,default:0},offsetTop:{type:Number,default:0},zIndex:{type:Number},onFixedChange:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Wi=He({name:"TAffix",props:Hi,emits:["fixedChange"],setup:function(e,a){var n,r=It("affix"),o=Yt(),l=W(null),i=W(null),u=W((n=document)===null||n===void 0?void 0:n.createElement("div")),s=W(!1),v=W(!1),d=W(),p=W(),b=0,w=function(){s.value||(b=window.requestAnimationFrame(function(){var O,S;b=0;var D=(O=(S=l.value)===null||S===void 0?void 0:S.getBoundingClientRect())!==null&&O!==void 0?O:{top:0,width:0,height:0},j=D.top,A=D.width,P=D.height,F=0;d.value instanceof HTMLElement&&(F=d.value.getBoundingClientRect().top);var T,I=j-F,_=d.value[d.value instanceof Window?"innerHeight":"clientHeight"]-P,m=F+_-e.offsetBottom;if(!Sn(e.offsetTop)&&I<=e.offsetTop?T=F+e.offsetTop:!Sn(e.offsetBottom)&&j>=m?T=m:T=!1,i.value){var h=T!==!1,g=l.value.contains(u.value);h?(i.value.className=r.value,p.value={top:"".concat(T,"px"),width:"".concat(A,"px"),height:"".concat(P,"px"),zIndex:e.zIndex},g||(u.value.style.width="".concat(A,"px"),u.value.style.height="".concat(P,"px"),l.value.appendChild(u.value))):(i.value.removeAttribute("class"),p.value=void 0,g&&u.value.remove()),a.emit("fixedChange",h,{top:Number(T)}),Re(e.onFixedChange)&&e.onFixedChange(h,{top:Number(T)})}s.value=!1}),s.value=!0)},y=function(){var C=qa(yn.mark(function O(){return yn.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,Gt();case 2:if(!v.value){D.next=4;break}return D.abrupt("return");case 4:d.value=Nl(e.container),Te(d.value,"scroll",w),Te(window,"resize",w),v.value=!0;case 8:case"end":return D.stop()}},O)}));return function(){return C.apply(this,arguments)}}(),R=function(){!d.value||!v.value||(Se(d.value,"scroll",w),Se(window,"resize",w),b&&window.cancelAnimationFrame(b),v.value=!1)};return ce(function(){return e.offsetTop},function(){w()}),ce(function(){return e.offsetBottom},function(){w()}),ce(function(){return e.zIndex},function(){w()}),pt(y),oi(y),li(R),Ra(R),{affixWrapRef:l,affixRef:i,bindScroll:y,unbindScroll:R,handleScroll:w,scrollContainer:d,renderTNodeJSX:o,affixStyle:p}},render:function(){return k("div",{ref:"affixWrapRef"},[k("div",{ref:"affixRef",style:this.affixStyle},[this.renderTNodeJSX("default")])])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Zn=qt(Wi);/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var $i=Ao,Vi=zo,Ui=Ho,Xi=Ml,Gi=Bl,Yi=jo,qi=200;function Ji(t,e,a,n){var r=-1,o=Vi,l=!0,i=t.length,u=[],s=e.length;if(!i)return u;a&&(e=Xi(e,Gi(a))),n?(o=Ui,l=!1):e.length>=qi&&(o=Yi,l=!1,e=new $i(e));e:for(;++r<i;){var v=t[r],d=a==null?v:a(v);if(v=n||v!==0?v:0,l&&d===d){for(var p=s;p--;)if(e[p]===d)continue e;u.push(v)}else o(e,d,n)||u.push(v)}return u}var Zi=Ji;/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var nl={allowUncheck:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},label:{type:[String,Function]},name:{type:String,default:""},readonly:Boolean,value:{type:[String,Number,Boolean],default:void 0},onChange:Function,onClick:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var al=Symbol("RadioGroupProvide"),rl=Symbol("RadioButtonProvide");/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ir(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Qi(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ir(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function eu(t){var e={};return Object.keys(t).forEach(function(a){Sn(t[a])||(e[a]=t[a])}),e}var ur=He({name:"TRadio",inheritAttrs:!1,props:Qi({},nl),setup:function(e,a){var n=a.attrs,r=W(),o=Ie(e),l=o.checked,i=o.modelValue,u=Qo(l,i,e.defaultChecked,e.onChange,"checked"),s=Pe(u,2),v=s[0],d=s[1],p=N(function(){return b?e.value===b.value:v.value}),b=mr(al,void 0),w=N(function(){return Boolean(e.allowUncheck||(b==null?void 0:b.allowUncheck))}),y=function(c){c.stopPropagation()},R=function(c){var f;if(!(D.value||e.readonly)&&((f=e.onClick)===null||f===void 0||f.call(e,{e:c}),!(p.value&&!w.value)))if(b){var x=p.value&&w.value?void 0:e.value;b.setValue(x,{e:c})}else{var E=w.value?!p.value:!0;d(E,{e:c})}},C=N(function(){return eu({focus:n.onFocus,blur:n.onBlur,keydown:n.onKeydown,keyup:n.onKeyup,keypresss:n.onKeypresss})}),O=N(function(){var g=[].concat(ve(Object.keys(C.value)),["input","change"]).map(function(c){return"on".concat(c[0].toUpperCase()).concat(c.slice(1))});return Wo(n,g)}),S=N(function(){return b==null?void 0:b.disabled}),D=zl({afterDisabled:S}),j=N(function(){return{name:b?b.name:e.name,checked:p.value,disabled:D.value,readonly:e.readonly,value:e.value}}),A=Fo(),P=A.STATUS,F=mr(rl,void 0),T=It("radio-button"),I=It("radio"),_=N(function(){return F?T.value:I.value}),m=N(function(){return["".concat(_.value),z(z({},P.value.checked,j.value.checked),P.value.disabled,j.value.disabled)]}),h=Ko();return function(){return k("label",Ke({ref:r,class:m.value},O.value,{tabindex:D.value?void 0:"0",onClick:R}),[k("input",Ke({type:"radio",class:"".concat(_.value,"__former")},C.value,j.value,{onClick:y,tabindex:"-1","data-value":Lt(e.value)?"'".concat(e.value,"'"):e.value,"data-allow-uncheck":w.value||void 0}),null),k("span",{class:"".concat(_.value,"__input")},null),k("span",{class:"".concat(_.value,"__label")},[h("default","label")])])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var tu={allowUncheck:Boolean,disabled:{type:Boolean,default:void 0},name:{type:String,default:""},options:{type:Array},size:{type:String,default:"medium",validator:function(e){return e?["small","medium","large"].includes(e):!0}},value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},defaultValue:{type:[String,Number,Boolean]},variant:{type:String,default:"outline",validator:function(e){return e?["outline","primary-filled","default-filled"].includes(e):!0}},onChange:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function nu(t,e){var a=function(r){var o=wr.test(r.key)||wr.test(r.code);if(o){r.preventDefault();var l=r.target.querySelector("input");if(!l)return;var i=l.dataset;if(l.checked&&i.allowUncheck)e(void 0,{e:r});else{var u=isNaN(Number(i.value))?i.value:Number(i.value);u=Lt(u)&&{true:!0,false:!1}[u]||u,u=Lt(u)&&u[0]==="'"?u.replace(/'/g,""):u,e(u,{e:r})}}};pt(function(){Te(t.value,"keydown",a)}),ii(function(){Se(t.value,"keydown",a)})}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var au=["window"],ru=typeof window<"u"?window:void 0;function ou(t){var e,a=ui(t);return(e=a==null?void 0:a.$el)!==null&&e!==void 0?e:a}function lu(t){return si()?(ci(t),!0):!1}function iu(t,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=a.window,r=n===void 0?ru:n,o=el(a,au),l,i=r&&"MutationObserver"in r,u=function(){l&&(l.disconnect(),l=void 0)},s=ce(function(){return ou(t)},function(d){u(),i&&r&&d&&(l=new MutationObserver(e),l.observe(d,o))},{immediate:!0}),v=function(){u(),s()};return lu(v),{isSupported:i,stop:v}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Lr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ja(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Lr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Lr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var uu=He({name:"TRadioGroup",props:ja({},tu),setup:function(e){var a=Ie(e),n=a.value,r=a.modelValue,o=Qo(n,r,e.defaultValue,e.onChange),l=Pe(o,2),i=l[0],u=l[1],s=W(),v=It("radio-button"),d=Fo(),p=d.STATUS,b=d.SIZE;nu(s,u);var w=N(function(){return".".concat(v.value,".").concat(p.value.checked)}),y=W({width:"0px",height:"0px",left:"0px",top:"0px","transition-property":"none"}),R=function(){var m=document.createElement("div");m.setAttribute("style","position: absolute; visibility: hidden;"),m.appendChild(s.value.cloneNode(!0)),document.body.appendChild(m);var h=m.querySelector(w.value),g=h.offsetWidth,c=h.offsetHeight,f=h.offsetLeft,x=h.offsetTop;y.value=ja(ja({},y.value),{},{width:"".concat(g,"px"),height:"".concat(c,"px"),left:"".concat(f,"px"),top:"".concat(x,"px")}),document.body.removeChild(m)},C=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(e.variant!=="outline"){var h=s.value.querySelector(w.value),g=m?"none":"all";if(!h){y.value={"transition-property":g,width:"0px",height:"9px",left:"0px",top:"0px"};return}var c=h.offsetWidth,f=h.offsetHeight,x=h.offsetLeft,E=h.offsetTop;c?y.value={"transition-property":g,width:"".concat(c,"px"),height:"".concat(f,"px"),left:"".concat(x,"px"),top:"".concat(E,"px")}:R()}},O;ce(i,qa(yn.mark(function _(){return yn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,Gt();case 2:C();case 3:case"end":return h.stop()}},_)}))),pt(function(){C(!0),wi(s,$o(qa(yn.mark(function m(){return yn.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,Gt();case 2:C();case 3:case"end":return g.stop()}},m)})),300));var _=s.value.querySelector("".concat(w.value," .").concat(v.value,"__label"));_&&(O=iu(_,function(m){m.forEach(function(h){h.type==="characterData"&&C()})},{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}),No(function(){var _;(_=O)===null||_===void 0||_.stop()});var S=Ie(e),D=S.name,j=S.disabled;Mo(al,Xn({name:D,disabled:j,value:i,allowUncheck:e.allowUncheck,setValue:u}));var A=It("radio-group"),P=Un(),F=function(){if(e.variant.includes("filled")&&!Ci(i.value))return k("div",{style:y.value,class:"".concat(A.value,"__bg-block")},null)},T=function(){var m;return(m=e.options)===null||m===void 0?void 0:m.map(function(h){var g=h;return(Io(h)||Lt(h))&&(g={value:h,label:h.toString()}),k(ur,{key:"radio-group-options-".concat(g.value,"-").concat(Math.random()),name:e.name,checked:i.value===g.value,disabled:"disabled"in g?g.disabled:e.disabled,value:g.value},{default:function(){return[Re(g.label)?g.label(Ye):g.label]}})})},I=N(function(){return["".concat(A.value),b.value[e.size],z(z(z({},"".concat(A.value,"__outline"),e.variant==="outline"),"".concat(A.value,"--filled"),e.variant.includes("filled")),"".concat(A.value,"--primary-filled"),e.variant==="primary-filled")]});return function(){return k("div",{ref:s,class:I.value},[P("default")||T(),F()])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function kr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Fa(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?kr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):kr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function su(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var cu=He({name:"TRadioButton",inheritAttrs:!1,props:Fa({},nl),setup:function(e,a){var n=a.attrs;Mo(rl,Xn({}));var r=N(function(){var l=Fa(Fa({},e),Wo(n,Object.keys(n).filter(function(i){return i.startsWith("on")})));return l}),o=Ko();return function(){var l;return k(ur,r.value,su(l=o("default","label"))?l:{default:function(){return[l]}})}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var du=qt(ur),vu=qt(uu);qt(cu);/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Rn={activeRowKeys:{type:Array,default:void 0},defaultActiveRowKeys:{type:Array,default:function(){return[]}},activeRowType:{type:String,default:""},allowResizeColumnWidth:{type:Boolean,default:void 0},attach:{type:[String,Function]},bordered:Boolean,bottomContent:{type:[String,Function]},cellEmptyContent:{type:[String,Function]},columns:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},disableDataPage:Boolean,disableSpaceInactiveRow:{type:Boolean,default:void 0},empty:{type:[String,Function],default:""},firstFullRow:{type:[String,Function]},fixedRows:{type:Array},footData:{type:Array,default:function(){return[]}},footerAffixProps:{type:Object},footerAffixedBottom:{type:[Boolean,Object],default:!1},footerSummary:{type:[String,Function]},headerAffixProps:{type:Object},headerAffixedTop:{type:[Boolean,Object],default:!1},height:{type:[String,Number]},horizontalScrollAffixedBottom:{type:[Boolean,Object]},hover:Boolean,keyboardRowHover:{type:Boolean,default:!0},lastFullRow:{type:[String,Function]},lazyLoad:Boolean,loading:{type:[Boolean,Function],default:void 0},loadingProps:{type:Object},locale:{type:Object},maxHeight:{type:[String,Number]},pagination:{type:Object},paginationAffixedBottom:{type:[Boolean,Object]},resizable:Boolean,rowAttributes:{type:[Object,Array,Function]},rowClassName:{type:[String,Object,Array,Function]},rowKey:{type:String,default:"id",required:!0},rowspanAndColspan:{type:Function},rowspanAndColspanInFooter:{type:Function},scroll:{type:Object},showHeader:{type:Boolean,default:!0},size:{type:String,validator:function(e){return e?["small","medium","large"].includes(e):!0}},stripe:Boolean,tableContentWidth:{type:String,default:""},tableLayout:{type:String,default:"fixed",validator:function(e){return e?["auto","fixed"].includes(e):!0}},topContent:{type:[String,Function]},verticalAlign:{type:String,default:"middle",validator:function(e){return e?["top","middle","bottom"].includes(e):!0}},onActiveChange:Function,onActiveRowAction:Function,onCellClick:Function,onColumnResizeChange:Function,onPageChange:Function,onRowClick:Function,onRowDblclick:Function,onRowMousedown:Function,onRowMouseenter:Function,onRowMouseleave:Function,onRowMouseover:Function,onRowMouseup:Function,onScroll:Function,onScrollX:Function,onScrollY:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ol(t,e){for(var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=a,r=0,o=t.length;r<o;r++){var l,i=t[r];if(e.set(i,a),i!=null&&(l=i.children)!==null&&l!==void 0&&l.length){var u=ol(i.children,e,a+1);u>n&&(n=u)}}return n}function ll(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=e,n=(t==null?void 0:t.children)||[],r=0,o=n.length;r<o;r++){var l=n[r];l.children?a=ll(l,a):a+=1}return a}function fu(t){var e=new Map,a=ol(t,e),n=new Map,r=function(i,u){for(var s=0,v=i.length;s<v;s++){var d,p=i[s],b=p.children?1:a-e.get(p)+1,w=p.children?ll(p):1,y={};b>1&&(y.rowspan=b),w>1&&(y.colspan=w),n.set(p,y),p!=null&&(d=p.children)!==null&&d!==void 0&&d.length?r(p.children,u):u.push(p)}},o=[];return r(t,o),{rowspanAndColspanMap:n,leafColumns:o}}function hu(t){var e=function(r,o){for(var l,i=[],u=[],s=0,v=r.length;s<v;s++){var d,p=r[s],b=[p];i=i.concat(b),p!=null&&(d=p.children)!==null&&d!==void 0&&d.length&&(u=u.concat(p.children))}return(l=u)!==null&&l!==void 0&&l.length&&e(u,o),o.push(i),i},a=[];return e(t,a),a=a.reverse(),a}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function it(){var t=It(),e={classPrefix:t.value,tableBaseClass:{table:"".concat(t.value,"-table"),columnResizableTable:"".concat(t.value,"-table--column-resizable"),overflowVisible:"".concat(t.value,"-table--overflow-visible"),body:"".concat(t.value,"-table__body"),content:"".concat(t.value,"-table__content"),topContent:"".concat(t.value,"-table__top-content"),bottomContent:"".concat(t.value,"-table__bottom-content"),paginationWrap:"".concat(t.value,"-table__pagination-wrap"),tdLastRow:"".concat(t.value,"-table__td-last-row"),tdFirstCol:"".concat(t.value,"-table__td-first-col"),thCellInner:"".concat(t.value,"-table__th-cell-inner"),tableRowEdit:"".concat(t.value,"-table--row-edit"),cellEditable:"".concat(t.value,"-table__cell--editable"),cellEditWrap:"".concat(t.value,"-table__cell-wrap"),bordered:"".concat(t.value,"-table--bordered"),striped:"".concat(t.value,"-table--striped"),hover:"".concat(t.value,"-table--hoverable"),loading:"".concat(t.value,"-table--loading"),rowspanAndColspan:"".concat(t.value,"-table--rowspan-colspan"),empty:"".concat(t.value,"-table__empty"),emptyRow:"".concat(t.value,"-table__empty-row"),headerFixed:"".concat(t.value,"-table--header-fixed"),columnFixed:"".concat(t.value,"-table--column-fixed"),widthOverflow:"".concat(t.value,"-table--width-overflow"),multipleHeader:"".concat(t.value,"-table--multiple-header"),footerAffixed:"".concat(t.value,"-table--footer-affixed"),horizontalBarAffixed:"".concat(t.value,"-table--horizontal-bar-affixed"),affixedHeader:"".concat(t.value,"-table--affixed-header"),affixedHeaderElm:"".concat(t.value,"-table__affixed-header-elm"),affixedFooterElm:"".concat(t.value,"-table__affixed-footer-elm"),affixedFooterWrap:"".concat(t.value,"-table__affixed-footer-wrap"),scrollbarDivider:"".concat(t.value,"-table__scroll-bar-divider"),fullHeight:"".concat(t.value,"-table--full-height"),resizeLine:"".concat(t.value,"-table__resize-line"),obviousScrollbar:"".concat(t.value,"-table__scrollbar--obvious"),affixedHeaderWrap:"".concat(t.value,"-table__affixed-header-elm-wrap")},tdAlignClasses:{left:"".concat(t.value,"-align-left"),right:"".concat(t.value,"-align-right"),center:"".concat(t.value,"-align-center")},tableHeaderClasses:{header:"".concat(t.value,"-table__header"),thBordered:"".concat(t.value,"-table__header-th--bordered"),fixed:"".concat(t.value,"-table__header--fixed"),multipleHeader:"".concat(t.value,"-table__header--multiple")},tableFooterClasses:{footer:"".concat(t.value,"-table__footer"),fixed:"".concat(t.value,"-table__footer--fixed")},tableAlignClasses:{top:"".concat(t.value,"-vertical-align-top"),middle:"".concat(t.value,"-vertical-align-middle"),bottom:"".concat(t.value,"-vertical-align-bottom")},tableRowFixedClasses:{top:"".concat(t.value,"-table__row--fixed-top"),bottom:"".concat(t.value,"-table__row--fixed-bottom"),firstBottom:"".concat(t.value,"-table__row--fixed-bottom-first"),withoutBorderBottom:"".concat(t.value,"-table__row--without-border-bottom")},tableColFixedClasses:{left:"".concat(t.value,"-table__cell--fixed-left"),right:"".concat(t.value,"-table__cell--fixed-right"),lastLeft:"".concat(t.value,"-table__cell--fixed-left-last"),firstRight:"".concat(t.value,"-table__cell--fixed-right-first"),leftShadow:"".concat(t.value,"-table__content--scrollable-to-left"),rightShadow:"".concat(t.value,"-table__content--scrollable-to-right")},tableLayoutClasses:{auto:"".concat(t.value,"-table--layout-auto"),fixed:"".concat(t.value,"-table--layout-fixed")},tdEllipsisClass:"".concat(t.value,"-table-td--ellipsis"),tableFullRowClasses:{base:"".concat(t.value,"-table__row--full"),innerFullRow:"".concat(t.value,"-table__row-full-inner"),innerFullElement:"".concat(t.value,"-table__row-full-element"),firstFullRow:"".concat(t.value,"-table__first-full-row"),lastFullRow:"".concat(t.value,"-table__last-full-row")},tableExpandClasses:{iconBox:"".concat(t.value,"-table__expand-box"),iconCell:"".concat(t.value,"-table__expandable-icon-cell"),row:"".concat(t.value,"-table__expanded-row"),rowInner:"".concat(t.value,"-table__expanded-row-inner"),expanded:"".concat(t.value,"-table__row--expanded"),collapsed:"".concat(t.value,"-table__row--collapsed")},tableSortClasses:{sortable:"".concat(t.value,"-table__cell--sortable"),sortColumn:"".concat(t.value,"-table__sort-column"),title:"".concat(t.value,"-table__cell--title"),trigger:"".concat(t.value,"-table__cell--sort-trigger"),doubleIcon:"".concat(t.value,"-table__double-icons"),sortIcon:"".concat(t.value,"-table__sort-icon"),iconDirection:{asc:"".concat(t.value,"-table-sort-asc"),desc:"".concat(t.value,"-table-sort-desc")},iconActive:"".concat(t.value,"-table__sort-icon--active"),iconDefault:"".concat(t.value,"-icon-sort--default")},tableSelectedClasses:{selected:"".concat(t.value,"-table__row--selected"),disabled:"".concat(t.value,"-table__row--disabled"),checkCell:"".concat(t.value,"-table__cell-check")},tableFilterClasses:{filterable:"".concat(t.value,"-table__cell--filterable"),popup:"".concat(t.value,"-table__filter-pop"),icon:"".concat(t.value,"-table__filter-icon"),popupContent:"".concat(t.value,"-table__filter-pop-content"),result:"".concat(t.value,"-table__filter-result"),inner:"".concat(t.value,"-table__row-filter-inner"),bottomButtons:"".concat(t.value,"-table__filter--bottom-buttons"),contentInner:"".concat(t.value,"-table__filter-pop-content-inner"),iconWrap:"".concat(t.value,"-table__filter-icon-wrap")},asyncLoadingClass:"".concat(t.value,"-table__async-loading"),isFocusClass:"".concat(t.value,"-is-focus"),isLoadingClass:"".concat(t.value,"-is-loading"),isLoadMoreClass:"".concat(t.value,"-is-load-more"),tableTreeClasses:{col:"".concat(t.value,"-table__tree-col"),inlineCol:"".concat(t.value,"-table__tree-col--inline"),icon:"".concat(t.value,"-table__tree-op-icon"),leafNode:"".concat(t.value,"-table__tree-leaf-node")},tableDraggableClasses:{rowDraggable:"".concat(t.value,"-table--row-draggable"),rowHandlerDraggable:"".concat(t.value,"-table--row-handler-draggable"),colDraggable:"".concat(t.value,"-table--col-draggable"),handle:"".concat(t.value,"-table__handle-draggable"),ghost:"".concat(t.value,"-table__ele--draggable-ghost"),chosen:"".concat(t.value,"-table__ele--draggable-chosen"),dragging:"".concat(t.value,"-table__ele--draggable-dragging"),dragSortTh:"".concat(t.value,"-table__th--drag-sort")},virtualScrollClasses:{cursor:"".concat(t.value,"-table__virtual-scroll-cursor"),header:"".concat(t.value,"-table__virtual-scroll-header")},positiveRotate90:"".concat(t.value,"-positive-rotate-90"),negativeRotate180:"".concat(t.value,"-negative-rotate-180")};return e}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Nr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function gu(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Nr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Nr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function pu(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var sr=He({name:"TEllipsis",props:{content:{type:[String,Function]},default:{type:[String,Function]},tooltipContent:{type:[String,Number,Function]},placement:String,attach:[String,Function],tooltipProps:Object,zIndex:Number,overlayClassName:String,classPrefix:{type:String,default:"t"}},setup:function(e){var a=W(),n=W(!1),r=W(!1),o=N(function(){return["".concat(e.classPrefix,"-table__ellipsis"),"".concat(e.classPrefix,"-text-ellipsis")]}),l=N(function(){return["".concat(e.classPrefix,"-table__ellipsis-content"),e.overlayClassName]});pt(function(){r.value=Pa(a.value)});var i=function(){!a.value||(r.value=Pa(a.value),n.value=!0)},u=function(){!a.value||(r.value=Pa(a.value))},s=ir(function(v){v.type==="mouseleave"?u():i()},80);return{flag:n,root:a,isOverflow:r,ellipsisClasses:o,innerEllipsisClassName:l,onMouseAround:s}},render:function(){var e=Hl(this,"default","content"),a=k("div",{ref:"root",class:this.ellipsisClasses,onMouseenter:this.onMouseAround,onMouseleave:this.onMouseAround,style:{textOverflow:this.isOverflow?"ellipsis":"clip"}},[e]),n=null,r=this.tooltipProps;if(this.isOverflow&&this.flag){var o=gu({content:this.tooltipContent||function(){return e},destroyOnClose:!0,zIndex:this.zIndex,attach:this.attach,placement:this.placement,overlayClassName:r!=null&&r.overlayClassName?this.innerEllipsisClassName.concat(r.overlayClassName):this.innerEllipsisClassName},r);n=k(Zo,o,pu(a)?a:{default:function(){return[a]}})}else n=a;return n}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Mr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Br(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Mr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function bu(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}function Ea(t,e,a){var n={col:e,colIndex:a};return Re(e.title)?e.title(Ye,n):Lt(e.title)&&t[e.title]?t[e.title](n):Re(e.render)&&e.render(Ye,Br(Br({},n),{},{type:"title",row:{},rowIndex:-1}))||e.title}function il(t){var e=it(),a=e.tableSortClasses,n=e.tableFilterClasses,r=N(function(){return fu(t.columns)}),o=N(function(){return hu(t.columns)}),l=N(function(){return o.value.length>1}),i=function(s,v,d,p,b,w){var y=Pe(s,3),R=y[0],C=y[1],O=y[2],S=z(z({},a.sortable,C),n.filterable,O),D=Re(p)?p(Ye,{col:v,colIndex:d}):void 0,j=Boolean(p!==void 0?p:v.ellipsis);return k("div",{class:S},[k("div",{class:a.title},[j?k(sr,{placement:"bottom",attach:t.attach||(b?function(){return b}:void 0),tooltipContent:D&&function(){return D},tooltipProps:vt(p)==="object"?p:void 0,classPrefix:w==null?void 0:w.classPrefix,overlayClassName:w==null?void 0:w.ellipsisOverlayClassName},bu(R)?R:{default:function(){return[R]}}):k("div",null,[R]),Boolean(C||O)&&k("div",{class:n.iconWrap},[C,O])])])};return{thList:o,isMultipleHeader:l,spansAndLeafNodes:r,renderTitleWidthIcon:i}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function zr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function mu(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?zr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):zr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var wu=80,yu=600,Hr=8;function Cu(t){var e=t.isWidthOverflow,a=t.tableContentRef,n=t.showColumnShadow,r=t.getThWidthList,o=t.updateThWidthList,l=t.setTableElmWidth,i=t.updateTableAfterColumnResize,u=t.onColumnResizeChange,s=W(),v=W({}),d=W([]),p,b;pt(function(){var m=typeof document<"u";p=m?document.onselectstart:null,b=m?document.ondragstart:null});var w=function(h,g,c){for(var f=g;h[f]&&h[f].resizable===!1;)c==="next"?f+=1:f-=1;return h[f]},y=function(h,g){!h||(d.value=h,h.forEach(function(c,f){var x=w(h,f-1,"prev"),E=w(h,f+1,"next"),L=g?v.value[g.colKey].prev:E,K=g?v.value[g.colKey].next:x,B=f===0?L:x,$=f===h.length-1?K:E;v.value[c.colKey]={prev:B,next:$,current:{prevSibling:w(h,f-1,"prev"),nextSibling:w(h,f+1,"next")}},y(c.children,c)}))},R={isDragging:!1,draggingCol:null,draggingStart:0,effectCol:"next"},C=Xn({display:"none",height:"10px",left:"10px",bottom:"0"}),O=function(h){return h.fixed==="right"&&n.right},S=function(h,g){if(!(!s.value||R.isDragging||!h.target)){var c=h.target.closest("th"),f=c.getAttribute("data-colkey");if(!!d.value.find(function(X){return X.colKey===f})){var x=c.getBoundingClientRect(),E=x.right-h.pageX<=Hr,L=h.pageX-x.left<=Hr,K=O(g);if(E||K){var B,$=(B=g.resizable)!==null&&B!==void 0?B:!0;if($){c.style.cursor=E||K&&L?"col-resize":"";var Y=E&&!K||K&&L;R.draggingCol=Y?c:c.nextElementSibling,R.effectCol="next";return}}else if(L){var ee=c.previousElementSibling;if(ee){var ae,ne,Q=(ae=v.value[g.colKey])===null||ae===void 0?void 0:ae.prev,M=(ne=Q==null?void 0:Q.resizable)!==null&&ne!==void 0?ne:!0;if(M){c.style.cursor="col-resize",R.draggingCol=ee,R.effectCol="prev";return}}}c.style.cursor="",R.draggingCol=null,R.effectCol=null}}},D=function(h){var g,c,f=Io(h.minWidth)?h.minWidth:parseInt(h.minWidth||"0",10);return{minColWidth:Math.max(((g=h.resize)===null||g===void 0?void 0:g.minWidth)||wu,f),maxColWidth:((c=h.resize)===null||c===void 0?void 0:c.maxWidth)||yu}},j=function(h,g,c,f){var x=c.right-f.left,E=c.left-f.left,L=R.effectCol==="next"?h:g,K=D(L),B=K.minColWidth,$=K.maxColWidth;return{resizeLinePos:x,minResizeLineLeft:E+B,maxResizeLineLeft:E+$}},A=function(h,g,c,f,x){var E=f.left-x.left,L=h.dataset.colkey===g.colKey?g:c,K=f.left-x.left,B=D(L),$=B.minColWidth,Y=B.maxColWidth;return{resizeLinePos:E,minResizeLineLeft:K+(f.width-Y),maxResizeLineLeft:K+(f.width-$)}},P=function(h,g){var c=h.left-g.left,f=h.left-g.left;return{resizeLinePos:c,minResizeLineLeft:f,maxResizeLineLeft:f}},F=function(h){var g=0;return d.value.forEach(function(c){g+=h[c.colKey]}),g},T=function(h,g,c,f){var x=!0;if(g){var E=D(g),L=E.minColWidth,K=E.maxColWidth,B=h[g.colKey]+c;x=B<L||B>K}return!(x||e.value||f===d.value.length-1)},I=function(h,g,c,f){return g?j(h,g,c,f):P(c,f)},_=function(h,g,c){var f,x,E;if(!!R.draggingCol){var L=R.draggingCol,K=L.getBoundingClientRect(),B=(f=a.value)===null||f===void 0?void 0:f.getBoundingClientRect(),$=(x=v.value[g.colKey])===null||x===void 0?void 0:x.next,Y=(E=v.value[g.colKey])===null||E===void 0?void 0:E.prev,ee=O(g)?A(L,g,$,K,B):I(g,$,K,B),ae=ee.resizeLinePos,ne=ee.minResizeLineLeft,Q=ee.maxResizeLineLeft;if(R.isDragging=!0,R.draggingStart=h.x,s!=null&&s.value){C.display="block",C.height="".concat(B.bottom-K.top,"px"),C.left="".concat(ae,"px");var M=a.value.parentElement.getBoundingClientRect();C.bottom="".concat(M.bottom-B.bottom,"px")}var X=function(){var fe;if(!!R.isDragging){var he=ae-parseFloat(C.left)||0,Le=r("calculate"),We=(fe=v.value[g.colKey])===null||fe===void 0?void 0:fe.current;if(!!We){var qe=R.effectCol==="next"?We.nextSibling:We.prevSibling,Ne=mu({},Le),nt=g.resizable!==!1?g:qe,ut=R.effectCol==="next"?We.nextSibling:g,st=T(Ne,ut,he,c);R.effectCol==="next"?O(g)?L.dataset.colkey!==g.colKey?Ne[$.colKey]+=he:Ne[nt.colKey]+=he:(Ne[nt.colKey]-=he,st&&(Ne[$.colKey]+=he)):R.effectCol==="prev"&&(st&&(Ne[nt.colKey]+=he),Y&&(Ne[Y.colKey]-=he)),o(Ne);var Tt=F(Ne);l(Math.round(Tt)),i(),R.isDragging=!1,R.draggingCol=null,R.effectCol=null,L.style.cursor="",C.display="none",C.left="0",Se(document,"mouseup",X),Se(document,"mousemove",q),document.onselectstart=p,document.ondragstart=b,u==null||u({columnsWidth:Ne})}}},q=function(fe){if(R.isDragging){var he=ae+fe.x-R.draggingStart;C.left="".concat(Math.min(Math.max(he,ne),Q),"px")}};Te(document,"mouseup",X),Te(document,"mousemove",q),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1}}};return{resizeLineRef:s,resizeLineStyle:C,onColumnMouseover:S,onColumnMousedown:_,setEffectColMap:y}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function xu(){}var Su=xu,Ka=$l,Ou=Su,Ru=Lo,Eu=1/0,_u=Ka&&1/Ru(new Ka([,-0]))[1]==Eu?function(t){return new Ka(t)}:Ou,Du=_u,Tu=Ao,Pu=zo,Au=Ho,ju=jo,Fu=Du,Ku=Lo,Iu=200;function Lu(t,e,a){var n=-1,r=Pu,o=t.length,l=!0,i=[],u=i;if(a)l=!1,r=Au;else if(o>=Iu){var s=e?null:Fu(t);if(s)return Ku(s);l=!1,r=ju,u=new Tu}else u=e?[]:i;e:for(;++n<o;){var v=t[n],d=e?e(v):v;if(v=a||v!==0?v:0,l&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;e&&u.push(d),i.push(v)}else r(u,d,a)||(u!==i&&u.push(d),i.push(v))}return i}var ku=Lu,Nu=Zi,Mu=Gl,Wr=ku;function Bu(t,e,a){var n=t.length;if(n<2)return n?Wr(t[0]):[];for(var r=-1,o=Array(n);++r<n;)for(var l=t[r],i=-1;++i<n;)i!=r&&(o[r]=Nu(o[r]||l,t[i],e,a));return Wr(Mu(o,1),e,a)}var zu=Bu,Hu=Ul,Wu=Vl,$u=zu,Vu=Yl,Uu=Xl,Xu=Wu(function(t){var e=Uu(t);return e=typeof e=="function"?e:void 0,$u(Hu(t,Vu),void 0,e)}),Gu=Xu;function $r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function gn(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?$r(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):$r(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function cr(t,e,a,n){var r=a==null?void 0:a.get(t.colKey||e);if(!r)return{};var o=z(z(z(z({},n.left,t.fixed==="left"),n.right,t.fixed==="right"),n.lastLeft,t.fixed==="left"&&r.lastLeftFixedCol),n.firstRight,t.fixed==="right"&&r.firstRightFixedCol),l={left:t.fixed==="left"?"".concat(r.left,"px"):void 0,right:t.fixed==="right"?"".concat(r.right,"px"):void 0};return{style:l,classes:o}}function Yu(t,e,a,n,r,o){var l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;if(!n||!n.length)return{style:void 0,classes:void 0};var i=e<n[0],u=e>a-1-n[1],s=a-n[1],v=(r==null?void 0:r.get(t))||{},d=z(z(z(z({},o.top,i),o.bottom,u),o.firstBottom,e===s),o.withoutBorderBottom,e===s-1),p={top:i?"".concat(v.top-l,"px"):void 0,bottom:u?"".concat(v.bottom+l,"px"):void 0};return{style:p,classes:d}}function qu(t,e,a,n){var r=Ie(t),o=r.columns,l=r.tableLayout,i=r.tableContentWidth,u=r.fixedRows,s=r.firstFullRow,v=r.lastFullRow,d=r.maxHeight,p=r.headerAffixedTop,b=r.footerAffixedBottom,w=r.bordered,y=r.resizable,R=r.allowResizeColumnWidth,C=W([]),O=W(),S=W(),D=W(!1),j=W(!1),A=W(),P=W(6),F=W(new Map),T=Xn({left:!1,right:!1}),I=W({left:0,top:0}),_=W(0),m=W(0),h=W({}),g=W(!1),c=W(!1),f=W(!1),x=N(function(){var re,V;return(re=(V=R.value)!==null&&V!==void 0?V:y.value)!==null&&re!==void 0?re:!1}),E=N(function(){var re;return!(t.headerAffixedTop||t.footerAffixedBottom||t.horizontalScrollAffixedBottom||((re=t.scroll)===null||re===void 0?void 0:re.type)==="virtual")});function L(re){A.value=re}function K(re){for(var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],J=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,te=arguments.length>4?arguments[4]:void 0,le=0,ge=re.length;le<ge;le++){var pe,ue=re[le];["left","right"].includes(ue.fixed)&&(g.value=!0),ue.fixed==="right"&&(c.value=!0),ue.fixed==="left"&&(f.value=!0);var we=ue.colKey||le,Ee={col:ue,parent:te,index:le};V.set(we,Ee),(pe=ue.children)!==null&&pe!==void 0&&pe.length&&K(ue.children,V,G,J+1,Ee),G[J]?G[J].push(Ee):G[J]=[Ee]}return{newColumnsMap:V,levelNodes:G}}var B=function(V,G){for(var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=0,le=V.length;te<le;te++){var ge,pe=V[te];if(pe.fixed==="right")return;for(var ue=G.get(pe.colKey||te),we=te-1;we>=0&&V[we].fixed!=="left";)we-=1;var Ee=V[we],Ae=te===0&&(J==null?void 0:J.left)||0,Me=G.get((Ee==null?void 0:Ee.colKey)||te-1);ue&&(ue.left=((Me==null?void 0:Me.left)||Ae)+((Me==null?void 0:Me.width)||0)),(ge=pe.children)!==null&&ge!==void 0&&ge.length&&B(pe.children,G,ue)}},$=function(V,G){for(var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=V.length-1;te>=0;te--){var le,ge=V[te];if(ge.fixed==="left")return;for(var pe=G.get(ge.colKey||te),ue=te+1;ue<V.length&&V[ue].fixed!=="right";)ue+=1;var we=V[ue],Ee=te===V.length-1&&(J==null?void 0:J.right)||0,Ae=G.get((we==null?void 0:we.colKey)||te+1);pe&&(pe.right=((Ae==null?void 0:Ae.right)||Ee)+((Ae==null?void 0:Ae.width)||0)),(le=ge.children)!==null&&le!==void 0&&le.length&&$(ge.children,G,pe)}},Y=function(V,G){if(!!V){for(var J=0,te=V.length;J<te;J++)for(var le=V[J].children,ge=0,pe=le.length;ge<pe;ge++){var ue,we=le[ge],Ee=we.dataset.colkey;Ee||ze.warn("TDesign Table","".concat(we.innerText," missing colKey. colKey is required for fixed column feature."));var Ae=G.get(Ee||ge);Ae!=null&&(ue=Ae.col)!==null&&ue!==void 0&&ue.fixed&&G.set(Ee,gn(gn({},Ae),{},{width:we.getBoundingClientRect().width}))}B(o.value,G),$(o.value,G)}},ee=function(V,G,J,te){for(var le=u.value||[],ge=Pe(le,2),pe=ge[0],ue=ge[1],we=t.data,Ee=t.rowKey,Ae=Ee===void 0?"id":Ee,Me=0;Me<pe;Me++){var Pt=V[Me],Bt=H(we[Me],Ae),at=G.get(Bt)||{},zt=H(we[Me-1],Ae),yt=G.get(zt)||{},fn=0;Me===0&&(fn=(J==null?void 0:J.getBoundingClientRect().height)||0),at.top=(yt.top||fn)+(yt.height||0),G.set(Bt,gn(gn({},at),{},{height:(Pt==null?void 0:Pt.getBoundingClientRect().height)||0}))}for(var Ct=we.length-1;Ct>=we.length-ue;Ct--){var xt=V[V.length-(we.length-Ct)],ye=H(we[Ct],Ae),de=G.get(ye)||{},Fe=H(we[Ct+1],Ae),Je=G.get(Fe)||{},Xe=0;Ct===we.length-1&&(Xe=(te==null?void 0:te.getBoundingClientRect().height)||0),de.bottom=(Je.bottom||Xe)+(Je.height||0),G.set(ye,gn(gn({},de),{},{height:(xt==null?void 0:xt.getBoundingClientRect().height)||0}))}},ae=function(V,G){if(F.value.clear(),!!V){var J=V.querySelector("thead");J&&Y(J.children,G);var te=V.querySelector("tbody"),le=V.querySelector("tfoot");te&&ee(te.children,G,J,le),F.value=G}},ne,Q=function(V,G){if(!(!g.value||!V)){var J=V.scrollLeft;if(!(ne===J&&(!G||!G.skipScrollLimit))){ne=J;var te=V.clientWidth+J<V.scrollWidth,le=J>0;T.left===le&&T.right===te||(T.left=le&&f.value,T.right=te&&c.value)}}},M=function(V){for(var G=0;G<V.length;G++)for(var J=V[G],te=0,le=J.length;te<le;te++){var ge=J[te],pe=J[te+1],ue=ge.parent,we=!ue||(ue==null?void 0:ue.lastLeftFixedCol);we&&ge.col.fixed==="left"&&(pe==null?void 0:pe.col.fixed)!=="left"&&(ge.lastLeftFixedCol=!0);var Ee=J[te-1],Ae=!ue||(ue==null?void 0:ue.firstRightFixedCol);Ae&&ge.col.fixed==="right"&&(Ee==null?void 0:Ee.col.fixed)!=="right"&&(ge.firstRightFixedCol=!0)}},X=function(){var V=K(o.value),G=V.newColumnsMap,J=V.levelNodes;M(J);var te=setTimeout(function(){var le;(g.value||(le=u.value)!==null&&le!==void 0&&le.length)&&ae(S.value,G),clearTimeout(te)},0);return function(){clearTimeout(te)}},q=function(){var V=setTimeout(function(){if(!!S.value){D.value=S.value.scrollHeight>S.value.clientHeight,j.value=S.value.scrollWidth>S.value.clientWidth;var G=S.value.getBoundingClientRect();I.value={top:G.top,left:G.left},clearTimeout(V)}},0)},Z=function(V){m.value!==V&&(m.value=V)},fe=function(){var V,G,J=(V=S.value)===null||V===void 0?void 0:V.getBoundingClientRect();if(!!J){var te=D.value?P.value:0;_.value=J.width-te-(t.bordered?1:0);var le=A==null||(G=A.value)===null||G===void 0?void 0:G.getBoundingClientRect();le!=null&&le.width&&Z(le.width)}},he=function(){var V,G,J,te,le,ge,pe,ue;(V=n.paginationAffixRef.value)===null||V===void 0||(G=V.handleScroll)===null||G===void 0||G.call(V),(J=n.horizontalScrollAffixRef.value)===null||J===void 0||(te=J.handleScroll)===null||te===void 0||te.call(J),(le=n.headerTopAffixRef.value)===null||le===void 0||(ge=le.handleScroll)===null||ge===void 0||ge.call(le),(pe=n.footerBottomAffixRef.value)===null||pe===void 0||(ue=pe.handleScroll)===null||ue===void 0||ue.call(pe)},Le=function(V){for(var G={},J=0,te=V.length;J<te;J++)for(var le=V[J].children,ge=0,pe=le.length;ge<pe;ge++){var ue=le[ge],we=ue.dataset.colkey;G[we]=ue.getBoundingClientRect().width}return G},We=function(V){if(V instanceof HTMLCollection){if(x.value)return;h.value=Le(V)}else h.value=h.value||{},Object.entries(V).forEach(function(G){var J=Pe(G,2),te=J[0],le=J[1];h.value[te]=le});return h.value},qe=function(){var V=setTimeout(function(){var G;if(fe(),!E.value){var J=(G=S.value)===null||G===void 0?void 0:G.querySelector("thead");!J||(We(J.children),clearTimeout(V))}},0)},Ne=function(){h.value={}},nt=function(V){var G,J,te;(G=t.onScrollX)===null||G===void 0||G.call(t,{e:V}),(J=t.onScrollY)===null||J===void 0||J.call(t,{e:V}),(te=t.onScroll)===null||te===void 0||te.call(t,{e:V})},ut=function(V){if(V==="calculate"){var G,J=(G=S.value)===null||G===void 0||(G=G.querySelector("thead"))===null||G===void 0?void 0:G.children;return J?Le(J):{}}return h.value||{}};ce([C,o,w,l,i,D,j,g,u,s,v],X,{immediate:!0}),ce([g,o],function(){var re=setTimeout(function(){g.value&&Q(S.value),clearTimeout(re)},0)},{immediate:!0}),ce([d,C,o,w,S],function(){S.value&&q()},{immediate:!0}),ce(a,function(){Ne()}),ce([C,w,l,u,D,p,b,i],function(){var re=setTimeout(function(){qe(),he(),clearTimeout(re)},60)},{immediate:!0}),ce([a],function(re,V){var G=Pe(re,1),J=G[0],te=Pe(V,1),le=te[0],ge=J.map(function(at){return at.colKey}),pe=le.map(function(at){return at.colKey});if(ge.length<pe.length){var ue=Gu(pe,ge),we=ut("calculate"),Ee=0;ue.forEach(function(at){Ee+=we[at]});var Ae=xn(we,pe),Me=Object.values(Ae).reduce(function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,zt=arguments.length>1?arguments[1]:void 0;return at+zt}),Pt=S.value.clientWidth,Bt=Me-Ee;Z(Math.max(Pt,Bt))}});var st=function(){qe(),q(),he(),(g.value||D.value)&&(X(),Q(S.value,{skipScrollLimit:!0})),l.value==="auto"&&We(ut("calculate"))},Tt=ir(function(){st()},30),je=null;function Dn(re){typeof window>"u"||Ua()<11||typeof window.ResizeObserver>"u"||(Se(window,"resize",Tt),je=new window.ResizeObserver(function(){var V=setTimeout(function(){st(),clearTimeout(V)},200)}),je.observe(re),O.value=re)}pt(function(){var re=Wl();P.value=re,qe();var V=g.value||D.value||!E.value||!C.value.length,G=typeof window<"u",J=G&&typeof window.ResizeObserver<"u";(V&&Ua()<11||!J)&&Te(window,"resize",Tt)}),Ra(function(){var re,V;typeof window<"u"&&Se(window,"resize",Tt),(re=je)===null||re===void 0||re.unobserve(O.value),(V=je)===null||V===void 0||V.disconnect()});var Tn=function(V){C.value=V},Pn=function(){X(),q()};return{tableWidth:_,tableElmWidth:m,thWidthList:h,isFixedHeader:D,isWidthOverflow:j,tableContentRef:S,isFixedColumn:g,showColumnShadow:T,rowAndColFixedPosition:F,virtualScrollHeaderPos:I,scrollbarWidth:P,setData:Tn,refreshTable:st,setTableElmWidth:Z,emitScrollEvent:nt,updateThWidthListHandler:qe,updateColumnFixedShadow:Q,setUseFixedTableElmRef:L,getThWidthList:ut,updateThWidthList:We,addTableResizeObserver:Dn,updateTableAfterColumnResize:Pn}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Vr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Ju(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Vr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function Zu(t,e){var a=Ie(t),n=a.pagination,r=a.data,o=a.disableDataPage,l=gt(),i=l.classPrefix,u=W(t.pagination),s=W([]),v=W(!1),d=function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10,R=t.data,C=Boolean(!o.value&&R.length>y);if(v.value=C,C){var O=(w-1)*y,S=w*y;s.value=R.slice(O,S)}else s.value=R};ce(function(){var b,w;return[(b=n.value)===null||b===void 0?void 0:b.current,(w=n.value)===null||w===void 0?void 0:w.pageSize,r.value.length,o]},function(){if(!(!n.value||!n.value.current)){var b=n.value,w=b.current,y=b.pageSize;u.value={current:w,pageSize:y},d(n.value.current,n.value.pageSize)}},{immediate:!0}),ce([r],function(){var b,w;if(!(!n.value||!n.value.defaultCurrent)){var y=Boolean(n.value.current);y||d((b=u.value.current)!==null&&b!==void 0?b:n.value.defaultCurrent,(w=u.value.pageSize)!==null&&w!==void 0?w:n.value.defaultPageSize)}},{immediate:!0});var p=function(){if(!t.pagination)return null;var w=Ju({},t.pagination);return delete w.onChange,k("div",{class:"".concat(i.value,"-table__pagination")},[k(fi,Ke(w,{onChange:function(R){var C,O,S;(C=t.pagination)===null||C===void 0||(O=C.onChange)===null||O===void 0||O.call(C,R),u.value=R,d(R.current,R.pageSize),(S=t.onPageChange)===null||S===void 0||S.call(t,R,s.value)}}),{totalContent:e.slots.totalContent})])};return{isPaginateData:v,dataSource:s,innerPagination:u,renderPagination:p}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Qu(t){var e=W(),a=W(),n=W(),r=W(),o=W(),l=W(!0),i=W(!0),u=W(!0),s=!1,v=!1,d=N(function(){return t.scroll&&t.scroll.type==="virtual"&&(t.scroll.threshold||100)<t.data.length}),p=N(function(){return!!(t.headerAffixedTop||t.footerAffixedBottom||t.horizontalScrollAffixedBottom)}),b=0,w=function(M){if(!(!p.value&&!d.value)){var X=M;if(!X&&e.value&&(b=0,X=e.value),!!X){var q=X.scrollLeft;if(b!==q){b=q;for(var Z=[e.value,a.value,n.value,r.value],fe=0,he=Z.length;fe<he;fe++)Z[fe]&&M!==Z[fe]&&(Z[fe].scrollLeft=q)}}}},y=function(M,X,q){return X.top+q<M.top&&M.top>M.height},R=function(M){return ql(M)?0:M.offsetTop||0},C=function(){var M,X,q;if(!(!p.value&&!d.value)){var Z=(M=e.value)===null||M===void 0?void 0:M.getBoundingClientRect(),fe=(X=e.value)===null||X===void 0||(X=X.querySelector("thead"))===null||X===void 0?void 0:X.getBoundingClientRect(),he=(fe==null?void 0:fe.height)||0,Le=(q=n.value)===null||q===void 0?void 0:q.getBoundingClientRect();if((t.headerAffixedTop||d.value)&&a.value){var We=R(t.headerAffixProps||t.headerAffixedTop),qe=(Le==null?void 0:Le.height)||0,Ne=Math.abs(Z.top)<Z.height-he-We-qe;d.value&&(Ne=Z.top>-1*fe.height),l.value=Ne}if(t.footerAffixedBottom&&n!==null&&n!==void 0&&n.value)i.value=y(Le,Z,he);else if(t.horizontalScrollAffixedBottom&&r!==null&&r!==void 0&&r.value){var nt=r.value.getBoundingClientRect();i.value=y(nt,Z,he)}if(t.paginationAffixedBottom&&o.value){var ut=o.value.getBoundingClientRect();u.value=y(ut,Z,he)}}},O=function(){C()},S=function(){w(n.value)},D=function(){w(a.value)},j=function(){w(r.value)},A=function(){w(e.value)},P=function(){Te(n.value,"scroll",S)},F=function(){Se(n.value,"scroll",S)},T=function(){Te(a.value,"scroll",D),x()},I=function(){s||Se(a.value,"scroll",D),E()},_=function(){Te(r.value,"scroll",j)},m=function(){Se(r.value,"scroll",j)},h=function(){Te(e.value,"scroll",A),x()},g=function(){s||Se(e.value,"scroll",A),E()},c=function(){s=!0},f=function(){s=!1,v||(Se(a.value,"scroll",D),Se(e.value,"scroll",A))},x=function(){v=!0},E=function(){v=!1},L=[],K=function(M){var X=ir(function(he){Se(M,"scroll",he)},200);function q(){w(M),X(q)}function Z(he){he.composedPath().includes(M)&&(L.forEach(function(Le){return Le()}),L.length=0,Te(M,"scroll",q),X(q),L.push(function(){Se(M,"scroll",q)}))}Te(M,"touchstart",Z);function fe(){Se(M,"touchstart",Z)}return{removeElementTouchScrollListener:fe}},B=[],$=function(){B.forEach(function(M){return M()}),B.length=0},Y=function(){Se(window,"mousedown",c),Se(window,"mouseup",f),$(),a.value&&(Se(a.value,"mouseenter",T),Se(a.value,"mouseleave",I)),n.value&&(Se(n.value,"mouseenter",P),Se(n.value,"mouseleave",F)),e.value&&(Se(e.value,"mouseenter",h),Se(e.value,"mouseleave",g)),r.value&&(Se(r.value,"mouseenter",_),Se(r.value,"mouseleave",m))},ee=function(){if(Te(window,"mousedown",c),Te(window,"mouseup",f),Y(),a.value){Te(a.value,"mouseenter",T),Te(a.value,"mouseleave",I);var M=K(a.value),X=M.removeElementTouchScrollListener;B.push(X)}if(t.footerAffixedBottom&&n.value){Te(n.value,"mouseenter",P),Te(n.value,"mouseleave",F);var q=K(n.value),Z=q.removeElementTouchScrollListener;B.push(Z)}if(t.horizontalScrollAffixedBottom&&r.value){Te(r.value,"mouseenter",_),Te(r.value,"mouseleave",m);var fe=K(r.value),he=fe.removeElementTouchScrollListener;B.push(he)}if((p.value||d.value)&&e.value){Te(e.value,"mouseenter",h),Te(e.value,"mouseleave",g);var Le=K(e.value),We=Le.removeElementTouchScrollListener;B.push(We)}},ae=function(){if(!(!p.value&&!t.paginationAffixedBottom))var M=setTimeout(function(){p.value||t.paginationAffixedBottom?Te(document,"scroll",O):Se(document,"scroll",O),clearTimeout(M)})};ce([a,n,r,e],function(){ee(),w(),C()}),ce(p,ae),ce(function(){return[t.data,t.columns,t.headerAffixedTop,t.footerAffixedBottom,t.horizontalScrollAffixedBottom]},function(){w()}),Ra(function(){Se(document,"scroll",O),Y(),a.value=null,n.value=null,r.value=null,e.value=null});var ne=function(M){e.value=M,ae()};return{showAffixHeader:l,showAffixFooter:i,showAffixPagination:u,affixHeaderRef:a,affixFooterRef:n,horizontalScrollbarRef:r,paginationRef:o,onHorizontalScroll:w,setTableContentRef:ne,updateAffixHeaderOrFooter:C}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function dr(t,e){if(!!t){for(var a=t instanceof Array?t:[t],n={},r=0;r<a.length;r++){var o=a[r];if(!!o){var l=Re(o)?o(e):o;n=l instanceof Array?dr(l,e):Object.assign(n,l)}}return n}}function vr(t,e,a){for(var n=t instanceof Array?t:[t],r=e.row,o=e.rowIndex,l=[],i=0,u=n.length;i<u;i++){var s=n[i],v=Re(s)?s(e):s;if(Xa(v)&&!(v instanceof Array)){v[o]&&(v=v[o]);var d=H(r,a||"id");v[d]&&(v=v[d])}else v instanceof Array&&(v=vr(v,e,a));l=l.concat(v)}return l}function Ja(t,e){for(var a=t instanceof Array?t:[t],n=[],r=0,o=a.length;r<o;r++){var l=a[r];Re(l)?n.push(l(e)):n.push(l)}return n}function ul(t,e){if(!(!t||!e)){var a=t==null?void 0:t.find(function(i){return i.colKey===e});if(a)return a;for(var n=0,r=t.length;n<r;n++){var o;if((o=t[n])!==null&&o!==void 0&&(o=o.children)!==null&&o!==void 0&&o.length){var l;return ul((l=t[n])===null||l===void 0?void 0:l.children,e)}}}}function Qn(t,e){return vt(t)==="object"?t:vt(e)==="object"?e:{}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function es(t,e,a){var n=N(function(){return Math.max(a.rowHeight||48,48)}),r=W(!1),o=N(function(){return(a==null?void 0:a.type)==="lazy"&&!r.value}),l=!Jl&&window.requestAnimationFrame||function(u){return setTimeout(u,16.6)},i=function(){r.value||l(function(){r.value=!0})};return pt(function(){(a==null?void 0:a.type)==="lazy"&&Gt(function(){var u=Math.max(10,a.bufferSize||10),s=n.value*u;!(e!=null&&e.value)||!(t!=null&&t.value)||Vo(e.value,t.value,i,s)})}),{hasLazyLoadHolder:o,tRowHeight:n}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Vn(t,e,a,n){var r=H(t,e);return r===void 0&&ze.error("Table","rowKey is wrong, can not get unique identifier of row."),[r,a||n].join("_")}function sl(t,e,a,n){var r=W(new Map),o=function(u,s){var v=u.rowIndex,d=u.colIndex;if(!(!s.rowspan&&!s.colspan)){for(var p=v+(s.rowspan||1),b=d+(s.colspan||1),w=v;w<p;w++)for(var y=d;y<b;y++)if(w!==v||y!==d){if(!t.value[w]||!e.value[y])return;var R=Vn(t.value[w],a.value,e.value[y].colKey,y),C=r.value.get(R)||{};C.skipped=!0,r.value.set(R,C)}}},l=function(u,s,v){var d;if((d=r.value)===null||d===void 0||d.clear(),!(!u||!v))for(var p=0,b=u.length;p<b;p++)for(var w=u[p],y=0,R=s.length;y<R;y++){var C=s[y],O={row:w,col:C,rowIndex:p,colIndex:y},S=Vn(w,a.value,C.colKey,y),D=r.value.get(S)||{},j=v(O)||{};(j.rowspan||j.colspan||D.rowspan||D.colspan)&&(j.rowspan&&(D.rowspan=j.rowspan),j.colspan&&(D.colspan=j.colspan),r.value.set(S,D)),o==null||o(O,D)}};return ce(function(){return[t.value,e.value,n]},function(){l(t.value,e.value,n==null?void 0:n.value)},{immediate:!0}),{skipSpansMap:r}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ur(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ot(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ur(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ur(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function ts(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var cl=["rowKey","rowClassName","columns","fixedRows","footData","rowAttributes","rowspanAndColspan","scroll","cellEmptyContent","pagination","attach","onCellClick","onRowClick","onRowDblclick","onRowMouseover","onRowMousedown","onRowMouseenter","onRowMouseleave","onRowMouseup"],dl=["click","dblclick","mouseover","mousedown","mouseenter","mouseleave","mouseup"];function ma(t,e,a){var n=t.col,r=t.row,o=t.rowIndex;if(n.colKey==="serial-number"){var l=(a==null?void 0:a.pagination)||{},i=l.current,u=l.pageSize,s=l.defaultCurrent,v=l.defaultPageSize,d=i||s,p=u||v;return p&&d?p*(d-1)+o+1:o+1}if(Re(n.cell))return n.cell(Ye,t);if(e[n.colKey])return e[n.colKey](t);if(Lt(n.cell)&&e[n.cell])return e[n.cell](t);if(Re(n.render))return n.render(Ye,ot(ot({},t),{},{type:"cell"}));var b=H(r,n.colKey);return[void 0,"",null].includes(b)?a!=null&&a.cellEmptyContent?Re(a.cellEmptyContent)?a.cellEmptyContent(Ye,t):a.cellEmptyContent:e.cellEmptyContent?e.cellEmptyContent(t):e["cell-empty-content"]?e["cell-empty-content"](t):b:b}var ns=He({name:"TR",props:ot(ot({row:Object,rowIndex:Number,dataLength:Number,ellipsisOverlayClassName:String,classPrefix:String,rowAndColFixedPosition:Map,skipSpansMap:Map,virtualConfig:Object,active:Boolean,isHover:Boolean},xn(Rn,cl)),{},{tableElm:{},tableContentElm:{}}),emits:["row-mounted"],setup:function(e,a){var n=Ie(e),r=n.tableContentElm,o=n.active,l=n.isHover,i=W(null),u=it(),s=u.tdEllipsisClass,v=u.tableBaseClass,d=u.tableColFixedClasses,p=u.tableRowFixedClasses,b=u.tdAlignClasses,w=u.tableDraggableClasses,y=N(function(){return Yu(H(e.row,e.rowKey||"id"),e.rowIndex,e.dataLength,e.fixedRows,e.rowAndColFixedPosition,p,e.virtualConfig.isVirtualScroll.value?e.virtualConfig.translateY.value:0)}),R=N(function(){return dr(e.rowAttributes,{row:e.row,rowIndex:e.rowIndex,type:"body"})||{}}),C=N(function(){var T,I=vr(e.rowClassName,{row:e.row,rowIndex:e.rowIndex,type:"body"},e.rowKey||"id");return[(T=y.value)===null||T===void 0?void 0:T.classes,I,z(z({},"".concat(e.classPrefix,"-table__row--active"),o.value),"".concat(e.classPrefix,"-table__row--hover"),l.value)].filter(function(_){return _})}),O=es(r,i,Xn(ot(ot({},e.scroll),{},{rowIndex:e.rowIndex}))),S=O.hasLazyLoadHolder,D=O.tRowHeight,j=function(I,_){var m={};return dl.forEach(function(h){m["on".concat(br(h))]=function(g){var c,f={e:g,row:I,index:_};(c=e["onRow".concat(br(h))])===null||c===void 0||c.call(e,f)}}),m},A=function(){var I;(I=e.virtualConfig)!==null&&I!==void 0&&I.isVirtualScroll.value&&a.emit("row-mounted",{ref:i,data:e.row})};pt(function(){Gt(function(){A()})}),di(function(){Gt(function(){A()})});function P(T,I){var _=I.cellNode,m=T.col,h=T.colIndex,g;Re(m.ellipsis)?g=m.ellipsis(Ye,T):vt(m.ellipsis)==="object"&&Re(m.ellipsis.content)?g=m.ellipsis.content(Ye,T):a.slots["ellipsis-".concat(m.colKey)]?g=a.slots["ellipsis-".concat(m.colKey)](T):a.slots.ellipsis&&(g=a.slots.ellipsis(T));var c={};vt(m.ellipsis)==="object"&&(c="props"in m.ellipsis?m.ellipsis.props:m.ellipsis||void 0);var f=e.tableElm,x=h===0?"top-left":"top";return x=h===e.columns.length-1?"top-right":x,k(sr,{placement:x,attach:f?function(){return f}:void 0,tooltipContent:g&&function(){return g},tooltipProps:c,overlayClassName:e.ellipsisOverlayClassName,classPrefix:e.classPrefix},ts(_)?_:{default:function(){return[_]}})}function F(T,I){var _=T.col,m=T.colIndex,h=T.rowIndex,g=I.cellSpans,c=I.dataLength,f=I.rowAndColFixedPosition,x=ma(T,a.slots,{cellEmptyContent:I.cellEmptyContent,pagination:e.pagination}),E=cr(_,m,f,d),L=Ja(_.className,ot(ot({},T),{},{type:"td"})),K=[E.classes,L,z(z(z(z(z({},s,_.ellipsis),v.tdLastRow,h+g.rowspan===c),v.tdFirstCol,m===0&&e.rowspanAndColspan),b[_.align],_.align&&_.align!=="left"),w.handle,_.colKey==="drag")],B=function(ae){var ne,Q=ot(ot({},T),{},{e:ae});_.stopPropagation&&ae.stopPropagation(),(ne=e.onCellClick)===null||ne===void 0||ne.call(e,Q)},$=Re(_.attrs)?_.attrs(ot(ot({},T),{},{type:"td"})):_.attrs,Y=ot(ot({},$),g);return k("td",Ke({key:_.colKey||m,class:K,style:E.style},Y,{onClick:B}),[_.ellipsis?P(T,{cellNode:x}):x])}return function(){var T,I=e.columns,_=e.skipSpansMap,m=e.row,h=e.dataLength,g=e.rowAndColFixedPosition,c=I==null?void 0:I.map(function(f,x){var E={},L={row:m,col:f,rowIndex:e.rowIndex,colIndex:x},K=null;if(e.skipSpansMap.size){var B,$,Y=Vn(m,e.rowKey,f.colKey,x);if(K=_.get(Y)||{},((B=K)===null||B===void 0?void 0:B.rowspan)>1&&(E.rowspan=K.rowspan),(($=K)===null||$===void 0?void 0:$.colspan)>1&&(E.colspan=K.colspan),K.skipped)return null}return F(L,{dataLength:h,rowAndColFixedPosition:g,columnLength:I.length,cellSpans:E,cellEmptyContent:e.cellEmptyContent})});return k("tr",Ke({ref:i},R.value,{style:(T=y.value)===null||T===void 0?void 0:T.style,class:C.value},j(m,e.rowIndex)),[S.value?[k("td",{style:{height:"".concat(D.value,"px"),border:"none"}},null)]:c])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Xr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ea(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Xr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Xr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var vl=["bordered","rowKey","rowClassName","rowAttributes","loading","empty","fixedRows","firstFullRow","lastFullRow","rowspanAndColspan","scroll","cellEmptyContent","pagination","attach","onCellClick","onPageChange","onRowClick","onRowDblclick","onRowMouseover","onRowMousedown","onRowMouseenter","onRowMouseleave","onRowMouseup","onScroll","onScrollX","onScrollY"],as=He({name:"TBody",props:ea({classPrefix:String,data:Array,columns:Array,ellipsisOverlayClassName:String,rowAndColFixedPosition:Map,showColumnShadow:Object,tableElm:{},tableWidth:Number,isWidthOverflow:Boolean,virtualConfig:Object,tableContentElm:{},handleRowMounted:Function,renderExpandedRow:Function,firstFullRow:[String,Function],lastFullRow:[String,Function],activeRow:[Array],hoverRow:[String,Number]},xn(Rn,vl)),setup:function(e){var a=Yt(),n=Ie(e),r=n.data,o=n.columns,l=n.rowKey,i=n.rowspanAndColspan,u=gt("table",e.locale),s=u.t,v=u.globalConfig,d=it(),p=d.tableFullRowClasses,b=d.tableBaseClass,w=sl(r,o,l,i),y=w.skipSpansMap,R=N(function(){return[b.body]});return{t:s,globalConfig:v,renderTNode:a,tableFullRowClasses:p,tbodyClasses:R,tableBaseClass:b,skipSpansMap:y}},render:function(){var e=this,a,n,r,o,l=function(O){var S=e.bordered?e.tableWidth-2:e.tableWidth;return k("tr",{class:[e.tableBaseClass.emptyRow,z({},e.tableFullRowClasses.base,e.isWidthOverflow)]},[k("td",{colspan:O.length},[k("div",{class:[e.tableBaseClass.empty,z({},e.tableFullRowClasses.innerFullRow,e.isWidthOverflow)],style:e.isWidthOverflow?{width:"".concat(S,"px")}:{}},[e.renderTNode("empty")||e.t(e.globalConfig.empty)])])])},i=function(O,S){var D=Zl(S),j=e.renderTNode(D);if(["",null,void 0,!1].includes(j))return null;var A=e.isWidthOverflow&&e.columns.find(function(T){return T.fixed==="left"}),P=[e.tableFullRowClasses.base,e.tableFullRowClasses[D]],F=e.bordered?e.tableWidth-2:e.tableWidth;return k("tr",{class:P,key:"key-full-row-".concat(S)},[k("td",{colspan:O},[k("div",{class:z({},e.tableFullRowClasses.innerFullRow,A),style:A?{width:"".concat(F,"px")}:{}},[k("div",{class:e.tableFullRowClasses.innerFullElement},[j])])])])},u=this.columns.length,s=(a=this.data)===null||a===void 0?void 0:a.length,v=[],d=["classPrefix","ellipsisOverlayClassName","rowAndColFixedPosition","scroll","tableElm","tableContentElm","pagination","attach"],p=this.virtualConfig.isVirtualScroll.value?this.virtualConfig.visibleData.value:this.data;p==null||p.forEach(function(C,O){var S,D=e.rowKey||"id",j=H(C,D),A=ea(ea({},xn(e.$props,cl)),{},{rowKey:D,row:C,columns:e.columns,rowIndex:C.VIRTUAL_SCROLL_INDEX||O,dataLength:s,skipSpansMap:e.skipSpansMap,virtualConfig:e.virtualConfig,active:(S=e.activeRow)===null||S===void 0?void 0:S.includes(j),isHover:e.hoverRow===j},xn(e.$props,d));e.onCellClick&&(A.onCellClick=e.onCellClick);var P=k(ns,Ke({key:H(C,e.rowKey||"id")||O},A,{onRowMounted:e.handleRowMounted}),e.$slots);if(v.push(P),e.renderExpandedRow){var F={row:C,index:O,columns:e.columns,tableWidth:e.tableWidth,isWidthOverflow:e.isWidthOverflow},T=e.renderExpandedRow(F);T&&v.push(T)}});var b=[i(u,"first-full-row")].concat(v,[i(u,"last-full-row")]),w=!((n=this.data)!==null&&n!==void 0&&n.length)&&!this.loading&&!this.firstFullRow&&!this.lastFullRow,y="translateY(".concat((r=this.virtualConfig)===null||r===void 0?void 0:r.translateY.value,"px)"),R=(o=this.virtualConfig)!==null&&o!==void 0&&o.isVirtualScroll.value?{transform:y,"-ms-transform":y,"-moz-transform":y,"-webkit-transform":y}:void 0;return k("tbody",{class:this.tbodyClasses,style:ea({},R)},[w?l(this.columns):b])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Nn(t){return t&&(isNaN(Number(t))?t:"".concat(t,"px"))}function fl(t){var e=Ie(t),a=e.size,n=e.bordered,r=e.stripe,o=e.hover,l=e.verticalAlign,i=e.height,u=e.maxHeight,s=e.tableContentWidth,v=it(),d=v.tableBaseClass,p=v.tableAlignClasses,b=pi(),w=b.sizeClassNames,y=gt("table",t.locale),R=y.globalConfig,C=N(function(){var j;return(j=a.value)!==null&&j!==void 0?j:R.value.size}),O=N(function(){return[d.table,z(z(z(z(z(z(z(z({},w[C.value],C.value!=="medium"),d.bordered,n.value),d.striped,r.value),d.hover,o.value),d.loading,t.loading),d.affixedHeader,t.headerAffixedTop),d.rowspanAndColspan,t.rowspanAndColspan),p[l.value],l.value!=="middle")]}),S=N(function(){return{height:Nn(i.value),maxHeight:Nn(u.value)}}),D=N(function(){return{width:Nn(s.value)}});return{tableClasses:O,sizeClassNames:w,tableElementStyles:D,tableContentStyles:S}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Gr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Rt(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Gr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Gr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function rs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var Yr=He({name:"THead",props:{classPrefix:String,ellipsisOverlayClassName:String,isFixedHeader:Boolean,thDraggable:Boolean,maxHeight:[String,Number],height:[String,Number],rowAndColFixedPosition:Map,thWidthList:Object,bordered:Boolean,isMultipleHeader:Boolean,resizable:Boolean,attach:[String,Function],spansAndLeafNodes:Object,thList:Array,columnResizeParams:Object,showColumnShadow:Object},setup:function(e,a){var n=a.slots,r=W(),o=it(),l=o.tableHeaderClasses,i=o.tableBaseClass,u=N(function(){return[l.header,z(z(z({},l.fixed,Boolean(e.maxHeight||e.height)),i.bordered,e.bordered&&e.isMultipleHeader),l.multipleHeader,e.isMultipleHeader)]}),s=N(function(){for(var d={},p=e.thList[0],b=0,w=p.length;b<w;b++){var y=p[b];if(y.colspan>1)for(var R=b+1;R<b+y.colspan;R++)p[R]&&(d[p[R].colKey]=!0)}return d}),v=function(p){for(var b=p;b;){var w;if(b=b.parentNode,(w=b)!==null&&w!==void 0&&(w=w.classList)!==null&&w!==void 0&&w.contains("".concat(e.classPrefix,"-table")))break}return b};return Rt(Rt({},o),{},{colspanSkipMap:s,theadClasses:u,theadRef:r,slots:n,getTableNode:v})},render:function(){var e=this,a=function(r,o){var l=new Map,i=e.spansAndLeafNodes.rowspanAndColspanMap;return e.thList.map(function(u,s){var v=u.map(function(d,p){var b;if(e.colspanSkipMap[d.colKey])return null;var w=i.get(d);if(p===0&&w.rowspan>1)for(var y=s+1;y<s+w.rowspan;y++)l.set(e.thList[y][0],!0);var R=cr(d,p,r,e.tableColFixedClasses),C={col:d,colIndex:p,row:{},rowIndex:-1},O=Ja(d.className,Rt(Rt({},C),{},{type:"th"})),S=Ja(d.thClassName,Rt(Rt({},C),{},{type:"th"})),D=e.showColumnShadow.left&&d.fixed==="left",j=e.showColumnShadow.right&&d.fixed==="right",A=e.thDraggable&&!(D||j),P=[R.classes,O,S,z(z(z(z({},e.tableHeaderClasses.thBordered,l.get(d)),"".concat(e.classPrefix,"-table__th-").concat(d.colKey),d.colKey),e.tdAlignClasses[d.align],d.align&&d.align!=="left"),e.tableDraggableClasses.dragSortTh,A)],F=!((b=d.children)!==null&&b!==void 0&&b.length),T=F&&o!==null&&o!==void 0&&o[d.colKey]?"".concat(o==null?void 0:o[d.colKey],"px"):void 0,I=Rt(Rt({},R.style||{}),{},{width:T}),_=Ea(e.slots,d,p),m=e.resizable||!A?{onMousedown:function(x){if(e.resizable){var E,L;(E=e.columnResizeParams)===null||E===void 0||(L=E.onColumnMousedown)===null||L===void 0||L.call(E,x,d,p)}if(!A)var K=setTimeout(function(){var B,$=e.theadRef.querySelectorAll("th");(B=$[p])===null||B===void 0||B.removeAttribute("draggable"),clearTimeout(K)},10)},onMousemove:function(x){var E,L;e.resizable&&((E=e.columnResizeParams)===null||E===void 0||(L=E.onColumnMouseover)===null||L===void 0||L.call(E,x,d))}}:{},h=Re(d.ellipsisTitle)?d.ellipsisTitle(Ye,{col:d,colIndex:p}):void 0,g=d.ellipsisTitle!==void 0?Boolean(d.ellipsisTitle):Boolean(d.ellipsis),c=(Re(d.attrs)?d.attrs(Rt(Rt({},C),{},{type:"th"})):d.attrs)||{};return d.colspan>1&&(c.colspan=d.colspan),k("th",Ke({key:d.colKey,"data-colkey":d.colKey,class:P,style:I},c,w,m),[k("div",{class:e.tableBaseClass.thCellInner},[g?k(sr,{placement:"bottom",attach:e.attach||(e.theadRef?function(){return e.getTableNode(e.theadRef)}:void 0),tooltipContent:h&&function(){return h},tooltipProps:vt(d.ellipsisTitle)==="object"?d.ellipsisTitle:void 0,overlayClassName:e.ellipsisOverlayClassName,classPrefix:e.classPrefix},rs(_)?_:{default:function(){return[_]}}):_])])});return k("tr",{key:s},[v])})};return k("thead",{ref:"theadRef",class:this.theadClasses},[a(this.rowAndColFixedPosition,this.thWidthList)])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function qr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ta(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?qr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):qr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Jr=He({name:"TFoot",props:{rowKey:String,isFixedHeader:Boolean,rowAndColFixedPosition:Map,footData:Array,columns:Array,rowAttributes:[Array,Object,Function],rowClassName:[Array,String,Object,Function],thWidthList:[Object],footerSummary:[String,Function],rowspanAndColspanInFooter:Function,virtualScroll:Boolean},setup:function(e,a){var n=Yt(),r=it(),o=Ie(e),l=o.footData,i=o.columns,u=o.rowKey,s=o.rowspanAndColspanInFooter,v=sl(l,i,u,s),d=v.skipSpansMap,p=function(w){var y=w.col,R=w.row;return Re(y.foot)?y.foot(Ye,w):Lt(y.foot)&&a.slots[y.foot]?a.slots[y.foot](w)||y.foot:y.foot||H(R,y.colKey)};return ta(ta({skipSpansMap:d},r),{},{renderTFootCell:p,renderTNode:n})},render:function(){var e,a=this;if(!this.columns)return null;var n=[this.tableFooterClasses.footer,z({},this.tableFooterClasses.fixed,this.isFixedHeader)],r=(e=this.footData)===null||e===void 0?void 0:e.map(function(l,i){var u=dr(a.rowAttributes,{row:l,rowIndex:i,type:"foot"}),s=vr(a.rowClassName,{row:l,rowIndex:i,type:"foot"},a.rowKey||"id");return k("tr",Ke(u,{key:i,class:s}),[a.columns.map(function(v,d){var p,b={},w=null;if(a.skipSpansMap.size){var y,R,C=Vn(l,a.rowKey,v.colKey,d);if(w=a.skipSpansMap.get(C)||{},((y=w)===null||y===void 0?void 0:y.rowspan)>1&&(b.rowspan=w.rowspan),((R=w)===null||R===void 0?void 0:R.colspan)>1&&(b.colspan=w.colspan),w.skipped)return null}var O=cr(v,d,a.rowAndColFixedPosition,a.tableColFixedClasses),S=ta({},O.style);return(p=a.thWidthList)!==null&&p!==void 0&&p[v.colKey]&&(S.width="".concat(a.thWidthList[v.colKey],"px")),k("td",Ke(ta({key:v.colKey},b),{class:O.classes,style:S}),[a.renderTFootCell({row:l,rowIndex:i,col:v,colIndex:d})])})])}),o=this.renderTNode("footerSummary");return!o&&(!this.footData||!this.footData.length)?null:k("tfoot",{ref:"tFooterRef",class:n,style:{visibility:this.virtualScroll?"hidden":"visible"}},[o&&k("tr",{class:this.tableFullRowClasses.base},[k("td",{colspan:this.columns.length},[k("div",{class:this.tableFullRowClasses.innerFullElement},[o])])]),r])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function os(t,e){var a=Ie(t),n=a.data,r=a.activeRowType,o=a.activeRowKeys,l=a.defaultActiveRowKeys,i=a.disableSpaceInactiveRow,u=W(-1),s=W(!1),v=W(!1),d=W(-1),p=kt(o,l.value,t.onActiveChange,"activeRowKeys"),b=Pe(p,2),w=b[0],y=b[1],R=function(h){var g=h.row,c=h.index,f=H(g,t.rowKey);if(r.value==="single"){var x=w.value.length>1?[f]:[];y(x,{type:"inactive",activeRowList:[{row:g,rowIndex:c}],currentRowData:g})}else if(r.value==="multiple"){for(var E=w.value.filter(function(Y){return Y!==f}),L=[],K=0,B=n.value.length;K<B;K++){var $=n.value[K];E.includes(H($,t.rowKey))&&L.push({row:$,rowIndex:K})}y(E,{type:"inactive",activeRowList:L,currentRowData:g})}},C=function(h){var g=h.row,c=H(g,t.rowKey);if(r.value==="single")y([c],{activeRowList:[{row:g,rowIndex:h.index}],currentRowData:g,type:"active"});else{for(var f=w.value.concat(c),x=[],E=0,L=n.value.length;E<L;E++){var K=n.value[E];f.includes(H(K,t.rowKey))&&x.push({row:K,rowIndex:E})}y(f,{activeRowList:x,currentRowData:g,type:"active"})}},O=function(h){document.getSelection().removeAllRanges();for(var g=h.row,c=u.value,f=Math.min(d.value,c),x=Math.max(d.value,c),E=[],L=f;L<=x;L++)E.push({row:n.value[L],rowIndex:L});var K=E.map(function(B){return H(B.row,t.rowKey)});y(K,{activeRowList:E,type:"active",currentRowData:g})},S=function(){for(var h=[],g=0,c=n.value.length;g<c;g++){var f=n.value[g],x=H(f,t.rowKey);w.value.includes(x)&&h.push({row:f,rowIndex:g})}return h},D=function(h,g){if(!!r.value){var c=h.row,f=h.index,x=H(c,t.rowKey);s.value?(u.value=f,O(h),v.value=!0):w.value.includes(x)&&(g==null?void 0:g.action)!=="active"?i.value||(R(h),u.value=f):(C(h),u.value=f)}},j=function(){var h;y([],{activeRowList:[],currentRowData:void 0,type:"inactive"}),(h=t.onActiveRowAction)===null||h===void 0||h.call(t,{action:"clear",activeRowList:[]}),u.value=-1},A=function(){var h,g=n.value.map(function(f){return H(f,t.rowKey)}),c=n.value.map(function(f,x){return{row:f,rowIndex:x}});y(g,{activeRowList:c,currentRowData:void 0,type:"active"}),(h=t.onActiveRowAction)===null||h===void 0||h.call(t,{action:"select-all",activeRowList:c}),u.value=-1},P=function(){v.value=!1},F=function(h){var g,c=h.code||((g=h.key)===null||g===void 0?void 0:g.trim());if(Uo.test(c)){h.preventDefault();var f=Math.min(n.value.length-1,u.value+1);r.value==="single"?D({row:n.value[f],index:f,e:h},{action:"active"}):u.value=f}else if(Xo.test(c)){h.preventDefault();var x=Math.max(0,u.value-1);r.value==="single"?D({row:n.value[x],index:x,e:h},{action:"active"}):u.value=x}else if(Ga.test(c)){h.preventDefault();var E=u.value;if(v.value){var L;(L=t.onActiveRowAction)===null||L===void 0||L.call(t,{action:"shift-area-selection",activeRowList:S()})}else if(!i.value)D({row:n.value[E],index:E,e:h});else{var K;(K=t.onActiveRowAction)===null||K===void 0||K.call(t,{action:"space-one-selection",activeRowList:S()})}}else yr.test(c)?(s.value=!0,d.value=u.value):Go.test(c)||Yo.test(c)?(j(),P()):qo.test(c)&&A();Ga.test(c)||P()},T=function(h){var g,c=h.code||((g=h.key)===null||g===void 0?void 0:g.trim());yr.test(c)&&(s.value=!1)},I=function(){Te(e.value,"keydown",F),Te(e.value,"keyup",T)},_=function(){Se(e.value,"keydown",F),Se(e.value,"keyup",T)};return{tActiveRow:w,onHighlightRow:D,addHighlightKeyboardListener:I,removeHighlightKeyboardListener:_}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ls(t,e){var a=Ie(t),n=a.hover,r=a.data,o=a.activeRowType,l=a.keyboardRowHover,i=a.disableSpaceInactiveRow,u=W(),s=W(-1),v=N(function(){return o.value==="single"?!1:o.value==="multiple"?!0:n.value||l.value}),d=function(C,O){var S=H(C.row,t.rowKey);u.value===S&&(O==null?void 0:O.action)!=="hover"?i.value||(u.value=void 0):u.value=S,s.value=C.index},p=function(){u.value=void 0,s.value=-1},b=function(C){var O;if(!!v.value){var S=C.code||((O=C.key)===null||O===void 0?void 0:O.trim());if(Uo.test(S)){C.preventDefault();var D=Math.min(r.value.length-1,s.value+1);d({row:r.value[D],index:D,e:C},{action:"hover"})}else if(Xo.test(S)){C.preventDefault();var j=Math.max(0,s.value-1);d({row:r.value[j],index:j,e:C},{action:"hover"})}else if(Ga.test(S)&&t.activeRowType!=="multiple"){var A=s.value;if(d({row:r.value[A],index:A,e:C}),!t.activeRowType){var P;(P=t.onActiveRowAction)===null||P===void 0||P.call(t,{action:"space-one-selection",activeRowList:[{row:r.value[A],rowIndex:A}]})}}else if(Go.test(S)&&!t.activeRowType){var F;u.value=void 0,(F=t.onActiveRowAction)===null||F===void 0||F.call(t,{action:"clear",activeRowList:[]})}else if(qo.test(S)&&!t.activeRowType){var T;(T=t.onActiveRowAction)===null||T===void 0||T.call(t,{action:"select-all",activeRowList:[]})}else if(Yo.test(S)&&!t.activeRowType){var I;(I=t.onActiveRowAction)===null||I===void 0||I.call(t,{action:"clear",activeRowList:[]})}}},w=function(){Te(e.value,"keydown",b)},y=function(){Se(e.value,"keydown",b)};return{hoverRow:u,needKeyboardRowHover:v,clearHoverRow:p,addRowHoverKeyboardListener:w,removeRowHoverKeyboardListener:y}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function is(t,e){var a=W(),n=W(!0),r=function(){if(!(!e.value||!t.value||a.value)){n.value=!1;var l=Vo(t.value,null,function(){n.value=!0},10);a.value=l}};return pt(r),e.value&&ce([e,t],r),Ra(function(){var o,l;!e.value||(o=a.value)===null||o===void 0||(l=o.unobserve)===null||l===void 0||l.call(o,t.value)}),{showElement:n}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Zr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Qe(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Zr(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function Qr(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var us=["page-change","cell-click","scroll","scrollX","scrollY"];dl.map(function(t){return"row-".concat(t)}).concat(us);var hl=He({name:"TBaseTable",props:Qe(Qe({},Rn),{},{renderExpandedRow:Function,onLeafColumnsChange:Function,thDraggable:Boolean}),emits:["show-element-change"],setup:function(e,a){var n=Ie(e),r=n.lazyLoad,o=Yt(),l=W(),i=W(),u=W(),s=W(),v=W(0),d=it(),p=d.classPrefix,b=d.virtualScrollClasses,w=d.tableLayoutClasses,y=d.tableBaseClass,R=d.tableColFixedClasses,C=fl(e),O=C.tableClasses,S=C.sizeClassNames,D=C.tableContentStyles,j=C.tableElementStyles,A=gt("table",e.locale),P=A.globalConfig,F=il(e),T=F.isMultipleHeader,I=F.spansAndLeafNodes,_=F.thList,m=N(function(){var be;return((be=I.value)===null||be===void 0?void 0:be.leafColumns)||e.columns}),h=N(function(){var be;return(be=e.size)!==null&&be!==void 0?be:P.value.size}),g=is(l,r),c=g.showElement,f=W(),x=W(),E=W(),L=W(),K=qu(e,a,m,{paginationAffixRef:f,horizontalScrollAffixRef:x,headerTopAffixRef:E,footerBottomAffixRef:L}),B=K.scrollbarWidth,$=K.virtualScrollHeaderPos,Y=K.tableWidth,ee=K.tableElmWidth,ae=K.tableContentRef,ne=K.isFixedHeader,Q=K.isWidthOverflow,M=K.isFixedColumn,X=K.thWidthList,q=K.showColumnShadow,Z=K.rowAndColFixedPosition,fe=K.setData,he=K.refreshTable,Le=K.setTableElmWidth,We=K.emitScrollEvent,qe=K.setUseFixedTableElmRef,Ne=K.updateColumnFixedShadow,nt=K.getThWidthList,ut=K.updateThWidthList,st=K.addTableResizeObserver,Tt=K.updateTableAfterColumnResize,je=Qu(e),Dn=je.affixHeaderRef,Tn=je.affixFooterRef,Pn=je.horizontalScrollbarRef,re=je.paginationRef,V=je.showAffixHeader,G=je.showAffixFooter,J=je.showAffixPagination,te=je.onHorizontalScroll,le=je.setTableContentRef,ge=je.updateAffixHeaderOrFooter,pe=Zu(e,a),ue=pe.dataSource,we=pe.innerPagination,Ee=pe.isPaginateData,Ae=pe.renderPagination,Me=Cu({isWidthOverflow:Q,tableContentRef:ae,showColumnShadow:q,getThWidthList:nt,updateThWidthList:ut,setTableElmWidth:Le,updateTableAfterColumnResize:Tt,onColumnResizeChange:e.onColumnResizeChange}),Pt=Me.resizeLineRef,Bt=Me.resizeLineStyle,at=Me.setEffectColMap,zt=N(function(){return[O.value,z(z(z(z(z(z(z(z({},y.headerFixed,ne.value),y.columnFixed,M.value),y.widthOverflow,Q.value),y.multipleHeader,T.value),R.leftShadow,q.left),R.rightShadow,q.right),y.columnResizableTable,e.resizable),"".concat(p,"-table__row--active-").concat(e.activeRowType),e.activeRowType)]}),yt=N(function(){return[[w[e.tableLayout]]]}),fn=N(function(){return e.bordered&&ne.value&&(T.value&&Q.value||!T.value)}),Ct=N(function(){var be,me;if(!e.bordered)return 0;var De=(be=s.value)===null||be===void 0?void 0:be.getBoundingClientRect(),Ge=(me=re.value)===null||me===void 0?void 0:me.getBoundingClientRect();return((De==null?void 0:De.height)||0)+((Ge==null?void 0:Ge.height)||0)}),xt=os(e,l),ye=xt.tActiveRow,de=xt.onHighlightRow,Fe=xt.addHighlightKeyboardListener,Je=xt.removeHighlightKeyboardListener,Xe=ls(e,l),bt=Xe.hoverRow,Jt=Xe.needKeyboardRowHover,qn=Xe.clearHoverRow,Zt=Xe.addRowHoverKeyboardListener,Qt=Xe.removeRowHoverKeyboardListener;ce(i,function(){qe(i.value)}),ce(function(){return[e.data,ue]},function(){fe(Ee.value?ue.value:e.data)}),ce(I,function(){var be;(be=e.onLeafColumnsChange)===null||be===void 0||be.call(e,I.value.leafColumns),at(I.value.leafColumns,null)},{immediate:!0});var en=function(){Gt(function(){te(),ge()})},Ht=$o(function(){ut(nt("calculate"))}),Wt=N(function(){return{data:e.data,scroll:Qe(Qe({},e.scroll),{},{fixedRows:e.fixedRows})}}),Ce=hi(ae,Wt),$t=-1,tn=function(me){var De=me.target||me.srcElement,Ge=De.scrollTop;$t!==Ge?Ce.isVirtualScroll.value&&Ce.handleScroll():($t=-1,Ne(De)),$t=Ge,We(me),e.tableLayout==="auto"&&Ht()},hn=function(){var me;!i.value||(v.value=(me=i.value.querySelector("tfoot"))===null||me===void 0?void 0:me.getBoundingClientRect().height)},nn=function(me){if(!!ae.value){for(var De=ae.value.querySelector('th[data-colkey="'.concat(me,'"]')),Ge=ae.value.querySelectorAll("th.t-table__cell--fixed-left"),At=0,an=0,Jn=Ge.length;an<Jn;an++)At+=Ge[an].getBoundingClientRect().width;var Il=De.getBoundingClientRect(),Ll=ae.value.getBoundingClientRect(),kl=Il.left-Ll.left-At;ae.value.scrollTo({left:kl,behavior:"smooth"})}};ce(ae,function(){le(ae.value),e.tableLayout==="auto"&&Ht()}),ce(function(){return[i.value,e.footData,e.footerSummary,e.columns]},function(){var be=setTimeout(function(){hn(),clearTimeout(be)},0)}),ce(l,function(be){st(be)}),pt(function(){hn(),le(ae.value),st(l.value)});var St=function(){e.activeRowType&&Fe(),Jt.value&&Zt()},Ot=function(){e.activeRowType&&Je(),Jt.value&&Qt()},Da=function(me){var De;(De=e.onRowClick)===null||De===void 0||De.call(e,me),e.activeRowType&&de(me),Jt.value&&qn()};ce([c],function(be){var me=Pe(be,1),De=me[0];a.emit("show-element-change",De)},{immediate:!0});var Ta=N(function(){return Ee.value?ue.value:e.data}),An=function(me){var De=me.index;if(!De&&De!==0){var Ge;if(!me.key){ze.error("Table","scrollToElement: one of `index` or `key` must exist.");return}De=(Ge=Ta.value)===null||Ge===void 0?void 0:Ge.findIndex(function(At){return H(At,e.rowKey)===me.key}),De<0&&ze.error("Table","".concat(me.key," does not exist in data, check `rowKey` or `data` please."))}Ce.scrollToElement(Qe(Qe({},me),{},{index:De-1}))};return{thList:_,classPrefix:p,innerPagination:we,globalConfig:P,tableFootHeight:v,virtualScrollHeaderPos:$,tableSize:h,tableWidth:Y,tableElmWidth:ee,tableRef:l,tableElmRef:i,sizeClassNames:S,tableBaseClass:y,spansAndLeafNodes:I,dynamicBaseTableClasses:zt,tableContentStyles:D,tableElementStyles:j,dividerBottom:Ct,virtualScrollClasses:b,tableLayoutClasses:w,tableElmClasses:yt,tableContentRef:ae,isFixedHeader:ne,isWidthOverflow:Q,isFixedColumn:M,rowAndColFixedPosition:Z,showColumnShadow:q,thWidthList:X,isPaginateData:Ee,dataSource:ue,affixHeaderRef:Dn,affixFooterRef:Tn,bottomContentRef:s,paginationRef:re,showAffixHeader:V,showAffixFooter:G,scrollbarWidth:B,isMultipleHeader:T,showRightDivider:fn,resizeLineRef:Pt,resizeLineStyle:Bt,columnResizeParams:Me,horizontalScrollbarRef:Pn,tableBodyRef:u,virtualConfig:Ce,showAffixPagination:J,tActiveRow:ye,hoverRow:bt,showElement:c,scrollToElement:An,renderPagination:Ae,renderTNode:o,onFixedChange:en,onHorizontalScroll:te,updateAffixHeaderOrFooter:ge,onInnerVirtualScroll:tn,refreshTable:he,scrollColumnIntoView:nn,onTableFocus:St,onTableBlur:Ot,onInnerRowClick:Da,paginationAffixRef:f,horizontalScrollAffixRef:x,headerTopAffixRef:E,footerBottomAffixRef:L}},render:function(){var e,a,n=this,r,o,l,i,u,s;if(!this.showElement)return k("div",{ref:"tableRef"},null);var v=this.rowAndColFixedPosition,d=this.tableLayout,p=this.isPaginateData?this.dataSource:this.data,b=((e=this.spansAndLeafNodes)===null||e===void 0?void 0:e.leafColumns)||this.columns,w=(a=this.allowResizeColumnWidth)!==null&&a!==void 0?a:this.resizable;w&&d==="auto"&&ze.warn("Table","table-layout can not be `auto`, cause you are using column resizable, set `table-layout: fixed` please.");var y=d==="fixed"&&this.isWidthOverflow?"100px":void 0,R=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return k("colgroup",null,[b.map(function(q){var Z={width:Nn((X||w?n.thWidthList[q.colKey]:void 0)||q.width)||y};return q.minWidth&&(Z.minWidth=Nn(q.minWidth)),!Z.width&&!q.minWidth&&n.tableLayout==="fixed"&&(Z.minWidth="80px"),k("col",{key:q.colKey,style:Z},null)})])},C=function(){return n.showHeader===!1?null:!!(n.virtualConfig.isVirtualScroll.value||n.headerAffixedTop)&&(n.headerAffixedTop?k(Zn,Ke({offsetTop:0},Qn(n.headerAffixedTop),{onFixedChange:n.onFixedChange,ref:"headerTopAffixRef"}),Qr(h)?h:{default:function(){return[h]}}):n.isFixedHeader&&h)},O=function(){return k(Zn,Ke({offsetBottom:0},Qn(n.horizontalScrollAffixedBottom),{style:{marginTop:"-".concat(n.scrollbarWidth*2,"px")},horizontalScrollAffixedBottom:!0,ref:"horizontalScrollAffixRef"}),{default:function(){return[k("div",{ref:"horizontalScrollbarRef",class:["scrollbar",n.tableBaseClass.obviousScrollbar],style:{width:"".concat(n.tableWidth,"px"),overflow:"auto",opacity:Number(n.showAffixFooter)}},[k("div",{style:{width:"".concat(n.tableElmWidth,"px"),height:"5px"}},null)])]}})},S={isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:this.rowAndColFixedPosition,isMultipleHeader:this.isMultipleHeader,bordered:this.bordered,maxHeight:this.maxHeight,height:this.height,spansAndLeafNodes:this.spansAndLeafNodes,thList:this.thList,thWidthList:this.thWidthList,resizable:this.resizable,columnResizeParams:this.columnResizeParams,classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",attach:this.attach,showColumnShadow:this.showColumnShadow,thDraggable:this.thDraggable},D=Ua()<=11?4:0,j=this.isWidthOverflow?this.scrollbarWidth:0,A=W((((r=this.affixHeaderRef)===null||r===void 0?void 0:r.getBoundingClientRect().height)||0)-D),P=setTimeout(function(){var M;A.value=(((M=n.affixHeaderRef)===null||M===void 0?void 0:M.getBoundingClientRect().height)||0)-D,clearTimeout(P)},0),F=N(function(){return A.value-j}),T=Rn.headerAffixedTop?Number(this.showAffixHeader):1,I=N(function(){return{width:"".concat(n.tableWidth,"px"),height:"".concat(F.value,"px"),opacity:T}}),_=this.bordered?1:0,m=Boolean((this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)&&this.tableWidth)&&k("div",{ref:"affixHeaderRef",style:{width:"".concat(this.tableWidth-_,"px"),opacity:Number(this.showAffixHeader)},class:["scrollbar",z({},this.tableBaseClass.affixedHeaderElm,this.headerAffixedTop||this.virtualConfig.isVirtualScroll.value)]},[k("table",{class:this.tableElmClasses,style:Qe(Qe({},this.tableElementStyles),{},{width:"".concat(this.tableElmWidth,"px")})},[R(!0),k(Yr,S,this.$slots)])]),h=k("div",{class:this.tableBaseClass.affixedHeaderWrap,style:I.value},[m]),g=this.isWidthOverflow?this.scrollbarWidth:0;this.bordered&&(g+=1);var c=Boolean(this.virtualConfig.isVirtualScroll.value||this.footerAffixedBottom),f=((o=this.footData)===null||o===void 0?void 0:o.length)||this.footerSummary||this.$slots.footerSummary,x=Boolean(c&&f&&this.tableWidth)&&k(Zn,Ke({class:this.tableBaseClass.affixedFooterWrap,onFixedChange:this.onFixedChange,offsetBottom:g||0},Qn(this.footerAffixedBottom),{style:{marginTop:"".concat(-1*(((l=this.tableFootHeight)!==null&&l!==void 0?l:0)+g),"px")},ref:"footerBottomAffixRef"}),{default:function(){return[k("div",{ref:"affixFooterRef",style:{width:"".concat(n.tableWidth-_,"px"),opacity:Number(n.showAffixFooter)},class:["scrollbar",z({},n.tableBaseClass.affixedFooterElm,n.footerAffixedBottom||n.virtualConfig.isVirtualScroll.value)]},[k("table",{class:n.tableElmClasses,style:Qe(Qe({},n.tableElementStyles),{},{width:"".concat(n.tableElmWidth,"px")})},[R(!0),k(Jr,{rowKey:n.rowKey,isFixedHeader:n.isFixedHeader,rowAndColFixedPosition:v,footData:n.footData,columns:b,rowAttributes:n.rowAttributes,rowClassName:n.rowClassName,thWidthList:n.thWidthList,footerSummary:n.footerSummary,rowspanAndColspanInFooter:n.rowspanAndColspanInFooter},n.$slots)])])]}}),E="translate(0, ".concat(this.virtualConfig.scrollHeight.value+((i=this.tableFootHeight)!==null&&i!==void 0?i:0)+((u=A.value)!==null&&u!==void 0?u:0),"px)"),L={transform:E,"-ms-transform":E,"-moz-transform":E,"-webkit-transform":E},K=Qe(Qe({classPrefix:this.classPrefix,ellipsisOverlayClassName:this.tableSize!=="medium"?this.sizeClassNames[this.tableSize]:"",rowAndColFixedPosition:v,showColumnShadow:this.showColumnShadow,data:p,virtualConfig:this.virtualConfig,columns:this.spansAndLeafNodes.leafColumns,tableElm:this.tableRef,tableWidth:this.tableWidth,isWidthOverflow:this.isWidthOverflow,scroll:this.scroll,cellEmptyContent:this.cellEmptyContent,tableContentElm:this.tableContentRef,handleRowMounted:this.virtualConfig.handleRowMounted,renderExpandedRow:this.renderExpandedRow},xn(this.$props,vl)),{},{pagination:this.innerPagination,attach:this.attach,hoverRow:this.hoverRow,activeRow:this.tActiveRow,onRowClick:this.onInnerRowClick}),B=k("div",{ref:"tableContentRef",class:this.tableBaseClass.content,style:this.tableContentStyles,onScroll:this.onInnerVirtualScroll},[this.virtualConfig.isVirtualScroll.value&&k("div",{class:this.virtualScrollClasses.cursor,style:L},null),k("table",{ref:"tableElmRef",class:this.tableElmClasses,style:Qe(Qe({},this.tableElementStyles),{},{width:this.resizable&&this.isWidthOverflow&&this.tableElmWidth?"".concat(this.tableElmWidth,"px"):this.tableElementStyles.width})},[R(!1),this.showHeader&&k(Yr,Qe(Qe({},S),{},{thWidthList:w?this.thWidthList:{}}),this.$slots),k(as,K,this.$slots),k(Jr,{rowKey:this.rowKey,isFixedHeader:this.isFixedHeader,rowAndColFixedPosition:v,footData:this.footData,columns:b,rowAttributes:this.rowAttributes,rowClassName:this.rowClassName,footerSummary:this.footerSummary,rowspanAndColspanInFooter:this.rowspanAndColspanInFooter,virtualScroll:this.virtualConfig.isVirtualScroll.value},this.$slots)])]),$=Re(this.loading)?this.loading:this.$slots.loading,Y=this.loading!==void 0&&k(ko,Ke({loading:!!this.loading,text:$,attach:this.tableRef?function(){return n.tableRef}:void 0,showOverlay:!0,size:"small"},this.loadingProps),null),ee=this.renderTNode("topContent"),ae=this.renderTNode("bottomContent"),ne=k("div",{ref:"paginationRef",class:this.tableBaseClass.paginationWrap,style:{opacity:Number(this.showAffixPagination)}},[this.renderPagination()]),Q=!!ae&&k("div",{ref:"bottomContentRef",class:this.tableBaseClass.bottomContent},[ae]);return k("div",{ref:"tableRef",tabindex:"0",class:this.dynamicBaseTableClasses,onFocus:this.onTableFocus,onBlur:this.onTableBlur},[!!ee&&k("div",{class:this.tableBaseClass.topContent},[ee]),C(),B,x,Y,Q,this.showRightDivider&&k("div",{class:this.tableBaseClass.scrollbarDivider,style:{right:"".concat(this.scrollbarWidth,"px"),bottom:this.dividerBottom?"".concat(this.dividerBottom,"px"):void 0,height:"".concat((s=this.tableContentRef)===null||s===void 0?void 0:s.getBoundingClientRect().height,"px")}},null),this.horizontalScrollAffixedBottom&&O(),this.paginationAffixedBottom?k(Zn,Ke({offsetBottom:0},Qn(this.paginationAffixedBottom),{ref:"paginationAffixRef"}),Qr(ne)?ne:{default:function(){return[ne]}}):ne,k("div",{ref:"resizeLineRef",class:this.tableBaseClass.resizeLine,style:this.resizeLineStyle},null)])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var gl={asyncLoading:{type:[String,Function]},columnController:{type:Object},columnControllerVisible:{type:Boolean,default:void 0},defaultColumnControllerVisible:{type:Boolean,default:void 0},columns:{type:Array,default:function(){return[]}},displayColumns:{type:Array,default:void 0},defaultDisplayColumns:{type:Array},dragSort:{type:String,validator:function(e){return e?["row","row-handler","col","row-handler-col","drag-col"].includes(e):!0}},dragSortOptions:{type:Object},editableCellState:{type:Function},editableRowKeys:{type:Array},expandIcon:{type:[Boolean,Function],default:!0},expandOnRowClick:Boolean,expandedRow:{type:[String,Function]},expandedRowKeys:{type:Array,default:void 0},defaultExpandedRowKeys:{type:Array,default:function(){return[]}},filterIcon:{type:Function},filterRow:{type:[String,Function]},filterValue:{type:Object,default:void 0},defaultFilterValue:{type:Object},hideSortTips:Boolean,indeterminateSelectedRowKeys:{type:Array},multipleSort:Boolean,reserveSelectedRowOnPaginate:{type:Boolean,default:!0},rowSelectionAllowUncheck:Boolean,rowSelectionType:{type:String,validator:function(e){return e?["single","multiple"].includes(e):!0}},selectOnRowClick:Boolean,selectedRowKeys:{type:Array,default:void 0},defaultSelectedRowKeys:{type:Array,default:function(){return[]}},showSortColumnBgColor:Boolean,sort:{type:[Object,Array],default:void 0},defaultSort:{type:[Object,Array]},sortIcon:{type:Function},sortOnRowDraggable:Boolean,onAsyncLoadingClick:Function,onCellClick:Function,onChange:Function,onColumnChange:Function,onColumnControllerVisibleChange:Function,onDataChange:Function,onDisplayColumnsChange:Function,onDragSort:Function,onExpandChange:Function,onFilterChange:Function,onRowEdit:Function,onRowValidate:Function,onSelectChange:Function,onSortChange:Function,onValidate:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function eo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function to(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?eo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):eo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var ss=He({name:"ColumnCheckboxGroup",props:{checkboxProps:Object,options:{type:Array,default:function(){return[]}},label:String,uniqueKey:String,value:Array,onChange:Function},setup:function(e){var a=Ie(e),n=a.checkboxProps,r=a.value,o=a.options,l=It(),i=N(function(){var w=[];return o.value.forEach(function(y){if(vt(y)==="object"){if(y.disabled)return;y.value?w.push(y.value):typeof y.label=="string"&&w.push(y.label)}else w.push(y)}),w}),u=N(function(){return ba(i.value,r.value)}),s=N(function(){var w=u.value.length;return Boolean(w&&i.value.length===w)}),v=N(function(){var w=u.value.length;return Boolean(w<i.value.length&&w)}),d=function(y,R){var C={e:R.e,type:"check",current:void 0,option:void 0};if(y){var O,S=ve(new Set(r.value.concat(i.value)));(O=e.onChange)===null||O===void 0||O.call(e,S,C)}else{var D,j=r.value.filter(function(A){return!i.value.includes(A)});(D=e.onChange)===null||D===void 0||D.call(e,j,to(to({},C),{},{type:"uncheck"}))}},p=function(y,R){var C;(C=e.onChange)===null||C===void 0||C.call(e,y,R)},b=N(function(){return["".concat(l.value,"-table__column-controller-item"),z({},"".concat(l.value,"-table__").concat(e.uniqueKey),e.uniqueKey)]});return function(){return k("div",{class:b.value},[k("div",{class:"".concat(l.value,"-table__column-controller-block")},[k(Ya,{indeterminate:v.value,checked:s.value,onChange:d,disabled:!i.value.length},{default:function(){return[e.label]}})]),k("div",{class:"".concat(l.value,"-table__column-controller-block")},[k(Jo,Ke({options:o.value},n.value,{modelValue:r.value,onChange:p}),null)])])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function no(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Ia(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?no(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):no(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function Za(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set,a=0,n=t.length;a<n;a++){var r,o=t[a];(r=o.children)!==null&&r!==void 0&&r.length?Za(o.children,e):o.colKey&&e.add(o.colKey)}return e}function cs(t,e){var a=gt("table",t.locale),n=a.classPrefix,r=a.globalConfig,o=_n({SettingIcon:zi}),l=o.SettingIcon,i=Ie(t),u=i.columns,s=i.columnController,v=i.displayColumns,d=i.columnControllerVisible,p=W(null),b=Yt(),w=N(function(){var m,h=(((m=s.value)===null||m===void 0?void 0:m.fields)||ve(Za(u.value))).filter(function(g){return g});return new Set(h)}),y=ve(Za(u.value)),R=kt(v,t.defaultDisplayColumns||y,t.onDisplayColumnsChange,"displayColumns"),C=Pe(R,2),O=C[0],S=C[1],D=W(v.value||t.defaultDisplayColumns||y),j=N(function(){var m;if((m=s.value)!==null&&m!==void 0&&(m=m.groupColumns)!==null&&m!==void 0&&m.length)return P(u.value);var h={label:r.value.selectAllText,options:F(u.value)};return[h]});ce([v],function(m){var h=Pe(m,1),g=h[0];D.value=g||t.defaultDisplayColumns||y});function A(m,h){return{label:function(){return Ea(e.slots,m,h)},value:m.colKey,disabled:!w.value.has(m.colKey)}}function P(m){var h,g=(h=s.value)===null||h===void 0?void 0:h.groupColumns;if(!(g!=null&&g.length))return[];var c=[],f=function(E){for(var L=0,K=E.length;L<K;L++){for(var B,$=E[L],Y=A($,L),ee=0,ae=g.length;ee<ae;ee++){var ne,Q=g[ee];!Q.columns.includes($.colKey)||((ne=c[ee])!==null&&ne!==void 0&&(ne=ne.options)!==null&&ne!==void 0&&ne.length?c[ee].options.push(Y):c[ee]=Ia(Ia({},g[ee]),{},{options:[Y]}))}(B=$.children)!==null&&B!==void 0&&B.length&&f($.children)}};return f(m),c}function F(m){var h,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if((h=s.value)!==null&&h!==void 0&&(h=h.groupColumns)!==null&&h!==void 0&&h.length)return[];for(var c=0,f=m.length;c<f;c++){var x,E=m[c];(x=E.children)!==null&&x!==void 0&&x.length?F(E.children,g):E.colKey&&g.push(A(E,c))}return g}var T=function(h,g){var c;D.value=h;var f={columns:h,type:g.type,currentColumn:ul(u.value,String(g.current)),e:g.e};(c=t.onColumnChange)===null||c===void 0||c.call(t,f)},I=function(){var h;if(p.value){p.value.show();return}p.value=Ql.confirm(Ia({header:r.value.columnConfigTitleText,body:function(){var c,f=((c=s.value)===null||c===void 0?void 0:c.displayType)==="fixed-width"?"fixed":"auto",x=s.value||{},E=x.columnControllerTopContent,L=x.columnControllerBottomContent,K=k("div",{class:["".concat(n.value,"-table__column-controller"),"".concat(n.value,"-table__column-controller--").concat(f)]},[k("div",{class:"".concat(n.value,"-table__column-controller-body")},[Re(E)?E(Ye):b("columnControllerTopContent"),r.value.columnConfigDescriptionText&&k("p",{class:"".concat(n.value,"-table__column-controller-desc")},[r.value.columnConfigDescriptionText]),j.value.map(function(B,$){var Y,ee,ae=(Y=s.value)!==null&&Y!==void 0&&(Y=Y.groupColumns)!==null&&Y!==void 0&&Y.length?String(B.value||$):void 0;return k(ss,{key:B.value||$,uniqueKey:ae,value:D.value,label:B.label,options:B.options,onChange:T,checkboxProps:(ee=s.value)===null||ee===void 0?void 0:ee.checkboxProps},null)}),Re(L)?L(Ye):b("columnControllerBottomContent")])]);return K},confirmBtn:r.value.confirmText,cancelBtn:r.value.cancelText,width:612,onConfirm:function(){if(S(ve(D.value)),d.value===void 0)p.value.hide();else{var c;(c=t.onColumnControllerVisibleChange)===null||c===void 0||c.call(t,!1,{trigger:"confirm"}),e.emit("update:columnControllerVisible",!1)}},onClose:function(){if(d.value===void 0)p.value.hide();else{var c;(c=t.onColumnControllerVisibleChange)===null||c===void 0||c.call(t,!1,{trigger:"cancel"}),e.emit("update:columnControllerVisible",!1)}}},((h=s.value)===null||h===void 0?void 0:h.dialogProps)||{}))};ce([d],function(m){var h=Pe(m,1),g=h[0];g!==void 0&&(p.value?g?p.value.show():p.value.hide():g&&I())},{immediate:!0});var _=function(){var h,g=!!(s.value&&Object.keys(s.value).length),c=g?s.value.placement||"top-right":"";if(g&&s.value.hideTriggerButton)return null;var f=["".concat(n.value,"-table__column-controller-trigger"),z({},"".concat(n.value,"-align-").concat(c),!!c)];return k("div",{class:f},[k(pa,Ke({theme:"default",variant:"outline",onClick:I,content:r.value.columnConfigButtonText},(h=t.columnController)===null||h===void 0?void 0:h.buttonProps),{icon:function(){return k(l,null,null)}})])};return{tDisplayColumns:O,columnCheckboxKeys:D,renderColumnController:_}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ds(t,e){var a=Ie(t),n=a.expandedRowKeys,r=Yt(),o=gt("table",t.locale),l=o.t,i=o.globalConfig,u=_n({ChevronRightCircleIcon:_i}),s=u.ChevronRightCircleIcon,v=it(),d=v.tableExpandClasses,p=v.positiveRotate90,b=v.tableFullRowClasses,w=kt(n,t.defaultExpandedRowKeys||[],t.onExpandChange,"expandedRowKeys"),y=Pe(w,2),R=y[0],C=y[1],O=N(function(){return Boolean(t.expandedRow||e.slots.expandedRow||e.slots["expanded-row"])}),S=N(function(){return t.expandIcon!==!1&&O.value}),D=N(function(){var I;return((I=t.columns)===null||I===void 0||(I=I[0])===null||I===void 0?void 0:I.fixed)==="left"}),j=function(_,m){t.expandOnRowClick&&_.stopPropagation();var h=H(m,t.rowKey||"id"),g=R.value.indexOf(h),c=ve(R.value);g!==-1?c.splice(g,1):c.push(h),C(c,{expandedRowData:t.data.filter(function(f){return c.includes(H(f,t.rowKey||"id"))}),currentRowData:m})},A=function(_,m){var h=m.row,g=m.rowIndex,c=H(h,t.rowKey||"id"),f=R.value.includes(c),x=r("expandIcon",{defaultNode:l(i.value.expandIcon)||k(s,null,null),params:{row:h,index:g}});if(!x)return null;var E=[d.iconBox,d[f?"expanded":"collapsed"],z({},p,f)];return k("span",{class:E,onClick:function(K){return j(K,h)}},[x])},P=function(){var _={colKey:"__EXPAND_ROW_ICON_COLUMN__",width:46,className:d.iconCell,fixed:D.value?"left":void 0,cell:A,stopPropagation:!0};return _},F=function(_){var m=H(_.row,t.rowKey||"id");if(!R.value||!R.value.includes(m))return null;var h=_.isWidthOverflow&&t.columns.find(function(g){return g.fixed==="left"});return k("tr",{key:"expand_".concat(m),class:[d.row,z({},b.base,h)]},[k("td",{colspan:_.columns.length},[k("div",{class:[d.rowInner,z({},b.innerFullRow,h)],style:h?{width:"".concat(_.tableWidth,"px")}:{}},[k("div",{class:b.innerFullElement},[r("expandedRow",{params:_})])])])])},T=function(_){j(_.e,_.row)};return{showExpandedRow:O,showExpandIconColumn:S,getExpandColumn:P,renderExpandedRow:F,onInnerExpandRowClick:T}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Qa(t,e,a){if(!t)return!1;var n=Re(t.disabled)?t.disabled({row:e,rowIndex:a}):t.disabled;return t.checkProps&&(Re(t.checkProps)?n=n||t.checkProps({row:e,rowIndex:a}).disabled:t.checkProps==="object"&&(n=n||t.checkProps.disabled)),!!n}function vs(t,e,a){for(var n={},r=0,o=e.length;r<o;r++){var l=H(e[r],a);t.includes(l)&&(n[l]=!0)}return n}function wa(t,e){for(var a=0,n=t.length;a<n;a++){var r;if(t[a].colKey===e)return t[a];if((r=t[a].children)!==null&&r!==void 0&&r.length){var o=wa(t[a].children,e);if(o)return o}}return null}function ao(t,e){for(var a=0,n=t.length;a<n;a++){var r;if(t[a].colKey===e)return a;if((r=t[a].children)!==null&&r!==void 0&&r.length){var o=wa(t[a].children,e);if(o)return a}}return-1}function pl(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=0,n=t.length;a<n;a++){var r,o=t[a];o.filter&&"resetValue"in o.filter&&(e[o.colKey]=o.filter.resetValue),(r=o.children)!==null&&r!==void 0&&r.length&&pl(o.children,e)}return e}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ro(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function na(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?ro(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ro(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function fs(t,e){var a=Ie(t),n=a.selectedRowKeys,r=a.columns,o=a.rowKey,l=a.data,i=a.reserveSelectedRowOnPaginate,u=W(l.value),s=W(),v=kt(n,t.defaultSelectedRowKeys||[],t.onSelectChange,"selectedRowKeys"),d=Pe(v,2),p=d[0],b=d[1],w=W(new Map),y=N(function(){return t.columns.find(function(c){var f=c.type;return["multiple","single"].includes(f)})}),R=N(function(){var c;return t.rowSelectionType||((c=y.value)===null||c===void 0?void 0:c.type)||"single"}),C=N(function(){var c=i.value?l.value:u.value;return c.filter(function(f,x){return!D(f,x)})}),O=N(function(){return ba(p.value,C.value.map(function(c){return H(c,t.rowKey||"id")}))}),S=N(function(){var c;if(t.rowSelectionAllowUncheck)return!0;var f=R.value==="single";return!f||!y.value||!("allowUncheck"in((c=y.value)===null||c===void 0?void 0:c.checkProps))?!1:y.value.checkProps.allowUncheck});ce([l,r,p,y,o],function(){var c,f=function($){return y.value.disabled($)?e.disabled:""},x=(c=y.value)!==null&&c!==void 0&&c.disabled?f:void 0,E=new Set(p.value),L=function($){var Y=$.row,ee=H(Y,t.rowKey||"id");return E.has(ee)?e.selected:""},K=E.size?L:void 0;s.value=[x,K]},{immediate:!0});function D(c,f){return Qa(y.value,c,f)}function j(){return function(){var c=O.value.length>0&&O.value.length<C.value.length,f=O.value.length!==0&&C.value.length!==0&&O.value.length===C.value.length;return k(Ya,{checked:f,indeterminate:c,disabled:!C.value.length,onChange:T},null)}}function A(c){var f=c.col,x=c.row,E=c.rowIndex,L=Re(f.disabled)?f.disabled({row:x,rowIndex:E}):f.disabled,K=Re(f.checkProps)?f.checkProps({row:x,rowIndex:E}):f.checkProps;return{disabled:L||(K==null?void 0:K.disabled),checkProps:K}}function P(c){var f=c.col,x=c.row,E=x===void 0?{}:x,L=p.value.includes(H(E,t.rowKey||"id")),K=A(c),B=K.disabled,$=K.checkProps,Y=na(na({checked:L,disabled:B},$),{},{onClick:function(Q){if(vt(Q)==="object"&&"e"in Q){var M;(M=Q.e)===null||M===void 0||M.stopPropagation()}else Q==null||Q.stopPropagation()},onChange:function(){return F(E)}});if(f.type==="single")return k(du,Y,null);if(f.type==="multiple"){var ee,ae=(ee=t.indeterminateSelectedRowKeys)!==null&&ee!==void 0&&ee.length?t.indeterminateSelectedRowKeys.includes(H(E,t.rowKey)):!1;return k(Ya,Ke({indeterminate:ae},Y),null)}return null}function F(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=ve(p.value),x=t.rowKey||"id",E=H(c,x),L=f.indexOf(E),K=L!==-1;if(R.value==="multiple")K?f.splice(L,1):f.push(E);else if(R.value==="single")f=K&&S.value?[]:[E];else{ze.warn("Table","`column.type` must be one of `multiple` and `single`");return}b(f,{selectedRowData:f.map(function(B){return w.value.get(B)}),currentRowKey:E,currentRowData:c,type:K?"uncheck":"check"})}function T(c){var f,x=t.rowKey||"id",E=C.value.map(function(B){return H(B,x)}),L=((f=n.value)===null||f===void 0?void 0:f.filter(function(B){return!E.includes(B)}))||[],K=c?[].concat(ve(L),ve(E)):ve(L);b(K,{selectedRowData:c?K.map(function(B){return w.value.get(B)}):[],type:c?"check":"uncheck",currentRowKey:"CHECK_ALL_BOX"})}function I(c){var f=["multiple","single"].includes(c.type);return f?na(na({},c),{},{width:c.width||64,className:[e.checkCell,c.className],cell:function(E,L){return P(L)},title:c.type==="multiple"?j():c.title}):c}var _=function(f){var x=f.row,E=f.index,L=t.columns.findIndex(function($){return $.colKey==="row-select"}),K=!1;if(L!==-1){var B;K=(B=A({row:x,rowIndex:E,col:t.columns[L],colIndex:L}))===null||B===void 0?void 0:B.disabled}K||F(x)};ce([l,o],function(){for(var c=0,f=l.value.length;c<f;c++)w.value.set(H(l.value[c],o.value||"id"),l.value[c])},{immediate:!0});var m=N(function(){return Boolean(y.value||t.selectOnRowClick||t.selectedRowKeys)}),h=function(){b([],{selectedRowData:[],currentRowKey:void 0,currentRowData:void 0,type:"uncheck"})},g=function(f){var x=f.activeRowList,E=f.action;if(!!m.value){if(E==="clear"){h();return}if(E==="select-all"){T(!0);return}if(R.value==="single"){E==="space-one-selection"&&F(x[0].row);return}var L=x.filter(function(ne){var Q=ne.row,M=ne.rowIndex;return!A({row:Q,rowIndex:M,col:y.value,colIndex:void 0}).disabled});if(!!L.length){var K=L.map(function(ne){var Q=ne.row;return H(Q,t.rowKey)}),B=ba(p.value,K),$=B.length!==K.length,Y=p.value.filter(function(ne){return!K.includes(ne)}),ee=$?ve(new Set(p.value.concat(K))):Y,ae=E==="space-one-selection"?x[0].row:void 0;b(ee,{selectedRowData:x,currentRowKey:H(ae,t.rowKey),currentRowData:ae,type:$?"check":"uncheck"})}}};return{selectColumn:y,showRowSelect:m,selectedRowClassNames:s,currentPaginateData:u,setTSelectedRowKeys:b,formatToRowSelectColumn:I,onInnerSelectRowClick:_,handleRowSelectWithAreaSelection:g}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function hs(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vn(t)}var gs=He({name:"TSorterButton",props:{sortType:{type:String,default:"all"},sortOrder:{type:String,default:function(){return""}},locale:Object,sortIcon:Function,tooltipProps:Object,hideSortTips:Boolean},emits:["sort-icon-click"],setup:function(e,a){var n=it(),r=n.tableSortClasses,o=n.negativeRotate180,l=Un(),i=gt("table",e.locale),u=i.t,s=i.globalConfig,v=_n({ChevronDownIcon:bi}),d=v.ChevronDownIcon,p=N(function(){return e.sortType==="all"?["asc","desc"]:[e.sortType]}),b=function(R,C){a.emit("sort-icon-click",R,{descending:C==="desc"})},w=function(R,C){var O=u(s.value.sortIcon)||k(d,null,null),S=l("sortIcon",O),D=[C,r.sortIcon,r.iconDirection[R],z({},o,R==="asc")];return k("span",{class:D,onClick:function(A){return b(A,R)}},[S])};return{t:u,globalConfig:s,tableSortClasses:r,negativeRotate180:o,allowSortTypes:p,getSortIcon:w}},render:function(){var e=this,a=this.tableSortClasses,n=[a.trigger,z({},a.doubleIcon,this.allowSortTypes.length>1)],r={asc:this.globalConfig.sortAscendingOperationText,desc:this.globalConfig.sortDescendingOperationText},o=this.allowSortTypes.map(function(l){var i,u,s=l===e.sortOrder?a.iconActive:a.iconDefault,v=e.globalConfig.sortCancelOperationText,d=l===e.sortOrder?v:r[l];return((u=e.hideSortTips)!==null&&u!==void 0?u:e.globalConfig.hideSortTips)?e.getSortIcon(l,s):k(Zo,Ke({content:d,placement:"right",showArrow:!1,class:e.tableSortClasses.iconDirection[l]},e.tooltipProps),hs(i=e.getSortIcon(l,s))?i:{default:function(){return[i]}})});return k("div",{class:n},[o])}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function oo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ps(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?oo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):oo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function bs(t,e){var a=e.slots,n=Ie(t),r=n.sort,o=n.data,l=W(),i=kt(r,t.defaultSort,t.onSortChange,"sort"),u=Pe(i,2),s=u[0],v=u[1],d=kt(o,[],t.onDataChange,"data"),p=Pe(d,2),b=p[0],w=p[1],y=N(function(){return S(t.columns)}),R=W(),C=N(function(){var _=s.value;return _?Aa(_)?_:[_]:[]}),O=N(function(){var _={};return C.value.forEach(function(m,h){var g=m.sortBy;_[g]=ps({index:h},m)}),_});function S(_){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=0,g=_.length;h<g;h++){var c,f=_[h];Re(f.sorter)&&(m[f.colKey]=f.sorter),(c=f.children)!==null&&c!==void 0&&c.length&&S(f.children,m)}return m}function D(_){var m=_;if(!!Object.keys(y.value).length){l.value||(l.value=b.value);var h=!m||m instanceof Array&&!m.length,g=!(m instanceof Array)&&!(m!=null&&m.sortBy);if(h||g)return w(l.value,{trigger:"sort"}),l.value;var c=m instanceof Array?m:[m],f=b.value.slice().sort(function(x,E){for(var L=0,K=0,B=c.length;K<B;K++){var $=c[K],Y=y.value[$.sortBy];if(L===0&&Y)L=$.descending?Y(E,x):Y(x,E);else break}return L});if(JSON.stringify(f)!==JSON.stringify(b.value))return w(f,{trigger:"sort"}),f}}function j(_,m){var h,g;if(t.multipleSort)g=F(_,m);else{var c=s.value instanceof Array?s.value[0]:s.value;g=P(_,c,m)}var f=D(g),x=f||b.value,E=x;v(g,{currentDataSource:E,col:_}),(h=t.onChange)===null||h===void 0||h.call(t,{sorter:g},{currentData:x,trigger:"sorter"}),R.value=g}function A(_){if(_!==void 0)return _?"desc":"asc"}function P(_,m,h){if(!(m&&m.sortBy===_.colKey&&m.descending===h.descending))return{sortBy:_.colKey,descending:h.descending}}function F(_,m){Array.isArray(s.value)||(s.value=s.value?[s.value]:[]);for(var h=s.value,g=_.colKey,c=ve(h),f=0,x=h.length;f<x;f++)if(h[f].sortBy===g){var E=P(_,h[f],m);return E?c[f]=E:c.splice(f,1),c}return c.push({sortBy:g,descending:m.descending}),c}function T(_){var m,h=_.col;if(!h.sorter)return null;var g={sortType:h.sortType,sortOrder:A((m=O.value[h.colKey])===null||m===void 0?void 0:m.descending),sortIcon:t.sortIcon,hideSortTips:t.hideSortTips,locale:t.locale};return k(gs,Ke(g,{onSortIconClick:function(f,x){return j(h,x)}}),{sortIcon:a.sortIcon})}var I=function(m,h){var g=Aa(m)?m:[m],c=Aa(h)?h:[h];if(g.length&&!h)return!1;for(var f=function(){var B=g[E],$=c.find(function(Y){return Y.sortBy===B.sortBy});return $?{v:B.descending===$.descending}:{v:!1}},x,E=0,L=g.length;E<L;E++)if(x=f(),x)return x.v};return ce(function(){return[s,t.data]},function(){!s.value||!Object.keys(s.value).length||!b.value.length||I(s.value,R.value)||D(s.value)},{immediate:!0}),{renderSortIcon:T}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function lo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function aa(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?lo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):lo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var ms=He({name:"TableFilterController",props:{locale:Object,column:Object,colIndex:Number,tFilterValue:Object,innerFilterValue:Object,tableFilterClasses:Object,isFocusClass:String,primaryTableElement:{},popupProps:Object,attach:[String,Function],onVisibleChange:Function},emits:["inner-filter-change","reset","confirm"],setup:function(e,a){var n=W(null),r=Un(),o=gt("table",e.locale),l=o.t,i=o.globalConfig,u=_n({FilterIcon:Fi}),s=u.FilterIcon,v=W(!1),d=function(C){var O;v.value=C,(O=e.onVisibleChange)===null||O===void 0||O.call(e,C)},p=function(C,O,S){if(!S)return null;var D=!!S.setup;if(Re(C.filter.component)&&!D)return C.filter.component(function(A,P){var F=vt(P)==="object"&&"attrs"in P?P.attrs:{};return Ye(A,{props:aa(aa({},O),F)})});var j=C.filter||{};return k(S,Ke({class:j.classNames,style:j.style},j.attrs,O),null)},b=function(C){var O,S,D,j=["single","multiple","input"];if((O=C.filter)!==null&&O!==void 0&&O.type&&!j.includes(C.filter.type)){console.error("TDesign Table Error: column.filter.type must be the following: ".concat(JSON.stringify(j)));return}var A=e.innerFilterValue,P=A===void 0?{}:A,F={single:vu,multiple:Jo,input:yi}[C.filter.type]||C.filter.component;if(!(!F&&!C.filter.component)){var T=aa(aa({options:["single","multiple"].includes(C.filter.type)?(S=C.filter)===null||S===void 0?void 0:S.list:void 0},((D=C.filter)===null||D===void 0?void 0:D.props)||{}),{},{onChange:function(_,m){var h,g;if(a.emit("inner-filter-change",_,C),(h=C.filter.props)!==null&&h!==void 0&&h.onChange){var c,f;(c=(f=C.filter.props).onChange)===null||c===void 0||c.call(f,_,m)}(g=C.filter)!==null&&g!==void 0&&(g=g.confirmEvents)!==null&&g!==void 0&&g.includes("onChange")&&(v.value=!1)}});return C.colKey&&P&&C.colKey in P&&(T.value=P==null?void 0:P[C.colKey]),C.filter.confirmEvents&&C.filter.confirmEvents.forEach(function(I){I!=="onChange"&&(T[I]=function(){a.emit("confirm",C),v.value=!1})}),k("div",{class:e.tableFilterClasses.contentInner},[p(C,T,F)])}},w=function(C){if(!!C.filter.showConfirmAndReset)return k("div",{class:e.tableFilterClasses.bottomButtons},[k(pa,{theme:"default",size:"small",onClick:function(){a.emit("reset",C),v.value=!1}},{default:function(){return[i.value.resetText]}}),k(pa,{theme:"primary",size:"small",onClick:function(){a.emit("confirm",C),v.value=!1}},{default:function(){return[i.value.confirmText]}})])},y=function(){return k("div",{class:e.tableFilterClasses.popupContent},[b(e.column),w(e.column)])};return{t:l,globalConfig:i,FilterIcon:s,filterPopupVisible:v,triggerElementRef:n,renderTNode:r,getContent:y,onFilterPopupVisibleChange:d}},render:function(){var e,a=this,n=this.column,r=this.popupProps,o=this.FilterIcon;if(!n.filter||n.filter&&!Object.keys(n.filter).length)return null;var l=this.t(this.globalConfig.filterIcon)||k(o,null,null),i=(e=this.tFilterValue)===null||e===void 0?void 0:e[n.colKey],u=vt(i)==="object"&&!ei(i),s=![null,void 0,""].includes(i)&&vt(i)!=="object";return k(mi,Ke({attach:this.attach||(this.primaryTableElement?function(){return a.primaryTableElement}:void 0),visible:this.filterPopupVisible,destroyOnClose:!0,trigger:"click",placement:"bottom-right",showArrow:!0,overlayClassName:this.tableFilterClasses.popup,onVisibleChange:function(d){return a.onFilterPopupVisibleChange(d)},class:[this.tableFilterClasses.icon,z({},this.isFocusClass,u||s)],content:this.getContent},r),{default:function(){return[k("div",{ref:"triggerElementRef"},[a.renderTNode("filterIcon",{defaultNode:l,params:{col:n,colIndex:a.colIndex}})])]}})}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function io(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ra(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?io(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):io(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function bl(t){var e=t instanceof Array&&t.length,a=vt(t)==="object"&&!(t instanceof Array),n=a&&Object.keys(t).length;return e||n||!["null","","undefined"].includes(String(t))}function ws(t){var e={};return Object.keys(t).forEach(function(a){var n=t[a];bl(n)&&(e[a]=n)}),e}function ys(t,e){var a=W(null),n=gt("table",t.locale),r=n.t,o=n.globalConfig,l=Un(),i=Ie(t),u=i.filterValue,s=i.columns,v=it(),d=v.tableFilterClasses,p=v.isFocusClass,b=W(),w=kt(u,t.defaultFilterValue,t.onFilterChange,"filterValue"),y=Pe(w,2),R=y[0],C=y[1],O=W(R.value),S=N(function(){var c=ws(R.value||{});return!R.value||!Object.keys(c).length});ce([R],function(c){var f=Pe(c,1),x=f[0];O.value=x});function D(){var c,f;if(S.value)return null;var x=k("div",{class:d.result},[k("span",null,[r(o.value.searchResultText,{result:j(),count:((c=t.pagination)===null||c===void 0?void 0:c.total)||((f=t.data)===null||f===void 0?void 0:f.length)})]),k(pa,{theme:"primary",variant:"text",onClick:I},{default:function(){return[o.value.clearFilterResultButtonText]}})]),E=l("filterRow");return t.filterRow&&!E||t.filterRow===null?null:k("div",{class:d.inner},[E||x])}function j(){var c=[],f=[];return A(t.columns,f),f.filter(function(x){return x.filter}).forEach(function(x,E){var L=R.value[x.colKey];if(x.filter.list&&!["null"].includes(String(L))){var K=L instanceof Array?L:[L],B=[];x.filter.list.forEach(function(ne){K.includes(ne.value)&&B.push(ne.label)}),L=B.join()}if(bl(L)){var $,Y,ee=Re(($=x.filter)===null||$===void 0?void 0:$.label)?x.filter.label(Ye):(Y=x.filter)===null||Y===void 0?void 0:Y.label,ae=Ea(e.slots,x,E);c.push("".concat(ee||ae,"\uFF1A").concat(L))}}),c.join("\uFF1B")}function A(c,f){c.forEach(function(x){x.children&&A(x.children,f),f.push(x)})}function P(c,f){var x=ra(ra({},O.value),{},z({},f.colKey,c));O.value=x,f.filter.showConfirmAndReset||F(x,"filter-change",f)}function F(c,f,x){var E;C(c,{col:x,trigger:f}),(E=t.onChange)===null||E===void 0||E.call(t,{filter:c},{trigger:"filter"})}function T(c){var f,x,E=ra(ra({},R.value),{},z({},c.colKey,(f=(x=c.filter.resetValue)!==null&&x!==void 0?x:{single:"",multiple:[],input:""}[c.filter.type])!==null&&f!==void 0?f:""));F(E,"reset",c)}function I(){var c=pl(s.value);F(c,"clear",void 0)}function _(c){F(O.value,"confirm",c)}function m(c){var f,x=c.col,E=c.colIndex;return k(ms,{column:x,colIndex:E,filterIcon:t.filterIcon,tFilterValue:R.value,innerFilterValue:O.value,tableFilterClasses:d,isFocusClass:p,popupProps:x.filter.popupProps,attach:t.attach,locale:t.locale,onReset:T,onConfirm:_,onInnerFilterChange:P,primaryTableElement:(f=a.value)===null||f===void 0?void 0:f.$el,onVisibleChange:g},{filterIcon:e.slots.filterIcon})}function h(c){a.value=c}function g(c){c&&!b.value&&(b.value=!c)}return{hasEmptyCondition:S,isTableOverflowHidden:b,renderFilterIcon:m,renderFirstFilterRow:D,setFilterPrimaryTableRef:h}}/**!
|
|
* Sortable 1.15.3
|
|
* @author RubaXa <trash@rubaxa.org>
|
|
* @author owenm <owen23355@gmail.com>
|
|
* @license MIT
|
|
*/function uo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Dt(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?uo(Object(a),!0).forEach(function(n){Cs(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):uo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function da(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?da=function(e){return typeof e}:da=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(t)}function Cs(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Nt(){return Nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Nt.apply(this,arguments)}function xs(t,e){if(t==null)return{};var a={},n=Object.keys(t),r,o;for(o=0;o<n.length;o++)r=n[o],!(e.indexOf(r)>=0)&&(a[r]=t[r]);return a}function Ss(t,e){if(t==null)return{};var a=xs(t,e),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(a[n]=t[n]))}return a}var Os="1.15.3";function Kt(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Mt=Kt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Gn=Kt(/Edge/i),so=Kt(/firefox/i),Mn=Kt(/safari/i)&&!Kt(/chrome/i)&&!Kt(/android/i),ml=Kt(/iP(ad|od|hone)/i),wl=Kt(/chrome/i)&&Kt(/android/i),yl={capture:!1,passive:!1};function Oe(t,e,a){t.addEventListener(e,a,!Mt&&yl)}function xe(t,e,a){t.removeEventListener(e,a,!Mt&&yl)}function ya(t,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Cl(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function wt(t,e,a,n){if(t){a=a||document;do{if(e!=null&&(e[0]===">"?t.parentNode===a&&ya(t,e):ya(t,e))||n&&t===a)return t;if(t===a)break}while(t=Cl(t))}return null}var co=/\s+/g;function ct(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(co," ").replace(" "+e+" "," ");t.className=(n+(a?" "+e:"")).replace(co," ")}}function ie(t,e,a){var n=t&&t.style;if(n){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(a=t.currentStyle),e===void 0?a:a[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=a+(typeof a=="string"?"":"px")}}function On(t,e){var a="";if(typeof t=="string")a=t;else do{var n=ie(t,"transform");n&&n!=="none"&&(a=n+" "+a)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function xl(t,e,a){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(a)for(;r<o;r++)a(n[r],r);return n}return[]}function _t(){var t=document.scrollingElement;return t||document.documentElement}function Ue(t,e,a,n,r){if(!(!t.getBoundingClientRect&&t!==window)){var o,l,i,u,s,v,d;if(t!==window&&t.parentNode&&t!==_t()?(o=t.getBoundingClientRect(),l=o.top,i=o.left,u=o.bottom,s=o.right,v=o.height,d=o.width):(l=0,i=0,u=window.innerHeight,s=window.innerWidth,v=window.innerHeight,d=window.innerWidth),(e||a)&&t!==window&&(r=r||t.parentNode,!Mt))do if(r&&r.getBoundingClientRect&&(ie(r,"transform")!=="none"||a&&ie(r,"position")!=="static")){var p=r.getBoundingClientRect();l-=p.top+parseInt(ie(r,"border-top-width")),i-=p.left+parseInt(ie(r,"border-left-width")),u=l+o.height,s=i+o.width;break}while(r=r.parentNode);if(n&&t!==window){var b=On(r||t),w=b&&b.a,y=b&&b.d;b&&(l/=y,i/=w,d/=w,v/=y,u=l+v,s=i+d)}return{top:l,left:i,bottom:u,right:s,width:d,height:v}}}function vo(t,e,a){for(var n=Xt(t,!0),r=Ue(t)[e];n;){var o=Ue(n)[a],l=void 0;if(a==="top"||a==="left"?l=r>=o:l=r<=o,!l)return n;if(n===_t())break;n=Xt(n,!1)}return!1}function En(t,e,a,n){for(var r=0,o=0,l=t.children;o<l.length;){if(l[o].style.display!=="none"&&l[o]!==oe.ghost&&(n||l[o]!==oe.dragged)&&wt(l[o],a.draggable,t,!1)){if(r===e)return l[o];r++}o++}return null}function fr(t,e){for(var a=t.lastElementChild;a&&(a===oe.ghost||ie(a,"display")==="none"||e&&!ya(a,e));)a=a.previousElementSibling;return a||null}function ht(t,e){var a=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==oe.clone&&(!e||ya(t,e))&&a++;return a}function fo(t){var e=0,a=0,n=_t();if(t)do{var r=On(t),o=r.a,l=r.d;e+=t.scrollLeft*o,a+=t.scrollTop*l}while(t!==n&&(t=t.parentNode));return[e,a]}function Rs(t,e){for(var a in t)if(!!t.hasOwnProperty(a)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[a][n])return Number(a)}return-1}function Xt(t,e){if(!t||!t.getBoundingClientRect)return _t();var a=t,n=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var r=ie(a);if(a.clientWidth<a.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return _t();if(n||e)return a;n=!0}}while(a=a.parentNode);return _t()}function Es(t,e){if(t&&e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t}function La(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Bn;function Sl(t,e){return function(){if(!Bn){var a=arguments,n=this;a.length===1?t.call(n,a[0]):t.apply(n,a),Bn=setTimeout(function(){Bn=void 0},e)}}}function _s(){clearTimeout(Bn),Bn=void 0}function Ol(t,e,a){t.scrollLeft+=e,t.scrollTop+=a}function Rl(t){var e=window.Polymer,a=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):a?a(t).clone(!0)[0]:t.cloneNode(!0)}function El(t,e,a){var n={};return Array.from(t.children).forEach(function(r){var o,l,i,u;if(!(!wt(r,e.draggable,t,!1)||r.animated||r===a)){var s=Ue(r);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,s.left),n.top=Math.min((l=n.top)!==null&&l!==void 0?l:1/0,s.top),n.right=Math.max((i=n.right)!==null&&i!==void 0?i:-1/0,s.right),n.bottom=Math.max((u=n.bottom)!==null&&u!==void 0?u:-1/0,s.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var lt="Sortable"+new Date().getTime();function Ds(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(ie(r,"display")==="none"||r===oe.ghost)){t.push({target:r,rect:Ue(r)});var o=Dt({},t[t.length-1].rect);if(r.thisAnimationDuration){var l=On(r,!0);l&&(o.top-=l.f,o.left-=l.e)}r.fromRect=o}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(Rs(t,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,l=0;t.forEach(function(i){var u=0,s=i.target,v=s.fromRect,d=Ue(s),p=s.prevFromRect,b=s.prevToRect,w=i.rect,y=On(s,!0);y&&(d.top-=y.f,d.left-=y.e),s.toRect=d,s.thisAnimationDuration&&La(p,d)&&!La(v,d)&&(w.top-d.top)/(w.left-d.left)===(v.top-d.top)/(v.left-d.left)&&(u=Ps(w,p,b,r.options)),La(d,v)||(s.prevFromRect=v,s.prevToRect=d,u||(u=r.options.animation),r.animate(s,w,d,u)),u&&(o=!0,l=Math.max(l,u),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},u),s.thisAnimationDuration=u)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),t=[]},animate:function(n,r,o,l){if(l){ie(n,"transition",""),ie(n,"transform","");var i=On(this.el),u=i&&i.a,s=i&&i.d,v=(r.left-o.left)/(u||1),d=(r.top-o.top)/(s||1);n.animatingX=!!v,n.animatingY=!!d,ie(n,"transform","translate3d("+v+"px,"+d+"px,0)"),this.forRepaintDummy=Ts(n),ie(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),ie(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ie(n,"transition",""),ie(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function Ts(t){return t.offsetWidth}function Ps(t,e,a,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))*n.animation}var pn=[],ka={initializeByDefault:!0},Yn={mount:function(e){for(var a in ka)ka.hasOwnProperty(a)&&!(a in e)&&(e[a]=ka[a]);pn.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),pn.push(e)},pluginEvent:function(e,a,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";pn.forEach(function(l){!a[l.pluginName]||(a[l.pluginName][o]&&a[l.pluginName][o](Dt({sortable:a},n)),a.options[l.pluginName]&&a[l.pluginName][e]&&a[l.pluginName][e](Dt({sortable:a},n)))})},initializePlugins:function(e,a,n,r){pn.forEach(function(i){var u=i.pluginName;if(!(!e.options[u]&&!i.initializeByDefault)){var s=new i(e,a,e.options);s.sortable=e,s.options=e.options,e[u]=s,Nt(n,s.defaults)}});for(var o in e.options)if(!!e.options.hasOwnProperty(o)){var l=this.modifyOption(e,o,e.options[o]);typeof l<"u"&&(e.options[o]=l)}},getEventProperties:function(e,a){var n={};return pn.forEach(function(r){typeof r.eventProperties=="function"&&Nt(n,r.eventProperties.call(a[r.pluginName],e))}),n},modifyOption:function(e,a,n){var r;return pn.forEach(function(o){!e[o.pluginName]||o.optionListeners&&typeof o.optionListeners[a]=="function"&&(r=o.optionListeners[a].call(e[o.pluginName],n))}),r}};function As(t){var e=t.sortable,a=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,l=t.toEl,i=t.fromEl,u=t.oldIndex,s=t.newIndex,v=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,b=t.putSortable,w=t.extraEventProperties;if(e=e||a&&a[lt],!!e){var y,R=e.options,C="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Mt&&!Gn?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=l||a,y.from=i||a,y.item=r||a,y.clone=o,y.oldIndex=u,y.newIndex=s,y.oldDraggableIndex=v,y.newDraggableIndex=d,y.originalEvent=p,y.pullMode=b?b.lastPutMode:void 0;var O=Dt(Dt({},w),Yn.getEventProperties(n,e));for(var S in O)y[S]=O[S];a&&a.dispatchEvent(y),R[C]&&R[C].call(e,y)}}var js=["evt"],rt=function(e,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=Ss(n,js);Yn.pluginEvent.bind(oe)(e,a,Dt({dragEl:U,parentEl:$e,ghostEl:se,rootEl:ke,nextEl:un,lastDownEl:va,cloneEl:Be,cloneHidden:Ut,dragStarted:Kn,putSortable:Ze,activeSortable:oe.active,originalEvent:r,oldIndex:Cn,oldDraggableIndex:zn,newIndex:dt,newDraggableIndex:Vt,hideGhostForTarget:Pl,unhideGhostForTarget:Al,cloneNowHidden:function(){Ut=!0},cloneNowShown:function(){Ut=!1},dispatchSortableEvent:function(i){tt({sortable:a,name:i,originalEvent:r})}},o))};function tt(t){As(Dt({putSortable:Ze,cloneEl:Be,targetEl:U,rootEl:ke,oldIndex:Cn,oldDraggableIndex:zn,newIndex:dt,newDraggableIndex:Vt},t))}var U,$e,se,ke,un,va,Be,Ut,Cn,dt,zn,Vt,oa,Ze,wn=!1,Ca=!1,xa=[],rn,mt,Na,Ma,ho,go,Kn,bn,Hn,Wn=!1,la=!1,fa,et,Ba=[],er=!1,Sa=[],_a=typeof document<"u",ia=ml,po=Gn||Mt?"cssFloat":"float",Fs=_a&&!wl&&!ml&&"draggable"in document.createElement("div"),_l=function(){if(!!_a){if(Mt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Dl=function(e,a){var n=ie(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=En(e,0,a),l=En(e,1,a),i=o&&ie(o),u=l&&ie(l),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Ue(o).width,v=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Ue(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&i.float!=="none"){var d=i.float==="left"?"left":"right";return l&&(u.clear==="both"||u.clear===d)?"vertical":"horizontal"}return o&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||s>=r&&n[po]==="none"||l&&n[po]==="none"&&s+v>r)?"vertical":"horizontal"},Ks=function(e,a,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,l=n?e.width:e.height,i=n?a.left:a.top,u=n?a.right:a.bottom,s=n?a.width:a.height;return r===i||o===u||r+l/2===i+s/2},Is=function(e,a){var n;return xa.some(function(r){var o=r[lt].options.emptyInsertThreshold;if(!(!o||fr(r))){var l=Ue(r),i=e>=l.left-o&&e<=l.right+o,u=a>=l.top-o&&a<=l.bottom+o;if(i&&u)return n=r}}),n},Tl=function(e){function a(o,l){return function(i,u,s,v){var d=i.options.group.name&&u.options.group.name&&i.options.group.name===u.options.group.name;if(o==null&&(l||d))return!0;if(o==null||o===!1)return!1;if(l&&o==="clone")return o;if(typeof o=="function")return a(o(i,u,s,v),l)(i,u,s,v);var p=(l?i:u).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var n={},r=e.group;(!r||da(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=a(r.pull,!0),n.checkPut=a(r.put),n.revertClone=r.revertClone,e.group=n},Pl=function(){!_l&&se&&ie(se,"display","none")},Al=function(){!_l&&se&&ie(se,"display","")};_a&&!wl&&document.addEventListener("click",function(t){if(Ca)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ca=!1,!1},!0);var on=function(e){if(U){e=e.touches?e.touches[0]:e;var a=Is(e.clientX,e.clientY);if(a){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=a,n.preventDefault=void 0,n.stopPropagation=void 0,a[lt]._onDragOver(n)}}},Ls=function(e){U&&U.parentNode[lt]._isOutsideThisEl(e.target)};function oe(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Nt({},e),t[lt]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Dl(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,i){l.setData("Text",i.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:oe.supportPointer!==!1&&"PointerEvent"in window&&!Mn,emptyInsertThreshold:5};Yn.initializePlugins(this,t,a);for(var n in a)!(n in e)&&(e[n]=a[n]);Tl(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Fs,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Oe(t,"pointerdown",this._onTapStart):(Oe(t,"mousedown",this._onTapStart),Oe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Oe(t,"dragover",this),Oe(t,"dragenter",this)),xa.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Nt(this,Ds())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(bn=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,U):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var a=this,n=this.el,r=this.options,o=r.preventOnFilter,l=e.type,i=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,v=r.filter;if($s(n),!U&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&Mn&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=wt(u,r.draggable,n,!1),!(u&&u.animated)&&va!==u)){if(Cn=ht(u),zn=ht(u,r.draggable),typeof v=="function"){if(v.call(this,e,u,this)){tt({sortable:a,rootEl:s,name:"filter",targetEl:u,toEl:n,fromEl:n}),rt("filter",a,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(v&&(v=v.split(",").some(function(d){if(d=wt(s,d.trim(),n,!1),d)return tt({sortable:a,rootEl:d,name:"filter",targetEl:u,fromEl:n,toEl:n}),rt("filter",a,{evt:e}),!0}),v)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!wt(s,r.handle,n,!1)||this._prepareDragStart(e,i,u)}}},_prepareDragStart:function(e,a,n){var r=this,o=r.el,l=r.options,i=o.ownerDocument,u;if(n&&!U&&n.parentNode===o){var s=Ue(n);if(ke=o,U=n,$e=U.parentNode,un=U.nextSibling,va=n,oa=l.group,oe.dragged=U,rn={target:U,clientX:(a||e).clientX,clientY:(a||e).clientY},ho=rn.clientX-s.left,go=rn.clientY-s.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,U.style["will-change"]="all",u=function(){if(rt("delayEnded",r,{evt:e}),oe.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!so&&r.nativeDraggable&&(U.draggable=!0),r._triggerDragStart(e,a),tt({sortable:r,name:"choose",originalEvent:e}),ct(U,l.chosenClass,!0)},l.ignore.split(",").forEach(function(v){xl(U,v.trim(),za)}),Oe(i,"dragover",on),Oe(i,"mousemove",on),Oe(i,"touchmove",on),Oe(i,"mouseup",r._onDrop),Oe(i,"touchend",r._onDrop),Oe(i,"touchcancel",r._onDrop),so&&this.nativeDraggable&&(this.options.touchStartThreshold=4,U.draggable=!0),rt("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Gn||Mt))){if(oe.eventCanceled){this._onDrop();return}Oe(i,"mouseup",r._disableDelayedDrag),Oe(i,"touchend",r._disableDelayedDrag),Oe(i,"touchcancel",r._disableDelayedDrag),Oe(i,"mousemove",r._delayedDragTouchMoveHandler),Oe(i,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&Oe(i,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(u,l.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){U&&za(U),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._disableDelayedDrag),xe(e,"touchend",this._disableDelayedDrag),xe(e,"touchcancel",this._disableDelayedDrag),xe(e,"mousemove",this._delayedDragTouchMoveHandler),xe(e,"touchmove",this._delayedDragTouchMoveHandler),xe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?Oe(document,"pointermove",this._onTouchMove):a?Oe(document,"touchmove",this._onTouchMove):Oe(document,"mousemove",this._onTouchMove):(Oe(U,"dragend",this),Oe(ke,"dragstart",this._onDragStart));try{document.selection?ha(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(wn=!1,ke&&U){rt("dragStarted",this,{evt:a}),this.nativeDraggable&&Oe(document,"dragover",Ls);var n=this.options;!e&&ct(U,n.dragClass,!1),ct(U,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,Pl();for(var e=document.elementFromPoint(mt.clientX,mt.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(mt.clientX,mt.clientY),e!==a);)a=e;if(U.parentNode[lt]._isOutsideThisEl(e),a)do{if(a[lt]){var n=void 0;if(n=a[lt]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:e,rootEl:a}),n&&!this.options.dragoverBubble)break}e=a}while(a=Cl(a));Al()}},_onTouchMove:function(e){if(rn){var a=this.options,n=a.fallbackTolerance,r=a.fallbackOffset,o=e.touches?e.touches[0]:e,l=se&&On(se,!0),i=se&&l&&l.a,u=se&&l&&l.d,s=ia&&et&&fo(et),v=(o.clientX-rn.clientX+r.x)/(i||1)+(s?s[0]-Ba[0]:0)/(i||1),d=(o.clientY-rn.clientY+r.y)/(u||1)+(s?s[1]-Ba[1]:0)/(u||1);if(!oe.active&&!wn){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(se){l?(l.e+=v-(Na||0),l.f+=d-(Ma||0)):l={a:1,b:0,c:0,d:1,e:v,f:d};var p="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");ie(se,"webkitTransform",p),ie(se,"mozTransform",p),ie(se,"msTransform",p),ie(se,"transform",p),Na=v,Ma=d,mt=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!se){var e=this.options.fallbackOnBody?document.body:ke,a=Ue(U,!0,ia,!0,e),n=this.options;if(ia){for(et=e;ie(et,"position")==="static"&&ie(et,"transform")==="none"&&et!==document;)et=et.parentNode;et!==document.body&&et!==document.documentElement?(et===document&&(et=_t()),a.top+=et.scrollTop,a.left+=et.scrollLeft):et=_t(),Ba=fo(et)}se=U.cloneNode(!0),ct(se,n.ghostClass,!1),ct(se,n.fallbackClass,!0),ct(se,n.dragClass,!0),ie(se,"transition",""),ie(se,"transform",""),ie(se,"box-sizing","border-box"),ie(se,"margin",0),ie(se,"top",a.top),ie(se,"left",a.left),ie(se,"width",a.width),ie(se,"height",a.height),ie(se,"opacity","0.8"),ie(se,"position",ia?"absolute":"fixed"),ie(se,"zIndex","100000"),ie(se,"pointerEvents","none"),oe.ghost=se,e.appendChild(se),ie(se,"transform-origin",ho/parseInt(se.style.width)*100+"% "+go/parseInt(se.style.height)*100+"%")}},_onDragStart:function(e,a){var n=this,r=e.dataTransfer,o=n.options;if(rt("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}rt("setupClone",this),oe.eventCanceled||(Be=Rl(U),Be.removeAttribute("id"),Be.draggable=!1,Be.style["will-change"]="",this._hideClone(),ct(Be,this.options.chosenClass,!1),oe.clone=Be),n.cloneId=ha(function(){rt("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||ke.insertBefore(Be,U),n._hideClone(),tt({sortable:n,name:"clone"}))}),!a&&ct(U,o.dragClass,!0),a?(Ca=!0,n._loopId=setInterval(n._emulateDragOver,50)):(xe(document,"mouseup",n._onDrop),xe(document,"touchend",n._onDrop),xe(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,U)),Oe(document,"drop",n),ie(U,"transform","translateZ(0)")),wn=!0,n._dragStartId=ha(n._dragStarted.bind(n,a,e)),Oe(document,"selectstart",n),Kn=!0,Mn&&ie(document.body,"user-select","none")},_onDragOver:function(e){var a=this.el,n=e.target,r,o,l,i=this.options,u=i.group,s=oe.active,v=oa===u,d=i.sort,p=Ze||s,b,w=this,y=!1;if(er)return;function R(E,L){rt(E,w,Dt({evt:e,isOwner:v,axis:b?"vertical":"horizontal",revert:l,dragRect:r,targetRect:o,canSort:d,fromSortable:p,target:n,completed:O,onMove:function(B,$){return ua(ke,a,U,r,B,Ue(B),e,$)},changed:S},L))}function C(){R("dragOverAnimationCapture"),w.captureAnimationState(),w!==p&&p.captureAnimationState()}function O(E){return R("dragOverCompleted",{insertion:E}),E&&(v?s._hideClone():s._showClone(w),w!==p&&(ct(U,Ze?Ze.options.ghostClass:s.options.ghostClass,!1),ct(U,i.ghostClass,!0)),Ze!==w&&w!==oe.active?Ze=w:w===oe.active&&Ze&&(Ze=null),p===w&&(w._ignoreWhileAnimating=n),w.animateAll(function(){R("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===U&&!U.animated||n===a&&!n.animated)&&(bn=null),!i.dragoverBubble&&!e.rootEl&&n!==document&&(U.parentNode[lt]._isOutsideThisEl(e.target),!E&&on(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function S(){dt=ht(U),Vt=ht(U,i.draggable),tt({sortable:w,name:"change",toEl:a,newIndex:dt,newDraggableIndex:Vt,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=wt(n,i.draggable,a,!0),R("dragOver"),oe.eventCanceled)return y;if(U.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||w._ignoreWhileAnimating===n)return O(!1);if(Ca=!1,s&&!i.disabled&&(v?d||(l=$e!==ke):Ze===this||(this.lastPutMode=oa.checkPull(this,s,U,e))&&u.checkPut(this,s,U,e))){if(b=this._getDirection(e,n)==="vertical",r=Ue(U),R("dragOverValid"),oe.eventCanceled)return y;if(l)return $e=ke,C(),this._hideClone(),R("revert"),oe.eventCanceled||(un?ke.insertBefore(U,un):ke.appendChild(U)),O(!0);var D=fr(a,i.draggable);if(!D||Bs(e,b,this)&&!D.animated){if(D===U)return O(!1);if(D&&a===e.target&&(n=D),n&&(o=Ue(n)),ua(ke,a,U,r,n,o,e,!!n)!==!1)return C(),D&&D.nextSibling?a.insertBefore(U,D.nextSibling):a.appendChild(U),$e=a,S(),O(!0)}else if(D&&Ms(e,b,this)){var j=En(a,0,i,!0);if(j===U)return O(!1);if(n=j,o=Ue(n),ua(ke,a,U,r,n,o,e,!1)!==!1)return C(),a.insertBefore(U,j),$e=a,S(),O(!0)}else if(n.parentNode===a){o=Ue(n);var A=0,P,F=U.parentNode!==a,T=!Ks(U.animated&&U.toRect||r,n.animated&&n.toRect||o,b),I=b?"top":"left",_=vo(n,"top","top")||vo(U,"top","top"),m=_?_.scrollTop:void 0;bn!==n&&(P=o[I],Wn=!1,la=!T&&i.invertSwap||F),A=zs(e,n,o,b,T?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,la,bn===n);var h;if(A!==0){var g=ht(U);do g-=A,h=$e.children[g];while(h&&(ie(h,"display")==="none"||h===se))}if(A===0||h===n)return O(!1);bn=n,Hn=A;var c=n.nextElementSibling,f=!1;f=A===1;var x=ua(ke,a,U,r,n,o,e,f);if(x!==!1)return(x===1||x===-1)&&(f=x===1),er=!0,setTimeout(Ns,30),C(),f&&!c?a.appendChild(U):n.parentNode.insertBefore(U,f?c:n),_&&Ol(_,0,m-_.scrollTop),$e=U.parentNode,P!==void 0&&!la&&(fa=Math.abs(P-Ue(n)[I])),S(),O(!0)}if(a.contains(U))return O(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){xe(document,"mousemove",this._onTouchMove),xe(document,"touchmove",this._onTouchMove),xe(document,"pointermove",this._onTouchMove),xe(document,"dragover",on),xe(document,"mousemove",on),xe(document,"touchmove",on)},_offUpEvents:function(){var e=this.el.ownerDocument;xe(e,"mouseup",this._onDrop),xe(e,"touchend",this._onDrop),xe(e,"pointerup",this._onDrop),xe(e,"touchcancel",this._onDrop),xe(document,"selectstart",this)},_onDrop:function(e){var a=this.el,n=this.options;if(dt=ht(U),Vt=ht(U,n.draggable),rt("drop",this,{evt:e}),$e=U&&U.parentNode,dt=ht(U),Vt=ht(U,n.draggable),oe.eventCanceled){this._nulling();return}wn=!1,la=!1,Wn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tr(this.cloneId),tr(this._dragStartId),this.nativeDraggable&&(xe(document,"drop",this),xe(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Mn&&ie(document.body,"user-select",""),ie(U,"transform",""),e&&(Kn&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),se&&se.parentNode&&se.parentNode.removeChild(se),(ke===$e||Ze&&Ze.lastPutMode!=="clone")&&Be&&Be.parentNode&&Be.parentNode.removeChild(Be),U&&(this.nativeDraggable&&xe(U,"dragend",this),za(U),U.style["will-change"]="",Kn&&!wn&&ct(U,Ze?Ze.options.ghostClass:this.options.ghostClass,!1),ct(U,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:$e,newIndex:null,newDraggableIndex:null,originalEvent:e}),ke!==$e?(dt>=0&&(tt({rootEl:$e,name:"add",toEl:$e,fromEl:ke,originalEvent:e}),tt({sortable:this,name:"remove",toEl:$e,originalEvent:e}),tt({rootEl:$e,name:"sort",toEl:$e,fromEl:ke,originalEvent:e}),tt({sortable:this,name:"sort",toEl:$e,originalEvent:e})),Ze&&Ze.save()):dt!==Cn&&dt>=0&&(tt({sortable:this,name:"update",toEl:$e,originalEvent:e}),tt({sortable:this,name:"sort",toEl:$e,originalEvent:e})),oe.active&&((dt==null||dt===-1)&&(dt=Cn,Vt=zn),tt({sortable:this,name:"end",toEl:$e,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){rt("nulling",this),ke=U=$e=se=un=Be=va=Ut=rn=mt=Kn=dt=Vt=Cn=zn=bn=Hn=Ze=oa=oe.dragged=oe.ghost=oe.clone=oe.active=null,Sa.forEach(function(e){e.checked=!0}),Sa.length=Na=Ma=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":U&&(this._onDragOver(e),ks(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,n=this.el.children,r=0,o=n.length,l=this.options;r<o;r++)a=n[r],wt(a,l.draggable,this.el,!1)&&e.push(a.getAttribute(l.dataIdAttr)||Ws(a));return e},sort:function(e,a){var n={},r=this.el;this.toArray().forEach(function(o,l){var i=r.children[l];wt(i,this.options.draggable,r,!1)&&(n[o]=i)},this),a&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),a&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,a){return wt(e,a||this.options.draggable,this.el,!1)},option:function(e,a){var n=this.options;if(a===void 0)return n[e];var r=Yn.modifyOption(this,e,a);typeof r<"u"?n[e]=r:n[e]=a,e==="group"&&Tl(n)},destroy:function(){rt("destroy",this);var e=this.el;e[lt]=null,xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart),xe(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xa.splice(xa.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ut){if(rt("hideClone",this),oe.eventCanceled)return;ie(Be,"display","none"),this.options.removeCloneOnHide&&Be.parentNode&&Be.parentNode.removeChild(Be),Ut=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Ut){if(rt("showClone",this),oe.eventCanceled)return;U.parentNode==ke&&!this.options.group.revertClone?ke.insertBefore(Be,U):un?ke.insertBefore(Be,un):ke.appendChild(Be),this.options.group.revertClone&&this.animate(U,Be),ie(Be,"display",""),Ut=!1}}};function ks(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function ua(t,e,a,n,r,o,l,i){var u,s=t[lt],v=s.options.onMove,d;return window.CustomEvent&&!Mt&&!Gn?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=a,u.draggedRect=n,u.related=r||e,u.relatedRect=o||Ue(e),u.willInsertAfter=i,u.originalEvent=l,t.dispatchEvent(u),v&&(d=v.call(s,u,l)),d}function za(t){t.draggable=!1}function Ns(){er=!1}function Ms(t,e,a){var n=Ue(En(a.el,0,a.options,!0)),r=El(a.el,a.options,se),o=10;return e?t.clientX<r.left-o||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-o||t.clientY<n.bottom&&t.clientX<n.left}function Bs(t,e,a){var n=Ue(fr(a.el,a.options.draggable)),r=El(a.el,a.options,se),o=10;return e?t.clientX>r.right+o||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+o||t.clientX>n.right&&t.clientY>n.top}function zs(t,e,a,n,r,o,l,i){var u=n?t.clientY:t.clientX,s=n?a.height:a.width,v=n?a.top:a.left,d=n?a.bottom:a.right,p=!1;if(!l){if(i&&fa<s*r){if(!Wn&&(Hn===1?u>v+s*o/2:u<d-s*o/2)&&(Wn=!0),Wn)p=!0;else if(Hn===1?u<v+fa:u>d-fa)return-Hn}else if(u>v+s*(1-r)/2&&u<d-s*(1-r)/2)return Hs(e)}return p=p||l,p&&(u<v+s*o/2||u>d-s*o/2)?u>v+s/2?1:-1:0}function Hs(t){return ht(U)<ht(t)?1:-1}function Ws(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,a=e.length,n=0;a--;)n+=e.charCodeAt(a);return n.toString(36)}function $s(t){Sa.length=0;for(var e=t.getElementsByTagName("input"),a=e.length;a--;){var n=e[a];n.checked&&Sa.push(n)}}function ha(t){return setTimeout(t,0)}function tr(t){return clearTimeout(t)}_a&&Oe(document,"touchmove",function(t){(oe.active||wn)&&t.cancelable&&t.preventDefault()});oe.utils={on:Oe,off:xe,css:ie,find:xl,is:function(e,a){return!!wt(e,a,e,!1)},extend:Es,throttle:Sl,closest:wt,toggleClass:ct,clone:Rl,index:ht,nextTick:ha,cancelNextTick:tr,detectDirection:Dl,getChild:En,expando:lt};oe.get=function(t){return t[lt]};oe.mount=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=Dt(Dt({},oe.utils),n.utils)),Yn.mount(n)})};oe.create=function(t,e){return new oe(t,e)};oe.version=Os;var Ve=[],In,nr,ar=!1,Ha,Wa,Oa,Ln;function Vs(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(a){var n=a.originalEvent;this.sortable.nativeDraggable?Oe(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Oe(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Oe(document,"touchmove",this._handleFallbackAutoScroll):Oe(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var n=a.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?xe(document,"dragover",this._handleAutoScroll):(xe(document,"pointermove",this._handleFallbackAutoScroll),xe(document,"touchmove",this._handleFallbackAutoScroll),xe(document,"mousemove",this._handleFallbackAutoScroll)),bo(),ga(),_s()},nulling:function(){Oa=nr=In=ar=Ln=Ha=Wa=null,Ve.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,n){var r=this,o=(a.touches?a.touches[0]:a).clientX,l=(a.touches?a.touches[0]:a).clientY,i=document.elementFromPoint(o,l);if(Oa=a,n||this.options.forceAutoScrollFallback||Gn||Mt||Mn){$a(a,this.options,i,n);var u=Xt(i,!0);ar&&(!Ln||o!==Ha||l!==Wa)&&(Ln&&bo(),Ln=setInterval(function(){var s=Xt(document.elementFromPoint(o,l),!0);s!==u&&(u=s,ga()),$a(a,r.options,s,n)},10),Ha=o,Wa=l)}else{if(!this.options.bubbleScroll||Xt(i,!0)===_t()){ga();return}$a(a,this.options,Xt(i,!1),!1)}}},Nt(t,{pluginName:"scroll",initializeByDefault:!0})}function ga(){Ve.forEach(function(t){clearInterval(t.pid)}),Ve=[]}function bo(){clearInterval(Ln)}var $a=Sl(function(t,e,a,n){if(!!e.scroll){var r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,i=e.scrollSpeed,u=_t(),s=!1,v;nr!==a&&(nr=a,ga(),In=e.scroll,v=e.scrollFn,In===!0&&(In=Xt(a,!0)));var d=0,p=In;do{var b=p,w=Ue(b),y=w.top,R=w.bottom,C=w.left,O=w.right,S=w.width,D=w.height,j=void 0,A=void 0,P=b.scrollWidth,F=b.scrollHeight,T=ie(b),I=b.scrollLeft,_=b.scrollTop;b===u?(j=S<P&&(T.overflowX==="auto"||T.overflowX==="scroll"||T.overflowX==="visible"),A=D<F&&(T.overflowY==="auto"||T.overflowY==="scroll"||T.overflowY==="visible")):(j=S<P&&(T.overflowX==="auto"||T.overflowX==="scroll"),A=D<F&&(T.overflowY==="auto"||T.overflowY==="scroll"));var m=j&&(Math.abs(O-r)<=l&&I+S<P)-(Math.abs(C-r)<=l&&!!I),h=A&&(Math.abs(R-o)<=l&&_+D<F)-(Math.abs(y-o)<=l&&!!_);if(!Ve[d])for(var g=0;g<=d;g++)Ve[g]||(Ve[g]={});(Ve[d].vx!=m||Ve[d].vy!=h||Ve[d].el!==b)&&(Ve[d].el=b,Ve[d].vx=m,Ve[d].vy=h,clearInterval(Ve[d].pid),(m!=0||h!=0)&&(s=!0,Ve[d].pid=setInterval(function(){n&&this.layer===0&&oe.active._onTouchMove(Oa);var c=Ve[this.layer].vy?Ve[this.layer].vy*i:0,f=Ve[this.layer].vx?Ve[this.layer].vx*i:0;typeof v=="function"&&v.call(oe.dragged.parentNode[lt],f,c,t,Oa,Ve[this.layer].el)!=="continue"||Ol(Ve[this.layer].el,f,c)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&p!==u&&(p=Xt(p,!1)));ar=s}},30),jl=function(e){var a=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,l=e.dispatchSortableEvent,i=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(!!a){var s=n||o;i();var v=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,d=document.elementFromPoint(v.clientX,v.clientY);u(),s&&!s.el.contains(d)&&(l("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function hr(){}hr.prototype={startIndex:null,dragStart:function(e){var a=e.oldDraggableIndex;this.startIndex=a},onSpill:function(e){var a=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=En(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(a,r):this.sortable.el.appendChild(a),this.sortable.animateAll(),n&&n.animateAll()},drop:jl};Nt(hr,{pluginName:"revertOnSpill"});function gr(){}gr.prototype={onSpill:function(e){var a=e.dragEl,n=e.putSortable,r=n||this.sortable;r.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),r.animateAll()},drop:jl};Nt(gr,{pluginName:"removeOnSpill"});oe.mount(new Vs);oe.mount(gr,hr);/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function mo(t,e,a){var n=ve(t);return a-e>0?(n.splice(a+1,0,n[e]),n.splice(e,1)):(n.splice(a,0,n[e]),n.splice(e+1,1)),n}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function wo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function jn(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?wo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):wo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function yo(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function Co(t,e,a){var n=a===0?t.children[0]:t.children[a-1].nextSibling;t.insertBefore(e,n)}function Us(t,e,a){var n=Ie(t),r=n.sortOnRowDraggable,o=n.dragSort,l=n.data,i=W(t.pagination),u=it(),s=u.tableDraggableClasses,v=u.tableBaseClass,d=u.tableFullRowClasses,p=u.tableExpandClasses,b=W(t.columns||[]),w=W(null),y=N(function(){return b.value.find(function(I){return I.colKey==="drag"})}),R=N(function(){return r.value||["row","row-handler-col"].includes(o.value)}),C=N(function(){return["row-handler","row-handler-col"].includes(o.value)&&!!y.value}),O=N(function(){return["col","row-handler-col"].includes(o.value)});t.sortOnRowDraggable&&ze.error("Table","`sortOnRowDraggable` is going to be deprecated, use dragSort='row' instead.");function S(I,_){var m,h,g=(m=_.current)!==null&&m!==void 0?m:_.defaultCurrent,c=(h=_.pageSize)!==null&&h!==void 0?h:_.defaultPageSize;return!t.disableDataPage&&_&&l.value.length>c?c*(g-1)+I:I}var D=function(_){if(!(!C.value&&!R.value)){var m=_==null?void 0:_.querySelector("tbody");if(!m)return console.error("tbody does not exist."),null;var h=jn({animation:150,ghostClass:s.ghost,chosenClass:s.chosen,dragClass:s.dragging,filter:".".concat(d.base,",.").concat(p.row),onMove:function(c){return!ti(c.related,d.base)},onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){yo(c.item),Co(c.from,c.item,c.oldIndex);var x=c.oldIndex,E=c.newIndex;(Re(t.firstFullRow)&&t.firstFullRow(Ye)||e.slots.firstFullRow||e.slots["first-full-row"])&&(x-=1,E-=1),i.value&&(x=S(x,i.value),E=S(E,i.value));var L={data:l.value,currentIndex:x,current:l.value[x],targetIndex:E,target:l.value[E],newData:mo(ve(t.data),x,E),e:c,sort:"row"};L.currentData=L.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,L)}}},t.dragSortOptions);!m||(R.value?new oe(m,jn({},h)):new oe(m,jn(jn({},h),{},{handle:".".concat(s.handle)})))}},j=function(_,m){var h=jn({animation:150,dataIdAttr:"data-colkey",direction:"vertical",ghostClass:s.ghost,chosenClass:s.chosen,dragClass:s.dragging,handle:".".concat(v.thCellInner),onEnd:function(c){var f;if(c.newIndex!==c.oldIndex){m&&(yo(c.item),Co(c.from,c.item,c.oldIndex));var x=c.oldIndex,E=c.newIndex,L=c.target,K=m?x:E,B=m?E:x,$=L.children[K],Y=L.children[B],ee=wa(b.value,$.dataset.colkey),ae=wa(b.value,Y.dataset.colkey);(!ee||!ee.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ee))),(!ae||!ae.colKey)&&ze.error("Table","colKey is missing in ".concat(JSON.stringify(ae))),K=ao(t.columns,ee.colKey),B=ao(t.columns,ae.colKey);var ne={data:b.value,currentIndex:K,current:ee,targetIndex:B,target:ae,newData:mo(ve(t.columns),K,B),e:c,sort:"col"};ne.currentData=ne.newData,(f=t.onDragSort)===null||f===void 0||f.call(t,ne)}}},t.dragSortOptions);!_||new oe(_,h)},A=function(_){if(!(!O.value||!_)){var m=_.querySelectorAll("thead > tr");if(m.length<=1){var h=Pe(m,1),g=h[0];j(g,!0)}else m==null||m.forEach(function(c){j(c,!1)})}};function P(I){w.value=I}function F(I){b.value=I}ce([w,b,o,a],function(I){var _=Pe(I,4),m=_[0];_[1],_[2];var h=_[3];T(m,h)});function T(I,_){var m=I;if(!(!I||!m.$el||!_.showElement))var h=setTimeout(function(){D(m.$el),A(m.$el);var g=setTimeout(function(){m.$refs.affixHeaderRef&&A(m.$refs.affixHeaderRef),clearTimeout(g)});clearTimeout(h)},60)}return{innerPagination:i,isRowDraggable:R,isRowHandlerDraggable:C,isColDraggable:O,setDragSortPrimaryTableRef:P,setDragSortColumns:F}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Xs(t){var e=Yt(),a=gt("table",t.locale),n=a.globalConfig,r=it(),o=r.isLoadingClass,l=r.isLoadMoreClass,i=r.asyncLoadingClass,u=N(function(){return[i,z(z({},o,t.asyncLoading==="loading"),l,t.asyncLoading==="load-more")]});function s(){var d;!Lt(t.asyncLoading)||(d=t.onAsyncLoadingClick)===null||d===void 0||d.call(t,{status:t.asyncLoading})}function v(){var d=e("asyncLoading");if(Lt(d)){var p=t.asyncLoading,b={"load-more":n.value.loadingMoreText,loading:n.value.loadingText}[String(p)];return k("div",{class:u.value,onClick:s},[k(ko,{indicator:p==="loading",loading:!!p,size:"small",text:b},null)])}return[null,!1,void 0].includes(d)?null:k("div",{class:u.value,onClick:s},[d])}return{renderAsyncLoading:v}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function xo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function _e(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?xo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):xo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Gs=He({name:"TableEditableCell",props:{row:Object,rowKey:String,rowIndex:Number,col:Object,colIndex:Number,oldCell:[Function,String],tableBaseClass:Object,cellEmptyContent:[Function,String],editable:{type:Boolean,default:void 0},readonly:{type:Boolean},errors:{type:Array,default:void 0},onChange:Function,onValidate:Function,onRuleChange:Function,onEditableChange:Function},emits:["update-edited-cell"],setup:function(e,a){var n,r=Ie(e),o=r.row,l=r.col;W(null);var i=N(function(){var c;return(c=l.value.edit)===null||c===void 0?void 0:c.keepEditMode}),u=W(i.value||((n=e.col.edit)===null||n===void 0?void 0:n.defaultEditable)||!1),s=W(),v=W(),d=It(),p=_n({Edit1Icon:Pi}),b=p.Edit1Icon,w=function(f){if(vt(f)==="object"&&("rowValue"in f||f.isUpdateCurrentRow)){var x=f.isUpdateCurrentRow?H(o.value,e.rowKey):f.rowValue;delete f.rowValue,delete f.isUpdateCurrentRow,a.emit("update-edited-cell",x,o.value,f)}else s.value=f};ce([i],function(c){c&&(u.value=!0)});var y=N(function(){var c,f;return((c=l.value.edit)===null||c===void 0||(f=c.on)===null||f===void 0?void 0:f.call(c,_e(_e({},R.value),{},{editedRow:C.value,updateEditedCellValue:w})))||{}}),R=N(function(){return{rowIndex:e.rowIndex,colIndex:e.colIndex,col:e.col,row:e.row}}),C=N(function(){var c=l.value.colKey,f=c.split(".")||[],x=gi(f),E=x[0],L=x.slice(1),K=_e({},o.value);return L.length?(K[E]=lr(o.value[E]),$n(K[E],L.join("."),s.value)):$n(K,c,s.value),K}),O=N(function(){var c=ma({row:C.value,col:_e(_e({},l.value),{},{cell:e.oldCell}),rowIndex:e.rowIndex,colIndex:e.colIndex},a.slots,{cellEmptyContent:e.cellEmptyContent});return c}),S=N(function(){var c=l.value.edit;return Re(c.props)?c.props(_e(_e({},R.value),{},{editedRow:C.value,updateEditedCellValue:w})):_e({},c.props)}),D=N(function(){var c,f=l.value.edit;if(!f)return{};var x=_e({},S.value);return delete x.onChange,delete x.value,(c=f.abortEditOnEvent)===null||c===void 0||c.forEach(function(E){delete x[E]}),x}),j=N(function(){var c,f=l.value.edit;return f?Boolean((c=f.abortEditOnEvent)===null||c===void 0?void 0:c.includes("onChange")):!1}),A=function(f){return new Promise(function(x){var E={result:[_e(_e({},R.value),{},{errorList:[],value:s.value})],trigger:f},L=Re(l.value.edit.rules)?l.value.edit.rules(R.value):l.value.edit.rules;if(!l.value.edit||!L||!L.length){var K;(K=e.onValidate)===null||K===void 0||K.call(e,E),x(!0);return}tl(s.value,L).then(function(B){var $,Y=B==null?void 0:B.filter(function(ee){return!ee.result});E.result[0].errorList=Y,($=e.onValidate)===null||$===void 0||$.call(e,E),!Y||!Y.length?(v.value=[],x(!0)):(v.value=Y,x(Y))})})},P=function(f,x){return Xa(f)&&Xa(x)?JSON.stringify(f)===JSON.stringify(x):f===x},F=function(f,x){for(var E=arguments.length,L=new Array(E>2?E-2:0),K=2;K<E;K++)L[K-2]=arguments[K];A("self").then(function(B){var $,Y;if(B===!0){var ee=H(o.value,l.value.colKey);P(s.value,ee)||(s.value=ee,f==null||f.apply(void 0,L)),($=(Y=y.value)[x])===null||$===void 0||$.call(Y,L[2]);var ae=setTimeout(function(){var ne;i.value||(u.value=!1),v.value=[],(ne=e.onEditableChange)===null||ne===void 0||ne.call(e,_e(_e({},R.value),{},{value:s.value,editedRow:_e(_e({},e.row),{},z({},e.col.colKey,s.value)),validateEdit:A,isEdit:!1})),clearTimeout(ae)},0)}})},T=N(function(){var c,f=l.value.edit,x=e.editable===void 0;if(!(!u.value||!x)){if(!(f!=null&&(c=f.abortEditOnEvent)!==null&&c!==void 0&&c.length))return{};var E={},L=f==null?void 0:f.onEdited;return f.abortEditOnEvent.forEach(function(K){K!=="onChange"&&(E[K]=function(){for(var B=arguments.length,$=new Array(B),Y=0;Y<B;Y++)$[Y]=arguments[Y];F.apply(void 0,[L,K,_e(_e({},R.value),{},{trigger:K,newRowData:C.value})].concat($))})}),E}}),I=function(f){var x,E,L,K,B,$,Y;s.value=f;for(var ee=_e(_e({},R.value),{},{value:f,editedRow:_e(_e({},e.row),{},z({},e.col.colKey,f))}),ae=arguments.length,ne=new Array(ae>1?ae-1:0),Q=1;Q<ae;Q++)ne[Q-1]=arguments[Q];(x=S.value)===null||x===void 0||(E=x.onChange)===null||E===void 0||E.call.apply(E,[x,f].concat(ne)),(L=e.onChange)===null||L===void 0||L.call(e,ee),(K=e.onRuleChange)===null||K===void 0||K.call(e,ee),(B=y.value)===null||B===void 0||($=B.onChange)===null||$===void 0||$.call(B,ee);var M=e.editable===void 0;if(M&&j.value){var X,q=(X=l.value.edit)===null||X===void 0?void 0:X.onEdited;F.apply(void 0,[q,"change",_e(_e({},R.value),{},{trigger:"onChange",newRowData:C.value})].concat(ne))}((Y=l.value.edit)===null||Y===void 0?void 0:Y.validateTrigger)==="change"&&A("self")},_=function(f){var x;if(!(!l.value.edit||!l.value.edit.component)&&!!u.value){var E=((x=f.composedPath)===null||x===void 0?void 0:x.call(f))||f.path||[],L=E.find(function(B){var $;return($=B.classList)===null||$===void 0?void 0:$.contains("".concat(d.value,"-popup__content"))});if(!L){var K=l.value.edit.onEdited;F(K,"",_e(_e({},R.value),{},{trigger:"document",newRowData:C.value}))}}},m=function(){var f;(f=e.onEditableChange)===null||f===void 0||f.call(e,_e(_e({},R.value),{},{value:s.value,editedRow:e.row,isEdit:!0,validateEdit:A}))},h=function(f){u.value=!0,m(),f.stopPropagation()};pt(function(){var c;(c=e.col.edit)!==null&&c!==void 0&&c.defaultEditable&&m()});var g=N(function(){return H(o.value,l.value.colKey)});return ce(g,function(c){s.value=c},{immediate:!0}),ce(u,function(c){var f=e.editable===void 0;!l.value.edit||!l.value.edit.component||!f||(c?Te(document,"click",_):Se(document,"click",_))},{immediate:!0}),ce(function(){return[e.editable,e.row,e.col,e.rowIndex,e.colIndex]},function(c){var f=Pe(c,1),x=f[0];if(x===!1)s.value=g.value;else if(x===!0){var E;(E=e.onRuleChange)===null||E===void 0||E.call(e,_e(_e({},R.value),{},{value:g.value,editedRow:o.value}))}},{immediate:!0}),ce(function(){return e.errors},function(c){v.value=c}),function(){var c,f,x,E;if(e.readonly)return O.value;if(e.editable===void 0&&!u.value||e.editable===!1){var L;return k("div",{class:e.tableBaseClass.cellEditable,onClick:h},[O.value,((L=l.value.edit)===null||L===void 0?void 0:L.showEditIcon)!==!1&&k(b,null,null)])}var K=(c=l.value.edit)===null||c===void 0?void 0:c.component;if(!K)return ze.error("Table","edit.component is required."),null;var B=(f=v.value)===null||f===void 0||(f=f[0])===null||f===void 0?void 0:f.message,$=_e({},y.value);return delete $.onChange,(x=l.value.edit)!==null&&x!==void 0&&(x=x.abortEditOnEvent)!==null&&x!==void 0&&x.length&&l.value.edit.abortEditOnEvent.forEach(function(Y){$[Y]&&delete $[Y]}),k("div",{class:e.tableBaseClass.cellEditWrap,onClick:function(ee){ee.stopPropagation()},ref:"tableEditableCellRef"},[k(K,Ke({status:B?((E=v.value)===null||E===void 0||(E=E[0])===null||E===void 0?void 0:E.type)||"error":void 0,tips:B},D.value,T.value,$,{value:s.value,onChange:I}),null)])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function So(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Fn(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?So(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):So(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function Ys(t){var e=Ie(t),a=e.editableRowKeys,n=new Map,r=W({}),o=N(function(){return vs(t.editableRowKeys,t.data,t.rowKey||"id")}),l=W({}),i=W({}),u=function(S){var D={};return S.forEach(function(j){var A=j.row,P=j.col,F=j.errorList,T=H(A,t.rowKey||"id"),I=[T,P.colKey].join("__");F!=null&&F.length?D[I]=F:delete D[I]}),D},s=function(S){var D=n.get(S);if(!!D){var j=D.map(function(A){return new Promise(function(P){var F=A.editedRow,T=A.col,I=Re(T.edit.rules)?T.edit.rules(A):T.edit.rules;if(!T.edit||!I||!I.length){P(Fn(Fn({},A),{},{errorList:[]}));return}tl(H(F,T.colKey),I).then(function(_){P(Fn(Fn({},A),{},{errorList:_.filter(function(m){return!m.result})}))})})});return new Promise(function(A,P){Promise.all(j).then(function(F){A({errors:F.filter(function(T){var I;return(I=T.errorList)===null||I===void 0?void 0:I.length}),errorMap:u(F)})},P)})}},v=function(S){return new Promise(function(D,j){s(S).then(function(A){var P,F=A.errors,T=A.errorMap;r.value=T;var I="parent";(P=t.onRowValidate)===null||P===void 0||P.call(t,{trigger:I,result:F}),D({trigger:I,result:F})},j)})},d=function(){var S=Object.keys(l.value),D=S.map(function(j){return l.value[j].validateEdit("parent")});return new Promise(function(j,A){Promise.all(D).then(function(P){var F,T={};P.forEach(function(I,_){I!==!0&&(T[S[_]]=I)}),(F=t.onValidate)===null||F===void 0||F.call(t,{result:T}),j({result:T})},A)})},p=function(){if(Object.keys(l.value).length)return d();for(var S=[],D=t.data||[],j=0,A=D.length;j<A;j++){var P=H(D[j],t.rowKey||"id");S.push(s(P))}return new Promise(function(F,T){Promise.all(S).then(function(I){var _,m={};I.forEach(function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{errors:[],errorMap:{}},g=h.errorMap;g&&Object.assign(m,g)}),r.value=m,(_=t.onValidate)===null||_===void 0||_.call(t,{result:m}),F({result:m})},T)})},b=function(S,D,j){i.value[S]||(i.value[S]=lr(D)),Object.entries(j).forEach(function(A){var P=Pe(A,2),F=P[0],T=P[1];$n(i.value[S],F,T)})},w=function(S){if(t.editableRowKeys){var D=H(S.row,t.rowKey||"id"),j=n.get(D);if(j){var A=j.findIndex(function(P){return P.col.colKey===S.col.colKey});A===-1?j.push(S):j[A]=S,n.set(D,j)}else n.set(D,[S])}},y=function(){r.value={}},R=function(S){var D=Vn(S.row,t.rowKey,S.col.colKey,S.colIndex);S.isEdit?l.value[D]=S:delete l.value[D]},C=function(S){var D,j=S.row,A=S.col,P=H(j,t.rowKey||"id"),F=i.value[P];if(F&&(D=t.editableRowKeys)!==null&&D!==void 0&&D.includes(P)){var T=Fn({},F);return $n(T,A.colKey,H(F,A.colKey)),T}return j};return ce(function(){var O;return(O=a.value)===null||O===void 0?void 0:O.join(",")},function(O){var S=O.split(","),D=Object.keys(i.value);D.forEach(function(j){S.includes(j)||delete i.value[j]})}),{editedFormData:i,errorListMap:r,editableKeysMap:o,validateTableData:p,validateRowData:v,onRuleChange:w,clearValidateData:y,onUpdateEditedCell:b,getEditRowData:C,onPrimaryTableCellEditChange:R}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Oo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function jt(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Oo(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Oo(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var qs=["hideSortTips","dragSort","defaultExpandedRowKeys","defaultSelectedRowKeys","columnController","filterRow","sortOnRowDraggable","expandOnRowClick","expand-on-row-click","expanded-row","editable-row-keys","editable-cell-state","filter-value","multipleSort","expandIcon","expand-icon","reserveSelectedRowOnPaginate","expandedRowKeys","expandedRow","reserve-selected-row-on-paginate","reserveSelectedRowOnPaginate","selected-row-keys","selectedRowKeys","selectOnRowClick","column-controller","columnController","dragSort","drag-sort","hideSortTips","showSortColumnBgColor","filter-row","filterRow","multiple-sort","multipleSort","async-loading","onChange","onAsyncLoadingClick","onColumnChange","onColumnControllerVisibleChange","onDataChange","onDisplayColumnsChange","onDragSort","onExpandChange","onFilterChange","onSelectChange","onSortChange"],pr=He({name:"TPrimaryTable",props:jt(jt({},Rn),gl),setup:function(e,a){var n=Yt(),r=Ie(e),o=r.columns,l=r.columnController,i=W(null),u=W(!1),s=it(),v=s.classPrefix,d=s.tableDraggableClasses,p=s.tableBaseClass,b=s.tableSelectedClasses,w=s.tableSortClasses,y=gt("table",e.locale),R=y.globalConfig,C=fl(e),O=C.sizeClassNames,S=N(function(){var ye;return(ye=e.size)!==null&&ye!==void 0?ye:R.value.size}),D=cs(e,a),j=D.tDisplayColumns,A=D.renderColumnController,P=ds(e,a),F=P.showExpandedRow,T=P.showExpandIconColumn,I=P.getExpandColumn,_=P.renderExpandedRow,m=P.onInnerExpandRowClick,h=bs(e,a),g=h.renderSortIcon,c=fs(e,b),f=c.selectColumn,x=c.showRowSelect,E=c.selectedRowClassNames,L=c.currentPaginateData,K=c.formatToRowSelectColumn,B=c.setTSelectedRowKeys,$=c.onInnerSelectRowClick,Y=c.handleRowSelectWithAreaSelection,ee=ys(e,a),ae=ee.hasEmptyCondition,ne=ee.isTableOverflowHidden,Q=ee.renderFilterIcon,M=ee.renderFirstFilterRow,X=ee.setFilterPrimaryTableRef,q=N(function(){return{showElement:u.value}}),Z=Us(e,a,q),fe=Z.isRowHandlerDraggable,he=Z.isRowDraggable,Le=Z.isColDraggable,We=Z.innerPagination,qe=Z.setDragSortPrimaryTableRef,Ne=Z.setDragSortColumns,nt=il(e),ut=nt.renderTitleWidthIcon,st=Xs(e),Tt=st.renderAsyncLoading,je=Ys(e),Dn=je.errorListMap,Tn=je.editableKeysMap,Pn=je.validateRowData,re=je.validateTableData,V=je.onRuleChange,G=je.clearValidateData,J=je.onUpdateEditedCell,te=je.getEditRowData,le=je.onPrimaryTableCellEditChange,ge=N(function(){return Boolean(F.value||x.value)}),pe=N(function(){return Boolean(F.value||x.value)}),ue=N(function(){var ye;return z(z(z(z(z(z(z(z({},d.colDraggable,Le.value),d.rowHandlerDraggable,fe.value),d.rowDraggable,he.value),p.overflowVisible,ne.value===!1),p.tableRowEdit,e.editableRowKeys),"".concat(v,"-table--select-").concat((ye=f.value)===null||ye===void 0?void 0:ye.type),f.value),"".concat(v,"-table--row-select"),x.value),"".concat(v,"-table--row-expandable"),F.value)}),we=N(function(){var ye=[e.rowClassName,E.value];return ye.filter(function(de){return de})}),Ee=N(function(){var ye=[e.rowAttributes];return(fe.value||he.value)&&ye.push(function(de){var Fe=de.row;return{"data-id":H(Fe,e.rowKey||"id")}}),ye.filter(function(de){return de})});pt(function(){X(i.value),qe(i.value)}),a.expose({validateRowData:Pn,validateTableData:re,clearValidateData:G,refreshTable:function(){i.value.refreshTable()},scrollToElement:function(de){i.value.scrollToElement(de)},scrollColumnIntoView:function(de){i.value.scrollColumnIntoView(de)},baseTableRef:i});var Ae=function(de){var Fe;(Fe=e.onRowEdit)===null||Fe===void 0||Fe.call(e,de);var Je=H(de.editedRow,e.rowKey||"id");J(Je,de.row,z({},de.col.colKey,de.value))},Me=function(de){for(var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Je=[],Xe=function(){var Zt,Qt,en,Ht,Wt,Ce=jt({},de[bt]),$t=((Zt=Ce.children)===null||Zt===void 0?void 0:Zt.length)||((Qt=j.value)===null||Qt===void 0?void 0:Qt.includes(Ce.colKey));if(!$t&&(e.columnController||e.displayColumns||e.defaultDisplayColumns)&&!Fe)return 1;Ce=K(Ce);var tn=e.sort;if(Ce.sorter&&e.showSortColumnBgColor){var hn=tn instanceof Array?tn:[tn],nn=hn.find(function(be){return be&&be.sortBy===Ce.colKey&&be.descending!==void 0});nn&&(Ce.className=Ce.className instanceof Array?Ce.className.concat(w.sortColumn):[Ce.className,w.sortColumn])}if(Ce.sorter||Ce.filter){var St=Ea(a.slots,Ce,bt),Ot=Ce,Da=Ot.ellipsisTitle;Ce.title=function(be,me){var De,Ge=Ce.sorter?g(me):null,At=Ce.filter?Q(me):null,an=(De=i.value)===null||De===void 0?void 0:De.tableContentRef;return ut([St,Ge,At],me.col,me.colIndex,Da,an,{classPrefix:v,ellipsisOverlayClassName:S.value!=="medium"?O[S.value]:""})},Ce.ellipsisTitle=!1}if((en=Ce.edit)!==null&&en!==void 0&&en.component){var Ta=Ce.cell;Ce.cell=function(be,me){var De=jt(jt({},me),{},{row:te(me),oldCell:Ta,rowKey:e.rowKey||"id",tableBaseClass:p,cellEmptyContent:e.cellEmptyContent,onChange:Ae,onValidate:e.onRowValidate,onRuleChange:V,onEditableChange:le});if(e.editableRowKeys){var Ge,At=H(me.row,e.rowKey||"id");De.editable=Tn.value[At]||!1;var an=[At,me.col.colKey].join("__"),Jn=(Ge=Dn.value)===null||Ge===void 0?void 0:Ge[an];Jn&&(De.errors=Jn)}return e.editableCellState&&(De.readonly=!e.editableCellState(me)),k(Gs,Ke(De,{onUpdateEditedCell:J}),a.slots)}}if((Ht=Ce.children)!==null&&Ht!==void 0&&Ht.length){var An;Ce.children=Me(Ce.children,Fe||((An=j.value)===null||An===void 0?void 0:An.includes(Ce.colKey)))}(!Ce.children||(Wt=Ce.children)!==null&&Wt!==void 0&&Wt.length)&&Je.push(Ce)},bt=0,Jt=de.length;bt<Jt;bt++)Xe();return Je},Pt=N(function(){var ye=Me(o.value);return T.value&&ye.unshift(I()),ye}),Bt=function(de,Fe){var Je,Xe;We.value=jt(jt({},We.value),de),L.value=Fe,(Je=e.onPageChange)===null||Je===void 0||Je.call(e,de,Fe);var bt=[{pagination:de},{trigger:"pagination",currentData:Fe}];(Xe=e.onChange)===null||Xe===void 0||Xe.call.apply(Xe,[e].concat(bt)),e.reserveSelectedRowOnPaginate||B([],{selectedRowData:[],type:"uncheck",currentRowKey:"CLEAR_ON_PAGINATE"})},at=function(de){var Fe;(Fe=e.onActiveRowAction)===null||Fe===void 0||Fe.call(e,de),Y(de)},zt=function(de){e.expandOnRowClick&&m(de),e.selectOnRowClick&&$(de)},yt,fn=250,Ct=function(de){if(!e.onRowDblclick){zt(de);return}yt?(clearTimeout(yt),yt=void 0):yt=setTimeout(function(){zt(de),yt=void 0},fn)},xt=function(de){u.value=de};return function(){var ye,de,Fe=function($t,tn,hn,nn){if(!hn)return e[$t];var St=tn(Ye),Ot=n($t);return St&&!Ot?function(){return St}:Ot&&!St?function(){return Ot}:St&&Ot?function(){return nn!=null&&nn.reverse?k("div",null,[St,Ot]):k("div",null,[Ot,St])}:null},Je=!!(l.value&&Object.keys(l.value).length),Xe=Je?l.value.placement||"top-right":"",bt=Je&&(Xe==null?void 0:Xe.indexOf("bottom"))!==-1,Jt=Fe("topContent",A,Je&&!bt),qn=Fe("bottomContent",A,bt,{reverse:!0}),Zt=Fe("firstFullRow",M,!ae.value),Qt=Fe("lastFullRow",Tt,!!e.asyncLoading),en=Bo(),Ht=en.vnode,Wt=jt(jt({},ni(Ht.props,qs)),{},{rowKey:e.rowKey,rowClassName:we.value,rowAttributes:Ee.value,columns:Pt.value,keyboardRowHover:(ye=e.keyboardRowHover)!==null&&ye!==void 0?ye:ge.value,disableSpaceInactiveRow:(de=e.disableSpaceInactiveRow)!==null&&de!==void 0?de:pe.value,topContent:Jt,bottomContent:qn,firstFullRow:Zt,lastFullRow:Qt,thDraggable:["col","row-handler-col"].includes(e.dragSort),onShowElementChange:xt,onPageChange:Bt,renderExpandedRow:F.value?_:void 0,onActiveRowAction:at});return(e.expandOnRowClick||e.selectOnRowClick)&&(Wt.onRowClick=Ct),k(hl,Ke(Wt,{ref:i,class:ue.value,onLeafColumnsChange:Ne}),a.slots)}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Js={beforeDragSort:{type:Function},expandedTreeNodes:{type:Array,default:void 0},defaultExpandedTreeNodes:{type:Array,default:function(){return[]}},tree:{type:Object},treeExpandAndFoldIcon:{type:Function},onAbnormalDragSort:Function,onExpandedTreeNodesChange:Function,onTreeExpandChange:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ro(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function sa(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Ro(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Ro(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var Eo={code:1001,reason:"The same level of rows can not be swapped."};function Ft(t,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=H(t,e);return a||n?"".concat(r,"_").concat(a||0,"_").concat(n||0,"}"):r}var Zs=function(){function t(){ri(this,t),z(this,"treeDataMap",new Map),z(this,"expandAllRowIndex",void 0),this.treeDataMap=new Map}return ai(t,[{key:"initialTreeStore",value:function(a,n,r){var o;(o=this.treeDataMap)===null||o===void 0||o.clear(),this.initialTreeDataMap(this.treeDataMap,a,n.find(function(l){return l.colKey==="row-select"}),r)}},{key:"getAllUniqueKeys",value:function(a,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=a.length;o<l;o++){var i=a[o];r.push(Ft(i,n.rowKey));var u=H(i,n.childrenKey);u!=null&&u.length&&this.getAllUniqueKeys(u,n,r)}return r}},{key:"getExpandedChildrenKeys",value:function(a,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],o=0,l=a.length;o<l;o++){var i=a[o],u=Ft(i,n.rowKey),s=this.treeDataMap.get(u);s.expanded&&r.push(u);var v=H(i,n.childrenKey);v!=null&&v.length&&this.getExpandedChildrenKeys(v,n,r)}return r}},{key:"expandTreeNode",value:function(a,n,r){var o=this;return a.length&&a.forEach(function(l){var i=o.treeDataMap.get(l);!i||o.toggleExpandData({row:i.row,rowIndex:i.rowIndex},n,r,"expand")}),n}},{key:"foldTreeNode",value:function(a,n,r){var o=this;return a.length&&a.forEach(function(l){var i=o.treeDataMap.get(l);!i||o.toggleExpandData({row:i.row,rowIndex:i.rowIndex},n,r,"fold")}),n}},{key:"toggleExpandData",value:function(a,n,r,o){var l;if(!a)return ze.error("EnhancedTable","the node toggleExpanded doest not exist in `data`"),n;var i=H(a.row,r.rowKey);if(Sn(i))return ze.error("EnhancedTable","`rowKey` could be wrong, can not get rowValue from `data` by `rowKey`."),[];var u=H(a.row,r.childrenKey);if(u===!0)return n;var s=this.treeDataMap.get(i);return o==="expand"&&s.expanded||o==="fold"&&!s.expanded?n:(s.rowIndex=(l=s.rowIndex)!==null&&l!==void 0?l:a.rowIndex,s.expanded=!s.expanded,this.treeDataMap.set(i,s),this.updateExpandRow(s,n,r))}},{key:"updateExpandRow",value:function(a,n,r){var o=a.row,l=a.rowIndex,i=a.expanded,u=this.treeDataMap,s=H(o,r.childrenKey);if(!o||!s)return n;if(i)rr(u,a,i,r),mn(u,o,s.length,"expand",r),n.splice.apply(n,[l+1,0].concat(s));else{rr(u,a,i,r);var v=a.expandChildrenLength||s.length;mn(u,o,-1*v,"fold",r),n.splice(l+1,v)}return ln(u,n,{rowKey:r.rowKey,minRowIndex:l+1}),n}},{key:"getData",value:function(a){return this.treeDataMap.get(a)}},{key:"updateData",value:function(a,n,r,o){var l=Ft(n,o.rowKey),i=this.treeDataMap.get(a);if(!i||i.rowIndex===-1)return Kl(r,a,n,{rowKey:o.rowKey,childrenKey:o.childrenKey}),-1;if(H(n,o.childrenKey)===!0){var u=H(i.row,o.childrenKey);if(u!=null&&u.length)for(var s=0,v=u.length;s<v;s++){var d=Ft(u[s],o.rowKey),p=this.treeDataMap.get(d);p&&this.treeDataMap.delete(d)}}var b=i.rowIndex;if(i.row=n,i.id=l,i.parent){var w=H(i.parent.row,o.childrenKey),y=w.findIndex(function(R){return Ft(R,o.rowKey)===a});w[y]=n}return this.treeDataMap.set(l,i),a!==l&&this.treeDataMap.delete(a),b}},{key:"remove",value:function(a,n,r){var o=this.treeDataMap.get(a);if(o&&o.rowIndex>=0){var l=(o.expandChildrenLength||0)+1;if(n.splice(o.rowIndex,l),o.parent){var i=H(o.parent.row,r.childrenKey),u=i.findIndex(function(s){return H(s,r.rowKey)===a});i.splice(u,1),mn(this.treeDataMap,o.parent.row,-1*l,"delete",r)}this.treeDataMap.delete(a),ln(this.treeDataMap,n,{minRowIndex:o.rowIndex,rowKey:r.rowKey,type:"remove"})}else ze.warn("EnhancedTable","Can not remove this node, which is not appeared.");return n}},{key:"removeChildren",value:function(a,n,r){var o=this.treeDataMap.get(a);if(o&&o.rowIndex>=0){var l=o.expandChildrenLength||0;l&&n.splice(o.rowIndex+1,l),o.parent&&mn(this.treeDataMap,o.parent.row,-1*l,"delete",r),o.expandChildrenLength=0,o.expanded=!1,$n(o.row,r.childrenKey,void 0),this.treeDataMap.set(a,o),l&&ln(this.treeDataMap,n,{minRowIndex:o.rowIndex+1,rowKey:r.rowKey,type:"remove"})}else ze.warn("EnhancedTable","Can not remove this node's children, which is not appeared.");return n}},{key:"appendTo",value:function(a,n,r,o){var l=this.treeDataMap.get(a);if(!this.validateDataExist(l,a))return r;for(var i=H(l.row,o.childrenKey),u=l.expanded||!(i!=null&&i.length),s=n instanceof Array?n:[n],v=[],d=-1,p=0,b=s.length;p<b;p++){var w=s[p],y=Ft(w,o.rowKey),R=this.treeDataMap.get(y);if(!this.validateDataDoubleExist(R,y))ze.warn("Table","Duplicated Data `".concat(y,"` has been removed."));else{var C=u?l.rowIndex+(l.expandChildrenLength||0)+(p+1):-1;p===0&&(d=C);var O={id:y,row:w,rowIndex:C,level:l.level+1,expanded:!1,expandChildrenLength:0,disabled:!1,path:ve(l.path),parent:l};O.path=O.path.concat(O),v.push(w),this.treeDataMap.set(y,O)}}if(!v.length)return r;if(i!=null&&i.length?l.row[o.childrenKey]=l.row[o.childrenKey].concat(v):(l.row[o.childrenKey]=v,l.expanded=!0),u){r.splice.apply(r,[d,0].concat(v));var S=v.length||1;mn(this.treeDataMap,l.row,S,"insert",{rowKey:o.rowKey,childrenKey:o.childrenKey}),ln(this.treeDataMap,r,{minRowIndex:d+v.length-1,rowKey:o.rowKey,type:"add",count:1})}return r}},{key:"appendToRoot",value:function(a,n,r){for(var o=n.concat(a),l=a instanceof Array?a:[a],i=n.length,u=0,s=l.length;u<s;u++){var v=H(l[u],r.rowKey);if(!v){ze.error("Table","`rowKey` could be wrong, can not get rowValue from `data` by `rowKey`.");continue}var d={id:v,row:l[u],rowIndex:i+u,level:0,expanded:!1,expandChildrenLength:0,disabled:!1};d.path=[d],this.treeDataMap.set(v,d)}return o}},{key:"insertAfter",value:function(a,n,r,o){return this.insert(a,n,r,o,"after")}},{key:"insertBefore",value:function(a,n,r,o){return this.insert(a,n,r,o,"before")}},{key:"insert",value:function(a,n,r,o,l){var i=this.treeDataMap.get(a);if(!this.validateDataExist(i,a))return r;var u=H(n,o.rowKey),s=this.treeDataMap.get(u);if(!this.validateDataDoubleExist(s,u))return r;var v=l==="after"?i.rowIndex+1:i.rowIndex,d={id:u,row:n,rowIndex:v,level:i.level,expanded:!1,expandChildrenLength:0,disabled:!1,path:i.path.slice(0,-1),parent:i.parent};d.path=d.path.concat(d);var p=l==="after"?i.rowIndex+(i.expandChildrenLength+1):i.rowIndex;r.splice(p,0,n);var b=l==="after"?1:0;if(i.parent){var w=i.parent.row[o.childrenKey].findIndex(function(y){return a===H(y,o.rowKey)});i.parent.row[o.childrenKey].splice(w+b,0,n),mn(this.treeDataMap,i.parent.row,1,"insert",o)}return this.treeDataMap.set(u,d),ln(this.treeDataMap,r,{rowKey:o.rowKey,minRowIndex:i.rowIndex+1,type:"add"}),r}},{key:"swapData",value:function(a,n,r){var o=n.currentIndex,l=n.targetIndex;if(o===l)return{dataSource:a,result:!0};var i=H(n.current,r.rowKey),u=H(n.target,r.rowKey),s=this.treeDataMap.get(i),v=this.treeDataMap.get(u);if(s.level!==v.level)return{dataSource:a,result:!1,code:Eo.code,reason:Eo.reason};var d=o+s.expandChildrenLength+1,p=l+v.expandChildrenLength+1,b=a.slice(o,d),w=a.slice(l,p);if(o>l){var y=a.slice(p,o),R=b.concat(w,y);a.splice(l,R.length),a.splice.apply(a,[l,0].concat(ve(R))),ln(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:l,maxRowIndex:d})}else{var C=a.slice(d,l),O=C.concat(w,b);a.splice(o,O.length),a.splice.apply(a,[o,0].concat(ve(O))),ln(this.treeDataMap,a,{rowKey:r.rowKey,minRowIndex:o,maxRowIndex:p})}if(s.parent){for(var S=s.parent.row[r.childrenKey],D=0,j=-1,A=-1,P=0,F=S.length;P<F&&(H(S[P],r.rowKey)===i&&(A=P,D+=1),H(S[P],r.rowKey)===u&&(j=P,D+=1),!(D>=2));P++);A<j?(S.splice(j+1,0,n.current),S.splice(A,1)):(S.splice(A,1),S.splice(j,0,n.current))}return{dataSource:a,result:!0}}},{key:"expandAll",value:function(a,n){var r=this;this.expandAllRowIndex=0;var o=[],l=function(u,s){for(var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,d=0,p=u.length;d<p;d++){var b=u[d],w=H(b,s.rowKey),y=r.treeDataMap.get(w),R=H(b,s.childrenKey);if(y.rowIndex=r.expandAllRowIndex,R!==!0&&R!==null&&R!==void 0&&R.length&&(y.expanded=!0),y.expandChildrenLength=(R==null?void 0:R.length)||0,r.expandAllRowIndex+=1,o.push(b),r.treeDataMap.set(w,y),R!=null&&R.length){for(var C=v;(O=C)!==null&&O!==void 0&&O.row;){var O;C.expandChildrenLength+=R.length,r.treeDataMap.set(C.id,C),C=C.parent}l(R,s,y)}}};return l(a,n),o}},{key:"foldAll",value:function(a,n){for(var r=[],o=0,l=0,i=a.length;l<i;l++){var u=a[l],s=H(u,n.rowKey),v=this.treeDataMap.get(s);v.rowIndex=v.level===0?o:-1,v.expanded=!1,v.expandChildrenLength=0,v.level===0&&(r.push(u),o+=1);var d=H(u,n.childrenKey);d!=null&&d.length&&this.foldAll(d,n)}return r}},{key:"getTreeNode",value:function(a,n){for(var r=[],o=0,l=a.length;o<l;o++){var i=a[o],u=H(i,n.rowKey),s=this.treeDataMap.get(u);s.level===0&&r.push(i)}return r}},{key:"getTreeExpandedRow",value:function(a,n){var r=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"data",l=[];return a.forEach(function(i){var u=H(i,n.rowKey),s=r.treeDataMap.get(u);!s.expanded||(o==="unique"?l.push(u):o==="data"?l.push(i):l.push(s))}),l}},{key:"initialTreeDataMap",value:function(a,n,r,o){for(var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,u=0,s=n.length;u<s;u++){var v=n[u],d=Ft(v,o.rowKey);if(Sn(d)){ze.error("EnhancedTable","`rowKey` could be wrong, can not get rowValue from `data` by `rowKey`.");return}var p=H(v,o.childrenKey),b={id:d,row:v,rowIndex:l===0?u:-1,level:l,expanded:!1,expandChildrenLength:0,disabled:Qa(r,v,u),parent:i};b.path=i?i.path.concat(b):[b],a.set(d,b),p!=null&&p.length&&this.initialTreeDataMap(a,p,r,o,l+1,b)}}},{key:"updateDisabledState",value:function(a,n,r){for(var o=0,l=a.length;o<l;o++){var i=a[o],u=H(i,r.rowKey);if(Sn(u)){ze.error("EnhancedTable","`rowKey` could be wrong, can not get rowValue from `data` by `rowKey`.");return}var s=this.treeDataMap.get(u);s.disabled=Qa(n,i,o),this.treeDataMap.set(u,s);var v=H(i,r.childrenKey);v!=null&&v.length&&this.updateDisabledState(v,n,r)}}},{key:"validateDataExist",value:function(a,n){return a?!0:(ze.warn("EnhancedTable","".concat(n," does not exist.")),!1)}},{key:"validateDataDoubleExist",value:function(a,n){return a?(ze.warn("EnhancedTable","Duplicated Key. ".concat(n," already exists.")),!1):!0}}])}();function mn(t,e,a,n,r){for(var o=e;o;){var l,i=t.get(H(o,r.rowKey)),u=(i.expandChildrenLength||0)+a;i.expandChildrenLength=Math.max(0,u),o=i==null||(l=i.parent)===null||l===void 0?void 0:l.row}n==="fold"&&Fl(t,e,r)}function Fl(t,e,a){var n=H(e,a.childrenKey);n!=null&&n.length&&n.forEach(function(r){var o=t.get(H(r,a.rowKey));!o||(o.expandChildrenLength=0,Fl(t,o.row,a))})}function rr(t,e,a,n){var r=e.row,o=e.rowIndex,l=H(r,n.childrenKey);l.forEach(function(i,u){var s=H(i,n.rowKey),v=a?o+1+u:-1,d=t.get(s),p=sa(sa({},d),{},{row:i,rowIndex:v,expanded:!1,parent:e});if(t.set(s,p),!a){var b=H(i,n.childrenKey);b!=null&&b.length&&rr(t,sa(sa({},p),{},{rowIndex:-1,expanded:!1}),a,n)}})}function Kl(t,e,a,n){for(var r=0,o=t.length;r<o;r++){var l=t[r];if(H(l,n.rowKey)===e){t[r]=a;return}var i=H(l,n.childrenKey)||[];i!=null&&i.length&&Kl(i,e,a,n)}}function ln(t,e,a){for(var n=a.minRowIndex||0,r=a.maxRowIndex||e.length,o=n;o<r;o++){var l=e[o],i=t.get(H(l,a.rowKey));i||ze.warn("Table","tree map went wrong"),i.rowIndex=o+((a==null?void 0:a.count)||1)-1}}function Qs(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=[],n=[],r=new Map,o=new Map,l=0,i=t.length;l<i;l++)r.set(t[l],!0);for(var u=0,s=e.length;u<s;u++)o.set(e[u],!0);for(var v=0,d=t.length;v<d;v++)o.get(t[v])||n.push(t[v]);for(var p=0,b=e.length;p<b;p++)r.get(e[p])||a.push(e[p]);return{removedList:a,addedList:n}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function _o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Va(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?_o(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):_o(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function ec(t,e){var a=e.store,n=e.dataSource,r=e.rowDataKeys,o=Ie(t),l=o.data,i=o.expandedTreeNodes,u=o.tree,s=W(!1),v=W(!1),d=kt(i,t.defaultExpandedTreeNodes,t.onExpandedTreeNodesChange,"expandedTreeNodes"),p=Pe(d,2),b=p[0],w=p[1],y=W({type:"props-change"});function R(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"expand-all",A=arguments.length>1?arguments[1]:void 0,P=A||l.value;n.value=a.value.expandAll(P,r.value);var F=n.value.map(function(T){return Ft(T,r.value.rowKey)});w(F,{row:void 0,rowState:void 0,rowIndex:void 0,type:"expand",trigger:j}),y.value.type="expand-all"}function C(){n.value=ve(a.value.foldAll(n.value,r.value)),w([],{row:void 0,rowState:void 0,rowIndex:void 0,type:"fold",trigger:"fold-all"})}function O(j,A){var P,F=j.row,T=j.rowIndex;y.value=Va({type:"user-reaction-change"},j);var I=Ft(F,r.value.rowKey),_=a.value.treeDataMap.get(I),m=ve(b.value);if(_.expanded){for(var h=a.value.getExpandedChildrenKeys([F],r.value),g=0,c=m.length;g<c;g++){var f=m[g];h.includes(f)&&(m[g]=void 0)}m=m.filter(Boolean)}else m.push(I);var x={row:F,rowIndex:T,rowState:_,trigger:A};w(m,Va(Va({},x),{},{type:_.expanded?"fold":"expand"})),(P=t.onTreeExpandChange)===null||P===void 0||P.call(t,x)}function S(j,A){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],F=Qs(A,P),T=F.addedList,I=F.removedList;return a.value.expandTreeNode(T,j,r.value),a.value.foldTreeNode(I,j,r.value),ve(j)}ce([b,l],function(j,A){var P=Pe(j,1),F=P[0],T=Pe(A,1),I=T[0];if(!(!a.value.treeDataMap.size||!l.value.length)){if(y.value.type==="user-reaction-change"){var _=y.value||{},m=_.row,h=_.rowIndex;n.value=ve(a.value.toggleExpandData({row:m,rowIndex:h},ve(n.value),r.value))}else y.value.type==="props-change"&&S(n.value,F,I);y.value.type="props-change"}});var D=function(A){var P,F;(P=u.value)!==null&&P!==void 0&&P.defaultExpandAll&&!s.value?(R("default-expand-all",ve(A)),s.value=!0):(F=b.value)!==null&&F!==void 0&&F.length&&Gt(function(){n.value=S(ve(A),b.value,[])})};return{tExpandedTreeNode:b,isDefaultExpandAllExecute:s,isDefaultExpandedTreeNodesExecute:v,expandAll:R,foldAll:C,onExpandFoldIconClick:O,updateExpandOnDataChange:D}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Do(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ft(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Do(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Do(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function tc(t,e){var a=Ie(t),n=a.data,r=a.columns,o=gt("table",t.locale),l=o.t,i=o.globalConfig,u=_n({AddRectangleIcon:Oi,MinusRectangleIcon:Li}),s=u.AddRectangleIcon,v=u.MinusRectangleIcon,d=W(new Zs),p=vi(),b=W([]),w=it(),y=w.tableTreeClasses,R=Un(),C=N(function(){var M;return{rowKey:t.rowKey||"id",childrenKey:((M=t.tree)===null||M===void 0?void 0:M.childrenKey)||"children"}}),O=ec(t,{store:d,dataSource:b,rowDataKeys:C}),S=O.tExpandedTreeNode,D=O.isDefaultExpandAllExecute,j=O.isDefaultExpandedTreeNodesExecute,A=O.expandAll,P=O.foldAll,F=O.updateExpandOnDataChange,T=O.onExpandFoldIconClick,I=N(function(){return r.value.find(function(M){return M.colKey==="row-select"})});ce(I,function(M){!d.value||d.value.updateDisabledState(b.value,M,C.value)});var _=function(X){var q=ft(ft({},X),{},{type:"fold"}),Z=l(i.value.treeExpandAndFoldIcon,Ye,q)||k(v,null,null);return R("treeExpandAndFoldIcon",{defaultNode:Z,params:q})},m=function(X){var q=ft(ft({},X),{},{type:"expand"}),Z=l(i.value.treeExpandAndFoldIcon,Ye,q)||k(s,null,null);return R("treeExpandAndFoldIcon",{defaultNode:Z,params:q})};ce([n],function(){t.tree?h(n.value):b.value=n.value},{immediate:!0}),No(function(){var M;!t.tree||((M=d.value.treeDataMap)===null||M===void 0||M.clear(),d.value=null)}),ce(function(){var M;return[r,(M=t.tree)===null||M===void 0?void 0:M.treeNodeColumnIndex]},function(){p.value=f()},{immediate:!0});function h(M){var X,q=t.columns,Z=t.expandedTreeNodes,fe=t.defaultExpandedTreeNodes,he=t.tree;d.value.initialTreeStore(M,q,C.value);var Le=Boolean(!j.value&&(fe==null?void 0:fe.length)),We=Boolean((he==null?void 0:he.defaultExpandAll)&&!D.value);(X=S.value)!==null&&X!==void 0&&X.length&&!!(Z||Le)||We?(F(M),j.value=!0):b.value=ve(M)}function g(M){var X,q;if(M!==void 0){var Z=((X=t.tree)===null||X===void 0?void 0:X.indent)===void 0?24:(q=t.tree)===null||q===void 0?void 0:q.indent;return Z?{paddingLeft:"".concat(M*Z||1,"px")}:{}}}function c(M,X){var q,Z,fe=ft({},M);M.row.VIRTUAL_SCROLL_INDEX!==void 0&&(fe.rowIndex=M.row.VIRTUAL_SCROLL_INDEX),b.value=ve(d.value.toggleExpandData(fe,b.value,C.value));var he=H(M.row,C.value.rowKey),Le=(q=d.value)===null||q===void 0||(q=q.treeDataMap)===null||q===void 0?void 0:q.get(he);(Z=t.onTreeExpandChange)===null||Z===void 0||Z.call(t,{row:M.row,rowIndex:M.rowIndex,rowState:Le,trigger:X})}function f(){for(var M,X=t.columns,q=((M=t.tree)===null||M===void 0?void 0:M.treeNodeColumnIndex)||0;(Z=X[q])!==null&&Z!==void 0&&Z.type||((fe=X[q])===null||fe===void 0?void 0:fe.colKey)==="__EXPAND_ROW_ICON_COLUMN__";){var Z,fe;q+=1}return X[q]}function x(M){if(!t.tree||M.colKey!==p.value.colKey)return M;var X=ft({},p.value);return X.cell=function(q,Z){var fe=ma(ft(ft({},Z),{},{col:ft({},p.value)}),e.slots,{cellEmptyContent:t.cellEmptyContent}),he=d.value.treeDataMap.get(H(Z.row,C.value.rowKey)),Le=g(he==null?void 0:he.level),We=z({},y.inlineCol,!!M.ellipsis),qe=H(Z.row,C.value.childrenKey);if(qe&&qe instanceof Array||qe===!0){var Ne,nt=(Ne=d.value.treeDataMap.get(H(Z.row,C.value.rowKey)))!==null&&Ne!==void 0&&Ne.expanded?_(Z):m(Z);return k("div",{class:[y.col,We],style:Le},[!!(qe.length||qe===!0)&&k("span",{class:y.icon,onClick:function(st){T(Z,"expand-fold-icon"),st.stopPropagation()}},[nt]),fe])}return k("div",{style:Le,class:[We,y.leafNode]},[k("span",{class:y.icon},null),fe])},X.ellipsis===!0&&(X.ellipsis=function(q,Z){return ma(ft(ft({},Z),{},{col:ft({},p.value)}),e.slots)}),X}function E(M,X){var q=d.value.updateData(M,X,b.value,C.value),Z=ve(b.value);Z[q]=X,b.value=Z}function L(M){return d.value.getData(M)}function K(M){b.value=ve(d.value.remove(M,b.value,C.value))}function B(M){b.value=ve(d.value.removeChildren(M,b.value,C.value))}function $(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",X=arguments.length>1?arguments[1]:void 0;if(!M){b.value=d.value.appendToRoot(X,b.value,C.value);return}b.value=ve(d.value.appendTo(M,X,b.value,C.value))}function Y(M,X){b.value=ve(d.value.insertAfter(M,X,b.value,C.value))}function ee(M,X){b.value=ve(d.value.insertBefore(M,X,b.value,C.value))}function ae(M){var X=d.value.swapData(b.value,M,C.value);if(X.result)b.value=ve(X.dataSource);else{var q,Z={code:X.code,reason:X.reason};(q=t.onAbnormalDragSort)===null||q===void 0||q.call(t,Z)}}function ne(){return d.value.getTreeNode(b.value,C.value)}function Q(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data";return d.value.getTreeExpandedRow(b.value,C.value,M)}return{store:d,rowDataKeys:C,dataSource:b,swapData:ae,setData:E,getData:L,remove:K,removeChildren:B,appendTo:$,insertAfter:Y,insertBefore:ee,formatTreeColumn:x,toggleExpandData:c,expandAll:A,foldAll:P,getTreeNode:ne,resetData:h,getTreeExpandedRow:Q,onExpandFoldIconClick:T}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function To(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function ca(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?To(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):To(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var or=new Map;function kn(t,e,a,n){if(or.get(e))return or.get(e);var r=n||{allChildren:[],allChildrenKeys:[],leafNodeKeys:[]},o=H(e,a.childrenKey);if(!o||!o.length)return r;var l=o.filter(function(C){var O;return!((O=t.get(H(C,a.rowKey)))!==null&&O!==void 0&&O.disabled)});r.allChildren=ve(new Set(r.allChildren.concat(l)));for(var i=0,u=o.length;i<u;i++){var s=o[i],v=H(s,a.childrenKey);if(v!=null&&v.length){var d=kn(t,s,a,r);r.allChildren=ve(new Set(r.allChildren.concat(d.allChildren)))}}for(var p=0,b=r.allChildren.length;p<b;p++){var w=r.allChildren[p],y=H(w,a.childrenKey),R=H(w,a.rowKey);r.allChildrenKeys.push(R),(!y||!y.length)&&r.leafNodeKeys.push(R)}return r.allChildrenKeys=ve(new Set(r.allChildrenKeys)),r.leafNodeKeys=ve(new Set(r.leafNodeKeys)),r}function nc(t,e){for(var a=t.selectedRowKeys,n=t.removeKeys,r=e||{data:[],keys:[]},o=0,l=a.length;o<l;o++){var i=a[o];n.includes(i)||r.keys.push(i)}return r}function ac(t){for(var e=t.treeDataMap,a=t.selectedRowKeys,n=[],r=0,o=a.length;r<o;r++){var l=a[r];n.push(e.get(l))}return n}function rc(t,e){var a=Ie(t),n=a.selectedRowKeys,r=a.tree,o=a.data,l=a.indeterminateSelectedRowKeys,i=W([]),u=kt(n,t.defaultSelectedRowKeys||[],t.onSelectChange,"selectedRowKeys"),s=Pe(u,2),v=s[0],d=s[1],p=N(function(){var O;return{rowKey:t.rowKey||"id",childrenKey:((O=t.tree)===null||O===void 0?void 0:O.childrenKey)||"children"}});ce([r,e,o,v],function(O){var S=Pe(O,2),D=S[0],j=S[1];!D||!j.size||D.checkStrictly||b()});function b(){if(!(!r.value||r.value.checkStrictly)){if(!v.value.length){i.value=[];return}for(var O=[],S={},D=0,j=v.value.length;D<j;D++){var A=v.value[D],P=e.value.get(A);if(!!P){var F=H(P.row,p.value.childrenKey);if(!F||!F.length)for(var T=P.parent;T;){S[T.id]||(S[T.id]=[]),S[T.id].push(P.row);var I=S[T.id].length,_=kn(e.value,T.row,p.value),m=_.allChildrenKeys,h=O.indexOf(T.id),g=v.value.indexOf(T.id);I>0&&I<m.length&&g===-1?h===-1&&O.push(T.id):h!==-1&&O.splice(h,1),T=T.parent}}}i.value=O}}function w(O,S,D){if(!(!r.value||r.value.checkStrictly)){for(var j=ve(O),A=e.value.get(S),P=A.parent;P;){var F=kn(e.value,P.row,p.value),T=F.leafNodeKeys,I=ba(T,O),_=j.indexOf(P.id);D==="uncheck"?_!==-1&&j.splice(_,1):I.length===T.length&&_===-1&&j.push(P.id),P=P.parent}return j}}function y(O,S){if(!r.value||r.value.checkStrictly){d(O,S);return}S.currentRowKey==="CHECK_ALL_BOX"?R(S):C(O,S)}function R(O){var S=[],D=[];if(O.type==="check")for(var j=ve(e.value.values()),A=0,P=j.length;A<P;A++){var F=j[A];F.disabled||(D.push(F.row),S.push(H(F.row,p.value.rowKey)))}var T=ca(ca({},O),{},{selectedRowData:D||[]});d(S,T)}function C(O,S){var D,j=ve(O);if(((D=t.tree)===null||D===void 0?void 0:D.checkStrictly)===!1){if((S==null?void 0:S.type)==="check"){var A=kn(e.value,S.currentRowData,p.value),P=A.allChildrenKeys;or.set(S.currentRowData,A),j=ve(new Set(j.concat(P)))}else if((S==null?void 0:S.type)==="uncheck"){var F=kn(e.value,S.currentRowData,p.value),T=nc({selectedRowKeys:O,removeKeys:F.allChildrenKeys});j=T.keys}}j=w(j,S.currentRowKey,S.type);var I=ac({treeDataMap:e.value,selectedRowKeys:j}),_=ca(ca({},S),{},{selectedRowData:I});d(j,_)}return{tIndeterminateSelectedRowKeys:l.value?l:i,onInnerSelectChange:y}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var oc=["store","dataSource","formatTreeColumn","swapData","onExpandFoldIconClick"];function Po(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,n)}return a}function Et(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?Po(Object(a),!0).forEach(function(n){z(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Po(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var lc=He({name:"TEnhancedTable",props:Et(Et(Et({},Rn),gl),Js),setup:function(e,a){var n=W(null),r=tc(e,a),o=r.store,l=r.dataSource,i=r.formatTreeColumn,u=r.swapData,s=r.onExpandFoldIconClick,v=el(r,oc),d=It(),p=W(o.value.treeDataMap),b=rc(e,p),w=b.tIndeterminateSelectedRowKeys,y=b.onInnerSelectChange,R=function(P){for(var F=[],T=0,I=P.length;T<I;T++){var _,m,h=Et({},P[T]);h=i(h),(_=h.children)!==null&&_!==void 0&&_.length&&(h.children=R(h.children)),(!h.children||(m=h.children)!==null&&m!==void 0&&m.length)&&F.push(h)}return F},C=N(function(){var A=!e.tree||!Object.keys(e.tree).length;return A?e.columns:R(e.columns)}),O=function(P){var F;e.beforeDragSort&&!e.beforeDragSort(P)||(u({current:P.current,target:P.target,currentIndex:P.currentIndex,targetIndex:P.targetIndex}),(F=e.onDragSort)===null||F===void 0||F.call(e,P))},S=function(P){var F,T;(F=e.tree)!==null&&F!==void 0&&F.expandTreeNodeOnClick&&s({row:P.row,rowIndex:P.index},"row-click"),(T=e.onRowClick)===null||T===void 0||T.call(e,P)},D=function(P,F){if(!P)return-1;if(P.rowIndex>=0)return P.rowIndex;if(P.rowIndex<0)return D(P.parent)},j=function(P){var F=P.index;if(!F&&F!==0){if(!P.key){ze.error("Table","scrollToElement: one of `index` or `key` must exist.");return}var T=p.value.get(P.key);F=D(T,P.key),(F<0||F===void 0)&&ze.error("Table","".concat(P.key," does not exist in data, check `rowKey` or `data` please."))}n.value.scrollToElement(Et(Et({},P),{},{index:F}))};return a.expose(Et(Et({store:o.value,dataSource:l.value},v),{},{primaryTableRef:n,validateRowData:function(P){return n.value.validateRowData(P)},validateTableData:function(){return n.value.validateTableData()},clearValidateData:function(){n.value.clearValidateData()},refreshTable:function(){n.value.refreshTable()},scrollToElement:j})),function(){var A,P=Bo(),F=P.vnode,T=Et(Et({},F.props),{},{rowKey:e.rowKey||"id",data:l.value,columns:C.value,indeterminateSelectedRowKeys:w.value,disableDataPage:Boolean(e.tree&&Object.keys(e.tree).length),onSelectChange:y,onDragSort:O,rowClassName:function(_){var m=_.row,h=H(m,e.rowKey||"id"),g=p.value.get(h);return g?["".concat(d.value,"-table-tr--level-").concat(g.level),e.rowClassName]:[e.rowClassName]}});return(A=e.tree)!==null&&A!==void 0&&A.expandTreeNodeOnClick&&(T.onRowClick=S),k(pr,Ke(T,{ref:n}),a.slots)}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/qt(hl);qt(pr);qt(lc);var ic=lr(pr),gc=qt(ic,"TTable");export{hc as M,gc as T};
|