@cldemo/ui-kit 1.0.17 → 1.1.1
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/COMPONENT_CATALOG.md +5 -5
- package/README.md +15 -69
- package/buildLibs/{mobile/BallColor4-DpnfFrBL.js → all/BallColor4-CYDMNYIL.js} +1 -1
- package/buildLibs/all/{BallColor4-DkQt6rSf.cjs → BallColor4-CaqTfMcX.cjs} +1 -1
- package/buildLibs/all/{ToastRing-B-erJp2o.js → ToastRing-BW0hddZN.js} +1 -1
- package/buildLibs/{web/ToastRing-DKVLp5rZ.cjs → all/ToastRing-DqiGLTLN.cjs} +1 -1
- package/buildLibs/all/{Video-BwDG93FI.cjs → Video-BV-GRW4X.cjs} +1 -1
- package/buildLibs/all/{Video-CMkViuqG.js → Video-Bbk0_YWw.js} +1 -1
- package/buildLibs/all/index-Cap0WJgK.cjs +14 -0
- package/buildLibs/all/{index-DA_I2NVO.js → index-sPYdePtz.js} +17012 -16694
- package/buildLibs/all/index.cjs +1 -1
- package/buildLibs/all/index.css +1 -1
- package/buildLibs/all/index.js +75 -75
- package/buildLibs/common/Common/Element/Event/drag.d.ts +7 -1
- package/buildLibs/common/Common/Tools/device.d.ts +2 -2
- package/buildLibs/common/Common/base.d.ts +2 -2
- package/buildLibs/common/Common/browserProgress.d.ts +3 -1
- package/buildLibs/common/Common/globalConfig.d.ts +18 -3
- package/buildLibs/common/Element/Event/drag.cjs +1 -1
- package/buildLibs/common/Element/Event/drag.js +26 -14
- package/buildLibs/common/Tools/device.cjs +1 -1
- package/buildLibs/common/Tools/device.js +27 -27
- package/buildLibs/common/axios.cjs +1 -1
- package/buildLibs/common/axios.js +20 -14
- package/buildLibs/common/base.cjs +1 -1
- package/buildLibs/common/base.js +10 -10
- package/buildLibs/common/browserProgress.cjs +1 -1
- package/buildLibs/common/browserProgress.js +24 -15
- package/buildLibs/common/day.js +14 -5
- package/buildLibs/{web/BallColor4-BahMtWFj.cjs → mobile/BallColor4-C7lQaABY.cjs} +1 -1
- package/buildLibs/{all/BallColor4-UHANgP7D.js → mobile/BallColor4-DogqtiHo.js} +1 -1
- package/buildLibs/mobile/{ToastRing-hBf9THbv.cjs → ToastRing-BQAASeWu.cjs} +1 -1
- package/buildLibs/mobile/{ToastRing-Dj7ooJtL.js → ToastRing-ZSOlED5s.js} +1 -1
- package/buildLibs/mobile/{index-BugOQA6Z.js → index-Bh4jt080.js} +7986 -7774
- package/buildLibs/mobile/index-DmdxP8hd.cjs +10 -0
- package/buildLibs/mobile/index.cjs +1 -1
- package/buildLibs/mobile/index.css +1 -1
- package/buildLibs/mobile/index.js +67 -67
- package/buildLibs/modules/actionSheet.js +5 -5
- package/buildLibs/modules/anchorNav.js +4 -4
- package/buildLibs/modules/backTop.js +3 -3
- package/buildLibs/modules/badge.js +1 -1
- package/buildLibs/modules/banner.js +4 -4
- package/buildLibs/modules/breadcrumb.js +3 -3
- package/buildLibs/modules/button.js +1 -1
- package/buildLibs/modules/calendar.js +32 -32
- package/buildLibs/modules/calendarM.js +61 -65
- package/buildLibs/modules/callout.js +2 -2
- package/buildLibs/modules/card.js +1 -1
- package/buildLibs/modules/cardColor.js +2 -2
- package/buildLibs/modules/cell.js +3 -3
- package/buildLibs/modules/cellSwipe.js +2 -2
- package/buildLibs/modules/checkbox.js +1 -1
- package/buildLibs/modules/checkboxOne.js +1 -1
- package/buildLibs/modules/clipboard.js +1 -1
- package/buildLibs/modules/codeLegend.js +3 -3
- package/buildLibs/modules/codeLegendM.js +4 -4
- package/buildLibs/modules/collapse.js +3 -3
- package/buildLibs/modules/colorPicker.js +8 -8
- package/buildLibs/modules/countDown.js +2 -2
- package/buildLibs/modules/cropper.js +1 -1
- package/buildLibs/modules/cropperM.js +6 -6
- package/buildLibs/modules/cropperPreview.js +6 -6
- package/buildLibs/modules/darg.js +2 -2
- package/buildLibs/modules/dateTime.js +1 -1
- package/buildLibs/modules/divider.js +2 -80
- package/buildLibs/modules/dropdownMenu.js +110 -48
- package/buildLibs/modules/dropdownMenuItem.js +44 -27
- package/buildLibs/modules/dropdownMenuM.js +2 -2
- package/buildLibs/modules/dropdownMenuMItem.js +4 -4
- package/buildLibs/modules/dropdownPopup.js +3 -3
- package/buildLibs/modules/echarts.js +1 -1
- package/buildLibs/modules/echartsLineAxisTag.js +4 -4
- package/buildLibs/modules/ellipsis.js +1 -1
- package/buildLibs/modules/empty.js +2 -2
- package/buildLibs/modules/fileUpload.js +1 -1
- package/buildLibs/modules/floatBubble.cjs +5 -0
- package/buildLibs/modules/floatBubble.d.ts +1 -0
- package/buildLibs/modules/{floatingBubble.js → floatBubble.js} +39 -39
- package/buildLibs/modules/floatPanel.cjs +5 -0
- package/buildLibs/modules/floatPanel.d.ts +1 -0
- package/buildLibs/modules/{floatingPanel.js → floatPanel.js} +96 -96
- package/buildLibs/modules/form.js +1 -1
- package/buildLibs/modules/formGroupBtns.js +3 -3
- package/buildLibs/modules/formGroupHorizontal.js +1 -1
- package/buildLibs/modules/formGroupVertical.js +2 -2
- package/buildLibs/modules/formValidate.js +1 -1
- package/buildLibs/modules/framePhone.js +1 -1
- package/buildLibs/modules/grid.js +3 -3
- package/buildLibs/modules/iconFont.js +1 -1
- package/buildLibs/modules/image.js +1 -1
- package/buildLibs/modules/indexBar.js +2 -2
- package/buildLibs/modules/input.js +1 -1
- package/buildLibs/modules/inputCaptcha.js +3 -3
- package/buildLibs/modules/inputNumber.js +1 -1
- package/buildLibs/modules/inputNumberStepper.js +1 -1
- package/buildLibs/modules/inputPassword.js +4 -4
- package/buildLibs/modules/inputPin.cjs +5 -0
- package/buildLibs/modules/inputPin.d.ts +1 -0
- package/buildLibs/modules/inputPin.js +182 -0
- package/buildLibs/modules/inputSearch.js +1 -1
- package/buildLibs/modules/inputTag.js +1 -1
- package/buildLibs/modules/inputTextarea.js +1 -1
- package/buildLibs/modules/link.js +1 -1
- package/buildLibs/modules/load.js +1 -1
- package/buildLibs/modules/loadFullCenter.js +2 -2
- package/buildLibs/modules/loadIng.js +1 -1
- package/buildLibs/modules/loadScreen.js +4 -4
- package/buildLibs/modules/loadWarp.js +3 -3
- package/buildLibs/modules/modal.js +1 -1
- package/buildLibs/modules/navBar.js +3 -3
- package/buildLibs/modules/noticeBar.js +19 -19
- package/buildLibs/modules/notifyM.js +199 -97
- package/buildLibs/modules/numberKeyboard.js +36 -36
- package/buildLibs/modules/numberRoll.js +2 -2
- package/buildLibs/modules/overlay.js +1 -1
- package/buildLibs/modules/paginate.js +1 -1
- package/buildLibs/modules/picker.js +1 -1
- package/buildLibs/modules/pickerArea.cjs +5 -0
- package/buildLibs/modules/pickerArea.d.ts +1 -0
- package/buildLibs/modules/pickerArea.js +255 -0
- package/buildLibs/modules/pickerCascader.js +4 -4
- package/buildLibs/modules/pickerDate.js +71 -71
- package/buildLibs/modules/pickerTime.js +56 -56
- package/buildLibs/modules/popup.js +1 -1
- package/buildLibs/modules/portlet.js +2 -2
- package/buildLibs/modules/previewExample.js +1 -1
- package/buildLibs/modules/progress.js +3 -3
- package/buildLibs/modules/pullToRefresh.js +1 -1
- package/buildLibs/modules/radio.js +1 -1
- package/buildLibs/modules/radioOne.js +1 -1
- package/buildLibs/modules/rate.js +3 -3
- package/buildLibs/modules/scrollCard.js +220 -200
- package/buildLibs/modules/scrollXFence.js +1 -1
- package/buildLibs/modules/select.js +1 -1
- package/buildLibs/modules/selectCascade.js +1 -1
- package/buildLibs/modules/selectMove.js +8 -8
- package/buildLibs/modules/selectTag.js +1 -1
- package/buildLibs/modules/selectTree.js +6 -6
- package/buildLibs/modules/sharePanel.cjs +5 -0
- package/buildLibs/modules/sharePanel.d.ts +1 -0
- package/buildLibs/modules/{shareSheet.js → sharePanel.js} +52 -52
- package/buildLibs/modules/shared/{BallColor4-DLGMFp7g.js → BallColor4-Dw8bQzLW.js} +1 -1
- package/buildLibs/{utils/Shared/Base.vue_vue_type_script_setup_true_lang-Z6sD7O6T.js → modules/shared/Base.vue_vue_type_script_setup_true_lang-DaZg8_tt.js} +81 -70
- package/buildLibs/modules/shared/Column.vue_vue_type_script_setup_true_lang-rT_ICHhO.js +174 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B8nfrdHt.js → Index.vue_vue_type_script_setup_true_lang-5TIkYSxG.js} +2 -2
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Axa69KHA.js +939 -0
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZRko_Hq.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-B9M3m9HE.js} +6 -6
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CG4BhqfV.js → Index.vue_vue_type_script_setup_true_lang-BkR-sQJt.js} +2 -2
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-EjdgvHF5.js → Index.vue_vue_type_script_setup_true_lang-C1bquiI9.js} +2 -2
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-BvcWTBEv.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-C2EI2VnJ.js} +4 -4
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BH8ejOuv.js → Index.vue_vue_type_script_setup_true_lang-C5i17oB9.js} +5 -5
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-1gL-yfzx.js → Index.vue_vue_type_script_setup_true_lang-CQ-_RRa-.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CkUfNTb6.js → Index.vue_vue_type_script_setup_true_lang-CSV3c0_h.js} +3 -3
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-x28PWOid.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-CVSATrNA.js} +3 -3
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-XWxNmuC2.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-CYRh_OzP.js} +5 -5
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-BESTuFHY.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-CoQ8bldZ.js} +2 -2
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DTtbdgoO.js → Index.vue_vue_type_script_setup_true_lang-Cp5rYwnC.js} +28 -25
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CqIT3zxY.js +82 -0
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-D0LqAmBY.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D0_5BgAN.js} +9 -9
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-e41SaSkr.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D0oA7-eQ.js} +2 -2
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-CMK-TwEo.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D0s2DEcR.js} +13 -13
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D5akRc9d.js +380 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BgFzdwmp.js → Index.vue_vue_type_script_setup_true_lang-D6gcg5sW.js} +46 -46
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Cukt_Rkd.js → Index.vue_vue_type_script_setup_true_lang-D8H72Fc9.js} +2 -2
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DEi_COkc.js → Index.vue_vue_type_script_setup_true_lang-DB10zsLZ.js} +5 -5
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-BZSJp1GF.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-DBo8NT25.js} +3 -3
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-bmKRziC6.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-DG98f73r.js} +3 -3
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DKe5rvrv.js +213 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Dt9cW3rp.js → Index.vue_vue_type_script_setup_true_lang-DWJ1bJbw.js} +8 -8
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-iMbGY-sX.js → Index.vue_vue_type_script_setup_true_lang-DX5H6qmm.js} +108 -108
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-CVBKgYfQ.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-DapaVMSO.js} +2 -2
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-B0I5VIPk.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-DkCTGpCo.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Cy8lSIYw.js → Index.vue_vue_type_script_setup_true_lang-DpEMLNQd.js} +23 -18
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Bn3j7iE7.js → Index.vue_vue_type_script_setup_true_lang-DtsjjKBG.js} +6 -6
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-BBVM_RnZ.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-Dy6W7sIl.js} +5 -5
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-B9byrXKx.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-GSyMXu17.js} +22 -22
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BZHTSznV.js → Index.vue_vue_type_script_setup_true_lang-N3rQdrH6.js} +47 -50
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B0wTFrxX.js → Index.vue_vue_type_script_setup_true_lang-Ohuu4j9n.js} +54 -49
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-3KP-rPyM.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-UCm0Csto.js} +4 -4
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DcAEnje5.js → Index.vue_vue_type_script_setup_true_lang-X9pUZWHF.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BBiQbTaJ.js → Index.vue_vue_type_script_setup_true_lang-dwaD7E4N.js} +101 -98
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B7H-n7gl.js → Index.vue_vue_type_script_setup_true_lang-o-s4A6rG.js} +5 -5
- package/buildLibs/{utils/Shared/Ing.vue_vue_type_script_setup_true_lang-DprFXKbk.js → modules/shared/Ing.vue_vue_type_script_setup_true_lang-Bnc9BIaT.js} +3 -3
- package/buildLibs/modules/shared/{List.vue_vue_type_script_setup_true_lang-8UJTbHh3.js → List.vue_vue_type_script_setup_true_lang-1SlAzQsU.js} +4 -4
- package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-BiqtUBqP.js → One.vue_vue_type_script_setup_true_lang-BkfhsInn.js} +4 -4
- package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-C4lt4POB.js → One.vue_vue_type_script_setup_true_lang-rkbdx8Aq.js} +4 -4
- package/buildLibs/modules/shared/{Popup.vue_vue_type_script_setup_true_lang-CeZQDd0z.js → Popup.vue_vue_type_script_setup_true_lang-YVBgERG9.js} +3 -3
- package/buildLibs/{utils/Shared/ToastRing-CqDvSDSQ.js → modules/shared/ToastRing-DZoETg0y.js} +1 -1
- package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-Clw81Klm.js → Validate.vue_vue_type_script_setup_true_lang-FZ6qiA6w.js} +6 -6
- package/buildLibs/modules/shared/{base-C5l51ld_.js → base-fr2I80sU.js} +10 -10
- package/buildLibs/modules/shared/{day-Bfolruvp.js → day-B3hhmAm_.js} +15 -6
- package/buildLibs/modules/shared/drag-BBk0X740.js +53 -0
- package/buildLibs/modules/shared/focusTrap-BYhFRjSm.js +82 -0
- package/buildLibs/modules/shared/{index-wdK75uN2.js → index-B477PjJ3.js} +1 -1
- package/buildLibs/modules/shared/{index-Clwouce_.js → index-C91QEnIE.js} +2 -2
- package/buildLibs/modules/shared/{language-TSK4pJka.js → language-pMmux6Js.js} +2 -2
- package/buildLibs/modules/shared/{resize-5FVpVwWr.js → resize-CyrJxi6F.js} +2 -2
- package/buildLibs/modules/shared/{use-Cn_GITQ7.js → use-CRdlCpEV.js} +1 -1
- package/buildLibs/modules/sideMenu.js +4 -4
- package/buildLibs/modules/sidebar.js +2 -2
- package/buildLibs/modules/sidebarSelect.js +3 -3
- package/buildLibs/modules/signature.js +34 -34
- package/buildLibs/modules/slider.js +1 -1
- package/buildLibs/modules/steps.js +45 -41
- package/buildLibs/modules/swipe.js +2 -2
- package/buildLibs/modules/switchery.js +3 -3
- package/buildLibs/modules/tabM.js +2 -2
- package/buildLibs/modules/tabbar.js +4 -4
- package/buildLibs/modules/table.js +12 -12
- package/buildLibs/modules/tableEdit.js +2 -2
- package/buildLibs/modules/tableSimple.js +2 -2
- package/buildLibs/modules/tabs.js +5 -5
- package/buildLibs/modules/tags.js +1 -1
- package/buildLibs/modules/textHighlight.js +2 -2
- package/buildLibs/modules/toast.js +4 -4
- package/buildLibs/modules/tree.js +1 -1
- package/buildLibs/modules/ui-kit.css +1 -1
- package/buildLibs/modules/waterfall.js +3 -3
- package/buildLibs/modules/waterfallImage.js +1 -1
- package/buildLibs/modules/watermark.js +2 -2
- package/buildLibs/modules/weekHour.js +5 -5
- package/buildLibs/modules/xEditable.js +21 -21
- package/buildLibs/resolver/index.cjs +1 -1
- package/buildLibs/resolver/index.js +5 -5
- package/buildLibs/styles/Common/Overlay-base.css +59 -0
- package/buildLibs/styles/Common/Token.css +135 -122
- package/buildLibs/styles/Common/meta.json +19 -2
- package/buildLibs/styles/Element/ClButton.css +0 -31
- package/buildLibs/styles/Element/ClDivider.css +53 -7
- package/buildLibs/styles/Element/ClFormGroupBtns.css +5 -5
- package/buildLibs/styles/Element/ClFormGroupHorizontal.css +5 -5
- package/buildLibs/styles/Element/ClLoadFullCenter.css +0 -31
- package/buildLibs/styles/Element/ClLoadScreen.css +0 -31
- package/buildLibs/styles/Element/ClModal.css +0 -40
- package/buildLibs/styles/Element/ClTags.css +123 -28
- package/buildLibs/styles/Mobile/ClCodeLegendM.css +5 -5
- package/buildLibs/styles/Mobile/ClCropperM.css +2 -0
- package/buildLibs/styles/Mobile/ClFloatBubble.css +18 -0
- package/buildLibs/styles/Mobile/ClFloatPanel.css +86 -0
- package/buildLibs/styles/Mobile/ClInputPin.css +104 -0
- package/buildLibs/styles/Mobile/ClNoticeBar.css +5 -5
- package/buildLibs/styles/Mobile/ClNotifyM.css +50 -2
- package/buildLibs/styles/Mobile/ClNumberKeyboard.css +3 -31
- package/buildLibs/styles/Mobile/ClPickerArea.css +286 -0
- package/buildLibs/styles/Mobile/ClPickerCascader.css +17 -5
- package/buildLibs/styles/Mobile/ClPullToRefresh.css +1 -1
- package/buildLibs/styles/Mobile/ClScrollCard.css +159 -11
- package/buildLibs/styles/Mobile/ClSharePanel.css +202 -0
- package/buildLibs/styles/Mobile/ClSidebarSelect.css +5 -0
- package/buildLibs/styles/Mobile/ClSteps.css +24 -14
- package/buildLibs/styles/Mobile/ClTextHighlight.css +2 -2
- package/buildLibs/styles/Mobile/__provide__/NotifyM.css +50 -2
- package/buildLibs/styles/Web/ClColorpicker.css +8 -7
- package/buildLibs/styles/Web/ClCropper.css +0 -40
- package/buildLibs/styles/Web/ClCropperPreview.css +0 -40
- package/buildLibs/styles/Web/ClDatetime.css +8 -38
- package/buildLibs/styles/Web/ClDropdownMenu.css +90 -7
- package/buildLibs/styles/Web/ClDropdownPopup.css +8 -7
- package/buildLibs/styles/Web/ClEchartsLineAxisTag.css +0 -31
- package/buildLibs/styles/Web/ClFileUpload.css +0 -31
- package/buildLibs/styles/Web/ClInputTag.css +131 -35
- package/buildLibs/styles/Web/ClPaginate.css +131 -35
- package/buildLibs/styles/Web/ClSelect.css +131 -35
- package/buildLibs/styles/Web/ClSelectCascade.css +131 -35
- package/buildLibs/styles/Web/ClSelectTree.css +8 -7
- package/buildLibs/styles/Web/ClSelectmove.css +8 -7
- package/buildLibs/styles/Web/ClTable.css +131 -35
- package/buildLibs/styles/Web/ClXeditable.css +131 -66
- package/buildLibs/styles/Web/__provide__/Alert.css +0 -40
- package/buildLibs/styles/Web/__provide__/Preview.css +0 -31
- package/buildLibs/types/Common/Element/Event/drag.d.ts +7 -1
- package/buildLibs/types/Common/Tools/device.d.ts +2 -2
- package/buildLibs/types/Common/base.d.ts +2 -2
- package/buildLibs/types/Common/browserProgress.d.ts +3 -1
- package/buildLibs/types/Common/day.d.ts +2 -2
- package/buildLibs/types/Common/globalConfig.d.ts +18 -3
- package/buildLibs/types/Element/Overlay/Index.vue.d.ts +1 -1
- package/buildLibs/types/Element/Slider/Button.vue.d.ts +31 -0
- package/buildLibs/types/Element/Slider/Index.vue.d.ts +2 -0
- package/buildLibs/types/Element/Tags/Index.vue.d.ts +33 -3
- package/buildLibs/types/Element/core.d.ts +4 -2
- package/buildLibs/types/Element/installCommon.d.ts +10 -3
- package/buildLibs/types/Mobile/CalendarM/Panel.vue.d.ts +2 -2
- package/buildLibs/types/Mobile/DropdownMenuM/Item.vue.d.ts +1 -1
- package/buildLibs/types/Mobile/{FloatingBubble → FloatBubble}/Index.vue.d.ts +3 -3
- package/buildLibs/types/Mobile/{InputOtp → InputPin}/Index.vue.d.ts +11 -0
- package/buildLibs/types/Mobile/NoticeBar/Index.vue.d.ts +3 -3
- package/buildLibs/types/Mobile/NotifyM/Index.vue.d.ts +20 -0
- package/buildLibs/types/Mobile/NumberKeyboard/Index.vue.d.ts +4 -4
- package/buildLibs/types/Mobile/Picker/Column.vue.d.ts +9 -9
- package/buildLibs/types/Mobile/Picker/Index.vue.d.ts +18 -18
- package/buildLibs/types/Mobile/{AreaM → PickerArea}/Index.vue.d.ts +4 -4
- package/buildLibs/types/Mobile/PickerCascader/Index.vue.d.ts +1 -1
- package/buildLibs/types/Mobile/PickerDate/Index.vue.d.ts +16 -16
- package/buildLibs/types/Mobile/PickerTime/Index.vue.d.ts +16 -16
- package/buildLibs/types/Mobile/Popup/Index.vue.d.ts +1 -1
- package/buildLibs/types/Mobile/ScrollCard/Index.vue.d.ts +33 -20
- package/buildLibs/types/Mobile/{ShareSheet → SharePanel}/Index.vue.d.ts +5 -5
- package/buildLibs/types/Mobile/Signature/Index.vue.d.ts +3 -3
- package/buildLibs/types/Mobile/components.d.ts +5 -5
- package/buildLibs/types/Use/focusTrap.d.ts +13 -0
- package/buildLibs/types/Web/DropdownLayer/Base.vue.d.ts +9 -0
- package/buildLibs/types/Web/DropdownMenu/Index.vue.d.ts +12 -0
- package/buildLibs/utils/Element/ClBadge.cjs +1 -1
- package/buildLibs/utils/Element/ClBadge.js +1 -1
- package/buildLibs/utils/Element/ClBreadcrumb.cjs +1 -1
- package/buildLibs/utils/Element/ClBreadcrumb.js +3 -3
- package/buildLibs/utils/Element/ClButton.cjs +1 -1
- package/buildLibs/utils/Element/ClButton.js +2 -1
- package/buildLibs/utils/Element/ClCallout.cjs +1 -1
- package/buildLibs/utils/Element/ClCallout.js +2 -2
- package/buildLibs/utils/Element/ClCard.cjs +1 -1
- package/buildLibs/utils/Element/ClCard.js +1 -1
- package/buildLibs/utils/Element/ClCardColor.cjs +1 -1
- package/buildLibs/utils/Element/ClCardColor.js +2 -2
- package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckbox.js +1 -1
- package/buildLibs/utils/Element/ClCheckboxOne.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckboxOne.js +1 -1
- package/buildLibs/utils/Element/ClClipboard.cjs +1 -1
- package/buildLibs/utils/Element/ClClipboard.js +1 -1
- package/buildLibs/utils/Element/ClCollapse.cjs +1 -1
- package/buildLibs/utils/Element/ClCollapse.js +3 -3
- package/buildLibs/utils/Element/ClCountDown.cjs +1 -1
- package/buildLibs/utils/Element/ClCountDown.js +2 -2
- package/buildLibs/utils/Element/ClDarg.cjs +1 -1
- package/buildLibs/utils/Element/ClDarg.js +2 -2
- package/buildLibs/utils/Element/ClDivider.cjs +1 -1
- package/buildLibs/utils/Element/ClDivider.js +2 -80
- package/buildLibs/utils/Element/ClEllipsis.cjs +1 -1
- package/buildLibs/utils/Element/ClEllipsis.js +1 -1
- package/buildLibs/utils/Element/ClEmpty.cjs +1 -1
- package/buildLibs/utils/Element/ClEmpty.js +2 -2
- package/buildLibs/utils/Element/ClForm.cjs +1 -1
- package/buildLibs/utils/Element/ClForm.js +1 -1
- package/buildLibs/utils/Element/ClFormGroupBtns.cjs +1 -1
- package/buildLibs/utils/Element/ClFormGroupBtns.js +3 -3
- package/buildLibs/utils/Element/ClFormGroupHorizontal.cjs +1 -1
- package/buildLibs/utils/Element/ClFormGroupHorizontal.js +1 -1
- package/buildLibs/utils/Element/ClFormGroupVertical.cjs +1 -1
- package/buildLibs/utils/Element/ClFormGroupVertical.js +2 -2
- package/buildLibs/utils/Element/ClFormValidate.cjs +1 -1
- package/buildLibs/utils/Element/ClFormValidate.js +1 -1
- package/buildLibs/utils/Element/ClIconFont.cjs +1 -1
- package/buildLibs/utils/Element/ClIconFont.js +1 -1
- package/buildLibs/utils/Element/ClImage.cjs +1 -1
- package/buildLibs/utils/Element/ClImage.js +1 -1
- package/buildLibs/utils/Element/ClInput.cjs +1 -1
- package/buildLibs/utils/Element/ClInput.js +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.js +3 -3
- package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumber.js +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
- package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
- package/buildLibs/utils/Element/ClInputPassword.js +4 -4
- package/buildLibs/utils/Element/ClInputPin.css +1 -0
- package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
- package/buildLibs/utils/Element/ClInputSearch.js +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
- package/buildLibs/utils/Element/ClLink.cjs +1 -1
- package/buildLibs/utils/Element/ClLink.js +1 -1
- package/buildLibs/utils/Element/ClLoad.cjs +1 -1
- package/buildLibs/utils/Element/ClLoad.js +1 -1
- package/buildLibs/utils/Element/ClLoadFullCenter.cjs +1 -1
- package/buildLibs/utils/Element/ClLoadFullCenter.js +3 -2
- package/buildLibs/utils/Element/ClLoadIng.cjs +1 -1
- package/buildLibs/utils/Element/ClLoadIng.js +1 -1
- package/buildLibs/utils/Element/ClLoadScreen.cjs +1 -1
- package/buildLibs/utils/Element/ClLoadScreen.css +1 -0
- package/buildLibs/utils/Element/ClLoadScreen.js +73 -2
- package/buildLibs/utils/Element/ClLoadWarp.cjs +1 -1
- package/buildLibs/utils/Element/ClLoadWarp.js +3 -3
- package/buildLibs/utils/Element/ClModal.cjs +1 -1
- package/buildLibs/utils/Element/ClModal.js +2 -1
- package/buildLibs/utils/Element/ClNumberRoll.cjs +1 -1
- package/buildLibs/utils/Element/ClNumberRoll.js +2 -2
- package/buildLibs/utils/Element/ClOverlay.cjs +1 -1
- package/buildLibs/utils/Element/ClOverlay.js +2 -2
- package/buildLibs/utils/Element/ClProgress.cjs +1 -1
- package/buildLibs/utils/Element/ClProgress.js +3 -3
- package/buildLibs/utils/Element/ClRadio.cjs +1 -1
- package/buildLibs/utils/Element/ClRadio.js +1 -1
- package/buildLibs/utils/Element/ClRadioOne.cjs +1 -1
- package/buildLibs/utils/Element/ClRadioOne.js +1 -1
- package/buildLibs/utils/Element/ClSlider.cjs +1 -1
- package/buildLibs/utils/Element/ClSlider.js +1 -1
- package/buildLibs/utils/Element/ClSwitchery.cjs +1 -1
- package/buildLibs/utils/Element/ClSwitchery.js +3 -3
- package/buildLibs/utils/Element/ClTags.cjs +1 -1
- package/buildLibs/utils/Element/ClTags.js +1 -1
- package/buildLibs/utils/Element/ClWaterfall.cjs +1 -1
- package/buildLibs/utils/Element/ClWaterfall.js +3 -3
- package/buildLibs/utils/Element/ClWaterfallImage.cjs +1 -1
- package/buildLibs/utils/Element/ClWaterfallImage.js +1 -1
- package/buildLibs/utils/Mobile/ClActionSheet.cjs +1 -1
- package/buildLibs/utils/Mobile/ClActionSheet.js +5 -5
- package/buildLibs/utils/Mobile/ClBackTop.cjs +1 -1
- package/buildLibs/utils/Mobile/ClBackTop.js +3 -3
- package/buildLibs/utils/Mobile/ClBanner.cjs +1 -1
- package/buildLibs/utils/Mobile/ClBanner.js +4 -4
- package/buildLibs/utils/Mobile/ClCalendarM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCalendarM.js +61 -65
- package/buildLibs/utils/Mobile/ClCell.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCell.js +3 -3
- package/buildLibs/utils/Mobile/ClCellSwipe.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCellSwipe.js +2 -2
- package/buildLibs/utils/Mobile/ClCodeLegendM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCodeLegendM.js +4 -4
- package/buildLibs/utils/Mobile/ClCropperM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCropperM.js +6 -6
- package/buildLibs/utils/Mobile/ClDropdownMenuM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClDropdownMenuM.js +2 -2
- package/buildLibs/utils/Mobile/ClDropdownMenuMItem.cjs +1 -1
- package/buildLibs/utils/Mobile/ClDropdownMenuMItem.js +4 -4
- package/buildLibs/utils/Mobile/ClFloatBubble.cjs +1 -0
- package/buildLibs/utils/Mobile/ClFloatBubble.css +1 -0
- package/buildLibs/utils/Mobile/ClFloatBubble.d.ts +1 -0
- package/buildLibs/utils/Mobile/{ClFloatingBubble.js → ClFloatBubble.js} +40 -40
- package/buildLibs/utils/Mobile/ClFloatPanel.cjs +1 -0
- package/buildLibs/utils/Mobile/ClFloatPanel.css +1 -0
- package/buildLibs/utils/Mobile/ClFloatPanel.d.ts +1 -0
- package/buildLibs/utils/Mobile/{ClFloatingPanel.js → ClFloatPanel.js} +97 -97
- package/buildLibs/utils/Mobile/ClGrid.cjs +1 -1
- package/buildLibs/utils/Mobile/ClGrid.js +3 -3
- package/buildLibs/utils/Mobile/ClIndexBar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClIndexBar.js +2 -2
- package/buildLibs/utils/Mobile/ClInputPin.cjs +1 -0
- package/buildLibs/utils/Mobile/ClInputPin.d.ts +1 -0
- package/buildLibs/utils/Mobile/ClInputPin.js +184 -0
- package/buildLibs/utils/Mobile/ClNavBar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNavBar.js +3 -3
- package/buildLibs/utils/Mobile/ClNoticeBar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNoticeBar.css +1 -1
- package/buildLibs/utils/Mobile/ClNoticeBar.js +19 -19
- package/buildLibs/utils/Mobile/ClNotifyM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNotifyM.js +2 -1
- package/buildLibs/utils/Mobile/ClNumberKeyboard.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNumberKeyboard.js +37 -36
- package/buildLibs/utils/Mobile/ClPicker.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPicker.js +1 -1
- package/buildLibs/utils/Mobile/ClPickerArea.cjs +1 -0
- package/buildLibs/utils/Mobile/ClPickerArea.css +1 -0
- package/buildLibs/utils/Mobile/ClPickerArea.d.ts +1 -0
- package/buildLibs/utils/Mobile/ClPickerArea.js +257 -0
- package/buildLibs/utils/Mobile/ClPickerCascader.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPickerCascader.css +1 -1
- package/buildLibs/utils/Mobile/ClPickerCascader.js +4 -4
- package/buildLibs/utils/Mobile/ClPickerDate.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPickerDate.js +71 -71
- package/buildLibs/utils/Mobile/ClPickerTime.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPickerTime.js +56 -56
- package/buildLibs/utils/Mobile/ClPopup.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPopup.js +1 -1
- package/buildLibs/utils/Mobile/ClPullToRefresh.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPullToRefresh.js +1 -1
- package/buildLibs/utils/Mobile/ClRate.cjs +1 -1
- package/buildLibs/utils/Mobile/ClRate.js +3 -3
- package/buildLibs/utils/Mobile/ClScrollCard.cjs +1 -1
- package/buildLibs/utils/Mobile/ClScrollCard.css +1 -1
- package/buildLibs/utils/Mobile/ClScrollCard.js +220 -200
- package/buildLibs/utils/Mobile/ClSharePanel.cjs +1 -0
- package/buildLibs/utils/Mobile/ClSharePanel.css +1 -0
- package/buildLibs/utils/Mobile/ClSharePanel.d.ts +1 -0
- package/buildLibs/utils/Mobile/{ClShareSheet.js → ClSharePanel.js} +53 -53
- package/buildLibs/utils/Mobile/ClSidebar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSidebar.js +2 -2
- package/buildLibs/utils/Mobile/ClSidebarSelect.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSidebarSelect.css +1 -1
- package/buildLibs/utils/Mobile/ClSidebarSelect.js +3 -3
- package/buildLibs/utils/Mobile/ClSignature.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSignature.js +34 -34
- package/buildLibs/utils/Mobile/ClSteps.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSteps.css +1 -1
- package/buildLibs/utils/Mobile/ClSteps.js +45 -41
- package/buildLibs/utils/Mobile/ClSwipe.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSwipe.js +2 -2
- package/buildLibs/utils/Mobile/ClTabM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClTabM.js +2 -2
- package/buildLibs/utils/Mobile/ClTabbar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClTabbar.js +4 -4
- package/buildLibs/utils/Mobile/ClTextHighlight.cjs +1 -1
- package/buildLibs/utils/Mobile/ClTextHighlight.css +1 -1
- package/buildLibs/utils/Mobile/ClTextHighlight.js +2 -2
- package/buildLibs/utils/Mobile/ClToast.cjs +1 -1
- package/buildLibs/utils/Mobile/ClToast.js +1 -1
- package/buildLibs/utils/Mobile/ClWatermark.cjs +1 -1
- package/buildLibs/utils/Mobile/ClWatermark.js +2 -2
- package/buildLibs/utils/Mobile/__provide__/NotifyM.cjs +1 -1
- package/buildLibs/utils/Mobile/__provide__/NotifyM.js +2 -1
- package/buildLibs/utils/Mobile/__provide__/Toast.cjs +1 -1
- package/buildLibs/utils/Mobile/__provide__/Toast.js +1 -1
- package/buildLibs/utils/Shared/{BallColor4-C2XdKmEn.js → BallColor4-BgsHLeZA.js} +1 -1
- package/buildLibs/utils/Shared/{BallColor4-Ds3O9chf.js → BallColor4-qLMVzbAS.js} +1 -1
- package/buildLibs/utils/Shared/Base.css +1 -1
- package/buildLibs/utils/Shared/Base.vue_vue_type_script_setup_true_lang-5_vbZ_4R.js +1 -0
- package/buildLibs/{modules/shared/Base.vue_vue_type_script_setup_true_lang-4j7ikB3n.js → utils/Shared/Base.vue_vue_type_script_setup_true_lang-BReU8HHD.js} +81 -70
- package/buildLibs/utils/Shared/BaseTransition.vue_vue_type_script_setup_true_lang-CmETUA__.js +1 -0
- package/buildLibs/utils/Shared/BaseTransition.vue_vue_type_script_setup_true_lang-D4VcdHQo.js +193 -0
- package/buildLibs/utils/Shared/Column.css +1 -0
- package/buildLibs/utils/Shared/Column.vue_vue_type_script_setup_true_lang-ByGDRcgX.js +1 -0
- package/buildLibs/utils/Shared/Column.vue_vue_type_script_setup_true_lang-dm0Ii8XP.js +174 -0
- package/buildLibs/utils/Shared/Index.css +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BHO4QsuM.js → Index.vue_vue_type_script_setup_true_lang-08Gdtb7o.js} +101 -98
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Bexqe3oM.js → Index.vue_vue_type_script_setup_true_lang-0GHFohjQ.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DGMzmwmG.js → Index.vue_vue_type_script_setup_true_lang-0xVPFBUW.js} +7 -8
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BY5YgoqV.js → Index.vue_vue_type_script_setup_true_lang-8-8svPDH.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-DqUgH7kW.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-B-K0phQ2.js} +4 -4
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DsWuFFm8.js → Index.vue_vue_type_script_setup_true_lang-B-LBJS_U.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dn2mAxQN.js → Index.vue_vue_type_script_setup_true_lang-B0NaQAuE.js} +5 -5
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Bh9eiZXZ.js → Index.vue_vue_type_script_setup_true_lang-B2cccX6M.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DImXx9OJ.js → Index.vue_vue_type_script_setup_true_lang-B2kyuq50.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DXQ2H_E6.js → Index.vue_vue_type_script_setup_true_lang-B4dpfPSy.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-B-QoYEZX.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-B5MSug5Q.js} +5 -5
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BmA34nLj.js → Index.vue_vue_type_script_setup_true_lang-B9xISM7N.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-BDCMqHLL.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-BAUA1fQJ.js} +2 -2
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-Dn7loQye.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-BFq7G64T.js} +22 -22
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BwvnxiF-.js → Index.vue_vue_type_script_setup_true_lang-BJuly3Dc.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BLoX4k7J.js +213 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-1634m2dj.js → Index.vue_vue_type_script_setup_true_lang-BLr46kTp.js} +8 -8
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-W7-2HMLt.js → Index.vue_vue_type_script_setup_true_lang-BO2XU-fq.js} +4 -4
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRJ2Ll2r.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRyvdWb7.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-n7xMYytH.js → Index.vue_vue_type_script_setup_true_lang-BTikeo7T.js} +5 -5
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DeQDuJWX.js → Index.vue_vue_type_script_setup_true_lang-BXQl9ZJr.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-B5STWqf2.js → Index.vue_vue_type_script_setup_true_lang-BahSP_of.js} +22 -17
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BbxnIsLt.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-Co1P4Ez3.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-Bd56L0m6.js} +5 -5
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-Ix_0hpqL.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-BhGGH7ms.js} +13 -13
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Bn3f-2m-.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C8n67_vn.js → Index.vue_vue_type_script_setup_true_lang-BppPP2_o.js} +5 -5
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DkvbBq5f.js → Index.vue_vue_type_script_setup_true_lang-BsE_zUs_.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BWhUEMe2.js → Index.vue_vue_type_script_setup_true_lang-BxWYROZH.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Bp1npEqw.js → Index.vue_vue_type_script_setup_true_lang-C1Z3g7mN.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DARNgU78.js → Index.vue_vue_type_script_setup_true_lang-C242QFDV.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ZN6OLOcr.js → Index.vue_vue_type_script_setup_true_lang-CAEbDVL3.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DG2gOqUV.js → Index.vue_vue_type_script_setup_true_lang-CDslbo4h.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CFNQBTiQ.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-eYOa2n8R.js → Index.vue_vue_type_script_setup_true_lang-CIky1_fS.js} +28 -25
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DkO0Tw8l.js → Index.vue_vue_type_script_setup_true_lang-COprcd8r.js} +46 -46
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CPwtuGiA.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-BdU06Zy_.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQVg87mD.js} +3 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DnB4CiG6.js → Index.vue_vue_type_script_setup_true_lang-CSt6K9AQ.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CyRAlV4P.js → Index.vue_vue_type_script_setup_true_lang-Cb49VSDS.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DD7Wsxy0.js → Index.vue_vue_type_script_setup_true_lang-CgNMWZqs.js} +53 -48
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-4r0yj-AP.js → Index.vue_vue_type_script_setup_true_lang-Cm8_ZNJ7.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CnLyIXBs.js +939 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-BI_FbhEm.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CtBOIjdU.js} +6 -6
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cw8P2xE-.js → Index.vue_vue_type_script_setup_true_lang-Cx56SGXr.js} +47 -50
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzw8LxdI.js → Index.vue_vue_type_script_setup_true_lang-CyYCIkzr.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-v03zJOqX.js → Index.vue_vue_type_script_setup_true_lang-D15_sdie.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CUGhrsCV.js → Index.vue_vue_type_script_setup_true_lang-D3h6Q_pB.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DnLaqNB3.js → Index.vue_vue_type_script_setup_true_lang-D4BokTL9.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-afm0gWnG.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-D53FO2PF.js} +4 -4
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D8TDafMl.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DAuZLHen.js +277 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DBEuF9lY.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-t2B1qQvc.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-DQBXyVuV.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DeqkYoiB.js → Index.vue_vue_type_script_setup_true_lang-DTnllTwD.js} +2 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DYj0GzN0.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZSulESm.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-Dq5DVoF_.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-DiFMOo2n.js} +9 -9
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BJw-_EOe.js → Index.vue_vue_type_script_setup_true_lang-DjwVdgdl.js} +6 -6
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DlFdXr6k.js +82 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DlaLkFjd.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dnw-Opme.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dk4V2JmM.js → Index.vue_vue_type_script_setup_true_lang-Dq-sCBRz.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CBIhuvnz.js → Index.vue_vue_type_script_setup_true_lang-DsTDQ4p-.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DtTJLC6m.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D3hrURiG.js → Index.vue_vue_type_script_setup_true_lang-Dyo4Sh1B.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Gp7OJJx5.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-COItePPk.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-K7pBVuwe.js} +3 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-24C15gSt.js → Index.vue_vue_type_script_setup_true_lang-M72THnHz.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-PQ1DyzI3.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-PraAnYLk.js} +3 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CcJjZsqO.js → Index.vue_vue_type_script_setup_true_lang-SE1_-Y3D.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C0GnaTPr.js → Index.vue_vue_type_script_setup_true_lang-WePMnXeI.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CyKHq3tv.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-afRTRRcb.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DaQXxBad.js → Index.vue_vue_type_script_setup_true_lang-b4R4PHf0.js} +108 -108
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CfIJDVo7.js → Index.vue_vue_type_script_setup_true_lang-bKzsLLvg.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Bat5bJ6h.js → Index.vue_vue_type_script_setup_true_lang-d8FRnWoo.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-oFF20mhc.js +152 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CDFEcM1i.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-qOys54ns.js} +3 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-bG1Y_BJw.js → Index.vue_vue_type_script_setup_true_lang-yQG3rOxU.js} +2 -2
- package/buildLibs/utils/Shared/Index10.css +1 -1
- package/buildLibs/utils/Shared/Index11.css +1 -1
- package/buildLibs/utils/Shared/Index12.css +1 -1
- package/buildLibs/utils/Shared/Index13.css +1 -1
- package/buildLibs/utils/Shared/Index14.css +1 -1
- package/buildLibs/utils/Shared/Index15.css +1 -1
- package/buildLibs/utils/Shared/Index16.css +1 -1
- package/buildLibs/utils/Shared/Index17.css +1 -1
- package/buildLibs/utils/Shared/Index18.css +1 -1
- package/buildLibs/utils/Shared/Index21.css +1 -1
- package/buildLibs/utils/Shared/Index23.css +1 -1
- package/buildLibs/utils/Shared/Index24.css +1 -1
- package/buildLibs/utils/Shared/Index25.css +1 -1
- package/buildLibs/utils/Shared/Index26.css +1 -1
- package/buildLibs/utils/Shared/Index27.css +1 -1
- package/buildLibs/utils/Shared/Index28.css +1 -1
- package/buildLibs/utils/Shared/Index29.css +1 -1
- package/buildLibs/utils/Shared/Index30.css +1 -1
- package/buildLibs/utils/Shared/Index31.css +1 -1
- package/buildLibs/utils/Shared/Index32.css +1 -1
- package/buildLibs/utils/Shared/Index33.css +1 -1
- package/buildLibs/utils/Shared/Index34.css +1 -1
- package/buildLibs/utils/Shared/Index35.css +1 -1
- package/buildLibs/utils/Shared/Index36.css +1 -1
- package/buildLibs/utils/Shared/Index37.css +1 -1
- package/buildLibs/utils/Shared/Index38.css +1 -1
- package/buildLibs/utils/Shared/Index5.css +1 -1
- package/buildLibs/utils/Shared/{Ing.vue_vue_type_script_setup_true_lang-D2lxtF5j.js → Ing.vue_vue_type_script_setup_true_lang-DPFunPx2.js} +1 -1
- package/buildLibs/{modules/shared/Ing.vue_vue_type_script_setup_true_lang-CbxKiYq1.js → utils/Shared/Ing.vue_vue_type_script_setup_true_lang-Zb0-4POE.js} +3 -3
- package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-B5YIPqGh.js → List.vue_vue_type_script_setup_true_lang-BLgui2Zv.js} +4 -4
- package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-bFNMd-te.js → List.vue_vue_type_script_setup_true_lang-DJAqJJnH.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-DQ_7aqC8.js → One.vue_vue_type_script_setup_true_lang-BC8yzPg5.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-DcjKaZQ_.js → One.vue_vue_type_script_setup_true_lang-BKTdt1M7.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-CmnkkHBx.js → One.vue_vue_type_script_setup_true_lang-BRIVGray.js} +3 -3
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-Bz2OX9PQ.js → One.vue_vue_type_script_setup_true_lang-Du9X7x9H.js} +3 -3
- package/buildLibs/utils/Shared/{Popup.vue_vue_type_script_setup_true_lang-gwQgBwlR.js → Popup.vue_vue_type_script_setup_true_lang-d2TT0lCU.js} +1 -1
- package/buildLibs/utils/Shared/{Popup.vue_vue_type_script_setup_true_lang-ltEkWlAH.js → Popup.vue_vue_type_script_setup_true_lang-hfNlyh_i.js} +3 -3
- package/buildLibs/{modules/shared/ToastRing-CLhmoOCN.js → utils/Shared/ToastRing-2rl8qS1H.js} +1 -1
- package/buildLibs/utils/Shared/{ToastRing-CUCc2KYf.js → ToastRing-B1qc5Ig_.js} +1 -1
- package/buildLibs/utils/Shared/Validate.vue_vue_type_script_setup_true_lang-DidPD12P.js +411 -0
- package/buildLibs/utils/Shared/Validate.vue_vue_type_script_setup_true_lang-DyOZ5QGN.js +1 -0
- package/buildLibs/utils/Shared/{Video-DlqsnyxL.js → Video-BBXD_6D-.js} +1 -1
- package/buildLibs/utils/Shared/{Video-yVSuj26v.js → Video-BillcMo0.js} +1 -1
- package/buildLibs/utils/Shared/{base-DmcbRUB5.js → base-DbuX_Y3x.js} +1 -1
- package/buildLibs/utils/Shared/{base-C5l51ld_.js → base-fr2I80sU.js} +10 -10
- package/buildLibs/utils/Shared/{day-Bfolruvp.js → day-B3hhmAm_.js} +15 -6
- package/buildLibs/utils/Shared/{day-C3XuCUKG.js → day-C_LrDb1h.js} +1 -1
- package/buildLibs/utils/Shared/drag-BB4KOliP.js +1 -0
- package/buildLibs/utils/Shared/drag-BBk0X740.js +53 -0
- package/buildLibs/utils/Shared/focusTrap-95OmT9bf.js +1 -0
- package/buildLibs/utils/Shared/focusTrap-BYhFRjSm.js +82 -0
- package/buildLibs/utils/Shared/{index-wdK75uN2.js → index-B477PjJ3.js} +1 -1
- package/buildLibs/utils/Shared/{index-CXRfOfiT.js → index-rFJmbgyH.js} +1 -1
- package/buildLibs/utils/Shared/language-Q4AGYtUe.js +1 -0
- package/buildLibs/utils/Shared/{index-DX8TWPlf.js → language-pMmux6Js.js} +151 -44
- package/buildLibs/utils/Shared/{resize-5FVpVwWr.js → resize-CyrJxi6F.js} +2 -2
- package/buildLibs/utils/Shared/{resize-BqfiqIio.js → resize-Ds0ycOGI.js} +1 -1
- package/buildLibs/utils/Shared/use-BBpYjALT.js +1 -0
- package/buildLibs/utils/Shared/{lazy--M9Mmsjn.js → use-CRdlCpEV.js} +48 -35
- package/buildLibs/utils/Web/ClAnchorNav.cjs +1 -1
- package/buildLibs/utils/Web/ClAnchorNav.js +3 -3
- package/buildLibs/utils/Web/ClCalendar.cjs +1 -1
- package/buildLibs/utils/Web/ClCalendar.js +32 -32
- package/buildLibs/utils/Web/ClCodeLegend.cjs +1 -1
- package/buildLibs/utils/Web/ClCodeLegend.js +3 -3
- package/buildLibs/utils/Web/ClCodeLegendM.css +1 -1
- package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
- package/buildLibs/utils/Web/ClColorPicker.js +8 -8
- package/buildLibs/utils/Web/ClCropper.cjs +1 -1
- package/buildLibs/utils/Web/ClCropper.js +2 -1
- package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.js +7 -6
- package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
- package/buildLibs/utils/Web/ClDateTime.js +2 -1
- package/buildLibs/utils/Web/ClDropdownMenu.cjs +1 -1
- package/buildLibs/utils/Web/ClDropdownMenu.css +1 -1
- package/buildLibs/utils/Web/ClDropdownMenu.js +110 -48
- package/buildLibs/utils/Web/ClDropdownMenuItem.cjs +1 -1
- package/buildLibs/utils/Web/ClDropdownMenuItem.js +44 -27
- package/buildLibs/utils/Web/ClDropdownPopup.cjs +1 -1
- package/buildLibs/utils/Web/ClDropdownPopup.js +3 -3
- package/buildLibs/utils/Web/ClEcharts.cjs +1 -1
- package/buildLibs/utils/Web/ClEcharts.js +1 -1
- package/buildLibs/utils/Web/ClEchartsLineAxisTag.cjs +1 -1
- package/buildLibs/utils/Web/ClEchartsLineAxisTag.js +5 -4
- package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
- package/buildLibs/utils/Web/ClFileUpload.js +2 -1
- package/buildLibs/utils/Web/ClFramePhone.cjs +1 -1
- package/buildLibs/utils/Web/ClFramePhone.js +1 -1
- package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
- package/buildLibs/utils/Web/ClInputTag.js +1 -1
- package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
- package/buildLibs/utils/Web/ClPaginate.js +1 -1
- package/buildLibs/utils/Web/ClPortlet.cjs +1 -1
- package/buildLibs/utils/Web/ClPortlet.js +2 -2
- package/buildLibs/utils/Web/ClPreviewExample.cjs +1 -1
- package/buildLibs/utils/Web/ClPreviewExample.js +1 -1
- package/buildLibs/utils/Web/ClScrollXFence.cjs +1 -1
- package/buildLibs/utils/Web/ClScrollXFence.js +1 -1
- package/buildLibs/utils/Web/ClSelect.cjs +1 -1
- package/buildLibs/utils/Web/ClSelect.js +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
- package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectMove.js +8 -8
- package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTag.js +1 -1
- package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTree.js +6 -6
- package/buildLibs/utils/Web/ClSideMenu.cjs +1 -1
- package/buildLibs/utils/Web/ClSideMenu.js +4 -4
- package/buildLibs/utils/Web/ClTable.cjs +1 -1
- package/buildLibs/utils/Web/ClTable.js +11 -11
- package/buildLibs/utils/Web/ClTableEdit.cjs +1 -1
- package/buildLibs/utils/Web/ClTableEdit.js +2 -2
- package/buildLibs/utils/Web/ClTableSimple.cjs +1 -1
- package/buildLibs/utils/Web/ClTableSimple.js +2 -2
- package/buildLibs/utils/Web/ClTabs.cjs +1 -1
- package/buildLibs/utils/Web/ClTabs.js +5 -5
- package/buildLibs/utils/Web/ClTree.cjs +1 -1
- package/buildLibs/utils/Web/ClTree.js +1 -1
- package/buildLibs/utils/Web/ClWeekHour.cjs +1 -1
- package/buildLibs/utils/Web/ClWeekHour.js +5 -5
- package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
- package/buildLibs/utils/Web/ClXEditable.js +22 -21
- package/buildLibs/utils/Web/__directive__/Tooltip.cjs +1 -1
- package/buildLibs/utils/Web/__directive__/Tooltip.js +2 -2
- package/buildLibs/utils/Web/__directive__/Waves.cjs +1 -1
- package/buildLibs/utils/Web/__directive__/Waves.js +1 -1
- package/buildLibs/utils/Web/__provide__/Alert.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Alert.js +5 -4
- package/buildLibs/utils/Web/__provide__/Notify.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Notify.js +3 -3
- package/buildLibs/utils/Web/__provide__/Preview.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Preview.js +7 -6
- package/buildLibs/web/BallColor4-Bk0PbmjR.js +36 -0
- package/buildLibs/{mobile/BallColor4-9BeLWzwc.cjs → web/BallColor4-CvdyEpUB.cjs} +1 -1
- package/buildLibs/web/ToastRing-DxVDUCSx.js +26 -0
- package/buildLibs/{all/ToastRing-C0GKGyt2.cjs → web/ToastRing-KEtXZej2.cjs} +1 -1
- package/buildLibs/web/{Video-DuP0_H4b.cjs → Video-7bB5a3gv.cjs} +1 -1
- package/buildLibs/web/{Video-BDwetEWQ.js → Video-D36W46Pk.js} +1 -1
- package/buildLibs/web/{index-DPNEslm1.js → index-ai_LrIsJ.js} +10664 -10473
- package/buildLibs/web/index-jOBQ0InH.cjs +12 -0
- package/buildLibs/web/index.cjs +1 -1
- package/buildLibs/web/index.css +1 -1
- package/buildLibs/web/index.js +1 -1
- package/docs/components/Element/Divider.md +5 -3
- package/docs/components/Element/Slider.md +1 -0
- package/docs/components/Element/Tags.md +34 -8
- package/docs/components/Mobile/{FloatingBubble.md → FloatBubble.md} +17 -17
- package/docs/components/Mobile/{FloatingPanel.md → FloatPanel.md} +30 -30
- package/docs/components/Mobile/{InputOtp.md → InputPin.md} +25 -12
- package/docs/components/Mobile/NoticeBar.md +4 -4
- package/docs/components/Mobile/NotifyM.md +11 -0
- package/docs/components/Mobile/NumberKeyboard.md +8 -8
- package/docs/components/Mobile/Picker.md +8 -8
- package/docs/components/Mobile/{AreaM.md → PickerArea.md} +12 -12
- package/docs/components/Mobile/PickerDate.md +5 -5
- package/docs/components/Mobile/PickerTime.md +5 -5
- package/docs/components/Mobile/ScrollCard.md +43 -10
- package/docs/components/Mobile/{ShareSheet.md → SharePanel.md} +11 -11
- package/docs/components/Mobile/Signature.md +3 -3
- package/docs/tokens/design-token.md +17 -2
- package/docs/tools/CommonDay.md +3 -3
- package/package.json +2 -1
- package/buildLibs/all/index-CS39FBSI.cjs +0 -14
- package/buildLibs/common/browserProgress.css +0 -1
- package/buildLibs/mobile/index-0Bk83khG.cjs +0 -10
- package/buildLibs/modules/areaM.cjs +0 -5
- package/buildLibs/modules/areaM.d.ts +0 -1
- package/buildLibs/modules/areaM.js +0 -255
- package/buildLibs/modules/floatingBubble.cjs +0 -5
- package/buildLibs/modules/floatingBubble.d.ts +0 -1
- package/buildLibs/modules/floatingPanel.cjs +0 -5
- package/buildLibs/modules/floatingPanel.d.ts +0 -1
- package/buildLibs/modules/inputOtp.cjs +0 -5
- package/buildLibs/modules/inputOtp.d.ts +0 -1
- package/buildLibs/modules/inputOtp.js +0 -175
- package/buildLibs/modules/shareSheet.cjs +0 -5
- package/buildLibs/modules/shareSheet.d.ts +0 -1
- package/buildLibs/modules/shared/Index-aam7IdIy.js +0 -174
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BBz5WLtl.js +0 -898
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CM64ExS-.js +0 -201
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Dt1s66Uw.js +0 -442
- package/buildLibs/modules/shared/drag-CBokh_eH.js +0 -41
- package/buildLibs/styles/Element/ClOverlay.css +0 -32
- package/buildLibs/utils/Element/ClDivider.css +0 -1
- package/buildLibs/utils/Element/ClInputOtp.css +0 -1
- package/buildLibs/utils/Element/__directive__/LazyImage.cjs +0 -1
- package/buildLibs/utils/Element/__directive__/LazyImage.d.ts +0 -1
- package/buildLibs/utils/Element/__directive__/LazyImage.js +0 -14
- package/buildLibs/utils/Element/__provide__/Clipboard.cjs +0 -1
- package/buildLibs/utils/Element/__provide__/Clipboard.d.ts +0 -1
- package/buildLibs/utils/Element/__provide__/Clipboard.js +0 -37
- package/buildLibs/utils/Element/__provide__/LanguagePack.cjs +0 -1
- package/buildLibs/utils/Element/__provide__/LanguagePack.d.ts +0 -1
- package/buildLibs/utils/Element/__provide__/LanguagePack.js +0 -28
- package/buildLibs/utils/Element/__provide__/LoadScreen.cjs +0 -1
- package/buildLibs/utils/Element/__provide__/LoadScreen.d.ts +0 -1
- package/buildLibs/utils/Element/__provide__/LoadScreen.js +0 -22
- package/buildLibs/utils/Element/__provide__/Validate.cjs +0 -1
- package/buildLibs/utils/Element/__provide__/Validate.d.ts +0 -1
- package/buildLibs/utils/Element/__provide__/Validate.js +0 -104
- package/buildLibs/utils/Mobile/ClAreaM.cjs +0 -1
- package/buildLibs/utils/Mobile/ClAreaM.css +0 -1
- package/buildLibs/utils/Mobile/ClAreaM.d.ts +0 -1
- package/buildLibs/utils/Mobile/ClAreaM.js +0 -257
- package/buildLibs/utils/Mobile/ClFloatingBubble.cjs +0 -1
- package/buildLibs/utils/Mobile/ClFloatingBubble.css +0 -1
- package/buildLibs/utils/Mobile/ClFloatingBubble.d.ts +0 -1
- package/buildLibs/utils/Mobile/ClFloatingPanel.cjs +0 -1
- package/buildLibs/utils/Mobile/ClFloatingPanel.css +0 -1
- package/buildLibs/utils/Mobile/ClFloatingPanel.d.ts +0 -1
- package/buildLibs/utils/Mobile/ClInputOtp.cjs +0 -1
- package/buildLibs/utils/Mobile/ClInputOtp.d.ts +0 -1
- package/buildLibs/utils/Mobile/ClInputOtp.js +0 -177
- package/buildLibs/utils/Mobile/ClShareSheet.cjs +0 -1
- package/buildLibs/utils/Mobile/ClShareSheet.css +0 -1
- package/buildLibs/utils/Mobile/ClShareSheet.d.ts +0 -1
- package/buildLibs/utils/Shared/Base.vue_vue_type_script_setup_true_lang-CiIYjt-L.js +0 -1
- package/buildLibs/utils/Shared/BaseTransition.vue_vue_type_script_setup_true_lang-BD35JTIP.js +0 -1
- package/buildLibs/utils/Shared/BaseTransition.vue_vue_type_script_setup_true_lang-DHyNMo5z.js +0 -255
- package/buildLibs/utils/Shared/Index-BBs91jFy.js +0 -174
- package/buildLibs/utils/Shared/Index-qL-h43DD.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-B9PGQ2ms.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BVFmiu-5.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BlFq1X5t.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Bo91q9Ij.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CIBERZly.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CKNVMM02.js +0 -74
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CrNoVcn8.js +0 -120
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CvgyjDiU.js +0 -898
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DGT_No-k.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DGXwL6RV.js +0 -201
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DIbQI2wQ.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DIdU8GIV.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKbCcnPs.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Db4Zb3Yy.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DcOTqPR-.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgWoxi-r.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DlvzgFMo.js +0 -175
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Drp93I0i.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-s0crAk8w.js +0 -1
- package/buildLibs/utils/Shared/Index39.css +0 -1
- package/buildLibs/utils/Shared/Validate.vue_vue_type_script_setup_true_lang-3Ig7bOGx.js +0 -1
- package/buildLibs/utils/Shared/Validate.vue_vue_type_script_setup_true_lang-57tbyvPI.js +0 -313
- package/buildLibs/utils/Shared/drag-CBokh_eH.js +0 -41
- package/buildLibs/utils/Shared/drag-CnnSwz5k.js +0 -1
- package/buildLibs/utils/Shared/index-C6VS0w0n.js +0 -1
- package/buildLibs/utils/Shared/language-BAyxuenq.js +0 -1
- package/buildLibs/utils/Shared/language-Br_W-GD8.js +0 -111
- package/buildLibs/utils/Shared/lazy-CHlfoPOo.js +0 -1
- package/buildLibs/utils/Shared/use-CaPct63w.js +0 -17
- package/buildLibs/utils/Shared/use-DpwlHmqI.js +0 -1
- package/buildLibs/web/BallColor4-B90sCDaX.js +0 -36
- package/buildLibs/web/ToastRing-DGR6ZoRQ.js +0 -26
- package/buildLibs/web/index-Bfw6k91_.cjs +0 -12
- /package/buildLibs/types/Mobile/{FloatingPanel → FloatPanel}/Index.vue.d.ts +0 -0
- /package/buildLibs/types/Mobile/{AreaM → PickerArea}/area-data.d.ts +0 -0
- /package/buildLibs/utils/Shared/{index40.css → index39.css} +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";var ur=Object.create;var Ya=Object.defineProperty;var dr=Object.getOwnPropertyDescriptor;var mr=Object.getOwnPropertyNames;var pr=Object.getPrototypeOf,fr=Object.prototype.hasOwnProperty;var hr=(a,l,o,t)=>{if(l&&typeof l=="object"||typeof l=="function")for(let s of mr(l))!fr.call(a,s)&&s!==o&&Ya(a,s,{get:()=>l[s],enumerable:!(t=dr(l,s))||t.enumerable});return a};var mt=(a,l,o)=>(o=a!=null?ur(pr(a)):{},hr(l||!a||!a.__esModule?Ya(o,"default",{value:a,enumerable:!0}):o,a));const e=require("vue"),De=require("dayjs");require("dayjs/locale/zh-cn.js");require("dayjs/locale/en.js");const gr=require("dayjs/plugin/localeData"),vr=require("dayjs/plugin/objectSupport"),yr=require("dayjs/plugin/isSameOrAfter"),kr=require("dayjs/plugin/isSameOrBefore"),Sr=require("dayjs/plugin/isoWeek"),br=require("dayjs/plugin/utc"),wr=require("dayjs/plugin/timezone"),Cr=require("@popperjs/core"),Er=require("vue-router"),ql={};function ca(a,l){ql[a]=l}class n{static getTypeof(l){return typeof l}static _toStringCall(l){return Object.prototype.toString.call(l)}static isUndefined(l){return this.getTypeof(l)==="undefined"||l===null}static isNaN(l){return Number.isNaN(Number(l))}static isFinite(l){return Number.isFinite(Number(l))}static isBoolean(l){return this.getTypeof(l)==="boolean"}static isString(l){return this.getTypeof(l)==="string"}static isNonEmptyString(l){return!!(this.isString(l)&&!this.isEmpty(l))}static isFunction(l){return this.getTypeof(l)==="function"}static isObject(l){return!this.isUndefined(l)&&this.getTypeof(l)==="object"}static isBlob(l){return this._toStringCall(l)==="[object Blob]"}static isFile(l){return this._toStringCall(l)==="[object File]"}static isNumber(l){let o=!1;return this.isString(l)?/^(-)?(([1-9]\d*)|0)(\.\d+)?$/.test(l):(this.getTypeof(l)==="number"&&(o=!0),o)}static isInt(l){return this.isUndefined(l)||typeof l!="string"&&typeof l!="number"?!1:/^[1-9]\d*$|^0$/.test(l.toString())}static isHtml(l){return/<[a-z][a-z0-9]*(?:\s[^>]*)?>|<\/[a-z][a-z0-9]*>/i.test(l)}static isHtmlPair(l){return this.isString(l)?/<([a-z][a-z0-9-]*)[^>]*>[\s\S]*?<\/\1>/i.test(l):!1}static isJson(l){let o=!1;if(this.isString(l))try{const t=JSON.parse(l);this.isObject(t)&&(o=!0)}catch{}else this.isObject(l)&&(o=!0);return o}static isWindow(l){return!this.isUndefined(l)&&l===l.window}static _isEmptyObject(l){return this.isUndefined(l)?!0:Object.keys(l).length===0}static isArray(l){return Array.isArray(l)&&this._toStringCall(l)==="[object Array]"}static isLocationLngLat(l){let o=!1;if(!this.isEmpty(l)){let t;if(this.isString(l)?t=this.split(l):this.isArray(l)?t=l:t=[],t.length===2){const s=t[0],i=t[1],u=/^-?(180(\.0+)?|1[0-7]?\d?(\.\d+)?|[1-9]?\d?(\.\d+)?)$/,c=/^-?(90(\.0+)?|[1-8]?\d?(\.\d+)?)$/;o=u.test(s)&&c.test(i)}}return o}static isEmpty(l,o){let t=this.isUndefined(l);if(!t){const s=this.getTypeof(l);if(this.isString(l)?t=this.trim(l).length===0:this.isArray(l)?t=l.length===0:s==="object"&&(this.isFile(l)?t=!1:t=this._isEmptyObject(l)),!t&&!this.isUndefined(o)){let i=l;this.isNumber(l)&&(i=i.toString());let u=o;this.isNumber(o)&&(u=u.toString()),t=this.isEqual(i,u)}}return t}static isEqual(l,o){return Object.is(l,o)}static isEqualArr(l,o,t=!1){let s=!1;const i=this.isEmpty(l),u=this.isEmpty(o);if(i&&u)s=!0;else if(l.length===o.length)if(s=!0,t){for(let c=0;c<l.length;c++)if(l[c].toString()!==o[c].toString()){s=!1;break}}else{const c=this.getArrConvertJson(o);for(let r=0;r<l.length;r++)if(!this.isExistJsonKey(c,l[r].toString())){s=!1;break}}else s=!1;return s}static isEqualList(l,o,t=["id"]){let s=!1;const i=this.isEmpty(l),u=this.isEmpty(o);if(i&&u)s=!0;else if(l.length===o.length){const c=l.map(r=>t.map(d=>r[d].toString()).join(","));s=!0,o.some(r=>{const d=t.map(m=>r[m].toString()).join(",");if(!this.isExistValue(c,d))return s=!1,!0})}else s=!1;return s}static isContainArr(l,o){let t=!1;const s=this.isEmpty(l),i=this.isEmpty(o);return s&&i?t=!0:l.length>=o.length?(t=!0,o.some(u=>{if(!this.isExistValue(l,u))return t=!1,!0})):t=!1,t}static isExistValue(l,o){return this.isUndefined(l)?!1:l.includes?l.includes(o):l.indexOf(o)>-1}static isExistJsonKey(l,o){return this.isUndefined(l)?!1:Object.prototype.hasOwnProperty.call(l,o)}static osType(){if(typeof navigator>"u")return{isTablet:!1,isIOS:!1,isAndroid:!1,isMobile:!1,isPc:!0};const l=navigator.userAgent,o=/(?:Android)/.test(l),t=/(?:Firefox)/.test(l),s=/(?:iPad|PlayBook)/.test(l)||o&&!/(?:Mobile)/.test(l)||t&&/(?:Tablet)/.test(l),i=/(?:iPhone)/.test(l)&&!s;return{isTablet:s,isIOS:i,isAndroid:o,isMobile:i||o,isPc:!i&&!o}}static trim(l){if(this.isUndefined(l))return l;const o=l.toString();return o.trim?o.trim():o.replace(/^\s+|\s+$/gm,"")}static split(l,o=",",t=!0){o===" "&&(t=!1);let s;if(this.isEmpty(l))s=[];else{let i=l;o===","&&(i=i.replace(/,/g,",")),s=i.toString().split(o)}return t&&(s=s.filter(i=>!this.isEmpty(i))),s}static kebabCase(l){const o=l.replace(/([A-Z])/g," $1").trim();return this.split(o," ",!1).join("-").toLowerCase()}static getByteLen(l){let o=0;for(let t=0;t<l.length;t+=1)l.charAt(t).match(/[^\x00-\xff]/gi)!==null?o+=3:o+=1;return o}static getJsonClone(l,o=!1,t={}){if(o)return this._getJsonCloneDeep(l,t);{const s=this.isUndefined(t.exclude)?[]:t.exclude;if(s.length===0)return this.getJsonMerge(l);{const i={};return Object.keys(l).forEach(u=>{this.isExistValue(s,u)||(i[u]=l[u])}),i}}}static _getJsonCloneDeep(l,o={}){const t=this.isArray(l)?[]:{},s=this.isUndefined(o.exclude)?[]:o.exclude;return Object.keys(l).forEach(i=>{if(s.length===0||!this.isExistValue(s,i)){const c=l[i];this.isUndefined(c)||!this.isObject(c)?this.isArray(c)?t[i]=this.getListClone(c,!0):t[i]=c:t[i]=this._getJsonCloneDeep(c)}}),t}static getJsonCloneByKeyArr(l,o){const t={};return o.forEach(s=>{const i=l[s];t[s]=this.isUndefined(i)?"":this.isObject(i)?this.getJsonClone(i):i}),t}static getJsonCloneByKeyJson(l,o){const t=Object.keys(o);return this.getJsonCloneByKeyArr(l,t)}static getJsonCloneByRemoveArr(l,o){const t={};return o.length===0?l:(Object.keys(l).forEach(s=>{this.isExistValue(o,s)||(t[s]=l[s])}),t)}static getStringByJson(l,o){return this.isObject(l)?Object.keys(l).filter(t=>l[t]).join(o):""}static getJsonMerge(...l){return Object.assign({},...l)}static getJsonReversal(l){const o={};return Object.keys(l).forEach(t=>{o[l[t]]=t}),o}static getJsonMergeDeep(...l){const o={},t=l.length;for(let s=0;s<t;s++)this._mergeJsonDeep(o,l[s]||{});return o}static _mergeJsonDeep(l,o){Object.keys(o).forEach(t=>{const s=o[t];this.isUndefined(s)?l[t]=s:this.isArray(s)?l[t]=this.getListClone(s,!0):this.isObject(s)&&this.isExistJsonKey(l,t)?this._mergeJsonDeep(l[t],s):l[t]=s})}static getJsonMap(l,o,t=!1){const s={};if(!this.isEmpty(l)&&!this._isEmptyObject(o))for(const[i,u]of Object.entries(o)){let c=u.toString(),r="";if(c.indexOf("|")>-1){const d=this.split(c,"|");c=d[0],r=d[1]}if(c.indexOf(".")>-1){const d=this.split(c,".");let m=this.getJsonClone(l,!0);d.forEach((p,f)=>{const h=m[p],g=this.isEmpty(h);f===d.length-1?this.isUndefined(h)?m=t?"":h:g?m="":r&&r.length>0?m=this.isEmpty(h)?"":this.getValueByFormat(h,r):m=h:m=g?{}:h}),s[i]=this.isString(m)?this.trim(m):m}else if(this.isExistJsonKey(l,c)){const d=l[c];let m;this.isUndefined(d)?m=t?"":d:r&&r.length>0?m=this.isEmpty(d)?"":this.getValueByFormat(d,r):m=d,s[i]=this.isString(m)?this.trim(m):m}else t&&(s[i]="")}return s}static getJsonByList(l,o,t=!1){const s={};if(!this.isEmpty(l)){const i=o&&!this.isEmpty(o)?o:"id";l.forEach(u=>{let c="";t?o&&(c=this.convertStringFormat(o,u)):c=this.isExistJsonKey(u,i)?u[i].toString():"",c.length>0&&(s[c]=this.getJsonClone(u))})}return s}static getJsonByArr(l){const o={};return this.isEmpty(l)||l.forEach(t=>{o[t]=t}),o}static getGroupByList(l,o){const t={};return this.isEmpty(l)||l.forEach(s=>{const i=this.isExistJsonKey(s,o)?s[o].toString():"";i.length>0&&(this.isExistJsonKey(t,i)||(t[i]=[]),t[i].push(this.getJsonClone(s)))}),t}static getJsonByBlob(l){return new Promise((o,t)=>{const s=new FileReader;s.onload=()=>{try{const i=JSON.parse(s.result);o(i)}catch(i){t(i)}},s.onerror=t,s.readAsText(l)})}static getBase64ByFile(l){return new Promise(o=>{let t=null;if(l instanceof Blob?t=l:l&&l.length>0&&(t=l[0]),!(t instanceof Blob)){o("");return}const s=new FileReader;s.onload=i=>{o(i.target.result)},s.onerror=()=>{o("")},s.readAsDataURL(t)})}static getTreeList(l){let o=[];const t=[],s={},i={};return this.isEmpty(l)||(l.forEach(u=>{const c=u.id.toString(),r=u.parentId.toString();r==="0"&&t.push(c),s[c]=u,this.isExistJsonKey(i,r)||(i[r]=[]),i[r].push(u)}),t.forEach(u=>{o=o.concat(this._recursionChild(u,i,s))})),{tree:o,group:i,json:s,list:l}}static getTreeLastParent(l,o,t=!0){let s=[];return this.isExistJsonKey(o,l)&&(s=this._recursionParent(l,o),t||s.splice(0,1),s.reverse()),s}static _recursionChild(l,o,t){const s=[],i=this.getJsonClone(t[l]);return this.isExistJsonKey(o,l)&&(i.list=[],o[l].forEach(c=>{const r=c.id.toString();i.list=i.list.concat(this._recursionChild(r,o,t))})),s.push(i),s}static _recursionParent(l,o){let t=[];if(this.isExistJsonKey(o,l)){const s=o[l],i=s.parentId.toString();t.push(s),t=t.concat(this._recursionParent(i,o))}return t}static getListByTree(l,o={}){const t=this.isEmpty(o.idKey)?"id":o.idKey,s=this.isEmpty(o.cKey)?"list":o.cKey,i=this.isEmpty(o.pKey)?"parentId":o.pKey,u=this.isEmpty(o.topPV)?"0":o.topPV;return this._recursionListByTree(l,u,{idKey:t,cKey:s,pKey:i})}static _recursionListByTree(l,o,t){const s=[];return l.forEach(i=>{const u=this.getJsonClone(i,!1,{exclude:[t.cKey]});u[t.pKey]=o;const c=this.isUndefined(i[t.cKey]);if(u.isLastLevel=c,s.push(u),!c){const r=this._recursionListByTree(i[t.cKey],u[t.idKey],t);s.push(...r)}}),s}static getListClone(l,o=!1){return this.isEmpty(l)?[]:l.map(t=>this.isObject(t)?this.getJsonClone(t,o):t)}static getListMergeDeep(l,o,t="id"){const s=[];if(l.length>0){const i=this.getJsonByList(o,t);l.forEach(u=>{let c={},r=u[t];this.isEmpty(r)||(r=r.toString(),c=this.isExistJsonKey(i,r)?i[r]:{});const d=this.getJsonMergeDeep(c,u);s.push(d)})}return s}static getRecursionParentList(l,o,t="parentId"){let s=[];const i=o.toString();if(i!=="0"&&this.isExistJsonKey(l,i)){const u=l[i];s.push(u);const c=u[t].toString(),r=this.getRecursionParentList(l,c);this.isEmpty(r)||(s=s.concat(r))}return s}static getListExistValue(l,o,t="id"){let s,i=-1;return this.isEmpty(l)||l.forEach((u,c)=>{this.isExistJsonKey(u,t)&&u[t].toString()===o.toString()&&(s=this.getJsonClone(u),i=c)}),i===-1?null:{info:s,inx:i}}static getArrClone(l){return this.isEmpty(l)?[]:l.map(o=>o)}static getArrByList(l,o="id"){const t=[];return this.isEmpty(l)||l.forEach(s=>{this.isExistJsonKey(s,o)&&t.push(s[o])}),t}static getArrRemoveById(l,o){if(this.isEmpty(o))return l;const t=[],s=this.isArray(o)?o:this.split(o.toString()),i=this.getArrConvertJson(s);return l.forEach(u=>{this.isExistJsonKey(i,u.toString())||t.push(u)}),t}static getArrByMinMax(l=1,o){const t=[];for(let s=l;s<=o;s+=1)t.push(s);return t}static getArrUnique(l){const o=[];if(l.length>0){const t={};let s=null;for(let i=0;i<l.length;i+=1)s=l[i],s!==null&&!t[s]&&(o.push(s),t[s]=!0)}return o}static getArrConvertJson(l){const o={};return l.forEach(t=>{o[t.toString()]=!0}),o}static getArrAsc(l,o){let t;switch(o){case"date":t=(s,i)=>Date.parse(s)-Date.parse(i);break;case"number":t=(s,i)=>s-i;break;default:t=(s,i)=>this._arrSortString(s.toString(),i.toString())}return l.sort(t)}static getArrDesc(l,o){let t;switch(o){case"date":t=(s,i)=>Date.parse(i)-Date.parse(s);break;case"number":t=(s,i)=>i-s;break;default:t=(s,i)=>this._arrSortString(i.toString(),s.toString())}return l.sort(t)}static _arrSortString(l,o){let t=0;for(let s=0;;s++){if(!l[s]||!o[s]){t=l.length-o.length;break}const i=l[s],u=this._getChartType(i),c=o[s],r=this._getChartType(c);if(u[0]===r[0]){if(i===c)continue;u[0]==="zh"?t=i.localeCompare(c):u[0]==="en"?t=i.charCodeAt(0)-c.charCodeAt(0):t=i-c;break}else{t=u[1]-r[1];break}}return t}static _getChartType(l){return/^[0-9]$/.test(l)?["number",100]:/^[a-zA-Z]$/.test(l)?["en",200]:/^[\u4e00-\u9fa5]$/.test(l)?["zh",300]:["others",999]}static getZeroCount(l){if(l<=0)return"";const o=[];for(let t=0;t<l;t+=1)o.push("0");return o.join("")}static getFillZero(l,o=2,t="l"){const s=this.getZeroCount(o),i=this.isEmpty(l)?"":l.toString();let u="",c="";return t==="l"?(u=s+i,c=u.substring(u.length-o)):(u=i.toString()+s,c=u.substring(0,o)),c}static getRandom(l=3){const o=l>0?l:1;let t=Math.random();return t=Math.ceil(t*10**(o-1)),this.getFillZero(t,l,"r")}static getRandomRange(l,o,t=!0){const s=o-l,i=Math.random();return l+(t?Math.round(s*i):s*i)}static getCaptcha(l=6){const o="0123456789";let t="";for(let s=0;s<l;s++)t+=o.charAt(Math.floor(Math.random()*o.length));return t}static getValueByFormat(l,o,t={}){let s;switch(o){case"num":case"int":case"float":case"float2":case"float3":case"number":{if(this.isNumber(l))if(this.isEmpty(l))s=(this.isBoolean(t.isEmptyDefault)?t.isEmptyDefault:!0)?"0":l;else{let i=l.toString();if(i=this.isExistValue(i,",")?this.removeReplace(i):i,o==="number")s=Number(i);else{let u=0;if(o==="num"?u=this.isExistValue(i,".")?2:0:o==="int"?u=0:o==="float"?this.isNumber(t.decimalNum)&&(u=parseInt(t.decimalNum)):o==="float2"?u=2:o==="float3"&&(u=3),this.isBoolean(t.isRounding)?t.isRounding:!0)s=parseFloat(i).toFixed(u);else if(u>0){const d=this.split(i,"."),m=d[1].length;s=d[0]+"."+d[1].substring(0,m>u?u:m)}else s=parseInt(i).toString();s=Number(s).toFixed(u),(this.isBoolean(t.isThousands)?t.isThousands:!0)&&(s=this.getFormatThousands(s))}}else s=l;break}case"date":case"dateTime":case"time":{if(this.isEmpty(l))s=l;else{let i="";this.isEmpty(t.dateFormat)?o==="dateTime"?i="YYYY-MM-DD HH:mm:ss":o==="time"?i="HH:mm:ss":i="YYYY-MM-DD":i=t.dateFormat;const u=ql[o];u?s=u(l,i):s=l}break}case"string":s=l.toString();break;case"intArray":s=this.split(l).map(i=>parseInt(i));break;default:s=l}return s}static getHourInterval(l,o=""){const t=this.isEmpty(o)?l:o;return`${this.getFillZero(l)}:00-${this.getFillZero(t)}:59`}static getFormatThousands(l){if(!this.isNumber(l))return"";const o=this.split(l.toString(),".");return o[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(o.length>1?`.${o[1]}`:"")}static getNumCeil(l,o={}){if(!this.isNumber(l))return 0;const t=Number(l),s=t<0,i=Math.abs(t);if(i===0)return 0;const u=i<1;let c=0,r=i.toString(),d=-1;if(u){if(d=-1,i>0){const N=this.split(r,".")[1];r=Number(N).toString(),c=N.length-r.length}}else c=0,d=r.indexOf("."),d>-1&&(r=r.replace(".",""));const m=this.isBoolean(o.isCeil)?o.isCeil:!0,p=this.isUndefined(o.inxPos)?2:parseInt(o.inxPos),f=this.isBoolean(o.isEndFive)?o.isEndFive:!1,h=this.isBoolean(o.isRounding)?o.isRounding:!1;let g,S="";p<r.length?(g=r.substring(0,p),S=r.substring(p)):g=r;let T="";const w=m||h&&S.length>0&&parseInt(S.substring(0,1))>=5?(parseInt(g)+1).toString():parseInt(g).toString(),E=parseInt(w.substring(w.length-1));if(f)if(E===5||E===0)T=w;else{const N=parseInt(w.substring(0,p-1));E>5?T=`${N+1}0`:E<5&&(T=`${N}5`),w.length>p&&T.length===p&&(T=`${T}0`)}else T=w;let M="",V=0;d===-1?V=S.length:d<p?(V=0,T=(Number(T)/((p-d)*10)).toString()):d>p&&(V=d-p),M=this.getZeroCount(V),u&&(T=`0.${this.getZeroCount(c)}${T}`);const I=T+M;return Number(I)*(s?-1:1)}static removeReplace(l,o=","){if(this.isUndefined(l))return"";const t=new RegExp(`[${o}]`,"g");return l.toString().replace(t,"")}static conversionEmptyZero(l,o,t){const s=l;if(!this.isEmpty(o)){let i=0,u=0;if(t){let c={};this.isString(t)?c.emptyDef=t:this.isObject(t)&&(c=t);const r=this.isEmpty(c.undefinedDef);r||(u=c.undefinedDef),this.isEmpty(c.emptyDef)||(i=c.emptyDef,r&&(u=c.emptyDef))}o.forEach(c=>{this.isEmpty(l[c])&&(this.isUndefined(l[c])?s[c]=u:s[c]=i)})}return s}static conversionPercentage(l,o,t=!0){const s=l;return this.isEmpty(o)||o.forEach(i=>{const u=l[i];this.isEmpty(u)?s[i]=0:this.isNumber(u)?s[i]=t?u*100:u/100:s[i]=u}),s}static convertStringFormat(l,o){let t=l;return this.isEmpty(o)||(t=l.replace(/[$]{[^}]+}/g,s=>{const i=s.replace("${","").replace("}","");return this.isExistJsonKey(o,i)?o[i]:s})),t}static convertStringFormatEncodeHTML(l,o){let t=l;return this.isEmpty(o)||(t=l.replace(/[$]{[^}]+}/g,s=>{const i=s.replace("${","").replace("}","");if(this.isExistJsonKey(o,i)){const u=o[i];return this.isString(u)?this.encodeHTML(u):u}return s})),t}static getQueryString(l,o){const t=new RegExp(`(^|&)${o}=([^&]*)(&|$)`,"i"),s=l.substring(l.indexOf("?")+1).match(t);return s!==null?decodeURI(s[2]):""}static getQueryStringByHash(l){return this.getQueryString(window.location.hash,l)}static encodeHTML(l){return String(l).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}static removeHTMLTags(l){return l.replace(/<[^>]*>/g,"")}static requestAnimationFrame(l){const o=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;return o?o.call(window,l):window.setTimeout(l,1e3/60)}static cancelAnimationFrame(l){const o=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;o?o.call(window,l):window.clearTimeout(l)}}class Br{promise(l){return new Promise(o=>{o(l)})}promiseFun(l){return new Promise(o=>{l&&l(o)})}resolve(l){return Promise.resolve(l)}all(l){return Promise.all(l)}allByJson(l){return new Promise(o=>{if(n.isEmpty(l))return o({result:{},errors:{}});let t=0;const s=Object.keys(l),i=s.length,u={},c={},r=d=>{Promise.resolve(l[d]).then(m=>{t+=1,u[d]=m,t===i&&o({result:u,errors:c})},m=>{t+=1,c[d]=m,t===i&&o({result:u,errors:c})})};s.forEach(d=>{r(d)})})}}const Xl=new Br;let xr=class{_elCanvasTextWidth;constructor(){this._elCanvasTextWidth=null}_getArrClassBySplit(l){return l.split(" ").filter(o=>!n.isEmpty(o))}_getClasssByReal(l,o){return l.filter(t=>!n.isExistValue(o,t)&&!n.isEmpty(t))}onListener(l,o,t,s=!1){l&&o&&t&&l.addEventListener(o,t,s)}offListener(l,o,t,s=!1){l&&o&&t&&l.removeEventListener(o,t,s)}getTextWidth(l,o="normal 12px Microsoft YaHei"){this._elCanvasTextWidth||(this._elCanvasTextWidth=document.createElement("canvas"));const t=this._elCanvasTextWidth.getContext("2d");return t.font=o,t.measureText(l).width}getClassNameJson(l){const o={};return n.isNonEmptyString(l)&&this._getArrClassBySplit(l).forEach(t=>{o[t]=!0}),o}conversionClassToString(...l){return this.getAddClass(l)}getAddClass(...l){let o=[];return l.forEach(t=>{if(n.isString(t)){const s=this._getArrClassBySplit(t);o=o.concat(this._getClasssByReal(s,o))}else if(n.isArray(t))o=o.concat(this._getClasssByReal(t,o));else if(n.isObject(t))for(const[s,i]of Object.entries(t))n.isExistJsonKey(t,s)&&i?o.push(s):o=o.filter(u=>u!==s||u===s&&i)}),o.join(" ")}getRemoveClass(l,o){const t=this._getArrClassBySplit(o);return this._getArrClassBySplit(l).filter(i=>!n.isExistValue(t,i)).join(" ")}checkHasClass(l,o){const t=this._getArrClassBySplit(l),s=this._getArrClassBySplit(o);return n.isContainArr(t,s)}_getBoundingClientRect(l){const o=n.isUndefined(l.getBoundingClientRect)?{}:l.getBoundingClientRect(),t={width:o.width||0,height:o.height||0,top:o.top||0,right:0,bottom:0,left:o.left||0,x:o.left||0,y:o.top||0},s=this.getWinHeight(),i=this.getWinWidth();return t.right=i-o.right||0,t.bottom=s-o.bottom||0,t}_getWindow(l){if(l&&l.toString()!=="[object Window]"){const o=l.ownerDocument;return o&&o.defaultView||window}return l}isElementHtml(l){const o=this._getWindow(l).HTMLElement;return l instanceof o||l instanceof HTMLElement}isElementBody(l){return n.isUndefined(l)?!1:this.isElementHtml(l)&&l.tagName.toLocaleLowerCase()==="body"}getWinScrollTop(){return document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset}getWinWidth(){return document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth}getWinHeight(){return document.documentElement.clientHeight||document.body.clientHeight||window.innerHeight}getStyle(l){return window.getComputedStyle?window.getComputedStyle(l,null):l.currentStyle}_isElementScroll(l){const o=this.getStyle(l),t=o.overflow,s=o.overflowX,i=o.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+s)}isHidden(l){return this.getStyle(l).display==="none"}isHiddenParent(l){let o=!1,t=l,s=!1;for(;t&&t.nodeType!==9&&!s;)t.nodeType===1&&(s=this.isHidden(t),s&&(o=!0)),t=t.parentNode;return o}getParentCheckBody(l,o,t=!0){let s=null;return o?n.isString(o)?o.toLocaleLowerCase()!=="body"&&(s=this.getParent(l,o)):this.isElementBody(o)||(t?o.contains(l)&&(s=o):s=o):this.isElementBody(l.parentNode)||(s=l.parentNode),s}getParent(l,o,t,s=!0){if(n.isEmpty(o))return l.parentNode;let u=null;const c=!n.isUndefined(t);if(this._checkElementByAttr(l,o))u=l;else{let d=l.parentNode,m=!1;for(;d&&d.nodeType!==9&&!m;)d.nodeType===1&&(m=this._checkElementByAttr(d,o),m?u=d:c&&(m=d===t,m&&s&&(u=d))),d=d.parentNode}return u}getParentList(l,o){const t=n.isEmpty(o)?"body":o;return this._recursionParents(l,t)}_recursionParents(l,o){const t=[];if(this._checkElementByAttr(l,o))t.push(l);else if(l.parentNode&&l.parentElement&&!this.isElementBody(l.parentElement)){t.push(l.parentNode);const s=this._recursionParents(l.parentNode,o);t.push(...s)}return t}getParentScrollList(l,o,t=!0){const s=[];return this.getParentList(l,o).forEach(u=>{this._isElementScroll(u)&&(t?s.push(u):this._checkElementByAttr(u,o)||s.push(u))}),s}_checkElementByAttr(l,o){let t=!1;if(!n.isEmpty(o))if(n.isString(o)){const s=o.substr(0,1),i=o.substring(1);switch(s){case"#":t=l.id===i;break;case".":t=n.isString(l.className)?n.isExistValue(l.className.split(" "),i):!1;break;default:t=l.tagName.toLocaleLowerCase()===o}}else this.isElementHtml(o)&&(t=l===o);return t}getOffset(l,o=null){const t=this.getPositionView(l,o);if(t.viewEl)return{top:t.top+t.viewEl.scrollTop-t.viewEl.clientTop,left:t.left+t.viewEl.scrollLeft-t.viewEl.clientLeft};{const i=(l&&l.ownerDocument).documentElement,u=this._getWindow(i);return{top:t.top+(u.pageYOffset||i.scrollTop)-(i.clientTop||0),left:t.left+(u.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}}}getPositionView(l,o=null){const t={top:0,left:0,viewEl:null};if(!this.isElementHtml(l))return t;const s=this._getBoundingClientRect(l);t.top=s.top,t.right=s.right,t.bottom=s.bottom,t.left=s.left,t.width=s.width,t.height=s.height;const i={top:0,right:0,bottom:0,left:0},u=n.isUndefined(o)?null:this.getParentCheckBody(l,o,!0);if(u){const c=this._getBoundingClientRect(u);i.top=c.top,i.right=c.right,i.bottom=c.bottom,i.left=c.left,t.viewWidth=c.width,t.viewHeight=c.height,t.top=s.top-(i.top<0?0:i.top),t.right=s.right-(i.right<0?0:i.right),t.bottom=s.bottom-(i.bottom<0?0:i.bottom),t.left=s.left-(i.left<0?0:i.left),t.elViewBox={top:s.top-i.top,right:s.right-i.right,bottom:s.bottom-i.bottom,left:s.left-i.left}}return t.viewEl=u,t}getPosition(l,o=null){const t=n.isUndefined(o)?l.parentNode:o;return this.getPositionView(l,t)}getElementIndex(l){return this.getPrevAll(l).length}getPrev(l){if(n.isUndefined(l.previousElementSibling)){let o=l.previousSibling;for(;o&&o.nodeType!==1;)o=o.previousSibling;return o}else return l.previousElementSibling}getPrevAll(l){const o=[];let t=this.getPrev(l);for(;t;)o.push(t),t=this.getPrev(t);return o.reverse()}getNext(l){if(n.isUndefined(l.nextElementSibling)){let o=l.nextSibling;for(;o&&o.nodeType!==1;)o=o.nextSibling;return o}else return l.nextElementSibling}insertAfter(l,o){const t=l.parentNode;t.lastChild==l?t.appendChild(o):t.insertBefore(o,l.nextSibling)}getFocusSelection(l){const o={};if(n.isUndefined(l.selectionStart)){l.focus();const t=document.selection.createRange();o.length=t.text.length,t.moveStart("character",-l.value.length),o.end=t.text.length,o.start=o.end-o.length}else o.start=l.selectionStart,o.end=l.selectionEnd,o.length=o.end-o.start;return o}setFocusSelection(l,o,t){if(n.isUndefined(l.selectionStart)){l.focus();const s=l.createTextRange();s.collapse(!0),s.moveEnd("character",t),s.moveStart("character",o),s.select()}else l.selectionStart=o,l.selectionEnd=t}calculationDropdownPosition(l,o,t,s,i){const u=i?this.getParentCheckBody(l,i):null,c=n.isUndefined(u),r=o.offsetWidth,d=o.offsetHeight,m=t.offsetWidth,p=t.offsetHeight;let f=0,h=0;n.isUndefined(s)||(f=s.offsetWidth,h=s.offsetHeight);const g=f/2,S=this.getWinHeight(),T=this.getWinWidth();let w=0,E=0,M={top:0,left:0},V={top:0,left:0};c?(w=T,E=S,M=this.getOffset(l),V=this.getPositionView(l)):(w=u.clientWidth,E=u.clientHeight,M=this.getOffset(l,u),V=this.getPositionView(l,u));const I=V.top,N=m+f,x=p+h,L=d+x,D={winWidth:T,winHeight:S,containerWidth:w,containerHeight:E,controlOffset:M,controlPosView:V,textWidth:r,textHeight:d,dropDownWidth:m,dropDownHeight:p,arrowWidth:f,arrowHeight:h};let O="down";I+L>E&&(I>x||M.top>x)&&(O="up"),D.dropDownPosDown=O;let X="up";I<x&&M.top<x&&(X="down"),D.dropDownPosUp=X;let Q="left";V.left<N&&M.right>=x&&(Q="right"),D.dropDownPosLeft=Q;const R="right";V.right<N&&M.left>=x&&(Q="left"),D.dropDownPosRight=R;let C="left";w-M.left<m&&(C=M.left+r>=m?"right":"left"),D.arrowPosLeft=C;let k="right";M.left+r<m&&(k=w-M.left>=m?"left":"right"),D.arrowPosRight=k;const b="center";D.arrowPosCenterLR=b;const v={dropDownLeft:0,arrowLeft:0},_=this.getOffset(o,l),y=r/2,B=t.clientWidth,A=_.left+y;let F=A-B/2;const P=!n.isEmpty(i),H=P&&M.left||0,$=P?H+F:V.left+F,z=0,oe=T-B;let Z=$;Z<z?Z=z:Z>oe&&(Z=oe),F=P?Z-H:Z-V.left,oe<z&&(F=P?z-H:z-V.left);const W=A-F;return v.dropDownLeft=F,v.arrowLeft=W-g,D.arrowPosCenterLRInfo=v,D.arrowPosTop="top",D.arrowPosBottom="bottom",D.arrowPosCenterTB="center",D}getElementData(l){const o={};if(!n.isEmpty(l))for(const[t,s]of Object.entries(l)){const i=t.split("-"),u=[];i.forEach((c,r)=>{if(r>0){const d=c.toLowerCase();r===1?u.push(d):u.push(d.replace(d[0],d[0].toUpperCase()))}}),u.length>0&&(o[u.join("")]=s)}return o}async getTextDataByFile(l){const o=[];if(!n.isEmpty(l))for(let t=0;t<l.length;t++){const s=await this._getTextDataFileOne(l[t]);o.push(...s)}return o}_getTextDataFileOne(l){return Xl.promiseFun(o=>{const t=new FileReader;t.readAsText(l,"utf-8"),t.onload=s=>{const i=[];s.target.result.split(`
|
|
2
|
-
`).forEach(u=>{const c=n.trim(u);n.isEmpty(c)||i.push(c)}),o(i)}})}getClientXY(l){let o,t;return l.type==="touchend"?(t=l.changedTouches[0].clientY,o=l.changedTouches[0].clientX):l.type.startsWith("touch")?(t=l.touches[0].clientY,o=l.touches[0].clientX):(t=l.clientY,o=l.clientX),{clientX:o,clientY:t}}};const ue=new xr,Tr=["id"],Pt=e.defineComponent({name:"ClBadge",__name:"Index",props:{id:String,className:String,num:[String,Number],color:{type:String,default:"default"},colorSty:String,maxNum:{type:Number,default:-1},isHideZero:{type:Boolean,default:!0},isDot:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=()=>{let c="";if(!n.isEmpty(l.num)){const r=Number(l.num);n.isFinite(r)?r===0&&l.isHideZero?c="":r>l.maxNum&&l.maxNum>0?c=`${l.maxNum}+`:c=r.toString():c=""}return c},s=e.computed(()=>t()),i=e.computed(()=>{let c={badge:!0};return!n.isEmpty(l.color)&&n.isEmpty(l.colorSty)&&(c[`bg-${l.color}`]=!0),c=n.getJsonMerge(c,ue.getClassNameJson(l.className)),l.isDot&&n.isEmpty(t())&&(c["badge-dot"]=!0),c}),u=e.computed(()=>{const c={};return l.colorSty&&!n.isEmpty(l.colorSty)&&(c["background-color"]=l.colorSty),c});return(c,r)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(o),class:e.normalizeClass(i.value),style:e.normalizeStyle(u.value),role:"status"},e.toDisplayString(s.value),15,Tr))}}),Dr={common:{submit:"确定",save:"保存",cancel:"取消",update:"修改",close:"关闭",delete:"删除",deleteAll:"全部删除",upload:"上传",download:"下载",preview:"预览",restore:"还原",clear:"清除",clearEmpty:"清空",clearAll:"全部清除",copy:"复制",custom:"自定义",loading:"加载中",noDataText:"暂无数据",noResultsText:"未找到结果",checkboxAll:"全选",selected:"已选",count:"个",add:"添加",checkAddMax:"最多添加",checkAddMin:"最少保留",pleaseSelect:"请选择"},validate:{required:"此项不能为空",number:"请输入数字",integer:"请输入整数",integerPositive:"请输入正整数",alphanum:"请输入数字或字母",email:"邮箱格式不正确",minLen:"输入值的长度不能小于 %s 个字",maxLen:"输入值的长度不能大于 %s 个字",minByte:"输入值的长度不能小于 %s 个字节",maxByte:"输入值的长度不能大于 %s 个字节",minGreater:"输入值请大于 %s",maxGreater:"输入值请小于 %s",minGreaterEqual:"输入值请大于或等于 %s",maxGreaterEqual:"输入值请小于或等于 %s",phone:"手机号不正确",equalto:"两次输入值不同"},dataTime:{am:"上午",pm:"下午",year:"年",prevYear:"上一年",prevMonth:"上一月",nextYear:"下一年",nextMonth:"下一月",prevYear10:"前十年",nextYear10:"后十年",today:"今天",yesterDay:"昨天",pastDays7:"过去7天",pastDays30:"过去30天",montCurrent:"本月",montLast:"上月",montLately6:"最近半年",yearCurrent:"今年",yearLast:"去年",rangeStartLabel:"开始",checkEndMinLabel:"结束时间不能小于设置的最小时间",checkStartMaxLabel:"时间不能大于设置的最大时间",checkStartMinLabel:"时间不能小于设置的最小时间",checkStartEndLabel:" ",checkRangeEmptyLabel:"请选择完整的开始时间,结束时间"},fileUpload:{checkImageWHLabel:"图片宽高不匹配",checkSuffixMimeLabel:"类型不匹配",checkSizeLabel:"大小不匹配",uploadFile:"上传文件"},weekHour:{daily:"每日",monday:"周一",tuesday:"周二",wednesday:"周三",thursday:"周四",friday:"周五",saturday:"周六",sunday:"周日",weekday:"工作日",weekend:"周末",restDay:"休息日",dawn:"凌晨",morning:"上午",noon:"中午",afternoon:"下午",evening:"傍晚",night:"晚上",selected:"已定向",selectedNot:"未定向"},paginate:{page:"页",pageStrip:"页/条",jumpTo:"跳转至",statistic:"显示第 ${s} 至 ${e} 项结果,共 ${_total} 项"},xEditable:{required:"此项不能为空",submitCallback:"submitCallback的返回格式不正确"}},Ir={common:{submit:"Submit",save:"Save",cancel:"Cancel",update:"Modify",close:"Close",delete:"Delete",deleteAll:"Delete All",upload:"Upload",download:"Download",preview:"Preview",restore:"Restore",clear:"Clear",clearEmpty:"Clear All",clearAll:"Clear All",copy:"Copy",custom:"Custom",loading:"Loading",noDataText:"No Data",noResultsText:"No Result",checkboxAll:"Select All",selected:"Selected",count:"Count",add:"Add",checkAddMax:"Add Maximum",checkAddMin:"Add Minimum",pleaseSelect:"Select"},validate:{required:"Required",number:"Please enter number",integer:"Please enter integer",integerPositive:"Please enter positive integer",alphanum:"Please enter number or letter",email:"Error Email",minLen:"Cannot less than %s characters",maxLen:"Cannot more than %s characters",minByte:"Cannot less than %s Bytes",maxByte:"Cannot more than %s Bytes",minGreater:"Must more than %s",maxGreater:"Must less than %s",minGreaterEqual:"Cannot less than %s",maxGreaterEqual:"Cannot more than %s",phone:"Error phone number",equalto:"Different Value"},dataTime:{am:"am",pm:"pm",year:"year",prevYear:"Last Year",prevMonth:"Last Month",nextYear:"Next Year",nextMonth:"Next Month",prevYear10:"Last Decade",nextYear10:"Next Decade",today:"Today",yesterDay:"Yesterday",pastDays7:"Last 7 Days",pastDays30:"Last 30 Days",montCurrent:"This Month",montLast:"Last Month",montLately6:"Last Half Year",yearCurrent:"This Year",yearLast:"Last Year",rangeStartLabel:"Start",checkEndMinLabel:"Error end time",checkStartMaxLabel:"Error end time",checkStartMinLabel:"Error start time",checkStartEndLabel:"End time cannot before start time",checkRangeEmptyLabel:"Select start and end time"},fileUpload:{checkImageWHLabel:"Error image dimension",checkSuffixMimeLabel:"Error type",checkSizeLabel:"Error file size",uploadFile:"Upload File"},weekHour:{daily:"Daily",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",sunday:"Sunday",weekday:"Weekday",weekend:"Weekend",restDay:"Rest day",dawn:"Midnight",morning:"AM",noon:"Noon",afternoon:"PM",evening:"Evenfall",night:"Evening",selected:"Include",selectedNot:"Exclude"},paginate:{page:"Page",pageStrip:"Lines/Page",jumpTo:"Page to",statistic:"Records ${s} to ${e} , ${_total} Records in Total"},xEditable:{required:"Required",submitCallback:"Error SubmitCallback"}};De.locale("zh-cn");De.extend(gr);De.extend(vr);De.extend(yr);De.extend(kr);De.extend(Sr);De.extend(br);De.extend(wr);let qa=!1;class _e{static objDay=De;static timezone="PRC";static async ensureLunar(){if(qa)return;const l=await import("dayjs-lunar");De.extend(l.default),qa=!0}static initDay(l){return(n.isUndefined(l)?De():l).tz(this.timezone)}static getDayjsObject(l){if(n.isEmpty(l)&&!(l instanceof Date))return this.initDay(De());if(De.isDayjs(l))return this.initDay(l.clone());let o;return l instanceof Date?o=l:n.isString(l)?o=l.replace(/[/]/g,"-").replace(/:/g,":"):n.isInt(l)?o=new Date(parseInt(l,10)):n.isObject(l)&&(o=l),this.initDay(De(o,"YYYY-MM-DD HH:mm:ss"))}static initFormat(l){let o={value:"",format:"YYYY-MM-DD"},t;return n.isObject(l)?De.isDayjs(l)?t=l:(l.format&&(o=n.getJsonMerge(o,l)),l.value||l.format?t=this.getDayjsObject(l.value||""):t=this.getDayjsObject(l)):t=this.getDayjsObject(l),t.format(o.format)}static addTime(l,o,t="days"){return this.getDayjsObject(l).add(o,t)}static subtractTime(l,o,t="days"){return this.getDayjsObject(l).subtract(o,t)}static diffTime(l,o,t="millisecond"){return this.getDayjsObject(l).diff(this.getDayjsObject(o),t)}}ca("date",(a,l)=>_e.initFormat({value:a,format:l}));ca("dateTime",(a,l)=>_e.initFormat({value:a,format:l}));ca("time",(a,l)=>_e.initFormat({value:a,format:l}));class _r{_type;_typeDef;_packageData;constructor(){this._type="zh_cn",this._typeDef="zh_cn",this._packageData={zh_cn:Dr,en:Ir}}initMerge(l){const o=n.isEmpty(l.type);return o||(this._type=l.type),n.isEmpty(l.packageData)||(o?this._packageData[this._typeDef]=n.getJsonMergeDeep(this._packageData[this._typeDef],l.packageData):this._packageData=n.getJsonMergeDeep(this._packageData,l.packageData)),{type:this._type,packageData:this._packageData}}_getType(){let l=this._type;return n.isEmpty(l)&&(l=this._typeDef),{type:l,def:this._typeDef}}_getData(l){let o={};const t=this._packageData;if(l)o=t[l];else{const s=this._getType();n.isExistJsonKey(t,s.type)&&(o=t[s.type]),n.isEmpty(o)&&(o=t[s.def])}return o}_getKeyValue(l,o){let t;if(n.isExistValue(l,".")){const s=n.split(l,".");let i=n.getJsonClone(o,!0);s.forEach((u,c)=>{const r=i[u];c===s.length-1?i=r:i=n.isEmpty(r)?{}:r}),t=i}else t=o[l];return t}_getKey(l,o){let t;const s=o?this._getData(o):this._getData();return n.isEmpty(s)||(t=this._getKeyValue(l,s),n.isObject(t)&&(t=n.getJsonClone(t,!0))),t}getType(){return this._getType()}getAll(){return this._getData()}getCommon(){const l=this._getKey("common"),o=this._getKey("common",this._typeDef);return n.getJsonMergeDeep(o||{},l||{})}getValue(l){let o=this._getKey(l);return n.isEmpty(o)&&(o=this._getKey(l,this._typeDef)),o}getPage(l){let o={};const t=this.getCommon();if(l==="common")o=t;else{const s=this._getKey(l,this._typeDef),i=this._getKey(l),u=n.getJsonMergeDeep(s,i);let c={};if(n.isExistValue(l,".")){const r=n.split(l,".");r[r.length-1]="common";const d=r.join("."),m=this._getKey(d,this._typeDef),p=this._getKey(d);c=n.getJsonMergeDeep(m,p)}o=n.getJsonMerge(u,{common:t,pageCommon:c})}return o}setType(l){switch(this._type=l,l){case"zh_cn":_e.objDay.locale("zh-cn");break;case"en":_e.objDay.locale("en");break}}}const ot=new _r,Nr={zh_cn:{common:{confirm:"确认",submit:"提交",search:"搜索",remove:"移除",clearInput:"清除输入内容",clearAll:"清除全部",loading:"加载中",overlay:"遮罩层",breadcrumb:"面包屑导航",copy:"复制",showPassword:"显示密码",hidePassword:"隐藏密码",increase:"增加",decrease:"减少",close:"关闭",dialog:"对话框",textarea:"文本输入区域",expand:"展开",collapse:"折叠",areaTitle:"地区选择"}},en:{common:{confirm:"Confirm",submit:"Submit",search:"Search",remove:"Remove",clearInput:"Clear input",clearAll:"Clear all",loading:"Loading",overlay:"Overlay backdrop",breadcrumb:"Breadcrumb",copy:"Copy",showPassword:"Show password",hidePassword:"Hide password",increase:"Increase",decrease:"Decrease",close:"Close",dialog:"Dialog",textarea:"Text input area",expand:"Expand",collapse:"Collapse",areaTitle:"Select region"}}},cn=e.reactive({}),Gl=a=>{n.isObject(a)&&Object.keys(a).forEach(l=>{const o=a[l],t=cn[l];if(n.isUndefined(o)){delete cn[l];return}if(n.isObject(o)){cn[l]=n.getJsonMergeDeep(t||{},o);return}n.isObject(t)||(cn[l]=o)})},ct=a=>cn[a];ot.initMerge({packageData:Nr});const Vr="locale",Mr="zh_cn";function Xa(){const a=ct(Vr);if(typeof a=="string"&&a.length>0)return a;const l=ot.getType();if(typeof l=="string"&&l.length>0)return l;if(l&&typeof l=="object"&&"type"in l){const o=l.type;if(typeof o=="string"&&o.length>0)return o}return Mr}function Ql(){const a=e.ref(Xa());return e.watch(Xa,l=>{a.value=l}),{optLocale:a}}function oo(){const{optLocale:a}=Ql(),l=e.ref({}),o=()=>{const t=ot.getCommon()||{},s={};Object.keys(t).forEach(i=>{const u=t[i];typeof u=="string"&&(s[i]=u)}),l.value=s};return o(),e.watch(a,o),{optA11yText:l}}const Ae=()=>{const a=e.ref({}),{optLocale:l}=Ql(),o=r=>{a.value=ot.getPage(r)};let t="";const s=r=>{t=r,o(r)};return e.watch(l,()=>{t&&o(t)}),{optPageLanguage:a,optLocale:l,getPageLanguage:s,getLanguageValue:r=>ot.getValue(r),getLanguageType:()=>ot.getType(),getCommonText:(r,d)=>{const m=ot.getValue(`common.${r}`);return typeof m=="string"&&m.length>0?m:d}}},Or=["id","aria-label"],Lr=["onClick"],$r={key:1},Ar={class:"breadcrumb-item"},Zl=e.defineComponent({name:"ClBreadcrumb",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:{onClickUrl:(a,l)=>!0},setup(a,{emit:l}){const{optA11yText:o}=oo(),t=a,s=l,i=`breadcrumb-${n.getRandom(5)}`,u=t.id,c=e.computed(()=>{const f={"panel-breadcrumb":!0};return n.getJsonMerge(f,ue.getClassNameJson(t.className))}),r=e.computed(()=>!Array.isArray(t.list)||n.isEmpty(t.list)?[]:t.list.slice(0,-1).filter(Boolean)),d=e.computed(()=>{if(!Array.isArray(t.list)||n.isEmpty(t.list))return"";const f=t.list[t.list.length-1];return n.isEmpty(t.title)?f?.name??"":t.title}),m=f=>!n.isEmpty(f),p=(f,h)=>{s("onClickUrl",f,h)};return(f,h)=>{const g=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("ol",{id:e.unref(u),class:e.normalizeClass(c.value),"aria-label":e.unref(o).breadcrumb||"面包屑导航"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(S,T)=>(e.openBlock(),e.createElementBlock("li",{class:"breadcrumb-item",key:`${i}-${T}`},[m(S.href)?(e.openBlock(),e.createBlock(g,{key:0,to:S.href},{default:e.withCtx(()=>[e.createElementVNode("span",{onClick:w=>p(S,w)},e.toDisplayString(S.name??""),9,Lr)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",$r,e.toDisplayString(S.name??""),1))]))),128)),e.createElementVNode("li",Ar,[e.createElementVNode("span",null,e.toDisplayString(d.value),1)])],10,Or)}}}),Ga="[ui-kit]";function Qa(){const a=ct("debug"),l=!1;return a===!0?{warn:!0,error:!0}:a===!1?{warn:!1,error:!1}:a&&typeof a=="object"?{warn:a.warn??l,error:a.error??!0}:{warn:l,error:!0}}function Za(a,l){return[a?`${Ga}[${a}]`:Ga,...l]}const ve={warn(a,...l){Qa().warn&&console.warn(...Za(a,l))},error(a,...l){Qa().error&&console.error(...Za(a,l))}},Fr=["id","aria-label"],He=e.defineComponent({name:"ClLoad",__name:"Index",props:{id:String,className:String,theme:{type:String,default:"rotaryLine",validator:a=>["rotaryLine","circleNotch","circleBubble","ballColor4","dotTyping","dotWave","dotBounce","dotPulse","dotOrbit","dotFlow","dotSlide","dotSlider","dotFold","dotSquare","barEqualizer","barWave","barPulse","barStretch","barMeter","barBounce","barRamp","ringRotate","ringDot","ringPulse","ringClip","ringFan","circleSpinner","dotRipple","dotRipple3","ringCross","squareTrace","squareTrace2","crossMove","snakePath","squareMirror","dotPulse5","diamondShuttle","barStream","newtonCradle","dotSpin","orbitSwap","typingBounce","ringGlow","toastRing"].indexOf(a)!==-1},size:{type:String,default:"small",validator:a=>["xxl","xl","large","small","xs"].indexOf(a)!==-1},color:{type:String,default:""}},setup(a){const{optA11yText:l}=oo(),o=a,t=o.id,s={rotaryLine:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RotaryLine-Cwu3YLpU.cjs"))),circleNotch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleNotch-D9prya89.cjs"))),circleBubble:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleBubble-BszXrNmg.cjs"))),ballColor4:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BallColor4-DkQt6rSf.cjs"))),dotTyping:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotTyping-QDey1yRa.cjs"))),dotWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotWave-DRXlC1W2.cjs"))),dotBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotBounce-7MaAbigp.cjs"))),dotPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse-D98JVErY.cjs"))),dotOrbit:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotOrbit-BuOQPsSW.cjs"))),dotFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFlow-DvBJQulU.cjs"))),dotSlide:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlide-CS-Q4uKe.cjs"))),dotSlider:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlider-BNNqD9Dl.cjs"))),dotFold:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFold-CieHpsj-.cjs"))),dotSquare:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSquare-DEuA5KzQ.cjs"))),barEqualizer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarEqualizer-DWlqf8FS.cjs"))),barWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarWave-Rt8wvaB7.cjs"))),barPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarPulse-BHFsltR9.cjs"))),barStretch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStretch-BbNcMDZV.cjs"))),barMeter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarMeter-BN9p-esq.cjs"))),barBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarBounce-BGuvEO50.cjs"))),barRamp:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarRamp-DtnspfKx.cjs"))),ringRotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingRotate-0ZwepWdq.cjs"))),ringDot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingDot-B1efcLcT.cjs"))),ringPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingPulse-C0b5UoQz.cjs"))),ringClip:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingClip-CxuSQ6UC.cjs"))),ringFan:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingFan-AXfUH1gy.cjs"))),dotRipple:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple-D82MFEU4.cjs"))),circleSpinner:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleSpinner-Dds2ZKpY.cjs"))),dotRipple3:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple3-Fb61jLTU.cjs"))),ringCross:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingCross-CZun0bQg.cjs"))),squareTrace:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace-Cixaklmc.cjs"))),squareTrace2:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace2-LEwK57wv.cjs"))),crossMove:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CrossMove-CF_BJxYr.cjs"))),snakePath:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SnakePath-BYu2xCmy.cjs"))),squareMirror:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareMirror-DRlm59jF.cjs"))),dotPulse5:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse5-C1FaRhsY.cjs"))),diamondShuttle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DiamondShuttle-Bmc425vI.cjs"))),barStream:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStream-BPpZOi65.cjs"))),newtonCradle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./NewtonCradle-BrcU-Kg4.cjs"))),dotSpin:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSpin-DJ4Gesdz.cjs"))),orbitSwap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./OrbitSwap-4AETRFM-.cjs"))),typingBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TypingBounce-DZojpNTJ.cjs"))),ringGlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingGlow-DPoHUjcB.cjs"))),toastRing:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ToastRing-C0GKGyt2.cjs")))},i=new Set(["ballColor4","diamondShuttle","orbitSwap","ringGlow"]),u=e.computed(()=>o.theme||"rotaryLine"),c=e.computed(()=>s[u.value]||null),r=e.computed(()=>o.size==="large"),d=e.computed(()=>o.size==="xl"),m=e.computed(()=>o.size==="xxl"),p=e.computed(()=>o.size==="xs"),f=e.computed(()=>{const g=o.color||"";return g?i.has(u.value)?g:n.isString(g)?g.split("|")[0].trim():"":""}),h=e.computed(()=>n.getJsonMerge({"panel-load":!0,"size-large":r.value,"size-xl":d.value,"size-xxl":m.value,"size-xs":p.value},ue.getClassNameJson(o.className)));return(g,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),id:e.unref(t),role:"status","aria-label":e.unref(l).loading||"加载中"},[c.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value),{key:0,color:f.value,size:a.size},null,8,["color","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Fr))}}),Xn=new Map;function ao(a){if(!a)return;const l=Xn.get(a);if(l){l.count+=1;return}Xn.set(a,{count:1,overflow:a.style.overflow,className:a.className}),a.style.overflow="hidden",/\bmodal-open\b/.test(a.className)||(a.className=`${a.className} modal-open`.trim())}function lo(a){if(!a)return;const l=Xn.get(a);if(l){if(l.count>1){l.count-=1;return}Xn.delete(a),a.isConnected&&(a.style.overflow=l.overflow,a.className=l.className)}}const Pr=["id","aria-label"],Rt=e.defineComponent({name:"ClOverlay",__name:"Index",props:{id:String,className:String,show:Boolean,zIndex:{type:Number,default:2e3},duration:{type:Number,default:300},isLockScroll:{type:Boolean,default:!0},background:{type:String,default:"var(--cl-overlay, rgba(0, 0, 0, 0.7))"},teleportTarget:{type:String,default:""}},emits:["update:show","onClick"],setup(a,{emit:l}){const{optA11yText:o}=oo(),t=a,s=l,i=t.id,u=e.ref(t.show);let c=null;const r=e.useTemplateRef("refElOverlay"),d=e.computed(()=>n.isNonEmptyString(t.teleportTarget)?V(t.teleportTarget):"body"),m=e.computed(()=>t.teleportTarget==="self"),p=e.computed(()=>m.value),f=e.computed(()=>{const x=t.duration;return n.isNumber(x)&&n.isFinite(x)&&x>=0&&x<=1e4?x:300}),h=e.computed(()=>{const x=t.zIndex;return n.isNumber(x)&&n.isFinite(x)&&x>=0?x:2e3}),g=e.computed(()=>{const x={"panel-overlay":!0};return m.value&&(x["panel-overlay-self"]=!0),n.getJsonMerge(x,ue.getClassNameJson(t.className))}),S=e.computed(()=>({zIndex:h.value,background:n.isNonEmptyString(t.background)?t.background:"var(--cl-overlay, rgba(0, 0, 0, 0.7))","--overlay-duration":`${f.value}ms`})),T=x=>{ao(x)},w=x=>{lo(x)},E=()=>{if(m.value){const D=r.value?r.value.parentElement:null;if(!D)return null;let O=D;for(;O&&O!==document.body;){if(window.getComputedStyle(O).position!=="static")return O;O=O.parentElement}return document.body}const x=d.value;if(x==="body")return document.body;const L=document.querySelector(x);return L===document.body?document.body:L??document.body},M=()=>{if(t.isLockScroll&&t.show){const x=E();x&&c!==x&&(c&&w(c),c=x,T(x))}else c&&(w(c),c=null)},V=x=>{if(x==="self")return x;try{return document.querySelector(x)?x:(ve.warn("Overlay",`teleportTarget「${x}」未匹配到元素,已回退到 body`),"body")}catch{return ve.warn("Overlay",`teleportTarget「${x}」不是合法的 CSS 选择器,已回退到 body`),"body"}};e.onBeforeUnmount(()=>{c&&(w(c),c=null)}),e.watch(()=>[t.show,t.isLockScroll],()=>{t.show&&(u.value=!0),e.nextTick(()=>{M()})},{immediate:!0}),e.onMounted(()=>{M()});const I=()=>{s("onClick"),s("update:show",!1)},N=()=>{t.show||(u.value=!1)};return(x,L)=>u.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:d.value,disabled:p.value},[e.createVNode(e.Transition,{name:"panel-overlay-fade",duration:f.value,appear:"",onAfterLeave:N},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"refElOverlay",ref:r,id:e.unref(i),class:e.normalizeClass(g.value),style:e.normalizeStyle(S.value),onClick:e.withModifiers(I,["self"]),role:"button","aria-label":e.unref(o).overlay||"遮罩层"},[e.renderSlot(x.$slots,"default")],14,Pr),[[e.vShow,a.show]])]),_:3},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),Rr=["PPT","activity","address-book","aixin","aixin1","album","album-baby","all-circle","all-circle-fill","all-square","android","android1","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-line-down","angle-line-left","angle-line-right","angle-line-up","angle-linelong-down","angle-linelong-down-left","angle-linelong-down-right","angle-linelong-left","angle-linelong-right","angle-linelong-up","angle-linelong-up-left","angle-linelong-up-right","angle-right","angle-up","arrow-circle-down","arrow-circle-down-line","arrow-circle-down-line-fill","arrow-circle-left","arrow-circle-right","arrow-circle-up","back-bottom","back-top","back-up1","banshixinxingxing","baseInfo","basicdata","bell","bitian","book","calendar","calendar1","camera","camera1","caret-down","caret-left","caret-right","caret-up","check","check-circle","check-circle-fill","check-square","check-square-fill","check1","check2","chemicals","chose-image","clear","clock","close","close-circle","close-circle-fill","close1","clothes","column-show","config","contract","cooperation","copy","cropper","customer","dashboard","dashboard1","dazhongdianping","delete","diqiu","dollar","douyin","douyin1","download","download-cloud","download-cloud-1","download-cloud-2","earth","edit","edit1","edit2","email","empty","equipment","excel","exclamation","exclamation-circle","exclamation-circle-fill","eye","eye-no","file","file-excel","file-gif","file-image","file-pdf","file-ppt","file-search","file-text","file-word","file-zip","film","filter","finance","gesture-enlarge","gesture-narrow","gif","goumai","guanliyuan","guidance","home","home1","image","image-multiple","image-rmb","image1","info","info-circle","info-circle-fill","ios","ios1","jiaoxue","jin","jingxiupian","kebiao","kefu","kefunan","kefunv","language","language1","layout-left","layout-top","layout-top-left","liebiao","liebiao-1","liebiao-image","liebiao-pubuliu","like","list-empty5","lock","lock-un","look","looklove","luxian","marker","marker-qidian","marker-qidian1","meiyuan","minus","minus-circle","minus-circle-fill","minus-square","minus-square-fill","mobanpeizhi","more","more1","move","music","new","new-triangle-left-2","new-triangle-left-4","new-triangle-right","new-triangle-right-2","new2","order","orderPre","paixu","pdf","phone","phone-code","photoFrame1","pile","pile-fill","pintu","pintu1","pintu2","play","plus","plus-circle","plus-circle-fill","plus-square","plus-square-fill","purchase","qrcode","question","question-circle","question-circle-fill","refresh","remove","renminbi","reply","report","restore","rmb","rmb-circle","rmb-circle-fill","rotate-left","rotate-left1","rotate-right","rotate-right1","save","scenery","schedule","screen-full","screen-narrow","search","search-minus","search-plus","security","security-accidents","security-check","security-education","share","sheji","shezhi","shiyanshiyuyue1","shopcart","shouji1","shouru","sign-out","sign-out-2","sign-out1","sort-down","sort-up","sorting","square","systemSet","taiyang","taocan","tel","test","text","time","tool","total-circle-fill","touxiang","tuijian","tupianyulan","tupianyulan1","upload","upload-cloud","upload-cloud-1","upload-cloud-2","use-registration","user","user-account","user-info1","video","wangzhan","warn","warn-fill","weixin","weixin1","weixin2","word","xiangji","xin","xin1","xing","xing-fill","xingxing-banshixin","xinshenger","yanzhengma","yanzhengma1","yanzhengma2","yinger-nan","yinger-nv","yinger-unknown","yuexing","yulan","yulan1","yunfu","yunfu1","yuyue","yuyuedan","zhichu","zhongyao","zhuti","zhutice","zip","zuhu","zuhu1","zuopin"],Hr=["id"],fe=e.defineComponent({name:"ClIconFont",__name:"Index",props:{id:{},name:{},className:{},size:{},color:{}},setup(a){const l=new Set(Rr),o=a,t=o.id,s=e.computed(()=>{let u={"panel-icon-font":!0};const c=o.name;return n.isNonEmptyString(c)&&(l.has(c)?(u.clIconFont=!0,u[`clIcon-${c}`]=!0):u=n.getJsonMerge(u,ue.getClassNameJson(c))),u=n.getJsonMerge(u,ue.getClassNameJson(o.className)),u}),i=e.computed(()=>{const u={};return o.size!==void 0&&o.size!==null&&(u["font-size"]=n.isFinite(o.size)?`${o.size}px`:String(o.size)),o.color&&(u.color=o.color),u});return(u,c)=>(e.openBlock(),e.createElementBlock("i",{id:e.unref(t),class:e.normalizeClass(s.value),style:e.normalizeStyle(i.value)},null,14,Hr))}});let es=500;const Zo=new WeakMap;function zr(a,l,o){const t=a.getElementsByClassName("cl-waves-ripple");if(t.length>1)for(let p=0;p<t.length-1;p++){const f=t[p];parseFloat(f.style.opacity||"1")<.3&&f.remove()}const s=document.createElement("span");s.className="cl-waves-ripple";const i=a.getBoundingClientRect(),u=l.clientX-i.left,c=l.clientY-i.top,r=n.isObject(o.value)?o.value:{},d=r.color==="white";s.style.top=`${c}px`,s.style.left=`${u}px`,d&&s.classList.add("waves-light");const m=n.isNumber(r.duration)?r.duration:es;s.style.transitionDuration=`${m}ms`,a.appendChild(s),requestAnimationFrame(()=>{const p=(i.width/100*3).toFixed(2);s.style.transform=`scale(${p}) translate(0, 0)`,s.style.opacity="1";const f=()=>{s.removeEventListener("transitionend",f),s.parentNode&&s.parentNode.removeChild(s)};s.addEventListener("transitionend",f)})}const ea={mounted(a,l){l.value&&Ur(a,l)},unmounted(a){const l=Zo.get(a);l&&(a.removeEventListener("click",l),Zo.delete(a))}};function Ur(a,l){a.style.position=a.style.position||"relative",a.style.overflow="hidden";const o=t=>zr(a,t,l);Zo.set(a,o),a.addEventListener("click",o)}function Jr(a){a?.duration&&(es=a.duration)}const Kr="clwaves",Wr=a=>(Jr(a),{deep:!0,mounted:ea.mounted,unmounted:ea.unmounted}),ts={mounted:ea.mounted},ns=Object.freeze(Object.defineProperty({__proto__:null,directive:Wr,name:Kr,wavesBind:ts},Symbol.toStringTag,{value:"Module"})),jr=["id"],Yr=["disabled","aria-label"],qr={key:2,class:"btn-label"},Xr={key:0,class:"btn-loading"},Gr={class:"btn-body-backdrop-container"},Qr={class:"btn-body-backdrop-text"},Qe=e.defineComponent({name:"ClButton",directives:{clwaves:ts},__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},classBtn:String,label:String,icon:String,iconName:String,color:{type:String,default:"default"},size:{type:String,validator:a=>a===void 0||["large","small","xl"].indexOf(a)!==-1},isShowLoad:{type:Boolean,default:!1},loadPos:{type:String,default:"right",validator:a=>["right","zoom-out","fixedCenter"].indexOf(a)!==-1},loadTheme:{type:String,default:"rotaryLine"},loadColor:String,loadDrift:{type:Boolean,default:!0},loadText:{type:String,default:"加载中"},isShowBackDrop:{type:Boolean,default:!1},teleportTarget:{type:String,default:""},backdropOpacity:{type:Number,default:.02,validator:a=>a>=0&&a<=1},isShowWaves:{type:Boolean,default:!0},wavesColor:{type:String,default:"white"},loadStatusIsIng:{type:[Boolean,null],default:null}},emits:{onClick:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useSlots(),c=e.ref(!1),r=e.ref(!1),d=e.ref(!1),m=e.useTemplateRef("refElBtn"),p=e.useTemplateRef("refElContent"),f=e.ref(!1),h=e.ref("");let g=null,S=!1,T=null;typeof window<"u"&&n.isEmpty(t.label)&&n.isEmpty(t.icon)&&n.isEmpty(t.iconName)&&!u.default&&ve.warn("ClButton","警告:label、icon、iconName 或默认插槽必须传一个值");const w=e.computed(()=>!n.isEmpty(t.label)||!!u.default),E=e.computed(()=>{const Z=t.icon||t.iconName;return n.isNonEmptyString(Z)?Z:""}),M=e.computed(()=>w.value&&t.label||"按钮"),V=e.computed(()=>t.disabled?!0:c.value),I=e.computed(()=>t.loadPos==="fixedCenter"),N=e.computed(()=>t.loadColor||"var(--cl-bg, #ffffff)"),x=e.computed(()=>t.loadColor||h.value),L=e.computed(()=>`rgba(0, 0, 0, ${t.backdropOpacity})`),D=e.computed(()=>{let Z=t.wavesColor||"white";return(n.isExistValue(t.color,"white")||n.isExistValue(t.color,"grayLight")||n.isExistValue(t.color,"text"))&&(Z="black"),Z}),O=e.computed(()=>t.isShowWaves?{color:D.value}:!1),X=e.computed(()=>{let Z=t.loadPos||"right";return n.isExistValue(t.classBtn,"btn-circle")&&n.isExistValue(Z,"right")&&(Z="zoom-out"),Z}),Q=e.computed(()=>{let Z="";switch(t.loadTheme){case"rotaryLine":Z=n.isExistValue(t.classBtn,"btn-circle")?"":"large";break;case"circleNotch":default:Z="large";break;case"circleBubble":Z="";break}return Z}),R=e.computed(()=>{const Z={"panel-button":!0};return n.getJsonMerge(Z,ue.getClassNameJson(t.className))}),C=e.computed(()=>{let Z={"btn-parent":!0,btn:!0};return n.isEmpty(t.color)||(Z[`btn-${t.color}`]=!0),Z=n.getJsonMerge(Z,ue.getClassNameJson(t.classBtn)),n.isEmpty(t.size)||(Z[`btn-${t.size}`]=!0),Z["btn-load-ing"]=c.value,c.value&&(Z[`btn-load-${X.value}`]=!0,Z[`btn-load-${t.loadTheme}`]=!0,Z["btn-load-nodrift"]=!t.loadDrift||X.value==="right"&&f.value),Z}),k=e.computed(()=>{const Z=c.value&&I.value;return{"btn-body-backdrop-main":!0,animated:!0,zoomIn:Z,zoomOut:!Z}}),b=e.computed(()=>{const Z={};return(w.value||E.value)&&X.value==="zoom-out"&&c.value&&!I.value&&(Z.opacity=0),Z}),v=()=>{s("onClick")},_=()=>{if(n.isExistValue(t.classBtn,"btn-circle"))return 20;switch(t.loadTheme){case"circleNotch":return 24;case"circleBubble":return 30;case"rotaryLine":default:return t.size==="small"?20:30}},y=()=>{if(typeof window>"u"||!m.value)return;const Z=m.value.querySelector(".btn-label")||m.value.querySelector(".btn-icon")||m.value,W=window.getComputedStyle(Z).color;n.isEmpty(W)||(h.value=W)},B=()=>{if(typeof window>"u"||!m.value||!p.value||c.value)return;const Z=m.value,Y=p.value.children;if(!Y.length){f.value=!0;return}const q=Z.getBoundingClientRect(),J=Y[Y.length-1].getBoundingClientRect(),U=J.right-Y[0].getBoundingClientRect().left,ae=q.right-J.right,G=_()+6+5;f.value=ae>=G&&U>0},A=()=>{F(),!(typeof window>"u"||!m.value||!window.ResizeObserver)&&(T=new window.ResizeObserver(()=>{B()}),T.observe(m.value))},F=()=>{T&&(T.disconnect(),T=null)},P=()=>{c.value||(g&&(clearTimeout(g),g=null),t.isShowBackDrop&&(r.value=!0,d.value=!0),c.value=!0)},H=()=>{t.isShowBackDrop&&(I.value?e.nextTick(()=>{S||(g=setTimeout(()=>{S||(r.value=!1,d.value=!1,g=null)},200))}):r.value=!1),c.value=!1};e.onMounted(()=>{e.nextTick(()=>{y(),B(),A()})}),e.onBeforeUnmount(()=>{S=!0,F(),g&&(clearTimeout(g),g=null)}),e.watch(()=>[t.label,t.icon,t.iconName,t.size,t.loadTheme,t.classBtn,t.loadDrift,t.color],()=>{e.nextTick(()=>{y(),B()})}),e.watch(()=>t.loadStatusIsIng,Z=>{n.isBoolean(Z)&&(Z?P():H())},{immediate:!0});const $=()=>{t.disabled||(t.isShowLoad&&P(),v())};return l({loadStart:()=>{P()},loadStop:()=>{H()}}),(Z,W)=>{const Y=e.resolveDirective("clwaves");return e.openBlock(),e.createElementBlock("span",{id:e.unref(i),class:e.normalizeClass(R.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(C.value),disabled:V.value,"aria-label":M.value,ref_key:"refElBtn",ref:m,onClick:$},[e.createElementVNode("span",{style:e.normalizeStyle(b.value),ref_key:"refElContent",ref:p},[E.value?(e.openBlock(),e.createBlock(fe,{key:0,name:E.value,className:"btn-icon"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),w.value?(e.openBlock(),e.createElementBlock("span",qr,[e.renderSlot(Z.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.label),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),c.value&&!I.value?(e.openBlock(),e.createElementBlock("span",Xr,[e.createVNode(He,{theme:a.loadTheme,size:Q.value,color:x.value},null,8,["theme","size","color"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Yr)),[[Y,O.value]]),r.value?(e.openBlock(),e.createBlock(Rt,{key:0,show:r.value,zIndex:1000001,duration:0,isLockScroll:!1,background:L.value,teleportTarget:a.teleportTarget},{default:e.withCtx(()=>[I.value&&d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(k.value)},[e.createElementVNode("div",Gr,[e.createVNode(He,{theme:a.loadTheme,size:Q.value,color:N.value},null,8,["theme","size","color"]),e.createElementVNode("div",Qr,e.toDisplayString(a.loadText||"加载中"),1)])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["show","background","teleportTarget"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,jr)}}}),Zr=["id"],ec={key:0,class:"callout-title"},tc={class:"callout-content"},os=e.defineComponent({name:"ClCallout",__name:"Index",props:{id:String,className:String,type:{type:String,default:"info"},title:String},setup(a){const l=a,o=l.id,t=e.computed(()=>n.getJsonMerge({"panel-callout":!0,[`callout-${l.type||"info"}`]:!0},ue.getClassNameJson(l.className)));return(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(o),role:"note"},[a.title?(e.openBlock(),e.createElementBlock("div",ec,e.toDisplayString(a.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",tc,[e.renderSlot(s.$slots,"default")])],10,Zr))}}),nc=["id"],oc={key:0,class:"card-head"},ac={key:0,class:"card-head-flex"},lc={class:"card-title"},sc={key:1,class:"card-title"},ic={key:2,class:"card-explain"},rc={key:2,class:"card-footer"},ua=e.defineComponent({name:"ClCard",__name:"Index",props:{id:String,className:String,classBody:String,theme:{type:String,default:"default"},isInnerPadZero:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.computed(()=>({"panel-card":!0,"card-box":!0,...ue.getClassNameJson(l.className),[`card-${l.theme||"default"}`]:!0})),s=e.computed(()=>({"card-body":!0,"card-body-padding-0":l.isInnerPadZero,...ue.getClassNameJson(l.classBody)}));return(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(o)},[i.$slots.headTitle||i.$slots.headExplain||i.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",oc,[i.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",ac,[e.createElementVNode("div",lc,[e.renderSlot(i.$slots,"headTitle")]),e.renderSlot(i.$slots,"headFlex")])):(e.openBlock(),e.createElementBlock("div",sc,[e.renderSlot(i.$slots,"headTitle")])),i.$slots.headExplain?(e.openBlock(),e.createElementBlock("div",ic,[e.renderSlot(i.$slots,"headExplain")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(s.value)},[e.renderSlot(i.$slots,"default")],2),i.$slots.foot?(e.openBlock(),e.createElementBlock("div",rc,[e.renderSlot(i.$slots,"foot")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,nc))}}),cc=["id"],as=e.defineComponent({name:"ClCardColor",__name:"Index",props:{id:String,className:String,classBody:String,color:{type:String,default:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"},isInnerPadZero:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.computed(()=>{const u={"card-color":!0};return n.getJsonMerge(u,ue.getClassNameJson(l.className))}),s=e.computed(()=>({"card-color-body":!0,"card-color-body--pad-zero":l.isInnerPadZero,...ue.getClassNameJson(l.classBody)})),i=e.computed(()=>({backgroundColor:n.isNonEmptyString(l.color)?l.color:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"}));return(u,c)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(t.value),style:e.normalizeStyle(i.value)},[e.createElementVNode("div",{class:e.normalizeClass(s.value)},[e.renderSlot(u.$slots,"default")],2)],14,cc))}}),uc=["click","hover","focus"],Bo={fade:"fade",show:"show"},dc={type:"tooltip",placement:"top",trigger:"click",theme:"white",wrap:"body",template:"",contentBody:"",contentHeader:"",selectorBody:"",selectorHead:"",selectorArrow:".arrow",isLoad:!1,loadOnCallback:null,loadOffCallback:null,isRunTrigger:!0,isStopPropagation:!0,isInitShow:!0,isHtml:!0,className:""};let mc=class{elementModal;optionModal;pageData;pageObject;constructor(l,o){this.elementModal={},this.elementModal.rely=l,this.optionModal=n.getJsonMerge(dc,o),this.pageData={isOpen:!1,events:[],scrollParents:[]},this.pageObject=null,["listenerOn","listenerOff","listenerHide","listenerRelatedMouseLeave","onScrollParentScroll"].forEach(t=>{this[t]=this[t].bind(this)}),this.init()}init(){if(!n.isEmpty(this.optionModal.template)){const l=this.getEventType();this.setEventListener(l)}}getEventType(){const l=[],o=[];let t=[];return n.isArray(this.optionModal.trigger)?t=this.optionModal.trigger:n.isString(this.optionModal.trigger)&&(t=this.optionModal.trigger.split(",")),t.forEach(s=>{switch(n.isExistValue(uc,s)?s:""){case"hover":l.push("mouseenter"),o.push("mouseleave");break;case"focus":l.push("focus"),o.push("blur");break;case"click":l.push("click"),o.push("click");break}}),{on:l,off:o}}setEventListener(l){n.isEmpty(l.on)||l.on.forEach(o=>{this.pageData.events.push({on:o,func:this.listenerOn,eventName:o}),this.elementModal.rely.addEventListener(o,this.listenerOn)}),n.isEmpty(l.off)||l.off.forEach(o=>{this.pageData.events.push({off:o,func:this.listenerOff,eventName:o}),this.elementModal.rely.addEventListener(o,this.listenerOff)})}listenerOn(l){if(this.optionModal.isInitShow){if(this.optionModal.isStopPropagation&&(l.preventDefault(),l.stopPropagation()),this.pageData.isOpen||!this.optionModal.isRunTrigger)return;l.useOpenToTip=!0,this.show(),this.optionModal.isLoad&&n.isFunction(this.optionModal.loadOnCallback)&&this.optionModal.loadOnCallback()}}listenerOff(l){!this.optionModal.isRunTrigger||n.isBoolean(l.useOpenToTip)&&l.useOpenToTip||(this.hide(l),this.optionModal.isLoad&&n.isFunction(this.optionModal.loadOffCallback)&&this.optionModal.loadOffCallback())}show(){if(n.isString(this.optionModal.wrap)){const l=window.document.querySelector(this.optionModal.wrap);if(n.isUndefined(l))return}this.pageData.isOpen||this.operateShow()}operateShow(){if(!this.pageData.isOpen){if(this.pageData.isOpen=!0,n.isUndefined(this.elementModal.tip)){this.elementModal.tip=this.createElement();const o=this.getWrapElement();n.isUndefined(o)||o.appendChild(this.elementModal.tip);const t={placement:this.optionModal.placement};t.modifiers=[{name:"offset",options:{offset:[0,8]}}],this.pageObject=Cr.createPopper(this.elementModal.rely,this.elementModal.tip,t)}else this.elementModal.tip.style.opacity="",this.elementModal.tip.style.pointerEvents="",this.pageObject.setOptions({modifiers:[{name:"eventListeners",enabled:!0}]});this.setContentBody(this.optionModal.contentBody),this.setContentHeader(this.optionModal.contentHeader);const l=[Bo.fade,Bo.show,`bs-${this.optionModal.type}-${this.optionModal.placement}`,`tooltip-${this.optionModal.theme}`];n.isEmpty(this.optionModal.className)||this.optionModal.className.split(" ").forEach(o=>{n.isEmpty(o)||l.push(o)}),this.elementModal.tip.className=ue.getAddClass(this.elementModal.tip.className,l),setTimeout(()=>{this.pageObject.update()},50),this.pageData.scrollParents=this.getScrollParents(),n.isEmpty(this.pageData.scrollParents)||this.pageData.scrollParents.forEach(o=>{o.addEventListener("scroll",this.onScrollParentScroll,{passive:!0})})}}createElement(){const l=window.document.createElement("div");return l.innerHTML=this.optionModal.template,l.childNodes[0]}setContentBody(l){if(!n.isEmpty(this.optionModal.selectorBody)&&!n.isEmpty(l))if(n.isUndefined(this.elementModal.tip))this.optionModal.contentBody=l;else{const o=this.elementModal.tip.querySelector(this.optionModal.selectorBody);if(!n.isUndefined(o)){if(this.optionModal.isHtml){const t=l.replace(/\\n/g,"<br>").replace(/\n/g,"<br>");o.innerHTML=t}else o.innerText=l;this.optionModal.contentBody=l,this.pageObject.update()}}}setInitShow(l){this.optionModal.isInitShow=l}setContentHeader(l){if(!n.isEmpty(this.optionModal.selectorHead)){const o=this.elementModal.tip.querySelector(this.optionModal.selectorHead);if(!n.isUndefined(o)){const t=n.isEmpty(l)?"":l;this.optionModal.isHtml?o.innerHTML=t:o.innerText=t,this.optionModal.contentHeader=t,this.pageObject.update()}}}getWrapElement(){let l;return n.isString(this.optionModal.wrap)?l=window.document.querySelector(this.optionModal.wrap):this.optionModal.wrap===!1&&(l=this.elementModal.rely.parentNode),l}getScrollParents(){const l=[];let o=this.elementModal.rely.parentElement;for(;o;){const t=window.getComputedStyle(o),s=t.overflow+t.overflowX+t.overflowY;/auto|scroll|overlay/.test(s)&&l.push(o),o=o.parentElement}return l}isVisibleInScrollParents(){const l=this.elementModal.rely.getBoundingClientRect();for(const o of this.pageData.scrollParents){const t=o.getBoundingClientRect();if(!!(l.right<=t.left||l.left>=t.right||l.bottom<=t.top||l.top>=t.bottom))return!1}return!0}onScrollParentScroll(){if(!this.pageData.isOpen||!this.elementModal.tip)return;const l=this.isVisibleInScrollParents();this.elementModal.tip.style.opacity=l?"":"0",this.elementModal.tip.style.pointerEvents=l?"":"none"}hide(l){if(!this.pageData.isOpen||!document.body.contains(this.elementModal.tip))return;let o=!0;if(l.type==="mouseleave"){const t=l.relatedreference||l.toElement||l.relatedTarget;this.elementModal.tip.contains(t)&&(o=!1,this.elementModal.tip.addEventListener(l.type,this.listenerRelatedMouseLeave))}o&&this.operateHide()}listenerRelatedMouseLeave(l){const o=l.relatedreference||l.toElement||l.relatedTarget;this.elementModal.tip.removeEventListener(l.type,this.listenerRelatedMouseLeave),this.elementModal.rely.contains(o)||this.hide(l)}operateHide(){this.pageData.isOpen&&(this.pageData.isOpen=!1,n.isEmpty(this.pageData.scrollParents)||(this.pageData.scrollParents.forEach(l=>{l.removeEventListener("scroll",this.onScrollParentScroll)}),this.pageData.scrollParents=[]),this.pageObject.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]}),this.elementModal.tip.className=ue.getRemoveClass(this.elementModal.tip.className,Bo.show),this.elementModal.tip.removeEventListener("mouseenter",this.listenerHide),this.elementModal.tip.removeEventListener("click",this.listenerHide),this.elementModal.tip.parentNode.removeChild(this.elementModal.tip),this.elementModal.tip=null)}listenerHide(){this.operateHide()}setRunTrigger(l){this.optionModal.isRunTrigger=l}dispose(){this.pageData.events.forEach(({eventName:l,func:o})=>{this.elementModal.rely.removeEventListener(l,o)}),this.pageData.events=[],this.pageObject&&(this.operateHide(),this.pageObject.destroy())}clShow(){this.operateShow()}clHide(){this.operateHide()}clToggle(){this.pageData.isOpen?this.operateHide():this.operateShow()}clSetContentBody(l){this.setContentBody(l)}clSetContentHeader(l){this.setContentHeader(l)}clSetRunTrigger(l){this.setRunTrigger(l)}clSetInitShow(l){this.setInitShow(l)}clDispose(){this.dispose()}};const Me={positions:{top:"top",topLeft:"top-start",topRight:"top-end",right:"right",rightTop:"right-start",rightBottom:"right-end",bottom:"bottom",bottomLeft:"bottom-start",bottomRight:"bottom-end",left:"left",leftTop:"left-start",leftBottom:"left-end"},triggers:["hover","click","focus"],themes:["white","black"],options:{position:"top",trigger:"hover",theme:"white",template:"<div class='tooltip'><div class='tooltip-inner'></div><div class='arrow' data-popper-arrow></div></div>",selectorBody:".tooltip-inner",selectorArrow:".arrow",isHtml:!0,isRunTrigger:!0,isFixedVisible:!1,isStopPropagation:!0,className:""},bind:(a,l)=>{Me.create(a,l)},create:(a,l)=>{if(n.isObject(l)&&!n.isUndefined(l.value)&&Me.getIsInit(l)){const t=Me._getValueHtml(l.value);if(!n.isEmpty(t)){const s=Me.getOptions();s.contentBody=t,s.placement=Me.getPosition(l),s.trigger=Me.getTrigger(l),s.theme=Me.getTheme(l),s.isHtml=Me.getIsHtml(l),s.isFixedVisible=Me.getFixedVisible(l),s.isStopPropagation=Me.getStopPropagation(l),s.className=Me.getClassName(l);try{const i=new mc(a,s);i._vueEl=a,a._tooltip=i}catch{}}}},getIsInit:a=>n.isObject(a.value)&&n.isBoolean(a.value.init)?a.value.init:!0,getOptions:()=>n.getJsonClone(Me.options),_getValueHtml:a=>{let l="";switch(n.getTypeof(a)){case"string":case"number":l=a.toString();break;case"object":n.isEmpty(a.html)||(l=a.html);break;default:l=""}return l},getPosition:a=>{let l=n.isObject(a.value)?a.value.position:"";if(n.isEmpty(l))for(const[o,t]of Object.entries(Me.positions))a.modifiers[o]&&(l=t);else n.isExistJsonKey(Me.positions,l)&&(l=Me.positions[l]);return n.isEmpty(l)?Me.options.position:l},getTrigger:a=>{let l=n.isObject(a.value)?a.value.trigger:"";return n.isEmpty(l)&&Me.triggers.forEach(o=>{a.modifiers[o]&&(l=o)}),n.isEmpty(l)?Me.options.trigger:l},getTheme:a=>{let l=n.isObject(a.value)?a.value.theme:"";return n.isEmpty(l)&&Me.themes.forEach(o=>{a.modifiers[o]&&(l=o)}),n.isEmpty(l)?Me.options.theme:l},getIsHtml:a=>{const l=n.isObject(a.value)?a.value.isHtml:!0;return n.isBoolean(l)?l:Me.options.isHtml},getIsRunTrigger:a=>n.isObject(a)&&n.isBoolean(a.isRunTrigger)?a.isRunTrigger:!0,getFixedVisible:a=>{const l=n.isObject(a.value)?a.value.isFixedVisible:!1;return n.isBoolean(l)?l:Me.options.isFixedVisible},getStopPropagation:a=>{const l=n.isObject(a.value)?a.value.isStopPropagation:!1;return n.isBoolean(l)?l:Me.options.isStopPropagation},getClassName:a=>{const l=n.isObject(a.value)?a.value.className:"";return n.isEmpty(l)?Me.options.className:l},update:(a,l)=>{const o=Me.getIsInit(l);if(o){!a._tooltip&&o&&Me.create(a,l);const t=Me._getValueHtml(l.value),s=Me._getValueHtml(l.oldValue),i=n.isObject(l.value);let u=!1;if(t!==s)u=!0;else if(i&&!n.isUndefined(l.value.updRefreshInx)){const c=l.value.updRefreshInx,r=l.oldValue.updRefreshInx;c!==r&&(u=!0)}if(a._tooltip){u&&a._tooltip.clSetContentBody(t),a._tooltip.clSetInitShow(o);const c=Me.getIsRunTrigger(l.value),r=Me.getIsRunTrigger(l.oldValue);(!c||!o)&&a._tooltip.clHide(),c!==r&&a._tooltip.clSetRunTrigger(c)}}else Me.destroy(a)},destroy:a=>{a._tooltip&&(a._tooltip.clDispose(),delete a._tooltip)},show:a=>{a._tooltip&&a._tooltip.clShow()},hide:a=>{a._tooltip&&a._tooltip.clHide()}},pc="clTooltip",fc=()=>({deep:!0,mounted:Me.bind,updated:Me.update,unmounted:Me.destroy}),dt={mounted:Me.bind,updated:Me.update},ta={show:Me.show,hide:Me.hide},ls=Object.freeze(Object.defineProperty({__proto__:null,directive:fc,name:pc,tooltipCommon:ta,tooltipDirectives:dt},Symbol.toStringTag,{value:"Module"})),hc=["id"],gc={key:0,class:"cl-plaintext-value"},vc=["id","name","value","disabled","checked","onClick"],yc=["for"],kc={key:0},da=e.defineComponent({name:"ClCheckbox",directives:{cltooltip:dt},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:String,required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},circle:{type:Boolean,default:!1},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:a=>["tooltip","clickCallback"].includes(a)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`checkbox-${n.getRandom(5)}`,u=n.isEmpty(t.name)?i+"_name":t.name,c=t.id,r=e.ref(n.split(t.value)),d=e.ref(!1);let m={};const p=e.ref(0),f={isProcessing:!1,_initEmitted:!1},h=e.computed(()=>t.isPlaintext?[]:t.list),g=e.computed(()=>{const b=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,p.value;const v=[];return r.value.forEach(_=>{const y=n.isExistJsonKey(m,_)?m[_]:void 0;y&&n.isNonEmptyString(y.name)&&v.push(y.name)}),v.join(b)}),S=e.computed(()=>n.getJsonMerge({"panel-checkbox":!0},ue.getClassNameJson(t.className))),T=e.computed(()=>{const b={checkbox:!0,"checkbox-default":!0};return b["checkbox-inline"]=t.isInline,b["checkbox-circle"]=t.circle,b}),w=b=>{const v={},{width:_}=t;return b&&!n.isEmpty(b.width)?v.width=b.width:n.isEmpty(_)||(v.width=t.width),v},E=b=>{s("update:value",b),s("update:modelValue",b)},M=b=>{const v=[];n.isEmpty(b)||n.split(b).forEach(y=>{n.isExistJsonKey(m,y)&&v.push(n.getJsonClone(m[y]))});const _=v.length>0&&v.length===(t.list?.length??0);E(b),s("onChange",b,v,_)},V=()=>{f._initEmitted||(f._initEmitted=!0,e.nextTick(()=>{s("onInit")}))},I=()=>{const b=[];return r.value.forEach(v=>{n.isExistJsonKey(m,v)&&b.push(v)}),b},N=b=>{m=n.isEmpty(b)?{}:n.getJsonByList(b),p.value+=1},x=()=>{if(d.value&&!n.isEmpty(r.value)){const b=I();n.isEqualArr(r.value,b)||(r.value=b,E(b.join(",")))}},L=b=>{const v=n.split(b);let _=n.isEqualArr(r.value,v);_&&(_=b===r.value.join(",")),_||(r.value=v)},D=()=>{d.value=(t.list?.length??0)!==0,N(t.list),x()};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.watch(d,b=>{b&&V()}),e.watch(()=>t.list,b=>{d.value||(d.value=!0,b.length===0&&x(),V())}),e.watch([()=>t.value,()=>t.list],([b,v])=>{const _=v;!d.value&&_.length>0&&(d.value=!0,V()),N(_),L(b),x()});const O=b=>{s("onTipClick",b)},X=async b=>{if(!(!b||b.isDisabled||t.disabled||f.isProcessing)&&!n.isEmpty(b.id)){f.isProcessing=!0;try{const v=String(b.id??"");let _=n.getArrClone(r.value);n.isExistValue(r.value,v)?_=n.getArrRemoveById(_,v):_.push(v);const y=_.join(",");let B=!0;if(t.checkChangeBefore)try{B=await t.checkChangeBefore(y),B=n.isBoolean(B)?B:!0}catch{B=!1}if(t.disabled||b.isDisabled)return;B&&(r.value=_,M(y))}catch(v){s("onError",v)}finally{f.isProcessing=!1}}};return l({getValue:()=>I().join(","),getValueData:()=>{const b=[];return r.value.forEach(v=>{n.isExistJsonKey(m,v)&&b.push(n.getJsonClone(m[v]))}),b},setValue:b=>{f.isProcessing||(L(b),x())},runInitComplete:()=>{d.value||(d.value=!0,N(t.list),L(t.value),x(),V())}}),(b,v)=>{const _=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(S.value),id:e.unref(c)},[a.isPlaintext?(e.openBlock(),e.createElementBlock("div",gc,e.toDisplayString(g.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(y,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${i}-${y.id??""}-${B}`},[y.isShow||y.isShow===void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(T.value),style:e.normalizeStyle(w(y))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:`${i}_${e.unref(u)}_${y.id??""}`,name:e.unref(u),value:y.id??"",disabled:y.isDisabled||a.disabled,checked:r.value.includes(String(y.id??"")),onClick:A=>X(y)},null,8,vc),e.createElementVNode("label",{for:`${i}_${e.unref(u)}_${y.id??""}`},[e.renderSlot(b.$slots,"default",{data:y},()=>[y.icon&&y.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",kc,[e.createVNode(fe,{name:y.icon},null,8,["name"])])),[[_,{html:y.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(y.name),1)],64))])],8,yc)]),y.tipMsg&&y.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:e.unref(n).isNonEmptyString(y.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(y.tipIcon)?y.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[_,{html:y.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(fe,{key:1,name:e.unref(n).isNonEmptyString(y.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(y.tipIcon)?y.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(A=>O(y),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,hc)}}}),Sc=["id"],bc=["id","name","checked","disabled"],wc=["for"],Cc={key:0},ft=e.defineComponent({name:"ClCheckboxOne",directives:{cltooltip:dt},__name:"One",props:{id:{},name:{},value:{type:Boolean},className:{},forId:{},label:{},disabled:{type:Boolean},circle:{type:Boolean},indeterminate:{type:Boolean},icon:{},tipMsg:{},tipIcon:{},tipMode:{}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:a=>!0,onTipClick:()=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=n.isEmpty(o.forId)?`cb_${o.name||""}_${n.getRandom(8)}`:o.forId,u=e.computed(()=>{const p={checkbox:!0,"checkbox-default":!0,"checkbox-inline":!0};return o.circle&&(p["checkbox-circle"]=!0),n.getJsonMerge(p,ue.getClassNameJson(o.className))}),c=e.computed(()=>({indeterminate:o.indeterminate})),r=(p,f)=>{t("update:value",f),t("update:modelValue",f),t("onChange",{event:p,value:f})},d=()=>{t("onTipClick")},m=p=>{r(p,p.currentTarget.checked)};return(p,f)=>{const h=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),id:e.unref(s)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:e.unref(i),name:a.name,class:e.normalizeClass(c.value),checked:a.value,disabled:a.disabled,onClick:m},null,10,bc),e.createElementVNode("label",{for:e.unref(i)},[a.icon?e.withDirectives((e.openBlock(),e.createElementBlock("span",Cc,[e.createVNode(fe,{name:a.icon},null,8,["name"])])),[[h,{html:a.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.label),1)],64))],8,wc)]),a.tipMsg?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:e.unref(n).isNonEmptyString(o.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(o.tipIcon)?o.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[h,{html:a.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(fe,{key:1,name:e.unref(n).isNonEmptyString(o.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(o.tipIcon)?o.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(d,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,Sc)}}}),Ec=()=>typeof window<"u";let wt=null;const Bc=()=>(wt||(wt=document.createElement("textarea"),wt.setAttribute("readonly",""),wt.style.position="fixed",wt.style.left="-9999px",wt.style.top="-9999px",wt.style.opacity="0",document.body.appendChild(wt)),wt),xc=a=>typeof a=="function"?a():a,el=(a,l)=>{try{const o=Bc();o.value=a,o.select(),o.setSelectionRange(0,99999),document.execCommand("copy")?l.successCallback?.():l.errorCallback?.(a)}catch{l.errorCallback?.(a)}finally{window.getSelection()?.removeAllRanges()}},Tc=a=>{const l=typeof a=="string"?{text:a}:a;if(!Ec()){l.errorCallback?.();return}let o;try{o=xc(l.text)}catch{l.errorCallback?.();return}if(!o){l.errorCallback?.();return}if(navigator.clipboard?.writeText){navigator.clipboard.writeText(o).then(()=>l.successCallback?.()).catch(()=>el(o,l));return}el(o,l)},ma=()=>({copy:Tc}),Dc=["id","onKeydown"],Ic={class:"clipboard-btn"},_c={key:0,class:"clipboard-operate-result"},tn=e.defineComponent({name:"ClClipboard",__name:"Index",props:{id:String,className:String,iconColorClass:String,isUseSuccess:{type:Boolean,default:!0},textLabel:{type:[String,Function],required:!0}},emits:{onCopySuccess:()=>!0,onCopyError:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.reactive({isHover:!1,isShowSuccess:!1});let u=null,c=!1;const r=e.computed(()=>{let h={"panel-clipboard":!0};return h=n.getJsonMerge(h,ue.getClassNameJson(o.className)),h}),d=()=>{u=ma()};e.onMounted(()=>{e.nextTick(()=>{d()})});const m=()=>{if(c)return;let h="";const{textLabel:g}=o;if(g)switch(typeof g){case"function":try{h=g()}catch{h="",t("onCopyError","复制失败 textLabel()")}break;case"string":h=g;break;default:h="";break}n.isEmpty(h)||!u||(c=!0,u.copy({text:h,successCallback:()=>{i.isShowSuccess=!0,t("onCopySuccess"),c=!1},errorCallback:()=>{i.isShowSuccess=!1,t("onCopyError",h),c=!1}}))},p=()=>{i.isHover=!0},f=()=>{i.isShowSuccess=!1,i.isHover=!1};return(h,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),id:e.unref(s),tabindex:"0",role:"button","aria-label":"复制",onMouseenter:p,onMouseleave:f,onClick:e.withModifiers(m,["stop"]),onKeydown:[e.withKeys(e.withModifiers(m,["prevent"]),["enter"]),e.withKeys(e.withModifiers(m,["prevent"]),["space"])]},[e.createElementVNode("div",Ic,[e.renderSlot(h.$slots,"default",{},()=>[e.createVNode(fe,{name:"copy",className:o.iconColorClass},null,8,["className"])])]),a.isUseSuccess&&i.isHover&&i.isShowSuccess?(e.openBlock(),e.createElementBlock("div",_c,[e.createVNode(fe,{name:"check1"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],42,Dc))}}),bn=e.defineComponent({name:"ClTransitionSlideUpDown",__name:"SlideUpDown",setup(a){const l=e.reactive({oldPaddingTop:"",oldPaddingBottom:"",oldOverflow:""}),o=(d,m)=>{const p=function(){m(),d.removeEventListener("transitionend",p,!1),d.removeEventListener("transitioncancel",p,!1)};d.addEventListener("transitionend",p,!1),d.addEventListener("transitioncancel",p,!1)},t=d=>{const m=d;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.paddingTop="0",m.style.paddingBottom="0",m.style.maxHeight="0"},s=(d,m)=>{const p=d,f=p.scrollHeight;if(f>0?p.style.maxHeight=f+"px":p.style.maxHeight="0",p.style.paddingTop=l.oldPaddingTop,p.style.paddingBottom=l.oldPaddingBottom,f===0&&!l.oldPaddingTop&&!l.oldPaddingBottom){m();return}p.style.overflow="hidden",o(d,m)},i=d=>{const m=d;m.style.maxHeight="",m.style.overflow=l.oldOverflow},u=d=>{const m=d;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.maxHeight=m.scrollHeight+"px",m.style.overflow="hidden"},c=(d,m)=>{const p=d;if(p.scrollHeight!==0)p.style.maxHeight="0",p.style.paddingBottom="0",p.style.paddingTop="0";else{m();return}o(d,m)},r=d=>{const m=d;m.style.maxHeight="",m.style.overflow=l.oldOverflow,m.style.paddingBottom=l.oldPaddingBottom,m.style.paddingTop=l.oldPaddingTop,l.oldOverflow=l.oldPaddingBottom=l.oldPaddingTop=""};return(d,m)=>(e.openBlock(),e.createBlock(e.Transition,{name:"clSlideUpDown",onBeforeEnter:t,onEnter:s,onAfterEnter:i,onBeforeLeave:u,onLeave:c,onAfterLeave:r},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3}))}}),Nc=["id"],Vc=["tabindex","role","aria-expanded"],Mc={class:"collapse-title"},Oc=["tabindex","role","aria-expanded","aria-label","onKeydown"],Lc={key:0,class:"collapse-body"},$c=300,Ac=50,ss=e.defineComponent({name:"ClCollapse",__name:"Index",props:{id:String,className:String,isOperate:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!0},isCollapseOnTitle:{type:Boolean,default:!1},isDestroyOnCollapse:{type:Boolean,default:!1}},emits:{onCollapse:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=`collapse-${n.getRandom(8)}`,i=e.reactive({isExpanded:n.isBoolean(o.isExpanded)?o.isExpanded:!0,isAnimating:!1});let u=null;const c=$c+Ac,r=e.computed(()=>n.isBoolean(o.isCollapseOnTitle)?o.isCollapseOnTitle:!1),d=e.computed(()=>n.isNonEmptyString(o.id)?o.id:s),m=e.computed(()=>n.getJsonMerge({"panel-collapse":!0},ue.getClassNameJson(o.className))),p=e.computed(()=>({"collapse-operate":!0,"icon-rotate":!0,"rotate-180":!i.isExpanded})),f=e.computed(()=>({"collapse-head":!0,"collapse-head-clickable":r.value})),h=()=>{u!==null&&(clearTimeout(u),u=null)};e.onUnmounted(()=>{h()}),e.watch(()=>o.isExpanded,w=>{const E=n.isBoolean(w)?w:!0;i.isExpanded!==E&&(h(),i.isAnimating=!1,i.isExpanded=E)});const g=()=>{i.isAnimating||(i.isAnimating=!0,i.isExpanded=!i.isExpanded,h(),u=setTimeout(()=>{u=null,i.isAnimating=!1},c),t("onCollapse",i.isExpanded))},S=w=>{if(!r.value)return;const E=w.target;E instanceof Element&&(E.closest(".collapse-operate")||(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),g()))},T=w=>{if(!r.value)return;const E=w.target;E instanceof Element&&(E.closest(".collapse-operate")||g())};return(w,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(m.value),id:d.value},[e.createElementVNode("div",{class:e.normalizeClass(f.value),tabindex:r.value?0:void 0,role:r.value?"button":void 0,"aria-expanded":r.value?i.isExpanded:void 0,onClick:T,onKeydown:S},[e.createElementVNode("div",Mc,[e.renderSlot(w.$slots,"title")]),e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(p.value),tabindex:r.value?-1:0,role:r.value?void 0:"button","aria-expanded":r.value?void 0:i.isExpanded,"aria-label":r.value?void 0:i.isExpanded?"折叠":"展开",onClick:g,onKeydown:[e.withKeys(e.withModifiers(g,["prevent"]),["enter"]),e.withKeys(e.withModifiers(g,["prevent"]),["space"])]},[e.createVNode(fe,{name:"angle-down"})],42,Oc),[[e.vShow,e.unref(n).isBoolean(a.isOperate)?a.isOperate:!0]])],42,Vc),e.createVNode(bn,null,{default:e.withCtx(()=>[!a.isDestroyOnCollapse||i.isExpanded?e.withDirectives((e.openBlock(),e.createElementBlock("div",Lc,[e.renderSlot(w.$slots,"default")],512)),[[e.vShow,i.isExpanded]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3})],10,Nc))}}),Fc=["id"],Pc={key:1,class:"countdown-num"},tl=864e5,nl=36e5,ol=6e4,Rc=100,Hc=1e3,is=e.defineComponent({name:"ClCountDown",__name:"Index",props:{id:String,className:String,time:{type:Number,default:0},format:{type:String,default:"HH:mm:ss"},isAutoStart:{type:Boolean,default:!0},isMillisecond:{type:Boolean,default:!1}},emits:["onChange","onFinish"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`countdown-${n.getRandom(5)}`,u=t.id,c=e.ref(0);let r=null,d=0,m=!1;const p=e.computed(()=>t.isMillisecond?Rc:Hc),f=e.computed(()=>{const L=Math.max(0,c.value),D=Math.floor(L/tl),O=Math.floor(L%tl/nl),X=Math.floor(L%nl/ol),Q=Math.floor(L%ol/1e3),R=L%1e3,C={DD:String(D).padStart(2,"0"),HH:String(O).padStart(2,"0"),mm:String(X).padStart(2,"0"),ss:String(Q).padStart(2,"0"),SSS:String(R).padStart(3,"0")},k=[],b=t.isMillisecond?/(DD|HH|mm|ss|SSS)/g:/(DD|HH|mm|ss)/g;let v=0,_;for(;(_=b.exec(t.format))!==null;){if(_.index>v){const y=t.format.slice(v,_.index);k.push({type:g(y)?"sep":"text",value:y})}k.push({type:"num",value:C[_[0]]||_[0]}),v=_.index+_[0].length}if(v<t.format.length){const y=t.format.slice(v);k.push({type:g(y)?"sep":"text",value:y})}return k}),h=e.computed(()=>{const L={"panel-count-down":!0};return n.getJsonMerge(L,ue.getClassNameJson(t.className))}),g=L=>{const D=L.trim();return D?/^[\p{P}\p{S}]+$/u.test(D):!1},S=()=>{const L=Number(t.time);return n.isFinite(L)&&L>0?L:0},T=L=>{c.value=Math.max(0,L),d=Date.now()+Math.max(0,L),m=!0,M(),r=setInterval(M,p.value)},w=()=>{if(m)return;const L=S();if(L<=0){c.value=0,s("onFinish");return}T(L)},E=()=>{if(!m){if(c.value<=0){w();return}T(c.value)}},M=()=>{const L=Math.max(0,d-Date.now());c.value=L,s("onChange",L),L<=0&&(V(),s("onFinish"))},V=()=>{r&&(clearInterval(r),r=null),m=!1};return e.onMounted(()=>{t.isAutoStart?w():c.value=S()}),e.onBeforeUnmount(()=>{V()}),e.watch(()=>t.time,()=>{V(),c.value=S(),t.isAutoStart&&c.value>0&&T(c.value)}),e.watch(()=>t.isAutoStart,L=>{L&&!m&&c.value>0&&T(c.value)}),e.watch(p,()=>{m&&(r&&clearInterval(r),r=setInterval(M,p.value))}),l({start:()=>{E()},pause:()=>{V()},reset:()=>{V(),c.value=S()}}),(L,D)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(h.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(O,X)=>(e.openBlock(),e.createElementBlock("span",{key:`${i}-${X}`,class:e.normalizeClass(["countdown-part",{"countdown-sep":O.type==="sep"}])},[O.type!=="num"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(O.value),1)],64)):(e.openBlock(),e.createElementBlock("span",Pc,e.toDisplayString(O.value),1))],2))),128))],10,Fc))}});/**!
|
|
3
|
-
* Sortable 1.15.0
|
|
4
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
5
|
-
* @author owenm <owen23355@gmail.com>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/function al(a,l){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);l&&(t=t.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),o.push.apply(o,t)}return o}function yt(a){for(var l=1;l<arguments.length;l++){var o=arguments[l]!=null?arguments[l]:{};l%2?al(Object(o),!0).forEach(function(t){zc(a,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):al(Object(o)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(o,t))})}return a}function zn(a){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zn=function(l){return typeof l}:zn=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},zn(a)}function zc(a,l,o){return l in a?Object.defineProperty(a,l,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[l]=o,a}function xt(){return xt=Object.assign||function(a){for(var l=1;l<arguments.length;l++){var o=arguments[l];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(a[t]=o[t])}return a},xt.apply(this,arguments)}function Uc(a,l){if(a==null)return{};var o={},t=Object.keys(a),s,i;for(i=0;i<t.length;i++)s=t[i],!(l.indexOf(s)>=0)&&(o[s]=a[s]);return o}function Jc(a,l){if(a==null)return{};var o=Uc(a,l),t,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);for(s=0;s<i.length;s++)t=i[s],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(a,t)&&(o[t]=a[t])}return o}var Kc="1.15.0";function Bt(a){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(a)}var Dt=Bt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wn=Bt(/Edge/i),ll=Bt(/firefox/i),fn=Bt(/safari/i)&&!Bt(/chrome/i)&&!Bt(/android/i),rs=Bt(/iP(ad|od|hone)/i),cs=Bt(/chrome/i)&&Bt(/android/i),us={capture:!1,passive:!1};function $e(a,l,o){a.addEventListener(l,o,!Dt&&us)}function Oe(a,l,o){a.removeEventListener(l,o,!Dt&&us)}function Gn(a,l){if(l){if(l[0]===">"&&(l=l.substring(1)),a)try{if(a.matches)return a.matches(l);if(a.msMatchesSelector)return a.msMatchesSelector(l);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(l)}catch{return!1}return!1}}function Wc(a){return a.host&&a!==document&&a.host.nodeType?a.host:a.parentNode}function vt(a,l,o,t){if(a){o=o||document;do{if(l!=null&&(l[0]===">"?a.parentNode===o&&Gn(a,l):Gn(a,l))||t&&a===o)return a;if(a===o)break}while(a=Wc(a))}return null}var sl=/\s+/g;function at(a,l,o){if(a&&l)if(a.classList)a.classList[o?"add":"remove"](l);else{var t=(" "+a.className+" ").replace(sl," ").replace(" "+l+" "," ");a.className=(t+(o?" "+l:"")).replace(sl," ")}}function Ve(a,l,o){var t=a&&a.style;if(t){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(o=a.currentStyle),l===void 0?o:o[l];!(l in t)&&l.indexOf("webkit")===-1&&(l="-webkit-"+l),t[l]=o+(typeof o=="string"?"":"px")}}function Gt(a,l){var o="";if(typeof a=="string")o=a;else do{var t=Ve(a,"transform");t&&t!=="none"&&(o=t+" "+o)}while(!l&&(a=a.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(o)}function ds(a,l,o){if(a){var t=a.getElementsByTagName(l),s=0,i=t.length;if(o)for(;s<i;s++)o(t[s],s);return t}return[]}function it(){var a=document.scrollingElement;return a||document.documentElement}function Ye(a,l,o,t,s){if(!(!a.getBoundingClientRect&&a!==window)){var i,u,c,r,d,m,p;if(a!==window&&a.parentNode&&a!==it())i=a.getBoundingClientRect(),u=i.top,c=i.left,r=i.bottom,d=i.right,m=i.height,p=i.width;else{var f=document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth,h=document.documentElement.clientHeight||document.body.clientHeight||window.innerHeight;u=0,c=0,r=h,d=f,m=h,p=f}if((l||o)&&a!==window&&(s=s||a.parentNode,!Dt))do if(s&&s.getBoundingClientRect&&(Ve(s,"transform")!=="none"||o&&Ve(s,"position")!=="static")){var g=s.getBoundingClientRect();u-=g.top+parseInt(Ve(s,"border-top-width")),c-=g.left+parseInt(Ve(s,"border-left-width")),r=u+i.height,d=c+i.width;break}while(s=s.parentNode);if(t&&a!==window){var S=Gt(s||a),T=S&&S.a,w=S&&S.d;S&&(u/=w,c/=T,p/=T,m/=w,r=u+m,d=c+p)}return{top:u,left:c,bottom:r,right:d,width:p,height:m}}}function il(a,l,o){for(var t=Mt(a,!0),s=Ye(a)[l];t;){var i=Ye(t)[o],u=void 0;if(u=s>=i,!u)return t;if(t===it())break;t=Mt(t,!1)}return!1}function Zt(a,l,o,t){for(var s=0,i=0,u=a.children;i<u.length;){if(u[i].style.display!=="none"&&u[i]!==Ie.ghostClone&&(t||u[i]!==Ie.dragged)&&vt(u[i],o.draggable,a,!1)){if(s===l)return u[i];s++}i++}return null}function pa(a,l){for(var o=a.lastElementChild;o&&(o===Ie.ghostClone||Ve(o,"display")==="none"||l&&!Gn(o,l));)o=o.previousElementSibling;return o||null}function st(a,l){var o=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==Ie.clone&&(!l||Gn(a,l))&&o++;return o}function rl(a){var l=0,o=0,t=it();if(a)do{var s=Gt(a),i=s.a,u=s.d;l+=a.scrollLeft*i,o+=a.scrollTop*u}while(a!==t&&(a=a.parentNode));return[l,o]}function jc(a,l){for(var o in a)if(a.hasOwnProperty(o)){for(var t in l)if(l.hasOwnProperty(t)&&l[t]===a[o][t])return Number(o)}return-1}function Mt(a,l){if(!a||!a.getBoundingClientRect)return it();var o=a,t=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var s=Ve(o);if(o.clientWidth<o.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return it();if(t||l)return o;t=!0}}while(o=o.parentNode);return it()}function Yc(a,l){if(a&&l)for(var o in l)l.hasOwnProperty(o)&&(a[o]=l[o]);return a}function xo(a,l){return Math.round(a.top)===Math.round(l.top)&&Math.round(a.left)===Math.round(l.left)&&Math.round(a.height)===Math.round(l.height)&&Math.round(a.width)===Math.round(l.width)}var hn;function ms(a,l){return function(){if(!hn){var o=arguments,t=this;o.length===1?a.call(t,o[0]):a.apply(t,o),hn=setTimeout(function(){hn=void 0},l)}}}function qc(){clearTimeout(hn),hn=void 0}function ps(a,l,o){a.scrollLeft+=l,a.scrollTop+=o}function fs(a){var l=window.Polymer,o=window.jQuery||window.Zepto;return l&&l.dom?l.dom(a).cloneNode(!0):o?o(a).clone(!0)[0]:a.cloneNode(!0)}var Ze="Sortable"+new Date().getTime();function Xc(){var a=[],l;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(s){if(!(Ve(s,"display")==="none"||s===Ie.ghostClone)){a.push({target:s,rect:Ye(s)});var i=yt({},a[a.length-1].rect);if(s.thisAnimationDuration){var u=Gt(s,!0);u&&(i.top-=u.f,i.left-=u.e)}s.fromRect=i}})}},addAnimationState:function(t){a.push(t)},removeAnimationState:function(t){a.splice(jc(a,{target:t}),1)},animateAll:function(t){var s=this;if(!this.options.animation){clearTimeout(l),typeof t=="function"&&t();return}var i=!1,u=0;a.forEach(function(c){var r=0,d=c.target,m=d.fromRect,p=Ye(d),f=d.prevFromRect,h=d.prevToRect,g=c.rect,S=Gt(d,!0);S&&(p.top-=S.f,p.left-=S.e),d.toRect=p,d.thisAnimationDuration&&xo(f,p)&&!xo(m,p)&&(g.top-p.top)/(g.left-p.left)===(m.top-p.top)/(m.left-p.left)&&(r=Qc(g,f,h,s.options)),xo(p,m)||(d.prevFromRect=m,d.prevToRect=p,r||(r=s.options.animation),s.animate(d,g,p,r)),r&&(i=!0,u=Math.max(u,r),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},r),d.thisAnimationDuration=r)}),clearTimeout(l),i?l=setTimeout(function(){typeof t=="function"&&t()},u):typeof t=="function"&&t(),a=[]},animate:function(t,s,i,u){if(u){Ve(t,"transition",""),Ve(t,"transform","");var c=Gt(this.el),r=c&&c.a,d=c&&c.d,m=(s.left-i.left)/(r||1),p=(s.top-i.top)/(d||1);t.animatingX=!!m,t.animatingY=!!p,Ve(t,"transform","translate3d("+m+"px,"+p+"px,0)"),this.forRepaintDummy=Gc(t),Ve(t,"transition","transform "+u+"ms"+(this.options.easing?" "+this.options.easing:"")),Ve(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){Ve(t,"transition",""),Ve(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},u)}}}}function Gc(a){return a.offsetWidth}function Qc(a,l,o,t){return Math.sqrt(Math.pow(l.top-a.top,2)+Math.pow(l.left-a.left,2))/Math.sqrt(Math.pow(l.top-o.top,2)+Math.pow(l.left-o.left,2))*t.animation}var Jt=[],To={initializeByDefault:!0},Cn={mount:function(l){for(var o in To)To.hasOwnProperty(o)&&!(o in l)&&(l[o]=To[o]);Jt.forEach(function(t){if(t.pluginName===l.pluginName)throw"Sortable: Cannot mount plugin ".concat(l.pluginName," more than once")}),Jt.push(l)},pluginEvent:function(l,o,t){var s=this;this.eventCanceled=!1,t.cancel=function(){s.eventCanceled=!0};var i=l+"Global";Jt.forEach(function(u){o[u.pluginName]&&(o[u.pluginName][i]&&o[u.pluginName][i](yt({sortable:o},t)),o.options[u.pluginName]&&o[u.pluginName][l]&&o[u.pluginName][l](yt({sortable:o},t)))})},initializePlugins:function(l,o,t,s){Jt.forEach(function(c){var r=c.pluginName;if(!(!l.options[r]&&!c.initializeByDefault)){var d=new c(l,o,l.options);d.sortable=l,d.options=l.options,l[r]=d,xt(t,d.defaults)}});for(var i in l.options)if(l.options.hasOwnProperty(i)){var u=this.modifyOption(l,i,l.options[i]);typeof u<"u"&&(l.options[i]=u)}},getEventProperties:function(l,o){var t={};return Jt.forEach(function(s){typeof s.eventProperties=="function"&&xt(t,s.eventProperties.call(o[s.pluginName],l))}),t},modifyOption:function(l,o,t){var s;return Jt.forEach(function(i){l[i.pluginName]&&i.optionListeners&&typeof i.optionListeners[o]=="function"&&(s=i.optionListeners[o].call(l[i.pluginName],t))}),s}};function Zc(a){var l=a.sortable,o=a.rootEl,t=a.name,s=a.targetEl,i=a.cloneEl,u=a.toEl,c=a.fromEl,r=a.oldIndex,d=a.newIndex,m=a.oldDraggableIndex,p=a.newDraggableIndex,f=a.originalEvent,h=a.putSortable,g=a.extraEventProperties;if(l=l||o&&o[Ze],!!l){var S,T=l.options,w="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!Dt&&!wn?S=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(t,!0,!0)),S.to=u||o,S.from=c||o,S.item=s||o,S.clone=i,S.oldIndex=r,S.newIndex=d,S.oldDraggableIndex=m,S.newDraggableIndex=p,S.originalEvent=f,S.pullMode=h?h.lastPutMode:void 0;var E=yt(yt({},g),Cn.getEventProperties(t,l));for(var M in E)S[M]=E[M];o&&o.dispatchEvent(S),T[w]&&T[w].call(l,S)}}var eu=["evt"],nt=function(l,o){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=t.evt,i=Jc(t,eu);Cn.pluginEvent.bind(Ie)(l,o,yt({dragEl:ke,parentEl:Ke,ghostEl:Ne,rootEl:Fe,nextEl:Ft,lastDownEl:Un,cloneEl:Je,cloneHidden:Vt,dragStarted:dn,putSortable:Ge,activeSortable:Ie.active,originalEvent:s,oldIndex:Xt,oldDraggableIndex:gn,newIndex:lt,newDraggableIndex:Nt,hideGhostForTarget:ys,unhideGhostForTarget:ks,cloneNowHidden:function(){Vt=!0},cloneNowShown:function(){Vt=!1},dispatchSortableEvent:function(c){tt({sortable:o,name:c,originalEvent:s})}},i))};function tt(a){Zc(yt({putSortable:Ge,cloneEl:Je,targetEl:ke,rootEl:Fe,oldIndex:Xt,oldDraggableIndex:gn,newIndex:lt,newDraggableIndex:Nt},a))}var ke,Yt,Ke,Ne,un,sn,Fe,Ft,Un,Je,Vt,Xt,lt,gn,Nt,Kt,Ge,qt=!1,Qn=!1,Zn=[],rt,pt,Do,Io,cl,ul,dn,Wt,vn,yn=!1,Vn=!1,Jn,Ue,_o=[],na=!1,eo=[],rn=null,gt=null,No=null,Ct=null,so=typeof document<"u",jt=rs,dl=wn||Dt?"cssFloat":"float",tu=so&&!cs&&!rs&&"draggable"in document.createElement("div"),hs=(function(){if(so){if(Dt)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}})(),gs=function(l,o){var t=Ve(l),s=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),i=Zt(l,0,o),u=Zt(l,1,o),c=i&&Ve(i),r=u&&Ve(u),d=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+Ye(i).width,m=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Ye(u).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&c.float&&c.float!=="none"){var p=c.float==="left"?"left":"right";return u&&(r.clear==="both"||r.clear===p)?"vertical":"horizontal"}return i&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||d>=s&&t[dl]==="none"||u&&t[dl]==="none"&&d+m>s)?"vertical":"horizontal"},nu=function(l,o,t){var s=t?l.left:l.top,i=t?l.right:l.bottom,u=t?l.width:l.height,c=t?o.left:o.top,r=t?o.right:o.bottom,d=t?o.width:o.height;return s===c||i===r||s+u/2===c+d/2},ou=function(l,o){var t;return Zn.some(function(s){var i=s[Ze].options.emptyInsertThreshold;if(!(!i||pa(s))){var u=Ye(s),c=l>=u.left-i&&l<=u.right+i,r=o>=u.top-i&&o<=u.bottom+i;if(c&&r)return t=s}}),t},vs=function(l){function o(i,u){return function(c,r,d,m){var p=c.options.group.name&&r.options.group.name&&c.options.group.name===r.options.group.name;if(i==null&&(u||p))return!0;if(i==null||i===!1)return!1;if(u&&i==="clone")return i;if(typeof i=="function")return o(i(c,r,d,m),u)(c,r,d,m);var f=(u?c:r).options.group.name;return i===!0||typeof i=="string"&&i===f||i.join&&i.indexOf(f)>-1}}var t={},s=l.group;(!s||zn(s)!="object")&&(s={name:s}),t.name=s.name,t.checkPull=o(s.pull,!0),t.checkPut=o(s.put),t.revertClone=s.revertClone,l.group=t},ys=function(){!hs&&Ne&&Ve(Ne,"display","none")},ks=function(){!hs&&Ne&&Ve(Ne,"display","")};so&&!cs&&document.addEventListener("click",function(a){if(Qn)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),Qn=!1,!1},!0);var $t=function(l){if(ke){l=l.touches?l.touches[0]:l;var o=ou(l.clientX,l.clientY);if(o){var t={};for(var s in l)l.hasOwnProperty(s)&&(t[s]=l[s]);t.clientX=l.clientX,t.clientY=l.clientY,t.pageX=l.pageX!==void 0?l.pageX:l.clientX,t.pageY=l.pageY!==void 0?l.pageY:l.clientY,t.target=t.rootEl=o,t.preventDefault=void 0,t.stopPropagation=void 0,o[Ze]._onDragOver(t)}}},au=function(l){if(ke){var o=Se._findOwnerSortable(ke.parentNode);o&&o._isOutsideThisEl(l.target)}};function Ie(a,l){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=l=xt({},l),a[Ze]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return gs(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,c){u.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ie.supportPointer!==!1&&"PointerEvent"in window&&!fn,emptyInsertThreshold:5,extOption:{boundary:{isOut:!1,element:"",x:0,y:0},wrapBody:{isWrap:!1,element:""},cross:{isCross:!1,isSameStruct:!0,dropEndBeforeCallback:null},tree:{isTree:!1,maxDepth:3,indentThreshold:20,isOnlyInnerMove:!1,isDragToChild:!0,isDragToParent:!0,rootId:"",regionCls:".darg-region"}}};Cn.initializePlugins(this,a,o);for(var t in o)!(t in l)&&(l[t]=o[t]);vs(l);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=l.forceFallback?!1:tu,this.nativeDraggable&&(this.options.touchStartThreshold=1),l.supportPointer?$e(a,"pointerdown",this._onTapStart):($e(a,"mousedown",this._onTapStart),$e(a,"touchstart",this._onTapStart)),this.nativeDraggable&&($e(a,"dragover",this),$e(a,"dragenter",this)),Zn.push(this.el),l.store&&l.store.get&&this.sort(l.store.get(this)||[]),xt(this,Xc())}Ie.prototype={constructor:Ie,_isOutsideThisEl:function(l){!this.el.contains(l)&&l!==this.el&&(Wt=null)},_getDirection:function(l,o){return typeof this.options.direction=="function"?this.options.direction.call(this,l,o,ke):this.options.direction},_onTapStart:function(l){if(l.cancelable){var o=this,t=this.el,s=this.options,i=s.preventOnFilter,u=l.type,c=l.touches&&l.touches[0]||l.pointerType&&l.pointerType==="touch"&&l,r=(c||l).target,d=l.target.shadowRoot&&(l.path&&l.path[0]||l.composedPath&&l.composedPath()[0])||r,m=s.filter;if(mu(t),!ke&&!(/mousedown|pointerdown/.test(u)&&l.button!==0||s.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&fn&&r&&r.tagName.toUpperCase()==="SELECT")){var p=t;if(Se.isTreeMode(s)){var f=Se._treeRegionCls(s),h=Se.getOwnerRegion(r,f);h&&(p=h)}if(r=vt(r,s.draggable,p,!1),!(r&&r.animated)&&Un!==r){if(Xt=st(r),gn=st(r,s.draggable),typeof m=="function"){if(m.call(this,l,r,this)){tt({sortable:o,rootEl:d,name:"filter",targetEl:r,toEl:t,fromEl:t}),nt("filter",o,{evt:l}),i&&l.cancelable&&l.preventDefault();return}}else if(m&&(m=m.split(",").some(function(g){if(g=vt(d,g.trim(),t,!1),g)return tt({sortable:o,rootEl:g,name:"filter",targetEl:r,fromEl:t,toEl:t}),nt("filter",o,{evt:l}),!0}),m)){i&&l.cancelable&&l.preventDefault();return}s.handle&&!vt(d,s.handle,t,!1)||this._prepareDragStart(l,c,r)}}}},_prepareDragStart:function(l,o,t){var s=this,i=s.el,u=s.options,c=i.ownerDocument,r,d=!!(u.extOption&&u.extOption.tree&&u.extOption.tree.isTree),m=!1;if(t&&!ke){if(t.parentNode===i)m=!0;else if(d&&i.contains(t)){var p=Se.findNearestTreeRoot(t,i);m=p===i}}if(m){var f=Ye(t);if(Fe=i,ke=t,Ke=ke.parentNode,Ft=ke.nextSibling,Un=t,Kt=u.group,Ie.dragged=ke,rt={target:ke,clientX:(o||l).clientX,clientY:(o||l).clientY},cl=rt.clientX-f.left,ul=rt.clientY-f.top,this._lastX=(o||l).clientX,this._lastY=(o||l).clientY,Se.isTreeMode(u)){var h=o||l;Se._tree.startPageX=h.pageX!==void 0?h.pageX:h.clientX,Se._tree.dropInfo=null,Se._tree.startDragDepth=Se.getNodeDepth(ke,Se._treeRegionCls(u));var g=window.pageXOffset||document.documentElement.scrollLeft||0;Se._tree.startLeftPage=ke.getBoundingClientRect().left+g}if(ke.style["will-change"]="transform",r=function(){if(nt("delayEnded",s,{evt:l}),Ie.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!ll&&s.nativeDraggable&&(ke.draggable=!0),s._triggerDragStart(l,o),tt({sortable:s,name:"choose",originalEvent:l}),at(ke,u.chosenClass,!0)},u.ignore.split(",").forEach(function(S){ds(ke,S.trim(),Vo)}),$e(c,"dragover",$t),$e(c,"mousemove",$t),$e(c,"touchmove",$t),$e(c,"mouseup",s._onDrop),$e(c,"touchend",s._onDrop),$e(c,"touchcancel",s._onDrop),ll&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ke.draggable=!0),nt("delayStart",this,{evt:l}),u.delay&&(!u.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(wn||Dt))){if(Ie.eventCanceled){this._onDrop();return}$e(c,"mouseup",s._disableDelayedDrag),$e(c,"touchend",s._disableDelayedDrag),$e(c,"touchcancel",s._disableDelayedDrag),$e(c,"mousemove",s._delayedDragTouchMoveHandler),$e(c,"touchmove",s._delayedDragTouchMoveHandler),u.supportPointer&&$e(c,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(r,u.delay)}else r()}},_delayedDragTouchMoveHandler:function(l){var o=l.touches?l.touches[0]:l;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ke&&Vo(ke),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._disableDelayedDrag),Oe(l,"touchend",this._disableDelayedDrag),Oe(l,"touchcancel",this._disableDelayedDrag),Oe(l,"mousemove",this._delayedDragTouchMoveHandler),Oe(l,"touchmove",this._delayedDragTouchMoveHandler),Oe(l,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(l,o){o=o||l.pointerType=="touch"&&l,!this.nativeDraggable||o?this.options.supportPointer?$e(document,"pointermove",this._onTouchMove):o?$e(document,"touchmove",this._onTouchMove):$e(document,"mousemove",this._onTouchMove):($e(ke,"dragend",this),$e(Fe,"dragstart",this._onDragStart));try{document.selection?Kn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(l,o){if(qt=!1,Fe&&ke){nt("dragStarted",this,{evt:o}),this.nativeDraggable&&$e(document,"dragover",au);var t=this.options;!l&&at(ke,t.dragClass,!1),at(ke,t.ghostClass,!0),Ie.active=this,l&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(pt){this._lastX=pt.clientX,this._lastY=pt.clientY,ys();for(var l=document.elementFromPoint(pt.clientX,pt.clientY),o=l;l&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(pt.clientX,pt.clientY),l!==o);)o=l;var t=Se._findOwnerSortable(ke.parentNode);if(t&&t._isOutsideThisEl(l),o)do{if(o[Ze]){var s=void 0;if(s=o[Ze]._onDragOver({clientX:pt.clientX,clientY:pt.clientY,target:l,rootEl:o}),s&&!this.options.dragoverBubble)break}l=o}while(o=o.parentNode);ks()}},_onTouchMove:function(l){if(rt){var o=this.options,t=o.fallbackTolerance,s=o.fallbackOffset,i=l.touches?l.touches[0]:l,u=Ne&&(No||(No=Gt(Ne,!0))),c=Ne&&u&&u.a,r=Ne&&u&&u.d,d,m=jt&&Ue?it():null,p,f;if(jt&&Ue&&(Ct&&Ct.el===Ue&&Ct.scrollLeft===Ue.scrollLeft&&Ct.scrollTop===Ue.scrollTop&&Ct.winTop===m.scrollTop&&Ct.winLeft===m.scrollLeft?d=Ct.offset:(d=rl(Ue),Ct={el:Ue,scrollLeft:Ue.scrollLeft,scrollTop:Ue.scrollTop,winTop:m.scrollTop,winLeft:m.scrollLeft,offset:d})),p=(i.clientX-rt.clientX+s.x)/(c||1)+(d?d[0]-_o[0]:0)/(c||1),f=(i.clientY-rt.clientY+s.y)/(r||1)+(d?d[1]-_o[1]:0)/(r||1),!Ie.active&&!qt){if(t&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<t)return;this._onDragStart(l,!0)}if(Ne){u?(u.e+=p-(Do||0),u.f+=f-(Io||0)):u={a:1,b:0,c:0,d:1,e:p,f};var h="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");Ve(Ne,"transform",h),Do=p,Io=f,pt=i;const T=Se.checkMoveOutBoundary(Ne,this.el,this.options);if(T.isOut){var g=0;jt||(rn==null&&(rn=it().scrollTop),g=it().scrollTop-rn),sn?(u.e=sn.e,u.f=sn.f-g):(T.top&&(u.f=T.x*-1-g),T.right&&(u.e=T.y),T.bottom&&(u.f=T.x-g),T.left&&(u.e=T.y*-1));var S="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");Ve(Ne,"transform",S)}else rn=null,sn={a:u.a,b:u.b,c:u.c,d:u.d,e:u.e,f:u.f}}l.cancelable&&l.preventDefault()}},_appendGhost:function(){if(!Ne){var l=this.options.fallbackOnBody?document.body:Fe,o=Ye(ke,!0,jt,!0,l),t=this.options;if(jt){for(Ue=l;Ve(Ue,"position")==="static"&&Ve(Ue,"transform")==="none"&&Ue!==document;)Ue=Ue.parentNode;Ue!==document.body&&Ue!==document.documentElement?(Ue===document&&(Ue=it()),o.top+=Ue.scrollTop,o.left+=Ue.scrollLeft):Ue=it(),_o=rl(Ue)}un=ke.cloneNode(!0),Ne=ke.cloneNode(!0),Ne=Se.setWrapBody(Ne,this.el,this.options),at(Ne,t.ghostClass,!1),at(Ne,t.fallbackClass,!0),at(Ne,t.dragClass,!0),Ve(Ne,"transition",""),Ve(Ne,"transform",""),Ve(Ne,"box-sizing","border-box"),Ve(Ne,"margin",0),Ve(Ne,"top",o.top),Ve(Ne,"left",o.left),Ve(Ne,"width",o.width),Ve(Ne,"height",o.height),Ve(Ne,"opacity","0.8"),Ve(Ne,"position",jt?"absolute":"fixed"),Ve(Ne,"zIndex","100000"),Ve(Ne,"pointerEvents","none"),Ie.ghost=Ne,Ie.ghostClone=un,l.appendChild(Ne),Ve(Ne,"transform-origin",cl/parseInt(Ne.style.width)*100+"% "+ul/parseInt(Ne.style.height)*100+"%")}},_onDragStart:function(l,o){var t=this,s=l.dataTransfer,i=t.options;if(nt("dragStart",this,{evt:l}),Ie.eventCanceled){this._onDrop();return}nt("setupClone",this),Ie.eventCanceled||(Je=fs(ke),Je.removeAttribute("id"),Je.draggable=!1,Je.style["will-change"]="",this._hideClone(),at(Je,this.options.chosenClass,!1),Ie.clone=Je),t.cloneId=Kn(function(){nt("clone",t),!Ie.eventCanceled&&(t.options.removeCloneOnHide||Fe.insertBefore(Je,ke),t._hideClone(),tt({sortable:t,name:"clone"}))}),!o&&at(ke,i.dragClass,!0),o?(Qn=!0,t._loopId=setInterval(t._emulateDragOver,50)):(Oe(document,"mouseup",t._onDrop),Oe(document,"touchend",t._onDrop),Oe(document,"touchcancel",t._onDrop),s&&(s.effectAllowed="move",i.setData&&i.setData.call(t,s,ke)),$e(document,"drop",t),Ve(ke,"transform","translateZ(0)")),qt=!0,t._dragStartId=Kn(t._dragStarted.bind(t,o,l)),$e(document,"selectstart",t),dn=!0,fn&&Ve(document.body,"user-select","none")},_onDragOver:function(l){var o=this.el,t=l.target,s,i,u,c=this.options,r=c.group,d=Ie.active,m=Kt===r,p=c.sort,f=Ge||d,h,g=this,S=!1;if(na)return;if(Se.isTreeMode(c)){var T=m;if(!T&&r&&Kt){var w=!!r.name&&r.name===Kt.name;w&&(T=typeof r.checkPut=="function"?!!r.checkPut(this,d,ke,l):!0)}if(!T){Se._tree.dropInfo={isReject:!0,reason:"out-of-group"},Se.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}Se.treeDragOver(this,l,t),Se.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}function E(B,A){nt(B,g,yt({evt:l,isOwner:m,axis:h?"vertical":"horizontal",revert:u,dragRect:s,targetRect:i,canSort:p,fromSortable:f,target:t,completed:V,onMove:function(P,H){return Mn(Fe,o,ke,s,P,Ye(P),l,H)},changed:I},A))}function M(){E("dragOverAnimationCapture"),g.captureAnimationState(),g!==f&&f.captureAnimationState()}function V(B){if(E("dragOverCompleted",{insertion:B}),B&&(m?d._hideClone():d._showClone(g),g!==f&&(at(ke,Ge?Ge.options.ghostClass:d.options.ghostClass,!1),at(ke,c.ghostClass,!0)),Ge!==g&&g!==Ie.active?Ge=g:g===Ie.active&&Ge&&(Ge=null),f===g&&(g._ignoreWhileAnimating=t),g.animateAll(function(){E("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(t===ke&&!ke.animated||t===o&&!t.animated)&&(Wt=null),!c.dragoverBubble&&!l.rootEl&&t!==document){var A=Se._findOwnerSortable(ke.parentNode);A&&A._isOutsideThisEl(l.target),!B&&$t(l)}return!c.dragoverBubble&&l.stopPropagation&&l.stopPropagation(),S=!0}function I(){lt=st(ke),Nt=st(ke,c.draggable),tt({sortable:g,name:"change",toEl:o,newIndex:lt,newDraggableIndex:Nt,originalEvent:l})}if(l.preventDefault!==void 0&&l.cancelable&&l.preventDefault(),t=vt(t,c.draggable,o,!0),E("dragOver"),Ie.eventCanceled)return S;if(ke.contains(l.target)||t.animated&&t.animatingX&&t.animatingY||g._ignoreWhileAnimating===t)return V(!1);if(Qn=!1,d&&!c.disabled&&(m?p||(u=Ke!==Fe):Ge===this||(this.lastPutMode=Kt.checkPull(this,d,ke,l))&&r.checkPut(this,d,ke,l))){if(h=this._getDirection(l,t)==="vertical",s=Ye(ke),E("dragOverValid"),Ie.eventCanceled)return S;if(u)return Ke=Fe,M(),this._hideClone(),E("revert"),Ie.eventCanceled||(Se.setCrossEl(t,this.options),Ft?Fe.insertBefore(ke,Ft):Fe.appendChild(ke)),V(!0);var N=pa(o,c.draggable);if(!N||ru(l,h,this)&&!N.animated){if(N===ke)return V(!1);if(N&&o===l.target&&(t=N),t&&(i=Ye(t)),Mn(Fe,o,ke,s,t,i,l,!!t)!==!1)return M(),Se.setCrossEl(t,this.options),N&&N.nextSibling?o.insertBefore(ke,N.nextSibling):o.appendChild(ke),Ke=o,I(),V(!0)}else if(N&&iu(l,h,this)){var x=Zt(o,0,c,!0);if(x===ke)return V(!1);if(t=x,i=Ye(t),Mn(Fe,o,ke,s,t,i,l,!1)!==!1)return M(),Se.setCrossEl(t,this.options),o.insertBefore(ke,x),Ke=o,I(),V(!0)}else if(t.parentNode===o){i=Ye(t);var L=0,D,O=ke.parentNode!==o,X=!nu(ke.animated&&ke.toRect||s,t.animated&&t.toRect||i,h),Q=h?"top":"left",R=il(t,"top","top")||il(ke,"top","top"),C=R?R.scrollTop:void 0;Wt!==t&&(D=i[Q],yn=!1,Vn=!X&&c.invertSwap||O),L=cu(l,t,i,h,X?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,Vn,Wt===t);var k;if(L!==0){var b=st(ke);do b-=L,k=Ke.children[b];while(k&&(Ve(k,"display")==="none"||k===un))}if(L===0||k===t)return V(!1);Wt=t,vn=L;var v=t.nextElementSibling,_=!1;_=L===1;var y=Mn(Fe,o,ke,s,t,i,l,_);if(y!==!1)return(y===1||y===-1)&&(_=y===1),na=!0,setTimeout(su,30),M(),Se.setCrossEl(t,this.options),_&&!v?o.appendChild(ke):t.parentNode.insertBefore(ke,_?v:t),R&&ps(R,0,C-R.scrollTop),Ke=ke.parentNode,D!==void 0&&!Vn&&(Jn=Math.abs(D-Ye(t)[Q])),I(),V(!0)}if(o.contains(ke))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Oe(document,"mousemove",this._onTouchMove),Oe(document,"touchmove",this._onTouchMove),Oe(document,"pointermove",this._onTouchMove),Oe(document,"dragover",$t),Oe(document,"mousemove",$t),Oe(document,"touchmove",$t)},_offUpEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._onDrop),Oe(l,"touchend",this._onDrop),Oe(l,"pointerup",this._onDrop),Oe(l,"touchcancel",this._onDrop),Oe(document,"selectstart",this)},_onDrop:function(l){Se.crossDropEnd(this.options,this.el).then(o=>{if(!this.el){this._nulling();return}if(o){var t=this.el,s=this.options;if(lt=st(ke),Nt=st(ke,s.draggable),nt("drop",this,{evt:l}),Ke=ke&&ke.parentNode,lt=st(ke),Nt=st(ke,s.draggable),Se.isTreeMode(s)&&typeof s.onUpdate=="function"&&s.onUpdate(),Ie.eventCanceled){this._nulling();return}qt=!1,Vn=!1,yn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),oa(this.cloneId),oa(this._dragStartId),this.nativeDraggable&&(Oe(document,"drop",this),Oe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),fn&&Ve(document.body,"user-select",""),Ve(ke,"transform",""),l&&(dn&&(l.cancelable&&l.preventDefault(),!s.dropBubble&&l.stopPropagation()),Ne&&Ne.parentNode&&Ne.parentNode.removeChild(Ne),(Fe===Ke||Ge&&Ge.lastPutMode!=="clone")&&Je&&Je.parentNode&&Je.parentNode.removeChild(Je),ke&&(this.nativeDraggable&&Oe(ke,"dragend",this),Vo(ke),ke.style["will-change"]="",dn&&!qt&&at(ke,Ge?Ge.options.ghostClass:this.options.ghostClass,!1),at(ke,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:Ke,newIndex:null,newDraggableIndex:null,originalEvent:l}),Fe!==Ke?(lt>=0&&(tt({rootEl:Ke,name:"add",toEl:Ke,fromEl:Fe,originalEvent:l}),tt({sortable:this,name:"remove",toEl:Ke,originalEvent:l}),tt({rootEl:Ke,name:"sort",toEl:Ke,fromEl:Fe,originalEvent:l}),tt({sortable:this,name:"sort",toEl:Ke,originalEvent:l})),Ge&&Ge.save()):lt!==Xt&<>=0&&(tt({sortable:this,name:"update",toEl:Ke,originalEvent:l}),tt({sortable:this,name:"sort",toEl:Ke,originalEvent:l})),Ie.active&&((lt==null||lt===-1)&&(lt=Xt,Nt=gn),tt({sortable:this,name:"end",toEl:Ke,originalEvent:l}),this.save()))),this._nulling()}})},_nulling:function(){nt("nulling",this),Fe=ke=Yt=Ke=Ne=un=Ft=Je=Un=Vt=rt=pt=dn=lt=Nt=Xt=gn=Wt=vn=Ge=Kt=Ie.dragged=Ie.ghost=Ie.ghostClone=Ie.clone=Ie.active=sn=rn=No=Ct=null,Se._clearHiddenBox(),Se.resetTreeState(),eo.forEach(function(l){l.checked=!0}),eo.length=Do=Io=0},handleEvent:function(l){switch(l.type){case"drop":case"dragend":this._onDrop(l);break;case"dragenter":case"dragover":ke&&(this._onDragOver(l),lu(l));break;case"selectstart":l.preventDefault();break}},toArray:function(l){for(var o=[],t,s=this.el.children,i=0,u=s.length,c=this.options;i<u;i++)t=s[i],vt(t,c.draggable,this.el,!1)&&o.push(t.getAttribute(c.dataIdAttr)||du(t));return o},sort:function(l,o){var t={},s=this.el;this.toArray().forEach(function(i,u){var c=s.children[u];vt(c,this.options.draggable,s,!1)&&(t[i]=c)},this),o&&this.captureAnimationState(),l.forEach(function(i){t[i]&&(s.removeChild(t[i]),s.appendChild(t[i]))}),o&&this.animateAll()},save:function(){var l=this.options.store;l&&l.set&&l.set(this)},closest:function(l,o){return vt(l,o||this.options.draggable,this.el,!1)},option:function(l,o){var t=this.options;if(o===void 0)return t[l];var s=Cn.modifyOption(this,l,o);typeof s<"u"?t[l]=s:t[l]=o,l==="group"&&vs(t)},destroy:function(){nt("destroy",this);var l=this.el;l[Ze]=null,Oe(l,"mousedown",this._onTapStart),Oe(l,"touchstart",this._onTapStart),Oe(l,"pointerdown",this._onTapStart),this.nativeDraggable&&(Oe(l,"dragover",this),Oe(l,"dragenter",this)),Array.prototype.forEach.call(l.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._offMoveEvents(),this._offUpEvents(),this._onDrop(),Ne&&Ne.parentNode&&(Ne.parentNode.removeChild(Ne),Ne=null),this._disableDelayedDragEvents(),Zn.splice(Zn.indexOf(this.el),1),this.el=l=null},_hideClone:function(){if(!Vt){if(nt("hideClone",this),Ie.eventCanceled)return;Ve(Je,"display","none"),this.options.removeCloneOnHide&&Je.parentNode&&Je.parentNode.removeChild(Je),Vt=!0}},_showClone:function(l){if(l.lastPutMode!=="clone"){this._hideClone();return}if(Vt){if(nt("showClone",this),Ie.eventCanceled)return;ke.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Je,ke):Ft?Fe.insertBefore(Je,Ft):Fe.appendChild(Je),this.options.group.revertClone&&this.animate(ke,Je),Ve(Je,"display",""),Vt=!1}}};function lu(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function Mn(a,l,o,t,s,i,u,c){var r,d=a[Ze],m=d.options.onMove,p;return window.CustomEvent&&!Dt&&!wn?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=l,r.from=a,r.dragged=o,r.draggedRect=t,r.related=s||l,r.relatedRect=i||Ye(l),r.willInsertAfter=c,r.originalEvent=u,a.dispatchEvent(r),m&&(p=m.call(d,r,u)),p}function Vo(a){a.draggable=!1}function su(){na=!1}function iu(a,l,o){var t=Ye(Zt(o.el,0,o.options,!0)),s=10;return l?a.clientX<t.left-s||a.clientY<t.top&&a.clientX<t.right:a.clientY<t.top-s||a.clientY<t.bottom&&a.clientX<t.left}function ru(a,l,o){var t=Ye(pa(o.el,o.options.draggable)),s=10;return l?a.clientX>t.right+s||a.clientX<=t.right&&a.clientY>t.bottom&&a.clientX>=t.left:a.clientX>t.right&&a.clientY>t.top||a.clientX<=t.right&&a.clientY>t.bottom+s}function cu(a,l,o,t,s,i,u,c){var r=t?a.clientY:a.clientX,d=t?o.height:o.width,m=t?o.top:o.left,p=t?o.bottom:o.right,f=!1;if(!u){if(c&&Jn<d*s){if(!yn&&(vn===1?r>m+d*i/2:r<p-d*i/2)&&(yn=!0),yn)f=!0;else if(vn===1?r<m+Jn:r>p-Jn)return-vn}else if(r>m+d*(1-s)/2&&r<p-d*(1-s)/2)return uu(l)}return f=f||u,f&&(r<m+d*i/2||r>p-d*i/2)?r>m+d/2?1:-1:0}function uu(a){return st(ke)<st(a)?1:-1}function du(a){for(var l=a.tagName+a.className+a.src+a.href+a.textContent,o=l.length,t=0;o--;)t+=l.charCodeAt(o);return t.toString(36)}function mu(a){eo.length=0;for(var l=a.getElementsByTagName("input"),o=l.length;o--;){var t=l[o];t.checked&&eo.push(t)}}function Kn(a){return setTimeout(a,0)}function oa(a){return clearTimeout(a)}so&&$e(document,"touchmove",function(a){(Ie.active||qt)&&a.cancelable&&a.preventDefault()});Ie.utils={on:$e,off:Oe,css:Ve,find:ds,is:function(l,o){return!!vt(l,o,l,!1)},extend:Yc,throttle:ms,closest:vt,toggleClass:at,clone:fs,index:st,nextTick:Kn,cancelNextTick:oa,detectDirection:gs,getChild:Zt};Ie.get=function(a){return a[Ze]};Ie.mount=function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];l[0].constructor===Array&&(l=l[0]),l.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ie.utils=yt(yt({},Ie.utils),t.utils)),Cn.mount(t)})};Ie.create=function(a,l){return new Ie(a,l)};Ie.version=Kc;var je=[],mn,aa,la=!1,Mo,Oo,to,pn;function pu(){function a(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this))}return a.prototype={dragStarted:function(o){var t=o.originalEvent;this.sortable.nativeDraggable?$e(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$e(document,"pointermove",this._handleFallbackAutoScroll):t.touches?$e(document,"touchmove",this._handleFallbackAutoScroll):$e(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var t=o.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Oe(document,"dragover",this._handleAutoScroll):(Oe(document,"pointermove",this._handleFallbackAutoScroll),Oe(document,"touchmove",this._handleFallbackAutoScroll),Oe(document,"mousemove",this._handleFallbackAutoScroll)),ml(),Wn(),qc()},nulling:function(){to=aa=mn=la=pn=Mo=Oo=null,je.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,t){var s=this,i=(o.touches?o.touches[0]:o).clientX,u=(o.touches?o.touches[0]:o).clientY,c=document.elementFromPoint(i,u);if(to=o,t||this.options.forceAutoScrollFallback||wn||Dt||fn){Lo(o,this.options,c,t);var r=Mt(c,!0);la&&(!pn||i!==Mo||u!==Oo)&&(pn&&ml(),pn=setInterval(function(){var d=Mt(document.elementFromPoint(i,u),!0);d!==r&&(r=d,Wn()),Lo(o,s.options,d,t)},10),Mo=i,Oo=u)}else{if(!this.options.bubbleScroll||Mt(c,!0)===it()){Wn();return}Lo(o,this.options,Mt(c,!1),!1)}}},xt(a,{pluginName:"scroll",initializeByDefault:!0})}function Wn(){je.forEach(function(a){clearInterval(a.pid)}),je=[]}function ml(){clearInterval(pn)}var Lo=ms(function(a,l,o,t){if(l.scroll){var s=(a.touches?a.touches[0]:a).clientX,i=(a.touches?a.touches[0]:a).clientY,u=l.scrollSensitivity,c=l.scrollSpeed,r=it(),d=!1,m;aa!==o&&(aa=o,Wn(),mn=l.scroll,m=l.scrollFn,mn===!0&&(mn=Mt(o,!0)));var p=0,f=mn;do{var h=f,g=Ye(h),S=g.top,T=g.bottom,w=g.left,E=g.right,M=g.width,V=g.height,I=void 0,N=void 0,x=h.scrollWidth,L=h.scrollHeight,D=Ve(h),O=h.scrollLeft,X=h.scrollTop;h===r?(I=M<x&&(D.overflowX==="auto"||D.overflowX==="scroll"||D.overflowX==="visible"),N=V<L&&(D.overflowY==="auto"||D.overflowY==="scroll"||D.overflowY==="visible")):(I=M<x&&(D.overflowX==="auto"||D.overflowX==="scroll"),N=V<L&&(D.overflowY==="auto"||D.overflowY==="scroll"));var Q=I&&(Math.abs(E-s)<=u&&O+M<x)-(Math.abs(w-s)<=u&&!!O),R=N&&(Math.abs(T-i)<=u&&X+V<L)-(Math.abs(S-i)<=u&&!!X);if(!je[p])for(var C=0;C<=p;C++)je[C]||(je[C]={});(je[p].vx!=Q||je[p].vy!=R||je[p].el!==h)&&(je[p].el=h,je[p].vx=Q,je[p].vy=R,clearInterval(je[p].pid),(Q!=0||R!=0)&&(d=!0,je[p].pid=setInterval(function(){t&&this.layer===0&&Ie.active._onTouchMove(to);var k=je[this.layer].vy?je[this.layer].vy*c:0,b=je[this.layer].vx?je[this.layer].vx*c:0;typeof m=="function"&&m.call(Ie.dragged.parentNode[Ze],b,k,a,to,je[this.layer].el)!=="continue"||ps(je[this.layer].el,b,k)}.bind({layer:p}),24))),p++}while(l.bubbleScroll&&f!==r&&(f=Mt(f,!1)));la=d}},30),Ss=function(l){var o=l.originalEvent,t=l.putSortable,s=l.dragEl,i=l.activeSortable,u=l.dispatchSortableEvent,c=l.hideGhostForTarget,r=l.unhideGhostForTarget;if(o){var d=t||i;c();var m=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,p=document.elementFromPoint(m.clientX,m.clientY);r(),d&&!d.el.contains(p)&&(u("spill"),this.onSpill({dragEl:s,putSortable:t}))}};function fa(){}fa.prototype={startIndex:null,dragStart:function(l){var o=l.oldDraggableIndex;this.startIndex=o},onSpill:function(l){var o=l.dragEl,t=l.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var s=Zt(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(o,s):this.sortable.el.appendChild(o),this.sortable.animateAll(),t&&t.animateAll()},drop:Ss};xt(fa,{pluginName:"revertOnSpill"});function ha(){}ha.prototype={onSpill:function(l){var o=l.dragEl,t=l.putSortable,s=t||this.sortable;s.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),s.animateAll()},drop:Ss};xt(ha,{pluginName:"removeOnSpill"});const Se={isBoolean:a=>typeof a=="boolean",isFunction:a=>typeof a=="function",isUndefined:a=>typeof a>"u"||a===null,isFiniteNumber:a=>typeof a=="number"&&isFinite(a),getOffset:a=>{const l=a.getBoundingClientRect(),t=(a&&a.ownerDocument).documentElement;let s;if(t.toString()!=="[object Window]"){const i=a.ownerDocument;s=i&&i.defaultView||window}else s=t;return{top:l.top+(s.pageYOffset||t.scrollTop)-(t.clientTop||0),left:l.left+(s.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:l.width,height:l.height}},createElement:a=>{if(a.substring(0,1)==="<"){const o=document.createElement("div");return o.innerHTML=a,o.children[0]}else return document.createElement(a)},getElementData:(a,l)=>{const o=[],t=a.children,s=t.length;let i;for(let u=0;u<s;u++){i=t[u];const c=i.getAttribute(l.dataIdAttr);c&&c.length>0&&o.push(c)}return o},_getHiddenBox:()=>(gt||(gt=document.createElement("div"),gt.style.cssText="position:fixed;left:-99999px;top:0;width:1px;height:1px;overflow:hidden;pointer-events:none;",document.body.appendChild(gt)),gt),_moveToHiddenBox:a=>{a&&a.parentNode&&Se._getHiddenBox().appendChild(a)},_clearHiddenBox:()=>{gt&>.parentNode&&(gt.parentNode.removeChild(gt),gt=null)},checkMoveOutBoundary:(a,l,o)=>{let t=!0,s={};const i=o.extOption.boundary;if(i){let u=i.isOut;if(u=Se.isBoolean(u)?u:!0,!u){let c;if(i.element&&i.element.length>0){const r=window.document.querySelector(i.element);r&&(c=Se.getOffset(r))}else c=Se.getOffset(l);if(c){const r=Se.getOffset(a);let d=Number(i.x);isNaN(d)&&(d=0);let m=Number(i.y);isNaN(m)&&(m=0);const p=c.top-d>r.top,f=c.left+c.width+m<r.left+r.width,h=c.top+c.height+d<r.top+r.height,g=c.left-m>r.left;t=!(p||f||h||g),t||(s={top:p,right:f,bottom:h,left:g,x:d,y:m})}}}return s.isOut=!t,s},setWrapBody:(a,l,o)=>{let t=a,s=o.extOption.wrapBody;if(o.fallbackOnBody&&(s?o.extOption.wrapBody.isWrap=!0:o.extOption.wrapBody={isWrap:!0},s=o.extOption.wrapBody),s){let i=s.isWrap;if(i=Se.isBoolean(i)?i:!1,i)if(s.element&&s.element.length>0)t=Se.createElement(s.element),t.appendChild(a);else switch(t=l.cloneNode(),t.appendChild(a),t.tagName.toLocaleLowerCase()){case"tbody":const u=l.parentNode.cloneNode();u.appendChild(t),t=u;break}}return t},checkCross:(a,l,o)=>{const t=o.extOption.cross;let s={newEl:null,isSameStruct:!0};if(t){let i=t.isCross;if(i=Se.isBoolean(i)?i:!1,a.parentNode===l.parentNode&&(i=!1),i){let u=t.isSameStruct;if(u=Se.isBoolean(u)?u:!0,!u){const c=l.tagName.toLocaleLowerCase(),r=Se.createElement(c),d=[],m=["darg-select","darg-placeholder"];switch(l.className.split(" ").forEach(p=>{m.indexOf(p)===-1&&d.push(p)}),d.push(...m),r.className=d.join(" "),Ve(r,"height",l.clientHeight),c){case"tr":let p=0;for(let h=0;h<l.children.length;h++){const g=l.children[h].getAttribute("colspan");p+=Se.isUndefined(g)?1:Number(g)}const f=Se.createElement("td");f.setAttribute("colspan",p),r.appendChild(f);break}s.isSameStruct=!1,s.newEl=r}}}return s},setCrossEl:(a,l)=>{var o=Se.checkCross(ke,a,l);if(!o.isSameStruct){const t=ke.cloneNode(!0);Se._moveToHiddenBox(ke),Yt?(ke=Yt,Yt=null):ke=o.newEl,Yt||(Yt=t)}},crossDropEnd:(a,l)=>new Promise((o,t)=>{const s=a.extOption.cross;let i=!1;const u=ke&&ke.parentNode;if(s){let r=s.isCross;if(r=Se.isBoolean(r)?r:!1,r){let d=!1;if(u)if(Se.isTreeMode(a)){var c=l||Ie.active&&Ie.active.el||a.el;d=!!c&&!c.contains(ke)}else d=Fe!==u;d&&s.dropEndBeforeCallback&&(i=!0)}}if(i){const r=un||ke,d=r&&r.getAttribute?r.getAttribute(a.dataIdAttr):null,m=Se.getElementData(u,a),p=s.dropEndBeforeCallback({data:d,inx:st(ke),arrSortId:m});if(p&&p.then&&Se.isFunction(p.then))Se._crossDropLoad(!0),p.then(f=>{Se._crossDropLoad(!1);const h=Se._crossDropEndCb(f);o({success:h})});else{const f=Se._crossDropEndCb(p);o({success:f})}}else o({success:!0})}),_crossDropLoad:a=>{let l;const o=ke.tagName.toLocaleLowerCase();if(ke.children.length===0)l=ke;else switch(o){case"tr":l=ke.children[0];break}if(a){const t=Se.createElement("div");t.className="panel-darg-loading",t.innerHTML='<div class="darg-add-loading"></div>',l.appendChild(t)}else{const t=ke.querySelector(".panel-darg-loading");t&&t.parentNode&&t.parentNode.removeChild(t)}},_crossDropEndCb:a=>{var l=Se.isBoolean(a)?a:!0;return l&&ke&&ke.parentNode&&ke.parentNode.removeChild(ke),l},_tree:{startPageX:0,startDragDepth:null,startLeftPage:null,depthCache:null,dropInfo:null},_findOwnerSortable:a=>{for(var l=a;l;){var o=l[Ze];if(o&&Se.isFunction(o._isOutsideThisEl))return o;l=l.parentNode}return null},_treeRegionCls:a=>a&&a.extOption&&a.extOption.tree&&a.extOption.tree.regionCls||".darg-region",isTreeMode:a=>!!(a&&a.extOption&&a.extOption.tree&&a.extOption.tree.isTree),findNearestTreeRoot:(a,l)=>{for(var o=a;o;){if(o[Ze]&&o[Ze].options&&Se.isTreeMode(o[Ze].options))return o;o=o.parentNode}return l},getNodeDepth:(a,l)=>{for(var o=0,t=a;t&&(t.matches&&t.matches(l)&&o++,!(t.matches&&t[Ze]&&t[Ze].options));)t=t.parentNode;return o},getOwnerRegion:(a,l)=>{for(var o=a.parentNode;o;){if(o.matches&&o.matches(l))return o;o=o.parentNode}return null},getChildRegion:(a,l)=>{for(var o=a.children||[],t=0;t<o.length;t++)if(o[t].matches&&o[t].matches(l))return o[t];return null},findSiblingFallback:(a,l)=>{var o="data-id",t=h=>!!h&&h.getAttribute&&h.getAttribute(o)!==null,s=a&&a.parentNode;if(s){var i=Array.from(s.children).filter(h=>t(h)&&h!==a&&!a.contains(h));if(i.length){var u=l&&l.getBoundingClientRect?l.getBoundingClientRect():null;if(u)for(var c=u.top+u.height/2,r=0;r<i.length;r++){var d=i[r].getBoundingClientRect();if(c>=d.top&&c<=d.bottom)return i[r]}return i[0]}}for(var m=s,p=0;m&&p++<20;){var f=m.parentNode;if(t(f)&&f!==a&&!a.contains(f))return f;m=f?f.parentNode:null}return null},resolveTreeDrop:(a,l,o,t,s)=>{for(var i=t.extOption.tree||{},u=Se._treeRegionCls(t),c={isReject:!1,reason:"",targetDepth:0,hoverNode:null,intent:"same"},r=t.dataIdAttr||"data-id",d=l;d&&d!==t.el&&!(d.getAttribute&&d.getAttribute(r)!==null);)d=d.parentNode;if(!d||d===t.el)return c.isReject=!0,c.reason="no-node",c;if(d===a||a.contains(d)){var m=Se.findSiblingFallback(a,l);m&&(d=m)}if(c.hoverNode=d,a.contains(d))return c.isReject=!0,c.reason="cycle",c;if(i.isOnlyInnerMove){var p=Se.findNearestTreeRoot(a,null),f=Se.findNearestTreeRoot(d,null);if(p!==f)return c.isReject=!0,c.reason="out-of-group",c}var h=Se.getOwnerRegion(d,u),g=h?Se.getNodeDepth(d,u):1;g<1&&(g=1);var S=Number(i.indentThreshold);(isNaN(S)||S<=0)&&(S=20);var T=window.pageXOffset||document.documentElement.scrollLeft||0,w=d.getBoundingClientRect().left+T,E=w-(g-1)*S,M=1+Math.round((s-E)/S);M<1&&(M=1);var V=Number(i.maxDepth);isNaN(V)&&(V=3);var I=Se._tree.startDragDepth!==null&&Se._tree.startDragDepth!==void 0?Se._tree.startDragDepth:Se.getNodeDepth(a,u),N=M,x=!1;return N>I&&!i.isDragToChild&&(N=I,x=!0),N<I&&!i.isDragToParent&&(N=I,x=!0),V>0&&N>V&&(N=V,N<I&&(N=I)),c.targetDepth=N,c.isDepthForced=x,N>I?c.intent="child":N<I?c.intent="parent":c.intent="same",c.dragDepth=I,c.hoverDepth=g,c},resolveTreeInsert:(a,l,o,t)=>{var s=Se._treeRegionCls(o),i={container:null,refNode:null};if(!l)return i;if(a.intent==="child"){var u=Se.getChildRegion(l,s);return u||(u=Se.createChildRegion(l,o)),i.container=u,i.refNode=Se.findInsertRef(u,t,o),i}for(var c=a.targetDepth!==void 0?a.targetDepth:a.hoverDepth,r=l,d=a.hoverDepth;r&&d>c;){var m=Se.getOwnerRegion(r,s);if(!m||!m.parentNode)break;var p=m.parentNode;if(!p.getAttribute||p.getAttribute(o.dataIdAttr||"data-id")===null)break;r=p,d--}for(;r&&d<c;){var f=Se.getChildRegion(r,s);if(!f)break;if(r=f,d++,d<c){for(var h=null,g=f.children||[],S=0;S<g.length;S++)g[S].getAttribute&&g[S].getAttribute(o.dataIdAttr||"data-id")!==null&&g[S]!==ke&&(h=g[S]);if(!h){d--;break}r=h}}var T;r&&r.matches&&r.matches(s)?T=r:T=Se.getOwnerRegion(r,s);var w=a.isDepthForced===!0;if(w&&d!==c){var E=Se.getOwnerRegion(ke,s);if(E)return i.container=E,i.refNode=Se.findInsertRef(E,t,o),i}return T&&(i.container=T,i.refNode=Se.findInsertRef(T,t,o)),i},findInsertRef:(a,l,o)=>{for(var t=o.dataIdAttr||"data-id",s=[],i=a.children||[],u=0;u<i.length;u++){var c=i[u];c.getAttribute&&c.getAttribute(t)!==null&&c!==ke&&s.push(c)}for(var r=0;r<s.length;r++){var d=s[r].getBoundingClientRect(),m=d.top+d.height/2;if(l<m)return s[r]}return null},createChildRegion:(a,l)=>{var o=Se._treeRegionCls(l),t=Se.getOwnerRegion(a,o),s=t?t.tagName.toLocaleLowerCase():"ul",i=Se.createElement(s),u=o.charAt(0)==="."?o.slice(1):o;return i.className=u+" "+Se.TREE_AUTO_REGION_CLS,a.appendChild(i),i},TREE_AUTO_REGION_CLS:"darg-region-auto",cleanupEmptyAutoRegions:a=>{var l=a||document;if(!(!l||!l.querySelectorAll))for(var o=l.querySelectorAll("."+Se.TREE_AUTO_REGION_CLS),t=o.length-1;t>=0;t--){for(var s=o[t],i=!1,u=s.children||[],c=0;c<u.length;c++)if(u[c].getAttribute&&u[c].getAttribute("data-id")!==null){i=!0;break}i||ke&&(s===ke.parentNode||s.contains(ke))||s.parentNode&&s.parentNode.removeChild(s)}},treeDragOver:(a,l,o)=>{var t=a.options,s=l.clientX,i=l.clientY;if(!Se.isFiniteNumber(s)||!Se.isFiniteNumber(i))if(rt&&Se.isFiniteNumber(rt.clientX)&&Se.isFiniteNumber(rt.clientY))s=rt.clientX,i=rt.clientY;else return!1;var u=l.pageX!==void 0&&Se.isFiniteNumber(l.pageX)?l.pageX:s,c=document.elementFromPoint(s,i),r=c||o;r&&(r===ke||r.closest(".sortable-fallback"))&&(r=o);var d=Se.resolveTreeDrop(ke,r,l,t,u);if(Se._tree.dropInfo=d,d.isReject)return!1;var m=Se.resolveTreeInsert(d,d.hoverNode,t,i);if(!m.container)return!1;if(ke.contains(m.container))return Se._tree.dropInfo={isReject:!0,reason:"cycle-container"},!1;if(m.container===ke.parentNode&&(m.refNode===ke||m.refNode===ke.nextSibling))return!1;var p=m.refNode;return p?m.container.insertBefore(ke,p):m.container.appendChild(ke),Se.cleanupEmptyAutoRegions(a.el||document),!0},renderTreeIndicator:(a,l)=>{var o=a.options,t=Se._tree.dropInfo,s=document.body,i=s.querySelector(".darg-tree-indicator");if(!t||t.isReject||!t.hoverNode){i&&i.parentNode&&i.parentNode.removeChild(i);return}i||(i=Se.createElement("div"),i.className="darg-tree-indicator",s.appendChild(i)),Se._treeRegionCls(o);var u=t.hoverNode.getBoundingClientRect(),c=Number(o.extOption.tree.indentThreshold)||20,r=(t.targetDepth-t.hoverDepth)*c,d=u.left+r,m=u.width-r;m<20&&(m=20);var p=t.intent==="child"?u.bottom-1:u.top;i.style.cssText="position:fixed;pointer-events:none;z-index:100001;height:2px;background:#409eff;left:"+d+"px;top:"+p+"px;width:"+m+"px;border-radius:1px;"},clearTreeIndicator:()=>{var a=document.querySelector(".darg-tree-indicator");a&&a.parentNode&&a.parentNode.removeChild(a),Se._tree.dropInfo=null},resetTreeState:()=>{Se._tree.startPageX=0,Se._tree.startDragDepth=null,Se._tree.startLeftPage=null,Se._tree.depthCache=null,Se._tree.dropInfo=null,Se.clearTreeIndicator(),Se.cleanupEmptyAutoRegions(document)}};Ie.mount(new pu);Ie.mount(ha,fa);const fu=["id"],bs=e.defineComponent({name:"ClDarg",__name:"Index",props:{id:String,className:String,group:[String,Object],dargRegionCls:{type:String,default:".darg-region"},handleCls:{type:String,default:".darg-handle"},selectCls:{type:String,default:"darg-select"},placeholderCls:{type:String,default:"darg-placeholder"},isBoundaryOut:{type:Boolean,default:!0},boundaryElement:String,isWrapBody:{type:Boolean,default:!0},wrapBodyElement:String,isDisabledInner:{type:Boolean,default:!1},isDisabledOutsideInto:{type:Boolean,default:!1},isGroupSameStruct:{type:Boolean,default:!0},keyAttrId:{type:String,default:"data-id"},animation:{type:Number,default:150},groupDropEndBeforeCallback:Function,isTree:{type:Boolean,default:!1},maxDepth:{type:Number,default:3},indentThreshold:{type:Number,default:20},isOnlyInnerMove:{type:Boolean,default:!1},isDragToChild:{type:Boolean,default:!0},isDragToParent:{type:Boolean,default:!0}},emits:{onChangeSort:a=>!0,onError:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElTop"),c={sortableObj:null},r=e.computed(()=>{let h={"panel-darg":!0};return h=n.getJsonMerge(h,ue.getClassNameJson(t.className)),h}),d=()=>{const h=u.value;if(!h)return[];const g=t.keyAttrId||"data-id",S=t.dargRegionCls||".darg-region",T=M=>{const V={id:M.getAttribute(g)||"",children:[]};return Array.from(M.children).filter(N=>N.matches&&N.matches(S)).forEach(N=>{Array.from(N.children).forEach(x=>{x.matches&&x.matches("li,[data-id]")&&V.children.push(T(x))})}),V},w=[];return Array.from(h.querySelectorAll(S)).filter(M=>{let V=M.parentElement;for(;V&&V!==h;){if(V.matches&&V.matches(S))return!1;V=V.parentElement}return!0}).forEach(M=>{Array.from(M.children).forEach(V=>{V.matches&&V.matches("li,[data-id]")&&w.push(T(V))})}),w},m=()=>{if(t.isTree){s("onChangeSort",d());return}const h=c.sortableObj?.toArray?.()||[];s("onChangeSort",h)},p=()=>{e.nextTick(()=>{let h=null;try{if(h=u.value?.querySelector(t.dargRegionCls||".darg-region"),!h){ve.warn("ClDarg","未找到拖拽区域元素:",t.dargRegionCls||".darg-region"),s("onError","未找到拖拽区域元素");return}const{group:g,placeholderCls:S,handleCls:T,selectCls:w,isBoundaryOut:E,boundaryElement:M,isWrapBody:V,wrapBodyElement:I,isDisabledInner:N,isDisabledOutsideInto:x,isGroupSameStruct:L,groupDropEndBeforeCallback:D,keyAttrId:O,isTree:X,maxDepth:Q,indentThreshold:R,isOnlyInnerMove:C,isDragToChild:k,isDragToParent:b}=t;let v=L;X&&!L&&(v=!0,ve.warn("ClDarg","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true(原值 false 被忽略)"),s("onError","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true"));const _={sort:!N,forceFallback:!0,fallbackOnBody:V,fallbackTolerance:0,handle:T,ghostClass:S,chosenClass:w,dragClass:"darg-moveing",animation:t.animation,dataIdAttr:O,extOption:{boundary:{isOut:E,element:M,x:5,y:20},wrapBody:{isWrap:V,element:I},cross:{isCross:!1,isSameStruct:v,dropEndBeforeCallback:D||null},tree:{isTree:X,maxDepth:Q,indentThreshold:R,isOnlyInnerMove:C,isDragToChild:k,isDragToParent:b,rootId:i||""}},onUpdate:()=>{m()}};if(g&&!n.isEmpty(g))if(_.extOption.cross.isCross=!0,x){const y=n.isObject(g)?g.name:g;_.group={name:y,pull:"clone",put:!1},_.animation=0}else _.group=g;c.sortableObj=new Ie(h,_)}catch(g){ve.warn("ClDarg","Sortable 初始化失败:",g),s("onError","拖拽组件初始化失败")}})};return e.onMounted(()=>{p()}),e.onUpdated(()=>{if(!c.sortableObj)return;const h=u.value?.querySelector(t.dargRegionCls||".darg-region");if(h&&c.sortableObj.el!==h){try{c.sortableObj.destroy()}catch(g){ve.warn("ClDarg","重建前销毁旧实例失败:",g)}c.sortableObj=null,p()}}),e.onBeforeUnmount(()=>{if(c.sortableObj){try{c.sortableObj.destroy()}catch(h){ve.warn("ClDarg","销毁拖拽实例失败:",h)}c.sortableObj=null}}),l({getArrSort:()=>t.isTree?d():c.sortableObj?.toArray?c.sortableObj.toArray():[]}),(h,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTop",ref:u,id:e.unref(i),class:e.normalizeClass(r.value)},[e.renderSlot(h.$slots,"default")],10,fu))}}),hu=["id"],gu={key:0,class:"divider-text"},ws=e.defineComponent({name:"ClDivider",__name:"Index",props:{id:String,className:String,dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center",validator:a=>["center","left","right"].indexOf(a)!==-1},margin:{type:[Number,String],default:16},theme:{type:String,default:"default"},lineColor:String,textColor:String},emits:["onClick"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.useSlots(),u=e.computed(()=>{const m=i.default?.();return Array.isArray(m)&&m.length>0}),c=e.computed(()=>{const m={"panel-divider":!0,"panel-divider--dashed":o.dashed,"panel-divider--hairline":o.hairline,"panel-divider--left":o.contentPosition==="left","panel-divider--right":o.contentPosition==="right","panel-divider--text":u.value,"panel-divider--gold":o.theme==="gold"};return n.getJsonMerge(m,ue.getClassNameJson(o.className))}),r=e.computed(()=>{const m=o.margin,p=n.isFinite(m)?`${m}px`:String(m??""),f={marginLeft:p,marginRight:p};return n.isNonEmptyString(o.lineColor)&&(f["--divider-line-color"]=o.lineColor),n.isNonEmptyString(o.textColor)&&(f["--divider-text-color"]=o.textColor),f}),d=()=>{t("onClick")};return(m,p)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(c.value),style:e.normalizeStyle(r.value),onClick:d},[u.value?(e.openBlock(),e.createElementBlock("span",gu,[e.renderSlot(m.$slots,"default")])):e.createCommentVNode("",!0)],14,hu))}}),vu=["id"],yu=["title"],ga=e.defineComponent({name:"ClEllipsis",directives:{cltooltip:dt},__name:"Index",props:{id:String,className:String,text:String,lines:{type:Number,default:1},isUseTooltipAuto:{type:Boolean,default:!1},tooltipTheme:String,tooltipPosition:String,tooltipTrigger:String,tooltipIsHtml:{type:Boolean,default:!1},tooltipHtml:String,isShowNativeTitle:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.useTemplateRef("refElParent"),s=e.useTemplateRef("refElSpan"),i=e.reactive({isPosParent:!1,isPosSpan:!1,isUseTooltip:!1,isUseTooltipAuto:l.isUseTooltipAuto}),u=e.computed(()=>i.isUseTooltip?"":l.isShowNativeTitle&&l.text||""),c=e.computed(()=>{if(!n.isFinite(l.lines))return 1;const p=Number(l.lines);return p===1||p===2||p===3?p:1}),r=e.computed(()=>{let p={"panel-ellipsis":!0,"ellipsis-txt-title":!0};return p[`ellipsis-txt-lines-${c.value}`]=!0,l.tooltipTrigger==="click"&&(p["ellipsis-txt-click"]=!0),p=n.getJsonMerge(p,ue.getClassNameJson(l.className)),p}),d=()=>{const p=ct("ellipsis");p&&n.isExistJsonKey(p,"isUseTooltipAuto")&&(i.isUseTooltipAuto=p.isUseTooltipAuto)},m=()=>{if(i.isUseTooltipAuto&&l.text&&l.text.length>0&&t.value&&s.value)if(c.value>1){const p=s.value,f=p.clientHeight;p.style.webkitLineClamp="unset";const h=p.offsetHeight;p.style.webkitLineClamp="";const g=h>f;i.isUseTooltip=g,i.isPosSpan=!0,i.isPosParent=!1}else{const p=t.value.clientWidth,f=s.value.offsetWidth;if(p>0&&f>0){const h=p>=f,g=p<f;i.isUseTooltip=g,i.isPosSpan=h,i.isPosParent=g}}};return e.onMounted(()=>{e.nextTick(()=>{d(),m()})}),e.watch(()=>l.text,()=>{e.nextTick(()=>{m()})}),e.watch(()=>l.isUseTooltipAuto,p=>{i.isUseTooltipAuto=p,p||(i.isUseTooltip=!1),e.nextTick(()=>{m()})}),e.watch(()=>l.lines,()=>{e.nextTick(()=>{m()})}),(p,f)=>{const h=e.resolveDirective("cltooltip");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElParent",ref:t,id:e.unref(o),class:e.normalizeClass(r.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("span",{ref_key:"refElSpan",ref:s,class:e.normalizeClass(`ellipsis-txt-lines-${c.value}`),title:u.value},[e.createTextVNode(e.toDisplayString(a.text),1)],10,yu)),[[h,{init:i.isUseTooltip&&i.isPosSpan,html:a.tooltipHtml||a.text,theme:a.tooltipTheme,position:a.tooltipPosition,trigger:a.tooltipTrigger,isHtml:a.tooltipIsHtml}]])],10,vu)),[[h,{init:i.isUseTooltip&&i.isPosParent,html:a.tooltipHtml||a.text,theme:a.tooltipTheme,position:a.tooltipPosition,trigger:a.tooltipTrigger,isHtml:a.tooltipIsHtml}]])}}}),ku=["id"],Su={key:0,class:"empty-description"},bu={key:1,class:"empty-footer"},wu=80,Cs=e.defineComponent({name:"ClEmpty",__name:"Index",props:{id:String,className:String,description:String,imageSize:{type:Number,default:80}},setup(a){const l=a,o=l.id,t=e.useSlots(),s=e.computed(()=>n.isNonEmptyString(l.description)?l.description:""),i=e.computed(()=>{const r=t.default?.();return Array.isArray(r)&&r.length>0}),u=e.computed(()=>{const r={"panel-empty":!0};return n.getJsonMerge(r,ue.getClassNameJson(l.className))}),c=e.computed(()=>{const r=n.isFinite(l.imageSize)&&l.imageSize>0?l.imageSize:wu;return{width:`${r}px`,height:`${r}px`}});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(u.value)},[e.createElementVNode("div",{class:"empty-image",style:e.normalizeStyle(c.value)},[e.renderSlot(r.$slots,"image",{},()=>[d[0]||(d[0]=e.createElementVNode("i",{class:"empty-image-default clIconFont clIcon-empty"},null,-1))])],4),s.value?(e.openBlock(),e.createElementBlock("div",Su,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",bu,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)],10,ku))}});class Es{_fun;_time;_cb;constructor(l,o=200){this._cb=l,this._time=o}stopRun(){this._fun&&(clearTimeout(this._fun),this._fun=null)}run(l){const o=l||this._cb;o&&(this.stopRun(),this._fun=setTimeout(()=>{o()},this._time))}}class Cu{startTime;startPos;endPos;duration;runEasing;runIngFun;lastPos;lastInterval;timeAnimate;constructor(l){this.startTime=0,this.startPos=0,this.endPos=0,this.duration=0,this.runEasing=null,this.runIngFun=l.runIngCallback,this.lastPos=0,this.lastInterval=0}_easing={linear:(l,o,t,s)=>t*l/s+o,easeInCubic:(l,o,t,s)=>t*(l/=s)*l*l+o,easeOutCubic:(l,o,t,s)=>t*((l=l/s-1)*l*l+1)+o};start(l,o,t,s="linear"){const i=this;return new Promise(u=>{this.startTime=+new Date,this.startPos=l,this.endPos=o,this.duration=t,this.runEasing=i._easing[s],i.timeAnimate=n.requestAnimationFrame(function c(){i.step()===!1?(i.stop(),u(i.lastInterval)):i.timeAnimate=n.requestAnimationFrame(c)})})}step(){const l=+new Date;if(l>=this.startTime+this.duration)return this.runIngFun(this.endPos),!1;const o=this.runEasing(l-this.startTime,this.startPos,this.endPos-this.startPos,this.duration);return this.lastInterval=Math.abs(o-this.lastPos),this.lastPos=o,this.runIngFun(o),!0}stop(){this.timeAnimate&&n.cancelAnimationFrame(this.timeAnimate)}}const Eu=["id"],va=e.defineComponent({name:"ClForm",__name:"Index",props:{id:String,theme:String,className:String,isAwaitRun:{type:Boolean,default:!0},preScroll:Number,pElError:String,isScrollToErr:{type:Boolean,default:!0}},emits:["submit"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElTop"),c=e.reactive({isRun:!t.isAwaitRun}),r={_scrollUpAnimate:null,parentScroll:null,isScrollWindow:!0,tabindexEls:new Set},d=e.computed(()=>{const E={"data-cl-validate":""};return c.isRun&&(E["data-run"]=""),n.isNonEmptyString(t.theme)&&(E["data-theme"]=t.theme),E}),m=e.computed(()=>{let E={"panel-form":!0,"form-validate":!0};return E=n.getJsonMerge(E,ue.getClassNameJson(t.className)),E}),p=()=>{s("submit")},f=E=>{const M=E.querySelector('input:not([type="hidden"]), select, textarea');return M instanceof HTMLElement?M:E},h=E=>{let M=!0;c.isRun&&E instanceof HTMLElement&&u.value?.contains(E)&&E.runValidate&&(M=!!E.runValidate());const V=f(E);return M?V.removeAttribute("aria-invalid"):V.setAttribute("aria-invalid","true"),M},g=()=>{const E=u.value?.querySelectorAll("[data-validate-error]");if(!n.isUndefined(E)&&E.length>0){let M=E[0];const{preScroll:V,pElError:I}=t,N=!n.isEmpty(M.pElError),x=!n.isEmpty(I);if(N||x){const Q=ue.getParent(M,N?M.pElError:I,u.value);n.isUndefined(Q)||(M=Q)}const D=ue.getOffset(M,r.isScrollWindow?null:r.parentScroll).top-10-(V??0),O=r._scrollUpAnimate,X=r.parentScroll;O&&X&&(O.stop(),O.start(X.scrollTop,D,200)),M.tabIndex<0&&(M.setAttribute("tabindex","-1"),r.tabindexEls.add(M)),M.focus({preventScroll:!0})}},S=()=>{const E=ue.getParentScrollList(u.value,null,!1);r.isScrollWindow=E.length===0;const M=r.isScrollWindow?document.documentElement:E[0];r.parentScroll=n.isUndefined(M)?document.documentElement:M,r._scrollUpAnimate=new Cu({runIngCallback:V=>{const I=r.parentScroll;I&&(I.scrollTop=V)}})};return e.onMounted(()=>{e.nextTick(()=>{S()})}),e.onBeforeUnmount(()=>{r._scrollUpAnimate?.stop()}),l({validate:E=>Xl.promiseFun(M=>{let V=!0;try{if(n.isUndefined(E))c.isRun=!0,e.nextTick(()=>{c.isRun=!0;try{const I=u.value?.querySelectorAll("[data-validate-el]");!n.isUndefined(I)&&I.length>0&&I.forEach(N=>{h(N)||(V=!1)}),V||t.isScrollToErr&&e.nextTick(()=>{try{g()}catch{}}),M(V)}catch{M(!1)}});else{c.isRun=!0;const I=E;e.nextTick(()=>{try{V=h(I),!V&&t.isScrollToErr&&e.nextTick(()=>{try{g()}catch{}}),M(V)}catch{M(!1)}})}}catch{M(!1)}}),reset:()=>{c.isRun=!1,r._scrollUpAnimate?.stop(),u.value?.removeAttribute("data-run");const E=u.value?.querySelectorAll("[data-validate-el]");!n.isUndefined(E)&&E.length>0&&E.forEach(M=>{if(f(M).removeAttribute("aria-invalid"),M.runReset)try{M.runReset()}catch{}}),r.tabindexEls.forEach(M=>{M.removeAttribute("tabindex")}),r.tabindexEls.clear()}}),(E,M)=>(e.openBlock(),e.createElementBlock("form",e.mergeProps({ref_key:"refElTop",ref:u,autocomplete:"off",novalidate:"",onSubmit:e.withModifiers(p,["prevent"]),id:e.unref(i),class:m.value},d.value),[e.renderSlot(E.$slots,"default")],16,Eu))}}),Bu=["id","aria-labelledby"],xu={key:0,class:"tip-must"},Tu=["id"],no=e.defineComponent({name:"ClFormGroupHorizontal",__name:"Index",props:{id:String,className:{type:String,default:""},colRatio:{type:String,default:"2:10"},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.computed(()=>{let r={"panel-form-group-horizontal":!0,"form-group":!0,"form-group-plaintext":l.isPlaintext,row:!0};return r=n.getJsonMerge(r,ue.getClassNameJson(l.className)),r}),s=e.computed(()=>l.colRatio.split(":")),i=e.computed(()=>{const r=s.value,d=c(r[0],2),m={"control-label":!0};return m[`col-sm-${d}`]=!0,m[`col-${d}`]=!0,m}),u=e.computed(()=>{const r=s.value,d=c(r[1],10),m={"form-group-content":!0};return m[`col-sm-${d}`]=!0,m[`col-${d}`]=!0,m}),c=(r,d)=>{if(!n.isNonEmptyString(r))return d;const m=parseInt(r,10);return isNaN(m)||m<1||m>12?d:m};return e.watch(s,([r,d])=>{if(!n.isNonEmptyString(r)||!n.isNonEmptyString(d))return;const m=parseInt(r,10),p=parseInt(d,10);if(isNaN(m)||isNaN(p)||m<1||m>12||p<1||p>12){ve.warn("ClFormGroupHorizontal",`colRatio 值 "${r}:${d}" 不在 1-12 有效范围内,已使用默认值 2:10`);return}m+p!==12&&ve.warn("ClFormGroupHorizontal",`colRatio 两值之和需为 12(当前 ${m}+${p}=${m+p}),布局可能出现异常`)},{immediate:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(t.value),role:"group","aria-labelledby":`${e.unref(o)}-label`},[e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.createElementVNode("span",null,[a.isTipMust?(e.openBlock(),e.createElementBlock("span",xu,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"control-label-text",id:`${e.unref(o)}-label`},e.toDisplayString(a.label),9,Tu),e.renderSlot(r.$slots,"labelExtend")])],2),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.renderSlot(r.$slots,"default")],2)],10,Bu))}}),Du={key:0,class:"form-group-btns-fixed"},Iu=["id"],_u=["id"],Bs=e.defineComponent({name:"ClFormGroupBtns",__name:"Index",props:{id:String,className:{type:String,default:""},isFixed:{type:Boolean,default:!1},isHorizontal:{type:Boolean,default:!1},colRatioHorizontal:String},setup(a){const l=a,o=l.id,t=e.computed(()=>{const s={"form-group-btns":!0};return n.getStringByJson(n.getJsonMerge(s,ue.getClassNameJson(l.className))," ")});return(s,i)=>a.isHorizontal?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.isFixed?(e.openBlock(),e.createElementBlock("div",Du,[e.createElementVNode("div",null,[e.createVNode(no,{id:e.unref(o),className:t.value,colRatio:a.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["id","className","colRatio"])])])):(e.openBlock(),e.createBlock(no,{key:1,id:e.unref(o),className:t.value,colRatio:a.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["id","className","colRatio"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.isFixed?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(o),class:"form-group-btns-fixed"},[e.createElementVNode("div",{class:e.normalizeClass(t.value)},[e.renderSlot(s.$slots,"default")],2)],8,Iu)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(o),class:e.normalizeClass(t.value)},[e.renderSlot(s.$slots,"default")],10,_u))],64))}}),Nu=["id","aria-labelledby"],Vu={class:"form-group-title"},Mu={key:0,class:"tip-must"},Ou=["id"],Lu={class:"form-group-content"},xs=e.defineComponent({name:"ClFormGroupVertical",__name:"Index",props:{id:String,className:{type:String,default:""},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.computed(()=>{const s={"form-group":!0,"form-group-vertical":!0,"form-group-plaintext":l.isPlaintext};return n.getJsonMerge(s,ue.getClassNameJson(l.className))});return(s,i)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(t.value),role:"group","aria-labelledby":`${e.unref(o)}-label`},[e.createElementVNode("div",Vu,[a.isTipMust?(e.openBlock(),e.createElementBlock("span",Mu,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"form-group-title-label",id:`${e.unref(o)}-label`},e.toDisplayString(a.label)+":",9,Ou),e.renderSlot(s.$slots,"labelExtend")]),e.createElementVNode("div",Lu,[e.renderSlot(s.$slots,"default")])],10,Nu))}}),$u={required:a=>!n.isEmpty(a),number:a=>{let l=!0;if(!n.isEmpty(a)){const o=n.removeReplace(a);l=/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i.test(o)}return l},integer:a=>{let l=!0;if(!n.isEmpty(a)){const o=n.removeReplace(a);l=/^-?\d+$/.test(o)}return l},integerPositive:a=>{let l=!0;if(!n.isEmpty(a)){const o=n.removeReplace(a);l=/^[1-9]\d*$/.test(o)}return l},alphanum:a=>{let l=!0;return n.isEmpty(a)||(l=/^\w+$/i.test(a)),l},email:a=>{let l=!0;return n.isEmpty(a)||(l=/^((([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)),l},minLen:(a,l)=>{let o=!0;return n.isEmpty(a)||(o=a.length>=parseInt(l,10)),o},maxLen:(a,l)=>{let o=!0;return n.isEmpty(a)||(o=a.length<=parseInt(l,10)),o},minByte:(a,l)=>{let o=!0;return n.isEmpty(a)||(o=n.getByteLen(a)>=parseInt(l,10)),o},maxByte:(a,l)=>{let o=!0;return n.isEmpty(a)||(o=n.getByteLen(a)<=parseInt(l,10)),o},minGreater:(a,l)=>{let o=!0;if(!n.isEmpty(a)){const t=n.removeReplace(a);o=parseFloat(t)>parseFloat(l)}return o},maxGreater:(a,l)=>{let o=!0;if(!n.isEmpty(a)){const t=n.removeReplace(a);o=parseFloat(t)<parseFloat(l)}return o},minGreaterEqual:(a,l)=>{let o=!0;if(!n.isEmpty(a)){const t=n.removeReplace(a);o=parseFloat(t)>=parseFloat(l)}return o},maxGreaterEqual:(a,l)=>{let o=!0;if(!n.isEmpty(a)){const t=n.removeReplace(a);o=parseFloat(t)<=parseFloat(l)}return o},phone:a=>{let l=!0;return n.isEmpty(a)||(l=/^1\d{10}$/.test(a)),l},equalto:(a,l)=>!n.isEmpty(a)&&!n.isEmpty(l)?a===l:!0,regular:(a,l)=>{let o=!0;return!n.isEmpty(a)&&!n.isEmpty(l)&&(o=new RegExp(l,"g").test(a)),o},urlHttp:a=>{let l=!0;return n.isEmpty(a)||(l=/^(http|https):\/\/[^\s]+$/.test(a)),l}},Ts=(a={})=>({type:n.isEmpty(a.type)?"tip":a.type,rules:n.getJsonMerge($u,a.rules),messages:n.getJsonMergeDeep({},a.messages)}),Au={key:1,class:"error-text-el"},io=e.defineComponent({name:"ClFormValidate",directives:{cltooltip:dt},__name:"Validate",props:{className:String,checkValue:[String,Number],rules:{type:Array,default:()=>[]},isCheck:{type:Boolean,default:!0},msgElementId:String,msgType:{type:String,validator:a=>["tip","text"].includes(a)},pElError:String,isShowMsg:{type:Boolean,default:!0}},setup(a,{expose:l}){const o=a,{optPageLanguage:t,getPageLanguage:s,getLanguageType:i}=Ae();s("validate");const u=e.inject("$ClGlobals",null),c=e.useTemplateRef("refElTop"),r=e.useTemplateRef("refElMsg"),d=e.reactive({type:"",msgHtml:"",check:0}),m={form:null},p={rules:{},messages:{}};let f=null;const h=()=>{if(n.isUndefined(f)){const _=Ts(),y=u?.validate;y?n.isEmpty(y.rules)&&n.isEmpty(y.messages)?(f=n.isNonEmptyString(y.type)?{..._,type:y.type}:_,ve.warn("ClFormValidate","[cl-form-validate] 全局校验规则表($ClGlobals.validate)缺少 rules/messages,已回退内置默认规则")):f={..._,...y,type:y.type??_.type,rules:y.rules??_.rules,messages:y.messages??_.messages}:(f=_,ve.warn("ClFormValidate","[cl-form-validate] 未检测到全局校验规则表($ClGlobals.validate),已回退内置默认规则"))}return f},g=e.computed(()=>{const _={"data-validate-el":""};if(o.isCheck){switch(d.check){case 1:_["data-validate-success"]="";break;case 2:_["data-validate-error"]="";break}_["aria-invalid"]=d.check===2?"true":"false"}return _}),S=e.computed(()=>{const _={};return o.isCheck&&(_["panel-form-validate"]=!0),n.getJsonMerge(_,ue.getClassNameJson(o.className))}),T=e.computed(()=>{const _={"panel-validate-errors":!0};return _[`validate-errors-${d.type}`]=!0,_}),w=e.computed(()=>d.msgHtml.replace(/<[^>]*>/g," ").trim()),E=_=>{if(!n.isArray(_)){ve.warn("ClFormValidate","[cl-form-validate] rules 应为数组,已忽略");return}const y={},B={};_.forEach(A=>{if(typeof A=="string"){if(!n.isEmpty(A))if(n.isExistValue(A,"|")){const F=A.split("|");y[F[0]]=F[1],F.length>2&&ve.warn("ClFormValidate",'[cl-form-validate] 字符串规则 "'+A+'" 含多个参数段,仅取前两段,建议改用对象形式')}else y[A]=""}else if(typeof A=="object"&&!n.isUndefined(A)){let F=!0;n.isBoolean(A.isCheck)?F=A.isCheck===!0:(A.isCheck==="false"||A.isCheck==="0")&&(F=!1),!n.isEmpty(A.r)&&F&&(y[A.r]=String(A.p??""),n.isEmpty(A.m)||(B[A.r]=A.m??""))}}),p.rules=y,p.messages=B},M=()=>{const _=[],y={},B={};if(c.value&&!n.isEmpty(c.value.dataset)&&Object.keys(c.value.dataset).forEach(A=>{if(A.indexOf("validate")===0){const P=A.replace(/[A-Z]/g,H=>`-${H.toLowerCase()}`).split("-");if(P.length===3){const H=P[2].toLowerCase(),$=c.value.dataset[A];switch(P[1]){case"check":!n.isEmpty($)&&$.toLowerCase()==="false"&&_.push(H);break;case"param":y[H]=$;break;case"message":B[H]=$;break}}}}),!n.isEmpty(p.rules)&&(!n.isEmpty(_)||!n.isEmpty(y))){const A={};for(const[F,P]of Object.entries(p.rules)){const H=F.toLowerCase();n.isExistValue(_,H)||(A[F]=n.isExistJsonKey(y,H)?y[H]:P)}p.rules=A}if(!n.isEmpty(p.messages)&&!n.isEmpty(B)){const A={};for(const[F,P]of Object.entries(p.messages)){const H=F.toLowerCase();A[F]=n.isExistJsonKey(B,H)?B[H]:P}p.messages=A}},V=_=>{const y={},B=h().rules??{};if(!n.isEmpty(p.rules)){const A=n.isEmpty(_)||n.getTypeof(_)==="number"&&n.isNaN(_),F=A?"":n.trim(_);for(const[P,H]of Object.entries(p.rules))if(n.isExistJsonKey(B,P)&&n.isFunction(B[P])){let $=!0;P==="required"?$=B.required(F):A||($=B[P](F,H)),$||(y[P]=H)}else ve.warn("ClFormValidate",'[cl-form-validate] 校验规则 "'+P+'" 未注册或非函数,已跳过')}return y},I=()=>{s("validate");const _=e.toRaw(t.value),y=e.toRaw(h().messages??{}),B=i(),A=n.isExistJsonKey(y,B.type)||n.isExistJsonKey(y,B.def)?n.getJsonMerge({},y[B.def]||{},y[B.type]||{}):y;return n.getJsonMerge({},_,A)},N=_=>{const y=I(),B=[];return Object.keys(_).forEach(A=>{let F="";if(n.isNonEmptyString(p.messages[A])?F=p.messages[A]:n.isNonEmptyString(y[A])&&(F=y[A]),!n.isEmpty(F)){const P=_[A],H=n.isExistValue(F,"%s")?F.replace(/%s/g,n.isEmpty(P)?"":String(P)):F;B.push(H)}}),B},x=()=>(m.form&&!m.form.isConnected&&(m.form=null),n.isUndefined(m.form)&&c.value&&(m.form=ue.getParent(c.value,"form")),m.form),L=()=>{x();let _=h().type;m.form&&!n.isEmpty(m.form.dataset.theme)&&(_=m.form.dataset.theme),n.isNonEmptyString(o.msgType)&&(_=o.msgType),_!=="tip"&&_!=="text"&&(_="tip"),d.type=_},D=()=>{let _=!0;return x(),!n.isUndefined(m.form)&&m.form&&(n.isUndefined(m.form.dataset.clValidate)||(_=!n.isUndefined(m.form.dataset.run))),_},O=_=>{const y=n.isNonEmptyString(_)?_:"";if(n.isEmpty(y))d.msgHtml="",d.check=1;else if(d.msgHtml=y,d.check=2,n.isNonEmptyString(o.msgElementId))try{const B=window.document.querySelector(o.msgElementId);B?e.nextTick(()=>{r.value&&B.isConnected?B.appendChild(r.value):r.value&&ve.warn("ClFormValidate","[cl-form-validate] msgElementId 目标已脱离文档:"+o.msgElementId+",消息展示在组件内部")}):ve.warn("ClFormValidate","[cl-form-validate] 未找到 msgElementId 目标元素:"+o.msgElementId+",消息展示在组件内部")}catch{ve.warn("ClFormValidate","[cl-form-validate] msgElementId 选择器无效:"+o.msgElementId)}},X=()=>{d.msgHtml="",d.check=0},Q=(_,y)=>{let B="";if(!n.isEmpty(_))switch(y){case"tip":B=_.map(A=>`<div>${A}</div>`).join("");break;case"text":B=_.join(",");break}return B},R=()=>{let _=!0;try{if(o.isCheck&&D()){L(),M();const y=V(o.checkValue);if(_=n.isEmpty(y),_)O("");else{let B=Q(N(y),d.type);if(n.isEmpty(B)){const A=Object.keys(y)[0];B=n.isNonEmptyString(A)?A:"校验未通过"}O(B)}}else X()}catch{ve.warn("ClFormValidate","[cl-form-validate] 校验执行异常,已按未通过处理"),X(),_=!1}return _},C=()=>{if(E(o.rules||[]),x(),c.value){const _=c.value;_.pElError=o.pElError,_.runValidate=R,_.runErrMsg=b,_.runReset=v}};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{r.value?.remove()}),e.watch(()=>o.checkValue,()=>{R()}),e.watch([()=>o.rules,()=>o.isCheck],([_])=>{E(_||[]),R()},{deep:!0});const k=()=>R(),b=_=>{L(),O(_)},v=()=>{L(),X()};return l({runValidate:k,runErrMsg:b,runReset:v}),(_,y)=>{const B=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"refElTop",ref:c,class:S.value},g.value),[e.renderSlot(_.$slots,"default"),d.msgHtml.length>0&&a.isShowMsg?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElMsg",ref:r,class:e.normalizeClass(T.value),role:"alert"},[d.type==="tip"?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:"exclamation-circle-fill",class:"error-tip-el",role:"img","aria-label":w.value},null,8,["aria-label"])),[[B,d.msgHtml]]):d.type==="text"?(e.openBlock(),e.createElementBlock("span",Au,e.toDisplayString(d.msgHtml),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],16)}}}),et={loading:"data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==",error:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABbFJREFUaEPtWV1sFFUUPufOLmjpD7G0nXtm11igD0Q0CpqImsiDEcGoIVEReeBBNGgkEQSjwUR4MQZ/MBr/MeFFFIkxYAR9MGr84cFijBJ9UFPD7r3TqtWWLsVuO3PM3ew20+3uzizTxpDsTSa7e+ec75zvnPtz7l2E87zhee4/NAj83xlsZKCRgZgRaAyhmAGMrV4zA5lM5sJEItGcz+dbhBDN5gGAZkRsQcTCd/Mwc0vpu+k3v5l5yHGcDUEPtdY7AeAsIp4t/5yYmCj0myefz//LzGfNY/p7enrGqjGtSEAp9ZgQYgsz07mGiJk3OY7zVklfKbULEZ88FzxE1L7vv+Q4ztPl+tMIZLPZFUKIb87FUFBHCLHQtu2+Up/WmuNi+r5/bSqVOh7EmUZAa70VAJ6PYwwRJ6SUyRKG67odzPxHHMyi7jYi2luTgOu6O5h5T1xjiLhDSvlsIAOfAcDKOLiI+KiU8pmwDGwGgFfjGCrqDhLRgkAWHmTml2PiPkBEr4URuAcA3o5pqKR+PxG9aX7M0DDaQEQHahJQSt2KiEdmiMA7RGQCUmha61jDiJlvcxznw7A5cAMzfz4TBHzfvzGVSn1qsDKZzErLsgyBac0skwBwwvf9HCKuBoD5VeRWSim/CMvAMkQ8MQME+ohoYZToE9HkapjNZq9AxFcQcUW5D8y83HGc72oSyGQyiy3L+qUeAsx8yMgj4p0BvZ1E9FRY9Jl5t+M4u4L2tNaPA0BBN9g8z+tJp9O/1iTQ39/f6fv+QB0ExoQQS4aGhv5qa2s7zsyXGl0hRJdt24W1P2TsbyWiF4L2lFL3IuK+ch+CmKV30zYyU/9YljVaB4EDRFSoeUrj3CwCUsrbw6JftPE9EV1ZloFhAGitkIGmdDpt6qjJVrEWcl03z8yTO2kImTuI6P2STDabfUQIsYqIbjJ91aJZhjkCANuZeSkArEbExeU2EXFcSjlnWn8l55RSg4h4UVgWELHPtu1FiDilzlFKmaxsNEa11ksA4KcwrLD3zPy34zjtkQhorU0RdkkYqJloRGRK5ClNKXUxIposFDax8kIOEfczcxsArI1goyTyOxF1RyKglPoBES+LAH4VEVVccrXWa4nogyKBXgBYXnR8DxH9XOz/EgCuj2AHmPlHx3Euj0RAa/0VAFwXAvw1EdU03tfXN7+7u3tIa73X87zD6XR6ygaZzWavEUJMKY9r2Kxor9okPsrMZkes1TYT0etRoldLxnXdF5l5SxgOIh6TUq6JlAGl1EFEvKsWqO/7C1Kp1GCY4bD3zDzHdd2TANBTS5aZ33McZ10kAlprM/k2VQNExENSypoEwxwPvndddyMz7w/R2UdE90UlYE5k5mRWsVWqCutxuJKs1tqUyetr4Owlom2RCLiuu4uZqx3A/yGi0D2iXkKnTp1amkgkTKVZERsRd0spp9RMxkbFSVzcTSePg2XOFNbjwcFBs9W35vP5Vs/z2oQQrYjY6vt+4dOs86ZI01o/AQA5Zs5ZljUyMTGRE0KMmN/JZHJkdHQ019TUNNLZ2ZmrVTP5vr89lUo9FykDWmsz1t6oN4pBeSHE+vHx8cN11lW1TE6e7oJCFTPQ39+/zvf9d+MQYOZlxc2rsBvHbUKIu23bPhgpA67rrmHmj2IY/bNYihiMWDcRJR8Q8RYp5dFIBAYGBhZ5njfl4FAvGSnlBUqph4QQ1eZSXZCWZS3u6ur6LRIBI6S1/hgAVkW0wsx8GhFPA8AIIuYA4OTw8PDDLS0txxBxXukutXiPOi8ibknsEyK6uZJO1ctds8qMjY2Zc+nVAFBwzjjJzCOJRCKXz+fPJJNJ46h5zti2fSaqU729vcmOjo5my7LmBS6MDSlzcdzseV7w8vjbuXPnHm9vbzfBmdYa/w9EjfpsyTUyMFuRjYrbyEDUSM2WXCMDsxXZqLjnfQb+A8eWU0/QfZYsAAAAAElFTkSuQmCC",attr:{timeOutId:"data-lazy-timeout-id"}};class Ds{options={loading:et.loading,error:et.error,observerOptions:{rootMargin:"0px",threshold:0},log:!1,callback:{}};_images=new WeakMap;constructor(l){this.config(l)}config(l={}){this.options=n.getJsonMergeDeep(this.options,l)}_initValue(l,o){let t="",s=this.options.loading,i=this.options.error,u=this.options.callback,c=this.options.delay;return n.isObject(l)?(t=l.src,s=n.isUndefined(l.loading)?this.options.loading:l.loading,i=n.isUndefined(l.error)?this.options.error:l.error,u=n.isUndefined(l.callback)?this.options.callback:l.callback,c=n.isUndefined(l.delay)?this.options.delay:l.delay):n.isString(l)?t=l:n.isUndefined(l)&&(t=o&&o.src||""),{src:t,loading:s,error:i,callback:u,delay:c}}mount(l,o){if(n.isUndefined(l))return;const t=n.isString(o)?o:o.value,{src:s,loading:i,error:u,callback:c,delay:r}=this._initValue(t,l);if(this._setCallback(l,"loading",c),l.setAttribute("src",i||et.loading),!this._checkIntersectionObserver()){this._setImageSrc(l,s,u,c),this._log(()=>{throw new Error("Not support IntersectionObserver!")});return}this._initIntersectionObserver(l,s,u,c,r)}update(l,o){if(n.isUndefined(l))return;this._realObserver(l)?.unobserve(l),l.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(et.attr.timeOutId))),l.removeAttribute(et.attr.timeOutId));const t=n.isString(o)?o:o.value,{src:s,error:i,callback:u,delay:c}=this._initValue(t,l);this._initIntersectionObserver(l,s,i,u,c)}unmount(l){if(!n.isUndefined(l)){if(this._realObserver(l)?.unobserve(l),l.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(et.attr.timeOutId))),l.removeAttribute(et.attr.timeOutId)),l.tagName.toLowerCase()==="img"){const o=l;o.onload=null,o.onerror=null}this._images.delete(l)}}_setImageSrc(l,o,t,s){if(l.tagName.toLowerCase()==="img"){const i=l;n.isEmpty(o)?(i.onload=null,this._setCallback(i,"error",s),this._realObserver(i)?.disconnect(),t?i.setAttribute("src",t):i.removeAttribute("src")):(this.options.isCrossOrigin&&(i.crossOrigin="Anonymous"),o&&i.getAttribute("src")!==o&&i.setAttribute("src",o),i.onload=()=>{o&&this._setCallback(i,"loaded",s)},i.onerror=()=>{i.onload=null,this._setCallback(i,"error",s),this._realObserver(i)?.disconnect(),t&&i.getAttribute("src")!==t&&i.setAttribute("src",t),this._log(()=>{throw new Error(`Image failed to load!And failed src was: ${o} `)})})}else l.style.backgroundImage=`url('${o}')`}_setCallback(l,o,t){switch(l?.setAttribute("lazy",o),o){case"loading":t?.loading&&t.loading(l);break;case"loaded":t?.loaded&&t.loaded(l);break;case"error":t?.error&&t.error(l);break}}_realObserver(l){return this._images.get(l)}_checkIntersectionObserver(){if(typeof window<"u"&&window!==null&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype))try{Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}})}catch{return!1}return!0}return!1}_initIntersectionObserver(l,o,t,s,i){const u=this.options.observerOptions;this._images.set(l,new IntersectionObserver(c=>{Array.prototype.forEach.call(c,r=>{i&&i>0?this._delayedIntersectionCallback(l,r,i,o,t,s):this._intersectionCallback(l,r,o,t,s)})},u)),this._realObserver(l)?.observe(l)}_intersectionCallback(l,o,t,s,i){o.isIntersecting&&(this._realObserver(l)?.unobserve(o.target),this._setImageSrc(l,t,s,i))}_delayedIntersectionCallback(l,o,t,s,i,u){if(o.isIntersecting){if(o.target.hasAttribute(et.attr.timeOutId))return;const c=setTimeout(()=>{this._intersectionCallback(l,o,s,i,u),o.target.removeAttribute(et.attr.timeOutId)},t);o.target.setAttribute(et.attr.timeOutId,String(c))}else o.target.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(o.target.getAttribute(et.attr.timeOutId))),o.target.removeAttribute(et.attr.timeOutId))}_log(l){this.options.log&&l()}}const Is=(a,l,o)=>{const t=new Ds(o);e.onMounted(()=>{e.nextTick(()=>{a.value&&t.mount(a.value,l)})}),e.onUnmounted(()=>{a.value&&t.unmount(a.value)}),e.watch(l,s=>{a.value&&t.update(a.value,s)})},Fu=["id"],Pu=["alt"],Et=e.defineComponent({name:"ClImage",__name:"Index",props:{id:{},className:{},src:{},alt:{},height:{},width:{},isCircle:{type:Boolean},fit:{},isCrossOrigin:{type:Boolean}},emits:["onInit"],setup(a,{emit:l}){const o=a,t=l,s=e.ref(n.isNonEmptyString(o.src)?o.src:""),i=e.useTemplateRef("refElImage"),u=e.computed(()=>n.isNonEmptyString(o.alt)?o.alt:""),c=o.id;Is(i,s,{callback:{loaded:()=>{p()},error:()=>{p()}},isCrossOrigin:o.isCrossOrigin});const r=e.computed(()=>{let f={"panel-image":!0,"imageBox-circle":o.isCircle};return f=n.getJsonMerge(f,ue.getClassNameJson(o.className)),f}),d=e.computed(()=>{const{width:f,height:h}=o,g={};return n.isNonEmptyString(f)&&(g.width=f),n.isNonEmptyString(h)&&(g.height=h),g}),m=e.computed(()=>{const{width:f,height:h,fit:g}=o,S={};return n.isNonEmptyString(g)&&(S["object-fit"]=g,n.isNonEmptyString(f)&&(S.width=f),n.isNonEmptyString(h)&&(S.height=h)),S});function p(){t("onInit")}return e.watch(()=>o.src,f=>{s.value=n.isNonEmptyString(f)?f:""}),(f,h)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(c),class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value)},[e.createElementVNode("img",{ref_key:"refElImage",ref:i,alt:u.value,style:e.normalizeStyle(m.value)},null,12,Pu)],14,Fu))}}),Ru=["id"],Hu=["type","inputmode","name","value","placeholder","disabled","readonly"],zu={key:0,class:"input-floating-label"},Uu={key:3,class:"input-suffix"},$o=e.defineComponent({name:"ClInputContainer",components:{ClIconFont:fe},__name:"Container",props:{id:String,name:String,value:[String,Number],inputType:{type:String,default:"text"},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},placeholder:String,label:String,isFloating:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isShowSuffix:{type:Boolean,default:!1}},emits:["onInputText","onKeydown","onKeyup","onFocus","onBlur","onClear"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElInput"),c=e.computed(()=>{let N=t.name;return n.isEmpty(N)&&(N=`input_${n.getRandom(8)}`),N}),r=e.computed(()=>n.isEmpty(t.inputmode)?void 0:t.inputmode),d=e.computed(()=>{const N={};return n.isNonEmptyString(t.autocomplete)&&(N.autocomplete=t.autocomplete),N}),m=e.computed(()=>t.isClean&&!t.disabled&&!t.isReadonly),p=e.computed(()=>m.value&&!n.isEmpty(t.value)),f=e.computed(()=>t.isFloating?t.label||t.placeholder:""),h=e.computed(()=>({"input-container":!0,"input-clean":t.isClean,"input-suffix":t.isShowSuffix,"input-floating":t.isFloating})),g=N=>{const x=N.target;x&&s("onInputText",x.value)},S=N=>{s("onKeydown",N)},T=N=>{s("onKeyup",N)},w=()=>{s("onFocus")},E=()=>{s("onBlur")},M=()=>{s("onClear")};return l({getInputElement:()=>u.value,focus:()=>{u.value?.focus()}}),(N,x)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(h.value)},[e.createElementVNode("input",e.mergeProps({ref_key:"refElInput",ref:u,type:a.inputType,inputmode:r.value,name:c.value},d.value,{class:"form-control",value:a.value,placeholder:a.placeholder,disabled:a.disabled,readonly:a.isReadonly,onInput:g,onKeydown:S,onKeyup:T,onFocus:w,onBlur:E}),null,16,Hu),f.value?(e.openBlock(),e.createElementBlock("label",zu,e.toDisplayString(f.value),1)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(fe,{key:1,name:"close-circle-fill",class:"input-clear-icon","aria-label":"清除输入内容",role:"button",tabindex:"-1",onClick:e.withModifiers(M,["stop"]),onKeydown:[e.withKeys(e.withModifiers(M,["stop"]),["enter"]),e.withKeys(e.withModifiers(M,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),a.isShowSuffix?(e.openBlock(),e.createElementBlock("div",Uu,[e.renderSlot(N.$slots,"suffix")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,Ru))}}),Ju=["id"],Ku={key:0,class:"cl-plaintext-value"},Wu={key:0,class:"input-group-prepend"},ju={class:"input-group-text"},Yu={key:2,class:"input-group-append"},qu={class:"input-group-text"},Re=e.defineComponent({name:"ClInput",components:{ClInputContainer:$o},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:String,inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},changeDelayTime:{type:Number,default:200}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElContainer"),c=e.ref(!1),r=n.isString(t.value)?t.value:t.value!==void 0&&n.isNumber(t.value)&&n.isFinite(t.value)?t.value.toString():"",d=e.ref(r),m=e.ref(r),p=e.ref(r),f={prevDelayValue:r,valueDelayRun:!1};let h=null;const g=e.computed(()=>{let H={"panel-input":!0,"input-disabled":t.disabled,"input-readonly":t.isReadonly};return H=n.getJsonMerge(H,ue.getClassNameJson(t.className)),n.isEmpty(t.theme,"default")||(H[`input-${t.theme}`]=!0),H}),S=e.computed(()=>{const H={};return n.isNonEmptyString(t.width)&&(H.width=t.width),H}),T=H=>{w(),f.valueDelayRun=!0,h=setTimeout(()=>{h=null,m.value===H&&(f.valueDelayRun=!1,f.prevDelayValue!==H&&(f.prevDelayValue=H,s("onChangeDelay",H)))},t.changeDelayTime)},w=()=>{h&&(clearTimeout(h),h=null),f.valueDelayRun=!1},E=H=>{if(H!==m.value){m.value=H;const $=O(H);s("update:value",$),s("update:modelValue",$),s("onChange",$),T($)}},M=H=>{c.value=!0,p.value=H,s("onFocus",H)},V=H=>{c.value=!1,s("onBlur",H),H!==p.value&&(p.value=H,s("onChangeBlur",H))},I=H=>{s("onKeyupEnter",H)},N=H=>{s("onKeydown",H)},x=H=>{s("onKeyup",H)},L=()=>{s("onClear")},D=()=>{e.nextTick(()=>{s("onInit")})},O=H=>n.isString(H)||n.isNumber(H)&&n.isFinite(H)?H.toString():"",X=()=>{u.value?.focus()},Q=()=>{const H=O(t.value);n.isEmpty(H)||(d.value=H,m.value=H),D()};e.onMounted(()=>{Q()}),e.onBeforeUnmount(()=>{w()}),e.watch(()=>t.value,H=>{const $=O(H);$!==d.value&&(d.value=$,m.value=$,f.prevDelayValue=$,f.valueDelayRun&&w())});const R=H=>{d.value=H,E(H)},C=H=>{N(H)},k=H=>{const $=H.key,z=H.keyCode;if($==="Enter"||z===13){const oe=H.target,Z=O(oe.value);I(Z)}else x(H)},b=()=>{const H=O(d.value);M(H)},v=()=>{const H=O(d.value);V(H)},_=()=>{d.value="",E(""),L(),X()},y=()=>{const H=u.value;return H?H.getInputElement():null},B=()=>O(d.value);return l({getValue:B,getValueData:()=>({value:B(),show:d.value}),setValue:(H,$)=>{const z=O(H);d.value=z,m.value=z,f.prevDelayValue=z,f.valueDelayRun&&w(),$&&(s("update:value",z),s("update:modelValue",z))},focus:()=>{X()},getInputElement:y}),(H,$)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(g.value),style:e.normalizeStyle(S.value)},[a.isPlaintext?(e.openBlock(),e.createElementBlock("div",Ku,e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[H.$slots.prepend||H.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"input-group":!0,"input-group-focus":c.value})},[H.$slots.prepend?(e.openBlock(),e.createElementBlock("div",Wu,[e.createElementVNode("span",ju,[e.renderSlot(H.$slots,"prepend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode($o,{ref_key:"refElContainer",ref:u,value:d.value,inputType:a.inputType,inputmode:a.inputmode,autocomplete:a.autocomplete,name:a.name,placeholder:a.placeholder,disabled:a.disabled,isReadonly:a.isReadonly,isClean:a.isClean,isShowSuffix:!!H.$slots.suffix,label:a.label,isFloating:a.isFloating,onOnInputText:R,onOnKeydown:C,onOnKeyup:k,onOnFocus:b,onOnBlur:v,onOnClear:_},e.createSlots({_:2},[H.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(H.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]),H.$slots.append?(e.openBlock(),e.createElementBlock("div",Yu,[e.createElementVNode("span",qu,[e.renderSlot(H.$slots,"append")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)):(e.openBlock(),e.createBlock($o,{key:1,ref_key:"refElContainer",ref:u,value:d.value,inputType:a.inputType,inputmode:a.inputmode,autocomplete:a.autocomplete,name:a.name,placeholder:a.placeholder,disabled:a.disabled,isReadonly:a.isReadonly,isClean:a.isClean,isShowSuffix:!!H.$slots.suffix,label:a.label,isFloating:a.isFloating,onOnInputText:R,onOnKeydown:C,onOnKeyup:k,onOnFocus:b,onOnBlur:v,onOnClear:_},e.createSlots({_:2},[H.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(H.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]))],64))],14,Ju))}}),Lt=e.defineComponent({name:"ClInputNumber",components:{ClInput:Re},__name:"Index",props:{id:String,name:{type:String,default:""},value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:{type:String,default:""},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:{type:String,default:""},placeholder:{type:String,default:""},label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isNumber:{type:Boolean,default:!0},decimal:{type:Number,default:0,validator:a=>a>=-1&&a<=100&&a%1===0},isThousand:{type:Boolean,default:!0},isImmediateThousand:{type:Boolean,default:!0},changeDelayTime:{type:Number,default:200,validator:a=>n.isFinite(a)&&a>=0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElInput"),c=e.ref(t.value),r=e.ref(t.value),d=e.computed(()=>{let y={"panel-input-number":!0};return y=n.getJsonMerge(y,ue.getClassNameJson(t.className)),n.getStringByJson(y," ")}),m=e.computed(()=>n.isNonEmptyString(t.inputmode)?t.inputmode:t.decimal===0?"numeric":"decimal"),p=y=>{if(y!==r.value){r.value=y;const B=w(y);s("update:value",B),s("update:modelValue",B),s("onChange",B)}},f=y=>{let B=n.isNumber(y);if(!B)if(n.isNaN(+y))y==="-"&&(B=!0);else{const A=y.split(".");A.length===2&&(B=(n.isNumber(A[0])||n.isEmpty(A[0]))&&(n.isEmpty(A[1])||n.isNumber(A[1])))}return B},h=(y,B,A=!0,F=!0)=>{let P=y;if(t.isNumber){let H=n.removeReplace(y);if(H.length>0)if(f(H)){if(H!=="-"){const{decimal:z}=t;if(A&&z!==0&&(z===-1||z>=0&&z<=100)&&z!==-1){const oe=parseFloat(H);if(n.isFinite(oe)){const Z=oe.toFixed(z);H=Z.indexOf("e")>-1?H:Z}}if(F){const oe=H.split("."),Z=n.isEmpty(oe[0])?"0":oe[0];if(H=t.isThousand?n.getFormatThousands(Z):Z,oe.length===2&&z!==0){const W=z===-1?oe[1]:oe[1].slice(0,z);H+=`.${W}`}}}}else H=B;else H="";P=H}return P},g=(y,B)=>{const A=B.split(""),F=new RegExp("^"+A.map($=>$.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*?")),P=y.match(F);let H;return P&&(H=P[0].length),H},S=(y,B,A)=>{const F=ue.getFocusSelection(y);let P=B.substring(0,F.start);P=n.removeReplace(P);const H=B.substring(F.start);let $=f(P);P.indexOf(".")>-1&&H.indexOf(".")>-1&&($=!1);let z=F.start;$?z=g(A,P):z=A.lastIndexOf(H),(n.isUndefined(z)||z>A.length||z<0)&&(z=A.length),e.nextTick(()=>{ue.setFocusSelection(y,z,z)})},T=()=>{const y=c.value;if(n.isEmpty(y))return y;{let B=y.toString();if(t.isNumber){const{decimal:A}=t;if(B=n.removeReplace(B),B==="-")return B;if(A!==0&&A!==-1){const H=parseFloat(B);if(n.isFinite(H)&&A>=0&&A<=100){const $=H.toFixed(A);B=$.indexOf("e")>-1?B:$}}const F=B.split("."),P=n.isEmpty(F[0])?"0":F[0];F[0]=t.isThousand?n.getFormatThousands(P):P,A===0?B=F[0]:F.length===2?(F[1]=A===-1?F[1]:n.getFillZero(F[1],A,"r"),B=F.join(".")):B=F[0]}return B}},w=y=>{let B="";if(!n.isEmpty(y)&&(B=y.toString(),t.isNumber&&B!=="-")){const{decimal:A}=t,F=B.split(".");let P=n.removeReplace(F[0]);if(F.length===2&&A!==0){let H="";A===-1?H=F[1]:H=n.getFillZero(F[1],A,"r"),P+=`.${H}`}B=P}return B},E=()=>{u.value?.focus()},M=()=>{if(!n.isEmpty(t.value)){const y=h(t.value,"");c.value=y,r.value=y}};e.onMounted(()=>{M()}),e.watch(()=>t.value,(y,B)=>{if(y!==B&&y!==c.value){let A=!0;if(t.isNumber){const F=n.removeReplace(y),P=n.removeReplace(c.value),H=n.isEmpty(F),$=n.isEmpty(P);H&&$?A=!1:!H&&!$&&(A=Number(F)!==Number(P))}if(A){const F=h(y,B);c.value=F,r.value=F}}}),e.watch([()=>t.isNumber,()=>t.decimal,()=>t.isThousand],()=>{const y=h(c.value,"");c.value=y,p(y)});const V=y=>{const B=h(y,r.value,!1,t.isImmediateThousand);c.value=B,u.value?.setValue(B),t.isNumber&&e.nextTick(()=>{const A=u.value?.getInputElement();A&&c.value===B&&S(A,y,String(B))}),p(B)},I=()=>{const y=T();c.value=y,r.value=y;const B=w(y);s("onFocus",B)},N=()=>{const y=T();c.value=y,r.value=y;const B=w(y);s("onBlur",B)},x=y=>{s("onChangeBlur",w(y))},L=y=>{s("onKeyupEnter",w(y))},D=y=>{s("onKeydown",y)},O=y=>{s("onKeyup",y)},X=()=>{s("onClear")},Q=()=>{s("onInit")},R=y=>{s("onChangeDelay",w(y))},C=()=>w(c.value);return l({getValue:C,getValueData:()=>({value:C(),show:n.isEmpty(c.value)?"":c.value.toString()}),setValue:(y,B)=>{const A=n.isEmpty(y)?"":h(y,"");if(c.value=A,r.value=A,u.value?.setValue(A),B){const F=w(A);s("update:value",F),s("update:modelValue",F),s("onChange",F)}},focus:()=>{E()},getInputElement:()=>u.value?.getInputElement()??null}),(y,B)=>(e.openBlock(),e.createBlock(Re,{ref_key:"refElInput",ref:u,id:e.unref(i),value:c.value,name:a.name,className:d.value,inputType:a.inputType,inputmode:m.value,autocomplete:a.autocomplete,placeholder:a.placeholder,label:a.label,isFloating:a.isFloating,disabled:a.disabled,isReadonly:a.isReadonly,isClean:a.isClean,width:a.width,theme:a.theme,isPlaintext:a.isPlaintext,changeDelayTime:a.changeDelayTime,onOnChange:V,onOnFocus:I,onOnBlur:N,onOnChangeBlur:x,onOnKeyupEnter:L,onOnKeydown:D,onOnKeyup:O,onOnClear:X,onOnInit:Q,onOnChangeDelay:R},e.createSlots({_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend")]),key:"0"}:void 0,y.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"append")]),key:"1"}:void 0,y.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"suffix")]),key:"2"}:void 0]),1032,["id","value","name","className","inputType","inputmode","autocomplete","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme","isPlaintext","changeDelayTime"]))}}),Xu=["id"],Gu={key:0,class:"inputCaptcha-count"},Ao=120,Fo=1e3,_s=e.defineComponent({name:"ClInputCaptcha",components:{ClInputNumber:Lt},__name:"Index",props:{id:{},value:{default:""},className:{},theme:{default:"default"},placeholder:{},autocomplete:{default:"one-time-code"},countdownMax:{default:Ao},onSendBefore:{}},emits:["update:value","update:modelValue","onChange","onKeyupEnter","onSend","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.reactive({value:n.isString(t.value)?t.value:"",isSend:!1,isCountdown:!1,countdown:Ao}),c={intervalCountdownId:null,isSending:!1,isUnmounted:!1},r=e.computed(()=>{let M={"panel-input-captcha":!0};return M=n.getJsonMerge(M,ue.getClassNameJson(t.className)),M[`inputCaptcha-theme-${t.theme}`]=!0,M}),d=e.computed(()=>({"inputCaptcha-send":!0,"inputCaptcha-send-ing":u.isCountdown})),m=M=>{s("update:value",M),s("update:modelValue",M),s("onChange",M)},p=()=>{s("onKeyupEnter",u.value)},f=()=>{s("onSend")},h=()=>{const{countdownMax:M}=t;return n.isNumber(M)&&n.isFinite(M)&&M>0?Math.floor(M):Ao},g=M=>n.isNonEmptyString(M)?M:"";e.onBeforeUnmount(()=>{c.isUnmounted=!0,c.intervalCountdownId&&(clearInterval(c.intervalCountdownId),c.intervalCountdownId=null)}),e.watch(()=>t.value,M=>{const V=g(M);u.value!==V&&(u.value=V)});const S=M=>{m(M)},T=()=>{p()},w=async()=>{if(u.isCountdown||c.isSending)return;c.isSending=!0;let M=!1;if(t.onSendBefore)if(!n.isFunction(t.onSendBefore))ve.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需为函数"),s("onError","onSendBefore 需为函数");else try{const V=await t.onSendBefore(u.value);n.isBoolean(V)?M=V:(ve.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需返回 boolean,本次按校验失败处理"),s("onError","onSendBefore 返回值需为 boolean"))}catch{M=!1,s("onError","发送前校验异常")}else M=!0;if(c.isSending=!1,!(c.isUnmounted||u.isCountdown)&&(u.isSend=M,M)){f(),u.isCountdown=!0,u.countdown=h();const V=Date.now()+u.countdown*Fo,I=setInterval(()=>{const N=Math.ceil((V-Date.now())/Fo);N<=0?(clearInterval(I),c.intervalCountdownId=null,u.countdown=h(),u.isCountdown=!1):u.countdown=N},Fo);c.intervalCountdownId=I}};return l({getValue:()=>u.value}),(M,V)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(r.value)},[e.createVNode(Lt,{theme:a.theme,isNumber:!0,decimal:0,isThousand:!1,value:u.value,"onUpdate:value":V[0]||(V[0]=I=>u.value=I),placeholder:a.placeholder,autocomplete:a.autocomplete,isClean:!0,onOnKeyupEnter:T,onOnChange:S},null,8,["theme","value","placeholder","autocomplete"]),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[u.isSend?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.isCountdown?(e.openBlock(),e.createElementBlock("span",Gu,e.toDisplayString(u.countdown)+"秒后重发",1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(w,["stop"])}," 重新发送 "))],64)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(w,["stop"])}," 发送验证码 "))],2)],10,Xu))}});class Tt{optionsDrag;_isDragging;_bindRunDragStart;_bindRunDragIng;_bindRunDragEnd;constructor(l,o){this.optionsDrag=o,this._isDragging=!1,this._init(l)}_init(l){this._bindRunDragStart=this._runDragStart.bind(this),this._bindRunDragIng=this._runDraggIng.bind(this),this._bindRunDragEnd=this._runDragEnd.bind(this),ue.onListener(l,"mousedown",this._bindRunDragStart),ue.onListener(l,"touchstart",this._bindRunDragStart)}_runDragStart(l){if(this._isDragging)return;const o=ue.getClientXY(l);let t=!0;this.optionsDrag.start&&(t=this.optionsDrag.start(l,o)),t=n.isBoolean(t)?t:!0,t?(l.preventDefault(),l.stopPropagation(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,this._isDragging=!0,ue.onListener(window,"mousemove",this._bindRunDragIng),ue.onListener(window,"touchmove",this._bindRunDragIng),ue.onListener(window,"mouseup",this._bindRunDragEnd),ue.onListener(window,"touchend",this._bindRunDragEnd),ue.onListener(window,"contextmenu",this._bindRunDragEnd)):this._isDragging=!1}_runDraggIng(l){if(!this._isDragging)return;const o=ue.getClientXY(l);this.optionsDrag.ing&&this.optionsDrag.ing(l,o)}_runDragEnd(l){if(!this._isDragging)return;this._isDragging=!1;const o=ue.getClientXY(l);this.optionsDrag.end&&this.optionsDrag.end(l,o),this._offListener()}_offListener(){ue.offListener(window,"mousemove",this._bindRunDragIng),ue.offListener(window,"touchmove",this._bindRunDragIng),ue.offListener(window,"mouseup",this._bindRunDragEnd),ue.offListener(window,"touchend",this._bindRunDragEnd),ue.offListener(window,"contextmenu",this._bindRunDragEnd)}end(){this._isDragging=!1,this._offListener()}}class ut{options;_isWinResize;_isRunDelay;_runDelayFun;_bindWinResize;_objResizeObserver;constructor(l){this._isWinResize=n.isUndefined(l.element),this._isRunDelay=!!(!n.isBoolean(l.isDelay)||l.isDelay),this.options=l,this._init()}_init(){this._isRunDelay&&(this._runDelayFun=new Es(this.options.callback,this.options.delayTime)),this._isWinResize?(this._bindWinResize=this._onWinResize.bind(this),ue.onListener(window,"resize",this._bindWinResize)):this._initResizeObserver()}_onWinResize(){this._isRunDelay?this._runDelayFun.run():this.options.callback&&this.options.callback()}_initResizeObserver(){window&&"ResizeObserver"in window&&(this._objResizeObserver=new ResizeObserver(l=>{const o=l[0];this._isRunDelay?this._runDelayFun.run(()=>{this.options.callback(o)}):this.options.callback(o)}),this._objResizeObserver.observe(this.options.element))}destroy(){this._isWinResize?ue.offListener(window,"resize",this._bindWinResize):this._objResizeObserver&&(this._objResizeObserver.disconnect(),this._objResizeObserver=null)}}const Qu=["aria-disabled"],Po=e.defineComponent({name:"ClInputnumberstepperButton",__name:"Button",props:{className:{},disabled:{type:Boolean},checkDownBeforeCallback:{type:Function}},emits:["onLongDownStart","onLongDownEnd"],setup(a,{emit:l}){const o=a,t=l,s=e.useTemplateRef("refElButton"),i={longDownInterval:null,isMoveBoundary:!1,isLongDownActive:!1,isKeyDown:!1,dragEvent:null,sessionSource:null},u=e.computed(()=>{const E=n.getJsonMerge({"inputNumberStepper-controls":!0},ue.getClassNameJson(o.className));return E["inputNumberStepper-controls-disabled"]=!!o.disabled,E}),c=()=>{t("onLongDownStart")},r=E=>{t("onLongDownEnd",E)},d=()=>{let E=!0;if(o.checkDownBeforeCallback){try{E=o.checkDownBeforeCallback()}catch(M){ve.warn("ClInputnumberstepperButton","长按开始回调执行失败,按允许处理",M),E=!0}E=n.isBoolean(E)?E:!0}return E},m=()=>{i.longDownInterval&&(clearInterval(i.longDownInterval),i.longDownInterval=null)},p=E=>{i.isLongDownActive&&i.sessionSource!==E||(i.isLongDownActive=!0,i.sessionSource=E,c(),m(),i.longDownInterval=setInterval(()=>{o.disabled?h():c()},200))},f=E=>{if(i.sessionSource!=="mouse")return;const M=E.target;s.value===E.target||s.value?.contains(M)?i.isMoveBoundary&&(i.isMoveBoundary=!1,!o.disabled&&d()&&p("mouse")):(m(),i.isMoveBoundary=!0)},h=(E,M)=>{if(i.isLongDownActive){if(E&&i.sessionSource&&E!==i.sessionSource)return;m(),i.isLongDownActive=!1,i.sessionSource=null,i.isKeyDown=!1,r(M)}},g=()=>{const E={start(M){if(o.disabled)return!1;const V=M,I=M;let N=!1;return(V.buttons===1||M.type==="touchstart"||(I.touches?.length??0)>0)&&(N=d(),N&&(i.isMoveBoundary=!1,p("mouse"))),N},ing:M=>{f(M)},end:()=>{h("mouse")}};s.value&&(i.dragEvent=new Tt(s.value,E))};e.onMounted(()=>{e.nextTick(()=>{g()})}),e.onBeforeUnmount(()=>{h(),i.dragEvent&&(i.dragEvent.end(),i.dragEvent=null)});const S=E=>{const M=E.key;if(M==="Enter"||M===" "){if(o.disabled)return;E.preventDefault(),!i.isKeyDown&&!i.isLongDownActive&&d()&&(i.isKeyDown=!0,p("keyboard"))}},T=E=>{const M=E.key;(M==="Enter"||M===" ")&&i.isKeyDown&&h("keyboard")},w=()=>{(i.isKeyDown||i.isLongDownActive)&&h(void 0,!0)};return(E,M)=>(e.openBlock(),e.createElementBlock("span",{ref_key:"refElButton",ref:s,class:e.normalizeClass(u.value),role:"button",tabindex:"0","aria-disabled":o.disabled,onKeydown:S,onKeyup:T,onBlur:w},[e.renderSlot(E.$slots,"icon")],42,Qu))}}),Zu=["id"],kn=e.defineComponent({name:"ClInputNumberStepper",components:{ClInputNumber:Lt,ClInputnumberstepperButton:Po,ClIconFont:fe},__name:"Index",props:{id:String,value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:"large"},btnShowType:{type:String,default:"fixed"},btnTheme:{type:String,default:"leftRight",validator:a=>["leftRight","upDown"].indexOf(a)!==-1},btnShape:{type:String,default:"square",validator:a=>["square","circle"].indexOf(a)!==-1},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!0},isTextRead:{type:Boolean,default:!1},min:Number,max:Number,isLoop:{type:Boolean,default:!1},decimal:{type:Number,default:0},fillZeroCount:{type:Number,default:0},btnStep:{type:Number,default:1},btnClsIconSub:{type:String,default:""},btnClsIconAdd:{type:String,default:""},operateBtnDownBeforeCallback:{type:Function,default:void 0},calculationOperateValueCallback:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onError"],setup(a,{emit:l}){const o=a,t=l,s=e.useTemplateRef("refElInput"),i=e.reactive({isFocus:!1}),u=e.ref(""),c=e.reactive({subtractDisabled:!1,addDisabled:!1}),r=o.id,d={upDown:{subtract:"angle-up",add:"angle-down"},leftRight:{subtract:"minus",add:"plus"}};let m=null;const p=()=>{const R=o.btnStep;return n.isFinite(R)&&R>0?R:1},f=e.computed(()=>{const R=o.decimal,C=p().toString();let k=R;if(C.indexOf(".")>-1){const b=C.split(".")[1].length;R<b&&(k=b)}return k===-1?-1:Math.max(0,Math.min(100,Math.round(k)))}),h=e.computed(()=>o.fillZeroCount>0&&n.isFinite(o.fillZeroCount)),g=e.computed(()=>{if(n.isNonEmptyString(o.btnClsIconSub))return"";const R=o.btnTheme||"leftRight";return d[R]?d[R].subtract:""}),S=e.computed(()=>{if(n.isNonEmptyString(o.btnClsIconAdd))return"";const R=o.btnTheme||"leftRight";return d[R]?d[R].add:""}),T=e.computed(()=>{if(o.isPlaintext){let C={"cl-plaintext-stepper":!0};return C=n.getJsonMerge(C,ue.getClassNameJson(o.className)),C}let R={"panel-input-number-stepper":!0,"inputNumberStepper-disabled":o.disabled||!1};return R=n.getJsonMerge(R,ue.getClassNameJson(o.className)),R[`inputNumberStepper-btn-${o.btnTheme||"leftRight"}`]=!0,R[`inputNumberStepper-btn-${o.btnShowType||"fixed"}`]=!0,(o.btnTheme||"leftRight")==="leftRight"&&o.btnShape==="circle"&&(R["inputNumberStepper-btnShape-circle"]=!0),R["inputNumberStepper-focus"]=i.isFocus,R[`inputNumberStepper-${o.size||"large"}`]=!0,R}),w=()=>{const R=u.value;t("update:value",R),t("update:modelValue",R),t("onChange",R)},E=R=>{n.isEmpty(R)||s.value?.setValue(R),u.value=R},M=(R,C)=>{n.isUndefined(R)&&(R=""),n.isString(R)&&(R=n.removeReplace(R));const k=R.toString();let b=R,v=!1,_=!1,y=!1;if(o.calculationOperateValueCallback){let B=null;try{const A=o.calculationOperateValueCallback({value:R,type:C});A&&(B=A)}catch{t("onError","数值计算回调执行失败")}B&&(n.isString(B.value)||typeof B.value=="number"&&n.isFinite(B.value))&&(b=B.value,v=B.subtractDisabled||!1,_=B.addDisabled||!1)}else{const B=C&&!n.isEmpty(C);if(B||!n.isEmpty(R)){const A=n.isEmpty(R)?0:Number(R);if(n.isFinite(A)){const F=o.min,P=o.max,{isLoop:H=!1}=o,$=n.isUndefined(F),z=n.isUndefined(P),oe=p();let Z=A;if(B){Z+=oe*(C==="subtract"?-1:1);const W=Z.toString();if(W.indexOf(".")>-1){const Y=W.split(".")[1].length,q=f.value;q>=0&&Y>q&&(Z=Number(Z.toFixed(q)))}}!$&&Z<=F?(H||(v=!0),b=Z<F&&H&&!z?P:F,y=Z!==b):!z&&Z>=P?(H||(_=!0),b=Z>P&&H&&!$?F:P,y=Z!==b):b=Z}}}if(typeof b=="number"&&f.value>0&&(b.toString().indexOf(".")>-1||k.indexOf(".")>-1)&&(b=b.toFixed(f.value)),!n.isString(b)&&!(typeof b=="number"&&n.isFinite(b))&&(b=""),h.value&&!n.isEmpty(b)&&n.isFinite(b)){const B=o.fillZeroCount;B>10&&ve.warn("ClInputNumberStepper","fillZeroCount 超过 10,按 10 处理",B);const A=b.toString(),F=A.charAt(0)==="-",P=F?A.slice(1):A,H=P.indexOf("."),$=H>-1?P.slice(0,H):P,z=H>-1?P.slice(H):"",Z=!/[eE]/.test(P)&&$.length<B?n.getFillZero($,Math.min(B,10)):$;b=(F?"-":"")+Z+z}return E(b.toString()),c.subtractDisabled=v,c.addDisabled=_,y},V=R=>{i.isFocus=R,R&&s.value?.focus()},I=R=>["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].indexOf(R.key)!==-1;e.onBeforeUnmount(()=>{m&&(clearTimeout(m),m=null)}),e.watch(()=>o.value,(R,C)=>{R!==C&&R!==u.value&&M(R)&&w()},{immediate:!0});const N=R=>{o.disabled||(R=n.removeReplace(R),E(R),m&&(clearTimeout(m),m=null),m=setTimeout(()=>{n.isEmpty(u.value)?(c.subtractDisabled=!1,c.addDisabled=!1):M(u.value),w()},100))},x=R=>{if(!o.disabled&&!o.isTextRead&&I(R)){R.preventDefault(),m&&(clearTimeout(m),m=null);const C=R.key;C==="ArrowLeft"||C==="ArrowDown"?M(u.value,"subtract"):M(u.value,"add"),w(),V(!0)}},L=R=>{!o.disabled&&!o.isTextRead&&I(R)&&(m&&(clearTimeout(m),m=null),V(!0))},D=()=>{V(!0)},O=R=>{V(!1),o.disabled||E(R)},X=R=>{m&&(clearTimeout(m),m=null),M(u.value,R)},Q=R=>{m&&(clearTimeout(m),m=null),w(),R||V(!0)};return(R,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(T.value)},[e.createVNode(Lt,{ref_key:"refElInput",ref:s,value:u.value,placeholder:a.placeholder,disabled:a.disabled,isReadonly:a.isTextRead,isClean:a.isClean,isNumber:!h.value,decimal:f.value,isPlaintext:a.isPlaintext,theme:"icon",onOnChange:N,onOnKeydown:x,onOnKeyup:L,onOnFocus:D,onOnBlur:O},e.createSlots({_:2},[R.$slots.textPrepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(R.$slots,"textPrepend")]),key:"0"}:void 0]),1032,["value","placeholder","disabled","isReadonly","isClean","isNumber","decimal","isPlaintext"]),a.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Po,{className:"inputNumberStepper-subtract","aria-label":"减少",disabled:a.disabled||c.subtractDisabled,checkDownBeforeCallback:a.operateBtnDownBeforeCallback,onOnLongDownStart:C[0]||(C[0]=k=>X("subtract")),onOnLongDownEnd:Q},{icon:e.withCtx(()=>[e.createVNode(fe,{name:g.value,className:a.btnClsIconSub},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"]),e.createVNode(Po,{className:"inputNumberStepper-add","aria-label":"增加",disabled:a.disabled||c.addDisabled,checkDownBeforeCallback:a.operateBtnDownBeforeCallback,onOnLongDownStart:C[1]||(C[1]=k=>X("add")),onOnLongDownEnd:Q},{icon:e.withCtx(()=>[e.createVNode(fe,{name:S.value,className:a.btnClsIconAdd},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"])],64))],10,Zu))}}),Ns=e.defineComponent({name:"ClInputPassword",components:{ClIconFont:fe,ClInput:Re},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:Boolean,theme:{type:String,default:"default"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:Boolean,isClean:{type:Boolean,default:!0}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElInput"),c=e.ref(!1),r=e.computed(()=>c.value?"text":"password"),d=e.computed(()=>{let D={"panel-input-password":!0};return D=n.getJsonMerge(D,ue.getClassNameJson(t.className)),n.getStringByJson(D," ")}),m=D=>{s("update:value",D),s("update:modelValue",D),s("onChange",D)},p=D=>{m(D)},f=D=>{s("onFocus",D)},h=D=>{s("onBlur",D)},g=D=>{s("onChangeBlur",D)},S=D=>{s("onKeyupEnter",D)},T=D=>{s("onKeydown",D)},w=D=>{s("onKeyup",D)},E=()=>{s("onClear")},M=()=>{s("onInit")},V=()=>{t.disabled||(c.value=!c.value)};return l({getValue:()=>u.value?.getValue(),getValueData:()=>u.value?.getValueData(),setValue:(D,O)=>{u.value?.setValue(D,O)},focus:()=>{u.value?.focus()}}),(D,O)=>(e.openBlock(),e.createBlock(Re,{ref_key:"refElInput",ref:u,id:e.unref(i),name:a.name,value:a.value,inputType:r.value,className:d.value,placeholder:a.placeholder,label:a.label,isFloating:a.isFloating,disabled:a.disabled,isReadonly:a.isReadonly,isClean:a.isClean,width:a.width,theme:a.theme,onOnChange:p,onOnFocus:f,onOnBlur:h,onOnChangeBlur:g,onOnKeyupEnter:S,onOnKeydown:T,onOnKeyup:w,onOnClear:E,onOnInit:M},e.createSlots({suffix:e.withCtx(()=>[e.createVNode(fe,{class:"input-password-icon",name:c.value?"eye":"eye-no",role:"button","aria-label":c.value?"隐藏密码":"显示密码","aria-disabled":a.disabled,tabindex:a.disabled?-1:0,onClick:V,onKeydown:[e.withKeys(e.withModifiers(V,["prevent"]),["enter"]),e.withKeys(e.withModifiers(V,["prevent"]),["space"])]},null,8,["name","aria-label","aria-disabled","tabindex","onKeydown"])]),_:2},[D.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"prepend")]),key:"0"}:void 0,D.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"append")]),key:"1"}:void 0]),1032,["id","name","value","inputType","className","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme"]))}}),ed=["id"],td=["aria-label","tabindex","onKeydown"],nn=e.defineComponent({name:"ClInputSearch",components:{ClInput:Re,ClIconFont:fe},__name:"Index",props:{id:String,value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},textLabel:{type:String,default:""},changeDelayTime:{type:Number,default:200},theme:{type:String,default:"icon",validator:a=>["icon","text"].indexOf(a)!==-1},location:{type:String,default:"right",validator:a=>["left","right"].indexOf(a)!==-1}},emits:["update:value","update:modelValue","onChange","onSearch","onFocus","onBlur"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElInput");let c=n.isNonEmptyString(t.value)?t.value:"";const r=e.ref(n.isNonEmptyString(t.value)?t.value:"");let d=null,m=null;const p=e.computed(()=>n.isFinite(t.changeDelayTime)&&t.changeDelayTime>=0?t.changeDelayTime:200),f=e.computed(()=>{let C="append";return n.isEmpty(t.location)||(C=t.location==="left"?"prepend":"append"),C}),h=e.computed(()=>{let C={"panel-input-search":!0,"input-search-disabled":t.disabled};const k=n.isEmpty(t.theme)?"icon":t.theme;return C[`input-search-${k}`]=!0,n.getJsonMerge(C,ue.getClassNameJson(t.className))}),g=C=>{s("update:value",C),s("update:modelValue",C),s("onChange",C)},S=C=>{s("onSearch",C)},T=C=>{s("onFocus",C)},w=C=>{s("onBlur",C)},E=()=>{d&&(clearTimeout(d),d=null)},M=()=>{m&&(clearTimeout(m),m=null)},V=()=>{E(),M(),c!==r.value&&(c=r.value,g(r.value)),S(r.value)};e.onBeforeUnmount(()=>{E(),M()}),e.watch(()=>t.value,C=>{r.value=n.isNonEmptyString(C)?C:"",c=r.value});const I=C=>{t.disabled||(E(),d=setTimeout(()=>{!t.disabled&&r.value===C&&c!==C&&(c=C,g(C)),d=null},p.value))},N=()=>{t.disabled||(M(),m=setTimeout(()=>{t.disabled||V()},p.value))},x=C=>{t.disabled||T(C)},L=C=>{t.disabled||w(C)},D=()=>{t.disabled||V()},O=()=>{t.disabled||(E(),M(),c="",g(""),S(""))};return l({getValue:()=>r.value,setValue:(C,k)=>{const b=n.isNonEmptyString(C)?C:"";E(),M(),c=b,r.value=b,k&&(s("update:value",b),s("update:modelValue",b))},focus:()=>{u.value?.focus()}}),(C,k)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(h.value)},[e.createVNode(Re,{ref_key:"refElInput",ref:u,value:r.value,"onUpdate:value":k[0]||(k[0]=b=>r.value=b),theme:"icon",placeholder:a.placeholder,isClean:!0,disabled:a.disabled,onOnChange:I,onOnKeyupEnter:N,onOnFocus:x,onOnBlur:L,onOnClear:O},{[f.value]:e.withCtx(()=>[a.theme==="text"&&!e.unref(n).isEmpty(a.textLabel)?(e.openBlock(),e.createElementBlock("span",{key:0,role:"button","aria-label":a.textLabel,tabindex:a.disabled?-1:0,onClick:D,onKeydown:[e.withKeys(e.withModifiers(D,["prevent"]),["enter"]),e.withKeys(e.withModifiers(D,["prevent"]),["space"])]},e.toDisplayString(a.textLabel),41,td)):(e.openBlock(),e.createBlock(fe,{key:1,name:"search",role:"button","aria-label":"搜索",tabindex:a.disabled?-1:0,onClick:D,onKeydown:[e.withKeys(e.withModifiers(D,["prevent"]),["enter"]),e.withKeys(e.withModifiers(D,["prevent"]),["space"])]},null,8,["tabindex","onKeydown"]))]),_:2},1032,["value","placeholder","disabled"])],10,ed))}}),nd=["id"],od=["name","placeholder","disabled","aria-label"],On="100px",ro=e.defineComponent({name:"ClInputTextarea",__name:"Index",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:String,default:""},height:{type:String,default:"100px"},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!1},isAutoHeight:{type:Boolean,default:!1},changeDelayTime:{type:Number,default:200},heightMax:{type:String,default:""},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onInit","onKeydownEnter","onKeyupEnter","onFocus","onBlur","onChangeDelay"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElTextarea"),c=e.reactive({height:t.height||On}),r=e.ref(n.isString(t.value)?t.value:""),d={lastValue:n.isString(t.value)?t.value:"",prevDelayValue:n.isString(t.value)?t.value:"",valueDelayRun:!1},m=e.computed(()=>{let v=t.name;return n.isEmpty(v)&&(v=`textarea_${n.getRandom(8)}`),v}),p=e.computed(()=>t.isClean&&!t.disabled&&!n.isEmpty(r.value)),f=e.computed(()=>{let v={"panel-input-textarea":!0,"textarea-clean":t.isClean&&!t.isPlaintext};return t.isPlaintext&&(v["cl-plaintext-value"]=!0,v["cl-plaintext-value-pre"]=!0),v=n.getJsonMerge(v,ue.getClassNameJson(t.className)),v}),h=e.computed(()=>{const v=r.value;return n.isString(v)?v.replace(/<\/?br\s*\/?>/gi,`
|
|
8
|
-
`):""}),g=e.computed(()=>{const{width:v,heightMax:_}=t,y={};return n.isNonEmptyString(v)&&(y.width=v),t.isPlaintext||(n.isEmpty(c.height)||(y.height=c.height),n.isNonEmptyString(_)&&(y["max-height"]=_)),y});let S;const T=v=>{S&&(clearTimeout(S),S=null),d.valueDelayRun=!0,S=setTimeout(()=>{d.valueDelayRun=!1,d.prevDelayValue!==v&&(d.prevDelayValue=v,s("onChangeDelay",v))},Math.max(t.changeDelayTime,0))},w=v=>{v!==d.lastValue&&(d.lastValue=v,s("update:value",v),s("update:modelValue",v),s("onChange",v),T(v))},E=()=>{if(t.isAutoHeight){const v=u.value;if(v){v.style.height=t.height||On;const _=v.scrollHeight+v.scrollTop+(v.offsetHeight-v.clientHeight);v.style.height="100%",c.height=_>0?`${_}px`:t.height||On}}},M=()=>{u.value?.focus()},V=()=>{e.nextTick(()=>{s("onInit")})};e.onMounted(()=>{V()}),e.onBeforeUnmount(()=>{S&&(clearTimeout(S),S=null)}),e.watch(()=>t.value,(v,_)=>{v!==_&&(r.value=n.isString(v)?v:"",d.lastValue=n.isString(v)?v:"",requestAnimationFrame(()=>E()),d.valueDelayRun||(d.prevDelayValue=v||""))});const I=v=>{const _=v.target;if(!_)return;const y=_.value;requestAnimationFrame(()=>E()),w(y)},N=v=>{v.key==="Enter"&&s("onKeydownEnter",v)},x=v=>{v.key==="Enter"&&s("onKeyupEnter",v)},L=()=>{r.value="",w(""),M()},D=()=>{s("onFocus")},O=()=>{s("onBlur")},X=()=>n.trim(r.value);return l({getValue:X,getValueData:()=>({value:X(),show:r.value}),setValue:v=>{S&&(clearTimeout(S),S=null,d.valueDelayRun=!1);const _=n.isEmpty(v)?"":v;d.lastValue=_,d.prevDelayValue=_,r.value=_,E()},initHeight:()=>{c.height=t.height||On,t.isAutoHeight&&E()},focus:()=>{M()},getParentElement:()=>u.value?.parentElement||null}),(v,_)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(f.value),style:e.normalizeStyle(g.value)},[a.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(h.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.withDirectives(e.createElementVNode("textarea",{ref_key:"refElTextarea",ref:u,class:"form-control text-area","onUpdate:modelValue":_[0]||(_[0]=y=>r.value=y),name:m.value,placeholder:a.placeholder,disabled:a.disabled,"aria-label":a.placeholder||"文本输入区域",onInput:I,onKeydown:N,onKeyup:x,onFocus:D,onBlur:O},null,40,od),[[e.vModelText,r.value]]),p.value?(e.openBlock(),e.createBlock(fe,{key:0,name:"close-circle-fill",class:"textarea-clear-icon","aria-label":"清除输入内容",onClick:e.withModifiers(L,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],14,nd))}}),ad=["id"],ld=["id","href","target","rel"],sd=["id","href"],id=["id"],Ot=e.defineComponent({name:"ClLink",__name:"Index",props:{id:String,className:{type:String,default:""},disabled:{type:Boolean,default:!1},url:{type:[String,Object],default:""},isHideUnderline:{type:Boolean,default:!1},isLight:{type:Boolean,default:!1},isTargetBlank:{type:Boolean,default:!1},isOutside:{type:Boolean,default:!1},isStopPropagation:{type:Boolean,default:!1},theme:{type:String,default:"link",validator:a=>["link","button"].indexOf(a)!==-1}},emits:{onClick:a=>!0,onHoverIn:a=>!0,onHoverOut:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.computed(()=>!n.isEmpty(o.url)),u=e.computed(()=>n.isString(o.url)?o.url:(n.isEmpty(o.url)||ve.warn("ClLink","Link 组件:url 为 Router 对象时不应同时使用 isOutside 或 isTargetBlank,请传入 String 类型 url"),"")),c=e.computed(()=>{if(o.theme==="button"){let T={btn:!0,"btn-disabled":o.disabled};const w=["btn-green","btn-red","btn-yellow","btn-white","btn-grayLight","btn-transparent","btn-text"],E=ue.getClassNameJson(o.className);return w.some(V=>!!E[V])||(T["btn-default"]=!0),n.getJsonMerge(T,E)}let S={"panel-link":!0,"btn-link":!0,"btn-link-disabled":o.disabled,"always-light":o.isLight,"underline-none":o.isHideUnderline};return S=n.getJsonMerge(S,ue.getClassNameJson(o.className)),S}),r=g=>{t("onClick",g)},d=g=>{t("onHoverIn",g)},m=g=>{t("onHoverOut",g)},p=g=>{o.disabled||(r(g),o.isStopPropagation&&(g?.preventDefault(),g?.stopPropagation()))},f=g=>{o.disabled||d(g)},h=g=>{o.disabled||m(g)};return(g,S)=>{const T=e.resolveComponent("router-link");return a.url&&i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,id:e.unref(s),class:e.normalizeClass(c.value),role:"link","aria-disabled":"true"},[e.renderSlot(g.$slots,"default")],10,ad)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.isOutside?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(s),class:e.normalizeClass(c.value),href:u.value,target:a.isTargetBlank?"_blank":void 0,rel:a.isTargetBlank?"noopener noreferrer":void 0,onClick:p,onMouseenter:f,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(g.$slots,"default")])],42,ld)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.isTargetBlank?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(s),class:e.normalizeClass(c.value),href:u.value,target:"_blank",rel:"noopener noreferrer",onClick:e.withModifiers(p,["stop"]),onMouseenter:f,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(g.$slots,"default")])],42,sd)):(e.openBlock(),e.createBlock(T,{key:1,id:e.unref(s),class:e.normalizeClass(c.value),to:a.url,onClick:e.withModifiers(p,["stop"])},{default:e.withCtx(()=>[e.createElementVNode("span",{onMouseenter:f,onMouseleave:h},[e.renderSlot(g.$slots,"default")],32)]),_:3},8,["id","class","to"]))],64))],64))],64)):(e.openBlock(),e.createElementBlock("a",{key:1,id:e.unref(s),class:e.normalizeClass(c.value),href:"javascript:",onClick:p,onMouseenter:f,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(g.$slots,"default")])],42,id))}}}),rd={class:"loading-content"},Vs=e.defineComponent({name:"ClLoadFullCenter",__name:"FullCenter",props:{id:{},className:{},show:{type:Boolean,default:!0},teleportTarget:{},zIndex:{},background:{},theme:{},size:{},color:{}},setup(a){return(l,o)=>(e.openBlock(),e.createBlock(Rt,{show:a.show,id:a.id,zIndex:a.zIndex,teleportTarget:a.teleportTarget||"self",background:a.background||"var(--cl-overlay, rgba(0, 0, 0, 0.5))",duration:0,className:a.className,isLockScroll:!1},{default:e.withCtx(()=>[e.createElementVNode("div",rd,[e.createVNode(He,{theme:a.theme,size:a.size,color:a.color},null,8,["theme","size","color"])])]),_:1},8,["show","id","zIndex","teleportTarget","background","className"]))}}),cd=["id"],ud={key:0,class:"loading-content"},dd={key:1,class:"loading-nothing"},on=e.defineComponent({name:"ClLoadIng",__name:"Ing",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},noDataText:{},color:{}},setup(a){const l=a,o=l.id,t=e.computed(()=>n.getJsonMerge({"panel-load-ing":!0},ue.getClassNameJson(l.className)));return(s,i)=>a.isLoadIng||a.isEmpty?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.value),id:e.unref(o)},[a.isLoadIng?(e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(He,{theme:a.theme,size:a.size,color:a.color},null,8,["theme","size","color"])])):a.isEmpty?(e.openBlock(),e.createElementBlock("div",dd,[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"nothingData",{},()=>[e.createElementVNode("span",null,e.toDisplayString(a.noDataText||"暂无数据"),1)])])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,cd)):e.createCommentVNode("",!0)}}),md=["aria-label"],pd={class:"loadScreen-main"},fd={key:0,class:"loadScreen-text"},ya=e.defineComponent({name:"ClLoadScreen",__name:"Index",props:{id:String,className:String,teleportTarget:{type:String,default:"body"}},setup(a,{expose:l}){const{optA11yText:o}=oo(),s=a.id||`loadscreen-${n.getRandom(5)}`,i=e.ref(!1),u=e.reactive({id:s,text:""});let c=null;const r=p=>{c&&(clearTimeout(c),c=null),c=setTimeout(()=>{i.value=!1,c=null},p)};return e.onBeforeUnmount(()=>{c&&(clearTimeout(c),c=null),i.value=!1}),l({show:(p,f)=>{c&&(clearTimeout(c),c=null),u.id=n.isNonEmptyString(f?.id)?f.id:s,u.text=n.isNonEmptyString(p)?p:"",i.value=!0},hide:(p=0)=>{p>0?r(p):(c&&(clearTimeout(c),c=null),i.value=!1)}}),(p,f)=>(e.openBlock(),e.createBlock(Rt,{id:u.id,show:i.value,teleportTarget:a.teleportTarget,zIndex:1000002,duration:0,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.4))",className:a.className},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"loadScreen-container",role:"alert","aria-label":e.unref(o).loading||"加载中"},[e.createElementVNode("div",pd,[u.text.length>0?(e.openBlock(),e.createElementBlock("span",fd,e.toDisplayString(u.text),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(He,{color:"white",size:"large"})])],8,md)]),_:1},8,["id","show","teleportTarget","className"]))}}),hd=["id"],Ms=e.defineComponent({name:"ClLoadWarp",__name:"Warp",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},height:{},minHeight:{},noDataText:{},color:{}},setup(a){const l=a,o=l.id,t=e.computed(()=>n.getJsonMerge({"panel-load-warp":!0},ue.getClassNameJson(l.className))),s=e.computed(()=>{const i={},{height:u,minHeight:c,isLoadIng:r}=l;return r&&(i["min-height"]="100px"),n.isNonEmptyString(u)?i.height=u:n.isNonEmptyString(c)&&(i["min-height"]=c),i});return(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),style:e.normalizeStyle(s.value),id:e.unref(o)},[e.renderSlot(i.$slots,"default"),e.createVNode(on,{isLoadIng:a.isLoadIng,isEmpty:a.isEmpty,theme:a.theme,size:a.size,color:a.color,noDataText:a.noDataText},{nothingData:e.withCtx(()=>[e.renderSlot(i.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty","theme","size","color","noDataText"])],14,hd))}}),gd=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function pl(a){return Array.from(a.querySelectorAll(gd)).filter(l=>!(l.hasAttribute("disabled")||l.getAttribute("aria-hidden")==="true"||l.offsetParent===null&&getComputedStyle(l).position!=="fixed"))}function vd(a,l,o={}){let t=null;const s=()=>a.value??null,i=r=>{if(!l.value)return;const d=s();if(!d)return;if(r.key==="Escape"){if(o.isEscapeClose&&!o.isEscapeClose()||!o.onEscape)return;r.stopPropagation(),o.onEscape();return}if(r.key!=="Tab")return;const m=pl(d);if(m.length===0){r.preventDefault(),d.focus();return}const p=m[0],f=m[m.length-1],h=document.activeElement;if(!(h?d.contains(h):!1)){r.preventDefault(),(r.shiftKey?f:p).focus();return}r.shiftKey&&h===p?(r.preventDefault(),f.focus()):!r.shiftKey&&h===f&&(r.preventDefault(),p.focus())},u=()=>{t=document.activeElement,document.addEventListener("keydown",i,!0),o.isAutoFocus!==!1&&requestAnimationFrame(()=>{const r=s();if(!r)return;const d=pl(r);d.length>0?d[0].focus():r.focus()})},c=()=>{document.removeEventListener("keydown",i,!0);const r=t;t=null,r&&requestAnimationFrame(()=>{r.isConnected&&r.focus()})};e.watch(l,r=>{r?u():c()},{immediate:!0}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",i,!0)})}const yd=["id"],kd={class:"modal-content"},Os=e.defineComponent({name:"ClModalTransition",__name:"BaseTransition",props:{id:String,className:String,isBackClick:{type:Boolean,default:!0},width:{type:String,default:"600px"},classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""},isEscapeClose:{type:Boolean,default:!0},isFocusTrap:{type:Boolean,default:!0}},emits:{onClickBack:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=new Map;let u=!1;const c=new Map,r=e.useTemplateRef("refElParent"),d=e.useTemplateRef("refElDialog"),m=e.reactive({isShow:!1}),p=e.computed(()=>n.getJsonMerge({"panel-modal":!0},ue.getClassNameJson(t.className))),f=e.computed(()=>({modal:!0,fade:!0,show:m.isShow})),h=e.computed(()=>{const D={};return n.isEmpty(t.width)||(D.width=t.width),D}),g=()=>{s("onClickBack")},S=D=>{const O=i.get(D)??0;i.set(D,O+1),!(O>0||/\bmodal-open\b/.test(D.className))&&(c.set(D,D===document.body?{x:window.scrollX,y:window.scrollY}:{x:D.scrollLeft,y:D.scrollTop}),D.className+=" modal-open",D===document.body&&(u=!0))},T=D=>{const O=i.get(D)??0;if(!(O<=0))if(O===1){i.delete(D),D===document.body?u&&(D.className=D.className.replace(/\bmodal-open\b/g,"").trim(),u=!1):D.className=D.className.replace(/\bmodal-open\b/g,"").trim();const X=c.get(D);X&&(c.delete(D),requestAnimationFrame(()=>{D===document.body?window.scrollTo(X.x,X.y):(D.scrollTop=X.y,D.scrollLeft=X.x)}))}else i.set(D,O-1)},w=()=>{const D=t.teleportTarget;if(n.isEmpty(D)||D==="body")return document.body;if(D==="self"){const X=r.value?r.value.parentElement:null;if(!X)return null;let Q=X;for(;Q&&Q!==document.body;){if(window.getComputedStyle(Q).position!=="static")return Q;Q=Q.parentElement}return document.body}const O=document.querySelector(D);return O===document.body?document.body:O??document.body},E=()=>{if(m.isShow){const D=w();D&&S(D)}else{const D=w();D&&T(D)}},M=()=>{m.isShow=!1};vd(d,e.computed(()=>t.isFocusTrap&&m.isShow),{onEscape:()=>{t.isEscapeClose&&M()},isEscapeClose:()=>t.isEscapeClose}),e.onBeforeUnmount(()=>{m.isShow&&E()}),e.watch(()=>m.isShow,()=>{E()});const V=D=>{t.isBackClick&&D.currentTarget===D.target&&(M(),g())},I=()=>{},N=()=>{};return l({show:()=>{m.isShow=!0},hide:()=>{M()}}),(D,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:a.id,ref_key:"refElParent",ref:r},[e.createVNode(e.Transition,{"enter-active-class":a.classTransitionEnter,"leave-active-class":a.classTransitionLeave,onEnter:I,onAfterLeave:N},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(f.value),role:"dialog","aria-modal":"true",tabindex:"-1",ref_key:"refElDialog",ref:d},[e.createElementVNode("div",{class:"modal-wrapper",onClick:V},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle(h.value)},[e.createElementVNode("div",kd,[e.renderSlot(D.$slots,"default")])],4)])],2),[[e.vShow,m.isShow]])]),_:3},8,["enter-active-class","leave-active-class"]),e.createVNode(Rt,{show:m.isShow,zIndex:999999,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.3))",duration:150,teleportTarget:a.teleportTarget},null,8,["show","teleportTarget"])],10,yd))}}),Sd={key:0,class:"modal-header"},bd={class:"modal-title"},wd={class:"modal-body"},Cd={key:2,class:"modal-footer"},Ed={key:3,class:"modal-footer-hide"},ka=e.defineComponent({name:"ClModal",__name:"Index",props:{id:String,className:String,posSubmitClose:{type:String,default:"CloseSubmit",validator:a=>["CloseSubmit","SubmitClose"].indexOf(a)!==-1},width:{type:String,default:"600px"},titleName:String,isBackClick:{type:Boolean,default:!0},isShowHeader:{type:Boolean,default:!0},isShowFooter:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!0},isShowSubmitLoad:{type:Boolean,default:!0},closeLabel:String,submitLabel:String,classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""}},emits:{onSubmit:()=>!0,onClose:()=>!0},setup(a,{expose:l,emit:o}){const t=a,{optLocale:s}=Ae(),i=(N,x)=>{s.value;const L=ot.getValue(`common.${N}`);return typeof L=="string"&&L.length>0?L:x},u=e.computed(()=>t.closeLabel||i("cancel","取消")),c=e.computed(()=>t.submitLabel||i("submit","提交")),r=o,d=e.useTemplateRef("refElTransition"),m=e.useTemplateRef("refElBtnSubmit"),p=e.reactive({isLoadBackClick:!0,disabledSubmit:!1}),f=()=>{r("onSubmit")},h=()=>{r("onClose")},g=()=>{d.value&&d.value.hide()},S=()=>{t.isShowSubmitLoad&&(p.isLoadBackClick=!1),f()},T=()=>{g(),h()},w=()=>{h()},E=()=>{V(),p.disabledSubmit=!1,d.value&&d.value.show()},M=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop(),g()},V=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop()};return l({show:E,hide:M,loadStop:V,disabledSubmit:N=>{const x=n.isBoolean(N)?N:!0;p.disabledSubmit=x}}),(N,x)=>(e.openBlock(),e.createBlock(Os,{id:a.id,className:a.className,isBackClick:a.isBackClick&&p.isLoadBackClick,classTransitionEnter:a.classTransitionEnter,classTransitionLeave:a.classTransitionLeave,width:a.width,teleportTarget:a.teleportTarget,onOnClickBack:w,ref_key:"refElTransition",ref:d},{default:e.withCtx(()=>[a.isShowHeader?(e.openBlock(),e.createElementBlock("div",Sd,[e.createElementVNode("h4",bd,e.toDisplayString(a.titleName),1),e.createElementVNode("button",{type:"button",class:"close","aria-label":"关闭",onClick:T},[e.createVNode(fe,{name:"close"})])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",wd,[e.renderSlot(N.$slots,"default")]),a.isShowFooter?(e.openBlock(),e.createElementBlock("div",Cd,[a.posSubmitClose==="CloseSubmit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Qe,{label:u.value,color:"grayLight",onOnClick:T},null,8,["label"]),a.isShowSubmit?(e.openBlock(),e.createBlock(Qe,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:a.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:c.value,onOnClick:S},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):a.posSubmitClose==="SubmitClose"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.isShowSubmit?(e.openBlock(),e.createBlock(Qe,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:a.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:c.value,onOnClick:S},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(Qe,{label:u.value,color:"grayLight",onOnClick:T},null,8,["label"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock("div",Ed))]),_:3},8,["id","className","isBackClick","classTransitionEnter","classTransitionLeave","width","teleportTarget"]))}}),Bd=["id"],Ls=e.defineComponent({name:"ClNumberRoll",__name:"Index",props:{id:String,value:[String,Number],className:String,decimal:{type:Number,default:0},isThousand:{type:Boolean,default:!0},separator:{type:String,default:","},animationTime:{type:Number,default:.5}},setup(a){const l=a,o=l.id,t=e.ref("");let s=null;const i=e.computed(()=>{const d={"panel-number-roll":!0};return n.getJsonMerge(d,ue.getClassNameJson(l.className))}),u=d=>{const m=Math.max(0,Math.min(100,l.decimal)),p=l.separator,f=l.isThousand,g=d.toFixed(m).split(".");return f&&(g[0]=g[0].replace(/\B(?=(\d{3})+(?!\d))/g,()=>p)),g.join(".")},c=(d,m,p)=>{if(s!==null&&(cancelAnimationFrame(s),s=null),d===m){t.value=u(m);return}const f=performance.now(),h=p*1e3,g=S=>{const T=Math.min((S-f)/h,1),w=T===1?1:1-Math.pow(2,-10*T);t.value=u(d+(m-d)*w),T<1?s=requestAnimationFrame(g):s=null};s=requestAnimationFrame(g)},r=(d,m)=>{const p=l.animationTime,f=g=>{if(g==null||g==="")return 0;const S=Number(g);return n.isFinite(S)?S:0},h=f(d);if(p>0){const g=f(m);c(g,h,p)}else t.value=u(h)};return e.onMounted(()=>{e.nextTick(()=>{r(l.value)})}),e.onActivated(()=>{}),e.onDeactivated(()=>{s!==null&&(cancelAnimationFrame(s),s=null);const d=m=>{if(m==null||m==="")return 0;const p=Number(m);return n.isFinite(p)?p:0};t.value=u(d(l.value))}),e.onBeforeUnmount(()=>{s!==null&&(cancelAnimationFrame(s),s=null)}),e.watch(()=>l.value,(d,m)=>{d!==m&&r(d,m)}),(d,m)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(o),class:e.normalizeClass(i.value)},e.toDisplayString(t.value),11,Bd))}}),xd=["id"],Td={key:0,class:"progress"},Dd=["aria-valuenow"],Id=["aria-valuenow"],_d={class:"progress-circular-line circular-line-left"},$s=e.defineComponent({name:"ClProgress",__name:"Index",props:{id:String,className:String,ratio:{type:[Number,String],required:!0},theme:{type:String,default:"horizontal",validator:a=>["horizontal","circular"].includes(a)},color:String,isShowNum:{type:Boolean,default:!0},isAnimation:{type:Boolean,default:!0},diameter:{type:String,default:"50px"},showNumText:String,showNumPos:{type:String,default:"out-center"},showNumTrigger:{type:String,default:"hover"},showNumColor:String},setup(a){const l=a,o=l.id,t=e.useTemplateRef("refElTopParent"),s=e.useTemplateRef("refElBar"),i=e.reactive({isHorizontal:l.theme==="horizontal",isCircular:l.theme==="circular",ratioHundred:"0%",circularLeftRotate:-45,circularLeftTime:0,circularRightRotate:-45,circularRightTime:0,posText:{inOut:"out",lcr:"center",isOverflow:!1}}),u={lastRatio:"",lastRotateLeft:-45,lastRotateRight:-45,runTimeCircularRotate:null,_initVersion:0,_resizeTimer:null,resizeEvent:null},c=e.computed(()=>{let E="";const{showNumText:M}=l;if(n.isNonEmptyString(M))E=M;else{let V=i.ratioHundred;V=V.substring(0,V.length-1),E=n.getFormatThousands(V)+"%"}return E}),r=e.computed(()=>{const E={"panel-progress":!0};E[`progress-${l.theme}`]=!0;const{className:M,isShowNum:V,showNumTrigger:I}=l;return V&&I!=="none"&&(E[`progress-${I}-num`]=!0),Object.assign(E,ue.getClassNameJson(M)),E}),d=e.computed(()=>({"progress-bar":!0,"progress-bar-striped":l.isAnimation,"striped-animation":l.isAnimation})),m=e.computed(()=>{const E={};return i.isCircular&&(n.isEmpty(l.diameter)||(E.width=l.diameter,E.height=l.diameter)),E}),p=e.computed(()=>{const E={};if(E.width=i.ratioHundred,n.isEmpty(l.color)||(E["background-color"]=l.color),i.isHorizontal&&i.posText.inOut==="in"){let M="center";switch(i.posText.lcr){case"left":M="flex-start";break;case"center":M="center";break;case"right":M="flex-end";break;default:M="center";break}i.posText.isOverflow&&(M="flex-start"),E["justify-content"]=M}return E}),f=e.computed(()=>{const E={},{showNumColor:M}=l;if(n.isNonEmptyString(M)&&(E.color=M),i.isHorizontal&&i.posText.inOut==="out")switch(i.posText.lcr){case"left":E.left="0";break;case"center":break;case"right":E.right="0";break}return E}),h=e.computed(()=>{const E={};return E.transform=`rotate(${i.circularRightRotate}deg)`,i.circularRightTime>0&&(E["transition-duration"]=`${i.circularRightTime}ms`),n.isEmpty(l.color)||(E["border-bottom-color"]=l.color,E["border-right-color"]=l.color),E}),g=e.computed(()=>{const E={};return E.transform=`rotate(${i.circularLeftRotate}deg)`,i.circularLeftTime>0&&(E["transition-duration"]=`${i.circularLeftTime}ms`),n.isEmpty(l.color)||(E["border-bottom-color"]=l.color,E["border-right-color"]=l.color),E}),S=()=>{const{showNumPos:E}=l;if(n.isEmpty(E))return;const M=E.split("-");M.length===2?(i.posText.inOut=n.isExistValue(["in","out"],M[0])?M[0]:"out",i.posText.lcr=n.isExistValue(["left","center","right"],M[1])?M[1]:"center"):ve.warn("ClProgress",'showNumPos 格式无效,期望 "in/out-left/center/right",实际传入',E)},T=E=>{let M=n.isEmpty(E)?0:Number(E);if(n.isNaN(M)&&(M=0),M<=0?M=0:M>=100&&(M=100),i.ratioHundred=`${M}%`,i.isCircular){u.runTimeCircularRotate&&clearTimeout(u.runTimeCircularRotate);const V=M/100*360;let I=0,N=0;V<180?(I=V+-45,N=-45):(I=135,N=V-180-45);let x=!0;n.isEmpty(u.lastRatio)||(x=M>=Number(u.lastRatio));let D=0,O=0;const X=Math.abs(I-u.lastRotateRight),Q=Math.abs(N-u.lastRotateLeft);if(X>0||Q>0){const k=400/(X+Q);D=X*k,O=Q*k}const R=++u._initVersion;x?(i.circularRightRotate=I,i.circularRightTime=D,e.nextTick(()=>{R===u._initVersion&&(u.runTimeCircularRotate=setTimeout(()=>{i.circularLeftRotate=N,i.circularLeftTime=O},D))})):(i.circularLeftRotate=N,i.circularLeftTime=O,e.nextTick(()=>{R===u._initVersion&&(u.runTimeCircularRotate=setTimeout(()=>{i.circularRightRotate=I,i.circularRightTime=D},O))})),u.lastRotateRight=I,u.lastRotateLeft=N}u.lastRatio=String(M)},w=()=>{S(),T(l.ratio),s.value&&(u.resizeEvent=new ut({element:s.value,callback:()=>{u._resizeTimer&&clearTimeout(u._resizeTimer),u._resizeTimer=setTimeout(()=>{if(l.isShowNum&&i.isHorizontal&&i.posText.inOut==="in"&&t.value){const E=t.value.querySelector(".progress-bar"),M=t.value.querySelector(".progress-num");if(E&&M){const V=E.clientWidth,I=M.clientWidth;let N=!1;V===0&&I===0?N=!1:V===0&&I>0?N=!0:N=V>0&&I>V,i.posText.isOverflow=N}}},150)}}))};return e.onMounted(()=>{e.nextTick(()=>{w()})}),e.onUnmounted(()=>{u._resizeTimer&&clearTimeout(u._resizeTimer),u.runTimeCircularRotate&&clearTimeout(u.runTimeCircularRotate),u.resizeEvent&&u.resizeEvent.destroy()}),e.watch(()=>l.ratio,(E,M)=>{E!==M&&T(E)}),(E,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:e.unref(o),class:e.normalizeClass(r.value),style:e.normalizeStyle(m.value)},[i.isHorizontal?(e.openBlock(),e.createElementBlock("div",Td,[e.createElementVNode("div",{ref_key:"refElBar",ref:s,class:e.normalizeClass(d.value),style:e.normalizeStyle(p.value),role:"progressbar","aria-valuenow":Number(i.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[a.isShowNum&&i.posText.inOut==="in"?(e.openBlock(),e.createElementBlock("span",{key:0,class:"progress-num",style:e.normalizeStyle(f.value)},e.toDisplayString(c.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,Dd)])):i.isCircular?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"progress-circular-line circular-line-right",role:"progressbar","aria-valuenow":Number(i.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(h.value)},null,4)],8,Id),e.createElementVNode("div",_d,[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(g.value)},null,4)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),a.isShowNum&&i.posText.inOut==="out"?(e.openBlock(),e.createElementBlock("span",{key:3,class:"progress-num",style:e.normalizeStyle(f.value)},e.toDisplayString(c.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],14,xd))}}),Nd=["id"],Vd={key:0,class:"cl-plaintext-value"},Md=["id","name","value","disabled","checked","onClick"],Od=["for"],Ld={key:0},Sa=e.defineComponent({name:"ClRadio",directives:{cltooltip:dt},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:[String,Number],required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:a=>["tooltip","clickCallback"].includes(a)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`rd-${n.getRandom(8)}`,u=n.isEmpty(t.name)?i+"_name":t.name,c=t.id,r=e.ref(t.value?.toString()||"");let d={};const m=e.ref(0),p=e.ref(!1),f={isProcessing:!1,_initEmitted:!1},h=e.computed(()=>t.isPlaintext?[]:t.list),g=e.computed(()=>{t.list,m.value;const b=r.value;if(n.isEmpty(b))return"";const v=n.isExistJsonKey(d,b)?d[b]:void 0;return v&&n.isNonEmptyString(v.name)?v.name:b}),S=e.computed(()=>n.getJsonMerge({"panel-radio":!0},ue.getClassNameJson(t.className))),T=e.computed(()=>{const b={radio:!0,"radio-default":!0};return b["radio-inline"]=t.isInline??!0,b}),w=b=>{s("update:value",b),s("update:modelValue",b)},E=b=>{const v=b.id?.toString()??"";w(v),s("onChange",v,n.getJsonClone(b))},M=()=>{f._initEmitted||(f._initEmitted=!0,e.nextTick(()=>{s("onInit")}))},V=b=>{const v={},{width:_}=t;return b&&!n.isEmpty(b.width)?v.width=b.width:n.isEmpty(_)||(v.width=t.width),v},I=()=>n.isExistJsonKey(d,r.value)?r.value:"",N=b=>{d=n.isEmpty(b)?{}:n.getJsonByList(b),m.value+=1},x=()=>{if(p.value){const b=n.isEmpty(r.value)?"":r.value;n.isExistJsonKey(d,b)||(r.value="",w(""))}},L=b=>{b!==r.value&&(r.value=b?.toString()||"")},D=()=>{p.value=t.list.length!==0,N(t.list),x()};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.onBeforeUnmount(()=>{d={},p.value=!1,f._initEmitted=!1}),e.watch(p,b=>{b&&M()}),e.watch(()=>t.list,b=>{p.value||(p.value=!0,b.length===0&&x(),M())},{deep:!0}),e.watch([()=>t.value,()=>t.list],([b,v])=>{const _=v||[];!p.value&&_.length>0&&(p.value=!0,M()),N(_),L(b),x()},{deep:!0});const O=b=>{s("onTipClick",b)},X=async b=>{if(!(!b||b.isDisabled||t.disabled||f.isProcessing)&&!n.isEmpty(b.id)){f.isProcessing=!0;try{const v=String(b.id??"");if(v===r.value)return;let _=!0;if(t.checkChangeBefore)try{_=await t.checkChangeBefore(v),_=n.isBoolean(_)?_:!0}catch{_=!1}if(t.disabled||b.isDisabled)return;_&&(r.value=v,E(b))}catch(v){s("onError",v)}finally{f.isProcessing=!1}}},Q=()=>I();return l({getValue:Q,getValueData:()=>{const b=Q();return n.isExistJsonKey(d,b)?n.getJsonClone(d[b]):{}},setValue:b=>{f.isProcessing||(L(b),x())},runInitComplete:()=>{p.value||(p.value=!0,N(t.list),L(t.value),x(),M())}}),(b,v)=>{const _=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(S.value),id:e.unref(c)},[a.isPlaintext?(e.openBlock(),e.createElementBlock("div",Vd,e.toDisplayString(g.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(y,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${i}-${y.id??""}-${B}`},[y&&(y.isShow||y.isShow===void 0)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(T.value),style:e.normalizeStyle(V(y))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:`${i}_${e.unref(u)}_${y.id??""}`,name:e.unref(u),value:y.id??"",disabled:y.isDisabled||a.disabled,checked:(y.id?.toString()??"")===r.value,onClick:A=>X(y)},null,8,Md),e.createElementVNode("label",{for:`${i}_${e.unref(u)}_${y.id??""}`},[e.renderSlot(b.$slots,"default",{data:y},()=>[y.icon&&y.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Ld,[e.createVNode(fe,{name:y.icon},null,8,["name"])])),[[_,{html:y.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(y.name),1)],64))])],8,Od)]),y.tipMsg&&y.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:e.unref(n).isNonEmptyString(y.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(y.tipIcon)?y.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[_,{html:y.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(fe,{key:1,name:e.unref(n).isNonEmptyString(y.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(y.tipIcon)?y.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(A=>O(y),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,Nd)}}}),$d=["id"],Ad=["id","name","checked","disabled"],Fd=["for"],Pd={key:0},ba=e.defineComponent({name:"ClRadioOne",directives:{cltooltip:dt},__name:"One",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},forId:{type:String,default:""},label:{type:String,default:""},icon:{type:String,default:""},tipMsg:{type:String,default:""},tipIcon:{type:String,default:""},tipMode:{type:String,default:"tooltip",validator:a=>["tooltip","clickCallback"].includes(a)}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:a=>!0,onTipClick:()=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.computed(()=>n.isEmpty(o.forId)?`rd_${o.name||""}_${n.getRandom(8)}`:o.forId),u=e.computed(()=>{const m={"panel-radio-one":!0,radio:!0,"radio-default":!0,"radio-inline":!0};return n.getJsonMerge(m,ue.getClassNameJson(o.className))}),c=m=>{t("update:value",m),t("update:modelValue",m),t("onChange",m)},r=()=>{t("onTipClick")},d=m=>{const p=m.currentTarget;p&&p.checked&&c(!0)};return(m,p)=>{const f=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),id:e.unref(s)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:i.value,name:a.name,checked:a.value,disabled:a.disabled,onClick:d},null,8,Ad),e.createElementVNode("label",{for:i.value},[a.icon&&a.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Pd,[e.createVNode(fe,{name:a.icon},null,8,["name"])])),[[f,{html:a.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.label),1)],64))],8,Fd)]),a.tipMsg&&a.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:e.unref(n).isNonEmptyString(o.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(o.tipIcon)?o.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[f,{html:a.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(fe,{key:1,name:e.unref(n).isNonEmptyString(o.tipIcon)?void 0:"question-circle",className:e.unref(n).isNonEmptyString(o.tipIcon)?o.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(r,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,$d)}}}),Rd=["id"],Hd=e.defineComponent({name:"ClSliderBar",__name:"Bar",props:{id:String,className:String,left:{type:Number,default:0},width:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1}},emits:{onMoveStart:()=>!0,onMoveIng:a=>!0,onMoveEnd:()=>!0,onMouseover:()=>!0,onMouseout:()=>!0,onClick:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=e.inject("$SliderTop"),i=e.useTemplateRef("refElBar"),u=o.id,c=e.reactive({left:o.left}),r=e.reactive({isClick:!1,isDragging:!1,dragStart:0,dragStartRatio:0}),d=e.ref(null),m=e.computed(()=>{let M={"slider-bar":!0,"slider-bar-drag":o.isBarDrag};return M=n.getJsonMerge(M,ue.getClassNameJson(o.className)),M}),p=e.computed(()=>{const M={};return o.isVertical?(M.bottom=`${c.left}%`,M.height=`${o.width}%`):(M.left=`${c.left}%`,M.width=`${o.width}%`),M}),f=(M,V)=>{V&&(r.isClick=!0,r.isDragging=!1,r.dragStart=o.isVertical?V.clientY:V.clientX,r.dragStartRatio=o.left,t("onMoveStart"))},h=(M,V)=>{if(!s||!V)return;r.isClick=!1,r.isDragging=!0;let I=0;o.isVertical?I=r.dragStart-V.clientY:I=V.clientX-r.dragStart;const N=s.getDragValueInfo(I,r.dragStartRatio);c.left=N.ratio,t("onMoveIng",N.ratio)},g=M=>{r.isClick?t("onClick",M):t("onMoveEnd"),r.isClick=!1,r.isDragging=!1},S=()=>{if(!i.value)return;const M={start(V,I){let N=!1;return!o.disabled&&o.isBarDrag&&V.buttons===1&&(N=!0,f(V,I)),N},ing:(V,I)=>{h(V,I)},end:V=>{g(V)}};d.value=new Tt(i.value,M)};e.onMounted(()=>{e.nextTick(()=>{S()})}),e.onBeforeUnmount(()=>{d.value&&(d.value.end(),d.value=null)}),e.watch(()=>o.left,(M,V)=>{M!==V&&M!==c.left&&(c.left=M)});const T=M=>{!o.disabled&&!o.isBarDrag&&t("onClick",M)},w=()=>{t("onMouseover")},E=()=>{r.isDragging||t("onMouseout")};return(M,V)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElBar",ref:i,id:e.unref(u),class:e.normalizeClass(m.value),style:e.normalizeStyle(p.value),onMouseover:w,onMouseout:E,onClick:T},null,46,Rd))}}),zd=["id"],Ro=e.defineComponent({name:"ClSliderButton",__name:"Button",props:{id:String,value:[String,Number],className:String,ratio:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},tooltipFormat:String},emits:{onMoveIng:a=>!0,onMoveEnd:a=>!0,onDblClick:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.inject("$SliderTop"),u=dt,c=e.useTemplateRef("refElButton"),r=t.id,d=e.reactive({isHover:!1,ratio:t.ratio,value:t.value}),m=e.reactive({dragStart:0,dragStartRatio:0,isMoveIng:!1}),p=e.ref(null),f=e.computed(()=>{let k=d.value;if(k!=null){const b=t.tooltipFormat;k=n.getFormatThousands(k.toString()),n.isNonEmptyString(b)&&(k=n.convertStringFormat(b,{_value:k}))}return k??""}),h=e.computed(()=>t.isVertical?"right":"top"),g=e.computed(()=>{let k={"slider-button":!0,hover:d.isHover};return k=n.getJsonMerge(k,ue.getClassNameJson(t.className)),k}),S=e.computed(()=>{const k={},b=d.ratio;return t.isVertical?k.bottom=`${n.isFinite(b)?b:0}%`:k.left=`${n.isFinite(b)?b:0}%`,k}),T=()=>{c.value&&ta.show(c.value)},w=()=>{c.value&&ta.hide(c.value)},E=(k,b)=>{if(!i||!b)return{ratio:d.ratio,value:d.value};let v=0;t.isVertical?v=m.dragStart-b.clientY:v=b.clientX-m.dragStart;const _=i.getDragValueInfo(v,m.dragStartRatio);return d.ratio=_.ratio,d.value=_.value,_},M=(k,b)=>{b&&(m.dragStart=t.isVertical?b.clientY:b.clientX,m.dragStartRatio=t.ratio)},V=(k,b)=>{const v=E(k,b);T(),s("onMoveIng",{value:v.ratio,runType:"drag"})},I=(k,b)=>{E(k,b),d.isHover||c.value===k.target||c.value?.contains(k.target)||w(),s("onMoveEnd",{runType:"drag"})},N=k=>{if(!i)return;m.isMoveIng=!0;const b=i.getButtonMoveValueInfo(k,t.ratio);d.ratio=b.ratio,d.value=b.value,s("onMoveIng",{value:b.ratio,runType:"keydown"})},x=()=>{if(!c.value)return;const k={start(b,v){let _=!1;return!t.disabled&&b.buttons===1&&(_=!0,M(b,v)),_},ing:(b,v)=>{V(b,v)},end:(b,v)=>{I(b,v)}};p.value=new Tt(c.value,k)};e.onMounted(()=>{e.nextTick(()=>{x()})}),e.onBeforeUnmount(()=>{p.value&&(p.value.end(),p.value=null),m.isMoveIng=!1}),e.watch(()=>t.value,(k,b)=>{k!==b&&k!==d.value&&(d.value=k)}),e.watch(()=>t.ratio,(k,b)=>{k!==b&&k!==d.ratio&&(d.ratio=k)});const L=k=>{t.disabled||(k.preventDefault(),k.stopPropagation(),N("left"))},D=k=>{t.disabled||(k.preventDefault(),k.stopPropagation(),N("right"))},O=()=>{t.disabled||(d.isHover=!0)},X=()=>{t.disabled||(d.isHover=!1,m.isMoveIng&&(m.isMoveIng=!1,s("onMoveEnd",{runType:"keydown"})))},Q=()=>{t.disabled||s("onDblClick")};return l({showTooltip:()=>{T()},hideTooltip:()=>{w()}}),(k,b)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElButton",ref:c,id:e.unref(r),class:e.normalizeClass(g.value),style:e.normalizeStyle(S.value),tabindex:"0",onDblclick:Q,onFocus:O,onBlur:X,onKeydown:[e.withKeys(L,["down"]),e.withKeys(D,["up"]),e.withKeys(L,["left"]),e.withKeys(D,["right"])]},[...b[0]||(b[0]=[e.createElementVNode("div",{class:"slider-button-icon"},null,-1)])],46,zd)),[[e.unref(u),{trigger:["hover","focus"],position:h.value,html:f.value,updRefreshInx:d.ratio},void 0,{black:!0}]])}}),Ud=["id"],Jd=e.defineComponent({name:"ClSliderDot",__name:"Dot",props:{id:String,className:String,itemInfo:{type:Object,default:()=>({})},isHover:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!0},tooltipFormat:String},emits:{onMouseover:()=>!0,onMouseout:()=>!0,onClick:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=dt,u=e.computed(()=>o.isVertical?"right":"top"),c=e.computed(()=>{const h=o.itemInfo.value;if(h!=null){let g=n.getFormatThousands(h.toString());const S=o.tooltipFormat;return n.isNonEmptyString(S)&&(g=n.convertStringFormat(S,{_value:g})),g}return""}),r=e.computed(()=>{let h={"slider-dot":!0,"slider-dot-active":o.itemInfo.isActive??!1,"slider-dot-hide":o.itemInfo.isHide??!1,hover:o.isHover};return h=n.getJsonMerge(h,ue.getClassNameJson(o.className)),h}),d=e.computed(()=>{const h={},g=o.itemInfo.ratio;return g!=null&&(o.isVertical?h.bottom=`${g}%`:h.left=`${g}%`),h}),m=()=>{t("onMouseover")},p=()=>{t("onMouseout")},f=()=>{t("onClick")};return(h,g)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value),onMouseover:m,onMouseout:p,onClick:f},[...g[0]||(g[0]=[e.createElementVNode("div",{class:"slider-dot-icon"},null,-1)])],46,Ud)),[[e.unref(i),{init:a.isTooltip,position:u.value,html:c.value},void 0,{black:!0,hover:!0}]])}}),Kd=["id"],Wd=["id"],jd={class:"slider-container"},Yd={key:2,class:"slider-dots"},qd={key:0,class:"slider-marks"},Xd=["innerHTML","onMouseover"],wa=e.defineComponent({name:"ClSlider",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},value:[String,Number],min:{type:Number,default:0},max:{type:Number,default:100},isRange:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1},splitNumber:{type:Number,default:0},isShowDot:{type:Boolean,default:!0},isShowDotActive:{type:Boolean,default:!0},marks:{type:Array,default:()=>[]},isVertical:{type:Boolean,default:!1},verticalHeight:String,size:{type:String,default:"large"},numType:{type:String,default:"int",validator:a=>["int","float2","float3"].indexOf(a)>-1},tooltipFormat:String,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:" - "}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l)=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=`slider-${n.getRandom(5)}`,u=e.useTemplateRef("refElTrack"),c=e.useTemplateRef("refBtnStart"),r=e.useTemplateRef("refBtnEnd"),d=t.id,m=e.reactive({track:void 0,bar:void 0,btnStart:void 0,btnEnd:void 0,dots:void 0,marks:void 0});n.isNonEmptyString(d)&&(m.track=`${d}-track`,m.bar=`${d}-bar`,m.btnStart=`${d}-btn-start`,m.btnEnd=`${d}-btn-end`,m.dots=`${d}-dots`,m.marks=`${d}-marks`);const p=e.reactive({markHoverIndex:-1}),f=e.reactive({left:0,width:0}),h=e.reactive({start:t.min,end:t.min,startRatio:0,endRatio:0}),g=G=>{const ne=t.tooltipFormat;return n.isNonEmptyString(ne)?n.convertStringFormat(ne,{_value:G}):G.toString()},S=e.computed(()=>{if(!t.isRange)return g(h.end);const G=n.isString(t.plaintextSeparator)?t.plaintextSeparator:" - ";return`${g(h.start)}${G}${g(h.end)}`}),T=e.ref([]),w=e.ref([]),E=e.computed(()=>Math.abs(t.max-t.min)),M=e.computed(()=>t.marks.length>0),V=e.computed(()=>{const{isRange:G,isBarDrag:ne}=t;let j=!1;return G&&(j=ne),j}),I=e.computed(()=>{let G={"panel-slider":!0,"slider-disabled":t.disabled,"slider-vertical":t.isVertical,"slider-level":!t.isVertical},ne=t.size;return n.isEmpty(ne)&&(ne="large"),G[`slider-${ne}`]=!0,G=n.getJsonMerge(G,ue.getClassNameJson(t.className)),G}),N=e.computed(()=>{const G={};return t.isVertical&&n.isNonEmptyString(t.verticalHeight)&&(G.height=t.verticalHeight),G}),x=(G,ne=2)=>n.isFinite(G)?Number((G*100).toFixed(ne)):0,L=G=>{const ne=E.value;return ne>0?x((G-t.min)/ne):0},D=G=>{let ne=0;if(G<=0)ne=t.min;else if(G>=100)ne=t.max;else{const{numType:j}=t,re=E.value*G/100,pe=n.getValueByFormat(re.toString(),j,{isThousands:!1});if(ne=t.min+Number(pe),n.isExistValue(["float2","float3"],j)){const ie=Number(j.replace("float","")),se=ne.toString();n.isExistValue(se,".")&&se.split(".")[1].length>ie&&(ne=Number(ne.toFixed(ie)))}}return ne},O=G=>{let ne=Number(G),j=!0;return n.isFinite(ne)?ne<=t.min?(ne=t.min,j=!1):ne>=t.max&&(ne=t.max,j=!1):(ne=t.min,j=!1),{value:ne,check:j}},X=()=>{if(M.value){const G=[];t.marks.forEach(ne=>{if(!ne)return;const j=n.getJsonClone(ne);j.value=Number(j.value),n.isFinite(j.value)&&(j.ratio=L(j.value),n.isString(j.mark)?j.safeMark=n.isHtml(j.mark)?n.encodeHTML(j.mark):j.mark:j.safeMark="",G.push(j))}),G.sort((ne,j)=>ne.value-j.value),w.value=G}},Q=()=>{const G=[];if(M.value)w.value.forEach(ne=>{G.push({ratio:ne.ratio,value:ne.value,isActive:!1,isHide:!1})});else if(t.splitNumber>1){const ne=100/t.splitNumber,j=ne/2;for(let te=1;te<t.splitNumber;te++){const re=ne*te,pe=D(re);G.push({value:pe,ratio:x(re/100),isActive:!1,isHide:!1,left:x((re-j)/100),right:x((re+j)/100)})}}T.value=G},R=()=>{if(T.value.length>0){const{isShowDot:G,isShowDotActive:ne,min:j,max:te}=t,re=M.value,pe=f.left,ie=pe+f.width,se=[];T.value.forEach(K=>{const le=n.getJsonClone(K),de=K.ratio>=pe&&K.ratio<=ie;le.isActive=de;let me=!1;re?me=!0:G?(me=!0,de&&(ne?me=!0:me=!1)):me=!1,(K.value===j||K.value===te)&&(me=!1),le.isHide=!me,se.push(le)}),T.value=se}},C=G=>{const ne=G.startRatio>G.endRatio?G.endRatio:G.startRatio,j=Math.abs(G.endRatio-G.startRatio);f.left=ne,f.width=j},k=G=>{e.nextTick(()=>{t.isRange?G?(c.value?.showTooltip(),r.value?.showTooltip()):(c.value?.hideTooltip(),r.value?.hideTooltip()):G?r.value?.showTooltip():r.value?.hideTooltip()})},b=G=>{C(G),h.start=G.start,h.end=G.end,h.startRatio=G.startRatio,h.endRatio=G.endRatio,R()},v=G=>{let ne,j;if(G&&!n.isEmpty(G)){const pe=G.toString();if(pe==="")ne=t.min,j=t.min;else{const ie=pe.split(","),se=O(ie[0]);if(t.isRange){if(ne=se.value,j=ne,ie.length>1){const K=O(ie[1]);K.value>ne&&(j=K.value)}}else ne=t.min,j=se.value}}else ne=t.min,j=t.min;const te=L(ne),re=L(j);b({start:ne,end:j,startRatio:te,endRatio:re})},_=G=>{if(!n.isFinite(G))return 0;let ne=x(G);const j=T.value;if(!M.value&&j.length>0){if(ne<j[0].left)ne=0;else if(ne>j[j.length-1].right)ne=100;else for(let te=0;te<j.length;te++)if(ne>=j[te].left&&ne<=j[te].right){ne=j[te].ratio;break}}return ne},y=G=>{const ne=_(G),j=D(ne);let{start:te,startRatio:re,end:pe,endRatio:ie}=h,se="";if(t.isRange)if(ne<=re)se="start";else if(ne>=ie)se="end";else{const K=(ie-re)/2;ne>re&&ne<=re+K?se="start":ne>=ie-K&&ne<ie&&(se="end")}else se="end";switch(se){case"start":te=j,re=ne;break;case"end":pe=j,ie=ne;break}return{start:te,end:pe,startRatio:re,endRatio:ie}},B=G=>{const ne=G?.start??h.start,j=G?.end??h.end;let te=ne,re=j;te>re&&(te=j,re=ne);const pe=t.isRange?`${te},${re}`:re.toString();s("update:value",pe),s("update:modelValue",pe),s("onChange",pe,{start:te,end:re})},A=G=>{if(!G)return{};const ne={};return t.isVertical?ne.bottom=`${G.ratio}%`:ne.left=`${G.ratio}%`,n.isEmpty(G.color)||(ne.color=G.color),ne},F=()=>{X(),Q(),v(t.value)};e.onMounted(()=>{e.nextTick(()=>{F()})}),e.watch(()=>t.value,(G,ne)=>{if(G!==ne){let j=!0;const te=G!=null?G.toString():"";if(te==="")j=!0;else{const re=te.split(","),pe=Number(re[0]);if(t.isRange){const ie=re.length>1?Number(re[1]):pe;(pe===h.start&&ie===h.end||pe===h.end&&ie===h.start)&&(j=!1)}else j=pe!==h.end}j&&v(G)}},{immediate:!0}),e.watch(()=>t.marks,()=>{X(),Q()});const P=G=>{if(!t.disabled&&G){G.preventDefault(),G.stopPropagation();const ne=u.value;if(!ne)return;const j=ne.getBoundingClientRect(),te=t.isVertical?(j.bottom-G.clientY)/ne.clientHeight:(G.clientX-j.left)/ne.clientWidth;if(!n.isFinite(te))return;const re=y(te);b(re),B(re)}},H=(G,ne)=>{let{startRatio:j,endRatio:te}=h;const re=G.value;ne==="start"?(j=re,h.start=D(re),h.startRatio=re):(te=re,h.end=D(re),h.endRatio=re),C({startRatio:j,endRatio:te}),R(),G.runType==="keydown"&&B()},$=G=>{const{left:ne,width:j}=f,te={startRatio:ne,endRatio:ne+j};te.start=D(te.startRatio),te.end=D(te.endRatio),b(te),G.runType==="drag"&&B(te)},z=G=>{if(t.isRange){let{start:ne,startRatio:j,end:te,endRatio:re}=h;G==="start"?(re=j,te=ne):(j=re,ne=te);const pe={start:ne,startRatio:j,end:te,endRatio:re};b(pe),B(pe)}},oe=()=>{k(!0)},Z=G=>{const ne=G;h.start=D(G),h.startRatio=G;const j=G+f.width;h.end=D(j),h.endRatio=j,C({startRatio:ne,endRatio:j}),R(),k(!0)},W=()=>{B(),k(!1)},Y=()=>{k(!0)},q=()=>{k(!1)},J=G=>{M.value&&(p.markHoverIndex=G)},U=()=>{p.markHoverIndex=-1},ae=()=>t.isRange?`${h.start},${h.end}`:h.end.toString();return l({getValue:ae,getValueData:()=>({value:ae(),show:ae()})}),e.provide("$SliderTop",{getDragValueInfo:(G,ne)=>{const j=u.value;if(!j)return{ratio:ne/100,value:D(ne/100)};const te=t.isVertical?j.clientHeight:j.clientWidth;if(te<=0)return{ratio:ne/100,value:D(ne/100)};const re=G/te;let pe=ne/100+re;pe>=1?pe=1:pe<=0&&(pe=0),pe=_(pe);const ie=D(pe);return{ratio:pe,value:ie}},getButtonMoveValueInfo:(G,ne)=>{const j=G==="left"?-1:1,te=Number(ne);let re;const pe=T.value,ie=pe.length;if(!M.value&&ie>0){let K=-1;if(te<pe[0].ratio)K=-1;else if(te>pe[ie-1].ratio)K=ie;else for(let de=0;de<ie;de++)if(te>=pe[de].ratio&&de+1<ie&&te<pe[de+1].ratio){K=de;break}const le=K+j;le<0?re=0:le>=ie?re=100:re=pe[le].ratio}else re=te+j;re>=100?re=100:re<=0&&(re=0);const se=D(re);return{ratio:re,value:se}}}),(G,ne)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:"cl-plaintext-value"},e.toDisplayString(S.value),9,Kd)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(d),class:e.normalizeClass(I.value),style:e.normalizeStyle(N.value)},[e.createElementVNode("div",jd,[e.createElementVNode("div",{ref_key:"refElTrack",ref:u,class:"slider-track",onClick:P},null,512),e.createVNode(Hd,{id:m.bar,disabled:a.disabled,isVertical:a.isVertical,isBarDrag:V.value,left:f.left,width:f.width,onOnMoveStart:oe,onOnMoveIng:Z,onOnMoveEnd:W,onOnClick:P,onOnMouseover:Y,onOnMouseout:q},null,8,["id","disabled","isVertical","isBarDrag","left","width"]),a.isRange?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Ro,{ref_key:"refBtnStart",ref:c,id:m.btnStart,disabled:a.disabled,isVertical:a.isVertical,value:h.start,ratio:h.startRatio,tooltipFormat:a.tooltipFormat,onOnMoveIng:ne[0]||(ne[0]=j=>H(j,"start")),onOnMoveEnd:$,onOnDblClick:ne[1]||(ne[1]=j=>z("start"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat"]),e.createVNode(Ro,{ref_key:"refBtnEnd",ref:r,id:m.btnEnd,disabled:a.disabled,isVertical:a.isVertical,value:h.end,ratio:h.endRatio,tooltipFormat:a.tooltipFormat,onOnMoveIng:ne[2]||(ne[2]=j=>H(j,"end")),onOnMoveEnd:$,onOnDblClick:ne[3]||(ne[3]=j=>z("end"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat"])],64)):(e.openBlock(),e.createBlock(Ro,{key:1,ref_key:"refBtnEnd",ref:r,id:m.btnEnd,disabled:a.disabled,isVertical:a.isVertical,value:h.end,ratio:h.endRatio,tooltipFormat:a.tooltipFormat,onOnMoveIng:ne[4]||(ne[4]=j=>H(j,"end")),onOnMoveEnd:$},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat"])),T.value.length>0?(e.openBlock(),e.createElementBlock("div",Yd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(j,te)=>(e.openBlock(),e.createBlock(Jd,{key:`${i}-dot-${te}`,id:m.dots?`${m.dots}-${te}`:void 0,isVertical:a.isVertical,itemInfo:j,isHover:p.markHoverIndex===te,isTooltip:!M.value,tooltipFormat:a.tooltipFormat,onOnMouseover:re=>J(te),onOnMouseout:U,onOnClick:P},null,8,["id","isVertical","itemInfo","isHover","isTooltip","tooltipFormat","onOnMouseover"]))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),M.value?(e.openBlock(),e.createElementBlock("div",qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(j,te)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-mark-${te}`,class:e.normalizeClass({"slider-mark":!0,hover:p.markHoverIndex===te}),style:e.normalizeStyle(A(j)),innerHTML:j.safeMark,onMouseover:re=>J(te),onMouseout:U},null,46,Xd))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,Wd))}}),Gd=["id"],Qd=["id"],Zd=["name","checked"],em=["aria-checked"],tm={key:0,class:"switchery-txt"},nm=["innerHTML"],om=["innerHTML"],am={key:0,class:"switchery-load-bg"},lm=22,sm=40,As=e.defineComponent({name:"ClSwitchery",__name:"Index",props:{id:String,name:String,value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},color:{type:[String,Object],validator:a=>n.isObject(a)?!!(a.checked||a.unChecked):n.isString(a)},isUseOnChangeCheck:{type:Boolean,default:!1},isShowLoad:{type:Boolean,default:!0},activeHtml:String,inactiveHtml:String,changeCallback:Function,isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useAttrs(),u=t.id,c=e.useTemplateRef("refElContainer");let r=!1,d=null;const m=e.reactive({isFirstComplete:!1,isOpen:t.value,buttonLeft:0,isRunLoad:!1,colorChecked:"var(--cl-primary, #2196f3)",colorUnChecked:"var(--cl-bg, #ffffff)",txtWidth:0}),p=e.computed(()=>{let C=t.name;return n.isEmpty(C)&&(C=`switchery_${n.getRandom(8)}`),C}),f=e.computed(()=>{const C=m.isOpen?t.activeHtml:t.inactiveHtml;return n.isNonEmptyString(C)?n.removeHTMLTags(C):m.isOpen?"是":"否"}),h=e.computed(()=>{const{colorChecked:C}=m;let k="";const b=t.color;if(n.isUndefined(b))k=C;else if(n.isString(b))k=b;else if(n.isObject(b)){const v=b;k=n.isExistJsonKey(v,"checked")?v.checked:C}return k}),g=e.computed(()=>{const{colorUnChecked:C}=m;let k="";const b=t.color;return n.isObject(b)&&n.isExistJsonKey(b,"unChecked")?k=b.unChecked||C:k=C,k}),S=e.computed(()=>{const C=ue.getClassNameJson(t.className),k={"panel-switchery":!0,"switchery-transition-immediately":!m.isFirstComplete};return n.getJsonMerge(k,C)}),T=e.computed(()=>!n.isEmpty(t.activeHtml)||!n.isEmpty(t.inactiveHtml)),w=e.computed(()=>({"switchery-container":!0,"switchery-open":m.isOpen,"switchery-disabled":t.disabled,"switchery-has-txt":T.value})),E=e.computed(()=>{const C=m.isOpen,k=C?h.value:g.value,b={"background-color":k};return m.txtWidth>0&&(b.width=`${m.txtWidth}px`),b.transition=C?"border 0.4s, box-shadow 0.4s, background-color 1.2s":"border 0.4s, box-shadow 0.4s",b["box-shadow"]=C?`${k} 0px 0px 0px 11px inset`:`${k} 0px 0px 0px 0px inset`,(C||n.isObject(t.color)&&n.isExistJsonKey(t.color,"unChecked"))&&(b["border-color"]=k),b}),M=e.computed(()=>{const C={left:"0"};return m.isOpen&&(C.left=`${m.buttonLeft}px`),C}),V=C=>{const k=ue.getElementData(i);s("update:value",C),s("update:modelValue",C),s("onChange",C,k)},I=()=>{const C=ct("switchery");C&&(n.isExistJsonKey(C,"colorChecked")&&(m.colorChecked=C.colorChecked),n.isExistJsonKey(C,"colorUnChecked")&&(m.colorUnChecked=C.colorUnChecked))},N=()=>{if(!c.value)return;const C=c.value.clientWidth,k=c.value.querySelector(".switchery-button");if(!k)return;const b=k.clientWidth;m.buttonLeft=C===0?22:C-b},x=(C,k)=>{if(n.isEmpty(C))return 0;const b=k.querySelector(".switchery-txt > span"),v=document.createElement("span");if(v.style.position="absolute",v.style.visibility="hidden",v.style.left="-9999px",v.style.top="0",v.style.display="inline-block",v.style.whiteSpace="nowrap",b){const y=getComputedStyle(b);v.style.font=y.font,v.style.letterSpacing=y.letterSpacing}v.innerHTML=C,document.body.appendChild(v);const _=v.scrollWidth;return v.remove(),_},L=()=>{if(!T.value||!c.value){m.txtWidth=0;return}const C=c.value,k=x(t.activeHtml||"",C),b=x(t.inactiveHtml||"",C),v=Math.max(k,b);if(v===0){m.txtWidth=0;return}m.txtWidth=Math.max(v+lm+2,sm)},D=()=>{I(),L(),e.nextTick(()=>{N()}),d=setTimeout(()=>{m.isFirstComplete=!0},250)};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.onBeforeUnmount(()=>{d&&(clearTimeout(d),d=null)}),e.watch(()=>t.value,C=>{m.isOpen=C}),e.watch(()=>[t.activeHtml,t.inactiveHtml],()=>{e.nextTick(()=>{L(),N()})});const O=async()=>{if(t.disabled||r)return;N();const C=!m.isOpen;if(t.changeCallback&&n.isFunction(t.changeCallback)){r=!0,m.isRunLoad=!0;const k=ue.getElementData(i);try{const b=await t.changeCallback(C,k);let v=!1;n.isBoolean(b)?v=b:n.isObject(b)&&n.isBoolean(b.success)&&(v=b.success),v&&(m.isOpen=C)}catch{s("onError","回调changeCallback执行异常")}finally{m.isRunLoad=!1,r=!1}}else t.isUseOnChangeCheck?m.isRunLoad=!0:m.isOpen=C,V(C)};return l({getValue:()=>m.isOpen,setValue:(C,k=!1)=>{m.isOpen=C,k&&V(C)},setOnChangeResult:()=>{t.isUseOnChangeCheck&&n.isUndefined(t.changeCallback)&&(m.isOpen=!m.isOpen,m.isRunLoad=!1,r=!1)}}),(C,k)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(u),class:"cl-plaintext-value"},e.toDisplayString(f.value),9,Gd)):(e.openBlock(),e.createElementBlock("label",{key:1,id:e.unref(u),class:e.normalizeClass(S.value)},[e.createElementVNode("input",{type:"checkbox",class:"switchery-input",name:p.value,checked:m.isOpen},null,8,Zd),e.createElementVNode("span",{class:e.normalizeClass(w.value),style:e.normalizeStyle(E.value),onClick:O,ref_key:"refElContainer",ref:c,role:"switch","aria-checked":m.isOpen,tabindex:"0"},[a.activeHtml||a.inactiveHtml?(e.openBlock(),e.createElementBlock("span",tm,[m.isOpen?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:a.activeHtml},null,8,nm)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:a.inactiveHtml},null,8,om))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"switchery-button",style:e.normalizeStyle(M.value)},[a.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createBlock(He,{key:0,theme:"rotaryLine",size:"xs"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4)],14,em),a.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createElementBlock("div",am)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Qd))}}),im=["id"],rm=["onClick"],cm=["innerHTML"],um={key:1},co=e.defineComponent({name:"ClTags",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isRemove:{type:Boolean,default:!0},showTextFormat:String,isRemoveAll:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:a=>["default","code"].indexOf(a)!==-1},isFormatHtml:{type:Boolean,default:!1}},emits:["onRemove","onClickTag"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`tags-${n.getRandom(5)}`,u=t.id,c=e.ref(t.disabled),r=e.ref([]),d=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))",hID:""}),m=e.computed(()=>{const{theme:Q}=t;let R={"panel-tags":!0};Q!=="default"&&(R[`tags-${Q}`]=!0),t.isRemoveAll&&r.value.length>0&&(R["tags-region"]=!0);const C=ue.getClassNameJson(t.className);return R=n.getJsonMerge(R,C),R}),p=Q=>n.isEmpty(Q)?"":n.isEmpty(t.showTextFormat)?n.isNonEmptyString(Q.name)?Q.name:"":n.convertStringFormatEncodeHTML(t.showTextFormat,Q),f=Q=>{if(n.isEmpty(Q))return{};const{theme:R}=t;let C={};return R==="default"?(C={tag:!0,"tag-disabled":!!Q.isShowDisabled,"tag-remove":t.isRemove&&!Q.isShowDisabled},(n.isNonEmptyString(Q.id)||typeof Q.id=="number")&&(C["tag-hlight"]=Q.id.toString()===d.hID&&d.status===2)):R==="code"&&(C["tag-code"]=!0),C},h=Q=>{const R={};if(n.isEmpty(Q)||n.isEmpty(Q.id))return R;if(Q.id.toString()===d.hID)switch(d.status){case 1:R["background-color"]=d.startColor;break;case 2:R["background-color"]=d.endColor;break}return R},g=Q=>{if(n.isEmpty(Q))return;const R=c.value;let C=!1;R?C=!0:C=n.isBoolean(Q.isDisabled)?!!Q.isDisabled:!1,Q.isShowDisabled=C},S=Q=>{const R=[];return!n.isArray(Q)||n.isEmpty(Q)||Q.forEach(C=>{if(n.isEmpty(C))return;const k=n.getJsonClone(C);g(k),R.push(k)}),R},T=Q=>{c.value=Q;const R=S(r.value);r.value=R};let w=null,E=null;const M=()=>{w!==null&&(clearTimeout(w),w=null),E!==null&&(clearTimeout(E),E=null)},V=Q=>{n.isEmpty(Q)||(M(),d.hID=Q.toString(),d.status=1,e.nextTick(()=>{w=setTimeout(()=>{d.status=2},10),E=setTimeout(()=>{d.status=0,d.hID=""},1500)}))},I=()=>{const Q=S(t.list);r.value=Q};e.onMounted(()=>{e.nextTick(()=>{I()})}),e.onBeforeUnmount(()=>{M()}),e.watch(()=>t.disabled,Q=>{T(Q)}),e.watch(()=>t.list,Q=>{const R=S(Q);r.value=R},{deep:!0});const N=(Q,R)=>{s("onClickTag",R)},x=(Q,R,C)=>{if(Q.preventDefault(),Q.stopPropagation(),t.isRemove&&!R.isShowDisabled&&C>=0&&C<r.value.length){r.value.splice(C,1);const k=n.isNonEmptyString(R.id)||typeof R.id=="number"?R.id.toString():"";s("onRemove",k)}},L=()=>{r.value=[],s("onRemove","")};return l({setDisabled:(Q=!0)=>{T(Q)},addInfo:Q=>{if(n.isEmpty(Q))return;const R=n.getListExistValue(r.value,Q.name||"","name");if(n.isEmpty(R)){const C=n.getJsonClone(Q);g(C),r.value.push(C)}else R.info&&!n.isEmpty(R.info.id)&&V(R.info.id)},getData:()=>n.getListClone(r.value)}),(Q,R)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(m.value)},[r.value.length>0?e.renderSlot(Q.$slots,"head",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(C,k)=>(e.openBlock(),e.createElementBlock("span",{key:`${i}-list-${k}-${C.id}`,class:e.normalizeClass(f(C)),style:e.normalizeStyle(h(C)),onClick:e.withModifiers(b=>N(b,C),["stop"])},[C.isHtml||a.isFormatHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:p(C)},null,8,cm)):(e.openBlock(),e.createElementBlock("span",um,e.toDisplayString(p(C)),1)),a.isRemove&&!C.isShowDisabled?(e.openBlock(),e.createBlock(fe,{key:2,class:"tag-close",name:"close","aria-label":"移除",onClick:b=>x(b,C,k)},null,8,["onClick"])):e.createCommentVNode("",!0)],14,rm))),128)),a.isRemoveAll&&r.value.length>0&&!a.disabled?(e.openBlock(),e.createBlock(fe,{key:2,class:"tag-closeAll",name:"close","aria-label":"清除全部",onClick:L})):e.createCommentVNode("",!0)],10,im))}}),dm=["id"],Fs=e.defineComponent({name:"ClWaterfall",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},itemKey:{type:String,default:"id"},width:{type:Number,default:-1},colNum:{type:Number,default:-1},spacing:{type:Number,default:10},animationName:{type:String,default:"animated fadeIn"}},setup(a,{expose:l}){const o=a,t=`waterfall-${n.getRandom(5)}`,s=o.id,i=e.useTemplateRef("refElList"),u=e.reactive({pWidth:0,pHeight:0}),c=e.ref([]),r=e.ref(!0),d={colPosY:[],resizeEvent:null,resizeDelayFun:null,deletedList:[]},m=e.computed(()=>{const N=u.pWidth,{width:x,colNum:L,spacing:D}=o;let O=300;const X=x>0,Q=L>0,R=Q?Math.max(1,parseInt(((N+D)/L).toString())-D):0;if(X&&Q){const C=(x+D)*L-D;O=N>=C?x:R}else!X&&Q?O=R:X&&!Q&&(O=N>x?x:N);return O}),p=e.computed(()=>{const N=u.pWidth,x=m.value,{colNum:L,spacing:D}=o,O=L>0;let X=-1;const Q=Math.max(1,parseInt(((N+D)/(x+D)).toString()));if(O){const R=(x+D)*L-D;X=N>=R?L:Q}else X=Q;return X}),f=e.computed(()=>{const N=u.pWidth,x=m.value,L=p.value,{spacing:D}=o,O=(x+D)*L-D;return parseInt(((N-O)/2).toString())}),h=e.computed(()=>{const N={"panel-waterfall":!0};return n.getJsonMerge(N,ue.getClassNameJson(o.className))}),g=()=>{r.value=!0;const{list:N,itemKey:x}=o;N.forEach(L=>{r.value&&(r.value=n.isExistJsonKey(L,x))})},S=()=>{c.value=o.list.filter(N=>!d.deletedList.includes(N)),d.deletedList=d.deletedList.filter(N=>o.list.includes(N))},T=()=>{const{spacing:N}=o;d.colPosY=new Array(p.value).fill(N)},w=N=>{const{spacing:x}=o,L=m.value;return f.value+(L+x)*N},E=()=>{let N;if(i.value&&(N=i.value.querySelectorAll(".waterfall-item")),n.isUndefined(N)||!N){u.pHeight=0;return}if(N.length===0){u.pHeight=0;return}T();const x=m.value,{spacing:L,animationName:D}=o;for(let O=0;O<N.length;O++){const X=N[O],Q=ue.getPositionView(X).height,R=Math.min.apply(null,d.colPosY),C=d.colPosY.indexOf(R),k=w(C);X.style.width=`${x}px`,X.style.transform=`translate3d(${k}px,${R}px, 0)`,d.colPosY[C]+=Q+L;const b=X.firstChild;b.style.visibility="visible",b.className=ue.getRemoveClass(b.className,D),ue.checkHasClass(b.className,D)||(b.style.animationDuration="1000ms",b.style.animationDelay="200ms",b.style.animationFillMode="both",b.className=ue.getAddClass(b.className,D))}u.pHeight=Math.max.apply(null,d.colPosY)},M=()=>{const N=()=>{S(),e.nextTick(()=>{E()})};d.resizeDelayFun?d.resizeDelayFun.run(N):e.nextTick(N)},V=()=>{i.value&&(u.pWidth=i.value.offsetWidth,d.resizeDelayFun=new Es(null,200),d.resizeEvent=new ut({element:i.value,callback:N=>{u.pWidth=N?.contentRect?.width??u.pWidth}}))};return e.onMounted(()=>{e.nextTick(()=>{V()})}),e.onUnmounted(()=>{d.resizeEvent&&d.resizeEvent.destroy(),d.resizeDelayFun&&d.resizeDelayFun.stopRun()}),e.watch(()=>[u.pWidth,m.value,o.list],()=>{g(),M()},{deep:!0}),e.provide("$WaterfallTop",{imgCallback:M}),l({deleteItem:N=>{const x=c.value[N];return x!==void 0&&(d.deletedList.push(x),c.value.splice(N,1),M()),x}}),(N,x)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(h.value)},[e.createElementVNode("div",{ref_key:"refElList",ref:i,class:"waterfall-list",style:e.normalizeStyle({height:`${u.pHeight}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(L,D)=>(e.openBlock(),e.createElementBlock("div",{key:r.value?`${t}-${L[a.itemKey]}`:`${t}-${D}`,class:"waterfall-item"},[e.createElementVNode("div",null,[e.renderSlot(N.$slots,"default",{data:L,index:D})])]))),128))],4)],10,dm))}}),mm={class:"waterfall-imageBox"},pm=["alt"],Ps=e.defineComponent({name:"ClWaterfallImage",__name:"Image",props:{url:{type:String,default:""},alt:{type:String,default:""}},setup(a){const l=a,o=e.inject("$WaterfallTop"),t=e.useTemplateRef("refElImage"),s=e.computed(()=>l.url),i=u=>{o?.imgCallback?o.imgCallback():ve.warn("ClWaterfallImage",`未检测到 $WaterfallTop 容器注入,图片${u==="loaded"?"完成":"加载失败"}回调失效`)};return e.onBeforeUnmount(()=>{t.value&&(t.value.onload=null,t.value.onerror=null)}),Is(t,s,{callback:{loaded:()=>{i("loaded")},error:()=>{i("error")}}}),(u,c)=>(e.openBlock(),e.createElementBlock("div",mm,[e.createElementVNode("img",{ref_key:"refElImage",ref:t,class:"waterfall-image",alt:a.alt},null,8,pm)]))}}),Rs=()=>({getPage:a=>ot.getPage(a),getValue:a=>ot.getValue(a),getType:()=>ot.getType(),setType:a=>ot.setType(a),getAll:()=>ot.getAll(),getCommon:()=>ot.getCommon()}),fm=["id"],hm=["onKeydown","aria-expanded","aria-label"],gm=["onClick","onKeydown","aria-label"],vm={class:"anchor-label"},Hs=e.defineComponent({name:"ClAnchorNav",directives:{cltooltip:dt},__name:"Index",props:{id:String,className:String,list:{type:Array,required:!0},isOpen:{type:Boolean,default:!1},offsetShow:{type:Number,default:100}},setup(a){const l=a,o=`anchorNav-${n.getRandom(5)}`,t=l.id,s=e.ref(""),i=e.ref(!1),u=e.ref(!l.isOpen);let c=null;const r=e.computed(()=>{const S={"panel-anchor-nav":!0,"is-fixed":i.value,"is-collapsed":u.value};return n.getJsonMerge(S,ue.getClassNameJson(l.className))}),d=e.computed(()=>(l.list||[]).filter(S=>!!S)),m=()=>{l.list&&c===null&&(c=requestAnimationFrame(()=>{if(c=null,!l.list)return;const S=window.scrollY,T=window.innerHeight;i.value=S>(n.isFinite(l.offsetShow)?l.offsetShow:100);const w=d.value.map(M=>({id:M.id,element:document.getElementById(M.id)})).filter(M=>M.element!==null);if(w.length===0){s.value="";return}if(S+T>=document.documentElement.scrollHeight-1){s.value=w[w.length-1].id;return}let E=!1;for(let M=w.length-1;M>=0;M--)if(w[M].element.getBoundingClientRect().top<=T/2){s.value=w[M].id,E=!0;break}E||(s.value="")}))},p=()=>{window.addEventListener("scroll",m),window.addEventListener("resize",m)},f=()=>{c!==null&&(cancelAnimationFrame(c),c=null),window.removeEventListener("scroll",m),window.removeEventListener("resize",m)};e.onMounted(()=>{p(),m()}),e.onActivated(()=>{p(),m()}),e.onDeactivated(()=>{f()}),e.onUnmounted(()=>{f()}),e.watch(()=>l.list,()=>{m()},{deep:!0});const h=()=>{u.value=!u.value},g=S=>{const T=document.getElementById(S);T&&(T.scrollIntoView({behavior:"smooth",block:"start"}),T.hasAttribute("tabindex")||T.setAttribute("tabindex","-1"),T.focus({preventScroll:!0}))};return(S,T)=>{const w=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{id:e.unref(t),class:e.normalizeClass(r.value),role:"navigation","aria-label":"页面锚点导航"},[e.createElementVNode("div",{class:"anchor-toggle",onClick:h,onKeydown:[e.withKeys(h,["enter"]),e.withKeys(e.withModifiers(h,["prevent"]),["space"])],role:"button","aria-expanded":!u.value,"aria-label":u.value?"展开导航":"收起导航",tabindex:"0"},[e.createVNode(fe,{name:u.value?"caret-left":"caret-right"},null,8,["name"])],40,hm),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(E,M)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${o}-${E.id}-${M}`,class:e.normalizeClass(["anchor-item",{active:s.value===E.id}]),onClick:V=>g(E.id),onKeydown:[e.withKeys(V=>g(E.id),["enter"]),e.withKeys(e.withModifiers(V=>g(E.id),["prevent"]),["space"])],role:"link","aria-label":E.label??"",tabindex:"0"},[T[0]||(T[0]=e.createElementVNode("span",{class:"anchor-dot"},null,-1)),e.createElementVNode("span",vm,e.toDisplayString(E.label??""),1)],42,gm)),[[w,u.value?{html:E.label??"",position:"left",className:"tooltip-anchorNav",isHtml:!1}:{init:!1}]])),128))],10,fm)}}}),ym=["id"],km={class:"calendar-container table-base"},Sm={colspan:"7"},bm={class:"calendar-head-label"},wm=["title","onKeydown"],Cm={class:"calendar-head-label-year"},Em={class:"calendar-head-label-month"},Bm={class:"calendar-head-label-next"},xm=["title","onKeydown"],Tm={class:"calendar-head-Week"},Dm=["tabindex","aria-label","aria-selected","onClick","onMouseover","onMouseout","onKeydown"],Im={key:0,class:"day-today"},_m={class:"day-num"},Nm={key:3,class:"day-lunar-num"},zs=e.defineComponent({name:"ClCalendar",__name:"Index",props:{id:String,className:String,viewDateTime:String,weekFirst:{type:String,default:"sunday",validator:a=>{const l=["monday","sunday"].includes(a);return l||ve.warn("ClCalendar",`警告:weekFirst 仅支持 'monday' 或 'sunday',收到 '${a}',已按 sunday 处理`),l}},isShowLunar:Boolean,isWeekendRest:{type:Boolean,default:void 0},restDays:{type:Array,default:()=>[]},workDays:{type:Array,default:()=>[]}},emits:{onChange:a=>!0,onClick:a=>!0,onHover:(a,l)=>!0,onInit:a=>!0,onError:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=`calendar-${n.getRandom(5)}`,i=o.id,{optPageLanguage:u,getPageLanguage:c}=Ae();c("dataTime");const r=e.reactive({selectId:"",focusedId:""}),d=e.reactive({titleYear:"",titleMonth:""}),m=e.useTemplateRef("calendarRoot"),p=e.ref([]),f=e.ref([]),h={viewDate:null,currentDate:_e.initDay(),isAnimating:!1},g=e.computed(()=>{if(o.isWeekendRest!==void 0)return o.isWeekendRest;const y=ct("calendar");return y?.isWeekendRest!==void 0?y.isWeekendRest:!0}),S=e.computed(()=>o.restDays.length>0?o.restDays:ct("calendar")?.restDays||[]),T=e.computed(()=>o.workDays.length>0?o.workDays:ct("calendar")?.workDays||[]),w=e.computed(()=>{const y={"panel-calendar":!0};return n.getJsonMerge(y,ue.getClassNameJson(o.className))}),E=()=>{if(!h.viewDate)return;const y=h.viewDate.localeData(),B=h.viewDate.year(),A=y.monthsShort(h.viewDate);d.titleYear=`${B}${u.value.year}`,d.titleMonth=A;const F=y.weekdaysMin(),P=y.firstDayOfWeek();let H=[];o.weekFirst==="sunday"?H=F:F.forEach(($,z)=>{H[(7+z-P)%7]=$}),p.value=H};let M=null;const V=e.ref(!1),I=async()=>{if(!V.value)try{M=(await import("lunar-typescript")).Lunar,V.value=!0}catch(y){ve.warn("ClCalendar","农历插件加载失败,本次不显示农历",y)}},N=y=>{if(!M)return"";try{const B=M.fromDate(y.toDate()),A=B.getFestivals();if(n.isNonEmptyString(A[0]))return A[0];const F=B.getJieQi();if(n.isNonEmptyString(F))return F;const P=B.getDayInChinese();return n.isNonEmptyString(P)?P:""}catch(B){return ve.warn("ClCalendar","农历计算异常,该格不显示农历",B),""}},x=y=>{const B=A=>A.some(F=>_e.objDay(F).isSame(y,"day"));if(T.value.length>0&&B(T.value))return{text:"班"};if(S.value.length>0&&B(S.value))return{text:"休"};if(g.value){const A=y.day();if(A===0||A===6)return{text:"休"}}return null},L=(y,B,A,F)=>{const P=y.date(),H=_e.initFormat(y),$=o.isShowLunar&&V.value?N(y):"",z=x(y),oe=y.year()===B&&y.month()<A||y.year()<B,Z=y.year()===B&&y.month()>A||y.year()>B,W=F&&y.isSame(F,"day")&&!oe&&!Z;return{id:`day-${H}`,cls:ue.getAddClass("calendar-day",{old:oe,new:Z,today:W}),day:H,dayNum:P,lunar:$,restMark:z?z.text:void 0,isOld:oe,isNew:Z,isCurrentMonth:!oe&&!Z,isToday:W}},D=()=>{const y=h.viewDate.clone(),B=h.currentDate;let A=y.clone().subtract(1,"months");A=A.date(A.daysInMonth()).startOf("week"),o.weekFirst==="sunday"&&(A=A.subtract(1,"days"));const F=[];let P=[];for(let H=0;H<42;H+=1){H>0&&(A=A.add(1,"days"));const $=L(A.clone(),y.year(),y.month(),B);P.push($),$.isCurrentMonth&&!n.isEmpty(r.selectId)&&$.dayNum===r.selectId&&(r.selectId=$.id),P.length===7&&(F.push({days:P}),P=[])}if(f.value=F,!n.isEmpty(r.selectId))r.focusedId=r.selectId;else{const H=F.flatMap($=>$.days).find($=>$.isCurrentMonth);r.focusedId=H?H.id:""}},O=y=>{h.viewDate=n.isEmpty(y)?_e.initDay():_e.getDayjsObject(y),h.viewDate&&typeof h.viewDate.isValid=="function"&&h.viewDate.isValid()||(h.viewDate=_e.initDay()),E(),D()},X=y=>!y||!n.isString(y)||n.isEmpty(y)?(r.selectId=_e.getDayjsObject("").date(),_e.initFormat({format:"YYYY-MM"})):y.split("-").length===3?(r.selectId=_e.getDayjsObject(y).date(),_e.initFormat({value:y,format:"YYYY-MM"})):(r.selectId="",y),Q=()=>{O(X(o.viewDateTime)),e.nextTick(()=>{R(r.focusedId),!n.isEmpty(r.selectId)&&n.isString(r.selectId)&&t("onInit",r.selectId.replace("day-",""))})},R=y=>{if(n.isEmpty(y)||!m.value)return;const B=m.value.querySelector(`[aria-label="${y.replace("day-","")}"]`);if(!B)return;B.focus({preventScroll:!0});const A=B.getBoundingClientRect();(A.top<0||A.bottom>window.innerHeight)&&B.scrollIntoView({block:"nearest",behavior:"auto"})};e.onMounted(async()=>{o.isShowLunar&&await I(),e.nextTick(()=>{Q(),o.isShowLunar&&V.value&&O(X(o.viewDateTime))})}),e.watch(()=>o.isShowLunar,y=>{y?I().then(()=>{O(X(o.viewDateTime)),e.nextTick(()=>R(r.focusedId))}):O(X(o.viewDateTime))}),e.watch(()=>o.viewDateTime,y=>{n.isEmpty(y)||(O(X(y)),e.nextTick(()=>R(r.focusedId)))});const C=(y,B)=>{y.preventDefault(),y.stopPropagation(),B.isCurrentMonth&&(r.focusedId=B.id,e.nextTick(()=>R(B.id)),r.selectId!==B.id&&(r.selectId=B.id,t("onClick",B.day)))},k=(y,B,A)=>{y.preventDefault(),y.stopPropagation(),B.isCurrentMonth&&t("onHover",B.day,A)},b=(y,B,A)=>{const F=f.value.flatMap($=>$.days);if(F.length===0)return;const P=B*7+A;let H=P;switch(y.key){case"ArrowLeft":y.preventDefault(),H=Math.max(0,P-1);break;case"ArrowRight":y.preventDefault(),H=Math.min(41,P+1);break;case"ArrowUp":y.preventDefault(),H=Math.max(0,P-7);break;case"ArrowDown":y.preventDefault(),H=Math.min(41,P+7);break;case"Enter":case" ":y.preventDefault(),C(y,F[P]);return;default:return}if(H!==P){const $=F[H];if(!$.isCurrentMonth)return;r.focusedId=$.id,e.nextTick(()=>R($.id))}},v=()=>{if(!h.isAnimating){h.isAnimating=!0;try{const y=h.viewDate.clone();let B=_e.subtractTime(y,1,"months");B=_e.initFormat({value:B,format:"YYYY-MM"}),O(B),t("onChange",B),e.nextTick(()=>R(r.focusedId))}catch{t("onError","切换到上一月失败")}finally{h.isAnimating=!1}}},_=()=>{if(!h.isAnimating){h.isAnimating=!0;try{const y=h.viewDate.clone();let B=_e.addTime(y,1,"months");B=_e.initFormat({value:B,format:"YYYY-MM"}),O(B),t("onChange",B),e.nextTick(()=>R(r.focusedId))}catch{t("onError","切换到下一月失败")}finally{h.isAnimating=!1}}};return(y,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(w.value),id:e.unref(i),ref_key:"calendarRoot",ref:m},[e.createElementVNode("table",km,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Sm,[e.createElementVNode("div",bm,[e.createElementVNode("span",{class:"calendar-head-label-prev-month",title:e.unref(u).prevMonth,role:"button",tabindex:"0",onClick:v,onKeydown:[e.withKeys(e.withModifiers(v,["prevent"]),["enter"]),e.withKeys(e.withModifiers(v,["prevent"]),["space"])]},[e.createVNode(fe,{name:"angle-left"})],40,wm),e.createElementVNode("span",null,[e.createElementVNode("span",Cm,e.toDisplayString(d.titleYear),1),e.createElementVNode("span",Em,e.toDisplayString(d.titleMonth),1)]),e.createElementVNode("span",Bm,[e.createElementVNode("span",{class:"calendar-head-label-next-month",title:e.unref(u).nextMonth,role:"button",tabindex:"0",onClick:_,onKeydown:[e.withKeys(e.withModifiers(_,["prevent"]),["enter"]),e.withKeys(e.withModifiers(_,["prevent"]),["space"])]},[e.createVNode(fe,{name:"angle-right"})],40,xm)])])])]),e.createElementVNode("tr",Tm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(A,F)=>(e.openBlock(),e.createElementBlock("th",{key:`${s}-week-${F}`},e.toDisplayString(A),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(A,F)=>(e.openBlock(),e.createElementBlock("tr",{key:`${s}-days-${F}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.days,(P,H)=>(e.openBlock(),e.createElementBlock("td",{key:`${s}-day-${H}`,class:e.normalizeClass([P.cls,r.selectId===P.id?"calendar-day-select":"",r.focusedId===P.id?"calendar-day-focused":""]),tabindex:P.isCurrentMonth?r.focusedId===P.id?"0":"-1":void 0,role:"gridcell","aria-label":P.day,"aria-selected":r.selectId===P.id?"true":"false",onClick:e.withModifiers($=>C($,P),["stop"]),onMouseover:$=>k($,P,!0),onMouseout:$=>k($,P,!1),onKeydown:$=>b($,F,H)},[P.isToday?(e.openBlock(),e.createElementBlock("span",Im,"今")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",_m,e.toDisplayString(P.dayNum),1),P.restMark?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["day-rest",P.restMark==="班"?"day-rest-work":"day-rest-rest"])},e.toDisplayString(P.restMark),3)):e.createCommentVNode("",!0),P.lunar?(e.openBlock(),e.createElementBlock("div",Nm,e.toDisplayString(P.lunar),1)):e.createCommentVNode("",!0),P.isCurrentMonth?e.renderSlot(y.$slots,"day",{key:4,time:P.day,data:P.dayNum}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],42,Dm))),128))]))),128))])])],10,ym))}}),Vm={class:"code-legend-demo"},Mm={class:"code-legend-code"},Om=["aria-label"],fl=25,Lm=100,Us=e.defineComponent({name:"ClCodeLegend",__name:"Index",props:{id:{},className:{},title:{}},setup(a){const l=a,o=l.id,t=e.useTemplateRef("refElCard"),s=e.useTemplateRef("refElFoot"),i=e.ref(!1),u=e.ref(!1),c=e.ref("auto");let r=null,d=null,m=null;const p=e.computed(()=>{const D=["code-legend"];return l.className&&n.isString(l.className)&&!n.isEmpty(l.className)&&l.className.split(" ").forEach(O=>{n.isEmpty(O)||D.push(O)}),D.join(" ")}),f=e.computed(()=>({"code-legend-footer":!0,"card-footer-fixed":u.value})),h=e.computed(()=>({"icon-rotate":!0,"rotate-180":i.value})),g=()=>{r&&(clearTimeout(r),r=null),d&&(clearTimeout(d),d=null)},S=()=>{if(i.value){const D=t.value?.$el;if(!D)return;const O=D.clientWidth,X=s.value;if(!X)return;const Q=X.getBoundingClientRect(),R=D.getBoundingClientRect(),C=window.innerHeight;R.top<C&&R.bottom>C?(u.value=!0,c.value=O.toString()+"px",X.style.left=Q.left+"px"):(u.value=!1,c.value="auto",X.style.left="")}else u.value=!1,c.value="auto"},T=()=>{m||(m=setTimeout(()=>{m=null,S()},Lm))};e.watch(()=>i.value,(D,O)=>{D!==O&&(g(),D?x():L())});const w=()=>{i.value=!i.value},E=D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),w())},M=D=>{const O=D;O.style.height="auto";const X=window.getComputedStyle(O,null).height;O.style.height="0",r=setTimeout(function(){O.style.height=X},fl)},V=D=>{const O=D;d=setTimeout(function(){O.style.height="0"},fl)},I=()=>{e.nextTick(()=>{S()})},N=()=>{e.nextTick(()=>{S()})},x=()=>{window.addEventListener("scroll",T)},L=()=>{window.removeEventListener("scroll",T),m&&(clearTimeout(m),m=null)};return e.onMounted(()=>{i.value&&x()}),e.onActivated(()=>{i.value&&(x(),S())}),e.onDeactivated(()=>{L(),g()}),e.onUnmounted(()=>{L(),g()}),(D,O)=>(e.openBlock(),e.createBlock(ua,{ref_key:"refElCard",ref:t,id:e.unref(o),theme:"loopline",className:p.value},{headTitle:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),headExplain:e.withCtx(()=>[D.$slots.remark?e.renderSlot(D.$slots,"remark",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),default:e.withCtx(()=>[e.createElementVNode("div",Vm,[e.renderSlot(D.$slots,"demo")]),e.createVNode(e.Transition,{name:"slide-fade",onEnter:M,onAfterEnter:I,onLeave:V,onAfterLeave:N},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",Mm,[e.renderSlot(D.$slots,"code")])],512),[[e.vShow,i.value]])]),_:3})]),foot:e.withCtx(()=>[D.$slots.code?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElFoot",ref:s,class:e.normalizeClass(f.value),role:"button",tabindex:"0","aria-label":i.value?"收起代码":"展开代码",onClick:w,onKeydown:E,style:e.normalizeStyle({width:c.value})},[e.createVNode(fe,{name:"caret-down",class:e.normalizeClass(h.value)},null,8,["class"])],46,Om)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3},8,["id","className"]))}}),$m=["id"],Am=["aria-expanded"],Fm=["id"],Js=e.defineComponent({name:"ClDropdownlayer",__name:"Base",props:{id:String,classParent:{type:[String,Object]},classText:{type:[String,Object]},classDropDown:{type:[String,Object]},isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:a=>["left","right","center","top","bottom"].includes(a)},dropDownPos:{type:String,default:"down",validator:a=>["down","up","left","right"].includes(a)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isInitDelayComplete:{type:Boolean,default:!1},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!1},triggers:{type:String,default:"click",validator:a=>["click","hover"].includes(a)},onOpenBeforeCallback:Function},emits:{onChangeOpen:a=>!0,onChangePosition:a=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=n.isNonEmptyString(t.id)?t.id:`dropdownLayer-${n.getRandom(8)}`,u=e.useTemplateRef("refElTopParent"),c=e.useTemplateRef("refElText"),r=e.useTemplateRef("refElDropdown"),d=e.reactive({isOpen:!1,isShowOpen:!1,isInitFirstOpen:!1,dropDownPos:"down",arrowPos:"left",dropDownTop:"",dropDownLeft:"",arrowLeft:"",isOpacity0:!1,dropdownId:`${i}-dropdown`}),m=e.ref(!1),p=e.ref(null),f=e.ref([]),h=e.ref(null),g=e.ref(null);let S=null,T=null,w=null,E=null,M=!1;const V=e.computed(()=>{let j={"panel-dropdownlayer":!0,"dropdownLayer-arrow":t.isUseDropdownArrow,"dropdownLayer-disabled":t.isDisabled};return n.isNonEmptyString(t.classParent)?j=n.getJsonMerge(j,ue.getClassNameJson(t.classParent)):n.isObject(t.classParent)&&(j=n.getJsonMerge(j,t.classParent)),j}),I=e.computed(()=>{let j={"dropdownLayer-text":!0,"dropdownLayer-text-open":d.isShowOpen};return!n.isEmpty(d.dropDownPos)&&d.isShowOpen&&(j[`dropdownLayer-text-${d.dropDownPos}`]=!0),n.isNonEmptyString(t.classText)?j=n.getJsonMerge(j,ue.getClassNameJson(t.classText)):n.isObject(t.classText)&&(j=n.getJsonMerge(j,t.classText)),j}),N=e.computed(()=>{let j={"dropdownLayer-dropdown":!0,"dropdownLayer-dropdown-open":d.isShowOpen,"dropdownLayer-dropdown-arrow":t.isUseDropdownArrow,"dropdownLayer-dropdown-opacity0":d.isOpacity0};return j[`dropdownLayer-dropdown-${d.dropDownPos}`]=!0,j[`dropdownLayer-dropdown-arrow-${d.arrowPos}`]=!0,n.isNonEmptyString(t.classDropDown)?j=n.getJsonMerge(j,ue.getClassNameJson(t.classDropDown)):n.isObject(t.classDropDown)&&(j=n.getJsonMerge(j,t.classDropDown)),j}),x=e.computed(()=>!n.isEmpty(t.appendContainer)),L=e.computed(()=>{const j={},{dropDownPos:te,dropdownArrowPos:re}=t,{dropDownTop:pe,dropDownLeft:ie}=d;return te==="down"||te==="up"?(j.top=pe,(re==="center"||re==="top"||re==="bottom"||x.value)&&(j.left=ie)):(te==="left"||te==="right")&&(j.left=ie,j.top=pe),j}),D=e.computed(()=>{const j={};return(t.dropdownArrowPos==="center"||t.dropdownArrowPos==="top"||t.dropdownArrowPos==="bottom")&&(j.left=d.arrowLeft),j}),O=(j,te)=>{const re=t.isUseDropdownArrow,pe={};return te==="down"?pe.top=re?j.textHeight+j.arrowHeight-1:j.textHeight:te==="up"?pe.top=re?-(j.dropDownHeight+j.arrowHeight-3):-j.dropDownHeight:te==="left"?(pe.left=re?-(j.dropDownWidth+j.arrowWidth-1):-j.dropDownWidth,pe.top=0):te==="right"&&(pe.left=re?j.textWidth+j.arrowWidth-1:j.textWidth,pe.top=0),pe},X=j=>{!r.value||!u.value||(r.value.style.width=j&&t.appendFollowWidth?`${u.value.offsetWidth}px`:"")},Q=()=>{d.isShowOpen&&e.nextTick(()=>{if(!u.value||!c.value||!r.value)return;const j=t.isUseDropdownArrow?r.value.querySelector(".arrow"):null,te=!n.isEmpty(t.appendContainer),re=te?t.appendContainer:null;X(te);let pe=c.value;if(g.value){const me=ue.getParent(g.value,".dropdownLayer-arrow-anchorPoint",c.value,!1);n.isUndefined(me)||(pe=me)}const ie=ue.calculationDropdownPosition(u.value,pe,r.value,j,re),K=ie[{down:"dropDownPosDown",up:"dropDownPosUp",left:"dropDownPosLeft",right:"dropDownPosRight"}[t.dropDownPos]||"dropDownPosDown"];d.dropDownPos=K;const le=R(ie,K);d.arrowPos=le;const de=O(ie,K);(le==="center"||le==="top"||le==="bottom")&&(K==="down"||K==="up")&&(de.left=ie.arrowPosCenterLRInfo?.dropDownLeft,d.arrowLeft=ie.arrowPosCenterLRInfo?.arrowLeft!=null?`${ie.arrowPosCenterLRInfo.arrowLeft}px`:""),te&&(de.top=(de.top||0)+(ie.controlOffset?.top||0),de.left=(de.left||0)+(ie.controlOffset?.left||0),le==="right"&&(de.left=(ie.controlOffset?.left||0)+u.value.offsetWidth-r.value.offsetWidth)),d.dropDownTop=de.top!=null?`${de.top}px`:"",d.dropDownLeft=de.left!=null?`${de.left}px`:"",s("onChangePosition",{use:{dropDownPos:K,arrowPos:le,dropDownTop:de.top,dropDownLeft:de.left,arrowLeft:d.arrowLeft},original:ie})})},R=(j,te)=>{switch(t.dropdownArrowPos){case"left":return j.arrowPosLeft;case"right":return j.arrowPosRight;case"top":return j.arrowPosTop;case"bottom":return j.arrowPosBottom;case"center":return te==="down"||te==="up"?j.arrowPosCenterLR:te==="left"||te==="right"?j.arrowPosCenterTB:j.arrowPosLeft;default:return j.arrowPosLeft}},C=j=>{p.value=j},k=j=>{d.isShowOpen&&j?.target&&v(j)},b=j=>j?r.value&&r.value.contains(j)?!1:n.isUndefined(ue.getParent(j,`#${d.dropdownId}`,u.value)):!0,v=j=>{if(u.value){b(j?.target)&&b(p.value?.target)&&(d.isOpen=!1);return}if(n.isNonEmptyString(t.appendContainer))try{document.querySelectorAll(`${t.appendContainer}>#${d.dropdownId}`).forEach(te=>te.parentNode?.removeChild(te))}catch{ve.warn("DropdownLayer","appendContainer 选择器非法,残留面板清理已跳过")}B(),d.isOpen=!1},_=j=>{if(d.isShowOpen){if(T)return;const te=j.currentTarget;T=requestAnimationFrame(()=>{T=null,Q();const re=ue.getPositionView(u.value,te),pe=te.dataset,ie={right:0,left:0};ie.right=n.isUndefined(pe.padRight)?0:parseInt(pe.padRight.replace("px","")),ie.left=n.isUndefined(pe.padLeft)?0:parseInt(pe.padLeft.replace("px",""));let se=!1;re.top+re.height/2<=0&&(se=!0),re.right+re.width/2<=ie.right&&ie.right>=0&&(se=!0),re.left+re.width/2<=ie.left&&ie.left>=0&&(se=!0),d.isOpacity0=se})}else y(!1)},y=(j=!0)=>{f.value.length>0&&f.value.forEach(te=>{j?te.addEventListener("scroll",_):te.removeEventListener("scroll",_)})},B=()=>{clearTimeout(E),E=null;const j=document.querySelector("body");j&&M&&j.removeEventListener("mousedown",C),M&&document.body.removeEventListener("click",k),M=!1,y(!1),d.isShowOpen=!1,P(),g.value=null,p.value=null},A=()=>{h.value=new ut({callback:()=>{d.isOpen&&Q()}});const{dropDownPos:j}=t;j==="down"||j==="up"?(d.dropDownPos="down",d.arrowPos="left"):(j==="left"||j==="right")&&(d.dropDownPos="left",d.arrowPos="top")},F=()=>{S||!r.value||typeof window>"u"||!window.ResizeObserver||(S=new window.ResizeObserver(()=>{d.isOpen&&r.value&&Q()}),S.observe(r.value))},P=()=>{S&&(S.disconnect(),S=null)},H=j=>{if(!t.isDisabled){if(g.value=j.target,!d.isOpen&&t.onOpenBeforeCallback)try{const te=t.onOpenBeforeCallback();if(n.isBoolean(te)&&!te)return}catch{ve.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}d.isOpen?$():z()}},$=()=>{d.isOpen=!1},z=()=>{if(d.isShowOpen){oe();return}if(t.isCloseDestroy&&d.isInitFirstOpen){oe();return}d.isOpen=!0},oe=()=>{m.value=!0,d.isInitFirstOpen=!1,d.isShowOpen=!1,e.nextTick(()=>{d.isOpen=!d.isOpen})};e.onMounted(()=>{e.nextTick(()=>{A()})}),e.onActivated(()=>{h.value||e.nextTick(()=>{A()})}),e.onDeactivated(()=>{clearTimeout(w),h.value?.destroy(),h.value=null,P(),B(),d.isOpen=!1}),e.onUnmounted(()=>{clearTimeout(w),h.value?.destroy(),B()}),e.watch(()=>d.isOpen,j=>{d.isInitFirstOpen||(d.isInitFirstOpen=!0,n.isEmpty(t.appendContainer)||e.nextTick(()=>{let te=ue.getParentCheckBody(u.value,t.appendContainer);n.isUndefined(te)&&(te=document.querySelector("body")),r.value&&te.appendChild(r.value),f.value=ue.getParentScrollList(u.value,t.appendContainer,!1),y()})),j||B(),s("onChangeOpen",j),j&&(d.isOpacity0=!1,E=setTimeout(()=>{if(E=null,!d.isOpen||M)return;M=!0;const te=document.querySelector("body");te&&te.addEventListener("mousedown",C),document.body.addEventListener("click",k)}),t.isInitDelayComplete||e.nextTick(()=>{d.isShowOpen=!0,Q()}))});const Z=j=>{(t.triggers==="click"||j instanceof KeyboardEvent)&&H(j)};e.watch(()=>r.value,j=>{j&&F()});const W=j=>{t.triggers==="hover"&&(clearTimeout(w),d.isOpen||H(j))},Y=j=>{t.triggers==="hover"&&(w=setTimeout(()=>{r.value?.matches(":hover")||d.isOpen&&H(j)},150))},q=()=>{F(),s("onOpenComplete")},J=()=>{m.value=!1},U=()=>{if(m.value){m.value=!1;return}t.isCloseDestroy&&(d.isInitFirstOpen=!1),s("onAfterLeave")};return l({setOpen:j=>{if(!n.isBoolean(j)){ve.warn("DropdownLayer","setOpen 参数必须为 boolean,已忽略");return}if(j&&t.onOpenBeforeCallback)try{const te=t.onOpenBeforeCallback();if(n.isBoolean(te)&&!te){ve.warn("DropdownLayer","setOpen 打开被 onOpenBeforeCallback 阻止");return}}catch{ve.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}d.isOpen=j},calculationPosition:()=>Q(),initCompleteOpen:()=>{d.isOpen&&e.nextTick(()=>{d.isOpen&&(d.isShowOpen=!0,r.value?Q():e.nextTick(()=>{Q()}))})},getIsShowOpen:()=>d.isShowOpen}),(j,te)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(V.value),ref_key:"refElTopParent",ref:u},[e.createElementVNode("div",{class:e.normalizeClass(I.value),onClick:te[0]||(te[0]=re=>Z(re)),onMouseover:te[1]||(te[1]=re=>W(re)),onMouseleave:te[2]||(te[2]=re=>Y(re)),onKeydown:[te[3]||(te[3]=e.withKeys(e.withModifiers(re=>Z(re),["prevent"]),["enter"])),te[4]||(te[4]=e.withKeys(e.withModifiers(re=>Z(re),["prevent"]),["space"]))],role:"combobox",tabindex:"0","aria-expanded":d.isOpen,"aria-haspopup":"listbox",ref_key:"refElText",ref:c},[e.renderSlot(j.$slots,"labelText")],42,Am),d.isInitFirstOpen?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:"dropdown-transit","enter-active-class":a.transitionEnter,"leave-active-class":a.transitionLeave,onEnter:q,onAfterLeave:U,onLeaveCancelled:J},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:d.dropdownId,class:e.normalizeClass(N.value),style:e.normalizeStyle(L.value),ref_key:"refElDropdown",ref:r,onMouseleave:te[5]||(te[5]=re=>Y(re))},[a.isUseDropdownArrow?(e.openBlock(),e.createElementBlock("div",{key:0,class:"arrow",style:e.normalizeStyle(D.value)},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.renderSlot(j.$slots,"dropdown")],46,Fm),[[e.vShow,d.isShowOpen]])]),_:3},8,["enter-active-class","leave-active-class"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,$m))}}),uo=e.defineComponent({name:"ClDropdownlayerPopup",__name:"Popup",props:{id:String,classParent:String,classText:String,classDropDown:String,isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:a=>["left","right","center","top","bottom"].includes(a)},dropDownPos:{type:String,default:"down",validator:a=>["down","up","left","right"].includes(a)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!1},isInitDelayComplete:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},appendContainer:{type:String,default:""},triggers:{type:String,default:"click",validator:a=>["click","hover"].includes(a)},onOpenBeforeCallback:Function},emits:{onChangeOpen:a=>!0,onChangePosition:a=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElDropdownLayer"),c=e.computed(()=>{let w={"dropdownLayer-theme-popup":!0,"panel-dropdownlayerpopup":!0};return w=n.getJsonMerge(w,ue.getClassNameJson(t.classParent)),w}),r=e.computed(()=>{let w={"dropdownLayer-dropdown-theme-popup":!0};return w=n.getJsonMerge(w,ue.getClassNameJson(t.classDropDown)),w}),d=w=>{w&&t.isInitDelayComplete&&S(),s("onChangeOpen",w)},m=w=>{s("onChangePosition",w)},p=()=>{s("onOpenComplete")},f=()=>{s("onAfterLeave")},h=w=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}u.value.setOpen(w)},g=()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return u.value.calculationPosition()},S=()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}e.nextTick(()=>{u.value?.initCompleteOpen()})};return l({setOpen:h,calculationPosition:g,initCompleteOpen:S,checkIsShowOpen:()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return u.value.getIsShowOpen()}}),(w,E)=>(e.openBlock(),e.createBlock(Js,{ref_key:"refElDropdownLayer",ref:u,id:e.unref(i),classParent:c.value,classText:a.classText,classDropDown:r.value,isDisabled:a.isDisabled,dropdownArrowPos:a.dropdownArrowPos,dropDownPos:a.dropDownPos,isUseDropdownArrow:a.isUseDropdownArrow,isCloseDestroy:a.isCloseDestroy,isInitDelayComplete:a.isInitDelayComplete,appendContainer:a.appendContainer,transitionEnter:a.transitionEnter,transitionLeave:a.transitionLeave,triggers:a.triggers,onOpenBeforeCallback:a.onOpenBeforeCallback,onOnChangeOpen:d,onOnChangePosition:m,onOnOpenComplete:p,onOnAfterLeave:f},{labelText:e.withCtx(()=>[e.renderSlot(w.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(w.$slots,"dropdown")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","dropDownPos","isUseDropdownArrow","isCloseDestroy","isInitDelayComplete","appendContainer","transitionEnter","transitionLeave","triggers","onOpenBeforeCallback"]))}}),hl=(a,l)=>Object.prototype.hasOwnProperty.call(a,l),Pm=(a,l,o)=>{const t=(2-l)*o/2,s=t===0||t===1?0:l*o/(t<.5?t*2:2-t*2);return[a,s,t]},Rm=a=>typeof a=="string"&&a.includes(".")&&Number.parseFloat(a)===1,Hm=a=>typeof a=="string"&&a.includes("%"),Qt=(a,l)=>{Rm(a)&&(a="100%");const o=Hm(a);return a=Math.min(l,Math.max(0,Number.parseFloat(`${a}`))),o&&(a=Number.parseInt(`${a*l}`,10)/100),Math.abs(a-l)<1e-6?1:a%l/Number.parseFloat(l)},gl={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},jn=a=>{a=Math.min(Math.round(a),255);const l=Math.floor(a/16),o=a%16;return`${gl[l]||l}${gl[o]||o}`},vl=({r:a,g:l,b:o})=>Number.isNaN(+a)||Number.isNaN(+l)||Number.isNaN(+o)?"":`#${jn(a)}${jn(l)}${jn(o)}`,Ho={A:10,B:11,C:12,D:13,E:14,F:15},At=a=>a.length===2?(Ho[a[0].toUpperCase()]||+a[0])*16+(Ho[a[1].toUpperCase()]||+a[1]):Ho[a[1].toUpperCase()]||+a[1],zm=(a,l,o)=>{l=l/100,o=o/100;let t=l;const s=Math.max(o,.01);o*=2,l*=o<=1?o:2-o,t*=s<=1?s:2-s;const i=(o+l)/2,u=o===0?2*t/(s+t):2*l/(o+l);return{h:a,s:u*100,v:i*100}},yl=(a,l,o)=>{a=Qt(a,255),l=Qt(l,255),o=Qt(o,255);const t=Math.max(a,l,o),s=Math.min(a,l,o);let i=0;const u=t,c=t-s,r=t===0?0:c/t;if(t===s)i=0;else{switch(t){case a:{i=(l-o)/c+(l<o?6:0);break}case l:{i=(o-a)/c+2;break}case o:{i=(a-l)/c+4;break}}i/=6}return{h:i*360,s:r*100,v:u*100}},Ln=(a,l,o)=>{a=Qt(a,360)*6,l=Qt(l,100),o=Qt(o,100);const t=Math.floor(a),s=a-t,i=o*(1-l),u=o*(1-s*l),c=o*(1-(1-s)*l),r=t%6,d=[o,u,i,i,c,o][r],m=[c,o,o,u,i,i][r],p=[i,i,c,o,o,u][r];return{r:Math.round(d*255),g:Math.round(m*255),b:Math.round(p*255)}};class Um{_hue=0;_saturation=100;_value=100;_alpha=100;enableAlpha=!1;format="hex";value="";selected;constructor(l){l=l||{};for(const o in l)hl(l,o)&&(this[o]=l[o]);l.value?this.fromString(l.value):this.doOnChange()}set(l,o){if(arguments.length===1&&typeof l=="object"){for(const t in l)hl(l,t)&&this.set(t,l[t]);return}this[`_${l}`]=o,this.doOnChange()}get(l){return l==="alpha"?Math.floor(this[`_${l}`]):this[`_${l}`]}toRgb(){return Ln(this._hue,this._saturation,this._value)}fromString(l){if(!l)return;const o=this._convertValueInfo(l);o&&(this._hue=o.hue,this._saturation=o.saturation,this._value=o.value,this._alpha=o.alpha,this.doOnChange())}compare(l){return Math.abs(l._hue-this._hue)<2&&Math.abs(l._saturation-this._saturation)<1&&Math.abs(l._value-this._value)<1&&Math.abs(l._alpha-this._alpha)<1}doOnChange(){const{_hue:l,_saturation:o,_value:t,_alpha:s,format:i}=this,u={hue:l,saturation:o,value:t,alpha:s};let c=this._convertFormat(i,u);c.length===0&&(c=this._getValueRGB(u)),this.value=c}checkValue(l){let o=!1,t="";if(/^rgb\(/.test(l)?t="^[rR][gG][Bb][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){2}[\\s]*(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)[\\s]*[\\)]{1}$":/^rgba\(/.test(l)?t="^[rR][gG][Bb][Aa][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){3}[\\s]*(1|1.0|0|0.[0-9])[\\s]*[\\)]{1}$":/^#/.test(l)?t="^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$":/^hsl\(/.test(l)?t="^[hH][Ss][Ll][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsla\(/.test(l)?t="^[hH][Ss][Ll][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$":/^hsv\(/.test(l)?t="^[hH][Ss][Vv][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsva\(/.test(l)&&(t="^[hH][Ss][Vv][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$"),t.length>0){const s=new RegExp(t);o=l.match(s)!==null}return o}getValueFormat(l,o){const t=this._convertValueInfo(l);return t?this._convertFormat(o,t):l}_convertValueInfo(l){let o=0,t=100,s=100,i=100;if(l){let u;if(l.includes("hsl")){const c=l.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,d)=>d>2?Number.parseFloat(r):Number.parseInt(r,10));c.length===4?(i=Number.parseFloat(c[3].toString()),i=i>1?1:i,i=i*100):c.length===3&&(i=100),c.length>=3&&(u=zm(c[0],c[1],c[2]))}else if(l.includes("hsv")){const c=l.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,d)=>d>2?Number.parseFloat(r):Number.parseInt(r,10));c.length===4?(i=Number.parseFloat(c[3].toString()),i=i>1?1:i,i=i*100):c.length===3&&(i=100),c.length>=3&&(u={h:c[0],s:c[1],v:c[2]})}else if(l.includes("rgb")){const c=l.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,d)=>d>2?Number.parseFloat(r):Number.parseInt(r,10));c.length===4?(i=Number.parseFloat(c[3].toString()),i=i>1?1:i,i=i*100):c.length===3&&(i=100),c.length>=3&&(u=yl(c[0],c[1],c[2]))}else if(l.includes("#")){const c=l.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(c))return;let r=0,d=0,m=0;c.length===3?(r=At(c[0]+c[0]),d=At(c[1]+c[1]),m=At(c[2]+c[2])):(c.length===6||c.length===8)&&(r=At(c.slice(0,2)),d=At(c.slice(2,4)),m=At(c.slice(4,6))),c.length===8?(i=At(c.slice(6))/255,i=i>1?1:i,i=i*100):(c.length===3||c.length===6)&&(i=100),u=yl(r,d,m)}u&&(o=Math.max(0,Math.min(360,u.h)),t=Math.max(0,Math.min(100,u.s)),s=Math.max(0,Math.min(100,u.v)))}return{hue:o,saturation:t,value:s,alpha:i}}_convertFormat(l,o){let t="";switch(l){case"hsl":{t=this._getValueHSL(o);break}case"hsv":{t=this._getValueHSV(o);break}case"rgb":{t=this._getValueRGB(o);break}case"hex":t=this._getValueHEX(o)}return t}_isShowAlpha(l){return l!==100}_getValueHSL(l){const o=Math.floor(l.alpha),t=this._isShowAlpha(l.alpha),s=Pm(l.hue,l.saturation/100,l.value/100),i=Math.round(l.hue),u=Math.round(s[1]*100),c=Math.round(s[2]*100);return t?`hsla(${i}, ${u}%, ${c}%, ${o/100})`:`hsl(${i}, ${u}%, ${c}%)`}_getValueHSV(l){const o=Math.floor(l.alpha),t=this._isShowAlpha(o),s=Math.round(l.hue),i=Math.round(l.saturation),u=Math.round(l.value);return t?`hsva(${s}, ${i}%, ${u}%, ${o/100})`:`hsv(${s}, ${i}%, ${u}%)`}_getValueHEX(l){const o=Math.floor(l.alpha);return this._isShowAlpha(o)?`${vl(Ln(l.hue,l.saturation,l.value))}${jn(o*255/100)}`:vl(Ln(l.hue,l.saturation,l.value))}_getValueRGB(l){const o=Math.floor(l.alpha),t=this._isShowAlpha(o),{r:s,g:i,b:u}=Ln(l.hue,l.saturation,l.value);return t?`rgba(${s}, ${i}, ${u}, ${this.get("alpha")/100})`:`rgb(${s}, ${i}, ${u})`}}const Jm=e.defineComponent({name:"ClColorPickerPalette",__name:"Palette",props:{color:{type:Object,required:!0}},setup(a){const l=a,o=e.useTemplateRef("refElTopParent"),t=e.reactive({background:"hsl(0, 100%, 50%)",btnLeft:0,btnTop:0}),s=e.computed(()=>{const r=l.color.get("hue"),d=l.color.get("value");return{hue:r,value:d}}),i=(r,d)=>{const p=o.value.getBoundingClientRect();let f=d.clientX-p.left,h=d.clientY-p.top;f=Math.max(0,f),f=Math.min(f,p.width),h=Math.max(0,h),h=Math.min(h,p.height),t.btnLeft=f,t.btnTop=h,l.color.set({saturation:f/p.width*100,value:100-h/p.height*100})},u=()=>{const r=o.value,d=l.color.get("saturation"),m=l.color.get("value"),{clientWidth:p,clientHeight:f}=r;t.btnLeft=d*p/100,t.btnTop=(100-m)*f/100,t.background=`hsl(${l.color.get("hue")}, 100%, 50%)`},c=()=>{const r={ing:(d,m)=>{i(d,m)},end:(d,m)=>{i(d,m)}};new Tt(o.value,r),u()};return e.onMounted(()=>{e.nextTick(()=>{c()})}),e.watch(()=>s.value,()=>{u()}),(r,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:o,class:"panel-colorpicker-palette",style:e.normalizeStyle({backgroundColor:t.background})},[d[1]||(d[1]=e.createElementVNode("div",{class:"panel-colorpicker-palette-white"},null,-1)),d[2]||(d[2]=e.createElementVNode("div",{class:"panel-colorpicker-palette-black"},null,-1)),e.createElementVNode("div",{class:"panel-colorpicker-palette-btn",style:e.normalizeStyle({top:t.btnTop+"px",left:t.btnLeft+"px"})},[...d[0]||(d[0]=[e.createElementVNode("div",null,null,-1)])],4)],4))}}),Km=e.defineComponent({name:"ClColorPickerHue",__name:"Hue",props:{color:{type:Object,required:!0}},setup(a){const l=a,o=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),s=e.useTemplateRef("refElBtn"),i=e.reactive({btnTop:0}),u=e.computed(()=>l.color.get("hue")),c=(f,h)=>{const S=o.value.getBoundingClientRect();let T=h.clientY-S.top;T=Math.max(0,T),T=Math.min(T,S.height);const w=Math.round(T/S.height*360);l.color.set("hue",w)},r=()=>{const f=o.value,h=l.color.get("hue");return Math.round(h*f.offsetHeight/360)},d=()=>{i.btnTop=r()},m=()=>{const f={ing:(h,g)=>{c(h,g)},end:(h,g)=>{c(h,g)}};new Tt(t.value,f),new Tt(s.value,f),d()};e.onMounted(()=>{e.nextTick(()=>{m()})}),e.watch(()=>u.value,()=>{d()});const p=f=>{if(f.target!==s.value){const g=ue.getClientXY(f);c(f,g)}};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:o,class:"panel-colorpicker-hue"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-hue-container",onClick:p},null,512),e.createElementVNode("div",{ref_key:"refElBtn",ref:s,class:"panel-colorpicker-hue-btn",style:e.normalizeStyle({top:i.btnTop+"px"})},null,4)],512))}}),Wm=e.defineComponent({name:"ClColorPickerAlpha",__name:"Alpha",props:{color:{type:Object,required:!0}},setup(a){const l=a,o=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),s=e.useTemplateRef("refElBtn"),i=e.reactive({background:null,btnLeft:0}),u=e.computed(()=>l.color.get("alpha")),c=(h,g)=>{const T=o.value.getBoundingClientRect();let w=g.clientX-T.left;w=Math.max(0,w),w=Math.min(w,T.width);const E=Math.round(w/T.width*100);l.color.set("alpha",E)},r=()=>{const h=o.value,g=l.color.get("alpha");return Math.round(g*h.offsetWidth/100)},d=()=>{if(l.color&&l.color.value){const{r:h,g,b:S}=l.color.toRgb();return`linear-gradient(to right, rgba(${h}, ${g}, ${S}, 0) 0%, rgba(${h}, ${g}, ${S}, 1) 100%)`}return null},m=()=>{i.btnLeft=r(),i.background=d()},p=()=>{const h={ing:(g,S)=>{c(g,S)},end:(g,S)=>{c(g,S)}};new Tt(t.value,h),new Tt(s.value,h),m()};e.onMounted(()=>{e.nextTick(()=>{p()})}),e.watch(()=>u.value,()=>{m()}),e.watch(()=>l.color.value,()=>{m()});const f=h=>{if(h.target!==s.value){const S=ue.getClientXY(h);c(h,S)}};return(h,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:o,class:"panel-colorpicker-alpha"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-alpha-container",style:e.normalizeStyle({background:i.background}),onClick:f},null,4),e.createElementVNode("div",{ref_key:"refElBtn",ref:s,class:"panel-colorpicker-alpha-btn",style:e.normalizeStyle({left:i.btnLeft+"px"})},null,4)],512))}}),Ks=e.defineComponent({name:"ClColorPickerItemBlock",__name:"ItemBlock",props:{className:String,color:String},emits:{onClick:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=e.computed(()=>{let u="panel-colorpicker-item-block ";const{className:c}=o;return c&&!n.isEmpty(c)&&(u+=c),u}),i=()=>{t("onClick",o.color||"")};return(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),onClick:i},[c[0]||(c[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({background:a.color})},null,4)],2))}}),jm={class:"panel-colorpicker-preset"},Ym=e.defineComponent({name:"ClColorPickerPreset",__name:"Preset",emits:{onClick:a=>!0},setup(a,{emit:l}){const o=l,t=e.reactive({keyIndex:`ColorpickerPreset-${n.getRandom(8)}`}),s=e.ref([]),i=()=>{const c=["var(--cl-text-primary, #323233)","var(--cl-bg, #ffffff)","#f44336","#E91E63","#9c27b0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B","rgba(255, 69, 0, 0.68)","rgba(31, 147, 255, 0.73)","var(--cl-transparent, rgba(0, 0, 0, 0))"];s.value=c};e.onMounted(()=>{i()});const u=c=>{o("onClick",c)};return(c,r)=>(e.openBlock(),e.createElementBlock("div",jm,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(d,m)=>(e.openBlock(),e.createElementBlock("li",{key:`${t.keyIndex}-${m}`},[e.createVNode(Ks,{color:d,onOnClick:u},null,8,["color"])]))),128))])]))}}),qm={class:"panel-colorpicker-value"},Xm={key:0,class:"panel-colorpicker-hex"},Gm={key:1,class:"panel-colorpicker-rgb"},Qm={key:2,class:"panel-colorpicker-hsl"},Zm={key:3,class:"panel-colorpicker-hsv"},ep=e.defineComponent({name:"ClColorPickerValue",__name:"Value",props:{color:{type:Object,required:!0}},emits:{onChangeType:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.reactive({type:"hex",hex:"",rgb:"",hsl:"",hsv:""}),u=e.ref(""),c=e.reactive({r:"",g:"",b:"",a:""}),r=e.reactive({h:"",s:"",l:"",a:""}),d=e.reactive({h:"",s:"",v:"",a:""}),m={typeList:["hex","rgb","hsl","hsv"]},p=e.computed(()=>t.color.value),f=D=>{const X=D.substring(D.indexOf("(")+1,D.indexOf(")")).split(",").map(Q=>n.trim(Q));return X.length===3&&X.push("1"),X},h=(D,O)=>{const X=D||p.value,{color:Q}=t,R=O==="hex"?X:Q.getValueFormat(X,"hex"),C=Q.getValueFormat(X,"rgb"),k=Q.getValueFormat(X,"hsl"),b=Q.getValueFormat(X,"hsv");i.hex=R,i.rgb=C,i.hsl=k,i.hsv=b,e.nextTick(()=>{u.value=R;const v=f(C);c.r=v[0],c.g=v[1],c.b=v[2],c.a=v[3];const _=f(k);r.h=_[0],r.s=_[1],r.l=_[2],r.a=_[3];const y=f(b);d.h=y[0],d.s=y[1],d.v=y[2],d.a=y[3]})},g=D=>{let O=m.typeList.indexOf(i.type);O+=D;const X=m.typeList.length;O<0?O=X-1:O>=X&&(O=0);const Q=m.typeList[O];i.type=Q,s("onChangeType",Q)},S=D=>{let O="";switch(D){case"hex":{u.value.length>0&&(O=u.value);break}case"rgb":{c.r.length>0&&c.g.length>0&&c.b.length>0&&c.a.length>0&&(O=`rgba(${c.r}, ${c.g}, ${c.b},${c.a})`);break}case"hsl":{r.h.length>0&&r.s.length>0&&r.l.length>0&&r.a.length>0&&(O=`hsla(${r.h}, ${r.s}, ${r.l},${r.a})`);break}case"hsv":{d.h.length>0&&d.s.length>0&&d.v.length>0&&d.a.length>0&&(O=`hsva(${d.h}, ${d.s}, ${d.v},${d.a})`);break}}if(O.length>0&&t.color.checkValue(O)){const X=t.color.getValueFormat(O,D);O!==X&&(h(O,D),e.nextTick(()=>{t.color.fromString(O)}),s("onChangeType",D))}},T=()=>{h()};e.onMounted(()=>{e.nextTick(()=>{T()})}),e.watch(()=>p.value,D=>{const O=t.color.getValueFormat(D,"rgb");i.rgb!==O&&h()});const w=()=>{S("hex")},E=()=>{S("rgb")},M=()=>{S("hsl")},V=()=>{S("hsv")},I=()=>{g(-1)},N=()=>{g(1)};return l({setType:D=>{i.type=D},clearInputs:()=>{u.value="",c.r="",c.g="",c.b="",c.a="",r.h="",r.s="",r.l="",r.a="",d.h="",d.s="",d.v="",d.a=""}}),(D,O)=>(e.openBlock(),e.createElementBlock("div",qm,[e.createElementVNode("div",null,[i.type==="hex"?(e.openBlock(),e.createElementBlock("div",Xm,[e.createElementVNode("div",null,[e.createVNode(Re,{value:u.value,"onUpdate:value":O[0]||(O[0]=X=>u.value=X),isClean:!1,onOnChange:w},null,8,["value"]),O[13]||(O[13]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"十六进制",-1))])])):i.type==="rgb"?(e.openBlock(),e.createElementBlock("div",Gm,[e.createElementVNode("div",null,[e.createVNode(Re,{value:c.r,"onUpdate:value":O[1]||(O[1]=X=>c.r=X),isClean:!1,onOnChange:E},null,8,["value"]),O[14]||(O[14]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"R",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.g,"onUpdate:value":O[2]||(O[2]=X=>c.g=X),isClean:!1,onOnChange:E},null,8,["value"]),O[15]||(O[15]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"G",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.b,"onUpdate:value":O[3]||(O[3]=X=>c.b=X),isClean:!1,onOnChange:E},null,8,["value"]),O[16]||(O[16]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"B",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.a,"onUpdate:value":O[4]||(O[4]=X=>c.a=X),isClean:!1,onOnChange:E},null,8,["value"]),O[17]||(O[17]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):i.type==="hsl"?(e.openBlock(),e.createElementBlock("div",Qm,[e.createElementVNode("div",null,[e.createVNode(Re,{value:r.h,"onUpdate:value":O[5]||(O[5]=X=>r.h=X),isClean:!1,onOnChange:M},null,8,["value"]),O[18]||(O[18]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:r.s,"onUpdate:value":O[6]||(O[6]=X=>r.s=X),isClean:!1,onOnChange:M},null,8,["value"]),O[19]||(O[19]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:r.l,"onUpdate:value":O[7]||(O[7]=X=>r.l=X),isClean:!1,onOnChange:M},null,8,["value"]),O[20]||(O[20]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"L",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:r.a,"onUpdate:value":O[8]||(O[8]=X=>r.a=X),isClean:!1,onOnChange:M},null,8,["value"]),O[21]||(O[21]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):i.type==="hsv"?(e.openBlock(),e.createElementBlock("div",Zm,[e.createElementVNode("div",null,[e.createVNode(Re,{value:d.h,"onUpdate:value":O[9]||(O[9]=X=>d.h=X),isClean:!1,onOnChange:V},null,8,["value"]),O[22]||(O[22]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:d.s,"onUpdate:value":O[10]||(O[10]=X=>d.s=X),isClean:!1,onOnChange:V},null,8,["value"]),O[23]||(O[23]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:d.v,"onUpdate:value":O[11]||(O[11]=X=>d.v=X),isClean:!1,onOnChange:V},null,8,["value"]),O[24]||(O[24]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"V",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:d.a,"onUpdate:value":O[12]||(O[12]=X=>d.a=X),isClean:!1,onOnChange:V},null,8,["value"]),O[25]||(O[25]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))]),e.createElementVNode("div",null,[e.createVNode(fe,{name:"caret-up",onClick:I}),e.createVNode(fe,{name:"caret-down",onClick:N})])]))}}),tp={key:0,class:"panel-colorpicker-copy-icon"},kl=e.defineComponent({name:"ClColorPickerCopy",__name:"Copy",props:{className:String,color:String,getTxtCallback:Function},setup(a){const l=a,o=e.useSlots(),t=e.reactive({isHover:!1}),s=e.computed(()=>!n.isUndefined(o.default)),i=e.computed(()=>{let d=!1;return s.value?d=t.isHover:d=!0,d}),u=e.computed(()=>{const d={"panel-colorpicker-copy":!0,"panel-colorpicker-copy-hover":t.isHover},{className:m}=l;return m&&!n.isEmpty(m)&&m.split(" ").forEach(p=>{n.isEmpty(p)||(d[p]=!0)}),d}),c=()=>{s.value&&(t.isHover=!0)},r=()=>{s.value&&(t.isHover=!1)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onMouseenter:c,onMouseleave:r},[e.renderSlot(d.$slots,"default"),i.value?(e.openBlock(),e.createElementBlock("div",tp,[e.createVNode(tn,{textLabel:a.getTxtCallback||a.color||""},null,8,["textLabel"])])):e.createCommentVNode("",!0)],34))}}),np={class:"panel-colorpicker-container"},op={key:0},ap={key:0,class:"panel-colorpicker-format"},lp={class:"panel-colorpicker-format-show"},sp={key:1,class:"panel-colorpicker-operate"},Sl=e.defineComponent({name:"ClColorPickerBase",__name:"Color",props:{value:String,disabled:{type:Boolean,default:!1},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isDropdown:{type:Boolean,default:!0}},emits:{onChange:a=>!0,onSubmit:()=>!0,onInit:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=e.useTemplateRef("refElColorResult"),r=e.useTemplateRef("refElColorValue"),d=e.reactive({isShowColorResult:!1,colorResult:"",formatShow:"hex"}),m=e.reactive(new Um({value:t.value,format:"",enableAlpha:!0})),p={isColorChangeResult:!0},f=()=>m.get("alpha").toString()==="100"?"hex":"rgb",h=(D,O=!0)=>{let X="";D&&!n.isEmpty(D)&&d.isShowColorResult&&(X=m.getValueFormat(D,d.formatShow)),d.colorResult=X,O&&s("onChange",X)},g=D=>{D&&!n.isEmpty(D)?(d.isShowColorResult=!0,m.fromString(D),h(m.value,!1)):(d.isShowColorResult=!1,p.isColorChangeResult=!1,h("",!1),m.fromString(""),e.nextTick(()=>{p.isColorChangeResult=!0}))},S=()=>{const{value:D}=t;g(D),s("onInit")};e.onMounted(()=>{e.nextTick(()=>{S()})}),e.watch(()=>t.value,D=>{g(D)}),e.watch(()=>m.value,D=>{n.isEmpty(t.value)&&(d.isShowColorResult=!0),p.isColorChangeResult&&h(D),p.isColorChangeResult=!0});const T=()=>m.getValueFormat(m.value,d.formatShow),w=D=>{m.fromString(D)},E=D=>{d.formatShow=D,h(m.value,!1)},M=()=>{const D=t.value||"";d.isShowColorResult=!n.isEmpty(D),n.isEmpty(D)?m.set({hue:0,saturation:0,value:100,alpha:100}):(p.isColorChangeResult=!1,h(D),m.fromString(D))},V=()=>{m.set({hue:0,saturation:0,value:100,alpha:100})},I=()=>{s("onSubmit")};return l({getValue:()=>{let D=d.colorResult;if(D.length>0){const O=f();D=m.getValueFormat(D,O)}return D},setValue:D=>{g(D)},initValueType:()=>{const D=f();d.formatShow=D,r.value&&r.value.setType(D)}}),(D,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["panel-colorpicker-wrapper",{"panel-colorpicker-wrapper-disabled":a.disabled}])},[e.createElementVNode("div",np,[e.createElementVNode("div",null,[e.createVNode(Jm,{color:m},null,8,["color"]),e.createVNode(Km,{color:m},null,8,["color"])]),a.isAlpha?(e.openBlock(),e.createElementBlock("div",op,[e.createVNode(Wm,{color:m},null,8,["color"]),O[0]||(O[0]=e.createElementVNode("div",null,null,-1))])):e.createCommentVNode("",!0)]),a.isFormat?(e.openBlock(),e.createElementBlock("div",ap,[e.createElementVNode("div",lp,[e.createVNode(kl,{className:"panel-colorpicker-tip-current",getTxtCallback:T},{default:e.withCtx(()=>[e.createVNode(Ks,{color:m.value},null,8,["color"])]),_:1})]),e.createVNode(ep,{ref_key:"refElColorValue",ref:r,color:m,onOnChangeType:E},null,8,["color"])])):e.createCommentVNode("",!0),a.isOperate?(e.openBlock(),e.createElementBlock("div",sp,[e.createElementVNode("div",{ref_key:"refElColorResult",ref:c},e.toDisplayString(d.colorResult),513),e.createElementVNode("div",null,[e.createElementVNode("div",{onClick:M},[e.createVNode(fe,{name:"restore",title:e.unref(i).restore},null,8,["title"])]),e.createElementVNode("div",{onClick:V},[e.createVNode(fe,{name:"clear",title:e.unref(i).clearEmpty},null,8,["title"])]),e.createVNode(kl,{color:d.colorResult},null,8,["color"]),a.isDropdown?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:I},[e.createVNode(fe,{name:"check",title:e.unref(i).submit},null,8,["title"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),a.isPreset?(e.openBlock(),e.createBlock(Ym,{key:2,onOnClick:w})):e.createCommentVNode("",!0)],2))}}),ip={class:"panel-colorpicker-dropdown-text"},rp={key:0,class:"panel-colorpicker-dropdown-arrow"},Ws=e.defineComponent({name:"ClColorPicker",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isDropdown:{type:Boolean,default:!0},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:a=>!0,onInit:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=t.id,i=o,u=e.useTemplateRef("refElDropdownLayer"),c=e.useTemplateRef("refElColorpicker"),r=e.reactive({isInitShow:!t.isDropdown,dropdownTextValue:"",currentValue:""}),d={lastValue:""},m=e.computed(()=>{let L="panel-colorpicker ";const{className:D}=t;return D&&!n.isEmpty(D)&&(L+=D),t.isPlaintext&&(L+="cl-plaintext-static "),L}),p=()=>{const L=r.currentValue;let D=!1;t.isDropdown?D=L!==d.lastValue:D=!0,D&&(d.lastValue=L,i("update:value",L),i("update:modelValue",L),i("onChange",L))},f=L=>{let D="transparent";L&&!n.isEmpty(L)&&(D=L),r.dropdownTextValue=D},h=L=>{const D=L||"";d.lastValue=D,t.isDropdown||(r.currentValue=D),f(D)},g=()=>{const L=c.value.getValue();r.dropdownTextValue=L,r.currentValue=L,p()},S=()=>{h(t.value)};e.watch(()=>t.value,L=>{h(L)}),e.onMounted(()=>{e.nextTick(()=>{S()})});const T=()=>{i("onInit")},w=L=>{t.disabled||(L?c.value&&c.value.initValueType():t.isOperate?r.currentValue!==c.value.getValue()&&r.currentValue===d.lastValue&&c.value.setValue(d.lastValue):g())},E=()=>{r.isInitShow=!0,r.currentValue=d.lastValue},M=()=>{t.isDropdown||g()},V=()=>{g(),t.isDropdown&&u.value&&u.value.setOpen(!1)};return l({getValue:()=>r.currentValue,getValueData:()=>({value:r.currentValue}),setValue:L=>{h(L)}}),(L,D)=>a.isDropdown?(e.openBlock(),e.createBlock(uo,{key:0,ref_key:"refElDropdownLayer",ref:u,id:e.unref(s),classParent:m.value,classDropDown:"panel-colorpicker-dropdown",isUseDropdownArrow:!0,isDisabled:a.disabled,onOnChangeOpen:w,onOnOpenComplete:E},{label:e.withCtx(()=>[e.createElementVNode("div",ip,[D[0]||(D[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({"background-color":r.dropdownTextValue})},null,4),a.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("div",rp,[e.createVNode(fe,{name:"angle-down"})]))])]),dropdown:e.withCtx(()=>[r.isInitShow?(e.openBlock(),e.createBlock(Sl,{key:0,ref_key:"refElColorpicker",ref:c,value:r.currentValue,isAlpha:a.isAlpha,isFormat:a.isFormat,isOperate:a.isOperate,isPreset:a.isPreset,isDropdown:a.isDropdown,onOnChange:M,onOnSubmit:V,onOnInit:T},null,8,["value","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)]),_:1},8,["id","classParent","isDisabled"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(m.value)},[r.isInitShow?(e.openBlock(),e.createBlock(Sl,{key:0,ref_key:"refElColorpicker",ref:c,value:r.currentValue,disabled:a.disabled,isAlpha:a.isAlpha,isFormat:a.isFormat,isOperate:a.isOperate,isPreset:a.isPreset,isDropdown:a.isDropdown,onOnChange:M,onOnSubmit:V,onOnInit:T},null,8,["value","disabled","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)],2))}}),cp={class:"imgCropper-container"},up={style:{position:"relative"}},dp={class:"imgCropper-main"},mp={class:"frame-alignline"},pp={class:"imgCropper-btns"},fp={key:0,class:"imgCropper-upload"},hp=["id","name"],gp=["for"],vp={class:"imgCropper-btns-opt"},yp={key:0,class:"imgCropper-loading-mask"},kp=["src"],Sp={key:0,class:"imgCropper-loading-mask"},bp={key:0,class:"frame-alignline"},bl=e.defineComponent({name:"ClCropperBase",__name:"Base",props:{className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},isCenterBox:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onImgLoad:a=>!0,onImgSave:()=>!0},setup(a,{expose:l,emit:o}){const t=e.defineAsyncComponent(()=>import("cropper-next-vue").then(F=>(Promise.resolve().then(()=>require("./index-Dyvby5gX.cjs")),F.VueCropper))),s=a,i=o,u=n.getRandom(8),c=`cropperBase-${u}`,r=e.useTemplateRef("refElCropper"),d=e.ref(!1),m=e.reactive({uploadAgainId:`btnImgCropper_uploadAgain_${u}`,isInitImageLoading:!1}),p=e.reactive({img:"",wrapper:{width:400,height:400},cropLayout:{width:s.width,height:s.height},color:s.fillColor,outputSize:1,outputType:"png",full:!0,original:!1,maxSideLength:3e3,mode:"contain",centerBox:s.isCenterBox,centerWrapper:!1}),f=e.reactive({src:"",style:{},pStyle:{}}),h=e.ref({}),g=e.ref(0),S=e.ref(0),T=e.ref(!0),w=e.computed(()=>{const{alignLine:F}=s;return n.isNonEmptyString(F)?F.split(","):[]}),E=e.computed(()=>{const F={"panel-imgCropper":!0};return n.getJsonMerge(F,ue.getClassNameJson(s.className))}),M=e.computed(()=>{const{previewShape:F}=s,P=n.isNonEmptyString(F)?F:"square",H={"imgCropper-preview":!0};return H[`imgCropper-preview-${P}`]=!0,H}),V=e.computed(()=>({width:`${(s.width??0)+6}px`,height:`${(s.height??0)+6}px`,backgroundColor:s.fillColor})),I=()=>{p.cropLayout={width:Math.max(1,s.width??1),height:Math.max(1,s.height??1)}},N=()=>{const{src:F}=s;let P="";if(n.isNonEmptyString(F)){if(F.substring(0,5)!=="data:")if(/^(http|https):\/\/[^\s]+$/.test(F)){const H=`_t=${new Date().getTime()}`,$=F.indexOf("?")===-1?"?":"&";P=F+$+H}else P=F;else P=F;m.isInitImageLoading=!0,S.value=0,g.value=0}else m.isInitImageLoading=!1;p.img=P},x=()=>{I(),N()};e.onMounted(()=>{e.nextTick(()=>{x()})}),e.onBeforeUnmount(()=>{T.value=!1}),e.watch(()=>s.src,(F,P)=>{F!==P&&N()}),e.watch(()=>[s.width,s.height,s.fillColor,s.isCenterBox],([F,P,H,$],[z,oe,Z,W])=>{(F!==z||P!==oe)&&I(),H!==Z&&(p.color=H),$!==W&&(p.centerBox=$)});const L=F=>{if(!F)return;const{url:P,img:H,w:$,h:z}=F;f.src=P??"",f.style=H??{},f.pStyle={width:typeof $=="number"?`${$}px`:`${s.width}px`,height:typeof z=="number"?`${z}px`:`${s.height}px`};const oe=H?.transform?.match(/scale\(([^)]+)\)/);oe&&(g.value=parseFloat(oe[1]),S.value||(S.value=g.value));const Z=$??s.width,W=z??s.height;if(Z>0&&W>0&&(Z>s.width||W>s.height)){const Y=Math.min(s.width/Z,s.height/W);h.value={transform:`scale(${Y})`}}else h.value={}},D=F=>{if(!F){m.isInitImageLoading=!1,i("onImgLoad",!1);return}const P=F.type==="success";m.isInitImageLoading=!1,i("onImgLoad",P)},O=F=>{const P=F.currentTarget;!P||!P.files||P.files.length===0||(S.value=0,g.value=0,m.isInitImageLoading=!0,n.getBase64ByFile(P.files).then(H=>{if(T.value){if(!H){m.isInitImageLoading=!1;return}p.img=H}}).catch(()=>{T.value&&(m.isInitImageLoading=!1)}))},X=()=>{},Q=()=>{r.value?.zoomIn(.02)},R=()=>{r.value?.zoomOut(.02)},C=()=>{r.value?.rotateLeft()},k=()=>{r.value?.rotateRight()},b=()=>{r.value&&(m.isInitImageLoading=!0,r.value.reload())},v=()=>{i("onImgSave")};return l({getImageBase64:()=>r.value?r.value.getCropData("base64"):Promise.reject(new Error("vue-cropper 实例未就绪")),refresh:()=>{if(!r.value){ve.warn("ClCropperBase","refresh 调用无效:vue-cropper 实例未就绪");return}r.value.reload()},loadingStart:()=>{d.value=!0},loadingStop:()=>{d.value=!1}}),(F,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.value),id:c},[e.createElementVNode("div",cp,[e.createElementVNode("div",up,[e.createElementVNode("div",dp,[e.createVNode(e.unref(t),e.mergeProps({ref_key:"refElCropper",ref:r},p,{onRealTime:L,onImgLoad:D}),{loading:e.withCtx(()=>[...P[0]||(P[0]=[])]),_:1},16),e.createElementVNode("div",mp,[w.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[P[1]||(P[1]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),P[2]||(P[2]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):w.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[P[3]||(P[3]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),P[4]||(P[4]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),P[5]||(P[5]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),P[6]||(P[6]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])]),e.createElementVNode("div",pp,[e.createElementVNode("div",null,[a.isShowUpload?(e.openBlock(),e.createElementBlock("div",fp,[e.createElementVNode("input",{type:"file",id:m.uploadAgainId,name:m.uploadAgainId,accept:"image/jpg,image/jpeg,image/pjpeg,image/png,image/x-png",onChange:O},null,40,hp),e.createElementVNode("label",{for:m.uploadAgainId},[e.createElementVNode("span",{title:"重新上传",onClick:e.withModifiers(X,["stop"])},[e.createVNode(fe,{name:"upload"})])],8,gp)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("div",vp,[e.createElementVNode("span",{title:"放大","aria-label":"放大",role:"button",tabindex:"0",onClick:e.withModifiers(Q,["stop"])},[e.createVNode(fe,{name:"search-plus"})]),e.createElementVNode("span",{title:"缩小","aria-label":"缩小",role:"button",tabindex:"0",onClick:e.withModifiers(R,["stop"])},[e.createVNode(fe,{name:"search-minus"})]),e.createElementVNode("span",{title:"左转90°","aria-label":"左转90度",role:"button",tabindex:"0",onClick:e.withModifiers(C,["stop"])},[e.createVNode(fe,{name:"rotate-left"})]),e.createElementVNode("span",{title:"右转90°","aria-label":"右转90度",role:"button",tabindex:"0",onClick:e.withModifiers(k,["stop"])},[e.createVNode(fe,{name:"rotate-right"})]),e.createElementVNode("span",{title:"重置","aria-label":"重置",role:"button",tabindex:"0",onClick:e.withModifiers(b,["stop"])},[e.createVNode(fe,{name:"restore"})]),a.isShowSave?(e.openBlock(),e.createElementBlock("span",{key:0,title:"保存","aria-label":"保存",role:"button",tabindex:"0",onClick:e.withModifiers(v,["stop"])},[e.createVNode(fe,{name:"save"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),d.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",yp,[e.createVNode(He,{theme:"circleSpinner",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),a.isPreview?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(M.value),style:e.normalizeStyle(V.value)},[e.createElementVNode("div",{style:e.normalizeStyle(h.value)},[e.createElementVNode("div",{style:e.normalizeStyle(f.pStyle)},[e.createElementVNode("img",{src:f.src,style:e.normalizeStyle(f.style),alt:""},null,12,kp)],4),d.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",Sp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4),a.isPreviewAlignLine?(e.openBlock(),e.createElementBlock("div",bp,[w.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[P[7]||(P[7]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),P[8]||(P[8]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):w.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[P[9]||(P[9]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),P[10]||(P[10]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),P[11]||(P[11]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),P[12]||(P[12]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],2))}}),wp=["id"],Cp={style:{display:"flex","justify-content":"center"}},Ca=e.defineComponent({name:"ClCropper",__name:"Index",props:{id:String,className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isCenterBox:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isModal:{type:Boolean,default:!0},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onSubmit:a=>!0,onImgLoad:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id||`cropper-${n.getRandom(8)}`,u=e.useTemplateRef("refElModal"),c=e.useTemplateRef("refElCropper"),r=e.ref(!t.isModal),d=e.computed(()=>{const N={"panel-cropper":!0};return n.getJsonMerge(N,ue.getClassNameJson(t.className))}),m=e.computed(()=>{const{isModal:N,id:x,className:L,...D}=t;return t.isModal?{...D,isShowSave:!1}:D}),p=()=>c.value?c.value.getImageBase64():Promise.reject(new Error("Cropper 未挂载")),f=(N,x,L)=>{s("onSubmit",{success:!x,data:N,msg:x}),L&&u.value?.hide()},h=()=>p().then(N=>{f(N,"",!0)}).catch(N=>{const x=n.isString(N)?N:N?.message||"裁剪失败";f("",x,!0)}),g=N=>{s("onImgLoad",N)},S=()=>p().then(N=>{f(N,"")}).catch(N=>{const x=n.isString(N)?N:N?.message||"保存失败";f("",x)});return l({getImageBase64:()=>p(),refresh:()=>{c.value?c.value.refresh():ve.warn("ClCropper","refresh 调用无效:Cropper 未挂载")},show:()=>{u.value&&t.isModal?(r.value=!0,u.value.show()):ve.warn("ClCropper","show 调用无效:非弹窗模式或 Modal 未挂载")},showAndReset:()=>{u.value&&t.isModal?(r.value=!1,u.value.show(),e.nextTick(()=>{r.value=!0})):ve.warn("ClCropper","showAndReset 调用无效:非弹窗模式或 Modal 未挂载")},loadingStart:()=>{c.value?c.value.loadingStart():ve.warn("ClCropper","loadingStart 调用无效:Cropper 未挂载")},loadingStop:()=>{c.value?c.value.loadingStop():ve.warn("ClCropper","loadingStop 调用无效:Cropper 未挂载")}}),(N,x)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(d.value)},[a.isModal?(e.openBlock(),e.createBlock(ka,{key:0,ref_key:"refElModal",ref:u,width:"850px",titleName:"图片裁切",isShowSubmitLoad:!1,closeLabel:"取消",submitLabel:"确定",onOnSubmit:h},{default:e.withCtx(()=>[e.createElementVNode("div",Cp,[r.value?(e.openBlock(),e.createBlock(bl,e.mergeProps({key:0,ref_key:"refElCropper",ref:c},m.value,{onOnImgLoad:g}),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),_:1},512)):(e.openBlock(),e.createBlock(bl,e.mergeProps({key:1,ref_key:"refElCropper",ref:c},m.value,{onOnImgLoad:g,onOnImgSave:S}),null,16))],10,wp))}}),qe={format:{img:["jpg","jpe","jpeg","png","gif","bmp","ico"],video:["mp4","rmvb","3gp","avi","asf","asf","dv","mov","mpg4","mpeg","mpg","wm","wmx","flv","mkv","mp4a","rm","wmv","swf","swfl"],audio:["mp3","ogg","wav","wma","mid","ra","ram"],zip:["rar","zip"],excel:["xls","xlsx","csv"],pdf:["pdf"],txt:["txt"],doc:["doc","docx"]},icon:{img:"image",video:"video",audio:"music",txt:"text",zip:"zip",excel:"excel",pdf:"pdf",doc:"word",default:"file"},suffix:{jpg:["jpg","jpe","jpeg"],jpe:["jpg","jpe","jpeg"],jpeg:["jpg","jpe","jpeg"],png:["png"],gif:["gif"],bmp:["bmp"],ico:["ico"],mp4:["mp4"],rmvb:["rmvb"],"3gp":["3gp"],avi:["avi"],asf:["asf"],dv:["dv"],mov:["mov"],mpg4:["mpg4"],mpeg:["mpeg"],mpg:["mpg"],wm:["wm"],wmx:["wmx"],flv:["flv"],mkv:["mkv"],mp4a:["mp4a"],rm:["rm"],wmv:["wmv"],swf:["swf"],swfl:["swfl"],mp3:["mp3"],ogg:["ogg"],wav:["wav"],wma:["wma"],mid:["mid"],ra:["ra"],ram:["ram"],rar:["rar"],zip:["zip"],txt:["txt"],xls:["xls","xlsx","csv"],xlsx:["xls","xlsx","csv"],csv:["xls","xlsx","csv"],pdf:["pdf"],doc:["doc","docx"]},mime:{jpg:["image/jpg","image/jpeg","image/pjpeg"],jpe:["image/jpg","image/jpeg","image/pjpeg"],jpeg:["image/jpg","image/jpeg","image/pjpeg"],png:["image/png","image/x-png"],gif:["image/gif"],bmp:["image/bmp"],ico:["ico"],mp4:["video/mp4"],rmvb:["audio/x-pn-realaudio"],"3gp":["video/3gpp"],avi:["video/x-msvideo"],asf:["video/x-ms-asf"],dv:["video/x-dv"],mov:["video/quicktime"],mpg4:["video/mp4"],mpeg:["video/mpeg"],mpg:["video/mpeg"],wm:["video/x-ms-wmv"],wmx:["video/x-ms-wmx"],flv:["video/x-flv"],mkv:["video/x-matroska"],mp4a:["audio/mp4"],rm:["audio/x-pn-realaudio"],wmv:["audio/x-ms-wmv"],swf:["application/x-shockwave-flash"],swfl:["application/x-shockwave-flash"],mp3:["audio/mpeg"],ogg:["audio/ogg"],wav:["audio/wav"],wma:["audio/x-ms-wma"],mid:["audio/midi"],ra:["audio/x-pn-realaudio"],ram:["audio/x-pn-realaudio"],rar:["application/x-rar-compressed"],zip:["application/zip","application/x-zip-compressed"],txt:["text/plain"],xls:["application/vnd.ms-excel","application/wps-office.xls"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/wps-office.xlsx"],csv:["text/csv"],pdf:["application/pdf"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},getFormatGroup:a=>{let l=[];return n.isNonEmptyString(a)&&(a.split(",").forEach(t=>{for(const[s,i]of Object.entries(qe.format))n.isExistValue(i,t.toLocaleLowerCase())&&l.push(s)}),l=n.getArrUnique(l)),l},getIcon:a=>{let l="";return n.isEmpty(a)?l=qe.icon.default:l=n.isExistJsonKey(qe.icon,a)?qe.icon[a]:qe.icon.default,l},getSuffix:a=>{let l=[];return n.isEmpty(a)||(a.forEach(o=>{const t=qe.suffix[o.toLocaleLowerCase()];n.isUndefined(t)||(l=l.concat(t))}),n.isEmpty(l)&&(l=a)),l=n.getArrUnique(l),l},getRegexBySuffix:a=>{if(n.isEmpty(a))return null;const l=`\\.(?:${a.join("|")})$`;return new RegExp(l,"i")},getMime:a=>{let l=[];return n.isEmpty(a)||a.forEach(o=>{const t=qe.mime[o];n.isUndefined(t)||(l=l.concat(t))}),l=n.getArrUnique(l),l},getRegexByMime:a=>{if(n.isEmpty(a))return null;const l=`^(?:${a.join("|").replace(/\//g,"\\/")})$`;return new RegExp(l,"i")},getImageThumbnail:(a,l,o)=>{let t=null;try{const s=document.createElement("canvas");s.width=l,s.height=o,s.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,l,o),t=s.toDataURL("image/gif")}catch{t=null}return t}},js=(a,l)=>{let o=a;const t=e.reactive({mime:[],suffix:[],isCheckImgWH:!1});let s=null;const i=w=>{o=n.getJsonMerge(o,w),c()},u=w=>{const E=o.checkMsg;return n.isString(E)&&!n.isEmpty(E)?E:n.isObject(E)&&!n.isEmpty(E[w])?E[w]:l.value[w]},c=()=>{const w=n.isNonEmptyString(o.checkFormat)?qe.getSuffix(o.checkFormat.split(",")):[],E=qe.getMime(w),M=!n.isEmpty(o.checkWidth)&&!n.isEmpty(o.checkHeight);t.mime=E,t.suffix=w,t.isCheckImgWH=M},r=w=>{const E=qe.getIcon(w);return{type:w,icon:E,isImage:w==="img",isVideo:w==="video",isAudio:w==="audio",isTxt:w==="txt",isZip:w==="zip"}},d=(w,E)=>{if(n.isUndefined(s)){s={};for(const[V,I]of Object.entries(qe.format)){const N=qe.getSuffix(I),x=qe.getMime(N),L=qe.getRegexBySuffix(N),D=qe.getRegexByMime(x);s[V]={suffix:N,mime:x,regSuffix:L,regMime:D}}}let M="";return Object.keys(s).forEach(V=>{if(M.length===0){const I=s[V];(I.regSuffix&&I.regSuffix.test(w)||E&&I.regMime&&I.regMime.test(E))&&(M=V)}}),r(M)},m=w=>{const E=qe.getFormatGroup(n.isEmpty(w)?o.checkFormat:w),M=E.length===1?E[0]:"";return r(M)},p=w=>{if(!n.isString(w))return d("");if(w.startsWith("data:")||w.startsWith("blob:")){const M=w.match(/^[a-z]+:([a-zA-Z0-9.+-]+\/[a-zA-Z0-9.+-]+)/);return d("",M?M[1]:"")}const E=w.substring(w.lastIndexOf("/")+1).split("?")[0].split("#")[0];return d(E)},f=(w,E,M,V,I)=>{const N=n.isFinite(M)&&M>0?M:0,x=n.isFinite(V)&&V>0?V:0;let L=I;(L==="height"||L==="contain")&&x===0&&(L="width");let D=1;switch(L){case"height":D=x>0?x/E:1;break;case"contain":D=Math.min(N>0?N/w:1,x>0?x/E:1);break;case"width":default:D=N>0?N/w:1;break}return D>1&&(D=1),{tw:Math.round(w*D),th:Math.round(E*D)}},h=(w,E,M,V)=>new Promise((I,N)=>{const x=document.createElement("img");x.onload=L=>{const D=L.target.width,O=L.target.height,{tw:X,th:Q}=f(D,O,E,M,V),R=L.target.src;I({src:R,w:D,h:O,tw:X,th:Q,isImage:!0})},x.onerror=()=>{N(new Error("fail: temp create image"))},x.src=w}),g=(w,E)=>{const M=n.isEmpty(o.checkWidth)?0:parseInt(o.checkWidth,10),V=n.isEmpty(o.checkHeight)?0:parseInt(o.checkHeight,10);if(!n.isFinite(M)||!n.isFinite(V)||M===0||V===0)return!0;let I=!0;switch(o.checkWHType){case"greater":I=w>=M&&E>=V;break;case"less":I=w<=M&&E<=V;break;case"equal":I=w===M&&E===V;break;default:I=!0;break}return I},S=(w,E)=>new Promise((M,V)=>{if(w instanceof File){const I=new FileReader;I.onload=N=>{h(N.target.result,E.maxWidth,E.maxHeight,E.imgFit).then(x=>{(t.isCheckImgWH?g(x.w,x.h):!0)?M(x):V(new Error(u("checkImageWHLabel")))}).catch(x=>{V(x)})},I.onerror=()=>{V(new Error("fail: new FileReader image onload()"))},I.readAsDataURL(w)}else V(new Error("fail: file is not a File instance"))}),T=async(w,E)=>{let M=[];const V=[],I=[],N=qe.getRegexBySuffix(t.suffix),x=qe.getRegexByMime(t.mime),L=Q=>{const R=n.isEmpty(Q)?NaN:parseInt(Q,10);return n.isFinite(R)?R*1024:null},D=L(o.checkMinSize),O=L(o.checkMaxSize),X=w.length;for(let Q=0;Q<X;Q+=1){const R=[],C=w[Q],k={suffix:!1,mime:!1,size:!1},b=C.name;N&&!N.test(b)&&(k.suffix=!0);const v=C.type;!n.isEmpty(v)&&x&&!x.test(v)&&(k.mime=!0),D&&C.size<D&&(k.size=!0),O&&C.size>O&&(k.size=!0),(k.suffix||k.mime)&&R.push(u("checkSuffixMimeLabel")),k.size&&R.push(u("checkSizeLabel"));const _=d(b,v);let y=null;_.isImage&&(y=await S(C,E).catch(B=>{R.push(B.message)})),n.isUndefined(y)&&(y={}),y=n.getJsonMerge(y,_),y.fileName=b,y.file=C,R.length===0?(V.push(C),I.push(y)):X===1?M=R.map(B=>`${u("uploadFile")} ${B}`):M.push(`${b}:${R.join(",")}`)}return new Promise(Q=>{setTimeout(()=>{Q({errorMsg:M,passFiles:V,passFilesInfo:I,original:w})},200)})};return c(),{optBase:t,getTypeByFormat:m,getTypeByUrl:p,createTempImg:h,checkFile:T,setBaseOptions:i}},Ys=()=>({setFileInfo:(l,o)=>{const t=o&&o.fileUrl?o.fileUrl:"";if(!n.isString(t))return{name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0};const s=n.isEmpty(t);let i="";s||t.startsWith("blob:")?i=l.fileName:i=t.substr(t.lastIndexOf("/")+1);let u="",c=0,r=0;return l.isImage&&(u=s?l.src:t,c=l.tw||0,r=l.th||0),{name:i,url:t,imgSrc:u,imgWidth:c,imgHeight:r}}}),qs=()=>{const a=(o,t)=>{window.open(o)};return{downloadHref:a,downloadBlob:o=>{if(!n.isEmpty(o)){const t=o.lastIndexOf("/"),s=o.substring(t+1),i=o.replace(/\\/g,"/"),u=new XMLHttpRequest;u.open("GET",i,!0),u.responseType="blob",u.onload=()=>{if(u.status===200){const c=window.URL||window.webkitURL||window,r=new Blob([u.response]),d=document.createElementNS("http://www.w3.org/1999/xhtml","a");d.href=c.createObjectURL(r),d.download=s,d.click(),setTimeout(()=>URL.revokeObjectURL(d.href),1e3)}else a(o)},u.onerror=()=>{a(o)},u.send()}}}},Ep=["name","accept"],Bp=["name"],xp={class:"fileUpload-label"},Tp={key:0,class:"fileUpload-img"},Dp={class:"fileUpload-img-container"},Ip=["src","width","height"],_p={key:0,class:"file-complete-img-msg"},Np=["title"],Vp=["title"],Mp={key:1,class:"fileUpload-video"},Op=["src"],Lp=["title"],$p={key:2,class:"fileUpload-file"},Ap=["title"],Fp={key:0,class:"fileUpload-load"},Pp=e.defineComponent({name:"ClFileUploadDefault",__name:"Default",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:a=>["equal","greater","less"].includes(a)},imgFit:{type:String,default:"width",validator:a=>["width","height","contain"].includes(a)},isServerCallback:Boolean,isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowCompleteMsg:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("fileUpload");const c=e.inject("$FileuploadTop",null);c||ve.warn("FileUpload","Default 主题缺少 $FileuploadTop 注入,使用空校验配置");const{setFileInfo:r}=Ys(),d=()=>n.getJsonMerge(c?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{optBase:m,getTypeByFormat:p,getTypeByUrl:f,createTempImg:h,checkFile:g,setBaseOptions:S}=js(d(),i),{downloadBlob:T,downloadHref:w}=qs(),E=e.useTemplateRef("refElTopParent"),M=()=>{const K=E.value;if(!K)return{maxWidth:0,maxHeight:0};const le=4,de=K.clientWidth>0?Math.max(K.clientWidth-le,0):0;let me=0;if(t.imgFit==="height"||t.imgFit==="contain"){const he=K.parentElement;he&&he.clientHeight>0&&(me=getComputedStyle(he).height==="auto"?0:Math.max(he.clientHeight-le,0))}return{maxWidth:de,maxHeight:me}},V=e.reactive({isImage:!1,isVideo:!1,icon:"",completeMsgTxt:"",isInitFileInput:!0,runOperateType:"init"}),I=e.reactive({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),N={file:null};let x=0,L=null;const D=`fileUpload_${n.getRandom(8)}`,O=e.computed(()=>{let K=t.name;return n.isEmpty(K)&&(K=`fileUpload_${n.getRandom(8)}`),K}),X=e.computed(()=>{let K={"fileUpload-default":!0};return K=n.getJsonMerge(K,ue.getClassNameJson(t.className)),K}),Q=e.computed(()=>({"fileUpload-wait":!0,"fileUpload-disabled":t.disabled})),R=e.computed(()=>({"fileUpload-complete":!0,"fileUpload-disabled":t.disabled})),C=K=>{s("onChange",K)},k=K=>{s("onError",K)},b=()=>{s("onRemove")},v=(K,le)=>{s("onPreview",K,le)},_=(K,le)=>{s("onSaveFile",K,le)},y=K=>{V.isImage=K.isImage,V.isVideo=K.isVideo,V.icon=K.icon},B=()=>{const K=p();n.isNonEmptyString(t.defaultIcon)&&(K.icon=t.defaultIcon),y(K)},A=K=>{K!=="load"&&(V.isInitFileInput=!0);let le="";switch(K){case"remove":case"clean":{le="init",B();break}case"fail":{let de=!0;V.isImage?(!n.isEmpty(I.url)||!n.isEmpty(I.imgSrc))&&(de=!1):n.isEmpty(I.url)||(de=!1),le=de?"init":"complete";break}default:le=K}V.runOperateType=le},F=K=>{const le=I;for(const[de,me]of Object.entries(K))n.isUndefined(le[de])||(le[de]=me);N.file=K.file??N.file},P=(K,le)=>{oe(),y(K);const de=r(K,le);F(de),A("complete")},H=()=>{let K=null;return n.isString(I.url)&&I.url.startsWith("blob:")?K=N.file:n.isEmpty(I.url)?V.isImage&&!n.isEmpty(I.imgSrc)?K=I.imgSrc:K=N.file:K=I.url,n.isUndefined(K)&&(K=""),K},$=K=>{if(K.length>0&&V.runOperateType!=="load"){V.isInitFileInput=!1,A("load"),x+=1;const le={...M(),imgFit:t.imgFit};g(K,le).then(de=>{if(V.runOperateType==="load")if(de.passFiles.length>0){const me=de.passFiles[0],he=de.passFilesInfo[0];if(he.isImage)t.isServerCallback?(_(me,he),W()):(P(he,{}),N.file=me,C(he.src));else if(t.isServerCallback)_(me,he),W();else{const Ce={};if(he.isVideo){const be=URL.createObjectURL(me);Ce.fileUrl=be}P(he,Ce),N.file=me,C(me)}}else A("fail"),de.errorMsg.length>0&&k(de.errorMsg)}).catch(()=>{V.runOperateType==="load"&&(A("fail"),k(["文件校验失败,请重试"]))})}},z=K=>{if(!n.isNonEmptyString(K)){(n.isString(K)||n.isUndefined(K))&&Y();return}const le=++x,de=f(K);if(V.isImage&&de.isImage){const{maxWidth:me,maxHeight:he}=M();h(K,me,he,t.imgFit).then(Ce=>{if(le!==x)return;const be=n.getJsonMerge(Ce,de);P(be,{fileUrl:K})}).catch(()=>{le===x&&(A("fail"),k(["图片加载失败,请检查图片地址"]))})}else P(de,{fileUrl:K})},oe=()=>{n.isString(I.url)&&I.url.startsWith("blob:")&&URL.revokeObjectURL(I.url)},Z=()=>{L&&(clearTimeout(L),L=null)},W=()=>{Z(),L=setTimeout(()=>{V.runOperateType==="load"&&(A("fail"),k(["服务端保存超时,请重试"]))},6e4)},Y=()=>{x+=1,N.file=null,F({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),A("init")},q=()=>{if(n.isEmpty(t.value)){B();return}y(f(t.value))},J=()=>{let K=t.defaultHoverTitle;V.isImage&&m.isCheckImgWH&&n.isEmpty(K)&&(K=`${t.checkWidth}x${t.checkHeight}`),V.completeMsgTxt=K},U=()=>{q(),J(),z(t.value)};e.onMounted(()=>{e.nextTick(()=>{U()})}),e.watch(()=>t.value,(K,le)=>{if(K!==le){const de=H();K!==de&&(Z(),q(),z(K))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{if(Z(),S(d()),q(),J(),V.runOperateType==="load")return;const K=H();t.value===K&&z(t.value)});const ae=K=>{K.preventDefault(),K.stopPropagation(),!t.disabled&&K.dataTransfer&&$(K.dataTransfer.files)},ee=K=>{t.disabled||$(K.currentTarget.files)},G=()=>{Z(),x+=1,oe(),N.file=null,F({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),A("remove");const K=document.getElementById(D);K&&(K.value=""),b()},ne=K=>{const le=n.isEmpty(I.url)?I.imgSrc:I.url;v(le,"image"),K.preventDefault(),K.stopPropagation()},j=K=>{n.isEmpty(I.url)||v(I.url,"video"),K.preventDefault(),K.stopPropagation()},te=K=>{n.isEmpty(I.url)?w(I.imgSrc,I.name):T(I.url),K.preventDefault(),K.stopPropagation()},re=K=>{if(n.isString(I.url)&&I.url.startsWith("blob:")){const le=document.createElement("a");le.href=I.url,le.download=I.name,le.click()}else T(I.url);K.preventDefault(),K.stopPropagation()};return l({saveServerCallback:K=>{if(Z(),V.runOperateType!=="load")return;if(!K||!K.res||!n.isBoolean(K.res.success)){A("fail"),k(["文件保存失败,请重试"]);return}if(!K.res.success){A("fail"),k(["文件保存失败,请重试"]);return}if(!K.req){A("fail"),k(["文件保存失败,请重试"]);return}let le="";if(n.isString(K.res.fileUrl)?le=K.res.fileUrl:n.isArray(K.res.fileUrl)&&K.res.fileUrl.length>0&&n.isString(K.res.fileUrl[0])&&(le=K.res.fileUrl[0]),n.isEmpty(le)){N.file=null,F({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),A("init");return}P(K.req,{fileUrl:le}),C(le)},getValue:()=>H(),cleanReduction:()=>{Z(),x+=1,oe(),N.file=null,F({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),A("clean")}}),e.onBeforeUnmount(()=>{Z(),oe()}),(K,le)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(X.value),ref_key:"refElTopParent",ref:E},[e.createElementVNode("div",{class:"fileUpload-default-container",onDrop:ae,onDragover:le[0]||(le[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("label",{for:D},[V.isInitFileInput&&!a.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:D,name:O.value,onChange:ee,accept:e.unref(m).mime.join(",")},null,40,Ep)):(e.openBlock(),e.createElementBlock("input",{key:1,id:D,name:O.value,style:{display:"none !important"}},null,8,Bp)),V.runOperateType==="init"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(Q.value)},[e.createVNode(fe,{name:V.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",xp,[e.renderSlot(K.$slots,"label")])],2)):V.runOperateType==="complete"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(R.value)},[V.isImage?(e.openBlock(),e.createElementBlock("span",Tp,[e.createElementVNode("span",Dp,[e.createElementVNode("img",{src:I.imgSrc,width:I.imgWidth,height:I.imgHeight},null,8,Ip)]),a.isShowCompleteMsg?(e.openBlock(),e.createElementBlock("span",_p,e.toDisplayString(V.completeMsgTxt),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isShowPreview&&!a.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"preview-icon",title:e.unref(i).common.preview,onClick:e.withModifiers(ne,["stop"])},[e.createVNode(fe,{name:"search-plus"})],8,Np)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),a.isShowDownload&&!a.disabled?(e.openBlock(),e.createElementBlock("i",{key:4,class:"download-icon",title:e.unref(i).common.download,onClick:e.withModifiers(te,["stop"])},[e.createVNode(fe,{name:"download"})],8,Vp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])):V.isVideo?(e.openBlock(),e.createElementBlock("span",Mp,[e.createElementVNode("video",{src:I.url},null,8,Op),a.isShowPreview&&!a.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(j,["stop"])},[e.createVNode(fe,{name:"play"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isShowDownload&&!a.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"download-icon",title:e.unref(i).common.download,onClick:e.withModifiers(re,["stop"])},[e.createVNode(fe,{name:"download"})],8,Lp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock("span",$p,[e.createVNode(fe,{name:V.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(I.name),1)])),a.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)):(e.openBlock(),e.createElementBlock("a",{key:3,class:"file-complete-remove",href:"javascript:",title:e.unref(i).common.delete,onClick:e.withModifiers(G,["stop"])},[e.createVNode(fe,{name:"close"})],8,Ap))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))])],32),V.runOperateType==="load"?(e.openBlock(),e.createElementBlock("div",Fp,[e.createVNode(He,{theme:"circleBubble",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))}}),Rp=["id","name","multiple","accept"],Hp=["id","name","disabled","accept"],zp=["for"],Up={key:0,class:"fileUpload-list"},Jp={key:0,class:"fileUpload-item-icon fileUpload-item-img"},Kp=["src"],Wp=["title","onClick"],jp={key:1,class:"fileUpload-item-icon fileUpload-item-video"},Yp=["src"],qp=["onClick"],Xp={class:"fileUpload-item-name"},Gp={class:"fileUpload-item-operate"},Qp=["title","onClick"],Zp=["title","onClick"],ef=e.defineComponent({name:"ClFileUploadButton",__name:"Button",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},isMultiple:Boolean,buttonClass:String,buttonLabel:String,buttonIcon:{type:String,default:""},buttonColor:{type:String,default:"default"},checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:a=>["equal","greater","less"].includes(a)},isServerCallback:Boolean,isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`fileupload-${n.getRandom(5)}`,{optPageLanguage:u,getPageLanguage:c}=Ae();c("fileUpload");const r=e.inject("$FileuploadTop",null);r||ve.warn("FileUpload","Button 主题缺少 $FileuploadTop 注入,使用空校验配置");const d=()=>n.getJsonMerge(r?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{setFileInfo:m}=Ys(),{optBase:p,getTypeByUrl:f,checkFile:h,setBaseOptions:g}=js(d(),u),{downloadBlob:S,downloadHref:T}=qs(),w=e.useTemplateRef("refElButton"),E=e.useTemplateRef("refElLabel"),M=n.getRandom(8),V=e.reactive({elFileId:`btnFile${M}`,isInitFileInput:!0}),I=e.ref([]),N=e.ref([]);let x=null,L=null,D=null;const O=e.computed(()=>{let ee=t.name;return n.isEmpty(ee)&&(ee=`fileUpload_${n.getRandom(8)}`),ee}),X=e.computed(()=>{let ee={"fileUpload-button":!0};return ee=n.getJsonMerge(ee,ue.getClassNameJson(t.className)),ee}),Q=(ee,G)=>{s("onChange",ee,G)},R=ee=>{s("onError",ee)},C=()=>{s("onRemove")},k=(ee,G,ne)=>{s("onPreview",ee,G,ne)},b=(ee,G)=>{s("onSaveFile",ee,G)},v=()=>{_(),x=setTimeout(()=>{x=null,V.isInitFileInput||(B("fail"),R(["服务端保存超时,请重试"]))},6e4)},_=()=>{x&&(clearTimeout(x),x=null)},y=()=>{I.value.forEach(ee=>{n.isString(ee.url)&&ee.url.startsWith("blob:")&&URL.revokeObjectURL(ee.url)})},B=ee=>{switch(ee){case"load":t.isShowUploadIng&&w.value?.loadStart();break;case"fail":case"complete":t.isShowUploadIng&&w.value?.loadStop();break}V.isInitFileInput=ee!=="load"},A=(ee,G)=>{t.isMultiple||(y(),I.value=[]);const ne=[],j=[];I.value.forEach(te=>{ne.push(te),j.push(te.rId)});for(let te=0;te<ee.length;te++){let re=G.length>te?{fileUrl:G[te]}:{};n.isEmpty(re.fileUrl)&&ee[te].isVideo&&ee[te].file&&(re={fileUrl:URL.createObjectURL(ee[te].file)});let pe=m(ee[te],re);pe.rId=n.getRandom(9),pe=n.getJsonMerge(ee[te],pe),ne.push(pe),j.push(pe.rId)}I.value=ne,B("complete"),e.nextTick(()=>{N.value=j})},F=()=>{const ee=[];return I.value.forEach(G=>{let ne=null;n.isString(G.url)&&G.url.startsWith("blob:")?ne=G.file:n.isEmpty(G.url)?G.isImage&&!n.isEmpty(G.imgSrc)?ne=G.imgSrc:ne=G.file:ne=G.url,n.isUndefined(ne)||ee.push(ne)}),ee.length===0?"":t.isMultiple?ee:ee[0]},P=ee=>{if(n.isArray(ee)){y(),I.value=[];const j=[],te=[];ee.forEach(re=>{if(n.isNonEmptyString(re)){const pe=f(re);j.push(pe),te.push(re)}}),A(j,te);return}if(!n.isNonEmptyString(ee)){n.isString(ee)&&H();return}y(),I.value=[];const G=[],ne=[];ee.split(",").filter(j=>n.isNonEmptyString(j)).forEach(j=>{const te=f(j);G.push(te),ne.push(j)}),A(G,ne)},H=()=>{y(),B("init"),I.value=[]},$=()=>{P(t.value)};e.onMounted(()=>{e.nextTick(()=>{$()})}),e.onBeforeUnmount(()=>{_(),L&&(clearTimeout(L),L=null),y()}),e.watch(()=>t.value,(ee,G)=>{if(ee!==G){const ne=F();ee!==ne&&(_(),P(ee))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{V.isInitFileInput&&_(),g(d())});const z=ee=>{t.disabled||V.isInitFileInput&&ee.currentTarget.files.length>0&&(B("load"),h(ee.currentTarget.files,{}).then(G=>{if(!V.isInitFileInput){if(G.passFiles.length>0)if(t.isServerCallback){const ne=t.isMultiple?G.passFiles:G.passFiles[0],j=t.isMultiple?G.passFilesInfo:G.passFilesInfo[0];b(ne,j),v()}else t.isMultiple?(A(G.passFilesInfo,[]),Q(G.passFiles,G.passFilesInfo)):(A(G.passFilesInfo,[]),Q(G.passFiles[0],G.passFilesInfo[0]));else G.errorMsg.length===0&&(B("fail"),R(["文件校验失败,请重试"]));G.errorMsg.length>0&&(R(G.errorMsg),G.passFiles.length===0&&B("fail"))}}).catch(()=>{V.isInitFileInput||(B("fail"),R(["文件校验失败,请重试"]))}))},oe=(ee,G)=>{const ne=n.isEmpty(ee.url)?ee.src:ee.url;k(ne,"image",G)},Z=(ee,G)=>{n.isEmpty(ee.url)||k(ee.url,"video",G)},W=ee=>{if(D===ee)return;D=ee,_(),V.isInitFileInput||B("complete");const G=I.value.find(re=>re.rId===ee);G&&n.isString(G.url)&&G.url.startsWith("blob:")&&URL.revokeObjectURL(G.url);const ne=[],j=[];I.value.forEach(re=>{re.rId!==ee&&(ne.push(re),j.push(re.rId))}),N.value=j;const te=document.getElementById(V.elFileId);te&&(te.value=""),e.nextTick(()=>{ne.length>0?(I.value=ne,D=null,C()):L=setTimeout(()=>{L=null,I.value=I.value.filter(re=>re.rId!==ee),D=null,C()},500)})},Y=ee=>{if(ee.isImage&&n.isEmpty(ee.url))T(ee.imgSrc,ee.name);else if(n.isString(ee.url)&&ee.url.startsWith("blob:")){const G=document.createElement("a");G.href=ee.url,G.download=ee.name,G.click()}else if(n.isEmpty(ee.url)&&ee.file){const G=URL.createObjectURL(ee.file),ne=document.createElement("a");ne.href=G,ne.download=ee.name,ne.click(),setTimeout(()=>{URL.revokeObjectURL(G)},1e3)}else S(ee.url)},q=()=>{E.value?.click()};return l({saveServerCallback:ee=>{if(_(),!V.isInitFileInput){if(n.isUndefined(ee)||n.isUndefined(ee.res)||!n.isBoolean(ee.res.success)||n.isUndefined(ee.req)){B("fail"),R(["文件保存失败,请重试"]);return}if(ee.res.success){let G=[];const ne=[];if(n.isNonEmptyString(ee.res.fileUrl)?(G.push(ee.res.fileUrl),ne.push(0)):n.isArray(ee.res.fileUrl)&&ee.res.fileUrl.forEach((ie,se)=>{n.isNonEmptyString(ie)&&(G.push(ie),ne.push(se))}),G.length===0){B("complete");return}const j=t.isMultiple?ee.req:[ee.req];let te=[],re=[];if(!t.isMultiple)te=G,re=j;else{const ie=I.value.map(se=>se.url).filter(se=>n.isNonEmptyString(se));G.forEach((se,K)=>{const le=ne[K];ie.indexOf(se)>-1||n.isUndefined(j[le])||(ie.push(se),te.push(se),re.push(j[le]))})}if(te.length===0){B("complete");return}A(re,te);const pe=t.isMultiple?te:te[0];Q(pe)}else B("fail"),R(["文件保存失败,请重试"])}},getValue:()=>F(),cleanReduction:()=>{_(),H()}}),(ee,G)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(X.value)},[V.isInitFileInput&&!a.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:V.elFileId,name:O.value,multiple:a.isMultiple,accept:e.unref(p).mime.join(","),onChange:z},null,40,Rp)):(e.openBlock(),e.createElementBlock("input",{key:1,id:V.elFileId,name:O.value,disabled:a.disabled,accept:e.unref(p).mime.join(","),style:{display:"none !important"},onChange:z},null,40,Hp)),e.createElementVNode("label",{ref_key:"refElLabel",ref:E,for:V.elFileId},[e.createVNode(Qe,{ref_key:"refElButton",ref:w,className:a.buttonClass,isShowBackDrop:!0,disabled:a.disabled,label:a.buttonLabel||e.unref(u).common.upload,iconName:a.buttonIcon,color:a.buttonColor,onOnClick:q},null,8,["className","disabled","label","iconName","color"])],8,zp)],2),e.renderSlot(ee.$slots,"label"),I.value.length>0&&a.isShowUploadResult?(e.openBlock(),e.createElementBlock("ul",Up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(ne,j)=>(e.openBlock(),e.createBlock(e.Transition,{key:`${ne.rId}-${j}`,name:"fileUploadButton","enter-active-class":"fileupload-anim-in","leave-active-class":"fileupload-anim-out"},{default:e.withCtx(()=>[N.value.indexOf(ne.rId)>-1?(e.openBlock(),e.createElementBlock("li",{key:`${i}-${ne.rId}-${j}`,class:"fileUpload-item"},[ne.isImage?(e.openBlock(),e.createElementBlock("span",Jp,[e.createElementVNode("img",{src:ne.imgSrc},null,8,Kp),a.isShowPreview?(e.openBlock(),e.createElementBlock("i",{key:0,class:"preview-icon",title:e.unref(u).common.preview,onClick:e.withModifiers(te=>oe(ne,j),["stop"])},[e.createVNode(fe,{name:"search-plus"})],8,Wp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):ne.isVideo?(e.openBlock(),e.createElementBlock("span",jp,[e.createElementVNode("video",{src:ne.url},null,8,Yp),a.isShowPreview?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(te=>Z(ne,j),["stop"])},[e.createVNode(fe,{name:"play"})],8,qp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createBlock(fe,{key:2,name:ne.icon,class:"fileUpload-item-icon"},null,8,["name"])),e.createElementVNode("span",Xp,e.toDisplayString(ne.name),1),e.createElementVNode("span",Gp,[a.isShowDownload?(e.openBlock(),e.createElementBlock("i",{key:0,class:"download-icon",title:e.unref(u).common.download,onClick:e.withModifiers(te=>Y(ne),["stop"])},[e.createVNode(fe,{name:"download"})],8,Qp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)):(e.openBlock(),e.createElementBlock("a",{key:2,class:"file-complete-remove",href:"javascript:",title:e.unref(u).common.delete,onClick:e.withModifiers(te=>W(ne.rId),["stop"])},[e.createVNode(fe,{name:"close"})],8,Zp))])])):e.createCommentVNode("",!0)]),_:2},1024))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),tf=["id"],nf={key:0,class:"cl-plaintext-value"},of=["src","alt"],af=["src"],lf={key:0},Ea=e.defineComponent({name:"ClFileUpload",__name:"Index",props:{id:String,name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:a=>["default","button"].includes(a)},isMultiple:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,isShowCompleteMsg:{type:Boolean,default:!0},buttonClass:String,buttonLabel:String,buttonIcon:String,buttonColor:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal"},imgFit:{type:String,default:"width"},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},serverFileCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onRemove","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.inject("$ClGlobals",null),u=e.useAttrs(),c=t.id,r=e.useTemplateRef("refElFileDefault"),d=e.useTemplateRef("refElFileButton");let m=0,p=0;const f=e.computed(()=>n.isFunction(t.serverFileCallback)),h=["jpg","jpeg","png","gif","webp","bmp","svg"],g=["mp4","webm","ogg","ogv","mov","avi","mkv"],S=k=>{const b=k.split("?")[0].split("#")[0],v=b.split("/"),_=v.length>0?v[v.length-1]:b;return n.isEmpty(_)?k:decodeURIComponent(_)},T=e.computed(()=>{const k=t.value,b=Array.isArray(k)?k:n.isEmpty(k)?[]:[k],v=[];return b.forEach(_=>{if(n.isString(_)){n.isNonEmptyString(_)&&v.push({url:_,name:S(_),type:"file"});return}_&&n.isNonEmptyString(_.name)&&v.push({url:"",name:_.name,type:"file"})}),v.map(_=>{if(n.isEmpty(_.url))return _;const y=_.name.lastIndexOf("."),B=y>-1?_.name.slice(y+1).toLowerCase():"";let A="file";return h.indexOf(B)>-1?A="image":g.indexOf(B)>-1&&(A="video"),{..._,type:A}})}),w=e.computed(()=>T.value.filter(k=>k.type!=="file")),E=e.computed(()=>{const k=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return T.value.filter(b=>b.type==="file").map(b=>b.name).join(k)}),M=e.computed(()=>{let k={"panel-file-upload":!0};return k=n.getJsonMerge(k,ue.getClassNameJson(t.className)),k}),V=(k,b,v)=>{s("update:value",k),s("update:modelValue",k),s("onChange",b,v)},I=()=>{s("onRemove")},N=()=>{let k=null;switch(t.theme){case"default":k=r.value?.getValue();break;case"button":k=d.value?.getValue();break}return k},x=(k,b)=>{switch(k){case"default":r.value?.saveServerCallback(b);break;case"button":d.value?.saveServerCallback(b);break}},L=(k,b)=>{const v=N(),_=f.value?v:k;V(v,_,b)},D=k=>{n.isArray(k)&&s("onError",k)},O=()=>{p+=1,I();const k=N();V(k,k)},X=async(k,b,v)=>{i&&await i.preview.show({type:b,src:k,showIndex:v??0})},Q=async(k,b)=>{const v=t.theme,_=++m,y=p;let B=!0;if(t.serverFileCallback)try{const F=!t.isMultiple&&n.isObject(b)&&n.isBoolean(b.isImage)?b.isImage:!1,P=ue.getElementData(u);B=await t.serverFileCallback(k,F,P)}catch{_===m&&p===y&&t.theme===v&&x(v,{req:b,res:{success:!1}});return}let A={};if(n.isBoolean(B)?A.success=B:n.isUndefined(B)?A.success=!0:n.isString(B)||n.isArray(B)?(A.success=!0,A.fileUrl=B):n.isObject(B)?A=B:A.success=!1,t.theme!==v){s("onError",["保存期间主题已切换,本次保存结果未写入"]);return}_!==m||p!==y||x(v,{req:b,res:A})};return e.provide("$FileuploadTop",e.reactive({getFileCheckInfo:()=>({checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize})})),l({getValue:()=>N(),cleanReduction:()=>{switch(t.theme){case"default":r.value?.cleanReduction();break;case"button":d.value?.cleanReduction();break}V("","")}}),(k,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(M.value),id:e.unref(c)},[a.isPlaintext?(e.openBlock(),e.createElementBlock("div",nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(v,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`plain-${_}`},[v.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,src:v.url,alt:v.name,class:"cl-plaintext-media"},null,8,of)):(e.openBlock(),e.createElementBlock("video",{key:1,src:v.url,controls:"",class:"cl-plaintext-media"},null,8,af))],64))),128)),E.value?(e.openBlock(),e.createElementBlock("span",lf,e.toDisplayString(E.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),!a.isPlaintext&&a.theme==="button"?(e.openBlock(),e.createBlock(ef,{key:2,ref_key:"refElFileButton",ref:d,value:a.value,name:a.name,disabled:a.disabled,isMultiple:a.isMultiple,buttonClass:a.buttonClass,buttonLabel:a.buttonLabel,buttonIcon:a.buttonIcon,buttonColor:a.buttonColor,checkFormat:a.checkFormat,checkMinSize:a.checkMinSize,checkMaxSize:a.checkMaxSize,checkWidth:a.checkWidth,checkHeight:a.checkHeight,checkWHType:a.checkWHType,isServerCallback:f.value,isShowUploadResult:a.isShowUploadResult,isShowUploadIng:a.isShowUploadIng,isShowPreview:a.isShowPreview,isShowDownload:a.isShowDownload,onOnChange:L,onOnError:D,onOnRemove:O,onOnPreview:X,onOnSaveFile:Q},{label:e.withCtx(()=>[e.renderSlot(k.$slots,"label")]),_:3},8,["value","name","disabled","isMultiple","buttonClass","buttonLabel","buttonIcon","buttonColor","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","isServerCallback","isShowUploadResult","isShowUploadIng","isShowPreview","isShowDownload"])):!a.isPlaintext&&a.theme==="default"?(e.openBlock(),e.createBlock(Pp,{key:3,ref_key:"refElFileDefault",ref:r,value:a.value,name:a.name,disabled:a.disabled,defaultHoverTitle:a.defaultHoverTitle,defaultIcon:a.defaultIcon,isShowCompleteMsg:a.isShowCompleteMsg,checkFormat:a.checkFormat,checkMinSize:a.checkMinSize,checkMaxSize:a.checkMaxSize,checkWidth:a.checkWidth,checkHeight:a.checkHeight,checkWHType:a.checkWHType,imgFit:a.imgFit,isServerCallback:f.value,isShowPreview:a.isShowPreview,isShowDownload:a.isShowDownload,onOnChange:L,onOnError:D,onOnRemove:O,onOnPreview:X,onOnSaveFile:Q},{label:e.withCtx(()=>[e.renderSlot(k.$slots,"label")]),_:3},8,["value","name","disabled","defaultHoverTitle","defaultIcon","isShowCompleteMsg","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","imgFit","isServerCallback","isShowPreview","isShowDownload"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,tf))}}),sf=["id"],rf={class:"previewExample-image-icon"},cf={class:"previewExample-video-img previewExample-image"},uf=["onClick"],df={key:3,class:"previewExample-label-msg"},mf={key:5,class:"previewExample-totalCount"},Ba=e.defineComponent({name:"ClPreviewExample",__name:"Index",props:{id:String,className:String,classContainer:String,classItem:String,type:{type:String,default:"image",validator:a=>["image","video"].includes(a)},width:{type:[Number,String],default:"auto"},height:{type:Number,required:!0},isWidthFull:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},label:String,previewIconSize:{type:String,default:"large"},isShowLoading:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isShowDelete:{type:Boolean,default:!1},showNum:{type:Number,default:-1},srcValueKey:{type:String,default:"value"},isShowCopy:{type:Boolean,default:!0},isClickImagePreview:{type:Boolean,default:!1},previewCallback:Function},emits:["onDelete"],setup(a,{emit:l}){const o=a,t=l,s=e.inject("$ClGlobals",null),i=`previewexample-${n.getRandom(5)}`,u=o.id,c=e.reactive({totalCount:-1}),r=e.ref([]),d=e.computed(()=>{const{width:I}=o;let N=!1;return(n.isEmpty(I)||typeof I=="string"&&I==="auto"||typeof I=="number"&&I<=0)&&(N=!0),N}),m=e.computed(()=>{let I={"panel-preview-example":!0,"previewExample-width-default":o.isWidthFull,"previewExample-width-auto":!o.isWidthFull};return I=n.getJsonMerge(I,ue.getClassNameJson(o.className)),I}),p=e.computed(()=>{let I={"previewExample-container":!0};return I=n.getJsonMerge(I,ue.getClassNameJson(o.classContainer)),I}),f=e.computed(()=>{const{type:I,previewIconSize:N}=o;let x={"previewExample-item":!0};return x[`previewExample-${I}`]=!0,x[`previewExample-iconSize-${N}`]=!0,x=n.getJsonMerge(x,ue.getClassNameJson(o.classItem)),x}),h=e.computed(()=>{const I={height:`${o.height}px`};if(!d.value){let N=o.width.toString();N.indexOf("%")===-1&&(N=`${o.width}px`),I.width=N}return I}),g=I=>{t("onDelete",I)},S=()=>{const{list:I,showNum:N,srcValueKey:x}=o;let L=n.getListClone(I),D=I.length;N>0&&I.length>=N&&(D=N);const O=[];L.forEach((X,Q)=>{if(!n.isEmpty(X)&&Q+1<=D)if(n.isString(X))O.push({value:X});else{const R=n.isExistJsonKey(X,x)?X[x]:X.value;O.push({...X,value:R})}}),L=O,c.totalCount=I.length,r.value=L},T=()=>{S()},w=I=>{const N={};return n.isEmpty(I.id)||(N["data-id"]=I.id),n.isEmpty(I.ranId)||(N["data-ran-id"]=I.ranId),N};e.onMounted(()=>{e.nextTick(()=>{T()})}),e.watch(()=>o.list,()=>{S()},{deep:!0});const E=(I,N)=>{o.isClickImagePreview&&M(I,N,"image")},M=(I,N,x)=>{try{if(o.previewCallback)o.previewCallback(x,I,N);else{if(!s||n.isEmpty(s.preview))return;const{list:L}=o;let D;L.length===1?D=I.value:D=L.map(O=>n.isString(O)?O:O.value),s.preview.show({type:x,src:D,showIndex:N,isShowCopy:o.isShowCopy})}}catch{}},V=I=>{g(I)};return(I,N)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(m.value)},[e.createElementVNode("div",{class:e.normalizeClass(p.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(x,L)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:`${i}-${L}`,class:f.value,style:h.value},{ref_for:!0},w(x)),[a.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Et,{src:x.value,class:e.normalizeClass({"cursor-pointer":a.isClickImagePreview}),onClick:e.withModifiers(D=>E(x,L),["stop"])},null,8,["src","class","onClick"]),e.createElementVNode("div",rf,[e.createVNode(fe,{title:"预览",name:"search","aria-label":"预览",onClick:e.withModifiers(D=>M(x,L,"image"),["stop"])},null,8,["onClick"]),a.isShowDelete?(e.openBlock(),e.createBlock(fe,{key:0,title:"删除",name:"close","aria-label":"删除",onClick:e.withModifiers(D=>V(L),["stop"])},null,8,["onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],64)):a.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",cf,[x.imgUrl&&x.imgUrl.length>0?(e.openBlock(),e.createBlock(Et,{key:0,src:x.imgUrl},null,8,["src"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"previewExample-video-icon",onClick:e.withModifiers(D=>M(x,L,"video"),["stop"])},[e.createVNode(fe,{name:"play","aria-label":"播放"})],8,uf)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),a.label&&a.label.length>0||x.label&&x.label.length>0?(e.openBlock(),e.createElementBlock("div",df,e.toDisplayString(a.label&&a.label.length>0?a.label:x.label),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)),a.showNum>-1&&L===r.value.length-1&&c.totalCount>a.showNum?(e.openBlock(),e.createElementBlock("div",mf,[e.createElementVNode("span",null,"共"+e.toDisplayString(c.totalCount)+e.toDisplayString(a.type==="image"?"张":"个"),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[],64)),e.renderSlot(I.$slots,"extend",{data:x,inx:L})],16))),128)),a.isShowLoading&&a.isLoading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`previewExample-${a.type}`]),style:e.normalizeStyle(h.value)},[e.createVNode(He,{theme:"circleNotch",size:"large"})],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)],10,sf))}}),pf=["id"],ff={class:"cropperPreview-box-flex"},Xs=e.defineComponent({name:"ClCropperPreview",__name:"Index",props:{id:String,className:String,previewImageUrl:String,coverImageUrl:String,width:{type:Number,default:200},height:{type:Number,default:200},widthPreview:Number,heightPreview:Number,previewShape:{type:String,default:"square"},isCenterBox:{type:Boolean,default:!1},isShowUploadBtn:{type:Boolean,default:!0},getCropperImageUrl:Function,saveImageBase64:Function},emits:{onInitCoverImage:()=>!0,onError:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElCropper"),c=e.reactive({isEmptyPreviewUrl:!1,isEmptyCoverUrl:!1,isAgainCropper:!1,coverImageUrlOriginal:""});let r=!1;const d=e.computed(()=>{const{width:x,widthPreview:L}=t;return n.isFinite(L)?L:x}),m=e.computed(()=>{const{height:x,heightPreview:L}=t;return n.isFinite(L)?L:x}),p=e.computed(()=>({"panel-cropper-preview":!0,...ue.getClassNameJson(t.className)})),f=()=>{const{previewImageUrl:x}=t,L=n.isEmpty(x);c.isEmptyPreviewUrl=L,c.isAgainCropper=L},h=()=>{const{coverImageUrl:x}=t,L=n.isEmpty(x);c.isEmptyCoverUrl=L,c.coverImageUrlOriginal=L?"":x},g=()=>{const{width:x,height:L}=t;(x<=0||L<=0)&&ve.warn("ClCropperPreview","裁切区域宽高必须大于 0,当前值 width="+x+" height="+L)},S=()=>{f(),h(),g()};e.onMounted(()=>{e.nextTick(()=>{S()})}),e.watch(()=>t.previewImageUrl,()=>{f()}),e.watch(()=>t.coverImageUrl,()=>{h()});const T=x=>{x===!0&&s("onInitCoverImage")},w=(x,L)=>{if(!r){if(!(x instanceof File)){s("onError","文件读取失败,请重新选择图片");return}r=!0,u.value?.loadingStart(),n.getBase64ByFile([x]).then(D=>{const O=n.isNonEmptyString(D);c.isAgainCropper=!0,O?(c.coverImageUrlOriginal=D,c.isEmptyCoverUrl=!1):(c.isEmptyCoverUrl=n.isEmpty(c.coverImageUrlOriginal),s("onError","文件读取失败,请重新选择图片")),u.value?.loadingStop(),r=!1}).catch(D=>{u.value?.loadingStop(),r=!1,s("onError","文件读取失败,请重新选择图片")})}},E=()=>{c.isAgainCropper=!1},M=()=>{c.isAgainCropper=!0};return l({getValue:async()=>{let x="";try{x=u.value?String(await u.value.getImageBase64()||""):""}catch(L){ve.error("ClCropperPreview","getValue 获取裁切图片失败:",L)}return x},getCropperUrl:async x=>{let L="";try{if(u.value&&n.isFunction(t.getCropperImageUrl))L=await t.getCropperImageUrl(u.value,x);else{const{previewImageUrl:D,coverImageUrl:O}=t;L=n.isNonEmptyString(D)?D:O||""}}catch(D){ve.error("ClCropperPreview","getCropperUrl 调用失败:",D)}return L},getCoverUrlOriginal:async x=>{let L="";try{const{coverImageUrlOriginal:D}=c;if(D.startsWith("data:")&&n.isFunction(t.saveImageBase64)){const O=await t.saveImageBase64(D,x);L=O&&O.success?O.imageUrl:""}else/^(http|https):\/\/[^\s]+$/.test(D)&&(L=D)}catch(D){ve.error("ClCropperPreview","getCoverUrlOriginal 调用失败:",D)}return L}}),(x,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(i)},[e.createElementVNode("div",ff,[c.isEmptyPreviewUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c.isAgainCropper?(e.openBlock(),e.createBlock(Qe,{key:0,iconName:"reply",label:"返回",color:"transparent",onOnClick:E})):(e.openBlock(),e.createBlock(Qe,{key:1,iconName:"cropper",label:"重新裁切",color:"transparent",onOnClick:M}))],64)),a.isShowUploadBtn&&(c.isAgainCropper||c.isEmptyCoverUrl&&c.isEmptyPreviewUrl)?(e.openBlock(),e.createBlock(Ea,{key:2,theme:"button",checkFormat:"jpg,png",buttonIcon:"upload-cloud",buttonColor:"white",buttonLabel:"选择图片",isShowUploadResult:!1,isShowUploadIng:!1,onOnChange:w})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),!c.isEmptyPreviewUrl&&!c.isAgainCropper?(e.openBlock(),e.createBlock(Ba,{key:0,type:"image",list:[{value:a.previewImageUrl||"",imgUrl:"",label:""}],width:d.value,height:m.value},null,8,["list","width","height"])):c.isAgainCropper&&(!c.isEmptyPreviewUrl||!c.isEmptyCoverUrl)?(e.openBlock(),e.createBlock(Ca,{key:1,ref_key:"refElCropper",ref:u,previewShape:a.previewShape,isCenterBox:a.isCenterBox,src:c.coverImageUrlOriginal,width:a.width,height:a.height,isModal:!1,isShowUpload:!1,onOnImgLoad:T},null,8,["previewShape","isCenterBox","src","width","height"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,pf))}}),hf={key:0,class:"dropdownLayer-text-arrow"},gf=["title"],vf={key:0,class:"dropdownLayer-placeholder"},yf=["innerHTML"],kf={key:2},Sf={key:4,class:"dropdownLayer-text-arrow"},En=e.defineComponent({name:"ClDropdownlayerList",__name:"List",props:{id:String,classParent:[String,Object],classText:String,classDropDown:String,placeholder:String,isDisabled:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isClear:{type:Boolean,default:!1},textLabel:{type:String,default:""},textArrowDirection:{type:String,default:"right",validator:a=>["left","right"].includes(a)},dropdownArrowPos:{type:String,default:"left"},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:{onChangeOpen:a=>!0,onClear:()=>!0,onChangePosition:a=>!0,onOpenComplete:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElDropdownLayer"),c=e.computed(()=>n.isHtml(t.textLabel)),r=e.computed(()=>{const{textLabel:V}=t;return n.isString(V)?n.isHtml(V)?n.removeHTMLTags(V):V:""}),d=e.computed(()=>{let V={"dropdownLayer-theme-list":!0,"panel-dropdownlayerlist":!0};return V=n.getJsonMerge(V,ue.getClassNameJson(t.classParent)),V}),m=e.computed(()=>{let V={"dropdownLayer-dropdown-theme-list":!0};return V=n.getJsonMerge(V,ue.getClassNameJson(t.classDropDown)),V}),p=e.computed(()=>({"dropdownLayer-text-container":!0,"arrow-pos-left":t.textArrowDirection==="left"})),f=V=>{V&&E(),s("onChangeOpen",V)},h=V=>{s("onChangePosition",V)},g=()=>{s("onClear")},S=()=>{s("onOpenComplete")},T=V=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}u.value.setOpen(V)},w=()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return u.value.calculationPosition()},E=()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}u.value.initCompleteOpen()};return l({setOpen:T,calculationPosition:w,initCompleteOpen:E,checkIsShowOpen:()=>{if(!u.value){ve.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return u.value.getIsShowOpen()}}),(V,I)=>(e.openBlock(),e.createBlock(Js,{ref_key:"refElDropdownLayer",ref:u,id:e.unref(i),classParent:d.value,classText:a.classText,classDropDown:m.value,isDisabled:a.isDisabled,dropdownArrowPos:a.dropdownArrowPos,isUseDropdownArrow:a.isUseDropdownArrow,isCloseDestroy:a.isCloseDestroy,isInitDelayComplete:!0,appendContainer:a.appendContainer,appendFollowWidth:a.appendFollowWidth,onOpenBeforeCallback:a.onOpenBeforeCallback,transitionEnter:a.transitionEnter,transitionLeave:a.transitionLeave,onOnChangeOpen:f,onOnChangePosition:h,onOnOpenComplete:S},{labelText:e.withCtx(()=>[V.$slots.labelCustom?e.renderSlot(V.$slots,"labelCustom",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[a.textArrowDirection==="left"?(e.openBlock(),e.createElementBlock("div",hf,[e.createVNode(fe,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-text-render",title:r.value},[a.textLabel?c.value?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:a.textLabel},null,8,yf)):(e.openBlock(),e.createElementBlock("span",kf,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock("span",vf,e.toDisplayString(a.placeholder),1))],8,gf),!a.isDisabled&&a.isClear&&a.textLabel?(e.openBlock(),e.createBlock(fe,{key:2,class:"dropdownLayer-text-clear",name:"close-circle-fill",onClick:e.withModifiers(g,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.renderSlot(V.$slots,"textExtend"),a.textArrowDirection==="right"?(e.openBlock(),e.createElementBlock("div",Sf,[e.createVNode(fe,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2))]),dropdown:e.withCtx(()=>[e.renderSlot(V.$slots,"dropdown"),e.renderSlot(V.$slots,"dropdownExtend")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","isUseDropdownArrow","isCloseDestroy","appendContainer","appendFollowWidth","onOpenBeforeCallback","transitionEnter","transitionLeave"]))}}),bf=["id"],wf={class:"table-base"},Cf={class:"time-head time-head-day",colspan:"7"},Ef={class:"time-prev"},Bf=["title"],xf=["title"],Tf={class:"time-next"},Df=["title"],If=["title"],_f=["aria-disabled","onClick","onKeydown","onMouseover"],Nf=e.defineComponent({name:"ClCalendarsDays",__name:"CalendarsDays",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:a=>!0,onChangeType:a=>!0,onSelectDate:(a,l)=>!0,onHoverDate:(a,l)=>!0,onInitComplete:a=>!0},setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("dataTime");const u=e.inject("$DateTimeTop"),c=e.inject("$DateTimeTopBase"),r=e.inject("$DateTimeBase");(!u||!c||!r)&&ve.warn("ClCalendarsDays","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=`calendarsDays-${n.getRandom(5)}`,m=u?.elId?`${u.elId}-calendarsDays-${n.getRandom(5)}`:void 0,p=e.computed(()=>{let b={"panel-calendarsdays":!0};return b=n.getJsonMerge(b,ue.getClassNameJson(o.className)),b}),f=e.reactive({isPrevYear:!1,isPrevMonth:!1,titleYear:"",titleMonth:"",isNextYear:!1,isNextMonth:!1}),h=e.ref([]),g=e.ref([]),S={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},T=()=>{if(!S.viewDate)return;const b=S.viewDate.year(),_=S.viewDate.localeData().monthsShort(S.viewDate),y=S.viewDate.clone().subtract(1,"years").endOf("month"),B=r.checkDataMinMax(y,"day"),A=S.viewDate.clone().subtract(1,"months").endOf("month"),F=r.checkDataMinMax(A,"day"),P=S.viewDate.clone().add(1,"months").startOf("month"),H=r.checkDataMinMax(P,"day"),$=S.viewDate.clone().add(1,"years").startOf("month"),z=r.checkDataMinMax($,"day");f.isPrevYear=!B,f.isPrevMonth=!F,f.titleYear=`${b}${s.value.year}`,f.titleMonth=_,f.isNextMonth=!H,f.isNextYear=!z},w=()=>{if(!S.viewDate)return;const b=S.viewDate.localeData(),v=b.weekdaysMin(),_=b.firstDayOfWeek(),y=[];v.forEach((B,A)=>{y[(7+A-_)%7]=B}),h.value=y},E=()=>{if(!S.viewDate)return;const b=S.viewDate.clone(),v=S.selectDate,_=b.year(),y=b.month();let B=b.clone().subtract(1,"months");const A=[];let F=[];B=B.date(B.daysInMonth()).startOf("week");for(let P=0;P<42;P+=1){P>0&&(B=B.add(1,"days"));const H=B.clone(),$=H.date(),z=B.year()===_&&B.month()<y||B.year()<_,oe=B.year()===_&&B.month()>y||B.year()>_;let Z=v&&B.isSame(v,"day");const W=r.checkDataMinMax(H,"day");let Y=!1,q=!1,J=!1;c.isRange&&(S.hoverDate?S.startDate&&S.endDate&&S.startDate.isSame(S.hoverDate,"day")&&S.hoverDate.isBefore(S.endDate,"day")?(Y=B.isSame(S.startDate,"day"),q=B.isSame(S.endDate,"day"),J=Y||q||B.isAfter(S.startDate,"day")&&B.isBefore(S.endDate,"day")):S.startDate?(Y=B.isSame(S.startDate,"day"),J=Y||B.isSame(S.hoverDate,"day"),J=J||B.isAfter(S.startDate,"day")&&B.isBefore(S.hoverDate,"day"),q=S.hoverDate.isSame(S.startDate,"day")&&Y):S.endDate&&(q=B.isSame(S.endDate,"day"),J=q||B.isSame(S.hoverDate,"day"),J=J||B.isAfter(S.hoverDate,"day")&&B.isBefore(S.endDate,"day"),Y=S.hoverDate.isSame(S.endDate,"day")&&q):(Y=!!(S.startDate&&B.isSame(S.startDate,"day")),S.endDate&&(q=B.isSame(S.endDate,"day"),J=Y||q||!!(S.startDate&&B.isAfter(S.startDate,"day")&&B.isBefore(S.endDate,"day")))),Z=Y||q);const U=ue.getAddClass("day",{old:z,new:oe,active:Z&&!z&&!oe&&!W,disabled:W,"date-start":Y&&!z&&!oe,"date-end":q&&!z&&!oe,"range-in":J&&!z&&!oe});F.push({cls:U,day:$,value:$,isDisabled:W,isOld:z,isNew:oe}),F.length===7&&(A.push({days:F}),F=[])}g.value=A},M=(b,v,_)=>{if(!S.viewDate)return;const y=S.viewDate.clone()[b](v,_);t("onChangeDate",y)};let V=!1;const I=()=>{V||(V=!0,e.nextTick(()=>{t("onInitComplete","days")}))},N=()=>{S.selectDate=u.getMomentDate(o.selectValue),S.startDate=u.getMomentDate(o.startValue),S.endDate=u.getMomentDate(o.endValue),S.hoverDate=u.getMomentDate(o.hoverValue)},x=(b,v,_)=>{if(v!==_){const y=u.getMomentDate(v);y&&y.isValid()&&(S[b]=y,N(),w(),T(),E(),I())}},L=()=>{if(n.isNonEmptyString(o.viewValue)){const b=u.getMomentDate(o.viewValue);b&&b.isValid()&&(S.viewDate=b,N(),w(),T(),E(),I())}};e.onMounted(()=>{e.nextTick(()=>{L()})}),e.watch(()=>o.viewValue,(b,v)=>{x("viewDate",b,v)}),e.watch([()=>o.selectValue,()=>o.startValue,()=>o.endValue],()=>{S.viewDate&&(S.selectDate=u.getMomentDate(o.selectValue),S.startDate=u.getMomentDate(o.startValue),S.endDate=u.getMomentDate(o.endValue),S.hoverDate=u.getMomentDate(o.hoverValue),E())}),e.watch(()=>o.hoverValue,()=>{S.viewDate&&(S.hoverDate=u.getMomentDate(o.hoverValue),c.isRange&&E())}),e.watch([()=>o.minValue,()=>o.maxValue],()=>{S.viewDate&&(T(),E())});const D=b=>{b.preventDefault(),b.stopPropagation(),M("subtract",1,"years")},O=b=>{b.preventDefault(),b.stopPropagation(),M("subtract",1,"months")},X=b=>{b.preventDefault(),b.stopPropagation(),M("add",1,"months")},Q=b=>{b.preventDefault(),b.stopPropagation(),M("add",1,"years")},R=(b,v)=>{b.preventDefault(),b.stopPropagation(),t("onChangeType",v)},C=(b,v)=>{b.preventDefault(),b.stopPropagation(),v.isDisabled||t("onSelectDate","days",v)},k=(b,v)=>{b.preventDefault(),b.stopPropagation(),v.isDisabled||t("onHoverDate","days",v)};return(b,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",wf,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Cf,[e.createElementVNode("span",Ef,[f.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(s).prevYear,onClick:D},[e.createVNode(fe,{name:"angle-double-left"})],8,Bf)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),f.isPrevMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"prev-month",title:e.unref(s).prevMonth,onClick:O},[e.createVNode(fe,{name:"angle-left"})],8,xf)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:v[0]||(v[0]=_=>R(_,"years"))},e.toDisplayString(f.titleYear),1),e.createElementVNode("span",{class:"datetime-switch-month",onClick:v[1]||(v[1]=_=>R(_,"months"))},e.toDisplayString(f.titleMonth),1),e.createElementVNode("span",Tf,[f.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(s).nextYear,onClick:Q},[e.createVNode(fe,{name:"angle-double-right"})],8,Df)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),f.isNextMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"next-month",title:e.unref(s).nextMonth,onClick:X},[e.createVNode(fe,{name:"angle-right"})],8,If)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])])]),e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(_,y)=>(e.openBlock(),e.createElementBlock("th",{key:`${d}-week-${y}`},e.toDisplayString(_),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(_,y)=>(e.openBlock(),e.createElementBlock("tr",{key:`${d}-days-${y}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.days,(B,A)=>(e.openBlock(),e.createElementBlock("td",{key:`${d}-day-${A}`,role:"gridcell",tabindex:"0","aria-disabled":B.isDisabled,class:e.normalizeClass(B.cls),onClick:F=>C(F,B),onKeydown:[e.withKeys(e.withModifiers(F=>C(F,B),["prevent"]),["enter"]),e.withKeys(e.withModifiers(F=>C(F,B),["prevent"]),["space"])],onMouseover:F=>k(F,B)},e.toDisplayString(B.day),43,_f))),128))]))),128))])])],10,bf))}}),Vf=["id"],Mf={class:"table-base"},Of={class:"time-head time-head-month"},Lf={class:"time-prev"},$f=["title"],Af={class:"time-next"},Ff=["title"],Pf={class:"time-body-month"},Rf=["aria-disabled","onClick","onKeydown","onMouseover"],Hf=e.defineComponent({name:"ClCalendarsMonths",__name:"CalendarsMonths",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:a=>!0,onChangeType:a=>!0,onSelectDate:(a,l)=>!0,onHoverDate:(a,l)=>!0,onInitComplete:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=`calendarsMonths-${n.getRandom(5)}`,{optPageLanguage:i,getPageLanguage:u}=Ae();u("dataTime");const c=e.inject("$DateTimeTop"),r=e.inject("$DateTimeTopBase"),d=e.inject("$DateTimeBase");(!c||!r||!d)&&ve.warn("ClCalendarsMonths","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=c?.elId?`${c.elId}-calendarsMonths-${n.getRandom(5)}`:void 0,p=e.computed(()=>{let Q={"panel-calendarsmonths":!0};return Q=n.getJsonMerge(Q,ue.getClassNameJson(o.className)),Q}),f=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),h=e.ref([]),g={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},S=()=>{if(!g.viewDate)return;const Q=g.viewDate.year(),R=g.viewDate.clone().subtract(1,"years").endOf("year"),C=d.checkDataMinMax(R,"month"),k=g.viewDate.clone().add(1,"years").startOf("year"),b=d.checkDataMinMax(k,"month");f.isPrevYear=!C,f.titleYear=`${Q}${i.value.year}`,f.isNextYear=!b},T=()=>{if(!g.viewDate)return;const Q=g.viewDate.clone(),R=d.getFocusDate(),C=g.selectDate,k=Q.year(),b=[];Q.localeData().monthsShort().forEach((v,_)=>{const y=d.getViewMin(k,_);let B=!!(C&&y.isSame(C,"month")),A=!!(R&&y.isSame(R,"month"));const F=d.checkDataMinMax(y,"month");let P=!1,H=!1,$=!1;r.isRange&&(A=!1,g.hoverDate?g.startDate&&g.endDate&&g.startDate.isSame(g.hoverDate,"month")&&g.hoverDate.isBefore(g.endDate,"month")?(P=y.isSame(g.startDate,"month"),H=y.isSame(g.endDate,"month"),$=P||H||y.isAfter(g.startDate,"month")&&y.isBefore(g.endDate,"month")):g.startDate?(P=y.isSame(g.startDate,"month"),$=P||y.isSame(g.hoverDate,"month"),$=$||y.isAfter(g.startDate,"month")&&y.isBefore(g.hoverDate,"month"),H=!!(g.hoverDate&&g.hoverDate.isSame(g.startDate,"month"))&&P):g.endDate&&(H=y.isSame(g.endDate,"month"),$=H||y.isSame(g.hoverDate,"month"),$=$||y.isAfter(g.hoverDate,"month")&&y.isBefore(g.endDate,"month"),P=!!(g.hoverDate&&g.hoverDate.isSame(g.endDate,"month"))&&H):(P=!!(g.startDate&&y.isSame(g.startDate,"month")),g.endDate&&g.startDate&&(H=y.isSame(g.endDate,"month"),$=y.isAfter(g.startDate,"month")&&y.isBefore(g.endDate,"month"))),B=P||H),r.layerType==="months"&&(A=!1);const z=ue.getAddClass("month",{active:B&&!F,focused:A,disabled:F,"date-start":P,"date-end":H,"range-in":$});b.push({cls:z,month:v,isDisabled:F,value:_})}),h.value=b},w=(Q,R,C)=>{if(!g.viewDate)return;const k=g.viewDate.clone()[Q](R,C);t("onChangeDate",k)};let E=!1;const M=()=>{E||(E=!0,e.nextTick(()=>{t("onInitComplete","months")}))},V=()=>{g.selectDate=c.getMomentDate(o.selectValue),g.startDate=c.getMomentDate(o.startValue),g.endDate=c.getMomentDate(o.endValue),g.hoverDate=c.getMomentDate(o.hoverValue)},I=(Q,R,C)=>{if(R!==C){const k=c.getMomentDate(R);k&&k.isValid()&&(g[Q]=k,V(),S(),T(),M())}},N=()=>{const Q=c.getMomentDate(o.viewValue);Q&&Q.isValid()&&(g.viewDate=Q,V(),S(),T(),M())};e.onMounted(()=>{e.nextTick(()=>{N()})}),e.watch(()=>o.viewValue,(Q,R)=>{I("viewDate",Q,R)}),e.watch([()=>o.selectValue,()=>o.startValue,()=>o.endValue,()=>o.hoverValue],()=>{g.viewDate&&(g.selectDate=c.getMomentDate(o.selectValue),g.startDate=c.getMomentDate(o.startValue),g.endDate=c.getMomentDate(o.endValue),g.hoverDate=c.getMomentDate(o.hoverValue),T())}),e.watch([()=>o.minValue,()=>o.maxValue],()=>{g.viewDate&&(S(),T())});const x=Q=>{Q.preventDefault(),Q.stopPropagation(),w("subtract",1,"years")},L=Q=>{Q.preventDefault(),Q.stopPropagation(),w("add",1,"years")},D=(Q,R)=>{Q.preventDefault(),Q.stopPropagation(),t("onChangeType",R)},O=(Q,R)=>{Q.preventDefault(),Q.stopPropagation(),R.isDisabled||t("onSelectDate","months",R)},X=(Q,R)=>{Q.preventDefault(),Q.stopPropagation(),R.isDisabled||t("onHoverDate","months",R)};return(Q,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Mf,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Of,[e.createElementVNode("span",Lf,[f.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(i).prevYear,onClick:x},[e.createVNode(fe,{name:"angle-left"})],8,$f)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:R[0]||(R[0]=C=>D(C,"years"))},e.toDisplayString(f.titleYear),1),e.createElementVNode("span",Af,[f.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(i).nextYear,onClick:L},[e.createVNode(fe,{name:"angle-right"})],8,Ff)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",Pf,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(C,k)=>(e.openBlock(),e.createElementBlock("span",{key:`${s}-month-${k}`,role:"button",tabindex:"0","aria-disabled":C.isDisabled,class:e.normalizeClass(C.cls),onClick:b=>O(b,C),onKeydown:[e.withKeys(e.withModifiers(b=>O(b,C),["prevent"]),["enter"]),e.withKeys(e.withModifiers(b=>O(b,C),["prevent"]),["space"])],onMouseover:b=>X(b,C)},e.toDisplayString(C.month),43,Rf))),128))])])])])])],10,Vf))}}),zf=["id"],Uf={class:"table-base"},Jf={class:"time-head time-head-year"},Kf={class:"time-prev"},Wf=["title"],jf={class:"time-next"},Yf=["title"],qf={class:"time-body-year"},Xf=["aria-disabled","onClick","onKeydown","onMouseover"],Gf=e.defineComponent({name:"ClCalendarsYears",__name:"CalendarsYears",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onChangeDate:a=>!0,onSelectDate:(a,l)=>!0,onHoverDate:(a,l)=>!0,onInitComplete:a=>!0},setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("dataTime");const u=e.inject("$DateTimeTop"),c=e.inject("$DateTimeTopBase"),r=e.inject("$DateTimeBase");(!u||!c||!r)&&ve.warn("ClCalendarsYears","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=`calendarsYears-${n.getRandom(5)}`,m=u?.elId?`${u.elId}-calendarsYears-${n.getRandom(5)}`:void 0,p=e.computed(()=>{let Q={"panel-calendarsyears":!0};return Q=n.getJsonMerge(Q,ue.getClassNameJson(o.className)),Q}),f=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),h=e.ref([]),g={startYear:0,viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},S=()=>{if(!g.viewDate)return;const Q=`${g.startYear}-${g.startYear+9}`,R=u.getMomentDate({year:g.startYear-1,month:11}),C=u.getMomentDate({year:g.startYear+10,month:0}),k=R?r.checkDataMinMax(R.endOf("month"),"year"):!1,b=C?r.checkDataMinMax(C.startOf("month"),"year"):!1;f.isPrevYear=!k,f.titleYear=Q,f.isNextYear=!b},T=()=>{const Q=r.getFocusDate(),R=g.selectDate,C=[];for(let k=-1;k<11;k+=1){const b=g.startYear+k,v=r.getViewMin(b),_=k===-1,y=k>9;let B=R?v.isSame(R,"year"):!1,A=!!(Q&&v.isSame(Q,"year"));const F=r.checkDataMinMax(v,"year");let P=!1,H=!1,$=!1;if(c.isRange){if(A=!1,g.hoverDate){const oe=parseInt(g.hoverDate.format("YYYY"),10);g.startDate&&g.endDate&&g.startDate.isSame(g.hoverDate,"year")&&g.hoverDate.isBefore(g.endDate,"year")?(P=b===parseInt(g.startDate.format("YYYY"),10),H=b===parseInt(g.endDate.format("YYYY"),10),$=P||H||b>parseInt(g.startDate.format("YYYY"),10)&&b<parseInt(g.endDate.format("YYYY"),10)):g.startDate?(P=b===parseInt(g.startDate.format("YYYY"),10),$=P||b===oe,$=$||v.isAfter(g.startDate,"year")&&v.isBefore(g.hoverDate,"year"),H=!1):g.endDate&&(H=b===parseInt(g.endDate.format("YYYY"),10),$=H||b===oe,$=$||v.isAfter(g.hoverDate,"year")&&v.isBefore(g.endDate,"year"),P=!!(g.hoverDate&&g.hoverDate.isSame(g.endDate,"year"))&&H)}else P=!!(g.startDate&&v.isSame(g.startDate,"year")),g.endDate&&g.startDate&&(H=v.isSame(g.endDate,"year"),$=v.isAfter(g.startDate,"year")&&v.isBefore(g.endDate,"year"));B=P||H}c.layerType==="years"&&(A=!1);const z=ue.getAddClass("year",{old:_,new:y,active:B&&!_&&!y,focused:A,disabled:F,"date-start":P&&!_&&!y,"date-end":H&&!_&&!y,"range-in":$&&!_&&!y});C.push({cls:z,year:b,isDisabled:F,value:b})}h.value=C},w=()=>{g.viewDate&&(g.startYear=Math.floor(g.viewDate.year()/10)*10,S(),T())},E=(Q,R,C)=>{g.viewDate&&(g.viewDate=g.viewDate.clone()[Q](R,C),w(),t("onChangeDate",g.viewDate))};let M=!1;const V=()=>{M||(M=!0,e.nextTick(()=>{t("onInitComplete","years")}))},I=()=>{g.selectDate=u.getMomentDate(o.selectValue),g.startDate=u.getMomentDate(o.startValue),g.endDate=u.getMomentDate(o.endValue),g.hoverDate=u.getMomentDate(o.hoverValue)},N=(Q,R,C)=>{if(R!==C){const k=u.getMomentDate(R);k&&k.isValid()?(g[Q]=k,I(),w(),V()):(g.viewDate=null,g.startYear=0,h.value=[],f.isPrevYear=!1,f.isNextYear=!1,f.titleYear="")}},x=()=>{const Q=u.getMomentDate(o.viewValue);Q&&Q.isValid()&&(g.viewDate=Q,I(),w(),V())};e.onMounted(()=>{e.nextTick(()=>{x()})}),e.watch(()=>o.viewValue,(Q,R)=>{N("viewDate",Q,R)}),e.watch([()=>o.selectValue,()=>o.startValue,()=>o.endValue,()=>o.hoverValue],()=>{g.viewDate&&(g.selectDate=u.getMomentDate(o.selectValue),g.startDate=u.getMomentDate(o.startValue),g.endDate=u.getMomentDate(o.endValue),g.hoverDate=u.getMomentDate(o.hoverValue),T())}),e.watch([()=>o.minValue,()=>o.maxValue],()=>{g.viewDate&&(S(),T())});const L=Q=>{Q.preventDefault(),Q.stopPropagation(),E("subtract",10,"years")},D=Q=>{Q.preventDefault(),Q.stopPropagation(),E("add",10,"years")},O=(Q,R)=>{Q.preventDefault(),Q.stopPropagation(),R.isDisabled||t("onSelectDate","years",R)},X=(Q,R)=>{Q.preventDefault(),Q.stopPropagation(),R.isDisabled||t("onHoverDate","years",R)};return(Q,R)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Uf,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Jf,[e.createElementVNode("span",Kf,[f.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(s).prevYear10,onClick:L},[e.createVNode(fe,{name:"angle-left"})],8,Wf)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",null,e.toDisplayString(f.titleYear),1),e.createElementVNode("span",jf,[f.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(s).nextYear10,onClick:D},[e.createVNode(fe,{name:"angle-right"})],8,Yf)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(C,k)=>(e.openBlock(),e.createElementBlock("span",{key:`${d}-${C.year}-${k}`,role:"button",tabindex:"0","aria-disabled":C.isDisabled,class:e.normalizeClass(C.cls),onClick:b=>O(b,C),onKeydown:[e.withKeys(e.withModifiers(b=>O(b,C),["prevent"]),["enter"]),e.withKeys(e.withModifiers(b=>O(b,C),["prevent"]),["space"])],onMouseover:b=>X(b,C)},e.toDisplayString(C.year),43,Xf))),128))])])])])],10,zf))}}),Qf=["id"],Zf={class:"times-container"},eh=["title"],th=["title"],nh={class:"times-clock"},oh={class:"clock-nums"},ah=["aria-disabled","onClick","onKeydown"],lh={class:"clock-pointer"},sh={class:"clock-am"},ih="2000-01-01",rh=e.defineComponent({name:"ClCalendarsClocks",__name:"CalendarsClock",props:{className:String,selectDay:String,selectValue:String,minValue:String,maxValue:String,isShowPointer:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!1},isShowCancel:{type:Boolean,default:!1},isClickOverlay:{type:Boolean,default:!1}},emits:{onSubmit:a=>!0,onInitComplete:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=`calendarsClock-${n.getRandom(5)}`,{optPageLanguage:i,getPageLanguage:u}=Ae();u("dataTime");const c=e.inject("$DateTimeTop"),r=e.inject("$DateTimeTopBase");(!c||!r)&&ve.warn("ClCalendarsClocks","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=c?.elId?`${c.elId}-calendarsClock-${n.getRandom(5)}`:void 0,m=e.reactive({isOpen:!1,activePointer:"hour",activeAm:"am"}),p=e.reactive({hour:!0,hourDisabled:!1,minute:!0,minuteDisabled:!1,minuteShowAddSub:!0,second:!0,secondDisabled:!1}),f=e.reactive({hour:-90,hourMinute:0,minute:-90,minuteSecond:0,second:-90}),h=e.reactive({hour:"00",minute:"00",second:"00"}),g=e.ref([]),S={selectDayDate:null,minDate:null,maxDate:null,timeAngle:{hour:30,minute:6,second:6},num:{hourAm:[0,1,2,3,4,5,6,7,8,9,10,11],hourPm:[12,13,14,15,16,17,18,19,20,21,22,23],minute:[0,5,10,15,20,25,30,35,40,45,50,55],second:[0,5,10,15,20,25,30,35,40,45,50,55]},origValue:{hour:"00",minute:"00",second:"00"},lastValue:{hour:"00",minute:"00",second:"00"},isCheckMin:!1,checkMinDiff:null,min:{hour:0,minute:0,second:0},isCheckMax:!1,checkMaxDiff:null,max:{hour:0,minute:0,second:0}},T=e.computed(()=>{let ie={"panel-calendarsclocks":!0,"datetime-times":!0};return ie["times-open"]=m.isOpen,ie=n.getJsonMerge(ie,ue.getClassNameJson(o.className)),ie}),w=e.computed(()=>{const ie={"pointer-hour":!0};return ie["pointer-active"]=m.activePointer==="hour",ie["pointer-disabled"]=p.hourDisabled,ie}),E=e.computed(()=>{const ie={"pointer-minute":!0};return ie["pointer-active"]=m.activePointer==="minute",ie["pointer-disabled"]=p.minuteDisabled,ie}),M=e.computed(()=>{const ie={"pointer-second":!0};return ie["pointer-active"]=m.activePointer==="second",ie["pointer-disabled"]=p.secondDisabled,ie}),V=e.computed(()=>{const ie={"am-am":!0};return ie["am-active"]=m.activeAm==="am",ie}),I=e.computed(()=>{const ie={"am-pm":!0};return ie["am-active"]=m.activeAm==="pm",ie}),N=e.computed(()=>{const ie={"clock-set":!0,"clock-set-hour":!0};return ie["clock-set-active"]=m.activePointer==="hour",ie["clock-set-disabled"]=p.hourDisabled,ie}),x=e.computed(()=>{const ie={"clock-set":!0,"clock-set-minute":!0};return ie["clock-set-active"]=m.activePointer==="minute",ie["clock-set-disabled"]=p.minuteDisabled,ie}),L=e.computed(()=>{const ie={"clock-set":!0,"clock-set-second":!0};return ie["clock-set-active"]=m.activePointer==="second",ie["clock-set-disabled"]=p.secondDisabled,ie}),D=(ie,se)=>{S[ie]=c.getMomentDate(se)},O=ie=>{let se=parseInt(S.lastValue[ie],10),K=parseInt(h[ie],10),le=0;return ie==="hour"?(K===0&&se===23&&(K=24),se===0&&K===23&&(se=24),K-se>6&&(se+=12),se-K>=6&&(K+=12),le=K-se):(K-se>30&&(se+=60),se-K>=30&&(K+=60),le=K-se),le},X=ie=>{const K=O(ie)*S.timeAngle[ie];return f[ie]+(K>=360?K%360:K)},Q=()=>{const ie=X("hour"),se=S.timeAngle.hour*parseFloat((parseInt(h.minute,10)/60).toString()),K=X("minute"),le=S.timeAngle.second*parseFloat((parseInt(h.second,10)/60).toString()),de=X("second");f.hour=ie,f.hourMinute=se,f.minute=K,f.minuteSecond=le,f.second=de},R=ie=>parseInt(ie,10)<12?"am":"pm",C=(ie,se)=>{let K=!0;switch(ie){case"hour":K=!0;break;case"minute":K=parseInt(h.hour,10)===S[se].hour;break;case"second":K=parseInt(h.hour,10)===S[se].hour&&parseInt(h.minute,10)===S[se].minute;break}return K},k=()=>S.isCheckMin&&S.isCheckMax&&S.checkMinDiff===0&&S.checkMaxDiff===0&&S.min.hour>S.max.hour,b=(ie,se)=>{let K=!1;return k()&&ie==="hour"?K=se<S.min[ie]&&se>S.max[ie]:S.isCheckMin&&(S.checkMinDiff===0?C(ie,"min")&&(K=se<S.min[ie]):S.checkMinDiff<0&&(K=!0)),!K&&S.isCheckMax&&(S.checkMaxDiff===0?C(ie,"max")&&(K=se>S.max[ie]):S.checkMaxDiff>0&&(K=!0)),K},v=ie=>{let se=ie;se==="hour"&&(se=m.activeAm==="am"?"hourAm":"hourPm");const K=p[`${ie}Disabled`],le=[];S.num[se].forEach((de,me)=>{const he={num:de,cls:"clock-num",isDisabled:!1};he.cls+=` clock-num${me+1} `,he.isDisabled=K?!0:b(ie,de),he.isDisabled&&(he.cls+=" clock-nums-disabled "),le.push(he)}),g.value=le},_=ie=>{m.activePointer=ie,ie==="hour"&&(m.activeAm=R(h.hour)),v(ie)},y=ie=>{let se=null;if(!n.isUndefined(ie)&&!n.isUndefined(S.selectDayDate)){const K=S.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"),le=ie.clone().format("YYYY-MM-DD 00:00:00");se=c.Dayjs(K).diff(c.Dayjs(le))}return se},B=(ie=!0)=>{f.hour=-90,f.hourMinute=0,f.minute=-90,f.minuteSecond=0,f.second=-90,S.lastValue={hour:"00",minute:"00",second:"00"},Q(),e.nextTick(()=>{const se=h.hour,K=h.minute,le=h.second;S.lastValue={hour:se,minute:K,second:le},ie&&(S.origValue={hour:se,minute:K,second:le})})},A=(ie,se)=>{S.lastValue.hour=h.hour,S.lastValue.minute=h.minute,S.lastValue.second=h.second,h[ie]=n.getFillZero(se),Q(),o.isShowSubmit||t("onSubmit",`${h.hour}:${h.minute}:${h.second}`)},F=ie=>{let se=0,K=0,le=0;if(!n.isEmpty(ie)){const de=(n.isEmpty(S.selectDayDate)?c.getNow():S.selectDayDate).format("YYYY-MM-DD"),me=c.getMomentDate(`${de} ${ie}`);me&&me.isValid()&&(se=me.hour(),K=me.minute(),le=me.second())}return{HH:se,mm:K,ss:le}},P=()=>{let ie=!0,se=!0;const K=n.isEmpty(S.selectDayDate),le=F(o.selectValue),de=le.HH,me=le.mm,he=le.ss;switch(r.layerType){case"hours":ie=!1,se=!1;break;case"minutes":se=!1;break}S.isCheckMin=!n.isUndefined(S.minDate),S.isCheckMin&&(S.checkMinDiff=c.checkIsTimes()?0:y(S.minDate),S.min={hour:S.minDate.hour(),minute:S.minDate.minute(),second:S.minDate.second()}),S.isCheckMax=!n.isUndefined(S.maxDate),S.isCheckMax&&(S.checkMaxDiff=c.checkIsTimes()?0:y(S.maxDate),S.max={hour:S.maxDate.hour(),minute:S.maxDate.minute(),second:S.maxDate.second()});const Ce=n.getFillZero(de);let be=n.getFillZero(me),Ee=n.getFillZero(he);ie||(be="00"),se||(Ee="00"),S.origValue={hour:Ce,minute:be,second:Ee},p.hour=!0,p.minute=ie,p.second=se,h.hour=Ce,h.minute=be,h.second=Ee,c.checkIsTimes()||(p.hourDisabled=K,p.minuteDisabled=K,p.secondDisabled=K),r.layerType==="hours"&&(p.minute=!0,p.minuteDisabled=!0,p.minuteShowAddSub=!1),H(),$()},H=()=>{S.lastValue={hour:"00",minute:"00",second:"00"},f.hour=-90,f.hourMinute=0,f.minute=-90,f.minuteSecond=0,f.second=-90},$=()=>{Q(),m.activeAm=R(h.hour),v(m.activePointer)},z=()=>{m.isOpen=o.isShowPointer,D("selectDayDate",c.checkIsTimes()?ih:o.selectDay),D("minDate",c.getValueEffective(o.minValue)),D("maxDate",c.getValueEffective(o.maxValue)),P(),_("hour"),B(),e.nextTick(()=>{t("onInitComplete","times")})},oe=ie=>{let se=!1;return p[ie]&&!p[`${ie}Disabled`]&&(m.isOpen?se=!0:(B(!1),m.isOpen=!0,_(ie))),se},Z=(ie,se)=>{if(p[ie]&&!p[`${ie}Disabled`]&&m.isOpen){let K=!0,le=0,de=ie==="hour"?23:59;if(S.isCheckMin&&(S.checkMinDiff===0?C(ie,"min")&&(le=S.min[ie]):S.checkMinDiff<0&&(K=!1)),S.isCheckMax&&(S.checkMaxDiff===0?C(ie,"max")&&(de=S.max[ie]):S.checkMaxDiff>0&&(K=!1)),K){const me=parseInt(h[ie],10);let he=0;k()&&ie==="hour"?he=se==="add"?me>=23?0:me+1:me<=0?23:me-1:se==="add"?he=me<le||me>=de?le:me+1:he=me>de||me<=le?de:me-1,b(ie,he)||(A(ie,he),_(ie))}}};e.onMounted(()=>{e.nextTick(()=>{z()})}),e.watch(()=>o.selectDay,(ie,se)=>{D("selectDayDate",ie),P()}),e.watch(()=>o.minValue,(ie,se)=>{const K=c.getValueEffective(ie);D("minDate",K),P()}),e.watch(()=>o.maxValue,(ie,se)=>{const K=c.getValueEffective(ie);D("maxDate",K),P()}),e.watch(()=>o.selectValue,(ie,se)=>{const K=F(ie),le=n.getFillZero(K.HH),de=n.getFillZero(K.mm),me=n.getFillZero(K.ss);(h.hour!==le||h.minute!==de||h.second!==me)&&(h.hour=le,h.minute=de,h.second=me,S.origValue={hour:le,minute:de,second:me},H(),$())});const W=ie=>{p[ie]&&!p[`${ie}Disabled`]&&(_(ie),m.isOpen||(B(),m.isOpen=!0))},Y=ie=>{if(!ie.isDisabled){const se=m.activePointer,K=parseInt(h[se],10),le=ie.num;le!==K&&A(se,le)}},q=ie=>{m.activeAm=ie,m.activePointer="hour";const se=parseInt(h.hour,10);ie==="pm"&&se<12?h.hour=n.getFillZero(se+12):ie==="am"&&se>=12&&(h.hour=n.getFillZero(se-12)),Q(),v("hour")},J=()=>oe("hour"),U=ie=>{let se=!1,K=!1;const le=k();if(S.isCheckMin){if(S.checkMinDiff<0)se=!0,K=!0;else if(S.checkMinDiff===0){const de=parseInt(h[ie],10);C(ie,"min")&&(se=le?de===S.min[ie]:de<=S.min[ie])}}if(S.isCheckMax){if(S.checkMaxDiff>0)se=!0,K=!0;else if(S.checkMaxDiff===0){const de=parseInt(h[ie],10);C(ie,"max")&&(K=le?de===S.max[ie]:de>=S.max[ie])}}return{subtractDisabled:se,addDisabled:K}},ae=ie=>(n.isEmpty(ie.type)||Z("hour",ie.type),{value:h.hour,...U("hour")}),ee=()=>oe("minute"),G=ie=>(n.isEmpty(ie.type)||Z("minute",ie.type),{value:h.minute,...U("minute")}),ne=()=>oe("second"),j=ie=>(n.isEmpty(ie.type)||Z("second",ie.type),{value:h.second,...U("second")}),te=()=>{o.isClickOverlay&&m.isOpen&&(c.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${h.hour}:${h.minute}:${h.second}`))},re=()=>{c.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${h.hour}:${h.minute}:${h.second}`)},pe=()=>{(h.hour!==S.origValue.hour||h.minute!==S.origValue.minute||h.second!==S.origValue.second)&&(S.lastValue.hour=h.hour,S.lastValue.minute=h.minute,S.lastValue.second=h.second,h.hour=S.origValue.hour,h.minute=S.origValue.minute,h.second=S.origValue.second,$()),c.checkIsTimes()||(m.isOpen=!1)};return(ie,se)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(T.value),id:e.unref(d)},[se[15]||(se[15]=e.createElementVNode("div",{class:"datetime-times-inner"},null,-1)),e.createElementVNode("div",null,[e.createElementVNode("div",Zf,[e.createElementVNode("div",{class:"times-overlay",onClick:te}),a.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"times-cancel",title:e.unref(i).common.cancel,onClick:pe},[e.createVNode(fe,{name:"close1"})],8,eh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:2,class:"times-submit",title:e.unref(i).common.submit,onClick:re},[e.createVNode(fe,{name:"check1"})],8,th)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",nh,[e.createElementVNode("div",oh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(K,le)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-clock-${le}`,role:"button",tabindex:"0","aria-disabled":K.isDisabled,class:e.normalizeClass(K.cls),onClick:de=>Y(K),onKeydown:[e.withKeys(e.withModifiers(de=>Y(K),["prevent"]),["enter"]),e.withKeys(e.withModifiers(de=>Y(K),["prevent"]),["space"])]},e.toDisplayString(K.num),43,ah))),128))]),e.createElementVNode("div",lh,[p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(w.value),onClick:se[0]||(se[0]=K=>W("hour")),style:e.normalizeStyle({transform:`rotate(${f.hour+f.hourMinute}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(E.value),onClick:se[1]||(se[1]=K=>W("minute")),style:e.normalizeStyle({transform:`rotate(${f.minute+f.minuteSecond}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(M.value),onClick:se[2]||(se[2]=K=>W("second")),style:e.normalizeStyle({transform:`rotate(${f.second}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))]),e.withDirectives(e.createElementVNode("div",sh,[e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(V.value),onClick:se[3]||(se[3]=K=>q("am")),onKeydown:[se[4]||(se[4]=e.withKeys(e.withModifiers(K=>q("am"),["prevent"]),["enter"])),se[5]||(se[5]=e.withKeys(e.withModifiers(K=>q("am"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(i).am),35),e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(I.value),onClick:se[6]||(se[6]=K=>q("pm")),onKeydown:[se[7]||(se[7]=e.withKeys(e.withModifiers(K=>q("pm"),["prevent"]),["enter"])),se[8]||(se[8]=e.withKeys(e.withModifiers(K=>q("pm"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(i).pm),35)],512),[[e.vShow,m.activePointer==="hour"]])])]),p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(N.value),onClick:se[10]||(se[10]=K=>W("hour"))},[e.createVNode(kn,{value:h.hour,"onUpdate:value":se[9]||(se[9]=K=>h.hour=K),size:"small",isClean:!1,disabled:p.hourDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:J,calculationOperateValueCallback:ae},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute&&p.minuteShowAddSub?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(x.value),onClick:se[12]||(se[12]=K=>W("minute"))},[e.createVNode(kn,{value:h.minute,"onUpdate:value":se[11]||(se[11]=K=>h.minute=K),size:"small",isClean:!1,disabled:p.minuteDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:ee,calculationOperateValueCallback:G},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(L.value),onClick:se[14]||(se[14]=K=>W("second"))},[e.createVNode(kn,{value:h.second,"onUpdate:value":se[13]||(se[13]=K=>h.second=K),size:"small",isClean:!1,disabled:p.secondDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:ne,calculationOperateValueCallback:j},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],10,Qf))}}),ch=["id"],sa=e.defineComponent({name:"ClCalendarsBase",__name:"CalendarsBase",props:{className:String,viewValue:String,selectValue:String,startValue:String,endValue:String,hoverValue:String,minValue:String,maxValue:String},emits:{onSelectDate:a=>!0,onChangeViewValue:a=>!0,onHoverDate:a=>!0,onChangeViewType:a=>!0,onSelectTime:a=>!0,onInitComplete:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=e.inject("$DateTimeTop"),i=e.inject("$DateTimeTopBase");(!s||!i)&&ve.warn("ClCalendarsBase","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const u=s?.elId?`${s.elId}-calendarsBase-${n.getRandom(5)}`:void 0,c=e.computed(()=>{let R={"panel-calendarsbase":!0};return R=n.getJsonMerge(R,ue.getClassNameJson(o.className)),R}),r=e.reactive({currentView:"",viewValue:"",selectValue:"",selectClockDay:"",selectClockTime:""}),d=e.reactive({isShow:!1,isViewDay:!1,isShowClockPointer:!1,isShowClockSubmit:!1,isShowClockCancel:!1,isClockClickOverlay:!1}),m={viewDate:null,selectDate:null,focusDate:null,minDate:null,maxDate:null},p=(R,C)=>{m[R]=n.isString(C)?s.getMomentDate(C):null},f=R=>{const C=Object.keys(R);n.isExistValue(C,"viewValue")&&i.layerView===R.currentView&&t("onChangeViewValue",R.viewValue),C.forEach(k=>{const b=k,v=R[b];n.isExistJsonKey(r,b)&&r[b]!==v&&(r[b]=v),n.isExistJsonKey(m,b)&&(m[b]=v)})},h=(R,C)=>{let k=!1;return n.isEmpty(R)||n.isNaN(R)||(n.isEmpty(m.minDate)||(k=s.Dayjs(R).isBefore(m.minDate,C)),!k&&!n.isEmpty(m.maxDate)&&(k=s.Dayjs(R).isAfter(m.maxDate,C))),k},g=(R,C)=>{let k=0,b=1;if(n.isEmpty(m.minDate))n.isUndefined(C)||(k=C);else{const v=R===m.minDate.year();let _=!0;n.isUndefined(C)?k=v?m.minDate.month():0:(_=C===m.minDate.month(),k=C),b=v&&_?m.minDate.date():1}return s.getMomentDate({year:R,month:k,day:b})??s.getNow().startOf("year")},S=R=>{let C="";switch(R){case"months":C="days";break;case"years":C="months";break;default:C="days";break}return C},T=R=>{const k=(R||m.selectDate||m.viewDate).format("YYYY-MM-DD")+" "+(n.isEmpty(r.selectClockTime)?"00:00:00":r.selectClockTime);return s.Dayjs(k)},w=(R,C)=>{const k=m.viewDate.clone(),b=parseInt(C.value,10);if(n.isNaN(b))return T(k);let v;switch(R){case"days":{let _=0;C.isNew?_=1:C.isOld&&(_=-1),v=k.month(k.month()+_).date(b);break}case"months":{const _=m.selectDate||k,y=k.month(b);v=y.date(Math.min(_.date(),y.daysInMonth()));break}case"years":v=k.month(0).date(1).year(b);break;default:v=k;break}return T(v)},E=()=>{r.viewValue=m.viewDate.format(i.formatIn),m.focusDate=m.viewDate.clone()},M=R=>{p("selectDate",R==="-1"?"":R);const C=m.selectDate?m.selectDate.format("YYYY-MM-DD"):"";r.selectValue=C,r.selectClockDay=C,r.selectClockTime=m.selectDate?m.selectDate.format("HH:mm:ss"):""},V=()=>{let R=!1,C=!1,k=!1,b=!1,v=!1,_=!1;r.currentView==="times"?(R=!0,k=!0,_=!1,b=i.isDefault&&i.isShowPopup,v=i.isDefault&&i.isShowPopup,i.layerType==="hours"&&(v=!1,b=!1)):r.currentView==="days"&&(C=i.timeType==="datetime",C&&(v=!0,b=!0,k=!1,_=!0)),d.isShow=R,d.isViewDay=C,d.isShowClockPointer=k,d.isShowClockSubmit=b,d.isShowClockCancel=v,d.isClockClickOverlay=_},I=()=>{r.currentView=i.layerView,m.viewDate=s.getViewDate(o.viewValue),E(),M(o.selectValue),p("minDate",o.minValue),p("maxDate",o.maxValue),V()};e.onMounted(()=>{e.nextTick(()=>{I()})}),e.watch(()=>o.viewValue,(R,C)=>{m.viewDate=s.getViewDate(R),E()}),e.watch(()=>o.selectValue,(R,C)=>{const k=i.isRange&&R==="-1";let b=R;const v=r.selectClockTime;k&&(b=""),M(b),k&&(r.selectClockTime=v)}),e.watch(()=>o.minValue,(R,C)=>{p("minDate",R)}),e.watch(()=>o.maxValue,(R,C)=>{p("maxDate",R)});const N=R=>{f({currentView:r.currentView,viewDate:R.clone(),viewValue:R.format(i.formatIn)})},x=R=>{r.currentView=R,m.focusDate=m.viewDate.clone(),V(),t("onChangeViewType",R)},L=(R,C)=>{const k=w(R,C),b=k.format("YYYY-MM-DD"),v={};if(i.layerView===R)v.selectDate=k,v.selectValue=b,i.isRange||(v.selectClockDay=b),f(v),t("onSelectDate",b);else{const _=S(R);if(_===R){v.selectDate=k,v.selectValue=b,i.isRange||(v.selectClockDay=b),f(v),t("onSelectDate",b);return}v.viewDate=k.clone().startOf("month"),v.viewValue=v.viewDate.format(i.formatIn),v.currentView=_,f(v),V(),t("onChangeViewType",v.currentView)}},D=(R,C)=>{const k=w(R,C);t("onHoverDate",k)},O=R=>{f({selectClockTime:R}),t("onSelectTime",R)},X=new Set,Q=R=>{i.layerView===R&&!X.has(R)&&(X.add(R),t("onInitComplete",R))};return e.provide("$DateTimeBase",{checkDataMinMax:h,getViewMin:g,getFocusDate:()=>m.focusDate&&m.focusDate.clone()}),(R,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(c.value)},[r.currentView==="days"?(e.openBlock(),e.createBlock(Nf,{key:0,viewValue:r.viewValue,selectValue:r.selectValue,startValue:a.startValue,endValue:a.endValue,hoverValue:a.hoverValue,minValue:a.minValue,maxValue:a.maxValue,onOnChangeDate:N,onOnChangeType:x,onOnSelectDate:L,onOnHoverDate:D,onOnInitComplete:Q},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):r.currentView==="months"?(e.openBlock(),e.createBlock(Hf,{key:1,viewValue:r.viewValue,selectValue:r.selectValue,startValue:a.startValue,endValue:a.endValue,hoverValue:a.hoverValue,minValue:a.minValue,maxValue:a.maxValue,onOnChangeDate:N,onOnChangeType:x,onOnSelectDate:L,onOnHoverDate:D,onOnInitComplete:Q},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):r.currentView==="years"?(e.openBlock(),e.createBlock(Gf,{key:2,viewValue:r.viewValue,selectValue:r.selectValue,startValue:a.startValue,endValue:a.endValue,hoverValue:a.hoverValue,minValue:a.minValue,maxValue:a.maxValue,onOnChangeDate:N,onOnSelectDate:L,onOnHoverDate:D,onOnInitComplete:Q},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),d.isShow||d.isViewDay?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass({"datetime-days-times":d.isViewDay})},[e.createVNode(rh,{selectDay:r.selectClockDay,selectValue:r.selectClockTime,minValue:a.minValue,maxValue:a.maxValue,isShowPointer:d.isShowClockPointer,isShowSubmit:d.isShowClockSubmit,isShowCancel:d.isShowClockCancel,isClickOverlay:d.isClockClickOverlay,onOnSubmit:O,onOnInitComplete:Q},null,8,["selectDay","selectValue","minValue","maxValue","isShowPointer","isShowSubmit","isShowCancel","isClickOverlay"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,ch))}}),uh=["tabindex","aria-disabled","onKeydown"],dh=e.defineComponent({name:"ClDateTimeDefault",__name:"DateTimeDefault",props:{className:String,value:String,minValue:String,maxValue:String},emits:{onSelectValue:a=>!0,onInitComplete:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("dataTime");const c=e.inject("$DateTimeTop"),r=e.inject("$DateTimeTopBase");(!c||!r)&&ve.warn("ClDateTimeDefault","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=e.reactive({isShowSubmit:!1,isSubmitDisplay:!1}),m=e.reactive({day:"",time:""}),p=e.computed(()=>{let x={"panel-date-time-default":!0,"datetime-default":!0,"datetime-panel-body":!0};return x=n.getJsonMerge(x,ue.getClassNameJson(t.className)),x}),f=()=>{const x=c.getMergeDayTime(m.day,m.time),L=c.checkValue(x);d.isSubmitDisplay=n.isEmpty(m.day)||L.errMsg.length>0},h=x=>{let L=!1;r.timeType==="datetime"&&(L=x==="days"),d.isShowSubmit=L},g=x=>{let L="",D="",O=!0;if(n.isNonEmptyString(x)){const X=c.getMomentDate(x);X&&(L=X.format("YYYY-MM-DD"),D=X.format("HH:mm:ss"),O=!1)}m.day=L,m.time=D,d.isSubmitDisplay=O,f()},S=()=>{h(r.layerView),g(t.value)},T=()=>{const x=c.getMomentDate(c.getMergeDayTime(m.day,m.time));x&&s("onSelectValue",x)};e.onMounted(()=>{e.nextTick(()=>{S()})}),e.watch(()=>t.value,(x,L)=>{x!==L&&g(x)}),e.watch([()=>t.minValue,()=>t.maxValue],()=>{f()});const w=x=>{m.day=x,f(),r.timeType==="date"&&T()},E=x=>{m.time=x,f(),(r.timeType==="time"||r.timeType==="datetime"&&!d.isSubmitDisplay)&&T()},M=x=>{h(x)},V=()=>{d.isShowSubmit&&!d.isSubmitDisplay&&T()},I=()=>{s("onInitComplete")};return l({getValue:()=>{const x=c.getMergeDayTime(m.day,m.time);return c.getMomentDate(x)}}),(x,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(sa,{class:e.normalizeClass(p.value),selectValue:a.value,viewValue:a.value,minValue:a.minValue,maxValue:a.maxValue,onOnSelectDate:w,onOnSelectTime:E,onOnChangeViewType:M,onOnInitComplete:I},null,8,["class","selectValue","viewValue","minValue","maxValue"]),d.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",tabindex:d.isSubmitDisplay?-1:0,"aria-disabled":d.isSubmitDisplay,class:e.normalizeClass({"datetime-days-submit":!0,"days-submit-disabled":d.isSubmitDisplay}),onClick:V,onKeydown:[e.withKeys(e.withModifiers(V,["prevent"]),["enter"]),e.withKeys(e.withModifiers(V,["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i).common.submit),1)],42,uh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),mh=["id"],ph={class:"calendar-range calendar-left"},fh={class:"calendar-text"},hh={class:"time-input-base"},gh=["value","name"],vh={class:"calendar-panel"},yh={class:"calendar-range calendar-right"},kh={class:"calendar-text"},Sh={class:"time-input-base"},bh=["value","name"],wh={class:"calendar-panel"},Ch={class:"calendar-range calendar-quick"},Eh=["onClick","onKeydown"],Bh={key:0,class:"panel-quick-btn"},xh=e.defineComponent({name:"ClDateTimeRange",__name:"DateTimeRange",props:{className:String,startValue:String,endValue:String,minValue:String,maxValue:String,rangeQuick:{type:Array,default:()=>[]}},emits:{onSubmit:a=>!0,onCancel:()=>!0,onInitComplete:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=`dateTimeRange-${n.getRandom(5)}`,{optPageLanguage:u,getPageLanguage:c}=Ae();c("dataTime");const r=e.inject("$DateTimeTop"),d=e.inject("$DateTimeTopBase");(!r||!d)&&ve.warn("ClDateTimeRange","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=r?.elId?`${r.elId}-dateTimeRange-${n.getRandom(5)}`:void 0,p=e.computed(()=>{let W={"panel-date-time-range":!0,"panel-range-calendar":!0,"datetime-range":!0,"datetime-panel-body":!0};return W=n.getJsonMerge(W,ue.getClassNameJson(t.className)),W}),f=e.reactive({operateViewDataType:"",selectCount:0,hoverValue:"",activeQuick:"",isCheck:!0,isShowQuickBtn:d.isShowPopup||d.timeType==="datetime",previewStart:"",previewEnd:""}),h=e.reactive({view:"",text:"",name:`input_${n.getRandom(8)}`}),g=e.reactive({view:"",text:"",name:`input_${n.getRandom(8)}`}),S=e.reactive({day:"",time:"",value:""}),T=e.reactive({day:"",time:"",value:""}),w=e.ref([]),E=(W,Y)=>{const q=r.getViewDate(W),J=d.layerView==="years"?10:1,U=f.operateViewDataType;return q[Y](J,U).format(d.formatIn)},M=(W,Y)=>{if(n.isEmpty(W))return"";const q=Y==="right"?d.formatOutEnd:d.formatOut;if(n.isString(W)){const J=r.getMomentDate(W);return J?J.format(q):""}return W.format(q)},V=()=>{const W=r.getMergeDayTime(S.day,S.time);S.value=W,h.text=M(W,"left")},I=()=>{const W=r.getMergeDayTime(T.day,T.time);T.value=W,g.text=M(W,"right")},N=()=>{if(f.selectCount===2){let W="-1";if(!n.isEmpty(S.day)&&!n.isEmpty(T.day)&&!n.isEmpty(w.value)){const Y="YYYY-MM-DD";let q=r.getMomentDate(S.day,Y),J=r.getMomentDate(T.day,Y);if(q&&J){switch(d.layerType){case"years":if(q=r.getMomentDate(q.startOf("year").format(Y),Y),J=r.getMomentDate(J.endOf("year").format(Y),Y),!q||!J){f.activeQuick="-1";return}break;case"months":if(q=r.getMomentDate(q.startOf("month").format(Y),Y),J=r.getMomentDate(J.endOf("month").format(Y),Y),!q||!J){f.activeQuick="-1";return}break}const U=q,ae=J;U&&ae&&w.value.forEach(ee=>{ee.start&&ee.end&&U.isSame(_e.getDayjsObject(ee.start).format(Y))&&ae.isSame(_e.getDayjsObject(ee.end).format(Y))&&(W=ee.id)})}}f.activeQuick=W}},x=W=>{const Y=S.value,q=T.value,J=n.isEmpty(Y),U=n.isEmpty(q),ae=!J&&U,ee=J&&!U;let G=!1,ne=!1;if(W&&(ae||ee)){const j=r.getMomentDate(ae?Y:q);j&&(G=W.isBefore(j,"day"),ne=W.isSame(j,"day"))}return{isStart:ae,isEnd:ee,isBefore:G,isSame:ne}},L=W=>{if(f.selectCount===1){const Y=W.format("YYYY-MM-DD"),q=S.day,J=T.day,U=x(W);f.hoverValue=Y;let ae="",ee="";U.isBefore?(ae=Y,ee=U.isStart?q:J):(ae=U.isEnd?J:q,ee=Y),f.previewStart=ae,f.previewEnd=ee,h.text=M(r.getMergeDayTime(ae,S.time),"left"),g.text=M(r.getMergeDayTime(ee,T.time),"right")}},D=W=>{switch(f.previewStart="",f.previewEnd="",f.selectCount){case 0:case 2:{f.selectCount=1,f.activeQuick="",S.day=W,V(),T.day="",T.time="",T.value="",g.text=M(r.getMergeDayTime(W,""),"right"),f.hoverValue=W;break}case 1:{f.selectCount=2;const Y=r.getMomentDate(W);if(!Y){f.selectCount=1;break}const q=x(Y);q.isSame?(S.day=W,V(),T.day=W,I()):q.isBefore?(T.day=S.day,T.time=S.time,S.day=W,V(),I()):(T.day=W,I()),f.hoverValue="";break}}f.selectCount===2&&N()},O=()=>{!f.isShowQuickBtn&&f.selectCount===2&&f.isCheck&&s("onSubmit",{start:S.value,end:T.value})},X=(W,Y)=>{const q=r.getMomentDate(Y),J=q?q.format("YYYY-MM-DD"):"",U=q?q.format("HH:mm:ss"):"",ae=q?r.getMergeDayTime(J,U):"";W?(S.day=J,S.time=U,S.value=ae,h.text=M(ae,"left")):(T.day=J,T.time=U,T.value=ae,g.text=M(ae,"right"))},Q=()=>{let W="";switch(d.layerType){case"days":W="months";break;case"months":W="years";break;case"years":W="years";break;default:W="months"}f.operateViewDataType=W;const Y=t.startValue||"",q=t.endValue||"",J=!n.isEmpty(Y),U=!n.isEmpty(q);if(f.selectCount=J&&U?2:J||U?1:0,h.view=r.getViewDate(Y).format(d.formatIn),g.view=E(h.view,"add"),X(!0,Y),X(!1,q),d.timeType==="time"){f.selectCount=2;const ae=d.layerType==="seconds"?"00:00:00":"00:00";n.isEmpty(h.text)&&X(!0,r.getValueEffective(ae)),n.isEmpty(g.text)&&X(!1,r.getValueEffective(ae))}R()},R=()=>{let W=[];n.isArray(t.rangeQuick)&&(W=n.getListClone(t.rangeQuick).filter(Y=>n.isObject(Y)&&n.isNonEmptyString(Y.id)),W.length>0&&W.push({id:"-1",text:u.value.common.custom})),w.value=W},C=()=>{Q(),N(),e.nextTick(()=>{e.nextTick(()=>{s("onInitComplete")})})},k=()=>{if(f.selectCount===2){const W=r.checkValue(S.value,T.value);f.isCheck=W.errMsg.length===0}};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.watch([()=>t.startValue,()=>t.endValue],([W,Y])=>{X(!0,W),X(!1,Y);const q=!n.isEmpty(W),J=!n.isEmpty(Y);f.selectCount=q&&J?2:q||J?1:0,f.selectCount!==2&&(f.activeQuick=""),f.hoverValue="",f.previewStart="",f.previewEnd="",N(),k()}),e.watch(()=>t.rangeQuick,()=>{f.operateViewDataType&&R()});const b=()=>{f.hoverValue="",f.previewStart="",f.previewEnd="",h.text=M(r.getMergeDayTime(S.day,S.time),"left"),g.text=M(r.getMergeDayTime(T.day,T.time),"right")},v=W=>{h.view=W,g.view=E(W,"add")},_=W=>{D(W),k(),O()},y=W=>{S.time=W,V(),k(),O()},B=W=>{L(W)},A=W=>{h.view=E(W,"subtract"),g.view=W},F=W=>{D(W),k(),O()},P=W=>{T.time=W,I(),k(),O()},H=W=>{L(W)},$=W=>{if(W.id!=="-1"){if(n.isEmpty(W.start)||n.isEmpty(W.end))return;const Y=_e.getDayjsObject(W.start),q=_e.getDayjsObject(W.end);if(!Y.isValid()||!q.isValid()){ve.warn("ClDateTimeRange",`快捷项 "${W.text}" 日期无效,已忽略`);return}let J=Y.format("YYYY-MM-DD"),U=q.format("YYYY-MM-DD");const ae=r.checkMinMax(J,U,"YYYY-MM-DD");if(!ae.isStartMax||!ae.isEndMin){ve.warn("ClDateTimeRange",`快捷项 "${W.text}" 超出可选范围,已忽略`);return}ae.isStartMin||(J=ae.minDay),ae.isEndMax||(U=ae.maxDay),S.day=J,V(),T.day=U,I(),h.view=J;const ee=n.isEmpty(U)?null:r.getMomentDate(U);g.view=ee?ee.startOf("month").format(d.formatIn):E(J,"add"),f.hoverValue="",f.previewStart="",f.previewEnd="",f.selectCount=2,f.activeQuick=W.id,k(),O()}},z=()=>{f.selectCount===2&&f.isCheck&&(s("onSubmit",{start:S.value,end:T.value}),f.isCheck=!1)},oe=()=>{s("onCancel")};return l({getValue:()=>({start:S.value,end:T.value})}),(W,Y)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(m),class:e.normalizeClass(p.value),onMouseleave:b},[e.createElementVNode("div",ph,[e.createElementVNode("div",fh,[e.createElementVNode("div",hh,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:h.text,name:h.name},null,8,gh),e.createVNode(fe,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",vh,[e.createVNode(sa,{selectValue:f.selectCount===2?S.value:"-1",startValue:f.previewStart||S.value,endValue:f.previewEnd||T.value,viewValue:h.view,hoverValue:f.hoverValue,minValue:a.minValue,maxValue:a.maxValue,onOnChangeViewValue:v,onOnSelectDate:_,onOnSelectTime:y,onOnHoverDate:B},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",yh,[e.createElementVNode("div",kh,[e.createElementVNode("div",Sh,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:g.text,name:g.name},null,8,bh),e.createVNode(fe,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",wh,[e.createVNode(sa,{selectValue:f.selectCount===2?T.value:"-1",startValue:f.previewStart||S.value,endValue:f.previewEnd||T.value,viewValue:g.view,hoverValue:f.hoverValue,minValue:a.minValue,maxValue:a.maxValue,onOnChangeViewValue:A,onOnSelectDate:F,onOnSelectTime:P,onOnHoverDate:H},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Ch,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(q,J)=>(e.openBlock(),e.createElementBlock("li",{key:`${i}-${q.id}-${J}`,role:"button",tabindex:"0",class:e.normalizeClass({active:q.id===f.activeQuick,"calendar-quick-special":q.id==="-1"}),onClick:U=>$(q),onKeydown:[e.withKeys(e.withModifiers(U=>$(q),["prevent"]),["enter"]),e.withKeys(e.withModifiers(U=>$(q),["prevent"]),["space"])]},e.toDisplayString(q.text),43,Eh))),128))]),f.isShowQuickBtn?(e.openBlock(),e.createElementBlock("div",Bh,[e.createVNode(Qe,{className:"quick-submit",label:e.unref(u).common.submit,size:"small",disabled:f.selectCount!==2||!f.isCheck,onOnClick:z},null,8,["label","disabled"]),e.createVNode(Qe,{className:"quick-cancel",label:e.unref(u).common.cancel,size:"small",color:"grayLight",onOnClick:oe},null,8,["label"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],42,mh))}}),Th={key:3,class:"datetime-errmsg",role:"alert"},wl=e.defineComponent({name:"ClDateTimeBase",__name:"DateTimeBase",props:{isDefault:{type:Boolean,default:!1},isRange:{type:Boolean,default:!1},start:String,end:String,minDate:String,maxDate:String,rangeQuick:{type:Array,default:()=>[]},errMsg:{type:Array,default:()=>[]}},emits:{onSelectValue:a=>!0,onClose:()=>!0,onInitComplete:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=`clDatetimeBase-${n.getRandom(5)}`,u=e.inject("$DateTimeTop");u||ve.warn("ClDateTimeBase","未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");const c=e.computed(()=>!!u);t.isDefault===t.isRange&&ve.warn("ClDateTimeBase",`isDefault(${t.isDefault}) 与 isRange(${t.isRange}) 必须恰好一个为 true`);const r=e.useTemplateRef("refEl");let d=!1;const m=e.computed(()=>n.isArray(t.errMsg)&&t.errMsg.length>0),p=S=>{s("onSelectValue",S)},f=()=>{s("onClose")},h=()=>{d||(d=!0,s("onInitComplete"))};return l({getValue:()=>r.value?r.value.getValue():t.isDefault?n.isNonEmptyString(t.start)?u?.getMomentDate(t.start)??t.start:null:n.isNonEmptyString(t.start)||n.isNonEmptyString(t.end)?{start:t.start,end:t.end}:""}),(S,T)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value&&a.isDefault?(e.openBlock(),e.createBlock(dh,{key:0,ref_key:"refEl",ref:r,value:a.start,minValue:a.minDate,maxValue:a.maxDate,onOnSelectValue:p,onOnInitComplete:h},null,8,["value","minValue","maxValue"])):c.value&&a.isRange?(e.openBlock(),e.createBlock(xh,{key:1,ref_key:"refEl",ref:r,rangeQuick:a.rangeQuick,minValue:a.minDate,maxValue:a.maxDate,startValue:a.start,endValue:a.end,onOnSubmit:p,onOnCancel:f,onOnInitComplete:h},null,8,["rangeQuick","minValue","maxValue","startValue","endValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),m.value?(e.openBlock(),e.createElementBlock("ul",Th,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.errMsg,(w,E)=>(e.openBlock(),e.createElementBlock("li",{key:`${i}-err-${E}`},e.toDisplayString(w),1))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],64))}}),Dh=["id"],Ih=["id"],_h="2000-01-01",xa=e.defineComponent({name:"ClDateTime",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:a=>["default","range"].includes(a)},layerType:{type:String,default:"days",validator:a=>["years","months","days","hours","minutes","seconds"].includes(a)},timeType:{type:String,default:"date",validator:a=>["date","time","datetime"].includes(a)},format:String,formatEnd:String,direction:{type:String,default:"left"},minDate:String,maxDate:String,isClear:{type:Boolean,default:!1},rangeQuick:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!0},themeStyle:{type:String,default:"default",validator:a=>["default","noBorder"].includes(a)},arrowDirection:{type:String,default:"right"},isUseDropdownArrow:{type:Boolean,default:!0},checkCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:" ~ "},appendContainer:{type:String,default:""}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l)=>!0,onInit:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("dataTime");const c=`datetime-${n.getRandom(8)}`,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElDatetime"),p=e.reactive({isInit:!1,isDefault:t.theme!=="range",isRange:t.theme==="range",isShowPopup:t.isDropdown,timeType:"",layerType:t.layerType,layerView:"",formatIn:"",formatOut:"",formatOutEnd:"",rangeQuick:[],errMsg:[]}),f=e.reactive({showText:"",start:"",end:""}),h={lastStart:"",lastEnd:""},g=e.computed(()=>{let U=t.arrowDirection;return n.isEmpty(U)&&(U=t.themeStyle==="noBorder"?"left":"right"),U}),S=e.computed(()=>{let U={"panel-date-time":!0};return t.themeStyle==="noBorder"&&(U["datetime-themeStyle-noBorder"]=!0),t.themeStyle==="noBorder"&&n.isEmpty(f.showText)&&(U["datetime-empty"]=!0),t.isDropdown||(U["datetime-noPopup"]=!0,U[`datetime-${t.theme}`]=!0),U=n.getJsonMerge(U,ue.getClassNameJson(t.className)),n.getStringByJson(U," ")}),T=e.computed(()=>`datetime-dropdown datetime-${t.theme} datetime-dropdown-${t.theme}`),w=e.computed(()=>{let U={"panel-date-time":!0};return U=n.getJsonMerge(U,ue.getClassNameJson(t.className)),`${n.getStringByJson(U," ")} cl-plaintext-value`}),E=e.computed(()=>{const U=f.showText,ae=n.isString(t.plaintextSeparator)?t.plaintextSeparator:" ~ ";return!p.isRange||ae===" ~ "?U:U.split(" ~ ").join(ae)}),M=()=>[{id:"today",text:i.value.today,start:De(),end:De()},{id:"yesterDay",text:i.value.yesterDay,start:De().subtract(1,"day"),end:De().subtract(1,"day")},{id:"pastDays7",text:i.value.pastDays7,start:De().subtract(7,"day"),end:De().subtract(1,"day")},{id:"pastDays30",text:i.value.pastDays30,start:De().subtract(30,"day"),end:De().subtract(1,"day")},{id:"mont",text:i.value.montCurrent,start:De().startOf("month"),end:De().endOf("month")},{id:"montLast",text:i.value.montLast,start:De().subtract(1,"month").startOf("month"),end:De().subtract(1,"month").endOf("month")}],V=()=>[{id:"mont",text:i.value.montCurrent,start:De().startOf("month"),end:De().endOf("month")},{id:"montLast",text:i.value.montLast,start:De().subtract(1,"month").startOf("month"),end:De().subtract(1,"month").endOf("month")},{id:"montLately6",text:i.value.montLately6,start:De().subtract(5,"month").startOf("month"),end:De().endOf("month")},{id:"year",text:i.value.yearCurrent,start:De().startOf("year"),end:De().endOf("year")},{id:"yearLast",text:i.value.yearLast,start:De().subtract(1,"year").startOf("year"),end:De().subtract(1,"year").endOf("year")}],I=()=>[{id:"year",text:i.value.yearCurrent,start:De().startOf("year"),end:De().endOf("year")},{id:"yearLast",text:i.value.yearLast,start:De().subtract(1,"year").startOf("year"),end:De().subtract(1,"year").endOf("year")}],N=U=>{const ae=n.isEmpty(U.start),ee=n.isEmpty(U.end),G=ae?"":De(U.start).format(p.formatIn),ne=ee?"":De(U.end).format(p.formatIn),j=p.isDefault?G:ae||ee?"":`${G}~${ne}`,te=p.isDefault?{value:G}:{start:G,end:ne,value:j};return{value:j,info:te}},x=()=>{d.value&&d.value.setOpen(!1)},L=()=>p.timeType==="time",D=U=>{if(!U)return"";const ae=n.isString(U)?n.trim(U):"";return L()?/^\d{4}-\d{2}-\d{2}/.test(ae)?ae:`${_h} ${ae}`:ae},O=()=>De(),X=(U,ae)=>{let ee=null;if(!n.isEmpty(U)){const G=n.isUndefined(ae)?p.formatIn:ae;ee=n.isString(U)?De(U,G):De(U),ee&&!ee.isValid()&&(ee=null)}return ee},Q=U=>{const ae=X(U);return ae?ae.startOf("month"):O().startOf("month")},R=(U,ae,ee)=>{const G=n.isEmpty(ee)?p.formatIn:ee;let ne="";if(!n.isEmpty(t.minDate)){const be=X(D(t.minDate));ne=be?be.format(G):""}let j="";if(!n.isEmpty(t.maxDate)){const be=X(D(t.maxDate));j=be?be.format(G):""}let te=!0,re=!0,pe=!0,ie=!0,se=!0,K=!1;const le=n.isEmpty(U),de=n.isEmpty(ae);let me;switch(t.layerType){case"years":me="year";break;case"months":me="month";break;case"days":me="day";break;case"hours":me="hour";break;case"minutes":me="minute";break;case"seconds":me="second";break;default:me="day";break}if(!le){const be=De(U);if(be.isValid()&&(n.isEmpty(ne)||(te=be.isSameOrAfter(ne,me)),n.isEmpty(j)||(re=be.isSameOrBefore(j,me)),!de)){const Ee=De(ae);Ee.isValid()&&(n.isEmpty(ne)||(pe=Ee.isSameOrAfter(ne,me)),n.isEmpty(j)||(ie=Ee.isSameOrBefore(j,me)),Ee.isBefore(be)&&(se=!1))}}const he=[],Ce=p.isRange?i.value.rangeStartLabel:"";return re?pe?(te||he.push(`${Ce}${i.value.checkStartMinLabel}(${X(ne,G)?.format(p.formatOut)??ne})`),ie||he.push(`${i.value.checkEndMaxLabel}(${X(j,G)?.format(p.formatOut)??j})`)):he.push(`${i.value.checkEndMinLabel}(${X(ne,G)?.format(p.formatOut)??ne})`):he.push(`${Ce}${i.value.checkStartMaxLabel}(${X(j,G)?.format(p.formatOut)??j})`),p.isRange&&((le||de)&&(K=!0,he.push(i.value.checkRangeEmptyLabel)),se||he.push(i.value.checkStartEndLabel)),{isStartMin:te,isStartMax:re,isEndMin:pe,isEndMax:ie,isStartEnd:se,isRangeEmpty:K,errMsg:he,minDay:ne,maxDay:j}},C=(U,ae,ee)=>{const G=R(U,ae||"",ee);return p.errMsg=G.errMsg,d.value&&e.nextTick(()=>{d.value?.calculationPosition()}),G},k=()=>{let U=[];switch(t.layerType){case"days":case"hours":case"minutes":case"seconds":U=p.timeType==="time"?[]:M();break;case"months":U=V();break;case"years":U=I();break}return U},b=()=>{let U=[];p.isRange&&(n.isArray(t.rangeQuick)&&t.rangeQuick.length>0?U=[...t.rangeQuick]:U=k()),p.rangeQuick=U},v=()=>{["default","range"].includes(t.theme)||ve.warn("ClDateTime",`theme 非法值 "${t.theme}",可选值 default/range`),["years","months","days","hours","minutes","seconds"].includes(t.layerType)||ve.warn("ClDateTime",`layerType 非法值 "${t.layerType}"`),["date","time","datetime"].includes(t.timeType)||ve.warn("ClDateTime",`timeType 非法值 "${t.timeType}"`),["default","noBorder"].includes(t.themeStyle)||ve.warn("ClDateTime",`themeStyle 非法值 "${t.themeStyle}"`)},_=()=>{v();let U="",ae="",ee="";switch(t.layerType){case"years":U="date",ae="YYYY",ee=t.layerType;break;case"months":U="date",ae="YYYY-MM",ee=t.layerType;break;case"days":U="date",ae="YYYY-MM-DD",ee=t.layerType;break;case"hours":U=t.timeType==="date"?"datetime":t.timeType,ae=U==="time"?"HH:00":"YYYY-MM-DD HH:00",ee=U==="datetime"?"days":"times";break;case"minutes":U=t.timeType==="date"?"datetime":t.timeType,ae=U==="time"?"HH:mm":"YYYY-MM-DD HH:mm",ee=U==="datetime"?"days":"times";break;case"seconds":U=t.timeType==="date"?"datetime":t.timeType,ae=U==="time"?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss",ee=U==="datetime"?"days":"times";break;default:U="date",ae="YYYY-MM-DD",ee=t.layerType;break}p.timeType=U,p.layerView=ee,p.formatIn=U==="date"?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",p.formatOut=n.isNonEmptyString(t.format)?t.format:ae,p.formatOutEnd=n.isNonEmptyString(t.formatEnd)?t.formatEnd:ae},y=U=>{let ae="",ee="",G="";if(n.isNonEmptyString(U)){if(p.isDefault){const ne=D(U),j=De(ne);j.isValid()&&(ee=j.format(p.formatIn),ae=j.format(p.formatOut))}else if(p.isRange){const ne=U.split("~");if(ne.length===2){const j=D(ne[0]),te=D(ne[1]),re=De(j),pe=De(te);re.isValid()&&pe.isValid()&&(ee=re.format(p.formatIn),G=pe.format(p.formatIn),ae=`${re.format(p.formatOut)} ~ ${pe.format(p.formatOutEnd)}`)}}}f.start=ee,f.end=G,f.showText=ae},B=U=>{let ae=!0;if(t.checkCallback&&!n.isEmpty(U)){try{p.isDefault?ae=t.checkCallback(U):p.isRange&&(ae=t.checkCallback(U.start,U.end))}catch(ee){ve.warn("ClDateTime","checkCallback 回调执行异常,本次选择不生效",ee),ae=!1}ae=n.isBoolean(ae)?ae:!0}return ae},A=U=>{let ae="",ee="",G="",ne=!1;if(p.isDefault){if(!n.isEmpty(U)){const re=X(U);re&&(ee=re.format(p.formatIn),ae=re.format(p.formatOut))}ne=ee!==h.lastStart}else if(p.isRange){if(!n.isEmpty(U)&&!n.isEmpty(U.start)&&!n.isEmpty(U.end)){const re=X(U.start),pe=X(U.end);re&&pe&&(ee=re.format(p.formatIn),G=pe.format(p.formatIn),ae=`${re.format(p.formatOut)} ~ ${pe.format(p.formatOutEnd)}`)}ne=ee!==h.lastStart||G!==h.lastEnd}const j=R(ee,G);let te=!1;return j.errMsg.length===0&&(te=B(U)),p.errMsg=j.errMsg,d.value&&e.nextTick(()=>{d.value?.calculationPosition()}),{start:ee,end:G,text:ae,isChange:ne,checkInfo:j,isCheck:te}},F=()=>{_(),b(),y(t.value),e.nextTick(()=>{p.isInit=!0})},P=()=>{const U=m.value?.getValue();let ae="",ee="";if(p.isDefault){if(!n.isEmpty(U)){const G=X(U);G&&(ae=G.format(p.formatIn))}}else if(p.isRange){const G=U;if(!n.isEmpty(G?.start)&&!n.isEmpty(G?.end)){const ne=X(G?.start),j=X(G?.end);ne&&j&&(ae=ne.format(p.formatIn),ee=j.format(p.formatIn))}}return N({start:ae,end:ee})};e.onMounted(()=>{e.nextTick(()=>{F()})}),e.watch(()=>t.value,(U,ae)=>{U!==ae&&(y(U),h.lastStart=f.start,h.lastEnd=f.end)}),e.watch(()=>t.isDropdown,U=>{p.isShowPopup=U}),e.watch([()=>t.theme,()=>t.layerType,()=>t.timeType,()=>t.format,()=>t.formatEnd],()=>{p.isDefault=t.theme!=="range",p.isRange=t.theme==="range",_(),b(),y(t.value),h.lastStart=f.start,h.lastEnd=f.end});const H=U=>{t.disabled||U&&(p.errMsg=[],h.lastStart=f.start,h.lastEnd=f.end,b())},$=()=>{if(!t.disabled){f.start="",f.end="",f.showText="",h.lastStart="",h.lastEnd="";const U=N(f);s("update:value",U.value),s("update:modelValue",U.value),s("onChange",U.value,U.info)}},z=U=>{if(!t.disabled){const{start:ae,end:ee,text:G,isChange:ne,isCheck:j}=A(U);if(j&&(f.start=ae,f.end=ee,f.showText=G,h.lastStart=ae,h.lastEnd=ee,x(),ne)){const te=N(f);s("update:value",te.value),s("update:modelValue",te.value),s("onChange",te.value,te.info)}}},oe=()=>{x()};let Z=!1;const W=()=>{p.isShowPopup&&d.value&&(d.value.checkIsShowOpen()||d.value.initCompleteOpen()),Z||(Z=!0,s("onInit"))};return e.provide("$DateTimeTop",{keyIndex:c,elId:t.id,getMomentDate:X,getViewDate:Q,getNow:O,checkIsTimes:L,checkValue:C,checkMinMax:R,getValueEffective:D,getMergeDayTime:(U,ae)=>{let ee="";const G=n.isString(U)?n.trim(U):"";let ne=n.isString(ae)?n.trim(ae):"";switch(p.timeType){case"date":ee=G;break;case"time":ee=D(ne)||"";break;case"datetime":n.isEmpty(G)||(ne=n.isEmpty(ae)?"00:00:00":ne,ee=`${G} ${ne}`);break}return ee},Dayjs:De}),e.provide("$DateTimeTopBase",e.readonly(p)),l({getValue:()=>P().value,getValueData:()=>P().info,setValue:U=>{y(U),h.lastStart=f.start,h.lastEnd=f.end}}),(U,ae)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:e.normalizeClass(w.value)},e.toDisplayString(E.value),11,Dh)):a.isDropdown?(e.openBlock(),e.createBlock(En,{key:1,ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:S.value,classDropDown:T.value,placeholder:a.placeholder,isDisabled:a.disabled,isClear:a.isClear,textLabel:f.showText,textArrowDirection:g.value,dropdownArrowPos:a.direction,isUseDropdownArrow:a.isUseDropdownArrow,appendContainer:a.appendContainer,appendFollowWidth:!1,onOnChangeOpen:H,onOnClear:$},{textExtend:e.withCtx(()=>[e.createVNode(fe,{name:p.timeType==="time"?"clock":"calendar",className:"datetime-icon","aria-hidden":"true"},null,8,["name"])]),dropdown:e.withCtx(()=>[e.createVNode(wl,{ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:f.start,end:f.end,minDate:a.minDate,maxDate:a.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:z,onOnClose:oe,onOnInitComplete:W},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","dropdownArrowPos","isUseDropdownArrow","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(r),class:e.normalizeClass(S.value)},[p.isInit?(e.openBlock(),e.createBlock(wl,{key:0,ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:f.start,end:f.end,minDate:a.minDate,maxDate:a.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:z,onOnClose:oe,onOnInitComplete:W},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Ih))}}),Nh={key:0,class:"dropdownLayer-text-container"},Vh={class:"dropdownLayer-text-render"},Mh={class:"dropdownLayer-text-arrow"},Gs=e.defineComponent({name:"ClDropdownMenu",__name:"Index",props:{id:String,className:String,classDropDown:String,label:String,direction:{type:String,default:"left",validator:a=>["left","right","center","top","bottom"].includes(a)},dropDownPos:{type:String,default:"down",validator:a=>["down","up","left","right"].includes(a)},isUseLabelArrow:{type:Boolean,default:!1},isUseDropdownArrow:{type:Boolean,default:!1},transitionEnter:String,transitionLeave:String},emits:{onChangeOpen:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let r={"panel-dropdown-menu":!0};return r=n.getJsonMerge(r,ue.getClassNameJson(o.className)),Object.keys(r).join(" ")}),c=r=>{t("onChangeOpen",r)};return e.provide("$DropdownmenuTop",e.reactive({hideDropdown:()=>{i.value?.setOpen(!1)}})),(r,d)=>(e.openBlock(),e.createBlock(uo,{ref_key:"refElDropdownLayer",ref:i,id:e.unref(s),classParent:u.value,classDropDown:a.classDropDown,dropdownArrowPos:a.direction,dropDownPos:a.dropDownPos,isUseDropdownArrow:a.isUseDropdownArrow,transitionEnter:a.transitionEnter,transitionLeave:a.transitionLeave,onOnChangeOpen:c},{label:e.withCtx(()=>[a.isUseLabelArrow?(e.openBlock(),e.createElementBlock("div",Nh,[e.createElementVNode("div",Vh,[e.renderSlot(r.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(a.label),1)])]),e.createElementVNode("div",Mh,[e.createVNode(fe,{name:"angle-down"})])])):e.renderSlot(r.$slots,"label",{key:1},()=>[e.createTextVNode(e.toDisplayString(a.label),1)])]),dropdown:e.withCtx(()=>[e.createElementVNode("ul",null,[e.renderSlot(r.$slots,"default")])]),_:3},8,["id","classParent","classDropDown","dropdownArrowPos","dropDownPos","isUseDropdownArrow","transitionEnter","transitionLeave"]))}}),Oh=["id"],Lh=["id","aria-disabled"],Qs=e.defineComponent({name:"ClDropdownMenuItem",__name:"Item",props:{id:String,className:String,url:String,disabled:{type:Boolean,default:!1},isDivider:{type:Boolean,default:!1},extData:Object},emits:{onClick:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.inject("$DropdownmenuTop"),u=e.computed(()=>{let r={"dropdownMenu-item":!0,"dropdownMenu-item-disabled":o.disabled,"panel-dropdown-menu-item":!0};return r=n.getJsonMerge(r,ue.getClassNameJson(o.className)),r}),c=()=>{o.disabled||(i?.hideDropdown(),t("onClick",o.extData))};return(r,d)=>a.isDivider?(e.openBlock(),e.createElementBlock("li",{key:0,id:e.unref(s),role:"separator",class:"dropdownMenu-divider"},null,8,Oh)):(e.openBlock(),e.createElementBlock("li",{key:1,id:e.unref(s),role:"menuitem","aria-disabled":a.disabled?"true":void 0,class:e.normalizeClass(u.value)},[e.createVNode(Ot,{url:a.url,disabled:a.disabled,isHideUnderline:!0,onOnClick:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},8,["url","disabled"])],10,Lh))}}),Zs=e.defineComponent({name:"ClDropdownPopup",__name:"Index",props:{id:String,className:{type:String,default:""},dropdownArrowPos:{type:String,default:"center"},dropDownPos:{type:String,default:"up"},isUseDropdownArrow:{type:Boolean,default:!0},appendContainer:{type:String,default:""},transitionEnter:{type:String,default:"animated fadeIn"},transitionLeave:{type:String,default:"animated fadeOut"},triggers:{type:String,default:"click"}},emits:{onChangeOpen:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElDropdownLayer"),c=e.computed(()=>{let h={"panel-dropdown-popup":!0};return h=n.getJsonMerge(h,ue.getClassNameJson(t.className)),Object.keys(h).filter(g=>h[g]).join(" ")}),r=h=>{s("onChangeOpen",h)};return l({setOpen:h=>{if(!u.value){ve.warn("DropdownPopup","子组件尚未挂载,setOpen 调用已忽略");return}u.value.setOpen(h)},calculationPosition:()=>{if(!u.value){ve.warn("DropdownPopup","子组件尚未挂载,calculationPosition 调用已忽略");return}u.value.calculationPosition()},initCompleteOpen:()=>{if(!u.value){ve.warn("DropdownPopup","子组件尚未挂载,initCompleteOpen 调用已忽略");return}u.value.initCompleteOpen()},checkCurrentIsOpen:()=>{if(!u.value){ve.warn("DropdownPopup","子组件尚未挂载,checkCurrentIsOpen 调用已忽略");return}return u.value.checkIsShowOpen()}}),(h,g)=>(e.openBlock(),e.createBlock(uo,{ref_key:"refElDropdownLayer",ref:u,id:e.unref(i),classParent:c.value,classDropDown:"dropdownPopup-dropdown",dropdownArrowPos:a.dropdownArrowPos,dropDownPos:a.dropDownPos,isUseDropdownArrow:a.isUseDropdownArrow,appendContainer:a.appendContainer,transitionEnter:a.transitionEnter,transitionLeave:a.transitionLeave,triggers:a.triggers,onOnChangeOpen:r},{label:e.withCtx(()=>[e.renderSlot(h.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(h.$slots,"dropdown")]),_:3},8,["id","classParent","dropdownArrowPos","dropDownPos","isUseDropdownArrow","appendContainer","transitionEnter","transitionLeave","triggers"]))}}),$h=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],Ah={color:$h,title:{textStyle:{fontWeight:"normal",color:"#008acd"}},visualMap:{itemWidth:15,color:["#5ab1ef","#e0ffff"]},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#008acd"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},timeline:{lineStyle:{color:"#008acd"},controlStyle:{color:"#008acd",borderColor:"#008acd"},symbol:"emptyCircle",symbolSize:3},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},candlestick:{itemStyle:{color:"#d87a80",color0:"#2ec7c9"},lineStyle:{width:1,color:"#d87a80",color0:"#2ec7c9"},areaStyle:{color:"#2ec7c9",color0:"#b6a2de"}},scatter:{symbol:"circle",symbolSize:4},map:{itemStyle:{color:"#2ec7c9"},label:{color:"#000000"}},graph:{itemStyle:{color:"#d87a80"},linkStyle:{color:"#2ec7c9"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#2ec7c9"],[.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}}},Fh=["id"],Ta=e.defineComponent({name:"ClEcharts",__name:"Index",props:{id:String,chartOption:Object,className:String,height:{type:[Number,String],default:400},isRunLoad:{type:Boolean,default:!1}},emits:["onInitFirst","onHideResize","onError"],setup(a,{expose:l,emit:o}){let t=null,s=!1;const i=()=>(t||(t=import("echarts")),t),u=a,c=o,r=u.id,d=e.useTemplateRef("refElChart"),m=e.reactive({isShowLoad:u.isRunLoad,isEmptyData:!1}),p={resizeEvent:null,chartObject:null,initTimer:null,isHideEmit:!1},f=e.computed(()=>{let L={"panel-echarts":!0,"chart-loading":m.isShowLoad||m.isEmptyData};return L=n.getJsonMerge(L,ue.getClassNameJson(u.className)),L}),h=e.computed(()=>{const L={};return(m.isShowLoad||m.isEmptyData)&&(L.height="100%"),L}),g=e.computed(()=>{const L={},{height:D}=u;return typeof D=="number"&&n.isFinite(D)&&D>0?L.height=`${D}px`:n.isNonEmptyString(D)&&(L.height=D),L}),S=()=>{c("onHideResize")},T=()=>{c("onInitFirst")},w=()=>{p.chartObject&&p.chartObject.resize()},E=async L=>{if(!d.value)return;const D=n.isEmpty(L);if(m.isEmptyData=D,!D&&L)try{const O=await i();s||(O.registerTheme("macarons",Ah),s=!0),p.chartObject||(p.chartObject=O.init(d.value,"macarons"),p.initTimer=setTimeout(()=>{T()},50)),p.chartObject.setOption(L,!0),w()}catch{p.initTimer&&(clearTimeout(p.initTimer),p.initTimer=null),c("onError","图表配置异常")}else p.chartObject&&p.chartObject.clear()},M=()=>{p.chartObject&&(ue.isHiddenParent(d.value)?p.isHideEmit||(p.isHideEmit=!0,S()):(p.isHideEmit&&(p.isHideEmit=!1),w()))},V=()=>{E(u.chartOption)};return e.onMounted(()=>{p.resizeEvent=new ut({callback:()=>{M()}}),e.nextTick(()=>{V()})}),e.onBeforeUnmount(()=>{p.resizeEvent&&p.resizeEvent.destroy(),p.initTimer&&clearTimeout(p.initTimer),p.chartObject&&(p.chartObject.dispose(),p.chartObject=null)}),e.onActivated(()=>{p.resizeEvent||(p.resizeEvent=new ut({callback:()=>{M()}})),e.nextTick(()=>{w()})}),e.onDeactivated(()=>{p.resizeEvent&&(p.resizeEvent.destroy(),p.resizeEvent=null)}),e.watch(()=>u.isRunLoad,L=>{m.isShowLoad=L}),e.watch(()=>u.chartOption,L=>{E(L)}),l({getChartObject:()=>p.chartObject,getChartElement:()=>d.value,resize:()=>{w()}}),(L,D)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(f.value),style:e.normalizeStyle(h.value)},[e.renderSlot(L.$slots,"chartHead"),e.createElementVNode("div",{ref_key:"refElChart",ref:d,style:e.normalizeStyle(g.value),role:"img","aria-label":"图表"},null,4),e.createVNode(on,{isLoadIng:m.isShowLoad,isEmpty:m.isEmptyData},{nothingData:e.withCtx(()=>[e.renderSlot(L.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty"])],14,Fh))}});class Ph{colorPalette;constructor(){this.colorPalette=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"]}_clipRectByRect(l,o){const t=Math.max(l.x,o.x),s=Math.min(l.x+l.width,o.x+o.width),i=Math.max(l.y,o.y),u=Math.min(l.y+l.height,o.y+o.height);if(s>=t&&u>=i)return{x:t,y:i,width:s-t,height:u-i}}getBaseOptions(l){const o={title:{show:!1,text:""},tooltip:{trigger:"item",padding:5,borderWidth:0,textStyle:{color:"#FFFFFF"}},toolbox:{show:!1},legend:{data:[]},series:[]};return n.getJsonMergeDeep(o,l)}getOptionAxis(l){let o=!0;switch(l.chartType){case"hour":o=!1;break;case"day":o=!1;break}const t={interval:"auto"};o?t.interval=0:t.interval=l.chartType==="hour"?0:"auto";const s=n.isEmpty(l.tipTitleFormat)?"":l.tipTitleFormat,i=n.isEmpty(l.seriesNameFormat)?"":l.seriesNameFormat,u=n.isBoolean(l.isMultiple)?l.isMultiple:!1,c=n.isBoolean(l.isTitleMergeSeriesName)?l.isTitleMergeSeriesName:!1;return this.getBaseOptions({title:{text:""},tooltip:{trigger:"axis",formatter:d=>{const m=g=>{const S=u?l.dataOriginal?.[0]?.list?.[g]:l.dataOriginal?.[g];return n.isEmpty(S)?null:S},p=[];let f=d[0].name;switch(n.isObject(d[0].data)&&d[0].data.extInfo&&!n.isUndefined(d[0].data.extInfo.xValueOriginal)&&(f=d[0].data.extInfo.xValueOriginal),l.chartType){case"hour":f=n.getHourInterval(f);break;case"day":f=n.getValueByFormat(f,"date");break}if(s.length>0){const g=m(d[0].dataIndex);if(!n.isEmpty(g)){const S=n.getJsonClone(g);S._title=f,f=n.convertStringFormat(s,S)}}c||p.push(n.encodeHTML(f));const h="<span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:${color}'></span>";for(let g=0;g<d.length;g++){const S=d[g],T=m(S.dataIndex),w=S.marker||n.convertStringFormatEncodeHTML(h,{color:S.color});let E=S.seriesName;if(i.length>0&&!n.isEmpty(T)){const V=n.getJsonClone(T);V._seriesName=E,E=n.convertStringFormat(i,V)}let M;if(n.isUndefined(S.value))M=null;else if(n.isNumber(S.value)){const V=Number(S.value);if(V<.01)M=n.getNumCeil(V,{isCeil:!1});else{let I="num";const N={isEmptyDefault:!1};V<.1&&(I="float",N.decimalNum=3),M=n.getValueByFormat(S.value,I,N)}}else M=S.value;if(n.isObject(S.data)&&!n.isUndefined(S.data.extInfo)&&S.data.extInfo.tipValueFormat&&S.data.extInfo.tipValueFormat.length>0){const V=n.getJsonClone(T);V._value=M,M=n.convertStringFormat(S.data.extInfo.tipValueFormat,V)}p.push(w+(c?n.encodeHTML(f):n.encodeHTML(E))+" : "+n.encodeHTML(M))}return p.join("<br />")}},legend:{data:[]},grid:{top:"20px",left:"1%",right:"1%",bottom:"1%",containLabel:!0},xAxis:{type:"category",boundaryGap:!0,axisLabel:{interval:t.interval,formatter:d=>{if(o&&l?.element?.clientWidth&&!n.isEmpty(l.dataOriginal)){const m=l.element.clientWidth,p=parseInt(((m-200)/l.dataOriginal.length).toString());if(p>0){const f=d.toString().split(""),h=[];let g=0;for(let T=0;T<f.length&&(g+=Math.ceil(ue.getTextWidth(f[T])),!(g>p));T++)h.push(f[T]);let S="";return f.length===h.length?S=d:h.length>3?S=h.slice(0,h.length-3).join("")+"...":S=h.join("")+"...",S}}return d}},splitLine:{show:!1},data:[]},yAxis:[],series:[]})}_getSeriesNumber(l){let o=typeof l=="symbol"?Number.NaN:Number(l);return o.toString()==="NaN"?o=0:o=Number(o.toFixed(2)),o}_getBaseDataInfo(l,o,t,s={}){const i=[],u=[],c=[],r=!n.isUndefined(s.seriesExtData);let d=0;if(l.forEach((f,h)=>{const g=this._getSeriesNumber(f[t]);if(h<s.totalOther||!s.isSumOther){const S=f[o]||"";i.push(S);const T={value:g,name:S};r&&(T.extInfo=s.seriesExtData),u.push(T),c.push(g)}else d+=Number(g)}),s.isSumOther){const f=n.isEmpty(s.otherText)?"其他":s.otherText;i.push(f);const h={value:d,name:f};r&&(h.extInfo=s.seriesExtData),u.push(h),c.push(d)}let m=c.length>0?Math.max.apply(null,c):0;m=n.getNumCeil(m,{isEndFive:Number(m)<100});let p=c.length>0?Math.min.apply(null,c):0;return p=n.getNumCeil(p,{isEndFive:Number(p)<100}),{legendData:i,seriesData:u,seriesMax:m,seriesMin:p}}getBaseData(l,o,t,s={}){const i=n.isEmpty(s.totalOther)?-1:parseInt(s.totalOther),u=i>0&&l.length>i,c=n.isUndefined(s.seriesExtData)?null:s.seriesExtData,r={totalOther:i,isSumOther:u,seriesExtData:c};if(n.isArray(t)){let d=[];const m=[],p=[],f=[];t.forEach((S,T)=>{const w=this._getBaseDataInfo(l,o,S,r);T===0&&(d=w.legendData),m.push({valueKey:S,data:w.seriesData,maxData:w.seriesMax,minData:w.seriesMin}),p.push(w.seriesMax),f.push(w.seriesMin)});const h=Math.max.apply(null,p),g=Math.min.apply(null,f);return{legendData:d,seriesData:m,seriesMax:h,seriesMin:g}}else return this._getBaseDataInfo(l,o,t,r)}_getItemXAxisSeries(l,o,t,s){let i,u;if(!n.isEmpty(o.xKey))if(i=l[o.xKey],u=i,n.isEmpty(i))i="";else{let p=n.isEmpty(t.xValueFormat)?"":t.xValueFormat;switch(t.chartType){case"day":n.isEmpty(t.xValueFormat)&&(p="MM.DD"),i=n.getValueByFormat(i,"date",{dateFormat:p});break}}let c;if(!n.isEmpty(o.seriesKey)){let p=o.seriesKey;n.isString(p)&&n.isExistValue(p,",")&&(p=p.split(",")),n.isString(p)?c=this._getSeriesNumber(l[o.seriesKey]):n.isArray(p)&&(c=[],p.forEach(f=>{let h;f===o.xKey?h=i:h=this._getSeriesNumber(l[f]),c.push(h)}))}let r;n.isEmpty(o.legendKey)||(r=l[o.legendKey]||"");const d=o.colorKey||"color";let m=l[d]||t[d]||"";if(n.isEmpty(m)&&t.isPolychrome){const p=n.isEmpty(t.colorPalette)?this.colorPalette:t.colorPalette,f=p.length,h=s%f;m=p[h]}return{xValue:i,xValueOriginal:u,seriesValue:c,legendValue:r,colorValue:m}}getLineOption(l,o,t={}){let s={type:"line",areaStyle:{},lineStyle:{},smooth:!0};t.seriesItem&&(s=n.getJsonMergeDeep(s,t.seriesItem));const i=n.getJsonMerge(t,{seriesItemBase:s});return this._getOneOptionBase(l,o,i)}getBarOption(l,o,t={}){let s={type:"bar"};const i=n.isBoolean(t.isPositiveNegative)?t.isPositiveNegative:!1;let u;i&&(u=n.isEmpty(t.seriesPos)?"vertical":t.seriesPos,s.label={show:!0}),s=n.getJsonMergeDeep(s,t.seriesItem);const c=n.getJsonMerge(t,{seriesItemBase:s,isPositiveNegative:i,seriesPos:u}),r=this._getOneOptionBase(l,o,c);return r.xAxis.boundaryGap=!0,r}getScatterOption(l,o,t={}){let s={type:"scatter",symbolSize:10};t.seriesItem&&(s=n.getJsonMergeDeep(s,t.seriesItem));const i=n.getJsonMerge(t,{seriesItemBase:s}),u=n.getJsonMerge(o,{seriesKey:[o.xKey,o.seriesKey]}),c=this._getOneOptionBase(l,u,i);return c.legend={show:!1},c.xAxis.axisTick={show:!0,alignWithLabel:!0},c.xAxis.splitLine={show:!1},c.xAxis.splitArea={show:!1},c.yAxis.axisTick={show:!0},c.yAxis.splitLine={show:!1},c.yAxis.splitArea={show:!1},c.tooltip.trigger="item",c.tooltip.formatter=r=>r.marker+r.value[0]+": "+r.value[1],c}_getOneOptionBase(l,o,t={}){const s=[];let i=[];const u=[];let c="";const r=n.getJsonMerge(o,{colorKey:t.colorKey});l.forEach((f,h)=>{const g=this._getItemXAxisSeries(f,r,t,h);if(n.isUndefined(g.xValue)||s.push(g.xValue),n.isUndefined(g.legendValue)||i.push(g.legendValue),!n.isUndefined(g.seriesValue)){const S=g.seriesValue,T={value:g.seriesValue,extInfo:{xValueOriginal:g.xValueOriginal,infoOriginal:f}};t.isPositiveNegative?(T.label={position:t.seriesPos==="horizontal"?S>=0?"left":"right":S>=0?"top":"bottom"},T.itemStyle={color:S>=0?"#1088F0":"#ee3c24"}):(!n.isEmpty(g.colorValue)&&c.length==0&&(c=g.colorValue),t.isPolychrome&&!n.isEmpty(g.colorValue)&&(T.itemStyle={color:g.colorValue})),n.isEmpty(t.seriesDataAddParam)||n.isExistValue(t.seriesDataAddParam,"symbolSize")&&!n.isEmpty(f.symbolSize)&&(T.symbolSize=f.symbolSize),u.push(T)}}),n.isUndefined(o.legendKey)||(i=n.getArrUnique(i));const d=n.getJsonMerge(t.seriesItemBase||{},{name:t.legendData?t.legendData:i[0],data:u});n.isEmpty(c)||(d.itemStyle={color:c});let m={};m=n.getJsonMerge(m,t);const p=this.getOptionAxis(m);return p.legend.data=i,p.xAxis=n.getJsonMergeDeep(p.xAxis,{axisLine:{}},t.xAxisItem||{}),p.xAxis.data=s,p.series=[d],p.yAxis={type:"value",axisLine:{show:!0}},p}getLineMultiOption(l,o,t={}){let s={type:"line",areaStyle:{},smooth:!0};t.seriesItem&&(s=n.getJsonMergeDeep(s,t.seriesItem));const i=n.getJsonMerge(t,{seriesItemBase:s,emptyFill:0});return this._getMultiOptionBase(l,o,i)}getBarMultiOption(l,o,t={}){let s={type:"bar"};t.seriesItem&&(s=n.getJsonMergeDeep(s,t.seriesItem));const i=n.getJsonMerge(t,{seriesItemBase:s}),u=this._getMultiOptionBase(l,o,i);if(n.isBoolean(t.isHideNull)?t.isHideNull:!0){const r=this._setBarMultiCustom(u,t);r.length>0&&(u.series=r,u.legend.show=!1,u.tooltip.formatter=d=>{const m=[];m.push(d[0]?.axisValue);for(let p=0;p<d.length;p++){const f=d[p];m.push(f.marker+n.encodeHTML(f.name)+" : "+n.getValueByFormat(f.value[1],"num"))}return m.join("<br />")})}return u}_setBarMultiCustom(l,o){const t=[],s={};let i=!1;l.series.forEach((c,r)=>{const{name:d,itemStyle:m}=c;c.data.forEach((p,f)=>{const h=n.isObject(p)?p.value:p;if(n.isUndefined(h))i=!0;else{const g=f.toString();n.isExistJsonKey(s,g)||(s[g]=[]),s[g].push(d);const S={name:d,value:[f,h]};if(!n.isUndefined(m))S.itemStyle=m;else{const T=n.isEmpty(o.colorPalette)?this.colorPalette:o.colorPalette,w=r%T.length;S.itemStyle={color:T[w]}}h<0&&(S.label={show:!0,position:"left"}),t.push(S)}})});let u=[];if(i){u=[{type:"custom",renderItem:(d,m)=>{const p=m.value(0),f=m.value(1),h=m.coord([0,p]),g=m.coord([Math.abs(f),p]);let S=m.size([0,1])[1]*.8,T=h[1]-S/2,w=d.coordSys.y;const E=m.value(3),M=m.value(4);let V=S;if(E>1||M>1){E!==M&&(S=S/M*E,T=h[1]-S/2);const x=S/E,L=m.value(2),D=x*(L-1);T+=D,w+=D;const O=x*.1;T+=O,w+=O,V=x*.8}const I={x:h[0],y:T,width:(g[0]-h[0])*.9,height:V};return f<0&&(I.x-=I.width),{type:"rect",shape:this._clipRectByRect(I,{x:d.coordSys.x,y:w,width:d.coordSys.width*.9,height:d.coordSys.height}),style:{fill:m.visual("color")}}},itemStyle:{opacity:1},encode:{x:1,y:0},label:{},data:[]}];const c=t.map(d=>s[d.value[0].toString()].length),r=Math.max.apply(null,c);t.forEach(d=>{const m=d.value[0],p=s[m.toString()],f=p.indexOf(d.name);d.value.push(f+1),d.value.push(p.length),d.value.push(r)}),u[0].data=t,u[0].label=l.series[0].label,u[0].label&&u[0].label.formatter&&(u[0].label.formatter=d=>n.getValueByFormat(d.value[1],"num"))}return u}_getMultiOptionBase(l,o,t={}){let s=[],i=[];const u={},c=[],r=n.isEmpty(t.seriesItemBase)?{}:t.seriesItemBase,d=n.isEmpty(t.emptyFill)?null:t.emptyFill,m=n.isBoolean(t.isCompletionLegendX)?t.isCompletionLegendX:!0,p=!n.isEmpty(t.xAxisSort),f=!n.isEmpty(t.legendSort),h=t.colorKey||"color",g=n.getJsonMerge(o,{colorKey:h});l.forEach(w=>{const E=w[g.legendKey]||"",M={};w.list.forEach((V,I)=>{const N=this._getItemXAxisSeries(V,{xKey:g.xKey},t,I);n.isUndefined(N.xValue)||(s.push(N.xValue),M[N.xValue]=V)}),i.push(E),u[E]=M}),i=n.getArrUnique(i),s=n.getArrUnique(s),f&&(i=t.legendSort),p&&(s=t.xAxisSort),i.forEach(w=>{const E=[];let M="";m?s.forEach((I,N)=>{if(n.isExistJsonKey(u,w)&&n.isExistJsonKey(u[w],I)){const x=this._getItemXAxisSeries(u[w][I],g,t,N);n.isUndefined(x.seriesValue)||E.push({value:x.seriesValue,extInfo:{xValueOriginal:x.xValueOriginal}}),M=x.colorValue}else E.push({value:d})}):n.isExistJsonKey(u,w)?Object.keys(u[w]).forEach((I,N)=>{const x=this._getItemXAxisSeries(u[w][I],g,t,N);n.isUndefined(x.seriesValue)||E.push({value:x.seriesValue,extInfo:{xValueOriginal:x.xValueOriginal}}),M=x.colorValue}):E.push({value:d});const V=n.getJsonMerge(r,{name:w});V.data=E,V.label&&t.isShowLabelThousand&&(V.label.formatter=I=>n.getValueByFormat(I.value,"num")),n.isEmpty(M)||(V.itemStyle={color:M}),c.push(V)});let S={};S=n.getJsonMerge(S,t),S.isMultiple=!0;const T=this.getOptionAxis(S);return T.legend.data=i,T.series=c,T.xAxis=n.getJsonMergeDeep(T.xAxis,t.xAxisItem||{}),T.xAxis.data=s,T.yAxis={type:"value",axisLine:{show:!0}},T}}const Rh=new Ph,Hh={key:0,class:"lineAxisTag-head"},zh={class:"lineAxisTag-list"},Uh="其他",ei=e.defineComponent({name:"ClEchartsLineAxisTag",__name:"Index",props:{id:String,className:String,type:{type:String,validator:a=>a==="day"||a==="hour"},height:{type:Number,default:400,validator:a=>a>0},isRunLoad:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isTagShow:{type:Boolean,default:!0},tagList:{type:Array,default:()=>[]},tagSelectCountMax:{type:Number,validator:a=>a>0&&a<=2,default:2},tagInitValue:{type:String,default:""},tagSort:{type:Array,default:()=>[]},xAxisLen:{type:Number,default:-1},xAxisKey:{type:String,default:"name"},xAxisIsShowOther:{type:Boolean,default:!1},isShowY:{type:Boolean,default:!0},isYMinZero:{type:Boolean,default:!0},ySpace:{type:Number,default:5,validator:a=>a>0},yRatio:{type:Number,default:1.5},isYEqual:{type:Boolean,default:!1},seriesType:{type:String,default:"line",validator:a=>n.isString(a)&&a.split(",").every(l=>l==="line"||l==="bar")},tipFormat:String,seriesFormat:String,isShowLineBg:{type:Boolean,default:!0},isXBoundaryGap:{type:Boolean,default:!0},gridInfo:{type:Object,default:()=>({})}},emits:["onInitFirst","onHideResize","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=k=>{s("onError",k)},u=`echartsLineAxisTag-${n.getRandom(5)}`,c=t.id,r=e.useTemplateRef("refElChart"),d=e.ref(),m=e.ref([]),p=e.computed(()=>n.isArray(t.tagList)?t.tagList.filter(k=>!n.isUndefined(k)&&!n.isUndefined(k.id)):[]),f={tagSort:[],tagJson:{},chartTagJson:{},useSeriesType:["line","bar"],isInited:!1},h=e.computed(()=>{const k=t.seriesType,b=n.isNonEmptyString(k)?k.split(","):[],v=b.length===1?b[0]:"line",_=t.tagSelectCountMax>0?t.tagSelectCountMax:2,y=b.length-1,B=[];for(let A=0;A<_;A++)B.push(A<=y&&f.useSeriesType.indexOf(b[A])>-1?b[A]:v);return B}),g=e.computed(()=>{let k={"panel-echarts-line-axis-tag":!0};return k=n.getJsonMerge(k,ue.getClassNameJson(t.className)),n.getStringByJson(k," ")}),S=()=>{s("onHideResize")},T=()=>{s("onInitFirst")},w=()=>{let k=[];const b={};if((n.isArray(t.tagList)?t.tagList:[]).forEach(_=>{if(n.isUndefined(_)||n.isUndefined(_.id))return;const y=_.id.toString();b[y]=_,k.push(y)}),!n.isEmpty(t.tagSort)){const _=[];t.tagSort.forEach(y=>{n.isExistJsonKey(b,y)&&_.push(y)}),_.length>0&&(k=_)}f.tagSort=k,f.tagJson=b},E=k=>{if(k.length===0)return[];const b=t.tagSelectCountMax;return Array.from(new Set(k)).sort((_,y)=>f.tagSort.indexOf(_)-f.tagSort.indexOf(y)).slice(0,b)},M=k=>{let b=[];n.isNonEmptyString(k)&&(k.split(",").forEach(v=>{n.isExistJsonKey(f.tagJson,v)&&b.push(v)}),b=E(b)),m.value=b},V=k=>{const b={name:[],allName:[]},v={},_=[],y={};f.tagSort.forEach(A=>{const F=n.getJsonClone(f.tagJson[A],!0);F.aliasName=n.isUndefined(F.nameFormat)?F.name:n.convertStringFormat(F.nameFormat,F),F.data=[],F.alldata=[],v[A]=F,y[A]=0});let B=k.length;return t.xAxisLen>0&&(B=B>t.xAxisLen?t.xAxisLen:B),k.forEach((A,F)=>{F<B&&_.push(A);let P=n.isExistJsonKey(A,t.xAxisKey)?A[t.xAxisKey]:"";(n.isUndefined(P)||P===null)&&(P=""),b.allName.push(P),F<B&&(t.type==="day"&&(P=n.getValueByFormat(P,"date",{dateFormat:"MM.DD"})),b.name.push(P)),f.tagSort.forEach(H=>{if(n.isExistJsonKey(A,H)){let $=Number(A[H]);n.isFinite($)||($=0),v[H].alldata.push($),F<B?v[H].data.push($):y[H]+=$}else v[H].alldata.push(0),F<B&&v[H].data.push(0)})}),{x:b,y:v,data:_,other:y,isEmptyData:B===0}},I=()=>{const k=E(m.value),b=h.value,{xAxisLen:v,xAxisIsShowOther:_,ySpace:y,yRatio:B,isYMinZero:A,isYEqual:F}=t;return k.map((P,H)=>{const $=f.tagJson[P];let z=A;return z=n.isBoolean($.isYMinZero)?$.isYMinZero:z,{name:P,color:$.color||null,type:b[H],len:v,isShowOther:_,ySpace:y,yMaxRatio:H===1?F?1:B:1,isYMinZero:z}})},N=(k,b,v,_)=>{if(k.length===0)return{min:0,max:1,interval:1};const y=b>0?b:1,B=k.map(Z=>Z.value);let A=B.reduce((Z,W)=>Math.min(Z,W));A=n.getNumCeil(A,{isEndFive:Number(A)<100});let F=B.reduce((Z,W)=>Math.max(Z,W));F=F*1.02,F=n.getNumCeil(F,{isEndFive:Number(A)<100});const P=_?0:A,H=v>1?v:1;let $=F*H-P;$<=0&&($=1);let z=n.getNumCeil($/y,{isEndFive:Number(A)<100}),oe=Number((y*z).toFixed(2))+P;return P===oe&&oe===0&&(oe=1,z=1/y),{min:P,max:oe,interval:z}},x=(k,b)=>{const v=[],_=[],y=[];let B=[];const A=h.value,F=A.length>0&&A.every(P=>P==="line");if(b.forEach((P,H)=>{const $=k.y[P.name],z=$.name;v.push(z);const oe={};$.valueFormat&&(oe.tipValueFormat=$.valueFormat);let Z=[];k.isEmptyData?Z=[]:(Z=$.data.map((q,J)=>{const U={value:q,extInfo:n.getJsonClone(oe)};return U.extInfo.xValueOriginal=k.x.allName[J],U}),P.isShowOther&&P.len>0&&P.len<$.alldata.length&&Z.push({value:n.getValueByFormat(k.other[P.name],"num"),extInfo:oe}));const W={name:z,type:P.type,yAxisIndex:H,data:Z};n.isEmpty(P.color)||(W.itemStyle={color:P.color}),F&&t.isShowLineBg&&(W.areaStyle={}),_.push(W);const Y=N(Z,P.ySpace,P.yMaxRatio,P.isYMinZero);y.push({type:"value",name:$.aliasName,nameLocation:"end",nameTextStyle:{color:"#aaa"},splitNumber:P.ySpace,min:k.isEmptyData?0:Y.min,max:k.isEmptyData?1:Y.max,interval:k.isEmptyData?1:Y.interval,axisLine:{show:!0}})}),k.isEmptyData||(B=n.getArrClone(k.x.name),b[0].isShowOther&&b[0].len>0&&b[0].len<k.x.allName.length&&B.push(Uh)),y.length===2&&t.isYEqual){const P=[y[0].min,y[1].min],H=[y[0].max,y[1].max],$=Math.min.apply(null,P),z=Math.max.apply(null,H),oe=t.ySpace>0?t.ySpace:1,Z=(z-$)/oe,W=$,Y=n.getNumCeil(Z),q=Number((oe*Y).toFixed(2))+W;y[0].min=y[1].min=W,y[0].max=y[1].max=q,y[0].interval=y[1].interval=Y}return{legendData:v,series:_,yAxis:y,xNames:B,xAxisBoundaryGap:t.isShowLineBg?!F:t.isXBoundaryGap}},L=k=>{const b=I();if(b.length===0){d.value={};return}const v=x(k,b),_={chartType:t.type,dataOriginal:k.data,element:r.value?.getChartElement(),tipTitleFormat:t.tipFormat,seriesNameFormat:t.seriesFormat},y=Rh.getOptionAxis(_);y.legend.show=!1,y.legend.data=v.legendData,y.xAxis.data=v.xNames,y.yAxis=v.yAxis,y.series=v.series,y.xAxis.boundaryGap=v.xAxisBoundaryGap,y.grid.top="40px",y.grid.left=v.yAxis[0].max===0?"20px":"auto",y.grid.right=v.yAxis.length>1&&v.yAxis[1].max===0?"20px":"auto",y.yAxis.length===1&&!v.xAxisBoundaryGap&&(y.grid.right="20px");const{gridInfo:B}=t;n.isEmpty(B)||["top","left","right","bottom"].forEach(A=>{const F=B[A];n.isEmpty(F)||(y.grid[A]=F)}),y.yAxis.forEach(A=>{A.show=t.isShowY}),d.value=y},D=k=>{const b=n.isArray(k)?k:[];if(f.isInited=!0,f.chartTagJson=V(b),b.length===0){d.value={};return}L(f.chartTagJson)},O=()=>{w(),M(t.tagInitValue),D(t.list)};e.onMounted(()=>{e.nextTick(()=>{f.isInited||O()})}),e.watch([()=>t.list,()=>t.tagList,()=>t.tagSort,()=>t.tagInitValue],()=>{w();const k=m.value.some(b=>!f.tagJson[b]);(m.value.length===0||k)&&M(t.tagInitValue),D(t.list)});const X=k=>{if(n.isUndefined(k))return;const b=k.toString();let v=[];switch(t.tagSelectCountMax){case 1:v=[b];break;case 2:{v=n.getArrClone(m.value);const _=v.indexOf(b);_>-1?v.length>1&&v.splice(_,1):(v.push(b),v.length>2&&v.splice(0,1));break}}m.value=v,L(f.chartTagJson)},Q=()=>{T()},R=()=>{S()};return l({resize:()=>{r.value?.resize()}}),(k,b)=>(e.openBlock(),e.createBlock(Ta,{ref_key:"refElChart",ref:r,id:e.unref(c),chartOption:d.value,className:g.value,height:a.height,isRunLoad:a.isRunLoad,onOnInitFirst:Q,onOnHideResize:R,onOnError:i},{chartHead:e.withCtx(()=>[a.isTagShow?(e.openBlock(),e.createElementBlock("div",Hh,[e.createElementVNode("div",null,[e.renderSlot(k.$slots,"title")]),e.createElementVNode("div",zh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(v,_)=>(e.openBlock(),e.createElementBlock("span",{key:`${u}-list-${v.id}-${_}`,class:e.normalizeClass({active:m.value.indexOf(v.id.toString())>-1})},[e.createVNode(Qe,{color:"white",label:v.name,onOnClick:y=>X(v.id)},null,8,["label","onOnClick"])],2))),128))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),nothingData:e.withCtx(()=>[e.renderSlot(k.$slots,"nothingData")]),_:3},8,["id","chartOption","className","height","isRunLoad"]))}}),Jh={class:"framephone-statusbar"},Kh={class:"framephone-statusbar-time"},Wh={class:"framephone-screen-outer"},ti=e.defineComponent({name:"ClFramePhone",__name:"Index",props:{className:String,width:{type:String,default:"430px"},height:{type:String,default:"750px"},statusBarText:{type:String,default:"9:41"}},setup(a){const l=`fh_${n.getRandom(7)}`,o=e.ref(!1);e.onMounted(()=>{o.value=!0});const t=a,s=e.computed(()=>{const u={"cl-framephone":!0};return n.isNonEmptyString(t.className)&&n.split(t.className," ").forEach(c=>{n.isEmpty(c)||(u[c]=!0)}),u}),i=e.computed(()=>{const u={};return n.isNonEmptyString(t.width)&&(u.width=t.width),n.isNonEmptyString(t.height)&&(u.height=t.height),u});return(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),style:e.normalizeStyle(i.value)},[c[1]||(c[1]=e.createElementVNode("div",{class:"framephone-notch"},null,-1)),e.createElementVNode("div",Jh,[e.createElementVNode("span",Kh,e.toDisplayString(a.statusBarText),1),c[0]||(c[0]=e.createElementVNode("span",{class:"framephone-statusbar-signal"},[e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-1"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-2"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-3"})],-1))]),e.createElementVNode("div",Wh,[e.createElementVNode("div",{class:"framephone-screen",id:l},[o.value?e.renderSlot(u.$slots,"default",{key:0,screenId:l}):e.createCommentVNode("",!0)])]),c[2]||(c[2]=e.createElementVNode("div",{class:"framephone-home"},null,-1))],6))}}),jh={key:0},Yh={key:1},qh={class:"inputTag-operate"},Cl=e.defineComponent({name:"ClInputTagInput",__name:"Input",props:{value:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:Boolean,isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:String,joinKey:{type:String,default:","},isDropdownLayer:{type:Boolean,default:!0},textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean},emits:["onInit","onChange","onChangeInput","onFocus"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.inject("$InputTagTop"),u=e.useTemplateRef("refElTag"),c=e.useTemplateRef("refElTextarea"),r=e.useTemplateRef("refElInput"),d=e.reactive({isFocus:!1}),m=e.ref([]),p=e.ref([]),f=e.ref(""),h=e.computed(()=>!n.isEmpty(p.value)||!n.isEmpty(f.value)),g=e.computed(()=>t.isClean&&!t.disabled&&h.value),S=e.computed(()=>({"dropdownLayer-text-container":t.isDropdownLayer,"inputTag-container":!0,"inputTag-multiple":t.multiple,"inputTag-focus":d.isFocus})),T=e.computed(()=>{const z={};return t.multiple&&(t.disabled?z["min-height"]="40px":n.isNonEmptyString(t.minHeight)&&p.value.length>0&&(z["min-height"]=t.minHeight)),z}),w=e.computed(()=>{const z={},{multiple:oe,tagsMaxHeight:Z}=t;return oe&&n.isNonEmptyString(Z)&&(z["max-height"]=Z),z}),E=(z="tag")=>{const oe=x();s("onChange",oe,z)},M=()=>{e.nextTick(()=>{s("onInit")})},V=z=>{s("onChangeInput",z)},I=z=>{s("onFocus",z)},N=()=>{let z="";if(t.multiple){const oe=t.copyJoinKey+(t.isCopyMultipleWrap?`
|
|
9
|
-
`:"");z=p.value.join(oe)}else z=f.value;return z},x=()=>t.multiple?p.value.join(t.joinKey||","):f.value,L=z=>{if(n.isEmpty(z))m.value=[],p.value=[],f.value="";else if(z!==x())if(t.multiple){const oe=[],Z=[];n.split(z,t.joinKey||",").forEach(W=>{const Y=n.trim(W);!n.isEmpty(Y)&&!n.isExistValue(Z,Y)&&(oe.push({id:`inputTag_${n.getRandom(8)}`,name:Y}),Z.push(Y))}),m.value=oe,p.value=Array.from(new Set(Z))}else f.value=z},D=z=>{const oe=n.trim(z);u.value&&u.value.addInfo({id:`inputTag_${n.getRandom(8)}`,name:oe}),c.value&&(c.value.initHeight(),c.value.setValue(""))},O=()=>{t.multiple?c.value&&c.value.focus():r.value&&r.value.focus()},X=(z,oe=!0)=>{if(t.multiple){const Z=e.toRaw(p.value);n.split(z,t.joinKey||",").forEach(W=>{const Y=n.trim(W);if(!n.isEmpty(Y))if(oe)D(Y),n.isExistValue(Z,Y)||Z.push(Y);else{const q=m.value.findIndex(U=>U.name===Y);q>-1&&m.value.splice(q,1);const J=Z.indexOf(Y);J>-1&&Z.splice(J,1)}}),p.value=Array.from(new Set(Z))}else f.value=oe?z:"";t.multiple&&O(),E("drop")},Q=()=>{L(t.value??""),M()};e.onMounted(()=>{e.nextTick(()=>{Q()})}),e.watch(()=>t.value,(z,oe)=>{z!==oe&&z!==x()&&(L(z??""),c.value&&(c.value.setValue(""),c.value.initHeight()))});const R=z=>{if(t.multiple){const oe=c.value?c.value.getParentElement():null;(!oe||!oe.contains(z.target))&&O()}else O()},C=z=>{if(z.isComposing||z.keyCode===229||z.shiftKey)return;const oe=i?i.getListHoverValueKeydown():"";n.isEmpty(oe)&&(z.preventDefault(),z.stopPropagation())},k=z=>{if(z.isComposing||z.keyCode===229||z.shiftKey)return;const oe=z.target.value,Z=i?i.getListHoverValueKeydown():"";if(n.isEmpty(Z)){if(z.preventDefault(),z.stopPropagation(),!n.isEmpty(oe)){const W=e.toRaw(p.value);let Y=[];n.isExistValue(oe,`
|
|
10
|
-
`)?n.split(oe,`
|
|
11
|
-
`).forEach(q=>{n.isEmpty(q)||Y.push(...n.split(q,t.joinKey||","))}):Y=n.split(oe,t.joinKey||","),Y.forEach(q=>{const J=n.trim(q);n.isEmpty(J)||(D(J),n.isExistValue(W,J)||W.push(J))}),p.value=Array.from(new Set(W)),E()}}else c.value&&(c.value.initHeight(),c.value.setValue(""))},b=()=>{d.isFocus=!0,I(x())},v=()=>{d.isFocus=!1},_=()=>{if(!u.value)return;const z=u.value.getData();p.value=z.filter(oe=>n.isNonEmptyString(oe.name)).map(oe=>oe.name),m.value=z,V(""),E()},y=()=>{m.value=[],p.value=[],f.value="",c.value&&(c.value.setValue(""),c.value.initHeight()),E(),O()},B=z=>{V(z)},A=()=>{I(f.value)};return l({getValue:()=>x(),setValue:z=>{L(z),c.value&&(c.value.setValue(""),c.value.initHeight())},focus:()=>{O()},updateValue:(z,oe=!0)=>{X(z,oe)}}),(z,oe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(S.value),style:e.normalizeStyle(T.value),onClick:e.withModifiers(R,["stop"])},[a.multiple?(e.openBlock(),e.createElementBlock("div",jh,[e.createElementVNode("div",{class:"inputTag-tags",style:e.normalizeStyle(w.value)},[e.createVNode(co,{ref_key:"refElTag",ref:u,disabled:a.disabled,list:m.value,onOnRemove:_},null,8,["disabled","list"])],4),e.withDirectives(e.createVNode(ro,{ref_key:"refElTextarea",ref:c,height:"24px",heightMax:a.textMaxHeight,disabled:a.disabled,placeholder:a.disabled?"":a.placeholder,isClean:!1,isAutoHeight:!0,onOnKeydownEnter:C,onOnKeyupEnter:k,onOnFocus:b,onOnBlur:v,onOnChangeDelay:B},null,8,["heightMax","disabled","placeholder"]),[[e.vShow,!a.disabled]])])):(e.openBlock(),e.createElementBlock("div",Yh,[e.createVNode(Re,{ref_key:"refElInput",ref:r,value:f.value,"onUpdate:value":oe[0]||(oe[0]=Z=>f.value=Z),placeholder:a.placeholder,isClean:!1,disabled:a.disabled,onOnFocus:A,onOnChangeDelay:B},null,8,["value","placeholder","disabled"])])),e.createElementVNode("div",qh,[a.isShowNum&&a.multiple&&p.value.length>1?(e.openBlock(),e.createBlock(Pt,{key:0,num:p.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),g.value?(e.openBlock(),e.createBlock(fe,{key:2,name:"close-circle-fill",className:"inputTag-operate-btn","aria-label":"清空",tabindex:"-1",role:"button",onClick:e.withModifiers(y,["stop"]),onKeydown:[e.withKeys(e.withModifiers(y,["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(y,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),a.isCopy&&h.value?(e.openBlock(),e.createBlock(tn,{key:4,className:"inputTag-operate-btn",textLabel:N})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],6))}}),Xh={class:"dropdownLayer-list-container"},Gh={key:0,class:"dropdownLayer-list-search"},Qh={key:2,class:"dropdownLayer-list-checkboxAll"},Zh=["aria-activedescendant"],eg=["id","aria-selected","aria-disabled","onClick","onMouseenter","onMouseleave"],tg={key:0,class:"dropdownLayer-list-checkbox"},ng=["innerHTML"],og={key:1},ag={key:0,class:"dropdownLayer-list-empty"},lg={key:1,class:"inputTag-load"},sg=180,ig=50,rg=100,cg=130,ug=e.defineComponent({name:"ClDropdownlayerSearchList",__name:"Dropdown",props:{isSearch:Boolean,searchValue:String,searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:a=>["||","&&"].indexOf(a)>-1},isMultiple:Boolean,isCheckBoxAll:Boolean,showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,selectId:{type:Array,default:()=>[]},isShowEmptyLabel:{type:Boolean,default:!0},isShowLoading:Boolean,serverCallback:Function},emits:["onChange","onSearchResult","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=e.inject("$InputTagTop"),r=e.useTemplateRef("refElSearch"),d=e.useTemplateRef("refElList"),m=`inputtag-${n.getRandom(5)}`;let p=0,f=0,h=0,g=0,S=!1,T=!1;const w={start:-1,end:-1,limit:50},E=e.reactive({isRunLoading:!1}),M=`dropdownLayer-list-${t.keyIndex||m}`,V=e.ref(""),I=e.ref([]),N=e.ref([]);let x=[],L=[],D=!1;const O={isScrollLoadIng:!1},X=e.computed(()=>{let se=!1;return N.value.length>0&&t.selectId.length>=N.value.length&&(se=n.isContainArr(t.selectId.map(le=>le.toString()),N.value)),se}),Q=e.computed(()=>new Set(t.selectId.map(se=>se.toString()))),R=(se,K)=>{s("onChange",se,K)},C=(se,K)=>{s("onSearchResult",{search:n.isNonEmptyString(se)?se:"",isEmpty:K})},k=se=>{s("onError",se)},b=se=>n.isEmpty(se)?[]:se.filter(K=>K?n.isString(K.id)&&!n.isEmpty(K.id)||n.isNumber(K.id)&&n.isFinite(K.id):!1),v=async se=>{h++;const K=h;let le=[];if(t.serverCallback){t.isShowLoading&&(E.isRunLoading=!0);try{if(le=await t.serverCallback({search:se,offset:0}),K!==h)return;e.nextTick(()=>{K===h&&(E.isRunLoading=!1,c&&c.convertListToJson(le),e.nextTick(()=>{_(se,le)}))})}catch{K===h&&(E.isRunLoading=!1,k("服务端搜索失败,请稍后重试"))}}else if(n.isEmpty(se))le=t.originalData,_(se,le);else if(n.isNonEmptyString(se)){const de=se.toLowerCase(),me=t.searchKey.length,he=t.searchKey;t.originalData.forEach(Ce=>{const be=[];for(let Ee=0;Ee<me;Ee++){const Te=Ce[he[Ee]];n.isNonEmptyString(Te)&&Te.toLowerCase().indexOf(de)>-1&&be.push(!0)}if(be.length>0)switch(t.searchKeyType){case"||":le.push(Ce);break;case"&&":be.length===me&&le.push(Ce);break}}),_(se,le)}},_=(se,K)=>{t.isCascade?(n.isEmpty(se)||(K=A(K,t.originalData)),L=K,K=B(K)):K=b(K),x=K,I.value=F(0,w.limit),d.value&&(d.value.scrollTop=0),H(0,w.limit),y(),V.value="",C(se,K.length===0)},y=()=>{const se=[],K=t.selectId.map(le=>le.toString());x.forEach(le=>{if(n.isEmpty(le.id))return;const de=le.id.toString();le.isDisabled?n.isExistValue(K,de)&&se.push(de):se.push(de)}),N.value=se},B=se=>{const K=t.parentKey||"parentId",le=t.topParentValue||"0",de={};se.forEach(Ee=>{if(n.isEmpty(Ee.id))return;const Te=Ee[K];if(!n.isEmpty(Te)&&Te.toString()!==le){const ze=Te.toString();de[ze]||(de[ze]=[]),de[ze].push(Ee)}});const me=[],he=se.filter(Ee=>{if(n.isEmpty(Ee.id))return!1;const Te=Ee[K];return n.isEmpty(Te)||Te.toString()===le}),Ce=new Set,be=(Ee,Te,ze)=>{Ee.forEach(Pe=>{const St=Pe.id.toString();if(Ce.has(St))return;Ce.add(St);const Ht=de[St]||[];me.push({...Pe,_level:Te,_parentName:ze,_hasChildren:Ht.length>0,isDisabled:Pe.isDisabled||Ht.length>0&&!t.parentSelectable}),Ht.length>0&&be(Ht,Te+1,Pe.name)})};return be(he,0,""),me},A=(se,K)=>{const le=t.parentKey||"parentId",de=t.topParentValue||"0",me={},he={};K.forEach(Te=>{if(n.isEmpty(Te.id))return;const ze=Te.id.toString();me[ze]=Te;const Pe=Te[le];!n.isEmpty(Pe)&&Pe.toString()!==de&&(he[Pe.toString()]||(he[Pe.toString()]=[]),he[Pe.toString()].push(ze))});const Ce=new Set,be=new Set;se.forEach(Te=>{n.isEmpty(Te.id)||be.add(Te.id.toString())});const Ee=Te=>{let ze=me[Te],Pe=0;for(;ze&&Pe<100;){Ce.add(ze.id.toString());const St=ze[le];if(n.isEmpty(St)||St.toString()===de)break;ze=me[St.toString()],Pe++}};return se.forEach(Te=>{if(n.isEmpty(Te.id))return;const ze=Te.id.toString();Ee(ze),he[ze]&&he[ze].forEach(Pe=>{Ce.add(Pe)})}),K.filter(Te=>n.isEmpty(Te.id)?!1:Ce.has(Te.id.toString()))},F=(se,K)=>{const le=[],de=x.length,me=se<0?0:se,he=K<=de?K:de;if(me<he)for(let Ce=me;Ce<he;Ce++)le.push(x[Ce]);return le},P=(se,K)=>{let le=0,de=0;switch(K){case"prev":le=se-w.limit,de=se;break;case"next":le=se,de=le+w.limit;break}return F(le,de)},H=(se,K)=>{let le=w.start;(le===-1||se<le)&&(le=se),le=le<=0?0:le;let de=w.end;K>de&&(de=K),de=K<=x.length?K:x.length,w.start=le,w.end=de},$=()=>{let se=-1,K="";if(!n.isEmpty(t.selectId)){const me=t.selectId.map(he=>he.toString());x.some((he,Ce)=>{if(n.isEmpty(he.id))return!1;const be=he.id.toString(),Ee=n.isExistValue(me,be);return Ee&&(se=Ce,K=be),Ee})}let le=0,de=0;se===-1?(p=0,le=0,de=w.limit):(le=se-w.limit*1,de=se+w.limit*1),I.value=F(le,de),w.start=le<=0?0:le,w.end=de>=x.length?x.length:de,n.isEmpty(K)||I.value.some((me,he)=>{if(n.isEmpty(me.id))return!1;const Ce=me.id.toString()===K;return Ce&&(p=he),Ce})},z=se=>{e.nextTick(()=>{const K=d.value;if(!(!K||!K.children[0]))if(se>0){const le=K.children[0].children[se];K.scrollTop=le&&le.offsetTop>sg?le.offsetTop-ig:0}else K.scrollTop=0})},oe=()=>{t.isCascade?(L=b(t.originalData),x=B(L)):x=b(t.originalData),$(),e.nextTick(()=>{n.isEmpty(t.searchValue)&&(r.value&&r.value.setValue(""),d.value&&z(p))})},Z=async se=>{const K=Date.now(),le=se.target,de=le.scrollTop;if(K-g<150){f=de;return}g=K;const me=le.offsetHeight;if(!le.children[0]){f=de;return}const he=le.children[0].offsetHeight;if(de>f){if(de+me+rg>he&&!O.isScrollLoadIng){if(O.isScrollLoadIng=!0,w.end>=x.length&&t.serverCallback){const Ce=h,be=t.searchValue,Ee={offset:x.length};n.isEmpty(be)||(Ee.search=be);try{const Te=await t.serverCallback(Ee);if(T)return;Ce===h&&t.searchValue===be&&(t.isCascade?(L.push(...b(Te)),x=B(L)):x.push(...b(Te)),y(),c&&c.convertListToJson(x))}catch{Ce===h&&k("服务端加载更多失败,请稍后重试")}}if(w.end<x.length){const Ce=P(w.end,"next");I.value.push(...Ce),H(w.start,w.end+w.limit)}O.isScrollLoadIng=!1}}else if(de<cg&&w.start>0){const Ce=P(w.start,"prev"),be=Ce.length;be>0&&(I.value.unshift(...Ce),H(w.start-w.limit,w.end),e.nextTick(()=>{const Ee=d.value;if(!Ee||!Ee.children[0])return;let Te=0;const ze=Ee.children[0].children;for(let Pe=0;Pe<be&&ze[Pe];Pe++)Te+=ze[Pe].offsetHeight;Ee.scrollTop+=Te}))}f=de},W=()=>{D||e.nextTick(()=>{d.value&&(d.value.addEventListener("scroll",Z),D=!0)})},Y=se=>{let K=t.showDropDownTextFormat;if(se._level>=1&&!n.isEmpty(t.showDropDownTextFormatSub)&&(K=t.showDropDownTextFormatSub),n.isEmpty(K)){if(n.isEmpty(se.name))return"";const le=se.name;return n.isString(le)?n.encodeHTML(le):String(le)}return n.convertStringFormatEncodeHTML(K,se)},q=se=>{const K=[];return t.isMultiple?(t.selectId.forEach(le=>{le.toString()!==se&&K.push(le)}),n.isExistValue(t.selectId.map(le=>le.toString()),se)||K.push(se)):K.push(se),K},J=se=>{const K=I.value;if(K.length===0){V.value="";return}let le=-1;const de=V.value;de.length>0?(K.forEach((me,he)=>{me.id.toString()===de&&(le=he)}),le+=se,le<0?le=0:le>=K.length&&(le=K.length-1)):le=0,V.value=n.isEmpty(K[le].id)?"":K[le].id.toString(),z(le)},U=se=>{if(se.isComposing||se.keyCode===229)return;let K=se.keyCode;if(!n.isUndefined(K))switch(K=K.toString(),K){case"13":if(se.shiftKey)break;se.preventDefault(),se.stopPropagation();break;case"38":se.preventDefault(),se.stopPropagation(),J(-1);break;case"40":se.preventDefault(),se.stopPropagation(),J(1);break}},ae=se=>{if(se.isComposing||se.keyCode===229)return;let K=se.keyCode;if(!n.isUndefined(K))switch(K=K.toString(),K){case"27":c&&c.setDropdownOpen(!1);break;case"13":{if(se.shiftKey)break;const le=V.value;if(!n.isEmpty(le)){const de=I.value.find(me=>me.id.toString()===le);if(de&&!de.isDisabled){const me=q(le);R(me,{id:le,isSelect:t.selectId.map(he=>he.toString()).indexOf(le)===-1})}}break}}},ee=()=>{oe(),y(),W();const{searchValue:se}=t;n.isNonEmptyString(se)&&v(se)};e.onMounted(()=>{ee()}),e.onBeforeUnmount(()=>{T=!0,ue.offListener(window,"keydown",U,!0),ue.offListener(window,"keyup",ae,!0),S=!1,d.value&&d.value.removeEventListener("scroll",Z)}),e.watch(()=>t.originalData,se=>{t.isCascade?(L=b(se),x=B(L)):x=b(se),$(),y(),W()}),e.watch(()=>t.searchValue,se=>{v(se)});const G=se=>{v(se)},ne=se=>{if(!se||!t.isMultiple)return;const K=t.selectId.map(be=>be.toString()),le=new Set;x.forEach(be=>{be.isDisabled&&!n.isEmpty(be.id)&&le.add(be.id.toString())});const de=[],me=[],he=[];N.value.forEach(be=>{se.value?n.isExistValue(K,be)||me.push(be):n.isExistValue(K,be)&&!le.has(be)&&he.push(be),de.push(be)});const Ce=n.getArrClone(t.selectId);he.length>0&&he.forEach(be=>{const Ee=Ce.findIndex(Te=>Te.toString()===be);Ee>-1&&Ce.splice(Ee,1)}),me.length>0&&Ce.push(...me),R(Ce,{id:de,isSelect:se.value})},j=se=>{if(!se.isDisabled&&!n.isEmpty(se.id)){const K=se.id.toString(),le=q(K);R(le,{id:K,isSelect:t.selectId.map(de=>de.toString()).indexOf(K)===-1})}},te=se=>{!se||n.isEmpty(se.id)||(V.value=se.id.toString())},re=se=>{!se||n.isEmpty(se.id)||V.value===se.id.toString()&&(V.value="")};return l({initOpenShow:se=>{se?S||(ue.onListener(window,"keydown",U,!0),ue.onListener(window,"keyup",ae,!0),S=!0):S&&(ue.offListener(window,"keydown",U,!0),ue.offListener(window,"keyup",ae,!0),S=!1)},getHoverKeydown:()=>V.value}),(se,K)=>(e.openBlock(),e.createElementBlock("div",Xh,[E.isRunLoading?(e.openBlock(),e.createElementBlock("div",lg,[e.createVNode(on,{isLoadIng:E.isRunLoading},null,8,["isLoadIng"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.isSearch?(e.openBlock(),e.createElementBlock("div",Gh,[e.createVNode(nn,{ref_key:"refElSearch",ref:r,placeholder:a.searchPlaceholder,onOnChange:G},null,8,["placeholder"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isMultiple&&a.isCheckBoxAll?(e.openBlock(),e.createElementBlock("div",Qh,[e.createVNode(ft,{forId:`${M}-cb-all`,label:e.unref(i).checkboxAll,value:X.value,onOnChange:ne},null,8,["forId","label","value"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-body",ref_key:"refElList",ref:d},[I.value.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,role:"listbox","aria-activedescendant":V.value?`${M}-opt-${V.value}`:void 0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(le,de)=>(e.openBlock(),e.createElementBlock("li",{key:`${m}-${le.id}-${de}`,id:`${M}-opt-${le.id}`,role:"option","aria-selected":Q.value.has(le.id.toString()),"aria-disabled":le.isDisabled,class:e.normalizeClass({"option-selected":Q.value.has(le.id.toString()),"option-disabled":le.isDisabled,"option-hoverKeydown":V.value===le.id.toString(),"inputTag-dropdown-item-child":le._level>=1}),style:e.normalizeStyle({paddingLeft:le._level?le._level*20+"px":void 0}),onClick:me=>j(le),onMouseenter:me=>te(le),onMouseleave:me=>re(le)},[e.createElementVNode("div",null,[a.isMultiple?(e.openBlock(),e.createElementBlock("div",tg,[e.createVNode(ft,{name:`${M}-cb`,forId:`${M}-cb-${le.id}`,value:Q.value.has(le.id.toString()),disabled:le.isDisabled},null,8,["name","forId","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-title",innerHTML:Y(le)},null,8,ng)])],46,eg))),128))],8,Zh)):(e.openBlock(),e.createElementBlock("ul",og,[a.isShowEmptyLabel?(e.openBlock(),e.createElementBlock("li",ag,e.toDisplayString(e.unref(i).noResultsText),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))],512)],64))]))}}),dg=["id"],Da=e.defineComponent({name:"ClInputTag",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:{type:String,default:"70px"},joinKey:{type:String,default:","},isAutofill:Boolean,list:{type:Array,default:()=>[]},searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:a=>["||","&&"].indexOf(a)>-1},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isFocusShowDrop:Boolean,textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean,isShowLoading:Boolean,serverCallback:Function,isPlaintext:{type:Boolean,default:!1},appendContainer:{type:String,default:""}},emits:["onInit","update:value","update:modelValue","onChange","onError"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElDropdownLayer"),c=e.useTemplateRef("refElInput"),r=e.useTemplateRef("refElList"),d=e.reactive({keyIndex:`inputTag-${n.getRandom(8)}`,searchValue:"",dropdownSelectId:[],isUseData:!1}),m={listNameJson:{},listIdJson:{}},p=e.computed(()=>{let k={"panel-input-tag":!0,"inputTag-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext,"cl-plaintext-inputtag":t.isPlaintext};return k=n.getJsonMerge(k,ue.getClassNameJson(t.className)),n.getStringByJson(k," ")}),f=e.computed(()=>{let k="inputTag-dropdown ";return d.isUseData||(k+=" inputTag-dropdown-nodata "),k}),h=(k,b="")=>{s("update:value",k),s("update:modelValue",k),s("onChange",k,b)},g=()=>{e.nextTick(()=>{s("onInit")})},S=k=>{const v=n.isEmpty(k)?[]:k.filter(_=>{if(!_)return!1;const y=n.isString(_.id)&&!n.isEmpty(_.id)||n.isNumber(_.id)&&n.isFinite(_.id),B=n.isNonEmptyString(_.name)||n.isNumber(_.name)&&!n.isEmpty(_.name);return y&&B});m.listNameJson=n.getJsonByList(v,"name"),m.listIdJson=n.getJsonByList(v,"id")},T=k=>{if(u.value){const b=u.value.checkIsShowOpen();if(k){if(!b){const v=[],_=c.value?c.value.getValue():"",y=n.isEmpty(_)?[]:n.split(_,t.joinKey||",");y.length>0&&y.forEach(B=>{if(n.isExistJsonKey(m.listNameJson,B)){const A=m.listNameJson[B];A&&!n.isEmpty(A.id)&&v.push(A.id.toString())}}),d.dropdownSelectId=v,d.isUseData=!n.isEmpty(t.list)||!!t.serverCallback,u.value.setOpen(!0),e.nextTick(()=>{u.value&&u.value.initCompleteOpen()})}}else d.isUseData=!0,b&&u.value.setOpen(!1)}},w=()=>{n.isEmpty(t.list)||S(t.list)};e.onMounted(()=>{e.nextTick(()=>{w()})}),e.watch(()=>t.list,k=>{S(k),d.isUseData=!n.isEmpty(k)||!!t.serverCallback});const E=()=>{g()},M=k=>{k&&t.disabled||e.nextTick(()=>{r.value&&r.value.initOpenShow(k)})},V=k=>{const b=k.toLowerCase(),v=t.searchKey;let _=!1;return t.list.forEach(y=>{if(_)return;let B=0;for(let A=0;A<v.length;A++){const F=y[v[A]];n.isNonEmptyString(F)&&F.toLowerCase().indexOf(b)>-1&&B++}B>0&&(t.searchKeyType==="||"||t.searchKeyType==="&&"&&B===v.length)&&(_=!0)}),_},I=k=>{d.searchValue=k;let b=!0;if(n.isNonEmptyString(k)&&(k.indexOf(`
|
|
12
|
-
`)>-1||!n.isEmpty(t.joinKey)&&k.indexOf(t.joinKey)>-1)&&(b=!1),b){const v=n.isEmpty(k)?!1:t.serverCallback?!0:V(k);T(v)}else T(!1);t.multiple||h(k,"input")},N=k=>{T(!k.isEmpty&&!n.isEmpty(k.search))},x=k=>{s("onError",k)},L=(k,b)=>{if(n.isEmpty(b)||t.disabled)return;const v=[];(n.isArray(b.id)?b.id:[b.id]).forEach(y=>{n.isExistJsonKey(m.listIdJson,y)&&v.push(m.listIdJson[y].name)}),t.multiple||(d.searchValue=""),c.value&&c.value.updateValue(v.join(t.joinKey||","),b.isSelect)},D=(k,b)=>{h(k,b),t.isAutofill&&T(!1)},O=k=>{t.isAutofill&&t.isFocusShowDrop&&(d.searchValue=k,T(!n.isEmpty(k)))};e.provide("$InputTagTop",{getListHoverValueKeydown:()=>{let k="";return r.value&&(k=r.value.getHoverKeydown()),k},convertListToJson:S,setDropdownOpen:T});const X=()=>c.value?c.value.getValue():"";return l({getValue:X,getValueData:()=>{const k=X();return c.value?n.split(k,t.joinKey||",").filter(v=>!n.isEmpty(v)).map(v=>{const _=m.listNameJson[v];return{name:v,id:_&&!n.isEmpty(_.id)?_.id:void 0}}):[]},setValue:k=>{c.value&&c.value.setValue(k)},focus:()=>{c.value&&c.value.focus()}}),(k,b)=>a.isAutofill?(e.openBlock(),e.createBlock(En,{key:0,ref_key:"refElDropdownLayer",ref:u,id:e.unref(i),classParent:p.value,classDropDown:f.value,transitionLeave:"inputTag-dropdown-leave",appendContainer:a.appendContainer,onOnChangeOpen:M},{labelCustom:e.withCtx(()=>[e.createVNode(Cl,{ref_key:"refElInput",ref:c,value:a.value,placeholder:a.placeholder,disabled:a.disabled||a.isPlaintext,isClean:a.isClean,multiple:a.multiple,minHeight:a.minHeight,joinKey:a.joinKey,isCopy:a.isCopy,isCopyMultipleWrap:a.isCopyMultipleWrap,copyJoinKey:a.copyJoinKey,isDropdownLayer:!0,textMaxHeight:a.textMaxHeight,tagsMaxHeight:a.tagsMaxHeight,isShowNum:a.isShowNum,onOnChange:D,onOnChangeInput:I,onOnInit:E,onOnFocus:O},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])]),dropdown:e.withCtx(()=>[e.createVNode(ug,{ref_key:"refElList",ref:r,keyIndex:d.keyIndex,isSearch:!1,searchValue:d.searchValue,searchKey:a.searchKey,searchKeyType:a.searchKeyType,isMultiple:!1,showDropDownTextFormat:a.showDropDownTextFormat,showDropDownTextFormatSub:a.showDropDownTextFormatSub,isCascade:a.isCascade,parentSelectable:a.parentSelectable,parentKey:a.parentKey,topParentValue:a.topParentValue,isShowEmptyLabel:!1,originalData:a.list,selectId:d.dropdownSelectId,serverCallback:a.serverCallback,isShowLoading:a.isShowLoading,onOnSearchResult:N,onOnChange:L,onOnError:x},null,8,["keyIndex","searchValue","searchKey","searchKeyType","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","serverCallback","isShowLoading"])]),_:1},8,["id","classParent","classDropDown","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value),id:e.unref(i)},[e.createVNode(Cl,{ref_key:"refElInput",ref:c,value:a.value,placeholder:a.placeholder,disabled:a.disabled||a.isPlaintext,isClean:a.isClean,multiple:a.multiple,minHeight:a.minHeight,joinKey:a.joinKey,isCopy:a.isCopy,isCopyMultipleWrap:a.isCopyMultipleWrap,copyJoinKey:a.copyJoinKey,isDropdownLayer:!1,textMaxHeight:a.textMaxHeight,tagsMaxHeight:a.tagsMaxHeight,isShowNum:a.isShowNum,onOnChange:D,onOnChangeInput:I,onOnInit:E,onOnFocus:O},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])],10,dg))}}),mg=["id"],pg={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},fg={key:2,class:"select-inDropdown-checkboxAll"},hg=["aria-selected","aria-disabled","onClick"],gg={class:"select-inDropdown-item-inner"},vg={key:0,class:"select-inDropdown-checkbox"},yg=["innerHTML"],kg={key:5,class:"select-inDropdown-body"},Sg={class:"select-inDropdown-empty"},zo=35,bg=210,wg=20,Cg=e.defineComponent({name:"ClSelectInDropdown",__name:"Dropdown",props:{id:String,disabled:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},isMultiple:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,isOpen:{type:Boolean,default:!1},selectId:{type:Array,default:()=>[]},serverCallback:Function},emits:{onChange:a=>!0,onInitComplete:()=>!0,onError:a=>!0},setup(a,{expose:l,emit:o}){const t=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(q=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs")),q.RecycleScroller))),s=a,i=o,{optPageLanguage:u,getPageLanguage:c}=Ae();c("common");const r=e.inject("$SelectTop",{}),d=typeof r.getSelectData=="function",m=e.useTemplateRef("refElSearch"),p=e.useTemplateRef("refElScroller"),f=e.useTemplateRef("refElRoot");let h=!0;const g={isScrollLoading:!1,hasMoreData:!0};let S=[],T=0,w=0;const E=s.id,M=`select-inList-${s.keyIndex||""}`;let V=!1;const I=e.ref(""),N=e.ref([]),x=e.ref([]);let L={};const D=q=>{const J=q.id.toString();if(s.isMultiple&&s.isCascade&&q._hasChildren&&d){const ae=r.getAllChildIds(J).filter(G=>!r.getSelectValueInfo(G)?.isDisabled);if(ae.length===0)return 0;const ee=ae.filter(G=>n.isExistValue(s.selectId,G)).length;return ee===0?0:ee===ae.length?2:1}return n.isExistValue(s.selectId,J)?2:0},O=q=>D(q)===2,X=q=>D(q)===1,Q=e.computed(()=>{let q=!1;return x.value.length>0&&s.selectId.length>=x.value.length&&(q=n.isContainArr(s.selectId,x.value)),q}),R=q=>{if(!q||typeof q!="object")return"";let J=n.isNonEmptyString(s.showDropDownTextFormat)?s.showDropDownTextFormat:"";q._level>=1&&n.isNonEmptyString(s.showDropDownTextFormatSub)&&(J=s.showDropDownTextFormatSub);let U=n.isEmpty(J)?q.name:n.convertStringFormat(J,q);return n.isHtml(U)?n.isEmpty(J)&&n.isHtml(q.name)?U=n.encodeHTML(q.name):U=n.convertStringFormatEncodeHTML(J,q):typeof U=="string"&&U.indexOf("<")>-1&&(U=n.encodeHTML(U)),U},C=q=>{const J=L[q]||{};if(n.isBoolean(J._isTypeRadio))return J._isTypeRadio;if(d){const U=r.getSelectValueInfo(q);if(n.isBoolean(U?._isTypeRadio))return U._isTypeRadio}return!1},k=()=>{const q=[];L=n.getJsonByList(N.value),N.value.forEach(J=>{if(!n.isObject(J))return;const U=typeof J.id;if(J.id==null||U!=="string"&&(U!=="number"||!n.isFinite(J.id)))return;const ae=J.id.toString();if(!(s.isCascade&&J._hasChildren)&&!C(ae)){if(n.isExistValue(q,ae))return;J.isDisabled?n.isExistValue(s.selectId,ae)&&q.push(ae):q.push(ae)}}),x.value=q},b=q=>{const J=s.parentKey,U=s.topParentValue,ae={};q.forEach(j=>{if(!n.isObject(j)||j.id==null||typeof j.id!="string"&&(typeof j.id!="number"||!n.isFinite(j.id)))return;const te=j[J],re=te!=null&&(typeof te=="string"||typeof te=="number")?te.toString():"";re!==""&&re!==String(U)&&(ae[re]||(ae[re]=[]),ae[re].push(j))});const ee=[],G=(j,te,re,pe)=>{j.forEach(ie=>{const se=ie.id.toString();if(pe.has(se))return;pe.add(se);const K=ae[se]||[];ee.push({...ie,_level:te,_parentName:re,_hasChildren:K.length>0}),K.length>0&&G(K,te+1,ie.name,pe)})},ne=q.filter(j=>{if(!n.isObject(j)||j.id==null||typeof j.id!="string"&&(typeof j.id!="number"||!n.isFinite(j.id)))return!1;const te=j[J],re=te!=null&&(typeof te=="string"||typeof te=="number")?te.toString():"";return n.isEmpty(re)||re===String(U)});return G(ne,0,"",new Set),ee},v=(q,J)=>{if(!d)return q;const U=q.filter(pe=>pe!=null&&pe.id!=null&&(typeof pe.id=="string"||typeof pe.id=="number"&&n.isFinite(pe.id))),ae=J.filter(pe=>pe!=null&&pe.id!=null&&(typeof pe.id=="string"||typeof pe.id=="number"&&n.isFinite(pe.id))),ee=s.parentKey,G=s.topParentValue,ne=new Set,j=new Set(U.map(pe=>pe.id.toString()));U.forEach(pe=>{const ie=pe.id.toString();ne.add(ie);const se=new Set;let K=pe[ee];for(;K!=null&&(typeof K=="string"||typeof K=="number")&&K.toString()!==String(G);){const de=K.toString();if(se.has(de))break;se.add(de),j.has(de)||ne.add(de),K=r.getSelectValueInfo(de)?.[ee]}r.getAllChildIds(ie).forEach(de=>{ne.add(de)})});const te=ae.filter(pe=>ne.has(pe.id.toString())),re=new Set(te.map(pe=>pe.id.toString()));return ne.forEach(pe=>{if(!re.has(pe)){const ie=r.getSelectValueInfo(pe);ie&&Object.keys(ie).length>0&&te.push(ie)}}),te},_=()=>{h&&(h=!1,g.hasMoreData=!0,s.isCascade?(S=[...s.originalData||[]],N.value=b(S)):N.value=n.getListClone(s.originalData).filter(q=>q!=null&&q.id!=null&&(typeof q.id=="string"||typeof q.id=="number"&&n.isFinite(q.id))),k(),y(),I.value="",e.nextTick(()=>{m.value&&m.value.setValue("")}))},y=()=>{e.nextTick(()=>{if(p.value&&s.selectId.length>0){const q=N.value.findIndex(J=>J.id!=null&&n.isExistValue(s.selectId,J.id.toString()));q>-1&&p.value.scrollToItem(q)}})},B=q=>{const J=[],U=L[q]||{},ae=s.isCascade&&U._hasChildren;if(s.isMultiple)if(C(q))n.isExistValue(s.selectId,q)?s.selectId.forEach(ee=>{ee!==q&&J.push(ee)}):(s.selectId.forEach(ee=>{C(ee)||J.push(ee)}),J.push(q));else if(ae&&d){const ee=r.getAllChildIds(q),G=ee.filter(j=>!r.getSelectValueInfo(j)?.isDisabled),ne=G.length>0&&G.every(j=>n.isExistValue(s.selectId,j));s.selectId.forEach(j=>{ee.includes(j)?ee.includes(j)&&r.getSelectValueInfo(j)?.isDisabled&&J.push(j):J.push(j)}),ne||G.forEach(j=>{n.isExistValue(J,j)||J.push(j)})}else s.selectId.forEach(ee=>{ee!==q&&J.push(ee)}),n.isExistValue(s.selectId,q)||J.push(q);else{if(ae&&!s.parentSelectable)return[...s.selectId];J.push(q)}return J},A=q=>{const J=N.value;if(J.length===0)return;let U=-1;const ae=I.value;ae.length>0?(J.forEach((ee,G)=>{ee.id.toString()===ae&&(U=G)}),U+=q,U<0?U=0:U>=J.length&&(U=J.length-1)):U=0,I.value=J[U].id.toString(),p.value&&p.value.scrollToItem(U)},F=q=>{let J=q.keyCode;if(!n.isUndefined(J))switch(J=J.toString(),J){case"13":{const U=f.value&&q.target instanceof Node&&f.value.contains(q.target);(q.target===document.body||U)&&(q.preventDefault(),q.stopPropagation());break}case"38":q.preventDefault(),q.stopPropagation(),A(-1);break;case"40":q.preventDefault(),q.stopPropagation(),A(1);break}},P=q=>{let J=q.keyCode;if(!n.isUndefined(J))switch(J=J.toString(),J){case"27":d&&r.closeDropdown?.();break;case"13":{const U=I.value;if(!U||s.disabled||!s.isOpen)break;const ae=f.value&&q.target instanceof Node&&f.value.contains(q.target);if(q.target!==document.body&&!ae||!N.value.some(ne=>ne.id.toString()===U)||L[U]?.isDisabled)break;const G=B(U);i("onChange",G);break}}},H=q=>q.map(J=>{const{_level:U,_parentName:ae,_hasChildren:ee,...G}=J;return G}),$=async()=>{if(s.serverCallback&&!(g.isScrollLoading||!g.hasMoreData)&&(g.isScrollLoading=!0,s.serverCallback)){const q=++w,J=N.value;try{const U={offset:J.length};if(s.isSearch&&m.value){const ne=m.value.getValue();n.isEmpty(ne)||(U.search=ne)}const ae=await s.serverCallback(U);if(q!==w||J!==N.value)return;if(!Array.isArray(ae)){ve.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof ae),i("onError","服务端加载失败:返回数据格式异常");return}if(ae.length===0){g.hasMoreData=!1;return}const ee=new Set(J.map(ne=>ne?.id?.toString()).filter(Boolean)),G=ae.filter(ne=>{if(ne?.id==null)return!1;const j=typeof ne.id;return j!=="string"&&(j!=="number"||!n.isFinite(ne.id))?!1:!ee.has(ne.id.toString())});if(G.length===0){g.hasMoreData=!1;return}s.isCascade?U.search?N.value=b([...N.value,...G]):(S.length===0&&(S=H(N.value)),S.length===0&&(S=[...s.originalData]),S.push(...G),N.value=b(S)):N.value.push(...G),k(),d&&(r.convertListToJson(G),r.refreshDisplayLabels?.())}catch(U){ve.error("ClSelect","_loadMore 服务端加载失败:",U),i("onError","服务端加载失败,请稍后重试")}finally{g.isScrollLoading=!1}}},z=()=>{_(),i("onInitComplete")};e.onMounted(()=>{z()}),e.onBeforeUnmount(()=>{ue.offListener(window,"keydown",F),ue.offListener(window,"keyup",P),V=!1}),e.onDeactivated(()=>{ue.offListener(window,"keydown",F),ue.offListener(window,"keyup",P),V=!1}),e.onActivated(()=>{s.isOpen&&!V&&(ue.onListener(window,"keydown",F),ue.onListener(window,"keyup",P),V=!0)}),e.watch(()=>s.isOpen,q=>{q?(h=!0,_()):g.isScrollLoading=!1}),e.watch(()=>s.originalData,q=>{h=!0,s.isCascade?(S=[...q||[]],N.value=b(S)):N.value=n.getListClone(q).filter(J=>J!=null&&J.id!=null&&(typeof J.id=="string"||typeof J.id=="number"&&n.isFinite(J.id))),k(),g.hasMoreData=!0,I.value="",e.nextTick(()=>{m.value&&m.value.setValue("")})});const oe=async q=>{const J=++T;w=Math.max(w,J+1);let U=[];if(s.isCascade&&(S=[]),g.hasMoreData=!0,s.serverCallback){try{if(U=await s.serverCallback({search:q,offset:0}),Array.isArray(U)||(ve.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof U),i("onError","服务端搜索失败:返回数据格式异常"),U=[]),J!==T)return;d&&r.convertListToJson(U)}catch(ae){ve.error("ClSelect","onSearch 服务端搜索失败:",ae),i("onError","服务端搜索失败,请稍后重试"),U=[]}if(J!==T)return;s.isCascade&&(U=v(U,s.originalData),U=b(U))}else{const ae=s.originalData.filter(ee=>ee!=null&&ee.id!=null&&(typeof ee.id=="string"||typeof ee.id=="number"&&n.isFinite(ee.id)));if(n.isEmpty(q))U=ae;else{s.searchKeyType!=="||"&&s.searchKeyType!=="&&"&&ve.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",s.searchKeyType);const ee=q.toLowerCase(),G=n.isArray(s.searchKey)?s.searchKey:["name"],ne=G.length;ae.forEach(j=>{const te=[];for(let re=0;re<ne;re++){const pe=j[G[re]];if(pe==null)continue;String(pe).toLowerCase().indexOf(ee)>-1&&te.push(!0)}if(te.length>0)switch(s.searchKeyType){case"||":U.push(j);break;case"&&":te.length===ne&&U.push(j);break;default:U.push(j)}})}s.isCascade&&(n.isEmpty(q)||(U=v(U,s.originalData)),U=b(U))}N.value=U.filter(ae=>ae!=null&&ae.id!=null&&(typeof ae.id=="string"||typeof ae.id=="number"&&n.isFinite(ae.id))),k(),I.value="",d&&r.calculationDropdownPosition()},Z=q=>{if(!s.disabled&&s.isMultiple){const J=[],U=[];x.value.forEach(G=>{q.value?n.isExistValue(s.selectId,G)||J.push(G):n.isExistValue(s.selectId,G)&&(L[G]?.isDisabled||U.push(G))});const ae=n.getArrClone(s.selectId);U.length>0&&U.forEach(G=>{const ne=ae.indexOf(G);ne>-1&&ae.splice(ne,1)}),J.length>0&&J.forEach(G=>{n.isExistValue(ae,G)||ae.push(G)});const ee=[];ae.forEach(G=>{(!C(G)||n.isExistValue(s.selectId,G))&&ee.push(G)}),i("onChange",ee)}},W=q=>{if(q.id==null||typeof q.id!="string"&&(typeof q.id!="number"||!n.isFinite(q.id))||q.isDisabled||s.disabled)return;const J=q.id.toString(),U=B(J);i("onChange",U)};return l({initOpenShow:q=>{q?V||(ue.onListener(window,"keydown",F),ue.onListener(window,"keyup",P),V=!0):V&&(ue.offListener(window,"keydown",F),ue.offListener(window,"keyup",P),V=!1)}}),(q,J)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(E),ref_key:"refElRoot",ref:f},[a.isSearch?(e.openBlock(),e.createElementBlock("div",pg,[e.createVNode(nn,{ref_key:"refElSearch",ref:m,placeholder:a.searchPlaceholder,disabled:a.disabled,onOnChange:oe},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isMultiple&&a.isCheckBoxAll&&N.value.length>0?(e.openBlock(),e.createElementBlock("div",fg,[e.createVNode(ft,{forId:`${M}-cb-all`,label:e.unref(u).checkboxAll,value:Q.value,disabled:a.disabled,onOnChange:Z},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),N.value.length>0?(e.openBlock(),e.createBlock(e.unref(t),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(N.value.length*zo,bg)+"px"}),items:N.value,"item-size":zo,"key-field":"id",ref_key:"refElScroller",ref:p,onScrollEnd:$},{default:e.withCtx(({item:U})=>[e.createElementVNode("div",{role:"option","aria-selected":O(U),"aria-disabled":U.isDisabled||!1,class:e.normalizeClass({"option-selected":O(U),"option-disabled":U.isDisabled,"option-hoverKeydown":I.value===U.id.toString(),"select-inDropdown-item-child":U._level>=1}),style:e.normalizeStyle({height:zo+"px",paddingLeft:U._level?U._level*wg+"px":void 0}),onClick:ae=>W(U)},[e.createElementVNode("div",gg,[a.isMultiple?(e.openBlock(),e.createElementBlock("div",vg,[e.createVNode(ft,{name:`${M}-cb`,forId:`${M}-cb-${U.id}`,value:O(U),indeterminate:X(U),disabled:U.isDisabled},null,8,["name","forId","value","indeterminate","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"select-inDropdown-title",innerHTML:R(U)},null,8,yg)])],14,hg)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",kg,[e.createElementVNode("div",Sg,e.toDisplayString(e.unref(u).noResultsText),1)]))],8,mg))}}),Eg=["id"],Bg={class:"select-inTag-title"},xg={class:"select-inTag-operate"},Tg={class:"select-inTag-body"},Dg=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=e.inject("$SelectTop",{}),r=typeof c.getSelectData=="function",d=e.computed(()=>r?n.isArray(o.selectId)?c.getSelectData(o.selectId):[]:[]),m=e.computed(()=>r?d.value.length:0),p=e.computed(()=>n.isArray(d.value)?d.value.some(g=>n.isObject(g)?!(n.isBoolean(g.isDisabled)&&g.isDisabled):!1):!1),f=()=>{const g=d.value;if(!n.isArray(g))return;const S=[];let T=!1;g.forEach(w=>{if(!n.isObject(w))return;(n.isBoolean(w.isDisabled)?!!w.isDisabled:!1)?(typeof w.id=="string"&&!n.isEmpty(w.id)||typeof w.id=="number"&&n.isFinite(w.id))&&S.push(w.id.toString()):T=!0}),T&&t("onRemove",S)},h=g=>{if(!n.isArray(o.selectId)||n.isEmpty(g))return;const S=String(g),T=o.selectId.findIndex(E=>String(E)===S);if(T===-1)return;const w=n.getArrClone(o.selectId);w.splice(T,1),t("onRemove",w)};return(g,S)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(s)},[e.createElementVNode("div",Bg,[e.createElementVNode("span",null,e.toDisplayString(e.unref(i).selected)+" "+e.toDisplayString(m.value)+" "+e.toDisplayString(e.unref(i).count),1),e.createElementVNode("span",xg,[p.value?(e.openBlock(),e.createBlock(fe,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(i).deleteAll,"aria-label":e.unref(i).deleteAll,onClick:f},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Tg,[e.createVNode(co,{showTextFormat:a.showTextFormat,list:d.value,onOnRemove:h},null,8,["showTextFormat","list"])])],8,Eg))}}),Ig=["id"],_g={key:0,class:"select-inText-num"},Bn=e.defineComponent({name:"ClSelect",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,theme:{type:String,default:"default",validator:a=>["default","noBorder"].includes(a)},multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},isCheckBoxAll:{type:Boolean,default:!0},isShowTag:{type:Boolean,default:!0},arrowDirection:{type:String,default:"right",validator:a=>["left","right"].includes(a)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:a=>["||","&&"].includes(a)},showTextFormat:String,showDropDownTextFormat:String,multipleRealTimeChange:{type:Boolean,default:!1},isCascade:{type:Boolean,default:!1},parentSelectable:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},showDropDownTextFormatSub:String,isOutMerge:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},onOpenBefore:Function,serverCallback:Function,appendContainer:{type:String,default:""}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l)=>!0,onInit:()=>!0,onOpen:a=>!0,onError:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElList"),c=e.useTemplateRef("refElTags"),r=`select-${n.getRandom(8)}`,d=t.id,m=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let p=[],f={};const h={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},g=e.ref(!1),S=e.ref([]),T=e.ref([]),w=e.ref([]);let E=!1;const M=e.computed(()=>n.isNonEmptyString(t.showTextFormat)?t.showTextFormat:t.isCascade?"${name}(${parentName})":""),V=e.computed(()=>{let K={"panel-select":!0};return t.theme==="noBorder"&&(K["select-theme-noBorder"]=!0),K=n.getJsonMerge(K,ue.getClassNameJson(t.className)),n.getStringByJson(K," ")}),I=e.computed(()=>`${V.value} cl-plaintext-value`),N=e.computed(()=>{const K=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return w.value.join(K)}),x=e.computed(()=>{let K={"select-inDropdown":!0};return t.theme==="noBorder"&&(K["select-inDropdown-noBorder"]=!0),m.isOpen&&t.multiple&&t.isShowTag&&(K["select-inTag-ext"]=!0,K[`select-inTag-${m.tagDirection}`]=!0),K=n.getJsonMerge(K,ue.getClassNameJson(t.classDropDown)),n.getStringByJson(K," ")}),L=e.computed(()=>{const K={"select-inTag":!0,"select-inTag-open":m.isOpen};return K[`select-inTag-${m.dropDownPos}`]=!0,K[`select-inTag-${m.tagDirection}`]=!0,K}),D=K=>{s("update:value",K),s("update:modelValue",K)},O=(K,le)=>{D(K),s("onChange",K,le)},X=()=>{E||(E=!0,e.nextTick(()=>{s("onInit")}))},Q=K=>{e.nextTick(()=>{s("onOpen",K)})},R=()=>{const K=[];return S.value.forEach(le=>{n.isExistJsonKey(f,le)&&K.push(le)}),K},C=K=>{if(n.isEmpty(K)||!n.isArray(K))return;const le={},de=t.parentKey,me=t.topParentValue;if(K.forEach(he=>{if(!n.isObject(he)){ve.warn("ClSelect","_convertListToJson 跳过非对象数据项:",he);return}if(!(typeof he.id=="string"||typeof he.id=="number"&&n.isFinite(he.id))){ve.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",he);return}const be=he.id.toString();le[be]=n.getJsonClone(he)}),f=n.getJsonMerge(f,le),t.serverCallback&&!g.value&&!n.isEmpty(le)&&(g.value=!0,t.value!=null&&t.value!==""&&(F(t.value),A())),t.isCascade&&Object.keys(f).forEach(he=>{const Ce=f[he][de],be=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";if(be!==""&&be!==String(me)){const Ee=f[be];Ee?.name&&(f[he].parentName=Ee.name)}}),t.isCascade&&(k(),t.isOutMerge&&t.multiple&&S.value.length>0)){const he=y(S.value);n.isEqualArr(S.value,he)||(S.value=he,p=he)}if(t.multiple&&S.value.length>1){const he=S.value.filter(Ce=>{const be=f[Ce];return n.isBoolean(be?._isTypeRadio)&&be._isTypeRadio});if(he.length>1){const Ce=he[he.length-1],be=S.value.filter(Ee=>Ee===Ce||!he.includes(Ee));n.isEqualArr(S.value,be)||(S.value=be,Z())}}S.value.length>0&&(S.value=[...S.value])},k=()=>{const K=t.parentKey,le=t.topParentValue;h.childrenMap={},h.parentMap={},h.lastChildMap={},h.allChildMap={},Object.keys(f).forEach(me=>{const Ce=f[me][K],be=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";be!==""&&be!==String(le)&&(h.parentMap[me]=be,h.childrenMap[be]||(h.childrenMap[be]=[]),h.childrenMap[be].push(me))})},b=K=>{const le=(de,me)=>{if(h.lastChildMap[de])return h.lastChildMap[de];if(me.has(de))return[];me.add(de);const he=h.childrenMap[de];if(!he||he.length===0)return h.lastChildMap[de]=[de],[de];const Ce=[];return he.forEach(be=>{Ce.push(...le(be,new Set(me)))}),h.lastChildMap[de]=Ce,Ce};return le(K,new Set)},v=K=>{const le=(de,me)=>{if(h.allChildMap[de])return h.allChildMap[de];if(me.has(de))return[];me.add(de);const he=h.childrenMap[de];if(!he||he.length===0)return h.allChildMap[de]=[],[];const Ce=[];he.forEach(Ee=>{Ce.push(Ee),Ce.push(...le(Ee,new Set(me)))});const be=Array.from(new Set(Ce));return h.allChildMap[de]=be,be};return le(K,new Set)},_=K=>{if(K.length===0)return[];const le=new Set(K),de=new Set,me=new Set;for(const he of le){const Ce=h.parentMap[he];Ce&&!me.has(Ce)&&de.add(Ce)}for(;de.size>0;){const he=de.values().next().value;if(de.delete(he),me.has(he))continue;me.add(he);const Ce=h.childrenMap[he];if(!Ce||Ce.length===0)continue;let be=!0;for(const Ee of Ce)if(!le.has(Ee)){be=!1;break}if(be){for(const Te of Ce)le.delete(Te);le.add(he);const Ee=h.parentMap[he];Ee&&!me.has(Ee)&&de.add(Ee)}}return[...le]},y=K=>{if(K.length===0)return[];const le=[];return K.forEach(de=>{le.push(...b(de))}),n.getArrUnique(le)},B=K=>!t.isCascade||!t.multiple?K:t.isOutMerge?_(K):y(K),A=()=>{if(g.value&&!n.isEmpty(S.value)){if(n.isEmpty(f)||t.serverCallback)return;const K=R();if(!n.isEqualArr(S.value,K)){const le=S.value.filter(me=>!K.includes(me));le.length>0&&ve.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",le),S.value=K,p=K;const de=B(K);D(de.join(","))}}},F=K=>{if(K!=null&&typeof K!="string"&&(typeof K!="number"||!n.isFinite(K))){ve.warn("ClSelect","setValue 收到非预期类型值:",typeof K,K);return}let le=K==null||K===""?[]:K.toString().split(",").filter(me=>me!=="");le=n.getArrUnique(le),t.isCascade&&t.isOutMerge&&le.length>0&&t.multiple&&(le=y(le));let de=n.isEqualArr(S.value,le);de&&(de=le.join(",")===S.value.join(",")),de||(p=le,S.value=le)},P=K=>n.isExistJsonKey(f,K)?n.getJsonClone(f[K]):{},H=K=>{const le=n.isArray(K)?K:S.value,de=[];return le.forEach(me=>{const he=P(me);n.isEmpty(he)||de.push(he)}),de},$=K=>{const de=t.isCascade&&!t.multiple&&(h.childrenMap[K.id?.toString()]?.length>0||!h.parentMap[K.id?.toString()])&&n.isEmpty(t.showTextFormat)?"":M.value;let me=n.isEmpty(de)?K.name??"":n.convertStringFormat(de,K);return n.isHtml(me)?me=n.isEmpty(de)?n.encodeHTML(K.name):n.convertStringFormatEncodeHTML(de,K):typeof me=="string"&&me.indexOf("<")>-1&&(me=n.encodeHTML(me)),me},z=K=>{if(n.isNonEmptyString(t.showTextFormat))return n.removeHTMLTags($(K));const le=n.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",de=n.isString(K?.name)?K.name:"",me=n.isString(K?.parentName)?K.parentName:"",he=t.isCascade&&n.isNonEmptyString(me)?`${me}${le}${de}`:de;return n.removeHTMLTags(he)},oe=()=>{const K=H();T.value=K.map(le=>$(le)),w.value=K.map(le=>z(le))},Z=()=>{const K=R();p=K,S.value=K;const le=B(K),de=le.join(",");let me;if(t.multiple){const he=[];le.forEach(Ce=>{const be=P(Ce);n.isEmpty(be)||he.push(be)}),me=he}else me=P(de),n.isEmpty(me)&&(me=null);O(de,me)},W=()=>{m.isOpen||!n.isEqualArr(S.value,p)&&Z()},Y=()=>{g.value||(g.value=!0,C(t.list),F(t.value),A())},q=()=>{!g.value&&t.list&&t.list.length>0&&Y()},J=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs"))})};e.onMounted(()=>{t.isPlaintext||J(),e.nextTick(()=>{q()})}),e.watch(g,K=>{K&&X()}),e.watch(()=>t.list,(K,le)=>{g.value||(K&&K.length>0||le===void 0)&&(g.value=!0)}),e.watch([()=>t.value,()=>t.list],([K,le],[de,me])=>{const he=le||[];!g.value&&he.length>0&&(g.value=!0),le!==me&&(f={},h.childrenMap={},h.parentMap={},h.lastChildMap={},h.allChildMap={}),C(he),K!==void 0&&F(K),A()}),e.watch([S,()=>t.list],([K,le])=>{le&&le.length>0&&n.isEmpty(f)&&C(le),oe()}),e.watch(()=>t.isOutMerge,()=>{t.isCascade&&t.multiple&&S.value.length>0&&B(R()).join(",")!==String(t.value??"")&&Z()}),e.watch([()=>t.parentKey,()=>t.topParentValue],()=>{t.isCascade&&!n.isEmpty(f)&&k()});const U=K=>{K&&t.disabled||(m.isOpen=K,K?p=S.value:W(),e.nextTick(()=>{u.value&&u.value.initOpenShow(K)}),Q(K))},ae=()=>{t.disabled||(S.value=[],t.multiple&&t.multipleRealTimeChange?Z():W())},ee=K=>{if(m.dropDownPos=K.use.dropDownPos,t.multiple&&t.isShowTag){const le=c.value?.$el?.offsetWidth||0;m.tagHeight=t.theme==="default"?`${K.original.dropDownHeight+1}px`:`${K.original.dropDownHeight}px`;const de=K.original.winWidth-(K.original.controlOffset.left+K.original.dropDownWidth)>=le?"right":"left";m.tagDirection=de,de==="right"?m.tagLeft=`${K.original.dropDownWidth-1}px`:m.tagLeft=`${(K.original.dropDownWidth-K.original.textWidth+le+1)*-1}px`}},G=K=>{S.value=K,t.multiple?t.multipleRealTimeChange&&Z():i.value?.setOpen(!1)},ne=K=>{t.disabled||(S.value=K,Z())},j=K=>{s("onError",K)},te=()=>{i.value&&(i.value.checkIsShowOpen()||i.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:H,getSelectValueInfo:P,getAllChildIds:v,calculationDropdownPosition:()=>{i.value?.calculationPosition()},convertListToJson:C,closeDropdown:()=>{i.value?.setOpen(!1)},refreshDisplayLabels:()=>{oe()}});const re=()=>{const K=R();return B(K).join(",")};return l({getValue:re,getValueData:()=>{const K=re();if(t.multiple){const de=K?K.split(","):[],me=[];return de.forEach(he=>{const Ce=P(he);n.isEmpty(Ce)||me.push(Ce)}),me}if(!K)return null;const le=P(K);return n.isEmpty(le)?null:le},setValue:K=>{F(K),A()},runInitComplete:()=>{Y()}}),(K,le)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:e.normalizeClass(I.value)},e.toDisplayString(N.value),11,Ig)):(e.openBlock(),e.createBlock(En,{key:1,id:e.unref(d),ref_key:"refElDropdownLayer",ref:i,classParent:V.value,classText:"select-inText",classDropDown:x.value,placeholder:a.placeholder,isDisabled:a.disabled,isClear:a.isClear,textLabel:T.value.join(","),textArrowDirection:a.arrowDirection,transitionLeave:a.transitionLeave,appendContainer:a.appendContainer,appendFollowWidth:a.theme!=="noBorder",onOpenBeforeCallback:a.onOpenBefore,onOnChangeOpen:U,onOnClear:ae,onOnChangePosition:ee},{textExtend:e.withCtx(()=>[a.multiple?(e.openBlock(),e.createElementBlock("span",_g,[T.value.length>1?(e.openBlock(),e.createBlock(Pt,{key:0,num:T.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),dropdown:e.withCtx(()=>[e.createVNode(Cg,{ref_key:"refElList",ref:u,isSearch:a.isSearch,searchPlaceholder:a.searchPlaceholder,searchKey:a.searchKey,searchKeyType:a.searchKeyType,isMultiple:a.multiple,isCheckBoxAll:a.isCheckBoxAll,showDropDownTextFormat:a.showDropDownTextFormat,showDropDownTextFormatSub:a.showDropDownTextFormatSub,isCascade:a.isCascade,parentSelectable:a.parentSelectable,parentKey:a.parentKey,topParentValue:a.topParentValue,originalData:a.list,keyIndex:r,selectId:S.value,disabled:a.disabled,isOpen:m.isOpen,serverCallback:a.serverCallback,onOnChange:G,onOnInitComplete:te,onOnError:j},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[a.multiple&&a.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(L.value),style:e.normalizeStyle({height:m.tagHeight,left:m.tagLeft}),ref_key:"refElTags",ref:c},[e.createVNode(Dg,{showTextFormat:M.value,selectId:S.value,onOnRemove:ne},null,8,["showTextFormat","selectId"])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","transitionLeave","appendContainer","appendFollowWidth","onOpenBeforeCallback"]))}}),Ng=["id"],Vg={class:"paginate-statistic"},Mg={class:"paginate-list"},Og={class:"pagination",role:"navigation","aria-label":"pagination"},Lg=["tabindex","aria-label","onClick","onKeydown"],$g={key:0},Ag={key:1},Fg={key:0,class:"paginate-limit"},Pg={key:2,class:"paginate-jump"},Uo=10,Ia=e.defineComponent({name:"ClPaginate",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},isShowLimit:{type:Boolean,default:!0},limitValue:{type:Number,default:10},limitData:Array,isShowJump:{type:Boolean,default:!0},totalCount:{type:Number,default:0},currentPage:{type:Number,default:1}},emits:["onChange"],setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("paginate");const u=`paginate-${n.getRandom(5)}`,c=o.id,r=e.ref(""),d=e.ref(""),m=e.ref(-1),p=e.ref(-1),f=e.computed(()=>{let x={"panel-paginate":!0,"paginate-disabled":o.disabled};return x=n.getJsonMerge(x,ue.getClassNameJson(o.className)),x}),h=e.computed(()=>Math.max(1,parseInt(r.value)||Uo)),g=e.computed(()=>{const x=n.isFinite(o.currentPage)?o.currentPage:1,L=o.totalCount>0?Math.ceil(o.totalCount/h.value):0;return L>0?Math.min(Math.max(1,x),L):x}),S=e.computed(()=>{const x=o.limitData;if(n.isArray(x)&&!n.isEmpty(x)){const O=n.getListClone(x).filter(X=>!n.isEmpty(X)&&!n.isEmpty(X.id));if(O.length>0)return O}const L=s.value.pageStrip,D=n.isNonEmptyString(L)?L:"";return[{id:10,name:`10${D}`},{id:20,name:`20${D}`},{id:30,name:`30${D}`},{id:50,name:`50${D}`},{id:100,name:`100${D}`}]}),T=e.computed(()=>{const x=h.value,L=g.value,D=o.totalCount;let O=(L-1)*x,X=L*x;D>0?(O=O+1,X=X>D?D:X,O>X&&(O=X)):(O=0,X=0);const Q=s.value.statistic;return n.isNonEmptyString(Q)?n.convertStringFormat(Q,{s:O,e:X,_total:D}):""}),w=e.computed(()=>{let x=!1,L=!1,D=!1,O=!1,X=0;const Q=h.value,R=o.totalCount;R>0&&(X=Math.ceil(R/Q));const C=g.value;x=X>0?C===1:!0,L=x,D=X>0?C===X:!0,O=D;const k=[];if(k.push({icon:"angle-double-left",ariaLabel:"first page",active:!1,disabled:x,page:1}),k.push({icon:"angle-left",ariaLabel:"previous page",active:!1,disabled:L,page:x?1:C-1}),X>0){let _=[];if(X>7){const F=X-5+1+1;C<=4?(_=n.getArrByMinMax(1,5),_.push("…"),_.push(X)):C>=F?(_=n.getArrByMinMax(F-1,X),_.unshift("…"),_.unshift(1)):(_=n.getArrByMinMax(C-1,C+1),_.unshift("…"),_.unshift(1),_.push("…"),_.push(X))}else _=n.getArrByMinMax(1,X);_.forEach(B=>{k.push({title:B,active:B===C,isOmit:B==="…",page:B})})}return k.push({icon:"angle-right",ariaLabel:"next page",active:!1,disabled:O,page:D?X:C+1}),k.push({icon:"angle-double-right",ariaLabel:"last page",active:!1,disabled:D,page:X}),k}),E=(x,L)=>{const D=parseInt(String(x)),O=parseInt(String(L));n.isFinite(D)&&n.isFinite(O)&&(D!==m.value||O!==p.value)&&(m.value=D,p.value=O,t("onChange",D,O))},M=()=>{const x=!n.isEmpty(o.limitValue)&&n.isFinite(o.limitValue)?o.limitValue:Uo;let D=(x>0?x:Uo).toString();if(o.isShowLimit){const O=S.value.map(X=>X.id.toString());O.includes(D)||(D=O[0])}return D};r.value=M(),e.watch(()=>o.limitValue,()=>{const x=M();if(x!==r.value){r.value=x;const L=g.value;L!==o.currentPage&&E(L,x)}}),e.watch(()=>o.limitData,()=>{const x=M();x!==r.value&&(r.value=x,E(g.value,x))}),e.watch(()=>o.currentPage,()=>{m.value=-1,p.value=-1}),e.watch(()=>o.totalCount,()=>{const x=g.value;x!==o.currentPage&&E(x,r.value)});const V=x=>{!o.disabled&&!x.active&&!x.disabled&&!x.isOmit&&(d.value="",E(x.page,r.value))},I=x=>{if(o.disabled)return;S.value.some(D=>D.id.toString()===x)&&(d.value="",r.value=x,E(1,x))},N=x=>{if(o.disabled||!n.isNonEmptyString(x))return;const L=parseInt(x);if(n.isFinite(L)){const D=o.totalCount>0?Math.ceil(o.totalCount/h.value):0;if(L>=1&&(D===0||L<=D)){d.value="",E(L,r.value);return}}d.value=""};return(x,L)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(c),class:e.normalizeClass(f.value)},[e.createElementVNode("div",Vg,e.toDisplayString(T.value),1),e.createElementVNode("div",Mg,[e.createElementVNode("ul",Og,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(D,O)=>(e.openBlock(),e.createElementBlock("li",{key:`${u}-${O}`,class:e.normalizeClass({"paginate-disabled":D.disabled||a.disabled,"paginate-active":D.active,"paginate-omit":D.isOmit}),tabindex:D.disabled||a.disabled?-1:0,role:"button","aria-label":D.ariaLabel||String(D.page),onClick:X=>V(D),onKeydown:[e.withKeys(X=>V(D),["enter"]),e.withKeys(e.withModifiers(X=>V(D),["prevent"]),["space"])]},[D.icon?(e.openBlock(),e.createElementBlock("span",$g,[e.createVNode(fe,{name:D.icon},null,8,["name"])])):(e.openBlock(),e.createElementBlock("span",Ag,e.toDisplayString(D.title),1))],42,Lg))),128))])]),a.isShowLimit?(e.openBlock(),e.createElementBlock("div",Fg,[e.createVNode(Bn,{list:S.value,value:r.value,disabled:a.disabled,transitionLeave:"dropdownLayer-close-no-anim",onOnChange:I},null,8,["list","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isShowJump?(e.openBlock(),e.createElementBlock("div",Pg,[e.createElementVNode("span",null,e.toDisplayString(e.unref(s).jumpTo),1),e.createVNode(Re,{value:d.value,"onUpdate:value":L[0]||(L[0]=D=>d.value=D),disabled:a.disabled,onOnKeyupEnter:N,onOnChangeBlur:N,onOnClear:N},null,8,["value","disabled"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(s).page),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Ng))}}),Rg=["id"],Hg={key:0,class:"portlet-head"},zg={class:"portlet-title"},Ug={class:"portlet-body"},ni=e.defineComponent({name:"ClPortlet",__name:"Index",props:{id:String,className:{type:String,default:""},titleName:String,isShowHead:{type:Boolean,default:!0}},setup(a){const l=a,o=l.id,t=e.computed(()=>{const s={"panel-portlet":!0};return n.getJsonMerge(s,ue.getClassNameJson(l.className))});return(s,i)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(t.value)},[a.isShowHead?(e.openBlock(),e.createElementBlock("div",Hg,[e.createElementVNode("h3",zg,[e.createTextVNode(e.toDisplayString(a.titleName),1),e.renderSlot(s.$slots,"titleExtend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Ug,[e.renderSlot(s.$slots,"default")])],10,Rg))}}),Jg=["id"],Kg={key:6,class:"fenceScrollX-cover"},Sn=e.defineComponent({name:"ClScrollXFence",__name:"Index",props:{id:String,className:String,isShowLeft:{type:Boolean,default:!0},isShowRight:{type:Boolean,default:!0},isShowCorner:{type:Boolean,default:!1},isShowCover:{type:Boolean,default:!1},cornerType:{type:String,default:""},leftWidth:{type:String,default:"0"},centerWidth:{type:String,default:"0"},rightWidth:{type:String,default:"0"},initLeft:String},emits:["onScrollX"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElScrollX"),c=e.computed(()=>{let p={"panel-scroll-x-fence":!0};return t.isShowCorner&&n.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-showCorner-${t.cornerType}`]=!0),n.osType().isMobile&&(p["fenceScrollX-mob"]=!0),p=n.getJsonMerge(p,ue.getClassNameJson(t.className)),p}),r=e.computed(()=>{const p={"fenceScrollX-corner":!0};return n.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-corner-${t.cornerType}`]=!0),p}),d=p=>{s("onScrollX",p)};return e.onMounted(()=>{e.nextTick(()=>{if(u.value){if(n.isNonEmptyString(t.initLeft)){const p=parseInt(t.initLeft,10);n.isFinite(p)&&(u.value.scrollLeft=p)}u.value.addEventListener("scroll",d)}})}),e.onBeforeUnmount(()=>{u.value&&u.value.removeEventListener("scroll",d)}),e.onActivated(()=>{u.value&&u.value.addEventListener("scroll",d)}),e.onDeactivated(()=>{u.value&&u.value.removeEventListener("scroll",d)}),l({setScrollLeft:p=>{u.value&&n.isFinite(p)&&(u.value.scrollLeft=p)}}),(p,f)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(c.value)},[a.isShowLeft?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fenceScrollX-left",style:e.normalizeStyle({width:a.leftWidth})},[...f[0]||(f[0]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"fenceScrollX-center",ref_key:"refElScrollX",ref:u},[e.createElementVNode("div",{style:e.normalizeStyle({width:a.centerWidth})},null,4)],512),a.isShowRight?(e.openBlock(),e.createElementBlock("div",{key:2,class:"fenceScrollX-right",style:e.normalizeStyle({width:a.rightWidth})},[...f[1]||(f[1]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),a.isShowCorner?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(r.value)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),a.isShowCover?(e.openBlock(),e.createElementBlock("div",Kg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))],10,Jg))}}),Wg=["id"],jg=["id"],_a=e.defineComponent({name:"ClSelectCascade",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},width:String,isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isShowInMsg:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextLevelSeparator:{type:String,default:" > "}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=`selectCascade-${n.getRandom(5)}`,r=t.id,d=e.reactive({lastValue:t.value,isFirstDataFinish:!1}),m=e.ref([]),p={dataJson:{},dataGroup:{},parentIdsJson:{}},f=e.ref(0),h=e.computed(()=>i.value.pleaseSelect),g=e.computed(()=>{const{placeholder:y}=t;return n.isNonEmptyString(y)?y.split("|"):[]}),S=e.computed(()=>{const{width:y}=t;return n.isNonEmptyString(y)?y.split("|"):[]}),T=e.computed(()=>{let y={"panel-select-cascade":!0};return y=n.getJsonMerge(y,ue.getClassNameJson(t.className)),y}),w=y=>{y!==d.lastValue&&(d.lastValue=y,s("update:value",y),s("update:modelValue",y),s("onChange",y))},E=y=>n.isExistJsonKey(p.dataGroup,y),M=y=>E(y)?p.dataGroup[y]:[],V=y=>n.isExistJsonKey(p.dataJson,y)?p.dataJson[y]:null,I=()=>`top_${t.topParentValue}`,N=y=>{const{parentKey:B,topParentValue:A}=t,F={},P={};n.isEmpty(y)||y.forEach(H=>{const $=n.getJsonClone(H);if(!n.isExistJsonKey($,"id")||!n.isExistJsonKey($,B))return;const z=$.id.toString(),oe=$[B].toString();F[z]=$;const Z=oe===A.toString()?I():oe;n.isExistJsonKey(P,Z)||(P[Z]=[]),P[Z].push($)}),p.dataJson=F,p.dataGroup=P,f.value+=1},x=(y,B)=>{const A={idx:y,pId:B,placeholder:h.value,list:[],sty:{},selected:""};if(!n.isEmpty(B)){const $=M(B);A.list=n.getListClone($)}const F=g.value,P=F.length;P>0&&(P>y?A.placeholder=n.isEmpty(F[y])?h.value:F[y]:P===1&&(A.placeholder=F[0]));const H=S.value;return H.length>y&&(n.isEmpty(H[y])||(A.sty.width=H[y],A.sty.flex="none")),A},L=(y,B)=>{const{parentKey:A,topParentValue:F}=t;let P=[];if(B&&B.indexOf(y)>-1)return[];const H=B?B.concat([y]):[y];if(n.isExistJsonKey(p.parentIdsJson,y))P=p.parentIdsJson[y];else{const $=V(y);if($!=null){const z=$[A].toString();if(z!==F.toString()){const oe=V(z);if(oe!=null){P.push(z);const Z=L(z,H);Z.length>0&&(P=P.concat(Z))}}}p.parentIdsJson[y]=P}return P},D=y=>{let B=n.isUndefined(y)?t.value:y;B!=null&&!n.isEmpty(B)&&!n.isExistJsonKey(p.dataJson,B.toString())&&(B="");const A=[];if(B==null||n.isEmpty(B))A.push(x(0,I())),A.push(x(1,""));else{const F=B.toString(),P=[...L(F)].reverse(),H=P.length;if(H>0){P.forEach((z,oe)=>{const Z=oe===0?I():P[oe-1],W=x(oe,Z);W.selected=z,A.push(W)});const $=x(H,P[H-1]);$.selected=F,A.push($)}else{const $=x(0,I());$.selected=F,A.push($)}}m.value=A},O=()=>{N(t.list),D(),d.isFirstDataFinish=!0,d.lastValue=t.value};e.onMounted(()=>{e.nextTick(()=>{O()})}),e.watch(()=>t.value,y=>{y!==d.lastValue&&d.isFirstDataFinish&&(D(),d.lastValue=y)}),e.watch(()=>t.list,y=>{if(!d.isFirstDataFinish){d.isFirstDataFinish=!0;return}p.parentIdsJson={},N(y);const{value:B}=t,A=B!=null&&!n.isEmpty(B)&&n.isExistJsonKey(p.dataJson,B.toString())?B:"";D(A),d.lastValue=A});const X=()=>!0,Q=(y,B)=>{let A="";if(n.isEmpty(y)&&B===0)D("");else if(n.isEmpty(y)){if(m.value.splice(B+1),B>0){const F=m.value[B-1];F&&(A=F.selected)}}else{const F=y.toString();E(F)?(m.value.splice(B+1),m.value.push(x(B+1,F))):(A=y,m.value.splice(B+1))}w(A)},R=()=>d.lastValue,C=y=>{const B=L(y),A=B.length>0?B.slice().reverse().concat([y]):[y],F=[];return A.forEach(P=>{const H=p.dataJson[P];H!=null&&!n.isEmpty(H.name)&&F.push(H.name)}),F},k=()=>{const y=d.lastValue;let B="";return y!=null&&!n.isEmpty(y)&&(B=C(y.toString()).join(" → ")),{value:y,show:B||(y!=null?y.toString():"")}},b=y=>{const B=[],A=new Set;let F=y;for(;n.isNonEmptyString(F)&&!A.has(F);){A.add(F);const P=V(F);if(P==null)break;n.isNonEmptyString(P.name)&&B.unshift(P.name);const H=P[t.parentKey],$=H!=null?String(H):"";if($===""||$===String(t.topParentValue))break;F=$}return B},v=e.computed(()=>{t.list,f.value;const y=d.lastValue;if(y==null||n.isEmpty(y))return"";const B=n.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",A=b(y.toString());return A.length>0?A.join(B):y.toString()});return l({getValue:R,getValueData:k,setValue:y=>{D(y),d.lastValue=y}}),(y,B)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"cl-plaintext-value"},e.toDisplayString(v.value),9,Wg)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(r),class:e.normalizeClass(T.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(A,F)=>(e.openBlock(),e.createElementBlock("div",{key:`${c}-${F}`,class:"selectCascade-item",style:e.normalizeStyle(A.sty)},[e.createVNode(io,{isShowMsg:a.isShowInMsg,isCheck:a.isCheckValidate,checkValue:A.selected,rules:a.validateRules},{default:e.withCtx(()=>[e.createVNode(Bn,{isClear:a.isClear,isSearch:a.isSearch,placeholder:A.placeholder,list:A.list,disabled:a.disabled,value:A.selected,"onUpdate:value":P=>A.selected=P,onOpenBefore:X,onOnChange:P=>Q(P,F)},null,8,["isClear","isSearch","placeholder","list","disabled","value","onUpdate:value","onOnChange"])]),_:2},1032,["isShowMsg","isCheck","checkValue","rules"])],4))),128))],10,jg))}}),Yg=["onClick"],qg=["innerHTML"],Xg=e.defineComponent({name:"ClSelectMoveSearchUl",__name:"SearchTree",props:{list:{type:Array,default:()=>[]}},emits:{onClick:a=>!0},setup(a,{emit:l}){const o=l,t=`selectmove-search-tree-${n.getRandom(5)}`,s=i=>{n.isUndefined(i)||o("onClick",i.toString())};return(i,u)=>{const c=e.resolveComponent("cl-select-move-search-ul");return e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,(r,d)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${r.id}-${d}`},[e.createElementVNode("a",{href:"javascript:",tabindex:"-1",class:e.normalizeClass({"tree-hig":r.isHig,"tree-active":r.isSelected}),onClick:e.withModifiers(m=>s(r.id),["stop"])},[e.createVNode(ft,{value:r.isSelected,indeterminate:r.isIndeterminate},null,8,["value","indeterminate"]),e.createElementVNode("span",{class:"tree-text",innerHTML:r.showTextLabel},null,8,qg)],10,Yg),r.list&&r.list.length>0?(e.openBlock(),e.createBlock(c,{key:0,list:r.list,onOnClick:s},null,8,["list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))),128))])}}}),Gg={class:"selectmove-search-list"},Qg={key:1},Zg={class:"selectmove-search-empty"},ev=1e3,tv=e.defineComponent({name:"ClSelectMoveSearch",__name:"Search",props:{disabled:Boolean,placeholder:String,width:Number,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onChange:a=>!0},setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("common");const u=e.inject("$SelectmoveTop"),c=e.inject("$SelectmoveBase");if(n.isUndefined(u)||n.isUndefined(c))throw new Error("SelectMove.Search 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const r=e.reactive({isOpen:!1,isInitSelect:!1}),d=e.ref([]),m=e.ref([]);let p="",f=[];const h={jsonSelectIds:{},jsonSelectHalfIds:{}},g=e.computed(()=>({"selectmove-search-input":!0,"selectmove-search-open":r.isOpen})),S=e.computed(()=>({"selectmove-search-dropdown":!0,"selectmove-search-open":r.isOpen})),T=e.computed(()=>{const C={};return o.width&&o.width>0&&(C.width=`${o.width}px`),C}),w=()=>{t("onChange",m.value.join(","))},E=()=>{r.isOpen=!1,d.value=[]},M=C=>{const k=c.convertSelectHalf(C);m.value=C,h.jsonSelectHalfIds=n.getArrConvertJson(k),h.jsonSelectIds=n.getArrConvertJson(C)},V=C=>{const k=C.toLowerCase().trim();if(k===p)return f;const b=[];if(n.isEmpty(o.searchKey))return ve.warn("ClSelectMoveSearch","SelectMove.Search searchKey 为空,搜索将无结果"),p=k,f=b,b;const v=n.isNonEmptyString(o.searchMultipleJoin)?o.searchMultipleJoin:",",_=o.searchIsMultiple?k.split(v).map(F=>F.trim()):[k],y=o.searchKey.length,B=o.searchKey,A=u.getDataList();return n.isArray(A)?(A.forEach(F=>{if(n.isUndefined(F)||n.isUndefined(F.id)||!n.isString(F.id)&&!n.isNumber(F.id))return;const P=F.id.toString(),H=[];let $=0;for(let z=0;z<y;z++){const oe=F[B[z]];if(!n.isString(oe)){$++;continue}const Z=oe.toLowerCase();let W=!1;for(let Y=0;Y<_.length;Y++)if(_[Y].length>0&&Z.indexOf(_[Y])>-1){W=!0;break}W&&H.push(!0)}if(H.length>0)switch(o.searchKeyType){case"||":b.push(P);break;case"&&":H.length===y-$&&b.push(P);break;default:ve.warn("ClSelectMoveSearch",`SelectMove.Search searchKeyType 未知值「${o.searchKeyType}」,按 || 兜底`),b.push(P);break}}),p=k,f=b,b):(p=k,f=b,b)},I=(C,k,b,v,_)=>{const y=[],B=_||[];return n.isExistJsonKey(k,C)&&k[C].forEach(A=>{if(B.indexOf(A)>-1)return;const F=B.concat([A]),P=n.getJsonClone(u.getDataInfo(A));if(n.isEmpty(P))return;let H=n.isNonEmptyString(P.name)?n.encodeHTML(P.name):"";const $=o.searchTextFormat;if($&&$.length>0){let Z="";n.isArray($)?$.length>b&&(Z=$[b]):n.isString($)&&(Z=$),n.isEmpty(Z)||(H=n.convertStringFormatEncodeHTML(Z,P))}P.showTextLabel=H;let z=!1,oe=n.isExistJsonKey(k,A);oe?P.list=I(A,k,b+1,v,F):(z=!0,P.list=[],u.getDataGroup(A).length>0&&(oe=!0,z=!1)),P.isIndeterminate=n.isExistJsonKey(h.jsonSelectHalfIds,A),P.isSelected=n.isExistJsonKey(h.jsonSelectIds,A),P.isChild=oe,P.isLast=z,P.treeLevel=b,P.isHig=n.isExistJsonKey(v,A),y.push(P)}),y},N=C=>{if(C.length===0)return[];const{parentKey:k,topParentValue:b}=o,v={};let _=[];C.forEach(A=>{v[A]=!0;const F=c.getParentIds(A);_.push(...F),_.push(A)}),_=n.getArrUnique(_);const y={};_.forEach(A=>{const F=u.getDataInfo(A);if(n.isUndefined(F))return;const P=F[k],H=n.isEmpty(P)?b:P.toString(),$=H===b?u.getTopParentValue():H;n.isExistJsonKey(y,$)||(y[$]=[]),y[$].push(A)});const B=u.getTopParentValue();return n.isExistJsonKey(y,B)||ve.warn("ClSelectMoveSearch","SelectMove.Search 数据存在环或祖先链断裂,搜索结果可能为空"),I(B,y,0,v)},x=()=>{if(r.isInitSelect=!1,!n.isEqualArr(o.selectId,m.value)){const k=c.convertSelectedValue(o.selectId,!0,[]);M(k)}},L=C=>{if(n.isNonEmptyString(C)){r.isInitSelect&&x();const k=V(C),b=N(k);d.value=b,r.isOpen=!0}else E()},D=C=>{const k=[];return C.forEach(b=>{const v=n.getJsonClone(b);if(n.isUndefined(v)||n.isUndefined(v.id))return;const _=v.id.toString();v.isIndeterminate=n.isExistJsonKey(h.jsonSelectHalfIds,_),v.isSelected=n.isExistJsonKey(h.jsonSelectIds,_),v.list&&v.list.length>0&&(v.list=D(v.list)),k.push(v)}),k},O=C=>{if(r.isOpen){const k=ue.getParent(C.target,".selectmove-search");n.isUndefined(k)&&(r.isOpen=!1)}};e.onUnmounted(()=>{document.body.removeEventListener("click",O)}),e.watch(()=>r.isOpen,C=>{C?document.body.addEventListener("click",O):document.body.removeEventListener("click",O)}),e.watch(()=>o.selectId,()=>{r.isInitSelect=!0,r.isOpen&&(x(),d.value=D(d.value))},{immediate:!0}),e.watch(()=>[o.searchKey,o.searchKeyType,o.searchIsMultiple,o.searchMultipleJoin],()=>{p="",f=[]});const X=C=>{L(C)},Q=C=>{r.isOpen||L(C)},R=C=>{const k=n.isExistJsonKey(h.jsonSelectIds,C),b=c.convertSelectedValue(C,!k,m.value);M(b),d.value=D(d.value),w()};return(C,k)=>(e.openBlock(),e.createElementBlock("div",{class:"selectmove-search",style:e.normalizeStyle(T.value)},[e.createElementVNode("div",{class:e.normalizeClass(g.value)},[e.createVNode(nn,{placeholder:a.placeholder,disabled:a.disabled,changeDelayTime:ev,onOnChange:X,onOnFocus:Q},null,8,["placeholder","disabled"])],2),r.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(S.value)},[e.createElementVNode("div",Gg,[d.value.length>0?(e.openBlock(),e.createBlock(Xg,{key:0,list:d.value,onOnClick:R},null,8,["list"])):(e.openBlock(),e.createElementBlock("ul",Qg,[e.createElementVNode("li",Zg,e.toDisplayString(e.unref(s).noResultsText),1)]))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4))}}),nv={class:"selectmove-tree"},ov={class:"selectmove-tree-head"},av={class:"selectmove-tree-head-title"},lv={class:"selectmove-tree-body"},sv=["onClick"],iv=["innerHTML"],El=10,rv=e.defineComponent({name:"ClSelectMoveTree",__name:"Tree",props:{disabled:Boolean,maxWidth:Number,width:Number,treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=e.inject("$SelectmoveTop"),i=e.inject("$SelectmoveBase");if(n.isUndefined(s)||n.isUndefined(i))throw new Error("SelectMove.Tree 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const u=`selectmove-tree-${n.getRandom(5)}`,c=e.reactive({selectIds:[],HalfSelectIds:[],openActiveId:[]}),r=e.ref([]),d=()=>{t("onChange",c.selectIds.join(","))},m=x=>{let L=0;const D=s.getDataGroup(x);if(D.length>0){const O=[],X=[];D.forEach(Q=>{const R=Q.id.toString();n.isExistValue(c.selectIds,R)&&O.push(R),n.isExistValue(c.HalfSelectIds,R)&&X.push(R)}),(X.length>0||O.length>0)&&(L=2),O.length>0&&O.length===D.length&&(L=1)}return L},p=(x,L,D)=>{const O={idx:x,pId:L,title:!n.isEmpty(o.treeTitle)&&o.treeTitle.length>x?o.treeTitle[x]:D,list:[],checkAll:0,sty:{}};if(o.width&&o.maxWidth&&o.width>0&&o.maxWidth>0){let X=o.width-3;const Q=o.maxWidth/o.width;x+1>=Q&&(X+=3),O.sty.width=`${X}px`}if(!n.isEmpty(L)){const X=s.getDataGroup(L);X.length>0&&(O.list=X.map(Q=>{const R=Q.id.toString(),C=n.getJsonClone(Q);C.selected=n.isExistValue(c.selectIds,R),C.indeterminate=n.isExistValue(c.HalfSelectIds,R),C.isActive=n.isExistValue(c.openActiveId,R);const k=s.getDataGroup(R);C.isSub=k.length>0;let b=n.isNonEmptyString(Q.name)?n.encodeHTML(Q.name):"";const v=o.treeTextFormat;if(v&&v.length>0){let _="";n.isArray(v)?v.length>x&&(_=v[x]):n.isString(v)&&(_=v),n.isEmpty(_)||(b=n.convertStringFormatEncodeHTML(_,C))}return C.showTextLabel=b,C})),O.checkAll=m(L)}return O},f=x=>{const L=i.convertSelectedValue(x,!0,[]),D=i.convertSelectHalf(L);c.selectIds=L,c.HalfSelectIds=D},h=(x,L)=>{const D=[];if(r.value.forEach((O,X)=>{X<=x&&D.push(p(O.idx,O.pId,O.title))}),s.getDataGroup(L).length>0){const O=s.getDataInfo(L),X=n.isNonEmptyString(O&&O.name)?O.name:"";D.push(p(x+1,L,X))}r.value=D},g=(x,L)=>{const D=x.id.toString(),O=n.getArrClone(c.openActiveId);O.splice(L),O.push(D),c.openActiveId=O,h(L,D)},S=(x,L)=>{const D=i.convertSelectedValue(x,L,c.selectIds),O=i.convertSelectHalf(D);c.selectIds=D,c.HalfSelectIds=O,r.value=r.value.map(X=>p(X.idx,X.pId,X.title)),d()},T=x=>{const L=r.value.length,D=x||[];if(L>0&&c.selectIds.length>0){let O,X=-1;for(let Q=L-1;Q>=0;Q--)if(r.value[Q].list.some(C=>{if(C.selected||C.indeterminate)return O=C,!0})){X=Q;break}if(X>-1&&!n.isUndefined(O)&&O.isSub){const Q=O.id.toString();if(D.indexOf(Q)>-1)return;D.push(Q),g(O,X),T(D)}}},w=()=>{const x=[];return x.push(p(0,s.getTopParentValue(),"")),x};let E=null;const M=()=>{c.openActiveId=[],n.isEmpty(o.selectId)?(c.selectIds=[],c.HalfSelectIds=[]):f(o.selectId),r.value=w(),T(),E=n.getArrClone(o.selectId),o.treeShowMinLevel>1&&c.selectIds.length===0&&e.nextTick(()=>{const x=r.value.length,L=n.isFinite(o.treeShowMinLevel)?Math.min(o.treeShowMinLevel,El):El;if(L>x){const D=[];for(let O=x;O<L;O++)D.push(p(O,"",""));r.value=r.value.concat(D)}})};e.onMounted(()=>{e.nextTick(()=>{M()})}),e.watch(()=>o.dataRefreshIndex,()=>{M()}),e.watch(()=>o.selectId,x=>{(n.isUndefined(E)?!1:n.isEqualArr(x,E))||(E=n.getArrClone(x),f(x),r.value=r.value.map(D=>p(D.idx,D.pId,D.title)),T())});const V=(x,L)=>{const D=s.getDataGroup(L.toString()).map(O=>O.id.toString());S(D,x.value)},I=(x,L)=>{S(L.toString(),x.value)},N=(x,L,D)=>{if(o.disabled)return;const O=L.id.toString();if(n.isEmpty(s.getDataGroup(O))){if(ue.getParent(x.target,".selectmove-option-checkbox",".selectmove-option"))return;S(O.toString(),!n.isExistValue(c.selectIds,O))}g(L,D)};return(x,L)=>(e.openBlock(),e.createElementBlock("div",nv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(D,O)=>(e.openBlock(),e.createElementBlock("div",{key:`${u}-tree-${O}`,class:"selectmove-tree-item",style:e.normalizeStyle(D.sty)},[e.createElementVNode("div",ov,[e.withDirectives(e.createVNode(ft,{disabled:a.disabled,value:D.checkAll===1,indeterminate:D.checkAll===2,onOnChange:X=>V(X,D.pId)},null,8,["disabled","value","indeterminate","onOnChange"]),[[e.vShow,D.list.length>0]]),e.createElementVNode("div",av,e.toDisplayString(D.title),1)]),e.createElementVNode("div",lv,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.list,(X,Q)=>(e.openBlock(),e.createElementBlock("li",{key:`${u}-${X.id}-${Q}`,class:e.normalizeClass({"selectmove-option":!0,active:X.isActive}),onClick:R=>N(R,X,O)},[e.createElementVNode("div",null,[e.createVNode(ft,{className:"selectmove-option-checkbox",disabled:a.disabled,value:X.selected,indeterminate:X.indeterminate,onOnChange:R=>I(R,X.id)},null,8,["disabled","value","indeterminate","onOnChange"]),e.createElementVNode("div",{class:"selectmove-option-text",innerHTML:X.showTextLabel},null,8,iv),X.isSub?(e.openBlock(),e.createBlock(fe,{key:0,name:"angle-right",className:"sub-icon"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,sv))),128))])])],4))),128)),e.renderSlot(x.$slots,"tail")]))}}),cv={class:"selectmove-result"},uv={class:"selectmove-result-head"},dv=["innerHTML"],mv={class:"selectmove-result-body"},pv=["innerHTML"],fv=e.defineComponent({name:"ClSelectMoveResult",__name:"Result",props:{disabled:Boolean,width:Number,resultCountFormat:String,resultTextFormat:String,resultMergeParent:Boolean,selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:a=>!0},setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("common");const u=e.inject("$SelectmoveTop"),c=e.inject("$SelectmoveBase");if(n.isUndefined(u)||n.isUndefined(c))throw new Error("SelectMove.Result 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const r=`selectmove-result-${n.getRandom(5)}`,d=e.ref([]),m=e.computed(()=>d.value.length),p=e.computed(()=>n.isNonEmptyString(o.resultCountFormat)?n.convertStringFormat(o.resultCountFormat,{_count:m.value}):`${s.value.selected} ${m.value} ${s.value.count}`),f=e.computed(()=>{const w={};return o.width&&o.width>0&&(w.width=`${o.width}px`),w}),h=w=>{t("onChange",w.join(","))},g=w=>{if(n.isEmpty(w))return[];const E=w.filter(I=>!n.isUndefined(I)&&!n.isEmpty(I)),M=o.resultMergeParent?c.getValueMergeParent(E):c.getValueSplitChild(E),V=[];return M.forEach(I=>{const N=u.getDataInfo(I);if(n.isUndefined(N))return;const x=n.getJsonClone(N);n.isNonEmptyString(o.resultTextFormat)?x.showTextLabel=n.convertStringFormatEncodeHTML(o.resultTextFormat,x):n.isNonEmptyString(x.name)?x.showTextLabel=n.encodeHTML(x.name):x.showTextLabel="",V.push(x)}),V};e.watch(()=>o.selectId,w=>{const M=(n.isEmpty(w)?[]:w).filter(N=>!n.isUndefined(N)&&!n.isEmpty(N)),V=d.value.map(N=>N.id.toString());n.isEqualArr(M,V)||(d.value=g(M))},{immediate:!0}),e.watch(()=>o.dataRefreshIndex,()=>{d.value=g(o.selectId)}),e.watch(()=>o.resultMergeParent,()=>{d.value=g(o.selectId)});const S=()=>{d.value=[],h([])},T=w=>{const E=[],M=[],V=w.id.toString();d.value.forEach(I=>{const N=I.id.toString();N!==V&&(M.push(I),E.push(N))}),d.value=M,h(E)};return(w,E)=>(e.openBlock(),e.createElementBlock("div",cv,[e.createElementVNode("div",{class:"selectmove-result-container",style:e.normalizeStyle(f.value)},[e.createElementVNode("div",uv,[e.createElementVNode("span",null,[a.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn-cleanAll",type:"button",onClick:S},e.toDisplayString(e.unref(s).deleteAll),1))]),e.createElementVNode("span",{innerHTML:p.value},null,8,dv)]),e.createElementVNode("div",mv,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(M,V)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-${M.id}-${V}`},[e.createElementVNode("div",null,[e.createElementVNode("div",{innerHTML:M.showTextLabel},null,8,pv),a.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createBlock(fe,{key:0,name:"close",className:"btn-clean",onClick:I=>T(M)},null,8,["onClick"]))])]))),128))])])],4)]))}}),hv={class:"selectmove-body"},gv={key:0,class:"selectmove-result"},vv=100,yv=175,Bl=e.defineComponent({name:"ClSelectMoveContainer",__name:"Container",props:{disabled:Boolean,width:Number,isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShowSlot:Boolean,resultIsShowSubUnit:Boolean,resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},dataRefreshIndex:{type:Number,default:0},selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onSelectValue:a=>!0,onInitComplete:()=>!0},setup(a,{emit:l}){const o=a,t=l;let s=!1;const i=e.inject("$SelectmoveTop");if(n.isUndefined(i))throw new Error("SelectMove.Container 缺少容器依赖($SelectmoveTop),请确保在 ClSelectMove 内使用");const u=e.reactive({searchWidth:0,treeWidth:0,resultWidth:0}),c={parentIdsJson:Object.create(null),childIdJson:Object.create(null),childIdsJson:Object.create(null)},r=T=>{t("onSelectValue",T)},d=()=>{e.nextTick(()=>{s||t("onInitComplete")})},m=T=>{let w=[];return n.isExistJsonKey(c.childIdJson,T)?w=c.childIdJson[T]:i.isCheckChildren(T)&&(i.getDataGroup(T).forEach(E=>{n.isUndefined(E)||n.isUndefined(E.id)||w.push(E.id.toString())}),c.childIdJson[T]=w),w},p=(T,w)=>{let E=[];const M=w||[];return M.indexOf(T)>-1||(M.push(T),n.isExistJsonKey(c.childIdsJson,T)?E=c.childIdsJson[T]:(i.isCheckChildren(T)&&i.getDataGroup(T).forEach(V=>{if(n.isUndefined(V)||n.isUndefined(V.id))return;const I=V.id.toString();E.push(I);const N=p(I,M);N.length>0&&(E=E.concat(N))}),c.childIdsJson[T]=E)),E},f=(T,w)=>{const{parentKey:E,topParentValue:M}=o;let V=[];const I=w||[];if(I.indexOf(T)>-1)return V;if(I.push(T),n.isExistJsonKey(c.parentIdsJson,T))V=c.parentIdsJson[T];else{const N=i.getDataInfo(T);if(!n.isUndefined(N)){const x=N[E],L=n.isEmpty(x)?M:x.toString();if(L!==M&&!n.isUndefined(i.getDataInfo(L))){V.push(L);const D=f(L,I);D.length>0&&(V=V.concat(D))}}c.parentIdsJson[T]=V}return V},h=(T,w,E)=>{const M=(n.isUndefined(E)?[]:E).filter(O=>!n.isUndefined(O));if(n.isUndefined(T))return n.getArrClone(M);const V=n.isObject(T)?T:[T];if(!n.isArray(V))return n.getArrClone(M);const I=n.getArrConvertJson(M),N={},x=[],L=[];V.forEach(O=>{if(n.isUndefined(O))return;const X=[],Q=[],R=O.toString();if(w){if(!(n.isExistJsonKey(I,R)||n.isExistJsonKey(N,R))){X.push(R);const k=p(R);k&&k.length>0&&X.push(...k);const b=f(R);for(let v=0;v<b.length;v++){const _=b[v].toString();if(n.isExistJsonKey(I,_)||n.isExistJsonKey(N,_))break;const y=m(_),B=[];if(y.forEach(A=>{const F=A.toString();(n.isExistJsonKey(I,F)||n.isExistJsonKey(N,F)||X.indexOf(F)>-1)&&B.push(F)}),y.length===B.length)X.push(_);else break}}}else{Q.push(R);const C=p(R);C&&C.length>0&&Q.push(...C);const k=f(R);Q.push(...k)}X.length>0&&X.forEach(C=>{x.push(C),N[C]=!0}),Q.length>0&&Q.forEach(C=>{L.push(C)})});let D=n.getArrClone(M);return D.push(...x),D=n.getArrUnique(D),D=n.getArrRemoveById(D,L),D},g=T=>{if(n.isUndefined(T)||!n.isArray(T))return[];const w=[],E={};T.forEach(I=>{E[I]=!0;const N=f(I);w.push(...N)});const M=[],V={};return w.forEach(I=>{!n.isExistJsonKey(V,I)&&!n.isExistJsonKey(E,I)&&(V[I]=!0,M.push(I))}),M},S=()=>{const T=o.width;if(T!==void 0&&n.isFinite(T)&&T>=350){const w=Math.floor(T/yv),E=Math.floor(T/w);u.searchWidth=T,u.treeWidth=E,u.resultWidth=E}};return e.onMounted(()=>{S(),d()}),e.onBeforeUnmount(()=>{s=!0}),e.watch(()=>o.dataRefreshIndex,()=>{c.parentIdsJson=Object.create(null),c.childIdJson=Object.create(null),c.childIdsJson=Object.create(null)}),e.watch(()=>o.width,()=>{S()}),e.provide("$SelectmoveBase",{convertSelectedValue:(T,w,E)=>{let M=!1;if(w&&n.isObject(T)&&T.length>vv&&(M=!0),M){const V=i.getValueMergeParent(T);return h(V,w,E)}else return h(T,w,E)},convertSelectHalf:g,getChildIds:p,getParentIds:f,getLastChildIds:(T,w)=>i.getLastChildIds(T,w),getValueMergeParent:T=>i.getValueMergeParent(T),getValueSplitChild:T=>i.getValueSplitChild(T)}),(T,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.isSearch?(e.openBlock(),e.createBlock(tv,{key:0,disabled:a.disabled,width:u.searchWidth,placeholder:a.searchPlaceholder,searchKey:a.searchKey,searchKeyType:a.searchKeyType,searchIsMultiple:a.searchIsMultiple,searchMultipleJoin:a.searchMultipleJoin,searchTextFormat:a.searchTextFormat,selectId:a.selectId,parentKey:a.parentKey,topParentValue:a.topParentValue,onOnChange:r},null,8,["disabled","width","placeholder","searchKey","searchKeyType","searchIsMultiple","searchMultipleJoin","searchTextFormat","selectId","parentKey","topParentValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",hv,[e.createVNode(rv,{disabled:a.disabled,maxWidth:u.searchWidth,width:u.treeWidth,treeTitle:a.treeTitle,treeShowMinLevel:a.treeShowMinLevel,treeTextFormat:a.treeTextFormat,selectId:a.selectId,dataRefreshIndex:a.dataRefreshIndex,onOnChange:r},{tail:e.withCtx(()=>[a.resultIsShowSlot?(e.openBlock(),e.createElementBlock("div",gv,[e.renderSlot(T.$slots,"resultSelect")])):a.resultIsShowSubUnit?(e.openBlock(),e.createBlock(fv,{key:1,disabled:a.disabled,width:u.resultWidth,resultTextFormat:a.resultTextFormat,resultCountFormat:a.resultCountFormat,resultMergeParent:a.resultMergeParent,selectId:a.selectId,dataRefreshIndex:a.dataRefreshIndex,onOnChange:r},null,8,["disabled","width","resultTextFormat","resultCountFormat","resultMergeParent","selectId","dataRefreshIndex"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))]),_:3},8,["disabled","maxWidth","width","treeTitle","treeShowMinLevel","treeTextFormat","selectId","dataRefreshIndex"])])],64))}}),kv=["id"],Sv={className:"selectmove-text-num"},bv={class:"selectmove-container"},wv=["id"],oi=e.defineComponent({name:"ClSelectMove",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!1},placeholder:String,isClear:{type:Boolean,default:!1},containerWidth:{type:Number,default:350},isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShow:{type:Boolean,default:!0},resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l)=>!0,onInit:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useSlots(),u=t.id,c=e.useTemplateRef("refElDropdownLayer"),r=e.reactive({dataRefreshIndex:0,selectedIds:[],IsShowResultSlot:!n.isUndefined(i.resultSelect),isInitEmitDone:!1}),d=e.ref([]),m={dataJson:{},dataGroup:{},childLastIdsJson:{}},p=e.computed(()=>({disabled:t.disabled,width:t.containerWidth,isSearch:t.isSearch,searchPlaceholder:t.searchPlaceholder,searchKey:t.searchKey,searchKeyType:t.searchKeyType,searchIsMultiple:t.searchIsMultiple,searchMultipleJoin:t.searchMultipleJoin,searchTextFormat:t.searchTextFormat,treeTitle:t.treeTitle,treeShowMinLevel:t.treeShowMinLevel,treeTextFormat:t.treeTextFormat,resultIsShowSubUnit:t.resultIsShow,resultIsShowSlot:r.IsShowResultSlot,resultTextFormat:t.resultTextFormat,resultCountFormat:t.resultCountFormat,resultMergeParent:t.resultMergeParent,parentKey:t.parentKey,topParentValue:t.topParentValue})),f=e.computed(()=>{let F="panel-selectmove ";return n.isNonEmptyString(t.className)&&(F+=t.className),t.isDropdown||t.disabled&&(F+=" selectmove-disabled "),F}),h=F=>{s("update:value",F),s("update:modelValue",F)},g=(F,P)=>{h(F),s("onChange",F,P)},S=()=>{s("onInit")},T=()=>t.list,w=F=>n.isExistJsonKey(m.dataGroup,F.toString()),E=F=>{const P=F.toString();return w(P)?m.dataGroup[P]:[]},M=F=>{const P=F.toString();return n.isExistJsonKey(m.dataJson,P)?m.dataJson[P]:null},V=()=>`top_${t.topParentValue}`,I=F=>{const{parentKey:P,topParentValue:H}=t,$={},z={};!n.isEmpty(F)&&n.isArray(F)&&F.forEach(oe=>{const Z=n.getJsonClone(oe);if(!n.isString(Z.id)&&!n.isNumber(Z.id))return;const W=Z.id.toString(),Y=n.isEmpty(Z[P])?H:Z[P].toString();$[W]=Z;const q=Y===H?V():Y;n.isExistJsonKey(z,q)||(z[q]=[]),z[q].push(Z)}),m.dataJson=$,m.dataGroup=z,m.childLastIdsJson={}};I(t.list);const N=(F,P)=>{let H=[];const $=P||[];return $.indexOf(F)>-1||($.push(F),n.isExistJsonKey(m.childLastIdsJson,F)&&m.childLastIdsJson[F].length>0?H=m.childLastIdsJson[F]:(w(F)?E(F).forEach(z=>{const oe=N(z.id.toString(),$);oe.length>0&&(H=H.concat(oe))}):H.push(F),m.childLastIdsJson[F]=H)),H},x=(F,P)=>{const{parentKey:H,topParentValue:$}=t,z=P||[],oe={},Z=[];let W=[];if(F.forEach(Y=>{const q=M(Y);if(!n.isUndefined(q)){const J=q[H],U=n.isUndefined(J)?$:J.toString();U===$?W.push(Y):(n.isExistJsonKey(oe,U)||(oe[U]=[]),oe[U].push(Y))}}),!n.isEmpty(oe))for(const[Y,q]of Object.entries(oe))q.length===E(Y).length&&z.indexOf(Y)===-1?Z.push(Y):W=W.concat(q);if(Z.length>0){W.push(...Z);const Y=n.getArrUnique(W);return x(Y,z.concat(Z))}else return W},L=F=>{const P=[],H=n.getArrConvertJson(F);return F.forEach(z=>{const oe=E(z);if(n.isEmpty(oe))P.push(z);else{const Z=[];oe.forEach(W=>{n.isExistJsonKey(H,W.id.toString())&&Z.push(W.id)}),oe.length!==Z.length&&P.push(z)}}),x(P)},D=F=>{let P=[];return F.forEach(H=>{const $=N(H);P.push(...$)}),P=n.getArrUnique(P),P},O=(F,P)=>(n.isBoolean(P)?P:t.isOutMerge)?L(F):D(F),X=F=>{const P=[],H=[];return F.forEach($=>{const z=M($);n.isUndefined(z)||(P.push(z),H.push(n.isNonEmptyString(z.name)?n.encodeHTML(z.name):""))}),{list:P,label:H}},Q=F=>{const P=[],H=new Set;let $=F;for(;n.isNonEmptyString($)&&!H.has($);){H.add($);const z=M($);if(!z)break;n.isNonEmptyString(z.name)&&P.unshift(z.name);const oe=z[t.parentKey],Z=oe!=null?String(oe):"";if(Z===""||Z===String(t.topParentValue))break;$=Z}return P},R=e.computed(()=>{if(t.list,n.isEmpty(r.selectedIds))return"";const F=n.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",P=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return O(r.selectedIds,t.resultMergeParent).map($=>{const z=Q($);return n.removeHTMLTags(z.length>0?z.join(F):$)}).join(P)}),C=()=>{if(t.isDropdown)if(n.isEmpty(r.selectedIds))d.value=[];else{const F=O(r.selectedIds,t.resultMergeParent);d.value=X(F).label}};(()=>{n.isNonEmptyString(t.value)&&(r.selectedIds=n.split(t.value)),C()})(),e.watch(()=>t.value,(F,P)=>{if(F!==P){const H=n.isNonEmptyString(F)?n.split(F):[],$=O(r.selectedIds);n.isEqualArr(H,$)||(r.selectedIds=n.isEmpty(H)?[]:H,C())}}),e.watch(()=>t.list,F=>{n.isArray(F)&&(I(F),r.selectedIds=r.selectedIds.filter(P=>!n.isUndefined(M(P))),r.dataRefreshIndex++,C())}),e.watch(()=>t.resultMergeParent,()=>{C()});const b=()=>{t.disabled||(r.selectedIds=[],C(),g("",[]))},v=()=>{t.isDropdown&&(C(),c.value&&(c.value.checkIsShowOpen()||c.value.initCompleteOpen())),r.isInitEmitDone||(r.isInitEmitDone=!0,S())},_=F=>{const P=n.isEmpty(F)?[]:n.split(F);r.selectedIds=P;const H=O(P),$=X(H);C(),g(H.join(","),$.list)};return e.provide("$SelectmoveTop",{isCheckChildren:w,getDataGroup:E,getDataInfo:M,getDataList:T,getLastChildIds:N,getValueMergeParent:L,getValueSplitChild:D,getTopParentValue:V}),l({getValue:()=>O(r.selectedIds).join(","),getValueData:()=>{const F=O(r.selectedIds);return X(F).list},setValue:F=>{r.selectedIds=n.isString(F)&&!n.isEmpty(F)?n.split(F):[],C()}}),(F,P)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(u),class:"cl-plaintext-value"},e.toDisplayString(R.value),9,kv)):a.isDropdown?(e.openBlock(),e.createBlock(En,{key:1,id:e.unref(u),ref_key:"refElDropdownLayer",ref:c,classParent:f.value,classText:"selectmove-text",classDropDown:"selectmove-dropdown",placeholder:a.placeholder,isDisabled:a.disabled,isClear:a.isClear,textLabel:d.value.join(","),textArrowDirection:"right",isUseDropdownArrow:!0,appendContainer:a.appendContainer,onOnClear:b},{textExtend:e.withCtx(()=>[e.createElementVNode("span",Sv,[d.value.length>1?(e.openBlock(),e.createBlock(Pt,{key:0,num:d.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),dropdown:e.withCtx(()=>[e.createElementVNode("div",bv,[e.createVNode(Bl,e.mergeProps(p.value,{dataRefreshIndex:r.dataRefreshIndex,selectId:r.selectedIds,onOnSelectValue:_,onOnInitComplete:v}),{resultSelect:e.withCtx(()=>[e.renderSlot(F.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])])]),_:3},8,["id","classParent","placeholder","isDisabled","isClear","textLabel","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(u),class:e.normalizeClass(f.value)},[e.createVNode(Bl,e.mergeProps(p.value,{dataRefreshIndex:r.dataRefreshIndex,selectId:r.selectedIds,onOnSelectValue:_,onOnInitComplete:v}),{resultSelect:e.withCtx(()=>[e.renderSlot(F.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])],10,wv))}}),Cv=["id"],Ev={key:0,class:"cl-plaintext-value"},Bv={key:2,class:"selectTag-container"},xv=["aria-selected","aria-disabled","tabindex"],Tv=["aria-selected","aria-disabled","tabindex","onClick","onKeydown"],Dv=["innerHTML"],Iv={key:1},Na=e.defineComponent({name:"ClSelectTag",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:Boolean,type:{type:String,required:!0,validator:a=>["checkbox","radio"].indexOf(a)!==-1},list:{type:Array,default:()=>[]},theme:String,width:String,isShowAll:Boolean,showAllLabel:String,isInitRadioValue:{type:Boolean,default:!0},isRadioClickCancel:Boolean,checkChangeBefore:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l,o,t)=>!0,onInit:(a,l,o)=>!0,onError:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=`s-${n.getRandom(5)}`,r=t.id,d=e.reactive({theme:""}),m=e.ref(!1),p=H=>{let $=[];return n.isEmpty(H)||($=H.toString().split(",")),$},f=e.ref(p(t.value));let h=[],g={};const S=e.ref(0),T=e.ref(!1);let w=0;const E=e.computed(()=>{const H=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,S.value;const $=[];return f.value.forEach(z=>{const oe=n.isExistJsonKey(g,z)?g[z]:void 0;oe&&n.isNonEmptyString(oe.name)&&$.push(oe.name)}),$.join(H)}),M=e.computed(()=>{const{theme:H}=t,$={"panel-select-tag":!0};let z=d.theme;return H&&(z=H),n.isEmpty(z)||($[`selectTag-${z}`]=!0),n.getJsonMerge($,ue.getClassNameJson(t.className))}),V=e.computed(()=>{const H={};return n.isEmpty(t.width)||(H.width=t.width),H}),I=H=>{s("update:value",H),s("update:modelValue",H)},N=H=>{if(!n.isEqualArr(f.value,H)){const $=n.getArrClone(f.value),z=L($);f.value=n.getArrClone(H);const{value:oe,isAll:Z,info:W}=L(H);t.isShowAll&&(m.value=Z),I(oe),s("onChange",oe,W,Z,{value:z.value,info:z.info})}},x=()=>{e.nextTick(()=>{const{value:H,isAll:$,info:z}=L(f.value);s("onInit",H,z,$)})},L=H=>{const $=[];n.isEmpty(H)||H.forEach(W=>{n.isExistJsonKey(g,W)&&$.push(n.getJsonClone(g[W]))});const z=H.join(","),oe=$.length>0&&$.length===h.length;let Z;return t.type==="radio"?(Z={},$.length>0&&(Z=$[0])):Z=$,{value:z,info:Z,isAll:oe}},D=H=>!n.isEmpty(H.id)&&f.value.includes(H.id.toString()),O=H=>{const $={};return H.isHtml?$.width="auto":n.isEmpty(H.width)?n.isEmpty(t.width)||($.width=t.width):$.width=H.width,$},X=()=>{const H=ct("selectTag");H?.theme&&(d.theme=H.theme)},Q=H=>{const $=[];if(H.length>0){const z=g[H[0]],oe=z&&!n.isEmpty(z.type)?z.type:t.type;H.forEach(Z=>{if(n.isExistJsonKey(g,Z)){const W=g[Z];if((n.isEmpty(W.type)?t.type:W.type)===oe)switch(oe){case"radio":$.length===0&&$.push(Z);break;case"checkbox":$.push(Z);break}}})}return $},R=H=>{if(g={},h=[],!n.isEmpty(H)){const $=n.getArrClone(f.value);H.forEach(z=>{if(n.isExistJsonKey(z,"id")){const oe=z.id.toString();g[oe]=z,z.isDisabled?n.isExistValue($,oe)&&h.push(oe):h.push(oe)}})}S.value+=1},C=()=>{if(T.value){let H=[];n.isEmpty(f.value)||(H=Q(f.value),n.isEqualArr(f.value,H)||(f.value=H,I(H.join(",")))),t.isShowAll&&(m.value=H.length>0&&H.length===h.length)}},k=()=>{if(t.type==="radio"&&t.isInitRadioValue&&n.isEmpty(f.value)&&!n.isEmpty(t.list)){const H=t.list.find($=>!$.isDisabled);if(H&&!n.isEmpty(H.id)){const $=H.id.toString();f.value=[$],I($)}}},b=H=>{const $=p(H);n.isEqualArr(f.value,$)||(f.value=$,I($.join(",")))},v=()=>{X(),T.value=!n.isEmpty(t.list),R(t.list),k(),C()};e.onMounted(()=>{e.nextTick(()=>{v()})}),e.watch(T,H=>{H&&x()}),e.watch([()=>t.list,()=>t.value,()=>t.type],([H,$],[z,oe])=>{const Z=H;!T.value&&Z!==z&&(T.value=!0),$!==oe&&b($),R(Z),$===oe&&k(),C()});const _=async()=>{if(!t.disabled&&!n.isEmpty(t.list)){const H=++w;if(!t.list.some(W=>!W.isDisabled))return;const z=[];t.list.forEach(W=>{if(n.isEmpty(W.id))return;const Y=W.id.toString();W.isDisabled?n.isExistValue(f.value,Y)&&z.push(Y):m.value||z.push(Y)});const oe=Q(z);let Z=!0;if(t.checkChangeBefore){const{value:W}=L(oe),Y=L(n.getArrClone(f.value));try{Z=await t.checkChangeBefore(W,Y.value),Z=n.isBoolean(Z)?Z:!0}catch(q){Z=!1,s("onError",q instanceof Error?q.message:String(q))}}Z&&H===w&&N(oe)}},y=async H=>{if(!H.isDisabled&&!t.disabled&&!n.isEmpty(H.id)){const $=++w;let z=t.type;z=n.isEmpty(H.type)?z:H.type;const oe=n.getArrClone(f.value);let Z=[];const W=H.id.toString();if(oe.length===0)Z=[W];else if(z==="radio")n.isEqualArr(oe,[W])?Z=t.isRadioClickCancel?[]:oe:Z=[W];else{const q=g[oe[0]];(q&&!n.isEmpty(q.type)?q.type:t.type)==="radio"?Z=[W]:n.isExistValue(oe,W)?Z=n.getArrRemoveById(oe,W):(Z=oe,Z.push(W))}let Y=!0;if(t.checkChangeBefore){const{value:q}=L(Z),J=L(oe);try{Y=await t.checkChangeBefore(q,J.value),Y=n.isBoolean(Y)?Y:!0}catch(U){Y=!1,s("onError",U instanceof Error?U.message:String(U))}}Y&&$===w&&N(Z)}},B=()=>Q(f.value).join(",");return l({getValue:B,getValueData:()=>{const{value:H,info:$}=L(B().split(","));return t.type==="radio"&&n.isEmpty(H)?null:$},setValue:H=>{b(H),R(t.list),C()},runInitComplete:()=>{T.value||(T.value=!0,b(t.value),R(t.list),k(),C())}}),(H,$)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(M.value)},[a.isPlaintext?(e.openBlock(),e.createElementBlock("div",Ev,e.toDisplayString(E.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isPlaintext?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("ul",Bv,[a.isShowAll?(e.openBlock(),e.createElementBlock("li",{key:0,role:"option","aria-selected":m.value,"aria-disabled":a.disabled,tabindex:a.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":m.value,"selectTag-disabled":a.disabled}),style:e.normalizeStyle(V.value),onClick:$[0]||($[0]=z=>_()),onKeydown:[$[1]||($[1]=e.withKeys(e.withModifiers(z=>_(),["prevent"]),["enter"])),$[2]||($[2]=e.withKeys(e.withModifiers(z=>_(),["prevent"]),["space"]))]},[e.createElementVNode("span",null,e.toDisplayString(a.showAllLabel||e.unref(i).checkboxAll),1)],46,xv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,(z,oe)=>(e.openBlock(),e.createElementBlock("li",{key:`${c}-${z.id}-${oe}`,role:"option","aria-selected":D(z),"aria-disabled":z.isDisabled||a.disabled,tabindex:z.isDisabled||a.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":D(z),"selectTag-disabled":z.isDisabled||a.disabled}),style:e.normalizeStyle(O(z)),onClick:Z=>y(z),onKeydown:[e.withKeys(e.withModifiers(Z=>y(z),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Z=>y(z),["prevent"]),["space"])]},[e.renderSlot(H.$slots,"default",{data:z},()=>[z.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:e.unref(n).encodeHTML(z.name)},null,8,Dv)):(e.openBlock(),e.createElementBlock("span",Iv,e.toDisplayString(z.name),1))])],46,Tv))),128))]))],10,Cv))}}),_v={class:"tree-ul"},Nv=["onClick"],Vv=["aria-checked","onClick"],Mv=["tabindex","aria-disabled","onClick","onDblclick","onKeydown"],Ov=["innerHTML"],Lv={key:1},xl=170,ai=e.defineComponent({name:"ClTreeUl",__name:"Ul",props:{list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},firstOpenIds:{type:Array,default:()=>[]},openIds:{type:Array,default:()=>[]},selectIds:{type:Array,default:()=>[]},selectUnIds:{type:Array,default:()=>[]}},emits:["onSelect","onShrink"],setup(a,{emit:l}){const o=a,t=l,s=`tree-${n.getRandom(5)}`;let i=!1;const u=e.inject("$TreeTop",{isCheckChildren:()=>(i||(i=!0,ve.warn("ClTreeUl","未检测到 ClTree 容器提供 $TreeTop,子级判断降级为 false")),!1)}),c={dbClickTimeOut:null},r=e.computed(()=>new Set(o.firstOpenIds)),d=e.computed(()=>new Set(o.selectIds)),m=e.computed(()=>new Set(o.selectUnIds)),p=e.computed(()=>new Set(o.openIds)),f=L=>{n.isUndefined(L)||t("onSelect",L.toString())},h=L=>{n.isUndefined(L)||t("onShrink",L.toString())},g=L=>n.isUndefined(L.id)?"":L.id.toString(),S=L=>{const D=g(L);return d.value.has(D)?"true":m.value.has(D)?"mixed":"false"},T=L=>{const D={"tree-node":!0};if(D["tree-node-end"]=L.isEnd,!L.isEnd){const O=n.isUndefined(L.id)?"":L.id.toString(),X=p.value.has(O);D["tree-node-open"]=X,D["tree-node-closed"]=!X}return D},w=L=>{const D=n.isUndefined(L.id)?"":L.id.toString(),O={"tree-node-text":!0};return O["tree-node-select"]=d.value.has(D),O["tree-node-selectUn"]=m.value.has(D),O};e.onBeforeUnmount(()=>{c.dbClickTimeOut&&window.clearTimeout(c.dbClickTimeOut)});const E=L=>{o.disabled||(window.clearTimeout(c.dbClickTimeOut),h(L.id))},M=L=>{o.disabled||(window.clearTimeout(c.dbClickTimeOut),f(L.id))},V=L=>{if(!o.disabled)if(u.isCheckChildren(L.id)){let D=!0;!o.multiple&&!o.isSingleSelectParent&&(D=!1),D?(window.clearTimeout(c.dbClickTimeOut),c.dbClickTimeOut=window.setTimeout(()=>{o.disabled||f(L.id)},xl)):window.clearTimeout(c.dbClickTimeOut)}else window.clearTimeout(c.dbClickTimeOut),c.dbClickTimeOut=window.setTimeout(()=>{o.disabled||f(L.id)},xl)},I=L=>{o.disabled||u.isCheckChildren(L.id)&&(c.dbClickTimeOut&&window.clearTimeout(c.dbClickTimeOut),h(L.id))},N=L=>{f(L)},x=L=>{h(L)};return(L,D)=>(e.openBlock(),e.createElementBlock("ul",_v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,(O,X)=>(e.openBlock(),e.createElementBlock("li",{key:`${s}-${O.id}-${X}`,class:e.normalizeClass(T(O))},[e.createElementVNode("i",{class:"tree-shrink",onClick:e.withModifiers(Q=>E(O),["stop"])},null,8,Nv),e.createElementVNode("span",{class:e.normalizeClass(w(O))},[a.multiple?(e.openBlock(),e.createElementBlock("i",{key:0,class:"tree-node-checkbox",role:"checkbox","aria-checked":S(O),onClick:e.withModifiers(Q=>M(O),["stop"])},null,8,Vv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("a",{href:"javascript:",tabindex:a.disabled?-1:0,"aria-disabled":a.disabled,onClick:e.withModifiers(Q=>V(O),["stop"]),onDblclick:e.withModifiers(Q=>I(O),["stop"]),onKeydown:e.withKeys(e.withModifiers(Q=>V(O),["prevent"]),["enter"])},[O.showTextLabelHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:O.showTextLabel},null,8,Ov)):(e.openBlock(),e.createElementBlock("span",Lv,e.toDisplayString(O.showTextLabel),1))],40,Mv)],2),r.value.has(g(O))?(e.openBlock(),e.createBlock(bn,{key:0},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ai,{list:O.list,multiple:a.multiple,isSingleSelectParent:a.isSingleSelectParent,disabled:a.disabled,firstOpenIds:a.firstOpenIds,openIds:a.openIds,selectIds:a.selectIds,selectUnIds:a.selectUnIds,onOnSelect:N,onOnShrink:x},null,8,["list","multiple","isSingleSelectParent","disabled","firstOpenIds","openIds","selectIds","selectUnIds"]),[[e.vShow,p.value.has(g(O))]])]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),$v=["id"],Av=["id"],Va=e.defineComponent({name:"ClTree",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},searchOpenParentIds:{type:String,default:""},searchFoldParentIds:{type:String,default:""},searchKeyword:{type:String,default:""},highlightMode:{type:String,default:""},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "}},emits:["update:value","update:modelValue","onChange","onInit"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.reactive({firstOpenIds:[],openParentIds:[],selectedIds:[],selectedUnIds:[],list:[]}),c={dataJson:{},dataGroup:{},childLastIdsJson:{},prevSearchOpenParentIds:"",prevSearchFoldParentIds:""},r=e.computed(()=>({multiple:t.multiple,disabled:t.disabled,isSingleSelectParent:t.isSingleSelectParent})),d=e.computed(()=>n.getJsonMerge({"panel-tree":!0},ue.getClassNameJson(t.className))),m=Z=>{s("update:value",Z),s("update:modelValue",Z)},p=(Z,W)=>{m(Z),s("onChange",Z,W)},f=()=>{e.nextTick(()=>{s("onInit")})},h=Z=>{const W=n.isUndefined(Z)?"":Z.toString();return n.isExistJsonKey(c.dataGroup,W)},g=Z=>{const W=n.isUndefined(Z)?"":Z.toString();return h(W)?c.dataGroup[W]:[]},S=e.ref(0),T=Z=>{const W=Z.toString();return n.isExistJsonKey(c.dataJson,W)?c.dataJson[W]:null},w=Z=>{const W=[],Y=new Set;let q=Z;for(;n.isNonEmptyString(q)&&!Y.has(q);){Y.add(q);const J=T(q);if(!J)break;n.isNonEmptyString(J.name)&&W.unshift(J.name);const U=J[t.parentKey],ae=U!=null?String(U):"";if(ae===""||ae===String(t.topParentValue))break;q=ae}return W},E=e.computed(()=>{if(t.list,S.value,n.isEmpty(u.selectedIds))return"";const Z=n.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",W=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return b(u.selectedIds,t.isOutMerge).map(q=>{const J=w(q);return n.removeHTMLTags(J.length>0?J.join(Z):q)}).join(W)}),M=(Z,W,Y)=>{const q=[],J=W+1;return Y===void 0&&(Y=new Set),Y.has(Z)||(Y.add(Z),g(Z).forEach(U=>{const ae={...U},ee=ae.id.toString(),G=h(ee);ae.isEnd=!G,ae.level=J,G&&(ae.list=M(ee,J,Y)),q.push(ae)})),q},V=Z=>Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),I=Z=>{const W=t.searchKeyword,Y=t.highlightMode;if(!n.isNonEmptyString(Z)||n.isEmpty(W))return V(String(Z));const q=n.isNonEmptyString(t.highlightColor)?t.highlightColor:"#ffe58f",J=ne=>`<mark style="background:${q}">${V(ne)}</mark>`;if(Y==="full")return Z.includes(W)?J(Z):V(Z);const U=Z.indexOf(W);if(U===-1)return V(Z);const ae=V(Z.slice(0,U)),ee=J(Z.slice(U,U+W.length)),G=V(Z.slice(U+W.length));return`${ae}${ee}${G}`},N=Z=>{const{parentKey:W,topParentValue:Y}=t,q=n.isNonEmptyString(Y)?Y:"0",J={},U={};n.isEmpty(Z)||Z.forEach(ae=>{const ee=n.getJsonClone(ae),G=!n.isEmpty(t.searchKeyword)&&!n.isEmpty(t.highlightMode);ee.showTextLabelHtml=G,ee.showTextLabel=G?I(n.isString(ee.name)?ee.name:""):n.isString(ee.name)?ee.name:"";const ne=n.isString(ee.id)||typeof ee.id=="number"&&n.isFinite(ee.id),j=n.isString(ee[W])||typeof ee[W]=="number"&&n.isFinite(ee[W]);if(!ne||!j)return;const te=ee.id.toString(),re=ee[W].toString();J[te]=ee,n.isExistJsonKey(U,re)||(U[re]=[]),U[re].push(ee)}),c.dataJson=J,c.dataGroup=U,c.childLastIdsJson={},u.list=M(q,0),S.value+=1},x=(Z,W)=>{let Y=[];const{parentKey:q,topParentValue:J}=t,U=n.isNonEmptyString(J)?J:"0",ae=n.isEmpty(Z)?"":Z.toString();if(W===void 0&&(W=new Set),n.isExistJsonKey(c.dataJson,ae)&&!W.has(ae)){W.add(ae),Y.push(ae);const ee=c.dataJson[ae][q].toString();if(ee!==U){const G=x(ee,W);Y=Y.concat(G)}}return Y},L=Z=>{const W=x(Z);return W.splice(0,1),W.reverse(),W},D=(Z,W)=>{let Y=[];const q=n.isEmpty(Z)?"":Z.toString();return W===void 0&&(W=new Set),W.has(q)||(W.add(q),Y.push(q),h(q)&&g(q).forEach(J=>{const U=J.id.toString(),ae=D(U,W);Y=Y.concat(ae)})),Y},O=Z=>{const W=D(Z);return W.splice(0,1),W},X=(Z,W,Y,q)=>{const J={add:[],del:[]},U={add:[],del:[]};let ae=n.isUndefined(W)?n.getArrClone(u.selectedIds):W,ee=n.isUndefined(Y)?n.getArrClone(u.selectedUnIds):Y;const G=ae.indexOf(Z);q?G===-1&&ae.push(Z):G===-1?ae.push(Z):ae.splice(G,1),ee=n.getArrRemoveById(ee,Z);const ne=L(Z);return ne.reverse(),ne.length>0&&ne.forEach(j=>{let te=0,re=0;c.dataGroup[j].forEach(ie=>{const se=ie.id.toString();n.isExistValue(ae,se)&&(te+=1),n.isExistValue(ee,se)&&(re+=1)});const pe=c.dataGroup[j].length;te===0&&re===0?(J.del.push(j),ae=n.getArrRemoveById(ae,j),U.del.push(j),ee=n.getArrRemoveById(ee,j)):te===pe?(J.add.push(j),ae.push(j),U.del.push(j),ee=n.getArrRemoveById(ee,j)):(J.del.push(j),ae=n.getArrRemoveById(ae,j),U.add.push(j),ee.push(j))}),{select:J,selectUn:U}},Q=(Z,W)=>{let Y=[];if(W===void 0&&(W=new Set),n.isExistJsonKey(c.childLastIdsJson,Z)&&c.childLastIdsJson[Z].length>0)Y=c.childLastIdsJson[Z];else{if(W.has(Z))return Y;h(Z)?(W.add(Z),g(Z).forEach(q=>{const J=Q(q.id.toString(),W);J.length>0&&(Y=Y.concat(J))})):Y.push(Z),c.childLastIdsJson[Z]=Y}return Y},R=(Z,W)=>{const{parentKey:Y,topParentValue:q}=t,J=n.isNonEmptyString(q)?q:"0",U={},ae=[];let ee=[];if(W===void 0&&(W=new Set),Z.forEach(G=>{const ne=T(G);if(!n.isUndefined(ne)){const j=ne[Y].toString();j===J?ee.push(G):(n.isExistJsonKey(U,j)||(U[j]=[]),U[j].push(G))}}),!n.isEmpty(U))for(const[G,ne]of Object.entries(U))ne.length===g(G).length?ae.push(G):ee=ee.concat(ne);if(ae.length>0){ee.push(...ae);const G=n.getArrUnique(ee),ne=ae.some(j=>!W.has(j));return ae.forEach(j=>W.add(j)),ne?R(G,W):ee}else return ee},C=Z=>{const W=[],Y=n.getArrConvertJson(Z);return Z.forEach(J=>{const U=g(J);if(n.isEmpty(U))W.push(J);else{const ae=[];U.forEach(ee=>{n.isExistJsonKey(Y,ee.id.toString())&&ae.push(ee.id)}),U.length!==ae.length&&W.push(J)}}),R(W)},k=Z=>{let W=[];return Z.forEach(Y=>{const q=Q(Y);W.push(...q)}),W=n.getArrUnique(W),W},b=(Z,W)=>t.multiple?(n.isBoolean(W)?W:t.isOutMerge)?C(Z):k(Z):Z,v=Z=>{const W=[];return Z.forEach(Y=>{const q=T(Y);n.isUndefined(q)||W.push(q)}),W},_=Z=>{const W=t.multiple?Z:Z.slice(0,1);let Y=[],q=[];W.forEach(U=>{const ae=T(U);if(!n.isUndefined(ae)){const ee=X(U,Y,q,!0);Y=n.getArrRemoveById(Y,ee.select.del),ee.select.add.length>0&&Y.push(...ee.select.add),q=n.getArrRemoveById(q,ee.selectUn.del),ee.selectUn.add.length>0&&q.push(...ee.selectUn.add);const G=O(U);Y.push(...G),Y.push(U),Y=n.getArrUnique(Y),q=n.getArrUnique(q)}}),u.selectedIds=Y;const J=n.getArrRemoveById(q,Y);u.selectedUnIds=n.getArrClone(J),u.firstOpenIds=n.getArrUnique(u.firstOpenIds.concat(J)),u.openParentIds=n.getArrUnique(u.openParentIds.concat(J))},y=()=>{if(N(t.list),n.isNonEmptyString(t.value)){const Z=t.value.split(",");_(Z)}f()};e.onMounted(()=>{e.nextTick(()=>{y()})}),e.watch(()=>t.list,Z=>{N(Z);const W=u.selectedIds,Y=n.isNonEmptyString(t.value)?t.value.split(","):[];u.selectedIds=[],_(n.getArrUnique(W.concat(Y)));const q=b(u.selectedIds);q.join(",")!==t.value&&m(q.join(","))}),e.watch(()=>t.value,Z=>{if(Z!==void 0){const W=u.selectedIds,Y=n.isNonEmptyString(Z)?Z.split(","):[],q=b(Y),J=b(W);n.isEqualArr(q,J)||(u.selectedIds=[],_(Y))}});const B=()=>{const Z=n.isNonEmptyString(c.prevSearchFoldParentIds)?c.prevSearchFoldParentIds.split(","):[];u.firstOpenIds=n.getArrRemoveById(u.firstOpenIds,Z),(n.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds.split(","):[]).forEach(Y=>{const q=Y.toString();u.firstOpenIds.indexOf(q)===-1&&u.firstOpenIds.push(q)}),c.prevSearchFoldParentIds=n.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds:""},A=()=>{const Z=n.isNonEmptyString(c.prevSearchOpenParentIds)?c.prevSearchOpenParentIds.split(","):[];u.firstOpenIds=n.getArrRemoveById(u.firstOpenIds,Z),u.openParentIds=n.getArrRemoveById(u.openParentIds,Z),(n.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds.split(","):[]).forEach(Y=>{const q=Y.toString();u.firstOpenIds.indexOf(q)===-1&&u.firstOpenIds.push(q),u.openParentIds.indexOf(q)===-1&&u.openParentIds.push(q)}),c.prevSearchOpenParentIds=n.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds:""};e.watch(()=>t.searchOpenParentIds,()=>A()),e.watch(()=>t.searchFoldParentIds,()=>B());const F=Z=>{Array.isArray(Z)&&Z.forEach(W=>{if(!W)return;const Y=!n.isEmpty(t.searchKeyword)&&!n.isEmpty(t.highlightMode);W.showTextLabelHtml=Y,W.showTextLabel=Y?I(n.isString(W.name)?W.name:""):n.isString(W.name)?W.name:"",Array.isArray(W.list)&&F(W.list)})};e.watch(()=>[t.searchKeyword,t.highlightMode,t.highlightColor],()=>F(u.list));const P=Z=>{const W=Z.toString();n.isExistValue(u.firstOpenIds,W)||u.firstOpenIds.push(W),e.nextTick(()=>{const Y=u.openParentIds.indexOf(W);Y===-1?u.openParentIds.push(W):u.openParentIds.splice(Y,1)})},H=Z=>{const W=Z.toString();if(t.multiple){const J=u.selectedIds.indexOf(W)===-1,U=O(W),ae=X(W);let ee=n.getArrClone(u.selectedIds),G=n.getArrClone(u.selectedUnIds);ae.select.del.forEach(te=>{const re=ee.indexOf(te);re>-1&&ee.splice(re,1)}),ae.select.add.length>0&&(ee=ee.concat(ae.select.add),ee=n.getArrUnique(ee)),ae.selectUn.del.forEach(te=>{const re=G.indexOf(te);re>-1&&G.splice(re,1)}),ae.selectUn.add.length>0&&(G=G.concat(ae.selectUn.add),G=n.getArrUnique(G)),U.length>0&&U.forEach(te=>{const re=ee.indexOf(te),pe=G.indexOf(te);J?re===-1&&ee.push(te):re>-1&&ee.splice(re,1),pe>-1&&G.splice(pe,1)});const ne=ee.indexOf(W);ne>-1?ee.splice(ne,1):ee.push(W);const j=G.indexOf(W);j>-1&&G.splice(j,1),u.selectedIds=ee,u.selectedUnIds=G}else u.selectedIds=[W],u.selectedUnIds=[];const Y=b(u.selectedIds);p(Y.join(","),v(Y))};return e.provide("$TreeTop",{isCheckChildren:h}),l({getValue:()=>b(u.selectedIds).join(","),getValueData:()=>{const Z=b(u.selectedIds);return v(Z)},setValue:Z=>{const W=n.isNonEmptyString(Z)?Z.split(","):[];u.selectedIds=[],_(W)}}),(Z,W)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(i),class:"cl-plaintext-value"},e.toDisplayString(E.value),9,$v)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(d.value),id:e.unref(i)},[u.list.length>0?(e.openBlock(),e.createBlock(ai,e.mergeProps({key:0,list:u.list,firstOpenIds:u.firstOpenIds,openIds:u.openParentIds,selectIds:u.selectedIds,selectUnIds:u.selectedUnIds},r.value,{onOnSelect:H,onOnShrink:P}),null,16,["list","firstOpenIds","openIds","selectIds","selectUnIds"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Av))}}),Fv=["id"],Pv={key:0,class:"selectTree-inText-num"},Rv={class:"selectTree-inDropdown-container"},Hv={class:"selectTree-inDropdown-search"},zv={class:"selectTree-inDropdown-body"},li=e.defineComponent({name:"ClSelectTree",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},arrowDirection:{type:String,default:"right"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:a=>["||","&&"].includes(a)},showTextFormat:String,showDropDownTextFormat:String,isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},onOpenBefore:Function,highlightMode:{type:String,default:"full"},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:(a,l)=>!0,onInit:()=>!0,onOpen:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElDropdownLayer"),c=e.useTemplateRef("refElList"),r=e.reactive({isOpen:!1,isFirstDataFinish:!1,selectIds:"",selectLabel:[],filterList:[],searchOpenParentIds:"",searchFoldParentIds:"",searchKeyword:""}),d={prevSelectIds:[],originalList:[],dataJson:{}},m=e.computed(()=>{let A={"panel-select-tree":!0};return A=n.getJsonMerge(A,ue.getClassNameJson(t.className)),n.getStringByJson(A," ")}),p=e.computed(()=>{let A={"selectTree-inDropdown":!0};return A=n.getJsonMerge(A,ue.getClassNameJson(t.classDropDown)),n.getStringByJson(A," ")}),f=A=>{s("update:value",A),s("update:modelValue",A)},h=(A,F)=>{f(A),s("onChange",A,F)},g=()=>{e.nextTick(()=>{s("onInit")})},S=A=>{e.nextTick(()=>{s("onOpen",A)})},T=()=>{if(!r.isOpen){const A=r.selectIds,F=A.split(",");if(!n.isEqualArr(F,d.prevSelectIds)){d.prevSelectIds=F;const H=c.value?c.value.getValueData():[];h(A,H)}}},w=A=>{const F=t.showTextFormat;let P="";return n.isNonEmptyString(F)?P=F.replace(/\$\{(\w+)\}/g,(H,$)=>n.isString(A?.[$])?A[$]:H):P=n.isString(A?.name)?A.name:"",n.encodeHTML(P)},E=A=>n.isEmpty(A)?[]:A.split(",").map(F=>{const P=d.dataJson[F];return P?w(P):n.encodeHTML(F)}),M=A=>{const F=[],P=new Set;let H=A;for(;n.isNonEmptyString(H)&&!P.has(H);){P.add(H);const $=d.dataJson[H];if(!$)break;n.isNonEmptyString($.name)&&F.unshift($.name);const z=$[t.parentKey],oe=z!=null?String(z):"";if(oe===""||oe===String(t.topParentValue))break;H=oe}return F},V=e.computed(()=>{t.list;const A=n.isString(r.selectIds)?r.selectIds:"";if(n.isEmpty(A))return"";const F=n.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",P=n.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return A.split(",").map(H=>{const $=M(H);return n.removeHTMLTags($.length>0?$.join(F):H)}).join(P)}),I=A=>Array.isArray(A)?A.filter(F=>{if(!F)return!1;const P=!n.isUndefined(F.id)&&F.id!==null,H=!n.isEmpty(F[t.parentKey]);return P&&H}):[],N=A=>A===null?"":n.isString(A)||n.isFinite(A)?String(A):"",x=A=>{const F={};return Array.isArray(A)&&A.forEach(P=>{P&&!n.isUndefined(P.id)&&P.id!==null&&(F[String(P.id)]=P)}),F},L=()=>{const A=N(t.value);r.selectIds!==A&&(r.selectIds=A,r.selectLabel=E(A),d.prevSelectIds=A.split(","))},D=(A,F)=>{const P=[];return F===void 0&&(F=new Set),F.has(A)||(F.add(A),d.originalList.forEach(H=>{if(!H)return;const $=H[t.parentKey];n.isUndefined($)||String($)===t.topParentValue||String($)===String(A)&&(P.push(String(H.id)),P.push(...D(String(H.id),F)))})),P},O=(A,F)=>{if(n.isEmpty(F))return r.searchOpenParentIds="",r.searchFoldParentIds="",A;const P=Array.isArray(t.searchKey)?t.searchKey.filter(J=>n.isString(J)):[];if(P.length===0)return r.searchOpenParentIds="",r.searchFoldParentIds="",A;const H=t.searchKeyType==="&&",$=A.filter(J=>{if(!J)return!1;const U=P.map(ae=>{const ee=J?.[ae];return n.isString(ee)?ee.includes(F):!1});return H?U.every(Boolean):U.some(Boolean)});if($.length===0)return r.searchOpenParentIds="",r.searchFoldParentIds="",A;const z={};A.forEach(J=>{J&&(z[String(J.id)]=J)});const oe=new Set,Z=new Set,W=J=>{const U=z[String(J)];if(!U)return;const ae=U[t.parentKey];!n.isUndefined(ae)&&String(ae)!==t.topParentValue&&(oe.add(String(ae)),Z.add(String(ae)),W(String(ae)))};$.forEach(J=>{const U=String(J.id);oe.add(U),W(U),D(U).forEach(ae=>oe.add(ae))});const Y=A.filter(J=>J&&oe.has(String(J.id)));r.searchOpenParentIds=Array.from(Z).join(",");const q=new Set;return Y.forEach(J=>{if(!J)return;const U=String(J.id);if(Z.has(U))return;d.originalList.some(ee=>{if(!ee)return!1;const G=ee[t.parentKey];return!n.isUndefined(G)&&String(G)===U})&&q.add(U)}),r.searchFoldParentIds=Array.from(q).join(","),Y},X=()=>{r.isFirstDataFinish||(r.isFirstDataFinish=!0,g())},Q=()=>{n.isEmpty(t.list)||X()};e.onMounted(()=>{e.nextTick(()=>{Q()})}),e.watch([()=>t.value,()=>t.list],([A,F],[P,H])=>{F!==H&&(d.originalList=I(t.list),d.dataJson=x(d.originalList),r.filterList=d.originalList,r.selectLabel=E(r.selectIds),d.originalList.length>0&&X()),A!==P&&L()},{immediate:!0});const R=A=>{t.disabled||(r.isOpen=A,A?(d.prevSelectIds=r.selectIds.split(","),r.filterList=d.originalList):(r.searchKeyword="",r.searchOpenParentIds="",r.searchFoldParentIds="",T()),S(A))},C=()=>{t.disabled||(r.selectIds="",r.selectLabel=[],d.prevSelectIds=[],T())},k=()=>{u.value&&(u.value.checkIsShowOpen()||u.value.initCompleteOpen())},b=A=>{const F=n.isString(A)?A:"";r.searchKeyword=F,r.filterList=O(d.originalList,F)},v=(A,F)=>{const P=Array.isArray(F)?F:[];r.selectLabel=P.map(H=>w(H)),t.multiple||u.value?.setOpen(!1)};return l({getValue:()=>r.selectIds,getValueData:()=>c.value?c.value.getValueData():[],setValue:A=>{const F=N(A);r.selectIds=F,r.selectLabel=E(F),d.prevSelectIds=F.split(",")}}),(A,F)=>a.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(i),class:"cl-plaintext-value"},e.toDisplayString(V.value),9,Fv)):(e.openBlock(),e.createBlock(En,{key:1,ref_key:"refElDropdownLayer",ref:u,id:e.unref(i),classParent:m.value,classText:"selectTree-inText",classDropDown:p.value,placeholder:a.placeholder,isDisabled:a.disabled,isClear:a.isClear,textLabel:r.selectLabel.join(","),textArrowDirection:a.arrowDirection,appendContainer:a.appendContainer,onOpenBeforeCallback:a.onOpenBefore,onOnChangeOpen:R,onOnClear:C},{textExtend:e.withCtx(()=>[a.multiple?(e.openBlock(),e.createElementBlock("span",Pv,[a.multiple&&r.selectLabel.length>1?(e.openBlock(),e.createBlock(Pt,{key:0,num:r.selectLabel.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),dropdown:e.withCtx(()=>[e.createElementVNode("div",Rv,[e.createElementVNode("div",Hv,[e.createVNode(nn,{placeholder:a.searchPlaceholder,onOnChange:b},null,8,["placeholder"])]),e.createElementVNode("div",zv,[e.createVNode(Va,{ref_key:"refElList",ref:c,list:r.filterList,value:r.selectIds,"onUpdate:value":F[0]||(F[0]=P=>r.selectIds=P),multiple:a.multiple,textFormat:a.showDropDownTextFormat,isSingleSelectParent:a.isSingleSelectParent,isOutMerge:a.isOutMerge,parentKey:a.parentKey,topParentValue:a.topParentValue,searchOpenParentIds:r.searchOpenParentIds,searchFoldParentIds:r.searchFoldParentIds,searchKeyword:r.searchKeyword,highlightMode:a.highlightMode,highlightColor:a.highlightColor,onOnChange:v,onOnInit:k},null,8,["list","value","multiple","textFormat","isSingleSelectParent","isOutMerge","parentKey","topParentValue","searchOpenParentIds","searchFoldParentIds","searchKeyword","highlightMode","highlightColor"])])])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","appendContainer","onOpenBeforeCallback"]))}}),Uv={key:0,class:"sideNav-menu-iconOperate"},si=e.defineComponent({name:"ClSideMenuMenu",__name:"Menu",props:{activeId:{type:String,default:""},activePId:{type:Array,default:()=>[]},openId:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},emits:{onClick:a=>!0},setup(a,{emit:l}){const o=l,t=`sideMenu-${n.getRandom(5)}`,s=u=>!!(u&&u.list&&u.list.length>0),i=u=>{o("onClick",u)};return(u,c)=>(e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,(r,d)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${r.id}-${d}`,class:e.normalizeClass({"sideNav-menu-submenu":s(r),"sideNav-menu-active":!s(r)&&a.activeId===r.id,"sideNav-menu-parent-active":s(r)&&a.activePId.includes(r.id)})},[e.createVNode(Ot,{"aria-haspopup":s(r)?"true":void 0,"aria-expanded":s(r)?String(a.openId.includes(r.id)):void 0,"aria-current":s(r)?void 0:a.activeId===r.id?"page":void 0,onOnClick:m=>i(r)},{default:e.withCtx(()=>[s(r)?(e.openBlock(),e.createElementBlock("span",Uv,[e.createVNode(fe,{name:"caret-right",class:e.normalizeClass(["icon-rotate",{"rotate-90":a.openId.includes(r.id)}])},null,8,["class"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",null,e.toDisplayString(r.name),1)]),_:2},1032,["aria-haspopup","aria-expanded","aria-current","onOnClick"]),s(r)?(e.openBlock(),e.createBlock(bn,{key:0},{default:e.withCtx(()=>[a.openId.includes(r.id)?(e.openBlock(),e.createBlock(si,{key:0,activeId:a.activeId,activePId:a.activePId,openId:a.openId,list:r.list,onOnClick:i},null,8,["activeId","activePId","openId","list"])):e.createCommentVNode("",!0)]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),Jv=["id"],Kv={class:"sideNav-wrapper sideNav-wrapper-rowMult"},ii=e.defineComponent({name:"ClSideMenu",inheritAttrs:!1,__name:"Index",props:{id:String,className:String,active:String,list:{type:Array,required:!0,default:()=>[]}},emits:{onChangeMenu:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.reactive({isMenushrink:!1,menuActive:n.isNonEmptyString(o.active)?o.active:"",menuActiveParent:[],menuOpenPid:[]}),u=e.ref([]),c={menuJson:{}},r=e.computed(()=>{let w={"panel-side-menu":!0};return w=n.getJsonMerge(w,ue.getClassNameJson(o.className)),w}),d=w=>{t("onChangeMenu",w)},m=()=>{const w=n.getTreeLastParent(i.menuActive,c.menuJson,!1);let E=[];return w.length>0&&(E=w.map(M=>M.id)),i.menuActiveParent=E,E},p=(w,E,M,V=0)=>{V>50||w.forEach(I=>{if(n.isEmpty(I))return;const{id:N,name:x}=I;if(!n.isNonEmptyString(N)||!n.isUndefined(M[N]))return;const L=I.list,D=n.isArray(L);!D&&!n.isUndefined(L)&&(I.list=void 0),M[N]={id:N,name:x,parentId:E,hasChild:D&&L&&L.length>0},D&&L&&L.length>0&&p(L,N,M,V+1)})},f=w=>w.filter(E=>n.isNonEmptyString(E?.id)).map(E=>{const M=E.list;return n.isArray(M)&&M&&M.length>0&&(E.list=f(M)),E}),h=()=>{const w=f(n.getJsonClone(o.list,!0));if(n.isEmpty(w)){i.menuActive="",i.menuActiveParent=[],i.menuOpenPid=[],c.menuJson={},u.value=[];return}const E=c.menuJson,M=i.menuOpenPid.slice(),V=i.menuActive,I={};p(w,"",I);let N=V;(!n.isNonEmptyString(N)||n.isUndefined(I[N]))&&(N=n.isNonEmptyString(w[0].id)?w[0].id:"");const x=[];Object.keys(I).forEach(L=>{I[L].hasChild&&(n.isUndefined(E[L])||M.includes(L))&&x.push(L)}),c.menuJson=I,u.value=w,i.menuActive=N,i.menuOpenPid=x,N!==V?(m(),n.isNonEmptyString(N)&&d(N)):m()},g=()=>{h()};e.onMounted(()=>{g()}),e.watch(()=>o.list,()=>{h()},{deep:!0}),e.watch(()=>o.active,w=>{if(n.isNonEmptyString(w)&&!n.isUndefined(c.menuJson[w])){i.menuActive=w;const E=m();E.length>0&&E.forEach(M=>{i.menuOpenPid.indexOf(M)===-1&&i.menuOpenPid.push(M)})}});const S=()=>{i.isMenushrink=!i.isMenushrink},T=w=>{const E=w.id;if(n.isNonEmptyString(E))if(w.list&&w.list.length>0){const M=i.menuOpenPid.indexOf(E);M>-1?i.menuOpenPid.splice(M,1):i.menuOpenPid.push(E)}else{if(i.menuActive===E)return;i.menuActive=E,m(),d(i.menuActive)}};return(w,E)=>i.menuActive.length>0?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,id:e.unref(s),class:r.value},w.$attrs),[e.createElementVNode("div",{class:e.normalizeClass({"sideNav-menu":!0,"sideNav-visible":!i.isMenushrink})},[e.createVNode(si,{list:u.value,activeId:i.menuActive,activePId:i.menuActiveParent,openId:i.menuOpenPid,onOnClick:T},null,8,["list","activeId","activePId","openId"])],2),e.createElementVNode("div",Kv,[e.createVNode(Ot,{className:"sideNav-menu-footer-bar","aria-label":"展开或收起菜单","aria-expanded":String(!i.isMenushrink),onOnClick:S},{default:e.withCtx(()=>[e.createVNode(fe,{name:i.isMenushrink?"angle-double-right":"angle-double-left"},null,8,["name"])]),_:1},8,["aria-expanded"]),e.renderSlot(w.$slots,"default")])],16,Jv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),ri=a=>{if(n.isNonEmptyString(a)){if(a.indexOf("clIcon-")===0){const l=a.substring(7);return n.isNonEmptyString(l)&&/^[a-zA-Z0-9-]+$/.test(l)?{name:l,className:""}:{name:"question-circle",className:""}}return/^clicon/i.test(a)?{name:"question-circle",className:""}:/^[a-zA-Z0-9-]+$/.test(a)?{name:a,className:""}:{name:"",className:a}}return{name:"question-circle",className:""}},Wv=["aria-sort"],jv=e.defineComponent({name:"ClTableTh",directives:{cltooltip:dt},__name:"Th",props:{isOrder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isUseScrollX:{type:Boolean,default:!1},thIndex:{type:Number,default:0},thInfo:{type:Object,default:()=>({})},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickOrderBy:(a,l,o)=>!0},setup(a,{emit:l}){const o=a,t=l,s=e.computed(()=>ri(o.thInfo?.tipIcon)),i=e.computed(()=>n.isObject(o.thInfo)&&!n.isEmpty(o.thInfo)?o.thInfo:{}),u=e.computed(()=>!o.isOrder||n.isEmpty(i.value)?!1:n.isEmpty(i.value.sort)?!0:i.value.sort===!0),c=e.computed(()=>u.value&&!o.disabled),r=e.computed(()=>{const T=o.thInfo?.tipMsg;if(!n.isNonEmptyString(T))return;const w=n.removeHTMLTags(T);return n.isNonEmptyString(w)?w:void 0}),d=e.computed(()=>{if(!u.value)return"";const T=n.isEmpty(o.orderSort)?[]:o.orderSort;return T.length>0&&T[0]===o.thIndex?T.length===2?T[1]==="asc"||T[1]==="desc"?T[1]:"none":T.length===1?"desc":"none":"none"}),m=e.computed(()=>{if(d.value==="asc")return"ascending";if(d.value==="desc")return"descending";if(d.value==="none")return"none"}),p=e.computed(()=>{const T={},w=i.value;if(!n.isEmpty(w.width)&&g(w.width)&&(T[`${o.widthClassPrefix}${w.width}`]=!0),!n.isEmpty(w.widthMin)&&g(w.widthMin)&&o.isUseScrollX&&(T[`${o.widthMinClassPrefix}${w.widthMin}`]=!0),(o.fixedLeftIndex>-1||o.fixedRightIndex>-1)&&(T["th-hidden"]=o.fixedLeftIndex>-1&&o.thIndex>o.fixedLeftIndex||o.fixedRightIndex>-1&&o.thIndex<o.fixedRightIndex),u.value){T["th-sort"]=!0,T["sort-none"]=!0,T["th-sort-near"]=w.sortNear===!0;const M=d.value;(M==="asc"||M==="desc")&&(T[`sort-${M}`]=!0,T["sort-none"]=!1)}n.isNonEmptyString(w.tipMsg)&&(T["th-tip"]=!0,T["th-tip-sideAlign"]=w.tipSideAlign===!0),o.disabled&&(T["th-disabled"]=!0),n.isNonEmptyString(w.textAlign)&&n.isExistValue(["left","center","right"],w.textAlign)&&(T[`text-${w.textAlign}`]=!0);let E=T;return E=n.getJsonMerge(E,ue.getClassNameJson(w.className)),E=n.getJsonMerge(E,ue.getClassNameJson(w.classTh)),E}),f=e.computed(()=>{const T={};if(!o.isInlineWidth)return T;const w=i.value;return!n.isEmpty(w.width)&&g(w.width)&&(T.width=n.isFinite(Number(w.width))?`${Number(w.width)}px`:`${w.width}`),!n.isEmpty(w.widthMin)&&g(w.widthMin)&&o.isUseScrollX&&(T.minWidth=n.isFinite(Number(w.widthMin))?`${Number(w.widthMin)}px`:`${w.widthMin}`),T}),h=(T,w)=>{t("onClickOrderBy",T,o.thIndex,w)},g=T=>n.isString(T)||n.getTypeof(T)==="number"&&n.isFinite(T),S=()=>{if(c.value){const T=d.value==="desc"?"asc":"desc";h(i.value,T)}};return(T,w)=>{const E=e.resolveDirective("cltooltip");return!e.unref(n).isBoolean(a.thInfo?.visible)||a.thInfo.visible?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(p.value),style:e.normalizeStyle(f.value),scope:"col","aria-sort":m.value},[e.createElementVNode("span",{class:"th-title",onClick:S},[e.renderSlot(T.$slots,"default")]),e.unref(n).isNonEmptyString(a.thInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:s.value.name,className:s.value.className,class:"th-tip-icon",role:"img","aria-label":r.value},null,8,["name","className","aria-label"])),[[E,{html:a.thInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),d.value!==""?(e.openBlock(),e.createElementBlock("i",{key:2,class:"tr-sort-icon","aria-hidden":"true",onClick:S})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],14,Wv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),ia=e.defineComponent({name:"ClTableTd",directives:{cltooltip:dt},__name:"Td",props:{tdIndex:{type:Number,default:0},tdInfo:{type:Object,default:()=>({})},isOrder:{type:Boolean,default:!1},isUseScrollX:{type:Boolean,default:!1},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},useType:{type:String,default:"td",validator:a=>["td","total"].indexOf(a)>-1}},setup(a){const l=a,o=e.computed(()=>ri(l.tdInfo?.tipIcon)),t=e.computed(()=>n.isEmpty(l.tdInfo)?{}:l.tdInfo),s=e.computed(()=>{const r=l.tdInfo?.tipMsg;if(!n.isNonEmptyString(r))return;const d=n.removeHTMLTags(r);return n.isNonEmptyString(d)?d:void 0}),i=e.computed(()=>{const r={},d=t.value;!n.isEmpty(d.width)&&c(d.width)&&(r[`${l.widthClassPrefix}${d.width}`]=!0),!n.isEmpty(d.widthMin)&&c(d.widthMin)&&l.isUseScrollX&&(r[`${l.widthMinClassPrefix}${d.widthMin}`]=!0),(l.fixedLeftIndex>-1||l.fixedRightIndex>-1)&&(r["td-hidden"]=l.fixedLeftIndex>-1&&l.tdIndex>l.fixedLeftIndex||l.fixedRightIndex>-1&&l.tdIndex<l.fixedRightIndex),l.isOrder&&(n.isEmpty(d.sort)||d.sort===!0)&&(r["td-sort"]=!0,r["td-sort-near"]=d.sortNear===!0),n.isNonEmptyString(d.tipMsg)&&(r["td-tip"]=!0,r["td-tip-sideAlign"]=d.tipSideAlign===!0),n.isNonEmptyString(d.textAlign)&&n.isExistValue(["left","center","right"],d.textAlign)&&(r[`text-${d.textAlign}`]=!0);let m=r;return m=n.getJsonMerge(m,ue.getClassNameJson(d.className)),l.useType==="td"?m=n.getJsonMerge(m,ue.getClassNameJson(d.classTd)):l.useType==="total"&&(m=n.getJsonMerge(m,ue.getClassNameJson(d.classTotal))),m}),u=e.computed(()=>{const r={};if(!l.isInlineWidth)return r;const d=t.value;return!n.isEmpty(d.width)&&c(d.width)&&(r.width=n.isFinite(Number(d.width))?`${Number(d.width)}px`:`${d.width}`),!n.isEmpty(d.widthMin)&&c(d.widthMin)&&l.isUseScrollX&&(r.minWidth=n.isFinite(Number(d.widthMin))?`${Number(d.widthMin)}px`:`${d.widthMin}`),r}),c=r=>n.isString(r)||n.getTypeof(r)==="number"&&n.isFinite(r);return(r,d)=>{const m=e.resolveDirective("cltooltip");return!e.unref(n).isBoolean(a.tdInfo?.visible)||a.tdInfo.visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(i.value),style:e.normalizeStyle(u.value)},[e.renderSlot(r.$slots,"default"),e.unref(n).isNonEmptyString(a.tdInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(fe,{key:0,name:o.value.name,className:o.value.className,class:"td-tip-icon",role:"img","aria-label":s.value},null,8,["name","className","aria-label"])),[[m,{html:a.tdInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),Yv=["aria-hidden"],qv={key:0},Xv={key:0},Jo=99999999,Ko=e.defineComponent({name:"ClTableHead",__name:"Head",props:{columns:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isShowTotal:{type:Boolean,default:!1},totalInfo:{type:Object,default:()=>({})},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isShowCheckboxAll:{type:Boolean,default:!0},checkboxAllValue:{type:Boolean,default:!1},fixedType:{type:String,default:"",validator:a=>["","left","right"].indexOf(a)>-1},fixedLeftIndex:{type:Number,default:-1,validator:a=>a>=-1},fixedRightIndex:{type:Number,default:-1,validator:a=>a>=-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickAll:()=>!0,onClickOrderBy:(a,l,o)=>!0,onHoverIn:a=>!0,onHoverOut:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useTemplateRef("refElTable"),u=e.computed(()=>({"table-default":!0,"table-base":!0})),c=e.computed(()=>{const V={};return n.isEmpty(t.fixedType)?t.isUseScrollX&&n.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(V.minWidth=t.minWidth):n.isNonEmptyString(t.width)&&t.width!=="none"&&(V.width=t.width),V}),r=V=>V?n.isUndefined(V.title)?n.isUndefined(V.data)?"":V.data:V.title:"",d=(V,I)=>n.isUndefined(V)||!I?"":n.isEmpty(I.format)?V:n.getValueByFormat(V,I.format??"",I.formatExt),m=(V,I)=>!V||!I?"":d(V[I.data],I);e.watch(()=>t.isShowTotal,V=>{!V&&t.hoverIndex===Jo&&s("onHoverOut")});const p=()=>{s("onClickAll")},f=(V,I,N)=>{s("onClickOrderBy",V,I,N)},h=()=>{s("onHoverIn",Jo)},g=()=>{s("onHoverOut")};return l({getOffsetHeight:()=>i.value?i.value.offsetHeight:0,getRcWidth:()=>{let V=0;if((t.isShowRadio||t.isShowCheckbox)&&i.value){const I=i.value.querySelector(".th-rc");I&&(V=I.clientWidth)}return V},getPaddingLr:()=>{let V=0;if(!i.value)return V;const I=i.value.querySelectorAll("th:not(.th-rc)");for(let N=0;N<I.length;N++){const x=ue.getStyle(I[N]),L=parseFloat(x.paddingLeft),D=parseFloat(x.paddingRight),O=n.isFinite(L)?L:0,X=n.isFinite(D)?D:0;V+=O+X}return V},getElTh:()=>i.value?i.value.querySelectorAll("th"):[],getTotalHeight:()=>{let V=0;if(t.isShowTotal&&i.value){const I=i.value.querySelector(".tr-total");I&&(V=I.clientHeight)}return V}}),(V,I)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(u.value),style:e.normalizeStyle(c.value),"aria-hidden":!e.unref(n).isEmpty(a.fixedType),ref_key:"refElTable",ref:i},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[a.isShowRadio||a.isShowCheckbox?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass({"th-rc":!0,"th-hidden":a.fixedRightIndex>-1}),scope:"col"},[a.isShowCheckbox&&a.isShowCheckboxAll?(e.openBlock(),e.createBlock(ft,{key:0,forId:e.unref(n).isNonEmptyString(a.keyIndex)?`${a.keyIndex}_${a.fixedType}_cb_all`:void 0,value:a.checkboxAllValue,disabled:a.disabled,onOnChange:p},null,8,["forId","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,(N,x)=>(e.openBlock(),e.createBlock(jv,{key:`${a.keyIndex}_${a.fixedType}_head_th_${x}`,thInfo:N,thIndex:x,isOrder:a.isOrder,disabled:a.disabled,orderSort:a.orderSort,isUseScrollX:a.isUseScrollX,fixedLeftIndex:a.fixedLeftIndex,fixedRightIndex:a.fixedRightIndex,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickOrderBy:f},{default:e.withCtx(()=>[e.renderSlot(V.$slots,`th_${N?.data??""}`,{data:N},()=>[e.createElementVNode("span",null,e.toDisplayString(r(N)),1)])]),_:2},1032,["thInfo","thIndex","isOrder","disabled","orderSort","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))])]),a.isShowTotal?(e.openBlock(),e.createElementBlock("tbody",qv,[e.createElementVNode("tr",{class:e.normalizeClass({"tr-total":!0,"tr-hover":a.hoverIndex===Jo}),onMouseenter:h,onMouseleave:g},[a.isShowRadio||a.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",Xv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,(N,x)=>(e.openBlock(),e.createBlock(ia,{key:`${a.keyIndex}_${a.fixedType}_body_total_td_${x}`,isOrder:a.isOrder,tdIndex:x,tdInfo:N,isUseScrollX:a.isUseScrollX,fixedLeftIndex:a.fixedLeftIndex,fixedRightIndex:a.fixedRightIndex,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,useType:"total"},{default:e.withCtx(()=>[e.renderSlot(V.$slots,`total_${N?.data??""}`,{data:a.totalInfo},()=>[e.createTextVNode(e.toDisplayString(m(a.totalInfo,N)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],34)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,Yv))}}),Gv=["id"],Qv=e.defineComponent({name:"ClTableTdChecked",__name:"TdChecked",props:{id:String,value:{type:Boolean,default:!1},className:String,disabled:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},keyIndex:String,info:{type:Object,default:()=>({})}},setup(a){const l=a,o=l.id,t=e.computed(()=>r("cb")),s=e.computed(()=>r("rd")),i=e.computed(()=>l.value===!0),u=e.computed(()=>l.disabled===!0||n.isBoolean(l.info?.isDisabled)&&l.info.isDisabled),c=e.computed(()=>{const d={"th-rc":!0};return n.getJsonMerge(d,ue.getClassNameJson(l.className))}),r=d=>n.isNonEmptyString(l.keyIndex)?`${l.keyIndex}_${d}`:void 0;return(d,m)=>a.isShowRadio||a.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",{key:0,id:e.unref(o),class:e.normalizeClass(c.value)},[a.isShowCheckbox?(e.openBlock(),e.createBlock(ft,{key:0,forId:t.value,value:i.value,disabled:u.value},null,8,["forId","value","disabled"])):a.isShowRadio?(e.openBlock(),e.createBlock(ba,{key:1,forId:s.value,name:s.value,value:i.value,disabled:u.value},null,8,["forId","name","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,Gv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),Zv=["onClick","onMouseenter"],ey=["onMouseenter"],ty=["colspan"],ny={key:0,class:"panel-elastic-load",role:"status","aria-live":"polite"},oy={class:"elastic-load-container"},ay=["data-elastic-id"],ly=["onMouseenter"],sy=["colspan"],iy={class:"panel-elastic-load",role:"status","aria-live":"polite"},ry={class:"elastic-load-container"},cy=["onMouseenter"],uy={key:2},dy=["colspan"],my={class:"panel-table-empty",role:"status"},Wo=e.defineComponent({name:"ClTableBody",__name:"Body",props:{columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},isOrder:{type:Boolean,default:!1},selectValue:{type:Array,default:()=>[]},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},hoverElasticIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},colspanCount:{type:Number,default:1},isRunLoading:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},elasticOpen:{type:Array,default:()=>[]},elasticLoading:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:a=>["default","sameDataStructure"].indexOf(a)>-1},elasticData:{type:Object,default:()=>({})},fixedType:{type:String,default:""},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String},emits:{onClickTr:(a,l,o)=>!0,onHoverIn:(a,l)=>!0,onHoverOut:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=e.useTemplateRef("refElTable"),r=e.ref(new Set),d=e.computed(()=>new Set((Array.isArray(t.selectValue)?t.selectValue:[]).filter(k=>!n.isUndefined(k)).map(k=>String(k)))),m=e.computed(()=>new Set((Array.isArray(t.elasticLoading)?t.elasticLoading:[]).filter(k=>!n.isUndefined(k)).map(k=>String(k)))),p=e.computed(()=>new Set((Array.isArray(t.elasticOpen)?t.elasticOpen:[]).filter(k=>!n.isUndefined(k)).map(k=>String(k)))),f=e.computed(()=>{const k=Number(t.colspanCount);return n.isFinite(k)&&k>=1?Math.floor(k):1}),h=e.computed(()=>({"table-default":!0,"table-base":!0,"table-empty":n.isEmpty(t.list)})),g=e.computed(()=>{const k={};return n.isNonEmptyString(t.fixedType)?n.isNonEmptyString(t.width)&&t.width!=="none"&&(k.width=t.width):t.isUseScrollX&&n.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(k.minWidth=t.minWidth),k}),S=(k,b,v)=>{s("onClickTr",k,b,v)},T=(k,b=-1)=>{s("onHoverIn",k,b)},w=()=>{s("onHoverOut")},E=(k,b)=>n.isEmpty(k)||!b?"":n.isEmpty(b.format)?k:n.getValueByFormat(k,b.format??"",b.formatExt),M=k=>{const b=t.elasticData||{};return Object.prototype.hasOwnProperty.call(b,k)?b[k]:[]},V=k=>!n.isEmpty(k)&&!n.isEmpty(k.id)&&d.value.has(k.id.toString()),I=k=>!n.isEmpty(k)&&!n.isEmpty(k.id)&&m.value.has(k.id.toString());return l({getWidth:()=>c.value?c.value.clientWidth:0,getHeight:()=>c.value?c.value.clientHeight:0,setElasticWidth:()=>{if(!c.value)return;const k=c.value.parentNode;if(!k)return;const b=c.value.querySelectorAll(".panel-elastic-load"),v=k.clientWidth;for(let _=0;_<b.length;_++)b[_].style.width=`${v}px`},setElasticHeight:k=>{if(!c.value)return;const b=c.value.querySelector(`[data-elastic-id="${CSS.escape(k)}"]`);if(b){const v=b.parentNode;if(v){b.style.height="",v.style.height="";const y=`${b.clientHeight}px`;b.style.height=y,v.style.height=y}const _=r.value;_.has(k)||(r.value=new Set(_).add(k))}},removeElasticAbsolute:k=>{if(r.value.has(k)){const b=new Set(r.value);b.delete(k),r.value=b}},clearElasticAbsolute:()=>{r.value.size>0&&(r.value=new Set)},setElasticLoadLeft:k=>{if(!c.value)return;const b=c.value.querySelectorAll(".panel-elastic-load"),v=n.isFinite(k)?Math.max(0,k):0;for(let _=0;_<b.length;_++)b[_].style.left=`${v}px`},setEmptyWidth:()=>{if(!c.value)return;const k=c.value.querySelector(".panel-table-empty");if(k){const b=c.value.parentNode;if(b){const v=b.clientWidth;k.style.width=`${v}px`}}},setEmptyLeft:k=>{const b=c.value?c.value.querySelector(".panel-table-empty"):null;if(b){const v=n.isFinite(k)?Math.max(0,k):0;b.style.left=`${v}px`}}}),(k,b)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(h.value),style:e.normalizeStyle(g.value),ref_key:"refElTable",ref:c},[e.createElementVNode("tbody",null,[e.unref(n).isEmpty(a.list)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.list,(v,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${a.keyIndex}_${a.fixedType}_body_tr_${_}`},[e.createElementVNode("tr",{class:e.normalizeClass({odd:a.isStriped&&_%2===0,"tr-customInterval-odd":a.isStriped&&a.trIntervalNum>0&&Math.floor(_/a.trIntervalNum)%2===0,"tr-customInterval-even":a.isStriped&&a.trIntervalNum>0&&Math.floor(_/a.trIntervalNum)%2===1,"tr-disabled":e.unref(n).isBoolean(v?.isDisabled)&&v.isDisabled,"tr-selected":V(v),"tr-hover":a.hoverIndex===_}),onClick:y=>S(y,v,_),onMouseenter:y=>T(_),onMouseleave:w},[a.isShowRadio||a.isShowCheckbox?(e.openBlock(),e.createBlock(Qv,{key:0,keyIndex:`${a.keyIndex}_${a.fixedType}_body_tr_${_}`,isShowRadio:a.isShowRadio,isShowCheckbox:a.isShowCheckbox,value:V(v),info:v,disabled:a.disabled},null,8,["keyIndex","isShowRadio","isShowCheckbox","value","info","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,(y,B)=>(e.openBlock(),e.createBlock(ia,{key:`${a.keyIndex}_${a.fixedType}_body_tr_${_}_td_${B}`,isOrder:a.isOrder,tdIndex:B,tdInfo:y,isUseScrollX:a.isUseScrollX,fixedLeftIndex:a.fixedLeftIndex,fixedRightIndex:a.fixedRightIndex,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(k.$slots,`td_${y?.data??""}`,{data:v,trIndex:_},()=>[e.createTextVNode(e.toDisplayString(E(v&&y?v[y.data]:void 0,y)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,Zv),a.isElastic&&!e.unref(n).isEmpty(v?.id)&&p.value.has(v.id.toString())?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.elasticType==="default"?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":a.hoverIndex===_}),onMouseenter:y=>T(_),onMouseleave:w},[e.createElementVNode("td",{colspan:f.value,class:e.normalizeClass({"td-elastic-load":I(v)})},[I(v)?(e.openBlock(),e.createElementBlock("div",ny,[e.createElementVNode("div",oy,[e.createVNode(He,{theme:"circleBubble",size:"large"})])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["elastic-container",{"elastic-container-absolute":r.value.has(v.id.toString())}]),"data-elastic-id":v.id},[e.renderSlot(k.$slots,"tr_elastic_children",{data:v,trIndex:_})],10,ay))],10,ty)],42,ey)):a.elasticType==="sameDataStructure"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[I(v)?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":a.hoverIndex===_}),onMouseenter:y=>T(_),onMouseleave:w},[e.createElementVNode("td",{colspan:f.value,class:"td-elastic-load"},[e.createElementVNode("div",iy,[e.createElementVNode("div",ry,[e.createVNode(He,{theme:"circleBubble",size:"large"})])])],8,sy)],42,ly)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(M(v.id.toString()),(y,B)=>(e.openBlock(),e.createElementBlock("tr",{key:`${a.keyIndex}_${a.fixedType}_body_tr_${_}_elastic_${B}`,class:e.normalizeClass({"tr-elastic-sameDataStructure":!0,odd:a.isStriped&&B%2===0,"tr-disabled":e.unref(n).isBoolean(y?.isDisabled)&&y.isDisabled,"tr-hover":a.hoverElasticIndex===B&&a.hoverIndex===_}),onMouseenter:A=>T(_,B),onMouseleave:w},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,(A,F)=>(e.openBlock(),e.createBlock(ia,{key:`${a.keyIndex}_${a.fixedType}_body_tr_${_}_elastic_${B}_td_${F}`,isOrder:a.isOrder,tdIndex:F,tdInfo:A,isUseScrollX:a.isUseScrollX,fixedLeftIndex:a.fixedLeftIndex,fixedRightIndex:a.fixedRightIndex,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(k.$slots,`td_elastic_${A?.data??""}`,{data:y,trIndex:_,trElasticInx:B},()=>[e.createTextVNode(e.toDisplayString(E(y&&A?y[A.data]:void 0,A)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,cy))),128))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128)),e.unref(n).isEmpty(a.list)&&!a.isRunLoading&&!e.unref(n).isNonEmptyString(a.fixedType)?(e.openBlock(),e.createElementBlock("tr",uy,[e.createElementVNode("td",{colspan:f.value,class:"td-empty"},[e.createElementVNode("div",my,e.toDisplayString(e.unref(n).isNonEmptyString(a.emptyText)?a.emptyText:e.unref(i).noResultsText),1)],8,dy)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],6))}});function py(a){if(!Array.isArray(a))return[];const l=[];return a.forEach(o=>{if(n.isEmpty(o))return;const t=o;!(n.isBoolean(t.isDisabled)?t.isDisabled:!1)&&!n.isEmpty(t.id)&&l.push(String(t.id))}),l}function fy(a,l,o=!1){if(!Array.isArray(a)||a.length===0)return[];const t=[];return a.forEach(s=>{const i=String(s);l.includes(i)&&t.push(i)}),o&&t.length>1?[t[0]]:t}function hy(a,l){return l.length>0&&l.length===a.length}function gy(a,l){return a.filter(o=>!l.includes(o))}const vy=["id"],yy={class:"table-wrapper"},ky={key:0,class:"table-fixed-column-left"},Sy={key:2,class:"table-fixed-column-right"},by={key:0,class:"table-scroll-occupy-container"},wy={key:2,class:"table-fixed-column-scrollX"},Cy={key:4,class:"table-fixed-head-load"},Ey={key:0,class:"table-fixed-column-left"},By={key:2,class:"table-fixed-column-right"},xy={key:1,class:"table-fixed-column-scrollX"},Ty={key:2,class:"table-footer-wrapper"},Dy={key:0,class:"table-load",role:"status","aria-live":"polite"},Iy={class:"table-load-wrapper"},Tl=15,_y=30,Ny=180,Vy=50,Dl=300,ci=e.defineComponent({name:"ClTable",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},totalLength:Number,totalData:{type:Object,default:()=>({})},isServer:{type:Boolean,default:!0},isParamTriggerServer:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!0},loadTheme:{type:String,default:"circleBubble"},loadColor:{type:String,default:"var(--cl-primary, #1088f0)"},isShowInitLoadIng:{type:Boolean,default:!0},isPaginate:{type:Boolean,default:!0},pageOffset:{type:Number,default:0},isPaginateLimit:{type:Boolean,default:!0},paginateLimit:{type:Number,default:10},paginateLimitData:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},selectValue:{type:[String,Number],default:""},checkedRowType:{type:String,default:"none",validator:a=>["none","radio","checkbox"].indexOf(a)>-1},isShowCheckboxAll:{type:Boolean,default:!0},isScrollX:{type:Boolean,default:!1},isScrollXBottom:{type:Boolean,default:!1},isFixedHead:{type:Boolean,default:!1},scrollY:{type:Number,default:-1},fixedColumnLeftIndex:{type:Number,default:-1},fixedColumnRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},isClickRowLinkage:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},isElasticLoad:{type:Boolean,default:!0},rowClickKeyInvalid:{type:String,default:".tr-click-invalid"},rowClickKeyElastic:{type:String,default:".tr-click-elastic"},elasticIconCls:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:a=>["default","sameDataStructure"].indexOf(a)>-1},elasticData:{type:Object,default:()=>({})},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String,isHead:{type:Boolean,default:!0}},emits:{onGetData:a=>!0,onClickRow:(a,l,o)=>!0,onClickElastic:(a,l,o,t,s)=>!0,onChangeChecked:(a,l,o)=>!0,onChangeParams:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useSlots(),u=ce=>{let ge=[];if(t.isOrder){const ye=n.isEmpty(ce)?[]:ce;let we=[0,"desc"];const Be=n.isEmpty(t.columns)?[]:t.columns;for(let xe=0;xe<Be.length;xe+=1){const Le=Be[xe];if(n.isEmpty(Le))continue;const Xe=Le.sort===void 0||Le.sort===null?!0:Le.sort===!0,We=n.isBoolean(Le.visible)?Le.visible:!0;if(Xe&&We){we=[xe,"desc"];break}}if(ye.length===0)ge=we;else{const xe=Be[ye[0]];if(n.isEmpty(xe))ge=we;else{const Le=xe.sort===void 0||xe.sort===null?!0:xe.sort===!0,Xe=n.isBoolean(xe.visible)?xe.visible:!0,We=Array.isArray(ye)?ye[0]:void 0,_t=Array.isArray(ye)&&(ye[1]==="asc"||ye[1]==="desc")?ye[1]:void 0;ge=Le&&Xe&&!n.isUndefined(We)?[We,_t??"desc"]:we}}}return ge},c=()=>{let ce=1;return t.paginateLimit>0&&t.pageOffset>=0&&(ce=Math.floor(t.pageOffset/t.paginateLimit)+1),ce},r=u(t.orderSort),d={dataJson:n.getJsonByList(t.list),changeNewPaginate:{pages:c(),limit:t.paginateLimit},changeNewSort:{orderIndex:r[0],orderBy:r[1]},sortLocalData:[],scrollBody:{left:0},scrollHead:{left:0},resizeEvent:null,timerBody:null,pendingCanceled:!1},m={observerBodyScrollY:null},p=`table-${n.getRandom(5)}`,f=t.id,h=e.useTemplateRef("refElHeadWrapper"),g=e.useTemplateRef("refElHeadContainer"),S=e.useTemplateRef("refElHeadMain"),T=e.useTemplateRef("refElHeadTable"),w=e.useTemplateRef("refElHeadFixedScrollX"),E=e.useTemplateRef("refElBodyWrapper"),M=e.useTemplateRef("refElBodyContainer"),V=e.useTemplateRef("refElBodyMain"),I=e.useTemplateRef("refElBodyTable"),N=e.useTemplateRef("refElBodyFixedScrollX"),x=e.reactive({isRunLoading:!1,isCheckedRadio:t.checkedRowType==="radio",isCheckedCheckbox:t.checkedRowType==="checkbox",colspanCount:0,hoverTrIndex:-1,hoverTrElasticIndex:-1,totalHeight:"0"}),L=e.ref([]),D=e.reactive({pages:d.changeNewPaginate.pages,limit:d.changeNewPaginate.limit}),O=e.ref(r),X=e.ref(!1),Q=()=>{const ce=t.selectValue;return n.isNonEmptyString(ce)?n.split(ce):n.isNumber(ce)?n.split(ce.toString()):[]},R=e.ref(Q()),C=e.reactive({open:[],loading:[]}),k=e.reactive({isShow:!1,minWidth:"auto",posType:"left"}),b=e.ref(!1),v=e.reactive({totalWidth:"0",centerWidth:"0",leftColumnLength:0,leftWidth:"0",rightColumnLength:0,rightWidth:"0"}),_=e.reactive({isShow:!1,width:"auto",height:"auto"}),y=e.reactive({headHeight:0});let B=null,A=null,F=0;const P=e.computed(()=>Object.keys(i).filter(ce=>ce.indexOf("th_")===0)),H=e.computed(()=>{const ce=Object.keys(i).filter(ge=>ge.indexOf("td_")===0&&ge.indexOf("td_elastic_")!==0);return t.isElastic&&ce.push("tr_elastic_children"),ce}),$=e.computed(()=>Object.keys(i).filter(ce=>ce.indexOf("total_")===0)),z=e.computed(()=>Object.keys(i).filter(ce=>ce.indexOf("td_elastic_")===0)),oe=e.computed(()=>t.isShowCheckboxAll&&L.value.length>0),Z=e.computed(()=>!n.isEmpty(t.totalData)&&L.value.length>0),W=e.computed(()=>t.isServer?n.isFinite(t.totalLength)?t.totalLength:0:n.isFinite(t.totalLength)?t.totalLength:t.list?.length||0),Y=e.computed(()=>t.isScrollX||t.isScrollXBottom),q=e.computed(()=>t.scrollY>0),J=e.computed(()=>t.isHead&&t.fixedColumnLeftIndex>-1&&Y.value),U=e.computed(()=>t.isHead&&t.fixedColumnRightIndex>-1&&Y.value&&t.fixedColumnRightIndex>t.fixedColumnLeftIndex+1),ae=e.computed(()=>{const ce={"panel-table":!0,"table-disabled":t.disabled};return x.isRunLoading&&(ce["table-loading"]=!0),n.osType().isMobile&&(ce["table-mob"]=!0),n.getJsonMerge(ce,ue.getClassNameJson(t.className))}),ee=e.computed(()=>{const ce={"table-head-wrapper":!0,"table-scrollY":q.value,"table-scroll-occupy-y":b.value};return _.isShow&&(ce["table-fixed-head"]=!0),ce}),G=e.computed(()=>{const ce={"table-head-container":!0};return t.isScrollX&&(ce["table-scrollX"]=!0),(J.value||U.value)&&(ce["table-fixed-column"]=!0,k.isShow?ce[`table-scrollX-${k.posType}`]=!0:ce["table-scrollX-none"]=!0),ce}),ne=e.computed(()=>{const ce={"table-body-wrapper":!0,"table-scrollY":q.value,"table-scrollX":t.isScrollX,"table-scrollX-bottom":k.isShow};return ce["table-scroll-borderT0"]=k.isShow&&t.isScrollX,(J.value||U.value)&&(ce["table-fixed-column"]=!0,k.isShow?ce[`table-scrollX-${k.posType}`]=!0:ce["table-scrollX-none"]=!0),ce}),j=e.computed(()=>{const ce={};if((J.value||U.value)&&q.value){const ge=k.isShow?Math.max(0,t.scrollY-Tl):t.scrollY;ce.maxHeight=`${ge}px`}return ce}),te=e.computed(()=>{const ce={};return J.value||U.value||q.value&&(ce.maxHeight=`${t.scrollY}px`),ce}),re=e.computed(()=>{const ce={};return x.isRunLoading&&(ce.height=`${y.headHeight}px`),ce}),pe=ce=>{s("onGetData",ce)},ie=(ce,ge,ye,we,Be)=>{s("onClickElastic",ce,ge,ye,we,Be)},se=(ce,ge,ye=!1)=>{s("onClickRow",ce,ge,ye)},K=(ce,ge,ye)=>{s("onChangeChecked",ce,ge,ye)},le=()=>{const ce=In();s("onChangeParams",ce)},de=()=>{e.nextTick(()=>{if(S.value){const ce=S.value.querySelector("thead");ce&&(y.headHeight=ce.offsetHeight)}}),x.isRunLoading=!0},me=()=>{x.isRunLoading=!1},he=()=>{let ce=0,ge=0;(x.isCheckedRadio||x.isCheckedCheckbox)&&(ce=1,T.value&&(ge=T.value.getRcWidth())),(n.isEmpty(t.columns)?[]:t.columns).forEach(Be=>{(n.isBoolean(Be?.visible)?Be.visible:!0)&&(ce+=1,!n.isEmpty(Be)&&!n.isEmpty(Be.width)?ge+=Number(Be.width)||0:!n.isEmpty(Be)&&!n.isEmpty(Be.widthMin)&&(ge+=Number(Be.widthMin)||0))});const we=T.value?T.value.getPaddingLr():0;ge+=we,x.colspanCount=ce,Y.value&&(k.minWidth=ge>0?`${ge}px`:"auto")},Ce=()=>new Promise((ce,ge)=>{e.nextTick(()=>{try{if(!I.value){ce();return}const ye=I.value.getWidth();v.totalWidth=`${ye}px`;let we=ye;if(J.value||U.value){const Be=[],xe=[];(n.isEmpty(t.columns)?[]:t.columns).forEach((ht,ln)=>{(n.isBoolean(ht?.visible)?ht.visible:!0)&&(J.value&&ln<=t.fixedColumnLeftIndex&&Be.push(ht),U.value&&ln>=t.fixedColumnRightIndex&&xe.push(ht))});const Xe=x.isCheckedRadio||x.isCheckedCheckbox,We=T.value?T.value.getElTh():[],_t=We.length;let bt=Be.length;const an=xe.length;let ja=bt-1;const cr=_t-an;Xe&&(bt+=1,ja+=1);let wo=0,Co=0;for(let ht=0;ht<_t;ht++){const ln=We[ht];if(!ln)continue;const Eo=ln.clientWidth;ht<=ja&&(wo+=Eo),ht>=cr&&(Co+=Eo)}J.value&&(v.leftColumnLength=Be.length,v.leftWidth=`${wo}px`,we-=wo),U.value&&(v.rightColumnLength=xe.length,v.rightWidth=`${Co}px`,we-=Co)}we=Math.max(0,we),v.centerWidth=`${we}px`,e.nextTick(()=>{ce()})}catch(ye){ge(ye)}})}),be=()=>{e.nextTick(()=>{I.value&&I.value.setElasticWidth()})},Ee=ce=>{(J.value||U.value)&&I.value&&I.value.setElasticHeight(ce)},Te=ce=>{if(t.isElasticLoad){const ge=n.getArrClone(C.loading);ge.indexOf(ce)===-1&&(ge.push(ce),C.loading=ge)}},ze=ce=>{if(t.isElasticLoad){const ge=n.getArrClone(C.loading),ye=ge.indexOf(ce);ye>-1&&(ge.splice(ye,1),C.loading=ge,e.nextTick(()=>{Ee(ce)}))}},Pe=(ce,ge,ye,we)=>{if(n.isEmpty(ce)||n.isEmpty(ce.id))return;const Be=ce.id.toString(),xe=n.getArrClone(C.open),Le=xe.indexOf(Be),Xe=Le===-1;Xe?(xe.push(Be),Te(Be)):(xe.splice(Le,1),ze(Be),(J.value||U.value)&&I.value&&I.value.removeElasticAbsolute(Be)),Ht(ye,Xe);const We=n.isBoolean(we)?we:!0;C.open=xe,We&&ie(Be,ce,ge,Xe,ye),be()},St=()=>{const ce=[],ge=n.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;if(ge.length===2){const ye=L.value,we=C.open;ye.forEach(Be=>{if(!Be){ce.push(Be);return}const xe=n.getJsonClone(Be);if(!n.isEmpty(xe.id)){const Le=xe.id.toString();xe._elasticIconCls=we.indexOf(Le)>-1?ge[1]:ge[0]}ce.push(xe)})}ce.length>0&&(L.value=ce)},Ht=(ce,ge=!1)=>{if(ce){const ye=[],we=["elastic-expand","elastic-retract"];ge?ye.push("elastic-expand"):ye.push("elastic-retract");const Be=n.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;Be.length===2&&(we.push(Be[0]),we.push(Be[1]),ge?ye.push(Be[1]):ye.push(Be[0]));let xe=ue.getRemoveClass(ce.className,we.join(" "));xe=ue.getAddClass(xe,ye),ce.className=xe}},xn=()=>py(L.value),Tn=(ce=null)=>{const ge=n.isUndefined(ce)||ce===null?R.value:ce;return fy(ge,xn(),x.isCheckedRadio)},mo=()=>{if(x.isCheckedCheckbox){const ce=xn(),ge=Tn();X.value=hy(ce,ge)}},Pa=()=>{const ce=[],ge=Tn(),ye=xn(),we=gy(ye,ge);if(x.isCheckedCheckbox)ge.forEach(Be=>{const xe=d.dataJson[Be.toString()];n.isUndefined(xe)||ce.push(xe)});else if(x.isCheckedRadio&&ge.length>0){const Be=d.dataJson[ge[0]];n.isUndefined(Be)||ce.push(Be)}return{checkedIds:ge,unCheckedIds:we,checkedData:ce}},po=()=>{const ce=Pa();K(ce.checkedIds.join(","),ce.checkedData,{checkedIds:ce.checkedIds,unCheckedIds:ce.unCheckedIds})},Ra=ce=>{if(n.isEmpty(ce)||n.isEmpty(ce.id))return;const ge=ce.id.toString(),ye=R.value;let we=[];if(x.isCheckedCheckbox){const Be=n.isExistValue(ye,ge);ye.forEach(xe=>{xe!==ge&&we.push(xe)}),Be||we.push(ge),R.value=we,mo(),po()}else ye.length>0&&ye[0]===ge||(we=[ge],R.value=we,po())},fo=()=>{if(Y.value&&V.value&&I.value){const ce=V.value.clientWidth,ge=I.value.getWidth();k.isShow=ge>ce}},ho=()=>{if(q.value&&I.value){const ce=I.value.getHeight();let ge=ce>t.scrollY;if(ge||(J.value||U.value?M.value&&(ge=ce>M.value.clientHeight):V.value&&V.value.offsetHeight>=t.scrollY&&(ge=ce>V.value.clientHeight)),ge&&Z.value&&T.value){const ye=T.value.getTotalHeight()-(n.osType().isMobile?2:0);x.totalHeight=`${ye}px`}b.value=ge}},Dn=()=>{if((J.value||U.value)&&V.value&&I.value){let ce=V.value.scrollLeft;const ge=V.value.clientWidth,ye=I.value.getWidth();let we="left";ce>0&&(ge+ce>=ye?we="right":we="center"),k.posType=we}},Ha=()=>{if(!E.value||!I.value)return;let ce=S.value?S.value.scrollLeft:0;const ge=E.value.clientWidth,ye=I.value.getWidth();ge+ce>ye&&(ce=0),C.loading.length>0&&I.value.setElasticLoadLeft(ce),L.value.length===0&&I.value.setEmptyLeft(ce)},go=ce=>{F=ce.target.scrollLeft,B===null&&(B=requestAnimationFrame(()=>{B=null;const ge=F;S.value&&(S.value.scrollLeft=ge),V.value&&(V.value.scrollLeft=ge),w.value&&w.value.setScrollLeft(ge),N.value&&N.value.setScrollLeft(ge),Dn(),Ha()}))},za=ce=>{const ge=ce.target,ye=ge.scrollLeft;ge.scrollWidth-ge.clientWidth-ye<1&&V.value&&V.value.scrollLeft>ye||(ye!==d.scrollHead.left&&go(ce),d.scrollHead.left=ye)},Ua=ce=>{const ge=ce.target.scrollLeft;ge!==d.scrollBody.left&&go(ce),d.scrollBody.left=ge},vo=()=>{if(t.isFixedHead&&h.value&&!x.isRunLoading){let ce=!1,ge="auto",ye="auto";const we=h.value&&h.value.parentNode?ue.getPositionView(h.value.parentNode):null;if(we&&we.top<0&&E.value&&g.value&&T.value){const Be=E.value.clientHeight;if(we.top>(Be-_y)*-1){ce=!0;const xe=E.value.offsetWidth,Le=k.isShow&&t.isScrollX?g.value.offsetHeight:T.value.getOffsetHeight();ge=`${xe}px`,ye=`${Le}px`}}_.isShow=ce,_.width=ge,_.height=ye}},yo=()=>{L.value.length===0&&e.nextTick(()=>{I.value&&I.value.setEmptyWidth()})},In=()=>{const ce={};if(t.isPaginate){const{pages:ge,limit:ye}=d.changeNewPaginate;ce.pages=ge,ce.limit=ye,ce.offset=(ce.pages-1)*ce.limit}if(t.isOrder){const{orderIndex:ge,orderBy:ye}=d.changeNewSort;ce.orderIndex=ge,ce.orderBy=ye;const we=t.columns[ge];n.isUndefined(we)||(ce.orderColumns=we.data)}return ce},ar=()=>{t.scrollY>0&&e.nextTick(()=>{if(!V.value)return;const ce=V.value.querySelectorAll(".tr-selected");V.value.scrollTop=ce&&ce.length>0&&ce[0].offsetTop>Ny?ce[0].offsetTop-Vy:0})},Ja=(ce={})=>{if(x.isCheckedRadio||x.isCheckedCheckbox){const ge=Q();R.value=Tn(ge),mo(),ar()}t.isElastic&&((!n.isBoolean(ce.isElasticCloseAll)||ce.isElasticCloseAll)&&(C.open=[],(J.value||U.value)&&I.value&&I.value.clearElasticAbsolute()),C.loading=[],St()),x.hoverTrIndex=-1,x.hoverTrElasticIndex=-1,e.nextTick(()=>{t.isPaginate&&(D.pages=d.changeNewPaginate.pages,D.limit=d.changeNewPaginate.limit),t.isOrder&&(O.value=u([d.changeNewSort.orderIndex,d.changeNewSort.orderBy])),me(),he(),e.nextTick(()=>{ho(),fo(),Ce().then(()=>{Dn()}).catch(ge=>{ve.warn("ClTable","表格固定列分析失败",ge)}),yo(),vo()})})},Ka=(ce,ge)=>{const ye=n.isEmpty(t.list)?[]:t.list;let we=[];if(ge){if(t.isOrder){const Be={},xe=[];let Le="string";if(!n.isUndefined(ce.orderIndex)){const Xe=ce.orderColumns,We=t.columns[ce.orderIndex];if(!n.isUndefined(We))if(n.isEmpty(We.sortType))switch(We.format){case"int":case"float2":case"float3":Le="number";break;case"date":case"dateTime":case"time":Le="date";break;default:Le="string"}else Le=We.sortType;ye.forEach(_t=>{if(!_t)return;let bt=_t[Xe];bt=n.isUndefined(bt)||bt===null?"":bt;const an=bt.toString();n.isExistJsonKey(Be,an)||(Be[an]=[],xe.push(bt)),Be[an].push(n.getJsonClone(_t))})}xe.length>0&&(ce.orderBy==="desc"?n.getArrDesc(xe,Le):n.getArrAsc(xe,Le)).forEach(We=>{we.push(...Be[We.toString()])})}else we=n.getListClone(t.list);d.sortLocalData=we}else we=d.sortLocalData;if(t.isPaginate){const Be=[],xe=we.length,Le=ce.offset;let Xe=ce.offset+ce.limit;if(Xe=xe<Xe?xe:Xe,xe&&xe>=Le&&xe>0)for(let We=Le;We<Xe;We+=1)Be.push(n.getJsonClone(we[We]));return Be}else return we},It=(ce={})=>{const ge=In();R.value=[],X.value=!1,de(),t.isServer?(d.timerBody&&clearTimeout(d.timerBody),d.timerBody=setTimeout(()=>{d.timerBody=null,pe(ge)},Dl)):(d.timerBody&&clearTimeout(d.timerBody),d.timerBody=setTimeout(()=>{d.timerBody=null;const ye=n.isBoolean(ce.isChangePage)?!ce.isChangePage:!0;L.value=Ka(ge,ye),Ja()},Dl))},lr=()=>{Y.value&&(S.value&&S.value.addEventListener("scroll",za),V.value&&V.value.addEventListener("scroll",Ua))},sr=()=>{if(q.value){const ce=window,ge=ce.MutationObserver||ce.WebKitMutationObserver||ce.MozMutationObserver;if(!ge)return;m.observerBodyScrollY=new ge(()=>{ho()});const ye=m.observerBodyScrollY;I.value&&I.value.$el&&ye&&ye.observe(I.value.$el,{childList:!0,subtree:!0})}},_n=()=>{fo(),Ce().then(()=>{Dn()}).catch(ce=>{ve.warn("ClTable","表格固定列分析失败",ce)}),be(),yo(),Ha(),e.nextTick(()=>{vo()})},Nn=()=>{A===null&&(A=requestAnimationFrame(()=>{A=null,vo()}))},ir=()=>{he(),e.nextTick(()=>{t.isServer?It():n.isEmpty(t.list)?t.isShowInitLoadIng?de():e.nextTick(()=>{yo()}):(It(),t.isShowInitLoadIng||(x.isRunLoading=!1))})};e.onMounted(()=>{e.nextTick(()=>{ir(),lr(),sr(),d.resizeEvent=new ut({isDelay:!0,callback:()=>{_n()}}),t.isFixedHead&&window.addEventListener("scroll",Nn)})}),e.onActivated(()=>{t.isFixedHead&&window.addEventListener("scroll",Nn),d.resizeEvent||(d.resizeEvent=new ut({isDelay:!0,callback:()=>{_n()}})),_n(),d.pendingCanceled&&(d.pendingCanceled=!1,It())}),e.onDeactivated(()=>{window.removeEventListener("scroll",Nn),d.timerBody&&(clearTimeout(d.timerBody),d.timerBody=null,x.isRunLoading=!1,d.pendingCanceled=!0),d.resizeEvent&&(d.resizeEvent.destroy(),d.resizeEvent=null),B!==null&&(cancelAnimationFrame(B),B=null),A!==null&&(cancelAnimationFrame(A),A=null)}),e.onBeforeUnmount(()=>{d.timerBody&&(clearTimeout(d.timerBody),d.timerBody=null),m.observerBodyScrollY&&(m.observerBodyScrollY.disconnect(),m.observerBodyScrollY.takeRecords(),m.observerBodyScrollY=null),Y.value&&(S.value&&S.value.removeEventListener("scroll",za),V.value&&V.value.removeEventListener("scroll",Ua)),d.resizeEvent&&d.resizeEvent.destroy(),B!==null&&(cancelAnimationFrame(B),B=null),A!==null&&(cancelAnimationFrame(A),A=null),window.removeEventListener("scroll",Nn)}),e.watch(()=>t.list,(ce,ge)=>{const ye=n.isEmpty(ce)?[]:ce;if(d.timerBody&&(clearTimeout(d.timerBody),d.timerBody=null),d.dataJson=n.getJsonByList(ye),t.isServer)L.value=n.getListClone(ye);else if(t.isParamTriggerServer)L.value=n.getListClone(ye,!0);else{d.changeNewPaginate.pages=1;const Be=In();L.value=Ka(Be,!0)}const we={};if(t.isElastic){let Be=!1;if(ge)if(ye.length===ge.length){const xe=new Set(ge.map(Le=>Le?.id));Be=ye.some(Le=>Le&&!xe.has(Le.id))}else Be=!0;Be||(we.isElasticCloseAll=!1)}Ja(we)},{deep:!0}),e.watch(()=>t.columns,()=>{e.nextTick(()=>{he(),e.nextTick(()=>{ho(),fo(),Ce().then(()=>{Dn()}).catch(ce=>{ve.warn("ClTable","表格固定列分析失败",ce)})})})},{deep:!0}),e.watch(()=>t.selectValue,()=>{const ce=Q();R.value=Tn(ce),mo()}),e.watch(()=>t.orderSort,(ce,ge)=>{if(ce&&ce.length>=2&&!(ce[0]===d.changeNewSort.orderIndex&&ce[1]===d.changeNewSort.orderBy)){const ye=u(t.orderSort);d.changeNewPaginate.pages=1,D.pages=1,d.changeNewSort={orderIndex:ye[0],orderBy:ye[1]},O.value=ye,!t.isServer&&t.isParamTriggerServer?le():It({isChangePage:!1})}},{deep:!0}),e.watch([()=>t.pageOffset,()=>t.paginateLimit],([ce,ge],[ye,we])=>{const Be=c();d.changeNewPaginate.pages=Be,d.changeNewPaginate.limit=ge,D.pages=Be,D.limit=ge,!t.isServer&&t.isParamTriggerServer?le():It({isChangePage:!0})});const ko=()=>{if(t.disabled)return;const ce=!X.value;let ge=[];if(ce){const ye=xn(),we=R.value,Be=[];ye.forEach(xe=>{n.isExistValue(we,xe)||Be.push(xe)}),ge=we.concat(Be)}X.value=ce,R.value=ge,po()},So=(ce,ge,ye)=>{t.disabled||x.isRunLoading||(d.changeNewPaginate.pages=1,D.pages=1,d.changeNewSort.orderIndex=ge,d.changeNewSort.orderBy=ye,!t.isServer&&t.isParamTriggerServer?le():It({isChangePage:!1}))},bo=(ce,ge,ye)=>{if(!ge||n.isEmpty(ge)||n.isBoolean(ge.isDisabled)&&ge.isDisabled||t.disabled)return;const we=n.isNonEmptyString(t.rowClickKeyInvalid)?ue.getParent(ce.target,t.rowClickKeyInvalid,ce.currentTarget,!1):void 0;if(n.isUndefined(we)){if(t.isElastic){const xe=n.isNonEmptyString(t.rowClickKeyElastic)?ue.getParent(ce.target,t.rowClickKeyElastic,ce.currentTarget,!1):void 0;if(n.isUndefined(xe))t.isClickRowLinkage&&Pe(ge,ye);else{Pe(ge,ye,xe);return}}let Be=!1;if(x.isCheckedRadio||x.isCheckedCheckbox){let xe=ue.getParent(ce.target,".th-rc",ce.currentTarget,!1);xe===ce.currentTarget&&(xe=null),n.isUndefined(xe)?t.isClickRowLinkage&&Ra(ge):(Be=!0,Ra(ge))}se(ge,ye,Be)}},zt=(ce,ge=-1)=>{x.hoverTrIndex=ce,x.hoverTrElasticIndex=ge},Ut=()=>{x.hoverTrIndex=-1,x.hoverTrElasticIndex=-1},rr=(ce,ge)=>{t.disabled||x.isRunLoading||t.isPaginate&&(d.changeNewPaginate.pages=ce,d.changeNewPaginate.limit=ge,!t.isServer&&t.isParamTriggerServer?le():It({isChangePage:!0}))},Wa=ce=>{go(ce)};return l({getParamInfo:()=>In(),refresh:(ce=!0)=>{x.isRunLoading||(ce&&(d.changeNewPaginate.pages=1),It())},getData:()=>{const ce=e.toRaw(L.value);return n.getListClone(ce)},getDataAll:()=>{if(t.isServer){const ce=e.toRaw(L.value);return n.getListClone(ce)}return n.getListClone(d.sortLocalData)},getSelectData:()=>{const ce=Pa();return{ids:(ce?.checkedIds||[]).join(","),list:ce?.checkedData||[]}},loadStart:()=>{de()},loadStop:()=>{me()},loadElasticStart:ce=>{n.isUndefined(ce)||ce===null||Te(ce.toString())},loadElasticStop:ce=>{n.isUndefined(ce)||ce===null||ze(ce.toString())},closeElastic:(ce,ge,ye)=>{if(n.isEmpty(ce)||n.isEmpty(ce.id))return;const we=ce.id.toString();if(C.open.indexOf(we)===-1)return;const Be=ye||(V.value?V.value.querySelector(`[data-elastic-id="${CSS.escape(we)}"]`):null);Pe(ce,ge,Be,!1)},refreshResize:()=>{_n()}}),(ce,ge)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(f),class:e.normalizeClass(ae.value)},[e.createElementVNode("div",yy,[a.isHead?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(ee.value),style:e.normalizeStyle({width:_.width}),ref_key:"refElHeadWrapper",ref:h},[e.createElementVNode("div",{class:e.normalizeClass(G.value),ref_key:"refElHeadContainer",ref:g},[e.createElementVNode("div",{class:"table-head-main",ref_key:"refElHeadMain",ref:S},[e.createVNode(Ko,{minWidth:k.minWidth,columns:a.columns,isOrder:a.isOrder,orderSort:O.value,isShowTotal:Z.value,totalInfo:a.totalData,keyIndex:p,hoverIndex:x.hoverTrIndex,isUseScrollX:Y.value,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isShowCheckboxAll:oe.value,disabled:a.disabled,checkboxAllValue:X.value,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickAll:ko,onOnClickOrderBy:So,onOnHoverIn:zt,onOnHoverOut:Ut,ref_key:"refElHeadTable",ref:T},e.createSlots({_:2},[e.renderList(P.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])})),e.renderList($.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])}))]),1032,["minWidth","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],512),J.value&&v.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",ky,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:v.leftWidth})},[e.createVNode(Ko,{fixedType:"left",fixedLeftIndex:a.fixedColumnLeftIndex,width:v.totalWidth,columns:a.columns,isOrder:a.isOrder,orderSort:O.value,isShowTotal:Z.value,totalInfo:a.totalData,keyIndex:p,hoverIndex:x.hoverTrIndex,isUseScrollX:Y.value,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isShowCheckboxAll:oe.value,disabled:a.disabled,checkboxAllValue:X.value,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickAll:ko,onOnClickOrderBy:So,onOnHoverIn:zt,onOnHoverOut:Ut},e.createSlots({_:2},[e.renderList(P.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])})),e.renderList($.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])}))]),1032,["fixedLeftIndex","width","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),U.value&&v.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",Sy,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:v.rightWidth})},[e.createVNode(Ko,{fixedType:"right",fixedRightIndex:a.fixedColumnRightIndex,width:v.totalWidth,columns:a.columns,isOrder:a.isOrder,orderSort:O.value,keyIndex:p,hoverIndex:x.hoverTrIndex,isShowTotal:Z.value,totalInfo:a.totalData,isUseScrollX:Y.value,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isShowCheckboxAll:oe.value,disabled:a.disabled,checkboxAllValue:X.value,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickAll:ko,onOnClickOrderBy:So,onOnHoverIn:zt,onOnHoverOut:Ut},e.createSlots({_:2},[e.renderList(P.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])})),e.renderList($.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data})])}))]),1032,["fixedRightIndex","width","columns","isOrder","orderSort","hoverIndex","isShowTotal","totalInfo","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2),b.value?(e.openBlock(),e.createElementBlock("div",by,[ge[0]||(ge[0]=e.createElementVNode("div",null,null,-1)),Z.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-scroll-occupy-total",style:e.normalizeStyle({height:x.totalHeight})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isScrollX?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"table-scroll-occupy-corner":k.isShow})},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isScrollX?e.withDirectives((e.openBlock(),e.createElementBlock("div",wy,[e.createVNode(Sn,{isShowLeft:J.value,isShowRight:U.value,leftWidth:v.leftWidth,centerWidth:v.centerWidth,rightWidth:v.rightWidth,isShowCorner:b.value,cornerType:"right-top",onOnScrollX:Wa,ref_key:"refElHeadFixedScrollX",ref:w},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],512)),[[e.vShow,k.isShow]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),_.isShow&&x.isRunLoading?(e.openBlock(),e.createElementBlock("div",Cy)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],6),_.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:_.height,width:_.width})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(ne.value),ref_key:"refElBodyWrapper",ref:E},[e.createElementVNode("div",{class:"table-body-container",style:e.normalizeStyle(j.value),ref_key:"refElBodyContainer",ref:M},[e.createElementVNode("div",{class:e.normalizeClass({"table-body-main":!0,"table-body-empty":L.value.length===0}),style:e.normalizeStyle(te.value),ref_key:"refElBodyMain",ref:V},[e.createVNode(Wo,{minWidth:k.minWidth,columns:a.columns,list:L.value,disabled:a.disabled,isOrder:a.isOrder,selectValue:R.value,keyIndex:p,hoverIndex:x.hoverTrIndex,hoverElasticIndex:x.hoverTrElasticIndex,isUseScrollX:Y.value,colspanCount:x.colspanCount,isRunLoading:x.isRunLoading,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isElastic:a.isElastic,elasticOpen:C.open,elasticLoading:C.loading,elasticType:a.elasticType,elasticData:a.elasticData,trIntervalNum:a.trIntervalNum,isStriped:a.isStriped,emptyText:a.emptyText,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickTr:bo,onOnHoverIn:zt,onOnHoverOut:Ut,ref_key:"refElBodyTable",ref:I},e.createSlots({_:2},[e.renderList(H.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex})])})),e.renderList(z.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["minWidth","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],6),J.value&&v.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",Ey,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:v.leftWidth})},[e.createVNode(Wo,{width:v.totalWidth,fixedType:"left",fixedLeftIndex:a.fixedColumnLeftIndex,columns:a.columns,list:L.value,disabled:a.disabled,isOrder:a.isOrder,selectValue:R.value,keyIndex:p,hoverIndex:x.hoverTrIndex,hoverElasticIndex:x.hoverTrElasticIndex,isUseScrollX:Y.value,colspanCount:x.colspanCount,isRunLoading:x.isRunLoading,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isElastic:a.isElastic,elasticOpen:C.open,elasticLoading:C.loading,elasticType:a.elasticType,elasticData:a.elasticData,trIntervalNum:a.trIntervalNum,isStriped:a.isStriped,emptyText:a.emptyText,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickTr:bo,onOnHoverIn:zt,onOnHoverOut:Ut},e.createSlots({_:2},[e.renderList(H.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex})])})),e.renderList(z.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["width","fixedLeftIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),U.value&&v.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",By,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:v.rightWidth})},[e.createVNode(Wo,{width:v.totalWidth,fixedType:"right",fixedRightIndex:a.fixedColumnRightIndex,columns:a.columns,list:L.value,disabled:a.disabled,isOrder:a.isOrder,selectValue:R.value,keyIndex:p,hoverIndex:x.hoverTrIndex,hoverElasticIndex:x.hoverTrElasticIndex,isUseScrollX:Y.value,colspanCount:x.colspanCount,isRunLoading:x.isRunLoading,isShowRadio:x.isCheckedRadio,isShowCheckbox:x.isCheckedCheckbox,isElastic:a.isElastic,elasticOpen:C.open,elasticLoading:C.loading,elasticType:a.elasticType,elasticData:a.elasticData,trIntervalNum:a.trIntervalNum,isStriped:a.isStriped,emptyText:a.emptyText,isInlineWidth:a.isInlineWidth,widthClassPrefix:a.widthClassPrefix,widthMinClassPrefix:a.widthMinClassPrefix,onOnClickTr:bo,onOnHoverIn:zt,onOnHoverOut:Ut},e.createSlots({_:2},[e.renderList(H.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex})])})),e.renderList(z.value,ye=>({name:ye,fn:e.withCtx(we=>[e.renderSlot(ce.$slots,ye,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["width","fixedRightIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),a.isScrollX&&L.value.length>0&&k.isShow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.isScrollXBottom?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-fixed-column-scrollX",style:e.normalizeStyle({bottom:q.value?"-1px":"1px"})},[e.createVNode(Sn,{isShowLeft:J.value,isShowRight:U.value,leftWidth:v.leftWidth,centerWidth:v.centerWidth,rightWidth:v.rightWidth,isShowCorner:b.value,isShowCover:!1,cornerType:"right-bottom",onOnScrollX:Wa,ref_key:"refElBodyFixedScrollX",ref:N},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],4)):(e.openBlock(),e.createElementBlock("div",xy,[e.createElementVNode("div",{style:e.normalizeStyle({height:`${Tl}px`})},null,4)]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2),a.isPaginate&&L.value.length>0?(e.openBlock(),e.createElementBlock("div",Ty,[ge[1]||(ge[1]=e.createElementVNode("div",null,null,-1)),e.createVNode(Ia,{currentPage:D.pages,limitValue:D.limit,limitData:a.paginateLimitData,isShowLimit:a.isPaginateLimit,totalCount:W.value,disabled:a.disabled||x.isRunLoading,onOnChange:rr},null,8,["currentPage","limitValue","limitData","isShowLimit","totalCount","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),x.isRunLoading?(e.openBlock(),e.createElementBlock("div",Dy,[e.createElementVNode("div",Iy,[e.createElementVNode("div",{class:"table-load-head",style:e.normalizeStyle(re.value)},null,4),e.createElementVNode("div",{class:e.normalizeClass({"table-load-body":!0,"table-load-bg-gray":a.isLoading})},[e.createVNode(on,{isLoadIng:a.isLoading,size:"xxl",theme:a.loadTheme,color:a.loadColor||void 0},null,8,["isLoadIng","theme","color"])],2)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,vy))}}),My=["id"],Oy={class:"tableedit-table table-base"},ui=e.defineComponent({name:"ClTableEdit",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(a,{expose:l}){const o=a,t=`tableedit-${n.getRandom(5)}`,s=o.id,i=e.useSlots(),u=e.computed(()=>n.isArray(o.list)?o.list:[]),c=e.computed(()=>(n.isArray(o.columns)?o.columns:[]).filter(h=>n.isObject(h)&&n.isNonEmptyString(h.data)&&h.visible!==!1)),r=e.computed(()=>n.getJsonMerge({"panel-table-edit":!0},ue.getClassNameJson(o.className))),d=h=>{const g={};return n.isEmpty(h.width)||(g[`width-${h.width}`]=!0),n.getJsonMerge(g,ue.getClassNameJson(h.className))},m=h=>!n.isEmpty(h.data)&&!!i[`td_${h.data}`],p=(h,g)=>{const S=h?h[g.data]:void 0;return n.isEmpty(S)||n.getTypeof(S)==="object"?"":S};return l({getData:()=>u.value}),(h,g)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(r.value)},[e.createElementVNode("table",Oy,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(S,T)=>(e.openBlock(),e.createElementBlock("th",{key:`${t}-th-${S.data}-${T}`,class:e.normalizeClass(d(S))},e.toDisplayString(S.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(S,T)=>(e.openBlock(),e.createElementBlock("tr",{key:`${t}-tr-${T}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(w,E)=>(e.openBlock(),e.createElementBlock("td",{key:`${t}-td-${w.data}-${E}`,class:e.normalizeClass(d(w))},[m(w)?e.renderSlot(h.$slots,`td_${w.data}`,{key:0,data:S,col:w,trIndex:T}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(p(S,w)),1)],64))],2))),128))]))),128))])])],10,My))}}),Ly=["id"],$y=["innerHTML"],di=e.defineComponent({name:"ClTableSimple",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(a){const l=a,o=`t-${n.getRandom(5)}`,t=l.id,s=e.computed(()=>n.isArray(l.list)?l.list:[]),i=e.computed(()=>n.isArray(l.columns)?l.columns.filter(p=>n.isObject(p)&&!n.isArray(p)):[]),u=e.computed(()=>n.getJsonMerge({"panel-table-simple":!0,"table-base":!0},ue.getClassNameJson(l.className))),c=(p,f)=>p?p[f.data]:void 0,r=p=>{const f={};return n.isEmpty(p.width)||(f[`width-${p.width}`]=!0),n.getJsonMerge(f,ue.getClassNameJson(p.className))},d=(p,f)=>{const h=c(p,f);return n.isEmpty(h)||n.getTypeof(h)==="object"?"":h},m=(p,f)=>{const h=c(p,f);return n.isHtmlPair(h)};return(p,f)=>(e.openBlock(),e.createElementBlock("table",{id:e.unref(t),class:e.normalizeClass(u.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(h,g)=>(e.openBlock(),e.createElementBlock("th",{key:`${o}-th-${g}`,class:e.normalizeClass(r(h))},e.toDisplayString(h.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(h,g)=>(e.openBlock(),e.createElementBlock("tr",{key:`${o}-tr-${g}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(S,T)=>(e.openBlock(),e.createElementBlock("td",{key:`${o}-td-${T}`,class:e.normalizeClass(r(S))},[m(h,S)?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:d(h,S)},null,8,$y)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d(h,S)),1)],64))],2))),128))]))),128))])],10,Ly))}}),Ay=["id"],Fy={key:0},Py=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],Ry=["onClick"],Hy=["id","aria-labelledby"],mi=e.defineComponent({name:"ClTabs",__name:"Index",props:{id:String,className:{type:String,default:""},classContent:{type:String,default:""},list:{type:Array,default:()=>[]},theme:{type:String,default:"default",validator:a=>["default","line","card","button"].indexOf(a)!==-1},active:String,disabledData:{type:Array,default:()=>[]},hideData:{type:Array,default:()=>[]},prefixName:String,isShowRemove:{type:Boolean,default:!1},removeReserve:{type:Number,default:1},isShowAdd:{type:Boolean,default:!1},addBtnText:String,tabMinNum:{type:Number,default:1},tabMaxNum:{type:Number,default:0},isHideTabHead:{type:Boolean,default:!1},getAddInfo:Function,checkChangeBefore:Function},emits:{onChange:(a,l)=>!0,onInit:(a,l,o)=>!0,onAdd:a=>!0,onRemove:a=>!0,onErrMsg:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("common");const c=e.useTemplateRef("refElNavUl"),r=e.reactive({keyIndex:`${n.getRandom(8)}`,showId:t.active}),d=e.ref([]),m=e.reactive({left:0,width:0}),p=e.reactive({isShow:!1,width:""}),f={currentTabsAutoIndex:0,isFirstInit:!1},h=e.ref(!1),g=`tabs-${n.getRandom(5)}`,S=t.id,T=e.computed(()=>{const B={"panel-tabs":!0};return B[`tabs-${t.theme}`]=!0,n.getJsonMerge(B,ue.getClassNameJson(t.className))}),w=e.computed(()=>{const B={"tabs-content":!0};return n.getJsonMerge(B,ue.getClassNameJson(t.classContent))}),E=()=>{const B=[],A=r.showId?r.showId.toString():"";let F={};d.value.forEach(P=>{const H=n.getJsonClone(P);P.tabId===A&&(F=H),B.push(H)}),s("onInit",r.showId||"",F,B)},M=(B,A)=>{e.nextTick(()=>{s("onChange",B,A)})},V=B=>{s("onAdd",B)},I=B=>{s("onRemove",B)},N=B=>{s("onErrMsg",B)},x=B=>{if(t.theme==="line"){const A=document.getElementById(`tab_${r.keyIndex}_${B}`);let F=0,P=0;A&&A.parentElement&&(F=A.parentElement.offsetLeft+10,P=A.parentElement.offsetWidth-20),m.left=F,m.width=P}},L=()=>{if(c.value){const B=c.value.offsetWidth;let A=0;const F=c.value.children,P=F.length;for(let $=0;$<P;$++){const z=F[$];z.classList.contains("tab-indicator")||($===0&&(A+=z.offsetLeft),A+=z.offsetWidth)}const H=A>B;p.isShow=H,p.width=`${A}px`}},D=(B,A)=>{const F=n.getJsonClone(B),P=n.isNonEmptyString(F.id)?F.id:"-1";if(F.tabId=P==="-1"?n.getRandom(8):P,F.value=P,n.isEmpty(F.name)){const H=n.isNonEmptyString(t.prefixName)?t.prefixName:"";F.name=H+A.toString()}return F},O=B=>{const A=[];return n.isArray(B)&&B.forEach((F,P)=>{n.isObject(F)&&A.push(D(F,P+1))}),A},X=(B,A)=>{let F="";return A&&!n.isEmpty(A)&&B.forEach(P=>{P.tabId===A&&(F=A)}),n.isEmpty(F)&&B.length>0&&(F=B[0].tabId),F},Q=()=>{const B=O(t.list);d.value=B,f.currentTabsAutoIndex=B.length,e.nextTick(()=>{r.showId=X(B,t.active||""),L(),!f.isFirstInit&&B.length>0&&(f.isFirstInit=!0,E())})};e.onMounted(()=>{e.nextTick(()=>{Q()})}),e.onBeforeUnmount(()=>{}),e.watch([()=>t.active,()=>t.list],()=>{Q()}),e.watch(()=>r.showId,(B,A)=>{B!==A&&x(r.showId||"")});const R=()=>d.value.filter(B=>t.disabledData.indexOf(B.tabId)===-1&&t.hideData.indexOf(B.tabId)===-1),C=(B,A)=>{const F=R(),P=F.findIndex($=>$.tabId===r.showId);let H=P;if(B.key==="ArrowLeft")B.preventDefault(),H=P>0?P-1:F.length-1;else if(B.key==="ArrowRight")B.preventDefault(),H=P<F.length-1?P+1:0;else if(B.key==="Home")B.preventDefault(),H=0;else if(B.key==="End")B.preventDefault(),H=F.length-1;else return;H!==P&&F[H]&&k(F[H])},k=async B=>{if(!h.value&&t.disabledData.indexOf(B.tabId)===-1&&B.tabId!==r.showId){let A=!0;if(t.checkChangeBefore){h.value=!0;try{A=await t.checkChangeBefore(B.tabId,r.showId),A=n.isBoolean(A)?A:!0}catch(F){A=!0,N(`标签切换校验异常: ${String(F)}`)}finally{h.value=!1}}A&&(r.showId=B.tabId,M(B.tabId,B))}},b=B=>{if(t.disabledData.indexOf(B.tabId)===-1&&d.value.length>t.tabMinNum){const A=[];d.value.forEach(F=>{F.tabId!==B.tabId&&A.push(F)}),d.value=A,e.nextTick(()=>{L(),r.showId=X(A,r.showId||"")}),I(n.getJsonClone(B))}else N(`${i.value.checkAddMin}${t.tabMinNum}${i.value.count}`)},v=()=>{if(d.value.length<t.tabMaxNum||t.tabMaxNum<=0){let B={};if(t.getAddInfo){try{B=t.getAddInfo()}catch(H){B={},N(`新增标签数据获取异常: ${String(H)}`)}n.isObject(B)||(B={})}const A=n.isEmpty(B.name)?f.currentTabsAutoIndex+1:0,F=D(B,A);n.isEmpty(B.name)&&(f.currentTabsAutoIndex=A);const P=n.getListClone(d.value);P.push(F),d.value=P,e.nextTick(()=>{L(),r.showId=F.tabId,V(F)})}else N(`${i.value.checkAddMax}${t.tabMaxNum}${i.value.count}`)},_=B=>{const A=B.target;c.value&&A&&(c.value.scrollLeft=A.scrollLeft)};return l({getValue:()=>r.showId}),(B,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(T.value),id:e.unref(S)},[a.isHideTabHead?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fy,[e.createElementVNode("ul",{class:"tabs-nav",ref_key:"refElNavUl",ref:c,role:"tablist"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,F=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:`${g}-nav-${F.tabId}`,class:e.normalizeClass({"tab-nav":!0,"tab-active":F.tabId===r.showId,"tab-disabled":a.disabledData.indexOf(F.tabId)>-1||h.value})},[e.createElementVNode("a",{id:`tab_${r.keyIndex}_${F.tabId}`,class:"nav-link",href:"javascript:",role:"tab","aria-selected":F.tabId===r.showId,"aria-controls":`panel_${r.keyIndex}_${F.tabId}`,tabindex:F.tabId===r.showId?0:-1,onClick:P=>k(F),onKeydown:P=>C(P)},[e.renderSlot(B.$slots,`nav_${F.tabId}`,{data:F},()=>[e.createTextVNode(e.toDisplayString(F.name),1)])],40,Py),a.isShowRemove&&d.value.length>a.removeReserve&&d.value.length>a.tabMinNum&&a.disabledData.indexOf(F.tabId)===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:"tab-remove",onClick:P=>b(F)},[e.createVNode(fe,{name:"close"})],8,Ry)):e.createCommentVNode("",!0)],2)),[[e.vShow,a.hideData.indexOf(F.tabId)===-1]])),128)),a.isShowAdd?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass({"tab-add":!0,"tab-disabled":d.value.length>=a.tabMaxNum&&a.tabMaxNum>0})},[e.createElementVNode("a",{class:"nav-link",href:"javascript:",onClick:v},[e.renderSlot(B.$slots,"nav_add",{},()=>[e.createTextVNode(e.toDisplayString(a.addBtnText||e.unref(i).add),1)])])],2)):e.createCommentVNode("",!0),a.theme==="line"?(e.openBlock(),e.createElementBlock("li",{key:1,class:"tab-indicator",style:e.normalizeStyle({left:`${m.left}px`,width:`${m.width}px`})},null,4)):e.createCommentVNode("",!0)],512),p.isShow?(e.openBlock(),e.createBlock(Sn,{key:0,isShowLeft:!1,isShowRight:!1,centerWidth:p.width,onOnScrollX:_},null,8,["centerWidth"])):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:e.normalizeClass(w.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,F=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${g}-content-${F.tabId}`,id:`panel_${r.keyIndex}_${F.tabId}`,class:e.normalizeClass({"tab-content":!0,"tab-active":F.tabId===r.showId}),role:"tabpanel","aria-labelledby":`tab_${r.keyIndex}_${F.tabId}`,tabindex:0},[e.renderSlot(B.$slots,`content_${F.tabId}`,{data:F})],10,Hy)),[[e.vShow,a.hideData.indexOf(F.tabId)===-1]])),128))],2)],10,Ay))}}),zy={class:"weekhour-quick"},Uy=e.defineComponent({name:"ClWeekHourQuick",__name:"Quick",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onClick:a=>!0,onHoverIn:a=>!0,onHoverOut:a=>!0},setup(a,{emit:l}){const o=a,t=l,{optPageLanguage:s,getPageLanguage:i}=Ae();i("weekHour");const u=`weekhour-${n.getRandom(5)}`,c=e.ref([]),r=E=>{t("onClick",E)},d=E=>{t("onHoverIn",E)},m=E=>{t("onHoverOut",E)},p=()=>{const E=[{id:"dawn",name:s.value.dawn},{id:"morning",name:s.value.morning},{id:"noon",name:s.value.noon},{id:"afternoon",name:s.value.afternoon},{id:"evening",name:s.value.evening},{id:"night",name:s.value.night}];o.isOneDay||E.push({id:"workday",name:s.value.weekday},{id:"restday",name:s.value.restDay}),c.value=E};(()=>{p()})(),e.watch(()=>[o.isOneDay,s.value],()=>{m(""),p()});const h=E=>{r(E.id)},g=E=>{d(E.id)},S=E=>{m(E.id)},T=()=>{r("all")},w=()=>{r("clean")};return(E,M)=>(e.openBlock(),e.createElementBlock("div",zy,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,V=>(e.openBlock(),e.createBlock(Ot,{key:`${u}-${V.id}`,disabled:a.disabled,isLight:!0,isHideUnderline:!1,onOnClick:I=>h(V),onOnHoverIn:I=>g(V),onOnHoverOut:I=>S(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.name),1)]),_:2},1032,["disabled","onOnClick","onOnHoverIn","onOnHoverOut"]))),128))]),e.createElementVNode("div",null,[e.createVNode(Ot,{disabled:a.disabled,isLight:!0,isHideUnderline:!1,onOnClick:T},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).common.checkboxAll),1)]),_:1},8,["disabled"]),e.createVNode(Ot,{disabled:a.disabled,isLight:!0,isHideUnderline:!1,onOnClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s).common.clearEmpty),1)]),_:1},8,["disabled"])])]))}}),Jy={class:"weekhour-picker"},Ky={key:0,class:"weekhour-interval"},Wy=["onMouseenter","onClick","data-hour"],jy=["onMouseenter","onClick","data-week"],Yy={key:0,class:"weekhour-interval"},qy=["onMouseenter","onClick","data-week","data-hour","aria-selected"],Xy=e.defineComponent({name:"ClWeekHourPicker",__name:"Picker",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onChange:a=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,{optPageLanguage:i,getPageLanguage:u}=Ae();u("weekHour");const c=e.inject("$WeekHourTop");c||ve.warn("ClWeekHourPicker","依赖注入 $WeekHourTop 缺失,使用默认周时配置渲染");const r=c||{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],getJsonConvertArr:q=>q},d=e.useTemplateRef("refElTable"),m=`weekhour-${n.getRandom(5)}`,p=e.reactive({hoverHour:[],hoverWeek:[],hoverItem:[],hoverItemAssist:[],selectList:[]}),f=e.ref([]),h=e.ref(["0","1","2","3","4","5","6","7","","8","9","10","11","","12","13","14","","15","16","17","","18","19","","20","21","22","23"]),g={week:[],hour:r.hour,prevValue:[],isMouseMoveStart:!1,isMouseMoveIng:!1,moveStart:{}};let S,T;const w=e.ref(null),E=()=>{S&&(clearTimeout(S),S=void 0),S=setTimeout(()=>{const{selectList:q}=p;n.isEqualArr(g.prevValue,q)||(g.prevValue=n.getArrClone(q),s("onChange",g.prevValue))},500)},M=()=>{const q=t.isOneDay?[{id:"1",name:i.value.daily}]:[{id:"1",name:i.value.monday},{id:"2",name:i.value.tuesday},{id:"3",name:i.value.wednesday},{id:"4",name:i.value.thursday},{id:"5",name:i.value.friday},{id:"6",name:i.value.saturday},{id:"7",name:i.value.sunday}],J=t.isOneDay?q.map(U=>parseInt(U.id)):r.week;g.week=J,f.value=q},V=q=>{let J=[],U=[],ae=[];return n.isEmpty(q)?{week:J,hour:U,item:ae}:(Object.keys(q).forEach(ee=>{Array.isArray(q[ee])&&(J.push(ee.toString()),q[ee].forEach(G=>{G!=null&&n.isFinite(G)&&/^(0|[1-9]\d*)$/.test(G.toString())&&(U.push(G.toString()),ae.push(`${ee}-${G}`))}))}),J=n.getArrUnique(J),U=n.getArrUnique(U),ae=n.getArrUnique(ae),{week:J,hour:U,item:ae})},I=q=>{const J=V(q);p.hoverWeek=J.week,p.hoverHour=J.hour,p.hoverItem=J.item,p.hoverItemAssist=[]},N=()=>{p.hoverWeek=[],p.hoverHour=[],p.hoverItem=[],p.hoverItemAssist=[]},x=q=>{const J=V(q),U=[];J.week.forEach(ae=>{g.hour.forEach(ee=>{U.push(`${ae}-${ee}`)})}),J.hour.forEach(ae=>{g.week.forEach(ee=>{U.push(`${ee}-${ae}`)})}),p.hoverItemAssist=n.getArrUnique(U)},L=(q,J=!0)=>{if(n.isEmpty(q))p.selectList=[];else{const{selectList:U}=p,ee=V(q).item,G=[],ne=[];ee.forEach(te=>{n.isExistValue(U,te)?ne.push(te):G.push(te)});const j=ne.length===ee.length&&ne.length>0;p.selectList=j?n.getArrRemoveById(U,ee):U.concat(G)}J&&E()},D=q=>{if(!q)return null;const J={isHour:!1,isWeek:!1,isItem:!1,isValidArea:!1,isValidMove:!1,isGroup:!1,hour:-1,week:-1,x:-1,width:-1};let U;q.target?(U=q.target,J.x=q.pageX):q.parentElement&&(U=q);let ae;if(d.value&&d.value.contains(U)){J.isValidArea=!0;const ee=(U.tagName||"").toLocaleLowerCase();ae=ee==="th"||ee==="td"?U:U.parentElement;const G=ae.className.split(" ");if(J.isHour=G.indexOf("weekhour-hour")>-1,J.isWeek=G.indexOf("weekhour-week")>-1,J.isItem=G.indexOf("weekhour-item")>-1,J.isEmpty=G.indexOf("weekhour-empty")>-1,J.isInterval=G.indexOf("weekhour-interval")>-1,J.isInterval&&(J.width=ae.clientWidth),J.isHour&&(J.type="hour",J.isGroup=!0),J.isWeek&&(J.type="week",J.isGroup=!0),J.isItem&&(J.type="item",J.isGroup=!1),J.isHour||J.isWeek||J.isItem){J.isValidMove=!0;const ne=ae.dataset;let j,te;J.isHour?(j=parseInt(ne.hour),te=-1):J.isWeek?(j=-1,te=parseInt(ne.week)):J.isItem&&(j=parseInt(ne.hour),te=parseInt(ne.week)),J.hour=j,J.week=te}}return J.el=ae,J},O=q=>{const J=D(q);if(J&&J.isInterval){const U=ue.getPrev(J.el),ae=ue.getNext(J.el);J.prevInfo=D(U),J.nextInfo=D(ae)}return J},X=(q,J)=>{if(q.isEmpty&&J.isEmpty)return null;q.isEmpty&&(q.type=J.type),J.isEmpty&&(J.type=q.type);const U=23,ae=g.week.length,ee={x:q.hour,y:q.week},G={x:J.hour,y:J.week};if(q.isGroup||J.isGroup){if(q.type==="week")switch(J.type){case"week":ee.x=0,G.x=U;break;case"item":ee.x=0;break;case"hour":ee.x=0,G.y=1;break}else if(q.type==="hour")switch(J.type){case"hour":ee.y=1,G.y=ae;break;case"item":ee.y=1;break;case"week":ee.y=1,G.x=0;break}else if(q.type==="item")switch(J.type){case"hour":G.y=1;break;case"week":G.x=0;break}}let ne,j,te,re;G.x>=ee.x?(ne=ee.x,j=G.x):(ne=G.x,j=ee.x),G.y>=ee.y?(te=ee.y,re=G.y):(te=G.y,re=ee.y);let pe;(ne>-1||j>-1)&&(ne===-1&&(ne=0),pe=n.getArrByMinMax(ne,j));let ie;return(te>-1||re>-1)&&(te===-1&&(te=1),ie=n.getArrByMinMax(te,re)),!n.isUndefined(pe)&&!n.isUndefined(ie)?{x:pe,y:ie}:null},Q=q=>{let J={},U={};const ae=g.moveStart.isInterval,ee=q.isInterval;if(ae||ee){const G=g.moveStart.x,ne=q.x;if(ae&&!ee)U=q,G>ne?J=g.moveStart.prevInfo||{}:ne>G&&(J=g.moveStart.nextInfo||{});else if(!ae&&ee)J=g.moveStart,G>ne?U=q.nextInfo||{}:ne>G&&(U=q.prevInfo||{});else if(ae&&ee){const j=g.moveStart.width;Math.abs(G-ne)>j&&(G>ne?(J=g.moveStart.prevInfo||{},U=q.nextInfo||{}):ne>G&&(J=g.moveStart.nextInfo||{},U=q.prevInfo||{}))}}else J=g.moveStart,U=q;return{startInfo:J,endInfo:U}},R=q=>{if(!g.isMouseMoveStart){g.isMouseMoveStart=!0;const J=O(q);if(J.isValidArea&&(N(),g.moveStart=J,J.isValidMove)){const U=J.week===-1?g.week:[J.week],ae=J.hour===-1?g.hour:[J.hour];I(r.getJsonConvertArr({week:U,hour:ae}))}}},C=q=>{if(g.isMouseMoveStart){g.isMouseMoveIng=!0;const J=O(q);if(J.isValidArea){N();const U=Q(J);if(!n.isEmpty(U.startInfo)&&!n.isEmpty(U.endInfo)){const ae=X(U.startInfo,U.endInfo);if(ae){const ee=r.getJsonConvertArr({week:ae.y,hour:ae.x});I(ee)}}}}},k=q=>{if(g.isMouseMoveIng){N();const J=O(q);if(J.isValidArea){const U=Q(J);if(!n.isEmpty(U.startInfo)&&!n.isEmpty(U.endInfo)){const ae=X(U.startInfo,U.endInfo);if(ae&&!t.disabled){const ee=r.getJsonConvertArr({week:ae.y,hour:ae.x});L(ee)}}}}g.isMouseMoveStart=!1,g.moveStart={},T&&(clearTimeout(T),T=void 0),T=setTimeout(()=>{g.isMouseMoveIng=!1},50)},b=()=>{const q={start(J){let U=!1;return t.disabled||(U=!0,R(J)),U},ing:J=>{C(J)},end:J=>{k(J)}};w.value=new Tt(d.value,q)};(()=>{M()})(),e.onMounted(()=>{e.nextTick(()=>{b()})}),e.onBeforeUnmount(()=>{w.value&&(w.value.end(),w.value=null),S&&(clearTimeout(S),S=void 0),T&&(clearTimeout(T),T=void 0)}),e.watch(()=>[t.isOneDay,i.value],([q,J],[U,ae])=>{M(),q!==U&&(p.selectList=[],E())});const _=q=>{if(!g.isMouseMoveStart&&!t.disabled){const J=r.getJsonConvertArr({week:g.week,hour:[q]});I(J)}},y=()=>{g.isMouseMoveStart||N()},B=q=>{if(!g.isMouseMoveStart&&!g.isMouseMoveIng&&!t.disabled){const J=r.getJsonConvertArr({week:g.week,hour:[q]});L(J)}},A=q=>{if(!g.isMouseMoveStart&&!t.disabled){const J={};J[q]=g.hour,I(J)}},F=()=>{g.isMouseMoveStart||N()},P=q=>{if(!g.isMouseMoveStart&&!g.isMouseMoveIng&&!t.disabled){const J={};J[q]=g.hour,L(J)}},H=(q,J)=>{if(!g.isMouseMoveStart&&!t.disabled){const U={};U[q]=[J],I(U),x(U)}},$=()=>{g.isMouseMoveStart||N()},z=(q,J)=>{if(!g.isMouseMoveStart&&!g.isMouseMoveIng&&!t.disabled){const U={};U[q]=[J],L(U)}};return l({getWeekArr:()=>n.getArrClone(g.week),setSelected:(q,J=!1)=>{if(!g.isMouseMoveStart){const U=[];V(q).item.forEach(ee=>{n.isExistValue(U,ee)||U.push(ee)}),p.selectList=U,J?E():g.prevValue=n.getArrClone(U)}},setHoverIn:q=>{!g.isMouseMoveStart&&!t.disabled&&I(q)},setHoverOut:()=>{g.isMouseMoveStart||N()}}),(q,J)=>(e.openBlock(),e.createElementBlock("div",Jy,[e.createElementVNode("table",{ref_key:"refElTable",ref:d,class:"table-base"},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[J[0]||(J[0]=e.createElementVNode("th",{class:"weekhour-empty"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(U,ae)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-hour-${ae}`},[U===""?(e.openBlock(),e.createElementBlock("th",Ky)):(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass({"weekhour-hour":!0,"weekhour-hour-hover":p.hoverHour.indexOf(U)>-1}),onMouseenter:ee=>_(U),onMouseleave:y,onClick:ee=>B(U),"data-hour":U},e.toDisplayString(U),43,Wy))],64))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(U,ae)=>(e.openBlock(),e.createElementBlock("tr",{key:`${m}-week-${U.id}-${ae}`},[e.createElementVNode("td",{class:e.normalizeClass({"weekhour-week":!0,"weekhour-week-hover":p.hoverWeek.indexOf(U.id)>-1}),onMouseenter:ee=>A(U.id),onMouseleave:F,onClick:ee=>P(U.id),"data-week":U.id},e.toDisplayString(U.name),43,jy),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(ee,G)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-week-${ae}-hour-${G}`},[ee===""?(e.openBlock(),e.createElementBlock("td",Yy)):(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass({"weekhour-item":!0,"weekhour-item-hover":p.hoverItem.indexOf(`${U.id}-${ee}`)>-1,"weekhour-item-assist":p.hoverItemAssist.indexOf(`${U.id}-${ee}`)>-1,"weekhour-selected":p.selectList.indexOf(`${U.id}-${ee}`)>-1}),onMouseenter:ne=>H(U.id,ee),onMouseleave:$,onClick:ne=>z(U.id,ee),"data-week":U.id,"data-hour":ee,"aria-selected":p.selectList.indexOf(`${U.id}-${ee}`)>-1},[...J[1]||(J[1]=[e.createElementVNode("i",null,null,-1)])],42,qy))],64))),128))]))),128))])],512)]))}}),Gy={class:"weekhour-tips"},Qy={class:"weekhour-tips-title"},Zy={class:"weekhour-tips-title"},ek=e.defineComponent({name:"ClWeekHourTip",__name:"Tips",setup(a){const{optPageLanguage:l,getPageLanguage:o}=Ae();return o("weekHour"),(t,s)=>(e.openBlock(),e.createElementBlock("div",Gy,[e.createElementVNode("span",null,[s[0]||(s[0]=e.createElementVNode("span",{class:"weekhour-item weekhour-selected"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",Qy,e.toDisplayString(e.unref(l).selected),1)]),e.createElementVNode("span",null,[s[1]||(s[1]=e.createElementVNode("span",{class:"weekhour-item"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",Zy,e.toDisplayString(e.unref(l).selectedNot),1)])]))}}),tk=["id"],pi=e.defineComponent({name:"ClWeekHour",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":a=>!0,"update:modelValue":a=>!0,onChange:a=>!0,onInit:()=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElPicker"),c=e.reactive({valueOut:""}),r={week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],quick:{dawn:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7]},morning:{week:[1,2,3,4,5,6,7],hour:[8,9,10,11]},noon:{week:[1,2,3,4,5,6,7],hour:[12,13,14]},afternoon:{week:[1,2,3,4,5,6,7],hour:[15,16,17]},evening:{week:[1,2,3,4,5,6,7],hour:[18,19]},night:{week:[1,2,3,4,5,6,7],hour:[20,21,22,23]},workday:{week:[1,2,3,4,5],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},restday:{week:[6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},all:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},clean:{week:[],hour:[]}}},d=e.computed(()=>{let O={"panel-week-hour":!0,"weekhour-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext};return O=n.getJsonMerge(O,ue.getClassNameJson(t.className)),O}),m=O=>{s("update:value",O),s("update:modelValue",O),s("onChange",O)},p=()=>{e.nextTick(()=>{s("onInit")})},f=O=>{let X={};const Q=Object.keys(O);if(!n.isEmpty(Q))if(Q.length===2&&n.isExistValue(Q,"week")&&n.isExistValue(Q,"hour")&&n.isArray(O.week)&&n.isArray(O.hour)){const R=T();O.week.forEach(C=>{R.indexOf(C)>-1&&(X[C.toString()]=O.hour)})}else X=n.getJsonClone(O);return X},h=O=>{if(!/^(0|[1-9]\d*)$/.test(O))return[];const X=parseInt(O);if(X>16777215)return[];const Q=X.toString(2),R=[];return n.getFillZero(Q,24).split("").reverse().forEach((C,k)=>{parseInt(C)===1&&k<24&&R.push(k)}),R},g=O=>{const X={},Q=O.split(",");return Q.length>7&&(Q.length=7),Q.forEach((R,C)=>{X[(C+1).toString()]=h(R)}),X},S=O=>{let X={};n.isNonEmptyString(O)&&(X=g(O)),u.value&&u.value.setSelected(X)},T=()=>{let O=r.week;return t.isOneDay&&u.value&&(O=u.value.getWeekArr()),O},w=O=>{const X={};O.forEach(k=>{const b=k.split("-"),v=b[0],_=b[1];n.isExistJsonKey(X,v)||(X[v]=[]);const y=parseInt(_);n.isFinite(y)&&X[v].push(y)});const Q={};T().forEach(k=>{Q[k.toString()]=r.hour.map(()=>0)});for(const[k,b]of Object.entries(X))Q[k]&&n.getArrUnique(b).forEach(v=>{Q[k][v]=1});const C=[];return Object.keys(Q).forEach(k=>{const b=parseInt(n.getArrClone(Q[k]).reverse().join(""),2);C.push(b)}),C.join(",")},E=()=>{c.valueOut=n.isNonEmptyString(t.value)?t.value:"",S(t.value),p()};e.onMounted(()=>{e.nextTick(()=>{E()})}),e.watch(()=>t.value,O=>{const X=n.isNonEmptyString(O)?O:"";X!==c.valueOut&&(c.valueOut=X,S(X))}),e.watch(()=>t.disabled,O=>{O&&u.value&&u.value.setHoverOut()});const M=O=>{if(!t.disabled&&n.isExistJsonKey(r.quick,O)){const X=f(r.quick[O]);u.value&&u.value.setSelected(X,!0)}},V=O=>{if(n.isExistJsonKey(r.quick,O)){const X=f(r.quick[O]);u.value&&u.value.setHoverIn(X)}},I=O=>{u.value&&u.value.setHoverOut()},N=O=>{if(!Array.isArray(O))return;const X=w(O);c.valueOut=X,m(X)};return e.provide("$WeekHourTop",{week:r.week,hour:r.hour,getJsonConvertArr:f}),l({getValue:()=>c.valueOut,getValueData:()=>n.isNonEmptyString(c.valueOut)?g(c.valueOut):{},setValue:O=>{const X=n.isNonEmptyString(O)?O:"";c.valueOut=X,S(X)}}),(O,X)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(d.value)},[e.createVNode(Uy,{disabled:a.disabled||a.isPlaintext,isOneDay:a.isOneDay,onOnClick:M,onOnHoverIn:V,onOnHoverOut:I},null,8,["disabled","isOneDay"]),e.createVNode(Xy,{ref_key:"refElPicker",ref:u,disabled:a.disabled||a.isPlaintext,isOneDay:a.isOneDay,onOnChange:N},null,8,["disabled","isOneDay"]),e.createVNode(ek)],10,tk))}});function nk(a,l){switch(a){case"select":return n.isBoolean(l)?l:!1;case"radio":return!1;case"checkbox":case"selectTag":return!0;case"inputTag":return n.isBoolean(l)?l:!1;default:return!1}}function Il(a,l){if(a!==!0)return"";let o="int";if(n.isNumber(l)){const t=Number.parseInt(String(l),10);if(t>0)switch(t.toString()){case"2":o="float2";break;case"3":o="float3";break;default:o="float"}}return o}const ok={class:"xeditable-body"},ak={class:"xeditable-form"},lk={key:1,class:"xeditable-element"},sk=["id"],ik={key:0,class:"xeditable-errmsg"},fi=e.defineComponent({name:"ClXEditable",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},classNameLabel:{type:String,default:""},type:{type:String,required:!0,validator:a=>["input","inputNumber","select","selectCascade","textarea","radio","checkbox","selectTag","inputTag","dateTime","slider","customHtml"].indexOf(a)!==-1},label:String,subUnitOptions:{type:Object,default:()=>({})},subUnitList:{type:Array,default:()=>[]},isUseOnSubmitCheck:{type:Boolean,default:!1},appendContainer:{type:String,default:""},isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isUseEllipsis:{type:Boolean,default:!1},classNameEllipsis:{type:String,default:""},isAutoTooltip:{type:Boolean,default:!0},clickEditPoint:{type:String,default:"value",validator:a=>["value","icon"].indexOf(a)!==-1},isShowEditValue:{type:Boolean,default:!0},isShowEditIcon:{type:Boolean,default:!1},editIcon:{type:String,default:"edit"},isSubmitCleanValue:{type:Boolean,default:!1},submitCallback:Function,checkValidateCallback:Function},emits:["onSubmit","onChangeOpen"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=e.useAttrs(),u=e.useSlots(),{optPageLanguage:c,getPageLanguage:r}=Ae();r("xEditable");const d=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElForm"),p=e.useTemplateRef("refElFormEdit"),f=e.useTemplateRef("refElSubmit"),h=e.useTemplateRef("refElCustom"),g=e.useTemplateRef("refElContent"),S=e.useTemplateRef("refElErrMsg"),T=t.id,w=e.reactive({keyIndex:`xeditable-${n.getRandom(8)}`,showText:"",subUnitValue:"",subUnitValueType:"",showMsg:"",isShowEmpty:!1,isBtnOperateCenter:!1}),E=e.ref({}),M=e.ref([]),V=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))"}),I={lastValue:"",runStep:"",isSubmitting:!1,submitValueDataSnapshot:null,isPendingHlight:!1,pendingValue:null,pendingOpt:null,hlightTimer:null,hlightTimer1:null,hlightTimer2:null,resizeEventCustomHtml:null,resizeEventErrMsg:null,resizeEventContent:null},N=e.computed(()=>{const{type:j}=t;return j==="input"||j==="inputNumber"||j==="select"}),x=e.computed(()=>!n.isUndefined(u.iconLabel)),L=e.computed(()=>{let j={"panel-x-editable":!0};return j=n.getJsonMerge(j,ue.getClassNameJson(t.className)),n.getStringByJson(j," ")}),D=e.computed(()=>{const j=["xeditable-value"];return w.isShowEmpty&&j.push("xeditable-empty"),(t.isShowEditIcon||x.value)&&j.push("xeditable-edit-icon"),j.join(" ")}),O=e.computed(()=>{const j=["xeditable-value-label"],{clickEditPoint:te}=t;return te==="value"||w.isShowEmpty?j.push("dropdownLayer-arrow-anchorPoint"):j.push("xeditable-click-invalid"),j.join(" ")}),X=e.computed(()=>{const j=["xeditable-value-editIcon","dropdownLayer-arrow-anchorPoint"];return x.value&&j.push("xeditable-value-editIcon-slot"),j.join(" ")}),Q=e.computed(()=>{const j=["xeditable-ellipsis"];return j.push(t.classNameEllipsis),V.status===2&&j.push("xeditable-value-hlight"),j.join(" ")}),R=e.computed(()=>{const j=["xeditable-dropdown"];return j.push(`xeditable-dropdown-${t.type}`),j.join(" ")}),C=e.computed(()=>{const j={};return w.isBtnOperateCenter&&(j["text-align"]="center"),j}),k=e.computed(()=>{const j={};switch(V.status){case 1:j["background-color"]=V.startColor;break;case 2:j["background-color"]=V.endColor;break}return j}),b=j=>{const te=ue.getElementData(i);s("onSubmit",j,te)},v=j=>{e.nextTick(()=>{const te=ue.getElementData(i);s("onChangeOpen",j,te)})},_=()=>{d.value&&d.value.setOpen(!1),f.value&&f.value.loadStop()},y=j=>{w.showMsg=n.isEmpty(j)?"":j,e.nextTick(()=>{d.value&&d.value.calculationPosition()})},B=()=>nk(t.type,E.value.multiple),A=()=>{const j=n.getJsonClone(t.subUnitOptions);switch(t.type){case"input":{let te={isClean:!0};te=n.getJsonMerge(te,j);const re=n.isBoolean(te.isNumber)?te.isNumber:!1;w.subUnitValueType=Il(re,te.decimal),E.value=te;break}case"inputNumber":{let te={isNumber:!0,isClean:!0};te=n.getJsonMerge(te,j);const re=Il(!0,te.decimal)||"int";w.subUnitValueType=re,E.value=te;break}case"select":{let te={multiple:!1,placeholder:c.value.common.pleaseSelect};te=n.getJsonMerge(te,j),E.value=te;break}case"selectCascade":{let te={};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"textarea":{let te={isClean:!0};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"radio":{let te={isInline:!0,name:`${w.keyIndex}-radio`};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=te.isInline;break}case"checkbox":{let te={isInline:!1,name:`${w.keyIndex}-checkbox`};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=te.isInline;break}case"selectTag":{let te={type:"radio"};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"inputTag":{let te={multiple:!0,isAutofill:!0};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"dateTime":{let te={isDropdown:!1};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"slider":{let te={};te=n.getJsonMerge(te,j),E.value=te,w.isBtnOperateCenter=!0;break}case"customHtml":{w.isBtnOperateCenter=!0;break}}},F=(j,te)=>{let re=!1,pe=!1;te&&(n.isUndefined(te.label)||(re=!0),n.isUndefined(te.list)||(pe=!0));let ie="",se="",K="";switch(n.isString(j)?K=j:n.isNumber(j)&&n.isFinite(j)&&j!==void 0&&(K=j.toString()),t.type){case"input":case"inputNumber":case"textarea":{if(!re&&K&&!n.isEmpty(K))if((t.type==="inputNumber"||t.type==="input"&&n.isBoolean(E.value.isNumber)&&E.value.isNumber)&&n.isNumber(K)){const de=w.subUnitValueType==="float"?E.value.decimal:"";ie=n.getValueByFormat(K,w.subUnitValueType,{decimalNum:de})}else ie=K;se=K;break}case"selectCascade":{if(!re){const le=pe?te.list:M.value,de=n.isNonEmptyString(E.value.parentKey)?E.value.parentKey:"parentId",me=n.isNonEmptyString(E.value.topParentValue)?E.value.topParentValue:"0";if(K&&!n.isEmpty(K)){const he={};n.isArray(le)&&le.forEach(Te=>{!n.isUndefined(Te)&&!n.isUndefined(Te.id)&&(he[Te.id.toString()]=Te)});const Ce=[],be={};let Ee=K.toString();for(;!n.isEmpty(Ee)&&!n.isExistJsonKey(be,Ee)&&n.isExistJsonKey(he,Ee);){be[Ee]=!0;const Te=he[Ee];n.isEmpty(Te.name)?(n.isNumber(Te.name)||n.isString(Te.name))&&Ce.push(Te.name.toString()):Ce.push(Te.name),Ee=Te[de]!==void 0&&Te[de]!==null?Te[de].toString():"",Ee===me&&(Ee="")}Ce.reverse(),ie=Ce.join(" → ")}}se=K;break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{const le=pe?te.list:n.isArray(E.value.list)?E.value.list:M.value;if(!re&&K&&!n.isEmpty(K))if(t.type==="inputTag")ie=K;else{const de=B(),me=[],he=de?K.split(","):[K.toString()],Ce=n.isArray(le)?le.filter(Ee=>!n.isUndefined(Ee)&&!n.isUndefined(Ee.id)):le,be=n.getJsonByList(Ce);he.forEach(Ee=>{n.isExistJsonKey(be,Ee)&&me.push(be[Ee].name)}),ie=me.join(",")}se=K;break}case"dateTime":{re||(ie=K),se=K;break}case"slider":{re||(ie=K),se=K;break}}t.isSubmitCleanValue&&(se="",m.value&&m.value.reset()),w.showText=re?te.label.toString():ie,w.subUnitValue=se,w.isShowEmpty=n.isEmpty(w.showText),I.lastValue=w.subUnitValue,pe&&(M.value=te.list)},P=()=>{I.hlightTimer&&(clearTimeout(I.hlightTimer),I.hlightTimer=null),I.hlightTimer1&&clearTimeout(I.hlightTimer1),I.hlightTimer2&&clearTimeout(I.hlightTimer2),V.status=1,e.nextTick(()=>{I.hlightTimer1=setTimeout(()=>{V.status=2},10),I.hlightTimer2=setTimeout(()=>{V.status=0},1500)})},H=()=>{I.isPendingHlight=!1,I.pendingOpt!==null&&F(I.pendingValue,I.pendingOpt||{}),I.pendingValue=null,I.pendingOpt=null,P()},$=j=>{if(n.isBoolean(j)?j={success:j}:(n.isUndefined(j)||!n.isObject(j))&&(j={success:!1}),j.success){y(""),m.value&&m.value.reset();let te=null;I.submitValueDataSnapshot?te=I.submitValueDataSnapshot:p.value&&(te=p.value.getValueData()),n.isUndefined(te)&&(te={});let re="";const pe={},ie=n.isEmpty(j.data)?{}:j.data,se=n.isUndefined(ie.label),K=!se&&(n.isString(ie.label)||n.isNumber(ie.label));switch(pe.label=K?ie.label:null,t.type){case"input":case"inputNumber":case"textarea":case"dateTime":case"slider":re=te.value;break;case"selectCascade":{se&&(pe.label=te.show||te.value||""),re=te.value?te.value.toString():"",n.isArray(ie.list)&&(pe.list=ie.list);break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{if(B()&&n.isArray(te)){const le=[],de=[];te.forEach(me=>{le.push(me.id),de.push(me.name)}),se&&(pe.label=de.join(",")),re=t.type==="inputTag"?de.join(","):le.join(",")}else se&&(pe.label=te.name||""),re=t.type==="inputTag"?te.name||"":te.id?te.id.toString():"";n.isArray(ie.list)&&(pe.list=ie.list);break}}I.runStep!=="updateProps"?(I.pendingValue=re,I.pendingOpt=pe,I.isPendingHlight=!0,_()):(F(re,pe),_()),I.hlightTimer&&clearTimeout(I.hlightTimer),I.hlightTimer=setTimeout(()=>{I.hlightTimer=null,I.isPendingHlight&&(I.isPendingHlight=!1,H())},400)}else y(j.msg),e.nextTick(()=>{f.value&&f.value.loadStop()});I.isSubmitting=!1},z=()=>{A(),F(t.value,{label:t.label,list:t.subUnitList})},oe=async()=>{let j=!1;if(t.isCheckValidate&&m.value){try{j=await m.value.validate()===!0}catch(te){j=!1,ve.warn("ClXEditable","表单校验执行异常",te)}if(t.checkValidateCallback&&n.isFunction(t.checkValidateCallback)){const te=ue.getElementData(i),re=W();let pe=!0;try{pe=await t.checkValidateCallback(re,te)}catch(ie){pe=!1,ve.warn("ClXEditable","checkValidateCallback 执行异常",ie)}pe=n.isBoolean(pe)?pe:!0,pe||(j=!1)}}else j=!0;return j},Z=()=>{let j=!1;return t.submitCallback&&n.isFunction(t.submitCallback)&&(j=!0),j},W=()=>{let j="";return t.type!=="customHtml"&&(j=p.value?p.value.getValue():""),j},Y=()=>{if(Z()){const j=W(),te=ue.getElementData(i),re=t.submitCallback?t.submitCallback(j,te):void 0;if(re&&n.isFunction(re.then))re.then(pe=>{$(n.isBoolean(pe)?{success:pe}:pe)}).catch(()=>{$({success:!1,msg:c.value.submitCallback})});else{let pe={};n.isUndefined(re)?pe={success:!0}:n.isBoolean(re)?pe={success:re}:n.isObject(re)&&n.isBoolean(re.success)?pe=re:pe={success:!1,msg:c.value.submitCallback},$(pe)}}};e.onMounted(()=>{e.nextTick(()=>{z()})}),e.onUnmounted(()=>{I.hlightTimer&&clearTimeout(I.hlightTimer),I.hlightTimer1&&clearTimeout(I.hlightTimer1),I.hlightTimer2&&clearTimeout(I.hlightTimer2),I.resizeEventCustomHtml&&(I.resizeEventCustomHtml.destroy(),I.resizeEventCustomHtml=null),I.resizeEventErrMsg&&(I.resizeEventErrMsg.destroy(),I.resizeEventErrMsg=null),I.resizeEventContent&&(I.resizeEventContent.destroy(),I.resizeEventContent=null)}),e.watch([()=>t.value,()=>t.label,()=>t.subUnitList],([j,te,re],[pe,ie,se])=>{(j!==pe||te!==ie||re!==se)&&(j!==pe&&(I.runStep="updateProps"),F(j,{label:te,list:re}))}),e.watch(()=>t.subUnitOptions,()=>{A(),F(w.subUnitValue,{label:t.label,list:t.subUnitList})});const q=()=>{I.isSubmitting||(I.isSubmitting=!0,p.value&&(I.submitValueDataSnapshot=p.value.getValueData()),oe().then(j=>{if(j)if(t.type==="customHtml")I.runStep="first",Z()?Y():(ve.warn("ClXEditable","customHtml 类型必须配置 submitCallback 才能提交"),I.isSubmitting=!1,_());else{const te=W(),re=n.isEmpty(te);String(te)!==I.lastValue||re&&w.showText.length>0?(I.runStep="first",Z()?Y():(t.isUseOnSubmitCheck||$({success:!0}),b(te))):(I.isSubmitting=!1,_())}else $({success:!1})}).catch(()=>{$({success:!1})}))},J=()=>{_()},U=()=>{d.value&&(d.value.checkIsShowOpen()||d.value.initCompleteOpen())},ae=()=>{I.isPendingHlight&&(I.isPendingHlight=!1,I.hlightTimer&&(clearTimeout(I.hlightTimer),I.hlightTimer=null),I.hlightTimer=setTimeout(()=>{I.hlightTimer=null,H()},150))},ee=j=>{j?(I.lastValue=w.subUnitValue,y(""),e.nextTick(()=>{d.value&&d.value.checkIsShowOpen()&&(t.type==="customHtml"?(U(),h.value&&(I.resizeEventCustomHtml&&I.resizeEventCustomHtml.destroy(),I.resizeEventCustomHtml=new ut({element:h.value,callback:()=>{d.value&&d.value.calculationPosition()}}))):(g.value&&(I.resizeEventContent&&I.resizeEventContent.destroy(),I.resizeEventContent=new ut({element:g.value,callback:()=>{d.value&&d.value.calculationPosition()}})),S.value&&(I.resizeEventErrMsg&&I.resizeEventErrMsg.destroy(),I.resizeEventErrMsg=new ut({element:S.value,callback:()=>{d.value&&d.value.calculationPosition()}}))))})):(I.isPendingHlight||(w.subUnitValue=I.lastValue),I.resizeEventCustomHtml&&(I.resizeEventCustomHtml.destroy(),I.resizeEventCustomHtml=null),I.resizeEventErrMsg&&(I.resizeEventErrMsg.destroy(),I.resizeEventErrMsg=null),I.resizeEventContent&&(I.resizeEventContent.destroy(),I.resizeEventContent=null)),v(j)},G=j=>{const te=ue.getParent(j.target,".xeditable-click-invalid",j.currentTarget,!1);n.isUndefined(te)||(j.preventDefault(),j.stopPropagation())};return l({setOnSubmitResult:j=>{t.isUseOnSubmitCheck&&n.isUndefined(t.submitCallback)&&I.isSubmitting&&$(j)}}),(j,te)=>(e.openBlock(),e.createBlock(uo,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(T),classParent:L.value,classText:a.classNameLabel,classDropDown:R.value,dropdownArrowPos:"center",dropDownPos:"up",isUseDropdownArrow:!0,isCloseDestroy:!0,isInitDelayComplete:!0,appendContainer:a.appendContainer,onOnChangeOpen:ee,onOnAfterLeave:ae,transitionEnter:"animated fadeIn",transitionLeave:"animated fadeOut"},{label:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(D.value)},[a.isShowEditValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(O.value),onClick:te[0]||(te[0]=re=>G(re))},[a.isUseEllipsis&&w.showText.length>0?(e.openBlock(),e.createBlock(ga,{key:0,className:Q.value,isUseTooltipAuto:a.isAutoTooltip,text:w.showText,style:e.normalizeStyle(k.value)},null,8,["className","isUseTooltipAuto","text","style"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass({"xeditable-value-hlight":V.status===2}),style:e.normalizeStyle(k.value)},e.toDisplayString(w.showText),7))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isShowEditIcon||x.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(X.value)},[e.renderSlot(j.$slots,"iconLabel",{},()=>[e.createVNode(fe,{name:a.editIcon},null,8,["name"])])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)]),dropdown:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"refElContent",ref:g,class:"xeditable-content"},[e.createElementVNode("div",ok,[e.createElementVNode("div",ak,[e.createVNode(va,{ref_key:"refElForm",ref:m,isScrollToErr:!1},{default:e.withCtx(()=>[a.type==="customHtml"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElCustom",ref:h,class:"xeditable-custom"},[e.renderSlot(j.$slots,"customForm")],512)):(e.openBlock(),e.createElementBlock("div",lk,[e.createVNode(io,{isCheck:a.isCheckValidate,checkValue:w.subUnitValue,rules:a.validateRules,msgElementId:N.value?`#${w.keyIndex}_errmsg`:""},{default:e.withCtx(()=>[a.type==="inputNumber"?(e.openBlock(),e.createBlock(Lt,e.mergeProps({key:0,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[1]||(te[1]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):a.type==="input"&&E.value.isNumber?(e.openBlock(),e.createBlock(Lt,e.mergeProps({key:1,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[2]||(te[2]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):a.type==="input"?(e.openBlock(),e.createBlock(Re,e.mergeProps({key:2,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[3]||(te[3]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):a.type==="textarea"?(e.openBlock(),e.createBlock(ro,e.mergeProps({key:3,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[4]||(te[4]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):a.type==="select"?(e.openBlock(),e.createBlock(Bn,e.mergeProps({key:4,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[5]||(te[5]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="selectCascade"?(e.openBlock(),e.createBlock(_a,e.mergeProps({key:5,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[6]||(te[6]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="radio"?(e.openBlock(),e.createBlock(Sa,e.mergeProps({key:6,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[7]||(te[7]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="checkbox"?(e.openBlock(),e.createBlock(da,e.mergeProps({key:7,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[8]||(te[8]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="selectTag"?(e.openBlock(),e.createBlock(Na,e.mergeProps({key:8,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[9]||(te[9]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="inputTag"?(e.openBlock(),e.createBlock(Da,e.mergeProps({key:9,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[10]||(te[10]=re=>w.subUnitValue=re),list:M.value},E.value,{onOnInit:U}),null,16,["value","list"])):a.type==="dateTime"?(e.openBlock(),e.createBlock(xa,e.mergeProps({key:10,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[11]||(te[11]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):a.type==="slider"?(e.openBlock(),e.createBlock(wa,e.mergeProps({key:11,ref_key:"refElFormEdit",ref:p,value:w.subUnitValue,"onUpdate:value":te[12]||(te[12]=re=>w.subUnitValue=re)},E.value,{onOnInit:U}),null,16,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[],64))]),_:1},8,["isCheck","checkValue","rules","msgElementId"])]))]),_:3},512)]),e.createElementVNode("div",{class:"xeditable-operate",style:e.normalizeStyle(C.value)},[e.createVNode(Qe,{ref_key:"refElSubmit",ref:f,iconName:"check",isShowLoad:!0,loadPos:"zoom-out",loadTheme:"rotaryLine",onOnClick:q},null,512),e.createVNode(Qe,{iconName:"close",color:"grayLight",onOnClick:J})],4)]),N.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.isCheckValidate?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElErrMsg",ref:S,id:`${w.keyIndex}_errmsg`,class:"xeditable-errmsg"},null,8,sk)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[w.showMsg.length>0?(e.openBlock(),e.createElementBlock("div",ik,e.toDisplayString(w.showMsg),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],64)):e.createCommentVNode("",!0)],512)]),_:3},8,["id","classParent","classText","classDropDown","appendContainer"]))}}),rk={class:"notify-item"},ck={class:"notify-icon"},uk={class:"notify-text"},dk=["innerHTML"],mk=e.defineComponent({name:"ClNotifyItem",__name:"Notify",props:{isShow:{type:Boolean},itemInfo:{}},emits:["onMouseOver","onMouseOut","onDestroy"],setup(a,{emit:l}){const o=a,t=l,s=e.ref(!1),i=e.computed(()=>({progress:!0,"progress-hide":s.value})),u=e.computed(()=>({"progress-bar":!0,"progress-countdown":!s.value})),c=e.computed(()=>{const p={},f=o.itemInfo?.delay;return n.isFinite(f)&&f>0&&(p["animation-duration"]=`${f}s`),p}),r=()=>{!o.itemInfo||!o.isShow||(s.value=!0,t("onMouseOver",o.itemInfo.key))},d=()=>{!o.itemInfo||!o.isShow||(s.value=!1,t("onMouseOut",o.itemInfo.key))},m=()=>{!o.itemInfo||!o.isShow||t("onDestroy",o.itemInfo.key)};return(p,f)=>(e.openBlock(),e.createBlock(e.Transition,{name:"notify","enter-active-class":a.itemInfo?.clsTransitionEnter,"leave-active-class":a.itemInfo?.clsTransitionLeave},{default:e.withCtx(()=>[a.isShow&&a.itemInfo?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.itemInfo.clsContainer),role:"status","aria-live":"polite",onClick:m,onMouseenter:r,onMouseleave:d},[e.createElementVNode("div",rk,[e.createElementVNode("div",ck,[e.createVNode(fe,{name:a.itemInfo.iconName},null,8,["name"])]),e.createElementVNode("div",uk,[e.createElementVNode("div",{innerHTML:a.itemInfo.text},null,8,dk)]),e.createElementVNode("button",{type:"button",class:"notify-close",title:"关闭",onClick:e.withModifiers(m,["stop"])},[e.createVNode(fe,{name:"close"})])]),a.itemInfo.isProgress?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value)},[e.createElementVNode("div",{class:e.normalizeClass(u.value),style:e.normalizeStyle(c.value)},null,6)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],34)):e.createCommentVNode("",!0)]),_:1},8,["enter-active-class","leave-active-class"]))}}),pk=["id"],fk=2*1e3,hk=1e3,gk=2147483,vk=e.defineComponent({name:"ClNotify",__name:"Notifys",props:{id:String,className:String,position:{type:String,default:"top-right"},isProgress:{type:Boolean,default:!1},delay:{type:Number,default:3}},setup(a,{expose:l}){const o=a,t=`notify-pos-${n.getRandom(5)}`,s=`notify-item-${n.getRandom(5)}`;let i=0;const u=o.id,c={info:"info",success:"check",error:"close-circle-fill",warn:"warn-fill"},r={type:["info","success","error","warn"],position:["top-right","top-center","bottom-right"]},d=e.useTemplateRef("refElTopParent"),m=e.ref([]),p=e.reactive({"top-right":[],"top-center":[],"bottom-right":[]}),f=e.reactive({}),h=e.reactive({});let g,S=!1;const T=e.computed(()=>{let v={"panel-notify":!0};return v=n.getJsonMerge(v,ue.getClassNameJson(o.className)),v}),w=()=>document.body,E=()=>{const v=d.value;return!!v&&v.isConnected},M=()=>{if(S){ve.warn("Notify","组件已销毁,无法添加通知");return}if(E())clearTimeout(g),g=void 0;else{const v=w();v&&d.value&&v.appendChild(d.value)}},V=()=>{clearTimeout(g),g=void 0,e.nextTick(()=>{E()&&m.value.length===0&&(g=setTimeout(()=>{const v=d.value;v&&v.isConnected&&v.remove()},fk))})},I=v=>{let _={key:"",text:"",iconName:"",isProgress:!1,delay:o.delay,clsContainer:{},clsTransitionEnter:"",clsTransitionLeave:""},y=-1;if(!n.isNonEmptyString(v))return{info:_,inx:y,pos:""};const B=v.split("_item_")[0].replace("notify_",""),A=p[B];return n.isUndefined(A)||A.forEach((F,P)=>{F.key===v&&(_=F,y=P)}),{info:_,inx:y,pos:B}},N=v=>{if(I(v).inx>-1){const y=m.value.indexOf(v);y>-1&&m.value.splice(y,1),h[v]=setTimeout(()=>{delete h[v];const B=I(v);B.inx>-1&&p[B.pos].splice(B.inx,1),!n.isUndefined(p[B.pos])&&p[B.pos].length===0&&m.value.length===0&&V()},hk)}},x=(v,_)=>{const y=Math.min(_,gk);f[v]=setTimeout(()=>{delete f[v],N(v)},y*1e3)},L=v=>{let _="animated fadeInDown",y="animated fadeOutRight";switch(v){case"top-center":_="animated fadeInDown",y="animated fadeOut";break;case"bottom-right":_="animated fadeInUp",y="animated fadeOutRight";break}return{clsTransitionEnter:_,clsTransitionLeave:y}},D=v=>{if(S){ve.warn("Notify","组件已销毁,无法添加通知");return}if(!n.isEmpty(v)&&n.isNonEmptyString(v.msg)){M();const _=n.isExistValue(r.type,v.type||"")&&v.type?v.type:r.type[0];let y=o.position;if(n.isNonEmptyString(v.position)&&(y=v.position),!n.isExistValue(r.position,y)){const Z=n.isString(y)?y:"未知";ve.warn("Notify",`position 无效(${Z}),已回退为 ${r.position[0]}`),y=r.position[0]}const B=v.isProgress;let A=o.isProgress;n.isBoolean(B)&&B!==void 0&&(A=B);const F=v.delay,P=n.isFinite(F)&&F!==void 0&&F>0?Number(F):o.delay;let H={"notify-container":!0,"notify-progress":A};H[`notify-${_}`]=!0,n.isNonEmptyString(v.className)&&(H=n.getJsonMerge(H,ue.getClassNameJson(v.className)));const $=L(y);i+=1;const z=`notify_${y}_item_${i}`,oe={key:z,text:n.encodeHTML(v.msg),iconName:c[_],isProgress:A,delay:P,clsContainer:H,clsTransitionEnter:$.clsTransitionEnter,clsTransitionLeave:$.clsTransitionLeave};p[y].push(oe),e.nextTick(()=>{I(oe.key).inx>-1&&(m.value.push(oe.key),x(z,oe.delay))})}else ve.warn("Notify","通知内容为空,已忽略")},O=()=>{Object.keys(f).forEach(v=>{clearTimeout(f[v]),delete f[v]}),Object.keys(h).forEach(v=>{clearTimeout(h[v]),delete h[v]}),clearTimeout(g),g=void 0};e.onBeforeUnmount(()=>{S=!0,O();const v=d.value;v&&v.isConnected&&v.remove()});const X=v=>{f[v]&&(clearTimeout(f[v]),delete f[v])},Q=v=>{const _=I(v);_.inx>-1&&x(v,_.info.delay)},R=v=>{f[v]&&(clearTimeout(f[v]),delete f[v]),N(v)};return l({addCustom:v=>{D(v)},clear:()=>{r.position.forEach(v=>{p[v]=[]}),m.value=[],O(),V()},destroy:()=>{S=!0,r.position.forEach(v=>{p[v]=[]}),m.value=[],O(),V()}}),(v,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(T.value),ref_key:"refElTopParent",ref:d,id:e.unref(u)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p,(y,B,A)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${t}-${B}-${A}`},[y.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`notify-wrapper notify-${B}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y,F=>(e.openBlock(),e.createBlock(mk,{key:`${s}-${F.key}`,isShow:m.value.includes(F.key),itemInfo:F,onOnDestroy:R,onOnMouseOver:X,onOnMouseOut:Q},null,8,["isShow","itemInfo"]))),128))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,pk))}}),hi=(a={})=>{const l=e.createApp(vk,a),o=document.createElement("div"),t=l.mount(o),s=t;return{info:(i,u={})=>{const c=n.getJsonMerge(u,{type:"info",msg:i});s.addCustom(c)},success:(i,u={})=>{const c=n.getJsonMerge(u,{type:"success",msg:i});s.addCustom(c)},error:(i,u={})=>{const c=n.getJsonMerge(u,{type:"error",msg:i});s.addCustom(c)},warn:(i,u={})=>{const c=n.getJsonMerge(u,{type:"warn",msg:i});s.addCustom(c)},custom:i=>{s.addCustom(i)},clear:()=>{s.clear()},destroy:()=>{const i=t.$el||null;s.destroy(),l.unmount(),i&&i.parentNode&&i.parentNode.removeChild(i)}}},yk=["id","aria-label"],kk={class:"alert-body"},Sk={key:0,class:"alert-icon"},bk={key:2,class:"alert-title"},wk={key:4,class:"alert-text"},Ck=["innerHTML"],Ek={key:1},Bk={key:6,class:"alert-operate"},xk=2*1e3,Tk=e.defineComponent({name:"ClAlert",__name:"Alert",props:{id:String,width:{type:String,default:"500px"},isBackClick:{type:Boolean,default:!0},submitLabel:{type:String,default:"确定"},submitColor:{type:String,default:"default"},cancelLabel:{type:String,default:"取消"},cancelColor:{type:String,default:"grayLight"},classTransitionEnter:{type:String,default:"animated zoomIn"},classTransitionLeave:String},setup(a,{expose:l}){const o=a,t=o.id||`alert-${n.getRandom(5)}`,s=e.useTemplateRef("refElTopParent"),i=e.useTemplateRef("refElTransition"),u=e.useTemplateRef("refElBtnSubmit"),c=e.reactive({isLoadBackClick:!0}),r=e.reactive({id:t,width:o.width,isBackClick:!1,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:"",submitIcon:"",submitColor:"default",cancelLabel:"",cancelIcon:"",cancelColor:"grayLight",isShowSubmit:!1,isShowSubmitLoad:!1,isShowCancel:!1,isShowOperate:!1,isShow:!1}),d=e.reactive({submit:null,cancel:null});let m=null,p=!1;const f=e.ref(!1);let h=null;const g={info:{name:"info-circle",color:"var(--cl-primary, #1088f0)"},success:{name:"check-circle",color:"var(--cl-success, #12b76a)"},error:{name:"exclamation-circle",color:"var(--cl-danger, #ee0a24)"},warn:{name:"warn-fill",color:"#fbe300"},doubt:{name:"question-circle",color:"#0ac5c5"}},S=()=>document.querySelector("body"),T=()=>document.getElementById(r.id),w=()=>T()!==null,E=()=>{if(w())(m!==null||p)&&(m!==null&&(clearTimeout(m),m=null),p=!1);else{if(!s.value){ve.warn("ClAlert","refElTopParent 未初始化,无法创建容器");return}S()?.appendChild(s.value)}},M=()=>{p=!0,m!==null&&(clearTimeout(m),m=null),e.nextTick(()=>{p=!1,w()&&!r.isShow&&(m=setTimeout(()=>{const k=T();k&&S()?.removeChild(k),m=null},xk))})},V=k=>{if(!k||typeof k!="object"||Array.isArray(k))return{id:t,width:o.width,isBackClick:o.isBackClick,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:o.submitLabel,submitIcon:"",submitColor:o.submitColor,isShowSubmit:!1,isShowSubmitLoad:!1,cancelLabel:o.cancelLabel,cancelIcon:"",cancelColor:o.cancelColor,isShowCancel:!1,isShowOperate:!1,isShow:!1};const b=n.isBoolean(k.isBackClick)?k.isBackClick:o.isBackClick,v=n.isNonEmptyString(k.id)?k.id:t,_=n.isNonEmptyString(k.width)?k.width:o.width;let y="",B="",A="";if(!n.isEmpty(k.iconType)){const ee=Object.prototype.hasOwnProperty.call(g,k.iconType)?g[k.iconType]:void 0;ee&&(B=ee.name,A=ee.color)}n.isEmpty(B)&&n.isNonEmptyString(k.icon)&&(y=k.icon);const F=!n.isEmpty(B)||!n.isEmpty(y),P=n.isNonEmptyString(k.title),H=n.isNonEmptyString(k.html),$=n.isNonEmptyString(k.text)||H,z=n.isEmpty(k.submitLabel)?o.submitLabel:k.submitLabel,oe=n.isEmpty(k.submitColor)?o.submitColor:k.submitColor,Z=n.isEmpty(k.cancelLabel)?o.cancelLabel:k.cancelLabel,W=n.isEmpty(k.cancelColor)?o.cancelColor:k.cancelColor,Y=n.isBoolean(k.isSubmit)?k.isSubmit:!1,q=n.isBoolean(k.isLoad)?k.isLoad:!1,J=n.isBoolean(k.isCancel)?k.isCancel:!1,U=Y||J,ae=P||$;return{id:v,width:_,isBackClick:b,iconClass:y,iconName:B,iconColor:A,isShowIcon:F,title:P?k.title:"",isShowTitle:P,text:n.isNonEmptyString(k.text)?k.text:"",html:H?k.html:"",isShowTextHtml:H,isShowText:$,submitLabel:z,submitIcon:n.isNonEmptyString(k.submitIcon)?k.submitIcon:"",submitColor:oe,isShowSubmit:Y,isShowSubmitLoad:q,cancelLabel:Z,cancelIcon:n.isNonEmptyString(k.cancelIcon)?k.cancelIcon:"",cancelColor:W,isShowCancel:J,isShowOperate:U,isShow:ae}},I=k=>{if(r.isShow&&r.isShowSubmitLoad)return;const b=V(k);b.isShow?(E(),f.value=!1,Object.assign(r,b),d.submit=k.submitCallback??null,d.cancel=k.cancelCallback??null,document.addEventListener("keydown",x),h=document.activeElement,s.value?.focus({preventScroll:!0}),i.value?.show()):(d.submit=null,d.cancel=null,i.value?.hide(),r.isShow=!1)},N=()=>{r.isShowSubmitLoad&&u.value?.loadStop(),document.removeEventListener("keydown",x),h&&typeof h.focus=="function"&&(h.focus(),h=null),f.value=!1,i.value?.hide(),c.isLoadBackClick=!0,r.isShowSubmitLoad=!1,r.isShow=!1},x=k=>{k.key==="Escape"&&!r.isShowSubmitLoad?O():k.key==="Enter"&&r.isShowSubmit&&!r.isShowSubmitLoad&&D()},L=async()=>{if(f.value)return;N();const k=d.cancel;if(k&&n.isFunction(k))try{await k()}catch(b){ve.error("ClAlert","cancel 回调执行异常:",b)}};e.onBeforeUnmount(()=>{if(document.removeEventListener("keydown",x),h&&typeof h.focus=="function"&&(h.focus(),h=null),p=!1,m!==null&&(clearTimeout(m),m=null),w()){const k=T();k&&S()?.removeChild(k)}}),e.watch(()=>r.isShow,k=>{k||M()});const D=async()=>{if(f.value)return;const k=d.submit;if(k&&n.isFunction(k)){r.isShowSubmitLoad&&(c.isLoadBackClick=!1),f.value=!0;try{await k()}catch(b){ve.error("ClAlert","submit 回调执行异常:",b),N()}}else N()},O=async()=>{await L()},X=async()=>{await L()};return l({open:k=>{I(k)},hide:()=>{N()},reset:()=>{f.value=!1,r.isShowSubmitLoad&&(u.value?.loadStop(),r.isShowSubmitLoad=!1)}}),(k,b)=>(e.openBlock(),e.createElementBlock("div",{id:r.id,class:"panel-alert",ref_key:"refElTopParent",ref:s,role:"alertdialog","aria-modal":"true",tabindex:"-1","aria-label":r.title||r.text||"提示"},[e.createVNode(Os,{isBackClick:r.isBackClick&&c.isLoadBackClick&&!f.value,classTransitionEnter:o.classTransitionEnter,classTransitionLeave:o.classTransitionLeave,width:r.width,onOnClickBack:X,ref_key:"refElTransition",ref:i},{default:e.withCtx(()=>[e.createElementVNode("div",kk,[r.isShowIcon?(e.openBlock(),e.createElementBlock("div",Sk,[e.createVNode(fe,{name:r.iconName,color:r.iconColor,className:r.iconClass},null,8,["name","color","className"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.isShowTitle?(e.openBlock(),e.createElementBlock("div",bk,e.toDisplayString(r.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),r.isShowText?(e.openBlock(),e.createElementBlock("div",wk,[r.isShowTextHtml?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:r.html},null,8,Ck)):(e.openBlock(),e.createElementBlock("div",Ek,e.toDisplayString(r.text),1))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),r.isShowOperate?(e.openBlock(),e.createElementBlock("div",Bk,[r.isShowSubmit?(e.openBlock(),e.createBlock(Qe,{key:0,ref_key:"refElBtnSubmit",ref:u,className:"alert-submit",isShowLoad:r.isShowSubmitLoad,isShowBackDrop:!0,label:r.submitLabel,icon:r.submitIcon,color:r.submitColor,onOnClick:D},null,8,["isShowLoad","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.isShowCancel?(e.openBlock(),e.createBlock(Qe,{key:2,className:"alert-cancel",disabled:f.value,label:r.cancelLabel,icon:r.cancelIcon,color:r.cancelColor,onOnClick:O},null,8,["disabled","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))])]),_:1},8,["isBackClick","classTransitionEnter","classTransitionLeave","width"])],8,yk))}}),gi=(a={})=>{const l=e.createApp(Tk,a),o=document.createElement("div"),t=l.mount(o);return{alert:(s,i={})=>{const u=n.getJsonMerge({isSubmit:!0},i,{title:s,isCancel:!1,cancelCallback:null});t.open(u)},confirm:(s,i={})=>{const u=n.getJsonMerge({isSubmit:!0,isCancel:!0},i,{title:s});t.open(u)},custom:s=>{t.open(s)},close:()=>{t.hide()},reset:()=>{t.reset()},destroy:()=>{t.hide();const s=t.$el||null;l.unmount(),s&&s.parentNode&&s.parentNode.removeChild(s)}}},Dk={class:"preview-image"},Ik={class:"preview-image-actions-container"},_k={key:0},Nk={key:2,class:"image-num"},Vk={key:0,class:"preview-image-container"},Mk=["src"],Ok={key:0,class:"preview-image-loading"},Lk=e.defineComponent({name:"ClPreviewImage",__name:"Image",props:{imageInx:{type:Number,default:0},list:{type:Array,default:()=>[]},isLoop:{type:Boolean,default:!1},isShowCopy:{type:Boolean,default:!0}},setup(a,{expose:l}){const o=a,t=e.inject("$PreviewTop");let s=null;const i=e.reactive({isShow:!1,isSwitch:!1,isLoading:!1,src:"",isFading:!1,scale:1,scaleRatio:1.4,rotate:0,rotateAngle:90,showIndex:o.imageInx}),u=e.computed(()=>{const I={},N=[];return N.push(`scale(${i.scale})`),N.push(`rotate(${i.rotate}deg)`),I.transform=N.join(" "),I.opacity=i.isFading?"0":"1",I}),c=()=>{if(!t)return;const{showIndex:I}=i,N=o.list,x=n.isArray(N)?N.length:0,L=x>0&&I>=0&&I<x;if(i.isShow=L,L){s&&clearTimeout(s);const D=i.isFading?200:0;setTimeout(()=>{i.isSwitch=!0,i.src=o.list[I],t.setPrevNextStatus(I,x),s=setTimeout(()=>{i.isLoading=!0},150)},D)}else i.isSwitch=!1},r=()=>{s&&(clearTimeout(s),s=null),i.isFading=!1,i.isLoading=!1},d=()=>{s&&(clearTimeout(s),s=null),i.isFading=!1,i.isLoading=!1},m=()=>{const{scale:I,scaleRatio:N}=i,x=I*N;x<7&&(i.scale=Number(x.toFixed(3)))},p=()=>{const{scale:I,scaleRatio:N}=i,x=I/N;x>.18&&(i.scale=Number(x.toFixed(3)))},f=()=>{const{rotate:I,rotateAngle:N}=i;i.rotate=(I-N)%360},h=()=>{const{rotate:I,rotateAngle:N}=i;i.rotate=(I+N)%360},g=()=>{i.scale=1,i.rotate=0};return l({show:I=>{i.showIndex=I,c()},hide:()=>{i.scale=1,i.rotate=0,i.isFading=!1,i.isShow=!1},prev:()=>{const{showIndex:I}=i;let N=-1;I>0?N=I-1:o.isLoop&&(N=o.list.length-1),N>-1&&(i.isFading=!0,i.showIndex=N,i.scale=1,i.rotate=0,c())},next:()=>{const{showIndex:I}=i;let N=-1;I<o.list.length-1?N=I+1:o.isLoop&&(N=0),N>-1&&(i.isFading=!0,i.showIndex=N,i.scale=1,i.rotate=0,c())},large:()=>{m()},small:()=>{p()}}),(I,N)=>(e.openBlock(),e.createElementBlock("div",Dk,[i.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"preview-btn":!0,"preview-image-actions":!0,"preview-image-num":a.list.length>1})},[e.createElementVNode("div",Ik,[e.createElementVNode("span",{onClick:e.withModifiers(m,["stop"])},[e.createVNode(fe,{name:"search-plus"})]),e.createElementVNode("span",{onClick:e.withModifiers(p,["stop"])},[e.createVNode(fe,{name:"search-minus"})]),e.createElementVNode("span",{onClick:e.withModifiers(f,["stop"])},[e.createVNode(fe,{name:"rotate-left"})]),e.createElementVNode("span",{onClick:e.withModifiers(h,["stop"])},[e.createVNode(fe,{name:"rotate-right"})]),e.createElementVNode("span",{onClick:e.withModifiers(g,["stop"])},[e.createVNode(fe,{name:"restore"})]),a.isShowCopy?(e.openBlock(),e.createElementBlock("span",_k,[e.createVNode(tn,{textLabel:i.src},null,8,["textLabel"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.list.length>1?(e.openBlock(),e.createElementBlock("span",Nk,e.toDisplayString(i.showIndex+1)+"/"+e.toDisplayString(a.list.length),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(e.Transition,{"enter-active-class":"preview-image-enter","leave-active-class":"preview-image-leave"},{default:e.withCtx(()=>[i.isShow?e.withDirectives((e.openBlock(),e.createElementBlock("div",Vk,[e.withDirectives(e.createElementVNode("img",{src:i.src,style:e.normalizeStyle(u.value),onLoad:r,onError:d},null,44,Mk),[[e.vShow,!i.isLoading]]),i.isLoading?(e.openBlock(),e.createElementBlock("div",Ok,[...N[0]||(N[0]=[e.createElementVNode("div",{class:"preview-image-spinner"},null,-1)])])):e.createCommentVNode("",!0)],512)),[[e.vShow,i.isSwitch]]):e.createCommentVNode("",!0)]),_:1})]))}}),$k=["id"],Ak=e.defineComponent({name:"ClPreview",__name:"Index",setup(a,{expose:l}){const o=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./Video-BwDG93FI.cjs"))),t=e.useTemplateRef("refElTopParent"),s=e.useTemplateRef("refElImage"),i=e.useTemplateRef("refElVideo"),u=e.reactive({elId:`preview-${n.getRandom(5)}`,className:"",type:"",list:[],isLoop:!1,isShowPrevNext:!1,isDisablePrev:!1,isDisableNext:!1,isShowCopy:!0});let c=null;const r=e.computed(()=>{let O={"panel-preview":!0};return O=n.getJsonMerge(O,ue.getClassNameJson(u.className)),O}),d=e.computed(()=>u.type==="image"),m=e.computed(()=>u.type==="video"),p=()=>document.querySelector("body"),f=()=>document.querySelector("body>.panel-preview"),h=()=>{const O=f();return!n.isUndefined(O)},g=()=>{h()?(clearTimeout(c),c=null):(document.body.className=ue.getAddClass(document.body.className,"preview-open"),p().appendChild(t.value))},S=O=>{let X=O.keyCode;if(!n.isUndefined(X))switch(X=X.toString(),X){case"38":O.preventDefault(),O.stopPropagation();break;case"40":O.preventDefault(),O.stopPropagation();break}},T=O=>{let X=O.keyCode;if(!n.isUndefined(X))switch(X=X.toString(),X){case"27":I();break;case"37":N();break;case"38":O.preventDefault(),O.stopPropagation(),d.value?s.value?.large():m.value&&N();break;case"39":x();break;case"40":O.preventDefault(),O.stopPropagation(),d.value?s.value?.small():m.value&&x();break}},w=()=>{window.removeEventListener("keydown",S),window.removeEventListener("keyup",T)},E=()=>{window.addEventListener("keydown",S),window.addEventListener("keyup",T)},M=(O=!1)=>{h()&&(c=setTimeout(()=>{const X=f();X&&(document.body.className=ue.getRemoveClass(document.body.className,"preview-open"),p().removeChild(X)),w()},O?2*1e3:0))},V=O=>{if(!n.isEmpty(O)&&!n.isEmpty(O.src)){g(),n.isNonEmptyString(O.id)&&(u.elId=O.id),u.className=n.isNonEmptyString(O.className)?O.className:"";let X=[];const Q=O.src;n.isArray(Q)?X=Q:n.isString(Q)&&(X=[Q]),u.type=O.type,u.list=X,u.isLoop=n.isBoolean(O.isLoop)?O.isLoop:!1,u.isShowCopy=n.isBoolean(O.isShowCopy)?O.isShowCopy:!0;const R=n.isEmpty(O.showIndex)?0:O.showIndex;E(),e.nextTick(()=>{d.value?s.value?.show(R):m.value&&i.value?.show(R)})}};e.onBeforeUnmount(()=>{clearTimeout(c),c=null,w();const O=f();O&&(document.body.className=ue.getRemoveClass(document.body.className,"preview-open"),p().removeChild(O))});const I=()=>{d.value?s.value?.hide():m.value&&i.value?.hide(),M()},N=()=>{u.isDisablePrev||(d.value?s.value?.prev():m.value&&i.value?.prev())},x=()=>{u.isDisableNext||(d.value?s.value?.next():m.value&&i.value?.next())};return e.provide("$PreviewTop",{setPrevNextStatus:(O,X)=>{const Q=X>1;if(u.isShowPrevNext=Q,Q){const{isLoop:R}=u;u.isDisablePrev=R?!1:O===0,u.isDisableNext=R?!1:O===X-1}}}),l({show:O=>{V(O)},destroy:()=>{M(),u.elId=`preview-${n.getRandom(5)}`,u.className="",u.type="",u.list=[],u.isLoop=!1,u.isShowPrevNext=!1,u.isDisablePrev=!1,u.isDisableNext=!1}}),(O,X)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:u.elId,class:e.normalizeClass(r.value)},[e.createVNode(Rt,{teleportTarget:"self",show:!0,background:"var(--cl-overlay, rgba(0, 0, 0, 0.5))",zIndex:0,isLockScroll:!1,duration:0}),e.createElementVNode("div",{class:"preview-btn preview-close",onClick:e.withModifiers(I,["stop"])},[e.createVNode(fe,{name:"close"})]),u.isShowPrevNext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-prev":!0,"preview-btn-disable":u.isDisablePrev}),onClick:e.withModifiers(N,["stop"])},[e.createVNode(fe,{name:"angle-left"})],2),e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-next":!0,"preview-btn-disable":u.isDisableNext}),onClick:e.withModifiers(x,["stop"])},[e.createVNode(fe,{name:"angle-right"})],2)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),d.value?(e.openBlock(),e.createBlock(Lk,{key:2,ref_key:"refElImage",ref:s,isLoop:u.isLoop,list:u.list,isShowCopy:u.isShowCopy},null,8,["isLoop","list","isShowCopy"])):m.value?(e.openBlock(),e.createBlock(e.unref(o),{key:3,ref_key:"refElVideo",ref:i,isLoop:u.isLoop,list:u.list},null,8,["isLoop","list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,$k))}}),vi=(a={})=>{const l=e.createApp(Ak,a),o=document.createElement("div"),t=l.mount(o);return{image:(s,i={})=>{const u=n.getJsonMerge(i,{type:"image",src:s});t.show(u)},video:(s,i={})=>{const u=n.getJsonMerge(i,{type:"video",src:s});t.show(u)},show:s=>{t.show(s)},destroy:()=>{t.destroy(),l.unmount(),o.parentNode&&o.parentNode.removeChild(o)}}},Fk=Object.freeze(Object.defineProperty({__proto__:null,default:vi},Symbol.toStringTag,{value:"Module"}));let $n=null;const Pk=()=>($n||($n=Promise.resolve().then(()=>require("./index.hljs-BX3KMdv8.cjs")).catch(a=>{throw $n=null,a})),$n),Rk={bind:(a,l)=>{Pk().then(o=>{a.isConnected&&o.highlight(a,l.value)}).catch(()=>{})}},Hk="clCodeHighlight",zk=()=>({deep:!0,beforeMount:Rk.bind}),yi=Object.freeze(Object.defineProperty({__proto__:null,directive:zk,name:Hk},Symbol.toStringTag,{value:"Module"})),Uk=["id"],Yn=2e3,jo=300,_l=2147483647,Yo=1,Nl=["center","top","bottom","left","right"];let qo=Yn,An=0;const kt=e.defineComponent({name:"ClPopup",__name:"Index",props:{id:String,className:String,show:Boolean,position:{type:String,default:"center",validator:a=>Nl.indexOf(a)!==-1},isOverlay:{type:Boolean,default:!0},isRound:Boolean,duration:{type:Number,default:jo},isCloseOnClickOverlay:{type:Boolean,default:!0},isLockScroll:{type:Boolean,default:!0},isSafeAreaInsetBottom:Boolean,zIndex:{type:Number,default:Yn},teleportTarget:{type:String,default:""}},emits:["update:show","onOpen","onOpened","onClose","onClosed","onClick","onClickOverlay"],setup(a,{emit:l}){const o=a,t=l,s=o.id;let i=!1;const u=new Set;let c=!1,r=!1;const d=e.ref(0),m=e.ref(o.show),p=e.ref(o.show),f=e.computed(()=>o.isOverlay),h=e.computed(()=>{const b=o.teleportTarget;return n.isNonEmptyString(b)&&(b==="body"||b==="self"||/^[#.][A-Za-z_][\w-]*$/.test(b))?b:"body"}),g=e.computed(()=>o.teleportTarget==="self"),S=e.computed(()=>{const b=o.position;return Nl.indexOf(b)!==-1?b:"center"}),T=e.computed(()=>{if(!n.isNumber(o.duration)&&!n.isString(o.duration))return jo;const b=Number(o.duration);return n.isFinite(b)&&b>0?b:jo}),w=e.computed(()=>{if(!n.isNumber(o.zIndex)&&!n.isString(o.zIndex))return Yn;const b=Number(o.zIndex);return n.isFinite(b)&&Number.isInteger(b)&&b>0&&b<=_l-Yo?b:Yn}),E=e.computed(()=>({center:"popup-fade",top:"popup-slide-top",bottom:"popup-slide-bottom",left:"popup-slide-left",right:"popup-slide-right"})[S.value]||"popup-fade"),M=e.computed(()=>{let b={"panel-popup":!0,"panel-popup--center":S.value==="center","panel-popup--top":S.value==="top","panel-popup--bottom":S.value==="bottom","panel-popup--left":S.value==="left","panel-popup--right":S.value==="right","panel-popup--round":o.isRound,"panel-popup--safe-bottom":o.isSafeAreaInsetBottom};return b=n.getJsonMerge(b,ue.getClassNameJson(o.className)),b}),V=e.computed(()=>({zIndex:d.value||w.value,"--popup-duration":`${T.value}ms`})),I=e.computed(()=>({zIndex:(d.value||w.value)+Yo,"--popup-duration":`${T.value}ms`})),N=()=>{const b=o.teleportTarget;if(n.isNonEmptyString(b)&&b!=="body"&&b!=="self"){const v=document.querySelector(b);return v instanceof HTMLElement?v:null}return document.body},x=()=>{if(i)return;const b=N();b&&(i=!0,u.add(b),ao(b))},L=()=>{i&&(i=!1,u.forEach(b=>{lo(b)}),u.clear())},D=b=>{const v=o.teleportTarget;if(!n.isNonEmptyString(v)||v.charAt(0)!=="#")return;const _=document.querySelector(v);if(!(_ instanceof HTMLElement))return;const y=_.closest(".cl-framephone");if(!y)return;const B=y.querySelector(".framephone-home");if(B)if(b){if(!c)return;c=!1,An=Math.max(0,An-1),An===0&&(B.style.display="")}else{if(c)return;c=!0,An++,B.style.display="none"}};e.onMounted(()=>{o.show&&o.isLockScroll&&!i&&x(),e.nextTick(()=>{o.show&&o.isLockScroll&&!i&&x()})}),e.onActivated(()=>{r=!1,o.show&&o.isLockScroll&&!i&&x(),o.show&&D(!1)}),e.onDeactivated(()=>{r=!0,i&&L(),D(!0)}),e.onUnmounted(()=>{i&&L(),D(!0)}),e.watch(()=>o.show,b=>{b?(m.value=!0,e.nextTick(()=>{o.show?p.value=!0:m.value=!1}),qo=Math.min(Math.max(qo+2,w.value),_l-Yo),d.value=qo,!r&&o.isLockScroll&&x()):p.value=!1},{immediate:!0}),e.watch(()=>o.isLockScroll,b=>{o.show&&!r&&(b?x():L())});const O=()=>{p.value&&(t("onClickOverlay"),o.isCloseOnClickOverlay&&t("update:show",!1))},X=()=>{p.value&&t("onClick")},Q=()=>{D(!1),t("onOpen")},R=()=>{t("onOpened")},C=()=>{t("onClose")},k=()=>{L(),D(!0),t("onClosed"),o.show||(m.value=!1)};return(b,v)=>m.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:h.value,disabled:g.value},[e.createVNode(e.Transition,{name:"popup-fade",duration:T.value},{default:e.withCtx(()=>[p.value&&f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-popup-overlay","aria-hidden":"true",style:e.normalizeStyle(V.value),onClick:O},null,4)):e.createCommentVNode("",!0)]),_:1},8,["duration"]),e.createVNode(e.Transition,{name:E.value,duration:T.value,onEnter:Q,onAfterEnter:R,onLeave:C,onAfterLeave:k},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),role:"dialog","aria-modal":"true",class:e.normalizeClass(M.value),style:e.normalizeStyle(I.value),onClick:X},[e.renderSlot(b.$slots,"default")],14,Uk)):e.createCommentVNode("",!0)]),_:3},8,["name","duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),Jk={key:0,class:"actionsheet-header"},Kk={class:"actionsheet-header-text"},Wk={key:0,class:"actionsheet-description"},jk={key:2,class:"actionsheet-list"},Yk=["onClick"],qk={key:2,class:"actionsheet-item-subname"},ki=e.defineComponent({name:"ClActionSheet",__name:"Index",props:{id:String,className:String,show:Boolean,actionsList:{type:Array,default:()=>[]},title:String,description:String,cancelText:String,isCloseable:{type:Boolean,default:!0},isRound:{type:Boolean,default:!0},isOverlay:{type:Boolean,default:!0},isLockScroll:{type:Boolean,default:!0},duration:{type:Number,default:300},isCloseOnClickAction:Boolean,isCloseOnClickOverlay:{type:Boolean,default:!0},isSafeAreaInsetBottom:{type:Boolean,default:!0},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""}},emits:["update:show","onSelect","onCancel","onOpen","onOpened","onClose","onClosed","onClickOverlay"],setup(a,{emit:l}){const o=a,t=l,s=`actionsheet-${n.getRandom(5)}`,i=o.id,u=e.ref(o.show),c=e.computed(()=>!n.isEmpty(o.title)||!!o.isCloseable),r=e.computed(()=>d.value.length>0),d=e.computed(()=>Array.isArray(o.actionsList)?o.actionsList.filter(N=>!!N&&n.isObject(N)):[]),m=e.computed(()=>n.isFinite(o.zIndex)?o.zIndex:2e3),p=e.computed(()=>{const N={"panel-action-sheet":!0};return n.getJsonMerge(N,ue.getClassNameJson(o.className))}),f=e.computed(()=>{const N={"actionsheet-popup":!0};return n.getStringByJson(N," ")}),h=N=>{if(!N)return{};const x={"actionsheet-item":!0,"actionsheet-item--disabled":!!N.disabled,"actionsheet-item--loading":!!N.isLoading};return n.getJsonMerge(x,ue.getClassNameJson(N.className))};e.watch(u,N=>{N!==o.show&&t("update:show",N)}),e.watch(()=>o.show,N=>{u.value=N});const g=(N,x)=>{!N||N.disabled||N.isLoading||(t("onSelect",N,x),o.isCloseOnClickAction&&(u.value=!1))},S=()=>{t("onCancel"),u.value=!1},T=()=>{u.value=!1},w=()=>{t("onOpen")},E=()=>{t("onOpened")},M=()=>{t("onClose")},V=()=>{t("onClosed")},I=()=>{t("onClickOverlay")};return(N,x)=>(e.openBlock(),e.createBlock(kt,{id:e.unref(i),className:f.value,show:u.value,"onUpdate:show":x[0]||(x[0]=L=>u.value=L),position:"bottom",isOverlay:a.isOverlay,isRound:a.isRound,duration:a.duration,isCloseOnClickOverlay:a.isCloseOnClickOverlay,isLockScroll:a.isLockScroll,isSafeAreaInsetBottom:a.isSafeAreaInsetBottom,zIndex:m.value,teleportTarget:a.teleportTarget,onOnOpen:w,onOnOpened:E,onOnClose:M,onOnClosed:V,onOnClickOverlay:I},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(p.value)},[c.value?(e.openBlock(),e.createElementBlock("div",Jk,[e.createElementVNode("div",Kk,e.toDisplayString(a.title),1),a.isCloseable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"actionsheet-header-close","aria-label":"关闭",onClick:T},[e.createVNode(fe,{name:"close"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.renderSlot(N.$slots,"description",{},()=>[a.description?(e.openBlock(),e.createElementBlock("div",Wk,e.toDisplayString(a.description),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),r.value?(e.openBlock(),e.createElementBlock("ul",jk,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(L,D)=>(e.openBlock(),e.createElementBlock("li",{key:`${s}-${D}`,class:e.normalizeClass(h(L)),onClick:O=>g(L,D)},[L.isLoading?(e.openBlock(),e.createBlock(He,{key:0,theme:"circleSpinner",size:"small",color:"#999",className:"actionsheet-item-loading"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"actionsheet-item-name",style:e.normalizeStyle(L.color?{color:L.color}:void 0)},e.toDisplayString(L.name),5),L.subname?(e.openBlock(),e.createElementBlock("span",qk,e.toDisplayString(L.subname),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Yk))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.renderSlot(N.$slots,"default"),a.cancelText?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",class:"actionsheet-cancel",onClick:S},e.toDisplayString(a.cancelText),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2)]),_:3},8,["id","className","show","isOverlay","isRound","duration","isCloseOnClickOverlay","isLockScroll","isSafeAreaInsetBottom","zIndex","teleportTarget"]))}}),Xk=["aria-readonly"],Gk=["aria-selected"],Qk={key:0},Zk=["innerHTML"],Vl=300,eS=15,tS=.003,Ml=.3,qn=e.defineComponent({name:"ClPickerColumn",__name:"Column",props:{className:String,optionsList:{type:Array,default:()=>[]},valueIndex:{type:Number,default:0},optionHeight:{type:Number,default:44},visibleOptionNum:{type:Number,default:6},swipeDuration:{type:Number,default:1e3},isAllowHtml:Boolean,isReadonly:Boolean},emits:["onSelect"],setup(a,{emit:l}){const o=a,t=l,s=`pickerColumn-${n.getRandom(5)}`,i=e.ref((Math.max(1,o.visibleOptionNum)*o.optionHeight-o.optionHeight)/2-(n.isFinite(o.valueIndex)&&o.valueIndex>=0?o.valueIndex:0)*o.optionHeight),u=e.ref(0),c=e.ref(!1),r=e.ref(0),d=e.ref(0);let m=null,p=0,f=0,h=0;const g=e.computed(()=>Math.max(1,o.visibleOptionNum)*o.optionHeight),S=e.computed(()=>(g.value-o.optionHeight)/2),T=e.computed(()=>i.value+u.value),w=e.computed(()=>(S.value-T.value)/o.optionHeight),E=e.computed(()=>({height:`${g.value}px`})),M=e.computed(()=>({transform:`translateY(${T.value}px)`,transition:r.value>0?`transform ${r.value}ms cubic-bezier(0.23, 1, 0.32, 1)`:"none"})),V=v=>({"picker-column-item--active":Math.round(w.value)===v,"picker-column-item--disabled":!!o.optionsList[v]?.disabled}),I=v=>{const _=Math.abs(v-w.value);return{height:`${o.optionHeight}px`,lineHeight:`${o.optionHeight}px`,opacity:Math.max(1-_*.4,0),transform:`rotateX(${-_*12}deg) scale(${Math.max(1-_*.15,.5)})`}},N=v=>{if("touches"in v){const _=v.touches;return _.length>0?_[0].clientY:0}return v.clientY},x=v=>Math.round((S.value-v)/o.optionHeight),L=v=>{const _=o.optionsList.length;if(_===0)return v;const y=i.value+v,B=S.value,A=S.value-(_-1)*o.optionHeight;let F=y;return F>B?F=B+(F-B)*Ml:F<A&&(F=A+(F-A)*Ml),F-i.value},D=v=>{const _=o.optionsList.length;if(_===0){i.value=S.value,u.value=0;return}const y=x(T.value);let B=x(v);if(B=Math.min(Math.max(B,0),_-1),o.optionsList[B]?.disabled){let F=-1;for(let P=1;P<_;P++){if(B-P>=0&&!o.optionsList[B-P]?.disabled){F=B-P;break}if(B+P<_&&!o.optionsList[B+P]?.disabled){F=B+P;break}}F>=0?B=F:B=y}i.value=S.value-B*o.optionHeight;const A=Math.abs(B-y);r.value=Math.min(o.swipeDuration,Math.max(200,A*150)),u.value=0,B!==o.valueIndex&&t("onSelect",B)},O=(v=>k(v)),X=(v=>b(v)),Q=()=>{document.addEventListener("mousemove",O),document.addEventListener("mouseup",X)},R=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",X)};e.onBeforeUnmount(()=>{R(),m!==null&&cancelAnimationFrame(m)}),e.watch(()=>o.valueIndex,v=>{c.value||!n.isFinite(v)||v<0||(i.value=S.value-v*o.optionHeight,r.value=200)}),e.watch(()=>o.optionsList,()=>{if(c.value)return;const v=o.optionsList.length;let _=n.isFinite(o.valueIndex)&&o.valueIndex>=0?o.valueIndex:0;v>0&&(_=Math.min(_,v-1)),i.value=S.value-_*o.optionHeight,r.value=0});const C=v=>{o.isReadonly||!("touches"in v)&&v.button!==0||(c.value&&R(),d.value=N(v),f=Date.now(),h=0,c.value=!0,r.value=0,"touches"in v||Q())},k=v=>{if(!c.value)return;if(!("touches"in v)&&v.buttons===0){b();return}v.preventDefault();const y=N(v)-d.value,B=Date.now();B-f>Vl&&(f=B,h=y),m===null&&(m=requestAnimationFrame(()=>{m=null,u.value=L(p)})),p=y},b=v=>{if(!c.value)return;if(c.value=!1,R(),v?.type==="touchcancel"){u.value=0;return}m!==null&&(cancelAnimationFrame(m),m=null,u.value=L(p));const _=p-h,y=Date.now()-f,A=y>0&&y<Vl&&Math.abs(_)>eS?Math.abs(_)/y/tS*(_<0?-1:1):0;D(T.value+A)};return(v,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["picker-column",a.className]),style:e.normalizeStyle(E.value),role:"listbox","aria-readonly":a.isReadonly||void 0,onTouchstart:C,onTouchmove:k,onTouchend:b,onTouchcancel:b,onMousedown:C},[e.createElementVNode("div",{class:"picker-column-list",style:e.normalizeStyle(M.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.optionsList,(y,B)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-${B}`,class:e.normalizeClass(["picker-column-item",V(B)]),style:e.normalizeStyle(I(B)),role:"option","aria-selected":V(B)["picker-column-item--active"]||void 0},[a.isAllowHtml?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:y.text},null,8,Zk)):(e.openBlock(),e.createElementBlock("span",Qk,e.toDisplayString(y.text),1))],14,Gk))),128))],4)],46,Xk))}}),nS=["id"],oS={class:"aream-header"},aS={class:"aream-header-title"},lS={class:"aream-columns"},sS={key:0,class:"aream-loading"},iS=44,rS=6,Si=e.defineComponent({name:"ClAreaM",__name:"Index",props:{id:String,className:String,value:{type:[Array,String],default:()=>[]},show:Boolean,title:String,confirmButtonText:String,cancelButtonText:String,areaList:{type:Array,default:()=>[]},columnsNum:{type:Number,default:3},isOverlay:{type:Boolean,default:!0},isCloseOnClickOverlay:{type:Boolean,default:!0},duration:{type:Number,default:300},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""}},emits:["update:show","update:value","update:modelValue","onConfirm","onCancel","onChange"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.ref(0),u=e.ref(0),c=e.ref(0),r=e.ref(null),d=e.ref(!1),m=e.ref(!1),p=async()=>{if(!(d.value||m.value)){d.value=!0;try{const Y=await Promise.resolve().then(()=>require("./area-data-3xH_7ZRE.cjs"));r.value=Y.areaData,P()}catch(Y){ve.error("ClAreaM","AreaM 内置省市区数据加载失败:",Y)}finally{d.value=!1,m.value=!0}}};e.watch(()=>o.areaList,async Y=>{(!Array.isArray(Y)||Y.length===0)&&!m.value&&await p()},{immediate:!0});const f=e.computed(()=>o.show),h=e.computed(()=>n.isNonEmptyString(o.title)?o.title:"地区选择"),g=e.computed(()=>n.isNonEmptyString(o.confirmButtonText)?o.confirmButtonText:"确认"),S=e.computed(()=>n.isNonEmptyString(o.cancelButtonText)?o.cancelButtonText:"取消"),T=e.computed(()=>o.columnsNum>=3),w=e.computed(()=>{const Y=Array.isArray(o.areaList)?o.areaList.filter(q=>q&&n.isObject(q)&&n.isNonEmptyString(q.name)):[];return Y.length>0?Y:r.value||[]}),E=e.computed(()=>(o.areaList===void 0||o.areaList===null||Array.isArray(o.areaList)&&o.areaList.length===0)&&!r.value&&!m.value),M=e.computed(()=>w.value),V=Y=>Array.isArray(Y)?Y.filter(q=>!!q&&n.isObject(q)&&n.isNonEmptyString(q.name)):[],I=e.computed(()=>{const Y=M.value[i.value];return V(Y?Y.children:[])}),N=e.computed(()=>{const Y=I.value[u.value];return V(Y?Y.children:[])}),x=Y=>Y.map(q=>({text:q.name,value:q.name})),L=e.computed(()=>x(M.value)),D=e.computed(()=>x(I.value)),O=e.computed(()=>x(N.value)),X=e.computed(()=>iS),Q=e.computed(()=>rS),R=e.computed(()=>({height:`${X.value}px`})),C=e.computed(()=>n.isNonEmptyString(o.teleportTarget)?o.teleportTarget:"body"),k=e.computed(()=>o.teleportTarget==="self"),b=e.computed(()=>{const Y=Number(o.duration);return n.isFinite(Y)&&Y>0?Y:300}),v=e.computed(()=>{const Y=Number(o.zIndex);return n.isFinite(Y)?Y:2e3}),_=e.computed(()=>{const Y={"panel-area-m":!0};return n.getJsonMerge(Y,ue.getClassNameJson(o.className))}),y=e.computed(()=>({zIndex:v.value,"--aream-duration":`${b.value}ms`})),B=e.computed(()=>({zIndex:v.value+1,"--aream-duration":`${b.value}ms`})),A=()=>{const Y=[],q=M.value[i.value];q&&Y.push(q.name);const J=I.value[u.value];J&&Y.push(J.name);const U=N.value[c.value];return T.value&&U&&Y.push(U.name),Y},F=()=>{const Y=A();t("update:value",Y),t("update:modelValue",Y),t("onChange",Y)},P=()=>{const Y=o.value;if(!Array.isArray(Y)||Y.length===0)return;const[q,J,U]=Y,ae=M.value.findIndex(ee=>ee&&ee.name===q);if(ae>-1&&(i.value=ae,u.value=0,c.value=0),J){const ee=I.value.findIndex(G=>G&&G.name===J);ee>-1&&(u.value=ee)}if(U){const ee=N.value.findIndex(G=>G&&G.name===U);ee>-1&&(c.value=ee)}};e.watch([()=>o.value,()=>o.areaList],P,{immediate:!0});const H=Y=>{i.value=Y,u.value=0,c.value=0,F()},$=Y=>{u.value=Y,c.value=0,F()},z=Y=>{c.value=Y,F()},oe=()=>{t("onConfirm",A()),t("update:show",!1)},Z=()=>{t("onCancel"),t("update:show",!1)},W=()=>{o.isCloseOnClickOverlay&&t("update:show",!1)};return(Y,q)=>{const J=e.resolveComponent("cl-load");return e.openBlock(),e.createBlock(e.Teleport,{to:C.value,disabled:k.value},[e.createVNode(e.Transition,{name:"aream-fade",duration:b.value},{default:e.withCtx(()=>[f.value&&a.isOverlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-area-m-overlay",style:e.normalizeStyle(y.value),onClick:W},null,4)):e.createCommentVNode("",!0)]),_:1},8,["duration"]),e.createVNode(e.Transition,{name:"aream-slide",duration:b.value},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:e.normalizeClass(_.value),style:e.normalizeStyle(B.value)},[e.createElementVNode("div",oS,[e.createElementVNode("span",{class:"aream-header-btn",onClick:Z},e.toDisplayString(S.value),1),e.createElementVNode("span",aS,e.toDisplayString(h.value),1),e.createElementVNode("span",{class:"aream-header-btn aream-header-btn--confirm",onClick:oe},e.toDisplayString(g.value),1)]),e.createElementVNode("div",lS,[E.value?(e.openBlock(),e.createElementBlock("div",sS,[e.createVNode(J,{theme:"rotaryLine",size:"large",color:"var(--cl-primary, #1088f0)"}),q[0]||(q[0]=e.createElementVNode("span",{class:"aream-loading-text"},"数据加载中…",-1))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"picker-frame",style:e.normalizeStyle(R.value)},null,4),e.createVNode(qn,{className:"aream-column",optionsList:L.value,valueIndex:i.value,optionHeight:X.value,visibleOptionNum:Q.value,onOnSelect:H},null,8,["optionsList","valueIndex","optionHeight","visibleOptionNum"]),e.createVNode(qn,{className:"aream-column",optionsList:D.value,valueIndex:u.value,optionHeight:X.value,visibleOptionNum:Q.value,onOnSelect:$},null,8,["optionsList","valueIndex","optionHeight","visibleOptionNum"]),T.value?(e.openBlock(),e.createBlock(qn,{key:0,className:"aream-column",optionsList:O.value,valueIndex:c.value,optionHeight:X.value,visibleOptionNum:Q.value,onOnSelect:z},null,8,["optionsList","valueIndex","optionHeight","visibleOptionNum"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))])],14,nS)):e.createCommentVNode("",!0)]),_:1},8,["duration"])],8,["to","disabled"])}}}),cS=["id"],bi=e.defineComponent({name:"ClBackTop",__name:"Index",props:{id:String,className:String,visibleHeight:{type:Number,default:300},bottom:{type:Number,default:80},right:{type:Number,default:16},zIndex:{type:Number,default:1e3},scrollTarget:String,icon:{type:String,default:"angle-up"}},emits:["onClick","onShow","onHide"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.ref(!1),u=e.ref(!0);let c=null;const r=e.computed(()=>i.value),d=e.computed(()=>n.isNonEmptyString(o.icon)?o.icon:"angle-up"),m=e.computed(()=>{const N={"panel-back-top":!0,"panel-back-top--visible":i.value};return n.getJsonMerge(N,ue.getClassNameJson(o.className))}),p=e.computed(()=>({bottom:n.isFinite(o.bottom)&&o.bottom>=0?`${o.bottom}px`:"80px",right:n.isFinite(o.right)&&o.right>=0?`${o.right}px`:"16px",zIndex:n.isFinite(o.zIndex)&&o.zIndex>0?o.zIndex:1e3})),f=()=>{const N=h.value;if(N===window)return window.scrollY||document.documentElement.scrollTop||0;if(N&&N instanceof HTMLElement)return N.scrollTop;if(n.isNonEmptyString(o.scrollTarget))try{const x=document.querySelector(o.scrollTarget);return x?x.scrollTop:0}catch{return ve.warn("ClBackTop","scrollTarget 选择器非法",o.scrollTarget),0}return window.scrollY||document.documentElement.scrollTop||0},h=e.ref(null),g=()=>{let N=null;if(n.isNonEmptyString(o.scrollTarget))try{N=document.querySelector(o.scrollTarget)}catch{ve.warn("ClBackTop","scrollTarget 选择器非法,回退 window",o.scrollTarget)}return N||window},S=()=>{const N=f(),x=n.isFinite(o.visibleHeight)&&o.visibleHeight>=0?o.visibleHeight:0,L=N>x;L!==i.value&&(i.value=L,t(L?"onShow":"onHide"))},T=()=>{const N=g();N===window?window.scrollTo({top:0,behavior:"smooth"}):N.scrollTo({top:0,behavior:"smooth"})},w=()=>{E();const N=g();h.value=N,N.addEventListener("scroll",S,{passive:!0}),S()},E=()=>{h.value&&(h.value.removeEventListener("scroll",S),h.value=null)},M=()=>{c!==null&&(clearTimeout(c),c=null)},V=N=>{M(),c=N};e.onMounted(()=>{u.value=!0,w()}),e.onBeforeUnmount(()=>{E(),M()}),e.onActivated(()=>{u.value=!0,w()}),e.onDeactivated(()=>{u.value=!1,E(),M()}),e.watch(()=>o.scrollTarget,()=>{u.value&&(w(),n.isNonEmptyString(o.scrollTarget)&&h.value===window&&(M(),V(window.setTimeout(()=>{c=null,u.value&&w()},500))))});const I=()=>{T(),t("onClick")};return(N,x)=>(e.openBlock(),e.createBlock(e.Transition,{name:"backtop-fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:e.normalizeClass(m.value),style:e.normalizeStyle(p.value),onClick:I},[e.renderSlot(N.$slots,"default",{},()=>[e.createVNode(fe,{name:d.value,className:"backtop-default-icon"},null,8,["name"])])],14,cS)):e.createCommentVNode("",!0)]),_:3}))}}),uS=["id"],dS={key:0,class:"banner-body banner-body--row"},mS={class:"banner-text"},pS={class:"banner-title-inner"},fS={class:"banner-desc-inner"},hS={key:1,class:"banner-body banner-body--column"},gS={class:"banner-text banner-text--column"},vS={class:"banner-title-line"},yS={class:"banner-title-inner"},kS={class:"banner-desc-inner"},SS=["onClick"],bS=["onClick"],wS={class:"banner-text banner-text--column"},CS={class:"banner-title-line"},ES={class:"banner-title-inner"},BS={class:"banner-desc-inner"},xS={key:2,class:"banner-body"},TS=["onClick"],Ol=120,Xo=["leftImage","leftText","textTopImagesBottom","imagesTopTextBottom","textTopImageBottom","imageTopTextBottom","image","images"],wi=e.defineComponent({name:"ClBanner",__name:"Index",props:{id:String,className:String,type:{type:String,default:"leftImage",validator:a=>Xo.indexOf(a)!==-1},imagesList:{type:Array,default:()=>[]},title:String,description:String,titleLines:{type:Number,default:1,validator:a=>a===1||a===2},descriptionLines:{type:Number,default:2,validator:a=>a===1||a===2||a===3},customText:String,isShowClose:{type:Boolean,default:!1},imageHeight:{type:Number,default:Ol},isImageGap:{type:Boolean,default:!0}},emits:["onClickImage","onClickTitle","onClickDescription","onClickCustom","onClose"],setup(a,{emit:l}){const o=a,t=l,s=`banner-${n.getRandom(5)}`,i=o.id,u=e.ref(!1),c=e.computed(()=>!u.value),r=e.computed(()=>o.isShowClose),d=e.computed(()=>Array.isArray(o.imagesList)?o.imagesList.filter(R=>!!R&&n.isObject(R)&&n.isNonEmptyString(R.src)):[]),m=e.computed(()=>{const R=d.value;return R.length>0?R[0]:{src:"",alt:""}}),p=e.computed(()=>n.isNonEmptyString(o.title)?o.title:""),f=e.computed(()=>n.isNonEmptyString(o.description)?o.description:""),h=e.computed(()=>n.isNonEmptyString(o.customText)?o.customText:"");Xo.indexOf(o.type)===-1&&ve.warn("ClBanner",`非法 type「${String(o.type)}」,已回退渲染为纯图模式。合法值:${Xo.join("、")}`);const g=e.computed(()=>o.type==="leftImage"||o.type==="leftText"),S=e.computed(()=>o.type==="textTopImagesBottom"||o.type==="imagesTopTextBottom"||o.type==="textTopImageBottom"||o.type==="imageTopTextBottom"),T=e.computed(()=>o.type==="leftImage"),w=e.computed(()=>o.type==="textTopImagesBottom"||o.type==="textTopImageBottom"),E=e.computed(()=>o.type==="textTopImagesBottom"||o.type==="imagesTopTextBottom"||o.type==="images"),M=e.computed(()=>{const R={"panel-banner":!0,"panel-banner--row":g.value,"panel-banner--column":S.value,"panel-banner--image-only":!g.value&&!S.value};return n.getJsonMerge(R,ue.getClassNameJson(o.className))}),V=e.computed(()=>({height:`${n.isFinite(o.imageHeight)&&o.imageHeight>0?o.imageHeight:Ol}px`})),I=e.computed(()=>{const R=o.titleLines;return{"banner-title--1":R===1,"banner-title--2":R===2||!(R===1||R===2)}}),N=e.computed(()=>{const R=o.descriptionLines;return{"banner-desc--1":R===1,"banner-desc--2":R===2,"banner-desc--3":R===3||!(R===1||R===2||R===3)}}),x=e.computed(()=>{const R=!E.value&&d.value.length<=1;return{"banner-images--gap":o.isImageGap&&!R,"banner-images--single":R}}),L=R=>{const C=d.value[R];C&&t("onClickImage",C,R)},D=()=>{t("onClickTitle")},O=()=>{t("onClickDescription")},X=()=>{t("onClickCustom")},Q=()=>{u.value=!0,t("onClose")};return(R,C)=>c.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(i),class:e.normalizeClass(M.value)},[g.value?(e.openBlock(),e.createElementBlock("div",dS,[T.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"banner-image-wrap",style:e.normalizeStyle(V.value),onClick:C[0]||(C[0]=k=>L(0))},[m.value.src?(e.openBlock(),e.createBlock(Et,{key:0,src:m.value.src,alt:m.value.alt,fit:"cover",width:"100%",height:"100%",className:"banner-image"},null,8,["src","alt"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",mS,[r.value?(e.openBlock(),e.createBlock(fe,{key:0,name:"close",className:"banner-close banner-close--text",onClick:Q})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["banner-title",I.value]),onClick:D},[e.createElementVNode("div",pS,e.toDisplayString(p.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),f.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["banner-desc",N.value]),onClick:O},[e.createElementVNode("div",fS,e.toDisplayString(f.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),h.value||R.$slots.customText?(e.openBlock(),e.createElementBlock("div",{key:6,class:"banner-custom",onClick:X},[e.renderSlot(R.$slots,"customText",{},()=>[e.createTextVNode(e.toDisplayString(h.value),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))]),T.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)):(e.openBlock(),e.createElementBlock("div",{key:2,class:"banner-image-wrap",style:e.normalizeStyle(V.value),onClick:C[1]||(C[1]=k=>L(0))},[m.value.src?(e.openBlock(),e.createBlock(Et,{key:0,src:m.value.src,alt:m.value.alt,fit:"cover",width:"100%",height:"100%",className:"banner-image"},null,8,["src","alt"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4))])):S.value?(e.openBlock(),e.createElementBlock("div",hS,[w.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",gS,[e.createElementVNode("div",vS,[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["banner-title",I.value]),onClick:D},[e.createElementVNode("div",yS,e.toDisplayString(p.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.value?(e.openBlock(),e.createBlock(fe,{key:2,name:"close",className:"banner-close banner-close--card",onClick:Q})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["banner-desc",N.value]),onClick:O},[e.createElementVNode("div",kS,e.toDisplayString(f.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),h.value||R.$slots.customText?(e.openBlock(),e.createElementBlock("div",{key:2,class:"banner-custom",onClick:X},[e.renderSlot(R.$slots,"customText",{},()=>[e.createTextVNode(e.toDisplayString(h.value),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("div",{class:e.normalizeClass(["banner-images",x.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(k,b)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-coltop-${b}`,class:"banner-image-item",onClick:v=>L(b)},[e.createVNode(Et,{src:k.src,alt:k.alt,fit:"cover",width:"100%",height:"100%",className:"banner-image"},null,8,["src","alt"])],8,SS))),128))],2)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["banner-images",x.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(k,b)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-colbottom-${b}`,class:"banner-image-item",onClick:v=>L(b)},[e.createVNode(Et,{src:k.src,alt:k.alt,fit:"cover",width:"100%",height:"100%",className:"banner-image"},null,8,["src","alt"])],8,bS))),128))],2),e.createElementVNode("div",wS,[e.createElementVNode("div",CS,[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["banner-title",I.value]),onClick:D},[e.createElementVNode("div",ES,e.toDisplayString(p.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.value?(e.openBlock(),e.createBlock(fe,{key:2,name:"close",className:"banner-close banner-close--card",onClick:Q})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["banner-desc",N.value]),onClick:O},[e.createElementVNode("div",BS,e.toDisplayString(f.value),1)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),h.value||R.$slots.customText?(e.openBlock(),e.createElementBlock("div",{key:2,class:"banner-custom",onClick:X},[e.renderSlot(R.$slots,"customText",{},()=>[e.createTextVNode(e.toDisplayString(h.value),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],64))])):(e.openBlock(),e.createElementBlock("div",xS,[r.value?(e.openBlock(),e.createBlock(fe,{key:0,name:"close",className:"banner-close banner-close--image",onClick:Q})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(["banner-images",x.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(k,b)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-image-${b}`,class:"banner-image-item",onClick:v=>L(b)},[e.createVNode(Et,{src:k.src,alt:k.alt,fit:"cover",width:"100%",height:"100%",className:"banner-image"},null,8,["src","alt"])],8,TS))),128))],2)]))],10,uS)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),ra="#1989fa",Fn=["single","multiple","range"],DS=["id"],IS={key:0,class:"panel-calendarm__header"},_S={class:"panel-calendarm__title"},NS={class:"panel-calendarm__subtitle"},VS={class:"panel-calendarm__month"},MS={class:"panel-calendarm__weekdays"},OS={class:"panel-calendarm__days"},LS=["onClick"],$S={class:"panel-calendarm__day-inner"},AS={class:"panel-calendarm__day-num"},FS={key:1,class:"panel-calendarm__day-lunar"},PS={key:1,class:"panel-calendarm__footer"},Ll=e.defineComponent({name:"ClCalendarMPanel",__name:"Panel",props:{id:String,className:String,title:String,subtitle:String,cellsList:{type:Array,default:()=>[]},color:String,isShowConfirm:Boolean,confirmText:String,isShowCancel:Boolean,cancelText:String},emits:["onClickDay","onPrevMonth","onNextMonth","onConfirm","onCancel"],setup(a,{emit:l}){const o=a,t=l,s=`calendarm-panel-${n.getRandom(5)}`,i=["日","一","二","三","四","五","六"],u=e.computed(()=>n.isNonEmptyString(o.title)),c=e.computed(()=>{const f={};return n.isNonEmptyString(o.className)&&o.className.split(" ").forEach(h=>{n.isEmpty(h)||(f[h]=!0)}),f}),r=(f,h)=>{const g=/^#([0-9a-fA-F]{6})$/.exec(f);if(g)return`rgba(${parseInt(g[1].slice(0,2),16)}, ${parseInt(g[1].slice(2,4),16)}, ${parseInt(g[1].slice(4,6),16)}, ${h})`;const S=/^#([0-9a-fA-F]{3})$/.exec(f);if(S){const w=parseInt(S[1][0]+S[1][0],16),E=parseInt(S[1][1]+S[1][1],16),M=parseInt(S[1][2]+S[1][2],16);return`rgba(${w}, ${E}, ${M}, ${h})`}const T=ra.replace("#","");return`rgba(${parseInt(T.slice(0,2),16)}, ${parseInt(T.slice(2,4),16)}, ${parseInt(T.slice(4,6),16)}, ${h})`},d=f=>{const h={"panel-calendarm__day--prev":f.type==="prev","panel-calendarm__day--next":f.type==="next","panel-calendarm__day--disabled":f.disabled,"panel-calendarm__day--today":f.isToday,"panel-calendarm__day--selected":f.isSelected,"panel-calendarm__day--start":f.isStart,"panel-calendarm__day--end":f.isEnd,"panel-calendarm__day--in-range":f.inRange};return n.isNonEmptyString(f.className)&&f.className.split(" ").forEach(g=>{n.isEmpty(g)||(h[g]=!0)}),h},m=f=>{const h={},g=n.isNonEmptyString(o.color)?o.color:ra;return(f.isSelected||f.isStart||f.isEnd)&&(h.backgroundColor=g,h.borderColor=g,h.color="var(--cl-bg, #ffffff)"),f.inRange&&(h.backgroundColor=r(g,.12)),f.isToday&&!f.disabled&&!f.isSelected&&!f.isStart&&!f.isEnd&&!n.isNonEmptyString(f.color)&&(h.color=g),!f.disabled&&n.isNonEmptyString(f.color)&&(h.color=f.color),h},p=f=>{t("onClickDay",f)};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{id:a.id,class:e.normalizeClass(["panel-calendar-m",c.value])},[u.value?(e.openBlock(),e.createElementBlock("div",IS,[e.createElementVNode("div",_S,e.toDisplayString(a.title),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",NS,[e.createElementVNode("div",{class:"panel-calendarm__arrow",onClick:h[0]||(h[0]=g=>t("onPrevMonth"))},[e.createVNode(fe,{name:"angle-left"})]),e.createElementVNode("div",VS,e.toDisplayString(a.subtitle),1),e.createElementVNode("div",{class:"panel-calendarm__arrow",onClick:h[1]||(h[1]=g=>t("onNextMonth"))},[e.createVNode(fe,{name:"angle-right"})])]),e.createElementVNode("div",MS,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,(g,S)=>e.createElementVNode("div",{key:`${s}-wd-${S}`,class:"panel-calendarm__weekday"},e.toDisplayString(g),1)),64))]),e.createElementVNode("div",OS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.cellsList,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-day-${g.timestamp}-${S}`,class:e.normalizeClass(["panel-calendarm__day",d(g)]),style:e.normalizeStyle(m(g)),onClick:T=>p(g)},[e.createElementVNode("div",$S,[e.createElementVNode("div",AS,e.toDisplayString(g.text),1),g.restMark?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-calendarm__day-rest",g.restMark==="班"?"panel-calendarm__day-rest--work":"panel-calendarm__day-rest--rest"])},e.toDisplayString(g.restMark),3)):e.createCommentVNode("",!0),g.lunar?(e.openBlock(),e.createElementBlock("div",FS,e.toDisplayString(g.lunar),1)):e.createCommentVNode("",!0)])],14,LS))),128))]),a.isShowConfirm?(e.openBlock(),e.createElementBlock("div",PS,[a.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-calendarm__cancel",onClick:h[2]||(h[2]=g=>t("onCancel"))},e.toDisplayString(a.cancelText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"panel-calendarm__confirm",style:e.normalizeStyle({color:a.color}),onClick:h[3]||(h[3]=g=>t("onConfirm"))},e.toDisplayString(a.confirmText),5)])):e.createCommentVNode("",!0)],10,DS))}}),Ci=e.defineComponent({name:"ClCalendarM",__name:"Index",props:{id:String,className:String,show:Boolean,type:{type:String,default:"single",validator:a=>Fn.indexOf(a)!==-1},isPoppable:{type:Boolean,default:!0},title:{type:String,default:"日期选择"},isShowConfirm:{type:Boolean,default:!0},confirmText:{type:String,default:"确定"},isShowCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"取消"},minDate:{type:String,default:null},maxDate:{type:String,default:null},defaultDate:{type:[Date,Array],default:null},formatter:{type:Function,default:null},isShowLunar:Boolean,isWeekendRest:{type:Boolean,default:void 0},restDays:{type:Array,default:()=>[]},workDays:{type:Array,default:()=>[]},maxRange:{type:Number,default:0},color:{type:String,default:ra},teleportTarget:{type:String,default:""}},emits:["update:show","onConfirm","onCancel","onSelect","onUnSelect","onOverRange","onMonthChange"],setup(a,{emit:l}){const s="var(--cl-danger, #ee0a24)",i=a,u=l,c=i.id,r=e.ref(i.show),d=e.ref(i.type);Fn.indexOf(d.value)===-1&&(ve.warn("ClCalendarM",`非法 type「${String(d.value)}」,已回退为 single。合法值:${Fn.join("、")}`),d.value="single");const m=e.ref(i.isPoppable),p=e.ref(i.title),f=e.ref(i.isShowConfirm),h=e.ref(i.confirmText),g=e.ref(i.isShowCancel),S=e.ref(i.cancelText),T=e.ref(i.isShowLunar),w=e.computed(()=>{if(i.isWeekendRest!==void 0)return i.isWeekendRest;const G=ct("calendarM");return G?.isWeekendRest!==void 0?G.isWeekendRest:!0}),E=e.computed(()=>i.restDays.length>0?i.restDays:ct("calendarM")?.restDays||[]),M=e.computed(()=>i.workDays.length>0?i.workDays:ct("calendarM")?.workDays||[]),V=e.ref(i.color),I=e.ref(n.isFinite(i.maxRange)&&i.maxRange>0?i.maxRange:0),N=e.ref([]);let x=[];const L=e.ref(0),D=e.ref(0),O=e.computed(()=>{if(n.isNonEmptyString(i.minDate)){const G=_e.objDay(i.minDate);if(G.isValid())return G.startOf("day").valueOf()}return _e.objDay().startOf("day").valueOf()}),X=e.computed(()=>{if(n.isNonEmptyString(i.maxDate)){const G=_e.objDay(i.maxDate);if(G.isValid())return G.startOf("day").valueOf()}return _e.objDay(O.value).add(6,"month").valueOf()}),Q=e.computed(()=>`${L.value}年${D.value}月`),R=e.computed(()=>{const G=[],ne=_e.objDay({year:L.value,month:D.value-1,day:1}),j=_e.objDay({year:L.value,month:D.value-1,day:1-ne.day()}),te=_e.objDay().startOf("day");let re=O.value,pe=X.value;re>pe&&(ve.warn("ClCalendarM","minDate 晚于 maxDate,可选范围约束已降级为不限制"),re=Number.MIN_SAFE_INTEGER,pe=Number.MAX_SAFE_INTEGER);const ie=N.value,se=d.value==="range",K=se&&ie.length>0?ie[0]:null,le=se&&ie.length>1?ie[1]:null;for(let de=0;de<42;de++){const me=j.add(de,"day"),he=me.valueOf(),Ce=T.value&&_.value?B(me.toDate()):"",be=A(me),Ee={year:me.year(),month:me.month()+1,day:me.date(),timestamp:he,type:me.month()===D.value-1?"normal":he<ne.valueOf()?"prev":"next",disabled:he<re||he>pe,isToday:P(me,te),isSelected:ie.some(Te=>P(Te,me)),isStart:!!K&&P(me,K),isEnd:!!le&&P(me,le),inRange:!!K&&!!le&&he>K.getTime()&&he<le.getTime(),text:P(me,te)?"今天":String(me.date()),color:be&&be.text==="休"?s:void 0,restMark:be?be.text:void 0,lunar:Ce};G.push(Ee)}return n.isFunction(i.formatter)&&G.forEach(de=>{let me;try{me=i.formatter({date:H(de),text:de.text,type:de.type,isDisabled:de.disabled,isToday:de.isToday,isSelected:de.isSelected,isStart:de.isStart,isEnd:de.isEnd,inRange:de.inRange,restMark:de.restMark,lunar:de.lunar})}catch(he){ve.warn("ClCalendarM","formatter 执行异常,该格按默认渲染",he),me=void 0}me&&n.isObject(me)&&(n.isNonEmptyString(me.text)&&(de.text=me.text),n.isNonEmptyString(me.color)&&(de.color=me.color),n.isNonEmptyString(me.className)&&(de.className=me.className))}),G}),C=e.computed(()=>({title:p.value,subtitle:Q.value,cellsList:R.value,color:V.value,isShowConfirm:f.value,confirmText:h.value,isShowCancel:g.value,cancelText:S.value})),k=e.computed(()=>n.isNonEmptyString(i.className)?i.className:""),b=e.computed(()=>n.isNonEmptyString(i.className)?i.className:"");let v=null;const _=e.ref(!1),y=async()=>{if(!_.value)try{v=(await import("lunar-typescript")).Lunar,_.value=!0}catch(G){ve.warn("ClCalendarM","农历插件加载失败,本次不显示农历",G)}},B=G=>{if(!v)return"";try{const ne=v.fromDate(G),j=ne.getFestivals();if(n.isNonEmptyString(j[0]))return j[0];const te=ne.getJieQi();if(n.isNonEmptyString(te))return te;const re=ne.getDayInChinese();return n.isNonEmptyString(re)?re:""}catch(ne){return ve.warn("ClCalendarM","农历计算异常,该格不显示农历",ne),""}},A=G=>{const ne=j=>j.some(te=>_e.objDay(te).isSame(G,"day"));if(M.value.length>0&&ne(M.value))return{text:"班"};if(E.value.length>0&&ne(E.value))return{text:"休"};if(w.value){const j=_e.objDay(G).day();if(j===0||j===6)return{text:"休"}}return null},F=G=>{const ne=_e.objDay(G);return ne.isValid()?ne.startOf("day").toDate():_e.objDay().startOf("day").toDate()},P=(G,ne)=>_e.objDay(G).isSame(_e.objDay(ne),"day"),H=G=>_e.objDay({year:G.year,month:G.month-1,day:G.day}).toDate(),$=()=>{const G=i.defaultDate;return G===null?[]:Array.isArray(G)?G.map(ne=>F(ne)):[F(G)]},z=G=>{const ne=_e.objDay();return G.length>0?{year:_e.objDay(G[0]).year(),month:_e.objDay(G[0]).month()+1}:{year:ne.year(),month:ne.month()+1}};(()=>{N.value=$(),d.value==="range"&&N.value.length>1&&(N.value=[...N.value].sort((ne,j)=>ne.getTime()-j.getTime())),x=[...N.value];const G=z(N.value);L.value=G.year,D.value=G.month})();const oe=()=>{d.value=Fn.indexOf(i.type)!==-1?i.type:"single",m.value=i.isPoppable,p.value=i.title,f.value=i.isShowConfirm,h.value=i.confirmText,g.value=i.isShowCancel,S.value=i.cancelText,T.value=i.isShowLunar,V.value=i.color,I.value=n.isFinite(i.maxRange)&&i.maxRange>0?i.maxRange:0},Z=G=>{let ne=L.value,j=D.value+G;j<1&&(j=12,ne-=1),j>12&&(j=1,ne+=1),L.value=ne,D.value=j,u("onMonthChange",ne,j)},W=()=>{r.value=!1},Y=()=>{const G=N.value;let ne=null;G.length>0&&(d.value==="single"?ne=G[0]:ne=[...G]),u("onConfirm",ne),W()};e.watch(()=>i.show,G=>{G?(oe(),x=[...N.value],r.value=!0):r.value=!1},{immediate:!0}),e.watch(r,G=>{u("update:show",G)}),e.watch(T,G=>{G&&y()},{immediate:!0});const q=()=>{Z(-1)},J=()=>{Z(1)},U=G=>{if(G.disabled)return;const ne=H(G);if(d.value==="single")N.value=[ne],u("onSelect",ne),f.value||Y();else if(d.value==="multiple"){const j=N.value.findIndex(te=>P(te,ne));if(j!==-1)N.value.splice(j,1),u("onUnSelect",ne),f.value||Y();else{if(I.value>0&&N.value.length>=I.value){u("onOverRange");return}N.value.push(ne),u("onSelect",ne),f.value||Y()}}else if(N.value.length===0)N.value=[ne],u("onSelect",ne);else if(N.value.length===1){const j=N.value[0];if(P(j,ne))N.value=[j,ne],u("onSelect",ne),f.value||Y();else{const te=ne.getTime()<j.getTime()?ne:j,re=ne.getTime()<j.getTime()?j:ne,pe=Math.round((re.getTime()-te.getTime())/864e5)+1;if(I.value>0&&pe>I.value){u("onOverRange");return}N.value=[te,re],u("onSelect",ne),f.value||Y()}}else N.value=[ne],u("onSelect",ne)},ae=()=>{Y()},ee=()=>{N.value=[...x],u("onCancel"),W()};return(G,ne)=>m.value?(e.openBlock(),e.createBlock(kt,{key:0,show:r.value,"onUpdate:show":ne[0]||(ne[0]=j=>r.value=j),position:"bottom",isRound:!0,isCloseOnClickOverlay:!1,className:k.value,"teleport-target":a.teleportTarget},{default:e.withCtx(()=>[e.createVNode(Ll,e.mergeProps({id:e.unref(c),className:b.value},C.value,{onOnClickDay:U,onOnPrevMonth:q,onOnNextMonth:J,onOnConfirm:ae,onOnCancel:ee}),null,16,["id","className"])]),_:1},8,["show","className","teleport-target"])):(e.openBlock(),e.createBlock(Ll,e.mergeProps({key:1,id:e.unref(c),className:b.value},C.value,{onOnClickDay:U,onOnPrevMonth:q,onOnNextMonth:J,onOnConfirm:ae,onOnCancel:ee}),null,16,["id","className"]))}}),RS=["id"],HS={key:0,class:"panel-cell__left-icon"},zS={class:"panel-cell__body"},US={key:0,class:"panel-cell__title"},JS={key:0,class:"panel-cell__right-icon"},Ei=e.defineComponent({name:"ClCell",__name:"Index",props:{id:String,className:String,label:String,leftIcon:String,rightIcon:String,size:{type:String,default:"default"},url:{type:[String,Object],default:void 0},isReplace:{type:Boolean,default:!1},isOutside:{type:Boolean,default:!1},isBorderBottom:{type:Boolean,default:!0},isShowClickEffect:{type:Boolean,default:!0}},emits:{onClick:a=>!0},setup(a,{emit:l}){const o=a,t=l,s=o.id,i=Er.useRouter(),u=e.computed(()=>o.url?!r(o.url):!1),c=e.computed(()=>{let m={"panel-cell":!0};return m=n.getJsonMerge(m,ue.getClassNameJson(o.className)),o.isBorderBottom&&(m["panel-cell--border-bottom"]=!0),(o.isShowClickEffect||u.value)&&(m["panel-cell--clickable"]=!0),o.size==="large"&&(m["panel-cell--large"]=!0),m}),r=m=>n.isArray(m)?!0:n.isObject(m)?Object.keys(m).length===0:!1,d=m=>{t("onClick",m),o.url&&(r(o.url)||(o.isOutside?n.isNonEmptyString(o.url)?o.isReplace?window.location.replace(o.url):window.location.href=o.url:ve.warn("ClCell","警告:isOutside 为 true 时 url 必须为字符串类型"):(o.isReplace?i.replace(o.url):i.push(o.url)).catch(f=>{ve.warn("ClCell","路由跳转失败",f)})))};return(m,p)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(c.value),onClick:d},[a.leftIcon||m.$slots.left?(e.openBlock(),e.createElementBlock("div",HS,[e.renderSlot(m.$slots,"left",{},()=>[a.leftIcon?(e.openBlock(),e.createBlock(fe,{key:0,name:a.leftIcon,className:"panel-cell__left-icon-inner"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",zS,[e.renderSlot(m.$slots,"default",{},()=>[a.label?(e.openBlock(),e.createElementBlock("div",US,e.toDisplayString(a.label),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),a.rightIcon||m.$slots.right?(e.openBlock(),e.createElementBlock("div",JS,[e.renderSlot(m.$slots,"right",{},()=>[a.rightIcon?(e.openBlock(),e.createBlock(fe,{key:0,name:a.rightIcon,className:"panel-cell__right-icon-inner"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,RS))}}),KS=["id"],WS="transform 0.3s cubic-bezier(0.32, 0.72, 0, 1)",$l=2,jS=5,Bi=e.defineComponent({name:"ClCellSwipe",__name:"Index",props:{id:String,className:String,leftWidth:{type:Number,default:0},rightWidth:{type:Number,default:0},isDisabled:{type:Boolean,default:!1},isConfirm:{type:Boolean,default:!1}},emits:["onClick","onClickLeft","onClickRight","onOpen","onClose"],setup(a,{emit:l}){const o=a,t=l,s=o.id;let i=0,u=0;const c=e.ref(!1),r=e.ref(0);let d=!1,m=!1;const p=e.ref(!1),f=$=>n.isFinite($)&&$>0?$:0,h=e.computed(()=>f(o.leftWidth)),g=e.computed(()=>f(o.rightWidth)),S=e.computed(()=>h.value>0),T=e.computed(()=>g.value>0),w=e.computed(()=>{const $={"panel-cell-swipe":!0};return c.value&&($["cellswipe-is-dragging"]=!0),n.getJsonMerge($,ue.getClassNameJson(o.className))}),E=e.computed(()=>({width:`${h.value}px`})),M=e.computed(()=>({width:`${g.value}px`})),V=e.computed(()=>({transform:`translateX(${r.value}px)`,transition:c.value?"none":WS})),I=$=>Math.min(Math.max($,-g.value),h.value),N=$=>{let z=!1;$<0&&g.value>0?Math.abs($)>=g.value/$l?(r.value=-g.value,z=!0):r.value=0:$>0&&h.value>0&&$>=h.value/$l?(r.value=h.value,z=!0):r.value=0,x(z)},x=$=>{$&&!d?(d=!0,t("onOpen")):!$&&d&&(d=!1,p.value=!1,t("onClose"))},L=$=>{i=$,u=r.value,m=!1,c.value=!0},D=$=>{if(!c.value||o.isDisabled)return;const z=$-i;Math.abs(z)>jS&&(m=!0),r.value=I(u+z)},O=()=>{c.value&&(c.value=!1,N(r.value))},X=$=>{if(o.isDisabled)return;const z=$.touches[0];z&&L(z.clientX)},Q=$=>{if(!c.value||o.isDisabled)return;const z=$.touches[0];z&&D(z.clientX)},R=()=>{O()},C=($=>B($)),k=(()=>A()),b=()=>{document.addEventListener("mousemove",C),document.addEventListener("mouseup",k)},v=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",k)},_=()=>{v(),c.value=!1},y=$=>{o.isDisabled||$.button===0&&(L($.clientX),b())},B=$=>{if(!(!c.value||o.isDisabled)){if($.buttons===0){A();return}D($.clientX)}},A=()=>{c.value&&(v(),O())};e.onBeforeUnmount(_),e.onDeactivated(_),e.watch([h,g],()=>{if(c.value)return;const $=I(r.value);r.value=$,x($!==0)}),e.watch(()=>o.isConfirm,$=>{$||(p.value=!1)});const F=()=>{if(m){m=!1;return}t("onClick"),r.value!==0&&(r.value=0,x(!1))},P=()=>{t("onClickLeft")},H=()=>{if(o.isConfirm){if(!p.value){p.value=!0;return}p.value=!1}t("onClickRight")};return($,z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(w.value),onTouchstart:X,onTouchmove:Q,onTouchend:R,onTouchcancel:R,onMousedown:y},[S.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cellswipe-left",style:e.normalizeStyle(E.value),onClick:P},[e.renderSlot($.$slots,"left")],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),T.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["cellswipe-right",{"cellswipe-right--confirming":p.value}]),style:e.normalizeStyle(M.value),onClick:H},[e.renderSlot($.$slots,"right",{confirming:p.value})],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",{class:"cellswipe-content",style:e.normalizeStyle(V.value),onClick:F},[e.renderSlot($.$slots,"default")],4)],42,KS))}}),YS=["id"],qS={key:0,class:"code-legend-m__head"},XS={key:0,class:"code-legend-m__title"},GS={key:2,class:"code-legend-m__remark"},QS={class:"code-legend-m__body"},ZS={class:"code-legend-m__drawer-head"},eb={class:"code-legend-m__drawer-actions"},tb={class:"code-legend-m__drawer-body"},nb={key:0,class:"code-legend-m__code"},ob={class:"code-legend-m__code-inner"},ab={key:1,class:"code-legend-m__code-slot"},Al=300,Fl=2e3,Go=1,xi=e.defineComponent({name:"ClCodeLegendM",__name:"Index",props:{id:String,className:String,title:String,source:String,isOverlay:{type:Boolean,default:!0},isCloseOnClickOverlay:{type:Boolean,default:!0},isSafeAreaInsetBottom:Boolean,duration:{type:Number,default:Al},zIndex:{type:Number,default:Fl},teleportTarget:{type:String,default:""}},emits:["onOpen","onOpened","onClose","onClosed","onClickOverlay"],setup(a,{emit:l}){const o=a,t=l,s=e.useSlots(),i=o.id,u=e.ref(!1),c=e.ref(u),r=e.computed(()=>n.isNonEmptyString(o.title)?o.title:""),d=e.computed(()=>n.isString(o.source)?o.source:""),m=e.computed(()=>n.isNonEmptyString(d.value)),p=e.computed(()=>n.isNonEmptyString(r.value)||!!s.remark),f=e.computed(()=>m.value||!!s.code),h=e.computed(()=>o.isOverlay),g=e.computed(()=>{const O=o.teleportTarget;return n.isNonEmptyString(O)&&/^[#.][A-Za-z_][\w-]*$/.test(O)?O:"body"}),S=e.computed(()=>o.teleportTarget==="self"),T=e.computed(()=>{const O=n.isNumber(o.duration)?o.duration:NaN;return n.isFinite(O)&&O>=0?O:Al}),w=e.computed(()=>{const O=n.isNumber(o.zIndex)?Math.round(o.zIndex):NaN;return n.isFinite(O)&&O>=0?O:Fl}),E=e.computed(()=>{const O={"code-legend-m":!0};return n.getJsonMerge(O,ue.getClassNameJson(o.className))}),M=e.computed(()=>({"code-legend-m__drawer":!0,"code-legend-m__drawer--safe-bottom":o.isSafeAreaInsetBottom})),V=e.computed(()=>({zIndex:Math.min(w.value,Number.MAX_SAFE_INTEGER-Go),"--codelgm-duration":`${T.value}ms`})),I=e.computed(()=>({zIndex:Math.min(w.value,Number.MAX_SAFE_INTEGER-Go)+Go,"--codelgm-duration":`${T.value}ms`})),N=()=>{f.value&&(u.value?t("onClose"):t("onOpen"),u.value=!u.value)},x=()=>{u.value&&(t("onClose"),u.value=!1)},L=()=>{u.value&&(t("onClickOverlay"),o.isCloseOnClickOverlay&&x())},D=()=>{u.value||(c.value=!1)};return e.watch(u,O=>{O&&(c.value=!0)}),(O,X)=>(e.openBlock(),e.createElementBlock("section",{id:e.unref(i),class:e.normalizeClass(E.value)},[p.value?(e.openBlock(),e.createElementBlock("header",qS,[r.value?(e.openBlock(),e.createElementBlock("div",XS,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),O.$slots.remark?(e.openBlock(),e.createElementBlock("div",GS,[e.renderSlot(O.$slots,"remark")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",QS,[e.renderSlot(O.$slots,"demo")]),f.value?(e.openBlock(),e.createElementBlock("footer",{key:2,class:"code-legend-m__foot",onClick:N},[X[0]||(X[0]=e.createElementVNode("span",{class:"code-legend-m__foot-text"},"查看源码",-1)),e.createVNode(fe,{name:"angle-up",className:"code-legend-m__foot-arrow"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),c.value?(e.openBlock(),e.createBlock(e.Teleport,{key:4,to:g.value,disabled:S.value},[e.createVNode(e.Transition,{name:"codelgm-fade",duration:T.value},{default:e.withCtx(()=>[u.value&&h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"code-legend-m__mask",role:"button","aria-label":"关闭",style:e.normalizeStyle(V.value),onClick:L},null,4)):e.createCommentVNode("",!0)]),_:1},8,["duration"]),e.createVNode(e.Transition,{name:"codelgm-slide-up",duration:T.value,onAfterLeave:D},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(M.value),role:"dialog","aria-modal":"true",style:e.normalizeStyle(I.value)},[e.createElementVNode("div",ZS,[X[1]||(X[1]=e.createElementVNode("span",{class:"code-legend-m__drawer-title"},"示例代码",-1)),e.createElementVNode("span",eb,[m.value?(e.openBlock(),e.createBlock(tn,{key:0,"text-label":d.value,"is-use-success":!0,className:"code-legend-m__copy"},null,8,["text-label"])):e.createCommentVNode("",!0),e.createVNode(fe,{name:"close",className:"code-legend-m__drawer-close",onClick:x})])]),e.createElementVNode("div",tb,[m.value?(e.openBlock(),e.createElementBlock("pre",nb,[e.createElementVNode("code",ob,e.toDisplayString(d.value),1)])):O.$slots.code?(e.openBlock(),e.createElementBlock("div",ab,[e.renderSlot(O.$slots,"code")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])],6)):e.createCommentVNode("",!0)]),_:3},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,YS))}}),lb=["id"],sb={class:"imgCropperM-container"},ib={key:0,class:"imgCropperM-upload"},rb=["id","name"],cb=["for"],ub={class:"frame-alignline"},db={key:0,class:"imgCropperM-loading-mask"},mb={class:"imgCropperM-btns"},pb={class:"imgCropperM-btns-row"},fb={key:0,class:"imgCropperM-btns-save"},hb={class:"panel-cropperM-preview"},gb={class:"cropperM-preview-body"},vb=["src"],yb={key:1,class:"cropperM-preview-empty"},Pl=320,kb=480,Ti=e.defineComponent({name:"ClCropperM",__name:"Index",props:{id:String,className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isCenterBox:{type:Boolean,default:!1},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!0},isShowPreview:{type:Boolean,default:!0},previewTeleportTarget:{type:String,default:""},previewShape:{type:String,default:"square"},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"}},emits:{onSubmit:a=>!0,onImgLoad:a=>!0,onRealTime:a=>!0},setup(a,{expose:l,emit:o}){const t=e.defineAsyncComponent(()=>import("cropper-next-vue").then($=>(Promise.resolve().then(()=>require("./index-Dyvby5gX.cjs")),$.VueCropper))),s=a,i=o,u=s.id||`cropperM-${n.getRandom(8)}`,c=e.useTemplateRef("refElCropper"),r=e.useTemplateRef("refElMain"),d=e.ref(!1),m=e.reactive({uploadAgainId:`btnImgCropperM_uploadAgain_${n.getRandom(8)}`,isInitImageLoading:!1}),p=e.ref(!1),f=e.reactive({url:"",w:0,h:0,imgStyle:{}}),h=e.reactive({img:"",wrapper:{width:300,height:300},cropLayout:{width:s.width,height:s.height},color:s.fillColor,outputSize:1,outputType:"png",full:!0,original:!1,maxSideLength:3e3,mode:"contain",centerBox:s.isCenterBox,centerWrapper:!1}),g=e.ref(!0),S=e.computed(()=>{const{alignLine:$}=s;return n.isNonEmptyString($)?$.split(","):[]}),T=e.computed(()=>{const $={"panel-cropper-m":!0};return n.getJsonMerge($,ue.getClassNameJson(s.className))}),w=e.computed(()=>s.previewShape==="round"),E=e.computed(()=>{const $=Math.max(1,f.w||s.width),z=Math.max(1,f.h||s.height),oe=Math.min(1,Pl/Math.max($,z));if(w.value){const Z=Math.round(Math.max($,z)*oe);return{width:`${Z}px`,height:`${Z}px`}}return{width:`${Math.round($*oe)}px`,height:`${Math.round(z*oe)}px`}}),M=e.computed(()=>{const $=Math.max(1,f.w||s.width),z=Math.max(1,f.h||s.height),oe=Math.min(1,Pl/Math.max($,z));return{width:`${Math.round($)}px`,height:`${Math.round(z)}px`,transform:`scale(${oe})`,transformOrigin:"0 0"}}),V=()=>{h.cropLayout={width:Math.max(1,s.width??1),height:Math.max(1,s.height??1)}},I=()=>{const $=r.value;if(!$)return;const z=$.clientWidth||300,oe=Math.max(1,s.width??1),Z=Math.max(1,s.height??1),W=Math.min(Math.round(z*Z/oe),kb);h.wrapper={width:z,height:W}},N=()=>{const{src:$}=s;let z="";if(n.isNonEmptyString($)){if($.substring(0,5)!=="data:")if(/^(http|https):\/\/[^\s]+$/.test($)){const oe=`_t=${new Date().getTime()}`,Z=$.indexOf("?")===-1?"?":"&";z=$+Z+oe}else z=$;else z=$;m.isInitImageLoading=!0}else m.isInitImageLoading=!1;h.img=z},x=()=>{V(),N()};let L=null;e.onMounted(()=>{e.nextTick(()=>{g.value&&(x(),I(),r.value&&(L=new ut({element:r.value,isDelay:!1,callback:()=>{I()}})))})}),e.onBeforeUnmount(()=>{g.value=!1,L?.destroy(),L=null}),e.watch(()=>s.src,($,z)=>{$!==z&&N()}),e.watch(()=>[s.width,s.height,s.fillColor,s.isCenterBox],([$,z,oe,Z],[W,Y,q,J])=>{($!==W||z!==Y)&&(V(),I()),oe!==q&&(h.color=oe),Z!==J&&(h.centerBox=Z)});const D=$=>{if(!$){m.isInitImageLoading=!1,i("onImgLoad",!1);return}const z=$.type==="success";m.isInitImageLoading=!1,i("onImgLoad",z)},O=$=>{$&&(f.url=$.url||"",f.w=$.w||0,f.h=$.h||0,f.imgStyle=$.img?{width:$.img.width,height:$.img.height,transform:$.img.transform}:{},i("onRealTime",{url:f.url,w:f.w,h:f.h,imgStyle:f.imgStyle}))},X=()=>{p.value=!0},Q=$=>{const z=$.currentTarget;!z||!z.files||z.files.length===0||(m.isInitImageLoading=!0,n.getBase64ByFile(z.files).then(oe=>{if(g.value){if(!oe){m.isInitImageLoading=!1;return}h.img=oe}}).catch(()=>{g.value&&(m.isInitImageLoading=!1)}))},R=()=>{},C=()=>{c.value?.zoomIn(.02)},k=()=>{c.value?.zoomOut(.02)},b=()=>{c.value?.rotateLeft()},v=()=>{c.value?.rotateRight()},_=()=>{c.value&&(m.isInitImageLoading=!0,c.value.reload())},y=($,z)=>{i("onSubmit",{success:!z,data:$,msg:z})},B=()=>{if(!c.value){y("","vue-cropper 实例未就绪");return}c.value.getCropData("base64").then($=>{y($,"")}).catch($=>{const z=n.isString($)?$:$?.message||"保存失败";y("",z)})};return l({getImageBase64:()=>c.value?c.value.getCropData("base64"):Promise.reject(new Error("vue-cropper 实例未就绪")),refresh:()=>{if(!c.value){ve.warn("ClCropperM","refresh 调用无效:vue-cropper 实例未就绪");return}c.value.reload()},loadingStart:()=>{d.value=!0},loadingStop:()=>{d.value=!1}}),($,z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(T.value)},[e.createElementVNode("div",sb,[a.isShowUpload?(e.openBlock(),e.createElementBlock("div",ib,[e.createElementVNode("input",{type:"file",id:m.uploadAgainId,name:m.uploadAgainId,accept:"image/jpg,image/jpeg,image/pjpeg,image/png,image/x-png",onChange:Q},null,40,rb),e.createElementVNode("label",{for:m.uploadAgainId},[e.createElementVNode("span",{class:"imgCropperM-upload-box","aria-label":"上传图片",role:"button",tabindex:"0",onClick:e.withModifiers(R,["stop"])},[e.createVNode(fe,{name:"upload"}),z[1]||(z[1]=e.createElementVNode("span",{class:"imgCropperM-upload-text"},"上传图片",-1))])],8,cb)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{ref_key:"refElMain",ref:r,class:"imgCropperM-main"},[e.createVNode(e.unref(t),e.mergeProps({ref_key:"refElCropper",ref:c},h,{onRealTime:O,onImgLoad:D}),{loading:e.withCtx(()=>[...z[2]||(z[2]=[])]),_:1},16),e.createElementVNode("div",ub,[S.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[z[3]||(z[3]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),z[4]||(z[4]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):S.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[z[5]||(z[5]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),z[6]||(z[6]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),z[7]||(z[7]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),z[8]||(z[8]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))]),d.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",db,[e.createVNode(He,{theme:"circleSpinner",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],512),e.createElementVNode("div",mb,[e.createElementVNode("div",pb,[e.createElementVNode("span",{class:"imgCropperM-btn","aria-label":"放大",role:"button",tabindex:"0",onClick:e.withModifiers(C,["stop"])},[e.createVNode(fe,{name:"search-plus"})]),e.createElementVNode("span",{class:"imgCropperM-btn","aria-label":"缩小",role:"button",tabindex:"0",onClick:e.withModifiers(k,["stop"])},[e.createVNode(fe,{name:"search-minus"})]),e.createElementVNode("span",{class:"imgCropperM-btn","aria-label":"左转90度",role:"button",tabindex:"0",onClick:e.withModifiers(b,["stop"])},[e.createVNode(fe,{name:"rotate-left"})]),e.createElementVNode("span",{class:"imgCropperM-btn","aria-label":"右转90度",role:"button",tabindex:"0",onClick:e.withModifiers(v,["stop"])},[e.createVNode(fe,{name:"rotate-right"})]),e.createElementVNode("span",{class:"imgCropperM-btn","aria-label":"重置",role:"button",tabindex:"0",onClick:e.withModifiers(_,["stop"])},[e.createVNode(fe,{name:"restore"})]),a.isShowPreview?(e.openBlock(),e.createElementBlock("span",{key:0,class:"imgCropperM-btn","aria-label":"预览",role:"button",tabindex:"0",onClick:e.withModifiers(X,["stop"])},[e.createVNode(fe,{name:"tupianyulan"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),a.isShowSave?(e.openBlock(),e.createElementBlock("div",fb,[e.createElementVNode("span",{class:"imgCropperM-btn-save","aria-label":"保存",role:"button",tabindex:"0",onClick:e.withModifiers(B,["stop"])},[e.createVNode(fe,{name:"save"}),z[9]||(z[9]=e.createElementVNode("span",{class:"imgCropperM-btn-save-text"},"保存",-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createVNode(kt,{show:p.value,"onUpdate:show":z[0]||(z[0]=oe=>p.value=oe),position:"bottom",isRound:"",isSafeAreaInsetBottom:"",isCloseOnClickOverlay:!0,"teleport-target":a.previewTeleportTarget||void 0},{default:e.withCtx(()=>[e.createElementVNode("div",hb,[z[10]||(z[10]=e.createElementVNode("div",{class:"cropperM-preview-head"},[e.createElementVNode("span",{class:"cropperM-preview-title"},"裁剪预览")],-1)),e.createElementVNode("div",gb,[f.url?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cropperM-preview-box",{"is-round":w.value}]),style:e.normalizeStyle(E.value)},[e.createElementVNode("div",{class:"cropperM-preview-inner",style:e.normalizeStyle(M.value)},[e.createElementVNode("img",{src:f.url,style:e.normalizeStyle(f.imgStyle),alt:"裁剪预览"},null,12,vb)],4)],6)):(e.openBlock(),e.createElementBlock("div",yb,"暂无预览数据"))])])]),_:1},8,["show","teleport-target"])],10,lb))}}),Sb=["id"],bb={class:"dropdownmenum-bar"},Di=e.defineComponent({name:"ClDropdownMenuM",__name:"Index",props:{id:String,className:String,activeColor:{type:String,default:"var(--cl-primary, #1088f0)"},direction:{type:String,default:"down",validator:a=>["down","up"].includes(a)},zIndex:{type:Number,default:2e3},duration:{type:Number,default:200},isOverlay:{type:Boolean,default:!0},isCloseOnClickOverlay:{type:Boolean,default:!0},isCloseOnClickOutside:{type:Boolean,default:!0},teleportTarget:{type:String,default:""}},emits:["onOpen","onClose","onOpened","onClosed","onClickOverlay"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.ref(-1);let c=0;const r=e.useTemplateRef("rootEl"),d=e.ref(!1),m=e.ref(!1),p=e.ref({top:0,left:0,width:0,bottom:0,baseTop:0,baseLeft:0,baseBottom:0}),f=e.computed(()=>t.direction==="up"?"up":"down"),h=e.computed(()=>t.activeColor),g=e.computed(()=>n.isFinite(t.duration)&&t.duration>0?t.duration:200),S=e.computed(()=>{const y=Number(t.zIndex);return n.isFinite(y)&&y>0?Math.round(y):2e3}),T=e.computed(()=>{const y=t.teleportTarget;return n.isNonEmptyString(y)&&/^[#.][A-Za-z_][\w-]*$/.test(y)?y:"body"}),w=e.computed(()=>t.teleportTarget==="self"),E=e.computed(()=>{const y={"panel-dropdown-menu-m":!0,"dropdownmenum--up":f.value==="up"};return n.getJsonMerge(y,ue.getClassNameJson(t.className))}),M=e.computed(()=>{const y=p.value,B={zIndex:S.value-1,left:0,right:0,"--dropdownmenum-duration":`${g.value}ms`};return f.value==="up"?(B.top=0,B.bottom=`${y.baseBottom-y.top}px`):(B.top=`${y.bottom-y.baseTop}px`,B.bottom=0),B}),V=()=>{const y=t.teleportTarget;if(n.isNonEmptyString(y)&&y.charAt(0)==="#"){const B=document.querySelector(y);if(B instanceof HTMLElement){let A=B;for(;A&&A!==document.body;){if(window.getComputedStyle(A).transform!=="none"){const P=A.getBoundingClientRect();return{top:P.top,left:P.left,bottom:P.bottom}}A=A.parentElement}}}return{top:0,left:0,bottom:window.innerHeight}},I=()=>{if(!r.value)return;const y=r.value.getBoundingClientRect(),B=V();p.value={top:y.top,left:y.left,width:y.width,bottom:y.bottom,baseTop:B.top,baseLeft:B.left,baseBottom:B.bottom}},N=()=>{u.value!==-1&&I()},x=()=>{window.addEventListener("scroll",N,!0),window.addEventListener("resize",N)},L=()=>{window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",N)},D=y=>{const B=u.value!==-1;u.value=y,y!==-1?B||s("onOpen"):B&&s("onClose")},O=()=>{s("onClickOverlay"),t.isCloseOnClickOverlay&&D(-1)},X=y=>{u.value===y?D(-1):D(y)},Q=y=>{D(y)},R=()=>{const y=c;return c++,y};e.provide("$DropdownMenuMTop",{activeIndex:u,direction:f,activeColor:h,zIndex:S,duration:g,teleportTo:T,isTeleportDisabled:w,barPos:p,registerItem:R,toggleItem:X,setActiveIndex:Q});const C=y=>{if(!t.isCloseOnClickOutside||u.value===-1)return;const B=y.target??null;B instanceof Element&&B.closest(".dropdownmenum-panel, .dropdownmenum-overlay")||r.value&&r.value.contains(B)||D(-1)};e.watch(u,y=>{y!==-1?(d.value=!0,I(),x(),e.nextTick(()=>{u.value!==-1&&t.isOverlay&&(m.value=!0)})):(m.value=!1,t.isOverlay||(d.value=!1),L())});const k=()=>{u.value===-1&&(d.value=!1),s("onClosed")};return e.onMounted(()=>{document.addEventListener("click",C)}),e.onActivated(()=>{document.addEventListener("click",C),u.value!==-1&&(I(),x())}),e.onDeactivated(()=>{document.removeEventListener("click",C),L()}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C),L()}),l({toggle:y=>{X(y)},open:y=>{D(y)},close:()=>{D(-1)}}),(y,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:r,id:e.unref(i),class:e.normalizeClass(E.value)},[e.createElementVNode("div",bb,[e.renderSlot(y.$slots,"default")]),d.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:T.value,disabled:w.value},[e.createVNode(e.Transition,{name:"dropdownmenum-fade",duration:g.value,onAfterEnter:B[0]||(B[0]=A=>s("onOpened")),onAfterLeave:k},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dropdownmenum-overlay",style:e.normalizeStyle(M.value),onClick:O},null,4)):e.createCommentVNode("",!0)]),_:1},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Sb))}}),wb=["id"],Cb={class:"dropdownmenum-item-title-text"},Eb={key:0,class:"dropdownmenum-panel-loading"},Bb={key:0,class:"dropdownmenum-options"},xb=["onClick"],Tb={class:"dropdownmenum-option-text"},Ii=e.defineComponent({name:"ClDropdownMenuMItem",__name:"Item",props:{id:String,className:String,title:String,modelValue:{type:[String,Number],default:void 0},optionsList:{type:Array,default:()=>[]},optionLabel:{type:String,default:"text"},optionValue:{type:String,default:"value"},disabled:Boolean,isLoading:Boolean},emits:["update:modelValue","onChange"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=`dropdownmenumItem-${n.getRandom(5)}`,u=e.inject("$DropdownMenuMTop"),c=e.useSlots(),r=e.ref(-1),d=e.ref(!1),m=e.ref(!1),p=e.computed(()=>r.value!==-1&&u?.activeIndex.value===r.value),f=e.computed(()=>u?.direction.value||"down"),h=e.computed(()=>{const C=f.value==="up";return p.value?C?"caret-down":"caret-up":C?"caret-up":"caret-down"}),g=e.computed(()=>u?.duration.value||200),S=e.computed(()=>!!c.default),T=e.computed(()=>Array.isArray(o.optionsList)&&o.optionsList.length>0),w=e.computed(()=>p.value&&!o.disabled),E=e.computed(()=>u?.teleportTo.value||"body"),M=e.computed(()=>!!u?.isTeleportDisabled.value),V=C=>C[o.optionValue]===o.modelValue,I=C=>{const k=C[o.optionLabel];return n.isString(k)?k:n.isNumber(k)?String(k):""},N=e.computed(()=>{if(n.isNonEmptyString(o.title))return o.title;if(n.isEmpty(o.modelValue))return"";const C=(o.optionsList||[]).find(k=>k[o.optionValue]===o.modelValue);return C?I(C):""}),x=e.computed(()=>{const C={"dropdownmenum-item":!0,"dropdownmenum-item--disabled":o.disabled};return n.getJsonMerge(C,ue.getClassNameJson(o.className))}),L=e.computed(()=>p.value&&u?{color:u.activeColor.value}:void 0),D=e.computed(()=>{const C=u?.barPos.value,k={zIndex:u?.zIndex.value||2e3,"--dropdownmenum-duration":`${g.value}ms`};return C&&(f.value==="up"?(k.bottom=`${C.baseBottom-C.top}px`,k.left=`${C.left-C.baseLeft}px`):(k.top=`${C.bottom-C.baseTop}px`,k.left=`${C.left-C.baseLeft}px`),k.width=`${C.width}px`),k}),O=C=>{const k={"dropdownmenum-option":!0,"dropdownmenum-option--disabled":!!C.disabled,"dropdownmenum-option--selected":V(C)};return n.getJsonMerge(k,ue.getClassNameJson(C.className))};e.watch(w,C=>{C?(d.value=!0,e.nextTick(()=>{w.value&&(m.value=!0)})):m.value=!1});const X=()=>{w.value||(d.value=!1)};e.onMounted(()=>{if(!u){ve.warn("ClDropdownMenuMItem","警告:必须放置在 cl-dropdown-menu-m 容器内使用");return}r.value=u.registerItem()}),e.onBeforeUnmount(()=>{u&&r.value!==-1&&u.activeIndex.value===r.value&&u.setActiveIndex(-1)});const Q=()=>{o.disabled||!u||u.toggleItem(r.value)},R=C=>{if(C.disabled)return;const k=C[o.optionValue];t("update:modelValue",k),t("onChange",k),u?.setActiveIndex(-1)};return(C,k)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(x.value)},[e.createElementVNode("div",{class:e.normalizeClass(["dropdownmenum-item-title",{"dropdownmenum-item-title--active":p.value}]),style:e.normalizeStyle(L.value),onClick:Q},[e.createElementVNode("span",Cb,[e.renderSlot(C.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(N.value),1)])]),e.createVNode(fe,{class:"dropdownmenum-item-arrow",name:h.value},null,8,["name"])],6),d.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:E.value,disabled:M.value},[e.createVNode(e.Transition,{name:"dropdownmenum-panel",duration:g.value,onAfterLeave:X},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["dropdownmenum-panel",{"dropdownmenum-panel--up":f.value==="up"}]),style:e.normalizeStyle(D.value)},[S.value?e.renderSlot(C.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.isLoading?(e.openBlock(),e.createElementBlock("div",Eb,[e.createVNode(He,{size:"small"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[T.value?(e.openBlock(),e.createElementBlock("ul",Bb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.optionsList,(b,v)=>(e.openBlock(),e.createElementBlock("li",{key:`${i}-${v}`,class:e.normalizeClass(O(b)),onClick:_=>R(b)},[e.createElementVNode("span",Tb,e.toDisplayString(I(b)),1),V(b)?(e.openBlock(),e.createBlock(fe,{key:0,class:"dropdownmenum-option-check",name:"check"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,xb))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],64))],6)):e.createCommentVNode("",!0)]),_:3},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,wb))}}),Db=["id"],Rl=6,Ib="left 0.3s cubic-bezier(0.32, 0.72, 0, 1), top 0.3s cubic-bezier(0.32, 0.72, 0, 1)",_i=e.defineComponent({name:"ClFloatingBubble",__name:"Index",props:{id:String,className:String,teleportTarget:{type:String,default:""},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},axis:{type:String,default:"xy",validator:a=>["x","y","xy"].indexOf(a)!==-1},magnetic:{type:String,default:"",validator:a=>["","x","y"].indexOf(a)!==-1},gap:{type:Number,default:8},isDisabled:{type:Boolean,default:!1}},emits:["update:offsetX","update:offsetY","onOffsetChange","onClick"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.useTemplateRef("elRef"),u=e.ref(0),c=e.ref(0),r=e.ref(0),d=e.ref(0);let m=0,p=0,f=0,h=0;const g=e.ref(!1);let S=!1,T=null;const w=()=>typeof o.gap=="number"&&n.isFinite(o.gap)&&o.gap>=0?o.gap:0,E=$=>typeof $=="number"&&n.isFinite($)?$:0,M=e.computed(()=>{const $={"panel-floating-bubble":!0};return n.getJsonMerge($,ue.getClassNameJson(o.className))}),V=e.ref(!1),I=()=>{if(!n.isNonEmptyString(o.teleportTarget))return null;try{return i.value?.closest(o.teleportTarget)||null}catch{return null}},N=()=>{V.value=!!I()},x=e.computed(()=>({left:`${E(o.offsetX)}px`,top:`${E(o.offsetY)}px`,position:V.value?"absolute":"fixed",transition:g.value?"none":Ib})),L=$=>{const z=w(),oe=Math.max(0,u.value-r.value-z);return Math.min(Math.max($,z),Math.max(z,oe))},D=$=>{const z=w(),oe=Math.max(0,c.value-d.value-z);return Math.min(Math.max($,z),Math.max(z,oe))},O=($,z)=>{let oe=$,Z=z;const W=w();if(o.magnetic==="x"&&o.axis!=="y"){const Y=$-W,q=u.value-r.value-W-$;oe=Y<=q?W:Math.max(W,u.value-r.value-W)}else if(o.magnetic==="y"&&o.axis!=="x"){const Y=z-W,q=c.value-d.value-W-z;Z=Y<=q?W:Math.max(W,c.value-d.value-W)}return{x:oe,y:Z}},X=()=>{const $=I();if($){const z=$.getBoundingClientRect();u.value=z.width,c.value=z.height}else u.value=window.innerWidth,c.value=window.innerHeight;i.value&&(r.value=i.value.offsetWidth,d.value=i.value.offsetHeight)};let Q=null,R=null;const C=()=>{X();const $=L(E(o.offsetX)),z=D(E(o.offsetY));($!==o.offsetX||z!==o.offsetY)&&(t("update:offsetX",$),t("update:offsetY",z),t("onOffsetChange",$,z))},k=($,z)=>{S=!1,!o.isDisabled&&(m=$,p=z,f=E(o.offsetX),h=E(o.offsetY),g.value=!0)},b=($,z)=>{if(!g.value||o.isDisabled)return;const oe=$-m,Z=z-p;(Math.abs(oe)>Rl||Math.abs(Z)>Rl)&&(S=!0);let W=f+oe,Y=h+Z;o.axis==="x"&&(Y=h),o.axis==="y"&&(W=f),W=L(W),Y=D(Y),t("update:offsetX",W),t("update:offsetY",Y),t("onOffsetChange",W,Y)},v=()=>{if(g.value&&(g.value=!1,o.magnetic)){const $=O(E(o.offsetX),E(o.offsetY));t("update:offsetX",$.x),t("update:offsetY",$.y),t("onOffsetChange",$.x,$.y)}},_=$=>{const z=$.touches[0];z&&k(z.clientX,z.clientY)},y=$=>{const z=$.touches[0];z&&b(z.clientX,z.clientY)},B=()=>{v()},A=$=>{if(T===null){T=$.pointerId,k($.clientX,$.clientY);try{i.value?.setPointerCapture($.pointerId)}catch{}}},F=$=>{T===$.pointerId&&b($.clientX,$.clientY)},P=$=>{if(T===$.pointerId){T=null,v();try{i.value?.releasePointerCapture($.pointerId)}catch{}}},H=()=>{S||t("onClick")};return e.onMounted(()=>{N(),X(),window.addEventListener("resize",C),e.watch(()=>o.teleportTarget,()=>{N(),X()});const $=L(E(o.offsetX)),z=D(E(o.offsetY));if(($!==o.offsetX||z!==o.offsetY)&&(t("update:offsetX",$),t("update:offsetY",z),t("onOffsetChange",$,z)),i.value&&typeof ResizeObserver<"u"){Q=new ResizeObserver(()=>{X()}),Q.observe(i.value);const oe=I();oe&&(R=new ResizeObserver(()=>{X()}),R.observe(oe))}}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",C),Q?.disconnect(),Q=null,R?.disconnect(),R=null}),($,z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),ref_key:"elRef",ref:i,class:e.normalizeClass(M.value),style:e.normalizeStyle(x.value),onTouchstart:_,onTouchmove:y,onTouchend:B,onTouchcancel:B,onPointerdown:A,onPointermove:F,onPointerup:P,onPointercancel:P,onClick:H},[e.renderSlot($.$slots,"default")],46,Db))}}),_b=["id"],Nb={key:1,class:"floatingpanel-content"},Hl=300,zl=2e3,Vb=100,Mb=500,Ni=e.defineComponent({name:"ClFloatingPanel",__name:"Index",props:{id:String,className:String,show:Boolean,height:{type:Number,default:300},anchorsArr:{type:Array,default:()=>[100,300,500]},isOverlay:{type:Boolean,default:!0},isCloseOnClickOverlay:{type:Boolean,default:!0},isDraggable:{type:Boolean,default:!0},isContentDraggable:{type:Boolean,default:!1},isSnap:{type:Boolean,default:!0},isLockScroll:{type:Boolean,default:!0},isSafeAreaInsetBottom:Boolean,duration:{type:Number,default:Hl},zIndex:{type:Number,default:zl},teleportTarget:{type:String,default:""}},emits:["update:show","update:height","onHeightChange","onOpen","onOpened","onClose","onClosed","onClickOverlay"],setup(a,{emit:l}){const o=a,t=l,s=o.id;let i=0,u=0;const c=e.ref(!1),r=e.ref(0);let d="";const m=e.computed(()=>o.show),p=e.computed(()=>o.isOverlay),f=e.computed(()=>o.isContentDraggable),h=e.computed(()=>c.value?"none":`height ${T.value}ms cubic-bezier(0.32, 0.72, 0, 1)`),g=e.computed(()=>n.isNonEmptyString(o.teleportTarget)?o.teleportTarget:"body"),S=e.computed(()=>o.teleportTarget==="self"),T=e.computed(()=>{const Y=Number(o.duration);return n.isFinite(Y)&&Y>0?Y:Hl}),w=e.computed(()=>{const Y=Number(o.zIndex);return n.isFinite(Y)?Y:zl}),E=()=>Array.isArray(o.anchorsArr)?o.anchorsArr.map(Number).filter(Y=>n.isFinite(Y)&&Y>0):[],M=e.computed(()=>{const Y=E();return Y.length>0?Math.min(...Y):Vb}),V=e.computed(()=>{const Y=E();return Y.length>0?Math.max(...Y):Mb}),I=e.computed(()=>Math.max(V.value,r.value)),N=e.computed(()=>{const Y=Number(o.height),q=n.isFinite(Y)?Y:M.value;return Math.min(Math.max(q,M.value),I.value)}),x=e.computed(()=>{let Y={"panel-floating-panel":!0,"panel-floating-panel--safe-bottom":o.isSafeAreaInsetBottom};return Y=n.getJsonMerge(Y,ue.getClassNameJson(o.className)),Y}),L=e.computed(()=>({zIndex:w.value,"--floatingpanel-duration":`${T.value}ms`})),D=e.computed(()=>({zIndex:w.value+1,height:`${N.value}px`,transition:h.value,"--floatingpanel-duration":`${T.value}ms`})),O=()=>{const Y=o.teleportTarget;if(n.isNonEmptyString(Y)&&Y!=="body"&&Y!=="self"){const q=document.querySelector(Y);return q instanceof HTMLElement?q:null}return document.body},X=()=>{const Y=o.teleportTarget;if(n.isNonEmptyString(Y)&&Y!=="body"&&Y!=="self"){const q=document.querySelector(Y);if(q instanceof HTMLElement&&q.clientHeight>0)return q.clientHeight}return Y==="self"?V.value:window.innerHeight};let Q=!1,R=null;const C=()=>{if(Q)return;const Y=O();Y&&(Q=!0,R=Y,ao(Y))},k=()=>{Q&&(Q=!1,lo(R),R=null)},b=Y=>{i=Y,u=N.value,r.value=X(),c.value=!0},v=Y=>{if(!c.value||!o.isDraggable)return;const q=i-Y,J=u+q,U=Math.min(Math.max(J,M.value),r.value);U!==N.value&&(t("update:height",U),t("onHeightChange",U,!0))},_=()=>{if(c.value=!1,!o.isSnap)return;const Y=E();if(Y.length===0)return;const q=N.value,J=[...Y,r.value];let U=J[0],ae=Math.abs(q-U);J.forEach(ee=>{const G=Math.abs(q-ee);G<ae&&(ae=G,U=ee)}),U=Math.min(U,r.value),U!==q&&(t("update:height",U),t("onHeightChange",U,!1))},y=Y=>{if(!o.isDraggable||d!=="")return;d="pointer";const q=Y.currentTarget;if(q instanceof HTMLElement&&typeof q.setPointerCapture=="function")try{q.setPointerCapture(Y.pointerId)}catch{}b(Y.clientY)},B=Y=>{d==="pointer"&&v(Y.clientY)},A=()=>{d==="pointer"&&(d="",_())},F=Y=>{if(!o.isDraggable||d!=="")return;const q=Y.touches[0];q&&(d="touch",b(q.clientY))},P=Y=>{if(d!=="touch")return;const q=Y.touches[0];q&&v(q.clientY)},H=()=>{d==="touch"&&(d="",_())};e.onUnmounted(()=>{Q&&k()}),e.watch([()=>o.show,()=>o.isLockScroll],([Y,q])=>{Y&&q?C():k()},{immediate:!0});const $=()=>{t("onClickOverlay"),o.isCloseOnClickOverlay&&t("update:show",!1)},z=()=>{t("onOpen")},oe=()=>{t("onOpened")},Z=()=>{t("onClose")},W=()=>{t("onClosed")};return(Y,q)=>(e.openBlock(),e.createBlock(e.Teleport,{to:g.value,disabled:S.value},[e.createVNode(e.Transition,{name:"floatingpanel-fade",duration:T.value},{default:e.withCtx(()=>[m.value&&p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-floating-panel-overlay",style:e.normalizeStyle(L.value),onClick:$},null,4)):e.createCommentVNode("",!0)]),_:1},8,["duration"]),e.createVNode(e.Transition,{name:"floatingpanel-slide",duration:T.value,onEnter:z,onAfterEnter:oe,onLeave:Z,onAfterLeave:W},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),role:"dialog","aria-modal":"true",class:e.normalizeClass(x.value),style:e.normalizeStyle(D.value),onTouchstart:F,onTouchmove:P,onTouchend:H,onTouchcancel:H,onPointerdown:y,onPointermove:B,onPointerup:A,onPointercancel:A},[e.createElementVNode("div",{class:"floatingpanel-header",onTouchstart:e.withModifiers(F,["stop"]),onTouchmove:e.withModifiers(P,["stop"]),onTouchend:e.withModifiers(H,["stop"]),onTouchcancel:e.withModifiers(H,["stop"]),onPointerdown:e.withModifiers(y,["stop"]),onPointermove:e.withModifiers(B,["stop"]),onPointerup:e.withModifiers(A,["stop"]),onPointercancel:e.withModifiers(A,["stop"])},[q[0]||(q[0]=e.createElementVNode("div",{class:"floatingpanel-header-bar"},null,-1)),e.renderSlot(Y.$slots,"header")],32),f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"floatingpanel-content",onTouchstart:e.withModifiers(F,["stop"]),onTouchmove:e.withModifiers(P,["stop"]),onTouchend:e.withModifiers(H,["stop"]),onTouchcancel:e.withModifiers(H,["stop"]),onPointerdown:e.withModifiers(y,["stop"]),onPointermove:e.withModifiers(B,["stop"]),onPointerup:e.withModifiers(A,["stop"]),onPointercancel:e.withModifiers(A,["stop"])},[e.renderSlot(Y.$slots,"default")],32)):(e.openBlock(),e.createElementBlock("div",Nb,[e.renderSlot(Y.$slots,"default")]))],46,_b)):e.createCommentVNode("",!0)]),_:3},8,["duration"])],8,["to","disabled"]))}}),Ob=["id"],Lb=["onClick"],$b={key:0,class:"grid-item-icon"},Ab={class:"grid-item-text"},Fb={key:2,class:"grid-item-badge"},Pb=4,Vi=e.defineComponent({name:"ClGrid",__name:"Index",props:{id:String,className:String,itemsList:{type:Array,default:()=>[]},columnNum:{type:Number,default:4},isBorder:{type:Boolean,default:!0},isSquare:{type:Boolean,default:!0},isGutter:Boolean},emits:["onClickItem"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=`grid-${n.getRandom(5)}`,u=e.computed(()=>{const h=Number(o.columnNum);return!n.isFinite(h)||h<=0?Pb:Math.min(12,Math.round(h))}),c=e.computed(()=>n.isArray(o.itemsList)?o.itemsList.filter(h=>!!h&&n.isObject(h)):[]),r=e.computed(()=>{const h={"panel-grid":!0,"panel-grid--border":o.isBorder,"panel-grid--gutter":o.isGutter};return n.getJsonMerge(h,ue.getClassNameJson(o.className))}),d=e.computed(()=>({"--grid-columns":String(u.value)})),m=(h,g)=>{t("onClickItem",h,g)},p=(h,g)=>({"grid-item":!0,"grid-item--square":o.isSquare,"grid-item--first-row":g<u.value,"grid-item--has-icon":!!h.icon}),f=h=>{const g=Number(h.badge);return n.isFinite(g)&&g>0?Math.round(g):0};return(h,g)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(S,T)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-${T}`,class:e.normalizeClass(p(S,T)),onClick:w=>m(S,T)},[S.icon?(e.openBlock(),e.createElementBlock("span",$b,[e.createVNode(fe,{name:S.icon},null,8,["name"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",Ab,e.toDisplayString(S.text),1),f(S)>0?(e.openBlock(),e.createElementBlock("span",Fb,e.toDisplayString(f(S)),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Lb))),128))],14,Ob))}}),Rb=["id"],Hb={class:"indexbar-sidebar"},zb=["onClick","onTouchstart"],Ul="[data-indexbar-anchor]",Mi=e.defineComponent({name:"ClIndexBar",__name:"Index",props:{id:String,className:String,indexList:{type:Array,default:()=>[]},activeColor:String,scrollBehavior:{type:String,default:"smooth"}},emits:["onSelect"],setup(a,{emit:l}){const o=a,t=l,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),i=typeof document<"u"&&"scrollBehavior"in document.documentElement.style,u=`indexbar-${n.getRandom(5)}`,c=o.id,r=e.ref("");let d=!1;const m=e.useTemplateRef("refElContent");let p=null;const f=new Map,h=e.computed(()=>{if(n.isArray(o.indexList)&&o.indexList.length>0){const R=o.indexList.map(C=>n.isNonEmptyString(C)||n.isNumber(C)?String(C):"").filter(C=>C!=="");return Array.from(new Set(R))}return s}),g=e.computed(()=>{const R={"panel-index-bar":!0};return n.getJsonMerge(R,ue.getClassNameJson(o.className))}),S=e.computed(()=>({"--indexbar-active-color":o.activeColor||"var(--cl-primary, #1088f0)"})),T=()=>{const R=m.value;return R?Array.from(R.querySelectorAll(Ul)).map((k,b)=>{const v=k.dataset.indexbarAnchor,_=n.isNonEmptyString(v)?v:h.value[b]||"";return{el:k,letter:_}}):[]},w=R=>{let C=R.parentElement;for(;C;){const k=window.getComputedStyle(C).overflowY;if(/(auto|scroll|overlay)/.test(k))return C.scrollHeight>C.clientHeight?C===document.body||C===document.documentElement?document.scrollingElement:C:null;C=C.parentElement}return document.scrollingElement},E=R=>R===document.scrollingElement?0:R.getBoundingClientRect().top,M=()=>{const R=p;if(!R)return;I(R);const C=T();if(C.length===0)return;const k=E(R);let b="";for(const v of C){if(!v.letter)continue;if(v.el.getBoundingClientRect().top-k<=1)b=v.letter;else break}b&&b!==r.value&&(r.value=b)},V=R=>{const C=E(R),k=R.scrollTop;for(const b of T())f.set(b.el,b.el.getBoundingClientRect().top-C+k)},I=R=>{const C=E(R),k=R.scrollTop;for(const b of T()){const v=b.el,_=v.getBoundingClientRect().top;Math.abs(_-C)>1&&f.set(v,_-C+k)}},N=R=>{p!==R&&(p&&p.removeEventListener("scroll",M),p=R,R.addEventListener("scroll",M,{passive:!0}))},x=(R,C="auto")=>{if(!m.value)return;const b=T();if(b.length===0)return;const v=b.find(B=>B.letter===R)?.el||b[h.value.indexOf(R)]?.el;if(!v)return;const _=w(v);if(!_)return;N(_),I(_),f.has(v)||V(_);const y=f.get(v)||0;i&&C==="smooth"?_.scrollTo({top:y,behavior:"smooth"}):_.scrollTop=y},L=(R,C)=>{if(d){d=!1;return}r.value=R,t("onSelect",R,C),x(R,o.scrollBehavior==="smooth"?"smooth":"auto")},D=R=>{const C=h.value[R];C&&(d=!0,r.value=C,t("onSelect",C,R),x(C,"auto"))},O=R=>{const C=R.touches[0];if(!C)return;const k=R.currentTarget;if(!k)return;const b=k.parentElement;if(!b)return;const v=b.getBoundingClientRect(),_=Array.from(b.children);if(_.length===0)return;const y=C.clientY-v.top,B=Math.max(0,Math.min(_.length-1,Math.floor(y/(v.height/_.length)))),A=h.value[B];A&&A!==r.value&&(r.value=A,t("onSelect",A,B),x(A,"auto"))},X=R=>{const C=R.changedTouches[0];if(!C)return;const k=R.currentTarget;if(!k)return;const b=k.parentElement;if(!b)return;const v=b.getBoundingClientRect(),_=Array.from(b.children);if(_.length===0)return;const y=C.clientY-v.top;let B=Math.max(0,Math.min(_.length-1,Math.floor(y/(v.height/_.length))));const A=h.value[B];A&&(r.value=A,t("onSelect",A,B),x(A,"auto"))};e.onMounted(()=>{const R=m.value;if(!R)return;const C=R.querySelector(Ul);if(!C)return;const k=w(C);k&&(N(k),V(k))}),e.onBeforeUnmount(()=>{p&&(p.removeEventListener("scroll",M),p=null),f.clear()});const Q=R=>({"indexbar-letter":!0,"indexbar-letter--active":R===r.value});return(R,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(c),class:e.normalizeClass(g.value),style:e.normalizeStyle(S.value)},[e.createElementVNode("div",Hb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(k,b)=>(e.openBlock(),e.createElementBlock("span",{key:`${u}-${b}`,class:e.normalizeClass(Q(k)),onClick:v=>L(k,b),onTouchstart:v=>D(b),onTouchmove:O,onTouchend:X},e.toDisplayString(k),43,zb))),128))]),e.createElementVNode("div",{ref_key:"refElContent",ref:m,class:"indexbar-content"},[e.renderSlot(R.$slots,"default")],512)],14,Rb))}}),Ub=["id"],Jb=["disabled","maxlength","value"],Kb={class:"inputotp-cells"},Wb={key:0,class:"inputotp-separator"},jb=["onClick"],Yb={class:"inputotp-cell-value"},qb={key:0,class:"inputotp-cursor"},Xb=6,Gb=10,Oi=e.defineComponent({name:"ClInputOtp",__name:"Index",props:{id:String,className:String,modelValue:String,length:{type:Number,default:6},separator:String,separatorPosition:{type:Number,default:0},placeholder:String,autofocus:Boolean,isDisabled:{type:Boolean,default:!1},isClearable:{type:Boolean,default:!1},inputType:{type:String,default:"text",validator:a=>["text","number","password"].indexOf(a)!==-1}},emits:["update:modelValue","onChange","onFinish","onFocus","onBlur"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`inputotp-${n.getRandom(5)}`,u=t.id,c=e.useTemplateRef("inputRef"),r=e.ref(0),d=e.ref(!1),m=e.ref(t.modelValue||""),p=e.ref(!1),f=e.computed(()=>{const y=Number(t.length);return n.isFinite(y)&&y>0?Math.min(Math.max(Math.round(y),1),Gb):Xb}),h=e.computed(()=>t.separator||"-"),g=e.computed(()=>m.value),S=e.computed(()=>{const y=m.value;return t.inputType==="password"?y.split("").map(()=>"•").join(""):y}),T=e.computed(()=>t.isDisabled),w=e.computed(()=>t.isClearable),E=e.computed(()=>{const y={"panel-input-otp":!0,"panel-input-otp--disabled":T.value,"panel-input-otp--focused":d.value};return n.getJsonMerge(y,ue.getClassNameJson(t.className))}),M=e.computed(()=>{const y={};return y.autocomplete="one-time-code",y}),V=()=>{T.value||c.value?.focus()},I=y=>{c.value&&(c.value.value=y);const B=f.value;r.value=Math.min(y.length,B-1),y.length>=B?p.value||(p.value=!0,s("onFinish",y)):p.value=!1},N=()=>{V()},x=y=>{r.value=y,V()},L=y=>{const B=y.target;let A=B.value;t.inputType==="number"&&(A=A.replace(/\D/g,""));const F=f.value,P=A.slice(0,F);m.value=P,B.value!==P&&(B.value=P),s("update:modelValue",P),s("onChange",P),I(P)},D=y=>{if(y.key==="Backspace"){y.preventDefault();const B=m.value;if(B.length>0){const A=Math.max(0,Math.min(r.value,B.length-1)),F=B.slice(0,A)+B.slice(A+1);m.value=F,s("update:modelValue",F),s("onChange",F),I(F),r.value=Math.min(A,F.length)}else w.value&&(m.value="",s("update:modelValue",""),s("onChange",""),I(""))}else y.key==="ArrowLeft"?r.value=Math.max(0,r.value-1):y.key==="ArrowRight"?r.value=Math.min(f.value-1,r.value+1):y.key==="Enter"?c.value?.blur():y.key==="Escape"&&w.value&&(m.value="",s("update:modelValue",""),s("onChange",""),I(""))},O=()=>{d.value=!0,s("onFocus")},X=()=>{d.value=!1,s("onBlur")},Q=y=>{y.preventDefault();const B=y.clipboardData?.getData("text")||"",A=t.inputType==="number"?B.replace(/\D/g,""):B,F=f.value,P=A.slice(0,F);m.value=P,c.value&&(c.value.value=P),s("update:modelValue",P),s("onChange",P),I(P)},R=()=>{V()},C=()=>{m.value="",c.value&&(c.value.value=""),s("update:modelValue",""),s("onChange",""),p.value=!1,r.value=0,V()};e.onMounted(()=>{t.autofocus&&V()}),e.watch(()=>t.modelValue,y=>{const B=y||"";m.value=B,c.value&&(c.value.value=B),p.value=B.length>=f.value}),l({focus:R,clear:C});const k=y=>{const B=m.value,A=r.value===y&&d.value&&!t.isDisabled;return{"inputotp-cell":!0,"inputotp-cell--filled":y<B.length,"inputotp-cell--active":A}},b=y=>{const B=S.value;return y<B.length?B[y]:y===B.length&&n.isNonEmptyString(t.placeholder)?t.placeholder:""},v=y=>r.value===y&&d.value&&!t.isDisabled,_=y=>{if(!n.isNonEmptyString(t.separator))return!1;const B=t.separatorPosition>0?t.separatorPosition:Math.floor(f.value/2);return y===B+1&&y>1&&y<=f.value};return(y,B)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(E.value),onClick:N},[e.createElementVNode("input",e.mergeProps({ref_key:"inputRef",ref:c,class:"inputotp-hidden-input",disabled:T.value,type:"text"},M.value,{maxlength:f.value,value:g.value,onInput:L,onKeydown:D,onFocus:O,onBlur:X,onPaste:Q}),null,16,Jb),e.createElementVNode("div",Kb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,A=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${i}-${A}`},[_(A)?(e.openBlock(),e.createElementBlock("div",Wb,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(k(A-1)),onClick:F=>x(A-1)},[e.createElementVNode("span",Yb,e.toDisplayString(b(A-1)),1),v(A-1)?(e.openBlock(),e.createElementBlock("span",qb)):e.createCommentVNode("",!0)],10,jb)],64))),128))])],10,Ub))}}),Qb={key:0,class:"navbar-placeholder"},Zb=["id"],ew={key:1,class:"navbar-left-text"},tw={class:"navbar-title"},nw={class:"navbar-title-text"},ow={key:0,class:"navbar-right-text"},Jl=1e3,Li=e.defineComponent({name:"ClNavBar",__name:"Index",props:{id:String,className:String,title:String,leftText:String,rightText:String,isShow:{type:Boolean,default:!0},isShowLeftArrow:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},isSafeAreaInsetTop:Boolean,placeholder:Boolean,zIndex:{type:Number,default:Jl}},emits:["onClickLeft","onClickRight"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.useSlots(),u=e.computed(()=>!!o.placeholder&&!!o.isFixed),c=e.computed(()=>n.isNonEmptyString(o.leftText)?o.leftText:""),r=e.computed(()=>n.isNonEmptyString(o.rightText)?o.rightText:""),d=e.computed(()=>o.isShowLeftArrow||n.isNonEmptyString(o.leftText)||!!i.left),m=e.computed(()=>n.isNonEmptyString(o.rightText)||!!i.right),p=e.computed(()=>o.isShowLeftArrow),f=e.computed(()=>!!o.isShow),h=e.computed(()=>{const w={"panel-nav-bar":!0,"panel-nav-bar--fixed":o.isFixed,"panel-nav-bar--safe-top":o.isSafeAreaInsetTop};return n.getJsonMerge(w,ue.getClassNameJson(o.className))}),g=e.computed(()=>{const w=Number(o.zIndex);return{zIndex:n.isFinite(w)?w:Jl}}),S=()=>{t("onClickLeft")},T=()=>{t("onClickRight")};return(w,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",Qb,null,512)),[[e.vShow,f.value]]):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{id:e.unref(s),class:e.normalizeClass(h.value),style:e.normalizeStyle(g.value)},[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"navbar-left",onClick:S},[p.value?(e.openBlock(),e.createBlock(fe,{key:0,name:"angle-left",className:"navbar-arrow"})):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("span",ew,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),e.renderSlot(w.$slots,"left")])):e.createCommentVNode("",!0),e.createElementVNode("div",tw,[e.renderSlot(w.$slots,"title",{},()=>[e.createElementVNode("span",nw,e.toDisplayString(o.title),1)])]),m.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"navbar-right",onClick:T},[r.value?(e.openBlock(),e.createElementBlock("span",ow,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0),e.renderSlot(w.$slots,"right")])):e.createCommentVNode("",!0)],14,Zb),[[e.vShow,f.value]])],64))}}),aw=["id"],lw={class:"noticebar-content"},sw={class:"noticebar-text-default"},iw=1e3,rw=1e3,$i=e.defineComponent({name:"ClNoticeBar",__name:"Index",props:{id:String,className:String,text:String,mode:{type:String,validator:a=>a===""||a==="closeable"||a==="link"},color:String,background:String,leftIcon:String,isScrollable:{type:Boolean,default:!0},isWrapable:{type:Boolean,default:!1},speed:{type:Number,default:50},delay:{type:Number,default:1e3}},emits:["onClick","onClickLeftIcon","onClickRightIcon","onClose"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.useTemplateRef("refElWrap"),u=e.useTemplateRef("refElText"),c=e.ref(0);let r=0,d=0,m=null,p=null;const f=e.computed(()=>n.isNonEmptyString(o.leftIcon)),h=e.computed(()=>o.mode==="link"),g=e.computed(()=>{const N={"panel-notice-bar":!0,"panel-notice-bar--wrapable":o.isWrapable};return n.getJsonMerge(N,ue.getClassNameJson(o.className))}),S=e.computed(()=>({color:o.color,background:o.background})),T=e.computed(()=>({transform:`translateX(${-c.value}px)`})),w=()=>{if(d&&cancelAnimationFrame(d),d=0,m&&clearTimeout(m),m=null,c.value=0,!o.isScrollable||o.isWrapable)return;const N=i.value,x=u.value;if(!N||!x)return;const L=N.offsetWidth,D=x.scrollWidth;if(D<=L||!n.isFinite(o.speed)||o.speed<=0||!n.isFinite(o.delay)||o.delay<0)return;const O=D+L,X=O/o.speed*iw;!n.isFinite(X)||X<=0||(r=0,m=setTimeout(()=>{let Q=0;const R=C=>{if(Q){const b=C-Q;b<rw&&(r+=b)}Q=C;const k=r%X/X;c.value=k*O,d=requestAnimationFrame(R)};d=requestAnimationFrame(R)},o.delay))};e.onMounted(()=>{w(),i.value&&typeof ResizeObserver<"u"&&(p=new ResizeObserver(w),p.observe(i.value))}),e.onBeforeUnmount(()=>{d&&cancelAnimationFrame(d),m&&clearTimeout(m),p&&p.disconnect()}),e.watch([()=>o.isScrollable,()=>o.isWrapable,()=>o.speed,()=>o.delay,()=>o.text],w);const E=()=>{t("onClick")},M=()=>{t("onClickLeftIcon")},V=()=>{t("onClickRightIcon")},I=()=>{t("onClose")};return(N,x)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(g.value),style:e.normalizeStyle(S.value),onClick:E},[f.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"noticebar-left-icon",onClick:e.withModifiers(M,["stop"])},e.toDisplayString(o.leftIcon),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{ref_key:"refElWrap",ref:i,class:"noticebar-wrap"},[e.createElementVNode("div",lw,[e.createElementVNode("div",{ref_key:"refElText",ref:u,class:"noticebar-text",style:e.normalizeStyle(T.value)},[e.renderSlot(N.$slots,"default",{},()=>[e.createElementVNode("span",sw,e.toDisplayString(o.text),1)])],4)])],512),a.mode==="closeable"?(e.openBlock(),e.createBlock(fe,{key:2,name:"close",className:"noticebar-close-icon",onClick:e.withModifiers(I,["stop"])})):h.value?(e.openBlock(),e.createBlock(fe,{key:3,name:"angle-right",className:"noticebar-right-icon",onClick:e.withModifiers(V,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],14,aw))}}),cw=["id"],uw={class:"notifym-text"},Kl=2e3,Wl=3e3,dw=300,mw=300,Ma=e.defineComponent({name:"ClNotifyM",__name:"Index",props:{id:String,className:String,show:Boolean,message:String,type:{type:String,default:"primary"},color:String,background:String,duration:{type:Number,default:Wl},isLockScroll:Boolean,zIndex:{type:Number,default:Kl},teleportTarget:{type:String,default:""}},emits:["update:show","onClick","onClose"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=z=>n.isNumber(z)&&n.isFinite(z)?Math.max(0,Number(z)):Wl,u=z=>n.isNumber(z)&&n.isFinite(z)?Math.max(0,Number(z)):Kl,c=t.id,r=e.ref(!1),d=e.ref(t.message||""),m=e.ref(t.type),p=e.ref(t.color||""),f=e.ref(t.background||""),h=e.ref(i(t.duration)),g=e.ref(!!t.isLockScroll),S=e.ref(u(t.zIndex)),T=e.ref(t.teleportTarget||"");let w=null,E=!1;const M=new Set;let V=!1;const I=e.computed(()=>r.value),N=e.computed(()=>{const z=T.value;return n.isNonEmptyString(z)&&(z==="body"||z==="self"||/^[#.][A-Za-z_][\w-]*$/.test(z))?z:"body"}),x=e.computed(()=>T.value==="self"),L=e.computed(()=>dw),D=e.computed(()=>{const z={"panel-notify-m":!0,[`panel-notify-m--${m.value}`]:n.isNonEmptyString(m.value)};return n.getJsonMerge(z,ue.getClassNameJson(t.className))}),O=e.computed(()=>({zIndex:S.value,color:p.value,background:f.value,"--notifym-duration":`${L.value}ms`})),X=()=>{Q(),h.value>0&&(w=setTimeout(()=>{w=null,s("update:show",!1),!w&&r.value&&(w=setTimeout(()=>{w=null,y()},mw))},h.value))},Q=()=>{w&&(clearTimeout(w),w=null)},R=()=>{const z=T.value;if(n.isNonEmptyString(z)&&z!=="body"&&z!=="self"){const oe=document.querySelector(z);return oe instanceof HTMLElement?oe:null}return document.body},C=()=>{if(E)return;const z=R();z&&(E=!0,M.add(z),ao(z))},k=()=>{E&&(E=!1,M.forEach(z=>{lo(z)}),M.clear())};e.onMounted(()=>{I.value&&g.value&&!E&&C()}),e.onUnmounted(()=>{Q(),E&&k()});const b=()=>{d.value=t.message||"",m.value=t.type,p.value=t.color||"",f.value=t.background||"",h.value=i(t.duration),g.value=!!t.isLockScroll,S.value=u(t.zIndex),T.value=t.teleportTarget||""},v=()=>{g.value?C():k(),r.value=!0,V=!0,X()},_=(z,oe,Z="primary")=>{d.value=n.isNonEmptyString(z)?z:t.message||"",m.value=oe&&oe.type||Z,p.value=oe&&oe.color||t.color||"",f.value=oe&&oe.background||t.background||"",h.value=oe&&oe.duration!==void 0?i(oe.duration):i(t.duration);const W=oe&&oe.isLockScroll!==void 0?!!oe.isLockScroll:!!t.isLockScroll;g.value=W,S.value=oe&&oe.zIndex!==void 0?u(oe.zIndex):u(t.zIndex),T.value=oe&&oe.teleportTarget||t.teleportTarget||"",v()},y=()=>{Q(),k(),r.value=!1,V&&(V=!1,s("onClose"))};e.watch(()=>t.show,z=>{z?(b(),v()):y()},{immediate:!0}),e.watch(()=>[t.message,t.type,t.color,t.background,t.duration,t.zIndex,t.teleportTarget],()=>{b()}),e.watch(()=>t.isLockScroll,z=>{g.value=!!z,I.value&&(z?C():k())});const B=()=>{s("onClick")};return l({notify:(z,oe)=>{_(z,oe,"primary")},success:(z,oe)=>{_(z,oe,"success")},danger:(z,oe)=>{_(z,oe,"danger")},warning:(z,oe)=>{_(z,oe,"warning")},close:()=>{y()}}),(z,oe)=>(e.openBlock(),e.createBlock(e.Teleport,{to:N.value,disabled:x.value},[e.createVNode(e.Transition,{name:"notifym-fade",duration:L.value},{default:e.withCtx(()=>[I.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(c),class:e.normalizeClass(D.value),style:e.normalizeStyle(O.value),role:"alert",onClick:B},[e.createElementVNode("span",uw,e.toDisplayString(d.value),1)],14,cw)):e.createCommentVNode("",!0)]),_:1},8,["duration"])],8,["to","disabled"]))}}),pw={key:0,class:"numberkeyboard-title"},fw={class:"numberkeyboard-title-left"},hw={class:"numberkeyboard-title-text"},gw={class:"numberkeyboard-body"},vw=["onClick"],yw={class:"numberkeyboard-row"},kw=["onClick"],Ai=e.defineComponent({name:"ClNumberKeyboard",__name:"Index",props:{id:String,value:{type:String,default:""},className:String,show:Boolean,theme:{type:String,default:"default",validator:a=>["default","custom"].indexOf(a)!==-1},title:String,maxlength:{type:Number,default:1/0},extraKey:{type:[String,Array],default:""},closeButtonText:String,deleteButtonText:{type:String,default:"删除"},isShowDeleteKey:{type:Boolean,default:!0},isBlurOnClose:{type:Boolean,default:!0},isHideOnClickOutside:{type:Boolean,default:!0},isTransition:{type:Boolean,default:!0},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""},isOverlay:{type:Boolean,default:!1},scrollTarget:{type:[String,Object],default:""},isLockScroll:{type:Boolean,default:!0}},emits:["update:show","update:value","update:modelValue","onInput","onDelete","onClose","onBlur","onOpened","onHide"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`n-${n.getRandom(5)}`,u=t.id||`_elId_numberkeyboard-${n.getRandom(8)}`,c=e.ref(t.show),r=e.computed(()=>!n.isEmpty(t.title)||!n.isEmpty(t.closeButtonText)),d=e.computed(()=>!n.isEmpty(t.closeButtonText)),m=e.computed(()=>t.theme==="custom"),p=e.computed(()=>!!t.isHideOnClickOutside),f=e.computed(()=>t.isTransition?300:1),h=e.computed(()=>[["1","2","3"],["4","5","6"],["7","8","9"]]),g=e.computed(()=>{const C=t.extraKey;return n.isString(C)?n.isEmpty(C)?[]:[C]:Array.isArray(C)?C.filter(k=>n.isNonEmptyString(k)):[]}),S=e.computed(()=>{const C={"panel-number-keyboard":!0,"panel-number-keyboard--custom":m.value};return n.getJsonMerge(C,ue.getClassNameJson(t.className))}),T=e.computed(()=>{const C={"numberkeyboard-popup":!0};return n.getStringByJson(C," ")}),w=()=>{const C=Number(t.maxlength);return n.isFinite(C)&&C>=1?Math.floor(C):1/0};e.watch(c,C=>{s("update:show",C)}),e.watch(()=>t.show,C=>{c.value=C});const E=C=>{if(n.isEmpty(C))return;const k=n.isString(t.value)?t.value:"";k.length>=w()||(s("update:value",k+C),s("update:modelValue",k+C),s("onInput",C))},M=()=>{const C=n.isString(t.value)?t.value:"";n.isEmpty(C)||(s("update:value",C.slice(0,-1)),s("update:modelValue",C.slice(0,-1))),s("onDelete")},V=()=>{s("onClose"),t.isBlurOnClose&&s("onBlur"),c.value=!1},I=()=>{t.isBlurOnClose&&s("onBlur")},N=new Map,x=()=>{const C=t.scrollTarget;if(n.isNonEmptyString(C))try{const k=document.querySelector(C);return k instanceof HTMLElement?k:null}catch{return null}return C instanceof HTMLElement?C:null},L=C=>{let k=C.parentElement;for(;k;){const b=window.getComputedStyle(k).overflowY;if(b==="auto"||b==="scroll"||b==="overlay")return k;k=k.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:null},D=()=>{N.forEach((C,k)=>{k.style.paddingBottom=C}),N.clear()},O=()=>{const C=document.getElementById(u),k=C instanceof HTMLElement?C.offsetHeight:0;if(s("onOpened",k),k<=0)return;const b=x();if(!b)return;const v=L(b);if(!v)return;const _=v.getBoundingClientRect();if(_.height<=0)return;const y=b.getBoundingClientRect(),B=_.height-k,P=y.bottom-_.top-B+8;if(P<=0)return;N.has(v)||N.set(v,v.style.paddingBottom);const H=parseFloat(N.get(v)||"")||0;v.style.paddingBottom=`${H+P}px`,v.scrollTop+=P},X=()=>{D(),s("onHide")};return e.onUnmounted(()=>{D()}),l({getValue:()=>t.value,setValue:C=>s("update:value",C)}),(C,k)=>(e.openBlock(),e.createBlock(kt,{id:e.unref(u),className:T.value,show:c.value,"onUpdate:show":k[2]||(k[2]=b=>c.value=b),position:"bottom",isOverlay:a.isOverlay,duration:f.value,isCloseOnClickOverlay:p.value,isLockScroll:a.isLockScroll,zIndex:a.zIndex,teleportTarget:a.teleportTarget,onOnClosed:X,onOnClickOverlay:I,onOnOpened:O},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(S.value)},[r.value?(e.openBlock(),e.createElementBlock("div",pw,[e.createElementVNode("div",fw,[e.renderSlot(C.$slots,"titleLeft")]),e.createElementVNode("div",hw,e.toDisplayString(a.title),1),d.value?(e.openBlock(),e.createBlock(Qe,{key:0,className:"numberkeyboard-title-close",label:a.closeButtonText,color:"text",isShowWaves:!1,onOnClick:V},null,8,["label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",gw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(b,v)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-row-${v}`,class:"numberkeyboard-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b,_=>(e.openBlock(),e.createElementBlock("button",{key:`${i}-key-${_}`,type:"button",class:"numberkeyboard-key",onClick:y=>E(String(_))},e.toDisplayString(_),9,vw))),128))]))),128)),e.createElementVNode("div",yw,[m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("button",{type:"button",class:"numberkeyboard-key numberkeyboard-key--zero",onClick:k[0]||(k[0]=b=>E("0"))}," 0 "),a.isShowDeleteKey?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"numberkeyboard-key numberkeyboard-key--delete",onClick:M},[e.renderSlot(C.$slots,"delete",{},()=>[e.createTextVNode(e.toDisplayString(a.deleteButtonText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),d.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"numberkeyboard-key numberkeyboard-key--done",onClick:V},e.toDisplayString(a.closeButtonText),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(b,v)=>(e.openBlock(),e.createElementBlock("button",{key:`${i}-extra-${v}`,type:"button",class:"numberkeyboard-key numberkeyboard-key--extra",onClick:_=>E(String(b))},[e.renderSlot(C.$slots,"extraKey",{},()=>[e.createTextVNode(e.toDisplayString(b),1)])],8,kw))),128)),e.createElementVNode("button",{type:"button",class:"numberkeyboard-key",onClick:k[1]||(k[1]=b=>E("0"))}," 0 "),a.isShowDeleteKey?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"numberkeyboard-key numberkeyboard-key--delete",onClick:M},[e.renderSlot(C.$slots,"delete",{},()=>[e.createTextVNode(e.toDisplayString(a.deleteButtonText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))])])],2)]),_:3},8,["id","className","show","isOverlay","duration","isCloseOnClickOverlay","isLockScroll","zIndex","teleportTarget"]))}}),Sw=["id"],bw={key:0,class:"picker-toolbar"},ww={class:"picker-toolbar-title"},Cw={key:0,class:"picker-loading-mask"},Ew={key:2,class:"picker-toolbar picker-toolbar--bottom"},Bw={class:"picker-toolbar-title"},en=e.defineComponent({name:"ClPicker",__name:"Index",props:{id:String,value:{type:Array,default:()=>[]},className:String,columnsList:{type:Array,default:()=>[]},columnsFieldNames:{type:Object,default:()=>({})},title:String,confirmButtonText:{type:String,default:"确认"},cancelButtonText:{type:String,default:"取消"},toolbarPosition:{type:String,default:"top",validator:a=>["top","bottom"].indexOf(a)!==-1},isShowToolbar:{type:Boolean,default:!0},isLoading:Boolean,isReadonly:Boolean,isAllowHtml:Boolean,optionHeight:{type:Number,default:44},visibleOptionNum:{type:Number,default:6},swipeDuration:{type:Number,default:1e3}},emits:["update:value","update:modelValue","onConfirm","onCancel","onChange"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`picker-${n.getRandom(5)}`,u=t.id,c=e.ref([]),r=e.ref([]),d=e.computed(()=>({text:t.columnsFieldNames?.text||"text",value:t.columnsFieldNames?.value||"value",children:t.columnsFieldNames?.children||"children"})),m=e.computed(()=>n.isFinite(t.optionHeight)&&t.optionHeight>0?t.optionHeight:44),p=e.computed(()=>n.isFinite(t.visibleOptionNum)?Math.max(1,t.visibleOptionNum):6),f=e.computed(()=>n.isFinite(t.swipeDuration)?Math.max(0,t.swipeDuration):1e3),h=e.computed(()=>({height:`${p.value*m.value}px`})),g=e.computed(()=>({height:`${m.value}px`})),S=e.computed(()=>{let v={"panel-picker":!0,"picker-readonly":t.isReadonly};return v=n.getJsonMerge(v,ue.getClassNameJson(t.className)),v}),T=v=>{if(n.isString(v)||n.isNumber(v))return{text:String(v),value:v};if(n.getTypeof(v)==="object"&&v!==null){const _=v,y=_[d.value.text],B=_[d.value.value],A=_[d.value.children],F=n.isString(y)?y:n.isNumber(y)?String(y):"",P=n.isString(B)||n.isNumber(B)?B:"",H=Array.isArray(A)?A:void 0;return{text:F,value:P,disabled:!!_.disabled,children:H?H.map(T).filter($=>$!==null):void 0}}return null},w=()=>{const v=t.columnsList;if(!Array.isArray(v)||v.length===0)return!1;const _=v[0];return n.getTypeof(_)==="object"&&_!==null&&Array.isArray(_.values)},E=()=>{const v=t.columnsList;if(!Array.isArray(v)||v.length===0)return[];if(w())return v.map(A=>{const F=Array.isArray(A.values)?A.values.map(T).filter(H=>H!==null):[],P=n.isFinite(A.defaultIndex)?A.defaultIndex:0;return{options:F,defaultIndex:F.length>0?Math.min(Math.max(0,Math.floor(P)),F.length-1):0,className:n.isString(A.className)?A.className:void 0}});const _=[];let y=v.map(T).filter(A=>A!==null),B=0;for(;y.length>0&&B<20;){B++,_.push({options:y,defaultIndex:0});const F=y[r.value[_.length-1]||0]?.children;if(F&&F.length>0)y=F;else break}return _},M=()=>r.value.map((v,_)=>c.value[_]?.options[v]?.value).filter(v=>v!==void 0),V=()=>r.value.map((v,_)=>c.value[_]?.options[v]).filter(v=>!!v),I=()=>[...r.value],N=(v,_)=>v.length===_.length&&v.every((y,B)=>y===_[B]),x=()=>{const v=M(),_=Array.isArray(t.value)?t.value:[];N(v,_)||(s("update:value",v),s("update:modelValue",v))},L=v=>{const _=t.columnsList;if(!Array.isArray(_)||_.length===0){c.value=[],r.value=[];return}const y=[];if(w())_.forEach((B,A)=>{const F=Array.isArray(B.values)?B.values.map(T).filter($=>$!==null):[],P=v?.[A];let H=F.findIndex($=>$.value===P);if(H<0){const $=n.isFinite(B.defaultIndex)?B.defaultIndex:0;H=F.length>0?Math.min(Math.max(0,Math.floor($)),F.length-1):0}y.push(H)});else{let B=_.map(T).filter(F=>F!==null),A=0;for(;B.length>0&&A<20;){A++;const F=v?.[y.length];let P=B.findIndex($=>$.value===F);P<0&&(P=0),y.push(P);const H=B[P]?.children;if(H&&H.length>0)B=H;else break}}r.value=y,c.value=E()};e.watch(()=>t.columnsList,()=>{L(Array.isArray(t.value)?t.value:void 0)},{deep:!0,immediate:!0}),e.watch(()=>t.value,v=>{if(!Array.isArray(v))return;const _=M();N(_,v)||L(v)},{deep:!0});const D=(v,_)=>{if(r.value[v]===_)return;r.value[v]=_,r.value=r.value.slice(0,v+1),c.value=E();const y=r.value.slice(0,v+1);for(let B=y.length;B<c.value.length;B++)y.push(c.value[B].defaultIndex);r.value=y,s("onChange",{selectedValues:M(),selectedOptions:V(),selectedIndexes:I(),columnIndex:v}),x()},O=()=>{s("onConfirm",{selectedValues:M(),selectedOptions:V(),selectedIndexes:I()})},X=()=>{s("onCancel",{selectedValues:M(),selectedOptions:V(),selectedIndexes:I()})};return l({getValue:()=>M(),setValue:v=>{L(v),x()},getValueData:()=>V(),getSelectedOptions:()=>V(),confirm:()=>O()}),(v,_)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(S.value)},[a.isShowToolbar&&a.toolbarPosition==="top"?(e.openBlock(),e.createElementBlock("div",bw,[e.createElementVNode("button",{type:"button",class:"picker-toolbar-btn picker-toolbar-btn--cancel",onClick:X},e.toDisplayString(a.cancelButtonText),1),e.createElementVNode("div",ww,[e.renderSlot(v.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),e.createElementVNode("button",{type:"button",class:"picker-toolbar-btn picker-toolbar-btn--confirm",onClick:O},e.toDisplayString(a.confirmButtonText),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.renderSlot(v.$slots,"columnsTop"),e.createElementVNode("div",{class:"picker-columns",style:e.normalizeStyle(h.value)},[e.createElementVNode("div",{class:"picker-frame",style:e.normalizeStyle(g.value)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(y,B)=>(e.openBlock(),e.createBlock(qn,{key:`${i}-col-${B}`,className:y.className,optionsList:y.options,valueIndex:r.value[B]||0,optionHeight:m.value,visibleOptionNum:p.value,swipeDuration:f.value,isAllowHtml:a.isAllowHtml,isReadonly:a.isReadonly,onOnSelect:A=>D(B,A)},null,8,["className","optionsList","valueIndex","optionHeight","visibleOptionNum","swipeDuration","isAllowHtml","isReadonly","onOnSelect"]))),128)),a.isLoading?(e.openBlock(),e.createElementBlock("div",Cw,[e.createVNode(He,{size:"26"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4),e.renderSlot(v.$slots,"columnsBottom"),a.isShowToolbar&&a.toolbarPosition==="bottom"?(e.openBlock(),e.createElementBlock("div",Ew,[e.createElementVNode("button",{type:"button",class:"picker-toolbar-btn picker-toolbar-btn--cancel",onClick:X},e.toDisplayString(a.cancelButtonText),1),e.createElementVNode("div",Bw,[e.renderSlot(v.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(a.title),1)])]),e.createElementVNode("button",{type:"button",class:"picker-toolbar-btn picker-toolbar-btn--confirm",onClick:O},e.toDisplayString(a.confirmButtonText),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Sw))}}),xw=["id"],Tw={key:0,class:"panel-pickercascader__header"},Dw={class:"panel-pickercascader__title"},Iw={class:"panel-pickercascader__tabs"},_w=["onClick"],Nw={key:2,class:"panel-pickercascader__options"},Vw=["onClick"],Mw={class:"panel-pickercascader__option-text"},Ow={key:0,class:"panel-pickercascader__option-arrow"},Lw={key:3,class:"panel-pickercascader__empty"},$w={class:"panel-pickercascader__empty-text"},jl=e.defineComponent({name:"ClPickerCascaderPanel",__name:"Panel",props:{id:String,className:String,title:String,isCloseable:Boolean,tabsArr:{type:Array,default:()=>[]},activeTab:Number,optionsList:{type:Array,default:()=>[]},selectedIndex:{type:Number,default:-1},activeColor:String,placeholder:String,fieldNames:{type:Object,default:null}},emits:["onClickTab","onClickClose","onClickOption"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=`pc-${n.getRandom(5)}`,u=e.computed(()=>n.isNonEmptyString(o.className)?o.className:""),c=e.computed(()=>n.isNonEmptyString(o.title)||!!o.isCloseable),r=e.computed(()=>o.title||""),d=e.computed(()=>!!o.isCloseable),m=e.computed(()=>o.tabsArr||[]),p=e.computed(()=>{const L=o.activeTab;return L===void 0||!n.isFinite(L)||L<0?0:L}),f=e.computed(()=>o.optionsList||[]),h=e.computed(()=>n.isNonEmptyString(o.activeColor)?o.activeColor:"var(--cl-primary, #1088f0)"),g=e.computed(()=>n.isNonEmptyString(o.placeholder)?o.placeholder:"请选择"),S=()=>o.fieldNames&&typeof o.fieldNames=="object"?{text:n.isNonEmptyString(o.fieldNames.text)?o.fieldNames.text:"text",value:n.isNonEmptyString(o.fieldNames.value)?o.fieldNames.value:"value",children:n.isNonEmptyString(o.fieldNames.children)?o.fieldNames.children:"children"}:{text:"text",value:"value",children:"children"},T=L=>{const D=S();return L[D.text]!=null?String(L[D.text]):""},w=L=>{const D=S(),O=L[D.children];return Array.isArray(O)?O:[]},E=L=>w(L).length>0,M=(L,D)=>{const O={"panel-pickercascader__option":!0,"panel-pickercascader__option--disabled":!!L.disabled,"panel-pickercascader__option--active":D===o.selectedIndex},X=n.getJsonMerge(O,ue.getClassNameJson(L.className));return n.getStringByJson(X," ")},V=(L,D)=>{const O={};return D===o.selectedIndex?(O.color=h.value,O.fontWeight="500"):n.isNonEmptyString(L.color)&&(O.color=L.color),O},I=L=>{t("onClickTab",L)},N=()=>{t("onClickClose")},x=L=>{t("onClickOption",L)};return(L,D)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(["panel-picker-cascader",u.value])},[c.value?(e.openBlock(),e.createElementBlock("div",Tw,[e.createElementVNode("div",Dw,e.toDisplayString(r.value),1),d.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-pickercascader__close",onClick:N},[e.createVNode(fe,{name:"close"})])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Iw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(O,X)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-tab-${X}`,class:e.normalizeClass(["panel-pickercascader__tab",[X===p.value?"panel-pickercascader__tab--active":"",X>p.value?"panel-pickercascader__tab--pending":""]]),style:e.normalizeStyle(X===p.value?{color:h.value}:void 0),onClick:Q=>I(X)},e.toDisplayString(O),15,_w))),128))]),f.value.length>0?(e.openBlock(),e.createElementBlock("div",Nw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(O,X)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-opt-${X}`,class:e.normalizeClass(M(O,X)),style:e.normalizeStyle(V(O,X)),onClick:Q=>x(O)},[e.createElementVNode("div",Mw,e.toDisplayString(T(O)),1),E(O)?(e.openBlock(),e.createElementBlock("div",Ow,[e.createVNode(fe,{name:"angle-right"})])):e.createCommentVNode("",!0)],14,Vw))),128))])):(e.openBlock(),e.createElementBlock("div",Lw,[e.createElementVNode("div",$w,e.toDisplayString(g.value),1)]))],10,xw))}}),Fi=e.defineComponent({name:"ClPickerCascader",__name:"Index",props:{id:String,className:String,show:Boolean,isPoppable:{type:Boolean,default:!0},optionsList:{type:Array,default:()=>[]},fieldNames:{type:Object,default:null},value:{type:[String,Number],default:null},title:{type:String,default:""},placeholder:{type:String,default:"请选择"},activeColor:{type:String,default:"var(--cl-primary, #1088f0)"},isCloseable:{type:Boolean,default:!0},teleportTarget:{type:String,default:""}},emits:["update:value","update:modelValue","update:show","onChange","onFinish","onClose","onClickTab"],setup(a,{emit:l}){const o=a,t=l,s=o.id,i=e.ref(o.show),u=e.ref([]),c=e.ref(0),r=()=>o.fieldNames&&typeof o.fieldNames=="object"?{text:n.isNonEmptyString(o.fieldNames.text)?o.fieldNames.text:"text",value:n.isNonEmptyString(o.fieldNames.value)?o.fieldNames.value:"value",children:n.isNonEmptyString(o.fieldNames.children)?o.fieldNames.children:"children"}:{text:"text",value:"value",children:"children"},d=C=>{const k=r();return C[k.text]!=null?String(C[k.text]):""},m=C=>{const k=r();return C[k.value]!=null?C[k.value]:""},p=C=>{const k=r(),b=C[k.children];return Array.isArray(b)?b:[]},f=(C,k,b)=>{for(const v of C){if(String(m(v)??"")===String(k))return b.push(v),!0;const _=p(v);if(_.length>0){if(b.push(v),f(_,k,b))return!0;b.pop()}}return!1},h=()=>{const C=o.value;if(C==null||C===""){u.value=[],c.value=0;return}const k=[];f(o.optionsList,C,k)?(u.value=k,c.value=k.length-1):(u.value=[],c.value=0)},g=()=>{i.value=!1},S=e.computed(()=>o.isPoppable),T=e.computed(()=>o.title),w=e.computed(()=>o.isCloseable),E=e.computed(()=>o.activeColor),M=e.computed(()=>o.placeholder),V=e.computed(()=>r()),I=e.computed(()=>{const C=u.value.map(k=>d(k));return C.push(M.value),C}),N=e.computed(()=>{if(c.value<=0)return o.optionsList||[];const C=u.value[c.value-1];return C?p(C):[]}),x=e.computed(()=>{const C=u.value[c.value];return C?N.value.findIndex(b=>String(m(b)??"")===String(m(C)??"")):-1}),L=e.computed(()=>({title:T.value,isCloseable:w.value,tabsArr:I.value,activeTab:c.value,optionsList:N.value,selectedIndex:x.value,activeColor:E.value,placeholder:M.value,fieldNames:o.fieldNames})),D=e.computed(()=>n.isNonEmptyString(o.className)?o.className:""),O=e.computed(()=>n.isNonEmptyString(o.className)?o.className:"");e.watch(()=>o.show,C=>{C?(h(),i.value=!0):i.value=!1},{immediate:!0}),e.watch(i,C=>{t("update:show",C)}),e.watch(()=>o.value,()=>{h()},{immediate:!0});const X=C=>{c.value=C;const k=I.value[C]||"";t("onClickTab",C,k)},Q=()=>{t("onClose"),g()},R=C=>{if(C.disabled)return;u.value=u.value.slice(0,c.value),u.value.push(C);const k=m(C),b=c.value;t("onChange",{value:k,selectedOptions:[...u.value],tabIndex:b});const v=V.value,_=C[v.children];Array.isArray(_)?c.value+=1:(t("onFinish",{value:k,selectedOptions:[...u.value]}),t("update:value",k),t("update:modelValue",k),g())};return(C,k)=>S.value?(e.openBlock(),e.createBlock(kt,{key:0,show:i.value,"onUpdate:show":k[0]||(k[0]=b=>i.value=b),position:"bottom",isRound:!0,isCloseOnClickOverlay:!1,className:D.value,"teleport-target":a.teleportTarget},{default:e.withCtx(()=>[e.createVNode(jl,e.mergeProps({id:e.unref(s),class:O.value},L.value,{onOnClickTab:X,onOnClickClose:Q,onOnClickOption:R}),null,16,["id","class"])]),_:1},8,["show","className","teleport-target"])):(e.openBlock(),e.createBlock(jl,e.mergeProps({key:1,id:e.unref(s),class:O.value},L.value,{onOnClickTab:X,onOnClickClose:Q,onOnClickOption:R}),null,16,["id","class"]))}}),Pi=e.defineComponent({name:"ClPickerDate",__name:"Index",props:{id:String,value:{type:Array,default:()=>[]},className:String,show:Boolean,isPoppable:{type:Boolean,default:!0},columnsTypeArr:{type:Array,default:()=>["year","month","day"],validator:a=>a.length>0&&a.every(l=>["year","month","day"].indexOf(l)!==-1)&&new Set(a).size===a.length},minDate:{type:Date,default:()=>_e.objDay().subtract(10,"year").startOf("day").toDate()},maxDate:{type:Date,default:()=>_e.objDay().add(10,"year").startOf("day").toDate()},title:String,confirmButtonText:{type:String,default:"确认"},cancelButtonText:{type:String,default:"取消"},isShowToolbar:{type:Boolean,default:!0},isLoading:Boolean,isReadonly:Boolean,isAllowHtml:Boolean,optionHeight:{type:Number,default:44},visibleOptionNum:{type:Number,default:6},swipeDuration:{type:Number,default:1e3},teleportTarget:{type:String,default:""}},emits:["update:value","update:modelValue","update:show","onConfirm","onCancel","onChange"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.ref([]),c=e.ref(t.show),r=e.useTemplateRef("refElPicker"),d=(()=>{if(!Array.isArray(t.columnsTypeArr)||t.columnsTypeArr.length===0)return["year","month","day"];const C=t.columnsTypeArr.filter(k=>k==="year"||k==="month"||k==="day");return C.length>0?[...new Set(C)]:["year","month","day"]})(),m=e.computed(()=>t.isPoppable),p=e.computed(()=>N()),f=e.computed(()=>({value:u.value,columnsList:p.value,title:t.title,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText,isShowToolbar:t.isShowToolbar,isLoading:t.isLoading,isReadonly:t.isReadonly,isAllowHtml:t.isAllowHtml,optionHeight:t.optionHeight,visibleOptionNum:t.visibleOptionNum,swipeDuration:t.swipeDuration})),h=e.computed(()=>n.isNonEmptyString(t.className)?t.className:""),g=e.computed(()=>n.isNonEmptyString(t.className)?t.className:""),S=C=>Array.isArray(C)&&C.length===d.length&&C.every(k=>n.isString(k)||n.isNumber(k)&&n.isFinite(k)),T=C=>String(C).padStart(2,"0"),w=(C,k)=>_e.objDay({year:C,month:k-1,day:1}).daysInMonth(),E=()=>t.minDate instanceof Date&&!n.isNaN(t.minDate.getTime())?t.minDate:_e.objDay().subtract(10,"year").startOf("day").toDate(),M=()=>t.maxDate instanceof Date&&!n.isNaN(t.maxDate.getTime())?t.maxDate:_e.objDay().add(10,"year").startOf("day").toDate(),V=()=>{let C=E(),k=M();if(C.getTime()>k.getTime()){const B=C;C=k,k=B}const b=_e.objDay().valueOf(),v=Math.max(C.getTime(),Math.min(b,k.getTime())),_=_e.objDay(v),y={year:String(_.year()),month:T(_.month()+1),day:T(_.date())};return d.map(B=>y[B])},I=()=>{const C=t.value;S(C)?u.value=[...C]:u.value=V()},N=()=>{let C=E(),k=M();if(C.getTime()>k.getTime()){const Y=C;C=k,k=Y}const b=C.getFullYear(),v=k.getFullYear(),_=Y=>{const q=d.indexOf(Y);if(q===-1){const U=_e.objDay();return Y==="year"?U.year():Y==="month"?U.month()+1:U.date()}const J=Number(u.value[q]);return n.isFinite(J)?J:Number(V()[q])},y=(Y,q,J)=>Math.max(q,Math.min(Y,J)),B=y(_("year"),b,v),A=B===b?C.getMonth()+1:1,F=B===v?k.getMonth()+1:12,P=y(_("month"),A,F),H=d.indexOf("month")!==-1?P:B===v?k.getMonth()+1:C.getMonth()+1,$=w(B,H),z=B===b&&H===C.getMonth()+1?C.getDate():1,oe=B===v&&H===k.getMonth()+1?Math.min(k.getDate(),$):$,Z=y(_("day"),z,oe),W=[];return d.forEach(Y=>{if(Y==="year"){const q=[];for(let J=b;J<=v;J++)q.push(String(J));W.push({values:q,defaultIndex:B-b})}else if(Y==="month"){const q=[];for(let J=A;J<=F;J++)q.push(T(J));W.push({values:q,defaultIndex:P-A})}else if(Y==="day"){const q=[];for(let J=z;J<=oe;J++)q.push(T(J));W.push({values:q,defaultIndex:Z-z})}}),W};I(),e.watch(()=>t.show,C=>{if(C){const k=t.value;S(k)&&I(),c.value=!0}else c.value=!1},{immediate:!0}),e.watch(c,C=>{s("update:show",C)}),e.watch(()=>t.value,C=>{S(C)&&(u.value=[...C])},{deep:!0});const x=C=>{u.value=[...C.selectedValues],s("onChange",C)},L=C=>{s("update:value",[...C.selectedValues]),s("update:modelValue",[...C.selectedValues]),s("onConfirm",C),t.isPoppable&&(c.value=!1)},D=C=>{Array.isArray(t.value)&&(u.value=[...t.value]),s("onCancel",C),t.isPoppable&&(c.value=!1)};return l({getValue:()=>r.value?[...r.value.getValue()]:[...u.value],setValue:C=>{Array.isArray(C)&&(u.value=[...C],r.value?.setValue?.(C))},getValueData:()=>r.value?r.value.getValueData():[],confirm:()=>{r.value?.confirm()}}),(C,k)=>m.value?(e.openBlock(),e.createBlock(kt,{key:0,show:c.value,"onUpdate:show":k[0]||(k[0]=b=>c.value=b),position:"bottom",isRound:!0,isCloseOnClickOverlay:!1,className:h.value,"teleport-target":a.teleportTarget},{default:e.withCtx(()=>[e.createVNode(en,e.mergeProps({id:e.unref(i),ref_key:"refElPicker",ref:r,class:g.value},f.value,{onOnChange:x,onOnConfirm:L,onOnCancel:D}),null,16,["id","class"])]),_:1},8,["show","className","teleport-target"])):(e.openBlock(),e.createBlock(en,e.mergeProps({key:1,id:e.unref(i),ref_key:"refElPicker",ref:r,class:g.value},f.value,{onOnChange:x,onOnConfirm:L,onOnCancel:D}),null,16,["id","class"]))}}),Ri=e.defineComponent({name:"ClPickerTime",__name:"Index",props:{id:String,value:{type:Array,default:()=>[]},className:String,show:Boolean,isPoppable:{type:Boolean,default:!0},columnsTypeArr:{type:Array,default:()=>["hour","minute"],validator:a=>a.length>0&&a.every(l=>["hour","minute","second"].indexOf(l)!==-1)&&new Set(a).size===a.length},minHour:{type:Number,default:0},maxHour:{type:Number,default:23},minMinute:{type:Number,default:0},maxMinute:{type:Number,default:59},minSecond:{type:Number,default:0},maxSecond:{type:Number,default:59},title:String,confirmButtonText:{type:String,default:"确认"},cancelButtonText:{type:String,default:"取消"},isShowToolbar:{type:Boolean,default:!0},isLoading:Boolean,isReadonly:Boolean,isAllowHtml:Boolean,optionHeight:{type:Number,default:44},visibleOptionNum:{type:Number,default:6},swipeDuration:{type:Number,default:1e3},teleportTarget:{type:String,default:""}},emits:["update:value","update:modelValue","update:show","onConfirm","onCancel","onChange"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.ref([]),c=e.ref(t.show),r=e.useTemplateRef("refElPicker"),d=(()=>{if(!Array.isArray(t.columnsTypeArr)||t.columnsTypeArr.length===0)return["hour","minute"];const v=t.columnsTypeArr.filter(_=>_==="hour"||_==="minute"||_==="second");return v.length>0?[...new Set(v)]:["hour","minute"]})(),m=e.computed(()=>t.isPoppable),p=e.computed(()=>D()),f=e.computed(()=>({value:u.value,columnsList:p.value,title:t.title,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText,isShowToolbar:t.isShowToolbar,isLoading:t.isLoading,isReadonly:t.isReadonly,isAllowHtml:t.isAllowHtml,optionHeight:t.optionHeight,visibleOptionNum:t.visibleOptionNum,swipeDuration:t.swipeDuration})),h=e.computed(()=>n.isNonEmptyString(t.className)?t.className:""),g=e.computed(()=>n.isNonEmptyString(t.className)?t.className:""),S=v=>Array.isArray(v)&&v.length===d.length&&[...v].every(_=>n.isString(_)?/^\d{1,2}$/.test(_):n.isNumber(_)&&n.isFinite(_)),T=v=>String(v).padStart(2,"0"),w=()=>n.isFinite(t.minHour)&&Number.isInteger(t.minHour)&&t.minHour>=0&&t.minHour<=23?t.minHour:0,E=()=>n.isFinite(t.maxHour)&&Number.isInteger(t.maxHour)&&t.maxHour>=0&&t.maxHour<=23?t.maxHour:23,M=()=>n.isFinite(t.minMinute)&&Number.isInteger(t.minMinute)&&t.minMinute>=0&&t.minMinute<=59?t.minMinute:0,V=()=>n.isFinite(t.maxMinute)&&Number.isInteger(t.maxMinute)&&t.maxMinute>=0&&t.maxMinute<=59?t.maxMinute:59,I=()=>n.isFinite(t.minSecond)&&Number.isInteger(t.minSecond)&&t.minSecond>=0&&t.minSecond<=59?t.minSecond:0,N=()=>n.isFinite(t.maxSecond)&&Number.isInteger(t.maxSecond)&&t.maxSecond>=0&&t.maxSecond<=59?t.maxSecond:59,x=()=>{const v=_e.objDay(),_={hour:T(v.hour()),minute:T(v.minute()),second:T(v.second())};return d.map(y=>_[y])},L=()=>{const v=t.value;S(v)?u.value=[...v]:u.value=x()},D=()=>{const v=Math.min(w(),E()),_=Math.max(w(),E()),y=Math.min(M(),V()),B=Math.max(M(),V()),A=Math.min(I(),N()),F=Math.max(I(),N()),P=ae=>{const ee=d.indexOf(ae);if(ee===-1){const ne=_e.objDay();return ae==="hour"?ne.hour():ae==="minute"?ne.minute():ne.second()}const G=Number(u.value[ee]);return n.isFinite(G)?G:Number(x()[ee])},H=(ae,ee,G)=>Math.max(ee,Math.min(ae,G)),$=H(P("hour"),v,_),z=$===v?y:0,oe=$===_?B:59,Z=H(P("minute"),z,oe),W=d.indexOf("minute")!==-1?Z:$===_?B:y,Y=W===y?A:0,q=W===B?F:59,J=H(P("second"),Y,q),U=[];return d.forEach(ae=>{if(ae==="hour"){const ee=[];for(let G=v;G<=_;G++)ee.push(T(G));U.push({values:ee,defaultIndex:$-v})}else if(ae==="minute"){const ee=[];for(let G=z;G<=oe;G++)ee.push(T(G));U.push({values:ee,defaultIndex:Z-z})}else if(ae==="second"){const ee=[];for(let G=Y;G<=q;G++)ee.push(T(G));U.push({values:ee,defaultIndex:J-Y})}}),U};L(),e.watch(()=>t.show,v=>{if(v){const _=t.value;S(_)&&L(),c.value=!0}else c.value=!1},{immediate:!0}),e.watch(c,v=>{s("update:show",v)}),e.watch(()=>t.value,v=>{S(v)&&(u.value=[...v])},{immediate:!0,deep:!0});const O=v=>{u.value=[...v.selectedValues],s("onChange",v)},X=v=>{s("update:value",[...v.selectedValues]),s("update:modelValue",[...v.selectedValues]),s("onConfirm",v),t.isPoppable&&(c.value=!1)},Q=v=>{s("onCancel",v),t.isPoppable&&(c.value=!1)};return l({getValue:()=>r.value?[...r.value.getValue()]:[...u.value],setValue:v=>{S(v)&&(u.value=[...v],r.value?.setValue?.(v))},getValueData:()=>r.value?r.value.getValueData():[],confirm:()=>{r.value?.confirm()}}),(v,_)=>m.value?(e.openBlock(),e.createBlock(kt,{key:0,show:c.value,"onUpdate:show":_[0]||(_[0]=y=>c.value=y),position:"bottom",isRound:!0,isCloseOnClickOverlay:!1,className:h.value,"teleport-target":a.teleportTarget},{default:e.withCtx(()=>[e.createVNode(en,e.mergeProps({id:e.unref(i),ref_key:"refElPicker",ref:r,className:g.value},f.value,{onOnChange:O,onOnConfirm:X,onOnCancel:Q}),null,16,["id","className"])]),_:1},8,["show","className","teleport-target"])):(e.openBlock(),e.createBlock(en,e.mergeProps({key:1,id:e.unref(i),ref_key:"refElPicker",ref:r,className:g.value},f.value,{onOnChange:O,onOnConfirm:X,onOnCancel:Q}),null,16,["id","className"]))}}),Aw=["id"],Fw={class:"ptr-track"},Pw={class:"ptr-text"},Rw={key:0,class:"ptr-scroller-wrap"},Hw={key:0,class:"ptr-loadmore"},zw={key:2,class:"ptr-finished"},Oa=e.defineComponent({name:"ClPullToRefresh",__name:"Index",props:{id:String,className:String,disabled:Boolean,threshold:{type:Number,default:60},list:Array,minItemSize:{type:Number,default:60},keyField:{type:String,default:"id"},isFinished:Boolean,isLoading:Boolean,pullIcon:{type:String,default:"angle-down"},pullingText:{type:String,default:"下拉即可刷新..."},readyText:{type:String,default:"释放即可刷新..."},refreshingText:{type:String,default:"加载中..."},loadingText:{type:String,default:"加载中..."},finishedText:{type:String,default:"没有更多了"},sizeDependencies:{type:Function}},emits:["onRefresh","onLoadMore"],setup(a,{expose:l,emit:o}){let t=!1;const s=()=>{t||(t=!0,Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs")))},i=e.defineAsyncComponent(()=>(s(),import("vue-virtual-scroller").then(J=>J.DynamicScroller))),u=e.defineAsyncComponent(()=>(s(),import("vue-virtual-scroller").then(J=>J.DynamicScrollerItem))),c=()=>{s(),import("vue-virtual-scroller")},r=a,d=o,m=r.id,p=e.useTemplateRef("refElContent"),f=e.ref("idle"),h=e.ref(0),g=e.ref(0),S=e.ref(!1),T=e.ref(!1),w=e.ref(0);let E=null,M=0,V=0,I=0,N=null;const x=e.computed(()=>{const J=r.threshold;return n.isFinite(J)&&typeof J=="number"?Math.max(1,J):60}),L=e.computed(()=>n.isArray(r.list)),D=e.computed(()=>L.value?r.list.filter(J=>J!=null):[]),O=e.computed(()=>{const J=r.minItemSize;return n.isFinite(J)&&typeof J=="number"?Math.max(1,J):60}),X=e.computed(()=>{switch(f.value){case"loading":return r.refreshingText;case"ready":return r.readyText;case"pulling":return r.pullingText;default:return""}}),Q=e.computed(()=>{let J={"panel-pull-to-refresh":!0};return r.disabled&&(J["ptr-disabled"]=!0),T.value&&(J["ptr-is-pulling"]=!0),J=n.getJsonMerge(J,ue.getClassNameJson(r.className)),J}),R=e.computed(()=>({height:`${h.value}px`})),C=e.computed(()=>S.value&&T.value?{touchAction:"none"}:{}),k=J=>Math.min(J*.4,x.value*2),b=()=>{if(L.value)return w.value<=1;const J=p.value;return J?J.scrollTop<=1:!0},v=J=>{if("touches"in J){const U=J.touches;return U.length>0?U[0].clientY:0}return J.clientY},_=(J=>Z(J)),y=(J=>W(J)),B=()=>{document.addEventListener("mousemove",_),document.addEventListener("mouseup",y)},A=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",y)},F=()=>{E!==null&&(cancelAnimationFrame(E),E=null),M=0,T.value=!1,h.value=0,f.value="idle"},P=J=>{if(r.sizeDependencies)try{return r.sizeDependencies(J)}catch{return}},H=()=>{const J=Date.now();J-V<500||!r.isFinished&&!r.isLoading&&(V=J,d("onLoadMore"))},$=()=>{if(!L.value||r.isFinished||r.isLoading)return;const J=Date.now();if(J-I<100){N===null&&(N=window.setTimeout(()=>{N=null,$()},100));return}const U=p.value?.querySelector(".ptr-scroller");U&&(w.value=U.scrollTop||0,!(U.clientHeight<=0)&&U.scrollHeight<=U.clientHeight&&(I=J,V=J,d("onLoadMore")))},z=()=>{A(),E!==null&&(cancelAnimationFrame(E),E=null),S.value=!1};e.onMounted(()=>{c()}),e.onBeforeUnmount(()=>{z(),N!==null&&(clearTimeout(N),N=null)}),e.onDeactivated(()=>{z(),f.value!=="loading"&&F()}),e.watch(()=>r.disabled,J=>{J&&(z(),f.value!=="loading"&&F())}),e.watch(()=>L.value,J=>{J&&(w.value=0)}),e.watch(()=>[r.list,r.list?.length],async()=>{L.value&&(await e.nextTick(),$())},{immediate:!0});const oe=J=>{r.disabled||f.value==="loading"||!("touches"in J)&&J.button!==0||(S.value&&(z(),F()),g.value=v(J),S.value=!0,"touches"in J||B())},Z=J=>{if(!(!S.value||r.disabled)){if(!("touches"in J)&&J.buttons===0){W();return}M=v(J)-g.value,M>0&&b()?(T.value=!0,J.preventDefault(),E===null&&(E=requestAnimationFrame(()=>{E=null;const U=k(M);h.value=U,f.value=U>=x.value?"ready":"pulling"}))):T.value&&F()}},W=J=>{if(S.value){if(S.value=!1,A(),J?.type==="touchcancel"){F();return}if(E!==null){cancelAnimationFrame(E),E=null;const U=k(M);U>=0&&(h.value=U,f.value=U>=x.value?"ready":"pulling")}r.disabled||!(T.value&&f.value==="ready")?F():(f.value="loading",h.value=x.value,T.value=!1,d("onRefresh"))}},Y=J=>{const U=J.target;w.value=U?.scrollTop||0,U&&U.scrollTop+U.clientHeight>=U.scrollHeight&&H()};return l({finishRefresh:()=>{z(),F(),V=0,I=0}}),(J,U)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(m),class:e.normalizeClass(Q.value)},[e.createElementVNode("div",Fw,[e.createElementVNode("div",{class:"ptr-indicator",style:e.normalizeStyle(R.value),role:"status","aria-live":"polite"},[e.createElementVNode("div",{class:e.normalizeClass(["ptr-indicator-inner",`ptr-state-${f.value}`])},[e.renderSlot(J.$slots,"indicator",{state:f.value,distance:h.value,threshold:x.value},()=>[f.value==="loading"?(e.openBlock(),e.createBlock(He,{key:0,theme:"circleSpinner",size:"small",color:"#999",className:"ptr-indicator-load"})):(e.openBlock(),e.createBlock(fe,{key:1,name:a.pullIcon,className:"ptr-icon-arrow","aria-hidden":"true"},null,8,["name"])),e.createElementVNode("span",Pw,e.toDisplayString(X.value),1)])],2)],4),e.createElementVNode("div",{ref_key:"refElContent",ref:p,class:e.normalizeClass(["ptr-content",{"ptr-content-virtual":L.value}]),style:e.normalizeStyle(C.value),onScroll:Y,onTouchstart:oe,onTouchmove:Z,onTouchend:W,onTouchcancel:W,onMousedown:oe},[L.value?(e.openBlock(),e.createElementBlock("div",Rw,[e.createVNode(e.unref(i),{class:"ptr-scroller",items:D.value,"min-item-size":O.value,"key-field":a.keyField,onScroll:Y},{default:e.withCtx(({item:ae,index:ee,active:G})=>[e.createVNode(e.unref(u),{item:ae,index:ee,active:G,"size-dependencies":P(ae)},{default:e.withCtx(()=>[e.renderSlot(J.$slots,"item",{item:ae,index:ee,active:G})]),_:2},1032,["item","index","active","size-dependencies"])]),after:e.withCtx(()=>[a.isLoading?(e.openBlock(),e.createElementBlock("div",Hw,[e.renderSlot(J.$slots,"loadMore",{},()=>[e.createVNode(He,{theme:"circleSpinner",size:"small",color:"#999",className:"ptr-loadmore-load"}),e.createElementVNode("span",null,e.toDisplayString(a.loadingText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isFinished&&!a.isLoading?(e.openBlock(),e.createElementBlock("div",zw,[e.renderSlot(J.$slots,"finished",{},()=>[e.createElementVNode("span",null,e.toDisplayString(a.finishedText),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),_:3},8,["items","min-item-size","key-field"])])):e.renderSlot(J.$slots,"default",{key:1})],38)])],10,Aw))}}),Uw=["id"],Jw=["onClick"],Yl=300,Kw=200,Qo=100,Hi=e.defineComponent({name:"ClRate",__name:"Index",props:{id:String,value:{type:Number,default:0},className:String,disabled:{type:Boolean,default:!1},count:{type:Number,default:5},size:{type:[Number,String],default:20},gutter:{type:[Number,String],default:4},color:{type:String,default:""},voidColor:{type:String,default:""},disabledColor:{type:String,default:""},readonly:{type:Boolean,default:!1},isAllowHalf:{type:Boolean,default:!1},isDragSelect:{type:Boolean,default:!0},isClearable:{type:Boolean,default:!1},dynamicIconsList:{type:Array,default:()=>[]},dynamicIconColor:{type:String,default:""}},emits:["update:value","update:modelValue","onChange"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=`rate-${n.getRandom(5)}`,u=t.id,c=e.useTemplateRef("refElRate");let r=0,d=!1,m=!1,p=!1,f=0,h=!1,g=!1,S=null,T=0;const w=e.ref(-1),E=e.computed(()=>{const W=Math.max(Math.floor(n.isFinite(t.count)?t.count:1),1);return Math.min(W,Qo)}),M=e.computed(()=>Math.min(Math.max(n.isFinite(t.value)?t.value:0,0),E.value)),V=e.computed(()=>{const W=[];for(let Y=0;Y<E.value;Y++)W.push(Math.min(Math.max(M.value-Y,0),1));return W}),I=e.computed(()=>{let W={"panel-rate":!0};return t.disabled&&(W["panel-rate--disabled"]=!0),W=n.getJsonMerge(W,ue.getClassNameJson(t.className)),W}),N=e.computed(()=>{const W={};return t.color&&(W["--rate-color"]=t.color),t.voidColor&&(W["--rate-void-color"]=t.voidColor),t.disabledColor&&(W["--rate-disabled-color"]=t.disabledColor),W}),x=e.computed(()=>{const W={};return n.isNonEmptyString(t.size)?W["--rate-size"]=t.size:n.isFinite(t.size)&&t.size>0&&(W["--rate-size"]=`${t.size}px`),n.isNonEmptyString(t.gutter)?W["--rate-gutter"]=t.gutter:n.isFinite(t.gutter)&&t.gutter>0&&(W["--rate-gutter"]=`${t.gutter}px`),W}),L=W=>{const Y=Date.now();W===S&&Y-T<Kw||(S=W,T=Y,s("update:value",W),s("update:modelValue",W),s("onChange",W))},D=W=>Math.min(Math.max(W,0),E.value),O=W=>{const Y=t.dynamicIconsList?.[W];return n.isNonEmptyString(Y)?Y:Y&&n.isNonEmptyString(Y.icon)?Y.icon:"xing-fill"},X=W=>{const Y=t.dynamicIconsList?.[W];return Y&&!n.isNonEmptyString(Y)&&n.isNonEmptyString(Y.color)?Y.color:n.isNonEmptyString(t.dynamicIconColor)?t.dynamicIconColor:t.color||""},Q=W=>{const Y=X(W);return Y?{color:Y}:{}},R=(W,Y=!0)=>{if(t.disabled||t.readonly)return;let q=D(W);Y&&t.isClearable&&q===M.value&&(q=0),q!==M.value&&L(q)},C=W=>{if(t.disabled||t.readonly||!c.value)return-1;const Y=c.value.getBoundingClientRect(),q=W-Y.left,J=Y.width/E.value;if(!n.isFinite(J)||J<=0)return-1;let U=t.isAllowHalf?Math.round(q/J*2)/2:Math.ceil(q/J);return U=D(U),U!==M.value&&L(U),U},k=W=>{if(t.disabled||t.readonly||!t.isDragSelect)return-1;const Y=W.touches[0];return Y?C(Y.clientX):-1};e.onBeforeUnmount(()=>{window.removeEventListener("mouseup",A)}),e.watch(()=>t.count,W=>{!n.isFinite(W)||W<1?ve.warn("ClRate","警告:count 必须为不小于 1 的数字"):W>Qo&&ve.warn("ClRate",`警告:count 超过上限 ${Qo},实际按上限渲染`)},{immediate:!0});const b=W=>{w.value===W?(w.value=-1,e.nextTick(()=>{w.value=W})):w.value=W},v=W=>{const Y=W+1,q=M.value;let J;t.isAllowHalf?t.isClearable&&q===Y?J=0:q>=Y?J=Y-1:q===Y-.5?J=Y:J=Y-.5:J=Y,R(J)},_=W=>{if(p&&Date.now()-r<Yl){!h&&!t.disabled&&!t.readonly&&(b(W),g||v(W));return}m||t.disabled||t.readonly||(b(W),v(W))},y=()=>{p&&Date.now()-r<Yl||t.disabled||t.readonly||!t.isDragSelect||(d=!0,m=!1,window.addEventListener("mouseup",A))},B=W=>{d&&(m=!0,C(W.clientX))},A=()=>{d&&(d=!1,window.removeEventListener("mouseup",A))},F=W=>{p=!1,h=!1,g=!1;const Y=M.value,q=W.touches[0];q&&(f=q.clientX);const J=k(W);J>=0&&(p=!0,g=J!==Y)},P=()=>{r=Date.now()},H=()=>{w.value=-1},$=W=>{const Y=W.touches[0];Y&&Math.abs(Y.clientX-f)>2&&(h=!0),k(W)>=0&&W.preventDefault()};return l({getValue:()=>M.value,setValue:W=>{let Y=n.isFinite(W)?W:0;t.isAllowHalf?Y=Math.round(Y*2)/2:Y=Math.floor(Y),Y=D(Y),Y!==M.value&&L(Y)},getValueData:()=>({value:M.value})}),(W,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElRate",ref:c,id:e.unref(u),class:e.normalizeClass(I.value),style:e.normalizeStyle(N.value),onMousedown:y,onMousemove:B,onTouchstart:F,onTouchmove:$,onTouchend:P,onTouchcancel:P},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,q=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-${q}`,class:e.normalizeClass(["panel-rate__item",{"panel-rate__item--full":V.value[q-1]===1,"panel-rate__item--partial":V.value[q-1]>0&&V.value[q-1]<1,"panel-rate__item--pop-active":w.value===q-1}]),style:e.normalizeStyle(x.value),onClick:J=>_(q-1),onAnimationend:H},[w.value===q-1?(e.openBlock(),e.createBlock(fe,{key:0,name:O(q-1),style:e.normalizeStyle(Q(q-1)),class:"panel-rate__icon panel-rate__icon--pop"},null,8,["name","style"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(fe,{name:"xing-fill",class:"panel-rate__icon"}),V.value[q-1]>0&&V.value[q-1]<1?(e.openBlock(),e.createElementBlock("div",{key:2,class:"panel-rate__partial",style:e.normalizeStyle({width:`${V.value[q-1]*100}%`})},[e.createVNode(fe,{name:"xing-fill",class:"panel-rate__icon"})],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],46,Jw))),128))],46,Uw))}}),Ww=["id"],jw={class:"scrollcard-list"},Yw={key:1,class:"scrollcard-empty",role:"status"},qw=["aria-expanded","onClick","onKeydown"],Xw={key:2,class:"scrollcard-elastic-body"},Gw={class:"scrollcard-list"},Qw={key:1,class:"scrollcard-empty",role:"status"},Zw=["aria-expanded","onClick","onKeydown"],eC={key:2,class:"scrollcard-elastic-body"},tC={key:0,class:"scrollcard-pager"},nC=["disabled"],oC={class:"scrollcard-pager-info"},aC=["disabled"],zi=e.defineComponent({name:"ClScrollCard",__name:"Index",props:{id:String,className:String,disabled:Boolean,list:{type:Array,default:()=>[]},isPaginate:{type:Boolean,default:!0},paginateType:{type:String,default:"scroll",validator:a=>["button","scroll"].indexOf(a)>-1},paginateLimit:{type:Number,default:20},isServer:{type:Boolean,default:!1},totalLength:{type:Number,default:0},orderSort:{type:Object,default:()=>({field:""})},isElastic:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isFinished:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无数据"}},emits:{onGetData:a=>!0,onClickCard:(a,l)=>!0,onClickElastic:(a,l,o)=>!0},setup(a,{expose:l,emit:o}){const t=a,s=o,i=`s-${n.getRandom(5)}`,u=t.id,c=e.useTemplateRef("refElPullToRefresh"),r=e.ref(1),d=e.ref([]),m=e.ref([]),p=e.computed(()=>t.isPaginate&&t.paginateType==="scroll"),f=e.computed(()=>n.isFinite(t.paginateLimit)?Math.max(1,t.paginateLimit):20),h=e.computed(()=>t.isServer?[]:x(N())),g=e.computed(()=>t.isServer?0:h.value.length),S=e.computed(()=>{if(t.isServer)return N();if(!t.isPaginate)return h.value;if(t.paginateType==="button"){const P=f.value,H=(r.value-1)*P;return h.value.slice(H,H+P)}return h.value.slice(0,r.value*f.value)}),T=e.computed(()=>{if(t.isServer){const P=n.isFinite(t.totalLength)?t.totalLength:0;return P>0?Math.max(1,Math.ceil(P/f.value)):1}return t.isPaginate?Math.max(1,Math.ceil(g.value/f.value)):1}),w=e.computed(()=>t.isServer?t.isFinished:t.isPaginate?r.value>=T.value:!0),E=e.computed(()=>S.value.length===0),M=e.computed(()=>r.value<=1),V=e.computed(()=>r.value>=T.value),I=e.computed(()=>{const P={"panel-scroll-card":!0};return t.disabled&&(P["scrollcard-disabled"]=!0),n.getJsonMerge(P,ue.getClassNameJson(t.className))}),N=()=>(n.isArray(t.list)?t.list:[]).filter(H=>H!=null),x=P=>{const H=t.orderSort||{},$=H.field;if(t.isServer||!n.isNonEmptyString($))return n.getListClone(P);const z=H.order==="desc"?"desc":"asc",oe=H.format||"string",Z=n.getListClone(P);return Z.sort((W,Y)=>{const q=W&&typeof W[$]<"u"?W[$]:"",J=Y&&typeof Y[$]<"u"?Y[$]:"";let U=0;return oe==="number"?U=(Number(q)||0)-(Number(J)||0):oe==="date"?U=(Date.parse(q)||0)-(Date.parse(J)||0):U=String(q===null?"":q).localeCompare(String(J===null?"":J)),z==="desc"&&(U=-U),U}),Z},L=P=>{const H=P&&P.id;return H==null?"":n.isString(H)||n.isFinite(H)?H.toString():""},D=P=>{const H=f.value,$={pages:r.value,limit:H,offset:(r.value-1)*H,action:P},z=t.orderSort||{};return n.isNonEmptyString(z.field)&&($.field=z.field,$.order=z.order==="desc"?"desc":"asc"),$},O=P=>d.value.indexOf(L(P))>-1,X=P=>m.value.indexOf(L(P))>-1,Q=(P,H)=>{const $=L(P);return $!==""?`${i}-${$}-${H}`:`${i}-${H}`};e.watch([()=>t.list,()=>t.paginateLimit],()=>{!t.isServer&&r.value>T.value&&(r.value=Math.max(1,T.value))},{deep:!0});const R=(P,H)=>{s("onClickCard",P,H)},C=P=>{const H=L(P);if(!H)return;const $=d.value.indexOf(H)===-1,z=n.getArrClone(d.value),oe=n.getArrClone(m.value);if($){if(oe.indexOf(H)>-1){z.indexOf(H)===-1&&z.push(H),d.value=z,s("onClickElastic",H,P,!0);return}z.indexOf(H)===-1&&z.push(H),oe.indexOf(H)===-1&&oe.push(H)}else{const Z=z.indexOf(H);Z>-1&&z.splice(Z,1);const W=oe.indexOf(H);W>-1&&oe.splice(W,1)}d.value=z,m.value=oe,s("onClickElastic",H,P,$)},k=P=>{r.value=P,t.isServer&&s("onGetData",D("pagechange"))},b=()=>{t.disabled||t.isLoading||r.value<=1||k(r.value-1)},v=()=>{t.disabled||t.isLoading||r.value>=T.value||k(r.value+1)},_=()=>{t.disabled||(r.value=1,t.isServer?s("onGetData",D("refresh")):F())},y=()=>{if(t.disabled||t.isLoading)return;const P=r.value+1;if(t.isServer){if(t.totalLength>0&&P>T.value)return;r.value=P,s("onGetData",D("loadmore"))}else P<=T.value&&(r.value=P)},B=P=>{if(!n.isString(P)&&!n.isFinite(P))return;const H=P.toString();if(H==="")return;const $=n.getArrClone(m.value);$.indexOf(H)===-1&&($.push(H),m.value=$)},A=P=>{if(!n.isString(P)&&!n.isFinite(P))return;const H=P.toString();if(H==="")return;const $=n.getArrClone(m.value),z=$.indexOf(H);z>-1&&($.splice(z,1),m.value=$)},F=()=>{c.value&&typeof c.value.finishRefresh=="function"&&c.value.finishRefresh()};return l({loadElasticStart:B,loadElasticStop:A,finishRefresh:F}),(P,H)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(I.value)},[p.value?(e.openBlock(),e.createBlock(Oa,{key:0,class:"scrollcard-ptr",isLoading:a.isLoading,isFinished:w.value,disabled:a.disabled,onOnRefresh:_,onOnLoadMore:y,ref_key:"refElPullToRefresh",ref:c},{default:e.withCtx(()=>[e.createElementVNode("div",jw,[E.value&&a.isLoading?(e.openBlock(),e.createBlock(He,{key:0,class:"scrollcard-status",theme:"circleBubble",size:"large"})):E.value&&!a.isLoading?(e.openBlock(),e.createElementBlock("div",Yw,e.toDisplayString(t.emptyText),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(S.value,($,z)=>(e.openBlock(),e.createElementBlock("div",{key:Q($,z),class:"scrollcard-item"},[e.renderSlot(P.$slots,"default",{info:$,index:z,isOpen:O($),elasticLoading:X($),onClickCard:R,onToggleElastic:C}),a.isElastic?(e.openBlock(),e.createElementBlock("div",{key:0,class:"scrollcard-elastic-head",role:"button",tabindex:"0","aria-expanded":O($),onClick:e.withModifiers(oe=>C($),["stop"]),onKeydown:[e.withKeys(e.withModifiers(oe=>C($),["prevent"]),["enter"]),e.withKeys(e.withModifiers(oe=>C($),["prevent"]),["space"])]},[e.renderSlot(P.$slots,"elasticIcon",{info:$,index:z,isOpen:O($),elasticLoading:X($)})],40,qw)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isElastic&&O($)?(e.openBlock(),e.createElementBlock("div",Xw,[X($)?(e.openBlock(),e.createBlock(He,{key:0,class:"scrollcard-elastic-load",theme:"circleBubble",size:"small"})):e.renderSlot(P.$slots,"elastic",{key:1,info:$,index:z})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]))),128))])]),_:3},8,["isLoading","isFinished","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Gw,[E.value&&a.isLoading?(e.openBlock(),e.createBlock(He,{key:0,class:"scrollcard-status",theme:"circleBubble",size:"large"})):E.value&&!a.isLoading?(e.openBlock(),e.createElementBlock("div",Qw,e.toDisplayString(t.emptyText),1)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(S.value,($,z)=>(e.openBlock(),e.createElementBlock("div",{key:Q($,z),class:"scrollcard-item"},[e.renderSlot(P.$slots,"default",{info:$,index:z,isOpen:O($),elasticLoading:X($),onClickCard:R,onToggleElastic:C}),a.isElastic?(e.openBlock(),e.createElementBlock("div",{key:0,class:"scrollcard-elastic-head",role:"button",tabindex:"0","aria-expanded":O($),onClick:e.withModifiers(oe=>C($),["stop"]),onKeydown:[e.withKeys(e.withModifiers(oe=>C($),["prevent"]),["enter"]),e.withKeys(e.withModifiers(oe=>C($),["prevent"]),["space"])]},[e.renderSlot(P.$slots,"elasticIcon",{info:$,index:z,isOpen:O($),elasticLoading:X($)})],40,Zw)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),a.isElastic&&O($)?(e.openBlock(),e.createElementBlock("div",eC,[X($)?(e.openBlock(),e.createBlock(He,{key:0,class:"scrollcard-elastic-load",theme:"circleBubble",size:"small"})):e.renderSlot(P.$slots,"elastic",{key:1,info:$,index:z})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]))),128))]),a.isPaginate&&a.paginateType==="button"?(e.openBlock(),e.createElementBlock("div",tC,[e.createElementVNode("button",{class:"scrollcard-pager-btn",disabled:M.value||a.disabled,onClick:b}," 上一页 ",8,nC),e.createElementVNode("span",oC,e.toDisplayString(r.value)+" / "+e.toDisplayString(T.value),1),e.createElementVNode("button",{class:"scrollcard-pager-btn",disabled:V.value||a.disabled,onClick:v}," 下一页 ",8,aC)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],10,Ww))}}),lC={key:0,class:"sharesheet-title"},sC={key:2,class:"sharesheet-description"},iC={class:"sharesheet-options"},rC=["onClick"],cC={key:0,class:"sharesheet-option-icon"},uC={class:"sharesheet-option-name"},dC={key:2,class:"sharesheet-option-desc"},Ui=e.defineComponent({name:"ClShareSheet",__name:"Index",props:{id:String,className:String,show:Boolean,title:String,description:String,optionsList:Array,cancelText:String,isOverlay:{type:Boolean,default:!0},isCloseOnClickOverlay:{type:Boolean,default:!0},isLockScroll:{type:Boolean,default:!1},isSafeAreaInsetBottom:Boolean,duration:{type:Number,default:300},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""}},emits:["update:show","onSelect","onCancel","onClickOverlay"],setup(a,{emit:l}){const o=a,t=l,s=`sharesheet-${n.getRandom(5)}`,i=o.id,u=e.ref(o.show),c=e.computed(()=>n.isNonEmptyString(o.title)?o.title:""),r=e.computed(()=>n.isNonEmptyString(o.description)?o.description:""),d=e.computed(()=>n.isNonEmptyString(o.cancelText)?o.cancelText:""),m=e.computed(()=>Array.isArray(o.optionsList)?o.optionsList.filter(S=>n.isObject(S)&&n.isNonEmptyString(S.name)):[]),p=e.computed(()=>{const S={"panel-share-sheet":!0};return n.getJsonMerge(S,ue.getClassNameJson(o.className))});e.watch(u,S=>{S!==o.show&&t("update:show",S)}),e.watch(()=>o.show,S=>{u.value=S});const f=(S,T)=>{u.value&&t("onSelect",S,T)},h=()=>{u.value&&(t("onCancel"),u.value=!1)},g=()=>{t("onClickOverlay")};return(S,T)=>(e.openBlock(),e.createBlock(kt,{id:e.unref(i),show:u.value,"onUpdate:show":T[0]||(T[0]=w=>u.value=w),position:"bottom",isOverlay:a.isOverlay,isRound:!0,duration:a.duration,isCloseOnClickOverlay:a.isCloseOnClickOverlay,isLockScroll:a.isLockScroll,isSafeAreaInsetBottom:a.isSafeAreaInsetBottom,zIndex:a.zIndex,teleportTarget:a.teleportTarget,onOnClickOverlay:g},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(p.value)},[c.value?(e.openBlock(),e.createElementBlock("div",lC,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),r.value?(e.openBlock(),e.createElementBlock("div",sC,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",iC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(w,E)=>(e.openBlock(),e.createElementBlock("button",{key:`${s}-${w.id}-${E}`,type:"button",class:"sharesheet-option",onClick:M=>f(w,E)},[w.icon?(e.openBlock(),e.createElementBlock("span",cC,[e.createVNode(fe,{name:w.icon},null,8,["name"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",uC,e.toDisplayString(w.name),1),w.description?(e.openBlock(),e.createElementBlock("span",dC,e.toDisplayString(w.description),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],8,rC))),128))]),d.value?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",class:"sharesheet-cancel",onClick:h},e.toDisplayString(d.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2)]),_:1},8,["id","show","isOverlay","duration","isCloseOnClickOverlay","isLockScroll","isSafeAreaInsetBottom","zIndex","teleportTarget"]))}}),mC=["id"],pC=["onClick"],fC={class:"sidebar-item-text"},hC={key:0,class:"sidebar-item-badge"},Ji=e.defineComponent({name:"ClSidebar",__name:"Index",props:{id:String,className:String,itemsList:{type:Array,default:()=>[]},active:{type:Number,default:0}},emits:["onChange","onClickItem"],setup(a,{emit:l}){const o=a,t=l,s=`sidebar-${n.getRandom(5)}`,i=o.id,u=e.computed(()=>{const f=Number(o.active);return n.isFinite(f)?f:0}),c=e.computed(()=>Array.isArray(o.itemsList)?o.itemsList.map((f,h)=>({item:f,inx:h})).filter(f=>f.item&&n.isNonEmptyString(f.item.text)).map(({item:f,inx:h})=>({item:f,inx:h,badge:d(f)})):[]),r=e.computed(()=>{const f={"panel-sidebar":!0};return n.getJsonMerge(f,ue.getClassNameJson(o.className))}),d=f=>{if(n.isUndefined(f.badge)||typeof f.badge=="symbol")return 0;const h=Number(f.badge);return n.isFinite(h)&&h>0?h:0},m=(f,h)=>{t("onClickItem",h),h!==u.value&&t("onChange",h)},p=(f,h)=>({"sidebar-item":!0,"sidebar-item--active":h===u.value});return(f,h)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(r.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-${g.inx}`,class:e.normalizeClass(p(g.item,g.inx)),onClick:S=>m(g.item,g.inx)},[e.createElementVNode("span",fC,e.toDisplayString(g.item.text),1),g.badge>0?(e.openBlock(),e.createElementBlock("span",hC,e.toDisplayString(g.badge),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,pC))),128))],10,mC))}}),gC=["id"],vC={class:"sidebarselect-left"},yC=["onClick"],kC={class:"sidebarselect-group-text"},SC={class:"sidebarselect-right"},bC=["onClick"],wC={class:"sidebarselect-option-text"},CC={key:0,class:"sidebarselect-option-check"},Ki=e.defineComponent({name:"ClSidebarSelect",__name:"Index",props:{id:String,className:String,groupsList:{type:Array,default:()=>[]},activeId:{type:[Number,String],default:""},activeGroupIndex:{type:Number,default:0}},emits:["update:activeId","onClickGroup","onClickOption"],setup(a,{emit:l}){const o=a,t=l,s=`sidebarselect-${n.getRandom(5)}`,i=o.id,u=e.computed(()=>Array.isArray(o.groupsList)?o.groupsList.filter(g=>g!=null):[]),c=e.computed(()=>{const g=u.value[o.activeGroupIndex];return g&&Array.isArray(g.children)?g.children.filter(S=>S!=null):[]}),r=e.computed(()=>{const g={"panel-sidebar-select":!0};return n.getJsonMerge(g,ue.getClassNameJson(o.className))}),d=g=>({"sidebarselect-group":!0,"sidebarselect-group--active":g===o.activeGroupIndex}),m=g=>({"sidebarselect-option":!0,"sidebarselect-option--active":p(g)}),p=g=>(n.isString(g.id)||n.isNumber(g.id))&&(n.isString(o.activeId)||n.isNumber(o.activeId))&&String(g.id)===String(o.activeId),f=g=>{t("onClickGroup",g)},h=(g,S)=>{const T=g.id;(n.isString(T)||n.isNumber(T))&&T!==void 0&&t("update:activeId",T),t("onClickOption",g,S)};return(g,S)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(r.value)},[e.createElementVNode("div",vC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(T,w)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-g-${w}`,class:e.normalizeClass(d(w)),onClick:E=>f(w)},[e.createElementVNode("span",kC,e.toDisplayString(T.text),1)],10,yC))),128))]),e.createElementVNode("div",SC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(T,w)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-o-${w}`,class:e.normalizeClass(m(T)),onClick:E=>h(T,w)},[e.createElementVNode("span",wC,e.toDisplayString(T.text),1),p(T)?(e.openBlock(),e.createElementBlock("span",CC,[e.createVNode(fe,{name:"check1"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,bC))),128))])],10,gC))}}),EC=["id"],BC={class:"panel-signature__footer"},xC=500,Wi=e.defineComponent({name:"ClSignature",__name:"Index",props:{id:String,className:String,type:{type:String,default:"png"},penColor:{type:String,default:"#000"},lineWidth:{type:Number,default:3},backgroundColor:{type:String,default:""},clearButtonText:{type:String,default:"清空"},confirmButtonText:{type:String,default:"确认"}},emits:["onStart","onEnd","onSigning","onSubmit","onClear"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.useTemplateRef("refElCanvas");let c=null,r=!1,d=0,m=0,p=null,f=!1,h=null,g=0,S=0;const T=e.computed(()=>t.type==="png"||t.type==="jpeg"?t.type:"png"),w=e.computed(()=>{const $={"panel-signature":!0};return n.getJsonMerge($,ue.getClassNameJson(t.className))}),E=e.computed(()=>{const $={};return t.backgroundColor&&($["--signature-bg"]=t.backgroundColor),$}),M=()=>{const $=u.value;if(!$||!$.clientWidth||!$.clientHeight)return;const z=window.devicePixelRatio||1;$.width=Math.round($.clientWidth*z),$.height=Math.round($.clientHeight*z);const oe=$.getContext("2d");oe&&(oe.scale(z,z),oe.lineCap="round",oe.lineJoin="round",c=oe)},V=()=>{const $=u.value;if(!$||!$.clientWidth||!$.clientHeight)return;const z=++g;S++;let oe="";if(d>0)try{const Z=$.getContext("2d");!!Z&&Z.getImageData(0,0,$.width,$.height).data.some(Y=>Y!==0)?oe=$.toDataURL():d=0}catch(Z){d=0,ve.warn("ClSignature","警告:画布导出失败",Z)}if(M(),oe){const Z=new Image;Z.onload=()=>{z===g&&(r||c?.drawImage(Z,0,0,$.clientWidth,$.clientHeight))},Z.onerror=()=>{z===g&&(r||(d=0),ve.warn("ClSignature","警告:画布内容恢复失败"))},Z.src=oe}},I=($,z)=>{const oe=u.value?.getBoundingClientRect();return{x:$-(oe?.left??0),y:z-(oe?.top??0)}},N=$=>{const z=c;if(!z||!h)return;const oe=(h.x+$.x)/2,Z=(h.y+$.y)/2;z.beginPath(),z.moveTo(h.x,h.y),z.quadraticCurveTo(h.x,h.y,oe,Z),z.lineTo($.x,$.y),z.stroke(),h=$},x=($,z)=>{const oe=c;if(!oe)return;oe.strokeStyle=t.penColor;const Z=n.isFinite(t.lineWidth)?t.lineWidth:3,W=Math.max(Z,1);oe.lineWidth=W;const Y=I($,z);h=Y,oe.beginPath(),oe.arc(Y.x,Y.y,W/2,0,Math.PI*2),oe.fillStyle=t.penColor,oe.fill(),d+=1,s("onStart")},L=()=>{r&&(r=!1,h=null,s("onEnd"))},D=()=>{const $=u.value;if(!$)return"";try{const W=$.getContext("2d");if(!(!!W&&W.getImageData(0,0,$.width,$.height).data.some(q=>q!==0)))return""}catch(W){return ve.warn("ClSignature","警告:检测画布内容失败,按空签名处理",W),""}let z=t.backgroundColor;T.value==="jpeg"&&!z&&(z="var(--cl-bg, #ffffff)");const oe=$,Z=z?document.createElement("canvas"):oe;if(z){Z.width=oe.width,Z.height=oe.height;const W=Z.getContext("2d");if(W)W.fillStyle=z,W.fillRect(0,0,Z.width,Z.height),W.drawImage(oe,0,0);else return ve.warn("ClSignature","警告:导出画布上下文创建失败,无法导出"),""}try{return Z.toDataURL(`image/${T.value}`)}catch(W){return ve.warn("ClSignature","警告:导出签名图片失败",W),""}},O=()=>{const $=c,z=u.value;!$||!z||(g++,S++,$.clearRect(0,0,z.width,z.height),d=0,r=!1,h=null,s("onClear"))},X=()=>{s("onSubmit",{image:d>0?D():"",canvas:u.value??void 0})};e.onMounted(()=>{e.nextTick(()=>{f||!u.value||(M(),p=new ut({element:u.value,callback:()=>{V()}}))})}),e.onUnmounted(()=>{f=!0,p?.destroy(),p=null}),e.watch(()=>t.type,$=>{$!=="png"&&$!=="jpeg"&&ve.warn("ClSignature","警告:type 仅支持 png 或 jpeg,已回退为 png")},{immediate:!0});const Q=$=>{if(m=Date.now(),r)return;const z=$.touches[0];z&&(r=!0,x(z.clientX,z.clientY))},R=$=>{if(!r)return;const z=$.touches[0];z&&(m=Date.now(),N(I(z.clientX,z.clientY)),s("onSigning",$))},C=()=>{L()},k=$=>{Date.now()-m<xC||r||(r=!0,x($.clientX,$.clientY))},b=$=>{r&&(N(I($.clientX,$.clientY)),s("onSigning",$))},v=()=>{L()},_=()=>{O()},y=()=>{X()},B=()=>d>0?D():"";return l({getValue:B,getValueData:()=>({value:B(),canvas:u.value??void 0}),setValue:$=>{if(!n.isNonEmptyString($)||!u.value)return;const z=++S;g++;const oe=u.value;if(!oe.clientWidth||!oe.clientHeight){d=0,ve.warn("ClSignature","警告:签名回显失败,画布当前无尺寸");return}const Z=new Image;Z.onload=()=>{if(z!==S)return;const W=u.value,Y=c;if(!W||!Y||!W.clientWidth||!W.clientHeight){d=0;return}Y.clearRect(0,0,W.width,W.height),Y.drawImage(Z,0,0,W.clientWidth,W.clientHeight),d=1},Z.onerror=()=>{z===S&&(d=0,ve.warn("ClSignature","警告:签名图片回显失败(图片加载出错)"))},Z.src=$},clear:()=>{O()},submit:()=>{X()}}),($,z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(w.value)},[e.createElementVNode("div",{class:"panel-signature__content",style:e.normalizeStyle(E.value)},[e.createElementVNode("canvas",{ref_key:"refElCanvas",ref:u,class:"panel-signature__canvas",role:"img","aria-label":"手写签名区",onTouchstart:Q,onTouchmove:e.withModifiers(R,["prevent"]),onTouchend:C,onMousedown:k,onMousemove:b,onMouseup:v,onMouseleave:v},null,544)],4),e.createElementVNode("div",BC,[e.createElementVNode("button",{type:"button",class:"panel-signature__btn",onClick:_},e.toDisplayString(a.clearButtonText),1),e.createElementVNode("button",{type:"button",class:"panel-signature__btn panel-signature__btn--confirm",onClick:y},e.toDisplayString(a.confirmButtonText),1)])],10,EC))}}),TC=["id"],DC=["onClick"],IC={class:"steps-circle-wrap"},_C={key:0,class:"steps-icon"},NC={key:1,class:"steps-circle"},VC={class:"steps-content"},MC={class:"steps-title"},OC={key:0,class:"steps-desc"},ji=e.defineComponent({name:"ClSteps",__name:"Index",props:{id:String,className:String,stepsList:{type:Array,default:()=>[]},active:{type:Number,default:0,validator:a=>Number.isInteger(a)&&a>=0},direction:{type:String,default:"horizontal",validator:a=>["horizontal","vertical"].indexOf(a)!==-1},activeColor:{type:String,default:"var(--cl-primary, #1088f0)"},inactiveColor:{type:String,default:"var(--cl-border, #cfcfcf)"}},emits:["onClickStep"],setup(a,{emit:l}){const o=a,t=l,s=`steps-${n.getRandom(5)}`,i=o.id,u=e.computed(()=>Array.isArray(o.stepsList)?o.stepsList:[]),c=e.computed(()=>{const h={"panel-steps":!0,"panel-steps--vertical":o.direction==="vertical","panel-steps--horizontal":o.direction==="horizontal"};return n.getJsonMerge(h,ue.getClassNameJson(o.className))}),r=e.computed(()=>({"--steps-active-color":o.activeColor,"--steps-inactive-color":o.inactiveColor})),d=h=>({"steps-item":!0,"steps-item--active":h<=o.active,"steps-item--last":h===u.value.length-1}),m=h=>{const g=u.value[h];return!!g&&n.isNonEmptyString(g.icon)},p=h=>{const g=u.value[h];return g&&n.isNonEmptyString(g.icon)?g.icon:""},f=h=>{t("onClickStep",h)};return(h,g)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(c.value),style:e.normalizeStyle(r.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(S,T)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${s}-${T}`},[S?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d(T)),onClick:w=>f(T)},[e.createElementVNode("div",IC,[m(T)?(e.openBlock(),e.createElementBlock("span",_C,[e.createVNode(fe,{name:p(T)},null,8,["name"])])):(e.openBlock(),e.createElementBlock("span",NC,e.toDisplayString(T+1),1))]),e.createElementVNode("div",VC,[e.createElementVNode("div",MC,e.toDisplayString(S.text),1),S.description?(e.openBlock(),e.createElementBlock("div",OC,e.toDisplayString(S.description),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,DC)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],14,TC))}}),LC=["id"],$C={key:0,class:"swipe-indicators"},AC=50,FC=350,PC=3e3,RC="0.3s",Yi=e.defineComponent({name:"ClSwipe",__name:"Index",props:{id:String,className:String,isAutoplay:{type:Boolean,default:!0},autoplayInterval:{type:Number,default:3e3},isLoop:{type:Boolean,default:!0},isShowIndicators:{type:Boolean,default:!0},height:{type:String,default:"200px"}},emits:["onChange","onClick"],setup(a,{emit:l}){const o=a,t=l,s=`swipe-${n.getRandom(5)}`,i=o.id,u=e.useSlots(),c=e.ref(0);let r=0,d=0,m=-1,p="";const f=e.ref(!1);let h=null;const g=e.ref(0);let S=!1,T=0,w=-1,E=!0;const M=e.computed(()=>{g.value;const v=u.default?u.default():[];return Math.max(1,v.length)}),V=e.computed(()=>{let v={"panel-swipe":!0};return v=n.getJsonMerge(v,ue.getClassNameJson(o.className)),v}),I=e.computed(()=>({height:n.isNonEmptyString(o.height)?o.height:"200px"})),N=e.computed(()=>({transform:`translateX(${-c.value*100}%)`,transition:f.value?"none":`transform ${RC} ease`})),x=v=>{const _=M.value;if(_<=1)return!1;let y=v;return o.isLoop?y=(v%_+_)%_:y=Math.min(Math.max(v,0),_-1),y!==c.value?(c.value=y,t("onChange",y),!0):!1},L=()=>{if(!E||!o.isAutoplay||M.value<2||!o.isLoop&&c.value>=M.value-1||f.value)return;D();const v=n.isNumber(o.autoplayInterval)&&n.isFinite(o.autoplayInterval)&&o.autoplayInterval>0?o.autoplayInterval:PC;h=setInterval(()=>{const _=x(c.value+1);!o.isLoop&&!_&&D()},v)},D=()=>{h&&(clearInterval(h),h=null)},O=v=>({"swipe-indicator":!0,"swipe-indicator--active":v===c.value});e.onMounted(()=>{L()}),e.onUpdated(()=>{const v=u.default?u.default().length:0;v!==w&&(w=v,g.value++)}),e.onActivated(()=>{E=!0,L()}),e.onDeactivated(()=>{E=!1,D()}),e.onBeforeUnmount(()=>{D()}),e.watch(()=>o.isAutoplay,v=>{v?L():D()}),e.watch(()=>o.autoplayInterval,()=>{D(),L()}),e.watch(()=>o.isLoop,()=>{L()}),e.watch(M,v=>{const _=c.value>=v;if(_){const y=Math.max(0,v-1);c.value=y,e.nextTick(()=>{t("onChange",y)})}if(v<2){D();return}o.isAutoplay&&(_||h===null)&&(D(),L())});const X=v=>{if(v.touches.length>1)return;const _=v.touches?.[0];_&&(S=!1,p="",m=_.identifier,r=_.clientX,d=_.clientY,f.value=!0,D())},Q=v=>{if(!f.value||v.touches.length>1)return;const _=Array.from(v.touches).find(A=>A.identifier===m);if(!_)return;const y=_.clientX-r,B=_.clientY-d;if(p===""&&(p=Math.abs(y)>Math.abs(B)?"horizontal":"vertical"),p==="horizontal"&&(S=!0,Math.abs(y)>AC)){let A=!1;y<0?A=x(c.value+1):A=x(c.value-1),A&&(f.value=!1)}},R=()=>{f.value=!1,S&&(T=Date.now()),L()},C=v=>{v.touches.length>0||R()},k=()=>{R()},b=()=>{const v=Date.now()-T;v>=0&&v<FC||t("onClick")};return(v,_)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(V.value),style:e.normalizeStyle(I.value),role:"region","aria-roledescription":"轮播图","aria-label":"轮播图",onTouchstart:X,onTouchmove:Q,onTouchend:C,onTouchcancel:k,onClick:b},[e.createElementVNode("div",{class:"swipe-track",style:e.normalizeStyle(N.value)},[e.renderSlot(v.$slots,"default")],4),a.isShowIndicators?(e.openBlock(),e.createElementBlock("div",$C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(y,B)=>(e.openBlock(),e.createElementBlock("span",{key:`${s}-ind-${y}`,class:e.normalizeClass(O(B)),"aria-hidden":"true"},null,2))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],46,LC))}}),HC=["id"],zC=["onClick"],UC={class:"tabbar-item-text"},qi=e.defineComponent({name:"ClTabbar",__name:"Index",props:{id:String,className:String,itemsList:{type:Array,default:()=>[]},active:{type:Number,default:0},activeColor:{type:String,default:"var(--cl-primary, #1088f0)"},inactiveColor:{type:String,default:"var(--cl-text-secondary, #666666)"},isSafeAreaInsetBottom:Boolean,isFixed:Boolean,isPlaceholder:Boolean,zIndex:{type:Number,default:1e3}},emits:["onChange","onClickItem"],setup(a,{emit:l}){const o=a,t=l,s=`tabbar-${n.getRandom(5)}`,i=o.id,u=e.computed(()=>Array.isArray(o.itemsList)?o.itemsList.map(T=>T!=null&&n.getTypeof(T)==="object"?T:null):[]),c=e.computed(()=>{const T={};return u.value.forEach((w,E)=>{T[E]=w!=null?S(w):0}),T}),r=e.computed(()=>o.isFixed&&o.isPlaceholder),d=e.computed(()=>{const T=u.value.length,w=o.active;return n.getTypeof(w)==="symbol"||!n.isFinite(w)||T===0?0:Math.min(Math.max(w,0),T-1)}),m=e.computed(()=>n.getTypeof(o.zIndex)==="symbol"||!n.isFinite(o.zIndex)?1e3:o.zIndex),p=e.computed(()=>{const T={"panel-tabbar":!0,"panel-tabbar--fixed":o.isFixed,"panel-tabbar--safe-bottom":o.isSafeAreaInsetBottom};return n.getJsonMerge(T,ue.getClassNameJson(o.className))}),f=e.computed(()=>({"--tabbar-active-color":o.activeColor,"--tabbar-inactive-color":o.inactiveColor,zIndex:m.value})),h=(T,w)=>{t("onClickItem",w),w!==o.active&&t("onChange",w)},g=(T,w)=>({"tabbar-item":!0,"tabbar-item--active":w===d.value}),S=T=>{const w=n.getTypeof(T.badge)==="symbol"?NaN:Number(T.badge);return n.isFinite(w)&&w>0?w:0};return(T,w)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{id:e.unref(i),class:e.normalizeClass(p.value),style:e.normalizeStyle(f.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(E,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${s}-${M}`},[E!=null?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(g(E,M)),onClick:V=>h(E,M)},[E.iconName||E.icon?(e.openBlock(),e.createBlock(fe,{key:0,name:E.iconName||E.icon,size:20,className:"tabbar-item-icon"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",UC,e.toDisplayString(E.text),1),c.value[M]>0?(e.openBlock(),e.createBlock(Pt,{key:2,num:c.value[M],colorSty:"var(--cl-danger, #ee0a24)",className:"tabbar-item-badge"},null,8,["num"])):e.createCommentVNode("",!0)],10,zC)):e.createCommentVNode("",!0)],64))),128))],14,HC),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-tabbar-placeholder",{"panel-tabbar-placeholder--safe":o.isSafeAreaInsetBottom}])},null,2)):e.createCommentVNode("",!0)],64))}}),JC=["id"],KC=["onClick"],WC={class:"tabm-nav-text"},jC=["id"],Xi=e.defineComponent({name:"ClTabM",__name:"Index",props:{id:String,className:String,tabsList:{type:Array,default:()=>[]},active:{type:Number,default:0},activeColor:{type:String,default:"var(--cl-primary, #1088f0)"},inactiveColor:{type:String,default:"var(--cl-text-secondary, #666666)"},isLineAnimated:{type:Boolean,default:!0}},emits:["onChange","onClickTab"],setup(a,{emit:l}){const o=a,t=l,s=`tabm-${n.getRandom(5)}`,i=o.id,u=e.useTemplateRef("refElTabs"),c=e.ref(0),r=e.ref(0),d=e.computed(()=>Array.isArray(o.tabsList)?o.tabsList:[]),m=e.computed(()=>{const E=d.value.length;return E?n.isFinite(o.active)?Math.trunc(Math.min(Math.max(o.active,0),E-1)):0:-1}),p=e.computed(()=>{const E={"panel-tab-m":!0};return n.getJsonMerge(E,ue.getClassNameJson(o.className))}),f=e.computed(()=>({"tabm-nav-line":!0,"tabm-nav-line--no-animated":!o.isLineAnimated})),h=e.computed(()=>({left:`${c.value}px`,width:`${r.value}px`})),g=e.computed(()=>({"--tabm-active-color":o.activeColor||"var(--cl-primary, #1088f0)","--tabm-inactive-color":o.inactiveColor||"var(--cl-text-secondary, #666666)"})),S=()=>{u.value&&e.nextTick(()=>{const E=u.value;if(!E)return;const V=E.querySelectorAll(".tabm-nav-text")[m.value];V&&(c.value=V.offsetLeft,r.value=V.offsetWidth)})};e.onMounted(()=>{S()}),e.onActivated(()=>{S()}),e.watch([()=>o.active,()=>d.value,()=>d.value.length],()=>{S()});const T=E=>{const M=d.value[E];!M||M.disabled||(t("onClickTab",E),E!==m.value&&t("onChange",E))},w=E=>({"tabm-nav-item":!0,"tabm-nav-item--active":E===m.value,"tabm-nav-item--disabled":!!d.value[E]?.disabled});return(E,M)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(p.value),style:e.normalizeStyle(g.value)},[e.createElementVNode("div",{ref_key:"refElTabs",ref:u,class:"tabm-nav"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(V,I)=>(e.openBlock(),e.createElementBlock("div",{key:`${s}-${I}`,class:e.normalizeClass(w(I)),onClick:N=>T(I)},[e.createElementVNode("span",WC,e.toDisplayString(V?.title),1)],10,KC))),128)),e.createElementVNode("div",{class:e.normalizeClass(f.value),style:e.normalizeStyle(h.value)},null,6)],512),e.createElementVNode("div",{class:"tabm-content",id:`${s}-tabpanel`},[e.renderSlot(E.$slots,"default")],8,jC)],14,JC))}}),YC=["id"],qC={key:1},Gi=e.defineComponent({name:"ClTextHighlight",__name:"Index",props:{id:String,className:String,sourceText:String,highlightText:String,tag:{type:String,default:"mark"},isAutoEscape:{type:Boolean,default:!0}},setup(a){const l=a,o=`text-highlight-${n.getRandom(5)}`,t=l.id,s=e.computed(()=>{const c=l.tag;return n.isNonEmptyString(c)?c:"mark"}),i=e.computed(()=>{const c=l.sourceText||"",r=(l.highlightText||"").trim();if(!c||!r)return c?[{text:c,highlight:!1}]:[];const d=[];let m=0,p=c.indexOf(r);for(;p!==-1;)p>m&&d.push({text:c.slice(m,p),highlight:!1}),d.push({text:c.slice(p,p+r.length),highlight:!0}),m=p+r.length,p=c.indexOf(r,m);return m<c.length&&d.push({text:c.slice(m),highlight:!1}),d}),u=e.computed(()=>{const c={"panel-text-highlight":!0};return n.getJsonMerge(c,ue.getClassNameJson(l.className))});return(c,r)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(t),class:e.normalizeClass(u.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${o}-${m}`},[d.highlight?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,class:"highlight-mark"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1024)):(e.openBlock(),e.createElementBlock("span",qC,e.toDisplayString(d.text),1))],64))),128))],10,YC))}}),XC=["id"],GC={key:2,class:"panel-toast__text"},La=e.defineComponent({name:"ClToast",__name:"Index",props:{id:String,className:String,show:Boolean,type:{type:String,default:"text",validator:a=>["text","success","fail","loading"].indexOf(a)!==-1},message:String,position:{type:String,default:"middle",validator:a=>["top","middle","bottom"].indexOf(a)!==-1},duration:{type:Number,default:2e3},isOverlay:Boolean,isForbidClick:Boolean,loadingType:{type:String,default:"spinner",validator:a=>["spinner","circular"].indexOf(a)!==-1},icon:String,iconSize:{type:[String,Number],default:36},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""}},emits:["update:show","onOpen","onOpened","onClose","onClosed","onClick"],setup(a,{expose:l,emit:o}){const t=a,s=o,i=t.id,u=e.ref(!1),c=e.ref(t.type),r=e.ref(t.message||""),d=e.ref(t.position),m=e.ref(n.isNumber(t.duration)&&n.isFinite(t.duration)?Math.max(0,Number(t.duration)):0),p=e.ref(t.isOverlay),f=e.ref(t.isForbidClick),h=e.ref(t.loadingType),g=e.ref(t.icon||""),S=e.ref(n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3);let T=null;const w=e.computed(()=>u.value),E=e.computed(()=>{const W=t.teleportTarget;return W==="self"||!n.isString(W)||n.isEmpty(W.trim())?"body":W}),M=e.computed(()=>t.teleportTarget==="self"),V=e.computed(()=>p.value||f.value),I=e.computed(()=>c.value!=="text"||n.isNonEmptyString(g.value)),N=e.computed(()=>c.value==="loading"),x=e.computed(()=>n.isNonEmptyString(r.value)),L=e.computed(()=>n.isNonEmptyString(g.value)?g.value:c.value==="success"?"check":c.value==="fail"?"close":""),D=e.computed(()=>t.iconSize),O=e.computed(()=>{const W={"panel-toast":!0,"panel-toast--top":d.value==="top","panel-toast--middle":d.value==="middle","panel-toast--bottom":d.value==="bottom","panel-toast--icon-only":I.value&&!x.value};return n.getJsonMerge(W,ue.getClassNameJson(t.className))}),X=e.computed(()=>({"panel-toast__icon--success":c.value==="success","panel-toast__icon--fail":c.value==="fail"})),Q=e.computed(()=>({zIndex:S.value})),R=e.computed(()=>({zIndex:S.value+1})),C=()=>{T&&(clearTimeout(T),T=null)},k=()=>{C(),m.value>0&&(T=setTimeout(()=>{T=null,s("update:show",!1),T||(T=setTimeout(()=>{T=null,b()},300))},m.value))},b=()=>{C(),u.value=!1},v=()=>{c.value=t.type,r.value=t.message||"",d.value=t.position,m.value=n.isNumber(t.duration)&&n.isFinite(t.duration)?Math.max(0,Number(t.duration)):0,p.value=t.isOverlay,f.value=t.isForbidClick,h.value=t.loadingType,g.value=t.icon||"",S.value=n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3},_=(W,Y,q="text",J)=>{c.value=Y&&Y.type||q,r.value=n.isNonEmptyString(W)?W:t.message||"",d.value=Y&&Y.position||t.position;const U=Y&&n.isNumber(Y.duration)&&n.isFinite(Y.duration)?Math.max(0,Number(Y.duration)):void 0,ae=U!==void 0?U:J!==void 0?Math.max(0,Number(J)):t.duration;m.value=n.isNumber(ae)&&n.isFinite(ae)?Math.max(0,Number(ae)):n.isNumber(t.duration)&&n.isFinite(t.duration)?t.duration:0,p.value=Y&&Y.overlay!==void 0?Y.overlay:t.isOverlay,f.value=Y&&Y.forbidClick!==void 0?Y.forbidClick:t.isForbidClick,h.value=Y&&Y.loadingType||t.loadingType,g.value=Y&&Y.icon||t.icon||"",S.value=Y&&Y.zIndex!==void 0&&n.isNumber(Y.zIndex)&&n.isFinite(Y.zIndex)?Math.max(0,Number(Y.zIndex)):n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3,u.value=!0,k()};e.onBeforeUnmount(()=>{C()}),e.watch(()=>t.show,W=>{W?(v(),u.value=!0,k()):b()},{immediate:!0});const y=()=>{s("onClick")},B=()=>{s("onOpen")},A=()=>{s("onOpened")},F=()=>{s("onClose")},P=()=>{s("onClosed")};return l({toast:(W,Y)=>{_(W,Y,"text")},success:(W,Y)=>{_(W,Y,"success")},fail:(W,Y)=>{_(W,Y,"fail")},loading:(W,Y)=>{_(W,Y,"loading",0)},close:(W=0)=>{n.isFinite(W)&&W>0?(C(),T=setTimeout(()=>{T=null,b()},W)):b()}}),(W,Y)=>(e.openBlock(),e.createBlock(e.Teleport,{to:E.value,disabled:M.value},[w.value&&V.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-toast-mask",{"panel-toast-mask--overlay":p.value}]),style:e.normalizeStyle(Q.value)},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(e.Transition,{name:"toast-fade",onEnter:B,onAfterEnter:A,onLeave:F,onAfterLeave:P},{default:e.withCtx(()=>[w.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(i),class:e.normalizeClass(O.value),style:e.normalizeStyle(R.value),onClick:y},[I.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-toast__icon",X.value])},[N.value?(e.openBlock(),e.createBlock(He,{key:0,theme:"toastRing","loading-type":h.value,color:"white"},null,8,["loading-type"])):(e.openBlock(),e.createBlock(fe,{key:1,name:L.value,size:D.value,color:"var(--cl-bg, #ffffff)"},null,8,["name","size"]))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),x.value?(e.openBlock(),e.createElementBlock("div",GC,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],14,XC)):e.createCommentVNode("",!0)]),_:1})],8,["to","disabled"]))}}),QC=["id"],Qi=e.defineComponent({name:"ClWatermark",__name:"Index",props:{id:String,className:String,content:String,fontColor:{type:String,default:"rgba(0, 0, 0, 0.15)"},fontSize:{type:Number,default:14},rotate:{type:Number,default:-22},zIndex:{type:Number,default:100},gapX:{type:Number,default:100},gapY:{type:Number,default:100},isFullScreen:{type:Boolean,default:!1}},setup(a){const l=a,o=l.id,t=e.computed(()=>{const u=n.isNonEmptyString(l.content)?l.content:"",c=n.isNonEmptyString(l.fontColor)?l.fontColor:"rgba(0, 0, 0, 0.15)",r=n.isFinite(l.fontSize)&&l.fontSize>0?l.fontSize:14,d=n.isFinite(l.rotate)?l.rotate:-22,m=n.isFinite(l.gapX)&&l.gapX>0?l.gapX:100,p=n.isFinite(l.gapY)&&l.gapY>0?l.gapY:100,f=w=>w.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),h=f(u),g=f(c),S=`<svg xmlns="http://www.w3.org/2000/svg" width="${m}" height="${p}">
|
|
13
|
-
<text x="${m/2}" y="${p/2}" fill="${g}" font-size="${r}" text-anchor="middle" dominant-baseline="middle" transform="rotate(${d} ${m/2} ${p/2})">${h}</text>
|
|
14
|
-
</svg>`;return`url("data:image/svg+xml,${encodeURIComponent(S)}")`}),s=e.computed(()=>{const u={"panel-watermark":!0};return n.getJsonMerge(u,ue.getClassNameJson(l.className))}),i=e.computed(()=>({backgroundImage:t.value,zIndex:n.isFinite(l.zIndex)?l.zIndex:100,position:l.isFullScreen?"fixed":"absolute"}));return(u,c)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(o),class:e.normalizeClass(s.value),style:e.normalizeStyle(i.value)},[e.renderSlot(u.$slots,"default")],14,QC))}});let Pn=null;const $a=(a={})=>{if(Pn)return Pn;const l=e.createApp(Ma,a),o=document.createElement("div"),t=l.mount(o);return Pn={show:(s,i)=>{t.notify(s,i)},success:(s,i)=>{t.success(s,i)},danger:(s,i)=>{t.danger(s,i)},warning:(s,i)=>{t.warning(s,i)},close:()=>{t.close()}},Pn};function ZC(){const a=$a();return{notify:a,show:a.show,success:a.success,danger:a.danger,warning:a.warning,close:a.close}}const eE="cllazy",tE=a=>{const l=new Ds(a);return{deep:!0,mounted:l.mount.bind(l),updated:l.update.bind(l),unmounted:l.unmount.bind(l)}},nE=Object.freeze(Object.defineProperty({__proto__:null,directive:tE,name:eE},Symbol.toStringTag,{value:"Module"}));let Rn=null;const oE=(a={})=>{if(Rn)return Rn;const l=e.createApp(ya,a),o=document.createElement("div"),t=l.mount(o);return Rn={show:(s,i)=>{t.show(s,i)},hide:(s=1e3)=>{t.hide(s)}},Rn};function aE(a){return l=>{a.forEach(o=>{l.component(o.name,o)})}}function Zi(a,l){return(o,t={})=>{Object.keys(a).forEach(i=>{o.directive(a[i].name,a[i].directive(t[i]||{}))});const s={};Object.keys(l).forEach(i=>{s[i]=l[i](t[i]||{})}),n.isObject(t.globalsOption)&&Gl(t.globalsOption),o.provide("$ClGlobals",s)}}const Aa={lazyImage:nE},Fa={clipboard:ma,loadScreen:oE,languagePack:Rs,validate:Ts},lE=[Rt,Re,fe,He,Vs,Ms,on,ya,$s,wa,Qe,Zl,ua,as,ss,os,Ot,ka,bn,Sa,ba,da,ft,Pt,Ls,is,bs,ws,ga,Cs,va,no,Bs,xs,io,Et,_s,Lt,kn,Ns,nn,ro,As,co,Fs,Ps,tn],er={...Aa,codeHighlight:yi,waves:ns,tooltip:ls};function sE(a){let l=null,o=null;const t=()=>l?Promise.resolve(l):(o||(o=Promise.resolve().then(()=>Fk).then(s=>(l=s.default(a),l))),o);return{show:s=>t().then(i=>i.show(s)),image:s=>t().then(i=>i.image(s)),video:s=>t().then(i=>i.video(s)),destroy:()=>t().then(s=>s.destroy())}}const tr={...Fa,notify:hi,alert:gi,preview:sE},iE=[Hs,zs,Us,Ws,Ca,Xs,xa,Gs,Qs,Zs,Ta,ei,Ea,ti,Da,ni,Ba,Ia,Sn,Bn,_a,oi,Na,li,ii,ci,ui,di,mi,Va,pi,fi];let Hn=null;const rE=(a={})=>{if(Hn)return Hn;const l=e.createApp(La,a),o=document.createElement("div"),t=l.mount(o);return Hn={show:(s,i)=>{t.toast(s,i)},success:(s,i)=>{t.success(s,i)},fail:(s,i)=>{t.fail(s,i)},loading:(s,i)=>{t.loading(s,i)},close:s=>{t.close(s)}},Hn},nr={...Aa},or={...Fa,toast:rE,notifyM:$a},cE=[Oa,Ei,en,kt,La,Ci,xi,Fi,Pi,Ai,Hi,Wi,Ri,ki,Di,Ii,Ni,_i,Ma,Ui,Bi,Gi,$i,ji,Yi,Qi,bi,Vi,Mi,Li,Ji,Xi,qi,Ki,Si,Oi,wi,zi,Ti],uE=[...lE,...iE,...cE],dE={...Aa,...er,...nr},mE={...Fa,...tr,...or},pE=(a,l={})=>{aE(uE)(a),Zi(dE,mE)(a,l)},fE={...er,...nr},hE={...tr,...or},gE=Zi(fE,hE);exports.Alert=gi;exports.Clipboard=ma;exports.CodeHighlight=yi;exports.CommonBase=n;exports.Notify=hi;exports.NotifyM=$a;exports.Tooltip=ls;exports.Waves=ns;exports._sfc_main=ki;exports._sfc_main$1=Hs;exports._sfc_main$10=os;exports._sfc_main$100=Yi;exports._sfc_main$101=As;exports._sfc_main$102=Xi;exports._sfc_main$103=qi;exports._sfc_main$104=ci;exports._sfc_main$105=ui;exports._sfc_main$106=di;exports._sfc_main$107=mi;exports._sfc_main$108=co;exports._sfc_main$109=Gi;exports._sfc_main$11=ua;exports._sfc_main$110=La;exports._sfc_main$111=bn;exports._sfc_main$112=Va;exports._sfc_main$113=Fs;exports._sfc_main$114=Ps;exports._sfc_main$115=Qi;exports._sfc_main$116=pi;exports._sfc_main$117=fi;exports._sfc_main$12=as;exports._sfc_main$13=Ei;exports._sfc_main$14=Bi;exports._sfc_main$15=da;exports._sfc_main$16=ft;exports._sfc_main$17=tn;exports._sfc_main$18=Us;exports._sfc_main$19=xi;exports._sfc_main$2=Si;exports._sfc_main$20=ss;exports._sfc_main$21=Ws;exports._sfc_main$22=is;exports._sfc_main$23=Ca;exports._sfc_main$24=Ti;exports._sfc_main$25=Xs;exports._sfc_main$26=bs;exports._sfc_main$27=xa;exports._sfc_main$28=ws;exports._sfc_main$29=Gs;exports._sfc_main$3=bi;exports._sfc_main$30=Qs;exports._sfc_main$31=Di;exports._sfc_main$32=Ii;exports._sfc_main$33=Zs;exports._sfc_main$34=Ta;exports._sfc_main$35=ei;exports._sfc_main$36=ga;exports._sfc_main$37=Cs;exports._sfc_main$38=Ea;exports._sfc_main$39=_i;exports._sfc_main$4=Pt;exports._sfc_main$40=Ni;exports._sfc_main$41=va;exports._sfc_main$42=Bs;exports._sfc_main$43=no;exports._sfc_main$44=xs;exports._sfc_main$45=io;exports._sfc_main$46=ti;exports._sfc_main$47=Vi;exports._sfc_main$48=fe;exports._sfc_main$49=Et;exports._sfc_main$5=wi;exports._sfc_main$50=Mi;exports._sfc_main$51=Re;exports._sfc_main$52=_s;exports._sfc_main$53=Lt;exports._sfc_main$54=kn;exports._sfc_main$55=Oi;exports._sfc_main$56=Ns;exports._sfc_main$57=nn;exports._sfc_main$58=Da;exports._sfc_main$59=ro;exports._sfc_main$6=Zl;exports._sfc_main$60=Ot;exports._sfc_main$61=He;exports._sfc_main$62=Vs;exports._sfc_main$63=on;exports._sfc_main$64=ya;exports._sfc_main$65=Ms;exports._sfc_main$66=ka;exports._sfc_main$67=Li;exports._sfc_main$68=$i;exports._sfc_main$69=Ma;exports._sfc_main$7=Qe;exports._sfc_main$70=Ai;exports._sfc_main$71=Ls;exports._sfc_main$72=Rt;exports._sfc_main$73=Ia;exports._sfc_main$74=en;exports._sfc_main$75=Fi;exports._sfc_main$76=Pi;exports._sfc_main$77=Ri;exports._sfc_main$78=kt;exports._sfc_main$79=ni;exports._sfc_main$8=zs;exports._sfc_main$80=Ba;exports._sfc_main$81=$s;exports._sfc_main$82=Oa;exports._sfc_main$83=Sa;exports._sfc_main$84=ba;exports._sfc_main$85=Hi;exports._sfc_main$86=zi;exports._sfc_main$87=Sn;exports._sfc_main$88=Bn;exports._sfc_main$89=_a;exports._sfc_main$9=Ci;exports._sfc_main$90=oi;exports._sfc_main$91=Na;exports._sfc_main$92=li;exports._sfc_main$93=Ui;exports._sfc_main$94=ii;exports._sfc_main$95=Ji;exports._sfc_main$96=Ki;exports._sfc_main$97=Wi;exports._sfc_main$98=wa;exports._sfc_main$99=ji;exports.getGlobalConfig=ct;exports.index=vi;exports.installCore=gE;exports.installs=pE;exports.languagePack=Rs;exports.setGlobalConfig=Gl;exports.useNotifyM=ZC;
|