@arcgis/common-components 5.2.0-next.162 → 5.2.0-next.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/2ACCLEM5.js +2 -0
- package/dist/cdn/3RQ7JNWY.js +2 -0
- package/dist/cdn/DVU3C66S.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +336 -327
- package/dist/components/arcgis-value-picker/customElement.js +1 -1
- package/dist/components/arcgis-value-picker-label/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/cdn/A3ITL5ME.js +0 -2
- package/dist/cdn/LOHAKHGE.js +0 -2
- package/dist/cdn/VRHSNO7N.js +0 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as ae } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as q } from "lit/directives/keyed.js";
|
|
4
|
-
import { LitElement as ie, createEvent as M, safeClassMap as
|
|
4
|
+
import { LitElement as ie, createEvent as M, safeClassMap as T, safeStyleMap as F, nothing as V } from "@arcgis/lumina";
|
|
5
5
|
import { useDirection as se } from "@arcgis/lumina/controllers";
|
|
6
6
|
import { makeAccessorController as le } from "@arcgis/lumina-toolkit/useAccessor";
|
|
7
7
|
import { classes as oe, getClosestElement as ce } from "@arcgis/toolkit/dom";
|
|
8
8
|
import { slotChangeHasAssignedElement as H } from "@arcgis/toolkit/dom/slots";
|
|
9
|
-
import { css as
|
|
9
|
+
import { css as he, html as w } from "lit";
|
|
10
10
|
import { map as X } from "lit/directives/map.js";
|
|
11
11
|
import { createRef as j, ref as U } from "lit/directives/ref.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as de } from "../../chunks/useT9n.js";
|
|
13
13
|
import { a as ue } from "../../chunks/locale.js";
|
|
14
14
|
import ge from "@arcgis/core/core/Accessor.js";
|
|
15
|
-
import { property as
|
|
15
|
+
import { property as P, subclass as me } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
16
16
|
import { watch as K } from "@arcgis/core/core/reactiveUtils.js";
|
|
17
17
|
import { generateGuid as W } from "@arcgis/toolkit/string";
|
|
18
18
|
const _ = {
|
|
@@ -26,40 +26,40 @@ const _ = {
|
|
|
26
26
|
jumpToEnd: "End",
|
|
27
27
|
confirmEdit: "Enter"
|
|
28
28
|
};
|
|
29
|
-
function Y({ key:
|
|
30
|
-
const i =
|
|
29
|
+
function Y({ key: a, shiftKey: e }, t, n) {
|
|
30
|
+
const i = pe(a);
|
|
31
31
|
if (i == null)
|
|
32
32
|
return null;
|
|
33
|
-
const
|
|
33
|
+
const r = ve(a) || fe(a) && e ? be(t) : 1;
|
|
34
34
|
return {
|
|
35
35
|
direction: n ? i * -1 : i,
|
|
36
|
-
count:
|
|
36
|
+
count: r
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function pe(a) {
|
|
40
|
+
return a === _.increment || a === _.incrementHorizontal || a === _.pageIncrement ? 1 : a === _.decrement || a === _.decrementHorizontal || a === _.pageDecrement ? -1 : null;
|
|
41
41
|
}
|
|
42
|
-
function J(
|
|
43
|
-
return
|
|
42
|
+
function J(a) {
|
|
43
|
+
return a === _.jumpToEnd || a === _.jumpToStart;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
45
|
+
function fe(a) {
|
|
46
|
+
return a === _.increment || a === _.decrement || a === _.decrementHorizontal || a === _.incrementHorizontal;
|
|
47
47
|
}
|
|
48
|
-
function ve(
|
|
49
|
-
return
|
|
48
|
+
function ve(a) {
|
|
49
|
+
return a === _.pageIncrement || a === _.pageDecrement;
|
|
50
50
|
}
|
|
51
|
-
function be(
|
|
52
|
-
const e = Number.isFinite(
|
|
51
|
+
function be(a) {
|
|
52
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
53
53
|
return Math.max(1, e);
|
|
54
54
|
}
|
|
55
|
-
const _e = de`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--arcgis-slider-track-background-color)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:var(--arcgis-internal-slider-track-size);position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:var(--arcgis-internal-slider-label-input-margin)}}}.label-separator{position:absolute;width:1em;height:var(--arcgis-internal-slider-label-input-height);margin:0;padding:0;pointer-events:none;text-align:center;z-index:0}.label-separator:before{content:"—"}:host([layout="horizontal"]) .label-separator{transform:translate(-50%)}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
|
|
56
|
-
var xe = Object.defineProperty, we = Object.getOwnPropertyDescriptor, ee = (
|
|
57
|
-
throw TypeError(
|
|
58
|
-
},
|
|
59
|
-
for (var i = n > 1 ? void 0 : n ? we(e, t) : e,
|
|
60
|
-
(o = r
|
|
55
|
+
const _e = he`:host{display:flex;width:100%;height:100%;font-size:var(--calcite-font-size--2);font-variant-numeric:tabular-nums;--arcgis-slider-dash-length: 5px;--arcgis-slider-handle-size: .875rem;--arcgis-slider-track-background-color: var(--calcite-color-border-2);--arcgis-internal-slider-show-range-labels: 0;--arcgis-internal-slider-show-value-labels: 0;--arcgis-internal-slider-value-labels-placement-start: 0;--arcgis-internal-slider-value-labels-placement-end: 0;--arcgis-internal-slider-range-labels-placement-center: 0;--arcgis-internal-slider-range-labels-placement-end: 0;--arcgis-internal-slider-handle-color: var(--calcite-color-text-3);--arcgis-internal-slider-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-internal-slider-label-input-margin: calc(var(--arcgis-internal-slider-handle-offset) + 4px);--arcgis-internal-slider-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-brand);--arcgis-internal-slider-track-size: 2px}:host([show-range-labels]){--arcgis-internal-slider-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-internal-slider-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-internal-slider-value-labels-placement-start: var(--arcgis-internal-slider-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-internal-slider-value-labels-placement-end: var(--arcgis-internal-slider-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-internal-slider-range-labels-placement-center: var(--arcgis-internal-slider-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-internal-slider-range-labels-placement-end: var(--arcgis-internal-slider-show-range-labels)}:host([disabled]){cursor:default;opacity:var(--calcite-opacity-disabled);pointer-events:none}.content{direction:ltr;flex:1;touch-action:none;user-select:none;display:grid;word-wrap:normal;word-break:normal;padding-block:var(--arcgis-internal-slider-handle-offset)}.track-container{grid-area:track-container;position:relative;display:flex;justify-content:center;align-items:center}.track{touch-action:none;position:relative}.track-bounds{background-color:var(--arcgis-slider-track-background-color)}:host([layout="vertical"]){.track-effective-start{background:repeating-linear-gradient(to bottom,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to top,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}:host([layout="horizontal"]){.track-effective-start{background:repeating-linear-gradient(to right,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}.track-effective-end{background:repeating-linear-gradient(to left,var(--arcgis-slider-track-background-color) 0 var(--arcgis-slider-dash-length),color-mix(in srgb,transparent 75%,var(--arcgis-slider-track-background-color) 25%) var(--arcgis-slider-dash-length) calc(var(--arcgis-slider-dash-length) * 2))}}.track-range-interactive{&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-border-2)}&.filled.active{outline-color:var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}.track-range{background-color:var(--arcgis-internal-slider-track-range-background-color);pointer-events:none}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range-interactive.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range-interactive.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range-interactive.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-internal-slider-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-left:1px;writing-mode:vertical-lr}}.segment{transform-origin:0 0;inset-block-start:0px;block-size:var(--arcgis-internal-slider-track-size);position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;width:2px;height:2px;margin:-1px;position:absolute}.thumb-content{width:0;height:0;position:absolute;top:50%;left:50%}.thumb:focus,.thumb.active{.handle{background-color:var(--calcite-color-brand);box-shadow:0 0 8px #00000029;outline:2px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}}.thumb.labels-only .handle{visibility:hidden;pointer-events:none}.thumb.labels-only{background-color:transparent}.handle{cursor:pointer;box-sizing:border-box;z-index:1;touch-action:none;background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 2px var(--arcgis-internal-slider-handle-color) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--arcgis-internal-slider-transition-duration, var(--calcite-animation-timing, .125s)) ease-in-out;position:absolute;top:calc(var(--arcgis-internal-slider-handle-offset) * -1);left:calc(var(--arcgis-internal-slider-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}:host([layout="vertical"]) .fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) / 1.5);height:calc(var(--arcgis-slider-handle-size) * 1.5);cursor:ns-resize}.fixed-thumb .handle{width:calc(var(--arcgis-slider-handle-size) * 1.5);height:calc(var(--arcgis-slider-handle-size) / 1.5);top:0;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.label{position:absolute;will-change:transform}.min{grid-area:range-start}.max{grid-area:range-end}:host([layout="horizontal"][mirrored][range-labels-placement="center"]),:host([layout="vertical"]:not([mirrored])){.min{grid-area:range-end}.max{grid-area:range-start}}.content-start{grid-area:content-start;display:flex}.content-end{grid-area:content-end;display:flex}:dir(rtl){.content-start,.content-end,.label,.max,.min,.popover{direction:rtl}}:host([layout="vertical"]){.content{grid-template:". range-start range-start range-start ." "content-start content-start track-container content-end content-end" ". range-end range-end range-end .";grid-template-rows:auto 1fr auto;grid-template-columns:1fr auto auto auto 1fr;row-gap:var(--arcgis-internal-slider-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-internal-slider-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-internal-slider-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-internal-slider-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-internal-slider-content-start-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height)) );--arcgis-internal-slider-content-end-min-height: calc( ((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset)) + (var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) );column-gap:calc(var(--arcgis-internal-slider-show-range-labels) * var(--arcgis-internal-slider-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-internal-slider-show-range-labels)) * var(--arcgis-internal-slider-handle-offset));grid-template:". content-start ." "range-start content-start range-end" "range-start track-container range-end" "range-start content-end range-end" ". content-end .";grid-template-columns:auto 1fr auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) var(--arcgis-internal-slider-track-size) calc(var(--arcgis-internal-slider-show-range-labels) * calc(calc(var(--arcgis-internal-slider-label-input-height) / 2) - calc(var(--arcgis-internal-slider-track-size) / 2))) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:var(--arcgis-internal-slider-label-input-margin)}}}.label-separator{position:absolute;width:1em;height:var(--arcgis-internal-slider-label-input-height);margin:0;padding:0;pointer-events:none;text-align:center;z-index:0}.label-separator:before{content:"—"}:host([layout="horizontal"]) .label-separator{transform:translate(-50%)}:host([layout="horizontal"][range-labels-placement="end"]){min-inline-size:min-content;.content{--arcgis-internal-slider-content-start-min-height: calc( var(--arcgis-internal-slider-handle-offset) + var(--arcgis-internal-slider-value-labels-placement-start) * var(--arcgis-internal-slider-label-input-height) );--arcgis-internal-slider-content-end-min-height: calc( var(--arcgis-internal-slider-value-labels-placement-end) * var(--arcgis-internal-slider-label-input-height) );padding-inline:var(--arcgis-internal-slider-handle-offset);grid-template:"content-start content-start content-start" "track-container track-container track-container" "content-end content-end content-end" "content-end content-end content-end" "content-end content-end content-end";grid-template-columns:auto 0 auto;grid-template-rows:minmax(var(--arcgis-internal-slider-content-start-min-height),auto) var(--arcgis-internal-slider-track-size) var(--arcgis-internal-slider-handle-offset) calc(var(--arcgis-internal-slider-range-labels-placement-end) * var(--arcgis-internal-slider-label-input-height)) minmax(var(--arcgis-internal-slider-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-internal-slider-track-size)}&:host([value-labels-placement="start"]){.label,.label-separator{bottom:var(--arcgis-internal-slider-label-input-margin)}}&:host([value-labels-placement="end"]){.label,.label-separator{top:calc(var(--arcgis-internal-slider-label-input-margin) + var(--arcgis-internal-slider-range-labels-placement-end) * (var(--arcgis-internal-slider-label-input-height)))}}.min,.max{--arcgis-internal-slider-range-translation: calc(var(--arcgis-internal-slider-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}}&:host([mirrored]){.min{grid-column:3;margin-right:calc(var(--arcgis-internal-slider-range-translation) * -1)}.max{grid-column:1;margin-left:calc(var(--arcgis-internal-slider-range-translation) * -1)}}}`;
|
|
56
|
+
var xe = Object.defineProperty, we = Object.getOwnPropertyDescriptor, ee = (a) => {
|
|
57
|
+
throw TypeError(a);
|
|
58
|
+
}, E = (a, e, t, n) => {
|
|
59
|
+
for (var i = n > 1 ? void 0 : n ? we(e, t) : e, r = a.length - 1, o; r >= 0; r--)
|
|
60
|
+
(o = a[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
61
61
|
return n && i && xe(e, t, i), i;
|
|
62
|
-
}, te = (
|
|
62
|
+
}, te = (a, e, t) => e.has(a) || ee("Cannot " + t), ye = (a, e, t) => (te(a, e, "read from private field"), e.get(a)), ke = (a, e, t) => e.has(a) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), De = (a, e, t, n) => (te(a, e, "write to private field"), e.set(a, t), t), A;
|
|
63
63
|
function Ie() {
|
|
64
64
|
return {
|
|
65
65
|
min: 0,
|
|
@@ -73,38 +73,38 @@ let k = class extends ge {
|
|
|
73
73
|
// Lifecycle
|
|
74
74
|
//
|
|
75
75
|
//--------------------------------------------------------------------------
|
|
76
|
-
constructor(
|
|
77
|
-
super({ ...Ie(), properties:
|
|
76
|
+
constructor(a = {}) {
|
|
77
|
+
super({ ...Ie(), properties: a }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, ke(this, A);
|
|
78
78
|
}
|
|
79
79
|
startup() {
|
|
80
|
-
const { precision:
|
|
80
|
+
const { precision: a } = this;
|
|
81
81
|
let { min: e, max: t, values: n } = this;
|
|
82
|
-
t = y(t,
|
|
83
|
-
const i = new Map(n?.map((
|
|
82
|
+
t = y(t, a), e = y(e, a), n = n?.map((r) => L(y(r, a), e, t)).sort((r, o) => r - o), this._set("min", e), this._set("max", t), this._set("values", n);
|
|
83
|
+
const i = new Map(n?.map((r) => [W(), r]));
|
|
84
84
|
this._entries = i, K(
|
|
85
85
|
() => this.min,
|
|
86
|
-
(
|
|
86
|
+
(r) => {
|
|
87
87
|
const o = this.values;
|
|
88
|
-
|
|
89
|
-
s <
|
|
88
|
+
r != null && o?.length && o.some((s) => s < r) && (this._entries.forEach((s, l) => {
|
|
89
|
+
s < r && this._entries.set(l, r);
|
|
90
90
|
}), this._updatesValues());
|
|
91
91
|
},
|
|
92
92
|
{ sync: !0 }
|
|
93
93
|
), K(
|
|
94
94
|
() => this.max,
|
|
95
|
-
(
|
|
95
|
+
(r) => {
|
|
96
96
|
const o = this.values;
|
|
97
|
-
|
|
98
|
-
s >
|
|
97
|
+
r != null && o?.length && o.some((s) => s > r) && (this._entries.forEach((s, l) => {
|
|
98
|
+
s > r && this._entries.set(l, r);
|
|
99
99
|
}), this._updatesValues());
|
|
100
100
|
},
|
|
101
101
|
{ sync: !0 }
|
|
102
102
|
), K(
|
|
103
103
|
() => this.precision,
|
|
104
|
-
(
|
|
104
|
+
(r) => {
|
|
105
105
|
const { min: o, max: s, values: l } = this;
|
|
106
|
-
this._set("min", y(o,
|
|
107
|
-
this._entries.set(
|
|
106
|
+
this._set("min", y(o, r)), this._set("max", y(s, r)), l?.length && (this._entries.forEach((c, h) => {
|
|
107
|
+
this._entries.set(h, y(c, r));
|
|
108
108
|
}), this._updatesValues());
|
|
109
109
|
},
|
|
110
110
|
{ sync: !0 }
|
|
@@ -113,42 +113,42 @@ let k = class extends ge {
|
|
|
113
113
|
get entries() {
|
|
114
114
|
return this._entries;
|
|
115
115
|
}
|
|
116
|
-
set max(
|
|
116
|
+
set max(a) {
|
|
117
117
|
if (!this.ready) {
|
|
118
|
-
this._set("max",
|
|
118
|
+
this._set("max", a);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
const e = this._get("max"), t = y(
|
|
121
|
+
const e = this._get("max"), t = y(a, this.precision);
|
|
122
122
|
e !== t && this._set("max", t);
|
|
123
123
|
}
|
|
124
|
-
set min(
|
|
124
|
+
set min(a) {
|
|
125
125
|
if (!this.ready) {
|
|
126
|
-
this._set("min",
|
|
126
|
+
this._set("min", a);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
const e = this._get("min"), t = y(
|
|
129
|
+
const e = this._get("min"), t = y(a, this.precision);
|
|
130
130
|
e !== t && this._set("min", t);
|
|
131
131
|
}
|
|
132
|
-
set values(
|
|
133
|
-
if (ye(this, A) ===
|
|
132
|
+
set values(a) {
|
|
133
|
+
if (ye(this, A) === a)
|
|
134
134
|
return;
|
|
135
|
-
if (De(this, A,
|
|
136
|
-
this._set("values",
|
|
135
|
+
if (De(this, A, a), !this.ready) {
|
|
136
|
+
this._set("values", a);
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
const e = this._get("values");
|
|
140
|
-
if (
|
|
140
|
+
if (a = a?.map((n) => L(y(n, this.precision), this.min, this.max)).sort((n, i) => n - i), e?.length === a?.length && e.every((n, i) => n === a[i]))
|
|
141
141
|
return;
|
|
142
|
-
const t = new Map(
|
|
143
|
-
this._entries = t, this._set("values",
|
|
142
|
+
const t = new Map(a?.map((n) => [W(), n]));
|
|
143
|
+
this._entries = t, this._set("values", a);
|
|
144
144
|
}
|
|
145
145
|
//--------------------------------------------------------------------------
|
|
146
146
|
//
|
|
147
147
|
// Public Methods
|
|
148
148
|
//
|
|
149
149
|
//--------------------------------------------------------------------------
|
|
150
|
-
getValue(
|
|
151
|
-
return this._entries.get(
|
|
150
|
+
getValue(a) {
|
|
151
|
+
return this._entries.get(a);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Updates a thumb [value](#values) based on the provided index. The provided value
|
|
@@ -157,60 +157,60 @@ let k = class extends ge {
|
|
|
157
157
|
*
|
|
158
158
|
* @returns `true` if the value was changed, otherwise `false`.
|
|
159
159
|
*/
|
|
160
|
-
setValue(
|
|
160
|
+
setValue(a, e) {
|
|
161
161
|
if (this.values == null)
|
|
162
162
|
return !1;
|
|
163
|
-
const { min: t, max: n } = this, i = this._entries.get(
|
|
164
|
-
return i ===
|
|
163
|
+
const { min: t, max: n } = this, i = this._entries.get(a), r = L(y(e, this.precision), t, n);
|
|
164
|
+
return i === r ? !1 : (this._entries.set(a, r), this._updatesValues(), !0);
|
|
165
165
|
}
|
|
166
|
-
setValues(
|
|
166
|
+
setValues(a) {
|
|
167
167
|
if (this.values == null)
|
|
168
168
|
return !1;
|
|
169
169
|
let e = !1;
|
|
170
170
|
const { min: t, max: n } = this;
|
|
171
|
-
for (const [i,
|
|
172
|
-
const o = this._entries.get(i), s = L(y(
|
|
171
|
+
for (const [i, r] of a) {
|
|
172
|
+
const o = this._entries.get(i), s = L(y(r, this.precision), t, n);
|
|
173
173
|
o !== s && (e = !0, this._entries.set(i, s));
|
|
174
174
|
}
|
|
175
175
|
return e ? (this._updatesValues(), !0) : !1;
|
|
176
176
|
}
|
|
177
177
|
_updatesValues() {
|
|
178
|
-
const
|
|
179
|
-
this._set("values",
|
|
178
|
+
const a = Array.from(this._entries.values()).sort((e, t) => e - t);
|
|
179
|
+
this._set("values", a);
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
182
|
A = /* @__PURE__ */ new WeakMap();
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
E([
|
|
184
|
+
P()
|
|
185
185
|
], k.prototype, "_entries", 2);
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
E([
|
|
187
|
+
P({ readOnly: !0 })
|
|
188
188
|
], k.prototype, "entries", 1);
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
E([
|
|
190
|
+
P()
|
|
191
191
|
], k.prototype, "max", 1);
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
E([
|
|
193
|
+
P()
|
|
194
194
|
], k.prototype, "min", 1);
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
E([
|
|
196
|
+
P({ cast: (a) => L(a, 0, 20) })
|
|
197
197
|
], k.prototype, "precision", 2);
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
E([
|
|
199
|
+
P({ readOnly: !0 })
|
|
200
200
|
], k.prototype, "ready", 2);
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
E([
|
|
202
|
+
P()
|
|
203
203
|
], k.prototype, "values", 1);
|
|
204
|
-
k =
|
|
204
|
+
k = E([
|
|
205
205
|
me("esri.widgets.Slider.SliderData")
|
|
206
206
|
], k);
|
|
207
|
-
function L(
|
|
208
|
-
return Math.min(Math.max(
|
|
207
|
+
function L(a, e, t) {
|
|
208
|
+
return Math.min(Math.max(a, e), t);
|
|
209
209
|
}
|
|
210
|
-
function y(
|
|
211
|
-
return Number.parseFloat(
|
|
210
|
+
function y(a, e) {
|
|
211
|
+
return Number.parseFloat(a.toFixed(e));
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class Ee {
|
|
214
214
|
constructor(e) {
|
|
215
215
|
this.steps = e, this.minIndex = 0, this.maxIndex = this.steps.length - 1;
|
|
216
216
|
}
|
|
@@ -220,7 +220,7 @@ class Ve {
|
|
|
220
220
|
valueToIndex(e) {
|
|
221
221
|
const t = this.steps.indexOf(e);
|
|
222
222
|
return t !== -1 ? t : this.steps.reduce(
|
|
223
|
-
(n, i,
|
|
223
|
+
(n, i, r, o) => Math.abs(i - e) < Math.abs(o[n] - e) ? r : n,
|
|
224
224
|
0
|
|
225
225
|
);
|
|
226
226
|
}
|
|
@@ -229,19 +229,19 @@ class Ve {
|
|
|
229
229
|
return [];
|
|
230
230
|
const n = [];
|
|
231
231
|
for (let i = this.minIndex; i <= this.maxIndex; i++) {
|
|
232
|
-
const
|
|
232
|
+
const r = this.indexToValue(i), o = Math.abs(r - e);
|
|
233
233
|
let s = !1;
|
|
234
234
|
for (let l = 0; l < n.length; l++)
|
|
235
235
|
if (o < n[l].dist) {
|
|
236
|
-
n.splice(l, 0, { idx: i, value:
|
|
236
|
+
n.splice(l, 0, { idx: i, value: r, dist: o }), s = !0;
|
|
237
237
|
break;
|
|
238
238
|
}
|
|
239
|
-
!s && n.length < t && n.push({ idx: i, value:
|
|
239
|
+
!s && n.length < t && n.push({ idx: i, value: r, dist: o }), n.length > t && (n.length = t);
|
|
240
240
|
}
|
|
241
241
|
return n;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
class
|
|
244
|
+
class Pe {
|
|
245
245
|
constructor(e, t, n) {
|
|
246
246
|
this.min = e, this.max = t, this.stepSize = n, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
|
|
247
247
|
}
|
|
@@ -254,254 +254,254 @@ class Ee {
|
|
|
254
254
|
getClosestStepDistances(e, t) {
|
|
255
255
|
if (t <= 0)
|
|
256
256
|
return [];
|
|
257
|
-
const n = [], i = this.minIndex,
|
|
257
|
+
const n = [], i = this.minIndex, r = this.maxIndex, s = (I(e, this.min, this.max) - this.min) / this.stepSize;
|
|
258
258
|
let l = Math.floor(s), c = l + 1;
|
|
259
|
-
for (; n.length < t && (l >= i || c <=
|
|
259
|
+
for (; n.length < t && (l >= i || c <= r); ) {
|
|
260
260
|
if (l < i) {
|
|
261
|
-
const
|
|
262
|
-
n.push({ idx: c, value:
|
|
261
|
+
const g = this.indexToValue(c);
|
|
262
|
+
n.push({ idx: c, value: g, dist: Math.abs(g - e) }), c++;
|
|
263
263
|
continue;
|
|
264
264
|
}
|
|
265
|
-
if (c >
|
|
266
|
-
const
|
|
267
|
-
n.push({ idx: l, value:
|
|
265
|
+
if (c > r) {
|
|
266
|
+
const g = this.indexToValue(l);
|
|
267
|
+
n.push({ idx: l, value: g, dist: Math.abs(g - e) }), l--;
|
|
268
268
|
continue;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
271
|
-
|
|
270
|
+
const h = this.indexToValue(l), u = this.indexToValue(c), d = Math.abs(h - e), p = Math.abs(u - e);
|
|
271
|
+
d <= p ? (n.push({ idx: l, value: h, dist: d }), l--) : (n.push({ idx: c, value: u, dist: p }), c++);
|
|
272
272
|
}
|
|
273
273
|
return n;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
function Ce(
|
|
277
|
-
if (
|
|
276
|
+
function Ce(a) {
|
|
277
|
+
if (a.steps == null)
|
|
278
278
|
return null;
|
|
279
|
-
const e =
|
|
280
|
-
return Array.isArray(e) ? e.length === 0 ? null : new
|
|
279
|
+
const e = a.steps;
|
|
280
|
+
return Array.isArray(e) ? e.length === 0 ? null : new Ee(e) : e <= 0 ? null : new Pe(a.min, a.max, e);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
if (
|
|
282
|
+
function Ve(a, e, t) {
|
|
283
|
+
if (a == null) {
|
|
284
284
|
const s = /* @__PURE__ */ new Map();
|
|
285
285
|
for (const [l, c] of e.entries())
|
|
286
286
|
s.set(l, c + t);
|
|
287
287
|
return s;
|
|
288
288
|
}
|
|
289
289
|
const n = e.size, i = Array.from(e.entries()).map(([s, l]) => {
|
|
290
|
-
const c = l + t,
|
|
291
|
-
return { uuid: s, stepDistances:
|
|
292
|
-
}),
|
|
290
|
+
const c = l + t, h = a.getClosestStepDistances(c, n);
|
|
291
|
+
return { uuid: s, stepDistances: h };
|
|
292
|
+
}), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
293
293
|
i.sort((s, l) => s.stepDistances[0].dist - l.stepDistances[0].dist);
|
|
294
294
|
for (const s of i) {
|
|
295
|
-
const l = s.stepDistances.find((c) => !
|
|
296
|
-
l ? (
|
|
295
|
+
const l = s.stepDistances.find((c) => !r.has(c.idx));
|
|
296
|
+
l ? (r.add(l.idx), o.set(s.uuid, l.value)) : o.set(s.uuid, e.get(s.uuid));
|
|
297
297
|
}
|
|
298
298
|
return o;
|
|
299
299
|
}
|
|
300
|
-
function O(
|
|
301
|
-
const { allowValuesOverlap:
|
|
302
|
-
let
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
if (!
|
|
300
|
+
function O(a, e, t, n, i) {
|
|
301
|
+
const { allowValuesOverlap: r, precision: o, min: s, max: l } = i, c = e.get(t) ?? 0, h = c + n, u = n >= 0 ? -1 : 1;
|
|
302
|
+
let d, p, g;
|
|
303
|
+
if (a) {
|
|
304
|
+
const f = /* @__PURE__ */ new Set();
|
|
305
|
+
if (!r)
|
|
306
306
|
for (const [v, x] of e.entries())
|
|
307
|
-
v !== t &&
|
|
308
|
-
const b =
|
|
309
|
-
b.sort((v, x) =>
|
|
310
|
-
let
|
|
311
|
-
|
|
307
|
+
v !== t && f.add(a.valueToIndex(x));
|
|
308
|
+
const b = a.getClosestStepDistances(h, e.size + 1);
|
|
309
|
+
b.sort((v, x) => $(v.dist, o) - $(x.dist, o) || u * (x.value - v.value));
|
|
310
|
+
let m = 0;
|
|
311
|
+
d = b[m].value, g = (v) => !r && f.has(a.valueToIndex(v)), p = () => (m++, b[m]?.value);
|
|
312
312
|
} else {
|
|
313
|
-
const
|
|
314
|
-
for (const [
|
|
315
|
-
|
|
313
|
+
const f = /* @__PURE__ */ new Set();
|
|
314
|
+
for (const [m, v] of e.entries())
|
|
315
|
+
m !== t && f.add($(v, o));
|
|
316
316
|
const b = 1 / Math.pow(10, o);
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
return
|
|
317
|
+
d = I($(h, o), s, l), g = (m) => !r && f.has(m), p = () => {
|
|
318
|
+
const m = $(d + u * b, o);
|
|
319
|
+
return m === d || m < s || m > l ? void 0 : m;
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
if (!
|
|
323
|
-
return
|
|
322
|
+
if (!g(d))
|
|
323
|
+
return d;
|
|
324
324
|
for (; ; ) {
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
325
|
+
const f = p();
|
|
326
|
+
if (f === void 0)
|
|
327
327
|
return c;
|
|
328
|
-
if (
|
|
329
|
-
return
|
|
328
|
+
if (d = f, !g(d))
|
|
329
|
+
return d;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
return Number.parseFloat(
|
|
332
|
+
function $(a, e) {
|
|
333
|
+
return Number.parseFloat(a.toFixed(e));
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Re(a, e, t, n = 1) {
|
|
336
336
|
const i = ne(n);
|
|
337
|
-
let
|
|
337
|
+
let r = e, o = !1;
|
|
338
338
|
for (let s = 0; s < i; s++) {
|
|
339
|
-
const l =
|
|
340
|
-
if (o ||= l.changed,
|
|
339
|
+
const l = $e(a, r, t);
|
|
340
|
+
if (o ||= l.changed, r = l.entries, !l.changed)
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
|
-
return { changed: o, entries:
|
|
343
|
+
return { changed: o, entries: r };
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
const
|
|
347
|
-
if (
|
|
348
|
-
return N(
|
|
345
|
+
function Te(a, e, t, n, i = 1) {
|
|
346
|
+
const r = ne(i);
|
|
347
|
+
if (r === 1)
|
|
348
|
+
return N(a, e, t, n);
|
|
349
349
|
const o = new Map(e);
|
|
350
350
|
let s = o.get(t);
|
|
351
|
-
for (let l = 0; l <
|
|
352
|
-
const c = N(
|
|
351
|
+
for (let l = 0; l < r; l++) {
|
|
352
|
+
const c = N(a, o, t, n);
|
|
353
353
|
if (c === s)
|
|
354
354
|
break;
|
|
355
355
|
s = c, o.set(t, s);
|
|
356
356
|
}
|
|
357
357
|
return s;
|
|
358
358
|
}
|
|
359
|
-
function ne(
|
|
360
|
-
const e = Number.isFinite(
|
|
359
|
+
function ne(a) {
|
|
360
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
361
361
|
return Math.max(1, e);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
const n = /* @__PURE__ */ new Map(), i = t > 0 ? Le :
|
|
363
|
+
function $e(a, e, t) {
|
|
364
|
+
const n = /* @__PURE__ */ new Map(), i = t > 0 ? Le : re, r = Array.from(e).sort((l, c) => i(l[1], c[1]));
|
|
365
365
|
let o = !1, s = !0;
|
|
366
|
-
for (const [l, c] of
|
|
366
|
+
for (const [l, c] of r)
|
|
367
367
|
if (n.set(l, c), s) {
|
|
368
|
-
const
|
|
369
|
-
c ===
|
|
368
|
+
const h = N(a, n, l, t);
|
|
369
|
+
c === h && (s = !1), o ||= s, n.set(l, h);
|
|
370
370
|
}
|
|
371
371
|
return { changed: o, entries: n };
|
|
372
372
|
}
|
|
373
|
-
function N(
|
|
374
|
-
const { allowValuesOverlap: i, stepsProvider:
|
|
375
|
-
if (n = n > 0 ? 1 : -1, !
|
|
376
|
-
let
|
|
373
|
+
function N(a, e, t, n) {
|
|
374
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
375
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
376
|
+
let m = I(c + n * o, s, l);
|
|
377
377
|
if (i)
|
|
378
|
-
return
|
|
378
|
+
return m;
|
|
379
379
|
const v = /* @__PURE__ */ new Set();
|
|
380
380
|
for (const [x, D] of e)
|
|
381
381
|
x !== t && v.add(D);
|
|
382
|
-
for (; v.has(
|
|
383
|
-
const x =
|
|
384
|
-
if (
|
|
382
|
+
for (; v.has(m) && m <= l && m >= s; ) {
|
|
383
|
+
const x = m;
|
|
384
|
+
if (m = I(m + n * o, s, l), m === x)
|
|
385
385
|
return c;
|
|
386
386
|
}
|
|
387
|
-
return v.has(
|
|
387
|
+
return v.has(m) || m > l || m < s ? c : m;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
if (
|
|
389
|
+
const h = r.valueToIndex(c);
|
|
390
|
+
if (h === -1)
|
|
391
391
|
return c;
|
|
392
392
|
if (i) {
|
|
393
|
-
const
|
|
394
|
-
return
|
|
393
|
+
const m = I(h + n, r.minIndex, r.maxIndex);
|
|
394
|
+
return r.indexToValue(m);
|
|
395
395
|
}
|
|
396
396
|
const u = /* @__PURE__ */ new Set();
|
|
397
|
-
for (const [
|
|
398
|
-
|
|
399
|
-
let
|
|
400
|
-
const
|
|
397
|
+
for (const [m, v] of e)
|
|
398
|
+
m !== t && u.add(r.valueToIndex(v));
|
|
399
|
+
let d = h, p = !1;
|
|
400
|
+
const g = r.minIndex, f = r.maxIndex;
|
|
401
401
|
let b = 0;
|
|
402
|
-
for (; b < Math.abs(
|
|
403
|
-
if (!u.has(
|
|
404
|
-
|
|
402
|
+
for (; b < Math.abs(f - g) && (d += n, !(d < g || d > f)); ) {
|
|
403
|
+
if (!u.has(d)) {
|
|
404
|
+
p = !0;
|
|
405
405
|
break;
|
|
406
406
|
}
|
|
407
407
|
b++;
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return p ? r.indexToValue(d) : c;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
const { allowValuesOverlap: i, stepsProvider:
|
|
413
|
-
if (n = n > 0 ? 1 : -1, !
|
|
414
|
-
const
|
|
415
|
-
Array.from(e).filter(([
|
|
411
|
+
function Se(a, e, t, n) {
|
|
412
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
413
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
414
|
+
const p = new Set(
|
|
415
|
+
Array.from(e).filter(([f]) => f !== t).map(([, f]) => f)
|
|
416
416
|
);
|
|
417
|
-
let
|
|
417
|
+
let g = n > 0 ? l : s;
|
|
418
418
|
if (i)
|
|
419
|
-
return
|
|
420
|
-
for (;
|
|
421
|
-
if (
|
|
422
|
-
|
|
419
|
+
return g;
|
|
420
|
+
for (; p.has(g); )
|
|
421
|
+
if (g -= n * o, n > 0 && g > l || n < 0 && g < s) {
|
|
422
|
+
g = c;
|
|
423
423
|
break;
|
|
424
424
|
}
|
|
425
|
-
return
|
|
425
|
+
return g;
|
|
426
426
|
}
|
|
427
427
|
if (i)
|
|
428
|
-
return n > 0 ?
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
428
|
+
return n > 0 ? r.indexToValue(r.maxIndex) : r.indexToValue(r.minIndex);
|
|
429
|
+
const h = r.valueToIndex(c);
|
|
430
|
+
if (h === -1)
|
|
431
431
|
return c;
|
|
432
432
|
const u = new Set(
|
|
433
|
-
Array.from(e).filter(([
|
|
433
|
+
Array.from(e).filter(([p]) => p !== t).map(([, p]) => r.valueToIndex(p))
|
|
434
434
|
);
|
|
435
|
-
let
|
|
436
|
-
for (; u.has(
|
|
437
|
-
if (
|
|
438
|
-
|
|
435
|
+
let d = n > 0 ? r.maxIndex : r.minIndex;
|
|
436
|
+
for (; u.has(d); )
|
|
437
|
+
if (d -= n, n > 0 && d > l || n < 0 && d < s) {
|
|
438
|
+
d = h;
|
|
439
439
|
break;
|
|
440
440
|
}
|
|
441
|
-
return
|
|
441
|
+
return r.indexToValue(d);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
const { stepsProvider: n, min: i, max:
|
|
443
|
+
function ze(a, e, t) {
|
|
444
|
+
const { stepsProvider: n, min: i, max: r } = a, o = /* @__PURE__ */ new Map(), s = Array.from(e).sort((c, h) => re(c[1], h[1]));
|
|
445
445
|
if (n) {
|
|
446
446
|
let c = 0;
|
|
447
447
|
if (t > 0) {
|
|
448
|
-
const
|
|
448
|
+
const h = s[s.length - 1], u = n.valueToIndex(h[1]);
|
|
449
449
|
c = n.maxIndex - u;
|
|
450
450
|
} else {
|
|
451
|
-
const
|
|
451
|
+
const h = s[0], u = n.valueToIndex(h[1]);
|
|
452
452
|
c = n.minIndex - u;
|
|
453
453
|
}
|
|
454
454
|
if (c === 0)
|
|
455
|
-
for (const [
|
|
456
|
-
o.set(
|
|
457
|
-
for (const [
|
|
458
|
-
const
|
|
459
|
-
o.set(
|
|
455
|
+
for (const [h, u] of s)
|
|
456
|
+
o.set(h, u);
|
|
457
|
+
for (const [h, u] of s) {
|
|
458
|
+
const d = n.indexToValue(n.valueToIndex(u) + c);
|
|
459
|
+
o.set(h, d);
|
|
460
460
|
}
|
|
461
461
|
return o;
|
|
462
462
|
}
|
|
463
463
|
let l = 0;
|
|
464
464
|
if (t > 0) {
|
|
465
465
|
const c = s[s.length - 1];
|
|
466
|
-
l =
|
|
466
|
+
l = r - c[1];
|
|
467
467
|
} else {
|
|
468
468
|
const c = s[0];
|
|
469
469
|
l = i - c[1];
|
|
470
470
|
}
|
|
471
|
-
for (const [c,
|
|
472
|
-
o.set(c,
|
|
471
|
+
for (const [c, h] of s)
|
|
472
|
+
o.set(c, h + l);
|
|
473
473
|
return o;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
475
|
+
function re(a, e) {
|
|
476
|
+
return a - e;
|
|
477
477
|
}
|
|
478
|
-
function Le(
|
|
479
|
-
return e -
|
|
478
|
+
function Le(a, e) {
|
|
479
|
+
return e - a;
|
|
480
480
|
}
|
|
481
|
-
function I(
|
|
482
|
-
return Math.max(e, Math.min(t,
|
|
481
|
+
function I(a, e, t) {
|
|
482
|
+
return Math.max(e, Math.min(t, a));
|
|
483
483
|
}
|
|
484
484
|
const Me = le(k);
|
|
485
485
|
class Fe extends ie {
|
|
486
486
|
constructor() {
|
|
487
|
-
super(...arguments), this._direction = se(), this._stepsProvider = null, this._popoverElement = j(), this._trackElement = j(), this.messages =
|
|
487
|
+
super(...arguments), this._direction = se(), this._stepsProvider = null, this._popoverElement = j(), this._trackElement = j(), this.messages = de({}), this._onPointerMoveDragUpdate = (e) => {
|
|
488
488
|
this._updateDrag(this._mapEventToRange(e));
|
|
489
489
|
}, this._onPointerUpDragEnd = (e) => {
|
|
490
|
-
|
|
490
|
+
z(e) && this._endDrag();
|
|
491
491
|
}, this._onPointerCancelDragEnd = () => {
|
|
492
492
|
this._endDrag();
|
|
493
493
|
}, this._formatLabel = (e, t, n) => {
|
|
494
|
-
const i = ue(this.messages._lang, t),
|
|
495
|
-
if (!
|
|
494
|
+
const i = ue(this.messages._lang, t), r = this.labelFormatter;
|
|
495
|
+
if (!r)
|
|
496
496
|
return i.format(n);
|
|
497
|
-
const o =
|
|
497
|
+
const o = r(n, e, (s) => i.format(s));
|
|
498
498
|
return o ?? i.format(n);
|
|
499
499
|
}, this._numberFormatOptions = {}, this._createFormatter = (e, t) => this._formatLabel.bind(this, e, t), this._minFormatter = this._createFormatter("min", this._numberFormatOptions), this._maxFormatter = this._createFormatter("max", this._numberFormatOptions), this._valueFormatter = this._createFormatter("value", this._numberFormatOptions), this._resizeObserver = new ResizeObserver(() => {
|
|
500
500
|
this._layoutLabelInputs(), this._updatePopoverReferenceElement();
|
|
501
|
-
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._measurablePopoverReferenceElement = "", this._activePart = null, this._sliderData = Me(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
|
|
501
|
+
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._measurablePopoverReferenceElement = "", this._nextPopoverReferenceElement = null, this._activePart = null, this._sliderData = Me(this), this.allowValuesOverlap = !1, this.autoDestroyDisabled = !1, this.disabled = !1, this.fillPlacement = "start", this.layout = "horizontal", this.max = this._sliderData.max, this.min = this._sliderData.min, this.mirrored = !1, this.popoverDisplay = "auto", this.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, this.valuesDraggingDisabled = !1, this.rangeLabelsEditingEnabled = !1, this.rangeLabelsPlacement = "center", this.segmentsDraggingDisabled = !1, this.showRangeLabels = !1, this.valueLabelsDisplay = "hidden", this.valueLabelsPlacement = "start", this.valueLabelsEditingEnabled = !1, this.keyboardLargeStep = 10, this.values = this._sliderData.values, this.arcgisActiveValueChange = M({ cancelable: !1 }), this.arcgisChange = M({ cancelable: !1 }), this.arcgisInput = M({ cancelable: !1 }), this.arcgisRangeChange = M({ cancelable: !1 });
|
|
502
502
|
}
|
|
503
503
|
static {
|
|
504
|
-
this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _measurablePopoverReferenceElement: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
|
|
504
|
+
this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 16, _measurablePopoverReferenceElement: 16, _nextPopoverReferenceElement: 16, _activePart: 16, _sliderData: 16, activeValue: 32, allowValuesOverlap: 5, autoDestroyDisabled: 5, disabled: 7, fullRangeMax: 11, fullRangeMin: 11, fillPlacement: 1, labelFormatter: 0, layout: 3, max: 11, min: 11, mirrored: 7, popoverDisplay: 1, popoverLabel: 1, popoverPlacement: 3, precision: 11, valuesDraggingDisabled: 7, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
|
|
505
505
|
fromAttribute(e) {
|
|
506
506
|
if (e.includes(","))
|
|
507
507
|
return e.split(",").filter((n) => n.trim() !== "").map(parseFloat).filter((n) => Number.isFinite(n));
|
|
@@ -598,59 +598,59 @@ class Fe extends ie {
|
|
|
598
598
|
const n = this._trackElement.value;
|
|
599
599
|
if (!n)
|
|
600
600
|
return;
|
|
601
|
-
const i = n.getBoundingClientRect(),
|
|
601
|
+
const i = n.getBoundingClientRect(), r = [], o = this.isHorizontal;
|
|
602
602
|
for (const s of this._sliderData.entries.keys()) {
|
|
603
603
|
const l = this._activePart === "range" || this._activePart === s;
|
|
604
604
|
if (this.valueLabelsDisplay === "always" || l) {
|
|
605
|
-
const
|
|
606
|
-
if (!
|
|
605
|
+
const h = Ae(this, s), u = Z(this, s);
|
|
606
|
+
if (!h || !u)
|
|
607
607
|
continue;
|
|
608
|
-
const
|
|
608
|
+
const d = h.getBoundingClientRect(), p = o ? d.left + d.width / 2 : d.top + d.height / 2;
|
|
609
609
|
if (o) {
|
|
610
|
-
const
|
|
611
|
-
let v =
|
|
612
|
-
const x = i.left - b, D = i.right + b, C =
|
|
610
|
+
const g = u.getBoundingClientRect(), f = u.getLabelBoundingClientRect(), b = d.width / 2, m = Math.round(f.width / 2);
|
|
611
|
+
let v = g.width / 2;
|
|
612
|
+
const x = i.left - b, D = i.right + b, C = p - m, G = p + m;
|
|
613
613
|
C < x ? v += C - x : G > D && (v += G - D), u.style.transform = `translateX(${-Math.round(v)}px)`;
|
|
614
614
|
} else
|
|
615
615
|
u.style.removeProperty("transform");
|
|
616
|
-
|
|
617
|
-
handleBounds:
|
|
618
|
-
handleCenter:
|
|
616
|
+
r.push({
|
|
617
|
+
handleBounds: d,
|
|
618
|
+
handleCenter: p,
|
|
619
619
|
labelInput: u
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
this._layoutCollidingLabelInputs(
|
|
623
|
+
this._layoutCollidingLabelInputs(r);
|
|
624
624
|
}
|
|
625
625
|
_layoutCollidingLabelInputs(e) {
|
|
626
626
|
const t = this.isHorizontal, n = Array.from(this.renderRoot.querySelectorAll(".label-separator")), i = e.slice().sort((s, l) => s.handleCenter - l.handleCenter);
|
|
627
627
|
if (i.length === 0)
|
|
628
628
|
return;
|
|
629
|
-
const
|
|
629
|
+
const r = this._trackElement.value?.getBoundingClientRect(), o = i.map((s) => [s]);
|
|
630
630
|
for (let s = 0; s < i.length; s++) {
|
|
631
631
|
for (const c of n)
|
|
632
632
|
c.hidden = !0, c.style.removeProperty("left");
|
|
633
633
|
let l = 0;
|
|
634
634
|
for (const c of o) {
|
|
635
|
-
const
|
|
636
|
-
let
|
|
637
|
-
if (
|
|
638
|
-
const
|
|
635
|
+
const h = (c[0].handleCenter + c[c.length - 1].handleCenter) / 2, u = c.reduce((p, g) => p + (t ? g.labelInput.getBoundingClientRect().width : g.labelInput.getBoundingClientRect().height), 0);
|
|
636
|
+
let d = c.length === 1 ? t ? c[0].labelInput.getBoundingClientRect().left : c[0].labelInput.getBoundingClientRect().top : h - u / 2;
|
|
637
|
+
if (r && c.length > 1) {
|
|
638
|
+
const p = c[0], g = c[c.length - 1];
|
|
639
639
|
if (t) {
|
|
640
|
-
const
|
|
641
|
-
|
|
640
|
+
const f = p.labelInput.getLabelBoundingClientRect().left - p.labelInput.getBoundingClientRect().left, b = g.labelInput.getBoundingClientRect().right - g.labelInput.getLabelBoundingClientRect().right, m = r.left - p.handleBounds.width / 2 - f, v = r.right + g.handleBounds.width / 2 + b - u;
|
|
641
|
+
d = R(d, m, v);
|
|
642
642
|
} else {
|
|
643
|
-
const
|
|
644
|
-
|
|
643
|
+
const f = p.labelInput.getBoundingClientRect().height / 2, b = g.labelInput.getBoundingClientRect().height / 2, m = r.top - f, v = r.bottom + b - u;
|
|
644
|
+
d = R(d, m, v);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
for (let
|
|
648
|
-
const
|
|
649
|
-
if (
|
|
647
|
+
for (let p = 0; p < c.length; p++) {
|
|
648
|
+
const g = c[p], f = g.labelInput.getBoundingClientRect(), b = t ? f.width : f.height, m = (t ? f.left : f.top) + b / 2, v = this._getLabelTranslate(g.labelInput, t), x = d + b / 2, D = `${t ? "translateX" : "translateY"}(${Math.round(v + x - m)}px)`;
|
|
649
|
+
if (g.labelInput.style.transform !== D && (g.labelInput.style.transform = D), d += b, t && p < c.length - 1) {
|
|
650
650
|
const C = n[l++];
|
|
651
651
|
if (!C)
|
|
652
652
|
continue;
|
|
653
|
-
C.hidden = !1, C.style.left = `${
|
|
653
|
+
C.hidden = !1, C.style.left = `${d - (r?.left ?? 0)}px`;
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
}
|
|
@@ -661,11 +661,11 @@ class Fe extends ie {
|
|
|
661
661
|
_mergeCollidingLabelGroups(e) {
|
|
662
662
|
const t = this.isHorizontal;
|
|
663
663
|
for (let n = 0; n < e.length - 1; ) {
|
|
664
|
-
const i = e[n],
|
|
665
|
-
if ((t ? c.left : c.top) >
|
|
664
|
+
const i = e[n], r = e[n + 1], o = i[i.length - 1], s = r[0], l = o.labelInput.getBoundingClientRect(), c = s.labelInput.getBoundingClientRect(), h = t ? l.right : l.bottom;
|
|
665
|
+
if ((t ? c.left : c.top) > h)
|
|
666
666
|
n++;
|
|
667
667
|
else
|
|
668
|
-
return i.push(...
|
|
668
|
+
return i.push(...r), e.splice(n + 1, 1), !0;
|
|
669
669
|
}
|
|
670
670
|
return !1;
|
|
671
671
|
}
|
|
@@ -680,21 +680,21 @@ class Fe extends ie {
|
|
|
680
680
|
this._setActivePart(null);
|
|
681
681
|
}
|
|
682
682
|
_onTrackRangePointerDown(e) {
|
|
683
|
-
this._disabledOrInvalid || !
|
|
683
|
+
this._disabledOrInvalid || !z(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
|
|
684
684
|
}
|
|
685
685
|
async _onPointerDown(e) {
|
|
686
|
-
if (this._disabledOrInvalid || !
|
|
686
|
+
if (this._disabledOrInvalid || !z(e))
|
|
687
687
|
return;
|
|
688
688
|
const t = this.renderRoot.querySelector("arcgis-label-input[editing]");
|
|
689
689
|
if (e.target === t)
|
|
690
690
|
return;
|
|
691
691
|
if (t) {
|
|
692
|
-
t.blur(), this._focusEntry(
|
|
692
|
+
t.blur(), this._focusEntry(S(t));
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
695
|
if (Oe(e.target) || this.values?.length > 1)
|
|
696
696
|
return;
|
|
697
|
-
const n = this._mapEventToRange(e), [i,
|
|
697
|
+
const n = this._mapEventToRange(e), [i, r] = this._sliderData.entries.entries().next().value, o = n * this._fullRange + this._fullMin - r, s = B(this._fullMin, this._fullMax, r) / 100;
|
|
698
698
|
this._startDrag(i, s);
|
|
699
699
|
const l = O(this._stepsProvider, this._sliderData.entries, i, o, {
|
|
700
700
|
allowValuesOverlap: this.allowValuesOverlap,
|
|
@@ -705,14 +705,14 @@ class Fe extends ie {
|
|
|
705
705
|
this._setValue(i, l), this._focusEntry(i);
|
|
706
706
|
}
|
|
707
707
|
_onThumbPointerDown(e) {
|
|
708
|
-
const t =
|
|
709
|
-
if (!
|
|
708
|
+
const t = S(e.currentTarget);
|
|
709
|
+
if (!z(e) || this._disabledOrInvalid || !t)
|
|
710
710
|
return;
|
|
711
711
|
const n = Z(this, t);
|
|
712
712
|
e.target === n && n?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
|
|
713
713
|
}
|
|
714
714
|
_onFixedThumbPointerDown(e) {
|
|
715
|
-
this._disabledOrInvalid || !
|
|
715
|
+
this._disabledOrInvalid || !z(e) || (e.preventDefault(), e.currentTarget.focus());
|
|
716
716
|
}
|
|
717
717
|
_endDrag() {
|
|
718
718
|
if (this._disabledOrInvalid)
|
|
@@ -732,12 +732,12 @@ class Fe extends ie {
|
|
|
732
732
|
_startDrag(e, t) {
|
|
733
733
|
if (this._disabledOrInvalid)
|
|
734
734
|
return;
|
|
735
|
-
const { min: n, max: i, values:
|
|
735
|
+
const { min: n, max: i, values: r } = this;
|
|
736
736
|
let o = n, s = i;
|
|
737
737
|
if (this._setActivePart(e), e === "range") {
|
|
738
738
|
if (this.segmentsDraggingDisabled)
|
|
739
739
|
return;
|
|
740
|
-
o = n -
|
|
740
|
+
o = n - r[0], s = i - r[r.length - 1];
|
|
741
741
|
}
|
|
742
742
|
this._dragInfo = {
|
|
743
743
|
position: t,
|
|
@@ -749,13 +749,13 @@ class Fe extends ie {
|
|
|
749
749
|
_updateDrag(e) {
|
|
750
750
|
if (!this._dragInfo || !this._activePart)
|
|
751
751
|
return;
|
|
752
|
-
const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff:
|
|
752
|
+
const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff: r, maxDiff: o } } = this;
|
|
753
753
|
if (n === e)
|
|
754
754
|
return;
|
|
755
755
|
let s = (e - n) * this._fullRange;
|
|
756
756
|
if (t === "range") {
|
|
757
|
-
s = Math.min(o, Math.max(
|
|
758
|
-
const l =
|
|
757
|
+
s = Math.min(o, Math.max(r, s));
|
|
758
|
+
const l = Ve(this._stepsProvider, i, s);
|
|
759
759
|
this._setValues(l);
|
|
760
760
|
} else {
|
|
761
761
|
const l = O(this._stepsProvider, i, t, s, {
|
|
@@ -783,24 +783,24 @@ class Fe extends ie {
|
|
|
783
783
|
this._sliderData.setValue(e, t) && (this._dragInfo || this.arcgisChange.emit(), this.arcgisInput.emit());
|
|
784
784
|
}
|
|
785
785
|
_resolveOverlappingValues() {
|
|
786
|
-
const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i,
|
|
786
|
+
const e = new Map(this._sliderData.entries), t = Array.from(e.entries()).sort((i, r) => i[1] - r[1]);
|
|
787
787
|
let n = !1;
|
|
788
|
-
for (const [i,
|
|
789
|
-
const o =
|
|
790
|
-
if (!Array.from(e).some(([c,
|
|
788
|
+
for (const [i, r] of t) {
|
|
789
|
+
const o = R(r, this.min, this.max);
|
|
790
|
+
if (!Array.from(e).some(([c, h]) => c !== i && R(h, this.min, this.max) === o))
|
|
791
791
|
continue;
|
|
792
|
-
const l = O(this._stepsProvider, e, i, o -
|
|
792
|
+
const l = O(this._stepsProvider, e, i, o - r, {
|
|
793
793
|
allowValuesOverlap: !1,
|
|
794
794
|
precision: this.precision,
|
|
795
795
|
min: this.min,
|
|
796
796
|
max: this.max
|
|
797
797
|
});
|
|
798
|
-
l !==
|
|
798
|
+
l !== r && (n = !0), e.set(i, l);
|
|
799
799
|
}
|
|
800
800
|
return n ? e : null;
|
|
801
801
|
}
|
|
802
802
|
_onThumbFocus(e) {
|
|
803
|
-
const t =
|
|
803
|
+
const t = S(e.currentTarget);
|
|
804
804
|
this._setActivePart(t);
|
|
805
805
|
}
|
|
806
806
|
_onThumbBlur() {
|
|
@@ -808,24 +808,24 @@ class Fe extends ie {
|
|
|
808
808
|
}
|
|
809
809
|
_onRangeInputChange(e) {
|
|
810
810
|
const t = e.currentTarget, n = t.value, i = t.dataset.type;
|
|
811
|
-
let
|
|
811
|
+
let r = !1;
|
|
812
812
|
switch (e.stopPropagation(), i) {
|
|
813
813
|
case "min": {
|
|
814
|
-
n < this.max ? (this.min = n,
|
|
814
|
+
n < this.max ? (this.min = n, r = !0) : t.value = this.min;
|
|
815
815
|
break;
|
|
816
816
|
}
|
|
817
817
|
case "max": {
|
|
818
|
-
n > this.min ? (this.max = n,
|
|
818
|
+
n > this.min ? (this.max = n, r = !0) : t.value = this.max;
|
|
819
819
|
break;
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
|
|
822
|
+
r && this.arcgisRangeChange.emit();
|
|
823
823
|
}
|
|
824
824
|
_onValueInputChange(e) {
|
|
825
|
-
const t = e.currentTarget, n =
|
|
825
|
+
const t = e.currentTarget, n = S(t), i = t.value;
|
|
826
826
|
if (n) {
|
|
827
827
|
e.stopPropagation();
|
|
828
|
-
const
|
|
828
|
+
const r = this._sliderData.getValue(n), o = O(this._stepsProvider, this._sliderData.entries, n, i - r, {
|
|
829
829
|
allowValuesOverlap: this.allowValuesOverlap,
|
|
830
830
|
precision: this.precision,
|
|
831
831
|
min: this.min,
|
|
@@ -850,6 +850,15 @@ class Fe extends ie {
|
|
|
850
850
|
_popoverSlotChange(e) {
|
|
851
851
|
this._hasPopoverContent = H(e), this._updatePopoverReferenceElement();
|
|
852
852
|
}
|
|
853
|
+
_onPopoverBeforeOpen(e) {
|
|
854
|
+
e.target === this._popoverElement.value && this._popoverElement.value.style.removeProperty("visibility");
|
|
855
|
+
}
|
|
856
|
+
_onPopoverBeforeClose(e) {
|
|
857
|
+
e.target === this._popoverElement.value && (this._popoverElement.value.style.visibility = "hidden");
|
|
858
|
+
}
|
|
859
|
+
async _onPopoverClose() {
|
|
860
|
+
this._nextPopoverReferenceElement != null && (this._measurablePopoverReferenceElement = this._nextPopoverReferenceElement, await this.updateComplete, this._nextPopoverReferenceElement = null);
|
|
861
|
+
}
|
|
853
862
|
_onContentStartSlotChange(e) {
|
|
854
863
|
this._hasContentStart = H(e);
|
|
855
864
|
}
|
|
@@ -857,7 +866,7 @@ class Fe extends ie {
|
|
|
857
866
|
this._hasContentEnd = H(e);
|
|
858
867
|
}
|
|
859
868
|
_onThumbKeyDown(e) {
|
|
860
|
-
const t =
|
|
869
|
+
const t = S(e.currentTarget);
|
|
861
870
|
if (!t)
|
|
862
871
|
return;
|
|
863
872
|
const n = e.currentTarget.querySelector("arcgis-label-input");
|
|
@@ -870,14 +879,14 @@ class Fe extends ie {
|
|
|
870
879
|
const i = Y(e, this.keyboardLargeStep, this.mirrored);
|
|
871
880
|
if (i) {
|
|
872
881
|
e.preventDefault();
|
|
873
|
-
const
|
|
874
|
-
this._setValue(t,
|
|
882
|
+
const r = Te(this._getStepsConfiguration(), this._sliderData.entries, t, i.direction, i.count);
|
|
883
|
+
this._setValue(t, r);
|
|
875
884
|
return;
|
|
876
885
|
}
|
|
877
886
|
if (J(e.key)) {
|
|
878
887
|
e.preventDefault();
|
|
879
|
-
const
|
|
880
|
-
this._setValue(t,
|
|
888
|
+
const r = Se(this._getStepsConfiguration(), this._sliderData.entries, t, this._getDirectionForHomeEndKey(e.key));
|
|
889
|
+
this._setValue(t, r);
|
|
881
890
|
}
|
|
882
891
|
}
|
|
883
892
|
_onTrackRangeKeyDown(e) {
|
|
@@ -886,13 +895,13 @@ class Fe extends ie {
|
|
|
886
895
|
const t = Y(e, this.keyboardLargeStep, this.mirrored);
|
|
887
896
|
if (t) {
|
|
888
897
|
e.preventDefault();
|
|
889
|
-
const { entries: n } =
|
|
898
|
+
const { entries: n } = Re(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
|
|
890
899
|
this._setValues(n);
|
|
891
900
|
return;
|
|
892
901
|
}
|
|
893
902
|
if (J(e.key)) {
|
|
894
903
|
e.preventDefault();
|
|
895
|
-
const n =
|
|
904
|
+
const n = ze(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
|
|
896
905
|
this._setValues(n);
|
|
897
906
|
}
|
|
898
907
|
}
|
|
@@ -920,24 +929,24 @@ class Fe extends ie {
|
|
|
920
929
|
let n = "";
|
|
921
930
|
if (this._hasPopoverContent)
|
|
922
931
|
if (t === "always" && this.values.length > 1) {
|
|
923
|
-
const
|
|
924
|
-
n =
|
|
932
|
+
const h = Array.from(this._sliderData.entries), [u, d] = h[0];
|
|
933
|
+
n = h.every(([, g]) => g === d) ? u : "track-range";
|
|
925
934
|
} else e && Be(e) ? n = e : this.values.length > 1 ? n = "track-range" : n = this._sliderData.entries.keys().next().value ?? "";
|
|
926
935
|
let i = null;
|
|
927
936
|
n && (n === "track-range" ? i = this.renderRoot.querySelector("#track-range") : i = Q(this, n));
|
|
928
|
-
const
|
|
929
|
-
this.
|
|
937
|
+
const r = i?.getBoundingClientRect(), s = !!r && r.width > 0 && r.height > 0 ? n : "", l = !!this._popoverElement.value?.open, c = this._hasPopoverContent && !!s && (this.popoverDisplay === "always" || !!this._activePart);
|
|
938
|
+
this._nextPopoverReferenceElement != null ? this._nextPopoverReferenceElement = s : s !== this._measurablePopoverReferenceElement && (l || c) ? (this._nextPopoverReferenceElement = s, l || this._onPopoverClose()) : this._measurablePopoverReferenceElement = s;
|
|
930
939
|
}
|
|
931
940
|
render() {
|
|
932
|
-
return w`<div class=${
|
|
941
|
+
return w`<div class=${T({
|
|
933
942
|
content: !0,
|
|
934
943
|
disabled: this._disabledOrInvalid
|
|
935
944
|
})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`;
|
|
936
945
|
}
|
|
937
946
|
_renderPopover() {
|
|
938
|
-
const { _activePart: e, layout: t, popoverDisplay: n, popoverLabel: i, popoverPlacement:
|
|
947
|
+
const { _activePart: e, layout: t, popoverDisplay: n, popoverLabel: i, popoverPlacement: r, valueLabelsDisplay: o, valueLabelsPlacement: s } = this, l = this._measurablePopoverReferenceElement, c = this._hasPopoverContent && !!l && (n === "always" || !!e) && this._nextPopoverReferenceElement == null, h = t === "horizontal" ? r === "start" ? "top" : "bottom" : r === "start" ? "left" : "right";
|
|
939
948
|
let u = 14;
|
|
940
|
-
return l && l !== "track-range" && (u -= 1), o !== "hidden" &&
|
|
949
|
+
return l && l !== "track-range" && (u -= 1), o !== "hidden" && r === s && (u += 24), w`<calcite-popover class="popover" focus-trap-disabled .label=${i} .open=${c} .offsetDistance=${u} .placement=${h} .referenceElement=${l} scale=s trigger-disabled @calcitePopoverBeforeOpen=${this._onPopoverBeforeOpen} @calcitePopoverBeforeClose=${this._onPopoverBeforeClose} @calcitePopoverClose=${this._onPopoverClose} ${U(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
|
|
941
950
|
}
|
|
942
951
|
_renderContentStart() {
|
|
943
952
|
return w`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
|
|
@@ -956,40 +965,40 @@ class Fe extends ie {
|
|
|
956
965
|
return w`<div class="track" ${U(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
|
|
957
966
|
}
|
|
958
967
|
_renderTrackBackground() {
|
|
959
|
-
const { max: e, min: t, fillPlacement: n, values: i } = this,
|
|
968
|
+
const { max: e, min: t, fillPlacement: n, values: i } = this, r = i.length > 1;
|
|
960
969
|
let o = this._fullMin, s = this._fullMax;
|
|
961
970
|
const l = [];
|
|
962
971
|
return this._invalid ? w`<div class="segment track-bounds" style=${F({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (o < t && (l.push(this._renderSegment(o, t, [
|
|
963
972
|
this.mirrored ? "track-effective-end" : "track-effective-start",
|
|
964
|
-
!
|
|
973
|
+
!r && n === "start" ? "track-fill" : null
|
|
965
974
|
])), o = t), s > e && (l.push(this._renderSegment(e, s, [
|
|
966
975
|
this.mirrored ? "track-effective-start" : "track-effective-end",
|
|
967
|
-
!
|
|
976
|
+
!r && n === "end" ? "track-fill" : null
|
|
968
977
|
])), s = e), l.push(this._renderSegment(o, s, ["track-bounds"])), l);
|
|
969
978
|
}
|
|
970
979
|
_renderFillSegment() {
|
|
971
980
|
const { values: e, min: t, max: n } = this;
|
|
972
981
|
if (!e?.length || this._invalid)
|
|
973
982
|
return;
|
|
974
|
-
const i = [...e].sort((u,
|
|
983
|
+
const i = [...e].sort((u, d) => u - d), r = i[0], o = i[i.length - 1], s = this._resolveFillPlacement(i.length > 1);
|
|
975
984
|
let l;
|
|
976
985
|
switch (s) {
|
|
977
986
|
case "start":
|
|
978
|
-
t <
|
|
987
|
+
t < r && (l = this._renderSegment(t, r, ["track-range"]));
|
|
979
988
|
break;
|
|
980
989
|
case "end":
|
|
981
990
|
n > o && (l = this._renderSegment(o, n, ["track-range"]));
|
|
982
991
|
break;
|
|
983
992
|
case "between":
|
|
984
|
-
i.length > 1 && (l = this._renderSegment(
|
|
993
|
+
i.length > 1 && (l = this._renderSegment(r, o, ["track-range"]));
|
|
985
994
|
break;
|
|
986
995
|
case "not-between":
|
|
987
|
-
i.length > 1 && (l = [this._renderSegment(t,
|
|
996
|
+
i.length > 1 && (l = [this._renderSegment(t, r, ["track-range"]), this._renderSegment(o, n, ["track-range"])]);
|
|
988
997
|
break;
|
|
989
998
|
}
|
|
990
999
|
if (!(i.length > 1))
|
|
991
1000
|
return l;
|
|
992
|
-
const c = this.segmentsDraggingDisabled,
|
|
1001
|
+
const c = this.segmentsDraggingDisabled, h = this._renderSegment(r, o, [
|
|
993
1002
|
"track-range-interactive",
|
|
994
1003
|
s === "between" ? "filled" : null,
|
|
995
1004
|
c ? null : "interactive",
|
|
@@ -1001,12 +1010,12 @@ class Fe extends ie {
|
|
|
1001
1010
|
onPointerDown: c ? void 0 : this._onTrackRangePointerDown,
|
|
1002
1011
|
onKeyDown: c ? void 0 : this._onTrackRangeKeyDown
|
|
1003
1012
|
});
|
|
1004
|
-
return [l,
|
|
1013
|
+
return [l, h];
|
|
1005
1014
|
}
|
|
1006
1015
|
_renderSegment(e, t, n, i) {
|
|
1007
|
-
const { _fullMin:
|
|
1008
|
-
B(
|
|
1009
|
-
100 - B(
|
|
1016
|
+
const { _fullMin: r, _fullMax: o, mirrored: s } = this, l = [
|
|
1017
|
+
B(r, o, R(e, r, o)),
|
|
1018
|
+
100 - B(r, o, R(t, r, o))
|
|
1010
1019
|
];
|
|
1011
1020
|
s && l.reverse();
|
|
1012
1021
|
const c = this.isHorizontal ? {
|
|
@@ -1015,26 +1024,26 @@ class Fe extends ie {
|
|
|
1015
1024
|
} : {
|
|
1016
1025
|
top: `${l[1]}%`,
|
|
1017
1026
|
bottom: `${l[0]}%`
|
|
1018
|
-
},
|
|
1019
|
-
return w`<div id=${i?.id ??
|
|
1027
|
+
}, h = oe("segment", ...n);
|
|
1028
|
+
return w`<div id=${i?.id ?? V} class=${T(h)} style=${F(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
|
|
1020
1029
|
}
|
|
1021
1030
|
_renderThumbs() {
|
|
1022
|
-
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), n = t.map(([, i]) => i).sort((i,
|
|
1031
|
+
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, i]) => i >= this._fullMin && i <= this._fullMax), n = t.map(([, i]) => i).sort((i, r) => i - r);
|
|
1023
1032
|
if (this.valuesDraggingDisabled && n.length > 1) {
|
|
1024
|
-
const i = n[0],
|
|
1025
|
-
if (i != null &&
|
|
1026
|
-
const o = (i +
|
|
1033
|
+
const i = n[0], r = n.at(-1);
|
|
1034
|
+
if (i != null && r != null) {
|
|
1035
|
+
const o = (i + r) / 2;
|
|
1027
1036
|
return [
|
|
1028
1037
|
this._renderFixedThumb(o),
|
|
1029
1038
|
X(t, ([s, l]) => this._renderThumb(s, l, !0))
|
|
1030
1039
|
];
|
|
1031
1040
|
}
|
|
1032
1041
|
}
|
|
1033
|
-
return X(t, ([i,
|
|
1042
|
+
return X(t, ([i, r]) => this._renderThumb(i, r, !1));
|
|
1034
1043
|
}
|
|
1035
1044
|
_renderFixedThumb(e) {
|
|
1036
1045
|
const { _disabledOrInvalid: t, segmentsDraggingDisabled: n, isHorizontal: i } = this;
|
|
1037
|
-
return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${
|
|
1046
|
+
return w`<div .ariaLabel=${this.messages.sliderValue} .ariaOrientation=${i ? "horizontal" : "vertical"} .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${e} class=${T({
|
|
1038
1047
|
thumb: !0,
|
|
1039
1048
|
"fixed-thumb": !0,
|
|
1040
1049
|
active: this._activePart === "range"
|
|
@@ -1044,15 +1053,15 @@ class Fe extends ie {
|
|
|
1044
1053
|
})} .tabIndex=${t ? -1 : 0}><div class="thumb-content"><span class="handle"></span></div></div>`;
|
|
1045
1054
|
}
|
|
1046
1055
|
_renderThumb(e, t, n) {
|
|
1047
|
-
const { valueLabelsDisplay: i } = this,
|
|
1048
|
-
return q(e, w`<div id=${e ??
|
|
1056
|
+
const { valueLabelsDisplay: i } = this, r = this._disabledOrInvalid, o = !n && (this._activePart === e || this._activePart === "range"), s = !n && (this._activePart === "range" || this._activePart === e), l = i === "always" || i === "auto" && (s || n && this._activePart === "range"), c = this.isHorizontal, h = c ? "horizontal" : "vertical", u = `label-${e}`, d = c ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
|
|
1057
|
+
return q(e, w`<div id=${e ?? V} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(i ? u : void 0) ?? V} .ariaOrientation=${h} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${T({
|
|
1049
1058
|
thumb: !0,
|
|
1050
1059
|
active: o,
|
|
1051
1060
|
"labels-only": n
|
|
1052
|
-
})} data-entry=${e ??
|
|
1061
|
+
})} data-entry=${e ?? V} @pointerdown=${n ? void 0 : this._onThumbPointerDown} @focus=${n ? void 0 : this._onThumbFocus} @blur=${n ? void 0 : this._onThumbBlur} @keydown=${n ? void 0 : this._onThumbKeyDown} role=slider style=${F({
|
|
1053
1062
|
...this._getPositionStyleForElement(t),
|
|
1054
1063
|
"z-index": this._activePart === e ? 2 : 1
|
|
1055
|
-
})} .tabIndex=${n ||
|
|
1064
|
+
})} .tabIndex=${n || r ? -1 : 0}><div class="thumb-content"><span class="handle"></span><arcgis-label-input .alignment=${d} class="label" .hidden=${!l} id=${u ?? V} .labelFormatter=${this._valueFormatter} @focus=${r ? void 0 : this._onThumbFocus} @blur=${r ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${U(this._makeResizeRef())}></arcgis-label-input></div></div>`);
|
|
1056
1065
|
}
|
|
1057
1066
|
_renderRangeLabel(e) {
|
|
1058
1067
|
let t = "center";
|
|
@@ -1063,40 +1072,40 @@ class Fe extends ie {
|
|
|
1063
1072
|
};
|
|
1064
1073
|
this.rangeLabelsPlacement === "end" && n(), this.mirrored && n(), this._direction === "rtl" && n();
|
|
1065
1074
|
}
|
|
1066
|
-
return w`<arcgis-label-input .alignment=${t} class=${
|
|
1075
|
+
return w`<arcgis-label-input .alignment=${t} class=${T(e)} data-type=${e ?? V} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
|
|
1067
1076
|
}
|
|
1068
1077
|
}
|
|
1069
|
-
function Oe(
|
|
1070
|
-
return "dataset" in
|
|
1078
|
+
function Oe(a) {
|
|
1079
|
+
return "dataset" in a && a.tagName === "ARCGIS-LABEL-INPUT" && (a.dataset.type === "min" || a.dataset.type === "max");
|
|
1071
1080
|
}
|
|
1072
|
-
function
|
|
1073
|
-
const e = ce(
|
|
1081
|
+
function S(a) {
|
|
1082
|
+
const e = ce(a, "[data-entry]");
|
|
1074
1083
|
return e && "dataset" in e ? e.dataset.entry : null;
|
|
1075
1084
|
}
|
|
1076
|
-
function Be(
|
|
1077
|
-
return typeof
|
|
1085
|
+
function Be(a) {
|
|
1086
|
+
return typeof a != null && a !== "range";
|
|
1078
1087
|
}
|
|
1079
|
-
function Q(
|
|
1080
|
-
return e ?
|
|
1088
|
+
function Q(a, e) {
|
|
1089
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
|
|
1081
1090
|
}
|
|
1082
|
-
function Ae(
|
|
1083
|
-
return e ?
|
|
1091
|
+
function Ae(a, e) {
|
|
1092
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
|
|
1084
1093
|
}
|
|
1085
|
-
function Z(
|
|
1086
|
-
return e ?
|
|
1094
|
+
function Z(a, e) {
|
|
1095
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
|
|
1087
1096
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1097
|
+
function z(a) {
|
|
1098
|
+
return a.isPrimary && a.button === 0;
|
|
1090
1099
|
}
|
|
1091
1100
|
const He = 5;
|
|
1092
|
-
function B(
|
|
1093
|
-
const n = e -
|
|
1101
|
+
function B(a, e, t) {
|
|
1102
|
+
const n = e - a, i = (t - a) / n * 100;
|
|
1094
1103
|
return Number.parseFloat(i.toFixed(He));
|
|
1095
1104
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return Math.max(e, Math.min(t,
|
|
1105
|
+
function R(a, e, t) {
|
|
1106
|
+
return Math.max(e, Math.min(t, a));
|
|
1098
1107
|
}
|
|
1099
|
-
|
|
1108
|
+
ae("arcgis-slider", Fe);
|
|
1100
1109
|
export {
|
|
1101
1110
|
Fe as ArcgisSlider
|
|
1102
1111
|
};
|