@hortiview/shared-components 0.0.11528 → 0.0.11587

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 (118) hide show
  1. package/README.md +17 -0
  2. package/dist/{BigLoadingSpinner-D7H28pr5.js → BigLoadingSpinner-iegTbDcD.js} +6 -6
  3. package/dist/GenericCard-6J558OgP.js +350 -0
  4. package/dist/{ListAreaService-YS_UUPh5.js → ListAreaService-DOwtdRa4.js} +18 -16
  5. package/dist/_MapCache-B75yWNNd.js +376 -0
  6. package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
  7. package/dist/_getTag-BCf9b56Z.js +81 -0
  8. package/dist/animationframe-EMBh6XeO.js +54 -0
  9. package/dist/component-DsB0poTj.js +571 -0
  10. package/dist/component-neHBNHRu.js +114 -0
  11. package/dist/components/AlertBanner/AlertBanner.js +16 -15
  12. package/dist/components/BaseView/BaseView.js +5 -5
  13. package/dist/components/BasicHeading/BasicHeading.js +25 -24
  14. package/dist/components/BasicHeading/BasicHeading.test.js +9 -9
  15. package/dist/components/BlockView/BlockView.js +5 -5
  16. package/dist/components/ChipCard/ChipCard.js +1765 -14
  17. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  18. package/dist/components/ContextMenu/ContextMenu.js +28 -27
  19. package/dist/components/DeleteModal/DeleteModal.js +37 -34
  20. package/dist/components/Disclaimer/Disclaimer.js +11 -9
  21. package/dist/components/EmptyView/EmptyView.js +258 -19
  22. package/dist/components/Filter/Filter.js +58 -54
  23. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
  24. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
  25. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5974 -6387
  26. package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +1 -1
  27. package/dist/components/FormComponents/FormNumber/CustomTextField.js +5 -5
  28. package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +1 -1
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
  31. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
  32. package/dist/components/FormComponents/FormSelect/FormSelect.js +3 -3
  33. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
  34. package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
  35. package/dist/components/FormComponents/FormText/FormText.d.ts +1 -1
  36. package/dist/components/FormComponents/FormText/FormText.js +33 -32
  37. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +1 -1
  38. package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
  39. package/dist/components/GenericTable/GenericTable.js +10486 -74
  40. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
  41. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  42. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
  43. package/dist/components/HashTabView/HashTabView.js +1805 -72
  44. package/dist/components/HeaderFilter/HeaderFilter.d.ts +1 -1
  45. package/dist/components/HeaderFilter/HeaderFilter.js +4 -4
  46. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +20 -17
  47. package/dist/components/Iconify/Iconify.d.ts +1 -2
  48. package/dist/components/Iconify/Iconify.js +42 -42
  49. package/dist/components/InfoGroup/InfoGroup.js +30 -28
  50. package/dist/components/ListArea/ListArea.js +29 -27
  51. package/dist/components/ListArea/ListArea.test.js +2 -2
  52. package/dist/components/ListArea/ListAreaService.js +7 -5
  53. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  54. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  55. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -37
  56. package/dist/components/Modal/Modal.d.ts +1 -1
  57. package/dist/components/Modal/Modal.js +926 -9
  58. package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
  59. package/dist/components/ModulePadding/ModulePadding.js +28 -0
  60. package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
  61. package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
  62. package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -6
  63. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  64. package/dist/components/SearchBar/SearchBar.js +7 -6
  65. package/dist/components/Select/Select.d.ts +1 -1
  66. package/dist/components/Select/Select.js +13 -13
  67. package/dist/floating-ui.dom-CeD8zknG.js +978 -0
  68. package/dist/get-7ACccM2X.js +114 -0
  69. package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
  70. package/dist/hooks/useHelperText.js +1 -1
  71. package/dist/identity-DLWZln-X.js +1763 -0
  72. package/dist/index.es-0lQcz8m1.js +444 -0
  73. package/dist/index.es-25EARqhH.js +2027 -0
  74. package/dist/index.es-3043KTnb.js +1066 -0
  75. package/dist/index.es-41ztjcFT.js +724 -0
  76. package/dist/index.es-6TJ1S8Jr.js +954 -0
  77. package/dist/index.es-8GOVkuo-.js +374 -0
  78. package/dist/index.es-B-_jXDuz.js +216 -0
  79. package/dist/index.es-BWgXLqXn.js +102 -0
  80. package/dist/index.es-BtjV0oNv.js +360 -0
  81. package/dist/index.es-BvrQnJ3j.js +509 -0
  82. package/dist/index.es-CF_xy2ns.js +674 -0
  83. package/dist/index.es-CL_Heu1n.js +54 -0
  84. package/dist/index.es-CiqbARoC.js +306 -0
  85. package/dist/index.es-D-CKRzIB.js +63 -0
  86. package/dist/index.es-D6N-XWHe.js +56 -0
  87. package/dist/index.es-DKDgy7Kt.js +45 -0
  88. package/dist/index.es-DntoATwO.js +159 -0
  89. package/dist/index.es-UHKFl8Da.js +7075 -0
  90. package/dist/index.es-d5xhUpJZ.js +3242 -0
  91. package/dist/index.es-da0cf7oE.js +569 -0
  92. package/dist/index.es-h2lMdt7G.js +107 -0
  93. package/dist/index.es-zr101OF5.js +4853 -0
  94. package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
  95. package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
  96. package/dist/isEmpty-B4GG2s-V.js +31 -0
  97. package/dist/isPlainObject-C273y67K.js +40 -0
  98. package/dist/isString-BW9UHONv.js +21 -0
  99. package/dist/keyboard-Bpt0aBqQ.js +107 -0
  100. package/dist/main.d.ts +1 -0
  101. package/dist/main.js +57 -55
  102. package/dist/orderBy-Bd48bw88.js +316 -0
  103. package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
  104. package/dist/services/UtilService.js +2 -2
  105. package/dist/toString-CrgB_7Pe.js +54 -0
  106. package/dist/tslib.es6-BDCynO9F.js +162 -0
  107. package/dist/types/GenericTable.d.ts +1 -1
  108. package/dist/uniqueId-NU3-C36A.js +18 -0
  109. package/dist/util-DA21pZXj.js +78 -0
  110. package/package.json +1 -1
  111. package/dist/GenericCard-jlt8ZsHi.js +0 -80
  112. package/dist/_Map-Dtlps7IZ.js +0 -113
  113. package/dist/_overArg-_0pUmCsX.js +0 -14
  114. package/dist/get-P-5PYZOE.js +0 -426
  115. package/dist/isEmpty-BimaZd5G.js +0 -225
  116. package/dist/isString-BOHPtrlm.js +0 -44
  117. package/dist/orderBy-BVQIswlJ.js +0 -765
  118. package/dist/react-tooltip.min-Czs4RGD1.js +0 -1400
