@xtctwins/tctwins-bimx-engine 0.3.7 → 0.3.9

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