bkui-vue 0.0.1-beta.154 → 0.0.1-beta.155

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -54,7 +54,7 @@ ${bo(n)}`),i}})}function Wy(e){const t=Object.keys(e),n=t.filter(o=>{var l;retur
54
54
  m 0 ${k?"":"-"}${L}
55
55
  a ${L} ${L} 0 1 1 0 ${k?"-":""}${L*2}
56
56
  a ${L} ${L} 0 1 1 0 ${k?"":"-"}${L*2}
57
- `,P={d:H,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:x},Q={d:H,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":o>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:I},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",P,null),a.createVNode("path",Q,null)]),a.createVNode("span",{class:"progress-circle-text",style:y},[n==null?void 0:n.default()])])},A8=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:o,size:l,color:u,titleStyle:d,showText:f,textInside:g,theme:m}=t,y={height:`${o}px`,lineHeight:`${o}px`},C={width:`${i}%`,background:u,animationDuration:"3s"},v=(I=!0)=>(f||n.default)&&(I&&g||!I&&!g)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${l||"normal"} progress-bar`,style:y},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[v()])])]),v(!1)])};function n9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var O8=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:o,fixed:l}=this.$props,u=t((d=this.validPercent(n))==null?void 0:d.toFixed(l));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[u]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof u=="string"?o:void 0},[this.$slots.default?this.$slots.default():u])}},render(){const e=this.renderProcessInfo(),t=Te(U({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(A8,t,n9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(P8,t,n9(e)?e:{default:()=>[e]}));const i={class:Se({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Qa=_e(O8),rh=Symbol("RadioGroup");function ah(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const sh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=xi(),o=a.inject(rh,qu),l=!M3(o),u=a.ref(!1),d=a.computed(()=>l&&o.props.disabled?!0:t.disabled);l?a.watch(()=>o.props.modelValue,m=>{u.value=m===t.label},{immediate:!0}):a.watch(()=>t.modelValue,m=>{m!==""&&(u.value=m===t.label)},{immediate:!0});const f=(m=!0)=>{u.value=m},g=m=>{var v;if(d.value)return;const y=m.target;u.value=y.checked;const C=u.value?t.label:"";n("change",C),n("update:modelValue",C),l&&o.handleChange(e.proxy),(v=i==null?void 0:i.validate)==null||v.call(i,"change"),a.nextTick(()=>{y.checked!==u.value&&(y.checked=u.value)})};return a.onMounted(()=>{l&&o.register(e.proxy)}),a.onBeforeUnmount(()=>{l&&o.unregister(e.proxy)}),{isChecked:u,isDisabled:d,setChecked:f,handleChange:g}},E8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var J8=a.defineComponent({name:"Radio",props:E8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=ah(),{isChecked:i,isDisabled:o,setChecked:l,handleChange:u}=sh();return{isFocused:e,isChecked:i,isDisabled:o,setChecked:l,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=Se({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Q8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var V8=a.defineComponent({name:"RadioButton",props:Q8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=ah(),{isChecked:i,isDisabled:o,setChecked:l,handleChange:u}=sh();return{isFocused:e,isChecked:i,isDisabled:o,setChecked:l,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=Se({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const R8={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var W8=a.defineComponent({name:"RadioGroup",props:R8,emits:["change","update:modelValue"],setup(e,t){const n=[],i=u=>{n.push(u)},o=u=>{const d=n.indexOf(u);d>-1&&n.splice(d,1)},l=u=>{const d=u.label;n.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(rh,{props:e,register:i,unregister:o,handleChange:l}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(u=>{u.setChecked(u.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const oh=Zt(J8,{Group:W8,Button:V8});var Ws=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},i=d=>{if(!e.editable)return;const f=d+1;t("changeHover",f)},o=d=>Se({"bk-is-select":d<Math.floor(l.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),l=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{class:o(f),style:u,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(f),onMouseenter:()=>i(f)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),H8=a.defineComponent({name:"Rate",components:{star:Ws},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xi(),i=a.ref(0),o=y=>{var C;!e.editable||(t("update:modelValue",y),t("change",y),(C=n==null?void 0:n.validate)==null||C.call(n,"change"))},l=y=>{i.value=y},u=Se({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},g=a.computed(()=>{const y=Math.floor(e.modelValue),C=(f.width+3)*y,v=f.width*(e.modelValue-y);return{width:`${C+v}px`}}),m={width:f.width,height:f.height};return()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(Ws,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:o,onChangeHover:l,onMouseleave:()=>l(0)},m),null):[a.createVNode(Ws,a.mergeProps({rate:5,style:g.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Ws,a.mergeProps({rate:0,editable:!1},m),null)]])}});const lh=_e(H8);var B8=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:o,pics:l,list:u,height:d,width:f}=a.toRefs(e),g=a.ref(),m=a.ref(0),y=a.ref(0),C=a.ref(0),v=a.ref(0);let I;const L=a.computed(()=>{var $;return(($=u.value)==null?void 0:$.length)>0?u.value:l.value}),k=a.computed(()=>({width:`${y.value*L.value.length}px`,transform:`translateX(-${y.value*m.value}px)`})),N=a.computed(()=>({width:`${y.value}px`,height:`${C.value}px`})),w=$=>{let ue=$;$>=L.value.length&&(ue=0),$<0&&(ue=L.value.length-1),m.value=ue,t("index-change",ue)},p=$=>{!$||window.open($,"_blank")},M=$=>["bk-swiper-img",{"bk-swiper-link":$.link},$.class],x=$=>({"background-image":`url(${$.url})`,"background-color":$.color}),S=$=>({"bk-current-index":m.value===$}),H=()=>{i.value&&(v.value=window.setTimeout(()=>{w(m.value+1),H()},o.value))},P=()=>{window.clearTimeout(v.value)},Q=()=>{var ue;const $=(ue=g.value)==null?void 0:ue.parentElement;!$||!window.ResizeObserver||(I=new ResizeObserver(()=>{ee()}),I.observe($))},O=()=>{var $;($=I.disconnect)==null||$.call(I)},E=$=>{if($===void 0)return{height:0,width:0};const ue=getComputedStyle($),fe=$.clientWidth-parseFloat(ue.paddingTop)-parseFloat(ue.paddingBottom);return{height:$.clientHeight-parseFloat(ue.paddingLeft)-parseFloat(ue.paddingRight),width:fe}},ee=()=>{var ue;const $=E((ue=g.value)==null?void 0:ue.parentElement);y.value=+f.value>0?f.value:$.width,C.value=+d.value>0?d.value:$.height};return a.watch([d,f],ee),a.onMounted(()=>{ee(),H(),Q()}),a.onBeforeUnmount(()=>{P(),O()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:g,style:N.value},[a.createVNode("hgroup",{style:k.value,class:"bk-transition bk-swiper-main"},[L.value.map($=>{var ue,fe;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(fe=(ue=n.default)==null?void 0:ue.call(n,$))!=null?fe:a.createVNode("span",{class:M($),style:x($),onClick:()=>p($.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map(($,ue)=>a.createVNode("li",{class:S(ue),onMouseover:()=>w(ue)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>w(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>w(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const uh=_e(B8),Po=Symbol("BkSelect"),ch=Symbol("BkOptionGroup");function dh(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Su(e){return{register:(i,o)=>{if(!!o){if(e.value.has(i)){console.warn(`repeat ${i}`,o);return}return e.value.set(i,o)}},unregister:i=>{e.value.delete(i)}}}function G8(e,t=200){let n,i=e;return a.customRef((o,l)=>({get(){return o(),i},set(u){clearTimeout(n),u===void 0||u===""?(i=u,l()):n=setTimeout(()=>{i=u,l()},t)}}))}function Z8(e,t){const{popoverMinWidth:n}=e;let i=null;const o=a.ref("auto"),l=a.ref(!1),u=()=>{l.value=!l.value},d=()=>{l.value=!1},f=()=>{l.value=!0},g=()=>{var m;o.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=by(t.value,g,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:l,popperWidth:o,togglePopover:u,hidePopover:d,showPopover:f}}function _8(e,t){const n=G8(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Hs(e=""){return e&&String(e).trim().toLowerCase()}var Tc=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:o}=a.toRefs(e),l=a.inject(Po,null),u=a.inject(ch,null),d=a.computed(()=>{var v;return(v=l==null?void 0:l.selected)==null?void 0:v.some(I=>I.value===o.value)}),f=a.computed(()=>l==null?void 0:l.multiple),g=a.computed(()=>(l==null?void 0:l.activeOptionValue)===o.value),m=a.computed(()=>l==null?void 0:l.showSelectedIcon),y=()=>{i.value||l==null||l.handleOptionSelected(t)},C=()=>{l.activeOptionValue=o.value};return a.onBeforeMount(()=>{l==null||l.register(o.value,t),u==null||u.register(o.value,t)}),a.onBeforeUnmount(()=>{l==null||l.unregister(o.value),u==null||u.unregister(o.value)}),Te(U({},a.toRefs(n)),{selected:d,multiple:f,isHover:g,showSelectedIcon:m,handleOptionClick:y,handleMouseEnter:C})},render(){var t,n,i;const e=Se({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(Wr,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Y8=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,o=a.inject(Po,null),l=a.reactive({groupCollapse:e.collapse,visible:!0}),u=a.ref(new Map),{register:d,unregister:f}=Su(u),g=a.computed(()=>`${e.label} (${[...u.value.values()].filter(y=>y.visible).length})`),m=()=>{!e.collapsible||e.disabled||(l.groupCollapse=!l.groupCollapse,t("update:collapse",l.groupCollapse))};return a.provide(ch,a.reactive(Te(U({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(l,"groupCollapse")}))),a.onBeforeMount(()=>{o==null||o.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{o==null||o.unregisterGroup(n.uid)}),Te(U({},a.toRefs(l)),{groupLabel:g,handleToggleCollapse:m})},render(){var i,o;const e=Se({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=Se({"bk-option-group-label":!0,collapsible:this.collapsible}),n=Se({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Mo,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(o=(i=this.$slots).default)==null?void 0:o.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),F8=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=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")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,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(Rn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Sc=_e(F8);function U8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var $8=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Po,null),{modelValue:i}=a.toRefs(e),o=a.ref(i.value),l=a.ref();a.watch(i,()=>{o.value=i.value});const u=C=>{t("remove",C)},d=()=>{t("focus")},f=()=>{var C;(C=l.value)==null||C.focus()},g=C=>{t("update:modelValue",C.target.value)},m=C=>{switch(C.code){case"Enter":{t("enter",C.target.value,C);break}}},y=n==null?void 0:n.handleGetLabelByValue;return{value:o,inputRef:l,handleRemoveTag:u,handleFocus:d,focus:f,handleInput:g,handleKeydown:m,handleGetLabelByValue:y}},render(){var e,t,n,i;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(o=>{let l;return a.createVNode(Sc,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(o.value)},U8(l=this.handleGetLabelByValue(o))?l:{default:()=>[l]})}),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":o=>this.value=o,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),X8=a.defineComponent({name:"Select",directives:{clickoutside:Hr},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.bool.def(!1),list:h.array.def([]),idKey:h.string.def("value"),displayKey:h.string.def("label"),showSelectedIcon:h.bool.def(!0)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:o,multiple:l,remoteMethod:u,loading:d,loadingText:f,noDataText:g,noMatchText:m,popoverMinWidth:y,showOnInit:C,multipleMode:v,allowCreate:I,customContent:L,showSelectedIcon:k}=a.toRefs(e),N=xi(),w=a.ref(),p=a.ref(),M=a.ref(),x=a.ref(new Map),S=a.computed(()=>[...x.value.values()]),H=a.ref(new Map),P=a.ref([]),Q=a.ref();a.watch(n,()=>{sr()},{deep:!0});const O=a.computed(()=>i.value||d.value),E=a.computed(()=>P.value.map(Ne=>yt(Ne))),ee=a.computed(()=>{const Ne=S.value.reduce((Ae,Oe)=>(Oe.disabled||Ae.push(Oe.value),Ae),[]);return Ne.length<=P.value.length&&Ne.every(Ae=>P.value.some(Oe=>Oe.value===Ae))}),$=a.computed(()=>!!H.value.size),ue=a.computed(()=>!S.value.length),fe=a.computed(()=>S.value.length&&S.value.every(Ne=>!Ne.visible)),ge=a.computed(()=>o.value&&typeof u.value=="function"),Ce=a.computed(()=>!(ne.value||ue.value||fe.value)||L.value),re=a.computed(()=>ne.value?f.value:ue.value?g.value:fe.value?m.value:""),{register:X,unregister:A}=Su(x),{register:R,unregister:q}=Su(H),{isHover:K,setHover:he,cancelHover:le}=dh(),pe=a.ref(!1),te=Ne=>{pe.value=!0,t("focus",Ne)},ve=()=>{pe.value&&t("blur"),pe.value=!1},{popperWidth:ye,isPopoverShow:Y,hidePopover:ae,showPopover:Me,togglePopover:j}=Z8({popoverMinWidth:y.value},p),W=a.computed(()=>(o.value||I.value)&&Y.value);a.watch(Y,Ne=>{Ne?(Xe(),J()):_.value=""});const J=()=>{var Oe;const Ne=P.value[0],Ae=x.value.get(Ne==null?void 0:Ne.value);Ae&&!Ae.disabled&&Ae.visible?Q.value=Ne==null?void 0:Ne.value:Q.value=(Oe=S.value.find(en=>!en.disabled&&en.visible))==null?void 0:Oe.value},G=Ne=>{!o.value||S.value.forEach(Ae=>{var Oe;Ae.visible=(Oe=Hs(String(Ae.label)))==null?void 0:Oe.includes(Hs(Ne))})},{searchKey:_,searchLoading:ne}=_8(ge.value?u.value:G,J),be=Ne=>{var Ae;Ne!==n.value&&(t("change",Ne,n.value),t("update:modelValue",Ne,n.value),(Ae=N==null?void 0:N.validate)==null||Ae.call(N,"change"))},we=()=>{O.value||(j(),t("toggle",Y.value))},ke=Ne=>{!o.value||(_.value=Ne)},Ee=(Ne,Ae)=>{const Oe=String(Ne);!I.value||!Oe||o.value&&S.value.find(oi=>Hs(String(oi.label))===Hs(Oe))||x.value.get(Oe)||(Ae.stopPropagation(),l.value?(P.value.push({value:Oe,label:Oe}),be(P.value.map(oi=>oi.value))):(P.value=[{value:Oe,label:Oe}],be(Oe),ae()),_.value="")},et=Ne=>{if(!(O.value||!Ne)){if(l.value){const Ae=P.value.findIndex(Oe=>Oe.value===Ne.value);Ae>-1?P.value.splice(Ae,1):P.value.push({value:Ne.value,label:Ne.label||Ne.value}),be(P.value.map(Oe=>Oe.value))}else P.value=[{label:Ne.label||Ne.value,value:Ne.value}],be(Ne.value),ae();Xe()}},Xe=()=>{var Ne,Ae;v.value==="tag"?(Ne=M.value)==null||Ne.focus():(Ae=w.value)==null||Ae.focus()},rt=Ne=>{Ne.stopPropagation(),P.value=[],be(l.value?[]:""),t("clear",l.value?[]:""),ae()},mn=()=>{Q.value=""},tt=()=>{ee.value?P.value=[]:S.value.forEach(Ne=>{Ne.disabled||P.value.find(Ae=>Ae.value===Ne.value)||P.value.push({value:Ne.value,label:Ne.label||Ne.value})}),be(P.value.map(Ne=>Ne.value)),Xe()},Fe=Ne=>{const{scrollTop:Ae,clientHeight:Oe,scrollHeight:en}=Ne.target;Ae+Oe===en&&t("scroll-end")},_t=Ne=>{const Ae=P.value.findIndex(Oe=>Oe.value===Ne);Ae>-1&&(P.value.splice(Ae,1),be(P.value.map(Oe=>Oe.value)))},yt=Ne=>{var Ae,Oe;return((Oe=(Ae=x.value)==null?void 0:Ae.get(Ne.value))==null?void 0:Oe.label)||Ne.label||Ne.value},sr=()=>{Array.isArray(n.value)?P.value=[...n.value.map(Ne=>({value:Ne,label:Ne}))]:n.value!==void 0&&(P.value=[{value:n.value,label:n.value}])},Zr=Ne=>{var en,oi;const Ae=S.value.filter(At=>!At.disabled&&At.visible),Oe=Ae.findIndex(At=>At.value===Q.value);if(!(!Ae.length||Oe===-1))switch(Ne.code){case"ArrowDown":{Ne.preventDefault();const At=Oe>=Ae.length-1?0:Oe+1;Q.value=(en=Ae[At])==null?void 0:en.value;break}case"ArrowUp":{Ne.preventDefault();const At=Oe===0?Ae.length-1:Oe-1;Q.value=(oi=Ae[At])==null?void 0:oi.value;break}case"Backspace":{if(!l.value||!P.value.length||_.value.length)return;P.value.pop(),be(P.value.map(At=>At.value));break}case"Enter":{if(!Y.value)Y.value=!0;else{const At=x.value.get(Q.value);et(At)}break}}},_r=({event:Ne})=>{var Oe;const{target:Ae}=Ne;((Oe=p.value)==null?void 0:Oe.contains(Ae))||p.value===Ae||(ae(),ve())};return a.provide(Po,a.reactive({multiple:l,selected:P,activeOptionValue:Q,showSelectedIcon:k,register:X,unregister:A,registerGroup:R,unregisterGroup:q,handleOptionSelected:et,handleGetLabelByValue:yt})),a.onMounted(()=>{sr(),setTimeout(()=>{C.value&&Me()})}),{selected:P,isInput:W,options:S,isDisabled:O,selectedLabel:E,isPopoverShow:Y,isHover:K,popperWidth:ye,inputRef:w,triggerRef:p,selectTagInputRef:M,searchLoading:ne,isOptionsEmpty:ue,isSearchEmpty:fe,isFocus:pe,isShowSelectContent:Ce,curContentText:re,isGroup:$,searchKey:_,setHover:he,cancelHover:le,handleFocus:te,handleTogglePopover:we,handleClear:rt,hidePopover:ae,showPopover:Me,handleToggleAll:tt,handleOptionSelected:et,handleClickOutside:_r,handleScroll:Fe,handleDeleteTag:_t,handleInputChange:ke,handleInputEnter:Ee,handleKeydown:Zr,handleSelectedAllOptionMouseEnter:mn}},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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=qt.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(Ni,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Vn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Rr,{class:"angle-up"},null),o=()=>this.multipleMode==="tag"?a.createVNode($8,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}):a.createVNode(tr,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter,onKeydown:(d,f)=>this.handleKeydown(f)},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}),l=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[o()]),u=()=>{var d,f;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ni,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.list.map(g=>a.createVNode(Tc,{value:g[this.idKey],label:g[this.displayKey]},null)),(f=(d=this.$slots).default)==null?void 0:f.call(d),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(Ni,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Gr,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>l(),content:()=>u()})])}});const Dc=Zt(X8,{Option:Tc,Group:Y8});function K8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:q8}=ir,jc=Object.assign({},q8);jc.width.default="400";jc.height.default="100%";var eM=a.defineComponent({name:"Sideslider",components:{BkModal:ir,BkButton:Ht},props:Te(U({},jc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},o=()=>{setTimeout(()=>{n("shown")},200)},l=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const u={header:()=>{var g,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(g=t.header)==null?void 0:g.call(t))!=null?m:e.title])])])},default:()=>{var g,m;return(m=(g=t.default)==null?void 0:g.call(t))!=null?m:"Content"},footer:()=>{var g,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(g=t.footer)==null?void 0:g.call(t))!=null?m:""])}},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ir,a.mergeProps(e,{maxHeight:f,class:d,style:`${e.direction}: 0;`,onHidden:l,onShown:o,onClose:i}),K8(u)?u:{default:()=>[u]})}}});const fh=_e(eM),i9={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var tM=a.defineComponent({name:"Steps",props:i9,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(g=>{var m;typeof g=="string"?f.push(g):f.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:(m=g.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...f)},o=d=>{i9.curStep=d},l=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},u=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,g)=>{const m=await e.beforeChange(d);m?f(m):g(m)}),t("update:curStep",d),t("click",d))}catch(f){console.warn(f)}};return a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),o=y=>this.curStep>y+1||this.defaultSteps[y].status==="done",l=y=>this.curStep===y+1,u=y=>{const{icon:C}=y;return C?Object.prototype.toString.call(C)==="[object Object]":typeof y=="string"},d=(y,C)=>(C.icon||(C.icon=y),!isNaN(C.icon)),f=y=>y.status==="loading",g=y=>y.status==="error",m=(y,C)=>l(y)&&this.status==="loading"||f(C)?a.createVNode(Io,{class:"bk-icon bk-steps-icon icon-loading"},null):l(y)&&this.status==="error"||g(C)?a.createVNode(Rn,{class:"bk-steps-icon"},null):o(y)?a.createVNode(Wr,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(y,C)?y+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((y,C)=>{var v,I,L;return a.createVNode("div",{class:["bk-step",y.title?"":"bk-step-no-content",o(C)?"done":"",l(C)?"current":"",l(C)&&this.status==="error"?"isError":"",y.status&&l(C)?[`bk-step-${y.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(y)?"icon":"number"}`,`bk-step-icon${y.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[(L=(I=(v=this.$slots)[C+1])==null?void 0:I.call(v))!=null?L:m(C,y)]),y.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[y.title]),y.description&&a.createVNode("div",{class:"bk-step-description",title:y.description},[y.description])]):""])})])}});const hh=_e(tM);var nM=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xi(),i=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),l=a.ref(e.modelValue!==!1),u=a.computed(()=>l.value?e.modelValue:e.value),d=a.computed(()=>{const g={[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":o.value,"is-unchecked":!o.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const m=`bk-switcher-${e.size}`;g[m]=!0}return g});a.watch(()=>e.modelValue,()=>{l.value=!0}),a.watch(()=>e.value,()=>{l.value=!1});const f=g=>{if(g.stopPropagation(),g.preventDefault(),e.disabled||i.value)return;const m=o.value?e.falseValue:e.trueValue,y=!o.value,C=()=>{var I;t("update:modelValue",m),t("change",y),(I=n==null?void 0:n.validate)==null||I.call(n,"change")};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(m),typeof v.then=="function"))return i.value=!0,v.then(()=>{C()}).finally(()=>{i.value=!1});v&&C()};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:f},[i.value?a.createVNode(vc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}});const gh=_e(nM),iM={onContentScroll:Function},rM=U({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},iM);var aM=(e,t)=>{const{renderAs:n,contentAs:i}=e,o=(d,f,g,m,y,C,v)=>{t.emit("content-scroll",[d,{translateY:y,translateX:C,pos:v}])},l=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:o,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,g,m,y,C,v,I,L,k,N,w;return a.h(n,{class:e.className},[(g=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?g:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(y=(m=t.slots).default)==null?void 0:y.call(m,{data:e.list}))!=null?C:""]),[[l,u]]),(L=(I=(v=t.slots).afterContent)==null?void 0:I.call(v))!=null?L:"",(w=(N=(k=t.slots).afterSection)==null?void 0:N.call(k))!=null?w:""])}}};function r9(e,t,n,i){let o=0,l=0,u=0,d=0;for(;o<e;o++){if(d=i(o,[o*n,(o+1)*n,"virtual"]),l+d>t){u=t-l;break}l+=d}return{startIndex:o,height:l,diffHeight:u}}function mh(e,t,n,i,o){if(!i)return;const l=i.scrollTop,u=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:g,startIndex:m,endIndex:y}=n,{offsetHeight:C}=i;let v=0,I=0,L=0;if(typeof e=="number"&&(v=Math.floor(l/e),I=Math.ceil(C/e)+v,L=l%e),typeof e=="function"){const k=r9(f,l,g,e);v=k.startIndex>0?k.startIndex:0,L=k.diffHeight,I=r9(f,C,g,e).startIndex+v+1}if(l!==d||v!==m||I!==y){const k=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(o,v,I,l,L,u,{bottom:k>=0?k:0})}}function sM(e,t,n){const{lineHeight:i=30,handleScrollCallback:o,pagination:l={},onlyScroll:u}=n.value;if(u){const C=t.scrollTop,v=t.scrollLeft,I=t.scrollHeight-t.offsetHeight-t.scrollTop;o(e,null,null,C,C,v,{bottom:I>=0?I:0});return}const{startIndex:d,endIndex:f,groupItemCount:g,count:m,scrollTop:y}=l;mh(i,o,{scrollTop:y,startIndex:d,endIndex:f,groupItemCount:g,count:m},t,e)}const ph=(e=60)=>qt.exports.throttle((t,n,i)=>sM(t,n,i),e),oM=(e,t,n,i=60)=>{Reflect.apply(ph(i),globalThis,[e,t,n])};var lM={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",o=>{oM(o,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",ph)}}},uM=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:lM},props:rM,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,o=H=>typeof H=="string"?[H]:typeof H=="object"&&!Array.isArray(H)?[H]:H;if(!e.enabled){const{rendAsTag:H}=aM(e,t);return H}const l=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(H,P,Q,O,E,ee,$)=>{u.startIndex=P,u.endIndex=Q,u.scrollTop=O,u.translateY=E,u.translateX=ee,u.pos=$,t.emit("content-scroll",[H,u])};a.onMounted(()=>{a.nextTick(()=>{y(e.list),C()})}),a.watch(()=>e.list,()=>{f(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),C()});const f=()=>{y(e.list)},g=a.ref(0),m=a.ref(0),y=H=>{if(g.value=Math.ceil((H||[]).length/e.groupItemCount),u.count=g.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 Q=0;for(let O=0;O<g.value;O++){const E=e.lineHeight.call(this,O,H.slice(O*e.groupItemCount,e.groupItemCount));Q+=typeof E=="number"?E:0}m.value=Q}else m.value=e.lineHeight*g.value;else m.value=e.abosuteHeight},C=(H=!0)=>{var Q;const P=(Q=l.value)==null?void 0:Q.parentNode;mh(e.lineHeight,d,u,P,null),H&&l.value&&l.value.scrollTo(0,0)},v=a.computed(()=>(e.list||[]).map((H,P)=>Te(U({},H),{$index:P}))),I=a.computed(()=>v.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),k=a.computed(()=>U({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"?L.value:{})),N=a.computed(()=>{const H=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:H?"none":"block"}}),w=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...o(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...o(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),x={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:u,throttleDelay:e.throttleDelay},S=()=>{f(),C()};return t.expose({reset:S}),()=>{var H,P,Q,O,E,ee,$,ue,fe,ge,Ce,re;return a.h(n||"div",{ref:l,class:w.value,style:k.value},[(Q=(P=(H=t.slots).beforeContent)==null?void 0:P.call(H))!=null?Q:"",a.withDirectives(a.h(i||"div",{class:p.value,style:U(U({},L.value),e.contentStyle)},[(ee=(E=(O=t.slots).default)==null?void 0:E.call(O,{data:I.value}))!=null?ee:""]),[[M,x]]),(fe=(ue=($=t.slots).afterContent)==null?void 0:ue.call($))!=null?fe:"",a.h("div",{class:[Be("virtual-section")],style:N.value}),(re=(Ce=(ge=t.slots).afterSection)==null?void 0:Ce.call(ge))!=null?re:""])}}});const Ao=_e(uM);var uo=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(uo||{});const vh=["none","row","col","outer"];var Xn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Xn||{}),Lr=(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))(Lr||{});const xn=(...e)=>!0,cM={columnPick:xn,columnFilter:xn,columnSort:xn,rowClick:xn,rowDblClick:xn,rowExpand:xn,pageLimitChange:xn,pageValueChange:xn,settingChange:xn,scrollBottom:xn},kt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},Du=4,Kn=42,Xs={large:78,medium:60,small:42},dM=[{value:"small",label:"\u5C0F",height:Xs.small},{value:"medium",label:"\u4E2D",height:Xs.medium},{value:"large",label:"\u5927",height:Xs.large}],a9=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Te(U(U({},t),e),{current:n})}return t}return{}};var fM=(e,t)=>{const n=a.ref(0),i=a.ref(0);let o=a.reactive({count:0,limit:10,current:1});o=a9(e.pagination,o);const l=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(o.current-1)*o.limit,i.value=o.current*o.limit},d=a.reactive([]),f=v=>{typeof v=="function"&&d.sort(v)},g=v=>{if(typeof v=="function"){const I=d.filter((L,k)=>v(L,k,e.data));d.splice(0,d.length,...I)}},m=(v,I)=>{d.splice(0,d.length,...t.slice(n.value,i.value)),g(v),f(I)},y=(v,I)=>{o=a9(e.pagination,o),C(),u(),m(v,I)},C=()=>{!e.pagination||(l.value=e.remotePagination?o:Te(U({},o),{count:e.data.length}))};return{pageData:d,localPagination:l,resolvePageData:m,watchEffectFn:y}},hM=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:On.Normal,mode:er.Default,indicator:null}:n.value,o=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var u,d,f;if(o.value){const{loading:g,size:m,mode:y,title:C,inline:v,indicator:I}=i();return(f=(d=(u=t.slots).fixedBottom)==null?void 0:d.call(u))!=null?f:a.createVNode(Ni,{loading:g,size:m,mode:y,title:C,inline:v,indicator:I},null)}}}},yh=(e=>(e.CURRENT="current",e.ALL="all",e))(yh||{});const gM={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(yh)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def(Kn*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def(Kn),headHeight:h.number.def(Kn),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def(Kn),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(vh,"border")).def([uo.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(kt.ROW_INDEX)};function mM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var pM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,o=>{t.value=o}),a.watch(()=>e.limitList,o=>{a.nextTick(()=>{o.includes(t.value)||([t.value]=o)})},{immediate:!0});const n=o=>{t.value=o};return{limit:t,render:({isFirst:o,isLast:l})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":o,"is-last":l}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Dc,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},mM(u=e.limitList.map((d,f)=>a.createVNode(Tc,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Wi=5;var vM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),o=a.ref(!1),l=a.ref(!1),u=a.computed(()=>{o.value=!1,l.value=!1;const v=[];if(e.totalPageNum<=Wi+2){for(let k=2;k<=e.totalPageNum-1;k++)v.push(k);return v}const I=Math.floor(Wi/2);e.totalPageNum>Wi&&(o.value=t.value-I>2,l.value=t.value+I<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Wi,Math.max(2,t.value-I));for(let k=L;k<L+Wi;k++)v.push(k);return v});a.watch(()=>e.modelValue,v=>{a.nextTick(()=>{v>=1&&v<=e.totalPageNum?t.value=v:v<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,v=>{t.value>v&&(t.value=v)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},g=v=>{v!==t.value&&(t.value=v)},m=()=>{t.value=Math.max(1,t.value-Wi)},y=()=>{t.value=Math.min(e.totalPageNum,t.value+Wi)};return{current:t,render:({isFirst:v,isLast:I})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":v,"is-last":I}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(qi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>g(1)},[a.createTextVNode("1")]),o.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(ro,null,null)]),u.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>g(L)},[L])),l.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:y},[a.createVNode(ro,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>g(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(Jn,null,null)])])}},yM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),o=a.computed(()=>i.value===1),l=a.computed(()=>i.value===e.totalPageNum);let u=0;const d=a.computed(()=>{const k=[];for(let N=1;N<=e.totalPageNum;N++)k.push(N);return k});a.watch(()=>e.modelValue,k=>{a.nextTick(()=>{k>=1&&k<=e.totalPageNum?i.value=k:k<1?i.value=1:i.value=e.totalPageNum,u=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,k=>{i.value>k&&(i.value=k)})});const f=()=>{o.value||(i.value=i.value-1)},g=()=>{l.value||(i.value=i.value+1)},m=()=>{n.value=!0},y=()=>{n.value=!1,t.value.textContent=`${u}`,u!==i.value&&(i.value=u)},C=k=>{const N=k.target,w=Number(N.textContent);!w||w<1||w>e.totalPageNum||w===i.value||(u=w)},v=k=>{["Enter","NumpadEnter"].includes(k.code)&&(k.preventDefault(),y())},I=k=>{u=k,y()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":o.value},onClick:f},[a.createVNode(mc,null,null)]),a.createVNode(rr,{theme:"light",trigger:"click",arrow:!1,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:y,onInput:C,onKeydown:v},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(k=>a.createVNode("div",{class:{item:!0,"is-actived":k===i.value},key:k,onClick:()=>I(k)},[k]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":l.value},onClick:g},[a.createVNode(Ga,null,null)])])}},bM=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const CM={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var MM=a.defineComponent({name:"Pagination",props:CM,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:o}=a.toRefs(e),l=bM(),{current:u,render:d}=vM(),{current:f,render:g}=yM(),{limit:m,render:y}=pM();return a.watch([i,m,o],([C,v])=>{const I=Math.ceil(C/v);n.value=I<1?1:I},{immediate:!0}),a.watch(u,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(f,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(m,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:l,renderList:d,renderLimit:y,renderSmallList:g}},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((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const zc=_e(MM);var iu=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),IM=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Do,{scene:"part",type:n.value},{default:()=>{var i,o;return[(o=(i=t.default)==null?void 0:i.call(t))!=null?o:e.emptyText]}})}});const It=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>It(e,i,n)).filter(i=>i!==void 0).at(0)},ru=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],wM=e=>bh(e,"auto"),bh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},NM=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>vh.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Sa=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},au=(e,t,n=20,i=0)=>{const{width:o}=e.getBoundingClientRect()||{},l=o-i;let u=l;const d=[],f=(m,y)=>{const{minWidth:C=void 0}=m;if(C===void 0)return y;let v=y;return/^\d+\.?\d*$/.test(`${C}`)&&(v=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(v=Number(C)*l/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(v=Number(`${C}`.replace(/px/i,""))),v},g=(m,y,C=!0)=>{const v=f(m,y),I=y<v?v:y;Object.assign(m,{calcWidth:I}),C&&(u=u-I,u<0&&(u=0))};if(t.forEach((m,y)=>{if(!m.isHidden){const v=String(Sa(m,["resizeWidth","width"]));let I=!0;if(/^\d+\.?\d*(px)?$/.test(v)){const L=Number(v.replace("px",""));g(m,L),I=!1}if(/^\d+\.?\d*%$/.test(v)){let L=n;if(u>0){const k=Number(v.replace("%",""));L=u*k/100}g(m,L),I=!1}I&&d.push(y)}}),d.length>0){let m=n;u>0&&(m=u/d.length,d.forEach(y=>g(t[y],m,!1)))}},LM=(e,t,n=60,i=!1)=>{const o=qt.exports.throttle(()=>{typeof t=="function"&&t()},n),l=new ResizeObserver(()=>{o()});return i&&typeof t=="function"&&t(),{start:()=>{l.observe(e)},stop:()=>{l.disconnect(),l.unobserve(e)}}},ju=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},U({},i))},Pc=(e,t,n)=>n.type==="index"?e[kt.ROW_INDEX]+1:qt.exports.get(e,t),ba=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?ba(Reflect.apply(e,globalThis,t),t):[],kM=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===kt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((o,l)=>Object.prototype.hasOwnProperty.call(o,l)?o[l]:o,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),xM=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function TM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var SM=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),o=a.computed(()=>Se({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),l=Se({[Be("table-head-filter")]:!0}),u=C=>{i.isOpen=C},d=`light ${Be("table-head-filter")}`,f=a.computed(()=>{const{list:C=[]}=n.filter;return C.map(v=>Te(U({},v),{checked:i.checked.includes(v.value)}))}),g=typeof n.filter.filterFn=="function"?(C,v,I,L)=>n.filter.filterFn(C,v,e.column,I,L):(C,v)=>C.length?C.includes(Pc(v,It(n,"field",[n,v]),n)):!0,m=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],g),i.isOpen=!1},y=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,g)))};return()=>a.createVNode(Gr,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>u(!0),onAfterHidden:()=>u(!1)}),{default:()=>a.createVNode(tc,{class:o.value},null),content:()=>{let C;return a.createVNode("div",{class:l},[a.createVNode(Ic,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":v=>i.checked=v},TM(C=f.value.map(v=>a.createVNode("div",{class:"list-item"},[a.createVNode(nr,{label:v.value},{default:()=>[v.text]})])))?C:{default:()=>[C]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:m},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:y},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Mi=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Mi||{}),DM=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(o,l)=>{var y,C;if(o.stopImmediatePropagation(),o.stopPropagation(),o.preventDefault(),n.value===l?n.value=Mi.NULL:n.value=l,e.column.sort==="custom"){t("change",null,l);return}const u=e.column.field,d=v=>Pc(v,u,e.column),f=(v,I)=>{const L=d(v),k=d(I);return typeof L=="number"&&typeof k=="number"?L-k:String.prototype.localeCompare.call(L,k)},g=typeof((y=e.column.sort)==null?void 0:y.sortFn)=="function"?(C=e.column.sort)==null?void 0:C.sortFn:f,m=n.value===Mi.NULL?()=>!0:(v,I)=>g(v,I)*(l===Mi.DESC?-1:1);t("change",m,l)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(ec,{class:["sort-action","sort-asc",n.value===Mi.ASC?"active":""],onClick:o=>i(o,Mi.ASC)},null),a.createVNode(Mo,{class:["sort-action","sort-desc",n.value===Mi.DESC?"active":""],onClick:o=>i(o,Mi.DESC)},null)])}});class jM{constructor(t,n){Mr(this,"props",null);Mr(this,"ctx",null);this.props=t,this.ctx=n}}function s9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var zM=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const n=dM,i=a.ref(!1),o=a.ref(!1),l=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(O=>Te(U({},O),{field:O.field||O.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),u=a.ref(l.value.size||"small"),d=a.ref(e.rowHeight),f=a.ref(l.value.checked),m=`light ${Be("table-settings")}`,y={checkAll:i.value,activeSize:u.value,activeHeight:d.value},C=()=>{t("change",{checked:f.value,size:u.value,height:d.value}),o.value=!1},v=()=>{i.value=y.checkAll,u.value=y.activeSize,d.value=y.activeHeight,f.value=l.value.checked||[],o.value=!1},I=()=>{Object.assign(y,{checkAll:i.value,activeSize:u.value,activeHeight:d.value}),o.value=!0},L=O=>{O.stopImmediatePropagation(),O.stopPropagation(),O.preventDefault(),i.value=!i.value;const E=l.value.fields||e.columns||[];if(i.value)f.value=E.map((ee,$)=>It(ee,"field",[ee,$]));else{const ee=E.filter($=>$.disabled).map(($,ue)=>It($,"field",[$,ue]));f.value.splice(0,f.value.length,...ee)}},k=a.computed(()=>{var O;return((O=l.value.limit)!=null?O:0)>0}),N=l.value.sizeList||n,w=a.computed(()=>k.value&&(l.value.limit?l.value.limit:0)<=f.value.length),p=(O,E)=>O.disabled||w.value&&!f.value.includes(It(O,"field",[O,E])),M=O=>{u.value=O.value,d.value=O.height},x=O=>({"line-size":!0,"is-medium":u.value==="medium",active:O.value===u.value}),S={marginRight:"12px"},H=()=>N.map(O=>a.createVNode("span",{class:x(O),onClick:()=>M(O)},[O.label])),P=a.computed(()=>l.value.fields||e.columns||[]),Q=a.computed(()=>f.value.length>0&&!P.value.every((O,E)=>f.value.includes(It(O,"field",[O,E]))));return a.watch(()=>[f.value],()=>{f.value.length||(i.value=!1),f.value.length&&P.value.every((O,E)=>f.value.includes(It(O,"field",[O,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...l.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Gr,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(sc,{style:"color: #c4c6cc;",onClick:I},null)]),content:()=>{let O;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(wo,{class:"icon-close-action",onClick:v},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),l.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(nr,{label:"\u5168\u9009",indeterminate:Boolean(Q.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Ic,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":E=>f.value=E},s9(O=P.value.map((E,ee)=>{let $;return a.createVNode("div",{class:"field-item"},[a.createVNode(nr,{label:It(E,"field",[E,ee]),checked:f.value.includes(It(E,"field",[E,ee])),disabled:p(E,ee)},s9($=It(E,"label",[E,ee]))?$:{default:()=>[$]})])}))?O:{default:()=>[O]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),H()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ht,{theme:"primary",style:S,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Ht,{style:S,onClick:v},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),zu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?Kn:0),o=y=>({column_fixed:!!y.fixed,column_fixed_left:y.fixed!=="right",column_fixed_right:y.fixed==="right"}),l=y=>y.fixed==="right"?"right":"left",u={left:(y=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,v,I)=>y&&I===0?C:C+Sa(v),0),right:(y=!0)=>t.filter(C=>C.fixed==="right").reduce((C,v,I)=>y&&I===0?C:C+Sa(v),n?Du:0)},d=u.right,f=()=>{const y=(I,L)=>{if(!I.fixed)return{};const k=l(I),N=k==="right"?-1:1,w=`${L[k]}px`;return L[k]=L[k]+Sa(I)*N,{[k]:w}},C=d(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:y}},g=()=>{const y=v=>({width:`${u[v](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const I=l(v),L=C[I];return C[I]=!0,L?"":a.createVNode("div",{class:o(v),style:y(I)},null)})},m=Be("table-fixed");return{renderFixedColumns:g,fixedWrapperClass:m,getFixedColumnStyleResolve:f}};class PM{constructor(t,n,i,o){Mr(this,"getRowHeight",(t,n)=>{const{size:i,height:o}=this.setting;return o!=null?It(this.setting,"height",["tbody",t,n,i]):It(this.props,"rowHeight",["tbody",t,n])});Mr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Mr(this,"getHeadColumnClass",(t,n)=>Te(U({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=o,this.plugins=new jM(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=ju(this.props);if(!t)return null;const n=i=>{const{checked:o=[],size:l,height:u}=i;this.reactiveProp.setting.size=l,this.reactiveProp.setting.height=u,o.length&&this.colgroups.forEach(d=>{d.isHidden=!(o!=null?o:[]).includes(It(d,["field","type"],[d]))}),this.emitEvent(Xn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(zM,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,o;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(o=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?o:a.createVNode(IM,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(zc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(o=>o.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(o=>o.index!==t&&o.active).forEach(o=>{Object.assign(o,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(o,l)=>{this.emitEvent(Xn.ON_SORT_BY_CLICK,[{sortFn:o,column:t,index:n,type:l}])};return a.createVNode(DM,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(o,l)=>{const u=(d,f)=>l(o,d,f);this.emitEvent(Xn.ON_FILTER_CLICK,[{filterFn:u,checked:o,column:t,index:n}])};return a.createVNode(SM,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=ju(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},o=(g,m)=>{const y=[];return g.sort&&y.push(this.getSortCell(g,m)),g.filter&&y.push(this.getFilterCell(g,m)),typeof n=="function"?(y.unshift(n(g,m)),y):(y.unshift(It(g,"label",[g,m])),y)},l=g=>Array.from(g.listeners.keys()).reduce((m,y)=>{const C=y.split("_").slice(-1)[0];return Object.assign(m,{[C]:v=>{g.listeners.get(y).forEach(I=>Reflect.apply(I,this,[v,g,this]))}})},{}),{getFixedColumnStyleResolve:u}=zu(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedoffset:f}=u();return a.createVNode("thead",{style:i},[a.createVNode(iu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((g,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(g,m),style:d(g,f),onClick:()=>this.handleColumnHeadClick(m)},l(g)),[a.createVNode("div",{class:"cell"},[o(g,m)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=zu(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,o)=>{const l=[...ba(this.props.rowStyle,[i,o,this]),{"--row-height":`${this.getRowHeight(i,o)}px`}],u=[...ba(this.props.rowClass,[i,o,this])],{resolveFixedColumnStyle:d,fixedoffset:f}=n(),g=`${this.uuid}-${i[kt.ROW_UID]}`;return[a.createVNode(iu,{key:g},{default:()=>[a.createVNode("tr",{style:l,class:u,onClick:m=>this.handleRowClick(m,i,o,t),onDblclick:m=>this.handleRowDblClick(m,i,o,t)},[this.filterColgroups.map((m,y)=>{const C=[d(m,f),...ba(this.props.cellStyle,[m,y,i,o,this])],v=[this.getColumnClass(m,y),...ba(this.props.cellClass,[m,y,i,o,this]),{"expand-row":i[kt.ROW_EXPAND]}],I={cell:!0,"expand-cell":m.type==="expand"},L=`__CELL_${o}_${y}`;return a.createVNode("td",{class:v,style:C,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:I},[this.renderCell(i,m,o,t)])])})])]}),this.renderExpandRow(i,u)]})])}renderExpandRow(t,n){if(!!t[kt.ROW_EXPAND]){const o=[...n,{row_expend:!0}],l=`${this.uuid}-${t[kt.ROW_UID]}_expand`;return a.createVNode(iu,{key:l},{default:()=>{var u,d,f;return[a.createVNode("tr",{class:o},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(u=this.context.slots).expandRow)==null?void 0:d.call(u,t))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,o){this.context.emit("rowClick",t,n,i,o,this)}handleRowDblClick(t,n,i,o){this.context.emit("rowDblClick",t,n,i,o,this)}getExpandCell(t){return!!t[kt.ROW_EXPAND]?a.createVNode(No,null,null):a.createVNode(Ga,null,null)}handleRowExpandClick(t,n,i,o,l){this.emitEvent(Xn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:o,e:l}])}renderCell(t,n,i,o){if(n.type==="expand"){const u=()=>{var d,f,g;return typeof n.render=="function"?n.render(null,t,i,o):(g=(f=(d=this.context.slots).expandCell)==null?void 0:f.call(d,{row:t,column:n,index:i,rows:o}))!=null?g:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,o,d)},[u()])}const l=Pc(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const u=this.props.data[t[kt.ROW_INDEX]];return n.render({cell:l,data:u,row:t,column:n,index:i,rows:o})}return l}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=Se({active:this.isColActive(n)}),o=`${wM(Sa(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:o},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const o9=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:ru(e.activeColumn):Array.isArray(e.activeColumn)?ru(e.activeColumn[0]):ru(e.activeColumn):[];var AM=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(o9(e)),i=()=>(e.columns||[]).map((o,l)=>({index:l,active:n.some(u=>u===l),_column:o}));return a.watchEffect(()=>{t=i();const o=o9(e);t.forEach((l,u)=>{Object.assign(l,{active:o.some(d=>d===u)})})}),{activeColumns:t}},OM=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let o=!1,l=!1,u=!1,d=0,f=null,g=0;const m=a.ref(-1e3),y=p=>{var H;l=!1,u=!1;const M=document.body.style;M.cursor="";const x=p.clientX-d;f.resizeWidth=((H=f.resizeWidth)!=null?H:f.calcWidth)+x,document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",v),d=0,m.value=-1e3,f=null,p.target.closest("table").querySelectorAll("th").forEach(P=>P.style.setProperty("user-select","inherit"))},C=p=>qt.exports.throttle(()=>{m.value=p.clientX-d+g},60),v=p=>{document.body.style.setProperty("cursor",""),C(p)()},I={[i.MOUSE_DOWN]:(p,M)=>{if(!o)return;l=!0,document.body.style.setProperty("cursor","col-resize"),f=M,d=p.clientX;const S=p.target.closest("table");g=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",y),document.addEventListener("mousemove",v)},[i.MOUSE_MOVE]:(p,M)=>{l&&!u&&(u=!0);const x=p.target.closest("th");if(u&&x.style.setProperty("user-select","none"),!u){if(!x)return;const S=x.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(o=!0,x.style.setProperty("cursor","col-resize")):(x.style.setProperty("cursor",""),o=!1)}},[i.MOUSE_OUT]:(p,M)=>{const x=p.target;u||x.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,k=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(I).forEach(M=>{const x=L(M);p.listeners.has(x)||p.listeners.set(x,[]),p.listeners.get(x).push(I[M])})})},N=()=>{e.forEach(p=>{Object.keys(I).forEach(M=>{const x=L(M);if(p.listeners.has(x)){const S=p.listeners.get(x);S.splice(0,S.length)}})})};t&&k();const w=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:N,dragOffsetX:m,dragOffsetXStyle:w}};const EM=(e,t,n,i)=>{const o=a.ref(200),l=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>Se({[Be("table")]:!0,"has-footer":u.value,"has-scroll-y":l.value||e.virtualEnabled},NM(e.border))),f=Se({[Be("table-head")]:!0,"has-settings":!!e.settings}),g=ju(e),m=a.computed(()=>({"--row-height":`${It(g,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),y={[Be("table-body")]:!0},C=a.computed(()=>Se({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),v=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((P,Q)=>P+Number(`${Q.width}`.replace(/px/ig,"")),0),H=l.value?Du:0;return`${S+H}px`}return"100%"},I=a.computed(()=>({minHeight:bh(e.minHeight,"auto"),width:v(),maxWidth:"100%"})),L=(S,H)=>{const P=String(S);if(/^\d+\.?\d*$/.test(P))return Number(P);if(/^\d+\.?\d*px$/ig.test(P))return Number(P.replace("px",""));if(/^\d+\.?\d*%$/ig.test(P)&&typeof H=="number"){const Q=Number(P.replace("%",""));return H*Q/100}return H},k=a.reactive({}),N=()=>e.showHead?L(e.headHeight,Kn):0,w=()=>{const S=L(e.height,o.value),H=N(),P=L(e.minHeight,o.value),Q=e.pagination&&e.data.length?Kn:0,O=S-H-Q,E=e.height!=="auto"?`${O}px`:!1,ee=P-H-Q,$=L(e.maxHeight,void 0),ue=typeof $=="number"?`${$-H-Q}px`:!1;Object.assign(k,{display:i!=null&&i.length?"block":!1,"min-height":`${ee}px`,height:E,maxHeight:ue})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:H}=S.parentElement.getBoundingClientRect();o.value=H,w(),M(S)}},M=S=>{const H=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,P=S.querySelector(".bk-table-body");l.value=xM(P,H,0)};return{tableClass:d,headClass:f,contentClass:y,footerClass:C,wrapperStyle:I,contentStyle:k,headStyle:m,resetTableHeight:p,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let S=0;return l.value&&(S=S+Du),e.border.includes(uo.OUTER)&&!e.border.includes(uo.NONE)&&(S=S+2),S},hasFooter:u,hasScrollY:l}},JM=e=>{var k,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(w=>Te(U({},w),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:o,resetResizeEvents:l,registerResizeEvent:u}=OM(t,!0),{activeColumns:d}=AM(e);a.watch(()=>e.columns,()=>{n(),l(),u()},{immediate:!0,deep:!0});const f=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(k=e.settings)==null?void 0:k.size,height:Xs[(N=e.settings)==null?void 0:N.size]}}),g=w=>{var p;return f.rowActions.has(w)?(p=f.rowActions.get(w))==null?void 0:p.isExpand:!1},m=(w,p=void 0)=>{var S;const M=w[kt.ROW_UID],x=typeof p=="boolean"?p:!g(M);f.rowActions.set(M,Object.assign({},(S=f.rowActions.get(M))!=null?S:{},{isExpand:x})),v()},y=a.reactive([]),C=(w=!1)=>{y.splice(0,y.length,...e.data.map((p,M)=>{const x=kM(p,e,M);return Te(U({},p),{[kt.ROW_INDEX]:M,[kt.ROW_UID]:x,[kt.ROW_EXPAND]:w?g(x):!1})}))},v=()=>{y.forEach(w=>{Object.assign(w,{[kt.ROW_EXPAND]:g(w[kt.ROW_UID])})})},{renderFixedColumns:I,fixedWrapperClass:L}=zu(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:o,reactiveSchema:f,indexData:y,fixedWrapperClass:L,initIndexData:C,updateIndexData:v,renderFixedColumns:I,setRowExpand:m,updateColGroups:n}};var QM=a.defineComponent({name:"Table",props:gM,emits:cM,setup(e,t){let n=null,i=null,o=null;const l=a.ref(),u=a.ref(),{colgroups:d,dragOffsetXStyle:f,dragOffsetX:g,reactiveSchema:m,indexData:y,renderFixedColumns:C,setRowExpand:v,initIndexData:I,fixedWrapperClass:L}=JM(e),{pageData:k,localPagination:N,resolvePageData:w,watchEffectFn:p}=fM(e,y),{tableClass:M,headClass:x,contentClass:S,footerClass:H,wrapperStyle:P,contentStyle:Q,headStyle:O,updateBorderClass:E,resetTableHeight:ee,getColumnsWidthOffsetWidth:$,hasFooter:ue}=EM(e,l,m,k),fe=new PM(e,t,m,d);a.watch(()=>[e.data,e.pagination],()=>{I(e.reserveExpand),p(i,n),a.nextTick(()=>{ee(l.value),E(l.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((l==null?void 0:l.value)instanceof HTMLElement){const le=$();au(l.value,d,20,le)}}),fe.on(Xn.ON_SORT_BY_CLICK,le=>{var Y,ae;const{sortFn:pe,column:te,index:ve,type:ye}=le;typeof pe=="function"&&(n=pe,w(i,n),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y)),t.emit(Lr.COLUMN_SORT,{column:te,index:ve,type:ye})}).on(Xn.ON_FILTER_CLICK,le=>{var Y,ae;const{filterFn:pe,checked:te,column:ve,index:ye}=le;typeof pe=="function"&&(i=pe,w(i,n),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y)),t.emit(Lr.COLUMN_FILTER,{checked:te,column:ve,index:ye})}).on(Xn.ON_SETTING_CHANGE,le=>{const{checked:pe=[],size:te,height:ve}=le;a.nextTick(()=>{var Y,ae;E(l.value);const ye=$();pe.length&&au(l.value,d,20,ye),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y),t.emit(Lr.SETTING_CHANGE,{checked:pe,size:te,height:ve})})}).on(Xn.ON_ROW_EXPAND_CLICK,le=>{const{row:pe,column:te,index:ve,rows:ye,e:Y}=le;t.emit(Lr.ROW_EXPAND_CLICK,{row:pe,column:te,index:ve,rows:ye,e:Y}),v(pe,!pe[kt.ROW_EXPAND])});const ge=le=>{var Me;const pe=(Me=m.pos.bottom)!=null?Me:0,te=le[1],{translateX:ve,translateY:ye,pos:Y={}}=te;m.scrollTranslateY=ye,m.scrollTranslateX=ve,m.pos=Y;const{bottom:ae}=Y;ae<=2&&pe>ae&&_y(60,()=>{t.emit(Lr.SCROLL_BOTTOM,Te(U({},Y),{translateX:ve,translateY:ye}))},!0)()};a.onMounted(()=>{o=LM(l.value,()=>{(e.height==="100%"||e.height==="auto")&&ee(l.value),E(l.value);const le=$();au(l.value,d,20,le)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,fe.destroy()}),t.expose({setRowExpand:v});const Ce=a.computed(()=>Te(U({},S),{"__is-empty":!k.length})),re={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},X={column_drag_line:!0,"offset-x":!0},A=a.computed(()=>Te(U({},f.value),{left:`${g.value-m.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},q={[Be("fixed-bottom-border")]:!0,"_is-empty":!e.data.length},{renderScrollLoading:K}=hM(e,t),he=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:M.value,style:P.value,ref:l},[a.createVNode("div",{class:x,style:O.value},[fe.renderTableHeadSchema()]),a.createVNode(Ao,a.mergeProps({ref:u,lineHeight:fe.getRowHeight,class:Ce.value,style:Q,list:k},he,{contentClassName:re,onContentScroll:ge,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:le=>fe.renderTableBodySchema(le.data||e.data),afterSection:()=>a.createVNode("div",{class:q},null)}),a.createVNode("div",{class:L},[C(),a.createVNode("div",{class:X,style:A.value},null),a.createVNode("div",{class:R},[K()])]),a.createVNode("div",{class:H.value},[ue.value&&fe.renderTableFooter(N.value)])])}});const Ch=_e(QM),Ir=12;function VM(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(o=[])=>{t.curPage=1,t.totalSize=o.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const l=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)l.push(o.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...l),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:o=>{t.curPage=o,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function RM(e){const{useGroup:t,saveKey:n,displayKey:i,list:o}=a.toRefs(e),l=a.reactive({flatList:[]});return a.watch([t,n,i,o],()=>{l.flatList=[];let u=o.value;t.value&&(u=o.value.reduce((d,f)=>{let g=[];return f.children&&(g=f.children.map(m=>U({group:{groupId:f[n.value],groupName:f[i.value]}},m))),d.concat(g)},[])),l.flatList=[...u]},{immediate:!0,deep:!0}),l.flatList}const l9=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n};var u9=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.string,tpl:{type:Function,default:null}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const WM=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.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 HM=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.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]])])}}),BM=a.defineComponent({name:"TagInput",directives:{bkTooltips:Nc},props:WM(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=xi(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:l}=a.toRefs(e),{pageState:u,initPage:d,pageChange:f}=VM(l),g=a.ref(""),m=a.ref(null),y=a.ref(null),C=a.ref(null),v=a.ref(null),I=a.ref(null),L=a.ref(null),k=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),w=a.computed(()=>e.maxData===1),p=a.computed(()=>O.selectedTagList.length===0&&g.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&O.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),x=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{ue()}),a.watch(g,qt.exports.debounce(()=>{const G=u.curPageList.length!==0,{value:_}=g;_!==""&&G||_===""&&e.trigger==="focus"&&G?o.isShow=!0:(e.trigger!=="focus"||!G)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,G=>{S(),G&&I.value&&(a.nextTick(()=>{I.value.scrollTop=0}),I.value.removeEventListener("scroll",H),I.value.addEventListener("scroll",H))});const S=()=>{var _,ne;const G=w.value?0:(_=v.value)==null?void 0:_.offsetLeft;o.modifiers=[{name:"offset",options:{offset:[G,4]}}],(ne=L.value)==null||ne.update()},H=()=>{if(u.isPageLoading||I.value.scrollTop===0)return;const{scrollTop:G,offsetHeight:_,scrollHeight:ne}=I.value;if(G+_>=ne){const be=u.curPage+1;be<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f(be)},500))}},P=()=>{var _;return Array.from(((_=C.value)==null?void 0:_.childNodes)||[]).filter(ne=>ne.nodeType!==Node.TEXT_NODE)},Q=G=>{if(!e.disabled){if(G!=null&&G.target){const{className:_}=G.target;(_.indexOf("bk-tag-input-trigger")>-1||_.indexOf("tag-list")>-1)&&C.value.appendChild(v.value)}clearTimeout(k.value),w.value&&E.value.length&&(O.tagListCache=[...E.value],O.selectedTagListCache=[...O.selectedTagList],g.value=O.selectedTagListCache[0][e.saveKey],J(O.selectedTagList[0],0),R()),i.isEdit=!0,a.nextTick(()=>{var _;(_=m.value)==null||_.focus(),e.trigger==="focus"&&O.localList.length!==0&&(fe(),o.isShow?S():o.isShow=!0)})}},O=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>O.selectedTagList.map(G=>G[e.saveKey])),ee=RM(e),$=a.computed(()=>{if(e.useGroup){const G={};return u.curPageList.forEach((_,ne)=>{_.__index__=ne,G[_.group.groupId]||(G[_.group.groupId]={id:_.group.groupId,name:_.group.groupName,children:[]}),G[_.group.groupId].children.push(_)}),Object.keys(G).map(_=>G[_])}return u.curPageList}),ue=()=>{const{saveKey:G,modelValue:_,displayKey:ne,allowCreate:be,trigger:we}=e;O.selectedTagList=[],O.localList=[...ee],_.length&&(_.forEach(ke=>{const Ee=O.localList.find(et=>ke===et[G]);Ee!==void 0?O.selectedTagList.push(Ee):be&&!E.value.includes(ke)&&O.selectedTagList.push({[G]:ke,[ne]:ke})}),w.value||(O.localList=O.localList.filter(ke=>!_.includes(ke[G])))),we==="focus"&&fe()},fe=(G="")=>{const{searchKey:_,filterCallback:ne}=e,be=G.toLowerCase();let we=[];if(typeof ne=="function")we=ne(be,_,O.localList)||[];else if(Array.isArray(_)){const ke=_.map(Ee=>O.localList.filter(et=>et[Ee].toLowerCase().indexOf(be)!==-1));we=Array.from(new Set(ke.flat()))}else we=O.localList.filter(ke=>ke[_].toLowerCase().indexOf(be)!==-1);d(we)},ge=(G,_)=>{const ne={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(G[e.saveKey])};return e.useGroup?ne["bk-selector-actived"]=G.__index__===i.focusItemIndex:ne["bk-selector-actived"]=_===i.focusItemIndex,ne};a.onMounted(()=>{ue()});const Ce=()=>{O.tagListCache=[],O.selectedTagListCache=[],O.selectedTagList=[]},re=()=>{g.value=""},X=()=>{if(w.value)return 0;const _=P().findIndex(({id:ne})=>ne==="tagInputItem");return _>=0?_:0},A=(G,_,ne=!1)=>{if(!_||!G)return;let be=_;ne&&(be=_.nextElementSibling||null),_.parentNode.insertBefore(G,be)},R=G=>{const{maxData:_,trigger:ne,allowCreate:be}=e;if(_===-1||_>E.value.length){const{value:we}=G!=null&&G.target?G.target:g,ke=l9(we);ke?(fe(we),m.value.style.width=`${ke*Ir}px`):ne==="focus"&&fe()}else K(),g.value="",o.isShow=!1;i.isEdit=!0,i.focusItemIndex=be?-1:0},q=()=>{var G;o.width=w.value?(G=y.value)==null?void 0:G.clientWidth:e.contentWidth},K=()=>{k.value=setTimeout(()=>{var _;const G=g.value;if(re(),i.isEdit=!1,w.value){const[ne]=O.tagListCache;G&&G===ne&&O.selectedTagListCache.length?W(O.selectedTagListCache[0],"select"):pe("remove")}else if(e.allowAutoMatch&&G){const ne=u.curPageList.find(be=>Array.isArray(e.searchKey)?e.searchKey.map(ke=>be[ke]).includes(G):be[e.searchKey]===G);ne?he(ne,"select"):e.allowCreate&&he(G,"custom")}o.isShow=!1,t("blur",G,E.value),(_=n==null?void 0:n.validate)==null||_.call(n,"blur")},200)},he=(G,_,ne)=>{ne==null||ne.stopPropagation(),!(!G||G.disabled)&&(w.value&&Ce(),W(G,_),pe("select"),re(),o.isShow=!1)},le=(G,_,ne)=>{ne==null||ne.stopPropagation(),J(G,_),re(),pe("remove",G),m.value.style.width=`${Ir}px`},pe=(G,_)=>{var ne;t("change",E.value),t(G,_),t("update:modelValue",E.value),(ne=n==null?void 0:n.validate)==null||ne.call(n,"change")},te=G=>{G.stopPropagation();const _=O.selectedTagList;O.selectedTagList=[];const ne=ee.filter(be=>_.some(we=>we[e.saveKey]===be[e.saveKey]));(e.allowCreate&&ne.length!==0||!e.allowCreate)&&!w.value&&O.localList.push(...ne),pe("removeAll")},ve=()=>{const G={height:I.value.clientHeight,yAxis:I.value.getBoundingClientRect().y};a.nextTick(()=>{const _=I.value.querySelector(".bk-selector-actived");if(!_)return;const ne={height:_.clientHeight,yAxis:_.getBoundingClientRect().y};ne.yAxis<G.yAxis&&(I.value.scrollTop=I.value.scrollTop-(G.yAxis-ne.yAxis));const be=ne.yAxis+ne.height-G.yAxis;be>G.height&&(I.value.scrollTop=I.value.scrollTop+be-G.height)})},ye=(G,_)=>{const ne=P();A(v.value,ne[G-1]),O.selectedTagList.splice(G-1,1),Q();const be=ee.some(we=>we===_[e.saveKey]);(e.allowCreate&&be||!e.allowCreate)&&!w.value&&O.localList.push(_),m.value=`${Ir}px`,pe("remove")},Y=G=>{if(u.isPageLoading)return;let _;const ne=G.target.value,be=l9(ne),we=X(),ke=P();switch(G.code){case"ArrowUp":if(G.preventDefault(),!o.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=u.curPageList.length-1),ve();break;case"ArrowDown":if(G.preventDefault(),!o.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>u.curPageList.length-1?u.curPageList.length:i.focusItemIndex,i.focusItemIndex===u.curPageList.length&&(i.focusItemIndex=0),ve();break;case"ArrowLeft":if(i.isEdit=!0,!be){if(we<1)return;A(v.value,ke[we-1]),Q()}break;case"ArrowRight":if(i.isEdit=!0,!be){if(we===ke.length-1)return;A(ke[we+1],v.value),Q()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&i.focusItemIndex>=0&&o.isShow?he(u.curPageList[i.focusItemIndex],"select",G):e.allowCreate&&he(g.value,"custom",G),G.preventDefault();break;case"Backspace":we!==0&&!g.value&&(_=O.selectedTagList[we-1],ye(we,_));break}},ae=G=>{const _=[];return G.split(";").forEach(be=>{if(be.match(/^[a-zA-Z][a-zA-Z_]+/g)){const we=be.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");_.push({[e.saveKey]:we,[e.displayKey]:we})}}),_},Me=G=>{if(G.preventDefault(),w.value)return!1;const{maxData:_,saveKey:ne,pasteFn:be}=e,we=G.clipboardData.getData("text");let Ee=(be?be(we):ae(we)).map(et=>et[ne]);if(Ee.length){const et=P(),Xe=X(),rt=O.localList.map(tt=>tt[ne]);if(Ee=Ee.filter(tt=>(tt==null?void 0:tt.trim())&&!E.value.includes(tt)&&rt.includes(tt)),_!==-1){const tt=O.selectedTagList.length;if(tt<_){const Fe=_-tt;Ee.length>Fe&&(Ee=[...Ee.slice(0,Fe)])}else Ee=[]}const mn=O.localList.filter(tt=>Ee.includes(tt[ne]));Ee.length&&(O.selectedTagList.splice(Xe,0,...mn),A(v.value,et[Xe]),m.value.style.width=`${Ir}px`,O.localList=O.localList.filter(tt=>!Ee.includes(tt[ne])),pe("select"),Q())}},j=G=>{e.disabled||(A(v.value,G.currentTarget,!0),m.value.style.width=`${Ir}px`,o.isShow&&S())},W=(G,_)=>{if(O.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ne,saveKey:be,displayKey:we,createTagValidator:ke}=e,Ee=X();let et=1,Xe=!1,rt;const mn=Fe=>typeof ke=="function"?ke(Fe):!0,tt=Fe=>O.localList.find(_t=>_t[be]===Fe);if(_==="custom")if(ne){let Fe=G.split(ne);Fe=Fe.filter(yt=>(yt==null?void 0:yt.trim())&&!E.value.includes(yt)&&mn(yt));const _t=Fe.map(yt=>tt(yt)||{[be]:yt,[we]:yt});Fe.length&&(O.selectedTagList.splice(Ee,0,..._t),et=_t.length,Xe=!0)}else{const Fe=typeof G=="object";if(rt=Fe?G[be]:G.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!E.value.includes(rt)&&mn(rt)){const _t=tt(rt)||(Fe?G:{[be]:rt,[we]:rt});O.selectedTagList.splice(Ee,0,_t),Xe=!0}}else G&&(rt=G[be],rt!==void 0&&!E.value.includes(rt)&&(O.selectedTagList.splice(Ee,0,G),Xe=!0));Xe&&a.nextTick(()=>{for(let Fe=1;Fe<=et;Fe++){const yt=P()[Ee+Fe];A(yt,v.value)}m.value.style.width=`${Ir}px`,w.value||(e.allowNextFocus&&Q(),O.localList=O.localList.filter(Fe=>!E.value.includes(Fe[be])))})},J=(G,_)=>{O.selectedTagList.splice(_,1);const ne=ee.some(be=>be===G[e.saveKey]);(e.allowCreate&&ne||!e.allowCreate)&&!w.value&&O.localList.push(G)};return Te(U(U(U({popoverProps:o},a.toRefs(i)),a.toRefs(O)),a.toRefs(u)),{isShowPlaceholder:p,isShowClear:M,curInputValue:g,formatList:ee,renderList:$,showTagClose:N,tagInputRef:m,bkTagSelectorRef:y,tagListRef:C,tagInputItemRef:v,selectorListRef:I,popoverRef:L,triggerClass:x,focusInputTrigger:Q,activeClass:ge,handleInput:R,handleFocus:q,handleBlur:K,handleTagSelected:he,handleTagRemove:le,handleClear:te,tagFocus:j,handleKeydown:Y,handlePaste:Me})},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((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(u9,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(u9,{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(rr,{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,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((o,l)=>{const u={boundary:"window",theme:"light",distance:12,content:o[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(HM,{node:o,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,o,l)},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":o=>this.curInputValue=o,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(Vn,{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(Ni,{theme:"primary",size:On.Small},null)]):null])])})])}});const Mh=_e(BM),GM={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var ZM=a.defineComponent({name:"Divider",props:GM,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 Ih=_e(ZM),_M={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},YM={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},FM=U({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},_M),UM={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var c9=a.defineComponent({name:"TabNav",props:FM,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((g,m)=>{if(!g.props)return null;const{name:y,label:C,closable:v,visible:I,disabled:L,sortable:k}=g.props;if(!I)return!1;e.active===y&&(f=!0);const N=w=>g.slots.label?a.h(g.slots.label):[void 0,""].includes(w)?`\u9009\u9879\u5361${m+1}`:typeof w=="string"?w:typeof w=="function"?a.h(w):w;return d.push({name:y,closable:v,visible:I,disabled:L,sortable:k,tabLabel:N(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(d,f)=>d===f;return Te(U({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,o.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){l(o.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,o.value=null},drop(d,f){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,d,f)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,f){e.tabRemove(d,f)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:o,labelHeight:l,dragstart:u,dragenter:d,dragend:f,drop:g}=this,m=()=>this.navs.map((C,v)=>{if(!C)return null;const{name:I,disabled:L,tabLabel:k}=C,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===I&&p.push("bk-tab-header--active"),p.join(" ")},w=(p,M)=>p||M;return a.createVNode("div",{key:I,onClick:()=>this.handleTabChange(I),draggable:w(C.sortable,i),onDragstart:p=>u(v,p),onDragenter:p=>{p.preventDefault(),d(v)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),f()},onDrop:p=>{p.preventDefault(),g(v,o)},class:N()},[a.createVNode("div",null,[k]),w(C.closable,t)&&a.createVNode(Vn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(v,C)},null)])}),y=()=>{var v,I;const C=[];return typeof this.$slots.add=="function"?C.push((I=(v=this.$slots).add)==null?void 0:I.call(v,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ko,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((L,k)=>a.createVNode("div",{class:"bk-tab-header-item",key:k},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${l}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),y(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),$M=a.defineComponent({name:"Tab",components:{TabNav:c9},props:YM,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),o=a.ref([]),l=a.getCurrentInstance(),u=(g,m=[])=>{const{children:y}=g;return(y||[]).forEach(C=>{let{type:v}=C;v=v.name||v,v==="TabPanel"&&C.component?m.push(C.component):(v===a.Fragment||v==="template")&&u(C,m)}),m},d=()=>{if(t.default){const{children:g}=l.subTree.children[1];if(!g)return;const m=g[0],y=u(m);y.length!==o.value.length&&(o.value=y)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te(U({},{tabAdd(g){n("add",{e:g}),n("add-panel",{e:g})},tabChange(g){n("change",g),n("tab-change",g),n("update:active",g)},tabRemove(g,m){n("remove",g,m),n("remove-panel",g,m)},tabSort(g,m,y){const C=o.value;if(y==="insert")if(g<m)C.splice(m+1,0,o[g]),C.splice(g,1);else if(g>m)C.splice(m,0,o[g]),C.splice(g+1,1);else return!1;else{const v=C[m];C[m]=C[g],C[g]=v}o.value=[...C],n("sort",g,m,y),n("sort-change",g,m,y)},tabDrag(g,m){n("drag",g,m),n("on-drag-tab",g,m)}}),{isMounted:i,panels:o})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:o,active:l,type:u,closable:d,addable:f,sortable:g,sortType:m,labelHeight:y,scrollStep:C,validateActive:v,changeOnHover:I,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:w,tabRemove:p,tabSort:M,tabDrag:x}=this,S={panels:o,active:l,type:u,closable:d,addable:f,sortable:g,sortType:m,labelHeight:y,scrollStep:C,validateActive:v,changeOnHover:I,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:w,tabRemove:p,tabSort:M,tabDrag:x};return!o||!Array.isArray(o)?null:a.createVNode(c9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),XM=a.defineComponent({name:"TabPanel",props:UM,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 wh=Zt($M,{TabPanel:XM}),Ii={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let d9=1;const Nh=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const o=t.onClose,l=n.offsetX||10;let u=n.offsetY||30;const{spacing:d=10}=n;Ii[i].forEach(C=>{u+=(C.el.offsetHeight||0)+d}),d9+=1;const f=`message_${d9}`;n=Te(U({},n),{offsetX:l,offsetY:u,id:f});const g=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=C=>{KM(C,i,d,o),a.render(null,g)},a.render(m,g),Ii[i].push(m);let y;m.props.getContainer&&La(m.props.getContainer)?y=m.props.getContainer:y=document.body,y.appendChild(g.firstElementChild)};function KM(e,t,n,i){i==null||i();const o=t.startsWith("top")?"top":"bottom";let l=-1;Ii[t].forEach((g,m)=>{g.props.id===e&&(l=m)});const d=Ii[t][l].el.offsetHeight,f=Ii[t].length;for(let g=l;g<f;g++){const m=parseInt(Ii[t][g].el.style[o],10)-d-n;Ii[t][g].component.props.offsetY=m}Ii[t].splice(l,1)}const qM={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var eI=a.defineComponent({name:"Message",props:qM,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Mn.getMessageNextIndex(),o=a.computed(()=>e.getContainer&&La(e.getContainer)),l=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:o.value?"absolute":"fixed"})),u=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{u.value=!1},e.delay)},g=m=>{m.preventDefault(),m.stopPropagation(),u.value=!1};return a.onMounted(()=>{e.delay&&f(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(u,()=>{u.value||t("destroy",e.id)}),{classNames:n,styles:l,visible:u,close:g}},render(){const e=()=>({primary:a.createVNode(Lo,null,null),warning:a.createVNode(So,null,null),success:a.createVNode(To,null,null),error:a.createVNode(Vn,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(Rn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const Lh=e=>{Nh(eI,e)},kh=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),o=a.defineComponent({name:"DialogConfirm",setup(d,{expose:f}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const g=async()=>{var v,I;typeof((v=i.value)==null?void 0:v.onClosed)=="function"&&await((I=i.value)==null?void 0:I.onClosed()),n.value=!1},m=async()=>{var v,I;typeof((v=i.value)==null?void 0:v.onConfirm)=="function"&&await((I=i.value)==null?void 0:I.onConfirm()),n.value=!1};function y(v){i.value=v}f({update:y});const C=()=>{const v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":v.push(a.h("div",i.value.subTitle));break;case"function":v.push(a.h("div",i.value.subTitle()));break;default:v.push(a.h(i.value.subTitle));break}return v};return()=>a.createVNode(O3,Te(U({},i.value),{isShow:n.value,onClosed:g,onConfirm:m}),C())}}),l=a.createApp(o).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{l.update(d)}}},tI={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var nI=a.defineComponent({name:"Notify",props:tI,emits:["destroy"],setup(e,{emit:t}){const n=Mn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),o=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),l=a.computed(()=>({[i.value]:`${e.offsetX}px`,[o.value]:`${e.offsetY}px`,zIndex:n})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const g=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&g(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:u,styles:l,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Lo,null,null),warning:a.createVNode(So,null,null),success:a.createVNode(To,null,null),error:a.createVNode(Vn,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Rn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const xh=e=>{Nh(nI,e)},Th=Symbol("MENU_PROVIDER_KEY"),Pu=Symbol("MENU_PROVIDER_KEY_PATH"),iI=e=>{a.provide(Th,e)},rI=e=>{const{parentKeys:t,parentInfo:n}=Ac(),i=a.computed(()=>[...t.value,e]);a.provide(Pu,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Sh=()=>a.inject(Th),Ac=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Pu in t?a.inject(Pu):{parentInfo:void 0,parentKeys:a.ref([])}},Au=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function f9(e,t){if(!e||!t)return;const n=Au(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(l=>{i=i.replace(` ${l} `," ")});const o=Au(i).join(" ");e.setAttribute("class",o)}function h9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Au(n),o=(t||"").split(" ").filter(l=>!i.includes(l)&&!!l.trim());e.classList?e.classList.add(...o):(n+=` ${o.join(" ")}`,e.setAttribute("class",n))}const aI=()=>({css:!0,onBeforeEnter:e=>{h9(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,f9(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&&(h9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{f9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),sI={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var oI=a.defineComponent({name:"Menu",props:sI,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const o=a.ref(""),l=a.ref([]),u=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),g=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(o.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse,console.info(e.collapse);const I=[...g.value],L=[...l.value];l.value=f.value?[]:I,g.value=f.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(I=l.value)=>{l.value=I},{immediate:!0});const m=(I,L)=>{u.value=Te(U({},u.value),{[I]:L})},y=I=>{delete u.value[I],u.value=U({},u.value)},C=(I,L)=>{L?e.uniqueOpen?l.value=[I]:l.value.push(I):l.value=l.value.filter(k=>k!==I),n("openChange",L,u.value[I]),n("update:openKeys",[...l.value])},v=I=>{o.value=I,n("click",u.value[I]),n("update:activeKey",I,u.value[I])};return iI({activeKey:o,menuStore:u,registerMenuInfo:m,unregisterMenuInfo:y,mode:d.value,openedKeys:l,collapse:f,handleOpenChange:C,handleActiveChange:v}),i({activeKey:o,openedKeys:l,menuStore:u}),()=>{var I;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(I=t.default)==null?void 0:I.call(t)])}}}),lI=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),uI=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var v,I;const{registerMenuInfo:i,unregisterMenuInfo:o,activeKey:l,handleActiveChange:u}=Sh(),d=a.getCurrentInstance(),{parentInfo:f}=Ac(),g=((I=(v=d.vnode.key)==null?void 0:v.toString)==null?void 0:I.call(v))||String(d.uid),m=a.computed(()=>l.value===g),y=a.computed(()=>e.needIcon);i(g,{key:g,parentKey:f==null?void 0:f.key});const C=L=>{u(g),n("click",L)};return a.onBeforeUnmount(()=>o(g)),()=>{var L,k;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:C},[y.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(k=t.default)==null?void 0:k.call(t)])])}}});const cI={title:{type:String,default:"title"}};var dI=a.defineComponent({name:"Submenu",props:cI,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,w;const{registerMenuInfo:i,unregisterMenuInfo:o,openedKeys:l,handleOpenChange:u,collapse:d,activeKey:f,menuStore:g}=Sh(),{parentInfo:m}=Ac(),y=a.getCurrentInstance(),C=((w=(N=y.vnode.key)==null?void 0:N.toString)==null?void 0:w.call(N))||String(y.uid),v=a.ref(aI()),I=a.computed(()=>l.value.includes(C)),L=a.computed(()=>{var M,x;const p=(x=(M=g.value)==null?void 0:M[f.value])==null?void 0:x.parentKey;return d.value&&p===C&&I});rI(C),i(C,{key:C,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>o(C));const k=()=>{u(C,!I.value),n("collapse",!I.value,y)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":I.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:k},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(bc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Co,{class:{"submenu-header-collapse":!0,"is-collapse":l.value.includes(C)}},null)]),a.createVNode(a.Transition,v.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,I.value]])]}})])}}});const Dh=Zt(oI,{Item:uI,Submenu:dI,Group:lI}),fI={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var g9=a.defineComponent({props:fI,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const hI={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var gI=a.defineComponent({name:"Navigation",props:hI,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const o=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},l=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},u=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:o,handleMouseLeave:l,handleClick:u}},render(){var e,t,n,i,o,l,u,d,f,g,m,y;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(g9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(g9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(oc,{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`}},[((l=(o=this.$slots).header)==null?void 0:l.call(o))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(u=this.$slots)["header-set"])==null?void 0:d.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(g=(f=this.$slots).default)==null?void 0:g.call(f),a.createVNode("div",{class:"container-footer"},[(y=(m=this.$slots).footer)==null?void 0:y.call(m)])])])])])}});const jh=_e(gI),mI={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 zh=a.defineComponent({props:mI,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{l()}),a.onBeforeUnmount(()=>{o()});const o=()=>{if(n&&Object.keys(n).length!==0){const f=n;f.isShow&&f.hide(),f.destroy(),n=null,t("changeVisible",!1)}},l=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new c3(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+Mn.getModalNextIndex()),f}),d=a.reactive({styles:u});return Te(U({},a.toRefs(d)),{refContentRef:i,updateDropdown:l,destoryDropdown:o})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const pI={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var vI=a.defineComponent({props:pI,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},o=()=>{t("pick-success")},l=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:n,handleClear:i,handleSuccess:o,handleToggleTime:l,handleTab:f=>{const m=[...u.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===m&&(f.preventDefault(),f.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])])}}),m9=1e3*60*60*24;function p9(e,t){return new Date(e,t+1,0).getDate()}function v9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function y9(e,t,n,i){t>11&&(t=0,e++);var o=new Date(e,t,n);i&&o.setDate(o.getDate()+4-(o.getDay()||7));var l=i?o.getFullYear():e,u=new Date(l,0,1),d=1+Math.round((o-u)/m9);i||(d+=u.getDay());var f=Math.ceil(d/7);if(!i){var g=new Date(e,t,n),m=new Date(e+1,0,1),y=m.getDay();g.getTime()>=m.getTime()-m9*y&&(f=1)}return f}function yI(e,t,n){for(var i=this.lang||"en",o=this.onlyDays,l=typeof this.weekStart=="undefined"?1:this.weekStart,u=l===1,d=[],f=new Date(e,t,1),g=f.getDay()||(u?7:0),m=l-g,y=y9(e,t,1,u),C=p9(e,t),v=p9(e,t-1),I,L,k,N=v9(e,t,y),w={month:t,year:e,daysInMonth:C},p=0;p<7;p++){k=m;for(var M=0;M<8;M++){p>0&&M>0&&m++,m>C||m<1?(L=m>C?m-C:v+m,I=m>C?t+1:t-1):(L=m,I=t);var x=function(){return M===0?"weekLabel":p===0?"dayLabel":m<1?"prevMonth":m>C?"nextMonth":"monthDay"}(),S=k!==m&&p>0,H={desc:S?L:y,week:y,type:x,format:u?"ISO 8601":"US",date:S?new Date(Date.UTC(e,I,L)):!1,year:N,index:d.length};n&&(typeof n=="function"?H=n.call(w,H,i):n.forEach(function(P){H=P.call(w,H,i)})),o&&S?d.push(H):o||d.push(H)}p>0&&(y=y9(e,I,L+1,u)),N=v9(e,t,y)}return w.cells=d,w}var bI=function(e){return yI.bind(e)},CI={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"}},Dn=CI;function MI(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function Ph(e,t){for(var n in e)t[n]?MI(e[n])&&Ph(e[n],t[n]):t[n]=e[n]}function Ah(e,t){var n=[Dn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Dn.weekPlaceholder?e.desc=Dn.weekPlaceholder:e.index<8?e.desc=Dn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Dn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Dn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Dn.monthNames[t],columnNames:Dn.columnNames[t],classes:Dn.classes}),e}Ah.setLabels=function(e){Ph(e,Dn)};var II=Ah,wI={Generator:bI,addLabels:II};function dn(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 Pt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function wn(e){Pt(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 NI(e,t){Pt(2,arguments);var n=wn(e).getTime(),i=dn(t);return new Date(n+i)}function LI(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 kI(e){return Pt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xI(e){if(Pt(1,arguments),!kI(e)&&typeof e!="number")return!1;var t=wn(e);return!isNaN(Number(t))}var TI={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"}},SI=function(e,t,n){var i,o=TI[e];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},DI=SI;function su(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var jI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},AI={date:su({formats:jI,defaultWidth:"full"}),time:su({formats:zI,defaultWidth:"full"}),dateTime:su({formats:PI,defaultWidth:"full"})},OI=AI,EI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},JI=function(e,t,n,i){return EI[e]},QI=JI;function fa(e){return function(t,n){var i=n||{},o=i.context?String(i.context):"standalone",l;if(o==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):u;l=e.formattingValues[d]||e.formattingValues[u]}else{var f=e.defaultWidth,g=i.width?String(i.width):e.defaultWidth;l=e.values[g]||e.values[f]}var m=e.argumentCallback?e.argumentCallback(t):t;return l[m]}}var VI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WI={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"]},HI={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"]},BI={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"}},GI={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"}},ZI=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},_I={ordinalNumber:ZI,era:fa({values:VI,defaultWidth:"wide"}),quarter:fa({values:RI,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:fa({values:WI,defaultWidth:"wide"}),day:fa({values:HI,defaultWidth:"wide"}),dayPeriod:fa({values:BI,defaultWidth:"wide",formattingValues:GI,defaultFormattingWidth:"wide"})},YI=_I;function ha(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],l=t.match(o);if(!l)return null;var u=l[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?UI(d,function(y){return y.test(u)}):FI(d,function(y){return y.test(u)}),g;g=e.valueCallback?e.valueCallback(f):f,g=n.valueCallback?n.valueCallback(g):g;var m=t.slice(u.length);return{value:g,rest:m}}}function FI(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function UI(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function $I(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var o=i[0],l=t.match(e.parsePattern);if(!l)return null;var u=e.valueCallback?e.valueCallback(l[0]):l[0];u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(o.length);return{value:u,rest:d}}}var XI=/^(\d+)(th|st|nd|rd)?/i,KI=/\d+/i,qI={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},ew={any:[/^b/i,/^(a|c)/i]},tw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nw={any:[/1/i,/2/i,/3/i,/4/i]},iw={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},rw={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]},aw={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},sw={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]},ow={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},lw={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}},uw={ordinalNumber:$I({matchPattern:XI,parsePattern:KI,valueCallback:function(e){return parseInt(e,10)}}),era:ha({matchPatterns:qI,defaultMatchWidth:"wide",parsePatterns:ew,defaultParseWidth:"any"}),quarter:ha({matchPatterns:tw,defaultMatchWidth:"wide",parsePatterns:nw,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ha({matchPatterns:iw,defaultMatchWidth:"wide",parsePatterns:rw,defaultParseWidth:"any"}),day:ha({matchPatterns:aw,defaultMatchWidth:"wide",parsePatterns:sw,defaultParseWidth:"any"}),dayPeriod:ha({matchPatterns:ow,defaultMatchWidth:"any",parsePatterns:lw,defaultParseWidth:"any"})},cw=uw,dw={code:"en-US",formatDistance:DI,formatLong:OI,formatRelative:QI,localize:YI,match:cw,options:{weekStartsOn:0,firstWeekContainsDate:1}},fw=dw;function hw(e,t){Pt(2,arguments);var n=dn(t);return NI(e,-n)}var gw=864e5;function mw(e){Pt(1,arguments);var t=wn(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),o=n-i;return Math.floor(o/gw)+1}function co(e){Pt(1,arguments);var t=1,n=wn(e),i=n.getUTCDay(),o=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function Oh(e){Pt(1,arguments);var t=wn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var o=co(i),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=co(l);return t.getTime()>=o.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function pw(e){Pt(1,arguments);var t=Oh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=co(n);return i}var vw=6048e5;function yw(e){Pt(1,arguments);var t=wn(e),n=co(t).getTime()-pw(t).getTime();return Math.round(n/vw)+1}function fo(e,t){Pt(1,arguments);var n=t||{},i=n.locale,o=i&&i.options&&i.options.weekStartsOn,l=o==null?0:dn(o),u=n.weekStartsOn==null?l:dn(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=wn(e),f=d.getUTCDay(),g=(f<u?7:0)+f-u;return d.setUTCDate(d.getUTCDate()-g),d.setUTCHours(0,0,0,0),d}function Eh(e,t){Pt(1,arguments);var n=wn(e),i=n.getUTCFullYear(),o=t||{},l=o.locale,u=l&&l.options&&l.options.firstWeekContainsDate,d=u==null?1:dn(u),f=o.firstWeekContainsDate==null?d:dn(o.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(i+1,0,f),g.setUTCHours(0,0,0,0);var m=fo(g,t),y=new Date(0);y.setUTCFullYear(i,0,f),y.setUTCHours(0,0,0,0);var C=fo(y,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function bw(e,t){Pt(1,arguments);var n=t||{},i=n.locale,o=i&&i.options&&i.options.firstWeekContainsDate,l=o==null?1:dn(o),u=n.firstWeekContainsDate==null?l:dn(n.firstWeekContainsDate),d=Eh(e,t),f=new Date(0);f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0);var g=fo(f,t);return g}var Cw=6048e5;function Mw(e,t){Pt(1,arguments);var n=wn(e),i=fo(n,t).getTime()-bw(n,t).getTime();return Math.round(i/Cw)+1}function qe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Iw={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return qe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):qe(n+1,2)},d:function(e,t){return qe(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return qe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return qe(e.getUTCHours(),t.length)},m:function(e,t){return qe(e.getUTCMinutes(),t.length)},s:function(e,t){return qe(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return qe(o,t.length)}},bi=Iw,wr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ww={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return bi.y(e,t)},Y:function(e,t,n,i){var o=Eh(e,i),l=o>0?o:1-o;if(t==="YY"){var u=l%100;return qe(u,2)}return t==="Yo"?n.ordinalNumber(l,{unit:"year"}):qe(l,t.length)},R:function(e,t){var n=Oh(e);return qe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return qe(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return qe(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return qe(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return bi.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return qe(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var o=Mw(e,i);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):qe(o,t.length)},I:function(e,t,n){var i=yw(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):qe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):bi.d(e,t)},D:function(e,t,n){var i=mw(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):qe(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var o=e.getUTCDay(),l=(o-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return qe(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var o=e.getUTCDay(),l=(o-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return qe(l,t.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),o=i===0?7:i;switch(t){case"i":return String(o);case"ii":return qe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),o;switch(i===12?o=wr.noon:i===0?o=wr.midnight:o=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),o;switch(i>=17?o=wr.evening:i>=12?o=wr.afternoon:i>=4?o=wr.morning:o=wr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return bi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):bi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):qe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):qe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):bi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):bi.s(e,t)},S:function(e,t){return bi.S(e,t)},X:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();if(l===0)return"Z";switch(t){case"X":return C9(l);case"XXXX":case"XX":return Gi(l);case"XXXXX":case"XXX":default:return Gi(l,":")}},x:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"x":return C9(l);case"xxxx":case"xx":return Gi(l);case"xxxxx":case"xxx":default:return Gi(l,":")}},O:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b9(l,":");case"OOOO":default:return"GMT"+Gi(l,":")}},z:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b9(l,":");case"zzzz":default:return"GMT"+Gi(l,":")}},t:function(e,t,n,i){var o=i._originalDate||e,l=Math.floor(o.getTime()/1e3);return qe(l,t.length)},T:function(e,t,n,i){var o=i._originalDate||e,l=o.getTime();return qe(l,t.length)}};function b9(e,t){var n=e>0?"-":"+",i=Math.abs(e),o=Math.floor(i/60),l=i%60;if(l===0)return n+String(o);var u=t||"";return n+String(o)+u+qe(l,2)}function C9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+qe(Math.abs(e)/60,2)}return Gi(e,t)}function Gi(e,t){var n=t||"",i=e>0?"-":"+",o=Math.abs(e),l=qe(Math.floor(o/60),2),u=qe(o%60,2);return i+l+n+u}var Nw=ww;function M9(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 Jh(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 Lw(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return M9(e,t);var l;switch(i){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",M9(i,t)).replace("{{time}}",Jh(o,t))}var kw={p:Jh,P:Lw},xw=kw,Tw=["D","DD"],Sw=["YY","YYYY"];function Dw(e){return Tw.indexOf(e)!==-1}function jw(e){return Sw.indexOf(e)!==-1}function I9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var zw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Aw=/^'([^]*?)'?$/,Ow=/''/g,Ew=/[a-zA-Z]/;function Jw(e,t,n){Pt(2,arguments);var i=String(t),o=n||{},l=o.locale||fw,u=l.options&&l.options.firstWeekContainsDate,d=u==null?1:dn(u),f=o.firstWeekContainsDate==null?d:dn(o.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=l.options&&l.options.weekStartsOn,m=g==null?0:dn(g),y=o.weekStartsOn==null?m:dn(o.weekStartsOn);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!l.localize)throw new RangeError("locale must contain localize property");if(!l.formatLong)throw new RangeError("locale must contain formatLong property");var C=wn(e);if(!xI(C))throw new RangeError("Invalid time value");var v=LI(C),I=hw(C,v),L={firstWeekContainsDate:f,weekStartsOn:y,locale:l,_originalDate:C},k=i.match(Pw).map(function(N){var w=N[0];if(w==="p"||w==="P"){var p=xw[w];return p(N,l.formatLong,L)}return N}).join("").match(zw).map(function(N){if(N==="''")return"'";var w=N[0];if(w==="'")return Qw(N);var p=Nw[w];if(p)return!o.useAdditionalWeekYearTokens&&jw(N)&&I9(N,t,e),!o.useAdditionalDayOfYearTokens&&Dw(N)&&I9(N,t,e),p(I,N,l.localize,L);if(w.match(Ew))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return N}).join("");return k}function Qw(e){return e.match(Aw)[1].replace(Ow,"'")}const wt={},Qh=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Hi=/\d\d?/,Vw=/\d{3}/,Rw=/\d{4}/,Bs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,w9=function(){};function Vh(e,t){const n=[];for(let i=0,o=e.length;i<o;i++)n.push(e[i].substr(0,t));return n}function N9(e){return(t,n,i)=>{const o=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~o&&(t.month=o)}}function Tn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Rh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Wh=["January","February","March","April","May","June","July","August","September","October","November","December"],Ww=Vh(Wh,3),Hw=Vh(Rh,3);wt.i18n={dayNamesShort:Hw,dayNames:Rh,monthNamesShort:Ww,monthNames:Wh,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const L9={D(e){return e.getDay()},DD(e){return Tn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Tn(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 Tn(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 Tn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Tn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Tn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Tn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Tn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Tn(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?"-":"+")+Tn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ut={d:[Hi,(e,t)=>{e.day=t}],M:[Hi,(e,t)=>{e.month=t-1}],yy:[Hi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Hi,(e,t)=>{e.hour=t}],m:[Hi,(e,t)=>{e.minute=t}],s:[Hi,(e,t)=>{e.second=t}],yyyy:[Rw,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Vw,(e,t)=>{e.millisecond=t}],D:[Hi,w9],ddd:[Bs,w9],MMM:[Bs,N9("monthNamesShort")],MMMM:[Bs,N9("monthNames")],a:[Bs,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};ut.DD=ut.D;ut.dddd=ut.ddd;ut.Do=ut.dd=ut.d;ut.mm=ut.m;ut.hh=ut.H=ut.HH=ut.h;ut.MM=ut.M;ut.ss=ut.s;ut.A=ut.a;wt.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"};wt.format=(e,t,n)=>{const i=n||wt.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=wt.masks[t]||t||wt.masks.default,t.replace(Qh,o=>o in L9?L9[o](e,i):o.slice(1,o.length-1))};wt.parse=(e,t,n)=>{const i=n||wt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=wt.masks[t]||t,e.length>1e3)return!1;let o=!0;const l={};if(t.replace(Qh,f=>{if(ut[f]){const g=ut[f],m=e.search(g[0]);~m?e.replace(g[0],y=>(g[1](l,y,i),e=e.substr(m+y.length),y)):o=!1}return ut[f]?"":f.slice(1,f.length-1)}),!o)return!1;const u=new Date;l.isPm===!0&&l.hour!==null&&+l.hour!=12?l.hour=+l.hour+12:l.isPm===!1&&+l.hour==12&&(l.hour=0);let d;return l.timezoneOffset!==null&&l.timezoneOffset!==void 0?(l.minute=+(l.minute||0)-+l.timezoneOffset,d=new Date(Date.UTC(l.year||u.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0))):d=new Date(l.year||u.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0),d};const Oc=" - ",$n=(e,t)=>{const n=wn(new Date(e));return!n||isNaN(n.getTime())?"":Jw(n,t||"yyyy-MM-dd")},ou=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return $n(n,t)+Oc+$n(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return $n(e,t);return""},lu=(e,t)=>{const n=Array.isArray(e)?e:e.split(Oc);if(n.length===2){const i=n[0],o=n[1];return[i instanceof Date?i:wt.parse(i,t||"yyyy-MM-dd"),o instanceof Date?o:wt.parse(o,t||"yyyy-MM-dd")]}return[]},Sr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:ou,parser:lu},datetimerange:{formatter:ou,parser:lu},timerange:{formatter:ou,parser:lu},time:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>$n(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let o=i;return typeof i=="string"?o=i.trim():typeof i!="number"&&!i&&(o=""),wt.parse(o,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Bw=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Gw=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),k9=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Hh={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"},Gs=(e,t,n,i)=>{const o=t.includes("range"),{parser:l}=Sr[t]||Sr.default,u=i||Hh[t],d=Sr.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=l(e,u);else if(n&&e)f=d(e,u);else if(o)if(!e)f=[null,null];else if(typeof e=="string")f=l(e,u);else if(t==="timerange")f=l(e,u).map(g=>g||"");else{const[g,m]=e;g instanceof Date&&m instanceof Date?f=e.map(y=>new Date(y)):typeof g=="string"&&typeof m=="string"?f=l(e.join(Oc),u):(!g||!m)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=l(e,u)||null);return o||n?f||[]:[f]},ga=(e,t,n,i)=>{const o=Hh[t];if(n){const{formatter:u}=Sr.multiple;return u(e,i||o)}const{formatter:l}=Sr[t]||Sr.default;return l(e,i||o)},Zw=Symbol("date-picker");function cn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const _w=(e,t)=>new Date(e,t+1,0).getDate(),x9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,o=_w(n.getFullYear(),i);return o<n.getDate()&&n.setDate(o),n.setMonth(i),n},Bh=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const o=n.toLocaleDateString(i,{month:"long"});return(o[0].toUpperCase()+o.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const o=n.toLocaleDateString(i,{month:"long"});return o[0].toUpperCase()+o.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,o)=>{const l=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=i.match(l).slice(1),d=u[1],f=[u[0],u[2]].map(g=>({label:g.replace(/\[[^\]]+\]/,y=>y.slice(1,-1).replace(t,C=>e[C](o,n))),type:g.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),Bi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Yw=(e,t,n)=>{if(!t||!n)return!1;const[i,o]=[t,n].sort();return e>=i&&e<=o},Fw={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 Ou=a.defineComponent({props:Fw,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new wI.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const g=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return g.splice(0,7-0).concat(g.splice(0,0))}),o=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),l=a.computed(()=>{const g=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),y=Bi(new Date),C=o.value.filter(Boolean).map(Bi),[v,I]=o.value.map(Bi),L=e.rangeState.from&&Bi(e.rangeState.from),k=e.rangeState.to&&Bi(e.rangeState.to),N=e.selectionMode==="range",w=typeof e.disableDate=="function"&&e.disableDate;return n.value(g,m,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const M=p.date&&Bi(p.date),x=p.date&&m===p.date.getMonth();return Te(U({},p),{type:M===y?"today":p.type,selected:x&&C.includes(M),disabled:p.date&&w&&w(new Date(M)),range:x&&N&&Yw(M,L,k),start:x&&N&&M===v,end:x&&N&&M===I})}).cells.slice(0)});return{headerDays:i,cells:l,getCellCls:g=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:g.selected||g.start||g.end,["bk-date-picker-cells-cell-disabled"]:g.disabled,["bk-date-picker-cells-cell-today"]:g.type==="today",["bk-date-picker-cells-cell-prev-month"]:g.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:g.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:g.type==="weekLabel",["bk-date-picker-cells-cell-range"]:g.range&&!g.start&&!g.end}],handleClick:g=>{if(g.disabled||g.type==="weekLabel")return;const m=new Date(Bi(g.date));t("pick",m),t("pick-click")},handleMouseMove:g=>{if(!e.rangeState.selecting||g.disabled)return;const m=g.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 Uw={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 $w=a.defineComponent({props:Uw,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=Q=>Q.match(/^time/)?"time-picker":`${Q}-table`,o=e.modelValue.slice().sort(),l=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:o,panelDate:e.startDate||o[0]||new Date}),u=()=>{setTimeout(()=>{l.currentView=e.selectionMode},500)},d=Q=>{l.panelDate=Q,l.pickerTable==="year-table"?l.pickerTable="month-table":l.pickerTable=i(l.currentView)},f=(Q,O)=>{let E=Q;e.selectionMode==="year"?E=new Date(Q.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(l.panelDate.getFullYear(),Q.getMonth(),1):E=new Date(Q),l.dates=[E],n("pick",E,!1,O||e.selectionMode)},g=()=>{u(),n("pick-success")},m=()=>{u(),n("pick-clear")},y=Q=>{Q.value&&n("pick",Q.value(),!1,void 0,Q),Q.onClick&&Q.onClick(this),e.shortcutClose&&g()},C=()=>{l.currentView=e.selectionMode,l.pickerTable=i(l.currentView)},v=Q=>{e.selectionMode==="year"||l.pickerTable==="year-table"?l.panelDate=new Date(l.panelDate.getFullYear()+Q*10,0,1):l.panelDate=x9(l.panelDate,Q*12)},I=Q=>{l.panelDate=x9(l.panelDate,Q)},L=a.ref(null),k=a.ref(null),N=Q=>{var O,E;Q&&((O=L==null?void 0:L.value)==null||O.updateScroll(),(E=k==null?void 0:k.value)==null||E.updateScroll())},w=a.computed(()=>l.pickerTable===`${l.currentView}-table`?f:d),p=a.computed(()=>{const Q="zh-CN",O="[yyyy]-[mm]",E=l.panelDate,{labels:ee,separator:$}=Bh(Q,O,E),ue=fe=>()=>{l.pickerTable=i(fe)};return{separator:$,labels:ee.map(fe=>{const ge=fe;return ge.handler=ue(fe.type),ge})}}),M=a.computed(()=>p.value.labels[0].type==="year"||l.currentView==="date"),x=a.computed(()=>p.value.labels[1].type==="year"||l.currentView==="date"),S=a.computed(()=>l.currentView==="time"),H=()=>{l.currentView=l.currentView==="time"?"date":"time"},P=a.computed(()=>!!t.shortcuts);return Te(U({},a.toRefs(l)),{panelPickerHandlers:w,datePanelLabel:p,showLabelFirst:M,showLabelSecond:x,handleShortcutClick:y,changeYear:v,changeMonth:I,reset:C,isTime:S,hasShortcuts:P,onToggleVisibility:N,handleToggleTime:H,handlePickSuccess:g,handlePickClear:m})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:cn("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:cn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Jn,{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(Ou,{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(vI,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const Xw={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 Kw=a.defineComponent({props:Xw,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,o]=e.modelValue.map(A=>A||Bw()),l=e.startDate?e.startDate:i,u=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:l,rightPanelDate:new Date(l.getFullYear(),l.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!o},upToNowEnable:!1,dates:e.modelValue}),d=(A,R)=>!A||!R?0:A.getTime()-R.getTime(),f=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},g=a.ref(null),m=a.ref(null),y=A=>{var R,q;A&&((R=g==null?void 0:g.value)==null||R.updateScroll(),(q=m==null?void 0:m.value)==null||q.updateScroll())},C=(A,R,q,K=!0)=>{const he=new Date(u[`${A}PanelDate`]);if(he[`set${R}`](he[`get${R}`]()+q),u[`${A}PanelDate`]=he,!!K)if(e.splitPanels){const le=A==="left"?"right":"left";A==="left"&&u.leftPanelDate>=u.rightPanelDate&&C(le,R,1),A==="right"&&u.rightPanelDate<=u.leftPanelDate&&C(le,R,-1)}else{const le=A==="left"?"right":"left",pe=u[`${le}PanelDate`],te=new Date(pe);if(R==="Month"){const ve=new Date(te.getFullYear(),te.getMonth()+q+1,0).getDate();te.setDate(Math.min(ve,te.getDate()))}te[`set${R}`](te[`get${R}`]()+q),u[`${le}PanelDate`]=te}},v=A=>{const R=u.currentView==="year"?-10:-1;C(A,"FullYear",R)},I=A=>{const R=u.currentView==="year"?10:1;C(A,"FullYear",R)},L=A=>{C(A,"Month",-1)},k=A=>{C(A,"Month",1)},N=A=>{u[`${A}PickerTable`]="year-table"},w=A=>{u[`${A}PickerTable`]="month-table"},p=A=>{const R="zh-CN",q="[yyyy]-[mm]",K=u[`${A}PanelDate`],{labels:he,separator:le}=Bh(R,q,K),pe=te=>{const ve=te==="month"?w:N;return()=>ve(A)};return{separator:le,labels:he.map(te=>{const ve=te;return ve.handler=pe(te.type),ve})}},M=(A,R)=>{n("pick",u.dates,A,R||e.type)},x=(A,R)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=A;else{const[q,K]=[u.rangeState.from,A].sort(d),he=R==="upToNow"?new Date:new Date(new Date(new Date(K.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[q,he],u.rangeState={from:q,to:he,selecting:!1}}M(!1,R||"date")}else u.upToNowEnable=new Date(A).getTime()<new Date().getTime(),u.rangeState={from:A,to:null,selecting:!0}},S=(A,R)=>{if(u[`${A}PanelDate`]=R,u[`${A}PickerTable`]==="year-table"?u[`${A}PickerTable`]="month-table":u[`${A}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const K=A==="left"?"right":"left";u[`${K}PanelDate`]=R,C(K,"Month",K==="left"?-1:1,!1)}},H=A=>{u.rangeState.to=A};a.watch(()=>e.selectionMode,A=>{u.currentView=A||"range"});const P=a.computed(()=>u.currentView==="time"),Q=a.computed(()=>p("left")),O=a.computed(()=>p("right")),E=a.computed(()=>u.leftPickerTable.split("-").shift()),ee=a.computed(()=>u.rightPickerTable.split("-").shift()),$=a.computed(()=>Q.value.labels[0].type==="year"||u.currentView==="date"),ue=a.computed(()=>Q.value.labels[1].type==="year"||u.currentView==="date"),fe=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),ge=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),Ce=a.computed(()=>{const A=`${u.currentView}-table`;return{left:u.leftPickerTable!==A,right:u.rightPickerTable!==A}}),re=a.computed(()=>({left:Ce.value.left?S.bind("left"):x,right:Ce.value.right?S.bind("right"):x})),X=a.computed(()=>!!t.shortcuts);return Te(U({},a.toRefs(u)),{isTime:P,hasShortcuts:X,prevYear:v,nextYear:I,prevMonth:L,nextMonth:k,leftDatePanelLabel:Q,rightDatePanelLabel:O,leftDatePanelView:E,rightDatePanelView:ee,leftShowLabelFirst:$,leftShowLabelSecond:ue,rightShowLabelFirst:fe,rightShowLabelSecond:ge,preSelecting:Ce,panelPickerHandlers:re,reset:f,onToggleVisibility:y,handleRangePick:x,handleChangeRange:H})},render(){var e,t,n;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:i=>{i.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:cn("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:cn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Jn,{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(Ou,{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:cn("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:cn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Jn,{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(Ou,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const qw={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 eN=a.defineComponent({name:"DatePicker",directives:{clickoutside:Hr},props:qw,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xi(),o=e.type.includes("range"),l=o?[null,null]:[null];let u=Gw((o?e.modelValue:[e.modelValue])||[])?l:Gs(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(u=d.value()));const f=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(k9),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:g});function g(te){let ve=te;return te.match(/^date/)&&(ve="date"),f.selectionMode=["year","month","date","time"].indexOf(ve)>-1&&ve,f.selectionMode}const m=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const te=e.type.includes("range");let ve=f.internalValue.map(ye=>ye instanceof Date?new Date(ye):ye||"");return e.type.match(/^time/)&&(ve=ve.map(ye=>ga(ye,e.type,e.multiple,e.format))),te||e.multiple?ve:ve[0]}),y=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?ga(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(te=>ga(te,e.type,e.multiple,e.format)):ga(m.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),I=a.computed(()=>ga(f.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var te;return((te=f.shortcut)==null?void 0:te.text)&&e.useShortcutText?f.shortcut.text:I.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),w=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-font":e.fontSize==="large"&&(te="large-font"),te}),x=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-width":e.fontSize==="large"&&(te="large-width"),te}),S=a.computed(()=>{var te;return((te=f.shortcut)==null?void 0:te.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),H=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),Q=()=>{var te;(te=P==null?void 0:P.value)==null||te.focus()};a.watch(()=>f.visible,te=>{var ve,ye;te===!1&&((ve=O.value)==null||ve.destoryDropdown()),(ye=O.value)==null||ye.updateDropdown(),n("open-change",te)});const O=a.ref(null);a.watch(()=>e.modelValue,te=>{f.internalValue=Gs(te,e.type,e.multiple,e.format)}),a.watch(()=>e.open,te=>{f.visible=te===!0}),a.watch(()=>e.type,te=>{g(te)}),a.watch(()=>m,(te,ve)=>{const ye=JSON.stringify(te),Y=JSON.stringify(ve);(ye!==Y||typeof te!=typeof ve)&&n("input",te)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const te=e.modelValue,ve=m.value;(typeof te!=typeof ve||JSON.stringify(te)!==JSON.stringify(ve))&&n("input",m.value),e.open!==null&&(f.visible=e.open),a.provide(Zw,{props:e,focus:()=>Q()})});const E=a.ref(null),ee=te=>{var ve;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(te&&te.type==="mousedown"&&f.visible){te.preventDefault(),te.stopPropagation();return}if(f.visible){const ye=(ve=E==null?void 0:E.value)==null?void 0:ve.$el;if(te&&ye&&ye.contains(te.target))return;f.visible=!1,te==null||te.preventDefault(),te==null||te.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},$=()=>{var te,ve;(te=P==null?void 0:P.value)==null||te.focus(),(ve=P==null?void 0:P.value)==null||ve.click()},ue=()=>{e.readonly||e.disabled||I!=null&&I.value&&(f.showClose=!0)},fe=te=>{console.log("handleInputMouseleave"),f.showClose=!1},ge=te=>{a.nextTick(()=>{var ve,ye;n("change",y.value,te),n("update:modelValue",m.value),(ve=i==null?void 0:i.validate)==null||ve.call(i,"change"),e.type.indexOf("time")<0&&((ye=P==null?void 0:P.value)==null||ye.blur())})},Ce=te=>{var J;const ve=e.type.includes("range")||e.multiple,ye=I.value,Y=te.target.value,ae=Gs(Y,e.type,e.multiple,e.format),Me=ve?ae:ae[0],j=(J=e.disableDate)==null?void 0:J.call(e,Me),W=ae.reduce((G,_)=>G&&_ instanceof Date,!0);Y!==ye&&!j&&W?(ge(e.type),f.internalValue=ae):f.forceInputRerender=f.forceInputRerender+1},re=te=>{e.readonly||(f.isFocused=!0,!(te&&te.type==="focus")&&(e.disabled||(f.visible=!0)))},X=()=>{var te;(te=E==null?void 0:E.value)==null||te.reset()},A=te=>{var ve,ye;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){te.preventDefault();return}f.isFocused=!1,g(e.type),f.internalValue=f.internalValue.slice(),X(),(ve=E==null?void 0:E.value)==null||ve.onToggleVisibility(!1),(ye=i==null?void 0:i.validate)==null||ye.call(i,"blur")},R=te=>{const{keyCode:ve}=te;if(ve===9&&f.visible)if(te.stopPropagation(),te.preventDefault(),k.value){const Y=".bk-picker-confirm > *",ae=O.value.$el.querySelectorAll(Y);f.internalFocus=!0,[...ae][te.shiftKey?"pop":"shift"]().focus()}else ee();const ye=[37,38,39,40];if(!f.visible&&ye.includes(ve)){f.visible=!0;return}ve===27&&f.visible&&(te.stopPropagation(),ee()),!!ye.includes(ve)&&f.focusedTime.active&&te.preventDefault()},q=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),ge(e.type),X(),f.showClose=!1,f.shortcut=null,setTimeout(()=>g(e.type),500)},K=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},he=()=>{var te;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(te=P==null?void 0:P.value)==null||te.blur(),X()},le=(te,ve=!1,ye,Y)=>{let ae=te;if(e.multiple){const j=ae.getTime(),W=f.internalValue.findIndex(_=>_&&_.getTime()===j),G=[...f.internalValue,ae].filter(Boolean).map(_=>_.getTime()).filter((_,ne,be)=>be.indexOf(_)===ne&&ne!==W);f.internalValue=G.map(_=>new Date(_))}else ae=Gs(te,e.type,e.multiple,e.format),f.internalValue=Array.isArray(ae)?ae:[ae];if(f.internalValue[0]){const[j]=f.internalValue;f.focusedDate=j}f.focusedTime=Te(U({},f.focusedTime),{time:f.internalValue.map(k9)}),k.value||(g(e.type),f.visible=ve),ye==="upToNow"&&e.type==="daterange"&&he(),f.shortcut=Y,ge(ye);const Me=e.shortcuts.findIndex(j=>j===f.shortcut);n("shortcut-change",f.shortcut,Me)},pe=a.ref(null);return Te(U({},a.toRefs(f)),{panel:C,publicStringValue:y,opened:v,visualValue:I,displayValue:L,isConfirm:k,hasHeader:N,hasFooter:w,hasShortcuts:p,fontSizeCls:M,longWidthCls:x,localReadonly:S,allowCrossDayProp:H,pickerDropdownRef:O,inputRef:P,triggerRef:pe,pickerPanelRef:E,handleClose:ee,handleIconClick:$,handleInputMouseenter:ue,handleInputMouseleave:fe,handleFocus:re,handleBlur:A,handleKeydown:R,handleInputChange:Ce,handleClear:q,handleTransferClick:K,onPick:le,onPickSuccess:he})},render(){var n,i,o;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Vn,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var l,u;return((u=(l=this.$slots).shortcuts)==null?void 0:u.call(l))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(o=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?o: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(zh,{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 l,u,d,f,g,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(u=(l=this.$slots).header)==null?void 0:u.call(l))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Kw,{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($w,{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=(g=(f=this.$slots).footer)==null?void 0:g.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Gh=_e(eN);var jn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(jn||{});const tN={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function nN(e,t,n){const i=a.ref([]),o=a.ref([]),l=()=>{e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?o.value.push(u):i.value.push(u)})};return l(),a.watch(()=>[e,t,n],l),{selectList:i,selectedList:o}}function iN(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(o=>{const l=o[t.value];return l instanceof Object?!1:l.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var rN=a.defineComponent({name:"Transfer",props:tN,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?jn.OBJECT_ARRAY:jn.BASE_ARRAY:jn.NOT_ARRAY),i=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.settingKey),o=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.displayKey),l=a.computed(()=>e.sortKey||o.value),u=a.computed(()=>{switch(n.value){case jn.BASE_ARRAY:return[...new Set(e.sourceList)].map(w=>({value:w}));case jn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:g}=nN(u,d,i),{selectSearchQuery:m,selectListSearch:y}=iN(f,o),C=a.computed(()=>[...y.value].sort((w,p)=>{const M=w[l.value],x=p[l.value];return M>x?1:-1})),v=a.computed(()=>[...g.value].sort((w,p)=>{const M=w[l.value],x=p[l.value];return M>x?1:-1})),I=()=>{f.value=[],g.value=[...u.value],N()},L=()=>{f.value=[...u.value],g.value=[],N()},k=(w,p)=>{const M=p?f:g,x=p?g:f,S=M.value.findIndex(H=>H[i.value]===w);x.value.push(...M.value.splice(S,1)),N()},N=()=>{const w=f.value.map(M=>M[i.value]),p=g.value.map(M=>M[i.value]);t("update:targetList",p),t("change",n.value===jn.BASE_ARRAY?w:f.value.map(M=>a.toRaw(M)),n.value===jn.BASE_ARRAY?p:g.value.map(M=>a.toRaw(M)),p)};return{selectSearchQuery:m,selectListSearch:y,selectedList:g,selectListSort:C,selectedListSort:v,settingCode:i,displayCode:o,allToRight:I,allToLeft:L,handleItemClick:k}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=u=>{var y,C;const d=u==="left-header",f=d?`${(y=this.title[0])!=null?y:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,g=d?!e.length:!t.length,m=()=>{g||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:g},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=u=>{var g;const d=u==="left-empty-content",f=(g=d?this.emptyContent[0]:this.emptyContent[1])!=null?g:d?"\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"},[f])},o=(u,d=!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"},[d?a.createVNode(rc,{class:"bk-icon"},null):a.createVNode(Rn,{class:"bk-icon"},null)])]),l=u=>{const d=u==="left",f=d?e:t,g=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(y=>{var C,v,I;return a.createVNode("li",{key:y[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(y[this.settingCode],d)},[(I=(v=(C=this.$slots)[g])==null?void 0:v.call(C,y))!=null?I:o(y,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(tr,{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),l("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),l("right")])])}});const Zh=_e(rN);var Ca=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Ca||{});const Zs=(...e)=>!0,aN={nodeClick:Zs,nodeCollapse:Zs,nodeExpand:Zs,nodeChecked:Zs};var se=(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))(se||{});const wi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},sN={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var oN=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Do,{scene:"part",type:n},{default:()=>{var i,o;return[(o=(i=t.default)==null?void 0:i.call(t))!=null?o:e.emptyText]}})}),Oo=(e,t)=>{const n=E=>e.schema.get(E),i=(E,ee)=>{var $;return($=n(E[se.UUID]))==null?void 0:$[ee]},o=(E,ee,$)=>{e.schema.set(E[se.UUID],Te(U({},n(E[se.UUID])),{[ee]:$}))},l=E=>i(E,se.PATH),u=E=>i(E,se.UUID),d=E=>i(E,se.IS_ROOT),f=E=>i(E,se.IS_OPEN),g=E=>i(E,se.HAS_CHILD),m=E=>i(E,se.IS_MATCH),y=E=>i(E,se.IS_CHECKED),C=E=>i(E,se.PARENT_ID),v=E=>i({[se.UUID]:E},se.PARENT_ID),I=E=>i(E,se.IS_LOADING),L=(E,ee)=>{o(E,se.IS_LOADING,ee)},k=E=>e.schema.delete(E),N=E=>n(C(E)),w=E=>{var ee;return typeof E=="object"?f(E):typeof E=="string"?(ee=n(E))==null?void 0:ee[se.IS_OPEN]:!1},p=E=>w(i(E,se.PARENT_ID)),M=E=>d(E)||p(E),x=E=>E.split("-").reduce(($,ue)=>{const fe=Number(ue);return Array.isArray($)?$[fe]:$[t.children][fe]},t.data),S=E=>{const ee=e.schema;return Array.prototype.filter.call(Array.from(ee.keys()),$=>ee.get($)[se.PARENT_ID]===E[se.UUID])},H=E=>x(l({[se.UUID]:E})),P=E=>d({[se.UUID]:E})?{[t.children]:t.data}:H(v(E)),Q=E=>({[wi[se.IS_LOADING]]:i(E,se.IS_LOADING),[wi[se.HAS_CHILD]]:g(E),[wi[se.IS_MATCH]]:m(E),[wi[se.IS_CHECKED]]:y(E),[wi[se.IS_OPEN]]:f(E),[wi[se.IS_ROOT]]:d(E),fullPath:i(E,se.PATH),uuid:u(E),parentId:i(E,se.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:u,getNodeParentId:C,getNodeParentIdById:v,getParentNodeData:P,getParentNode:N,setNodeAttr:o,getNodePath:l,isRootNode:d,isNodeOpened:f,hasChildNode:g,isItemOpen:w,isNodeChecked:y,isNodeMatched:m,isNodeLoading:I,checkNodeIsOpen:M,getSourceNodeByPath:x,getSourceNodeByUID:H,deleteNodeSchema:k,resolveScopedSlotParam:Q,setTreeNodeLoading:L,extendNodeAttr:E=>Te(U({},E),{[se.TREE_NODE_ATTR]:Q(E)}),getChildNodes:S}};const _h="1px dashed #c3cdd7",Yh=(e,t,n=null,i=null,o=null,l=[])=>{const u=e[t];return typeof u=="boolean"?u?i:o:Fh(n,e,t,l)},Fh=(e,t,n,i=[])=>{const o=t[n];if(typeof o=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,o)||console.error(`cannot find node label with key ${o}`),e[o]):o;if(typeof o=="function"){const l=o.apply(globalThis,[e,...i]);if(typeof l=="string")return l;console.error("props label with function return value is not string, please check and return string");return}},Uh=(e,t)=>Fh(e,t,"label"),Ec=(e,t)=>e.get(t)||{},lN=(e,t,n)=>{var i;return(i=Ec(e,t))==null?void 0:i[n]},uN=(e,t)=>({"--level-line":Yh(t,"levelLine",e,_h,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),cN=(e,t,n={})=>{const{schema:i}=n,o=lN(i,e[se.UUID],se.DEPTH);return U({"--depth":o},typeof t.levelLine=="function"?{"--level-line":Yh(t,"levelLine",e,_h,null,["node"])}:{})},dN=(e,t,n)=>{const{__is_root:i,__is_open:o}=Ec(t,e[se.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},fN=(e,t)=>{const{__is_checked:n,__is_selected:i}=Ec(t,e[se.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},hN=(e,t,n,i,o)=>{gN(e,t,n,{[i]:o})},gN=(e,t,n,i)=>{const l=e.split("-").reduce((u,d)=>{const f=Number(d);return Array.isArray(u)?u[f]:u[n][f]},t);Object.assign(l,i||{})},Ma=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[se.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,se.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var $h=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:o,resolveScopedSlotParam:l,setTreeNodeLoading:u}=Oo(t,e),d=(m,y)=>{if(typeof m=="object"&&m!==null){n(y,se.IS_OPEN,!0);const C=Array.isArray(m)?m:[m];return hN(i(y),e.data,e.children,e.children,C),Promise.resolve(m)}return Promise.resolve(m)},f=m=>{const{callback:y=null,cache:C=!0}=e.async||{};if(typeof y=="function"&&o(m,se.IS_ASYNC)){if(n(m,se.IS_ASYNC_INIT,!0),!o(m,se.IS_CACHED)){n(m,se.IS_CACHED,C);const v=l(m),I=y(m,L=>d(L,m),v);if(typeof I=="object"&&I!==null)return u(m,!0),I instanceof Promise?Promise.resolve(I.then(L=>d(L,m)).catch(L=>console.error("load remote data error:",L)).finally(()=>{u(m,!1),n(m,se.IS_CACHED,!0)})):(d(I,m),u(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},g=()=>{const m=t.data.filter(y=>o(y,se.IS_ASYNC)&&y[wi[se.IS_OPEN]]&&!o(y,se.IS_ASYNC_INIT));m.length&&Promise.all(m.map(y=>f(y))).then(()=>{g()}).catch(y=>{console.warn(y)})};return{asyncNodeClick:f,deepAutoOpen:g}},mN=(e,t,n,i,o,l)=>{let u=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:g,getNodeAttr:m,getNodeId:y,getChildNodes:C,isRootNode:v,hasChildNode:I,isItemOpen:L,isNodeOpened:k,isNodeLoading:N,isNodeChecked:w,getParentNode:p,resolveScopedSlotParam:M,extendNodeAttr:x}=Oo(n,e),{registerNextLoop:S}=l,{asyncNodeClick:H,deepAutoOpen:P}=$h(e,n),Q=Y=>L(Y)?a.createVNode(dc,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(fc,{class:[Be("tree-icon"),Be("node-prefix")]},null),O=Y=>{if(typeof Y=="string")return Y;if(typeof Y=="object"&&Y!==null){if(Y.__v_isVNode)return Y;const{node:ae,className:Me,text:j,style:W}=Y;return a.h(ae,{class:Me,style:W},j)}return null},E=Y=>{var ae,Me,j;return((j=(Me=(ae=t.slots).nodeLoading)==null?void 0:Me.call(ae,x(Y)))!=null?j:N(Y))?a.createVNode(xo,null,null):""},ee=Y=>{if(t.slots.nodeAction)return t.slots.nodeAction(x(Y));let ae=null;return N(Y)?E(Y):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(x(Y),"node_action"),ae!=="default")?O(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(I(Y)||Y.async||!e.autoCheckChildren)?L(Y)?a.createVNode(No,{class:Be("node-prefix")},null):a.createVNode(Ga,{class:Be("node-prefix")},null):null},$=Y=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(x(Y));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(x(Y),"node_type"),ae!=="default")?O(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?v(Y)||I(Y)?Q(Y):a.createVNode(yc,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},ue=(Y,ae)=>{const Me=p(Y);Me&&(d(Me,se.IS_CHECKED,ae),v(Me)||ue(Me,ae))},fe=(Y,ae,Me)=>{C(Y).forEach(j=>{d({[se.UUID]:j},ae,Me),fe({[se.UUID]:j},ae,Me)})},ge=(Y,ae)=>{d(Y,se.IS_CHECKED,!!ae),fe(Y,se.IS_CHECKED,!!ae),ue(Y,ae),t.emit(Ca.NODE_CHECKED,o.value.filter(Me=>w(Me)).map(Me=>Me[se.UUID]))},Ce=Y=>w(Y)&&!o.value.filter(ae=>{var Me;return(Me=f(ae))==null?void 0:Me.startsWith(f(Y))}).every(ae=>w(ae)),re=Y=>w(Y)||o.value.filter(ae=>{var Me;return(Me=f(ae))==null?void 0:Me.startsWith(f(Y))}).some(ae=>w(ae)),X=Y=>e.showCheckbox?a.createVNode(nr,{size:"small",modelValue:re(Y),indeterminate:Ce(Y),onChange:ae=>ge(Y,ae)},null):null,A=(Y,ae=null,Me=null,j=!0)=>{const W=ae===null?!L(Y):!!ae;if(W||fe(Y,se.IS_OPEN,W),d(Y,se.IS_OPEN,W),j){const J=L(Y)?Ca.NODE_EXPAND:Ca.NODE_COLLAPSE;t.emit(J,Y,M(Y),g(Y[se.UUID]),Me)}},R=(Y,ae,Me)=>{if(Array.isArray(Y)){Y.forEach(j=>d(Ma(j),ae,Me));return}d(Ma(Y),ae,Me)},q=(Y,ae=!0,Me=!1)=>{const j=Ma(Y);if(!j[se.IS_NULL])if(Me)if(ae){if(R(j,se.IS_OPEN,!0),!v(j)){const W=m(j,se.PARENT_ID);q(W,!0,!0)}}else A(j,!1,null,!1);else R(j,se.IS_OPEN,ae)},K=(Y,ae)=>{if(k(Y)){A(Y,!1,ae);return}H(Y).finally(()=>{m(Y,se.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>A(Y,!0,ae)}):A(Y,!0,ae)})},he=(Y,ae)=>{Y.stopImmediatePropagation(),Y.stopPropagation(),Y.preventDefault(),K(ae,Y)},le=(Y,ae=!0,Me=!0)=>{const j=Array.isArray(Y)?Y:[Y];if(!j.length)return;const W=Ma(j[0]);W[se.IS_NULL]||(e.selectable?(u!=null&&d({[se.UUID]:u},se.IS_SELECTED,!ae),e.selected&&e.selected!==u&&d({[se.UUID]:e.selected},se.IS_SELECTED,!ae),d(W,se.IS_SELECTED,ae),u=y(W),Me&&j.length===1&&q(W,!0,!0),m(W,se.IS_ASYNC)&&H(W).then(()=>{a.nextTick(()=>{j.shift(),le(j,ae,Me)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(Y,ae)=>{le(Y,!0,!1),k(Y)||K(Y,ae);const Me=Ca.NODE_CLICK;t.emit(Me,Y,M(Y),g(Y[se.UUID]),ae)},te=(Y,ae)=>{if(v(ae))return!1;const Me=f(ae),j=`${Me}`.split("-").slice(0,Y+1);if(j.join("-")===Me)return!0;const J=j.pop(),G=parseInt(J,10);j.push(`${G+1}`);const _=j.join("-");return o.value.some(ne=>ne[se.PATH]===_)},ve=Y=>{if(!e.levelLine)return null;const ae=j=>({"--depth":j}),Me=m(Y,se.DEPTH)+1;return new Array(Me).fill("").map((j,W)=>W).filter(j=>te(j,Y)).filter(j=>j>0).map(j=>a.createVNode("span",{class:"node-virtual-line",style:ae(Me-j)},null))};return{renderTreeNode:Y=>{var ae,Me,j,W,J;return a.createVNode("div",{"data-tree-node":y(Y),key:y(Y),class:fN(Y,n.schema)},[a.createVNode("div",{class:dN(Y,n.schema,e),style:cN(Y,e,n),onClick:G=>pe(Y,G)},[a.createVNode("span",{class:[Be("node-action")],onClick:G=>he(G,Y)},[ee(Y)]),a.createVNode("span",{class:Be("node-content")},[[X(Y),$(Y)],a.createVNode("span",{class:Be("node-text")},[(j=(Me=(ae=t.slots).node)==null?void 0:Me.call(ae,x(Y)))!=null?j:[Uh(Y,e)]]),(J=(W=t.slots).nodeAppend)==null?void 0:J.call(W,x(Y))]),ve(Y)])])},hanldeTreeNodeClick:K,deepAutoOpen:P,asyncNodeClick:H,setNodeAction:R,setNodeOpened:A,setSelect:le,setOpen:q}},pN=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:o,getParentNodeData:l,getNodeAttr:u,getNodePath:d,isRootNode:f}=Oo(n,e),g=w=>w.target.closest("[data-tree-node]"),m=w=>{g(w).removeEventListener("mouseup",m)},y=w=>{const p=g(w);p.setAttribute("draggable","true"),p.addEventListener("mouseup",m)},C=w=>{w.preventDefault();const p=g(w),M=w.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node"),S=L(M,x)?"move":"none";w.dataTransfer.effectAllowed=S,w.dataTransfer.dropEffect=S},v=w=>{w.dataTransfer.effectAllowed="move",w.dataTransfer.dropEffect="move";const p=g(w);w.dataTransfer.setData("text/plain",""),w.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},I=w=>{w.preventDefault(),w.stopPropagation();const p=g(w),M=w.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:N,globalThis,[M,x])},L=(w,p)=>{const M=d({[se.UUID]:w}),x=d({[se.UUID]:p}),S=o(w),H=o(p);return S===H?!0:M.indexOf(x)===-1&&x.indexOf(M)===-1},k=(w,p)=>{if(!L(w,p))return;const M=JSON.parse(JSON.stringify(i(w))),x=JSON.parse(JSON.stringify(i(p))),S=l(w),H=l(p),P=u({[se.UUID]:w},se.INDEX),Q=u({[se.UUID]:p},se.INDEX);S==null||S[e.children].splice(P,1,x),H==null||H[e.children].splice(Q,1,M)},N=(w,p)=>{const M=i(w),x=i(p);let S=null;if(f({[se.UUID]:w}))S=e.data;else{const H=o(w);if(H!=null){S=i(H);const P=u({[se.UUID]:w},se.INDEX);S==null||S[e.children].splice(P,1)}}x[e.children]||(x[e.children]=[]),x[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const w=t.value.$el;w.addEventListener("mousedown",y),w.addEventListener("dragstart",v),w.addEventListener("dragover",C),w.addEventListener("drop",I)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const w=t.value.$el;w.removeEventListener("mousedown",y),w.removeEventListener("dragstart",v),w.removeEventListener("dragover",C),w.removeEventListener("drop",I)}})},vN=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},o=v=>["string","number","boolean"].includes(typeof v),l=(v,I)=>v===I,u=(v,I)=>new RegExp(`${v}`,"i").test(`${I}`),d=(v,I)=>Reflect.apply(v,globalThis,I),f=t.value===void 0||t.value===!1,g=(v,I)=>{if(f)return!0;if(o(t.value))return d(u,[t.value,v,I]);const{value:L="",match:k="fuzzy"}=t.value,w=typeof k=="function"?k:k==="fuzzy"?u:l;return`${L}`.length===0?!0:d(w,[L,v,I])},m=a.computed(()=>t.value!==!1&&(o(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:g,refSearch:t,isSearchActive:m,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},yN=e=>{var k;const t=(N,w=void 0,p=[])=>{const{data:M,children:x}=N,S=[],H=[];let P=0;const Q=new Map;function O(re,X,A,R){if(re!=null&&Q.has(re)&&![se.UUID,se.PARENT_ID].includes(X)){const q=Q.get(re);Object.prototype.hasOwnProperty.call(q,X)&&typeof R=="function"&&Reflect.apply(R,self,[q,X,A])&&(Object.assign(q,{[X]:A}),O(q[se.PARENT_ID],X,A,R))}}function E(re){let X=null;return typeof N.nodeKey=="string"&&(X=re[N.nodeKey]||Fi.v4()),X||re[se.UUID]||Fi.v4()}const ee={[se.IS_OPEN]:()=>!1,[se.IS_CHECKED]:()=>!1,[se.IS_MATCH]:()=>!0,[se.IS_SELECTED]:re=>N.selected===re,[se.IS_CACHED]:()=>!1,[se.IS_ASYNC]:()=>null,[se.IS_LOADING]:()=>!1};function $(re,X,A,R=void 0){let q=R;R===void 0&&typeof ee[A]=="function"&&(q=ee[A](re,X));const K=wi[A];if(Object.prototype.hasOwnProperty.call(X,K))return X[K];const he=(p||[]).find(pe=>pe[se.UUID]===re);let le;return he&&(le=he[A]),le==null&&(le=q),le}function ue(re,X){return N.selectable?$(re,X,se.IS_SELECTED,N.selected===re):!1}function fe(re,X,A){var K;const R=$(re,X,se.IS_OPEN),q=Q.has(A)?(K=Q.get(A))==null?void 0:K[se.IS_OPEN]:!0;return R&&q}function ge(re){return!re[se.IS_OPEN]}function Ce(re,X=0,A=null,R=null){const q=re.length;for(let K=0;K<q;K++){const he=re[K];if(Array.isArray(he))Ce(he,X,A,R);else if(typeof he=="object"&&he!==null){const le=R!==null?`${R}-${K}`:`${K}`,pe=`${E(he)}`,te=!!(he[x]||[]).length;let ve=$(pe,he,se.IS_OPEN);N.autoOpenParentNode?ve&&O(A,se.IS_OPEN,!0,ge):ve=fe(pe,he,A),Object.assign(he,{[se.UUID]:pe});const ye=N.showCheckbox&&$(pe,he,se.IS_CHECKED);ye&&S.push(pe),Q.set(pe,{[se.DEPTH]:X,[se.INDEX]:K,[se.UUID]:pe,[se.PARENT_ID]:A,[se.HAS_CHILD]:te,[se.PATH]:le,[se.IS_ROOT]:A===null,[se.ORDER]:P,[se.IS_SELECTED]:ue(pe,he),[se.IS_MATCH]:$(pe,he,se.IS_MATCH),[se.IS_OPEN]:ve,[se.IS_CHECKED]:ye,[se.IS_CACHED]:$(pe,he,se.IS_CACHED),[se.IS_ASYNC]:$(pe,he,se.IS_ASYNC),[se.IS_LOADING]:$(pe,he,se.IS_LOADING),[x]:null}),P+=1,H.push(Te(U({},JSON.parse(JSON.stringify(he,(Y,ae)=>Y===N.children?null:ae))),{[se.IS_OPEN]:ve,[x]:null})),Object.prototype.hasOwnProperty.call(he,x)&&Ce(he[x]||[],X+1,pe,le)}}}return Ce(w||M),N.showCheckbox&&(S==null||S.forEach(re=>{Array.from(Q.values()).filter(X=>{var A;return(A=X[se.PATH])==null?void 0:A.startsWith(Q.get(re)[se.PATH])}).forEach(X=>Object.assign(X,{[se.IS_CHECKED]:!0})),O(re,se.IS_CHECKED,!0,()=>!0)})),[H,Q]},n=t(e),i=new Map,o=[],l=[],u=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:f,deepAutoOpen:g}=$h(e,u),m=N=>{o.push(N)},y=(N,w,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,w)},C=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),v=N=>{var p;const w=C(N);return w!==null&&Reflect.apply(w.fn,globalThis,[]),(p=w==null?void 0:w.type)!=null?p:"once"},I=()=>{Array.from(i.keys()).forEach(N=>{const w=i.get(N);if(Array.isArray(w)){const p=[];w.forEach((M,x)=>{v(M)==="once"&&p.unshift(x)}),p.length&&p.forEach(M=>w.splice(M,1)),w.length===0&&i.delete(N)}else v(w)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,M;const w=t(e,N,d.value);u.data=w[0],u.schema=w[1],((p=e.async)==null?void 0:p.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&g(),I()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{l.length=0,o.forEach(w=>{Reflect.apply(w,globalThis,[N]),l.push(()=>Reflect.apply(w,globalThis,[N]))}),y("afterSelectWatch",l)},{immediate:!0});const L=N=>{y("afterDataUpdate",N)};return(k=e.async)!=null&&k.callback&&g(),{flatData:u,schemaValues:d,asyncNodeClick:f,deepAutoOpen:g,afterDataUpdate:L,registerNextLoop:y,onSelected:m}},bN=a.defineComponent({name:"Tree",props:sN,emits:aN,setup(e,t){const{flatData:n,schemaValues:i,onSelected:o,registerNextLoop:l}=yN(e),{setNodeAttr:u,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:g,isRootNode:m,isNodeOpened:y,isNodeChecked:C,isNodeMatched:v,hasChildNode:I}=Oo(n,e),{searchFn:L,isSearchActive:k,refSearch:N,openResultNode:w,isTreeUI:p,isSearchDisabled:M}=vN(e);M||a.watch([N],()=>{n.data.forEach(X=>{const A=L(Uh(X,e),X);u(X,se.IS_MATCH,A),w&&O(X,!0,!0)})});const x=X=>{if(k.value){const A=()=>p?i.value.some(R=>{var q;return((q=R[se.PATH])==null?void 0:q.startsWith(g(X)))&&R[se.IS_MATCH]}):!1;return f(X,se.IS_MATCH)||A()}return!0},S=a.computed(()=>n.data.filter(X=>d(X)&&x(X))),{renderTreeNode:H,hanldeTreeNodeClick:P,setNodeOpened:Q,setOpen:O,setNodeAction:E,setSelect:ee,asyncNodeClick:$}=mN(e,t,n,S,i,{registerNextLoop:l}),ue=(X,A=!0)=>{E(Ma(X),se.IS_CHECKED,A)};o(X=>{ee(X,!0,e.autoOpenParentNode)});const fe=()=>n;t.expose({hanldeTreeNodeClick:P,isNodeChecked:C,isRootNode:m,isNodeOpened:y,isNodeMatched:v,hasChildNode:I,setOpen:O,setChecked:ue,setNodeAction:E,setNodeOpened:Q,setSelect:ee,asyncNodeClick:$,getData:fe});const ge=a.ref(),{renderEmpty:Ce}=oN(e,t);pN(e,ge,n);const re=X=>{if(X.length)return X.map(H);const A=k.value?"search-empty":"empty";return Ce(A)};return()=>a.createVNode(Ao,{class:Be("tree"),style:uN(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:ge},{default:X=>re(X.data||[])})}});const Xh=_e(bN),T9=e=>e.__v_isVNode;var CN=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(T9(e[n])){i=e[n];break}n=n+1}let o=t-1,l=null;for(;o>=0&&o>n;){if(T9(e[o])){l=e[o];break}o=o-1}if(i&&l){i.props||(i.props={});let u="bk-compose-form-item-head";i.props.class&&(u+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=u,l.props||(l.props={});let d="bk-compose-form-item-tail";l.props.class&&(d+=` ${l.props.class}`),this.tailBackgroundColor&&(l.props.style=Object.assign(l.props.style||{},{"background-color":this.tailBackgroundColor})),l.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const MN={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var IN=a.defineComponent({name:"Form",props:MN,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},o=f=>{n=n.reduce((g,m)=>(m!==f&&g.push(m),g),[])};return a.provide(b3,{props:e,register:i,unregister:o}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let g={};return f?g=(typeof f=="string"?[f]:f).reduce((y,C)=>Te(U({},y),{[C]:!0}),{}):g=n.reduce((m,y)=>y.property?Te(U({},m),{[y.property]:!0}):m,{}),Promise.all(n.reduce((m,y)=>(g[y.property]&&m.push(y.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let g={};f?g=(typeof f=="string"?[f]:f).reduce((y,C)=>Te(U({},y),{[C]:!0}),{}):g=n.reduce((m,y)=>Te(U({},m),{[y.property]:!0}),{}),n.forEach(m=>g[m.property]&&m.clearValidate())}}},render(){var t,n;const e=Se({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}}),Cn={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 wN={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},NN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),LN=e=>{const t=[];return e.required&&t.push({validator:Cn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Cn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Cn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Cn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Cn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},kN=(e,t)=>{const n=e.reduce((i,o)=>{let l;if(o.required)l=Cn.required;else if(o.email)l=Cn.email;else if(Number(o.max)>-1)l=u=>Cn.max(u,o.max);else if(Number(o.min)>-1)l=u=>Cn.min(u,o.max);else if(Number(o.maxlength)>-1)l=u=>Cn.min(u,o.max);else if(Object.prototype.toString.call(o.pattern)==="[object RegExp]")l=u=>Cn.pattern(u,o.pattern);else if(Object.prototype.toString.call(o.validator)==="[object Function]")l=o.validator;else return i;return i.push({validator:l,message:o.message,trigger:o.trigger}),i},[]);return[...t,...n]},xN=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),S9=e=>e!==void 0;var TN=a.defineComponent({name:"FormItem",directives:{bkTooltips:Nc},props:wN,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=Zy(),o=Boolean(i),l=a.computed(()=>o?i.props.formType==="vertical":!1),u=a.computed(()=>{const g={width:"",paddingRight:"",textAlign:""},m=S9(e.labelWidth)?e.labelWidth:o&&i.props.labelWidth;S9(m)&&(g.width=`${m}px`,g.paddingRight=m?"":"0px");const y=e.labelPosition||o&&i.props.labelPosition;return y&&(g["text-align"]=y),g}),d=g=>{if(n.isError=!1,n.errorMessage="",!e.property||o&&!i.props.model)return Promise.resolve(!0);let m=[];o&&i.props.rules&&NN(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=xN(g,kN(m,LN(e)));const y=qt.exports.get(i.props.model,e.property),C=(()=>{let v=-1;return()=>{if(v=v+1,v>=m.length)return Promise.resolve(!0);const I=m[v];return Promise.resolve().then(()=>{const L=I.validator(y);return typeof L!="boolean"&&typeof L.then=="function"?L.then(k=>{if(k===!1)return Promise.reject(I.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))):L?C():(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))})}})();return C()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(C3,Te(U({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{o&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{o&&i.unregister(t.proxy)}),Te(U({},a.toRefs(n)),{labelStyles:u,isFormTypeVertical:l,validate:d,clearValidate:f})},render(){var i,o,l,u;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,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(uc,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(),this.isFormTypeVertical&&((o=(i=this.$slots).labelAppend)==null?void 0:o.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(u=(l=this.$slots).default)==null?void 0:u.call(l),n()])])}});const Kh=Zt(IN,{FormItem:TN,ComposeFormItem:CN}),SN={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var DN=a.defineComponent({name:"Col",props:SN,emits:[],setup(e,t){const{col:n,gutter:i,flex:o}=a.inject("containerProps"),{span:l,offset:u,pull:d,push:f}=e,g=a.computed(()=>l||n);a.provide("containerProps",{col:g.value,gutter:i,flex:o});const m=function(C){return`${Number((C*100).toFixed(3))}%`},y=a.computed(()=>({width:m(g.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":u?m(u/n):null,right:d?m(d/n):null,left:f?m(f/n):null}));return()=>{var C,v;return a.createVNode("div",{class:"bk-grid-col",style:y.value},[(v=(C=t.slots).default)==null?void 0:v.call(C)])}}});const jN={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var zN=a.defineComponent({name:"Container",props:jN,emits:[],setup(e,t){const{col:n,gutter:i,flex:o,extCls:l}=e;a.provide("containerProps",{col:n,gutter:i,flex:o});const u=a.computed(()=>l?`bk-grid-container ${l}`:"bk-grid-container"),d=a.computed(()=>{const{margin:f}=e;return{"padding-right":`${f}px`,"padding-left":`${f}px`}});return()=>{var f,g;return a.createVNode("div",{class:u.value,style:d.value},[(g=(f=t.slots).default)==null?void 0:g.call(f)])}}}),PN=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:o}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:o});const l=a.computed(()=>Te(U({},o?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var u,d;return a.createVNode("div",{class:"bk-grid-row",style:l.value},[(d=(u=t.slots).default)==null?void 0:d.call(u)])}}});const ho=Zt(zN,{Row:PN,Col:DN}),AN=["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"],ON=["hover","click","manual"];var EN=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(AN,"placement").def("bottom"),trigger:h.commonType(ON,"trigger").def("hover"),disabled:h.bool.def(!1),popoverOptions:h.object.def({}),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=l=>{t("showChange",l)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=Se({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=qt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Gr,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,o;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(o=(i=this.$slots).default)==null?void 0:o.call(i),a.createTextVNode(" ")])},content:()=>{var i,o;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(o=(i=this.$slots).content)==null?void 0:o.call(i),a.createTextVNode(" ")])}})])}}),JN=a.defineComponent({name:"DropdownItem",props:{extCls:h.string},emits:["click"],setup(e,{emit:t}){const n=o=>{o.stopPropagation(),t("click",o)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),QN=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 qh=Zt(EN,{DropdownMenu:QN,DropdownItem:JN});var Eu=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),o=a.ref([]),l=a.ref([]),u=L=>{L.config.multiple?l.value=n.getCheckedNodes().map(k=>k.path):l.value=L.path,t("input",l.value)},d=()=>{t("input",[])},f=L=>{L.forEach(k=>{const N=n.getNodeById(k);g(N)}),l.value=L},g=L=>{var k;if(!L.isDisabled){if(i.list=i.list.slice(0,L.level),o.value=o.value.slice(0,L.level-1),(k=L.children)!=null&&k.length){i.list.push(L.children),o.value.push(L);return}if(n.config.isRemote&&!L.isLeaf){L.loading=!0;const N=w=>{n.appendNodes(w,L||null),i.list.push(L.children),o.value.push(L),L.loading=!1};n.config.remoteMethod(L,N)}}};return{menus:i,activePath:o,nodeExpandHandler:g,isNodeInPath:L=>(o.value[L.level-1]||{}).id===L.id,nodeEvent:L=>{const{trigger:k,checkAnyLevel:N,multiple:w}=L.config;return{onClick:M=>{(!L.isLeaf||w)&&M.stopPropagation(),k==="click"&&g(L),N&&!w&&u(L),L.isLeaf&&!w&&u(L)},onMouseenter:()=>{k==="hover"&&g(L)}}},isCheckedNode:(L,k)=>{const{multiple:N}=L.config;return N?!1:I3(k,L.path)},checkValue:l,nodeClear:d,checkNode:(L,k)=>{L.setNodeCheck(k),u(L)},iconRender:L=>L.loading?a.createVNode(xo,{class:"icon-spinner"},null):a.createVNode(Jn,{class:"icon-angle-right"},null),syncCheckedValue:f}},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(nr,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"bk-cascader-node-name"},[t.name]),t.isLeaf?"":this.iconRender(t)]))]))])}});class go{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const o=this.data[i];this.children=(o||[]).map(l=>new go(l,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(l=>l.id),this.pathNames=this.pathNodes.map(l=>l.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const e6=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(e6(i.children,t))),n),[]);class VN{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new go(i,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return e6(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(o=>I3(o.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new go(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var RN=a.defineComponent({name:"Cascader",directives:{clickoutside:Hr},components:{CascaderPanel:Eu,BkPopover:rr},props:{modelValue:h.oneOfType([h.arrayOf(h.number).def([]),h.arrayOf(h.string).def([])]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:o,setHover:l,cancelHover:u}=dh(),d=a.reactive(new VN(e)),f=a.ref(!1),g=a.ref(""),m=a.ref([]),y=a.ref(e.modelValue),C=a.ref();a.watch(()=>e.modelValue,p=>{v(p)});const v=p=>{if(C.value.syncCheckedValue(p),i){m.value=d.getCheckedNodes().map(M=>({text:M.pathNames.join(n),key:M.id}));return}if(p.length===0)g.value="";else{const M=d.getNodeByValue(p);g.value=M.pathNames.join(n)}};return{store:d,updateValue:v,hidePopover:()=>{f.value=!1},inputClickHandler:p=>{p.stopPropagation(),f.value=!f.value,t("toggle",f.value)},selectedText:g,checkedValue:y,panelShow:f,handleClear:p=>{p.stopPropagation(),v([]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},isHover:o,setHover:l,cancelHover:u,selectedTags:m,removeTag:(p,M,x)=>{x.stopPropagation();const S=JSON.parse(JSON.stringify(p));S.splice(M,1),v(S)},inputChangeHandler:p=>{v(p),t("update:modelValue",p),t("change",p)},cascaderPanel:C}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Vn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Rr,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Rn,{class:"bk-icon-clear-icon",onClick:o=>this.removeTag(this.modelValue,i,o)},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(rr,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,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(Eu,{store:this.store,ref:"cascaderPanel",onInput:n=>this.inputChangeHandler(n)},null)])})])}});const t6=Zt(RN,{CascaderPanel:Eu});var D9=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),i=a.ref(!1),o=a.ref(0),l=a.ref(0),u=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),g=a.ref(0),m=a.ref(0),y=a.ref(!1),C=a.ref(null),v=a.computed(()=>{var Q,O;let H="";if((Q=e.params.customContent)!=null&&Q[e.modelValue]){const E=e.params.customContent[e.modelValue];H=E.tip||E.label||""}const P=e.params.vertical?"right":"top";return(O=e.params)!=null&&O.showTip?{content:e.params.formatterTipLabel(`${H||(e==null?void 0:e.modelValue)||"0"}`),placement:P}:{content:"",placement:P}}),I=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),L=a.computed(()=>e.params.vertical?{bottom:I.value}:{left:I.value}),k=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=H=>{e.params.disable||(H.preventDefault(),w(H),Ia(window,"mousemove",p),Ia(window,"touchmove",p),Ia(window,"mouseup",M),Ia(window,"touchend",M))},w=H=>{n.value=!0,i.value=!0,e.params.vertical?o.value=H.clientY:l.value=H.clientX,u.value=parseFloat(I.value),d.value=u.value},p=H=>{if(n.value){i.value=!1,t("resetSize");let P=0;e.params.vertical?(g.value=H.clientY,P=(o.value-g.value)/e.params.sliderSize*100):(m.value=H.clientX,P=(m.value-l.value)/e.params.sliderSize*100),d.value=u.value+P,x(d.value)}},M=()=>{y.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(x(d.value),t("emitChange"))},0),_s(window,"mousemove",p),_s(window,"touchmove",p),_s(window,"mouseup",M),_s(window,"touchend",M))},x=H=>{if(H===null||isNaN(H))return;H<0?d.value=0:H>100&&(d.value=100);const P=100/((e.params.maxValue-e.params.minValue)/e.params.step);let O=Math.round(H/P)*P*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;O=parseFloat(O.toFixed(e.params.precision)),t("update:modelValue",O),!n.value&&e.modelValue!==f.value&&(f.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:C,tabindex:"0",style:L.value,onClick:H=>H.stopPropagation(),onMousedown:N},[Boolean(v.value.content)?a.createVNode(rr,{content:v.value.content,theme:"dark",placement:v.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"]},[k.value]):void 0]),setPosition:x,tip:v}},render(){return this.renderDom()}});const Ia=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},_s=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var WN=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),o=a.ref(null),l=a.ref(null),u=a.ref(null),d=a.ref(0),f=a.ref(0),g=a.ref(null),m=a.ref(null),y=a.ref(null),C=a.ref(null),v=a.computed(()=>{const A=[e.minValue,e.maxValue,e.step].map(R=>{const q=`${R}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,A)}),I=a.computed(()=>Math.min(o.value,l.value)),L=a.computed(()=>Math.max(o.value,l.value)),k=a.computed(()=>e.range?`${100*(L.value-I.value)/(e.maxValue-e.minValue)}%`:`${100*(o.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(I.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),w=a.computed(()=>e.vertical?{height:k.value,bottom:N.value}:{width:k.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const A=(e.maxValue-e.minValue)/e.step,R=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<A;K++)q.push(K*R);return e.range?q.filter(K=>K<100*(I.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(o.value-e.minValue)/(e.maxValue-e.minValue))}),M=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),x=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const A=100*e.step/(e.maxValue-e.minValue),R=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const he={stepWidth:K*A,stepLabel:e.formatterLabel(q)};R.push(he)}return R}),S=a.computed(()=>Array.isArray(e.modelValue)),H=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((A,R)=>Number(A)-Number(R)).filter(A=>Number(A)>=e.minValue&&Number(A)<=e.maxValue).map(A=>{const{tip:R}=e.customContent[A],{label:q}=e.customContent[A];return{tip:R||q||"",label:q||"",percent:(Number(A)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),P=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:v.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ee()}),a.watch(()=>o.value,A=>{e.range?n("update:modelValue",[I.value,L.value]):n("update:modelValue",A),d.value=A}),a.watch(()=>l.value,A=>{n("update:modelValue",[I.value,L.value]),f.value=A}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(o.value=Math.max(e.minValue,Number(e.modelValue[0])),l.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(o.value=e.minValue,l.value=e.maxValue),u.value=[o.value,l.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?o.value=e.minValue:o.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=o.value),Q(),Ia(window,"resize",Q())});const Q=()=>{g.value&&(i.value=g.value[`client${e.vertical?"Height":"Width"}`])},O=A=>{var R,q;if(A.stopPropagation(),!e.disable){if(Q(),e.vertical){const K=(R=g.value)==null?void 0:R.getBoundingClientRect().bottom;fe((K-A.clientY)/i.value*100)}else{const K=(q=g.value)==null?void 0:q.getBoundingClientRect().left;fe((A.clientX-K)/i.value*100)}$()}},E=()=>e.range?![I.value,L.value].every((A,R)=>A===u.value[R]):e.modelValue!==u.value,ee=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const A=e.modelValue;e.range&&Array.isArray(A)?A[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):A[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):A[0]<e.minValue?n("update:modelValue",[e.minValue,A[1]]):A[1]>e.maxValue?n("update:modelValue",[A[0],e.maxValue]):(o.value=Number(A[0]),l.value=Number(A[1]),E()&&(u.value=A.slice())):!e.range&&typeof A=="number"&&!isNaN(A)&&(A<e.minValue?n("update:modelValue",e.minValue):A>e.maxValue?n("update:modelValue",e.maxValue):(o.value=A,E()&&(u.value=A)))},$=async()=>{await a.nextTick(),n("change",e.range?[I.value,L.value]:e.modelValue)},ue=A=>e.vertical?{bottom:`${A}%`}:{left:`${A}%`},fe=A=>{if(!e.range){m.value.setPosition(A);return}const R=e.minValue+A*(e.maxValue-e.minValue)/100;Math.abs(I.value-R)<Math.abs(L.value-R)?C.value=o.value<l.value?m.value:y.value:C.value=o.value>l.value?m.value:y.value,C.value.setPosition(A)},ge=A=>{if(A==="")return;const R=parseFloat(A);R<e.minValue?(d.value=e.minValue,o.value=e.minValue):R>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=R},Ce=A=>{if(A===""||typeof A=="number")return;const R=parseFloat(A);R<e.minValue?(f.value=e.minValue,l.value=e.minValue):R>e.maxValue?(f.value=e.maxValue,l.value=e.maxValue):l.value=R},re=A=>{let R=0;return A==="start"?R=e.vertical?e.maxValue:e.minValue:R=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[o.value,l.value].includes(R)?"0":"1"};return{renderDom:()=>{var A,R;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(A=t.start)==null?void 0:A.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:g,style:M.value,onClick:O},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:w.value},null),e.showInterval?p.value.map((q,K)=>a.createVNode("div",{key:K,class:["bk-slider-interval",{vertical:e.vertical}],style:ue(q)},null)):void 0,e.customContent?H.value.map((q,K)=>a.createVNode("div",{key:K,class:["bk-slider-interval",{vertical:e.vertical}],style:ue(q.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:re("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:re("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return x.value.map((q,K)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:K,style:ue(q.stepWidth)},[q.stepLabel]));if(e.customContent)return H.value.map((q,K)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:K,style:ue(q.percent)},[q.label]))}()]):void 0,a.createVNode(D9,{modelValue:o.value,"onUpdate:modelValue":q=>o.value=q,ref:m,params:P.value,onEmitChange:$,onResetSize:Q},null),e.range?a.createVNode(D9,{modelValue:l.value,"onUpdate:modelValue":q=>l.value=q,ref:y,params:P.value,onEmitChange:$,onResetSize:Q},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(tr,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ge},null)]),S.value&&l.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(tr,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:Ce},null)])]:void 0]):void 0,(R=t.end)==null?void 0:R.call(t)])}}},render(){return this.renderDom()}});const n6=_e(WN);var HN=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:o,triggerWidth:l,max:u,min:d,immediate:f,autoMinimize:g}=a.toRefs(e),m=a.ref(!1),y=a.ref(!0),C=a.ref(!1),v=a.ref(null),I=a.ref({}),L=a.ref(null),k=a.ref(null),N=a.ref(null),w=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>p.value?"width":"height"),x=a.computed(()=>{let re=i.value;return typeof re=="number"&&(re=`${re}px`),{[M.value]:re}}),S=a.computed(()=>({[`margin-${n.value}`]:`${o.value-l.value}px`,[M.value]:`${l.value}px`})),H=a.computed(()=>g.value?typeof g.value=="boolean"?50:g.value:0),P=()=>{const re=L.value.getBoundingClientRect();v.value=p.value?re.width:re.height},Q=new ResizeObserver(P),O=()=>{switch(k.value.style.visibility="visible",n.value){case"left":k.value.style.inset=`0 auto auto ${I.value.aside.width}px`;break;case"right":k.value.style.inset=`0 ${I.value.aside.width}px auto auto`;break;case"top":k.value.style.inset=`${I.value.aside.height}px auto auto 0`;break;case"bottom":k.value.style.inset=`auto auto ${I.value.aside.height}px 0`;break}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},ee=re=>Math.min(u.value,Math.max(d.value,re),v.value-l.value),$=re=>{t("before-resize",re);const X=w.value.getBoundingClientRect();I.value=Object.freeze({mouse:{clientX:re.clientX,clientY:re.clientY},aside:{width:X.width,height:X.height}}),E(),f.value||O(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const A=K=>{t("resizing",K)},R=K=>{let he;switch(n.value){case"top":he=K.clientY-I.value.mouse.clientY;break;case"right":he=I.value.mouse.clientX-K.clientX;break;case"bottom":he=I.value.mouse.clientY-K.clientY;break;case"left":he=K.clientX-I.value.mouse.clientX}const le=I.value.aside[M.value]+he,pe=ee(le)+o.value,te=`${pe}px`;f.value?w.value.style[M.value]=te:k.value.style[n.value]=te,A(pe)},q=()=>{if(k.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",q),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ue(),t("after-resize",parseFloat(k.value.style[n.value]))}),f.value)return!1;w.value.style[M.value]=k.value.style[n.value]};document.addEventListener("mousemove",R),document.addEventListener("mouseup",q)},ue=()=>{if(!g.value)return!1;const re=w.value.getBoundingClientRect();if(C.value=m.value=re[M.value]<=H.value,!C.value)return y.value=!0,!1;ge(),a.nextTick(()=>{w.value.setAttribute(`data-${M.value}`,x.value[M.value])})},fe=re=>{m.value=typeof re=="boolean"?re:!m.value,ge(),t("collapse-change",m.value)},ge=()=>{const re=w.value.getBoundingClientRect();Ce(!m.value),m.value?(w.value.setAttribute(`data-${M.value}`,`${re[M.value]}px`),w.value.style[M.value]="5px"):(y.value=!0,w.value.style[M.value]=w.value.getAttribute(`data-${M.value}`))},Ce=re=>{const X=()=>{y.value=re,w.value.style.transition="",w.value.removeEventListener("transitionend",X)};w.value.addEventListener("transitionend",X),w.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{Q.observe(L.value)}),a.onBeforeUnmount(()=>{Q.unobserve(L.value)}),{collapsed:m,asideContentVisible:y,minimized:C,limitMax:v,state:I,vertical:p,cssPropKey:M,bkResizeLayoutRef:L,resizeProxyRef:k,resizeMaskRef:N,asideRef:w,triggerStyle:S,asideStyle:x,handleMousedown:$,setCollapse:fe}},render(){var t,n,i,o,l,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"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((o=(i=this.$slots)["collapse-trigger"])==null?void 0:o.call(i))||(this.collapsed?a.createVNode(Jn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(qi,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(l=this.$slots).main)==null?void 0:u.call(l)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const i6=_e(HN),BN={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var GN=a.defineComponent({name:"Timeline",props:BN,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=u=>{const d=[];u.forEach(f=>{var g;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(g=f.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...d)},o=()=>{var u;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(u=e.list)!=null&&u.length&&i(e.list)},l=u=>{try{t("select",u)}catch(d){console.warn(d)}};return a.onMounted(o),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:l}},render(){const e=n=>{const{icon:i}=n;return i?typeof i=="function":!1},t=n=>{const i="bk-timeline",o=["blue","red","green","yellow","gray"],l=n.type?`${i}-${n.type}`:`${i}-default`,u=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",f=n.color&&o.includes(n.color)?`${i}-${n.color}`:"";return Se({},`${i} ${l} ${u} ${f} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,o,l;return a.createVNode("li",{class:["bk-timeline-dot",t(n)]},[e(n)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:n.border?`2px solid ${n.color}`:"0px",borderRadius:n.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(n.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(n)}},[(l=(o=(i=this.$slots).default)==null?void 0:o.call(i))!=null?l:a.createVNode("span",{innerHTML:n.tag},null)]),n.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:n.content},null):""])])})])}});const r6=_e(GN),ZN={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var _N=a.defineComponent({name:"BKProcess",props:ZN,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),o=()=>{var u;n.value.splice(0,n.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&&n.value.splice(0,n.value.length,...e.list)},l=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(d){console.warn(d)}};return a.onMounted(o),{defaultProcessList:n,paddingBottom:i,jumpTo:l}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",o=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",l=d=>d.icon?d.icon:"",u=(d,f)=>d===this.curProcess-1&&n(f)?a.createVNode(Io,{class:"bk-icon bk-process-icon icon-loading"},null):i(f)?a.createVNode(Rn,{class:"bk-process-icon"},null):o(d)?a.createVNode(Wr,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[l(f)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,f)=>a.createVNode("li",{onClick:()=>{this.jumpTo(f+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=f+1,current:n(d)&&f===this.curProcess-1}},[d[this.displayKey],u(f,d)]))])])}});const a6=_e(_N),_i="bk-upload";var ei=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ei||{}),kr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(kr||{});const j9=[ei.BUTTON,ei.DRAGGABLE,ei.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||j9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${j9.join(" | ")}\u3011`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function z9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var YN=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:o,multiple:l}=a.toRefs(e),u=`${_i}-list`,d=a.computed(()=>i.value===ei.PICTURE),f=a.computed(()=>d.value&&!l.value),g=a.computed(()=>Se({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:o.value}));function m(N){const w=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${w[p]}`}function y(N,w){n("remove",N,w)}const C=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},z9(N=e.files.map(w=>{const p=Se({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${w.status}`]:!0});return a.createVNode("li",{key:w.uid,class:p},[t!=null&&t.file?t.file(w):v(w)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${u}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(Qa,{class:`${u}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(Oa,{class:"action-icon",onClick:w=>y(N,w)},null)])])],I=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},z9(N=e.files.map(w=>{const p=Se({[`${u}__item`]:!0,[`${u}__item--${w.status}`]:!0});return a.createVNode("li",{key:w.uid,class:p},[t!=null&&t.file?t.file(w):k(w)])}))?N:{default:()=>[N]})},L=N=>{var H;const w=(H=N==null?void 0:N.raw)==null?void 0:H.type,[p]=(w==null?void 0:w.split("/"))||"";let x={text:xa,image:hc,application:xa,video:Mc,audio:ac}[p]||xa;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(w)&&(x=nc),a.h(x,{class:`${u}__item-file-icon`})},k=N=>[a.createVNode("div",{class:`${u}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${u}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(Wr,{class:`${u}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(Qa,{class:`${u}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${u}__item-actions`},[a.createVNode(Oa,{class:`${u}__item-del-icon`,onClick:w=>y(N,w)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:g.value},[d.value?C():I(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),P9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:o,file:l,multiple:u,accept:d}=a.toRefs(e),f=`${_i}-trigger`,g=a.computed(()=>i.value===ei.BUTTON),m=a.computed(()=>i.value===ei.DRAGGABLE),y=a.computed(()=>i.value===ei.PICTURE),C=a.computed(()=>y.value&&!u.value),v=a.computed(()=>y.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),I=a.ref(null),L=a.computed(()=>{var ee,$,ue;return Se({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:(ee=l.value)!=null?ee:!1,[`${f}--${($=l.value)==null?void 0:$.status}`]:(ue=l.value)!=null?ue:!1,[`${f}--dragover`]:x.value,[`${f}--disabled`]:o.value})}),k=()=>{I.value.value=null,I.value.click()},N=ee=>{const{files:$}=ee.target;n("change",Array.from($))},w=()=>{e.disabled||k()},p=ee=>{ee.defaultPrevented||ee.target!==ee.currentTarget||((ee.code==="Enter"||ee.code==="Space")&&k(),ee.preventDefault())};function M(ee,$){n("remove",ee,$),$.stopPropagation(),$.preventDefault()}const x=a.ref(!1),S=()=>{const ee=ge=>{if(o.value)return;ge.preventDefault(),x.value=!1;const Ce=Array.from(ge.dataTransfer.files);if(!v.value){n("change",Ce);return}const re=Ce.filter(X=>{const{type:A,name:R}=X,q=R.includes(".")?`.${R.split(".").pop()}`:"",K=A.replace(/\/.*$/,"");return v.value.split(",").map(he=>he.trim()).filter(he=>he).some(he=>he.startsWith(".")?q===he:/\/\*$/.test(he)?K===he.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(he)?A===he:!1)});n("change",re)},$=ge=>{ge.preventDefault(),x.value=!0},ue=()=>{x.value=!1},fe=Se({[`${f}__draggable`]:!0});return a.createVNode("div",{class:fe,onDrop:ee,onDragover:$,onDragleave:ue},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(ao,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${f}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},H=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?Q(e.file):P()]),P=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(ko,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),Q=ee=>[a.withDirectives(a.createVNode("img",{src:ee.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,ee.status!=="uploading"]]),a.createVNode(a.Fragment,null,[ee.status==="uploading"&&a.createVNode(Qa,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:ee.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Oa,{class:"action-icon",onClick:$=>M(ee,$)},null)])])],O=()=>a.createVNode(Ht,{disabled:o.value},{default:()=>[a.createVNode(ao,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(g.value)return O();if(m.value)return S();if(y.value)return H()};return()=>{var ee;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:w,onKeydown:p},[t.trigger?[t.trigger(),(ee=t==null?void 0:t.default)==null?void 0:ee.call(t)]:E(),a.createVNode("input",{ref:I,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:v.value,multiple:u.value,disabled:o.value,type:"file"},null)])}}}),s6={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function o(N,w){var p=N[0],M=N[1],x=N[2],S=N[3];p+=(M&x|~M&S)+w[0]-680876936|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[1]-389564586|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[2]+606105819|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[3]-1044525330|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[4]-176418897|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[6]-1473231341|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[7]-45705983|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[8]+1770035416|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[10]-42063|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[11]-1990404162|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[12]+1804603682|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[13]-40341101|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[14]-1502002290|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[15]+1236535329|0,M=(M<<22|M>>>10)+x|0,p+=(M&S|x&~S)+w[1]-165796510|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[11]+643717713|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[0]-373897302|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[5]-701558691|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[10]+38016083|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[15]-660478335|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[4]-405537848|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[9]+568446438|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[3]-187363961|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[8]+1163531501|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[13]-1444681467|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[2]-51403784|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[7]+1735328473|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[12]-1926607734|0,M=(M<<20|M>>>12)+x|0,p+=(M^x^S)+w[5]-378558|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[11]+1839030562|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[14]-35309556|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[1]-1530992060|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[7]-155497632|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[10]-1094730640|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[13]+681279174|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[0]-358537222|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[3]-722521979|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[6]+76029189|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[9]-640364487|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[12]-421815835|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[15]+530742520|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[2]-995338651|0,M=(M<<23|M>>>9)+x|0,p+=(x^(M|~S))+w[0]-198630844|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[14]-1416354905|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[5]-57434055|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[12]+1700485571|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[10]-1051523|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[1]-2054922799|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[8]+1873313359|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[15]-30611744|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[6]-1560198380|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[13]+1309151649|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[4]-145523070|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[2]+718787259|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[9]-343485551|0,M=(M<<21|M>>>11)+x|0,N[0]=p+N[0]|0,N[1]=M+N[1]|0,N[2]=x+N[2]|0,N[3]=S+N[3]|0}function l(N){var w=[],p;for(p=0;p<64;p+=4)w[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return w}function u(N){var w=[],p;for(p=0;p<64;p+=4)w[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return w}function d(N){var w=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,x,S,H,P,Q;for(M=64;M<=w;M+=64)o(p,l(N.substring(M-64,M)));for(N=N.substring(M-64),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<x;M+=1)S[M>>2]|=N.charCodeAt(M)<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(o(p,S),M=0;M<16;M+=1)S[M]=0;return H=w*8,H=H.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(H[2],16),Q=parseInt(H[1],16)||0,S[14]=P,S[15]=Q,o(p,S),p}function f(N){var w=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,x,S,H,P,Q;for(M=64;M<=w;M+=64)o(p,u(N.subarray(M-64,M)));for(N=M-64<w?N.subarray(M-64):new Uint8Array(0),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<x;M+=1)S[M>>2]|=N[M]<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(o(p,S),M=0;M<16;M+=1)S[M]=0;return H=w*8,H=H.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(H[2],16),Q=parseInt(H[1],16)||0,S[14]=P,S[15]=Q,o(p,S),p}function g(N){var w="",p;for(p=0;p<4;p+=1)w+=i[N>>p*8+4&15]+i[N>>p*8&15];return w}function m(N){var w;for(w=0;w<N.length;w+=1)N[w]=g(N[w]);return N.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(w,p){return w=w|0||0,w<0?Math.max(w+p,0):Math.min(w,p)}ArrayBuffer.prototype.slice=function(w,p){var M=this.byteLength,x=N(w,M),S=M,H,P,Q,O;return p!==n&&(S=N(p,M)),x>S?new ArrayBuffer(0):(H=S-x,P=new ArrayBuffer(H),Q=new Uint8Array(P),O=new Uint8Array(this,x,H),Q.set(O),P)}}();function y(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function C(N,w){var p=N.length,M=new ArrayBuffer(p),x=new Uint8Array(M),S;for(S=0;S<p;S+=1)x[S]=N.charCodeAt(S);return w?x:M}function v(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function I(N,w,p){var M=new Uint8Array(N.byteLength+w.byteLength);return M.set(new Uint8Array(N)),M.set(new Uint8Array(w),N.byteLength),p?M:M.buffer}function L(N){var w=[],p=N.length,M;for(M=0;M<p-1;M+=2)w.push(parseInt(N.substr(M,2),16));return String.fromCharCode.apply(String,w)}function k(){this.reset()}return k.prototype.append=function(N){return this.appendBinary(y(N)),this},k.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var w=this._buff.length,p;for(p=64;p<=w;p+=64)o(this._hash,l(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},k.prototype.end=function(N){var w=this._buff,p=w.length,M,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(M=0;M<p;M+=1)x[M>>2]|=w.charCodeAt(M)<<(M%4<<3);return this._finish(x,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},k.prototype.setState=function(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},k.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},k.prototype._finish=function(N,w){var p=w,M,x,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(o(this._hash,N),p=0;p<16;p+=1)N[p]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),x=parseInt(M[2],16),S=parseInt(M[1],16)||0,N[14]=x,N[15]=S,o(this._hash,N)},k.hash=function(N,w){return k.hashBinary(y(N),w)},k.hashBinary=function(N,w){var p=d(N),M=m(p);return w?L(M):M},k.ArrayBuffer=function(){this.reset()},k.ArrayBuffer.prototype.append=function(N){var w=I(this._buff.buffer,N,!0),p=w.length,M;for(this._length+=N.byteLength,M=64;M<=p;M+=64)o(this._hash,u(w.subarray(M-64,M)));return this._buff=M-64<p?new Uint8Array(w.buffer.slice(M-64)):new Uint8Array(0),this},k.ArrayBuffer.prototype.end=function(N){var w=this._buff,p=w.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x,S;for(x=0;x<p;x+=1)M[x>>2]|=w[x]<<(x%4<<3);return this._finish(M,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.ArrayBuffer.prototype.getState=function(){var N=k.prototype.getState.call(this);return N.buff=v(N.buff),N},k.ArrayBuffer.prototype.setState=function(N){return N.buff=C(N.buff,!0),k.prototype.setState.call(this,N)},k.ArrayBuffer.prototype.destroy=k.prototype.destroy,k.ArrayBuffer.prototype._finish=k.prototype._finish,k.ArrayBuffer.hash=function(N,w){var p=f(new Uint8Array(N)),M=m(p);return w?L(M):M},k})})(s6);var A9=s6.exports;function Jc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const FN=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",l=>{const u=l;u.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(u)});const i=new FormData;if(e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(u=>{for(const[d,f]of Object.entries(u))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(u=>{Array.isArray(u.value)?i.append(u.name,...u.value):i.append(u.name,u.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Jc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const u=l.name,d=l.value;t.setRequestHeader(u,d)});else{const l=e.header.name,u=e.header.value;t.setRequestHeader(l,u)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,u)=>t.setRequestHeader(u,l));else for(const[l,u]of Object.entries(o))o3(u)||t.setRequestHeader(l,String(u));return t.send(i),t},o6=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,UN=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),o=await XN(n,t),l=[];$N(e,n,i,o,l,t),await Promise.all(l).then(()=>{const u={size:n.size,name:n.name,total:i,hash:o},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Jc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(u))})},$N=(e,t,n,i,o,l)=>{for(let u=0;u<n;u++){const d=new Promise((f,g)=>{const m=u*l,y=Math.min(t.size,m+l),C=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(k=>{for(const[N,w]of Object.entries(k))Array.isArray(w)?C.append(N,...w):C.append(N,w)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(k=>{Array.isArray(k.value)?C.append(k.name,...k.value):C.append(k.name,k.value)})}C.append("file",o6.call(t,m,y)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",u.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const v=new XMLHttpRequest;if(v.onreadystatechange=()=>{if(v.readyState===4){const L=Jc(v);v.status<200||v.status>=300?(g(L),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},v.upload.addEventListener("progress",L=>{const k=L;e.onProgress(k,u)},!1),e.withCredentials&&"withCredentials"in v&&(v.withCredentials=!0),v.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const k=L.name,N=L.value;v.setRequestHeader(k,N)});else{const L=e.header.name,k=e.header.value;v.setRequestHeader(L,k)}const I=e.headers||{};if(I instanceof Headers)I.forEach((L,k)=>v.setRequestHeader(k,L));else for(const[L,k]of Object.entries(I))o3(k)||v.setRequestHeader(L,String(k));v.send(C)});o.push(d)}},XN=(e,t)=>new Promise((n,i)=>{const o=Math.ceil(e.size/t);let l=0;const u=new A9.ArrayBuffer,d=new FileReader;function f(){const g=l*t,m=g+t>=e.size?e.size:g+t;d.readAsArrayBuffer(o6.call(e,g,m))}d.onload=g=>{if(u.append(g.target.result),l+=1,l<o)f();else{const m=u.end(),y=new A9;y.append(m),y.append(e.name);const C=y.end();n(C)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function O9(e){return Date.now()+e}var KN=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),o=a.ref([]);function l(C){return o.value.find(v=>v.uid===C.uid)}let u=0;function d(C){var k;u+=1,C.uid=O9(u);const v={uid:C.uid,name:C.name,status:kr.NEW,size:C.size,raw:C},I=C.type.startsWith("image/");let L=null;if(I){try{v.url=window.URL.createObjectURL(C)}catch(N){console.error(N)}v.isPic=!0}return e.validateName&&!((k=e.validateName)!=null&&k.test(v.name))&&(v.status=kr.FAIL,v.statusText="invalid filename",L=new Error(v.statusText)),I&&C.size>n.value*1024**2&&(v.status=kr.FAIL,v.statusText="invalid file size",L=new Error(v.statusText)),!I&&C.size>i.value*1024**2&&(v.status=kr.FAIL,v.statusText="invalid file size",L=new Error(v.statusText)),o.value.push(v),L}async function f(C){var L;const v=C instanceof File?l(C):C,I=k=>{var N;t.onRemove(k,o.value),o.value.splice(o.value.indexOf(v),1),(N=k.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(k.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,v,o.value))!==!1&&I(v):I(v)}async function g(C,v){const I=l(v);!I||(I.status="fail",I.statusText=C.message)}async function m(C,v){const I=l(v);!I||(I.status="success",I.response=C)}async function y(C,v){const I=l(v);!I||(I.status="uploading",I.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{o.value=C.map(v=>{var I,L;return u+=1,Te(U({},v),{uid:(I=v.uid)!=null?I:O9(u),status:(L=v.status)!=null?L:kr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:o,handlePreprocess:d,handleRemove:f,handleError:g,handleSuccess:m,handleProgress:y}},qN=a.defineComponent({name:"BkUpload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),o=a.computed(()=>e.theme===ei.PICTURE),l=a.computed(()=>o.value&&!e.multiple),u=a.computed(()=>{var p;return Se({[_i]:!0,[`${_i}--${e.theme}`]:!0,[`${_i}--disabled`]:e.disabled,[`${_i}--single-picture`]:l.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(p,M){w(p),n("on-delete",p,M)}const{fileList:g,handlePreprocess:m,handleRemove:y,handleProgress:C,handleSuccess:v,handleError:I}=KN(e,{onRemove:f});function L(p){if(!p.length)return;if(e.limit&&g.value.length+p.length>e.limit){n("on-exceed",p,g.value);return}let M=p;(!e.multiple||e.limit===1)&&(M=p.slice(0,1));for(const x of M){const S=x,H=m(S);if(H){n("on-error",S,g.value,H);return}e.autoUpload&&k(S,M)}}async function k(p,M){var S;if(!e.beforeUpload)return N(p,M);let x;try{x=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{x=!1}if(x===!1){y(p);return}N(p,M)}function N(p,M){const{headers:x,header:S,data:H,formDataAttributes:P,method:Q,withCredentials:O,name:E,url:ee,sliceUrl:$,mergeUrl:ue,chunkSize:fe,customRequest:ge}=e,{uid:Ce}=p,re={headers:x,header:S,withCredentials:O,file:p,data:H,formDataAttributes:P,method:Q,filename:E,action:ee,sliceUrl:$,mergeUrl:ue,chunkSize:fe,onProgress:R=>{C(R,p),n("on-progress",R,p,g.value)},onSuccess:R=>{var K;const q=R;if((K=e==null?void 0:e.handleResCode)!=null&&K.call(e,q))v(R,p),n("on-success",R,p,g.value);else{const he=new Error((q==null?void 0:q.message)||"unknow error");I(he,p),n("on-error",p,g.value,he)}delete i.value[Ce]},onError:R=>{I(R,p),n("on-error",p,g.value,R),delete i.value[Ce]},onComplete:()=>{M.indexOf(p)===M.length-1&&n("on-done",g.value)}};let X=e.sliceUpload?UN:FN;ge&&(X=ge);const A=X(re);i.value[Ce]=A,A instanceof Promise&&A.then(re.onSuccess,re.onError)}function w(p){let M=i.value;p&&(M={[p.uid]:i.value[p.uid]}),Object.keys(M).forEach(x=>{if(M[x]instanceof XMLHttpRequest){const S=M[x];S==null||S.abort()}delete i.value[x]})}return a.onBeforeUnmount(()=>{g.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:u.value},[!o.value&&a.createVNode(P9,a.mergeProps(d,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${_i}__tip`},[e.tip]),a.createVNode(YN,{files:g.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y},{innerTrigger:p=>o.value&&a.createVNode(P9,a.mergeProps(d,{file:p,onChange:L,onRemove:y}),t)})])}});const l6=_e(qN);function Si(){}Si.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var l=this;function u(L){return o?(setTimeout(function(){o(void 0,L)},0),!0):L}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,f=t.length,g=1,m=d+f,y=[{newPos:-1,components:[]}],C=this.extractCommon(y[0],n,t,0);if(y[0].newPos+1>=d&&C+1>=f)return u([{value:this.join(n),count:n.length}]);function v(){for(var L=-1*g;L<=g;L+=2){var k=void 0,N=y[L-1],w=y[L+1],p=(w?w.newPos:0)-L;N&&(y[L-1]=void 0);var M=N&&N.newPos+1<d,x=w&&0<=p&&p<f;if(!M&&!x){y[L]=void 0;continue}if(!M||x&&N.newPos<w.newPos?(k=t7(w),l.pushComponent(k.components,void 0,!0)):(k=N,k.newPos++,l.pushComponent(k.components,!0,void 0)),p=l.extractCommon(k,n,t,L),k.newPos+1>=d&&p+1>=f)return u(e7(l,k.components,n,t,l.useLongestToken));y[L]=k}g++}if(o)(function L(){setTimeout(function(){if(g>m)return o();v()||L()},0)})();else for(;g<=m;){var I=v();if(I)return I}},pushComponent:function(t,n,i){var o=t[t.length-1];o&&o.added===n&&o.removed===i?t[t.length-1]={count:o.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,o){for(var l=n.length,u=i.length,d=t.newPos,f=d-o,g=0;d+1<l&&f+1<u&&this.equals(n[d+1],i[f+1]);)d++,f++,g++;return g&&t.components.push({count:g}),t.newPos=d,f},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function e7(e,t,n,i,o){for(var l=0,u=t.length,d=0,f=0;l<u;l++){var g=t[l];if(g.removed){if(g.value=e.join(i.slice(f,f+g.count)),f+=g.count,l&&t[l-1].added){var y=t[l-1];t[l-1]=t[l],t[l]=y}}else{if(!g.added&&o){var m=n.slice(d,d+g.count);m=m.map(function(v,I){var L=i[f+I];return L.length>v.length?L:v}),g.value=e.join(m)}else g.value=e.join(n.slice(d,d+g.count));d+=g.count,g.added||(f+=g.count)}}var C=t[u-1];return u>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[u-2].value+=C.value,t.pop()),t}function t7(e){return{newPos:e.newPos,components:e.components.slice(0)}}var E9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,J9=/\S/,u6=new Si;u6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!J9.test(e)&&!J9.test(t)};u6.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&E9.test(t[n])&&E9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Qc=new Si;Qc.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};function n7(e,t,n){return Qc.diff(e,t,n)}var i7=new Si;i7.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var r7=new Si;r7.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ks(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ks=function(t){return typeof t}:Ks=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function uu(e){return a7(e)||s7(e)||o7(e)||l7()}function a7(e){if(Array.isArray(e))return Ju(e)}function s7(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function o7(e,t){if(!!e){if(typeof e=="string")return Ju(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ju(e,t)}}function Ju(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ `,P={d:H,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:x},Q={d:H,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":o>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:I},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",P,null),a.createVNode("path",Q,null)]),a.createVNode("span",{class:"progress-circle-text",style:y},[n==null?void 0:n.default()])])},A8=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:o,size:l,color:u,titleStyle:d,showText:f,textInside:g,theme:m}=t,y={height:`${o}px`,lineHeight:`${o}px`},C={width:`${i}%`,background:u,animationDuration:"3s"},v=(I=!0)=>(f||n.default)&&(I&&g||!I&&!g)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${l||"normal"} progress-bar`,style:y},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[v()])])]),v(!1)])};function n9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var O8=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:o,fixed:l}=this.$props,u=t((d=this.validPercent(n))==null?void 0:d.toFixed(l));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[u]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof u=="string"?o:void 0},[this.$slots.default?this.$slots.default():u])}},render(){const e=this.renderProcessInfo(),t=Te(U({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(A8,t,n9(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(P8,t,n9(e)?e:{default:()=>[e]}));const i={class:Se({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Qa=_e(O8),rh=Symbol("RadioGroup");function ah(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const sh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=xi(),o=a.inject(rh,qu),l=!M3(o),u=a.ref(!1),d=a.computed(()=>l&&o.props.disabled?!0:t.disabled);l?a.watch(()=>o.props.modelValue,m=>{u.value=m===t.label},{immediate:!0}):a.watch(()=>t.modelValue,m=>{m!==""&&(u.value=m===t.label)},{immediate:!0});const f=(m=!0)=>{u.value=m},g=m=>{var v;if(d.value)return;const y=m.target;u.value=y.checked;const C=u.value?t.label:"";n("change",C),n("update:modelValue",C),l&&o.handleChange(e.proxy),(v=i==null?void 0:i.validate)==null||v.call(i,"change"),a.nextTick(()=>{y.checked!==u.value&&(y.checked=u.value)})};return a.onMounted(()=>{l&&o.register(e.proxy)}),a.onBeforeUnmount(()=>{l&&o.unregister(e.proxy)}),{isChecked:u,isDisabled:d,setChecked:f,handleChange:g}},E8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var J8=a.defineComponent({name:"Radio",props:E8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=ah(),{isChecked:i,isDisabled:o,setChecked:l,handleChange:u}=sh();return{isFocused:e,isChecked:i,isDisabled:o,setChecked:l,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=Se({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Q8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var V8=a.defineComponent({name:"RadioButton",props:Q8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=ah(),{isChecked:i,isDisabled:o,setChecked:l,handleChange:u}=sh();return{isFocused:e,isChecked:i,isDisabled:o,setChecked:l,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=Se({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const R8={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var W8=a.defineComponent({name:"RadioGroup",props:R8,emits:["change","update:modelValue"],setup(e,t){const n=[],i=u=>{n.push(u)},o=u=>{const d=n.indexOf(u);d>-1&&n.splice(d,1)},l=u=>{const d=u.label;n.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(rh,{props:e,register:i,unregister:o,handleChange:l}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(u=>{u.setChecked(u.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const oh=Zt(J8,{Group:W8,Button:V8});var Ws=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},i=d=>{if(!e.editable)return;const f=d+1;t("changeHover",f)},o=d=>Se({"bk-is-select":d<Math.floor(l.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),l=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{class:o(f),style:u,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(f),onMouseenter:()=>i(f)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),H8=a.defineComponent({name:"Rate",components:{star:Ws},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xi(),i=a.ref(0),o=y=>{var C;!e.editable||(t("update:modelValue",y),t("change",y),(C=n==null?void 0:n.validate)==null||C.call(n,"change"))},l=y=>{i.value=y},u=Se({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},g=a.computed(()=>{const y=Math.floor(e.modelValue),C=(f.width+3)*y,v=f.width*(e.modelValue-y);return{width:`${C+v}px`}}),m={width:f.width,height:f.height};return()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(Ws,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:o,onChangeHover:l,onMouseleave:()=>l(0)},m),null):[a.createVNode(Ws,a.mergeProps({rate:5,style:g.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Ws,a.mergeProps({rate:0,editable:!1},m),null)]])}});const lh=_e(H8);var B8=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:o,pics:l,list:u,height:d,width:f}=a.toRefs(e),g=a.ref(),m=a.ref(0),y=a.ref(0),C=a.ref(0),v=a.ref(0);let I;const L=a.computed(()=>{var $;return(($=u.value)==null?void 0:$.length)>0?u.value:l.value}),k=a.computed(()=>({width:`${y.value*L.value.length}px`,transform:`translateX(-${y.value*m.value}px)`})),N=a.computed(()=>({width:`${y.value}px`,height:`${C.value}px`})),w=$=>{let ue=$;$>=L.value.length&&(ue=0),$<0&&(ue=L.value.length-1),m.value=ue,t("index-change",ue)},p=$=>{!$||window.open($,"_blank")},M=$=>["bk-swiper-img",{"bk-swiper-link":$.link},$.class],x=$=>({"background-image":`url(${$.url})`,"background-color":$.color}),S=$=>({"bk-current-index":m.value===$}),H=()=>{i.value&&(v.value=window.setTimeout(()=>{w(m.value+1),H()},o.value))},P=()=>{window.clearTimeout(v.value)},Q=()=>{var ue;const $=(ue=g.value)==null?void 0:ue.parentElement;!$||!window.ResizeObserver||(I=new ResizeObserver(()=>{ee()}),I.observe($))},O=()=>{var $;($=I.disconnect)==null||$.call(I)},E=$=>{if($===void 0)return{height:0,width:0};const ue=getComputedStyle($),fe=$.clientWidth-parseFloat(ue.paddingTop)-parseFloat(ue.paddingBottom);return{height:$.clientHeight-parseFloat(ue.paddingLeft)-parseFloat(ue.paddingRight),width:fe}},ee=()=>{var ue;const $=E((ue=g.value)==null?void 0:ue.parentElement);y.value=+f.value>0?f.value:$.width,C.value=+d.value>0?d.value:$.height};return a.watch([d,f],ee),a.onMounted(()=>{ee(),H(),Q()}),a.onBeforeUnmount(()=>{P(),O()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:g,style:N.value},[a.createVNode("hgroup",{style:k.value,class:"bk-transition bk-swiper-main"},[L.value.map($=>{var ue,fe;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(fe=(ue=n.default)==null?void 0:ue.call(n,$))!=null?fe:a.createVNode("span",{class:M($),style:x($),onClick:()=>p($.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map(($,ue)=>a.createVNode("li",{class:S(ue),onMouseover:()=>w(ue)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>w(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>w(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const uh=_e(B8),Po=Symbol("BkSelect"),ch=Symbol("BkOptionGroup");function dh(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Su(e){return{register:(i,o)=>{if(!!o){if(e.value.has(i)){console.warn(`repeat ${i}`,o);return}return e.value.set(i,o)}},unregister:i=>{e.value.delete(i)}}}function G8(e,t=200){let n,i=e;return a.customRef((o,l)=>({get(){return o(),i},set(u){clearTimeout(n),u===void 0||u===""?(i=u,l()):n=setTimeout(()=>{i=u,l()},t)}}))}function Z8(e,t){const{popoverMinWidth:n}=e;let i=null;const o=a.ref("auto"),l=a.ref(!1),u=()=>{l.value=!l.value},d=()=>{l.value=!1},f=()=>{l.value=!0},g=()=>{var m;o.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=by(t.value,g,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:l,popperWidth:o,togglePopover:u,hidePopover:d,showPopover:f}}function _8(e,t){const n=G8(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Hs(e=""){return e&&String(e).trim().toLowerCase()}var Tc=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:o}=a.toRefs(e),l=a.inject(Po,null),u=a.inject(ch,null),d=a.computed(()=>{var v;return(v=l==null?void 0:l.selected)==null?void 0:v.some(I=>I.value===o.value)}),f=a.computed(()=>l==null?void 0:l.multiple),g=a.computed(()=>(l==null?void 0:l.activeOptionValue)===o.value),m=a.computed(()=>l==null?void 0:l.showSelectedIcon),y=()=>{i.value||l==null||l.handleOptionSelected(t)},C=()=>{l.activeOptionValue=o.value};return a.onBeforeMount(()=>{l==null||l.register(o.value,t),u==null||u.register(o.value,t)}),a.onBeforeUnmount(()=>{l==null||l.unregister(o.value),u==null||u.unregister(o.value)}),Te(U({},a.toRefs(n)),{selected:d,multiple:f,isHover:g,showSelectedIcon:m,handleOptionClick:y,handleMouseEnter:C})},render(){var t,n,i;const e=Se({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(Wr,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Y8=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,o=a.inject(Po,null),l=a.reactive({groupCollapse:e.collapse,visible:!0}),u=a.ref(new Map),{register:d,unregister:f}=Su(u),g=a.computed(()=>`${e.label} (${[...u.value.values()].filter(y=>y.visible).length})`),m=()=>{!e.collapsible||e.disabled||(l.groupCollapse=!l.groupCollapse,t("update:collapse",l.groupCollapse))};return a.provide(ch,a.reactive(Te(U({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(l,"groupCollapse")}))),a.onBeforeMount(()=>{o==null||o.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{o==null||o.unregisterGroup(n.uid)}),Te(U({},a.toRefs(l)),{groupLabel:g,handleToggleCollapse:m})},render(){var i,o;const e=Se({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=Se({"bk-option-group-label":!0,collapsible:this.collapsible}),n=Se({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Mo,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(o=(i=this.$slots).default)==null?void 0:o.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),F8=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=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")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,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(Rn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Sc=_e(F8);function U8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var $8=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Po,null),{modelValue:i}=a.toRefs(e),o=a.ref(i.value),l=a.ref();a.watch(i,()=>{o.value=i.value});const u=C=>{t("remove",C)},d=()=>{t("focus")},f=()=>{var C;(C=l.value)==null||C.focus()},g=C=>{t("update:modelValue",C.target.value)},m=C=>{switch(C.code){case"Enter":{t("enter",C.target.value,C);break}}},y=n==null?void 0:n.handleGetLabelByValue;return{value:o,inputRef:l,handleRemoveTag:u,handleFocus:d,focus:f,handleInput:g,handleKeydown:m,handleGetLabelByValue:y}},render(){var e,t,n,i;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(o=>{let l;return a.createVNode(Sc,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(o.value)},U8(l=this.handleGetLabelByValue(o))?l:{default:()=>[l]})}),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":o=>this.value=o,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),X8=a.defineComponent({name:"Select",directives:{clickoutside:Hr},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.bool.def(!1),list:h.array.def([]),idKey:h.string.def("value"),displayKey:h.string.def("label"),showSelectedIcon:h.bool.def(!0)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:o,multiple:l,remoteMethod:u,loading:d,loadingText:f,noDataText:g,noMatchText:m,popoverMinWidth:y,showOnInit:C,multipleMode:v,allowCreate:I,customContent:L,showSelectedIcon:k}=a.toRefs(e),N=xi(),w=a.ref(),p=a.ref(),M=a.ref(),x=a.ref(new Map),S=a.computed(()=>[...x.value.values()]),H=a.ref(new Map),P=a.ref([]),Q=a.ref();a.watch(n,()=>{sr()},{deep:!0});const O=a.computed(()=>i.value||d.value),E=a.computed(()=>P.value.map(Ne=>yt(Ne))),ee=a.computed(()=>{const Ne=S.value.reduce((Ae,Oe)=>(Oe.disabled||Ae.push(Oe.value),Ae),[]);return Ne.length<=P.value.length&&Ne.every(Ae=>P.value.some(Oe=>Oe.value===Ae))}),$=a.computed(()=>!!H.value.size),ue=a.computed(()=>!S.value.length),fe=a.computed(()=>S.value.length&&S.value.every(Ne=>!Ne.visible)),ge=a.computed(()=>o.value&&typeof u.value=="function"),Ce=a.computed(()=>!(ne.value||ue.value||fe.value)||L.value),re=a.computed(()=>ne.value?f.value:ue.value?g.value:fe.value?m.value:""),{register:X,unregister:A}=Su(x),{register:R,unregister:q}=Su(H),{isHover:K,setHover:he,cancelHover:le}=dh(),pe=a.ref(!1),te=Ne=>{pe.value=!0,t("focus",Ne)},ve=()=>{pe.value&&t("blur"),pe.value=!1},{popperWidth:ye,isPopoverShow:Y,hidePopover:ae,showPopover:Me,togglePopover:j}=Z8({popoverMinWidth:y.value},p),W=a.computed(()=>(o.value||I.value)&&Y.value);a.watch(Y,Ne=>{Ne?(Xe(),J()):_.value=""});const J=()=>{var Oe;const Ne=P.value[0],Ae=x.value.get(Ne==null?void 0:Ne.value);Ae&&!Ae.disabled&&Ae.visible?Q.value=Ne==null?void 0:Ne.value:Q.value=(Oe=S.value.find(en=>!en.disabled&&en.visible))==null?void 0:Oe.value},G=Ne=>{!o.value||S.value.forEach(Ae=>{var Oe;Ae.visible=(Oe=Hs(String(Ae.label)))==null?void 0:Oe.includes(Hs(Ne))})},{searchKey:_,searchLoading:ne}=_8(ge.value?u.value:G,J),be=Ne=>{var Ae;Ne!==n.value&&(t("change",Ne,n.value),t("update:modelValue",Ne,n.value),(Ae=N==null?void 0:N.validate)==null||Ae.call(N,"change"))},we=()=>{O.value||(j(),t("toggle",Y.value))},ke=Ne=>{!o.value||(_.value=Ne)},Ee=(Ne,Ae)=>{const Oe=String(Ne);!I.value||!Oe||o.value&&S.value.find(oi=>Hs(String(oi.label))===Hs(Oe))||x.value.get(Oe)||(Ae.stopPropagation(),l.value?(P.value.push({value:Oe,label:Oe}),be(P.value.map(oi=>oi.value))):(P.value=[{value:Oe,label:Oe}],be(Oe),ae()),_.value="")},et=Ne=>{if(!(O.value||!Ne)){if(l.value){const Ae=P.value.findIndex(Oe=>Oe.value===Ne.value);Ae>-1?P.value.splice(Ae,1):P.value.push({value:Ne.value,label:Ne.label||Ne.value}),be(P.value.map(Oe=>Oe.value))}else P.value=[{label:Ne.label||Ne.value,value:Ne.value}],be(Ne.value),ae();Xe()}},Xe=()=>{var Ne,Ae;v.value==="tag"?(Ne=M.value)==null||Ne.focus():(Ae=w.value)==null||Ae.focus()},rt=Ne=>{Ne.stopPropagation(),P.value=[],be(l.value?[]:""),t("clear",l.value?[]:""),ae()},mn=()=>{Q.value=""},tt=()=>{ee.value?P.value=[]:S.value.forEach(Ne=>{Ne.disabled||P.value.find(Ae=>Ae.value===Ne.value)||P.value.push({value:Ne.value,label:Ne.label||Ne.value})}),be(P.value.map(Ne=>Ne.value)),Xe()},Fe=Ne=>{const{scrollTop:Ae,clientHeight:Oe,scrollHeight:en}=Ne.target;Ae+Oe===en&&t("scroll-end")},_t=Ne=>{const Ae=P.value.findIndex(Oe=>Oe.value===Ne);Ae>-1&&(P.value.splice(Ae,1),be(P.value.map(Oe=>Oe.value)))},yt=Ne=>{var Ae,Oe;return((Oe=(Ae=x.value)==null?void 0:Ae.get(Ne.value))==null?void 0:Oe.label)||Ne.label||Ne.value},sr=()=>{Array.isArray(n.value)?P.value=[...n.value.map(Ne=>({value:Ne,label:Ne}))]:n.value!==void 0&&(P.value=[{value:n.value,label:n.value}])},Zr=Ne=>{var en,oi;const Ae=S.value.filter(At=>!At.disabled&&At.visible),Oe=Ae.findIndex(At=>At.value===Q.value);if(!(!Ae.length||Oe===-1))switch(Ne.code){case"ArrowDown":{Ne.preventDefault();const At=Oe>=Ae.length-1?0:Oe+1;Q.value=(en=Ae[At])==null?void 0:en.value;break}case"ArrowUp":{Ne.preventDefault();const At=Oe===0?Ae.length-1:Oe-1;Q.value=(oi=Ae[At])==null?void 0:oi.value;break}case"Backspace":{if(!l.value||!P.value.length||_.value.length)return;P.value.pop(),be(P.value.map(At=>At.value));break}case"Enter":{if(!Y.value)Y.value=!0;else{const At=x.value.get(Q.value);et(At)}break}}},_r=({event:Ne})=>{var Oe;const{target:Ae}=Ne;((Oe=p.value)==null?void 0:Oe.contains(Ae))||p.value===Ae||(ae(),ve())};return a.provide(Po,a.reactive({multiple:l,selected:P,activeOptionValue:Q,showSelectedIcon:k,register:X,unregister:A,registerGroup:R,unregisterGroup:q,handleOptionSelected:et,handleGetLabelByValue:yt})),a.onMounted(()=>{sr(),setTimeout(()=>{C.value&&Me()})}),{selected:P,isInput:W,options:S,isDisabled:O,selectedLabel:E,isPopoverShow:Y,isHover:K,popperWidth:ye,inputRef:w,triggerRef:p,selectTagInputRef:M,searchLoading:ne,isOptionsEmpty:ue,isSearchEmpty:fe,isFocus:pe,isShowSelectContent:Ce,curContentText:re,isGroup:$,searchKey:_,setHover:he,cancelHover:le,handleFocus:te,handleTogglePopover:we,handleClear:rt,hidePopover:ae,showPopover:Me,handleToggleAll:tt,handleOptionSelected:et,handleClickOutside:_r,handleScroll:Fe,handleDeleteTag:_t,handleInputChange:ke,handleInputEnter:Ee,handleKeydown:Zr,handleSelectedAllOptionMouseEnter:mn}},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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=qt.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(Ni,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Vn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Rr,{class:"angle-up"},null),o=()=>this.multipleMode==="tag"?a.createVNode($8,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}):a.createVNode(tr,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter,onKeydown:(d,f)=>this.handleKeydown(f)},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}),l=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[o()]),u=()=>{var d,f;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ni,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.list.map(g=>a.createVNode(Tc,{value:g[this.idKey],label:g[this.displayKey]},null)),(f=(d=this.$slots).default)==null?void 0:f.call(d),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(Ni,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Gr,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>l(),content:()=>u()})])}});const Dc=Zt(X8,{Option:Tc,Group:Y8});function K8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:q8}=ir,jc=Object.assign({},q8);jc.width.default="400";jc.height.default="100%";var eM=a.defineComponent({name:"Sideslider",components:{BkModal:ir,BkButton:Ht},props:Te(U({},jc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},o=()=>{setTimeout(()=>{n("shown")},200)},l=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const u={header:()=>{var g,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(g=t.header)==null?void 0:g.call(t))!=null?m:e.title])])])},default:()=>{var g,m;return(m=(g=t.default)==null?void 0:g.call(t))!=null?m:"Content"},footer:()=>{var g,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(g=t.footer)==null?void 0:g.call(t))!=null?m:""])}},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ir,a.mergeProps(e,{maxHeight:f,class:d,style:`${e.direction}: 0;`,onHidden:l,onShown:o,onClose:i}),K8(u)?u:{default:()=>[u]})}}});const fh=_e(eM),i9={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var tM=a.defineComponent({name:"Steps",props:i9,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(g=>{var m;typeof g=="string"?f.push(g):f.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:(m=g.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...f)},o=d=>{i9.curStep=d},l=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},u=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,g)=>{const m=await e.beforeChange(d);m?f(m):g(m)}),t("update:curStep",d),t("click",d))}catch(f){console.warn(f)}};return a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),o=y=>this.curStep>y+1||this.defaultSteps[y].status==="done",l=y=>this.curStep===y+1,u=y=>{const{icon:C}=y;return C?Object.prototype.toString.call(C)==="[object Object]":typeof y=="string"},d=(y,C)=>(C.icon||(C.icon=y),!isNaN(C.icon)),f=y=>y.status==="loading",g=y=>y.status==="error",m=(y,C)=>l(y)&&this.status==="loading"||f(C)?a.createVNode(Io,{class:"bk-icon bk-steps-icon icon-loading"},null):l(y)&&this.status==="error"||g(C)?a.createVNode(Rn,{class:"bk-steps-icon"},null):o(y)?a.createVNode(Wr,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(y,C)?y+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((y,C)=>{var v,I,L;return a.createVNode("div",{class:["bk-step",y.title?"":"bk-step-no-content",o(C)?"done":"",l(C)?"current":"",l(C)&&this.status==="error"?"isError":"",y.status&&l(C)?[`bk-step-${y.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(y)?"icon":"number"}`,`bk-step-icon${y.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[(L=(I=(v=this.$slots)[C+1])==null?void 0:I.call(v))!=null?L:m(C,y)]),y.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[y.title]),y.description&&a.createVNode("div",{class:"bk-step-description",title:y.description},[y.description])]):""])})])}});const hh=_e(tM);var nM=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xi(),i=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),l=a.ref(e.modelValue!==!1),u=a.computed(()=>l.value?e.modelValue:e.value),d=a.computed(()=>{const g={[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":o.value,"is-unchecked":!o.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const m=`bk-switcher-${e.size}`;g[m]=!0}return g});a.watch(()=>e.modelValue,()=>{l.value=!0}),a.watch(()=>e.value,()=>{l.value=!1});const f=g=>{if(g.stopPropagation(),g.preventDefault(),e.disabled||i.value)return;const m=o.value?e.falseValue:e.trueValue,y=!o.value,C=()=>{var I;t("update:modelValue",m),t("change",y),(I=n==null?void 0:n.validate)==null||I.call(n,"change")};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(m),typeof v.then=="function"))return i.value=!0,v.then(()=>{C()}).finally(()=>{i.value=!1});v&&C()};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:f},[i.value?a.createVNode(vc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}});const gh=_e(nM),iM={onContentScroll:Function},rM=U({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},iM);var aM=(e,t)=>{const{renderAs:n,contentAs:i}=e,o=(d,f,g,m,y,C,v)=>{t.emit("content-scroll",[d,{translateY:y,translateX:C,pos:v}])},l=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:o,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,g,m,y,C,v,I,L,k,N,w;return a.h(n,{class:e.className},[(g=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?g:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(y=(m=t.slots).default)==null?void 0:y.call(m,{data:e.list}))!=null?C:""]),[[l,u]]),(L=(I=(v=t.slots).afterContent)==null?void 0:I.call(v))!=null?L:"",(w=(N=(k=t.slots).afterSection)==null?void 0:N.call(k))!=null?w:""])}}};function r9(e,t,n,i){let o=0,l=0,u=0,d=0;for(;o<e;o++){if(d=i(o,[o*n,(o+1)*n,"virtual"]),l+d>t){u=t-l;break}l+=d}return{startIndex:o,height:l,diffHeight:u}}function mh(e,t,n,i,o){if(!i)return;const l=i.scrollTop,u=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:g,startIndex:m,endIndex:y}=n,{offsetHeight:C}=i;let v=0,I=0,L=0;if(typeof e=="number"&&(v=Math.floor(l/e),I=Math.ceil(C/e)+v,L=l%e),typeof e=="function"){const k=r9(f,l,g,e);v=k.startIndex>0?k.startIndex:0,L=k.diffHeight,I=r9(f,C,g,e).startIndex+v+1}if(l!==d||v!==m||I!==y){const k=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(o,v,I,l,L,u,{bottom:k>=0?k:0})}}function sM(e,t,n){const{lineHeight:i=30,handleScrollCallback:o,pagination:l={},onlyScroll:u}=n.value;if(u){const C=t.scrollTop,v=t.scrollLeft,I=t.scrollHeight-t.offsetHeight-t.scrollTop;o(e,null,null,C,C,v,{bottom:I>=0?I:0});return}const{startIndex:d,endIndex:f,groupItemCount:g,count:m,scrollTop:y}=l;mh(i,o,{scrollTop:y,startIndex:d,endIndex:f,groupItemCount:g,count:m},t,e)}const ph=(e=60)=>qt.exports.throttle((t,n,i)=>sM(t,n,i),e),oM=(e,t,n,i=60)=>{Reflect.apply(ph(i),globalThis,[e,t,n])};var lM={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",o=>{oM(o,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",ph)}}},uM=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:lM},props:rM,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,o=H=>typeof H=="string"?[H]:typeof H=="object"&&!Array.isArray(H)?[H]:H;if(!e.enabled){const{rendAsTag:H}=aM(e,t);return H}const l=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(H,P,Q,O,E,ee,$)=>{u.startIndex=P,u.endIndex=Q,u.scrollTop=O,u.translateY=E,u.translateX=ee,u.pos=$,t.emit("content-scroll",[H,u])};a.onMounted(()=>{a.nextTick(()=>{y(e.list),C()})}),a.watch(()=>e.list,()=>{f(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),C()});const f=()=>{y(e.list)},g=a.ref(0),m=a.ref(0),y=H=>{if(g.value=Math.ceil((H||[]).length/e.groupItemCount),u.count=g.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 Q=0;for(let O=0;O<g.value;O++){const E=e.lineHeight.call(this,O,H.slice(O*e.groupItemCount,e.groupItemCount));Q+=typeof E=="number"?E:0}m.value=Q}else m.value=e.lineHeight*g.value;else m.value=e.abosuteHeight},C=(H=!0)=>{var Q;const P=(Q=l.value)==null?void 0:Q.parentNode;mh(e.lineHeight,d,u,P,null),H&&l.value&&l.value.scrollTo(0,0)},v=a.computed(()=>(e.list||[]).map((H,P)=>Te(U({},H),{$index:P}))),I=a.computed(()=>v.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),k=a.computed(()=>U({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"?L.value:{})),N=a.computed(()=>{const H=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:H?"none":"block"}}),w=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...o(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...o(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),x={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:u,throttleDelay:e.throttleDelay},S=()=>{f(),C()};return t.expose({reset:S}),()=>{var H,P,Q,O,E,ee,$,ue,fe,ge,Ce,re;return a.h(n||"div",{ref:l,class:w.value,style:k.value},[(Q=(P=(H=t.slots).beforeContent)==null?void 0:P.call(H))!=null?Q:"",a.withDirectives(a.h(i||"div",{class:p.value,style:U(U({},L.value),e.contentStyle)},[(ee=(E=(O=t.slots).default)==null?void 0:E.call(O,{data:I.value}))!=null?ee:""]),[[M,x]]),(fe=(ue=($=t.slots).afterContent)==null?void 0:ue.call($))!=null?fe:"",a.h("div",{class:[Be("virtual-section")],style:N.value}),(re=(Ce=(ge=t.slots).afterSection)==null?void 0:Ce.call(ge))!=null?re:""])}}});const Ao=_e(uM);var uo=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(uo||{});const vh=["none","row","col","outer"];var Xn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Xn||{}),Lr=(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))(Lr||{});const xn=(...e)=>!0,cM={columnPick:xn,columnFilter:xn,columnSort:xn,rowClick:xn,rowDblClick:xn,rowExpand:xn,pageLimitChange:xn,pageValueChange:xn,settingChange:xn,scrollBottom:xn},kt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},Du=4,Kn=42,Xs={large:78,medium:60,small:42},dM=[{value:"small",label:"\u5C0F",height:Xs.small},{value:"medium",label:"\u4E2D",height:Xs.medium},{value:"large",label:"\u5927",height:Xs.large}],a9=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Te(U(U({},t),e),{current:n})}return t}return{}};var fM=(e,t)=>{const n=a.ref(0),i=a.ref(0);let o=a.reactive({count:0,limit:10,current:1});o=a9(e.pagination,o);const l=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(o.current-1)*o.limit,i.value=o.current*o.limit},d=a.reactive([]),f=v=>{typeof v=="function"&&d.sort(v)},g=v=>{if(typeof v=="function"){const I=d.filter((L,k)=>v(L,k,e.data));d.splice(0,d.length,...I)}},m=(v,I)=>{d.splice(0,d.length,...t.slice(n.value,i.value)),g(v),f(I)},y=(v,I)=>{o=a9(e.pagination,o),C(),u(),m(v,I)},C=()=>{!e.pagination||(l.value=e.remotePagination?o:Te(U({},o),{count:e.data.length}))};return{pageData:d,localPagination:l,resolvePageData:m,watchEffectFn:y}},hM=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:On.Normal,mode:er.Default,indicator:null}:n.value,o=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var u,d,f;if(o.value){const{loading:g,size:m,mode:y,title:C,inline:v,indicator:I}=i();return(f=(d=(u=t.slots).fixedBottom)==null?void 0:d.call(u))!=null?f:a.createVNode(Ni,{loading:g,size:m,mode:y,title:C,inline:v,indicator:I},null)}}}},yh=(e=>(e.CURRENT="current",e.ALL="all",e))(yh||{});const gM={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(yh)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def(Kn*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def(Kn),headHeight:h.number.def(Kn),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def(Kn),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(vh,"border")).def([uo.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(kt.ROW_INDEX)};function mM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var pM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,o=>{t.value=o}),a.watch(()=>e.limitList,o=>{a.nextTick(()=>{o.includes(t.value)||([t.value]=o)})},{immediate:!0});const n=o=>{t.value=o};return{limit:t,render:({isFirst:o,isLast:l})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":o,"is-last":l}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Dc,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},mM(u=e.limitList.map((d,f)=>a.createVNode(Tc,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Wi=5;var vM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),o=a.ref(!1),l=a.ref(!1),u=a.computed(()=>{o.value=!1,l.value=!1;const v=[];if(e.totalPageNum<=Wi+2){for(let k=2;k<=e.totalPageNum-1;k++)v.push(k);return v}const I=Math.floor(Wi/2);e.totalPageNum>Wi&&(o.value=t.value-I>2,l.value=t.value+I<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Wi,Math.max(2,t.value-I));for(let k=L;k<L+Wi;k++)v.push(k);return v});a.watch(()=>e.modelValue,v=>{a.nextTick(()=>{v>=1&&v<=e.totalPageNum?t.value=v:v<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,v=>{t.value>v&&(t.value=v)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},g=v=>{v!==t.value&&(t.value=v)},m=()=>{t.value=Math.max(1,t.value-Wi)},y=()=>{t.value=Math.min(e.totalPageNum,t.value+Wi)};return{current:t,render:({isFirst:v,isLast:I})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":v,"is-last":I}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(qi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>g(1)},[a.createTextVNode("1")]),o.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(ro,null,null)]),u.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>g(L)},[L])),l.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:y},[a.createVNode(ro,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>g(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(Jn,null,null)])])}},yM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),o=a.computed(()=>i.value===1),l=a.computed(()=>i.value===e.totalPageNum);let u=0;const d=a.computed(()=>{const k=[];for(let N=1;N<=e.totalPageNum;N++)k.push(N);return k});a.watch(()=>e.modelValue,k=>{a.nextTick(()=>{k>=1&&k<=e.totalPageNum?i.value=k:k<1?i.value=1:i.value=e.totalPageNum,u=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,k=>{i.value>k&&(i.value=k)})});const f=()=>{o.value||(i.value=i.value-1)},g=()=>{l.value||(i.value=i.value+1)},m=()=>{n.value=!0},y=()=>{n.value=!1,t.value.textContent=`${u}`,u!==i.value&&(i.value=u)},C=k=>{const N=k.target,w=Number(N.textContent);!w||w<1||w>e.totalPageNum||w===i.value||(u=w)},v=k=>{["Enter","NumpadEnter"].includes(k.code)&&(k.preventDefault(),y())},I=k=>{u=k,y()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":o.value},onClick:f},[a.createVNode(mc,null,null)]),a.createVNode(rr,{theme:"light",trigger:"click",arrow:!1,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:y,onInput:C,onKeydown:v},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(k=>a.createVNode("div",{class:{item:!0,"is-actived":k===i.value},key:k,onClick:()=>I(k)},[k]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":l.value},onClick:g},[a.createVNode(Ga,null,null)])])}},bM=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const CM={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var MM=a.defineComponent({name:"Pagination",props:CM,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:o}=a.toRefs(e),l=bM(),{current:u,render:d}=vM(),{current:f,render:g}=yM(),{limit:m,render:y}=pM();return a.watch([i,m,o],([C,v])=>{const I=Math.ceil(C/v);n.value=I<1?1:I},{immediate:!0}),a.watch(u,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(f,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(m,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:l,renderList:d,renderLimit:y,renderSmallList:g}},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((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const zc=_e(MM);var iu=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),IM=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Do,{scene:"part",type:n.value},{default:()=>{var i,o;return[(o=(i=t.default)==null?void 0:i.call(t))!=null?o:e.emptyText]}})}});const It=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>It(e,i,n)).filter(i=>i!==void 0).at(0)},ru=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],wM=e=>bh(e,"auto"),bh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},NM=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>vh.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Sa=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},au=(e,t,n=20,i=0)=>{const{width:o}=e.getBoundingClientRect()||{},l=o-i;let u=l;const d=[],f=(m,y)=>{const{minWidth:C=void 0}=m;if(C===void 0)return y;let v=y;return/^\d+\.?\d*$/.test(`${C}`)&&(v=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(v=Number(C)*l/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(v=Number(`${C}`.replace(/px/i,""))),v},g=(m,y,C=!0)=>{const v=f(m,y),I=y<v?v:y;Object.assign(m,{calcWidth:I}),C&&(u=u-I,u<0&&(u=0))};if(t.forEach((m,y)=>{if(!m.isHidden){const v=String(Sa(m,["resizeWidth","width"]));let I=!0;if(/^\d+\.?\d*(px)?$/.test(v)){const L=Number(v.replace("px",""));g(m,L),I=!1}if(/^\d+\.?\d*%$/.test(v)){let L=n;if(u>0){const k=Number(v.replace("%",""));L=u*k/100}g(m,L),I=!1}I&&d.push(y)}}),d.length>0){let m=n;u>0&&(m=u/d.length,d.forEach(y=>g(t[y],m,!1)))}},LM=(e,t,n=60,i=!1)=>{const o=qt.exports.throttle(()=>{typeof t=="function"&&t()},n),l=new ResizeObserver(()=>{o()});return i&&typeof t=="function"&&t(),{start:()=>{l.observe(e)},stop:()=>{l.disconnect(),l.unobserve(e)}}},ju=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},U({},i))},Pc=(e,t,n)=>n.type==="index"?e[kt.ROW_INDEX]+1:qt.exports.get(e,t),ba=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?ba(Reflect.apply(e,globalThis,t),t):[],kM=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===kt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((o,l)=>Object.prototype.hasOwnProperty.call(o,l)?o[l]:o,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),xM=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function TM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var SM=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),o=a.computed(()=>Se({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),l=Se({[Be("table-head-filter")]:!0}),u=C=>{i.isOpen=C},d=`light ${Be("table-head-filter")}`,f=a.computed(()=>{const{list:C=[]}=n.filter;return C.map(v=>Te(U({},v),{checked:i.checked.includes(v.value)}))}),g=typeof n.filter.filterFn=="function"?(C,v,I,L)=>n.filter.filterFn(C,v,e.column,I,L):(C,v)=>C.length?C.includes(Pc(v,It(n,"field",[n,v]),n)):!0,m=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],g),i.isOpen=!1},y=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,g)))};return()=>a.createVNode(Gr,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>u(!0),onAfterHidden:()=>u(!1)}),{default:()=>a.createVNode(tc,{class:o.value},null),content:()=>{let C;return a.createVNode("div",{class:l},[a.createVNode(Ic,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":v=>i.checked=v},TM(C=f.value.map(v=>a.createVNode("div",{class:"list-item"},[a.createVNode(nr,{label:v.value},{default:()=>[v.text]})])))?C:{default:()=>[C]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:m},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:y},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Mi=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Mi||{}),DM=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(o,l)=>{var y,C;if(o.stopImmediatePropagation(),o.stopPropagation(),o.preventDefault(),n.value===l?n.value=Mi.NULL:n.value=l,e.column.sort==="custom"){t("change",null,l);return}const u=e.column.field,d=v=>Pc(v,u,e.column),f=(v,I)=>{const L=d(v),k=d(I);return typeof L=="number"&&typeof k=="number"?L-k:String.prototype.localeCompare.call(L,k)},g=typeof((y=e.column.sort)==null?void 0:y.sortFn)=="function"?(C=e.column.sort)==null?void 0:C.sortFn:f,m=n.value===Mi.NULL?()=>!0:(v,I)=>g(v,I)*(l===Mi.DESC?-1:1);t("change",m,l)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(ec,{class:["sort-action","sort-asc",n.value===Mi.ASC?"active":""],onClick:o=>i(o,Mi.ASC)},null),a.createVNode(Mo,{class:["sort-action","sort-desc",n.value===Mi.DESC?"active":""],onClick:o=>i(o,Mi.DESC)},null)])}});class jM{constructor(t,n){Mr(this,"props",null);Mr(this,"ctx",null);this.props=t,this.ctx=n}}function s9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var zM=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const n=dM,i=a.ref(!1),o=a.ref(!1),l=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(O=>Te(U({},O),{field:O.field||O.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),u=a.ref(l.value.size||"small"),d=a.ref(e.rowHeight),f=a.ref(l.value.checked),m=`light ${Be("table-settings")}`,y={checkAll:i.value,activeSize:u.value,activeHeight:d.value},C=()=>{t("change",{checked:f.value,size:u.value,height:d.value}),o.value=!1},v=()=>{i.value=y.checkAll,u.value=y.activeSize,d.value=y.activeHeight,f.value=l.value.checked||[],o.value=!1},I=()=>{Object.assign(y,{checkAll:i.value,activeSize:u.value,activeHeight:d.value}),o.value=!0},L=O=>{O.stopImmediatePropagation(),O.stopPropagation(),O.preventDefault(),i.value=!i.value;const E=l.value.fields||e.columns||[];if(i.value)f.value=E.map((ee,$)=>It(ee,"field",[ee,$]));else{const ee=E.filter($=>$.disabled).map(($,ue)=>It($,"field",[$,ue]));f.value.splice(0,f.value.length,...ee)}},k=a.computed(()=>{var O;return((O=l.value.limit)!=null?O:0)>0}),N=l.value.sizeList||n,w=a.computed(()=>k.value&&(l.value.limit?l.value.limit:0)<=f.value.length),p=(O,E)=>O.disabled||w.value&&!f.value.includes(It(O,"field",[O,E])),M=O=>{u.value=O.value,d.value=O.height},x=O=>({"line-size":!0,"is-medium":u.value==="medium",active:O.value===u.value}),S={marginRight:"12px"},H=()=>N.map(O=>a.createVNode("span",{class:x(O),onClick:()=>M(O)},[O.label])),P=a.computed(()=>l.value.fields||e.columns||[]),Q=a.computed(()=>f.value.length>0&&!P.value.every((O,E)=>f.value.includes(It(O,"field",[O,E]))));return a.watch(()=>[f.value],()=>{f.value.length||(i.value=!1),f.value.length&&P.value.every((O,E)=>f.value.includes(It(O,"field",[O,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...l.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Gr,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(sc,{style:"color: #c4c6cc;",onClick:I},null)]),content:()=>{let O;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(wo,{class:"icon-close-action",onClick:v},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),l.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(nr,{label:"\u5168\u9009",indeterminate:Boolean(Q.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Ic,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":E=>f.value=E},s9(O=P.value.map((E,ee)=>{let $;return a.createVNode("div",{class:"field-item"},[a.createVNode(nr,{label:It(E,"field",[E,ee]),checked:f.value.includes(It(E,"field",[E,ee])),disabled:p(E,ee)},s9($=It(E,"label",[E,ee]))?$:{default:()=>[$]})])}))?O:{default:()=>[O]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),H()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Ht,{theme:"primary",style:S,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Ht,{style:S,onClick:v},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),zu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?Kn:0),o=y=>({column_fixed:!!y.fixed,column_fixed_left:y.fixed!=="right",column_fixed_right:y.fixed==="right"}),l=y=>y.fixed==="right"?"right":"left",u={left:(y=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,v,I)=>y&&I===0?C:C+Sa(v),0),right:(y=!0)=>t.filter(C=>C.fixed==="right").reduce((C,v,I)=>y&&I===0?C:C+Sa(v),n?Du:0)},d=u.right,f=()=>{const y=(I,L)=>{if(!I.fixed)return{};const k=l(I),N=k==="right"?-1:1,w=`${L[k]}px`;return L[k]=L[k]+Sa(I)*N,{[k]:w}},C=d(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:y}},g=()=>{const y=v=>({width:`${u[v](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const I=l(v),L=C[I];return C[I]=!0,L?"":a.createVNode("div",{class:o(v),style:y(I)},null)})},m=Be("table-fixed");return{renderFixedColumns:g,fixedWrapperClass:m,getFixedColumnStyleResolve:f}};class PM{constructor(t,n,i,o){Mr(this,"getRowHeight",(t,n)=>{const{size:i,height:o}=this.setting;return o!=null?It(this.setting,"height",["tbody",t,n,i]):It(this.props,"rowHeight",["tbody",t,n])});Mr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Mr(this,"getHeadColumnClass",(t,n)=>Te(U({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=o,this.plugins=new jM(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=ju(this.props);if(!t)return null;const n=i=>{const{checked:o=[],size:l,height:u}=i;this.reactiveProp.setting.size=l,this.reactiveProp.setting.height=u,o.length&&this.colgroups.forEach(d=>{d.isHidden=!(o!=null?o:[]).includes(It(d,["field","type"],[d]))}),this.emitEvent(Xn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(zM,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,o;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(o=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?o:a.createVNode(IM,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(zc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(o=>o.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(o=>o.index!==t&&o.active).forEach(o=>{Object.assign(o,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(o,l)=>{this.emitEvent(Xn.ON_SORT_BY_CLICK,[{sortFn:o,column:t,index:n,type:l}])};return a.createVNode(DM,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(o,l)=>{const u=(d,f)=>l(o,d,f);this.emitEvent(Xn.ON_FILTER_CLICK,[{filterFn:u,checked:o,column:t,index:n}])};return a.createVNode(SM,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=ju(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},o=(g,m)=>{const y=[];return g.sort&&y.push(this.getSortCell(g,m)),g.filter&&y.push(this.getFilterCell(g,m)),typeof n=="function"?(y.unshift(n(g,m)),y):(y.unshift(It(g,"label",[g,m])),y)},l=g=>Array.from(g.listeners.keys()).reduce((m,y)=>{const C=y.split("_").slice(-1)[0];return Object.assign(m,{[C]:v=>{g.listeners.get(y).forEach(I=>Reflect.apply(I,this,[v,g,this]))}})},{}),{getFixedColumnStyleResolve:u}=zu(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedoffset:f}=u();return a.createVNode("thead",{style:i},[a.createVNode(iu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((g,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(g,m),style:d(g,f),onClick:()=>this.handleColumnHeadClick(m)},l(g)),[a.createVNode("div",{class:"cell"},[o(g,m)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=zu(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,o)=>{const l=[...ba(this.props.rowStyle,[i,o,this]),{"--row-height":`${this.getRowHeight(i,o)}px`}],u=[...ba(this.props.rowClass,[i,o,this])],{resolveFixedColumnStyle:d,fixedoffset:f}=n(),g=`${this.uuid}-${i[kt.ROW_UID]}`;return[a.createVNode(iu,{key:g},{default:()=>[a.createVNode("tr",{style:l,class:u,onClick:m=>this.handleRowClick(m,i,o,t),onDblclick:m=>this.handleRowDblClick(m,i,o,t)},[this.filterColgroups.map((m,y)=>{const C=[d(m,f),...ba(this.props.cellStyle,[m,y,i,o,this])],v=[this.getColumnClass(m,y),...ba(this.props.cellClass,[m,y,i,o,this]),{"expand-row":i[kt.ROW_EXPAND]}],I={cell:!0,"expand-cell":m.type==="expand"},L=`__CELL_${o}_${y}`;return a.createVNode("td",{class:v,style:C,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:I},[this.renderCell(i,m,o,t)])])})])]}),this.renderExpandRow(i,u)]})])}renderExpandRow(t,n){if(!!t[kt.ROW_EXPAND]){const o=[...n,{row_expend:!0}],l=`${this.uuid}-${t[kt.ROW_UID]}_expand`;return a.createVNode(iu,{key:l},{default:()=>{var u,d,f;return[a.createVNode("tr",{class:o},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(u=this.context.slots).expandRow)==null?void 0:d.call(u,t))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,o){this.context.emit("rowClick",t,n,i,o,this)}handleRowDblClick(t,n,i,o){this.context.emit("rowDblClick",t,n,i,o,this)}getExpandCell(t){return!!t[kt.ROW_EXPAND]?a.createVNode(No,null,null):a.createVNode(Ga,null,null)}handleRowExpandClick(t,n,i,o,l){this.emitEvent(Xn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:o,e:l}])}renderCell(t,n,i,o){if(n.type==="expand"){const u=()=>{var d,f,g;return typeof n.render=="function"?n.render(null,t,i,o):(g=(f=(d=this.context.slots).expandCell)==null?void 0:f.call(d,{row:t,column:n,index:i,rows:o}))!=null?g:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,o,d)},[u()])}const l=Pc(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const u=this.props.data[t[kt.ROW_INDEX]];return n.render({cell:l,data:u,row:t,column:n,index:i,rows:o})}return l}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=Se({active:this.isColActive(n)}),o=`${wM(Sa(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:o},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const o9=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:ru(e.activeColumn):Array.isArray(e.activeColumn)?ru(e.activeColumn[0]):ru(e.activeColumn):[];var AM=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(o9(e)),i=()=>(e.columns||[]).map((o,l)=>({index:l,active:n.some(u=>u===l),_column:o}));return a.watchEffect(()=>{t=i();const o=o9(e);t.forEach((l,u)=>{Object.assign(l,{active:o.some(d=>d===u)})})}),{activeColumns:t}},OM=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let o=!1,l=!1,u=!1,d=0,f=null,g=0;const m=a.ref(-1e3),y=p=>{var H;l=!1,u=!1;const M=document.body.style;M.cursor="";const x=p.clientX-d;f.resizeWidth=((H=f.resizeWidth)!=null?H:f.calcWidth)+x,document.removeEventListener("mouseup",y),document.removeEventListener("mousemove",v),d=0,m.value=-1e3,f=null,p.target.closest("table").querySelectorAll("th").forEach(P=>P.style.setProperty("user-select","inherit"))},C=p=>qt.exports.throttle(()=>{m.value=p.clientX-d+g},60),v=p=>{document.body.style.setProperty("cursor",""),C(p)()},I={[i.MOUSE_DOWN]:(p,M)=>{if(!o)return;l=!0,document.body.style.setProperty("cursor","col-resize"),f=M,d=p.clientX;const S=p.target.closest("table");g=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",y),document.addEventListener("mousemove",v)},[i.MOUSE_MOVE]:(p,M)=>{l&&!u&&(u=!0);const x=p.target.closest("th");if(u&&x.style.setProperty("user-select","none"),!u){if(!x)return;const S=x.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(o=!0,x.style.setProperty("cursor","col-resize")):(x.style.setProperty("cursor",""),o=!1)}},[i.MOUSE_OUT]:(p,M)=>{const x=p.target;u||x.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,k=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(I).forEach(M=>{const x=L(M);p.listeners.has(x)||p.listeners.set(x,[]),p.listeners.get(x).push(I[M])})})},N=()=>{e.forEach(p=>{Object.keys(I).forEach(M=>{const x=L(M);if(p.listeners.has(x)){const S=p.listeners.get(x);S.splice(0,S.length)}})})};t&&k();const w=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:N,dragOffsetX:m,dragOffsetXStyle:w}};const EM=(e,t,n,i)=>{const o=a.ref(200),l=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>Se({[Be("table")]:!0,"has-footer":u.value,"has-scroll-y":l.value||e.virtualEnabled},NM(e.border))),f=Se({[Be("table-head")]:!0,"has-settings":!!e.settings}),g=ju(e),m=a.computed(()=>({"--row-height":`${It(g,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),y={[Be("table-body")]:!0},C=a.computed(()=>Se({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),v=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((P,Q)=>P+Number(`${Q.width}`.replace(/px/ig,"")),0),H=l.value?Du:0;return`${S+H}px`}return"100%"},I=a.computed(()=>({minHeight:bh(e.minHeight,"auto"),width:v(),maxWidth:"100%"})),L=(S,H)=>{const P=String(S);if(/^\d+\.?\d*$/.test(P))return Number(P);if(/^\d+\.?\d*px$/ig.test(P))return Number(P.replace("px",""));if(/^\d+\.?\d*%$/ig.test(P)&&typeof H=="number"){const Q=Number(P.replace("%",""));return H*Q/100}return H},k=a.reactive({}),N=()=>e.showHead?L(e.headHeight,Kn):0,w=()=>{const S=L(e.height,o.value),H=N(),P=L(e.minHeight,o.value),Q=e.pagination&&e.data.length?Kn:0,O=S-H-Q,E=e.height!=="auto"?`${O}px`:!1,ee=P-H-Q,$=L(e.maxHeight,void 0),ue=typeof $=="number"?`${$-H-Q}px`:!1;Object.assign(k,{display:i!=null&&i.length?"block":!1,"min-height":`${ee}px`,height:E,maxHeight:ue})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:H}=S.parentElement.getBoundingClientRect();o.value=H,w(),M(S)}},M=S=>{const H=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,P=S.querySelector(".bk-table-body");l.value=xM(P,H,0)};return{tableClass:d,headClass:f,contentClass:y,footerClass:C,wrapperStyle:I,contentStyle:k,headStyle:m,resetTableHeight:p,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let S=0;return l.value&&(S=S+Du),e.border.includes(uo.OUTER)&&!e.border.includes(uo.NONE)&&(S=S+2),S},hasFooter:u,hasScrollY:l}},JM=e=>{var k,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(w=>Te(U({},w),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:o,resetResizeEvents:l,registerResizeEvent:u}=OM(t,!0),{activeColumns:d}=AM(e);a.watch(()=>e.columns,()=>{n(),l(),u()},{immediate:!0,deep:!0});const f=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(k=e.settings)==null?void 0:k.size,height:Xs[(N=e.settings)==null?void 0:N.size]}}),g=w=>{var p;return f.rowActions.has(w)?(p=f.rowActions.get(w))==null?void 0:p.isExpand:!1},m=(w,p=void 0)=>{var S;const M=w[kt.ROW_UID],x=typeof p=="boolean"?p:!g(M);f.rowActions.set(M,Object.assign({},(S=f.rowActions.get(M))!=null?S:{},{isExpand:x})),v()},y=a.reactive([]),C=(w=!1)=>{y.splice(0,y.length,...e.data.map((p,M)=>{const x=kM(p,e,M);return Te(U({},p),{[kt.ROW_INDEX]:M,[kt.ROW_UID]:x,[kt.ROW_EXPAND]:w?g(x):!1})}))},v=()=>{y.forEach(w=>{Object.assign(w,{[kt.ROW_EXPAND]:g(w[kt.ROW_UID])})})},{renderFixedColumns:I,fixedWrapperClass:L}=zu(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:o,reactiveSchema:f,indexData:y,fixedWrapperClass:L,initIndexData:C,updateIndexData:v,renderFixedColumns:I,setRowExpand:m,updateColGroups:n}};var QM=a.defineComponent({name:"Table",props:gM,emits:cM,setup(e,t){let n=null,i=null,o=null;const l=a.ref(),u=a.ref(),{colgroups:d,dragOffsetXStyle:f,dragOffsetX:g,reactiveSchema:m,indexData:y,renderFixedColumns:C,setRowExpand:v,initIndexData:I,fixedWrapperClass:L}=JM(e),{pageData:k,localPagination:N,resolvePageData:w,watchEffectFn:p}=fM(e,y),{tableClass:M,headClass:x,contentClass:S,footerClass:H,wrapperStyle:P,contentStyle:Q,headStyle:O,updateBorderClass:E,resetTableHeight:ee,getColumnsWidthOffsetWidth:$,hasFooter:ue}=EM(e,l,m,k),fe=new PM(e,t,m,d);a.watch(()=>[e.data,e.pagination],()=>{I(e.reserveExpand),p(i,n),a.nextTick(()=>{ee(l.value),E(l.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((l==null?void 0:l.value)instanceof HTMLElement){const le=$();au(l.value,d,20,le)}}),fe.on(Xn.ON_SORT_BY_CLICK,le=>{var Y,ae;const{sortFn:pe,column:te,index:ve,type:ye}=le;typeof pe=="function"&&(n=pe,w(i,n),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y)),t.emit(Lr.COLUMN_SORT,{column:te,index:ve,type:ye})}).on(Xn.ON_FILTER_CLICK,le=>{var Y,ae;const{filterFn:pe,checked:te,column:ve,index:ye}=le;typeof pe=="function"&&(i=pe,w(i,n),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y)),t.emit(Lr.COLUMN_FILTER,{checked:te,column:ve,index:ye})}).on(Xn.ON_SETTING_CHANGE,le=>{const{checked:pe=[],size:te,height:ve}=le;a.nextTick(()=>{var Y,ae;E(l.value);const ye=$();pe.length&&au(l.value,d,20,ye),(ae=(Y=u.value)==null?void 0:Y.reset)==null||ae.call(Y),t.emit(Lr.SETTING_CHANGE,{checked:pe,size:te,height:ve})})}).on(Xn.ON_ROW_EXPAND_CLICK,le=>{const{row:pe,column:te,index:ve,rows:ye,e:Y}=le;t.emit(Lr.ROW_EXPAND_CLICK,{row:pe,column:te,index:ve,rows:ye,e:Y}),v(pe,!pe[kt.ROW_EXPAND])});const ge=le=>{var Me;const pe=(Me=m.pos.bottom)!=null?Me:0,te=le[1],{translateX:ve,translateY:ye,pos:Y={}}=te;m.scrollTranslateY=ye,m.scrollTranslateX=ve,m.pos=Y;const{bottom:ae}=Y;ae<=2&&pe>ae&&_y(60,()=>{t.emit(Lr.SCROLL_BOTTOM,Te(U({},Y),{translateX:ve,translateY:ye}))},!0)()};a.onMounted(()=>{o=LM(l.value,()=>{(e.height==="100%"||e.height==="auto")&&ee(l.value),E(l.value);const le=$();au(l.value,d,20,le)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,fe.destroy()}),t.expose({setRowExpand:v});const Ce=a.computed(()=>Te(U({},S),{"__is-empty":!k.length})),re={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},X={column_drag_line:!0,"offset-x":!0},A=a.computed(()=>Te(U({},f.value),{left:`${g.value-m.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},q={[Be("fixed-bottom-border")]:!0,"_is-empty":!e.data.length},{renderScrollLoading:K}=hM(e,t),he=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:M.value,style:P.value,ref:l},[a.createVNode("div",{class:x,style:O.value},[fe.renderTableHeadSchema()]),a.createVNode(Ao,a.mergeProps({ref:u,lineHeight:fe.getRowHeight,class:Ce.value,style:Q,list:k},he,{contentClassName:re,onContentScroll:ge,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:le=>fe.renderTableBodySchema(le.data||e.data),afterSection:()=>a.createVNode("div",{class:q},null)}),a.createVNode("div",{class:L},[C(),a.createVNode("div",{class:X,style:A.value},null),a.createVNode("div",{class:R},[K()])]),a.createVNode("div",{class:H.value},[ue.value&&fe.renderTableFooter(N.value)])])}});const Ch=_e(QM),Ir=12;function VM(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(o=[])=>{t.curPage=1,t.totalSize=o.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const l=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)l.push(o.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...l),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:o=>{t.curPage=o,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function RM(e){const{useGroup:t,saveKey:n,displayKey:i,list:o}=a.toRefs(e),l=a.reactive({flatList:[]});return a.watch([t,n,i,o],()=>{l.flatList=[];let u=o.value;t.value&&(u=o.value.reduce((d,f)=>{let g=[];return f.children&&(g=f.children.map(m=>U({group:{groupId:f[n.value],groupName:f[i.value]}},m))),d.concat(g)},[])),l.flatList=[...u]},{immediate:!0,deep:!0}),l.flatList}const l9=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n};var u9=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.string,tpl:{type:Function,default:null}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const WM=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.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 HM=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.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]])])}}),BM=a.defineComponent({name:"TagInput",directives:{bkTooltips:Nc},props:WM(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=xi(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:l}=a.toRefs(e),{pageState:u,initPage:d,pageChange:f}=VM(l),g=a.ref(""),m=a.ref(null),y=a.ref(null),C=a.ref(null),v=a.ref(null),I=a.ref(null),L=a.ref(null),k=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),w=a.computed(()=>e.maxData===1),p=a.computed(()=>O.selectedTagList.length===0&&g.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&O.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),x=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{ue()}),a.watch(g,qt.exports.debounce(()=>{const G=u.curPageList.length!==0,{value:_}=g;_!==""&&G||_===""&&e.trigger==="focus"&&G?o.isShow=!0:(e.trigger!=="focus"||!G)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,G=>{S(),G&&I.value&&(a.nextTick(()=>{I.value.scrollTop=0}),I.value.removeEventListener("scroll",H),I.value.addEventListener("scroll",H))});const S=()=>{var _,ne;const G=w.value?0:(_=v.value)==null?void 0:_.offsetLeft;o.modifiers=[{name:"offset",options:{offset:[G,4]}}],(ne=L.value)==null||ne.update()},H=()=>{if(u.isPageLoading||I.value.scrollTop===0)return;const{scrollTop:G,offsetHeight:_,scrollHeight:ne}=I.value;if(G+_>=ne){const be=u.curPage+1;be<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f(be)},500))}},P=()=>{var _;return Array.from(((_=C.value)==null?void 0:_.childNodes)||[]).filter(ne=>ne.nodeType!==Node.TEXT_NODE)},Q=G=>{if(!e.disabled){if(G!=null&&G.target){const{className:_}=G.target;(_.indexOf("bk-tag-input-trigger")>-1||_.indexOf("tag-list")>-1)&&C.value.appendChild(v.value)}clearTimeout(k.value),w.value&&E.value.length&&(O.tagListCache=[...E.value],O.selectedTagListCache=[...O.selectedTagList],g.value=O.selectedTagListCache[0][e.saveKey],J(O.selectedTagList[0],0),R()),i.isEdit=!0,a.nextTick(()=>{var _;(_=m.value)==null||_.focus(),e.trigger==="focus"&&O.localList.length!==0&&(fe(),o.isShow?S():o.isShow=!0)})}},O=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>O.selectedTagList.map(G=>G[e.saveKey])),ee=RM(e),$=a.computed(()=>{if(e.useGroup){const G={};return u.curPageList.forEach((_,ne)=>{_.__index__=ne,G[_.group.groupId]||(G[_.group.groupId]={id:_.group.groupId,name:_.group.groupName,children:[]}),G[_.group.groupId].children.push(_)}),Object.keys(G).map(_=>G[_])}return u.curPageList}),ue=()=>{const{saveKey:G,modelValue:_,displayKey:ne,allowCreate:be,trigger:we}=e;O.selectedTagList=[],O.localList=[...ee],_.length&&(_.forEach(ke=>{const Ee=O.localList.find(et=>ke===et[G]);Ee!==void 0?O.selectedTagList.push(Ee):be&&!E.value.includes(ke)&&O.selectedTagList.push({[G]:ke,[ne]:ke})}),w.value||(O.localList=O.localList.filter(ke=>!_.includes(ke[G])))),we==="focus"&&fe()},fe=(G="")=>{const{searchKey:_,filterCallback:ne}=e,be=G.toLowerCase();let we=[];if(typeof ne=="function")we=ne(be,_,O.localList)||[];else if(Array.isArray(_)){const ke=_.map(Ee=>O.localList.filter(et=>et[Ee].toLowerCase().indexOf(be)!==-1));we=Array.from(new Set(ke.flat()))}else we=O.localList.filter(ke=>ke[_].toLowerCase().indexOf(be)!==-1);d(we)},ge=(G,_)=>{const ne={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(G[e.saveKey])};return e.useGroup?ne["bk-selector-actived"]=G.__index__===i.focusItemIndex:ne["bk-selector-actived"]=_===i.focusItemIndex,ne};a.onMounted(()=>{ue()});const Ce=()=>{O.tagListCache=[],O.selectedTagListCache=[],O.selectedTagList=[]},re=()=>{g.value=""},X=()=>{if(w.value)return 0;const _=P().findIndex(({id:ne})=>ne==="tagInputItem");return _>=0?_:0},A=(G,_,ne=!1)=>{if(!_||!G)return;let be=_;ne&&(be=_.nextElementSibling||null),_.parentNode.insertBefore(G,be)},R=G=>{const{maxData:_,trigger:ne,allowCreate:be}=e;if(_===-1||_>E.value.length){const{value:we}=G!=null&&G.target?G.target:g,ke=l9(we);ke?(fe(we),m.value.style.width=`${ke*Ir}px`):ne==="focus"&&fe()}else K(),g.value="",o.isShow=!1;i.isEdit=!0,i.focusItemIndex=be?-1:0},q=()=>{var G;o.width=w.value?(G=y.value)==null?void 0:G.clientWidth:e.contentWidth},K=()=>{k.value=setTimeout(()=>{var _;const G=g.value;if(re(),i.isEdit=!1,w.value){const[ne]=O.tagListCache;G&&G===ne&&O.selectedTagListCache.length?W(O.selectedTagListCache[0],"select"):pe("remove")}else if(e.allowAutoMatch&&G){const ne=u.curPageList.find(be=>Array.isArray(e.searchKey)?e.searchKey.map(ke=>be[ke]).includes(G):be[e.searchKey]===G);ne?he(ne,"select"):e.allowCreate&&he(G,"custom")}o.isShow=!1,t("blur",G,E.value),(_=n==null?void 0:n.validate)==null||_.call(n,"blur")},200)},he=(G,_,ne)=>{ne==null||ne.stopPropagation(),!(!G||G.disabled)&&(w.value&&Ce(),W(G,_),pe("select"),re(),o.isShow=!1)},le=(G,_,ne)=>{ne==null||ne.stopPropagation(),J(G,_),re(),pe("remove",G),m.value.style.width=`${Ir}px`},pe=(G,_)=>{var ne;t("change",E.value),t(G,_),t("update:modelValue",E.value),(ne=n==null?void 0:n.validate)==null||ne.call(n,"change")},te=G=>{G.stopPropagation();const _=O.selectedTagList;O.selectedTagList=[];const ne=ee.filter(be=>_.some(we=>we[e.saveKey]===be[e.saveKey]));(e.allowCreate&&ne.length!==0||!e.allowCreate)&&!w.value&&O.localList.push(...ne),pe("removeAll")},ve=()=>{const G={height:I.value.clientHeight,yAxis:I.value.getBoundingClientRect().y};a.nextTick(()=>{const _=I.value.querySelector(".bk-selector-actived");if(!_)return;const ne={height:_.clientHeight,yAxis:_.getBoundingClientRect().y};ne.yAxis<G.yAxis&&(I.value.scrollTop=I.value.scrollTop-(G.yAxis-ne.yAxis));const be=ne.yAxis+ne.height-G.yAxis;be>G.height&&(I.value.scrollTop=I.value.scrollTop+be-G.height)})},ye=(G,_)=>{const ne=P();A(v.value,ne[G-1]),O.selectedTagList.splice(G-1,1),Q();const be=ee.some(we=>we===_[e.saveKey]);(e.allowCreate&&be||!e.allowCreate)&&!w.value&&O.localList.push(_),m.value=`${Ir}px`,pe("remove")},Y=G=>{if(u.isPageLoading)return;let _;const ne=G.target.value,be=l9(ne),we=X(),ke=P();switch(G.code){case"ArrowUp":if(G.preventDefault(),!o.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=u.curPageList.length-1),ve();break;case"ArrowDown":if(G.preventDefault(),!o.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>u.curPageList.length-1?u.curPageList.length:i.focusItemIndex,i.focusItemIndex===u.curPageList.length&&(i.focusItemIndex=0),ve();break;case"ArrowLeft":if(i.isEdit=!0,!be){if(we<1)return;A(v.value,ke[we-1]),Q()}break;case"ArrowRight":if(i.isEdit=!0,!be){if(we===ke.length-1)return;A(ke[we+1],v.value),Q()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&i.focusItemIndex>=0&&o.isShow?he(u.curPageList[i.focusItemIndex],"select",G):e.allowCreate&&he(g.value,"custom",G),G.preventDefault();break;case"Backspace":we!==0&&!g.value&&(_=O.selectedTagList[we-1],ye(we,_));break}},ae=G=>{const _=[];return G.split(";").forEach(be=>{if(be.match(/^[a-zA-Z][a-zA-Z_]+/g)){const we=be.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");_.push({[e.saveKey]:we,[e.displayKey]:we})}}),_},Me=G=>{if(G.preventDefault(),w.value)return!1;const{maxData:_,saveKey:ne,pasteFn:be}=e,we=G.clipboardData.getData("text");let Ee=(be?be(we):ae(we)).map(et=>et[ne]);if(Ee.length){const et=P(),Xe=X(),rt=O.localList.map(tt=>tt[ne]);if(Ee=Ee.filter(tt=>(tt==null?void 0:tt.trim())&&!E.value.includes(tt)&&rt.includes(tt)),_!==-1){const tt=O.selectedTagList.length;if(tt<_){const Fe=_-tt;Ee.length>Fe&&(Ee=[...Ee.slice(0,Fe)])}else Ee=[]}const mn=O.localList.filter(tt=>Ee.includes(tt[ne]));Ee.length&&(O.selectedTagList.splice(Xe,0,...mn),A(v.value,et[Xe]),m.value.style.width=`${Ir}px`,O.localList=O.localList.filter(tt=>!Ee.includes(tt[ne])),pe("select"),Q())}},j=G=>{e.disabled||(A(v.value,G.currentTarget,!0),m.value.style.width=`${Ir}px`,o.isShow&&S())},W=(G,_)=>{if(O.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ne,saveKey:be,displayKey:we,createTagValidator:ke}=e,Ee=X();let et=1,Xe=!1,rt;const mn=Fe=>typeof ke=="function"?ke(Fe):!0,tt=Fe=>O.localList.find(_t=>_t[be]===Fe);if(_==="custom")if(ne){let Fe=G.split(ne);Fe=Fe.filter(yt=>(yt==null?void 0:yt.trim())&&!E.value.includes(yt)&&mn(yt));const _t=Fe.map(yt=>tt(yt)||{[be]:yt,[we]:yt});Fe.length&&(O.selectedTagList.splice(Ee,0,..._t),et=_t.length,Xe=!0)}else{const Fe=typeof G=="object";if(rt=Fe?G[be]:G.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!E.value.includes(rt)&&mn(rt)){const _t=tt(rt)||(Fe?G:{[be]:rt,[we]:rt});O.selectedTagList.splice(Ee,0,_t),Xe=!0}}else G&&(rt=G[be],rt!==void 0&&!E.value.includes(rt)&&(O.selectedTagList.splice(Ee,0,G),Xe=!0));Xe&&a.nextTick(()=>{for(let Fe=1;Fe<=et;Fe++){const yt=P()[Ee+Fe];A(yt,v.value)}m.value.style.width=`${Ir}px`,w.value||(e.allowNextFocus&&Q(),O.localList=O.localList.filter(Fe=>!E.value.includes(Fe[be])))})},J=(G,_)=>{O.selectedTagList.splice(_,1);const ne=ee.some(be=>be===G[e.saveKey]);(e.allowCreate&&ne||!e.allowCreate)&&!w.value&&O.localList.push(G)};return Te(U(U(U({popoverProps:o},a.toRefs(i)),a.toRefs(O)),a.toRefs(u)),{isShowPlaceholder:p,isShowClear:M,curInputValue:g,formatList:ee,renderList:$,showTagClose:N,tagInputRef:m,bkTagSelectorRef:y,tagListRef:C,tagInputItemRef:v,selectorListRef:I,popoverRef:L,triggerClass:x,focusInputTrigger:Q,activeClass:ge,handleInput:R,handleFocus:q,handleBlur:K,handleTagSelected:he,handleTagRemove:le,handleClear:te,tagFocus:j,handleKeydown:Y,handlePaste:Me})},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((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(u9,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(u9,{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(rr,{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,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((o,l)=>{const u={boundary:"window",theme:"light",distance:12,content:o[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(HM,{node:o,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,o,l)},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":o=>this.curInputValue=o,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(Vn,{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(Ni,{theme:"primary",size:On.Small},null)]):null])])})])}});const Mh=_e(BM),GM={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var ZM=a.defineComponent({name:"Divider",props:GM,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 Ih=_e(ZM),_M={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},YM={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},FM=U({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},_M),UM={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var c9=a.defineComponent({name:"TabNav",props:FM,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((g,m)=>{if(!g.props)return null;const{name:y,label:C,closable:v,visible:I,disabled:L,sortable:k}=g.props;if(!I)return!1;e.active===y&&(f=!0);const N=w=>g.slots.label?a.h(g.slots.label):[void 0,""].includes(w)?`\u9009\u9879\u5361${m+1}`:typeof w=="string"?w:typeof w=="function"?a.h(w):w;return d.push({name:y,closable:v,visible:I,disabled:L,sortable:k,tabLabel:N(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(d,f)=>d===f;return Te(U({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,o.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){l(o.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,o.value=null},drop(d,f){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,d,f)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,f){e.tabRemove(d,f)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:o,labelHeight:l,dragstart:u,dragenter:d,dragend:f,drop:g}=this,m=()=>this.navs.map((C,v)=>{if(!C)return null;const{name:I,disabled:L,tabLabel:k}=C,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===I&&p.push("bk-tab-header--active"),p.join(" ")},w=(p,M)=>p||M;return a.createVNode("div",{key:I,onClick:()=>this.handleTabChange(I),draggable:w(C.sortable,i),onDragstart:p=>u(v,p),onDragenter:p=>{p.preventDefault(),d(v)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),f()},onDrop:p=>{p.preventDefault(),g(v,o)},class:N()},[a.createVNode("div",null,[k]),w(C.closable,t)&&a.createVNode(Vn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(v,C)},null)])}),y=()=>{var v,I;const C=[];return typeof this.$slots.add=="function"?C.push((I=(v=this.$slots).add)==null?void 0:I.call(v,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ko,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((L,k)=>a.createVNode("div",{class:"bk-tab-header-item",key:k},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${l}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),y(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),$M=a.defineComponent({name:"Tab",components:{TabNav:c9},props:YM,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),o=a.ref([]),l=a.getCurrentInstance(),u=(g,m=[])=>{const{children:y}=g;return(y||[]).forEach(C=>{let{type:v}=C;v=v.name||v,v==="TabPanel"&&C.component?m.push(C.component):(v===a.Fragment||v==="template")&&u(C,m)}),m},d=()=>{if(t.default){const{children:g}=l.subTree.children[1];if(!g)return;const m=g[0],y=u(m);y.length!==o.value.length&&(o.value=y)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te(U({},{tabAdd(g){n("add",{e:g}),n("add-panel",{e:g})},tabChange(g){n("change",g),n("tab-change",g),n("update:active",g)},tabRemove(g,m){n("remove",g,m),n("remove-panel",g,m)},tabSort(g,m,y){const C=o.value;if(y==="insert")if(g<m)C.splice(m+1,0,o[g]),C.splice(g,1);else if(g>m)C.splice(m,0,o[g]),C.splice(g+1,1);else return!1;else{const v=C[m];C[m]=C[g],C[g]=v}o.value=[...C],n("sort",g,m,y),n("sort-change",g,m,y)},tabDrag(g,m){n("drag",g,m),n("on-drag-tab",g,m)}}),{isMounted:i,panels:o})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:o,active:l,type:u,closable:d,addable:f,sortable:g,sortType:m,labelHeight:y,scrollStep:C,validateActive:v,changeOnHover:I,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:w,tabRemove:p,tabSort:M,tabDrag:x}=this,S={panels:o,active:l,type:u,closable:d,addable:f,sortable:g,sortType:m,labelHeight:y,scrollStep:C,validateActive:v,changeOnHover:I,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:w,tabRemove:p,tabSort:M,tabDrag:x};return!o||!Array.isArray(o)?null:a.createVNode(c9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),XM=a.defineComponent({name:"TabPanel",props:UM,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 wh=Zt($M,{TabPanel:XM}),Ii={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let d9=1;const Nh=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const o=t.onClose,l=n.offsetX||10;let u=n.offsetY||30;const{spacing:d=10}=n;Ii[i].forEach(C=>{u+=(C.el.offsetHeight||0)+d}),d9+=1;const f=`message_${d9}`;n=Te(U({},n),{offsetX:l,offsetY:u,id:f});const g=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=C=>{KM(C,i,d,o),a.render(null,g)},a.render(m,g),Ii[i].push(m);let y;m.props.getContainer&&La(m.props.getContainer)?y=m.props.getContainer:y=document.body,y.appendChild(g.firstElementChild)};function KM(e,t,n,i){i==null||i();const o=t.startsWith("top")?"top":"bottom";let l=-1;Ii[t].forEach((g,m)=>{g.props.id===e&&(l=m)});const d=Ii[t][l].el.offsetHeight,f=Ii[t].length;for(let g=l;g<f;g++){const m=parseInt(Ii[t][g].el.style[o],10)-d-n;Ii[t][g].component.props.offsetY=m}Ii[t].splice(l,1)}const qM={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var eI=a.defineComponent({name:"Message",props:qM,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Mn.getMessageNextIndex(),o=a.computed(()=>e.getContainer&&La(e.getContainer)),l=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:o.value?"absolute":"fixed"})),u=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{u.value=!1},e.delay)},g=m=>{m.preventDefault(),m.stopPropagation(),u.value=!1};return a.onMounted(()=>{e.delay&&f(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(u,()=>{u.value||t("destroy",e.id)}),{classNames:n,styles:l,visible:u,close:g}},render(){const e=()=>({primary:a.createVNode(Lo,null,null),warning:a.createVNode(So,null,null),success:a.createVNode(To,null,null),error:a.createVNode(Vn,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(Rn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const Lh=e=>{Nh(eI,e)},kh=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),o=a.defineComponent({name:"DialogConfirm",setup(d,{expose:f}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const g=async()=>{var v,I;typeof((v=i.value)==null?void 0:v.onClosed)=="function"&&await((I=i.value)==null?void 0:I.onClosed()),n.value=!1},m=async()=>{var v,I;typeof((v=i.value)==null?void 0:v.onConfirm)=="function"&&await((I=i.value)==null?void 0:I.onConfirm()),n.value=!1};function y(v){i.value=v}f({update:y});const C=()=>{const v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":v.push(a.h("div",i.value.subTitle));break;case"function":v.push(a.h("div",i.value.subTitle()));break;default:v.push(a.h(i.value.subTitle));break}return v};return()=>a.createVNode(O3,Te(U({},i.value),{isShow:n.value,onClosed:g,onConfirm:m}),C())}}),l=a.createApp(o).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{l.update(d)}}},tI={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var nI=a.defineComponent({name:"Notify",props:tI,emits:["destroy"],setup(e,{emit:t}){const n=Mn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),o=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),l=a.computed(()=>({[i.value]:`${e.offsetX}px`,[o.value]:`${e.offsetY}px`,zIndex:n})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const g=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&g(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:u,styles:l,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Lo,null,null),warning:a.createVNode(So,null,null),success:a.createVNode(To,null,null),error:a.createVNode(Vn,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Rn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const xh=e=>{Nh(nI,e)},Th=Symbol("MENU_PROVIDER_KEY"),Pu=Symbol("MENU_PROVIDER_KEY_PATH"),iI=e=>{a.provide(Th,e)},rI=e=>{const{parentKeys:t,parentInfo:n}=Ac(),i=a.computed(()=>[...t.value,e]);a.provide(Pu,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Sh=()=>a.inject(Th),Ac=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Pu in t?a.inject(Pu):{parentInfo:void 0,parentKeys:a.ref([])}},Au=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function f9(e,t){if(!e||!t)return;const n=Au(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(l=>{i=i.replace(` ${l} `," ")});const o=Au(i).join(" ");e.setAttribute("class",o)}function h9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Au(n),o=(t||"").split(" ").filter(l=>!i.includes(l)&&!!l.trim());e.classList?e.classList.add(...o):(n+=` ${o.join(" ")}`,e.setAttribute("class",n))}const aI=()=>({css:!0,onBeforeEnter:e=>{h9(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,f9(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&&(h9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{f9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),sI={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var oI=a.defineComponent({name:"Menu",props:sI,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const o=a.ref(""),l=a.ref([]),u=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),g=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(o.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse,console.info(e.collapse);const I=[...g.value],L=[...l.value];l.value=f.value?[]:I,g.value=f.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(I=l.value)=>{l.value=I},{immediate:!0});const m=(I,L)=>{u.value=Te(U({},u.value),{[I]:L})},y=I=>{delete u.value[I],u.value=U({},u.value)},C=(I,L)=>{L?e.uniqueOpen?l.value=[I]:l.value.push(I):l.value=l.value.filter(k=>k!==I),n("openChange",L,u.value[I]),n("update:openKeys",[...l.value])},v=I=>{o.value=I,n("click",u.value[I]),n("update:activeKey",I,u.value[I])};return iI({activeKey:o,menuStore:u,registerMenuInfo:m,unregisterMenuInfo:y,mode:d.value,openedKeys:l,collapse:f,handleOpenChange:C,handleActiveChange:v}),i({activeKey:o,openedKeys:l,menuStore:u}),()=>{var I;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(I=t.default)==null?void 0:I.call(t)])}}}),lI=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),uI=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var v,I;const{registerMenuInfo:i,unregisterMenuInfo:o,activeKey:l,handleActiveChange:u}=Sh(),d=a.getCurrentInstance(),{parentInfo:f}=Ac(),g=((I=(v=d.vnode.key)==null?void 0:v.toString)==null?void 0:I.call(v))||String(d.uid),m=a.computed(()=>l.value===g),y=a.computed(()=>e.needIcon);i(g,{key:g,parentKey:f==null?void 0:f.key});const C=L=>{u(g),n("click",L)};return a.onBeforeUnmount(()=>o(g)),()=>{var L,k;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:C},[y.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(k=t.default)==null?void 0:k.call(t)])])}}});const cI={title:{type:String,default:"title"}};var dI=a.defineComponent({name:"Submenu",props:cI,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,w;const{registerMenuInfo:i,unregisterMenuInfo:o,openedKeys:l,handleOpenChange:u,collapse:d,activeKey:f,menuStore:g}=Sh(),{parentInfo:m}=Ac(),y=a.getCurrentInstance(),C=((w=(N=y.vnode.key)==null?void 0:N.toString)==null?void 0:w.call(N))||String(y.uid),v=a.ref(aI()),I=a.computed(()=>l.value.includes(C)),L=a.computed(()=>{var M,x;const p=(x=(M=g.value)==null?void 0:M[f.value])==null?void 0:x.parentKey;return d.value&&p===C&&I});rI(C),i(C,{key:C,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>o(C));const k=()=>{u(C,!I.value),n("collapse",!I.value,y)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":I.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:k},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(bc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Co,{class:{"submenu-header-collapse":!0,"is-collapse":l.value.includes(C)}},null)]),a.createVNode(a.Transition,v.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,I.value]])]}})])}}});const Dh=Zt(oI,{Item:uI,Submenu:dI,Group:lI}),fI={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var g9=a.defineComponent({props:fI,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const hI={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var gI=a.defineComponent({name:"Navigation",props:hI,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const o=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},l=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},u=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:o,handleMouseLeave:l,handleClick:u}},render(){var e,t,n,i,o,l,u,d,f,g,m,y;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(g9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(g9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(oc,{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`}},[((l=(o=this.$slots).header)==null?void 0:l.call(o))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(u=this.$slots)["header-set"])==null?void 0:d.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(g=(f=this.$slots).default)==null?void 0:g.call(f),a.createVNode("div",{class:"container-footer"},[(y=(m=this.$slots).footer)==null?void 0:y.call(m)])])])])])}});const jh=_e(gI),mI={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 zh=a.defineComponent({props:mI,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{l()}),a.onBeforeUnmount(()=>{o()});const o=()=>{if(n&&Object.keys(n).length!==0){const f=n;f.isShow&&f.hide(),f.destroy(),n=null,t("changeVisible",!1)}},l=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new c3(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+Mn.getModalNextIndex()),f}),d=a.reactive({styles:u});return Te(U({},a.toRefs(d)),{refContentRef:i,updateDropdown:l,destoryDropdown:o})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const pI={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var vI=a.defineComponent({props:pI,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},o=()=>{t("pick-success")},l=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:n,handleClear:i,handleSuccess:o,handleToggleTime:l,handleTab:f=>{const m=[...u.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===m&&(f.preventDefault(),f.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])])}}),m9=1e3*60*60*24;function p9(e,t){return new Date(e,t+1,0).getDate()}function v9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function y9(e,t,n,i){t>11&&(t=0,e++);var o=new Date(e,t,n);i&&o.setDate(o.getDate()+4-(o.getDay()||7));var l=i?o.getFullYear():e,u=new Date(l,0,1),d=1+Math.round((o-u)/m9);i||(d+=u.getDay());var f=Math.ceil(d/7);if(!i){var g=new Date(e,t,n),m=new Date(e+1,0,1),y=m.getDay();g.getTime()>=m.getTime()-m9*y&&(f=1)}return f}function yI(e,t,n){for(var i=this.lang||"en",o=this.onlyDays,l=typeof this.weekStart=="undefined"?1:this.weekStart,u=l===1,d=[],f=new Date(e,t,1),g=f.getDay()||(u?7:0),m=l-g,y=y9(e,t,1,u),C=p9(e,t),v=p9(e,t-1),I,L,k,N=v9(e,t,y),w={month:t,year:e,daysInMonth:C},p=0;p<7;p++){k=m;for(var M=0;M<8;M++){p>0&&M>0&&m++,m>C||m<1?(L=m>C?m-C:v+m,I=m>C?t+1:t-1):(L=m,I=t);var x=function(){return M===0?"weekLabel":p===0?"dayLabel":m<1?"prevMonth":m>C?"nextMonth":"monthDay"}(),S=k!==m&&p>0,H={desc:S?L:y,week:y,type:x,format:u?"ISO 8601":"US",date:S?new Date(Date.UTC(e,I,L)):!1,year:N,index:d.length};n&&(typeof n=="function"?H=n.call(w,H,i):n.forEach(function(P){H=P.call(w,H,i)})),o&&S?d.push(H):o||d.push(H)}p>0&&(y=y9(e,I,L+1,u)),N=v9(e,t,y)}return w.cells=d,w}var bI=function(e){return yI.bind(e)},CI={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"}},Dn=CI;function MI(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function Ph(e,t){for(var n in e)t[n]?MI(e[n])&&Ph(e[n],t[n]):t[n]=e[n]}function Ah(e,t){var n=[Dn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Dn.weekPlaceholder?e.desc=Dn.weekPlaceholder:e.index<8?e.desc=Dn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Dn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Dn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Dn.monthNames[t],columnNames:Dn.columnNames[t],classes:Dn.classes}),e}Ah.setLabels=function(e){Ph(e,Dn)};var II=Ah,wI={Generator:bI,addLabels:II};function dn(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 Pt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function wn(e){Pt(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 NI(e,t){Pt(2,arguments);var n=wn(e).getTime(),i=dn(t);return new Date(n+i)}function LI(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 kI(e){return Pt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xI(e){if(Pt(1,arguments),!kI(e)&&typeof e!="number")return!1;var t=wn(e);return!isNaN(Number(t))}var TI={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"}},SI=function(e,t,n){var i,o=TI[e];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},DI=SI;function su(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var jI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},AI={date:su({formats:jI,defaultWidth:"full"}),time:su({formats:zI,defaultWidth:"full"}),dateTime:su({formats:PI,defaultWidth:"full"})},OI=AI,EI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},JI=function(e,t,n,i){return EI[e]},QI=JI;function fa(e){return function(t,n){var i=n||{},o=i.context?String(i.context):"standalone",l;if(o==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):u;l=e.formattingValues[d]||e.formattingValues[u]}else{var f=e.defaultWidth,g=i.width?String(i.width):e.defaultWidth;l=e.values[g]||e.values[f]}var m=e.argumentCallback?e.argumentCallback(t):t;return l[m]}}var VI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WI={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"]},HI={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"]},BI={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"}},GI={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"}},ZI=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},_I={ordinalNumber:ZI,era:fa({values:VI,defaultWidth:"wide"}),quarter:fa({values:RI,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:fa({values:WI,defaultWidth:"wide"}),day:fa({values:HI,defaultWidth:"wide"}),dayPeriod:fa({values:BI,defaultWidth:"wide",formattingValues:GI,defaultFormattingWidth:"wide"})},YI=_I;function ha(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],l=t.match(o);if(!l)return null;var u=l[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?UI(d,function(y){return y.test(u)}):FI(d,function(y){return y.test(u)}),g;g=e.valueCallback?e.valueCallback(f):f,g=n.valueCallback?n.valueCallback(g):g;var m=t.slice(u.length);return{value:g,rest:m}}}function FI(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function UI(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function $I(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var o=i[0],l=t.match(e.parsePattern);if(!l)return null;var u=e.valueCallback?e.valueCallback(l[0]):l[0];u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(o.length);return{value:u,rest:d}}}var XI=/^(\d+)(th|st|nd|rd)?/i,KI=/\d+/i,qI={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},ew={any:[/^b/i,/^(a|c)/i]},tw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nw={any:[/1/i,/2/i,/3/i,/4/i]},iw={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},rw={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]},aw={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},sw={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]},ow={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},lw={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}},uw={ordinalNumber:$I({matchPattern:XI,parsePattern:KI,valueCallback:function(e){return parseInt(e,10)}}),era:ha({matchPatterns:qI,defaultMatchWidth:"wide",parsePatterns:ew,defaultParseWidth:"any"}),quarter:ha({matchPatterns:tw,defaultMatchWidth:"wide",parsePatterns:nw,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ha({matchPatterns:iw,defaultMatchWidth:"wide",parsePatterns:rw,defaultParseWidth:"any"}),day:ha({matchPatterns:aw,defaultMatchWidth:"wide",parsePatterns:sw,defaultParseWidth:"any"}),dayPeriod:ha({matchPatterns:ow,defaultMatchWidth:"any",parsePatterns:lw,defaultParseWidth:"any"})},cw=uw,dw={code:"en-US",formatDistance:DI,formatLong:OI,formatRelative:QI,localize:YI,match:cw,options:{weekStartsOn:0,firstWeekContainsDate:1}},fw=dw;function hw(e,t){Pt(2,arguments);var n=dn(t);return NI(e,-n)}var gw=864e5;function mw(e){Pt(1,arguments);var t=wn(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),o=n-i;return Math.floor(o/gw)+1}function co(e){Pt(1,arguments);var t=1,n=wn(e),i=n.getUTCDay(),o=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-o),n.setUTCHours(0,0,0,0),n}function Oh(e){Pt(1,arguments);var t=wn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var o=co(i),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=co(l);return t.getTime()>=o.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function pw(e){Pt(1,arguments);var t=Oh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=co(n);return i}var vw=6048e5;function yw(e){Pt(1,arguments);var t=wn(e),n=co(t).getTime()-pw(t).getTime();return Math.round(n/vw)+1}function fo(e,t){Pt(1,arguments);var n=t||{},i=n.locale,o=i&&i.options&&i.options.weekStartsOn,l=o==null?0:dn(o),u=n.weekStartsOn==null?l:dn(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=wn(e),f=d.getUTCDay(),g=(f<u?7:0)+f-u;return d.setUTCDate(d.getUTCDate()-g),d.setUTCHours(0,0,0,0),d}function Eh(e,t){Pt(1,arguments);var n=wn(e),i=n.getUTCFullYear(),o=t||{},l=o.locale,u=l&&l.options&&l.options.firstWeekContainsDate,d=u==null?1:dn(u),f=o.firstWeekContainsDate==null?d:dn(o.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(i+1,0,f),g.setUTCHours(0,0,0,0);var m=fo(g,t),y=new Date(0);y.setUTCFullYear(i,0,f),y.setUTCHours(0,0,0,0);var C=fo(y,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function bw(e,t){Pt(1,arguments);var n=t||{},i=n.locale,o=i&&i.options&&i.options.firstWeekContainsDate,l=o==null?1:dn(o),u=n.firstWeekContainsDate==null?l:dn(n.firstWeekContainsDate),d=Eh(e,t),f=new Date(0);f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0);var g=fo(f,t);return g}var Cw=6048e5;function Mw(e,t){Pt(1,arguments);var n=wn(e),i=fo(n,t).getTime()-bw(n,t).getTime();return Math.round(i/Cw)+1}function qe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Iw={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return qe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):qe(n+1,2)},d:function(e,t){return qe(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return qe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return qe(e.getUTCHours(),t.length)},m:function(e,t){return qe(e.getUTCMinutes(),t.length)},s:function(e,t){return qe(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return qe(o,t.length)}},bi=Iw,wr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ww={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return bi.y(e,t)},Y:function(e,t,n,i){var o=Eh(e,i),l=o>0?o:1-o;if(t==="YY"){var u=l%100;return qe(u,2)}return t==="Yo"?n.ordinalNumber(l,{unit:"year"}):qe(l,t.length)},R:function(e,t){var n=Oh(e);return qe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return qe(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return qe(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return qe(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return bi.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return qe(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var o=Mw(e,i);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):qe(o,t.length)},I:function(e,t,n){var i=yw(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):qe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):bi.d(e,t)},D:function(e,t,n){var i=mw(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):qe(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var o=e.getUTCDay(),l=(o-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return qe(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var o=e.getUTCDay(),l=(o-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return qe(l,t.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),o=i===0?7:i;switch(t){case"i":return String(o);case"ii":return qe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),o=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),o;switch(i===12?o=wr.noon:i===0?o=wr.midnight:o=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),o;switch(i>=17?o=wr.evening:i>=12?o=wr.afternoon:i>=4?o=wr.morning:o=wr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return bi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):bi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):qe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):qe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):bi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):bi.s(e,t)},S:function(e,t){return bi.S(e,t)},X:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();if(l===0)return"Z";switch(t){case"X":return C9(l);case"XXXX":case"XX":return Gi(l);case"XXXXX":case"XXX":default:return Gi(l,":")}},x:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"x":return C9(l);case"xxxx":case"xx":return Gi(l);case"xxxxx":case"xxx":default:return Gi(l,":")}},O:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b9(l,":");case"OOOO":default:return"GMT"+Gi(l,":")}},z:function(e,t,n,i){var o=i._originalDate||e,l=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b9(l,":");case"zzzz":default:return"GMT"+Gi(l,":")}},t:function(e,t,n,i){var o=i._originalDate||e,l=Math.floor(o.getTime()/1e3);return qe(l,t.length)},T:function(e,t,n,i){var o=i._originalDate||e,l=o.getTime();return qe(l,t.length)}};function b9(e,t){var n=e>0?"-":"+",i=Math.abs(e),o=Math.floor(i/60),l=i%60;if(l===0)return n+String(o);var u=t||"";return n+String(o)+u+qe(l,2)}function C9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+qe(Math.abs(e)/60,2)}return Gi(e,t)}function Gi(e,t){var n=t||"",i=e>0?"-":"+",o=Math.abs(e),l=qe(Math.floor(o/60),2),u=qe(o%60,2);return i+l+n+u}var Nw=ww;function M9(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 Jh(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 Lw(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return M9(e,t);var l;switch(i){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",M9(i,t)).replace("{{time}}",Jh(o,t))}var kw={p:Jh,P:Lw},xw=kw,Tw=["D","DD"],Sw=["YY","YYYY"];function Dw(e){return Tw.indexOf(e)!==-1}function jw(e){return Sw.indexOf(e)!==-1}function I9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var zw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Aw=/^'([^]*?)'?$/,Ow=/''/g,Ew=/[a-zA-Z]/;function Jw(e,t,n){Pt(2,arguments);var i=String(t),o=n||{},l=o.locale||fw,u=l.options&&l.options.firstWeekContainsDate,d=u==null?1:dn(u),f=o.firstWeekContainsDate==null?d:dn(o.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=l.options&&l.options.weekStartsOn,m=g==null?0:dn(g),y=o.weekStartsOn==null?m:dn(o.weekStartsOn);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!l.localize)throw new RangeError("locale must contain localize property");if(!l.formatLong)throw new RangeError("locale must contain formatLong property");var C=wn(e);if(!xI(C))throw new RangeError("Invalid time value");var v=LI(C),I=hw(C,v),L={firstWeekContainsDate:f,weekStartsOn:y,locale:l,_originalDate:C},k=i.match(Pw).map(function(N){var w=N[0];if(w==="p"||w==="P"){var p=xw[w];return p(N,l.formatLong,L)}return N}).join("").match(zw).map(function(N){if(N==="''")return"'";var w=N[0];if(w==="'")return Qw(N);var p=Nw[w];if(p)return!o.useAdditionalWeekYearTokens&&jw(N)&&I9(N,t,e),!o.useAdditionalDayOfYearTokens&&Dw(N)&&I9(N,t,e),p(I,N,l.localize,L);if(w.match(Ew))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return N}).join("");return k}function Qw(e){return e.match(Aw)[1].replace(Ow,"'")}const wt={},Qh=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Hi=/\d\d?/,Vw=/\d{3}/,Rw=/\d{4}/,Bs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,w9=function(){};function Vh(e,t){const n=[];for(let i=0,o=e.length;i<o;i++)n.push(e[i].substr(0,t));return n}function N9(e){return(t,n,i)=>{const o=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~o&&(t.month=o)}}function Tn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Rh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Wh=["January","February","March","April","May","June","July","August","September","October","November","December"],Ww=Vh(Wh,3),Hw=Vh(Rh,3);wt.i18n={dayNamesShort:Hw,dayNames:Rh,monthNamesShort:Ww,monthNames:Wh,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const L9={D(e){return e.getDay()},DD(e){return Tn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Tn(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 Tn(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 Tn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Tn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Tn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Tn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Tn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Tn(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?"-":"+")+Tn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ut={d:[Hi,(e,t)=>{e.day=t}],M:[Hi,(e,t)=>{e.month=t-1}],yy:[Hi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Hi,(e,t)=>{e.hour=t}],m:[Hi,(e,t)=>{e.minute=t}],s:[Hi,(e,t)=>{e.second=t}],yyyy:[Rw,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Vw,(e,t)=>{e.millisecond=t}],D:[Hi,w9],ddd:[Bs,w9],MMM:[Bs,N9("monthNamesShort")],MMMM:[Bs,N9("monthNames")],a:[Bs,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};ut.DD=ut.D;ut.dddd=ut.ddd;ut.Do=ut.dd=ut.d;ut.mm=ut.m;ut.hh=ut.H=ut.HH=ut.h;ut.MM=ut.M;ut.ss=ut.s;ut.A=ut.a;wt.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"};wt.format=(e,t,n)=>{const i=n||wt.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=wt.masks[t]||t||wt.masks.default,t.replace(Qh,o=>o in L9?L9[o](e,i):o.slice(1,o.length-1))};wt.parse=(e,t,n)=>{const i=n||wt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=wt.masks[t]||t,e.length>1e3)return!1;let o=!0;const l={};if(t.replace(Qh,f=>{if(ut[f]){const g=ut[f],m=e.search(g[0]);~m?e.replace(g[0],y=>(g[1](l,y,i),e=e.substr(m+y.length),y)):o=!1}return ut[f]?"":f.slice(1,f.length-1)}),!o)return!1;const u=new Date;l.isPm===!0&&l.hour!==null&&+l.hour!=12?l.hour=+l.hour+12:l.isPm===!1&&+l.hour==12&&(l.hour=0);let d;return l.timezoneOffset!==null&&l.timezoneOffset!==void 0?(l.minute=+(l.minute||0)-+l.timezoneOffset,d=new Date(Date.UTC(l.year||u.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0))):d=new Date(l.year||u.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0),d};const Oc=" - ",$n=(e,t)=>{const n=wn(new Date(e));return!n||isNaN(n.getTime())?"":Jw(n,t||"yyyy-MM-dd")},ou=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return $n(n,t)+Oc+$n(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return $n(e,t);return""},lu=(e,t)=>{const n=Array.isArray(e)?e:e.split(Oc);if(n.length===2){const i=n[0],o=n[1];return[i instanceof Date?i:wt.parse(i,t||"yyyy-MM-dd"),o instanceof Date?o:wt.parse(o,t||"yyyy-MM-dd")]}return[]},Sr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:ou,parser:lu},datetimerange:{formatter:ou,parser:lu},timerange:{formatter:ou,parser:lu},time:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>$n(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let o=i;return typeof i=="string"?o=i.trim():typeof i!="number"&&!i&&(o=""),wt.parse(o,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Bw=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Gw=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),k9=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Hh={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"},Gs=(e,t,n,i)=>{const o=t.includes("range"),{parser:l}=Sr[t]||Sr.default,u=i||Hh[t],d=Sr.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=l(e,u);else if(n&&e)f=d(e,u);else if(o)if(!e)f=[null,null];else if(typeof e=="string")f=l(e,u);else if(t==="timerange")f=l(e,u).map(g=>g||"");else{const[g,m]=e;g instanceof Date&&m instanceof Date?f=e.map(y=>new Date(y)):typeof g=="string"&&typeof m=="string"?f=l(e.join(Oc),u):(!g||!m)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=l(e,u)||null);return o||n?f||[]:[f]},ga=(e,t,n,i)=>{const o=Hh[t];if(n){const{formatter:u}=Sr.multiple;return u(e,i||o)}const{formatter:l}=Sr[t]||Sr.default;return l(e,i||o)},Zw=Symbol("date-picker");function cn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const _w=(e,t)=>new Date(e,t+1,0).getDate(),x9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,o=_w(n.getFullYear(),i);return o<n.getDate()&&n.setDate(o),n.setMonth(i),n},Bh=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const o=n.toLocaleDateString(i,{month:"long"});return(o[0].toUpperCase()+o.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const o=n.toLocaleDateString(i,{month:"long"});return o[0].toUpperCase()+o.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,o)=>{const l=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=i.match(l).slice(1),d=u[1],f=[u[0],u[2]].map(g=>({label:g.replace(/\[[^\]]+\]/,y=>y.slice(1,-1).replace(t,C=>e[C](o,n))),type:g.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),Bi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Yw=(e,t,n)=>{if(!t||!n)return!1;const[i,o]=[t,n].sort();return e>=i&&e<=o},Fw={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 Ou=a.defineComponent({props:Fw,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new wI.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const g=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return g.splice(0,7-0).concat(g.splice(0,0))}),o=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),l=a.computed(()=>{const g=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),y=Bi(new Date),C=o.value.filter(Boolean).map(Bi),[v,I]=o.value.map(Bi),L=e.rangeState.from&&Bi(e.rangeState.from),k=e.rangeState.to&&Bi(e.rangeState.to),N=e.selectionMode==="range",w=typeof e.disableDate=="function"&&e.disableDate;return n.value(g,m,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const M=p.date&&Bi(p.date),x=p.date&&m===p.date.getMonth();return Te(U({},p),{type:M===y?"today":p.type,selected:x&&C.includes(M),disabled:p.date&&w&&w(new Date(M)),range:x&&N&&Yw(M,L,k),start:x&&N&&M===v,end:x&&N&&M===I})}).cells.slice(0)});return{headerDays:i,cells:l,getCellCls:g=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:g.selected||g.start||g.end,["bk-date-picker-cells-cell-disabled"]:g.disabled,["bk-date-picker-cells-cell-today"]:g.type==="today",["bk-date-picker-cells-cell-prev-month"]:g.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:g.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:g.type==="weekLabel",["bk-date-picker-cells-cell-range"]:g.range&&!g.start&&!g.end}],handleClick:g=>{if(g.disabled||g.type==="weekLabel")return;const m=new Date(Bi(g.date));t("pick",m),t("pick-click")},handleMouseMove:g=>{if(!e.rangeState.selecting||g.disabled)return;const m=g.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 Uw={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 $w=a.defineComponent({props:Uw,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=Q=>Q.match(/^time/)?"time-picker":`${Q}-table`,o=e.modelValue.slice().sort(),l=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:o,panelDate:e.startDate||o[0]||new Date}),u=()=>{setTimeout(()=>{l.currentView=e.selectionMode},500)},d=Q=>{l.panelDate=Q,l.pickerTable==="year-table"?l.pickerTable="month-table":l.pickerTable=i(l.currentView)},f=(Q,O)=>{let E=Q;e.selectionMode==="year"?E=new Date(Q.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(l.panelDate.getFullYear(),Q.getMonth(),1):E=new Date(Q),l.dates=[E],n("pick",E,!1,O||e.selectionMode)},g=()=>{u(),n("pick-success")},m=()=>{u(),n("pick-clear")},y=Q=>{Q.value&&n("pick",Q.value(),!1,void 0,Q),Q.onClick&&Q.onClick(this),e.shortcutClose&&g()},C=()=>{l.currentView=e.selectionMode,l.pickerTable=i(l.currentView)},v=Q=>{e.selectionMode==="year"||l.pickerTable==="year-table"?l.panelDate=new Date(l.panelDate.getFullYear()+Q*10,0,1):l.panelDate=x9(l.panelDate,Q*12)},I=Q=>{l.panelDate=x9(l.panelDate,Q)},L=a.ref(null),k=a.ref(null),N=Q=>{var O,E;Q&&((O=L==null?void 0:L.value)==null||O.updateScroll(),(E=k==null?void 0:k.value)==null||E.updateScroll())},w=a.computed(()=>l.pickerTable===`${l.currentView}-table`?f:d),p=a.computed(()=>{const Q="zh-CN",O="[yyyy]-[mm]",E=l.panelDate,{labels:ee,separator:$}=Bh(Q,O,E),ue=fe=>()=>{l.pickerTable=i(fe)};return{separator:$,labels:ee.map(fe=>{const ge=fe;return ge.handler=ue(fe.type),ge})}}),M=a.computed(()=>p.value.labels[0].type==="year"||l.currentView==="date"),x=a.computed(()=>p.value.labels[1].type==="year"||l.currentView==="date"),S=a.computed(()=>l.currentView==="time"),H=()=>{l.currentView=l.currentView==="time"?"date":"time"},P=a.computed(()=>!!t.shortcuts);return Te(U({},a.toRefs(l)),{panelPickerHandlers:w,datePanelLabel:p,showLabelFirst:M,showLabelSecond:x,handleShortcutClick:y,changeYear:v,changeMonth:I,reset:C,isTime:S,hasShortcuts:P,onToggleVisibility:N,handleToggleTime:H,handlePickSuccess:g,handlePickClear:m})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:cn("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:cn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Jn,{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(Ou,{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(vI,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const Xw={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 Kw=a.defineComponent({props:Xw,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,o]=e.modelValue.map(A=>A||Bw()),l=e.startDate?e.startDate:i,u=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:l,rightPanelDate:new Date(l.getFullYear(),l.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!o},upToNowEnable:!1,dates:e.modelValue}),d=(A,R)=>!A||!R?0:A.getTime()-R.getTime(),f=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},g=a.ref(null),m=a.ref(null),y=A=>{var R,q;A&&((R=g==null?void 0:g.value)==null||R.updateScroll(),(q=m==null?void 0:m.value)==null||q.updateScroll())},C=(A,R,q,K=!0)=>{const he=new Date(u[`${A}PanelDate`]);if(he[`set${R}`](he[`get${R}`]()+q),u[`${A}PanelDate`]=he,!!K)if(e.splitPanels){const le=A==="left"?"right":"left";A==="left"&&u.leftPanelDate>=u.rightPanelDate&&C(le,R,1),A==="right"&&u.rightPanelDate<=u.leftPanelDate&&C(le,R,-1)}else{const le=A==="left"?"right":"left",pe=u[`${le}PanelDate`],te=new Date(pe);if(R==="Month"){const ve=new Date(te.getFullYear(),te.getMonth()+q+1,0).getDate();te.setDate(Math.min(ve,te.getDate()))}te[`set${R}`](te[`get${R}`]()+q),u[`${le}PanelDate`]=te}},v=A=>{const R=u.currentView==="year"?-10:-1;C(A,"FullYear",R)},I=A=>{const R=u.currentView==="year"?10:1;C(A,"FullYear",R)},L=A=>{C(A,"Month",-1)},k=A=>{C(A,"Month",1)},N=A=>{u[`${A}PickerTable`]="year-table"},w=A=>{u[`${A}PickerTable`]="month-table"},p=A=>{const R="zh-CN",q="[yyyy]-[mm]",K=u[`${A}PanelDate`],{labels:he,separator:le}=Bh(R,q,K),pe=te=>{const ve=te==="month"?w:N;return()=>ve(A)};return{separator:le,labels:he.map(te=>{const ve=te;return ve.handler=pe(te.type),ve})}},M=(A,R)=>{n("pick",u.dates,A,R||e.type)},x=(A,R)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=A;else{const[q,K]=[u.rangeState.from,A].sort(d),he=R==="upToNow"?new Date:new Date(new Date(new Date(K.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[q,he],u.rangeState={from:q,to:he,selecting:!1}}M(!1,R||"date")}else u.upToNowEnable=new Date(A).getTime()<new Date().getTime(),u.rangeState={from:A,to:null,selecting:!0}},S=(A,R)=>{if(u[`${A}PanelDate`]=R,u[`${A}PickerTable`]==="year-table"?u[`${A}PickerTable`]="month-table":u[`${A}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const K=A==="left"?"right":"left";u[`${K}PanelDate`]=R,C(K,"Month",K==="left"?-1:1,!1)}},H=A=>{u.rangeState.to=A};a.watch(()=>e.selectionMode,A=>{u.currentView=A||"range"});const P=a.computed(()=>u.currentView==="time"),Q=a.computed(()=>p("left")),O=a.computed(()=>p("right")),E=a.computed(()=>u.leftPickerTable.split("-").shift()),ee=a.computed(()=>u.rightPickerTable.split("-").shift()),$=a.computed(()=>Q.value.labels[0].type==="year"||u.currentView==="date"),ue=a.computed(()=>Q.value.labels[1].type==="year"||u.currentView==="date"),fe=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),ge=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),Ce=a.computed(()=>{const A=`${u.currentView}-table`;return{left:u.leftPickerTable!==A,right:u.rightPickerTable!==A}}),re=a.computed(()=>({left:Ce.value.left?S.bind("left"):x,right:Ce.value.right?S.bind("right"):x})),X=a.computed(()=>!!t.shortcuts);return Te(U({},a.toRefs(u)),{isTime:P,hasShortcuts:X,prevYear:v,nextYear:I,prevMonth:L,nextMonth:k,leftDatePanelLabel:Q,rightDatePanelLabel:O,leftDatePanelView:E,rightDatePanelView:ee,leftShowLabelFirst:$,leftShowLabelSecond:ue,rightShowLabelFirst:fe,rightShowLabelSecond:ge,preSelecting:Ce,panelPickerHandlers:re,reset:f,onToggleVisibility:y,handleRangePick:x,handleChangeRange:H})},render(){var e,t,n;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:i=>{i.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:cn("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:cn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Jn,{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(Ou,{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:cn("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:cn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(qi,{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:cn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(Aa,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Jn,{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(Ou,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const qw={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 eN=a.defineComponent({name:"DatePicker",directives:{clickoutside:Hr},props:qw,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xi(),o=e.type.includes("range"),l=o?[null,null]:[null];let u=Gw((o?e.modelValue:[e.modelValue])||[])?l:Gs(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(u=d.value()));const f=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(k9),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:g});function g(te){let ve=te;return te.match(/^date/)&&(ve="date"),f.selectionMode=["year","month","date","time"].indexOf(ve)>-1&&ve,f.selectionMode}const m=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const te=e.type.includes("range");let ve=f.internalValue.map(ye=>ye instanceof Date?new Date(ye):ye||"");return e.type.match(/^time/)&&(ve=ve.map(ye=>ga(ye,e.type,e.multiple,e.format))),te||e.multiple?ve:ve[0]}),y=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?ga(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(te=>ga(te,e.type,e.multiple,e.format)):ga(m.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),I=a.computed(()=>ga(f.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var te;return((te=f.shortcut)==null?void 0:te.text)&&e.useShortcutText?f.shortcut.text:I.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),w=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-font":e.fontSize==="large"&&(te="large-font"),te}),x=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-width":e.fontSize==="large"&&(te="large-width"),te}),S=a.computed(()=>{var te;return((te=f.shortcut)==null?void 0:te.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),H=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),Q=()=>{var te;(te=P==null?void 0:P.value)==null||te.focus()};a.watch(()=>f.visible,te=>{var ve,ye;te===!1&&((ve=O.value)==null||ve.destoryDropdown()),(ye=O.value)==null||ye.updateDropdown(),n("open-change",te)});const O=a.ref(null);a.watch(()=>e.modelValue,te=>{f.internalValue=Gs(te,e.type,e.multiple,e.format)}),a.watch(()=>e.open,te=>{f.visible=te===!0}),a.watch(()=>e.type,te=>{g(te)}),a.watch(()=>m,(te,ve)=>{const ye=JSON.stringify(te),Y=JSON.stringify(ve);(ye!==Y||typeof te!=typeof ve)&&n("input",te)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const te=e.modelValue,ve=m.value;(typeof te!=typeof ve||JSON.stringify(te)!==JSON.stringify(ve))&&n("input",m.value),e.open!==null&&(f.visible=e.open),a.provide(Zw,{props:e,focus:()=>Q()})});const E=a.ref(null),ee=te=>{var ve;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(te&&te.type==="mousedown"&&f.visible){te.preventDefault(),te.stopPropagation();return}if(f.visible){const ye=(ve=E==null?void 0:E.value)==null?void 0:ve.$el;if(te&&ye&&ye.contains(te.target))return;f.visible=!1,te==null||te.preventDefault(),te==null||te.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},$=()=>{var te,ve;(te=P==null?void 0:P.value)==null||te.focus(),(ve=P==null?void 0:P.value)==null||ve.click()},ue=()=>{e.readonly||e.disabled||I!=null&&I.value&&(f.showClose=!0)},fe=te=>{console.log("handleInputMouseleave"),f.showClose=!1},ge=te=>{a.nextTick(()=>{var ve,ye;n("change",y.value,te),n("update:modelValue",m.value),(ve=i==null?void 0:i.validate)==null||ve.call(i,"change"),e.type.indexOf("time")<0&&((ye=P==null?void 0:P.value)==null||ye.blur())})},Ce=te=>{var J;const ve=e.type.includes("range")||e.multiple,ye=I.value,Y=te.target.value,ae=Gs(Y,e.type,e.multiple,e.format),Me=ve?ae:ae[0],j=(J=e.disableDate)==null?void 0:J.call(e,Me),W=ae.reduce((G,_)=>G&&_ instanceof Date,!0);Y!==ye&&!j&&W?(ge(e.type),f.internalValue=ae):f.forceInputRerender=f.forceInputRerender+1},re=te=>{e.readonly||(f.isFocused=!0,!(te&&te.type==="focus")&&(e.disabled||(f.visible=!0)))},X=()=>{var te;(te=E==null?void 0:E.value)==null||te.reset()},A=te=>{var ve,ye;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){te.preventDefault();return}f.isFocused=!1,g(e.type),f.internalValue=f.internalValue.slice(),X(),(ve=E==null?void 0:E.value)==null||ve.onToggleVisibility(!1),(ye=i==null?void 0:i.validate)==null||ye.call(i,"blur")},R=te=>{const{keyCode:ve}=te;if(ve===9&&f.visible)if(te.stopPropagation(),te.preventDefault(),k.value){const Y=".bk-picker-confirm > *",ae=O.value.$el.querySelectorAll(Y);f.internalFocus=!0,[...ae][te.shiftKey?"pop":"shift"]().focus()}else ee();const ye=[37,38,39,40];if(!f.visible&&ye.includes(ve)){f.visible=!0;return}ve===27&&f.visible&&(te.stopPropagation(),ee()),!!ye.includes(ve)&&f.focusedTime.active&&te.preventDefault()},q=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),ge(e.type),X(),f.showClose=!1,f.shortcut=null,setTimeout(()=>g(e.type),500)},K=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},he=()=>{var te;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(te=P==null?void 0:P.value)==null||te.blur(),X()},le=(te,ve=!1,ye,Y)=>{let ae=te;if(e.multiple){const j=ae.getTime(),W=f.internalValue.findIndex(_=>_&&_.getTime()===j),G=[...f.internalValue,ae].filter(Boolean).map(_=>_.getTime()).filter((_,ne,be)=>be.indexOf(_)===ne&&ne!==W);f.internalValue=G.map(_=>new Date(_))}else ae=Gs(te,e.type,e.multiple,e.format),f.internalValue=Array.isArray(ae)?ae:[ae];if(f.internalValue[0]){const[j]=f.internalValue;f.focusedDate=j}f.focusedTime=Te(U({},f.focusedTime),{time:f.internalValue.map(k9)}),k.value||(g(e.type),f.visible=ve),ye==="upToNow"&&e.type==="daterange"&&he(),f.shortcut=Y,ge(ye);const Me=e.shortcuts.findIndex(j=>j===f.shortcut);n("shortcut-change",f.shortcut,Me)},pe=a.ref(null);return Te(U({},a.toRefs(f)),{panel:C,publicStringValue:y,opened:v,visualValue:I,displayValue:L,isConfirm:k,hasHeader:N,hasFooter:w,hasShortcuts:p,fontSizeCls:M,longWidthCls:x,localReadonly:S,allowCrossDayProp:H,pickerDropdownRef:O,inputRef:P,triggerRef:pe,pickerPanelRef:E,handleClose:ee,handleIconClick:$,handleInputMouseenter:ue,handleInputMouseleave:fe,handleFocus:re,handleBlur:A,handleKeydown:R,handleInputChange:Ce,handleClear:q,handleTransferClick:K,onPick:le,onPickSuccess:he})},render(){var n,i,o;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Vn,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var l,u;return((u=(l=this.$slots).shortcuts)==null?void 0:u.call(l))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(o=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?o: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(zh,{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 l,u,d,f,g,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(u=(l=this.$slots).header)==null?void 0:u.call(l))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Kw,{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($w,{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=(g=(f=this.$slots).footer)==null?void 0:g.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Gh=_e(eN);var jn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(jn||{});const tN={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function nN(e,t,n){const i=a.ref([]),o=a.ref([]),l=()=>{e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?o.value.push(u):i.value.push(u)})};return l(),a.watch(()=>[e,t,n],l),{selectList:i,selectedList:o}}function iN(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(o=>{const l=o[t.value];return l instanceof Object?!1:l.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var rN=a.defineComponent({name:"Transfer",props:tN,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?jn.OBJECT_ARRAY:jn.BASE_ARRAY:jn.NOT_ARRAY),i=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.settingKey),o=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.displayKey),l=a.computed(()=>e.sortKey||o.value),u=a.computed(()=>{switch(n.value){case jn.BASE_ARRAY:return[...new Set(e.sourceList)].map(w=>({value:w}));case jn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:g}=nN(u,d,i),{selectSearchQuery:m,selectListSearch:y}=iN(f,o),C=a.computed(()=>[...y.value].sort((w,p)=>{const M=w[l.value],x=p[l.value];return M>x?1:-1})),v=a.computed(()=>[...g.value].sort((w,p)=>{const M=w[l.value],x=p[l.value];return M>x?1:-1})),I=()=>{f.value=[],g.value=[...u.value],N()},L=()=>{f.value=[...u.value],g.value=[],N()},k=(w,p)=>{const M=p?f:g,x=p?g:f,S=M.value.findIndex(H=>H[i.value]===w);x.value.push(...M.value.splice(S,1)),N()},N=()=>{const w=f.value.map(M=>M[i.value]),p=g.value.map(M=>M[i.value]);t("update:targetList",p),t("change",n.value===jn.BASE_ARRAY?w:f.value.map(M=>a.toRaw(M)),n.value===jn.BASE_ARRAY?p:g.value.map(M=>a.toRaw(M)),p)};return{selectSearchQuery:m,selectListSearch:y,selectedList:g,selectListSort:C,selectedListSort:v,settingCode:i,displayCode:o,allToRight:I,allToLeft:L,handleItemClick:k}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=u=>{var y,C;const d=u==="left-header",f=d?`${(y=this.title[0])!=null?y:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,g=d?!e.length:!t.length,m=()=>{g||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:g},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=u=>{var g;const d=u==="left-empty-content",f=(g=d?this.emptyContent[0]:this.emptyContent[1])!=null?g:d?"\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"},[f])},o=(u,d=!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"},[d?a.createVNode(rc,{class:"bk-icon"},null):a.createVNode(Rn,{class:"bk-icon"},null)])]),l=u=>{const d=u==="left",f=d?e:t,g=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(y=>{var C,v,I;return a.createVNode("li",{key:y[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(y[this.settingCode],d)},[(I=(v=(C=this.$slots)[g])==null?void 0:v.call(C,y))!=null?I:o(y,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(tr,{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),l("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),l("right")])])}});const Zh=_e(rN);var Ca=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Ca||{});const Zs=(...e)=>!0,aN={nodeClick:Zs,nodeCollapse:Zs,nodeExpand:Zs,nodeChecked:Zs};var se=(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))(se||{});const wi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},sN={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var oN=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Do,{scene:"part",type:n},{default:()=>{var i,o;return[(o=(i=t.default)==null?void 0:i.call(t))!=null?o:e.emptyText]}})}),Oo=(e,t)=>{const n=E=>e.schema.get(E),i=(E,ee)=>{var $;return($=n(E[se.UUID]))==null?void 0:$[ee]},o=(E,ee,$)=>{e.schema.set(E[se.UUID],Te(U({},n(E[se.UUID])),{[ee]:$}))},l=E=>i(E,se.PATH),u=E=>i(E,se.UUID),d=E=>i(E,se.IS_ROOT),f=E=>i(E,se.IS_OPEN),g=E=>i(E,se.HAS_CHILD),m=E=>i(E,se.IS_MATCH),y=E=>i(E,se.IS_CHECKED),C=E=>i(E,se.PARENT_ID),v=E=>i({[se.UUID]:E},se.PARENT_ID),I=E=>i(E,se.IS_LOADING),L=(E,ee)=>{o(E,se.IS_LOADING,ee)},k=E=>e.schema.delete(E),N=E=>n(C(E)),w=E=>{var ee;return typeof E=="object"?f(E):typeof E=="string"?(ee=n(E))==null?void 0:ee[se.IS_OPEN]:!1},p=E=>w(i(E,se.PARENT_ID)),M=E=>d(E)||p(E),x=E=>E.split("-").reduce(($,ue)=>{const fe=Number(ue);return Array.isArray($)?$[fe]:$[t.children][fe]},t.data),S=E=>{const ee=e.schema;return Array.prototype.filter.call(Array.from(ee.keys()),$=>ee.get($)[se.PARENT_ID]===E[se.UUID])},H=E=>x(l({[se.UUID]:E})),P=E=>d({[se.UUID]:E})?{[t.children]:t.data}:H(v(E)),Q=E=>({[wi[se.IS_LOADING]]:i(E,se.IS_LOADING),[wi[se.HAS_CHILD]]:g(E),[wi[se.IS_MATCH]]:m(E),[wi[se.IS_CHECKED]]:y(E),[wi[se.IS_OPEN]]:f(E),[wi[se.IS_ROOT]]:d(E),fullPath:i(E,se.PATH),uuid:u(E),parentId:i(E,se.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:u,getNodeParentId:C,getNodeParentIdById:v,getParentNodeData:P,getParentNode:N,setNodeAttr:o,getNodePath:l,isRootNode:d,isNodeOpened:f,hasChildNode:g,isItemOpen:w,isNodeChecked:y,isNodeMatched:m,isNodeLoading:I,checkNodeIsOpen:M,getSourceNodeByPath:x,getSourceNodeByUID:H,deleteNodeSchema:k,resolveScopedSlotParam:Q,setTreeNodeLoading:L,extendNodeAttr:E=>Te(U({},E),{[se.TREE_NODE_ATTR]:Q(E)}),getChildNodes:S}};const _h="1px dashed #c3cdd7",Yh=(e,t,n=null,i=null,o=null,l=[])=>{const u=e[t];return typeof u=="boolean"?u?i:o:Fh(n,e,t,l)},Fh=(e,t,n,i=[])=>{const o=t[n];if(typeof o=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,o)||console.error(`cannot find node label with key ${o}`),e[o]):o;if(typeof o=="function"){const l=o.apply(globalThis,[e,...i]);if(typeof l=="string")return l;console.error("props label with function return value is not string, please check and return string");return}},Uh=(e,t)=>Fh(e,t,"label"),Ec=(e,t)=>e.get(t)||{},lN=(e,t,n)=>{var i;return(i=Ec(e,t))==null?void 0:i[n]},uN=(e,t)=>({"--level-line":Yh(t,"levelLine",e,_h,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),cN=(e,t,n={})=>{const{schema:i}=n,o=lN(i,e[se.UUID],se.DEPTH);return U({"--depth":o},typeof t.levelLine=="function"?{"--level-line":Yh(t,"levelLine",e,_h,null,["node"])}:{})},dN=(e,t,n)=>{const{__is_root:i,__is_open:o}=Ec(t,e[se.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},fN=(e,t)=>{const{__is_checked:n,__is_selected:i}=Ec(t,e[se.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},hN=(e,t,n,i,o)=>{gN(e,t,n,{[i]:o})},gN=(e,t,n,i)=>{const l=e.split("-").reduce((u,d)=>{const f=Number(d);return Array.isArray(u)?u[f]:u[n][f]},t);Object.assign(l,i||{})},Ma=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[se.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,se.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var $h=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:o,resolveScopedSlotParam:l,setTreeNodeLoading:u}=Oo(t,e),d=(m,y)=>{if(typeof m=="object"&&m!==null){n(y,se.IS_OPEN,!0);const C=Array.isArray(m)?m:[m];return hN(i(y),e.data,e.children,e.children,C),Promise.resolve(m)}return Promise.resolve(m)},f=m=>{const{callback:y=null,cache:C=!0}=e.async||{};if(typeof y=="function"&&o(m,se.IS_ASYNC)){if(n(m,se.IS_ASYNC_INIT,!0),!o(m,se.IS_CACHED)){n(m,se.IS_CACHED,C);const v=l(m),I=y(m,L=>d(L,m),v);if(typeof I=="object"&&I!==null)return u(m,!0),I instanceof Promise?Promise.resolve(I.then(L=>d(L,m)).catch(L=>console.error("load remote data error:",L)).finally(()=>{u(m,!1),n(m,se.IS_CACHED,!0)})):(d(I,m),u(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},g=()=>{const m=t.data.filter(y=>o(y,se.IS_ASYNC)&&y[wi[se.IS_OPEN]]&&!o(y,se.IS_ASYNC_INIT));m.length&&Promise.all(m.map(y=>f(y))).then(()=>{g()}).catch(y=>{console.warn(y)})};return{asyncNodeClick:f,deepAutoOpen:g}},mN=(e,t,n,i,o,l)=>{let u=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:g,getNodeAttr:m,getNodeId:y,getChildNodes:C,isRootNode:v,hasChildNode:I,isItemOpen:L,isNodeOpened:k,isNodeLoading:N,isNodeChecked:w,getParentNode:p,resolveScopedSlotParam:M,extendNodeAttr:x}=Oo(n,e),{registerNextLoop:S}=l,{asyncNodeClick:H,deepAutoOpen:P}=$h(e,n),Q=Y=>L(Y)?a.createVNode(dc,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(fc,{class:[Be("tree-icon"),Be("node-prefix")]},null),O=Y=>{if(typeof Y=="string")return Y;if(typeof Y=="object"&&Y!==null){if(Y.__v_isVNode)return Y;const{node:ae,className:Me,text:j,style:W}=Y;return a.h(ae,{class:Me,style:W},j)}return null},E=Y=>{var ae,Me,j;return((j=(Me=(ae=t.slots).nodeLoading)==null?void 0:Me.call(ae,x(Y)))!=null?j:N(Y))?a.createVNode(xo,null,null):""},ee=Y=>{if(t.slots.nodeAction)return t.slots.nodeAction(x(Y));let ae=null;return N(Y)?E(Y):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(x(Y),"node_action"),ae!=="default")?O(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(I(Y)||Y.async||!e.autoCheckChildren)?L(Y)?a.createVNode(No,{class:Be("node-prefix")},null):a.createVNode(Ga,{class:Be("node-prefix")},null):null},$=Y=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(x(Y));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(x(Y),"node_type"),ae!=="default")?O(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?v(Y)||I(Y)?Q(Y):a.createVNode(yc,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},ue=(Y,ae)=>{const Me=p(Y);Me&&(d(Me,se.IS_CHECKED,ae),v(Me)||ue(Me,ae))},fe=(Y,ae,Me)=>{C(Y).forEach(j=>{d({[se.UUID]:j},ae,Me),fe({[se.UUID]:j},ae,Me)})},ge=(Y,ae)=>{d(Y,se.IS_CHECKED,!!ae),fe(Y,se.IS_CHECKED,!!ae),ue(Y,ae),t.emit(Ca.NODE_CHECKED,o.value.filter(Me=>w(Me)).map(Me=>Me[se.UUID]))},Ce=Y=>w(Y)&&!o.value.filter(ae=>{var Me;return(Me=f(ae))==null?void 0:Me.startsWith(f(Y))}).every(ae=>w(ae)),re=Y=>w(Y)||o.value.filter(ae=>{var Me;return(Me=f(ae))==null?void 0:Me.startsWith(f(Y))}).some(ae=>w(ae)),X=Y=>e.showCheckbox?a.createVNode(nr,{size:"small",modelValue:re(Y),indeterminate:Ce(Y),onChange:ae=>ge(Y,ae)},null):null,A=(Y,ae=null,Me=null,j=!0)=>{const W=ae===null?!L(Y):!!ae;if(W||fe(Y,se.IS_OPEN,W),d(Y,se.IS_OPEN,W),j){const J=L(Y)?Ca.NODE_EXPAND:Ca.NODE_COLLAPSE;t.emit(J,Y,M(Y),g(Y[se.UUID]),Me)}},R=(Y,ae,Me)=>{if(Array.isArray(Y)){Y.forEach(j=>d(Ma(j),ae,Me));return}d(Ma(Y),ae,Me)},q=(Y,ae=!0,Me=!1)=>{const j=Ma(Y);if(!j[se.IS_NULL])if(Me)if(ae){if(R(j,se.IS_OPEN,!0),!v(j)){const W=m(j,se.PARENT_ID);q(W,!0,!0)}}else A(j,!1,null,!1);else R(j,se.IS_OPEN,ae)},K=(Y,ae)=>{if(k(Y)){A(Y,!1,ae);return}H(Y).finally(()=>{m(Y,se.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>A(Y,!0,ae)}):A(Y,!0,ae)})},he=(Y,ae)=>{Y.stopImmediatePropagation(),Y.stopPropagation(),Y.preventDefault(),K(ae,Y)},le=(Y,ae=!0,Me=!0)=>{const j=Array.isArray(Y)?Y:[Y];if(!j.length)return;const W=Ma(j[0]);W[se.IS_NULL]||(e.selectable?(u!=null&&d({[se.UUID]:u},se.IS_SELECTED,!ae),e.selected&&e.selected!==u&&d({[se.UUID]:e.selected},se.IS_SELECTED,!ae),d(W,se.IS_SELECTED,ae),u=y(W),Me&&j.length===1&&q(W,!0,!0),m(W,se.IS_ASYNC)&&H(W).then(()=>{a.nextTick(()=>{j.shift(),le(j,ae,Me)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(Y,ae)=>{le(Y,!0,!1),k(Y)||K(Y,ae);const Me=Ca.NODE_CLICK;t.emit(Me,Y,M(Y),g(Y[se.UUID]),ae)},te=(Y,ae)=>{if(v(ae))return!1;const Me=f(ae),j=`${Me}`.split("-").slice(0,Y+1);if(j.join("-")===Me)return!0;const J=j.pop(),G=parseInt(J,10);j.push(`${G+1}`);const _=j.join("-");return o.value.some(ne=>ne[se.PATH]===_)},ve=Y=>{if(!e.levelLine)return null;const ae=j=>({"--depth":j}),Me=m(Y,se.DEPTH)+1;return new Array(Me).fill("").map((j,W)=>W).filter(j=>te(j,Y)).filter(j=>j>0).map(j=>a.createVNode("span",{class:"node-virtual-line",style:ae(Me-j)},null))};return{renderTreeNode:Y=>{var ae,Me,j,W,J;return a.createVNode("div",{"data-tree-node":y(Y),key:y(Y),class:fN(Y,n.schema)},[a.createVNode("div",{class:dN(Y,n.schema,e),style:cN(Y,e,n),onClick:G=>pe(Y,G)},[a.createVNode("span",{class:[Be("node-action")],onClick:G=>he(G,Y)},[ee(Y)]),a.createVNode("span",{class:Be("node-content")},[[X(Y),$(Y)],a.createVNode("span",{class:Be("node-text")},[(j=(Me=(ae=t.slots).node)==null?void 0:Me.call(ae,x(Y)))!=null?j:[Uh(Y,e)]]),(J=(W=t.slots).nodeAppend)==null?void 0:J.call(W,x(Y))]),ve(Y)])])},hanldeTreeNodeClick:K,deepAutoOpen:P,asyncNodeClick:H,setNodeAction:R,setNodeOpened:A,setSelect:le,setOpen:q}},pN=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:o,getParentNodeData:l,getNodeAttr:u,getNodePath:d,isRootNode:f}=Oo(n,e),g=w=>w.target.closest("[data-tree-node]"),m=w=>{g(w).removeEventListener("mouseup",m)},y=w=>{const p=g(w);p.setAttribute("draggable","true"),p.addEventListener("mouseup",m)},C=w=>{w.preventDefault();const p=g(w),M=w.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node"),S=L(M,x)?"move":"none";w.dataTransfer.effectAllowed=S,w.dataTransfer.dropEffect=S},v=w=>{w.dataTransfer.effectAllowed="move",w.dataTransfer.dropEffect="move";const p=g(w);w.dataTransfer.setData("text/plain",""),w.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},I=w=>{w.preventDefault(),w.stopPropagation();const p=g(w),M=w.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:N,globalThis,[M,x])},L=(w,p)=>{const M=d({[se.UUID]:w}),x=d({[se.UUID]:p}),S=o(w),H=o(p);return S===H?!0:M.indexOf(x)===-1&&x.indexOf(M)===-1},k=(w,p)=>{if(!L(w,p))return;const M=JSON.parse(JSON.stringify(i(w))),x=JSON.parse(JSON.stringify(i(p))),S=l(w),H=l(p),P=u({[se.UUID]:w},se.INDEX),Q=u({[se.UUID]:p},se.INDEX);S==null||S[e.children].splice(P,1,x),H==null||H[e.children].splice(Q,1,M)},N=(w,p)=>{const M=i(w),x=i(p);let S=null;if(f({[se.UUID]:w}))S=e.data;else{const H=o(w);if(H!=null){S=i(H);const P=u({[se.UUID]:w},se.INDEX);S==null||S[e.children].splice(P,1)}}x[e.children]||(x[e.children]=[]),x[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const w=t.value.$el;w.addEventListener("mousedown",y),w.addEventListener("dragstart",v),w.addEventListener("dragover",C),w.addEventListener("drop",I)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const w=t.value.$el;w.removeEventListener("mousedown",y),w.removeEventListener("dragstart",v),w.removeEventListener("dragover",C),w.removeEventListener("drop",I)}})},vN=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},o=v=>["string","number","boolean"].includes(typeof v),l=(v,I)=>v===I,u=(v,I)=>new RegExp(`${v}`,"i").test(`${I}`),d=(v,I)=>Reflect.apply(v,globalThis,I),f=t.value===void 0||t.value===!1,g=(v,I)=>{if(f)return!0;if(o(t.value))return d(u,[t.value,v,I]);const{value:L="",match:k="fuzzy"}=t.value,w=typeof k=="function"?k:k==="fuzzy"?u:l;return`${L}`.length===0?!0:d(w,[L,v,I])},m=a.computed(()=>t.value!==!1&&(o(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:g,refSearch:t,isSearchActive:m,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},yN=e=>{var k;const t=(N,w=void 0,p=[])=>{const{data:M,children:x}=N,S=[],H=[];let P=0;const Q=new Map;function O(re,X,A,R){if(re!=null&&Q.has(re)&&![se.UUID,se.PARENT_ID].includes(X)){const q=Q.get(re);Object.prototype.hasOwnProperty.call(q,X)&&typeof R=="function"&&Reflect.apply(R,self,[q,X,A])&&(Object.assign(q,{[X]:A}),O(q[se.PARENT_ID],X,A,R))}}function E(re){let X=null;return typeof N.nodeKey=="string"&&(X=re[N.nodeKey]||Fi.v4()),X||re[se.UUID]||Fi.v4()}const ee={[se.IS_OPEN]:()=>!1,[se.IS_CHECKED]:()=>!1,[se.IS_MATCH]:()=>!0,[se.IS_SELECTED]:re=>N.selected===re,[se.IS_CACHED]:()=>!1,[se.IS_ASYNC]:()=>null,[se.IS_LOADING]:()=>!1};function $(re,X,A,R=void 0){let q=R;R===void 0&&typeof ee[A]=="function"&&(q=ee[A](re,X));const K=wi[A];if(Object.prototype.hasOwnProperty.call(X,K))return X[K];const he=(p||[]).find(pe=>pe[se.UUID]===re);let le;return he&&(le=he[A]),le==null&&(le=q),le}function ue(re,X){return N.selectable?$(re,X,se.IS_SELECTED,N.selected===re):!1}function fe(re,X,A){var K;const R=$(re,X,se.IS_OPEN),q=Q.has(A)?(K=Q.get(A))==null?void 0:K[se.IS_OPEN]:!0;return R&&q}function ge(re){return!re[se.IS_OPEN]}function Ce(re,X=0,A=null,R=null){const q=re.length;for(let K=0;K<q;K++){const he=re[K];if(Array.isArray(he))Ce(he,X,A,R);else if(typeof he=="object"&&he!==null){const le=R!==null?`${R}-${K}`:`${K}`,pe=`${E(he)}`,te=!!(he[x]||[]).length;let ve=$(pe,he,se.IS_OPEN);N.autoOpenParentNode?ve&&O(A,se.IS_OPEN,!0,ge):ve=fe(pe,he,A),Object.assign(he,{[se.UUID]:pe});const ye=N.showCheckbox&&$(pe,he,se.IS_CHECKED);ye&&S.push(pe),Q.set(pe,{[se.DEPTH]:X,[se.INDEX]:K,[se.UUID]:pe,[se.PARENT_ID]:A,[se.HAS_CHILD]:te,[se.PATH]:le,[se.IS_ROOT]:A===null,[se.ORDER]:P,[se.IS_SELECTED]:ue(pe,he),[se.IS_MATCH]:$(pe,he,se.IS_MATCH),[se.IS_OPEN]:ve,[se.IS_CHECKED]:ye,[se.IS_CACHED]:$(pe,he,se.IS_CACHED),[se.IS_ASYNC]:$(pe,he,se.IS_ASYNC),[se.IS_LOADING]:$(pe,he,se.IS_LOADING),[x]:null}),P+=1,H.push(Te(U({},JSON.parse(JSON.stringify(he,(Y,ae)=>Y===N.children?null:ae))),{[se.IS_OPEN]:ve,[x]:null})),Object.prototype.hasOwnProperty.call(he,x)&&Ce(he[x]||[],X+1,pe,le)}}}return Ce(w||M),N.showCheckbox&&(S==null||S.forEach(re=>{Array.from(Q.values()).filter(X=>{var A;return(A=X[se.PATH])==null?void 0:A.startsWith(Q.get(re)[se.PATH])}).forEach(X=>Object.assign(X,{[se.IS_CHECKED]:!0})),O(re,se.IS_CHECKED,!0,()=>!0)})),[H,Q]},n=t(e),i=new Map,o=[],l=[],u=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:f,deepAutoOpen:g}=$h(e,u),m=N=>{o.push(N)},y=(N,w,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,w)},C=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),v=N=>{var p;const w=C(N);return w!==null&&Reflect.apply(w.fn,globalThis,[]),(p=w==null?void 0:w.type)!=null?p:"once"},I=()=>{Array.from(i.keys()).forEach(N=>{const w=i.get(N);if(Array.isArray(w)){const p=[];w.forEach((M,x)=>{v(M)==="once"&&p.unshift(x)}),p.length&&p.forEach(M=>w.splice(M,1)),w.length===0&&i.delete(N)}else v(w)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,M;const w=t(e,N,d.value);u.data=w[0],u.schema=w[1],((p=e.async)==null?void 0:p.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&g(),I()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{l.length=0,o.forEach(w=>{Reflect.apply(w,globalThis,[N]),l.push(()=>Reflect.apply(w,globalThis,[N]))}),y("afterSelectWatch",l)},{immediate:!0});const L=N=>{y("afterDataUpdate",N)};return(k=e.async)!=null&&k.callback&&g(),{flatData:u,schemaValues:d,asyncNodeClick:f,deepAutoOpen:g,afterDataUpdate:L,registerNextLoop:y,onSelected:m}},bN=a.defineComponent({name:"Tree",props:sN,emits:aN,setup(e,t){const{flatData:n,schemaValues:i,onSelected:o,registerNextLoop:l}=yN(e),{setNodeAttr:u,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:g,isRootNode:m,isNodeOpened:y,isNodeChecked:C,isNodeMatched:v,hasChildNode:I}=Oo(n,e),{searchFn:L,isSearchActive:k,refSearch:N,openResultNode:w,isTreeUI:p,isSearchDisabled:M}=vN(e);M||a.watch([N],()=>{n.data.forEach(X=>{const A=L(Uh(X,e),X);u(X,se.IS_MATCH,A),w&&O(X,!0,!0)})});const x=X=>{if(k.value){const A=()=>p?i.value.some(R=>{var q;return((q=R[se.PATH])==null?void 0:q.startsWith(g(X)))&&R[se.IS_MATCH]}):!1;return f(X,se.IS_MATCH)||A()}return!0},S=a.computed(()=>n.data.filter(X=>d(X)&&x(X))),{renderTreeNode:H,hanldeTreeNodeClick:P,setNodeOpened:Q,setOpen:O,setNodeAction:E,setSelect:ee,asyncNodeClick:$}=mN(e,t,n,S,i,{registerNextLoop:l}),ue=(X,A=!0)=>{E(Ma(X),se.IS_CHECKED,A)};o(X=>{ee(X,!0,e.autoOpenParentNode)});const fe=()=>n;t.expose({hanldeTreeNodeClick:P,isNodeChecked:C,isRootNode:m,isNodeOpened:y,isNodeMatched:v,hasChildNode:I,setOpen:O,setChecked:ue,setNodeAction:E,setNodeOpened:Q,setSelect:ee,asyncNodeClick:$,getData:fe});const ge=a.ref(),{renderEmpty:Ce}=oN(e,t);pN(e,ge,n);const re=X=>{if(X.length)return X.map(H);const A=k.value?"search-empty":"empty";return Ce(A)};return()=>a.createVNode(Ao,{class:Be("tree"),style:uN(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:ge},{default:X=>re(X.data||[])})}});const Xh=_e(bN),T9=e=>e.__v_isVNode;var CN=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(T9(e[n])){i=e[n];break}n=n+1}let o=t-1,l=null;for(;o>=0&&o>n;){if(T9(e[o])){l=e[o];break}o=o-1}if(i&&l){i.props||(i.props={});let u="bk-compose-form-item-head";i.props.class&&(u+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=u,l.props||(l.props={});let d="bk-compose-form-item-tail";l.props.class&&(d+=` ${l.props.class}`),this.tailBackgroundColor&&(l.props.style=Object.assign(l.props.style||{},{"background-color":this.tailBackgroundColor})),l.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const MN={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var IN=a.defineComponent({name:"Form",props:MN,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},o=f=>{n=n.reduce((g,m)=>(m!==f&&g.push(m),g),[])};return a.provide(b3,{props:e,register:i,unregister:o}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let g={};return f?g=(typeof f=="string"?[f]:f).reduce((y,C)=>Te(U({},y),{[C]:!0}),{}):g=n.reduce((m,y)=>y.property?Te(U({},m),{[y.property]:!0}):m,{}),Promise.all(n.reduce((m,y)=>(g[y.property]&&m.push(y.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let g={};f?g=(typeof f=="string"?[f]:f).reduce((y,C)=>Te(U({},y),{[C]:!0}),{}):g=n.reduce((m,y)=>Te(U({},m),{[y.property]:!0}),{}),n.forEach(m=>g[m.property]&&m.clearValidate())}}},render(){var t,n;const e=Se({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}}),Cn={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 wN={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},NN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),LN=e=>{const t=[];return e.required&&t.push({validator:Cn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Cn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Cn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Cn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Cn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},kN=(e,t)=>{const n=e.reduce((i,o)=>{let l;if(o.required)l=Cn.required;else if(o.email)l=Cn.email;else if(Number(o.max)>-1)l=u=>Cn.max(u,o.max);else if(Number(o.min)>-1)l=u=>Cn.min(u,o.max);else if(Number(o.maxlength)>-1)l=u=>Cn.min(u,o.max);else if(Object.prototype.toString.call(o.pattern)==="[object RegExp]")l=u=>Cn.pattern(u,o.pattern);else if(Object.prototype.toString.call(o.validator)==="[object Function]")l=o.validator;else return i;return i.push({validator:l,message:o.message,trigger:o.trigger}),i},[]);return[...t,...n]},xN=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),S9=e=>e!==void 0;var TN=a.defineComponent({name:"FormItem",directives:{bkTooltips:Nc},props:wN,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=Zy(),o=Boolean(i),l=a.computed(()=>o?i.props.formType==="vertical":!1),u=a.computed(()=>{const g={width:"",paddingRight:"",textAlign:""},m=S9(e.labelWidth)?e.labelWidth:o&&i.props.labelWidth;S9(m)&&(g.width=`${m}px`,g.paddingRight=m?"":"0px");const y=e.labelPosition||o&&i.props.labelPosition;return y&&(g["text-align"]=y),g}),d=g=>{if(n.isError=!1,n.errorMessage="",!e.property||o&&!i.props.model)return Promise.resolve(!0);let m=[];o&&i.props.rules&&NN(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=xN(g,kN(m,LN(e)));const y=qt.exports.get(i.props.model,e.property),C=(()=>{let v=-1;return()=>{if(v=v+1,v>=m.length)return Promise.resolve(!0);const I=m[v];return Promise.resolve().then(()=>{const L=I.validator(y);return typeof L!="boolean"&&typeof L.then=="function"?L.then(k=>{if(k===!1)return Promise.reject(I.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))):L?C():(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))})}})();return C()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(C3,Te(U({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{o&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{o&&i.unregister(t.proxy)}),Te(U({},a.toRefs(n)),{labelStyles:u,isFormTypeVertical:l,validate:d,clearValidate:f})},render(){var i,o,l,u;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,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(uc,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(),this.isFormTypeVertical&&((o=(i=this.$slots).labelAppend)==null?void 0:o.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(u=(l=this.$slots).default)==null?void 0:u.call(l),n()])])}});const Kh=Zt(IN,{FormItem:TN,ComposeFormItem:CN}),SN={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var DN=a.defineComponent({name:"Col",props:SN,emits:[],setup(e,t){const{col:n,gutter:i,flex:o}=a.inject("containerProps"),{span:l,offset:u,pull:d,push:f}=e,g=a.computed(()=>l||n);a.provide("containerProps",{col:g.value,gutter:i,flex:o});const m=function(C){return`${Number((C*100).toFixed(3))}%`},y=a.computed(()=>({width:m(g.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":u?m(u/n):null,right:d?m(d/n):null,left:f?m(f/n):null}));return()=>{var C,v;return a.createVNode("div",{class:"bk-grid-col",style:y.value},[(v=(C=t.slots).default)==null?void 0:v.call(C)])}}});const jN={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var zN=a.defineComponent({name:"Container",props:jN,emits:[],setup(e,t){const{col:n,gutter:i,flex:o,extCls:l}=e;a.provide("containerProps",{col:n,gutter:i,flex:o});const u=a.computed(()=>l?`bk-grid-container ${l}`:"bk-grid-container"),d=a.computed(()=>{const{margin:f}=e;return{"padding-right":`${f}px`,"padding-left":`${f}px`}});return()=>{var f,g;return a.createVNode("div",{class:u.value,style:d.value},[(g=(f=t.slots).default)==null?void 0:g.call(f)])}}}),PN=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:o}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:o});const l=a.computed(()=>Te(U({},o?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var u,d;return a.createVNode("div",{class:"bk-grid-row",style:l.value},[(d=(u=t.slots).default)==null?void 0:d.call(u)])}}});const ho=Zt(zN,{Row:PN,Col:DN}),AN=["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"],ON=["hover","click","manual"];var EN=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(AN,"placement").def("bottom"),trigger:h.commonType(ON,"trigger").def("hover"),disabled:h.bool.def(!1),popoverOptions:h.object.def({}),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=l=>{t("showChange",l)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=Se({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=qt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Gr,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,o;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(o=(i=this.$slots).default)==null?void 0:o.call(i),a.createTextVNode(" ")])},content:()=>{var i,o;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(o=(i=this.$slots).content)==null?void 0:o.call(i),a.createTextVNode(" ")])}})])}}),JN=a.defineComponent({name:"DropdownItem",props:{extCls:h.string},emits:["click"],setup(e,{emit:t}){const n=o=>{o.stopPropagation(),t("click",o)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),QN=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 qh=Zt(EN,{DropdownMenu:QN,DropdownItem:JN});var Eu=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),o=a.ref([]),l=a.ref([]),u=L=>{L.config.multiple?l.value=n.getCheckedNodes().map(k=>k.path):l.value=L.path,t("input",l.value)},d=()=>{t("input",[])},f=L=>{L.forEach(k=>{const N=n.getNodeById(k);g(N)}),l.value=L},g=L=>{var k;if(!L.isDisabled){if(i.list=i.list.slice(0,L.level),o.value=o.value.slice(0,L.level-1),(k=L.children)!=null&&k.length){i.list.push(L.children),o.value.push(L);return}if(n.config.isRemote&&!L.isLeaf){L.loading=!0;const N=w=>{n.appendNodes(w,L||null),i.list.push(L.children),o.value.push(L),L.loading=!1};n.config.remoteMethod(L,N)}}};return{menus:i,activePath:o,nodeExpandHandler:g,isNodeInPath:L=>(o.value[L.level-1]||{}).id===L.id,nodeEvent:L=>{const{trigger:k,checkAnyLevel:N,multiple:w}=L.config;return{onClick:M=>{(!L.isLeaf||w)&&M.stopPropagation(),k==="click"&&g(L),N&&!w&&u(L),L.isLeaf&&!w&&u(L)},onMouseenter:()=>{k==="hover"&&g(L)}}},isCheckedNode:(L,k)=>{const{multiple:N}=L.config;return N?!1:I3(k,L.path)},checkValue:l,nodeClear:d,checkNode:(L,k)=>{L.setNodeCheck(k),u(L)},iconRender:L=>L.loading?a.createVNode(xo,{class:"icon-spinner"},null):a.createVNode(Jn,{class:"icon-angle-right"},null),syncCheckedValue:f}},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(nr,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"bk-cascader-node-name"},[t.name]),t.isLeaf?"":this.iconRender(t)]))]))])}});class go{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const o=this.data[i];this.children=(o||[]).map(l=>new go(l,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(l=>l.id),this.pathNames=this.pathNodes.map(l=>l.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const e6=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(e6(i.children,t))),n),[]);class VN{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new go(i,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return e6(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(o=>I3(o.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new go(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var RN=a.defineComponent({name:"Cascader",directives:{clickoutside:Hr},components:{CascaderPanel:Eu,BkPopover:rr},props:{modelValue:h.oneOfType([h.arrayOf(h.number).def([]),h.arrayOf(h.string).def([])]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:o,setHover:l,cancelHover:u}=dh(),d=a.reactive(new VN(e)),f=a.ref(!1),g=a.ref(""),m=a.ref([]),y=a.ref(e.modelValue),C=a.ref();a.watch(()=>e.modelValue,p=>{v(p)});const v=p=>{if(C.value.syncCheckedValue(p),i){m.value=d.getCheckedNodes().map(M=>({text:M.pathNames.join(n),key:M.id}));return}if(p.length===0)g.value="";else{const M=d.getNodeByValue(p);g.value=M.pathNames.join(n)}};return{store:d,updateValue:v,hidePopover:()=>{f.value=!1},inputClickHandler:p=>{p.stopPropagation(),f.value=!f.value,t("toggle",f.value)},selectedText:g,checkedValue:y,panelShow:f,handleClear:p=>{p.stopPropagation(),v([]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},isHover:o,setHover:l,cancelHover:u,selectedTags:m,removeTag:(p,M,x)=>{x.stopPropagation();const S=JSON.parse(JSON.stringify(p));S.splice(M,1),v(S)},inputChangeHandler:p=>{v(p),t("update:modelValue",p),t("change",p)},cascaderPanel:C}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Vn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Rr,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Rn,{class:"bk-icon-clear-icon",onClick:o=>this.removeTag(this.modelValue,i,o)},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(rr,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,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(Eu,{store:this.store,ref:"cascaderPanel",onInput:n=>this.inputChangeHandler(n)},null)])})])}});const t6=Zt(RN,{CascaderPanel:Eu});var D9=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),i=a.ref(!1),o=a.ref(0),l=a.ref(0),u=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),g=a.ref(0),m=a.ref(0),y=a.ref(!1),C=a.ref(null),v=a.computed(()=>{var Q,O;let H="";if((Q=e.params.customContent)!=null&&Q[e.modelValue]){const E=e.params.customContent[e.modelValue];H=E.tip||E.label||""}const P=e.params.vertical?"right":"top";return(O=e.params)!=null&&O.showTip?{content:e.params.formatterTipLabel(`${H||(e==null?void 0:e.modelValue)||"0"}`),placement:P}:{content:"",placement:P}}),I=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),L=a.computed(()=>e.params.vertical?{bottom:I.value}:{left:I.value}),k=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=H=>{e.params.disable||(H.preventDefault(),w(H),Ia(window,"mousemove",p),Ia(window,"touchmove",p),Ia(window,"mouseup",M),Ia(window,"touchend",M))},w=H=>{n.value=!0,i.value=!0,e.params.vertical?o.value=H.clientY:l.value=H.clientX,u.value=parseFloat(I.value),d.value=u.value},p=H=>{if(n.value){i.value=!1,t("resetSize");let P=0;e.params.vertical?(g.value=H.clientY,P=(o.value-g.value)/e.params.sliderSize*100):(m.value=H.clientX,P=(m.value-l.value)/e.params.sliderSize*100),d.value=u.value+P,x(d.value)}},M=()=>{y.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(x(d.value),t("emitChange"))},0),_s(window,"mousemove",p),_s(window,"touchmove",p),_s(window,"mouseup",M),_s(window,"touchend",M))},x=H=>{if(H===null||isNaN(H))return;H<0?d.value=0:H>100&&(d.value=100);const P=100/((e.params.maxValue-e.params.minValue)/e.params.step);let O=Math.round(H/P)*P*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;O=parseFloat(O.toFixed(e.params.precision)),t("update:modelValue",O),!n.value&&e.modelValue!==f.value&&(f.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:C,tabindex:"0",style:L.value,onClick:H=>H.stopPropagation(),onMousedown:N},[Boolean(v.value.content)?a.createVNode(rr,{content:v.value.content,theme:"dark",placement:v.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"]},[k.value]):void 0]),setPosition:x,tip:v}},render(){return this.renderDom()}});const Ia=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},_s=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var WN=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),o=a.ref(null),l=a.ref(null),u=a.ref(null),d=a.ref(0),f=a.ref(0),g=a.ref(null),m=a.ref(null),y=a.ref(null),C=a.ref(null),v=a.computed(()=>{const A=[e.minValue,e.maxValue,e.step].map(R=>{const q=`${R}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,A)}),I=a.computed(()=>Math.min(o.value,l.value)),L=a.computed(()=>Math.max(o.value,l.value)),k=a.computed(()=>e.range?`${100*(L.value-I.value)/(e.maxValue-e.minValue)}%`:`${100*(o.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(I.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),w=a.computed(()=>e.vertical?{height:k.value,bottom:N.value}:{width:k.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const A=(e.maxValue-e.minValue)/e.step,R=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<A;K++)q.push(K*R);return e.range?q.filter(K=>K<100*(I.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(o.value-e.minValue)/(e.maxValue-e.minValue))}),M=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),x=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const A=100*e.step/(e.maxValue-e.minValue),R=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const he={stepWidth:K*A,stepLabel:e.formatterLabel(q)};R.push(he)}return R}),S=a.computed(()=>Array.isArray(e.modelValue)),H=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((A,R)=>Number(A)-Number(R)).filter(A=>Number(A)>=e.minValue&&Number(A)<=e.maxValue).map(A=>{const{tip:R}=e.customContent[A],{label:q}=e.customContent[A];return{tip:R||q||"",label:q||"",percent:(Number(A)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),P=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:v.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ee()}),a.watch(()=>o.value,A=>{e.range?n("update:modelValue",[I.value,L.value]):n("update:modelValue",A),d.value=A}),a.watch(()=>l.value,A=>{n("update:modelValue",[I.value,L.value]),f.value=A}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(o.value=Math.max(e.minValue,Number(e.modelValue[0])),l.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(o.value=e.minValue,l.value=e.maxValue),u.value=[o.value,l.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?o.value=e.minValue:o.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=o.value),Q(),Ia(window,"resize",Q())});const Q=()=>{g.value&&(i.value=g.value[`client${e.vertical?"Height":"Width"}`])},O=A=>{var R,q;if(A.stopPropagation(),!e.disable){if(Q(),e.vertical){const K=(R=g.value)==null?void 0:R.getBoundingClientRect().bottom;fe((K-A.clientY)/i.value*100)}else{const K=(q=g.value)==null?void 0:q.getBoundingClientRect().left;fe((A.clientX-K)/i.value*100)}$()}},E=()=>e.range?![I.value,L.value].every((A,R)=>A===u.value[R]):e.modelValue!==u.value,ee=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const A=e.modelValue;e.range&&Array.isArray(A)?A[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):A[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):A[0]<e.minValue?n("update:modelValue",[e.minValue,A[1]]):A[1]>e.maxValue?n("update:modelValue",[A[0],e.maxValue]):(o.value=Number(A[0]),l.value=Number(A[1]),E()&&(u.value=A.slice())):!e.range&&typeof A=="number"&&!isNaN(A)&&(A<e.minValue?n("update:modelValue",e.minValue):A>e.maxValue?n("update:modelValue",e.maxValue):(o.value=A,E()&&(u.value=A)))},$=async()=>{await a.nextTick(),n("change",e.range?[I.value,L.value]:e.modelValue)},ue=A=>e.vertical?{bottom:`${A}%`}:{left:`${A}%`},fe=A=>{if(!e.range){m.value.setPosition(A);return}const R=e.minValue+A*(e.maxValue-e.minValue)/100;Math.abs(I.value-R)<Math.abs(L.value-R)?C.value=o.value<l.value?m.value:y.value:C.value=o.value>l.value?m.value:y.value,C.value.setPosition(A)},ge=A=>{if(A==="")return;const R=parseFloat(A);R<e.minValue?(d.value=e.minValue,o.value=e.minValue):R>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=R},Ce=A=>{if(A===""||typeof A=="number")return;const R=parseFloat(A);R<e.minValue?(f.value=e.minValue,l.value=e.minValue):R>e.maxValue?(f.value=e.maxValue,l.value=e.maxValue):l.value=R},re=A=>{let R=0;return A==="start"?R=e.vertical?e.maxValue:e.minValue:R=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[o.value,l.value].includes(R)?"0":"1"};return{renderDom:()=>{var A,R;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(A=t.start)==null?void 0:A.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:g,style:M.value,onClick:O},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:w.value},null),e.showInterval?p.value.map((q,K)=>a.createVNode("div",{key:K,class:["bk-slider-interval",{vertical:e.vertical}],style:ue(q)},null)):void 0,e.customContent?H.value.map((q,K)=>a.createVNode("div",{key:K,class:["bk-slider-interval",{vertical:e.vertical}],style:ue(q.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:re("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:re("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return x.value.map((q,K)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:K,style:ue(q.stepWidth)},[q.stepLabel]));if(e.customContent)return H.value.map((q,K)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:K,style:ue(q.percent)},[q.label]))}()]):void 0,a.createVNode(D9,{modelValue:o.value,"onUpdate:modelValue":q=>o.value=q,ref:m,params:P.value,onEmitChange:$,onResetSize:Q},null),e.range?a.createVNode(D9,{modelValue:l.value,"onUpdate:modelValue":q=>l.value=q,ref:y,params:P.value,onEmitChange:$,onResetSize:Q},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(tr,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ge},null)]),S.value&&l.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(tr,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:Ce},null)])]:void 0]):void 0,(R=t.end)==null?void 0:R.call(t)])}}},render(){return this.renderDom()}});const n6=_e(WN);var HN=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:o,triggerWidth:l,max:u,min:d,immediate:f,autoMinimize:g}=a.toRefs(e),m=a.ref(!1),y=a.ref(!0),C=a.ref(!1),v=a.ref(null),I=a.ref({}),L=a.ref(null),k=a.ref(null),N=a.ref(null),w=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>p.value?"width":"height"),x=a.computed(()=>{let re=i.value;return typeof re=="number"&&(re=`${re}px`),{[M.value]:re}}),S=a.computed(()=>({[`margin-${n.value}`]:`${o.value-l.value}px`,[M.value]:`${l.value}px`})),H=a.computed(()=>g.value?typeof g.value=="boolean"?50:g.value:0),P=()=>{const re=L.value.getBoundingClientRect();v.value=p.value?re.width:re.height},Q=new ResizeObserver(P),O=()=>{switch(k.value.style.visibility="visible",n.value){case"left":k.value.style.inset=`0 auto auto ${I.value.aside.width}px`;break;case"right":k.value.style.inset=`0 ${I.value.aside.width}px auto auto`;break;case"top":k.value.style.inset=`${I.value.aside.height}px auto auto 0`;break;case"bottom":k.value.style.inset=`auto auto ${I.value.aside.height}px 0`;break}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},ee=re=>Math.min(u.value,Math.max(d.value,re),v.value-l.value),$=re=>{t("before-resize",re);const X=w.value.getBoundingClientRect();I.value=Object.freeze({mouse:{clientX:re.clientX,clientY:re.clientY},aside:{width:X.width,height:X.height}}),E(),f.value||O(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const A=K=>{t("resizing",K)},R=K=>{let he;switch(n.value){case"top":he=K.clientY-I.value.mouse.clientY;break;case"right":he=I.value.mouse.clientX-K.clientX;break;case"bottom":he=I.value.mouse.clientY-K.clientY;break;case"left":he=K.clientX-I.value.mouse.clientX}const le=I.value.aside[M.value]+he,pe=ee(le)+o.value,te=`${pe}px`;f.value?w.value.style[M.value]=te:k.value.style[n.value]=te,A(pe)},q=()=>{if(k.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",q),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ue(),t("after-resize",parseFloat(k.value.style[n.value]))}),f.value)return!1;w.value.style[M.value]=k.value.style[n.value]};document.addEventListener("mousemove",R),document.addEventListener("mouseup",q)},ue=()=>{if(!g.value)return!1;const re=w.value.getBoundingClientRect();if(C.value=m.value=re[M.value]<=H.value,!C.value)return y.value=!0,!1;ge(),a.nextTick(()=>{w.value.setAttribute(`data-${M.value}`,x.value[M.value])})},fe=re=>{m.value=typeof re=="boolean"?re:!m.value,ge(),t("collapse-change",m.value)},ge=()=>{const re=w.value.getBoundingClientRect();Ce(!m.value),m.value?(w.value.setAttribute(`data-${M.value}`,`${re[M.value]}px`),w.value.style[M.value]="5px"):(y.value=!0,w.value.style[M.value]=w.value.getAttribute(`data-${M.value}`))},Ce=re=>{const X=()=>{y.value=re,w.value.style.transition="",w.value.removeEventListener("transitionend",X)};w.value.addEventListener("transitionend",X),w.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{Q.observe(L.value)}),a.onBeforeUnmount(()=>{Q.unobserve(L.value)}),{collapsed:m,asideContentVisible:y,minimized:C,limitMax:v,state:I,vertical:p,cssPropKey:M,bkResizeLayoutRef:L,resizeProxyRef:k,resizeMaskRef:N,asideRef:w,triggerStyle:S,asideStyle:x,handleMousedown:$,setCollapse:fe}},render(){var t,n,i,o,l,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"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((o=(i=this.$slots)["collapse-trigger"])==null?void 0:o.call(i))||(this.collapsed?a.createVNode(Jn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(qi,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(l=this.$slots).main)==null?void 0:u.call(l)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const i6=_e(HN),BN={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var GN=a.defineComponent({name:"Timeline",props:BN,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=u=>{const d=[];u.forEach(f=>{var g;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(g=f.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...d)},o=()=>{var u;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(u=e.list)!=null&&u.length&&i(e.list)},l=u=>{try{t("select",u)}catch(d){console.warn(d)}};return a.onMounted(o),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:l}},render(){const e=n=>{const{icon:i}=n;return i?typeof i=="function":!1},t=n=>{const i="bk-timeline",o=["blue","red","green","yellow","gray"],l=n.type?`${i}-${n.type}`:`${i}-default`,u=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",f=n.color&&o.includes(n.color)?`${i}-${n.color}`:"";return Se({},`${i} ${l} ${u} ${f} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,o,l;return a.createVNode("li",{class:["bk-timeline-dot",t(n)]},[e(n)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:n.border?`2px solid ${n.color}`:"0px",borderRadius:n.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(n.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(n)}},[(l=(o=(i=this.$slots).default)==null?void 0:o.call(i))!=null?l:a.createVNode("span",{innerHTML:n.tag},null)]),n.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:n.content},null):""])])})])}});const r6=_e(GN),ZN={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var _N=a.defineComponent({name:"BKProcess",props:ZN,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),o=()=>{var u;n.value.splice(0,n.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&&n.value.splice(0,n.value.length,...e.list)},l=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(d){console.warn(d)}};return a.onMounted(o),{defaultProcessList:n,paddingBottom:i,jumpTo:l}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",o=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",l=d=>d.icon?d.icon:"",u=(d,f)=>d===this.curProcess-1&&n(f)?a.createVNode(Io,{class:"bk-icon bk-process-icon icon-loading"},null):i(f)?a.createVNode(Rn,{class:"bk-process-icon"},null):o(d)?a.createVNode(Wr,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[l(f)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,f)=>a.createVNode("li",{onClick:()=>{this.jumpTo(f+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=f+1,current:n(d)&&f===this.curProcess-1}},[d[this.displayKey],u(f,d)]))])])}});const a6=_e(_N),_i="bk-upload";var ei=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ei||{}),kr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(kr||{});const j9=[ei.BUTTON,ei.DRAGGABLE,ei.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||j9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${j9.join(" | ")}\u3011`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function z9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var YN=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:o,multiple:l}=a.toRefs(e),u=`${_i}-list`,d=a.computed(()=>i.value===ei.PICTURE),f=a.computed(()=>d.value&&!l.value),g=a.computed(()=>Se({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:o.value}));function m(N){const w=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${w[p]}`}function y(N,w){n("remove",N,w)}const C=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},z9(N=e.files.map(w=>{const p=Se({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${w.status}`]:!0});return a.createVNode("li",{key:w.uid,class:p},[t!=null&&t.file?t.file(w):v(w)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${u}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(Qa,{class:`${u}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(Oa,{class:"action-icon",onClick:w=>y(N,w)},null)])])],I=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},z9(N=e.files.map(w=>{const p=Se({[`${u}__item`]:!0,[`${u}__item--${w.status}`]:!0});return a.createVNode("li",{key:w.uid,class:p},[t!=null&&t.file?t.file(w):k(w)])}))?N:{default:()=>[N]})},L=N=>{var H;const w=(H=N==null?void 0:N.raw)==null?void 0:H.type,[p]=(w==null?void 0:w.split("/"))||"";let x={text:xa,image:hc,application:xa,video:Mc,audio:ac}[p]||xa;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(w)&&(x=nc),a.h(x,{class:`${u}__item-file-icon`})},k=N=>[a.createVNode("div",{class:`${u}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${u}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(Wr,{class:`${u}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(Qa,{class:`${u}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${u}__item-actions`},[a.createVNode(Oa,{class:`${u}__item-del-icon`,onClick:w=>y(N,w)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:g.value},[d.value?C():I(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),P9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:o,file:l,multiple:u,accept:d}=a.toRefs(e),f=`${_i}-trigger`,g=a.computed(()=>i.value===ei.BUTTON),m=a.computed(()=>i.value===ei.DRAGGABLE),y=a.computed(()=>i.value===ei.PICTURE),C=a.computed(()=>y.value&&!u.value),v=a.computed(()=>y.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),I=a.ref(null),L=a.computed(()=>{var ee,$,ue;return Se({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:(ee=l.value)!=null?ee:!1,[`${f}--${($=l.value)==null?void 0:$.status}`]:(ue=l.value)!=null?ue:!1,[`${f}--dragover`]:x.value,[`${f}--disabled`]:o.value})}),k=()=>{I.value.value=null,I.value.click()},N=ee=>{const{files:$}=ee.target;n("change",Array.from($))},w=()=>{e.disabled||k()},p=ee=>{ee.defaultPrevented||ee.target!==ee.currentTarget||((ee.code==="Enter"||ee.code==="Space")&&k(),ee.preventDefault())};function M(ee,$){n("remove",ee,$),$.stopPropagation(),$.preventDefault()}const x=a.ref(!1),S=()=>{const ee=ge=>{if(o.value)return;ge.preventDefault(),x.value=!1;const Ce=Array.from(ge.dataTransfer.files);if(!v.value){n("change",Ce);return}const re=Ce.filter(X=>{const{type:A,name:R}=X,q=R.includes(".")?`.${R.split(".").pop()}`:"",K=A.replace(/\/.*$/,"");return v.value.split(",").map(he=>he.trim()).filter(he=>he).some(he=>he.startsWith(".")?q===he:/\/\*$/.test(he)?K===he.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(he)?A===he:!1)});n("change",re)},$=ge=>{ge.preventDefault(),x.value=!0},ue=()=>{x.value=!1},fe=Se({[`${f}__draggable`]:!0});return a.createVNode("div",{class:fe,onDrop:ee,onDragover:$,onDragleave:ue},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(ao,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${f}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},H=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?Q(e.file):P()]),P=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(ko,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),Q=ee=>[a.withDirectives(a.createVNode("img",{src:ee.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,ee.status!=="uploading"]]),a.createVNode(a.Fragment,null,[ee.status==="uploading"&&a.createVNode(Qa,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:ee.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Oa,{class:"action-icon",onClick:$=>M(ee,$)},null)])])],O=()=>a.createVNode(Ht,{disabled:o.value},{default:()=>[a.createVNode(ao,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(g.value)return O();if(m.value)return S();if(y.value)return H()};return()=>{var ee;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:w,onKeydown:p},[t.trigger?[t.trigger(),(ee=t==null?void 0:t.default)==null?void 0:ee.call(t)]:E(),a.createVNode("input",{ref:I,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:v.value,multiple:u.value,disabled:o.value,type:"file"},null)])}}}),s6={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function o(N,w){var p=N[0],M=N[1],x=N[2],S=N[3];p+=(M&x|~M&S)+w[0]-680876936|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[1]-389564586|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[2]+606105819|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[3]-1044525330|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[4]-176418897|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[6]-1473231341|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[7]-45705983|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[8]+1770035416|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[10]-42063|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[11]-1990404162|0,M=(M<<22|M>>>10)+x|0,p+=(M&x|~M&S)+w[12]+1804603682|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&x)+w[13]-40341101|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&M)+w[14]-1502002290|0,x=(x<<17|x>>>15)+S|0,M+=(x&S|~x&p)+w[15]+1236535329|0,M=(M<<22|M>>>10)+x|0,p+=(M&S|x&~S)+w[1]-165796510|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[11]+643717713|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[0]-373897302|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[5]-701558691|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[10]+38016083|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[15]-660478335|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[4]-405537848|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[9]+568446438|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[3]-187363961|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[8]+1163531501|0,M=(M<<20|M>>>12)+x|0,p+=(M&S|x&~S)+w[13]-1444681467|0,p=(p<<5|p>>>27)+M|0,S+=(p&x|M&~x)+w[2]-51403784|0,S=(S<<9|S>>>23)+p|0,x+=(S&M|p&~M)+w[7]+1735328473|0,x=(x<<14|x>>>18)+S|0,M+=(x&p|S&~p)+w[12]-1926607734|0,M=(M<<20|M>>>12)+x|0,p+=(M^x^S)+w[5]-378558|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[11]+1839030562|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[14]-35309556|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[1]-1530992060|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[7]-155497632|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[10]-1094730640|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[13]+681279174|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[0]-358537222|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[3]-722521979|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[6]+76029189|0,M=(M<<23|M>>>9)+x|0,p+=(M^x^S)+w[9]-640364487|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^x)+w[12]-421815835|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^M)+w[15]+530742520|0,x=(x<<16|x>>>16)+S|0,M+=(x^S^p)+w[2]-995338651|0,M=(M<<23|M>>>9)+x|0,p+=(x^(M|~S))+w[0]-198630844|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[14]-1416354905|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[5]-57434055|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[12]+1700485571|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[10]-1051523|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[1]-2054922799|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[8]+1873313359|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[15]-30611744|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[6]-1560198380|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[13]+1309151649|0,M=(M<<21|M>>>11)+x|0,p+=(x^(M|~S))+w[4]-145523070|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~x))+w[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~M))+w[2]+718787259|0,x=(x<<15|x>>>17)+S|0,M+=(S^(x|~p))+w[9]-343485551|0,M=(M<<21|M>>>11)+x|0,N[0]=p+N[0]|0,N[1]=M+N[1]|0,N[2]=x+N[2]|0,N[3]=S+N[3]|0}function l(N){var w=[],p;for(p=0;p<64;p+=4)w[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return w}function u(N){var w=[],p;for(p=0;p<64;p+=4)w[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return w}function d(N){var w=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,x,S,H,P,Q;for(M=64;M<=w;M+=64)o(p,l(N.substring(M-64,M)));for(N=N.substring(M-64),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<x;M+=1)S[M>>2]|=N.charCodeAt(M)<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(o(p,S),M=0;M<16;M+=1)S[M]=0;return H=w*8,H=H.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(H[2],16),Q=parseInt(H[1],16)||0,S[14]=P,S[15]=Q,o(p,S),p}function f(N){var w=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,x,S,H,P,Q;for(M=64;M<=w;M+=64)o(p,u(N.subarray(M-64,M)));for(N=M-64<w?N.subarray(M-64):new Uint8Array(0),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<x;M+=1)S[M>>2]|=N[M]<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(o(p,S),M=0;M<16;M+=1)S[M]=0;return H=w*8,H=H.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(H[2],16),Q=parseInt(H[1],16)||0,S[14]=P,S[15]=Q,o(p,S),p}function g(N){var w="",p;for(p=0;p<4;p+=1)w+=i[N>>p*8+4&15]+i[N>>p*8&15];return w}function m(N){var w;for(w=0;w<N.length;w+=1)N[w]=g(N[w]);return N.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(w,p){return w=w|0||0,w<0?Math.max(w+p,0):Math.min(w,p)}ArrayBuffer.prototype.slice=function(w,p){var M=this.byteLength,x=N(w,M),S=M,H,P,Q,O;return p!==n&&(S=N(p,M)),x>S?new ArrayBuffer(0):(H=S-x,P=new ArrayBuffer(H),Q=new Uint8Array(P),O=new Uint8Array(this,x,H),Q.set(O),P)}}();function y(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function C(N,w){var p=N.length,M=new ArrayBuffer(p),x=new Uint8Array(M),S;for(S=0;S<p;S+=1)x[S]=N.charCodeAt(S);return w?x:M}function v(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function I(N,w,p){var M=new Uint8Array(N.byteLength+w.byteLength);return M.set(new Uint8Array(N)),M.set(new Uint8Array(w),N.byteLength),p?M:M.buffer}function L(N){var w=[],p=N.length,M;for(M=0;M<p-1;M+=2)w.push(parseInt(N.substr(M,2),16));return String.fromCharCode.apply(String,w)}function k(){this.reset()}return k.prototype.append=function(N){return this.appendBinary(y(N)),this},k.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var w=this._buff.length,p;for(p=64;p<=w;p+=64)o(this._hash,l(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},k.prototype.end=function(N){var w=this._buff,p=w.length,M,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(M=0;M<p;M+=1)x[M>>2]|=w.charCodeAt(M)<<(M%4<<3);return this._finish(x,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},k.prototype.setState=function(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},k.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},k.prototype._finish=function(N,w){var p=w,M,x,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(o(this._hash,N),p=0;p<16;p+=1)N[p]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),x=parseInt(M[2],16),S=parseInt(M[1],16)||0,N[14]=x,N[15]=S,o(this._hash,N)},k.hash=function(N,w){return k.hashBinary(y(N),w)},k.hashBinary=function(N,w){var p=d(N),M=m(p);return w?L(M):M},k.ArrayBuffer=function(){this.reset()},k.ArrayBuffer.prototype.append=function(N){var w=I(this._buff.buffer,N,!0),p=w.length,M;for(this._length+=N.byteLength,M=64;M<=p;M+=64)o(this._hash,u(w.subarray(M-64,M)));return this._buff=M-64<p?new Uint8Array(w.buffer.slice(M-64)):new Uint8Array(0),this},k.ArrayBuffer.prototype.end=function(N){var w=this._buff,p=w.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x,S;for(x=0;x<p;x+=1)M[x>>2]|=w[x]<<(x%4<<3);return this._finish(M,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.ArrayBuffer.prototype.getState=function(){var N=k.prototype.getState.call(this);return N.buff=v(N.buff),N},k.ArrayBuffer.prototype.setState=function(N){return N.buff=C(N.buff,!0),k.prototype.setState.call(this,N)},k.ArrayBuffer.prototype.destroy=k.prototype.destroy,k.ArrayBuffer.prototype._finish=k.prototype._finish,k.ArrayBuffer.hash=function(N,w){var p=f(new Uint8Array(N)),M=m(p);return w?L(M):M},k})})(s6);var A9=s6.exports;function Jc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const FN=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",l=>{const u=l;u.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(u)});const i=new FormData;if(e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(u=>{for(const[d,f]of Object.entries(u))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(u=>{Array.isArray(u.value)?i.append(u.name,...u.value):i.append(u.name,u.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Jc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const u=l.name,d=l.value;t.setRequestHeader(u,d)});else{const l=e.header.name,u=e.header.value;t.setRequestHeader(l,u)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,u)=>t.setRequestHeader(u,l));else for(const[l,u]of Object.entries(o))o3(u)||t.setRequestHeader(l,String(u));return t.send(i),t},o6=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,UN=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),o=await XN(n,t),l=[];$N(e,n,i,o,l,t),await Promise.all(l).then(()=>{const u={size:n.size,name:n.name,total:i,hash:o},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Jc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(u))})},$N=(e,t,n,i,o,l)=>{for(let u=0;u<n;u++){const d=new Promise((f,g)=>{const m=u*l,y=Math.min(t.size,m+l),C=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(k=>{for(const[N,w]of Object.entries(k))Array.isArray(w)?C.append(N,...w):C.append(N,w)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(k=>{Array.isArray(k.value)?C.append(k.name,...k.value):C.append(k.name,k.value)})}C.append("file",o6.call(t,m,y)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",u.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const v=new XMLHttpRequest;if(v.onreadystatechange=()=>{if(v.readyState===4){const L=Jc(v);v.status<200||v.status>=300?(g(L),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},v.upload.addEventListener("progress",L=>{const k=L;e.onProgress(k,u)},!1),e.withCredentials&&"withCredentials"in v&&(v.withCredentials=!0),v.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const k=L.name,N=L.value;v.setRequestHeader(k,N)});else{const L=e.header.name,k=e.header.value;v.setRequestHeader(L,k)}const I=e.headers||{};if(I instanceof Headers)I.forEach((L,k)=>v.setRequestHeader(k,L));else for(const[L,k]of Object.entries(I))o3(k)||v.setRequestHeader(L,String(k));v.send(C)});o.push(d)}},XN=(e,t)=>new Promise((n,i)=>{const o=Math.ceil(e.size/t);let l=0;const u=new A9.ArrayBuffer,d=new FileReader;function f(){const g=l*t,m=g+t>=e.size?e.size:g+t;d.readAsArrayBuffer(o6.call(e,g,m))}d.onload=g=>{if(u.append(g.target.result),l+=1,l<o)f();else{const m=u.end(),y=new A9;y.append(m),y.append(e.name);const C=y.end();n(C)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function O9(e){return Date.now()+e}var KN=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),o=a.ref([]);function l(C){return o.value.find(v=>v.uid===C.uid)}let u=0;function d(C){var k;u+=1,C.uid=O9(u);const v={uid:C.uid,name:C.name,status:kr.NEW,size:C.size,raw:C},I=C.type.startsWith("image/");let L=null;if(I){try{v.url=window.URL.createObjectURL(C)}catch(N){console.error(N)}v.isPic=!0}return e.validateName&&!((k=e.validateName)!=null&&k.test(v.name))&&(v.status=kr.FAIL,v.statusText="invalid filename",L=new Error(v.statusText)),I&&C.size>n.value*1024**2&&(v.status=kr.FAIL,v.statusText="invalid file size",L=new Error(v.statusText)),!I&&C.size>i.value*1024**2&&(v.status=kr.FAIL,v.statusText="invalid file size",L=new Error(v.statusText)),o.value.push(v),L}async function f(C){var L;const v=C instanceof File?l(C):C,I=k=>{var N;t.onRemove(k,o.value),o.value.splice(o.value.indexOf(v),1),(N=k.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(k.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,v,o.value))!==!1&&I(v):I(v)}async function g(C,v){const I=l(v);!I||(I.status="fail",I.statusText=C.message)}async function m(C,v){const I=l(v);!I||(I.status="success",I.response=C)}async function y(C,v){const I=l(v);!I||(I.status="uploading",I.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{o.value=C.map(v=>{var I,L;return u+=1,Te(U({},v),{uid:(I=v.uid)!=null?I:O9(u),status:(L=v.status)!=null?L:kr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:o,handlePreprocess:d,handleRemove:f,handleError:g,handleSuccess:m,handleProgress:y}},qN=a.defineComponent({name:"Upload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),o=a.computed(()=>e.theme===ei.PICTURE),l=a.computed(()=>o.value&&!e.multiple),u=a.computed(()=>{var p;return Se({[_i]:!0,[`${_i}--${e.theme}`]:!0,[`${_i}--disabled`]:e.disabled,[`${_i}--single-picture`]:l.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(p,M){w(p),n("on-delete",p,M)}const{fileList:g,handlePreprocess:m,handleRemove:y,handleProgress:C,handleSuccess:v,handleError:I}=KN(e,{onRemove:f});function L(p){if(!p.length)return;if(e.limit&&g.value.length+p.length>e.limit){n("on-exceed",p,g.value);return}let M=p;(!e.multiple||e.limit===1)&&(M=p.slice(0,1));for(const x of M){const S=x,H=m(S);if(H){n("on-error",S,g.value,H);return}e.autoUpload&&k(S,M)}}async function k(p,M){var S;if(!e.beforeUpload)return N(p,M);let x;try{x=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{x=!1}if(x===!1){y(p);return}N(p,M)}function N(p,M){const{headers:x,header:S,data:H,formDataAttributes:P,method:Q,withCredentials:O,name:E,url:ee,sliceUrl:$,mergeUrl:ue,chunkSize:fe,customRequest:ge}=e,{uid:Ce}=p,re={headers:x,header:S,withCredentials:O,file:p,data:H,formDataAttributes:P,method:Q,filename:E,action:ee,sliceUrl:$,mergeUrl:ue,chunkSize:fe,onProgress:R=>{C(R,p),n("on-progress",R,p,g.value)},onSuccess:R=>{var K;const q=R;if((K=e==null?void 0:e.handleResCode)!=null&&K.call(e,q))v(R,p),n("on-success",R,p,g.value);else{const he=new Error((q==null?void 0:q.message)||"unknow error");I(he,p),n("on-error",p,g.value,he)}delete i.value[Ce]},onError:R=>{I(R,p),n("on-error",p,g.value,R),delete i.value[Ce]},onComplete:()=>{M.indexOf(p)===M.length-1&&n("on-done",g.value)}};let X=e.sliceUpload?UN:FN;ge&&(X=ge);const A=X(re);i.value[Ce]=A,A instanceof Promise&&A.then(re.onSuccess,re.onError)}function w(p){let M=i.value;p&&(M={[p.uid]:i.value[p.uid]}),Object.keys(M).forEach(x=>{if(M[x]instanceof XMLHttpRequest){const S=M[x];S==null||S.abort()}delete i.value[x]})}return a.onBeforeUnmount(()=>{g.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:u.value},[!o.value&&a.createVNode(P9,a.mergeProps(d,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${_i}__tip`},[e.tip]),a.createVNode(YN,{files:g.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y},{innerTrigger:p=>o.value&&a.createVNode(P9,a.mergeProps(d,{file:p,onChange:L,onRemove:y}),t)})])}});const l6=_e(qN);function Si(){}Si.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var l=this;function u(L){return o?(setTimeout(function(){o(void 0,L)},0),!0):L}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,f=t.length,g=1,m=d+f,y=[{newPos:-1,components:[]}],C=this.extractCommon(y[0],n,t,0);if(y[0].newPos+1>=d&&C+1>=f)return u([{value:this.join(n),count:n.length}]);function v(){for(var L=-1*g;L<=g;L+=2){var k=void 0,N=y[L-1],w=y[L+1],p=(w?w.newPos:0)-L;N&&(y[L-1]=void 0);var M=N&&N.newPos+1<d,x=w&&0<=p&&p<f;if(!M&&!x){y[L]=void 0;continue}if(!M||x&&N.newPos<w.newPos?(k=t7(w),l.pushComponent(k.components,void 0,!0)):(k=N,k.newPos++,l.pushComponent(k.components,!0,void 0)),p=l.extractCommon(k,n,t,L),k.newPos+1>=d&&p+1>=f)return u(e7(l,k.components,n,t,l.useLongestToken));y[L]=k}g++}if(o)(function L(){setTimeout(function(){if(g>m)return o();v()||L()},0)})();else for(;g<=m;){var I=v();if(I)return I}},pushComponent:function(t,n,i){var o=t[t.length-1];o&&o.added===n&&o.removed===i?t[t.length-1]={count:o.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,o){for(var l=n.length,u=i.length,d=t.newPos,f=d-o,g=0;d+1<l&&f+1<u&&this.equals(n[d+1],i[f+1]);)d++,f++,g++;return g&&t.components.push({count:g}),t.newPos=d,f},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function e7(e,t,n,i,o){for(var l=0,u=t.length,d=0,f=0;l<u;l++){var g=t[l];if(g.removed){if(g.value=e.join(i.slice(f,f+g.count)),f+=g.count,l&&t[l-1].added){var y=t[l-1];t[l-1]=t[l],t[l]=y}}else{if(!g.added&&o){var m=n.slice(d,d+g.count);m=m.map(function(v,I){var L=i[f+I];return L.length>v.length?L:v}),g.value=e.join(m)}else g.value=e.join(n.slice(d,d+g.count));d+=g.count,g.added||(f+=g.count)}}var C=t[u-1];return u>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[u-2].value+=C.value,t.pop()),t}function t7(e){return{newPos:e.newPos,components:e.components.slice(0)}}var E9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,J9=/\S/,u6=new Si;u6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!J9.test(e)&&!J9.test(t)};u6.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&E9.test(t[n])&&E9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Qc=new Si;Qc.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};function n7(e,t,n){return Qc.diff(e,t,n)}var i7=new Si;i7.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var r7=new Si;r7.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ks(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ks=function(t){return typeof t}:Ks=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function uu(e){return a7(e)||s7(e)||o7(e)||l7()}function a7(e){if(Array.isArray(e))return Ju(e)}function s7(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function o7(e,t){if(!!e){if(typeof e=="string")return Ju(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ju(e,t)}}function Ju(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
58
58
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u7=Object.prototype.toString,Va=new Si;Va.useLongestToken=!0;Va.tokenize=Qc.tokenize;Va.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,o=i===void 0?function(l,u){return typeof u=="undefined"?n:u}:i;return typeof e=="string"?e:JSON.stringify(Qu(e,null,null,o),o," ")};Va.equals=function(e,t){return Si.prototype.equals.call(Va,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Qu(e,t,n,i,o){t=t||[],n=n||[],i&&(e=i(o,e));var l;for(l=0;l<t.length;l+=1)if(t[l]===e)return n[l];var u;if(u7.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),n.push(u),l=0;l<e.length;l+=1)u[l]=Qu(e[l],t,n,i,o);return t.pop(),n.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),Ks(e)==="object"&&e!==null){t.push(e),u={},n.push(u);var d=[],f;for(f in e)e.hasOwnProperty(f)&&d.push(f);for(d.sort(),l=0;l<d.length;l+=1)f=d[l],u[f]=Qu(e[f],t,n,i,f);t.pop(),n.pop()}else u=e;return u}var Vu=new Si;Vu.tokenize=function(e){return e.slice()};Vu.join=Vu.removeEmpty=function(e){return e};function c7(e,t,n,i,o,l,u){u||(u={}),typeof u.context=="undefined"&&(u.context=4);var d=n7(n,i,u);d.push({value:"",lines:[]});function f(N){return N.map(function(w){return" "+w})}for(var g=[],m=0,y=0,C=[],v=1,I=1,L=function(w){var p=d[w],M=p.lines||p.value.replace(/\n$/,"").split(`
59
59
  `);if(p.lines=M,p.added||p.removed){var x;if(!m){var S=d[w-1];m=v,y=I,S&&(C=u.context>0?f(S.lines.slice(-u.context)):[],m-=C.length,y-=C.length)}(x=C).push.apply(x,uu(M.map(function(ue){return(p.added?"+":"-")+ue}))),p.added?I+=M.length:v+=M.length}else{if(m)if(M.length<=u.context*2&&w<d.length-2){var H;(H=C).push.apply(H,uu(f(M)))}else{var P,Q=Math.min(M.length,u.context);(P=C).push.apply(P,uu(f(M.slice(0,Q))));var O={oldStart:m,oldLines:v-m+Q,newStart:y,newLines:I-y+Q,lines:C};if(w>=d.length-2&&M.length<=u.context){var E=/\n$/.test(n),ee=/\n$/.test(i),$=M.length==0&&C.length>O.oldLines;!E&&$&&n.length>0&&C.splice(O.oldLines,0,"\"),(!E&&!$||!ee)&&C.push("\")}g.push(O),m=0,y=0,C=[]}v+=M.length,I+=M.length}},k=0;k<d.length;k++)L(k);return{oldFileName:e,newFileName:t,oldHeader:o,newHeader:l,hunks:g}}function d7(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var i=e.hunks[n];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),t.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),t.push.apply(t,i.lines)}return t.join(`
60
60
  `)+`