bkui-vue 0.0.1-beta.348 → 0.0.1-beta.349
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +10 -6
- package/dist/index.umd.js +2 -2
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.d.ts +24 -1
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +11 -0
- package/lib/popover/props.d.ts +8 -0
- package/lib/select/index.d.ts +15 -0
- package/lib/select/index.js +1 -1
- package/lib/select/select.d.ts +5 -0
- package/lib/tag-input/index.d.ts +20 -0
- package/lib/tag-input/tag-input.d.ts +10 -0
- package/lib/tag-input/tag-props.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
@@ -55,12 +55,12 @@ ${Ds(n)}`),i}})}function d2(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
|
|
55
55
|
* @return {boolean} True if the event is supported.
|
56
56
|
* @internal
|
57
57
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
58
|
-
*/function tp(e,t){if(!D0.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&j0&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var np=tp,ip=Xm,ap=np,z0=10,O0=40,A0=800;function P0(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*z0,s=n*z0,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=O0,s*=O0):(i*=A0,s*=A0)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}P0.getEventType=function(){return ip.firefox()?"DOMMouseScroll":ap("wheel")?"wheel":"mousewheel"};var rp=P0,sp=rp;const lp=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,op=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(lp?"DOMMouseScroll":"mousewheel",function(n){const i=sp(n);t==null||t.apply(this,[n,i])})},cp={beforeMount(e,t){console.error(e,t),op(e,t.value)}},up=e=>typeof Element=="undefined"?!1:e instanceof Element,zi=new Map;let E0;document.addEventListener("mousedown",e=>E0=e),document.addEventListener("mouseup",e=>{for(const t of zi.values())for(const{documentHandler:n}of t)n(e,E0)});function V0(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:up(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),p=e===c,y=n.length&&n.some(v=>v==null?void 0:v.contains(c))||n.length&&n.includes(d),b=o&&(o.contains(c)||o.contains(d));u||f||m||p||y||b||t.value(i,s)}}const jn={beforeMount(e,t){zi.has(e)||zi.set(e,[]),zi.get(e).push({documentHandler:V0(e,t),bindingFn:t.value})},updated(e,t){zi.has(e)||zi.set(e,[]);const n=zi.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:V0(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){zi.delete(e)}};jn.install=e=>{e.directive("bkTooltips",jn)};const Oi=new Map,el={beforeMount(e,t){const n=J0(t),{trigger:i}=n,s=fp(n);if(i==="hover"){let o=null;e.addEventListener("mouseenter",()=>{Oc(e),clearTimeout(o)}),s.addEventListener("mouseenter",()=>{clearTimeout(o)}),e.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Pr(e)},100)}),e.addEventListener("click",()=>{Pr(e)}),s.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Pr(e)},100)})}else i==="click"&&document.body.addEventListener("click",o=>{e.contains(o.target)&&!s.hasAttribute("data-show")?Oc(e):s.hasAttribute("data-show")&&Pr(e)});Oi.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Oi.get(e).opts=J0(t)},unmounted(e){Pr(e),Oi.delete(e)}};function dp(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",onShow:()=>{},onHide:()=>{}}}function J0(e){const t=dp();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function fp(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=Qn.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=Q0();d.appendChild(u)}return d}function Q0(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function hp(e,t){const{opts:n}=Oi.get(e),{placement:i,distance:s,showOnInit:o}=n,c=Of(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Oc(e),c}function Oc(e){const{popper:t,opts:n}=Oi.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=Q0();t.appendChild(u)}document.body.appendChild(t);const d=hp(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>Se(Z({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Oi.get(e).popperInstance=d}function Pr(e){if(!Oi.get(e))return;const{popper:t,popperInstance:n,opts:i}=Oi.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const Ac={},Pc=e=>document.querySelector(e)instanceof HTMLElement,gp=()=>(Ac.fullscreenReferId||(Ac.fullscreenReferId=`id_${Li.v4()}`),Ac.fullscreenReferId);function Ec(e){let t=null,n=null,i=null;const s=Se(Z({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=y=>y instanceof Element||y instanceof HTMLDocument,c={name:"$popover",setup(y,{expose:b}){const v=a.ref(s),k=a.ref(),T=a.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:G,y:B,width:ie,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ie}px`,height:`${oe}px`,transform:`translate3d(${G}px,${B}px,0)`});return}const{clientX:W,clientY:P}=O;Object.assign(T.value,{transform:`translate3d(${W}px,${P}px,0)`,width:"10px",height:"10px"})};L(v.value.target);const N=()=>{setTimeout(()=>{var O,W;(W=(O=k.value)==null?void 0:O.show)==null||W.call(O)})},C=()=>{var O,W;(W=(O=k.value)==null?void 0:O.hide)==null||W.call(O)},I=()=>{var O,W;(W=(O=k.value)==null?void 0:O.stopHide)==null||W.call(O)},M=a.computed(()=>{const O=["target"];return Object.keys(v.value).filter(W=>!O.includes(W)).reduce((W,P)=>Se(Z({},W),{[P]:v.value[P]}),{})}),S=O=>{var W,P;v.value.target=O,L(O),(P=(W=k.value)==null?void 0:W.updatePopover)==null||P.call(W),a.nextTick(()=>{var G,B;(B=(G=k.value)==null?void 0:G.updatePopover)==null||B.call(G)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},j=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return b({show:N,hide:C,updateTarget:S,stopHide:I}),()=>a.createVNode(oh,a.mergeProps(M.value,{ref:k,onContentMouseenter:z,onContentMouseleave:j}),{default:()=>[a.createVNode("span",{style:T.value},null)]})}};function d(y){return/^body$/i.test(y)?document.body:/^parent$/i.test(y)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof y=="string"&&Pc(y)?document.querySelector(y):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=a.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(y){n==null||n.updateTarget(y)}function p(){n==null||n.hide()}return{close:u,show:f,hide:p,update:m,get vm(){return n},get $el(){return n.$el}}}const R0=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Vc=(e,t)=>{let n=null,i=null,s=null;const o=R0(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const y=R0(e,t);y.content=y.content||e.innerHTML,Object.assign(y,{onContentMouseenter:d,onContentMouseleave:u}),n=Ec(y),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:y=>{var b,v;m(),(b=y!=null?y:e)==null||b.removeEventListener("mouseenter",f),(v=y!=null?y:e)==null||v.removeEventListener("mouseleave",m)},instance:n}},mp={mounted(e,t){Vc(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var _0=a.defineComponent({name:"PopArrow",render(){const e=Ve("pop2-arrow");return a.createVNode("div",{class:e},null)}});const Ha=(...e)=>!0;let zn;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(zn||(zn={}));const pp={[zn.SHOW]:Ha,[zn.HIDE]:Ha,[zn.CLICK_OUTSIDE]:Ha,[zn.CONTENT_MOUSEENTER]:Ha,[zn.CONTENT_MOUSELEAVE]:Ha,[zn.STOP_HIDE]:Ha};var W0=a.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:a.computed(()=>({width:t(e.width),height:t(e.height)}))}},render(){var t,n,i,s,o,c;const e=[Ve("popover"),Ve("pop2-content")];return a.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const bp={onAfterHidden:Function,onAfterShow:Function},yp=Z({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:Uf().def(Os.TOP),theme:g.string.def("dark"),trigger:$f(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([])},bp);var Cp=a.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),H0=a.defineComponent({props:{class:g.string.def("")},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function ai(e){return e.split("-")[0]}function sa(e){return e.split("-")[1]}function Ba(e){return["top","bottom"].includes(ai(e))?"x":"y"}function Jc(e){return e==="y"?"height":"width"}function B0(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=Ba(t),u=Jc(d),f=i[u]/2-s[u]/2,m=ai(t),p=d==="x";let y;switch(m){case"top":y={x:o,y:i.y-s.height};break;case"bottom":y={x:o,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:c};break;case"left":y={x:i.x-s.width,y:c};break;default:y={x:i.x,y:i.y}}switch(sa(t)){case"start":y[d]-=f*(n&&p?-1:1);break;case"end":y[d]+=f*(n&&p?-1:1);break}return y}const vp=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=B0(u,i,d),p=i,y={};for(let b=0;b<o.length;b++){const{name:v,fn:k}=o[b],{x:T,y:L,data:N,reset:C}=await k({x:f,y:m,initialPlacement:i,placement:p,strategy:s,middlewareData:y,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,y=Se(Z({},y),{[v]:Z(Z({},y[v]),N)}),C){typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:f,y:m}=B0(u,p,d)),b=-1;continue}}return{x:f,y:m,placement:p,strategy:s,middlewareData:y}};function wp(e){return Z({top:0,right:0,bottom:0,left:0},e)}function Qc(e){return typeof e!="number"?wp(e):{top:e,right:e,bottom:e,left:e}}function Er(e){return Se(Z({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Vr(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:y=!1,padding:b=0}=t,v=Qc(b),T=d[y?p==="floating"?"reference":"floating":p],L=Er(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),N=Er(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?Se(Z({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[p]);return{top:L.top-N.top+v.top,bottom:N.bottom-L.bottom+v.bottom,left:L.left-N.left+v.left,right:N.right-L.right+v.right}}const F0=Math.min,G0=Math.max;function Rc(e,t,n){return G0(e,F0(t,n))}const Mp=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Qc(i),m={x:s,y:o},p=Ba(c),y=sa(c),b=Jc(p),v=await u.getDimensions(n),k=p==="y"?"top":"left",T=p==="y"?"bottom":"right",L=d.reference[b]+d.reference[p]-m[p]-d.floating[b],N=m[p]-d.reference[p],C=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let I=C?p==="y"?C.clientHeight||0:C.clientWidth||0:0;I===0&&(I=d.floating[b]);const M=L/2-N/2,S=f[k],z=I-v[b]-f[T],j=I/2-v[b]/2+M,O=Rc(S,j,z),G=(y==="start"?f[k]:f[T])>0&&j!==O&&d.reference[b]<=d.floating[b]?j<S?S-j:z-j:0;return{[p]:m[p]-G,data:{[p]:O,centerOffset:j-O}}}}),Ip={left:"right",right:"left",bottom:"top",top:"bottom"};function tl(e){return e.replace(/left|right|bottom|top/g,t=>Ip[t])}function Z0(e,t,n){n===void 0&&(n=!1);const i=sa(e),s=Ba(e),o=Jc(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=tl(c)),{main:c,cross:tl(c)}}const Np={start:"end",end:"start"};function _c(e){return e.replace(/start|end/g,t=>Np[t])}const Y0=["top","right","bottom","left"],Lp=Y0.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function kp(e,t,n){return(e?[...n.filter(s=>sa(s)===e),...n.filter(s=>sa(s)!==e)]:n.filter(s=>ai(s)===s)).filter(s=>e?sa(s)===e||(t?_c(s)!==s:!1):!0)}const Tp=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:p,platform:y,elements:b}=t,ie=e,{alignment:v=null,allowedPlacements:k=Lp,autoAlignment:T=!0}=ie,L=Sa(ie,["alignment","allowedPlacements","autoAlignment"]),N=kp(v,T,k),C=await Vr(t,L),I=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,M=N[I];if(M==null)return{};const{main:S,cross:z}=Z0(M,f,await(y.isRTL==null?void 0:y.isRTL(b.floating)));if(p!==M)return{x:d,y:u,reset:{placement:N[0]}};const j=[C[ai(M)],C[S],C[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:M,overflows:j}],W=N[I+1];if(W)return{data:{index:I+1,overflows:O},reset:{placement:W}};const P=O.slice().sort((oe,ve)=>oe.overflows[0]-ve.overflows[0]),G=(c=P.find(oe=>{let{overflows:ve}=oe;return ve.every(Ie=>Ie<=0)}))==null?void 0:c.placement,B=G!=null?G:P[0].placement;return B!==p?{data:{index:I+1,overflows:O},reset:{placement:B}}:{}}}};function Sp(e){const t=tl(e);return[_c(e),t,_c(t)]}const xp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",flipAlignment:b=!0}=O,v=Sa(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=ai(i),L=p||(k===c||!b?[tl(c)]:Sp(c)),N=[c,...L],C=await Vr(t,v),I=[];let M=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&I.push(C[k]),m){const{main:W,cross:P}=Z0(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));I.push(C[W],C[P])}if(M=[...M,{placement:i,overflows:I}],!I.every(W=>W<=0)){var S,z;const W=((S=(z=s.flip)==null?void 0:z.index)!=null?S:0)+1,P=N[W];if(P)return{data:{index:W,overflows:M},reset:{placement:P}};let G="bottom";switch(y){case"bestFit":{var j;const B=(j=M.map(ie=>[ie,ie.overflows.filter(oe=>oe>0).reduce((oe,ve)=>oe+ve,0)]).sort((ie,oe)=>ie[1]-oe[1])[0])==null?void 0:j[0].placement;B&&(G=B);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function U0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $0(e){return Y0.some(t=>e[t]>=0)}const Dp=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=Sa(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await Vr(s,Se(Z({},n),{elementContext:"reference"})),d=U0(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:$0(d)}}}case"escaped":{const c=await Vr(s,Se(Z({},n),{altBoundary:!0})),d=U0(c,o.floating);return{data:{escapedOffsets:d,escaped:$0(d)}}}default:return{}}}}};async function jp(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=ai(n),d=sa(n),u=Ba(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:y,crossAxis:b,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:Z({mainAxis:0,crossAxis:0,alignmentAxis:null},p);return d&&typeof v=="number"&&(b=d==="end"?v*-1:v),u?{x:b*m,y:y*f}:{x:y*f,y:b*m}}const zp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await jp(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function Op(e){return e==="x"?"y":"x"}const Ap=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:N,y:C}=L;return{x:N,y:C}}}}=T,u=Sa(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await Vr(t,u),p=Ba(ai(s)),y=Op(p);let b=f[p],v=f[y];if(o){const L=p==="y"?"top":"left",N=p==="y"?"bottom":"right",C=b+m[L],I=b-m[N];b=Rc(C,b,I)}if(c){const L=y==="y"?"top":"left",N=y==="y"?"bottom":"right",C=v+m[L],I=v-m[N];v=Rc(C,v,I)}const k=d.fn(Se(Z({},t),{[p]:b,[y]:v}));return Se(Z({},k),{data:{x:k.x-n,y:k.y-i}})}}},Pp=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,p=Er(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),y=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],b=Qc(u);function v(){if(y.length===2&&y[0].left>y[1].right&&f!=null&&m!=null){var T;return(T=y.find(L=>f>L.left-b.left&&f<L.right+b.right&&m>L.top-b.top&&m<L.bottom+b.bottom))!=null?T:p}if(y.length>=2){if(Ba(i)==="x"){const P=y[0],G=y[y.length-1],B=ai(i)==="top",ie=P.top,oe=G.bottom,ve=B?P.left:G.left,Ie=B?P.right:G.right,me=Ie-ve,ge=oe-ie;return{top:ie,bottom:oe,left:ve,right:Ie,width:me,height:ge,x:ve,y:ie}}const L=ai(i)==="left",N=G0(...y.map(P=>P.right)),C=F0(...y.map(P=>P.left)),I=y.filter(P=>L?P.left===C:P.right===N),M=I[0].top,S=I[I.length-1].bottom,z=C,j=N,O=j-z,W=S-M;return{top:M,bottom:S,left:z,right:j,width:O,height:W,x:z,y:M}}return p}const k=await c.getElementRects({reference:{getBoundingClientRect:v},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function K0(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ri(e){if(e==null)return window;if(!K0(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jr(e){return ri(e).getComputedStyle(e)}function si(e){return K0(e)?"":e?(e.nodeName||"").toLowerCase():""}function X0(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Bn(e){return e instanceof ri(e).HTMLElement}function Ai(e){return e instanceof ri(e).Element}function Ep(e){return e instanceof ri(e).Node}function Wc(e){if(typeof ShadowRoot=="undefined")return!1;const t=ri(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nl(e){const{overflow:t,overflowX:n,overflowY:i}=Jr(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function Vp(e){return["table","td","th"].includes(si(e))}function q0(e){const t=/firefox/i.test(X0()),n=Jr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function eh(){return!/^((?!chrome|android).)*safari/i.test(X0())}const th=Math.min,Qr=Math.max,il=Math.round;function li(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&Bn(e)&&(u=e.offsetWidth>0&&il(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&il(d.height)/e.offsetHeight||1);const m=Ai(e)?ri(e):window,p=!eh()&&n,y=(d.left+(p&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,b=(d.top+(p&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,v=d.width/u,k=d.height/f;return{width:v,height:k,top:b,right:y+v,bottom:b+k,left:y,x:y,y:b}}function Pi(e){return((Ep(e)?e.ownerDocument:e.document)||window.document).documentElement}function al(e){return Ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function nh(e){return li(Pi(e)).left+al(e).scrollLeft}function Jp(e){const t=li(e);return il(t.width)!==e.offsetWidth||il(t.height)!==e.offsetHeight}function Qp(e,t,n){const i=Bn(t),s=Pi(t),o=li(e,i&&Jp(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((si(t)!=="body"||nl(s))&&(c=al(t)),Bn(t)){const u=li(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=nh(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function ih(e){return si(e)==="html"?e:e.assignedSlot||e.parentNode||(Wc(e)?e.host:null)||Pi(e)}function ah(e){return!Bn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Rp(e){let t=ih(e);for(Wc(t)&&(t=t.host);Bn(t)&&!["html","body"].includes(si(t));){if(q0(t))return t;t=t.parentNode}return null}function Hc(e){const t=ri(e);let n=ah(e);for(;n&&Vp(n)&&getComputedStyle(n).position==="static";)n=ah(n);return n&&(si(n)==="html"||si(n)==="body"&&getComputedStyle(n).position==="static"&&!q0(n))?t:n||Rp(e)||t}function rh(e){if(Bn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=li(e);return{width:t.width,height:t.height}}function _p(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=Bn(n),o=Pi(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((si(n)!=="body"||nl(o))&&(c=al(n)),Bn(n))){const u=li(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return Se(Z({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function Wp(e,t){const n=ri(e),i=Pi(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=eh();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function Hp(e){var t;const n=Pi(e),i=al(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Qr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Qr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+nh(e);const u=-i.scrollTop;return Jr(s||n).direction==="rtl"&&(d+=Qr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function sh(e){const t=ih(e);return["html","body","#document"].includes(si(t))?e.ownerDocument.body:Bn(t)&&nl(t)?t:sh(t)}function rl(e,t){var n;t===void 0&&(t=[]);const i=sh(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=ri(i),c=s?[o].concat(o.visualViewport||[],nl(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(rl(c))}function Bp(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Wc(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function Fp(e,t){const n=li(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function lh(e,t,n){return t==="viewport"?Er(Wp(e,n)):Ai(t)?Fp(t,n):Er(Hp(Pi(e)))}function Gp(e){const t=rl(e),i=["absolute","fixed"].includes(Jr(e).position)&&Bn(e)?Hc(e):e;return Ai(i)?t.filter(s=>Ai(s)&&Bp(s,i)&&si(s)!=="body"):[]}function Zp(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?Gp(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const p=lh(t,m,s);return f.top=Qr(p.top,f.top),f.right=th(p.right,f.right),f.bottom=th(p.bottom,f.bottom),f.left=Qr(p.left,f.left),f},lh(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const Yp={getClippingRect:Zp,convertOffsetParentRelativeRectToViewportRelativeRect:_p,isElement:Ai,getDimensions:rh,getOffsetParent:Hc,getDocumentElement:Pi,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:Qp(t,Hc(n),i),floating:Se(Z({},rh(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jr(e).direction==="rtl"};function Up(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Ai(e)?rl(e):[],...rl(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let p=null;c&&(p=new ResizeObserver(n),Ai(e)&&!d&&p.observe(e),p.observe(t));let y,b=d?li(e):null;d&&v();function v(){const k=li(e);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&n(),b=k,y=requestAnimationFrame(v)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=p)==null||k.disconnect(),p=null,d&&cancelAnimationFrame(y)}}const $p=(e,t,n)=>vp(e,t,Z({platform:Yp},n));var Kp=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),Xp=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=a.ref(!1),d=a.ref(),u=()=>{var de,we,q;const X=L((de=n.value)==null?void 0:de.$el);return(we=document.fullscreenElement)!=null&&we.shadowRoot?document.fullscreenElement.shadowRoot.contains(X):(q=document.fullscreenElement)==null?void 0:q.contains(X)},f=X=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(X):document.fullscreenElement.querySelector(X):document.body,m=["dark","light"],p=a.computed(()=>{var q,H;const X=(H=(q=e.theme)==null?void 0:q.split(/\s+/))!=null?H:[];X.sort((R,ae)=>Number(m.includes(ae))-Number(m.includes(R)));const de=X,we=X.filter(R=>!m.includes(R));return{systemThemes:de,customThemes:we}}),y=()=>e.autoVisibility,b=()=>e.autoPlacement,v=()=>{var H,R,ae,D;const X=L((H=n.value)==null?void 0:H.$el),de=L((R=i.value)==null?void 0:R.$el),we=e.arrow?L((ae=s.value)==null?void 0:ae.$el):null,q=L((D=o.value)==null?void 0:D.$el);return{elReference:X,elContent:de,elArrow:we,root:q}},k=()=>{const X={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(de=>{var q,H,R,ae;let we;if(de.name==="offset"){if(typeof((q=de.options)==null?void 0:q.offset)=="number"&&(we=(H=de.options)==null?void 0:H.offset),Array.isArray((R=de.options)==null?void 0:R.offset)){const[D,_]=(ae=de.options)==null?void 0:ae.offset;we={mainAxis:D,crossAxis:_}}Object.assign(X,{offset:we})}}),X},T=(X,de)=>{var R;const we=k(),q=[zp(we.offset||de.offset),Ap({padding:de.padding})],H={placement:de.placement,middleware:q};if(de.arrow&&q.push(Mp({element:X})),b()?q.push(Tp()):(q.unshift(Pp()),q.push(xp())),y()&&H.middleware.push(Dp()),u()||de.isVirtualEl){const{getElementRects:ae,getDimensions:D,getClippingRect:_}=Kp(d.value);Object.assign(H,{platform:Se(Z({},(R=de==null?void 0:de.platform)!=null?R:{}),{getElementRects:ae,getDimensions:D,getClippingRect:_})})}return H},L=X=>X instanceof HTMLElement?X:X instanceof Text?L(X.nextElementSibling):typeof(X==null?void 0:X.getBoundingClientRect)=="function"?X:null,N=p.value.customThemes.join(" "),C=p.value.customThemes.reduce((X,de)=>Z({[`data-${de}-theme`]:!0},X),{}),I=`${N}`;let M=null;const S=X=>{const de=window.devicePixelRatio||1;return Math.round(X*de)/de||0},z=(X,de,we,q)=>{var R;e.disableTransform?Object.assign(X.style,{left:`${S(de)}px`,top:`${S(we)}px`}):Object.assign(X.style,{left:"0",top:"0",transform:`translate3d(${S(de)}px,${S(we)}px,0)`});const H=y()?(R=q.hide)==null?void 0:R.referenceHidden:!1;Object.assign(X.style,{visibility:H?"hidden":"visible"})},j=(X,de,we)=>{var q;if(e.arrow){const{x:H,y:R}=(q=we.arrow)!=null?q:{};X.setAttribute("data-arrow",de);const ae={left:"",top:"",bottom:"",right:""};Object.assign(X.style,ae);const D={top:"bottom",right:"left",bottom:"top",left:"right"}[de];Object.assign(X.style,{left:H!==null?`${H}px`:"",top:R!==null?`${R}px`:"",[D]:"-4px"})}},O=()=>{const{elReference:X,elContent:de}=v();M=Up(X,de,()=>{W(null,e)})},W=(X=null,de={})=>{const{elReference:we,elContent:q,elArrow:H}=v(),R=X||we;if(!R||!q)return;const ae=T(H,de);$p(R,q,ae).then(({x:D,y:_,placement:Q,middlewareData:se})=>{const ue=q.className;q.className=`${ue.replace(I,"")} ${I}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(C).forEach(le=>{q.setAttribute(le,C[le])});const be=Q.split("-")[0];let te=be;["left","right","top","bottom"].includes(be)||(te="top"),z(q,D,_,se),j(H,te,se)})};let P,G=!1;const B=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},100)},ie=()=>{P=setTimeout(()=>{c.value=!1},100)},oe=()=>{var de;const X=L((de=i.value)==null?void 0:de.$el);X.style.setProperty("display","block"),X.style.setProperty("z-index",`${e.zIndex?e.zIndex:Qn.getModalNextIndex()}`),W(),t.emit("afterShow",{isShow:!0})},ve=()=>{var de;L((de=i.value)==null?void 0:de.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ie():B()},me=()=>{Ie()},ge=()=>{e.trigger==="hover"&&(P&&(G=!0,clearTimeout(P),P=void 0),U())},$=()=>{G&&(ie(),G=!1,V())},U=()=>{t.emit(zn.CONTENT_MOUSEENTER)},V=()=>{t.emit(zn.CONTENT_MOUSELEAVE)},J=()=>{var de;return(de={hover:{content:[["mouseenter",ge],["mouseleave",$]],reference:[["mouseenter",B],["mouseleave",ie],["focus",B],["blur",ie]]},click:[["click",me]],manual:{content:[["mouseenter",U],["mouseleave",V]],reference:[[]]}}[e.trigger])!=null?de:[]},re=X=>{d.value=X};return a.watch(c,X=>{X?oe():ve()}),{showPopover:B,hidePopover:ie,resolveTriggerEvents:J,updatePopover:W,triggerPopover:Ie,resolvePopElements:v,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:re,getFullscreenRoot:f,stopHide:()=>{P&&(G=!0,clearTimeout(P),P=void 0)},localIsShow:c,cleanup:M}};let Ei=null,sl=null;var qp=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Ei}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",sl),s=`[data-pnode-id=${sl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Pc(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Ei}`}),s};if(Ei===null||!Pc(`#${Ei}`)){Ei=`id_${Li.v4()}`;const i=document.createElement("div");i.setAttribute("id",Ei),i.setAttribute("data-popper-id",Ei),document.body.append(i)}return sl===null&&(sl=`id_${Li.v4()}`),{popContainerId:Ei,prefixId:n(),getPrefixId:n}},e5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=a.ref(!1),u=gp(),f=a.ref(),{localIsShow:m,showPopover:p,hidePopover:y,updatePopover:b,resolveTriggerEvents:v,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:N,getFullscreenRoot:C,stopHide:I}=Xp(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),M=()=>{p()},S=()=>{y()},z=()=>{N(),e.always?p():j()},j=()=>{const{elReference:V,elContent:J}=k();if(c=v(),Array.isArray(c))O(V,c);else{const{content:re,reference:K}=c;O(V,K),O(J,re)}},O=(V,J)=>{J.forEach(([re,K])=>{re&&typeof K=="function"&&V.addEventListener(re,K)})},W=()=>{if(c!=null&&c.length){const{elReference:V}=k();V&&c.forEach(([J,re])=>{J&&typeof re=="function"&&V.removeEventListener(J,re)}),c=null}},P=()=>{const{elReference:V,root:J}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=G(J||V)},{getPrefixId:G}=qp(e,"#"),B=()=>{var V;(V=f==null?void 0:f.value)==null||V.setAttribute("data-fllsrn-id",u)},ie=()=>{var J,re;const V=`[data-fllsrn-id=${u}]`;((re=(J=f==null?void 0:f.value)==null?void 0:J.querySelectorAll(V))!=null?re:[]).forEach(K=>{K==null||K.removeAttribute("data-fllsrn-id")})},oe=a.ref(),ve=()=>{W()},Ie=V=>{f.value=V,L(V),d.value=T(),B()},me=V=>{document.fullscreenElement||ie(),Ie(V.target),P(),b(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const V=`[data-fllsrn-id=${u}]`,J=C(V);Ie(J)}P(),document.body.addEventListener("fullscreenchange",me)}},onUnmountedFn:()=>{ve(),document.body.removeEventListener("fullscreenchange",me)},handleClickOutside:V=>{t.emit(zn.CLICK_OUTSIDE,{isShow:m.value,event:V}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&S()},beforeInstanceUnmount:ve,updateBoundary:P,initPopInstance:z,updatePopover:b,showPopover:p,hidePopover:y,showFn:M,hideFn:S,stopHide:I,isFullscreen:d,boundary:oe}},oh=a.defineComponent({name:"Popover",components:{Content:W0,Arrow:_0,Root:H0},directives:{clickoutside:jn},props:yp,emits:pp,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=a.toRefs(e),c=a.ref(),d=a.ref(),u=a.ref(),f=a.ref(),m=a.computed(()=>o.value||c.value),{onMountedFn:p,onUnmountedFn:y,handleClickOutside:b,beforeInstanceUnmount:v,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:N,showPopover:C,hidePopover:I,updatePopover:M,stopHide:S,boundary:z}=e5(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&a.watch(()=>e.isShow,()=>{e.isShow?C():I()},{immediate:!0}),a.watch(()=>[e.disabled],P=>{P[0]?v():T()}),k(),a.onMounted(p),a.onBeforeUnmount(y);const j=a.computed(()=>!s),O=()=>{L()},W=()=>{N()};return{boundary:z,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:j,handleClickOutside:b,updatePopover:M,hide:W,show:O,stopHide:S}},render(){return a.createVNode(H0,{ref:"refRoot"},{default:()=>[a.createVNode(Cp,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:a.createVNode("span",null,null)]}}),a.createVNode(a.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[a.withDirectives(a.createVNode(W0,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content]},arrow:()=>this.arrow?a.createVNode(_0,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const mn=Ge(oh);var t5=a.defineComponent({name:"Popover2",setup(){return()=>a.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const ch=Ge(t5),n5=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:p}=t,y=o||6,b=i||126,v={width:typeof b=="number"?`${b}px`:b,height:typeof b=="number"?`${b}px`:b,fontSize:`${b*.15+6}px`},k=50-y/2,T=f==="dashboard",L=Math.PI*2*k,N=T&&.75||1,C=`${-1*L*(1-N)/2}px`,I="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",M={strokeDasharray:`${L*N}px, ${L}px`,strokeDashoffset:C},S={strokeDasharray:`${L*N*(s/100)}px, ${L}px`,strokeDashoffset:C,transition:I},z=`
|
58
|
+
*/function tp(e,t){if(!D0.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&j0&&e==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var np=tp,ip=Xm,ap=np,z0=10,O0=40,A0=800;function P0(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*z0,s=n*z0,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(e.deltaMode==1?(i*=O0,s*=O0):(i*=A0,s*=A0)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}P0.getEventType=function(){return ip.firefox()?"DOMMouseScroll":ap("wheel")?"wheel":"mousewheel"};var rp=P0,sp=rp;const lp=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,op=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(lp?"DOMMouseScroll":"mousewheel",function(n){const i=sp(n);t==null||t.apply(this,[n,i])})},cp={beforeMount(e,t){console.error(e,t),op(e,t.value)}},up=e=>typeof Element=="undefined"?!1:e instanceof Element,zi=new Map;let E0;document.addEventListener("mousedown",e=>E0=e),document.addEventListener("mouseup",e=>{for(const t of zi.values())for(const{documentHandler:n}of t)n(e,E0)});function V0(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:up(t.arg)&&n.push(t.arg),function(i,s){const{popperRef:o}=t.instance,c=i.target,d=s==null?void 0:s.target,u=!t||!t.instance,f=!c||!d,m=e.contains(c)||e.contains(d),p=e===c,y=n.length&&n.some(v=>v==null?void 0:v.contains(c))||n.length&&n.includes(d),b=o&&(o.contains(c)||o.contains(d));u||f||m||p||y||b||t.value(i,s)}}const jn={beforeMount(e,t){zi.has(e)||zi.set(e,[]),zi.get(e).push({documentHandler:V0(e,t),bindingFn:t.value})},updated(e,t){zi.has(e)||zi.set(e,[]);const n=zi.get(e),i=n.findIndex(o=>o.bindingFn===t.oldValue),s={documentHandler:V0(e,t),bindingFn:t.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(e){zi.delete(e)}};jn.install=e=>{e.directive("bkTooltips",jn)};const Oi=new Map,el={beforeMount(e,t){const n=J0(t),{trigger:i}=n,s=fp(n);if(i==="hover"){let o=null;e.addEventListener("mouseenter",()=>{Oc(e),clearTimeout(o)}),s.addEventListener("mouseenter",()=>{clearTimeout(o)}),e.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Pr(e)},100)}),e.addEventListener("click",()=>{Pr(e)}),s.addEventListener("mouseleave",()=>{o=setTimeout(()=>{Pr(e)},100)})}else i==="click"&&document.body.addEventListener("click",o=>{e.contains(o.target)&&!s.hasAttribute("data-show")?Oc(e):s.hasAttribute("data-show")&&Pr(e)});Oi.set(e,{opts:n,popper:s,popperInstance:null})},updated(e,t){Oi.get(e).opts=J0(t)},unmounted(e){Pr(e),Oi.delete(e)}};function dp(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,extCls:"",onShow:()=>{},onHide:()=>{}}}function J0(e){const t=dp();return typeof e.value=="object"?Object.assign(t,e.value):t.content=e.value,t}function fp(e){const{content:t,arrow:n,theme:i,extCls:s}=e,o=i==="light",c=Qn.getPopperIndex(),d=document.createElement("div");if(d.className=`bk-popper ${o?"light":"dark"} ${s}`,d.innerText=t,d.style.zIndex=String(c),n){const u=Q0();d.appendChild(u)}return d}function Q0(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function hp(e,t){const{opts:n}=Oi.get(e),{placement:i,distance:s,showOnInit:o}=n,c=Of(e,t,{placement:i,modifiers:[{name:"offset",options:{offset:[0,s]}}]});return o&&Oc(e),c}function Oc(e){const{popper:t,opts:n}=Oi.get(e),{disabled:i,content:s,arrow:o,onShow:c}=n;if(i)return;if(t.innerText=s,o){const u=Q0();t.appendChild(u)}document.body.appendChild(t);const d=hp(e,t);c(),t.setAttribute("data-show",""),d.setOptions(u=>Se(Z({},u),{modifiers:[...u.modifiers,{name:"eventListeners",enabled:!0}]})),d.forceUpdate(),Oi.get(e).popperInstance=d}function Pr(e){if(!Oi.get(e))return;const{popper:t,popperInstance:n,opts:i}=Oi.get(e),{onHide:s}=i;t&&document.body.contains(t)&&(t.removeAttribute("data-show"),n==null||n.destroy(),document.body.removeChild(t),s())}const Ac={},Pc=e=>document.querySelector(e)instanceof HTMLElement,gp=()=>(Ac.fullscreenReferId||(Ac.fullscreenReferId=`id_${Li.v4()}`),Ac.fullscreenReferId);function Ec(e){let t=null,n=null,i=null;const s=Se(Z({boundary:"body",placement:"top",autoVisibility:!1},e),{trigger:"manual"}),o=y=>y instanceof Element||y instanceof HTMLDocument,c={name:"$popover",setup(y,{expose:b}){const v=a.ref(s),k=a.ref(),T=a.ref({position:"absolute",pointerEvents:"none",left:0,top:0,width:"auto",height:"auto",transform:""}),L=O=>{if(o(O)){const{x:G,y:B,width:ie,height:oe}=O.getBoundingClientRect();Object.assign(T.value,{width:`${ie}px`,height:`${oe}px`,transform:`translate3d(${G}px,${B}px,0)`});return}const{clientX:W,clientY:P}=O;Object.assign(T.value,{transform:`translate3d(${W}px,${P}px,0)`,width:"10px",height:"10px"})};L(v.value.target);const N=()=>{setTimeout(()=>{var O,W;(W=(O=k.value)==null?void 0:O.show)==null||W.call(O)})},C=()=>{var O,W;(W=(O=k.value)==null?void 0:O.hide)==null||W.call(O)},I=()=>{var O,W;(W=(O=k.value)==null?void 0:O.stopHide)==null||W.call(O)},M=a.computed(()=>{const O=["target"];return Object.keys(v.value).filter(W=>!O.includes(W)).reduce((W,P)=>Se(Z({},W),{[P]:v.value[P]}),{})}),S=O=>{var W,P;v.value.target=O,L(O),(P=(W=k.value)==null?void 0:W.updatePopover)==null||P.call(W),a.nextTick(()=>{var G,B;(B=(G=k.value)==null?void 0:G.updatePopover)==null||B.call(G)})},z=()=>{var O;(O=s.onContentMouseenter)==null||O.call(s)},j=()=>{var O;(O=s.onContentMouseleave)==null||O.call(s)};return b({show:N,hide:C,updateTarget:S,stopHide:I}),()=>a.createVNode(oh,a.mergeProps(M.value,{ref:k,onContentMouseenter:z,onContentMouseleave:j}),{default:()=>[a.createVNode("span",{style:T.value},null)]})}};function d(y){return/^body$/i.test(y)?document.body:/^parent$/i.test(y)?o(s.target)?s.target.parentNode:s.target.target.parentNode:typeof y=="string"&&Pc(y)?document.querySelector(y):document.body}t===null&&(i=document.createElement("div"),d(s.boundary).append(i),setTimeout(()=>{t=a.createApp(c),n=t.mount(i)}));function u(){t&&(t.unmount(),n=null,t=null,i.remove())}function f(){n==null||n.show()}function m(y){n==null||n.updateTarget(y)}function p(){n==null||n.hide()}return{close:u,show:f,hide:p,update:m,get vm(){return n},get $el(){return n.$el}}}const R0=(e,t)=>{const n={content:"",target:e};return typeof t.value=="object"?Object.assign(n,t.value):n.content=t.value,n},Vc=(e,t)=>{let n=null,i=null,s=null;const o=R0(e,t),{disabled:c}=o;if(c||n)return;const d=()=>{s&&clearTimeout(s),s=null},u=()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},f=()=>{i&&clearTimeout(i),i=setTimeout(()=>{const y=R0(e,t);y.content=y.content||e.innerHTML,Object.assign(y,{onContentMouseenter:d,onContentMouseleave:u}),n=Ec(y),setTimeout(()=>{n.show()})},100)},m=()=>{s=setTimeout(()=>{i&&clearTimeout(i),n==null||n.hide(),n==null||n.close(),n=null},120)};return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",m),Object.assign(t,{__cached:{handleMouseEnter:f,handleMouseLeave:m}}),{destroyInstance:y=>{var b,v;m(),(b=y!=null?y:e)==null||b.removeEventListener("mouseenter",f),(v=y!=null?y:e)==null||v.removeEventListener("mouseleave",m)},instance:n}},mp={mounted(e,t){Vc(e,t)},beforeUnmount(e,t){if(t.__cached){const{handleMouseEnter:n,handleMouseLeave:i}=t.__cached;e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",i),t.__cached=null}}};var _0=a.defineComponent({name:"PopArrow",render(){const e=Ve("pop2-arrow");return a.createVNode("div",{class:e},null)}});const Ha=(...e)=>!0;let zn;(function(e){e.SHOW="show",e.HIDE="hide",e.CLICK_OUTSIDE="clickoutside",e.CONTENT_MOUSEENTER="contentMouseenter",e.CONTENT_MOUSELEAVE="contentMouseleave",e.STOP_HIDE="stopHide"})(zn||(zn={}));const pp={[zn.SHOW]:Ha,[zn.HIDE]:Ha,[zn.CLICK_OUTSIDE]:Ha,[zn.CONTENT_MOUSEENTER]:Ha,[zn.CONTENT_MOUSELEAVE]:Ha,[zn.STOP_HIDE]:Ha};var W0=a.defineComponent({name:"PopContent",props:{width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto")},setup(e){const t=i=>/^\d+\.?\d*$/.test(`${i}`)?`${i}px`:i;return{style:a.computed(()=>({width:t(e.width),height:t(e.height)}))}},render(){var t,n,i,s,o,c;const e=[Ve("popover"),Ve("pop2-content")];return a.createVNode("div",{class:e,tabindex:"-1",style:this.style},[(i=(n=(t=this.$slots).arrow)==null?void 0:n.call(t))!=null?i:"",(c=(o=(s=this.$slots).default)==null?void 0:o.call(s))!=null?c:""])}});const bp={onAfterHidden:Function,onAfterShow:Function},yp=Z({isShow:g.bool.def(!1),always:g.bool.def(!1),disabled:g.bool.def(!1),width:g.oneOfType([g.string,g.number]).def("auto"),height:g.oneOfType([g.string,g.number]).def("auto"),content:g.oneOfType([g.string,g.number]).def(""),placement:Uf().def(Os.TOP),theme:g.string.def("dark"),trigger:$f(),arrow:g.bool.def(!0),padding:g.number.def(5),offset:g.oneOfType([g.number,g.shape({})]).def(6),boundary:g.oneOfType([g.string.def("parent"),g.instanceOf(HTMLElement)]),zIndex:g.number.def(void 0),disableTeleport:g.bool.def(!1),autoPlacement:g.bool.def(!1),autoVisibility:g.bool.def(!0),disableOutsideClick:g.bool.def(!1),disableTransform:g.bool.def(!1),reference:g.any.def(null),modifiers:g.array.def([]),popoverDelay:g.number.def(100)},bp);var Cp=a.defineComponent({name:"PopReference",render(){var e,t,n;return(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""}}),H0=a.defineComponent({props:{class:g.string.def("")},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});function ai(e){return e.split("-")[0]}function sa(e){return e.split("-")[1]}function Ba(e){return["top","bottom"].includes(ai(e))?"x":"y"}function Jc(e){return e==="y"?"height":"width"}function B0(e,t,n){let{reference:i,floating:s}=e;const o=i.x+i.width/2-s.width/2,c=i.y+i.height/2-s.height/2,d=Ba(t),u=Jc(d),f=i[u]/2-s[u]/2,m=ai(t),p=d==="x";let y;switch(m){case"top":y={x:o,y:i.y-s.height};break;case"bottom":y={x:o,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:c};break;case"left":y={x:i.x-s.width,y:c};break;default:y={x:i.x,y:i.y}}switch(sa(t)){case"start":y[d]-=f*(n&&p?-1:1);break;case"end":y[d]+=f*(n&&p?-1:1);break}return y}const vp=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:c}=n,d=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:m}=B0(u,i,d),p=i,y={};for(let b=0;b<o.length;b++){const{name:v,fn:k}=o[b],{x:T,y:L,data:N,reset:C}=await k({x:f,y:m,initialPlacement:i,placement:p,strategy:s,middlewareData:y,rects:u,platform:c,elements:{reference:e,floating:t}});if(f=T!=null?T:f,m=L!=null?L:m,y=Se(Z({},y),{[v]:Z(Z({},y[v]),N)}),C){typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:f,y:m}=B0(u,p,d)),b=-1;continue}}return{x:f,y:m,placement:p,strategy:s,middlewareData:y}};function wp(e){return Z({top:0,right:0,bottom:0,left:0},e)}function Qc(e){return typeof e!="number"?wp(e):{top:e,right:e,bottom:e,left:e}}function Er(e){return Se(Z({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Vr(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:o,rects:c,elements:d,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:y=!1,padding:b=0}=t,v=Qc(b),T=d[y?p==="floating"?"reference":"floating":p],L=Er(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:f,rootBoundary:m,strategy:u})),N=Er(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?Se(Z({},c.floating),{x:i,y:s}):c.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),strategy:u}):c[p]);return{top:L.top-N.top+v.top,bottom:N.bottom-L.bottom+v.bottom,left:L.left-N.left+v.left,right:N.right-L.right+v.right}}const F0=Math.min,G0=Math.max;function Rc(e,t,n){return G0(e,F0(t,n))}const Mp=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:i=0}=e!=null?e:{},{x:s,y:o,placement:c,rects:d,platform:u}=t;if(n==null)return{};const f=Qc(i),m={x:s,y:o},p=Ba(c),y=sa(c),b=Jc(p),v=await u.getDimensions(n),k=p==="y"?"top":"left",T=p==="y"?"bottom":"right",L=d.reference[b]+d.reference[p]-m[p]-d.floating[b],N=m[p]-d.reference[p],C=await(u.getOffsetParent==null?void 0:u.getOffsetParent(n));let I=C?p==="y"?C.clientHeight||0:C.clientWidth||0:0;I===0&&(I=d.floating[b]);const M=L/2-N/2,S=f[k],z=I-v[b]-f[T],j=I/2-v[b]/2+M,O=Rc(S,j,z),G=(y==="start"?f[k]:f[T])>0&&j!==O&&d.reference[b]<=d.floating[b]?j<S?S-j:z-j:0;return{[p]:m[p]-G,data:{[p]:O,centerOffset:j-O}}}}),Ip={left:"right",right:"left",bottom:"top",top:"bottom"};function tl(e){return e.replace(/left|right|bottom|top/g,t=>Ip[t])}function Z0(e,t,n){n===void 0&&(n=!1);const i=sa(e),s=Ba(e),o=Jc(s);let c=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=tl(c)),{main:c,cross:tl(c)}}const Np={start:"end",end:"start"};function _c(e){return e.replace(/start|end/g,t=>Np[t])}const Y0=["top","right","bottom","left"],Lp=Y0.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function kp(e,t,n){return(e?[...n.filter(s=>sa(s)===e),...n.filter(s=>sa(s)!==e)]:n.filter(s=>ai(s)===s)).filter(s=>e?sa(s)===e||(t?_c(s)!==s:!1):!0)}const Tp=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,s,o,c;const{x:d,y:u,rects:f,middlewareData:m,placement:p,platform:y,elements:b}=t,ie=e,{alignment:v=null,allowedPlacements:k=Lp,autoAlignment:T=!0}=ie,L=Sa(ie,["alignment","allowedPlacements","autoAlignment"]),N=kp(v,T,k),C=await Vr(t,L),I=(n=(i=m.autoPlacement)==null?void 0:i.index)!=null?n:0,M=N[I];if(M==null)return{};const{main:S,cross:z}=Z0(M,f,await(y.isRTL==null?void 0:y.isRTL(b.floating)));if(p!==M)return{x:d,y:u,reset:{placement:N[0]}};const j=[C[ai(M)],C[S],C[z]],O=[...(s=(o=m.autoPlacement)==null?void 0:o.overflows)!=null?s:[],{placement:M,overflows:j}],W=N[I+1];if(W)return{data:{index:I+1,overflows:O},reset:{placement:W}};const P=O.slice().sort((oe,ve)=>oe.overflows[0]-ve.overflows[0]),G=(c=P.find(oe=>{let{overflows:ve}=oe;return ve.every(Ie=>Ie<=0)}))==null?void 0:c.placement,B=G!=null?G:P[0].placement;return B!==p?{data:{index:I+1,overflows:O},reset:{placement:B}}:{}}}};function Sp(e){const t=tl(e);return[_c(e),t,_c(t)]}const xp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:i,middlewareData:s,rects:o,initialPlacement:c,platform:d,elements:u}=t,O=e,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",flipAlignment:b=!0}=O,v=Sa(O,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),k=ai(i),L=p||(k===c||!b?[tl(c)]:Sp(c)),N=[c,...L],C=await Vr(t,v),I=[];let M=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&I.push(C[k]),m){const{main:W,cross:P}=Z0(i,o,await(d.isRTL==null?void 0:d.isRTL(u.floating)));I.push(C[W],C[P])}if(M=[...M,{placement:i,overflows:I}],!I.every(W=>W<=0)){var S,z;const W=((S=(z=s.flip)==null?void 0:z.index)!=null?S:0)+1,P=N[W];if(P)return{data:{index:W,overflows:M},reset:{placement:P}};let G="bottom";switch(y){case"bestFit":{var j;const B=(j=M.map(ie=>[ie,ie.overflows.filter(oe=>oe>0).reduce((oe,ve)=>oe+ve,0)]).sort((ie,oe)=>ie[1]-oe[1])[0])==null?void 0:j[0].placement;B&&(G=B);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function U0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $0(e){return Y0.some(t=>e[t]>=0)}const Dp=function(e){let i=e===void 0?{}:e,{strategy:t="referenceHidden"}=i,n=Sa(i,["strategy"]);return{name:"hide",async fn(s){const{rects:o}=s;switch(t){case"referenceHidden":{const c=await Vr(s,Se(Z({},n),{elementContext:"reference"})),d=U0(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:$0(d)}}}case"escaped":{const c=await Vr(s,Se(Z({},n),{altBoundary:!0})),d=U0(c,o.floating);return{data:{escapedOffsets:d,escaped:$0(d)}}}default:return{}}}}};async function jp(e,t){const{placement:n,platform:i,elements:s}=e,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=ai(n),d=sa(n),u=Ba(n)==="x",f=["left","top"].includes(c)?-1:1,m=o&&u?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:y,crossAxis:b,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:Z({mainAxis:0,crossAxis:0,alignmentAxis:null},p);return d&&typeof v=="number"&&(b=d==="end"?v*-1:v),u?{x:b*m,y:y*f}:{x:y*f,y:b*m}}const zp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:i}=t,s=await jp(t,e);return{x:n+s.x,y:i+s.y,data:s}}}};function Op(e){return e==="x"?"y":"x"}const Ap=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,T=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:d={fn:L=>{let{x:N,y:C}=L;return{x:N,y:C}}}}=T,u=Sa(T,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},m=await Vr(t,u),p=Ba(ai(s)),y=Op(p);let b=f[p],v=f[y];if(o){const L=p==="y"?"top":"left",N=p==="y"?"bottom":"right",C=b+m[L],I=b-m[N];b=Rc(C,b,I)}if(c){const L=y==="y"?"top":"left",N=y==="y"?"bottom":"right",C=v+m[L],I=v-m[N];v=Rc(C,v,I)}const k=d.fn(Se(Z({},t),{[p]:b,[y]:v}));return Se(Z({},k),{data:{x:k.x-n,y:k.y-i}})}}},Pp=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:i,elements:s,rects:o,platform:c,strategy:d}=t,{padding:u=2,x:f,y:m}=e,p=Er(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({rect:o.reference,offsetParent:await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),strategy:d}):o.reference),y=(n=await(c.getClientRects==null?void 0:c.getClientRects(s.reference)))!=null?n:[],b=Qc(u);function v(){if(y.length===2&&y[0].left>y[1].right&&f!=null&&m!=null){var T;return(T=y.find(L=>f>L.left-b.left&&f<L.right+b.right&&m>L.top-b.top&&m<L.bottom+b.bottom))!=null?T:p}if(y.length>=2){if(Ba(i)==="x"){const P=y[0],G=y[y.length-1],B=ai(i)==="top",ie=P.top,oe=G.bottom,ve=B?P.left:G.left,Ie=B?P.right:G.right,me=Ie-ve,ge=oe-ie;return{top:ie,bottom:oe,left:ve,right:Ie,width:me,height:ge,x:ve,y:ie}}const L=ai(i)==="left",N=G0(...y.map(P=>P.right)),C=F0(...y.map(P=>P.left)),I=y.filter(P=>L?P.left===C:P.right===N),M=I[0].top,S=I[I.length-1].bottom,z=C,j=N,O=j-z,W=S-M;return{top:M,bottom:S,left:z,right:j,width:O,height:W,x:z,y:M}}return p}const k=await c.getElementRects({reference:{getBoundingClientRect:v},floating:s.floating,strategy:d});return o.reference.x!==k.reference.x||o.reference.y!==k.reference.y||o.reference.width!==k.reference.width||o.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}};function K0(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function ri(e){if(e==null)return window;if(!K0(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jr(e){return ri(e).getComputedStyle(e)}function si(e){return K0(e)?"":e?(e.nodeName||"").toLowerCase():""}function X0(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Bn(e){return e instanceof ri(e).HTMLElement}function Ai(e){return e instanceof ri(e).Element}function Ep(e){return e instanceof ri(e).Node}function Wc(e){if(typeof ShadowRoot=="undefined")return!1;const t=ri(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function nl(e){const{overflow:t,overflowX:n,overflowY:i}=Jr(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function Vp(e){return["table","td","th"].includes(si(e))}function q0(e){const t=/firefox/i.test(X0()),n=Jr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function eh(){return!/^((?!chrome|android).)*safari/i.test(X0())}const th=Math.min,Qr=Math.max,il=Math.round;function li(e,t,n){var i,s,o,c;t===void 0&&(t=!1),n===void 0&&(n=!1);const d=e.getBoundingClientRect();let u=1,f=1;t&&Bn(e)&&(u=e.offsetWidth>0&&il(d.width)/e.offsetWidth||1,f=e.offsetHeight>0&&il(d.height)/e.offsetHeight||1);const m=Ai(e)?ri(e):window,p=!eh()&&n,y=(d.left+(p&&(i=(s=m.visualViewport)==null?void 0:s.offsetLeft)!=null?i:0))/u,b=(d.top+(p&&(o=(c=m.visualViewport)==null?void 0:c.offsetTop)!=null?o:0))/f,v=d.width/u,k=d.height/f;return{width:v,height:k,top:b,right:y+v,bottom:b+k,left:y,x:y,y:b}}function Pi(e){return((Ep(e)?e.ownerDocument:e.document)||window.document).documentElement}function al(e){return Ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function nh(e){return li(Pi(e)).left+al(e).scrollLeft}function Jp(e){const t=li(e);return il(t.width)!==e.offsetWidth||il(t.height)!==e.offsetHeight}function Qp(e,t,n){const i=Bn(t),s=Pi(t),o=li(e,i&&Jp(t),n==="fixed");let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if(i||!i&&n!=="fixed")if((si(t)!=="body"||nl(s))&&(c=al(t)),Bn(t)){const u=li(t,!0);d.x=u.x+t.clientLeft,d.y=u.y+t.clientTop}else s&&(d.x=nh(s));return{x:o.left+c.scrollLeft-d.x,y:o.top+c.scrollTop-d.y,width:o.width,height:o.height}}function ih(e){return si(e)==="html"?e:e.assignedSlot||e.parentNode||(Wc(e)?e.host:null)||Pi(e)}function ah(e){return!Bn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Rp(e){let t=ih(e);for(Wc(t)&&(t=t.host);Bn(t)&&!["html","body"].includes(si(t));){if(q0(t))return t;t=t.parentNode}return null}function Hc(e){const t=ri(e);let n=ah(e);for(;n&&Vp(n)&&getComputedStyle(n).position==="static";)n=ah(n);return n&&(si(n)==="html"||si(n)==="body"&&getComputedStyle(n).position==="static"&&!q0(n))?t:n||Rp(e)||t}function rh(e){if(Bn(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=li(e);return{width:t.width,height:t.height}}function _p(e){let{rect:t,offsetParent:n,strategy:i}=e;const s=Bn(n),o=Pi(n);if(n===o)return t;let c={scrollLeft:0,scrollTop:0};const d={x:0,y:0};if((s||!s&&i!=="fixed")&&((si(n)!=="body"||nl(o))&&(c=al(n)),Bn(n))){const u=li(n,!0);d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}return Se(Z({},t),{x:t.x-c.scrollLeft+d.x,y:t.y-c.scrollTop+d.y})}function Wp(e,t){const n=ri(e),i=Pi(e),s=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,d=0,u=0;if(s){o=s.width,c=s.height;const f=eh();(f||!f&&t==="fixed")&&(d=s.offsetLeft,u=s.offsetTop)}return{width:o,height:c,x:d,y:u}}function Hp(e){var t;const n=Pi(e),i=al(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=Qr(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=Qr(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-i.scrollLeft+nh(e);const u=-i.scrollTop;return Jr(s||n).direction==="rtl"&&(d+=Qr(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:d,y:u}}function sh(e){const t=ih(e);return["html","body","#document"].includes(si(t))?e.ownerDocument.body:Bn(t)&&nl(t)?t:sh(t)}function rl(e,t){var n;t===void 0&&(t=[]);const i=sh(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=ri(i),c=s?[o].concat(o.visualViewport||[],nl(i)?i:[]):i,d=t.concat(c);return s?d:d.concat(rl(c))}function Bp(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Wc(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function Fp(e,t){const n=li(e,!1,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft;return{top:i,left:s,x:s,y:i,right:s+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function lh(e,t,n){return t==="viewport"?Er(Wp(e,n)):Ai(t)?Fp(t,n):Er(Hp(Pi(e)))}function Gp(e){const t=rl(e),i=["absolute","fixed"].includes(Jr(e).position)&&Bn(e)?Hc(e):e;return Ai(i)?t.filter(s=>Ai(s)&&Bp(s,i)&&si(s)!=="body"):[]}function Zp(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const c=[...n==="clippingAncestors"?Gp(t):[].concat(n),i],d=c[0],u=c.reduce((f,m)=>{const p=lh(t,m,s);return f.top=Qr(p.top,f.top),f.right=th(p.right,f.right),f.bottom=th(p.bottom,f.bottom),f.left=Qr(p.left,f.left),f},lh(t,d,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}const Yp={getClippingRect:Zp,convertOffsetParentRelativeRectToViewportRelativeRect:_p,isElement:Ai,getDimensions:rh,getOffsetParent:Hc,getDocumentElement:Pi,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:Qp(t,Hc(n),i),floating:Se(Z({},rh(n)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Jr(e).direction==="rtl"};function Up(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:c=!0,animationFrame:d=!1}=i,u=s&&!d,f=o&&!d,m=u||f?[...Ai(e)?rl(e):[],...rl(t)]:[];m.forEach(k=>{u&&k.addEventListener("scroll",n,{passive:!0}),f&&k.addEventListener("resize",n)});let p=null;c&&(p=new ResizeObserver(n),Ai(e)&&!d&&p.observe(e),p.observe(t));let y,b=d?li(e):null;d&&v();function v(){const k=li(e);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&n(),b=k,y=requestAnimationFrame(v)}return c||n(),()=>{var k;m.forEach(T=>{u&&T.removeEventListener("scroll",n),f&&T.removeEventListener("resize",n)}),(k=p)==null||k.disconnect(),p=null,d&&cancelAnimationFrame(y)}}const $p=(e,t,n)=>vp(e,t,Z({platform:Yp},n));var Kp=e=>({getElementRects:({reference:s,floating:o})=>{const c=s.getBoundingClientRect(),d=o.getBoundingClientRect();return{reference:{width:c.width,height:c.height,x:c.x,y:c.y},floating:{width:d.width,height:d.height,x:d.x,y:d.y}}},getDimensions:s=>{const{width:o,height:c}=s.getBoundingClientRect();return{width:o,height:c}},getClippingRect:({})=>{var c;const{width:s=0,height:o=0}=(c=e==null?void 0:e.getBoundingClientRect())!=null?c:{};return{width:s,height:o,x:0,y:0}}}),Xp=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{const c=a.ref(!1),d=a.ref(),u=()=>{var de,we,q;const X=L((de=n.value)==null?void 0:de.$el);return(we=document.fullscreenElement)!=null&&we.shadowRoot?document.fullscreenElement.shadowRoot.contains(X):(q=document.fullscreenElement)==null?void 0:q.contains(X)},f=X=>u()?document.fullscreenElement.shadowRoot?document.fullscreenElement.shadowRoot.querySelector(X):document.fullscreenElement.querySelector(X):document.body,m=["dark","light"],p=a.computed(()=>{var q,H;const X=(H=(q=e.theme)==null?void 0:q.split(/\s+/))!=null?H:[];X.sort((R,ae)=>Number(m.includes(ae))-Number(m.includes(R)));const de=X,we=X.filter(R=>!m.includes(R));return{systemThemes:de,customThemes:we}}),y=()=>e.autoVisibility,b=()=>e.autoPlacement,v=()=>{var H,R,ae,D;const X=L((H=n.value)==null?void 0:H.$el),de=L((R=i.value)==null?void 0:R.$el),we=e.arrow?L((ae=s.value)==null?void 0:ae.$el):null,q=L((D=o.value)==null?void 0:D.$el);return{elReference:X,elContent:de,elArrow:we,root:q}},k=()=>{const X={};return Array.isArray(e.modifiers)&&e.modifiers.forEach(de=>{var q,H,R,ae;let we;if(de.name==="offset"){if(typeof((q=de.options)==null?void 0:q.offset)=="number"&&(we=(H=de.options)==null?void 0:H.offset),Array.isArray((R=de.options)==null?void 0:R.offset)){const[D,_]=(ae=de.options)==null?void 0:ae.offset;we={mainAxis:D,crossAxis:_}}Object.assign(X,{offset:we})}}),X},T=(X,de)=>{var R;const we=k(),q=[zp(we.offset||de.offset),Ap({padding:de.padding})],H={placement:de.placement,middleware:q};if(de.arrow&&q.push(Mp({element:X})),b()?q.push(Tp()):(q.unshift(Pp()),q.push(xp())),y()&&H.middleware.push(Dp()),u()||de.isVirtualEl){const{getElementRects:ae,getDimensions:D,getClippingRect:_}=Kp(d.value);Object.assign(H,{platform:Se(Z({},(R=de==null?void 0:de.platform)!=null?R:{}),{getElementRects:ae,getDimensions:D,getClippingRect:_})})}return H},L=X=>X instanceof HTMLElement?X:X instanceof Text?L(X.nextElementSibling):typeof(X==null?void 0:X.getBoundingClientRect)=="function"?X:null,N=p.value.customThemes.join(" "),C=p.value.customThemes.reduce((X,de)=>Z({[`data-${de}-theme`]:!0},X),{}),I=`${N}`;let M=null;const S=X=>{const de=window.devicePixelRatio||1;return Math.round(X*de)/de||0},z=(X,de,we,q)=>{var R;e.disableTransform?Object.assign(X.style,{left:`${S(de)}px`,top:`${S(we)}px`}):Object.assign(X.style,{left:"0",top:"0",transform:`translate3d(${S(de)}px,${S(we)}px,0)`});const H=y()?(R=q.hide)==null?void 0:R.referenceHidden:!1;Object.assign(X.style,{visibility:H?"hidden":"visible"})},j=(X,de,we)=>{var q;if(e.arrow){const{x:H,y:R}=(q=we.arrow)!=null?q:{};X.setAttribute("data-arrow",de);const ae={left:"",top:"",bottom:"",right:""};Object.assign(X.style,ae);const D={top:"bottom",right:"left",bottom:"top",left:"right"}[de];Object.assign(X.style,{left:H!==null?`${H}px`:"",top:R!==null?`${R}px`:"",[D]:"-4px"})}},O=()=>{const{elReference:X,elContent:de}=v();M=Up(X,de,()=>{W(null,e)})},W=(X=null,de={})=>{const{elReference:we,elContent:q,elArrow:H}=v(),R=X||we;if(!R||!q)return;const ae=T(H,de);$p(R,q,ae).then(({x:D,y:_,placement:Q,middlewareData:se})=>{const ue=q.className;q.className=`${ue.replace(I,"")} ${I}`.replace(/\s+/mg," ").replace(/^\s+|\s+$/g,""),Object.keys(C).forEach(le=>{q.setAttribute(le,C[le])});const be=Q.split("-")[0];let te=be;["left","right","top","bottom"].includes(be)||(te="top"),z(q,D,_,se),j(H,te,se)})};let P,G=!1;const B=()=>{setTimeout(()=>{!e.disabled&&(c.value=!0)},e.popoverDelay)},ie=()=>{P=setTimeout(()=>{c.value=!1},e.popoverDelay)},oe=()=>{var de;const X=L((de=i.value)==null?void 0:de.$el);X.style.setProperty("display","block"),X.style.setProperty("z-index",`${e.zIndex?e.zIndex:Qn.getModalNextIndex()}`),W(),t.emit("afterShow",{isShow:!0})},ve=()=>{var de;L((de=i.value)==null?void 0:de.$el).style.setProperty("display","none"),t.emit("afterHidden",{isShow:!1})},Ie=()=>{c.value?ie():B()},me=()=>{Ie()},ge=()=>{e.trigger==="hover"&&(P&&(G=!0,clearTimeout(P),P=void 0),U())},$=()=>{G&&(ie(),G=!1,V())},U=()=>{t.emit(zn.CONTENT_MOUSEENTER)},V=()=>{t.emit(zn.CONTENT_MOUSELEAVE)},J=()=>{var de;return(de={hover:{content:[["mouseenter",ge],["mouseleave",$]],reference:[["mouseenter",B],["mouseleave",ie],["focus",B],["blur",ie]]},click:[["click",me]],manual:{content:[["mouseenter",U],["mouseleave",V]],reference:[[]]}}[e.trigger])!=null?de:[]},re=X=>{d.value=X};return a.watch(c,X=>{X?oe():ve()}),{showPopover:B,hidePopover:ie,resolveTriggerEvents:J,updatePopover:W,triggerPopover:Ie,resolvePopElements:v,isElementFullScreen:u,resolveTargetElement:L,createPopInstance:O,updateFullscreenTarget:re,getFullscreenRoot:f,stopHide:()=>{P&&(G=!0,clearTimeout(P),P=void 0)},localIsShow:c,cleanup:M}};let Ei=null,sl=null;var qp=(e,t="#")=>{const n=i=>{let s=null;const o=u=>{s===null&&u()},c=()=>{if(/^parent$/i.test(e.boundary)){s=`${t}${Ei}`;const{parentNode:u}=i||{};u!=null&&u.parentNode&&(u.parentNode.setAttribute("data-pnode-id",sl),s=`[data-pnode-id=${sl}]`)}},d=()=>{if(!/^body$/i.test(e.boundary)&&typeof e.boundary=="string"){if(!Pc(e.boundary)){console.error("props.boundary is not available selector"),s="body";return}s=e.boundary}};return o(c),o(d),o(()=>{s=typeof e.boundary=="string"?e.boundary:`${t}${Ei}`}),s};if(Ei===null||!Pc(`#${Ei}`)){Ei=`id_${Li.v4()}`;const i=document.createElement("div");i.setAttribute("id",Ei),i.setAttribute("data-popper-id",Ei),document.body.append(i)}return sl===null&&(sl=`id_${Li.v4()}`),{popContainerId:Ei,prefixId:n(),getPrefixId:n}},e5=(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o})=>{let c=null;const d=a.ref(!1),u=gp(),f=a.ref(),{localIsShow:m,showPopover:p,hidePopover:y,updatePopover:b,resolveTriggerEvents:v,resolvePopElements:k,isElementFullScreen:T,updateFullscreenTarget:L,createPopInstance:N,getFullscreenRoot:C,stopHide:I}=Xp(e,t,{refReference:n,refContent:i,refArrow:s,refRoot:o}),M=()=>{p()},S=()=>{y()},z=()=>{N(),e.always?p():j()},j=()=>{const{elReference:V,elContent:J}=k();if(c=v(),Array.isArray(c))O(V,c);else{const{content:re,reference:K}=c;O(V,K),O(J,re)}},O=(V,J)=>{J.forEach(([re,K])=>{re&&typeof K=="function"&&V.addEventListener(re,K)})},W=()=>{if(c!=null&&c.length){const{elReference:V}=k();V&&c.forEach(([J,re])=>{J&&typeof re=="function"&&V.removeEventListener(J,re)}),c=null}},P=()=>{const{elReference:V,root:J}=k();if(d.value){oe.value=f==null?void 0:f.value;return}oe.value=G(J||V)},{getPrefixId:G}=qp(e,"#"),B=()=>{var V;(V=f==null?void 0:f.value)==null||V.setAttribute("data-fllsrn-id",u)},ie=()=>{var J,re;const V=`[data-fllsrn-id=${u}]`;((re=(J=f==null?void 0:f.value)==null?void 0:J.querySelectorAll(V))!=null?re:[]).forEach(K=>{K==null||K.removeAttribute("data-fllsrn-id")})},oe=a.ref(),ve=()=>{W()},Ie=V=>{f.value=V,L(V),d.value=T(),B()},me=V=>{document.fullscreenElement||ie(),Ie(V.target),P(),b(null,e)};return{onMountedFn:()=>{if(!e.disabled){if(z(),T()){const V=`[data-fllsrn-id=${u}]`,J=C(V);Ie(J)}P(),document.body.addEventListener("fullscreenchange",me)}},onUnmountedFn:()=>{ve(),document.body.removeEventListener("fullscreenchange",me)},handleClickOutside:V=>{t.emit(zn.CLICK_OUTSIDE,{isShow:m.value,event:V}),!(e.disableOutsideClick||e.always||e.disabled||e.trigger==="manual")&&m.value&&S()},beforeInstanceUnmount:ve,updateBoundary:P,initPopInstance:z,updatePopover:b,showPopover:p,hidePopover:y,showFn:M,hideFn:S,stopHide:I,isFullscreen:d,boundary:oe}},oh=a.defineComponent({name:"Popover",components:{Content:W0,Arrow:_0,Root:H0},directives:{clickoutside:jn},props:yp,emits:pp,setup(e,t){const{content:n,theme:i,disableTeleport:s}=e,{reference:o}=a.toRefs(e),c=a.ref(),d=a.ref(),u=a.ref(),f=a.ref(),m=a.computed(()=>o.value||c.value),{onMountedFn:p,onUnmountedFn:y,handleClickOutside:b,beforeInstanceUnmount:v,updateBoundary:k,initPopInstance:T,showFn:L,hideFn:N,showPopover:C,hidePopover:I,updatePopover:M,stopHide:S,boundary:z}=e5(e,t,{refReference:m,refContent:d,refArrow:u,refRoot:f});!e.always&&!e.disabled&&a.watch(()=>e.isShow,()=>{e.isShow?C():I()},{immediate:!0}),a.watch(()=>[e.disabled],P=>{P[0]?v():T()}),k(),a.onMounted(p),a.onBeforeUnmount(y);const j=a.computed(()=>!s),O=()=>{L()},W=()=>{N()};return{boundary:z,arrow:e.arrow,refDefaultReference:c,refContent:d,refArrow:u,content:n,theme:i,transBoundary:j,handleClickOutside:b,updatePopover:M,hide:W,show:O,stopHide:S}},render(){return a.createVNode(H0,{ref:"refRoot"},{default:()=>[a.createVNode(Cp,{ref:"refDefaultReference"},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:a.createVNode("span",null,null)]}}),a.createVNode(a.Teleport,{to:this.boundary,disabled:!this.transBoundary},{default:()=>[a.withDirectives(a.createVNode(W0,{ref:"refContent","data-theme":this.theme,width:this.width,height:this.height},{default:()=>{var e,t,n;return[(n=(t=(e=this.$slots).content)==null?void 0:t.call(e))!=null?n:this.content]},arrow:()=>this.arrow?a.createVNode(_0,{ref:"refArrow"},{default:()=>{var e,t;return[(t=(e=this.$slots).arrow)==null?void 0:t.call(e)]}}):""}),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])]})]})}});const mn=Ge(oh);var t5=a.defineComponent({name:"Popover2",setup(){return()=>a.createVNode("code",null,["<bk-popover2></bk-popover2>\u5DF2\u7ECF\u5408\u5E76\u4E3A<bk-popover></bk-popover>\uFF0C\u8BF7\u66FF\u6362\u4E3A<bk-popover></bk-popover>"])}});const ch=Ge(t5),n5=(e,{attrs:t,slots:n})=>{const{width:i,percent:s,strokeWidth:o,color:c,strokeLinecap:d,theme:u,type:f,bgColor:m,titleStyle:p}=t,y=o||6,b=i||126,v={width:typeof b=="number"?`${b}px`:b,height:typeof b=="number"?`${b}px`:b,fontSize:`${b*.15+6}px`},k=50-y/2,T=f==="dashboard",L=Math.PI*2*k,N=T&&.75||1,C=`${-1*L*(1-N)/2}px`,I="stroke-dasharray 0.6s ease 0s, stroke 0.6s ease",M={strokeDasharray:`${L*N}px, ${L}px`,strokeDashoffset:C},S={strokeDasharray:`${L*N*(s/100)}px, ${L}px`,strokeDashoffset:C,transition:I},z=`
|
59
59
|
M 50 50
|
60
60
|
m 0 ${T?"":"-"}${k}
|
61
61
|
a ${k} ${k} 0 1 1 0 ${T?"-":""}${k*2}
|
62
62
|
a ${k} ${k} 0 1 1 0 ${T?"":"-"}${k*2}
|
63
|
-
`,j={d:z,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:M},O={d:z,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&y||0,"fill-opacity":"0",class:`process-circle-path bk-${u}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",j,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},i5=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:u,textInside:f,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},y={width:`${i}%`,background:c,animationDuration:"3s"},b=(v=!0)=>(u||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function uh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var a5=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def(zs.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Se(Z({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(i5,t,uh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(n5,t,uh(e)?e:{default:()=>[e]}));const i={class:je({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Rr=Ge(a5),dh=Symbol("RadioGroup");function fh(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const hh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(dh,a0),s=!r0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},u=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("update:modelValue",p),n("change",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:u}},r5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var s5=a.defineComponent({name:"Radio",props:r5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=fh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=hh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=je({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:"bk-radio-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const l5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var o5=a.defineComponent({name:"RadioButton",props:l5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=fh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=hh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=je({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:"bk-radio-button-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const c5={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var u5=a.defineComponent({name:"RadioGroup",props:c5,emits:["change","update:modelValue"],setup(e,t){const n=xn(),i=[],s=d=>{i.push(d)},o=d=>{const u=i.indexOf(d);u>-1&&i.splice(u,1)},c=d=>{const u=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};return a.provide(dh,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const gh=Gt(s5,{Group:u5,Button:o5});var ll=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const u=d+1;t("chooseRate",u)},i=d=>{if(!e.editable)return;const u=d+1;t("changeHover",u)},s=d=>je({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,u)=>a.createVNode("svg",{class:s(u),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:()=>i(u)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),d5=a.defineComponent({name:"Rate",components:{star:ll},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=je({"bk-rate":!0}),u={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(u.width+3)*p,b=u.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(ll,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(ll,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(ll,a.mergeProps({rate:0,editable:!1},m),null)]])}});const mh=Ge(d5);var f5=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),y=a.ref(0),b=a.ref(0);let v;const k=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),T=a.computed(()=>({width:`${p.value*k.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),L=a.computed(()=>({width:`${p.value}px`,height:`${y.value}px`})),N=B=>{let ie=B;B>=k.value.length&&(ie=0),B<0&&(ie=k.value.length-1),m.value=ie,t("index-change",ie)},C=B=>{!B||window.open(B,"_blank")},I=B=>["bk-swiper-img",{"bk-swiper-link":B.link},B.class],M=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),S=B=>({"bk-current-index":m.value===B}),z=()=>{i.value&&(b.value=window.setTimeout(()=>{N(m.value+1),z()},s.value))},j=()=>{window.clearTimeout(b.value)},O=()=>{var ie;const B=(ie=f.value)==null?void 0:ie.parentElement;!B||!window.ResizeObserver||(v=new ResizeObserver(()=>{G()}),v.observe(B))},W=()=>{var B;(B=v.disconnect)==null||B.call(v)},P=B=>{if(B===void 0)return{height:0,width:0};const ie=getComputedStyle(B),oe=B.clientWidth-parseFloat(ie.paddingTop)-parseFloat(ie.paddingBottom);return{height:B.clientHeight-parseFloat(ie.paddingLeft)-parseFloat(ie.paddingRight),width:oe}},G=()=>{var ie;const B=P((ie=f.value)==null?void 0:ie.parentElement);p.value=+u.value>0?u.value:B.width,y.value=+d.value>0?d.value:B.height};return a.watch([d,u],G),a.onMounted(()=>{G(),z(),O()}),a.onBeforeUnmount(()=>{j(),W()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:L.value},[a.createVNode("hgroup",{style:T.value,class:"bk-transition bk-swiper-main"},[k.value.map(B=>{var ie,oe;return a.createVNode("h3",{class:"bk-swiper-card",style:L.value},[(oe=(ie=n.default)==null?void 0:ie.call(n,B))!=null?oe:a.createVNode("span",{class:I(B),style:M(B),onClick:()=>C(B.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[k.value.map((B,ie)=>a.createVNode("li",{class:S(ie),onMouseover:()=>N(ie)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>N(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>N(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const ph=Ge(f5),ol=Symbol("BkSelect"),bh=Symbol("BkOptionGroup");function yh(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Bc(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function h5(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function g5(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},f=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=F4(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function m5(e,t){const n=h5(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Fa(e=""){return e&&String(e).trim().toLowerCase()}var cl=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(ol,null),c=a.inject(bh,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(v=>v.value===s.value)}),u=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},y=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Se(Z({},a.toRefs(n)),{selected:d,multiple:u,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:y})},render(){var t,n,i;const e=je({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(na,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),p5=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(ol,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:u}=Bc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(bh,a.reactive(Se(Z({},a.toRefs(e)),{register:d,unregister:u,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Se(Z({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,s;const e=je({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=je({"bk-option-group-label":!0,collapsible:this.collapsible}),n=je({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Vs,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const b5={onContentScroll:Function},y5=Z({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Ve("F-scroll-x")),scrollYName:g.string.def(Ve("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},b5);var C5=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,u,f,m,p,y,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:y,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,u,f,m,p,y,b,v,k,T,L,N;return a.h(n,{class:e.className},[(f=(u=(d=t.slots).beforeContent)==null?void 0:u.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(y=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?y:""]),[[o,c]]),(k=(v=(b=t.slots).afterContent)==null?void 0:v.call(b))!=null?k:"",(N=(L=(T=t.slots).afterSection)==null?void 0:L.call(T))!=null?N:""])}}};function Ch(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function vh(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:u,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:y}=i;let b=0,v=0,k=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(y/e)+b,k=o%e),typeof e=="function"){const T=Ch(u,o,f,e);b=T.startIndex>0?T.startIndex:0,k=T.diffHeight,v=Ch(u,y,f,e).startIndex+b+1}if(o!==d||b!==m||v!==p){const T=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,k,c,{bottom:T>=0?T:0})}}function v5(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const y=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,y,y,b,{bottom:v>=0?v:0});return}const{startIndex:d,endIndex:u,groupItemCount:f,count:m,scrollTop:p}=o;vh(i,s,{scrollTop:p,startIndex:d,endIndex:u,groupItemCount:f,count:m},t,e)}const wh=(e=60)=>ot.exports.throttle((t,n,i)=>v5(t,n,i),e),w5=(e,t,n,i=60)=>{Reflect.apply(wh(i),globalThis,[e,t,n])};var M5={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{w5(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",wh)}}},I5=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:M5},props:y5,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=z=>typeof z=="string"?[z]:typeof z=="object"&&!Array.isArray(z)?[z]:z;if(!e.enabled){const{rendAsTag:z}=C5(e,t);return z}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(z,j,O,W,P,G,B)=>{c.startIndex=j,c.endIndex=O,c.scrollTop=W,c.translateY=P,c.translateX=G,c.pos=B,t.emit("content-scroll",[z,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),y()})}),a.watch(()=>e.list,()=>{u(),y()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{u(),y()});const u=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=z=>{if(f.value=Math.ceil((z||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let W=0;W<f.value;W++){const P=e.lineHeight.call(this,W,z.slice(W*e.groupItemCount,e.groupItemCount));O+=typeof P=="number"?P:0}m.value=O}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},y=(z=!0)=>{var O;const j=(O=o.value)==null?void 0:O.parentNode;vh(e.lineHeight,d,c,j,null),z&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((z,j)=>Se(Z({},z),{$index:j}))),v=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>Z({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?k.value:{})),L=a.computed(()=>{const z=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:z?"none":"block"}}),N=a.computed(()=>[Ve("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ve("virtual-content"):""]),C=a.computed(()=>[e.scrollPosition==="content"?Ve("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),M={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},S=()=>{u(),y()};return t.expose({reset:S}),()=>{var z,j,O,W,P,G,B,ie,oe,ve,Ie,me;return a.h(n||"div",{ref:o,class:N.value,style:T.value},[(O=(j=(z=t.slots).beforeContent)==null?void 0:j.call(z))!=null?O:"",a.withDirectives(a.h(i||"div",{class:C.value,style:Z(Z({},k.value),e.contentStyle)},[(G=(P=(W=t.slots).default)==null?void 0:P.call(W,{data:v.value}))!=null?G:""]),[[I,M]]),(oe=(ie=(B=t.slots).afterContent)==null?void 0:ie.call(B))!=null?oe:"",a.h("div",{class:[Ve("virtual-section")],style:L.value}),(me=(Ie=(ve=t.slots).afterSection)==null?void 0:Ie.call(ve))!=null?me:""])}}});const _r=Ge(I5);var Fc;(function(e){e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke"})(Fc||(Fc={}));var N5=a.defineComponent({name:"Tag",props:{theme:As(),closable:g.bool.def(!1),type:Oe("tagStorkeType",{}).def(Fc.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>je({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Hn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const ul=Ge(N5);var L5=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:As(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(ol,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),u=a.ref(),f=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{k()},{flush:"post"});const m=T=>{t("remove",T)},p=()=>{var T;(T=u.value)==null||T.focus()},y=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"Enter":{t("enter",T.target.value,T);break}}},v=T=>{const L=[...n.$el.querySelectorAll(".bk-tag")];return typeof T=="number"?L[T]:L},k=()=>{!o.value||(f.value=null,setTimeout(()=>{const T=v(),L=T.findIndex((N,C)=>C?T[C-1].offsetTop!==N.offsetTop:!1);f.value=L>0?L:null}))};return{select:i,overflowTagIndex:f,value:d,inputRef:u,handleRemoveTag:m,focus:p,handleInput:y,handleKeydown:b}},render(){var i,s,o,c,d,u,f;const e=je({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=je({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(ul,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var y;return[(y=this.select)==null?void 0:y.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(ul,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),k5=a.defineComponent({name:"Select",directives:{clickoutside:jn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Go.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:As(),behavior:t0(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:u,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:y,multipleMode:b,allowCreate:v,customContent:k,showSelectedIcon:T,inputSearch:L,enableVirtualRender:N,showSelectAll:C,scrollHeight:I,list:M,displayKey:S,collapseTags:z,autoHeight:j,popoverOptions:O,allowEmptyValues:W,autoFocus:P}=a.toRefs(e),G=xn(),B=a.ref(),ie=a.ref(),oe=a.ref(),ve=a.ref(),Ie=a.ref(),me=a.ref(),ge=a.ref(),$=a.ref(new Map),U=a.computed(()=>[...$.value.values()]),V=a.ref(new Map),J=a.ref([]),re=a.computed(()=>J.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),K=a.ref();a.watch(n,()=>{var Le;Ql(),e.withValidate&&((Le=G==null?void 0:G.validate)==null||Le.call(G,"blur"))},{deep:!0}),a.watch(J,()=>{var Le;(Le=ge.value)==null||Le.updatePopover(null,te.value)});const X=a.computed(()=>D.value?M.value:M.value.filter(Le=>{var ze;return(ze=Fa(String(Le[S.value])))==null?void 0:ze.includes(Fa(mi.value))})),de=a.computed(()=>i.value||d.value),we=a.computed(()=>J.value.map(Le=>{var ze,Qe;return((Qe=(ze=$.value)==null?void 0:ze.get(Le.value))==null?void 0:Qe.label)||Le.label})),q=a.computed(()=>{const Le=U.value.reduce((ze,Qe)=>(Qe.disabled||ze.push(Qe.value),ze),[]);return Le.length<=J.value.length&&Le.every(ze=>J.value.some(Qe=>Qe.value===ze))}),H=a.computed(()=>!!V.value.size),R=a.computed(()=>!U.value.length),ae=a.computed(()=>U.value.length&&U.value.every(Le=>!Le.visible)),D=a.computed(()=>s.value&&typeof c.value=="function"),_=a.computed(()=>!(as.value||R.value||ae.value)||k.value),Q=a.computed(()=>o.value&&C.value&&(!mi.value||!s.value)),se=a.computed(()=>I.value-12-(Q.value?32:0)),ue=a.computed(()=>as.value?u.value:R.value?f.value:ae.value?m.value:""),be=a.computed(()=>j.value?z.value&&!ct.value:z.value),te=a.computed(()=>ot.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ft.value,arrow:!1,placement:"bottom-start",isShow:ct.value,reference:Ie.value,offset:6},O.value)),{register:le,unregister:he}=Bc($),{register:ke,unregister:Re}=Bc(V),{isHover:_e,setHover:et,cancelHover:rn}=yh(),tt=a.ref(!1),rt=()=>{tt.value||(tt.value=!0,t("focus"))},Cn=()=>{!tt.value||(tt.value=!1,t("blur"))},{popperWidth:ft,isPopoverShow:ct,hidePopover:Fe,showPopover:zt,togglePopover:ma}=g5({popoverMinWidth:p.value},ie);a.watch(ct,()=>{t("toggle",ct.value)});const ns=a.computed(()=>(s.value&&L.value||v.value)&&ct.value);a.watch(ct,Le=>{Le?(pa(),qa()):mi.value=""});const qa=()=>{var Qe;const Le=J.value[0],ze=$.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?K.value=Le==null?void 0:Le.value:K.value=(Qe=U.value.find(Xn=>!Xn.disabled&&Xn.visible))==null?void 0:Qe.value},is=Le=>{!s.value||U.value.forEach(ze=>{var Qe;ze.visible=(Qe=Fa(String(ze.label)))==null?void 0:Qe.includes(Fa(Le))})},{searchKey:mi,searchLoading:as}=m5(D.value?c.value:is,qa),Kn=Le=>{Le!==n.value&&(t("update:modelValue",Le,n.value),t("change",Le,n.value))},El=()=>{de.value||(rt(),ma())},Vl=Le=>{!s.value||(mi.value=Le)},Bu=(Le,ze)=>{const Qe=String(Le);!v.value||!Qe||s.value&&U.value.find(Hi=>Fa(String(Hi.label))===Fa(Qe))||$.value.get(Qe)||(ze.stopPropagation(),o.value?(J.value.push({value:Qe,label:Qe}),Kn(J.value.map(Hi=>Hi.value))):(J.value=[{value:Qe,label:Qe}],Kn(Qe),Fe()),mi.value="")},rs=Le=>{if(!(de.value||!Le)){if(o.value){const ze=J.value.findIndex(Qe=>Qe.value===Le.value);ze>-1?J.value.splice(ze,1):J.value.push({value:Le.value,label:Le.label||Le.value}),Kn(J.value.map(Qe=>Qe.value))}else J.value=[{label:Le.label||Le.value,value:Le.value}],Kn(Le.value),Fe();pa()}},pa=()=>{setTimeout(()=>{var Le,ze,Qe;!L.value&&!v.value?(Le=ve.value)==null||Le.focus():b.value==="tag"?(ze=Ie.value)==null||ze.focus():(Qe=B.value)==null||Qe.focus()},0)},Fu=Le=>{Le.stopPropagation(),J.value=[],Kn(o.value?[]:""),t("clear",o.value?[]:""),Fe()},Jl=()=>{K.value=""},Gu=()=>{q.value?J.value=[]:U.value.forEach(Le=>{Le.disabled||J.value.find(ze=>ze.value===Le.value)||J.value.push({value:Le.value,label:Le.label||Le.value})}),Kn(J.value.map(Le=>Le.value)),pa()},Zu=Le=>{const{scrollTop:ze,clientHeight:Qe,scrollHeight:Xn}=Le.target;ze+Qe===Xn&&t("scroll-end")},Yu=Le=>{if(de.value)return;const ze=J.value.findIndex(Qe=>Qe.value===Le);ze>-1&&(J.value.splice(ze,1),Kn(J.value.map(Qe=>Qe.value)))},ba=Le=>{var ze,Qe;return((Qe=(ze=$.value)==null?void 0:ze.get(Le))==null?void 0:Qe.label)||re.value[Le]||Le},Ql=()=>{Array.isArray(n.value)?J.value=[...n.value.map(Le=>({value:Le,label:ba(Le)}))]:!!n.value||W.value.includes(n.value)?J.value=[{value:n.value,label:ba(n.value)}]:J.value=[]},ya=Le=>{var Xn,Hi,Rl,ss;if(!((Xn=ie.value)!=null&&Xn.contains(Le.target))&&!((Hi=oe.value)!=null&&Hi.contains(Le.target))&&!k.value)return;const ze=U.value.filter(Xt=>!Xt.disabled&&Xt.visible),Qe=ze.findIndex(Xt=>Xt.value===K.value);if(!(!ze.length||Qe===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Xt=Qe>=ze.length-1?0:Qe+1;K.value=(Rl=ze[Xt])==null?void 0:Rl.value;break}case"ArrowUp":{Le.preventDefault();const Xt=Qe===0?ze.length-1:Qe-1;K.value=(ss=ze[Xt])==null?void 0:ss.value;break}case"Backspace":{if(!o.value||!J.value.length||mi.value.length||Le.target===ve.value)return;J.value.pop(),Kn(J.value.map(Xt=>Xt.value));break}case"Enter":{if(!ct.value)ct.value=!0;else{const Xt=$.value.get(K.value);rs(Xt)}break}}},Uu=({event:Le})=>{var Qe;const{target:ze}=Le;((Qe=ie.value)==null?void 0:Qe.contains(ze))||ie.value===ze||(Fe(),Cn())},$u=()=>{setTimeout(()=>{var Le,ze;N.value&&((ze=(Le=me.value)==null?void 0:Le.reset)==null||ze.call(Le))})};return a.provide(ol,a.reactive({multiple:o,selected:J,activeOptionValue:K,showSelectedIcon:T,register:le,unregister:he,registerGroup:ke,unregisterGroup:Re,handleOptionSelected:rs,handleGetLabelByValue:ba})),a.onMounted(()=>{Ql(),setTimeout(()=>{y.value&&zt(),P.value&&pa()}),p2(document,"keydown",ya)}),a.onBeforeMount(()=>{b2(document,"keydown",ya)}),{selected:J,isInput:ns,options:U,isDisabled:de,selectedLabel:we,isPopoverShow:ct,isHover:_e,popperWidth:ft,inputRef:B,triggerRef:ie,contentRef:oe,searchRef:ve,selectTagInputRef:Ie,virtualRenderRef:me,popoverRef:ge,searchLoading:as,isOptionsEmpty:R,isSearchEmpty:ae,isFocus:tt,isShowSelectContent:_,curContentText:ue,isGroup:H,searchKey:mi,isShowSelectAll:Q,virtualHeight:se,filterList:X,isCollapseTags:be,popoverConfig:te,focusInput:pa,setHover:et,cancelHover:rn,handleFocus:rt,handleBlur:Cn,handleTogglePopover:El,handleClear:Fu,hidePopover:Fe,showPopover:zt,handleToggleAll:Gu,handleOptionSelected:rs,handleClickOutside:Uu,handleScroll:Zu,handleDeleteTag:Yu,handleInputChange:Vl,handleInputEnter:Bu,handleKeydown:ya,handleSelectedAllOptionMouseEnter:Jl,handlePopoverShow:$u}},render(){const e=je({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(xi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(L5,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ia,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Wa,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(xi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(_r,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(u=>a.createVNode(cl,{key:u[this.idKey],value:u[this.idKey],label:u[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(cl,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(xi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Gc=Gt(k5,{Option:cl,Group:p5});function T5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:S5}=aa,Zc=Object.assign({},S5);Zc.width.default="400",Zc.height.default="100%";var x5=a.defineComponent({name:"Sideslider",components:{BkModal:aa,BkButton:Pt},props:Se(Z({},Zc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,u=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(aa,a.mergeProps(e,{maxHeight:u,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),T5(c)?c:{default:()=>[c]})}}});const Mh=Ge(x5);var Yc;(function(e){e.UNKNOWN="",e.ERROR="error",e.LOADING="loading"})(Yc||(Yc={}));const Ih={theme:g.theme().def(zs.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:Xf(),status:Oe("status",{}).def(Yc.UNKNOWN),lineType:qf(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var D5=a.defineComponent({name:"Steps",props:Ih,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const u=[];d.forEach(f=>{var m;typeof f=="string"?u.push(f):u.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...u)},s=d=>{Ih.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,f)=>{const m=await e.beforeChange(d);m?u(m):f(m)}),t("update:curStep",d),t("click",d))}catch(u){console.warn(u)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=je({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:y}=p;return y?Object.prototype.toString.call(y)==="[object Object]":typeof p=="string"},d=(p,y)=>(y.icon||(y.icon=p),!isNaN(y.icon)),u=p=>p.status==="loading",f=p=>p.status==="error",m=(p,y)=>o(p)&&this.status==="loading"||u(y)?a.createVNode(Js,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(y)?a.createVNode(Hn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(na,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,y)?p+1:a.createVNode(y.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,y)=>{var b,v,k;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(y)?"done":"",o(y)?"current":"",o(y)&&this.status==="error"?"isError":"",p.status&&o(y)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[(k=(v=(b=this.$slots)[y+1])==null?void 0:v.call(b))!=null?k:m(y,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Nh=Ge(D5);var j5=a.defineComponent({name:"Switcher",props:{theme:g.theme(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xn(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,y=!s.value,b=()=>{t("update:modelValue",p),t("change",y)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return i.value=!0,v.then(()=>{b()}).finally(()=>{i.value=!1});v&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&u(m)};return()=>a.createVNode("div",{class:d.value,onClick:u,tabindex:"0",onKeydown:f},[i.value?a.createVNode(uc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const Lh=Ge(j5);var dl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(dl||{}),kh=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(kh||{});const z5=["auto","highlight"],O5=["none","row","col","outer","horizontal"];var pn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(pn||{}),Et=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Et||{});const Ut=(...e)=>!0,A5={columnPick:Ut,columnFilter:Ut,columnSort:Ut,colFilterSave:Ut,rowClick:Ut,rowDblclick:Ut,rowExpand:Ut,select:Ut,selectAll:Ut,selectionChange:Ut,pageLimitChange:Ut,pageValueChange:Ut,settingChange:Ut,scrollBottom:Ut},He={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},oi={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data"},Uc=6,ci=42,fl={large:78,medium:60,small:42},P5=[{value:"small",label:"\u5C0F",height:fl.small},{value:"medium",label:"\u4E2D",height:fl.medium},{value:"large",label:"\u5927",height:fl.large}],Th="InitColumns";var kt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(kt||{});const E5=["asc","desc","null","custom"],Sh=20;var xh=(e=>(e.CURRENT="current",e.ALL="all",e))(xh||{});const $c=Oe("showOverflowTooltipMode",{default:"auto"}),V5=Oe("columnType",{default:"none"}),J5=Oe("full",{default:"full"});var Dh=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e))(Dh||{});const jh=Oe("columnSize",{default:"small"}),Q5=Oe("columnSize",{}),zh=Oe("sortScope",{}).def("current"),Oh={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(void 0),type:V5,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,Q5]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:zh,value:g.string.def(kt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:J5,filterScope:zh,btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},R5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(Oh)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:Oe("columnPick",{}).def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ci*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ci),headHeight:g.number.def(ci),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ci),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(Oe("boderType",{})),g.string]).def([dl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh,sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(He.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(z5).def(kh.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var Ah=a.defineComponent({name:"TableColumn",props:Se(Z({},Oh),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(Th,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Se(Z({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const Ph=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Se(Z(Z({},t),e),{current:n})}return t}return{}};var _5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=Ph(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),u=(b,v)=>{typeof v=="function"&&b.sort(v)},f=(b,v)=>{if(typeof v=="function"){const k=b.filter((T,L)=>v(T,L,e.data));b.splice(0,b.length,...k)}},m=(b,v,k)=>{var N;const T=t.slice(),{sortScope:L}=(N=k==null?void 0:k.sort)!=null?N:{};L===xh.ALL&&u(T,v),d.splice(0,d.length,...T.slice(n.value,i.value)),f(d,b),u(d,v)},p=(b,v,k)=>{s=Ph(e.pagination,s),y(),c(),m(b,v,k)},y=()=>{!e.pagination||(o.value=e.remotePagination?s:Se(Z({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},W5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:ii.Normal,mode:Ar.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,u;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:v}=i();return(u=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?u:a.createVNode(xi,{loading:f,size:m,mode:p,title:y,inline:b,indicator:v},null)}}}};function H5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var B5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Gc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},H5(c=e.limitList.map((d,u)=>a.createVNode(cl,{value:d,label:`${d}`,key:`${u}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const la=5;var F5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=la+2){for(let T=2;T<=e.totalPageNum-1;T++)b.push(T);return b}const v=Math.floor(la/2);e.totalPageNum>la&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const k=Math.min(e.totalPageNum-la,Math.max(2,t.value-v));for(let T=k;T<k+la;T++)b.push(T);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},u=()=>{i.value||(t.value=t.value+1)},f=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-la)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+la)};return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Si,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Ws,null,null)]),c.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>f(k)},[k])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Ws,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:u},[e.nextText||a.createVNode(Dn,null,null)])])}},G5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const T=[];for(let L=1;L<=e.totalPageNum;L++)T.push(L);return T});a.watch(()=>e.modelValue,T=>{a.nextTick(()=>{T>=1&&T<=e.totalPageNum?i.value=T:T<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,T=>{i.value>T&&(i.value=T)})});const u=()=>{s.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},y=T=>{const L=T.target,N=Number(L.textContent);!N||N<1||N>e.totalPageNum||N===i.value||(c=N)},b=T=>{["Enter","NumpadEnter"].includes(T.code)&&(T.preventDefault(),p())},v=T=>{c=T,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:u},[a.createVNode(Si,null,null)]),a.createVNode(mn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:y,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(T=>a.createVNode("div",{class:{item:!0,"is-actived":T===i.value},key:T,onClick:()=>v(T)},[T]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Dn,null,null)])])}},Z5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const Y5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var U5=a.defineComponent({name:"Pagination",props:Y5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=Z5(),{current:c,render:d}=F5(),{current:u,render:f}=G5(),{limit:m,render:p}=B5();return a.watch([i,m,s],([y,b])=>{const v=Math.ceil(y/b);n.value=v<1?1:v},{immediate:!0}),a.watch(c,y=>{t.emit("update:modelValue",y),t.emit("change",y)}),a.watch(u,y=>{!e.small||(t.emit("update:modelValue",y),t.emit("change",y))}),a.watch(m,y=>{t.emit("limitChange",y)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=je({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Kc=Ge(U5),St=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>St(e,i,n)).filter(i=>i!==void 0).at(0)},Xc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],$5=e=>Eh(e,"auto"),Eh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},K5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>O5.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Wr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},qc=(e,t,n=Sh,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],u=(m,p)=>{const{minWidth:y=void 0}=m;if(y===void 0)return p;let b=p;return/^\d+\.?\d*$/.test(`${y}`)&&(b=Number(y)),/^\d+\.?\d*%$/.test(`${y}`)&&(b=Number(y)*o/100),/^\d+\.?\d*px$/i.test(`${y}`)&&(b=Number(`${y}`.replace(/px/i,""))),b},f=(m,p,y=!0)=>{const b=u(m,p),v=p<b?b:p;Object.assign(m,{calcWidth:v}),y&&(c=c-v,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Wr(m,["resizeWidth","width"]));let v=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const k=Number(b.replace("px",""));f(m,k),v=!1}if(/^\d+\.?\d*%$/.test(b)){let k=n;if(c>0){const T=Number(b.replace("%",""));k=c*T/100}f(m,k),v=!1}v&&d.push(p)}}),d.length>0){let m=n;c>0&&d.forEach((p,y)=>{m=c/(d.length-y),f(t[p],m,!1);const{calcWidth:b}=t[p];c=c-b})}},Vh=(e,t,n=60,i=!1)=>{const s=ot.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},eu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},Z({},i))},hl=(e,t,n)=>n.type==="index"?e[He.ROW_INDEX]+1:ot.exports.get(e,t),Hr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Hr(Reflect.apply(e,globalThis,t),t):[],X5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===He.ROW_INDEX?`__ROW_INDEX_${n}`:ot.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Li.v4(),q5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},eb=(e,t)=>{function n(o,c){const u=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return u.font=c,u.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",u=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${u}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},Jh=(e,t,n)=>(s=>e.some(o=>o.field===St(s,["field","type"],[s])))(t)&&n.length&&!n.includes(St(t,["field","type"],[t])),Qh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,Rh=(e,t,n,i)=>{const s=Qh(e,t,n,i,"colspan"),o=Qh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},_h=(e,t)=>{var c,d;const n=e.field,i=u=>hl(u,n,e),s=(u,f)=>{const m=i(u)||"",p=i(f)||"";return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===kt.NULL?()=>!0:(u,f)=>o(u,f)*(t===kt.DESC?-1:1)},Wh=e=>{const t={[kt.NULL]:0,[kt.ASC]:1,[kt.DESC]:2};return e===void 0?kt.NULL:Object.keys(t)[(t[e]+1)%3]},Hh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:kt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,Z({value:"custom"},e);return e}return null},gl=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var Bh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(void 0),title:g.string.def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const u=()=>{let m=!0,p=n.value.innerText,y="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,y=o.mode||"auto"),{disabled:m,content:p,mode:y}},f=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!Aa(n.value))return;const{content:m,mode:p}=u();if(p==="auto"){const y=eb(n.value,m),b=n.value.clientWidth,v=window.getComputedStyle(n.value),k=["padding-left","padding-right"].reduce((L,N)=>L+Number(v.getPropertyValue(N).replace("px","")),0),T=b-k;i.value=y>T}if(p==="static"&&(i.value=!0),i.value){const y=a.ref(u());d===null&&(d=Vc(n.value,y))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=u();m||(f(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=Vh(n.value,()=>{f()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:["cell",e.column.type],ref:n,title:e.title},[(m=t.default)==null?void 0:m.call(t)])}}}),tu=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),tb=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Us,{scene:"part",type:t.value,description:e.emptyText},null)}});function nb(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var ib=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ci)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>je({[Ve("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=je({[Ve("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${Ve("table-head-filter")}`,u=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(M=>Se(Z({},M),{checked:i.checked.includes(M.value)}))}),f=(I,M="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),M),m=(I,M)=>{const{match:S}=n.filter,z=hl(M,St(n,"field",[n,M]),n);return S==="full"&&I.includes(z),I.some(j=>f(j,"img").test(z))},p=typeof n.filter.filterFn=="function"?(I,M,S,z)=>n.filter.filterFn(I,M,e.column,S,z):(I,M)=>I.length?m(I,M):!0,y=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:M}=k(T,"\u786E\u5B9A");if(M||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},v=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},k=(I,M)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:M}),{btnSave:T,btnReset:L}=n.filter,N=()=>{const{disabled:I,text:M}=k(T,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[M]):a.createVNode("span",{class:"btn-filter-save",onClick:y},[M])},C=()=>{const{disabled:I,text:M}=k(L,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:v},[M])};return()=>a.createVNode(mn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(sc,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(Cc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":M=>i.checked=M,onChange:()=>b(!1)},nb(I=u.value.map(M=>a.createVNode("div",{class:"list-item"},[a.createVNode(ji,{label:M.value},{default:()=>[M.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[N(),a.createVNode("span",{class:"btn-filter-split"},null),C()])])}})}}),ab=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(E5).def(kt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||kt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,u)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let f=u;u===kt.NULL&&(f=Wh(u)),i.value===u&&(f=kt.NULL);const m=Hh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",m==null?void 0:m.sortFn,f);return}const p=_h(e.column,f);t("change",p,f)};return()=>a.createVNode("span",{class:Ve("head-cell-sort"),onClick:d=>s(d,kt.NULL)},[a.createVNode(Uo,{class:["sort-action","sort-asc",i.value===kt.ASC?"active":""],onClick:d=>s(d,kt.ASC)},null),a.createVNode(Vs,{class:["sort-action","sort-desc",i.value===kt.DESC?"active":""],onClick:d=>s(d,kt.DESC)},null)])}});class rb{constructor(t,n){gr(this,"props",null);gr(this,"ctx",null);this.props=t,this.ctx=n}}function Fh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sb=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh.def(Dh.SMALL),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ci)},emits:["change"],setup(e,{emit:t}){const n=P5,i=(G,B)=>St(G,["field","type"],[G,B]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(G=>Se(Z({},G),{field:G.field||G.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),u=a.ref(e.rowHeight),f=a.ref(c.value.checked||[]),p=`light ${Ve("table-settings")}`,y={checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:c.value.checked||[]},b=()=>{Object.assign(y,{checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:f.value}),t("change",{checked:f.value,size:d.value,height:u.value}),o.value=!1},v=()=>{s.value=y.checkAll,d.value=y.activeSize,u.value=y.activeHeight,f.value=y.checkedFields,o.value=!1},k=()=>{o.value=!0},T=G=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),s.value=!s.value;const B=c.value.fields||e.columns||[],ie=B.filter((oe,ve)=>oe.disabled&&f.value.includes(i(oe,ve))).map((oe,ve)=>i(oe,ve));if(s.value){const oe=B.filter(ve=>!ve.disabled).map((ve,Ie)=>i(ve,Ie));f.value.splice(0,f.value.length,...oe,...ie)}else f.value.splice(0,f.value.length,...ie)},L=a.computed(()=>{var G;return((G=c.value.limit)!=null?G:0)>0}),N=c.value.sizeList||n,C=a.computed(()=>L.value&&(c.value.limit?c.value.limit:0)<=f.value.length),I=(G,B)=>G.disabled||C.value&&!f.value.includes(i(G,B)),M=G=>{d.value=G.value,u.value=G.height},S=G=>({"line-size":!0,"is-medium":d.value==="medium",active:G.value===d.value}),z={marginRight:"12px"},j=()=>N.map(G=>a.createVNode("span",{class:S(G),onClick:()=>M(G)},[G.label])),O=a.computed(()=>c.value.fields||e.columns||[]),W=a.computed(()=>f.value.length>0&&!O.value.every((G,B)=>f.value.includes(St(G,"field",[G,B])))),P=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[f.value],()=>{f.value.length||(s.value=!1),f.value.length&&O.value.every((G,B)=>f.value.includes(i(G,B)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(mn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:k},[a.createVNode(ec,{style:"color: #c4c6cc;"},null)]),content:()=>{let G;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Qs,{class:"icon-close-action",onClick:v},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),L.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),L.value?"":a.createVNode("span",{class:"check-all",onClick:T},[a.createVNode(ji,{label:"\u5168\u9009",indeterminate:Boolean(W.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Cc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":B=>f.value=B},Fh(G=O.value.map((B,ie)=>{let oe;return a.createVNode("div",{class:"field-item"},[a.createVNode(ji,{checked:f.value.includes(i(B,ie)),label:i(B,ie),disabled:I(B,ie)},Fh(oe=St(B,"label",[B,ie]))?oe:{default:()=>[oe]})])}))?G:{default:()=>[G]}),P.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),j()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Pt,{theme:"primary",style:z,onClick:b},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Pt,{style:z,onClick:v},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),nu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ci:0),s=(v,k,T)=>({column_fixed:!!v.fixed,column_fixed_left:v.fixed!=="right",column_fixed_right:v.fixed==="right",shadow:v.fixed==="right"?k<T:k>0}),o=v=>v.fixed==="right"?"right":"left",c={left:(v=!0)=>t.filter(k=>k.fixed&&k.fixed!=="right").reduce((k,T,L)=>v&&L===0?k:k+Wr(T),0),right:(v=!0)=>t.filter(k=>k.fixed==="right").reduce((k,T,L)=>v&&L===0?k:k+Wr(T),n?Uc:0)},d=(v,k)=>{const T=k[oi.COL_UID],L=v==="right"?-1:1,{length:N}=t;let C=v==="right"?N*L:1,I=0;for(C;;){C=C+-1*L;const M=Math.abs(C),S=t[M],z=o(S),j=S[oi.COL_UID];if(z===v&&T!==j&&(I+=Wr(S)),C===0||T===j)break}return I},u=v=>{if(!v.fixed)return{};const k={left:0,right:0},T=o(v);return k[T]=d(T,v),{[T]:`${k[T]}px`}},f=v=>({width:`${c[v](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const k=o(v),T=m[k];return m[k]=!0,{isExist:T,colPos:k,column:v}})),y=(v,k)=>p.value.map(({isExist:T,colPos:L,column:N})=>T?"":a.createVNode("div",{class:s(N,v,k),style:f(L)},null)),b=Ve("table-fixed");return{renderFixedColumns:y,fixedWrapperClass:b,resolveFixedColumnStyle:u}};function Gh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class lb{constructor(t,n,i,s){gr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?St(this.setting,"height",["tbody",t,n,i]):St(this.props,"rowHeight",["tbody",t,n])});gr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));gr(this,"getHeadColumnClass",(t,n)=>Se(Z({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new rb(t,n),this.uuid=Li.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=eu(this.props);if(!t)return null;const n=i=>{var u;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((u=this.props.settings)==null?void 0:u.fields)||[];s.length&&this.colgroups.forEach(f=>{f.isHidden=Jh(d,f,s)}),this.emitEvent(pn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(sb,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(tb,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Kc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Et.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Et.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Et.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=St(n,["field","type"],[n,t]),s=Wh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=_h(n,s);this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=St(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(ab,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(u,f)=>c(o,u,f);this.emitEvent(pn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Et.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(ib,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=eu(this.props),{cellFn:n}=t,i={"--row-height":`${St(t,"height",["thead"])}px`},s=(u,f)=>typeof n=="function"?n(u,f):St(u,"label",[u,f]),o=(u,f)=>{if(u.type==="selection"){const b=this.reactiveProp.rowActions.get(He.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[He.ROW_SELECTION]:!!b},0,!0)}const m=[];u.sort&&m.push(this.getSortCell(u,f)),u.filter&&m.push(this.getFilterCell(u,f));const p=s(u,f);m.unshift(p);const y=typeof p=="string"?p:void 0;return a.createVNode(Bh,{title:y},Gh(m)?m:{default:()=>[m]})},c=u=>Array.from(u.listeners.keys()).reduce((f,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(f,{[p]:y=>{u.listeners.get(m).forEach(b=>Reflect.apply(b,this,[y,u,this]))}})},{}),{resolveFixedColumnStyle:d}=nu(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(tu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,f)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,f),style:d(u),onClick:()=>this.handleColumnHeadClick(f,u)},c(u)),[o(u,f)]))])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=nu(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Hr(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Hr(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],u=s[He.ROW_UID];return[a.createVNode(tu,{key:u},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t)},[this.filterColgroups.map((f,m)=>{var I,M;const p=[n(f),...Hr(this.props.cellStyle,[f,m,s,o,this])],y={"expand-cell":f.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:v,rowspan:k}=Rh(f,m,s,o),T=He.ROW_SKIP_CFG,L=f[oi.COL_UID],{skipRow:N=!1,skipCol:C=!1}=(M=(I=s[T])==null?void 0:I[L])!=null?M:{};if(!N&&!C){let S;const z=[this.getColumnClass(f,m),...Hr(this.props.cellClass,[f,m,s,o,this]),{"expand-row":s[He.ROW_EXPAND],"is-last":o+k>=i}];return a.createVNode("td",{class:z,style:p,key:b,colspan:v,rowspan:k},[a.createVNode(Bh,{class:y,column:f,row:s,parentSetting:this.props.showOverflowTooltip},Gh(S=this.renderCell(s,f,o,t))?S:{default:()=>[S]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[He.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[He.ROW_UID]}_expand`;return a.createVNode(tu,{key:o},{default:()=>{var c,d,u;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[He.ROW_SOURCE_DATA]))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Et.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Et.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[He.ROW_EXPAND]?a.createVNode(Rs,null,null):a.createVNode(Gs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(pn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=hl(t,St(n,"field",[n,t]),n),c=this.props.data[t[He.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(pn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(He.ROW_SELECTION_INDETERMINATE),c=gl(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(ji,{onChange:s,disabled:!c,modelValue:t[He.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(u=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?u:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,u;const o=()=>{const f=hl(t,St(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):f},c={expand:(f,m,p,y)=>this.renderExpandColumn(f,m,p,y),selection:(f,m,p,y)=>this.renderCheckboxColumn(f,p)};return(u=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?u:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=je({active:this.isColActive(n)}),s=`${$5(Wr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var ml=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(u=>u.label===c.label&&u.field===c.field)){const u=a.unref(c);t.push(u)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const Zh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xc(e.activeColumn):Array.isArray(e.activeColumn)?Xc(e.activeColumn[0]):Xc(e.activeColumn):[];var ob=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=ml(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Zh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(u=>u===d),_column:c}));return a.watchEffect(()=>{n=o();const c=Zh(e);n.forEach((d,u)=>{Object.assign(d,{active:c.some(f=>f===u)})})}),{activeColumns:n}},cb=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(C){C.MOUSE_MOVE="onMousemove",C.MOUSE_OUT="onMouseout",C.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,u=null,f=0;const m=a.ref(-1e3),p=C=>{var O;o=!1,c=!1;const I=document.body.style;I.cursor="";const M=C.clientX-d,S=((O=u.resizeWidth)!=null?O:u.calcWidth)+M,z=Number(u.minWidth);u.resizeWidth=S>z?S:z,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,u=null,C.target.closest("table").querySelectorAll("th").forEach(W=>W.style.setProperty("user-select","inherit"))},y=C=>ot.exports.throttle(()=>{var z;const I=C.clientX-d,M=((z=u.resizeWidth)!=null?z:u.calcWidth)+I;Number(u.minWidth)<M&&(m.value=C.clientX-d+f)},60),b=C=>{document.body.style.setProperty("cursor",""),y(C)()},v={[i.MOUSE_DOWN]:(C,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),u=I,d=C.clientX;const S=C.target.closest("table");f=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(C,I)=>{o&&!c&&(c=!0);const M=C.target.closest("th");if(c&&M.style.setProperty("user-select","none"),!c){if(!M)return;const S=M.getBoundingClientRect();S.width>12&&S.right-C.pageX<8?(s=!0,M.style.setProperty("cursor","col-resize")):(M.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(C,I)=>{const M=C.target;c||M.style.setProperty("cursor","")}},k=C=>`${n}_${C}`,T=()=>{e.forEach(C=>{C.resizable!==!1&&Object.keys(v).forEach(I=>{const M=k(I);C.listeners.has(M)||C.listeners.set(M,[]),C.listeners.get(M).push(v[I])})})},L=()=>{e.forEach(C=>{Object.keys(v).forEach(I=>{const M=k(I);if(C.listeners.has(M)){const S=C.listeners.get(M);S.splice(0,S.length)}})})};t&&T();const N=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:T,resetResizeEvents:L,dragOffsetX:m,dragOffsetXStyle:N}};const ub=(e,t,n,i,s)=>{const{getColumns:o}=ml(e,t),c=a.ref(200),d=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>je({[Ve("table")]:!0,"has-footer":u.value,"has-scroll-y":d.value||e.virtualEnabled},K5(e.border))),m=je({[Ve("table-head")]:!0,"has-settings":!!e.settings}),p=eu(e),y=a.computed(()=>({"--row-height":`${St(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[Ve("table-body")]:!0},v=a.computed(()=>je({[Ve("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),k=()=>{const j=o();if(j.every(O=>/^\d+\.?\d*(px)?$/ig.test(`${O.width}`))){const O=j.reduce((P,G)=>P+Number(`${G.width}`.replace(/px/ig,"")),0),W=d.value?Uc:0;return`${O+W}px`}return"100%"},T=a.computed(()=>({minHeight:Eh(e.minHeight,"auto"),width:k(),maxWidth:"100%"})),L=(j,O)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof O=="number"){const P=Number(W.replace("%",""));return O*P/100}return O},N=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),C=()=>e.showHead?L(e.headHeight,ci):0,I=()=>{const j=L(e.height,c.value),O=C(),W=L(e.minHeight,c.value),P=e.pagination&&e.data.length?ci:0,G=j-O-P,B=e.height!=="auto"?`${G}px`:!1,ie=W-O-P,oe=L(e.maxHeight,void 0),ve=typeof oe=="number"?`${oe-O-P}px`:!1;Object.assign(N,{display:s!=null&&s.length?"block":!1,"min-height":`${ie}px`,height:B,maxHeight:ve})};a.onMounted(()=>{M(n==null?void 0:n.value)});const M=j=>{if(j){const{height:O}=j.parentElement.getBoundingClientRect();c.value=O,I(),S(j)}},S=j=>{const O=e.virtualEnabled?`.${Ve("virtual-section")}`:`.${Ve("table-body-content")}`,W=j.querySelector(".bk-table-body");d.value=q5(W,O,0)};return{tableClass:f,headClass:m,contentClass:b,footerClass:v,wrapperStyle:T,contentStyle:N,headStyle:y,resetTableHeight:M,updateBorderClass:S,getColumnsWidthOffsetWidth:()=>{let j=0;return d.value&&(j=j+Uc),e.border.includes(dl.OUTER)&&!e.border.includes(dl.NONE)&&(j=j+2),j},hasFooter:u,hasScrollY:d}},db=(e,t)=>{var $,U;const n=a.reactive([]),{getColumns:i}=ml(e,t),s=V=>{if(/^\d+/.test(`${V.minWidth}`))return V.minWidth;let J=Sh;return V.sort&&(J=J+18),V.filter&&(J=J+28),J},o=()=>{var re,K;const V=((re=e.settings)==null?void 0:re.checked)||[],J=((K=e.settings)==null?void 0:K.fields)||[];n.splice(0,n.length,...i().map(X=>Se(Z({},X),{calcWidth:null,resizeWidth:null,minWidth:s(X),listeners:new Map,isHidden:Jh(J,X,V),[oi.COL_UID]:Li.v4(),[oi.COL_SOURCE_DATA]:X})))},{dragOffsetXStyle:c,dragOffsetX:d,resetResizeEvents:u,registerResizeEvent:f}=cb(n,!0),{activeColumns:m}=ob(e,t);a.watch(()=>[e.settings],()=>{var V;(((V=e.settings)==null?void 0:V.checked)||[]).length&&o()}),a.watch(()=>[e.columns,t],()=>{o(),u(),f()},{immediate:!0,deep:!0});const p=e.columns.reduce((V,J,re)=>{const K=St(J,["field","type"],[J,re]),X=Hh(J.sort);return X?Se(Z({},V||{}),{[K]:X==null?void 0:X.value}):V},null),y=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:($=e.settings)==null?void 0:$.size,height:fl[(U=e.settings)==null?void 0:U.size]},defaultSort:p||e.defaultSort}),b=V=>{var J;return y.rowActions.has(V)?(J=y.rowActions.get(V))==null?void 0:J.isExpand:!1},v=()=>{Array.isArray(y.defaultSort)&&y.defaultSort.splice(0),y.defaultSort=p||e.defaultSort},k=(V,J=void 0)=>{var X;const re=V[He.ROW_UID],K=typeof J=="boolean"?J:!b(re);y.rowActions.set(re,Object.assign({},(X=y.rowActions.get(re))!=null?X:{},{isExpand:K})),ie()},T=()=>y.rowActions.has(He.ROW_SELECTION_ALL)?y.rowActions.get(He.ROW_SELECTION_ALL):e.selectionKey?W.every(V=>j(V)):!1,L=V=>{const J=V[He.ROW_UID],{isSelected:re=!1}=y.rowActions.get(J)||{};return re},N=(V=L)=>{let J=!1,re=!1;W.forEach(K=>{const X=V(K);!J&&!X&&(J=!0),!re&&X&&(re=!0)}),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,re&&J)},C=()=>e.columns.some(V=>V.type==="selection"),I=()=>{C()&&N(V=>j(V))},M=(V=void 0)=>{const J=typeof V=="boolean"?V:!T();y.rowActions.set(He.ROW_SELECTION_ALL,J),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,!1),W.forEach((re,K)=>{var X;if(gl(e,{row:re,index:K,isCheckAll:!1})){const de=re[He.ROW_UID],we=Object.assign({},(X=y.rowActions.get(de))!=null?X:{},{isSelected:J});y.rowActions.set(de,we)}}),N(),ie(J),ve(null,V,!0)},S=()=>{M(!1)},z=(V,J)=>{var K;const re=V[He.ROW_UID];if(re){const X=typeof J=="boolean"?J:!O(V,re),de=Object.assign({},(K=y.rowActions.get(re))!=null?K:{},{isSelected:X});y.rowActions.set(re,de),J||y.rowActions.set(He.ROW_SELECTION_ALL,!1),N(),ie(),ve(V,J,!1)}},j=(V,J=re=>L(re))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:V,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.exports.get(V,e.selectionKey):J(V),O=(V,J,re)=>j(V,()=>{var X;const K=J===void 0?V[He.ROW_UID]:J;return gl(e,{row:V,index:re,isCheckAll:!1})&&T()?!0:y.rowActions.has(K)?(X=y.rowActions.get(K))==null?void 0:X.isSelected:!1}),W=a.reactive([]),P=a.computed(()=>n.some(V=>typeof V.rowspan=="function"||/^\d$/.test(`${V.rowspan}`)||typeof V.colspan=="function"||/^\d$/.test(`${V.colspan}`))),G=(V=!1)=>{let J=null;const re={};W.splice(0,W.length,...e.data.map((K,X)=>{const de=X5(K,e,X),we=P.value?oe(K,de,X,re,J):{};return J=de,Se(Z({},K),{[He.ROW_INDEX]:X,[He.ROW_UID]:de,[He.ROW_EXPAND]:V?b(de):!1,[He.ROW_SELECTION]:O(K,de,X),[He.ROW_SOURCE_DATA]:Z({},K),[He.ROW_SKIP_CFG]:we})})),I()},B=(V,J,re,K)=>{const X=O(re,re[He.ROW_UID],K);return V&&typeof J=="boolean"?J:X},ie=V=>{let J=null;const re={};W.forEach((K,X)=>{const de=K[He.ROW_UID],we=P.value?oe(K,de,X,re,J):{},q=gl(e,{row:K,index:X,isCheckAll:!1});Object.assign(K,{[He.ROW_EXPAND]:b(K[He.ROW_UID]),[He.ROW_SELECTION]:B(q,V,K,X),[He.ROW_SKIP_CFG]:we}),J=K[He.ROW_UID]}),typeof V!="boolean"&&I()},oe=(V,J,re,K,X)=>{var q;let de=0;const we=(q=K[X])!=null?q:{};return K[J]||(K[J]={}),n.forEach((H,R)=>{var ue,be;const{colspan:ae,rowspan:D}=Rh(H,R,V,re),_=H[oi.COL_UID],Q=(be=(ue=we[_])==null?void 0:ue.skipRowLen)!=null?be:0,se={[_]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};de>0&&(se[_].skipColLen=de,se[_].skipCol=!0,de=de-1),Q>1?(se[_].skipRowLen=Q-1,se[_].skipRow=!0):D>1&&(se[_].skipRowLen=D,se[_].skipRow=!1),ae>1&&(se[_].skipColLen=ae,de=ae-1),Object.assign(K[J],Z({},se))}),K[J]},ve=(V,J,re=!1)=>{if(e.asyncData&&e.rowKey){if(re)e.data.forEach(K=>{ot.exports.has(K,e.selectionKey)&&ot.exports.set(K,e.selectionKey,!!J)});else if(ot.exports.has(V,e.selectionKey)){const K=e.data.find(X=>ot.exports.get(X,e.rowKey)===ot.exports.get(V,e.rowKey));ot.exports.set(K,e.selectionKey,!!J)}}},{renderFixedColumns:Ie,fixedWrapperClass:me}=nu(e,n,!1);return{colgroups:n,dragOffsetXStyle:c,dragOffsetX:d,reactiveSchema:y,indexData:W,fixedWrapperClass:me,initIndexData:G,updateIndexData:ie,renderFixedColumns:Ie,setRowExpand:k,updateColGroups:o,clearSelection:S,toggleAllSelection:M,toggleRowSelection:z,getSelection:()=>W.filter(V=>O(V)),clearSort:v}};var fb=a.defineComponent({name:"Table",props:R5,emits:A5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=ml(e,c);a.provide(Th,d);const u=a.ref(),f=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:y,dragOffsetX:b,reactiveSchema:v,indexData:k,renderFixedColumns:T,setRowExpand:L,initIndexData:N,fixedWrapperClass:C,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j}=db(e,c),{pageData:O,localPagination:W,resolvePageData:P,watchEffectFn:G}=_5(e,k),{tableClass:B,headClass:ie,contentClass:oe,footerClass:ve,wrapperStyle:Ie,contentStyle:me,headStyle:ge,updateBorderClass:$,resetTableHeight:U,getColumnsWidthOffsetWidth:V,hasFooter:J}=ub(e,c,u,v,O),re=new lb(e,t,v,p),K=()=>{const se=u.value.querySelector(".bk-table-body-content"),ue=se.querySelector("table");if(ue){const be=ue.scrollWidth,te=se.clientWidth;m.value=be-te}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{N(e.reserveExpand),G(s,n,i),a.nextTick(()=>{U(u.value),$(u.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((u==null?void 0:u.value)instanceof HTMLElement){const se=V();qc(u.value,p,20,se),K()}}),re.on(pn.ON_SORT_BY_CLICK,se=>{var he,ke;const{sortFn:ue,column:be,index:te,type:le}=se;typeof ue=="function"&&(n=ue,i=be,P(s,n,i),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he)),t.emit(Et.COLUMN_SORT,{column:a.unref(be[oi.COL_SOURCE_DATA]),index:te,type:le})}).on(pn.ON_FILTER_CLICK,se=>{var he,ke;const{filterFn:ue,checked:be,column:te,index:le}=se;typeof ue=="function"&&(s=ue,P(s,n,i),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he)),t.emit(Et.COLUMN_FILTER,{checked:be,column:a.unref(te[oi.COL_SOURCE_DATA]),index:le})}).on(pn.ON_SETTING_CHANGE,se=>{const{checked:ue=[],size:be,height:te}=se;a.nextTick(()=>{var he,ke;$(u.value);const le=V();ue.length&&qc(u.value,p,20,le),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he),t.emit(Et.SETTING_CHANGE,{checked:ue,size:be,height:te})})}).on(pn.ON_ROW_EXPAND_CLICK,se=>{const{row:ue,column:be,index:te,rows:le,e:he}=se;t.emit(Et.ROW_EXPAND_CLICK,{row:a.unref(ue[He.ROW_SOURCE_DATA]),column:a.unref(be[oi.COL_SOURCE_DATA]),index:te,rows:le,e:he}),L(ue,!ue[He.ROW_EXPAND])}).on(pn.ON_ROW_CHECK,({row:se,isAll:ue,index:be,value:te})=>{ue?(M(te),t.emit(Et.ROW_SELECT_ALL,{checked:te,data:e.data})):(S(se,te),t.emit(Et.ROW_SELECT,{row:a.unref(se[He.ROW_SOURCE_DATA]),index:be,checked:te,data:e.data})),t.emit(Et.ROW_SELECT_CHANGE,{row:a.unref(se[He.ROW_SOURCE_DATA]),isAll:ue,index:be,checked:te,data:e.data})});const X=se=>{var Re;const ue=(Re=v.pos.bottom)!=null?Re:0,be=se[1],{translateX:te,translateY:le,pos:he={}}=be;v.scrollTranslateY=le,v.scrollTranslateX=te,v.pos=he;const{bottom:ke}=he;ke<=2&&ue>ke&&Ps(60,()=>{t.emit(Et.SCROLL_BOTTOM,Se(Z({},he),{translateX:te,translateY:le}))},!0)(),K()};a.onMounted(()=>{o=Vh(u.value,()=>{(e.height==="100%"||e.height==="auto")&&U(u.value),$(u.value);const se=V();qc(u.value,p,20,se)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,re.destroy()}),t.expose({setRowExpand:L,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j});const de=a.computed(()=>Se(Z({},oe),{"__is-empty":!O.length})),we=a.computed(()=>({[Ve("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),q={column_drag_line:!0,"offset-x":!0},H=a.computed(()=>Se(Z({},y.value),{left:`${b.value-v.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},ae=a.computed(()=>({[Ve("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),D={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:_}=W5(e,t),Q=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var se,ue;return a.createVNode("div",{class:B.value,style:Ie.value,ref:u},[a.createVNode("div",{class:ie,style:ge.value},[re.renderTableHeadSchema()]),a.createVNode(_r,a.mergeProps({ref:f,lineHeight:re.getRowHeight,class:de.value,style:me,list:O},Q.value,{contentClassName:we.value,onContentScroll:X,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:be=>re.renderTableBodySchema(be.data||e.data),afterSection:()=>a.createVNode("div",{class:ae.value},null)}),a.createVNode("div",{class:C},[T(v.scrollTranslateX,m.value),a.createVNode("div",{class:q,style:H.value},null),a.createVNode("div",{class:R},[_()])]),a.createVNode("div",{class:ve.value},[J.value&&re.renderTableFooter(W.value)]),a.createVNode("div",{style:D},[(ue=(se=t.slots).default)==null?void 0:ue.call(se)])])}}});const Yh=Ge(fb);Ge(Ah);const Uh=Ge(Ah),Ga=12;function hb(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function gb(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,f)=>{let m=[];return f.children&&(m=f.children.map(p=>Z({group:{groupId:f[n.value],groupName:f[i.value]}},p))),u.concat(m)},[])),o.value=d,c.value=d.reduce((u,f)=>(u[f[n.value]]=f,u),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const $h=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n},mb=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{!t.value||(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}};var Kh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const pb=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:Oe("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}});var bb=a.defineComponent({name:"TagRender",directives:{bkTooltips:el},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>Z({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value},e.tagOverflowTips));return a.onMounted(()=>{n.value=G4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),yb=a.defineComponent({name:"TagInput",directives:{bkTooltips:el},props:pb(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll"],setup(e,{emit:t}){const n=xn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(Z({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0}},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:u}=hb(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.ref(null),v=a.ref(null),k=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),N=a.computed(()=>M.selectedTagList.length===0&&f.value===""&&!i.isEdit),C=a.computed(()=>e.clearable&&!e.disabled&&M.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),M=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),S=a.computed(()=>M.selectedTagList.map(te=>te[e.saveKey])),{flatList:z,saveKeyMap:j}=gb(e),O=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((le,he)=>{le.__index__=he,te[le.group.groupId]||(te[le.group.groupId]={id:le.group.groupId,name:le.group.groupName,children:[]}),te[le.group.groupId].children.push(le)}),Object.keys(te).map(le=>te[le])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ie()})}),a.watch(()=>e.modelValue,te=>{var le;Ie(S.value,te)||(a.nextTick(()=>{ie()}),e.withValidate&&((le=n==null?void 0:n.validate)==null||le.call(n,"change")))}),a.watch(f,ot.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:le}=f;le!==""&&te||le===""&&e.trigger==="focus"&&te?s.isShow=!0:(e.trigger!=="focus"||!te)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,te=>{W(),te&&v.value&&(a.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",P),v.value.addEventListener("scroll",P))}),a.onMounted(()=>{ie()});const W=()=>{var te;s.offset.crossAxis=L.value?0:(te=b.value)==null?void 0:te.offsetLeft},P=()=>{if(c.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:le,scrollHeight:he}=v.value;if(te+le>=he){const ke=c.curPage+1;ke<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{u(ke)},500))}},G=()=>{var le;return Array.from(((le=y.value)==null?void 0:le.childNodes)||[]).filter(he=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(he.nodeType))},B=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:le}=te.target;(le.indexOf("bk-tag-input-trigger")>-1||le.indexOf("tag-list")>-1)&&y.value.appendChild(b.value)}clearTimeout(k.value),L.value&&S.value.length&&(M.tagListCache=[...S.value],M.selectedTagListCache=[...M.selectedTagList],f.value=M.selectedTagListCache[0][e.saveKey],se(M.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var le;(le=m.value)==null||le.focus(),e.trigger==="focus"&&M.localList.length!==0&&(oe(),s.isShow?W():s.isShow=!0)})}},ie=()=>{const{saveKey:te,modelValue:le,displayKey:he,allowCreate:ke,trigger:Re}=e;if(M.selectedTagList=[],M.localList=z.value,le.length){const _e={};M.selectedTagList=le.map(et=>{const rn=j.value[et];return _e[et]=1,!rn&&ke?{[te]:et,[he]:et}:rn}).filter(et=>et),L.value||(M.localList=M.localList.filter(et=>!_e[et[te]]))}Re==="focus"&&oe()},oe=(te="")=>{const{searchKey:le,filterCallback:he}=e,ke=te.toLowerCase().trim();if(ke===""){d(M.localList);return}let Re=[];typeof he=="function"?Re=he(ke,le,M.localList)||[]:Array.isArray(le)?Re=M.localList.filter(_e=>le.some(et=>_e[et].toLowerCase().indexOf(ke)>-1)):Re=M.localList.filter(_e=>_e[le].toLowerCase().indexOf(ke)>-1),d(Re)},ve=(te,le)=>{const he={"bk-selector-actived":!1,"bk-selector-selected":S.value.includes(te[e.saveKey])};return e.useGroup?he["bk-selector-actived"]=te.__index__===i.focusItemIndex:he["bk-selector-actived"]=le===i.focusItemIndex,he};function Ie(te,le){return te.length!==le.length?!1:le.every((he,ke)=>te[ke]===he)}const me=()=>{M.tagListCache=[],M.selectedTagListCache=[],M.selectedTagList=[]},ge=()=>{f.value=""},$=()=>{if(L.value)return 0;const le=G().findIndex(({id:he})=>he==="tagInputItem");return le>=0?le:0},U=(te,le,he=!1)=>{if(!le||!te)return;let ke=le;he&&(ke=le.nextElementSibling||null),le.parentNode.insertBefore(te,ke)},V=te=>{const{maxData:le,trigger:he,allowCreate:ke}=e;if(le===-1||le>S.value.length){const{value:Re}=te!=null&&te.target?te.target:f,_e=$h(Re);_e?(oe(Re),m.value.style.width=`${_e*Ga}px`):he==="focus"&&oe()}else re(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=ke?-1:0},J=()=>{var te;s.width=L.value?(te=p.value)==null?void 0:te.clientWidth:e.contentWidth,t("focus")},re=()=>{k.value=setTimeout(()=>{var le;const te=f.value;if(ge(),i.isEdit=!1,L.value){const[he]=M.tagListCache;te&&te===he&&M.selectedTagListCache.length?Q(M.selectedTagListCache[0],"select"):de("remove")}else if(e.allowAutoMatch&&te){const he=c.curPageList.find(ke=>Array.isArray(e.searchKey)?e.searchKey.map(_e=>ke[_e]).includes(te):ke[e.searchKey]===te);he?K(he,"select"):e.allowCreate&&K(te,"custom")}s.isShow=!1,t("blur",te,S.value),(le=n==null?void 0:n.validate)==null||le.call(n,"blur")},200)},K=(te,le,he)=>{he==null||he.stopPropagation(),!(!te||te.disabled)&&(L.value&&me(),Q(te,le),de("select"),ge(),s.isShow=!1)},X=(te,le,he)=>{he==null||he.stopPropagation(),se(te,le),ge(),de("remove",te),m.value.style.width=`${Ga}px`},de=(te,le)=>{t(te,le),t("update:modelValue",S.value),t("change",S.value)},we=te=>{te.stopPropagation();const le=M.selectedTagList;M.selectedTagList=[];const he=le.filter(ke=>j.value[ke[e.saveKey]]);(e.allowCreate&&he.length!==0||!e.allowCreate)&&!L.value&&M.localList.push(...he),de("removeAll")},q=()=>{const te={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};a.nextTick(()=>{const le=v.value.querySelector(".bk-selector-actived");if(!le)return;const he={height:le.clientHeight,yAxis:le.getBoundingClientRect().y};he.yAxis<te.yAxis&&(v.value.scrollTop=v.value.scrollTop-(te.yAxis-he.yAxis));const ke=he.yAxis+he.height-te.yAxis;ke>te.height&&(v.value.scrollTop=v.value.scrollTop+ke-te.height)})},H=(te,le)=>{const he=G();U(b.value,he[te-1]),M.selectedTagList.splice(te-1,1),B();const ke=j.value[le[e.saveKey]];(e.allowCreate&&ke||!e.allowCreate)&&!L.value&&M.localList.push(le),m.value=`${Ga}px`,de("remove")},R=te=>{if(c.isPageLoading)return;let le;const he=te.target.value,ke=$h(he),Re=$(),_e=G();switch(te.code){case"ArrowUp":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),q();break;case"ArrowDown":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),q();break;case"ArrowLeft":if(i.isEdit=!0,!ke){if(Re<1)return;U(b.value,_e[Re-1]),B()}break;case"ArrowRight":if(i.isEdit=!0,!ke){if(Re===_e.length-1)return;U(_e[Re+1],b.value),B()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?K(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&f.value.trim()&&K(f.value,"custom",te),te.preventDefault();break;case"Backspace":Re!==0&&!f.value&&(le=M.selectedTagList[Re-1],H(Re,le));break}},ae=te=>{const le=[],he=te.split(";"),ke=/^[a-zA-Z][a-zA-Z_]*/g;return he.forEach(Re=>{const _e=Re.match(ke);if(_e){const et=_e.join("");le.push({[e.saveKey]:et,[e.displayKey]:et})}}),le},D=te=>{if(te.preventDefault(),L.value)return!1;const{maxData:le,saveKey:he,displayKey:ke,pasteFn:Re,allowCreate:_e}=e,et=te.clipboardData.getData("text");let tt=(Re?Re(et):ae(et)).map(rt=>rt[he]);if(tt.length){const rt=G(),Cn=$(),ft=M.localList.map(Fe=>Fe[he]);if(tt=tt.filter(Fe=>{const zt=(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe);return _e?zt:zt&&ft.includes(Fe)}),le!==-1){const Fe=M.selectedTagList.length;if(Fe<le){const zt=le-Fe;tt.length>zt&&(tt=[...tt.slice(0,zt)])}else tt=[]}const ct=_e?tt.map(Fe=>{const zt=M.localList.find(ma=>ma[he]===Fe);return zt!=null?zt:{[he]:Fe,[ke]:Fe}}):M.localList.filter(Fe=>tt.includes(Fe[he]));tt.length&&(M.selectedTagList.splice(Cn,0,...ct),U(b.value,rt[Cn]),m.value.style.width=`${Ga}px`,M.localList=M.localList.filter(Fe=>!tt.includes(Fe[he])),de("select"),B())}},_=te=>{e.disabled||(U(b.value,te.currentTarget,!0),m.value.style.width=`${Ga}px`,s.isShow&&W())},Q=(te,le)=>{if(M.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:he,saveKey:ke,displayKey:Re,createTagValidator:_e}=e,et=$();let rn=1,tt=!1,rt;const Cn=ft=>typeof _e=="function"?_e(ft):!0;if(le==="custom")if(he){let ft=te.split(he);ft=ft.filter(Fe=>(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe)&&Cn(Fe));const ct=ft.map(Fe=>j.value[Fe]||{[ke]:Fe,[Re]:Fe});ft.length&&(M.selectedTagList.splice(et,0,...ct),rn=ct.length,tt=!0)}else{const ft=typeof te=="object";if(rt=ft?te[ke]:te.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!S.value.includes(rt)&&Cn(rt)){const ct=j.value[rt]||(ft?te:{[ke]:rt,[Re]:rt});M.selectedTagList.splice(et,0,ct),tt=!0}}else te&&(rt=te[ke],rt!==void 0&&!S.value.includes(rt)&&(M.selectedTagList.splice(et,0,te),tt=!0));tt&&a.nextTick(()=>{for(let ft=1;ft<=rn;ft++){const Fe=G()[et+ft];U(Fe,b.value)}if(m.value.style.width=`${Ga}px`,!L.value){e.allowNextFocus&&B();const ft=S.value.reduce((ct,Fe)=>(ct[Fe]=1,ct),{});M.localList=M.localList.filter(ct=>!ft[ct[ke]])}})},se=(te,le)=>{M.selectedTagList.splice(le,1);const he=j.value[te[e.saveKey]];(e.allowCreate&&he||!e.allowCreate)&&!L.value&&M.localList.push(te)},ue=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:be}=mb(p,ue,S);return Se(Z(Z(Z({popoverProps:s},a.toRefs(i)),a.toRefs(M)),a.toRefs(c)),{isShowPlaceholder:N,isShowClear:C,curInputValue:f,renderList:O,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:y,tagInputItemRef:b,selectorListRef:v,triggerClass:I,overflowTagIndex:be,localCollapseTags:ue,focusInputTrigger:B,activeClass:ve,handleInput:V,handleFocus:J,handleBlur:re,handleTagSelected:K,handleTagRemove:X,handleClear:we,tagFocus:_,handleKeydown:R,handlePaste:D})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(mn,a.mergeProps({theme:"light bk-tag-input-popover-content",trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey},c=this.localCollapseTags&&this.overflowTagIndex&&s>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:c?"none":""},onClick:this.tagFocus},[a.createVNode(bb,{node:i,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-selector-list"},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Kh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Kh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(xi,{theme:"primary",size:ii.Small},null)]):null])])})])}});const Xh=Ge(yb),Cb={direction:Xf(),align:Yo().def(js.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:qf()};var vb=a.defineComponent({name:"Divider",props:Cb,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const qh=Ge(vb),e9=Oe("position",{}).def("top"),t9=Oe("sortType",{}).def("replace"),wb={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Mb={active:g.oneOfType([g.number,g.string]).def(""),type:Oe("type",{}).def("border-card"),tabPosition:e9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:t9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},Ib=Z({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:e9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:t9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},wb),Nb={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:Zo(),panel:g.string||g.func};var n9=a.defineComponent({name:"TabNav",props:Ib,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let u=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:y,closable:b,visible:v,disabled:k,sortable:T}=f.props;if(!v)return!1;e.active===p&&(u=!0);const L=N=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(N)?`\u9009\u9879\u5361${m+1}`:typeof N=="string"?N:typeof N=="function"?a.h(N):N;return d.push({name:p,closable:b,visible:v,disabled:k,sortable:T,tabLabel:L(y)}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,u)=>d===u;return Se(Z({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,u){i.value=d,s.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,u)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,u){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,u)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,u){e.tabRemove(d,u)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:f}=this,m=()=>this.navs.map((y,b)=>{if(!y)return null;const{name:v,disabled:k,tabLabel:T}=y,L=()=>{const C=[Ve("tab-header-item")];return k&&C.push(Ve("tab-header--disabled")),e===v&&C.push(Ve("tab-header--active")),C.join(" ")},N=(C,I)=>C||I;return a.createVNode("div",{key:v,onClick:()=>this.handleTabChange(v),draggable:N(y.sortable,i),onDragstart:C=>c(b,C),onDragenter:C=>{C.preventDefault(),d(b)},onDragleave:C=>{C.preventDefault()},onDragover:C=>{C.preventDefault()},onDragend:C=>{C.preventDefault(),u()},onDrop:C=>{C.preventDefault(),f(b,s)},class:L()},[a.createVNode("div",null,[T]),N(y.closable,t)&&a.createVNode(Zt,{class:Ve("tab-header-item-close"),onClick:()=>this.handleTabRemove(b,y)},null)])}),p=()=>{var b,v;const y=[];return typeof this.$slots.add=="function"?y.push((v=(b=this.$slots).add)==null?void 0:v.call(b,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Fs,{width:26,height:26},null)])),y.length?a.createVNode("div",{class:Ve("tab-header-operation")},[y.map((k,T)=>a.createVNode("div",{class:Ve("tab-header-item"),key:T},[k]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:Ve("tab-header")},[a.createVNode("div",{class:Ve("tab-header-nav")},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:Ve("tab-header-setting")},[this.$slots.setting()])])}}),Lb=a.defineComponent({name:"Tab",components:{TabNav:n9},props:Mb,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Se(Z({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p==="insert")if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M}=this,S={panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M};return!s||!Array.isArray(s)?null:a.createVNode(n9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:Ve("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),kb=a.defineComponent({name:"TabPanel",props:Nb,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null;return a.withDirectives(a.createVNode("div",{ref:"content",class:Ve("tab-panel")},[t()]),[[a.vShow,e]])}});const i9=Gt(Lb,{TabPanel:kb}),Vi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let a9=1;const r9=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Vi[i].forEach(y=>{c+=(y.el.offsetHeight||0)+d}),a9+=1;const u=`message_${a9}`;n=Se(Z({},n),{offsetX:o,offsetY:c,id:u});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=y=>{Tb(y,i,d,s),a.render(null,f)},a.render(m,f),Vi[i].push(m);let p;m.props.getContainer&&Aa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function Tb(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Vi[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=Vi[t][o].el.offsetHeight,u=Vi[t].length;for(let f=o;f<u;f++){const m=parseInt(Vi[t][f].el.style[s],10)-d-n;Vi[t][f].component.props.offsetY=m}Vi[t].splice(o,1)}var iu;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(iu||(iu={}));const Sb={id:g.string.def(""),message:g.string.def(""),theme:Oe("messageTheme",{}).def(iu.PRIMARY),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var xb=a.defineComponent({name:"Message",props:Sb,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Qn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&Aa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&u(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Bs,null,null),warning:a.createVNode(Or,null,null),success:a.createVNode(jr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Hn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const s9=e=>{r9(xb,e)},l9=Ge(e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:u}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((v=i.value)==null?void 0:v.onClosed()),n.value=!1},m=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((v=i.value)==null?void 0:v.onConfirm()),n.value=!1};function p(b){i.value=b}u({update:p});const y=()=>{const b=[],v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&v.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),v};return()=>a.createVNode(v0,Se(Z({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),y())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}});var au;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(au||(au={}));const Db={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:Oe("notifyTheme",{}).def(au.PRIMARY),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var jb=a.defineComponent({name:"Notify",props:Db,emits:["destroy"],setup(e,{emit:t}){const n=Qn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let u=null;const f=()=>{u=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&f(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(u)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Bs,null,null),warning:a.createVNode(Or,null,null),success:a.createVNode(jr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Hn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const o9=e=>{r9(jb,e)},c9=Symbol("MENU_PROVIDER_KEY"),ru=Symbol("MENU_PROVIDER_KEY_PATH"),zb=e=>{a.provide(c9,e)},Ob=e=>{const{parentKeys:t,parentInfo:n}=su(),i=a.computed(()=>[...t.value,e]);a.provide(ru,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},u9=()=>a.inject(c9),su=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&ru in t?a.inject(ru):{parentInfo:void 0,parentKeys:a.ref([])}},lu=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function d9(e,t){if(!e||!t)return;const n=lu(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=lu(i).join(" ");e.setAttribute("class",s)}function f9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=lu(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const Ab=()=>({css:!0,onBeforeEnter:e=>{f9(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,d9(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(f9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{d9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Pb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Eb=a.defineComponent({name:"Menu",props:Pb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),u=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{u.value=e.collapse;const v=[...f.value],k=[...o.value];o.value=u.value?[]:v,f.value=u.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(v=o.value)=>{o.value=v},{immediate:!0});const m=(v,k)=>{c.value=Se(Z({},c.value),{[v]:k})},p=v=>{delete c.value[v],c.value=Z({},c.value)},y=(v,k)=>{k?e.uniqueOpen?o.value=[v]:o.value.push(v):o.value=o.value.filter(T=>T!==v),n("openChange",k,c.value[v]),n("update:openKeys",[...o.value])},b=v=>{s.value=v,n("click",c.value[v]),n("update:activeKey",v,c.value[v])};return zb({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:u,handleOpenChange:y,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var v;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":u.value}},[(v=t.default)==null?void 0:v.call(t)])}}}),Vb=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),Jb=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,v;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=u9(),d=a.getCurrentInstance(),{parentInfo:u}=su(),f=((v=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:v.call(b))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:u==null?void 0:u.key});const y=k=>{c(f),n("click",k)};return a.onBeforeUnmount(()=>s(f)),()=>{var k,T;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:y},[p.value&&a.createVNode("span",{class:"item-icon"},[((k=t==null?void 0:t.icon)==null?void 0:k.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(T=t.default)==null?void 0:T.call(t)])])}}});const Qb={title:{type:String,default:"title"}};var Rb=a.defineComponent({name:"Submenu",props:Qb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var L,N;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:u,menuStore:f}=u9(),{parentInfo:m}=su(),p=a.getCurrentInstance(),y=((N=(L=p.vnode.key)==null?void 0:L.toString)==null?void 0:N.call(L))||String(p.uid),b=a.ref(Ab()),v=a.computed(()=>o.value.includes(y)),k=a.computed(()=>{var I,M;const C=(M=(I=f.value)==null?void 0:I[u.value])==null?void 0:M.parentKey;return d.value&&C===y&&v});Ob(y),i(y,{key:y,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(y));const T=()=>{c(y,!v.value),n("collapse",!v.value,p)};return()=>{var C;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":v.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:T},[a.createVNode("span",{class:"submenu-header-icon"},[((C=t.icon)==null?void 0:C.call(t))||a.createVNode(hc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Es,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(y)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,v.value]])]}})])}}});const h9=Gt(Eb,{Item:Jb,Submenu:Rb,Group:Vb}),_b={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var g9=a.defineComponent({props:_b,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Wb={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var Hb=a.defineComponent({name:"Navigation",props:Wb,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,u,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(g9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(g9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(tc,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(u=this.$slots).default)==null?void 0:f.call(u),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const m9=Ge(Hb),Bb={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var ou=a.defineComponent({props:Bb,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{s()});const s=()=>{if(n&&Object.keys(n).length!==0){const u=n;u.isShow&&u.hide(),u.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new H4(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const u={};return e.appendToBody&&(u["z-index"]=1060+Qn.getModalNextIndex()),u}),d=a.reactive({styles:c});return Se(Z({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:s})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const Fb={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var p9=a.defineComponent({props:Fb,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:u=>{const m=[...c.value.children][u.shiftKey?"shift":"pop"]();document.activeElement===m&&(u.preventDefault(),u.stopPropagation())}}},render(){var e,t,n;return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(Pt,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",(n=(t=(e=this.$slots).confirm)==null?void 0:t.call(e))!=null?n:a.createVNode("div",{class:"bk-picker-confirm-action"},[this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])])}}),b9=1e3*60*60*24;function y9(e,t){return new Date(e,t+1,0).getDate()}function C9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function v9(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/b9);i||(d+=c.getDay());var u=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-b9*p&&(u=1)}return u}function Gb(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],u=new Date(e,t,1),f=u.getDay()||(c?7:0),m=o-f,p=v9(e,t,1,c),y=y9(e,t),b=y9(e,t-1),v,k,T,L=C9(e,t,p),N={month:t,year:e,daysInMonth:y},C=0;C<7;C++){T=m;for(var I=0;I<8;I++){C>0&&I>0&&m++,m>y||m<1?(k=m>y?m-y:b+m,v=m>y?t+1:t-1):(k=m,v=t);var M=function(){return I===0?"weekLabel":C===0?"dayLabel":m<1?"prevMonth":m>y?"nextMonth":"monthDay"}(),S=T!==m&&C>0,z={desc:S?k:p,week:p,type:M,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,v,k)):!1,year:L,index:d.length};n&&(typeof n=="function"?z=n.call(N,z,i):n.forEach(function(j){z=j.call(N,z,i)})),s&&S?d.push(z):s||d.push(z)}C>0&&(p=v9(e,v,k+1,c)),L=C9(e,t,p)}return N.cells=d,N}var Zb=function(e){return Gb.bind(e)},Yb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Fn=Yb;function Ub(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function w9(e,t){for(var n in e)t[n]?Ub(e[n])&&w9(e[n],t[n]):t[n]=e[n]}function M9(e,t){var n=[Fn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Fn.weekPlaceholder?e.desc=Fn.weekPlaceholder:e.index<8?e.desc=Fn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Fn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Fn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Fn.monthNames[t],columnNames:Fn.columnNames[t],classes:Fn.classes}),e}M9.setLabels=function(e){w9(e,Fn)};var $b=M9,Kb={Generator:Zb,addLabels:$b};function bn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Vt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function an(e){Vt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function Xb(e,t){Vt(2,arguments);var n=an(e).getTime(),i=bn(t);return new Date(n+i)}function qb(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ey(e){return Vt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ty(e){if(Vt(1,arguments),!ey(e)&&typeof e!="number")return!1;var t=an(e);return!isNaN(Number(t))}var ny={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},iy=function(e,t,n){var i,s=ny[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},ay=iy;function cu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var ry={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ly={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oy={date:cu({formats:ry,defaultWidth:"full"}),time:cu({formats:sy,defaultWidth:"full"}),dateTime:cu({formats:ly,defaultWidth:"full"})},cy=oy,uy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dy=function(e,t,n,i){return uy[e]},fy=dy;function Br(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var u=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[u]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var hy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},gy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},my={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},py={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},by={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Cy=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vy={ordinalNumber:Cy,era:Br({values:hy,defaultWidth:"wide"}),quarter:Br({values:gy,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Br({values:my,defaultWidth:"wide"}),day:Br({values:py,defaultWidth:"wide"}),dayPeriod:Br({values:by,defaultWidth:"wide",formattingValues:yy,defaultFormattingWidth:"wide"})},wy=vy;function Fr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?Iy(d,function(p){return p.test(c)}):My(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function My(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Iy(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Ny(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Ly=/^(\d+)(th|st|nd|rd)?/i,ky=/\d+/i,Ty={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Sy={any:[/^b/i,/^(a|c)/i]},xy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Dy={any:[/1/i,/2/i,/3/i,/4/i]},jy={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Oy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ay={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Py={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ey={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vy={ordinalNumber:Ny({matchPattern:Ly,parsePattern:ky,valueCallback:function(e){return parseInt(e,10)}}),era:Fr({matchPatterns:Ty,defaultMatchWidth:"wide",parsePatterns:Sy,defaultParseWidth:"any"}),quarter:Fr({matchPatterns:xy,defaultMatchWidth:"wide",parsePatterns:Dy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fr({matchPatterns:jy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any"}),day:Fr({matchPatterns:Oy,defaultMatchWidth:"wide",parsePatterns:Ay,defaultParseWidth:"any"}),dayPeriod:Fr({matchPatterns:Py,defaultMatchWidth:"any",parsePatterns:Ey,defaultParseWidth:"any"})},Jy=Vy,Qy={code:"en-US",formatDistance:ay,formatLong:cy,formatRelative:fy,localize:wy,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ry=Qy;function _y(e,t){Vt(2,arguments);var n=bn(t);return Xb(e,-n)}var Wy=864e5;function Hy(e){Vt(1,arguments);var t=an(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/Wy)+1}function pl(e){Vt(1,arguments);var t=1,n=an(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function I9(e){Vt(1,arguments);var t=an(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=pl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=pl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function By(e){Vt(1,arguments);var t=I9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=pl(n);return i}var Fy=6048e5;function Gy(e){Vt(1,arguments);var t=an(e),n=pl(t).getTime()-By(t).getTime();return Math.round(n/Fy)+1}function bl(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:bn(s),c=n.weekStartsOn==null?o:bn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=an(e),u=d.getUTCDay(),f=(u<c?7:0)+u-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function N9(e,t){Vt(1,arguments);var n=an(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,u),f.setUTCHours(0,0,0,0);var m=bl(f,t),p=new Date(0);p.setUTCFullYear(i,0,u),p.setUTCHours(0,0,0,0);var y=bl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=y.getTime()?i:i-1}function Zy(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:bn(s),c=n.firstWeekContainsDate==null?o:bn(n.firstWeekContainsDate),d=N9(e,t),u=new Date(0);u.setUTCFullYear(d,0,c),u.setUTCHours(0,0,0,0);var f=bl(u,t);return f}var Yy=6048e5;function Uy(e,t){Vt(1,arguments);var n=an(e),i=bl(n,t).getTime()-Zy(n,t).getTime();return Math.round(i/Yy)+1}function at(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var $y={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return at(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):at(n+1,2)},d:function(e,t){return at(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return at(e.getUTCHours()%12||12,t.length)},H:function(e,t){return at(e.getUTCHours(),t.length)},m:function(e,t){return at(e.getUTCMinutes(),t.length)},s:function(e,t){return at(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return at(s,t.length)}},Ji=$y,Za={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ky={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ji.y(e,t)},Y:function(e,t,n,i){var s=N9(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return at(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):at(o,t.length)},R:function(e,t){var n=I9(e);return at(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return at(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return at(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return at(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ji.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return at(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=Uy(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):at(s,t.length)},I:function(e,t,n){var i=Gy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):at(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ji.d(e,t)},D:function(e,t,n){var i=Hy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):at(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return at(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return at(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return at(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Za.noon:i===0?s=Za.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Za.evening:i>=12?s=Za.afternoon:i>=4?s=Za.morning:s=Za.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ji.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ji.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ji.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ji.s(e,t)},S:function(e,t){return Ji.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return k9(o);case"XXXX":case"XX":return oa(o);case"XXXXX":case"XXX":default:return oa(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return k9(o);case"xxxx":case"xx":return oa(o);case"xxxxx":case"xxx":default:return oa(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+L9(o,":");case"OOOO":default:return"GMT"+oa(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+L9(o,":");case"zzzz":default:return"GMT"+oa(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return at(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return at(o,t.length)}};function L9(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+at(o,2)}function k9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+at(Math.abs(e)/60,2)}return oa(e,t)}function oa(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=at(Math.floor(s/60),2),c=at(s%60,2);return i+o+n+c}var Xy=Ky;function T9(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function S9(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function qy(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return T9(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",T9(i,t)).replace("{{time}}",S9(s,t))}var eC={p:S9,P:qy},tC=eC,nC=["D","DD"],iC=["YY","YYYY"];function aC(e){return nC.indexOf(e)!==-1}function rC(e){return iC.indexOf(e)!==-1}function x9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var sC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oC=/^'([^]*?)'?$/,cC=/''/g,uC=/[a-zA-Z]/;function dC(e,t,n){Vt(2,arguments);var i=String(t),s=n||{},o=s.locale||Ry,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:bn(f),p=s.weekStartsOn==null?m:bn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var y=an(e);if(!ty(y))throw new RangeError("Invalid time value");var b=qb(y),v=_y(y,b),k={firstWeekContainsDate:u,weekStartsOn:p,locale:o,_originalDate:y},T=i.match(lC).map(function(L){var N=L[0];if(N==="p"||N==="P"){var C=tC[N];return C(L,o.formatLong,k)}return L}).join("").match(sC).map(function(L){if(L==="''")return"'";var N=L[0];if(N==="'")return fC(L);var C=Xy[N];if(C)return!s.useAdditionalWeekYearTokens&&rC(L)&&x9(L,t,e),!s.useAdditionalDayOfYearTokens&&aC(L)&&x9(L,t,e),C(v,L,o.localize,k);if(N.match(uC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return L}).join("");return T}function fC(e){return e.match(oC)[1].replace(cC,"'")}const vt={},D9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ca=/\d\d?/,hC=/\d{3}/,gC=/\d{4}/,yl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j9=function(){};function z9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function O9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Gn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const A9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],P9=["January","February","March","April","May","June","July","August","September","October","November","December"],mC=z9(P9,3),pC=z9(A9,3);vt.i18n={dayNamesShort:pC,dayNames:A9,monthNamesShort:mC,monthNames:P9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const E9={D(e){return e.getDay()},DD(e){return Gn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Gn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Gn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Gn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Gn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Gn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Gn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Gn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Gn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Gn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},mt={d:[ca,(e,t)=>{e.day=t}],M:[ca,(e,t)=>{e.month=t-1}],yy:[ca,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ca,(e,t)=>{e.hour=t}],m:[ca,(e,t)=>{e.minute=t}],s:[ca,(e,t)=>{e.second=t}],yyyy:[gC,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[hC,(e,t)=>{e.millisecond=t}],D:[ca,j9],ddd:[yl,j9],MMM:[yl,O9("monthNamesShort")],MMMM:[yl,O9("monthNames")],a:[yl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};mt.DD=mt.D,mt.dddd=mt.ddd,mt.Do=mt.dd=mt.d,mt.mm=mt.m,mt.hh=mt.H=mt.HH=mt.h,mt.MM=mt.M,mt.ss=mt.s,mt.A=mt.a,vt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},vt.format=(e,t,n)=>{const i=n||vt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=vt.masks[t]||t||vt.masks.default,t.replace(D9,s=>s in E9?E9[s](e,i):s.slice(1,s.length-1))},vt.parse=(e,t,n)=>{const i=n||vt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=vt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(D9,u=>{if(mt[u]){const f=mt[u],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return mt[u]?"":u.slice(1,u.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const uu=" - ",ui=(e,t)=>{const n=an(new Date(e));return!n||isNaN(n.getTime())?"":dC(n,t||"yyyy-MM-dd")},du=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ui(n,t)+uu+ui(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ui(e,t);return""},fu=(e,t)=>{const n=Array.isArray(e)?e:e.split(uu);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:vt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:vt.parse(s,t||"yyyy-MM-dd")]}return[]},Ya={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:du,parser:fu},datetimerange:{formatter:du,parser:fu},timerange:{formatter:du,parser:fu},time:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ui(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),vt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},ua=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},V9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),Cl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],J9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Qi=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ya[t]||Ya.default,c=i||J9[t],d=Ya.multiple.parser;let u=e;if(e&&t==="time"&&!(e instanceof Date))u=o(e,c);else if(n&&e)u=d(e,c);else if(s)if(!e)u=[null,null];else if(typeof e=="string")u=o(e,c);else if(t==="timerange")u=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?u=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?u=o(e.join(uu),c):(!f||!m)&&(u=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(u=o(e,c)||null);return s||n?u||[]:[u]},Zn=(e,t,n,i)=>{const s=J9[t];if(n){const{formatter:c}=Ya.multiple;return c(e,i||s)}const{formatter:o}=Ya[t]||Ya.default;return o(e,i||s)},Q9=Symbol("date-picker"),vl=Symbol("time-picker");function yn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const bC=(e,t)=>new Date(e,t+1,0).getDate(),R9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=bC(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},_9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],u=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,y=>e[y](s,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:u}}})(),da=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},yC=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function CC(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const vC=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},wC={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var hu=a.defineComponent({name:"DateTable",props:wC,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new Kb.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=da(new Date),y=s.value.filter(Boolean).map(da),[b,v]=s.value.map(da),k=e.rangeState.from&&da(e.rangeState.from),T=e.rangeState.to&&da(e.rangeState.to),L=e.selectionMode==="range",N=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(f,m,C=>{C.date instanceof Date&&C.date.setTime(C.date.getTime()+C.date.getTimezoneOffset()*6e4);const I=C.date&&da(C.date),M=C.date&&m===C.date.getMonth();return Se(Z({},C),{type:I===p?"today":C.type,selected:M&&y.includes(I),disabled:C.date&&N&&N(new Date(I)),range:M&&L&&yC(I,k,T),start:M&&L&&I===b,end:M&&L&&I===v})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(da(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const wl={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},Ml={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},MC={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},IC={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},W9=["hours","minutes","seconds"];var gu=a.defineComponent({name:"TimeSpinner",props:Z(Z({},IC),Ml),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((S,z)=>Math.abs(e.steps[z])||S),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const S=[],z=n.spinerSteps[0],j=n.focusedColumn===0&&n.focusedTime[0],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<24;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledHours.length&&e.disabledHours.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.hours===W&&(P.selected=!0),S.push(P)}return S}),s=a.computed(()=>{const S=[],z=n.spinerSteps[1],j=n.focusedColumn===1&&n.focusedTime[1],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledMinutes.length&&e.disabledMinutes.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.minutes===W&&(P.selected=!0),S.push(P)}return S}),o=a.computed(()=>{const S=[],z=n.spinerSteps[2],j=n.focusedColumn===2&&n.focusedTime[2],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledSeconds.length&&e.disabledSeconds.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.seconds===W&&(P.selected=!0),S.push(P)}return S}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,S=>{!n.compiled||k("hours",i.value.findIndex(z=>z.text===S))}),a.watch(()=>e.minutes,S=>{!n.compiled||k("minutes",s.value.findIndex(z=>z.text===S))}),a.watch(()=>e.seconds,S=>{!n.compiled||k("seconds",s.value.findIndex(z=>z.text===S))}),a.watch(()=>n.focusedTime,(S,z)=>{W9.forEach((j,O)=>{if(S[O]===z[O]||typeof S[O]=="undefined")return;const W=this[`${j}List`].findIndex(P=>P.text===S[O]);k(j,W)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(S){let z;return S==="hours"?z=C:S==="minutes"?z=I:z=M,z.value}function u(S){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:S.selected,["bk-time-picker-cells-cell-focused"]:S.focused,["bk-time-picker-cells-cell-disabled"]:S.disabled}]}function f(){const S=z=>{d(z).addEventListener("wheel",ot.exports.debounce(()=>{y(z)},32),{passive:!0})};S("hours"),S("minutes"),S("seconds")}function m(S){return d(S).querySelector("li").offsetHeight}function p(S){return d(S).offsetHeight}function y(S){const z=d(S),j=Math.min(Math.round((z.scrollTop-(p(S)*.5-10)/m(S)+3)/m(S)),S==="hours"?23:59);let O;if(S==="hours"?O=i:S==="minutes"?O=s:O=o,O.value.find(P=>P.text===j).disabled)return!1;a.nextTick(()=>{v({[S]:j})})}function b(S,z){if(z.disabled)return;const j={[S]:z.text};v(j)}function v(S){t("change",S),t("pick-click")}function k(S,z){const j=d(S),O=j.scrollTop,W=32*T(S,z);y2(j,O,W,500)}function T(S,z){const j=CC(S),O=e[`disabled${j}`];let W=z;if(O.length&&e.hideDisabledOptions){let P=0;O.forEach(G=>G<=z?P+=1:""),W-=P}return W}function L(){a.nextTick(()=>{W9.forEach(S=>{const z=d(S);let j;S==="hours"?j=i:S==="minutes"?j=s:j=o,z.scrollTop=32*j.value.findIndex(O=>O.text===e[S])})})}function N(S){return S<10?`0${S}`:S}const C=a.ref(null),I=a.ref(null),M=a.ref(null);return Se(Z({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:C,minutesRef:I,secondsRef:M,getCellCls:u,handleClick:b,updateScroll:L,padTime:N})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const NC={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var H9=a.defineComponent({name:"TimePanel",props:Z(Z(Z({},wl),Ml),NC),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||ua(),showDate:!1}),i=a.inject(vl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>vt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),u=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((T,L)=>(T[L]=this[L],T),{});const y=[24,60,60],v=["Hours","Minutes","Seconds"].map(k=>e[`disabled${k}`]).map((k,T)=>{const L=y[T],N=k;for(let C=0;C<L;C+=e.steps[T]||1){const I=d.value.map((S,z)=>z===T?C:S),M=vC(n.date,...I);e.disabledDate(M,!0)&&N.push(C)}return N.filter((C,I,M)=>M.indexOf(C)===I)});return p.reduce((k,T,L)=>(k[T]=v[L],k),{})});a.watch(()=>e.value,p=>{let y=p[0]||ua();y=new Date(y),n.date=y}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,y=!0){const b=new Date(n.date);Object.keys(p).forEach(v=>b[`set${Nr(v)}`](p[v])),y&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Se(Z({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:u,timeSpinnerRef:s,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(gu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const LC={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var kC=a.defineComponent({name:"DatePanel",props:LC,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=B=>B.match(/^time/)?"time-picker":`${B}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(vl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),u=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,B=>{n("selection-mode-change",B),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,B=>{o.currentView=B,o.pickerTable=i(B)}),a.watch(()=>e.modelValue,B=>{o.dates=B;const ie=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=ie||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=B=>{o.panelDate=B,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},y=(B,ie)=>{let oe=B;e.selectionMode==="year"?oe=new Date(B.getFullYear(),0,1):e.selectionMode==="month"?oe=new Date(o.panelDate.getFullYear(),B.getMonth(),1):oe=new Date(B),o.dates=[oe],n("pick",oe,!1,ie||e.selectionMode)},b=()=>{m(),n("pick-success")},v=()=>{m(),n("pick-clear")},k=B=>{B.value&&n("pick",B.value(),!1,void 0,B),B.onClick&&B.onClick(this),e.shortcutClose&&b()},T=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},L=B=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+B*10,0,1):o.panelDate=R9(o.panelDate,B*12)},N=B=>{o.panelDate=R9(o.panelDate,B)},C=B=>{var ie,oe;B&&((ie=u==null?void 0:u.value)==null||ie.updateScroll(),(oe=f==null?void 0:f.value)==null||oe.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?y:p),M=a.computed(()=>{const B="zh-CN",ie="[yyyy]-[mm]",oe=o.panelDate,{labels:ve,separator:Ie}=_9(B,ie,oe),me=ge=>()=>{o.pickerTable=i(ge)};return{separator:Ie,labels:ve.map(ge=>{const $=ge;return $.handler=me(ge.type),$})}}),S=a.computed(()=>M.value.labels[0].type==="year"||o.currentView==="date"),z=a.computed(()=>M.value.labels[1].type==="year"||o.currentView==="date"),j=a.computed(()=>o.currentView==="time"),O=()=>{o.currentView=o.currentView==="time"?"date":"time"},W=a.computed(()=>!!t.shortcuts),P=a.computed(()=>!o.dates[0]);function G(){n("pick-click")}return Se(Z({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:M,showLabelFirst:S,showLabelSecond:z,handleShortcutClick:k,changeYear:L,changeMonth:N,reset:T,isTime:j,hasShortcuts:W,timeDisabled:P,onToggleVisibility:C,handleToggleTime:O,handlePickSuccess:b,handlePickClear:v,handlePick:y,handlePickClick:G,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(hu,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(H9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(p9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const TC={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var B9=a.defineComponent({name:"TimeRangePanel",props:Z(Z(Z({},wl),Ml),TC),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||ua(),dateEnd:i||ua()}),o=a.inject(vl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>vt.format(o.dates[0],e.format)),u=a.computed(()=>vt.format(o.dates[1],e.format));a.watch(()=>e.value,T=>{const[L,N]=T.slice();s.dateStart=L||ua(),s.dateEnd=N||ua()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function f(){t("pick-click")}function m(T,L,N,C=!0){let I=new Date(s.dateStart),M=new Date(s.dateEnd);Object.keys(L).forEach(S=>{I[`set${Nr(S)}`](L[S])}),Object.keys(N).forEach(S=>{M[`set${Nr(S)}`](N[S])}),!e.allowCrossDay&&M<I&&(T==="start"&&(M=I),T==="end"&&(I=M)),C&&t("pick",[I,M],!0,"time")}function p(T){m("start",T,{})}function y(T){m("end",{},T)}const b=a.ref(null),v=a.ref(null);function k(){var T,L;(T=b==null?void 0:b.value)==null||T.updateScroll(),(L=v==null?void 0:v.value)==null||L.updateScroll()}return Se(Z({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:u,handleStartChange:p,handleEndChange:y,handlePickClick:f,updateScroll:k,timeSpinnerRef:b,timeSpinnerEndRef:v})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(gu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(gu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const SC={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var xC=a.defineComponent({name:"DateRangePanel",props:SC,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(H=>H||ua()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(vl,{dates:c.dates,parentName:d.$options.name});const u=(H,R)=>!H||!R?0:H.getTime()-R.getTime(),f=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),y=H=>{var R,ae;H&&((R=m==null?void 0:m.value)==null||R.updateScroll(),(ae=p==null?void 0:p.value)==null||ae.updateScroll())},b=(H,R,ae,D=!0)=>{const _=new Date(c[`${H}PanelDate`]);if(_[`set${R}`](_[`get${R}`]()+ae),c[`${H}PanelDate`]=_,!!D)if(e.splitPanels){const Q=H==="left"?"right":"left";H==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(Q,R,1),H==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(Q,R,-1)}else{const Q=H==="left"?"right":"left",se=c[`${Q}PanelDate`],ue=new Date(se);if(R==="Month"){const be=new Date(ue.getFullYear(),ue.getMonth()+ae+1,0).getDate();ue.setDate(Math.min(be,ue.getDate()))}ue[`set${R}`](ue[`get${R}`]()+ae),c[`${Q}PanelDate`]=ue}},v=H=>{const R=c.currentView==="year"?-10:-1;b(H,"FullYear",R)},k=H=>{const R=c.currentView==="year"?10:1;b(H,"FullYear",R)},T=H=>{b(H,"Month",-1)},L=H=>{b(H,"Month",1)},N=H=>{c[`${H}PickerTable`]="year-table"},C=H=>{c[`${H}PickerTable`]="month-table"},I=H=>{const R="zh-CN",ae="[yyyy]-[mm]",D=c[`${H}PanelDate`],{labels:_,separator:Q}=_9(R,ae,D),se=ue=>{const be=ue==="month"?C:N;return()=>be(H)};return{separator:Q,labels:_.map(ue=>{const be=ue;return be.handler=se(ue.type),be})}},M=(H,R)=>{n("pick",c.dates,H,R||e.type)},S=(H,R)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=H;else{const[ae,D]=[c.rangeState.from,H].sort(u),_=R==="upToNow"?new Date:new Date(new Date(new Date(D.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ae,_],c.rangeState={from:ae,to:_,selecting:!1}}M(!1,R||"date")}else c.upToNowEnable=new Date(H).getTime()<new Date().getTime(),c.rangeState={from:H,to:null,selecting:!0}},z=(H,R)=>{if(c[`${H}PanelDate`]=R,c[`${H}PickerTable`]==="year-table"?c[`${H}PickerTable`]="month-table":c[`${H}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const D=H==="left"?"right":"left";c[`${D}PanelDate`]=R,b(D,"Month",D==="left"?-1:1,!1)}},j=(H,R)=>{if(!(H!=null&&H.value))return!1;H.onClick&&H.onClick(H,R);const ae=typeof H.value=="function"?H.value():H.value,[D,_]=ae;c.rangeState.from=D,c.rangeState.to=_,c.dates=[D,_],n("pick",ae,!1,"shortcut",H),e.shortcutClose&&n("pick-success")},O=H=>{c.rangeState.to=H};function W(H){c.leftPanelDate=H;const R=new Date(H.getFullYear(),H.getMonth()+1,1),ae=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ae,R.getTime())):R}a.watch(()=>e.selectionMode,H=>{c.currentView=H||"range"}),a.watch(()=>e.modelValue,H=>{const R=H[0]?an(H[0]):null,ae=H[1]?an(H[1]):null;c.dates=[R,ae].sort(u),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},W(e.startDate||c.dates[0]||new Date)}),a.watch(()=>c.currentView,H=>{const R=c.leftPanelDate.getMonth(),ae=c.rightPanelDate.getMonth(),D=c.leftPanelDate.getFullYear()===c.rightPanelDate.getFullYear();H==="date"&&D&&R===ae&&b("right","Month",1),H==="month"&&D&&b("right","FullYear",1),H==="year"&&D&&b("right","FullYear",10),c.currentView==="time"&&a.nextTick(()=>{q.value.updateScroll()})});const P=a.computed(()=>c.currentView==="time"),G=a.computed(()=>I("left")),B=a.computed(()=>I("right")),ie=a.computed(()=>c.leftPickerTable.split("-").shift()),oe=a.computed(()=>c.rightPickerTable.split("-").shift()),ve=a.computed(()=>G.value.labels[0].type==="year"||c.currentView==="date"),Ie=a.computed(()=>G.value.labels[1].type==="year"||c.currentView==="date"),me=a.computed(()=>B.value.labels[0].type==="year"||c.currentView==="date"),ge=a.computed(()=>B.value.labels[1].type==="year"||c.currentView==="date"),$=a.computed(()=>{const H=`${c.currentView}-table`;return{left:c.leftPickerTable!==H,right:c.rightPickerTable!==H}}),U=a.computed(()=>({left:$.value.left?z.bind("left"):S,right:$.value.right?z.bind("right"):S})),V=a.computed(()=>{var H;return t.shortcuts||((H=e.shortcuts)==null?void 0:H.length)}),J=()=>{c.currentView=c.currentView==="time"?"date":"time"},re=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},K=()=>{re(),n("pick-success")},X=()=>{re(),n("pick-clear")};function de(){n("pick-click")}const we=a.computed(()=>!(c.dates[0]&&c.dates[1])),q=a.ref(null);return Se(Z({},a.toRefs(c)),{isTime:P,hasShortcuts:V,prevYear:v,nextYear:k,prevMonth:T,nextMonth:L,leftDatePanelLabel:G,rightDatePanelLabel:B,leftDatePanelView:ie,rightDatePanelView:oe,leftShowLabelFirst:ve,leftShowLabelSecond:Ie,rightShowLabelFirst:me,rightShowLabelSecond:ge,preSelecting:$,panelPickerHandlers:U,timeDisabled:we,handleShortcutClick:j,reset:f,onToggleVisibility:y,handleRangePick:S,handleChangeRange:O,handleToggleTime:J,handlePickSuccess:K,handlePickClear:X,handlePickClick:de,timePickerRef:q})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(hu,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(hu,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(B9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(p9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),e])}}),DC=a.defineComponent({name:"DatePicker",directives:{clickoutside:jn},props:wl,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=V9(c)?o:Qi(e.value||e.modelValue,e.type,e.multiple,e.format),u=null;e.shortcutSelectedIndex!==-1&&(u=e.shortcuts[e.shortcutSelectedIndex]||null,u&&(d=u.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(Cl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:u,onSelectionModeChange:m});function m(H){let R=H;return H.match(/^date/)&&(R="date"),f.selectionMode=["year","month","date","time"].indexOf(R)>-1&&R,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const H=e.type.includes("range");let R=f.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(R=R.map(ae=>Zn(ae,e.type,e.multiple,e.format))),H||e.multiple?R:R[0]}),y=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Zn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(H=>Zn(H,e.type,e.multiple,e.format)):Zn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),k=a.computed(()=>Zn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?f.shortcut.text:k.value}),L=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),M=a.computed(()=>!!t.confirm),S=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-font":e.fontSize==="large"&&(H="large-font"),H}),z=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-width":e.fontSize==="large"&&(H="large-width"),H}),j=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),W=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),G=()=>{var H;(H=P==null?void 0:P.value)==null||H.focus()};a.watch(()=>f.visible,H=>{var R,ae;H===!1&&((R=B.value)==null||R.destoryDropdown()),(ae=B.value)==null||ae.updateDropdown(),n("open-change",H)});const B=a.ref(null);a.watch(()=>e.modelValue,H=>{var R;f.internalValue=Qi(H,e.type,e.multiple,e.format),e.withValidate&&((R=i==null?void 0:i.validate)==null||R.call(i,"change"))}),a.watch(()=>e.open,H=>{f.visible=H===!0}),a.watch(()=>e.type,H=>{m(H)}),a.watch(()=>p,(H,R)=>{const ae=JSON.stringify(H),D=JSON.stringify(R);(ae!==D||typeof H!=typeof R)&&n("input",H)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const H=e.modelValue,R=p.value;(typeof H!=typeof R||JSON.stringify(H)!==JSON.stringify(R))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(Q9,{props:e,focus:()=>G()})});const ie=a.ref(null),oe=H=>{var R;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(H&&H.type==="mousedown"&&f.visible){H.preventDefault(),H.stopPropagation();return}if(f.visible){const ae=(R=ie==null?void 0:ie.value)==null?void 0:R.$el;if(H&&ae&&ae.contains(H.target))return;f.visible=!1,H==null||H.preventDefault(),H==null||H.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ve=()=>{var H,R;(H=P==null?void 0:P.value)==null||H.focus(),(R=P==null?void 0:P.value)==null||R.click()},Ie=()=>{e.readonly||e.disabled||k!=null&&k.value&&(f.showClose=!0)},me=H=>{f.showClose=!1},ge=H=>{a.nextTick(()=>{var R;n("update:modelValue",p.value),n("change",y.value,H),e.type.indexOf("time")<0&&((R=P==null?void 0:P.value)==null||R.blur())})},$=H=>{var be;const R=e.type.includes("range")||e.multiple,ae=k.value,D=H.target.value,_=Qi(D,e.type,e.multiple,e.format),Q=R?_:_[0],se=(be=e.disabledDate)==null?void 0:be.call(e,Q),ue=_.reduce((te,le)=>te&&le instanceof Date,!0);D!==ae&&!se&&ue?(ge(e.type),f.internalValue=_):f.forceInputRerender=f.forceInputRerender+1},U=H=>{e.readonly||(f.isFocused=!0,!(H&&H.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var H;(H=ie==null?void 0:ie.value)==null||H.reset()},J=H=>{var R,ae;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){H.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(R=ie==null?void 0:ie.value)==null||R.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},re=H=>{const{keyCode:R}=H;if(R===9&&f.visible)if(H.stopPropagation(),H.preventDefault(),L.value){const D=".bk-picker-confirm > *",_=B.value.$el.querySelectorAll(D);f.internalFocus=!0,[..._][H.shiftKey?"pop":"shift"]().focus()}else oe();const ae=[37,38,39,40];if(!f.visible&&ae.includes(R)){f.visible=!0;return}R===27&&f.visible&&(H.stopPropagation(),oe()),!!ae.includes(R)&&f.focusedTime.active&&H.preventDefault()},K=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),ge(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},X=()=>{var H;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(H=P==null?void 0:P.value)==null||H.blur(),V()},de=(H,R=!1,ae,D)=>{let _=H;if(e.multiple){const se=_.getTime(),ue=f.internalValue.findIndex(le=>le&&le.getTime()===se),te=[...f.internalValue,_].filter(Boolean).map(le=>le.getTime()).filter((le,he,ke)=>ke.indexOf(le)===he&&he!==ue);f.internalValue=te.map(le=>new Date(le))}else _=Qi(H,e.type,e.multiple,e.format),f.internalValue=Array.isArray(_)?_:[_];if(f.internalValue[0]){const[se]=f.internalValue;f.focusedDate=se}f.focusedTime=Se(Z({},f.focusedTime),{time:f.internalValue.map(Cl)}),L.value||(m(e.type),f.visible=R),ae==="upToNow"&&e.type==="daterange"&&X(),f.shortcut=D,ge(ae);const Q=e.shortcuts.findIndex(se=>se===f.shortcut);n("shortcut-change",f.shortcut,Q)},we=a.ref(null),q=()=>{var H,R;(R=(H=ie.value).handleToggleTime)==null||R.call(H)};return Se(Z({},a.toRefs(f)),{panel:b,publicStringValue:y,opened:v,visualValue:k,displayValue:T,isConfirm:L,hasHeader:N,hasFooter:C,hasShortcuts:I,hasConfirm:M,fontSizeCls:S,longWidthCls:z,localReadonly:j,allowCrossDayProp:W,ownPickerProps:O,pickerDropdownRef:B,inputRef:P,triggerRef:we,pickerPanelRef:ie,handleClose:oe,handleIconClick:ve,handleInputMouseenter:Ie,handleInputMouseleave:me,handleFocus:U,handleBlur:J,handleKeydown:re,handleInputChange:$,handleClear:K,onPick:de,onPickSuccess:X,handleToggleTime:q})},render(){var s,o,c;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var d,u;return((u=(d=this.$slots).shortcuts)==null?void 0:u.call(d,{change:this.onPick}))||null}}:{},n=this.hasConfirm?{confirm:this.$slots.confirm}:{},i=Z(Z({},t),n);return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(c=(o=(s=this.$slots).trigger)==null?void 0:o.call(s))!=null?c:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(ou,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var d,u,f,m,p,y;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(u=(d=this.$slots).header)==null?void 0:u.call(d))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(xC,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i):a.createVNode(kC,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(y=(p=(m=this.$slots).footer)==null?void 0:p.call(m))!=null?y:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),jC=a.defineComponent({name:"TimePicker",directives:{clickoutside:jn},props:Z(Z(Z({},wl),MC),Ml),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=V9((s?e.modelValue:[e.modelValue])||[])?o:Qi(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(Cl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(q){let H=q;return q.match(/^date/)&&(H="date"),u.selectionMode=["year","month","date","time"].indexOf(H)>-1&&H,u.selectionMode}const m=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const q=e.type.includes("range");let H=u.internalValue.map(R=>R instanceof Date?new Date(R):R||"");return e.type.match(/^time/)&&(H=H.map(R=>Zn(R,e.type,e.multiple,e.format))),q||e.multiple?H:H[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Zn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(q=>Zn(q,e.type,e.multiple,e.format)):Zn(m.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?u.visible:e.open),v=a.computed(()=>Zn(u.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var q;return((q=u.shortcut)==null?void 0:q.text)&&e.useShortcutText?u.shortcut.text:v.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),L=a.computed(()=>!!t.header),N=a.computed(()=>!!t.footer),C=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let q="";return e.fontSize==="medium"?q="medium-font":e.fontSize==="large"&&(q="large-font"),q}),M=a.computed(()=>{let q="";return e.fontSize==="medium"?q="medium-width":e.fontSize==="large"&&(q="large-width"),q}),S=a.computed(()=>{var q;return((q=u.shortcut)==null?void 0:q.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),j=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),O=a.ref(null),W=()=>{var q;(q=O==null?void 0:O.value)==null||q.focus()},{proxy:P}=a.getCurrentInstance();a.watch(()=>u.visible,q=>{q&&a.nextTick(()=>{var H,R;(R=(H=P.pickerPanelRef)==null?void 0:H.timeSpinnerRef)==null||R.updateScroll()})});const G=a.ref(null);a.watch(()=>e.modelValue,q=>{var H;u.internalValue=Qi(q,e.type,e.multiple,e.format),e.withValidate&&((H=i==null?void 0:i.validate)==null||H.call(i,"change"))}),a.watch(()=>e.open,q=>{u.visible=q===!0}),a.watch(()=>e.type,q=>{f(q)}),a.watch(()=>m,(q,H)=>{const R=JSON.stringify(q),ae=JSON.stringify(H);(R!==ae||typeof q!=typeof H)&&n("input",q)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const q=e.modelValue,H=m.value;(typeof q!=typeof H||JSON.stringify(q)!==JSON.stringify(H))&&n("input",m.value),e.open!==null&&(u.visible=e.open),a.provide(Q9,{props:e,focus:()=>W()})});const B=a.ref(null),ie=q=>{var H;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(q&&q.type==="mousedown"&&u.visible){q.preventDefault(),q.stopPropagation();return}if(u.visible){const R=(H=B==null?void 0:B.value)==null?void 0:H.$el;if(q&&R&&R.contains(q.target))return;u.visible=!1,q==null||q.preventDefault(),q==null||q.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},oe=()=>{var q,H;(q=O==null?void 0:O.value)==null||q.focus(),(H=O==null?void 0:O.value)==null||H.click()},ve=()=>{e.readonly||e.disabled||v!=null&&v.value&&(u.showClose=!0)},Ie=q=>{u.showClose=!1},me=q=>{a.nextTick(()=>{var H;n("update:modelValue",m.value),n("change",p.value,q),e.type.indexOf("time")<0&&((H=O==null?void 0:O.value)==null||H.blur())})},ge=q=>{var ue;const H=e.type.includes("range")||e.multiple,R=v.value,ae=q.target.value,D=Qi(ae,e.type,e.multiple,e.format),_=H?D:D[0],Q=(ue=e.disabledDate)==null?void 0:ue.call(e,_),se=D.reduce((be,te)=>be&&te instanceof Date,!0);ae!==R&&!Q&&se?(me(e.type),u.internalValue=D):u.forceInputRerender=u.forceInputRerender+1},$=q=>{e.readonly||(u.isFocused=!0,!(q&&q.type==="focus")&&(e.disabled||(u.visible=!0)))},U=()=>{var q,H;(H=(q=B==null?void 0:B.value)==null?void 0:q.reset)==null||H.call(q)},V=q=>{var H,R;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){q.preventDefault();return}u.isFocused=!1,f(e.type),u.internalValue=u.internalValue.slice(),U(),(H=B==null?void 0:B.value)==null||H.onToggleVisibility(!1),(R=i==null?void 0:i.validate)==null||R.call(i,"blur")},J=q=>{const{keyCode:H}=q;if(H===9&&u.visible)if(q.stopPropagation(),q.preventDefault(),T.value){const ae=".bk-picker-confirm > *",D=G.value.$el.querySelectorAll(ae);u.internalFocus=!0,[...D][q.shiftKey?"pop":"shift"]().focus()}else ie();const R=[37,38,39,40];if(!u.visible&&R.includes(H)){u.visible=!0;return}H===27&&u.visible&&(q.stopPropagation(),ie()),!!R.includes(H)&&u.focusedTime.active&&q.preventDefault()},re=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),me(e.type),U(),u.showClose=!1,u.shortcut=null,setTimeout(()=>f(e.type),500)},K=()=>{e.appendToBody&&(u.disableCloseUnderTransfer=!0)},X=()=>{var q;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(q=O==null?void 0:O.value)==null||q.blur(),U()},de=(q,H=!1,R,ae)=>{let D=q;if(e.multiple){const Q=D.getTime(),se=u.internalValue.findIndex(te=>te&&te.getTime()===Q),be=[...u.internalValue,D].filter(Boolean).map(te=>te.getTime()).filter((te,le,he)=>he.indexOf(te)===le&&le!==se);u.internalValue=be.map(te=>new Date(te))}else D=Qi(q,e.type,e.multiple,e.format),u.internalValue=Array.isArray(D)?D:[D];if(u.internalValue[0]){const[Q]=u.internalValue;u.focusedDate=Q}u.focusedTime=Se(Z({},u.focusedTime),{time:u.internalValue.map(Cl)}),T.value||(f(e.type),u.visible=H),R==="upToNow"&&e.type==="daterange"&&X(),u.shortcut=ae,me(R);const _=e.shortcuts.findIndex(Q=>Q===u.shortcut);n("shortcut-change",u.shortcut,_)},we=a.ref(null);return Se(Z({},a.toRefs(u)),{panel:y,publicStringValue:p,opened:b,visualValue:v,displayValue:k,isConfirm:T,hasHeader:L,hasFooter:N,hasShortcuts:C,fontSizeCls:I,longWidthCls:M,localReadonly:S,allowCrossDayProp:j,ownPickerProps:z,pickerDropdownRef:G,inputRef:O,triggerRef:we,pickerPanelRef:B,handleClose:ie,handleIconClick:oe,handleInputMouseenter:ve,handleInputMouseleave:Ie,handleFocus:$,handleBlur:V,handleKeydown:J,handleInputChange:ge,handleClear:re,handleTransferClick:K,onPick:de,onPickSuccess:X})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(ou,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,u,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(B9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(H9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(f=(u=this.$slots).footer)==null?void 0:f.call(u))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const F9=Ge(DC);var Yn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Yn||{});const zC={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function OC(e,t,n){const i=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(i.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):i.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:i,selectedList:s}}function AC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var PC=a.defineComponent({name:"Transfer",props:zC,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Yn.OBJECT_ARRAY:Yn.BASE_ARRAY:Yn.NOT_ARRAY),i=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Yn.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Yn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:u,selectedList:f}=OC(c,d,i),{selectSearchQuery:m,selectListSearch:p}=AC(u,s),y=a.computed(()=>[...p.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1})),b=a.computed(()=>[...f.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1}));a.watch(()=>[u,f],()=>{N()},{deep:!0});const v=(C,I)=>{const M=i.value;return C.some(S=>S[M]===I[M])&&I.disabled},k=()=>{u.value=[...c.value.filter(C=>v(u.value,C))],f.value=[...c.value.filter(C=>!v(u.value,C))],N()},T=()=>{u.value=[...c.value.filter(C=>!v(f.value,C))],f.value=[...c.value.filter(C=>v(f.value,C))],N()},L=(C,I)=>{if(C.disabled)return;const M=C[i.value],S=I?u:f,z=I?f:u,j=S.value.findIndex(O=>O[i.value]===M);z.value.push(...S.value.splice(j,1)),N()},N=()=>{const C=u.value.map(M=>M[i.value]),I=f.value.map(M=>M[i.value]);t("update:targetList",I),t("change",n.value===Yn.BASE_ARRAY?C:u.value.map(M=>a.toRaw(M)),n.value===Yn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),I)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:y,selectedListSort:b,settingCode:i,displayCode:s,allToRight:k,allToLeft:T,handleItemClick:L}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,y;const d=c==="left-header",u=d?`${(p=this.title[0])!=null?p:"\u6E90\u5217\u8868"}`:`${(y=this.title[1])!=null?y:"\u76EE\u6807\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${u}\uFF08${d?e.length:t.length}\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u9009\u62E9\u5168\u90E8":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",u=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[u])},s=(c,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":c.disabled}]},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(Xo,{class:"bk-icon icon-move"},null):a.createVNode(Hn,{class:"bk-icon icon-delete"},null)])]),o=c=>{const d=c==="left",u=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return u.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(p=>{var y,b,v;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p,d)},[(v=(b=(y=this.$slots)[f])==null?void 0:b.call(y,p))!=null?v:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ia,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u641C\u7D22"},{prefix:()=>a.createVNode(Wa,{class:"icon-search"},null)}),o("left")]),a.createVNode(fc,{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const G9=Ge(PC);var di=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop",e))(di||{});const Ri=(...e)=>!0,EC={nodeClick:Ri,nodeCollapse:Ri,nodeExpand:Ri,nodeChecked:Ri,nodeDragStart:Ri,nodeDragOver:Ri,nodeDragLeave:Ri,nodeDrop:Ri};var fe=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(fe||{});const _i={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Z9=(e=>(e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse",e))(Z9||{});const VC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:Oe("columnType",{}).def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([Oe("TreeSearchMatchType",{}).def("fuzzy"),g.func]),resultType:Oe("treeSearchResultType",{}).def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),disableDrag:g.func.def(null),disableDrop:g.func.def(null),dragSort:g.bool.def(!1),selectable:g.oneOfType([g.bool,g.func]).def(!0),disabledFolderSelectable:g.bool.def(!1),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0),expandAll:g.bool.def(!1),nodeContentAction:g.oneOfType([g.arrayOf(Oe("nodeContentActionType",{}).def(Z9.CLICK)),g.func.def(()=>["selected"])]).def(["selected","expand","click"])};var JC=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Us,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),Il=(e,t)=>{const n=P=>e.schema.get(P),i=(P,G)=>{var B;return(B=n(P[fe.UUID]))==null?void 0:B[G]},s=(P,G,B)=>{e.schema.set(P[fe.UUID],Se(Z({},n(P[fe.UUID])),{[G]:B}))},o=P=>i(P,fe.PATH),c=P=>i(P,fe.UUID),d=P=>i(P,fe.IS_ROOT),u=P=>i(P,fe.IS_OPEN),f=P=>i(P,fe.HAS_CHILD),m=P=>i(P,fe.IS_MATCH),p=P=>i(P,fe.IS_CHECKED),y=P=>i(P,fe.PARENT_ID),b=P=>i({[fe.UUID]:P},fe.PARENT_ID),v=P=>i(P,fe.IS_LOADING),k=(P,G)=>{s(P,fe.IS_LOADING,G)},T=P=>e.schema.delete(P),L=P=>n(y(P)),N=P=>{var G;return typeof P=="object"?u(P):typeof P=="string"?(G=n(P))==null?void 0:G[fe.IS_OPEN]:!1},C=P=>N(i(P,fe.PARENT_ID)),I=P=>d(P)||C(P),M=P=>P.split("-").reduce((B,ie)=>{const oe=Number(ie);return Array.isArray(B)?B[oe]:B[t.children][oe]},t.data),S=P=>{const G=e.schema;return Array.prototype.filter.call(Array.from(G.keys()),B=>G.get(B)[fe.PARENT_ID]===P[fe.UUID])},z=P=>M(o({[fe.UUID]:P})),j=P=>d({[fe.UUID]:P})?{[t.children]:t.data}:z(b(P)),O=P=>({[_i[fe.IS_LOADING]]:i(P,fe.IS_LOADING),[_i[fe.HAS_CHILD]]:f(P),[_i[fe.IS_MATCH]]:m(P),[_i[fe.IS_CHECKED]]:p(P),[_i[fe.IS_OPEN]]:u(P),[_i[fe.IS_ROOT]]:d(P),fullPath:i(P,fe.PATH),uuid:c(P),parentId:i(P,fe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:y,getNodeParentIdById:b,getParentNodeData:j,getParentNode:L,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:u,hasChildNode:f,isItemOpen:N,isNodeChecked:p,isNodeMatched:m,isNodeLoading:v,checkNodeIsOpen:I,getSourceNodeByPath:M,getSourceNodeByUID:z,deleteNodeSchema:T,resolveScopedSlotParam:O,setTreeNodeLoading:k,extendNodeAttr:P=>Se(Z({},P),{[fe.TREE_NODE_ATTR]:O(P)}),getChildNodes:S}};const Y9="1px dashed #c3cdd7",U9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:$9(n,e,t,o)},$9=(e,t,n,i=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},K9=(e,t)=>$9(e,t,"label"),mu=(e,t)=>e.get(t)||{},QC=(e,t,n)=>{var i;return(i=mu(e,t))==null?void 0:i[n]},RC=(e,t)=>({"--level-line":U9(t,"levelLine",e,Y9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),_C=(e,t,n={})=>{const{schema:i}=n,s=QC(i,e[fe.UUID],fe.DEPTH);return Z({"--depth":s},typeof t.levelLine=="function"?{"--level-line":U9(t,"levelLine",e,Y9,null,["node"])}:{})},WC=(e,t,n)=>{const{__is_root:i,__is_open:s}=mu(t,e[fe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},HC=(e,t)=>{const{__is_checked:n,__is_selected:i}=mu(t,e[fe.UUID])||{};return{"is-checked":n,"is-selected":i,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[Ve("node-row")]:!0}},BC=(e,t,n,i,s)=>{FC(e,t,n,{[i]:s})},FC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,i||{})},Gr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[fe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,fe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var X9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Il(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,fe.IS_OPEN,!0);const y=Array.isArray(m)?m:[m];return BC(i(p),e.data,e.children,e.children,y),Promise.resolve(m)}return Promise.resolve(m)},u=m=>{const{callback:p=null,cache:y=!0}=e.async||{};if(typeof p=="function"&&s(m,fe.IS_ASYNC)){if(n(m,fe.IS_ASYNC_INIT,!0),!s(m,fe.IS_CACHED)){n(m,fe.IS_CACHED,y);const b=o(m),v=p(m,k=>d(k,m),b);if(typeof v=="object"&&v!==null)return c(m,!0),v instanceof Promise?Promise.resolve(v.then(k=>d(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{c(m,!1),n(m,fe.IS_CACHED,!0)})):(d(v,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>s(p,fe.IS_ASYNC)&&p[_i[fe.IS_OPEN]]&&!s(p,fe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>u(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:u,deepAutoOpen:f}},GC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:u,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:y,isRootNode:b,hasChildNode:v,isItemOpen:k,isNodeOpened:T,isNodeLoading:L,isNodeChecked:N,getParentNode:C,resolveScopedSlotParam:I,extendNodeAttr:M}=Il(n,e),{registerNextLoop:S}=o,{asyncNodeClick:z,deepAutoOpen:j}=X9(e,n),O=R=>k(R)?a.createVNode(ac,{class:[Ve("tree-icon"),Ve("node-prefix")]},null):a.createVNode(rc,{class:[Ve("tree-icon"),Ve("node-prefix")]},null),W=R=>{if(typeof R=="string")return R;if(typeof R=="object"&&R!==null){if(R.__v_isVNode)return R;const{node:ae,className:D,text:_,style:Q}=R;return a.h(ae,{class:D,style:Q},_)}return null},P=R=>{var ae,D,_;return((_=(D=(ae=t.slots).nodeLoading)==null?void 0:D.call(ae,M(R)))!=null?_:L(R))?a.createVNode(Dr,null,null):""},G=R=>{if(t.slots.nodeAction)return t.slots.nodeAction(M(R));let ae=null;return L(R)?P(R):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(R),"node_action"),ae!=="default")?W(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(v(R)||R.async||!e.autoCheckChildren)?k(R)?a.createVNode(Rs,{class:Ve("node-prefix")},null):a.createVNode(Gs,{class:Ve("node-prefix")},null):null},B=R=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(M(R));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(R),"node_type"),ae!=="default")?W(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(R)||v(R)?O(R):a.createVNode(dc,{class:[Ve("tree-icon"),Ve("node-prefix")]},null):null},ie=(R,ae)=>{const D=C(R);D&&(d(D,fe.IS_CHECKED,ae),b(D)||ie(D,ae))},oe=(R,ae,D)=>{y(R).forEach(_=>{d({[fe.UUID]:_},ae,D),oe({[fe.UUID]:_},ae,D)})},ve=(R,ae)=>{d(R,fe.IS_CHECKED,!!ae),oe(R,fe.IS_CHECKED,!!ae),ie(R,ae),t.emit(di.NODE_CHECKED,s.value.filter(D=>N(D)).map(D=>D[fe.UUID]))},Ie=R=>N(R)&&!s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(R))}).every(ae=>N(ae)),me=R=>N(R)||s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(R))}).some(ae=>N(ae)),ge=R=>e.showCheckbox?a.createVNode(ji,{size:"small",modelValue:me(R),indeterminate:Ie(R),onChange:ae=>ve(R,ae)},null):null,$=(R,ae=null,D=null,_=!0)=>{const Q=ae===null?!k(R):!!ae;if(Q||oe(R,fe.IS_OPEN,Q),d(R,fe.IS_OPEN,Q),_){const se=k(R)?di.NODE_EXPAND:di.NODE_COLLAPSE;t.emit(se,R,I(R),f(R[fe.UUID]),D)}},U=(R,ae,D)=>{if(Array.isArray(R)){R.forEach(_=>d(Gr(_),ae,D));return}d(Gr(R),ae,D)},V=(R,ae=!0,D=!1)=>{const _=Gr(R);if(!_[fe.IS_NULL])if(D)if(ae){if(U(_,fe.IS_OPEN,!0),!b(_)){const Q=m(_,fe.PARENT_ID);V(Q,!0,!0)}}else $(_,!1,null,!1);else U(_,fe.IS_OPEN,ae)},J=(R,ae)=>{if(T(R)){$(R,!1,ae);return}z(R).finally(()=>{m(R,fe.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>$(R,!0,ae)}):$(R,!0,ae)})},re=(R,ae)=>{R.stopImmediatePropagation(),R.stopPropagation(),R.preventDefault(),J(ae,R)},K=(R,ae=!0,D=!0)=>{const _=Array.isArray(R)?R:[R];if(!_.length)return;const Q=Gr(_[0]);if(!Q[fe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(R)||e.disabledFolderSelectable&&(R==null?void 0:R.is_folder)===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}c!=null&&d({[fe.UUID]:c},fe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[fe.UUID]:e.selected},fe.IS_SELECTED,!ae),d(Q,fe.IS_SELECTED,ae),c=p(Q),D&&_.length===1&&V(Q,!0,!0),m(Q,fe.IS_ASYNC)&&z(Q).then(()=>{a.nextTick(()=>{_.shift(),K(_,ae,D)})})}},X=R=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,globalThis,[{node:R}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],de=(R,ae)=>{const D=X(R);if(D.includes("selected")&&K(R,!0,!1),D.includes("expand")&&(T(R)||J(R,ae)),D.includes("collapse")&&T(R)&&J(R,ae),D.includes("click")){const _=di.NODE_CLICK;t.emit(_,R,I(R),f(R[fe.UUID]),ae)}},we=(R,ae)=>{if(b(ae))return!1;const D=u(ae),_=`${D}`.split("-").slice(0,R+1);if(_.join("-")===D)return!0;const se=_.pop(),ue=parseInt(se,10);_.push(`${ue+1}`);const be=_.join("-");return s.value.some(te=>te[fe.PATH]===be)},q=R=>{if(!e.levelLine)return null;const ae=_=>({"--depth":_}),D=m(R,fe.DEPTH)+1;return new Array(D).fill("").map((_,Q)=>Q).filter(_=>we(_,R)).filter(_=>_>0).map(_=>a.createVNode("span",{class:"node-virtual-line",style:ae(D-_)},null))};return{renderTreeNode:R=>{var ae,D,_,Q,se;return a.createVNode("div",{"data-tree-node":p(R),key:p(R),class:HC(R,n.schema)},[a.createVNode("div",{class:WC(R,n.schema,e),style:_C(R,e,n),onClick:ue=>de(R,ue)},[a.createVNode("div",{class:[Ve("node-action")],onClick:ue=>re(ue,R)},[G(R)]),a.createVNode("div",{class:Ve("node-content")},[[ge(R),B(R)],a.createVNode("span",{class:Ve("node-text")},[(_=(D=(ae=t.slots).node)==null?void 0:D.call(ae,M(R)))!=null?_:[K9(R,e)]]),(se=(Q=t.slots).nodeAppend)==null?void 0:se.call(Q,M(R))]),q(R)])])},handleTreeNodeClick:J,deepAutoOpen:j,asyncNodeClick:z,setNodeAction:U,setNodeOpened:$,setSelect:K,setOpen:V}},ZC=(e,t,n,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:o,getParentNodeData:c,getNodeAttr:d,getNodePath:u,isRootNode:f}=Il(i,e),m=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),y=z=>z.target.closest("[data-tree-node]"),b=z=>{var O;const j=(O=z==null?void 0:z.dataset)==null?void 0:O.treeNode;return s(j)},v=z=>{y(z).removeEventListener("mouseup",v)},k=z=>{const j=y(z),O=b(j);if(O.draggable===!1||m.value&&e.disableDrag(O)){j.classList.add("bk-tree-drag-disabled");return}j.setAttribute("draggable","true"),j.addEventListener("mouseup",v)},T=z=>{z.preventDefault();const j=y(z),O=b(j);if(t.emit(di.NODE_DRAG_OVER,z,j,O),p.value&&(e==null?void 0:e.disableDrop(O))){z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="none",j.classList.add("bk-tree-drop-disabled");return}j.classList.add("bk-tree-drop-active");const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node"),G=C(W,P)?"move":"none";z.dataTransfer.effectAllowed=G,z.dataTransfer.dropEffect=G},L=z=>{z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="move";const j=y(z);z.dataTransfer.setData("text/plain",""),z.dataTransfer.setData("node-id",j.getAttribute("data-tree-node")),t.emit(di.NODE_DRAG_START,z,j)},N=z=>{z.preventDefault(),z.stopPropagation();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");const O=b(j);if(p.value&&e.disableDrop(O))return;const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node");Reflect.apply(e.dragSort?I:M,globalThis,[W,P]),t.emit(di.NODE_DROP,z,j,O)},C=(z,j)=>{const O=u({[fe.UUID]:z}),W=u({[fe.UUID]:j}),P=o(z),G=o(j);return P===G?!0:O.indexOf(W)===-1&&W.indexOf(O)===-1},I=(z,j)=>{if(!C(z,j))return;const O=JSON.parse(JSON.stringify(s(z))),W=JSON.parse(JSON.stringify(s(j))),P=c(z),G=c(j),B=d({[fe.UUID]:z},fe.INDEX),ie=d({[fe.UUID]:j},fe.INDEX);P==null||P[e.children].splice(B,1,W),G==null||G[e.children].splice(ie,1,O)},M=(z,j)=>{const O=s(z),W=s(j);let P=null;if(f({[fe.UUID]:z}))P=e.data;else{const G=o(z);if(G!=null){P=s(G);const B=d({[fe.UUID]:z},fe.INDEX);P==null||P[e.children].splice(B,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(O)},S=z=>{z.preventDefault();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),t.emit(di.NODE_DRAG_LEAVE,z,j)};a.onMounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.addEventListener("mousedown",k),z.addEventListener("dragstart",L),z.addEventListener("dragover",T),z.addEventListener("dragleave",S),z.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.removeEventListener("mousedown",k),z.removeEventListener("dragstart",L),z.removeEventListener("dragover",T),z.removeEventListener("dragleave",S),z.removeEventListener("drop",N)}})},YC=e=>{var y;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(y=e.search)!=null?y:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,v)=>b===v,c=(b,v)=>new RegExp(`${b}`,"i").test(`${v}`),d=(b,v)=>Reflect.apply(b,globalThis,v),u=t.value===void 0||t.value===!1,f=(b,v)=>{if(u)return!0;if(s(t.value))return d(c,[t.value,b,v]);const{value:k="",match:T="fuzzy"}=t.value,N=typeof T=="function"?T:T==="fuzzy"?c:o;return`${k}`.length===0?!0:d(N,[k,b,v])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:u,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},UC=e=>{var T;const t=(L,N=void 0,C=[])=>{const{data:I,children:M}=L,S=[],z=[];let j=0;const O=new Map;function W(me,ge,$,U){if(me!=null&&O.has(me)&&![fe.UUID,fe.PARENT_ID].includes(ge)){const V=O.get(me);Object.prototype.hasOwnProperty.call(V,ge)&&typeof U=="function"&&Reflect.apply(U,self,[V,ge,$])&&(Object.assign(V,{[ge]:$}),W(V[fe.PARENT_ID],ge,$,U))}}function P(me){let ge=null;return typeof L.nodeKey=="string"&&(ge=me[L.nodeKey]||Li.v4()),ge||me[fe.UUID]||Li.v4()}const G={[fe.IS_OPEN]:()=>!!L.expandAll,[fe.IS_CHECKED]:()=>!1,[fe.IS_MATCH]:()=>!0,[fe.IS_SELECTED]:me=>L.selected===me,[fe.IS_CACHED]:()=>!1,[fe.IS_ASYNC]:()=>null,[fe.IS_LOADING]:()=>!1};function B(me,ge,$,U=void 0){let V=U;U===void 0&&typeof G[$]=="function"&&(V=G[$](me,ge));const J=_i[$];if(Object.prototype.hasOwnProperty.call(ge,J))return ge[J];const re=(C||[]).find(X=>X[fe.UUID]===me);let K;return re&&(K=re[$]),K==null&&(K=V),K}function ie(me,ge){return L.selectable?B(me,ge,fe.IS_SELECTED,L.selected===me):!1}function oe(me,ge,$){var J;const U=B(me,ge,fe.IS_OPEN),V=O.has($)?(J=O.get($))==null?void 0:J[fe.IS_OPEN]:!0;return U&&V}function ve(me){return!me[fe.IS_OPEN]}function Ie(me,ge=0,$=null,U=null){const V=me.length;for(let J=0;J<V;J++){const re=me[J];if(Array.isArray(re))Ie(re,ge,$,U);else if(typeof re=="object"&&re!==null){const K=U!==null?`${U}-${J}`:`${J}`,X=`${P(re)}`,de=!!(re[M]||[]).length;let we=B(X,re,fe.IS_OPEN);L.autoOpenParentNode?we&&W($,fe.IS_OPEN,!0,ve):we=oe(X,re,$),Object.assign(re,{[fe.UUID]:X});const q=L.showCheckbox&&B(X,re,fe.IS_CHECKED);q&&S.push(X),O.set(X,{[fe.DEPTH]:ge,[fe.INDEX]:J,[fe.UUID]:X,[fe.PARENT_ID]:$,[fe.HAS_CHILD]:de,[fe.PATH]:K,[fe.IS_ROOT]:$===null,[fe.ORDER]:j,[fe.IS_SELECTED]:ie(X,re),[fe.IS_MATCH]:B(X,re,fe.IS_MATCH),[fe.IS_OPEN]:we,[fe.IS_CHECKED]:q,[fe.IS_CACHED]:B(X,re,fe.IS_CACHED),[fe.IS_ASYNC]:B(X,re,fe.IS_ASYNC),[fe.IS_LOADING]:B(X,re,fe.IS_LOADING),[M]:null}),j+=1,z.push(Se(Z({},JSON.parse(JSON.stringify(re,(H,R)=>H===L.children?null:R))),{[fe.IS_OPEN]:we,[M]:null})),Object.prototype.hasOwnProperty.call(re,M)&&Ie(re[M]||[],ge+1,X,K)}}}return Ie(N||I),L.showCheckbox&&(S==null||S.forEach(me=>{Array.from(O.values()).filter(ge=>{var $;return($=ge[fe.PATH])==null?void 0:$.startsWith(O.get(me)[fe.PATH])}).forEach(ge=>Object.assign(ge,{[fe.IS_CHECKED]:!0})),W(me,fe.IS_CHECKED,!0,()=>!0)})),[z,O]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:u,deepAutoOpen:f}=X9(e,c),m=L=>{s.push(L)},p=(L,N,C=!0)=>{C&&i.has(L)&&i.delete(L),i.set(L,N)},y=L=>typeof L=="function"?{type:"loop",fn:L}:typeof L=="object"&&typeof L.type=="string"&&typeof L.fn=="function"?L:(console.error("loop event error",L),null),b=L=>{var C;const N=y(L);return N!==null&&Reflect.apply(N.fn,globalThis,[]),(C=N==null?void 0:N.type)!=null?C:"once"},v=()=>{Array.from(i.keys()).forEach(L=>{const N=i.get(L);if(Array.isArray(N)){const C=[];N.forEach((I,M)=>{b(I)==="once"&&C.unshift(M)}),C.length&&C.forEach(I=>N.splice(I,1)),N.length===0&&i.delete(L)}else b(N)==="once"&&i.delete(L)})};a.watch(()=>[e.data],L=>{var C,I;const N=t(e,L,d.value);c.data=N[0],c.schema=N[1],((C=e.async)==null?void 0:C.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&f(),v()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,L=>{o.length=0,s.forEach(N=>{Reflect.apply(N,globalThis,[L]),o.push(()=>Reflect.apply(N,globalThis,[L]))}),p("afterSelectWatch",o)},{immediate:!0})});const k=L=>{p("afterDataUpdate",L)};return(T=e.async)!=null&&T.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:u,deepAutoOpen:f,afterDataUpdate:k,registerNextLoop:p,onSelected:m}},$C=a.defineComponent({name:"Tree",props:VC,emits:EC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=UC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:u,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:y,isNodeMatched:b,hasChildNode:v}=Il(n,e),{searchFn:k,isSearchActive:T,refSearch:L,openResultNode:N,isTreeUI:C,isSearchDisabled:I}=YC(e);I||a.watch([L],()=>{n.data.forEach(ge=>{const $=k(K9(ge,e),ge);c(ge,fe.IS_MATCH,$),N&&W(ge,!0,!0)})});const M=ge=>{if(T.value){const $=()=>C?i.value.some(U=>{var V;return((V=U[fe.PATH])==null?void 0:V.startsWith(f(ge)))&&U[fe.IS_MATCH]}):!1;return u(ge,fe.IS_MATCH)||$()}return!0},S=a.computed(()=>n.data.filter(ge=>d(ge)&&M(ge))),{renderTreeNode:z,handleTreeNodeClick:j,setNodeOpened:O,setOpen:W,setNodeAction:P,setSelect:G,asyncNodeClick:B}=GC(e,t,n,S,i,{registerNextLoop:o}),ie=(ge,$=!0)=>{P(Gr(ge),fe.IS_CHECKED,$)};s(ge=>{G(ge,!0,e.autoOpenParentNode)});const oe=()=>n;t.expose({handleTreeNodeClick:j,isNodeChecked:y,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:v,setOpen:W,setChecked:ie,setNodeAction:P,setNodeOpened:O,setSelect:G,asyncNodeClick:B,getData:oe});const ve=a.ref(),{renderEmpty:Ie}=JC(e,t);ZC(e,t,ve,n);const me=ge=>{if(ge.length)return ge.map(z);const $=T.value?"search-empty":"empty";return Ie($)};return()=>a.createVNode(_r,{class:Ve("tree"),style:RC(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ve("container"),throttleDelay:0,ref:ve},{default:ge=>me(ge.data||[])})}});const q9=Ge($C),e3=e=>e.__v_isVNode;var KC=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(e3(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(e3(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const XC={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var qC=a.defineComponent({name:"Form",props:XC,emits:["submit"],setup(e,t){let n=[];const i=u=>{n.push(u)},s=u=>{n=n.reduce((f,m)=>(m!==u&&f.push(m),f),[])};return a.provide(n0,{props:e,register:i,unregister:s}),{handleSubmit:u=>{u.preventDefault(),t.emit("submit")},validate:u=>{let f={};return u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>p.property?Se(Z({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:u=>{let f={};u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>Se(Z({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=je({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}});const pu=e=>typeof e.message=="function"?e.message():e.message;var On={required:e=>typeof e=="number"||typeof e=="boolean"||Pa.isDate(e)?!0:!Pa.isEmpty(e),min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const e8={label:g.string,labelWidth:g.oneOfType([Number,String]).def(150),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},t8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n8=e=>{const t=[],n=e.label||"";return e.required&&t.push({required:!0,validator:On.required,message:`${n}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"change"}),e.email&&t.push({email:!0,validator:On.email,message:`${n}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"change"}),Number(e.max)>-1&&t.push({validator:i=>On.max(i,e.max),message:`${n}\u6700\u5927\u503C ${e.max}`,trigger:"change"}),Number(e.min)>-1&&t.push({validator:i=>On.min(i,e.min),message:`${n}\u6700\u5C0F\u503C ${e.min}`,trigger:"change"}),Number(e.maxlength)>-1&&t.push({validator:i=>On.maxlength(i,e.maxlength),message:`${n}\u6700\u5927\u957F\u5EA6 ${e.maxlength}`,trigger:"change"}),t},i8=(e,t)=>{let n=!1,i=!1;const s=e.reduce((c,d)=>{let u;if(d.required)u=ot.exports.isFunction(d.validator)?d.validator:On.required,n=!0;else if(d.email)u=ot.exports.isFunction(d.validator)?d.validator:On.email,i=!0;else if(Number(d.max)>-1)u=f=>On.max(f,d.max);else if(Number(d.min)>-1)u=f=>On.min(f,d.max);else if(Number(d.maxlength)>-1)u=f=>On.min(f,d.max);else if(Object.prototype.toString.call(d.pattern)==="[object RegExp]")u=f=>On.pattern(f,d.pattern);else if(ot.exports.isFunction(d.validator))u=d.validator;else return c;return c.push({validator:u,message:d.message||"\u9A8C\u8BC1\u9519\u8BEF",trigger:d.trigger||"blur"}),c},[]);return[...t.reduce((c,d)=>(d.required&&n||d.email&&i||c.push(d),c),[]),...s]},a8=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),t3=e=>e!==void 0;var r8=a.defineComponent({name:"FormItem",directives:{bkTooltips:el},props:e8,setup(e,t){const n=m2(),i=Boolean(n),s=xn(),o=Boolean(s),c=a.getCurrentInstance(),d=a.reactive({isError:!1,errorMessage:""}),u=a.computed(()=>i?n.props.formType==="vertical":!1),f=a.computed(()=>!!(e.label||t.slots.label)),m=a.computed(()=>{const v={width:"",paddingRight:"",textAlign:""},k=e.labelPosition||i&&n.props.labelPosition;if(k&&(v["text-align"]=k),n.props.formType==="vertical"||!e.label&&o)return v;const T=t3(e.labelWidth)?e.labelWidth:i&&n.props.labelWidth;return t3(T)&&(v.width=`${T}px`,v.paddingRight=T?"":"0px"),v}),p=a.computed(()=>({["margin-left"]:m.value.width})),y=v=>{if(!e.property||i&&!n.props.model)return Promise.resolve(!0);let k=[];i&&n.props.rules&&t8(n.props.rules,e.property)&&(k=n.props.rules[e.property]),e.rules&&(k=e.rules),k=a8(v,i8(k,n8(e))),k.length>0&&(d.isError=!1,d.errorMessage="");const T=ot.exports.get(n.props.model,e.property),L=(()=>{let N=-1;return()=>{if(N=N+1,N>=k.length)return Promise.resolve(!0);const C=k[N];return Promise.resolve().then(()=>{const I=C.validator(T);return typeof I!="boolean"&&typeof I.then=="function"?I.then(M=>{if(M===!1)return Promise.reject(pu(C))}).then(()=>L(),()=>(d.isError=!0,d.errorMessage=pu(C),Promise.reject(d.errorMessage))):I?L():(d.isError=!0,d.errorMessage=typeof I=="string"?I:pu(C),Promise.reject(d.errorMessage))})}})();return L()},b=()=>{d.isError=!1,d.errorMessage=""};return a.provide(i0,Se(Z({},e),{validate:y,clearValidate:b})),a.onMounted(()=>{i&&n.register(c.proxy)}),a.onBeforeUnmount(()=>{i&&n.unregister(c.proxy)}),Se(Z({},a.toRefs(d)),{isShowLabel:f,labelStyles:m,contentStyles:p,isFormTypeVertical:u,validate:y,clearValidate:b})},render(){var i,s,o,c;const e=je({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Hs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[this.isShowLabel&&a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content",style:this.contentStyles},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const n3=Gt(qC,{FormItem:r8,ComposeFormItem:KC}),s8={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var l8=a.defineComponent({name:"Col",props:s8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:u}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:s});const m=function(y){return`${Number((y*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:u?m(u/n):null}));return()=>{var y,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(y=t.slots).default)==null?void 0:b.call(y)])}}});const o8={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var c8=a.defineComponent({name:"Container",props:o8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:u}=e;return{"padding-right":`${u}px`,"padding-left":`${u}px`}});return()=>{var u,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(u=t.slots).default)==null?void 0:f.call(u)])}}}),u8=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Se(Z({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Nl=Gt(c8,{Row:u8,Col:l8});var d8=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:Uf(),trigger:$f(),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=o=>{t("showChange",o)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=je({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=ot.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),f8=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),h8=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const i3=Gt(d8,{DropdownMenu:h8,DropdownItem:f8});var bu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Gf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Fo(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=N=>typeof N=="number"?`${N}px`:N,d=c(e.height),u=c(e.width),f=N=>{N.length===0&&(i.list=i.list.slice(0,1),s.value=[]),N.forEach(C=>{const I=n.getNodeById(C);p(I)}),o.value=N},m=N=>{N.isDisabled||(N.config.multiple?o.value=n.getCheckedNodes().map(C=>C.path):o.value=N.path,t("update:modelValue",o.value))},p=N=>{var C;if(!(!N||(N==null?void 0:N.isDisabled))){if(i.list=i.list.slice(0,N.level),s.value=s.value.slice(0,N.level-1),(C=N.children)!=null&&C.length){i.list.push(N.children),s.value.push(N);return}if(n.config.isRemote&&!N.isLeaf){N.loading=!0;const I=M=>{n.appendNodes(M,N||null),i.list.push(N.children),s.value.push(N),N.loading=!1};n.config.remoteMethod(N,I)}}},y=N=>{const{trigger:C,checkAnyLevel:I,multiple:M}=N.config;return{onClick:z=>{(!N.isLeaf||M)&&z.stopPropagation(),C==="click"&&p(N),I&&!M&&m(N),N.isLeaf&&!M&&m(N)},onMouseenter:()=>{C==="hover"&&p(N)}}},b=N=>{const{multiple:C}=N.config;return{onClick:M=>{if(C){M.stopPropagation(),T(N,!N.checked);return}p(N),N.isLeaf&&!C&&m(N)}}},v=N=>(s.value[N.level-1]||{}).id===N.id,k=(N,C)=>{const{multiple:I}=N.config;return I?C.some(M=>kr(M,N.path)):kr(C,N.path)},T=(N,C)=>{N.setNodeCheck(C||!1),m(N)},L=N=>N.loading?a.createVNode(Dr,{class:"icon-spinner"},null):a.createVNode(Dn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,N=>{f(N)},{immediate:!0}),a.watch(()=>e.store,N=>{i.list=[N.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:v,nodeEvent:y,isCheckedNode:k,checkValue:o,checkNode:T,iconRender:L,panelWidth:u,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(ji,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function a3(e){return e.data.disabled?!0:e.level!==1?a3(e.parent):e.data.disabled}class Ll{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[i];this.children=(s||[]).map(o=>new Ll(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return a3(this)}broadcast(t,n){const i=`onParent${Nr(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${Nr(t)}`;n&&((s=n[i])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const r3=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(r3(i.children,t))),n),[]);class s3{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new Ll(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>kr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return r3(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>kr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new Ll(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var g8=a.defineComponent({name:"Cascader",directives:{clickoutside:jn},components:{CascaderPanel:bu,BkPopover:mn},props:{modelValue:g.arrayOf(g.oneOfType([Fo(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=yh(),d=a.ref(new s3(e)),u=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),v=a.ref([]),k=a.ref(!1),T=a.computed({get:()=>p.value,set:P=>{t("update:modelValue",P)}}),L=a.ref(null),N=P=>e.showCompleteName?P.pathNames.join(n):P.pathNames[P.pathNames.length-1],C=()=>{b.value=f.value},I=P=>{var G;if(i){m.value=d.value.getCheckedNodes().map(B=>({text:N(B),key:B.id}));return}if(!e.checkAnyLevel&&((G=L==null?void 0:L.value)==null||G.hide()),P.length===0)f.value="";else{const B=d.value.getNodeByValue(P);if(!B)return;f.value=N(B)}C()},M=P=>{P.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},S=(P,G,B)=>{B.stopPropagation();const ie=JSON.parse(JSON.stringify(P)),oe=ie.splice(G,1)[0];d.value.removeTag(oe),I(ie),t("update:modelValue",d.value.getCheckedNodes().map(ve=>ve.path))},z=(P,G)=>{I(P),t("update:modelValue",P),G!==void 0&&t("change",P)},j=()=>{d.value=new s3(e),I(e.modelValue)},O=P=>{t("toggle",P.isShow),P.isShow||(k.value=!1)},W=Ps(200,P=>{const G=P.target;if(b.value=G.value,b.value===""){k.value=!1;return}k.value=!0;const B=d.value.getFlattedNodes().filter(ie=>(e.checkAnyLevel||ie.isLeaf)&&ie.pathNames.join(e.separator).includes(b.value));v.value=B,!(L!=null&&L.value.isShow)&&(L==null||L.value.show())});return a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,j,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:u,selectedText:f,checkedValue:T,handleClear:M,isHover:s,setHover:o,popover:L,cancelHover:c,selectedTags:m,removeTag:S,cascaderPanel:y,popoverChangeEmitter:O,searchKey:b,suggestions:v,isFiltering:k,searchInputHandler:W}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Zt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Hn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(mn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(bu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const l3=Gt(g8,{CascaderPanel:bu});var o3=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),y=a.ref(null),b=a.computed(()=>{var O,W;let z="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const P=e.params.customContent[e.modelValue];z=P.tip||P.label||""}const j=e.params.vertical?Os.RIGHT:Os.TOP;return(W=e.params)!=null&&W.showTip?{content:e.params.formatterTipLabel(`${z||(e==null?void 0:e.modelValue)||"0"}`),placement:j}:{content:"",placement:j}}),v=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:v.value}:{left:v.value}),T=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),L=z=>{e.params.disable||(z.preventDefault(),N(z),Zr(window,"mousemove",C),Zr(window,"touchmove",C),Zr(window,"mouseup",I),Zr(window,"touchend",I))},N=z=>{n.value=!0,i.value=!0,e.params.vertical?s.value=z.clientY:o.value=z.clientX,c.value=parseFloat(v.value),d.value=c.value},C=z=>{if(n.value){i.value=!1,t("resetSize");let j=0;e.params.vertical?(f.value=z.clientY,j=(s.value-f.value)/e.params.sliderSize*100):(m.value=z.clientX,j=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+j,M(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(M(d.value),t("emitChange"))},0),kl(window,"mousemove",C),kl(window,"touchmove",C),kl(window,"mouseup",I),kl(window,"touchend",I))},M=z=>{if(z===null||isNaN(z))return;z<0?d.value=0:z>100&&(d.value=100);const j=100/((e.params.maxValue-e.params.minValue)/e.params.step);let W=Math.round(z/j)*j*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;W=parseFloat(W.toFixed(e.params.precision)),t("update:modelValue",W),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:y,tabindex:"0",style:k.value,onClick:z=>z.stopPropagation(),onMousedown:L},[Boolean(b.value.content)?a.createVNode(mn,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[T.value]):void 0]),setPosition:M,tip:b}},render(){return this.renderDom()}});const Zr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},kl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var m8=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.computed(()=>{const $=[e.minValue,e.maxValue,e.step].map(U=>{const V=`${U}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,$)}),v=a.computed(()=>Math.min(s.value,o.value)),k=a.computed(()=>Math.max(s.value,o.value)),T=a.computed(()=>e.range?`${100*(k.value-v.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),L=a.computed(()=>e.range?`${100*(v.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:T.value,bottom:L.value}:{width:T.value,left:L.value}),C=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const $=(e.maxValue-e.minValue)/e.step,U=100*e.step/(e.maxValue-e.minValue),V=[];for(let J=1;J<$;J++)V.push(J*U);return e.range?V.filter(J=>J<100*(v.value-e.minValue)/(e.maxValue-e.minValue)||J>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(J=>J>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),M=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const $=100*e.step/(e.maxValue-e.minValue),U=[];for(let V=e.minValue,J=0;V<=e.maxValue;V+=e.step,J++){const re={stepWidth:J*$,stepLabel:e.formatterLabel(V)};U.push(re)}return U}),S=a.computed(()=>Array.isArray(e.modelValue)),z=a.computed(()=>e.customContent?Object.keys(e.customContent).sort(($,U)=>Number($)-Number(U)).filter($=>Number($)>=e.minValue&&Number($)<=e.maxValue).map($=>{const{tip:U}=e.customContent[$],{label:V}=e.customContent[$];return{tip:U||V||"",label:V||"",percent:(Number($)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),j=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{G()}),a.watch(()=>s.value,$=>{e.range?n("update:modelValue",[v.value,k.value]):n("update:modelValue",$),d.value=$}),a.watch(()=>o.value,$=>{n("update:modelValue",[v.value,k.value]),u.value=$}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),O(),Zr(window,"resize",O())});const O=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},W=$=>{var U,V;if($.stopPropagation(),!e.disable){if(O(),e.vertical){const J=(U=f.value)==null?void 0:U.getBoundingClientRect().bottom;oe((J-$.clientY)/i.value*100)}else{const J=(V=f.value)==null?void 0:V.getBoundingClientRect().left;oe(($.clientX-J)/i.value*100)}B()}},P=()=>e.range?![v.value,k.value].every(($,U)=>$===c.value[U]):e.modelValue!==c.value,G=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const $=e.modelValue;e.range&&Array.isArray($)?$[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):$[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):$[0]<e.minValue?n("update:modelValue",[e.minValue,$[1]]):$[1]>e.maxValue?n("update:modelValue",[$[0],e.maxValue]):(s.value=Number($[0]),o.value=Number($[1]),P()&&(c.value=$.slice())):!e.range&&typeof $=="number"&&!isNaN($)&&($<e.minValue?n("update:modelValue",e.minValue):$>e.maxValue?n("update:modelValue",e.maxValue):(s.value=$,P()&&(c.value=$)))},B=async()=>{await a.nextTick(),n("change",e.range?[v.value,k.value]:e.modelValue)},ie=$=>e.vertical?{bottom:`${$}%`}:{left:`${$}%`},oe=$=>{if(!e.range){m.value.setPosition($);return}const U=e.minValue+$*(e.maxValue-e.minValue)/100;Math.abs(v.value-U)<Math.abs(k.value-U)?y.value=s.value<o.value?m.value:p.value:y.value=s.value>o.value?m.value:p.value,y.value.setPosition($)},ve=$=>{if($==="")return;const U=parseFloat($);U<e.minValue?(d.value=e.minValue,s.value=e.minValue):U>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=U},Ie=$=>{if($===""||typeof $=="number")return;const U=parseFloat($);U<e.minValue?(u.value=e.minValue,o.value=e.minValue):U>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=U},me=$=>{let U=0;return $==="start"?U=e.vertical?e.maxValue:e.minValue:U=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(U)?"0":"1"};return{renderDom:()=>{var $,U;return a.createVNode("div",{class:["bk-slider",e.extCls]},[($=t.start)==null?void 0:$.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:I.value,onClick:W},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:N.value},null),e.showInterval?C.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V)},null)):void 0,e.customContent?z.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:me("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:me("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return M.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.stepWidth)},[V.stepLabel]));if(e.customContent)return z.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.percent)},[V.label]))}()]):void 0,a.createVNode(o3,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:j.value,onEmitChange:B,onResetSize:O},null),e.range?a.createVNode(o3,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:j.value,onEmitChange:B,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ve},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:u.value,max:e.maxValue,min:e.minValue,onChange:Ie},null)])]:void 0]):void 0,(U=t.end)==null?void 0:U.call(t)])}}},render(){return this.renderDom()}});const c3=Ge(m8);var p8=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),y=a.ref(!1),b=a.ref(null),v=a.ref({}),k=a.ref(null),T=a.ref(null),L=a.ref(null),N=a.ref(null),C=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>C.value?"width":"height"),M=a.computed(()=>{let me=i.value;return typeof me=="number"&&(me=`${me}px`),{[I.value]:me}}),S=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),z=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),j=()=>{const me=k.value.getBoundingClientRect();b.value=C.value?me.width:me.height},O=new ResizeObserver(j),W=()=>{switch(T.value.style.visibility="visible",n.value){case"left":T.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":T.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":T.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":T.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},P=()=>{L.value.style.display="block",L.value.style.cursor=C.value?"col-resize":"row-resize"},G=me=>Math.min(c.value,Math.max(d.value,me),b.value-o.value),B=me=>{t("before-resize",me);const ge=N.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:me.clientX,clientY:me.clientY},aside:{width:ge.width,height:ge.height}}),P(),u.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const $=J=>{t("resizing",J)},U=J=>{let re;switch(n.value){case"top":re=J.clientY-v.value.mouse.clientY;break;case"right":re=v.value.mouse.clientX-J.clientX;break;case"bottom":re=v.value.mouse.clientY-J.clientY;break;case"left":re=J.clientX-v.value.mouse.clientX}const K=v.value.aside[I.value]+re,X=G(K)+s.value,de=`${X}px`;u.value?N.value.style[I.value]=de:T.value.style[n.value]=de,$(X)},V=()=>{if(T.value.style.visibility="hidden",L.value.style.display="none",document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ie(),t("after-resize",parseFloat(T.value.style[n.value]))}),u.value)return!1;N.value.style[I.value]=T.value.style[n.value]};document.addEventListener("mousemove",U),document.addEventListener("mouseup",V)},ie=()=>{if(!f.value)return!1;const me=N.value.getBoundingClientRect();if(y.value=m.value=me[I.value]<=z.value,!y.value)return p.value=!0,!1;ve(),a.nextTick(()=>{N.value.setAttribute(`data-${I.value}`,M.value[I.value])})},oe=me=>{m.value=typeof me=="boolean"?me:!m.value,ve(),t("collapse-change",m.value)},ve=()=>{const me=N.value.getBoundingClientRect();Ie(!m.value),m.value?(N.value.setAttribute(`data-${I.value}`,`${me[I.value]}px`),N.value.style[I.value]="5px"):(p.value=!0,N.value.style[I.value]=N.value.getAttribute(`data-${I.value}`))},Ie=me=>{const ge=()=>{p.value=me,N.value.style.transition="",N.value.removeEventListener("transitionend",ge)};N.value.addEventListener("transitionend",ge),N.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(k.value)}),a.onBeforeUnmount(()=>{O.unobserve(k.value)}),{collapsed:m,asideContentVisible:p,minimized:y,limitMax:b,state:v,vertical:C,cssPropKey:I,bkResizeLayoutRef:k,resizeProxyRef:T,resizeMaskRef:L,asideRef:N,triggerStyle:S,asideStyle:M,handleMousedown:B,setCollapse:oe}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(Dn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Si,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const u3=Ge(p8),b8={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var y8=a.defineComponent({name:"Timeline",props:b8,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(u=>{var f;d.push({tag:u.tag,content:u.content,type:u.type,size:u.size,color:u.color,icon:u.icon,filled:u.filled,border:(f=u.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=i=>{const{icon:s}=i;return s?typeof s=="object"||typeof s=="function":!1},t=i=>{const s="bk-timeline",o=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,d=i.size?`${s}-${i.size}`:"",u=i.filled?`${s}-filled`:"",f=i.color&&o.includes(i.color)?`${s}-${i.color}`:"",m=e(i)?`${s}-custom`:"";return je({},`${s} ${c} ${d} ${f} ${u} ${m}`)},n=i=>this.$slots.content?a.createVNode("div",{class:"bk-timeline-content"},[this.$slots.content(i)]):a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null);return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,o,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:i.border?`2px solid ${i.color}`:"0px",borderRadius:i.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[typeof i.icon=="function"?a.createVNode(i.icon,null,null):i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(o=(s=this.$slots).default)==null?void 0:o.call(s,i))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?n(i):""])])})])}});const d3=Ge(y8),C8={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var v8=a.defineComponent({name:"Process",props:C8,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=je({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,u)=>{if(d===this.curProcess-1&&n(u))return a.createVNode(Js,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(u))return a.createVNode(Hn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(u))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(u.icon,null,null)]);if(s(d))return a.createVNode(na,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,u)=>a.createVNode("li",{onClick:()=>{this.jumpTo(u+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=u+1,current:n(d)&&u===this.curProcess-1,error:i(d)&&u===this.curProcess-1}},[d[this.displayKey],c(u,d)]))])])}});const f3=Ge(v8),fa="bk-upload";var fi=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(fi||{}),Ua=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Ua||{});const h3=[fi.BUTTON,fi.DRAGGABLE,fi.PICTURE];var hi={theme:{type:String,default:"draggable",validator:e=>!e||h3.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${h3.join(" | ")}\u3011`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function g3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var w8=a.defineComponent({name:"UploadList",props:{theme:hi.theme,disabled:hi.disabled,files:hi.files,multiple:hi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${fa}-list`,d=a.computed(()=>i.value===fi.PICTURE),u=a.computed(()=>d.value&&!o.value),f=a.computed(()=>je({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(N){const C=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**I).toFixed(2)}${C[I]}`}function p(N,C){n("remove",N,C)}function y(N,C){n("retry",N,C)}const b=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},g3(N=e.files.map(C=>{const I=je({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):v(C)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(Rr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(xr,{class:"action-icon",onClick:C=>p(N,C)},null)])])],k=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},g3(N=e.files.map(C=>{const I=je({[`${c}__item`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):L(C)])}))?N:{default:()=>[N]})},T=N=>{var j;const C=(j=N==null?void 0:N.raw)==null?void 0:j.type,[I]=(C==null?void 0:C.split("/"))||"";let S={text:zr,image:lc,application:zr,video:mc,audio:qo}[I]||zr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(C)&&(S=$o),a.h(S,{class:`${c}__item-file-icon`})},L=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):T(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(na,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(Rr,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[N.status==="fail"&&a.createVNode(cc,{class:`${c}__item-retry-icon`,onClick:C=>y(N,C)},null),a.createVNode(xr,{class:`${c}__item-del-icon`,onClick:C=>p(N,C)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[u.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:f.value},[d.value?b():k(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),m3=a.defineComponent({name:"UploadTrigger",props:{theme:hi.theme,disabled:hi.disabled,multiple:hi.multiple,accept:hi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),u=`${fa}-trigger`,f=a.computed(()=>i.value===fi.BUTTON),m=a.computed(()=>i.value===fi.DRAGGABLE),p=a.computed(()=>i.value===fi.PICTURE),y=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),v=a.ref(null),k=a.computed(()=>{var G,B,ie;return je({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:y.value,[`${u}--has-file`]:(G=o.value)!=null?G:!1,[`${u}--${(B=o.value)==null?void 0:B.status}`]:(ie=o.value)!=null?ie:!1,[`${u}--dragover`]:M.value,[`${u}--disabled`]:s.value})}),T=()=>{v.value.value=null,v.value.click()},L=G=>{const{files:B}=G.target;n("change",Array.from(B))},N=()=>{e.disabled||T()},C=G=>{G.defaultPrevented||G.target!==G.currentTarget||((G.code==="Enter"||G.code==="Space")&&T(),G.preventDefault())};function I(G,B){n("remove",G,B),B.stopPropagation(),B.preventDefault()}const M=a.ref(!1),S=()=>{const G=ve=>{if(s.value)return;ve.preventDefault(),M.value=!1;const Ie=Array.from(ve.dataTransfer.files);if(!b.value){n("change",Ie);return}const me=Ie.filter(ge=>{const{type:$,name:U}=ge,V=U.includes(".")?`.${U.split(".").pop()}`:"",J=$.replace(/\/.*$/,"");return b.value.split(",").map(re=>re.trim()).filter(re=>re).some(re=>re.startsWith(".")?V===re:/\/\*$/.test(re)?J===re.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(re)?$===re:!1)});n("change",me)},B=ve=>{ve.preventDefault(),M.value=!0},ie=()=>{M.value=!1},oe=je({[`${u}__draggable`]:!0});return a.createVNode("div",{class:oe,onDrop:G,onDragover:B,onDragleave:ie},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Zs,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${u}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},z=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?O(e.file):j()]),j=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Fs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=G=>[a.withDirectives(a.createVNode("img",{src:G.url,class:`${u}__picture-thumbnail`,alt:""},null),[[a.vShow,G.status!=="uploading"]]),a.createVNode(a.Fragment,null,[G.status==="uploading"&&a.createVNode(Rr,{class:`${u}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:G.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[a.createVNode(xr,{class:"action-icon",onClick:B=>I(G,B)},null)])])],W=()=>a.createVNode(Pt,{disabled:s.value},{default:()=>[a.createVNode(Zs,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),P=()=>{if(f.value)return W();if(m.value)return S();if(p.value)return z()};return()=>{var G;return a.createVNode("div",{class:k.value,tabindex:"0",onClick:N,onKeydown:C},[t.trigger?[t.trigger(),(G=t==null?void 0:t.default)==null?void 0:G.call(t)]:P(),a.createVNode("input",{ref:v,class:"bk-upload__input-file",tabindex:"-1",onChange:L,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),p3={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(L,N){var C=L[0],I=L[1],M=L[2],S=L[3];C+=(I&M|~I&S)+N[0]-680876936|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[1]-389564586|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[2]+606105819|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[3]-1044525330|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[4]-176418897|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[5]+1200080426|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[6]-1473231341|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[7]-45705983|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[8]+1770035416|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[9]-1958414417|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[10]-42063|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[11]-1990404162|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[12]+1804603682|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[13]-40341101|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[14]-1502002290|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[15]+1236535329|0,I=(I<<22|I>>>10)+M|0,C+=(I&S|M&~S)+N[1]-165796510|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[6]-1069501632|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[11]+643717713|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[0]-373897302|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[5]-701558691|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[10]+38016083|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[15]-660478335|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[4]-405537848|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[9]+568446438|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[14]-1019803690|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[3]-187363961|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[8]+1163531501|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[13]-1444681467|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[2]-51403784|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[7]+1735328473|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[12]-1926607734|0,I=(I<<20|I>>>12)+M|0,C+=(I^M^S)+N[5]-378558|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[8]-2022574463|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[11]+1839030562|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[14]-35309556|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[1]-1530992060|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[4]+1272893353|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[7]-155497632|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[10]-1094730640|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[13]+681279174|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[0]-358537222|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[3]-722521979|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[6]+76029189|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[9]-640364487|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[12]-421815835|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[15]+530742520|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[2]-995338651|0,I=(I<<23|I>>>9)+M|0,C+=(M^(I|~S))+N[0]-198630844|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[7]+1126891415|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[14]-1416354905|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[5]-57434055|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[12]+1700485571|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[3]-1894986606|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[10]-1051523|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[1]-2054922799|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[8]+1873313359|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[15]-30611744|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[6]-1560198380|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[13]+1309151649|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[4]-145523070|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[11]-1120210379|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[2]+718787259|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[9]-343485551|0,I=(I<<21|I>>>11)+M|0,L[0]=C+L[0]|0,L[1]=I+L[1]|0,L[2]=M+L[2]|0,L[3]=S+L[3]|0}function o(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L.charCodeAt(C)+(L.charCodeAt(C+1)<<8)+(L.charCodeAt(C+2)<<16)+(L.charCodeAt(C+3)<<24);return N}function c(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L[C]+(L[C+1]<<8)+(L[C+2]<<16)+(L[C+3]<<24);return N}function d(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,o(L.substring(I-64,I)));for(L=L.substring(I-64),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L.charCodeAt(I)<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function u(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,c(L.subarray(I-64,I)));for(L=I-64<N?L.subarray(I-64):new Uint8Array(0),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L[I]<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function f(L){var N="",C;for(C=0;C<4;C+=1)N+=i[L>>C*8+4&15]+i[L>>C*8&15];return N}function m(L){var N;for(N=0;N<L.length;N+=1)L[N]=f(L[N]);return L.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function L(N,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var I=this.byteLength,M=L(N,I),S=I,z,j,O,W;return C!==n&&(S=L(C,I)),M>S?new ArrayBuffer(0):(z=S-M,j=new ArrayBuffer(z),O=new Uint8Array(j),W=new Uint8Array(this,M,z),O.set(W),j)}}();function p(L){return/[\u0080-\uFFFF]/.test(L)&&(L=unescape(encodeURIComponent(L))),L}function y(L,N){var C=L.length,I=new ArrayBuffer(C),M=new Uint8Array(I),S;for(S=0;S<C;S+=1)M[S]=L.charCodeAt(S);return N?M:I}function b(L){return String.fromCharCode.apply(null,new Uint8Array(L))}function v(L,N,C){var I=new Uint8Array(L.byteLength+N.byteLength);return I.set(new Uint8Array(L)),I.set(new Uint8Array(N),L.byteLength),C?I:I.buffer}function k(L){var N=[],C=L.length,I;for(I=0;I<C-1;I+=2)N.push(parseInt(L.substr(I,2),16));return String.fromCharCode.apply(String,N)}function T(){this.reset()}return T.prototype.append=function(L){return this.appendBinary(p(L)),this},T.prototype.appendBinary=function(L){this._buff+=L,this._length+=L.length;var N=this._buff.length,C;for(C=64;C<=N;C+=64)s(this._hash,o(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},T.prototype.end=function(L){var N=this._buff,C=N.length,I,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(I=0;I<C;I+=1)M[I>>2]|=N.charCodeAt(I)<<(I%4<<3);return this._finish(M,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(L){return this._buff=L.buff,this._length=L.length,this._hash=L.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(L,N){var C=N,I,M,S;if(L[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,L),C=0;C<16;C+=1)L[C]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),M=parseInt(I[2],16),S=parseInt(I[1],16)||0,L[14]=M,L[15]=S,s(this._hash,L)},T.hash=function(L,N){return T.hashBinary(p(L),N)},T.hashBinary=function(L,N){var C=d(L),I=m(C);return N?k(I):I},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(L){var N=v(this._buff.buffer,L,!0),C=N.length,I;for(this._length+=L.byteLength,I=64;I<=C;I+=64)s(this._hash,c(N.subarray(I-64,I)));return this._buff=I-64<C?new Uint8Array(N.buffer.slice(I-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(L){var N=this._buff,C=N.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M,S;for(M=0;M<C;M+=1)I[M>>2]|=N[M]<<(M%4<<3);return this._finish(I,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var L=T.prototype.getState.call(this);return L.buff=b(L.buff),L},T.ArrayBuffer.prototype.setState=function(L){return L.buff=y(L.buff,!0),T.prototype.setState.call(this,L)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(L,N){var C=u(new Uint8Array(L)),I=m(C);return N?k(I):I},T})})(p3);var b3=p3.exports;function yu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const M8=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,u]of Object.entries(c))Array.isArray(u)?i.append(d,...u):i.append(d,u)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(yu(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))Af(c)||t.setRequestHeader(o,String(c));return t.send(i),t},y3=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,I8=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await L8(n,t),o=[];N8(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(yu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},N8=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,f)=>{const m=c*o,p=Math.min(t.size,m+o),y=new FormData;if(e.data){let k=e.data;Array.isArray(k)||(k=[k]),k.forEach(T=>{for(const[L,N]of Object.entries(T))Array.isArray(N)?y.append(L,...N):y.append(L,N)})}if(e.formDataAttributes){let k=e.formDataAttributes;Array.isArray(k)||(k=[k]),k.forEach(T=>{Array.isArray(T.value)?y.append(T.name,...T.value):y.append(T.name,T.value)})}y.append("file",y3.call(t,m,p)),y.append("name",t.name),y.append("total",n.toString()),y.append("index",c.toString()),y.append("size",t.size.toString()),y.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const k=yu(b);b.status<200||b.status>=300?(f(k),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},b.upload.addEventListener("progress",k=>{const T=k;e.onProgress(T,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(k=>{const T=k.name,L=k.value;b.setRequestHeader(T,L)});else{const k=e.header.name,T=e.header.value;b.setRequestHeader(k,T)}const v=e.headers||{};if(v instanceof Headers)v.forEach((k,T)=>b.setRequestHeader(T,k));else for(const[k,T]of Object.entries(v))Af(T)||b.setRequestHeader(k,String(T));b.send(y)});s.push(d)}},L8=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new b3.ArrayBuffer,d=new FileReader;function u(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(y3.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<s)u();else{const m=c.end(),p=new b3;p.append(m),p.append(e.name);const y=p.end();n(y)}},d.onerror=()=>{i(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function C3(e){return Date.now()+e}var k8=(e,t)=>{const n=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),i=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),s=a.ref([]);function o(y){return s.value.find(b=>b.uid===y.uid)}let c=0;function d(y){var T;c+=1,y.uid=C3(c);const b={uid:y.uid,name:y.name,status:Ua.NEW,size:y.size,raw:y},v=y.type.startsWith("image/");let k=null;if(v){try{b.url=window.URL.createObjectURL(y)}catch(L){console.error(L)}b.isPic=!0}return e.validateName&&!((T=e.validateName)!=null&&T.test(b.name))&&(b.status=Ua.FAIL,b.statusText="invalid filename",k=new Error(b.statusText)),v&&y.size>n.value*1024**2&&(b.status=Ua.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),!v&&y.size>i.value*1024**2&&(b.status=Ua.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),s.value.push(b),k}async function u(y){var k;const b=y instanceof File?o(y):y,v=T=>{var L;t.onRemove(T,s.value),s.value.splice(s.value.indexOf(b),1),(L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url)};e.beforeRemove?await((k=e.beforeRemove)==null?void 0:k.call(e,b,s.value))!==!1&&v(b):v(b)}async function f(y,b,v){const k=o(b);!k||(k.status="fail",k.statusText=y.message,k.response=v)}async function m(y,b){const v=o(b);!v||(v.status="success",v.response=y)}async function p(y,b){const v=o(b);!v||(v.status="uploading",v.percentage=Math.round(y.percent))}return a.watch(()=>e.files,y=>{s.value=y.map(b=>{var v,k;return c+=1,Se(Z({},b),{uid:(v=b.uid)!=null?v:C3(c),status:(k=b.status)!=null?k:Ua.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:f,handleSuccess:m,handleProgress:p}},T8=a.defineComponent({name:"Upload",props:hi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===fi.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var M;return je({[fa]:!0,[`${fa}--${e.theme}`]:!0,[`${fa}--disabled`]:e.disabled,[`${fa}--single-picture`]:c.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),u={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(M,S){I(M),n("delete",M,S)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:v,handleError:k}=k8(e,{onRemove:f});function T(M){if(!M.length)return;if(e.limit&&m.value.length+M.length>e.limit){n("exceed",M,m.value);return}let S=M;(!e.multiple||e.limit===1)&&(S=M.slice(0,1));for(const z of S){const j=z,O=p(j);if(O){n("error",j,m.value,O);return}e.autoUpload&&N(j,S)}}function L(M){C(M.raw)}async function N(M,S){var j;if(!e.beforeUpload)return C(M,S);let z;try{z=await((j=e.beforeUpload)==null?void 0:j.call(e,M))}catch{z=!1}if(z===!1){y(M);return}C(M,S)}function C(M,S){const{headers:z,header:j,data:O,formDataAttributes:W,method:P,withCredentials:G,name:B,url:ie,sliceUrl:oe,mergeUrl:ve,chunkSize:Ie,customRequest:me}=e,{uid:ge}=M,$={headers:z,header:j,withCredentials:G,file:M,data:O,formDataAttributes:W,method:P,filename:B,action:ie,sliceUrl:oe,mergeUrl:ve,chunkSize:Ie,onProgress:J=>{b(J,M),n("progress",J,M,m.value)},onSuccess:J=>{var K;const re=J;if((K=e==null?void 0:e.handleResCode)!=null&&K.call(e,re))v(J,M),n("success",J,M,m.value);else{const X=new Error((re==null?void 0:re.message)||"unknow error");k(X,M,J),n("error",M,m.value,X)}delete s.value[ge]},onError:J=>{k(J,M),n("error",M,m.value,J),delete s.value[ge]},onComplete:()=>{S&&S.indexOf(M)===S.length-1&&n("done",m.value)}};let U=e.sliceUpload?I8:M8;me&&(U=me);const V=U($);s.value[ge]=V,V instanceof Promise&&V.then($.onSuccess,$.onError)}function I(M){let S=s.value;M&&(S={[M.uid]:s.value[M.uid]}),Object.keys(S).forEach(z=>{if(S[z]instanceof XMLHttpRequest){const j=S[z];j==null||j.abort()}delete s.value[z]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),i({handleRemove:y,handleRetry:L}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(m3,a.mergeProps(u,{onChange:T}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${fa}__tip`},[e.tip]),a.createVNode(w8,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y,onRetry:L},{innerTrigger:M=>o.value&&a.createVNode(m3,a.mergeProps(u,{file:M,onChange:T,onRemove:y}),t),file:t.file})])}});const v3=Ge(T8);function Wi(){}Wi.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,f=1,m=d+u,p=[{newPos:-1,components:[]}],y=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&y+1>=u)return c([{value:this.join(n),count:n.length}]);function b(){for(var k=-1*f;k<=f;k+=2){var T=void 0,L=p[k-1],N=p[k+1],C=(N?N.newPos:0)-k;L&&(p[k-1]=void 0);var I=L&&L.newPos+1<d,M=N&&0<=C&&C<u;if(!I&&!M){p[k]=void 0;continue}if(!I||M&&L.newPos<N.newPos?(T=x8(N),o.pushComponent(T.components,void 0,!0)):(T=L,T.newPos++,o.pushComponent(T.components,!0,void 0)),C=o.extractCommon(T,n,t,k),T.newPos+1>=d&&C+1>=u)return c(S8(o,T.components,n,t,o.useLongestToken));p[k]=T}f++}if(s)(function k(){setTimeout(function(){if(f>m)return s();b()||k()},0)})();else for(;f<=m;){var v=b();if(v)return v}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,u=d-s,f=0;d+1<o&&u+1<c&&this.equals(n[d+1],i[u+1]);)d++,u++,f++;return f&&t.components.push({count:f}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function S8(e,t,n,i,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(u,u+f.count)),u+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&s){var m=n.slice(d,d+f.count);m=m.map(function(b,v){var k=i[u+v];return k.length>b.length?k:b}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}var y=t[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(t[c-2].value+=y.value,t.pop()),t}function x8(e){return{newPos:e.newPos,components:e.components.slice(0)}}var w3=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,M3=/\S/,I3=new Wi;I3.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!M3.test(e)&&!M3.test(t)},I3.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&w3.test(t[n])&&w3.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Cu=new Wi;Cu.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function D8(e,t,n){return Cu.diff(e,t,n)}var j8=new Wi;j8.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var z8=new Wi;z8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Tl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tl=function(t){return typeof t}:Tl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function vu(e){return O8(e)||A8(e)||P8(e)||E8()}function O8(e){if(Array.isArray(e))return wu(e)}function A8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function P8(e,t){if(!!e){if(typeof e=="string")return wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(e,t)}}function wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function E8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
63
|
+
`,j={d:z,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:M},O={d:z,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&y||0,"fill-opacity":"0",class:`process-circle-path bk-${u}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",j,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},i5=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:u,textInside:f,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},y={width:`${i}%`,background:c,animationDuration:"3s"},b=(v=!0)=>(u||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function uh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var a5=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def(zs.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Se(Z({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(i5,t,uh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(n5,t,uh(e)?e:{default:()=>[e]}));const i={class:je({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Rr=Ge(a5),dh=Symbol("RadioGroup");function fh(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const hh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(dh,a0),s=!r0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},u=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("update:modelValue",p),n("change",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:u}},r5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var s5=a.defineComponent({name:"Radio",props:r5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=fh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=hh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=je({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:"bk-radio-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const l5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var o5=a.defineComponent({name:"RadioButton",props:l5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=fh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=hh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=je({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:"bk-radio-button-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const c5={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var u5=a.defineComponent({name:"RadioGroup",props:c5,emits:["change","update:modelValue"],setup(e,t){const n=xn(),i=[],s=d=>{i.push(d)},o=d=>{const u=i.indexOf(d);u>-1&&i.splice(u,1)},c=d=>{const u=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};return a.provide(dh,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const gh=Gt(s5,{Group:u5,Button:o5});var ll=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const u=d+1;t("chooseRate",u)},i=d=>{if(!e.editable)return;const u=d+1;t("changeHover",u)},s=d=>je({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,u)=>a.createVNode("svg",{class:s(u),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:()=>i(u)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),d5=a.defineComponent({name:"Rate",components:{star:ll},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=je({"bk-rate":!0}),u={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(u.width+3)*p,b=u.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(ll,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(ll,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(ll,a.mergeProps({rate:0,editable:!1},m),null)]])}});const mh=Ge(d5);var f5=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),y=a.ref(0),b=a.ref(0);let v;const k=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),T=a.computed(()=>({width:`${p.value*k.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),L=a.computed(()=>({width:`${p.value}px`,height:`${y.value}px`})),N=B=>{let ie=B;B>=k.value.length&&(ie=0),B<0&&(ie=k.value.length-1),m.value=ie,t("index-change",ie)},C=B=>{!B||window.open(B,"_blank")},I=B=>["bk-swiper-img",{"bk-swiper-link":B.link},B.class],M=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),S=B=>({"bk-current-index":m.value===B}),z=()=>{i.value&&(b.value=window.setTimeout(()=>{N(m.value+1),z()},s.value))},j=()=>{window.clearTimeout(b.value)},O=()=>{var ie;const B=(ie=f.value)==null?void 0:ie.parentElement;!B||!window.ResizeObserver||(v=new ResizeObserver(()=>{G()}),v.observe(B))},W=()=>{var B;(B=v.disconnect)==null||B.call(v)},P=B=>{if(B===void 0)return{height:0,width:0};const ie=getComputedStyle(B),oe=B.clientWidth-parseFloat(ie.paddingTop)-parseFloat(ie.paddingBottom);return{height:B.clientHeight-parseFloat(ie.paddingLeft)-parseFloat(ie.paddingRight),width:oe}},G=()=>{var ie;const B=P((ie=f.value)==null?void 0:ie.parentElement);p.value=+u.value>0?u.value:B.width,y.value=+d.value>0?d.value:B.height};return a.watch([d,u],G),a.onMounted(()=>{G(),z(),O()}),a.onBeforeUnmount(()=>{j(),W()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:L.value},[a.createVNode("hgroup",{style:T.value,class:"bk-transition bk-swiper-main"},[k.value.map(B=>{var ie,oe;return a.createVNode("h3",{class:"bk-swiper-card",style:L.value},[(oe=(ie=n.default)==null?void 0:ie.call(n,B))!=null?oe:a.createVNode("span",{class:I(B),style:M(B),onClick:()=>C(B.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[k.value.map((B,ie)=>a.createVNode("li",{class:S(ie),onMouseover:()=>N(ie)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>N(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>N(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const ph=Ge(f5),ol=Symbol("BkSelect"),bh=Symbol("BkOptionGroup");function yh(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Bc(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function h5(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function g5(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},f=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=F4(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function m5(e,t){const n=h5(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Fa(e=""){return e&&String(e).trim().toLowerCase()}var cl=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(ol,null),c=a.inject(bh,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(v=>v.value===s.value)}),u=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},y=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Se(Z({},a.toRefs(n)),{selected:d,multiple:u,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:y})},render(){var t,n,i;const e=je({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(na,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),p5=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(ol,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:u}=Bc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(bh,a.reactive(Se(Z({},a.toRefs(e)),{register:d,unregister:u,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Se(Z({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,s;const e=je({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=je({"bk-option-group-label":!0,collapsible:this.collapsible}),n=je({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Vs,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const b5={onContentScroll:Function},y5=Z({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Ve("F-scroll-x")),scrollYName:g.string.def(Ve("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},b5);var C5=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,u,f,m,p,y,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:y,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,u,f,m,p,y,b,v,k,T,L,N;return a.h(n,{class:e.className},[(f=(u=(d=t.slots).beforeContent)==null?void 0:u.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(y=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?y:""]),[[o,c]]),(k=(v=(b=t.slots).afterContent)==null?void 0:v.call(b))!=null?k:"",(N=(L=(T=t.slots).afterSection)==null?void 0:L.call(T))!=null?N:""])}}};function Ch(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function vh(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:u,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:y}=i;let b=0,v=0,k=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(y/e)+b,k=o%e),typeof e=="function"){const T=Ch(u,o,f,e);b=T.startIndex>0?T.startIndex:0,k=T.diffHeight,v=Ch(u,y,f,e).startIndex+b+1}if(o!==d||b!==m||v!==p){const T=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,k,c,{bottom:T>=0?T:0})}}function v5(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const y=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,y,y,b,{bottom:v>=0?v:0});return}const{startIndex:d,endIndex:u,groupItemCount:f,count:m,scrollTop:p}=o;vh(i,s,{scrollTop:p,startIndex:d,endIndex:u,groupItemCount:f,count:m},t,e)}const wh=(e=60)=>ot.exports.throttle((t,n,i)=>v5(t,n,i),e),w5=(e,t,n,i=60)=>{Reflect.apply(wh(i),globalThis,[e,t,n])};var M5={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{w5(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",wh)}}},I5=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:M5},props:y5,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=z=>typeof z=="string"?[z]:typeof z=="object"&&!Array.isArray(z)?[z]:z;if(!e.enabled){const{rendAsTag:z}=C5(e,t);return z}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(z,j,O,W,P,G,B)=>{c.startIndex=j,c.endIndex=O,c.scrollTop=W,c.translateY=P,c.translateX=G,c.pos=B,t.emit("content-scroll",[z,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),y()})}),a.watch(()=>e.list,()=>{u(),y()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{u(),y()});const u=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=z=>{if(f.value=Math.ceil((z||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let W=0;W<f.value;W++){const P=e.lineHeight.call(this,W,z.slice(W*e.groupItemCount,e.groupItemCount));O+=typeof P=="number"?P:0}m.value=O}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},y=(z=!0)=>{var O;const j=(O=o.value)==null?void 0:O.parentNode;vh(e.lineHeight,d,c,j,null),z&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((z,j)=>Se(Z({},z),{$index:j}))),v=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>Z({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?k.value:{})),L=a.computed(()=>{const z=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:z?"none":"block"}}),N=a.computed(()=>[Ve("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ve("virtual-content"):""]),C=a.computed(()=>[e.scrollPosition==="content"?Ve("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),M={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},S=()=>{u(),y()};return t.expose({reset:S}),()=>{var z,j,O,W,P,G,B,ie,oe,ve,Ie,me;return a.h(n||"div",{ref:o,class:N.value,style:T.value},[(O=(j=(z=t.slots).beforeContent)==null?void 0:j.call(z))!=null?O:"",a.withDirectives(a.h(i||"div",{class:C.value,style:Z(Z({},k.value),e.contentStyle)},[(G=(P=(W=t.slots).default)==null?void 0:P.call(W,{data:v.value}))!=null?G:""]),[[I,M]]),(oe=(ie=(B=t.slots).afterContent)==null?void 0:ie.call(B))!=null?oe:"",a.h("div",{class:[Ve("virtual-section")],style:L.value}),(me=(Ie=(ve=t.slots).afterSection)==null?void 0:Ie.call(ve))!=null?me:""])}}});const _r=Ge(I5);var Fc;(function(e){e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke"})(Fc||(Fc={}));var N5=a.defineComponent({name:"Tag",props:{theme:As(),closable:g.bool.def(!1),type:Oe("tagStorkeType",{}).def(Fc.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>je({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Hn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const ul=Ge(N5);var L5=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:As(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(ol,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),u=a.ref(),f=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{k()},{flush:"post"});const m=T=>{t("remove",T)},p=()=>{var T;(T=u.value)==null||T.focus()},y=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"Enter":{t("enter",T.target.value,T);break}}},v=T=>{const L=[...n.$el.querySelectorAll(".bk-tag")];return typeof T=="number"?L[T]:L},k=()=>{!o.value||(f.value=null,setTimeout(()=>{const T=v(),L=T.findIndex((N,C)=>C?T[C-1].offsetTop!==N.offsetTop:!1);f.value=L>0?L:null}))};return{select:i,overflowTagIndex:f,value:d,inputRef:u,handleRemoveTag:m,focus:p,handleInput:y,handleKeydown:b}},render(){var i,s,o,c,d,u,f;const e=je({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=je({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(ul,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var y;return[(y=this.select)==null?void 0:y.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(ul,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),k5=a.defineComponent({name:"Select",directives:{clickoutside:jn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Go.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:As(),behavior:t0(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:u,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:y,multipleMode:b,allowCreate:v,customContent:k,showSelectedIcon:T,inputSearch:L,enableVirtualRender:N,showSelectAll:C,scrollHeight:I,list:M,displayKey:S,collapseTags:z,autoHeight:j,popoverOptions:O,allowEmptyValues:W,autoFocus:P}=a.toRefs(e),G=xn(),B=a.ref(),ie=a.ref(),oe=a.ref(),ve=a.ref(),Ie=a.ref(),me=a.ref(),ge=a.ref(),$=a.ref(new Map),U=a.computed(()=>[...$.value.values()]),V=a.ref(new Map),J=a.ref([]),re=a.computed(()=>J.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),K=a.ref();a.watch(n,()=>{var Le;Ql(),e.withValidate&&((Le=G==null?void 0:G.validate)==null||Le.call(G,"blur"))},{deep:!0}),a.watch(J,()=>{var Le;(Le=ge.value)==null||Le.updatePopover(null,te.value)});const X=a.computed(()=>D.value?M.value:M.value.filter(Le=>{var ze;return(ze=Fa(String(Le[S.value])))==null?void 0:ze.includes(Fa(mi.value))})),de=a.computed(()=>i.value||d.value),we=a.computed(()=>J.value.map(Le=>{var ze,Qe;return((Qe=(ze=$.value)==null?void 0:ze.get(Le.value))==null?void 0:Qe.label)||Le.label})),q=a.computed(()=>{const Le=U.value.reduce((ze,Qe)=>(Qe.disabled||ze.push(Qe.value),ze),[]);return Le.length<=J.value.length&&Le.every(ze=>J.value.some(Qe=>Qe.value===ze))}),H=a.computed(()=>!!V.value.size),R=a.computed(()=>!U.value.length),ae=a.computed(()=>U.value.length&&U.value.every(Le=>!Le.visible)),D=a.computed(()=>s.value&&typeof c.value=="function"),_=a.computed(()=>!(as.value||R.value||ae.value)||k.value),Q=a.computed(()=>o.value&&C.value&&(!mi.value||!s.value)),se=a.computed(()=>I.value-12-(Q.value?32:0)),ue=a.computed(()=>as.value?u.value:R.value?f.value:ae.value?m.value:""),be=a.computed(()=>j.value?z.value&&!ct.value:z.value),te=a.computed(()=>ot.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ft.value,arrow:!1,placement:"bottom-start",isShow:ct.value,reference:Ie.value,offset:6,popoverDelay:0},O.value)),{register:le,unregister:he}=Bc($),{register:ke,unregister:Re}=Bc(V),{isHover:_e,setHover:et,cancelHover:rn}=yh(),tt=a.ref(!1),rt=()=>{tt.value||(tt.value=!0,t("focus"))},Cn=()=>{!tt.value||(tt.value=!1,t("blur"))},{popperWidth:ft,isPopoverShow:ct,hidePopover:Fe,showPopover:zt,togglePopover:ma}=g5({popoverMinWidth:p.value},ie);a.watch(ct,()=>{t("toggle",ct.value)});const ns=a.computed(()=>(s.value&&L.value||v.value)&&ct.value);a.watch(ct,Le=>{Le?setTimeout(()=>{pa(),qa()},0):mi.value=""});const qa=()=>{var Qe;const Le=J.value[0],ze=$.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?K.value=Le==null?void 0:Le.value:K.value=(Qe=U.value.find(Xn=>!Xn.disabled&&Xn.visible))==null?void 0:Qe.value},is=Le=>{!s.value||U.value.forEach(ze=>{var Qe;ze.visible=(Qe=Fa(String(ze.label)))==null?void 0:Qe.includes(Fa(Le))})},{searchKey:mi,searchLoading:as}=m5(D.value?c.value:is,qa),Kn=Le=>{Le!==n.value&&(t("update:modelValue",Le,n.value),t("change",Le,n.value))},El=()=>{de.value||(rt(),ma())},Vl=Le=>{!s.value||(mi.value=Le)},Bu=(Le,ze)=>{const Qe=String(Le);!v.value||!Qe||s.value&&U.value.find(Hi=>Fa(String(Hi.label))===Fa(Qe))||$.value.get(Qe)||(ze.stopPropagation(),o.value?(J.value.push({value:Qe,label:Qe}),Kn(J.value.map(Hi=>Hi.value))):(J.value=[{value:Qe,label:Qe}],Kn(Qe),Fe()),mi.value="")},rs=Le=>{if(!(de.value||!Le)){if(o.value){const ze=J.value.findIndex(Qe=>Qe.value===Le.value);ze>-1?J.value.splice(ze,1):J.value.push({value:Le.value,label:Le.label||Le.value}),Kn(J.value.map(Qe=>Qe.value))}else J.value=[{label:Le.label||Le.value,value:Le.value}],Kn(Le.value),Fe();pa()}},pa=()=>{setTimeout(()=>{var Le,ze,Qe;!L.value&&!v.value?(Le=ve.value)==null||Le.focus():b.value==="tag"?(ze=Ie.value)==null||ze.focus():(Qe=B.value)==null||Qe.focus()},0)},Fu=Le=>{Le.stopPropagation(),J.value=[],Kn(o.value?[]:""),t("clear",o.value?[]:""),Fe()},Jl=()=>{K.value=""},Gu=()=>{q.value?J.value=[]:U.value.forEach(Le=>{Le.disabled||J.value.find(ze=>ze.value===Le.value)||J.value.push({value:Le.value,label:Le.label||Le.value})}),Kn(J.value.map(Le=>Le.value)),pa()},Zu=Le=>{const{scrollTop:ze,clientHeight:Qe,scrollHeight:Xn}=Le.target;ze+Qe===Xn&&t("scroll-end")},Yu=Le=>{if(de.value)return;const ze=J.value.findIndex(Qe=>Qe.value===Le);ze>-1&&(J.value.splice(ze,1),Kn(J.value.map(Qe=>Qe.value)))},ba=Le=>{var ze,Qe;return((Qe=(ze=$.value)==null?void 0:ze.get(Le))==null?void 0:Qe.label)||re.value[Le]||Le},Ql=()=>{Array.isArray(n.value)?J.value=[...n.value.map(Le=>({value:Le,label:ba(Le)}))]:!!n.value||W.value.includes(n.value)?J.value=[{value:n.value,label:ba(n.value)}]:J.value=[]},ya=Le=>{var Xn,Hi,Rl,ss;if(!((Xn=ie.value)!=null&&Xn.contains(Le.target))&&!((Hi=oe.value)!=null&&Hi.contains(Le.target))&&!k.value)return;const ze=U.value.filter(Xt=>!Xt.disabled&&Xt.visible),Qe=ze.findIndex(Xt=>Xt.value===K.value);if(!(!ze.length||Qe===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Xt=Qe>=ze.length-1?0:Qe+1;K.value=(Rl=ze[Xt])==null?void 0:Rl.value;break}case"ArrowUp":{Le.preventDefault();const Xt=Qe===0?ze.length-1:Qe-1;K.value=(ss=ze[Xt])==null?void 0:ss.value;break}case"Backspace":{if(!o.value||!J.value.length||mi.value.length||Le.target===ve.value)return;J.value.pop(),Kn(J.value.map(Xt=>Xt.value));break}case"Enter":{if(!ct.value)ct.value=!0;else{const Xt=$.value.get(K.value);rs(Xt)}break}}},Uu=({event:Le})=>{var Qe;const{target:ze}=Le;((Qe=ie.value)==null?void 0:Qe.contains(ze))||ie.value===ze||(Fe(),Cn())},$u=()=>{setTimeout(()=>{var Le,ze;N.value&&((ze=(Le=me.value)==null?void 0:Le.reset)==null||ze.call(Le))})};return a.provide(ol,a.reactive({multiple:o,selected:J,activeOptionValue:K,showSelectedIcon:T,register:le,unregister:he,registerGroup:ke,unregisterGroup:Re,handleOptionSelected:rs,handleGetLabelByValue:ba})),a.onMounted(()=>{Ql(),setTimeout(()=>{y.value&&zt(),P.value&&pa()}),p2(document,"keydown",ya)}),a.onBeforeMount(()=>{b2(document,"keydown",ya)}),{selected:J,isInput:ns,options:U,isDisabled:de,selectedLabel:we,isPopoverShow:ct,isHover:_e,popperWidth:ft,inputRef:B,triggerRef:ie,contentRef:oe,searchRef:ve,selectTagInputRef:Ie,virtualRenderRef:me,popoverRef:ge,searchLoading:as,isOptionsEmpty:R,isSearchEmpty:ae,isFocus:tt,isShowSelectContent:_,curContentText:ue,isGroup:H,searchKey:mi,isShowSelectAll:Q,virtualHeight:se,filterList:X,isCollapseTags:be,popoverConfig:te,focusInput:pa,setHover:et,cancelHover:rn,handleFocus:rt,handleBlur:Cn,handleTogglePopover:El,handleClear:Fu,hidePopover:Fe,showPopover:zt,handleToggleAll:Gu,handleOptionSelected:rs,handleClickOutside:Uu,handleScroll:Zu,handleDeleteTag:Yu,handleInputChange:Vl,handleInputEnter:Bu,handleKeydown:ya,handleSelectedAllOptionMouseEnter:Jl,handlePopoverShow:$u}},render(){const e=je({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(xi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(L5,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ia,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Wa,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(xi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(_r,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(u=>a.createVNode(cl,{key:u[this.idKey],value:u[this.idKey],label:u[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(cl,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(xi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Gc=Gt(k5,{Option:cl,Group:p5});function T5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:S5}=aa,Zc=Object.assign({},S5);Zc.width.default="400",Zc.height.default="100%";var x5=a.defineComponent({name:"Sideslider",components:{BkModal:aa,BkButton:Pt},props:Se(Z({},Zc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,u=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(aa,a.mergeProps(e,{maxHeight:u,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),T5(c)?c:{default:()=>[c]})}}});const Mh=Ge(x5);var Yc;(function(e){e.UNKNOWN="",e.ERROR="error",e.LOADING="loading"})(Yc||(Yc={}));const Ih={theme:g.theme().def(zs.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:Xf(),status:Oe("status",{}).def(Yc.UNKNOWN),lineType:qf(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var D5=a.defineComponent({name:"Steps",props:Ih,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const u=[];d.forEach(f=>{var m;typeof f=="string"?u.push(f):u.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...u)},s=d=>{Ih.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,f)=>{const m=await e.beforeChange(d);m?u(m):f(m)}),t("update:curStep",d),t("click",d))}catch(u){console.warn(u)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=je({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:y}=p;return y?Object.prototype.toString.call(y)==="[object Object]":typeof p=="string"},d=(p,y)=>(y.icon||(y.icon=p),!isNaN(y.icon)),u=p=>p.status==="loading",f=p=>p.status==="error",m=(p,y)=>o(p)&&this.status==="loading"||u(y)?a.createVNode(Js,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(y)?a.createVNode(Hn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(na,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,y)?p+1:a.createVNode(y.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,y)=>{var b,v,k;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(y)?"done":"",o(y)?"current":"",o(y)&&this.status==="error"?"isError":"",p.status&&o(y)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[(k=(v=(b=this.$slots)[y+1])==null?void 0:v.call(b))!=null?k:m(y,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Nh=Ge(D5);var j5=a.defineComponent({name:"Switcher",props:{theme:g.theme(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xn(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,y=!s.value,b=()=>{t("update:modelValue",p),t("change",y)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return i.value=!0,v.then(()=>{b()}).finally(()=>{i.value=!1});v&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&u(m)};return()=>a.createVNode("div",{class:d.value,onClick:u,tabindex:"0",onKeydown:f},[i.value?a.createVNode(uc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const Lh=Ge(j5);var dl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(dl||{}),kh=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(kh||{});const z5=["auto","highlight"],O5=["none","row","col","outer","horizontal"];var pn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(pn||{}),Et=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Et||{});const Ut=(...e)=>!0,A5={columnPick:Ut,columnFilter:Ut,columnSort:Ut,colFilterSave:Ut,rowClick:Ut,rowDblclick:Ut,rowExpand:Ut,select:Ut,selectAll:Ut,selectionChange:Ut,pageLimitChange:Ut,pageValueChange:Ut,settingChange:Ut,scrollBottom:Ut},He={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},oi={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data"},Uc=6,ci=42,fl={large:78,medium:60,small:42},P5=[{value:"small",label:"\u5C0F",height:fl.small},{value:"medium",label:"\u4E2D",height:fl.medium},{value:"large",label:"\u5927",height:fl.large}],Th="InitColumns";var kt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(kt||{});const E5=["asc","desc","null","custom"],Sh=20;var xh=(e=>(e.CURRENT="current",e.ALL="all",e))(xh||{});const $c=Oe("showOverflowTooltipMode",{default:"auto"}),V5=Oe("columnType",{default:"none"}),J5=Oe("full",{default:"full"});var Dh=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e))(Dh||{});const jh=Oe("columnSize",{default:"small"}),Q5=Oe("columnSize",{}),zh=Oe("sortScope",{}).def("current"),Oh={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(void 0),type:V5,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,Q5]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:zh,value:g.string.def(kt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:J5,filterScope:zh,btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},R5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(Oh)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:Oe("columnPick",{}).def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ci*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ci),headHeight:g.number.def(ci),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ci),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(Oe("boderType",{})),g.string]).def([dl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh,sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(He.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(z5).def(kh.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var Ah=a.defineComponent({name:"TableColumn",props:Se(Z({},Oh),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(Th,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Se(Z({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const Ph=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Se(Z(Z({},t),e),{current:n})}return t}return{}};var _5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=Ph(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),u=(b,v)=>{typeof v=="function"&&b.sort(v)},f=(b,v)=>{if(typeof v=="function"){const k=b.filter((T,L)=>v(T,L,e.data));b.splice(0,b.length,...k)}},m=(b,v,k)=>{var N;const T=t.slice(),{sortScope:L}=(N=k==null?void 0:k.sort)!=null?N:{};L===xh.ALL&&u(T,v),d.splice(0,d.length,...T.slice(n.value,i.value)),f(d,b),u(d,v)},p=(b,v,k)=>{s=Ph(e.pagination,s),y(),c(),m(b,v,k)},y=()=>{!e.pagination||(o.value=e.remotePagination?s:Se(Z({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},W5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:ii.Normal,mode:Ar.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,u;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:v}=i();return(u=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?u:a.createVNode(xi,{loading:f,size:m,mode:p,title:y,inline:b,indicator:v},null)}}}};function H5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var B5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Gc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},H5(c=e.limitList.map((d,u)=>a.createVNode(cl,{value:d,label:`${d}`,key:`${u}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const la=5;var F5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=la+2){for(let T=2;T<=e.totalPageNum-1;T++)b.push(T);return b}const v=Math.floor(la/2);e.totalPageNum>la&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const k=Math.min(e.totalPageNum-la,Math.max(2,t.value-v));for(let T=k;T<k+la;T++)b.push(T);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},u=()=>{i.value||(t.value=t.value+1)},f=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-la)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+la)};return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Si,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Ws,null,null)]),c.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>f(k)},[k])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Ws,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:u},[e.nextText||a.createVNode(Dn,null,null)])])}},G5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const T=[];for(let L=1;L<=e.totalPageNum;L++)T.push(L);return T});a.watch(()=>e.modelValue,T=>{a.nextTick(()=>{T>=1&&T<=e.totalPageNum?i.value=T:T<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,T=>{i.value>T&&(i.value=T)})});const u=()=>{s.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},y=T=>{const L=T.target,N=Number(L.textContent);!N||N<1||N>e.totalPageNum||N===i.value||(c=N)},b=T=>{["Enter","NumpadEnter"].includes(T.code)&&(T.preventDefault(),p())},v=T=>{c=T,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:u},[a.createVNode(Si,null,null)]),a.createVNode(mn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:y,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(T=>a.createVNode("div",{class:{item:!0,"is-actived":T===i.value},key:T,onClick:()=>v(T)},[T]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Dn,null,null)])])}},Z5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const Y5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var U5=a.defineComponent({name:"Pagination",props:Y5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=Z5(),{current:c,render:d}=F5(),{current:u,render:f}=G5(),{limit:m,render:p}=B5();return a.watch([i,m,s],([y,b])=>{const v=Math.ceil(y/b);n.value=v<1?1:v},{immediate:!0}),a.watch(c,y=>{t.emit("update:modelValue",y),t.emit("change",y)}),a.watch(u,y=>{!e.small||(t.emit("update:modelValue",y),t.emit("change",y))}),a.watch(m,y=>{t.emit("limitChange",y)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=je({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Kc=Ge(U5),St=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>St(e,i,n)).filter(i=>i!==void 0).at(0)},Xc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],$5=e=>Eh(e,"auto"),Eh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},K5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>O5.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Wr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},qc=(e,t,n=Sh,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],u=(m,p)=>{const{minWidth:y=void 0}=m;if(y===void 0)return p;let b=p;return/^\d+\.?\d*$/.test(`${y}`)&&(b=Number(y)),/^\d+\.?\d*%$/.test(`${y}`)&&(b=Number(y)*o/100),/^\d+\.?\d*px$/i.test(`${y}`)&&(b=Number(`${y}`.replace(/px/i,""))),b},f=(m,p,y=!0)=>{const b=u(m,p),v=p<b?b:p;Object.assign(m,{calcWidth:v}),y&&(c=c-v,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Wr(m,["resizeWidth","width"]));let v=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const k=Number(b.replace("px",""));f(m,k),v=!1}if(/^\d+\.?\d*%$/.test(b)){let k=n;if(c>0){const T=Number(b.replace("%",""));k=c*T/100}f(m,k),v=!1}v&&d.push(p)}}),d.length>0){let m=n;c>0&&d.forEach((p,y)=>{m=c/(d.length-y),f(t[p],m,!1);const{calcWidth:b}=t[p];c=c-b})}},Vh=(e,t,n=60,i=!1)=>{const s=ot.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},eu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},Z({},i))},hl=(e,t,n)=>n.type==="index"?e[He.ROW_INDEX]+1:ot.exports.get(e,t),Hr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Hr(Reflect.apply(e,globalThis,t),t):[],X5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===He.ROW_INDEX?`__ROW_INDEX_${n}`:ot.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Li.v4(),q5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},eb=(e,t)=>{function n(o,c){const u=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return u.font=c,u.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",u=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${u}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},Jh=(e,t,n)=>(s=>e.some(o=>o.field===St(s,["field","type"],[s])))(t)&&n.length&&!n.includes(St(t,["field","type"],[t])),Qh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,Rh=(e,t,n,i)=>{const s=Qh(e,t,n,i,"colspan"),o=Qh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},_h=(e,t)=>{var c,d;const n=e.field,i=u=>hl(u,n,e),s=(u,f)=>{const m=i(u)||"",p=i(f)||"";return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===kt.NULL?()=>!0:(u,f)=>o(u,f)*(t===kt.DESC?-1:1)},Wh=e=>{const t={[kt.NULL]:0,[kt.ASC]:1,[kt.DESC]:2};return e===void 0?kt.NULL:Object.keys(t)[(t[e]+1)%3]},Hh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:kt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,Z({value:"custom"},e);return e}return null},gl=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var Bh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:$c})]).def(void 0),title:g.string.def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const u=()=>{let m=!0,p=n.value.innerText,y="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,y=o.mode||"auto"),{disabled:m,content:p,mode:y}},f=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!Aa(n.value))return;const{content:m,mode:p}=u();if(p==="auto"){const y=eb(n.value,m),b=n.value.clientWidth,v=window.getComputedStyle(n.value),k=["padding-left","padding-right"].reduce((L,N)=>L+Number(v.getPropertyValue(N).replace("px","")),0),T=b-k;i.value=y>T}if(p==="static"&&(i.value=!0),i.value){const y=a.ref(u());d===null&&(d=Vc(n.value,y))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=u();m||(f(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=Vh(n.value,()=>{f()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:["cell",e.column.type],ref:n,title:e.title},[(m=t.default)==null?void 0:m.call(t)])}}}),tu=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),tb=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Us,{scene:"part",type:t.value,description:e.emptyText},null)}});function nb(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var ib=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ci)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>je({[Ve("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=je({[Ve("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${Ve("table-head-filter")}`,u=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(M=>Se(Z({},M),{checked:i.checked.includes(M.value)}))}),f=(I,M="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),M),m=(I,M)=>{const{match:S}=n.filter,z=hl(M,St(n,"field",[n,M]),n);return S==="full"&&I.includes(z),I.some(j=>f(j,"img").test(z))},p=typeof n.filter.filterFn=="function"?(I,M,S,z)=>n.filter.filterFn(I,M,e.column,S,z):(I,M)=>I.length?m(I,M):!0,y=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:M}=k(T,"\u786E\u5B9A");if(M||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},v=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},k=(I,M)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:M}),{btnSave:T,btnReset:L}=n.filter,N=()=>{const{disabled:I,text:M}=k(T,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[M]):a.createVNode("span",{class:"btn-filter-save",onClick:y},[M])},C=()=>{const{disabled:I,text:M}=k(L,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:v},[M])};return()=>a.createVNode(mn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(sc,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(Cc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":M=>i.checked=M,onChange:()=>b(!1)},nb(I=u.value.map(M=>a.createVNode("div",{class:"list-item"},[a.createVNode(ji,{label:M.value},{default:()=>[M.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[N(),a.createVNode("span",{class:"btn-filter-split"},null),C()])])}})}}),ab=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(E5).def(kt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||kt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,u)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let f=u;u===kt.NULL&&(f=Wh(u)),i.value===u&&(f=kt.NULL);const m=Hh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",m==null?void 0:m.sortFn,f);return}const p=_h(e.column,f);t("change",p,f)};return()=>a.createVNode("span",{class:Ve("head-cell-sort"),onClick:d=>s(d,kt.NULL)},[a.createVNode(Uo,{class:["sort-action","sort-asc",i.value===kt.ASC?"active":""],onClick:d=>s(d,kt.ASC)},null),a.createVNode(Vs,{class:["sort-action","sort-desc",i.value===kt.DESC?"active":""],onClick:d=>s(d,kt.DESC)},null)])}});class rb{constructor(t,n){gr(this,"props",null);gr(this,"ctx",null);this.props=t,this.ctx=n}}function Fh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sb=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh.def(Dh.SMALL),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ci)},emits:["change"],setup(e,{emit:t}){const n=P5,i=(G,B)=>St(G,["field","type"],[G,B]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(G=>Se(Z({},G),{field:G.field||G.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),u=a.ref(e.rowHeight),f=a.ref(c.value.checked||[]),p=`light ${Ve("table-settings")}`,y={checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:c.value.checked||[]},b=()=>{Object.assign(y,{checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:f.value}),t("change",{checked:f.value,size:d.value,height:u.value}),o.value=!1},v=()=>{s.value=y.checkAll,d.value=y.activeSize,u.value=y.activeHeight,f.value=y.checkedFields,o.value=!1},k=()=>{o.value=!0},T=G=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),s.value=!s.value;const B=c.value.fields||e.columns||[],ie=B.filter((oe,ve)=>oe.disabled&&f.value.includes(i(oe,ve))).map((oe,ve)=>i(oe,ve));if(s.value){const oe=B.filter(ve=>!ve.disabled).map((ve,Ie)=>i(ve,Ie));f.value.splice(0,f.value.length,...oe,...ie)}else f.value.splice(0,f.value.length,...ie)},L=a.computed(()=>{var G;return((G=c.value.limit)!=null?G:0)>0}),N=c.value.sizeList||n,C=a.computed(()=>L.value&&(c.value.limit?c.value.limit:0)<=f.value.length),I=(G,B)=>G.disabled||C.value&&!f.value.includes(i(G,B)),M=G=>{d.value=G.value,u.value=G.height},S=G=>({"line-size":!0,"is-medium":d.value==="medium",active:G.value===d.value}),z={marginRight:"12px"},j=()=>N.map(G=>a.createVNode("span",{class:S(G),onClick:()=>M(G)},[G.label])),O=a.computed(()=>c.value.fields||e.columns||[]),W=a.computed(()=>f.value.length>0&&!O.value.every((G,B)=>f.value.includes(St(G,"field",[G,B])))),P=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[f.value],()=>{f.value.length||(s.value=!1),f.value.length&&O.value.every((G,B)=>f.value.includes(i(G,B)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(mn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:k},[a.createVNode(ec,{style:"color: #c4c6cc;"},null)]),content:()=>{let G;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Qs,{class:"icon-close-action",onClick:v},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),L.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),L.value?"":a.createVNode("span",{class:"check-all",onClick:T},[a.createVNode(ji,{label:"\u5168\u9009",indeterminate:Boolean(W.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Cc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":B=>f.value=B},Fh(G=O.value.map((B,ie)=>{let oe;return a.createVNode("div",{class:"field-item"},[a.createVNode(ji,{checked:f.value.includes(i(B,ie)),label:i(B,ie),disabled:I(B,ie)},Fh(oe=St(B,"label",[B,ie]))?oe:{default:()=>[oe]})])}))?G:{default:()=>[G]}),P.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),j()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Pt,{theme:"primary",style:z,onClick:b},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Pt,{style:z,onClick:v},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),nu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ci:0),s=(v,k,T)=>({column_fixed:!!v.fixed,column_fixed_left:v.fixed!=="right",column_fixed_right:v.fixed==="right",shadow:v.fixed==="right"?k<T:k>0}),o=v=>v.fixed==="right"?"right":"left",c={left:(v=!0)=>t.filter(k=>k.fixed&&k.fixed!=="right").reduce((k,T,L)=>v&&L===0?k:k+Wr(T),0),right:(v=!0)=>t.filter(k=>k.fixed==="right").reduce((k,T,L)=>v&&L===0?k:k+Wr(T),n?Uc:0)},d=(v,k)=>{const T=k[oi.COL_UID],L=v==="right"?-1:1,{length:N}=t;let C=v==="right"?N*L:1,I=0;for(C;;){C=C+-1*L;const M=Math.abs(C),S=t[M],z=o(S),j=S[oi.COL_UID];if(z===v&&T!==j&&(I+=Wr(S)),C===0||T===j)break}return I},u=v=>{if(!v.fixed)return{};const k={left:0,right:0},T=o(v);return k[T]=d(T,v),{[T]:`${k[T]}px`}},f=v=>({width:`${c[v](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const k=o(v),T=m[k];return m[k]=!0,{isExist:T,colPos:k,column:v}})),y=(v,k)=>p.value.map(({isExist:T,colPos:L,column:N})=>T?"":a.createVNode("div",{class:s(N,v,k),style:f(L)},null)),b=Ve("table-fixed");return{renderFixedColumns:y,fixedWrapperClass:b,resolveFixedColumnStyle:u}};function Gh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class lb{constructor(t,n,i,s){gr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?St(this.setting,"height",["tbody",t,n,i]):St(this.props,"rowHeight",["tbody",t,n])});gr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));gr(this,"getHeadColumnClass",(t,n)=>Se(Z({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new rb(t,n),this.uuid=Li.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=eu(this.props);if(!t)return null;const n=i=>{var u;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((u=this.props.settings)==null?void 0:u.fields)||[];s.length&&this.colgroups.forEach(f=>{f.isHidden=Jh(d,f,s)}),this.emitEvent(pn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(sb,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(tb,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Kc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Et.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Et.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Et.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=St(n,["field","type"],[n,t]),s=Wh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=_h(n,s);this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=St(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(ab,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(u,f)=>c(o,u,f);this.emitEvent(pn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Et.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(ib,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=eu(this.props),{cellFn:n}=t,i={"--row-height":`${St(t,"height",["thead"])}px`},s=(u,f)=>typeof n=="function"?n(u,f):St(u,"label",[u,f]),o=(u,f)=>{if(u.type==="selection"){const b=this.reactiveProp.rowActions.get(He.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[He.ROW_SELECTION]:!!b},0,!0)}const m=[];u.sort&&m.push(this.getSortCell(u,f)),u.filter&&m.push(this.getFilterCell(u,f));const p=s(u,f);m.unshift(p);const y=typeof p=="string"?p:void 0;return a.createVNode(Bh,{title:y},Gh(m)?m:{default:()=>[m]})},c=u=>Array.from(u.listeners.keys()).reduce((f,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(f,{[p]:y=>{u.listeners.get(m).forEach(b=>Reflect.apply(b,this,[y,u,this]))}})},{}),{resolveFixedColumnStyle:d}=nu(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(tu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,f)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,f),style:d(u),onClick:()=>this.handleColumnHeadClick(f,u)},c(u)),[o(u,f)]))])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=nu(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Hr(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Hr(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],u=s[He.ROW_UID];return[a.createVNode(tu,{key:u},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t)},[this.filterColgroups.map((f,m)=>{var I,M;const p=[n(f),...Hr(this.props.cellStyle,[f,m,s,o,this])],y={"expand-cell":f.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:v,rowspan:k}=Rh(f,m,s,o),T=He.ROW_SKIP_CFG,L=f[oi.COL_UID],{skipRow:N=!1,skipCol:C=!1}=(M=(I=s[T])==null?void 0:I[L])!=null?M:{};if(!N&&!C){let S;const z=[this.getColumnClass(f,m),...Hr(this.props.cellClass,[f,m,s,o,this]),{"expand-row":s[He.ROW_EXPAND],"is-last":o+k>=i}];return a.createVNode("td",{class:z,style:p,key:b,colspan:v,rowspan:k},[a.createVNode(Bh,{class:y,column:f,row:s,parentSetting:this.props.showOverflowTooltip},Gh(S=this.renderCell(s,f,o,t))?S:{default:()=>[S]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[He.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[He.ROW_UID]}_expand`;return a.createVNode(tu,{key:o},{default:()=>{var c,d,u;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[He.ROW_SOURCE_DATA]))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Et.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Et.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[He.ROW_EXPAND]?a.createVNode(Rs,null,null):a.createVNode(Gs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(pn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=hl(t,St(n,"field",[n,t]),n),c=this.props.data[t[He.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(pn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(He.ROW_SELECTION_INDETERMINATE),c=gl(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(ji,{onChange:s,disabled:!c,modelValue:t[He.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(u=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?u:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,u;const o=()=>{const f=hl(t,St(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):f},c={expand:(f,m,p,y)=>this.renderExpandColumn(f,m,p,y),selection:(f,m,p,y)=>this.renderCheckboxColumn(f,p)};return(u=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?u:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=je({active:this.isColActive(n)}),s=`${$5(Wr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var ml=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(u=>u.label===c.label&&u.field===c.field)){const u=a.unref(c);t.push(u)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const Zh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xc(e.activeColumn):Array.isArray(e.activeColumn)?Xc(e.activeColumn[0]):Xc(e.activeColumn):[];var ob=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=ml(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Zh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(u=>u===d),_column:c}));return a.watchEffect(()=>{n=o();const c=Zh(e);n.forEach((d,u)=>{Object.assign(d,{active:c.some(f=>f===u)})})}),{activeColumns:n}},cb=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(C){C.MOUSE_MOVE="onMousemove",C.MOUSE_OUT="onMouseout",C.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,u=null,f=0;const m=a.ref(-1e3),p=C=>{var O;o=!1,c=!1;const I=document.body.style;I.cursor="";const M=C.clientX-d,S=((O=u.resizeWidth)!=null?O:u.calcWidth)+M,z=Number(u.minWidth);u.resizeWidth=S>z?S:z,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,u=null,C.target.closest("table").querySelectorAll("th").forEach(W=>W.style.setProperty("user-select","inherit"))},y=C=>ot.exports.throttle(()=>{var z;const I=C.clientX-d,M=((z=u.resizeWidth)!=null?z:u.calcWidth)+I;Number(u.minWidth)<M&&(m.value=C.clientX-d+f)},60),b=C=>{document.body.style.setProperty("cursor",""),y(C)()},v={[i.MOUSE_DOWN]:(C,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),u=I,d=C.clientX;const S=C.target.closest("table");f=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(C,I)=>{o&&!c&&(c=!0);const M=C.target.closest("th");if(c&&M.style.setProperty("user-select","none"),!c){if(!M)return;const S=M.getBoundingClientRect();S.width>12&&S.right-C.pageX<8?(s=!0,M.style.setProperty("cursor","col-resize")):(M.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(C,I)=>{const M=C.target;c||M.style.setProperty("cursor","")}},k=C=>`${n}_${C}`,T=()=>{e.forEach(C=>{C.resizable!==!1&&Object.keys(v).forEach(I=>{const M=k(I);C.listeners.has(M)||C.listeners.set(M,[]),C.listeners.get(M).push(v[I])})})},L=()=>{e.forEach(C=>{Object.keys(v).forEach(I=>{const M=k(I);if(C.listeners.has(M)){const S=C.listeners.get(M);S.splice(0,S.length)}})})};t&&T();const N=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:T,resetResizeEvents:L,dragOffsetX:m,dragOffsetXStyle:N}};const ub=(e,t,n,i,s)=>{const{getColumns:o}=ml(e,t),c=a.ref(200),d=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>je({[Ve("table")]:!0,"has-footer":u.value,"has-scroll-y":d.value||e.virtualEnabled},K5(e.border))),m=je({[Ve("table-head")]:!0,"has-settings":!!e.settings}),p=eu(e),y=a.computed(()=>({"--row-height":`${St(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[Ve("table-body")]:!0},v=a.computed(()=>je({[Ve("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),k=()=>{const j=o();if(j.every(O=>/^\d+\.?\d*(px)?$/ig.test(`${O.width}`))){const O=j.reduce((P,G)=>P+Number(`${G.width}`.replace(/px/ig,"")),0),W=d.value?Uc:0;return`${O+W}px`}return"100%"},T=a.computed(()=>({minHeight:Eh(e.minHeight,"auto"),width:k(),maxWidth:"100%"})),L=(j,O)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof O=="number"){const P=Number(W.replace("%",""));return O*P/100}return O},N=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),C=()=>e.showHead?L(e.headHeight,ci):0,I=()=>{const j=L(e.height,c.value),O=C(),W=L(e.minHeight,c.value),P=e.pagination&&e.data.length?ci:0,G=j-O-P,B=e.height!=="auto"?`${G}px`:!1,ie=W-O-P,oe=L(e.maxHeight,void 0),ve=typeof oe=="number"?`${oe-O-P}px`:!1;Object.assign(N,{display:s!=null&&s.length?"block":!1,"min-height":`${ie}px`,height:B,maxHeight:ve})};a.onMounted(()=>{M(n==null?void 0:n.value)});const M=j=>{if(j){const{height:O}=j.parentElement.getBoundingClientRect();c.value=O,I(),S(j)}},S=j=>{const O=e.virtualEnabled?`.${Ve("virtual-section")}`:`.${Ve("table-body-content")}`,W=j.querySelector(".bk-table-body");d.value=q5(W,O,0)};return{tableClass:f,headClass:m,contentClass:b,footerClass:v,wrapperStyle:T,contentStyle:N,headStyle:y,resetTableHeight:M,updateBorderClass:S,getColumnsWidthOffsetWidth:()=>{let j=0;return d.value&&(j=j+Uc),e.border.includes(dl.OUTER)&&!e.border.includes(dl.NONE)&&(j=j+2),j},hasFooter:u,hasScrollY:d}},db=(e,t)=>{var $,U;const n=a.reactive([]),{getColumns:i}=ml(e,t),s=V=>{if(/^\d+/.test(`${V.minWidth}`))return V.minWidth;let J=Sh;return V.sort&&(J=J+18),V.filter&&(J=J+28),J},o=()=>{var re,K;const V=((re=e.settings)==null?void 0:re.checked)||[],J=((K=e.settings)==null?void 0:K.fields)||[];n.splice(0,n.length,...i().map(X=>Se(Z({},X),{calcWidth:null,resizeWidth:null,minWidth:s(X),listeners:new Map,isHidden:Jh(J,X,V),[oi.COL_UID]:Li.v4(),[oi.COL_SOURCE_DATA]:X})))},{dragOffsetXStyle:c,dragOffsetX:d,resetResizeEvents:u,registerResizeEvent:f}=cb(n,!0),{activeColumns:m}=ob(e,t);a.watch(()=>[e.settings],()=>{var V;(((V=e.settings)==null?void 0:V.checked)||[]).length&&o()}),a.watch(()=>[e.columns,t],()=>{o(),u(),f()},{immediate:!0,deep:!0});const p=e.columns.reduce((V,J,re)=>{const K=St(J,["field","type"],[J,re]),X=Hh(J.sort);return X?Se(Z({},V||{}),{[K]:X==null?void 0:X.value}):V},null),y=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:($=e.settings)==null?void 0:$.size,height:fl[(U=e.settings)==null?void 0:U.size]},defaultSort:p||e.defaultSort}),b=V=>{var J;return y.rowActions.has(V)?(J=y.rowActions.get(V))==null?void 0:J.isExpand:!1},v=()=>{Array.isArray(y.defaultSort)&&y.defaultSort.splice(0),y.defaultSort=p||e.defaultSort},k=(V,J=void 0)=>{var X;const re=V[He.ROW_UID],K=typeof J=="boolean"?J:!b(re);y.rowActions.set(re,Object.assign({},(X=y.rowActions.get(re))!=null?X:{},{isExpand:K})),ie()},T=()=>y.rowActions.has(He.ROW_SELECTION_ALL)?y.rowActions.get(He.ROW_SELECTION_ALL):e.selectionKey?W.every(V=>j(V)):!1,L=V=>{const J=V[He.ROW_UID],{isSelected:re=!1}=y.rowActions.get(J)||{};return re},N=(V=L)=>{let J=!1,re=!1;W.forEach(K=>{const X=V(K);!J&&!X&&(J=!0),!re&&X&&(re=!0)}),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,re&&J)},C=()=>e.columns.some(V=>V.type==="selection"),I=()=>{C()&&N(V=>j(V))},M=(V=void 0)=>{const J=typeof V=="boolean"?V:!T();y.rowActions.set(He.ROW_SELECTION_ALL,J),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,!1),W.forEach((re,K)=>{var X;if(gl(e,{row:re,index:K,isCheckAll:!1})){const de=re[He.ROW_UID],we=Object.assign({},(X=y.rowActions.get(de))!=null?X:{},{isSelected:J});y.rowActions.set(de,we)}}),N(),ie(J),ve(null,V,!0)},S=()=>{M(!1)},z=(V,J)=>{var K;const re=V[He.ROW_UID];if(re){const X=typeof J=="boolean"?J:!O(V,re),de=Object.assign({},(K=y.rowActions.get(re))!=null?K:{},{isSelected:X});y.rowActions.set(re,de),J||y.rowActions.set(He.ROW_SELECTION_ALL,!1),N(),ie(),ve(V,J,!1)}},j=(V,J=re=>L(re))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:V,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.exports.get(V,e.selectionKey):J(V),O=(V,J,re)=>j(V,()=>{var X;const K=J===void 0?V[He.ROW_UID]:J;return gl(e,{row:V,index:re,isCheckAll:!1})&&T()?!0:y.rowActions.has(K)?(X=y.rowActions.get(K))==null?void 0:X.isSelected:!1}),W=a.reactive([]),P=a.computed(()=>n.some(V=>typeof V.rowspan=="function"||/^\d$/.test(`${V.rowspan}`)||typeof V.colspan=="function"||/^\d$/.test(`${V.colspan}`))),G=(V=!1)=>{let J=null;const re={};W.splice(0,W.length,...e.data.map((K,X)=>{const de=X5(K,e,X),we=P.value?oe(K,de,X,re,J):{};return J=de,Se(Z({},K),{[He.ROW_INDEX]:X,[He.ROW_UID]:de,[He.ROW_EXPAND]:V?b(de):!1,[He.ROW_SELECTION]:O(K,de,X),[He.ROW_SOURCE_DATA]:Z({},K),[He.ROW_SKIP_CFG]:we})})),I()},B=(V,J,re,K)=>{const X=O(re,re[He.ROW_UID],K);return V&&typeof J=="boolean"?J:X},ie=V=>{let J=null;const re={};W.forEach((K,X)=>{const de=K[He.ROW_UID],we=P.value?oe(K,de,X,re,J):{},q=gl(e,{row:K,index:X,isCheckAll:!1});Object.assign(K,{[He.ROW_EXPAND]:b(K[He.ROW_UID]),[He.ROW_SELECTION]:B(q,V,K,X),[He.ROW_SKIP_CFG]:we}),J=K[He.ROW_UID]}),typeof V!="boolean"&&I()},oe=(V,J,re,K,X)=>{var q;let de=0;const we=(q=K[X])!=null?q:{};return K[J]||(K[J]={}),n.forEach((H,R)=>{var ue,be;const{colspan:ae,rowspan:D}=Rh(H,R,V,re),_=H[oi.COL_UID],Q=(be=(ue=we[_])==null?void 0:ue.skipRowLen)!=null?be:0,se={[_]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};de>0&&(se[_].skipColLen=de,se[_].skipCol=!0,de=de-1),Q>1?(se[_].skipRowLen=Q-1,se[_].skipRow=!0):D>1&&(se[_].skipRowLen=D,se[_].skipRow=!1),ae>1&&(se[_].skipColLen=ae,de=ae-1),Object.assign(K[J],Z({},se))}),K[J]},ve=(V,J,re=!1)=>{if(e.asyncData&&e.rowKey){if(re)e.data.forEach(K=>{ot.exports.has(K,e.selectionKey)&&ot.exports.set(K,e.selectionKey,!!J)});else if(ot.exports.has(V,e.selectionKey)){const K=e.data.find(X=>ot.exports.get(X,e.rowKey)===ot.exports.get(V,e.rowKey));ot.exports.set(K,e.selectionKey,!!J)}}},{renderFixedColumns:Ie,fixedWrapperClass:me}=nu(e,n,!1);return{colgroups:n,dragOffsetXStyle:c,dragOffsetX:d,reactiveSchema:y,indexData:W,fixedWrapperClass:me,initIndexData:G,updateIndexData:ie,renderFixedColumns:Ie,setRowExpand:k,updateColGroups:o,clearSelection:S,toggleAllSelection:M,toggleRowSelection:z,getSelection:()=>W.filter(V=>O(V)),clearSort:v}};var fb=a.defineComponent({name:"Table",props:R5,emits:A5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=ml(e,c);a.provide(Th,d);const u=a.ref(),f=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:y,dragOffsetX:b,reactiveSchema:v,indexData:k,renderFixedColumns:T,setRowExpand:L,initIndexData:N,fixedWrapperClass:C,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j}=db(e,c),{pageData:O,localPagination:W,resolvePageData:P,watchEffectFn:G}=_5(e,k),{tableClass:B,headClass:ie,contentClass:oe,footerClass:ve,wrapperStyle:Ie,contentStyle:me,headStyle:ge,updateBorderClass:$,resetTableHeight:U,getColumnsWidthOffsetWidth:V,hasFooter:J}=ub(e,c,u,v,O),re=new lb(e,t,v,p),K=()=>{const se=u.value.querySelector(".bk-table-body-content"),ue=se.querySelector("table");if(ue){const be=ue.scrollWidth,te=se.clientWidth;m.value=be-te}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{N(e.reserveExpand),G(s,n,i),a.nextTick(()=>{U(u.value),$(u.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((u==null?void 0:u.value)instanceof HTMLElement){const se=V();qc(u.value,p,20,se),K()}}),re.on(pn.ON_SORT_BY_CLICK,se=>{var he,ke;const{sortFn:ue,column:be,index:te,type:le}=se;typeof ue=="function"&&(n=ue,i=be,P(s,n,i),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he)),t.emit(Et.COLUMN_SORT,{column:a.unref(be[oi.COL_SOURCE_DATA]),index:te,type:le})}).on(pn.ON_FILTER_CLICK,se=>{var he,ke;const{filterFn:ue,checked:be,column:te,index:le}=se;typeof ue=="function"&&(s=ue,P(s,n,i),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he)),t.emit(Et.COLUMN_FILTER,{checked:be,column:a.unref(te[oi.COL_SOURCE_DATA]),index:le})}).on(pn.ON_SETTING_CHANGE,se=>{const{checked:ue=[],size:be,height:te}=se;a.nextTick(()=>{var he,ke;$(u.value);const le=V();ue.length&&qc(u.value,p,20,le),(ke=(he=f.value)==null?void 0:he.reset)==null||ke.call(he),t.emit(Et.SETTING_CHANGE,{checked:ue,size:be,height:te})})}).on(pn.ON_ROW_EXPAND_CLICK,se=>{const{row:ue,column:be,index:te,rows:le,e:he}=se;t.emit(Et.ROW_EXPAND_CLICK,{row:a.unref(ue[He.ROW_SOURCE_DATA]),column:a.unref(be[oi.COL_SOURCE_DATA]),index:te,rows:le,e:he}),L(ue,!ue[He.ROW_EXPAND])}).on(pn.ON_ROW_CHECK,({row:se,isAll:ue,index:be,value:te})=>{ue?(M(te),t.emit(Et.ROW_SELECT_ALL,{checked:te,data:e.data})):(S(se,te),t.emit(Et.ROW_SELECT,{row:a.unref(se[He.ROW_SOURCE_DATA]),index:be,checked:te,data:e.data})),t.emit(Et.ROW_SELECT_CHANGE,{row:a.unref(se[He.ROW_SOURCE_DATA]),isAll:ue,index:be,checked:te,data:e.data})});const X=se=>{var Re;const ue=(Re=v.pos.bottom)!=null?Re:0,be=se[1],{translateX:te,translateY:le,pos:he={}}=be;v.scrollTranslateY=le,v.scrollTranslateX=te,v.pos=he;const{bottom:ke}=he;ke<=2&&ue>ke&&Ps(60,()=>{t.emit(Et.SCROLL_BOTTOM,Se(Z({},he),{translateX:te,translateY:le}))},!0)(),K()};a.onMounted(()=>{o=Vh(u.value,()=>{(e.height==="100%"||e.height==="auto")&&U(u.value),$(u.value);const se=V();qc(u.value,p,20,se)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,re.destroy()}),t.expose({setRowExpand:L,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j});const de=a.computed(()=>Se(Z({},oe),{"__is-empty":!O.length})),we=a.computed(()=>({[Ve("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),q={column_drag_line:!0,"offset-x":!0},H=a.computed(()=>Se(Z({},y.value),{left:`${b.value-v.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},ae=a.computed(()=>({[Ve("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),D={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:_}=W5(e,t),Q=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var se,ue;return a.createVNode("div",{class:B.value,style:Ie.value,ref:u},[a.createVNode("div",{class:ie,style:ge.value},[re.renderTableHeadSchema()]),a.createVNode(_r,a.mergeProps({ref:f,lineHeight:re.getRowHeight,class:de.value,style:me,list:O},Q.value,{contentClassName:we.value,onContentScroll:X,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:be=>re.renderTableBodySchema(be.data||e.data),afterSection:()=>a.createVNode("div",{class:ae.value},null)}),a.createVNode("div",{class:C},[T(v.scrollTranslateX,m.value),a.createVNode("div",{class:q,style:H.value},null),a.createVNode("div",{class:R},[_()])]),a.createVNode("div",{class:ve.value},[J.value&&re.renderTableFooter(W.value)]),a.createVNode("div",{style:D},[(ue=(se=t.slots).default)==null?void 0:ue.call(se)])])}}});const Yh=Ge(fb);Ge(Ah);const Uh=Ge(Ah),Ga=12;function hb(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function gb(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,f)=>{let m=[];return f.children&&(m=f.children.map(p=>Z({group:{groupId:f[n.value],groupName:f[i.value]}},p))),u.concat(m)},[])),o.value=d,c.value=d.reduce((u,f)=>(u[f[n.value]]=f,u),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const $h=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n},mb=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{!t.value||(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}};var Kh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const pb=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:Oe("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}});var bb=a.defineComponent({name:"TagRender",directives:{bkTooltips:el},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>Z({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value},e.tagOverflowTips));return a.onMounted(()=>{n.value=G4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),yb=a.defineComponent({name:"TagInput",directives:{bkTooltips:el},props:pb(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll"],setup(e,{emit:t}){const n=xn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(Z({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0}},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:u}=hb(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.ref(null),v=a.ref(null),k=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),N=a.computed(()=>M.selectedTagList.length===0&&f.value===""&&!i.isEdit),C=a.computed(()=>e.clearable&&!e.disabled&&M.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),M=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),S=a.computed(()=>M.selectedTagList.map(te=>te[e.saveKey])),{flatList:z,saveKeyMap:j}=gb(e),O=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((le,he)=>{le.__index__=he,te[le.group.groupId]||(te[le.group.groupId]={id:le.group.groupId,name:le.group.groupName,children:[]}),te[le.group.groupId].children.push(le)}),Object.keys(te).map(le=>te[le])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ie()})}),a.watch(()=>e.modelValue,te=>{var le;Ie(S.value,te)||(a.nextTick(()=>{ie()}),e.withValidate&&((le=n==null?void 0:n.validate)==null||le.call(n,"change")))}),a.watch(f,ot.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:le}=f;le!==""&&te||le===""&&e.trigger==="focus"&&te?s.isShow=!0:(e.trigger!=="focus"||!te)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,te=>{W(),te&&v.value&&(a.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",P),v.value.addEventListener("scroll",P))}),a.onMounted(()=>{ie()});const W=()=>{var te;s.offset.crossAxis=L.value?0:(te=b.value)==null?void 0:te.offsetLeft},P=()=>{if(c.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:le,scrollHeight:he}=v.value;if(te+le>=he){const ke=c.curPage+1;ke<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{u(ke)},500))}},G=()=>{var le;return Array.from(((le=y.value)==null?void 0:le.childNodes)||[]).filter(he=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(he.nodeType))},B=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:le}=te.target;(le.indexOf("bk-tag-input-trigger")>-1||le.indexOf("tag-list")>-1)&&y.value.appendChild(b.value)}clearTimeout(k.value),L.value&&S.value.length&&(M.tagListCache=[...S.value],M.selectedTagListCache=[...M.selectedTagList],f.value=M.selectedTagListCache[0][e.saveKey],se(M.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var le;(le=m.value)==null||le.focus(),e.trigger==="focus"&&M.localList.length!==0&&(oe(),s.isShow?W():s.isShow=!0)})}},ie=()=>{const{saveKey:te,modelValue:le,displayKey:he,allowCreate:ke,trigger:Re}=e;if(M.selectedTagList=[],M.localList=z.value,le.length){const _e={};M.selectedTagList=le.map(et=>{const rn=j.value[et];return _e[et]=1,!rn&&ke?{[te]:et,[he]:et}:rn}).filter(et=>et),L.value||(M.localList=M.localList.filter(et=>!_e[et[te]]))}Re==="focus"&&oe()},oe=(te="")=>{const{searchKey:le,filterCallback:he}=e,ke=te.toLowerCase().trim();if(ke===""){d(M.localList);return}let Re=[];typeof he=="function"?Re=he(ke,le,M.localList)||[]:Array.isArray(le)?Re=M.localList.filter(_e=>le.some(et=>_e[et].toLowerCase().indexOf(ke)>-1)):Re=M.localList.filter(_e=>_e[le].toLowerCase().indexOf(ke)>-1),d(Re)},ve=(te,le)=>{const he={"bk-selector-actived":!1,"bk-selector-selected":S.value.includes(te[e.saveKey])};return e.useGroup?he["bk-selector-actived"]=te.__index__===i.focusItemIndex:he["bk-selector-actived"]=le===i.focusItemIndex,he};function Ie(te,le){return te.length!==le.length?!1:le.every((he,ke)=>te[ke]===he)}const me=()=>{M.tagListCache=[],M.selectedTagListCache=[],M.selectedTagList=[]},ge=()=>{f.value=""},$=()=>{if(L.value)return 0;const le=G().findIndex(({id:he})=>he==="tagInputItem");return le>=0?le:0},U=(te,le,he=!1)=>{if(!le||!te)return;let ke=le;he&&(ke=le.nextElementSibling||null),le.parentNode.insertBefore(te,ke)},V=te=>{const{maxData:le,trigger:he,allowCreate:ke}=e;if(le===-1||le>S.value.length){const{value:Re}=te!=null&&te.target?te.target:f,_e=$h(Re);_e?(oe(Re),m.value.style.width=`${_e*Ga}px`):he==="focus"&&oe()}else re(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=ke?-1:0},J=()=>{var te;s.width=L.value?(te=p.value)==null?void 0:te.clientWidth:e.contentWidth,t("focus")},re=()=>{k.value=setTimeout(()=>{var le;const te=f.value;if(ge(),i.isEdit=!1,L.value){const[he]=M.tagListCache;te&&te===he&&M.selectedTagListCache.length?Q(M.selectedTagListCache[0],"select"):de("remove")}else if(e.allowAutoMatch&&te){const he=c.curPageList.find(ke=>Array.isArray(e.searchKey)?e.searchKey.map(_e=>ke[_e]).includes(te):ke[e.searchKey]===te);he?K(he,"select"):e.allowCreate&&K(te,"custom")}s.isShow=!1,t("blur",te,S.value),(le=n==null?void 0:n.validate)==null||le.call(n,"blur")},200)},K=(te,le,he)=>{he==null||he.stopPropagation(),!(!te||te.disabled)&&(L.value&&me(),Q(te,le),de("select"),ge(),s.isShow=!1)},X=(te,le,he)=>{he==null||he.stopPropagation(),se(te,le),ge(),de("remove",te),m.value.style.width=`${Ga}px`},de=(te,le)=>{t(te,le),t("update:modelValue",S.value),t("change",S.value)},we=te=>{te.stopPropagation();const le=M.selectedTagList;M.selectedTagList=[];const he=le.filter(ke=>j.value[ke[e.saveKey]]);(e.allowCreate&&he.length!==0||!e.allowCreate)&&!L.value&&M.localList.push(...he),de("removeAll")},q=()=>{const te={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};a.nextTick(()=>{const le=v.value.querySelector(".bk-selector-actived");if(!le)return;const he={height:le.clientHeight,yAxis:le.getBoundingClientRect().y};he.yAxis<te.yAxis&&(v.value.scrollTop=v.value.scrollTop-(te.yAxis-he.yAxis));const ke=he.yAxis+he.height-te.yAxis;ke>te.height&&(v.value.scrollTop=v.value.scrollTop+ke-te.height)})},H=(te,le)=>{const he=G();U(b.value,he[te-1]),M.selectedTagList.splice(te-1,1),B();const ke=j.value[le[e.saveKey]];(e.allowCreate&&ke||!e.allowCreate)&&!L.value&&M.localList.push(le),m.value=`${Ga}px`,de("remove")},R=te=>{if(c.isPageLoading)return;let le;const he=te.target.value,ke=$h(he),Re=$(),_e=G();switch(te.code){case"ArrowUp":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),q();break;case"ArrowDown":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),q();break;case"ArrowLeft":if(i.isEdit=!0,!ke){if(Re<1)return;U(b.value,_e[Re-1]),B()}break;case"ArrowRight":if(i.isEdit=!0,!ke){if(Re===_e.length-1)return;U(_e[Re+1],b.value),B()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?K(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&f.value.trim()&&K(f.value,"custom",te),te.preventDefault();break;case"Backspace":Re!==0&&!f.value&&(le=M.selectedTagList[Re-1],H(Re,le));break}},ae=te=>{const le=[],he=te.split(";"),ke=/^[a-zA-Z][a-zA-Z_]*/g;return he.forEach(Re=>{const _e=Re.match(ke);if(_e){const et=_e.join("");le.push({[e.saveKey]:et,[e.displayKey]:et})}}),le},D=te=>{if(te.preventDefault(),L.value)return!1;const{maxData:le,saveKey:he,displayKey:ke,pasteFn:Re,allowCreate:_e}=e,et=te.clipboardData.getData("text");let tt=(Re?Re(et):ae(et)).map(rt=>rt[he]);if(tt.length){const rt=G(),Cn=$(),ft=M.localList.map(Fe=>Fe[he]);if(tt=tt.filter(Fe=>{const zt=(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe);return _e?zt:zt&&ft.includes(Fe)}),le!==-1){const Fe=M.selectedTagList.length;if(Fe<le){const zt=le-Fe;tt.length>zt&&(tt=[...tt.slice(0,zt)])}else tt=[]}const ct=_e?tt.map(Fe=>{const zt=M.localList.find(ma=>ma[he]===Fe);return zt!=null?zt:{[he]:Fe,[ke]:Fe}}):M.localList.filter(Fe=>tt.includes(Fe[he]));tt.length&&(M.selectedTagList.splice(Cn,0,...ct),U(b.value,rt[Cn]),m.value.style.width=`${Ga}px`,M.localList=M.localList.filter(Fe=>!tt.includes(Fe[he])),de("select"),B())}},_=te=>{e.disabled||(U(b.value,te.currentTarget,!0),m.value.style.width=`${Ga}px`,s.isShow&&W())},Q=(te,le)=>{if(M.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:he,saveKey:ke,displayKey:Re,createTagValidator:_e}=e,et=$();let rn=1,tt=!1,rt;const Cn=ft=>typeof _e=="function"?_e(ft):!0;if(le==="custom")if(he){let ft=te.split(he);ft=ft.filter(Fe=>(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe)&&Cn(Fe));const ct=ft.map(Fe=>j.value[Fe]||{[ke]:Fe,[Re]:Fe});ft.length&&(M.selectedTagList.splice(et,0,...ct),rn=ct.length,tt=!0)}else{const ft=typeof te=="object";if(rt=ft?te[ke]:te.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!S.value.includes(rt)&&Cn(rt)){const ct=j.value[rt]||(ft?te:{[ke]:rt,[Re]:rt});M.selectedTagList.splice(et,0,ct),tt=!0}}else te&&(rt=te[ke],rt!==void 0&&!S.value.includes(rt)&&(M.selectedTagList.splice(et,0,te),tt=!0));tt&&a.nextTick(()=>{for(let ft=1;ft<=rn;ft++){const Fe=G()[et+ft];U(Fe,b.value)}if(m.value.style.width=`${Ga}px`,!L.value){e.allowNextFocus&&B();const ft=S.value.reduce((ct,Fe)=>(ct[Fe]=1,ct),{});M.localList=M.localList.filter(ct=>!ft[ct[ke]])}})},se=(te,le)=>{M.selectedTagList.splice(le,1);const he=j.value[te[e.saveKey]];(e.allowCreate&&he||!e.allowCreate)&&!L.value&&M.localList.push(te)},ue=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:be}=mb(p,ue,S);return Se(Z(Z(Z({popoverProps:s},a.toRefs(i)),a.toRefs(M)),a.toRefs(c)),{isShowPlaceholder:N,isShowClear:C,curInputValue:f,renderList:O,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:y,tagInputItemRef:b,selectorListRef:v,triggerClass:I,overflowTagIndex:be,localCollapseTags:ue,focusInputTrigger:B,activeClass:ve,handleInput:V,handleFocus:J,handleBlur:re,handleTagSelected:K,handleTagRemove:X,handleClear:we,tagFocus:_,handleKeydown:R,handlePaste:D})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(mn,a.mergeProps({theme:"light bk-tag-input-popover-content",trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey},c=this.localCollapseTags&&this.overflowTagIndex&&s>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:c?"none":""},onClick:this.tagFocus},[a.createVNode(bb,{node:i,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-selector-list"},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Kh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Kh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(xi,{theme:"primary",size:ii.Small},null)]):null])])})])}});const Xh=Ge(yb),Cb={direction:Xf(),align:Yo().def(js.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:qf()};var vb=a.defineComponent({name:"Divider",props:Cb,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const qh=Ge(vb),e9=Oe("position",{}).def("top"),t9=Oe("sortType",{}).def("replace"),wb={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Mb={active:g.oneOfType([g.number,g.string]).def(""),type:Oe("type",{}).def("border-card"),tabPosition:e9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:t9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},Ib=Z({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:e9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:t9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},wb),Nb={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:Zo(),panel:g.string||g.func};var n9=a.defineComponent({name:"TabNav",props:Ib,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let u=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:y,closable:b,visible:v,disabled:k,sortable:T}=f.props;if(!v)return!1;e.active===p&&(u=!0);const L=N=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(N)?`\u9009\u9879\u5361${m+1}`:typeof N=="string"?N:typeof N=="function"?a.h(N):N;return d.push({name:p,closable:b,visible:v,disabled:k,sortable:T,tabLabel:L(y)}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,u)=>d===u;return Se(Z({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,u){i.value=d,s.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,u)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,u){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,u)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,u){e.tabRemove(d,u)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:f}=this,m=()=>this.navs.map((y,b)=>{if(!y)return null;const{name:v,disabled:k,tabLabel:T}=y,L=()=>{const C=[Ve("tab-header-item")];return k&&C.push(Ve("tab-header--disabled")),e===v&&C.push(Ve("tab-header--active")),C.join(" ")},N=(C,I)=>C||I;return a.createVNode("div",{key:v,onClick:()=>this.handleTabChange(v),draggable:N(y.sortable,i),onDragstart:C=>c(b,C),onDragenter:C=>{C.preventDefault(),d(b)},onDragleave:C=>{C.preventDefault()},onDragover:C=>{C.preventDefault()},onDragend:C=>{C.preventDefault(),u()},onDrop:C=>{C.preventDefault(),f(b,s)},class:L()},[a.createVNode("div",null,[T]),N(y.closable,t)&&a.createVNode(Zt,{class:Ve("tab-header-item-close"),onClick:()=>this.handleTabRemove(b,y)},null)])}),p=()=>{var b,v;const y=[];return typeof this.$slots.add=="function"?y.push((v=(b=this.$slots).add)==null?void 0:v.call(b,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Fs,{width:26,height:26},null)])),y.length?a.createVNode("div",{class:Ve("tab-header-operation")},[y.map((k,T)=>a.createVNode("div",{class:Ve("tab-header-item"),key:T},[k]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:Ve("tab-header")},[a.createVNode("div",{class:Ve("tab-header-nav")},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:Ve("tab-header-setting")},[this.$slots.setting()])])}}),Lb=a.defineComponent({name:"Tab",components:{TabNav:n9},props:Mb,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Se(Z({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p==="insert")if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M}=this,S={panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M};return!s||!Array.isArray(s)?null:a.createVNode(n9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:Ve("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),kb=a.defineComponent({name:"TabPanel",props:Nb,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null;return a.withDirectives(a.createVNode("div",{ref:"content",class:Ve("tab-panel")},[t()]),[[a.vShow,e]])}});const i9=Gt(Lb,{TabPanel:kb}),Vi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let a9=1;const r9=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Vi[i].forEach(y=>{c+=(y.el.offsetHeight||0)+d}),a9+=1;const u=`message_${a9}`;n=Se(Z({},n),{offsetX:o,offsetY:c,id:u});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=y=>{Tb(y,i,d,s),a.render(null,f)},a.render(m,f),Vi[i].push(m);let p;m.props.getContainer&&Aa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function Tb(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Vi[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=Vi[t][o].el.offsetHeight,u=Vi[t].length;for(let f=o;f<u;f++){const m=parseInt(Vi[t][f].el.style[s],10)-d-n;Vi[t][f].component.props.offsetY=m}Vi[t].splice(o,1)}var iu;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(iu||(iu={}));const Sb={id:g.string.def(""),message:g.string.def(""),theme:Oe("messageTheme",{}).def(iu.PRIMARY),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var xb=a.defineComponent({name:"Message",props:Sb,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Qn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&Aa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&u(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Bs,null,null),warning:a.createVNode(Or,null,null),success:a.createVNode(jr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Hn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const s9=e=>{r9(xb,e)},l9=Ge(e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:u}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((v=i.value)==null?void 0:v.onClosed()),n.value=!1},m=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((v=i.value)==null?void 0:v.onConfirm()),n.value=!1};function p(b){i.value=b}u({update:p});const y=()=>{const b=[],v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&v.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),v};return()=>a.createVNode(v0,Se(Z({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),y())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}});var au;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(au||(au={}));const Db={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:Oe("notifyTheme",{}).def(au.PRIMARY),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var jb=a.defineComponent({name:"Notify",props:Db,emits:["destroy"],setup(e,{emit:t}){const n=Qn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let u=null;const f=()=>{u=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&f(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(u)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Bs,null,null),warning:a.createVNode(Or,null,null),success:a.createVNode(jr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Hn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const o9=e=>{r9(jb,e)},c9=Symbol("MENU_PROVIDER_KEY"),ru=Symbol("MENU_PROVIDER_KEY_PATH"),zb=e=>{a.provide(c9,e)},Ob=e=>{const{parentKeys:t,parentInfo:n}=su(),i=a.computed(()=>[...t.value,e]);a.provide(ru,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},u9=()=>a.inject(c9),su=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&ru in t?a.inject(ru):{parentInfo:void 0,parentKeys:a.ref([])}},lu=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function d9(e,t){if(!e||!t)return;const n=lu(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=lu(i).join(" ");e.setAttribute("class",s)}function f9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=lu(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const Ab=()=>({css:!0,onBeforeEnter:e=>{f9(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,d9(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(f9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{d9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Pb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Eb=a.defineComponent({name:"Menu",props:Pb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),u=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{u.value=e.collapse;const v=[...f.value],k=[...o.value];o.value=u.value?[]:v,f.value=u.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(v=o.value)=>{o.value=v},{immediate:!0});const m=(v,k)=>{c.value=Se(Z({},c.value),{[v]:k})},p=v=>{delete c.value[v],c.value=Z({},c.value)},y=(v,k)=>{k?e.uniqueOpen?o.value=[v]:o.value.push(v):o.value=o.value.filter(T=>T!==v),n("openChange",k,c.value[v]),n("update:openKeys",[...o.value])},b=v=>{s.value=v,n("click",c.value[v]),n("update:activeKey",v,c.value[v])};return zb({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:u,handleOpenChange:y,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var v;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":u.value}},[(v=t.default)==null?void 0:v.call(t)])}}}),Vb=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),Jb=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,v;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=u9(),d=a.getCurrentInstance(),{parentInfo:u}=su(),f=((v=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:v.call(b))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:u==null?void 0:u.key});const y=k=>{c(f),n("click",k)};return a.onBeforeUnmount(()=>s(f)),()=>{var k,T;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:y},[p.value&&a.createVNode("span",{class:"item-icon"},[((k=t==null?void 0:t.icon)==null?void 0:k.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(T=t.default)==null?void 0:T.call(t)])])}}});const Qb={title:{type:String,default:"title"}};var Rb=a.defineComponent({name:"Submenu",props:Qb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var L,N;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:u,menuStore:f}=u9(),{parentInfo:m}=su(),p=a.getCurrentInstance(),y=((N=(L=p.vnode.key)==null?void 0:L.toString)==null?void 0:N.call(L))||String(p.uid),b=a.ref(Ab()),v=a.computed(()=>o.value.includes(y)),k=a.computed(()=>{var I,M;const C=(M=(I=f.value)==null?void 0:I[u.value])==null?void 0:M.parentKey;return d.value&&C===y&&v});Ob(y),i(y,{key:y,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(y));const T=()=>{c(y,!v.value),n("collapse",!v.value,p)};return()=>{var C;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":v.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:T},[a.createVNode("span",{class:"submenu-header-icon"},[((C=t.icon)==null?void 0:C.call(t))||a.createVNode(hc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Es,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(y)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,v.value]])]}})])}}});const h9=Gt(Eb,{Item:Jb,Submenu:Rb,Group:Vb}),_b={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var g9=a.defineComponent({props:_b,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Wb={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var Hb=a.defineComponent({name:"Navigation",props:Wb,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,u,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(g9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(g9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(tc,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(u=this.$slots).default)==null?void 0:f.call(u),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const m9=Ge(Hb),Bb={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var ou=a.defineComponent({props:Bb,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{s()});const s=()=>{if(n&&Object.keys(n).length!==0){const u=n;u.isShow&&u.hide(),u.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new H4(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const u={};return e.appendToBody&&(u["z-index"]=1060+Qn.getModalNextIndex()),u}),d=a.reactive({styles:c});return Se(Z({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:s})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const Fb={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var p9=a.defineComponent({props:Fb,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:u=>{const m=[...c.value.children][u.shiftKey?"shift":"pop"]();document.activeElement===m&&(u.preventDefault(),u.stopPropagation())}}},render(){var e,t,n;return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(Pt,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",(n=(t=(e=this.$slots).confirm)==null?void 0:t.call(e))!=null?n:a.createVNode("div",{class:"bk-picker-confirm-action"},[this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])])}}),b9=1e3*60*60*24;function y9(e,t){return new Date(e,t+1,0).getDate()}function C9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function v9(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/b9);i||(d+=c.getDay());var u=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-b9*p&&(u=1)}return u}function Gb(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],u=new Date(e,t,1),f=u.getDay()||(c?7:0),m=o-f,p=v9(e,t,1,c),y=y9(e,t),b=y9(e,t-1),v,k,T,L=C9(e,t,p),N={month:t,year:e,daysInMonth:y},C=0;C<7;C++){T=m;for(var I=0;I<8;I++){C>0&&I>0&&m++,m>y||m<1?(k=m>y?m-y:b+m,v=m>y?t+1:t-1):(k=m,v=t);var M=function(){return I===0?"weekLabel":C===0?"dayLabel":m<1?"prevMonth":m>y?"nextMonth":"monthDay"}(),S=T!==m&&C>0,z={desc:S?k:p,week:p,type:M,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,v,k)):!1,year:L,index:d.length};n&&(typeof n=="function"?z=n.call(N,z,i):n.forEach(function(j){z=j.call(N,z,i)})),s&&S?d.push(z):s||d.push(z)}C>0&&(p=v9(e,v,k+1,c)),L=C9(e,t,p)}return N.cells=d,N}var Zb=function(e){return Gb.bind(e)},Yb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Fn=Yb;function Ub(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function w9(e,t){for(var n in e)t[n]?Ub(e[n])&&w9(e[n],t[n]):t[n]=e[n]}function M9(e,t){var n=[Fn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Fn.weekPlaceholder?e.desc=Fn.weekPlaceholder:e.index<8?e.desc=Fn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Fn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Fn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Fn.monthNames[t],columnNames:Fn.columnNames[t],classes:Fn.classes}),e}M9.setLabels=function(e){w9(e,Fn)};var $b=M9,Kb={Generator:Zb,addLabels:$b};function bn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Vt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function an(e){Vt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function Xb(e,t){Vt(2,arguments);var n=an(e).getTime(),i=bn(t);return new Date(n+i)}function qb(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ey(e){return Vt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ty(e){if(Vt(1,arguments),!ey(e)&&typeof e!="number")return!1;var t=an(e);return!isNaN(Number(t))}var ny={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},iy=function(e,t,n){var i,s=ny[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},ay=iy;function cu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var ry={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ly={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oy={date:cu({formats:ry,defaultWidth:"full"}),time:cu({formats:sy,defaultWidth:"full"}),dateTime:cu({formats:ly,defaultWidth:"full"})},cy=oy,uy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dy=function(e,t,n,i){return uy[e]},fy=dy;function Br(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var u=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[u]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var hy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},gy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},my={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},py={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},by={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Cy=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vy={ordinalNumber:Cy,era:Br({values:hy,defaultWidth:"wide"}),quarter:Br({values:gy,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Br({values:my,defaultWidth:"wide"}),day:Br({values:py,defaultWidth:"wide"}),dayPeriod:Br({values:by,defaultWidth:"wide",formattingValues:yy,defaultFormattingWidth:"wide"})},wy=vy;function Fr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?Iy(d,function(p){return p.test(c)}):My(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function My(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Iy(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Ny(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Ly=/^(\d+)(th|st|nd|rd)?/i,ky=/\d+/i,Ty={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Sy={any:[/^b/i,/^(a|c)/i]},xy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Dy={any:[/1/i,/2/i,/3/i,/4/i]},jy={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Oy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ay={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Py={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ey={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vy={ordinalNumber:Ny({matchPattern:Ly,parsePattern:ky,valueCallback:function(e){return parseInt(e,10)}}),era:Fr({matchPatterns:Ty,defaultMatchWidth:"wide",parsePatterns:Sy,defaultParseWidth:"any"}),quarter:Fr({matchPatterns:xy,defaultMatchWidth:"wide",parsePatterns:Dy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Fr({matchPatterns:jy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any"}),day:Fr({matchPatterns:Oy,defaultMatchWidth:"wide",parsePatterns:Ay,defaultParseWidth:"any"}),dayPeriod:Fr({matchPatterns:Py,defaultMatchWidth:"any",parsePatterns:Ey,defaultParseWidth:"any"})},Jy=Vy,Qy={code:"en-US",formatDistance:ay,formatLong:cy,formatRelative:fy,localize:wy,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ry=Qy;function _y(e,t){Vt(2,arguments);var n=bn(t);return Xb(e,-n)}var Wy=864e5;function Hy(e){Vt(1,arguments);var t=an(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/Wy)+1}function pl(e){Vt(1,arguments);var t=1,n=an(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function I9(e){Vt(1,arguments);var t=an(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=pl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=pl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function By(e){Vt(1,arguments);var t=I9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=pl(n);return i}var Fy=6048e5;function Gy(e){Vt(1,arguments);var t=an(e),n=pl(t).getTime()-By(t).getTime();return Math.round(n/Fy)+1}function bl(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:bn(s),c=n.weekStartsOn==null?o:bn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=an(e),u=d.getUTCDay(),f=(u<c?7:0)+u-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function N9(e,t){Vt(1,arguments);var n=an(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,u),f.setUTCHours(0,0,0,0);var m=bl(f,t),p=new Date(0);p.setUTCFullYear(i,0,u),p.setUTCHours(0,0,0,0);var y=bl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=y.getTime()?i:i-1}function Zy(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:bn(s),c=n.firstWeekContainsDate==null?o:bn(n.firstWeekContainsDate),d=N9(e,t),u=new Date(0);u.setUTCFullYear(d,0,c),u.setUTCHours(0,0,0,0);var f=bl(u,t);return f}var Yy=6048e5;function Uy(e,t){Vt(1,arguments);var n=an(e),i=bl(n,t).getTime()-Zy(n,t).getTime();return Math.round(i/Yy)+1}function at(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var $y={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return at(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):at(n+1,2)},d:function(e,t){return at(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return at(e.getUTCHours()%12||12,t.length)},H:function(e,t){return at(e.getUTCHours(),t.length)},m:function(e,t){return at(e.getUTCMinutes(),t.length)},s:function(e,t){return at(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return at(s,t.length)}},Ji=$y,Za={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ky={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ji.y(e,t)},Y:function(e,t,n,i){var s=N9(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return at(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):at(o,t.length)},R:function(e,t){var n=I9(e);return at(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return at(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return at(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return at(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ji.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return at(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=Uy(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):at(s,t.length)},I:function(e,t,n){var i=Gy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):at(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ji.d(e,t)},D:function(e,t,n){var i=Hy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):at(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return at(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return at(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return at(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Za.noon:i===0?s=Za.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Za.evening:i>=12?s=Za.afternoon:i>=4?s=Za.morning:s=Za.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ji.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ji.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ji.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ji.s(e,t)},S:function(e,t){return Ji.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return k9(o);case"XXXX":case"XX":return oa(o);case"XXXXX":case"XXX":default:return oa(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return k9(o);case"xxxx":case"xx":return oa(o);case"xxxxx":case"xxx":default:return oa(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+L9(o,":");case"OOOO":default:return"GMT"+oa(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+L9(o,":");case"zzzz":default:return"GMT"+oa(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return at(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return at(o,t.length)}};function L9(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+at(o,2)}function k9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+at(Math.abs(e)/60,2)}return oa(e,t)}function oa(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=at(Math.floor(s/60),2),c=at(s%60,2);return i+o+n+c}var Xy=Ky;function T9(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function S9(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function qy(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return T9(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",T9(i,t)).replace("{{time}}",S9(s,t))}var eC={p:S9,P:qy},tC=eC,nC=["D","DD"],iC=["YY","YYYY"];function aC(e){return nC.indexOf(e)!==-1}function rC(e){return iC.indexOf(e)!==-1}function x9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var sC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oC=/^'([^]*?)'?$/,cC=/''/g,uC=/[a-zA-Z]/;function dC(e,t,n){Vt(2,arguments);var i=String(t),s=n||{},o=s.locale||Ry,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:bn(f),p=s.weekStartsOn==null?m:bn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var y=an(e);if(!ty(y))throw new RangeError("Invalid time value");var b=qb(y),v=_y(y,b),k={firstWeekContainsDate:u,weekStartsOn:p,locale:o,_originalDate:y},T=i.match(lC).map(function(L){var N=L[0];if(N==="p"||N==="P"){var C=tC[N];return C(L,o.formatLong,k)}return L}).join("").match(sC).map(function(L){if(L==="''")return"'";var N=L[0];if(N==="'")return fC(L);var C=Xy[N];if(C)return!s.useAdditionalWeekYearTokens&&rC(L)&&x9(L,t,e),!s.useAdditionalDayOfYearTokens&&aC(L)&&x9(L,t,e),C(v,L,o.localize,k);if(N.match(uC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return L}).join("");return T}function fC(e){return e.match(oC)[1].replace(cC,"'")}const vt={},D9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ca=/\d\d?/,hC=/\d{3}/,gC=/\d{4}/,yl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j9=function(){};function z9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function O9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Gn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const A9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],P9=["January","February","March","April","May","June","July","August","September","October","November","December"],mC=z9(P9,3),pC=z9(A9,3);vt.i18n={dayNamesShort:pC,dayNames:A9,monthNamesShort:mC,monthNames:P9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const E9={D(e){return e.getDay()},DD(e){return Gn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Gn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Gn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Gn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Gn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Gn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Gn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Gn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Gn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Gn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},mt={d:[ca,(e,t)=>{e.day=t}],M:[ca,(e,t)=>{e.month=t-1}],yy:[ca,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ca,(e,t)=>{e.hour=t}],m:[ca,(e,t)=>{e.minute=t}],s:[ca,(e,t)=>{e.second=t}],yyyy:[gC,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[hC,(e,t)=>{e.millisecond=t}],D:[ca,j9],ddd:[yl,j9],MMM:[yl,O9("monthNamesShort")],MMMM:[yl,O9("monthNames")],a:[yl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};mt.DD=mt.D,mt.dddd=mt.ddd,mt.Do=mt.dd=mt.d,mt.mm=mt.m,mt.hh=mt.H=mt.HH=mt.h,mt.MM=mt.M,mt.ss=mt.s,mt.A=mt.a,vt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},vt.format=(e,t,n)=>{const i=n||vt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=vt.masks[t]||t||vt.masks.default,t.replace(D9,s=>s in E9?E9[s](e,i):s.slice(1,s.length-1))},vt.parse=(e,t,n)=>{const i=n||vt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=vt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(D9,u=>{if(mt[u]){const f=mt[u],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return mt[u]?"":u.slice(1,u.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const uu=" - ",ui=(e,t)=>{const n=an(new Date(e));return!n||isNaN(n.getTime())?"":dC(n,t||"yyyy-MM-dd")},du=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ui(n,t)+uu+ui(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ui(e,t);return""},fu=(e,t)=>{const n=Array.isArray(e)?e:e.split(uu);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:vt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:vt.parse(s,t||"yyyy-MM-dd")]}return[]},Ya={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:du,parser:fu},datetimerange:{formatter:du,parser:fu},timerange:{formatter:du,parser:fu},time:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ui(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),vt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},ua=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},V9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),Cl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],J9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Qi=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ya[t]||Ya.default,c=i||J9[t],d=Ya.multiple.parser;let u=e;if(e&&t==="time"&&!(e instanceof Date))u=o(e,c);else if(n&&e)u=d(e,c);else if(s)if(!e)u=[null,null];else if(typeof e=="string")u=o(e,c);else if(t==="timerange")u=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?u=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?u=o(e.join(uu),c):(!f||!m)&&(u=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(u=o(e,c)||null);return s||n?u||[]:[u]},Zn=(e,t,n,i)=>{const s=J9[t];if(n){const{formatter:c}=Ya.multiple;return c(e,i||s)}const{formatter:o}=Ya[t]||Ya.default;return o(e,i||s)},Q9=Symbol("date-picker"),vl=Symbol("time-picker");function yn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const bC=(e,t)=>new Date(e,t+1,0).getDate(),R9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=bC(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},_9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],u=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,y=>e[y](s,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:u}}})(),da=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},yC=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function CC(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const vC=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},wC={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var hu=a.defineComponent({name:"DateTable",props:wC,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new Kb.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=da(new Date),y=s.value.filter(Boolean).map(da),[b,v]=s.value.map(da),k=e.rangeState.from&&da(e.rangeState.from),T=e.rangeState.to&&da(e.rangeState.to),L=e.selectionMode==="range",N=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(f,m,C=>{C.date instanceof Date&&C.date.setTime(C.date.getTime()+C.date.getTimezoneOffset()*6e4);const I=C.date&&da(C.date),M=C.date&&m===C.date.getMonth();return Se(Z({},C),{type:I===p?"today":C.type,selected:M&&y.includes(I),disabled:C.date&&N&&N(new Date(I)),range:M&&L&&yC(I,k,T),start:M&&L&&I===b,end:M&&L&&I===v})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(da(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const wl={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},Ml={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},MC={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},IC={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},W9=["hours","minutes","seconds"];var gu=a.defineComponent({name:"TimeSpinner",props:Z(Z({},IC),Ml),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((S,z)=>Math.abs(e.steps[z])||S),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const S=[],z=n.spinerSteps[0],j=n.focusedColumn===0&&n.focusedTime[0],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<24;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledHours.length&&e.disabledHours.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.hours===W&&(P.selected=!0),S.push(P)}return S}),s=a.computed(()=>{const S=[],z=n.spinerSteps[1],j=n.focusedColumn===1&&n.focusedTime[1],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledMinutes.length&&e.disabledMinutes.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.minutes===W&&(P.selected=!0),S.push(P)}return S}),o=a.computed(()=>{const S=[],z=n.spinerSteps[2],j=n.focusedColumn===2&&n.focusedTime[2],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledSeconds.length&&e.disabledSeconds.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.seconds===W&&(P.selected=!0),S.push(P)}return S}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,S=>{!n.compiled||k("hours",i.value.findIndex(z=>z.text===S))}),a.watch(()=>e.minutes,S=>{!n.compiled||k("minutes",s.value.findIndex(z=>z.text===S))}),a.watch(()=>e.seconds,S=>{!n.compiled||k("seconds",s.value.findIndex(z=>z.text===S))}),a.watch(()=>n.focusedTime,(S,z)=>{W9.forEach((j,O)=>{if(S[O]===z[O]||typeof S[O]=="undefined")return;const W=this[`${j}List`].findIndex(P=>P.text===S[O]);k(j,W)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(S){let z;return S==="hours"?z=C:S==="minutes"?z=I:z=M,z.value}function u(S){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:S.selected,["bk-time-picker-cells-cell-focused"]:S.focused,["bk-time-picker-cells-cell-disabled"]:S.disabled}]}function f(){const S=z=>{d(z).addEventListener("wheel",ot.exports.debounce(()=>{y(z)},32),{passive:!0})};S("hours"),S("minutes"),S("seconds")}function m(S){return d(S).querySelector("li").offsetHeight}function p(S){return d(S).offsetHeight}function y(S){const z=d(S),j=Math.min(Math.round((z.scrollTop-(p(S)*.5-10)/m(S)+3)/m(S)),S==="hours"?23:59);let O;if(S==="hours"?O=i:S==="minutes"?O=s:O=o,O.value.find(P=>P.text===j).disabled)return!1;a.nextTick(()=>{v({[S]:j})})}function b(S,z){if(z.disabled)return;const j={[S]:z.text};v(j)}function v(S){t("change",S),t("pick-click")}function k(S,z){const j=d(S),O=j.scrollTop,W=32*T(S,z);y2(j,O,W,500)}function T(S,z){const j=CC(S),O=e[`disabled${j}`];let W=z;if(O.length&&e.hideDisabledOptions){let P=0;O.forEach(G=>G<=z?P+=1:""),W-=P}return W}function L(){a.nextTick(()=>{W9.forEach(S=>{const z=d(S);let j;S==="hours"?j=i:S==="minutes"?j=s:j=o,z.scrollTop=32*j.value.findIndex(O=>O.text===e[S])})})}function N(S){return S<10?`0${S}`:S}const C=a.ref(null),I=a.ref(null),M=a.ref(null);return Se(Z({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:C,minutesRef:I,secondsRef:M,getCellCls:u,handleClick:b,updateScroll:L,padTime:N})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const NC={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var H9=a.defineComponent({name:"TimePanel",props:Z(Z(Z({},wl),Ml),NC),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||ua(),showDate:!1}),i=a.inject(vl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>vt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),u=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((T,L)=>(T[L]=this[L],T),{});const y=[24,60,60],v=["Hours","Minutes","Seconds"].map(k=>e[`disabled${k}`]).map((k,T)=>{const L=y[T],N=k;for(let C=0;C<L;C+=e.steps[T]||1){const I=d.value.map((S,z)=>z===T?C:S),M=vC(n.date,...I);e.disabledDate(M,!0)&&N.push(C)}return N.filter((C,I,M)=>M.indexOf(C)===I)});return p.reduce((k,T,L)=>(k[T]=v[L],k),{})});a.watch(()=>e.value,p=>{let y=p[0]||ua();y=new Date(y),n.date=y}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,y=!0){const b=new Date(n.date);Object.keys(p).forEach(v=>b[`set${Nr(v)}`](p[v])),y&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Se(Z({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:u,timeSpinnerRef:s,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(gu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const LC={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var kC=a.defineComponent({name:"DatePanel",props:LC,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=B=>B.match(/^time/)?"time-picker":`${B}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(vl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),u=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,B=>{n("selection-mode-change",B),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,B=>{o.currentView=B,o.pickerTable=i(B)}),a.watch(()=>e.modelValue,B=>{o.dates=B;const ie=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=ie||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=B=>{o.panelDate=B,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},y=(B,ie)=>{let oe=B;e.selectionMode==="year"?oe=new Date(B.getFullYear(),0,1):e.selectionMode==="month"?oe=new Date(o.panelDate.getFullYear(),B.getMonth(),1):oe=new Date(B),o.dates=[oe],n("pick",oe,!1,ie||e.selectionMode)},b=()=>{m(),n("pick-success")},v=()=>{m(),n("pick-clear")},k=B=>{B.value&&n("pick",B.value(),!1,void 0,B),B.onClick&&B.onClick(this),e.shortcutClose&&b()},T=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},L=B=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+B*10,0,1):o.panelDate=R9(o.panelDate,B*12)},N=B=>{o.panelDate=R9(o.panelDate,B)},C=B=>{var ie,oe;B&&((ie=u==null?void 0:u.value)==null||ie.updateScroll(),(oe=f==null?void 0:f.value)==null||oe.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?y:p),M=a.computed(()=>{const B="zh-CN",ie="[yyyy]-[mm]",oe=o.panelDate,{labels:ve,separator:Ie}=_9(B,ie,oe),me=ge=>()=>{o.pickerTable=i(ge)};return{separator:Ie,labels:ve.map(ge=>{const $=ge;return $.handler=me(ge.type),$})}}),S=a.computed(()=>M.value.labels[0].type==="year"||o.currentView==="date"),z=a.computed(()=>M.value.labels[1].type==="year"||o.currentView==="date"),j=a.computed(()=>o.currentView==="time"),O=()=>{o.currentView=o.currentView==="time"?"date":"time"},W=a.computed(()=>!!t.shortcuts),P=a.computed(()=>!o.dates[0]);function G(){n("pick-click")}return Se(Z({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:M,showLabelFirst:S,showLabelSecond:z,handleShortcutClick:k,changeYear:L,changeMonth:N,reset:T,isTime:j,hasShortcuts:W,timeDisabled:P,onToggleVisibility:C,handleToggleTime:O,handlePickSuccess:b,handlePickClear:v,handlePick:y,handlePickClick:G,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(hu,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(H9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(p9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const TC={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var B9=a.defineComponent({name:"TimeRangePanel",props:Z(Z(Z({},wl),Ml),TC),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||ua(),dateEnd:i||ua()}),o=a.inject(vl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>vt.format(o.dates[0],e.format)),u=a.computed(()=>vt.format(o.dates[1],e.format));a.watch(()=>e.value,T=>{const[L,N]=T.slice();s.dateStart=L||ua(),s.dateEnd=N||ua()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function f(){t("pick-click")}function m(T,L,N,C=!0){let I=new Date(s.dateStart),M=new Date(s.dateEnd);Object.keys(L).forEach(S=>{I[`set${Nr(S)}`](L[S])}),Object.keys(N).forEach(S=>{M[`set${Nr(S)}`](N[S])}),!e.allowCrossDay&&M<I&&(T==="start"&&(M=I),T==="end"&&(I=M)),C&&t("pick",[I,M],!0,"time")}function p(T){m("start",T,{})}function y(T){m("end",{},T)}const b=a.ref(null),v=a.ref(null);function k(){var T,L;(T=b==null?void 0:b.value)==null||T.updateScroll(),(L=v==null?void 0:v.value)==null||L.updateScroll()}return Se(Z({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:u,handleStartChange:p,handleEndChange:y,handlePickClick:f,updateScroll:k,timeSpinnerRef:b,timeSpinnerEndRef:v})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(gu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(gu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const SC={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var xC=a.defineComponent({name:"DateRangePanel",props:SC,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(H=>H||ua()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(vl,{dates:c.dates,parentName:d.$options.name});const u=(H,R)=>!H||!R?0:H.getTime()-R.getTime(),f=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),y=H=>{var R,ae;H&&((R=m==null?void 0:m.value)==null||R.updateScroll(),(ae=p==null?void 0:p.value)==null||ae.updateScroll())},b=(H,R,ae,D=!0)=>{const _=new Date(c[`${H}PanelDate`]);if(_[`set${R}`](_[`get${R}`]()+ae),c[`${H}PanelDate`]=_,!!D)if(e.splitPanels){const Q=H==="left"?"right":"left";H==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(Q,R,1),H==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(Q,R,-1)}else{const Q=H==="left"?"right":"left",se=c[`${Q}PanelDate`],ue=new Date(se);if(R==="Month"){const be=new Date(ue.getFullYear(),ue.getMonth()+ae+1,0).getDate();ue.setDate(Math.min(be,ue.getDate()))}ue[`set${R}`](ue[`get${R}`]()+ae),c[`${Q}PanelDate`]=ue}},v=H=>{const R=c.currentView==="year"?-10:-1;b(H,"FullYear",R)},k=H=>{const R=c.currentView==="year"?10:1;b(H,"FullYear",R)},T=H=>{b(H,"Month",-1)},L=H=>{b(H,"Month",1)},N=H=>{c[`${H}PickerTable`]="year-table"},C=H=>{c[`${H}PickerTable`]="month-table"},I=H=>{const R="zh-CN",ae="[yyyy]-[mm]",D=c[`${H}PanelDate`],{labels:_,separator:Q}=_9(R,ae,D),se=ue=>{const be=ue==="month"?C:N;return()=>be(H)};return{separator:Q,labels:_.map(ue=>{const be=ue;return be.handler=se(ue.type),be})}},M=(H,R)=>{n("pick",c.dates,H,R||e.type)},S=(H,R)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=H;else{const[ae,D]=[c.rangeState.from,H].sort(u),_=R==="upToNow"?new Date:new Date(new Date(new Date(D.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ae,_],c.rangeState={from:ae,to:_,selecting:!1}}M(!1,R||"date")}else c.upToNowEnable=new Date(H).getTime()<new Date().getTime(),c.rangeState={from:H,to:null,selecting:!0}},z=(H,R)=>{if(c[`${H}PanelDate`]=R,c[`${H}PickerTable`]==="year-table"?c[`${H}PickerTable`]="month-table":c[`${H}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const D=H==="left"?"right":"left";c[`${D}PanelDate`]=R,b(D,"Month",D==="left"?-1:1,!1)}},j=(H,R)=>{if(!(H!=null&&H.value))return!1;H.onClick&&H.onClick(H,R);const ae=typeof H.value=="function"?H.value():H.value,[D,_]=ae;c.rangeState.from=D,c.rangeState.to=_,c.dates=[D,_],n("pick",ae,!1,"shortcut",H),e.shortcutClose&&n("pick-success")},O=H=>{c.rangeState.to=H};function W(H){c.leftPanelDate=H;const R=new Date(H.getFullYear(),H.getMonth()+1,1),ae=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ae,R.getTime())):R}a.watch(()=>e.selectionMode,H=>{c.currentView=H||"range"}),a.watch(()=>e.modelValue,H=>{const R=H[0]?an(H[0]):null,ae=H[1]?an(H[1]):null;c.dates=[R,ae].sort(u),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},W(e.startDate||c.dates[0]||new Date)}),a.watch(()=>c.currentView,H=>{const R=c.leftPanelDate.getMonth(),ae=c.rightPanelDate.getMonth(),D=c.leftPanelDate.getFullYear()===c.rightPanelDate.getFullYear();H==="date"&&D&&R===ae&&b("right","Month",1),H==="month"&&D&&b("right","FullYear",1),H==="year"&&D&&b("right","FullYear",10),c.currentView==="time"&&a.nextTick(()=>{q.value.updateScroll()})});const P=a.computed(()=>c.currentView==="time"),G=a.computed(()=>I("left")),B=a.computed(()=>I("right")),ie=a.computed(()=>c.leftPickerTable.split("-").shift()),oe=a.computed(()=>c.rightPickerTable.split("-").shift()),ve=a.computed(()=>G.value.labels[0].type==="year"||c.currentView==="date"),Ie=a.computed(()=>G.value.labels[1].type==="year"||c.currentView==="date"),me=a.computed(()=>B.value.labels[0].type==="year"||c.currentView==="date"),ge=a.computed(()=>B.value.labels[1].type==="year"||c.currentView==="date"),$=a.computed(()=>{const H=`${c.currentView}-table`;return{left:c.leftPickerTable!==H,right:c.rightPickerTable!==H}}),U=a.computed(()=>({left:$.value.left?z.bind("left"):S,right:$.value.right?z.bind("right"):S})),V=a.computed(()=>{var H;return t.shortcuts||((H=e.shortcuts)==null?void 0:H.length)}),J=()=>{c.currentView=c.currentView==="time"?"date":"time"},re=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},K=()=>{re(),n("pick-success")},X=()=>{re(),n("pick-clear")};function de(){n("pick-click")}const we=a.computed(()=>!(c.dates[0]&&c.dates[1])),q=a.ref(null);return Se(Z({},a.toRefs(c)),{isTime:P,hasShortcuts:V,prevYear:v,nextYear:k,prevMonth:T,nextMonth:L,leftDatePanelLabel:G,rightDatePanelLabel:B,leftDatePanelView:ie,rightDatePanelView:oe,leftShowLabelFirst:ve,leftShowLabelSecond:Ie,rightShowLabelFirst:me,rightShowLabelSecond:ge,preSelecting:$,panelPickerHandlers:U,timeDisabled:we,handleShortcutClick:j,reset:f,onToggleVisibility:y,handleRangePick:S,handleChangeRange:O,handleToggleTime:J,handlePickSuccess:K,handlePickClear:X,handlePickClick:de,timePickerRef:q})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(hu,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(Tr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(hu,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(B9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(p9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),e])}}),DC=a.defineComponent({name:"DatePicker",directives:{clickoutside:jn},props:wl,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=V9(c)?o:Qi(e.value||e.modelValue,e.type,e.multiple,e.format),u=null;e.shortcutSelectedIndex!==-1&&(u=e.shortcuts[e.shortcutSelectedIndex]||null,u&&(d=u.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(Cl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:u,onSelectionModeChange:m});function m(H){let R=H;return H.match(/^date/)&&(R="date"),f.selectionMode=["year","month","date","time"].indexOf(R)>-1&&R,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const H=e.type.includes("range");let R=f.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(R=R.map(ae=>Zn(ae,e.type,e.multiple,e.format))),H||e.multiple?R:R[0]}),y=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Zn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(H=>Zn(H,e.type,e.multiple,e.format)):Zn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),k=a.computed(()=>Zn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?f.shortcut.text:k.value}),L=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),M=a.computed(()=>!!t.confirm),S=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-font":e.fontSize==="large"&&(H="large-font"),H}),z=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-width":e.fontSize==="large"&&(H="large-width"),H}),j=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),W=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),G=()=>{var H;(H=P==null?void 0:P.value)==null||H.focus()};a.watch(()=>f.visible,H=>{var R,ae;H===!1&&((R=B.value)==null||R.destoryDropdown()),(ae=B.value)==null||ae.updateDropdown(),n("open-change",H)});const B=a.ref(null);a.watch(()=>e.modelValue,H=>{var R;f.internalValue=Qi(H,e.type,e.multiple,e.format),e.withValidate&&((R=i==null?void 0:i.validate)==null||R.call(i,"change"))}),a.watch(()=>e.open,H=>{f.visible=H===!0}),a.watch(()=>e.type,H=>{m(H)}),a.watch(()=>p,(H,R)=>{const ae=JSON.stringify(H),D=JSON.stringify(R);(ae!==D||typeof H!=typeof R)&&n("input",H)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const H=e.modelValue,R=p.value;(typeof H!=typeof R||JSON.stringify(H)!==JSON.stringify(R))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(Q9,{props:e,focus:()=>G()})});const ie=a.ref(null),oe=H=>{var R;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(H&&H.type==="mousedown"&&f.visible){H.preventDefault(),H.stopPropagation();return}if(f.visible){const ae=(R=ie==null?void 0:ie.value)==null?void 0:R.$el;if(H&&ae&&ae.contains(H.target))return;f.visible=!1,H==null||H.preventDefault(),H==null||H.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ve=()=>{var H,R;(H=P==null?void 0:P.value)==null||H.focus(),(R=P==null?void 0:P.value)==null||R.click()},Ie=()=>{e.readonly||e.disabled||k!=null&&k.value&&(f.showClose=!0)},me=H=>{f.showClose=!1},ge=H=>{a.nextTick(()=>{var R;n("update:modelValue",p.value),n("change",y.value,H),e.type.indexOf("time")<0&&((R=P==null?void 0:P.value)==null||R.blur())})},$=H=>{var be;const R=e.type.includes("range")||e.multiple,ae=k.value,D=H.target.value,_=Qi(D,e.type,e.multiple,e.format),Q=R?_:_[0],se=(be=e.disabledDate)==null?void 0:be.call(e,Q),ue=_.reduce((te,le)=>te&&le instanceof Date,!0);D!==ae&&!se&&ue?(ge(e.type),f.internalValue=_):f.forceInputRerender=f.forceInputRerender+1},U=H=>{e.readonly||(f.isFocused=!0,!(H&&H.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var H;(H=ie==null?void 0:ie.value)==null||H.reset()},J=H=>{var R,ae;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){H.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(R=ie==null?void 0:ie.value)==null||R.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},re=H=>{const{keyCode:R}=H;if(R===9&&f.visible)if(H.stopPropagation(),H.preventDefault(),L.value){const D=".bk-picker-confirm > *",_=B.value.$el.querySelectorAll(D);f.internalFocus=!0,[..._][H.shiftKey?"pop":"shift"]().focus()}else oe();const ae=[37,38,39,40];if(!f.visible&&ae.includes(R)){f.visible=!0;return}R===27&&f.visible&&(H.stopPropagation(),oe()),!!ae.includes(R)&&f.focusedTime.active&&H.preventDefault()},K=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),ge(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},X=()=>{var H;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(H=P==null?void 0:P.value)==null||H.blur(),V()},de=(H,R=!1,ae,D)=>{let _=H;if(e.multiple){const se=_.getTime(),ue=f.internalValue.findIndex(le=>le&&le.getTime()===se),te=[...f.internalValue,_].filter(Boolean).map(le=>le.getTime()).filter((le,he,ke)=>ke.indexOf(le)===he&&he!==ue);f.internalValue=te.map(le=>new Date(le))}else _=Qi(H,e.type,e.multiple,e.format),f.internalValue=Array.isArray(_)?_:[_];if(f.internalValue[0]){const[se]=f.internalValue;f.focusedDate=se}f.focusedTime=Se(Z({},f.focusedTime),{time:f.internalValue.map(Cl)}),L.value||(m(e.type),f.visible=R),ae==="upToNow"&&e.type==="daterange"&&X(),f.shortcut=D,ge(ae);const Q=e.shortcuts.findIndex(se=>se===f.shortcut);n("shortcut-change",f.shortcut,Q)},we=a.ref(null),q=()=>{var H,R;(R=(H=ie.value).handleToggleTime)==null||R.call(H)};return Se(Z({},a.toRefs(f)),{panel:b,publicStringValue:y,opened:v,visualValue:k,displayValue:T,isConfirm:L,hasHeader:N,hasFooter:C,hasShortcuts:I,hasConfirm:M,fontSizeCls:S,longWidthCls:z,localReadonly:j,allowCrossDayProp:W,ownPickerProps:O,pickerDropdownRef:B,inputRef:P,triggerRef:we,pickerPanelRef:ie,handleClose:oe,handleIconClick:ve,handleInputMouseenter:Ie,handleInputMouseleave:me,handleFocus:U,handleBlur:J,handleKeydown:re,handleInputChange:$,handleClear:K,onPick:de,onPickSuccess:X,handleToggleTime:q})},render(){var s,o,c;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var d,u;return((u=(d=this.$slots).shortcuts)==null?void 0:u.call(d,{change:this.onPick}))||null}}:{},n=this.hasConfirm?{confirm:this.$slots.confirm}:{},i=Z(Z({},t),n);return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(c=(o=(s=this.$slots).trigger)==null?void 0:o.call(s))!=null?c:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(ou,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var d,u,f,m,p,y;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(u=(d=this.$slots).header)==null?void 0:u.call(d))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(xC,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i):a.createVNode(kC,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(y=(p=(m=this.$slots).footer)==null?void 0:p.call(m))!=null?y:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),jC=a.defineComponent({name:"TimePicker",directives:{clickoutside:jn},props:Z(Z(Z({},wl),MC),Ml),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=V9((s?e.modelValue:[e.modelValue])||[])?o:Qi(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(Cl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(q){let H=q;return q.match(/^date/)&&(H="date"),u.selectionMode=["year","month","date","time"].indexOf(H)>-1&&H,u.selectionMode}const m=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const q=e.type.includes("range");let H=u.internalValue.map(R=>R instanceof Date?new Date(R):R||"");return e.type.match(/^time/)&&(H=H.map(R=>Zn(R,e.type,e.multiple,e.format))),q||e.multiple?H:H[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Zn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(q=>Zn(q,e.type,e.multiple,e.format)):Zn(m.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?u.visible:e.open),v=a.computed(()=>Zn(u.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var q;return((q=u.shortcut)==null?void 0:q.text)&&e.useShortcutText?u.shortcut.text:v.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),L=a.computed(()=>!!t.header),N=a.computed(()=>!!t.footer),C=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let q="";return e.fontSize==="medium"?q="medium-font":e.fontSize==="large"&&(q="large-font"),q}),M=a.computed(()=>{let q="";return e.fontSize==="medium"?q="medium-width":e.fontSize==="large"&&(q="large-width"),q}),S=a.computed(()=>{var q;return((q=u.shortcut)==null?void 0:q.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),j=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),O=a.ref(null),W=()=>{var q;(q=O==null?void 0:O.value)==null||q.focus()},{proxy:P}=a.getCurrentInstance();a.watch(()=>u.visible,q=>{q&&a.nextTick(()=>{var H,R;(R=(H=P.pickerPanelRef)==null?void 0:H.timeSpinnerRef)==null||R.updateScroll()})});const G=a.ref(null);a.watch(()=>e.modelValue,q=>{var H;u.internalValue=Qi(q,e.type,e.multiple,e.format),e.withValidate&&((H=i==null?void 0:i.validate)==null||H.call(i,"change"))}),a.watch(()=>e.open,q=>{u.visible=q===!0}),a.watch(()=>e.type,q=>{f(q)}),a.watch(()=>m,(q,H)=>{const R=JSON.stringify(q),ae=JSON.stringify(H);(R!==ae||typeof q!=typeof H)&&n("input",q)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const q=e.modelValue,H=m.value;(typeof q!=typeof H||JSON.stringify(q)!==JSON.stringify(H))&&n("input",m.value),e.open!==null&&(u.visible=e.open),a.provide(Q9,{props:e,focus:()=>W()})});const B=a.ref(null),ie=q=>{var H;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(q&&q.type==="mousedown"&&u.visible){q.preventDefault(),q.stopPropagation();return}if(u.visible){const R=(H=B==null?void 0:B.value)==null?void 0:H.$el;if(q&&R&&R.contains(q.target))return;u.visible=!1,q==null||q.preventDefault(),q==null||q.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},oe=()=>{var q,H;(q=O==null?void 0:O.value)==null||q.focus(),(H=O==null?void 0:O.value)==null||H.click()},ve=()=>{e.readonly||e.disabled||v!=null&&v.value&&(u.showClose=!0)},Ie=q=>{u.showClose=!1},me=q=>{a.nextTick(()=>{var H;n("update:modelValue",m.value),n("change",p.value,q),e.type.indexOf("time")<0&&((H=O==null?void 0:O.value)==null||H.blur())})},ge=q=>{var ue;const H=e.type.includes("range")||e.multiple,R=v.value,ae=q.target.value,D=Qi(ae,e.type,e.multiple,e.format),_=H?D:D[0],Q=(ue=e.disabledDate)==null?void 0:ue.call(e,_),se=D.reduce((be,te)=>be&&te instanceof Date,!0);ae!==R&&!Q&&se?(me(e.type),u.internalValue=D):u.forceInputRerender=u.forceInputRerender+1},$=q=>{e.readonly||(u.isFocused=!0,!(q&&q.type==="focus")&&(e.disabled||(u.visible=!0)))},U=()=>{var q,H;(H=(q=B==null?void 0:B.value)==null?void 0:q.reset)==null||H.call(q)},V=q=>{var H,R;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){q.preventDefault();return}u.isFocused=!1,f(e.type),u.internalValue=u.internalValue.slice(),U(),(H=B==null?void 0:B.value)==null||H.onToggleVisibility(!1),(R=i==null?void 0:i.validate)==null||R.call(i,"blur")},J=q=>{const{keyCode:H}=q;if(H===9&&u.visible)if(q.stopPropagation(),q.preventDefault(),T.value){const ae=".bk-picker-confirm > *",D=G.value.$el.querySelectorAll(ae);u.internalFocus=!0,[...D][q.shiftKey?"pop":"shift"]().focus()}else ie();const R=[37,38,39,40];if(!u.visible&&R.includes(H)){u.visible=!0;return}H===27&&u.visible&&(q.stopPropagation(),ie()),!!R.includes(H)&&u.focusedTime.active&&q.preventDefault()},re=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),me(e.type),U(),u.showClose=!1,u.shortcut=null,setTimeout(()=>f(e.type),500)},K=()=>{e.appendToBody&&(u.disableCloseUnderTransfer=!0)},X=()=>{var q;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(q=O==null?void 0:O.value)==null||q.blur(),U()},de=(q,H=!1,R,ae)=>{let D=q;if(e.multiple){const Q=D.getTime(),se=u.internalValue.findIndex(te=>te&&te.getTime()===Q),be=[...u.internalValue,D].filter(Boolean).map(te=>te.getTime()).filter((te,le,he)=>he.indexOf(te)===le&&le!==se);u.internalValue=be.map(te=>new Date(te))}else D=Qi(q,e.type,e.multiple,e.format),u.internalValue=Array.isArray(D)?D:[D];if(u.internalValue[0]){const[Q]=u.internalValue;u.focusedDate=Q}u.focusedTime=Se(Z({},u.focusedTime),{time:u.internalValue.map(Cl)}),T.value||(f(e.type),u.visible=H),R==="upToNow"&&e.type==="daterange"&&X(),u.shortcut=ae,me(R);const _=e.shortcuts.findIndex(Q=>Q===u.shortcut);n("shortcut-change",u.shortcut,_)},we=a.ref(null);return Se(Z({},a.toRefs(u)),{panel:y,publicStringValue:p,opened:b,visualValue:v,displayValue:k,isConfirm:T,hasHeader:L,hasFooter:N,hasShortcuts:C,fontSizeCls:I,longWidthCls:M,localReadonly:S,allowCrossDayProp:j,ownPickerProps:z,pickerDropdownRef:G,inputRef:O,triggerRef:we,pickerPanelRef:B,handleClose:ie,handleIconClick:oe,handleInputMouseenter:ve,handleInputMouseleave:Ie,handleFocus:$,handleBlur:V,handleKeydown:J,handleInputChange:ge,handleClear:re,handleTransferClick:K,onPick:de,onPickSuccess:X})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(ou,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,u,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(B9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(H9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(f=(u=this.$slots).footer)==null?void 0:f.call(u))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const F9=Ge(DC);var Yn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Yn||{});const zC={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function OC(e,t,n){const i=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(i.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):i.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:i,selectedList:s}}function AC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var PC=a.defineComponent({name:"Transfer",props:zC,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Yn.OBJECT_ARRAY:Yn.BASE_ARRAY:Yn.NOT_ARRAY),i=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Yn.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Yn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:u,selectedList:f}=OC(c,d,i),{selectSearchQuery:m,selectListSearch:p}=AC(u,s),y=a.computed(()=>[...p.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1})),b=a.computed(()=>[...f.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1}));a.watch(()=>[u,f],()=>{N()},{deep:!0});const v=(C,I)=>{const M=i.value;return C.some(S=>S[M]===I[M])&&I.disabled},k=()=>{u.value=[...c.value.filter(C=>v(u.value,C))],f.value=[...c.value.filter(C=>!v(u.value,C))],N()},T=()=>{u.value=[...c.value.filter(C=>!v(f.value,C))],f.value=[...c.value.filter(C=>v(f.value,C))],N()},L=(C,I)=>{if(C.disabled)return;const M=C[i.value],S=I?u:f,z=I?f:u,j=S.value.findIndex(O=>O[i.value]===M);z.value.push(...S.value.splice(j,1)),N()},N=()=>{const C=u.value.map(M=>M[i.value]),I=f.value.map(M=>M[i.value]);t("update:targetList",I),t("change",n.value===Yn.BASE_ARRAY?C:u.value.map(M=>a.toRaw(M)),n.value===Yn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),I)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:y,selectedListSort:b,settingCode:i,displayCode:s,allToRight:k,allToLeft:T,handleItemClick:L}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,y;const d=c==="left-header",u=d?`${(p=this.title[0])!=null?p:"\u6E90\u5217\u8868"}`:`${(y=this.title[1])!=null?y:"\u76EE\u6807\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${u}\uFF08${d?e.length:t.length}\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u9009\u62E9\u5168\u90E8":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",u=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[u])},s=(c,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":c.disabled}]},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(Xo,{class:"bk-icon icon-move"},null):a.createVNode(Hn,{class:"bk-icon icon-delete"},null)])]),o=c=>{const d=c==="left",u=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return u.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(p=>{var y,b,v;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p,d)},[(v=(b=(y=this.$slots)[f])==null?void 0:b.call(y,p))!=null?v:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ia,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u641C\u7D22"},{prefix:()=>a.createVNode(Wa,{class:"icon-search"},null)}),o("left")]),a.createVNode(fc,{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const G9=Ge(PC);var di=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop",e))(di||{});const Ri=(...e)=>!0,EC={nodeClick:Ri,nodeCollapse:Ri,nodeExpand:Ri,nodeChecked:Ri,nodeDragStart:Ri,nodeDragOver:Ri,nodeDragLeave:Ri,nodeDrop:Ri};var fe=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(fe||{});const _i={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Z9=(e=>(e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse",e))(Z9||{});const VC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:Oe("columnType",{}).def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([Oe("TreeSearchMatchType",{}).def("fuzzy"),g.func]),resultType:Oe("treeSearchResultType",{}).def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),disableDrag:g.func.def(null),disableDrop:g.func.def(null),dragSort:g.bool.def(!1),selectable:g.oneOfType([g.bool,g.func]).def(!0),disabledFolderSelectable:g.bool.def(!1),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0),expandAll:g.bool.def(!1),nodeContentAction:g.oneOfType([g.arrayOf(Oe("nodeContentActionType",{}).def(Z9.CLICK)),g.func.def(()=>["selected"])]).def(["selected","expand","click"])};var JC=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Us,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),Il=(e,t)=>{const n=P=>e.schema.get(P),i=(P,G)=>{var B;return(B=n(P[fe.UUID]))==null?void 0:B[G]},s=(P,G,B)=>{e.schema.set(P[fe.UUID],Se(Z({},n(P[fe.UUID])),{[G]:B}))},o=P=>i(P,fe.PATH),c=P=>i(P,fe.UUID),d=P=>i(P,fe.IS_ROOT),u=P=>i(P,fe.IS_OPEN),f=P=>i(P,fe.HAS_CHILD),m=P=>i(P,fe.IS_MATCH),p=P=>i(P,fe.IS_CHECKED),y=P=>i(P,fe.PARENT_ID),b=P=>i({[fe.UUID]:P},fe.PARENT_ID),v=P=>i(P,fe.IS_LOADING),k=(P,G)=>{s(P,fe.IS_LOADING,G)},T=P=>e.schema.delete(P),L=P=>n(y(P)),N=P=>{var G;return typeof P=="object"?u(P):typeof P=="string"?(G=n(P))==null?void 0:G[fe.IS_OPEN]:!1},C=P=>N(i(P,fe.PARENT_ID)),I=P=>d(P)||C(P),M=P=>P.split("-").reduce((B,ie)=>{const oe=Number(ie);return Array.isArray(B)?B[oe]:B[t.children][oe]},t.data),S=P=>{const G=e.schema;return Array.prototype.filter.call(Array.from(G.keys()),B=>G.get(B)[fe.PARENT_ID]===P[fe.UUID])},z=P=>M(o({[fe.UUID]:P})),j=P=>d({[fe.UUID]:P})?{[t.children]:t.data}:z(b(P)),O=P=>({[_i[fe.IS_LOADING]]:i(P,fe.IS_LOADING),[_i[fe.HAS_CHILD]]:f(P),[_i[fe.IS_MATCH]]:m(P),[_i[fe.IS_CHECKED]]:p(P),[_i[fe.IS_OPEN]]:u(P),[_i[fe.IS_ROOT]]:d(P),fullPath:i(P,fe.PATH),uuid:c(P),parentId:i(P,fe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:y,getNodeParentIdById:b,getParentNodeData:j,getParentNode:L,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:u,hasChildNode:f,isItemOpen:N,isNodeChecked:p,isNodeMatched:m,isNodeLoading:v,checkNodeIsOpen:I,getSourceNodeByPath:M,getSourceNodeByUID:z,deleteNodeSchema:T,resolveScopedSlotParam:O,setTreeNodeLoading:k,extendNodeAttr:P=>Se(Z({},P),{[fe.TREE_NODE_ATTR]:O(P)}),getChildNodes:S}};const Y9="1px dashed #c3cdd7",U9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:$9(n,e,t,o)},$9=(e,t,n,i=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},K9=(e,t)=>$9(e,t,"label"),mu=(e,t)=>e.get(t)||{},QC=(e,t,n)=>{var i;return(i=mu(e,t))==null?void 0:i[n]},RC=(e,t)=>({"--level-line":U9(t,"levelLine",e,Y9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),_C=(e,t,n={})=>{const{schema:i}=n,s=QC(i,e[fe.UUID],fe.DEPTH);return Z({"--depth":s},typeof t.levelLine=="function"?{"--level-line":U9(t,"levelLine",e,Y9,null,["node"])}:{})},WC=(e,t,n)=>{const{__is_root:i,__is_open:s}=mu(t,e[fe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},HC=(e,t)=>{const{__is_checked:n,__is_selected:i}=mu(t,e[fe.UUID])||{};return{"is-checked":n,"is-selected":i,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[Ve("node-row")]:!0}},BC=(e,t,n,i,s)=>{FC(e,t,n,{[i]:s})},FC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,i||{})},Gr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[fe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,fe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var X9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Il(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,fe.IS_OPEN,!0);const y=Array.isArray(m)?m:[m];return BC(i(p),e.data,e.children,e.children,y),Promise.resolve(m)}return Promise.resolve(m)},u=m=>{const{callback:p=null,cache:y=!0}=e.async||{};if(typeof p=="function"&&s(m,fe.IS_ASYNC)){if(n(m,fe.IS_ASYNC_INIT,!0),!s(m,fe.IS_CACHED)){n(m,fe.IS_CACHED,y);const b=o(m),v=p(m,k=>d(k,m),b);if(typeof v=="object"&&v!==null)return c(m,!0),v instanceof Promise?Promise.resolve(v.then(k=>d(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{c(m,!1),n(m,fe.IS_CACHED,!0)})):(d(v,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>s(p,fe.IS_ASYNC)&&p[_i[fe.IS_OPEN]]&&!s(p,fe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>u(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:u,deepAutoOpen:f}},GC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:u,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:y,isRootNode:b,hasChildNode:v,isItemOpen:k,isNodeOpened:T,isNodeLoading:L,isNodeChecked:N,getParentNode:C,resolveScopedSlotParam:I,extendNodeAttr:M}=Il(n,e),{registerNextLoop:S}=o,{asyncNodeClick:z,deepAutoOpen:j}=X9(e,n),O=R=>k(R)?a.createVNode(ac,{class:[Ve("tree-icon"),Ve("node-prefix")]},null):a.createVNode(rc,{class:[Ve("tree-icon"),Ve("node-prefix")]},null),W=R=>{if(typeof R=="string")return R;if(typeof R=="object"&&R!==null){if(R.__v_isVNode)return R;const{node:ae,className:D,text:_,style:Q}=R;return a.h(ae,{class:D,style:Q},_)}return null},P=R=>{var ae,D,_;return((_=(D=(ae=t.slots).nodeLoading)==null?void 0:D.call(ae,M(R)))!=null?_:L(R))?a.createVNode(Dr,null,null):""},G=R=>{if(t.slots.nodeAction)return t.slots.nodeAction(M(R));let ae=null;return L(R)?P(R):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(R),"node_action"),ae!=="default")?W(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(v(R)||R.async||!e.autoCheckChildren)?k(R)?a.createVNode(Rs,{class:Ve("node-prefix")},null):a.createVNode(Gs,{class:Ve("node-prefix")},null):null},B=R=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(M(R));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(R),"node_type"),ae!=="default")?W(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(R)||v(R)?O(R):a.createVNode(dc,{class:[Ve("tree-icon"),Ve("node-prefix")]},null):null},ie=(R,ae)=>{const D=C(R);D&&(d(D,fe.IS_CHECKED,ae),b(D)||ie(D,ae))},oe=(R,ae,D)=>{y(R).forEach(_=>{d({[fe.UUID]:_},ae,D),oe({[fe.UUID]:_},ae,D)})},ve=(R,ae)=>{d(R,fe.IS_CHECKED,!!ae),oe(R,fe.IS_CHECKED,!!ae),ie(R,ae),t.emit(di.NODE_CHECKED,s.value.filter(D=>N(D)).map(D=>D[fe.UUID]))},Ie=R=>N(R)&&!s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(R))}).every(ae=>N(ae)),me=R=>N(R)||s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(R))}).some(ae=>N(ae)),ge=R=>e.showCheckbox?a.createVNode(ji,{size:"small",modelValue:me(R),indeterminate:Ie(R),onChange:ae=>ve(R,ae)},null):null,$=(R,ae=null,D=null,_=!0)=>{const Q=ae===null?!k(R):!!ae;if(Q||oe(R,fe.IS_OPEN,Q),d(R,fe.IS_OPEN,Q),_){const se=k(R)?di.NODE_EXPAND:di.NODE_COLLAPSE;t.emit(se,R,I(R),f(R[fe.UUID]),D)}},U=(R,ae,D)=>{if(Array.isArray(R)){R.forEach(_=>d(Gr(_),ae,D));return}d(Gr(R),ae,D)},V=(R,ae=!0,D=!1)=>{const _=Gr(R);if(!_[fe.IS_NULL])if(D)if(ae){if(U(_,fe.IS_OPEN,!0),!b(_)){const Q=m(_,fe.PARENT_ID);V(Q,!0,!0)}}else $(_,!1,null,!1);else U(_,fe.IS_OPEN,ae)},J=(R,ae)=>{if(T(R)){$(R,!1,ae);return}z(R).finally(()=>{m(R,fe.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>$(R,!0,ae)}):$(R,!0,ae)})},re=(R,ae)=>{R.stopImmediatePropagation(),R.stopPropagation(),R.preventDefault(),J(ae,R)},K=(R,ae=!0,D=!0)=>{const _=Array.isArray(R)?R:[R];if(!_.length)return;const Q=Gr(_[0]);if(!Q[fe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(R)||e.disabledFolderSelectable&&(R==null?void 0:R.is_folder)===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}c!=null&&d({[fe.UUID]:c},fe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[fe.UUID]:e.selected},fe.IS_SELECTED,!ae),d(Q,fe.IS_SELECTED,ae),c=p(Q),D&&_.length===1&&V(Q,!0,!0),m(Q,fe.IS_ASYNC)&&z(Q).then(()=>{a.nextTick(()=>{_.shift(),K(_,ae,D)})})}},X=R=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,globalThis,[{node:R}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],de=(R,ae)=>{const D=X(R);if(D.includes("selected")&&K(R,!0,!1),D.includes("expand")&&(T(R)||J(R,ae)),D.includes("collapse")&&T(R)&&J(R,ae),D.includes("click")){const _=di.NODE_CLICK;t.emit(_,R,I(R),f(R[fe.UUID]),ae)}},we=(R,ae)=>{if(b(ae))return!1;const D=u(ae),_=`${D}`.split("-").slice(0,R+1);if(_.join("-")===D)return!0;const se=_.pop(),ue=parseInt(se,10);_.push(`${ue+1}`);const be=_.join("-");return s.value.some(te=>te[fe.PATH]===be)},q=R=>{if(!e.levelLine)return null;const ae=_=>({"--depth":_}),D=m(R,fe.DEPTH)+1;return new Array(D).fill("").map((_,Q)=>Q).filter(_=>we(_,R)).filter(_=>_>0).map(_=>a.createVNode("span",{class:"node-virtual-line",style:ae(D-_)},null))};return{renderTreeNode:R=>{var ae,D,_,Q,se;return a.createVNode("div",{"data-tree-node":p(R),key:p(R),class:HC(R,n.schema)},[a.createVNode("div",{class:WC(R,n.schema,e),style:_C(R,e,n),onClick:ue=>de(R,ue)},[a.createVNode("div",{class:[Ve("node-action")],onClick:ue=>re(ue,R)},[G(R)]),a.createVNode("div",{class:Ve("node-content")},[[ge(R),B(R)],a.createVNode("span",{class:Ve("node-text")},[(_=(D=(ae=t.slots).node)==null?void 0:D.call(ae,M(R)))!=null?_:[K9(R,e)]]),(se=(Q=t.slots).nodeAppend)==null?void 0:se.call(Q,M(R))]),q(R)])])},handleTreeNodeClick:J,deepAutoOpen:j,asyncNodeClick:z,setNodeAction:U,setNodeOpened:$,setSelect:K,setOpen:V}},ZC=(e,t,n,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:o,getParentNodeData:c,getNodeAttr:d,getNodePath:u,isRootNode:f}=Il(i,e),m=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),y=z=>z.target.closest("[data-tree-node]"),b=z=>{var O;const j=(O=z==null?void 0:z.dataset)==null?void 0:O.treeNode;return s(j)},v=z=>{y(z).removeEventListener("mouseup",v)},k=z=>{const j=y(z),O=b(j);if(O.draggable===!1||m.value&&e.disableDrag(O)){j.classList.add("bk-tree-drag-disabled");return}j.setAttribute("draggable","true"),j.addEventListener("mouseup",v)},T=z=>{z.preventDefault();const j=y(z),O=b(j);if(t.emit(di.NODE_DRAG_OVER,z,j,O),p.value&&(e==null?void 0:e.disableDrop(O))){z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="none",j.classList.add("bk-tree-drop-disabled");return}j.classList.add("bk-tree-drop-active");const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node"),G=C(W,P)?"move":"none";z.dataTransfer.effectAllowed=G,z.dataTransfer.dropEffect=G},L=z=>{z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="move";const j=y(z);z.dataTransfer.setData("text/plain",""),z.dataTransfer.setData("node-id",j.getAttribute("data-tree-node")),t.emit(di.NODE_DRAG_START,z,j)},N=z=>{z.preventDefault(),z.stopPropagation();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");const O=b(j);if(p.value&&e.disableDrop(O))return;const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node");Reflect.apply(e.dragSort?I:M,globalThis,[W,P]),t.emit(di.NODE_DROP,z,j,O)},C=(z,j)=>{const O=u({[fe.UUID]:z}),W=u({[fe.UUID]:j}),P=o(z),G=o(j);return P===G?!0:O.indexOf(W)===-1&&W.indexOf(O)===-1},I=(z,j)=>{if(!C(z,j))return;const O=JSON.parse(JSON.stringify(s(z))),W=JSON.parse(JSON.stringify(s(j))),P=c(z),G=c(j),B=d({[fe.UUID]:z},fe.INDEX),ie=d({[fe.UUID]:j},fe.INDEX);P==null||P[e.children].splice(B,1,W),G==null||G[e.children].splice(ie,1,O)},M=(z,j)=>{const O=s(z),W=s(j);let P=null;if(f({[fe.UUID]:z}))P=e.data;else{const G=o(z);if(G!=null){P=s(G);const B=d({[fe.UUID]:z},fe.INDEX);P==null||P[e.children].splice(B,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(O)},S=z=>{z.preventDefault();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),t.emit(di.NODE_DRAG_LEAVE,z,j)};a.onMounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.addEventListener("mousedown",k),z.addEventListener("dragstart",L),z.addEventListener("dragover",T),z.addEventListener("dragleave",S),z.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.removeEventListener("mousedown",k),z.removeEventListener("dragstart",L),z.removeEventListener("dragover",T),z.removeEventListener("dragleave",S),z.removeEventListener("drop",N)}})},YC=e=>{var y;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(y=e.search)!=null?y:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,v)=>b===v,c=(b,v)=>new RegExp(`${b}`,"i").test(`${v}`),d=(b,v)=>Reflect.apply(b,globalThis,v),u=t.value===void 0||t.value===!1,f=(b,v)=>{if(u)return!0;if(s(t.value))return d(c,[t.value,b,v]);const{value:k="",match:T="fuzzy"}=t.value,N=typeof T=="function"?T:T==="fuzzy"?c:o;return`${k}`.length===0?!0:d(N,[k,b,v])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:u,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},UC=e=>{var T;const t=(L,N=void 0,C=[])=>{const{data:I,children:M}=L,S=[],z=[];let j=0;const O=new Map;function W(me,ge,$,U){if(me!=null&&O.has(me)&&![fe.UUID,fe.PARENT_ID].includes(ge)){const V=O.get(me);Object.prototype.hasOwnProperty.call(V,ge)&&typeof U=="function"&&Reflect.apply(U,self,[V,ge,$])&&(Object.assign(V,{[ge]:$}),W(V[fe.PARENT_ID],ge,$,U))}}function P(me){let ge=null;return typeof L.nodeKey=="string"&&(ge=me[L.nodeKey]||Li.v4()),ge||me[fe.UUID]||Li.v4()}const G={[fe.IS_OPEN]:()=>!!L.expandAll,[fe.IS_CHECKED]:()=>!1,[fe.IS_MATCH]:()=>!0,[fe.IS_SELECTED]:me=>L.selected===me,[fe.IS_CACHED]:()=>!1,[fe.IS_ASYNC]:()=>null,[fe.IS_LOADING]:()=>!1};function B(me,ge,$,U=void 0){let V=U;U===void 0&&typeof G[$]=="function"&&(V=G[$](me,ge));const J=_i[$];if(Object.prototype.hasOwnProperty.call(ge,J))return ge[J];const re=(C||[]).find(X=>X[fe.UUID]===me);let K;return re&&(K=re[$]),K==null&&(K=V),K}function ie(me,ge){return L.selectable?B(me,ge,fe.IS_SELECTED,L.selected===me):!1}function oe(me,ge,$){var J;const U=B(me,ge,fe.IS_OPEN),V=O.has($)?(J=O.get($))==null?void 0:J[fe.IS_OPEN]:!0;return U&&V}function ve(me){return!me[fe.IS_OPEN]}function Ie(me,ge=0,$=null,U=null){const V=me.length;for(let J=0;J<V;J++){const re=me[J];if(Array.isArray(re))Ie(re,ge,$,U);else if(typeof re=="object"&&re!==null){const K=U!==null?`${U}-${J}`:`${J}`,X=`${P(re)}`,de=!!(re[M]||[]).length;let we=B(X,re,fe.IS_OPEN);L.autoOpenParentNode?we&&W($,fe.IS_OPEN,!0,ve):we=oe(X,re,$),Object.assign(re,{[fe.UUID]:X});const q=L.showCheckbox&&B(X,re,fe.IS_CHECKED);q&&S.push(X),O.set(X,{[fe.DEPTH]:ge,[fe.INDEX]:J,[fe.UUID]:X,[fe.PARENT_ID]:$,[fe.HAS_CHILD]:de,[fe.PATH]:K,[fe.IS_ROOT]:$===null,[fe.ORDER]:j,[fe.IS_SELECTED]:ie(X,re),[fe.IS_MATCH]:B(X,re,fe.IS_MATCH),[fe.IS_OPEN]:we,[fe.IS_CHECKED]:q,[fe.IS_CACHED]:B(X,re,fe.IS_CACHED),[fe.IS_ASYNC]:B(X,re,fe.IS_ASYNC),[fe.IS_LOADING]:B(X,re,fe.IS_LOADING),[M]:null}),j+=1,z.push(Se(Z({},JSON.parse(JSON.stringify(re,(H,R)=>H===L.children?null:R))),{[fe.IS_OPEN]:we,[M]:null})),Object.prototype.hasOwnProperty.call(re,M)&&Ie(re[M]||[],ge+1,X,K)}}}return Ie(N||I),L.showCheckbox&&(S==null||S.forEach(me=>{Array.from(O.values()).filter(ge=>{var $;return($=ge[fe.PATH])==null?void 0:$.startsWith(O.get(me)[fe.PATH])}).forEach(ge=>Object.assign(ge,{[fe.IS_CHECKED]:!0})),W(me,fe.IS_CHECKED,!0,()=>!0)})),[z,O]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:u,deepAutoOpen:f}=X9(e,c),m=L=>{s.push(L)},p=(L,N,C=!0)=>{C&&i.has(L)&&i.delete(L),i.set(L,N)},y=L=>typeof L=="function"?{type:"loop",fn:L}:typeof L=="object"&&typeof L.type=="string"&&typeof L.fn=="function"?L:(console.error("loop event error",L),null),b=L=>{var C;const N=y(L);return N!==null&&Reflect.apply(N.fn,globalThis,[]),(C=N==null?void 0:N.type)!=null?C:"once"},v=()=>{Array.from(i.keys()).forEach(L=>{const N=i.get(L);if(Array.isArray(N)){const C=[];N.forEach((I,M)=>{b(I)==="once"&&C.unshift(M)}),C.length&&C.forEach(I=>N.splice(I,1)),N.length===0&&i.delete(L)}else b(N)==="once"&&i.delete(L)})};a.watch(()=>[e.data],L=>{var C,I;const N=t(e,L,d.value);c.data=N[0],c.schema=N[1],((C=e.async)==null?void 0:C.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&f(),v()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,L=>{o.length=0,s.forEach(N=>{Reflect.apply(N,globalThis,[L]),o.push(()=>Reflect.apply(N,globalThis,[L]))}),p("afterSelectWatch",o)},{immediate:!0})});const k=L=>{p("afterDataUpdate",L)};return(T=e.async)!=null&&T.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:u,deepAutoOpen:f,afterDataUpdate:k,registerNextLoop:p,onSelected:m}},$C=a.defineComponent({name:"Tree",props:VC,emits:EC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=UC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:u,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:y,isNodeMatched:b,hasChildNode:v}=Il(n,e),{searchFn:k,isSearchActive:T,refSearch:L,openResultNode:N,isTreeUI:C,isSearchDisabled:I}=YC(e);I||a.watch([L],()=>{n.data.forEach(ge=>{const $=k(K9(ge,e),ge);c(ge,fe.IS_MATCH,$),N&&W(ge,!0,!0)})});const M=ge=>{if(T.value){const $=()=>C?i.value.some(U=>{var V;return((V=U[fe.PATH])==null?void 0:V.startsWith(f(ge)))&&U[fe.IS_MATCH]}):!1;return u(ge,fe.IS_MATCH)||$()}return!0},S=a.computed(()=>n.data.filter(ge=>d(ge)&&M(ge))),{renderTreeNode:z,handleTreeNodeClick:j,setNodeOpened:O,setOpen:W,setNodeAction:P,setSelect:G,asyncNodeClick:B}=GC(e,t,n,S,i,{registerNextLoop:o}),ie=(ge,$=!0)=>{P(Gr(ge),fe.IS_CHECKED,$)};s(ge=>{G(ge,!0,e.autoOpenParentNode)});const oe=()=>n;t.expose({handleTreeNodeClick:j,isNodeChecked:y,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:v,setOpen:W,setChecked:ie,setNodeAction:P,setNodeOpened:O,setSelect:G,asyncNodeClick:B,getData:oe});const ve=a.ref(),{renderEmpty:Ie}=JC(e,t);ZC(e,t,ve,n);const me=ge=>{if(ge.length)return ge.map(z);const $=T.value?"search-empty":"empty";return Ie($)};return()=>a.createVNode(_r,{class:Ve("tree"),style:RC(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ve("container"),throttleDelay:0,ref:ve},{default:ge=>me(ge.data||[])})}});const q9=Ge($C),e3=e=>e.__v_isVNode;var KC=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(e3(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(e3(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const XC={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var qC=a.defineComponent({name:"Form",props:XC,emits:["submit"],setup(e,t){let n=[];const i=u=>{n.push(u)},s=u=>{n=n.reduce((f,m)=>(m!==u&&f.push(m),f),[])};return a.provide(n0,{props:e,register:i,unregister:s}),{handleSubmit:u=>{u.preventDefault(),t.emit("submit")},validate:u=>{let f={};return u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>p.property?Se(Z({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:u=>{let f={};u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>Se(Z({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=je({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}});const pu=e=>typeof e.message=="function"?e.message():e.message;var On={required:e=>typeof e=="number"||typeof e=="boolean"||Pa.isDate(e)?!0:!Pa.isEmpty(e),min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const e8={label:g.string,labelWidth:g.oneOfType([Number,String]).def(150),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},t8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n8=e=>{const t=[],n=e.label||"";return e.required&&t.push({required:!0,validator:On.required,message:`${n}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"change"}),e.email&&t.push({email:!0,validator:On.email,message:`${n}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"change"}),Number(e.max)>-1&&t.push({validator:i=>On.max(i,e.max),message:`${n}\u6700\u5927\u503C ${e.max}`,trigger:"change"}),Number(e.min)>-1&&t.push({validator:i=>On.min(i,e.min),message:`${n}\u6700\u5C0F\u503C ${e.min}`,trigger:"change"}),Number(e.maxlength)>-1&&t.push({validator:i=>On.maxlength(i,e.maxlength),message:`${n}\u6700\u5927\u957F\u5EA6 ${e.maxlength}`,trigger:"change"}),t},i8=(e,t)=>{let n=!1,i=!1;const s=e.reduce((c,d)=>{let u;if(d.required)u=ot.exports.isFunction(d.validator)?d.validator:On.required,n=!0;else if(d.email)u=ot.exports.isFunction(d.validator)?d.validator:On.email,i=!0;else if(Number(d.max)>-1)u=f=>On.max(f,d.max);else if(Number(d.min)>-1)u=f=>On.min(f,d.max);else if(Number(d.maxlength)>-1)u=f=>On.min(f,d.max);else if(Object.prototype.toString.call(d.pattern)==="[object RegExp]")u=f=>On.pattern(f,d.pattern);else if(ot.exports.isFunction(d.validator))u=d.validator;else return c;return c.push({validator:u,message:d.message||"\u9A8C\u8BC1\u9519\u8BEF",trigger:d.trigger||"blur"}),c},[]);return[...t.reduce((c,d)=>(d.required&&n||d.email&&i||c.push(d),c),[]),...s]},a8=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),t3=e=>e!==void 0;var r8=a.defineComponent({name:"FormItem",directives:{bkTooltips:el},props:e8,setup(e,t){const n=m2(),i=Boolean(n),s=xn(),o=Boolean(s),c=a.getCurrentInstance(),d=a.reactive({isError:!1,errorMessage:""}),u=a.computed(()=>i?n.props.formType==="vertical":!1),f=a.computed(()=>!!(e.label||t.slots.label)),m=a.computed(()=>{const v={width:"",paddingRight:"",textAlign:""},k=e.labelPosition||i&&n.props.labelPosition;if(k&&(v["text-align"]=k),n.props.formType==="vertical"||!e.label&&o)return v;const T=t3(e.labelWidth)?e.labelWidth:i&&n.props.labelWidth;return t3(T)&&(v.width=`${T}px`,v.paddingRight=T?"":"0px"),v}),p=a.computed(()=>({["margin-left"]:m.value.width})),y=v=>{if(!e.property||i&&!n.props.model)return Promise.resolve(!0);let k=[];i&&n.props.rules&&t8(n.props.rules,e.property)&&(k=n.props.rules[e.property]),e.rules&&(k=e.rules),k=a8(v,i8(k,n8(e))),k.length>0&&(d.isError=!1,d.errorMessage="");const T=ot.exports.get(n.props.model,e.property),L=(()=>{let N=-1;return()=>{if(N=N+1,N>=k.length)return Promise.resolve(!0);const C=k[N];return Promise.resolve().then(()=>{const I=C.validator(T);return typeof I!="boolean"&&typeof I.then=="function"?I.then(M=>{if(M===!1)return Promise.reject(pu(C))}).then(()=>L(),()=>(d.isError=!0,d.errorMessage=pu(C),Promise.reject(d.errorMessage))):I?L():(d.isError=!0,d.errorMessage=typeof I=="string"?I:pu(C),Promise.reject(d.errorMessage))})}})();return L()},b=()=>{d.isError=!1,d.errorMessage=""};return a.provide(i0,Se(Z({},e),{validate:y,clearValidate:b})),a.onMounted(()=>{i&&n.register(c.proxy)}),a.onBeforeUnmount(()=>{i&&n.unregister(c.proxy)}),Se(Z({},a.toRefs(d)),{isShowLabel:f,labelStyles:m,contentStyles:p,isFormTypeVertical:u,validate:y,clearValidate:b})},render(){var i,s,o,c;const e=je({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Hs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[this.isShowLabel&&a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content",style:this.contentStyles},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const n3=Gt(qC,{FormItem:r8,ComposeFormItem:KC}),s8={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var l8=a.defineComponent({name:"Col",props:s8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:u}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:s});const m=function(y){return`${Number((y*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:u?m(u/n):null}));return()=>{var y,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(y=t.slots).default)==null?void 0:b.call(y)])}}});const o8={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var c8=a.defineComponent({name:"Container",props:o8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:u}=e;return{"padding-right":`${u}px`,"padding-left":`${u}px`}});return()=>{var u,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(u=t.slots).default)==null?void 0:f.call(u)])}}}),u8=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Se(Z({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Nl=Gt(c8,{Row:u8,Col:l8});var d8=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:Uf(),trigger:$f(),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=o=>{t("showChange",o)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=je({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=ot.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),f8=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),h8=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const i3=Gt(d8,{DropdownMenu:h8,DropdownItem:f8});var bu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Gf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Fo(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=N=>typeof N=="number"?`${N}px`:N,d=c(e.height),u=c(e.width),f=N=>{N.length===0&&(i.list=i.list.slice(0,1),s.value=[]),N.forEach(C=>{const I=n.getNodeById(C);p(I)}),o.value=N},m=N=>{N.isDisabled||(N.config.multiple?o.value=n.getCheckedNodes().map(C=>C.path):o.value=N.path,t("update:modelValue",o.value))},p=N=>{var C;if(!(!N||(N==null?void 0:N.isDisabled))){if(i.list=i.list.slice(0,N.level),s.value=s.value.slice(0,N.level-1),(C=N.children)!=null&&C.length){i.list.push(N.children),s.value.push(N);return}if(n.config.isRemote&&!N.isLeaf){N.loading=!0;const I=M=>{n.appendNodes(M,N||null),i.list.push(N.children),s.value.push(N),N.loading=!1};n.config.remoteMethod(N,I)}}},y=N=>{const{trigger:C,checkAnyLevel:I,multiple:M}=N.config;return{onClick:z=>{(!N.isLeaf||M)&&z.stopPropagation(),C==="click"&&p(N),I&&!M&&m(N),N.isLeaf&&!M&&m(N)},onMouseenter:()=>{C==="hover"&&p(N)}}},b=N=>{const{multiple:C}=N.config;return{onClick:M=>{if(C){M.stopPropagation(),T(N,!N.checked);return}p(N),N.isLeaf&&!C&&m(N)}}},v=N=>(s.value[N.level-1]||{}).id===N.id,k=(N,C)=>{const{multiple:I}=N.config;return I?C.some(M=>kr(M,N.path)):kr(C,N.path)},T=(N,C)=>{N.setNodeCheck(C||!1),m(N)},L=N=>N.loading?a.createVNode(Dr,{class:"icon-spinner"},null):a.createVNode(Dn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,N=>{f(N)},{immediate:!0}),a.watch(()=>e.store,N=>{i.list=[N.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:v,nodeEvent:y,isCheckedNode:k,checkValue:o,checkNode:T,iconRender:L,panelWidth:u,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(ji,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function a3(e){return e.data.disabled?!0:e.level!==1?a3(e.parent):e.data.disabled}class Ll{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[i];this.children=(s||[]).map(o=>new Ll(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return a3(this)}broadcast(t,n){const i=`onParent${Nr(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${Nr(t)}`;n&&((s=n[i])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const r3=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(r3(i.children,t))),n),[]);class s3{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new Ll(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>kr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return r3(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>kr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new Ll(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var g8=a.defineComponent({name:"Cascader",directives:{clickoutside:jn},components:{CascaderPanel:bu,BkPopover:mn},props:{modelValue:g.arrayOf(g.oneOfType([Fo(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=yh(),d=a.ref(new s3(e)),u=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),v=a.ref([]),k=a.ref(!1),T=a.computed({get:()=>p.value,set:P=>{t("update:modelValue",P)}}),L=a.ref(null),N=P=>e.showCompleteName?P.pathNames.join(n):P.pathNames[P.pathNames.length-1],C=()=>{b.value=f.value},I=P=>{var G;if(i){m.value=d.value.getCheckedNodes().map(B=>({text:N(B),key:B.id}));return}if(!e.checkAnyLevel&&((G=L==null?void 0:L.value)==null||G.hide()),P.length===0)f.value="";else{const B=d.value.getNodeByValue(P);if(!B)return;f.value=N(B)}C()},M=P=>{P.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},S=(P,G,B)=>{B.stopPropagation();const ie=JSON.parse(JSON.stringify(P)),oe=ie.splice(G,1)[0];d.value.removeTag(oe),I(ie),t("update:modelValue",d.value.getCheckedNodes().map(ve=>ve.path))},z=(P,G)=>{I(P),t("update:modelValue",P),G!==void 0&&t("change",P)},j=()=>{d.value=new s3(e),I(e.modelValue)},O=P=>{t("toggle",P.isShow),P.isShow||(k.value=!1)},W=Ps(200,P=>{const G=P.target;if(b.value=G.value,b.value===""){k.value=!1;return}k.value=!0;const B=d.value.getFlattedNodes().filter(ie=>(e.checkAnyLevel||ie.isLeaf)&&ie.pathNames.join(e.separator).includes(b.value));v.value=B,!(L!=null&&L.value.isShow)&&(L==null||L.value.show())});return a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,j,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:u,selectedText:f,checkedValue:T,handleClear:M,isHover:s,setHover:o,popover:L,cancelHover:c,selectedTags:m,removeTag:S,cascaderPanel:y,popoverChangeEmitter:O,searchKey:b,suggestions:v,isFiltering:k,searchInputHandler:W}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Zt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Hn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(mn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(bu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const l3=Gt(g8,{CascaderPanel:bu});var o3=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),y=a.ref(null),b=a.computed(()=>{var O,W;let z="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const P=e.params.customContent[e.modelValue];z=P.tip||P.label||""}const j=e.params.vertical?Os.RIGHT:Os.TOP;return(W=e.params)!=null&&W.showTip?{content:e.params.formatterTipLabel(`${z||(e==null?void 0:e.modelValue)||"0"}`),placement:j}:{content:"",placement:j}}),v=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:v.value}:{left:v.value}),T=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),L=z=>{e.params.disable||(z.preventDefault(),N(z),Zr(window,"mousemove",C),Zr(window,"touchmove",C),Zr(window,"mouseup",I),Zr(window,"touchend",I))},N=z=>{n.value=!0,i.value=!0,e.params.vertical?s.value=z.clientY:o.value=z.clientX,c.value=parseFloat(v.value),d.value=c.value},C=z=>{if(n.value){i.value=!1,t("resetSize");let j=0;e.params.vertical?(f.value=z.clientY,j=(s.value-f.value)/e.params.sliderSize*100):(m.value=z.clientX,j=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+j,M(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(M(d.value),t("emitChange"))},0),kl(window,"mousemove",C),kl(window,"touchmove",C),kl(window,"mouseup",I),kl(window,"touchend",I))},M=z=>{if(z===null||isNaN(z))return;z<0?d.value=0:z>100&&(d.value=100);const j=100/((e.params.maxValue-e.params.minValue)/e.params.step);let W=Math.round(z/j)*j*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;W=parseFloat(W.toFixed(e.params.precision)),t("update:modelValue",W),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:y,tabindex:"0",style:k.value,onClick:z=>z.stopPropagation(),onMousedown:L},[Boolean(b.value.content)?a.createVNode(mn,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[T.value]):void 0]),setPosition:M,tip:b}},render(){return this.renderDom()}});const Zr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},kl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var m8=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.computed(()=>{const $=[e.minValue,e.maxValue,e.step].map(U=>{const V=`${U}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,$)}),v=a.computed(()=>Math.min(s.value,o.value)),k=a.computed(()=>Math.max(s.value,o.value)),T=a.computed(()=>e.range?`${100*(k.value-v.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),L=a.computed(()=>e.range?`${100*(v.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:T.value,bottom:L.value}:{width:T.value,left:L.value}),C=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const $=(e.maxValue-e.minValue)/e.step,U=100*e.step/(e.maxValue-e.minValue),V=[];for(let J=1;J<$;J++)V.push(J*U);return e.range?V.filter(J=>J<100*(v.value-e.minValue)/(e.maxValue-e.minValue)||J>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(J=>J>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),M=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const $=100*e.step/(e.maxValue-e.minValue),U=[];for(let V=e.minValue,J=0;V<=e.maxValue;V+=e.step,J++){const re={stepWidth:J*$,stepLabel:e.formatterLabel(V)};U.push(re)}return U}),S=a.computed(()=>Array.isArray(e.modelValue)),z=a.computed(()=>e.customContent?Object.keys(e.customContent).sort(($,U)=>Number($)-Number(U)).filter($=>Number($)>=e.minValue&&Number($)<=e.maxValue).map($=>{const{tip:U}=e.customContent[$],{label:V}=e.customContent[$];return{tip:U||V||"",label:V||"",percent:(Number($)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),j=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{G()}),a.watch(()=>s.value,$=>{e.range?n("update:modelValue",[v.value,k.value]):n("update:modelValue",$),d.value=$}),a.watch(()=>o.value,$=>{n("update:modelValue",[v.value,k.value]),u.value=$}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),O(),Zr(window,"resize",O())});const O=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},W=$=>{var U,V;if($.stopPropagation(),!e.disable){if(O(),e.vertical){const J=(U=f.value)==null?void 0:U.getBoundingClientRect().bottom;oe((J-$.clientY)/i.value*100)}else{const J=(V=f.value)==null?void 0:V.getBoundingClientRect().left;oe(($.clientX-J)/i.value*100)}B()}},P=()=>e.range?![v.value,k.value].every(($,U)=>$===c.value[U]):e.modelValue!==c.value,G=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const $=e.modelValue;e.range&&Array.isArray($)?$[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):$[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):$[0]<e.minValue?n("update:modelValue",[e.minValue,$[1]]):$[1]>e.maxValue?n("update:modelValue",[$[0],e.maxValue]):(s.value=Number($[0]),o.value=Number($[1]),P()&&(c.value=$.slice())):!e.range&&typeof $=="number"&&!isNaN($)&&($<e.minValue?n("update:modelValue",e.minValue):$>e.maxValue?n("update:modelValue",e.maxValue):(s.value=$,P()&&(c.value=$)))},B=async()=>{await a.nextTick(),n("change",e.range?[v.value,k.value]:e.modelValue)},ie=$=>e.vertical?{bottom:`${$}%`}:{left:`${$}%`},oe=$=>{if(!e.range){m.value.setPosition($);return}const U=e.minValue+$*(e.maxValue-e.minValue)/100;Math.abs(v.value-U)<Math.abs(k.value-U)?y.value=s.value<o.value?m.value:p.value:y.value=s.value>o.value?m.value:p.value,y.value.setPosition($)},ve=$=>{if($==="")return;const U=parseFloat($);U<e.minValue?(d.value=e.minValue,s.value=e.minValue):U>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=U},Ie=$=>{if($===""||typeof $=="number")return;const U=parseFloat($);U<e.minValue?(u.value=e.minValue,o.value=e.minValue):U>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=U},me=$=>{let U=0;return $==="start"?U=e.vertical?e.maxValue:e.minValue:U=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(U)?"0":"1"};return{renderDom:()=>{var $,U;return a.createVNode("div",{class:["bk-slider",e.extCls]},[($=t.start)==null?void 0:$.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:I.value,onClick:W},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:N.value},null),e.showInterval?C.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V)},null)):void 0,e.customContent?z.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:me("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:me("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return M.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.stepWidth)},[V.stepLabel]));if(e.customContent)return z.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.percent)},[V.label]))}()]):void 0,a.createVNode(o3,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:j.value,onEmitChange:B,onResetSize:O},null),e.range?a.createVNode(o3,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:j.value,onEmitChange:B,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ve},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:u.value,max:e.maxValue,min:e.minValue,onChange:Ie},null)])]:void 0]):void 0,(U=t.end)==null?void 0:U.call(t)])}}},render(){return this.renderDom()}});const c3=Ge(m8);var p8=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),y=a.ref(!1),b=a.ref(null),v=a.ref({}),k=a.ref(null),T=a.ref(null),L=a.ref(null),N=a.ref(null),C=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>C.value?"width":"height"),M=a.computed(()=>{let me=i.value;return typeof me=="number"&&(me=`${me}px`),{[I.value]:me}}),S=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),z=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),j=()=>{const me=k.value.getBoundingClientRect();b.value=C.value?me.width:me.height},O=new ResizeObserver(j),W=()=>{switch(T.value.style.visibility="visible",n.value){case"left":T.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":T.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":T.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":T.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},P=()=>{L.value.style.display="block",L.value.style.cursor=C.value?"col-resize":"row-resize"},G=me=>Math.min(c.value,Math.max(d.value,me),b.value-o.value),B=me=>{t("before-resize",me);const ge=N.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:me.clientX,clientY:me.clientY},aside:{width:ge.width,height:ge.height}}),P(),u.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const $=J=>{t("resizing",J)},U=J=>{let re;switch(n.value){case"top":re=J.clientY-v.value.mouse.clientY;break;case"right":re=v.value.mouse.clientX-J.clientX;break;case"bottom":re=v.value.mouse.clientY-J.clientY;break;case"left":re=J.clientX-v.value.mouse.clientX}const K=v.value.aside[I.value]+re,X=G(K)+s.value,de=`${X}px`;u.value?N.value.style[I.value]=de:T.value.style[n.value]=de,$(X)},V=()=>{if(T.value.style.visibility="hidden",L.value.style.display="none",document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ie(),t("after-resize",parseFloat(T.value.style[n.value]))}),u.value)return!1;N.value.style[I.value]=T.value.style[n.value]};document.addEventListener("mousemove",U),document.addEventListener("mouseup",V)},ie=()=>{if(!f.value)return!1;const me=N.value.getBoundingClientRect();if(y.value=m.value=me[I.value]<=z.value,!y.value)return p.value=!0,!1;ve(),a.nextTick(()=>{N.value.setAttribute(`data-${I.value}`,M.value[I.value])})},oe=me=>{m.value=typeof me=="boolean"?me:!m.value,ve(),t("collapse-change",m.value)},ve=()=>{const me=N.value.getBoundingClientRect();Ie(!m.value),m.value?(N.value.setAttribute(`data-${I.value}`,`${me[I.value]}px`),N.value.style[I.value]="5px"):(p.value=!0,N.value.style[I.value]=N.value.getAttribute(`data-${I.value}`))},Ie=me=>{const ge=()=>{p.value=me,N.value.style.transition="",N.value.removeEventListener("transitionend",ge)};N.value.addEventListener("transitionend",ge),N.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(k.value)}),a.onBeforeUnmount(()=>{O.unobserve(k.value)}),{collapsed:m,asideContentVisible:p,minimized:y,limitMax:b,state:v,vertical:C,cssPropKey:I,bkResizeLayoutRef:k,resizeProxyRef:T,resizeMaskRef:L,asideRef:N,triggerStyle:S,asideStyle:M,handleMousedown:B,setCollapse:oe}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(Dn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Si,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const u3=Ge(p8),b8={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var y8=a.defineComponent({name:"Timeline",props:b8,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(u=>{var f;d.push({tag:u.tag,content:u.content,type:u.type,size:u.size,color:u.color,icon:u.icon,filled:u.filled,border:(f=u.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=i=>{const{icon:s}=i;return s?typeof s=="object"||typeof s=="function":!1},t=i=>{const s="bk-timeline",o=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,d=i.size?`${s}-${i.size}`:"",u=i.filled?`${s}-filled`:"",f=i.color&&o.includes(i.color)?`${s}-${i.color}`:"",m=e(i)?`${s}-custom`:"";return je({},`${s} ${c} ${d} ${f} ${u} ${m}`)},n=i=>this.$slots.content?a.createVNode("div",{class:"bk-timeline-content"},[this.$slots.content(i)]):a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null);return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,o,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:i.border?`2px solid ${i.color}`:"0px",borderRadius:i.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[typeof i.icon=="function"?a.createVNode(i.icon,null,null):i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(o=(s=this.$slots).default)==null?void 0:o.call(s,i))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?n(i):""])])})])}});const d3=Ge(y8),C8={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var v8=a.defineComponent({name:"Process",props:C8,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=je({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,u)=>{if(d===this.curProcess-1&&n(u))return a.createVNode(Js,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(u))return a.createVNode(Hn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(u))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(u.icon,null,null)]);if(s(d))return a.createVNode(na,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,u)=>a.createVNode("li",{onClick:()=>{this.jumpTo(u+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=u+1,current:n(d)&&u===this.curProcess-1,error:i(d)&&u===this.curProcess-1}},[d[this.displayKey],c(u,d)]))])])}});const f3=Ge(v8),fa="bk-upload";var fi=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(fi||{}),Ua=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Ua||{});const h3=[fi.BUTTON,fi.DRAGGABLE,fi.PICTURE];var hi={theme:{type:String,default:"draggable",validator:e=>!e||h3.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${h3.join(" | ")}\u3011`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function g3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var w8=a.defineComponent({name:"UploadList",props:{theme:hi.theme,disabled:hi.disabled,files:hi.files,multiple:hi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${fa}-list`,d=a.computed(()=>i.value===fi.PICTURE),u=a.computed(()=>d.value&&!o.value),f=a.computed(()=>je({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(N){const C=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**I).toFixed(2)}${C[I]}`}function p(N,C){n("remove",N,C)}function y(N,C){n("retry",N,C)}const b=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},g3(N=e.files.map(C=>{const I=je({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):v(C)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(Rr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(xr,{class:"action-icon",onClick:C=>p(N,C)},null)])])],k=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},g3(N=e.files.map(C=>{const I=je({[`${c}__item`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):L(C)])}))?N:{default:()=>[N]})},T=N=>{var j;const C=(j=N==null?void 0:N.raw)==null?void 0:j.type,[I]=(C==null?void 0:C.split("/"))||"";let S={text:zr,image:lc,application:zr,video:mc,audio:qo}[I]||zr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(C)&&(S=$o),a.h(S,{class:`${c}__item-file-icon`})},L=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):T(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(na,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(Rr,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[N.status==="fail"&&a.createVNode(cc,{class:`${c}__item-retry-icon`,onClick:C=>y(N,C)},null),a.createVNode(xr,{class:`${c}__item-del-icon`,onClick:C=>p(N,C)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[u.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:f.value},[d.value?b():k(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),m3=a.defineComponent({name:"UploadTrigger",props:{theme:hi.theme,disabled:hi.disabled,multiple:hi.multiple,accept:hi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),u=`${fa}-trigger`,f=a.computed(()=>i.value===fi.BUTTON),m=a.computed(()=>i.value===fi.DRAGGABLE),p=a.computed(()=>i.value===fi.PICTURE),y=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),v=a.ref(null),k=a.computed(()=>{var G,B,ie;return je({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:y.value,[`${u}--has-file`]:(G=o.value)!=null?G:!1,[`${u}--${(B=o.value)==null?void 0:B.status}`]:(ie=o.value)!=null?ie:!1,[`${u}--dragover`]:M.value,[`${u}--disabled`]:s.value})}),T=()=>{v.value.value=null,v.value.click()},L=G=>{const{files:B}=G.target;n("change",Array.from(B))},N=()=>{e.disabled||T()},C=G=>{G.defaultPrevented||G.target!==G.currentTarget||((G.code==="Enter"||G.code==="Space")&&T(),G.preventDefault())};function I(G,B){n("remove",G,B),B.stopPropagation(),B.preventDefault()}const M=a.ref(!1),S=()=>{const G=ve=>{if(s.value)return;ve.preventDefault(),M.value=!1;const Ie=Array.from(ve.dataTransfer.files);if(!b.value){n("change",Ie);return}const me=Ie.filter(ge=>{const{type:$,name:U}=ge,V=U.includes(".")?`.${U.split(".").pop()}`:"",J=$.replace(/\/.*$/,"");return b.value.split(",").map(re=>re.trim()).filter(re=>re).some(re=>re.startsWith(".")?V===re:/\/\*$/.test(re)?J===re.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(re)?$===re:!1)});n("change",me)},B=ve=>{ve.preventDefault(),M.value=!0},ie=()=>{M.value=!1},oe=je({[`${u}__draggable`]:!0});return a.createVNode("div",{class:oe,onDrop:G,onDragover:B,onDragleave:ie},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Zs,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${u}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},z=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?O(e.file):j()]),j=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Fs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=G=>[a.withDirectives(a.createVNode("img",{src:G.url,class:`${u}__picture-thumbnail`,alt:""},null),[[a.vShow,G.status!=="uploading"]]),a.createVNode(a.Fragment,null,[G.status==="uploading"&&a.createVNode(Rr,{class:`${u}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:G.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[a.createVNode(xr,{class:"action-icon",onClick:B=>I(G,B)},null)])])],W=()=>a.createVNode(Pt,{disabled:s.value},{default:()=>[a.createVNode(Zs,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),P=()=>{if(f.value)return W();if(m.value)return S();if(p.value)return z()};return()=>{var G;return a.createVNode("div",{class:k.value,tabindex:"0",onClick:N,onKeydown:C},[t.trigger?[t.trigger(),(G=t==null?void 0:t.default)==null?void 0:G.call(t)]:P(),a.createVNode("input",{ref:v,class:"bk-upload__input-file",tabindex:"-1",onChange:L,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),p3={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(L,N){var C=L[0],I=L[1],M=L[2],S=L[3];C+=(I&M|~I&S)+N[0]-680876936|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[1]-389564586|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[2]+606105819|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[3]-1044525330|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[4]-176418897|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[5]+1200080426|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[6]-1473231341|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[7]-45705983|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[8]+1770035416|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[9]-1958414417|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[10]-42063|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[11]-1990404162|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[12]+1804603682|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[13]-40341101|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[14]-1502002290|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[15]+1236535329|0,I=(I<<22|I>>>10)+M|0,C+=(I&S|M&~S)+N[1]-165796510|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[6]-1069501632|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[11]+643717713|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[0]-373897302|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[5]-701558691|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[10]+38016083|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[15]-660478335|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[4]-405537848|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[9]+568446438|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[14]-1019803690|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[3]-187363961|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[8]+1163531501|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[13]-1444681467|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[2]-51403784|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[7]+1735328473|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[12]-1926607734|0,I=(I<<20|I>>>12)+M|0,C+=(I^M^S)+N[5]-378558|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[8]-2022574463|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[11]+1839030562|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[14]-35309556|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[1]-1530992060|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[4]+1272893353|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[7]-155497632|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[10]-1094730640|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[13]+681279174|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[0]-358537222|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[3]-722521979|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[6]+76029189|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[9]-640364487|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[12]-421815835|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[15]+530742520|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[2]-995338651|0,I=(I<<23|I>>>9)+M|0,C+=(M^(I|~S))+N[0]-198630844|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[7]+1126891415|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[14]-1416354905|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[5]-57434055|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[12]+1700485571|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[3]-1894986606|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[10]-1051523|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[1]-2054922799|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[8]+1873313359|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[15]-30611744|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[6]-1560198380|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[13]+1309151649|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[4]-145523070|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[11]-1120210379|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[2]+718787259|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[9]-343485551|0,I=(I<<21|I>>>11)+M|0,L[0]=C+L[0]|0,L[1]=I+L[1]|0,L[2]=M+L[2]|0,L[3]=S+L[3]|0}function o(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L.charCodeAt(C)+(L.charCodeAt(C+1)<<8)+(L.charCodeAt(C+2)<<16)+(L.charCodeAt(C+3)<<24);return N}function c(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L[C]+(L[C+1]<<8)+(L[C+2]<<16)+(L[C+3]<<24);return N}function d(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,o(L.substring(I-64,I)));for(L=L.substring(I-64),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L.charCodeAt(I)<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function u(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,c(L.subarray(I-64,I)));for(L=I-64<N?L.subarray(I-64):new Uint8Array(0),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L[I]<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function f(L){var N="",C;for(C=0;C<4;C+=1)N+=i[L>>C*8+4&15]+i[L>>C*8&15];return N}function m(L){var N;for(N=0;N<L.length;N+=1)L[N]=f(L[N]);return L.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function L(N,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var I=this.byteLength,M=L(N,I),S=I,z,j,O,W;return C!==n&&(S=L(C,I)),M>S?new ArrayBuffer(0):(z=S-M,j=new ArrayBuffer(z),O=new Uint8Array(j),W=new Uint8Array(this,M,z),O.set(W),j)}}();function p(L){return/[\u0080-\uFFFF]/.test(L)&&(L=unescape(encodeURIComponent(L))),L}function y(L,N){var C=L.length,I=new ArrayBuffer(C),M=new Uint8Array(I),S;for(S=0;S<C;S+=1)M[S]=L.charCodeAt(S);return N?M:I}function b(L){return String.fromCharCode.apply(null,new Uint8Array(L))}function v(L,N,C){var I=new Uint8Array(L.byteLength+N.byteLength);return I.set(new Uint8Array(L)),I.set(new Uint8Array(N),L.byteLength),C?I:I.buffer}function k(L){var N=[],C=L.length,I;for(I=0;I<C-1;I+=2)N.push(parseInt(L.substr(I,2),16));return String.fromCharCode.apply(String,N)}function T(){this.reset()}return T.prototype.append=function(L){return this.appendBinary(p(L)),this},T.prototype.appendBinary=function(L){this._buff+=L,this._length+=L.length;var N=this._buff.length,C;for(C=64;C<=N;C+=64)s(this._hash,o(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},T.prototype.end=function(L){var N=this._buff,C=N.length,I,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(I=0;I<C;I+=1)M[I>>2]|=N.charCodeAt(I)<<(I%4<<3);return this._finish(M,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(L){return this._buff=L.buff,this._length=L.length,this._hash=L.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(L,N){var C=N,I,M,S;if(L[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,L),C=0;C<16;C+=1)L[C]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),M=parseInt(I[2],16),S=parseInt(I[1],16)||0,L[14]=M,L[15]=S,s(this._hash,L)},T.hash=function(L,N){return T.hashBinary(p(L),N)},T.hashBinary=function(L,N){var C=d(L),I=m(C);return N?k(I):I},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(L){var N=v(this._buff.buffer,L,!0),C=N.length,I;for(this._length+=L.byteLength,I=64;I<=C;I+=64)s(this._hash,c(N.subarray(I-64,I)));return this._buff=I-64<C?new Uint8Array(N.buffer.slice(I-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(L){var N=this._buff,C=N.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M,S;for(M=0;M<C;M+=1)I[M>>2]|=N[M]<<(M%4<<3);return this._finish(I,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var L=T.prototype.getState.call(this);return L.buff=b(L.buff),L},T.ArrayBuffer.prototype.setState=function(L){return L.buff=y(L.buff,!0),T.prototype.setState.call(this,L)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(L,N){var C=u(new Uint8Array(L)),I=m(C);return N?k(I):I},T})})(p3);var b3=p3.exports;function yu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const M8=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,u]of Object.entries(c))Array.isArray(u)?i.append(d,...u):i.append(d,u)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(yu(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))Af(c)||t.setRequestHeader(o,String(c));return t.send(i),t},y3=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,I8=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await L8(n,t),o=[];N8(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(yu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},N8=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,f)=>{const m=c*o,p=Math.min(t.size,m+o),y=new FormData;if(e.data){let k=e.data;Array.isArray(k)||(k=[k]),k.forEach(T=>{for(const[L,N]of Object.entries(T))Array.isArray(N)?y.append(L,...N):y.append(L,N)})}if(e.formDataAttributes){let k=e.formDataAttributes;Array.isArray(k)||(k=[k]),k.forEach(T=>{Array.isArray(T.value)?y.append(T.name,...T.value):y.append(T.name,T.value)})}y.append("file",y3.call(t,m,p)),y.append("name",t.name),y.append("total",n.toString()),y.append("index",c.toString()),y.append("size",t.size.toString()),y.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const k=yu(b);b.status<200||b.status>=300?(f(k),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},b.upload.addEventListener("progress",k=>{const T=k;e.onProgress(T,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(k=>{const T=k.name,L=k.value;b.setRequestHeader(T,L)});else{const k=e.header.name,T=e.header.value;b.setRequestHeader(k,T)}const v=e.headers||{};if(v instanceof Headers)v.forEach((k,T)=>b.setRequestHeader(T,k));else for(const[k,T]of Object.entries(v))Af(T)||b.setRequestHeader(k,String(T));b.send(y)});s.push(d)}},L8=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new b3.ArrayBuffer,d=new FileReader;function u(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(y3.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<s)u();else{const m=c.end(),p=new b3;p.append(m),p.append(e.name);const y=p.end();n(y)}},d.onerror=()=>{i(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function C3(e){return Date.now()+e}var k8=(e,t)=>{const n=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),i=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),s=a.ref([]);function o(y){return s.value.find(b=>b.uid===y.uid)}let c=0;function d(y){var T;c+=1,y.uid=C3(c);const b={uid:y.uid,name:y.name,status:Ua.NEW,size:y.size,raw:y},v=y.type.startsWith("image/");let k=null;if(v){try{b.url=window.URL.createObjectURL(y)}catch(L){console.error(L)}b.isPic=!0}return e.validateName&&!((T=e.validateName)!=null&&T.test(b.name))&&(b.status=Ua.FAIL,b.statusText="invalid filename",k=new Error(b.statusText)),v&&y.size>n.value*1024**2&&(b.status=Ua.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),!v&&y.size>i.value*1024**2&&(b.status=Ua.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),s.value.push(b),k}async function u(y){var k;const b=y instanceof File?o(y):y,v=T=>{var L;t.onRemove(T,s.value),s.value.splice(s.value.indexOf(b),1),(L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url)};e.beforeRemove?await((k=e.beforeRemove)==null?void 0:k.call(e,b,s.value))!==!1&&v(b):v(b)}async function f(y,b,v){const k=o(b);!k||(k.status="fail",k.statusText=y.message,k.response=v)}async function m(y,b){const v=o(b);!v||(v.status="success",v.response=y)}async function p(y,b){const v=o(b);!v||(v.status="uploading",v.percentage=Math.round(y.percent))}return a.watch(()=>e.files,y=>{s.value=y.map(b=>{var v,k;return c+=1,Se(Z({},b),{uid:(v=b.uid)!=null?v:C3(c),status:(k=b.status)!=null?k:Ua.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:f,handleSuccess:m,handleProgress:p}},T8=a.defineComponent({name:"Upload",props:hi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===fi.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var M;return je({[fa]:!0,[`${fa}--${e.theme}`]:!0,[`${fa}--disabled`]:e.disabled,[`${fa}--single-picture`]:c.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),u={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(M,S){I(M),n("delete",M,S)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:v,handleError:k}=k8(e,{onRemove:f});function T(M){if(!M.length)return;if(e.limit&&m.value.length+M.length>e.limit){n("exceed",M,m.value);return}let S=M;(!e.multiple||e.limit===1)&&(S=M.slice(0,1));for(const z of S){const j=z,O=p(j);if(O){n("error",j,m.value,O);return}e.autoUpload&&N(j,S)}}function L(M){C(M.raw)}async function N(M,S){var j;if(!e.beforeUpload)return C(M,S);let z;try{z=await((j=e.beforeUpload)==null?void 0:j.call(e,M))}catch{z=!1}if(z===!1){y(M);return}C(M,S)}function C(M,S){const{headers:z,header:j,data:O,formDataAttributes:W,method:P,withCredentials:G,name:B,url:ie,sliceUrl:oe,mergeUrl:ve,chunkSize:Ie,customRequest:me}=e,{uid:ge}=M,$={headers:z,header:j,withCredentials:G,file:M,data:O,formDataAttributes:W,method:P,filename:B,action:ie,sliceUrl:oe,mergeUrl:ve,chunkSize:Ie,onProgress:J=>{b(J,M),n("progress",J,M,m.value)},onSuccess:J=>{var K;const re=J;if((K=e==null?void 0:e.handleResCode)!=null&&K.call(e,re))v(J,M),n("success",J,M,m.value);else{const X=new Error((re==null?void 0:re.message)||"unknow error");k(X,M,J),n("error",M,m.value,X)}delete s.value[ge]},onError:J=>{k(J,M),n("error",M,m.value,J),delete s.value[ge]},onComplete:()=>{S&&S.indexOf(M)===S.length-1&&n("done",m.value)}};let U=e.sliceUpload?I8:M8;me&&(U=me);const V=U($);s.value[ge]=V,V instanceof Promise&&V.then($.onSuccess,$.onError)}function I(M){let S=s.value;M&&(S={[M.uid]:s.value[M.uid]}),Object.keys(S).forEach(z=>{if(S[z]instanceof XMLHttpRequest){const j=S[z];j==null||j.abort()}delete s.value[z]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),i({handleRemove:y,handleRetry:L}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(m3,a.mergeProps(u,{onChange:T}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${fa}__tip`},[e.tip]),a.createVNode(w8,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y,onRetry:L},{innerTrigger:M=>o.value&&a.createVNode(m3,a.mergeProps(u,{file:M,onChange:T,onRemove:y}),t),file:t.file})])}});const v3=Ge(T8);function Wi(){}Wi.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,f=1,m=d+u,p=[{newPos:-1,components:[]}],y=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&y+1>=u)return c([{value:this.join(n),count:n.length}]);function b(){for(var k=-1*f;k<=f;k+=2){var T=void 0,L=p[k-1],N=p[k+1],C=(N?N.newPos:0)-k;L&&(p[k-1]=void 0);var I=L&&L.newPos+1<d,M=N&&0<=C&&C<u;if(!I&&!M){p[k]=void 0;continue}if(!I||M&&L.newPos<N.newPos?(T=x8(N),o.pushComponent(T.components,void 0,!0)):(T=L,T.newPos++,o.pushComponent(T.components,!0,void 0)),C=o.extractCommon(T,n,t,k),T.newPos+1>=d&&C+1>=u)return c(S8(o,T.components,n,t,o.useLongestToken));p[k]=T}f++}if(s)(function k(){setTimeout(function(){if(f>m)return s();b()||k()},0)})();else for(;f<=m;){var v=b();if(v)return v}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,u=d-s,f=0;d+1<o&&u+1<c&&this.equals(n[d+1],i[u+1]);)d++,u++,f++;return f&&t.components.push({count:f}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function S8(e,t,n,i,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(u,u+f.count)),u+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&s){var m=n.slice(d,d+f.count);m=m.map(function(b,v){var k=i[u+v];return k.length>b.length?k:b}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}var y=t[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(t[c-2].value+=y.value,t.pop()),t}function x8(e){return{newPos:e.newPos,components:e.components.slice(0)}}var w3=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,M3=/\S/,I3=new Wi;I3.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!M3.test(e)&&!M3.test(t)},I3.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&w3.test(t[n])&&w3.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Cu=new Wi;Cu.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function D8(e,t,n){return Cu.diff(e,t,n)}var j8=new Wi;j8.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var z8=new Wi;z8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Tl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tl=function(t){return typeof t}:Tl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function vu(e){return O8(e)||A8(e)||P8(e)||E8()}function O8(e){if(Array.isArray(e))return wu(e)}function A8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function P8(e,t){if(!!e){if(typeof e=="string")return wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(e,t)}}function wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function E8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
64
64
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var V8=Object.prototype.toString,Yr=new Wi;Yr.useLongestToken=!0,Yr.tokenize=Cu.tokenize,Yr.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,s=i===void 0?function(o,c){return typeof c=="undefined"?n:c}:i;return typeof e=="string"?e:JSON.stringify(Mu(e,null,null,s),s," ")},Yr.equals=function(e,t){return Wi.prototype.equals.call(Yr,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Mu(e,t,n,i,s){t=t||[],n=n||[],i&&(e=i(s,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var c;if(V8.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),n.push(c),o=0;o<e.length;o+=1)c[o]=Mu(e[o],t,n,i,s);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),Tl(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var d=[],u;for(u in e)e.hasOwnProperty(u)&&d.push(u);for(d.sort(),o=0;o<d.length;o+=1)u=d[o],c[u]=Mu(e[u],t,n,i,u);t.pop(),n.pop()}else c=e;return c}var Iu=new Wi;Iu.tokenize=function(e){return e.slice()},Iu.join=Iu.removeEmpty=function(e){return e};function J8(e,t,n,i,s,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var d=D8(n,i,c);d.push({value:"",lines:[]});function u(L){return L.map(function(N){return" "+N})}for(var f=[],m=0,p=0,y=[],b=1,v=1,k=function(N){var C=d[N],I=C.lines||C.value.replace(/\n$/,"").split(`
|
65
65
|
`);if(C.lines=I,C.added||C.removed){var M;if(!m){var S=d[N-1];m=b,p=v,S&&(y=c.context>0?u(S.lines.slice(-c.context)):[],m-=y.length,p-=y.length)}(M=y).push.apply(M,vu(I.map(function(ie){return(C.added?"+":"-")+ie}))),C.added?v+=I.length:b+=I.length}else{if(m)if(I.length<=c.context*2&&N<d.length-2){var z;(z=y).push.apply(z,vu(u(I)))}else{var j,O=Math.min(I.length,c.context);(j=y).push.apply(j,vu(u(I.slice(0,O))));var W={oldStart:m,oldLines:b-m+O,newStart:p,newLines:v-p+O,lines:y};if(N>=d.length-2&&I.length<=c.context){var P=/\n$/.test(n),G=/\n$/.test(i),B=I.length==0&&y.length>W.oldLines;!P&&B&&n.length>0&&y.splice(W.oldLines,0,"\"),(!P&&!B||!G)&&y.push("\")}f.push(W),m=0,p=0,y=[]}b+=I.length,v+=I.length}},T=0;T<d.length;T++)k(T);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:o,hunks:f}}function Q8(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var i=e.hunks[n];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),t.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),t.push.apply(t,i.lines)}return t.join(`
|
66
66
|
`)+`
|