@xtctwins/tctwins-bimx-engine 0.3.0 → 0.3.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.
Files changed (168) hide show
  1. package/README.md +193 -196
  2. package/dist/{alert-ChDNxVgQ.mjs → Alert-CSiEPFGt.mjs} +8 -8
  3. package/dist/AnnotationTool-CKzHkqWM.mjs +239 -0
  4. package/dist/BIMX_Viewer_Lib.es.js +3 -3
  5. package/dist/BIMX_Viewer_Lib.umd.js +222 -175
  6. package/dist/CommentTool-5HhGDqpg.mjs +1541 -0
  7. package/dist/{HiddenTool-CoPawMRd.mjs → HiddenTool-BGFoHMWC.mjs} +16 -16
  8. package/dist/{InspectorTool-BIvnydPf.mjs → InspectorTool-DD3w7k07.mjs} +66 -66
  9. package/dist/{MeasureTool-BUi0QI_R.mjs → MeasureTool-COR8QLDf.mjs} +126 -102
  10. package/dist/{MouseTool-CdVwRiX1.mjs → MouseTool-OxODcO4X.mjs} +35 -32
  11. package/dist/{NavigateTool-DoP9z3yP.mjs → NavigateTool-Bw6GFzsg.mjs} +13 -13
  12. package/dist/{panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs → Panel.vue_vue_type_style_index_0_lang-DgM_qGLO.mjs} +2 -2
  13. package/dist/{RoamTool-POFy076i.mjs → RoamTool-X-b0hsmJ.mjs} +14 -14
  14. package/dist/ScreenShotTool-0xSJZBBw.mjs +430 -0
  15. package/dist/SectionTool-BqI2Qnk5.mjs +343 -0
  16. package/dist/SettingTool-CGkRGfZH.mjs +747 -0
  17. package/dist/StructureTree-CWAXoI0r.mjs +1662 -0
  18. package/dist/{tallPanel-DKlcFjrl.mjs → TallPanel-CR5vNQ4c.mjs} +14 -14
  19. package/dist/bimTools-D3TraX9d.mjs +75 -0
  20. package/dist/el-slider-CBVU9_og.mjs +1040 -0
  21. package/dist/{index-Dsq1epCY.mjs → index-CwRGVhoT.mjs} +55597 -53543
  22. package/dist/index.html +17 -17
  23. package/dist/style.css +1 -1
  24. package/package.json +4 -3
  25. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +38 -10
  26. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +37 -9
  27. package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +5 -7
  28. package/types/components/BCFComponents/BCFFilter.vue.d.ts +5 -7
  29. package/types/components/BCFComponents/BCFTool.vue.d.ts +4 -7
  30. package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +5 -7
  31. package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +5 -6
  32. package/types/components/BCFComponents/commentInput.vue.d.ts +36 -10
  33. package/types/components/BCFComponents/commentsView.vue.d.ts +36 -7
  34. package/types/components/BCFComponents/dialogPanel.vue.d.ts +5 -8
  35. package/types/components/BCFComponents/imageView.vue.d.ts +5 -7
  36. package/types/components/BCFComponents/imageZoomIn.vue.d.ts +5 -6
  37. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  38. package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +18 -1
  39. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
  40. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +32 -1
  41. package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
  42. package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +2 -0
  43. package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +2 -0
  44. package/types/components/BimViewerComponents/MobileCommentsTool/{add.vue.d.ts → MobileCommentAdd.vue.d.ts} +6 -8
  45. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +4 -5
  46. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
  47. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +478 -1
  48. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +499 -7
  49. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +5 -6
  50. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
  51. package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
  52. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
  53. package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
  54. package/types/components/BimViewerComponents/SectionTool.vue.d.ts +4 -0
  55. package/types/components/BimViewerComponents/SettingTool.vue.d.ts +4 -6
  56. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +4026 -1
  57. package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
  58. package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +18 -1
  59. package/types/components/BimxViewerComp.vue.d.ts +7 -14
  60. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +37 -10
  61. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +37 -9
  62. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +499 -7
  63. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +478 -1
  64. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +5 -8
  65. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +38 -12
  66. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +7 -9
  67. package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +5 -7
  68. package/types/components/bcf/AddObjectOrAnno.vue.d.ts +16 -0
  69. package/types/components/bcf/BCFAddPanel.vue.d.ts +55 -0
  70. package/types/components/bcf/BCFDetailPanel.vue.d.ts +59 -0
  71. package/types/components/bcf/BCFDisplayList.vue.d.ts +18 -0
  72. package/types/components/bcf/BCFFilter.vue.d.ts +14 -0
  73. package/types/components/bcf/BCFTool.vue.d.ts +15 -0
  74. package/types/components/bcf/CheckObjectPanel.vue.d.ts +11 -0
  75. package/types/components/bcf/CommentInput.vue.d.ts +51 -0
  76. package/types/components/bcf/CommentsView.vue.d.ts +48 -0
  77. package/types/components/bcf/DialogPanel.vue.d.ts +15 -0
  78. package/types/components/bcf/ImageView.vue.d.ts +17 -0
  79. package/types/components/bcf/ImageZoomIn.vue.d.ts +9 -0
  80. package/types/components/bcf/MobileBCFAdd.vue.d.ts +56 -0
  81. package/types/components/bcf/MobileBCFDetail.vue.d.ts +55 -0
  82. package/types/components/bcf/MobileBCFDisplayList.vue.d.ts +498 -0
  83. package/types/components/bcf/MobileBCFFilter.vue.d.ts +475 -0
  84. package/types/components/bcf/MobileBCFTool.vue.d.ts +17 -0
  85. package/types/components/bcf/MobileCommentInput.vue.d.ts +54 -0
  86. package/types/components/bcf/MobileCommentsView.vue.d.ts +17 -0
  87. package/types/components/bcf/SelectPanel.vue.d.ts +12 -0
  88. package/types/components/bimxViewer.vue.d.ts +7 -14
  89. package/types/components/comment/mobile/MobileCommentAdd.vue.d.ts +14 -0
  90. package/types/components/comment/mobile/MobileDetail.vue.d.ts +11 -0
  91. package/types/components/comment/mobile/MobileDraw.vue.d.ts +17 -0
  92. package/types/components/comment/mobile/MobileFilter.vue.d.ts +475 -0
  93. package/types/components/comment/mobile/MobileList.vue.d.ts +497 -0
  94. package/types/components/comment/mobile/MobileZoomIn.vue.d.ts +9 -0
  95. package/types/components/comment/pc/PcDraw.vue.d.ts +14 -0
  96. package/types/components/shared/Alert.vue.d.ts +32 -0
  97. package/types/components/shared/CloseButton.vue.d.ts +50 -0
  98. package/types/components/shared/CloseButtonDark.vue.d.ts +32 -0
  99. package/types/components/shared/EmptyPage.vue.d.ts +6 -0
  100. package/types/components/shared/Loading.vue.d.ts +2 -0
  101. package/types/components/shared/Panel.vue.d.ts +47 -0
  102. package/types/components/shared/Prompt.vue.d.ts +8 -0
  103. package/types/components/shared/RectangleButton.vue.d.ts +106 -0
  104. package/types/components/shared/TallPanel.vue.d.ts +69 -0
  105. package/types/components/shared/TallPanelNoPos.vue.d.ts +82 -0
  106. package/types/components/tools/AnnotationTool.vue.d.ts +14 -0
  107. package/types/components/tools/AppToolbar.vue.d.ts +27 -0
  108. package/types/components/tools/ClickEvent.vue.d.ts +6 -0
  109. package/types/components/tools/CommentTool.vue.d.ts +45 -0
  110. package/types/components/tools/HiddenTool.vue.d.ts +12 -0
  111. package/types/components/tools/InspectorTool.vue.d.ts +14 -0
  112. package/types/components/tools/MeasureTool.vue.d.ts +14 -0
  113. package/types/components/tools/MouseTool.vue.d.ts +6 -0
  114. package/types/components/tools/NavigateTool.vue.d.ts +10 -0
  115. package/types/components/tools/RoamTool.vue.d.ts +12 -0
  116. package/types/components/tools/ScreenShotTool.vue.d.ts +10 -0
  117. package/types/components/tools/SectionTool.vue.d.ts +14 -0
  118. package/types/components/tools/SettingTool.vue.d.ts +13 -0
  119. package/types/components/tools/StructureTree.vue.d.ts +11645 -0
  120. package/types/components/tools/Toolbar.vue.d.ts +10 -0
  121. package/types/components/utilsComponents/alert.vue.d.ts +1 -1
  122. package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
  123. package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
  124. package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
  125. package/types/components/utilsComponents/loading.vue.d.ts +1 -1
  126. package/types/components/utilsComponents/panel.vue.d.ts +8 -2
  127. package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
  128. package/types/components/utilsComponents/rectangleButton.vue.d.ts +3 -1
  129. package/types/components/utilsComponents/tallPanel.vue.d.ts +13 -3
  130. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +13 -3
  131. package/types/composables/useBimViewerEvent.d.ts +44 -0
  132. package/types/composables/useEmitHandler.d.ts +2 -0
  133. package/types/composables/useToolActive.d.ts +1 -0
  134. package/types/composables/useToolReady.d.ts +1 -0
  135. package/types/i18n/index.d.ts +5 -1
  136. package/types/i18n/locales/en-US.d.ts +1 -0
  137. package/types/i18n/locales/zh-CN.d.ts +1 -0
  138. package/types/pages/BimxViewerEntry.vue.d.ts +5 -57
  139. package/types/pages/viewerEntry.vue.d.ts +7 -57
  140. package/types/store/bcfReflect.d.ts +13 -81
  141. package/types/store/const/app.d.ts +66 -0
  142. package/types/store/const/bimTools.d.ts +81 -0
  143. package/types/store/const/project.d.ts +48 -0
  144. package/types/store/const/theme.d.ts +16 -0
  145. package/types/store/const/toolbar.d.ts +26 -0
  146. package/types/store/const.d.ts +11 -228
  147. package/types/store/initConfigs.d.ts +1 -1
  148. package/types/store/toolbars.d.ts +68 -46
  149. package/types/store/userInfoStore.d.ts +1 -1
  150. package/types/stores/viewerStore.d.ts +112 -0
  151. package/types/types/bcf.d.ts +83 -0
  152. package/types/types/events.d.ts +88 -0
  153. package/types/utils/OSSHelper.d.ts +27 -0
  154. package/types/utils/cacheInfo.d.ts +26 -3
  155. package/types/utils/dbscan.d.ts +1 -0
  156. package/types/utils/eventBus.d.ts +1 -83
  157. package/types/viewerManager/viewerManager.d.ts +53 -3
  158. package/dist/AnnotationTool-CGRte6Cc.mjs +0 -167
  159. package/dist/CommentTool-CT3wFozB.mjs +0 -1529
  160. package/dist/ScreenShotTool-CcUyU0g7.mjs +0 -357
  161. package/dist/SectionTool-DGjjH3JO.mjs +0 -331
  162. package/dist/SettingTool-CjXfbX5r.mjs +0 -657
  163. package/dist/StructureTree-DdRX-y-V.mjs +0 -1583
  164. package/dist/const-DOnRsYpZ.mjs +0 -389
  165. package/dist/el-input-number-CK5d8pzH.mjs +0 -818
  166. package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +0 -22
  167. package/types/components/BimViewerComponents/emptyPage.vue.d.ts +0 -8
  168. package/types/tests/cmt.d.ts +0 -1
