bkui-vue 2.0.2-beta.96 → 2.0.2-beta.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +4 -3
- package/dist/index.umd.js +2 -2
- package/lib/affix/affix.d.ts +6 -6
- package/lib/affix/index.d.ts +12 -33
- package/lib/alert/alert.d.ts +8 -8
- package/lib/alert/index.d.ts +15 -37
- package/lib/animate-number/animate-number.d.ts +4 -4
- package/lib/animate-number/index.d.ts +6 -17
- package/lib/backtop/backtop.d.ts +4 -4
- package/lib/backtop/index.d.ts +6 -32
- package/lib/badge/badge.d.ts +7 -7
- package/lib/badge/index.d.ts +14 -57
- package/lib/breadcrumb/breadcrumb-item.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +4 -4
- package/lib/breadcrumb/index.d.ts +12 -34
- package/lib/button/button-group.d.ts +3 -3
- package/lib/button/button.d.ts +7 -7
- package/lib/button/index.d.ts +21 -63
- package/lib/card/card.d.ts +9 -9
- package/lib/card/index.d.ts +20 -67
- package/lib/cascader/cascader-panel.d.ts +8 -8
- package/lib/cascader/cascader.d.ts +103 -27
- package/lib/cascader/index.d.ts +320 -370
- package/lib/checkbox/checkbox-group.d.ts +7 -7
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/checkbox/common.d.ts +3 -3
- package/lib/checkbox/index.d.ts +34 -81
- package/lib/code-diff/code-diff.d.ts +12 -12
- package/lib/code-diff/index.d.ts +18 -40
- package/lib/collapse/collapse-panel.d.ts +7 -7
- package/lib/collapse/collapse.d.ts +6 -6
- package/lib/collapse/index.d.ts +18 -78
- package/lib/collapse-transition/collapse-transition.d.ts +1 -1
- package/lib/collapse-transition/index.d.ts +5 -5
- package/lib/color-picker/color-picker.d.ts +7 -5
- package/lib/color-picker/components/color-input.d.ts +5 -5
- package/lib/color-picker/components/hue-slider.d.ts +5 -5
- package/lib/color-picker/components/input-container.d.ts +5 -5
- package/lib/color-picker/components/recommend-colors.d.ts +5 -5
- package/lib/color-picker/components/saturation-panel.d.ts +5 -5
- package/lib/color-picker/index.d.ts +13 -64
- package/lib/config-provider/config-provider.d.ts +5 -5
- package/lib/config-provider/index.d.ts +8 -151
- package/lib/container/col.d.ts +6 -6
- package/lib/container/container.d.ts +6 -6
- package/lib/container/index.d.ts +20 -46
- package/lib/container/row.d.ts +2 -2
- package/lib/date-picker/base/confirm.d.ts +6 -6
- package/lib/date-picker/base/date-table.d.ts +6 -6
- package/lib/date-picker/base/month-table.d.ts +6 -6
- package/lib/date-picker/base/picker-dropdown.d.ts +8 -8
- package/lib/date-picker/base/time-spinner.d.ts +13 -13
- package/lib/date-picker/base/year-table.d.ts +6 -6
- package/lib/date-picker/date-picker.d.ts +34 -27
- package/lib/date-picker/index.d.ts +93 -199
- package/lib/date-picker/panel/date-range.d.ts +19 -15
- package/lib/date-picker/panel/date.d.ts +12 -12
- package/lib/date-picker/panel/time-range.d.ts +12 -136
- package/lib/date-picker/panel/time.d.ts +11 -73
- package/lib/date-picker/time-picker.d.ts +34 -27
- package/lib/dialog/dialog.d.ts +10 -10
- package/lib/dialog/index.d.ts +22 -136
- package/lib/divider/divider.d.ts +4 -4
- package/lib/divider/index.d.ts +6 -26
- package/lib/dropdown/dropdown-item.d.ts +6 -6
- package/lib/dropdown/dropdown-menu.d.ts +5 -5
- package/lib/dropdown/dropdown.d.ts +8 -8
- package/lib/dropdown/index.d.ts +28 -63
- package/lib/exception/exception.d.ts +4 -4
- package/lib/exception/index.d.ts +6 -19
- package/lib/fixed-navbar/fixed-navbar.d.ts +5 -5
- package/lib/fixed-navbar/index.d.ts +9 -31
- package/lib/form/compose-form-item.d.ts +5 -5
- package/lib/form/form-item.d.ts +9 -7
- package/lib/form/form.d.ts +7 -7
- package/lib/form/index.d.ts +26 -49
- package/lib/image/image-viewer.d.ts +7 -5
- package/lib/image/image.d.ts +6 -6
- package/lib/image/index.d.ts +11 -54
- package/lib/index.js +1 -1
- package/lib/info-box/index.d.ts +1 -1
- package/lib/info-box/render-component.d.ts +1 -1
- package/lib/input/index.d.ts +35 -159
- package/lib/input/input.d.ts +15 -13
- package/lib/link/index.d.ts +11 -37
- package/lib/link/link.d.ts +6 -6
- package/lib/loading/index.d.ts +44 -208
- package/lib/loading/loading.d.ts +25 -101
- package/lib/menu/index.d.ts +26 -45
- package/lib/menu/menu-group.d.ts +4 -4
- package/lib/menu/menu-item.d.ts +5 -5
- package/lib/menu/menu.d.ts +6 -6
- package/lib/menu/submenu.d.ts +5 -5
- package/lib/menu/utils.d.ts +1 -1
- package/lib/message/messageConstructor.d.ts +12 -12
- package/lib/modal/hooks.d.ts +2 -2
- package/lib/modal/index.d.ts +9 -75
- package/lib/modal/modal.d.ts +5 -5
- package/lib/navigation/index.d.ts +20 -68
- package/lib/navigation/navigation-title.d.ts +4 -4
- package/lib/navigation/navigation.d.ts +9 -9
- package/lib/notify/notifyConstructor.d.ts +8 -8
- package/lib/overflow-title/components/overflow-title.d.ts +9 -9
- package/lib/overflow-title/index.d.ts +20 -185
- package/lib/pagination/index.d.ts +14 -78
- package/lib/pagination/pagination.d.ts +7 -7
- package/lib/pagination/use-limit.d.ts +1 -1
- package/lib/pagination/use-list.d.ts +1 -1
- package/lib/pagination/use-small-list.d.ts +1 -1
- package/lib/pop-confirm/index.d.ts +20 -211
- package/lib/pop-confirm/pop-confirm.d.ts +9 -9
- package/lib/popover/index.d.ts +9 -164
- package/lib/popover/popover.d.ts +5 -5
- package/lib/popover2/index.d.ts +3 -3
- package/lib/popover2/popover.d.ts +1 -1
- package/lib/process/index.d.ts +37 -135
- package/lib/process/process.d.ts +18 -62
- package/lib/progress/index.d.ts +9 -75
- package/lib/progress/progress.d.ts +6 -6
- package/lib/radio/common.d.ts +2 -2
- package/lib/radio/index.d.ts +38 -66
- package/lib/radio/radio-button.d.ts +10 -10
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.d.ts +10 -10
- package/lib/rate/index.d.ts +156 -29
- package/lib/rate/rate.d.ts +79 -5
- package/lib/rate/star.d.ts +5 -5
- package/lib/resize-layout/index.d.ts +38 -92
- package/lib/resize-layout/resize-layout.d.ts +15 -15
- package/lib/search-select/index.d.ts +1196 -231
- package/lib/search-select/input.d.ts +36 -20
- package/lib/search-select/menu.d.ts +6 -6
- package/lib/search-select/search-select.d.ts +384 -49
- package/lib/search-select/selected.d.ts +280 -45
- package/lib/select/common.d.ts +6 -6
- package/lib/select/index.d.ts +532 -573
- package/lib/select/option.d.ts +8 -6
- package/lib/select/optionGroup.d.ts +7 -7
- package/lib/select/select.d.ts +158 -50
- package/lib/select/selectTagInput.d.ts +14 -12
- package/lib/shared/index.d.ts +3 -3
- package/lib/sideslider/index.d.ts +9 -114
- package/lib/sideslider/sideslider.d.ts +5 -5
- package/lib/slider/index.d.ts +11 -92
- package/lib/slider/slider-button.d.ts +6 -6
- package/lib/slider/slider.d.ts +6 -6
- package/lib/steps/index.d.ts +46 -156
- package/lib/steps/steps.d.ts +25 -73
- package/lib/swiper/index.d.ts +9 -38
- package/lib/swiper/swiper.d.ts +5 -5
- package/lib/switcher/index.d.ts +10 -65
- package/lib/switcher/switcher.d.ts +6 -6
- package/lib/tab/index.d.ts +1 -405
- package/lib/tab/index.js +1 -0
- package/lib/tab/tab-nav.d.ts +3 -169
- package/lib/tab/tab-panel.d.ts +5 -5
- package/lib/tab/tab.d.ts +1 -123
- package/lib/table/components/body-empty.d.ts +5 -5
- package/lib/table/components/ghost-body.d.ts +1 -1
- package/lib/table/components/table-cell.d.ts +5 -5
- package/lib/table/components/table-column.d.ts +39 -79
- package/lib/table/components/table-row.d.ts +1 -1
- package/lib/table/hooks/use-column-resize.d.ts +1 -1
- package/lib/table/hooks/use-columns.d.ts +7 -7
- package/lib/table/hooks/use-layout.d.ts +5 -5
- package/lib/table/hooks/use-rows.d.ts +3 -3
- package/lib/table/hooks/use-shift-key.d.ts +1 -1
- package/lib/table/index.d.ts +64 -278
- package/lib/table/plugins/head-filter.d.ts +10 -16
- package/lib/table/plugins/head-sort.d.ts +12 -24
- package/lib/table/props.d.ts +2 -2
- package/lib/table/table.d.ts +13 -11
- package/lib/table-column/index.d.ts +62 -161
- package/lib/tag/index.d.ts +11 -47
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-input/common.d.ts +4 -4
- package/lib/tag-input/index.d.ts +874 -423
- package/lib/tag-input/index.js +6 -3
- package/lib/tag-input/list-tag-render.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +294 -35
- package/lib/tag-input/tag-render.d.ts +25 -14
- package/lib/time-picker/index.d.ts +97 -225
- package/lib/timeline/index.d.ts +34 -23
- package/lib/timeline/timeline.d.ts +16 -6
- package/lib/transfer/index.d.ts +53 -73
- package/lib/transfer/transfer.d.ts +20 -8
- package/lib/tree/index.d.ts +13 -163
- package/lib/tree/tree.d.ts +7 -7
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/upload/index.d.ts +15 -142
- package/lib/upload/upload-list.d.ts +5 -5
- package/lib/upload/upload-trigger.d.ts +5 -5
- package/lib/upload/upload.d.ts +7 -7
- package/lib/upload/use-file-handler.d.ts +11 -0
- package/lib/virtual-render/index.d.ts +139 -542
- package/lib/virtual-render/virtual-render.d.ts +70 -256
- package/package.json +4 -4
- /package/dist/{cli.css → style.css} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -42,7 +42,7 @@ ${nd(n)}`),r}})}function ML(e){const t=Object.keys(e),n=t.filter(i=>{var s;retur
|
|
|
42
42
|
right:0 !important;
|
|
43
43
|
`,NM=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function xM(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:NM.map(l=>`${l}:${t.getPropertyValue(l)}`).join(";"),paddingSize:r,borderSize:i,boxSizing:n}}function k4(e,t=1,n){var h;Kr||(Kr=document.createElement("textarea"),document.body.appendChild(Kr));const{paddingSize:r,borderSize:i,boxSizing:s,contextStyle:l}=xM(e);Kr.setAttribute("style",`${l};${_M}`),Kr.value=e.value??"";let c=Kr.scrollHeight;const d={};s==="border-box"?c=c+i:s==="content-box"&&(c=c-r),Kr.value="";const m=Kr.scrollHeight-r;if(Number.isInteger(t)){let f=m*t;s==="border-box"&&(f=f+r+i),c=Math.max(f,c),d.minHeight=`${f}px`}if(Number.isInteger(n)){let f=m*n;s==="border-box"&&(f=f+r+i),c=Math.min(f,c)}return d.height=`${c}px`,(h=Kr.parentNode)==null||h.removeChild(Kr),Kr=void 0,d}const SM={type:y.string.def("text"),clearable:y.bool,disabled:y.bool,readonly:y.bool,placeholder:y.string.def(""),prefixIcon:y.string,suffixIcon:y.string,suffix:y.string,prefix:y.string,step:y.number,max:y.number,min:y.number,maxlength:y.number,maxcharacter:y.number,behavior:A6(),showWordLimit:y.bool,showControl:y.bool.def(!0),showClearOnlyHover:y.bool.def(!0),precision:y.number.def(0).validate(e=>e>=0&&e<20),modelValue:y.oneOfType([y.string,y.number]),size:y.size(),rows:y.number,selectReadonly:y.bool.def(!1),withValidate:y.bool.def(!0),overMaxLengthLimit:y.bool.def(!1),showOverflowTooltips:y.bool.def(!0),tooltipsOptions:{type:Object,default:()=>({})},resize:y.bool.def(!0),autosize:y.oneOfType([Boolean,Object]).def(!1),stopPropagation:y.bool.def(!0)};let gt=(function(e){return e.BLUR="blur",e.CHANGE="change",e.CLEAR="clear",e.COMPOSITIONEND="compositionend",e.COMPOSITIONSTART="compositionstart",e.COMPOSITIONUPDATE="compositionupdate",e.ENTER="enter",e.FOCUS="focus",e.INPUT="input",e.KEYDOWN="keydown",e.KEYPRESS="keypress",e.KEYUP="keyup",e.PASTE="paste",e.UPDATE="update:modelValue",e.SEARCH="search",e})({});function Yi(e,t){return!0}function TM(e,t){return!0}function T2(e){return e}const EM={[gt.UPDATE]:Yi,[gt.FOCUS]:e=>e,[gt.BLUR]:e=>e,[gt.CHANGE]:Yi,[gt.CLEAR]:()=>!0,[gt.INPUT]:Yi,[gt.KEYPRESS]:Yi,[gt.KEYDOWN]:Yi,[gt.KEYUP]:Yi,[gt.ENTER]:Yi,[gt.PASTE]:TM,[gt.COMPOSITIONSTART]:T2,[gt.COMPOSITIONUPDATE]:T2,[gt.COMPOSITIONEND]:T2,[gt.SEARCH]:e=>e},OM=a.defineComponent({name:"Input",directives:{bkTooltips:sa},inheritAttrs:!1,props:SM,emits:EM,setup(e,t){const{resolveClassName:n}=Re(),r=aa(),i=Ft("input"),s=a.ref(!1),l=a.ref(!1),c=a.computed(()=>e.type==="textarea"),d=a.computed(()=>c.value?n("textarea"):n("input")),{class:m,style:h,...f}=t.attrs,p=a.ref(),g=a.ref(typeof e.modelValue>"u"||e.modelValue===null?{}:{value:e.modelValue}),w=a.computed(()=>nt({[`${d.value}--${e.size}`]:!!e.size,resizable:e.resize,"is-focused":s.value,"is-readonly":e.readonly&&!e.selectReadonly,"is-disabled":e.disabled,"is-simplicity":e.behavior==="simplicity",[`${t.attrs.class}`]:!!t.attrs.class},d.value)),_=a.ref(!1),b=a.ref(),C=ie("suffix-icon"),S={search:()=>a.createVNode(vs,{onClick:Y},null),password:()=>a.createVNode(qd,{class:C,onClick:G},null)},x=a.computed(()=>{const oe=S[e.type];return T.value?a.createVNode(Co,{class:C,onClick:G},null):oe?a.createVNode(oe,{class:C},null):null}),N=a.computed(()=>e.type==="number"),E=a.computed(()=>Math.floor(e.maxlength??e.maxcharacter??0)),T=a.ref(!1),R=a.computed(()=>nt({"show-clear-only-hover":e.showClearOnlyHover,[`${d.value}--clear-icon`]:!0},C)),A=a.computed(()=>nt({[ie("max-length")]:!0,"is-over-limit":E.value-k.value<0})),I=oe=>typeof e.maxcharacter=="number"?oe.split("").reduce((we,Te,Ne)=>(we.len+=Te.charCodeAt(0)>255?2:1,we.len>e.maxcharacter&&we.pos===-1&&(we.pos=Ne),we),{len:0,pos:-1}):{len:oe.length,pos:-1},k=a.computed(()=>{const oe=e.modelValue??"";return I(oe).len}),V=a.computed(()=>nt({"is-disabled":e.disabled||e.modelValue>=e.max})),L=a.computed(()=>nt({"is-disabled":e.disabled||e.modelValue<=e.min})),M=a.computed(()=>{var oe;return P.value&&E.value-k.value===0?{content:i.value.maxlengthLimitTips,...e.tooltipsOptions||{}}:e.showOverflowTooltips&&_.value&&e.modelValue?{content:(oe=e.modelValue)==null?void 0:oe.toString(),sameWidth:!0,...e.tooltipsOptions||{}}:{disabled:!0,...e.tooltipsOptions||{}}}),P=a.computed(()=>typeof e.maxlength=="number"||typeof e.maxcharacter=="number");a.watch(()=>e.type,()=>{a.nextTick(F)}),a.watch(()=>e.modelValue,oe=>{var we;e.withValidate&&((we=r==null?void 0:r.validate)==null||we.call(r,"change")),g.value={value:oe},a.nextTick(F)}),a.onMounted(()=>{var oe,we;a.nextTick(F),Object.prototype.hasOwnProperty.call(t.attrs,"autofocus")&&((we=(oe=p.value)==null?void 0:oe.focus)==null||we.call(oe))}),t.expose({focus(){p.value.focus()},blur(){p.value.blur(),s.value=!1},clear:te});function F(){z(),B()}function z(){var we,Te,Ne;const oe=((we=p.value)==null?void 0:we.offsetParent)===null;if(!(!c.value||oe||e.resize))if(e.autosize){const ae=(Te=e.autosize)==null?void 0:Te.minRows,Ee=(Ne=e.autosize)==null?void 0:Ne.maxRows,Ve=k4(p.value,ae,Ee);b.value={overflowY:"hidden",...Ve},a.nextTick(()=>{b.value=Ve})}else b.value={minHeight:k4(p.value).minHeight}}function H(){var oe,we;return((oe=p.value)==null?void 0:oe.scrollWidth)>((we=p.value)==null?void 0:we.clientWidth)+2}function B(){setTimeout(()=>{_.value=H()})}function te(){if(e.disabled)return;const oe=N.value?e.min:"";t.emit(gt.UPDATE,oe,null),t.emit(gt.CHANGE,oe,null),t.emit(gt.CLEAR)}function Ce(oe){s.value=!0,t.emit(gt.FOCUS,oe)}function W(oe){var we;s.value=!1,t.emit(gt.BLUR,oe),e.withValidate&&((we=r==null?void 0:r.validate)==null||we.call(r,"blur"))}function Y(oe){t.emit(gt.SEARCH,oe)}function q(oe){return we=>{if(e.stopPropagation&&we.stopPropagation(),P.value&&!e.overMaxLengthLimit){const Te=I(we.target.value);if(Te.len>=E.value&&(oe===gt.KEYDOWN||oe===gt.INPUT)&&!l.value){const Ne=Te.pos>0?we.target.value.slice(0,Te.pos):we.target.value;g.value={value:Ne},t.emit(gt.UPDATE,Ne,we),t.emit(gt.INPUT,Ne,we);return}}if(oe===gt.KEYDOWN&&(we.code==="Enter"||we.key==="Enter"||we.keyCode===13)&&t.emit(gt.ENTER,N.value?X(we.target.value,0):we.target.value,we),!(l.value&&[gt.INPUT,gt.CHANGE,gt.KEYDOWN].some(Te=>oe===Te))){if(oe===gt.INPUT)t.emit(gt.UPDATE,N.value?(()=>{const Te=Number.isInteger(e.precision)?e.precision:0,Ne=we.target.value;return Number.isNaN(Ne)?ee(e.min)?e.min:0:Ne===""||Ne===null||Ne===void 0?"":(+Ne).toFixed(Te)})():we.target.value,we);else if(oe===gt.CHANGE&&N.value){const Te=X(we.target.value,0);t.emit(gt.UPDATE,Te,we),t.emit(oe,Te,we);return}t.emit(oe,N.value?X(we.target.value,0):we.target.value,we)}}}const[re,Z,se,ge,le,de]=[gt.KEYUP,gt.KEYDOWN,gt.KEYPRESS,gt.PASTE,gt.CHANGE,gt.INPUT].map(q);function pe(){l.value=!0}function me(oe){l.value=!1,de(oe)}function ee(oe){return typeof oe=="number"&&!Number.isNaN(oe)}function X(oe,we,Te=!0){const Ne=Number(we),ae=ee(Ne)?Ne:1,Ee=Number.isInteger(e.precision)?e.precision:0,Ve=Number(oe);if(Number.isNaN(Ve))return ee(e.min)?e.min:0;let He=Ve+(Te?ae:-1*ae);return ee(e.max)&&(He=Math.min(He,e.max)),ee(e.min)&&(He=Math.max(He,e.min)),+He.toFixed(Ee)}function j(oe){if(e.disabled)return;const we=X(e.modelValue,e.step);t.emit(gt.UPDATE,we,oe),t.emit(gt.CHANGE,we,oe)}function J(oe){if(e.disabled)return;const we=X(e.modelValue,e.step,!1);t.emit(gt.UPDATE,we,oe),t.emit(gt.CHANGE,we,oe)}function ie(oe){return`${d.value}--${oe}`}function G(){T.value=!T.value}const ue=a.computed(()=>({maxlength:!e.overMaxLengthLimit&&e.maxlength,placeholder:e.placeholder||i.value.placeholder,readonly:e.readonly,disabled:e.disabled})),Se={onInput:de,onFocus:Ce,onBlur:W,onPaste:ge,onChange:le,onKeypress:se,onKeydown:Z,onKeyup:re,onCompositionstart:pe,onCompositionend:me};return()=>{var oe,we,Te,Ne;return a.withDirectives(a.createVNode("div",{style:h,class:w.value},[((we=(oe=t.slots)==null?void 0:oe.prefix)==null?void 0:we.call(oe))??(e.prefix&&a.createVNode("div",{class:ie("prefix-area")},[a.createVNode("span",{class:ie("prefix-area--text")},[e.prefix])])),c.value?a.createVNode("textarea",a.mergeProps({ref:p,spellcheck:!1},f,Se,ue.value,{style:b.value,rows:e.rows},g.value),null):a.createVNode("input",a.mergeProps({spellcheck:!1},f,{ref:p,class:`${d.value}--text`,max:e.max,min:e.min,step:e.step,type:T.value&&e.type==="password"?"text":e.type},Se,ue.value,g.value),null),e.clearable&&!!e.modelValue&&a.createVNode("span",{class:R.value,onClick:te},[a.createVNode(ir,null,null)]),x.value,P.value&&(e.showWordLimit||c.value)&&a.createVNode("p",{class:A.value},[e.overMaxLengthLimit?E.value-k.value:a.createVNode(a.Fragment,null,[k.value,a.createTextVNode(" / "),a.createVNode("span",null,[E.value])])]),N.value&&e.showControl&&a.createVNode("div",{class:ie("number-control")},[a.createVNode(Dl,{class:V.value,onClick:j},null),a.createVNode(Dl,{class:L.value,onClick:J},null)]),((Ne=(Te=t.slots)==null?void 0:Te.suffix)==null?void 0:Ne.call(Te))??(e.suffix&&a.createVNode("div",{class:ie("suffix-area")},[a.createVNode("span",{class:ie("suffix-area--text")},[e.suffix])]))]),[[a.resolveDirective("bk-tooltips"),M.value]])}}}),Di=bt(OM),AM=a.defineComponent({name:"Card",props:{title:y.string,showHeader:y.bool.def(!0),showFooter:y.bool.def(!1),collapseStatus:y.bool.def(!0),border:y.bool.def(!0),disableHeaderStyle:y.bool.def(!1),position:y.string.def("left"),isEdit:y.bool.def(!1),isCollapse:y.bool.def(!1)},emits:["update:collapseStatus","edit"],setup(e,{emit:t}){const n=a.ref(!0),r=a.ref(!1),i=a.ref(""),s=()=>{e.isCollapse&&(n.value=!n.value,t("update:collapseStatus",n.value))},l=()=>{r.value=!r.value},c=()=>{r.value=!r.value,t("edit",i)};a.watch(()=>e.collapseStatus,h=>{e.isCollapse&&(n.value=h)},{immediate:!0}),a.watch(()=>e.title,h=>{i.value=h},{immediate:!0});const{resolveClassName:d}=Re(),m=d("card");return{collapseActive:n,showInput:r,renderTitle:i,handleCollapse:s,saveEdit:c,clickEdit:l,wrapperClsName:m}},render(){var i,s,l,c;const e=nt({[`${this.wrapperClsName}`]:!0,[`${this.wrapperClsName}-border-none`]:!this.$props.border},""),t=nt({[`${this.wrapperClsName}-head`]:!0,[`${this.wrapperClsName}-head-${this.$props.position}`]:this.$props.isCollapse&&this.$props.position,"no-line-height":this.$props.disableHeaderStyle,collapse:!this.collapseActive},""),n=a.createVNode("div",{class:"title",title:this.renderTitle},[this.showInput?a.createVNode(Di,{class:`${this.wrapperClsName}-input`,modelValue:this.renderTitle,"onUpdate:modelValue":d=>this.renderTitle=d,onBlur:this.saveEdit},null):this.renderTitle]),r=a.createVNode("span",{class:`${this.wrapperClsName}-icon`,onClick:this.handleCollapse},[this.collapseActive?a.createVNode(yo,null,null):a.createVNode(Cr,null,null)]);return a.createVNode("div",{class:e},[this.$props.showHeader?a.createVNode("div",{class:t},[this.$props.isCollapse&&(((s=(i=this.$slots).icon)==null?void 0:s.call(i))??r),((c=(l=this.$slots).header)==null?void 0:c.call(l))??n,this.$props.isEdit&&!this.showInput&&a.createVNode(Ld,{class:`${this.wrapperClsName}-edit`,onClick:this.clickEdit},null)]):"",a.createVNode(l7,null,{default:()=>{var d,m,h,f;return[a.withDirectives(a.createVNode("div",null,[a.createVNode("div",{class:`${this.wrapperClsName}-body`},[((m=(d=this.$slots).default)==null?void 0:m.call(d))??"Content"]),this.$props.showFooter?a.createVNode("div",{class:`${this.wrapperClsName}-footer`},[((f=(h=this.$slots).footer)==null?void 0:f.call(h))??"Footer"]):""]),[[a.vShow,this.collapseActive]])]}})])}}),T7=bt(AM),Zd=Symbol("BkSelect"),E7=Symbol("BkOptionGroup");function O7(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Y3(e){return{register:(r,i)=>{if(i)return e.value.set(r,i)},unregister:(r,i)=>{if(i){if(e.value.get(r)!==i)return;e.value.delete(r)}else e.value.delete(r)}}}function LM(e,t){const{popoverMinWidth:n}=e;let r=null;const i=a.ref("auto"),s=a.ref(!1),l=()=>{s.value=!s.value},c=()=>{s.value=!1},d=()=>{s.value=!0},m=()=>{var h;i.value=Math.max((h=t.value)==null?void 0:h.offsetWidth,n)};return a.onMounted(()=>{t.value&&(r=bL(t.value,m,60,!0),r.start())}),a.onBeforeUnmount(()=>{r==null||r.stop(),r=null}),{isPopoverShow:s,popperWidth:i,togglePopover:l,hidePopover:c,showPopover:d}}function DM(e,t){const n=a.ref(""),r=a.ref(""),i=a.computed(()=>r.value||n.value),s=a.ref(!1);return a.watch(i,async()=>{try{s.value=!0,await e(i.value),s.value=!1}catch(l){console.error(l)}finally{t==null||t()}}),{customOptionName:n,searchValue:r,curSearchValue:i,searchLoading:s}}function Ps(e=""){return e&&String(e).trim().toLowerCase()}function RM(e,t){if(!e||!t)return!0;const{top:n,bottom:r}=e.getBoundingClientRect(),{top:i,bottom:s}=t.getBoundingClientRect();return n>=i&&r<=s}const A7=Symbol("CheckboxGroup");function IM(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const VM=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(A7,Vb),i=!Mb(r),s=a.ref(),l=a.ref(t.checked),c=a.ref(!1),d=a.computed(()=>i&&r.props.disabled?!0:t.disabled),m=p=>{const g=l.value?t.trueLabel:t.falseLabel;n("update:modelValue",g),n("change",g,p),i&&r.handleChange(),a.nextTick(()=>{s.value&&s.value.checked!==l.value&&(s.value.checked=l.value)})};i?a.watch(()=>r.props.modelValue,p=>{l.value=p.includes(t.label)},{deep:!0}):a.watch(()=>t.modelValue,p=>{p!==""&&(l.value=p===t.trueLabel)},{immediate:!0}),a.watch(()=>t.checked,()=>{l.value=t.checked,t.immediateEmitChange!==!1&&m()});const h=(p=!0)=>{l.value=p},f=p=>{if(t.readonly)return;const g=p.target;if(d.value||c.value)return;c.value=!0;const w=g.checked;Promise.resolve(t.beforeChange?t.beforeChange(w):!0).then(_=>{if(_)l.value=w,m(p);else return Promise.reject()}).catch(_=>{console.error(_),g.checked=l.value}).finally(()=>{c.value=!1})};return a.onMounted(()=>{i&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{i&&r.unregister(e.proxy)}),{inputRef:s,isChecked:l,isPrechecking:c,isDisabled:d,setChecked:h,handleChange:f}},MM={modelValue:y.oneOfType([y.bool,y.string,y.number]),label:y.oneOfType([y.bool,y.string,y.number]),trueLabel:y.oneOfType([y.bool,y.string,y.number]).def(!0),falseLabel:y.oneOfType([y.bool,y.string,y.number]).def(!1),disabled:y.bool.def(!1),checked:y.bool.def(!1),indeterminate:y.bool,beforeChange:go().def(()=>!0),size:y.size().def(E6.DEFAULT),immediateEmitChange:y.bool.def(!0),readonly:y.bool.def(!1),outline:y.bool.def(!1)},kM=a.defineComponent({name:"Checkbox",props:MM,emits:{"update:modelValue":e=>e!==void 0,change:(e,t)=>e!==void 0,click:e=>!0},setup(e){const[t,{blur:n,focus:r}]=IM(),{inputRef:i,isChecked:s,isPrechecking:l,isDisabled:c,setChecked:d,handleChange:m}=VM(),{resolveClassName:h}=Re();return{inputRef:i,isFocus:t,isChecked:s,isPrechecking:l,isDisabled:c,setChecked:d,handleBlur:n,handleFocus:r,handleChange:m,size:e.size,resolveClassName:h}},render(){const e=nt({[`${this.resolveClassName("checkbox")}`]:!0,[`${this.resolveClassName("checkbox")}-${this.size}`]:!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate,"is-prechecking":this.isPrechecking,"is-outline":this.outline}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("checkbox-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e},[a.createVNode("span",{class:this.resolveClassName("checkbox-input")},[a.createVNode("input",{ref:"inputRef",class:`${this.resolveClassName("checkbox-original")}`,checked:this.isChecked,disabled:this.isDisabled||this.isPrechecking,role:"checkbox",type:"checkbox",onChange:this.handleChange},null)]),t(),this.isPrechecking&&a.createVNode(Fd,{class:`${this.resolveClassName("checkbox-checking")}`},null)])}}),PM={modelValue:y.array,disabled:y.bool,withValidate:y.bool.def(!0)},Qd=a.defineComponent({name:"CheckboxGroup",props:PM,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=aa(),r=[],i=d=>{r.push(d)},s=d=>{const m=r.indexOf(d);m>-1&&r.splice(m,1)},l=()=>{const d=r.reduce((m,h)=>(h.isChecked&&m.push(h.label),m),[]);t.emit("update:modelValue",d),t.emit("change",d)};a.provide(A7,{name:"CheckboxGroup",props:e,register:i,unregister:s,handleChange:l}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{const d=e.modelValue||[];r.forEach(m=>{d.includes(m.label)&&m.setChecked(!0)})});const{resolveClassName:c}=Re();return{resolveClassName:c}},render(){var e;return a.createVNode("div",{class:`${this.resolveClassName("checkbox-group")}`},[(e=this.$slots)==null?void 0:e.default()])}}),Bn=Wn(kM,{Group:Qd});var E2,P4;function $M(){if(P4)return E2;P4=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return E2=t,E2}var O2,$4;function FM(){if($4)return O2;$4=1;function e(t){return this.__data__.has(t)}return O2=e,O2}var A2,F4;function HM(){if(F4)return A2;F4=1;var e=D6(),t=$M(),n=FM();function r(i){var s=-1,l=i==null?0:i.length;for(this.__data__=new e;++s<l;)this.add(i[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,A2=r,A2}var L2,H4;function BM(){if(H4)return L2;H4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return L2=e,L2}var D2,B4;function zM(){if(B4)return D2;B4=1;function e(t,n){return t.has(n)}return D2=e,D2}var R2,z4;function L7(){if(z4)return R2;z4=1;var e=HM(),t=BM(),n=zM(),r=1,i=2;function s(l,c,d,m,h,f){var p=d&r,g=l.length,w=c.length;if(g!=w&&!(p&&w>g))return!1;var _=f.get(l),b=f.get(c);if(_&&b)return _==c&&b==l;var C=-1,S=!0,x=d&i?new e:void 0;for(f.set(l,c),f.set(c,l);++C<g;){var N=l[C],E=c[C];if(m)var T=p?m(E,N,C,c,l,f):m(N,E,C,l,c,f);if(T!==void 0){if(T)continue;S=!1;break}if(x){if(!t(c,function(R,A){if(!n(x,A)&&(N===R||h(N,R,d,m,f)))return x.push(A)})){S=!1;break}}else if(!(N===E||h(N,E,d,m,f))){S=!1;break}}return f.delete(l),f.delete(c),S}return R2=s,R2}var I2,U4;function UM(){if(U4)return I2;U4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,s){r[++n]=[s,i]}),r}return I2=e,I2}var V2,W4;function WM(){if(W4)return V2;W4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return V2=e,V2}var M2,j4;function jM(){if(j4)return M2;j4=1;var e=Hl(),t=Bb(),n=zl(),r=L7(),i=UM(),s=WM(),l=1,c=2,d="[object Boolean]",m="[object Date]",h="[object Error]",f="[object Map]",p="[object Number]",g="[object RegExp]",w="[object Set]",_="[object String]",b="[object Symbol]",C="[object ArrayBuffer]",S="[object DataView]",x=e?e.prototype:void 0,N=x?x.valueOf:void 0;function E(T,R,A,I,k,V,L){switch(A){case S:if(T.byteLength!=R.byteLength||T.byteOffset!=R.byteOffset)return!1;T=T.buffer,R=R.buffer;case C:return!(T.byteLength!=R.byteLength||!V(new t(T),new t(R)));case d:case m:case p:return n(+T,+R);case h:return T.name==R.name&&T.message==R.message;case g:case _:return T==R+"";case f:var M=i;case w:var P=I&l;if(M||(M=s),T.size!=R.size&&!P)return!1;var F=L.get(T);if(F)return F==R;I|=c,L.set(T,R);var z=r(M(T),M(R),I,k,V,L);return L.delete(T),z;case b:if(N)return N.call(T)==N.call(R)}return!1}return M2=E,M2}var k2,q4;function D7(){if(q4)return k2;q4=1;function e(t,n){for(var r=-1,i=n.length,s=t.length;++r<i;)t[s+r]=n[r];return t}return k2=e,k2}var P2,G4;function R7(){if(G4)return P2;G4=1;var e=D7(),t=xr();function n(r,i,s){var l=i(r);return t(r)?l:e(l,s(r))}return P2=n,P2}var $2,K4;function I7(){if(K4)return $2;K4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=0,l=[];++r<i;){var c=t[r];n(c,r,t)&&(l[s++]=c)}return l}return $2=e,$2}var F2,Y4;function V7(){if(Y4)return F2;Y4=1;function e(){return[]}return F2=e,F2}var H2,X4;function T9(){if(X4)return H2;X4=1;var e=I7(),t=V7(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(c){return r.call(l,c)}))}:t;return H2=s,H2}var B2,J4;function qM(){if(J4)return B2;J4=1;var e=Wb(),t=e(Object.keys,Object);return B2=t,B2}var z2,Z4;function M7(){if(Z4)return z2;Z4=1;var e=hd(),t=qM(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&l.push(c);return l}return z2=i,z2}var U2,Q4;function tc(){if(Q4)return U2;Q4=1;var e=Yb(),t=M7(),n=vo();function r(i){return n(i)?e(i):t(i)}return U2=r,U2}var W2,e5;function k7(){if(e5)return W2;e5=1;var e=R7(),t=T9(),n=tc();function r(i){return e(i,n,t)}return W2=r,W2}var j2,t5;function GM(){if(t5)return j2;t5=1;var e=k7(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,l,c,d,m,h){var f=c&t,p=e(s),g=p.length,w=e(l),_=w.length;if(g!=_&&!f)return!1;for(var b=g;b--;){var C=p[b];if(!(f?C in l:r.call(l,C)))return!1}var S=h.get(s),x=h.get(l);if(S&&x)return S==l&&x==s;var N=!0;h.set(s,l),h.set(l,s);for(var E=f;++b<g;){C=p[b];var T=s[C],R=l[C];if(d)var A=f?d(R,T,C,l,s,h):d(T,R,C,s,l,h);if(!(A===void 0?T===R||m(T,R,c,d,h):A)){N=!1;break}E||(E=C=="constructor")}if(N&&!E){var I=s.constructor,k=l.constructor;I!=k&&"constructor"in s&&"constructor"in l&&!(typeof I=="function"&&I instanceof I&&typeof k=="function"&&k instanceof k)&&(N=!1)}return h.delete(s),h.delete(l),N}return j2=i,j2}var q2,n5;function KM(){if(n5)return q2;n5=1;var e=ps(),t=ia(),n=e(t,"DataView");return q2=n,q2}var G2,r5;function YM(){if(r5)return G2;r5=1;var e=ps(),t=ia(),n=e(t,"Promise");return G2=n,G2}var K2,a5;function XM(){if(a5)return K2;a5=1;var e=ps(),t=ia(),n=e(t,"Set");return K2=n,K2}var Y2,i5;function JM(){if(i5)return Y2;i5=1;var e=ps(),t=ia(),n=e(t,"WeakMap");return Y2=n,Y2}var X2,s5;function nc(){if(s5)return X2;s5=1;var e=KM(),t=L6(),n=YM(),r=XM(),i=JM(),s=ei(),l=kb(),c="[object Map]",d="[object Object]",m="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",g=l(e),w=l(t),_=l(n),b=l(r),C=l(i),S=s;return(e&&S(new e(new ArrayBuffer(1)))!=p||t&&S(new t)!=c||n&&S(n.resolve())!=m||r&&S(new r)!=h||i&&S(new i)!=f)&&(S=function(x){var N=s(x),E=N==d?x.constructor:void 0,T=E?l(E):"";if(T)switch(T){case g:return p;case w:return c;case _:return m;case b:return h;case C:return f}return N}),X2=S,X2}var J2,o5;function ZM(){if(o5)return J2;o5=1;var e=fd(),t=L7(),n=jM(),r=GM(),i=nc(),s=xr(),l=Ul(),c=vd(),d=1,m="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype,g=p.hasOwnProperty;function w(_,b,C,S,x,N){var E=s(_),T=s(b),R=E?h:i(_),A=T?h:i(b);R=R==m?f:R,A=A==m?f:A;var I=R==f,k=A==f,V=R==A;if(V&&l(_)){if(!l(b))return!1;E=!0,I=!1}if(V&&!I)return N||(N=new e),E||c(_)?t(_,b,C,S,x,N):n(_,b,R,C,S,x,N);if(!(C&d)){var L=I&&g.call(_,"__wrapped__"),M=k&&g.call(b,"__wrapped__");if(L||M){var P=L?_.value():_,F=M?b.value():b;return N||(N=new e),x(P,F,C,S,N)}}return V?(N||(N=new e),r(_,b,C,S,x,N)):!1}return J2=w,J2}var Z2,l5;function E9(){if(l5)return Z2;l5=1;var e=ZM(),t=Nr();function n(r,i,s,l,c){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,s,l,n,c)}return Z2=n,Z2}var Q2,c5;function QM(){if(c5)return Q2;c5=1;var e=E9();function t(n,r){return e(n,r)}return Q2=t,Q2}var ek=QM();const vi=bn(ek),Pu=a.defineComponent({name:"Option",directives:{bkTooltips:sa},props:{id:{type:[String,Number],require:!0},name:y.oneOfType([y.number,y.string]),disabled:y.oneOfType([y.bool,y.shape({disabled:y.bool,tips:y.string})]).def(!1),order:y.number.def(0),skipRegister:y.bool.def(!1)},setup(e,{attrs:t}){const{proxy:n}=a.getCurrentInstance(),r=a.reactive({visible:!0}),{id:i,name:s}=a.toRefs(e),l=a.computed(()=>s.value!==void 0?s.value:t.label),c=a.computed(()=>i.value!==void 0?i.value:t.value),d=a.computed(()=>{var A;return typeof e.disabled=="boolean"?e.disabled:((A=e.disabled)==null?void 0:A.disabled)??!1}),m=a.computed(()=>{var A;return typeof e.disabled=="object"&&((A=e.disabled)!=null&&A.tips)?e.disabled.tips:""}),h=a.inject(Zd,null),f=a.inject(E7,null),p=a.computed(()=>{var A;return(A=h==null?void 0:h.selected)==null?void 0:A.some(I=>vi(I.value,c.value))}),g=a.computed(()=>h==null?void 0:h.multiple),w=a.computed(()=>(h==null?void 0:h.activeOptionValue)===c.value),_=a.computed(()=>(h==null?void 0:h.showSelectedIcon)&&g.value),b=a.computed(()=>h==null?void 0:h.selectedStyle),C=a.computed(()=>h==null?void 0:h.curSearchValue),S=a.computed(()=>h==null?void 0:h.highlightKeyword),x=()=>{d.value||h==null||h.handleOptionSelected(n)},N=()=>{h.activeOptionValue=c.value},E=()=>{h.activeOptionValue=""},T=A=>{if(!A)return A;let I=C.value;const k=I.length;if(!(I!=null&&I.trim().length)||!A.toLocaleLowerCase().includes(I.toLocaleLowerCase()))return A;const V=[];let L=-1;return I=I.replace(/([.*/]{1})/gim,"\\$1"),A.replace(new RegExp(`${I}`,"igm"),(M,P)=>(V.length===0&&P!==0?V.push(A.slice(0,P)):L>=0&&V.push(A.slice(L+M.length,P)),V.push(a.createVNode("span",{class:"is-keyword"},[M])),L=P,M)),L>=0&&V.push(A.slice(L+k)),V.length?V:A};a.onBeforeMount(()=>{e.skipRegister||(h==null||h.register(c.value,n),f==null||f.register(c.value,n))}),a.onBeforeUnmount(()=>{e.skipRegister||(h==null||h.unregister(c.value,n),f==null||f.unregister(c.value,n))});const{resolveClassName:R}=Re();return{...a.toRefs(r),selected:p,multiple:g,isHover:w,showSelectedIcon:_,selectedStyle:b,optionName:l,optionID:c,highlightKeyword:S,isDisabled:d,disabledTips:m,handleOptionClick:x,handleMouseEnter:N,handleMouseLeave:E,resolveClassName:R,transformNode:T}},render(){var t,n;const e=[nt({"is-selected":this.selected,"is-disabled":this.isDisabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===yu.CHECKBOX,[this.resolveClassName("select-option")]:!0}),this.$attrs.class];return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave},[this.showSelectedIcon&&this.selectedStyle===yu.CHECKBOX&&a.createVNode(Bn,{class:this.resolveClassName("select-checkbox"),disabled:this.isDisabled,modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??a.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.highlightKeyword?this.transformNode(String(this.optionName)):this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===yu.CHECK&&a.createVNode(gs,{width:22,height:22,class:this.resolveClassName("select-selected-icon")},null)]),[[a.resolveDirective("bk-tooltips"),{content:this.disabledTips,disabled:!this.disabledTips,placement:"right"}],[a.vShow,this.visible]])}}),tk=a.defineComponent({name:"OptionGroup",props:{label:y.string.def(""),disabled:y.bool.def(!1),collapsible:y.bool.def(!1),collapse:y.bool.def(!1),visible:y.bool.def(!0)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:r}=n,i=a.inject(Zd,null),s=a.reactive({groupCollapse:e.collapse}),l=a.ref(new Map),{register:c,unregister:d}=Y3(l),m=a.computed(()=>`${e.label} (${[...l.value.values()].filter(g=>g.visible).length})`),h=a.computed(()=>e.visible&&!i.isSearchEmpty),f=()=>{!e.collapsible||e.disabled||(s.groupCollapse=!s.groupCollapse,t("update:collapse",s.groupCollapse))};a.provide(E7,a.reactive({...a.toRefs(e),register:c,unregister:d,groupCollapse:a.toRef(s,"groupCollapse")})),a.onBeforeMount(()=>{i==null||i.registerGroup(n.uid,r)}),a.onBeforeUnmount(()=>{i==null||i.unregisterGroup(n.uid)});const{resolveClassName:p}=Re();return{...a.toRefs(s),groupLabel:m,isVisible:h,handleToggleCollapse:f,resolveClassName:p}},render(){var r,i;const e=nt({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=nt({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=nt({"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(wo,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(i=(r=this.$slots).default)==null?void 0:i.call(r)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.isVisible]])}}),nk=["阿","哎","安","肮","凹","八","挀","扳","邦","勹","陂","奔","伻","屄","边","灬","憋","汃","冫","癶","峬","嚓","偲","参","仓","撡","冊","嵾","曽","叉","芆","辿","伥","抄","车","抻","阷","吃","充","抽","出","欻","揣","巛","刅","吹","旾","逴","呲","匆","凑","粗","汆","崔","邨","搓","咑","呆","丹","当","刀","嘚","扥","灯","氐","甸","刁","爹","丁","丟","东","吺","厾","耑","垖","吨","多","妸","诶","奀","鞥","儿","发","帆","匚","飞","分","丰","覅","仏","紑","夫","旮","侅","甘","冈","皋","戈","给","根","刯","工","勾","估","瓜","乖","关","光","归","丨","呙","哈","咍","佄","夯","茠","诃","黒","拫","亨","噷","叿","齁","乎","花","怀","欢","巟","灰","昏","吙","丌","加","戋","江","艽","阶","巾","坕","冂","丩","凥","姢","噘","军","咔","开","刊","忼","尻","匼","肎","劥","空","抠","扝","夸","蒯","宽","匡","亏","坤","扩","垃","来","兰","啷","捞","肋","勒","崚","哩","俩","奁","良","撩","毟","拎","伶","溜","囖","龙","瞜","噜","驴","娈","掠","抡","罗","呣","妈","埋","嫚","牤","猫","么","呅","门","甿","咪","宀","喵","乜","民","名","谬","摸","哞","毪","嗯","拏","腉","囡","囔","孬","疒","娞","恁","能","妮","拈","娘","鸟","捏","囜","宁","妞","农","羺","奴","女","奻","疟","黁","挪","喔","讴","妑","拍","眅","乓","抛","呸","喷","匉","丕","囨","剽","氕","姘","乒","钋","剖","仆","七","掐","千","呛","悄","癿","亲","靑","卭","丘","区","峑","缺","夋","呥","穣","娆","惹","人","扔","日","茸","厹","邚","挼","堧","婑","瞤","捼","仨","毢","三","桒","掻","閪","森","僧","杀","筛","山","伤","弰","奢","申","升","尸","収","书","刷","衰","闩","双","脽","吮","说","厶","忪","捜","苏","狻","夊","孙","唆","他","囼","坍","汤","夲","忑","熥","剔","天","旫","帖","厅","囲","偷","凸","湍","推","吞","乇","穵","歪","弯","尣","危","昷","翁","挝","乌","夕","虲","仙","乡","灱","些","心","星","凶","休","吁","吅","削","坃","丫","恹","央","幺","倻","一","囙","应","哟","佣","优","扜","囦","曰","晕","帀","災","兂","匨","傮","则","贼","怎","増","扎","捚","沾","张","佋","蜇","贞","争","之","中","州","朱","抓","拽","专","妆","隹","宒","卓","乲","宗","邹","租","钻","厜","尊","昨","兙"],rk=["A","AI","AN","ANG","AO","BA","BAI","BAN","BANG","BAO","BEI","BEN","BENG","BI","BIAN","BIAO","BIE","BIN","BING","BO","BU","CA","CAI","CAN","CANG","CAO","CE","CEN","CENG","CHA","CHAI","CHAN","CHANG","CHAO","CHE","CHEN","CHENG","CHI","CHONG","CHOU","CHU","CHUA","CHUAI","CHUAN","CHUANG","CHUI","CHUN","CHUO","CI","CONG","COU","CU","CUAN","CUI","CUN","CUO","DA","DAI","DAN","DANG","DAO","DE","DEN","DENG","DI","DIAN","DIAO","DIE","DING","DIU","DONG","DOU","DU","DUAN","DUI","DUN","DUO","E","EI","EN","ENG","ER","FA","FAN","FANG","FEI","FEN","FENG","FIAO","FO","FOU","FU","GA","GAI","GAN","GANG","GAO","GE","GEI","GEN","GENG","GONG","GOU","GU","GUA","GUAI","GUAN","GUANG","GUI","GUN","GUO","HA","HAI","HAN","HANG","HAO","HE","HEI","HEN","HENG","HM","HONG","HOU","HU","HUA","HUAI","HUAN","HUANG","HUI","HUN","HUO","JI","JIA","JIAN","JIANG","JIAO","JIE","JIN","JING","JIONG","JIU","JU","JUAN","JUE","JUN","KA","KAI","KAN","KANG","KAO","KE","KEN","KENG","KONG","KOU","KU","KUA","KUAI","KUAN","KUANG","KUI","KUN","KUO","LA","LAI","LAN","LANG","LAO","LE","LEI","LENG","LI","LIA","LIAN","LIANG","LIAO","LIE","LIN","LING","LIU","LO","LONG","LOU","LU","LV","LUAN","LVE","LUN","LUO","M","MA","MAI","MAN","MANG","MAO","ME","MEI","MEN","MENG","MI","MIAN","MIAO","MIE","MIN","MING","MIU","MO","MOU","MU","N","NA","NAI","NAN","NANG","NAO","NE","NEI","NEN","NENG","NI","NIAN","NIANG","NIAO","NIE","NIN","NING","NIU","NONG","NOU","NU","NV","NUAN","NVE","NUN","NUO","O","OU","PA","PAI","PAN","PANG","PAO","PEI","PEN","PENG","PI","PIAN","PIAO","PIE","PIN","PING","PO","POU","PU","QI","QIA","QIAN","QIANG","QIAO","QIE","QIN","QING","QIONG","QIU","QU","QUAN","QUE","QUN","RAN","RANG","RAO","RE","REN","RENG","RI","RONG","ROU","RU","RUA","RUAN","RUI","RUN","RUO","SA","SAI","SAN","SANG","SAO","SE","SEN","SENG","SHA","SHAI","SHAN","SHANG","SHAO","SHE","SHEN","SHENG","SHI","SHOU","SHU","SHUA","SHUAI","SHUAN","SHUANG","SHUI","SHUN","SHUO","SI","SONG","SOU","SU","SUAN","SUI","SUN","SUO","TA","TAI","TAN","TANG","TAO","TE","TENG","TI","TIAN","TIAO","TIE","TING","TONG","TOU","TU","TUAN","TUI","TUN","TUO","WA","WAI","WAN","WANG","WEI","WEN","WENG","WO","WU","XI","XIA","XIAN","XIANG","XIAO","XIE","XIN","XING","XIONG","XIU","XU","XUAN","XUE","XUN","YA","YAN","YANG","YAO","YE","YI","YIN","YING","YO","YONG","YOU","YU","YUAN","YUE","YUN","ZA","ZAI","ZAN","ZANG","ZAO","ZE","ZEI","ZEN","ZENG","ZHA","ZHAI","ZHAN","ZHANG","ZHAO","ZHE","ZHEN","ZHENG","ZHI","ZHONG","ZHOU","ZHU","ZHUA","ZHUAI","ZHUAN","ZHUANG","ZHUI","ZHUN","ZHUO","ZI","ZONG","ZOU","ZU","ZUAN","ZUI","ZUN","ZUO",""],ak={曾:"ZENG",沈:"SHEN",嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬤:"MO",嬷:"MO",蹒:"PAN",蹊:"XI",丬:"PAN",霰:"XIAN",莘:"XIN",豉:"CHI",饧:"XING",筠:"JUN",长:"CHANG",帧:"ZHEN",峙:"SHI",郍:"NA",芎:"XIONG",谁:"SHUI"},bu={PINYINS:rk,UNIHANS:nk,EXCEPTIONS:ak},ik="阿",sk="鿿",ok=1,ml=2,e1=3;let Go=null,wu;function lk(e){e&&(typeof e=="function"&&(e=[e]),e.forEach&&e.forEach(t=>{typeof t=="function"&&t(bu)}))}function P7(e){return!e&&Go!==null||(typeof Intl=="object"&&Intl.Collator?(wu=new Intl.Collator(["zh-Hans-CN","zh-CN"]),Go=Intl.Collator.supportedLocalesOf(["zh-CN"]).length===1):Go=!1),Go}function $7(e){const{UNIHANS:t}=bu,{PINYINS:n}=bu,{EXCEPTIONS:r}=bu,i={source:e};if(e in r)return i.type=ml,i.target=r[e],i;let s=-1,l;if(e.charCodeAt(0)<256)return i.type=ok,i.target=e,i;if(l=wu.compare(e,ik),l<0)return i.type=e1,i.target=e,i;if(l===0)i.type=ml,s=0;else{if(l=wu.compare(e,sk),l>0)return i.type=e1,i.target=e,i;l===0&&(i.type=ml,s=t.length-1)}if(i.type=ml,s<0){let c=0,d=t.length-1;for(;c<=d;){s=~~((c+d)/2);const m=t[s];if(l=wu.compare(e,m),l===0)break;l>0?c=s+1:d=s-1}}return l<0&&s--,i.target=n[s],i.target||(i.type=e1,i.target=i.source),i}function u5(e){return typeof e!="string"||!P7()?e:e.split("").map(t=>$7(t))}const Cu={isSupported:P7,parse:u5,patchDict:lk,genToken:$7,convertToPinyin(e,t,n){return u5(e).map(r=>t&&r.type===ml?r.target.toLowerCase():r.target).join(n||"")}};function ck(e){e.EXCEPTIONS={嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬷:"MO",蹊:"XI",丬:"PAN",霰:"XIAN",豉:"CHI",饧:"XING",帧:"ZHEN",芎:"XIONG",谁:"SHUI",钶:"KE"},e.UNIHANS[91]="伕",e.UNIHANS[347]="仚",e.UNIHANS[393]="诌",e.UNIHANS[39]="婤",e.UNIHANS[50]="腠",e.UNIHANS[369]="攸",e.UNIHANS[123]="乯",e.UNIHANS[171]="刕",e.UNIHANS[102]="佝",e.UNIHANS[126]="犿",e.UNIHANS[176]="列",e.UNIHANS[178]="刢",e.UNIHANS[252]="娝",e.UNIHANS[330]="偸"}function uk(e){return typeof e!="function"?!1:e("伕").target==="FOU"&&e("仚").target==="XIA"&&e("诌").target==="ZHONG"&&e("婤").target==="CHONG"&&e("腠").target==="CONG"&&e("攸").target==="YONG"&&e("乯").target==="HOU"&&e("刕").target==="LENG"&&e("佝").target==="GONG"&&e("犿").target==="HUAI"&&e("列").target==="LIAO"&&e("刢").target==="LIN"&&e("钶").target==="E"}const d5={patcher:ck,shouldPatch:uk};Cu.isSupported()&&d5.shouldPatch(Cu.genToken)&&Cu.patchDict(d5);const dk={onContentScroll:Function},fk={list:y.array.def([]),enabled:y.bool.def(!0),scrollEvent:y.bool.def(!1),lineHeight:y.oneOfType([y.number,y.func]).def(30),minHeight:y.number.def(30),maxHeight:y.oneOfType([y.number,y.string]),height:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),width:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),className:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentClassName:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentStyle:y.object.def({}),scrollXName:y.string.def(Ru("F-scroll-x")),scrollYName:y.string.def(Ru("F-scroll-y")),groupItemCount:y.number.def(1),preloadItemCount:y.number.def(1),renderAs:y.string.def("div"),scrollOffsetTop:y.number.def(0),scrollPosition:y.string.def("content"),abosuteHeight:y.oneOfType([y.string.def("auto"),y.number]).def("auto"),throttleDelay:y.number.def(60),rowKey:y.string.def(void 0),keepAlive:y.bool.def(!1),autoReset:y.bool.def(!0),wrapperStyle:y.any.def({}),autoIndex:y.bool.def(!0),...dk},F7=(e,t)=>({fixToTop:r=>{const{id:i,index:s,item:l}=r;let c=typeof s=="number"?s-1:0;if(i!==void 0&&(c=e.list.findIndex(d=>d[e.rowKey]===i)??c),l!==void 0&&(c=e.list.findIndex(d=>l[e.rowKey]===d[e.rowKey])??c),typeof c=="number"){const m=(c>=0?c:0)*e.lineHeight;t(0,m)}return null}}),H7=()=>{let e=null;return{init:s=>{e=s.value},scrollTo:(s,l)=>{e&&(typeof e.scrollTo=="function"?e.scrollTo({left:s,top:l,behavior:"auto"}):(e.scrollLeft=s,e.scrollTop=l))},update:()=>{},updateScrollHeight:s=>{}}};function f5(e,t,n){let r=0,i=0,s=0,l=0;for(;r<e;r++){if(l=n({index:r}),i+l>t){s=t-i,r=r+Math.round(s/l);break}i+=l}return{startIndex:r,height:i,diffHeight:s}}function X3(e,t,n,r,i,s=0){if(!r||!i.offset)return;const l=i.offset.y>=0?i.offset.y:0,c=Math.max(0,l-(s??0)),d=i.offset.x>=0?i.offset.x:0,m=r.scrollHeight,h=r.offsetHeight,{count:f,groupItemCount:p}=n;let g=0,w=0,_=0;if(typeof e=="number"&&(g=Math.floor(c/e),w=Math.ceil(h/e)+g+1,_=c%e),typeof e=="function"){const C=Math.ceil(f/p),S=f5(C,c,e);g=S.startIndex>0?S.startIndex:0,_=S.diffHeight,w=f5(C,h,e).startIndex+g+1}const b=m-h-l;return typeof t=="function"&&t(i,g,w,c,_,d,{bottom:b>=0?b:0}),{targetStartIndex:g,targetEndIndex:w,elScrollTop:c,translateY:_,elScrollLeft:d}}class O9{constructor(t,n){$e(this,"binding");$e(this,"wrapper");$e(this,"delay");$e(this,"delegateWrapper");$e(this,"boundScrollHandler");$e(this,"throttledRender");$e(this,"getEvent",t=>t!=null&&t.offset?{offset:t.offset}:t!=null&&t.target?{offset:{x:t.target.scrollLeft??0,y:t.target.scrollTop??0}}:{offset:{x:0,y:0}});this.binding=t,this.wrapper=n;const{throttleDelay:r}=t.value;this.delay=r,this.delegateWrapper=void 0,this.boundScrollHandler=this.handleScroll.bind(this),this.throttledRender=cs(i=>{this.render(i)},this.delay)}get scrollHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.scrollHeight)??((n=this.wrapper)==null?void 0:n.scrollHeight)}get offsetHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.offsetHeight)??((n=this.wrapper)==null?void 0:n.offsetHeight)}setDelegateWrapper(t){this.delegateWrapper=t}render(t){var g,w;const{lineHeight:n=30,handleScrollCallback:r,pagination:i={},onlyScroll:s,scrollOffsetTop:l=0}=this.binding.value;if(s){const _=(g=t.offset)==null?void 0:g.y,b=((w=t.offset)==null?void 0:w.x)??0,C=this.scrollHeight-this.offsetHeight-_;r(t,null,null,_,_,b,{bottom:C>=0?C:0});return}const{startIndex:c,endIndex:d,groupItemCount:m,count:h,scrollTop:f,scrollLeft:p}=i;X3(n,r,{groupItemCount:m,count:h},this.delegateWrapper??this.wrapper,t,l)}executeThrottledRender(t){const n=this.getEvent(t);this.throttledRender(n)}handleScroll(t){const n=t.target;this.executeThrottledRender({offset:{x:n.scrollLeft,y:n.scrollTop}})}install(){var t;(t=this.wrapper)==null||t.addEventListener("scroll",this.boundScrollHandler,{passive:!0})}uninstall(){var t;(t=this.wrapper)==null||t.removeEventListener("scroll",this.boundScrollHandler)}setBinding(t){this.binding=t;const{throttleDelay:n}=t.value;n!==this.delay&&(this.delay=n,this.throttledRender=cs(r=>{this.render(r)},this.delay))}}let Ua=null;const hk={mounted(e,t){const n=e.parentNode;Ua=new O9(t,n),Ua.install()},updated(e,t){Ua==null||Ua.setBinding(t)},unbind(e){Ua==null||Ua.uninstall(),Ua=null}},mk=(e,t)=>{const{renderAs:n}=e,r=a.ref(null),{init:i,scrollTo:s}=H7(),l=(p,g,w,_,b,C,S)=>{t.emit("content-scroll",[p,{translateY:b,translateX:C,pos:S}])};let c=null;const d=a.computed(()=>({lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent})),m=a.computed(()=>{const p=typeof e.height=="number"?`${e.height}px`:e.height;return{height:p,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??p,overflow:"auto",...e.wrapperStyle}}),{fixToTop:h}=F7(e,s);t.expose({scrollTo:s,fixToTop:h,refRoot:r,refContent:r}),a.onMounted(()=>{c=new O9(d,r.value),i(r),c.install()}),a.onUnmounted(()=>{c==null||c.uninstall()});const f=a.computed(()=>[e.className]);return{rendAsTag:()=>{var p,g,w,_,b,C,S,x;return a.h(n,{class:f.value,style:m.value,ref:r},[((g=(p=t.slots).beforeContent)==null?void 0:g.call(p))??"",((_=(w=t.slots).default)==null?void 0:_.call(w,{data:e.list}))??"",((C=(b=t.slots).afterContent)==null?void 0:C.call(b))??"",((x=(S=t.slots).afterSection)==null?void 0:x.call(S))??""])}}},pk=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:hk},props:fk,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n}=e,r=z=>typeof z=="string"?[z]:typeof z=="object"&&!Array.isArray(z)?[z]:z;if(!e.enabled){const{rendAsTag:z}=mk(e,t);return z}const i=a.ref(null),s=a.ref(0),l=a.ref(0),c=a.ref(0),d=z=>{let H=z*e.groupItemCount,B=(z+1)*e.groupItemCount;if(B>s.value){const te=B-H;B=s.value,H=B-te}return{index:H,rows:e.list.slice(H,B),items:[H,B],type:"virtual"}},m=()=>typeof e.lineHeight=="function"?({index:z})=>e.lineHeight(d(z)):e.lineHeight,h=a.computed(()=>({lineHeight:m(),handleScrollCallback:C,pagination:w,throttleDelay:e.throttleDelay,scrollOffsetTop:e.scrollOffsetTop})),{init:f,scrollTo:p}=H7();let g=null;const w=a.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),_=a.ref([]),b=z=>{if(typeof e.lineHeight=="function"){let H=0;for(let B=0;B<z;B++)H+=e.lineHeight(d(B));return H}return z*e.lineHeight},C=(z,H,B,te,Ce,W,Y)=>{Object.assign(w,{startIndex:H,endIndex:B,scrollTop:te,translateX:W,translateY:Ce,scrollLeft:W,pos:Y});let re=H*e.groupItemCount,Z=B*e.groupItemCount;const se=E.value.length;re=Math.max(0,re-e.preloadItemCount),Z=Math.min(se,Z+e.preloadItemCount),Z>se&&(Z=se),re<0&&(re=0);const ge=E.value.slice(re,Z);_.value=ge,w.startIndex=Math.floor(re/e.groupItemCount),z&&t.emit("content-scroll",[z,w,ge])};a.onMounted(()=>{g=new O9(h,i.value),M(),f(i),g.install(),g.executeThrottledRender({offset:{x:0,y:0}})}),a.onUnmounted(()=>{g==null||g.uninstall()});const S=()=>{x(e.list)},x=z=>{if(s.value=Math.ceil((z||[]).length/e.groupItemCount),w.count=s.value,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){l.value=0;let B=0;const te=Math.ceil(s.value/e.groupItemCount);for(let Ce=0;Ce<te;Ce++){const W=e.lineHeight.apply(this,[d(Ce)]);B+=typeof W=="number"?W:0}l.value=B}else l.value=e.lineHeight*s.value;else l.value=e.abosuteHeight;A()},N=(z={left:0,top:0})=>{const H=i.value,B=typeof e.height=="number"?{scrollHeight:l.value,offsetHeight:e.height}:H;X3(m(),C,w,B,{offset:{x:(H==null?void 0:H.scrollLeft)??0,y:(H==null?void 0:H.scrollTop)??0}},e.scrollOffsetTop)},E=a.computed(()=>e.rowKey!==void 0||!e.autoIndex?e.list:(e.list||[]).map((z,H)=>({...z,$index:H}))),T=a.computed(()=>e.scrollPosition==="content"?{}:{}),R=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight?typeof e.maxHeight=="number"?`${e.maxHeight}px`:e.maxHeight:!1,minHeight:e.minHeight?`${e.minHeight}px`:!1,overflow:"auto",...e.scrollPosition==="container"?T.value:{},...e.wrapperStyle})),A=()=>{c.value=l.value<e.minHeight?e.minHeight:l.value},{resolveClassName:I}=Re(),k=a.computed(()=>[I("virtual-render"),...r(e.className),e.scrollPosition==="container"?I("virtual-content"):""]),V=()=>{Object.assign(w,{startIndex:0,endIndex:0,scrollTop:0,scrollLeft:0,translateY:0,translateX:0}),i.value&&(i.value.scrollTop=0,i.value.scrollLeft=0),S(),M();const z=typeof e.height=="number"?{scrollHeight:l.value,offsetHeight:e.height}:i.value;X3(m(),C,w,z,{offset:{x:0,y:0}},e.scrollOffsetTop),a.nextTick(()=>{g==null||g.executeThrottledRender({offset:{x:0,y:0}})})},{fixToTop:L}=F7(e,p),M=()=>{const z=i.value,H=typeof e.height=="number"?{scrollHeight:l.value,offsetHeight:e.height}:z;g==null||g.setDelegateWrapper(H)},P=()=>{g==null||g.setBinding(h),S(),M(),N(),a.nextTick(()=>{g==null||g.executeThrottledRender({offset:{x:w.scrollLeft,y:w.scrollTop}})})};a.watch(()=>e.height,()=>{P()}),a.watch(()=>[e.list,e.list.length],()=>{P()},{immediate:!0}),t.expose({reset:V,scrollTo:p,fixToTop:L,refRoot:i,refContent:i});const F=a.computed(()=>({transform:`translateY(${b(w.startIndex)}px)`,...e.contentStyle}));return()=>{var z,H,B,te,Ce,W,Y,q;return a.h(n||"div",{ref:i,class:[...k.value],style:R.value},[a.h("div",{class:I("virtual-section"),style:{height:`${c.value}px`,position:"absolute",width:"1px",pointerEvents:"none"}}),((H=(z=t.slots).beforeContent)==null?void 0:H.call(z))??"",a.h("div",{class:[I("virtual-content"),...r(e.contentClassName)],style:F.value},((te=(B=t.slots).default)==null?void 0:te.call(B,{data:_.value,pagination:w}))??""),((W=(Ce=t.slots).afterContent)==null?void 0:W.call(Ce))??"",((q=(Y=t.slots).afterSection)==null?void 0:q.call(Y))??""])}}}),rc=bt(pk);var B7=(function(e){return e.FILLED="filled",e.STROKE="stroke",e.UNKNOWN="",e})(B7||{});const gk=a.defineComponent({name:"Tag",props:{theme:sd().def(""),closable:y.bool.def(!1),type:je("tagStorkeType",{}).def(B7.UNKNOWN),checkable:y.bool.def(!1),checked:y.bool.def(!1),radius:y.string.def("2px"),size:y.size(),stopPropagation:y.bool.def(!0)},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=Re();return{wrapperStyle:a.computed(()=>({borderRadius:e.radius})),handleClose:l=>{l.preventDefault(),e.stopPropagation&&l.stopPropagation(),t("close",l)},handleClick:l=>{l.preventDefault(),e.stopPropagation&&l.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var t,n;const e={[this.resolveClassName("tag")]:!0,[this.resolveClassName("tag-closable")]:this.closable,[this.resolveClassName("tag-checkable")]:this.checkable,[this.resolveClassName("tag-check")]:this.checked,[this.resolveClassName(`tag-${this.type}`)]:this.type,[this.resolveClassName(`tag-${this.theme}`)]:this.theme,[this.resolveClassName(`tag--${this.size}`)]:!0};return a.createVNode("div",{style:this.wrapperStyle,class:e,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:`${this.resolveClassName("tag-icon")}`},[this.$slots.icon()]):"",a.createVNode("span",{class:`${this.resolveClassName("tag-text")}`},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),this.closable&&a.createVNode(Hn,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),Ml=bt(gk);var vk=bb();const Ii=bn(vk),yk=a.defineComponent({name:"SelectTagInput",directives:{bkTooltips:sa},props:{selected:{type:Array,default:()=>[]},tagTheme:sd(),placeholder:y.string.def(""),filterable:y.bool.def(!1),allowCreate:y.bool.def(!1),disabled:y.bool.def(!1),modelValue:y.any,collapseTags:y.bool.def(!1),behavior:A6()},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=Re(),r=a.inject(Zd,null),{modelValue:i,collapseTags:s,selected:l}=a.toRefs(e),c=a.ref(i.value),d=a.ref(),m=a.ref(null),h=a.computed(()=>l.value.slice(m.value,l.value.length).map(A=>r==null?void 0:r.handleGetLabelByValue(A.value)).join(", "));a.watch(i,()=>{c.value=i.value}),a.watch([l,s],()=>{C.value=[],N()},{flush:"post"});const f=A=>{t("remove",A)},p=()=>{var A;(A=d.value)==null||A.focus()},g=()=>{var A;(A=d.value)==null||A.blur()},w=A=>{t("update:modelValue",A)},_=A=>{t("update:modelValue",A.target.value)},b=A=>{switch(A.code){case"NumpadEnter":case"Enter":{t("enter",A.target.value,A);break}}t("keydown",A.target.value,A)},C=a.ref([]),S=a.ref(),x=A=>C.value.map(k=>k==null?void 0:k.$el).filter(k=>!!k),N=()=>{s.value&&(m.value=null,setTimeout(()=>{var k,V;const A=x(),I=A.findIndex((L,M)=>M?A[M-1].offsetTop!==L.offsetTop:!1);m.value=I>0?I:null,((k=A[m.value])==null?void 0:k.offsetTop)!==((V=S.value)==null?void 0:V.offsetTop)&&m.value>1&&(m.value-=1)}))},E=Ii(N,150),T=a.ref(),R=new ResizeObserver(()=>{E()});return a.onMounted(()=>{T.value&&R.observe(T.value)}),a.onBeforeUnmount(()=>{T.value&&R.unobserve(T.value)}),{collapseTagRef:S,tagWrapperRef:T,tagsRefs:C,select:r,overflowTagIndex:m,value:c,inputRef:d,overflowContent:h,handleRemoveTag:f,focus:p,blur:g,updateModelValue:w,handleInput:_,handleKeydown:b,resolveClassName:n}},render(){var i,s,l,c,d,m,h,f;const e=(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),t=nt({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e,"is-simplicity":this.behavior==="simplicity"}),n=nt({[this.resolveClassName("select-tag-wrapper")]:!0}),r={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{ref:"tagWrapperRef",class:t},[(c=(l=this.$slots)==null?void 0:l.prefix)==null?void 0:c.call(l),a.createVNode("div",{class:n},[((m=(d=this.$slots).default)==null?void 0:m.call(d))??this.selected.map((p,g)=>a.createVNode(Ml,{key:p.value,ref:w=>this.tagsRefs[g]=w,style:{display:this.collapseTags&&this.overflowTagIndex&&g>=this.overflowTagIndex?"none":""},theme:this.tagTheme,closable:!0,onClose:()=>this.handleRemoveTag(p.value)},{default:()=>{var w,_;return[((_=(w=this.$slots).tagRender)==null?void 0:_.call(w,p))??a.createVNode(x9,{class:this.resolveClassName("select-tag-overflow-title"),type:"tips"},{default:()=>{var b;return[(b=this.select)==null?void 0:b.handleGetLabelByValue(p.value)]}})]}})),a.withDirectives(a.createVNode(Ml,{ref:"collapseTagRef",style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},class:this.resolveClassName("select-overflow-tag")},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),{content:this.overflowContent,disabled:!this.overflowTagIndex||!this.collapseTags,extCls:this.resolveClassName("select-tooltips")}]]),a.createVNode("input",{ref:"inputRef",style:r,class:this.resolveClassName("select-tag-input"),disabled:this.disabled,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,type:"text",value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(f=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:f.call(h)])}}),bk=a.defineComponent({name:"Select",directives:{clickoutside:Za},props:{modelValue:y.any,multiple:y.bool.def(!1),disabled:y.bool.def(!1),size:y.size().def(E6.DEFAULT),clearable:y.bool.def(!0),loading:y.bool.def(!1),filterable:y.bool.def(!1),remoteMethod:y.func,scrollHeight:y.number.def(204),minHeight:y.number,showAll:y.bool.def(!1),allOptionText:y.string.def(""),allOptionId:y.oneOfType([y.number,y.string]),showSelectAll:y.bool.def(!1),popoverMinWidth:y.number.def(0),showOnInit:y.bool.def(!1),multipleMode:y.oneOf(["default","tag"]).def("default"),tagTheme:sd(),behavior:A6(),collapseTags:y.bool.def(!1),autoHeight:y.bool.def(!0),noDataText:y.string,noMatchText:y.string,loadingText:y.string,placeholder:y.string,searchPlaceholder:y.string,selectAllText:y.string,scrollLoading:y.bool.def(!1),allowCreate:y.bool.def(!1),popoverOptions:Object,customContent:y.bool.def(!1),list:y.arrayOf(y.any).def([]),idKey:y.string.def("value"),displayKey:y.string.def("label"),withValidate:y.bool.def(!0),showSelectedIcon:y.bool.def(!0),inputSearch:y.bool.def(!1),enableVirtualRender:y.bool.def(!1),allowEmptyValues:y.array.def([]),autoFocus:y.bool.def(!1),disableFocusBehavior:y.bool.def(!1),keepSearchValue:y.bool.def(!1),prefix:y.string,selectedStyle:WL(),filterOption:{type:Function},searchWithPinyin:y.bool.def(!0),highlightKeyword:y.bool.def(!1),trigger:{type:String,default:"default"},disableScrollToSelectedOption:y.bool.def(!1),inputTooltipsOptions:{type:Object,default:()=>({})}},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur","tag-remove","select","deselect","search-change"],setup(e,{emit:t,slots:n}){const r=Ft("select"),{resolveClassName:i}=Re(),{modelValue:s,disabled:l,filterable:c,multiple:d,remoteMethod:m,loading:h,popoverMinWidth:f,showOnInit:p,multipleMode:g,allowCreate:w,customContent:_,showSelectedIcon:b,inputSearch:C,enableVirtualRender:S,showSelectAll:x,showAll:N,allOptionId:E,scrollHeight:T,list:R,displayKey:A,idKey:I,collapseTags:k,autoHeight:V,popoverOptions:L,allowEmptyValues:M,autoFocus:P,keepSearchValue:F,selectedStyle:z,filterOption:H,searchWithPinyin:B,highlightKeyword:te,disableFocusBehavior:Ce,trigger:W,disableScrollToSelectedOption:Y}=a.toRefs(e),q=a.ref(null),re=a.computed(()=>e.allOptionText),Z=a.computed(()=>e.noDataText===void 0?r.value.noData:e.noDataText),se=a.computed(()=>e.noMatchText===void 0?r.value.noMatchedData:e.noMatchText),ge=a.computed(()=>e.loadingText===void 0?r.value.loading:e.loadingText),le=a.computed(()=>e.placeholder===void 0?r.value.pleaseSelect:e.placeholder),de=a.computed(()=>e.searchPlaceholder===void 0?r.value.enterKeywords:e.searchPlaceholder),pe=a.computed(()=>e.selectAllText===void 0?r.value.selectAll:e.selectAllText),me=aa(),ee=a.ref(),X=a.ref(),j=a.ref(),J=a.ref(),ie=a.ref(),G=a.ref(),ue=a.ref(),Se=a.ref(new Map),oe=a.computed(()=>[...Se.value.values()].sort((be,xe)=>be.order-xe.order)),we=a.ref(new Map),Te=a.ref([]),Ne=a.computed(()=>Te.value.reduce((be,xe)=>(be[xe.value]=xe.label,be),{[`${E.value}`]:r.value.all})),ae=a.ref(),Ee=a.computed(()=>R.value.reduce((be,xe)=>(be[xe[I.value]]=xe[A.value],be),{})),Ve=a.ref(new Map),He=be=>be?(Array.isArray(be)?be:[be]).filter(a.isVNode):[],qe=be=>{const xe=be.type;return typeof xe=="object"?xe==null?void 0:xe.name:String(xe)},ht=be=>be==="Option"||be==="BkOption",Et=be=>be==="OptionGroup"||be==="BkOptionGroup",K=be=>{const xe=be.props??{},ze=xe.id!==void 0?xe.id:xe.value,tt=xe.name!==void 0?xe.name:xe.label,Mt=!!xe.disabled;return{value:ze,label:tt,disabled:Mt,rawProps:xe}},ne=()=>{var tt;const be=He(((tt=n.default)==null?void 0:tt.call(n))??[]),xe=new Map,ze=Mt=>{var ft;for(const zt of Mt){const Rt=qe(zt);if(ht(Rt)){const{value:Ut,label:Wt,disabled:Zt,rawProps:Yn}=K(zt);Ut!==void 0&&xe.set(Ut,{label:Wt??Ut,disabled:Zt,raw:Yn});continue}if(Et(Rt)){const Ut=(ft=zt.children)==null?void 0:ft.default,Wt=typeof Ut=="function"?He(Ut()):[];ze(Wt)}}};ze(be),Ve.value=xe},fe=()=>{var tt;const be=He(((tt=n.default)==null?void 0:tt.call(n))??[]);let xe=0;const ze=Mt=>{var ft;for(const zt of Mt){const Rt=qe(zt);if(ht(Rt)){xe+=1;continue}if(Et(Rt)){const Ut=(ft=zt.children)==null?void 0:ft.default,Wt=typeof Ut=="function"?He(Ut()):[];ze(Wt)}}};return ze(be),xe};ne();const _e=a.ref(new Map),De=(be,xe)=>{const ze=new Map(_e.value);ze.set(be,xe),_e.value=ze},We=(be,xe=!1)=>_e.value.get(be)??xe;a.watch([Se,R],()=>{Pi()}),a.watch(s,()=>{var be;Pi(),e.withValidate&&((be=me==null?void 0:me.validate)==null||be.call(me,"change"))},{deep:!0}),a.watch(Te,()=>{Ke.value&&a.nextTick(()=>{var be;Ke.value&&((be=ue.value)==null||be.updatePopover(null,st.value))})});const Qe=a.computed(()=>{if(lt.value)return R.value;const be=Ra.value;return be?R.value.filter(xe=>Tr(be,String(xe[A.value]),xe)):R.value}),et=a.computed(()=>l.value||h.value),at=a.computed(()=>Te.value.map(be=>{var xe,ze,tt;return((ze=(xe=Se.value)==null?void 0:xe.get(be.value))==null?void 0:ze.optionName)||Ee.value[be.value]||((tt=Ve.value.get(be.value))==null?void 0:tt.label)||be.label})),it=a.computed(()=>{var ze;const be=new Set;oe.value.length>0?oe.value.forEach(tt=>{tt.isDisabled||be.add(tt.optionID)}):Ve.value.forEach((tt,Mt)=>{tt.disabled||be.add(Mt)}),(ze=R.value)==null||ze.forEach(tt=>{tt!=null&&tt.disabled||be.add(tt[I.value])});const xe=[...be.values()];return xe.length?xe.every(tt=>Te.value.some(Mt=>vi(Mt.value,tt))):!1}),wt=a.computed(()=>{var be;return Te.value.length===1&&((be=Te.value[0])==null?void 0:be.value)===E.value}),It=a.computed(()=>!!we.value.size),dt=a.computed(()=>R.value.length>0||Ve.value.size>0?!1:!oe.value.length),rt=a.computed(()=>{if(R.value.length>0)return Ra.value&&Qe.value.length===0;if(Ve.value.size>0){const be=Ra.value;if(!be)return!1;for(const xe of Ve.value.values())if(Tr(be,String(xe.label),xe.raw))return!1;return!0}return oe.value.length&&oe.value.every(be=>!be.visible)}),lt=a.computed(()=>c.value&&typeof m.value=="function"),wn=a.computed(()=>!!(H.value&&typeof H.value=="function")),qn=a.computed(()=>_.value?!0:!(_s.value||dt.value||rt.value)),Gn=a.computed(()=>d.value&&x.value&&(!Ra.value||!c.value)),or=a.computed(()=>d.value&&N.value),lr=a.computed(()=>T.value-12-(Gn.value?32:0)),xn=a.ref(32),Kn=a.computed(()=>{if(!S.value)return!1;const be=Ve.value.size||fe(),xe=Qe.value.length+be;return xe===0&&typeof n.default=="function"?!0:xe*xn.value>lr.value}),fn=a.computed(()=>Math.ceil(lr.value/xn.value)),On=a.computed(()=>_s.value?ge.value:rt.value||R.value.length&&!Qe.value.length?se.value:dt.value?Z.value:""),ke=a.computed(()=>V.value?k.value&&!Ke.value:k.value),st=a.computed(()=>{var be;return ql({theme:`light ${i("select-popover")}`,trigger:"manual",width:Be.value,arrow:!1,placement:"bottom-start",isShow:Ke.value,offset:4,popoverDelay:0,renderType:id.AUTO,referenceCls:i("select-popover-reference"),floatingReference:V.value&&k.value?(be=G.value)==null?void 0:be.$el:void 0},L.value)}),{register:vt,unregister:xt}=Y3(Se),{register:Bt,unregister:Cn}=Y3(we),{isHover:Sr,setHover:oa,cancelHover:La}=O7(),Da=a.ref(!1),Je=()=>{Da.value||(Da.value=!0,t("focus"))},he=()=>{Da.value&&(Da.value=!1,gf(),t("blur"))},{popperWidth:Be,isPopoverShow:Ke,hidePopover:Vt,showPopover:an,togglePopover:qt}=LM({popoverMinWidth:f.value},X),sn=()=>{W.value!=="manual"&&Vt()},cr=()=>{W.value!=="manual"&&an()},la=a.computed(()=>c.value&&C.value&&Ke.value||w.value);a.watch(Ke,be=>{t("toggle",Ke.value),be?(ne(),document.addEventListener("keydown",Oo),setTimeout(()=>{var xe,ze;Ia(),tn(),ti(),Kn.value&&((ze=(xe=q.value)==null?void 0:xe.reset)==null||ze.call(xe))},10)):(F.value||(Cs.value=""),document.removeEventListener("keydown",Oo))});const ti=()=>{var xe,ze,tt,Mt,ft;if(Y.value)return;if(Kn.value){const Rt=ai().findIndex(Ut=>(Ut==null?void 0:Ut.rowType)==="option"&&vi(Ut==null?void 0:Ut.value,ae.value));Rt>=0&&((ze=(xe=q.value)==null?void 0:xe.scrollTo)==null||ze.call(xe,0,Rt*xn.value));return}const be=(Mt=(tt=j.value)==null?void 0:tt.querySelectorAll)==null?void 0:Mt.call(tt,".is-selected");(ft=be==null?void 0:be[0])==null||ft.scrollIntoView({block:"center"})},tn=()=>{var ze,tt;if(Kn.value){const ft=ai().filter(Rt=>(Rt==null?void 0:Rt.rowType)==="option"&&!(Rt!=null&&Rt.disabled)).map(Rt=>Rt.value);if(!ft.length){ae.value="";return}const zt=(ze=Te.value[0])==null?void 0:ze.value;zt!==void 0&&ft.some(Rt=>vi(Rt,zt))?ae.value=zt:ae.value=ft[0];return}const be=Te.value[0],xe=Se.value.get(be==null?void 0:be.value);xe&&!xe.isDisabled&&xe.visible?ae.value=be==null?void 0:be.value:ae.value=(tt=oe.value.find(Mt=>!Mt.isDisabled&&Mt.visible))==null?void 0:tt.optionID},Tr=(be,xe,ze={})=>{var tt,Mt;if(wn.value)return!!H.value(be,{...ze});if(B.value){const ft=Cu.parse(xe).map(Rt=>Rt.type===2?Rt.target.toLowerCase():Rt.target),zt=ft.reduce((Rt,Ut)=>Rt+Ut[0],"");return ft.join("").indexOf(be)!==-1||zt.indexOf(be)!==-1||((tt=Ps(String(xe)))==null?void 0:tt.includes(Ps(be)))}return(Mt=Ps(String(xe)))==null?void 0:Mt.includes(Ps(be))},ws=be=>{c.value&&(!Ke.value&&!(C.value||w.value)||(be?oe.value.forEach(xe=>{xe.visible=Tr(be,String(xe.optionName),{...xe.$props,...xe.$attrs})}):oe.value.forEach(xe=>{xe.visible=!0})))},{searchValue:Cs,customOptionName:ni,curSearchValue:Ra,searchLoading:_s}=DM(lt.value?m.value:ws,tn);a.watch(Cs,()=>{var be,xe;Ke.value&&(Kn.value?(xe=(be=q.value)==null?void 0:be.scrollTo)==null||xe.call(be,0,0):ie.value&&(ie.value.scrollTop=0),ae.value="",t("search-change",Cs.value))});const Rn=be=>{be!==s.value&&(t("update:modelValue",be,s.value),t("change",be,s.value),Pi(),d.value&&(ni.value=""))},sc=()=>{et.value||W.value==="manual"||(ne(),Je(),qt())},So=be=>{c.value&&(ni.value=be,be!=null&&be.length||Rn(d.value?[]:""))},pf=(be,xe)=>{const ze=String(be);if(!w.value||!ze)return;xe.stopPropagation(),xe.preventDefault();const tt=oe.value.find(ft=>Ps(String(ft.optionName))===Ps(ze));if(c.value&&tt){ri(tt);return}Se.value.get(ze)||(d.value?(Te.value.push({value:ze,label:ze}),Rn(Te.value.map(ft=>ft.value))):(Te.value=[{value:ze,label:ze}],Rn(ze),sn()))},ri=be=>{if(et.value||!be)return;const xe=Te.value.findIndex(ze=>ze.value===E.value);if(xe>-1&&Te.value.splice(xe,1),d.value){const ze=Te.value.findIndex(tt=>tt.value===be.optionID);ze>-1?(Te.value.splice(ze,1),Rn(Te.value.map(tt=>tt.value)),t("deselect",be.optionID)):(Te.value.push({value:be.optionID,label:be.optionName||be.optionID}),Rn(Te.value.map(tt=>tt.value)),t("select",be.optionID),Mi()),Ia()}else Te.value=[{label:be.optionName||be.optionID,value:be.optionID}],Rn(be.optionID),t("select",be.optionID),sn(),he()},Mi=()=>{var be;["tag"].includes(g.value)&&la.value&&((be=G.value)==null||be.updateModelValue(""))},Ia=()=>{Ce.value||setTimeout(()=>{var be,xe,ze;!C.value&&!w.value?(be=J.value)==null||be.focus():g.value==="tag"?(xe=G.value)==null||xe.focus():(ze=ee.value)==null||ze.focus()},0)},gf=()=>{setTimeout(()=>{var be,xe;g.value==="tag"?(be=G.value)==null||be.blur():(xe=ee.value)==null||xe.blur()},0)},oc=be=>{be.stopPropagation(),Te.value=[],ni.value="",Mi(),Rn(d.value?[]:""),t("clear",d.value?[]:""),sn()},lc=()=>{ae.value=""},To=()=>{var be;if(it.value)Te.value=[];else{const xe=new Map;oe.value.forEach(ze=>{ze.isDisabled||xe.has(ze.optionID)||xe.set(ze.optionID,ze.optionName||ze.optionID)}),(be=R.value)==null||be.forEach(ze=>{ze.disabled||xe.has(ze[I.value])||xe.set(ze[I.value],ze[A.value])}),Te.value=Array.from(xe.keys()).map(ze=>({value:ze,label:xe.get(ze)}))}Rn(Te.value.map(xe=>xe.value)),Ia()},vf=()=>{if(!or.value)return;Te.value.findIndex(xe=>xe.value===E.value)>-1?Te.value=[]:Te.value=[{value:E.value,label:r.value.all}],Rn(Te.value.map(xe=>xe.value)),Ia()},cc=be=>{const{scrollTop:xe,clientHeight:ze,scrollHeight:tt}=be.target;xe+ze===tt&&t("scroll-end")},Eo=be=>{var ze;const xe=be==null?void 0:be[1];((ze=xe==null?void 0:xe.pos)==null?void 0:ze.bottom)===0&&t("scroll-end")},ai=()=>{var Mt;const be=Ra.value||"",xe=n.optionRender||n.virtualScrollRender,ze=[];return Qe.value.forEach(ft=>{const zt=ft[I.value];ze.push({rowType:"option",key:`__list_${String(zt)}`,value:zt,disabled:!!ft.disabled,vnode:a.createVNode(Pu,{id:zt,key:zt,disabled:!!ft.disabled,name:ft[A.value],skipRegister:!0},typeof xe=="function"?{default:()=>xe({item:ft})}:null)})}),He(((Mt=n.default)==null?void 0:Mt.call(n))??[]).forEach((ft,zt)=>{var Ut,Wt;const Rt=qe(ft);if(ht(Rt)){const{value:Zt,label:Yn,disabled:$i,rawProps:Gt}=K(ft);if(Zt===void 0||be&&!Tr(be,String(Yn??Zt),Gt))return;ze.push({rowType:"option",key:ft.key??`__slot_${zt}_${String(Zt)}`,value:Zt,disabled:$i,vnode:a.cloneVNode(ft,{skipRegister:!0},!0)});return}if(Et(Rt)){const Zt=ft.props??{};if(Zt.visible===!1)return;const Yn=ft.key??`__group_${zt}`,$i=String(Zt.label??""),Gt=!!Zt.disabled,Ot=!!Zt.collapsible,Dt=We(Yn,!!Zt.collapse),Ns=typeof((Ut=ft.children)==null?void 0:Ut.label)=="function"?ft.children.label:null,Ur=(Wt=ft.children)==null?void 0:Wt.default,dc=(typeof Ur=="function"?He(Ur()):[]).filter(ca=>ht(qe(ca))),Ao=dc.filter(ca=>{const{value:Fi,label:Hi,rawProps:on}=K(ca);return Fi===void 0?!1:be?Tr(be,String(Hi??Fi),on):!0});if(be&&Ao.length===0||!dc.length)return;ze.push({rowType:"groupHeader",key:`__group_header_${String(Yn)}`,groupKey:Yn,groupProps:Zt,label:$i,disabled:Gt,collapsible:Ot,collapsed:Dt,count:Ao.length,labelSlot:Ns}),Dt||Ao.forEach((ca,Fi)=>{var ua;const{value:Hi,disabled:on}=K(ca);if(Hi===void 0)return;const Lo=[(ua=ca.props)==null?void 0:ua.class,"is-grouped",Ot?"is-group-collapsible":""];ze.push({rowType:"option",key:ca.key??`__group_${zt}_opt_${Fi}_${String(Hi)}`,value:Hi,disabled:on,vnode:a.cloneVNode(ca,{skipRegister:!0,class:Lo},!0)})});return}ze.push({rowType:"vnode",key:ft.key??`__vnode_${zt}`,vnode:ft})}),e.scrollLoading&&ze.push({rowType:"loading",key:"__loading"}),ze},ii=be=>{if(et.value)return;const xe=Te.value.findIndex(ze=>ze.value===be);xe>-1&&(Te.value.splice(xe,1),Rn(Te.value.map(ze=>ze.value)),t("tag-remove",be))},ki=be=>{var ze,tt,Mt;let xe=be;if(typeof xe=="object"){for(const ft of Se.value.keys())if(vi(ft,xe)){xe=ft;break}}return((tt=(ze=Se.value)==null?void 0:ze.get(xe))==null?void 0:tt.optionName)||Ee.value[xe]||((Mt=Ve.value.get(xe))==null?void 0:Mt.label)||Ne.value[xe]||xe},Pi=()=>{ne();const be=xe=>{vi(xe,Te.value)||(Te.value=xe)};Array.isArray(s.value)?be([...s.value.map(xe=>({value:xe,label:ki(xe)}))]):s.value||s.value===0||M.value.includes(s.value)?be([{value:s.value,label:ki(s.value)}]):be([])},yf=be=>{Te.value=be.map(xe=>({label:xe[A.value],value:xe[I.value]}))},Oo=be=>{var tt,Mt,ft,zt,Rt,Ut;if(!Ke.value)return;if(Kn.value){const Wt=ai(),Zt=Wt.filter(Gt=>(Gt==null?void 0:Gt.rowType)==="option"&&!(Gt!=null&&Gt.disabled)).map(Gt=>Gt.value);if(!Zt.length)return;const Yn=Zt.findIndex(Gt=>vi(Gt,ae.value)),$i=Gt=>{var Dt,Ns;const Ot=Wt.findIndex(Ur=>(Ur==null?void 0:Ur.rowType)==="option"&&vi(Ur==null?void 0:Ur.value,Gt));Ot>=0&&((Ns=(Dt=q.value)==null?void 0:Dt.scrollTo)==null||Ns.call(Dt,0,Ot*xn.value))};switch(be.code){case"ArrowUp":case"ArrowDown":{be.preventDefault();let Gt=0;be.code==="ArrowDown"?Gt=Yn>=Zt.length-1?0:Math.max(0,Yn+1):Gt=Yn<=0?Zt.length-1:Yn-1,ae.value=Zt[Gt],$i(ae.value);break}case"Backspace":{if(!d.value||!Te.value.length||ni.value.length||be.target===J.value)return;Te.value.pop(),Rn(Te.value.map(Gt=>Gt.value));break}case"NumpadEnter":case"Enter":{const{value:Gt}=be.target;if(w.value&&Gt||be.target===J.value&&((tt=J.value)!=null&&tt.value))return;const Ot=ae.value;if(Ot===void 0||Ot==="")return;ri({optionID:Ot,optionName:ki(Ot)});break}}return}const xe=oe.value.filter(Wt=>!Wt.isDisabled&&Wt.visible),ze=xe.findIndex(Wt=>Wt.optionID===ae.value);switch(be.code){case"ArrowUp":case"ArrowDown":{be.preventDefault();let Wt=0;be.code==="ArrowDown"?Wt=ze>=xe.length-1?0:ze+1:Wt=ze===0?xe.length-1:ze-1,RM((Mt=xe[Wt])==null?void 0:Mt.$el,j.value)||(zt=(ft=xe[Wt])==null?void 0:ft.$el)==null||zt.scrollIntoView(),ae.value=(Rt=xe[Wt])==null?void 0:Rt.optionID;break}case"Backspace":{if(!d.value||!Te.value.length||ni.value.length||be.target===J.value)return;Te.value.pop(),Rn(Te.value.map(Wt=>Wt.value));break}case"NumpadEnter":case"Enter":{const{value:Wt}=be.target;if(w.value&&Wt||be.target===J.value&&((Ut=J.value)!=null&&Ut.value))return;const Zt=Se.value.get(ae.value);ri(Zt);break}}},uc=({event:be})=>{var ze;const{target:xe}=be;(ze=X.value)!=null&&ze.contains(xe)||X.value===xe||(sn(),he())};return a.provide(Zd,a.reactive({multiple:d,selected:Te,activeOptionValue:ae,showSelectedIcon:b,selectedStyle:z,curSearchValue:Ra,highlightKeyword:te,isSearchEmpty:rt,register:vt,unregister:xt,registerGroup:Bt,unregisterGroup:Cn,handleOptionSelected:ri,handleGetLabelByValue:ki})),a.onMounted(()=>{Pi(),setTimeout(()=>{p.value&&cr(),P.value&&Ia()})}),{t:r,selected:Te,isInput:la,options:oe,isDisabled:et,selectedLabel:at,isPopoverShow:Ke,isHover:Sr,popperWidth:Be,inputRef:ee,triggerRef:X,contentRef:j,searchRef:J,scrollContainerRef:ie,selectTagInputRef:G,popoverRef:ue,searchLoading:_s,isOptionsEmpty:dt,isSearchEmpty:rt,isFocus:Da,isShowSelectContent:qn,curContentText:On,isGroup:It,searchValue:Cs,curSearchValue:Ra,customOptionName:ni,isShowAll:or,isShowSelectAll:Gn,virtualHeight:lr,filterList:Qe,isCollapseTags:ke,popoverConfig:st,isAllSelected:it,isAll:wt,displayAllText:re,focusInput:Ia,setHover:oa,cancelHover:La,handleFocus:Je,handleBlur:he,handleTogglePopover:sc,handleClear:oc,hidePopover:Vt,showPopover:an,toggleSelectAll:To,toggleAll:vf,handleOptionSelected:ri,handleClickOutside:uc,handleScroll:cc,handleVirtualContentScroll:Eo,handleDeleteTag:ii,handleInputChange:So,handleSelectedAllOptionMouseEnter:lc,localLoadingText:ge,localPlaceholder:le,localSearchPlaceholder:de,localSelectAllText:pe,resolveClassName:i,handleCreateCustomOption:pf,defaultSearchMethod:Tr,virtualLineHeight:xn,isEnableVirtualRender:Kn,preloadItemCount:fn,virtualRenderRef:q,setSelected:yf,buildVirtualRows:ai,groupCollapseState:_e,getGroupCollapse:We,handleToggleGroupCollapseVirtual:(be,xe)=>{if(!(xe!=null&&xe.collapsible)||xe!=null&&xe.disabled)return;const ze=!We(be,!!(xe!=null&&xe.collapse));De(be,ze);const tt=xe==null?void 0:xe["onUpdate:collapse"];typeof tt=="function"&&tt(ze)},handleExtensionClick:be=>{be.stopPropagation()}}},render(){const e=nt({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>{var p,g,w;return this.loading?a.createVNode(Ka,{class:"spinner",loading:!0,mode:"spin",size:"mini",theme:"primary"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled||this.allowCreate&&this.isHover&&this.customOptionName&&!this.isDisabled?a.createVNode(ir,{class:"clear-icon",onClick:this.handleClear},null):(p=this.$slots)!=null&&p.suffix?a.createVNode("span",{class:"angle-down"},[(w=(g=this.$slots)==null?void 0:g.suffix)==null?void 0:w.call(g)]):a.createVNode(yo,{class:"angle-down"},null)},n=()=>{var p;return this.prefix?()=>a.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[a.createVNode("span",null,[this.prefix])]):(p=this.$slots)!=null&&p.prefix?()=>{var g,w;return(w=(g=this.$slots)==null?void 0:g.prefix)==null?void 0:w.call(g)}:void 0},r=()=>{if(this.isShowSelectAll)return a.createVNode("li",{class:this.resolveClassName("select-option"),onClick:this.toggleSelectAll,onMouseenter:this.handleSelectedAllOptionMouseEnter},[this.selectedStyle==="checkbox"&&a.createVNode(Bn,{class:this.resolveClassName("select-checkbox"),indeterminate:!this.isAllSelected&&!!this.selected.length&&!this.isAll,modelValue:this.isAllSelected},null),this.localSelectAllText])},i=()=>{var p,g;return((g=(p=this.$slots)==null?void 0:p.allOptionIcon)==null?void 0:g.call(p))||a.createVNode(zd,{class:"select-all-icon"},null)},s=()=>a.createVNode("span",null,[this.displayAllText||this.t.all]),l=()=>{var p;if(this.isShowAll)return a.createVNode("div",{class:this.resolveClassName("select-all")},[a.createVNode("div",{class:["wrapper",this.selected.length===1&&((p=this.selected[0])==null?void 0:p.value)===this.allOptionId?"active":""],onClick:this.toggleAll},[i(),s()])])},c=()=>{var p,g,w;return this.multipleMode==="tag"?a.createVNode(yk,{ref:"selectTagInputRef",modelValue:this.customOptionName,"onUpdate:modelValue":_=>this.customOptionName=_,behavior:this.behavior,collapseTags:this.isCollapseTags,disabled:this.isDisabled,filterable:this.isInput,placeholder:this.localPlaceholder,selected:this.selected,tagTheme:this.tagTheme,onEnter:this.handleCreateCustomOption,onRemove:this.handleDeleteTag},{prefix:n(),default:((p=this.$slots)==null?void 0:p.tag)&&(()=>{var _;return(_=this.$slots)==null?void 0:_.tag({selected:this.selected})}),tagRender:((g=this.$slots)==null?void 0:g.tagRender)&&(_=>{var b;return(b=this.$slots)==null?void 0:b.tagRender(_)}),suffix:()=>t()}):a.createVNode(Di,a.mergeProps({ref:"inputRef",behavior:this.behavior,disabled:this.isDisabled,modelValue:this.isInput&&this.customOptionName?this.customOptionName:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,size:this.size,stopPropagation:!1,tooltipsOptions:this.inputTooltipsOptions,type:"text",withValidate:!1,onEnter:this.handleCreateCustomOption,onInput:this.handleInputChange},this.prefix?{prefix:this.prefix}:null),{...typeof((w=this.$slots)==null?void 0:w.prefix)=="function"?{prefix:()=>{var _,b;return(b=(_=this.$slots)==null?void 0:_.prefix)==null?void 0:b.call(_)}}:null,suffix:()=>t()})},d=()=>{var p,g;return a.createVNode("div",{ref:"triggerRef",style:{height:this.autoHeight&&this.collapseTags?"32px":""},class:this.resolveClassName("select-trigger"),onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((g=(p=this.$slots)==null?void 0:p.trigger)==null?void 0:g.call(p,{selected:this.selected}))||c()])},m=()=>this.filterList.map(p=>{var w,_;const g=((w=this.$slots)==null?void 0:w.optionRender)||((_=this.$slots)==null?void 0:_.virtualScrollRender);return a.createVNode(Pu,{id:p[this.idKey],key:p[this.idKey],disabled:!!p.disabled,name:p[this.displayKey]},typeof g=="function"?{default:()=>g({item:p})}:null)}),h=()=>{var g;const p=((g=this.buildVirtualRows)==null?void 0:g.call(this))??[];return a.createVNode(rc,{ref:"virtualRenderRef",height:this.virtualHeight,className:this.resolveClassName("select-dropdown"),lineHeight:this.virtualLineHeight,list:p,minHeight:this.minHeight||30,preloadItemCount:this.preloadItemCount,wrapperStyle:{width:"100%",display:"block"},onContentScroll:this.handleVirtualContentScroll},{default:({data:w})=>a.createVNode("ul",{class:this.resolveClassName("select-options")},[w.map(_=>{if(_.rowType==="groupHeader"){const b=nt({"default-group-label-icon":!0,collapse:_.collapsed});return a.createVNode("li",{key:_.key,class:nt({[this.resolveClassName("option-group-label")]:!0,collapsible:_.collapsible,disabled:_.disabled}),onClick:()=>this.handleToggleGroupCollapseVirtual(_.groupKey,_.groupProps)},[_.labelSlot?_.labelSlot():a.createVNode("span",{class:"default-group-label"},[_.collapsible&&a.createVNode(wo,{class:b},null),a.createVNode("span",{class:"default-group-label-title"},[_.label,a.createTextVNode(" ("),_.count,a.createTextVNode(")")])])])}return _.rowType==="option"?_.vnode:_.rowType==="loading"?a.createVNode("li",{key:_.key,class:this.resolveClassName("select-options-loading")},[a.createVNode(Ka,{class:"spinner mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.localLoadingText])]):_.vnode})])})},f=()=>{var p,g,w,_;return a.createVNode("div",{ref:"contentRef",class:this.resolveClassName("select-content-wrapper")},[l(),this.filterable&&!this.inputSearch&&a.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[a.createVNode(vs,{width:16,height:16,class:"icon-search"},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),"onUpdate:modelValue":b=>this.searchValue=b,placeholder:this.localSearchPlaceholder},null),[[a.vModelText,this.searchValue]])]),!this.isShowSelectContent&&a.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&a.createVNode(Ka,{class:"mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:this.resolveClassName("select-content")},[this.isEnableVirtualRender?a.withDirectives(a.createVNode("div",null,[this.isShowSelectAll&&a.createVNode("ul",{class:this.resolveClassName("select-options")},[r()]),h()]),[[a.vShow,this.isShowSelectContent]]):a.withDirectives(a.createVNode("div",{ref:"scrollContainerRef",style:{maxHeight:`${this.scrollHeight}px`,minHeight:`${this.minHeight}px`},class:this.resolveClassName("select-dropdown"),onScroll:this.handleScroll},[a.createVNode("ul",{class:this.resolveClassName("select-options")},[r(),m(),(g=(p=this.$slots)==null?void 0:p.default)==null?void 0:g.call(p),this.scrollLoading&&a.createVNode("li",{class:this.resolveClassName("select-options-loading")},[a.createVNode(Ka,{class:"spinner mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.localLoadingText])])])]),[[a.vShow,this.isShowSelectContent]]),((w=this.$slots)==null?void 0:w.extension)&&a.createVNode("div",{class:this.resolveClassName("select-extension"),onClick:this.handleExtensionClick},[(_=this.$slots)==null?void 0:_.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(sr,a.mergeProps(this.popoverConfig,{ref:"popoverRef",onClickoutside:this.handleClickOutside}),{default:()=>d(),content:()=>f()})])}}),A9=Wn(bk,{Option:Pu,Group:tk}),Wa=10;function wk(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(i=[])=>{t.curPage=1,t.totalSize=i.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const s=[];if(t.pageSize>0)for(let l=0;l<t.totalSize;l+=t.pageSize)s.push(i.slice(l,l+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...s),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:i=>{t.curPage=i,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function Ck(e){const{useGroup:t,saveKey:n,displayKey:r,list:i}=a.toRefs(e),s=a.ref([]),l=a.ref({});return a.watch([t,n,r,i],()=>{s.value=[];let c=a.markRaw(i.value);t.value&&(c=c.reduce((d,m)=>{let h=[];return m.children&&(h=m.children.map(f=>({group:{groupId:m[n.value],groupName:m[r.value]},...f}))),d.concat(h)},[])),s.value=c,l.value=c.reduce((d,m)=>(d[m[n.value]]=m,d),{})},{immediate:!0,deep:!0}),{flatList:s,saveKeyMap:l}}const h5=e=>{const t=e.length;let n=0;for(let r=0;r<t;r++)(e.charCodeAt(r)&65280)!==0&&(n+=1),n+=1;return n},z7=(e,t,n)=>{a.watch([n,t],()=>{i()},{flush:"post"});const r=a.ref(null),i=()=>{t.value&&(r.value=null,setTimeout(()=>{const s=Array.from(e.value.querySelectorAll(".tag-item")),l=s.findIndex((c,d)=>d?s[d-1].offsetTop!==c.offsetTop:!1);r.value=l>0?l-1:null}))};return{overflowTagIndex:r}};var t1,m5;function _k(){if(m5)return t1;m5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return t1=e,t1}var n1,p5;function U7(){if(p5)return n1;p5=1;var e=Hl(),t=_k(),n=xr(),r=td(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return s?s.call(c):"";var d=c+"";return d=="0"&&1/c==-1/0?"-0":d}return n1=l,n1}var r1,g5;function Nk(){if(g5)return r1;g5=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(s);++i<s;)l[i]=t[i+n];return l}return r1=e,r1}var a1,v5;function xk(){if(v5)return a1;v5=1;var e=Nk();function t(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:e(n,r,i)}return a1=t,a1}var i1,y5;function Sk(){if(y5)return i1;y5=1;function e(t,n,r,i){for(var s=t.length,l=r+(i?1:-1);i?l--:++l<s;)if(n(t[l],l,t))return l;return-1}return i1=e,i1}var s1,b5;function Tk(){if(b5)return s1;b5=1;function e(t){return t!==t}return s1=e,s1}var o1,w5;function Ek(){if(w5)return o1;w5=1;function e(t,n,r){for(var i=r-1,s=t.length;++i<s;)if(t[i]===n)return i;return-1}return o1=e,o1}var l1,C5;function W7(){if(C5)return l1;C5=1;var e=Sk(),t=Tk(),n=Ek();function r(i,s,l){return s===s?n(i,s,l):e(i,t,l)}return l1=r,l1}var c1,_5;function Ok(){if(_5)return c1;_5=1;var e=W7();function t(n,r){for(var i=n.length;i--&&e(r,n[i],0)>-1;);return i}return c1=t,c1}var u1,N5;function Ak(){if(N5)return u1;N5=1;var e=W7();function t(n,r){for(var i=-1,s=n.length;++i<s&&e(r,n[i],0)>-1;);return i}return u1=t,u1}var d1,x5;function Lk(){if(x5)return d1;x5=1;function e(t){return t.split("")}return d1=e,d1}var f1,S5;function Dk(){if(S5)return f1;S5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+i+s+"]");function d(m){return c.test(m)}return f1=d,f1}var h1,T5;function Rk(){if(T5)return h1;T5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+i+"]",d="\\ud83c[\\udffb-\\udfff]",m="(?:"+c+"|"+d+")",h="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",w=m+"?",_="["+s+"]?",b="(?:"+g+"(?:"+[h,f,p].join("|")+")"+_+w+")*",C=_+w+b,S="(?:"+[h+c+"?",c,f,p,l].join("|")+")",x=RegExp(d+"(?="+d+")|"+S+C,"g");function N(E){return E.match(x)||[]}return h1=N,h1}var m1,E5;function Ik(){if(E5)return m1;E5=1;var e=Lk(),t=Dk(),n=Rk();function r(i){return t(i)?n(i):e(i)}return m1=r,m1}var p1,O5;function j7(){if(O5)return p1;O5=1;var e=U7();function t(n){return n==null?"":e(n)}return p1=t,p1}var g1,A5;function Vk(){if(A5)return g1;A5=1;var e=U7(),t=yb(),n=xk(),r=Ok(),i=Ak(),s=Ik(),l=j7();function c(d,m,h){if(d=l(d),d&&(h||m===void 0))return t(d);if(!d||!(m=e(m)))return d;var f=s(d),p=s(m),g=i(f,p),w=r(f,p)+1;return n(f,g,w).join("")}return g1=c,g1}var Mk=Vk();const kk=bn(Mk);var v1,L5;function Pk(){if(L5)return v1;L5=1;var e=Fb(),t=tc();function n(r,i){return r&&e(r,i,t)}return v1=n,v1}var y1,D5;function $k(){if(D5)return y1;D5=1;var e=vo();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var l=i.length,c=r?l:-1,d=Object(i);(r?c--:++c<l)&&s(d[c],c,d)!==!1;);return i}}return y1=t,y1}var b1,R5;function Fk(){if(R5)return b1;R5=1;var e=Pk(),t=$k(),n=t(e);return b1=n,b1}var w1,I5;function Hk(){if(I5)return w1;I5=1;var e=Fk();function t(n,r){var i=[];return e(n,function(s,l,c){r(s,l,c)&&i.push(s)}),i}return w1=t,w1}var C1,V5;function Bk(){if(V5)return C1;V5=1;var e=fd(),t=E9(),n=1,r=2;function i(s,l,c,d){var m=c.length,h=m,f=!d;if(s==null)return!h;for(s=Object(s);m--;){var p=c[m];if(f&&p[2]?p[1]!==s[p[0]]:!(p[0]in s))return!1}for(;++m<h;){p=c[m];var g=p[0],w=s[g],_=p[1];if(f&&p[2]){if(w===void 0&&!(g in s))return!1}else{var b=new e;if(d)var C=d(w,_,g,s,l,b);if(!(C===void 0?t(_,w,n|r,d,b):C))return!1}}return!0}return C1=i,C1}var _1,M5;function q7(){if(M5)return _1;M5=1;var e=zr();function t(n){return n===n&&!e(n)}return _1=t,_1}var N1,k5;function zk(){if(k5)return N1;k5=1;var e=q7(),t=tc();function n(r){for(var i=t(r),s=i.length;s--;){var l=i[s],c=r[l];i[s]=[l,c,e(c)]}return i}return N1=n,N1}var x1,P5;function G7(){if(P5)return x1;P5=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return x1=e,x1}var S1,$5;function Uk(){if($5)return S1;$5=1;var e=Bk(),t=zk(),n=G7();function r(i){var s=t(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(l){return l===i||e(l,i,s)}}return S1=r,S1}var T1,F5;function L9(){if(F5)return T1;F5=1;var e=xr(),t=td(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return T1=i,T1}var E1,H5;function Wk(){if(H5)return E1;H5=1;var e=D6(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var l=arguments,c=i?i.apply(this,l):l[0],d=s.cache;if(d.has(c))return d.get(c);var m=r.apply(this,l);return s.cache=d.set(c,m)||d,m};return s.cache=new(n.Cache||e),s}return n.Cache=e,E1=n,E1}var O1,B5;function jk(){if(B5)return O1;B5=1;var e=Wk(),t=500;function n(r){var i=e(r,function(l){return s.size===t&&s.clear(),l}),s=i.cache;return i}return O1=n,O1}var A1,z5;function qk(){if(z5)return A1;z5=1;var e=jk(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(l,c,d,m){s.push(d?m.replace(n,"$1"):c||l)}),s});return A1=r,A1}var L1,U5;function K7(){if(U5)return L1;U5=1;var e=xr(),t=L9(),n=qk(),r=j7();function i(s,l){return e(s)?s:t(s,l)?[s]:n(r(s))}return L1=i,L1}var D1,W5;function ef(){if(W5)return D1;W5=1;var e=td();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return D1=t,D1}var R1,j5;function Y7(){if(j5)return R1;j5=1;var e=K7(),t=ef();function n(r,i){i=e(i,r);for(var s=0,l=i.length;r!=null&&s<l;)r=r[t(i[s++])];return s&&s==l?r:void 0}return R1=n,R1}var I1,q5;function X7(){if(q5)return I1;q5=1;var e=Y7();function t(n,r,i){var s=n==null?void 0:e(n,r);return s===void 0?i:s}return I1=t,I1}var V1,G5;function Gk(){if(G5)return V1;G5=1;function e(t,n){return t!=null&&n in Object(t)}return V1=e,V1}var M1,K5;function J7(){if(K5)return M1;K5=1;var e=K7(),t=md(),n=xr(),r=k6(),i=M6(),s=ef();function l(c,d,m){d=e(d,c);for(var h=-1,f=d.length,p=!1;++h<f;){var g=s(d[h]);if(!(p=c!=null&&m(c,g)))break;c=c[g]}return p||++h!=f?p:(f=c==null?0:c.length,!!f&&i(f)&&r(g,f)&&(n(c)||t(c)))}return M1=l,M1}var k1,Y5;function Kk(){if(Y5)return k1;Y5=1;var e=Gk(),t=J7();function n(r,i){return r!=null&&t(r,i,e)}return k1=n,k1}var P1,X5;function Yk(){if(X5)return P1;X5=1;var e=E9(),t=X7(),n=Kk(),r=L9(),i=q7(),s=G7(),l=ef(),c=1,d=2;function m(h,f){return r(h)&&i(f)?s(l(h),f):function(p){var g=t(p,h);return g===void 0&&g===f?n(p,h):e(f,g,c|d)}}return P1=m,P1}var $1,J5;function Xk(){if(J5)return $1;J5=1;function e(t){return function(n){return n==null?void 0:n[t]}}return $1=e,$1}var F1,Z5;function Jk(){if(Z5)return F1;Z5=1;var e=Y7();function t(n){return function(r){return e(r,n)}}return F1=t,F1}var H1,Q5;function Zk(){if(Q5)return H1;Q5=1;var e=Xk(),t=Jk(),n=L9(),r=ef();function i(s){return n(s)?e(r(s)):t(s)}return H1=i,H1}var B1,e8;function Qk(){if(e8)return B1;e8=1;var e=Uk(),t=Yk(),n=P6(),r=xr(),i=Zk();function s(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return B1=s,B1}var z1,t8;function eP(){if(t8)return z1;t8=1;var e=I7(),t=Hk(),n=Qk(),r=xr();function i(s,l){var c=r(s)?e:t;return c(s,n(l,3))}return z1=i,z1}var tP=eP();const nP=bn(tP);/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Z7,setPrototypeOf:n8,isFrozen:rP,getPrototypeOf:aP,getOwnPropertyDescriptor:iP}=Object;let{freeze:zn,seal:Br,create:Q7}=Object,{apply:J3,construct:Z3}=typeof Reflect<"u"&&Reflect;zn||(zn=function(t){return t});Br||(Br=function(t){return t});J3||(J3=function(t,n,r){return t.apply(n,r)});Z3||(Z3=function(t,n){return new t(...n)});const nu=Un(Array.prototype.forEach),sP=Un(Array.prototype.lastIndexOf),r8=Un(Array.prototype.pop),Ko=Un(Array.prototype.push),oP=Un(Array.prototype.splice),_u=Un(String.prototype.toLowerCase),U1=Un(String.prototype.toString),a8=Un(String.prototype.match),Yo=Un(String.prototype.replace),lP=Un(String.prototype.indexOf),cP=Un(String.prototype.trim),Jr=Un(Object.prototype.hasOwnProperty),kn=Un(RegExp.prototype.test),Xo=uP(TypeError);function Un(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return J3(e,t,r)}}function uP(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Z3(e,n)}}function Tt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_u;n8&&n8(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(rP(t)||(t[r]=s),i=s)}e[i]=!0}return e}function dP(e){for(let t=0;t<e.length;t++)Jr(e,t)||(e[t]=null);return e}function qa(e){const t=Q7(null);for(const[n,r]of Z7(e))Jr(e,n)&&(Array.isArray(r)?t[n]=dP(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=qa(r):t[n]=r);return t}function Jo(e,t){for(;e!==null;){const r=iP(e,t);if(r){if(r.get)return Un(r.get);if(typeof r.value=="function")return Un(r.value)}e=aP(e)}function n(){return null}return n}const i8=zn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),W1=zn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j1=zn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fP=zn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),q1=zn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hP=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),s8=zn(["#text"]),o8=zn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),G1=zn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),l8=zn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ru=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mP=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),pP=Br(/<%[\w\W]*|[\w\W]*%>/gm),gP=Br(/\$\{[\w\W]*/gm),vP=Br(/^data-[\-\w.\u00B7-\uFFFF]+$/),yP=Br(/^aria-[\-\w]+$/),ew=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bP=Br(/^(?:\w+script|data):/i),wP=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tw=Br(/^html$/i),CP=Br(/^[a-z][.\w]*(-[.\w]+)+$/i);var c8=Object.freeze({__proto__:null,ARIA_ATTR:yP,ATTR_WHITESPACE:wP,CUSTOM_ELEMENT:CP,DATA_ATTR:vP,DOCTYPE_NAME:tw,ERB_EXPR:pP,IS_ALLOWED_URI:ew,IS_SCRIPT_OR_DATA:bP,MUSTACHE_EXPR:mP,TMPLIT_EXPR:gP});const Zo={element:1,text:3,progressingInstruction:7,comment:8,document:9},_P=function(){return typeof window>"u"?null:window},NP=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},u8=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function nw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_P();const t=Je=>nw(Je);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Zo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:c,Element:d,NodeFilter:m,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:g}=e,w=d.prototype,_=Jo(w,"cloneNode"),b=Jo(w,"remove"),C=Jo(w,"nextSibling"),S=Jo(w,"childNodes"),x=Jo(w,"parentNode");if(typeof l=="function"){const Je=n.createElement("template");Je.content&&Je.content.ownerDocument&&(n=Je.content.ownerDocument)}let N,E="";const{implementation:T,createNodeIterator:R,createDocumentFragment:A,getElementsByTagName:I}=n,{importNode:k}=r;let V=u8();t.isSupported=typeof Z7=="function"&&typeof x=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:M,TMPLIT_EXPR:P,DATA_ATTR:F,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:te}=c8;let{IS_ALLOWED_URI:Ce}=c8,W=null;const Y=Tt({},[...i8,...W1,...j1,...q1,...s8]);let q=null;const re=Tt({},[...o8,...G1,...l8,...ru]);let Z=Object.seal(Q7(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,ge=null,le=!0,de=!0,pe=!1,me=!0,ee=!1,X=!0,j=!1,J=!1,ie=!1,G=!1,ue=!1,Se=!1,oe=!0,we=!1;const Te="user-content-";let Ne=!0,ae=!1,Ee={},Ve=null;const He=Tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const ht=Tt({},["audio","video","img","source","image","track"]);let Et=null;const K=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let De=_e,We=!1,Qe=null;const et=Tt({},[ne,fe,_e],U1);let at=Tt({},["mi","mo","mn","ms","mtext"]),it=Tt({},["annotation-xml"]);const wt=Tt({},["title","style","font","a","script"]);let It=null;const dt=["application/xhtml+xml","text/html"],rt="text/html";let lt=null,wn=null;const qn=n.createElement("form"),Gn=function(he){return he instanceof RegExp||he instanceof Function},or=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wn&&wn===he)){if((!he||typeof he!="object")&&(he={}),he=qa(he),It=dt.indexOf(he.PARSER_MEDIA_TYPE)===-1?rt:he.PARSER_MEDIA_TYPE,lt=It==="application/xhtml+xml"?U1:_u,W=Jr(he,"ALLOWED_TAGS")?Tt({},he.ALLOWED_TAGS,lt):Y,q=Jr(he,"ALLOWED_ATTR")?Tt({},he.ALLOWED_ATTR,lt):re,Qe=Jr(he,"ALLOWED_NAMESPACES")?Tt({},he.ALLOWED_NAMESPACES,U1):et,Et=Jr(he,"ADD_URI_SAFE_ATTR")?Tt(qa(K),he.ADD_URI_SAFE_ATTR,lt):K,qe=Jr(he,"ADD_DATA_URI_TAGS")?Tt(qa(ht),he.ADD_DATA_URI_TAGS,lt):ht,Ve=Jr(he,"FORBID_CONTENTS")?Tt({},he.FORBID_CONTENTS,lt):He,se=Jr(he,"FORBID_TAGS")?Tt({},he.FORBID_TAGS,lt):qa({}),ge=Jr(he,"FORBID_ATTR")?Tt({},he.FORBID_ATTR,lt):qa({}),Ee=Jr(he,"USE_PROFILES")?he.USE_PROFILES:!1,le=he.ALLOW_ARIA_ATTR!==!1,de=he.ALLOW_DATA_ATTR!==!1,pe=he.ALLOW_UNKNOWN_PROTOCOLS||!1,me=he.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=he.SAFE_FOR_TEMPLATES||!1,X=he.SAFE_FOR_XML!==!1,j=he.WHOLE_DOCUMENT||!1,G=he.RETURN_DOM||!1,ue=he.RETURN_DOM_FRAGMENT||!1,Se=he.RETURN_TRUSTED_TYPE||!1,ie=he.FORCE_BODY||!1,oe=he.SANITIZE_DOM!==!1,we=he.SANITIZE_NAMED_PROPS||!1,Ne=he.KEEP_CONTENT!==!1,ae=he.IN_PLACE||!1,Ce=he.ALLOWED_URI_REGEXP||ew,De=he.NAMESPACE||_e,at=he.MATHML_TEXT_INTEGRATION_POINTS||at,it=he.HTML_INTEGRATION_POINTS||it,Z=he.CUSTOM_ELEMENT_HANDLING||{},he.CUSTOM_ELEMENT_HANDLING&&Gn(he.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=he.CUSTOM_ELEMENT_HANDLING.tagNameCheck),he.CUSTOM_ELEMENT_HANDLING&&Gn(he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),he.CUSTOM_ELEMENT_HANDLING&&typeof he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(de=!1),ue&&(G=!0),Ee&&(W=Tt({},s8),q=[],Ee.html===!0&&(Tt(W,i8),Tt(q,o8)),Ee.svg===!0&&(Tt(W,W1),Tt(q,G1),Tt(q,ru)),Ee.svgFilters===!0&&(Tt(W,j1),Tt(q,G1),Tt(q,ru)),Ee.mathMl===!0&&(Tt(W,q1),Tt(q,l8),Tt(q,ru))),he.ADD_TAGS&&(W===Y&&(W=qa(W)),Tt(W,he.ADD_TAGS,lt)),he.ADD_ATTR&&(q===re&&(q=qa(q)),Tt(q,he.ADD_ATTR,lt)),he.ADD_URI_SAFE_ATTR&&Tt(Et,he.ADD_URI_SAFE_ATTR,lt),he.FORBID_CONTENTS&&(Ve===He&&(Ve=qa(Ve)),Tt(Ve,he.FORBID_CONTENTS,lt)),Ne&&(W["#text"]=!0),j&&Tt(W,["html","head","body"]),W.table&&(Tt(W,["tbody"]),delete se.tbody),he.TRUSTED_TYPES_POLICY){if(typeof he.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof he.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=he.TRUSTED_TYPES_POLICY,E=N.createHTML("")}else N===void 0&&(N=NP(g,i)),N!==null&&typeof E=="string"&&(E=N.createHTML(""));zn&&zn(he),wn=he}},lr=Tt({},[...W1,...j1,...fP]),xn=Tt({},[...q1,...hP]),Kn=function(he){let Be=x(he);(!Be||!Be.tagName)&&(Be={namespaceURI:De,tagName:"template"});const Ke=_u(he.tagName),Vt=_u(Be.tagName);return Qe[he.namespaceURI]?he.namespaceURI===fe?Be.namespaceURI===_e?Ke==="svg":Be.namespaceURI===ne?Ke==="svg"&&(Vt==="annotation-xml"||at[Vt]):!!lr[Ke]:he.namespaceURI===ne?Be.namespaceURI===_e?Ke==="math":Be.namespaceURI===fe?Ke==="math"&&it[Vt]:!!xn[Ke]:he.namespaceURI===_e?Be.namespaceURI===fe&&!it[Vt]||Be.namespaceURI===ne&&!at[Vt]?!1:!xn[Ke]&&(wt[Ke]||!lr[Ke]):!!(It==="application/xhtml+xml"&&Qe[he.namespaceURI]):!1},fn=function(he){Ko(t.removed,{element:he});try{x(he).removeChild(he)}catch{b(he)}},On=function(he,Be){try{Ko(t.removed,{attribute:Be.getAttributeNode(he),from:Be})}catch{Ko(t.removed,{attribute:null,from:Be})}if(Be.removeAttribute(he),he==="is")if(G||ue)try{fn(Be)}catch{}else try{Be.setAttribute(he,"")}catch{}},ke=function(he){let Be=null,Ke=null;if(ie)he="<remove></remove>"+he;else{const qt=a8(he,/^[\r\n\t ]+/);Ke=qt&&qt[0]}It==="application/xhtml+xml"&&De===_e&&(he='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+he+"</body></html>");const Vt=N?N.createHTML(he):he;if(De===_e)try{Be=new p().parseFromString(Vt,It)}catch{}if(!Be||!Be.documentElement){Be=T.createDocument(De,"template",null);try{Be.documentElement.innerHTML=We?E:Vt}catch{}}const an=Be.body||Be.documentElement;return he&&Ke&&an.insertBefore(n.createTextNode(Ke),an.childNodes[0]||null),De===_e?I.call(Be,j?"html":"body")[0]:j?Be.documentElement:an},st=function(he){return R.call(he.ownerDocument||he,he,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},vt=function(he){return he instanceof f&&(typeof he.nodeName!="string"||typeof he.textContent!="string"||typeof he.removeChild!="function"||!(he.attributes instanceof h)||typeof he.removeAttribute!="function"||typeof he.setAttribute!="function"||typeof he.namespaceURI!="string"||typeof he.insertBefore!="function"||typeof he.hasChildNodes!="function")},xt=function(he){return typeof c=="function"&&he instanceof c};function Bt(Je,he,Be){nu(Je,Ke=>{Ke.call(t,he,Be,wn)})}const Cn=function(he){let Be=null;if(Bt(V.beforeSanitizeElements,he,null),vt(he))return fn(he),!0;const Ke=lt(he.nodeName);if(Bt(V.uponSanitizeElement,he,{tagName:Ke,allowedTags:W}),X&&he.hasChildNodes()&&!xt(he.firstElementChild)&&kn(/<[/\w!]/g,he.innerHTML)&&kn(/<[/\w!]/g,he.textContent)||he.nodeType===Zo.progressingInstruction||X&&he.nodeType===Zo.comment&&kn(/<[/\w]/g,he.data))return fn(he),!0;if(!W[Ke]||se[Ke]){if(!se[Ke]&&oa(Ke)&&(Z.tagNameCheck instanceof RegExp&&kn(Z.tagNameCheck,Ke)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Ke)))return!1;if(Ne&&!Ve[Ke]){const Vt=x(he)||he.parentNode,an=S(he)||he.childNodes;if(an&&Vt){const qt=an.length;for(let sn=qt-1;sn>=0;--sn){const cr=_(an[sn],!0);cr.__removalCount=(he.__removalCount||0)+1,Vt.insertBefore(cr,C(he))}}}return fn(he),!0}return he instanceof d&&!Kn(he)||(Ke==="noscript"||Ke==="noembed"||Ke==="noframes")&&kn(/<\/no(script|embed|frames)/i,he.innerHTML)?(fn(he),!0):(ee&&he.nodeType===Zo.text&&(Be=he.textContent,nu([L,M,P],Vt=>{Be=Yo(Be,Vt," ")}),he.textContent!==Be&&(Ko(t.removed,{element:he.cloneNode()}),he.textContent=Be)),Bt(V.afterSanitizeElements,he,null),!1)},Sr=function(he,Be,Ke){if(oe&&(Be==="id"||Be==="name")&&(Ke in n||Ke in qn))return!1;if(!(de&&!ge[Be]&&kn(F,Be))){if(!(le&&kn(z,Be))){if(!q[Be]||ge[Be]){if(!(oa(he)&&(Z.tagNameCheck instanceof RegExp&&kn(Z.tagNameCheck,he)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(he))&&(Z.attributeNameCheck instanceof RegExp&&kn(Z.attributeNameCheck,Be)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(Be))||Be==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&kn(Z.tagNameCheck,Ke)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(Ke))))return!1}else if(!Et[Be]){if(!kn(Ce,Yo(Ke,B,""))){if(!((Be==="src"||Be==="xlink:href"||Be==="href")&&he!=="script"&&lP(Ke,"data:")===0&&qe[he])){if(!(pe&&!kn(H,Yo(Ke,B,"")))){if(Ke)return!1}}}}}}return!0},oa=function(he){return he!=="annotation-xml"&&a8(he,te)},La=function(he){Bt(V.beforeSanitizeAttributes,he,null);const{attributes:Be}=he;if(!Be||vt(he))return;const Ke={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0};let Vt=Be.length;for(;Vt--;){const an=Be[Vt],{name:qt,namespaceURI:sn,value:cr}=an,la=lt(qt),ti=cr;let tn=qt==="value"?ti:cP(ti);if(Ke.attrName=la,Ke.attrValue=tn,Ke.keepAttr=!0,Ke.forceKeepAttr=void 0,Bt(V.uponSanitizeAttribute,he,Ke),tn=Ke.attrValue,we&&(la==="id"||la==="name")&&(On(qt,he),tn=Te+tn),X&&kn(/((--!?|])>)|<\/(style|title)/i,tn)){On(qt,he);continue}if(Ke.forceKeepAttr)continue;if(!Ke.keepAttr){On(qt,he);continue}if(!me&&kn(/\/>/i,tn)){On(qt,he);continue}ee&&nu([L,M,P],ws=>{tn=Yo(tn,ws," ")});const Tr=lt(he.nodeName);if(!Sr(Tr,la,tn)){On(qt,he);continue}if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!sn)switch(g.getAttributeType(Tr,la)){case"TrustedHTML":{tn=N.createHTML(tn);break}case"TrustedScriptURL":{tn=N.createScriptURL(tn);break}}if(tn!==ti)try{sn?he.setAttributeNS(sn,qt,tn):he.setAttribute(qt,tn),vt(he)?fn(he):r8(t.removed)}catch{On(qt,he)}}Bt(V.afterSanitizeAttributes,he,null)},Da=function Je(he){let Be=null;const Ke=st(he);for(Bt(V.beforeSanitizeShadowDOM,he,null);Be=Ke.nextNode();)Bt(V.uponSanitizeShadowNode,Be,null),Cn(Be),La(Be),Be.content instanceof s&&Je(Be.content);Bt(V.afterSanitizeShadowDOM,he,null)};return t.sanitize=function(Je){let he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,Ke=null,Vt=null,an=null;if(We=!Je,We&&(Je="<!-->"),typeof Je!="string"&&!xt(Je))if(typeof Je.toString=="function"){if(Je=Je.toString(),typeof Je!="string")throw Xo("dirty is not a string, aborting")}else throw Xo("toString is not a function");if(!t.isSupported)return Je;if(J||or(he),t.removed=[],typeof Je=="string"&&(ae=!1),ae){if(Je.nodeName){const cr=lt(Je.nodeName);if(!W[cr]||se[cr])throw Xo("root node is forbidden and cannot be sanitized in-place")}}else if(Je instanceof c)Be=ke("<!---->"),Ke=Be.ownerDocument.importNode(Je,!0),Ke.nodeType===Zo.element&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Be=Ke:Be.appendChild(Ke);else{if(!G&&!ee&&!j&&Je.indexOf("<")===-1)return N&&Se?N.createHTML(Je):Je;if(Be=ke(Je),!Be)return G?null:Se?E:""}Be&&ie&&fn(Be.firstChild);const qt=st(ae?Je:Be);for(;Vt=qt.nextNode();)Cn(Vt),La(Vt),Vt.content instanceof s&&Da(Vt.content);if(ae)return Je;if(G){if(ue)for(an=A.call(Be.ownerDocument);Be.firstChild;)an.appendChild(Be.firstChild);else an=Be;return(q.shadowroot||q.shadowrootmode)&&(an=k.call(r,an,!0)),an}let sn=j?Be.outerHTML:Be.innerHTML;return j&&W["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&kn(tw,Be.ownerDocument.doctype.name)&&(sn="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
|
|
44
44
|
`+sn),ee&&nu([L,M,P],cr=>{sn=Yo(sn,cr," ")}),N&&Se?N.createHTML(sn):sn},t.setConfig=function(){let Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};or(Je),J=!0},t.clearConfig=function(){wn=null,J=!1},t.isValidAttribute=function(Je,he,Be){wn||or({});const Ke=lt(Je),Vt=lt(he);return Sr(Ke,Vt,Be)},t.addHook=function(Je,he){typeof he=="function"&&Ko(V[Je],he)},t.removeHook=function(Je,he){if(he!==void 0){const Be=sP(V[Je],he);return Be===-1?void 0:oP(V[Je],Be,1)[0]}return r8(V[Je])},t.removeHooks=function(Je){V[Je]=[]},t.removeAllHooks=function(){V=u8()},t}var $u=nw();const d8=a.defineComponent({name:"ListTagRender",props:{node:y.object,searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]),displayKey:y.string,searchKeyword:y.string,tpl:{type:Function},disabled:y.bool.def(!1)},render(){const{resolveClassName:e}=Re(),t=r=>{if(this.searchKeyword&&!this.disabled){const i=new RegExp(`(${this.searchKeyword})`,"i");return $u.sanitize(r.replace(i,'<strong class="highlight-text">$1</strong>'))}return $u.sanitize(r)};if(this.tpl)return this.tpl(this.node,t,a.h,this);const n=this.node[this.displayKey];return a.createVNode("div",{class:`${e("selector-node")}`},[a.createVNode("span",{class:"text",innerHTML:t(n)},null)])}}),xP=()=>({modelValue:y.arrayOf(y.string).def([]),placeholder:y.string.def(""),list:y.arrayOf(y.object).def([]),disabled:y.bool.def(!1),tooltipKey:y.string.def(""),saveKey:y.string.def("id"),displayKey:y.string.def("name"),hasDeleteIcon:y.bool.def(!1),clearable:y.bool.def(!0),trigger:je("treeTriggerType",{}).def("search"),searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]).def("name"),useGroup:y.bool.def(!1),allowCreate:y.bool.def(!1),clearTextSpace:y.bool.def(!0),maxData:y.number.def(-1),maxResult:y.number.def(10),contentMaxHeight:y.number.def(300),contentWidth:y.number.def(190),separator:y.string.def(""),allowNextFocus:y.bool.def(!0),allowAutoMatch:y.bool.def(!1),showClearOnlyHover:y.bool.def(!1),isAsyncList:y.bool.def(!1),leftSpace:y.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})},copyable:y.bool.def(!0),copySeparator:y.string.def(`
|
|
45
|
-
`)});var K1,f8;function SP(){if(f8)return K1;f8=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return K1=n,K1}var Y1,h8;function TP(){if(h8)return Y1;h8=1;var e=SP(),t=J7();function n(r,i){return r!=null&&t(r,i,e)}return Y1=n,Y1}var EP=TP();const OP=bn(EP),AP=a.defineComponent({name:"TagRender",directives:{bkTooltips:sa},props:{node:y.object,displayKey:y.string,tooltipKey:y.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})},allowCreate:{type:Boolean,default:!1}},emits:["dblclick","change"],setup(e,{emit:t}){const n=a.ref(),r=a.ref(!1),i=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!OP(e.node,e.tooltipKey)||!r.value,...e.tagOverflowTips})),s=a.ref(),l=a.ref(!1),c=a.ref(null),d=()=>{c.value&&clearTimeout(c.value),c.value=window.setTimeout(()=>{c.value!==null&&(c.value=null)},200)},m=b=>{b.preventDefault(),b.stopPropagation(),c.value&&(clearTimeout(c.value),c.value=null),l.value=!0,t("dblclick",!0),setTimeout(()=>{var C;(C=s.value)==null||C.focus()},0)},h=()=>{l.value=!1,t("dblclick",!1)},f=()=>{l.value=!0},p=b=>{const C=b.target.value;t("change",C)},g=b=>{if((b.code==="Enter"||b.key==="Enter"||b.keyCode===13)&&!b.isComposing){const C=b.target.value;t("change",C),setTimeout(()=>{h()},100)}},w=b=>{const C=b.target.value;_.value=C},_=a.ref(e.node[e.displayKey]);return a.watch(()=>e.node[e.displayKey],b=>{_.value=b}),a.onMounted(()=>{r.value=wL(n.value)}),{overflowTips:i,tagRef:n,editRef:s,handleClick:d,handleDblclick:m,showEdit:l,handleEditBlur:h,handleEditFocus:f,handleEditChange:p,handleEditKeyDown:g,handleEditInput:w,editValue:_}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[this.showEdit?a.createVNode("input",{ref:"editRef",class:"dblclick-edit-input",type:"text",value:this.editValue,onBlur:this.handleEditBlur,onChange:this.handleEditChange,onFocus:this.handleEditFocus,onInput:this.handleEditInput,onKeydown:this.handleEditKeyDown},null):null,a.createVNode("span",{class:"text",onClick:this.allowCreate?this.handleClick:void 0,onDblclick:this.allowCreate?this.handleDblclick:void 0},[this.editValue])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),LP=a.defineComponent({name:"TagInput",directives:{bkTooltips:sa},props:xP(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input","copy-success"],setup(e,{emit:t}){const n=aa(),r=Ft("tagInput"),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:l}=Re(),{maxResult:c}=a.toRefs(e),{pageState:d,initPage:m,pageChange:h}=wk(c),f=a.ref(""),p=a.ref(null),g=a.ref(null),w=a.ref(null),_=a.ref(null),b=a.ref(null),C=a.ref(),S=a.ref(null),x=a.ref(!1),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),E=a.computed(()=>e.maxData===1),T=a.computed(()=>V.selectedTagList.length===0&&f.value===""&&!i.isEdit),R=a.computed(()=>e.placeholder||r.value.placeholder),A=a.computed(()=>e.clearable&&!e.disabled&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>e.copyable&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),k=a.computed(()=>({[`${l("tag-input-trigger")}`]:!0,active:i.isEdit,disabled:e.disabled})),V=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),L=a.computed(()=>V.selectedTagList.map(K=>K[e.saveKey])),{flatList:M,saveKeyMap:P}=Ck(e),F=a.computed(()=>{if(e.useGroup){const K={};return d.curPageList.forEach((ne,fe)=>{var We,Qe,et;const _e=(We=ne.group)==null?void 0:We.groupId,De=(Qe=ne.group)==null?void 0:Qe.groupName;ne.__index__=fe,_e&&!K[_e]&&(K[_e]={id:_e,name:De,children:[]}),(et=K==null?void 0:K[_e])==null||et.children.push(ne)}),Object.keys(K).map(ne=>K[ne])}return d.curPageList});a.watch([()=>M.value],()=>{a.nextTick(()=>{Y()})},{deep:!0}),a.watch(()=>e.modelValue,K=>{var ne;Z(L.value,K)||(a.nextTick(()=>{Y()}),e.withValidate&&((ne=n==null?void 0:n.validate)==null||ne.call(n,"change")))}),a.watch(f,Ii(()=>{const K=d.curPageList.length!==0,{value:ne}=f;ne!==""&&K||ne===""&&e.trigger==="focus"&&K?s.isShow=!0:(e.trigger!=="focus"||!K)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,K=>{z(),K&&b.value&&(a.nextTick(()=>{b.value.scrollTop=0}),b.value.removeEventListener("scroll",H),b.value.addEventListener("scroll",H))}),a.onMounted(()=>{Y()});const z=()=>{var K;s.offset.crossAxis=E.value?0:(K=_.value)==null?void 0:K.offsetLeft},H=()=>{if(d.isPageLoading||b.value.scrollTop===0)return;const{scrollTop:K,offsetHeight:ne,scrollHeight:fe}=b.value;if(K+ne>=fe){const _e=d.curPage+1;_e<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{h(_e)},500))}},B=()=>{var ne;return Array.from(((ne=w.value)==null?void 0:ne.childNodes)||[]).filter(fe=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(fe.nodeType))},te=K=>{if(!e.disabled){if(K!=null&&K.target){const{className:ne}=K.target;(ne.indexOf(`${l("tag-input-trigger")}`)>-1||ne.indexOf("tag-list")>-1)&&w.value.appendChild(_.value)}clearTimeout(S.value),E.value&&L.value.length&&(V.tagListCache=[...L.value],V.selectedTagListCache=[...V.selectedTagList],f.value=V.selectedTagListCache[0][e.saveKey],Ve(V.selectedTagList[0]),ee()),i.isEdit=!0,setTimeout(()=>{var ne;x.value||((ne=p.value)==null||ne.focus(),e.trigger==="focus"&&V.localList.length!==0&&(q(),s.isShow?z():s.isShow=!0))},200)}},Ce=K=>{x.value=K,setTimeout(()=>{i.isEdit=!1,s.isShow=!1},10)},W=(K,ne,fe)=>{if(setTimeout(()=>{i.isEdit=!1,s.isShow=!1},10),V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:_e,saveKey:De,displayKey:We,createTagValidator:Qe,clearTextSpace:et}=e,at=It=>typeof Qe=="function"?Qe(It):!0;let it;if(_e){let It=fe.split(_e);It=It.filter(rt=>(rt==null?void 0:rt.trim())&&!L.value.includes(rt)&&at(rt));const dt=It.map(rt=>P.value[rt]||{[De]:rt,[We]:rt});It.length&&V.selectedTagList.splice(ne,1,...dt)}else{const It=typeof fe=="object";if(it=It?fe[De]:fe.trim(),et&&(it=it.replace(/\s+/g,"")),it!==void 0&&!L.value.includes(it)&&at(it)){const dt=P.value[it]||(It?fe:{[De]:it,[We]:it});V.selectedTagList.splice(ne,1,dt)}}const wt=P.value[K[e.saveKey]];(e.allowCreate&&wt||!e.allowCreate)&&!E.value&&V.localList.push(K),t("update:modelValue",L.value),t("change",L.value)},Y=()=>{const{saveKey:K,modelValue:ne,displayKey:fe,allowCreate:_e,trigger:De,isAsyncList:We}=e;if(V.selectedTagList=[],V.localList=M.value,ne.length){const Qe={};V.selectedTagList=ne.map(et=>{const at=P.value[et];return Qe[et]=1,!at&&_e?{[K]:et,[fe]:et}:at}).filter(et=>et),E.value||(V.localList=V.localList.filter(et=>!Qe[et[K]]))}if(We&&f.value){q(f.value),d.curPageList.length&&(s.isShow=!0);return}De==="focus"&&q()},q=(K="")=>{const{searchKey:ne,filterCallback:fe}=e,_e=K.toLowerCase().trim();if(_e===""){m(V.localList);return}let De=[];typeof fe=="function"?De=fe(_e,ne,V.localList)||[]:Array.isArray(ne)?De=V.localList.filter(We=>ne.some(Qe=>We[Qe].toLowerCase().indexOf(_e)>-1)):De=V.localList.filter(We=>We[ne].toLowerCase().indexOf(_e)>-1),m(De)},re=(K,ne)=>{const fe={[`${l("selector-actived")}`]:!0,[`${l("selector-selected")}`]:L.value.includes(K[e.saveKey])};return e.useGroup?fe[`${l("selector-actived")}`]=K.__index__===i.focusItemIndex:fe[`${l("selector-actived")}`]=ne===i.focusItemIndex,fe};function Z(K,ne){return K.length!==ne.length?!1:ne.every((fe,_e)=>K[_e]===fe)}const se=()=>{V.tagListCache=[],V.selectedTagListCache=[],V.selectedTagList=[]},ge=()=>{f.value="",p.value.style.width=`${Wa}px`},le=()=>{if(E.value)return 0;const ne=B().filter(fe=>fe.className!=="").findIndex(({id:fe})=>fe==="tagInputItem");return ne>=0?ne:0},de=(K,ne,fe=!1)=>{if(!ne||!K)return;let _e=ne;fe&&(_e=ne.nextElementSibling||null),ne.parentNode.insertBefore(K,_e)},pe=K=>{if(!h5(K)){p.value.style.width=`${Wa}px`;return}const fe=document.createElement("span");fe.style.visibility="hidden",fe.style.position="absolute",fe.style.whiteSpace="pre",fe.style.font=window.getComputedStyle(p.value).font,fe.textContent=K,document.body.appendChild(fe);const _e=fe.offsetWidth;document.body.removeChild(fe),p.value.style.width=`${Math.max(_e+10,Wa)}px`},me=()=>{pe(f.value)},ee=K=>{const{maxData:ne,trigger:fe,allowCreate:_e}=e;if(ne===-1||ne>L.value.length){const{value:De}=K!=null&&K.target?K.target:f;De?(q(De),pe(De)):(fe==="focus"&&q(),p.value.style.width=`${Wa}px`)}else j(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=_e?-1:0,t("input",f.value)},X=()=>{var K;s.width=E.value?(K=g.value)==null?void 0:K.clientWidth:e.contentWidth,t("focus")},j=()=>{S.value=setTimeout(()=>{var ne;const K=f.value;if(ge(),i.isEdit=!1,e.allowAutoMatch&&K){if(E.value){const[_e]=V.tagListCache;K===_e&&V.selectedTagListCache.length&&Ee(V.selectedTagListCache[0],"select")}const fe=d.curPageList.find(_e=>Array.isArray(e.searchKey)?e.searchKey.map(We=>_e[We]).includes(K):_e[e.searchKey]===K);fe?J(fe,"select"):e.allowCreate&&J(K,"custom")}s.isShow=!1,t("blur",K,L.value),(ne=n==null?void 0:n.validate)==null||ne.call(n,"blur")},200)},J=(K,ne,fe)=>{fe==null||fe.stopPropagation(),!(!K||K.disabled)&&(E.value&&se(),Ee(K,ne),G("select"),ge(),s.isShow=!1)},ie=(K,ne)=>{ne==null||ne.stopPropagation(),Ve(K),ge(),G("remove",K),p.value.style.width=`${Wa}px`},G=(K,ne)=>{t(K,ne),t("update:modelValue",L.value),t("change",L.value)},ue=K=>{K.stopPropagation();const ne=V.selectedTagList;V.selectedTagList=[];const fe=ne.filter(_e=>P.value[_e[e.saveKey]]);(e.allowCreate&&fe.length!==0||!e.allowCreate)&&!E.value&&V.localList.push(...fe),G("removeAll")},Se=()=>{const K={height:b.value.clientHeight,yAxis:b.value.getBoundingClientRect().y};a.nextTick(()=>{const ne=b.value.querySelector(`.${l("selector-actived")}`);if(!ne)return;const fe={height:ne.clientHeight,yAxis:ne.getBoundingClientRect().y};fe.yAxis<K.yAxis&&(b.value.scrollTop=b.value.scrollTop-(K.yAxis-fe.yAxis));const _e=fe.yAxis+fe.height-K.yAxis;_e>K.height&&(b.value.scrollTop=b.value.scrollTop+_e-K.height)})},oe=(K,ne)=>{const fe=B();de(_.value,fe[K-1]),V.selectedTagList.splice(K-1,1),te();const _e=ne&&P.value[ne[e.saveKey]];(e.allowCreate&&_e||!e.allowCreate)&&!E.value&&V.localList.push(ne),p.value.style.width=`${Wa}px`,G("remove")},we=K=>{if(d.isPageLoading||K.isComposing)return;let ne;const fe=K.target.value,_e=h5(fe),De=le(),We=B();switch(K.code){case"ArrowUp":if(K.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=d.curPageList.length-1),Se();break;case"ArrowDown":if(K.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>d.curPageList.length-1?d.curPageList.length:i.focusItemIndex,i.focusItemIndex===d.curPageList.length&&(i.focusItemIndex=0),Se();break;case"ArrowLeft":if(i.isEdit=!0,!_e){if(De<1)return;de(_.value,We[De-1]),te()}break;case"ArrowRight":if(i.isEdit=!0,!_e){if(De===We.length-1)return;de(We[De+1],_.value),te()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?J(d.curPageList[i.focusItemIndex],"select",K):e.allowCreate&&f.value.trim()&&J(f.value,"custom",K),K.preventDefault();break;case"Backspace":De!==0&&!f.value&&(ne=V.selectedTagList[De-1],oe(De,ne));break}},Te=K=>{const ne=[];return K.split(";").forEach(_e=>{kk(_e)&&ne.push({[e.saveKey]:_e,[e.displayKey]:_e})}),ne},Ne=K=>{K.preventDefault();const{maxData:ne,saveKey:fe,displayKey:_e,pasteFn:De,allowCreate:We}=e,Qe=K.clipboardData.getData("text");let at=(De?De(Qe):Te(Qe)).map(it=>it[fe]);if(at.length){const it=B(),wt=le(),It=V.localList.map(rt=>rt[fe]);if(at=at.filter(rt=>{const lt=(rt==null?void 0:rt.trim())&&!L.value.includes(rt);return We?lt:lt&&It.includes(rt)}),ne!==-1){const rt=V.selectedTagList.length;if(rt<ne){const lt=ne-rt;at.length>lt&&(at=[...at.slice(0,lt)])}else at=[]}const dt=We?at.map(rt=>V.localList.find(wn=>wn[fe]===rt)??{[fe]:rt,[_e]:rt}):V.localList.filter(rt=>at.includes(rt[fe]));at.length&&(V.selectedTagList.splice(wt,0,...dt),de(_.value,it[wt]),p.value.style.width=`${Wa}px`,V.localList=V.localList.filter(rt=>!at.includes(rt[fe])),G("select"),te())}ge()},ae=K=>{e.disabled||(de(_.value,K.currentTarget,!0),p.value.style.width=`${Wa}px`,s.isShow&&z())},Ee=(K,ne)=>{if(V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:fe,saveKey:_e,displayKey:De,createTagValidator:We,clearTextSpace:Qe}=e,et=le();let at=1,it=!1,wt;const It=dt=>typeof We=="function"?We(dt):!0;if(ne==="custom")if(fe){let dt=K.split(fe);dt=dt.filter(lt=>(lt==null?void 0:lt.trim())&&!L.value.includes(lt)&&It(lt));const rt=dt.map(lt=>P.value[lt]||{[_e]:lt,[De]:lt});dt.length&&(V.selectedTagList.splice(et,0,...rt),at=rt.length,it=!0)}else{const dt=typeof K=="object";if(wt=dt?K[_e]:K.trim(),Qe&&(wt=wt.replace(/\s+/g,"")),wt!==void 0&&!L.value.includes(wt)&&It(wt)){const rt=P.value[wt]||(dt?K:{[_e]:wt,[De]:wt});V.selectedTagList.splice(et,0,rt),it=!0}}else K&&(wt=K[_e],wt!==void 0&&!L.value.includes(wt)&&(V.selectedTagList.splice(et,0,K),it=!0));it&&a.nextTick(()=>{for(let dt=1;dt<=at;dt++){const lt=B()[et+dt];de(lt,_.value)}if(p.value.style.width=`${Wa}px`,!E.value){e.allowNextFocus&&te();const dt=L.value.reduce((rt,lt)=>(rt[lt]=1,rt),{});V.localList=V.localList.filter(rt=>!dt[rt[_e]])}})},Ve=K=>{V.selectedTagList=nP(V.selectedTagList,fe=>fe[e.saveKey]!==K[e.saveKey]);const ne=P.value[K[e.saveKey]];(e.allowCreate&&ne||!e.allowCreate)&&!E.value&&V.localList.push(K)},He=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:qe}=z7(g,He,L),ht=a.computed(()=>V.selectedTagList.reduce((K,ne,fe)=>(qe.value!==null&&fe>=qe.value&&K.push(ne[e.displayKey]),K),[])),Et=K=>{var _e;K.stopPropagation();const ne=V.selectedTagList;if(ne.length===0)return;const fe=ne.map(De=>De[e.displayKey]).join(e.copySeparator);if((_e=navigator.clipboard)!=null&&_e.writeText)navigator.clipboard.writeText(fe).catch(De=>{console.error("Failed to copy:",De)});else{const De=document.createElement("textarea");De.value=fe,De.style.position="fixed",De.style.opacity="0",document.body.appendChild(De),De.select();try{document.execCommand("copy")}catch(We){console.error("Failed to copy:",We)}document.body.removeChild(De)}setTimeout(()=>{t("copy-success",L.value)})};return{popoverProps:s,...a.toRefs(i),...a.toRefs(V),...a.toRefs(d),isShowPlaceholder:T,isShowClear:A,isShowCopy:I,placeholderText:R,curInputValue:f,renderList:F,showTagClose:N,tagInputRef:p,bkTagSelectorRef:g,tagListRef:w,tagInputItemRef:_,inputValueRef:C,selectorListRef:b,triggerClass:k,overflowTagIndex:qe,localCollapseTags:He,collapseTooltip:ht,focusInputTrigger:te,activeClass:re,handleInput:ee,handleCompositionEnd:me,handleFocus:X,handleBlur:j,handleTagSelected:J,handleTagRemove:ie,handleClear:ue,tagFocus:ae,handleKeydown:we,handlePaste:Ne,resolveClassName:l,handleTagDblclick:Ce,handleTagDblclickChange:W,handleCopy:Et}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(sr,a.mergeProps({arrow:!1,placement:"bottom-start",referenceCls:this.resolveClassName("tag-input-popover-reference"),theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual"},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const i=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:i?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(AP,{allowCreate:this.allowCreate,displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl,onChange:this.allowCreate?s=>this.handleTagDblclickChange(n,r,s):void 0,onDblclick:this.allowCreate?s=>this.handleTagDblclick(s):void 0},null),this.showTagClose&&a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,spellcheck:"false",type:"text",onBlur:this.handleBlur,onCompositionend:this.handleCompositionEnd,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]]),a.createVNode("div",{key:"inputValuePlaceholder",ref:"inputValueRef",style:"position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"},[this.curInputValue])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??a.createVNode("div",{class:"icon-wrapper"},[this.isShowCopy&&a.createVNode(Od,{class:"copy-icon",title:"复制",onClick:this.handleCopy},null),this.isShowClear&&a.createVNode(ir,{class:"clear-icon",onClick:this.handleClear},null)])])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(d8,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(d8,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(Ka,{size:is.Small,theme:"primary"},null)]):null])])})])}}),rw=bt(LP),aw=a.defineComponent({name:"CascaderPanel",props:{width:y.oneOfType([y.number,y.string]).def("auto"),height:y.oneOfType([y.number,y.string]).def(216),store:y.object.def({}),separator:y.string.def(""),suggestions:y.arrayOf(Eb()),isFiltering:y.bool.def(!1),searchKey:y.oneOfType([y.string,y.number]).def(""),modelValue:y.arrayOf(y.oneOfType([T6(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const n=Ft("cascader"),{resolveClassName:r}=Re(),{store:i}=a.toRefs(e),s=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),c=a.ref([]),d=A=>typeof A=="number"?`${A}px`:A,m=d(e.height),h=d(e.width),f=A=>{(!A||A.length===0)&&(s.list=s.list.slice(0,1),l.value=[]),p(A),c.value=A},p=A=>{if(c.value.length===0||!i.value.config.multiple){let k=[];if(i.value.config.multiple)for(const V of A)V.length>k.length&&(k=V);else k=A;k.forEach(V=>{const L=i.value.getNodeById(V);if(L){const M=F=>{var H;if(!F||F!=null&&F.isDisabled)return;const z=F.level;s.list=s.list.slice(0,z),l.value=l.value.slice(0,z-1),(H=F.children)!=null&&H.length&&s.list.length===z&&(s.list.push(F.children),l.value.push(F))},P=F=>{F.parent&&P(F.parent),M(F)};P(L)}})}},g=A=>{if(!A.isDisabled){if(A.config.multiple){const I=i.value.config.checkAnyLevel?i.value.getCheckedNodes():i.value.getCheckedLeafNodes();c.value=I.map(k=>k.path)}else c.value=A.path;t("update:modelValue",c.value)}},w=A=>{var I;if(!(!A||A!=null&&A.isDisabled)){if(s.list=s.list.slice(0,A.level),l.value=l.value.slice(0,A.level-1),(I=A.children)!=null&&I.length){s.list.push(A.children),l.value.push(A);return}if(i.value.config.isRemote&&!A.isLeaf){A.loading=!0;const k=V=>{i.value.appendNodes(V,A||null),s.list.push(A.children),l.value.push(A),A.loading=!1};i.value.config.remoteMethod(A,k)}}},_=A=>{const{trigger:I,checkAnyLevel:k,multiple:V}=A.config;return{onClick:M=>{(!A.isLeaf||V)&&M.stopPropagation(),I==="click"&&w(A),k&&!V&&g(A),A.isLeaf&&!V&&g(A)},onMouseenter:()=>{I==="hover"&&w(A)}}},b=A=>{const{multiple:I}=A.config;return{onClick:V=>{if(I){V.stopPropagation(),T(A,!A.checked);return}w(A),A.isLeaf&&!I&&g(A)}}},C=()=>{s.list.forEach((A,I)=>{const k=document.querySelector(`.${r("cascader-panel")}:nth-child(${I+1}) .${r("cascader-node.is-selected")}, .${r("cascader-node.is-checked")}`);k&&a.nextTick(()=>{k.scrollIntoView()})})};a.watch(()=>i.value.config.multiple,(A,I)=>{A!==I&&(s.list=[i.value.getNodes()],l.value=[],c.value=[])});const S=n.value.noData,{emptyText:x}=n.value,N=A=>(l.value[A.level-1]||{}).id===A.id,E=(A,I)=>{const{multiple:k}=A.config;return k?I.some(V=>qs(V,A.path)):qs(I,A.path)},T=(A,I)=>{A.setNodeCheck(I||!1),g(A)},R=A=>A.loading?a.createVNode(_o,{class:r("icon-spinner")},null):a.createVNode(Cr,{class:r("icon-angle-right")},null);return a.watch(()=>e.modelValue,A=>{f(A)},{immediate:!0}),a.watch(()=>e.store,A=>{s.list=[A.getNodes()]}),{menus:s,activePath:l,nodeExpandHandler:w,isNodeInPath:N,nodeEvent:_,isCheckedNode:E,checkValue:c,checkNode:T,iconRender:R,panelWidth:h,panelHeight:m,searchPanelEvents:b,expandByNodeList:p,noDataText:S,emptyText:x,resolveClassName:r,scrollToSelected:C}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:"200px",t=()=>this.suggestions.length?a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{style:{width:e},class:this.resolveClassName("cascader-search-empty")},[a.createVNode("span",null,[this.noDataText])]);return a.createVNode("div",{class:this.resolveClassName("cascader-panel-wrapper")},[this.isFiltering?t():this.menus.list.map((n,r)=>{var i,s;return a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[(s=(i=this.$slots).panel)==null?void 0:s.call(i,{nodes:n,level:r,activePath:this.activePath}),n.length?n.map(l=>{var c,d;return a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(l)},{"is-disabled":l.isDisabled},{"is-checked":!l.config.multiple&&this.isCheckedNode(l,this.checkValue)}]},Object.assign(this.nodeEvent(l),l.config.multiple?{}:{})),[l.config.multiple&&a.createVNode(Bn,{style:"margin-right: 5px",modelValue:l.checked,"onUpdate:modelValue":m=>l.checked=m,disabled:l.isDisabled,indeterminate:l.isIndeterminate,onChange:m=>this.checkNode(l,!!m)},null),(d=(c=this.$slots).default)==null?void 0:d.call(c,{node:l,data:l.data}),l.isLeaf?"":this.iconRender(l)])}):a.createVNode("div",{class:this.resolveClassName("cascader-panel-empty-wrapper")},[this.noDataText])])})])}});function iw(e){return e.data.disabled?!0:e.level!==1?iw(e.parent):e.data.disabled}let m8=class sw{constructor(t,n,r){$e(this,"data");$e(this,"config");$e(this,"parent");$e(this,"level");$e(this,"id");$e(this,"name");$e(this,"loading");$e(this,"loaded");$e(this,"checked");$e(this,"isIndeterminate");$e(this,"children");$e(this,"leaf");$e(this,"pathNodes");$e(this,"path");$e(this,"pathNames");$e(this,"nodes");this.data=t,this.config=n,this.parent=r||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:r}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const i=this.data[r];this.children=(i||[]).map(s=>new sw(s,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(s=>s.id),this.pathNames=this.pathNodes.map(s=>s.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 iw(this)}broadcast(t,n){const r=`onParent${Al(t)}`;this.children.forEach(i=>{var s;i&&(i.broadcast(t,n),(s=i[r])==null||s.call(i,n))})}emit(t){var i;const{parent:n}=this,r=`onChild${Al(t)}`;n&&((i=n[r])==null||i.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(i=>!i.isDisabled),r=n.length?n.every(i=>i.checked):!1;this.setCheckState(r)}setCheckState(t){const n=this.children.length,r=this.children.reduce((i,s)=>{const l=s.isIndeterminate?.5:0,c=s.checked?1:l;return i+c},0);this.checked=t,this.isIndeterminate=r!==n&&r>0}setNodeCheck(t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}};const ow=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(ow(r.children,t))),n),[]);class X1{constructor(t){$e(this,"data");$e(this,"config");$e(this,"nodes");const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(r=>new m8(r,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.setNodeCheck(!1),t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>qs(t,n.path)?(n.setNodeCheck(!1),!0):!1)}getFlattedNodes(t=!1){return ow(this.nodes,t)}setNodesCheck(t){this.getFlattedNodes().forEach(n=>{n.setNodeCheck(!1);const r=t.find(i=>qs(n.path,i));r&&this.getNodeByValue(r).setNodeCheck(!0)})}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getCheckedLeafNodes(){return this.getFlattedNodes().filter(t=>t.isLeaf&&t.checked)}getNodeByValue(t){return this.getFlattedNodes().filter(r=>qs(r.path,t))[0]??null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const r=new m8(t,this.config,n);(n?n.children:this.nodes).push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}}const DP=a.defineComponent({name:"Cascader",directives:{bkTooltips:sa},props:{modelValue:y.arrayOf(y.oneOfType([T6(),String,Number])),list:y.array.def([]),placeholder:y.string.def(""),behavior:y.string.def("normal"),filterable:y.bool.def(!1),multiple:y.bool.def(!1),disabled:y.bool.def(!1),clearable:y.bool.def(!0),trigger:y.string.def("click"),checkAnyLevel:y.bool.def(!1),isRemote:y.bool.def(!1),remoteMethod:y.func,showCompleteName:y.bool.def(!0),idKey:y.string.def("id"),nameKey:y.string.def("name"),childrenKey:y.string.def("children"),separator:y.string.def("/"),limitOneLine:y.bool.def(!1),popoverOptions:Object,extCls:y.string.def(""),filterMethod:y.func,scrollHeight:y.oneOfType([y.number,y.string]).def(216),scrollWidth:y.oneOfType([y.number,y.string]).def("auto"),customTextFillback:y.func,customTagsFillback:y.func,changeEmitsNodes:y.bool.def(!1),collapseTags:{type:Boolean,default:!0},floatMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","toggle","focus"],setup(e,{emit:t,slots:n}){const r=Ft("cascader"),{separator:i}=e,{isHover:s,setHover:l,cancelHover:c}=O7(),d=a.ref(new X1(e)),m=a.ref(!1),h=a.ref(""),f=a.ref([]),{modelValue:p}=a.toRefs(e),g=a.ref(),w=a.ref(""),_=a.ref([]),b=a.ref(!1),C=a.ref(!1),S=a.ref(!1),x=a.ref(!1),N=a.computed({get:()=>p.value,set:se=>{t("update:modelValue",se)}}),E=a.ref(null),T=a.ref(null),R=a.ref(null),A=a.computed(()=>{const se=e.placeholder?e.placeholder:r.value.pleaseSelect;return p.value.length===0?se:""}),I=a.computed(()=>e.customTextFillback?e.customTextFillback(e.modelValue,d.value.getFlattedNodes()):h.value),k=se=>e.showCompleteName?se.pathNames.join(i):se.pathNames[se.pathNames.length-1],V=()=>{w.value=h.value},L=()=>{if(!e.multiple){w.value=h.value;return}w.value=""},M=se=>{var le;if(e.multiple){d.value.setNodesCheck(se),f.value=d.value.getCheckedNodes().filter(de=>d.value.config.checkAnyLevel||de.isLeaf).map(de=>({text:k(de),key:de.id})),h.value=f.value.map(de=>de.text).join(", ");return}e.checkAnyLevel||(le=E==null?void 0:E.value)==null||le.hide();const ge=d.value.getNodeByValue(se);h.value=ge?k(ge):"",V()},P=se=>{se.stopPropagation(),d.value.clearChecked(),w.value="",M([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},F=(se,ge,le)=>{m.value=!0,le.stopPropagation();const de=JSON.parse(JSON.stringify(se)),pe=de.splice(ge,1)[0];C.value=!0,d.value.removeTag(pe),M(de),t("update:modelValue",d.value.getCheckedNodes().filter(me=>d.value.config.checkAnyLevel||me.isLeaf).map(me=>me.path)),setTimeout(()=>{C.value=S.value,m.value=!1})},z=(se,ge)=>{var de;M(se),t("update:modelValue",se);const le=e.changeEmitsNodes?d.value.getNodeByValue(se):se;ge!==void 0&&t("change",le),(de=R==null?void 0:R.value)==null||de.focus(),b.value=!1},H=()=>{d.value=new X1(e),M(e.modelValue)},B=se=>{x.value=se.isShow,t("toggle",se.isShow),C.value=se.isShow,S.value=se.isShow,a.nextTick(()=>{var ge,le;se.isShow&&((ge=R.value)==null||ge.focus(),(le=g.value)==null||le.scrollToSelected())}),se.isShow&&Ce(),se.isShow||(b.value=!1)},te=Bl(200,se=>{const ge=se.target;if(w.value=ge.value,w.value===""){b.value=!1;return}b.value=!0,b.value=!0;const le=e.filterMethod?e.filterMethod:pe=>(e.checkAnyLevel||pe.isLeaf)&&pe.pathNames.join(e.separator).includes(w.value),de=d.value.getFlattedNodes().filter(pe=>le(pe,w.value));_.value=de,!(E!=null&&E.value.isShow)&&(E==null||E.value.show())}),Ce=()=>{t("focus")};a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,H,{deep:!0,immediate:!0}),a.watch(()=>e.multiple,(se,ge)=>{se!==ge&&(d.value=new X1(e),f.value=[],h.value="",M(e.modelValue))},{immediate:!0});const W=a.computed(()=>e.customTagsFillback?e.customTagsFillback(e.modelValue,d.value.getFlattedNodes()):f.value.map(se=>se.text)),Y=a.computed(()=>e.collapseTags?e.collapseTags&&S.value:e.collapseTags),q=a.computed(()=>e.collapseTags?e.collapseTags&&C.value:e.collapseTags),{overflowTagIndex:re}=n.trigger?{overflowTagIndex:null}:z7(T,q,W),{resolveClassName:Z}=Re();return{calcuPlaceholder:A,bkCascaderRef:T,inputRef:R,overflowTagIndex:re,isCollapse:Y,isFocus:S,isAlways:m,store:d,updateValue:M,selectedText:h,checkedValue:N,handleClear:P,isHover:s,setHover:l,popover:E,cancelHover:c,selectedTags:f,removeTag:F,cascaderPanel:g,popoverChangeEmitter:B,searchKey:w,suggestions:_,isFiltering:b,searchInputHandler:te,focusEmitter:Ce,tagList:W,isEdit:C,displayText:I,resolveClassName:Z,isShowPanel:x,searchBlueHandler:L}},render(){const e=()=>{var c;return this.clearable&&this.isHover&&!this.disabled&&((c=this.modelValue)==null?void 0:c.length)>0?a.createVNode(ir,{class:this.resolveClassName("icon-clear-icon"),onClick:this.handleClear},null):a.createVNode(bo,{class:[this.resolveClassName("icon-angle-up"),this.isShowPanel?"active":""]},null)};this.overflowTagIndex=this.overflowTagIndex===0?1:this.overflowTagIndex;const t=this.tagList.reduce((c,d,m)=>(this.overflowTagIndex!==null&&m>=this.overflowTagIndex&&c.push(d),c),[]),n=()=>a.createVNode("input",{ref:"inputRef",class:[this.resolveClassName("cascader-search-input"),{"is-disabled":this.disabled}],disabled:this.disabled,placeholder:this.calcuPlaceholder,type:"text",value:this.searchKey,onBlur:this.searchBlueHandler,onInput:this.searchInputHandler},null),r=()=>this.limitOneLine?a.createVNode("span",{class:"cascader-selected-text"},[this.displayText]):a.createVNode("div",{class:"cascader-tag-list"},[this.tagList.map((c,d)=>{const m=!this.isCollapse&&this.overflowTagIndex!==null&&d>=this.overflowTagIndex;return a.createVNode("span",{key:c,style:{display:m?"none":""},class:"tag-item"},[a.createVNode("span",{class:"tag-item-name"},[c]),a.createVNode(Hn,{class:this.resolveClassName("icon-clear-icon"),onClick:h=>{h.stopPropagation(),this.removeTag(this.modelValue,d,h)}},null)])}),this.overflowTagIndex!==null&&!this.isCollapse&&a.withDirectives(a.createVNode(Ml,{style:"margin-top: 0"},{default:()=>[a.createTextVNode("+"),this.selectedTags.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),t.join(", ")]]),this.filterable&&n()]),i=()=>this.multiple?null:a.createVNode("span",null,[this.displayText]),s=ql({always:this.isAlways,arrow:!1,boundary:"body",disabled:this.disabled,hideIgnoreReference:!0,offset:4,placement:"bottom-start",referenceCls:this.resolveClassName("cascader-popover-reference"),theme:`light ${this.resolveClassName("cascader-popover")}`,trigger:"click"},this.popoverOptions),l=()=>a.createVNode(sr,a.mergeProps({ref:"popover",class:this.resolveClassName("cascader-popover-wrapper"),onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter},s),{default:()=>this.$slots.trigger?this.$slots.trigger({selected:this.modelValue,isShow:this.isShowPanel}):a.createVNode("div",{class:[this.resolveClassName("cascader-name"),this.resolveClassName("scroll-y")]},[this.multiple&&this.selectedTags.length>0&&r(),this.filterable?this.selectedTags.length===0&&n():i()]),content:()=>{var c,d;return a.createVNode("div",{class:this.resolveClassName("cascader-popover")},[a.createVNode(aw,{ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,modelValue:this.checkedValue,"onUpdate:modelValue":m=>this.checkedValue=m,"is-filtering":this.isFiltering,"search-key":this.searchKey,separator:this.separator,store:this.store,suggestions:this.suggestions},{default:m=>this.$slots.default?this.$slots.default(m):a.createVNode(S9,{type:"tips"},{default:()=>[a.createVNode("span",{class:this.resolveClassName("cascader-node-name")},[m.node.name])]}),panel:m=>this.$slots.panel?this.$slots.panel(m):null}),(d=(c=this.$slots).extension)==null?void 0:d.call(c)])}});return a.createVNode("div",{class:[this.resolveClassName("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?l():a.createVNode("div",{ref:"bkCascaderRef",class:[this.resolveClassName("cascader"),this.extCls,{"is-unselected":!this.modelValue||this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable,"is-focus":this.isFocus,"is-disabled":this.disabled,"is-simplicity":this.behavior==="simplicity"}],"data-placeholder":this.calcuPlaceholder,tabindex:"0",onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),l()])])}}),lw=Wn(DP,{CascaderPanel:aw});function Vi(){}Vi.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var s=this;function l(_){return i?(setTimeout(function(){i(void 0,_)},0),!0):_}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var c=n.length,d=t.length,m=1,h=c+d,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=c&&p+1>=d)return l([{value:this.join(n),count:n.length}]);function g(){for(var _=-1*m;_<=m;_+=2){var b=void 0,C=f[_-1],S=f[_+1],x=(S?S.newPos:0)-_;C&&(f[_-1]=void 0);var N=C&&C.newPos+1<c,E=S&&0<=x&&x<d;if(!N&&!E){f[_]=void 0;continue}if(!N||E&&C.newPos<S.newPos?(b=IP(S),s.pushComponent(b.components,void 0,!0)):(b=C,b.newPos++,s.pushComponent(b.components,!0,void 0)),x=s.extractCommon(b,n,t,_),b.newPos+1>=c&&x+1>=d)return l(RP(s,b.components,n,t,s.useLongestToken));f[_]=b}m++}if(i)(function _(){setTimeout(function(){if(m>h)return i();g()||_()},0)})();else for(;m<=h;){var w=g();if(w)return w}},pushComponent:function(t,n,r){var i=t[t.length-1];i&&i.added===n&&i.removed===r?t[t.length-1]={count:i.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,i){for(var s=n.length,l=r.length,c=t.newPos,d=c-i,m=0;c+1<s&&d+1<l&&this.equals(n[c+1],r[d+1]);)c++,d++,m++;return m&&t.components.push({count:m}),t.newPos=c,d},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=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function RP(e,t,n,r,i){for(var s=0,l=t.length,c=0,d=0;s<l;s++){var m=t[s];if(m.removed){if(m.value=e.join(r.slice(d,d+m.count)),d+=m.count,s&&t[s-1].added){var f=t[s-1];t[s-1]=t[s],t[s]=f}}else{if(!m.added&&i){var h=n.slice(c,c+m.count);h=h.map(function(g,w){var _=r[d+w];return _.length>g.length?_:g}),m.value=e.join(h)}else m.value=e.join(n.slice(c,c+m.count));c+=m.count,m.added||(d+=m.count)}}var p=t[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(t[l-2].value+=p.value,t.pop()),t}function IP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var p8=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,g8=/\S/,cw=new Vi;cw.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!g8.test(e)&&!g8.test(t)};cw.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]&&p8.test(t[n])&&p8.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var D9=new Vi;D9.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function VP(e,t,n){return D9.diff(e,t,n)}var MP=new Vi;MP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kP=new Vi;kP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nu=function(t){return typeof t}:Nu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function J1(e){return PP(e)||$P(e)||FP(e)||HP()}function PP(e){if(Array.isArray(e))return Q3(e)}function $P(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function FP(e,t){if(e){if(typeof e=="string")return Q3(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 Q3(e,t)}}function Q3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
45
|
+
`)});var K1,f8;function SP(){if(f8)return K1;f8=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return K1=n,K1}var Y1,h8;function TP(){if(h8)return Y1;h8=1;var e=SP(),t=J7();function n(r,i){return r!=null&&t(r,i,e)}return Y1=n,Y1}var EP=TP();const OP=bn(EP),AP=a.defineComponent({name:"TagRender",directives:{bkTooltips:sa},props:{node:y.object,displayKey:y.string,tooltipKey:y.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})},allowCreate:{type:Boolean,default:!1}},emits:["dblclick","change"],setup(e,{emit:t}){const n=a.ref(),r=a.ref(!1),i=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!OP(e.node,e.tooltipKey)||!r.value,...e.tagOverflowTips})),s=a.ref(),l=a.ref(!1),c=a.ref(null),d=()=>{c.value&&clearTimeout(c.value),c.value=window.setTimeout(()=>{c.value!==null&&(c.value=null)},200)},m=b=>{b.preventDefault(),b.stopPropagation(),c.value&&(clearTimeout(c.value),c.value=null),l.value=!0,t("dblclick",!0),setTimeout(()=>{var C;(C=s.value)==null||C.focus()},0)},h=()=>{l.value=!1,t("dblclick",!1)},f=()=>{l.value=!0},p=b=>{const C=b.target.value;t("change",C)},g=b=>{if((b.code==="Enter"||b.key==="Enter"||b.keyCode===13)&&!b.isComposing){const C=b.target.value;t("change",C),setTimeout(()=>{h()},100)}},w=b=>{const C=b.target.value;_.value=C},_=a.ref(e.node[e.displayKey]);return a.watch(()=>e.node[e.displayKey],b=>{_.value=b}),a.onMounted(()=>{r.value=wL(n.value)}),{overflowTips:i,tagRef:n,editRef:s,handleClick:d,handleDblclick:m,showEdit:l,handleEditBlur:h,handleEditFocus:f,handleEditChange:p,handleEditKeyDown:g,handleEditInput:w,editValue:_}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[this.showEdit?a.createVNode("input",{ref:"editRef",class:"dblclick-edit-input",type:"text",value:this.editValue,onBlur:this.handleEditBlur,onChange:this.handleEditChange,onFocus:this.handleEditFocus,onInput:this.handleEditInput,onKeydown:this.handleEditKeyDown},null):null,a.createVNode("span",{class:"text",onClick:this.allowCreate?this.handleClick:void 0,onDblclick:this.allowCreate?this.handleDblclick:void 0},[this.editValue])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),LP=a.defineComponent({name:"TagInput",directives:{bkTooltips:sa},props:xP(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input","copy-success"],setup(e,{emit:t}){const n=aa(),r=Ft("tagInput"),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:l}=Re(),{maxResult:c}=a.toRefs(e),{pageState:d,initPage:m,pageChange:h}=wk(c),f=a.ref(""),p=a.ref(null),g=a.ref(null),w=a.ref(null),_=a.ref(null),b=a.ref(null),C=a.ref(),S=a.ref(null),x=a.ref(!1),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),E=a.computed(()=>e.maxData===1),T=a.computed(()=>V.selectedTagList.length===0&&f.value===""&&!i.isEdit),R=a.computed(()=>e.placeholder||r.value.placeholder),A=a.computed(()=>e.clearable&&!e.disabled&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>e.copyable&&V.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),k=a.computed(()=>({[`${l("tag-input-trigger")}`]:!0,active:i.isEdit,disabled:e.disabled})),V=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),L=a.computed(()=>V.selectedTagList.map(K=>K[e.saveKey])),{flatList:M,saveKeyMap:P}=Ck(e),F=a.computed(()=>{if(e.useGroup){const K={};return d.curPageList.forEach((ne,fe)=>{var We,Qe,et;const _e=(We=ne.group)==null?void 0:We.groupId,De=(Qe=ne.group)==null?void 0:Qe.groupName;ne.__index__=fe,_e&&!K[_e]&&(K[_e]={id:_e,name:De,children:[]}),(et=K==null?void 0:K[_e])==null||et.children.push(ne)}),Object.keys(K).map(ne=>K[ne])}return d.curPageList});a.watch([()=>M.value],()=>{a.nextTick(()=>{Y()})},{deep:!0}),a.watch(()=>e.modelValue,K=>{var ne;Z(L.value,K)||(a.nextTick(()=>{Y()}),e.withValidate&&((ne=n==null?void 0:n.validate)==null||ne.call(n,"change")))}),a.watch(f,Ii(()=>{const K=d.curPageList.length!==0,{value:ne}=f;ne!==""&&K||ne===""&&e.trigger==="focus"&&K?s.isShow=!0:(e.trigger!=="focus"||!K)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,K=>{z(),K&&b.value&&(a.nextTick(()=>{b.value.scrollTop=0}),b.value.removeEventListener("scroll",H),b.value.addEventListener("scroll",H))}),a.onMounted(()=>{Y()});const z=()=>{var ne;const K=s.offset;typeof K=="object"&&K!==null&&"crossAxis"in K&&(K.crossAxis=E.value?0:((ne=_.value)==null?void 0:ne.offsetLeft)??0)},H=()=>{if(d.isPageLoading||b.value.scrollTop===0)return;const{scrollTop:K,offsetHeight:ne,scrollHeight:fe}=b.value;if(K+ne>=fe){const _e=d.curPage+1;_e<=d.totalPage&&(d.isPageLoading=!0,setTimeout(()=>{h(_e)},500))}},B=()=>{var ne;return Array.from(((ne=w.value)==null?void 0:ne.childNodes)||[]).filter(fe=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(fe.nodeType))},te=K=>{if(!e.disabled){if(K!=null&&K.target){const{className:ne}=K.target;(ne.indexOf(`${l("tag-input-trigger")}`)>-1||ne.indexOf("tag-list")>-1)&&w.value.appendChild(_.value)}clearTimeout(S.value),E.value&&L.value.length&&(V.tagListCache=[...L.value],V.selectedTagListCache=[...V.selectedTagList],f.value=V.selectedTagListCache[0][e.saveKey],Ve(V.selectedTagList[0]),ee()),i.isEdit=!0,setTimeout(()=>{var ne;x.value||((ne=p.value)==null||ne.focus(),e.trigger==="focus"&&V.localList.length!==0&&(q(),s.isShow?z():s.isShow=!0))},200)}},Ce=K=>{x.value=K,setTimeout(()=>{i.isEdit=!1,s.isShow=!1},10)},W=(K,ne,fe)=>{if(setTimeout(()=>{i.isEdit=!1,s.isShow=!1},10),V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:_e,saveKey:De,displayKey:We,createTagValidator:Qe,clearTextSpace:et}=e,at=It=>typeof Qe=="function"?Qe(It):!0;let it;if(_e){let It=fe.split(_e);It=It.filter(rt=>(rt==null?void 0:rt.trim())&&!L.value.includes(rt)&&at(rt));const dt=It.map(rt=>P.value[rt]||{[De]:rt,[We]:rt});It.length&&V.selectedTagList.splice(ne,1,...dt)}else{const It=typeof fe=="object";if(it=It?fe[De]:fe.trim(),et&&(it=it.replace(/\s+/g,"")),it!==void 0&&!L.value.includes(it)&&at(it)){const dt=P.value[it]||(It?fe:{[De]:it,[We]:it});V.selectedTagList.splice(ne,1,dt)}}const wt=P.value[K[e.saveKey]];(e.allowCreate&&wt||!e.allowCreate)&&!E.value&&V.localList.push(K),t("update:modelValue",L.value),t("change",L.value)},Y=()=>{const{saveKey:K,modelValue:ne,displayKey:fe,allowCreate:_e,trigger:De,isAsyncList:We}=e;if(V.selectedTagList=[],V.localList=M.value,ne.length){const Qe={};V.selectedTagList=ne.map(et=>{const at=P.value[et];return Qe[et]=1,!at&&_e?{[K]:et,[fe]:et}:at}).filter(et=>et),E.value||(V.localList=V.localList.filter(et=>!Qe[et[K]]))}if(We&&f.value){q(f.value),d.curPageList.length&&(s.isShow=!0);return}De==="focus"&&q()},q=(K="")=>{const{searchKey:ne,filterCallback:fe}=e,_e=K.toLowerCase().trim();if(_e===""){m(V.localList);return}let De=[];typeof fe=="function"?De=fe(_e,ne,V.localList)||[]:Array.isArray(ne)?De=V.localList.filter(We=>ne.some(Qe=>We[Qe].toLowerCase().indexOf(_e)>-1)):De=V.localList.filter(We=>We[ne].toLowerCase().indexOf(_e)>-1),m(De)},re=(K,ne)=>{const fe={[`${l("selector-actived")}`]:!0,[`${l("selector-selected")}`]:L.value.includes(K[e.saveKey])};return e.useGroup?fe[`${l("selector-actived")}`]=K.__index__===i.focusItemIndex:fe[`${l("selector-actived")}`]=ne===i.focusItemIndex,fe};function Z(K,ne){return K.length!==ne.length?!1:ne.every((fe,_e)=>K[_e]===fe)}const se=()=>{V.tagListCache=[],V.selectedTagListCache=[],V.selectedTagList=[]},ge=()=>{f.value="",p.value.style.width=`${Wa}px`},le=()=>{if(E.value)return 0;const ne=B().filter(fe=>fe.className!=="").findIndex(({id:fe})=>fe==="tagInputItem");return ne>=0?ne:0},de=(K,ne,fe=!1)=>{if(!ne||!K)return;let _e=ne;fe&&(_e=ne.nextElementSibling||null),ne.parentNode.insertBefore(K,_e)},pe=K=>{if(!h5(K)){p.value.style.width=`${Wa}px`;return}const fe=document.createElement("span");fe.style.visibility="hidden",fe.style.position="absolute",fe.style.whiteSpace="pre",fe.style.font=window.getComputedStyle(p.value).font,fe.textContent=K,document.body.appendChild(fe);const _e=fe.offsetWidth;document.body.removeChild(fe),p.value.style.width=`${Math.max(_e+10,Wa)}px`},me=()=>{pe(f.value)},ee=K=>{const{maxData:ne,trigger:fe,allowCreate:_e}=e;if(ne===-1||ne>L.value.length){const{value:De}=K!=null&&K.target?K.target:f;De?(q(De),pe(De)):(fe==="focus"&&q(),p.value.style.width=`${Wa}px`)}else j(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=_e?-1:0,t("input",f.value)},X=()=>{var K;s.width=E.value?(K=g.value)==null?void 0:K.clientWidth:e.contentWidth,t("focus")},j=()=>{S.value=setTimeout(()=>{var ne;const K=f.value;if(ge(),i.isEdit=!1,e.allowAutoMatch&&K){if(E.value){const[_e]=V.tagListCache;K===_e&&V.selectedTagListCache.length&&Ee(V.selectedTagListCache[0],"select")}const fe=d.curPageList.find(_e=>Array.isArray(e.searchKey)?e.searchKey.map(We=>_e[We]).includes(K):_e[e.searchKey]===K);fe?J(fe,"select"):e.allowCreate&&J(K,"custom")}s.isShow=!1,t("blur",K,L.value),(ne=n==null?void 0:n.validate)==null||ne.call(n,"blur")},200)},J=(K,ne,fe)=>{fe==null||fe.stopPropagation(),!(!K||K.disabled)&&(E.value&&se(),Ee(K,ne),G("select"),ge(),s.isShow=!1)},ie=(K,ne)=>{ne==null||ne.stopPropagation(),Ve(K),ge(),G("remove",K),p.value.style.width=`${Wa}px`},G=(K,ne)=>{t(K,ne),t("update:modelValue",L.value),t("change",L.value)},ue=K=>{K.stopPropagation();const ne=V.selectedTagList;V.selectedTagList=[];const fe=ne.filter(_e=>P.value[_e[e.saveKey]]);(e.allowCreate&&fe.length!==0||!e.allowCreate)&&!E.value&&V.localList.push(...fe),G("removeAll")},Se=()=>{const K={height:b.value.clientHeight,yAxis:b.value.getBoundingClientRect().y};a.nextTick(()=>{const ne=b.value.querySelector(`.${l("selector-actived")}`);if(!ne)return;const fe={height:ne.clientHeight,yAxis:ne.getBoundingClientRect().y};fe.yAxis<K.yAxis&&(b.value.scrollTop=b.value.scrollTop-(K.yAxis-fe.yAxis));const _e=fe.yAxis+fe.height-K.yAxis;_e>K.height&&(b.value.scrollTop=b.value.scrollTop+_e-K.height)})},oe=(K,ne)=>{const fe=B();de(_.value,fe[K-1]),V.selectedTagList.splice(K-1,1),te();const _e=ne&&P.value[ne[e.saveKey]];(e.allowCreate&&_e||!e.allowCreate)&&!E.value&&V.localList.push(ne),p.value.style.width=`${Wa}px`,G("remove")},we=K=>{if(d.isPageLoading||K.isComposing)return;let ne;const fe=K.target.value,_e=h5(fe),De=le(),We=B();switch(K.code){case"ArrowUp":if(K.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=d.curPageList.length-1),Se();break;case"ArrowDown":if(K.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>d.curPageList.length-1?d.curPageList.length:i.focusItemIndex,i.focusItemIndex===d.curPageList.length&&(i.focusItemIndex=0),Se();break;case"ArrowLeft":if(i.isEdit=!0,!_e){if(De<1)return;de(_.value,We[De-1]),te()}break;case"ArrowRight":if(i.isEdit=!0,!_e){if(De===We.length-1)return;de(We[De+1],_.value),te()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?J(d.curPageList[i.focusItemIndex],"select",K):e.allowCreate&&f.value.trim()&&J(f.value,"custom",K),K.preventDefault();break;case"Backspace":De!==0&&!f.value&&(ne=V.selectedTagList[De-1],oe(De,ne));break}},Te=K=>{const ne=[];return K.split(";").forEach(_e=>{kk(_e)&&ne.push({[e.saveKey]:_e,[e.displayKey]:_e})}),ne},Ne=K=>{K.preventDefault();const{maxData:ne,saveKey:fe,displayKey:_e,pasteFn:De,allowCreate:We}=e,Qe=K.clipboardData.getData("text");let at=(De?De(Qe):Te(Qe)).map(it=>it[fe]);if(at.length){const it=B(),wt=le(),It=V.localList.map(rt=>rt[fe]);if(at=at.filter(rt=>{const lt=(rt==null?void 0:rt.trim())&&!L.value.includes(rt);return We?lt:lt&&It.includes(rt)}),ne!==-1){const rt=V.selectedTagList.length;if(rt<ne){const lt=ne-rt;at.length>lt&&(at=[...at.slice(0,lt)])}else at=[]}const dt=We?at.map(rt=>V.localList.find(wn=>wn[fe]===rt)??{[fe]:rt,[_e]:rt}):V.localList.filter(rt=>at.includes(rt[fe]));at.length&&(V.selectedTagList.splice(wt,0,...dt),de(_.value,it[wt]),p.value.style.width=`${Wa}px`,V.localList=V.localList.filter(rt=>!at.includes(rt[fe])),G("select"),te())}ge()},ae=K=>{e.disabled||(de(_.value,K.currentTarget,!0),p.value.style.width=`${Wa}px`,s.isShow&&z())},Ee=(K,ne)=>{if(V.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:fe,saveKey:_e,displayKey:De,createTagValidator:We,clearTextSpace:Qe}=e,et=le();let at=1,it=!1,wt;const It=dt=>typeof We=="function"?We(dt):!0;if(ne==="custom")if(fe){let dt=K.split(fe);dt=dt.filter(lt=>(lt==null?void 0:lt.trim())&&!L.value.includes(lt)&&It(lt));const rt=dt.map(lt=>P.value[lt]||{[_e]:lt,[De]:lt});dt.length&&(V.selectedTagList.splice(et,0,...rt),at=rt.length,it=!0)}else{const dt=typeof K=="object";if(wt=dt?K[_e]:K.trim(),Qe&&(wt=wt.replace(/\s+/g,"")),wt!==void 0&&!L.value.includes(wt)&&It(wt)){const rt=P.value[wt]||(dt?K:{[_e]:wt,[De]:wt});V.selectedTagList.splice(et,0,rt),it=!0}}else K&&(wt=K[_e],wt!==void 0&&!L.value.includes(wt)&&(V.selectedTagList.splice(et,0,K),it=!0));it&&a.nextTick(()=>{for(let dt=1;dt<=at;dt++){const lt=B()[et+dt];de(lt,_.value)}if(p.value.style.width=`${Wa}px`,!E.value){e.allowNextFocus&&te();const dt=L.value.reduce((rt,lt)=>(rt[lt]=1,rt),{});V.localList=V.localList.filter(rt=>!dt[rt[_e]])}})},Ve=K=>{V.selectedTagList=nP(V.selectedTagList,fe=>fe[e.saveKey]!==K[e.saveKey]);const ne=P.value[K[e.saveKey]];(e.allowCreate&&ne||!e.allowCreate)&&!E.value&&V.localList.push(K)},He=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:qe}=z7(g,He,L),ht=a.computed(()=>V.selectedTagList.reduce((K,ne,fe)=>(qe.value!==null&&fe>=qe.value&&K.push(ne[e.displayKey]),K),[])),Et=K=>{var _e;K.stopPropagation();const ne=V.selectedTagList;if(ne.length===0)return;const fe=ne.map(De=>De[e.displayKey]).join(e.copySeparator);if((_e=navigator.clipboard)!=null&&_e.writeText)navigator.clipboard.writeText(fe).catch(De=>{console.error("Failed to copy:",De)});else{const De=document.createElement("textarea");De.value=fe,De.style.position="fixed",De.style.opacity="0",document.body.appendChild(De),De.select();try{document.execCommand("copy")}catch(We){console.error("Failed to copy:",We)}document.body.removeChild(De)}setTimeout(()=>{t("copy-success",L.value)})};return{popoverProps:s,...a.toRefs(i),...a.toRefs(V),...a.toRefs(d),isShowPlaceholder:T,isShowClear:A,isShowCopy:I,placeholderText:R,curInputValue:f,renderList:F,showTagClose:N,tagInputRef:p,bkTagSelectorRef:g,tagListRef:w,tagInputItemRef:_,inputValueRef:C,selectorListRef:b,triggerClass:k,overflowTagIndex:qe,localCollapseTags:He,collapseTooltip:ht,focusInputTrigger:te,activeClass:re,handleInput:ee,handleCompositionEnd:me,handleFocus:X,handleBlur:j,handleTagSelected:J,handleTagRemove:ie,handleClear:ue,tagFocus:ae,handleKeydown:we,handlePaste:Ne,resolveClassName:l,handleTagDblclick:Ce,handleTagDblclickChange:W,handleCopy:Et}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(sr,a.mergeProps({arrow:!1,placement:"bottom-start",referenceCls:this.resolveClassName("tag-input-popover-reference"),theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual"},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const i=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:i?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(AP,{allowCreate:this.allowCreate,displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl,onChange:this.allowCreate?s=>this.handleTagDblclickChange(n,r,s):void 0,onDblclick:this.allowCreate?s=>this.handleTagDblclick(s):void 0},null),this.showTagClose&&a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,spellcheck:"false",type:"text",onBlur:this.handleBlur,onCompositionend:this.handleCompositionEnd,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]]),a.createVNode("div",{key:"inputValuePlaceholder",ref:"inputValueRef",style:"position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"},[this.curInputValue])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??a.createVNode("div",{class:"icon-wrapper"},[this.isShowCopy&&a.createVNode(Od,{class:"copy-icon",title:"复制",onClick:this.handleCopy},null),this.isShowClear&&a.createVNode(ir,{class:"clear-icon",onClick:this.handleClear},null)])])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(d8,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(d8,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(Ka,{size:is.Small,theme:"primary"},null)]):null])])})])}}),rw=bt(LP),aw=a.defineComponent({name:"CascaderPanel",props:{width:y.oneOfType([y.number,y.string]).def("auto"),height:y.oneOfType([y.number,y.string]).def(216),store:y.object.def({}),separator:y.string.def(""),suggestions:y.arrayOf(Eb()),isFiltering:y.bool.def(!1),searchKey:y.oneOfType([y.string,y.number]).def(""),modelValue:y.arrayOf(y.oneOfType([T6(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const n=Ft("cascader"),{resolveClassName:r}=Re(),{store:i}=a.toRefs(e),s=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),c=a.ref([]),d=A=>typeof A=="number"?`${A}px`:A,m=d(e.height),h=d(e.width),f=A=>{(!A||A.length===0)&&(s.list=s.list.slice(0,1),l.value=[]),p(A),c.value=A},p=A=>{if(c.value.length===0||!i.value.config.multiple){let k=[];if(i.value.config.multiple)for(const V of A)V.length>k.length&&(k=V);else k=A;k.forEach(V=>{const L=i.value.getNodeById(V);if(L){const M=F=>{var H;if(!F||F!=null&&F.isDisabled)return;const z=F.level;s.list=s.list.slice(0,z),l.value=l.value.slice(0,z-1),(H=F.children)!=null&&H.length&&s.list.length===z&&(s.list.push(F.children),l.value.push(F))},P=F=>{F.parent&&P(F.parent),M(F)};P(L)}})}},g=A=>{if(!A.isDisabled){if(A.config.multiple){const I=i.value.config.checkAnyLevel?i.value.getCheckedNodes():i.value.getCheckedLeafNodes();c.value=I.map(k=>k.path)}else c.value=A.path;t("update:modelValue",c.value)}},w=A=>{var I;if(!(!A||A!=null&&A.isDisabled)){if(s.list=s.list.slice(0,A.level),l.value=l.value.slice(0,A.level-1),(I=A.children)!=null&&I.length){s.list.push(A.children),l.value.push(A);return}if(i.value.config.isRemote&&!A.isLeaf){A.loading=!0;const k=V=>{i.value.appendNodes(V,A||null),s.list.push(A.children),l.value.push(A),A.loading=!1};i.value.config.remoteMethod(A,k)}}},_=A=>{const{trigger:I,checkAnyLevel:k,multiple:V}=A.config;return{onClick:M=>{(!A.isLeaf||V)&&M.stopPropagation(),I==="click"&&w(A),k&&!V&&g(A),A.isLeaf&&!V&&g(A)},onMouseenter:()=>{I==="hover"&&w(A)}}},b=A=>{const{multiple:I}=A.config;return{onClick:V=>{if(I){V.stopPropagation(),T(A,!A.checked);return}w(A),A.isLeaf&&!I&&g(A)}}},C=()=>{s.list.forEach((A,I)=>{const k=document.querySelector(`.${r("cascader-panel")}:nth-child(${I+1}) .${r("cascader-node.is-selected")}, .${r("cascader-node.is-checked")}`);k&&a.nextTick(()=>{k.scrollIntoView()})})};a.watch(()=>i.value.config.multiple,(A,I)=>{A!==I&&(s.list=[i.value.getNodes()],l.value=[],c.value=[])});const S=n.value.noData,{emptyText:x}=n.value,N=A=>(l.value[A.level-1]||{}).id===A.id,E=(A,I)=>{const{multiple:k}=A.config;return k?I.some(V=>qs(V,A.path)):qs(I,A.path)},T=(A,I)=>{A.setNodeCheck(I||!1),g(A)},R=A=>A.loading?a.createVNode(_o,{class:r("icon-spinner")},null):a.createVNode(Cr,{class:r("icon-angle-right")},null);return a.watch(()=>e.modelValue,A=>{f(A)},{immediate:!0}),a.watch(()=>e.store,A=>{s.list=[A.getNodes()]}),{menus:s,activePath:l,nodeExpandHandler:w,isNodeInPath:N,nodeEvent:_,isCheckedNode:E,checkValue:c,checkNode:T,iconRender:R,panelWidth:h,panelHeight:m,searchPanelEvents:b,expandByNodeList:p,noDataText:S,emptyText:x,resolveClassName:r,scrollToSelected:C}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:"200px",t=()=>this.suggestions.length?a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{style:{width:e},class:this.resolveClassName("cascader-search-empty")},[a.createVNode("span",null,[this.noDataText])]);return a.createVNode("div",{class:this.resolveClassName("cascader-panel-wrapper")},[this.isFiltering?t():this.menus.list.map((n,r)=>{var i,s;return a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[(s=(i=this.$slots).panel)==null?void 0:s.call(i,{nodes:n,level:r,activePath:this.activePath}),n.length?n.map(l=>{var c,d;return a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(l)},{"is-disabled":l.isDisabled},{"is-checked":!l.config.multiple&&this.isCheckedNode(l,this.checkValue)}]},Object.assign(this.nodeEvent(l),l.config.multiple?{}:{})),[l.config.multiple&&a.createVNode(Bn,{style:"margin-right: 5px",modelValue:l.checked,"onUpdate:modelValue":m=>l.checked=m,disabled:l.isDisabled,indeterminate:l.isIndeterminate,onChange:m=>this.checkNode(l,!!m)},null),(d=(c=this.$slots).default)==null?void 0:d.call(c,{node:l,data:l.data}),l.isLeaf?"":this.iconRender(l)])}):a.createVNode("div",{class:this.resolveClassName("cascader-panel-empty-wrapper")},[this.noDataText])])})])}});function iw(e){return e.data.disabled?!0:e.level!==1?iw(e.parent):e.data.disabled}let m8=class sw{constructor(t,n,r){$e(this,"data");$e(this,"config");$e(this,"parent");$e(this,"level");$e(this,"id");$e(this,"name");$e(this,"loading");$e(this,"loaded");$e(this,"checked");$e(this,"isIndeterminate");$e(this,"children");$e(this,"leaf");$e(this,"pathNodes");$e(this,"path");$e(this,"pathNames");$e(this,"nodes");this.data=t,this.config=n,this.parent=r||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:r}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const i=this.data[r];this.children=(i||[]).map(s=>new sw(s,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(s=>s.id),this.pathNames=this.pathNodes.map(s=>s.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 iw(this)}broadcast(t,n){const r=`onParent${Al(t)}`;this.children.forEach(i=>{var s;i&&(i.broadcast(t,n),(s=i[r])==null||s.call(i,n))})}emit(t){var i;const{parent:n}=this,r=`onChild${Al(t)}`;n&&((i=n[r])==null||i.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(i=>!i.isDisabled),r=n.length?n.every(i=>i.checked):!1;this.setCheckState(r)}setCheckState(t){const n=this.children.length,r=this.children.reduce((i,s)=>{const l=s.isIndeterminate?.5:0,c=s.checked?1:l;return i+c},0);this.checked=t,this.isIndeterminate=r!==n&&r>0}setNodeCheck(t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}};const ow=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(ow(r.children,t))),n),[]);class X1{constructor(t){$e(this,"data");$e(this,"config");$e(this,"nodes");const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(r=>new m8(r,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.setNodeCheck(!1),t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>qs(t,n.path)?(n.setNodeCheck(!1),!0):!1)}getFlattedNodes(t=!1){return ow(this.nodes,t)}setNodesCheck(t){this.getFlattedNodes().forEach(n=>{n.setNodeCheck(!1);const r=t.find(i=>qs(n.path,i));r&&this.getNodeByValue(r).setNodeCheck(!0)})}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getCheckedLeafNodes(){return this.getFlattedNodes().filter(t=>t.isLeaf&&t.checked)}getNodeByValue(t){return this.getFlattedNodes().filter(r=>qs(r.path,t))[0]??null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const r=new m8(t,this.config,n);(n?n.children:this.nodes).push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}}const DP=a.defineComponent({name:"Cascader",directives:{bkTooltips:sa},props:{modelValue:y.arrayOf(y.oneOfType([T6(),String,Number])),list:y.array.def([]),placeholder:y.string.def(""),behavior:y.string.def("normal"),filterable:y.bool.def(!1),multiple:y.bool.def(!1),disabled:y.bool.def(!1),clearable:y.bool.def(!0),trigger:y.string.def("click"),checkAnyLevel:y.bool.def(!1),isRemote:y.bool.def(!1),remoteMethod:y.func,showCompleteName:y.bool.def(!0),idKey:y.string.def("id"),nameKey:y.string.def("name"),childrenKey:y.string.def("children"),separator:y.string.def("/"),limitOneLine:y.bool.def(!1),popoverOptions:Object,extCls:y.string.def(""),filterMethod:y.func,scrollHeight:y.oneOfType([y.number,y.string]).def(216),scrollWidth:y.oneOfType([y.number,y.string]).def("auto"),customTextFillback:y.func,customTagsFillback:y.func,changeEmitsNodes:y.bool.def(!1),collapseTags:{type:Boolean,default:!0},floatMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","toggle","focus"],setup(e,{emit:t,slots:n}){const r=Ft("cascader"),{separator:i}=e,{isHover:s,setHover:l,cancelHover:c}=O7(),d=a.ref(new X1(e)),m=a.ref(!1),h=a.ref(""),f=a.ref([]),{modelValue:p}=a.toRefs(e),g=a.ref(),w=a.ref(""),_=a.ref([]),b=a.ref(!1),C=a.ref(!1),S=a.ref(!1),x=a.ref(!1),N=a.computed({get:()=>p.value,set:se=>{t("update:modelValue",se)}}),E=a.ref(null),T=a.ref(null),R=a.ref(null),A=a.computed(()=>{const se=e.placeholder?e.placeholder:r.value.pleaseSelect;return p.value.length===0?se:""}),I=a.computed(()=>e.customTextFillback?e.customTextFillback(e.modelValue,d.value.getFlattedNodes()):h.value),k=se=>e.showCompleteName?se.pathNames.join(i):se.pathNames[se.pathNames.length-1],V=()=>{w.value=h.value},L=()=>{if(!e.multiple){w.value=h.value;return}w.value=""},M=se=>{var le;if(e.multiple){d.value.setNodesCheck(se),f.value=d.value.getCheckedNodes().filter(de=>d.value.config.checkAnyLevel||de.isLeaf).map(de=>({text:k(de),key:de.id})),h.value=f.value.map(de=>de.text).join(", ");return}e.checkAnyLevel||(le=E==null?void 0:E.value)==null||le.hide();const ge=d.value.getNodeByValue(se);h.value=ge?k(ge):"",V()},P=se=>{se.stopPropagation(),d.value.clearChecked(),w.value="",M([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},F=(se,ge,le)=>{m.value=!0,le.stopPropagation();const de=JSON.parse(JSON.stringify(se)),pe=de.splice(ge,1)[0];C.value=!0,d.value.removeTag(pe),M(de),t("update:modelValue",d.value.getCheckedNodes().filter(me=>d.value.config.checkAnyLevel||me.isLeaf).map(me=>me.path)),setTimeout(()=>{C.value=S.value,m.value=!1})},z=(se,ge)=>{var de;M(se),t("update:modelValue",se);const le=e.changeEmitsNodes?d.value.getNodeByValue(se):se;ge!==void 0&&t("change",le),(de=R==null?void 0:R.value)==null||de.focus(),b.value=!1},H=()=>{d.value=new X1(e),M(e.modelValue)},B=se=>{x.value=se.isShow,t("toggle",se.isShow),C.value=se.isShow,S.value=se.isShow,a.nextTick(()=>{var ge,le;se.isShow&&((ge=R.value)==null||ge.focus(),(le=g.value)==null||le.scrollToSelected())}),se.isShow&&Ce(),se.isShow||(b.value=!1)},te=Bl(200,se=>{const ge=se.target;if(w.value=ge.value,w.value===""){b.value=!1;return}b.value=!0,b.value=!0;const le=e.filterMethod?e.filterMethod:pe=>(e.checkAnyLevel||pe.isLeaf)&&pe.pathNames.join(e.separator).includes(w.value),de=d.value.getFlattedNodes().filter(pe=>le(pe,w.value));_.value=de,!(E!=null&&E.value.isShow)&&(E==null||E.value.show())}),Ce=()=>{t("focus")};a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,H,{deep:!0,immediate:!0}),a.watch(()=>e.multiple,(se,ge)=>{se!==ge&&(d.value=new X1(e),f.value=[],h.value="",M(e.modelValue))},{immediate:!0});const W=a.computed(()=>e.customTagsFillback?e.customTagsFillback(e.modelValue,d.value.getFlattedNodes()):f.value.map(se=>se.text)),Y=a.computed(()=>e.collapseTags?e.collapseTags&&S.value:e.collapseTags),q=a.computed(()=>e.collapseTags?e.collapseTags&&C.value:e.collapseTags),{overflowTagIndex:re}=n.trigger?{overflowTagIndex:null}:z7(T,q,W),{resolveClassName:Z}=Re();return{calcuPlaceholder:A,bkCascaderRef:T,inputRef:R,overflowTagIndex:re,isCollapse:Y,isFocus:S,isAlways:m,store:d,updateValue:M,selectedText:h,checkedValue:N,handleClear:P,isHover:s,setHover:l,popover:E,cancelHover:c,selectedTags:f,removeTag:F,cascaderPanel:g,popoverChangeEmitter:B,searchKey:w,suggestions:_,isFiltering:b,searchInputHandler:te,focusEmitter:Ce,tagList:W,isEdit:C,displayText:I,resolveClassName:Z,isShowPanel:x,searchBlueHandler:L}},render(){const e=()=>{var c;return this.clearable&&this.isHover&&!this.disabled&&((c=this.modelValue)==null?void 0:c.length)>0?a.createVNode(ir,{class:this.resolveClassName("icon-clear-icon"),onClick:this.handleClear},null):a.createVNode(bo,{class:[this.resolveClassName("icon-angle-up"),this.isShowPanel?"active":""]},null)};this.overflowTagIndex=this.overflowTagIndex===0?1:this.overflowTagIndex;const t=this.tagList.reduce((c,d,m)=>(this.overflowTagIndex!==null&&m>=this.overflowTagIndex&&c.push(d),c),[]),n=()=>a.createVNode("input",{ref:"inputRef",class:[this.resolveClassName("cascader-search-input"),{"is-disabled":this.disabled}],disabled:this.disabled,placeholder:this.calcuPlaceholder,type:"text",value:this.searchKey,onBlur:this.searchBlueHandler,onInput:this.searchInputHandler},null),r=()=>this.limitOneLine?a.createVNode("span",{class:"cascader-selected-text"},[this.displayText]):a.createVNode("div",{class:"cascader-tag-list"},[this.tagList.map((c,d)=>{const m=!this.isCollapse&&this.overflowTagIndex!==null&&d>=this.overflowTagIndex;return a.createVNode("span",{key:c,style:{display:m?"none":""},class:"tag-item"},[a.createVNode("span",{class:"tag-item-name"},[c]),a.createVNode(Hn,{class:this.resolveClassName("icon-clear-icon"),onClick:h=>{h.stopPropagation(),this.removeTag(this.modelValue,d,h)}},null)])}),this.overflowTagIndex!==null&&!this.isCollapse&&a.withDirectives(a.createVNode(Ml,{style:"margin-top: 0"},{default:()=>[a.createTextVNode("+"),this.selectedTags.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),t.join(", ")]]),this.filterable&&n()]),i=()=>this.multiple?null:a.createVNode("span",null,[this.displayText]),s=ql({always:this.isAlways,arrow:!1,boundary:"body",disabled:this.disabled,hideIgnoreReference:!0,offset:4,placement:"bottom-start",referenceCls:this.resolveClassName("cascader-popover-reference"),theme:`light ${this.resolveClassName("cascader-popover")}`,trigger:"click"},this.popoverOptions),l=()=>a.createVNode(sr,a.mergeProps({ref:"popover",class:this.resolveClassName("cascader-popover-wrapper"),onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter},s),{default:()=>this.$slots.trigger?this.$slots.trigger({selected:this.modelValue,isShow:this.isShowPanel}):a.createVNode("div",{class:[this.resolveClassName("cascader-name"),this.resolveClassName("scroll-y")]},[this.multiple&&this.selectedTags.length>0&&r(),this.filterable?this.selectedTags.length===0&&n():i()]),content:()=>{var c,d;return a.createVNode("div",{class:this.resolveClassName("cascader-popover")},[a.createVNode(aw,{ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,modelValue:this.checkedValue,"onUpdate:modelValue":m=>this.checkedValue=m,"is-filtering":this.isFiltering,"search-key":this.searchKey,separator:this.separator,store:this.store,suggestions:this.suggestions},{default:m=>this.$slots.default?this.$slots.default(m):a.createVNode(S9,{type:"tips"},{default:()=>[a.createVNode("span",{class:this.resolveClassName("cascader-node-name")},[m.node.name])]}),panel:m=>this.$slots.panel?this.$slots.panel(m):null}),(d=(c=this.$slots).extension)==null?void 0:d.call(c)])}});return a.createVNode("div",{class:[this.resolveClassName("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?l():a.createVNode("div",{ref:"bkCascaderRef",class:[this.resolveClassName("cascader"),this.extCls,{"is-unselected":!this.modelValue||this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable,"is-focus":this.isFocus,"is-disabled":this.disabled,"is-simplicity":this.behavior==="simplicity"}],"data-placeholder":this.calcuPlaceholder,tabindex:"0",onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),l()])])}}),lw=Wn(DP,{CascaderPanel:aw});function Vi(){}Vi.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var s=this;function l(_){return i?(setTimeout(function(){i(void 0,_)},0),!0):_}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var c=n.length,d=t.length,m=1,h=c+d,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=c&&p+1>=d)return l([{value:this.join(n),count:n.length}]);function g(){for(var _=-1*m;_<=m;_+=2){var b=void 0,C=f[_-1],S=f[_+1],x=(S?S.newPos:0)-_;C&&(f[_-1]=void 0);var N=C&&C.newPos+1<c,E=S&&0<=x&&x<d;if(!N&&!E){f[_]=void 0;continue}if(!N||E&&C.newPos<S.newPos?(b=IP(S),s.pushComponent(b.components,void 0,!0)):(b=C,b.newPos++,s.pushComponent(b.components,!0,void 0)),x=s.extractCommon(b,n,t,_),b.newPos+1>=c&&x+1>=d)return l(RP(s,b.components,n,t,s.useLongestToken));f[_]=b}m++}if(i)(function _(){setTimeout(function(){if(m>h)return i();g()||_()},0)})();else for(;m<=h;){var w=g();if(w)return w}},pushComponent:function(t,n,r){var i=t[t.length-1];i&&i.added===n&&i.removed===r?t[t.length-1]={count:i.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,i){for(var s=n.length,l=r.length,c=t.newPos,d=c-i,m=0;c+1<s&&d+1<l&&this.equals(n[c+1],r[d+1]);)c++,d++,m++;return m&&t.components.push({count:m}),t.newPos=c,d},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=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function RP(e,t,n,r,i){for(var s=0,l=t.length,c=0,d=0;s<l;s++){var m=t[s];if(m.removed){if(m.value=e.join(r.slice(d,d+m.count)),d+=m.count,s&&t[s-1].added){var f=t[s-1];t[s-1]=t[s],t[s]=f}}else{if(!m.added&&i){var h=n.slice(c,c+m.count);h=h.map(function(g,w){var _=r[d+w];return _.length>g.length?_:g}),m.value=e.join(h)}else m.value=e.join(n.slice(c,c+m.count));c+=m.count,m.added||(d+=m.count)}}var p=t[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(t[l-2].value+=p.value,t.pop()),t}function IP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var p8=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,g8=/\S/,cw=new Vi;cw.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!g8.test(e)&&!g8.test(t)};cw.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]&&p8.test(t[n])&&p8.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var D9=new Vi;D9.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function VP(e,t,n){return D9.diff(e,t,n)}var MP=new Vi;MP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kP=new Vi;kP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nu=function(t){return typeof t}:Nu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function J1(e){return PP(e)||$P(e)||FP(e)||HP()}function PP(e){if(Array.isArray(e))return Q3(e)}function $P(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function FP(e,t){if(e){if(typeof e=="string")return Q3(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 Q3(e,t)}}function Q3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
46
46
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var BP=Object.prototype.toString,kl=new Vi;kl.useLongestToken=!0;kl.tokenize=D9.tokenize;kl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(s,l){return typeof l>"u"?n:l}:r;return typeof e=="string"?e:JSON.stringify(e6(e,null,null,i),i," ")};kl.equals=function(e,t){return Vi.prototype.equals.call(kl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function e6(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var l;if(BP.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),s=0;s<e.length;s+=1)l[s]=e6(e[s],t,n,r,i);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),Nu(e)==="object"&&e!==null){t.push(e),l={},n.push(l);var c=[],d;for(d in e)e.hasOwnProperty(d)&&c.push(d);for(c.sort(),s=0;s<c.length;s+=1)d=c[s],l[d]=e6(e[d],t,n,r,d);t.pop(),n.pop()}else l=e;return l}var t6=new Vi;t6.tokenize=function(e){return e.slice()};t6.join=t6.removeEmpty=function(e){return e};function zP(e,t,n,r,i,s,l){l||(l={}),typeof l.context>"u"&&(l.context=4);var c=VP(n,r,l);c.push({value:"",lines:[]});function d(C){return C.map(function(S){return" "+S})}for(var m=[],h=0,f=0,p=[],g=1,w=1,_=function(S){var x=c[S],N=x.lines||x.value.replace(/\n$/,"").split(`
|
|
47
47
|
`);if(x.lines=N,x.added||x.removed){var E;if(!h){var T=c[S-1];h=g,f=w,T&&(p=l.context>0?d(T.lines.slice(-l.context)):[],h-=p.length,f-=p.length)}(E=p).push.apply(E,J1(N.map(function(P){return(x.added?"+":"-")+P}))),x.added?w+=N.length:g+=N.length}else{if(h)if(N.length<=l.context*2&&S<c.length-2){var R;(R=p).push.apply(R,J1(d(N)))}else{var A,I=Math.min(N.length,l.context);(A=p).push.apply(A,J1(d(N.slice(0,I))));var k={oldStart:h,oldLines:g-h+I,newStart:f,newLines:w-f+I,lines:p};if(S>=c.length-2&&N.length<=l.context){var V=/\n$/.test(n),L=/\n$/.test(r),M=N.length==0&&p.length>k.oldLines;!V&&M&&n.length>0&&p.splice(k.oldLines,0,"\"),(!V&&!M||!L)&&p.push("\")}m.push(k),h=0,f=0,p=[]}g+=N.length,w+=N.length}},b=0;b<c.length;b++)_(b);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:s,hunks:m}}function UP(e){var t=[];t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(" "+e.oldHeader)),t.push("+++ "+e.newFileName+(" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var r=e.hunks[n];r.oldLines===0&&(r.oldStart-=1),r.newLines===0&&(r.newStart-=1),t.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),t.push.apply(t,r.lines)}return t.join(`
|
|
48
48
|
`)+`
|
|
@@ -386,4 +386,4 @@ __p += '`),Lt&&(Pe+=`' +
|
|
|
386
386
|
function print() { __p += __j.call(arguments, '') }
|
|
387
387
|
`:`;
|
|
388
388
|
`)+Pe+`return __p
|
|
389
|
-
}`;var _t=tg(function(){return kt(U,Ze+"return "+Pe).apply(n,Q)});if(_t.source=Pe,m0(_t))throw _t;return _t}function tO(o){return $t(o).toLowerCase()}function nO(o){return $t(o).toUpperCase()}function rO(o,u,v){if(o=$t(o),o&&(v||u===n))return um(o);if(!o||!(u=fr(u)))return o;var O=Wr(o),D=Wr(u),U=dm(O,D),Q=fm(O,D)+1;return hi(O,U,Q).join("")}function aO(o,u,v){if(o=$t(o),o&&(v||u===n))return o.slice(0,mm(o)+1);if(!o||!(u=fr(u)))return o;var O=Wr(o),D=fm(O,Wr(u))+1;return hi(O,0,D).join("")}function iO(o,u,v){if(o=$t(o),o&&(v||u===n))return o.replace(fn,"");if(!o||!(u=fr(u)))return o;var O=Wr(o),D=dm(O,Wr(u));return hi(O,D).join("")}function sO(o,u){var v=k,O=V;if(Qt(u)){var D="separator"in u?u.separator:D;v="length"in u?Ct(u.length):v,O="omission"in u?fr(u.omission):O}o=$t(o);var U=o.length;if(Ss(o)){var Q=Wr(o);U=Q.length}if(v>=U)return o;var ce=v-Ts(O);if(ce<1)return O;var ye=Q?hi(Q,0,ce).join(""):o.slice(0,ce);if(D===n)return ye+O;if(Q&&(ce+=ye.length-ce),p0(D)){if(o.slice(ce).search(D)){var Ie,Me=ye;for(D.global||(D=Df(D.source,$t(oa.exec(D))+"g")),D.lastIndex=0;Ie=D.exec(Me);)var Pe=Ie.index;ye=ye.slice(0,Pe===n?ce:Pe)}}else if(o.indexOf(fr(D),ce)!=ce){var Ge=ye.lastIndexOf(D);Ge>-1&&(ye=ye.slice(0,Ge))}return ye+O}function oO(o){return o=$t(o),o&&dt.test(o)?o.replace(wt,k_):o}var lO=Is(function(o,u,v){return o+(v?" ":"")+u.toUpperCase()}),y0=np("toUpperCase");function eg(o,u,v){return o=$t(o),u=v?n:u,u===n?D_(o)?F_(o):__(o):o.match(u)||[]}var tg=Nt(function(o,u){try{return ur(o,n,u)}catch(v){return m0(v)?v:new mt(v)}}),cO=$a(function(o,u){return Or(u,function(v){v=ha(v),ka(o,v,f0(o[v],o))}),o});function uO(o){var u=o==null?0:o.length,v=ot();return o=u?Yt(o,function(O){if(typeof O[1]!="function")throw new Ar(l);return[v(O[0]),O[1]]}):[],Nt(function(O){for(var D=-1;++D<u;){var U=o[D];if(ur(U[0],this,O))return ur(U[1],this,O)}})}function dO(o){return kN(Dr(o,f))}function b0(o){return function(){return o}}function fO(o,u){return o==null||o!==o?u:o}var hO=ap(),mO=ap(!0);function Qn(o){return o}function w0(o){return Vm(typeof o=="function"?o:Dr(o,f))}function pO(o){return km(Dr(o,f))}function gO(o,u){return Pm(o,Dr(u,f))}var vO=Nt(function(o,u){return function(v){return Fo(v,o,u)}}),yO=Nt(function(o,u){return function(v){return Fo(o,v,u)}});function C0(o,u,v){var O=_n(u),D=Dc(u,O);v==null&&!(Qt(u)&&(D.length||!O.length))&&(v=u,u=o,o=this,D=Dc(u,_n(u)));var U=!(Qt(v)&&"chain"in v)||!!v.chain,Q=Ha(o);return Or(D,function(ce){var ye=u[ce];o[ce]=ye,Q&&(o.prototype[ce]=function(){var Ie=this.__chain__;if(U||Ie){var Me=o(this.__wrapped__),Pe=Me.__actions__=Xn(this.__actions__);return Pe.push({func:ye,args:arguments,thisArg:o}),Me.__chain__=Ie,Me}return ye.apply(o,oi([this.value()],arguments))})}),o}function bO(){return on._===this&&(on._=j_),this}function _0(){}function wO(o){return o=Ct(o),Nt(function(u){return $m(u,o)})}var CO=Qf(Yt),_O=Qf(im),NO=Qf(xf);function ng(o){return s0(o)?Sf(ha(o)):QN(o)}function xO(o){return function(u){return o==null?n:ji(o,u)}}var SO=sp(),TO=sp(!0);function N0(){return[]}function x0(){return!1}function EO(){return{}}function OO(){return""}function AO(){return!0}function LO(o,u){if(o=Ct(o),o<1||o>B)return[];var v=W,O=An(o,W);u=ot(u),o-=W;for(var D=Of(O,u);++v<o;)u(v);return D}function DO(o){return yt(o)?Yt(o,ha):hr(o)?[o]:Xn(_p($t(o)))}function RO(o){var u=++U_;return $t(o)+u}var IO=Pc(function(o,u){return o+u},0),VO=e0("ceil"),MO=Pc(function(o,u){return o/u},1),kO=e0("floor");function PO(o){return o&&o.length?Lc(o,Qn,Ff):n}function $O(o,u){return o&&o.length?Lc(o,ot(u,2),Ff):n}function FO(o){return lm(o,Qn)}function HO(o,u){return lm(o,ot(u,2))}function BO(o){return o&&o.length?Lc(o,Qn,Uf):n}function zO(o,u){return o&&o.length?Lc(o,ot(u,2),Uf):n}var UO=Pc(function(o,u){return o*u},1),WO=e0("round"),jO=Pc(function(o,u){return o-u},0);function qO(o){return o&&o.length?Ef(o,Qn):0}function GO(o,u){return o&&o.length?Ef(o,ot(u,2)):0}return $.after=pT,$.ary=Ip,$.assign=nE,$.assignIn=Gp,$.assignInWith=Xc,$.assignWith=rE,$.at=aE,$.before=Vp,$.bind=f0,$.bindAll=cO,$.bindKey=Mp,$.castArray=ET,$.chain=Lp,$.chunk=kx,$.compact=Px,$.concat=$x,$.cond=uO,$.conforms=dO,$.constant=b0,$.countBy=qS,$.create=iE,$.curry=kp,$.curryRight=Pp,$.debounce=$p,$.defaults=sE,$.defaultsDeep=oE,$.defer=gT,$.delay=vT,$.difference=Fx,$.differenceBy=Hx,$.differenceWith=Bx,$.drop=zx,$.dropRight=Ux,$.dropRightWhile=Wx,$.dropWhile=jx,$.fill=qx,$.filter=KS,$.flatMap=JS,$.flatMapDeep=ZS,$.flatMapDepth=QS,$.flatten=Tp,$.flattenDeep=Gx,$.flattenDepth=Kx,$.flip=yT,$.flow=hO,$.flowRight=mO,$.fromPairs=Yx,$.functions=mE,$.functionsIn=pE,$.groupBy=eT,$.initial=Jx,$.intersection=Zx,$.intersectionBy=Qx,$.intersectionWith=eS,$.invert=vE,$.invertBy=yE,$.invokeMap=nT,$.iteratee=w0,$.keyBy=rT,$.keys=_n,$.keysIn=Zn,$.map=Wc,$.mapKeys=wE,$.mapValues=CE,$.matches=pO,$.matchesProperty=gO,$.memoize=qc,$.merge=_E,$.mergeWith=Kp,$.method=vO,$.methodOf=yO,$.mixin=C0,$.negate=Gc,$.nthArg=wO,$.omit=NE,$.omitBy=xE,$.once=bT,$.orderBy=aT,$.over=CO,$.overArgs=wT,$.overEvery=_O,$.overSome=NO,$.partial=h0,$.partialRight=Fp,$.partition=iT,$.pick=SE,$.pickBy=Yp,$.property=ng,$.propertyOf=xO,$.pull=aS,$.pullAll=Op,$.pullAllBy=iS,$.pullAllWith=sS,$.pullAt=oS,$.range=SO,$.rangeRight=TO,$.rearg=CT,$.reject=lT,$.remove=lS,$.rest=_T,$.reverse=u0,$.sampleSize=uT,$.set=EE,$.setWith=OE,$.shuffle=dT,$.slice=cS,$.sortBy=mT,$.sortedUniq=gS,$.sortedUniqBy=vS,$.split=JE,$.spread=NT,$.tail=yS,$.take=bS,$.takeRight=wS,$.takeRightWhile=CS,$.takeWhile=_S,$.tap=PS,$.throttle=xT,$.thru=Uc,$.toArray=Wp,$.toPairs=Xp,$.toPairsIn=Jp,$.toPath=DO,$.toPlainObject=qp,$.transform=AE,$.unary=ST,$.union=NS,$.unionBy=xS,$.unionWith=SS,$.uniq=TS,$.uniqBy=ES,$.uniqWith=OS,$.unset=LE,$.unzip=d0,$.unzipWith=Ap,$.update=DE,$.updateWith=RE,$.values=ks,$.valuesIn=IE,$.without=AS,$.words=eg,$.wrap=TT,$.xor=LS,$.xorBy=DS,$.xorWith=RS,$.zip=IS,$.zipObject=VS,$.zipObjectDeep=MS,$.zipWith=kS,$.entries=Xp,$.entriesIn=Jp,$.extend=Gp,$.extendWith=Xc,C0($,$),$.add=IO,$.attempt=tg,$.camelCase=PE,$.capitalize=Zp,$.ceil=VO,$.clamp=VE,$.clone=OT,$.cloneDeep=LT,$.cloneDeepWith=DT,$.cloneWith=AT,$.conformsTo=RT,$.deburr=Qp,$.defaultTo=fO,$.divide=MO,$.endsWith=$E,$.eq=qr,$.escape=FE,$.escapeRegExp=HE,$.every=GS,$.find=YS,$.findIndex=xp,$.findKey=lE,$.findLast=XS,$.findLastIndex=Sp,$.findLastKey=cE,$.floor=kO,$.forEach=Dp,$.forEachRight=Rp,$.forIn=uE,$.forInRight=dE,$.forOwn=fE,$.forOwnRight=hE,$.get=g0,$.gt=IT,$.gte=VT,$.has=gE,$.hasIn=v0,$.head=Ep,$.identity=Qn,$.includes=tT,$.indexOf=Xx,$.inRange=ME,$.invoke=bE,$.isArguments=Ki,$.isArray=yt,$.isArrayBuffer=MT,$.isArrayLike=Jn,$.isArrayLikeObject=ln,$.isBoolean=kT,$.isBuffer=mi,$.isDate=PT,$.isElement=$T,$.isEmpty=FT,$.isEqual=HT,$.isEqualWith=BT,$.isError=m0,$.isFinite=zT,$.isFunction=Ha,$.isInteger=Hp,$.isLength=Kc,$.isMap=Bp,$.isMatch=UT,$.isMatchWith=WT,$.isNaN=jT,$.isNative=qT,$.isNil=KT,$.isNull=GT,$.isNumber=zp,$.isObject=Qt,$.isObjectLike=nn,$.isPlainObject=jo,$.isRegExp=p0,$.isSafeInteger=YT,$.isSet=Up,$.isString=Yc,$.isSymbol=hr,$.isTypedArray=Ms,$.isUndefined=XT,$.isWeakMap=JT,$.isWeakSet=ZT,$.join=tS,$.kebabCase=BE,$.last=Ir,$.lastIndexOf=nS,$.lowerCase=zE,$.lowerFirst=UE,$.lt=QT,$.lte=eE,$.max=PO,$.maxBy=$O,$.mean=FO,$.meanBy=HO,$.min=BO,$.minBy=zO,$.stubArray=N0,$.stubFalse=x0,$.stubObject=EO,$.stubString=OO,$.stubTrue=AO,$.multiply=UO,$.nth=rS,$.noConflict=bO,$.noop=_0,$.now=jc,$.pad=WE,$.padEnd=jE,$.padStart=qE,$.parseInt=GE,$.random=kE,$.reduce=sT,$.reduceRight=oT,$.repeat=KE,$.replace=YE,$.result=TE,$.round=WO,$.runInContext=ve,$.sample=cT,$.size=fT,$.snakeCase=XE,$.some=hT,$.sortedIndex=uS,$.sortedIndexBy=dS,$.sortedIndexOf=fS,$.sortedLastIndex=hS,$.sortedLastIndexBy=mS,$.sortedLastIndexOf=pS,$.startCase=ZE,$.startsWith=QE,$.subtract=jO,$.sum=qO,$.sumBy=GO,$.template=eO,$.times=LO,$.toFinite=Ba,$.toInteger=Ct,$.toLength=jp,$.toLower=tO,$.toNumber=Vr,$.toSafeInteger=tE,$.toString=$t,$.toUpper=nO,$.trim=rO,$.trimEnd=aO,$.trimStart=iO,$.truncate=sO,$.unescape=oO,$.uniqueId=RO,$.upperCase=lO,$.upperFirst=y0,$.each=Dp,$.eachRight=Rp,$.first=Ep,C0($,(function(){var o={};return da($,function(u,v){Pt.call($.prototype,v)||(o[v]=u)}),o})(),{chain:!1}),$.VERSION=r,Or(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){$[o].placeholder=$}),Or(["drop","take"],function(o,u){At.prototype[o]=function(v){v=v===n?1:gn(Ct(v),0);var O=this.__filtered__&&!u?new At(this):this.clone();return O.__filtered__?O.__takeCount__=An(v,O.__takeCount__):O.__views__.push({size:An(v,W),type:o+(O.__dir__<0?"Right":"")}),O},At.prototype[o+"Right"]=function(v){return this.reverse()[o](v).reverse()}}),Or(["filter","map","takeWhile"],function(o,u){var v=u+1,O=v==P||v==z;At.prototype[o]=function(D){var U=this.clone();return U.__iteratees__.push({iteratee:ot(D,3),type:v}),U.__filtered__=U.__filtered__||O,U}}),Or(["head","last"],function(o,u){var v="take"+(u?"Right":"");At.prototype[o]=function(){return this[v](1).value()[0]}}),Or(["initial","tail"],function(o,u){var v="drop"+(u?"":"Right");At.prototype[o]=function(){return this.__filtered__?new At(this):this[v](1)}}),At.prototype.compact=function(){return this.filter(Qn)},At.prototype.find=function(o){return this.filter(o).head()},At.prototype.findLast=function(o){return this.reverse().find(o)},At.prototype.invokeMap=Nt(function(o,u){return typeof o=="function"?new At(this):this.map(function(v){return Fo(v,o,u)})}),At.prototype.reject=function(o){return this.filter(Gc(ot(o)))},At.prototype.slice=function(o,u){o=Ct(o);var v=this;return v.__filtered__&&(o>0||u<0)?new At(v):(o<0?v=v.takeRight(-o):o&&(v=v.drop(o)),u!==n&&(u=Ct(u),v=u<0?v.dropRight(-u):v.take(u-o)),v)},At.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},At.prototype.toArray=function(){return this.take(W)},da(At.prototype,function(o,u){var v=/^(?:filter|find|map|reject)|While$/.test(u),O=/^(?:head|last)$/.test(u),D=$[O?"take"+(u=="last"?"Right":""):u],U=O||/^find/.test(u);D&&($.prototype[u]=function(){var Q=this.__wrapped__,ce=O?[1]:arguments,ye=Q instanceof At,Ie=ce[0],Me=ye||yt(Q),Pe=function(St){var Lt=D.apply($,oi([St],ce));return O&&Ge?Lt[0]:Lt};Me&&v&&typeof Ie=="function"&&Ie.length!=1&&(ye=Me=!1);var Ge=this.__chain__,Ze=!!this.__actions__.length,ct=U&&!Ge,_t=ye&&!Ze;if(!U&&Me){Q=_t?Q:new At(this);var ut=o.apply(Q,ce);return ut.__actions__.push({func:Uc,args:[Pe],thisArg:n}),new Lr(ut,Ge)}return ct&&_t?o.apply(this,ce):(ut=this.thru(Pe),ct?O?ut.value()[0]:ut.value():ut)})}),Or(["pop","push","shift","sort","splice","unshift"],function(o){var u=pc[o],v=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",O=/^(?:pop|shift)$/.test(o);$.prototype[o]=function(){var D=arguments;if(O&&!this.__chain__){var U=this.value();return u.apply(yt(U)?U:[],D)}return this[v](function(Q){return u.apply(yt(Q)?Q:[],D)})}}),da(At.prototype,function(o,u){var v=$[u];if(v){var O=v.name+"";Pt.call(Ls,O)||(Ls[O]=[]),Ls[O].push({name:u,func:v})}}),Ls[kc(n,C).name]=[{name:"wrapper",func:n}],At.prototype.clone=oN,At.prototype.reverse=lN,At.prototype.value=cN,$.prototype.at=$S,$.prototype.chain=FS,$.prototype.commit=HS,$.prototype.next=BS,$.prototype.plant=US,$.prototype.reverse=WS,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=jS,$.prototype.first=$.prototype.head,Ro&&($.prototype[Ro]=zS),$}),Es=H_();ua?((ua.exports=Es)._=Es,Lo._=Es):on._=Es}).call(nq)})(vl,vl.exports)),vl.exports}var aq=rq(),nr=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(nr||{});const Yr=(...e)=>!0,iq={nodeClick:Yr,nodeCollapse:Yr,nodeExpand:Yr,nodeChecked:Yr,nodeDragStart:Yr,nodeDragOver:Yr,nodeDragLeave:Yr,nodeDragSort:Yr,nodeDrop:Yr,nodeEnterView:Yr,nodeSelected:Yr};var Ae=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(Ae||{});const _i={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var o_=(e=>(e.CHECKED="checked",e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(o_||{});const sq={data:y.arrayOf(y.any).def([]),label:y.oneOfType([y.func.def(void 0),y.string.def("label")]),nodeKey:y.string.def(void 0),children:y.string.def("children"),indent:y.number.def(16),lineHeight:y.number.def(32),height:y.number,levelLine:y.oneOfType([y.bool.def(!1),y.func.def(void 0),y.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:y.bool.def(!1),prefixIcon:y.oneOfType([y.func.def(()=>{}),y.bool.def(!1)]).def(!0),async:y.shape({callback:y.func.def(void 0),cache:y.bool.def(!0),deepAutoOpen:je("columnType",{}).def("once"),trigger:y.arrayOf(y.oneOf(["expand","click","checked"])).def(void 0)}),offsetLeft:y.number.def(5),search:y.oneOfType([y.shape({value:y.oneOfType([y.number,y.string,y.bool]).def(""),match:y.oneOfType([Fn(),y.func]).def("fuzzy"),resultType:Fn().def("tree"),showChildNodes:y.bool.def(!1)}),y.string,y.number,y.bool]).def(void 0),emptyText:y.string.def("没有数据"),draggable:y.bool.def(!1),disableDrag:y.func,disableDrop:Function,dragThreshold:y.number.def(.2),dragSort:y.bool.def(!1),dragSortMode:y.oneOf(["any","next"]).def("any"),selectable:y.oneOfType([y.bool,y.func]).def(!0),disabledFolderSelectable:y.bool.def(!1),showCheckbox:y.oneOfType([y.bool,y.func]).def(!1),disableCheck:y.bool.def(!1),checked:y.arrayOf(y.any).def([]),showNodeTypeIcon:y.bool.def(!0),selected:y.oneOfType([y.string,y.number,y.object]),autoCheckChildren:y.oneOfType([y.bool,y.func]).def(!0),autoOpenParentNode:y.bool.def(!0),expandAll:y.bool.def(!1),nodeContentAction:y.oneOfType([y.arrayOf(je("nodeContentActionType",{}).def(o_.CLICK)),y.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:y.bool.def(!1),checkStrictly:y.bool.def(!0),intersectionObserver:y.oneOfType([y.bool.def(!1),y.shape({enabled:y.bool.def(!1),callback:y.func.def(void 0)})]).def(!1)},oq=e=>({renderEmpty:t=>a.createVNode(cf,{scene:"part",type:t},{default:()=>[e.emptyText]})}),lq=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],i=null;const s=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,l=a.computed(s),c=p=>p instanceof NodeList?Array.from(p):Array.isArray(p)?p:[p];return{unobserveAll:()=>{r==null||r.forEach(p=>{xl(p)&&(n==null||n.unobserve(p))}),n==null||n.disconnect(),i==null||i.disconnect()},intersectionObserver:l,initIntersectionObserver:(p,g,w)=>{if(l.value.enabled){if(!p){console.error("intersectionObserver.target is undefined");return}r=c(p);const _=Object.assign({rootMargin:"0px"},g);n=new IntersectionObserver(function(b){b.forEach(C=>{var S,x,N;if(console.log("entry",C.target),C.isIntersecting){const E=((S=w==null?void 0:w.beforeResponse)==null?void 0:S.call(w,C))??C;(N=(x=l.value).callback)==null||N.call(x,E),l.value.once&&n.unobserve(C.target)}})},_),r.forEach(b=>{xl(b)&&n.observe(b)})}},initRootMutationObserver:(p,g)=>{if(l.value.enabled&&!e.virtualRender&&xl(p)){const w={attributes:!0,childList:!0,subtree:!0};i=new MutationObserver((..._)=>{g==null||g(..._)}),i.observe(p,w)}},getLastVisibleElement:(p,g)=>{const{offsetHeight:w}=g,_=g.querySelectorAll("[data-tree-node]"),b=w+p;return Array.from(_).filter(S=>S.offsetHeight+S.offsetTop>=b&&S.offsetTop<b)}}},mf=(e,t)=>{const n=W=>e.schema.get(W),r=(W,Y)=>{var q;return(q=n(W))==null?void 0:q[Y]},i=(W,Y,q,re)=>{if(!e.schema.has(W)){console.warn("node is not in schema, please check",re,W);return}e.schema.set(W,Object.assign({},n(W),{[Y]:q}))},s=W=>e.data.find(Y=>d(Y)===W),l=(W,Y,q)=>{if(Array.isArray(W)){Array.prototype.forEach.call(W,re=>i(s(re),Y,q,W));return}i(s(W),Y,q,W)},c=W=>r(W,Ae.PATH),d=W=>r(W,Ae.UUID),m=W=>r(W,Ae.IS_OPEN),h=W=>r(W,Ae.HAS_CHILD),f=W=>r(W,Ae.IS_MATCH),p=W=>r(W,Ae.IS_CHECKED),g=W=>r(r(W,Ae.PARENT),Ae.UUID),w=W=>r(W,Ae.IS_LOADING),_=W=>r(W,Ae.PARENT),b=W=>r(W,Ae.IS_MATCH),C=(W,Y)=>{const q=e.data.find(re=>d(re)===W);return r(q,Y)},S=W=>C(W,Ae.INDEX),x=W=>r(W,Ae.INDEX),N=W=>typeof W=="string"?C(W,Ae.IS_ROOT):r(W,Ae.IS_ROOT),E=W=>{const Y=e.data.find(q=>d(q)===W);return g(Y)},T=W=>{const Y=e.data.find(q=>d(q)===W);return c(Y)},R=(W,Y)=>{i(W,Ae.IS_LOADING,Y)},A=W=>typeof W=="object"?m(W):typeof W=="string"?C(W,Ae.IS_OPEN):!1,I=(W,Y)=>r(r(W,Ae.PARENT),Y),k=W=>A(r(W,Ae.PARENT)),V=W=>N(W)||A(W)||k(W),L=(W,Y)=>{const re=W.split("-").reduce((Z,se)=>{const ge=Number(se);return Array.isArray(Z)?Z[ge]:Z[t.children][ge]},t.data);return Y&&Object.assign(re,{[Ae.UUID]:Y}),re},M=W=>e.data.filter(Y=>_(Y)===W),P=W=>e.data.find(Y=>d(Y)===W),F=W=>{let Y=W;return typeof Y=="string"&&(Y=P(Y)),N(Y)?{[t.children]:t.data}:_(Y)},z=W=>({[_i[Ae.IS_LOADING]]:r(W,Ae.IS_LOADING),[_i[Ae.HAS_CHILD]]:h(W),[_i[Ae.IS_MATCH]]:f(W),[_i[Ae.IS_CHECKED]]:p(W),[_i[Ae.IS_OPEN]]:m(W),[_i[Ae.IS_ROOT]]:N(W),fullPath:r(W,Ae.PATH),uuid:d(W),parent:r(W,Ae.PARENT),parentId:d(r(W,Ae.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:d,getNodeById:s,getNodeParentId:g,getParentNodeData:F,getNodePathById:T,getNodeAttrById:C,getNodeParentIdById:E,getNodeIndexById:S,getNodeIndexByNode:x,getRootNodeList:()=>e.data.filter(W=>N(W)),getParentNodeAttr:I,getParentNode:_,setNodeAttr:i,setNodeAttrById:l,getNodePath:c,isRootNode:N,isNodeOpened:m,hasChildNode:h,isItemOpen:A,isNodeChecked:p,isNodeMatched:f,isNodeLoading:w,checkNodeIsOpen:V,getSourceNodeByPath:L,getSourceNodeByUID:P,isMatchedNode:b,resolveScopedSlotParam:z,setTreeNodeLoading:R,extendNodeAttr:W=>Object.assign({},W,{[Ae.TREE_NODE_ATTR]:z(W)}),getChildNodes:M,extendNodeScopedData:W=>({data:W,attributes:z(W)}),getIntersectionResponse:W=>{var ge;if(!W)return null;let Y=W;xl(W)&&(Y=s(W.getAttribute("data-tree-node")));const q=r(Y,Ae.DEPTH),re=r(Y,Ae.IS_ROOT),Z=r(Y,Ae.PARENT),se=re?r(Y,Ae.INDEX):(ge=Z==null?void 0:Z[t.children])==null?void 0:ge.findIndex(le=>le===Y);return{level:q,target:W,index:se,parent:Z,node:Y,isRoot:re}}}},l_="1px dashed #c3cdd7",c_=(e,t,n=null,r=null,i=null,s=[])=>{const l=e[t];return typeof l=="boolean"?l?r:i:u_(n,e,t,s)},u_=(e,t,n,r=[])=>{const i=t[n];if(typeof i=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,i)||console.error(`cannot find node label with key ${i}`),e[i]):i;if(typeof i=="function"){const s=i.apply(void 0,[e,...r]);if(typeof s=="string")return s;console.error("props label with function return value is not string, please check and return string");return}},d_=(e,t)=>u_(e,t,"label"),cq=(e,t)=>({"--level-line":c_(t,"levelLine",e,l_,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),uq=(e,t,n,r=!0)=>{var l;const{schema:i}=n,s=(l=i.get(e))==null?void 0:l[Ae.DEPTH];if(r){const c=["node"],d=()=>c_(t,"levelLine",e,l_,null,c);return{"--depth":s,...typeof t.levelLine=="function"?{"--level-line":d()}:{}}}return{}},dq=(e,t,n,r=!0)=>{const{__is_root:i,__is_open:s}=t.get(e)||{},{resolveClassName:l}=Re();return{"is-root":i,[`${l("tree-node")}`]:!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},fq=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:i}=Re();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${i("node-row")}`]:!0}},hq=(e,t,n,r,i)=>{mq(e,t,n,{[r]:i})},mq=(e,t,n,r)=>{const s=e.split("-").reduce((l,c)=>{const d=Number(c);return Array.isArray(l)?l[d]:l[n][d]},t);Object.assign(s,r||{})},yl=e=>e??{__IS_NULL:!0},Ou=(e,t,n)=>Array.isArray(t)?t.some(r=>Ou(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,g6=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,f_=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:i,resolveScopedSlotParam:s,setTreeNodeLoading:l}=mf(t,e),c=(h,f)=>{if(typeof h=="object"&&h!==null){n(f,Ae.IS_OPEN,!0);const p=Array.isArray(h)?h:[h];return hq(r(f),e.data,e.children,e.children,p),Promise.resolve(h)}return Promise.resolve(h)},d=h=>{const{callback:f=null,cache:p=!0}=e.async||{};if(typeof f=="function"&&i(h,Ae.IS_ASYNC)){if(n(h,Ae.IS_ASYNC_INIT,!0),!i(h,Ae.IS_CACHED)){n(h,Ae.IS_CACHED,p);const g=s(h),w=f(h,_=>c(_,h),g);if(typeof w=="object"&&w!==null)return l(h,!0),w instanceof Promise?Promise.resolve(w.then(_=>c(_,h)).catch(_=>console.error("load remote data error:",_)).finally(()=>{l(h,!1),n(h,Ae.IS_CACHED,!0)})):(c(w,h),l(h,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},m=()=>{const h=t.data.filter(f=>i(f,Ae.IS_ASYNC)&&f[_i[Ae.IS_OPEN]]&&!i(f,Ae.IS_ASYNC_INIT));h.length&&Promise.all(h.map(f=>d(f))).then(()=>{m()}).catch(f=>{console.warn(f)})};return{asyncNodeClick:d,deepAutoOpen:m}},pq=(e,t,n,r,i)=>{let s=e.selected;const{setNodeAttr:l,setNodeAttrById:c,getNodePath:d,getSchemaVal:m,getNodeAttr:h,getNodeId:f,getChildNodes:p,isRootNode:g,hasChildNode:w,isItemOpen:_,isNodeOpened:b,isNodeLoading:C,isNodeChecked:S,getParentNode:x,resolveScopedSlotParam:N,extendNodeAttr:E,extendNodeScopedData:T}=mf(n,e),{resolveClassName:R}=Re(),{registerNextLoop:A}=i,{asyncNodeClick:I,deepAutoOpen:k}=f_(e,n),V=G=>_(G)?a.createVNode(Vd,{class:[R("tree-icon"),R("node-prefix")]},null):a.createVNode(Id,{class:[R("tree-icon"),R("node-prefix")]},null),L=G=>{if(typeof G=="string")return G;if(typeof G=="object"&&G!==null){if(a.isVNode(G))return G;const{node:ue,className:Se,text:oe,style:we}=G;return a.h(ue,{class:Se,style:we},oe)}return null},M=G=>{var ue,Se;return((Se=(ue=t.slots).nodeLoading)==null?void 0:Se.call(ue,j(G)))??C(G)?a.createVNode(_o,null,null):""},P=G=>{if(t.slots.nodeAction)return t.slots.nodeAction(j(G));let ue=null;if(C(G))return M(G);if(typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(j(G),"node_action"),ue!=="default"))return L(ue);if(ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const Se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(G):e.autoCheckChildren;if(w(G)||G.async||!Se)return _(G)?a.createVNode(Yl,{class:R("node-prefix")},null):a.createVNode(Ql,{class:R("node-prefix")},null)}return null},F=G=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(j(G));let ue=null;return typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(j(G),"node_type"),ue!=="default")?L(ue):ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?g(G)||w(G)?V(G):a.createVNode(Ud,{class:[R("tree-icon"),R("node-prefix")]},null):null},z=(G,ue)=>{const Se=x(G);if(Se){const oe=ue||(p(Se)||[]).some(we=>S(we));l(Se,Ae.IS_CHECKED,oe),l(Se,Ae.IS_INDETERMINATE,(p(Se)||[]).some(we=>!S(we)||Ce(we))),g(Se)||z(Se,ue)}},H=(G,ue,Se)=>{p(G).forEach(oe=>{Array.isArray(ue)?ue.forEach((we,Te)=>{l(oe,we,Se[Te])}):l(oe,ue,Se),H(oe,ue,Se)})},B=G=>{var ue,Se,oe;return(Se=(ue=e.async)==null?void 0:ue.trigger)!=null&&Se.length?(oe=e.async)==null?void 0:oe.trigger.includes(G):!0},te=(G,ue,Se)=>{Se==null||Se.preventDefault(),Se==null||Se.stopImmediatePropagation(),Se==null||Se.stopPropagation(),l(G,Ae.IS_CHECKED,!!ue),ue&&l(G,Ae.IS_INDETERMINATE,!1),e.checkStrictly&&(H(G,[Ae.IS_CHECKED,Ae.IS_INDETERMINATE],[!!ue,!1]),z(G,ue)),t.emit(nr.NODE_CHECKED,n.data.filter(oe=>S(oe)),n.data.filter(oe=>Ce(oe))),pe(G,Se,"checked")},Ce=G=>S(G)&&h(G,Ae.IS_INDETERMINATE),W=G=>g6(e,T(G))?a.createVNode("span",{class:"node-check-box",onClick:J},[a.createVNode(Bn,{disabled:e.disableCheck,indeterminate:Ce(G),modelValue:S(G),size:"small",onChange:(ue,Se)=>te(G,!!ue,Se)},null)]):null,Y=(G,ue=null,Se=null,oe=!0)=>{const we=ue===null?!_(G):!!ue;if(we||H(G,Ae.IS_OPEN,we),l(G,Ae.IS_OPEN,we),oe){const Te=_(G)?nr.NODE_EXPAND:nr.NODE_COLLAPSE;t.emit(Te,G,N(G),m(G),Se)}},q=(G,ue,Se)=>{if(Array.isArray(G)){G.forEach(oe=>l(yl(oe),ue,Se));return}l(yl(G),ue,Se)},re=(G,ue=!0,Se=!1)=>{Z(G,Ae.IS_OPEN,ue,Se&&ue)},Z=(G,ue,Se,oe=!1)=>{const we=yl(G);if(we[Ae.IS_NULL])return;const Te=Array.isArray(ue)?ue:[ue],Ne=Array.isArray(Se)?Se:[Se];if(oe){if(Te.forEach((ae,Ee)=>q(we,ae,Ne[Ee])),!g(we)){const ae=x(we);Te.forEach((Ee,Ve)=>{h(ae,Ee)!==Se&&Z(ae,Ee,Ne[Ve],oe)})}}else Te.forEach((ae,Ee)=>q(we,ae,Ne[Ee]))},se=(G,ue,Se)=>{if(_(G)){Y(G,!1,ue,!0);return}h(G,Ae.IS_ASYNC)&&B(Se)?I(G).finally(()=>{h(G,Ae.IS_LOADING)?A("setNodeOpenedAfterLoading",{type:"once",fn:()=>Y(G,!0,ue,!0)}):Y(G,!0,ue,!0)}):Y(G,!0,ue,!0)},ge=(G,ue)=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),se(ue,G,"expand")},le=(G,ue=!0,Se=!0,oe=!1,we="")=>{const Te=Array.isArray(G)?G:[G];if(!Te.length)return;let Ne=yl(Te[0]);if((typeof Ne=="string"||typeof Ne=="number"||typeof Ne=="symbol")&&(Ne=n.data.find(ae=>f(ae)===Ne)??{[Ae.IS_NULL]:!0}),!Ne[Ae.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(G)||e.disabledFolderSelectable&&Ne.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}s!=null&&c(s,Ae.IS_SELECTED,!ue),e.selected&&e.selected!==s&&c(e.selected,Ae.IS_SELECTED,!ue),l(Ne,Ae.IS_SELECTED,ue),s=f(Ne),oe&&t.emit(nr.NODE_SELECTED,{selected:ue,node:Ne}),Se&&Te.length===1&&re(Ne,!0,!0),h(Ne,Ae.IS_ASYNC)&&B(we)&&I(Ne).then(()=>{a.nextTick(()=>{Te.shift(),le(Te,ue,Se,oe,we)})})}},de=G=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:G}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],pe=(G,ue,Se)=>{const oe=de(G),we=b(G),Te=Se==="checked";if(oe.includes("selected")){const ae=!(oe.includes("expand")||oe.includes("collapse"));le(G,!0,ae,!0,Se)}if(oe.includes("expand")&&!we&&!Te&&se(G,ue,"expand"),oe.includes("collapse")&&we&&!Te&&se(G,ue,"expand"),oe.includes("click")&&!Te){const Ne=nr.NODE_CLICK;t.emit(Ne,G,N(G),m(G),ue)}if(oe.includes("checked")&&Se!=="checked"&&g6(e,T(G))&&!e.disableCheck){const Ne=S(G);te(G,!Ne,ue)}},me=(G,ue)=>{if(g(ue))return!1;const Se=d(ue),oe=`${Se}`.split("-").slice(0,G+1);if(oe.join("-")===Se)return!0;const Te=oe.pop(),Ne=parseInt(Te,10);oe.push(`${Ne+1}`);const ae=oe.join("-");return n.data.some(Ee=>d(Ee)===ae)},ee=G=>{if(!e.levelLine)return null;const ue=oe=>({"--depth":oe}),Se=(h(G,Ae.DEPTH)??0)+1;return new Array(Se).fill("").map((oe,we)=>we).filter(oe=>me(oe,G)).filter(oe=>oe>0).map(oe=>a.createVNode("span",{style:ue(Se-oe),class:"node-virtual-line"},null))},X=G=>{var ue,Se,oe,we;return t.slots.node?(Se=(ue=t.slots).node)==null?void 0:Se.call(ue,j(G)):t.slots.default?(we=(oe=t.slots).default)==null?void 0:we.call(oe,T(G)):[d_(G,e)]},j=G=>e.keepSlotData?T(G):E(G),J=G=>{G.stopImmediatePropagation(),G.stopPropagation()};return{renderTreeNode:(G,ue=!0)=>{var oe,we;const Se=P(G);return a.createVNode("div",{key:f(G),class:fq(G,n.schema),"data-tree-node":f(G)},[a.createVNode("div",{style:uq(G,e,n,ue),class:dq(G,n.schema,e,ue),onClick:Te=>pe(G,Te,"click")},[a.createVNode("div",{class:[R("node-action"),Se?"":"empty-child"],onClick:Te=>ge(Te,G)},[Se]),a.createVNode("div",{class:R("node-content")},[[W(G),F(G)],a.createVNode("span",{class:R("node-text")},[X(G)]),(we=(oe=t.slots).nodeAppend)==null?void 0:we.call(oe,j(G))]),ue&&ee(G)])])},handleTreeNodeClick:se,deepAutoOpen:k,asyncNodeClick:I,setNodeAction:q,setNodeOpened:Y,setSelect:le,setOpen:re,setNodeAttribute:Z,isIndeterminate:Ce,deepUpdateChildNode:H,updateParentChecked:z}};function gq(){return{moveElement:(t,n,r,i=0,s=0,l="insertAfter")=>{if(n<0||r<0||n>=t.length||r>=t.length||n===r&&l==="insertAfter"||n+i>=t.length||r+s>=t.length)return Array.from(t);const c=Array.from(t),d=c.splice(n,i+1);let m=r;n<r&&(m=r-(i+1));const h=m+s+(l==="insertAfter"?1:0),f=Math.max(0,Math.min(h,c.length));return c.splice(f,0,...d),c}}}const vq=(e,t,n,r)=>{const{getSourceNodeByUID:i,getParentNode:s,extendNodeAttr:l,getNodeIndexByNode:c,setNodeAttr:d,getNodeAttr:m,getRootNodeList:h}=mf(r,e),{resolveClassName:f}=Re(),p=a.computed(()=>typeof e.disableDrag=="function"),g=a.computed(()=>typeof e.disableDrop=="function"),w=e.dragThreshold||.2;let _="",b=null,C=null,S=new WeakMap;const{moveElement:x}=gq(),N=()=>{const le=new Map;return r.data.forEach(de=>{const pe=m(de,Ae.IS_OPEN);le.set(de,pe)}),le},E=le=>{le.forEach((de,pe)=>{r.schema.has(pe)&&d(pe,Ae.IS_OPEN,de)})},T=(le,de)=>{if(de){const pe=de[e.children];if(pe){const me=pe.indexOf(le);me>-1&&pe.splice(me,1)}}else{const pe=e.data.indexOf(le);pe>-1&&e.data.splice(pe,1)}},R=le=>{if(!le)return;const de=le[e.children],pe=de&&de.length>0;d(le,Ae.HAS_CHILD,pe)},A=le=>le.target.closest("[data-tree-node]"),I=le=>{var pe;const de=(pe=le==null?void 0:le.dataset)==null?void 0:pe.treeNode;return i(de)},k=(le,de,pe)=>{pe.forEach(me=>le.classList.remove(me)),de.forEach(me=>le.classList.add(me))},V=le=>{A(le).removeEventListener("mouseup",V)},L=le=>{var me;const de=A(le),pe=I(de);if((pe==null?void 0:pe.draggable)===!1||p.value&&((me=e.disableDrag)!=null&&me.call(e,pe))){de==null||de.classList.add(`${f("tree-drag-disabled")}`);return}de==null||de.setAttribute("draggable","true"),de==null||de.addEventListener("mouseup",V)},M="drop-before",P="drop-after",F="drop-inner";let z=null;const H=cs(le=>{if(le.preventDefault(),!b)return;const de=A(le);z!==de&&(z==null||z.classList.remove(M,P,F),z=de);const pe=l(I(de));S.has(de)||S.set(de,de.getBoundingClientRect());const me=le.clientY,{top:ee,height:X}=S.get(de),j=X*w,J=me-ee;if(J<j?k(de,[M],[P,F]):J>X-j?k(de,[P],[M,F]):k(de,[F],[M,P]),t.emit(nr.NODE_DRAG_OVER,le,de,pe),g.value&&(e!=null&&e.disableDrop(C,"move",pe))){le.dataTransfer.effectAllowed="move",le.dataTransfer.dropEffect="none",de.classList.add(`${f("tree-drop-disabled")}`);return}de.classList.add(`${f("tree-drop-active")}`);const ie=de.getAttribute("data-tree-node"),G=Ce(_,ie)?"move":"none";le.dataTransfer.effectAllowed=G,le.dataTransfer.dropEffect=G}),B=le=>{le.dataTransfer.effectAllowed="move",le.dataTransfer.dropEffect="move";const de=A(le);le.dataTransfer.setData("text/plain","");const pe=de.getAttribute("data-tree-node");_=pe,b=de,C=i(pe),le.dataTransfer.setData("node-id",pe),t.emit(nr.NODE_DRAG_START,le,de)},te=le=>{le.preventDefault(),le.stopPropagation();const de=A(le);if(!de)return;de.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`);const pe=z==null?void 0:z.classList.contains(F),me=z==null?void 0:z.classList.contains(M),ee=z==null?void 0:z.classList.contains(P);let X="child";pe?X="child":(me||ee)&&(X=e.dragSort?"sort":"move");const j=l(I(de));if(g.value&&e.disableDrop(C,X,j))return;const J=_,ie=de.getAttribute("data-tree-node");if(J!==ie){const G=N();pe?Reflect.apply(Z,void 0,[J,ie,G]):(me||ee)&&(e.dragSort?Reflect.apply(re,void 0,[J,ie,G]):Reflect.apply(se,void 0,[J,ie,G])),t.emit(nr.NODE_DROP,le,de,j)}S=new WeakMap,z==null||z.classList.remove(P,M,F),z=null,C=null},Ce=(le,de)=>le!==de,W=le=>{const de=[],pe=me=>{r.data.filter(X=>s(X)===me).forEach(X=>{de.push(X),pe(X)})};return pe(le),de},Y=(le,de)=>{let pe=c(le),me=c(de);const ee=W(le),X=W(de),j=z!=null&&z.classList.contains(M)?"insertBefore":"insertAfter",J=x(r.data,pe,me,ee.length,X.length,j);return r.data=J,{sourceNodeIndex:pe,targetNodeIndex:me}},q=(le,de)=>{const pe=(m(de,Ae.DEPTH)??-1)+1;d(le,Ae.PARENT,de),d(le,Ae.DEPTH,pe),d(le,Ae.IS_ROOT,pe===0);let me=0;const ee=(j,J=0,ie="")=>{for(let G=0;G<j.length;G++){const ue=j[G],Se=ie!==""?`${ie}-${G}`:`${G}`;d(ue,Ae.INDEX,me),d(ue,Ae.ORDER,me),d(ue,Ae.DEPTH,J),d(ue,Ae.PATH,Se),me+=1;const oe=r.data.filter(we=>s(we)===ue);oe.length>0&&ee(oe,J+1,Se)}},X=h();ee(X)},re=(le,de,pe)=>{if(!e.dragSort||!Ce(le,de))return;const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me),j=s(ee);if(e.dragSortMode==="next"&&X!==j)return;const J=z!=null&&z.classList.contains(M)?"before":"after";T(me,X);let ie;j?(j[e.children]||(j[e.children]=[]),ie=j[e.children]):ie=e.data;const G=ie.indexOf(ee),ue=J==="before"?G:G+1;ie.splice(ue,0,me);const{sourceNodeIndex:Se,targetNodeIndex:oe}=Y(me,ee);R(X),q(me,j),pe&&E(pe),t.emit(nr.NODE_DRAG_SORT,{sourceNode:me,targetNode:ee,sourceIndex:Se,targetIndex:oe})},Z=(le,de,pe)=>{const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me);T(me,X),ee[e.children]||(ee[e.children]=[]),ee[e.children].push(me);const j=c(me),J=W(me),ie=r.data.splice(j,J.length+1);let G=r.data.indexOf(ee);const ue=W(ee),Se=G+ue.length+1;r.data.splice(Se,0,...ie),R(X),d(ee,Ae.HAS_CHILD,!0),q(me,ee),pe&&E(pe)},se=(le,de,pe)=>{const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me),j=s(ee),J=z!=null&&z.classList.contains(M)?"before":"after";T(me,X);let ie;j?(j[e.children]||(j[e.children]=[]),ie=j[e.children]):ie=e.data;const G=ie.indexOf(ee),ue=J==="before"?G:G+1;ie.splice(ue,0,me);const Se=c(me),oe=W(me),we=r.data.splice(Se,oe.length+1);let Te=r.data.indexOf(ee);const Ne=W(ee);let ae;J==="before"?ae=Te:ae=Te+Ne.length+1,r.data.splice(ae,0,...we),R(X),q(me,j),pe&&E(pe)},ge=le=>{le.preventDefault();const de=A(le);S.has(de)&&S.delete(de),de.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`),de.classList.remove(P,M,F),t.emit(nr.NODE_DRAG_LEAVE,le,de)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const le=n.value.$el;le.addEventListener("mousedown",L),le.addEventListener("dragstart",B),le.addEventListener("dragover",H),le.addEventListener("dragleave",ge),le.addEventListener("drop",te)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const le=n.value.$el;le.removeEventListener("mousedown",L),le.removeEventListener("dragstart",B),le.removeEventListener("dragover",H),le.removeEventListener("dragleave",ge),le.removeEventListener("drop",te)}})},yq=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},i=p=>["string","number","boolean"].includes(typeof p),s=(p,g)=>p===g,l=(p,g)=>new RegExp(`${p}`,"i").test(`${g}`),c=(p,g)=>Reflect.apply(p,void 0,g),d=t.value===void 0||t.value===!1,m=(p,g)=>{if(d)return!0;if(i(t.value))return`${t.value}`.length===0?!1:c(l,[t.value,p,g]);const{value:w="",match:_="fuzzy"}=t.value,C=typeof _=="function"?_:_==="fuzzy"?l:s;return`${w}`.length===0?!1:c(C,[w,p,g])},h=a.computed(()=>{if(t.value===!1)return!1;if(i(t.value))return`${t.value}`.length>0;const{value:p=""}=t.value;return`${p}`.length>0}),f=a.computed(()=>n==="tree");return{searchFn:m,refSearch:t,isSearchActive:h,isSearchDisabled:d,resultType:n,isTreeUI:f,showChildNodes:r}},bq=e=>{var _;const t=(b=void 0,C=null)=>{const{data:S,children:x}=e,N=[],E=[];let T=0;const R=new WeakMap;function A(B,te,Ce,W){if(B!=null&&R.has(B)){const Y=R.get(B);if(Object.prototype.hasOwnProperty.call(Y,te)&&typeof W=="function"&&Reflect.apply(W,self,[Y,te,Ce,B])){if(Y[te]===Ce)return;Object.assign(Y,{[te]:Ce}),A(Y[Ae.PARENT],te,Ce,W)}}}function I(B){let te=null;return typeof e.nodeKey=="string"&&(te=B[e.nodeKey]||Ai()),te||B[Ae.UUID]||Ai()}const k={[Ae.IS_OPEN]:()=>!!e.expandAll,[Ae.IS_CHECKED]:()=>!1,[Ae.IS_MATCH]:()=>!1,[Ae.IS_SELECTED]:(B,te)=>Ou(B,e.selected,te),[Ae.IS_CACHED]:()=>!1,[Ae.IS_ASYNC]:()=>null,[Ae.IS_LOADING]:()=>!1};function V(B,te,Ce,W=void 0){let Y=W;W===void 0&&typeof k[Ce]=="function"&&(Y=k[Ce](te,B));const q=_i[Ce];if(Object.prototype.hasOwnProperty.call(te,q))return te[q];const re=(C==null?void 0:C.get(te))??void 0;let Z;return re&&(Z=re[Ce]),Z==null&&(Z=Y),Z}function L(B,te){if(!e.selectable)return!1;const Ce=Ou(te,e.selected,B);return V(B,te,Ae.IS_SELECTED,Ce)}function M(B,te,Ce){var q;const W=V(B,te,Ae.IS_OPEN),Y=R.has(Ce)?(q=R.get(Ce))==null?void 0:q[Ae.IS_OPEN]:!0;return W&&Y}function P(B,te,Ce){if(!g6(e,{data:B,attributes:Ce}))return!1;const Y=Ou(B,e.checked,te);return V(te,B,Ae.IS_CHECKED,Y)}function F(B){return!((B==null?void 0:B[Ae.IS_OPEN])??!1)}function z(B,te,Ce,W){return B[Ae.IS_INDETERMINATE]=(W[e.children]||[]).some(Y=>{var q;return!(((q=R.get(Y))==null?void 0:q[Ae.IS_CHECKED])??!1)}),!0}function H(B,te=0,Ce=null,W=null){const Y=B.length;for(let q=0;q<Y;q++){const re=B[q];if(Array.isArray(re))H(re,te,Ce,W);else if(typeof re=="object"&&re!==null){const Z=W!==null?`${W}-${q}`:`${q}`,se=`${I(re)}`,ge=!!(re[x]||[]).length;let le=V(se,re,Ae.IS_OPEN);e.autoOpenParentNode?le&&A(Ce,Ae.IS_OPEN,!0,F):le=M(se,re,Ce);const de={[Ae.DEPTH]:te,[Ae.INDEX]:T,[Ae.UUID]:se,[Ae.PARENT]:Ce,[Ae.HAS_CHILD]:ge,[Ae.PATH]:Z,[Ae.IS_ROOT]:Ce===null,[Ae.ORDER]:T,[Ae.IS_SELECTED]:L(se,re),[Ae.IS_MATCH]:V(se,re,Ae.IS_MATCH),[Ae.IS_OPEN]:le,[Ae.IS_CHECKED]:void 0,[Ae.IS_CACHED]:V(se,re,Ae.IS_CACHED),[Ae.IS_ASYNC]:V(se,re,Ae.IS_ASYNC),[Ae.IS_LOADING]:V(se,re,Ae.IS_LOADING),[Ae.IS_INDETERMINATE]:!1};de[Ae.IS_CHECKED]=P(re,se,de),de[Ae.IS_CHECKED]&&N.push(re),R.set(re,de),E.push(re),T+=1,Object.prototype.hasOwnProperty.call(re,x)&&H(re[x]||[],te+1,re,Z)}}}return H(b??S),e.showCheckbox!==!1&&e.checkStrictly&&(N==null||N.forEach(B=>{A(B,Ae.IS_CHECKED,!0,z)})),[E,R]},n=t(),r=new Map,i=[],s=[],l=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:c,deepAutoOpen:d}=f_(e,l),m=b=>{i.push(b)},h=(b,C,S=!0)=>{S&&r.has(b)&&r.delete(b),r.set(b,C)},f=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),p=b=>{const C=f(b);return C!==null&&Reflect.apply(C.fn,void 0,[]),(C==null?void 0:C.type)??"once"},g=()=>{Array.from(r.keys()).forEach(b=>{const C=r.get(b);if(Array.isArray(C)){const S=[];C.forEach((x,N)=>{p(x)==="once"&&S.unshift(N)}),S.length&&S.forEach(x=>C.splice(x,1)),C.length===0&&r.delete(b)}else p(C)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var S,x;const C=t(b[0],l.schema);l.data=C[0],l.schema=C[1],(S=e.async)!=null&&S.callback&&((x=e.async)==null?void 0:x.deepAutoOpen)==="every"&&d(),g()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{s.length=0,i.forEach(C=>{Reflect.apply(C,void 0,[b]),s.push(()=>Reflect.apply(C,void 0,[b]))}),h("afterSelectWatch",s)},{immediate:!0})});const w=b=>{h("afterDataUpdate",b)};return(_=e.async)!=null&&_.callback&&d(),{flatData:l,asyncNodeClick:c,deepAutoOpen:d,afterDataUpdate:w,registerNextLoop:h,onSelected:m}},wq=a.defineComponent({name:"Tree",props:sq,emits:iq,setup(e,t){const n=a.ref(),{flatData:r,onSelected:i,registerNextLoop:s}=bq(e),{checkNodeIsOpen:l,isRootNode:c,isNodeOpened:d,isNodeChecked:m,isNodeMatched:h,hasChildNode:f,getNodePath:p,getNodeId:g,getNodeAttr:w,getNodeById:_,getParentNode:b,getRootNodeList:C,getIntersectionResponse:S}=mf(r,e),{searchFn:x,isSearchActive:N,refSearch:E,isSearchDisabled:T,isTreeUI:R,showChildNodes:A}=yq(e),I=a.reactive([]),k=J=>{if(N.value){if(A){const G=`${p(J)??""}-`,ue=l(J),Se=h(J),oe=c(J);return ue?oe?Se:Se||I.some(we=>G.indexOf(`${we}-`)===0):!1}return l(J)&&h(J)}return l(J)},V=a.computed(()=>r.data.filter(J=>k(J))),{getLastVisibleElement:L,intersectionObserver:M}=lq(e),{renderTreeNode:P,handleTreeNodeClick:F,setOpen:z,setNodeAction:H,setSelect:B,asyncNodeClick:te,setNodeAttribute:Ce,isIndeterminate:W,deepUpdateChildNode:Y,updateParentChecked:q}=pq(e,t,r,V,{registerNextLoop:s}),re=Bl(120,()=>{I.length=0,r.data.forEach(J=>{const ie=x(d_(J,e),J);ie&&I.push(p(J)),Ce(J,[Ae.IS_MATCH],[ie],R.value&&ie)})});T||a.watch([E],()=>{re()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{de()})});const Z=(J,ie=!0,G=!1)=>{(oe=>{if(Array.isArray(oe))return oe.map(we=>typeof we=="string"||typeof we=="number"?_(we):we).filter(Boolean);if(typeof oe=="string"||typeof oe=="number"){const we=_(oe);return we?[we]:[]}return[oe].filter(Boolean)})(J).forEach(oe=>{const we=yl(oe);H(we,Ae.IS_CHECKED,ie),ie&&H(we,Ae.IS_INDETERMINATE,!1),e.checkStrictly&&(Y(we,[Ae.IS_CHECKED,Ae.IS_INDETERMINATE],[ie,!1]),q(we,ie))}),G&&t.emit(nr.NODE_CHECKED,r.data.filter(oe=>m(oe)),r.data.filter(oe=>W(oe)))};i(J=>{B(J,!0,e.autoOpenParentNode,!0)});const se=()=>{const J=ie=>(ie??[]).map(G=>{const ue=aq.cloneDeep(G);if(!ue)return ue;const Se=r.data.filter(oe=>b(oe)===G);return ue[e.children]=J(Se),ue});return J(C())},ge=J=>J?{data:se(),schema:r.schema,levelLineSchema:r.levelLineSchema}:r;a.watch(()=>[e.checked],()=>{r.data.forEach(J=>{(m(J)||W(J))&&(H(J,Ae.IS_CHECKED,!1),H(J,Ae.IS_INDETERMINATE,!1))}),Z(e.checked,!0)},{immediate:!0});const le=()=>{var J;(J=n.value)==null||J.reset()},de=J=>{if(J==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(J,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(G=>G[e.nodeKey]===J[e.nodeKey])+1});return}if(J.id!==void 0&&J.id!==null){n.value.fixToTop({index:V.value.findIndex(G=>G[e.nodeKey]===J.id)+1});return}if(J.index>=0){n.value.fixToTop({index:J.index});return}const ie=g(J);if(ie){n.value.fixToTop({index:V.value.findIndex(G=>g(G)===ie)+1});return}},pe=(J,ie=!0,G=!1)=>{Z(_(J),ie,G)};t.expose({handleTreeNodeClick:F,isNodeChecked:m,isRootNode:c,isNodeOpened:d,isNodeMatched:h,hasChildNode:f,setOpen:z,setChecked:Z,setCheckedById:pe,setNodeAction:H,setNodeOpened:z,setSelect:B,scrollToTop:de,asyncNodeClick:te,getData:ge,reset:le,getNodeAttr:w,getParentNode:b});const{renderEmpty:me}=oq(e);vq(e,t,n,r);const ee=J=>{var G,ue;if(J.length)return J.map(Se=>P(Se,!N.value||R.value));const ie=N.value?"search-empty":"empty";return((ue=(G=t.slots).empty)==null?void 0:ue.call(G))??me(ie)},X=([J,ie,G])=>{var ue,Se,oe,we;if(M.value.enabled&&J.offset.y>5){if(!e.virtualRender){const Ne=L(J.offset.y,n.value.refRoot),ae=S(Ne[0]);(Se=(ue=M.value)==null?void 0:ue.callback)==null||Se.call(ue,ae),t.emit(nr.NODE_ENTER_VIEW,ae);return}const Te=S(G.slice(-1)[0]);(we=(oe=M.value)==null?void 0:oe.callback)==null||we.call(oe,Te),t.emit(nr.NODE_ENTER_VIEW,Te);return}},{resolveClassName:j}=Re();return()=>a.createVNode(rc,{ref:n,style:cq(null,e),height:e.height,class:j("tree"),contentClassName:j("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:Ae.UUID,throttleDelay:0,onContentScroll:X},{default:J=>ee(J.data||[])})}}),h_=bt(wq),ts="upload";var Ya=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Ya||{}),v6=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(v6||{}),zs=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(zs||{});const qy=[Ya.BUTTON,Ya.DRAGGABLE,Ya.PICTURE],Gy=[v6.FORMDATA,v6.BINARY],Pr={type:{type:String,default:"formdata",validator:e=>!e||Gy.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Gy.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||qy.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${qy.join(" | ")}】`),!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,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function Ky(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Cq=a.defineComponent({name:"UploadList",props:{theme:Pr.theme,disabled:Pr.disabled,files:Pr.files,multiple:Pr.multiple,isShowPreview:Pr.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Ft("upload"),{resolveClassName:i}=Re(),{theme:s,disabled:l,multiple:c,isShowPreview:d}=a.toRefs(e),m=`${i(ts)}-list`,h=a.computed(()=>s.value===Ya.PICTURE),f=a.computed(()=>h.value&&!c.value),p=a.computed(()=>nt({[m]:!0,[`${m}--${s.value}`]:!0,[`${m}--disabled`]:l.value}));function g(T){const R=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(T)/Math.log(1024));return`${(T/1024**A).toFixed(2)}${R[A]}`}function w(T,R,A){n("preview",T,R,A)}function _(T,R){n("remove",T,R)}function b(T,R){n("retry",T,R)}const C=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${m}__item`},Ky(T=e.files.map(R=>{const A=nt({[`${m}__item`]:!0,[`${m}__item-picture`]:!0,[`${m}__item--${R.status}`]:!0});return a.createVNode("li",{key:R.uid,class:A},[t!=null&&t.file?t.file({file:R}):S(R)])}))?T:{default:()=>[T]})},S=T=>[a.withDirectives(a.createVNode("img",{class:`${m}__picture-item-thumbnail`,alt:"",src:T.url},null),[[a.vShow,T.status!=="uploading"]]),a.createVNode(a.Fragment,null,[T.status==="uploading"&&a.createVNode(Pl,{width:50,class:`${m}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:T.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${m}__picture-item-actions`},[d.value&&a.createVNode(Co,{class:"action-icon",onClick:R=>w(T,e.files,R)},null),a.createVNode(uo,{class:"action-icon",onClick:R=>_(T,R)},null)])])],x=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${m}__item`},Ky(T=e.files.map(R=>{const A=nt({[`${m}__item`]:!0,[`${m}__item--${R.status}`]:!0});return a.createVNode("li",{key:R.uid,class:A},[t!=null&&t.file?t.file({file:R}):E(R)])}))?T:{default:()=>[T]})},N=T=>{var L;const R=(L=T==null?void 0:T.raw)==null?void 0:L.type,[A]=(R==null?void 0:R.split("/"))||"";let k={text:Gs,image:Pd,application:Gs,video:Gd,audio:Sd}[A]||Gs;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(R)&&(k=Cd),a.h(k,{class:`${m}__item-file-icon`})},E=T=>[a.createVNode("div",{class:`${m}__item-icon`},[T.isPic?a.createVNode("img",{class:`${m}__item-thumbnail`,alt:"",src:T.url},null):N(T)]),a.createVNode("div",{class:`${m}__item-summary`},[a.createVNode("div",{class:`${m}__item-name`,title:T.name},[T.name]),T.status!=="uploading"&&a.createVNode("div",{class:`${m}__item-message`,title:T.statusText},[T.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${m}__item-message-success-icon`},null),T.statusText||r.value.uploadSuccess]),T.status==="fail"&&a.createVNode(a.Fragment,null,[T.statusText||r.value.uploadFailed])]),T.status==="uploading"&&a.createVNode(Pl,{class:`${m}__item-progress`,percent:T.percentage,showText:!1,size:"small"},null),T.status!=="fail"&&a.createVNode("div",{class:`${m}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${m}__item-speed-size`},[g(T.size)]),[[a.vShow,T.size]]),a.withDirectives(a.createVNode("span",{class:`${m}__item-speed-percentage`},[T.percentage,a.createTextVNode("%")]),[[a.vShow,T.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${m}__item-actions`},[T.status==="fail"&&a.createVNode(Hd,{class:`${m}__item-retry-icon`,onClick:R=>b(T,R)},null),a.createVNode(uo,{class:`${m}__item-del-icon`,onClick:R=>_(T,R)},null)])])];return()=>{var T,R,A;return a.createVNode(a.Fragment,null,[f.value?(R=t==null?void 0:t.innerTrigger)==null?void 0:R.call(t,(T=e.files)==null?void 0:T[0]):a.createVNode("ul",{class:p.value},[h.value?C():x(),(A=t==null?void 0:t.innerTrigger)==null?void 0:A.call(t)])])}}}),Yy=a.defineComponent({name:"UploadTrigger",props:{theme:Pr.theme,disabled:Pr.disabled,multiple:Pr.multiple,accept:Pr.accept,file:{type:Object},selectChange:Pr.selectChange,isShowPreview:Pr.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Ft("upload"),{resolveClassName:i}=Re(),{theme:s,disabled:l,file:c,multiple:d,accept:m,isShowPreview:h}=a.toRefs(e),f=`${i(ts)}-trigger`,p=a.computed(()=>s.value===Ya.BUTTON),g=a.computed(()=>s.value===Ya.DRAGGABLE),w=a.computed(()=>s.value===Ya.PICTURE),_=a.computed(()=>w.value&&!d.value),b=a.computed(()=>w.value&&!m.value?"image/png,image/jpeg,image/jpg":m.value),C=a.ref(null),S=a.computed(()=>{var z;return nt({[f]:!0,[`${f}--${s.value}`]:!0,[`${f}--single-picture`]:_.value,[`${f}--has-file`]:c.value??!1,[`${f}--${(z=c.value)==null?void 0:z.status}`]:c.value??!1,[`${f}--dragover`]:I.value,[`${f}--disabled`]:l.value})}),x=()=>{C.value.value=null,C.value.click()},N=z=>{var B;if(e.selectChange&&((B=e.selectChange)==null?void 0:B.call(e,z))===!1)return!1;const{files:H}=z.target;n("change",Array.from(H))},E=()=>{e.disabled||x()},T=z=>{z.defaultPrevented||z.target!==z.currentTarget||((z.code==="Enter"||z.code==="Space")&&x(),z.preventDefault())};function R(z,H){n("remove",z,H),H.stopPropagation(),H.preventDefault()}function A(z,H){n("preview",z,[z],H),H.stopPropagation(),H.preventDefault()}const I=a.ref(!1),k=()=>{const z=Ce=>{var Y;if(l.value)return;if(Ce.preventDefault(),I.value=!1,e.selectChange&&((Y=e.selectChange)==null?void 0:Y.call(e,Ce))===!1)return!1;const W=Array.from(Ce.dataTransfer.files);n("change",W)},H=Ce=>{Ce.preventDefault(),I.value=!0},B=()=>{I.value=!1},te=nt({[`${f}__draggable`]:!0});return a.createVNode("div",{class:te,onDragleave:B,onDragover:H,onDrop:z},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Il,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},V=()=>a.createVNode(a.Fragment,null,[_.value&&e.file?M(e.file):L()]),L=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(Zl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),M=z=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:z.url},null),[[a.vShow,z.status!=="uploading"]]),a.createVNode(a.Fragment,null,[z.status==="uploading"&&a.createVNode(Pl,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:z.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[h.value&&a.createVNode(Co,{class:"action-icon",onClick:H=>A(z,H)},null),a.createVNode(uo,{class:"action-icon",onClick:H=>R(z,H)},null)])])],P=()=>a.createVNode(vn,{disabled:l.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Il,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),F=()=>{if(p.value)return P();if(g.value)return k();if(w.value)return V()};return()=>{var z;return a.createVNode("div",{class:S.value,tabindex:"0",onClick:E,onKeydown:T},[t.trigger?[t.trigger(),(z=t==null?void 0:t.default)==null?void 0:z.call(t)]:F(),a.createVNode("input",{ref:C,class:`${f}__input-file`,accept:b.value,disabled:l.value,multiple:d.value,tabindex:"-1",type:"file",onChange:N},null)])}}});var P3={exports:{}},Xy;function _q(){return Xy||(Xy=1,(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(C,S){var x=C[0],N=C[1],E=C[2],T=C[3];x+=(N&E|~N&T)+S[0]-680876936|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[1]-389564586|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[2]+606105819|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[3]-1044525330|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[4]-176418897|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[5]+1200080426|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[6]-1473231341|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[7]-45705983|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[8]+1770035416|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[9]-1958414417|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[10]-42063|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[11]-1990404162|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[12]+1804603682|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[13]-40341101|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[14]-1502002290|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[15]+1236535329|0,N=(N<<22|N>>>10)+E|0,x+=(N&T|E&~T)+S[1]-165796510|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[6]-1069501632|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[11]+643717713|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[0]-373897302|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[5]-701558691|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[10]+38016083|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[15]-660478335|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[4]-405537848|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[9]+568446438|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[14]-1019803690|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[3]-187363961|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[8]+1163531501|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[13]-1444681467|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[2]-51403784|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[7]+1735328473|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[12]-1926607734|0,N=(N<<20|N>>>12)+E|0,x+=(N^E^T)+S[5]-378558|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[8]-2022574463|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[11]+1839030562|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[14]-35309556|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[1]-1530992060|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[4]+1272893353|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[7]-155497632|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[10]-1094730640|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[13]+681279174|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[0]-358537222|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[3]-722521979|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[6]+76029189|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[9]-640364487|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[12]-421815835|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[15]+530742520|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[2]-995338651|0,N=(N<<23|N>>>9)+E|0,x+=(E^(N|~T))+S[0]-198630844|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[7]+1126891415|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[14]-1416354905|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[5]-57434055|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[12]+1700485571|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[3]-1894986606|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[10]-1051523|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[1]-2054922799|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[8]+1873313359|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[15]-30611744|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[6]-1560198380|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[13]+1309151649|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[4]-145523070|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[11]-1120210379|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[2]+718787259|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[9]-343485551|0,N=(N<<21|N>>>11)+E|0,C[0]=x+C[0]|0,C[1]=N+C[1]|0,C[2]=E+C[2]|0,C[3]=T+C[3]|0}function s(C){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=C.charCodeAt(x)+(C.charCodeAt(x+1)<<8)+(C.charCodeAt(x+2)<<16)+(C.charCodeAt(x+3)<<24);return S}function l(C){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=C[x]+(C[x+1]<<8)+(C[x+2]<<16)+(C[x+3]<<24);return S}function c(C){var S=C.length,x=[1732584193,-271733879,-1732584194,271733878],N,E,T,R,A,I;for(N=64;N<=S;N+=64)i(x,s(C.substring(N-64,N)));for(C=C.substring(N-64),E=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N=0;N<E;N+=1)T[N>>2]|=C.charCodeAt(N)<<(N%4<<3);if(T[N>>2]|=128<<(N%4<<3),N>55)for(i(x,T),N=0;N<16;N+=1)T[N]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),A=parseInt(R[2],16),I=parseInt(R[1],16)||0,T[14]=A,T[15]=I,i(x,T),x}function d(C){var S=C.length,x=[1732584193,-271733879,-1732584194,271733878],N,E,T,R,A,I;for(N=64;N<=S;N+=64)i(x,l(C.subarray(N-64,N)));for(C=N-64<S?C.subarray(N-64):new Uint8Array(0),E=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N=0;N<E;N+=1)T[N>>2]|=C[N]<<(N%4<<3);if(T[N>>2]|=128<<(N%4<<3),N>55)for(i(x,T),N=0;N<16;N+=1)T[N]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),A=parseInt(R[2],16),I=parseInt(R[1],16)||0,T[14]=A,T[15]=I,i(x,T),x}function m(C){var S="",x;for(x=0;x<4;x+=1)S+=r[C>>x*8+4&15]+r[C>>x*8&15];return S}function h(C){var S;for(S=0;S<C.length;S+=1)C[S]=m(C[S]);return C.join("")}h(c("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function C(S,x){return S=S|0||0,S<0?Math.max(S+x,0):Math.min(S,x)}ArrayBuffer.prototype.slice=function(S,x){var N=this.byteLength,E=C(S,N),T=N,R,A,I,k;return x!==n&&(T=C(x,N)),E>T?new ArrayBuffer(0):(R=T-E,A=new ArrayBuffer(R),I=new Uint8Array(A),k=new Uint8Array(this,E,R),I.set(k),A)}})();function f(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function p(C,S){var x=C.length,N=new ArrayBuffer(x),E=new Uint8Array(N),T;for(T=0;T<x;T+=1)E[T]=C.charCodeAt(T);return S?E:N}function g(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function w(C,S,x){var N=new Uint8Array(C.byteLength+S.byteLength);return N.set(new Uint8Array(C)),N.set(new Uint8Array(S),C.byteLength),N}function _(C){var S=[],x=C.length,N;for(N=0;N<x-1;N+=2)S.push(parseInt(C.substr(N,2),16));return String.fromCharCode.apply(String,S)}function b(){this.reset()}return b.prototype.append=function(C){return this.appendBinary(f(C)),this},b.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var S=this._buff.length,x;for(x=64;x<=S;x+=64)i(this._hash,s(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},b.prototype.end=function(C){var S=this._buff,x=S.length,N,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(N=0;N<x;N+=1)E[N>>2]|=S.charCodeAt(N)<<(N%4<<3);return this._finish(E,x),T=h(this._hash),C&&(T=_(T)),this.reset(),T},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(C,S){var x=S,N,E,T;if(C[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,C),x=0;x<16;x+=1)C[x]=0;N=this._length*8,N=N.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(N[2],16),T=parseInt(N[1],16)||0,C[14]=E,C[15]=T,i(this._hash,C)},b.hash=function(C,S){return b.hashBinary(f(C),S)},b.hashBinary=function(C,S){var x=c(C),N=h(x);return S?_(N):N},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(C){var S=w(this._buff.buffer,C),x=S.length,N;for(this._length+=C.byteLength,N=64;N<=x;N+=64)i(this._hash,l(S.subarray(N-64,N)));return this._buff=N-64<x?new Uint8Array(S.buffer.slice(N-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(C){var S=this._buff,x=S.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,T;for(E=0;E<x;E+=1)N[E>>2]|=S[E]<<(E%4<<3);return this._finish(N,x),T=h(this._hash),C&&(T=_(T)),this.reset(),T},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var C=b.prototype.getState.call(this);return C.buff=g(C.buff),C},b.ArrayBuffer.prototype.setState=function(C){return C.buff=p(C.buff,!0),b.prototype.setState.call(this,C)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(C,S){var x=d(new Uint8Array(C)),N=h(x);return S?_(N):N},b})})(P3)),P3.exports}var Nq=_q();const Jy=bn(Nq),Oi="An error occurred during upload";function Sl(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const xq=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,i=r==="formdata";t.upload&&t.upload.addEventListener("progress",c=>{const d=c;d.percent=c.total>0?c.loaded/c.total*100:0,e.onProgress(d)});const s=new FormData;if(i&&e.data){let c=e.data;Array.isArray(c)||(c=[c]),c.forEach(d=>{for(const[m,h]of Object.entries(d))Array.isArray(h)?s.append(m,...h):s.append(m,h)})}if(i&&e.formDataAttributes){let c=e.formDataAttributes;Array.isArray(c)||(c=[c]),c.forEach(d=>{Array.isArray(d.value)?s.append(d.name,...d.value):s.append(d.name,d.value)})}if(i&&s.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let c=new Error(Oi);const d=Sl(t);d&&(c=new Error(d.message||Oi)),console.log(d,c),e.onError(c)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const c=Sl(t);let d=new Error(Oi);return c&&(d=new Error(c.message||Oi)),e.onError(d)}e.onSuccess(Sl(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(c=>{const d=c.name,m=c.value;t.setRequestHeader(d,m)});else{const c=e.header.name,d=e.header.value;t.setRequestHeader(c,d)}const l=e.headers||{};if(l instanceof Headers)l.forEach((c,d)=>t.setRequestHeader(d,c));else for(const[c,d]of Object.entries(l))tb(d)||t.setRequestHeader(c,String(d));return t.send(i?s:e.file),t},m_=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,Sq=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),i=await Eq(n,t),s=[];Tq(e,n,r,i,s,t),await Promise.all(s).then(()=>{const l={size:n.size,name:n.name,total:r,hash:i},c=new XMLHttpRequest;c.open(e.method,e.mergeUrl,!0),c.onreadystatechange=()=>{if(c.readyState===4){const d=Sl(c);if(c.status<200||c.status>=300){let m=new Error(Oi);return d&&(m=new Error(d.message||Oi)),e.onError(m)}e.onSuccess(d)}},c.onloadend=()=>{e.onComplete()},c.setRequestHeader("Content-type","application/JSON"),c.send(JSON.stringify(l))})},Tq=(e,t,n,r,i,s)=>{for(let l=0;l<n;l++){const c=new Promise((d,m)=>{const h=l*s,f=Math.min(t.size,h+s),p=new FormData;if(e.data){let _=e.data;Array.isArray(_)||(_=[_]),_.forEach(b=>{for(const[C,S]of Object.entries(b))Array.isArray(S)?p.append(C,...S):p.append(C,S)})}if(e.formDataAttributes){let _=e.formDataAttributes;Array.isArray(_)||(_=[_]),_.forEach(b=>{Array.isArray(b.value)?p.append(b.name,...b.value):p.append(b.name,b.value)})}p.append("file",m_.call(t,h,f)),p.append("name",t.name),p.append("total",n.toString()),p.append("index",l.toString()),p.append("size",t.size.toString()),p.append("hash",r.toString());const g=new XMLHttpRequest;if(g.onreadystatechange=()=>{if(g.readyState===4){const _=Sl(g);if(g.status<200||g.status>=300){m(_);let b=new Error(Oi);_&&(b=new Error(_.message||Oi)),e.onError(b)}else d("reponseText")}},g.upload.addEventListener("progress",_=>{const b=_;e.onProgress(b,l)},!1),e.withCredentials&&"withCredentials"in g&&(g.withCredentials=!0),g.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(_=>{const b=_.name,C=_.value;g.setRequestHeader(b,C)});else{const _=e.header.name,b=e.header.value;g.setRequestHeader(_,b)}const w=e.headers||{};if(w instanceof Headers)w.forEach((_,b)=>g.setRequestHeader(b,_));else for(const[_,b]of Object.entries(w))tb(b)||g.setRequestHeader(_,String(b));g.send(p)});i.push(c)}},Eq=(e,t)=>new Promise((n,r)=>{const i=Math.ceil(e.size/t);let s=0;const l=new Jy.ArrayBuffer,c=new FileReader;function d(){const m=s*t,h=m+t>=e.size?e.size:m+t;c.readAsArrayBuffer(m_.call(e,m,h))}c.onload=m=>{if(l.append(m.target.result),s+=1,s<i)d();else{const h=l.end(),f=new Jy;f.append(h),f.append(e.name);const p=f.end();n(p)}},c.onerror=()=>{r(new Error("File slice failed"))},d()}).catch(n=>{console.log(n)});function Zy(e){return Date.now()+e}const Oq=(e,t)=>{const n=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),r=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),i=a.ref([]);function s(p){return i.value.find(g=>g.uid===p.uid)}let l=0;function c(p){var b;l+=1,p.uid=Zy(l);const g={uid:p.uid,name:p.name,status:zs.NEW,size:p.size,raw:p},w=p.type.startsWith("image/");let _=null;if(w){try{g.url=window.URL.createObjectURL(p)}catch(C){console.error(C)}g.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(g.name))&&(g.status=zs.FAIL,g.statusText="invalid filename",_=new Error(g.statusText)),w&&p.size>n.value*1024**2&&(g.status=zs.FAIL,g.statusText="invalid file size",_=new Error(g.statusText)),!w&&p.size>r.value*1024**2&&(g.status=zs.FAIL,g.statusText="invalid file size",_=new Error(g.statusText)),i.value.push(g),_}async function d(p){var _;const g=p instanceof File?s(p):p,w=b=>{var C;t.onRemove(b,i.value),i.value.splice(i.value.indexOf(g),1),(C=b.url)!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((_=e.beforeRemove)==null?void 0:_.call(e,g,i.value))!==!1&&w(g):w(g)}async function m(p,g,w){const _=s(g);_&&(_.status="fail",_.statusText=p.message,_.response=w)}async function h(p,g){const w=s(g);w&&(w.status="success",w.response=p)}async function f(p,g){const w=s(g);w&&(w.status="uploading",w.percentage=Math.round(p.percent))}return a.watch(()=>e.files,p=>{i.value=p.map(g=>(l+=1,{...g,uid:g.uid??Zy(l),status:g.status??zs.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:i,handlePreprocess:c,handleRemove:d,handleError:m,handleSuccess:h,handleProgress:f}},Aq=a.defineComponent({name:"Upload",props:Pr,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:i}=Re(),s=a.shallowRef({}),l=a.computed(()=>e.theme===Ya.PICTURE),c=a.computed(()=>l.value&&!e.multiple),d=a.computed(()=>nt({[`${i(ts)}`]:!0,[`${i(ts)}--${e.theme}`]:!0,[`${i(ts)}--disabled`]:e.disabled,[`${i(ts)}--single-picture`]:c.value,[e.extCls]:e.extCls??!1})),m=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function h(R,A){T(R),n("delete",R,A)}const{fileList:f,handlePreprocess:p,handleRemove:g,handleProgress:w,handleSuccess:_,handleError:b}=Oq(e,{onRemove:h});function C(R){if(!R.length)return;if(e.limit>1&&f.value.length+R.length>e.limit){n("exceed",R,f.value);return}!e.multiple&&e.limit===1&&(f.value=[]);let A=R;(!e.multiple||e.limit===1)&&(A=R.slice(0,1));for(const I of A){const k=I,V=p(k);if(V){n("error",k,f.value,V);return}e.autoUpload&&N(k,A)}}function S(R,A){n("preview",R,A)}function x(R){E(R.raw)}async function N(R,A){var k;if(!e.beforeUpload)return E(R,A);let I;try{I=await((k=e.beforeUpload)==null?void 0:k.call(e,R,A))}catch{I=!1}if(I===!1){g(R);return}E(R,A)}function E(R,A){const{type:I,headers:k,header:V,data:L,formDataAttributes:M,method:P,withCredentials:F,name:z,url:H,sliceUrl:B,mergeUrl:te,chunkSize:Ce,customRequest:W}=e,{uid:Y}=R,q={type:I,headers:k,header:V,withCredentials:F,file:R,data:L,formDataAttributes:M,method:P,filename:z,action:H,sliceUrl:B,mergeUrl:te,chunkSize:Ce,onProgress:se=>{w(se,R),n("progress",se,R,f.value)},onSuccess:se=>{var le;const ge=se;if((le=e==null?void 0:e.handleResCode)!=null&&le.call(e,ge))_(se,R),n("success",se,R,f.value);else{const de=new Error((ge==null?void 0:ge.message)||"unknow error");b(de,R,se),n("error",R,f.value,de)}delete s.value[Y]},onError:se=>{b(se,R),n("error",R,f.value,se),delete s.value[Y]},onComplete:()=>{A&&A.indexOf(R)===A.length-1&&n("done",f.value)}};let re=e.sliceUpload?Sq:xq;W&&(re=W);const Z=re(q);s.value[Y]=Z,Z instanceof Promise&&Z.then(q.onSuccess,q.onError)}function T(R){let A=s.value;R&&(A={[R.uid]:s.value[R.uid]}),Object.keys(A).forEach(I=>{if(A[I]instanceof XMLHttpRequest){const k=A[I];k==null||k.abort()}delete s.value[I]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:R})=>{R!=null&&R.startsWith("blob:")&&URL.revokeObjectURL(R)})}),r({handlePreview:S,handleRemove:g,handleRetry:x}),()=>a.createVNode("div",{class:d.value},[!l.value&&a.createVNode(Yy,a.mergeProps(m.value,{onChange:C}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${i(ts)}__tip`},[e.tip]),a.createVNode(Cq,{disabled:e.disabled,files:f.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:S,onRemove:g,onRetry:x},{innerTrigger:R=>l.value&&a.createVNode(Yy,a.mergeProps(m.value,{file:R,onChange:C,onPreview:S,onRemove:g}),t),file:t.file})])}}),p_=bt(Aq),$3=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:_9,Affix:Jb,Alert:Qb,AnimateNumber:e7,Backtop:t7,Badge:n7,Breadcrumb:a7,Button:vn,Card:T7,Cascader:lw,Checkbox:Bn,CodeDiff:gw,Collapse:yw,ColorPicker:Fw,ConfigProvider:Xb,Container:Hw,DatePicker:Mw,Dialog:zw,Divider:Uw,Dropdown:Ww,Exception:cf,FixedNavbar:jw,Form:Gw,InfoBox:Yw,Input:Di,Link:Jw,Loading:Ka,Menu:Qw,Message:oC,Modal:ic,Navigation:lC,Notify:uC,OverflowTitle:S9,Pagination:j9,PopConfirm:dC,Popover:sr,Popover2:fC,Process:hC,Progress:Pl,Radio:ju,Rate:vC,ResizeLayout:yC,SearchSelect:AC,Select:A9,Sideslider:DC,Slider:RC,Steps:VC,Swiper:MC,Switcher:kC,Tab:HC,Table:r_,Tag:Ml,TagInput:rw,TimePicker:a_,Timeline:i_,Transfer:s_,Tree:h_,Upload:p_,VirtualRender:rc,scrollbar:_C},Symbol.toStringTag,{value:"Module"})),Qy=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys($3).forEach(i=>{const s=$3[i];"install"in s?t.use(s,{prefix:r}):t.component(r+i,$3[i])}),n&&$6(n,t)},Lq={createInstall:Qy,install:Qy()},g_="2.0.2-beta.96";window.__bkui_vue_version__=g_;exports.$bkPopover=_9;exports.Affix=Jb;exports.Alert=Qb;exports.AnimateNumber=e7;exports.Backtop=t7;exports.Badge=n7;exports.Breadcrumb=a7;exports.Button=vn;exports.Card=T7;exports.Cascader=lw;exports.Checkbox=Bn;exports.CodeDiff=gw;exports.Collapse=yw;exports.ColorPicker=Fw;exports.ConfigProvider=Xb;exports.Container=Hw;exports.DatePicker=Mw;exports.Dialog=zw;exports.Divider=Uw;exports.Dropdown=Ww;exports.Exception=cf;exports.FixedNavbar=jw;exports.Form=Gw;exports.InfoBox=Yw;exports.Input=Di;exports.Link=Jw;exports.Loading=Ka;exports.Menu=Qw;exports.Message=oC;exports.Modal=ic;exports.Navigation=lC;exports.Notify=uC;exports.OverflowTitle=S9;exports.Pagination=j9;exports.PopConfirm=dC;exports.Popover=sr;exports.Popover2=fC;exports.Process=hC;exports.Progress=Pl;exports.Radio=ju;exports.Rate=vC;exports.ResizeLayout=yC;exports.SearchSelect=AC;exports.Select=A9;exports.Sideslider=DC;exports.Slider=RC;exports.Steps=VC;exports.Swiper=MC;exports.Switcher=kC;exports.Tab=HC;exports.Table=r_;exports.Tag=Ml;exports.TagInput=rw;exports.TimePicker=a_;exports.Timeline=i_;exports.Transfer=s_;exports.Tree=h_;exports.Upload=p_;exports.VirtualRender=rc;exports.bkEllipsis=rM;exports.bkEllipsisInstance=N9;exports.bkLoading=s7;exports.bkTooltips=sa;exports.clickoutside=Za;exports.default=Lq;exports.defaultRootConfig=ds;exports.mousewheel=hM;exports.overflowTitle=CM;exports.provideGlobalConfig=$6;exports.rootProviderKey=oo;exports.scrollbar=_C;exports.setPrefixVariable=W3;exports.useGlobalConfig=zD;exports.useLocale=Ft;exports.usePrefix=Re;exports.version=g_;
|
|
389
|
+
}`;var _t=tg(function(){return kt(U,Ze+"return "+Pe).apply(n,Q)});if(_t.source=Pe,m0(_t))throw _t;return _t}function tO(o){return $t(o).toLowerCase()}function nO(o){return $t(o).toUpperCase()}function rO(o,u,v){if(o=$t(o),o&&(v||u===n))return um(o);if(!o||!(u=fr(u)))return o;var O=Wr(o),D=Wr(u),U=dm(O,D),Q=fm(O,D)+1;return hi(O,U,Q).join("")}function aO(o,u,v){if(o=$t(o),o&&(v||u===n))return o.slice(0,mm(o)+1);if(!o||!(u=fr(u)))return o;var O=Wr(o),D=fm(O,Wr(u))+1;return hi(O,0,D).join("")}function iO(o,u,v){if(o=$t(o),o&&(v||u===n))return o.replace(fn,"");if(!o||!(u=fr(u)))return o;var O=Wr(o),D=dm(O,Wr(u));return hi(O,D).join("")}function sO(o,u){var v=k,O=V;if(Qt(u)){var D="separator"in u?u.separator:D;v="length"in u?Ct(u.length):v,O="omission"in u?fr(u.omission):O}o=$t(o);var U=o.length;if(Ss(o)){var Q=Wr(o);U=Q.length}if(v>=U)return o;var ce=v-Ts(O);if(ce<1)return O;var ye=Q?hi(Q,0,ce).join(""):o.slice(0,ce);if(D===n)return ye+O;if(Q&&(ce+=ye.length-ce),p0(D)){if(o.slice(ce).search(D)){var Ie,Me=ye;for(D.global||(D=Df(D.source,$t(oa.exec(D))+"g")),D.lastIndex=0;Ie=D.exec(Me);)var Pe=Ie.index;ye=ye.slice(0,Pe===n?ce:Pe)}}else if(o.indexOf(fr(D),ce)!=ce){var Ge=ye.lastIndexOf(D);Ge>-1&&(ye=ye.slice(0,Ge))}return ye+O}function oO(o){return o=$t(o),o&&dt.test(o)?o.replace(wt,k_):o}var lO=Is(function(o,u,v){return o+(v?" ":"")+u.toUpperCase()}),y0=np("toUpperCase");function eg(o,u,v){return o=$t(o),u=v?n:u,u===n?D_(o)?F_(o):__(o):o.match(u)||[]}var tg=Nt(function(o,u){try{return ur(o,n,u)}catch(v){return m0(v)?v:new mt(v)}}),cO=$a(function(o,u){return Or(u,function(v){v=ha(v),ka(o,v,f0(o[v],o))}),o});function uO(o){var u=o==null?0:o.length,v=ot();return o=u?Yt(o,function(O){if(typeof O[1]!="function")throw new Ar(l);return[v(O[0]),O[1]]}):[],Nt(function(O){for(var D=-1;++D<u;){var U=o[D];if(ur(U[0],this,O))return ur(U[1],this,O)}})}function dO(o){return kN(Dr(o,f))}function b0(o){return function(){return o}}function fO(o,u){return o==null||o!==o?u:o}var hO=ap(),mO=ap(!0);function Qn(o){return o}function w0(o){return Vm(typeof o=="function"?o:Dr(o,f))}function pO(o){return km(Dr(o,f))}function gO(o,u){return Pm(o,Dr(u,f))}var vO=Nt(function(o,u){return function(v){return Fo(v,o,u)}}),yO=Nt(function(o,u){return function(v){return Fo(o,v,u)}});function C0(o,u,v){var O=_n(u),D=Dc(u,O);v==null&&!(Qt(u)&&(D.length||!O.length))&&(v=u,u=o,o=this,D=Dc(u,_n(u)));var U=!(Qt(v)&&"chain"in v)||!!v.chain,Q=Ha(o);return Or(D,function(ce){var ye=u[ce];o[ce]=ye,Q&&(o.prototype[ce]=function(){var Ie=this.__chain__;if(U||Ie){var Me=o(this.__wrapped__),Pe=Me.__actions__=Xn(this.__actions__);return Pe.push({func:ye,args:arguments,thisArg:o}),Me.__chain__=Ie,Me}return ye.apply(o,oi([this.value()],arguments))})}),o}function bO(){return on._===this&&(on._=j_),this}function _0(){}function wO(o){return o=Ct(o),Nt(function(u){return $m(u,o)})}var CO=Qf(Yt),_O=Qf(im),NO=Qf(xf);function ng(o){return s0(o)?Sf(ha(o)):QN(o)}function xO(o){return function(u){return o==null?n:ji(o,u)}}var SO=sp(),TO=sp(!0);function N0(){return[]}function x0(){return!1}function EO(){return{}}function OO(){return""}function AO(){return!0}function LO(o,u){if(o=Ct(o),o<1||o>B)return[];var v=W,O=An(o,W);u=ot(u),o-=W;for(var D=Of(O,u);++v<o;)u(v);return D}function DO(o){return yt(o)?Yt(o,ha):hr(o)?[o]:Xn(_p($t(o)))}function RO(o){var u=++U_;return $t(o)+u}var IO=Pc(function(o,u){return o+u},0),VO=e0("ceil"),MO=Pc(function(o,u){return o/u},1),kO=e0("floor");function PO(o){return o&&o.length?Lc(o,Qn,Ff):n}function $O(o,u){return o&&o.length?Lc(o,ot(u,2),Ff):n}function FO(o){return lm(o,Qn)}function HO(o,u){return lm(o,ot(u,2))}function BO(o){return o&&o.length?Lc(o,Qn,Uf):n}function zO(o,u){return o&&o.length?Lc(o,ot(u,2),Uf):n}var UO=Pc(function(o,u){return o*u},1),WO=e0("round"),jO=Pc(function(o,u){return o-u},0);function qO(o){return o&&o.length?Ef(o,Qn):0}function GO(o,u){return o&&o.length?Ef(o,ot(u,2)):0}return $.after=pT,$.ary=Ip,$.assign=nE,$.assignIn=Gp,$.assignInWith=Xc,$.assignWith=rE,$.at=aE,$.before=Vp,$.bind=f0,$.bindAll=cO,$.bindKey=Mp,$.castArray=ET,$.chain=Lp,$.chunk=kx,$.compact=Px,$.concat=$x,$.cond=uO,$.conforms=dO,$.constant=b0,$.countBy=qS,$.create=iE,$.curry=kp,$.curryRight=Pp,$.debounce=$p,$.defaults=sE,$.defaultsDeep=oE,$.defer=gT,$.delay=vT,$.difference=Fx,$.differenceBy=Hx,$.differenceWith=Bx,$.drop=zx,$.dropRight=Ux,$.dropRightWhile=Wx,$.dropWhile=jx,$.fill=qx,$.filter=KS,$.flatMap=JS,$.flatMapDeep=ZS,$.flatMapDepth=QS,$.flatten=Tp,$.flattenDeep=Gx,$.flattenDepth=Kx,$.flip=yT,$.flow=hO,$.flowRight=mO,$.fromPairs=Yx,$.functions=mE,$.functionsIn=pE,$.groupBy=eT,$.initial=Jx,$.intersection=Zx,$.intersectionBy=Qx,$.intersectionWith=eS,$.invert=vE,$.invertBy=yE,$.invokeMap=nT,$.iteratee=w0,$.keyBy=rT,$.keys=_n,$.keysIn=Zn,$.map=Wc,$.mapKeys=wE,$.mapValues=CE,$.matches=pO,$.matchesProperty=gO,$.memoize=qc,$.merge=_E,$.mergeWith=Kp,$.method=vO,$.methodOf=yO,$.mixin=C0,$.negate=Gc,$.nthArg=wO,$.omit=NE,$.omitBy=xE,$.once=bT,$.orderBy=aT,$.over=CO,$.overArgs=wT,$.overEvery=_O,$.overSome=NO,$.partial=h0,$.partialRight=Fp,$.partition=iT,$.pick=SE,$.pickBy=Yp,$.property=ng,$.propertyOf=xO,$.pull=aS,$.pullAll=Op,$.pullAllBy=iS,$.pullAllWith=sS,$.pullAt=oS,$.range=SO,$.rangeRight=TO,$.rearg=CT,$.reject=lT,$.remove=lS,$.rest=_T,$.reverse=u0,$.sampleSize=uT,$.set=EE,$.setWith=OE,$.shuffle=dT,$.slice=cS,$.sortBy=mT,$.sortedUniq=gS,$.sortedUniqBy=vS,$.split=JE,$.spread=NT,$.tail=yS,$.take=bS,$.takeRight=wS,$.takeRightWhile=CS,$.takeWhile=_S,$.tap=PS,$.throttle=xT,$.thru=Uc,$.toArray=Wp,$.toPairs=Xp,$.toPairsIn=Jp,$.toPath=DO,$.toPlainObject=qp,$.transform=AE,$.unary=ST,$.union=NS,$.unionBy=xS,$.unionWith=SS,$.uniq=TS,$.uniqBy=ES,$.uniqWith=OS,$.unset=LE,$.unzip=d0,$.unzipWith=Ap,$.update=DE,$.updateWith=RE,$.values=ks,$.valuesIn=IE,$.without=AS,$.words=eg,$.wrap=TT,$.xor=LS,$.xorBy=DS,$.xorWith=RS,$.zip=IS,$.zipObject=VS,$.zipObjectDeep=MS,$.zipWith=kS,$.entries=Xp,$.entriesIn=Jp,$.extend=Gp,$.extendWith=Xc,C0($,$),$.add=IO,$.attempt=tg,$.camelCase=PE,$.capitalize=Zp,$.ceil=VO,$.clamp=VE,$.clone=OT,$.cloneDeep=LT,$.cloneDeepWith=DT,$.cloneWith=AT,$.conformsTo=RT,$.deburr=Qp,$.defaultTo=fO,$.divide=MO,$.endsWith=$E,$.eq=qr,$.escape=FE,$.escapeRegExp=HE,$.every=GS,$.find=YS,$.findIndex=xp,$.findKey=lE,$.findLast=XS,$.findLastIndex=Sp,$.findLastKey=cE,$.floor=kO,$.forEach=Dp,$.forEachRight=Rp,$.forIn=uE,$.forInRight=dE,$.forOwn=fE,$.forOwnRight=hE,$.get=g0,$.gt=IT,$.gte=VT,$.has=gE,$.hasIn=v0,$.head=Ep,$.identity=Qn,$.includes=tT,$.indexOf=Xx,$.inRange=ME,$.invoke=bE,$.isArguments=Ki,$.isArray=yt,$.isArrayBuffer=MT,$.isArrayLike=Jn,$.isArrayLikeObject=ln,$.isBoolean=kT,$.isBuffer=mi,$.isDate=PT,$.isElement=$T,$.isEmpty=FT,$.isEqual=HT,$.isEqualWith=BT,$.isError=m0,$.isFinite=zT,$.isFunction=Ha,$.isInteger=Hp,$.isLength=Kc,$.isMap=Bp,$.isMatch=UT,$.isMatchWith=WT,$.isNaN=jT,$.isNative=qT,$.isNil=KT,$.isNull=GT,$.isNumber=zp,$.isObject=Qt,$.isObjectLike=nn,$.isPlainObject=jo,$.isRegExp=p0,$.isSafeInteger=YT,$.isSet=Up,$.isString=Yc,$.isSymbol=hr,$.isTypedArray=Ms,$.isUndefined=XT,$.isWeakMap=JT,$.isWeakSet=ZT,$.join=tS,$.kebabCase=BE,$.last=Ir,$.lastIndexOf=nS,$.lowerCase=zE,$.lowerFirst=UE,$.lt=QT,$.lte=eE,$.max=PO,$.maxBy=$O,$.mean=FO,$.meanBy=HO,$.min=BO,$.minBy=zO,$.stubArray=N0,$.stubFalse=x0,$.stubObject=EO,$.stubString=OO,$.stubTrue=AO,$.multiply=UO,$.nth=rS,$.noConflict=bO,$.noop=_0,$.now=jc,$.pad=WE,$.padEnd=jE,$.padStart=qE,$.parseInt=GE,$.random=kE,$.reduce=sT,$.reduceRight=oT,$.repeat=KE,$.replace=YE,$.result=TE,$.round=WO,$.runInContext=ve,$.sample=cT,$.size=fT,$.snakeCase=XE,$.some=hT,$.sortedIndex=uS,$.sortedIndexBy=dS,$.sortedIndexOf=fS,$.sortedLastIndex=hS,$.sortedLastIndexBy=mS,$.sortedLastIndexOf=pS,$.startCase=ZE,$.startsWith=QE,$.subtract=jO,$.sum=qO,$.sumBy=GO,$.template=eO,$.times=LO,$.toFinite=Ba,$.toInteger=Ct,$.toLength=jp,$.toLower=tO,$.toNumber=Vr,$.toSafeInteger=tE,$.toString=$t,$.toUpper=nO,$.trim=rO,$.trimEnd=aO,$.trimStart=iO,$.truncate=sO,$.unescape=oO,$.uniqueId=RO,$.upperCase=lO,$.upperFirst=y0,$.each=Dp,$.eachRight=Rp,$.first=Ep,C0($,(function(){var o={};return da($,function(u,v){Pt.call($.prototype,v)||(o[v]=u)}),o})(),{chain:!1}),$.VERSION=r,Or(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){$[o].placeholder=$}),Or(["drop","take"],function(o,u){At.prototype[o]=function(v){v=v===n?1:gn(Ct(v),0);var O=this.__filtered__&&!u?new At(this):this.clone();return O.__filtered__?O.__takeCount__=An(v,O.__takeCount__):O.__views__.push({size:An(v,W),type:o+(O.__dir__<0?"Right":"")}),O},At.prototype[o+"Right"]=function(v){return this.reverse()[o](v).reverse()}}),Or(["filter","map","takeWhile"],function(o,u){var v=u+1,O=v==P||v==z;At.prototype[o]=function(D){var U=this.clone();return U.__iteratees__.push({iteratee:ot(D,3),type:v}),U.__filtered__=U.__filtered__||O,U}}),Or(["head","last"],function(o,u){var v="take"+(u?"Right":"");At.prototype[o]=function(){return this[v](1).value()[0]}}),Or(["initial","tail"],function(o,u){var v="drop"+(u?"":"Right");At.prototype[o]=function(){return this.__filtered__?new At(this):this[v](1)}}),At.prototype.compact=function(){return this.filter(Qn)},At.prototype.find=function(o){return this.filter(o).head()},At.prototype.findLast=function(o){return this.reverse().find(o)},At.prototype.invokeMap=Nt(function(o,u){return typeof o=="function"?new At(this):this.map(function(v){return Fo(v,o,u)})}),At.prototype.reject=function(o){return this.filter(Gc(ot(o)))},At.prototype.slice=function(o,u){o=Ct(o);var v=this;return v.__filtered__&&(o>0||u<0)?new At(v):(o<0?v=v.takeRight(-o):o&&(v=v.drop(o)),u!==n&&(u=Ct(u),v=u<0?v.dropRight(-u):v.take(u-o)),v)},At.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},At.prototype.toArray=function(){return this.take(W)},da(At.prototype,function(o,u){var v=/^(?:filter|find|map|reject)|While$/.test(u),O=/^(?:head|last)$/.test(u),D=$[O?"take"+(u=="last"?"Right":""):u],U=O||/^find/.test(u);D&&($.prototype[u]=function(){var Q=this.__wrapped__,ce=O?[1]:arguments,ye=Q instanceof At,Ie=ce[0],Me=ye||yt(Q),Pe=function(St){var Lt=D.apply($,oi([St],ce));return O&&Ge?Lt[0]:Lt};Me&&v&&typeof Ie=="function"&&Ie.length!=1&&(ye=Me=!1);var Ge=this.__chain__,Ze=!!this.__actions__.length,ct=U&&!Ge,_t=ye&&!Ze;if(!U&&Me){Q=_t?Q:new At(this);var ut=o.apply(Q,ce);return ut.__actions__.push({func:Uc,args:[Pe],thisArg:n}),new Lr(ut,Ge)}return ct&&_t?o.apply(this,ce):(ut=this.thru(Pe),ct?O?ut.value()[0]:ut.value():ut)})}),Or(["pop","push","shift","sort","splice","unshift"],function(o){var u=pc[o],v=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",O=/^(?:pop|shift)$/.test(o);$.prototype[o]=function(){var D=arguments;if(O&&!this.__chain__){var U=this.value();return u.apply(yt(U)?U:[],D)}return this[v](function(Q){return u.apply(yt(Q)?Q:[],D)})}}),da(At.prototype,function(o,u){var v=$[u];if(v){var O=v.name+"";Pt.call(Ls,O)||(Ls[O]=[]),Ls[O].push({name:u,func:v})}}),Ls[kc(n,C).name]=[{name:"wrapper",func:n}],At.prototype.clone=oN,At.prototype.reverse=lN,At.prototype.value=cN,$.prototype.at=$S,$.prototype.chain=FS,$.prototype.commit=HS,$.prototype.next=BS,$.prototype.plant=US,$.prototype.reverse=WS,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=jS,$.prototype.first=$.prototype.head,Ro&&($.prototype[Ro]=zS),$}),Es=H_();ua?((ua.exports=Es)._=Es,Lo._=Es):on._=Es}).call(nq)})(vl,vl.exports)),vl.exports}var aq=rq(),nr=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(nr||{});const Yr=(...e)=>!0,iq={nodeClick:Yr,nodeCollapse:Yr,nodeExpand:Yr,nodeChecked:Yr,nodeDragStart:Yr,nodeDragOver:Yr,nodeDragLeave:Yr,nodeDragSort:Yr,nodeDrop:Yr,nodeEnterView:Yr,nodeSelected:Yr};var Ae=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(Ae||{});const _i={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var o_=(e=>(e.CHECKED="checked",e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(o_||{});const sq={data:y.arrayOf(y.any).def([]),label:y.oneOfType([y.func.def(void 0),y.string.def("label")]),nodeKey:y.string.def(void 0),children:y.string.def("children"),indent:y.number.def(16),lineHeight:y.number.def(32),height:y.number,levelLine:y.oneOfType([y.bool.def(!1),y.func.def(void 0),y.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:y.bool.def(!1),prefixIcon:y.oneOfType([y.func.def(()=>{}),y.bool.def(!1)]).def(!0),async:y.shape({callback:y.func.def(void 0),cache:y.bool.def(!0),deepAutoOpen:je("columnType",{}).def("once"),trigger:y.arrayOf(y.oneOf(["expand","click","checked"])).def(void 0)}),offsetLeft:y.number.def(5),search:y.oneOfType([y.shape({value:y.oneOfType([y.number,y.string,y.bool]).def(""),match:y.oneOfType([Fn(),y.func]).def("fuzzy"),resultType:Fn().def("tree"),showChildNodes:y.bool.def(!1)}),y.string,y.number,y.bool]).def(void 0),emptyText:y.string.def("没有数据"),draggable:y.bool.def(!1),disableDrag:y.func,disableDrop:Function,dragThreshold:y.number.def(.2),dragSort:y.bool.def(!1),dragSortMode:y.oneOf(["any","next"]).def("any"),selectable:y.oneOfType([y.bool,y.func]).def(!0),disabledFolderSelectable:y.bool.def(!1),showCheckbox:y.oneOfType([y.bool,y.func]).def(!1),disableCheck:y.bool.def(!1),checked:y.arrayOf(y.any).def([]),showNodeTypeIcon:y.bool.def(!0),selected:y.oneOfType([y.string,y.number,y.object]),autoCheckChildren:y.oneOfType([y.bool,y.func]).def(!0),autoOpenParentNode:y.bool.def(!0),expandAll:y.bool.def(!1),nodeContentAction:y.oneOfType([y.arrayOf(je("nodeContentActionType",{}).def(o_.CLICK)),y.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:y.bool.def(!1),checkStrictly:y.bool.def(!0),intersectionObserver:y.oneOfType([y.bool.def(!1),y.shape({enabled:y.bool.def(!1),callback:y.func.def(void 0)})]).def(!1)},oq=e=>({renderEmpty:t=>a.createVNode(cf,{scene:"part",type:t},{default:()=>[e.emptyText]})}),lq=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],i=null;const s=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,l=a.computed(s),c=p=>p instanceof NodeList?Array.from(p):Array.isArray(p)?p:[p];return{unobserveAll:()=>{r==null||r.forEach(p=>{xl(p)&&(n==null||n.unobserve(p))}),n==null||n.disconnect(),i==null||i.disconnect()},intersectionObserver:l,initIntersectionObserver:(p,g,w)=>{if(l.value.enabled){if(!p){console.error("intersectionObserver.target is undefined");return}r=c(p);const _=Object.assign({rootMargin:"0px"},g);n=new IntersectionObserver(function(b){b.forEach(C=>{var S,x,N;if(console.log("entry",C.target),C.isIntersecting){const E=((S=w==null?void 0:w.beforeResponse)==null?void 0:S.call(w,C))??C;(N=(x=l.value).callback)==null||N.call(x,E),l.value.once&&n.unobserve(C.target)}})},_),r.forEach(b=>{xl(b)&&n.observe(b)})}},initRootMutationObserver:(p,g)=>{if(l.value.enabled&&!e.virtualRender&&xl(p)){const w={attributes:!0,childList:!0,subtree:!0};i=new MutationObserver((..._)=>{g==null||g(..._)}),i.observe(p,w)}},getLastVisibleElement:(p,g)=>{const{offsetHeight:w}=g,_=g.querySelectorAll("[data-tree-node]"),b=w+p;return Array.from(_).filter(S=>S.offsetHeight+S.offsetTop>=b&&S.offsetTop<b)}}},mf=(e,t)=>{const n=W=>e.schema.get(W),r=(W,Y)=>{var q;return(q=n(W))==null?void 0:q[Y]},i=(W,Y,q,re)=>{if(!e.schema.has(W)){console.warn("node is not in schema, please check",re,W);return}e.schema.set(W,Object.assign({},n(W),{[Y]:q}))},s=W=>e.data.find(Y=>d(Y)===W),l=(W,Y,q)=>{if(Array.isArray(W)){Array.prototype.forEach.call(W,re=>i(s(re),Y,q,W));return}i(s(W),Y,q,W)},c=W=>r(W,Ae.PATH),d=W=>r(W,Ae.UUID),m=W=>r(W,Ae.IS_OPEN),h=W=>r(W,Ae.HAS_CHILD),f=W=>r(W,Ae.IS_MATCH),p=W=>r(W,Ae.IS_CHECKED),g=W=>r(r(W,Ae.PARENT),Ae.UUID),w=W=>r(W,Ae.IS_LOADING),_=W=>r(W,Ae.PARENT),b=W=>r(W,Ae.IS_MATCH),C=(W,Y)=>{const q=e.data.find(re=>d(re)===W);return r(q,Y)},S=W=>C(W,Ae.INDEX),x=W=>r(W,Ae.INDEX),N=W=>typeof W=="string"?C(W,Ae.IS_ROOT):r(W,Ae.IS_ROOT),E=W=>{const Y=e.data.find(q=>d(q)===W);return g(Y)},T=W=>{const Y=e.data.find(q=>d(q)===W);return c(Y)},R=(W,Y)=>{i(W,Ae.IS_LOADING,Y)},A=W=>typeof W=="object"?m(W):typeof W=="string"?C(W,Ae.IS_OPEN):!1,I=(W,Y)=>r(r(W,Ae.PARENT),Y),k=W=>A(r(W,Ae.PARENT)),V=W=>N(W)||A(W)||k(W),L=(W,Y)=>{const re=W.split("-").reduce((Z,se)=>{const ge=Number(se);return Array.isArray(Z)?Z[ge]:Z[t.children][ge]},t.data);return Y&&Object.assign(re,{[Ae.UUID]:Y}),re},M=W=>e.data.filter(Y=>_(Y)===W),P=W=>e.data.find(Y=>d(Y)===W),F=W=>{let Y=W;return typeof Y=="string"&&(Y=P(Y)),N(Y)?{[t.children]:t.data}:_(Y)},z=W=>({[_i[Ae.IS_LOADING]]:r(W,Ae.IS_LOADING),[_i[Ae.HAS_CHILD]]:h(W),[_i[Ae.IS_MATCH]]:f(W),[_i[Ae.IS_CHECKED]]:p(W),[_i[Ae.IS_OPEN]]:m(W),[_i[Ae.IS_ROOT]]:N(W),fullPath:r(W,Ae.PATH),uuid:d(W),parent:r(W,Ae.PARENT),parentId:d(r(W,Ae.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:d,getNodeById:s,getNodeParentId:g,getParentNodeData:F,getNodePathById:T,getNodeAttrById:C,getNodeParentIdById:E,getNodeIndexById:S,getNodeIndexByNode:x,getRootNodeList:()=>e.data.filter(W=>N(W)),getParentNodeAttr:I,getParentNode:_,setNodeAttr:i,setNodeAttrById:l,getNodePath:c,isRootNode:N,isNodeOpened:m,hasChildNode:h,isItemOpen:A,isNodeChecked:p,isNodeMatched:f,isNodeLoading:w,checkNodeIsOpen:V,getSourceNodeByPath:L,getSourceNodeByUID:P,isMatchedNode:b,resolveScopedSlotParam:z,setTreeNodeLoading:R,extendNodeAttr:W=>Object.assign({},W,{[Ae.TREE_NODE_ATTR]:z(W)}),getChildNodes:M,extendNodeScopedData:W=>({data:W,attributes:z(W)}),getIntersectionResponse:W=>{var ge;if(!W)return null;let Y=W;xl(W)&&(Y=s(W.getAttribute("data-tree-node")));const q=r(Y,Ae.DEPTH),re=r(Y,Ae.IS_ROOT),Z=r(Y,Ae.PARENT),se=re?r(Y,Ae.INDEX):(ge=Z==null?void 0:Z[t.children])==null?void 0:ge.findIndex(le=>le===Y);return{level:q,target:W,index:se,parent:Z,node:Y,isRoot:re}}}},l_="1px dashed #c3cdd7",c_=(e,t,n=null,r=null,i=null,s=[])=>{const l=e[t];return typeof l=="boolean"?l?r:i:u_(n,e,t,s)},u_=(e,t,n,r=[])=>{const i=t[n];if(typeof i=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,i)||console.error(`cannot find node label with key ${i}`),e[i]):i;if(typeof i=="function"){const s=i.apply(void 0,[e,...r]);if(typeof s=="string")return s;console.error("props label with function return value is not string, please check and return string");return}},d_=(e,t)=>u_(e,t,"label"),cq=(e,t)=>({"--level-line":c_(t,"levelLine",e,l_,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),uq=(e,t,n,r=!0)=>{var l;const{schema:i}=n,s=(l=i.get(e))==null?void 0:l[Ae.DEPTH];if(r){const c=["node"],d=()=>c_(t,"levelLine",e,l_,null,c);return{"--depth":s,...typeof t.levelLine=="function"?{"--level-line":d()}:{}}}return{}},dq=(e,t,n,r=!0)=>{const{__is_root:i,__is_open:s}=t.get(e)||{},{resolveClassName:l}=Re();return{"is-root":i,[`${l("tree-node")}`]:!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},fq=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:i}=Re();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${i("node-row")}`]:!0}},hq=(e,t,n,r,i)=>{mq(e,t,n,{[r]:i})},mq=(e,t,n,r)=>{const s=e.split("-").reduce((l,c)=>{const d=Number(c);return Array.isArray(l)?l[d]:l[n][d]},t);Object.assign(s,r||{})},yl=e=>e??{__IS_NULL:!0},Ou=(e,t,n)=>Array.isArray(t)?t.some(r=>Ou(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,g6=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,f_=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:i,resolveScopedSlotParam:s,setTreeNodeLoading:l}=mf(t,e),c=(h,f)=>{if(typeof h=="object"&&h!==null){n(f,Ae.IS_OPEN,!0);const p=Array.isArray(h)?h:[h];return hq(r(f),e.data,e.children,e.children,p),Promise.resolve(h)}return Promise.resolve(h)},d=h=>{const{callback:f=null,cache:p=!0}=e.async||{};if(typeof f=="function"&&i(h,Ae.IS_ASYNC)){if(n(h,Ae.IS_ASYNC_INIT,!0),!i(h,Ae.IS_CACHED)){n(h,Ae.IS_CACHED,p);const g=s(h),w=f(h,_=>c(_,h),g);if(typeof w=="object"&&w!==null)return l(h,!0),w instanceof Promise?Promise.resolve(w.then(_=>c(_,h)).catch(_=>console.error("load remote data error:",_)).finally(()=>{l(h,!1),n(h,Ae.IS_CACHED,!0)})):(c(w,h),l(h,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},m=()=>{const h=t.data.filter(f=>i(f,Ae.IS_ASYNC)&&f[_i[Ae.IS_OPEN]]&&!i(f,Ae.IS_ASYNC_INIT));h.length&&Promise.all(h.map(f=>d(f))).then(()=>{m()}).catch(f=>{console.warn(f)})};return{asyncNodeClick:d,deepAutoOpen:m}},pq=(e,t,n,r,i)=>{let s=e.selected;const{setNodeAttr:l,setNodeAttrById:c,getNodePath:d,getSchemaVal:m,getNodeAttr:h,getNodeId:f,getChildNodes:p,isRootNode:g,hasChildNode:w,isItemOpen:_,isNodeOpened:b,isNodeLoading:C,isNodeChecked:S,getParentNode:x,resolveScopedSlotParam:N,extendNodeAttr:E,extendNodeScopedData:T}=mf(n,e),{resolveClassName:R}=Re(),{registerNextLoop:A}=i,{asyncNodeClick:I,deepAutoOpen:k}=f_(e,n),V=G=>_(G)?a.createVNode(Vd,{class:[R("tree-icon"),R("node-prefix")]},null):a.createVNode(Id,{class:[R("tree-icon"),R("node-prefix")]},null),L=G=>{if(typeof G=="string")return G;if(typeof G=="object"&&G!==null){if(a.isVNode(G))return G;const{node:ue,className:Se,text:oe,style:we}=G;return a.h(ue,{class:Se,style:we},oe)}return null},M=G=>{var ue,Se;return((Se=(ue=t.slots).nodeLoading)==null?void 0:Se.call(ue,j(G)))??C(G)?a.createVNode(_o,null,null):""},P=G=>{if(t.slots.nodeAction)return t.slots.nodeAction(j(G));let ue=null;if(C(G))return M(G);if(typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(j(G),"node_action"),ue!=="default"))return L(ue);if(ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const Se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(G):e.autoCheckChildren;if(w(G)||G.async||!Se)return _(G)?a.createVNode(Yl,{class:R("node-prefix")},null):a.createVNode(Ql,{class:R("node-prefix")},null)}return null},F=G=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(j(G));let ue=null;return typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(j(G),"node_type"),ue!=="default")?L(ue):ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?g(G)||w(G)?V(G):a.createVNode(Ud,{class:[R("tree-icon"),R("node-prefix")]},null):null},z=(G,ue)=>{const Se=x(G);if(Se){const oe=ue||(p(Se)||[]).some(we=>S(we));l(Se,Ae.IS_CHECKED,oe),l(Se,Ae.IS_INDETERMINATE,(p(Se)||[]).some(we=>!S(we)||Ce(we))),g(Se)||z(Se,ue)}},H=(G,ue,Se)=>{p(G).forEach(oe=>{Array.isArray(ue)?ue.forEach((we,Te)=>{l(oe,we,Se[Te])}):l(oe,ue,Se),H(oe,ue,Se)})},B=G=>{var ue,Se,oe;return(Se=(ue=e.async)==null?void 0:ue.trigger)!=null&&Se.length?(oe=e.async)==null?void 0:oe.trigger.includes(G):!0},te=(G,ue,Se)=>{Se==null||Se.preventDefault(),Se==null||Se.stopImmediatePropagation(),Se==null||Se.stopPropagation(),l(G,Ae.IS_CHECKED,!!ue),ue&&l(G,Ae.IS_INDETERMINATE,!1),e.checkStrictly&&(H(G,[Ae.IS_CHECKED,Ae.IS_INDETERMINATE],[!!ue,!1]),z(G,ue)),t.emit(nr.NODE_CHECKED,n.data.filter(oe=>S(oe)),n.data.filter(oe=>Ce(oe))),pe(G,Se,"checked")},Ce=G=>S(G)&&h(G,Ae.IS_INDETERMINATE),W=G=>g6(e,T(G))?a.createVNode("span",{class:"node-check-box",onClick:J},[a.createVNode(Bn,{disabled:e.disableCheck,indeterminate:Ce(G),modelValue:S(G),size:"small",onChange:(ue,Se)=>te(G,!!ue,Se)},null)]):null,Y=(G,ue=null,Se=null,oe=!0)=>{const we=ue===null?!_(G):!!ue;if(we||H(G,Ae.IS_OPEN,we),l(G,Ae.IS_OPEN,we),oe){const Te=_(G)?nr.NODE_EXPAND:nr.NODE_COLLAPSE;t.emit(Te,G,N(G),m(G),Se)}},q=(G,ue,Se)=>{if(Array.isArray(G)){G.forEach(oe=>l(yl(oe),ue,Se));return}l(yl(G),ue,Se)},re=(G,ue=!0,Se=!1)=>{Z(G,Ae.IS_OPEN,ue,Se&&ue)},Z=(G,ue,Se,oe=!1)=>{const we=yl(G);if(we[Ae.IS_NULL])return;const Te=Array.isArray(ue)?ue:[ue],Ne=Array.isArray(Se)?Se:[Se];if(oe){if(Te.forEach((ae,Ee)=>q(we,ae,Ne[Ee])),!g(we)){const ae=x(we);Te.forEach((Ee,Ve)=>{h(ae,Ee)!==Se&&Z(ae,Ee,Ne[Ve],oe)})}}else Te.forEach((ae,Ee)=>q(we,ae,Ne[Ee]))},se=(G,ue,Se)=>{if(_(G)){Y(G,!1,ue,!0);return}h(G,Ae.IS_ASYNC)&&B(Se)?I(G).finally(()=>{h(G,Ae.IS_LOADING)?A("setNodeOpenedAfterLoading",{type:"once",fn:()=>Y(G,!0,ue,!0)}):Y(G,!0,ue,!0)}):Y(G,!0,ue,!0)},ge=(G,ue)=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),se(ue,G,"expand")},le=(G,ue=!0,Se=!0,oe=!1,we="")=>{const Te=Array.isArray(G)?G:[G];if(!Te.length)return;let Ne=yl(Te[0]);if((typeof Ne=="string"||typeof Ne=="number"||typeof Ne=="symbol")&&(Ne=n.data.find(ae=>f(ae)===Ne)??{[Ae.IS_NULL]:!0}),!Ne[Ae.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(G)||e.disabledFolderSelectable&&Ne.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}s!=null&&c(s,Ae.IS_SELECTED,!ue),e.selected&&e.selected!==s&&c(e.selected,Ae.IS_SELECTED,!ue),l(Ne,Ae.IS_SELECTED,ue),s=f(Ne),oe&&t.emit(nr.NODE_SELECTED,{selected:ue,node:Ne}),Se&&Te.length===1&&re(Ne,!0,!0),h(Ne,Ae.IS_ASYNC)&&B(we)&&I(Ne).then(()=>{a.nextTick(()=>{Te.shift(),le(Te,ue,Se,oe,we)})})}},de=G=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:G}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],pe=(G,ue,Se)=>{const oe=de(G),we=b(G),Te=Se==="checked";if(oe.includes("selected")){const ae=!(oe.includes("expand")||oe.includes("collapse"));le(G,!0,ae,!0,Se)}if(oe.includes("expand")&&!we&&!Te&&se(G,ue,"expand"),oe.includes("collapse")&&we&&!Te&&se(G,ue,"expand"),oe.includes("click")&&!Te){const Ne=nr.NODE_CLICK;t.emit(Ne,G,N(G),m(G),ue)}if(oe.includes("checked")&&Se!=="checked"&&g6(e,T(G))&&!e.disableCheck){const Ne=S(G);te(G,!Ne,ue)}},me=(G,ue)=>{if(g(ue))return!1;const Se=d(ue),oe=`${Se}`.split("-").slice(0,G+1);if(oe.join("-")===Se)return!0;const Te=oe.pop(),Ne=parseInt(Te,10);oe.push(`${Ne+1}`);const ae=oe.join("-");return n.data.some(Ee=>d(Ee)===ae)},ee=G=>{if(!e.levelLine)return null;const ue=oe=>({"--depth":oe}),Se=(h(G,Ae.DEPTH)??0)+1;return new Array(Se).fill("").map((oe,we)=>we).filter(oe=>me(oe,G)).filter(oe=>oe>0).map(oe=>a.createVNode("span",{style:ue(Se-oe),class:"node-virtual-line"},null))},X=G=>{var ue,Se,oe,we;return t.slots.node?(Se=(ue=t.slots).node)==null?void 0:Se.call(ue,j(G)):t.slots.default?(we=(oe=t.slots).default)==null?void 0:we.call(oe,T(G)):[d_(G,e)]},j=G=>e.keepSlotData?T(G):E(G),J=G=>{G.stopImmediatePropagation(),G.stopPropagation()};return{renderTreeNode:(G,ue=!0)=>{var oe,we;const Se=P(G);return a.createVNode("div",{key:f(G),class:fq(G,n.schema),"data-tree-node":f(G)},[a.createVNode("div",{style:uq(G,e,n,ue),class:dq(G,n.schema,e,ue),onClick:Te=>pe(G,Te,"click")},[a.createVNode("div",{class:[R("node-action"),Se?"":"empty-child"],onClick:Te=>ge(Te,G)},[Se]),a.createVNode("div",{class:R("node-content")},[[W(G),F(G)],a.createVNode("span",{class:R("node-text")},[X(G)]),(we=(oe=t.slots).nodeAppend)==null?void 0:we.call(oe,j(G))]),ue&&ee(G)])])},handleTreeNodeClick:se,deepAutoOpen:k,asyncNodeClick:I,setNodeAction:q,setNodeOpened:Y,setSelect:le,setOpen:re,setNodeAttribute:Z,isIndeterminate:Ce,deepUpdateChildNode:H,updateParentChecked:z}};function gq(){return{moveElement:(t,n,r,i=0,s=0,l="insertAfter")=>{if(n<0||r<0||n>=t.length||r>=t.length||n===r&&l==="insertAfter"||n+i>=t.length||r+s>=t.length)return Array.from(t);const c=Array.from(t),d=c.splice(n,i+1);let m=r;n<r&&(m=r-(i+1));const h=m+s+(l==="insertAfter"?1:0),f=Math.max(0,Math.min(h,c.length));return c.splice(f,0,...d),c}}}const vq=(e,t,n,r)=>{const{getSourceNodeByUID:i,getParentNode:s,extendNodeAttr:l,getNodeIndexByNode:c,setNodeAttr:d,getNodeAttr:m,getRootNodeList:h}=mf(r,e),{resolveClassName:f}=Re(),p=a.computed(()=>typeof e.disableDrag=="function"),g=a.computed(()=>typeof e.disableDrop=="function"),w=e.dragThreshold||.2;let _="",b=null,C=null,S=new WeakMap;const{moveElement:x}=gq(),N=()=>{const le=new Map;return r.data.forEach(de=>{const pe=m(de,Ae.IS_OPEN);le.set(de,pe)}),le},E=le=>{le.forEach((de,pe)=>{r.schema.has(pe)&&d(pe,Ae.IS_OPEN,de)})},T=(le,de)=>{if(de){const pe=de[e.children];if(pe){const me=pe.indexOf(le);me>-1&&pe.splice(me,1)}}else{const pe=e.data.indexOf(le);pe>-1&&e.data.splice(pe,1)}},R=le=>{if(!le)return;const de=le[e.children],pe=de&&de.length>0;d(le,Ae.HAS_CHILD,pe)},A=le=>le.target.closest("[data-tree-node]"),I=le=>{var pe;const de=(pe=le==null?void 0:le.dataset)==null?void 0:pe.treeNode;return i(de)},k=(le,de,pe)=>{pe.forEach(me=>le.classList.remove(me)),de.forEach(me=>le.classList.add(me))},V=le=>{A(le).removeEventListener("mouseup",V)},L=le=>{var me;const de=A(le),pe=I(de);if((pe==null?void 0:pe.draggable)===!1||p.value&&((me=e.disableDrag)!=null&&me.call(e,pe))){de==null||de.classList.add(`${f("tree-drag-disabled")}`);return}de==null||de.setAttribute("draggable","true"),de==null||de.addEventListener("mouseup",V)},M="drop-before",P="drop-after",F="drop-inner";let z=null;const H=cs(le=>{if(le.preventDefault(),!b)return;const de=A(le);z!==de&&(z==null||z.classList.remove(M,P,F),z=de);const pe=l(I(de));S.has(de)||S.set(de,de.getBoundingClientRect());const me=le.clientY,{top:ee,height:X}=S.get(de),j=X*w,J=me-ee;if(J<j?k(de,[M],[P,F]):J>X-j?k(de,[P],[M,F]):k(de,[F],[M,P]),t.emit(nr.NODE_DRAG_OVER,le,de,pe),g.value&&(e!=null&&e.disableDrop(C,"move",pe))){le.dataTransfer.effectAllowed="move",le.dataTransfer.dropEffect="none",de.classList.add(`${f("tree-drop-disabled")}`);return}de.classList.add(`${f("tree-drop-active")}`);const ie=de.getAttribute("data-tree-node"),G=Ce(_,ie)?"move":"none";le.dataTransfer.effectAllowed=G,le.dataTransfer.dropEffect=G}),B=le=>{le.dataTransfer.effectAllowed="move",le.dataTransfer.dropEffect="move";const de=A(le);le.dataTransfer.setData("text/plain","");const pe=de.getAttribute("data-tree-node");_=pe,b=de,C=i(pe),le.dataTransfer.setData("node-id",pe),t.emit(nr.NODE_DRAG_START,le,de)},te=le=>{le.preventDefault(),le.stopPropagation();const de=A(le);if(!de)return;de.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`);const pe=z==null?void 0:z.classList.contains(F),me=z==null?void 0:z.classList.contains(M),ee=z==null?void 0:z.classList.contains(P);let X="child";pe?X="child":(me||ee)&&(X=e.dragSort?"sort":"move");const j=l(I(de));if(g.value&&e.disableDrop(C,X,j))return;const J=_,ie=de.getAttribute("data-tree-node");if(J!==ie){const G=N();pe?Reflect.apply(Z,void 0,[J,ie,G]):(me||ee)&&(e.dragSort?Reflect.apply(re,void 0,[J,ie,G]):Reflect.apply(se,void 0,[J,ie,G])),t.emit(nr.NODE_DROP,le,de,j)}S=new WeakMap,z==null||z.classList.remove(P,M,F),z=null,C=null},Ce=(le,de)=>le!==de,W=le=>{const de=[],pe=me=>{r.data.filter(X=>s(X)===me).forEach(X=>{de.push(X),pe(X)})};return pe(le),de},Y=(le,de)=>{let pe=c(le),me=c(de);const ee=W(le),X=W(de),j=z!=null&&z.classList.contains(M)?"insertBefore":"insertAfter",J=x(r.data,pe,me,ee.length,X.length,j);return r.data=J,{sourceNodeIndex:pe,targetNodeIndex:me}},q=(le,de)=>{const pe=(m(de,Ae.DEPTH)??-1)+1;d(le,Ae.PARENT,de),d(le,Ae.DEPTH,pe),d(le,Ae.IS_ROOT,pe===0);let me=0;const ee=(j,J=0,ie="")=>{for(let G=0;G<j.length;G++){const ue=j[G],Se=ie!==""?`${ie}-${G}`:`${G}`;d(ue,Ae.INDEX,me),d(ue,Ae.ORDER,me),d(ue,Ae.DEPTH,J),d(ue,Ae.PATH,Se),me+=1;const oe=r.data.filter(we=>s(we)===ue);oe.length>0&&ee(oe,J+1,Se)}},X=h();ee(X)},re=(le,de,pe)=>{if(!e.dragSort||!Ce(le,de))return;const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me),j=s(ee);if(e.dragSortMode==="next"&&X!==j)return;const J=z!=null&&z.classList.contains(M)?"before":"after";T(me,X);let ie;j?(j[e.children]||(j[e.children]=[]),ie=j[e.children]):ie=e.data;const G=ie.indexOf(ee),ue=J==="before"?G:G+1;ie.splice(ue,0,me);const{sourceNodeIndex:Se,targetNodeIndex:oe}=Y(me,ee);R(X),q(me,j),pe&&E(pe),t.emit(nr.NODE_DRAG_SORT,{sourceNode:me,targetNode:ee,sourceIndex:Se,targetIndex:oe})},Z=(le,de,pe)=>{const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me);T(me,X),ee[e.children]||(ee[e.children]=[]),ee[e.children].push(me);const j=c(me),J=W(me),ie=r.data.splice(j,J.length+1);let G=r.data.indexOf(ee);const ue=W(ee),Se=G+ue.length+1;r.data.splice(Se,0,...ie),R(X),d(ee,Ae.HAS_CHILD,!0),q(me,ee),pe&&E(pe)},se=(le,de,pe)=>{const me=i(le),ee=i(de);if(!me||!ee)return;const X=s(me),j=s(ee),J=z!=null&&z.classList.contains(M)?"before":"after";T(me,X);let ie;j?(j[e.children]||(j[e.children]=[]),ie=j[e.children]):ie=e.data;const G=ie.indexOf(ee),ue=J==="before"?G:G+1;ie.splice(ue,0,me);const Se=c(me),oe=W(me),we=r.data.splice(Se,oe.length+1);let Te=r.data.indexOf(ee);const Ne=W(ee);let ae;J==="before"?ae=Te:ae=Te+Ne.length+1,r.data.splice(ae,0,...we),R(X),q(me,j),pe&&E(pe)},ge=le=>{le.preventDefault();const de=A(le);S.has(de)&&S.delete(de),de.classList.remove(`${f("tree-drop-active")}`,`${f("tree-drop-disabled")}`),de.classList.remove(P,M,F),t.emit(nr.NODE_DRAG_LEAVE,le,de)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const le=n.value.$el;le.addEventListener("mousedown",L),le.addEventListener("dragstart",B),le.addEventListener("dragover",H),le.addEventListener("dragleave",ge),le.addEventListener("drop",te)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const le=n.value.$el;le.removeEventListener("mousedown",L),le.removeEventListener("dragstart",B),le.removeEventListener("dragover",H),le.removeEventListener("dragleave",ge),le.removeEventListener("drop",te)}})},yq=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},i=p=>["string","number","boolean"].includes(typeof p),s=(p,g)=>p===g,l=(p,g)=>new RegExp(`${p}`,"i").test(`${g}`),c=(p,g)=>Reflect.apply(p,void 0,g),d=t.value===void 0||t.value===!1,m=(p,g)=>{if(d)return!0;if(i(t.value))return`${t.value}`.length===0?!1:c(l,[t.value,p,g]);const{value:w="",match:_="fuzzy"}=t.value,C=typeof _=="function"?_:_==="fuzzy"?l:s;return`${w}`.length===0?!1:c(C,[w,p,g])},h=a.computed(()=>{if(t.value===!1)return!1;if(i(t.value))return`${t.value}`.length>0;const{value:p=""}=t.value;return`${p}`.length>0}),f=a.computed(()=>n==="tree");return{searchFn:m,refSearch:t,isSearchActive:h,isSearchDisabled:d,resultType:n,isTreeUI:f,showChildNodes:r}},bq=e=>{var _;const t=(b=void 0,C=null)=>{const{data:S,children:x}=e,N=[],E=[];let T=0;const R=new WeakMap;function A(B,te,Ce,W){if(B!=null&&R.has(B)){const Y=R.get(B);if(Object.prototype.hasOwnProperty.call(Y,te)&&typeof W=="function"&&Reflect.apply(W,self,[Y,te,Ce,B])){if(Y[te]===Ce)return;Object.assign(Y,{[te]:Ce}),A(Y[Ae.PARENT],te,Ce,W)}}}function I(B){let te=null;return typeof e.nodeKey=="string"&&(te=B[e.nodeKey]||Ai()),te||B[Ae.UUID]||Ai()}const k={[Ae.IS_OPEN]:()=>!!e.expandAll,[Ae.IS_CHECKED]:()=>!1,[Ae.IS_MATCH]:()=>!1,[Ae.IS_SELECTED]:(B,te)=>Ou(B,e.selected,te),[Ae.IS_CACHED]:()=>!1,[Ae.IS_ASYNC]:()=>null,[Ae.IS_LOADING]:()=>!1};function V(B,te,Ce,W=void 0){let Y=W;W===void 0&&typeof k[Ce]=="function"&&(Y=k[Ce](te,B));const q=_i[Ce];if(Object.prototype.hasOwnProperty.call(te,q))return te[q];const re=(C==null?void 0:C.get(te))??void 0;let Z;return re&&(Z=re[Ce]),Z==null&&(Z=Y),Z}function L(B,te){if(!e.selectable)return!1;const Ce=Ou(te,e.selected,B);return V(B,te,Ae.IS_SELECTED,Ce)}function M(B,te,Ce){var q;const W=V(B,te,Ae.IS_OPEN),Y=R.has(Ce)?(q=R.get(Ce))==null?void 0:q[Ae.IS_OPEN]:!0;return W&&Y}function P(B,te,Ce){if(!g6(e,{data:B,attributes:Ce}))return!1;const Y=Ou(B,e.checked,te);return V(te,B,Ae.IS_CHECKED,Y)}function F(B){return!((B==null?void 0:B[Ae.IS_OPEN])??!1)}function z(B,te,Ce,W){return B[Ae.IS_INDETERMINATE]=(W[e.children]||[]).some(Y=>{var q;return!(((q=R.get(Y))==null?void 0:q[Ae.IS_CHECKED])??!1)}),!0}function H(B,te=0,Ce=null,W=null){const Y=B.length;for(let q=0;q<Y;q++){const re=B[q];if(Array.isArray(re))H(re,te,Ce,W);else if(typeof re=="object"&&re!==null){const Z=W!==null?`${W}-${q}`:`${q}`,se=`${I(re)}`,ge=!!(re[x]||[]).length;let le=V(se,re,Ae.IS_OPEN);e.autoOpenParentNode?le&&A(Ce,Ae.IS_OPEN,!0,F):le=M(se,re,Ce);const de={[Ae.DEPTH]:te,[Ae.INDEX]:T,[Ae.UUID]:se,[Ae.PARENT]:Ce,[Ae.HAS_CHILD]:ge,[Ae.PATH]:Z,[Ae.IS_ROOT]:Ce===null,[Ae.ORDER]:T,[Ae.IS_SELECTED]:L(se,re),[Ae.IS_MATCH]:V(se,re,Ae.IS_MATCH),[Ae.IS_OPEN]:le,[Ae.IS_CHECKED]:void 0,[Ae.IS_CACHED]:V(se,re,Ae.IS_CACHED),[Ae.IS_ASYNC]:V(se,re,Ae.IS_ASYNC),[Ae.IS_LOADING]:V(se,re,Ae.IS_LOADING),[Ae.IS_INDETERMINATE]:!1};de[Ae.IS_CHECKED]=P(re,se,de),de[Ae.IS_CHECKED]&&N.push(re),R.set(re,de),E.push(re),T+=1,Object.prototype.hasOwnProperty.call(re,x)&&H(re[x]||[],te+1,re,Z)}}}return H(b??S),e.showCheckbox!==!1&&e.checkStrictly&&(N==null||N.forEach(B=>{A(B,Ae.IS_CHECKED,!0,z)})),[E,R]},n=t(),r=new Map,i=[],s=[],l=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:c,deepAutoOpen:d}=f_(e,l),m=b=>{i.push(b)},h=(b,C,S=!0)=>{S&&r.has(b)&&r.delete(b),r.set(b,C)},f=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),p=b=>{const C=f(b);return C!==null&&Reflect.apply(C.fn,void 0,[]),(C==null?void 0:C.type)??"once"},g=()=>{Array.from(r.keys()).forEach(b=>{const C=r.get(b);if(Array.isArray(C)){const S=[];C.forEach((x,N)=>{p(x)==="once"&&S.unshift(N)}),S.length&&S.forEach(x=>C.splice(x,1)),C.length===0&&r.delete(b)}else p(C)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var S,x;const C=t(b[0],l.schema);l.data=C[0],l.schema=C[1],(S=e.async)!=null&&S.callback&&((x=e.async)==null?void 0:x.deepAutoOpen)==="every"&&d(),g()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{s.length=0,i.forEach(C=>{Reflect.apply(C,void 0,[b]),s.push(()=>Reflect.apply(C,void 0,[b]))}),h("afterSelectWatch",s)},{immediate:!0})});const w=b=>{h("afterDataUpdate",b)};return(_=e.async)!=null&&_.callback&&d(),{flatData:l,asyncNodeClick:c,deepAutoOpen:d,afterDataUpdate:w,registerNextLoop:h,onSelected:m}},wq=a.defineComponent({name:"Tree",props:sq,emits:iq,setup(e,t){const n=a.ref(),{flatData:r,onSelected:i,registerNextLoop:s}=bq(e),{checkNodeIsOpen:l,isRootNode:c,isNodeOpened:d,isNodeChecked:m,isNodeMatched:h,hasChildNode:f,getNodePath:p,getNodeId:g,getNodeAttr:w,getNodeById:_,getParentNode:b,getRootNodeList:C,getIntersectionResponse:S}=mf(r,e),{searchFn:x,isSearchActive:N,refSearch:E,isSearchDisabled:T,isTreeUI:R,showChildNodes:A}=yq(e),I=a.reactive([]),k=J=>{if(N.value){if(A){const G=`${p(J)??""}-`,ue=l(J),Se=h(J),oe=c(J);return ue?oe?Se:Se||I.some(we=>G.indexOf(`${we}-`)===0):!1}return l(J)&&h(J)}return l(J)},V=a.computed(()=>r.data.filter(J=>k(J))),{getLastVisibleElement:L,intersectionObserver:M}=lq(e),{renderTreeNode:P,handleTreeNodeClick:F,setOpen:z,setNodeAction:H,setSelect:B,asyncNodeClick:te,setNodeAttribute:Ce,isIndeterminate:W,deepUpdateChildNode:Y,updateParentChecked:q}=pq(e,t,r,V,{registerNextLoop:s}),re=Bl(120,()=>{I.length=0,r.data.forEach(J=>{const ie=x(d_(J,e),J);ie&&I.push(p(J)),Ce(J,[Ae.IS_MATCH],[ie],R.value&&ie)})});T||a.watch([E],()=>{re()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{de()})});const Z=(J,ie=!0,G=!1)=>{(oe=>{if(Array.isArray(oe))return oe.map(we=>typeof we=="string"||typeof we=="number"?_(we):we).filter(Boolean);if(typeof oe=="string"||typeof oe=="number"){const we=_(oe);return we?[we]:[]}return[oe].filter(Boolean)})(J).forEach(oe=>{const we=yl(oe);H(we,Ae.IS_CHECKED,ie),ie&&H(we,Ae.IS_INDETERMINATE,!1),e.checkStrictly&&(Y(we,[Ae.IS_CHECKED,Ae.IS_INDETERMINATE],[ie,!1]),q(we,ie))}),G&&t.emit(nr.NODE_CHECKED,r.data.filter(oe=>m(oe)),r.data.filter(oe=>W(oe)))};i(J=>{B(J,!0,e.autoOpenParentNode,!0)});const se=()=>{const J=ie=>(ie??[]).map(G=>{const ue=aq.cloneDeep(G);if(!ue)return ue;const Se=r.data.filter(oe=>b(oe)===G);return ue[e.children]=J(Se),ue});return J(C())},ge=J=>J?{data:se(),schema:r.schema,levelLineSchema:r.levelLineSchema}:r;a.watch(()=>[e.checked],()=>{r.data.forEach(J=>{(m(J)||W(J))&&(H(J,Ae.IS_CHECKED,!1),H(J,Ae.IS_INDETERMINATE,!1))}),Z(e.checked,!0)},{immediate:!0});const le=()=>{var J;(J=n.value)==null||J.reset()},de=J=>{if(J==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(J,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(G=>G[e.nodeKey]===J[e.nodeKey])+1});return}if(J.id!==void 0&&J.id!==null){n.value.fixToTop({index:V.value.findIndex(G=>G[e.nodeKey]===J.id)+1});return}if(J.index>=0){n.value.fixToTop({index:J.index});return}const ie=g(J);if(ie){n.value.fixToTop({index:V.value.findIndex(G=>g(G)===ie)+1});return}},pe=(J,ie=!0,G=!1)=>{Z(_(J),ie,G)};t.expose({handleTreeNodeClick:F,isNodeChecked:m,isRootNode:c,isNodeOpened:d,isNodeMatched:h,hasChildNode:f,setOpen:z,setChecked:Z,setCheckedById:pe,setNodeAction:H,setNodeOpened:z,setSelect:B,scrollToTop:de,asyncNodeClick:te,getData:ge,reset:le,getNodeAttr:w,getParentNode:b});const{renderEmpty:me}=oq(e);vq(e,t,n,r);const ee=J=>{var G,ue;if(J.length)return J.map(Se=>P(Se,!N.value||R.value));const ie=N.value?"search-empty":"empty";return((ue=(G=t.slots).empty)==null?void 0:ue.call(G))??me(ie)},X=([J,ie,G])=>{var ue,Se,oe,we;if(M.value.enabled&&J.offset.y>5){if(!e.virtualRender){const Ne=L(J.offset.y,n.value.refRoot),ae=S(Ne[0]);(Se=(ue=M.value)==null?void 0:ue.callback)==null||Se.call(ue,ae),t.emit(nr.NODE_ENTER_VIEW,ae);return}const Te=S(G.slice(-1)[0]);(we=(oe=M.value)==null?void 0:oe.callback)==null||we.call(oe,Te),t.emit(nr.NODE_ENTER_VIEW,Te);return}},{resolveClassName:j}=Re();return()=>a.createVNode(rc,{ref:n,style:cq(null,e),height:e.height,class:j("tree"),contentClassName:j("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:Ae.UUID,throttleDelay:0,onContentScroll:X},{default:J=>ee(J.data||[])})}}),h_=bt(wq),ts="upload";var Ya=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Ya||{}),v6=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(v6||{}),zs=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(zs||{});const qy=[Ya.BUTTON,Ya.DRAGGABLE,Ya.PICTURE],Gy=[v6.FORMDATA,v6.BINARY],Pr={type:{type:String,default:"formdata",validator:e=>!e||Gy.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Gy.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||qy.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${qy.join(" | ")}】`),!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,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function Ky(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Cq=a.defineComponent({name:"UploadList",props:{theme:Pr.theme,disabled:Pr.disabled,files:Pr.files,multiple:Pr.multiple,isShowPreview:Pr.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Ft("upload"),{resolveClassName:i}=Re(),{theme:s,disabled:l,multiple:c,isShowPreview:d}=a.toRefs(e),m=`${i(ts)}-list`,h=a.computed(()=>s.value===Ya.PICTURE),f=a.computed(()=>h.value&&!c.value),p=a.computed(()=>nt({[m]:!0,[`${m}--${s.value}`]:!0,[`${m}--disabled`]:l.value}));function g(T){const R=["Bytes","KB","MB","GB","TB"],A=Math.floor(Math.log(T)/Math.log(1024));return`${(T/1024**A).toFixed(2)}${R[A]}`}function w(T,R,A){n("preview",T,R,A)}function _(T,R){n("remove",T,R)}function b(T,R){n("retry",T,R)}const C=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${m}__item`},Ky(T=e.files.map(R=>{const A=nt({[`${m}__item`]:!0,[`${m}__item-picture`]:!0,[`${m}__item--${R.status}`]:!0});return a.createVNode("li",{key:R.uid,class:A},[t!=null&&t.file?t.file({file:R}):S(R)])}))?T:{default:()=>[T]})},S=T=>[a.withDirectives(a.createVNode("img",{class:`${m}__picture-item-thumbnail`,alt:"",src:T.url},null),[[a.vShow,T.status!=="uploading"]]),a.createVNode(a.Fragment,null,[T.status==="uploading"&&a.createVNode(Pl,{width:50,class:`${m}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:T.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${m}__picture-item-actions`},[d.value&&a.createVNode(Co,{class:"action-icon",onClick:R=>w(T,e.files,R)},null),a.createVNode(uo,{class:"action-icon",onClick:R=>_(T,R)},null)])])],x=()=>{let T;return a.createVNode(a.TransitionGroup,{name:`${m}__item`},Ky(T=e.files.map(R=>{const A=nt({[`${m}__item`]:!0,[`${m}__item--${R.status}`]:!0});return a.createVNode("li",{key:R.uid,class:A},[t!=null&&t.file?t.file({file:R}):E(R)])}))?T:{default:()=>[T]})},N=T=>{var L;const R=(L=T==null?void 0:T.raw)==null?void 0:L.type,[A]=(R==null?void 0:R.split("/"))||"";let k={text:Gs,image:Pd,application:Gs,video:Gd,audio:Sd}[A]||Gs;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(R)&&(k=Cd),a.h(k,{class:`${m}__item-file-icon`})},E=T=>[a.createVNode("div",{class:`${m}__item-icon`},[T.isPic?a.createVNode("img",{class:`${m}__item-thumbnail`,alt:"",src:T.url},null):N(T)]),a.createVNode("div",{class:`${m}__item-summary`},[a.createVNode("div",{class:`${m}__item-name`,title:T.name},[T.name]),T.status!=="uploading"&&a.createVNode("div",{class:`${m}__item-message`,title:T.statusText},[T.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${m}__item-message-success-icon`},null),T.statusText||r.value.uploadSuccess]),T.status==="fail"&&a.createVNode(a.Fragment,null,[T.statusText||r.value.uploadFailed])]),T.status==="uploading"&&a.createVNode(Pl,{class:`${m}__item-progress`,percent:T.percentage,showText:!1,size:"small"},null),T.status!=="fail"&&a.createVNode("div",{class:`${m}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${m}__item-speed-size`},[g(T.size)]),[[a.vShow,T.size]]),a.withDirectives(a.createVNode("span",{class:`${m}__item-speed-percentage`},[T.percentage,a.createTextVNode("%")]),[[a.vShow,T.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${m}__item-actions`},[T.status==="fail"&&a.createVNode(Hd,{class:`${m}__item-retry-icon`,onClick:R=>b(T,R)},null),a.createVNode(uo,{class:`${m}__item-del-icon`,onClick:R=>_(T,R)},null)])])];return()=>{var T,R,A;return a.createVNode(a.Fragment,null,[f.value?(R=t==null?void 0:t.innerTrigger)==null?void 0:R.call(t,(T=e.files)==null?void 0:T[0]):a.createVNode("ul",{class:p.value},[h.value?C():x(),(A=t==null?void 0:t.innerTrigger)==null?void 0:A.call(t)])])}}}),Yy=a.defineComponent({name:"UploadTrigger",props:{theme:Pr.theme,disabled:Pr.disabled,multiple:Pr.multiple,accept:Pr.accept,file:{type:Object},selectChange:Pr.selectChange,isShowPreview:Pr.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Ft("upload"),{resolveClassName:i}=Re(),{theme:s,disabled:l,file:c,multiple:d,accept:m,isShowPreview:h}=a.toRefs(e),f=`${i(ts)}-trigger`,p=a.computed(()=>s.value===Ya.BUTTON),g=a.computed(()=>s.value===Ya.DRAGGABLE),w=a.computed(()=>s.value===Ya.PICTURE),_=a.computed(()=>w.value&&!d.value),b=a.computed(()=>w.value&&!m.value?"image/png,image/jpeg,image/jpg":m.value),C=a.ref(null),S=a.computed(()=>{var z;return nt({[f]:!0,[`${f}--${s.value}`]:!0,[`${f}--single-picture`]:_.value,[`${f}--has-file`]:c.value??!1,[`${f}--${(z=c.value)==null?void 0:z.status}`]:c.value??!1,[`${f}--dragover`]:I.value,[`${f}--disabled`]:l.value})}),x=()=>{C.value.value=null,C.value.click()},N=z=>{var B;if(e.selectChange&&((B=e.selectChange)==null?void 0:B.call(e,z))===!1)return!1;const{files:H}=z.target;n("change",Array.from(H))},E=()=>{e.disabled||x()},T=z=>{z.defaultPrevented||z.target!==z.currentTarget||((z.code==="Enter"||z.code==="Space")&&x(),z.preventDefault())};function R(z,H){n("remove",z,H),H.stopPropagation(),H.preventDefault()}function A(z,H){n("preview",z,[z],H),H.stopPropagation(),H.preventDefault()}const I=a.ref(!1),k=()=>{const z=Ce=>{var Y;if(l.value)return;if(Ce.preventDefault(),I.value=!1,e.selectChange&&((Y=e.selectChange)==null?void 0:Y.call(e,Ce))===!1)return!1;const W=Array.from(Ce.dataTransfer.files);n("change",W)},H=Ce=>{Ce.preventDefault(),I.value=!0},B=()=>{I.value=!1},te=nt({[`${f}__draggable`]:!0});return a.createVNode("div",{class:te,onDragleave:B,onDragover:H,onDrop:z},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Il,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},V=()=>a.createVNode(a.Fragment,null,[_.value&&e.file?M(e.file):L()]),L=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(Zl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),M=z=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:z.url},null),[[a.vShow,z.status!=="uploading"]]),a.createVNode(a.Fragment,null,[z.status==="uploading"&&a.createVNode(Pl,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:z.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[h.value&&a.createVNode(Co,{class:"action-icon",onClick:H=>A(z,H)},null),a.createVNode(uo,{class:"action-icon",onClick:H=>R(z,H)},null)])])],P=()=>a.createVNode(vn,{disabled:l.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Il,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),F=()=>{if(p.value)return P();if(g.value)return k();if(w.value)return V()};return()=>{var z;return a.createVNode("div",{class:S.value,tabindex:"0",onClick:E,onKeydown:T},[t.trigger?[t.trigger(),(z=t==null?void 0:t.default)==null?void 0:z.call(t)]:F(),a.createVNode("input",{ref:C,class:`${f}__input-file`,accept:b.value,disabled:l.value,multiple:d.value,tabindex:"-1",type:"file",onChange:N},null)])}}});var P3={exports:{}},Xy;function _q(){return Xy||(Xy=1,(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(C,S){var x=C[0],N=C[1],E=C[2],T=C[3];x+=(N&E|~N&T)+S[0]-680876936|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[1]-389564586|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[2]+606105819|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[3]-1044525330|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[4]-176418897|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[5]+1200080426|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[6]-1473231341|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[7]-45705983|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[8]+1770035416|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[9]-1958414417|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[10]-42063|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[11]-1990404162|0,N=(N<<22|N>>>10)+E|0,x+=(N&E|~N&T)+S[12]+1804603682|0,x=(x<<7|x>>>25)+N|0,T+=(x&N|~x&E)+S[13]-40341101|0,T=(T<<12|T>>>20)+x|0,E+=(T&x|~T&N)+S[14]-1502002290|0,E=(E<<17|E>>>15)+T|0,N+=(E&T|~E&x)+S[15]+1236535329|0,N=(N<<22|N>>>10)+E|0,x+=(N&T|E&~T)+S[1]-165796510|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[6]-1069501632|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[11]+643717713|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[0]-373897302|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[5]-701558691|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[10]+38016083|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[15]-660478335|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[4]-405537848|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[9]+568446438|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[14]-1019803690|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[3]-187363961|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[8]+1163531501|0,N=(N<<20|N>>>12)+E|0,x+=(N&T|E&~T)+S[13]-1444681467|0,x=(x<<5|x>>>27)+N|0,T+=(x&E|N&~E)+S[2]-51403784|0,T=(T<<9|T>>>23)+x|0,E+=(T&N|x&~N)+S[7]+1735328473|0,E=(E<<14|E>>>18)+T|0,N+=(E&x|T&~x)+S[12]-1926607734|0,N=(N<<20|N>>>12)+E|0,x+=(N^E^T)+S[5]-378558|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[8]-2022574463|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[11]+1839030562|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[14]-35309556|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[1]-1530992060|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[4]+1272893353|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[7]-155497632|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[10]-1094730640|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[13]+681279174|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[0]-358537222|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[3]-722521979|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[6]+76029189|0,N=(N<<23|N>>>9)+E|0,x+=(N^E^T)+S[9]-640364487|0,x=(x<<4|x>>>28)+N|0,T+=(x^N^E)+S[12]-421815835|0,T=(T<<11|T>>>21)+x|0,E+=(T^x^N)+S[15]+530742520|0,E=(E<<16|E>>>16)+T|0,N+=(E^T^x)+S[2]-995338651|0,N=(N<<23|N>>>9)+E|0,x+=(E^(N|~T))+S[0]-198630844|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[7]+1126891415|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[14]-1416354905|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[5]-57434055|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[12]+1700485571|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[3]-1894986606|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[10]-1051523|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[1]-2054922799|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[8]+1873313359|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[15]-30611744|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[6]-1560198380|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[13]+1309151649|0,N=(N<<21|N>>>11)+E|0,x+=(E^(N|~T))+S[4]-145523070|0,x=(x<<6|x>>>26)+N|0,T+=(N^(x|~E))+S[11]-1120210379|0,T=(T<<10|T>>>22)+x|0,E+=(x^(T|~N))+S[2]+718787259|0,E=(E<<15|E>>>17)+T|0,N+=(T^(E|~x))+S[9]-343485551|0,N=(N<<21|N>>>11)+E|0,C[0]=x+C[0]|0,C[1]=N+C[1]|0,C[2]=E+C[2]|0,C[3]=T+C[3]|0}function s(C){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=C.charCodeAt(x)+(C.charCodeAt(x+1)<<8)+(C.charCodeAt(x+2)<<16)+(C.charCodeAt(x+3)<<24);return S}function l(C){var S=[],x;for(x=0;x<64;x+=4)S[x>>2]=C[x]+(C[x+1]<<8)+(C[x+2]<<16)+(C[x+3]<<24);return S}function c(C){var S=C.length,x=[1732584193,-271733879,-1732584194,271733878],N,E,T,R,A,I;for(N=64;N<=S;N+=64)i(x,s(C.substring(N-64,N)));for(C=C.substring(N-64),E=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N=0;N<E;N+=1)T[N>>2]|=C.charCodeAt(N)<<(N%4<<3);if(T[N>>2]|=128<<(N%4<<3),N>55)for(i(x,T),N=0;N<16;N+=1)T[N]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),A=parseInt(R[2],16),I=parseInt(R[1],16)||0,T[14]=A,T[15]=I,i(x,T),x}function d(C){var S=C.length,x=[1732584193,-271733879,-1732584194,271733878],N,E,T,R,A,I;for(N=64;N<=S;N+=64)i(x,l(C.subarray(N-64,N)));for(C=N-64<S?C.subarray(N-64):new Uint8Array(0),E=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N=0;N<E;N+=1)T[N>>2]|=C[N]<<(N%4<<3);if(T[N>>2]|=128<<(N%4<<3),N>55)for(i(x,T),N=0;N<16;N+=1)T[N]=0;return R=S*8,R=R.toString(16).match(/(.*?)(.{0,8})$/),A=parseInt(R[2],16),I=parseInt(R[1],16)||0,T[14]=A,T[15]=I,i(x,T),x}function m(C){var S="",x;for(x=0;x<4;x+=1)S+=r[C>>x*8+4&15]+r[C>>x*8&15];return S}function h(C){var S;for(S=0;S<C.length;S+=1)C[S]=m(C[S]);return C.join("")}h(c("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function C(S,x){return S=S|0||0,S<0?Math.max(S+x,0):Math.min(S,x)}ArrayBuffer.prototype.slice=function(S,x){var N=this.byteLength,E=C(S,N),T=N,R,A,I,k;return x!==n&&(T=C(x,N)),E>T?new ArrayBuffer(0):(R=T-E,A=new ArrayBuffer(R),I=new Uint8Array(A),k=new Uint8Array(this,E,R),I.set(k),A)}})();function f(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function p(C,S){var x=C.length,N=new ArrayBuffer(x),E=new Uint8Array(N),T;for(T=0;T<x;T+=1)E[T]=C.charCodeAt(T);return S?E:N}function g(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function w(C,S,x){var N=new Uint8Array(C.byteLength+S.byteLength);return N.set(new Uint8Array(C)),N.set(new Uint8Array(S),C.byteLength),N}function _(C){var S=[],x=C.length,N;for(N=0;N<x-1;N+=2)S.push(parseInt(C.substr(N,2),16));return String.fromCharCode.apply(String,S)}function b(){this.reset()}return b.prototype.append=function(C){return this.appendBinary(f(C)),this},b.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var S=this._buff.length,x;for(x=64;x<=S;x+=64)i(this._hash,s(this._buff.substring(x-64,x)));return this._buff=this._buff.substring(x-64),this},b.prototype.end=function(C){var S=this._buff,x=S.length,N,E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(N=0;N<x;N+=1)E[N>>2]|=S.charCodeAt(N)<<(N%4<<3);return this._finish(E,x),T=h(this._hash),C&&(T=_(T)),this.reset(),T},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(C,S){var x=S,N,E,T;if(C[x>>2]|=128<<(x%4<<3),x>55)for(i(this._hash,C),x=0;x<16;x+=1)C[x]=0;N=this._length*8,N=N.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(N[2],16),T=parseInt(N[1],16)||0,C[14]=E,C[15]=T,i(this._hash,C)},b.hash=function(C,S){return b.hashBinary(f(C),S)},b.hashBinary=function(C,S){var x=c(C),N=h(x);return S?_(N):N},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(C){var S=w(this._buff.buffer,C),x=S.length,N;for(this._length+=C.byteLength,N=64;N<=x;N+=64)i(this._hash,l(S.subarray(N-64,N)));return this._buff=N-64<x?new Uint8Array(S.buffer.slice(N-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(C){var S=this._buff,x=S.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E,T;for(E=0;E<x;E+=1)N[E>>2]|=S[E]<<(E%4<<3);return this._finish(N,x),T=h(this._hash),C&&(T=_(T)),this.reset(),T},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var C=b.prototype.getState.call(this);return C.buff=g(C.buff),C},b.ArrayBuffer.prototype.setState=function(C){return C.buff=p(C.buff,!0),b.prototype.setState.call(this,C)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(C,S){var x=d(new Uint8Array(C)),N=h(x);return S?_(N):N},b})})(P3)),P3.exports}var Nq=_q();const Jy=bn(Nq),Oi="An error occurred during upload";function Sl(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const xq=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,i=r==="formdata";t.upload&&t.upload.addEventListener("progress",c=>{const d=c;d.percent=c.total>0?c.loaded/c.total*100:0,e.onProgress(d)});const s=new FormData;if(i&&e.data){let c=e.data;Array.isArray(c)||(c=[c]),c.forEach(d=>{for(const[m,h]of Object.entries(d))Array.isArray(h)?s.append(m,...h):s.append(m,h)})}if(i&&e.formDataAttributes){let c=e.formDataAttributes;Array.isArray(c)||(c=[c]),c.forEach(d=>{Array.isArray(d.value)?s.append(d.name,...d.value):s.append(d.name,d.value)})}if(i&&s.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let c=new Error(Oi);const d=Sl(t);d&&(c=new Error(d.message||Oi)),console.log(d,c),e.onError(c)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const c=Sl(t);let d=new Error(Oi);return c&&(d=new Error(c.message||Oi)),e.onError(d)}e.onSuccess(Sl(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(c=>{const d=c.name,m=c.value;t.setRequestHeader(d,m)});else{const c=e.header.name,d=e.header.value;t.setRequestHeader(c,d)}const l=e.headers||{};if(l instanceof Headers)l.forEach((c,d)=>t.setRequestHeader(d,c));else for(const[c,d]of Object.entries(l))tb(d)||t.setRequestHeader(c,String(d));return t.send(i?s:e.file),t},m_=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,Sq=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),i=await Eq(n,t),s=[];Tq(e,n,r,i,s,t),await Promise.all(s).then(()=>{const l={size:n.size,name:n.name,total:r,hash:i},c=new XMLHttpRequest;c.open(e.method,e.mergeUrl,!0),c.onreadystatechange=()=>{if(c.readyState===4){const d=Sl(c);if(c.status<200||c.status>=300){let m=new Error(Oi);return d&&(m=new Error(d.message||Oi)),e.onError(m)}e.onSuccess(d)}},c.onloadend=()=>{e.onComplete()},c.setRequestHeader("Content-type","application/JSON"),c.send(JSON.stringify(l))})},Tq=(e,t,n,r,i,s)=>{for(let l=0;l<n;l++){const c=new Promise((d,m)=>{const h=l*s,f=Math.min(t.size,h+s),p=new FormData;if(e.data){let _=e.data;Array.isArray(_)||(_=[_]),_.forEach(b=>{for(const[C,S]of Object.entries(b))Array.isArray(S)?p.append(C,...S):p.append(C,S)})}if(e.formDataAttributes){let _=e.formDataAttributes;Array.isArray(_)||(_=[_]),_.forEach(b=>{Array.isArray(b.value)?p.append(b.name,...b.value):p.append(b.name,b.value)})}p.append("file",m_.call(t,h,f)),p.append("name",t.name),p.append("total",n.toString()),p.append("index",l.toString()),p.append("size",t.size.toString()),p.append("hash",r.toString());const g=new XMLHttpRequest;if(g.onreadystatechange=()=>{if(g.readyState===4){const _=Sl(g);if(g.status<200||g.status>=300){m(_);let b=new Error(Oi);_&&(b=new Error(_.message||Oi)),e.onError(b)}else d("reponseText")}},g.upload.addEventListener("progress",_=>{const b=_;e.onProgress(b,l)},!1),e.withCredentials&&"withCredentials"in g&&(g.withCredentials=!0),g.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(_=>{const b=_.name,C=_.value;g.setRequestHeader(b,C)});else{const _=e.header.name,b=e.header.value;g.setRequestHeader(_,b)}const w=e.headers||{};if(w instanceof Headers)w.forEach((_,b)=>g.setRequestHeader(b,_));else for(const[_,b]of Object.entries(w))tb(b)||g.setRequestHeader(_,String(b));g.send(p)});i.push(c)}},Eq=(e,t)=>new Promise((n,r)=>{const i=Math.ceil(e.size/t);let s=0;const l=new Jy.ArrayBuffer,c=new FileReader;function d(){const m=s*t,h=m+t>=e.size?e.size:m+t;c.readAsArrayBuffer(m_.call(e,m,h))}c.onload=m=>{if(l.append(m.target.result),s+=1,s<i)d();else{const h=l.end(),f=new Jy;f.append(h),f.append(e.name);const p=f.end();n(p)}},c.onerror=()=>{r(new Error("File slice failed"))},d()}).catch(n=>{console.log(n)});function Zy(e){return Date.now()+e}const Oq=(e,t)=>{const n=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),r=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),i=a.ref([]);function s(p){return i.value.find(g=>g.uid===p.uid)}let l=0;function c(p){var b;l+=1,p.uid=Zy(l);const g={uid:p.uid,name:p.name,status:zs.NEW,size:p.size,raw:p},w=p.type.startsWith("image/");let _=null;if(w){try{g.url=window.URL.createObjectURL(p)}catch(C){console.error(C)}g.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(g.name))&&(g.status=zs.FAIL,g.statusText="invalid filename",_=new Error(g.statusText)),w&&p.size>n.value*1024**2&&(g.status=zs.FAIL,g.statusText="invalid file size",_=new Error(g.statusText)),!w&&p.size>r.value*1024**2&&(g.status=zs.FAIL,g.statusText="invalid file size",_=new Error(g.statusText)),i.value.push(g),_}async function d(p){var _;const g=p instanceof File?s(p):p,w=b=>{var C;t.onRemove(b,i.value),i.value.splice(i.value.indexOf(g),1),(C=b.url)!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((_=e.beforeRemove)==null?void 0:_.call(e,g,i.value))!==!1&&w(g):w(g)}async function m(p,g,w){const _=s(g);_&&(_.status="fail",_.statusText=p.message,_.response=w)}async function h(p,g){const w=s(g);w&&(w.status="success",w.response=p)}async function f(p,g){const w=s(g);w&&(w.status="uploading",w.percentage=Math.round(p.percent))}return a.watch(()=>e.files,p=>{i.value=p.map(g=>(l+=1,{...g,uid:g.uid??Zy(l),status:g.status??zs.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:i,handlePreprocess:c,handleRemove:d,handleError:m,handleSuccess:h,handleProgress:f}},Aq=a.defineComponent({name:"Upload",props:Pr,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:i}=Re(),s=a.shallowRef({}),l=a.computed(()=>e.theme===Ya.PICTURE),c=a.computed(()=>l.value&&!e.multiple),d=a.computed(()=>nt({[`${i(ts)}`]:!0,[`${i(ts)}--${e.theme}`]:!0,[`${i(ts)}--disabled`]:e.disabled,[`${i(ts)}--single-picture`]:c.value,[e.extCls]:e.extCls??!1})),m=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function h(R,A){T(R),n("delete",R,A)}const{fileList:f,handlePreprocess:p,handleRemove:g,handleProgress:w,handleSuccess:_,handleError:b}=Oq(e,{onRemove:h});function C(R){if(!R.length)return;if(e.limit>1&&f.value.length+R.length>e.limit){n("exceed",R,f.value);return}!e.multiple&&e.limit===1&&(f.value=[]);let A=R;(!e.multiple||e.limit===1)&&(A=R.slice(0,1));for(const I of A){const k=I,V=p(k);if(V){n("error",k,f.value,V);return}e.autoUpload&&N(k,A)}}function S(R,A){n("preview",R,A)}function x(R){E(R.raw)}async function N(R,A){var k;if(!e.beforeUpload)return E(R,A);let I;try{I=await((k=e.beforeUpload)==null?void 0:k.call(e,R,A))}catch{I=!1}if(I===!1){g(R);return}E(R,A)}function E(R,A){const{type:I,headers:k,header:V,data:L,formDataAttributes:M,method:P,withCredentials:F,name:z,url:H,sliceUrl:B,mergeUrl:te,chunkSize:Ce,customRequest:W}=e,{uid:Y}=R,q={type:I,headers:k,header:V,withCredentials:F,file:R,data:L,formDataAttributes:M,method:P,filename:z,action:H,sliceUrl:B,mergeUrl:te,chunkSize:Ce,onProgress:se=>{w(se,R),n("progress",se,R,f.value)},onSuccess:se=>{var le;const ge=se;if((le=e==null?void 0:e.handleResCode)!=null&&le.call(e,ge))_(se,R),n("success",se,R,f.value);else{const de=new Error((ge==null?void 0:ge.message)||"unknow error");b(de,R,se),n("error",R,f.value,de)}delete s.value[Y]},onError:se=>{b(se,R),n("error",R,f.value,se),delete s.value[Y]},onComplete:()=>{A&&A.indexOf(R)===A.length-1&&n("done",f.value)}};let re=e.sliceUpload?Sq:xq;W&&(re=W);const Z=re(q);s.value[Y]=Z,Z instanceof Promise&&Z.then(q.onSuccess,q.onError)}function T(R){let A=s.value;R&&(A={[R.uid]:s.value[R.uid]}),Object.keys(A).forEach(I=>{if(A[I]instanceof XMLHttpRequest){const k=A[I];k==null||k.abort()}delete s.value[I]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:R})=>{R!=null&&R.startsWith("blob:")&&URL.revokeObjectURL(R)})}),r({handlePreview:S,handleRemove:g,handleRetry:x}),()=>a.createVNode("div",{class:d.value},[!l.value&&a.createVNode(Yy,a.mergeProps(m.value,{onChange:C}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${i(ts)}__tip`},[e.tip]),a.createVNode(Cq,{disabled:e.disabled,files:f.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:S,onRemove:g,onRetry:x},{innerTrigger:R=>l.value&&a.createVNode(Yy,a.mergeProps(m.value,{file:R,onChange:C,onPreview:S,onRemove:g}),t),file:t.file})])}}),p_=bt(Aq),$3=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:_9,Affix:Jb,Alert:Qb,AnimateNumber:e7,Backtop:t7,Badge:n7,Breadcrumb:a7,Button:vn,Card:T7,Cascader:lw,Checkbox:Bn,CodeDiff:gw,Collapse:yw,ColorPicker:Fw,ConfigProvider:Xb,Container:Hw,DatePicker:Mw,Dialog:zw,Divider:Uw,Dropdown:Ww,Exception:cf,FixedNavbar:jw,Form:Gw,InfoBox:Yw,Input:Di,Link:Jw,Loading:Ka,Menu:Qw,Message:oC,Modal:ic,Navigation:lC,Notify:uC,OverflowTitle:S9,Pagination:j9,PopConfirm:dC,Popover:sr,Popover2:fC,Process:hC,Progress:Pl,Radio:ju,Rate:vC,ResizeLayout:yC,SearchSelect:AC,Select:A9,Sideslider:DC,Slider:RC,Steps:VC,Swiper:MC,Switcher:kC,Tab:HC,Table:r_,Tag:Ml,TagInput:rw,TimePicker:a_,Timeline:i_,Transfer:s_,Tree:h_,Upload:p_,VirtualRender:rc,scrollbar:_C},Symbol.toStringTag,{value:"Module"})),Qy=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys($3).forEach(i=>{const s=$3[i];"install"in s?t.use(s,{prefix:r}):t.component(r+i,$3[i])}),n&&$6(n,t)},Lq={createInstall:Qy,install:Qy()},g_="2.0.2-beta.98";window.__bkui_vue_version__=g_;exports.$bkPopover=_9;exports.Affix=Jb;exports.Alert=Qb;exports.AnimateNumber=e7;exports.Backtop=t7;exports.Badge=n7;exports.Breadcrumb=a7;exports.Button=vn;exports.Card=T7;exports.Cascader=lw;exports.Checkbox=Bn;exports.CodeDiff=gw;exports.Collapse=yw;exports.ColorPicker=Fw;exports.ConfigProvider=Xb;exports.Container=Hw;exports.DatePicker=Mw;exports.Dialog=zw;exports.Divider=Uw;exports.Dropdown=Ww;exports.Exception=cf;exports.FixedNavbar=jw;exports.Form=Gw;exports.InfoBox=Yw;exports.Input=Di;exports.Link=Jw;exports.Loading=Ka;exports.Menu=Qw;exports.Message=oC;exports.Modal=ic;exports.Navigation=lC;exports.Notify=uC;exports.OverflowTitle=S9;exports.Pagination=j9;exports.PopConfirm=dC;exports.Popover=sr;exports.Popover2=fC;exports.Process=hC;exports.Progress=Pl;exports.Radio=ju;exports.Rate=vC;exports.ResizeLayout=yC;exports.SearchSelect=AC;exports.Select=A9;exports.Sideslider=DC;exports.Slider=RC;exports.Steps=VC;exports.Swiper=MC;exports.Switcher=kC;exports.Tab=HC;exports.Table=r_;exports.Tag=Ml;exports.TagInput=rw;exports.TimePicker=a_;exports.Timeline=i_;exports.Transfer=s_;exports.Tree=h_;exports.Upload=p_;exports.VirtualRender=rc;exports.bkEllipsis=rM;exports.bkEllipsisInstance=N9;exports.bkLoading=s7;exports.bkTooltips=sa;exports.clickoutside=Za;exports.default=Lq;exports.defaultRootConfig=ds;exports.mousewheel=hM;exports.overflowTitle=CM;exports.provideGlobalConfig=$6;exports.rootProviderKey=oo;exports.scrollbar=_C;exports.setPrefixVariable=W3;exports.useGlobalConfig=zD;exports.useLocale=Ft;exports.usePrefix=Re;exports.version=g_;
|