@@ -1,38 +1,1166 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Slider as d } from "@element-public/react-components";
3
- import { useFormContext as p, Controller as u } from "react-hook-form";
4
- const f = ({
5
- propertyName: e,
6
- label: t,
7
- minValue: n,
8
- maxValue: m,
9
- step: a,
10
- disabled: i
1
+ import { jsx as Y } from "react/jsx-runtime";
2
+ import { _ as O, c as F, P as l } from "../../../identity-DLWZln-X.js";
3
+ import c, { forwardRef as ft, useRef as tt, useImperativeHandle as et, useCallback as B, useEffect as k, useMemo as rt } from "react";
4
+ import { I as nt } from "../../../index.es-3043KTnb.js";
5
+ import { T as it } from "../../../index.es-25EARqhH.js";
6
+ import { c as at } from "../../../index.es-da0cf7oE.js";
7
+ import { b as dt, c as K } from "../../../tslib.es6-BDCynO9F.js";
8
+ import { M as gt, a as Et } from "../../../component-neHBNHRu.js";
9
+ import { M as st, a as bt, m as It, b as St } from "../../../component-DsB0poTj.js";
10
+ import { A as yt } from "../../../animationframe-EMBh6XeO.js";
11
+ import { a as ut } from "../../../util-DA21pZXj.js";
12
+ import { useFormContext as At, Controller as Ct } from "react-hook-form";
13
+ /**
14
+ * @license
15
+ * Copyright 2020 Google Inc.
16
+ *
17
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ * of this software and associated documentation files (the "Software"), to deal
19
+ * in the Software without restriction, including without limitation the rights
20
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ * copies of the Software, and to permit persons to whom the Software is
22
+ * furnished to do so, subject to the following conditions:
23
+ *
24
+ * The above copyright notice and this permission notice shall be included in
25
+ * all copies or substantial portions of the Software.
26
+ *
27
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
33
+ * THE SOFTWARE.
34
+ */
35
+ var o = {
36
+ DISABLED: "mdc-slider--disabled",
37
+ DISCRETE: "mdc-slider--discrete",
38
+ INPUT: "mdc-slider__input",
39
+ RANGE: "mdc-slider--range",
40
+ THUMB: "mdc-slider__thumb",
41
+ // Applied when thumb is in the focused state.
42
+ THUMB_FOCUSED: "mdc-slider__thumb--focused",
43
+ THUMB_KNOB: "mdc-slider__thumb-knob",
44
+ // Class added to the top thumb (for overlapping thumbs in range slider).
45
+ THUMB_TOP: "mdc-slider__thumb--top",
46
+ THUMB_WITH_INDICATOR: "mdc-slider__thumb--with-indicator",
47
+ TICK_MARKS: "mdc-slider--tick-marks",
48
+ TICK_MARKS_CONTAINER: "mdc-slider__tick-marks",
49
+ TICK_MARK_ACTIVE: "mdc-slider__tick-mark--active",
50
+ TICK_MARK_INACTIVE: "mdc-slider__tick-mark--inactive",
51
+ TRACK: "mdc-slider__track",
52
+ // The active track fill element that will be scaled as the value changes.
53
+ TRACK_ACTIVE: "mdc-slider__track--active_fill",
54
+ VALUE_INDICATOR_TEXT: "mdc-slider__value-indicator-text"
55
+ }, ot = {
56
+ // Default step size.
57
+ STEP_SIZE: 1,
58
+ // Minimum absolute difference between clientX of move event / down event
59
+ // for which to update thumb, in the case of overlapping thumbs.
60
+ // This is needed to reduce chances of choosing the thumb based on
61
+ // pointer jitter.
62
+ THUMB_UPDATE_MIN_PX: 5
63
+ }, g = {
64
+ ARIA_VALUETEXT: "aria-valuetext",
65
+ INPUT_DISABLED: "disabled",
66
+ INPUT_MIN: "min",
67
+ INPUT_MAX: "max",
68
+ INPUT_VALUE: "value",
69
+ INPUT_STEP: "step"
70
+ }, lt = {
71
+ CHANGE: "MDCSlider:change",
72
+ INPUT: "MDCSlider:input"
73
+ };
74
+ /**
75
+ * @license
76
+ * Copyright 2020 Google Inc.
77
+ *
78
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
79
+ * of this software and associated documentation files (the "Software"), to deal
80
+ * in the Software without restriction, including without limitation the rights
81
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82
+ * copies of the Software, and to permit persons to whom the Software is
83
+ * furnished to do so, subject to the following conditions:
84
+ *
85
+ * The above copyright notice and this permission notice shall be included in
86
+ * all copies or substantial portions of the Software.
87
+ *
88
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
94
+ * THE SOFTWARE.
95
+ */
96
+ var L;
97
+ (function(m) {
98
+ m[m.ACTIVE = 0] = "ACTIVE", m[m.INACTIVE = 1] = "INACTIVE";
99
+ })(L || (L = {}));
100
+ var i;
101
+ (function(m) {
102
+ m[m.START = 1] = "START", m[m.END = 2] = "END";
103
+ })(i || (i = {}));
104
+ /**
105
+ * @license
106
+ * Copyright 2020 Google Inc.
107
+ *
108
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
109
+ * of this software and associated documentation files (the "Software"), to deal
110
+ * in the Software without restriction, including without limitation the rights
111
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
112
+ * copies of the Software, and to permit persons to whom the Software is
113
+ * furnished to do so, subject to the following conditions:
114
+ *
115
+ * The above copyright notice and this permission notice shall be included in
116
+ * all copies or substantial portions of the Software.
117
+ *
118
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
119
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
120
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
121
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
122
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
123
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
124
+ * THE SOFTWARE.
125
+ */
126
+ var W;
127
+ (function(m) {
128
+ m.SLIDER_UPDATE = "slider_update";
129
+ })(W || (W = {}));
130
+ var Z = typeof window < "u", Rt = (
131
+ /** @class */
132
+ function(m) {
133
+ dt(a, m);
134
+ function a(t) {
135
+ var r = m.call(this, K(K({}, a.defaultAdapter), t)) || this;
136
+ return r.initialStylesRemoved = !1, r.isDisabled = !1, r.isDiscrete = !1, r.step = ot.STEP_SIZE, r.hasTickMarks = !1, r.isRange = !1, r.thumb = null, r.downEventClientX = null, r.startThumbKnobWidth = 0, r.endThumbKnobWidth = 0, r.animFrame = new yt(), r;
137
+ }
138
+ return Object.defineProperty(a, "defaultAdapter", {
139
+ get: function() {
140
+ return {
141
+ hasClass: function() {
142
+ return !1;
143
+ },
144
+ addClass: function() {
145
+ },
146
+ removeClass: function() {
147
+ },
148
+ addThumbClass: function() {
149
+ },
150
+ removeThumbClass: function() {
151
+ },
152
+ getAttribute: function() {
153
+ return null;
154
+ },
155
+ getInputValue: function() {
156
+ return "";
157
+ },
158
+ setInputValue: function() {
159
+ },
160
+ getInputAttribute: function() {
161
+ return null;
162
+ },
163
+ setInputAttribute: function() {
164
+ return null;
165
+ },
166
+ removeInputAttribute: function() {
167
+ return null;
168
+ },
169
+ focusInput: function() {
170
+ },
171
+ isInputFocused: function() {
172
+ return !1;
173
+ },
174
+ getThumbKnobWidth: function() {
175
+ return 0;
176
+ },
177
+ getThumbBoundingClientRect: function() {
178
+ return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
179
+ },
180
+ getBoundingClientRect: function() {
181
+ return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
182
+ },
183
+ isRTL: function() {
184
+ return !1;
185
+ },
186
+ setThumbStyleProperty: function() {
187
+ },
188
+ removeThumbStyleProperty: function() {
189
+ },
190
+ setTrackActiveStyleProperty: function() {
191
+ },
192
+ removeTrackActiveStyleProperty: function() {
193
+ },
194
+ setValueIndicatorText: function() {
195
+ },
196
+ getValueToAriaValueTextFn: function() {
197
+ return null;
198
+ },
199
+ updateTickMarks: function() {
200
+ },
201
+ setPointerCapture: function() {
202
+ },
203
+ emitChangeEvent: function() {
204
+ },
205
+ emitInputEvent: function() {
206
+ },
207
+ emitDragStartEvent: function() {
208
+ },
209
+ emitDragEndEvent: function() {
210
+ },
211
+ registerEventHandler: function() {
212
+ },
213
+ deregisterEventHandler: function() {
214
+ },
215
+ registerThumbEventHandler: function() {
216
+ },
217
+ deregisterThumbEventHandler: function() {
218
+ },
219
+ registerInputEventHandler: function() {
220
+ },
221
+ deregisterInputEventHandler: function() {
222
+ },
223
+ registerBodyEventHandler: function() {
224
+ },
225
+ deregisterBodyEventHandler: function() {
226
+ },
227
+ registerWindowEventHandler: function() {
228
+ },
229
+ deregisterWindowEventHandler: function() {
230
+ }
231
+ };
232
+ },
233
+ enumerable: !1,
234
+ configurable: !0
235
+ }), a.prototype.init = function() {
236
+ var t = this;
237
+ this.isDisabled = this.adapter.hasClass(o.DISABLED), this.isDiscrete = this.adapter.hasClass(o.DISCRETE), this.hasTickMarks = this.adapter.hasClass(o.TICK_MARKS), this.isRange = this.adapter.hasClass(o.RANGE);
238
+ var r = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN, this.isRange ? i.START : i.END), g.INPUT_MIN), e = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MAX, i.END), g.INPUT_MAX), n = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.END), g.INPUT_VALUE), s = this.isRange ? this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.START), g.INPUT_VALUE) : r, d = this.adapter.getInputAttribute(g.INPUT_STEP, i.END), h = d ? this.convertAttributeValueToNumber(d, g.INPUT_STEP) : this.step;
239
+ this.validateProperties({ min: r, max: e, value: n, valueStart: s, step: h }), this.min = r, this.max = e, this.value = n, this.valueStart = s, this.step = h, this.numDecimalPlaces = _t(this.step), this.valueBeforeDownEvent = n, this.valueStartBeforeDownEvent = s, this.mousedownOrTouchstartListener = this.handleMousedownOrTouchstart.bind(this), this.moveListener = this.handleMove.bind(this), this.pointerdownListener = this.handlePointerdown.bind(this), this.pointerupListener = this.handlePointerup.bind(this), this.thumbMouseenterListener = this.handleThumbMouseenter.bind(this), this.thumbMouseleaveListener = this.handleThumbMouseleave.bind(this), this.inputStartChangeListener = function() {
240
+ t.handleInputChange(i.START);
241
+ }, this.inputEndChangeListener = function() {
242
+ t.handleInputChange(i.END);
243
+ }, this.inputStartFocusListener = function() {
244
+ t.handleInputFocus(i.START);
245
+ }, this.inputEndFocusListener = function() {
246
+ t.handleInputFocus(i.END);
247
+ }, this.inputStartBlurListener = function() {
248
+ t.handleInputBlur(i.START);
249
+ }, this.inputEndBlurListener = function() {
250
+ t.handleInputBlur(i.END);
251
+ }, this.resizeListener = this.handleResize.bind(this), this.registerEventHandlers();
252
+ }, a.prototype.destroy = function() {
253
+ this.deregisterEventHandlers();
254
+ }, a.prototype.getMin = function() {
255
+ return this.min;
256
+ }, a.prototype.getMax = function() {
257
+ return this.max;
258
+ }, a.prototype.getValue = function() {
259
+ return this.value;
260
+ }, a.prototype.setValue = function(t) {
261
+ if (this.isRange && t < this.valueStart)
262
+ throw new Error("end thumb value (" + t + ") must be >= start thumb " + ("value (" + this.valueStart + ")"));
263
+ this.updateValue(t, i.END);
264
+ }, a.prototype.getValueStart = function() {
265
+ if (!this.isRange)
266
+ throw new Error("`valueStart` is only applicable for range sliders.");
267
+ return this.valueStart;
268
+ }, a.prototype.setValueStart = function(t) {
269
+ if (!this.isRange)
270
+ throw new Error("`valueStart` is only applicable for range sliders.");
271
+ if (this.isRange && t > this.value)
272
+ throw new Error("start thumb value (" + t + ") must be <= end thumb " + ("value (" + this.value + ")"));
273
+ this.updateValue(t, i.START);
274
+ }, a.prototype.getStep = function() {
275
+ return this.step;
276
+ }, a.prototype.getDisabled = function() {
277
+ return this.isDisabled;
278
+ }, a.prototype.setDisabled = function(t) {
279
+ this.isDisabled = t, t ? (this.adapter.addClass(o.DISABLED), this.isRange && this.adapter.setInputAttribute(g.INPUT_DISABLED, "", i.START), this.adapter.setInputAttribute(g.INPUT_DISABLED, "", i.END)) : (this.adapter.removeClass(o.DISABLED), this.isRange && this.adapter.removeInputAttribute(g.INPUT_DISABLED, i.START), this.adapter.removeInputAttribute(g.INPUT_DISABLED, i.END));
280
+ }, a.prototype.getIsRange = function() {
281
+ return this.isRange;
282
+ }, a.prototype.layout = function(t) {
283
+ var r = t === void 0 ? {} : t, e = r.skipUpdateUI;
284
+ this.rect = this.adapter.getBoundingClientRect(), this.isRange && (this.startThumbKnobWidth = this.adapter.getThumbKnobWidth(i.START), this.endThumbKnobWidth = this.adapter.getThumbKnobWidth(i.END)), e || this.updateUI();
285
+ }, a.prototype.handleResize = function() {
286
+ this.layout();
287
+ }, a.prototype.handleDown = function(t) {
288
+ if (!this.isDisabled) {
289
+ this.valueStartBeforeDownEvent = this.valueStart, this.valueBeforeDownEvent = this.value;
290
+ var r = t.clientX != null ? t.clientX : t.targetTouches[0].clientX;
291
+ this.downEventClientX = r;
292
+ var e = this.mapClientXOnSliderScale(r);
293
+ this.thumb = this.getThumbFromDownEvent(r, e), this.thumb !== null && (this.handleDragStart(t, e, this.thumb), this.updateValue(e, this.thumb, { emitInputEvent: !0 }));
294
+ }
295
+ }, a.prototype.handleMove = function(t) {
296
+ if (!this.isDisabled) {
297
+ t.preventDefault();
298
+ var r = t.clientX != null ? t.clientX : t.targetTouches[0].clientX, e = this.thumb != null;
299
+ if (this.thumb = this.getThumbFromMoveEvent(r), this.thumb !== null) {
300
+ var n = this.mapClientXOnSliderScale(r);
301
+ e || (this.handleDragStart(t, n, this.thumb), this.adapter.emitDragStartEvent(n, this.thumb)), this.updateValue(n, this.thumb, { emitInputEvent: !0 });
302
+ }
303
+ }
304
+ }, a.prototype.handleUp = function() {
305
+ if (!(this.isDisabled || this.thumb === null)) {
306
+ var t = this.thumb === i.START ? this.valueStartBeforeDownEvent : this.valueBeforeDownEvent, r = this.thumb === i.START ? this.valueStart : this.value;
307
+ t !== r && this.adapter.emitChangeEvent(r, this.thumb), this.adapter.emitDragEndEvent(r, this.thumb), this.thumb = null;
308
+ }
309
+ }, a.prototype.handleThumbMouseenter = function() {
310
+ !this.isDiscrete || !this.isRange || (this.adapter.addThumbClass(o.THUMB_WITH_INDICATOR, i.START), this.adapter.addThumbClass(o.THUMB_WITH_INDICATOR, i.END));
311
+ }, a.prototype.handleThumbMouseleave = function() {
312
+ !this.isDiscrete || !this.isRange || this.adapter.isInputFocused(i.START) || this.adapter.isInputFocused(i.END) || (this.adapter.removeThumbClass(o.THUMB_WITH_INDICATOR, i.START), this.adapter.removeThumbClass(o.THUMB_WITH_INDICATOR, i.END));
313
+ }, a.prototype.handleMousedownOrTouchstart = function(t) {
314
+ var r = this, e = t.type === "mousedown" ? "mousemove" : "touchmove";
315
+ this.adapter.registerBodyEventHandler(e, this.moveListener);
316
+ var n = function() {
317
+ r.handleUp(), r.adapter.deregisterBodyEventHandler(e, r.moveListener), r.adapter.deregisterEventHandler("mouseup", n), r.adapter.deregisterEventHandler("touchend", n);
318
+ };
319
+ this.adapter.registerBodyEventHandler("mouseup", n), this.adapter.registerBodyEventHandler("touchend", n), this.handleDown(t);
320
+ }, a.prototype.handlePointerdown = function(t) {
321
+ this.adapter.setPointerCapture(t.pointerId), this.adapter.registerEventHandler("pointermove", this.moveListener), this.handleDown(t);
322
+ }, a.prototype.handleInputChange = function(t) {
323
+ var r = Number(this.adapter.getInputValue(t));
324
+ t === i.START ? this.setValueStart(r) : this.setValue(r), this.adapter.emitChangeEvent(t === i.START ? this.valueStart : this.value, t), this.adapter.emitInputEvent(t === i.START ? this.valueStart : this.value, t);
325
+ }, a.prototype.handleInputFocus = function(t) {
326
+ if (this.adapter.addThumbClass(o.THUMB_FOCUSED, t), !!this.isDiscrete && (this.adapter.addThumbClass(o.THUMB_WITH_INDICATOR, t), this.isRange)) {
327
+ var r = t === i.START ? i.END : i.START;
328
+ this.adapter.addThumbClass(o.THUMB_WITH_INDICATOR, r);
329
+ }
330
+ }, a.prototype.handleInputBlur = function(t) {
331
+ if (this.adapter.removeThumbClass(o.THUMB_FOCUSED, t), !!this.isDiscrete && (this.adapter.removeThumbClass(o.THUMB_WITH_INDICATOR, t), this.isRange)) {
332
+ var r = t === i.START ? i.END : i.START;
333
+ this.adapter.removeThumbClass(o.THUMB_WITH_INDICATOR, r);
334
+ }
335
+ }, a.prototype.handleDragStart = function(t, r, e) {
336
+ this.adapter.focusInput(e), t.preventDefault(), this.adapter.emitDragStartEvent(r, e);
337
+ }, a.prototype.getThumbFromDownEvent = function(t, r) {
338
+ if (!this.isRange)
339
+ return i.END;
340
+ var e = this.adapter.getThumbBoundingClientRect(i.START), n = this.adapter.getThumbBoundingClientRect(i.END), s = t >= e.left && t <= e.right, d = t >= n.left && t <= n.right;
341
+ return s && d ? null : s ? i.START : d ? i.END : r < this.valueStart ? i.START : r > this.value ? i.END : r - this.valueStart <= this.value - r ? i.START : i.END;
342
+ }, a.prototype.getThumbFromMoveEvent = function(t) {
343
+ if (this.thumb !== null)
344
+ return this.thumb;
345
+ if (this.downEventClientX === null)
346
+ throw new Error("`downEventClientX` is null after move event.");
347
+ var r = Math.abs(this.downEventClientX - t) < ot.THUMB_UPDATE_MIN_PX;
348
+ if (r)
349
+ return this.thumb;
350
+ var e = t < this.downEventClientX;
351
+ return e ? this.adapter.isRTL() ? i.END : i.START : this.adapter.isRTL() ? i.START : i.END;
352
+ }, a.prototype.updateUI = function(t) {
353
+ this.updateThumbAndInputAttributes(t), this.updateThumbAndTrackUI(t), this.updateValueIndicatorUI(t), this.updateTickMarksUI();
354
+ }, a.prototype.updateThumbAndInputAttributes = function(t) {
355
+ if (t) {
356
+ var r = this.isRange && t === i.START ? this.valueStart : this.value, e = String(r);
357
+ this.adapter.setInputAttribute(g.INPUT_VALUE, e, t), this.isRange && t === i.START ? this.adapter.setInputAttribute(g.INPUT_MIN, e, i.END) : this.isRange && t === i.END && this.adapter.setInputAttribute(g.INPUT_MAX, e, i.START), this.adapter.getInputValue(t) !== e && this.adapter.setInputValue(e, t);
358
+ var n = this.adapter.getValueToAriaValueTextFn();
359
+ n && this.adapter.setInputAttribute(g.ARIA_VALUETEXT, n(r), t);
360
+ }
361
+ }, a.prototype.updateValueIndicatorUI = function(t) {
362
+ if (this.isDiscrete) {
363
+ var r = this.isRange && t === i.START ? this.valueStart : this.value;
364
+ this.adapter.setValueIndicatorText(r, t === i.START ? i.START : i.END), !t && this.isRange && this.adapter.setValueIndicatorText(this.valueStart, i.START);
365
+ }
366
+ }, a.prototype.updateTickMarksUI = function() {
367
+ if (!(!this.isDiscrete || !this.hasTickMarks)) {
368
+ var t = (this.valueStart - this.min) / this.step, r = (this.value - this.valueStart) / this.step + 1, e = (this.max - this.value) / this.step, n = Array.from({ length: t }).fill(L.INACTIVE), s = Array.from({ length: r }).fill(L.ACTIVE), d = Array.from({ length: e }).fill(L.INACTIVE);
369
+ this.adapter.updateTickMarks(n.concat(s).concat(d));
370
+ }
371
+ }, a.prototype.mapClientXOnSliderScale = function(t) {
372
+ var r = t - this.rect.left, e = r / this.rect.width;
373
+ this.adapter.isRTL() && (e = 1 - e);
374
+ var n = this.min + e * (this.max - this.min);
375
+ return n === this.max || n === this.min ? n : Number(this.quantize(n).toFixed(this.numDecimalPlaces));
376
+ }, a.prototype.quantize = function(t) {
377
+ var r = Math.round((t - this.min) / this.step);
378
+ return this.min + r * this.step;
379
+ }, a.prototype.updateValue = function(t, r, e) {
380
+ var n = e === void 0 ? {} : e, s = n.emitInputEvent;
381
+ if (t = this.clampValue(t, r), this.isRange && r === i.START) {
382
+ if (this.valueStart === t)
383
+ return;
384
+ this.valueStart = t;
385
+ } else {
386
+ if (this.value === t)
387
+ return;
388
+ this.value = t;
389
+ }
390
+ this.updateUI(r), s && this.adapter.emitInputEvent(r === i.START ? this.valueStart : this.value, r);
391
+ }, a.prototype.clampValue = function(t, r) {
392
+ t = Math.min(Math.max(t, this.min), this.max);
393
+ var e = this.isRange && r === i.START && t > this.value;
394
+ if (e)
395
+ return this.value;
396
+ var n = this.isRange && r === i.END && t < this.valueStart;
397
+ return n ? this.valueStart : t;
398
+ }, a.prototype.updateThumbAndTrackUI = function(t) {
399
+ var r = this, e = this, n = e.max, s = e.min, d = (this.value - this.valueStart) / (n - s), h = d * this.rect.width, v = this.adapter.isRTL(), y = Z ? ut(window, "transform") : "transform";
400
+ if (this.isRange) {
401
+ var D = this.adapter.isRTL() ? (n - this.value) / (n - s) * this.rect.width : (this.valueStart - s) / (n - s) * this.rect.width, T = D + h;
402
+ this.animFrame.request(W.SLIDER_UPDATE, function() {
403
+ var f = !v && t === i.START || v && t !== i.START;
404
+ f ? (r.adapter.setTrackActiveStyleProperty("transform-origin", "right"), r.adapter.setTrackActiveStyleProperty("left", "unset"), r.adapter.setTrackActiveStyleProperty("right", r.rect.width - T + "px")) : (r.adapter.setTrackActiveStyleProperty("transform-origin", "left"), r.adapter.setTrackActiveStyleProperty("right", "unset"), r.adapter.setTrackActiveStyleProperty("left", D + "px")), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" + d + ")");
405
+ var V = v ? T : D, _ = r.adapter.isRTL() ? D : T;
406
+ (t === i.START || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + V + "px)", i.START), (t === i.END || !t || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(y, "translateX(" + _ + "px)", i.END), r.removeInitialStyles(v), r.updateOverlappingThumbsUI(V, _, t);
407
+ });
408
+ } else
409
+ this.animFrame.request(W.SLIDER_UPDATE, function() {
410
+ var f = v ? r.rect.width - h : h;
411
+ r.adapter.setThumbStyleProperty(y, "translateX(" + f + "px)", i.END), r.adapter.setTrackActiveStyleProperty(y, "scaleX(" + d + ")"), r.removeInitialStyles(v);
412
+ });
413
+ }, a.prototype.removeInitialStyles = function(t) {
414
+ if (!this.initialStylesRemoved) {
415
+ var r = t ? "right" : "left";
416
+ this.adapter.removeThumbStyleProperty(r, i.END), this.isRange && this.adapter.removeThumbStyleProperty(r, i.START), this.initialStylesRemoved = !0, this.resetTrackAndThumbAnimation();
417
+ }
418
+ }, a.prototype.resetTrackAndThumbAnimation = function() {
419
+ var t = this;
420
+ if (this.isDiscrete) {
421
+ var r = Z ? ut(window, "transition") : "transition", e = "all 0s ease 0s";
422
+ this.adapter.setThumbStyleProperty(r, e, i.END), this.isRange && this.adapter.setThumbStyleProperty(r, e, i.START), this.adapter.setTrackActiveStyleProperty(r, e), requestAnimationFrame(function() {
423
+ t.adapter.removeThumbStyleProperty(r, i.END), t.adapter.removeTrackActiveStyleProperty(r), t.isRange && t.adapter.removeThumbStyleProperty(r, i.START);
424
+ });
425
+ }
426
+ }, a.prototype.updateOverlappingThumbsUI = function(t, r, e) {
427
+ var n = !1;
428
+ if (this.adapter.isRTL()) {
429
+ var s = t - this.startThumbKnobWidth / 2, d = r + this.endThumbKnobWidth / 2;
430
+ n = d >= s;
431
+ } else {
432
+ var h = t + this.startThumbKnobWidth / 2, v = r - this.endThumbKnobWidth / 2;
433
+ n = h >= v;
434
+ }
435
+ n ? (this.adapter.addThumbClass(
436
+ o.THUMB_TOP,
437
+ // If no thumb was dragged (in the case of initial layout), end
438
+ // thumb is on top by default.
439
+ e || i.END
440
+ ), this.adapter.removeThumbClass(o.THUMB_TOP, e === i.START ? i.END : i.START)) : (this.adapter.removeThumbClass(o.THUMB_TOP, i.START), this.adapter.removeThumbClass(o.THUMB_TOP, i.END));
441
+ }, a.prototype.convertAttributeValueToNumber = function(t, r) {
442
+ if (t === null)
443
+ throw new Error("MDCSliderFoundation: `" + r + "` must be non-null.");
444
+ var e = Number(t);
445
+ if (isNaN(e))
446
+ throw new Error("MDCSliderFoundation: `" + r + "` value is " + ("`" + t + "`, but must be a number."));
447
+ return e;
448
+ }, a.prototype.validateProperties = function(t) {
449
+ var r = t.min, e = t.max, n = t.value, s = t.valueStart, d = t.step;
450
+ if (r >= e)
451
+ throw new Error("MDCSliderFoundation: min must be strictly less than max. " + ("Current: [min: " + r + ", max: " + e + "]"));
452
+ if (d <= 0)
453
+ throw new Error("MDCSliderFoundation: step must be a positive number. " + ("Current step: " + this.step));
454
+ if (this.isRange) {
455
+ if (n < r || n > e || s < r || s > e)
456
+ throw new Error("MDCSliderFoundation: values must be in [min, max] range. " + ("Current values: [start value: " + s + ", end value: " + n + "]"));
457
+ if (s > n)
458
+ throw new Error("MDCSliderFoundation: start value must be <= end value. " + ("Current values: [start value: " + s + ", end value: " + n + "]"));
459
+ var h = (s - r) / d, v = (n - r) / d;
460
+ if (h % 1 !== 0 || v % 1 !== 0)
461
+ throw new Error("MDCSliderFoundation: Slider values must be valid based on the " + ("step value. Current values: [start value: " + s + ", ") + ("end value: " + n + "]"));
462
+ } else {
463
+ if (n < r || n > e)
464
+ throw new Error("MDCSliderFoundation: value must be in [min, max] range. " + ("Current value: " + n));
465
+ var v = (n - r) / d;
466
+ if (v % 1 !== 0)
467
+ throw new Error("MDCSliderFoundation: Slider value must be valid based on the " + ("step value. Current value: " + n));
468
+ }
469
+ }, a.prototype.registerEventHandlers = function() {
470
+ this.adapter.registerWindowEventHandler("resize", this.resizeListener), a.SUPPORTS_POINTER_EVENTS ? (this.adapter.registerEventHandler("pointerdown", this.pointerdownListener), this.adapter.registerEventHandler("pointerup", this.pointerupListener)) : (this.adapter.registerEventHandler("mousedown", this.mousedownOrTouchstartListener), this.adapter.registerEventHandler("touchstart", this.mousedownOrTouchstartListener)), this.isRange && (this.adapter.registerThumbEventHandler(i.START, "mouseenter", this.thumbMouseenterListener), this.adapter.registerThumbEventHandler(i.START, "mouseleave", this.thumbMouseleaveListener), this.adapter.registerInputEventHandler(i.START, "change", this.inputStartChangeListener), this.adapter.registerInputEventHandler(i.START, "focus", this.inputStartFocusListener), this.adapter.registerInputEventHandler(i.START, "blur", this.inputStartBlurListener)), this.adapter.registerThumbEventHandler(i.END, "mouseenter", this.thumbMouseenterListener), this.adapter.registerThumbEventHandler(i.END, "mouseleave", this.thumbMouseleaveListener), this.adapter.registerInputEventHandler(i.END, "change", this.inputEndChangeListener), this.adapter.registerInputEventHandler(i.END, "focus", this.inputEndFocusListener), this.adapter.registerInputEventHandler(i.END, "blur", this.inputEndBlurListener);
471
+ }, a.prototype.deregisterEventHandlers = function() {
472
+ this.adapter.deregisterWindowEventHandler("resize", this.resizeListener), a.SUPPORTS_POINTER_EVENTS ? (this.adapter.deregisterEventHandler("pointerdown", this.pointerdownListener), this.adapter.deregisterEventHandler("pointerup", this.pointerupListener)) : (this.adapter.deregisterEventHandler("mousedown", this.mousedownOrTouchstartListener), this.adapter.deregisterEventHandler("touchstart", this.mousedownOrTouchstartListener)), this.isRange && (this.adapter.deregisterThumbEventHandler(i.START, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(i.START, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(i.START, "change", this.inputStartChangeListener), this.adapter.deregisterInputEventHandler(i.START, "focus", this.inputStartFocusListener), this.adapter.deregisterInputEventHandler(i.START, "blur", this.inputStartBlurListener)), this.adapter.deregisterThumbEventHandler(i.END, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(i.END, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(i.END, "change", this.inputEndChangeListener), this.adapter.deregisterInputEventHandler(i.END, "focus", this.inputEndFocusListener), this.adapter.deregisterInputEventHandler(i.END, "blur", this.inputEndBlurListener);
473
+ }, a.prototype.handlePointerup = function() {
474
+ this.handleUp(), this.adapter.deregisterEventHandler("pointermove", this.moveListener);
475
+ }, a.SUPPORTS_POINTER_EVENTS = Z && !!window.PointerEvent && // #setPointerCapture is buggy on iOS, so we can't use pointer events
476
+ // until the following bug is fixed:
477
+ // https://bugs.webkit.org/show_bug.cgi?id=220196
478
+ !Dt(), a;
479
+ }(gt)
480
+ );
481
+ function Dt() {
482
+ return [
483
+ "iPad Simulator",
484
+ "iPhone Simulator",
485
+ "iPod Simulator",
486
+ "iPad",
487
+ "iPhone",
488
+ "iPod"
489
+ ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
490
+ }
491
+ function _t(m) {
492
+ var a = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(m));
493
+ if (!a)
494
+ return 0;
495
+ var t = a[1] || "", r = a[2] || 0;
496
+ return Math.max(
497
+ 0,
498
+ // lower limit
499
+ (t === "0" ? 0 : t.length) - Number(r)
500
+ );
501
+ }
502
+ /**
503
+ * @license
504
+ * Copyright 2020 Google Inc.
505
+ *
506
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
507
+ * of this software and associated documentation files (the "Software"), to deal
508
+ * in the Software without restriction, including without limitation the rights
509
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
510
+ * copies of the Software, and to permit persons to whom the Software is
511
+ * furnished to do so, subject to the following conditions:
512
+ *
513
+ * The above copyright notice and this permission notice shall be included in
514
+ * all copies or substantial portions of the Software.
515
+ *
516
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
517
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
518
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
519
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
520
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
521
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
522
+ * THE SOFTWARE.
523
+ */
524
+ var Nt = (
525
+ /** @class */
526
+ function(m) {
527
+ dt(a, m);
528
+ function a() {
529
+ var t = m !== null && m.apply(this, arguments) || this;
530
+ return t.skipInitialUIUpdate = !1, t.valueToAriaValueTextFn = null, t;
531
+ }
532
+ return a.attachTo = function(t, r) {
533
+ return r === void 0 && (r = {}), new a(t, void 0, r);
534
+ }, a.prototype.getDefaultFoundation = function() {
535
+ var t = this, r = {
536
+ hasClass: function(e) {
537
+ return t.root.classList.contains(e);
538
+ },
539
+ addClass: function(e) {
540
+ t.root.classList.add(e);
541
+ },
542
+ removeClass: function(e) {
543
+ t.root.classList.remove(e);
544
+ },
545
+ addThumbClass: function(e, n) {
546
+ t.getThumbEl(n).classList.add(e);
547
+ },
548
+ removeThumbClass: function(e, n) {
549
+ t.getThumbEl(n).classList.remove(e);
550
+ },
551
+ getAttribute: function(e) {
552
+ return t.root.getAttribute(e);
553
+ },
554
+ getInputValue: function(e) {
555
+ return t.getInput(e).value;
556
+ },
557
+ setInputValue: function(e, n) {
558
+ t.getInput(n).value = e;
559
+ },
560
+ getInputAttribute: function(e, n) {
561
+ return t.getInput(n).getAttribute(e);
562
+ },
563
+ setInputAttribute: function(e, n, s) {
564
+ t.getInput(s).setAttribute(e, n);
565
+ },
566
+ removeInputAttribute: function(e, n) {
567
+ t.getInput(n).removeAttribute(e);
568
+ },
569
+ focusInput: function(e) {
570
+ t.getInput(e).focus();
571
+ },
572
+ isInputFocused: function(e) {
573
+ return t.getInput(e) === document.activeElement;
574
+ },
575
+ getThumbKnobWidth: function(e) {
576
+ return t.getThumbEl(e).querySelector("." + o.THUMB_KNOB).getBoundingClientRect().width;
577
+ },
578
+ getThumbBoundingClientRect: function(e) {
579
+ return t.getThumbEl(e).getBoundingClientRect();
580
+ },
581
+ getBoundingClientRect: function() {
582
+ return t.root.getBoundingClientRect();
583
+ },
584
+ isRTL: function() {
585
+ return getComputedStyle(t.root).direction === "rtl";
586
+ },
587
+ setThumbStyleProperty: function(e, n, s) {
588
+ t.getThumbEl(s).style.setProperty(e, n);
589
+ },
590
+ removeThumbStyleProperty: function(e, n) {
591
+ t.getThumbEl(n).style.removeProperty(e);
592
+ },
593
+ setTrackActiveStyleProperty: function(e, n) {
594
+ t.trackActive.style.setProperty(e, n);
595
+ },
596
+ removeTrackActiveStyleProperty: function(e) {
597
+ t.trackActive.style.removeProperty(e);
598
+ },
599
+ setValueIndicatorText: function(e, n) {
600
+ var s = t.getThumbEl(n).querySelector("." + o.VALUE_INDICATOR_TEXT);
601
+ s.textContent = String(e);
602
+ },
603
+ getValueToAriaValueTextFn: function() {
604
+ return t.valueToAriaValueTextFn;
605
+ },
606
+ updateTickMarks: function(e) {
607
+ var n = t.root.querySelector("." + o.TICK_MARKS_CONTAINER);
608
+ if (!n) {
609
+ n = document.createElement("div"), n.classList.add(o.TICK_MARKS_CONTAINER);
610
+ var s = t.root.querySelector("." + o.TRACK);
611
+ s.appendChild(n);
612
+ }
613
+ e.length !== n.children.length ? (n.innerHTML = "", t.addTickMarks(n, e)) : t.updateTickMarks(n, e);
614
+ },
615
+ setPointerCapture: function(e) {
616
+ t.root.setPointerCapture(e);
617
+ },
618
+ emitChangeEvent: function(e, n) {
619
+ t.emit(lt.CHANGE, { value: e, thumb: n });
620
+ },
621
+ emitInputEvent: function(e, n) {
622
+ t.emit(lt.INPUT, { value: e, thumb: n });
623
+ },
624
+ emitDragStartEvent: function(e, n) {
625
+ t.getRipple(n).activate();
626
+ },
627
+ emitDragEndEvent: function(e, n) {
628
+ t.getRipple(n).deactivate();
629
+ },
630
+ registerEventHandler: function(e, n) {
631
+ t.listen(e, n);
632
+ },
633
+ deregisterEventHandler: function(e, n) {
634
+ t.unlisten(e, n);
635
+ },
636
+ registerThumbEventHandler: function(e, n, s) {
637
+ t.getThumbEl(e).addEventListener(n, s);
638
+ },
639
+ deregisterThumbEventHandler: function(e, n, s) {
640
+ t.getThumbEl(e).removeEventListener(n, s);
641
+ },
642
+ registerInputEventHandler: function(e, n, s) {
643
+ t.getInput(e).addEventListener(n, s);
644
+ },
645
+ deregisterInputEventHandler: function(e, n, s) {
646
+ t.getInput(e).removeEventListener(n, s);
647
+ },
648
+ registerBodyEventHandler: function(e, n) {
649
+ document.body.addEventListener(e, n);
650
+ },
651
+ deregisterBodyEventHandler: function(e, n) {
652
+ document.body.removeEventListener(e, n);
653
+ },
654
+ registerWindowEventHandler: function(e, n) {
655
+ window.addEventListener(e, n);
656
+ },
657
+ deregisterWindowEventHandler: function(e, n) {
658
+ window.removeEventListener(e, n);
659
+ }
660
+ // tslint:enable:object-literal-sort-keys
661
+ };
662
+ return new Rt(r);
663
+ }, a.prototype.initialize = function(t) {
664
+ var r = t === void 0 ? {} : t, e = r.skipInitialUIUpdate;
665
+ this.inputs = [].slice.call(this.root.querySelectorAll("." + o.INPUT)), this.thumbs = [].slice.call(this.root.querySelectorAll("." + o.THUMB)), this.trackActive = this.root.querySelector("." + o.TRACK_ACTIVE), this.ripples = this.createRipples(), e && (this.skipInitialUIUpdate = !0);
666
+ }, a.prototype.initialSyncWithDOM = function() {
667
+ this.foundation.layout({ skipUpdateUI: this.skipInitialUIUpdate });
668
+ }, a.prototype.layout = function() {
669
+ this.foundation.layout();
670
+ }, a.prototype.getValueStart = function() {
671
+ return this.foundation.getValueStart();
672
+ }, a.prototype.setValueStart = function(t) {
673
+ this.foundation.setValueStart(t);
674
+ }, a.prototype.getValue = function() {
675
+ return this.foundation.getValue();
676
+ }, a.prototype.setValue = function(t) {
677
+ this.foundation.setValue(t);
678
+ }, a.prototype.getDisabled = function() {
679
+ return this.foundation.getDisabled();
680
+ }, a.prototype.setDisabled = function(t) {
681
+ this.foundation.setDisabled(t);
682
+ }, a.prototype.setValueToAriaValueTextFn = function(t) {
683
+ this.valueToAriaValueTextFn = t;
684
+ }, a.prototype.getThumbEl = function(t) {
685
+ return t === i.END ? this.thumbs[this.thumbs.length - 1] : this.thumbs[0];
686
+ }, a.prototype.getInput = function(t) {
687
+ return t === i.END ? this.inputs[this.inputs.length - 1] : this.inputs[0];
688
+ }, a.prototype.getRipple = function(t) {
689
+ return t === i.END ? this.ripples[this.ripples.length - 1] : this.ripples[0];
690
+ }, a.prototype.addTickMarks = function(t, r) {
691
+ for (var e = document.createDocumentFragment(), n = 0; n < r.length; n++) {
692
+ var s = document.createElement("div"), d = r[n] === L.ACTIVE ? o.TICK_MARK_ACTIVE : o.TICK_MARK_INACTIVE;
693
+ s.classList.add(d), e.appendChild(s);
694
+ }
695
+ t.appendChild(e);
696
+ }, a.prototype.updateTickMarks = function(t, r) {
697
+ for (var e = Array.from(t.children), n = 0; n < e.length; n++)
698
+ r[n] === L.ACTIVE ? (e[n].classList.add(o.TICK_MARK_ACTIVE), e[n].classList.remove(o.TICK_MARK_INACTIVE)) : (e[n].classList.add(o.TICK_MARK_INACTIVE), e[n].classList.remove(o.TICK_MARK_ACTIVE));
699
+ }, a.prototype.createRipples = function() {
700
+ for (var t = [], r = [].slice.call(this.root.querySelectorAll("." + o.THUMB)), e = function(d) {
701
+ var h = r[d], v = n.inputs[d], y = K(K({}, st.createAdapter(n)), { addClass: function(T) {
702
+ h.classList.add(T);
703
+ }, computeBoundingRect: function() {
704
+ return h.getBoundingClientRect();
705
+ }, deregisterInteractionHandler: function(T, f) {
706
+ v.removeEventListener(T, f);
707
+ }, isSurfaceActive: function() {
708
+ return It(v, ":active");
709
+ }, isUnbounded: function() {
710
+ return !0;
711
+ }, registerInteractionHandler: function(T, f) {
712
+ v.addEventListener(T, f, bt());
713
+ }, removeClass: function(T) {
714
+ h.classList.remove(T);
715
+ }, updateCssVariable: function(T, f) {
716
+ h.style.setProperty(T, f);
717
+ } }), D = new st(h, new St(y));
718
+ D.unbounded = !0, t.push(D);
719
+ }, n = this, s = 0; s < r.length; s++)
720
+ e(s);
721
+ return t;
722
+ }, a;
723
+ }(Et)
724
+ );
725
+ const Mt = {
726
+ /**
727
+ * Accessibility label for assistive technologies.
728
+ *
729
+ * Defaults to **null**.
730
+ */
731
+ ariaLabel: l.string,
732
+ /**
733
+ * Id of the component being labeled for assistive technologies.
734
+ *
735
+ * Defaults to **null**.
736
+ */
737
+ ariaLabelledBy: l.string,
738
+ /**
739
+ * Set this input attribute to a string that makes the slider value understandable, e.g. 'Monday'.
740
+ *
741
+ * Defaults to **null**.
742
+ */
743
+ ariaValuetext: l.string,
744
+ /**
745
+ * The css class name to be passed through to the component markup.
746
+ *
747
+ * Defaults to **undefined**.
748
+ */
749
+ className: l.string,
750
+ /**
751
+ * Prevent user interaction.
752
+ *
753
+ * Defaults to **false**.
754
+ */
755
+ disabled: l.bool,
756
+ /**
757
+ * Discrete sliders display a numeric value label when the slider control is focused, which allows a user to input an exact value.
758
+ *
759
+ * Defaults to **false**.
760
+ */
761
+ discrete: l.bool,
762
+ /**
763
+ * Display tracker markers with discrete slider only.
764
+ *
765
+ * Defaults to **false**.
766
+ */
767
+ displayMarkers: l.bool,
768
+ /**
769
+ * ID for html input. May be overwritten.
770
+ *
771
+ * Defaults to **null**.
772
+ */
773
+ id: l.string,
774
+ /**
775
+ * Custom content to be displayed in the leading block container. See leadingBlockType for types supported. If a string is sent for a icon an Element Icon will be rendered
776
+ *
777
+ * Defaults to **null**.
778
+ */
779
+ leadingBlock: l.node,
780
+ /**
781
+ * Props to be added to the leading block node. For example, if an input is chosen, this is where you should send the input value and you can send in variant: 'filled' to use a filled textfield.
782
+ *
783
+ * Defaults to **null**.
784
+ */
785
+ leadingBlockProps: l.object,
786
+ /**
787
+ * Styles to be added to leading block div.
788
+ *
789
+ * Defaults to **null**.
790
+ */
791
+ leadingBlockStyle: l.object,
792
+ /**
793
+ * The type of media that will render in the leading block.
794
+ *
795
+ * Defaults to **null**.
796
+ */
797
+ leadingBlockType: l.oneOf(["", "icon", "input", "text"]),
798
+ /**
799
+ * The maximum value a slider can have.
800
+ *
801
+ * Defaults to **100**.
802
+ */
803
+ max: l.number,
804
+ /**
805
+ * The minimum value a slider can have.
806
+ *
807
+ * Defaults to **0**.
808
+ */
809
+ min: l.number,
810
+ /**
811
+ * When using the range slider, this is the value of the minimum knob of the slider. The maximum value will use the standard value prop.
812
+ *
813
+ * Defaults to **'0'**.
814
+ */
815
+ minValue: l.oneOfType([l.number, l.string, l.object]),
816
+ /**
817
+ * Fired when the slider is blurred after the value of slider changes.
818
+ *
819
+ * Defaults to **null**.
820
+ */
821
+ onChange: l.func,
822
+ /**
823
+ * Fired whenever the value of slider changes.
824
+ *
825
+ * Defaults to **null**.
826
+ */
827
+ onInput: l.func,
828
+ /**
829
+ * Allows the slider to have two knobs to select a range value.
830
+ *
831
+ * Defaults to **false**.
832
+ */
833
+ range: l.bool,
834
+ /**
835
+ * Specifies the increments at which a slider value can be set. Can be any positive number.
836
+ *
837
+ * Defaults to **1**.
838
+ */
839
+ step: l.number,
840
+ /**
841
+ * Slider color theme.
842
+ *
843
+ * Defaults to **'primary'**.
844
+ */
845
+ themeColor: l.oneOf(["primary", "secondary"]),
846
+ /**
847
+ * Custom content to be displayed in the trailing block container. See trailingBlockType for types supported. If a string is sent for icon an Element Icon will be rendered.
848
+ *
849
+ * Defaults to **null**.
850
+ */
851
+ trailingBlock: l.node,
852
+ /**
853
+ * Props to be added to the trailing block node. For example, if an input is chosen, this is where you should send the input value and you can send in variant: 'filled' to use a filled textfield.
854
+ *
855
+ * Defaults to **null**.
856
+ */
857
+ trailingBlockProps: l.object,
858
+ /**
859
+ * Styles to be added to trailing block div.
860
+ *
861
+ * Defaults to **null**.
862
+ */
863
+ trailingBlockStyle: l.object,
864
+ /**
865
+ * The type of media that will render in the trailing block.
866
+ *
867
+ * Defaults to **null**.
868
+ */
869
+ trailingBlockType: l.oneOf(["", "icon", "input", "text"]),
870
+ /**
871
+ * The current value of the slider. If the slider is a range slider, it will be the max value of the slider.
872
+ *
873
+ * Defaults to **null**.
874
+ */
875
+ value: l.oneOfType([l.number, l.string, l.object])
876
+ }, Pt = {
877
+ ariaLabel: null,
878
+ ariaLabelledBy: null,
879
+ ariaValuetext: null,
880
+ className: void 0,
881
+ disabled: !1,
882
+ discrete: !1,
883
+ displayMarkers: !1,
884
+ id: null,
885
+ leadingBlock: null,
886
+ leadingBlockProps: null,
887
+ leadingBlockStyle: null,
888
+ leadingBlockType: null,
889
+ max: 100,
890
+ min: 0,
891
+ minValue: "0",
892
+ range: !1,
893
+ step: 1,
894
+ themeColor: "primary",
895
+ trailingBlock: null,
896
+ trailingBlockProps: null,
897
+ trailingBlockStyle: null,
898
+ trailingBlockType: null,
899
+ value: null
900
+ }, X = /* @__PURE__ */ ft((m, a) => {
901
+ var t, r;
902
+ const {
903
+ ariaLabel: e,
904
+ ariaLabelledBy: n,
905
+ ariaValuetext: s,
906
+ className: d,
907
+ disabled: h,
908
+ discrete: v,
909
+ displayMarkers: y,
910
+ id: D,
911
+ leadingBlock: T,
912
+ leadingBlockProps: f,
913
+ leadingBlockStyle: V,
914
+ leadingBlockType: _,
915
+ max: I,
916
+ min: S,
917
+ minValue: P,
918
+ onChange: q,
919
+ onInput: z,
920
+ range: b,
921
+ step: R,
922
+ themeColor: U,
923
+ trailingBlock: N,
924
+ trailingBlockProps: A,
925
+ trailingBlockStyle: ht,
926
+ trailingBlockType: C,
927
+ value: M,
928
+ ...pt
929
+ } = m, x = tt(), p = tt();
930
+ et(a, () => x.current, []), et(a, () => ({
931
+ ...x.current,
932
+ layout: () => {
933
+ p.current && p.current.foundation.layout();
934
+ }
935
+ }), [p]);
936
+ const w = B((u) => b ? u >= S && u <= M : u >= S && u <= I, [S, M, I, b]), H = B((u) => b ? u <= I && u >= P : u <= I && u >= S, [I, P, S, b]);
937
+ k(() => (p.current = Nt.attachTo(x.current), () => {
938
+ var u;
939
+ (u = p.current) === null || u === void 0 || u.destroy();
940
+ }), [p]), k(() => {
941
+ p.current.foundation.min = S, p.current.foundation.max = I, p.current.foundation.step = R, p.current.foundation.layout();
942
+ }, [p, v, y, I, S, R]), k(() => {
943
+ p.current.foundation.layout();
944
+ }, [p, _, C]);
945
+ const j = B((u) => {
946
+ q && q(u.detail, u);
947
+ }, [q]), J = B((u) => {
948
+ const E = u.target.value;
949
+ f.onChange && f.onChange({
950
+ value: E && parseInt(E, 10),
951
+ thumb: 1
952
+ });
953
+ }, [f]), Q = B((u) => {
954
+ const E = u.target.value;
955
+ A.onChange && A.onChange({
956
+ value: E && parseInt(E, 10),
957
+ thumb: 2
958
+ });
959
+ }, [A]);
960
+ k(() => {
961
+ var u;
962
+ return (u = p.current) === null || u === void 0 || u.listen("MDCSlider:change", j), () => {
963
+ var E;
964
+ (E = p.current) === null || E === void 0 || E.unlisten("MDCSlider:change", j);
965
+ };
966
+ }, [p, j]);
967
+ const G = B((u) => {
968
+ z && z(u.detail, u);
969
+ }, [z]);
970
+ k(() => {
971
+ var u;
972
+ return (u = p.current) === null || u === void 0 || u.listen("MDCSlider:input", G), () => {
973
+ var E;
974
+ (E = p.current) === null || E === void 0 || E.unlisten("MDCSlider:input", G);
975
+ };
976
+ }, [p, G]), k(() => {
977
+ if (b) {
978
+ if (H(M)) {
979
+ var E;
980
+ (E = p.current) === null || E === void 0 || E.setValue(M);
981
+ }
982
+ if (w(P)) {
983
+ var $;
984
+ ($ = p.current) === null || $ === void 0 || $.setValueStart(P);
985
+ }
986
+ } else {
987
+ var u;
988
+ (u = p.current) === null || u === void 0 || u.setValue(M);
989
+ }
990
+ }, [p, M, P, b, w, H]), k(() => {
991
+ var u;
992
+ (u = p.current) === null || u === void 0 || u.setDisabled(h);
993
+ }, [p, h]);
994
+ const ct = rt(() => {
995
+ const u = b ? M - 1 : I;
996
+ switch (_) {
997
+ case "icon":
998
+ return T && typeof T == "string" ? /* @__PURE__ */ c.createElement(nt, O({
999
+ icon: T
1000
+ }, f)) : T;
1001
+ case "input":
1002
+ return T ? (b || C !== "input") && at(T, {
1003
+ min: S,
1004
+ max: u,
1005
+ step: R,
1006
+ type: "number",
1007
+ valid: w(f?.value)
1008
+ }) : (b || C !== "input") && /* @__PURE__ */ c.createElement(it, O({
1009
+ variant: "outlined"
1010
+ }, f, {
1011
+ dense: !0,
1012
+ type: "number",
1013
+ min: S,
1014
+ max: u,
1015
+ step: R,
1016
+ onChange: J,
1017
+ valid: w(f?.value)
1018
+ }));
1019
+ default:
1020
+ return T;
1021
+ }
1022
+ }, [_, T, C, S, M, R, f, b, J, w, I]), mt = rt(() => {
1023
+ const u = b ? P : S;
1024
+ switch (C) {
1025
+ case "icon":
1026
+ return C && typeof N == "string" ? /* @__PURE__ */ c.createElement(nt, {
1027
+ icon: N
1028
+ }) : N;
1029
+ case "input":
1030
+ return N ? C && at(N, {
1031
+ min: u,
1032
+ max: I,
1033
+ step: R,
1034
+ type: "number",
1035
+ valid: H(A?.value)
1036
+ }) : /* @__PURE__ */ c.createElement(it, O({
1037
+ variant: "outlined"
1038
+ }, A, {
1039
+ dense: !0,
1040
+ type: "number",
1041
+ min: u,
1042
+ max: I,
1043
+ step: R,
1044
+ onChange: Q,
1045
+ valid: H(A?.value)
1046
+ }));
1047
+ default:
1048
+ return N;
1049
+ }
1050
+ }, [C, N, A, P, S, I, R, Q, b, H]), vt = _ !== "input" || (b || C !== "input") && _ === "input", Tt = C || N !== null || N !== void 0;
1051
+ return /* @__PURE__ */ c.createElement("div", {
1052
+ className: F("lmnt", "lmnt-slider-container", h && "lmnt-slider--disabled")
1053
+ }, vt && /* @__PURE__ */ c.createElement("div", {
1054
+ className: F("lmnt-slider-info", "lmnt-slider-info-leading", _ === "input" && "lmnt-slider-info-with-input", U === "primary" && "lmnt-slider-info--primary", U === "secondary" && "lmnt-slider-info--secondary"),
1055
+ style: V
1056
+ }, ct), /* @__PURE__ */ c.createElement("div", {
1057
+ className: "lmnt lmnt-slider-inner"
1058
+ }, /* @__PURE__ */ c.createElement("div", O({
1059
+ className: F("lmnt", "mdc-slider", b && "mdc-slider--range", v && "mdc-slider--discrete", v && y && "mdc-slider--tick-marks", U === "primary" && "mdc-slider--primary", U === "secondary" && "mdc-slider--secondary", d),
1060
+ id: D,
1061
+ ref: x
1062
+ }, pt), b && /* @__PURE__ */ c.createElement("input", {
1063
+ className: "mdc-slider__input",
1064
+ name: "rangeStart",
1065
+ type: "range",
1066
+ step: R,
1067
+ min: S,
1068
+ max: I,
1069
+ defaultValue: P,
1070
+ "aria-label": e,
1071
+ "aria-labelledby": n,
1072
+ "aria-valuetext": s,
1073
+ "aria-disabled": h,
1074
+ disabled: h,
1075
+ tabIndex: h ? -1 : "0",
1076
+ readOnly: !0
1077
+ }), /* @__PURE__ */ c.createElement("input", {
1078
+ className: "mdc-slider__input",
1079
+ type: "range",
1080
+ name: "rangeEnd",
1081
+ step: R,
1082
+ min: S,
1083
+ max: I,
1084
+ defaultValue: M,
1085
+ "aria-label": e,
1086
+ "aria-labelledby": n,
1087
+ "aria-valuetext": s,
1088
+ "aria-disabled": h,
1089
+ disabled: h,
1090
+ tabIndex: h ? -1 : "0",
1091
+ readOnly: !0
1092
+ }), /* @__PURE__ */ c.createElement("div", {
1093
+ className: "mdc-slider__track"
1094
+ }, /* @__PURE__ */ c.createElement("div", {
1095
+ className: "mdc-slider__track--inactive"
1096
+ }), /* @__PURE__ */ c.createElement("div", {
1097
+ className: "mdc-slider__track--active"
1098
+ }, /* @__PURE__ */ c.createElement("div", {
1099
+ className: "mdc-slider__track--active_fill"
1100
+ })), v && y && /* @__PURE__ */ c.createElement("div", {
1101
+ className: "mdc-slider__tick-marks"
1102
+ })), b && /* @__PURE__ */ c.createElement("div", {
1103
+ className: "mdc-slider__thumb"
1104
+ }, v && /* @__PURE__ */ c.createElement("div", {
1105
+ className: "mdc-slider__value-indicator-container",
1106
+ "aria-hidden": "true"
1107
+ }, /* @__PURE__ */ c.createElement("div", {
1108
+ className: "mdc-slider__value-indicator"
1109
+ }, /* @__PURE__ */ c.createElement("span", {
1110
+ className: "mdc-slider__value-indicator-text"
1111
+ }, (t = p.current) === null || t === void 0 ? void 0 : t.getValueStart()))), /* @__PURE__ */ c.createElement("div", {
1112
+ className: "mdc-slider__thumb-knob"
1113
+ })), /* @__PURE__ */ c.createElement("div", {
1114
+ className: "mdc-slider__thumb"
1115
+ }, v && /* @__PURE__ */ c.createElement("div", {
1116
+ className: "mdc-slider__value-indicator-container",
1117
+ "aria-hidden": "true"
1118
+ }, /* @__PURE__ */ c.createElement("div", {
1119
+ className: "mdc-slider__value-indicator"
1120
+ }, /* @__PURE__ */ c.createElement("span", {
1121
+ className: "mdc-slider__value-indicator-text"
1122
+ }, (r = p.current) === null || r === void 0 ? void 0 : r.getValue()))), /* @__PURE__ */ c.createElement("div", {
1123
+ className: "mdc-slider__thumb-knob"
1124
+ })))), Tt && /* @__PURE__ */ c.createElement("div", {
1125
+ className: F("lmnt-slider-info", "lmnt-slider-info-trailing", C === "input" && "lmnt-slider-info-with-input", U === "primary" && "lmnt-slider-info--primary", U === "secondary" && "lmnt-slider-info--secondary"),
1126
+ style: ht
1127
+ }, mt));
1128
+ });
1129
+ X.displayName = "Slider";
1130
+ X.propTypes = Mt;
1131
+ X.defaultProps = Pt;
1132
+ const Xt = ({
1133
+ propertyName: m,
1134
+ label: a,
1135
+ minValue: t,
1136
+ maxValue: r,
1137
+ step: e,
1138
+ disabled: n
11
1139
  }) => {
12
- const { control: l } = p();
13
- return /* @__PURE__ */ o(
14
- u,
1140
+ const { control: s } = At();
1141
+ return /* @__PURE__ */ Y(
1142
+ Ct,
15
1143
  {
16
- name: e,
17
- control: l,
18
- render: ({ field: r }) => /* @__PURE__ */ o(
19
- d,
1144
+ name: m,
1145
+ control: s,
1146
+ render: ({ field: d }) => /* @__PURE__ */ Y(
1147
+ X,
20
1148
  {
21
1149
  "data-testid": "slider",
22
- ...r,
23
- onChange: (s) => {
24
- r.onChange(s.value);
25
- },
26
- label: t,
27
- min: n,
28
- max: m,
29
- step: a,
30
- disabled: i
1150
+ ...d,
1151
+ onChange: (h) => {
1152
+ d.onChange(h.value);
1153
+ },
1154
+ label: a,
1155
+ min: t,
1156
+ max: r,
1157
+ step: e,
1158
+ disabled: n
31
1159
  }
32
1160
  )
33
1161
  }
34
1162
  );
35
1163
  };
36
1164
  export {
37
- f as FormSlider
1165
+ Xt as FormSlider
38
1166
  };