@@ -0,0 +1,1040 @@
1
+ import { a9 as te, a8 as M, j as ge, aj as ue, a7 as xe, b as Ee, aa as Le, f as ee, ab as Ye, x as Oe, u as Be, af as Ue, i as Ve, q as me, a as We, ac as je, E as Ae, ao as $e, F as De, am as Ge, l as Te, N as we, t as qe, ap as et, v as _, w as He, g as he, aq as Je, s as Ne, ar as Fe, as as tt, at, ag as lt } from "./index-CwRGVhoT.mjs";
2
+ import { ArrowDown as nt, Minus as rt, ArrowUp as ut, Plus as it } from "@element-plus/icons-vue";
3
+ import { defineComponent as Me, ref as ie, reactive as ze, computed as y, watch as ve, onMounted as Qe, onUpdated as st, openBlock as C, createElementBlock as q, withModifiers as Ze, normalizeClass as H, unref as t, withDirectives as Re, withKeys as Ke, renderSlot as pe, createVNode as ye, withCtx as oe, createBlock as re, createCommentVNode as de, createSlots as ot, nextTick as ke, watchEffect as dt, shallowRef as ct, inject as mt, toRefs as Ie, normalizeStyle as se, createElementVNode as ce, toDisplayString as vt, h as ft, provide as bt, Fragment as Se, renderList as Pe } from "vue";
4
+ const gt = Ee({
5
+ /**
6
+ * @description same as `id` in native input
7
+ */
8
+ id: {
9
+ type: String,
10
+ default: void 0
11
+ },
12
+ /**
13
+ * @description incremental step
14
+ */
15
+ step: {
16
+ type: Number,
17
+ default: 1
18
+ },
19
+ /**
20
+ * @description whether input value can only be multiple of step
21
+ */
22
+ stepStrictly: Boolean,
23
+ /**
24
+ * @description the maximum allowed value
25
+ */
26
+ max: {
27
+ type: Number,
28
+ default: Number.MAX_SAFE_INTEGER
29
+ },
30
+ /**
31
+ * @description the minimum allowed value
32
+ */
33
+ min: {
34
+ type: Number,
35
+ default: Number.MIN_SAFE_INTEGER
36
+ },
37
+ /**
38
+ * @description binding value
39
+ */
40
+ modelValue: { type: [Number, null] },
41
+ /**
42
+ * @description same as `readonly` in native input
43
+ */
44
+ readonly: Boolean,
45
+ /**
46
+ * @description whether the component is disabled
47
+ */
48
+ disabled: {
49
+ type: Boolean,
50
+ default: void 0
51
+ },
52
+ /**
53
+ * @description size of the component
54
+ */
55
+ size: Le,
56
+ /**
57
+ * @description whether to enable the control buttons
58
+ */
59
+ controls: {
60
+ type: Boolean,
61
+ default: !0
62
+ },
63
+ /**
64
+ * @description position of the control buttons
65
+ */
66
+ controlsPosition: {
67
+ type: String,
68
+ default: "",
69
+ values: ["", "right"]
70
+ },
71
+ /**
72
+ * @description value should be set when input box is cleared
73
+ */
74
+ valueOnClear: {
75
+ type: ee([
76
+ String,
77
+ Number,
78
+ null
79
+ ]),
80
+ validator: (e) => e === null || M(e) || ["min", "max"].includes(e),
81
+ default: null
82
+ },
83
+ /**
84
+ * @description same as `name` in native input
85
+ */
86
+ name: String,
87
+ /**
88
+ * @description same as `placeholder` in native input
89
+ */
90
+ placeholder: String,
91
+ /**
92
+ * @description precision of input value
93
+ */
94
+ precision: {
95
+ type: Number,
96
+ validator: (e) => e >= 0 && e === Number.parseInt(`${e}`, 10)
97
+ },
98
+ /**
99
+ * @description whether to trigger form validation
100
+ */
101
+ validateEvent: {
102
+ type: Boolean,
103
+ default: !0
104
+ },
105
+ ...Ye(["ariaLabel"]),
106
+ /**
107
+ * @description native input mode for virtual keyboards
108
+ */
109
+ inputmode: {
110
+ type: ee(String),
111
+ default: void 0
112
+ },
113
+ /**
114
+ * @description alignment for the inner input text
115
+ */
116
+ align: {
117
+ type: ee(String),
118
+ default: "center"
119
+ },
120
+ /**
121
+ * @description whether to disable scientific notation input (e.g. 'e', 'E')
122
+ */
123
+ disabledScientific: Boolean,
124
+ /**
125
+ * @description specifies the format of the value presented in the input
126
+ */
127
+ formatter: { type: Function },
128
+ /**
129
+ * @description specifies the value extracted from the formatted input
130
+ */
131
+ parser: { type: Function },
132
+ /**
133
+ * @description same as `tabindex` in native input
134
+ */
135
+ tabindex: {
136
+ type: [String, Number],
137
+ default: 0
138
+ }
139
+ }), ht = {
140
+ [xe]: (e, a) => a !== e,
141
+ blur: (e) => e instanceof FocusEvent,
142
+ focus: (e) => e instanceof FocusEvent,
143
+ [ue]: (e) => M(e) || ge(e),
144
+ [te]: (e) => M(e) || ge(e)
145
+ }, yt = ["aria-label"], Vt = ["aria-label"];
146
+ var pt = /* @__PURE__ */ Me({
147
+ name: "ElInputNumber",
148
+ __name: "input-number",
149
+ props: gt,
150
+ emits: ht,
151
+ setup(e, { expose: a, emit: f }) {
152
+ const l = e, o = f, { t: i } = Oe(), s = Be("input-number"), p = ie(), d = ze({
153
+ currentValue: l.modelValue,
154
+ userInput: null
155
+ }), { formItem: r } = Ue(), S = y(() => M(l.modelValue) && l.modelValue <= l.min), I = y(() => M(l.modelValue) && l.modelValue >= l.max), E = y(() => {
156
+ const n = U(l.step);
157
+ return Ve(l.precision) ? Math.max(U(l.modelValue), n) : (n > l.precision && me("InputNumber", "precision should not be less than the decimal places of step"), l.precision);
158
+ }), W = y(() => l.controls && l.controlsPosition === "right"), J = We(), k = je(), F = y(() => {
159
+ if (d.userInput !== null) return d.userInput;
160
+ let n = d.currentValue;
161
+ if (ge(n)) return "";
162
+ if (M(n)) {
163
+ if (Number.isNaN(n)) return "";
164
+ Ve(l.precision) || (n = n.toFixed(l.precision));
165
+ }
166
+ return n;
167
+ }), L = (n, u) => {
168
+ if (Ve(u) && (u = E.value), u === 0) return Math.round(n);
169
+ let m = String(n);
170
+ const g = m.indexOf(".");
171
+ if (g === -1 || !m.replace(".", "").split("")[g + u]) return n;
172
+ const $ = m.length;
173
+ return m.charAt($ - 1) === "5" && (m = `${m.slice(0, Math.max(0, $ - 1))}6`), Number.parseFloat(Number(m).toFixed(u));
174
+ }, U = (n) => {
175
+ if (ge(n)) return 0;
176
+ const u = n.toString(), m = u.indexOf(".");
177
+ let g = 0;
178
+ return m !== -1 && (g = u.length - m - 1), g;
179
+ }, R = (n, u = 1) => M(n) ? n >= Number.MAX_SAFE_INTEGER && u === 1 ? (me("InputNumber", "The value has reached the maximum safe integer limit."), n) : n <= Number.MIN_SAFE_INTEGER && u === -1 ? (me("InputNumber", "The value has reached the minimum safe integer limit."), n) : L(n + l.step * u) : d.currentValue, Q = (n) => {
180
+ const u = qe(n), m = et(n);
181
+ if (l.disabledScientific && ["e", "E"].includes(m)) {
182
+ n.preventDefault();
183
+ return;
184
+ }
185
+ switch (u) {
186
+ case _.up:
187
+ n.preventDefault(), B();
188
+ break;
189
+ case _.down:
190
+ n.preventDefault(), z();
191
+ break;
192
+ }
193
+ }, B = () => {
194
+ l.readonly || k.value || I.value || (N(R(Number(F.value) || 0)), o(ue, d.currentValue), G());
195
+ }, z = () => {
196
+ l.readonly || k.value || S.value || (N(R(Number(F.value) || 0, -1)), o(ue, d.currentValue), G());
197
+ }, j = (n, u) => {
198
+ const { max: m, min: g, step: $, precision: X, stepStrictly: ne, valueOnClear: Y } = l;
199
+ m < g && Ge("InputNumber", "min should not be greater than max.");
200
+ let w = n ? Number.parseFloat(String(n)) : Number(n);
201
+ if (ge(n) || Number.isNaN(w)) return null;
202
+ if (n === "") {
203
+ if (Y === null) return null;
204
+ w = Te(Y) ? {
205
+ min: g,
206
+ max: m
207
+ }[Y] : Y;
208
+ }
209
+ return ne && (w = L(Math.round(L(w / $)) * $, X), w !== n && u && o("update:modelValue", w)), Ve(X) || (w = L(w, X)), (w > m || w < g) && (w = w > m ? m : g, u && o("update:modelValue", w)), w;
210
+ }, N = (n, u = !0) => {
211
+ var $;
212
+ const m = d.currentValue, g = j(n);
213
+ if (!u) {
214
+ o(te, g);
215
+ return;
216
+ }
217
+ d.userInput = null, !(m === g && n) && (o(te, g), m !== g && o(xe, g, m), l.validateEvent && (($ = r == null ? void 0 : r.validate) == null || $.call(r, "change").catch(we)), d.currentValue = g);
218
+ }, T = (n) => {
219
+ d.userInput = n;
220
+ let u = n === "" ? null : Number.parseFloat(n);
221
+ Number.isNaN(u) && (u = null), o(ue, u), N(u, !1);
222
+ }, ae = (n) => {
223
+ const u = n !== "" ? Number.parseFloat(n) : "";
224
+ (M(u) && !Number.isNaN(u) || l.formatter && Number.isNaN(u) || u === "") && N(u), G(), d.userInput = null;
225
+ }, b = () => {
226
+ var n, u;
227
+ (u = (n = p.value) == null ? void 0 : n.focus) == null || u.call(n);
228
+ }, V = () => {
229
+ var n, u;
230
+ (u = (n = p.value) == null ? void 0 : n.blur) == null || u.call(n);
231
+ }, P = (n) => {
232
+ o("focus", n);
233
+ }, le = (n) => {
234
+ var u, m, g;
235
+ d.userInput = null, d.currentValue === null && ((u = p.value) != null && u.input) && (p.value.input.value = ((m = l.formatter) == null ? void 0 : m.call(l, "")) ?? ""), o("blur", n), l.validateEvent && ((g = r == null ? void 0 : r.validate) == null || g.call(r, "blur").catch(we));
236
+ }, G = () => {
237
+ d.currentValue !== l.modelValue && (d.currentValue = l.modelValue);
238
+ }, D = (n) => {
239
+ document.activeElement === n.target && n.preventDefault();
240
+ };
241
+ return ve(() => l.modelValue, (n, u) => {
242
+ const m = j(n, !0);
243
+ d.userInput === null && m !== u && (d.currentValue = m);
244
+ }, { immediate: !0 }), ve(() => l.precision, () => {
245
+ d.currentValue = j(l.modelValue);
246
+ }), Qe(() => {
247
+ var $;
248
+ const { min: n, max: u, modelValue: m } = l, g = ($ = p.value) == null ? void 0 : $.input;
249
+ if (g.setAttribute("role", "spinbutton"), Number.isFinite(u) ? g.setAttribute("aria-valuemax", String(u)) : g.removeAttribute("aria-valuemax"), Number.isFinite(n) ? g.setAttribute("aria-valuemin", String(n)) : g.removeAttribute("aria-valuemin"), g.setAttribute("aria-valuenow", d.currentValue || d.currentValue === 0 ? String(d.currentValue) : ""), g.setAttribute("aria-disabled", String(k.value)), !M(m) && m != null) {
250
+ let X = Number(m);
251
+ Number.isNaN(X) && (X = null), o(te, X);
252
+ }
253
+ g.addEventListener("wheel", D, { passive: !1 });
254
+ }), st(() => {
255
+ var n, u;
256
+ (u = (n = p.value) == null ? void 0 : n.input) == null || u.setAttribute("aria-valuenow", `${d.currentValue ?? ""}`);
257
+ }), a({
258
+ /** @description get focus the input component */
259
+ focus: b,
260
+ /** @description remove focus the input component */
261
+ blur: V
262
+ }), (n, u) => (C(), q("div", {
263
+ class: H([
264
+ t(s).b(),
265
+ t(s).m(t(J)),
266
+ t(s).is("disabled", t(k)),
267
+ t(s).is("without-controls", !e.controls),
268
+ t(s).is("controls-right", W.value),
269
+ t(s).is(e.align, !!e.align)
270
+ ]),
271
+ onDragstart: u[0] || (u[0] = Ze(() => {
272
+ }, ["prevent"]))
273
+ }, [
274
+ e.controls ? Re((C(), q("span", {
275
+ key: 0,
276
+ role: "button",
277
+ "aria-label": t(i)("el.inputNumber.decrease"),
278
+ class: H([t(s).e("decrease"), t(s).is("disabled", S.value)]),
279
+ onKeydown: Ke(z, ["enter"])
280
+ }, [pe(n.$slots, "decrease-icon", {}, () => [ye(t(Ae), null, {
281
+ default: oe(() => [W.value ? (C(), re(t(nt), { key: 0 })) : (C(), re(t(rt), { key: 1 }))]),
282
+ _: 1
283
+ })])], 42, yt)), [[t($e), z]]) : de("v-if", !0),
284
+ e.controls ? Re((C(), q("span", {
285
+ key: 1,
286
+ role: "button",
287
+ "aria-label": t(i)("el.inputNumber.increase"),
288
+ class: H([t(s).e("increase"), t(s).is("disabled", I.value)]),
289
+ onKeydown: Ke(B, ["enter"])
290
+ }, [pe(n.$slots, "increase-icon", {}, () => [ye(t(Ae), null, {
291
+ default: oe(() => [W.value ? (C(), re(t(ut), { key: 0 })) : (C(), re(t(it), { key: 1 }))]),
292
+ _: 1
293
+ })])], 42, Vt)), [[t($e), B]]) : de("v-if", !0),
294
+ ye(t(De), {
295
+ id: e.id,
296
+ ref_key: "input",
297
+ ref: p,
298
+ type: e.formatter ? "text" : "number",
299
+ step: e.step,
300
+ "model-value": F.value,
301
+ placeholder: e.placeholder,
302
+ readonly: e.readonly,
303
+ disabled: t(k),
304
+ size: t(J),
305
+ max: e.max,
306
+ min: e.min,
307
+ name: e.name,
308
+ "aria-label": e.ariaLabel,
309
+ "validate-event": !1,
310
+ inputmode: e.inputmode,
311
+ formatter: e.formatter,
312
+ parser: e.parser,
313
+ tabindex: e.tabindex,
314
+ onKeydown: Q,
315
+ onBlur: le,
316
+ onFocus: P,
317
+ onInput: T,
318
+ onChange: ae
319
+ }, ot({ _: 2 }, [n.$slots.prefix ? {
320
+ name: "prefix",
321
+ fn: oe(() => [pe(n.$slots, "prefix")]),
322
+ key: "0"
323
+ } : void 0, n.$slots.suffix ? {
324
+ name: "suffix",
325
+ fn: oe(() => [pe(n.$slots, "suffix")]),
326
+ key: "1"
327
+ } : void 0]), 1032, [
328
+ "id",
329
+ "type",
330
+ "step",
331
+ "model-value",
332
+ "placeholder",
333
+ "readonly",
334
+ "disabled",
335
+ "size",
336
+ "max",
337
+ "min",
338
+ "name",
339
+ "aria-label",
340
+ "inputmode",
341
+ "formatter",
342
+ "parser",
343
+ "tabindex"
344
+ ])
345
+ ], 34));
346
+ }
347
+ }), St = pt;
348
+ const wt = He(St), _e = Symbol("sliderContextKey"), Nt = Ee({
349
+ /**
350
+ * @description binding value
351
+ */
352
+ modelValue: {
353
+ type: ee([Number, Array]),
354
+ default: 0
355
+ },
356
+ id: {
357
+ type: String,
358
+ default: void 0
359
+ },
360
+ /**
361
+ * @description minimum value
362
+ */
363
+ min: {
364
+ type: Number,
365
+ default: 0
366
+ },
367
+ /**
368
+ * @description maximum value
369
+ */
370
+ max: {
371
+ type: Number,
372
+ default: 100
373
+ },
374
+ /**
375
+ * @description step size, can be a number or `'mark'` to restrict values to marks. When set to `'mark'`, the `marks` attribute must be set
376
+ */
377
+ step: {
378
+ type: ee([Number, String]),
379
+ default: 1
380
+ },
381
+ /**
382
+ * @description whether to display an input box, works when `range` is false and `step` is not `'mark'`
383
+ */
384
+ showInput: Boolean,
385
+ /**
386
+ * @description whether to display control buttons when `show-input` is true
387
+ */
388
+ showInputControls: {
389
+ type: Boolean,
390
+ default: !0
391
+ },
392
+ /**
393
+ * @description size of the slider wrapper, will not work in vertical mode
394
+ */
395
+ size: Le,
396
+ /**
397
+ * @description size of the input box, when set `size`, the default is the value of `size`
398
+ */
399
+ inputSize: Le,
400
+ /**
401
+ * @description whether to display breakpoints
402
+ */
403
+ showStops: Boolean,
404
+ /**
405
+ * @description whether to display tooltip value
406
+ */
407
+ showTooltip: {
408
+ type: Boolean,
409
+ default: !0
410
+ },
411
+ /**
412
+ * @description format to display tooltip value
413
+ */
414
+ formatTooltip: {
415
+ type: ee(Function),
416
+ default: void 0
417
+ },
418
+ /**
419
+ * @description whether Slider is disabled
420
+ */
421
+ disabled: {
422
+ type: Boolean,
423
+ default: void 0
424
+ },
425
+ /**
426
+ * @description whether to select a range
427
+ */
428
+ range: Boolean,
429
+ /**
430
+ * @description vertical mode
431
+ */
432
+ vertical: Boolean,
433
+ /**
434
+ * @description slider height, required in vertical mode
435
+ */
436
+ height: String,
437
+ /**
438
+ * @description when `range` is true, screen reader label for the start of the range
439
+ */
440
+ rangeStartLabel: {
441
+ type: String,
442
+ default: void 0
443
+ },
444
+ /**
445
+ * @description when `range` is true, screen reader label for the end of the range
446
+ */
447
+ rangeEndLabel: {
448
+ type: String,
449
+ default: void 0
450
+ },
451
+ /**
452
+ * @description format to display the `aria-valuenow` attribute for screen readers
453
+ */
454
+ formatValueText: {
455
+ type: ee(Function),
456
+ default: void 0
457
+ },
458
+ /**
459
+ * @description custom class name for the tooltip
460
+ */
461
+ tooltipClass: {
462
+ type: String,
463
+ default: void 0
464
+ },
465
+ /**
466
+ * @description position of Tooltip
467
+ */
468
+ placement: {
469
+ type: String,
470
+ values: Je,
471
+ default: "top"
472
+ },
473
+ /**
474
+ * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style
475
+ */
476
+ marks: { type: ee(Object) },
477
+ /**
478
+ * @description whether to trigger form validation
479
+ */
480
+ validateEvent: {
481
+ type: Boolean,
482
+ default: !0
483
+ },
484
+ /**
485
+ * @description when slider tooltip inactive and `persistent` is `false` , popconfirm will be destroyed. `persistent` always be `false` when `show-tooltip ` is `false`
486
+ */
487
+ persistent: {
488
+ type: Boolean,
489
+ default: !0
490
+ },
491
+ ...Ye(["ariaLabel"])
492
+ }), Ce = (e) => M(e) || he(e) && e.every(M), kt = {
493
+ [te]: Ce,
494
+ [ue]: Ce,
495
+ [xe]: Ce
496
+ }, xt = (e, a, f) => {
497
+ const l = ie();
498
+ return Qe(async () => {
499
+ e.range ? (he(e.modelValue) ? (a.firstValue = Math.max(e.min, e.modelValue[0]), a.secondValue = Math.min(e.max, e.modelValue[1])) : (a.firstValue = e.min, a.secondValue = e.max), a.oldValue = [a.firstValue, a.secondValue]) : (!M(e.modelValue) || Number.isNaN(e.modelValue) ? a.firstValue = e.min : a.firstValue = Math.min(e.max, Math.max(e.min, e.modelValue)), a.oldValue = a.firstValue), Ne(window, "resize", f), await ke(), f();
500
+ }), { sliderWrapper: l };
501
+ }, Et = (e) => {
502
+ const a = y(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((f, l) => f - l).filter((f) => f <= e.max && f >= e.min).map((f) => ({
503
+ point: f,
504
+ position: (f - e.min) * 100 / (e.max - e.min),
505
+ mark: e.marks[f]
506
+ })) : []);
507
+ return dt(() => {
508
+ if (e.step === "mark" && !e.marks && me("ElSlider", "marks prop must be provided when step is mark"), e.marks) {
509
+ const f = Object.keys(e.marks), l = a.value.map((i) => i.point), o = f.filter((i) => {
510
+ const s = Number.parseFloat(i);
511
+ return Number.isNaN(s) || !l.includes(s);
512
+ });
513
+ o.length > 0 && me("ElSlider", `Some marks keys are invalid (not a number or out of [min, max]): [${o.map((i) => `'${i}'`).join(", ")}] and will be ignored.`);
514
+ }
515
+ }), a;
516
+ }, Bt = (e, a, f) => {
517
+ const { formItem: l } = Ue(), o = ct(), i = ie(), s = ie(), p = {
518
+ firstButton: i,
519
+ secondButton: s
520
+ }, d = je(), r = y(() => Math.min(a.firstValue, a.secondValue)), S = y(() => Math.max(a.firstValue, a.secondValue)), I = y(() => e.range ? `${100 * (S.value - r.value) / (e.max - e.min)}%` : `${100 * (a.firstValue - e.min) / (e.max - e.min)}%`), E = y(() => e.range ? `${100 * (r.value - e.min) / (e.max - e.min)}%` : "0%"), W = y(() => e.vertical ? { height: e.height } : {}), J = y(() => e.vertical ? {
521
+ height: I.value,
522
+ bottom: E.value
523
+ } : {
524
+ width: I.value,
525
+ left: E.value
526
+ }), k = () => {
527
+ o.value && (a.sliderSize = o.value.getBoundingClientRect()[e.vertical ? "height" : "width"]);
528
+ }, F = (b) => {
529
+ const V = e.min + b * (e.max - e.min) / 100;
530
+ if (!e.range) return i;
531
+ let P;
532
+ return Math.abs(r.value - V) < Math.abs(S.value - V) ? P = a.firstValue < a.secondValue ? "firstButton" : "secondButton" : P = a.firstValue > a.secondValue ? "firstButton" : "secondButton", p[P];
533
+ }, L = (b) => {
534
+ const V = F(b);
535
+ return V.value.setPosition(b), V;
536
+ }, U = (b) => {
537
+ a.firstValue = b ?? e.min, Q(e.range ? [r.value, S.value] : b ?? e.min);
538
+ }, R = (b) => {
539
+ a.secondValue = b, e.range && Q([r.value, S.value]);
540
+ }, Q = (b) => {
541
+ f(te, b), f(ue, b);
542
+ }, B = async () => {
543
+ await ke(), f(xe, e.range ? [r.value, S.value] : e.modelValue);
544
+ }, z = (b) => {
545
+ var P, le, G, D;
546
+ if (d.value || a.dragging) return;
547
+ k();
548
+ let V = 0;
549
+ if (e.vertical) {
550
+ const n = ((le = (P = b.touches) == null ? void 0 : P.item(0)) == null ? void 0 : le.clientY) ?? b.clientY;
551
+ V = (o.value.getBoundingClientRect().bottom - n) / a.sliderSize * 100;
552
+ } else V = ((((D = (G = b.touches) == null ? void 0 : G.item(0)) == null ? void 0 : D.clientX) ?? b.clientX) - o.value.getBoundingClientRect().left) / a.sliderSize * 100;
553
+ if (!(V < 0 || V > 100))
554
+ return L(V);
555
+ };
556
+ return {
557
+ elFormItem: l,
558
+ slider: o,
559
+ firstButton: i,
560
+ secondButton: s,
561
+ sliderDisabled: d,
562
+ minValue: r,
563
+ maxValue: S,
564
+ runwayStyle: W,
565
+ barStyle: J,
566
+ resetSize: k,
567
+ setPosition: L,
568
+ emitChange: B,
569
+ onSliderWrapperPrevent: (b) => {
570
+ var V, P;
571
+ ((V = p.firstButton.value) != null && V.dragging || (P = p.secondButton.value) != null && P.dragging) && b.preventDefault();
572
+ },
573
+ onSliderClick: (b) => {
574
+ z(b) && B();
575
+ },
576
+ onSliderDown: async (b) => {
577
+ const V = z(b);
578
+ V && (await ke(), V.value.onButtonDown(b));
579
+ },
580
+ onSliderMarkerDown: (b) => {
581
+ d.value || a.dragging || L(b) && B();
582
+ },
583
+ setFirstValue: U,
584
+ setSecondValue: R
585
+ };
586
+ }, Mt = (e, a, f, l) => ({
587
+ stops: y(() => {
588
+ if (!e.showStops || e.min > e.max) return [];
589
+ if (e.step === "mark" || e.step === 0)
590
+ return e.step === 0 && me("ElSlider", "step should not be 0."), [];
591
+ const s = Math.ceil((e.max - e.min) / e.step), p = 100 * e.step / (e.max - e.min), d = Array.from({ length: s - 1 }).map((r, S) => (S + 1) * p);
592
+ return e.range ? d.filter((r) => r < 100 * (f.value - e.min) / (e.max - e.min) || r > 100 * (l.value - e.min) / (e.max - e.min)) : d.filter((r) => r > 100 * (a.firstValue - e.min) / (e.max - e.min));
593
+ }),
594
+ getStopStyle: (s) => e.vertical ? { bottom: `${s}%` } : { left: `${s}%` }
595
+ }), Pt = (e, a, f, l, o, i) => {
596
+ const s = (r) => {
597
+ o(te, r), o(ue, r);
598
+ }, p = () => e.range ? ![f.value, l.value].every((r, S) => r === a.oldValue[S]) : e.modelValue !== a.oldValue, d = () => {
599
+ var S, I;
600
+ e.min > e.max && Ge("Slider", "min should not be greater than max.");
601
+ const r = e.modelValue;
602
+ e.range && he(r) ? r[1] < e.min ? s([e.min, e.min]) : r[0] > e.max ? s([e.max, e.max]) : r[0] < e.min ? s([e.min, r[1]]) : r[1] > e.max ? s([r[0], e.max]) : (a.firstValue = r[0], a.secondValue = r[1], p() && (e.validateEvent && ((S = i == null ? void 0 : i.validate) == null || S.call(i, "change").catch(we)), a.oldValue = r.slice())) : !e.range && M(r) && !Number.isNaN(r) && (r < e.min ? s(e.min) : r > e.max ? s(e.max) : (a.firstValue = r, p() && (e.validateEvent && ((I = i == null ? void 0 : i.validate) == null || I.call(i, "change").catch(we)), a.oldValue = r)));
603
+ };
604
+ d(), ve(() => a.dragging, (r) => {
605
+ r || d();
606
+ }), ve(() => e.modelValue, (r, S) => {
607
+ a.dragging || he(r) && he(S) && r.every((I, E) => I === S[E]) && a.firstValue === r[0] && a.secondValue === r[1] || d();
608
+ }, { deep: !0 }), ve(() => [e.min, e.max], () => {
609
+ d();
610
+ });
611
+ }, Ct = (e, a, f) => {
612
+ const l = ie(), o = ie(!1), i = y(() => a.value instanceof Function);
613
+ return {
614
+ tooltip: l,
615
+ tooltipVisible: o,
616
+ formatValue: y(() => i.value && a.value(e.modelValue) || e.modelValue),
617
+ displayTooltip: Fe(() => {
618
+ f.value && (o.value = !0);
619
+ }, 50),
620
+ hideTooltip: Fe(() => {
621
+ f.value && (o.value = !1);
622
+ }, 50)
623
+ };
624
+ }, Lt = (e, a, f) => {
625
+ const { disabled: l, min: o, max: i, step: s, showTooltip: p, persistent: d, precision: r, sliderSize: S, formatTooltip: I, emitChange: E, resetSize: W, updateDragging: J, markList: k } = mt(_e), { tooltip: F, tooltipVisible: L, formatValue: U, displayTooltip: R, hideTooltip: Q } = Ct(e, I, p), B = ie(), z = y(() => `${(e.modelValue - o.value) / (i.value - o.value) * 100}%`), j = y(() => e.vertical ? { bottom: z.value } : { left: z.value }), N = y(() => s.value === "mark" && k.value.length > 0), T = () => {
626
+ a.hovering = !0, R();
627
+ }, ae = () => {
628
+ a.hovering = !1, a.dragging || Q();
629
+ }, b = (c) => {
630
+ l.value || (c.preventDefault(), X(c), window.addEventListener("mousemove", ne), window.addEventListener("touchmove", ne), window.addEventListener("mouseup", Y), window.addEventListener("touchend", Y), window.addEventListener("contextmenu", Y), B.value.focus());
631
+ }, V = (c) => {
632
+ l.value || (a.newPosition = Number.parseFloat(z.value) + c / (i.value - o.value) * 100, w(a.newPosition), E());
633
+ }, P = (c) => {
634
+ if (l.value || !k.value.length) return;
635
+ const h = e.modelValue, x = Number.EPSILON, O = Math.abs(c);
636
+ let v;
637
+ if (c > 0) {
638
+ const K = k.value.findIndex((A) => A.point > h + x);
639
+ if (K !== -1) {
640
+ const A = Math.min(K + O - 1, k.value.length - 1);
641
+ v = k.value[A].point;
642
+ }
643
+ } else {
644
+ let K = -1;
645
+ for (let A = k.value.length - 1; A >= 0; A--) if (k.value[A].point < h - x) {
646
+ K = A;
647
+ break;
648
+ }
649
+ if (K !== -1) {
650
+ const A = Math.max(K - (O - 1), 0);
651
+ v = k.value[A].point;
652
+ }
653
+ }
654
+ v !== void 0 && v !== h && (w((v - o.value) / (i.value - o.value) * 100), E());
655
+ }, le = () => {
656
+ N.value ? P(-1) : M(s.value) && V(-s.value);
657
+ }, G = () => {
658
+ N.value ? P(1) : M(s.value) && V(s.value);
659
+ }, D = () => {
660
+ N.value ? P(-4) : M(s.value) && V(-s.value * 4);
661
+ }, n = () => {
662
+ N.value ? P(4) : M(s.value) && V(s.value * 4);
663
+ }, u = () => {
664
+ l.value || (w(0), E());
665
+ }, m = () => {
666
+ l.value || (w(100), E());
667
+ }, g = (c) => {
668
+ const h = qe(c);
669
+ let x = !0;
670
+ switch (h) {
671
+ case _.left:
672
+ case _.down:
673
+ le();
674
+ break;
675
+ case _.right:
676
+ case _.up:
677
+ G();
678
+ break;
679
+ case _.home:
680
+ u();
681
+ break;
682
+ case _.end:
683
+ m();
684
+ break;
685
+ case _.pageDown:
686
+ D();
687
+ break;
688
+ case _.pageUp:
689
+ n();
690
+ break;
691
+ default:
692
+ x = !1;
693
+ break;
694
+ }
695
+ x && c.preventDefault();
696
+ }, $ = (c) => {
697
+ let h, x;
698
+ return c.type.startsWith("touch") ? (x = c.touches[0].clientY, h = c.touches[0].clientX) : (x = c.clientY, h = c.clientX), {
699
+ clientX: h,
700
+ clientY: x
701
+ };
702
+ }, X = (c) => {
703
+ a.dragging = !0, a.isClick = !0;
704
+ const { clientX: h, clientY: x } = $(c);
705
+ e.vertical ? a.startY = x : a.startX = h, a.startPosition = Number.parseFloat(z.value), a.newPosition = a.startPosition;
706
+ }, ne = (c) => {
707
+ if (a.dragging) {
708
+ a.isClick = !1, R(), W();
709
+ let h;
710
+ const { clientX: x, clientY: O } = $(c);
711
+ e.vertical ? (a.currentY = O, h = (a.startY - a.currentY) / S.value * 100) : (a.currentX = x, h = (a.currentX - a.startX) / S.value * 100), a.newPosition = a.startPosition + h, w(a.newPosition);
712
+ }
713
+ }, Y = () => {
714
+ a.dragging && (setTimeout(() => {
715
+ a.dragging = !1, a.hovering || Q(), a.isClick || w(a.newPosition), E();
716
+ }, 0), window.removeEventListener("mousemove", ne), window.removeEventListener("touchmove", ne), window.removeEventListener("mouseup", Y), window.removeEventListener("touchend", Y), window.removeEventListener("contextmenu", Y));
717
+ }, w = async (c) => {
718
+ if (c === null || Number.isNaN(+c)) return;
719
+ c = tt(c, 0, 100);
720
+ let h;
721
+ if (s.value === "mark") k.value.length === 0 ? h = c <= 50 ? o.value : i.value : h = k.value.reduce((x, O) => Math.abs(O.position - c) < Math.abs(x.position - c) ? O : x).point;
722
+ else {
723
+ const x = Math.floor((i.value - o.value) / s.value), O = x * s.value / (i.value - o.value) * 100, v = O + (100 - O) / 2;
724
+ if (c < O) {
725
+ const K = O / x, A = Math.round(c / K);
726
+ h = o.value + A * s.value;
727
+ } else c < v ? h = o.value + x * s.value : h = i.value;
728
+ h = Number.parseFloat(h.toFixed(r.value));
729
+ }
730
+ h !== e.modelValue && f(te, h), !a.dragging && e.modelValue !== a.oldValue && (a.oldValue = e.modelValue), await ke(), a.dragging && R(), F.value.updatePopper();
731
+ };
732
+ return ve(() => a.dragging, (c) => {
733
+ J(c);
734
+ }), Ne(B, "touchstart", b, { passive: !1 }), {
735
+ disabled: l,
736
+ button: B,
737
+ tooltip: F,
738
+ tooltipVisible: L,
739
+ showTooltip: p,
740
+ persistent: d,
741
+ wrapperStyle: j,
742
+ formatValue: U,
743
+ handleMouseEnter: T,
744
+ handleMouseLeave: ae,
745
+ onButtonDown: b,
746
+ onKeyDown: g,
747
+ setPosition: w
748
+ };
749
+ }, Tt = Ee({
750
+ modelValue: {
751
+ type: Number,
752
+ default: 0
753
+ },
754
+ vertical: Boolean,
755
+ tooltipClass: String,
756
+ placement: {
757
+ type: String,
758
+ values: Je,
759
+ default: "top"
760
+ }
761
+ }), It = { [te]: (e) => M(e) }, zt = ["tabindex"];
762
+ var At = /* @__PURE__ */ Me({
763
+ name: "ElSliderButton",
764
+ __name: "button",
765
+ props: Tt,
766
+ emits: It,
767
+ setup(e, { expose: a, emit: f }) {
768
+ const l = e, o = f, i = Be("slider"), s = ze({
769
+ hovering: !1,
770
+ dragging: !1,
771
+ isClick: !1,
772
+ startX: 0,
773
+ currentX: 0,
774
+ startY: 0,
775
+ currentY: 0,
776
+ startPosition: 0,
777
+ newPosition: 0,
778
+ oldValue: l.modelValue
779
+ }), p = y(() => I.value ? E.value : !1), { disabled: d, button: r, tooltip: S, showTooltip: I, persistent: E, tooltipVisible: W, wrapperStyle: J, formatValue: k, handleMouseEnter: F, handleMouseLeave: L, onButtonDown: U, onKeyDown: R, setPosition: Q } = Lt(l, s, o), { hovering: B, dragging: z } = Ie(s);
780
+ return a({
781
+ onButtonDown: U,
782
+ onKeyDown: R,
783
+ setPosition: Q,
784
+ hovering: B,
785
+ dragging: z
786
+ }), (j, N) => (C(), q("div", {
787
+ ref_key: "button",
788
+ ref: r,
789
+ class: H([t(i).e("button-wrapper"), {
790
+ hover: t(B),
791
+ dragging: t(z)
792
+ }]),
793
+ style: se(t(J)),
794
+ tabindex: t(d) ? void 0 : 0,
795
+ onMouseenter: N[0] || (N[0] = (...T) => t(F) && t(F)(...T)),
796
+ onMouseleave: N[1] || (N[1] = (...T) => t(L) && t(L)(...T)),
797
+ onMousedown: N[2] || (N[2] = (...T) => t(U) && t(U)(...T)),
798
+ onFocus: N[3] || (N[3] = (...T) => t(F) && t(F)(...T)),
799
+ onBlur: N[4] || (N[4] = (...T) => t(L) && t(L)(...T)),
800
+ onKeydown: N[5] || (N[5] = (...T) => t(R) && t(R)(...T))
801
+ }, [ye(t(at), {
802
+ ref_key: "tooltip",
803
+ ref: S,
804
+ visible: t(W),
805
+ placement: j.placement,
806
+ "fallback-placements": [
807
+ "top",
808
+ "bottom",
809
+ "right",
810
+ "left"
811
+ ],
812
+ "stop-popper-mouse-event": !1,
813
+ "popper-class": j.tooltipClass,
814
+ disabled: !t(I),
815
+ persistent: p.value
816
+ }, {
817
+ content: oe(() => [ce("span", null, vt(t(k)), 1)]),
818
+ default: oe(() => [ce("div", { class: H([t(i).e("button"), {
819
+ hover: t(B),
820
+ dragging: t(z)
821
+ }]) }, null, 2)]),
822
+ _: 1
823
+ }, 8, [
824
+ "visible",
825
+ "placement",
826
+ "popper-class",
827
+ "disabled",
828
+ "persistent"
829
+ ])], 46, zt));
830
+ }
831
+ }), Xe = At;
832
+ const $t = Ee({ mark: {
833
+ type: ee([String, Object]),
834
+ default: void 0
835
+ } });
836
+ var Ft = Me({
837
+ name: "ElSliderMarker",
838
+ props: $t,
839
+ setup(e) {
840
+ const a = Be("slider"), f = y(() => Te(e.mark) ? e.mark : e.mark.label), l = y(() => Te(e.mark) ? void 0 : e.mark.style);
841
+ return () => ft("div", {
842
+ class: a.e("marks-text"),
843
+ style: l.value
844
+ }, f.value);
845
+ }
846
+ });
847
+ const Rt = [
848
+ "id",
849
+ "role",
850
+ "aria-label",
851
+ "aria-labelledby"
852
+ ], Kt = { key: 1 };
853
+ var Xt = /* @__PURE__ */ Me({
854
+ name: "ElSlider",
855
+ __name: "slider",
856
+ props: Nt,
857
+ emits: kt,
858
+ setup(e, { expose: a, emit: f }) {
859
+ const l = e, o = f, i = Be("slider"), { t: s } = Oe(), p = ze({
860
+ firstValue: 0,
861
+ secondValue: 0,
862
+ oldValue: 0,
863
+ dragging: !1,
864
+ sliderSize: 1
865
+ }), { elFormItem: d, slider: r, firstButton: S, secondButton: I, sliderDisabled: E, minValue: W, maxValue: J, runwayStyle: k, barStyle: F, resetSize: L, emitChange: U, onSliderWrapperPrevent: R, onSliderClick: Q, onSliderDown: B, onSliderMarkerDown: z, setFirstValue: j, setSecondValue: N } = Bt(l, p, o), { stops: T, getStopStyle: ae } = Mt(l, p, W, J), { inputId: b, isLabeledByFormItem: V } = lt(l, { formItemContext: d }), P = We(), le = y(() => l.inputSize || P.value), G = y(() => l.showInput && !l.range && l.step !== "mark"), D = y(() => l.ariaLabel || s("el.slider.defaultLabel", {
866
+ min: l.min,
867
+ max: l.max
868
+ })), n = y(() => l.range ? l.rangeStartLabel || s("el.slider.defaultRangeStartLabel") : D.value), u = y(() => l.formatValueText ? l.formatValueText(c.value) : `${c.value}`), m = y(() => l.rangeEndLabel || s("el.slider.defaultRangeEndLabel")), g = y(() => l.formatValueText ? l.formatValueText(h.value) : `${h.value}`), $ = y(() => [
869
+ i.b(),
870
+ i.m(P.value),
871
+ i.is("vertical", l.vertical),
872
+ { [i.m("with-input")]: G.value }
873
+ ]), X = Et(l);
874
+ Pt(l, p, W, J, o, d);
875
+ const ne = y(() => M(l.step) ? l.step : 1), Y = y(() => {
876
+ const v = M(l.step) ? l.step : 1, K = [
877
+ l.min,
878
+ l.max,
879
+ v
880
+ ].map((A) => {
881
+ const fe = `${A}`.split(".")[1];
882
+ return fe ? fe.length : 0;
883
+ });
884
+ return Math.max.apply(null, K);
885
+ }), { sliderWrapper: w } = xt(l, p, L), { firstValue: c, secondValue: h, sliderSize: x } = Ie(p), O = (v) => {
886
+ p.dragging = v;
887
+ };
888
+ return Ne(w, "touchstart", R, { passive: !1 }), Ne(w, "touchmove", R, { passive: !1 }), bt(_e, {
889
+ ...Ie(l),
890
+ sliderSize: x,
891
+ disabled: E,
892
+ precision: Y,
893
+ markList: X,
894
+ emitChange: U,
895
+ resetSize: L,
896
+ updateDragging: O
897
+ }), a({ onSliderClick: Q }), (v, K) => {
898
+ var A, fe;
899
+ return C(), q("div", {
900
+ id: v.range ? t(b) : void 0,
901
+ ref_key: "sliderWrapper",
902
+ ref: w,
903
+ class: H($.value),
904
+ role: v.range ? "group" : void 0,
905
+ "aria-label": v.range && !t(V) ? D.value : void 0,
906
+ "aria-labelledby": v.range && t(V) ? (A = t(d)) == null ? void 0 : A.labelId : void 0
907
+ }, [ce("div", {
908
+ ref_key: "slider",
909
+ ref: r,
910
+ class: H([
911
+ t(i).e("runway"),
912
+ { "show-input": G.value },
913
+ t(i).is("disabled", t(E))
914
+ ]),
915
+ style: se(t(k)),
916
+ onMousedown: K[0] || (K[0] = (...Z) => t(B) && t(B)(...Z)),
917
+ onTouchstartPassive: K[1] || (K[1] = (...Z) => t(B) && t(B)(...Z))
918
+ }, [
919
+ ce("div", {
920
+ class: H(t(i).e("bar")),
921
+ style: se(t(F))
922
+ }, null, 6),
923
+ ye(Xe, {
924
+ id: v.range ? void 0 : t(b),
925
+ ref_key: "firstButton",
926
+ ref: S,
927
+ "model-value": t(c),
928
+ vertical: v.vertical,
929
+ "tooltip-class": v.tooltipClass,
930
+ placement: v.placement,
931
+ role: "slider",
932
+ "aria-label": v.range || !t(V) ? n.value : void 0,
933
+ "aria-labelledby": !v.range && t(V) ? (fe = t(d)) == null ? void 0 : fe.labelId : void 0,
934
+ "aria-valuemin": v.min,
935
+ "aria-valuemax": v.range ? t(h) : v.max,
936
+ "aria-valuenow": t(c),
937
+ "aria-valuetext": u.value,
938
+ "aria-orientation": v.vertical ? "vertical" : "horizontal",
939
+ "aria-disabled": t(E),
940
+ "onUpdate:modelValue": t(j)
941
+ }, null, 8, [
942
+ "id",
943
+ "model-value",
944
+ "vertical",
945
+ "tooltip-class",
946
+ "placement",
947
+ "aria-label",
948
+ "aria-labelledby",
949
+ "aria-valuemin",
950
+ "aria-valuemax",
951
+ "aria-valuenow",
952
+ "aria-valuetext",
953
+ "aria-orientation",
954
+ "aria-disabled",
955
+ "onUpdate:modelValue"
956
+ ]),
957
+ v.range ? (C(), re(Xe, {
958
+ key: 0,
959
+ ref_key: "secondButton",
960
+ ref: I,
961
+ "model-value": t(h),
962
+ vertical: v.vertical,
963
+ "tooltip-class": v.tooltipClass,
964
+ placement: v.placement,
965
+ role: "slider",
966
+ "aria-label": m.value,
967
+ "aria-valuemin": t(c),
968
+ "aria-valuemax": v.max,
969
+ "aria-valuenow": t(h),
970
+ "aria-valuetext": g.value,
971
+ "aria-orientation": v.vertical ? "vertical" : "horizontal",
972
+ "aria-disabled": t(E),
973
+ "onUpdate:modelValue": t(N)
974
+ }, null, 8, [
975
+ "model-value",
976
+ "vertical",
977
+ "tooltip-class",
978
+ "placement",
979
+ "aria-label",
980
+ "aria-valuemin",
981
+ "aria-valuemax",
982
+ "aria-valuenow",
983
+ "aria-valuetext",
984
+ "aria-orientation",
985
+ "aria-disabled",
986
+ "onUpdate:modelValue"
987
+ ])) : de("v-if", !0),
988
+ v.showStops ? (C(), q("div", Kt, [(C(!0), q(Se, null, Pe(t(T), (Z, be) => (C(), q("div", {
989
+ key: be,
990
+ class: H(t(i).e("stop")),
991
+ style: se(t(ae)(Z))
992
+ }, null, 6))), 128))])) : de("v-if", !0),
993
+ t(X).length > 0 ? (C(), q(Se, { key: 2 }, [ce("div", null, [(C(!0), q(Se, null, Pe(t(X), (Z, be) => (C(), q("div", {
994
+ key: be,
995
+ style: se(t(ae)(Z.position)),
996
+ class: H([t(i).e("stop"), t(i).e("marks-stop")])
997
+ }, null, 6))), 128))]), ce("div", { class: H(t(i).e("marks")) }, [(C(!0), q(Se, null, Pe(t(X), (Z, be) => (C(), re(t(Ft), {
998
+ key: be,
999
+ mark: Z.mark,
1000
+ style: se(t(ae)(Z.position)),
1001
+ onMousedown: Ze((Ot) => t(z)(Z.position), ["stop"])
1002
+ }, null, 8, [
1003
+ "mark",
1004
+ "style",
1005
+ "onMousedown"
1006
+ ]))), 128))], 2)], 64)) : de("v-if", !0)
1007
+ ], 38), G.value ? (C(), re(t(wt), {
1008
+ key: 0,
1009
+ ref: "input",
1010
+ "model-value": t(c),
1011
+ class: H(t(i).e("input")),
1012
+ step: ne.value,
1013
+ disabled: t(E),
1014
+ controls: v.showInputControls,
1015
+ min: v.min,
1016
+ max: v.max,
1017
+ precision: Y.value,
1018
+ size: le.value,
1019
+ "onUpdate:modelValue": t(j),
1020
+ onChange: t(U)
1021
+ }, null, 8, [
1022
+ "model-value",
1023
+ "class",
1024
+ "step",
1025
+ "disabled",
1026
+ "controls",
1027
+ "min",
1028
+ "max",
1029
+ "precision",
1030
+ "size",
1031
+ "onUpdate:modelValue",
1032
+ "onChange"
1033
+ ])) : de("v-if", !0)], 10, Rt);
1034
+ };
1035
+ }
1036
+ }), Yt = Xt;
1037
+ const Gt = He(Yt);
1038
+ export {
1039
+ Gt as E
1040
+ };