bkui-vue 0.0.1-beta.96 → 0.0.1-beta.97

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.umd.js CHANGED
@@ -54,4 +54,4 @@ function print() { __p += __j.call(arguments, '') }
54
54
  * @return {boolean} True if the event is supported.
55
55
  * @internal
56
56
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
57
- */function r1(e,t){if(!mu.canUseDOM||t&&!("addEventListener"in document))return!1;var i="on"+e,s=i in document;if(!s){var l=document.createElement("div");l.setAttribute(i,"return;"),s=typeof l[i]=="function"}return!s&&pu&&e==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var s1=r1,l1=n1,o1=s1,Mu=10,Cu=40,yu=800;function Iu(e){var t=0,i=0,s=0,l=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=t*Mu,l=i*Mu,"deltaY"in e&&(l=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||l)&&e.deltaMode&&(e.deltaMode==1?(s*=Cu,l*=Cu):(s*=yu,l*=yu)),s&&!t&&(t=s<1?-1:1),l&&!i&&(i=l<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:l}}Iu.getEventType=function(){return l1.firefox()?"DOMMouseScroll":o1("wheel")?"wheel":"mousewheel"};var c1=Iu,u1=c1;const d1=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,f1=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(d1?"DOMMouseScroll":"mousewheel",function(i){const s=u1(i);t==null||t.apply(this,[i,s])})},h1={beforeMount(e,t){console.error(e,t),f1(e,t.value)}},g1=e=>typeof Element=="undefined"?!1:e instanceof Element,Kn=new Map;let bu;document.addEventListener("mousedown",e=>bu=e),document.addEventListener("mouseup",e=>{for(const t of Kn.values())for(const{documentHandler:i}of t)i(e,bu)});function Nu(e,t){let i=[];return Array.isArray(t.arg)?i=t.arg:g1(t.arg)&&i.push(t.arg),function(s,l){const{popperRef:c}=t.instance,u=s.target,g=l==null?void 0:l.target,h=!t||!t.instance,p=!u||!g,m=e.contains(u)||e.contains(g),C=e===u,b=i.length&&i.some(N=>N==null?void 0:N.contains(u))||i.length&&i.includes(g),y=c&&(c.contains(u)||c.contains(g));h||p||m||C||b||y||t.value(s,l)}}const Cr={beforeMount(e,t){Kn.has(e)||Kn.set(e,[]),Kn.get(e).push({documentHandler:Nu(e,t),bindingFn:t.value})},updated(e,t){Kn.has(e)||Kn.set(e,[]);const i=Kn.get(e),s=i.findIndex(c=>c.bindingFn===t.oldValue),l={documentHandler:Nu(e,t),bindingFn:t.value};s>=0?i.splice(s,1,l):i.push(l)},unmounted(e){Kn.delete(e)}};var i7="";const ml={mounted(e,t){const i=m1();typeof t.value=="object"?Object.assign(i,t.value):i.content=t.value;const{disabled:s,arrow:l,theme:c}=i;if(s)return;const u=p1(i.content,l,c==="light");C1(e,u,i)}};function m1(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,onShow:()=>{},onHide:()=>{}}}function p1(e,t,i){const s=yn.getPopperIndex(),l=document.createElement("div");if(l.className=`bk-popper ${i?"light":"dark"}`,l.innerText=e,l.style.zIndex=String(s),t){const c=M1();l.appendChild(c)}return document.body.appendChild(l),l}function M1(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function C1(e,t,i){const{placement:s,distance:l,trigger:c,showOnInit:u,onShow:g,onHide:h}=i,p=bc(e,t,{placement:s,modifiers:[{name:"offset",options:{offset:[0,l]}}]});if(c==="hover"){const b=["mouseenter","focus"],y=["mouseleave","blur"];b.forEach(N=>{e.addEventListener(N,m)}),y.forEach(N=>{e.addEventListener(N,C)})}else c==="click"&&document.body.addEventListener("click",b=>{e.contains(b.target)&&!t.hasAttribute("data-show")?m():t.hasAttribute("data-show")&&C()});u&&m();function m(){t.setAttribute("data-show",""),g(),p.setOptions(b=>ze(Z({},b),{modifiers:[...b.modifiers,{name:"eventListeners",enabled:!0}]})),p.update()}function C(){t.removeAttribute("data-show"),h(),p.setOptions(b=>ze(Z({},b),{modifiers:[...b.modifiers,{name:"eventListeners",enabled:!1}]}))}}var y1=a.defineComponent({name:"Tag",props:{theme:d.theme(["success","info","warning","danger"]).def(""),closable:d.bool.def(!1),type:d.commonType(["","filled","stroke"]).def(""),checkable:d.bool.def(!1),checked:d.bool.def(!1),radius:d.string.def("2px"),extCls:d.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const i=a.computed(()=>Se({"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")),s=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:i,wrapperStyle:s,handleClose:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.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(wn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const pl=Re(y1);var I1=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:d.theme(["success","info","warning","danger"]).def(""),placeholder:d.string.def(""),filterable:d.bool.def(!1),allowCreate:d.bool.def(!1),modelValue:d.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const{modelValue:i}=a.toRefs(e),s=a.ref(i.value),l=a.ref();return a.watch(i,()=>{s.value=i.value}),{value:s,inputRef:l,handleRemoveTag:m=>{t("remove",m)},handleFocus:()=>{t("focus")},focus:()=>{var m;(m=l.value)==null||m.focus()},handleInput:m=>{t("update:modelValue",m.target.value)},handleKeydown:m=>{switch(m.code){case"Enter":{t("enter",m.target.value,m);break}}}}},render(){var e,t,i,s;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>a.createVNode(pl,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l)},{default:()=>[l.label]})),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(s=(i=this.$slots)==null?void 0:i.suffix)==null?void 0:s.call(i)])}}),b1=a.defineComponent({name:"Select",directives:{clickoutside:Cr},props:{modelValue:d.any,multiple:d.bool.def(!1),disabled:d.bool.def(!1),size:d.size().def("default"),clearable:d.bool.def(!0),loading:d.bool.def(!1),filterable:d.bool.def(!1),remoteMethod:d.func,scrollHeight:d.number.def(216),showSelectAll:d.bool.def(!1),popoverMinWidth:d.number.def(0),showOnInit:d.bool.def(!1),multipleMode:d.oneOf(["default","tag"]).def("default"),tagTheme:d.theme(["success","info","warning","danger"]).def(""),behavior:d.oneOf(["normal","simplicity"]).def("normal"),collapseTags:d.bool.def(!1),noDataText:d.string.def("\u65E0\u6570\u636E"),noMatchText:d.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:d.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:d.string.def("\u8BF7\u9009\u62E9"),selectAllText:d.string.def("\u5168\u90E8"),scrollLoading:d.bool.def(!1),allowCreate:d.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end"],setup(e,{emit:t}){const{modelValue:i,disabled:s,filterable:l,multiple:c,remoteMethod:u,loading:g,loadingText:h,noDataText:p,noMatchText:m,popoverMinWidth:C,showOnInit:b,multipleMode:y,allowCreate:N}=a.toRefs(e),k=Un(),x=a.ref(),D=a.ref(),L=a.ref(),T=a.ref([]),z=a.ref([]),A=a.ref([]),K=a.ref(),R=a.computed(()=>{const fe=new Map;return T.value.forEach(Le=>{fe.set(Le.value,Le)}),fe});a.watch(i,()=>{var fe;Qt(),y.value==="tag"&&((fe=D.value)==null||fe.update())});const F=a.computed(()=>s.value||g.value),O=a.computed(()=>A.value.map(fe=>fe.label)),V=a.computed(()=>{const fe=T.value.reduce((Le,Ve)=>(Ve.disabled||Le.push(Ve.value),Le),[]);return fe.length<=A.value.length&&fe.every(Le=>A.value.some(Ve=>Ve.value===Le))}),U=a.computed(()=>!!z.value.length),ue=a.computed(()=>!T.value.length),ee=a.computed(()=>T.value.length&&T.value.every(fe=>!fe.visible)),ge=a.computed(()=>l.value&&typeof u.value=="function"),Me=a.computed(()=>!(te.value||ue.value||ee.value)),he=a.computed(()=>te.value?h.value:ue.value?p.value:ee.value?m.value:""),{register:ce,unregister:ie}=sl(T),{register:se,unregister:Q}=sl(z),{isHover:j,setHover:E,cancelHover:G}=ou(),{isFocus:q,handleFocus:ae,handleBlur:be}=X4(),{popperWidth:Y,isPopoverShow:re,onPopoverFirstUpdate:ve,hidePopover:ot,showPopover:Fe,togglePopover:Tt}=q4({popoverMinWidth:C.value}),pt=a.computed(()=>(l.value||N.value)&&re.value);a.watch(re,fe=>{fe?(it(),et()):$.value=""});const et=()=>{var Ve,ht;const fe=(Ve=A.value[0])==null?void 0:Ve.value,Le=R.value.get(fe);Le&&!Le.disabled&&Le.visible?K.value=fe:K.value=(ht=T.value.find(hn=>!hn.disabled&&hn.visible))==null?void 0:ht.value},bt=fe=>{!l.value||T.value.forEach(Le=>{var Ve;Le.visible=(Ve=hr(String(Le.label)))==null?void 0:Ve.includes(hr(fe))})},{searchKey:$,searchLoading:te}=e1(ge.value?u.value:bt,et),oe=fe=>{var Le;fe!==i.value&&(t("change",fe),t("update:modelValue",fe),(Le=k==null?void 0:k.validate)==null||Le.call(k,"change"))},Ne=()=>{F.value||(Tt(),t("toggle",re.value))},we=fe=>{!l.value||($.value=fe)},xe=(fe,Le)=>{!N.value||!fe||l.value&&T.value.find(ht=>hr(String(ht.label))===hr(fe))||R.value.get(fe)||(Le.stopPropagation(),c.value?(A.value.push({label:fe,value:fe}),oe(A.value.map(ht=>ht.value))):(A.value=[{label:fe,value:fe}],oe(fe),ot()),$.value="")},We=fe=>{if(!(F.value||!fe)){if(c.value){const Le=A.value.findIndex(Ve=>Ve.value===fe.value);Le>-1?A.value.splice(Le,1):A.value.push({label:fe.label,value:fe.value}),oe(A.value.map(Ve=>Ve.value))}else A.value=[{label:fe.label,value:fe.value}],oe(fe.value),ot();it()}},it=()=>{var fe,Le;y.value==="tag"?(fe=L.value)==null||fe.focus():(Le=x.value)==null||Le.focus()},xt=fe=>{fe.stopPropagation(),A.value=[],oe(c.value?[]:""),t("clear",c.value?[]:""),ot()},Xe=()=>{V.value?A.value=[]:T.value.forEach(fe=>{fe.disabled||A.value.find(Le=>Le.value===fe.value)||A.value.push({label:fe.label,value:fe.value})}),oe(A.value.map(fe=>fe.value)),it()},fn=fe=>{const{scrollTop:Le,clientHeight:Ve,scrollHeight:ht}=fe.target;Le+Ve===ht&&t("scroll-end")},Ue=fe=>{const Le=A.value.findIndex(Ve=>Ve.value===fe.value);Le>-1&&(A.value.splice(Le,1),oe(A.value.map(Ve=>Ve.value)))},Ze=fe=>{var Le,Ve,ht;return((Ve=(Le=R.value)==null?void 0:Le.get(fe))==null?void 0:Ve.label)||((ht=A.value.find(hn=>hn.value===fe))==null?void 0:ht.label)||fe},Qt=()=>{Array.isArray(i.value)?A.value=i.value.map(fe=>({label:Ze(fe),value:fe})):i.value!==void 0&&(A.value=[{label:Ze(i.value),value:i.value}])},Mt=fe=>{var ht,hn;const Le=T.value.filter(Nt=>!Nt.disabled&&Nt.visible),Ve=Le.findIndex(Nt=>Nt.value===K.value);if(!(!Le.length||Ve===-1))switch(fe.code){case"ArrowDown":{fe.preventDefault();const Nt=Ve>=Le.length-1?0:Ve+1;K.value=(ht=Le[Nt])==null?void 0:ht.value;break}case"ArrowUp":{fe.preventDefault();const Nt=Ve===0?Le.length-1:Ve-1;K.value=(hn=Le[Nt])==null?void 0:hn.value;break}case"Backspace":{if(!c.value||!A.value.length||$.value.length)return;A.value.pop(),oe(A.value.map(Nt=>Nt.value));break}case"Enter":{if(!re.value)re.value=!0;else{const Nt=T.value.find(Zl=>Zl.value===K.value);We(Nt)}break}}},Sa=()=>{ot(),be()};return a.provide(rl,a.reactive({multiple:c,selected:A,activeOptionValue:K,register:ce,unregister:ie,registerGroup:se,unregisterGroup:Q,handleOptionSelected:We})),a.onMounted(()=>{Qt(),setTimeout(()=>{b.value&&Fe()})}),{selected:A,isInput:pt,options:T,isDisabled:F,selectedLabel:O,isPopoverShow:re,isHover:j,popperWidth:Y,popoverRef:D,inputRef:x,selectTagInputRef:L,searchLoading:te,isOptionsEmpty:ue,isSearchEmpty:ee,isFocus:q,isShowSelectContent:Me,curContentText:he,isGroup:U,searchKey:$,setHover:E,cancelHover:G,handleFocus:ae,handleTogglePopover:Ne,handleClear:xt,onPopoverFirstUpdate:ve,hidePopover:ot,showPopover:Fe,handleToggleAll:Xe,handleOptionSelected:We,handleClickOutside:Sa,handleScroll:fn,handleDeleteTag:Ue,handleInputChange:we,handleInputEnter:xe,handleKeydown:Mt}},render(){const e=Se({"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=[{name:"offset",options:{offset:[0,4]}}],i=()=>this.loading?a.createVNode($n,{loading:!0,class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Qn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ca,{class:"angle-up"},null),s=()=>this.multipleMode==="tag"?a.createVNode(I1,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":u=>this.searchKey=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var u,g;return(g=(u=this.$slots).prefix)==null?void 0:g.call(u)},suffix:()=>i()}):a.createVNode(Mi,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var u,g;return(g=(u=this.$slots).prefix)==null?void 0:g.call(u)},suffix:()=>i()}),l=()=>a.createVNode("div",{class:"bk-select-trigger",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[s()]),c=()=>{var u,g;return a.createVNode("div",null,[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode($n,{class:"mr5",loading:!0,mode:"spin",size:"mini"},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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onClick:this.handleToggleAll},[this.selectAllText]),(g=(u=this.$slots).default)==null?void 0:g.call(u),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode($n,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),this.loadingText])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.withDirectives(a.createVNode("div",{class:e},[a.createVNode(vn,{ref:"popoverRef",theme:"light",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow,modifiers:t,handleFirstUpdate:this.onPopoverFirstUpdate},{default:()=>l(),content:()=>c()})]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])}});const Ml=Rt(b1,{Option:cu,Group:t1});function N1(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:w1}=Ci,Cl=Object.assign({},w1);Cl.width.default="400",Cl.height.default="100%";var L1=a.defineComponent({name:"Sideslider",components:{BkModal:Ci,BkButton:Wt},props:ze(Z({},Cl),{title:{type:String,default:""},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:i}){const s=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(i("update:isShow",!1),i("closed"),setTimeout(()=>{i("animation-end")},250))},l=()=>{setTimeout(()=>{i("shown")},200)},c=()=>{setTimeout(()=>{i("hidden")},200)};return()=>{const u={header:()=>{var p,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{s()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(p=t.header)==null?void 0:p.call(t))!=null?m:e.title])])])},default:()=>{var p,m;return(m=(p=t.default)==null?void 0:p.call(t))!=null?m:"Content"},footer:()=>{var p,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(p=t.footer)==null?void 0:p.call(t))!=null?m:""])}},g=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,h=t.footer?"calc(100vh - 114px)":"calc(100vh - 60px)";return a.createVNode(Ci,a.mergeProps(e,{maxHeight:h,class:g,style:`${e.direction}: 0;`,onHidden:c,onShown:l,onClose:s}),N1(u)?u:{default:()=>[u]})}}});const wu=Re(L1),Lu={theme:d.theme().def("primary"),size:d.size(),curStep:d.number.def(1),controllable:d.bool.def(!1),direction:d.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:d.commonType(["","error","loading"],"status").def(""),lineType:d.commonType(["dashed","solid"],"lineType").def("dashed"),text:d.bool,extCls:d.string,steps:d.array.def([]),beforeChange:d.func};var v1=a.defineComponent({name:"Steps",props:Lu,emits:["update:curStep","click"],setup(e,{emit:t}){const i=a.ref([]),s=g=>{const h=[];g.forEach(p=>{var m;typeof p=="string"?h.push(p):h.push({title:p.title,icon:p.icon,description:p.description,status:p.status,border:(m=p.border)!=null?m:!0})}),i.value.splice(0,i.value.length,...h)},l=g=>{Lu.curStep=g},c=()=>{var g;i.value.splice(0,i.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(g=e.steps)!=null&&g.length&&s(e.steps)},u=async g=>{try{e.controllable&&g!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(h,p)=>{const m=await e.beforeChange(g);m?h(m):p(m)}),t("update:curStep",g),t("click",g))}catch(h){console.warn(h)}};return a.onMounted(c),a.watch(()=>e.steps,()=>{s(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{l(e.curStep)},{deep:!0}),{defaultSteps:i,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",i=this.size?`${e}-${this.size}`:"",s=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${i}`),l=C=>this.curStep>C+1||this.defaultSteps[C].status==="done",c=C=>this.curStep===C+1,u=C=>{const{icon:b}=C;return b?Object.prototype.toString.call(b)==="[object Object]":typeof C=="string"},g=(C,b)=>(b.icon||(b.icon=C),!isNaN(b.icon)),h=C=>C.status==="loading",p=C=>C.status==="error",m=(C,b)=>c(C)&&this.status==="loading"||h(b)?a.createVNode(tr,{class:"bk-icon bk-steps-icon icon-loading"},null):c(C)&&this.status==="error"||p(b)?a.createVNode(wn,{class:"bk-steps-icon"},null):l(C)?a.createVNode(ir,{class:"bk-steps-icon"},null):a.createVNode("span",null,[g(C,b)?C+1:a.createVNode(b.icon,null,null)]);return a.createVNode("div",{class:s},[this.defaultSteps.map((C,b)=>{var y,N,k;return a.createVNode("div",{class:["bk-step",C.title?"":"bk-step-no-content",l(b)?"done":"",c(b)?"current":"",c(b)&&this.status==="error"?"isError":"",C.status&&c(b)?[`bk-step-${C.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(C)?"icon":"number"}`,`bk-step-icon${C.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(b+1)}},[(k=(N=(y=this.$slots)[b+1])==null?void 0:N.call(y))!=null?k:m(b,C)]),C.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(b+1)}},[C.title]),C.description&&a.createVNode("div",{class:"bk-step-description",title:C.description},[C.description])]):""])})])}});const vu=Re(v1);var k1=a.defineComponent({name:"Switcher",props:{theme:d.theme().def(""),size:d.size(),disabled:d.bool,showText:d.bool,isOutline:d.bool,onText:d.string.def("ON"),offText:d.string.def("OFF"),isSquare:d.bool,extCls:d.string,beforeChange:d.func.def(void 0),trueValue:d.oneOfType([d.string,d.number,d.bool]).def(!0),falseValue:d.oneOfType([d.string,d.number,d.bool]).def(!1),value:d.oneOfType([d.string,d.number,d.bool]).def(!1),modelValue:d.oneOfType([d.string,d.number,d.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const i=Un(),s=a.ref(!1),l=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),g=a.computed(()=>{const p={[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":l.value,"is-unchecked":!l.value,"is-loading":s.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const m=`bk-switcher-${e.size}`;p[m]=!0}return e.size||(p["bk-switcher-nomal"]=!0),p});a.watch(()=>e.modelValue,()=>{c.value=!0}),a.watch(()=>e.value,()=>{c.value=!1});const h=p=>{if(p.stopPropagation(),p.preventDefault(),e.disabled||s.value)return;const m=l.value?e.falseValue:e.trueValue,C=!l.value,b=()=>{var N;t("update:modelValue",m),t("change",C),(N=i==null?void 0:i.validate)==null||N.call(i,"change")};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(m),typeof y.then=="function"))return s.value=!0,y.then(()=>{b()}).finally(()=>{s.value=!1});y&&b()};return()=>a.createVNode("div",{class:g.value,onClick:h,tabindex:"0",onKeydown:h},[s.value?a.createVNode(_s,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const ku=Re(k1),T1={onContentScroll:Function},x1=Z({list:d.array.def([]),enabled:d.bool.def(!0),scrollEvent:d.bool.def(!1),lineHeight:d.oneOfType([d.number,d.func]).def(30),minHeight:d.number.def(30),height:d.oneOfType([d.string.def("100%"),d.number]).def("100%"),width:d.oneOfType([d.string.def("100%"),d.number]).def("100%"),className:d.oneOfType([d.arrayOf(d.string),d.object,d.arrayOf(d.object),d.string]).def(""),contentClassName:d.oneOfType([d.arrayOf(d.string),d.object,d.arrayOf(d.object),d.string]).def(""),contentStyle:d.object.def({}),scrollXName:d.string.def("bk-scroll-x"),scrollYName:d.string.def("bk-scroll-y"),groupItemCount:d.number.def(1),preloadItemCount:d.number.def(1),renderAs:d.string.def("div"),contentAs:d.string.def("div"),scrollOffsetTop:d.number.def(0),scrollPosition:d.string.def("content"),abosuteHeight:d.oneOfType([d.string.def("auto"),d.number]).def("auto"),throttleDelay:d.number.def(60)},T1);var S1=(e,t)=>{const{renderAs:i,contentAs:s}=e,l=(g,h,p,m,C,b,y)=>{t.emit("content-scroll",[g,{translateY:C,translateX:b,pos:y}])},c=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var g,h,p,m,C,b,y,N,k;return a.h(i,{class:e.className},[(p=(h=(g=t.slots).beforeContent)==null?void 0:h.call(g))!=null?p:"",a.withDirectives(a.h(s,{class:e.contentClassName,style:e.contentStyle},[(b=(C=(m=t.slots).default)==null?void 0:C.call(m,{data:e.list}))!=null?b:""]),[[c,u]]),(k=(N=(y=t.slots).afterContent)==null?void 0:N.call(y))!=null?k:""])}}};function Tu(e,t,i,s){let l=0,c=0,u=0,g=0;for(;l<e;l++){if(g=s(l,[l*i,(l+1)*i,"virtual"]),c+g>t){u=t-c;break}c+=g}return{startIndex:l,height:c,diffHeight:u}}function xu(e,t,i,s,l){if(!s)return;const c=s.scrollTop,u=s.scrollLeft,{scrollTop:g,count:h,groupItemCount:p,startIndex:m,endIndex:C}=i,{offsetHeight:b}=s;let y=0,N=0,k=0;if(typeof e=="number"&&(y=Math.floor(c/e),N=Math.ceil(b/e)+y,k=c%e),typeof e=="function"){const x=Tu(h,c,p,e);y=x.startIndex>0?x.startIndex:0,k=x.diffHeight,N=Tu(h,b,p,e).startIndex+y+1}if(c!==g||y!==m||N!==C){const x=s.scrollHeight-s.offsetHeight-s.scrollTop;typeof t=="function"&&t(l,y,N,c,k,u,{bottom:x>=0?x:0})}}function D1(e,t,i){const{lineHeight:s=30,handleScrollCallback:l,pagination:c={},onlyScroll:u}=i.value;if(u){const b=t.scrollTop,y=t.scrollLeft,N=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,b,b,y,{bottom:N>=0?N:0});return}const{startIndex:g,endIndex:h,groupItemCount:p,count:m,scrollTop:C}=c;xu(s,l,{scrollTop:C,startIndex:g,endIndex:h,groupItemCount:p,count:m},t,e)}const Su=(e=60)=>_n.exports.throttle((t,i,s)=>D1(t,i,s),e),j1=(e,t,i,s=60)=>{Reflect.apply(Su(s),globalThis,[e,t,i])};var z1={mounted(e,t){const i=e.parentNode,{throttleDelay:s}=t.value;i.addEventListener("scroll",l=>{j1(l,i,t,s)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",Su)}}},J1=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:z1},props:x1,emits:["content-scroll"],setup(e,t){const{renderAs:i,contentAs:s}=e,l=R=>typeof R=="string"?[R]:typeof R=="object"&&!Array.isArray(R)?[R]:R;if(!e.enabled){const{rendAsTag:R}=S1(e,t);return R}const c=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),g=(R,F,O,V,U,ue,ee)=>{u.startIndex=F,u.endIndex=O,u.scrollTop=V,u.translateY=U,u.translateX=ue,u.pos=ee,t.emit("content-scroll",[R,u])};a.onMounted(()=>{a.nextTick(()=>{C(e.list),b()})}),a.watch(()=>e.list,()=>{h(),b()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{h(),b()});const h=()=>{C(e.list)},p=a.ref(0),m=a.ref(0),C=R=>{if(p.value=Math.ceil((R||[]).length/e.groupItemCount),u.count=p.value,u.startIndex=0,u.endIndex=0,u.translateY=0,u.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let V=0;V<p.value;V++){const U=e.lineHeight.call(this,V,R.slice(V*e.groupItemCount,e.groupItemCount));O+=typeof U=="number"?U:0}m.value=O}else m.value=e.lineHeight*p.value;else m.value=e.abosuteHeight},b=()=>{var F;const R=(F=c.value)==null?void 0:F.parentNode;xu(e.lineHeight,g,u,R,null)},y=a.computed(()=>(e.list||[]).map((R,F)=>ze(Z({},R),{$index:F}))),N=a.computed(()=>y.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),x=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:{})),D=a.computed(()=>{const R=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:R?"none":"block"}}),L=a.computed(()=>["bk-virtual-render",e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?"bk-virtual-content":""]),T=a.computed(()=>[e.scrollPosition==="content"?"bk-virtual-content":"",...l(e.contentClassName)]),z=a.resolveDirective("bkVirtualRender"),A={lineHeight:e.lineHeight,handleScrollCallback:g,pagination:u,throttleDelay:e.throttleDelay},K=()=>{h(),b()};return t.expose({reset:K}),()=>{var R,F,O,V,U,ue,ee,ge,Me;return a.h(i||"div",{ref:c,class:L.value,style:x.value},[(O=(F=(R=t.slots).beforeContent)==null?void 0:F.call(R))!=null?O:"",a.withDirectives(a.h(s||"div",{class:T.value,style:Z(Z({},k.value),e.contentStyle)},[(ue=(U=(V=t.slots).default)==null?void 0:U.call(V,{data:N.value}))!=null?ue:""]),[[z,A]]),(Me=(ge=(ee=t.slots).afterContent)==null?void 0:ge.call(ee))!=null?Me:"",a.h("div",{class:["bk-virtual-section"],style:D.value})])}}});const yr=Re(J1),Du=["none","row","col","outer"];var On=(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||{}),Wi=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(Wi||{});const kn=(...e)=>!0,P1={columnPick:kn,columnFilter:kn,columnSort:kn,rowClick:kn,rowDblClick:kn,rowExpand:kn,pageLimitChange:kn,pageValueChange:kn,settingChange:kn,scrollBottom:kn},vt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},ju=(e,t)=>{if(e){if(typeof e=="object"){let i=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(i)||(i=1),ze(Z(Z({},t),e),{current:i})}return t}return{}};var Q1=(e,t)=>{const i=a.ref(0),s=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=ju(e.pagination,l);const c=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){i.value=0,s.value=e.data.length;return}i.value=(l.current-1)*l.limit,s.value=l.current*l.limit},g=a.reactive([]),h=y=>{typeof y=="function"&&g.sort(y)},p=y=>{if(typeof y=="function"){const N=g.filter((k,x)=>y(k,x,e.data));g.splice(0,g.length,...N)}},m=(y,N)=>{g.splice(0,g.length,...t.slice(i.value,s.value)),p(y),h(N)},C=(y,N)=>{l=ju(e.pagination,l),b(),u(),m(y,N)},b=()=>{!e.pagination||(c.value=e.remotePagination?l:ze(Z({},l),{count:e.data.length}))};return{pageData:g,localPagination:c,resolvePageData:m,watchEffectFn:C}},O1=(e,t)=>{const i=a.toRef(e,"scrollLoading"),s=()=>typeof i.value=="boolean"?{loading:!!i.value,inline:!0,title:"",size:Ln.Normal,mode:pi.Default,indicator:null}:i.value,l=a.computed(()=>i.value!==null&&(typeof i.value=="boolean"&&i.value||typeof i.value=="object"));return{renderScrollLoading:()=>{var u,g,h;if(l.value){const{loading:p,size:m,mode:C,title:b,inline:y,indicator:N}=s();return(h=(g=(u=t.slots).fixedBottom)==null?void 0:g.call(u))!=null?h:a.createVNode($n,{loading:p,size:m,mode:C,title:b,inline:y,indicator:N},null)}}}},zu=(e=>(e.CURRENT="current",e.ALL="all",e))(zu||{});const A1={data:d.arrayOf(d.any).def([]),columns:d.arrayOf(d.shape({label:d.oneOfType([d.func.def(()=>""),d.string.def("")]),field:d.oneOfType([d.func.def(()=>""),d.string.def("")]),render:d.oneOfType([d.func.def(()=>""),d.string.def("")]),width:d.oneOfType([d.number.def(void 0),d.string.def("auto")]),minWidth:d.oneOfType([d.number.def(void 0),d.string.def("auto")]).def(),type:d.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:d.bool.def(!0),fixed:d.oneOfType([d.bool,d.commonType(["left","right"],"fixed")]).def(!1),sort:d.oneOfType([d.shape({sortFn:d.func.def(void 0),sortScope:d.commonType(Object.values(zu)).def("current")}),d.bool,d.string]).def(!1),filter:d.oneOfType([d.shape({list:d.arrayOf(d.any).def([]),filterFn:d.func.def(void 0)}),d.bool,d.string]).def(!1)})).def([]),activeColumn:d.oneOfType([d.number.def(-1),d.arrayOf(d.number.def(-1))]),columnPick:d.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:d.oneOfType([d.number,d.string]).def("auto"),minHeight:d.oneOfType([d.number,d.string]).def(200),maxHeight:d.oneOfType([d.number,d.string]).def("auto"),rowHeight:d.oneOfType([d.number,d.func]).def(40),headHeight:d.number.def(40),showHead:d.bool.def(!0),thead:d.shape({height:d.number.def(40),isShow:d.bool.def(!0),cellFn:d.func.def(void 0)}),virtualEnabled:d.bool.def(!1),border:d.arrayOf(d.commonType(Du,"border")).def(["row"]),pagination:d.oneOfType([d.bool.def(!1),d.object.def({})]).def(!1),remotePagination:d.bool.def(!1),emptyText:d.string.def("\u6682\u65E0\u6570\u636E"),settings:d.oneOfType([d.bool,d.shape({fields:d.shape([]).def(void 0),checked:d.shape([]).def(void 0),limit:d.number.def(void 0),size:d.size(["small","default","large"]).def("default"),sizeList:d.shape([]).def(void 0)})]).def(!1),rowClass:d.oneOfType([d.string,d.object,d.func]).def({}),rowStyle:d.oneOfType([d.string,d.object,d.func]).def({}),cellStyle:d.oneOfType([d.string,d.object,d.func]).def({}),cellClass:d.oneOfType([d.string,d.object,d.func]).def({}),scrollLoading:d.oneOfType([d.object,d.bool]).def(void 0),reserveExpand:d.bool.def(!1),rowKey:d.oneOfType([d.string,d.func]).def(vt.ROW_INDEX)};function E1(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var V1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const i=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:c})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":c}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ml,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:i,disabled:e.disabled},E1(u=e.limitList.map((g,h)=>a.createVNode(cu,{value:g,label:`${g}`,key:`${h}_${g}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Ii=5;var R1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),i=a.computed(()=>t.value===1),s=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),c=a.ref(!1),u=a.computed(()=>{l.value=!1,c.value=!1;const y=[];if(e.totalPageNum<=Ii){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const N=Math.floor(Ii/2);e.totalPageNum>Ii&&(l.value=t.value-N>2,c.value=t.value+N<e.totalPageNum-1);const k=Math.min(e.totalPageNum-Ii,Math.max(2,t.value-N));for(let x=k;x<k+Ii;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const g=()=>{i.value||(t.value=t.value-1)},h=()=>{s.value||(t.value=t.value+1)},p=y=>{y!==t.value&&(t.value=y)},m=()=>{t.value=Math.max(1,t.value-Ii)},C=()=>{t.value=Math.min(e.totalPageNum,t.value+Ii)};return{current:t,render:({isFirst:y,isLast:N})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":N}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:g},[e.prevText||a.createVNode(mi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>p(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(sr,null,null)]),u.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>p(k)},[k])),c.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:C},[a.createVNode(sr,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>p(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":s.value},onClick:h},[e.nextText||a.createVNode(Pn,null,null)])])}},W1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),i=a.ref(!1),s=a.ref(1),l=a.computed(()=>s.value===1),c=a.computed(()=>s.value===e.totalPageNum);let u=0;const g=a.computed(()=>{const x=[];for(let D=1;D<=e.totalPageNum;D++)x.push(D);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?s.value=x:x<1?s.value=1:s.value=e.totalPageNum,u=s.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{s.value>x&&(s.value=x)})});const h=()=>{l.value||(s.value=s.value-1)},p=()=>{c.value||(s.value=s.value+1)},m=()=>{i.value=!0},C=()=>{i.value=!1,t.value.textContent=`${u}`,u!==s.value&&(s.value=u)},b=x=>{const D=x.target,L=Number(D.textContent);!L||L<1||L>e.totalPageNum||L===s.value||(u=L)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),C())},N=x=>{u=x,C()};return{current:s,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":l.value},onClick:h},[a.createVNode(Bs,null,null)]),a.createVNode(vn,{theme:"light",trigger:"click",arrow:!1,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":i.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:C,onInput:b,onKeydown:y},[s.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"},[g.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===s.value},key:x,onClick:()=>N(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":c.value},onClick:p},[a.createVNode(ya,null,null)])])}},Z1=()=>({isFirst:e,isLast:t})=>{const{props:i}=a.getCurrentInstance();return i.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:i.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[i.count]),a.createTextVNode("\u6761")]):null};const G1={modelValue:d.number.def(1),count:d.number.def(0).isRequired,limit:d.number.def(10),limitList:d.arrayOf(Number).def([10,20,50,100]),showLimit:d.bool.def(!0),type:d.oneOf(["default","compact"]).def("default"),location:d.oneOf(["left","right"]).def("right"),align:d.oneOf(["left","center","right"]).def("left"),size:d.size(),small:d.bool.def(!1),showTotalCount:d.bool.def(!0),prevText:d.string,nextText:d.string,disabled:d.bool.def(!1),layout:d.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(i=>t[i])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var Y1=a.defineComponent({name:"Pagination",props:G1,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const i=a.ref(0),{count:s,limit:l}=a.toRefs(e),c=Z1(),{current:u,render:g}=R1(),{current:h,render:p}=W1(),{limit:m,render:C}=V1();return a.watch([s,m,l],([b,y])=>{const N=Math.ceil(b/y);i.value=N<1?1:N},{immediate:!0}),a.watch(u,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(h,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(m,b=>{t.emit("limitChange",b)}),{totalPageNum:i,renderTotal:c,renderList:g,renderLimit:C,renderSmallList:p}},render(){const e=Se({"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((i,s)=>t[i]({isFirst:s===0,isLast:s===this.layout.length-1}))])}});const yl=Re(Y1);var B1=a.defineComponent({name:"BodyEmpty",props:{list:d.array.def([]),filterList:d.array.def([]),emptyText:d.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const i=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(dr,{scene:"part",type:i.value},{default:()=>{var s,l;return[(l=(s=t.default)==null?void 0:s.call(t))!=null?l:e.emptyText]}})}}),Ir={exports:{}},Ju=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(Ju){var Pu=new Uint8Array(16);Ir.exports=function(){return Ju(Pu),Pu}}else{var Qu=new Array(16);Ir.exports=function(){for(var t=0,i;t<16;t++)(t&3)===0&&(i=Math.random()*4294967296),Qu[t]=i>>>((t&3)<<3)&255;return Qu}}for(var Ou=[],br=0;br<256;++br)Ou[br]=(br+256).toString(16).substr(1);function H1(e,t){var i=t||0,s=Ou;return[s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]]].join("")}var Au=H1,F1=Ir.exports,U1=Au,Eu,Il,bl=0,Nl=0;function _1(e,t,i){var s=t&&i||0,l=t||[];e=e||{};var c=e.node||Eu,u=e.clockseq!==void 0?e.clockseq:Il;if(c==null||u==null){var g=F1();c==null&&(c=Eu=[g[0]|1,g[1],g[2],g[3],g[4],g[5]]),u==null&&(u=Il=(g[6]<<8|g[7])&16383)}var h=e.msecs!==void 0?e.msecs:new Date().getTime(),p=e.nsecs!==void 0?e.nsecs:Nl+1,m=h-bl+(p-Nl)/1e4;if(m<0&&e.clockseq===void 0&&(u=u+1&16383),(m<0||h>bl)&&e.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");bl=h,Nl=p,Il=u,h+=122192928e5;var C=((h&268435455)*1e4+p)%4294967296;l[s++]=C>>>24&255,l[s++]=C>>>16&255,l[s++]=C>>>8&255,l[s++]=C&255;var b=h/4294967296*1e4&268435455;l[s++]=b>>>8&255,l[s++]=b&255,l[s++]=b>>>24&15|16,l[s++]=b>>>16&255,l[s++]=u>>>8|128,l[s++]=u&255;for(var y=0;y<6;++y)l[s+y]=c[y];return t||U1(l)}var $1=_1,X1=Ir.exports,K1=Au;function q1(e,t,i){var s=t&&i||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var l=e.random||(e.rng||X1)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,t)for(var c=0;c<16;++c)t[s+c]=l[c];return t||K1(l)}var eh=q1,th=$1,Vu=eh,wl=Vu;wl.v1=th,wl.v4=Vu;var Ll=wl;const Xt=(e,t,i)=>{if(Object.prototype.hasOwnProperty.call(e,t))return typeof e[t]=="function"?e[t].call(globalThis,...i):e[t]},vl=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],nh=e=>Ru(e,"auto"),Ru=(e,t="100%",i=null)=>{let s="";return/^auto|null|undefined$/ig.test(`${e}`)?s=t:s=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,i&&(s=`calc(${s} - ${i})`),s},ih=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(i=>Du.includes(i))),[...new Set(t)].map(i=>`bordered-${i}`).join(" ")},Na=(e,t=["resizeWidth","calcWidth","width"])=>{var i,s;return(s=(i=e[t[0]])!=null?i:e[t[1]])!=null?s:e[t[2]]},Wu=(e,t,i=20)=>{const{width:s}=e.getBoundingClientRect()||{};let l=s-4;const c=[],u=(h,p)=>{const{minWidth:m=void 0}=h;if(m===void 0)return p;let C=p;return/^\d+\.?\d*$/.test(`${m}`)&&(C=Number(m)),/^\d+\.?\d*%$/.test(`${m}`)&&(C=Number(m)*s/100),/^\d+\.?\d*px$/i.test(`${m}`)&&(C=Number(`${m}`.replace(/px/i,""))),C},g=(h,p,m=!0)=>{const C=u(h,p),b=p<C?C:p;Object.assign(h,{calcWidth:b}),m&&(l=l-b,l<0&&(l=0))};if(t.forEach((h,p)=>{if(!h.isHidden){const m=String(Na(h));let C=!0;if(/^\d+\.?\d*(px)?$/.test(m)){const b=Number(m.replace("px",""));g(h,b),C=!1}if(/^\d+\.?\d*%$/.test(m)){let b=i;if(l>0){const y=Number(m.replace("%",""));b=l*y/100}g(h,b),C=!1}C&&c.push(p)}}),c.length>0){let h=i;l>0&&(h=l/c.length,c.forEach(p=>g(t[p],h,!1)))}},ah=(e,t,i=60,s=!1)=>{const l=_n.exports.throttle(()=>{typeof t=="function"&&t()},i),c=new ResizeObserver(()=>{l()});return s&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},stop:()=>{c.disconnect(),c.unobserve(e)}}},kl=e=>{const{showHead:t,headHeight:i,thead:s={}}=e;return Object.assign({},{isShow:t,height:i},Z({},s))},Tl=(e,t,i)=>i.type==="index"?e[vt.ROW_INDEX]+1:e[t],wa=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?wa(Reflect.apply(e,globalThis,t),t):[],rh=(e,t,i)=>typeof t.rowKey=="string"?t.rowKey===vt.ROW_INDEX?`__ROW_INDEX_${i}`:t.rowKey.split(".").reduce((l,c)=>Object.prototype.hasOwnProperty.call(l,c)?l[c]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Ll.v4();function sh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var lh=a.defineComponent({name:"HeadFilter",props:{column:d.any.def({}),height:d.number.def(40)},emits:["change"],setup(e,{emit:t}){const{column:i}=e,s=a.ref(!1),l=a.reactive({isOpen:!1,checked:[]}),c=a.computed(()=>Se({[rt("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:l.checked.length,opened:l.isOpen})),u=Se({[rt("table-head-filter")]:!0}),g=N=>{l.isOpen=N},h=[{name:"offset",options:{offset:[0,0]}}],p=`light ${rt("table-head-filter")}`,m=a.computed(()=>{const{list:N=[]}=i.filter;return N.map(k=>ze(Z({},k),{checked:l.checked.includes(k.value)}))}),C=typeof i.filter.filterFn=="function"?(N,k,x,D)=>i.filter.filterFn(N,k,e.column,x,D):(N,k)=>N.length?N.includes(Tl(k,Xt(i,"field",[i,k]),i)):!0,b=()=>{if(e.column.filter==="custom"){t("change",[...l.checked],null),s.value=!1;return}t("change",[...l.checked],C),s.value=!1},y=()=>{l.checked.length&&(l.checked.splice(0,l.checked.length),s.value=!1,a.nextTick(()=>t("change",l.checked,C)))};return()=>a.createVNode(vn,a.mergeProps({trigger:"click",isShow:s.value,placement:"bottom-end",stopBehaviors:["stopPropagation"],arrow:!1},{modifiers:h,theme:p},{boundary:document.body,onAfterShow:()=>g(!0),onAfterHidden:()=>g(!1)}),{default:()=>a.createVNode(Ps,{class:c.value,onClick:()=>s.value=!0},null),content:()=>{let N;return a.createVNode("div",{class:u},[a.createVNode(nl,{class:"content-list",modelValue:l.checked,"onUpdate:modelValue":k=>l.checked=k},sh(N=m.value.map(k=>a.createVNode("div",{class:"list-item"},[a.createVNode(ba,{label:k.value},{default:()=>[k.text]})])))?N:{default:()=>[N]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:b},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",l.checked.length?"":"disable"],onClick:y},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Zi=(e=>(e.ASC="asc",e.DESC="desc",e))(Zi||{}),oh=a.defineComponent({name:"HeadSort",props:{column:d.any.def({})},emits:["change"],setup(e,{emit:t}){const i=a.ref(""),s=(l,c)=>{var C,b;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),i.value=c,e.column.sort==="custom"){t("change",null,c);return}const u=e.column.field,g=y=>Tl(y,u,e.column),h=(y,N)=>{const k=g(y),x=g(N);return typeof k=="number"&&typeof x=="number"?k-x:String.prototype.localeCompare.call(k,x)},p=typeof((C=e.column.sort)==null?void 0:C.sortFn)=="function"?(b=e.column.sort)==null?void 0:b.sortFn:h;t("change",(y,N)=>p(y,N)*(c===Zi.DESC?-1:1),c)};return()=>a.createVNode("span",{class:rt("head-cell-sort")},[a.createVNode(Js,{class:["sort-action","sort-asc",i.value===Zi.ASC?"active":""],onClick:l=>s(l,Zi.ASC)},null),a.createVNode(er,{class:["sort-action","sort-desc",i.value===Zi.DESC?"active":""],onClick:l=>s(l,Zi.DESC)},null)])}});class ch{constructor(t,i){sa(this,"props",null);sa(this,"ctx",null);this.props=t,this.ctx=i}}function Zu(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var uh=a.defineComponent({name:"Settings",props:{settings:d.oneOfType([d.bool,d.shape({fields:d.shape([]).def(void 0),checked:d.shape([]).def(void 0),limit:d.number.def(void 0),size:d.string.def(void 0)})]).def(!1),columns:d.array.def([]),rowHeight:d.number.def(40)},emits:["change"],setup(e,{emit:t}){var R,F,O;const i=[{value:"small",label:"\u5C0F",height:32},{value:"default",label:"\u4E2D",height:e.rowHeight},{value:"large",label:"\u5927",height:56}],s=[{name:"offset",options:{offset:[10,10]}}],l=a.ref(!1),c=e.settings,u=a.ref((R=c.size)!=null?R:"default"),g=a.ref(e.rowHeight),h=a.ref((F=c.checked)!=null?F:[]),m=`light ${rt("table-settings")}`,C=()=>{t("change",{checked:h.value,size:u.value,height:g.value}),l.value=!1},b=()=>{var V;u.value="default",g.value=e.rowHeight,h.value=(V=c.checked)!=null?V:[],l.value=!1},y=()=>{l.value=!0},N=()=>{var V,U;h.value=((U=(V=c.fields)!=null?V:e.columns)!=null?U:[]).map((ue,ee)=>Xt(ue,"field",[ue,ee]))},k=a.computed(()=>{var V;return((V=c.limit)!=null?V:0)>0}),x=(O=c.sizeList)!=null?O:i,D=a.computed(()=>{var V;return k.value&&((V=c.limit)!=null?V:0)<=h.value.length}),L=(V,U)=>D.value&&!h.value.includes(Xt(V,"field",[V,U])),T=V=>{u.value=V.value,g.value=V.height},z=V=>({"line-size":!0,"is-default":u.value==="default",active:V.value===u.value}),A={width:"85px",marginRight:"5px"},K=()=>x.map(V=>a.createVNode("span",{class:z(V),onClick:()=>T(V)},[V.label]));return()=>a.createVNode(vn,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{modifiers:s,theme:m},{boundary:document.body}),{default:()=>a.createVNode(As,{style:"color: rgba(99,101,110, 0.6);",onClick:y},null),content:()=>{var U,ue;let V;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("h2",null,[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(nr,{class:"icon-close-action",onClick:b},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",null,[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:N},[a.createTextVNode("\u5168\u9009")])]),a.createVNode(nl,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":ee=>h.value=ee},Zu(V=((ue=(U=c.fields)!=null?U:e.columns)!=null?ue:[]).map((ee,ge)=>{let Me;return a.createVNode("div",{class:"field-item"},[a.createVNode(ba,{label:Xt(ee,"field",[ee,ge]),disabled:L(ee,ge)},Zu(Me=Xt(ee,"label",[ee,ge]))?Me:{default:()=>[Me]})])}))?V:{default:()=>[V]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),K()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Wt,{theme:"primary",style:A,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Wt,{style:A,onClick:b},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}})}}),xl=(e,t)=>{const i=a.computed(()=>e.pagination&&e.data.length?40:0),s=m=>({column_fixed:!!m.fixed,column_fixed_left:m.fixed!=="right",column_fixed_right:m.fixed==="right"}),l=m=>m.fixed==="right"?"right":"left",c={left:(m=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,b,y)=>m&&y===0?C:C+Na(b),0),right:(m=!0)=>t.filter(C=>C.fixed==="right").reduce((C,b,y)=>m&&y===0?C:C+Na(b),0)},u=c.right,g=()=>{const m=(y,N)=>{if(!y.fixed)return{};const k=l(y),x=k==="right"?-1:1,D=`${N[k]}px`;return N[k]=N[k]+Na(y)*x,{[k]:D}},C=u(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:m}},h=()=>{const m=b=>({width:`${c[b](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(b=>!b.isHidden&&b.fixed).map(b=>{const y=l(b),N=C[y];return C[y]=!0,N?"":a.createVNode("div",{class:s(b),style:m(y)},null)})},p=rt("table-fixed");return{renderFixedColumns:h,fixedWrapperClass:p,getFixedColumnStyleResolve:g}};class dh{constructor(t,i,s,l){sa(this,"getRowHeight",(t,i)=>{const{size:s,height:l}=this.setting;return l!=null?Xt(this.setting,"height",["tbody",t,i,s]):Xt(this.props,"rowHeight",["tbody",t,i])});sa(this,"getColumnClass",(t,i)=>({[`${this.uuid}-column-${i}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));sa(this,"getHeadColumnClass",(t,i)=>ze(Z({},this.getColumnClass(t,i)),{active:this.isColActive(i)}));this.props=t,this.context=i,this.reactiveProp=s,this.colgroups=l,this.plugins=new ch(t,i),this.uuid=$a(8),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=kl(this.props);if(!t)return null;const i=s=>{const{checked:l=[],size:c,height:u}=s;this.reactiveProp.setting.size=c,this.reactiveProp.setting.height=u,l.length&&this.colgroups.forEach(g=>{g.isHidden=!(l!=null?l:[]).includes(Xt(g,"field",[g]))}),this.emitEvent(On.ON_SETTING_CHANGE,[s])};return[this.props.settings?a.createVNode(uh,{class:"table-head-settings",settings:this.props.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:i},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var i,s,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderTBody(t)]):(l=(s=(i=this.context.slots).empty)==null?void 0:s.call(i))!=null?l:a.createVNode(B1,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(yl,a.mergeProps(t,{modelValue:t.current,onLimitChange:i=>this.handlePageLimitChange(i),onChange:i=>this.hanlePageChange(i)}),null)}on(t,i){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(i),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,i){this.events.has(t)&&this.events.get(t).forEach(s=>{typeof s=="function"&&Reflect.apply(s,this,i)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,i=!1){const s=this.propActiveCols.find(l=>l.index===t);Object.assign(s,{active:!s.active}),i&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,i){const s=(l,c)=>{this.emitEvent(On.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:i,type:c}])};return a.createVNode(oh,{column:t,onChange:s},null)}getFilterCell(t,i){const s=(l,c)=>{const u=(g,h)=>c(l,g,h);this.emitEvent(On.ON_FILTER_CLICK,[{filterFn:u,checked:l,column:t,index:i}])};return a.createVNode(lh,{column:t,height:this.props.headHeight,onChange:s},null)}renderHeader(){const t=kl(this.props),{cellFn:i}=t,s={"--row-height":`${Xt(t,"height",["thead"])}px`},l=(p,m)=>{const C=[];return p.sort&&C.push(this.getSortCell(p,m)),p.filter&&C.push(this.getFilterCell(p,m)),typeof i=="function"?(C.unshift(i(p,m)),C):(C.unshift(Xt(p,"label",[p,m])),C)},c=p=>Array.from(p.listeners.keys()).reduce((m,C)=>{const b=C.split("_").slice(-1)[0];return Object.assign(m,{[b]:y=>{p.listeners.get(C).forEach(N=>Reflect.apply(N,this,[y,p,this]))}})},{}),{getFixedColumnStyleResolve:u}=xl(this.props,this.colgroups),{resolveFixedColumnStyle:g,fixedoffset:h}=u();return a.createVNode("thead",{style:s},[a.createVNode("tr",null,[this.filterColgroups.map((p,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(p,m),style:g(p,h),onClick:()=>this.handleColumnHeadClick(m)},c(p)),[a.createVNode("div",{class:"cell"},[l(p,m)])]))])])}renderTBody(t){const{getFixedColumnStyleResolve:i}=xl(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((s,l)=>{const c=[...wa(this.props.rowStyle,[s,l,this]),{"--row-height":`${this.getRowHeight(s,l)}px`}],u=[...wa(this.props.rowClass,[s,l,this])],{resolveFixedColumnStyle:g,fixedoffset:h}=i();return[a.createVNode("tr",{style:c,class:u,key:s[vt.ROW_UID],onClick:p=>this.handleRowClick(p,s,l,t),onDblclick:p=>this.handleRowDblClick(p,s,l,t)},[this.filterColgroups.map((p,m)=>{const C=[g(p,h),...wa(this.props.cellStyle,[p,m,s,l,this])],b=[this.getColumnClass(p,m),...wa(this.props.cellClass,[p,m,s,l,this]),{"expand-row":s[vt.ROW_EXPAND]}],y={cell:!0,"expand-cell":p.type==="expand"},N=`__CELL_${l}_${m}`;return a.createVNode("td",{key:N,class:b,style:C,colspan:1,rowspan:1},[a.createVNode("div",{class:y},[this.renderCell(s,p,l,t)])])})]),this.renderExpandRow(s,u)]})])}renderExpandRow(t,i){var l,c,u;if(!!t[vt.ROW_EXPAND]){const g=[...i,{row_expend:!0}];return a.createVNode("tr",{class:g},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(c=(l=this.context.slots).expandRow)==null?void 0:c.call(l,t))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])}}handleRowClick(t,i,s,l){this.context.emit("rowClick",t,i,s,l,this)}handleRowDblClick(t,i,s,l){this.context.emit("rowDblClick",t,i,s,l,this)}getExpandCell(t){return!!t[vt.ROW_EXPAND]?a.createVNode(ar,null,null):a.createVNode(ya,null,null)}handleRowExpandClick(t,i,s,l,c){this.emitEvent(On.ON_ROW_EXPAND_CLICK,[{row:t,column:i,index:s,rows:l,e:c}])}renderCell(t,i,s,l){if(i.type==="expand"){const u=()=>{var g,h,p;return typeof i.render=="function"?i.render(null,t,s,l):(p=(h=(g=this.context.slots).expandCell)==null?void 0:h.call(g,{row:t,column:i,index:s,rows:l}))!=null?p:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:g=>this.handleRowExpandClick(t,i,s,l,g)},[u()])}const c=Tl(t,Xt(i,"field",[i,t]),i);return typeof i.render=="function"?i.render(c,this.props.data[t[vt.ROW_INDEX]],t,i,s,l):c}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(i=>i.index===t&&i.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,i)=>{const s=Se({active:this.isColActive(i)}),l=`${nh(Na(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:s,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Gu=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:vl(e.activeColumn):Array.isArray(e.activeColumn)?vl(e.activeColumn[0]):vl(e.activeColumn):[];var fh=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const i=a.reactive(Gu(e)),s=()=>(e.columns||[]).map((l,c)=>({index:c,active:i.some(u=>u===c),_column:l}));return a.watchEffect(()=>{t=s();const l=Gu(e);t.forEach((c,u)=>{Object.assign(c,{active:l.some(g=>g===u)})})}),{activeColumns:t}},hh=(e,t=!0)=>{const i="HeadColumnResize";let s;(function(L){L.MOUSE_MOVE="onMousemove",L.MOUSE_OUT="onMouseout",L.MOUSE_DOWN="onMousedown"})(s||(s={}));let l=!1,c=!1,u=!1,g=0,h=null,p=0;const m=a.ref(-1e3),C=L=>{var K;c=!1,u=!1;const T=document.body.style;T.cursor="";const z=L.clientX-g;h.resizeWidth=((K=h.resizeWidth)!=null?K:h.calcWidth)+z,document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",b),g=0,m.value=-1e3,h=null,L.target.closest("table").querySelectorAll("th").forEach(R=>R.style.setProperty("user-select","inherit"))},b=L=>{document.body.style.setProperty("cursor",""),m.value=L.clientX-g+p},y={[s.MOUSE_DOWN]:(L,T)=>{if(!l)return;c=!0,document.body.style.setProperty("cursor","col-resize"),h=T,g=L.clientX;const A=L.target.closest("table");p=g-A.getBoundingClientRect().left,document.addEventListener("mouseup",C),document.addEventListener("mousemove",b)},[s.MOUSE_MOVE]:(L,T)=>{c&&!u&&(u=!0);const z=L.target.closest("th");if(u&&z.style.setProperty("user-select","none"),!u){if(!z)return;const A=z.getBoundingClientRect();A.width>12&&A.right-L.pageX<8?(l=!0,z.style.setProperty("cursor","col-resize")):l=!1}},[s.MOUSE_OUT]:(L,T)=>{const z=L.target;u||z.style.setProperty("cursor","")}},N=L=>`${i}_${L}`,k=()=>{e.forEach(L=>{L.resizable!==!1&&Object.keys(y).forEach(T=>{const z=N(T);L.listeners.has(z)||L.listeners.set(z,[]),L.listeners.get(z).push(y[T])})})},x=()=>{e.forEach(L=>{Object.keys(y).forEach(T=>{const z=N(T);if(L.listeners.has(z)){const A=L.listeners.get(z);A.splice(0,A.length)}})})};t&&k();const D=a.computed(()=>({position:"absolute",top:0,bottom:0,left:`${m.value}px`,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:x,dragOffsetX:m,dragOffsetXStyle:D}};const gh=(e,t,i,s)=>{const l=a.ref(200),c=a.ref(!1),u=a.computed(()=>e.pagination&&e.data.length),g=a.computed(()=>Se({[rt("table")]:!0,"has-footer":u.value,"has-scroll-y":c.value||e.virtualEnabled,"is-scroll-bottom":i.pos.bottom<2},ih(e.border))),h=Se({[rt("table-head")]:!0}),p=kl(e),m=a.computed(()=>({"--row-height":`${Xt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),C={[rt("table-body")]:!0},b=a.computed(()=>Se({[rt("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),y=a.computed(()=>({minHeight:Ru(e.minHeight,"auto")})),N=(T,z)=>{const A=String(T);if(/^\d+\.?\d*$/.test(A))return Number(A);if(/^\d+\.?\d*px$/ig.test(A))return Number(A.replace("px",""));if(/^\d+\.?\d*%$/ig.test(A)){const K=Number(A.replace("%",""));return z*K/100}return z},k=a.reactive({}),x=()=>{const T=N(e.height,l.value),z=e.showHead?N(e.headHeight,40)+2:0,A=N(e.maxHeight,l.value),K=N(e.minHeight,l.value),R=e.pagination&&e.data.length?40:0,F=T-z-R,O=e.height!=="auto"?`${F}px`:!1,V=A-z-R,U=K-z-R;Object.assign(k,{display:s!=null&&s.length?"block":!1,"max-height":`${V}px`,"min-height":`${U}px`,height:O})};a.onMounted(()=>{D(t==null?void 0:t.value)});const D=T=>{if(T){const{height:z}=T.parentElement.getBoundingClientRect();l.value=z,x()}};return{tableClass:g,headClass:h,contentClass:C,footerClass:b,wrapperStyle:y,contentStyle:k,headStyle:m,resetTableHeight:D,updateBorderClass:T=>{if(T){const z=T.querySelector(".bk-table-body table");z&&(c.value=z.offsetHeight>T.offsetHeight)}},hasFooter:u}},mh=e=>{var b;const t=a.reactive(((b=e.columns)!=null?b:[]).map(y=>ze(Z({},y),{calcWidth:null,resizeWidth:null,listeners:new Map}))),{dragOffsetXStyle:i}=hh(t,!0),{activeColumns:s}=fh(e),l=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:s,setting:{size:null,height:null}}),c=y=>{var N;return l.rowActions.has(y)?(N=l.rowActions.get(y))==null?void 0:N.isExpand:!1},u=(y,N=void 0)=>{var D;const k=y[vt.ROW_UID],x=typeof N=="boolean"?N:!c(k);l.rowActions.set(k,Object.assign({},(D=l.rowActions.get(k))!=null?D:{},{isExpand:x})),p()},g=a.reactive([]),h=(y=!1)=>{g.splice(0,g.length,...e.data.map((N,k)=>{const x=rh(N,e,k);return ze(Z({},N),{[vt.ROW_INDEX]:k,[vt.ROW_UID]:x,[vt.ROW_EXPAND]:y?c(x):!1})}))},p=()=>{g.forEach(y=>{Object.assign(y,{[vt.ROW_EXPAND]:c(y[vt.ROW_UID])})})},{renderFixedColumns:m,fixedWrapperClass:C}=xl(e,t);return{colgroups:t,dragOffsetXStyle:i,reactiveSchema:l,indexData:g,fixedWrapperClass:C,initIndexData:h,updateIndexData:p,renderFixedColumns:m,setRowExpand:u}};var ph=a.defineComponent({name:"Table",props:A1,emits:P1,setup(e,t){const{colgroups:i,dragOffsetXStyle:s,reactiveSchema:l,indexData:c,renderFixedColumns:u,setRowExpand:g,initIndexData:h,fixedWrapperClass:p}=mh(e);let m=null,C=null,b=null;const y=a.ref(),N=a.ref(),{pageData:k,localPagination:x,resolvePageData:D,watchEffectFn:L}=Q1(e,c),{tableClass:T,headClass:z,contentClass:A,footerClass:K,wrapperStyle:R,contentStyle:F,headStyle:O,updateBorderClass:V,resetTableHeight:U,hasFooter:ue}=gh(e,y,l,k),ee=new dh(e,t,l,i);a.watch(()=>[e.data,e.pagination],()=>{h(e.reserveExpand),L(C,m),a.nextTick(()=>{U(y.value),V(y.value)})},{immediate:!0,deep:!0}),ee.on(On.ON_SORT_BY_CLICK,Q=>{const{sortFn:j,column:E,index:G,type:q}=Q;typeof j=="function"&&(m=j,k.sort(m)),t.emit(Wi.COLUMN_SORT,{column:E,index:G,type:q})}).on(On.ON_FILTER_CLICK,Q=>{const{filterFn:j,checked:E,column:G,index:q}=Q;typeof j=="function"&&(C=j,D(C,m)),t.emit(Wi.COLUMN_FILTER,{checked:E,column:G,index:q})}).on(On.ON_SETTING_CHANGE,Q=>{var q,ae;const{checked:j=[],size:E,height:G}=Q;j.length&&Wu(y.value,i,20),(ae=(q=N.value)==null?void 0:q.reset)==null||ae.call(q),t.emit(Wi.SETTING_CHANGE,{checked:j,size:E,height:G})}).on(On.ON_ROW_EXPAND_CLICK,Q=>{const{row:j,column:E,index:G,rows:q,e:ae}=Q;t.emit(Wi.ROW_EXPAND_CLICK,{row:j,column:E,index:G,rows:q,e:ae}),g(j,!j[vt.ROW_EXPAND])});const ge=Q=>{var Y;const j=(Y=l.pos.bottom)!=null?Y:0,E=Q[1],{translateX:G,translateY:q,pos:ae={}}=E;l.scrollTranslateY=q,l.scrollTranslateX=G,l.pos=ae;const{bottom:be}=ae;be<=2&&j>be&&ff(60,()=>{t.emit(Wi.SCROLL_BOTTOM,ze(Z({},ae),{translateX:G,translateY:q}))},!0)()};a.onMounted(()=>{b=ah(y.value,()=>{Wu(y.value,i,20),e.height==="100%"&&U(y.value)},60,!0),b.start()}),a.onBeforeUnmount(()=>{b.stop(),b=null,ee.destroy()}),t.expose({setRowExpand:g});const Me=ze(Z({},A),{"__is-empty":!k.length}),he={[rt("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},ce={[rt("drag-column")]:!0,"offset-x":!0},ie={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:se}=O1(e,t);return()=>a.createVNode("div",{class:T.value,style:R.value,ref:y},[a.createVNode("div",{class:z,style:O.value},[ee.renderTableHeadSchema()]),a.createVNode(yr,{ref:N,lineHeight:ee.getRowHeight,class:Me,style:F,list:k,contentClassName:he,onContentScroll:ge,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled},{default:Q=>ee.renderTableBodySchema(Q.data||e.data)}),a.createVNode("div",{class:p},[u(),a.createVNode("div",{class:ce,style:s.value},null),a.createVNode("div",{class:ie},[se()])]),a.createVNode("div",{class:K.value},[ue.value&&ee.renderTableFooter(x.value)])])}});const Yu=Re(ph),Gi=12;function Mh(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const c=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)c.push(l.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...c),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function Ch(e){const{useGroup:t,saveKey:i,displayKey:s,list:l}=a.toRefs(e),c=a.reactive([]);return a.watch([t,i,s,l],()=>{let u=l.value;t.value&&(u=l.value.reduce((g,h)=>{let p=[];return h.children&&(p=h.children.map(m=>Z({group:{groupId:h[i.value],groupName:h[s.value]}},m))),g.concat(p)},[])),c.splice(0,c.length,...u)},{immediate:!0,deep:!0}),c}const Bu=e=>{const t=e.length;let i=0;for(let s=0;s<t;s++)(e.charCodeAt(s)&65280)!==0&&(i+=1),i+=1;return i};var Hu=a.defineComponent({name:"ListTagRender",props:{node:d.object,searchKey:d.oneOfType([d.string,d.arrayOf(d.string)]),displayKey:d.string,searchKeyword:d.string,tpl:{type:Function,default:null}},render(){const e=i=>{if(this.searchKeyword){const s=new RegExp(`(${this.searchKeyword})`,"i");return i.replace(s,'<strong class="highlight-text">$1</strong>')}return i};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 yh=()=>({modelValue:d.arrayOf(d.string).def([]),placeholder:d.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:d.arrayOf(d.object).def([]),disabled:d.bool.def(!1),tooltipKey:d.string.def(""),saveKey:d.string.def("id"),displayKey:d.string.def("name"),hasDeleteIcon:d.bool.def(!1),clearable:d.bool.def(!0),trigger:d.commonType(["focus","search"]).def("search"),searchKey:d.oneOfType([d.string,d.arrayOf(d.string)]).def("name"),useGroup:d.bool.def(!1),allowCreate:d.bool.def(!1),maxData:d.number.def(-1),maxResult:d.number.def(10),contentMaxHeight:d.number.def(300),contentWidth:d.number.def(190),separator:d.string.def(""),allowNextFocus:d.bool.def(!0),allowAutoMatch:d.bool.def(!1),showClearOnlyHover:d.bool.def(!1),leftSpace:d.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}});var Ih=a.defineComponent({name:"TagRender",props:{node:d.object,displayKey:d.string,tpl:{type:Function,default:null}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),bh=a.defineComponent({name:"TagInput",directives:{bkTooltips:ml},props:yh(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const i=Un(),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:c}=a.toRefs(e),{pageState:u,initPage:g,pageChange:h}=Mh(c),p=a.ref(""),m=a.ref(null),C=a.ref(null),b=a.ref(null),y=a.ref(null),N=a.ref(null),k=a.ref(null),x=a.ref(null),D=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),T=a.computed(()=>V.selectedTagList.length===0&&p.value===""&&!s.isEdit),z=a.computed(()=>e.clearable&&!e.disabled&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),A=a.computed(()=>({"bk-tag-input-trigger":!0,active:s.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{ge()}),a.watch(p,_n.exports.debounce(()=>{const $=u.curPageList.length!==0,{value:te}=p;te!==""&&$||te===""&&e.trigger==="focus"&&$?l.isShow=!0:(e.trigger!=="focus"||!$)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,$=>{K(),$&&N.value&&(a.nextTick(()=>{N.value.scrollTop=0}),N.value.removeEventListener("scroll",R),N.value.addEventListener("scroll",R))});const K=()=>{var te,oe;const $=L.value?0:(te=y.value)==null?void 0:te.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[$,4]}}],(oe=k.value)==null||oe.update()},R=()=>{if(u.isPageLoading||N.value.scrollTop===0)return;const{scrollTop:$,offsetHeight:te,scrollHeight:oe}=N.value;if($+te>=oe){const Ne=u.curPage+1;Ne<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{h(Ne)},500))}},F=()=>{var te;return Array.from(((te=b.value)==null?void 0:te.childNodes)||[]).filter(oe=>oe.nodeType!==Node.TEXT_NODE)},O=$=>{if(!e.disabled){if($!=null&&$.target){const{className:te}=$.target;(te.indexOf("bk-tag-input-trigger")>-1||te.indexOf("tag-list")>-1)&&b.value.appendChild(y.value)}clearTimeout(x.value),L.value&&U.value.length&&(V.tagListCache=[...U.value],V.selectedTagListCache=[...V.selectedTagList],p.value=V.selectedTagListCache[0][e.saveKey],bt(V.selectedTagList[0],0),j()),s.isEdit=!0,a.nextTick(()=>{var te;(te=m.value)==null||te.focus(),e.trigger==="focus"&&V.localList.length!==0&&(Me(),l.isShow?K():l.isShow=!0)})}},V=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),U=a.computed(()=>V.selectedTagList.map($=>$[e.saveKey])),ue=Ch(e),ee=a.computed(()=>{if(e.useGroup){const $={};return u.curPageList.forEach((te,oe)=>{te.__index__=oe,$[te.group.groupId]||($[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),$[te.group.groupId].children.push(te)}),Object.keys($).map(te=>$[te])}return u.curPageList}),ge=()=>{const{saveKey:$,modelValue:te,displayKey:oe,allowCreate:Ne,trigger:we}=e;V.selectedTagList=[],V.localList=[...ue],te.length&&(te.forEach(xe=>{const We=V.localList.find(it=>xe===it[$]);We!==void 0?V.selectedTagList.push(We):Ne&&!U.value.includes(xe)&&V.selectedTagList.push({[$]:xe,[oe]:xe})}),L.value||(V.localList=V.localList.filter(xe=>!te.includes(xe[$])))),we==="focus"&&Me()},Me=($="")=>{const{searchKey:te,filterCallback:oe}=e,Ne=$.toLowerCase();let we=[];if(typeof oe=="function")we=oe(Ne,te,V.localList)||[];else if(Array.isArray(te)){const xe=te.map(We=>V.localList.filter(it=>it[We].toLowerCase().indexOf(Ne)!==-1));we=Array.from(new Set(xe.flat()))}else we=V.localList.filter(xe=>xe[te].toLowerCase().indexOf(Ne)!==-1);g(we)},he=($,te)=>{const oe={"bk-selector-actived":!1,"bk-selector-selected":U.value.includes($[e.saveKey])};return e.useGroup?oe["bk-selector-actived"]=$.__index__===s.focusItemIndex:oe["bk-selector-actived"]=te===s.focusItemIndex,oe};a.onMounted(()=>{ge()});const ce=()=>{V.tagListCache=[],V.selectedTagListCache=[],V.selectedTagList=[]},ie=()=>{p.value=""},se=()=>{if(L.value)return 0;const te=F().findIndex(({id:oe})=>oe==="tagInputItem");return te>=0?te:0},Q=($,te,oe=!1)=>{if(!te||!$)return;let Ne=te;oe&&(Ne=te.nextElementSibling||null),te.parentNode.insertBefore($,Ne)},j=$=>{const{maxData:te,trigger:oe,allowCreate:Ne}=e;if(te===-1||te>U.value.length){const{value:we}=$!=null&&$.target?$.target:p,xe=Bu(we);xe?(Me(we),m.value.style.width=`${xe*Gi}px`):oe==="focus"&&Me()}else G(),p.value="",l.isShow=!1;s.isEdit=!0,s.focusItemIndex=Ne?-1:0},E=()=>{var $;l.width=L.value?($=C.value)==null?void 0:$.clientWidth:e.contentWidth},G=()=>{x.value=setTimeout(()=>{var te;const $=p.value;if(ie(),s.isEdit=!1,L.value){const[oe]=V.tagListCache;$&&$===oe&&V.selectedTagListCache.length?et(V.selectedTagListCache[0],"select"):be("remove")}else if(e.allowAutoMatch&&$){const oe=u.curPageList.find(Ne=>Array.isArray(e.searchKey)?e.searchKey.map(xe=>Ne[xe]).includes($):Ne[e.searchKey]===$);oe?q(oe,"select"):e.allowCreate&&q($,"custom")}l.isShow=!1,t("blur",$,U.value),(te=i==null?void 0:i.validate)==null||te.call(i,"blur")},50)},q=($,te,oe)=>{oe==null||oe.stopPropagation(),!(!$||$.disabled)&&(L.value&&ce(),et($,te),be("select"),ie(),l.isShow=!1)},ae=($,te,oe)=>{oe==null||oe.stopPropagation(),bt($,te),ie(),be("remove",$),m.value.style.width=`${Gi}px`},be=($,te)=>{var oe;t("change",U.value),t($,te),t("update:modelValue",U.value),(oe=i==null?void 0:i.validate)==null||oe.call(i,"change")},Y=$=>{$.stopPropagation();const te=V.selectedTagList;V.selectedTagList=[];const oe=ue.filter(Ne=>te.some(we=>we[e.saveKey]===Ne[e.saveKey]));(e.allowCreate&&oe.length!==0||!e.allowCreate)&&!L.value&&V.localList.push(...oe),be("removeAll")},re=()=>{const $={height:N.value.clientHeight,yAxis:N.value.getBoundingClientRect().y};a.nextTick(()=>{const te=N.value.querySelector(".bk-selector-actived");if(!te)return;const oe={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};oe.yAxis<$.yAxis&&(N.value.scrollTop=N.value.scrollTop-($.yAxis-oe.yAxis));const Ne=oe.yAxis+oe.height-$.yAxis;Ne>$.height&&(N.value.scrollTop=N.value.scrollTop+Ne-$.height)})},ve=($,te)=>{const oe=F();Q(y.value,oe[$-1]),V.selectedTagList.splice($-1,1),O();const Ne=ue.some(we=>we===te[e.saveKey]);(e.allowCreate&&Ne||!e.allowCreate)&&!L.value&&V.localList.push(te),m.value=`${Gi}px`,be("remove")},ot=$=>{if(u.isPageLoading)return;let te;const oe=$.target.value,Ne=Bu(oe),we=se(),xe=F();switch($.code){case"ArrowUp":if($.preventDefault(),!l.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=u.curPageList.length-1),re();break;case"ArrowDown":if($.preventDefault(),!l.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>u.curPageList.length-1?u.curPageList.length:s.focusItemIndex,s.focusItemIndex===u.curPageList.length&&(s.focusItemIndex=0),re();break;case"ArrowLeft":if(s.isEdit=!0,!Ne){if(we<1)return;Q(y.value,xe[we-1]),O()}break;case"ArrowRight":if(s.isEdit=!0,!Ne){if(we===xe.length-1)return;Q(xe[we+1],y.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&s.focusItemIndex>=0&&l.isShow?q(u.curPageList[s.focusItemIndex],"select",$):e.allowCreate&&q(p.value,"custom",$),$.preventDefault();break;case"Backspace":we!==0&&!p.value&&(te=V.selectedTagList[we-1],ve(we,te));break}},Fe=$=>{const te=[];return $.split(";").forEach(Ne=>{if(Ne.match(/^[a-zA-Z][a-zA-Z_]+/g)){const we=Ne.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");te.push({[e.saveKey]:we,[e.displayKey]:we})}}),te},Tt=$=>{if($.preventDefault(),L.value)return!1;const{maxData:te,saveKey:oe,pasteFn:Ne}=e,we=$.clipboardData.getData("text");let We=(Ne?Ne(we):Fe(we)).map(it=>it[oe]);if(We.length){const it=F(),xt=se(),Xe=V.localList.map(Ue=>Ue[oe]);if(We=We.filter(Ue=>(Ue==null?void 0:Ue.trim())&&!U.value.includes(Ue)&&Xe.includes(Ue)),te!==-1){const Ue=V.selectedTagList.length;if(Ue<te){const Ze=te-Ue;We.length>Ze&&(We=[...We.slice(0,Ze)])}else We=[]}const fn=V.localList.filter(Ue=>We.includes(Ue[oe]));We.length&&(V.selectedTagList.splice(xt,0,...fn),Q(y.value,it[xt]),m.value.style.width=`${Gi}px`,V.localList=V.localList.filter(Ue=>!We.includes(Ue[oe])),be("select"),O())}},pt=$=>{e.disabled||(Q(y.value,$.currentTarget,!0),m.value.style.width=`${Gi}px`,l.isShow&&K())},et=($,te)=>{if(V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:oe,saveKey:Ne,displayKey:we,createTagValidator:xe}=e,We=se();let it=1,xt=!1,Xe;const fn=Ze=>typeof xe=="function"?xe(Ze):!0,Ue=Ze=>V.localList.find(Qt=>Qt[Ne]===Ze);if(te==="custom")if(oe){let Ze=$.split(oe);Ze=Ze.filter(Mt=>(Mt==null?void 0:Mt.trim())&&!U.value.includes(Mt)&&fn(Mt));const Qt=Ze.map(Mt=>Ue(Mt)||{[Ne]:Mt,[we]:Mt});Ze.length&&(V.selectedTagList.splice(We,0,...Qt),it=Qt.length,xt=!0)}else{const Ze=typeof $=="object";if(Xe=Ze?$[Ne]:$.trim(),Xe=Xe.replace(/\s+/g,""),Xe!==void 0&&!U.value.includes(Xe)&&fn(Xe)){const Qt=Ue(Xe)||(Ze?$:{[Ne]:Xe,[we]:Xe});V.selectedTagList.splice(We,0,Qt),xt=!0}}else $&&(Xe=$[Ne],Xe!==void 0&&!U.value.includes(Xe)&&(V.selectedTagList.splice(We,0,$),xt=!0));xt&&a.nextTick(()=>{for(let Ze=1;Ze<=it;Ze++){const Mt=F()[We+Ze];Q(Mt,y.value)}m.value.style.width=`${Gi}px`,L.value||(e.allowNextFocus&&O(),V.localList=V.localList.filter(Ze=>!U.value.includes(Ze[Ne])))})},bt=($,te)=>{V.selectedTagList.splice(te,1);const oe=ue.some(Ne=>Ne===$[e.saveKey]);(e.allowCreate&&oe||!e.allowCreate)&&!L.value&&V.localList.push($)};return ze(Z(Z(Z({popoverProps:l},a.toRefs(s)),a.toRefs(V)),a.toRefs(u)),{isShowPlaceholder:T,isShowClear:z,curInputValue:p,formatList:ue,renderList:ee,showTagClose:D,tagInputRef:m,bkTagSelectorRef:C,tagListRef:b,tagInputItemRef:y,selectorListRef:N,popoverRef:k,triggerClass:A,focusInputTrigger:O,activeClass:he,handleInput:j,handleFocus:E,handleBlur:G,handleTagSelected:q,handleTagRemove:ae,handleClear:Y,tagFocus:pt,handleKeydown:ot,handlePaste:Tt})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.children.map((i,s)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:i.disabled},this.activeClass(i,s)],onClick:this.handleTagSelected.bind(this,i,"select")},[a.createVNode(Hu,{node:i,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,i)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(Hu,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(vn,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,i,s;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,c)=>{const u={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(Ih,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(wn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,c)},null):null]),[[a.resolveDirective("bk-tooltips"),u]])}),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":l=>this.curInputValue=l,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(s=(i=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:i.call(t))!=null?s:this.isShowClear&&a.createVNode(Qn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode($n,{theme:"primary",size:Ln.Small},null)]):null])])})])}});const Fu=Re(bh),Nh={direction:d.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:d.commonType(["left","center","right"],"align").def("center"),color:d.string.def("#dde4eb"),width:d.number.def(1),type:d.commonType(["dashed","solid"],"lineType").def("dashed")};var wh=a.defineComponent({name:"Divider",props:Nh,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 Uu=Re(wh),Lh={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},vh={active:d.oneOfType([d.number,d.string]).def(""),type:d.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:d.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:d.number.def(50),scrollStep:d.number.def(200),extCls:d.string.def(""),validateActive:d.bool.def(!0),showHeader:d.bool.def(!0),changeOnHover:d.bool.def(!1),changeOnHoverDelay:d.number.def(1e3)},kh=Z({active:d.oneOfType([d.number,d.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:d.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:d.number.def(50),scrollStep:d.number.def(200),validateActive:d.bool.def(!0),changeOnHover:d.bool.def(!1),changeOnHoverDelay:d.number.def(1e3)},Lh),Th={name:d.oneOfType([d.number,d.string]).def(""),label:d.string||d.func,closable:d.bool,visible:d.bool.def(!0),disabled:d.bool,sortable:d.bool,renderDirective:d.commonType(["if","show"],"render").def("show"),panel:d.string||d.func};var _u=a.defineComponent({name:"TabNav",props:kh,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const g=[];let h=!1;return e.panels.filter((p,m)=>{if(!p.props)return null;const{name:C,label:b,closable:y,visible:N,disabled:k,sortable:x}=p.props;if(!N)return!1;e.active===C&&(h=!0);const D=L=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(L)?`\u9009\u9879\u5361${m+1}`:typeof L=="string"?L:typeof L=="function"?a.h(L):L;return g.push({name:C,closable:y,visible:N,disabled:k,sortable:x,tabLabel:D(b)}),!0}),!h&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),g}),i=a.ref(-1),s=a.ref(-1),l=a.ref(""),c=(g,h)=>g===h;return ze(Z({},{handleTabAdd(g){e.tabAdd(g)},dragstart(g,h){s.value=g,l.value=e.guid,Object.assign(h.dataTransfer,{effectAllowed:"move"}),e.tabDrag(g,h)},dragenter(g){c(l.value,e.guid)&&(i.value=g)},dragend(){i.value=-1,s.value=-1,l.value=null},drop(g,h){if(!c(l.value,e.guid))return!1;e.tabSort(s.value,g,h)},handleTabChange(g){e.tabChange(g)},handleTabRemove(g,h){e.tabRemove(g,h)}}),{navs:t,dragenterIndex:i,dragStartIndex:s,draggingEle:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:i,sortable:s,sortType:l,labelHeight:c,dragstart:u,dragenter:g,dragend:h,drop:p}=this,m=()=>this.navs.map((b,y)=>{if(!b)return null;const{name:N,disabled:k,tabLabel:x}=b,D=()=>{const T=["bk-tab-header-item"];return k&&T.push("bk-tab-header--disabled"),e===N&&T.push("bk-tab-header--active"),T.join(" ")},L=(T,z)=>T||z;return a.createVNode("div",{key:N,onClick:()=>this.handleTabChange(N),draggable:L(b.sortable,s),onDragstart:T=>u(y,T),onDragenter:T=>{T.preventDefault(),g(y)},onDragleave:T=>{T.preventDefault()},onDragover:T=>{T.preventDefault()},onDragend:T=>{T.preventDefault(),h()},onDrop:T=>{T.preventDefault(),p(y,l)},class:D()},[a.createVNode("div",null,[x]),L(b.closable,t)&&a.createVNode(Qn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,b)},null)])}),C=()=>{var y,N,k,x;const b=[];return typeof this.$slots.add=="function"?b.push((N=(y=this.$slots).add)==null?void 0:N.call(y,a.h)):i&&b.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Hs,{width:26,height:26},null)])),typeof this.$slots.setting=="function"&&b.push((x=(k=this.$slots).setting)==null?void 0:x.call(k,a.h)),b.length?a.createVNode("div",{class:"bk-tab-header-operation"},[b.map((D,L)=>a.createVNode("div",{class:"bk-tab-header-item",key:L},[D]))]):null};return a.createVNode("div",{style:{lineHeight:`${c}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),C()])}}),xh=a.defineComponent({name:"Tab",components:{TabNav:_u},props:vh,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:i}){const s=a.ref(!1),l=a.ref([]),c=a.getCurrentInstance(),u=(p,m=[])=>{const{children:C}=p;return(C||[]).forEach(b=>{let{type:y}=b;y=y.name||y,y==="TabPanel"&&b.component?m.push(b.component):(y===a.Fragment||y==="template")&&u(b,m)}),m},g=()=>{if(t.default){const{children:p}=c.subTree.children[1];if(!p)return;const m=p[0],C=u(m);C.length!==l.value.length&&(l.value=C)}};return a.onMounted(()=>{g(),s.value=!0}),a.onUpdated(()=>{g()}),ze(Z({},{tabAdd(p){i("add",{e:p}),i("add-panel",{e:p})},tabChange(p){i("change",p),i("tab-change",p),i("update:active",p)},tabRemove(p,m){i("remove",p,m),i("remove-panel",p,m)},tabSort(p,m,C){const b=l.value;if(C==="insert")if(p<m)b.splice(m+1,0,l[p]),b.splice(p,1);else if(p>m)b.splice(m,0,l[p]),b.splice(p+1,1);else return!1;else{const y=b[m];b[m]=b[p],b[p]=y}l.value=[...b],i("sort",p,m,C),i("sort-change",p,m,C)},tabDrag(p,m){i("drag",p,m),i("on-drag-tab",p,m)}}),{isMounted:s,panels:l})},render(){var i,s;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:l,active:c,type:u,closable:g,addable:h,sortable:p,sortType:m,labelHeight:C,scrollStep:b,validateActive:y,changeOnHover:N,changeOnHoverDelay:k,tabPosition:x,tabAdd:D,tabChange:L,tabRemove:T,tabSort:z,tabDrag:A}=this,K={panels:l,active:c,type:u,closable:g,addable:h,sortable:p,sortType:m,labelHeight:C,scrollStep:b,validateActive:y,changeOnHover:N,changeOnHoverDelay:k,tabPosition:x,tabAdd:D,tabChange:L,tabRemove:T,tabSort:z,tabDrag:A};return!l||!Array.isArray(l)?null:a.createVNode(_u,K,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)])])}}),Sh=a.defineComponent({name:"TabPanel",props:Th,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:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const $u=Rt(xh,{TabPanel:Sh}),qn={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let Xu=1;const Ku=(e,t)=>{let i=t;const s=i.position||"top-right";typeof t=="string"&&(i={message:t});const l=t.onClose,c=i.offsetX||10;let u=i.offsetY||30;const{spacing:g=10}=i;qn[s].forEach(C=>{u+=(C.el.offsetHeight||0)+g}),Xu+=1;const h=`message_${Xu}`;i=ze(Z({},i),{offsetX:c,offsetY:u,id:h});const p=document.createElement("div"),m=a.createVNode(e,i);m.props.onDestory=C=>{Dh(C,s,g,l),a.render(null,p)},a.render(m,p),qn[s].push(m),document.body.appendChild(p.firstElementChild)};function Dh(e,t,i,s){s==null||s();const l=t.startsWith("top")?"top":"bottom";let c=-1;qn[t].forEach((p,m)=>{p.props.id===e&&(c=m)});const g=qn[t][c].el.offsetHeight,h=qn[t].length;for(let p=c;p<h;p++){const m=parseInt(qn[t][p].el.style[l],10)-g-i;qn[t][p].component.props.offsetY=m}qn[t].splice(c,1)}const jh={id:d.string.def(""),message:d.string.def(""),theme:d.theme(["primary","warning","success","error"]).def("primary"),delay:d.number.def(3e3),dismissable:d.bool.def(!0),offsetY:d.number.def(30),spacing:d.number.def(10),extCls:d.string.def(""),onClose:d.func};var zh=a.defineComponent({name:"Message",props:jh,emits:["destory"],setup(e,{emit:t}){const i=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),s=yn.getMessageNextIndex(),l=a.computed(()=>({top:`${e.offsetY}px`,zIndex:s})),c=a.ref(!1);let u=null;const g=()=>{u=setTimeout(()=>{c.value=!1},e.delay)},h=()=>{c.value=!1};return a.onMounted(()=>{e.delay&&g(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(u)}),a.watch(c,()=>{c.value||t("destory",e.id)}),{classNames:i,styles:l,visible:c,close:h}},render(){const e=()=>({primary:a.createVNode(lr,null,null),warning:a.createVNode(cr,null,null),success:a.createVNode(or,null,null),error:a.createVNode(Qn,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(wn,{class:"bk-message-icon bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const qu=e=>{Ku(zh,e)},Jh={id:d.string.def(""),title:d.string.def(""),message:d.string.def(""),theme:d.theme(["primary","warning","success","error"]).def("primary"),position:d.position().def("top-right"),delay:d.number.def(5e3),dismissable:d.bool.def(!0),offsetX:d.number.def(100),offsetY:d.number.def(30),spacing:d.number.def(10),extCls:d.string.def(""),onClose:d.func};var Ph=a.defineComponent({name:"Notify",props:Jh,emits:["destory"],setup(e,{emit:t}){const i=yn.getMessageNextIndex(),s=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),c=a.computed(()=>({[s.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:i})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,s.value]),g=a.ref(!1);let h=null;const p=()=>{h=setTimeout(()=>{g.value=!1},e.delay)},m=()=>{g.value=!1};return a.onMounted(()=>{e.delay&&p(),g.value=!0}),a.onUnmounted(()=>{clearTimeout(h)}),a.watch(g,()=>{g.value||t("destory",e.id)}),{classNames:u,styles:c,visible:g,handleClose:m}},render(){const e=()=>({primary:a.createVNode(lr,null,null),warning:a.createVNode(cr,null,null),success:a.createVNode(or,null,null),error:a.createVNode(Qn,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("h3",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(wn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const ed=e=>{Ku(Ph,e)},td=Symbol("MENU_PROVIDER_KEY"),Sl=Symbol("MENU_PROVIDER_KEY_PATH"),Qh=e=>{a.provide(td,e)},Oh=e=>{const{parentKeys:t,parentInfo:i}=Dl(),s=a.computed(()=>[...t.value,e]);a.provide(Sl,{parentInfo:{key:e,parentKey:i==null?void 0:i.key},parentKeys:s})},nd=()=>a.inject(td),Dl=()=>{var i;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(i=e.vnode.appContext)==null?void 0:i.provides;return t&&Sl in t?a.inject(Sl):{parentInfo:void 0,parentKeys:a.ref([])}},jl=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function id(e,t){if(!e||!t)return;const i=jl(t);let s=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...i);return}i.forEach(c=>{s=s.replace(` ${c} `," ")});const l=jl(s).join(" ");e.setAttribute("class",l)}function ad(e,t){if(!e)return;let i=e.getAttribute("class")||"";const s=jl(i),l=(t||"").split(" ").filter(c=>!s.includes(c)&&!!c.trim());e.classList?e.classList.add(...l):(i+=` ${l.join(" ")}`,e.setAttribute("class",i))}const Ah=()=>({css:!0,onBeforeEnter:e=>{ad(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,id(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&&(ad(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{id(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Eh={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Vh=a.defineComponent({name:"Menu",props:Eh,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:i,expose:s}){const l=a.ref(""),c=a.ref([]),u=a.ref({}),g=a.computed(()=>e.mode),h=a.ref(e.collapse),p=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{h.value=e.collapse,console.info(e.collapse);const N=[...p.value],k=[...c.value];c.value=h.value?[]:N,p.value=h.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(N=c.value)=>{c.value=N},{immediate:!0});const m=(N,k)=>{u.value=ze(Z({},u.value),{[N]:k})},C=N=>{delete u.value[N],u.value=Z({},u.value)},b=(N,k)=>{k?e.uniqueOpen?c.value=[N]:c.value.push(N):c.value=c.value.filter(x=>x!==N),i("openChange",k,u.value[N]),i("update:openKeys",[...c.value])},y=N=>{l.value=N,i("click",u.value[N]),i("update:activeKey",N,u.value[N])};return Qh({activeKey:l,menuStore:u,registerMenuInfo:m,unregisterMenuInfo:C,mode:g.value,openedKeys:c,collapse:h,handleOpenChange:b,handleActiveChange:y}),s({activeKey:l,openedKeys:c,menuStore:u}),()=>{var N;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":h.value}},[(N=t.default)==null?void 0:N.call(t)])}}}),Rh=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var i;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(i=t.default)==null?void 0:i.call(t)])])}}}),Wh=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:i}){var y,N;const{registerMenuInfo:s,unregisterMenuInfo:l,activeKey:c,handleActiveChange:u}=nd(),g=a.getCurrentInstance(),{parentInfo:h}=Dl(),p=((N=(y=g.vnode.key)==null?void 0:y.toString)==null?void 0:N.call(y))||String(g.uid),m=a.computed(()=>c.value===p),C=a.computed(()=>e.needIcon);s(p,{key:p,parentKey:h==null?void 0:h.key});const b=k=>{u(p),i("click",k)};return a.onBeforeUnmount(()=>l(p)),()=>{var k,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:b},[C.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"},[(x=t.default)==null?void 0:x.call(t)])])}}});const Zh={title:{type:String,default:"title"}};var Gh=a.defineComponent({name:"Submenu",props:Zh,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:i}){var D,L;const{registerMenuInfo:s,unregisterMenuInfo:l,openedKeys:c,handleOpenChange:u,collapse:g,activeKey:h,menuStore:p}=nd(),{parentInfo:m}=Dl(),C=a.getCurrentInstance(),b=((L=(D=C.vnode.key)==null?void 0:D.toString)==null?void 0:L.call(D))||String(C.uid),y=a.ref(Ah()),N=a.computed(()=>c.value.includes(b)),k=a.computed(()=>{var z,A;const T=(A=(z=p.value)==null?void 0:z[h.value])==null?void 0:A.parentKey;return g.value&&T===b&&N});Oh(b),s(b,{key:b,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(b));const x=()=>{u(b,!N.value),i("collapse",!N.value,C)};return()=>{var T;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":N.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((T=t.icon)==null?void 0:T.call(t))||a.createVNode(Xs,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(qa,{class:{"submenu-header-collapse":!0,"is-collapse":c.value.includes(b)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var z;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(z=t.default)==null?void 0:z.call(t)]),[[a.vShow,N.value]])]}})])}}});const rd=Rt(Vh,{Item:Wh,Submenu:Gh,Group:Rh}),Yh={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var sd=a.defineComponent({props:Yh,slots:["side-icon"],setup(e,{slots:t}){return()=>{var i,s;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((i=t.default)==null?void 0:i.call(t))||[a.createVNode("span",{class:"title-icon"},[((s=t["side-icon"])==null?void 0:s.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Bh={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},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 Hh=a.defineComponent({name:"Navigation",props:Bh,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const i=a.ref(e.headerTitle),s=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(s.click=!s.click,s.hover=s.click,t("toggle",s.hover)),a.onBeforeUnmount(()=>{s.timer&&window.clearTimeout(s.timer)});const l=()=>{s.click||(s.enterTimer=setTimeout(()=>{s.hover=!0,s.enterTimer&&window.clearTimeout(s.enterTimer),s.timer&&window.clearTimeout(s.timer),t("hover",s.hover),t("toggle",s.hover)},e.hoverEnterDelay))},c=()=>{s.click||(s.enterTimer&&window.clearTimeout(s.enterTimer),s.timer=setTimeout(()=>{s.hover=!1,window.clearTimeout(s.timer),t("leave",s.hover),t("toggle",s.hover)},e.hoverLeaveDelay))},u=()=>{s.click=!s.click,s.hover=s.click,t("toggle",s.hover),t("toggle-click",s.hover)};return{defaultHeaderTitle:i,nav:s,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:l,handleMouseLeave:c,handleClick:u}},render(){var e,t,i,s,l,c,u,g,h,p,m,C;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(sd,{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"&&a.createVNode(sd,{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)`}},[(s=(i=this.$slots).menu)==null?void 0:s.call(i)]),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(Es,{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`}},[((c=(l=this.$slots).header)==null?void 0:c.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(g=(u=this.$slots)["header-set"])==null?void 0:g.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(p=(h=this.$slots).default)==null?void 0:p.call(h),a.createVNode("div",{class:"container-footer"},[(C=(m=this.$slots).footer)==null?void 0:C.call(m)])])])])])}});const ld=Re(Hh),Fh={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 Uh=a.defineComponent({props:Fh,emits:["changeVisible"],setup(e,{emit:t}){let i=Object.create(null);const s=a.ref(null);a.onMounted(()=>{c()}),a.onBeforeUnmount(()=>{l()});const l=()=>{if(i&&Object.keys(i).length!==0){const h=i;h.isShow&&h.hide(),h.destroy(),i=null,t("changeVisible",!1)}},c=()=>{i&&Object.keys(i).length!==0?a.nextTick(()=>{i.update()}):a.nextTick(()=>{i=new Ss(e.triggerRef,s.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const h={};return e.appendToBody&&(h["z-index"]=1060+yn.getModalNextIndex()),h}),g=a.reactive({styles:u});return ze(Z({},a.toRefs(g)),{refContentRef:s,updateDropdown:c,destoryDropdown:l})},render(){var e,t,i;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(i=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?i:""])}});const _h={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var $h=a.defineComponent({props:_h,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const i=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),s=()=>{t("pick-clear")},l=()=>{t("pick-success")},c=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:i,handleClear:s,handleSuccess:l,handleToggleTime:c,handleTab:h=>{const m=[...u.value.children][h.shiftKey?"shift":"pop"]();document.activeElement===m&&(h.preventDefault(),h.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[this.labels.time]):"",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])])}}),od=1e3*60*60*24;function cd(e,t){return new Date(e,t+1,0).getDate()}function ud(e,t,i){return t===0&&i>50?e-1:t===11&&i<10?e+1:e}function dd(e,t,i,s){t>11&&(t=0,e++);var l=new Date(e,t,i);s&&l.setDate(l.getDate()+4-(l.getDay()||7));var c=s?l.getFullYear():e,u=new Date(c,0,1),g=1+Math.round((l-u)/od);s||(g+=u.getDay());var h=Math.ceil(g/7);if(!s){var p=new Date(e,t,i),m=new Date(e+1,0,1),C=m.getDay();p.getTime()>=m.getTime()-od*C&&(h=1)}return h}function Xh(e,t,i){for(var s=this.lang||"en",l=this.onlyDays,c=typeof this.weekStart=="undefined"?1:this.weekStart,u=c===1,g=[],h=new Date(e,t,1),p=h.getDay()||(u?7:0),m=c-p,C=dd(e,t,1,u),b=cd(e,t),y=cd(e,t-1),N,k,x,D=ud(e,t,C),L={month:t,year:e,daysInMonth:b},T=0;T<7;T++){x=m;for(var z=0;z<8;z++){T>0&&z>0&&m++,m>b||m<1?(k=m>b?m-b:y+m,N=m>b?t+1:t-1):(k=m,N=t);var A=function(){return z===0?"weekLabel":T===0?"dayLabel":m<1?"prevMonth":m>b?"nextMonth":"monthDay"}(),K=x!==m&&T>0,R={desc:K?k:C,week:C,type:A,format:u?"ISO 8601":"US",date:K?new Date(Date.UTC(e,N,k)):!1,year:D,index:g.length};i&&(typeof i=="function"?R=i.call(L,R,s):i.forEach(function(F){R=F.call(L,R,s)})),l&&K?g.push(R):l||g.push(R)}T>0&&(C=dd(e,N,k+1,u)),D=ud(e,t,C)}return L.cells=g,L}var Kh=function(e){return Xh.bind(e)},qh={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"}},Tn=qh;function e2(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function fd(e,t){for(var i in e)t[i]?e2(e[i])&&fd(e[i],t[i]):t[i]=e[i]}function hd(e,t){var i=[Tn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(i):e.class=i,e.type.indexOf("Label")>0&&(e.index==0&&Tn.weekPlaceholder?e.desc=Tn.weekPlaceholder:e.index<8?e.desc=Tn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Tn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Tn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Tn.monthNames[t],columnNames:Tn.columnNames[t],classes:Tn.classes}),e}hd.setLabels=function(e){fd(e,Tn)};var t2=hd,n2={Generator:Kh,addLabels:t2};function Kt(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 kt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function un(e){kt(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 i2(e,t){kt(2,arguments);var i=un(e).getTime(),s=Kt(t);return new Date(i+s)}function a2(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 r2(e){return kt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function s2(e){if(kt(1,arguments),!r2(e)&&typeof e!="number")return!1;var t=un(e);return!isNaN(Number(t))}var l2={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"}},o2=function(e,t,i){var s,l=l2[e];return typeof l=="string"?s=l:t===1?s=l.one:s=l.other.replace("{{count}}",t.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},c2=o2;function zl(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,s=e.formats[i]||e.formats[e.defaultWidth];return s}}var u2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},d2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},h2={date:zl({formats:u2,defaultWidth:"full"}),time:zl({formats:d2,defaultWidth:"full"}),dateTime:zl({formats:f2,defaultWidth:"full"})},g2=h2,m2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},p2=function(e,t,i,s){return m2[e]},M2=p2;function La(e){return function(t,i){var s=i||{},l=s.context?String(s.context):"standalone",c;if(l==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,g=s.width?String(s.width):u;c=e.formattingValues[g]||e.formattingValues[u]}else{var h=e.defaultWidth,p=s.width?String(s.width):e.defaultWidth;c=e.values[p]||e.values[h]}var m=e.argumentCallback?e.argumentCallback(t):t;return c[m]}}var C2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},y2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},I2={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"]},b2={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"]},N2={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"}},w2={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"}},L2=function(e,t){var i=Number(e),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},v2={ordinalNumber:L2,era:La({values:C2,defaultWidth:"wide"}),quarter:La({values:y2,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:La({values:I2,defaultWidth:"wide"}),day:La({values:b2,defaultWidth:"wide"}),dayPeriod:La({values:N2,defaultWidth:"wide",formattingValues:w2,defaultFormattingWidth:"wide"})},k2=v2;function va(e){return function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.width,l=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],c=t.match(l);if(!c)return null;var u=c[0],g=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(g)?x2(g,function(C){return C.test(u)}):T2(g,function(C){return C.test(u)}),p;p=e.valueCallback?e.valueCallback(h):h,p=i.valueCallback?i.valueCallback(p):p;var m=t.slice(u.length);return{value:p,rest:m}}}function T2(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function x2(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}function S2(e){return function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=t.match(e.matchPattern);if(!s)return null;var l=s[0],c=t.match(e.parsePattern);if(!c)return null;var u=e.valueCallback?e.valueCallback(c[0]):c[0];u=i.valueCallback?i.valueCallback(u):u;var g=t.slice(l.length);return{value:u,rest:g}}}var D2=/^(\d+)(th|st|nd|rd)?/i,j2=/\d+/i,z2={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},J2={any:[/^b/i,/^(a|c)/i]},P2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Q2={any:[/1/i,/2/i,/3/i,/4/i]},O2={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},A2={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]},E2={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},V2={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]},R2={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},W2={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}},Z2={ordinalNumber:S2({matchPattern:D2,parsePattern:j2,valueCallback:function(e){return parseInt(e,10)}}),era:va({matchPatterns:z2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any"}),quarter:va({matchPatterns:P2,defaultMatchWidth:"wide",parsePatterns:Q2,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:va({matchPatterns:O2,defaultMatchWidth:"wide",parsePatterns:A2,defaultParseWidth:"any"}),day:va({matchPatterns:E2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),dayPeriod:va({matchPatterns:R2,defaultMatchWidth:"any",parsePatterns:W2,defaultParseWidth:"any"})},G2=Z2,Y2={code:"en-US",formatDistance:c2,formatLong:g2,formatRelative:M2,localize:k2,match:G2,options:{weekStartsOn:0,firstWeekContainsDate:1}},B2=Y2;function H2(e,t){kt(2,arguments);var i=Kt(t);return i2(e,-i)}var F2=864e5;function U2(e){kt(1,arguments);var t=un(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var s=t.getTime(),l=i-s;return Math.floor(l/F2)+1}function Nr(e){kt(1,arguments);var t=1,i=un(e),s=i.getUTCDay(),l=(s<t?7:0)+s-t;return i.setUTCDate(i.getUTCDate()-l),i.setUTCHours(0,0,0,0),i}function gd(e){kt(1,arguments);var t=un(e),i=t.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var l=Nr(s),c=new Date(0);c.setUTCFullYear(i,0,4),c.setUTCHours(0,0,0,0);var u=Nr(c);return t.getTime()>=l.getTime()?i+1:t.getTime()>=u.getTime()?i:i-1}function _2(e){kt(1,arguments);var t=gd(e),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var s=Nr(i);return s}var $2=6048e5;function X2(e){kt(1,arguments);var t=un(e),i=Nr(t).getTime()-_2(t).getTime();return Math.round(i/$2)+1}function wr(e,t){kt(1,arguments);var i=t||{},s=i.locale,l=s&&s.options&&s.options.weekStartsOn,c=l==null?0:Kt(l),u=i.weekStartsOn==null?c:Kt(i.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=un(e),h=g.getUTCDay(),p=(h<u?7:0)+h-u;return g.setUTCDate(g.getUTCDate()-p),g.setUTCHours(0,0,0,0),g}function md(e,t){kt(1,arguments);var i=un(e),s=i.getUTCFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,g=u==null?1:Kt(u),h=l.firstWeekContainsDate==null?g:Kt(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var m=wr(p,t),C=new Date(0);C.setUTCFullYear(s,0,h),C.setUTCHours(0,0,0,0);var b=wr(C,t);return i.getTime()>=m.getTime()?s+1:i.getTime()>=b.getTime()?s:s-1}function K2(e,t){kt(1,arguments);var i=t||{},s=i.locale,l=s&&s.options&&s.options.firstWeekContainsDate,c=l==null?1:Kt(l),u=i.firstWeekContainsDate==null?c:Kt(i.firstWeekContainsDate),g=md(e,t),h=new Date(0);h.setUTCFullYear(g,0,u),h.setUTCHours(0,0,0,0);var p=wr(h,t);return p}var q2=6048e5;function eg(e,t){kt(1,arguments);var i=un(e),s=wr(i,t).getTime()-K2(i,t).getTime();return Math.round(s/q2)+1}function Be(e,t){for(var i=e<0?"-":"",s=Math.abs(e).toString();s.length<t;)s="0"+s;return i+s}var tg={y:function(e,t){var i=e.getUTCFullYear(),s=i>0?i:1-i;return Be(t==="yy"?s%100:s,t.length)},M:function(e,t){var i=e.getUTCMonth();return t==="M"?String(i+1):Be(i+1,2)},d:function(e,t){return Be(e.getUTCDate(),t.length)},a:function(e,t){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(e,t){return Be(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Be(e.getUTCHours(),t.length)},m:function(e,t){return Be(e.getUTCMinutes(),t.length)},s:function(e,t){return Be(e.getUTCSeconds(),t.length)},S:function(e,t){var i=t.length,s=e.getUTCMilliseconds(),l=Math.floor(s*Math.pow(10,i-3));return Be(l,t.length)}},ei=tg,Yi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ng={G:function(e,t,i){var s=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(e,t,i){if(t==="yo"){var s=e.getUTCFullYear(),l=s>0?s:1-s;return i.ordinalNumber(l,{unit:"year"})}return ei.y(e,t)},Y:function(e,t,i,s){var l=md(e,s),c=l>0?l:1-l;if(t==="YY"){var u=c%100;return Be(u,2)}return t==="Yo"?i.ordinalNumber(c,{unit:"year"}):Be(c,t.length)},R:function(e,t){var i=gd(e);return Be(i,t.length)},u:function(e,t){var i=e.getUTCFullYear();return Be(i,t.length)},Q:function(e,t,i){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return Be(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,i){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return Be(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,i){var s=e.getUTCMonth();switch(t){case"M":case"MM":return ei.M(e,t);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,i){var s=e.getUTCMonth();switch(t){case"L":return String(s+1);case"LL":return Be(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,i,s){var l=eg(e,s);return t==="wo"?i.ordinalNumber(l,{unit:"week"}):Be(l,t.length)},I:function(e,t,i){var s=X2(e);return t==="Io"?i.ordinalNumber(s,{unit:"week"}):Be(s,t.length)},d:function(e,t,i){return t==="do"?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):ei.d(e,t)},D:function(e,t,i){var s=U2(e);return t==="Do"?i.ordinalNumber(s,{unit:"dayOfYear"}):Be(s,t.length)},E:function(e,t,i){var s=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,i,s){var l=e.getUTCDay(),c=(l-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return Be(c,2);case"eo":return i.ordinalNumber(c,{unit:"day"});case"eee":return i.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(l,{width:"short",context:"formatting"});case"eeee":default:return i.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,i,s){var l=e.getUTCDay(),c=(l-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return Be(c,t.length);case"co":return i.ordinalNumber(c,{unit:"day"});case"ccc":return i.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(l,{width:"narrow",context:"standalone"});case"cccccc":return i.day(l,{width:"short",context:"standalone"});case"cccc":default:return i.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,i){var s=e.getUTCDay(),l=s===0?7:s;switch(t){case"i":return String(l);case"ii":return Be(l,t.length);case"io":return i.ordinalNumber(l,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,i){var s=e.getUTCHours(),l=s/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,i){var s=e.getUTCHours(),l;switch(s===12?l=Yi.noon:s===0?l=Yi.midnight:l=s/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,i){var s=e.getUTCHours(),l;switch(s>=17?l=Yi.evening:s>=12?l=Yi.afternoon:s>=4?l=Yi.morning:l=Yi.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,i){if(t==="ho"){var s=e.getUTCHours()%12;return s===0&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return ei.h(e,t)},H:function(e,t,i){return t==="Ho"?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ei.H(e,t)},K:function(e,t,i){var s=e.getUTCHours()%12;return t==="Ko"?i.ordinalNumber(s,{unit:"hour"}):Be(s,t.length)},k:function(e,t,i){var s=e.getUTCHours();return s===0&&(s=24),t==="ko"?i.ordinalNumber(s,{unit:"hour"}):Be(s,t.length)},m:function(e,t,i){return t==="mo"?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ei.m(e,t)},s:function(e,t,i){return t==="so"?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ei.s(e,t)},S:function(e,t){return ei.S(e,t)},X:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Md(c);case"XXXX":case"XX":return bi(c);case"XXXXX":case"XXX":default:return bi(c,":")}},x:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"x":return Md(c);case"xxxx":case"xx":return bi(c);case"xxxxx":case"xxx":default:return bi(c,":")}},O:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pd(c,":");case"OOOO":default:return"GMT"+bi(c,":")}},z:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pd(c,":");case"zzzz":default:return"GMT"+bi(c,":")}},t:function(e,t,i,s){var l=s._originalDate||e,c=Math.floor(l.getTime()/1e3);return Be(c,t.length)},T:function(e,t,i,s){var l=s._originalDate||e,c=l.getTime();return Be(c,t.length)}};function pd(e,t){var i=e>0?"-":"+",s=Math.abs(e),l=Math.floor(s/60),c=s%60;if(c===0)return i+String(l);var u=t||"";return i+String(l)+u+Be(c,2)}function Md(e,t){if(e%60===0){var i=e>0?"-":"+";return i+Be(Math.abs(e)/60,2)}return bi(e,t)}function bi(e,t){var i=t||"",s=e>0?"-":"+",l=Math.abs(e),c=Be(Math.floor(l/60),2),u=Be(l%60,2);return s+c+i+u}var ig=ng;function Cd(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 yd(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 ag(e,t){var i=e.match(/(P+)(p+)?/)||[],s=i[1],l=i[2];if(!l)return Cd(e,t);var c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Cd(s,t)).replace("{{time}}",yd(l,t))}var rg={p:yd,P:ag},sg=rg,lg=["D","DD"],og=["YY","YYYY"];function cg(e){return lg.indexOf(e)!==-1}function ug(e){return og.indexOf(e)!==-1}function Id(e,t,i){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; 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(i,"`; 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(i,"`; 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(i,"`; see: https://git.io/fxCyr"))}var dg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hg=/^'([^]*?)'?$/,gg=/''/g,mg=/[a-zA-Z]/;function pg(e,t,i){kt(2,arguments);var s=String(t),l=i||{},c=l.locale||B2,u=c.options&&c.options.firstWeekContainsDate,g=u==null?1:Kt(u),h=l.firstWeekContainsDate==null?g:Kt(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=c.options&&c.options.weekStartsOn,m=p==null?0:Kt(p),C=l.weekStartsOn==null?m:Kt(l.weekStartsOn);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!c.localize)throw new RangeError("locale must contain localize property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var b=un(e);if(!s2(b))throw new RangeError("Invalid time value");var y=a2(b),N=H2(b,y),k={firstWeekContainsDate:h,weekStartsOn:C,locale:c,_originalDate:b},x=s.match(fg).map(function(D){var L=D[0];if(L==="p"||L==="P"){var T=sg[L];return T(D,c.formatLong,k)}return D}).join("").match(dg).map(function(D){if(D==="''")return"'";var L=D[0];if(L==="'")return Mg(D);var T=ig[L];if(T)return!l.useAdditionalWeekYearTokens&&ug(D)&&Id(D,t,e),!l.useAdditionalDayOfYearTokens&&cg(D)&&Id(D,t,e),T(N,D,c.localize,k);if(L.match(mg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+L+"`");return D}).join("");return x}function Mg(e){return e.match(hg)[1].replace(gg,"'")}const mt={},bd=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ni=/\d\d?/,Cg=/\d{3}/,yg=/\d{4}/,Lr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Nd=function(){};function wd(e,t){const i=[];for(let s=0,l=e.length;s<l;s++)i.push(e[s].substr(0,t));return i}function Ld(e){return(t,i,s)=>{const l=s[e].indexOf(i.charAt(0).toUpperCase()+i.substr(1).toLowerCase());~l&&(t.month=l)}}function xn(e,t=2){let i=String(e);for(;i.length<t;)i=`0${i}`;return i}const vd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],kd=["January","February","March","April","May","June","July","August","September","October","November","December"],Ig=wd(kd,3),bg=wd(vd,3);mt.i18n={dayNamesShort:bg,dayNames:vd,monthNamesShort:Ig,monthNames:kd,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Td={D(e){return e.getDay()},DD(e){return xn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return xn(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 xn(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 xn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return xn(e.getHours())},m(e){return e.getMinutes()},mm(e){return xn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return xn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return xn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return xn(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?"-":"+")+xn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},nt={d:[Ni,(e,t)=>{e.day=t}],M:[Ni,(e,t)=>{e.month=t-1}],yy:[Ni,(e,t)=>{const s=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?s-1:s}${t}`}],h:[Ni,(e,t)=>{e.hour=t}],m:[Ni,(e,t)=>{e.minute=t}],s:[Ni,(e,t)=>{e.second=t}],yyyy:[yg,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Cg,(e,t)=>{e.millisecond=t}],D:[Ni,Nd],ddd:[Lr,Nd],MMM:[Lr,Ld("monthNamesShort")],MMMM:[Lr,Ld("monthNames")],a:[Lr,(e,t,i)=>{const s=t.toLowerCase();s===i.amPm[0]?e.isPm=!1:s===i.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const i=`${t}`.match(/([\\+\\-]|\d\d)/gi);let s;i&&(s=+(i[1]*60)+parseInt(i[2],10),e.timezoneOffset=i[0]==="+"?s:-s)}]};nt.DD=nt.D,nt.dddd=nt.ddd,nt.Do=nt.dd=nt.d,nt.mm=nt.m,nt.hh=nt.H=nt.HH=nt.h,nt.MM=nt.M,nt.ss=nt.s,nt.A=nt.a,mt.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"},mt.format=(e,t,i)=>{const s=i||mt.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=mt.masks[t]||t||mt.masks.default,t.replace(bd,l=>l in Td?Td[l](e,s):l.slice(1,l.length-1))},mt.parse=(e,t,i)=>{const s=i||mt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=mt.masks[t]||t,e.length>1e3)return!1;let l=!0;const c={};if(t.replace(bd,h=>{if(nt[h]){const p=nt[h],m=e.search(p[0]);~m?e.replace(p[0],C=>(p[1](c,C,s),e=e.substr(m+C.length),C)):l=!1}return nt[h]?"":h.slice(1,h.length-1)}),!l)return!1;const u=new Date;c.isPm===!0&&c.hour!==null&&+c.hour!=12?c.hour=+c.hour+12:c.isPm===!1&&+c.hour==12&&(c.hour=0);let g;return c.timezoneOffset!==null&&c.timezoneOffset!==void 0?(c.minute=+(c.minute||0)-+c.timezoneOffset,g=new Date(Date.UTC(c.year||u.getFullYear(),c.month||0,c.day||1,c.hour||0,c.minute||0,c.second||0,c.millisecond||0))):g=new Date(c.year||u.getFullYear(),c.month||0,c.day||1,c.hour||0,c.minute||0,c.second||0,c.millisecond||0),g};const Jl=" - ",An=(e,t)=>{const i=un(new Date(e));return!i||isNaN(i.getTime())?"":pg(i,t||"yyyy-MM-dd")},Pl=(e,t)=>{if(Array.isArray(e)&&e.length===2){const i=e[0],s=e[1];if(i&&s)return An(i,t)+Jl+An(s,t)}else if(!Array.isArray(e)&&e instanceof Date)return An(e,t);return""},Ql=(e,t)=>{const i=Array.isArray(e)?e:e.split(Jl);if(i.length===2){const s=i[0],l=i[1];return[s instanceof Date?s:mt.parse(s,t||"yyyy-MM-dd"),l instanceof Date?l:mt.parse(l,t||"yyyy-MM-dd")]}return[]},Bi={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Pl,parser:Ql},datetimerange:{formatter:Pl,parser:Ql},timerange:{formatter:Pl,parser:Ql},time:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(i=>An(i,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(s=>{if(s instanceof Date)return s;let l=s;return typeof s=="string"?l=s.trim():typeof s!="number"&&!s&&(l=""),mt.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Ng=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},wg=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),xd=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Sd={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"},vr=(e,t,i,s)=>{const l=t.includes("range"),{parser:c}=Bi[t]||Bi.default,u=s||Sd[t],g=Bi.multiple.parser;let h=e;if(e&&t==="time"&&!(e instanceof Date))h=c(e,u);else if(i&&e)h=g(e,u);else if(l)if(!e)h=[null,null];else if(typeof e=="string")h=c(e,u);else if(t==="timerange")h=c(e,u).map(p=>p||"");else{const[p,m]=e;p instanceof Date&&m instanceof Date?h=e.map(C=>new Date(C)):typeof p=="string"&&typeof m=="string"?h=c(e.join(Jl),u):(!p||!m)&&(h=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(h=c(e,u)||null);return l||i?h||[]:[h]},ka=(e,t,i,s)=>{const l=Sd[t];if(i){const{formatter:u}=Bi.multiple;return u(e,s||l)}const{formatter:c}=Bi[t]||Bi.default;return c(e,s||l)},Lg=Symbol("date-picker");function qt(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const vg=(e,t)=>new Date(e,t+1,0).getDate(),Dd=(e,t)=>{const i=new Date(e),s=i.getMonth()+t,l=vg(i.getFullYear(),s);return l<i.getDate()&&i.setDate(l),i.setMonth(s),i},jd=(()=>{const e={yyyy:i=>i.getFullYear(),m:i=>i.getMonth()+1,mm:i=>`0${i.getMonth()+1}`.slice(-2),mmm:(i,s)=>i.toLocaleDateString(s,{month:"long"}).slice(0,3),Mmm:(i,s)=>{const l=i.toLocaleDateString(s,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(i,s)=>i.toLocaleDateString(s,{month:"long"}),Mmmm:(i,s)=>{const l=i.toLocaleDateString(s,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(i,s,l)=>{const c=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=s.match(c).slice(1),g=u[1],h=[u[0],u[2]].map(p=>({label:p.replace(/\[[^\]]+\]/,C=>C.slice(1,-1).replace(t,b=>e[b](l,i))),type:p.indexOf("yy")!==-1?"year":"month"}));return{separator:g,labels:h}}})(),wi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},kg=(e,t,i)=>{if(!t||!i)return!1;const[s,l]=[t,i].sort();return e>=s&&e<=l},Tg={tableDate:{type:Date,required:!0},disableDate: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 Ol=a.defineComponent({props:Tg,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const i=a.computed(()=>new n2.Generator({onlyDays:!0,weekStart:0})),s=a.computed(()=>{const p=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return p.splice(0,7-0).concat(p.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),c=a.computed(()=>{const p=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),C=wi(new Date),b=l.value.filter(Boolean).map(wi),[y,N]=l.value.map(wi),k=e.rangeState.from&&wi(e.rangeState.from),x=e.rangeState.to&&wi(e.rangeState.to),D=e.selectionMode==="range",L=typeof e.disableDate=="function"&&e.disableDate;return i.value(p,m,T=>{T.date instanceof Date&&T.date.setTime(T.date.getTime()+T.date.getTimezoneOffset()*6e4);const z=T.date&&wi(T.date),A=T.date&&m===T.date.getMonth();return ze(Z({},T),{type:z===C?"today":T.type,selected:A&&b.includes(z),disabled:T.date&&L&&L(new Date(z)),range:A&&D&&kg(z,k,x),start:A&&D&&z===y,end:A&&D&&z===N})}).cells.slice(0)});return{headerDays:s,cells:c,getCellCls:p=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:p.selected||p.start||p.end,["bk-date-picker-cells-cell-disabled"]:p.disabled,["bk-date-picker-cells-cell-today"]:p.type==="today",["bk-date-picker-cells-cell-prev-month"]:p.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:p.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:p.type==="weekLabel",["bk-date-picker-cells-cell-range"]:p.range&&!p.start&&!p.end}],handleClick:p=>{if(p.disabled||p.type==="weekLabel")return;const m=new Date(wi(p.date));t("pick",m),t("pick-click")},handleMouseMove:p=>{if(!e.rangeState.selecting||p.disabled)return;const m=p.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 xg={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};var Sg=a.defineComponent({props:xg,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:i}){const s=O=>O.match(/^time/)?"time-picker":`${O}-table`,l=e.modelValue.slice().sort(),c=a.reactive({currentView:e.selectionMode||"date",pickerTable:s(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),u=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},g=O=>{c.panelDate=O,c.pickerTable==="year-table"?c.pickerTable="month-table":c.pickerTable=s(c.currentView)},h=(O,V)=>{let U=O;e.selectionMode==="year"?U=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?U=new Date(c.panelDate.getFullYear(),O.getMonth(),1):U=new Date(O),c.dates=[U],i("pick",U,!1,V||e.selectionMode)},p=()=>{u(),i("pick-success")},m=()=>{u(),i("pick-clear")},C=O=>{O.value&&i("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&p()},b=()=>{c.currentView=e.selectionMode,c.pickerTable=s(c.currentView)},y=O=>{e.selectionMode==="year"||c.pickerTable==="year-table"?c.panelDate=new Date(c.panelDate.getFullYear()+O*10,0,1):c.panelDate=Dd(c.panelDate,O*12)},N=O=>{c.panelDate=Dd(c.panelDate,O)},k=a.ref(null),x=a.ref(null),D=O=>{var V,U;O&&((V=k==null?void 0:k.value)==null||V.updateScroll(),(U=x==null?void 0:x.value)==null||U.updateScroll())},L=a.computed(()=>c.pickerTable===`${c.currentView}-table`?h:g),T=a.computed(()=>{const O="zh-CN",V="[yyyy]-[mm]",U=c.panelDate,{labels:ue,separator:ee}=jd(O,V,U),ge=Me=>()=>{c.pickerTable=s(Me)};return{separator:ee,labels:ue.map(Me=>{const he=Me;return he.handler=ge(Me.type),he})}}),z=a.computed(()=>T.value.labels[0].type==="year"||c.currentView==="date"),A=a.computed(()=>T.value.labels[1].type==="year"||c.currentView==="date"),K=a.computed(()=>c.currentView==="time"),R=()=>{c.currentView=c.currentView==="time"?"date":"time"},F=a.computed(()=>!!t.shortcuts);return ze(Z({},a.toRefs(c)),{panelPickerHandlers:L,datePanelLabel:T,showLabelFirst:z,showLabelSecond:A,handleShortcutClick:C,changeYear:y,changeMonth:N,reset:b,isTime:K,hasShortcuts:F,onToggleVisibility:D,handleToggleTime:R,handlePickSuccess:p,handlePickClear:m})},render(){var e,t,i;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:s=>{s.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(s=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(s)},[s.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:qt("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Pn,{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(Ol,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode($h,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(i=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?i:null]):null])}});const Dg={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var jg=a.defineComponent({props:Dg,emits:["pick"],setup(e,{slots:t,emit:i}){const[s,l]=e.modelValue.map(Q=>Q||Ng()),c=e.startDate?e.startDate:s,u=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:c,rightPanelDate:new Date(c.getFullYear(),c.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:s&&!l},upToNowEnable:!1,dates:e.modelValue}),g=(Q,j)=>!Q||!j?0:Q.getTime()-j.getTime(),h=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},p=a.ref(null),m=a.ref(null),C=Q=>{var j,E;Q&&((j=p==null?void 0:p.value)==null||j.updateScroll(),(E=m==null?void 0:m.value)==null||E.updateScroll())},b=(Q,j,E,G=!0)=>{const q=new Date(u[`${Q}PanelDate`]);if(q[`set${j}`](q[`get${j}`]()+E),u[`${Q}PanelDate`]=q,!!G)if(e.splitPanels){const ae=Q==="left"?"right":"left";Q==="left"&&u.leftPanelDate>=u.rightPanelDate&&b(ae,j,1),Q==="right"&&u.rightPanelDate<=u.leftPanelDate&&b(ae,j,-1)}else{const ae=Q==="left"?"right":"left",be=u[`${ae}PanelDate`],Y=new Date(be);if(j==="Month"){const re=new Date(Y.getFullYear(),Y.getMonth()+E+1,0).getDate();Y.setDate(Math.min(re,Y.getDate()))}Y[`set${j}`](Y[`get${j}`]()+E),u[`${ae}PanelDate`]=Y}},y=Q=>{const j=u.currentView==="year"?-10:-1;b(Q,"FullYear",j)},N=Q=>{const j=u.currentView==="year"?10:1;b(Q,"FullYear",j)},k=Q=>{b(Q,"Month",-1)},x=Q=>{b(Q,"Month",1)},D=Q=>{u[`${Q}PickerTable`]="year-table"},L=Q=>{u[`${Q}PickerTable`]="month-table"},T=Q=>{const j="zh-CN",E="[yyyy]-[mm]",G=u[`${Q}PanelDate`],{labels:q,separator:ae}=jd(j,E,G),be=Y=>{const re=Y==="month"?L:D;return()=>re(Q)};return{separator:ae,labels:q.map(Y=>{const re=Y;return re.handler=be(Y.type),re})}},z=(Q,j)=>{i("pick",u.dates,Q,j||e.type)},A=(Q,j)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=Q;else{const[E,G]=[u.rangeState.from,Q].sort(g),q=j==="upToNow"?new Date:new Date(new Date(new Date(G.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[E,q],u.rangeState={from:E,to:q,selecting:!1}}z(!1,j||"date")}else u.upToNowEnable=new Date(Q).getTime()<new Date().getTime(),u.rangeState={from:Q,to:null,selecting:!0}},K=(Q,j)=>{if(u[`${Q}PanelDate`]=j,u[`${Q}PickerTable`]==="year-table"?u[`${Q}PickerTable`]="month-table":u[`${Q}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const G=Q==="left"?"right":"left";u[`${G}PanelDate`]=j,b(G,"Month",G==="left"?-1:1,!1)}},R=Q=>{u.rangeState.to=Q};a.watch(()=>e.selectionMode,Q=>{u.currentView=Q||"range"});const F=a.computed(()=>u.currentView==="time"),O=a.computed(()=>T("left")),V=a.computed(()=>T("right")),U=a.computed(()=>u.leftPickerTable.split("-").shift()),ue=a.computed(()=>u.rightPickerTable.split("-").shift()),ee=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),ge=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),Me=a.computed(()=>V.value.labels[0].type==="year"||u.currentView==="date"),he=a.computed(()=>V.value.labels[1].type==="year"||u.currentView==="date"),ce=a.computed(()=>{const Q=`${u.currentView}-table`;return{left:u.leftPickerTable!==Q,right:u.rightPickerTable!==Q}}),ie=a.computed(()=>({left:ce.value.left?K.bind("left"):A,right:ce.value.right?K.bind("right"):A})),se=a.computed(()=>!!t.shortcuts);return ze(Z({},a.toRefs(u)),{isTime:F,hasShortcuts:se,prevYear:y,nextYear:N,prevMonth:k,nextMonth:x,leftDatePanelLabel:O,rightDatePanelLabel:V,leftDatePanelView:U,rightDatePanelView:ue,leftShowLabelFirst:ee,leftShowLabelSecond:ge,rightShowLabelFirst:Me,rightShowLabelSecond:he,preSelecting:ce,panelPickerHandlers:ie,reset:h,onToggleVisibility:C,handleRangePick:A,handleChangeRange:R})},render(){var e,t,i;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:s=>{s.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:qt("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Pn,{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(Ol,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:qt("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Pn,{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(Ol,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(i=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?i:null]):null])}});const zg={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}},disableDate:Function};var Jg=a.defineComponent({name:"DatePicker",directives:{clickoutside:Cr},props:zg,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:i}){const s=Un(),l=e.type.includes("range"),c=l?[null,null]:[null];let u=wg((l?e.modelValue:[e.modelValue])||[])?c:vr(e.modelValue,e.type,e.multiple,e.format),g=null;e.shortcutSelectedIndex!==-1&&(g=e.shortcuts[e.shortcutSelectedIndex]||null,g&&(u=g.value()));const h=a.reactive({showClose:!1,visible:!1,internalValue:u,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:u[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:u.map(xd),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:g,onSelectionModeChange:p});function p(Y){let re=Y;return Y.match(/^date/)&&(re="date"),h.selectionMode=["year","month","date","time"].indexOf(re)>-1&&re,h.selectionMode}const m=a.computed(()=>{if(e.multiple)return h.internalValue.slice();const Y=e.type.includes("range");let re=h.internalValue.map(ve=>ve instanceof Date?new Date(ve):ve||"");return e.type.match(/^time/)&&(re=re.map(ve=>ka(ve,e.type,e.multiple,e.format))),Y||e.multiple?re:re[0]}),C=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?ka(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(Y=>ka(Y,e.type,e.multiple,e.format)):ka(m.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),y=a.computed(()=>e.open===null?h.visible:e.open),N=a.computed(()=>ka(h.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?h.shortcut.text:N.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),D=a.computed(()=>!!t.header),L=a.computed(()=>!!t.footer),T=a.computed(()=>!!t.shortcuts),z=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-font":e.fontSize==="large"&&(Y="large-font"),Y}),A=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-width":e.fontSize==="large"&&(Y="large-width"),Y}),K=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),R=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),F=a.ref(null),O=()=>{var Y;(Y=F==null?void 0:F.value)==null||Y.focus()};a.watch(()=>h.visible,Y=>{var re,ve;Y===!1&&((re=V.value)==null||re.destoryDropdown()),(ve=V.value)==null||ve.updateDropdown(),i("open-change",Y)});const V=a.ref(null);a.watch(()=>e.modelValue,Y=>{h.internalValue=vr(Y,e.type,e.multiple,e.format)}),a.watch(()=>e.open,Y=>{h.visible=Y===!0}),a.watch(()=>e.type,Y=>{p(Y)}),a.watch(()=>m,(Y,re)=>{const ve=JSON.stringify(Y),ot=JSON.stringify(re);(ve!==ot||typeof Y!=typeof re)&&i("input",Y)}),a.onMounted(()=>{e.type.indexOf("date")>-1,h.timeEnterMode=!0;const Y=e.modelValue,re=m.value;(typeof Y!=typeof re||JSON.stringify(Y)!==JSON.stringify(re))&&i("input",m.value),e.open!==null&&(h.visible=e.open),a.provide(Lg,{props:e,focus:()=>O()})});const U=a.ref(null),ue=Y=>{var re;if(h.disableCloseUnderTransfer)return h.disableCloseUnderTransfer=!1,!1;if(Y&&Y.type==="mousedown"&&h.visible){Y.preventDefault(),Y.stopPropagation();return}if(h.visible){const ve=(re=U==null?void 0:U.value)==null?void 0:re.$el;if(Y&&ve&&ve.contains(Y.target))return;h.visible=!1,Y==null||Y.preventDefault(),Y==null||Y.stopPropagation();return}h.isFocused=!1,h.disableClickOutSide=!1},ee=()=>{var Y,re;(Y=F==null?void 0:F.value)==null||Y.focus(),(re=F==null?void 0:F.value)==null||re.click()},ge=()=>{e.readonly||e.disabled||N!=null&&N.value&&(h.showClose=!0)},Me=Y=>{var re;(re=Y.toElement)!=null&&re.classList.contains("clear-action")||(h.showClose=!1)},he=Y=>{a.nextTick(()=>{var re,ve;i("change",C.value,Y),i("update:modelValue",m.value),(re=s==null?void 0:s.validate)==null||re.call(s,"change"),e.type.indexOf("time")<0&&((ve=F==null?void 0:F.value)==null||ve.blur())})},ce=Y=>{var bt;const re=e.type.includes("range")||e.multiple,ve=N.value,ot=Y.target.value,Fe=vr(ot,e.type,e.multiple,e.format),Tt=re?Fe:Fe[0],pt=(bt=e.disableDate)==null?void 0:bt.call(e,Tt),et=Fe.reduce(($,te)=>$&&te instanceof Date,!0);ot!==ve&&!pt&&et?(he(e.type),h.internalValue=Fe):h.forceInputRerender=h.forceInputRerender+1},ie=Y=>{e.readonly||(h.isFocused=!0,!(Y&&Y.type==="focus")&&(e.disabled||(h.visible=!0)))},se=()=>{var Y;(Y=U==null?void 0:U.value)==null||Y.reset()},Q=Y=>{var re,ve;if(h.internalFocus){h.internalFocus=!1;return}if(h.visible){Y.preventDefault();return}h.isFocused=!1,p(e.type),h.internalValue=h.internalValue.slice(),se(),(re=U==null?void 0:U.value)==null||re.onToggleVisibility(!1),(ve=s==null?void 0:s.validate)==null||ve.call(s,"blur")},j=Y=>{const{keyCode:re}=Y;if(re===9&&h.visible)if(Y.stopPropagation(),Y.preventDefault(),x.value){const ot=".bk-picker-confirm > *",Fe=V.value.$el.querySelectorAll(ot);h.internalFocus=!0,[...Fe][Y.shiftKey?"pop":"shift"]().focus()}else ue();const ve=[37,38,39,40];if(!h.visible&&ve.includes(re)){h.visible=!0;return}re===27&&h.visible&&(Y.stopPropagation(),ue()),!!ve.includes(re)&&h.focusedTime.active&&Y.preventDefault()},E=()=>{h.visible=!1,h.internalValue=h.internalValue.map(()=>null),i("clear"),he(e.type),se(),h.showClose=!1,h.shortcut=null,setTimeout(()=>p(e.type),500)},G=()=>{e.appendToBody&&(h.disableCloseUnderTransfer=!0)},q=()=>{var Y;h.visible=!1,console.error("onPickSuccess"),a.nextTick(()=>{i("pick-success")}),(Y=F==null?void 0:F.value)==null||Y.blur(),se()},ae=(Y,re=!1,ve,ot)=>{let Fe=Y;if(e.multiple){const pt=Fe.getTime(),et=h.internalValue.findIndex(te=>te&&te.getTime()===pt),$=[...h.internalValue,Fe].filter(Boolean).map(te=>te.getTime()).filter((te,oe,Ne)=>Ne.indexOf(te)===oe&&oe!==et);h.internalValue=$.map(te=>new Date(te))}else Fe=vr(Y,e.type,e.multiple,e.format),h.internalValue=Array.isArray(Fe)?Fe:[Fe];if(h.internalValue[0]){const[pt]=h.internalValue;h.focusedDate=pt}h.focusedTime=ze(Z({},h.focusedTime),{time:h.internalValue.map(xd)}),x.value||(p(e.type),h.visible=re),ve==="upToNow"&&e.type==="daterange"&&q(),h.shortcut=ot,he(ve);const Tt=e.shortcuts.findIndex(pt=>pt===h.shortcut);i("shortcut-change",h.shortcut,Tt)},be=a.ref(null);return ze(Z({},a.toRefs(h)),{panel:b,publicStringValue:C,opened:y,visualValue:N,displayValue:k,isConfirm:x,hasHeader:D,hasFooter:L,hasShortcuts:T,fontSizeCls:z,longWidthCls:A,localReadonly:K,allowCrossDayProp:R,pickerDropdownRef:V,inputRef:F,triggerRef:be,pickerPanelRef:U,handleClose:ue,handleIconClick:ee,handleInputMouseenter:ge,handleInputMouseleave:Me,handleFocus:ie,handleBlur:Q,handleKeydown:j,handleInputChange:ce,handleClear:E,handleTransferClick:G,onPick:ae,onPickSuccess:q})},render(){var i,s,l;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[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,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode("i",{class:"bk-icon icon-close-circle-shape clear-action",onClick:this.handleClear},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var c,u;return((u=(c=this.$slots).shortcuts)==null?void 0:u.call(c))||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"},[(l=(s=(i=this.$slots).trigger)==null?void 0:s.call(i))!=null?l: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(Uh,{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 c,u,g,h,p,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(g=(u=(c=this.$slots).header)==null?void 0:u.call(c))!=null?g:null]):null,this.panel==="DateRangePanel"?a.createVNode(jg,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(Sg,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(p=(h=this.$slots).footer)==null?void 0:p.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const zd=Re(Jg);var Sn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Sn||{});const Pg={title:d.arrayOf(d.string).def([]),extCls:d.string.def(""),searchPlaceholder:d.string.def(""),settingKey:d.string.def("id"),displayKey:d.string.def("value"),sortKey:d.string.def("value"),showOverflowTips:d.bool.def(!1),searchable:d.bool.def(!1),sortable:d.bool.def(!1),sourceList:d.arrayOf(d.any).def([]),targetList:d.arrayOf(d.any).def([]),emptyContent:d.arrayOf(d.string).def([])};function Qg(e,t,i){const s=a.ref([]),l=a.ref([]),c=()=>{e.value.forEach(u=>{const g=u[i.value];t.value.includes(g)?l.value.push(u):s.value.push(u)})};return c(),a.watch(()=>[e,t,i],c),{selectList:s,selectedList:l}}function Og(e,t){const i=a.ref(""),s=a.computed(()=>e.value.filter(l=>{const c=l[t.value];return c instanceof Object?!1:c.toString().includes(i.value)}));return{selectSearchQuery:i,selectListSearch:s}}var Ag=a.defineComponent({name:"Transfer",props:Pg,emits:["change","update:targetList"],setup(e,{emit:t}){const i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(T=>T.toString().includes("[object Object]"))?Sn.OBJECT_ARRAY:Sn.BASE_ARRAY:Sn.NOT_ARRAY),s=a.computed(()=>i.value===Sn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Sn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(i.value){case Sn.BASE_ARRAY:return[...new Set(e.sourceList)].map(L=>({value:L}));case Sn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:g}=a.toRefs(e),{selectList:h,selectedList:p}=Qg(u,g,s),{selectSearchQuery:m,selectListSearch:C}=Og(h,l),b=a.computed(()=>[...C.value].sort((L,T)=>{const z=L[c.value],A=T[c.value];return z>A?1:-1})),y=a.computed(()=>[...p.value].sort((L,T)=>{const z=L[c.value],A=T[c.value];return z>A?1:-1})),N=()=>{h.value=[],p.value=[...u.value],D()},k=()=>{h.value=[...u.value],p.value=[],D()},x=(L,T)=>{const z=T?h:p,A=T?p:h,K=z.value.findIndex(R=>R[s.value]===L);A.value.push(...z.value.splice(K,1)),D()},D=()=>{const L=h.value.map(z=>z[s.value]),T=p.value.map(z=>z[s.value]);t("update:targetList",T),t("change",i.value===Sn.BASE_ARRAY?L:h.value.map(z=>a.toRaw(z)),i.value===Sn.BASE_ARRAY?T:p.value.map(z=>a.toRaw(z)),T)};return{selectSearchQuery:m,selectListSearch:C,selectedList:p,selectListSort:b,selectedListSort:y,settingCode:s,displayCode:l,allToRight:N,allToLeft:k,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,i=u=>{var C,b;const g=u==="left-header",h=g?`${(C=this.title[0])!=null?C:"\u5DE6\u4FA7\u5217\u8868"}`:`${(b=this.title[1])!=null?b:"\u53F3\u4FA7\u5217\u8868"}`,p=g?!e.length:!t.length,m=()=>{p||(g?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${h}\uFF08\u5171${g?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:p},onClick:()=>m()},[g?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},s=u=>{var p;const g=u==="left-empty-content",h=(p=g?this.emptyContent[0]:this.emptyContent[1])!=null?p:g?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[h])},l=(u,g=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[g?a.createVNode(Os,{class:"bk-icon"},null):a.createVNode(wn,{class:"bk-icon"},null)])]),c=u=>{const g=u==="left",h=g?e:t,p=g?"source-option":"target-option",m=g?"left-empty-content":"right-empty-content";return h.length?a.createVNode("ul",{class:["content",this.searchable&&g?"is-search":""]},[h.map(C=>{var b,y,N;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[p]?"custom-item":""],onClick:()=>this.handleItemClick(C[this.settingCode],g)},[(N=(y=(b=this.$slots)[p])==null?void 0:y.call(b,C))!=null?N:l(C,g)])})]):s(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[i("left-header"),this.searchable&&a.createVNode(Mi,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),c("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[i("right-header"),c("right")])])}});const Jd=Re(Ag);var kr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e))(kr||{});const Al=(...e)=>!0,Eg={nodeClick:Al,nodeCollapse:Al,nodeExpand:Al};var H=(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))(H||{});const ti={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Vg={data:d.arrayOf(d.any).def([]),label:d.oneOfType([d.func.def(void 0),d.string.def("label")]),nodeKey:d.string.def(void 0),children:d.string.def("children"),indent:d.number.def(18),lineHeight:d.number.def(32),levelLine:d.oneOfType([d.bool.def(!1),d.func.def(void 0),d.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:d.bool.def(!1),prefixIcon:d.oneOfType([d.func.def(()=>{}),d.bool.def(!1)]).def(!0),async:d.shape({callback:d.func.def(void 0),cache:d.bool.def(!0),deepAutoOpen:d.commonType(["once","every"],"columnType").def("once")}),offsetLeft:d.number.def(5),search:d.oneOfType([d.shape({value:d.oneOfType([d.number,d.string,d.bool]).def(""),match:d.oneOfType([d.commonType(["fuzzy","full"],"TreeSearchMatchType"),d.func]),resultType:d.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:d.bool}),d.string,d.number,d.bool]).def(void 0),emptyText:d.string.def("\u6CA1\u6709\u6570\u636E"),draggable:d.bool.def(!1),dragSort:d.bool.def(!1),selectable:d.bool.def(!0),selected:d.oneOfType([d.string,null,d.number,d.object]).def(null),autoCheckChildren:d.bool.def(!0),autoOpenParentNode:d.bool.def(!0)};var Rg=(e,{slots:t})=>({renderEmpty:i=>a.createVNode(dr,{scene:"part",type:i},{default:()=>{var s,l;return[(l=(s=t.default)==null?void 0:s.call(t))!=null?l:e.emptyText]}})}),Tr=(e,t)=>{const i=O=>e.schema.get(O),s=(O,V)=>{var U;return(U=i(O[H.UUID]))==null?void 0:U[V]},l=(O,V,U)=>{e.schema.set(O[H.UUID],ze(Z({},i(O[H.UUID])),{[V]:U}))},c=O=>s(O,H.PATH),u=O=>s(O,H.UUID),g=O=>s(O,H.IS_ROOT),h=O=>s(O,H.IS_OPEN),p=O=>s(O,H.HAS_CHILD),m=O=>s(O,H.IS_MATCH),C=O=>s(O,H.IS_CHECKED),b=O=>s(O,H.PARENT_ID),y=O=>s({[H.UUID]:O},H.PARENT_ID),N=O=>s(O,H.IS_LOADING),k=(O,V)=>{l(O,H.IS_LOADING,V)},x=O=>e.schema.delete(O),D=O=>{var V;return typeof O=="object"?h(O):typeof O=="string"?(V=i(O))==null?void 0:V[H.IS_OPEN]:!1},L=O=>D(s(O,H.PARENT_ID)),T=O=>g(O)||L(O),z=O=>O.split("-").reduce((U,ue)=>{const ee=Number(ue);return Array.isArray(U)?U[ee]:U[t.children][ee]},t.data),A=O=>z(c({[H.UUID]:O})),K=O=>g({[H.UUID]:O})?{[t.children]:t.data}:A(y(O)),R=O=>({[ti[H.IS_LOADING]]:s(O,H.IS_LOADING),[ti[H.HAS_CHILD]]:p(O),[ti[H.IS_MATCH]]:m(O),[ti[H.IS_CHECKED]]:C(O),[ti[H.IS_OPEN]]:h(O),[ti[H.IS_ROOT]]:g(O),fullPath:s(O,H.PATH),uuid:u(O),parentId:s(O,H.PARENT_ID)});return{getSchemaVal:i,getNodeAttr:s,getNodeId:u,getNodeParentId:b,getNodeParentIdById:y,getParentNodeData:K,setNodeAttr:l,getNodePath:c,isRootNode:g,isNodeOpened:h,hasChildNode:p,isItemOpen:D,isNodeChecked:C,isNodeMatched:m,isNodeLoading:N,checkNodeIsOpen:T,getSourceNodeByPath:z,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:R,setTreeNodeLoading:k,extendNodeAttr:O=>ze(Z({},O),{[H.TREE_NODE_ATTR]:R(O)})}};const Pd="1px dashed #c3cdd7",Qd=(e,t,i=null,s=null,l=null,c=[])=>{const u=e[t];return typeof u=="boolean"?u?s:l:Od(i,e,t,c)},Od=(e,t,i,s=[])=>{const l=t[i];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const c=l.apply(globalThis,[e,...s]);if(typeof c=="string")return c;console.error("props label with function return value is not string, please check and return string");return}},Ad=(e,t)=>Od(e,t,"label"),El=(e,t)=>e.get(t)||{},Wg=(e,t,i)=>{var s;return(s=El(e,t))==null?void 0:s[i]},Zg=(e,t)=>({"--level-line":Qd(t,"levelLine",e,Pd,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Gg=(e,t,i={})=>{const{schema:s}=i,l=Wg(s,e[H.UUID],H.DEPTH);return Z({"--depth":l},typeof t.levelLine=="function"?{"--level-line":Qd(t,"levelLine",e,Pd,null,["node"])}:{})},Yg=(e,t,i)=>{const{__is_root:s,__is_open:l}=El(t,e[H.UUID])||{};return{"is-root":s,"bk-tree-node":!0,"is-open":l,"is-virtual-render":i.virtualRender,"level-line":i.levelLine}},Bg=(e,t)=>{const{__is_checked:i,__is_selected:s}=El(t,e[H.UUID])||{};return{"is-checked":i,"is-selected":s,[rt("node-row")]:!0}},Hg=(e,t,i,s,l)=>{Fg(e,t,i,{[s]:l})},Fg=(e,t,i,s)=>{const c=e.split("-").reduce((u,g)=>{const h=Number(g);return Array.isArray(u)?u[h]:u[i][h]},t);Object.assign(c,s||{})},Ta=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[H.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,H.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Ed=(e,t)=>{const{setNodeAttr:i,getNodePath:s,getNodeAttr:l,resolveScopedSlotParam:c,setTreeNodeLoading:u}=Tr(t,e),g=(m,C)=>{if(typeof m=="object"&&m!==null){i(C,H.IS_OPEN,!0);const b=Array.isArray(m)?m:[m];return Hg(s(C),e.data,e.children,e.children,b),Promise.resolve(m)}return Promise.resolve(m)},h=m=>{const{callback:C=null,cache:b=!0}=e.async||{};if(typeof C=="function"&&l(m,H.IS_ASYNC)){if(i(m,H.IS_ASYNC_INIT,!0),!l(m,H.IS_CACHED)){i(m,H.IS_CACHED,b);const y=c(m),N=C(m,k=>g(k,m),y);if(typeof N=="object"&&N!==null)return u(m,!0),N instanceof Promise?Promise.resolve(N.then(k=>g(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{u(m,!1),i(m,H.IS_CACHED,!0)})):(g(N,m),u(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},p=()=>{const m=t.data.filter(C=>l(C,H.IS_ASYNC)&&C[ti[H.IS_OPEN]]&&!l(C,H.IS_ASYNC_INIT));m.length&&Promise.all(m.map(C=>h(C))).then(()=>{p()}).catch(C=>{console.warn(C)})};return{asyncNodeClick:h,deepAutoOpen:p}},Ug=(e,t,i,s,l,c)=>{let u=e.selected;const{setNodeAttr:g,getNodePath:h,getSchemaVal:p,getNodeAttr:m,getNodeId:C,isRootNode:b,hasChildNode:y,isItemOpen:N,isNodeOpened:k,isNodeLoading:x,resolveScopedSlotParam:D,extendNodeAttr:L}=Tr(i,e),{registerNextLoop:T}=c,{asyncNodeClick:z,deepAutoOpen:A}=Ed(e,i),K=j=>N(j)?a.createVNode(Zs,{class:rt("tree-icon")},null):a.createVNode(Gs,{class:rt("tree-icon")},null),R=j=>{if(typeof j=="string")return j;if(typeof j=="object"&&j!==null){if(j.__v_isVNode)return j;const{node:E,className:G,text:q,style:ae}=j;return a.h(E,{class:G,style:ae},q)}return null},F=j=>{var E,G,q;return((q=(G=(E=t.slots).nodeLoading)==null?void 0:G.call(E,L(j)))!=null?q:x(j))?a.createVNode(Us,null,null):""},O=j=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(j));let E=null;return x(j)?F(j):typeof e.prefixIcon=="function"&&(E=e.prefixIcon(L(j),"node_action"),E!=="default")?R(E):(E==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(y(j)||j.async||!e.autoCheckChildren)?N(j)?a.createVNode(ar,null,null):a.createVNode(ya,null,null):null},V=j=>{if(t.slots.nodeType)return t.slots.nodeType(L(j));let E=null;return typeof e.prefixIcon=="function"&&(E=e.prefixIcon(L(j),"node_type"),E!=="default")?R(E):E==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(j)||y(j)?K(j):a.createVNode($s,{class:rt("tree-icon")},null):null},U=(j,E=null,G=null,q=!0)=>{const ae=E===null?!N(j):!!E;if(ae||s.value.filter(be=>String.prototype.startsWith.call(h(be),h(j))).forEach(be=>g(be,H.IS_OPEN,ae)),g(j,H.IS_OPEN,ae),q){const be=N(j)?kr.NODE_EXPAND:kr.NODE_COLLAPSE;t.emit(be,j,D(j),p(j[H.UUID]),G)}},ue=(j,E,G)=>{if(Array.isArray(j)){j.forEach(q=>g(Ta(q),E,G));return}g(Ta(j),E,G)},ee=(j,E=!0,G=!1)=>{const q=Ta(j);if(!q[H.IS_NULL])if(G)if(E){if(ue(q,H.IS_OPEN,!0),!b(q)){const ae=m(q,H.PARENT_ID);ee(ae,!0,!0)}}else U(q,!1,null,!1);else ue(q,H.IS_OPEN,E)},ge=(j,E)=>{if(k(j)){U(j,!1,E);return}z(j).finally(()=>{m(j,H.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>U(j,!0,E)}):U(j,!0,E)})},Me=(j,E)=>{j.stopImmediatePropagation(),j.stopPropagation(),j.preventDefault(),ge(E,j)},he=(j,E=!0,G=!0)=>{const q=Array.isArray(j)?j:[j];if(!q.length)return;const ae=Ta(q[0]);ae[H.IS_NULL]||(e.selectable?(u!=null&&g({[H.UUID]:u},H.IS_SELECTED,!E),e.selected&&e.selected!==u&&g({[H.UUID]:e.selected},H.IS_SELECTED,!E),g(ae,H.IS_SELECTED,E),u=C(ae),G&&q.length===1&&ee(ae,!0,!0),m(ae,H.IS_ASYNC)&&z(ae).then(()=>{a.nextTick(()=>{q.shift(),he(q,E,G)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ce=(j,E)=>{he(j,!0,!1),k(j)||ge(j,E);const G=kr.NODE_CLICK;t.emit(G,j,D(j),p(j[H.UUID]),E)},ie=(j,E)=>{if(b(E))return!1;const G=h(E),q=`${G}`.split("-").slice(0,j+1);if(q.join("-")===G)return!0;const be=q.pop(),Y=parseInt(be,10);q.push(`${Y+1}`);const re=q.join("-");return l.value.some(ve=>ve[H.PATH]===re)},se=j=>{if(!e.levelLine)return null;const E=q=>({"--depth":q}),G=m(j,H.DEPTH)+1;return new Array(G).fill("").map((q,ae)=>ae).filter(q=>ie(q,j)).filter(q=>q>0).map(q=>a.createVNode("span",{class:"node-virtual-line",style:E(G-q)},null))};return{renderTreeNode:j=>{var E,G,q,ae,be;return a.createVNode("div",{"data-tree-node":C(j),class:Bg(j,i.schema)},[a.createVNode("div",{class:Yg(j,i.schema,e),style:Gg(j,e,i),onClick:Y=>ce(j,Y)},[a.createVNode("span",{class:rt("node-action"),onClick:Y=>Me(Y,j)},[O(j)]),a.createVNode("span",{class:rt("node-content")},[[V(j)],a.createVNode("span",{class:rt("node-text")},[(q=(G=(E=t.slots).node)==null?void 0:G.call(E,L(j)))!=null?q:[Ad(j,e)]]),(be=(ae=t.slots).nodeAppend)==null?void 0:be.call(ae,L(j))]),se(j)])])},hanldeTreeNodeClick:ge,deepAutoOpen:A,asyncNodeClick:z,setNodeAction:ue,setNodeOpened:U,setSelect:he,setOpen:ee}},_g=(e,t,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:l,getParentNodeData:c,getNodeAttr:u,getNodePath:g,isRootNode:h}=Tr(i,e),p=L=>L.target.closest("[data-tree-node]"),m=L=>{p(L).removeEventListener("mouseup",m)},C=L=>{const T=p(L);T.setAttribute("draggable","true"),T.addEventListener("mouseup",m)},b=L=>{L.preventDefault();const T=p(L),z=L.dataTransfer.getData("node-id"),A=T.getAttribute("data-tree-node"),K=k(z,A)?"move":"none";L.dataTransfer.effectAllowed=K,L.dataTransfer.dropEffect=K},y=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const T=p(L);L.dataTransfer.setData("text/plain",""),L.dataTransfer.setData("node-id",T.getAttribute("data-tree-node"))},N=L=>{L.preventDefault(),L.stopPropagation();const T=p(L),z=L.dataTransfer.getData("node-id"),A=T.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:D,globalThis,[z,A])},k=(L,T)=>{const z=g({[H.UUID]:L}),A=g({[H.UUID]:T}),K=l(L),R=l(T);return K===R?!0:z.indexOf(A)===-1&&A.indexOf(z)===-1},x=(L,T)=>{if(!k(L,T))return;const z=JSON.parse(JSON.stringify(s(L))),A=JSON.parse(JSON.stringify(s(T))),K=c(L),R=c(T),F=u({[H.UUID]:L},H.INDEX),O=u({[H.UUID]:T},H.INDEX);K==null||K[e.children].splice(F,1,A),R==null||R[e.children].splice(O,1,z)},D=(L,T)=>{const z=s(L),A=s(T);let K=null;if(h({[H.UUID]:L}))K=e.data;else{const R=l(L);if(R!=null){K=s(R);const F=u({[H.UUID]:L},H.INDEX);K==null||K[e.children].splice(F,1)}}A[e.children]||(A[e.children]=[]),A[e.children].unshift(z)};a.onMounted(()=>{if(e.draggable&&t.value){const L=t.value.$el;L.addEventListener("mousedown",C),L.addEventListener("dragstart",y),L.addEventListener("dragover",b),L.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const L=t.value.$el;L.removeEventListener("mousedown",C),L.removeEventListener("dragstart",y),L.removeEventListener("dragover",b),L.removeEventListener("drop",N)}})},$g=e=>{var b;const t=a.toRef(e,"search"),{openResultNode:i=!1,resultType:s="tree"}=(b=e.search)!=null?b:{},l=y=>["string","number","boolean"].includes(typeof y),c=(y,N)=>y===N,u=(y,N)=>new RegExp(`${y}`,"i").test(`${N}`),g=(y,N)=>Reflect.apply(y,globalThis,N),h=t.value===void 0||t.value===!1,p=(y,N)=>{if(h)return!0;if(l(t.value))return g(u,[t.value,y,N]);const{value:k="",match:x="fuzzy"}=t.value,L=typeof x=="function"?x:x==="fuzzy"?u:c;return`${k}`.length===0?!0:g(L,[k,y,N])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:p,refSearch:t,isSearchActive:m,isSearchDisabled:h,openResultNode:i,resultType:s,isTreeUI:s==="tree"}},Xg=e=>{var x;const t=(D,L=void 0,T=[])=>{const{data:z,children:A}=D,K=[];let R=0;const F=new Map;function O(ce,ie,se,Q){if(ce!=null&&F.has(ce)&&![H.UUID,H.PARENT_ID].includes(ie)){const j=F.get(ce);Object.prototype.hasOwnProperty.call(j,ie)&&typeof Q=="function"&&Reflect.apply(Q,self,[j,ie,se])&&(Object.assign(j,{[ie]:se}),O(j[H.PARENT_ID],ie,se,Q))}}function V(ce){let ie=null;return typeof D.nodeKey=="string"&&(ie=ce[D.nodeKey]||Ll.v4()),ie||ce[H.UUID]||Ll.v4()}const U={[H.IS_OPEN]:()=>!1,[H.IS_CHECKED]:()=>!1,[H.IS_MATCH]:()=>!0,[H.IS_SELECTED]:ce=>D.selected===ce,[H.IS_CACHED]:()=>!1,[H.IS_ASYNC]:()=>null,[H.IS_LOADING]:()=>!1};function ue(ce,ie,se,Q=void 0){let j=Q;Q===void 0&&typeof U[se]=="function"&&(j=U[se](ce,ie));const E=ti[se];if(Object.prototype.hasOwnProperty.call(ie,E))return ie[E];const G=(T||[]).find(ae=>ae[H.UUID]===ce);let q;return G&&(q=G[se]),q==null&&(q=j),q}function ee(ce,ie){return D.selectable?ue(ce,ie,H.IS_SELECTED,D.selected===ce):!1}function ge(ce,ie,se){var E;const Q=ue(ce,ie,H.IS_OPEN),j=F.has(se)?(E=F.get(se))==null?void 0:E[H.IS_OPEN]:!0;return Q&&j}function Me(ce){return!ce[H.IS_OPEN]}function he(ce,ie=0,se=null,Q=null){const j=ce.length;for(let E=0;E<j;E++){const G=ce[E];if(Array.isArray(G))he(G,ie,se,Q);else if(typeof G=="object"&&G!==null){const q=Q!==null?`${Q}-${E}`:`${E}`,ae=`${V(G)}`,be=!!(G[A]||[]).length;let Y=ue(ae,G,H.IS_OPEN);D.autoOpenParentNode?Y&&O(se,H.IS_OPEN,!0,Me):Y=ge(ae,G,se),Object.assign(G,{[H.UUID]:ae}),F.set(ae,{[H.DEPTH]:ie,[H.INDEX]:E,[H.UUID]:ae,[H.PARENT_ID]:se,[H.HAS_CHILD]:be,[H.PATH]:q,[H.IS_ROOT]:se===null,[H.ORDER]:R,[H.IS_SELECTED]:ee(ae,G),[H.IS_MATCH]:ue(ae,G,H.IS_MATCH),[H.IS_OPEN]:Y,[H.IS_CHECKED]:ue(ae,G,H.IS_CHECKED),[H.IS_CACHED]:ue(ae,G,H.IS_CACHED),[H.IS_ASYNC]:ue(ae,G,H.IS_ASYNC),[H.IS_LOADING]:ue(ae,G,H.IS_LOADING),[A]:null}),R+=1,K.push(ze(Z({},JSON.parse(JSON.stringify(G,(re,ve)=>re===D.children?null:ve))),{[H.IS_OPEN]:Y,[A]:null})),Object.prototype.hasOwnProperty.call(G,A)&&he(G[A]||[],ie+1,ae,q)}}}return he(L||z),[K,F]},i=t(e),s=new Map,l=[],c=[],u=a.reactive({data:i[0],schema:i[1],levelLineSchema:{}}),g=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:h,deepAutoOpen:p}=Ed(e,u),m=D=>{l.push(D)},C=(D,L,T=!0)=>{T&&s.has(D)&&s.delete(D),s.set(D,L)},b=D=>typeof D=="function"?{type:"loop",fn:D}:typeof D=="object"&&typeof D.type=="string"&&typeof D.fn=="function"?D:(console.error("loop event error",D),null),y=D=>{var T;const L=b(D);return L!==null&&Reflect.apply(L.fn,globalThis,[]),(T=L==null?void 0:L.type)!=null?T:"once"},N=()=>{Array.from(s.keys()).forEach(D=>{const L=s.get(D);if(Array.isArray(L)){const T=[];L.forEach((z,A)=>{y(z)==="once"&&T.unshift(A)}),T.length&&T.forEach(z=>L.splice(z,1)),L.length===0&&s.delete(D)}else y(L)==="once"&&s.delete(D)})};a.watch(()=>[e.data],D=>{var T,z;const L=t(e,D,g.value);u.data=L[0],u.schema=L[1],((T=e.async)==null?void 0:T.callback)&&((z=e.async)==null?void 0:z.deepAutoOpen)==="every"&&p(),N()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,D=>{c.length=0,l.forEach(L=>{Reflect.apply(L,globalThis,[D]),c.push(()=>Reflect.apply(L,globalThis,[D]))}),C("afterSelectWatch",c)},{immediate:!0});const k=D=>{C("afterDataUpdate",D)};return(x=e.async)!=null&&x.callback&&p(),{flatData:u,schemaValues:g,asyncNodeClick:h,deepAutoOpen:p,afterDataUpdate:k,registerNextLoop:C,onSelected:m}},Kg=a.defineComponent({name:"Tree",props:Vg,emits:Eg,setup(e,t){const{flatData:i,schemaValues:s,onSelected:l,registerNextLoop:c}=Xg(e),{setNodeAttr:u,checkNodeIsOpen:g,getNodeAttr:h,getNodePath:p,isRootNode:m,isNodeOpened:C,isNodeChecked:b,isNodeMatched:y,hasChildNode:N}=Tr(i,e),{searchFn:k,isSearchActive:x,refSearch:D,openResultNode:L,isTreeUI:T,isSearchDisabled:z}=$g(e);z||a.watch([D],()=>{i.data.forEach(se=>{const Q=k(Ad(se,e),se);u(se,H.IS_MATCH,Q),L&&V(se,!0,!0)})});const A=se=>{if(x.value){const Q=()=>T?s.value.some(j=>j[H.PATH].startsWith(p(se))&&j[H.IS_MATCH]):!1;return h(se,H.IS_MATCH)||Q()}return!0},K=a.computed(()=>i.data.filter(se=>g(se)&&A(se))),{renderTreeNode:R,hanldeTreeNodeClick:F,setNodeOpened:O,setOpen:V,setNodeAction:U,setSelect:ue,asyncNodeClick:ee}=Ug(e,t,i,K,s,{registerNextLoop:c}),ge=(se,Q=!0)=>{U(Ta(se),H.IS_CHECKED,Q)};l(se=>{ue(se,!0,e.autoOpenParentNode)});const Me=()=>i;t.expose({hanldeTreeNodeClick:F,isNodeChecked:b,isRootNode:m,isNodeOpened:C,isNodeMatched:y,hasChildNode:N,setOpen:V,setChecked:ge,setNodeAction:U,setNodeOpened:O,setSelect:ue,asyncNodeClick:ee,getData:Me});const he=a.ref(),{renderEmpty:ce}=Rg(e,t);_g(e,he,i);const ie=se=>{if(se.length)return se.map(R);const Q=x.value?"search-empty":"empty";return ce(Q)};return()=>a.createVNode(yr,{class:rt("tree"),style:Zg(null,e),list:K.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:rt("container"),throttleDelay:0,ref:he},{default:se=>ie(se.data||[])})}});const Vd=Re(Kg),Rd=e=>e.__v_isVNode;var qg=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 i=0,s=null;for(;i<t;){if(Rd(e[i])){s=e[i];break}i=i+1}let l=t-1,c=null;for(;l>=0&&l>i;){if(Rd(e[l])){c=e[l];break}l=l-1}if(s&&c){s.props||(s.props={});let u="bk-compose-form-item-head";s.props.class&&(u+=` ${s.props.class}`),this.headBackgroundColor&&(s.props.style=Object.assign(s.props.style||{},{"background-color":this.headBackgroundColor})),s.props.class=u,c.props||(c.props={});let g="bk-compose-form-item-tail";c.props.class&&(g+=` ${c.props.class}`),this.tailBackgroundColor&&(c.props.style=Object.assign(c.props.style||{},{"background-color":this.tailBackgroundColor})),c.props.class=g}}return a.h("div",{class:"bk-compose-form-item"},e)}});const e5={formType:d.oneOf(["default","vertical"]).def("default"),labelWidth:d.oneOfType([Number,String]),labelPosition:d.oneOf(["left","center","right"]),model:d.object,rules:d.object};var t5=a.defineComponent({name:"Form",props:e5,emits:["submit"],setup(e,t){let i=[];const s=h=>{i.push(h)},l=h=>{i=i.reduce((p,m)=>(m!==h&&p.push(m),p),[])};return a.provide(Jc,{props:e,register:s,unregister:l}),{handleSubmit:h=>{h.preventDefault(),t.emit("submit")},validate:h=>{let p={};return h?p=(typeof h=="string"?[h]:h).reduce((C,b)=>ze(Z({},C),{[b]:!0}),{}):p=i.reduce((m,C)=>C.property?ze(Z({},m),{[C.property]:!0}):m,{}),Promise.all(i.reduce((m,C)=>(p[C.property]&&m.push(C.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:h=>{let p={};h?p=(typeof h=="string"?[h]:h).reduce((C,b)=>ze(Z({},C),{[b]:!0}),{}):p=i.reduce((m,C)=>ze(Z({},m),{[C.property]:!0}),{}),i.forEach(m=>p[m.property]&&m.clearValidate())}}},render(){var t,i;const e=Se({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(i=(t=this.$slots).default)==null?void 0:i.call(t)])}}),dn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const n5={label:d.string,labelWidth:d.oneOfType([Number,String]),labelPosition:d.oneOf(["left","center","right"]),property:d.string.def(""),required:d.bool.def(!1),email:d.bool.def(!1),max:d.number,min:d.number,maxlength:d.number,rules:d.array,autoCheck:d.bool.def(!1),description:d.string,errorDisplayType:d.oneOf(["tooltips","normal"]).def("normal")},i5=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a5=e=>{const t=[];return e.required&&t.push({validator:dn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:dn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:i=>dn.max(i,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:i=>dn.min(i,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:i=>dn.maxlength(i,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},r5=(e,t)=>{const i=e.reduce((s,l)=>{let c;if(l.required)c=dn.required;else if(l.email)c=dn.email;else if(Number(l.max)>-1)c=u=>dn.max(u,l.max);else if(Number(l.min)>-1)c=u=>dn.min(u,l.max);else if(Number(l.maxlength)>-1)c=u=>dn.min(u,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")c=u=>dn.pattern(u,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")c=l.validator;else return s;return s.push({validator:c,message:l.message,trigger:l.trigger}),s},[]);return[...t,...i]},s5=(e,t)=>t.reduce((i,s)=>!s.trigger||!e?(i.push(s),i):((Array.isArray(s.trigger)?s.trigger:[s.trigger]).includes(e)&&i.push(s),i),[]),Wd=e=>e!==void 0;var l5=a.defineComponent({name:"FormItem",directives:{bkTooltips:ml},props:n5,setup(e){const t=a.getCurrentInstance(),i=a.reactive({isError:!1,errorMessage:""}),s=df(),l=Boolean(s),c=a.computed(()=>{const h={width:"",paddingRight:"",textAlign:""},p=Wd(e.labelWidth)?e.labelWidth:l&&s.props.labelWidth;Wd(p)&&(h.width=`${p}px`,h.paddingRight=p?"":"0px");const m=e.labelPosition||l&&s.props.labelPosition;return m&&(h["text-align"]=m),h}),u=h=>{if(i.isError=!1,i.errorMessage="",!e.property||l&&!s.props.model)return Promise.resolve(!0);let p=[];l&&s.props.rules&&i5(s.props.rules,e.property)&&(p=s.props.rules[e.property]),e.rules&&(p=e.rules),p=s5(h,r5(p,a5(e)));const m=_n.exports.get(s.props.model,e.property),C=(()=>{let b=-1;return()=>{if(b=b+1,b>=p.length)return Promise.resolve(!0);const y=p[b];return Promise.resolve().then(()=>{const N=y.validator(m);return typeof N!="boolean"&&typeof N.then=="function"?N.then(()=>C,()=>(i.isError=!0,i.errorMessage=y.message,Promise.reject(y.message))):N?C():(i.isError=!0,i.errorMessage=y.message,Promise.reject(y.message))})}})();return C()},g=()=>{i.isError=!1,i.errorMessage=""};return a.provide(Pc,ze(Z({},e),{validate:u,clearValidate:g})),a.onMounted(()=>{l&&s.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&s.unregister(t.proxy)}),ze(Z({},a.toRefs(i)),{labelStyles:c,validate:u,clearValidate:g})},render(){var s,l;const e=Se({"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,i=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Rs,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},[a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t()]),a.createVNode("div",{class:"bk-form-content"},[(l=(s=this.$slots).default)==null?void 0:l.call(s),i()])])}});const Zd=Rt(t5,{FormItem:l5,ComposeFormItem:qg}),o5={span:d.number.def(1),offset:d.number.def(0),pull:d.number.def(0),push:d.number.def(0)};var c5=a.defineComponent({name:"Col",props:o5,emits:[],setup(e,t){const{col:i,gutter:s,flex:l}=a.inject("containerProps"),{span:c,offset:u,pull:g,push:h}=e,p=a.computed(()=>c||i);a.provide("containerProps",{col:p.value,gutter:s,flex:l});const m=function(b){return`${Number((b*100).toFixed(3))}%`},C=a.computed(()=>({width:m(p.value/i),"padding-right":`${s/2}px`,"padding-left":`${s/2}px`,"margin-left":u?m(u/i):null,right:g?m(g/i):null,left:h?m(h/i):null}));return()=>{var b,y;return a.createVNode("div",{class:"bk-grid-col",style:C.value},[(y=(b=t.slots).default)==null?void 0:y.call(b)])}}});const u5={col:d.number.def(24),gutter:d.number.def(20),margin:d.number.def(20),flex:d.bool.def(!1),extCls:d.string};var d5=a.defineComponent({name:"Container",props:u5,emits:[],setup(e,t){const{col:i,gutter:s,flex:l,extCls:c}=e;a.provide("containerProps",{col:i,gutter:s,flex:l});const u=a.computed(()=>c?`bk-grid-container ${c}`:"bk-grid-container"),g=a.computed(()=>{const{margin:h}=e;return{"padding-right":`${h}px`,"padding-left":`${h}px`}});return()=>{var h,p;return a.createVNode("div",{class:u.value,style:g.value},[(p=(h=t.slots).default)==null?void 0:p.call(h)])}}}),f5=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:i,gutter:s,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:i,gutter:s,flex:l});const c=a.computed(()=>ze(Z({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${s/2}px`,"margin-left":`-${s/2}px`}));return()=>{var u,g;return a.createVNode("div",{class:"bk-grid-row",style:c.value},[(g=(u=t.slots).default)==null?void 0:g.call(u)])}}});const xr=Rt(d5,{Row:f5,Col:c5});var h5=a.defineComponent({name:"Dropdown",props:{isShow:d.bool.def(!1),placement:d.commonType(["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],"placement").def("bottom"),trigger:d.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:d.bool.def(!1),extCls:d.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let i=Object.create(null);const s=a.ref(null),l=a.ref(null);a.onMounted(()=>{g()}),a.onBeforeUnmount(()=>{h()}),a.watch(()=>e.isShow,m=>{a.nextTick(()=>{e.trigger==="manual"&&i&&!e.disabled&&(m?i.show():i.hide())})}),a.watch(()=>e.disabled,m=>p(m));const c=()=>{t("show")},u=()=>{t("hide")},g=()=>{e.disabled||(i=new Ss(s.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:c,afterHidden:u}),e.trigger==="manual"&&e.isShow&&i.show())},h=()=>{if(i){const m=i;m.isShow&&m.hide(),m.destroy(),i=null,e.trigger==="manual"&&t("showChange",!1)}},p=m=>{const C=i;e.trigger==="manual"&&!m&&t("showChange",!1),C.updateDisabled(m)};return{reference:s,refContent:l}},render(){var t,i,s,l;const e=Se({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(i=(t=this.$slots).default)==null?void 0:i.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(s=this.$slots).content)==null?void 0:l.call(s)])])}}),g5=a.defineComponent({name:"DropdownItem",props:{extCls:d.string},emits:["click"],setup(e,{emit:t}){const i=l=>{l.stopPropagation(),t("click",l)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:i}},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)])}}),m5=a.defineComponent({name:"DropdownMenu",props:{extCls:d.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 Gd=Rt(h5,{DropdownMenu:m5,DropdownItem:g5});var Vl=a.defineComponent({name:"CascaderPanel",props:{store:d.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:i}=e,s=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),c=a.ref([]),u=y=>{y.config.multiple?c.value=i.getCheckedNodes().map(N=>N.path):c.value=y.path,t("input",c.value)},g=()=>{t("input",[])},h=y=>{var N;y.isDisabled||(s.list=s.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(N=y.children)!=null&&N.length&&(s.list.push(y.children),l.value.push(y)))};return{menus:s,activePath:l,nodeExpandHandler:h,isNodeInPath:y=>(l.value[y.level-1]||{}).id===y.id,nodeEvent:y=>{const{trigger:N,checkAnyLevel:k,multiple:x}=y.config;return{onClick:L=>{(!y.isLeaf||x)&&L.stopPropagation(),N==="click"&&h(y),k&&!x&&u(y),y.isLeaf&&!x&&u(y)},onMouseenter:()=>{N==="hover"&&h(y)}}},isCheckedNode:(y,N)=>{const{multiple:k}=y.config;return k?!1:Oc(N,y.path)},checkValue:c,nodeClear:g,checkNode:(y,N)=>{y.setNodeCheck(N),u(y)}}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(ba,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":i=>t.checked=i,onChange:i=>this.checkNode(t,i)},null),a.createVNode("span",{class:"content"},[t.name]),t.isLeaf?"":a.createVNode(Pn,{class:"icon-angle-right"},null)]))]))])}});class Rl{constructor(t,i,s){this.data=t,this.config=i,this.parent=s||null,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){var c;const{idKey:t,nameKey:i,childrenKey:s}=this.config;this.id=this.data[t],this.name=this.data[i],this.loading=!1,this.checked=!1;const l=this.data[s];this.children=(l||[]).map(u=>new Rl(u,this.config,this)),this.hasChildren=((c=this.children)==null?void 0:c.length)!==0,this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(u=>u.id),this.pathNames=this.pathNodes.map(u=>u.name)}get isLeaf(){return!this.hasChildren}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:i}=this;for(;i;)t.unshift(i),i=i.parent;return t}}const Yd=(e,t)=>e.reduce((i,s)=>(s.isLeaf?i.push(s):(!t&&i.push(s),i=i.concat(Yd(s.children,t))),i),[]);class p5{constructor(t){const{list:i}=t;this.data=i,this.config=hf(t,["list"]),this.nodes=this.data.map(s=>new Rl(s,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return Yd(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var s;return(s=this.getFlattedNodes().filter(l=>Oc(l.path,t))[0])!=null?s:null}}var M5=a.defineComponent({name:"Cascader",directives:{clickoutside:Cr},components:{CascaderPanel:Vl,BkPopover:vn},props:{modelValue:d.array.def([]),list:d.array.def([]),placeholder:d.string.def("\u8BF7\u9009\u62E9"),filterable:d.bool.def(!1),multiple:d.bool.def(!1),disabled:d.bool.def(!1),clearable:d.bool.def(!0),trigger:d.string.def("click"),checkAnyLevel:d.bool.def(!1),isRemote:d.bool.def(!1),remoteMethod:d.func,showCompleteName:d.bool.def(!1),idKey:d.string.def("id"),nameKey:d.string.def("name"),childrenKey:d.string.def("children"),separator:d.string.def("/"),limitOneLine:d.bool.def(!1),extCls:d.string.def("")},emits:["update:modelValue"],setup(e,{emit:t}){const{separator:i,multiple:s}=e,{isHover:l,setHover:c,cancelHover:u}=ou(),g=a.reactive(new p5(e)),h=a.ref(!1),p=a.ref(""),m=a.ref([]),C=x=>{if(t("update:modelValue",x),s){m.value=g.getCheckedNodes().map(L=>({text:L.pathNames.join(i),key:L.id}));return}if(x.length===0){p.value="";return}const D=g.getNodeByValue(x);p.value=D.pathNames.join(i)};return{store:g,updateValue:C,hidePopover:()=>{h.value=!1},inputClickHandler:x=>{x.stopPropagation(),h.value=!h.value},selectedText:p,panelShow:h,handleClear:x=>{x.stopPropagation(),C([])},isHover:l,setHover:c,cancelHover:u,selectedTags:m,removeTag:(x,D,L)=>{L.stopPropagation();const T=JSON.parse(JSON.stringify(x));T.splice(D,1),C(T)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Qn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Ca,{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((i,s)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[i.text]),a.createVNode(wn,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,s,l)},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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(vn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":i=>this.panelShow=i,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(Vl,{store:this.store,onInput:i=>this.updateValue(i)},null)])})])}});const Bd=Rt(M5,{CascaderPanel:Vl});var Hd=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const i=a.ref(!1),s=a.ref(!1),l=a.ref(0),c=a.ref(0),u=a.ref(0),g=a.ref(null),h=a.ref(e.modelValue),p=a.ref(0),m=a.ref(0),C=a.ref(!1),b=a.ref(null),y=a.computed(()=>{var O,V;let R="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const U=e.params.customContent[e.modelValue];R=U.tip||U.label||""}const F=e.params.vertical?"right":"top";return(V=e.params)!=null&&V.showTip?{content:e.params.formatterTipLabel(`${R||(e==null?void 0:e.modelValue)||"0"}`),placement:F}:{content:"",placement:F}}),N=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:N.value}:{left:N.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),D=R=>{e.params.disable||(R.preventDefault(),L(R),xa(window,"mousemove",T),xa(window,"touchmove",T),xa(window,"mouseup",z),xa(window,"touchend",z))},L=R=>{i.value=!0,s.value=!0,e.params.vertical?l.value=R.clientY:c.value=R.clientX,u.value=parseFloat(N.value),g.value=u.value},T=R=>{if(i.value){s.value=!1,t("resetSize");let F=0;e.params.vertical?(p.value=R.clientY,F=(l.value-p.value)/e.params.sliderSize*100):(m.value=R.clientX,F=(m.value-c.value)/e.params.sliderSize*100),g.value=u.value+F,A(g.value)}},z=()=>{C.value=!1,i.value&&(setTimeout(()=>{i.value=!1,s.value||(A(g.value),t("emitChange"))},0),Sr(window,"mousemove",T),Sr(window,"touchmove",T),Sr(window,"mouseup",z),Sr(window,"touchend",z))},A=R=>{if(R===null||isNaN(R))return;R<0?g.value=0:R>100&&(g.value=100);const F=100/((e.params.maxValue-e.params.minValue)/e.params.step);let V=Math.round(R/F)*F*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;V=parseFloat(V.toFixed(e.params.precision)),t("update:modelValue",V),!i.value&&e.modelValue!==h.value&&(h.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:i.value}],ref:b,tabindex:"0",style:k.value,onClick:R=>R.stopPropagation(),onMousedown:D},[Boolean(y.value.content)?a.createVNode(vn,{content:y.value.content,theme:"dark",placement:y.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"]},[x.value]):void 0]),setPosition:A,tip:y}},render(){return this.renderDom()}});const xa=(e,t,i)=>{e&&t&&i&&e.addEventListener(t,i,!1)},Sr=(e,t,i)=>{e&&t&&i&&e.removeEventListener(t,i,!1)};var C5=a.defineComponent({name:"Slider",props:{modelValue:d.oneOfType([d.array,d.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:i}){const s=a.ref(1),l=a.ref(null),c=a.ref(null),u=a.ref(null),g=a.ref(0),h=a.ref(0),p=a.ref(null),m=a.ref(null),C=a.ref(null),b=a.ref(null),y=a.computed(()=>{const Q=[e.minValue,e.maxValue,e.step].map(j=>{const E=`${j}`.split(".")[1];return E?E.length:0});return Math.max.apply(null,Q)}),N=a.computed(()=>Math.min(l.value,c.value)),k=a.computed(()=>Math.max(l.value,c.value)),x=a.computed(()=>e.range?`${100*(k.value-N.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),D=a.computed(()=>e.range?`${100*(N.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),L=a.computed(()=>e.vertical?{height:x.value,bottom:D.value}:{width:x.value,left:D.value}),T=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=(e.maxValue-e.minValue)/e.step,j=100*e.step/(e.maxValue-e.minValue),E=[];for(let G=1;G<Q;G++)E.push(G*j);return e.range?E.filter(G=>G<100*(N.value-e.minValue)/(e.maxValue-e.minValue)||G>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):E.filter(G=>G>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),z=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),A=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=100*e.step/(e.maxValue-e.minValue),j=[];for(let E=e.minValue,G=0;E<=e.maxValue;E+=e.step,G++){const q={stepWidth:G*Q,stepLabel:e.formatterLabel(E)};j.push(q)}return j}),K=a.computed(()=>Array.isArray(e.modelValue)),R=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Q,j)=>Number(Q)-Number(j)).filter(Q=>Number(Q)>=e.minValue&&Number(Q)<=e.maxValue).map(Q=>{const{tip:j}=e.customContent[Q],{label:E}=e.customContent[Q];return{tip:j||E||"",label:E||"",percent:(Number(Q)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),F=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:s.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ue()}),a.watch(()=>l.value,Q=>{e.range?i("update:modelValue",[N.value,k.value]):i("update:modelValue",Q),g.value=Q}),a.watch(()=>c.value,Q=>{i("update:modelValue",[N.value,k.value]),h.value=Q}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),c.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,c.value=e.maxValue),u.value=[l.value,c.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=l.value),O(),xa(window,"resize",O())});const O=()=>{p.value&&(s.value=p.value[`client${e.vertical?"Height":"Width"}`])},V=Q=>{var j,E;if(Q.stopPropagation(),!e.disable){if(O(),e.vertical){const G=(j=p.value)==null?void 0:j.getBoundingClientRect().bottom;Me((G-Q.clientY)/s.value*100)}else{const G=(E=p.value)==null?void 0:E.getBoundingClientRect().left;Me((Q.clientX-G)/s.value*100)}ee()}},U=()=>e.range?![N.value,k.value].every((Q,j)=>Q===u.value[j]):e.modelValue!==u.value,ue=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Q=e.modelValue;e.range&&Array.isArray(Q)?Q[1]<e.minValue?i("update:modelValue",[e.minValue,e.minValue]):Q[0]>e.maxValue?i("update:modelValue",[e.maxValue,e.maxValue]):Q[0]<e.minValue?i("update:modelValue",[e.minValue,Q[1]]):Q[1]>e.maxValue?i("update:modelValue",[Q[0],e.maxValue]):(l.value=Number(Q[0]),c.value=Number(Q[1]),U()&&(u.value=Q.slice())):!e.range&&typeof Q=="number"&&!isNaN(Q)&&(Q<e.minValue?i("update:modelValue",e.minValue):Q>e.maxValue?i("update:modelValue",e.maxValue):(l.value=Q,U()&&(u.value=Q)))},ee=async()=>{await a.nextTick(),i("change",e.range?[N.value,k.value]:e.modelValue)},ge=Q=>e.vertical?{bottom:`${Q}%`}:{left:`${Q}%`},Me=Q=>{if(!e.range){m.value.setPosition(Q);return}const j=e.minValue+Q*(e.maxValue-e.minValue)/100;Math.abs(N.value-j)<Math.abs(k.value-j)?b.value=l.value<c.value?m.value:C.value:b.value=l.value>c.value?m.value:C.value,b.value.setPosition(Q)},he=Q=>{if(Q==="")return;const j=parseFloat(Q);j<e.minValue?(g.value=e.minValue,l.value=e.minValue):j>e.maxValue?(g.value=e.maxValue,l.value=e.maxValue):l.value=j},ce=Q=>{if(Q===""||typeof Q=="number")return;const j=parseFloat(Q);j<e.minValue?(h.value=e.minValue,c.value=e.minValue):j>e.maxValue?(h.value=e.maxValue,c.value=e.maxValue):c.value=j},ie=Q=>{let j=0;return Q==="start"?j=e.vertical?e.maxValue:e.minValue:j=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,c.value].includes(j)?"0":"1"};return{renderDom:()=>{var Q,j;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Q=t.start)==null?void 0:Q.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:p,style:z.value,onClick:V},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:L.value},null),e.showInterval?T.value.map((E,G)=>a.createVNode("div",{key:G,class:["bk-slider-interval",{vertical:e.vertical}],style:ge(E)},null)):void 0,e.customContent?R.value.map((E,G)=>a.createVNode("div",{key:G,class:["bk-slider-interval",{vertical:e.vertical}],style:ge(E.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:ie("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ie("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return A.value.map((E,G)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:G,style:ge(E.stepWidth)},[E.stepLabel]));if(e.customContent)return R.value.map((E,G)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:G,style:ge(E.percent)},[E.label]))}()]):void 0,a.createVNode(Hd,{modelValue:l.value,"onUpdate:modelValue":E=>l.value=E,ref:m,params:F.value,onEmitChange:ee,onResetSize:O},null),e.range?a.createVNode(Hd,{modelValue:c.value,"onUpdate:modelValue":E=>c.value=E,ref:C,params:F.value,onEmitChange:ee,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Mi,{type:"number",modelValue:g.value,max:e.maxValue,min:e.minValue,onChange:he},null)]),K.value&&c.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Mi,{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:ce},null)])]:void 0]):void 0,(j=t.end)==null?void 0:j.call(t)])}}},render(){return this.renderDom()}});const Fd=Re(C5);var y5=a.defineComponent({name:"ResizeLayout",props:{placement:d.placement().def("left"),min:d.number.def(3),max:d.number.def(1/0),triggerWidth:d.number.def(5),triggerOffset:d.number.def(3),initialDivide:d.oneOfType([String,Number]).def("20%"),immediate:d.bool,disabled:d.bool,collapsible:d.bool,autoMinimize:d.oneOfType([Boolean,Number]).def(!1),border:d.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:i,initialDivide:s,triggerOffset:l,triggerWidth:c,max:u,min:g,immediate:h,autoMinimize:p}=a.toRefs(e),m=a.ref(!1),C=a.ref(!0),b=a.ref(!1),y=a.ref(null),N=a.ref({}),k=a.ref(null),x=a.ref(null),D=a.ref(null),L=a.ref(null),T=a.computed(()=>["left","right"].includes(i.value)),z=a.computed(()=>T.value?"width":"height"),A=a.computed(()=>{let ie=s.value;return typeof ie=="number"&&(ie=`${ie}px`),{[z.value]:ie}}),K=a.computed(()=>({[`margin-${i.value}`]:`${l.value-c.value}px`,[z.value]:`${c.value}px`})),R=a.computed(()=>p.value?typeof p.value=="boolean"?50:p.value:0),F=()=>{const ie=k.value.getBoundingClientRect();y.value=T.value?ie.width:ie.height},O=new ResizeObserver(F),V=()=>{switch(x.value.style.visibility="visible",i.value){case"left":x.value.style.inset=`0 auto auto ${N.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${N.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${N.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${N.value.aside.height}px 0`;break}},U=()=>{D.value.style.display="block",D.value.style.cursor=T.value?"col-resize":"row-resize"},ue=ie=>Math.min(u.value,Math.max(g.value,ie),y.value-c.value),ee=ie=>{t("before-resize",ie);const se=L.value.getBoundingClientRect();N.value=Object.freeze({mouse:{clientX:ie.clientX,clientY:ie.clientY},aside:{width:se.width,height:se.height}}),U(),h.value||V(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=G=>{t("resizing",G)},j=G=>{let q;switch(i.value){case"top":q=G.clientY-N.value.mouse.clientY;break;case"right":q=N.value.mouse.clientX-G.clientX;break;case"bottom":q=N.value.mouse.clientY-G.clientY;break;case"left":q=G.clientX-N.value.mouse.clientX}const ae=N.value.aside[z.value]+q,be=ue(ae)+l.value,Y=`${be}px`;h.value?L.value.style[z.value]=Y:x.value.style[i.value]=Y,Q(be)},E=()=>{if(x.value.style.visibility="hidden",D.value.style.display="none",document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",E),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ge(),t("after-resize",parseFloat(x.value.style[i.value]))}),h.value)return!1;L.value.style[z.value]=x.value.style[i.value]};document.addEventListener("mousemove",j),document.addEventListener("mouseup",E)},ge=()=>{if(!p.value)return!1;const ie=L.value.getBoundingClientRect();if(b.value=m.value=ie[z.value]<=R.value,!b.value)return C.value=!0,!1;he(),a.nextTick(()=>{L.value.setAttribute(`data-${z.value}`,A.value[z.value])})},Me=ie=>{m.value=typeof ie=="boolean"?ie:!m.value,he(),t("collapse-change",m.value)},he=()=>{const ie=L.value.getBoundingClientRect();ce(!m.value),m.value?(L.value.setAttribute(`data-${z.value}`,`${ie[z.value]}px`),L.value.style[z.value]="5px"):(C.value=!0,L.value.style[z.value]=L.value.getAttribute(`data-${z.value}`))},ce=ie=>{const se=()=>{C.value=ie,L.value.style.transition="",L.value.removeEventListener("transitionend",se)};L.value.addEventListener("transitionend",se),L.value.style.transition=`${z.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:C,minimized:b,limitMax:y,state:N,vertical:T,cssPropKey:z,bkResizeLayoutRef:k,resizeProxyRef:x,resizeMaskRef:D,asideRef:L,triggerStyle:K,asideStyle:A,handleMousedown:ee,setCollapse:Me}},render(){var t,i,s,l,c,u;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"},[(i=(t=this.$slots).aside)==null?void 0:i.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&&(((l=(s=this.$slots)["collapse-trigger"])==null?void 0:l.call(s))||a.createVNode(mi,{class:"bk-resize-collapse",onClick:this.setCollapse},null))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(c=this.$slots).main)==null?void 0:u.call(c)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const Ud=Re(y5),I5={list:d.array.def([]),titleAble:d.bool.def(!1),extCls:d.string};var b5=a.defineComponent({name:"Timeline",props:I5,emits:["select"],setup(e,{emit:t}){const i=a.ref([]),s=u=>{const g=[];u.forEach(h=>{var p;g.push({tag:h.tag,content:h.content,type:h.type,size:h.size,color:h.color,icon:h.icon,filled:h.filled,border:(p=h.border)!=null?p:!0})}),i.value.splice(0,i.value.length,...g)},l=()=>{var u;i.value.splice(0,i.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(u=e.list)!=null&&u.length&&s(e.list)},c=u=>{try{t("select",u)}catch(g){console.warn(g)}};return a.onMounted(l),a.watch(()=>e.list,()=>{s(e.list)},{deep:!0}),{defaultTimelines:i,titleSelect:c}},render(){const e=i=>{const{icon:s}=i;return s?Object.prototype.toString.call(s)==="[object Object]":!1},t=i=>{const s="bk-timeline",l=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,u=i.size?`${s}-${i.size}`:"",g=i.filled?`${s}-filled`:"",h=i.color&&l.includes(i.color)?`${s}-${i.color}`:"";return Se({},`${s} ${c} ${u} ${h} ${g}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,l,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{borderWidth:i.border?"2px":"0px"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(l=(s=this.$slots).default)==null?void 0:l.call(s))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null):""])])})])}});const _d=Re(b5),N5={list:d.array.def([]),controllable:d.bool.def(!1),showSteps:d.bool.def(!1),curProcess:d.number.def(0),displayKey:d.string.def("content"),extCls:d.string};var w5=a.defineComponent({name:"BKProcess",props:N5,emits:["update:curProcess","click"],setup(e,{emit:t}){const i=a.ref([]),s=a.ref(0),l=()=>{var u;i.value.splice(0,i.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),console.log("props.list",e.list),(u=e.list)!=null&&u.length&&i.value.splice(0,i.value.length,...e.list)},c=async u=>{console.log(u);try{e.controllable&&u!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",u),console.log(e.curProcess),t("click",u))}catch(g){console.warn(g)}};return a.onMounted(l),{defaultProcessList:i,paddingBottom:s,jumpTo:c}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),i=g=>g.status==="loading",s=g=>g.status==="error",l=g=>this.curProcess>=g+1||this.defaultProcessList[g].status==="done",c=g=>g.icon?g.icon:"",u=(g,h)=>g===this.curProcess-1&&i(h)?a.createVNode(tr,{class:"bk-icon bk-process-icon icon-loading"},null):s(h)?a.createVNode(wn,{class:"bk-process-icon"},null):l(g)?a.createVNode(ir,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[c(h)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((g,h)=>a.createVNode("li",{onClick:()=>{this.jumpTo(h+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=h+1,current:i(g)&&h===this.curProcess-1}},[g[this.displayKey],u(h,g)]))])])}});const $d=Re(w5);var Wl=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ec,AnimateNumber:Vc,Affix:Rc,Backtop:Wc,Badge:Zc,Breadcrumb:Gc,Button:Wt,Card:Bc,Checkbox:ba,Collapse:_c,Dialog:$c,Exception:dr,FixedNavbar:Xc,Input:Mi,Link:Kc,Loading:$n,Modal:Ci,Popover:vn,Progress:eu,Radio:au,Rate:ru,Swiper:su,Select:Ml,Sideslider:wu,Steps:vu,Switcher:ku,Table:Yu,Tag:pl,TagInput:Fu,Divider:Uu,Tab:$u,Message:qu,Notify:ed,Menu:rd,Navigation:ld,DatePicker:zd,Transfer:Jd,Tree:Vd,VirtualRender:yr,Form:Zd,Pagination:yl,Container:xr,containerProps:xr,Dropdown:Gd,Cascader:Bd,Slider:Fd,ResizeLayout:Ud,TimeLine:_d,Process:$d},Symbol.toStringTag,{value:"Module"}));const Xd=(e="Bk")=>t=>{const i=t.config.globalProperties.bkUIPrefix||e;Object.keys(Wl).forEach(s=>{const l=Wl[s];"install"in l?t.use(l,{prefix:i}):t.component(i+s,Wl[s])})};var L5={createInstall:Xd,install:Xd(),version:"0.0.1"};le.Affix=Rc,le.Alert=Ec,le.AnimateNumber=Vc,le.Backtop=Wc,le.Badge=Zc,le.Breadcrumb=Gc,le.Button=Wt,le.Card=Bc,le.Cascader=Bd,le.Checkbox=ba,le.Collapse=_c,le.Container=xr,le.DatePicker=zd,le.Dialog=$c,le.Divider=Uu,le.Dropdown=Gd,le.Exception=dr,le.FixedNavbar=Xc,le.Form=Zd,le.Input=Mi,le.Link=Kc,le.Loading=$n,le.Menu=rd,le.Message=qu,le.Modal=Ci,le.Navigation=ld,le.Notify=ed,le.Pagination=yl,le.Popover=vn,le.Process=$d,le.Progress=eu,le.Radio=au,le.Rate=ru,le.ResizeLayout=Ud,le.Select=Ml,le.Sideslider=wu,le.Slider=Fd,le.Steps=vu,le.Swiper=su,le.Switcher=ku,le.Tab=$u,le.Table=Yu,le.Tag=pl,le.TagInput=Fu,le.TimeLine=_d,le.Transfer=Jd,le.Tree=Vd,le.VirtualRender=yr,le.bkTooltips=ml,le.clickoutside=Cr,le.containerProps=xr,le.default=L5,le.mousewheel=h1,Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
57
+ */function r1(e,t){if(!mu.canUseDOM||t&&!("addEventListener"in document))return!1;var i="on"+e,s=i in document;if(!s){var l=document.createElement("div");l.setAttribute(i,"return;"),s=typeof l[i]=="function"}return!s&&pu&&e==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var s1=r1,l1=n1,o1=s1,Mu=10,Cu=40,yu=800;function Iu(e){var t=0,i=0,s=0,l=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=t*Mu,l=i*Mu,"deltaY"in e&&(l=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||l)&&e.deltaMode&&(e.deltaMode==1?(s*=Cu,l*=Cu):(s*=yu,l*=yu)),s&&!t&&(t=s<1?-1:1),l&&!i&&(i=l<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:l}}Iu.getEventType=function(){return l1.firefox()?"DOMMouseScroll":o1("wheel")?"wheel":"mousewheel"};var c1=Iu,u1=c1;const d1=typeof navigator!="undefined"&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1,f1=function(e,t){e!=null&&e.addEventListener&&e.addEventListener(d1?"DOMMouseScroll":"mousewheel",function(i){const s=u1(i);t==null||t.apply(this,[i,s])})},h1={beforeMount(e,t){console.error(e,t),f1(e,t.value)}},g1=e=>typeof Element=="undefined"?!1:e instanceof Element,Kn=new Map;let bu;document.addEventListener("mousedown",e=>bu=e),document.addEventListener("mouseup",e=>{for(const t of Kn.values())for(const{documentHandler:i}of t)i(e,bu)});function Nu(e,t){let i=[];return Array.isArray(t.arg)?i=t.arg:g1(t.arg)&&i.push(t.arg),function(s,l){const{popperRef:c}=t.instance,u=s.target,g=l==null?void 0:l.target,h=!t||!t.instance,p=!u||!g,m=e.contains(u)||e.contains(g),C=e===u,b=i.length&&i.some(N=>N==null?void 0:N.contains(u))||i.length&&i.includes(g),y=c&&(c.contains(u)||c.contains(g));h||p||m||C||b||y||t.value(s,l)}}const Cr={beforeMount(e,t){Kn.has(e)||Kn.set(e,[]),Kn.get(e).push({documentHandler:Nu(e,t),bindingFn:t.value})},updated(e,t){Kn.has(e)||Kn.set(e,[]);const i=Kn.get(e),s=i.findIndex(c=>c.bindingFn===t.oldValue),l={documentHandler:Nu(e,t),bindingFn:t.value};s>=0?i.splice(s,1,l):i.push(l)},unmounted(e){Kn.delete(e)}};var i7="";const ml={mounted(e,t){const i=m1();typeof t.value=="object"?Object.assign(i,t.value):i.content=t.value;const{disabled:s,arrow:l,theme:c}=i;if(s)return;const u=p1(i.content,l,c==="light");C1(e,u,i)}};function m1(){return{arrow:!0,disabled:!1,trigger:"hover",theme:"dark",content:"",showOnInit:!1,placement:"top",distance:8,onShow:()=>{},onHide:()=>{}}}function p1(e,t,i){const s=yn.getPopperIndex(),l=document.createElement("div");if(l.className=`bk-popper ${i?"light":"dark"}`,l.innerText=e,l.style.zIndex=String(s),t){const c=M1();l.appendChild(c)}return document.body.appendChild(l),l}function M1(){const e=document.createElement("div");return e.className="bk-popper-arrow",e.setAttribute("data-popper-arrow",""),e}function C1(e,t,i){const{placement:s,distance:l,trigger:c,showOnInit:u,onShow:g,onHide:h}=i,p=bc(e,t,{placement:s,modifiers:[{name:"offset",options:{offset:[0,l]}}]});if(c==="hover"){const b=["mouseenter","focus"],y=["mouseleave","blur"];b.forEach(N=>{e.addEventListener(N,m)}),y.forEach(N=>{e.addEventListener(N,C)})}else c==="click"&&document.body.addEventListener("click",b=>{e.contains(b.target)&&!t.hasAttribute("data-show")?m():t.hasAttribute("data-show")&&C()});u&&m();function m(){t.setAttribute("data-show",""),g(),p.setOptions(b=>ze(Z({},b),{modifiers:[...b.modifiers,{name:"eventListeners",enabled:!0}]})),p.update()}function C(){t.removeAttribute("data-show"),h(),p.setOptions(b=>ze(Z({},b),{modifiers:[...b.modifiers,{name:"eventListeners",enabled:!1}]}))}}var y1=a.defineComponent({name:"Tag",props:{theme:d.theme(["success","info","warning","danger"]).def(""),closable:d.bool.def(!1),type:d.commonType(["","filled","stroke"]).def(""),checkable:d.bool.def(!1),checked:d.bool.def(!1),radius:d.string.def("2px"),extCls:d.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const i=a.computed(()=>Se({"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")),s=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:i,wrapperStyle:s,handleClose:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.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(wn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const pl=Re(y1);var I1=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:d.theme(["success","info","warning","danger"]).def(""),placeholder:d.string.def(""),filterable:d.bool.def(!1),allowCreate:d.bool.def(!1),modelValue:d.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const{modelValue:i}=a.toRefs(e),s=a.ref(i.value),l=a.ref();return a.watch(i,()=>{s.value=i.value}),{value:s,inputRef:l,handleRemoveTag:m=>{t("remove",m)},handleFocus:()=>{t("focus")},focus:()=>{var m;(m=l.value)==null||m.focus()},handleInput:m=>{t("update:modelValue",m.target.value)},handleKeydown:m=>{switch(m.code){case"Enter":{t("enter",m.target.value,m);break}}}}},render(){var e,t,i,s;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>a.createVNode(pl,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l)},{default:()=>[l.label]})),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(s=(i=this.$slots)==null?void 0:i.suffix)==null?void 0:s.call(i)])}}),b1=a.defineComponent({name:"Select",directives:{clickoutside:Cr},props:{modelValue:d.any,multiple:d.bool.def(!1),disabled:d.bool.def(!1),size:d.size().def("default"),clearable:d.bool.def(!0),loading:d.bool.def(!1),filterable:d.bool.def(!1),remoteMethod:d.func,scrollHeight:d.number.def(216),showSelectAll:d.bool.def(!1),popoverMinWidth:d.number.def(0),showOnInit:d.bool.def(!1),multipleMode:d.oneOf(["default","tag"]).def("default"),tagTheme:d.theme(["success","info","warning","danger"]).def(""),behavior:d.oneOf(["normal","simplicity"]).def("normal"),collapseTags:d.bool.def(!1),noDataText:d.string.def("\u65E0\u6570\u636E"),noMatchText:d.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:d.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:d.string.def("\u8BF7\u9009\u62E9"),selectAllText:d.string.def("\u5168\u90E8"),scrollLoading:d.bool.def(!1),allowCreate:d.bool.def(!1),popoverOptions:d.object.def({})},emits:["update:modelValue","change","toggle","clear","scroll-end"],setup(e,{emit:t}){const{modelValue:i,disabled:s,filterable:l,multiple:c,remoteMethod:u,loading:g,loadingText:h,noDataText:p,noMatchText:m,popoverMinWidth:C,showOnInit:b,multipleMode:y,allowCreate:N}=a.toRefs(e),k=Un(),x=a.ref(),D=a.ref(),L=a.ref(),T=a.ref([]),z=a.ref([]),A=a.ref([]),K=a.ref(),R=a.computed(()=>{const fe=new Map;return T.value.forEach(Le=>{fe.set(Le.value,Le)}),fe});a.watch(i,()=>{var fe;Qt(),y.value==="tag"&&((fe=D.value)==null||fe.update())});const F=a.computed(()=>s.value||g.value),O=a.computed(()=>A.value.map(fe=>fe.label)),V=a.computed(()=>{const fe=T.value.reduce((Le,Ve)=>(Ve.disabled||Le.push(Ve.value),Le),[]);return fe.length<=A.value.length&&fe.every(Le=>A.value.some(Ve=>Ve.value===Le))}),U=a.computed(()=>!!z.value.length),ue=a.computed(()=>!T.value.length),ee=a.computed(()=>T.value.length&&T.value.every(fe=>!fe.visible)),ge=a.computed(()=>l.value&&typeof u.value=="function"),Me=a.computed(()=>!(te.value||ue.value||ee.value)),he=a.computed(()=>te.value?h.value:ue.value?p.value:ee.value?m.value:""),{register:ce,unregister:ie}=sl(T),{register:se,unregister:Q}=sl(z),{isHover:j,setHover:E,cancelHover:G}=ou(),{isFocus:q,handleFocus:ae,handleBlur:be}=X4(),{popperWidth:Y,isPopoverShow:re,onPopoverFirstUpdate:ve,hidePopover:ot,showPopover:Fe,togglePopover:Tt}=q4({popoverMinWidth:C.value}),pt=a.computed(()=>(l.value||N.value)&&re.value);a.watch(re,fe=>{fe?(it(),et()):$.value=""});const et=()=>{var Ve,ht;const fe=(Ve=A.value[0])==null?void 0:Ve.value,Le=R.value.get(fe);Le&&!Le.disabled&&Le.visible?K.value=fe:K.value=(ht=T.value.find(hn=>!hn.disabled&&hn.visible))==null?void 0:ht.value},bt=fe=>{!l.value||T.value.forEach(Le=>{var Ve;Le.visible=(Ve=hr(String(Le.label)))==null?void 0:Ve.includes(hr(fe))})},{searchKey:$,searchLoading:te}=e1(ge.value?u.value:bt,et),oe=fe=>{var Le;fe!==i.value&&(t("change",fe),t("update:modelValue",fe),(Le=k==null?void 0:k.validate)==null||Le.call(k,"change"))},Ne=()=>{F.value||(Tt(),t("toggle",re.value))},we=fe=>{!l.value||($.value=fe)},xe=(fe,Le)=>{!N.value||!fe||l.value&&T.value.find(ht=>hr(String(ht.label))===hr(fe))||R.value.get(fe)||(Le.stopPropagation(),c.value?(A.value.push({label:fe,value:fe}),oe(A.value.map(ht=>ht.value))):(A.value=[{label:fe,value:fe}],oe(fe),ot()),$.value="")},We=fe=>{if(!(F.value||!fe)){if(c.value){const Le=A.value.findIndex(Ve=>Ve.value===fe.value);Le>-1?A.value.splice(Le,1):A.value.push({label:fe.label,value:fe.value}),oe(A.value.map(Ve=>Ve.value))}else A.value=[{label:fe.label,value:fe.value}],oe(fe.value),ot();it()}},it=()=>{var fe,Le;y.value==="tag"?(fe=L.value)==null||fe.focus():(Le=x.value)==null||Le.focus()},xt=fe=>{fe.stopPropagation(),A.value=[],oe(c.value?[]:""),t("clear",c.value?[]:""),ot()},Xe=()=>{V.value?A.value=[]:T.value.forEach(fe=>{fe.disabled||A.value.find(Le=>Le.value===fe.value)||A.value.push({label:fe.label,value:fe.value})}),oe(A.value.map(fe=>fe.value)),it()},fn=fe=>{const{scrollTop:Le,clientHeight:Ve,scrollHeight:ht}=fe.target;Le+Ve===ht&&t("scroll-end")},Ue=fe=>{const Le=A.value.findIndex(Ve=>Ve.value===fe.value);Le>-1&&(A.value.splice(Le,1),oe(A.value.map(Ve=>Ve.value)))},Ze=fe=>{var Le,Ve,ht;return((Ve=(Le=R.value)==null?void 0:Le.get(fe))==null?void 0:Ve.label)||((ht=A.value.find(hn=>hn.value===fe))==null?void 0:ht.label)||fe},Qt=()=>{Array.isArray(i.value)?A.value=i.value.map(fe=>({label:Ze(fe),value:fe})):i.value!==void 0&&(A.value=[{label:Ze(i.value),value:i.value}])},Mt=fe=>{var ht,hn;const Le=T.value.filter(Nt=>!Nt.disabled&&Nt.visible),Ve=Le.findIndex(Nt=>Nt.value===K.value);if(!(!Le.length||Ve===-1))switch(fe.code){case"ArrowDown":{fe.preventDefault();const Nt=Ve>=Le.length-1?0:Ve+1;K.value=(ht=Le[Nt])==null?void 0:ht.value;break}case"ArrowUp":{fe.preventDefault();const Nt=Ve===0?Le.length-1:Ve-1;K.value=(hn=Le[Nt])==null?void 0:hn.value;break}case"Backspace":{if(!c.value||!A.value.length||$.value.length)return;A.value.pop(),oe(A.value.map(Nt=>Nt.value));break}case"Enter":{if(!re.value)re.value=!0;else{const Nt=T.value.find(Zl=>Zl.value===K.value);We(Nt)}break}}},Sa=()=>{ot(),be()};return a.provide(rl,a.reactive({multiple:c,selected:A,activeOptionValue:K,register:ce,unregister:ie,registerGroup:se,unregisterGroup:Q,handleOptionSelected:We})),a.onMounted(()=>{Qt(),setTimeout(()=>{b.value&&Fe()})}),{selected:A,isInput:pt,options:T,isDisabled:F,selectedLabel:O,isPopoverShow:re,isHover:j,popperWidth:Y,popoverRef:D,inputRef:x,selectTagInputRef:L,searchLoading:te,isOptionsEmpty:ue,isSearchEmpty:ee,isFocus:q,isShowSelectContent:Me,curContentText:he,isGroup:U,searchKey:$,setHover:E,cancelHover:G,handleFocus:ae,handleTogglePopover:Ne,handleClear:xt,onPopoverFirstUpdate:ve,hidePopover:ot,showPopover:Fe,handleToggleAll:Xe,handleOptionSelected:We,handleClickOutside:Sa,handleScroll:fn,handleDeleteTag:Ue,handleInputChange:we,handleInputEnter:xe,handleKeydown:Mt}},render(){const e=Se({"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=Object.assign({theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow,modifiers:[{name:"offset",options:{offset:[0,4]}}],handleFirstUpdate:this.onPopoverFirstUpdate},this.popoverOptions),i=()=>this.loading?a.createVNode($n,{loading:!0,class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Qn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ca,{class:"angle-up"},null),s=()=>this.multipleMode==="tag"?a.createVNode(I1,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":u=>this.searchKey=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var u,g;return(g=(u=this.$slots).prefix)==null?void 0:g.call(u)},suffix:()=>i()}):a.createVNode(Mi,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var u,g;return(g=(u=this.$slots).prefix)==null?void 0:g.call(u)},suffix:()=>i()}),l=()=>a.createVNode("div",{class:"bk-select-trigger",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[s()]),c=()=>{var u,g;return a.createVNode("div",null,[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode($n,{class:"mr5",loading:!0,mode:"spin",size:"mini"},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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onClick:this.handleToggleAll},[this.selectAllText]),(g=(u=this.$slots).default)==null?void 0:g.call(u),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode($n,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),this.loadingText])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.withDirectives(a.createVNode("div",{class:e},[a.createVNode(vn,a.mergeProps({ref:"popoverRef"},t),{default:()=>l(),content:()=>c()})]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])}});const Ml=Rt(b1,{Option:cu,Group:t1});function N1(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:w1}=Ci,Cl=Object.assign({},w1);Cl.width.default="400",Cl.height.default="100%";var L1=a.defineComponent({name:"Sideslider",components:{BkModal:Ci,BkButton:Wt},props:ze(Z({},Cl),{title:{type:String,default:""},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:i}){const s=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(i("update:isShow",!1),i("closed"),setTimeout(()=>{i("animation-end")},250))},l=()=>{setTimeout(()=>{i("shown")},200)},c=()=>{setTimeout(()=>{i("hidden")},200)};return()=>{const u={header:()=>{var p,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{s()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(p=t.header)==null?void 0:p.call(t))!=null?m:e.title])])])},default:()=>{var p,m;return(m=(p=t.default)==null?void 0:p.call(t))!=null?m:"Content"},footer:()=>{var p,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(p=t.footer)==null?void 0:p.call(t))!=null?m:""])}},g=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,h=t.footer?"calc(100vh - 114px)":"calc(100vh - 60px)";return a.createVNode(Ci,a.mergeProps(e,{maxHeight:h,class:g,style:`${e.direction}: 0;`,onHidden:c,onShown:l,onClose:s}),N1(u)?u:{default:()=>[u]})}}});const wu=Re(L1),Lu={theme:d.theme().def("primary"),size:d.size(),curStep:d.number.def(1),controllable:d.bool.def(!1),direction:d.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:d.commonType(["","error","loading"],"status").def(""),lineType:d.commonType(["dashed","solid"],"lineType").def("dashed"),text:d.bool,extCls:d.string,steps:d.array.def([]),beforeChange:d.func};var v1=a.defineComponent({name:"Steps",props:Lu,emits:["update:curStep","click"],setup(e,{emit:t}){const i=a.ref([]),s=g=>{const h=[];g.forEach(p=>{var m;typeof p=="string"?h.push(p):h.push({title:p.title,icon:p.icon,description:p.description,status:p.status,border:(m=p.border)!=null?m:!0})}),i.value.splice(0,i.value.length,...h)},l=g=>{Lu.curStep=g},c=()=>{var g;i.value.splice(0,i.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(g=e.steps)!=null&&g.length&&s(e.steps)},u=async g=>{try{e.controllable&&g!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(h,p)=>{const m=await e.beforeChange(g);m?h(m):p(m)}),t("update:curStep",g),t("click",g))}catch(h){console.warn(h)}};return a.onMounted(c),a.watch(()=>e.steps,()=>{s(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{l(e.curStep)},{deep:!0}),{defaultSteps:i,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",i=this.size?`${e}-${this.size}`:"",s=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${i}`),l=C=>this.curStep>C+1||this.defaultSteps[C].status==="done",c=C=>this.curStep===C+1,u=C=>{const{icon:b}=C;return b?Object.prototype.toString.call(b)==="[object Object]":typeof C=="string"},g=(C,b)=>(b.icon||(b.icon=C),!isNaN(b.icon)),h=C=>C.status==="loading",p=C=>C.status==="error",m=(C,b)=>c(C)&&this.status==="loading"||h(b)?a.createVNode(tr,{class:"bk-icon bk-steps-icon icon-loading"},null):c(C)&&this.status==="error"||p(b)?a.createVNode(wn,{class:"bk-steps-icon"},null):l(C)?a.createVNode(ir,{class:"bk-steps-icon"},null):a.createVNode("span",null,[g(C,b)?C+1:a.createVNode(b.icon,null,null)]);return a.createVNode("div",{class:s},[this.defaultSteps.map((C,b)=>{var y,N,k;return a.createVNode("div",{class:["bk-step",C.title?"":"bk-step-no-content",l(b)?"done":"",c(b)?"current":"",c(b)&&this.status==="error"?"isError":"",C.status&&c(b)?[`bk-step-${C.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(C)?"icon":"number"}`,`bk-step-icon${C.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(b+1)}},[(k=(N=(y=this.$slots)[b+1])==null?void 0:N.call(y))!=null?k:m(b,C)]),C.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(b+1)}},[C.title]),C.description&&a.createVNode("div",{class:"bk-step-description",title:C.description},[C.description])]):""])})])}});const vu=Re(v1);var k1=a.defineComponent({name:"Switcher",props:{theme:d.theme().def(""),size:d.size(),disabled:d.bool,showText:d.bool,isOutline:d.bool,onText:d.string.def("ON"),offText:d.string.def("OFF"),isSquare:d.bool,extCls:d.string,beforeChange:d.func.def(void 0),trueValue:d.oneOfType([d.string,d.number,d.bool]).def(!0),falseValue:d.oneOfType([d.string,d.number,d.bool]).def(!1),value:d.oneOfType([d.string,d.number,d.bool]).def(!1),modelValue:d.oneOfType([d.string,d.number,d.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const i=Un(),s=a.ref(!1),l=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),g=a.computed(()=>{const p={[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":l.value,"is-unchecked":!l.value,"is-loading":s.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const m=`bk-switcher-${e.size}`;p[m]=!0}return e.size||(p["bk-switcher-nomal"]=!0),p});a.watch(()=>e.modelValue,()=>{c.value=!0}),a.watch(()=>e.value,()=>{c.value=!1});const h=p=>{if(p.stopPropagation(),p.preventDefault(),e.disabled||s.value)return;const m=l.value?e.falseValue:e.trueValue,C=!l.value,b=()=>{var N;t("update:modelValue",m),t("change",C),(N=i==null?void 0:i.validate)==null||N.call(i,"change")};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(m),typeof y.then=="function"))return s.value=!0,y.then(()=>{b()}).finally(()=>{s.value=!1});y&&b()};return()=>a.createVNode("div",{class:g.value,onClick:h,tabindex:"0",onKeydown:h},[s.value?a.createVNode(_s,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const ku=Re(k1),T1={onContentScroll:Function},x1=Z({list:d.array.def([]),enabled:d.bool.def(!0),scrollEvent:d.bool.def(!1),lineHeight:d.oneOfType([d.number,d.func]).def(30),minHeight:d.number.def(30),height:d.oneOfType([d.string.def("100%"),d.number]).def("100%"),width:d.oneOfType([d.string.def("100%"),d.number]).def("100%"),className:d.oneOfType([d.arrayOf(d.string),d.object,d.arrayOf(d.object),d.string]).def(""),contentClassName:d.oneOfType([d.arrayOf(d.string),d.object,d.arrayOf(d.object),d.string]).def(""),contentStyle:d.object.def({}),scrollXName:d.string.def("bk-scroll-x"),scrollYName:d.string.def("bk-scroll-y"),groupItemCount:d.number.def(1),preloadItemCount:d.number.def(1),renderAs:d.string.def("div"),contentAs:d.string.def("div"),scrollOffsetTop:d.number.def(0),scrollPosition:d.string.def("content"),abosuteHeight:d.oneOfType([d.string.def("auto"),d.number]).def("auto"),throttleDelay:d.number.def(60)},T1);var S1=(e,t)=>{const{renderAs:i,contentAs:s}=e,l=(g,h,p,m,C,b,y)=>{t.emit("content-scroll",[g,{translateY:C,translateX:b,pos:y}])},c=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var g,h,p,m,C,b,y,N,k;return a.h(i,{class:e.className},[(p=(h=(g=t.slots).beforeContent)==null?void 0:h.call(g))!=null?p:"",a.withDirectives(a.h(s,{class:e.contentClassName,style:e.contentStyle},[(b=(C=(m=t.slots).default)==null?void 0:C.call(m,{data:e.list}))!=null?b:""]),[[c,u]]),(k=(N=(y=t.slots).afterContent)==null?void 0:N.call(y))!=null?k:""])}}};function Tu(e,t,i,s){let l=0,c=0,u=0,g=0;for(;l<e;l++){if(g=s(l,[l*i,(l+1)*i,"virtual"]),c+g>t){u=t-c;break}c+=g}return{startIndex:l,height:c,diffHeight:u}}function xu(e,t,i,s,l){if(!s)return;const c=s.scrollTop,u=s.scrollLeft,{scrollTop:g,count:h,groupItemCount:p,startIndex:m,endIndex:C}=i,{offsetHeight:b}=s;let y=0,N=0,k=0;if(typeof e=="number"&&(y=Math.floor(c/e),N=Math.ceil(b/e)+y,k=c%e),typeof e=="function"){const x=Tu(h,c,p,e);y=x.startIndex>0?x.startIndex:0,k=x.diffHeight,N=Tu(h,b,p,e).startIndex+y+1}if(c!==g||y!==m||N!==C){const x=s.scrollHeight-s.offsetHeight-s.scrollTop;typeof t=="function"&&t(l,y,N,c,k,u,{bottom:x>=0?x:0})}}function D1(e,t,i){const{lineHeight:s=30,handleScrollCallback:l,pagination:c={},onlyScroll:u}=i.value;if(u){const b=t.scrollTop,y=t.scrollLeft,N=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,b,b,y,{bottom:N>=0?N:0});return}const{startIndex:g,endIndex:h,groupItemCount:p,count:m,scrollTop:C}=c;xu(s,l,{scrollTop:C,startIndex:g,endIndex:h,groupItemCount:p,count:m},t,e)}const Su=(e=60)=>_n.exports.throttle((t,i,s)=>D1(t,i,s),e),j1=(e,t,i,s=60)=>{Reflect.apply(Su(s),globalThis,[e,t,i])};var z1={mounted(e,t){const i=e.parentNode,{throttleDelay:s}=t.value;i.addEventListener("scroll",l=>{j1(l,i,t,s)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",Su)}}},J1=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:z1},props:x1,emits:["content-scroll"],setup(e,t){const{renderAs:i,contentAs:s}=e,l=R=>typeof R=="string"?[R]:typeof R=="object"&&!Array.isArray(R)?[R]:R;if(!e.enabled){const{rendAsTag:R}=S1(e,t);return R}const c=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),g=(R,F,O,V,U,ue,ee)=>{u.startIndex=F,u.endIndex=O,u.scrollTop=V,u.translateY=U,u.translateX=ue,u.pos=ee,t.emit("content-scroll",[R,u])};a.onMounted(()=>{a.nextTick(()=>{C(e.list),b()})}),a.watch(()=>e.list,()=>{h(),b()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{h(),b()});const h=()=>{C(e.list)},p=a.ref(0),m=a.ref(0),C=R=>{if(p.value=Math.ceil((R||[]).length/e.groupItemCount),u.count=p.value,u.startIndex=0,u.endIndex=0,u.translateY=0,u.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let V=0;V<p.value;V++){const U=e.lineHeight.call(this,V,R.slice(V*e.groupItemCount,e.groupItemCount));O+=typeof U=="number"?U:0}m.value=O}else m.value=e.lineHeight*p.value;else m.value=e.abosuteHeight},b=()=>{var F;const R=(F=c.value)==null?void 0:F.parentNode;xu(e.lineHeight,g,u,R,null)},y=a.computed(()=>(e.list||[]).map((R,F)=>ze(Z({},R),{$index:F}))),N=a.computed(()=>y.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),x=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:{})),D=a.computed(()=>{const R=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:R?"none":"block"}}),L=a.computed(()=>["bk-virtual-render",e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?"bk-virtual-content":""]),T=a.computed(()=>[e.scrollPosition==="content"?"bk-virtual-content":"",...l(e.contentClassName)]),z=a.resolveDirective("bkVirtualRender"),A={lineHeight:e.lineHeight,handleScrollCallback:g,pagination:u,throttleDelay:e.throttleDelay},K=()=>{h(),b()};return t.expose({reset:K}),()=>{var R,F,O,V,U,ue,ee,ge,Me;return a.h(i||"div",{ref:c,class:L.value,style:x.value},[(O=(F=(R=t.slots).beforeContent)==null?void 0:F.call(R))!=null?O:"",a.withDirectives(a.h(s||"div",{class:T.value,style:Z(Z({},k.value),e.contentStyle)},[(ue=(U=(V=t.slots).default)==null?void 0:U.call(V,{data:N.value}))!=null?ue:""]),[[z,A]]),(Me=(ge=(ee=t.slots).afterContent)==null?void 0:ge.call(ee))!=null?Me:"",a.h("div",{class:["bk-virtual-section"],style:D.value})])}}});const yr=Re(J1),Du=["none","row","col","outer"];var On=(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||{}),Wi=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(Wi||{});const kn=(...e)=>!0,P1={columnPick:kn,columnFilter:kn,columnSort:kn,rowClick:kn,rowDblClick:kn,rowExpand:kn,pageLimitChange:kn,pageValueChange:kn,settingChange:kn,scrollBottom:kn},vt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},ju=(e,t)=>{if(e){if(typeof e=="object"){let i=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(i)||(i=1),ze(Z(Z({},t),e),{current:i})}return t}return{}};var Q1=(e,t)=>{const i=a.ref(0),s=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=ju(e.pagination,l);const c=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){i.value=0,s.value=e.data.length;return}i.value=(l.current-1)*l.limit,s.value=l.current*l.limit},g=a.reactive([]),h=y=>{typeof y=="function"&&g.sort(y)},p=y=>{if(typeof y=="function"){const N=g.filter((k,x)=>y(k,x,e.data));g.splice(0,g.length,...N)}},m=(y,N)=>{g.splice(0,g.length,...t.slice(i.value,s.value)),p(y),h(N)},C=(y,N)=>{l=ju(e.pagination,l),b(),u(),m(y,N)},b=()=>{!e.pagination||(c.value=e.remotePagination?l:ze(Z({},l),{count:e.data.length}))};return{pageData:g,localPagination:c,resolvePageData:m,watchEffectFn:C}},O1=(e,t)=>{const i=a.toRef(e,"scrollLoading"),s=()=>typeof i.value=="boolean"?{loading:!!i.value,inline:!0,title:"",size:Ln.Normal,mode:pi.Default,indicator:null}:i.value,l=a.computed(()=>i.value!==null&&(typeof i.value=="boolean"&&i.value||typeof i.value=="object"));return{renderScrollLoading:()=>{var u,g,h;if(l.value){const{loading:p,size:m,mode:C,title:b,inline:y,indicator:N}=s();return(h=(g=(u=t.slots).fixedBottom)==null?void 0:g.call(u))!=null?h:a.createVNode($n,{loading:p,size:m,mode:C,title:b,inline:y,indicator:N},null)}}}},zu=(e=>(e.CURRENT="current",e.ALL="all",e))(zu||{});const A1={data:d.arrayOf(d.any).def([]),columns:d.arrayOf(d.shape({label:d.oneOfType([d.func.def(()=>""),d.string.def("")]),field:d.oneOfType([d.func.def(()=>""),d.string.def("")]),render:d.oneOfType([d.func.def(()=>""),d.string.def("")]),width:d.oneOfType([d.number.def(void 0),d.string.def("auto")]),minWidth:d.oneOfType([d.number.def(void 0),d.string.def("auto")]).def(),type:d.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:d.bool.def(!0),fixed:d.oneOfType([d.bool,d.commonType(["left","right"],"fixed")]).def(!1),sort:d.oneOfType([d.shape({sortFn:d.func.def(void 0),sortScope:d.commonType(Object.values(zu)).def("current")}),d.bool,d.string]).def(!1),filter:d.oneOfType([d.shape({list:d.arrayOf(d.any).def([]),filterFn:d.func.def(void 0)}),d.bool,d.string]).def(!1)})).def([]),activeColumn:d.oneOfType([d.number.def(-1),d.arrayOf(d.number.def(-1))]),columnPick:d.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:d.oneOfType([d.number,d.string]).def("auto"),minHeight:d.oneOfType([d.number,d.string]).def(200),maxHeight:d.oneOfType([d.number,d.string]).def("auto"),rowHeight:d.oneOfType([d.number,d.func]).def(40),headHeight:d.number.def(40),showHead:d.bool.def(!0),thead:d.shape({height:d.number.def(40),isShow:d.bool.def(!0),cellFn:d.func.def(void 0)}),virtualEnabled:d.bool.def(!1),border:d.arrayOf(d.commonType(Du,"border")).def(["row"]),pagination:d.oneOfType([d.bool.def(!1),d.object.def({})]).def(!1),remotePagination:d.bool.def(!1),emptyText:d.string.def("\u6682\u65E0\u6570\u636E"),settings:d.oneOfType([d.bool,d.shape({fields:d.shape([]).def(void 0),checked:d.shape([]).def(void 0),limit:d.number.def(void 0),size:d.size(["small","default","large"]).def("default"),sizeList:d.shape([]).def(void 0)})]).def(!1),rowClass:d.oneOfType([d.string,d.object,d.func]).def({}),rowStyle:d.oneOfType([d.string,d.object,d.func]).def({}),cellStyle:d.oneOfType([d.string,d.object,d.func]).def({}),cellClass:d.oneOfType([d.string,d.object,d.func]).def({}),scrollLoading:d.oneOfType([d.object,d.bool]).def(void 0),reserveExpand:d.bool.def(!1),rowKey:d.oneOfType([d.string,d.func]).def(vt.ROW_INDEX)};function E1(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var V1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const i=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:c})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":c}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ml,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:i,disabled:e.disabled},E1(u=e.limitList.map((g,h)=>a.createVNode(cu,{value:g,label:`${g}`,key:`${h}_${g}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Ii=5;var R1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),i=a.computed(()=>t.value===1),s=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),c=a.ref(!1),u=a.computed(()=>{l.value=!1,c.value=!1;const y=[];if(e.totalPageNum<=Ii){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const N=Math.floor(Ii/2);e.totalPageNum>Ii&&(l.value=t.value-N>2,c.value=t.value+N<e.totalPageNum-1);const k=Math.min(e.totalPageNum-Ii,Math.max(2,t.value-N));for(let x=k;x<k+Ii;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const g=()=>{i.value||(t.value=t.value-1)},h=()=>{s.value||(t.value=t.value+1)},p=y=>{y!==t.value&&(t.value=y)},m=()=>{t.value=Math.max(1,t.value-Ii)},C=()=>{t.value=Math.min(e.totalPageNum,t.value+Ii)};return{current:t,render:({isFirst:y,isLast:N})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":N}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:g},[e.prevText||a.createVNode(mi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>p(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(sr,null,null)]),u.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>p(k)},[k])),c.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:C},[a.createVNode(sr,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>p(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":s.value},onClick:h},[e.nextText||a.createVNode(Pn,null,null)])])}},W1=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),i=a.ref(!1),s=a.ref(1),l=a.computed(()=>s.value===1),c=a.computed(()=>s.value===e.totalPageNum);let u=0;const g=a.computed(()=>{const x=[];for(let D=1;D<=e.totalPageNum;D++)x.push(D);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?s.value=x:x<1?s.value=1:s.value=e.totalPageNum,u=s.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{s.value>x&&(s.value=x)})});const h=()=>{l.value||(s.value=s.value-1)},p=()=>{c.value||(s.value=s.value+1)},m=()=>{i.value=!0},C=()=>{i.value=!1,t.value.textContent=`${u}`,u!==s.value&&(s.value=u)},b=x=>{const D=x.target,L=Number(D.textContent);!L||L<1||L>e.totalPageNum||L===s.value||(u=L)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),C())},N=x=>{u=x,C()};return{current:s,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":l.value},onClick:h},[a.createVNode(Bs,null,null)]),a.createVNode(vn,{theme:"light",trigger:"click",arrow:!1,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":i.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:C,onInput:b,onKeydown:y},[s.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"},[g.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===s.value},key:x,onClick:()=>N(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":c.value},onClick:p},[a.createVNode(ya,null,null)])])}},Z1=()=>({isFirst:e,isLast:t})=>{const{props:i}=a.getCurrentInstance();return i.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:i.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[i.count]),a.createTextVNode("\u6761")]):null};const G1={modelValue:d.number.def(1),count:d.number.def(0).isRequired,limit:d.number.def(10),limitList:d.arrayOf(Number).def([10,20,50,100]),showLimit:d.bool.def(!0),type:d.oneOf(["default","compact"]).def("default"),location:d.oneOf(["left","right"]).def("right"),align:d.oneOf(["left","center","right"]).def("left"),size:d.size(),small:d.bool.def(!1),showTotalCount:d.bool.def(!0),prevText:d.string,nextText:d.string,disabled:d.bool.def(!1),layout:d.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(i=>t[i])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var Y1=a.defineComponent({name:"Pagination",props:G1,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const i=a.ref(0),{count:s,limit:l}=a.toRefs(e),c=Z1(),{current:u,render:g}=R1(),{current:h,render:p}=W1(),{limit:m,render:C}=V1();return a.watch([s,m,l],([b,y])=>{const N=Math.ceil(b/y);i.value=N<1?1:N},{immediate:!0}),a.watch(u,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(h,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(m,b=>{t.emit("limitChange",b)}),{totalPageNum:i,renderTotal:c,renderList:g,renderLimit:C,renderSmallList:p}},render(){const e=Se({"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((i,s)=>t[i]({isFirst:s===0,isLast:s===this.layout.length-1}))])}});const yl=Re(Y1);var B1=a.defineComponent({name:"BodyEmpty",props:{list:d.array.def([]),filterList:d.array.def([]),emptyText:d.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const i=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(dr,{scene:"part",type:i.value},{default:()=>{var s,l;return[(l=(s=t.default)==null?void 0:s.call(t))!=null?l:e.emptyText]}})}}),Ir={exports:{}},Ju=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(Ju){var Pu=new Uint8Array(16);Ir.exports=function(){return Ju(Pu),Pu}}else{var Qu=new Array(16);Ir.exports=function(){for(var t=0,i;t<16;t++)(t&3)===0&&(i=Math.random()*4294967296),Qu[t]=i>>>((t&3)<<3)&255;return Qu}}for(var Ou=[],br=0;br<256;++br)Ou[br]=(br+256).toString(16).substr(1);function H1(e,t){var i=t||0,s=Ou;return[s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]]].join("")}var Au=H1,F1=Ir.exports,U1=Au,Eu,Il,bl=0,Nl=0;function _1(e,t,i){var s=t&&i||0,l=t||[];e=e||{};var c=e.node||Eu,u=e.clockseq!==void 0?e.clockseq:Il;if(c==null||u==null){var g=F1();c==null&&(c=Eu=[g[0]|1,g[1],g[2],g[3],g[4],g[5]]),u==null&&(u=Il=(g[6]<<8|g[7])&16383)}var h=e.msecs!==void 0?e.msecs:new Date().getTime(),p=e.nsecs!==void 0?e.nsecs:Nl+1,m=h-bl+(p-Nl)/1e4;if(m<0&&e.clockseq===void 0&&(u=u+1&16383),(m<0||h>bl)&&e.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");bl=h,Nl=p,Il=u,h+=122192928e5;var C=((h&268435455)*1e4+p)%4294967296;l[s++]=C>>>24&255,l[s++]=C>>>16&255,l[s++]=C>>>8&255,l[s++]=C&255;var b=h/4294967296*1e4&268435455;l[s++]=b>>>8&255,l[s++]=b&255,l[s++]=b>>>24&15|16,l[s++]=b>>>16&255,l[s++]=u>>>8|128,l[s++]=u&255;for(var y=0;y<6;++y)l[s+y]=c[y];return t||U1(l)}var $1=_1,X1=Ir.exports,K1=Au;function q1(e,t,i){var s=t&&i||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var l=e.random||(e.rng||X1)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,t)for(var c=0;c<16;++c)t[s+c]=l[c];return t||K1(l)}var eh=q1,th=$1,Vu=eh,wl=Vu;wl.v1=th,wl.v4=Vu;var Ll=wl;const Xt=(e,t,i)=>{if(Object.prototype.hasOwnProperty.call(e,t))return typeof e[t]=="function"?e[t].call(globalThis,...i):e[t]},vl=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],nh=e=>Ru(e,"auto"),Ru=(e,t="100%",i=null)=>{let s="";return/^auto|null|undefined$/ig.test(`${e}`)?s=t:s=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,i&&(s=`calc(${s} - ${i})`),s},ih=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(i=>Du.includes(i))),[...new Set(t)].map(i=>`bordered-${i}`).join(" ")},Na=(e,t=["resizeWidth","calcWidth","width"])=>{var i,s;return(s=(i=e[t[0]])!=null?i:e[t[1]])!=null?s:e[t[2]]},Wu=(e,t,i=20)=>{const{width:s}=e.getBoundingClientRect()||{};let l=s-4;const c=[],u=(h,p)=>{const{minWidth:m=void 0}=h;if(m===void 0)return p;let C=p;return/^\d+\.?\d*$/.test(`${m}`)&&(C=Number(m)),/^\d+\.?\d*%$/.test(`${m}`)&&(C=Number(m)*s/100),/^\d+\.?\d*px$/i.test(`${m}`)&&(C=Number(`${m}`.replace(/px/i,""))),C},g=(h,p,m=!0)=>{const C=u(h,p),b=p<C?C:p;Object.assign(h,{calcWidth:b}),m&&(l=l-b,l<0&&(l=0))};if(t.forEach((h,p)=>{if(!h.isHidden){const m=String(Na(h));let C=!0;if(/^\d+\.?\d*(px)?$/.test(m)){const b=Number(m.replace("px",""));g(h,b),C=!1}if(/^\d+\.?\d*%$/.test(m)){let b=i;if(l>0){const y=Number(m.replace("%",""));b=l*y/100}g(h,b),C=!1}C&&c.push(p)}}),c.length>0){let h=i;l>0&&(h=l/c.length,c.forEach(p=>g(t[p],h,!1)))}},ah=(e,t,i=60,s=!1)=>{const l=_n.exports.throttle(()=>{typeof t=="function"&&t()},i),c=new ResizeObserver(()=>{l()});return s&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},stop:()=>{c.disconnect(),c.unobserve(e)}}},kl=e=>{const{showHead:t,headHeight:i,thead:s={}}=e;return Object.assign({},{isShow:t,height:i},Z({},s))},Tl=(e,t,i)=>i.type==="index"?e[vt.ROW_INDEX]+1:e[t],wa=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?wa(Reflect.apply(e,globalThis,t),t):[],rh=(e,t,i)=>typeof t.rowKey=="string"?t.rowKey===vt.ROW_INDEX?`__ROW_INDEX_${i}`:t.rowKey.split(".").reduce((l,c)=>Object.prototype.hasOwnProperty.call(l,c)?l[c]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Ll.v4();function sh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var lh=a.defineComponent({name:"HeadFilter",props:{column:d.any.def({}),height:d.number.def(40)},emits:["change"],setup(e,{emit:t}){const{column:i}=e,s=a.ref(!1),l=a.reactive({isOpen:!1,checked:[]}),c=a.computed(()=>Se({[rt("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:l.checked.length,opened:l.isOpen})),u=Se({[rt("table-head-filter")]:!0}),g=N=>{l.isOpen=N},h=[{name:"offset",options:{offset:[0,0]}}],p=`light ${rt("table-head-filter")}`,m=a.computed(()=>{const{list:N=[]}=i.filter;return N.map(k=>ze(Z({},k),{checked:l.checked.includes(k.value)}))}),C=typeof i.filter.filterFn=="function"?(N,k,x,D)=>i.filter.filterFn(N,k,e.column,x,D):(N,k)=>N.length?N.includes(Tl(k,Xt(i,"field",[i,k]),i)):!0,b=()=>{if(e.column.filter==="custom"){t("change",[...l.checked],null),s.value=!1;return}t("change",[...l.checked],C),s.value=!1},y=()=>{l.checked.length&&(l.checked.splice(0,l.checked.length),s.value=!1,a.nextTick(()=>t("change",l.checked,C)))};return()=>a.createVNode(vn,a.mergeProps({trigger:"click",isShow:s.value,placement:"bottom-end",stopBehaviors:["stopPropagation"],arrow:!1},{modifiers:h,theme:p},{boundary:document.body,onAfterShow:()=>g(!0),onAfterHidden:()=>g(!1)}),{default:()=>a.createVNode(Ps,{class:c.value,onClick:()=>s.value=!0},null),content:()=>{let N;return a.createVNode("div",{class:u},[a.createVNode(nl,{class:"content-list",modelValue:l.checked,"onUpdate:modelValue":k=>l.checked=k},sh(N=m.value.map(k=>a.createVNode("div",{class:"list-item"},[a.createVNode(ba,{label:k.value},{default:()=>[k.text]})])))?N:{default:()=>[N]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:b},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",l.checked.length?"":"disable"],onClick:y},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Zi=(e=>(e.ASC="asc",e.DESC="desc",e))(Zi||{}),oh=a.defineComponent({name:"HeadSort",props:{column:d.any.def({})},emits:["change"],setup(e,{emit:t}){const i=a.ref(""),s=(l,c)=>{var C,b;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),i.value=c,e.column.sort==="custom"){t("change",null,c);return}const u=e.column.field,g=y=>Tl(y,u,e.column),h=(y,N)=>{const k=g(y),x=g(N);return typeof k=="number"&&typeof x=="number"?k-x:String.prototype.localeCompare.call(k,x)},p=typeof((C=e.column.sort)==null?void 0:C.sortFn)=="function"?(b=e.column.sort)==null?void 0:b.sortFn:h;t("change",(y,N)=>p(y,N)*(c===Zi.DESC?-1:1),c)};return()=>a.createVNode("span",{class:rt("head-cell-sort")},[a.createVNode(Js,{class:["sort-action","sort-asc",i.value===Zi.ASC?"active":""],onClick:l=>s(l,Zi.ASC)},null),a.createVNode(er,{class:["sort-action","sort-desc",i.value===Zi.DESC?"active":""],onClick:l=>s(l,Zi.DESC)},null)])}});class ch{constructor(t,i){sa(this,"props",null);sa(this,"ctx",null);this.props=t,this.ctx=i}}function Zu(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var uh=a.defineComponent({name:"Settings",props:{settings:d.oneOfType([d.bool,d.shape({fields:d.shape([]).def(void 0),checked:d.shape([]).def(void 0),limit:d.number.def(void 0),size:d.string.def(void 0)})]).def(!1),columns:d.array.def([]),rowHeight:d.number.def(40)},emits:["change"],setup(e,{emit:t}){var R,F,O;const i=[{value:"small",label:"\u5C0F",height:32},{value:"default",label:"\u4E2D",height:e.rowHeight},{value:"large",label:"\u5927",height:56}],s=[{name:"offset",options:{offset:[10,10]}}],l=a.ref(!1),c=e.settings,u=a.ref((R=c.size)!=null?R:"default"),g=a.ref(e.rowHeight),h=a.ref((F=c.checked)!=null?F:[]),m=`light ${rt("table-settings")}`,C=()=>{t("change",{checked:h.value,size:u.value,height:g.value}),l.value=!1},b=()=>{var V;u.value="default",g.value=e.rowHeight,h.value=(V=c.checked)!=null?V:[],l.value=!1},y=()=>{l.value=!0},N=()=>{var V,U;h.value=((U=(V=c.fields)!=null?V:e.columns)!=null?U:[]).map((ue,ee)=>Xt(ue,"field",[ue,ee]))},k=a.computed(()=>{var V;return((V=c.limit)!=null?V:0)>0}),x=(O=c.sizeList)!=null?O:i,D=a.computed(()=>{var V;return k.value&&((V=c.limit)!=null?V:0)<=h.value.length}),L=(V,U)=>D.value&&!h.value.includes(Xt(V,"field",[V,U])),T=V=>{u.value=V.value,g.value=V.height},z=V=>({"line-size":!0,"is-default":u.value==="default",active:V.value===u.value}),A={width:"85px",marginRight:"5px"},K=()=>x.map(V=>a.createVNode("span",{class:z(V),onClick:()=>T(V)},[V.label]));return()=>a.createVNode(vn,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{modifiers:s,theme:m},{boundary:document.body}),{default:()=>a.createVNode(As,{style:"color: rgba(99,101,110, 0.6);",onClick:y},null),content:()=>{var U,ue;let V;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("h2",null,[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(nr,{class:"icon-close-action",onClick:b},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",null,[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:N},[a.createTextVNode("\u5168\u9009")])]),a.createVNode(nl,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":ee=>h.value=ee},Zu(V=((ue=(U=c.fields)!=null?U:e.columns)!=null?ue:[]).map((ee,ge)=>{let Me;return a.createVNode("div",{class:"field-item"},[a.createVNode(ba,{label:Xt(ee,"field",[ee,ge]),disabled:L(ee,ge)},Zu(Me=Xt(ee,"label",[ee,ge]))?Me:{default:()=>[Me]})])}))?V:{default:()=>[V]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),K()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Wt,{theme:"primary",style:A,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Wt,{style:A,onClick:b},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}})}}),xl=(e,t)=>{const i=a.computed(()=>e.pagination&&e.data.length?40:0),s=m=>({column_fixed:!!m.fixed,column_fixed_left:m.fixed!=="right",column_fixed_right:m.fixed==="right"}),l=m=>m.fixed==="right"?"right":"left",c={left:(m=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,b,y)=>m&&y===0?C:C+Na(b),0),right:(m=!0)=>t.filter(C=>C.fixed==="right").reduce((C,b,y)=>m&&y===0?C:C+Na(b),0)},u=c.right,g=()=>{const m=(y,N)=>{if(!y.fixed)return{};const k=l(y),x=k==="right"?-1:1,D=`${N[k]}px`;return N[k]=N[k]+Na(y)*x,{[k]:D}},C=u(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:m}},h=()=>{const m=b=>({width:`${c[b](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(b=>!b.isHidden&&b.fixed).map(b=>{const y=l(b),N=C[y];return C[y]=!0,N?"":a.createVNode("div",{class:s(b),style:m(y)},null)})},p=rt("table-fixed");return{renderFixedColumns:h,fixedWrapperClass:p,getFixedColumnStyleResolve:g}};class dh{constructor(t,i,s,l){sa(this,"getRowHeight",(t,i)=>{const{size:s,height:l}=this.setting;return l!=null?Xt(this.setting,"height",["tbody",t,i,s]):Xt(this.props,"rowHeight",["tbody",t,i])});sa(this,"getColumnClass",(t,i)=>({[`${this.uuid}-column-${i}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));sa(this,"getHeadColumnClass",(t,i)=>ze(Z({},this.getColumnClass(t,i)),{active:this.isColActive(i)}));this.props=t,this.context=i,this.reactiveProp=s,this.colgroups=l,this.plugins=new ch(t,i),this.uuid=$a(8),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=kl(this.props);if(!t)return null;const i=s=>{const{checked:l=[],size:c,height:u}=s;this.reactiveProp.setting.size=c,this.reactiveProp.setting.height=u,l.length&&this.colgroups.forEach(g=>{g.isHidden=!(l!=null?l:[]).includes(Xt(g,"field",[g]))}),this.emitEvent(On.ON_SETTING_CHANGE,[s])};return[this.props.settings?a.createVNode(uh,{class:"table-head-settings",settings:this.props.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:i},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var i,s,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderTBody(t)]):(l=(s=(i=this.context.slots).empty)==null?void 0:s.call(i))!=null?l:a.createVNode(B1,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(yl,a.mergeProps(t,{modelValue:t.current,onLimitChange:i=>this.handlePageLimitChange(i),onChange:i=>this.hanlePageChange(i)}),null)}on(t,i){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(i),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,i){this.events.has(t)&&this.events.get(t).forEach(s=>{typeof s=="function"&&Reflect.apply(s,this,i)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,i=!1){const s=this.propActiveCols.find(l=>l.index===t);Object.assign(s,{active:!s.active}),i&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,i){const s=(l,c)=>{this.emitEvent(On.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:i,type:c}])};return a.createVNode(oh,{column:t,onChange:s},null)}getFilterCell(t,i){const s=(l,c)=>{const u=(g,h)=>c(l,g,h);this.emitEvent(On.ON_FILTER_CLICK,[{filterFn:u,checked:l,column:t,index:i}])};return a.createVNode(lh,{column:t,height:this.props.headHeight,onChange:s},null)}renderHeader(){const t=kl(this.props),{cellFn:i}=t,s={"--row-height":`${Xt(t,"height",["thead"])}px`},l=(p,m)=>{const C=[];return p.sort&&C.push(this.getSortCell(p,m)),p.filter&&C.push(this.getFilterCell(p,m)),typeof i=="function"?(C.unshift(i(p,m)),C):(C.unshift(Xt(p,"label",[p,m])),C)},c=p=>Array.from(p.listeners.keys()).reduce((m,C)=>{const b=C.split("_").slice(-1)[0];return Object.assign(m,{[b]:y=>{p.listeners.get(C).forEach(N=>Reflect.apply(N,this,[y,p,this]))}})},{}),{getFixedColumnStyleResolve:u}=xl(this.props,this.colgroups),{resolveFixedColumnStyle:g,fixedoffset:h}=u();return a.createVNode("thead",{style:s},[a.createVNode("tr",null,[this.filterColgroups.map((p,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(p,m),style:g(p,h),onClick:()=>this.handleColumnHeadClick(m)},c(p)),[a.createVNode("div",{class:"cell"},[l(p,m)])]))])])}renderTBody(t){const{getFixedColumnStyleResolve:i}=xl(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((s,l)=>{const c=[...wa(this.props.rowStyle,[s,l,this]),{"--row-height":`${this.getRowHeight(s,l)}px`}],u=[...wa(this.props.rowClass,[s,l,this])],{resolveFixedColumnStyle:g,fixedoffset:h}=i();return[a.createVNode("tr",{style:c,class:u,key:s[vt.ROW_UID],onClick:p=>this.handleRowClick(p,s,l,t),onDblclick:p=>this.handleRowDblClick(p,s,l,t)},[this.filterColgroups.map((p,m)=>{const C=[g(p,h),...wa(this.props.cellStyle,[p,m,s,l,this])],b=[this.getColumnClass(p,m),...wa(this.props.cellClass,[p,m,s,l,this]),{"expand-row":s[vt.ROW_EXPAND]}],y={cell:!0,"expand-cell":p.type==="expand"},N=`__CELL_${l}_${m}`;return a.createVNode("td",{key:N,class:b,style:C,colspan:1,rowspan:1},[a.createVNode("div",{class:y},[this.renderCell(s,p,l,t)])])})]),this.renderExpandRow(s,u)]})])}renderExpandRow(t,i){var l,c,u;if(!!t[vt.ROW_EXPAND]){const g=[...i,{row_expend:!0}];return a.createVNode("tr",{class:g},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(c=(l=this.context.slots).expandRow)==null?void 0:c.call(l,t))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])}}handleRowClick(t,i,s,l){this.context.emit("rowClick",t,i,s,l,this)}handleRowDblClick(t,i,s,l){this.context.emit("rowDblClick",t,i,s,l,this)}getExpandCell(t){return!!t[vt.ROW_EXPAND]?a.createVNode(ar,null,null):a.createVNode(ya,null,null)}handleRowExpandClick(t,i,s,l,c){this.emitEvent(On.ON_ROW_EXPAND_CLICK,[{row:t,column:i,index:s,rows:l,e:c}])}renderCell(t,i,s,l){if(i.type==="expand"){const u=()=>{var g,h,p;return typeof i.render=="function"?i.render(null,t,s,l):(p=(h=(g=this.context.slots).expandCell)==null?void 0:h.call(g,{row:t,column:i,index:s,rows:l}))!=null?p:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:g=>this.handleRowExpandClick(t,i,s,l,g)},[u()])}const c=Tl(t,Xt(i,"field",[i,t]),i);return typeof i.render=="function"?i.render(c,this.props.data[t[vt.ROW_INDEX]],t,i,s,l):c}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(i=>i.index===t&&i.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,i)=>{const s=Se({active:this.isColActive(i)}),l=`${nh(Na(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:s,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Gu=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:vl(e.activeColumn):Array.isArray(e.activeColumn)?vl(e.activeColumn[0]):vl(e.activeColumn):[];var fh=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const i=a.reactive(Gu(e)),s=()=>(e.columns||[]).map((l,c)=>({index:c,active:i.some(u=>u===c),_column:l}));return a.watchEffect(()=>{t=s();const l=Gu(e);t.forEach((c,u)=>{Object.assign(c,{active:l.some(g=>g===u)})})}),{activeColumns:t}},hh=(e,t=!0)=>{const i="HeadColumnResize";let s;(function(L){L.MOUSE_MOVE="onMousemove",L.MOUSE_OUT="onMouseout",L.MOUSE_DOWN="onMousedown"})(s||(s={}));let l=!1,c=!1,u=!1,g=0,h=null,p=0;const m=a.ref(-1e3),C=L=>{var K;c=!1,u=!1;const T=document.body.style;T.cursor="";const z=L.clientX-g;h.resizeWidth=((K=h.resizeWidth)!=null?K:h.calcWidth)+z,document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",b),g=0,m.value=-1e3,h=null,L.target.closest("table").querySelectorAll("th").forEach(R=>R.style.setProperty("user-select","inherit"))},b=L=>{document.body.style.setProperty("cursor",""),m.value=L.clientX-g+p},y={[s.MOUSE_DOWN]:(L,T)=>{if(!l)return;c=!0,document.body.style.setProperty("cursor","col-resize"),h=T,g=L.clientX;const A=L.target.closest("table");p=g-A.getBoundingClientRect().left,document.addEventListener("mouseup",C),document.addEventListener("mousemove",b)},[s.MOUSE_MOVE]:(L,T)=>{c&&!u&&(u=!0);const z=L.target.closest("th");if(u&&z.style.setProperty("user-select","none"),!u){if(!z)return;const A=z.getBoundingClientRect();A.width>12&&A.right-L.pageX<8?(l=!0,z.style.setProperty("cursor","col-resize")):l=!1}},[s.MOUSE_OUT]:(L,T)=>{const z=L.target;u||z.style.setProperty("cursor","")}},N=L=>`${i}_${L}`,k=()=>{e.forEach(L=>{L.resizable!==!1&&Object.keys(y).forEach(T=>{const z=N(T);L.listeners.has(z)||L.listeners.set(z,[]),L.listeners.get(z).push(y[T])})})},x=()=>{e.forEach(L=>{Object.keys(y).forEach(T=>{const z=N(T);if(L.listeners.has(z)){const A=L.listeners.get(z);A.splice(0,A.length)}})})};t&&k();const D=a.computed(()=>({position:"absolute",top:0,bottom:0,left:`${m.value}px`,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:x,dragOffsetX:m,dragOffsetXStyle:D}};const gh=(e,t,i,s)=>{const l=a.ref(200),c=a.ref(!1),u=a.computed(()=>e.pagination&&e.data.length),g=a.computed(()=>Se({[rt("table")]:!0,"has-footer":u.value,"has-scroll-y":c.value||e.virtualEnabled,"is-scroll-bottom":i.pos.bottom<2},ih(e.border))),h=Se({[rt("table-head")]:!0}),p=kl(e),m=a.computed(()=>({"--row-height":`${Xt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),C={[rt("table-body")]:!0},b=a.computed(()=>Se({[rt("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),y=a.computed(()=>({minHeight:Ru(e.minHeight,"auto")})),N=(T,z)=>{const A=String(T);if(/^\d+\.?\d*$/.test(A))return Number(A);if(/^\d+\.?\d*px$/ig.test(A))return Number(A.replace("px",""));if(/^\d+\.?\d*%$/ig.test(A)){const K=Number(A.replace("%",""));return z*K/100}return z},k=a.reactive({}),x=()=>{const T=N(e.height,l.value),z=e.showHead?N(e.headHeight,40)+2:0,A=N(e.maxHeight,l.value),K=N(e.minHeight,l.value),R=e.pagination&&e.data.length?40:0,F=T-z-R,O=e.height!=="auto"?`${F}px`:!1,V=A-z-R,U=K-z-R;Object.assign(k,{display:s!=null&&s.length?"block":!1,"max-height":`${V}px`,"min-height":`${U}px`,height:O})};a.onMounted(()=>{D(t==null?void 0:t.value)});const D=T=>{if(T){const{height:z}=T.parentElement.getBoundingClientRect();l.value=z,x()}};return{tableClass:g,headClass:h,contentClass:C,footerClass:b,wrapperStyle:y,contentStyle:k,headStyle:m,resetTableHeight:D,updateBorderClass:T=>{if(T){const z=T.querySelector(".bk-table-body table");z&&(c.value=z.offsetHeight>T.offsetHeight)}},hasFooter:u}},mh=e=>{var b;const t=a.reactive(((b=e.columns)!=null?b:[]).map(y=>ze(Z({},y),{calcWidth:null,resizeWidth:null,listeners:new Map}))),{dragOffsetXStyle:i}=hh(t,!0),{activeColumns:s}=fh(e),l=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:s,setting:{size:null,height:null}}),c=y=>{var N;return l.rowActions.has(y)?(N=l.rowActions.get(y))==null?void 0:N.isExpand:!1},u=(y,N=void 0)=>{var D;const k=y[vt.ROW_UID],x=typeof N=="boolean"?N:!c(k);l.rowActions.set(k,Object.assign({},(D=l.rowActions.get(k))!=null?D:{},{isExpand:x})),p()},g=a.reactive([]),h=(y=!1)=>{g.splice(0,g.length,...e.data.map((N,k)=>{const x=rh(N,e,k);return ze(Z({},N),{[vt.ROW_INDEX]:k,[vt.ROW_UID]:x,[vt.ROW_EXPAND]:y?c(x):!1})}))},p=()=>{g.forEach(y=>{Object.assign(y,{[vt.ROW_EXPAND]:c(y[vt.ROW_UID])})})},{renderFixedColumns:m,fixedWrapperClass:C}=xl(e,t);return{colgroups:t,dragOffsetXStyle:i,reactiveSchema:l,indexData:g,fixedWrapperClass:C,initIndexData:h,updateIndexData:p,renderFixedColumns:m,setRowExpand:u}};var ph=a.defineComponent({name:"Table",props:A1,emits:P1,setup(e,t){const{colgroups:i,dragOffsetXStyle:s,reactiveSchema:l,indexData:c,renderFixedColumns:u,setRowExpand:g,initIndexData:h,fixedWrapperClass:p}=mh(e);let m=null,C=null,b=null;const y=a.ref(),N=a.ref(),{pageData:k,localPagination:x,resolvePageData:D,watchEffectFn:L}=Q1(e,c),{tableClass:T,headClass:z,contentClass:A,footerClass:K,wrapperStyle:R,contentStyle:F,headStyle:O,updateBorderClass:V,resetTableHeight:U,hasFooter:ue}=gh(e,y,l,k),ee=new dh(e,t,l,i);a.watch(()=>[e.data,e.pagination],()=>{h(e.reserveExpand),L(C,m),a.nextTick(()=>{U(y.value),V(y.value)})},{immediate:!0,deep:!0}),ee.on(On.ON_SORT_BY_CLICK,Q=>{const{sortFn:j,column:E,index:G,type:q}=Q;typeof j=="function"&&(m=j,k.sort(m)),t.emit(Wi.COLUMN_SORT,{column:E,index:G,type:q})}).on(On.ON_FILTER_CLICK,Q=>{const{filterFn:j,checked:E,column:G,index:q}=Q;typeof j=="function"&&(C=j,D(C,m)),t.emit(Wi.COLUMN_FILTER,{checked:E,column:G,index:q})}).on(On.ON_SETTING_CHANGE,Q=>{var q,ae;const{checked:j=[],size:E,height:G}=Q;j.length&&Wu(y.value,i,20),(ae=(q=N.value)==null?void 0:q.reset)==null||ae.call(q),t.emit(Wi.SETTING_CHANGE,{checked:j,size:E,height:G})}).on(On.ON_ROW_EXPAND_CLICK,Q=>{const{row:j,column:E,index:G,rows:q,e:ae}=Q;t.emit(Wi.ROW_EXPAND_CLICK,{row:j,column:E,index:G,rows:q,e:ae}),g(j,!j[vt.ROW_EXPAND])});const ge=Q=>{var Y;const j=(Y=l.pos.bottom)!=null?Y:0,E=Q[1],{translateX:G,translateY:q,pos:ae={}}=E;l.scrollTranslateY=q,l.scrollTranslateX=G,l.pos=ae;const{bottom:be}=ae;be<=2&&j>be&&ff(60,()=>{t.emit(Wi.SCROLL_BOTTOM,ze(Z({},ae),{translateX:G,translateY:q}))},!0)()};a.onMounted(()=>{b=ah(y.value,()=>{Wu(y.value,i,20),e.height==="100%"&&U(y.value)},60,!0),b.start()}),a.onBeforeUnmount(()=>{b.stop(),b=null,ee.destroy()}),t.expose({setRowExpand:g});const Me=ze(Z({},A),{"__is-empty":!k.length}),he={[rt("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},ce={[rt("drag-column")]:!0,"offset-x":!0},ie={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:se}=O1(e,t);return()=>a.createVNode("div",{class:T.value,style:R.value,ref:y},[a.createVNode("div",{class:z,style:O.value},[ee.renderTableHeadSchema()]),a.createVNode(yr,{ref:N,lineHeight:ee.getRowHeight,class:Me,style:F,list:k,contentClassName:he,onContentScroll:ge,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled},{default:Q=>ee.renderTableBodySchema(Q.data||e.data)}),a.createVNode("div",{class:p},[u(),a.createVNode("div",{class:ce,style:s.value},null),a.createVNode("div",{class:ie},[se()])]),a.createVNode("div",{class:K.value},[ue.value&&ee.renderTableFooter(x.value)])])}});const Yu=Re(ph),Gi=12;function Mh(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const c=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)c.push(l.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...c),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function Ch(e){const{useGroup:t,saveKey:i,displayKey:s,list:l}=a.toRefs(e),c=a.reactive([]);return a.watch([t,i,s,l],()=>{let u=l.value;t.value&&(u=l.value.reduce((g,h)=>{let p=[];return h.children&&(p=h.children.map(m=>Z({group:{groupId:h[i.value],groupName:h[s.value]}},m))),g.concat(p)},[])),c.splice(0,c.length,...u)},{immediate:!0,deep:!0}),c}const Bu=e=>{const t=e.length;let i=0;for(let s=0;s<t;s++)(e.charCodeAt(s)&65280)!==0&&(i+=1),i+=1;return i};var Hu=a.defineComponent({name:"ListTagRender",props:{node:d.object,searchKey:d.oneOfType([d.string,d.arrayOf(d.string)]),displayKey:d.string,searchKeyword:d.string,tpl:{type:Function,default:null}},render(){const e=i=>{if(this.searchKeyword){const s=new RegExp(`(${this.searchKeyword})`,"i");return i.replace(s,'<strong class="highlight-text">$1</strong>')}return i};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 yh=()=>({modelValue:d.arrayOf(d.string).def([]),placeholder:d.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:d.arrayOf(d.object).def([]),disabled:d.bool.def(!1),tooltipKey:d.string.def(""),saveKey:d.string.def("id"),displayKey:d.string.def("name"),hasDeleteIcon:d.bool.def(!1),clearable:d.bool.def(!0),trigger:d.commonType(["focus","search"]).def("search"),searchKey:d.oneOfType([d.string,d.arrayOf(d.string)]).def("name"),useGroup:d.bool.def(!1),allowCreate:d.bool.def(!1),maxData:d.number.def(-1),maxResult:d.number.def(10),contentMaxHeight:d.number.def(300),contentWidth:d.number.def(190),separator:d.string.def(""),allowNextFocus:d.bool.def(!0),allowAutoMatch:d.bool.def(!1),showClearOnlyHover:d.bool.def(!1),leftSpace:d.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}});var Ih=a.defineComponent({name:"TagRender",props:{node:d.object,displayKey:d.string,tpl:{type:Function,default:null}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),bh=a.defineComponent({name:"TagInput",directives:{bkTooltips:ml},props:yh(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const i=Un(),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:c}=a.toRefs(e),{pageState:u,initPage:g,pageChange:h}=Mh(c),p=a.ref(""),m=a.ref(null),C=a.ref(null),b=a.ref(null),y=a.ref(null),N=a.ref(null),k=a.ref(null),x=a.ref(null),D=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),T=a.computed(()=>V.selectedTagList.length===0&&p.value===""&&!s.isEdit),z=a.computed(()=>e.clearable&&!e.disabled&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),A=a.computed(()=>({"bk-tag-input-trigger":!0,active:s.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{ge()}),a.watch(p,_n.exports.debounce(()=>{const $=u.curPageList.length!==0,{value:te}=p;te!==""&&$||te===""&&e.trigger==="focus"&&$?l.isShow=!0:(e.trigger!=="focus"||!$)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,$=>{K(),$&&N.value&&(a.nextTick(()=>{N.value.scrollTop=0}),N.value.removeEventListener("scroll",R),N.value.addEventListener("scroll",R))});const K=()=>{var te,oe;const $=L.value?0:(te=y.value)==null?void 0:te.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[$,4]}}],(oe=k.value)==null||oe.update()},R=()=>{if(u.isPageLoading||N.value.scrollTop===0)return;const{scrollTop:$,offsetHeight:te,scrollHeight:oe}=N.value;if($+te>=oe){const Ne=u.curPage+1;Ne<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{h(Ne)},500))}},F=()=>{var te;return Array.from(((te=b.value)==null?void 0:te.childNodes)||[]).filter(oe=>oe.nodeType!==Node.TEXT_NODE)},O=$=>{if(!e.disabled){if($!=null&&$.target){const{className:te}=$.target;(te.indexOf("bk-tag-input-trigger")>-1||te.indexOf("tag-list")>-1)&&b.value.appendChild(y.value)}clearTimeout(x.value),L.value&&U.value.length&&(V.tagListCache=[...U.value],V.selectedTagListCache=[...V.selectedTagList],p.value=V.selectedTagListCache[0][e.saveKey],bt(V.selectedTagList[0],0),j()),s.isEdit=!0,a.nextTick(()=>{var te;(te=m.value)==null||te.focus(),e.trigger==="focus"&&V.localList.length!==0&&(Me(),l.isShow?K():l.isShow=!0)})}},V=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),U=a.computed(()=>V.selectedTagList.map($=>$[e.saveKey])),ue=Ch(e),ee=a.computed(()=>{if(e.useGroup){const $={};return u.curPageList.forEach((te,oe)=>{te.__index__=oe,$[te.group.groupId]||($[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),$[te.group.groupId].children.push(te)}),Object.keys($).map(te=>$[te])}return u.curPageList}),ge=()=>{const{saveKey:$,modelValue:te,displayKey:oe,allowCreate:Ne,trigger:we}=e;V.selectedTagList=[],V.localList=[...ue],te.length&&(te.forEach(xe=>{const We=V.localList.find(it=>xe===it[$]);We!==void 0?V.selectedTagList.push(We):Ne&&!U.value.includes(xe)&&V.selectedTagList.push({[$]:xe,[oe]:xe})}),L.value||(V.localList=V.localList.filter(xe=>!te.includes(xe[$])))),we==="focus"&&Me()},Me=($="")=>{const{searchKey:te,filterCallback:oe}=e,Ne=$.toLowerCase();let we=[];if(typeof oe=="function")we=oe(Ne,te,V.localList)||[];else if(Array.isArray(te)){const xe=te.map(We=>V.localList.filter(it=>it[We].toLowerCase().indexOf(Ne)!==-1));we=Array.from(new Set(xe.flat()))}else we=V.localList.filter(xe=>xe[te].toLowerCase().indexOf(Ne)!==-1);g(we)},he=($,te)=>{const oe={"bk-selector-actived":!1,"bk-selector-selected":U.value.includes($[e.saveKey])};return e.useGroup?oe["bk-selector-actived"]=$.__index__===s.focusItemIndex:oe["bk-selector-actived"]=te===s.focusItemIndex,oe};a.onMounted(()=>{ge()});const ce=()=>{V.tagListCache=[],V.selectedTagListCache=[],V.selectedTagList=[]},ie=()=>{p.value=""},se=()=>{if(L.value)return 0;const te=F().findIndex(({id:oe})=>oe==="tagInputItem");return te>=0?te:0},Q=($,te,oe=!1)=>{if(!te||!$)return;let Ne=te;oe&&(Ne=te.nextElementSibling||null),te.parentNode.insertBefore($,Ne)},j=$=>{const{maxData:te,trigger:oe,allowCreate:Ne}=e;if(te===-1||te>U.value.length){const{value:we}=$!=null&&$.target?$.target:p,xe=Bu(we);xe?(Me(we),m.value.style.width=`${xe*Gi}px`):oe==="focus"&&Me()}else G(),p.value="",l.isShow=!1;s.isEdit=!0,s.focusItemIndex=Ne?-1:0},E=()=>{var $;l.width=L.value?($=C.value)==null?void 0:$.clientWidth:e.contentWidth},G=()=>{x.value=setTimeout(()=>{var te;const $=p.value;if(ie(),s.isEdit=!1,L.value){const[oe]=V.tagListCache;$&&$===oe&&V.selectedTagListCache.length?et(V.selectedTagListCache[0],"select"):be("remove")}else if(e.allowAutoMatch&&$){const oe=u.curPageList.find(Ne=>Array.isArray(e.searchKey)?e.searchKey.map(xe=>Ne[xe]).includes($):Ne[e.searchKey]===$);oe?q(oe,"select"):e.allowCreate&&q($,"custom")}l.isShow=!1,t("blur",$,U.value),(te=i==null?void 0:i.validate)==null||te.call(i,"blur")},50)},q=($,te,oe)=>{oe==null||oe.stopPropagation(),!(!$||$.disabled)&&(L.value&&ce(),et($,te),be("select"),ie(),l.isShow=!1)},ae=($,te,oe)=>{oe==null||oe.stopPropagation(),bt($,te),ie(),be("remove",$),m.value.style.width=`${Gi}px`},be=($,te)=>{var oe;t("change",U.value),t($,te),t("update:modelValue",U.value),(oe=i==null?void 0:i.validate)==null||oe.call(i,"change")},Y=$=>{$.stopPropagation();const te=V.selectedTagList;V.selectedTagList=[];const oe=ue.filter(Ne=>te.some(we=>we[e.saveKey]===Ne[e.saveKey]));(e.allowCreate&&oe.length!==0||!e.allowCreate)&&!L.value&&V.localList.push(...oe),be("removeAll")},re=()=>{const $={height:N.value.clientHeight,yAxis:N.value.getBoundingClientRect().y};a.nextTick(()=>{const te=N.value.querySelector(".bk-selector-actived");if(!te)return;const oe={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};oe.yAxis<$.yAxis&&(N.value.scrollTop=N.value.scrollTop-($.yAxis-oe.yAxis));const Ne=oe.yAxis+oe.height-$.yAxis;Ne>$.height&&(N.value.scrollTop=N.value.scrollTop+Ne-$.height)})},ve=($,te)=>{const oe=F();Q(y.value,oe[$-1]),V.selectedTagList.splice($-1,1),O();const Ne=ue.some(we=>we===te[e.saveKey]);(e.allowCreate&&Ne||!e.allowCreate)&&!L.value&&V.localList.push(te),m.value=`${Gi}px`,be("remove")},ot=$=>{if(u.isPageLoading)return;let te;const oe=$.target.value,Ne=Bu(oe),we=se(),xe=F();switch($.code){case"ArrowUp":if($.preventDefault(),!l.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=u.curPageList.length-1),re();break;case"ArrowDown":if($.preventDefault(),!l.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>u.curPageList.length-1?u.curPageList.length:s.focusItemIndex,s.focusItemIndex===u.curPageList.length&&(s.focusItemIndex=0),re();break;case"ArrowLeft":if(s.isEdit=!0,!Ne){if(we<1)return;Q(y.value,xe[we-1]),O()}break;case"ArrowRight":if(s.isEdit=!0,!Ne){if(we===xe.length-1)return;Q(xe[we+1],y.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&s.focusItemIndex>=0&&l.isShow?q(u.curPageList[s.focusItemIndex],"select",$):e.allowCreate&&q(p.value,"custom",$),$.preventDefault();break;case"Backspace":we!==0&&!p.value&&(te=V.selectedTagList[we-1],ve(we,te));break}},Fe=$=>{const te=[];return $.split(";").forEach(Ne=>{if(Ne.match(/^[a-zA-Z][a-zA-Z_]+/g)){const we=Ne.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");te.push({[e.saveKey]:we,[e.displayKey]:we})}}),te},Tt=$=>{if($.preventDefault(),L.value)return!1;const{maxData:te,saveKey:oe,pasteFn:Ne}=e,we=$.clipboardData.getData("text");let We=(Ne?Ne(we):Fe(we)).map(it=>it[oe]);if(We.length){const it=F(),xt=se(),Xe=V.localList.map(Ue=>Ue[oe]);if(We=We.filter(Ue=>(Ue==null?void 0:Ue.trim())&&!U.value.includes(Ue)&&Xe.includes(Ue)),te!==-1){const Ue=V.selectedTagList.length;if(Ue<te){const Ze=te-Ue;We.length>Ze&&(We=[...We.slice(0,Ze)])}else We=[]}const fn=V.localList.filter(Ue=>We.includes(Ue[oe]));We.length&&(V.selectedTagList.splice(xt,0,...fn),Q(y.value,it[xt]),m.value.style.width=`${Gi}px`,V.localList=V.localList.filter(Ue=>!We.includes(Ue[oe])),be("select"),O())}},pt=$=>{e.disabled||(Q(y.value,$.currentTarget,!0),m.value.style.width=`${Gi}px`,l.isShow&&K())},et=($,te)=>{if(V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:oe,saveKey:Ne,displayKey:we,createTagValidator:xe}=e,We=se();let it=1,xt=!1,Xe;const fn=Ze=>typeof xe=="function"?xe(Ze):!0,Ue=Ze=>V.localList.find(Qt=>Qt[Ne]===Ze);if(te==="custom")if(oe){let Ze=$.split(oe);Ze=Ze.filter(Mt=>(Mt==null?void 0:Mt.trim())&&!U.value.includes(Mt)&&fn(Mt));const Qt=Ze.map(Mt=>Ue(Mt)||{[Ne]:Mt,[we]:Mt});Ze.length&&(V.selectedTagList.splice(We,0,...Qt),it=Qt.length,xt=!0)}else{const Ze=typeof $=="object";if(Xe=Ze?$[Ne]:$.trim(),Xe=Xe.replace(/\s+/g,""),Xe!==void 0&&!U.value.includes(Xe)&&fn(Xe)){const Qt=Ue(Xe)||(Ze?$:{[Ne]:Xe,[we]:Xe});V.selectedTagList.splice(We,0,Qt),xt=!0}}else $&&(Xe=$[Ne],Xe!==void 0&&!U.value.includes(Xe)&&(V.selectedTagList.splice(We,0,$),xt=!0));xt&&a.nextTick(()=>{for(let Ze=1;Ze<=it;Ze++){const Mt=F()[We+Ze];Q(Mt,y.value)}m.value.style.width=`${Gi}px`,L.value||(e.allowNextFocus&&O(),V.localList=V.localList.filter(Ze=>!U.value.includes(Ze[Ne])))})},bt=($,te)=>{V.selectedTagList.splice(te,1);const oe=ue.some(Ne=>Ne===$[e.saveKey]);(e.allowCreate&&oe||!e.allowCreate)&&!L.value&&V.localList.push($)};return ze(Z(Z(Z({popoverProps:l},a.toRefs(s)),a.toRefs(V)),a.toRefs(u)),{isShowPlaceholder:T,isShowClear:z,curInputValue:p,formatList:ue,renderList:ee,showTagClose:D,tagInputRef:m,bkTagSelectorRef:C,tagListRef:b,tagInputItemRef:y,selectorListRef:N,popoverRef:k,triggerClass:A,focusInputTrigger:O,activeClass:he,handleInput:j,handleFocus:E,handleBlur:G,handleTagSelected:q,handleTagRemove:ae,handleClear:Y,tagFocus:pt,handleKeydown:ot,handlePaste:Tt})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.children.map((i,s)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:i.disabled},this.activeClass(i,s)],onClick:this.handleTagSelected.bind(this,i,"select")},[a.createVNode(Hu,{node:i,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,i)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(Hu,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(vn,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,i,s;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,c)=>{const u={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(Ih,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(wn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,c)},null):null]),[[a.resolveDirective("bk-tooltips"),u]])}),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":l=>this.curInputValue=l,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(s=(i=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:i.call(t))!=null?s:this.isShowClear&&a.createVNode(Qn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode($n,{theme:"primary",size:Ln.Small},null)]):null])])})])}});const Fu=Re(bh),Nh={direction:d.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:d.commonType(["left","center","right"],"align").def("center"),color:d.string.def("#dde4eb"),width:d.number.def(1),type:d.commonType(["dashed","solid"],"lineType").def("dashed")};var wh=a.defineComponent({name:"Divider",props:Nh,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 Uu=Re(wh),Lh={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},vh={active:d.oneOfType([d.number,d.string]).def(""),type:d.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:d.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:d.number.def(50),scrollStep:d.number.def(200),extCls:d.string.def(""),validateActive:d.bool.def(!0),showHeader:d.bool.def(!0),changeOnHover:d.bool.def(!1),changeOnHoverDelay:d.number.def(1e3)},kh=Z({active:d.oneOfType([d.number,d.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:d.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:d.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:d.number.def(50),scrollStep:d.number.def(200),validateActive:d.bool.def(!0),changeOnHover:d.bool.def(!1),changeOnHoverDelay:d.number.def(1e3)},Lh),Th={name:d.oneOfType([d.number,d.string]).def(""),label:d.string||d.func,closable:d.bool,visible:d.bool.def(!0),disabled:d.bool,sortable:d.bool,renderDirective:d.commonType(["if","show"],"render").def("show"),panel:d.string||d.func};var _u=a.defineComponent({name:"TabNav",props:kh,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const g=[];let h=!1;return e.panels.filter((p,m)=>{if(!p.props)return null;const{name:C,label:b,closable:y,visible:N,disabled:k,sortable:x}=p.props;if(!N)return!1;e.active===C&&(h=!0);const D=L=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(L)?`\u9009\u9879\u5361${m+1}`:typeof L=="string"?L:typeof L=="function"?a.h(L):L;return g.push({name:C,closable:y,visible:N,disabled:k,sortable:x,tabLabel:D(b)}),!0}),!h&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),g}),i=a.ref(-1),s=a.ref(-1),l=a.ref(""),c=(g,h)=>g===h;return ze(Z({},{handleTabAdd(g){e.tabAdd(g)},dragstart(g,h){s.value=g,l.value=e.guid,Object.assign(h.dataTransfer,{effectAllowed:"move"}),e.tabDrag(g,h)},dragenter(g){c(l.value,e.guid)&&(i.value=g)},dragend(){i.value=-1,s.value=-1,l.value=null},drop(g,h){if(!c(l.value,e.guid))return!1;e.tabSort(s.value,g,h)},handleTabChange(g){e.tabChange(g)},handleTabRemove(g,h){e.tabRemove(g,h)}}),{navs:t,dragenterIndex:i,dragStartIndex:s,draggingEle:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:i,sortable:s,sortType:l,labelHeight:c,dragstart:u,dragenter:g,dragend:h,drop:p}=this,m=()=>this.navs.map((b,y)=>{if(!b)return null;const{name:N,disabled:k,tabLabel:x}=b,D=()=>{const T=["bk-tab-header-item"];return k&&T.push("bk-tab-header--disabled"),e===N&&T.push("bk-tab-header--active"),T.join(" ")},L=(T,z)=>T||z;return a.createVNode("div",{key:N,onClick:()=>this.handleTabChange(N),draggable:L(b.sortable,s),onDragstart:T=>u(y,T),onDragenter:T=>{T.preventDefault(),g(y)},onDragleave:T=>{T.preventDefault()},onDragover:T=>{T.preventDefault()},onDragend:T=>{T.preventDefault(),h()},onDrop:T=>{T.preventDefault(),p(y,l)},class:D()},[a.createVNode("div",null,[x]),L(b.closable,t)&&a.createVNode(Qn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,b)},null)])}),C=()=>{var y,N,k,x;const b=[];return typeof this.$slots.add=="function"?b.push((N=(y=this.$slots).add)==null?void 0:N.call(y,a.h)):i&&b.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Hs,{width:26,height:26},null)])),typeof this.$slots.setting=="function"&&b.push((x=(k=this.$slots).setting)==null?void 0:x.call(k,a.h)),b.length?a.createVNode("div",{class:"bk-tab-header-operation"},[b.map((D,L)=>a.createVNode("div",{class:"bk-tab-header-item",key:L},[D]))]):null};return a.createVNode("div",{style:{lineHeight:`${c}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),C()])}}),xh=a.defineComponent({name:"Tab",components:{TabNav:_u},props:vh,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:i}){const s=a.ref(!1),l=a.ref([]),c=a.getCurrentInstance(),u=(p,m=[])=>{const{children:C}=p;return(C||[]).forEach(b=>{let{type:y}=b;y=y.name||y,y==="TabPanel"&&b.component?m.push(b.component):(y===a.Fragment||y==="template")&&u(b,m)}),m},g=()=>{if(t.default){const{children:p}=c.subTree.children[1];if(!p)return;const m=p[0],C=u(m);C.length!==l.value.length&&(l.value=C)}};return a.onMounted(()=>{g(),s.value=!0}),a.onUpdated(()=>{g()}),ze(Z({},{tabAdd(p){i("add",{e:p}),i("add-panel",{e:p})},tabChange(p){i("change",p),i("tab-change",p),i("update:active",p)},tabRemove(p,m){i("remove",p,m),i("remove-panel",p,m)},tabSort(p,m,C){const b=l.value;if(C==="insert")if(p<m)b.splice(m+1,0,l[p]),b.splice(p,1);else if(p>m)b.splice(m,0,l[p]),b.splice(p+1,1);else return!1;else{const y=b[m];b[m]=b[p],b[p]=y}l.value=[...b],i("sort",p,m,C),i("sort-change",p,m,C)},tabDrag(p,m){i("drag",p,m),i("on-drag-tab",p,m)}}),{isMounted:s,panels:l})},render(){var i,s;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:l,active:c,type:u,closable:g,addable:h,sortable:p,sortType:m,labelHeight:C,scrollStep:b,validateActive:y,changeOnHover:N,changeOnHoverDelay:k,tabPosition:x,tabAdd:D,tabChange:L,tabRemove:T,tabSort:z,tabDrag:A}=this,K={panels:l,active:c,type:u,closable:g,addable:h,sortable:p,sortType:m,labelHeight:C,scrollStep:b,validateActive:y,changeOnHover:N,changeOnHoverDelay:k,tabPosition:x,tabAdd:D,tabChange:L,tabRemove:T,tabSort:z,tabDrag:A};return!l||!Array.isArray(l)?null:a.createVNode(_u,K,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)])])}}),Sh=a.defineComponent({name:"TabPanel",props:Th,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:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const $u=Rt(xh,{TabPanel:Sh}),qn={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let Xu=1;const Ku=(e,t)=>{let i=t;const s=i.position||"top-right";typeof t=="string"&&(i={message:t});const l=t.onClose,c=i.offsetX||10;let u=i.offsetY||30;const{spacing:g=10}=i;qn[s].forEach(C=>{u+=(C.el.offsetHeight||0)+g}),Xu+=1;const h=`message_${Xu}`;i=ze(Z({},i),{offsetX:c,offsetY:u,id:h});const p=document.createElement("div"),m=a.createVNode(e,i);m.props.onDestory=C=>{Dh(C,s,g,l),a.render(null,p)},a.render(m,p),qn[s].push(m),document.body.appendChild(p.firstElementChild)};function Dh(e,t,i,s){s==null||s();const l=t.startsWith("top")?"top":"bottom";let c=-1;qn[t].forEach((p,m)=>{p.props.id===e&&(c=m)});const g=qn[t][c].el.offsetHeight,h=qn[t].length;for(let p=c;p<h;p++){const m=parseInt(qn[t][p].el.style[l],10)-g-i;qn[t][p].component.props.offsetY=m}qn[t].splice(c,1)}const jh={id:d.string.def(""),message:d.string.def(""),theme:d.theme(["primary","warning","success","error"]).def("primary"),delay:d.number.def(3e3),dismissable:d.bool.def(!0),offsetY:d.number.def(30),spacing:d.number.def(10),extCls:d.string.def(""),onClose:d.func};var zh=a.defineComponent({name:"Message",props:jh,emits:["destory"],setup(e,{emit:t}){const i=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),s=yn.getMessageNextIndex(),l=a.computed(()=>({top:`${e.offsetY}px`,zIndex:s})),c=a.ref(!1);let u=null;const g=()=>{u=setTimeout(()=>{c.value=!1},e.delay)},h=()=>{c.value=!1};return a.onMounted(()=>{e.delay&&g(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(u)}),a.watch(c,()=>{c.value||t("destory",e.id)}),{classNames:i,styles:l,visible:c,close:h}},render(){const e=()=>({primary:a.createVNode(lr,null,null),warning:a.createVNode(cr,null,null),success:a.createVNode(or,null,null),error:a.createVNode(Qn,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(wn,{class:"bk-message-icon bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const qu=e=>{Ku(zh,e)},Jh={id:d.string.def(""),title:d.string.def(""),message:d.string.def(""),theme:d.theme(["primary","warning","success","error"]).def("primary"),position:d.position().def("top-right"),delay:d.number.def(5e3),dismissable:d.bool.def(!0),offsetX:d.number.def(100),offsetY:d.number.def(30),spacing:d.number.def(10),extCls:d.string.def(""),onClose:d.func};var Ph=a.defineComponent({name:"Notify",props:Jh,emits:["destory"],setup(e,{emit:t}){const i=yn.getMessageNextIndex(),s=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),c=a.computed(()=>({[s.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:i})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,s.value]),g=a.ref(!1);let h=null;const p=()=>{h=setTimeout(()=>{g.value=!1},e.delay)},m=()=>{g.value=!1};return a.onMounted(()=>{e.delay&&p(),g.value=!0}),a.onUnmounted(()=>{clearTimeout(h)}),a.watch(g,()=>{g.value||t("destory",e.id)}),{classNames:u,styles:c,visible:g,handleClose:m}},render(){const e=()=>({primary:a.createVNode(lr,null,null),warning:a.createVNode(cr,null,null),success:a.createVNode(or,null,null),error:a.createVNode(Qn,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("h3",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(wn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const ed=e=>{Ku(Ph,e)},td=Symbol("MENU_PROVIDER_KEY"),Sl=Symbol("MENU_PROVIDER_KEY_PATH"),Qh=e=>{a.provide(td,e)},Oh=e=>{const{parentKeys:t,parentInfo:i}=Dl(),s=a.computed(()=>[...t.value,e]);a.provide(Sl,{parentInfo:{key:e,parentKey:i==null?void 0:i.key},parentKeys:s})},nd=()=>a.inject(td),Dl=()=>{var i;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(i=e.vnode.appContext)==null?void 0:i.provides;return t&&Sl in t?a.inject(Sl):{parentInfo:void 0,parentKeys:a.ref([])}},jl=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function id(e,t){if(!e||!t)return;const i=jl(t);let s=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...i);return}i.forEach(c=>{s=s.replace(` ${c} `," ")});const l=jl(s).join(" ");e.setAttribute("class",l)}function ad(e,t){if(!e)return;let i=e.getAttribute("class")||"";const s=jl(i),l=(t||"").split(" ").filter(c=>!s.includes(c)&&!!c.trim());e.classList?e.classList.add(...l):(i+=` ${l.join(" ")}`,e.setAttribute("class",i))}const Ah=()=>({css:!0,onBeforeEnter:e=>{ad(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,id(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&&(ad(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{id(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Eh={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Vh=a.defineComponent({name:"Menu",props:Eh,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:i,expose:s}){const l=a.ref(""),c=a.ref([]),u=a.ref({}),g=a.computed(()=>e.mode),h=a.ref(e.collapse),p=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{h.value=e.collapse,console.info(e.collapse);const N=[...p.value],k=[...c.value];c.value=h.value?[]:N,p.value=h.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(N=c.value)=>{c.value=N},{immediate:!0});const m=(N,k)=>{u.value=ze(Z({},u.value),{[N]:k})},C=N=>{delete u.value[N],u.value=Z({},u.value)},b=(N,k)=>{k?e.uniqueOpen?c.value=[N]:c.value.push(N):c.value=c.value.filter(x=>x!==N),i("openChange",k,u.value[N]),i("update:openKeys",[...c.value])},y=N=>{l.value=N,i("click",u.value[N]),i("update:activeKey",N,u.value[N])};return Qh({activeKey:l,menuStore:u,registerMenuInfo:m,unregisterMenuInfo:C,mode:g.value,openedKeys:c,collapse:h,handleOpenChange:b,handleActiveChange:y}),s({activeKey:l,openedKeys:c,menuStore:u}),()=>{var N;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":h.value}},[(N=t.default)==null?void 0:N.call(t)])}}}),Rh=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var i;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(i=t.default)==null?void 0:i.call(t)])])}}}),Wh=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:i}){var y,N;const{registerMenuInfo:s,unregisterMenuInfo:l,activeKey:c,handleActiveChange:u}=nd(),g=a.getCurrentInstance(),{parentInfo:h}=Dl(),p=((N=(y=g.vnode.key)==null?void 0:y.toString)==null?void 0:N.call(y))||String(g.uid),m=a.computed(()=>c.value===p),C=a.computed(()=>e.needIcon);s(p,{key:p,parentKey:h==null?void 0:h.key});const b=k=>{u(p),i("click",k)};return a.onBeforeUnmount(()=>l(p)),()=>{var k,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:b},[C.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"},[(x=t.default)==null?void 0:x.call(t)])])}}});const Zh={title:{type:String,default:"title"}};var Gh=a.defineComponent({name:"Submenu",props:Zh,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:i}){var D,L;const{registerMenuInfo:s,unregisterMenuInfo:l,openedKeys:c,handleOpenChange:u,collapse:g,activeKey:h,menuStore:p}=nd(),{parentInfo:m}=Dl(),C=a.getCurrentInstance(),b=((L=(D=C.vnode.key)==null?void 0:D.toString)==null?void 0:L.call(D))||String(C.uid),y=a.ref(Ah()),N=a.computed(()=>c.value.includes(b)),k=a.computed(()=>{var z,A;const T=(A=(z=p.value)==null?void 0:z[h.value])==null?void 0:A.parentKey;return g.value&&T===b&&N});Oh(b),s(b,{key:b,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(b));const x=()=>{u(b,!N.value),i("collapse",!N.value,C)};return()=>{var T;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":N.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((T=t.icon)==null?void 0:T.call(t))||a.createVNode(Xs,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(qa,{class:{"submenu-header-collapse":!0,"is-collapse":c.value.includes(b)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var z;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(z=t.default)==null?void 0:z.call(t)]),[[a.vShow,N.value]])]}})])}}});const rd=Rt(Vh,{Item:Wh,Submenu:Gh,Group:Rh}),Yh={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var sd=a.defineComponent({props:Yh,slots:["side-icon"],setup(e,{slots:t}){return()=>{var i,s;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((i=t.default)==null?void 0:i.call(t))||[a.createVNode("span",{class:"title-icon"},[((s=t["side-icon"])==null?void 0:s.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Bh={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},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 Hh=a.defineComponent({name:"Navigation",props:Bh,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const i=a.ref(e.headerTitle),s=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(s.click=!s.click,s.hover=s.click,t("toggle",s.hover)),a.onBeforeUnmount(()=>{s.timer&&window.clearTimeout(s.timer)});const l=()=>{s.click||(s.enterTimer=setTimeout(()=>{s.hover=!0,s.enterTimer&&window.clearTimeout(s.enterTimer),s.timer&&window.clearTimeout(s.timer),t("hover",s.hover),t("toggle",s.hover)},e.hoverEnterDelay))},c=()=>{s.click||(s.enterTimer&&window.clearTimeout(s.enterTimer),s.timer=setTimeout(()=>{s.hover=!1,window.clearTimeout(s.timer),t("leave",s.hover),t("toggle",s.hover)},e.hoverLeaveDelay))},u=()=>{s.click=!s.click,s.hover=s.click,t("toggle",s.hover),t("toggle-click",s.hover)};return{defaultHeaderTitle:i,nav:s,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:l,handleMouseLeave:c,handleClick:u}},render(){var e,t,i,s,l,c,u,g,h,p,m,C;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(sd,{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"&&a.createVNode(sd,{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)`}},[(s=(i=this.$slots).menu)==null?void 0:s.call(i)]),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(Es,{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`}},[((c=(l=this.$slots).header)==null?void 0:c.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(g=(u=this.$slots)["header-set"])==null?void 0:g.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(p=(h=this.$slots).default)==null?void 0:p.call(h),a.createVNode("div",{class:"container-footer"},[(C=(m=this.$slots).footer)==null?void 0:C.call(m)])])])])])}});const ld=Re(Hh),Fh={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 Uh=a.defineComponent({props:Fh,emits:["changeVisible"],setup(e,{emit:t}){let i=Object.create(null);const s=a.ref(null);a.onMounted(()=>{c()}),a.onBeforeUnmount(()=>{l()});const l=()=>{if(i&&Object.keys(i).length!==0){const h=i;h.isShow&&h.hide(),h.destroy(),i=null,t("changeVisible",!1)}},c=()=>{i&&Object.keys(i).length!==0?a.nextTick(()=>{i.update()}):a.nextTick(()=>{i=new Ss(e.triggerRef,s.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const h={};return e.appendToBody&&(h["z-index"]=1060+yn.getModalNextIndex()),h}),g=a.reactive({styles:u});return ze(Z({},a.toRefs(g)),{refContentRef:s,updateDropdown:c,destoryDropdown:l})},render(){var e,t,i;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(i=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?i:""])}});const _h={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var $h=a.defineComponent({props:_h,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const i=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),s=()=>{t("pick-clear")},l=()=>{t("pick-success")},c=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:i,handleClear:s,handleSuccess:l,handleToggleTime:c,handleTab:h=>{const m=[...u.value.children][h.shiftKey?"shift":"pop"]();document.activeElement===m&&(h.preventDefault(),h.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[this.labels.time]):"",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])])}}),od=1e3*60*60*24;function cd(e,t){return new Date(e,t+1,0).getDate()}function ud(e,t,i){return t===0&&i>50?e-1:t===11&&i<10?e+1:e}function dd(e,t,i,s){t>11&&(t=0,e++);var l=new Date(e,t,i);s&&l.setDate(l.getDate()+4-(l.getDay()||7));var c=s?l.getFullYear():e,u=new Date(c,0,1),g=1+Math.round((l-u)/od);s||(g+=u.getDay());var h=Math.ceil(g/7);if(!s){var p=new Date(e,t,i),m=new Date(e+1,0,1),C=m.getDay();p.getTime()>=m.getTime()-od*C&&(h=1)}return h}function Xh(e,t,i){for(var s=this.lang||"en",l=this.onlyDays,c=typeof this.weekStart=="undefined"?1:this.weekStart,u=c===1,g=[],h=new Date(e,t,1),p=h.getDay()||(u?7:0),m=c-p,C=dd(e,t,1,u),b=cd(e,t),y=cd(e,t-1),N,k,x,D=ud(e,t,C),L={month:t,year:e,daysInMonth:b},T=0;T<7;T++){x=m;for(var z=0;z<8;z++){T>0&&z>0&&m++,m>b||m<1?(k=m>b?m-b:y+m,N=m>b?t+1:t-1):(k=m,N=t);var A=function(){return z===0?"weekLabel":T===0?"dayLabel":m<1?"prevMonth":m>b?"nextMonth":"monthDay"}(),K=x!==m&&T>0,R={desc:K?k:C,week:C,type:A,format:u?"ISO 8601":"US",date:K?new Date(Date.UTC(e,N,k)):!1,year:D,index:g.length};i&&(typeof i=="function"?R=i.call(L,R,s):i.forEach(function(F){R=F.call(L,R,s)})),l&&K?g.push(R):l||g.push(R)}T>0&&(C=dd(e,N,k+1,u)),D=ud(e,t,C)}return L.cells=g,L}var Kh=function(e){return Xh.bind(e)},qh={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"}},Tn=qh;function e2(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function fd(e,t){for(var i in e)t[i]?e2(e[i])&&fd(e[i],t[i]):t[i]=e[i]}function hd(e,t){var i=[Tn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(i):e.class=i,e.type.indexOf("Label")>0&&(e.index==0&&Tn.weekPlaceholder?e.desc=Tn.weekPlaceholder:e.index<8?e.desc=Tn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Tn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Tn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Tn.monthNames[t],columnNames:Tn.columnNames[t],classes:Tn.classes}),e}hd.setLabels=function(e){fd(e,Tn)};var t2=hd,n2={Generator:Kh,addLabels:t2};function Kt(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 kt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function un(e){kt(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 i2(e,t){kt(2,arguments);var i=un(e).getTime(),s=Kt(t);return new Date(i+s)}function a2(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 r2(e){return kt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function s2(e){if(kt(1,arguments),!r2(e)&&typeof e!="number")return!1;var t=un(e);return!isNaN(Number(t))}var l2={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"}},o2=function(e,t,i){var s,l=l2[e];return typeof l=="string"?s=l:t===1?s=l.one:s=l.other.replace("{{count}}",t.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},c2=o2;function zl(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,s=e.formats[i]||e.formats[e.defaultWidth];return s}}var u2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},d2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},h2={date:zl({formats:u2,defaultWidth:"full"}),time:zl({formats:d2,defaultWidth:"full"}),dateTime:zl({formats:f2,defaultWidth:"full"})},g2=h2,m2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},p2=function(e,t,i,s){return m2[e]},M2=p2;function La(e){return function(t,i){var s=i||{},l=s.context?String(s.context):"standalone",c;if(l==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,g=s.width?String(s.width):u;c=e.formattingValues[g]||e.formattingValues[u]}else{var h=e.defaultWidth,p=s.width?String(s.width):e.defaultWidth;c=e.values[p]||e.values[h]}var m=e.argumentCallback?e.argumentCallback(t):t;return c[m]}}var C2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},y2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},I2={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"]},b2={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"]},N2={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"}},w2={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"}},L2=function(e,t){var i=Number(e),s=i%100;if(s>20||s<10)switch(s%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},v2={ordinalNumber:L2,era:La({values:C2,defaultWidth:"wide"}),quarter:La({values:y2,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:La({values:I2,defaultWidth:"wide"}),day:La({values:b2,defaultWidth:"wide"}),dayPeriod:La({values:N2,defaultWidth:"wide",formattingValues:w2,defaultFormattingWidth:"wide"})},k2=v2;function va(e){return function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.width,l=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],c=t.match(l);if(!c)return null;var u=c[0],g=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(g)?x2(g,function(C){return C.test(u)}):T2(g,function(C){return C.test(u)}),p;p=e.valueCallback?e.valueCallback(h):h,p=i.valueCallback?i.valueCallback(p):p;var m=t.slice(u.length);return{value:p,rest:m}}}function T2(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function x2(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}function S2(e){return function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=t.match(e.matchPattern);if(!s)return null;var l=s[0],c=t.match(e.parsePattern);if(!c)return null;var u=e.valueCallback?e.valueCallback(c[0]):c[0];u=i.valueCallback?i.valueCallback(u):u;var g=t.slice(l.length);return{value:u,rest:g}}}var D2=/^(\d+)(th|st|nd|rd)?/i,j2=/\d+/i,z2={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},J2={any:[/^b/i,/^(a|c)/i]},P2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Q2={any:[/1/i,/2/i,/3/i,/4/i]},O2={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},A2={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]},E2={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},V2={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]},R2={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},W2={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}},Z2={ordinalNumber:S2({matchPattern:D2,parsePattern:j2,valueCallback:function(e){return parseInt(e,10)}}),era:va({matchPatterns:z2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any"}),quarter:va({matchPatterns:P2,defaultMatchWidth:"wide",parsePatterns:Q2,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:va({matchPatterns:O2,defaultMatchWidth:"wide",parsePatterns:A2,defaultParseWidth:"any"}),day:va({matchPatterns:E2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),dayPeriod:va({matchPatterns:R2,defaultMatchWidth:"any",parsePatterns:W2,defaultParseWidth:"any"})},G2=Z2,Y2={code:"en-US",formatDistance:c2,formatLong:g2,formatRelative:M2,localize:k2,match:G2,options:{weekStartsOn:0,firstWeekContainsDate:1}},B2=Y2;function H2(e,t){kt(2,arguments);var i=Kt(t);return i2(e,-i)}var F2=864e5;function U2(e){kt(1,arguments);var t=un(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var s=t.getTime(),l=i-s;return Math.floor(l/F2)+1}function Nr(e){kt(1,arguments);var t=1,i=un(e),s=i.getUTCDay(),l=(s<t?7:0)+s-t;return i.setUTCDate(i.getUTCDate()-l),i.setUTCHours(0,0,0,0),i}function gd(e){kt(1,arguments);var t=un(e),i=t.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var l=Nr(s),c=new Date(0);c.setUTCFullYear(i,0,4),c.setUTCHours(0,0,0,0);var u=Nr(c);return t.getTime()>=l.getTime()?i+1:t.getTime()>=u.getTime()?i:i-1}function _2(e){kt(1,arguments);var t=gd(e),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var s=Nr(i);return s}var $2=6048e5;function X2(e){kt(1,arguments);var t=un(e),i=Nr(t).getTime()-_2(t).getTime();return Math.round(i/$2)+1}function wr(e,t){kt(1,arguments);var i=t||{},s=i.locale,l=s&&s.options&&s.options.weekStartsOn,c=l==null?0:Kt(l),u=i.weekStartsOn==null?c:Kt(i.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=un(e),h=g.getUTCDay(),p=(h<u?7:0)+h-u;return g.setUTCDate(g.getUTCDate()-p),g.setUTCHours(0,0,0,0),g}function md(e,t){kt(1,arguments);var i=un(e),s=i.getUTCFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,g=u==null?1:Kt(u),h=l.firstWeekContainsDate==null?g:Kt(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(s+1,0,h),p.setUTCHours(0,0,0,0);var m=wr(p,t),C=new Date(0);C.setUTCFullYear(s,0,h),C.setUTCHours(0,0,0,0);var b=wr(C,t);return i.getTime()>=m.getTime()?s+1:i.getTime()>=b.getTime()?s:s-1}function K2(e,t){kt(1,arguments);var i=t||{},s=i.locale,l=s&&s.options&&s.options.firstWeekContainsDate,c=l==null?1:Kt(l),u=i.firstWeekContainsDate==null?c:Kt(i.firstWeekContainsDate),g=md(e,t),h=new Date(0);h.setUTCFullYear(g,0,u),h.setUTCHours(0,0,0,0);var p=wr(h,t);return p}var q2=6048e5;function eg(e,t){kt(1,arguments);var i=un(e),s=wr(i,t).getTime()-K2(i,t).getTime();return Math.round(s/q2)+1}function Be(e,t){for(var i=e<0?"-":"",s=Math.abs(e).toString();s.length<t;)s="0"+s;return i+s}var tg={y:function(e,t){var i=e.getUTCFullYear(),s=i>0?i:1-i;return Be(t==="yy"?s%100:s,t.length)},M:function(e,t){var i=e.getUTCMonth();return t==="M"?String(i+1):Be(i+1,2)},d:function(e,t){return Be(e.getUTCDate(),t.length)},a:function(e,t){var i=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(e,t){return Be(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Be(e.getUTCHours(),t.length)},m:function(e,t){return Be(e.getUTCMinutes(),t.length)},s:function(e,t){return Be(e.getUTCSeconds(),t.length)},S:function(e,t){var i=t.length,s=e.getUTCMilliseconds(),l=Math.floor(s*Math.pow(10,i-3));return Be(l,t.length)}},ei=tg,Yi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ng={G:function(e,t,i){var s=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(e,t,i){if(t==="yo"){var s=e.getUTCFullYear(),l=s>0?s:1-s;return i.ordinalNumber(l,{unit:"year"})}return ei.y(e,t)},Y:function(e,t,i,s){var l=md(e,s),c=l>0?l:1-l;if(t==="YY"){var u=c%100;return Be(u,2)}return t==="Yo"?i.ordinalNumber(c,{unit:"year"}):Be(c,t.length)},R:function(e,t){var i=gd(e);return Be(i,t.length)},u:function(e,t){var i=e.getUTCFullYear();return Be(i,t.length)},Q:function(e,t,i){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return Be(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,i){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return Be(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,i){var s=e.getUTCMonth();switch(t){case"M":case"MM":return ei.M(e,t);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,i){var s=e.getUTCMonth();switch(t){case"L":return String(s+1);case"LL":return Be(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,i,s){var l=eg(e,s);return t==="wo"?i.ordinalNumber(l,{unit:"week"}):Be(l,t.length)},I:function(e,t,i){var s=X2(e);return t==="Io"?i.ordinalNumber(s,{unit:"week"}):Be(s,t.length)},d:function(e,t,i){return t==="do"?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):ei.d(e,t)},D:function(e,t,i){var s=U2(e);return t==="Do"?i.ordinalNumber(s,{unit:"dayOfYear"}):Be(s,t.length)},E:function(e,t,i){var s=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,i,s){var l=e.getUTCDay(),c=(l-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return Be(c,2);case"eo":return i.ordinalNumber(c,{unit:"day"});case"eee":return i.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(l,{width:"short",context:"formatting"});case"eeee":default:return i.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,i,s){var l=e.getUTCDay(),c=(l-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return Be(c,t.length);case"co":return i.ordinalNumber(c,{unit:"day"});case"ccc":return i.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(l,{width:"narrow",context:"standalone"});case"cccccc":return i.day(l,{width:"short",context:"standalone"});case"cccc":default:return i.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,i){var s=e.getUTCDay(),l=s===0?7:s;switch(t){case"i":return String(l);case"ii":return Be(l,t.length);case"io":return i.ordinalNumber(l,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,i){var s=e.getUTCHours(),l=s/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,i){var s=e.getUTCHours(),l;switch(s===12?l=Yi.noon:s===0?l=Yi.midnight:l=s/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,i){var s=e.getUTCHours(),l;switch(s>=17?l=Yi.evening:s>=12?l=Yi.afternoon:s>=4?l=Yi.morning:l=Yi.night,t){case"B":case"BB":case"BBB":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,i){if(t==="ho"){var s=e.getUTCHours()%12;return s===0&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return ei.h(e,t)},H:function(e,t,i){return t==="Ho"?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ei.H(e,t)},K:function(e,t,i){var s=e.getUTCHours()%12;return t==="Ko"?i.ordinalNumber(s,{unit:"hour"}):Be(s,t.length)},k:function(e,t,i){var s=e.getUTCHours();return s===0&&(s=24),t==="ko"?i.ordinalNumber(s,{unit:"hour"}):Be(s,t.length)},m:function(e,t,i){return t==="mo"?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ei.m(e,t)},s:function(e,t,i){return t==="so"?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):ei.s(e,t)},S:function(e,t){return ei.S(e,t)},X:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Md(c);case"XXXX":case"XX":return bi(c);case"XXXXX":case"XXX":default:return bi(c,":")}},x:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"x":return Md(c);case"xxxx":case"xx":return bi(c);case"xxxxx":case"xxx":default:return bi(c,":")}},O:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pd(c,":");case"OOOO":default:return"GMT"+bi(c,":")}},z:function(e,t,i,s){var l=s._originalDate||e,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pd(c,":");case"zzzz":default:return"GMT"+bi(c,":")}},t:function(e,t,i,s){var l=s._originalDate||e,c=Math.floor(l.getTime()/1e3);return Be(c,t.length)},T:function(e,t,i,s){var l=s._originalDate||e,c=l.getTime();return Be(c,t.length)}};function pd(e,t){var i=e>0?"-":"+",s=Math.abs(e),l=Math.floor(s/60),c=s%60;if(c===0)return i+String(l);var u=t||"";return i+String(l)+u+Be(c,2)}function Md(e,t){if(e%60===0){var i=e>0?"-":"+";return i+Be(Math.abs(e)/60,2)}return bi(e,t)}function bi(e,t){var i=t||"",s=e>0?"-":"+",l=Math.abs(e),c=Be(Math.floor(l/60),2),u=Be(l%60,2);return s+c+i+u}var ig=ng;function Cd(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 yd(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 ag(e,t){var i=e.match(/(P+)(p+)?/)||[],s=i[1],l=i[2];if(!l)return Cd(e,t);var c;switch(s){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Cd(s,t)).replace("{{time}}",yd(l,t))}var rg={p:yd,P:ag},sg=rg,lg=["D","DD"],og=["YY","YYYY"];function cg(e){return lg.indexOf(e)!==-1}function ug(e){return og.indexOf(e)!==-1}function Id(e,t,i){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; 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(i,"`; 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(i,"`; 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(i,"`; see: https://git.io/fxCyr"))}var dg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hg=/^'([^]*?)'?$/,gg=/''/g,mg=/[a-zA-Z]/;function pg(e,t,i){kt(2,arguments);var s=String(t),l=i||{},c=l.locale||B2,u=c.options&&c.options.firstWeekContainsDate,g=u==null?1:Kt(u),h=l.firstWeekContainsDate==null?g:Kt(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=c.options&&c.options.weekStartsOn,m=p==null?0:Kt(p),C=l.weekStartsOn==null?m:Kt(l.weekStartsOn);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!c.localize)throw new RangeError("locale must contain localize property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var b=un(e);if(!s2(b))throw new RangeError("Invalid time value");var y=a2(b),N=H2(b,y),k={firstWeekContainsDate:h,weekStartsOn:C,locale:c,_originalDate:b},x=s.match(fg).map(function(D){var L=D[0];if(L==="p"||L==="P"){var T=sg[L];return T(D,c.formatLong,k)}return D}).join("").match(dg).map(function(D){if(D==="''")return"'";var L=D[0];if(L==="'")return Mg(D);var T=ig[L];if(T)return!l.useAdditionalWeekYearTokens&&ug(D)&&Id(D,t,e),!l.useAdditionalDayOfYearTokens&&cg(D)&&Id(D,t,e),T(N,D,c.localize,k);if(L.match(mg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+L+"`");return D}).join("");return x}function Mg(e){return e.match(hg)[1].replace(gg,"'")}const mt={},bd=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ni=/\d\d?/,Cg=/\d{3}/,yg=/\d{4}/,Lr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Nd=function(){};function wd(e,t){const i=[];for(let s=0,l=e.length;s<l;s++)i.push(e[s].substr(0,t));return i}function Ld(e){return(t,i,s)=>{const l=s[e].indexOf(i.charAt(0).toUpperCase()+i.substr(1).toLowerCase());~l&&(t.month=l)}}function xn(e,t=2){let i=String(e);for(;i.length<t;)i=`0${i}`;return i}const vd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],kd=["January","February","March","April","May","June","July","August","September","October","November","December"],Ig=wd(kd,3),bg=wd(vd,3);mt.i18n={dayNamesShort:bg,dayNames:vd,monthNamesShort:Ig,monthNames:kd,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Td={D(e){return e.getDay()},DD(e){return xn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return xn(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 xn(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 xn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return xn(e.getHours())},m(e){return e.getMinutes()},mm(e){return xn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return xn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return xn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return xn(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?"-":"+")+xn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},nt={d:[Ni,(e,t)=>{e.day=t}],M:[Ni,(e,t)=>{e.month=t-1}],yy:[Ni,(e,t)=>{const s=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?s-1:s}${t}`}],h:[Ni,(e,t)=>{e.hour=t}],m:[Ni,(e,t)=>{e.minute=t}],s:[Ni,(e,t)=>{e.second=t}],yyyy:[yg,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Cg,(e,t)=>{e.millisecond=t}],D:[Ni,Nd],ddd:[Lr,Nd],MMM:[Lr,Ld("monthNamesShort")],MMMM:[Lr,Ld("monthNames")],a:[Lr,(e,t,i)=>{const s=t.toLowerCase();s===i.amPm[0]?e.isPm=!1:s===i.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const i=`${t}`.match(/([\\+\\-]|\d\d)/gi);let s;i&&(s=+(i[1]*60)+parseInt(i[2],10),e.timezoneOffset=i[0]==="+"?s:-s)}]};nt.DD=nt.D,nt.dddd=nt.ddd,nt.Do=nt.dd=nt.d,nt.mm=nt.m,nt.hh=nt.H=nt.HH=nt.h,nt.MM=nt.M,nt.ss=nt.s,nt.A=nt.a,mt.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"},mt.format=(e,t,i)=>{const s=i||mt.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=mt.masks[t]||t||mt.masks.default,t.replace(bd,l=>l in Td?Td[l](e,s):l.slice(1,l.length-1))},mt.parse=(e,t,i)=>{const s=i||mt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=mt.masks[t]||t,e.length>1e3)return!1;let l=!0;const c={};if(t.replace(bd,h=>{if(nt[h]){const p=nt[h],m=e.search(p[0]);~m?e.replace(p[0],C=>(p[1](c,C,s),e=e.substr(m+C.length),C)):l=!1}return nt[h]?"":h.slice(1,h.length-1)}),!l)return!1;const u=new Date;c.isPm===!0&&c.hour!==null&&+c.hour!=12?c.hour=+c.hour+12:c.isPm===!1&&+c.hour==12&&(c.hour=0);let g;return c.timezoneOffset!==null&&c.timezoneOffset!==void 0?(c.minute=+(c.minute||0)-+c.timezoneOffset,g=new Date(Date.UTC(c.year||u.getFullYear(),c.month||0,c.day||1,c.hour||0,c.minute||0,c.second||0,c.millisecond||0))):g=new Date(c.year||u.getFullYear(),c.month||0,c.day||1,c.hour||0,c.minute||0,c.second||0,c.millisecond||0),g};const Jl=" - ",An=(e,t)=>{const i=un(new Date(e));return!i||isNaN(i.getTime())?"":pg(i,t||"yyyy-MM-dd")},Pl=(e,t)=>{if(Array.isArray(e)&&e.length===2){const i=e[0],s=e[1];if(i&&s)return An(i,t)+Jl+An(s,t)}else if(!Array.isArray(e)&&e instanceof Date)return An(e,t);return""},Ql=(e,t)=>{const i=Array.isArray(e)?e:e.split(Jl);if(i.length===2){const s=i[0],l=i[1];return[s instanceof Date?s:mt.parse(s,t||"yyyy-MM-dd"),l instanceof Date?l:mt.parse(l,t||"yyyy-MM-dd")]}return[]},Bi={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Pl,parser:Ql},datetimerange:{formatter:Pl,parser:Ql},timerange:{formatter:Pl,parser:Ql},time:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>An(e,t),parser:(e,t)=>mt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(i=>An(i,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(s=>{if(s instanceof Date)return s;let l=s;return typeof s=="string"?l=s.trim():typeof s!="number"&&!s&&(l=""),mt.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Ng=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},wg=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),xd=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Sd={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"},vr=(e,t,i,s)=>{const l=t.includes("range"),{parser:c}=Bi[t]||Bi.default,u=s||Sd[t],g=Bi.multiple.parser;let h=e;if(e&&t==="time"&&!(e instanceof Date))h=c(e,u);else if(i&&e)h=g(e,u);else if(l)if(!e)h=[null,null];else if(typeof e=="string")h=c(e,u);else if(t==="timerange")h=c(e,u).map(p=>p||"");else{const[p,m]=e;p instanceof Date&&m instanceof Date?h=e.map(C=>new Date(C)):typeof p=="string"&&typeof m=="string"?h=c(e.join(Jl),u):(!p||!m)&&(h=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(h=c(e,u)||null);return l||i?h||[]:[h]},ka=(e,t,i,s)=>{const l=Sd[t];if(i){const{formatter:u}=Bi.multiple;return u(e,s||l)}const{formatter:c}=Bi[t]||Bi.default;return c(e,s||l)},Lg=Symbol("date-picker");function qt(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const vg=(e,t)=>new Date(e,t+1,0).getDate(),Dd=(e,t)=>{const i=new Date(e),s=i.getMonth()+t,l=vg(i.getFullYear(),s);return l<i.getDate()&&i.setDate(l),i.setMonth(s),i},jd=(()=>{const e={yyyy:i=>i.getFullYear(),m:i=>i.getMonth()+1,mm:i=>`0${i.getMonth()+1}`.slice(-2),mmm:(i,s)=>i.toLocaleDateString(s,{month:"long"}).slice(0,3),Mmm:(i,s)=>{const l=i.toLocaleDateString(s,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(i,s)=>i.toLocaleDateString(s,{month:"long"}),Mmmm:(i,s)=>{const l=i.toLocaleDateString(s,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(i,s,l)=>{const c=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=s.match(c).slice(1),g=u[1],h=[u[0],u[2]].map(p=>({label:p.replace(/\[[^\]]+\]/,C=>C.slice(1,-1).replace(t,b=>e[b](l,i))),type:p.indexOf("yy")!==-1?"year":"month"}));return{separator:g,labels:h}}})(),wi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},kg=(e,t,i)=>{if(!t||!i)return!1;const[s,l]=[t,i].sort();return e>=s&&e<=l},Tg={tableDate:{type:Date,required:!0},disableDate: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 Ol=a.defineComponent({props:Tg,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const i=a.computed(()=>new n2.Generator({onlyDays:!0,weekStart:0})),s=a.computed(()=>{const p=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return p.splice(0,7-0).concat(p.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),c=a.computed(()=>{const p=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),C=wi(new Date),b=l.value.filter(Boolean).map(wi),[y,N]=l.value.map(wi),k=e.rangeState.from&&wi(e.rangeState.from),x=e.rangeState.to&&wi(e.rangeState.to),D=e.selectionMode==="range",L=typeof e.disableDate=="function"&&e.disableDate;return i.value(p,m,T=>{T.date instanceof Date&&T.date.setTime(T.date.getTime()+T.date.getTimezoneOffset()*6e4);const z=T.date&&wi(T.date),A=T.date&&m===T.date.getMonth();return ze(Z({},T),{type:z===C?"today":T.type,selected:A&&b.includes(z),disabled:T.date&&L&&L(new Date(z)),range:A&&D&&kg(z,k,x),start:A&&D&&z===y,end:A&&D&&z===N})}).cells.slice(0)});return{headerDays:s,cells:c,getCellCls:p=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:p.selected||p.start||p.end,["bk-date-picker-cells-cell-disabled"]:p.disabled,["bk-date-picker-cells-cell-today"]:p.type==="today",["bk-date-picker-cells-cell-prev-month"]:p.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:p.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:p.type==="weekLabel",["bk-date-picker-cells-cell-range"]:p.range&&!p.start&&!p.end}],handleClick:p=>{if(p.disabled||p.type==="weekLabel")return;const m=new Date(wi(p.date));t("pick",m),t("pick-click")},handleMouseMove:p=>{if(!e.rangeState.selecting||p.disabled)return;const m=p.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 xg={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};var Sg=a.defineComponent({props:xg,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:i}){const s=O=>O.match(/^time/)?"time-picker":`${O}-table`,l=e.modelValue.slice().sort(),c=a.reactive({currentView:e.selectionMode||"date",pickerTable:s(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),u=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},g=O=>{c.panelDate=O,c.pickerTable==="year-table"?c.pickerTable="month-table":c.pickerTable=s(c.currentView)},h=(O,V)=>{let U=O;e.selectionMode==="year"?U=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?U=new Date(c.panelDate.getFullYear(),O.getMonth(),1):U=new Date(O),c.dates=[U],i("pick",U,!1,V||e.selectionMode)},p=()=>{u(),i("pick-success")},m=()=>{u(),i("pick-clear")},C=O=>{O.value&&i("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&p()},b=()=>{c.currentView=e.selectionMode,c.pickerTable=s(c.currentView)},y=O=>{e.selectionMode==="year"||c.pickerTable==="year-table"?c.panelDate=new Date(c.panelDate.getFullYear()+O*10,0,1):c.panelDate=Dd(c.panelDate,O*12)},N=O=>{c.panelDate=Dd(c.panelDate,O)},k=a.ref(null),x=a.ref(null),D=O=>{var V,U;O&&((V=k==null?void 0:k.value)==null||V.updateScroll(),(U=x==null?void 0:x.value)==null||U.updateScroll())},L=a.computed(()=>c.pickerTable===`${c.currentView}-table`?h:g),T=a.computed(()=>{const O="zh-CN",V="[yyyy]-[mm]",U=c.panelDate,{labels:ue,separator:ee}=jd(O,V,U),ge=Me=>()=>{c.pickerTable=s(Me)};return{separator:ee,labels:ue.map(Me=>{const he=Me;return he.handler=ge(Me.type),he})}}),z=a.computed(()=>T.value.labels[0].type==="year"||c.currentView==="date"),A=a.computed(()=>T.value.labels[1].type==="year"||c.currentView==="date"),K=a.computed(()=>c.currentView==="time"),R=()=>{c.currentView=c.currentView==="time"?"date":"time"},F=a.computed(()=>!!t.shortcuts);return ze(Z({},a.toRefs(c)),{panelPickerHandlers:L,datePanelLabel:T,showLabelFirst:z,showLabelSecond:A,handleShortcutClick:C,changeYear:y,changeMonth:N,reset:b,isTime:K,hasShortcuts:F,onToggleVisibility:D,handleToggleTime:R,handlePickSuccess:p,handlePickClear:m})},render(){var e,t,i;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:s=>{s.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(s=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(s)},[s.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:qt("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Pn,{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(Ol,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode($h,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(i=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?i:null]):null])}});const Dg={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var jg=a.defineComponent({props:Dg,emits:["pick"],setup(e,{slots:t,emit:i}){const[s,l]=e.modelValue.map(Q=>Q||Ng()),c=e.startDate?e.startDate:s,u=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:c,rightPanelDate:new Date(c.getFullYear(),c.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:s&&!l},upToNowEnable:!1,dates:e.modelValue}),g=(Q,j)=>!Q||!j?0:Q.getTime()-j.getTime(),h=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},p=a.ref(null),m=a.ref(null),C=Q=>{var j,E;Q&&((j=p==null?void 0:p.value)==null||j.updateScroll(),(E=m==null?void 0:m.value)==null||E.updateScroll())},b=(Q,j,E,G=!0)=>{const q=new Date(u[`${Q}PanelDate`]);if(q[`set${j}`](q[`get${j}`]()+E),u[`${Q}PanelDate`]=q,!!G)if(e.splitPanels){const ae=Q==="left"?"right":"left";Q==="left"&&u.leftPanelDate>=u.rightPanelDate&&b(ae,j,1),Q==="right"&&u.rightPanelDate<=u.leftPanelDate&&b(ae,j,-1)}else{const ae=Q==="left"?"right":"left",be=u[`${ae}PanelDate`],Y=new Date(be);if(j==="Month"){const re=new Date(Y.getFullYear(),Y.getMonth()+E+1,0).getDate();Y.setDate(Math.min(re,Y.getDate()))}Y[`set${j}`](Y[`get${j}`]()+E),u[`${ae}PanelDate`]=Y}},y=Q=>{const j=u.currentView==="year"?-10:-1;b(Q,"FullYear",j)},N=Q=>{const j=u.currentView==="year"?10:1;b(Q,"FullYear",j)},k=Q=>{b(Q,"Month",-1)},x=Q=>{b(Q,"Month",1)},D=Q=>{u[`${Q}PickerTable`]="year-table"},L=Q=>{u[`${Q}PickerTable`]="month-table"},T=Q=>{const j="zh-CN",E="[yyyy]-[mm]",G=u[`${Q}PanelDate`],{labels:q,separator:ae}=jd(j,E,G),be=Y=>{const re=Y==="month"?L:D;return()=>re(Q)};return{separator:ae,labels:q.map(Y=>{const re=Y;return re.handler=be(Y.type),re})}},z=(Q,j)=>{i("pick",u.dates,Q,j||e.type)},A=(Q,j)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=Q;else{const[E,G]=[u.rangeState.from,Q].sort(g),q=j==="upToNow"?new Date:new Date(new Date(new Date(G.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[E,q],u.rangeState={from:E,to:q,selecting:!1}}z(!1,j||"date")}else u.upToNowEnable=new Date(Q).getTime()<new Date().getTime(),u.rangeState={from:Q,to:null,selecting:!0}},K=(Q,j)=>{if(u[`${Q}PanelDate`]=j,u[`${Q}PickerTable`]==="year-table"?u[`${Q}PickerTable`]="month-table":u[`${Q}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const G=Q==="left"?"right":"left";u[`${G}PanelDate`]=j,b(G,"Month",G==="left"?-1:1,!1)}},R=Q=>{u.rangeState.to=Q};a.watch(()=>e.selectionMode,Q=>{u.currentView=Q||"range"});const F=a.computed(()=>u.currentView==="time"),O=a.computed(()=>T("left")),V=a.computed(()=>T("right")),U=a.computed(()=>u.leftPickerTable.split("-").shift()),ue=a.computed(()=>u.rightPickerTable.split("-").shift()),ee=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),ge=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),Me=a.computed(()=>V.value.labels[0].type==="year"||u.currentView==="date"),he=a.computed(()=>V.value.labels[1].type==="year"||u.currentView==="date"),ce=a.computed(()=>{const Q=`${u.currentView}-table`;return{left:u.leftPickerTable!==Q,right:u.rightPickerTable!==Q}}),ie=a.computed(()=>({left:ce.value.left?K.bind("left"):A,right:ce.value.right?K.bind("right"):A})),se=a.computed(()=>!!t.shortcuts);return ze(Z({},a.toRefs(u)),{isTime:F,hasShortcuts:se,prevYear:y,nextYear:N,prevMonth:k,nextMonth:x,leftDatePanelLabel:O,rightDatePanelLabel:V,leftDatePanelView:U,rightDatePanelView:ue,leftShowLabelFirst:ee,leftShowLabelSecond:ge,rightShowLabelFirst:Me,rightShowLabelSecond:he,preSelecting:ce,panelPickerHandlers:ie,reset:h,onToggleVisibility:C,handleRangePick:A,handleChangeRange:R})},render(){var e,t,i;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:s=>{s.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:qt("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Pn,{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(Ol,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:qt("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(pa,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(mi,{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:qt("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Ma,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:qt("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Pn,{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(Ol,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(i=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?i:null]):null])}});const zg={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}},disableDate:Function};var Jg=a.defineComponent({name:"DatePicker",directives:{clickoutside:Cr},props:zg,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:i}){const s=Un(),l=e.type.includes("range"),c=l?[null,null]:[null];let u=wg((l?e.modelValue:[e.modelValue])||[])?c:vr(e.modelValue,e.type,e.multiple,e.format),g=null;e.shortcutSelectedIndex!==-1&&(g=e.shortcuts[e.shortcutSelectedIndex]||null,g&&(u=g.value()));const h=a.reactive({showClose:!1,visible:!1,internalValue:u,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:u[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:u.map(xd),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:g,onSelectionModeChange:p});function p(Y){let re=Y;return Y.match(/^date/)&&(re="date"),h.selectionMode=["year","month","date","time"].indexOf(re)>-1&&re,h.selectionMode}const m=a.computed(()=>{if(e.multiple)return h.internalValue.slice();const Y=e.type.includes("range");let re=h.internalValue.map(ve=>ve instanceof Date?new Date(ve):ve||"");return e.type.match(/^time/)&&(re=re.map(ve=>ka(ve,e.type,e.multiple,e.format))),Y||e.multiple?re:re[0]}),C=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?ka(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(Y=>ka(Y,e.type,e.multiple,e.format)):ka(m.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),y=a.computed(()=>e.open===null?h.visible:e.open),N=a.computed(()=>ka(h.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?h.shortcut.text:N.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),D=a.computed(()=>!!t.header),L=a.computed(()=>!!t.footer),T=a.computed(()=>!!t.shortcuts),z=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-font":e.fontSize==="large"&&(Y="large-font"),Y}),A=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-width":e.fontSize==="large"&&(Y="large-width"),Y}),K=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),R=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),F=a.ref(null),O=()=>{var Y;(Y=F==null?void 0:F.value)==null||Y.focus()};a.watch(()=>h.visible,Y=>{var re,ve;Y===!1&&((re=V.value)==null||re.destoryDropdown()),(ve=V.value)==null||ve.updateDropdown(),i("open-change",Y)});const V=a.ref(null);a.watch(()=>e.modelValue,Y=>{h.internalValue=vr(Y,e.type,e.multiple,e.format)}),a.watch(()=>e.open,Y=>{h.visible=Y===!0}),a.watch(()=>e.type,Y=>{p(Y)}),a.watch(()=>m,(Y,re)=>{const ve=JSON.stringify(Y),ot=JSON.stringify(re);(ve!==ot||typeof Y!=typeof re)&&i("input",Y)}),a.onMounted(()=>{e.type.indexOf("date")>-1,h.timeEnterMode=!0;const Y=e.modelValue,re=m.value;(typeof Y!=typeof re||JSON.stringify(Y)!==JSON.stringify(re))&&i("input",m.value),e.open!==null&&(h.visible=e.open),a.provide(Lg,{props:e,focus:()=>O()})});const U=a.ref(null),ue=Y=>{var re;if(h.disableCloseUnderTransfer)return h.disableCloseUnderTransfer=!1,!1;if(Y&&Y.type==="mousedown"&&h.visible){Y.preventDefault(),Y.stopPropagation();return}if(h.visible){const ve=(re=U==null?void 0:U.value)==null?void 0:re.$el;if(Y&&ve&&ve.contains(Y.target))return;h.visible=!1,Y==null||Y.preventDefault(),Y==null||Y.stopPropagation();return}h.isFocused=!1,h.disableClickOutSide=!1},ee=()=>{var Y,re;(Y=F==null?void 0:F.value)==null||Y.focus(),(re=F==null?void 0:F.value)==null||re.click()},ge=()=>{e.readonly||e.disabled||N!=null&&N.value&&(h.showClose=!0)},Me=Y=>{var re;(re=Y.toElement)!=null&&re.classList.contains("clear-action")||(h.showClose=!1)},he=Y=>{a.nextTick(()=>{var re,ve;i("change",C.value,Y),i("update:modelValue",m.value),(re=s==null?void 0:s.validate)==null||re.call(s,"change"),e.type.indexOf("time")<0&&((ve=F==null?void 0:F.value)==null||ve.blur())})},ce=Y=>{var bt;const re=e.type.includes("range")||e.multiple,ve=N.value,ot=Y.target.value,Fe=vr(ot,e.type,e.multiple,e.format),Tt=re?Fe:Fe[0],pt=(bt=e.disableDate)==null?void 0:bt.call(e,Tt),et=Fe.reduce(($,te)=>$&&te instanceof Date,!0);ot!==ve&&!pt&&et?(he(e.type),h.internalValue=Fe):h.forceInputRerender=h.forceInputRerender+1},ie=Y=>{e.readonly||(h.isFocused=!0,!(Y&&Y.type==="focus")&&(e.disabled||(h.visible=!0)))},se=()=>{var Y;(Y=U==null?void 0:U.value)==null||Y.reset()},Q=Y=>{var re,ve;if(h.internalFocus){h.internalFocus=!1;return}if(h.visible){Y.preventDefault();return}h.isFocused=!1,p(e.type),h.internalValue=h.internalValue.slice(),se(),(re=U==null?void 0:U.value)==null||re.onToggleVisibility(!1),(ve=s==null?void 0:s.validate)==null||ve.call(s,"blur")},j=Y=>{const{keyCode:re}=Y;if(re===9&&h.visible)if(Y.stopPropagation(),Y.preventDefault(),x.value){const ot=".bk-picker-confirm > *",Fe=V.value.$el.querySelectorAll(ot);h.internalFocus=!0,[...Fe][Y.shiftKey?"pop":"shift"]().focus()}else ue();const ve=[37,38,39,40];if(!h.visible&&ve.includes(re)){h.visible=!0;return}re===27&&h.visible&&(Y.stopPropagation(),ue()),!!ve.includes(re)&&h.focusedTime.active&&Y.preventDefault()},E=()=>{h.visible=!1,h.internalValue=h.internalValue.map(()=>null),i("clear"),he(e.type),se(),h.showClose=!1,h.shortcut=null,setTimeout(()=>p(e.type),500)},G=()=>{e.appendToBody&&(h.disableCloseUnderTransfer=!0)},q=()=>{var Y;h.visible=!1,console.error("onPickSuccess"),a.nextTick(()=>{i("pick-success")}),(Y=F==null?void 0:F.value)==null||Y.blur(),se()},ae=(Y,re=!1,ve,ot)=>{let Fe=Y;if(e.multiple){const pt=Fe.getTime(),et=h.internalValue.findIndex(te=>te&&te.getTime()===pt),$=[...h.internalValue,Fe].filter(Boolean).map(te=>te.getTime()).filter((te,oe,Ne)=>Ne.indexOf(te)===oe&&oe!==et);h.internalValue=$.map(te=>new Date(te))}else Fe=vr(Y,e.type,e.multiple,e.format),h.internalValue=Array.isArray(Fe)?Fe:[Fe];if(h.internalValue[0]){const[pt]=h.internalValue;h.focusedDate=pt}h.focusedTime=ze(Z({},h.focusedTime),{time:h.internalValue.map(xd)}),x.value||(p(e.type),h.visible=re),ve==="upToNow"&&e.type==="daterange"&&q(),h.shortcut=ot,he(ve);const Tt=e.shortcuts.findIndex(pt=>pt===h.shortcut);i("shortcut-change",h.shortcut,Tt)},be=a.ref(null);return ze(Z({},a.toRefs(h)),{panel:b,publicStringValue:C,opened:y,visualValue:N,displayValue:k,isConfirm:x,hasHeader:D,hasFooter:L,hasShortcuts:T,fontSizeCls:z,longWidthCls:A,localReadonly:K,allowCrossDayProp:R,pickerDropdownRef:V,inputRef:F,triggerRef:be,pickerPanelRef:U,handleClose:ue,handleIconClick:ee,handleInputMouseenter:ge,handleInputMouseleave:Me,handleFocus:ie,handleBlur:Q,handleKeydown:j,handleInputChange:ce,handleClear:E,handleTransferClick:G,onPick:ae,onPickSuccess:q})},render(){var i,s,l;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[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,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode("i",{class:"bk-icon icon-close-circle-shape clear-action",onClick:this.handleClear},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var c,u;return((u=(c=this.$slots).shortcuts)==null?void 0:u.call(c))||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"},[(l=(s=(i=this.$slots).trigger)==null?void 0:s.call(i))!=null?l: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(Uh,{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 c,u,g,h,p,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(g=(u=(c=this.$slots).header)==null?void 0:u.call(c))!=null?g:null]):null,this.panel==="DateRangePanel"?a.createVNode(jg,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(Sg,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(p=(h=this.$slots).footer)==null?void 0:p.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const zd=Re(Jg);var Sn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Sn||{});const Pg={title:d.arrayOf(d.string).def([]),extCls:d.string.def(""),searchPlaceholder:d.string.def(""),settingKey:d.string.def("id"),displayKey:d.string.def("value"),sortKey:d.string.def("value"),showOverflowTips:d.bool.def(!1),searchable:d.bool.def(!1),sortable:d.bool.def(!1),sourceList:d.arrayOf(d.any).def([]),targetList:d.arrayOf(d.any).def([]),emptyContent:d.arrayOf(d.string).def([])};function Qg(e,t,i){const s=a.ref([]),l=a.ref([]),c=()=>{e.value.forEach(u=>{const g=u[i.value];t.value.includes(g)?l.value.push(u):s.value.push(u)})};return c(),a.watch(()=>[e,t,i],c),{selectList:s,selectedList:l}}function Og(e,t){const i=a.ref(""),s=a.computed(()=>e.value.filter(l=>{const c=l[t.value];return c instanceof Object?!1:c.toString().includes(i.value)}));return{selectSearchQuery:i,selectListSearch:s}}var Ag=a.defineComponent({name:"Transfer",props:Pg,emits:["change","update:targetList"],setup(e,{emit:t}){const i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(T=>T.toString().includes("[object Object]"))?Sn.OBJECT_ARRAY:Sn.BASE_ARRAY:Sn.NOT_ARRAY),s=a.computed(()=>i.value===Sn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===Sn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(i.value){case Sn.BASE_ARRAY:return[...new Set(e.sourceList)].map(L=>({value:L}));case Sn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:g}=a.toRefs(e),{selectList:h,selectedList:p}=Qg(u,g,s),{selectSearchQuery:m,selectListSearch:C}=Og(h,l),b=a.computed(()=>[...C.value].sort((L,T)=>{const z=L[c.value],A=T[c.value];return z>A?1:-1})),y=a.computed(()=>[...p.value].sort((L,T)=>{const z=L[c.value],A=T[c.value];return z>A?1:-1})),N=()=>{h.value=[],p.value=[...u.value],D()},k=()=>{h.value=[...u.value],p.value=[],D()},x=(L,T)=>{const z=T?h:p,A=T?p:h,K=z.value.findIndex(R=>R[s.value]===L);A.value.push(...z.value.splice(K,1)),D()},D=()=>{const L=h.value.map(z=>z[s.value]),T=p.value.map(z=>z[s.value]);t("update:targetList",T),t("change",i.value===Sn.BASE_ARRAY?L:h.value.map(z=>a.toRaw(z)),i.value===Sn.BASE_ARRAY?T:p.value.map(z=>a.toRaw(z)),T)};return{selectSearchQuery:m,selectListSearch:C,selectedList:p,selectListSort:b,selectedListSort:y,settingCode:s,displayCode:l,allToRight:N,allToLeft:k,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,i=u=>{var C,b;const g=u==="left-header",h=g?`${(C=this.title[0])!=null?C:"\u5DE6\u4FA7\u5217\u8868"}`:`${(b=this.title[1])!=null?b:"\u53F3\u4FA7\u5217\u8868"}`,p=g?!e.length:!t.length,m=()=>{p||(g?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${h}\uFF08\u5171${g?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:p},onClick:()=>m()},[g?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},s=u=>{var p;const g=u==="left-empty-content",h=(p=g?this.emptyContent[0]:this.emptyContent[1])!=null?p:g?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[h])},l=(u,g=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[g?a.createVNode(Os,{class:"bk-icon"},null):a.createVNode(wn,{class:"bk-icon"},null)])]),c=u=>{const g=u==="left",h=g?e:t,p=g?"source-option":"target-option",m=g?"left-empty-content":"right-empty-content";return h.length?a.createVNode("ul",{class:["content",this.searchable&&g?"is-search":""]},[h.map(C=>{var b,y,N;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[p]?"custom-item":""],onClick:()=>this.handleItemClick(C[this.settingCode],g)},[(N=(y=(b=this.$slots)[p])==null?void 0:y.call(b,C))!=null?N:l(C,g)])})]):s(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[i("left-header"),this.searchable&&a.createVNode(Mi,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),c("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[i("right-header"),c("right")])])}});const Jd=Re(Ag);var kr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e))(kr||{});const Al=(...e)=>!0,Eg={nodeClick:Al,nodeCollapse:Al,nodeExpand:Al};var H=(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))(H||{});const ti={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Vg={data:d.arrayOf(d.any).def([]),label:d.oneOfType([d.func.def(void 0),d.string.def("label")]),nodeKey:d.string.def(void 0),children:d.string.def("children"),indent:d.number.def(18),lineHeight:d.number.def(32),levelLine:d.oneOfType([d.bool.def(!1),d.func.def(void 0),d.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:d.bool.def(!1),prefixIcon:d.oneOfType([d.func.def(()=>{}),d.bool.def(!1)]).def(!0),async:d.shape({callback:d.func.def(void 0),cache:d.bool.def(!0),deepAutoOpen:d.commonType(["once","every"],"columnType").def("once")}),offsetLeft:d.number.def(5),search:d.oneOfType([d.shape({value:d.oneOfType([d.number,d.string,d.bool]).def(""),match:d.oneOfType([d.commonType(["fuzzy","full"],"TreeSearchMatchType"),d.func]),resultType:d.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:d.bool}),d.string,d.number,d.bool]).def(void 0),emptyText:d.string.def("\u6CA1\u6709\u6570\u636E"),draggable:d.bool.def(!1),dragSort:d.bool.def(!1),selectable:d.bool.def(!0),selected:d.oneOfType([d.string,null,d.number,d.object]).def(null),autoCheckChildren:d.bool.def(!0),autoOpenParentNode:d.bool.def(!0)};var Rg=(e,{slots:t})=>({renderEmpty:i=>a.createVNode(dr,{scene:"part",type:i},{default:()=>{var s,l;return[(l=(s=t.default)==null?void 0:s.call(t))!=null?l:e.emptyText]}})}),Tr=(e,t)=>{const i=O=>e.schema.get(O),s=(O,V)=>{var U;return(U=i(O[H.UUID]))==null?void 0:U[V]},l=(O,V,U)=>{e.schema.set(O[H.UUID],ze(Z({},i(O[H.UUID])),{[V]:U}))},c=O=>s(O,H.PATH),u=O=>s(O,H.UUID),g=O=>s(O,H.IS_ROOT),h=O=>s(O,H.IS_OPEN),p=O=>s(O,H.HAS_CHILD),m=O=>s(O,H.IS_MATCH),C=O=>s(O,H.IS_CHECKED),b=O=>s(O,H.PARENT_ID),y=O=>s({[H.UUID]:O},H.PARENT_ID),N=O=>s(O,H.IS_LOADING),k=(O,V)=>{l(O,H.IS_LOADING,V)},x=O=>e.schema.delete(O),D=O=>{var V;return typeof O=="object"?h(O):typeof O=="string"?(V=i(O))==null?void 0:V[H.IS_OPEN]:!1},L=O=>D(s(O,H.PARENT_ID)),T=O=>g(O)||L(O),z=O=>O.split("-").reduce((U,ue)=>{const ee=Number(ue);return Array.isArray(U)?U[ee]:U[t.children][ee]},t.data),A=O=>z(c({[H.UUID]:O})),K=O=>g({[H.UUID]:O})?{[t.children]:t.data}:A(y(O)),R=O=>({[ti[H.IS_LOADING]]:s(O,H.IS_LOADING),[ti[H.HAS_CHILD]]:p(O),[ti[H.IS_MATCH]]:m(O),[ti[H.IS_CHECKED]]:C(O),[ti[H.IS_OPEN]]:h(O),[ti[H.IS_ROOT]]:g(O),fullPath:s(O,H.PATH),uuid:u(O),parentId:s(O,H.PARENT_ID)});return{getSchemaVal:i,getNodeAttr:s,getNodeId:u,getNodeParentId:b,getNodeParentIdById:y,getParentNodeData:K,setNodeAttr:l,getNodePath:c,isRootNode:g,isNodeOpened:h,hasChildNode:p,isItemOpen:D,isNodeChecked:C,isNodeMatched:m,isNodeLoading:N,checkNodeIsOpen:T,getSourceNodeByPath:z,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:R,setTreeNodeLoading:k,extendNodeAttr:O=>ze(Z({},O),{[H.TREE_NODE_ATTR]:R(O)})}};const Pd="1px dashed #c3cdd7",Qd=(e,t,i=null,s=null,l=null,c=[])=>{const u=e[t];return typeof u=="boolean"?u?s:l:Od(i,e,t,c)},Od=(e,t,i,s=[])=>{const l=t[i];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const c=l.apply(globalThis,[e,...s]);if(typeof c=="string")return c;console.error("props label with function return value is not string, please check and return string");return}},Ad=(e,t)=>Od(e,t,"label"),El=(e,t)=>e.get(t)||{},Wg=(e,t,i)=>{var s;return(s=El(e,t))==null?void 0:s[i]},Zg=(e,t)=>({"--level-line":Qd(t,"levelLine",e,Pd,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Gg=(e,t,i={})=>{const{schema:s}=i,l=Wg(s,e[H.UUID],H.DEPTH);return Z({"--depth":l},typeof t.levelLine=="function"?{"--level-line":Qd(t,"levelLine",e,Pd,null,["node"])}:{})},Yg=(e,t,i)=>{const{__is_root:s,__is_open:l}=El(t,e[H.UUID])||{};return{"is-root":s,"bk-tree-node":!0,"is-open":l,"is-virtual-render":i.virtualRender,"level-line":i.levelLine}},Bg=(e,t)=>{const{__is_checked:i,__is_selected:s}=El(t,e[H.UUID])||{};return{"is-checked":i,"is-selected":s,[rt("node-row")]:!0}},Hg=(e,t,i,s,l)=>{Fg(e,t,i,{[s]:l})},Fg=(e,t,i,s)=>{const c=e.split("-").reduce((u,g)=>{const h=Number(g);return Array.isArray(u)?u[h]:u[i][h]},t);Object.assign(c,s||{})},Ta=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[H.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,H.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Ed=(e,t)=>{const{setNodeAttr:i,getNodePath:s,getNodeAttr:l,resolveScopedSlotParam:c,setTreeNodeLoading:u}=Tr(t,e),g=(m,C)=>{if(typeof m=="object"&&m!==null){i(C,H.IS_OPEN,!0);const b=Array.isArray(m)?m:[m];return Hg(s(C),e.data,e.children,e.children,b),Promise.resolve(m)}return Promise.resolve(m)},h=m=>{const{callback:C=null,cache:b=!0}=e.async||{};if(typeof C=="function"&&l(m,H.IS_ASYNC)){if(i(m,H.IS_ASYNC_INIT,!0),!l(m,H.IS_CACHED)){i(m,H.IS_CACHED,b);const y=c(m),N=C(m,k=>g(k,m),y);if(typeof N=="object"&&N!==null)return u(m,!0),N instanceof Promise?Promise.resolve(N.then(k=>g(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{u(m,!1),i(m,H.IS_CACHED,!0)})):(g(N,m),u(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},p=()=>{const m=t.data.filter(C=>l(C,H.IS_ASYNC)&&C[ti[H.IS_OPEN]]&&!l(C,H.IS_ASYNC_INIT));m.length&&Promise.all(m.map(C=>h(C))).then(()=>{p()}).catch(C=>{console.warn(C)})};return{asyncNodeClick:h,deepAutoOpen:p}},Ug=(e,t,i,s,l,c)=>{let u=e.selected;const{setNodeAttr:g,getNodePath:h,getSchemaVal:p,getNodeAttr:m,getNodeId:C,isRootNode:b,hasChildNode:y,isItemOpen:N,isNodeOpened:k,isNodeLoading:x,resolveScopedSlotParam:D,extendNodeAttr:L}=Tr(i,e),{registerNextLoop:T}=c,{asyncNodeClick:z,deepAutoOpen:A}=Ed(e,i),K=j=>N(j)?a.createVNode(Zs,{class:rt("tree-icon")},null):a.createVNode(Gs,{class:rt("tree-icon")},null),R=j=>{if(typeof j=="string")return j;if(typeof j=="object"&&j!==null){if(j.__v_isVNode)return j;const{node:E,className:G,text:q,style:ae}=j;return a.h(E,{class:G,style:ae},q)}return null},F=j=>{var E,G,q;return((q=(G=(E=t.slots).nodeLoading)==null?void 0:G.call(E,L(j)))!=null?q:x(j))?a.createVNode(Us,null,null):""},O=j=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(j));let E=null;return x(j)?F(j):typeof e.prefixIcon=="function"&&(E=e.prefixIcon(L(j),"node_action"),E!=="default")?R(E):(E==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(y(j)||j.async||!e.autoCheckChildren)?N(j)?a.createVNode(ar,null,null):a.createVNode(ya,null,null):null},V=j=>{if(t.slots.nodeType)return t.slots.nodeType(L(j));let E=null;return typeof e.prefixIcon=="function"&&(E=e.prefixIcon(L(j),"node_type"),E!=="default")?R(E):E==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(j)||y(j)?K(j):a.createVNode($s,{class:rt("tree-icon")},null):null},U=(j,E=null,G=null,q=!0)=>{const ae=E===null?!N(j):!!E;if(ae||s.value.filter(be=>String.prototype.startsWith.call(h(be),h(j))).forEach(be=>g(be,H.IS_OPEN,ae)),g(j,H.IS_OPEN,ae),q){const be=N(j)?kr.NODE_EXPAND:kr.NODE_COLLAPSE;t.emit(be,j,D(j),p(j[H.UUID]),G)}},ue=(j,E,G)=>{if(Array.isArray(j)){j.forEach(q=>g(Ta(q),E,G));return}g(Ta(j),E,G)},ee=(j,E=!0,G=!1)=>{const q=Ta(j);if(!q[H.IS_NULL])if(G)if(E){if(ue(q,H.IS_OPEN,!0),!b(q)){const ae=m(q,H.PARENT_ID);ee(ae,!0,!0)}}else U(q,!1,null,!1);else ue(q,H.IS_OPEN,E)},ge=(j,E)=>{if(k(j)){U(j,!1,E);return}z(j).finally(()=>{m(j,H.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>U(j,!0,E)}):U(j,!0,E)})},Me=(j,E)=>{j.stopImmediatePropagation(),j.stopPropagation(),j.preventDefault(),ge(E,j)},he=(j,E=!0,G=!0)=>{const q=Array.isArray(j)?j:[j];if(!q.length)return;const ae=Ta(q[0]);ae[H.IS_NULL]||(e.selectable?(u!=null&&g({[H.UUID]:u},H.IS_SELECTED,!E),e.selected&&e.selected!==u&&g({[H.UUID]:e.selected},H.IS_SELECTED,!E),g(ae,H.IS_SELECTED,E),u=C(ae),G&&q.length===1&&ee(ae,!0,!0),m(ae,H.IS_ASYNC)&&z(ae).then(()=>{a.nextTick(()=>{q.shift(),he(q,E,G)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ce=(j,E)=>{he(j,!0,!1),k(j)||ge(j,E);const G=kr.NODE_CLICK;t.emit(G,j,D(j),p(j[H.UUID]),E)},ie=(j,E)=>{if(b(E))return!1;const G=h(E),q=`${G}`.split("-").slice(0,j+1);if(q.join("-")===G)return!0;const be=q.pop(),Y=parseInt(be,10);q.push(`${Y+1}`);const re=q.join("-");return l.value.some(ve=>ve[H.PATH]===re)},se=j=>{if(!e.levelLine)return null;const E=q=>({"--depth":q}),G=m(j,H.DEPTH)+1;return new Array(G).fill("").map((q,ae)=>ae).filter(q=>ie(q,j)).filter(q=>q>0).map(q=>a.createVNode("span",{class:"node-virtual-line",style:E(G-q)},null))};return{renderTreeNode:j=>{var E,G,q,ae,be;return a.createVNode("div",{"data-tree-node":C(j),class:Bg(j,i.schema)},[a.createVNode("div",{class:Yg(j,i.schema,e),style:Gg(j,e,i),onClick:Y=>ce(j,Y)},[a.createVNode("span",{class:rt("node-action"),onClick:Y=>Me(Y,j)},[O(j)]),a.createVNode("span",{class:rt("node-content")},[[V(j)],a.createVNode("span",{class:rt("node-text")},[(q=(G=(E=t.slots).node)==null?void 0:G.call(E,L(j)))!=null?q:[Ad(j,e)]]),(be=(ae=t.slots).nodeAppend)==null?void 0:be.call(ae,L(j))]),se(j)])])},hanldeTreeNodeClick:ge,deepAutoOpen:A,asyncNodeClick:z,setNodeAction:ue,setNodeOpened:U,setSelect:he,setOpen:ee}},_g=(e,t,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:l,getParentNodeData:c,getNodeAttr:u,getNodePath:g,isRootNode:h}=Tr(i,e),p=L=>L.target.closest("[data-tree-node]"),m=L=>{p(L).removeEventListener("mouseup",m)},C=L=>{const T=p(L);T.setAttribute("draggable","true"),T.addEventListener("mouseup",m)},b=L=>{L.preventDefault();const T=p(L),z=L.dataTransfer.getData("node-id"),A=T.getAttribute("data-tree-node"),K=k(z,A)?"move":"none";L.dataTransfer.effectAllowed=K,L.dataTransfer.dropEffect=K},y=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const T=p(L);L.dataTransfer.setData("text/plain",""),L.dataTransfer.setData("node-id",T.getAttribute("data-tree-node"))},N=L=>{L.preventDefault(),L.stopPropagation();const T=p(L),z=L.dataTransfer.getData("node-id"),A=T.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:D,globalThis,[z,A])},k=(L,T)=>{const z=g({[H.UUID]:L}),A=g({[H.UUID]:T}),K=l(L),R=l(T);return K===R?!0:z.indexOf(A)===-1&&A.indexOf(z)===-1},x=(L,T)=>{if(!k(L,T))return;const z=JSON.parse(JSON.stringify(s(L))),A=JSON.parse(JSON.stringify(s(T))),K=c(L),R=c(T),F=u({[H.UUID]:L},H.INDEX),O=u({[H.UUID]:T},H.INDEX);K==null||K[e.children].splice(F,1,A),R==null||R[e.children].splice(O,1,z)},D=(L,T)=>{const z=s(L),A=s(T);let K=null;if(h({[H.UUID]:L}))K=e.data;else{const R=l(L);if(R!=null){K=s(R);const F=u({[H.UUID]:L},H.INDEX);K==null||K[e.children].splice(F,1)}}A[e.children]||(A[e.children]=[]),A[e.children].unshift(z)};a.onMounted(()=>{if(e.draggable&&t.value){const L=t.value.$el;L.addEventListener("mousedown",C),L.addEventListener("dragstart",y),L.addEventListener("dragover",b),L.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const L=t.value.$el;L.removeEventListener("mousedown",C),L.removeEventListener("dragstart",y),L.removeEventListener("dragover",b),L.removeEventListener("drop",N)}})},$g=e=>{var b;const t=a.toRef(e,"search"),{openResultNode:i=!1,resultType:s="tree"}=(b=e.search)!=null?b:{},l=y=>["string","number","boolean"].includes(typeof y),c=(y,N)=>y===N,u=(y,N)=>new RegExp(`${y}`,"i").test(`${N}`),g=(y,N)=>Reflect.apply(y,globalThis,N),h=t.value===void 0||t.value===!1,p=(y,N)=>{if(h)return!0;if(l(t.value))return g(u,[t.value,y,N]);const{value:k="",match:x="fuzzy"}=t.value,L=typeof x=="function"?x:x==="fuzzy"?u:c;return`${k}`.length===0?!0:g(L,[k,y,N])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:p,refSearch:t,isSearchActive:m,isSearchDisabled:h,openResultNode:i,resultType:s,isTreeUI:s==="tree"}},Xg=e=>{var x;const t=(D,L=void 0,T=[])=>{const{data:z,children:A}=D,K=[];let R=0;const F=new Map;function O(ce,ie,se,Q){if(ce!=null&&F.has(ce)&&![H.UUID,H.PARENT_ID].includes(ie)){const j=F.get(ce);Object.prototype.hasOwnProperty.call(j,ie)&&typeof Q=="function"&&Reflect.apply(Q,self,[j,ie,se])&&(Object.assign(j,{[ie]:se}),O(j[H.PARENT_ID],ie,se,Q))}}function V(ce){let ie=null;return typeof D.nodeKey=="string"&&(ie=ce[D.nodeKey]||Ll.v4()),ie||ce[H.UUID]||Ll.v4()}const U={[H.IS_OPEN]:()=>!1,[H.IS_CHECKED]:()=>!1,[H.IS_MATCH]:()=>!0,[H.IS_SELECTED]:ce=>D.selected===ce,[H.IS_CACHED]:()=>!1,[H.IS_ASYNC]:()=>null,[H.IS_LOADING]:()=>!1};function ue(ce,ie,se,Q=void 0){let j=Q;Q===void 0&&typeof U[se]=="function"&&(j=U[se](ce,ie));const E=ti[se];if(Object.prototype.hasOwnProperty.call(ie,E))return ie[E];const G=(T||[]).find(ae=>ae[H.UUID]===ce);let q;return G&&(q=G[se]),q==null&&(q=j),q}function ee(ce,ie){return D.selectable?ue(ce,ie,H.IS_SELECTED,D.selected===ce):!1}function ge(ce,ie,se){var E;const Q=ue(ce,ie,H.IS_OPEN),j=F.has(se)?(E=F.get(se))==null?void 0:E[H.IS_OPEN]:!0;return Q&&j}function Me(ce){return!ce[H.IS_OPEN]}function he(ce,ie=0,se=null,Q=null){const j=ce.length;for(let E=0;E<j;E++){const G=ce[E];if(Array.isArray(G))he(G,ie,se,Q);else if(typeof G=="object"&&G!==null){const q=Q!==null?`${Q}-${E}`:`${E}`,ae=`${V(G)}`,be=!!(G[A]||[]).length;let Y=ue(ae,G,H.IS_OPEN);D.autoOpenParentNode?Y&&O(se,H.IS_OPEN,!0,Me):Y=ge(ae,G,se),Object.assign(G,{[H.UUID]:ae}),F.set(ae,{[H.DEPTH]:ie,[H.INDEX]:E,[H.UUID]:ae,[H.PARENT_ID]:se,[H.HAS_CHILD]:be,[H.PATH]:q,[H.IS_ROOT]:se===null,[H.ORDER]:R,[H.IS_SELECTED]:ee(ae,G),[H.IS_MATCH]:ue(ae,G,H.IS_MATCH),[H.IS_OPEN]:Y,[H.IS_CHECKED]:ue(ae,G,H.IS_CHECKED),[H.IS_CACHED]:ue(ae,G,H.IS_CACHED),[H.IS_ASYNC]:ue(ae,G,H.IS_ASYNC),[H.IS_LOADING]:ue(ae,G,H.IS_LOADING),[A]:null}),R+=1,K.push(ze(Z({},JSON.parse(JSON.stringify(G,(re,ve)=>re===D.children?null:ve))),{[H.IS_OPEN]:Y,[A]:null})),Object.prototype.hasOwnProperty.call(G,A)&&he(G[A]||[],ie+1,ae,q)}}}return he(L||z),[K,F]},i=t(e),s=new Map,l=[],c=[],u=a.reactive({data:i[0],schema:i[1],levelLineSchema:{}}),g=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:h,deepAutoOpen:p}=Ed(e,u),m=D=>{l.push(D)},C=(D,L,T=!0)=>{T&&s.has(D)&&s.delete(D),s.set(D,L)},b=D=>typeof D=="function"?{type:"loop",fn:D}:typeof D=="object"&&typeof D.type=="string"&&typeof D.fn=="function"?D:(console.error("loop event error",D),null),y=D=>{var T;const L=b(D);return L!==null&&Reflect.apply(L.fn,globalThis,[]),(T=L==null?void 0:L.type)!=null?T:"once"},N=()=>{Array.from(s.keys()).forEach(D=>{const L=s.get(D);if(Array.isArray(L)){const T=[];L.forEach((z,A)=>{y(z)==="once"&&T.unshift(A)}),T.length&&T.forEach(z=>L.splice(z,1)),L.length===0&&s.delete(D)}else y(L)==="once"&&s.delete(D)})};a.watch(()=>[e.data],D=>{var T,z;const L=t(e,D,g.value);u.data=L[0],u.schema=L[1],((T=e.async)==null?void 0:T.callback)&&((z=e.async)==null?void 0:z.deepAutoOpen)==="every"&&p(),N()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,D=>{c.length=0,l.forEach(L=>{Reflect.apply(L,globalThis,[D]),c.push(()=>Reflect.apply(L,globalThis,[D]))}),C("afterSelectWatch",c)},{immediate:!0});const k=D=>{C("afterDataUpdate",D)};return(x=e.async)!=null&&x.callback&&p(),{flatData:u,schemaValues:g,asyncNodeClick:h,deepAutoOpen:p,afterDataUpdate:k,registerNextLoop:C,onSelected:m}},Kg=a.defineComponent({name:"Tree",props:Vg,emits:Eg,setup(e,t){const{flatData:i,schemaValues:s,onSelected:l,registerNextLoop:c}=Xg(e),{setNodeAttr:u,checkNodeIsOpen:g,getNodeAttr:h,getNodePath:p,isRootNode:m,isNodeOpened:C,isNodeChecked:b,isNodeMatched:y,hasChildNode:N}=Tr(i,e),{searchFn:k,isSearchActive:x,refSearch:D,openResultNode:L,isTreeUI:T,isSearchDisabled:z}=$g(e);z||a.watch([D],()=>{i.data.forEach(se=>{const Q=k(Ad(se,e),se);u(se,H.IS_MATCH,Q),L&&V(se,!0,!0)})});const A=se=>{if(x.value){const Q=()=>T?s.value.some(j=>j[H.PATH].startsWith(p(se))&&j[H.IS_MATCH]):!1;return h(se,H.IS_MATCH)||Q()}return!0},K=a.computed(()=>i.data.filter(se=>g(se)&&A(se))),{renderTreeNode:R,hanldeTreeNodeClick:F,setNodeOpened:O,setOpen:V,setNodeAction:U,setSelect:ue,asyncNodeClick:ee}=Ug(e,t,i,K,s,{registerNextLoop:c}),ge=(se,Q=!0)=>{U(Ta(se),H.IS_CHECKED,Q)};l(se=>{ue(se,!0,e.autoOpenParentNode)});const Me=()=>i;t.expose({hanldeTreeNodeClick:F,isNodeChecked:b,isRootNode:m,isNodeOpened:C,isNodeMatched:y,hasChildNode:N,setOpen:V,setChecked:ge,setNodeAction:U,setNodeOpened:O,setSelect:ue,asyncNodeClick:ee,getData:Me});const he=a.ref(),{renderEmpty:ce}=Rg(e,t);_g(e,he,i);const ie=se=>{if(se.length)return se.map(R);const Q=x.value?"search-empty":"empty";return ce(Q)};return()=>a.createVNode(yr,{class:rt("tree"),style:Zg(null,e),list:K.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:rt("container"),throttleDelay:0,ref:he},{default:se=>ie(se.data||[])})}});const Vd=Re(Kg),Rd=e=>e.__v_isVNode;var qg=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 i=0,s=null;for(;i<t;){if(Rd(e[i])){s=e[i];break}i=i+1}let l=t-1,c=null;for(;l>=0&&l>i;){if(Rd(e[l])){c=e[l];break}l=l-1}if(s&&c){s.props||(s.props={});let u="bk-compose-form-item-head";s.props.class&&(u+=` ${s.props.class}`),this.headBackgroundColor&&(s.props.style=Object.assign(s.props.style||{},{"background-color":this.headBackgroundColor})),s.props.class=u,c.props||(c.props={});let g="bk-compose-form-item-tail";c.props.class&&(g+=` ${c.props.class}`),this.tailBackgroundColor&&(c.props.style=Object.assign(c.props.style||{},{"background-color":this.tailBackgroundColor})),c.props.class=g}}return a.h("div",{class:"bk-compose-form-item"},e)}});const e5={formType:d.oneOf(["default","vertical"]).def("default"),labelWidth:d.oneOfType([Number,String]),labelPosition:d.oneOf(["left","center","right"]),model:d.object,rules:d.object};var t5=a.defineComponent({name:"Form",props:e5,emits:["submit"],setup(e,t){let i=[];const s=h=>{i.push(h)},l=h=>{i=i.reduce((p,m)=>(m!==h&&p.push(m),p),[])};return a.provide(Jc,{props:e,register:s,unregister:l}),{handleSubmit:h=>{h.preventDefault(),t.emit("submit")},validate:h=>{let p={};return h?p=(typeof h=="string"?[h]:h).reduce((C,b)=>ze(Z({},C),{[b]:!0}),{}):p=i.reduce((m,C)=>C.property?ze(Z({},m),{[C.property]:!0}):m,{}),Promise.all(i.reduce((m,C)=>(p[C.property]&&m.push(C.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:h=>{let p={};h?p=(typeof h=="string"?[h]:h).reduce((C,b)=>ze(Z({},C),{[b]:!0}),{}):p=i.reduce((m,C)=>ze(Z({},m),{[C.property]:!0}),{}),i.forEach(m=>p[m.property]&&m.clearValidate())}}},render(){var t,i;const e=Se({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(i=(t=this.$slots).default)==null?void 0:i.call(t)])}}),dn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const n5={label:d.string,labelWidth:d.oneOfType([Number,String]),labelPosition:d.oneOf(["left","center","right"]),property:d.string.def(""),required:d.bool.def(!1),email:d.bool.def(!1),max:d.number,min:d.number,maxlength:d.number,rules:d.array,autoCheck:d.bool.def(!1),description:d.string,errorDisplayType:d.oneOf(["tooltips","normal"]).def("normal")},i5=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a5=e=>{const t=[];return e.required&&t.push({validator:dn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:dn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:i=>dn.max(i,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:i=>dn.min(i,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:i=>dn.maxlength(i,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},r5=(e,t)=>{const i=e.reduce((s,l)=>{let c;if(l.required)c=dn.required;else if(l.email)c=dn.email;else if(Number(l.max)>-1)c=u=>dn.max(u,l.max);else if(Number(l.min)>-1)c=u=>dn.min(u,l.max);else if(Number(l.maxlength)>-1)c=u=>dn.min(u,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")c=u=>dn.pattern(u,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")c=l.validator;else return s;return s.push({validator:c,message:l.message,trigger:l.trigger}),s},[]);return[...t,...i]},s5=(e,t)=>t.reduce((i,s)=>!s.trigger||!e?(i.push(s),i):((Array.isArray(s.trigger)?s.trigger:[s.trigger]).includes(e)&&i.push(s),i),[]),Wd=e=>e!==void 0;var l5=a.defineComponent({name:"FormItem",directives:{bkTooltips:ml},props:n5,setup(e){const t=a.getCurrentInstance(),i=a.reactive({isError:!1,errorMessage:""}),s=df(),l=Boolean(s),c=a.computed(()=>{const h={width:"",paddingRight:"",textAlign:""},p=Wd(e.labelWidth)?e.labelWidth:l&&s.props.labelWidth;Wd(p)&&(h.width=`${p}px`,h.paddingRight=p?"":"0px");const m=e.labelPosition||l&&s.props.labelPosition;return m&&(h["text-align"]=m),h}),u=h=>{if(i.isError=!1,i.errorMessage="",!e.property||l&&!s.props.model)return Promise.resolve(!0);let p=[];l&&s.props.rules&&i5(s.props.rules,e.property)&&(p=s.props.rules[e.property]),e.rules&&(p=e.rules),p=s5(h,r5(p,a5(e)));const m=_n.exports.get(s.props.model,e.property),C=(()=>{let b=-1;return()=>{if(b=b+1,b>=p.length)return Promise.resolve(!0);const y=p[b];return Promise.resolve().then(()=>{const N=y.validator(m);return typeof N!="boolean"&&typeof N.then=="function"?N.then(()=>C,()=>(i.isError=!0,i.errorMessage=y.message,Promise.reject(y.message))):N?C():(i.isError=!0,i.errorMessage=y.message,Promise.reject(y.message))})}})();return C()},g=()=>{i.isError=!1,i.errorMessage=""};return a.provide(Pc,ze(Z({},e),{validate:u,clearValidate:g})),a.onMounted(()=>{l&&s.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&s.unregister(t.proxy)}),ze(Z({},a.toRefs(i)),{labelStyles:c,validate:u,clearValidate:g})},render(){var s,l;const e=Se({"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,i=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Rs,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},[a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t()]),a.createVNode("div",{class:"bk-form-content"},[(l=(s=this.$slots).default)==null?void 0:l.call(s),i()])])}});const Zd=Rt(t5,{FormItem:l5,ComposeFormItem:qg}),o5={span:d.number.def(1),offset:d.number.def(0),pull:d.number.def(0),push:d.number.def(0)};var c5=a.defineComponent({name:"Col",props:o5,emits:[],setup(e,t){const{col:i,gutter:s,flex:l}=a.inject("containerProps"),{span:c,offset:u,pull:g,push:h}=e,p=a.computed(()=>c||i);a.provide("containerProps",{col:p.value,gutter:s,flex:l});const m=function(b){return`${Number((b*100).toFixed(3))}%`},C=a.computed(()=>({width:m(p.value/i),"padding-right":`${s/2}px`,"padding-left":`${s/2}px`,"margin-left":u?m(u/i):null,right:g?m(g/i):null,left:h?m(h/i):null}));return()=>{var b,y;return a.createVNode("div",{class:"bk-grid-col",style:C.value},[(y=(b=t.slots).default)==null?void 0:y.call(b)])}}});const u5={col:d.number.def(24),gutter:d.number.def(20),margin:d.number.def(20),flex:d.bool.def(!1),extCls:d.string};var d5=a.defineComponent({name:"Container",props:u5,emits:[],setup(e,t){const{col:i,gutter:s,flex:l,extCls:c}=e;a.provide("containerProps",{col:i,gutter:s,flex:l});const u=a.computed(()=>c?`bk-grid-container ${c}`:"bk-grid-container"),g=a.computed(()=>{const{margin:h}=e;return{"padding-right":`${h}px`,"padding-left":`${h}px`}});return()=>{var h,p;return a.createVNode("div",{class:u.value,style:g.value},[(p=(h=t.slots).default)==null?void 0:p.call(h)])}}}),f5=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:i,gutter:s,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:i,gutter:s,flex:l});const c=a.computed(()=>ze(Z({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${s/2}px`,"margin-left":`-${s/2}px`}));return()=>{var u,g;return a.createVNode("div",{class:"bk-grid-row",style:c.value},[(g=(u=t.slots).default)==null?void 0:g.call(u)])}}});const xr=Rt(d5,{Row:f5,Col:c5});var h5=a.defineComponent({name:"Dropdown",props:{isShow:d.bool.def(!1),placement:d.commonType(["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],"placement").def("bottom"),trigger:d.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:d.bool.def(!1),extCls:d.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let i=Object.create(null);const s=a.ref(null),l=a.ref(null);a.onMounted(()=>{g()}),a.onBeforeUnmount(()=>{h()}),a.watch(()=>e.isShow,m=>{a.nextTick(()=>{e.trigger==="manual"&&i&&!e.disabled&&(m?i.show():i.hide())})}),a.watch(()=>e.disabled,m=>p(m));const c=()=>{t("show")},u=()=>{t("hide")},g=()=>{e.disabled||(i=new Ss(s.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:c,afterHidden:u}),e.trigger==="manual"&&e.isShow&&i.show())},h=()=>{if(i){const m=i;m.isShow&&m.hide(),m.destroy(),i=null,e.trigger==="manual"&&t("showChange",!1)}},p=m=>{const C=i;e.trigger==="manual"&&!m&&t("showChange",!1),C.updateDisabled(m)};return{reference:s,refContent:l}},render(){var t,i,s,l;const e=Se({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(i=(t=this.$slots).default)==null?void 0:i.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(s=this.$slots).content)==null?void 0:l.call(s)])])}}),g5=a.defineComponent({name:"DropdownItem",props:{extCls:d.string},emits:["click"],setup(e,{emit:t}){const i=l=>{l.stopPropagation(),t("click",l)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:i}},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)])}}),m5=a.defineComponent({name:"DropdownMenu",props:{extCls:d.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 Gd=Rt(h5,{DropdownMenu:m5,DropdownItem:g5});var Vl=a.defineComponent({name:"CascaderPanel",props:{store:d.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:i}=e,s=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),c=a.ref([]),u=y=>{y.config.multiple?c.value=i.getCheckedNodes().map(N=>N.path):c.value=y.path,t("input",c.value)},g=()=>{t("input",[])},h=y=>{var N;y.isDisabled||(s.list=s.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(N=y.children)!=null&&N.length&&(s.list.push(y.children),l.value.push(y)))};return{menus:s,activePath:l,nodeExpandHandler:h,isNodeInPath:y=>(l.value[y.level-1]||{}).id===y.id,nodeEvent:y=>{const{trigger:N,checkAnyLevel:k,multiple:x}=y.config;return{onClick:L=>{(!y.isLeaf||x)&&L.stopPropagation(),N==="click"&&h(y),k&&!x&&u(y),y.isLeaf&&!x&&u(y)},onMouseenter:()=>{N==="hover"&&h(y)}}},isCheckedNode:(y,N)=>{const{multiple:k}=y.config;return k?!1:Oc(N,y.path)},checkValue:c,nodeClear:g,checkNode:(y,N)=>{y.setNodeCheck(N),u(y)}}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(ba,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":i=>t.checked=i,onChange:i=>this.checkNode(t,i)},null),a.createVNode("span",{class:"content"},[t.name]),t.isLeaf?"":a.createVNode(Pn,{class:"icon-angle-right"},null)]))]))])}});class Rl{constructor(t,i,s){this.data=t,this.config=i,this.parent=s||null,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){var c;const{idKey:t,nameKey:i,childrenKey:s}=this.config;this.id=this.data[t],this.name=this.data[i],this.loading=!1,this.checked=!1;const l=this.data[s];this.children=(l||[]).map(u=>new Rl(u,this.config,this)),this.hasChildren=((c=this.children)==null?void 0:c.length)!==0,this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(u=>u.id),this.pathNames=this.pathNodes.map(u=>u.name)}get isLeaf(){return!this.hasChildren}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:i}=this;for(;i;)t.unshift(i),i=i.parent;return t}}const Yd=(e,t)=>e.reduce((i,s)=>(s.isLeaf?i.push(s):(!t&&i.push(s),i=i.concat(Yd(s.children,t))),i),[]);class p5{constructor(t){const{list:i}=t;this.data=i,this.config=hf(t,["list"]),this.nodes=this.data.map(s=>new Rl(s,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return Yd(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var s;return(s=this.getFlattedNodes().filter(l=>Oc(l.path,t))[0])!=null?s:null}}var M5=a.defineComponent({name:"Cascader",directives:{clickoutside:Cr},components:{CascaderPanel:Vl,BkPopover:vn},props:{modelValue:d.array.def([]),list:d.array.def([]),placeholder:d.string.def("\u8BF7\u9009\u62E9"),filterable:d.bool.def(!1),multiple:d.bool.def(!1),disabled:d.bool.def(!1),clearable:d.bool.def(!0),trigger:d.string.def("click"),checkAnyLevel:d.bool.def(!1),isRemote:d.bool.def(!1),remoteMethod:d.func,showCompleteName:d.bool.def(!1),idKey:d.string.def("id"),nameKey:d.string.def("name"),childrenKey:d.string.def("children"),separator:d.string.def("/"),limitOneLine:d.bool.def(!1),extCls:d.string.def("")},emits:["update:modelValue"],setup(e,{emit:t}){const{separator:i,multiple:s}=e,{isHover:l,setHover:c,cancelHover:u}=ou(),g=a.reactive(new p5(e)),h=a.ref(!1),p=a.ref(""),m=a.ref([]),C=x=>{if(t("update:modelValue",x),s){m.value=g.getCheckedNodes().map(L=>({text:L.pathNames.join(i),key:L.id}));return}if(x.length===0){p.value="";return}const D=g.getNodeByValue(x);p.value=D.pathNames.join(i)};return{store:g,updateValue:C,hidePopover:()=>{h.value=!1},inputClickHandler:x=>{x.stopPropagation(),h.value=!h.value},selectedText:p,panelShow:h,handleClear:x=>{x.stopPropagation(),C([])},isHover:l,setHover:c,cancelHover:u,selectedTags:m,removeTag:(x,D,L)=>{L.stopPropagation();const T=JSON.parse(JSON.stringify(x));T.splice(D,1),C(T)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Qn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Ca,{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((i,s)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[i.text]),a.createVNode(wn,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,s,l)},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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(vn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":i=>this.panelShow=i,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(Vl,{store:this.store,onInput:i=>this.updateValue(i)},null)])})])}});const Bd=Rt(M5,{CascaderPanel:Vl});var Hd=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const i=a.ref(!1),s=a.ref(!1),l=a.ref(0),c=a.ref(0),u=a.ref(0),g=a.ref(null),h=a.ref(e.modelValue),p=a.ref(0),m=a.ref(0),C=a.ref(!1),b=a.ref(null),y=a.computed(()=>{var O,V;let R="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const U=e.params.customContent[e.modelValue];R=U.tip||U.label||""}const F=e.params.vertical?"right":"top";return(V=e.params)!=null&&V.showTip?{content:e.params.formatterTipLabel(`${R||(e==null?void 0:e.modelValue)||"0"}`),placement:F}:{content:"",placement:F}}),N=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:N.value}:{left:N.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),D=R=>{e.params.disable||(R.preventDefault(),L(R),xa(window,"mousemove",T),xa(window,"touchmove",T),xa(window,"mouseup",z),xa(window,"touchend",z))},L=R=>{i.value=!0,s.value=!0,e.params.vertical?l.value=R.clientY:c.value=R.clientX,u.value=parseFloat(N.value),g.value=u.value},T=R=>{if(i.value){s.value=!1,t("resetSize");let F=0;e.params.vertical?(p.value=R.clientY,F=(l.value-p.value)/e.params.sliderSize*100):(m.value=R.clientX,F=(m.value-c.value)/e.params.sliderSize*100),g.value=u.value+F,A(g.value)}},z=()=>{C.value=!1,i.value&&(setTimeout(()=>{i.value=!1,s.value||(A(g.value),t("emitChange"))},0),Sr(window,"mousemove",T),Sr(window,"touchmove",T),Sr(window,"mouseup",z),Sr(window,"touchend",z))},A=R=>{if(R===null||isNaN(R))return;R<0?g.value=0:R>100&&(g.value=100);const F=100/((e.params.maxValue-e.params.minValue)/e.params.step);let V=Math.round(R/F)*F*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;V=parseFloat(V.toFixed(e.params.precision)),t("update:modelValue",V),!i.value&&e.modelValue!==h.value&&(h.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:i.value}],ref:b,tabindex:"0",style:k.value,onClick:R=>R.stopPropagation(),onMousedown:D},[Boolean(y.value.content)?a.createVNode(vn,{content:y.value.content,theme:"dark",placement:y.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"]},[x.value]):void 0]),setPosition:A,tip:y}},render(){return this.renderDom()}});const xa=(e,t,i)=>{e&&t&&i&&e.addEventListener(t,i,!1)},Sr=(e,t,i)=>{e&&t&&i&&e.removeEventListener(t,i,!1)};var C5=a.defineComponent({name:"Slider",props:{modelValue:d.oneOfType([d.array,d.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:i}){const s=a.ref(1),l=a.ref(null),c=a.ref(null),u=a.ref(null),g=a.ref(0),h=a.ref(0),p=a.ref(null),m=a.ref(null),C=a.ref(null),b=a.ref(null),y=a.computed(()=>{const Q=[e.minValue,e.maxValue,e.step].map(j=>{const E=`${j}`.split(".")[1];return E?E.length:0});return Math.max.apply(null,Q)}),N=a.computed(()=>Math.min(l.value,c.value)),k=a.computed(()=>Math.max(l.value,c.value)),x=a.computed(()=>e.range?`${100*(k.value-N.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),D=a.computed(()=>e.range?`${100*(N.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),L=a.computed(()=>e.vertical?{height:x.value,bottom:D.value}:{width:x.value,left:D.value}),T=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=(e.maxValue-e.minValue)/e.step,j=100*e.step/(e.maxValue-e.minValue),E=[];for(let G=1;G<Q;G++)E.push(G*j);return e.range?E.filter(G=>G<100*(N.value-e.minValue)/(e.maxValue-e.minValue)||G>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):E.filter(G=>G>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),z=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),A=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=100*e.step/(e.maxValue-e.minValue),j=[];for(let E=e.minValue,G=0;E<=e.maxValue;E+=e.step,G++){const q={stepWidth:G*Q,stepLabel:e.formatterLabel(E)};j.push(q)}return j}),K=a.computed(()=>Array.isArray(e.modelValue)),R=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Q,j)=>Number(Q)-Number(j)).filter(Q=>Number(Q)>=e.minValue&&Number(Q)<=e.maxValue).map(Q=>{const{tip:j}=e.customContent[Q],{label:E}=e.customContent[Q];return{tip:j||E||"",label:E||"",percent:(Number(Q)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),F=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:s.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ue()}),a.watch(()=>l.value,Q=>{e.range?i("update:modelValue",[N.value,k.value]):i("update:modelValue",Q),g.value=Q}),a.watch(()=>c.value,Q=>{i("update:modelValue",[N.value,k.value]),h.value=Q}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),c.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,c.value=e.maxValue),u.value=[l.value,c.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=l.value),O(),xa(window,"resize",O())});const O=()=>{p.value&&(s.value=p.value[`client${e.vertical?"Height":"Width"}`])},V=Q=>{var j,E;if(Q.stopPropagation(),!e.disable){if(O(),e.vertical){const G=(j=p.value)==null?void 0:j.getBoundingClientRect().bottom;Me((G-Q.clientY)/s.value*100)}else{const G=(E=p.value)==null?void 0:E.getBoundingClientRect().left;Me((Q.clientX-G)/s.value*100)}ee()}},U=()=>e.range?![N.value,k.value].every((Q,j)=>Q===u.value[j]):e.modelValue!==u.value,ue=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Q=e.modelValue;e.range&&Array.isArray(Q)?Q[1]<e.minValue?i("update:modelValue",[e.minValue,e.minValue]):Q[0]>e.maxValue?i("update:modelValue",[e.maxValue,e.maxValue]):Q[0]<e.minValue?i("update:modelValue",[e.minValue,Q[1]]):Q[1]>e.maxValue?i("update:modelValue",[Q[0],e.maxValue]):(l.value=Number(Q[0]),c.value=Number(Q[1]),U()&&(u.value=Q.slice())):!e.range&&typeof Q=="number"&&!isNaN(Q)&&(Q<e.minValue?i("update:modelValue",e.minValue):Q>e.maxValue?i("update:modelValue",e.maxValue):(l.value=Q,U()&&(u.value=Q)))},ee=async()=>{await a.nextTick(),i("change",e.range?[N.value,k.value]:e.modelValue)},ge=Q=>e.vertical?{bottom:`${Q}%`}:{left:`${Q}%`},Me=Q=>{if(!e.range){m.value.setPosition(Q);return}const j=e.minValue+Q*(e.maxValue-e.minValue)/100;Math.abs(N.value-j)<Math.abs(k.value-j)?b.value=l.value<c.value?m.value:C.value:b.value=l.value>c.value?m.value:C.value,b.value.setPosition(Q)},he=Q=>{if(Q==="")return;const j=parseFloat(Q);j<e.minValue?(g.value=e.minValue,l.value=e.minValue):j>e.maxValue?(g.value=e.maxValue,l.value=e.maxValue):l.value=j},ce=Q=>{if(Q===""||typeof Q=="number")return;const j=parseFloat(Q);j<e.minValue?(h.value=e.minValue,c.value=e.minValue):j>e.maxValue?(h.value=e.maxValue,c.value=e.maxValue):c.value=j},ie=Q=>{let j=0;return Q==="start"?j=e.vertical?e.maxValue:e.minValue:j=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,c.value].includes(j)?"0":"1"};return{renderDom:()=>{var Q,j;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Q=t.start)==null?void 0:Q.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:p,style:z.value,onClick:V},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:L.value},null),e.showInterval?T.value.map((E,G)=>a.createVNode("div",{key:G,class:["bk-slider-interval",{vertical:e.vertical}],style:ge(E)},null)):void 0,e.customContent?R.value.map((E,G)=>a.createVNode("div",{key:G,class:["bk-slider-interval",{vertical:e.vertical}],style:ge(E.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:ie("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ie("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return A.value.map((E,G)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:G,style:ge(E.stepWidth)},[E.stepLabel]));if(e.customContent)return R.value.map((E,G)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:G,style:ge(E.percent)},[E.label]))}()]):void 0,a.createVNode(Hd,{modelValue:l.value,"onUpdate:modelValue":E=>l.value=E,ref:m,params:F.value,onEmitChange:ee,onResetSize:O},null),e.range?a.createVNode(Hd,{modelValue:c.value,"onUpdate:modelValue":E=>c.value=E,ref:C,params:F.value,onEmitChange:ee,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Mi,{type:"number",modelValue:g.value,max:e.maxValue,min:e.minValue,onChange:he},null)]),K.value&&c.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Mi,{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:ce},null)])]:void 0]):void 0,(j=t.end)==null?void 0:j.call(t)])}}},render(){return this.renderDom()}});const Fd=Re(C5);var y5=a.defineComponent({name:"ResizeLayout",props:{placement:d.placement().def("left"),min:d.number.def(3),max:d.number.def(1/0),triggerWidth:d.number.def(5),triggerOffset:d.number.def(3),initialDivide:d.oneOfType([String,Number]).def("20%"),immediate:d.bool,disabled:d.bool,collapsible:d.bool,autoMinimize:d.oneOfType([Boolean,Number]).def(!1),border:d.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:i,initialDivide:s,triggerOffset:l,triggerWidth:c,max:u,min:g,immediate:h,autoMinimize:p}=a.toRefs(e),m=a.ref(!1),C=a.ref(!0),b=a.ref(!1),y=a.ref(null),N=a.ref({}),k=a.ref(null),x=a.ref(null),D=a.ref(null),L=a.ref(null),T=a.computed(()=>["left","right"].includes(i.value)),z=a.computed(()=>T.value?"width":"height"),A=a.computed(()=>{let ie=s.value;return typeof ie=="number"&&(ie=`${ie}px`),{[z.value]:ie}}),K=a.computed(()=>({[`margin-${i.value}`]:`${l.value-c.value}px`,[z.value]:`${c.value}px`})),R=a.computed(()=>p.value?typeof p.value=="boolean"?50:p.value:0),F=()=>{const ie=k.value.getBoundingClientRect();y.value=T.value?ie.width:ie.height},O=new ResizeObserver(F),V=()=>{switch(x.value.style.visibility="visible",i.value){case"left":x.value.style.inset=`0 auto auto ${N.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${N.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${N.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${N.value.aside.height}px 0`;break}},U=()=>{D.value.style.display="block",D.value.style.cursor=T.value?"col-resize":"row-resize"},ue=ie=>Math.min(u.value,Math.max(g.value,ie),y.value-c.value),ee=ie=>{t("before-resize",ie);const se=L.value.getBoundingClientRect();N.value=Object.freeze({mouse:{clientX:ie.clientX,clientY:ie.clientY},aside:{width:se.width,height:se.height}}),U(),h.value||V(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=G=>{t("resizing",G)},j=G=>{let q;switch(i.value){case"top":q=G.clientY-N.value.mouse.clientY;break;case"right":q=N.value.mouse.clientX-G.clientX;break;case"bottom":q=N.value.mouse.clientY-G.clientY;break;case"left":q=G.clientX-N.value.mouse.clientX}const ae=N.value.aside[z.value]+q,be=ue(ae)+l.value,Y=`${be}px`;h.value?L.value.style[z.value]=Y:x.value.style[i.value]=Y,Q(be)},E=()=>{if(x.value.style.visibility="hidden",D.value.style.display="none",document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",E),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ge(),t("after-resize",parseFloat(x.value.style[i.value]))}),h.value)return!1;L.value.style[z.value]=x.value.style[i.value]};document.addEventListener("mousemove",j),document.addEventListener("mouseup",E)},ge=()=>{if(!p.value)return!1;const ie=L.value.getBoundingClientRect();if(b.value=m.value=ie[z.value]<=R.value,!b.value)return C.value=!0,!1;he(),a.nextTick(()=>{L.value.setAttribute(`data-${z.value}`,A.value[z.value])})},Me=ie=>{m.value=typeof ie=="boolean"?ie:!m.value,he(),t("collapse-change",m.value)},he=()=>{const ie=L.value.getBoundingClientRect();ce(!m.value),m.value?(L.value.setAttribute(`data-${z.value}`,`${ie[z.value]}px`),L.value.style[z.value]="5px"):(C.value=!0,L.value.style[z.value]=L.value.getAttribute(`data-${z.value}`))},ce=ie=>{const se=()=>{C.value=ie,L.value.style.transition="",L.value.removeEventListener("transitionend",se)};L.value.addEventListener("transitionend",se),L.value.style.transition=`${z.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:C,minimized:b,limitMax:y,state:N,vertical:T,cssPropKey:z,bkResizeLayoutRef:k,resizeProxyRef:x,resizeMaskRef:D,asideRef:L,triggerStyle:K,asideStyle:A,handleMousedown:ee,setCollapse:Me}},render(){var t,i,s,l,c,u;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"},[(i=(t=this.$slots).aside)==null?void 0:i.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&&(((l=(s=this.$slots)["collapse-trigger"])==null?void 0:l.call(s))||a.createVNode(mi,{class:"bk-resize-collapse",onClick:this.setCollapse},null))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(c=this.$slots).main)==null?void 0:u.call(c)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const Ud=Re(y5),I5={list:d.array.def([]),titleAble:d.bool.def(!1),extCls:d.string};var b5=a.defineComponent({name:"Timeline",props:I5,emits:["select"],setup(e,{emit:t}){const i=a.ref([]),s=u=>{const g=[];u.forEach(h=>{var p;g.push({tag:h.tag,content:h.content,type:h.type,size:h.size,color:h.color,icon:h.icon,filled:h.filled,border:(p=h.border)!=null?p:!0})}),i.value.splice(0,i.value.length,...g)},l=()=>{var u;i.value.splice(0,i.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(u=e.list)!=null&&u.length&&s(e.list)},c=u=>{try{t("select",u)}catch(g){console.warn(g)}};return a.onMounted(l),a.watch(()=>e.list,()=>{s(e.list)},{deep:!0}),{defaultTimelines:i,titleSelect:c}},render(){const e=i=>{const{icon:s}=i;return s?Object.prototype.toString.call(s)==="[object Object]":!1},t=i=>{const s="bk-timeline",l=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,u=i.size?`${s}-${i.size}`:"",g=i.filled?`${s}-filled`:"",h=i.color&&l.includes(i.color)?`${s}-${i.color}`:"";return Se({},`${s} ${c} ${u} ${h} ${g}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,l,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{borderWidth:i.border?"2px":"0px"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(l=(s=this.$slots).default)==null?void 0:l.call(s))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null):""])])})])}});const _d=Re(b5),N5={list:d.array.def([]),controllable:d.bool.def(!1),showSteps:d.bool.def(!1),curProcess:d.number.def(0),displayKey:d.string.def("content"),extCls:d.string};var w5=a.defineComponent({name:"BKProcess",props:N5,emits:["update:curProcess","click"],setup(e,{emit:t}){const i=a.ref([]),s=a.ref(0),l=()=>{var u;i.value.splice(0,i.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),console.log("props.list",e.list),(u=e.list)!=null&&u.length&&i.value.splice(0,i.value.length,...e.list)},c=async u=>{console.log(u);try{e.controllable&&u!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",u),console.log(e.curProcess),t("click",u))}catch(g){console.warn(g)}};return a.onMounted(l),{defaultProcessList:i,paddingBottom:s,jumpTo:c}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),i=g=>g.status==="loading",s=g=>g.status==="error",l=g=>this.curProcess>=g+1||this.defaultProcessList[g].status==="done",c=g=>g.icon?g.icon:"",u=(g,h)=>g===this.curProcess-1&&i(h)?a.createVNode(tr,{class:"bk-icon bk-process-icon icon-loading"},null):s(h)?a.createVNode(wn,{class:"bk-process-icon"},null):l(g)?a.createVNode(ir,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[c(h)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((g,h)=>a.createVNode("li",{onClick:()=>{this.jumpTo(h+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=h+1,current:i(g)&&h===this.curProcess-1}},[g[this.displayKey],u(h,g)]))])])}});const $d=Re(w5);var Wl=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ec,AnimateNumber:Vc,Affix:Rc,Backtop:Wc,Badge:Zc,Breadcrumb:Gc,Button:Wt,Card:Bc,Checkbox:ba,Collapse:_c,Dialog:$c,Exception:dr,FixedNavbar:Xc,Input:Mi,Link:Kc,Loading:$n,Modal:Ci,Popover:vn,Progress:eu,Radio:au,Rate:ru,Swiper:su,Select:Ml,Sideslider:wu,Steps:vu,Switcher:ku,Table:Yu,Tag:pl,TagInput:Fu,Divider:Uu,Tab:$u,Message:qu,Notify:ed,Menu:rd,Navigation:ld,DatePicker:zd,Transfer:Jd,Tree:Vd,VirtualRender:yr,Form:Zd,Pagination:yl,Container:xr,containerProps:xr,Dropdown:Gd,Cascader:Bd,Slider:Fd,ResizeLayout:Ud,TimeLine:_d,Process:$d},Symbol.toStringTag,{value:"Module"}));const Xd=(e="Bk")=>t=>{const i=t.config.globalProperties.bkUIPrefix||e;Object.keys(Wl).forEach(s=>{const l=Wl[s];"install"in l?t.use(l,{prefix:i}):t.component(i+s,Wl[s])})};var L5={createInstall:Xd,install:Xd(),version:"0.0.1"};le.Affix=Rc,le.Alert=Ec,le.AnimateNumber=Vc,le.Backtop=Wc,le.Badge=Zc,le.Breadcrumb=Gc,le.Button=Wt,le.Card=Bc,le.Cascader=Bd,le.Checkbox=ba,le.Collapse=_c,le.Container=xr,le.DatePicker=zd,le.Dialog=$c,le.Divider=Uu,le.Dropdown=Gd,le.Exception=dr,le.FixedNavbar=Xc,le.Form=Zd,le.Input=Mi,le.Link=Kc,le.Loading=$n,le.Menu=rd,le.Message=qu,le.Modal=Ci,le.Navigation=ld,le.Notify=ed,le.Pagination=yl,le.Popover=vn,le.Process=$d,le.Progress=eu,le.Radio=au,le.Rate=ru,le.ResizeLayout=Ud,le.Select=Ml,le.Sideslider=wu,le.Slider=Fd,le.Steps=vu,le.Swiper=su,le.Switcher=ku,le.Tab=$u,le.Table=Yu,le.Tag=pl,le.TagInput=Fu,le.TimeLine=_d,le.Transfer=Jd,le.Tree=Vd,le.VirtualRender=yr,le.bkTooltips=ml,le.clickoutside=Cr,le.containerProps=xr,le.default=L5,le.mousewheel=h1,Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});