@arcgis/common-components 5.2.0-next.5 → 5.2.0-next.50
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/4KRPPRHW.js +2 -0
- package/dist/cdn/{232BH3SJ.js → 5WP36RAW.js} +1 -1
- package/dist/cdn/{YVCGEEMG.js → 7PL77HAZ.js} +1 -1
- package/dist/cdn/7ZUWFAYH.js +2 -0
- package/dist/cdn/B6C7ZZDN.js +2 -0
- package/dist/cdn/{YG4PY2H3.js → CYZGEP6V.js} +1 -1
- package/dist/cdn/E3SVPX4L.js +2 -0
- package/dist/cdn/EVYGOWCG.js +2 -0
- package/dist/cdn/EX3AW7Q2.js +2 -0
- package/dist/cdn/FKHGUT45.js +2 -0
- package/dist/cdn/FKO67W3F.js +2 -0
- package/dist/cdn/FZ4Q7EMA.js +2 -0
- package/dist/cdn/GTMCT5DS.js +2 -0
- package/dist/cdn/H6QXW6NX.js +2 -0
- package/dist/cdn/KZFC5ZBH.js +2 -0
- package/dist/cdn/LFOKTAGH.js +2 -0
- package/dist/cdn/MKKGMWEJ.js +2 -0
- package/dist/cdn/{OOBX2C2L.js → MW6TDS35.js} +1 -1
- package/dist/cdn/QISJWNH5.js +2 -0
- package/dist/cdn/TDGIURLY.js +2 -0
- package/dist/cdn/TWW63D32.js +2 -0
- package/dist/cdn/{6XE5JNJ7.js → UG7AGGLT.js} +3 -3
- package/dist/cdn/V43FDQ7C.js +2 -0
- package/dist/cdn/WC3RM7YK.js +2 -0
- package/dist/cdn/X4EYTR3Z.js +2 -0
- package/dist/cdn/XS3YRTYG.js +2 -0
- package/dist/cdn/{WJ3TYWP2.js → YJFSSORL.js} +1 -1
- package/dist/cdn/Z5QBBHLD.js +2 -0
- package/dist/cdn/{MINFRX4Y.js → ZTXNPEHL.js} +1 -1
- package/dist/cdn/assets/value-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/value-picker-combobox/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +52 -40
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +6 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +2 -2
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +6 -6
- package/dist/components/arcgis-coordinate-system-picker/customElement.d.ts +6 -1
- package/dist/components/arcgis-coordinate-system-picker/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +245 -213
- package/dist/components/arcgis-field-info/index.js +1 -0
- package/dist/components/arcgis-field-info/utils/basic.d.ts +3 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +43 -51
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +3 -1
- package/dist/components/arcgis-histogram/customElement.js +13 -9
- package/dist/components/arcgis-picker-input/customElement.d.ts +6 -2
- package/dist/components/arcgis-picker-input/customElement.js +7 -7
- package/dist/components/arcgis-slider/customElement.d.ts +4 -3
- package/dist/components/arcgis-slider/customElement.js +304 -284
- package/dist/components/arcgis-ticks/customElement.js +100 -79
- package/dist/components/arcgis-unique-values-list/customElement.js +26 -26
- package/dist/components/arcgis-value-picker/customElement.d.ts +377 -0
- package/dist/components/arcgis-value-picker/customElement.js +87 -0
- package/dist/components/arcgis-value-picker/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker/index.js +3 -0
- package/dist/components/arcgis-value-picker/types.d.ts +69 -0
- package/dist/components/arcgis-value-picker-collection/customElement.d.ts +113 -0
- package/dist/components/arcgis-value-picker-collection/customElement.js +43 -0
- package/dist/components/arcgis-value-picker-collection/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-collection/index.js +1 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.d.ts +90 -0
- package/dist/components/arcgis-value-picker-combobox/customElement.js +55 -0
- package/dist/components/arcgis-value-picker-combobox/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-combobox/index.js +3 -0
- package/dist/components/arcgis-value-picker-label/customElement.d.ts +81 -0
- package/dist/components/arcgis-value-picker-label/customElement.js +51 -0
- package/dist/components/arcgis-value-picker-label/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-label/index.js +1 -0
- package/dist/components/arcgis-value-picker-slider/customElement.d.ts +173 -0
- package/dist/components/arcgis-value-picker-slider/customElement.js +60 -0
- package/dist/components/arcgis-value-picker-slider/index.d.ts +1 -0
- package/dist/components/arcgis-value-picker-slider/index.js +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +50 -0
- package/dist/loader.js +8 -3
- package/dist/types/lumina.d.ts +36 -0
- package/dist/types/preact.d.ts +41 -0
- package/dist/types/react.d.ts +46 -0
- package/dist/types/stencil.d.ts +36 -0
- package/package.json +5 -5
- package/dist/cdn/2MN6S2HH.js +0 -2
- package/dist/cdn/4BJYJUMR.js +0 -2
- package/dist/cdn/5I5ODGDD.js +0 -2
- package/dist/cdn/AGGCAE6P.js +0 -2
- package/dist/cdn/BDF4ZLUF.js +0 -2
- package/dist/cdn/F45Q3BRT.js +0 -2
- package/dist/cdn/GEWXC2ZR.js +0 -2
- package/dist/cdn/HWEOBUAY.js +0 -2
- package/dist/cdn/IRIB5DXG.js +0 -2
- package/dist/cdn/KPJCYYYQ.js +0 -2
- package/dist/cdn/ORSF6IOL.js +0 -2
- package/dist/cdn/QEW7H22O.js +0 -2
- package/dist/cdn/UMIMGOKS.js +0 -2
- package/dist/cdn/VUQJROFR.js +0 -2
- package/dist/cdn/YSXFXVP6.js +0 -2
- package/dist/cdn/YVWFGK4M.js +0 -2
- package/dist/cdn/assets/coordinate-system-picker/t9n/messages.en-US.json +0 -1
- /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
- /package/dist/chunks/{commonFunctions.js → general.js} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as Q } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as Z } from "lit/directives/keyed.js";
|
|
4
|
-
import { LitElement as ee, createEvent as
|
|
4
|
+
import { LitElement as ee, createEvent as C, safeClassMap as M, safeStyleMap as R, nothing as E } from "@arcgis/lumina";
|
|
5
5
|
import { makeAccessorController as te } from "@arcgis/lumina/controllers/accessor";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { classes as ne, getClosestElement as ae } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { slotChangeHasAssignedElement as L } from "@arcgis/toolkit/dom/slots";
|
|
8
|
+
import { css as re, html as w } from "lit";
|
|
8
9
|
import { map as ie } from "lit/directives/map.js";
|
|
9
10
|
import { createRef as B, ref as O } from "lit/directives/ref.js";
|
|
10
11
|
import { u as se } from "../../chunks/useT9n.js";
|
|
@@ -24,40 +25,40 @@ const p = {
|
|
|
24
25
|
jumpToEnd: "End",
|
|
25
26
|
confirmEdit: "Enter"
|
|
26
27
|
};
|
|
27
|
-
function N({ key:
|
|
28
|
-
const i = de(
|
|
28
|
+
function N({ key: a, shiftKey: e }, t, n) {
|
|
29
|
+
const i = de(a);
|
|
29
30
|
if (i == null)
|
|
30
31
|
return null;
|
|
31
|
-
const r = ue(
|
|
32
|
+
const r = ue(a) || he(a) && e ? ge(t) : 1;
|
|
32
33
|
return {
|
|
33
|
-
direction:
|
|
34
|
+
direction: n ? i * -1 : i,
|
|
34
35
|
count: r
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function de(
|
|
38
|
-
return
|
|
38
|
+
function de(a) {
|
|
39
|
+
return a === p.increment || a === p.incrementHorizontal || a === p.pageIncrement ? 1 : a === p.decrement || a === p.decrementHorizontal || a === p.pageDecrement ? -1 : null;
|
|
39
40
|
}
|
|
40
|
-
function U(
|
|
41
|
-
return
|
|
41
|
+
function U(a) {
|
|
42
|
+
return a === p.jumpToEnd || a === p.jumpToStart;
|
|
42
43
|
}
|
|
43
|
-
function he(
|
|
44
|
-
return
|
|
44
|
+
function he(a) {
|
|
45
|
+
return a === p.increment || a === p.decrement || a === p.decrementHorizontal || a === p.incrementHorizontal;
|
|
45
46
|
}
|
|
46
|
-
function ue(
|
|
47
|
-
return
|
|
47
|
+
function ue(a) {
|
|
48
|
+
return a === p.pageIncrement || a === p.pageDecrement;
|
|
48
49
|
}
|
|
49
|
-
function ge(
|
|
50
|
-
const e = Number.isFinite(
|
|
50
|
+
function ge(a) {
|
|
51
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
51
52
|
return Math.max(1, e);
|
|
52
53
|
}
|
|
53
|
-
const me = re`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;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-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-start: 0;--arcgis-slider-internal-value-labels-placement-end: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-end: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-slider-internal-value-labels-placement-start: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-slider-internal-value-labels-placement-end: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-slider-internal-range-labels-placement-end: var(--arcgis-slider-internal-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-slider-internal-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(--calcite-color-border-2)}.track-fill{--arcgis-slider-track-background-color: var(--calcite-color-brand)}: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{background-color:var(--calcite-color-brand);&.active{box-shadow:0 0 8px #00000029;outline:1px solid var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}}:host([disabled]) .track-range{background-color:var(--calcite-color-text-3)}:host([disabled]),:host([disabled][layout="horizontal"]),:host([disabled][layout="vertical"]){.track-range.interactive:after{cursor:default;pointer-events:none}}:host([layout="horizontal"]){.track-range.interactive:after{all:initial;cursor:ew-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-handle-offset));block-size:var(--arcgis-slider-handle-size);margin-top:1px}}:host([layout="vertical"]){.track-range.interactive:after{all:initial;cursor:ns-resize;position:absolute;inline-size:100%;content:"";inset-block-start:calc(-1 * var(--arcgis-slider-internal-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:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;position:absolute}.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))))}}.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(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--calcite-animation-timing, .125s) ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.label{position:absolute;will-change:transform}.label[hidden]{display:block;opacity:0;pointer-events:none}.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}: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-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height)) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-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-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-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;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-end) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`;
|
|
54
|
-
var fe = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, W = (
|
|
55
|
-
throw TypeError(
|
|
56
|
-
}, D = (
|
|
57
|
-
for (var i =
|
|
58
|
-
(o =
|
|
59
|
-
return
|
|
60
|
-
}, G = (
|
|
54
|
+
const me = re`:host{display:flex;width:100%;height:100%;font-family:Avenir Next,Helvetica Neue,helvetica,arial,sans-serif;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-slider-internal-show-range-labels: 0;--arcgis-slider-internal-show-value-labels: 0;--arcgis-slider-internal-value-labels-placement-start: 0;--arcgis-slider-internal-value-labels-placement-end: 0;--arcgis-slider-internal-range-labels-placement-center: 0;--arcgis-slider-internal-range-labels-placement-end: 0;--arcgis-slider-internal-handle-offset: calc(var(--arcgis-slider-handle-size) / 2);--arcgis-slider-internal-label-input-margin: calc(var(--arcgis-slider-internal-handle-offset) + 4px);--arcgis-slider-internal-label-input-height: var(--calcite-input-number-height, 1.5rem);--arcgis-slider-internal-track-size: 2px}:host([show-range-labels]){--arcgis-slider-internal-show-range-labels: 1}:host(:not([value-labels-display="hidden"])){--arcgis-slider-internal-show-value-labels: 1}:host([value-labels-placement="start"]){--arcgis-slider-internal-value-labels-placement-start: var(--arcgis-slider-internal-show-value-labels)}:host([value-labels-placement="end"]){--arcgis-slider-internal-value-labels-placement-end: var(--arcgis-slider-internal-show-value-labels)}:host([range-labels-placement="center"]){--arcgis-slider-internal-range-labels-placement-center: var(--arcgis-slider-internal-show-range-labels)}:host([range-labels-placement="end"]){--arcgis-slider-internal-range-labels-placement-end: var(--arcgis-slider-internal-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-slider-internal-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(--calcite-color-border-2)}: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(--calcite-color-brand);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-slider-internal-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-slider-internal-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:.125rem;position:absolute;top:0;left:0}.thumb{-webkit-user-select:none;user-select:none;background-color:#4c4c4c;position:absolute}.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))))}}.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(--calcite-color-text-3) inset;border-radius:var(--arcgis-slider-handle-size);width:var(--arcgis-slider-handle-size);height:var(--arcgis-slider-handle-size);transition:all var(--calcite-animation-timing, .125s) ease-in-out;position:absolute;top:calc(var(--arcgis-slider-internal-handle-offset) * -1);left:calc(var(--arcgis-slider-internal-handle-offset) * -1)}.handle:hover{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.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}: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-slider-internal-handle-offset)}.track-container{flex-direction:column}.track{flex:1;width:var(--arcgis-slider-internal-track-size)}.segment{writing-mode:vertical-lr}.label{top:calc(var(--arcgis-slider-internal-label-input-height) * -.5)}&:host([value-labels-placement="start"]){.label{right:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{left:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="center"]){.content{--arcgis-slider-internal-content-start-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height)) );--arcgis-slider-internal-content-end-min-height: calc( ((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-handle-offset)) + (var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) );column-gap:calc(var(--arcgis-slider-internal-show-range-labels) * var(--arcgis-slider-internal-handle-offset) / 2);padding-inline:calc((1 - var(--arcgis-slider-internal-show-range-labels)) * var(--arcgis-slider-internal-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-slider-internal-content-start-min-height),auto) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) var(--arcgis-slider-internal-track-size) calc(var(--arcgis-slider-internal-show-range-labels) * calc(calc(var(--arcgis-slider-internal-label-input-height) / 2) - calc(var(--arcgis-slider-internal-track-size) / 2))) minmax(var(--arcgis-slider-internal-content-end-min-height),auto)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:var(--arcgis-slider-internal-label-input-margin)}}}:host([layout="horizontal"][range-labels-placement="end"]){.content{--arcgis-slider-internal-content-start-min-height: calc( var(--arcgis-slider-internal-handle-offset) + var(--arcgis-slider-internal-value-labels-placement-start) * var(--arcgis-slider-internal-label-input-height) );--arcgis-slider-internal-content-end-min-height: calc( var(--arcgis-slider-internal-value-labels-placement-end) * var(--arcgis-slider-internal-label-input-height) );padding-inline:var(--arcgis-slider-internal-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;grid-template-rows:minmax(var(--arcgis-slider-internal-content-start-min-height),auto) var(--arcgis-slider-internal-track-size) var(--arcgis-slider-internal-handle-offset) calc(var(--arcgis-slider-internal-range-labels-placement-end) * var(--arcgis-slider-internal-label-input-height)) minmax(var(--arcgis-slider-internal-content-end-min-height),auto);column-gap:var(--arcgis-slider-internal-handle-offset)}.track{flex:1;height:var(--arcgis-slider-internal-track-size)}&:host([value-labels-placement="start"]){.label{bottom:var(--arcgis-slider-internal-label-input-margin)}}&:host([value-labels-placement="end"]){.label{top:calc(var(--arcgis-slider-internal-label-input-margin) + var(--arcgis-slider-internal-range-labels-placement-end) * (var(--arcgis-slider-internal-label-input-height)))}}.min,.max{--arcgis-slider-internal-range-translation: calc(var(--arcgis-slider-internal-handle-offset) + .5rem + 1px);grid-area:unset;grid-row:-3}&:host(:not([mirrored])){.min{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}.max{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}}&:host([mirrored]){.min{grid-column:3;transform:translate(var(--arcgis-slider-internal-range-translation))}.max{grid-column:1;transform:translate(calc(var(--arcgis-slider-internal-range-translation) * -1))}}}`;
|
|
55
|
+
var fe = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, W = (a) => {
|
|
56
|
+
throw TypeError(a);
|
|
57
|
+
}, D = (a, e, t, n) => {
|
|
58
|
+
for (var i = n > 1 ? void 0 : n ? pe(e, t) : e, r = a.length - 1, o; r >= 0; r--)
|
|
59
|
+
(o = a[r]) && (i = (n ? o(e, t, i) : o(i)) || i);
|
|
60
|
+
return n && i && fe(e, t, i), i;
|
|
61
|
+
}, G = (a, e, t) => e.has(a) || W("Cannot " + t), ve = (a, e, t) => (G(a, e, "read from private field"), e.get(a)), be = (a, e, t) => e.has(a) ? W("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), _e = (a, e, t, n) => (G(a, e, "write to private field"), e.set(a, t), t), F;
|
|
61
62
|
function xe() {
|
|
62
63
|
return {
|
|
63
64
|
min: 0,
|
|
@@ -65,20 +66,20 @@ function xe() {
|
|
|
65
66
|
values: []
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
|
-
let
|
|
69
|
+
let y = class extends oe {
|
|
69
70
|
//--------------------------------------------------------------------------
|
|
70
71
|
//
|
|
71
72
|
// Lifecycle
|
|
72
73
|
//
|
|
73
74
|
//--------------------------------------------------------------------------
|
|
74
|
-
constructor(
|
|
75
|
-
super({ ...xe(), properties:
|
|
75
|
+
constructor(a = {}) {
|
|
76
|
+
super({ ...xe(), properties: a }), this._entries = /* @__PURE__ */ new Map(), this.precision = 4, this.ready = !1, be(this, F);
|
|
76
77
|
}
|
|
77
78
|
startup() {
|
|
78
|
-
const { precision:
|
|
79
|
-
let { min: e, max: t, values:
|
|
80
|
-
t = x(t,
|
|
81
|
-
const i = new Map(
|
|
79
|
+
const { precision: a } = this;
|
|
80
|
+
let { min: e, max: t, values: n } = this;
|
|
81
|
+
t = x(t, a), e = x(e, a), n = n?.map((r) => T(x(r, a), e, t)).sort((r, o) => r - o), this._set("min", e), this._set("max", t), this._set("values", n);
|
|
82
|
+
const i = new Map(n?.map((r) => [K(), r]));
|
|
82
83
|
this._entries = i, A(
|
|
83
84
|
() => this.min,
|
|
84
85
|
(r) => {
|
|
@@ -111,42 +112,42 @@ let w = class extends oe {
|
|
|
111
112
|
get entries() {
|
|
112
113
|
return this._entries;
|
|
113
114
|
}
|
|
114
|
-
set max(
|
|
115
|
+
set max(a) {
|
|
115
116
|
if (!this.ready) {
|
|
116
|
-
this._set("max",
|
|
117
|
+
this._set("max", a);
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
|
-
const e = this._get("max"), t = x(
|
|
120
|
+
const e = this._get("max"), t = x(a, this.precision);
|
|
120
121
|
e !== t && this._set("max", t);
|
|
121
122
|
}
|
|
122
|
-
set min(
|
|
123
|
+
set min(a) {
|
|
123
124
|
if (!this.ready) {
|
|
124
|
-
this._set("min",
|
|
125
|
+
this._set("min", a);
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
|
-
const e = this._get("min"), t = x(
|
|
128
|
+
const e = this._get("min"), t = x(a, this.precision);
|
|
128
129
|
e !== t && this._set("min", t);
|
|
129
130
|
}
|
|
130
|
-
set values(
|
|
131
|
-
if (ve(this, F) ===
|
|
131
|
+
set values(a) {
|
|
132
|
+
if (ve(this, F) === a)
|
|
132
133
|
return;
|
|
133
|
-
if (_e(this, F,
|
|
134
|
-
this._set("values",
|
|
134
|
+
if (_e(this, F, a), !this.ready) {
|
|
135
|
+
this._set("values", a);
|
|
135
136
|
return;
|
|
136
137
|
}
|
|
137
138
|
const e = this._get("values");
|
|
138
|
-
if (
|
|
139
|
+
if (a = a?.map((n) => T(x(n, this.precision), this.min, this.max)).sort((n, i) => n - i), e?.length === a?.length && e.every((n, i) => n === a[i]))
|
|
139
140
|
return;
|
|
140
|
-
const t = new Map(
|
|
141
|
-
this._entries = t, this._set("values",
|
|
141
|
+
const t = new Map(a?.map((n) => [K(), n]));
|
|
142
|
+
this._entries = t, this._set("values", a);
|
|
142
143
|
}
|
|
143
144
|
//--------------------------------------------------------------------------
|
|
144
145
|
//
|
|
145
146
|
// Public Methods
|
|
146
147
|
//
|
|
147
148
|
//--------------------------------------------------------------------------
|
|
148
|
-
getValue(
|
|
149
|
-
return this._entries.get(
|
|
149
|
+
getValue(a) {
|
|
150
|
+
return this._entries.get(a);
|
|
150
151
|
}
|
|
151
152
|
/**
|
|
152
153
|
* Updates a thumb [value](#values) based on the provided index. The provided value
|
|
@@ -155,60 +156,60 @@ let w = class extends oe {
|
|
|
155
156
|
*
|
|
156
157
|
* @returns `true` if the value was changed, otherwise `false`.
|
|
157
158
|
*/
|
|
158
|
-
setValue(
|
|
159
|
+
setValue(a, e) {
|
|
159
160
|
if (this.values == null)
|
|
160
161
|
return !1;
|
|
161
|
-
const { min: t, max:
|
|
162
|
-
return i === r ? !1 : (this._entries.set(
|
|
162
|
+
const { min: t, max: n } = this, i = this._entries.get(a), r = T(x(e, this.precision), t, n);
|
|
163
|
+
return i === r ? !1 : (this._entries.set(a, r), this._updatesValues(), !0);
|
|
163
164
|
}
|
|
164
|
-
setValues(
|
|
165
|
+
setValues(a) {
|
|
165
166
|
if (this.values == null)
|
|
166
167
|
return !1;
|
|
167
168
|
let e = !1;
|
|
168
|
-
const { min: t, max:
|
|
169
|
-
for (const [i, r] of
|
|
170
|
-
const o = this._entries.get(i), s = T(x(r, this.precision), t,
|
|
169
|
+
const { min: t, max: n } = this;
|
|
170
|
+
for (const [i, r] of a) {
|
|
171
|
+
const o = this._entries.get(i), s = T(x(r, this.precision), t, n);
|
|
171
172
|
o !== s && (e = !0, this._entries.set(i, s));
|
|
172
173
|
}
|
|
173
174
|
return e ? (this._updatesValues(), !0) : !1;
|
|
174
175
|
}
|
|
175
176
|
_updatesValues() {
|
|
176
|
-
const
|
|
177
|
-
this._set("values",
|
|
177
|
+
const a = Array.from(this._entries.values()).sort((e, t) => e - t);
|
|
178
|
+
this._set("values", a);
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
181
|
F = /* @__PURE__ */ new WeakMap();
|
|
181
182
|
D([
|
|
182
183
|
I()
|
|
183
|
-
],
|
|
184
|
+
], y.prototype, "_entries", 2);
|
|
184
185
|
D([
|
|
185
186
|
I({ readOnly: !0 })
|
|
186
|
-
],
|
|
187
|
+
], y.prototype, "entries", 1);
|
|
187
188
|
D([
|
|
188
189
|
I()
|
|
189
|
-
],
|
|
190
|
+
], y.prototype, "max", 1);
|
|
190
191
|
D([
|
|
191
192
|
I()
|
|
192
|
-
],
|
|
193
|
+
], y.prototype, "min", 1);
|
|
193
194
|
D([
|
|
194
|
-
I({ cast: (
|
|
195
|
-
],
|
|
195
|
+
I({ cast: (a) => T(a, 0, 20) })
|
|
196
|
+
], y.prototype, "precision", 2);
|
|
196
197
|
D([
|
|
197
198
|
I({ readOnly: !0 })
|
|
198
|
-
],
|
|
199
|
+
], y.prototype, "ready", 2);
|
|
199
200
|
D([
|
|
200
201
|
I()
|
|
201
|
-
],
|
|
202
|
-
|
|
202
|
+
], y.prototype, "values", 1);
|
|
203
|
+
y = D([
|
|
203
204
|
ce("esri.widgets.Slider.SliderData")
|
|
204
|
-
],
|
|
205
|
-
function T(
|
|
206
|
-
return Math.min(Math.max(
|
|
205
|
+
], y);
|
|
206
|
+
function T(a, e, t) {
|
|
207
|
+
return Math.min(Math.max(a, e), t);
|
|
207
208
|
}
|
|
208
|
-
function x(
|
|
209
|
-
return Number.parseFloat(
|
|
209
|
+
function x(a, e) {
|
|
210
|
+
return Number.parseFloat(a.toFixed(e));
|
|
210
211
|
}
|
|
211
|
-
class
|
|
212
|
+
class we {
|
|
212
213
|
constructor(e) {
|
|
213
214
|
this.steps = e, this.minIndex = 0, this.maxIndex = this.steps.length - 1;
|
|
214
215
|
}
|
|
@@ -218,30 +219,30 @@ class ye {
|
|
|
218
219
|
valueToIndex(e) {
|
|
219
220
|
const t = this.steps.indexOf(e);
|
|
220
221
|
return t !== -1 ? t : this.steps.reduce(
|
|
221
|
-
(
|
|
222
|
+
(n, i, r, o) => Math.abs(i - e) < Math.abs(o[n] - e) ? r : n,
|
|
222
223
|
0
|
|
223
224
|
);
|
|
224
225
|
}
|
|
225
226
|
getClosestStepDistances(e, t) {
|
|
226
227
|
if (t <= 0)
|
|
227
228
|
return [];
|
|
228
|
-
const
|
|
229
|
+
const n = [];
|
|
229
230
|
for (let i = this.minIndex; i <= this.maxIndex; i++) {
|
|
230
231
|
const r = this.indexToValue(i), o = Math.abs(r - e);
|
|
231
232
|
let s = !1;
|
|
232
|
-
for (let l = 0; l <
|
|
233
|
-
if (o <
|
|
234
|
-
|
|
233
|
+
for (let l = 0; l < n.length; l++)
|
|
234
|
+
if (o < n[l].dist) {
|
|
235
|
+
n.splice(l, 0, { idx: i, value: r, dist: o }), s = !0;
|
|
235
236
|
break;
|
|
236
237
|
}
|
|
237
|
-
!s &&
|
|
238
|
+
!s && n.length < t && n.push({ idx: i, value: r, dist: o }), n.length > t && (n.length = t);
|
|
238
239
|
}
|
|
239
|
-
return
|
|
240
|
+
return n;
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
class
|
|
243
|
-
constructor(e, t,
|
|
244
|
-
this.min = e, this.max = t, this.stepSize =
|
|
243
|
+
class ye {
|
|
244
|
+
constructor(e, t, n) {
|
|
245
|
+
this.min = e, this.max = t, this.stepSize = n, this.minIndex = 0, this.maxIndex = Math.round((this.max - this.min) / this.stepSize);
|
|
245
246
|
}
|
|
246
247
|
indexToValue(e) {
|
|
247
248
|
return this.min + k(e, this.minIndex, this.maxIndex) * this.stepSize;
|
|
@@ -252,40 +253,40 @@ class we {
|
|
|
252
253
|
getClosestStepDistances(e, t) {
|
|
253
254
|
if (t <= 0)
|
|
254
255
|
return [];
|
|
255
|
-
const
|
|
256
|
+
const n = [], i = this.minIndex, r = this.maxIndex, s = (k(e, this.min, this.max) - this.min) / this.stepSize;
|
|
256
257
|
let l = Math.floor(s), c = l + 1;
|
|
257
|
-
for (;
|
|
258
|
+
for (; n.length < t && (l >= i || c <= r); ) {
|
|
258
259
|
if (l < i) {
|
|
259
|
-
const
|
|
260
|
-
|
|
260
|
+
const g = this.indexToValue(c);
|
|
261
|
+
n.push({ idx: c, value: g, dist: Math.abs(g - e) }), c++;
|
|
261
262
|
continue;
|
|
262
263
|
}
|
|
263
264
|
if (c > r) {
|
|
264
|
-
const
|
|
265
|
-
|
|
265
|
+
const g = this.indexToValue(l);
|
|
266
|
+
n.push({ idx: l, value: g, dist: Math.abs(g - e) }), l--;
|
|
266
267
|
continue;
|
|
267
268
|
}
|
|
268
|
-
const d = this.indexToValue(l), h = this.indexToValue(c),
|
|
269
|
-
|
|
269
|
+
const d = this.indexToValue(l), h = this.indexToValue(c), u = Math.abs(d - e), f = Math.abs(h - e);
|
|
270
|
+
u <= f ? (n.push({ idx: l, value: d, dist: u }), l--) : (n.push({ idx: c, value: h, dist: f }), c++);
|
|
270
271
|
}
|
|
271
|
-
return
|
|
272
|
+
return n;
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
|
-
function ke(
|
|
275
|
-
if (
|
|
275
|
+
function ke(a) {
|
|
276
|
+
if (a.steps == null)
|
|
276
277
|
return null;
|
|
277
|
-
const e =
|
|
278
|
-
return Array.isArray(e) ? e.length === 0 ? null : new
|
|
278
|
+
const e = a.steps;
|
|
279
|
+
return Array.isArray(e) ? e.length === 0 ? null : new we(e) : e <= 0 ? null : new ye(a.min, a.max, e);
|
|
279
280
|
}
|
|
280
|
-
function De(
|
|
281
|
-
if (
|
|
281
|
+
function De(a, e, t) {
|
|
282
|
+
if (a == null) {
|
|
282
283
|
const s = /* @__PURE__ */ new Map();
|
|
283
284
|
for (const [l, c] of e.entries())
|
|
284
285
|
s.set(l, c + t);
|
|
285
286
|
return s;
|
|
286
287
|
}
|
|
287
|
-
const
|
|
288
|
-
const c = l + t, d =
|
|
288
|
+
const n = e.size, i = Array.from(e.entries()).map(([s, l]) => {
|
|
289
|
+
const c = l + t, d = a.getClosestStepDistances(c, n);
|
|
289
290
|
return { uuid: s, stepDistances: d };
|
|
290
291
|
}), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
291
292
|
i.sort((s, l) => s.stepDistances[0].dist - l.stepDistances[0].dist);
|
|
@@ -295,157 +296,157 @@ function De(n, e, t) {
|
|
|
295
296
|
}
|
|
296
297
|
return o;
|
|
297
298
|
}
|
|
298
|
-
function X(
|
|
299
|
+
function X(a, e, t, n, i) {
|
|
299
300
|
const r = e.get(t) ?? 0;
|
|
300
|
-
if (!
|
|
301
|
-
return r +
|
|
302
|
-
const o = r +
|
|
301
|
+
if (!a)
|
|
302
|
+
return r + n;
|
|
303
|
+
const o = r + n, s = a.minIndex, l = a.maxIndex, c = /* @__PURE__ */ new Set();
|
|
303
304
|
if (!i)
|
|
304
|
-
for (const [
|
|
305
|
-
|
|
306
|
-
const d = k(
|
|
305
|
+
for (const [g, v] of e.entries())
|
|
306
|
+
g !== t && c.add(a.valueToIndex(v));
|
|
307
|
+
const d = k(a.valueToIndex(o), s, l);
|
|
307
308
|
if (!c.has(d))
|
|
308
|
-
return
|
|
309
|
-
let h = null,
|
|
309
|
+
return a.indexToValue(d);
|
|
310
|
+
let h = null, u = 1 / 0;
|
|
310
311
|
const f = Math.min(Math.max(d - s, l - d), c.size + 1);
|
|
311
|
-
for (let
|
|
312
|
-
const v = d -
|
|
312
|
+
for (let g = 1; g <= f; g++) {
|
|
313
|
+
const v = d - g;
|
|
313
314
|
if (v >= s && !c.has(v)) {
|
|
314
|
-
const m =
|
|
315
|
-
h = v,
|
|
315
|
+
const m = a.indexToValue(v), b = Math.abs(m - o);
|
|
316
|
+
h = v, u = b;
|
|
316
317
|
}
|
|
317
|
-
const _ = d +
|
|
318
|
+
const _ = d + g;
|
|
318
319
|
if (_ <= l && !c.has(_)) {
|
|
319
|
-
const m =
|
|
320
|
-
(h == null || b <
|
|
320
|
+
const m = a.indexToValue(_), b = Math.abs(m - o);
|
|
321
|
+
(h == null || b < u) && (h = _, u = b);
|
|
321
322
|
}
|
|
322
323
|
if (h != null)
|
|
323
|
-
return
|
|
324
|
+
return a.indexToValue(h);
|
|
324
325
|
}
|
|
325
|
-
return h == null ? r :
|
|
326
|
+
return h == null ? r : a.indexToValue(h);
|
|
326
327
|
}
|
|
327
|
-
function Ie(
|
|
328
|
-
const i = J(
|
|
328
|
+
function Ie(a, e, t, n = 1) {
|
|
329
|
+
const i = J(n);
|
|
329
330
|
let r = e, o = !1;
|
|
330
331
|
for (let s = 0; s < i; s++) {
|
|
331
|
-
const l = Ve(
|
|
332
|
+
const l = Ve(a, r, t);
|
|
332
333
|
if (o ||= l.changed, r = l.entries, !l.changed)
|
|
333
334
|
break;
|
|
334
335
|
}
|
|
335
336
|
return { changed: o, entries: r };
|
|
336
337
|
}
|
|
337
|
-
function Ee(
|
|
338
|
+
function Ee(a, e, t, n, i = 1) {
|
|
338
339
|
const r = J(i);
|
|
339
340
|
if (r === 1)
|
|
340
|
-
return H(
|
|
341
|
+
return H(a, e, t, n);
|
|
341
342
|
const o = new Map(e);
|
|
342
343
|
let s = o.get(t);
|
|
343
344
|
for (let l = 0; l < r; l++) {
|
|
344
|
-
const c = H(
|
|
345
|
+
const c = H(a, o, t, n);
|
|
345
346
|
if (c === s)
|
|
346
347
|
break;
|
|
347
348
|
s = c, o.set(t, s);
|
|
348
349
|
}
|
|
349
350
|
return s;
|
|
350
351
|
}
|
|
351
|
-
function J(
|
|
352
|
-
const e = Number.isFinite(
|
|
352
|
+
function J(a) {
|
|
353
|
+
const e = Number.isFinite(a) ? Math.floor(a) : 1;
|
|
353
354
|
return Math.max(1, e);
|
|
354
355
|
}
|
|
355
|
-
function Ve(
|
|
356
|
-
const
|
|
356
|
+
function Ve(a, e, t) {
|
|
357
|
+
const n = /* @__PURE__ */ new Map(), i = t > 0 ? Se : Y, r = Array.from(e).sort((l, c) => i(l[1], c[1]));
|
|
357
358
|
let o = !1, s = !0;
|
|
358
359
|
for (const [l, c] of r)
|
|
359
|
-
if (
|
|
360
|
-
const d = H(
|
|
361
|
-
c === d && (s = !1), o ||= s,
|
|
360
|
+
if (n.set(l, c), s) {
|
|
361
|
+
const d = H(a, n, l, t);
|
|
362
|
+
c === d && (s = !1), o ||= s, n.set(l, d);
|
|
362
363
|
}
|
|
363
|
-
return { changed: o, entries:
|
|
364
|
+
return { changed: o, entries: n };
|
|
364
365
|
}
|
|
365
|
-
function H(
|
|
366
|
-
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } =
|
|
367
|
-
if (
|
|
368
|
-
let m = k(c +
|
|
366
|
+
function H(a, e, t, n) {
|
|
367
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
368
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
369
|
+
let m = k(c + n * o, s, l);
|
|
369
370
|
if (i)
|
|
370
371
|
return m;
|
|
371
372
|
const b = /* @__PURE__ */ new Set();
|
|
372
|
-
for (const [
|
|
373
|
-
|
|
373
|
+
for (const [P, S] of e)
|
|
374
|
+
P !== t && b.add(S);
|
|
374
375
|
for (; b.has(m) && m <= l && m >= s; )
|
|
375
|
-
m = k(m +
|
|
376
|
+
m = k(m + n * o, s, l);
|
|
376
377
|
return b.has(m) || m > l || m < s ? c : m;
|
|
377
378
|
}
|
|
378
379
|
const d = r.valueToIndex(c);
|
|
379
380
|
if (d === -1)
|
|
380
381
|
return c;
|
|
381
382
|
if (i) {
|
|
382
|
-
const m = k(d +
|
|
383
|
+
const m = k(d + n, r.minIndex, r.maxIndex);
|
|
383
384
|
return r.indexToValue(m);
|
|
384
385
|
}
|
|
385
386
|
const h = /* @__PURE__ */ new Set();
|
|
386
387
|
for (const [m, b] of e)
|
|
387
388
|
m !== t && h.add(r.valueToIndex(b));
|
|
388
|
-
let
|
|
389
|
-
const
|
|
389
|
+
let u = d, f = !1;
|
|
390
|
+
const g = r.minIndex, v = r.maxIndex;
|
|
390
391
|
let _ = 0;
|
|
391
|
-
for (; _ < Math.abs(v -
|
|
392
|
-
if (!h.has(
|
|
392
|
+
for (; _ < Math.abs(v - g) && (u += n, !(u < g || u > v)); ) {
|
|
393
|
+
if (!h.has(u)) {
|
|
393
394
|
f = !0;
|
|
394
395
|
break;
|
|
395
396
|
}
|
|
396
397
|
_++;
|
|
397
398
|
}
|
|
398
|
-
return f ? r.indexToValue(
|
|
399
|
+
return f ? r.indexToValue(u) : c;
|
|
399
400
|
}
|
|
400
|
-
function Te(
|
|
401
|
-
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } =
|
|
402
|
-
if (
|
|
401
|
+
function Te(a, e, t, n) {
|
|
402
|
+
const { allowValuesOverlap: i, stepsProvider: r, resolution: o, min: s, max: l } = a, c = e.get(t);
|
|
403
|
+
if (n = n > 0 ? 1 : -1, !r) {
|
|
403
404
|
const f = new Set(
|
|
404
405
|
Array.from(e).filter(([v]) => v !== t).map(([, v]) => v)
|
|
405
406
|
);
|
|
406
|
-
let
|
|
407
|
+
let g = n > 0 ? l : s;
|
|
407
408
|
if (i)
|
|
408
|
-
return
|
|
409
|
-
for (; f.has(
|
|
410
|
-
if (
|
|
411
|
-
|
|
409
|
+
return g;
|
|
410
|
+
for (; f.has(g); )
|
|
411
|
+
if (g -= n * o, n > 0 && g > l || n < 0 && g < s) {
|
|
412
|
+
g = c;
|
|
412
413
|
break;
|
|
413
414
|
}
|
|
414
|
-
return
|
|
415
|
+
return g;
|
|
415
416
|
}
|
|
416
417
|
if (i)
|
|
417
|
-
return
|
|
418
|
+
return n > 0 ? r.indexToValue(r.maxIndex) : r.indexToValue(r.minIndex);
|
|
418
419
|
const d = r.valueToIndex(c);
|
|
419
420
|
if (d === -1)
|
|
420
421
|
return c;
|
|
421
422
|
const h = new Set(
|
|
422
423
|
Array.from(e).filter(([f]) => f !== t).map(([, f]) => r.valueToIndex(f))
|
|
423
424
|
);
|
|
424
|
-
let
|
|
425
|
-
for (; h.has(
|
|
426
|
-
if (
|
|
427
|
-
|
|
425
|
+
let u = n > 0 ? r.maxIndex : r.minIndex;
|
|
426
|
+
for (; h.has(u); )
|
|
427
|
+
if (u -= n, n > 0 && u > l || n < 0 && u < s) {
|
|
428
|
+
u = d;
|
|
428
429
|
break;
|
|
429
430
|
}
|
|
430
|
-
return r.indexToValue(
|
|
431
|
+
return r.indexToValue(u);
|
|
431
432
|
}
|
|
432
|
-
function
|
|
433
|
-
const { stepsProvider:
|
|
434
|
-
if (
|
|
433
|
+
function Pe(a, e, t) {
|
|
434
|
+
const { stepsProvider: n, min: i, max: r } = a, o = /* @__PURE__ */ new Map(), s = Array.from(e).sort((c, d) => Y(c[1], d[1]));
|
|
435
|
+
if (n) {
|
|
435
436
|
let c = 0;
|
|
436
437
|
if (t > 0) {
|
|
437
|
-
const d = s[s.length - 1], h =
|
|
438
|
-
c =
|
|
438
|
+
const d = s[s.length - 1], h = n.valueToIndex(d[1]);
|
|
439
|
+
c = n.maxIndex - h;
|
|
439
440
|
} else {
|
|
440
|
-
const d = s[0], h =
|
|
441
|
-
c =
|
|
441
|
+
const d = s[0], h = n.valueToIndex(d[1]);
|
|
442
|
+
c = n.minIndex - h;
|
|
442
443
|
}
|
|
443
444
|
if (c === 0)
|
|
444
445
|
for (const [d, h] of s)
|
|
445
446
|
o.set(d, h);
|
|
446
447
|
for (const [d, h] of s) {
|
|
447
|
-
const
|
|
448
|
-
o.set(d,
|
|
448
|
+
const u = n.indexToValue(n.valueToIndex(h) + c);
|
|
449
|
+
o.set(d, u);
|
|
449
450
|
}
|
|
450
451
|
return o;
|
|
451
452
|
}
|
|
@@ -461,39 +462,39 @@ function Ce(n, e, t) {
|
|
|
461
462
|
o.set(c, d + l);
|
|
462
463
|
return o;
|
|
463
464
|
}
|
|
464
|
-
function Y(
|
|
465
|
-
return
|
|
465
|
+
function Y(a, e) {
|
|
466
|
+
return a - e;
|
|
466
467
|
}
|
|
467
|
-
function
|
|
468
|
-
return e -
|
|
468
|
+
function Se(a, e) {
|
|
469
|
+
return e - a;
|
|
469
470
|
}
|
|
470
|
-
function k(
|
|
471
|
-
return Math.max(e, Math.min(t,
|
|
471
|
+
function k(a, e, t) {
|
|
472
|
+
return Math.max(e, Math.min(t, a));
|
|
472
473
|
}
|
|
473
|
-
const
|
|
474
|
-
class
|
|
474
|
+
const Ce = te(y);
|
|
475
|
+
class Me extends ee {
|
|
475
476
|
constructor() {
|
|
476
477
|
super(...arguments), this._stepsProvider = null, this._popoverElement = B(), this._trackElement = B(), this.messages = se({}), this._onPointerMoveDragUpdate = (e) => {
|
|
477
478
|
this._updateDrag(this._mapEventToRange(e));
|
|
478
479
|
}, this._onPointerUpDragEnd = (e) => {
|
|
479
|
-
|
|
480
|
+
$(e) && this._endDrag();
|
|
480
481
|
}, this._onPointerCancelDragEnd = () => {
|
|
481
482
|
this._endDrag();
|
|
482
|
-
}, this._formatLabel = (e, t,
|
|
483
|
+
}, this._formatLabel = (e, t, n) => {
|
|
483
484
|
const i = le(this.messages._lang, t), r = this.labelFormatter;
|
|
484
485
|
if (!r)
|
|
485
|
-
return i.format(
|
|
486
|
-
const o = r(
|
|
487
|
-
return o ?? i.format(
|
|
486
|
+
return i.format(n);
|
|
487
|
+
const o = r(n, e, (s) => i.format(s));
|
|
488
|
+
return o ?? i.format(n);
|
|
488
489
|
}, 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(() => {
|
|
489
490
|
this._layoutLabelInputs();
|
|
490
|
-
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._activePart = null, this._sliderData =
|
|
491
|
+
}), this._labelInputsUpdateComplete = null, this._dragInfo = null, this._hasPopoverContent = !1, this._hasContentStart = !1, this._hasContentEnd = !1, this._activePart = null, this._sliderData = Ce(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.popoverLabel = "", this.popoverPlacement = "start", this.precision = this._sliderData.precision, 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 = C({ cancelable: !1 }), this.arcgisChange = C({ cancelable: !1 }), this.arcgisInput = C({ cancelable: !1 }), this.arcgisRangeChange = C({ cancelable: !1 });
|
|
491
492
|
}
|
|
492
493
|
static {
|
|
493
494
|
this.properties = { _dragInfo: 16, _hasPopoverContent: 16, _hasContentStart: 16, _hasContentEnd: 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, popoverLabel: 1, popoverPlacement: 3, precision: 11, rangeLabelsEditingEnabled: 5, rangeLabelsPlacement: 3, segmentsDraggingDisabled: 5, showRangeLabels: 7, steps: [9, { converter: {
|
|
494
495
|
fromAttribute(e) {
|
|
495
496
|
if (e.includes(","))
|
|
496
|
-
return e.split(",").filter((
|
|
497
|
+
return e.split(",").filter((n) => n.trim() !== "").map(parseFloat).filter((n) => Number.isFinite(n));
|
|
497
498
|
const t = parseFloat(e);
|
|
498
499
|
return Number.isFinite(t) ? t : void 0;
|
|
499
500
|
}
|
|
@@ -529,8 +530,8 @@ class Pe extends ee {
|
|
|
529
530
|
return this.disabled || this.values.length === 0 || this._invalid;
|
|
530
531
|
}
|
|
531
532
|
get _invalid() {
|
|
532
|
-
const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min,
|
|
533
|
-
return this.min >= this.max || !e || !t || !
|
|
533
|
+
const e = this.fullRangeMin == null || this.fullRangeMax == null || this.fullRangeMin < this.fullRangeMax, t = this.fullRangeMin == null || this.fullRangeMin <= this.min, n = this.fullRangeMax == null || this.fullRangeMax >= this.max;
|
|
534
|
+
return this.min >= this.max || !e || !t || !n;
|
|
534
535
|
}
|
|
535
536
|
get resolution() {
|
|
536
537
|
const e = (this._sliderData.max - this._sliderData.min) / this._trackWidthOrHeight;
|
|
@@ -551,6 +552,10 @@ class Pe extends ee {
|
|
|
551
552
|
const t = this.max != null && this.min != null && this.max - this.min > 10 ? 2 : this.precision;
|
|
552
553
|
this._numberFormatOptions = { maximumFractionDigits: t }, this._minFormatter = this._createFormatter("min", this._numberFormatOptions), this._maxFormatter = this._createFormatter("max", this._numberFormatOptions), this._valueFormatter = this._createFormatter("value", this._numberFormatOptions);
|
|
553
554
|
}
|
|
555
|
+
if (e.has("values")) {
|
|
556
|
+
const t = this._resolveFillPlacement(this.values.length > 1);
|
|
557
|
+
t !== this.fillPlacement && (this.fillPlacement = t);
|
|
558
|
+
}
|
|
554
559
|
}
|
|
555
560
|
updated(e) {
|
|
556
561
|
this._layoutLabelInputs();
|
|
@@ -576,20 +581,20 @@ class Pe extends ee {
|
|
|
576
581
|
if (this._labelInputsUpdateComplete = t, await t, t !== this._labelInputsUpdateComplete)
|
|
577
582
|
return;
|
|
578
583
|
this._labelInputsUpdateComplete = null;
|
|
579
|
-
const
|
|
580
|
-
if (!
|
|
584
|
+
const n = this._trackElement.value;
|
|
585
|
+
if (!n)
|
|
581
586
|
return;
|
|
582
|
-
const i =
|
|
587
|
+
const i = n.getBoundingClientRect();
|
|
583
588
|
for (const r of this._sliderData.entries.keys()) {
|
|
584
589
|
const o = this._activePart === "range" || this._activePart === r;
|
|
585
590
|
if (this.valueLabelsDisplay === "always" || o) {
|
|
586
|
-
const l =
|
|
591
|
+
const l = Re(this, r), c = q(this, r);
|
|
587
592
|
if (!l || !c)
|
|
588
593
|
continue;
|
|
589
|
-
const d = l.getBoundingClientRect(), h = c.getBoundingClientRect(),
|
|
594
|
+
const d = l.getBoundingClientRect(), h = c.getBoundingClientRect(), u = c.getLabelBoundingClientRect(), f = d.width / 2, g = Math.round(d.left + f), v = Math.round(u.width / 2);
|
|
590
595
|
let _ = h.width / 2;
|
|
591
|
-
const m = i.left - f, b = i.right + f,
|
|
592
|
-
|
|
596
|
+
const m = i.left - f, b = i.right + f, P = g - v, S = g + v;
|
|
597
|
+
P < m ? _ += P - m : S > b && (_ += S - b), c.style.transform = `translateX(${-Math.round(_)}px)`;
|
|
593
598
|
}
|
|
594
599
|
}
|
|
595
600
|
}
|
|
@@ -600,10 +605,10 @@ class Pe extends ee {
|
|
|
600
605
|
this._setActivePart(null);
|
|
601
606
|
}
|
|
602
607
|
_onTrackRangePointerDown(e) {
|
|
603
|
-
this._disabledOrInvalid ||
|
|
608
|
+
this._disabledOrInvalid || !$(e) || (e.preventDefault(), e.currentTarget.focus(), this._startDrag("range", this._mapEventToRange(e)));
|
|
604
609
|
}
|
|
605
610
|
async _onPointerDown(e) {
|
|
606
|
-
if (this._disabledOrInvalid ||
|
|
611
|
+
if (this._disabledOrInvalid || !$(e))
|
|
607
612
|
return;
|
|
608
613
|
const t = this.renderRoot.querySelector("arcgis-label-input[editing]");
|
|
609
614
|
if (e.target === t)
|
|
@@ -612,19 +617,19 @@ class Pe extends ee {
|
|
|
612
617
|
t.blur(), this._focusEntry(V(t));
|
|
613
618
|
return;
|
|
614
619
|
}
|
|
615
|
-
if (
|
|
620
|
+
if ($e(e.target) || this.values?.length > 1)
|
|
616
621
|
return;
|
|
617
|
-
const
|
|
622
|
+
const n = this._mapEventToRange(e), [i, r] = this._sliderData.entries.entries().next().value, o = n * this._fullRange + this._fullMin - r, s = z(this._fullMin, this._fullMax, r) / 100;
|
|
618
623
|
this._startDrag(i, s);
|
|
619
624
|
const l = X(this._stepsProvider, this._sliderData.entries, i, o, this.allowValuesOverlap);
|
|
620
625
|
this._setValue(i, l), this._focusEntry(i);
|
|
621
626
|
}
|
|
622
627
|
_onThumbPointerDown(e) {
|
|
623
628
|
const t = V(e.currentTarget);
|
|
624
|
-
if (
|
|
629
|
+
if (!$(e) || this._disabledOrInvalid || !t)
|
|
625
630
|
return;
|
|
626
|
-
const
|
|
627
|
-
e.target ===
|
|
631
|
+
const n = q(this, t);
|
|
632
|
+
e.target === n && n?.editing || (e.stopPropagation(), e.preventDefault(), this._focusEntry(t), this._startDrag(t, this._mapEventToRange(e)));
|
|
628
633
|
}
|
|
629
634
|
_endDrag() {
|
|
630
635
|
if (this._disabledOrInvalid)
|
|
@@ -633,8 +638,8 @@ class Pe extends ee {
|
|
|
633
638
|
let e = !1;
|
|
634
639
|
if (this._dragInfo) {
|
|
635
640
|
const { entries: t } = this._dragInfo;
|
|
636
|
-
for (const [
|
|
637
|
-
if (this._sliderData.getValue(
|
|
641
|
+
for (const [n, i] of t)
|
|
642
|
+
if (this._sliderData.getValue(n) !== i) {
|
|
638
643
|
e = !0;
|
|
639
644
|
break;
|
|
640
645
|
}
|
|
@@ -644,12 +649,12 @@ class Pe extends ee {
|
|
|
644
649
|
_startDrag(e, t) {
|
|
645
650
|
if (this._disabledOrInvalid)
|
|
646
651
|
return;
|
|
647
|
-
const { min:
|
|
648
|
-
let o =
|
|
652
|
+
const { min: n, max: i, values: r } = this;
|
|
653
|
+
let o = n, s = i;
|
|
649
654
|
if (this._setActivePart(e), e === "range") {
|
|
650
655
|
if (this.segmentsDraggingDisabled)
|
|
651
656
|
return;
|
|
652
|
-
o =
|
|
657
|
+
o = n - r[0], s = i - r[r.length - 1];
|
|
653
658
|
}
|
|
654
659
|
this._dragInfo = {
|
|
655
660
|
position: t,
|
|
@@ -661,10 +666,10 @@ class Pe extends ee {
|
|
|
661
666
|
_updateDrag(e) {
|
|
662
667
|
if (!this._dragInfo || !this._activePart)
|
|
663
668
|
return;
|
|
664
|
-
const { _activePart: t, _dragInfo: { position:
|
|
665
|
-
if (
|
|
669
|
+
const { _activePart: t, _dragInfo: { position: n, entries: i, minDiff: r, maxDiff: o } } = this;
|
|
670
|
+
if (n === e)
|
|
666
671
|
return;
|
|
667
|
-
let s = (e -
|
|
672
|
+
let s = (e - n) * this._fullRange;
|
|
668
673
|
if (t === "range") {
|
|
669
674
|
s = Math.min(o, Math.max(r, s));
|
|
670
675
|
const l = De(this._stepsProvider, i, s);
|
|
@@ -697,30 +702,30 @@ class Pe extends ee {
|
|
|
697
702
|
this._setActivePart(null);
|
|
698
703
|
}
|
|
699
704
|
_onRangeInputChange(e) {
|
|
700
|
-
const t = e.currentTarget,
|
|
705
|
+
const t = e.currentTarget, n = t.value, i = t.dataset.type;
|
|
701
706
|
let r = !1;
|
|
702
707
|
switch (e.stopPropagation(), i) {
|
|
703
708
|
case "min": {
|
|
704
|
-
|
|
709
|
+
n < this.max ? (this.min = n, r = !0) : t.value = this.min;
|
|
705
710
|
break;
|
|
706
711
|
}
|
|
707
712
|
case "max": {
|
|
708
|
-
|
|
713
|
+
n > this.min ? (this.max = n, r = !0) : t.value = this.max;
|
|
709
714
|
break;
|
|
710
715
|
}
|
|
711
716
|
}
|
|
712
717
|
r && this.arcgisRangeChange.emit();
|
|
713
718
|
}
|
|
714
719
|
_onValueInputChange(e) {
|
|
715
|
-
const t = e.currentTarget,
|
|
716
|
-
|
|
720
|
+
const t = e.currentTarget, n = V(t), i = t.value;
|
|
721
|
+
n && (e.stopPropagation(), this._setValue(n, i), t.value = this._sliderData.getValue(n));
|
|
717
722
|
}
|
|
718
723
|
_mapEventToRange(e) {
|
|
719
724
|
const t = this._trackElement.value?.getBoundingClientRect();
|
|
720
725
|
if (!t)
|
|
721
726
|
return 0;
|
|
722
|
-
const
|
|
723
|
-
return this.mirrored ? 1 -
|
|
727
|
+
const n = this.isHorizontal ? (e.clientX - t.left) / t.width : 1 - (e.clientY - t.top) / t.height;
|
|
728
|
+
return this.mirrored ? 1 - n : n;
|
|
724
729
|
}
|
|
725
730
|
_getPositionStyleForElement(e) {
|
|
726
731
|
const t = z(this._fullMin, this._fullMax, e);
|
|
@@ -729,23 +734,23 @@ class Pe extends ee {
|
|
|
729
734
|
};
|
|
730
735
|
}
|
|
731
736
|
_popoverSlotChange(e) {
|
|
732
|
-
this._hasPopoverContent =
|
|
737
|
+
this._hasPopoverContent = L(e);
|
|
733
738
|
}
|
|
734
739
|
_onContentStartSlotChange(e) {
|
|
735
|
-
this._hasContentStart =
|
|
740
|
+
this._hasContentStart = L(e);
|
|
736
741
|
}
|
|
737
742
|
_onContentEndSlotChange(e) {
|
|
738
|
-
this._hasContentEnd =
|
|
743
|
+
this._hasContentEnd = L(e);
|
|
739
744
|
}
|
|
740
745
|
_onThumbKeyDown(e) {
|
|
741
746
|
const t = V(e.currentTarget);
|
|
742
747
|
if (!t)
|
|
743
748
|
return;
|
|
744
|
-
const
|
|
745
|
-
if (!
|
|
749
|
+
const n = e.currentTarget.querySelector("arcgis-label-input");
|
|
750
|
+
if (!n || n.editing)
|
|
746
751
|
return;
|
|
747
752
|
if (e.key === p.confirmEdit) {
|
|
748
|
-
|
|
753
|
+
n.edit();
|
|
749
754
|
return;
|
|
750
755
|
}
|
|
751
756
|
const i = N(e, this.keyboardLargeStep, this.mirrored);
|
|
@@ -767,14 +772,14 @@ class Pe extends ee {
|
|
|
767
772
|
const t = N(e, this.keyboardLargeStep, this.mirrored);
|
|
768
773
|
if (t) {
|
|
769
774
|
e.preventDefault();
|
|
770
|
-
const { entries:
|
|
771
|
-
this._setValues(
|
|
775
|
+
const { entries: n } = Ie(this._getStepsConfiguration(), this._sliderData.entries, t.direction, t.count);
|
|
776
|
+
this._setValues(n);
|
|
772
777
|
return;
|
|
773
778
|
}
|
|
774
779
|
if (U(e.key)) {
|
|
775
780
|
e.preventDefault();
|
|
776
|
-
const
|
|
777
|
-
this._setValues(
|
|
781
|
+
const n = Pe(this._getStepsConfiguration(), this._sliderData.entries, this._getDirectionForHomeEndKey(e.key));
|
|
782
|
+
this._setValues(n);
|
|
778
783
|
}
|
|
779
784
|
}
|
|
780
785
|
_getStepsConfiguration() {
|
|
@@ -792,67 +797,82 @@ class Pe extends ee {
|
|
|
792
797
|
_setActivePart(e) {
|
|
793
798
|
this._activePart !== e && (this._activePart = e, this.arcgisActiveValueChange.emit());
|
|
794
799
|
}
|
|
800
|
+
_resolveFillPlacement(e) {
|
|
801
|
+
const { fillPlacement: t } = this;
|
|
802
|
+
return e ? t === "between" || t === "not-between" || t === "none" ? t : "between" : t === "start" || t === "end" || t === "none" ? t : "start";
|
|
803
|
+
}
|
|
795
804
|
render() {
|
|
796
|
-
return
|
|
805
|
+
return w`<div class=${M({
|
|
797
806
|
content: !0,
|
|
798
807
|
disabled: this._disabledOrInvalid
|
|
799
808
|
})} @pointerdown=${this._onPointerDown}>${this._renderContentStart()}${this._renderContentEnd()}${this._renderRangeLabel("min")}${this._renderTrackRange()}${this._renderRangeLabel("max")}${this._renderPopover()}</div>`;
|
|
800
809
|
}
|
|
801
810
|
_renderPopover() {
|
|
802
|
-
const { _activePart: e, layout: t, popoverPlacement:
|
|
811
|
+
const { _activePart: e, layout: t, popoverPlacement: n, valueLabelsPlacement: i, valueLabelsDisplay: r, popoverLabel: o } = this, s = e ? ze(e) ? e : "track-range" : "", l = this._hasPopoverContent && !!s, c = t === "horizontal" ? n === "start" ? "top" : "bottom" : n === "start" ? "left" : "right";
|
|
803
812
|
let d = 14;
|
|
804
|
-
return r !== "hidden" &&
|
|
813
|
+
return r !== "hidden" && n === i && (d += 24), w`<calcite-popover focus-trap-disabled .label=${o} .open=${l} .offsetDistance=${d} .placement=${c} .referenceElement=${s} scale=s trigger-disabled ${O(this._popoverElement)}><slot name=popover @slotchange=${this._popoverSlotChange}></slot></calcite-popover>`;
|
|
805
814
|
}
|
|
806
815
|
_renderContentStart() {
|
|
807
|
-
return
|
|
816
|
+
return w`<div class="content-start" .hidden=${!this._hasContentStart}><slot name=content-start @slotchange=${this._onContentStartSlotChange}></slot></div>`;
|
|
808
817
|
}
|
|
809
818
|
_renderContentEnd() {
|
|
810
|
-
return
|
|
819
|
+
return w`<div class="content-end" .hidden=${!this._hasContentEnd}><slot name=content-end @slotchange=${this._onContentEndSlotChange}></slot></div>`;
|
|
811
820
|
}
|
|
812
821
|
_renderTrackRange() {
|
|
813
|
-
return
|
|
822
|
+
return w`<div class="track-container">${this._renderTrack()}${this._renderThumbs()}</div>`;
|
|
814
823
|
}
|
|
815
824
|
_renderTrack() {
|
|
816
|
-
return
|
|
825
|
+
return w`<div class="track" ${O(this._trackElement)}>${this._renderTrackBackground()}${this._renderFillSegment()}</div>`;
|
|
817
826
|
}
|
|
818
827
|
_renderTrackBackground() {
|
|
819
|
-
const { max: e, min: t, fillPlacement:
|
|
828
|
+
const { max: e, min: t, fillPlacement: n, values: i } = this, r = i.length > 1;
|
|
820
829
|
let o = this._fullMin, s = this._fullMax;
|
|
821
830
|
const l = [];
|
|
822
|
-
return this._invalid ?
|
|
831
|
+
return this._invalid ? w`<div class="segment track-bounds" style=${R({ left: "0%", right: "0%", top: "0%", bottom: "0%" })}></div>` : (o < t && (l.push(this._renderSegment(o, t, [
|
|
823
832
|
this.mirrored ? "track-effective-end" : "track-effective-start",
|
|
824
|
-
!r &&
|
|
833
|
+
!r && n === "start" ? "track-fill" : null
|
|
825
834
|
])), o = t), s > e && (l.push(this._renderSegment(e, s, [
|
|
826
835
|
this.mirrored ? "track-effective-start" : "track-effective-end",
|
|
827
|
-
!r &&
|
|
836
|
+
!r && n === "end" ? "track-fill" : null
|
|
828
837
|
])), s = e), l.push(this._renderSegment(o, s, ["track-bounds"])), l);
|
|
829
838
|
}
|
|
830
839
|
_renderFillSegment() {
|
|
831
|
-
const { values: e,
|
|
840
|
+
const { values: e, min: t, max: n } = this;
|
|
832
841
|
if (!e?.length || this._invalid)
|
|
833
842
|
return;
|
|
834
|
-
const
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
843
|
+
const i = [...e].sort((h, u) => h - u), r = i[0], o = i[i.length - 1], s = this._resolveFillPlacement(i.length > 1);
|
|
844
|
+
let l;
|
|
845
|
+
switch (s) {
|
|
846
|
+
case "start":
|
|
847
|
+
t < r && (l = this._renderSegment(t, r, ["track-range"]));
|
|
848
|
+
break;
|
|
849
|
+
case "end":
|
|
850
|
+
n > o && (l = this._renderSegment(o, n, ["track-range"]));
|
|
851
|
+
break;
|
|
852
|
+
case "between":
|
|
853
|
+
i.length > 1 && (l = this._renderSegment(r, o, ["track-range"]));
|
|
854
|
+
break;
|
|
855
|
+
case "not-between":
|
|
856
|
+
i.length > 1 && (l = [this._renderSegment(t, r, ["track-range"]), this._renderSegment(o, n, ["track-range"])]);
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
if (!(i.length > 1))
|
|
860
|
+
return l;
|
|
861
|
+
const c = this.segmentsDraggingDisabled, d = this._renderSegment(r, o, [
|
|
862
|
+
"track-range-interactive",
|
|
863
|
+
s === "between" ? "filled" : null,
|
|
864
|
+
c ? null : "interactive",
|
|
865
|
+
this._activePart === "range" ? "active" : null
|
|
866
|
+
], {
|
|
848
867
|
id: "track-range",
|
|
849
|
-
onFocus:
|
|
850
|
-
onBlur:
|
|
851
|
-
onPointerDown:
|
|
852
|
-
onKeyDown:
|
|
868
|
+
onFocus: c ? void 0 : this._onTrackFocus,
|
|
869
|
+
onBlur: c ? void 0 : this._onTrackBlur,
|
|
870
|
+
onPointerDown: c ? void 0 : this._onTrackRangePointerDown,
|
|
871
|
+
onKeyDown: c ? void 0 : this._onTrackRangeKeyDown
|
|
853
872
|
});
|
|
873
|
+
return [l, d];
|
|
854
874
|
}
|
|
855
|
-
_renderSegment(e, t,
|
|
875
|
+
_renderSegment(e, t, n, i) {
|
|
856
876
|
const { _fullMin: r, _fullMax: o, mirrored: s } = this, l = [
|
|
857
877
|
z(r, o, j(e, r, o)),
|
|
858
878
|
100 - z(r, o, j(t, r, o))
|
|
@@ -864,59 +884,59 @@ class Pe extends ee {
|
|
|
864
884
|
} : {
|
|
865
885
|
top: `${l[1]}%`,
|
|
866
886
|
bottom: `${l[0]}%`
|
|
867
|
-
}, d =
|
|
868
|
-
return
|
|
887
|
+
}, d = ne("segment", ...n);
|
|
888
|
+
return w`<div id=${i?.id ?? E} class=${M(d)} style=${R(c)} .tabIndex=${i?.onPointerDown ? 0 : -1} @focus=${i?.onFocus} @blur=${i?.onBlur} @pointerdown=${i?.onPointerDown} @keydown=${i?.onKeyDown}></div>`;
|
|
869
889
|
}
|
|
870
890
|
_renderThumbs() {
|
|
871
|
-
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([,
|
|
872
|
-
return ie(t, ([
|
|
891
|
+
const { _sliderData: e } = this, t = Array.from(e.entries).filter(([, n]) => n >= this._fullMin && n <= this._fullMax);
|
|
892
|
+
return ie(t, ([n, i]) => this._renderThumb(n, i));
|
|
873
893
|
}
|
|
874
894
|
_renderThumb(e, t) {
|
|
875
|
-
const { valueLabelsDisplay:
|
|
876
|
-
return Z(e,
|
|
895
|
+
const { valueLabelsDisplay: n } = this, i = this._disabledOrInvalid, r = this._activePart === e || this._activePart === "range", o = this._activePart === "range" || this._activePart === e, s = n === "always" || n === "auto" && o, l = this.isHorizontal, c = l ? "horizontal" : "vertical", d = `label-${e}`, h = l ? "center" : this.valueLabelsPlacement === "start" ? "end" : "start";
|
|
896
|
+
return Z(e, w`<div id=${e ?? E} .ariaLabel=${this.messages.sliderValue} aria-labelledby=${(n ? d : void 0) ?? E} .ariaOrientation=${c} .ariaValueMin=${this.min} .ariaValueMax=${this.max} .ariaValueNow=${t} .ariaValueText=${this._valueFormatter(t)} class=${M({
|
|
877
897
|
thumb: !0,
|
|
878
898
|
active: r
|
|
879
|
-
})} data-entry=${e ?? E} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${
|
|
899
|
+
})} data-entry=${e ?? E} @pointerdown=${this._onThumbPointerDown} @focus=${this._onThumbFocus} @blur=${this._onThumbBlur} @keydown=${this._onThumbKeyDown} role=slider style=${R({
|
|
880
900
|
...this._getPositionStyleForElement(t),
|
|
881
901
|
"z-index": this._activePart === e ? 1 : 0
|
|
882
902
|
})} .tabIndex=${i ? -1 : 0}><span class="handle"></span><arcgis-label-input .alignment=${h} class="label" .hidden=${!s} id=${d ?? E} .labelFormatter=${this._valueFormatter} @focus=${i ? void 0 : this._onThumbFocus} @blur=${i ? void 0 : this._onThumbBlur} @arcgisChange=${this._onValueInputChange} .readOnly=${!this.valueLabelsEditingEnabled} tabindex=-1 .value=${t} ${O(this._makeResizeRef())}></arcgis-label-input></div>`);
|
|
883
903
|
}
|
|
884
904
|
_renderRangeLabel(e) {
|
|
885
905
|
let t = "center";
|
|
886
|
-
return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")),
|
|
906
|
+
return this.isHorizontal && (t = e === "min" ? "end" : "start", this.rangeLabelsPlacement === "end" && (t = t === "end" ? "start" : "end"), this.mirrored && (t = t === "end" ? "start" : "end")), w`<arcgis-label-input .alignment=${t} class=${M(e)} data-type=${e ?? E} .hidden=${!this.showRangeLabels} .labelFormatter=${this[`_${e}Formatter`]} @arcgisChange=${this._onRangeInputChange} .readOnly=${!this.rangeLabelsEditingEnabled} .value=${this[e]}></arcgis-label-input>`;
|
|
887
907
|
}
|
|
888
908
|
}
|
|
889
|
-
function
|
|
890
|
-
return "dataset" in
|
|
909
|
+
function $e(a) {
|
|
910
|
+
return "dataset" in a && a.tagName === "ARCGIS-LABEL-INPUT" && (a.dataset.type === "min" || a.dataset.type === "max");
|
|
891
911
|
}
|
|
892
|
-
function V(
|
|
893
|
-
const e =
|
|
912
|
+
function V(a) {
|
|
913
|
+
const e = ae(a, "[data-entry]");
|
|
894
914
|
return e && "dataset" in e ? e.dataset.entry : null;
|
|
895
915
|
}
|
|
896
|
-
function ze(
|
|
897
|
-
return typeof
|
|
916
|
+
function ze(a) {
|
|
917
|
+
return typeof a != null && a !== "range";
|
|
898
918
|
}
|
|
899
|
-
function Fe(
|
|
900
|
-
return e ?
|
|
919
|
+
function Fe(a, e) {
|
|
920
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"]`) : null;
|
|
901
921
|
}
|
|
902
|
-
function
|
|
903
|
-
return e ?
|
|
922
|
+
function Re(a, e) {
|
|
923
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] span.handle`) : null;
|
|
904
924
|
}
|
|
905
|
-
function q(
|
|
906
|
-
return e ?
|
|
925
|
+
function q(a, e) {
|
|
926
|
+
return e ? a.renderRoot.querySelector(`div[data-entry="${e}"] arcgis-label-input`) : null;
|
|
907
927
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
928
|
+
function $(a) {
|
|
929
|
+
return a.isPrimary && a.button === 0;
|
|
910
930
|
}
|
|
911
|
-
const
|
|
912
|
-
function z(
|
|
913
|
-
const
|
|
914
|
-
return Number.parseFloat(i.toFixed(
|
|
931
|
+
const Le = 5;
|
|
932
|
+
function z(a, e, t) {
|
|
933
|
+
const n = e - a, i = (t - a) / n * 100;
|
|
934
|
+
return Number.parseFloat(i.toFixed(Le));
|
|
915
935
|
}
|
|
916
|
-
function j(
|
|
917
|
-
return Math.max(e, Math.min(t,
|
|
936
|
+
function j(a, e, t) {
|
|
937
|
+
return Math.max(e, Math.min(t, a));
|
|
918
938
|
}
|
|
919
|
-
Q("arcgis-slider",
|
|
939
|
+
Q("arcgis-slider", Me);
|
|
920
940
|
export {
|
|
921
|
-
|
|
941
|
+
Me as ArcgisSlider
|
|
922
942
|
};
|