@eox/itemfilter 0.8.0 → 0.8.2
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/eox-itemfilter.js +938 -878
- package/dist/eox-itemfilter.umd.cjs +111 -73
- package/package.json +1 -1
- package/test/state.cy.ts +73 -0
package/dist/eox-itemfilter.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const Xt = window, ti = Xt.ShadowRoot && (Xt.ShadyCSS === void 0 || Xt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, dn = Symbol(), ji = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let Gs = class {
|
|
8
8
|
constructor(e, t, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== dn)
|
|
10
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
11
|
this.cssText = e, this.t = t;
|
|
12
12
|
}
|
|
13
13
|
get styleSheet() {
|
|
14
14
|
let e = this.o;
|
|
15
15
|
const t = this.t;
|
|
16
|
-
if (
|
|
16
|
+
if (ti && e === void 0) {
|
|
17
17
|
const i = t !== void 0 && t.length === 1;
|
|
18
|
-
i && (e =
|
|
18
|
+
i && (e = ji.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && ji.set(t, e));
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
@@ -23,27 +23,27 @@ let Gs = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const i = document.createElement("style"), n =
|
|
26
|
+
const Ks = (r) => new Gs(typeof r == "string" ? r : r + "", void 0, dn), Js = (r, e) => {
|
|
27
|
+
ti ? r.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
|
28
|
+
const i = document.createElement("style"), n = Xt.litNonce;
|
|
29
29
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = t.cssText, r.appendChild(i);
|
|
30
30
|
});
|
|
31
|
-
},
|
|
31
|
+
}, Ni = ti ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((e) => {
|
|
32
32
|
let t = "";
|
|
33
33
|
for (const i of e.cssRules)
|
|
34
34
|
t += i.cssText;
|
|
35
|
-
return
|
|
35
|
+
return Ks(t);
|
|
36
36
|
})(r) : r;
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
var
|
|
43
|
-
const
|
|
42
|
+
var Sr;
|
|
43
|
+
const Vt = window, Bi = Vt.trustedTypes, Zs = Bi ? Bi.emptyScript : "", Fi = Vt.reactiveElementPolyfillSupport, jr = { toAttribute(r, e) {
|
|
44
44
|
switch (e) {
|
|
45
45
|
case Boolean:
|
|
46
|
-
r = r ?
|
|
46
|
+
r = r ? Zs : null;
|
|
47
47
|
break;
|
|
48
48
|
case Object:
|
|
49
49
|
case Array:
|
|
@@ -68,8 +68,8 @@ const Xt = window, ji = Xt.trustedTypes, Js = ji ? ji.emptyScript : "", Ni = Xt.
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return t;
|
|
71
|
-
} },
|
|
72
|
-
let
|
|
71
|
+
} }, fn = (r, e) => e !== r && (e == e || r == r), Or = { attribute: !0, type: String, converter: jr, reflect: !1, hasChanged: fn }, Nr = "finalized";
|
|
72
|
+
let ft = class extends HTMLElement {
|
|
73
73
|
constructor() {
|
|
74
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
75
75
|
}
|
|
@@ -85,7 +85,7 @@ let dt = class extends HTMLElement {
|
|
|
85
85
|
n !== void 0 && (this._$Ev.set(n, i), e.push(n));
|
|
86
86
|
}), e;
|
|
87
87
|
}
|
|
88
|
-
static createProperty(e, t =
|
|
88
|
+
static createProperty(e, t = Or) {
|
|
89
89
|
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
90
90
|
const i = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, i, t);
|
|
91
91
|
n !== void 0 && Object.defineProperty(this.prototype, e, n);
|
|
@@ -100,12 +100,12 @@ let dt = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(e) {
|
|
103
|
-
return this.elementProperties.get(e) ||
|
|
103
|
+
return this.elementProperties.get(e) || Or;
|
|
104
104
|
}
|
|
105
105
|
static finalize() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(Nr))
|
|
107
107
|
return !1;
|
|
108
|
-
this[
|
|
108
|
+
this[Nr] = !0;
|
|
109
109
|
const e = Object.getPrototypeOf(this);
|
|
110
110
|
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
111
111
|
const t = this.properties, i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
@@ -119,9 +119,9 @@ let dt = class extends HTMLElement {
|
|
|
119
119
|
if (Array.isArray(e)) {
|
|
120
120
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
121
121
|
for (const n of i)
|
|
122
|
-
t.unshift(
|
|
122
|
+
t.unshift(Ni(n));
|
|
123
123
|
} else
|
|
124
|
-
e !== void 0 && t.push(
|
|
124
|
+
e !== void 0 && t.push(Ni(e));
|
|
125
125
|
return t;
|
|
126
126
|
}
|
|
127
127
|
static _$Ep(e, t) {
|
|
@@ -148,7 +148,7 @@ let dt = class extends HTMLElement {
|
|
|
148
148
|
createRenderRoot() {
|
|
149
149
|
var e;
|
|
150
150
|
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
151
|
-
return
|
|
151
|
+
return Js(t, this.constructor.elementStyles), t;
|
|
152
152
|
}
|
|
153
153
|
connectedCallback() {
|
|
154
154
|
var e;
|
|
@@ -169,11 +169,11 @@ let dt = class extends HTMLElement {
|
|
|
169
169
|
attributeChangedCallback(e, t, i) {
|
|
170
170
|
this._$AK(e, i);
|
|
171
171
|
}
|
|
172
|
-
_$EO(e, t, i =
|
|
172
|
+
_$EO(e, t, i = Or) {
|
|
173
173
|
var n;
|
|
174
174
|
const s = this.constructor._$Ep(e, i);
|
|
175
175
|
if (s !== void 0 && i.reflect === !0) {
|
|
176
|
-
const o = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter :
|
|
176
|
+
const o = (((n = i.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? i.converter : jr).toAttribute(t, i.type);
|
|
177
177
|
this._$El = e, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$El = null;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -181,13 +181,13 @@ let dt = class extends HTMLElement {
|
|
|
181
181
|
var i;
|
|
182
182
|
const n = this.constructor, s = n._$Ev.get(e);
|
|
183
183
|
if (s !== void 0 && this._$El !== s) {
|
|
184
|
-
const o = n.getPropertyOptions(s), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter :
|
|
184
|
+
const o = n.getPropertyOptions(s), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : jr;
|
|
185
185
|
this._$El = s, this[s] = c.fromAttribute(t, o.type), this._$El = null;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
requestUpdate(e, t, i) {
|
|
189
189
|
let n = !0;
|
|
190
|
-
e !== void 0 && (((i = i || this.constructor.getPropertyOptions(e)).hasChanged ||
|
|
190
|
+
e !== void 0 && (((i = i || this.constructor.getPropertyOptions(e)).hasChanged || fn)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), i.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, i))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
191
191
|
}
|
|
192
192
|
async _$Ej() {
|
|
193
193
|
this.isUpdatePending = !0;
|
|
@@ -248,37 +248,37 @@ let dt = class extends HTMLElement {
|
|
|
248
248
|
firstUpdated(e) {
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
|
|
251
|
+
ft[Nr] = !0, ft.elementProperties = /* @__PURE__ */ new Map(), ft.elementStyles = [], ft.shadowRootOptions = { mode: "open" }, Fi == null || Fi({ ReactiveElement: ft }), ((Sr = Vt.reactiveElementVersions) !== null && Sr !== void 0 ? Sr : Vt.reactiveElementVersions = []).push("1.6.2");
|
|
252
252
|
/**
|
|
253
253
|
* @license
|
|
254
254
|
* Copyright 2017 Google LLC
|
|
255
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
256
256
|
*/
|
|
257
|
-
var
|
|
258
|
-
const
|
|
259
|
-
\f\r]`,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
257
|
+
var Pr;
|
|
258
|
+
const Wt = window, gt = Wt.trustedTypes, Hi = gt ? gt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Br = "$lit$", We = `lit$${(Math.random() + "").slice(9)}$`, pn = "?" + We, Qs = `<${pn}>`, nt = document, Mt = () => nt.createComment(""), At = (r) => r === null || typeof r != "object" && typeof r != "function", gn = Array.isArray, eo = (r) => gn(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", Cr = `[
|
|
259
|
+
\f\r]`, Et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Yi = />/g, Qe = RegExp(`>|${Cr}(?:([^\\s"'>=/]+)(${Cr}*=${Cr}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), zi = /'/g, Xi = /"/g, vn = /^(?:script|style|textarea|title)$/i, to = (r) => (e, ...t) => ({ _$litType$: r, strings: e, values: t }), he = to(1), De = Symbol.for("lit-noChange"), ne = Symbol.for("lit-nothing"), Vi = /* @__PURE__ */ new WeakMap(), rt = nt.createTreeWalker(nt, 129, null, !1), ro = (r, e) => {
|
|
261
261
|
const t = r.length - 1, i = [];
|
|
262
|
-
let n, s = e === 2 ? "<svg>" : "", o =
|
|
262
|
+
let n, s = e === 2 ? "<svg>" : "", o = Et;
|
|
263
263
|
for (let a = 0; a < t; a++) {
|
|
264
264
|
const u = r[a];
|
|
265
265
|
let g, v, _ = -1, E = 0;
|
|
266
266
|
for (; E < u.length && (o.lastIndex = E, v = o.exec(u), v !== null); )
|
|
267
|
-
E = o.lastIndex, o ===
|
|
267
|
+
E = o.lastIndex, o === Et ? v[1] === "!--" ? o = Ui : v[1] !== void 0 ? o = Yi : v[2] !== void 0 ? (vn.test(v[2]) && (n = RegExp("</" + v[2], "g")), o = Qe) : v[3] !== void 0 && (o = Qe) : o === Qe ? v[0] === ">" ? (o = n ?? Et, _ = -1) : v[1] === void 0 ? _ = -2 : (_ = o.lastIndex - v[2].length, g = v[1], o = v[3] === void 0 ? Qe : v[3] === '"' ? Xi : zi) : o === Xi || o === zi ? o = Qe : o === Ui || o === Yi ? o = Et : (o = Qe, n = void 0);
|
|
268
268
|
const k = o === Qe && r[a + 1].startsWith("/>") ? " " : "";
|
|
269
|
-
s += o ===
|
|
269
|
+
s += o === Et ? u + Qs : _ >= 0 ? (i.push(g), u.slice(0, _) + Br + u.slice(_) + We + k) : u + We + (_ === -2 ? (i.push(void 0), a) : k);
|
|
270
270
|
}
|
|
271
271
|
const c = s + (r[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
|
272
272
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
|
273
273
|
throw Error("invalid template strings array");
|
|
274
|
-
return [
|
|
274
|
+
return [Hi !== void 0 ? Hi.createHTML(c) : c, i];
|
|
275
275
|
};
|
|
276
276
|
class St {
|
|
277
277
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
278
278
|
let n;
|
|
279
279
|
this.parts = [];
|
|
280
280
|
let s = 0, o = 0;
|
|
281
|
-
const c = e.length - 1, a = this.parts, [u, g] =
|
|
281
|
+
const c = e.length - 1, a = this.parts, [u, g] = ro(e, t);
|
|
282
282
|
if (this.el = St.createElement(u, i), rt.currentNode = this.el.content, t === 2) {
|
|
283
283
|
const v = this.el.content, _ = v.firstChild;
|
|
284
284
|
_.remove(), v.append(..._.childNodes);
|
|
@@ -288,33 +288,33 @@ class St {
|
|
|
288
288
|
if (n.hasAttributes()) {
|
|
289
289
|
const v = [];
|
|
290
290
|
for (const _ of n.getAttributeNames())
|
|
291
|
-
if (_.endsWith(
|
|
291
|
+
if (_.endsWith(Br) || _.startsWith(We)) {
|
|
292
292
|
const E = g[o++];
|
|
293
293
|
if (v.push(_), E !== void 0) {
|
|
294
|
-
const k = n.getAttribute(E.toLowerCase() +
|
|
295
|
-
a.push({ type: 1, index: s, name: F[2], strings: k, ctor: F[1] === "." ?
|
|
294
|
+
const k = n.getAttribute(E.toLowerCase() + Br).split(We), F = /([.?@])?(.*)/.exec(E);
|
|
295
|
+
a.push({ type: 1, index: s, name: F[2], strings: k, ctor: F[1] === "." ? no : F[1] === "?" ? oo : F[1] === "@" ? ao : tr });
|
|
296
296
|
} else
|
|
297
297
|
a.push({ type: 6, index: s });
|
|
298
298
|
}
|
|
299
299
|
for (const _ of v)
|
|
300
300
|
n.removeAttribute(_);
|
|
301
301
|
}
|
|
302
|
-
if (
|
|
303
|
-
const v = n.textContent.split(
|
|
302
|
+
if (vn.test(n.tagName)) {
|
|
303
|
+
const v = n.textContent.split(We), _ = v.length - 1;
|
|
304
304
|
if (_ > 0) {
|
|
305
|
-
n.textContent =
|
|
305
|
+
n.textContent = gt ? gt.emptyScript : "";
|
|
306
306
|
for (let E = 0; E < _; E++)
|
|
307
307
|
n.append(v[E], Mt()), rt.nextNode(), a.push({ type: 2, index: ++s });
|
|
308
308
|
n.append(v[_], Mt());
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
} else if (n.nodeType === 8)
|
|
312
|
-
if (n.data ===
|
|
312
|
+
if (n.data === pn)
|
|
313
313
|
a.push({ type: 2, index: s });
|
|
314
314
|
else {
|
|
315
315
|
let v = -1;
|
|
316
|
-
for (; (v = n.data.indexOf(
|
|
317
|
-
a.push({ type: 7, index: s }), v +=
|
|
316
|
+
for (; (v = n.data.indexOf(We, v + 1)) !== -1; )
|
|
317
|
+
a.push({ type: 7, index: s }), v += We.length - 1;
|
|
318
318
|
}
|
|
319
319
|
s++;
|
|
320
320
|
}
|
|
@@ -324,15 +324,15 @@ class St {
|
|
|
324
324
|
return i.innerHTML = e, i;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function vt(r, e, t = r, i) {
|
|
328
328
|
var n, s, o, c;
|
|
329
329
|
if (e === De)
|
|
330
330
|
return e;
|
|
331
331
|
let a = i !== void 0 ? (n = t._$Co) === null || n === void 0 ? void 0 : n[i] : t._$Cl;
|
|
332
332
|
const u = At(e) ? void 0 : e._$litDirective$;
|
|
333
|
-
return (a == null ? void 0 : a.constructor) !== u && ((s = a == null ? void 0 : a._$AO) === null || s === void 0 || s.call(a, !1), u === void 0 ? a = void 0 : (a = new u(r), a._$AT(r, t, i)), i !== void 0 ? ((o = (c = t)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[i] = a : t._$Cl = a), a !== void 0 && (e =
|
|
333
|
+
return (a == null ? void 0 : a.constructor) !== u && ((s = a == null ? void 0 : a._$AO) === null || s === void 0 || s.call(a, !1), u === void 0 ? a = void 0 : (a = new u(r), a._$AT(r, t, i)), i !== void 0 ? ((o = (c = t)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[i] = a : t._$Cl = a), a !== void 0 && (e = vt(r, a._$AS(r, e.values), a, i)), e;
|
|
334
334
|
}
|
|
335
|
-
class
|
|
335
|
+
class io {
|
|
336
336
|
constructor(e, t) {
|
|
337
337
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
338
338
|
}
|
|
@@ -350,7 +350,7 @@ class ro {
|
|
|
350
350
|
for (; u !== void 0; ) {
|
|
351
351
|
if (c === u.index) {
|
|
352
352
|
let g;
|
|
353
|
-
u.type === 2 ? g = new Ot(o, o.nextSibling, this, e) : u.type === 1 ? g = new u.ctor(o, u.name, u.strings, this, e) : u.type === 6 && (g = new
|
|
353
|
+
u.type === 2 ? g = new Ot(o, o.nextSibling, this, e) : u.type === 1 ? g = new u.ctor(o, u.name, u.strings, this, e) : u.type === 6 && (g = new lo(o, this, e)), this._$AV.push(g), u = n[++a];
|
|
354
354
|
}
|
|
355
355
|
c !== (u == null ? void 0 : u.index) && (o = rt.nextNode(), c++);
|
|
356
356
|
}
|
|
@@ -365,7 +365,7 @@ class ro {
|
|
|
365
365
|
class Ot {
|
|
366
366
|
constructor(e, t, i, n) {
|
|
367
367
|
var s;
|
|
368
|
-
this.type = 2, this._$AH =
|
|
368
|
+
this.type = 2, this._$AH = ne, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = n, this._$Cp = (s = n == null ? void 0 : n.isConnected) === null || s === void 0 || s;
|
|
369
369
|
}
|
|
370
370
|
get _$AU() {
|
|
371
371
|
var e, t;
|
|
@@ -383,7 +383,7 @@ class Ot {
|
|
|
383
383
|
return this._$AB;
|
|
384
384
|
}
|
|
385
385
|
_$AI(e, t = this) {
|
|
386
|
-
e =
|
|
386
|
+
e = vt(this, e, t), At(e) ? e === ne || e == null || e === "" ? (this._$AH !== ne && this._$AR(), this._$AH = ne) : e !== this._$AH && e !== De && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : eo(e) ? this.T(e) : this._(e);
|
|
387
387
|
}
|
|
388
388
|
k(e) {
|
|
389
389
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -392,7 +392,7 @@ class Ot {
|
|
|
392
392
|
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
|
393
393
|
}
|
|
394
394
|
_(e) {
|
|
395
|
-
this._$AH !==
|
|
395
|
+
this._$AH !== ne && At(this._$AH) ? this._$AA.nextSibling.data = e : this.$(nt.createTextNode(e)), this._$AH = e;
|
|
396
396
|
}
|
|
397
397
|
g(e) {
|
|
398
398
|
var t;
|
|
@@ -400,16 +400,16 @@ class Ot {
|
|
|
400
400
|
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === s)
|
|
401
401
|
this._$AH.v(i);
|
|
402
402
|
else {
|
|
403
|
-
const o = new
|
|
403
|
+
const o = new io(s, this), c = o.u(this.options);
|
|
404
404
|
o.v(i), this.$(c), this._$AH = o;
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
_$AC(e) {
|
|
408
|
-
let t =
|
|
409
|
-
return t === void 0 &&
|
|
408
|
+
let t = Vi.get(e.strings);
|
|
409
|
+
return t === void 0 && Vi.set(e.strings, t = new St(e)), t;
|
|
410
410
|
}
|
|
411
411
|
T(e) {
|
|
412
|
-
|
|
412
|
+
gn(this._$AH) || (this._$AH = [], this._$AR());
|
|
413
413
|
const t = this._$AH;
|
|
414
414
|
let i, n = 0;
|
|
415
415
|
for (const s of e)
|
|
@@ -428,9 +428,9 @@ class Ot {
|
|
|
428
428
|
this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
class
|
|
431
|
+
class tr {
|
|
432
432
|
constructor(e, t, i, n, s) {
|
|
433
|
-
this.type = 1, this._$AH =
|
|
433
|
+
this.type = 1, this._$AH = ne, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = ne;
|
|
434
434
|
}
|
|
435
435
|
get tagName() {
|
|
436
436
|
return this.element.tagName;
|
|
@@ -442,45 +442,45 @@ class er {
|
|
|
442
442
|
const s = this.strings;
|
|
443
443
|
let o = !1;
|
|
444
444
|
if (s === void 0)
|
|
445
|
-
e =
|
|
445
|
+
e = vt(this, e, t, 0), o = !At(e) || e !== this._$AH && e !== De, o && (this._$AH = e);
|
|
446
446
|
else {
|
|
447
447
|
const c = e;
|
|
448
448
|
let a, u;
|
|
449
449
|
for (e = s[0], a = 0; a < s.length - 1; a++)
|
|
450
|
-
u =
|
|
450
|
+
u = vt(this, c[i + a], t, a), u === De && (u = this._$AH[a]), o || (o = !At(u) || u !== this._$AH[a]), u === ne ? e = ne : e !== ne && (e += (u ?? "") + s[a + 1]), this._$AH[a] = u;
|
|
451
451
|
}
|
|
452
452
|
o && !n && this.j(e);
|
|
453
453
|
}
|
|
454
454
|
j(e) {
|
|
455
|
-
e ===
|
|
455
|
+
e === ne ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
class
|
|
458
|
+
class no extends tr {
|
|
459
459
|
constructor() {
|
|
460
460
|
super(...arguments), this.type = 3;
|
|
461
461
|
}
|
|
462
462
|
j(e) {
|
|
463
|
-
this.element[this.name] = e ===
|
|
463
|
+
this.element[this.name] = e === ne ? void 0 : e;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
const
|
|
467
|
-
class
|
|
466
|
+
const so = gt ? gt.emptyScript : "";
|
|
467
|
+
class oo extends tr {
|
|
468
468
|
constructor() {
|
|
469
469
|
super(...arguments), this.type = 4;
|
|
470
470
|
}
|
|
471
471
|
j(e) {
|
|
472
|
-
e && e !==
|
|
472
|
+
e && e !== ne ? this.element.setAttribute(this.name, so) : this.element.removeAttribute(this.name);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
class
|
|
475
|
+
class ao extends tr {
|
|
476
476
|
constructor(e, t, i, n, s) {
|
|
477
477
|
super(e, t, i, n, s), this.type = 5;
|
|
478
478
|
}
|
|
479
479
|
_$AI(e, t = this) {
|
|
480
480
|
var i;
|
|
481
|
-
if ((e = (i =
|
|
481
|
+
if ((e = (i = vt(this, e, t, 0)) !== null && i !== void 0 ? i : ne) === De)
|
|
482
482
|
return;
|
|
483
|
-
const n = this._$AH, s = e ===
|
|
483
|
+
const n = this._$AH, s = e === ne && n !== ne || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, o = e !== ne && (n === ne || s);
|
|
484
484
|
s && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(e) {
|
|
@@ -488,7 +488,7 @@ class oo extends er {
|
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call((i = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && i !== void 0 ? i : this.element, e) : this._$AH.handleEvent(e);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class lo {
|
|
492
492
|
constructor(e, t, i) {
|
|
493
493
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
494
494
|
}
|
|
@@ -496,12 +496,12 @@ class ao {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(e) {
|
|
499
|
-
|
|
499
|
+
vt(this, e);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const Wi = Wt.litHtmlPolyfillSupport;
|
|
503
|
+
Wi == null || Wi(St, Ot), ((Pr = Wt.litHtmlVersions) !== null && Pr !== void 0 ? Pr : Wt.litHtmlVersions = []).push("2.7.4");
|
|
504
|
+
const co = (r, e, t) => {
|
|
505
505
|
var i, n;
|
|
506
506
|
const s = (i = t == null ? void 0 : t.renderBefore) !== null && i !== void 0 ? i : e;
|
|
507
507
|
let o = s._$litPart$;
|
|
@@ -516,8 +516,8 @@ const lo = (r, e, t) => {
|
|
|
516
516
|
* Copyright 2017 Google LLC
|
|
517
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
518
518
|
*/
|
|
519
|
-
var
|
|
520
|
-
let
|
|
519
|
+
var kr, Lr;
|
|
520
|
+
let Pe = class extends ft {
|
|
521
521
|
constructor() {
|
|
522
522
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
523
523
|
}
|
|
@@ -528,7 +528,7 @@ let Oe = class extends dt {
|
|
|
528
528
|
}
|
|
529
529
|
update(e) {
|
|
530
530
|
const t = this.render();
|
|
531
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
531
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = co(t, this.renderRoot, this.renderOptions);
|
|
532
532
|
}
|
|
533
533
|
connectedCallback() {
|
|
534
534
|
var e;
|
|
@@ -542,10 +542,10 @@ let Oe = class extends dt {
|
|
|
542
542
|
return De;
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
((
|
|
545
|
+
Pe.finalized = !0, Pe._$litElement$ = !0, (kr = globalThis.litElementHydrateSupport) === null || kr === void 0 || kr.call(globalThis, { LitElement: Pe });
|
|
546
|
+
const qi = globalThis.litElementPolyfillSupport;
|
|
547
|
+
qi == null || qi({ LitElement: Pe });
|
|
548
|
+
((Lr = globalThis.litElementVersions) !== null && Lr !== void 0 ? Lr : globalThis.litElementVersions = []).push("3.3.2");
|
|
549
549
|
/**
|
|
550
550
|
* @license
|
|
551
551
|
* Copyright 2017 Google LLC
|
|
@@ -562,17 +562,17 @@ const Ge = (r) => (e) => typeof e == "function" ? ((t, i) => (customElements.def
|
|
|
562
562
|
* Copyright 2017 Google LLC
|
|
563
563
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
564
564
|
*/
|
|
565
|
-
const
|
|
565
|
+
const uo = (r, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
|
|
566
566
|
t.createProperty(e.key, r);
|
|
567
567
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
|
|
568
568
|
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
|
|
569
569
|
}, finisher(t) {
|
|
570
570
|
t.createProperty(e.key, r);
|
|
571
|
-
} },
|
|
571
|
+
} }, ho = (r, e, t) => {
|
|
572
572
|
e.constructor.createProperty(t, r);
|
|
573
573
|
};
|
|
574
|
-
function
|
|
575
|
-
return (e, t) => t !== void 0 ?
|
|
574
|
+
function Ae(r) {
|
|
575
|
+
return (e, t) => t !== void 0 ? ho(r, e, t) : uo(r, e);
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
578
578
|
* @license
|
|
@@ -580,21 +580,21 @@ function ke(r) {
|
|
|
580
580
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
581
581
|
*/
|
|
582
582
|
function Pt(r) {
|
|
583
|
-
return
|
|
583
|
+
return Ae({ ...r, state: !0 });
|
|
584
584
|
}
|
|
585
585
|
/**
|
|
586
586
|
* @license
|
|
587
587
|
* Copyright 2021 Google LLC
|
|
588
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
589
|
*/
|
|
590
|
-
var
|
|
591
|
-
((
|
|
590
|
+
var Tr;
|
|
591
|
+
((Tr = window.HTMLSlotElement) === null || Tr === void 0 ? void 0 : Tr.prototype.assignedElements) != null;
|
|
592
592
|
/**
|
|
593
593
|
* @license
|
|
594
594
|
* Copyright 2021 Google LLC
|
|
595
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
596
596
|
*/
|
|
597
|
-
function
|
|
597
|
+
function ht(r, e, t) {
|
|
598
598
|
return r ? e() : t == null ? void 0 : t();
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
@@ -614,8 +614,8 @@ function* it(r, e) {
|
|
|
614
614
|
* Copyright 2017 Google LLC
|
|
615
615
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
616
616
|
*/
|
|
617
|
-
const et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 },
|
|
618
|
-
class
|
|
617
|
+
const et = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, mn = (r) => (...e) => ({ _$litDirective$: r, values: e });
|
|
618
|
+
class yn {
|
|
619
619
|
constructor(e) {
|
|
620
620
|
}
|
|
621
621
|
get _$AU() {
|
|
@@ -636,13 +636,13 @@ class mn {
|
|
|
636
636
|
* Copyright 2017 Google LLC
|
|
637
637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
638
638
|
*/
|
|
639
|
-
let
|
|
639
|
+
let Fr = class extends yn {
|
|
640
640
|
constructor(e) {
|
|
641
|
-
if (super(e), this.et =
|
|
641
|
+
if (super(e), this.et = ne, e.type !== et.CHILD)
|
|
642
642
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
643
643
|
}
|
|
644
644
|
render(e) {
|
|
645
|
-
if (e ===
|
|
645
|
+
if (e === ne || e == null)
|
|
646
646
|
return this.ft = void 0, this.et = e;
|
|
647
647
|
if (e === De)
|
|
648
648
|
return e;
|
|
@@ -655,70 +655,70 @@ let Nr = class extends mn {
|
|
|
655
655
|
return t.raw = t, this.ft = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
656
656
|
}
|
|
657
657
|
};
|
|
658
|
-
|
|
659
|
-
const
|
|
658
|
+
Fr.directiveName = "unsafeHTML", Fr.resultType = 1;
|
|
659
|
+
const Gi = mn(Fr);
|
|
660
660
|
/**
|
|
661
661
|
* @license
|
|
662
662
|
* Copyright 2020 Google LLC
|
|
663
663
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
664
664
|
*/
|
|
665
|
-
const
|
|
666
|
-
if ((r == null ? void 0 : r.r) ===
|
|
665
|
+
const bn = Symbol.for(""), fo = (r) => {
|
|
666
|
+
if ((r == null ? void 0 : r.r) === bn)
|
|
667
667
|
return r == null ? void 0 : r._$litStatic$;
|
|
668
|
-
},
|
|
668
|
+
}, Yt = (r) => ({ _$litStatic$: r, r: bn }), Ki = /* @__PURE__ */ new Map(), po = (r) => (e, ...t) => {
|
|
669
669
|
const i = t.length;
|
|
670
670
|
let n, s;
|
|
671
671
|
const o = [], c = [];
|
|
672
672
|
let a, u = 0, g = !1;
|
|
673
673
|
for (; u < i; ) {
|
|
674
|
-
for (a = e[u]; u < i && (s = t[u], (n =
|
|
674
|
+
for (a = e[u]; u < i && (s = t[u], (n = fo(s)) !== void 0); )
|
|
675
675
|
a += n + e[++u], g = !0;
|
|
676
676
|
u !== i && c.push(s), o.push(a), u++;
|
|
677
677
|
}
|
|
678
678
|
if (u === i && o.push(e[i]), g) {
|
|
679
679
|
const v = o.join("$$lit$$");
|
|
680
|
-
(e =
|
|
680
|
+
(e = Ki.get(v)) === void 0 && (o.raw = o, Ki.set(v, e = o)), t = c;
|
|
681
681
|
}
|
|
682
682
|
return r(e, ...t);
|
|
683
|
-
},
|
|
683
|
+
}, Rr = po(he);
|
|
684
684
|
(() => {
|
|
685
|
-
var r = Object.defineProperty, e = Math.pow, t = (l, d, y) => d in l ? r(l, d, { enumerable: !0, configurable: !0, writable: !0, value: y }) : l[d] = y, i = (l, d, y) => (t(l, typeof d != "symbol" ? d + "" : d, y), y), n = (l, d) => ` ${d && d.length > 0 ? d.map((y) => `<link rel="stylesheet" href="${y}" />`).join("") : ""} <style> ${l} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`, s = ":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}", o = "pointers-overlap", c = "pointers-min-distance", a = "pointers-max-distance", u = "range-dragging", g = "data", v = "min", _ = "max", E = "step", k = "round", F = "type",
|
|
686
|
-
let
|
|
687
|
-
return
|
|
688
|
-
}, ue = (l) => !isNaN(parseFloat(l)) && isFinite(l),
|
|
685
|
+
var r = Object.defineProperty, e = Math.pow, t = (l, d, y) => d in l ? r(l, d, { enumerable: !0, configurable: !0, writable: !0, value: y }) : l[d] = y, i = (l, d, y) => (t(l, typeof d != "symbol" ? d + "" : d, y), y), n = (l, d) => ` ${d && d.length > 0 ? d.map((y) => `<link rel="stylesheet" href="${y}" />`).join("") : ""} <style> ${l} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`, s = ":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}", o = "pointers-overlap", c = "pointers-min-distance", a = "pointers-max-distance", u = "range-dragging", g = "data", v = "min", _ = "max", E = "step", k = "round", F = "type", se = "theme", te = "rtl", f = "btt", p = "disabled", b = "keyboard-disabled", S = "mousewheel-disabled", w = "slider-width", M = "slider-height", P = "slider-radius", L = "slider-bg", I = "slider-bg-hover", W = "slider-bg-fill", ee = "pointer-width", C = "pointer-height", $ = "pointer-radius", A = "pointer-bg", N = "pointer-bg-hover", O = "pointer-bg-focus", H = "pointer-shadow", X = "pointer-shadow-hover", Z = "pointer-shadow-focus", le = "pointer-border", K = "pointer-border-hover", ve = "pointer-border-focus", Le = "animate-onclick", Te = "css-links", ye = "vertical", Se = "horizontal", je = (l, d, y, m, T) => {
|
|
686
|
+
let U = d - l;
|
|
687
|
+
return U === 0 ? y : (m - y) * (T - l) / U + y;
|
|
688
|
+
}, ue = (l) => !isNaN(parseFloat(l)) && isFinite(l), oe = (l, d) => ue(l) ? Number(l) : d, ot = (l, d) => d === 0 ? 0 : Math.round(l / d) * d, at = (l, d = 1 / 0) => {
|
|
689
689
|
if (d === 1 / 0)
|
|
690
690
|
return l;
|
|
691
691
|
let y = e(10, d);
|
|
692
692
|
return Math.round(l * y) / y;
|
|
693
|
-
}, be = (l) => l == null ? !1 : typeof l == "boolean" ? l : l.trim().toLowerCase() === "true",
|
|
693
|
+
}, be = (l) => l == null ? !1 : typeof l == "boolean" ? l : l.trim().toLowerCase() === "true", Qn = (l, d) => {
|
|
694
694
|
l.dispatchEvent(new CustomEvent("onPointerClicked", { detail: { $pointer: d } }));
|
|
695
|
-
}, Qn = (l, d) => {
|
|
696
|
-
l.dispatchEvent(new CustomEvent("onMouseDown", { detail: { nativeEvent: d } }));
|
|
697
695
|
}, es = (l, d) => {
|
|
698
|
-
l.dispatchEvent(new CustomEvent("
|
|
696
|
+
l.dispatchEvent(new CustomEvent("onMouseDown", { detail: { nativeEvent: d } }));
|
|
699
697
|
}, ts = (l, d) => {
|
|
700
|
-
l.dispatchEvent(new CustomEvent("
|
|
698
|
+
l.dispatchEvent(new CustomEvent("onMouseUp", { detail: { nativeEvent: d } }));
|
|
701
699
|
}, rs = (l, d) => {
|
|
700
|
+
l.dispatchEvent(new CustomEvent("onKeyDown", { detail: { nativeEvent: d } }));
|
|
701
|
+
}, is = (l, d) => {
|
|
702
702
|
if (!d || d.length <= 0)
|
|
703
703
|
return;
|
|
704
|
-
let y = d.map((T) => ue(T) ?
|
|
704
|
+
let y = d.map((T) => ue(T) ? oe(T, T) : T), m = { values: y || [] };
|
|
705
705
|
m.value = y[0], m.value0 = y[0], m.value1 = y[0];
|
|
706
706
|
for (let T = 1; T < y.length; T++)
|
|
707
707
|
m[`value${T + 1}`] = y[T];
|
|
708
708
|
l.dispatchEvent(new CustomEvent("change", { detail: m }));
|
|
709
|
-
},
|
|
710
|
-
let m = 0, T,
|
|
709
|
+
}, rr = (l, d, y) => {
|
|
710
|
+
let m = 0, T, U, q, R, D = !1, G = (z, ce, me, ge, de, fe) => {
|
|
711
711
|
let we = m;
|
|
712
|
-
me !== void 0 && z > me && (z = me),
|
|
712
|
+
me !== void 0 && z > me && (z = me), ce !== void 0 && z < ce && (z = ce), m = z;
|
|
713
713
|
let _e = m;
|
|
714
|
-
return (ge === ye && fe || ge ===
|
|
715
|
-
}, Q = (z) => z === d || d.contains(z), B = (z,
|
|
716
|
-
T = z,
|
|
714
|
+
return (ge === ye && fe || ge === Se && de) && (_e = 100 - _e), ge === ye ? d.style.top = `${_e}%` : d.style.left = `${_e}%`, we !== m;
|
|
715
|
+
}, Q = (z) => z === d || d.contains(z), B = (z, ce, me, ge) => {
|
|
716
|
+
T = z, U = ce, q = me, R = ge;
|
|
717
717
|
}, ie = (z) => {
|
|
718
718
|
D = z, d.classList.toggle("disabled", D), D ? d.setAttribute("aria-disabled", "true") : d.hasAttribute("aria-disabled") && d.removeAttribute("aria-disabled");
|
|
719
|
-
},
|
|
720
|
-
|
|
721
|
-
}, xe = (z) => d.getAttribute(z),
|
|
719
|
+
}, Oe = (z, ce) => {
|
|
720
|
+
ce == null ? d.removeAttribute(z) : d.setAttribute(z, ce);
|
|
721
|
+
}, xe = (z) => d.getAttribute(z), Y = (z) => {
|
|
722
722
|
if (!D) {
|
|
723
723
|
switch (z.key) {
|
|
724
724
|
case "ArrowLeft": {
|
|
@@ -726,11 +726,11 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
726
726
|
break;
|
|
727
727
|
}
|
|
728
728
|
case "ArrowRight": {
|
|
729
|
-
z.preventDefault(), typeof
|
|
729
|
+
z.preventDefault(), typeof U == "function" && U(y);
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
732
|
case "ArrowUp": {
|
|
733
|
-
z.preventDefault(), typeof
|
|
733
|
+
z.preventDefault(), typeof q == "function" && q(y);
|
|
734
734
|
break;
|
|
735
735
|
}
|
|
736
736
|
case "ArrowDown": {
|
|
@@ -738,21 +738,21 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
738
738
|
break;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
|
|
741
|
+
rs(l, z);
|
|
742
742
|
}
|
|
743
743
|
}, J = () => {
|
|
744
|
-
D ||
|
|
744
|
+
D || Qn(l, d);
|
|
745
745
|
};
|
|
746
|
-
return d.className = `pointer pointer-${y}`, d.addEventListener("keydown",
|
|
746
|
+
return d.className = `pointer pointer-${y}`, d.addEventListener("keydown", Y), d.addEventListener("click", J), { $pointer: d, get percent() {
|
|
747
747
|
return m;
|
|
748
748
|
}, get disabled() {
|
|
749
749
|
return D;
|
|
750
750
|
}, set disabled(z) {
|
|
751
751
|
ie(z);
|
|
752
|
-
}, updatePosition:
|
|
753
|
-
d.removeEventListener("keydown",
|
|
752
|
+
}, updatePosition: G, isClicked: Q, setCallbacks: B, setAttr: Oe, getAttr: xe, destroy: () => {
|
|
753
|
+
d.removeEventListener("keydown", Y), d.removeEventListener("click", J), d.remove();
|
|
754
754
|
} };
|
|
755
|
-
},
|
|
755
|
+
}, ns = (l) => {
|
|
756
756
|
if (l == null)
|
|
757
757
|
return;
|
|
758
758
|
if (Array.isArray(l))
|
|
@@ -761,26 +761,26 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
761
761
|
return;
|
|
762
762
|
let d = l.split(","), y = [], m = !0;
|
|
763
763
|
for (let T = 0; T < d.length; T++) {
|
|
764
|
-
let
|
|
765
|
-
|
|
764
|
+
let U = d[T].trim();
|
|
765
|
+
U !== "" && (y.push(U), ue(U) || (m = !1));
|
|
766
766
|
}
|
|
767
767
|
return m ? y.map((T) => Number(T)) : y;
|
|
768
|
-
},
|
|
768
|
+
}, ss = (l, d) => d ? d.findIndex((y) => y === l || y.toString().trim() === l.toString().trim()) : -1, os = (l) => ({ updatePosition: (d, y, m, T) => {
|
|
769
769
|
if (y.length <= 0)
|
|
770
770
|
return;
|
|
771
|
-
let
|
|
772
|
-
d === ye ? (l.style.removeProperty("width"), l.style.removeProperty("right"), l.style.removeProperty("left"),
|
|
773
|
-
} }),
|
|
771
|
+
let U = y.length === 1, q = y[0], R = y[y.length - 1];
|
|
772
|
+
d === ye ? (l.style.removeProperty("width"), l.style.removeProperty("right"), l.style.removeProperty("left"), U ? l.style.height = `${q}%` : l.style.height = `${Math.abs(q - R)}%`, T ? (l.style.bottom = "0%", U ? l.style.top = "auto" : l.style.top = `${Math.min(100 - R, 100 - q)}%`) : (l.style.bottom = "auto", U ? l.style.top = "0%" : l.style.top = `${Math.min(q, R)}%`)) : (l.style.removeProperty("height"), l.style.removeProperty("top"), l.style.removeProperty("bottom"), U ? l.style.width = `${q}%` : l.style.width = `${Math.abs(q - R)}%`, m ? (l.style.right = "0%", U ? l.style.left = "auto" : l.style.left = `${Math.min(100 - R, 100 - q)}%`) : (l.style.right = "auto", U ? l.style.left = "0%" : l.style.left = `${Math.min(q, R)}%`));
|
|
773
|
+
} }), pi = "--animate-onclick", as = "--width", ls = "--height", cs = "--panel-bg-border-radius", us = "--panel-bg", hs = "--panel-bg-hover", ds = "--panel-bg-fill", fs = "--pointer-width", ps = "--pointer-height", gs = "--pointer-border-radius", vs = "--pointer-bg", ms = "--pointer-bg-hover", ys = "--pointer-bg-focus", bs = "--pointer-shadow", xs = "--pointer-shadow-hover", $s = "--pointer-shadow-focus", ws = "--pointer-border", _s = "--pointer-border-hover", Es = "--pointer-border-focus", kt = (l, d, y) => {
|
|
774
774
|
let m = /* @__PURE__ */ new Map();
|
|
775
775
|
for (let T of l.attributes) {
|
|
776
|
-
let
|
|
777
|
-
if (!d.test(
|
|
776
|
+
let U = T.nodeName.trim().toLowerCase();
|
|
777
|
+
if (!d.test(U))
|
|
778
778
|
continue;
|
|
779
|
-
let
|
|
779
|
+
let q = U.replace(/\D/g, "").trim(), R = q === "" || q === "0" || q === "1" ? 0 : oe(q, 0) - 1, D = y && typeof y == "function" ? y(T.value) : T.value;
|
|
780
780
|
m.set(R, D);
|
|
781
781
|
}
|
|
782
782
|
return m;
|
|
783
|
-
},
|
|
783
|
+
}, Ms = (l) => {
|
|
784
784
|
if (!l)
|
|
785
785
|
return null;
|
|
786
786
|
let d = l.getAttribute(Te);
|
|
@@ -790,72 +790,72 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
790
790
|
for (let T of y)
|
|
791
791
|
T.trim() !== "" && m.push(T.trim());
|
|
792
792
|
return m;
|
|
793
|
-
},
|
|
794
|
-
let m = null, T = [],
|
|
793
|
+
}, gi = [[as, w, "sliderWidth", null], [ls, M, "sliderHeight", null], [cs, P, "sliderRadius", null], [us, L, "sliderBg", null], [hs, I, "sliderBgHover", null], [ds, W, "sliderBgFill", null], [fs, ee, "pointer#Width", /^pointer([0-9]*)-width$/], [ps, C, "pointer#Height", /^pointer([0-9]*)-height$/], [gs, $, "pointer#Radius", /^pointer([0-9]*)-radius$/], [vs, A, "pointer#Bg", /^pointer([0-9]*)-bg$/], [ms, N, "pointer#BgHover", /^pointer([0-9]*)-bg-hover$/], [ys, O, "pointer#BgFocus", /^pointer([0-9]*)-bg-focus$/], [bs, H, "pointer#Shadow", /^pointer([0-9]*)-shadow$/], [xs, X, "pointer#ShadowHover", /^pointer([0-9]*)-shadow-hover$/], [$s, Z, "pointer#ShadowFocus", /^pointer([0-9]*)-shadow-focus$/], [ws, le, "pointer#Border", /^pointer([0-9]*)-border$/], [_s, K, "pointer#BorderHover", /^pointer([0-9]*)-border-hover$/], [Es, ve, "pointer#BorderFocus", /^pointer([0-9]*)-border-focus$/]], As = (l, d, y) => {
|
|
794
|
+
let m = null, T = [], U = /* @__PURE__ */ new Map(), q = (Y, J = d) => {
|
|
795
795
|
let z = [...J.classList];
|
|
796
|
-
for (let
|
|
797
|
-
|
|
796
|
+
for (let ce of z)
|
|
797
|
+
ce.startsWith(Y) && d.classList.remove(ce);
|
|
798
798
|
}, R = () => {
|
|
799
|
-
|
|
800
|
-
let
|
|
801
|
-
for (let J of
|
|
802
|
-
|
|
803
|
-
}, D = (
|
|
804
|
-
m =
|
|
805
|
-
},
|
|
799
|
+
q("shape");
|
|
800
|
+
let Y = d.querySelectorAll(".pointer");
|
|
801
|
+
for (let J of Y)
|
|
802
|
+
q("shape", J);
|
|
803
|
+
}, D = (Y) => {
|
|
804
|
+
m = Y, q("theme-"), typeof Y == "string" && d.classList.add(`theme-${Y}`);
|
|
805
|
+
}, G = () => {
|
|
806
806
|
if (R(), !(T.length <= 0)) {
|
|
807
807
|
d.classList.add("shape", `shape-${T[0]}`);
|
|
808
|
-
for (let
|
|
809
|
-
let J = T[
|
|
808
|
+
for (let Y = 1; Y < T.length; Y++) {
|
|
809
|
+
let J = T[Y];
|
|
810
810
|
if (!J)
|
|
811
811
|
continue;
|
|
812
|
-
let z = d.querySelector(`.pointer-${
|
|
812
|
+
let z = d.querySelector(`.pointer-${Y}`);
|
|
813
813
|
!z || z.classList.add("shape", `shape-${J}`);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
}, Q = (
|
|
817
|
-
T[
|
|
816
|
+
}, Q = (Y, J) => {
|
|
817
|
+
T[Y] = J, G();
|
|
818
818
|
}, B = () => {
|
|
819
819
|
R();
|
|
820
|
-
let
|
|
821
|
-
if (!(
|
|
822
|
-
for (let J of
|
|
820
|
+
let Y = kt(l, /^pointer([0-9]*)-shape$/);
|
|
821
|
+
if (!(Y.size <= 0)) {
|
|
822
|
+
for (let J of Y) {
|
|
823
823
|
let z = J[0];
|
|
824
824
|
T[z] = J[1];
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
G();
|
|
827
827
|
}
|
|
828
|
-
}, ie = (
|
|
829
|
-
let
|
|
830
|
-
if (!
|
|
828
|
+
}, ie = (Y, J) => `${Y}-${J}`, Oe = (Y, J, z) => {
|
|
829
|
+
let ce = y[z];
|
|
830
|
+
if (!ce)
|
|
831
831
|
return;
|
|
832
|
-
let me = z === 0 ? d :
|
|
832
|
+
let me = z === 0 ? d : ce.$pointer;
|
|
833
833
|
if (J == null) {
|
|
834
|
-
|
|
834
|
+
U.has(ie(Y, z)) && U.delete(ie(Y, z)), me.style.removeProperty(Y);
|
|
835
835
|
return;
|
|
836
836
|
}
|
|
837
|
-
|
|
838
|
-
}, xe = (
|
|
837
|
+
U.set(ie(Y, z), J), me.style.setProperty(Y, J);
|
|
838
|
+
}, xe = (Y, J) => U.get(ie(Y, J));
|
|
839
839
|
return (() => {
|
|
840
|
-
for (let
|
|
841
|
-
let [J, z,
|
|
840
|
+
for (let Y of gi) {
|
|
841
|
+
let [J, z, ce, me] = Y;
|
|
842
842
|
if (me) {
|
|
843
843
|
let de = kt(l, me);
|
|
844
844
|
for (let fe of de) {
|
|
845
845
|
let we = fe[0], _e = fe[1];
|
|
846
|
-
|
|
846
|
+
Oe(J, _e, we);
|
|
847
847
|
}
|
|
848
848
|
} else {
|
|
849
849
|
let de = l.getAttribute(z);
|
|
850
|
-
|
|
850
|
+
Oe(J, de, 0);
|
|
851
851
|
}
|
|
852
852
|
let ge = [];
|
|
853
|
-
if (
|
|
854
|
-
ge.push([
|
|
853
|
+
if (ce.indexOf("#") === -1)
|
|
854
|
+
ge.push([ce, 0]);
|
|
855
855
|
else {
|
|
856
|
-
ge.push([
|
|
856
|
+
ge.push([ce.replace("#", ""), 0]), ge.push([ce.replace("#", "0"), 0]), ge.push([ce.replace("#", "1"), 0]);
|
|
857
857
|
for (let de = 1; de < y.length; de++)
|
|
858
|
-
ge.push([
|
|
858
|
+
ge.push([ce.replace("#", (de + 1).toString()), de]);
|
|
859
859
|
}
|
|
860
860
|
for (let de of ge)
|
|
861
861
|
try {
|
|
@@ -863,25 +863,25 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
863
863
|
Object.prototype.hasOwnProperty.call(l, fe) || Object.defineProperty(l, fe, { get() {
|
|
864
864
|
return xe(J, we);
|
|
865
865
|
}, set: (_e) => {
|
|
866
|
-
|
|
866
|
+
Oe(J, _e, we);
|
|
867
867
|
} });
|
|
868
868
|
} catch (fe) {
|
|
869
869
|
console.error(fe);
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
|
-
D(l.getAttribute(
|
|
873
|
-
})(), { setStyle:
|
|
872
|
+
D(l.getAttribute(se)), B();
|
|
873
|
+
})(), { setStyle: Oe, getStyle: xe, get theme() {
|
|
874
874
|
return m;
|
|
875
|
-
}, set theme(
|
|
876
|
-
D(
|
|
875
|
+
}, set theme(Y) {
|
|
876
|
+
D(Y);
|
|
877
877
|
}, get pointerShapes() {
|
|
878
878
|
return T;
|
|
879
879
|
}, setPointerShape: Q };
|
|
880
|
-
}, lt = "animate-on-click",
|
|
881
|
-
let T = [],
|
|
880
|
+
}, lt = "animate-on-click", vi = "range-dragging", Ss = (l, d, y, m) => {
|
|
881
|
+
let T = [], U = (Q) => {
|
|
882
882
|
for (let B of T)
|
|
883
883
|
B.update && typeof B.update == "function" && B.update(Q);
|
|
884
|
-
},
|
|
884
|
+
}, q = () => {
|
|
885
885
|
for (let Q of T)
|
|
886
886
|
Q.destroy && typeof Q.destroy == "function" && Q.destroy();
|
|
887
887
|
}, R = (Q, B) => {
|
|
@@ -897,7 +897,7 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
897
897
|
console.error("defineSettersGetters error:", ie);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
},
|
|
900
|
+
}, G = (Q) => {
|
|
901
901
|
var B;
|
|
902
902
|
if (!Q.css)
|
|
903
903
|
return;
|
|
@@ -908,27 +908,27 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
908
908
|
if (window.tcRangeSliderPlugins)
|
|
909
909
|
for (let Q of window.tcRangeSliderPlugins) {
|
|
910
910
|
let B = Q();
|
|
911
|
-
T.push(B), B.init && typeof B.init == "function" && (B.init(l, d, y, m), D(B),
|
|
911
|
+
T.push(B), B.init && typeof B.init == "function" && (B.init(l, d, y, m), D(B), G(B));
|
|
912
912
|
}
|
|
913
|
-
}, update:
|
|
914
|
-
},
|
|
913
|
+
}, update: U, onAttrChange: R, destroy: q };
|
|
914
|
+
}, Os = 10, Ps = (l, d) => {
|
|
915
915
|
let y = /* @__PURE__ */ new Map(), m = /^value([0-9]*)$/;
|
|
916
916
|
for (let R of l.attributes) {
|
|
917
917
|
let D = R.nodeName.trim().toLowerCase();
|
|
918
918
|
if (!m.test(D))
|
|
919
919
|
continue;
|
|
920
|
-
let
|
|
920
|
+
let G = D.replace("value", "").trim(), Q = G === "" || G === "0" || G === "1" ? 0 : oe(G, 0) - 1, B = ue(R.value) ? oe(R.value, 0) : R.value;
|
|
921
921
|
y.set(Q, B);
|
|
922
922
|
}
|
|
923
|
-
let T = Math.max(...Array.from(y.keys())),
|
|
924
|
-
|
|
925
|
-
let
|
|
923
|
+
let T = Math.max(...Array.from(y.keys())), U = [];
|
|
924
|
+
U.push([rr(l, d, 0), y.get(0)]);
|
|
925
|
+
let q = d;
|
|
926
926
|
for (let R = 1; R <= T; R++) {
|
|
927
927
|
let D = d.cloneNode(!0);
|
|
928
|
-
|
|
928
|
+
q.after(D), q = D, U.push([rr(l, D, R), y.get(R)]);
|
|
929
929
|
}
|
|
930
|
-
return
|
|
931
|
-
},
|
|
930
|
+
return U;
|
|
931
|
+
}, mi = (l, d, y, m, T, U, q) => {
|
|
932
932
|
try {
|
|
933
933
|
Object.defineProperty(l, m, { configurable: !0, get() {
|
|
934
934
|
if (!d)
|
|
@@ -937,7 +937,7 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
937
937
|
if (!R)
|
|
938
938
|
return;
|
|
939
939
|
let D = d.getTextValue(R.percent);
|
|
940
|
-
return ue(D) ?
|
|
940
|
+
return ue(D) ? oe(D, D) : D;
|
|
941
941
|
}, set: (R) => {
|
|
942
942
|
d.pointers[y] ? d == null || d.setValue(R, y) : d == null || d.addPointer(R);
|
|
943
943
|
} }), Object.defineProperty(l, T, { configurable: !0, get() {
|
|
@@ -945,12 +945,12 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
945
945
|
return (D = (R = d == null ? void 0 : d.pointers[y]) == null ? void 0 : R.getAttr("aria-label")) != null ? D : void 0;
|
|
946
946
|
}, set: (R) => {
|
|
947
947
|
!d || d.setAriaLabel(y, R);
|
|
948
|
-
} }), Object.defineProperty(l,
|
|
948
|
+
} }), Object.defineProperty(l, U, { configurable: !0, get() {
|
|
949
949
|
var R, D;
|
|
950
950
|
return (D = (R = d == null ? void 0 : d.styles) == null ? void 0 : R.pointerShapes[y]) != null ? D : null;
|
|
951
951
|
}, set: (R) => {
|
|
952
952
|
!d || !d.styles || d.styles.setPointerShape(y, R);
|
|
953
|
-
} }), Object.defineProperty(l,
|
|
953
|
+
} }), Object.defineProperty(l, q, { configurable: !0, get() {
|
|
954
954
|
var R;
|
|
955
955
|
return (R = d == null ? void 0 : d.pointers[y].disabled) != null ? R : !1;
|
|
956
956
|
}, set: (R) => {
|
|
@@ -962,167 +962,167 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
962
962
|
} catch (R) {
|
|
963
963
|
console.error(R);
|
|
964
964
|
}
|
|
965
|
-
},
|
|
965
|
+
}, Cs = (l, d) => {
|
|
966
966
|
let y = [["value", "ariaLabel", "pointerShape", "pointerDisabled", 0], ["value0", "ariaLabel0", "pointerShape0", "pointer0Disabled", 0], ["value1", "ariaLabel1", "pointerShape1", "pointer1Disabled", 0]];
|
|
967
|
-
for (let m = 2; m <
|
|
967
|
+
for (let m = 2; m < Os; m++)
|
|
968
968
|
y.push([`value${m}`, `ariaLabel${m}`, `pointer${m}Shape`, `pointer${m}Disabled`, m - 1]);
|
|
969
969
|
for (let m of y)
|
|
970
|
-
|
|
971
|
-
},
|
|
970
|
+
mi(l, d, m[4], m[0], m[1], m[2], m[3]);
|
|
971
|
+
}, yi = (l, d, y) => {
|
|
972
972
|
var m;
|
|
973
973
|
let T = (m = y.shadowRoot) == null ? void 0 : m.querySelector(".container");
|
|
974
974
|
if (T)
|
|
975
|
-
for (let
|
|
976
|
-
d ? T.prepend(
|
|
977
|
-
},
|
|
978
|
-
let m = y.map((h) => h[0]), T = null,
|
|
979
|
-
fe || (h.preventDefault && h.preventDefault(), Je(h), window.addEventListener("mousemove", Je), window.addEventListener("mouseup", Lt),
|
|
975
|
+
for (let U of l)
|
|
976
|
+
d ? T.prepend(U.$pointer) : T.append(U.$pointer);
|
|
977
|
+
}, ir = 0, $t = 100, ct = 2, bi = "0.3s", ks = (l, d, y) => {
|
|
978
|
+
let m = y.map((h) => h[0]), T = null, U = null, q = null, R = null, D = ir, G = $t, Q, B, ie = Se, Oe = ct, xe = !1, Y = !1, J = !1, z = 0, ce = 1 / 0, me = !1, ge, de, fe = !1, we = !1, _e = !1, Ve = bi, xi = [], $i = (h) => {
|
|
979
|
+
fe || (h.preventDefault && h.preventDefault(), Je(h), window.addEventListener("mousemove", Je), window.addEventListener("mouseup", Lt), es(l, h));
|
|
980
980
|
}, Lt = (h) => {
|
|
981
|
-
fe || (ge = void 0, de = void 0, window.removeEventListener("mousemove", Je), window.removeEventListener("mouseup", Lt),
|
|
982
|
-
},
|
|
981
|
+
fe || (ge = void 0, de = void 0, window.removeEventListener("mousemove", Je), window.removeEventListener("mouseup", Lt), Ve && d.classList.add(lt), ts(l, h));
|
|
982
|
+
}, Rs = (h, x) => {
|
|
983
983
|
if (m.length <= 0)
|
|
984
984
|
return;
|
|
985
985
|
if (m.length === 1)
|
|
986
|
-
return m[0].isClicked(h) &&
|
|
987
|
-
let j =
|
|
986
|
+
return m[0].isClicked(h) && Ve && d.classList.remove(lt), m[0];
|
|
987
|
+
let j = Is(h);
|
|
988
988
|
if (me) {
|
|
989
989
|
let re = x, Re = Rt(re);
|
|
990
|
-
Re !== void 0 && (re = ot(re, Re)), j ? (ge = re, de = 0,
|
|
990
|
+
Re !== void 0 && (re = ot(re, Re)), j ? (ge = re, de = 0, Ve && d.classList.remove(lt)) : ge !== void 0 && (de = re - ge, ge = re);
|
|
991
991
|
}
|
|
992
|
-
if (!
|
|
992
|
+
if (!Ds(h) && !j) {
|
|
993
993
|
for (let re of m)
|
|
994
994
|
if (!(!re.isClicked(h) || re.disabled))
|
|
995
|
-
return
|
|
995
|
+
return Ve && d.classList.remove(lt), re;
|
|
996
996
|
for (let re of m)
|
|
997
997
|
if (T === re)
|
|
998
998
|
return re;
|
|
999
999
|
}
|
|
1000
|
-
let
|
|
1000
|
+
let ae = 1 / 0, pe = null;
|
|
1001
1001
|
for (let re of m) {
|
|
1002
1002
|
if (re.disabled)
|
|
1003
1003
|
continue;
|
|
1004
1004
|
let Re = Math.abs(x - re.percent);
|
|
1005
|
-
Re <
|
|
1005
|
+
Re < ae && (ae = Re, pe = re);
|
|
1006
1006
|
}
|
|
1007
1007
|
return pe;
|
|
1008
|
-
},
|
|
1008
|
+
}, wi = () => m.findIndex((h) => T === h && !h.disabled), Je = (h) => {
|
|
1009
1009
|
let x;
|
|
1010
1010
|
if (ie === ye) {
|
|
1011
|
-
let { height:
|
|
1012
|
-
x = Math.min(Math.max(0, re - pe),
|
|
1011
|
+
let { height: ae, top: pe } = d.getBoundingClientRect(), re = h.type.indexOf("mouse") !== -1 ? h.clientY : h.touches[0].clientY;
|
|
1012
|
+
x = Math.min(Math.max(0, re - pe), ae) * 100 / ae;
|
|
1013
1013
|
} else {
|
|
1014
|
-
let { width:
|
|
1015
|
-
x = Math.min(Math.max(0, re - pe),
|
|
1014
|
+
let { width: ae, left: pe } = d.getBoundingClientRect(), re = h.type.indexOf("mouse") !== -1 ? h.clientX : h.touches[0].clientX;
|
|
1015
|
+
x = Math.min(Math.max(0, re - pe), ae) * 100 / ae;
|
|
1016
1016
|
}
|
|
1017
|
-
if ((xe ||
|
|
1018
|
-
let
|
|
1017
|
+
if ((xe || Y) && (x = 100 - x), T = Rs(h.target, x), me && m.length > 1 && de !== void 0) {
|
|
1018
|
+
let ae = m[0], pe = m[m.length - 1], re = ae.percent + de < 0, Re = pe.percent + de > 100;
|
|
1019
1019
|
if (re || Re)
|
|
1020
1020
|
return;
|
|
1021
|
-
for (let
|
|
1022
|
-
Ee(
|
|
1021
|
+
for (let Ut = 0; Ut < m.length; Ut++)
|
|
1022
|
+
Ee(Ut, m[Ut].percent + de);
|
|
1023
1023
|
return;
|
|
1024
1024
|
}
|
|
1025
|
-
let j =
|
|
1025
|
+
let j = wi();
|
|
1026
1026
|
j !== -1 && (Ee(j, x), T == null || T.$pointer.focus());
|
|
1027
1027
|
}, Tt = (h) => {
|
|
1028
1028
|
if (fe || document.activeElement !== l || T != null && T.disabled)
|
|
1029
1029
|
return;
|
|
1030
1030
|
h.stopPropagation(), h.preventDefault();
|
|
1031
|
-
let x = h.deltaY < 0, j = xe ||
|
|
1032
|
-
pe !== -1 && (
|
|
1033
|
-
}, $i = (h) => {
|
|
1034
|
-
fe || we || (ie === ye ? U ? Ee(h, 100) : Ee(h, 0) : xe ? wt(h, m[h].percent) : $t(h, m[h].percent));
|
|
1035
|
-
}, wi = (h) => {
|
|
1036
|
-
fe || we || (ie === ye ? U ? Ee(h, 0) : Ee(h, 100) : xe ? $t(h, m[h].percent) : wt(h, m[h].percent));
|
|
1031
|
+
let x = h.deltaY < 0, j = xe || Y, ae = x ? !j : j, pe = wi();
|
|
1032
|
+
pe !== -1 && (ae ? wt(pe, m[pe].percent) : _t(pe, m[pe].percent));
|
|
1037
1033
|
}, _i = (h) => {
|
|
1038
|
-
fe || we || (ie === ye ?
|
|
1034
|
+
fe || we || (ie === ye ? Y ? Ee(h, 100) : Ee(h, 0) : xe ? _t(h, m[h].percent) : wt(h, m[h].percent));
|
|
1039
1035
|
}, Ei = (h) => {
|
|
1040
|
-
fe || we || (ie === ye ?
|
|
1041
|
-
},
|
|
1036
|
+
fe || we || (ie === ye ? Y ? Ee(h, 0) : Ee(h, 100) : xe ? wt(h, m[h].percent) : _t(h, m[h].percent));
|
|
1037
|
+
}, Mi = (h) => {
|
|
1038
|
+
fe || we || (ie === ye ? Y ? _t(h, m[h].percent) : wt(h, m[h].percent) : xe ? Ee(h, 100) : Ee(h, 0));
|
|
1039
|
+
}, Ai = (h) => {
|
|
1040
|
+
fe || we || (ie === ye ? Y ? wt(h, m[h].percent) : _t(h, m[h].percent) : xe ? Ee(h, 0) : Ee(h, 100));
|
|
1041
|
+
}, Ds = (h) => h.classList.contains("panel"), Is = (h) => h.classList.contains("panel-fill"), wt = (h, x) => {
|
|
1042
1042
|
if (x === void 0)
|
|
1043
1043
|
return;
|
|
1044
1044
|
let j = Rt(x);
|
|
1045
1045
|
j == null && (j = 1), x -= j, x < 0 && (x = 0), Ee(h, x);
|
|
1046
|
-
},
|
|
1046
|
+
}, _t = (h, x) => {
|
|
1047
1047
|
if (x === void 0)
|
|
1048
1048
|
return;
|
|
1049
1049
|
let j = Rt(x);
|
|
1050
1050
|
j == null && (j = 1), x += j, x > 100 && (x = 100), Ee(h, x);
|
|
1051
1051
|
}, Ze = () => {
|
|
1052
|
-
!R || R.update({ percents:
|
|
1053
|
-
},
|
|
1052
|
+
!R || R.update({ percents: Si(), values: Oi(), $pointers: Pi(), min: Ci(), max: ki(), data: or(), step: sr(), round: lr(), type: ar(), textMin: Dt(), textMax: It(), rightToLeft: hr(), bottomToTop: dr(), pointersOverlap: vr(), pointersMinDistance: cr(), pointersMaxDistance: ur(), rangeDragging: mr(), disabled: fr(), keyboardDisabled: pr(), mousewheelDisabled: gr() });
|
|
1053
|
+
}, js = () => {
|
|
1054
1054
|
Ze();
|
|
1055
|
-
},
|
|
1056
|
-
if (!(J || m.length <= 1 ||
|
|
1055
|
+
}, Ns = (h) => {
|
|
1056
|
+
if (!(J || m.length <= 1 || G === D))
|
|
1057
1057
|
if (h === 0) {
|
|
1058
|
-
let x =
|
|
1058
|
+
let x = ce * 100 / (G - D);
|
|
1059
1059
|
return Math.max(0, m[h + 1].percent - x);
|
|
1060
1060
|
} else {
|
|
1061
|
-
let x = z * 100 / (
|
|
1061
|
+
let x = z * 100 / (G - D);
|
|
1062
1062
|
return Math.min(m[h - 1].percent + x, 100);
|
|
1063
1063
|
}
|
|
1064
|
-
},
|
|
1065
|
-
if (!(J || m.length <= 1 ||
|
|
1064
|
+
}, Bs = (h) => {
|
|
1065
|
+
if (!(J || m.length <= 1 || G === D))
|
|
1066
1066
|
if (h === m.length - 1) {
|
|
1067
|
-
let x =
|
|
1067
|
+
let x = ce * 100 / (G - D);
|
|
1068
1068
|
return Math.min(m[h - 1].percent + x, 100);
|
|
1069
1069
|
} else {
|
|
1070
|
-
let x = z * 100 / (
|
|
1070
|
+
let x = z * 100 / (G - D);
|
|
1071
1071
|
return Math.max(0, m[h + 1].percent - x);
|
|
1072
1072
|
}
|
|
1073
1073
|
}, Rt = (h) => {
|
|
1074
1074
|
let x;
|
|
1075
1075
|
if (typeof Q == "function") {
|
|
1076
|
-
let j = je(0, 100, D,
|
|
1076
|
+
let j = je(0, 100, D, G, h);
|
|
1077
1077
|
x = Q(j, h);
|
|
1078
1078
|
} else
|
|
1079
1079
|
x = Q;
|
|
1080
1080
|
if (ue(x)) {
|
|
1081
|
-
let j =
|
|
1081
|
+
let j = G - D;
|
|
1082
1082
|
return x = j === 0 ? 0 : x * 100 / j, x;
|
|
1083
1083
|
}
|
|
1084
1084
|
}, ut = (h) => {
|
|
1085
1085
|
if (h === void 0)
|
|
1086
1086
|
return;
|
|
1087
|
-
let x = je(0, 100, D,
|
|
1088
|
-
return B !== void 0 ? B[Math.round(x)] : at(x,
|
|
1089
|
-
}, Dt = () => B !== void 0 ? B[D] : D, It = () => B !== void 0 ? B[
|
|
1087
|
+
let x = je(0, 100, D, G, h);
|
|
1088
|
+
return B !== void 0 ? B[Math.round(x)] : at(x, Oe);
|
|
1089
|
+
}, Dt = () => B !== void 0 ? B[D] : D, It = () => B !== void 0 ? B[G] : G, sr = () => Q, Fs = (h) => {
|
|
1090
1090
|
var x;
|
|
1091
1091
|
return h <= 0 || J ? Dt() : (x = ut(m[h - 1].percent)) != null ? x : "";
|
|
1092
|
-
},
|
|
1092
|
+
}, Hs = (h) => {
|
|
1093
1093
|
var x;
|
|
1094
1094
|
return m.length <= 1 || h >= m.length - 1 || J ? It() : (x = ut(m[h + 1].percent)) != null ? x : "";
|
|
1095
|
-
},
|
|
1095
|
+
}, Si = () => m.map((h) => h.percent), Oi = () => m.map((h) => ut(h.percent)), Pi = () => m.map((h) => h.$pointer), Ci = () => D, ki = () => G, or = () => B, ar = () => ie, lr = () => Oe, cr = () => z, ur = () => ce, Us = (h) => xi[h], hr = () => xe, dr = () => Y, fr = () => fe, pr = () => we, gr = () => _e, vr = () => J, mr = () => me, Ee = (h, x) => {
|
|
1096
1096
|
if (x === void 0)
|
|
1097
1097
|
return;
|
|
1098
1098
|
let j = Rt(x);
|
|
1099
1099
|
j !== void 0 && (x = ot(x, j));
|
|
1100
|
-
let
|
|
1101
|
-
if (!
|
|
1100
|
+
let ae = m[h];
|
|
1101
|
+
if (!ae)
|
|
1102
1102
|
return;
|
|
1103
|
-
let pe =
|
|
1104
|
-
|
|
1103
|
+
let pe = ae.updatePosition(x, Ns(h), Bs(h), ie, xe, Y);
|
|
1104
|
+
U == null || U.updatePosition(ie, m.map((re) => re.percent), xe, Y), Ze();
|
|
1105
1105
|
for (let re of m) {
|
|
1106
1106
|
let Re = ut(re.percent);
|
|
1107
1107
|
Re !== void 0 && (re.setAttr("aria-valuenow", Re.toString()), re.setAttr("aria-valuetext", Re.toString()));
|
|
1108
1108
|
}
|
|
1109
|
-
|
|
1109
|
+
zs(), pe && is(l, m.map((re) => ut(re.percent)));
|
|
1110
1110
|
}, Ne = () => {
|
|
1111
1111
|
for (let h = 0; h < m.length; h++)
|
|
1112
1112
|
Ee(h, m[h].percent);
|
|
1113
1113
|
}, Ys = (h, x) => {
|
|
1114
|
-
D = B !== void 0 ? 0 :
|
|
1115
|
-
},
|
|
1114
|
+
D = B !== void 0 ? 0 : oe(h, ir), G = B !== void 0 ? B.length - 1 : oe(x, $t), jt(D), Nt(G);
|
|
1115
|
+
}, zs = () => {
|
|
1116
1116
|
var h, x;
|
|
1117
1117
|
for (let j = 0; j < m.length; j++) {
|
|
1118
|
-
let
|
|
1119
|
-
|
|
1118
|
+
let ae = m[j];
|
|
1119
|
+
ae.setAttr("aria-valuemin", ((h = Fs(j)) != null ? h : "").toString()), ae.setAttr("aria-valuemax", ((x = Hs(j)) != null ? x : "").toString());
|
|
1120
1120
|
}
|
|
1121
1121
|
}, jt = (h) => {
|
|
1122
|
-
D =
|
|
1122
|
+
D = oe(h, ir), D > G && (G = D + $t), Ne();
|
|
1123
1123
|
}, Nt = (h) => {
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1124
|
+
G = oe(h, $t), G < D && (G = D + $t), Ne();
|
|
1125
|
+
}, Li = (h) => {
|
|
1126
1126
|
J = !0;
|
|
1127
1127
|
for (let x = 0; x < h.length; x++)
|
|
1128
1128
|
Bt(h[x], x);
|
|
@@ -1131,9 +1131,9 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1131
1131
|
Bt(h[x], x);
|
|
1132
1132
|
}, Bt = (h, x) => {
|
|
1133
1133
|
let j;
|
|
1134
|
-
B !== void 0 ? (j = h == null ? 0 :
|
|
1135
|
-
let
|
|
1136
|
-
Ee(x,
|
|
1134
|
+
B !== void 0 ? (j = h == null ? 0 : ss(h, B), j === -1 && (j = 0)) : (j = oe(h, D), j < D && (j = D), j > G && (j = G));
|
|
1135
|
+
let ae = je(D, G, 0, 100, j);
|
|
1136
|
+
Ee(x, ae);
|
|
1137
1137
|
}, Ft = (h) => {
|
|
1138
1138
|
if (h == null) {
|
|
1139
1139
|
Q = void 0;
|
|
@@ -1144,93 +1144,93 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
1146
1146
|
if (ue(h)) {
|
|
1147
|
-
Q =
|
|
1148
|
-
let x = Math.abs(
|
|
1147
|
+
Q = oe(h, 1);
|
|
1148
|
+
let x = Math.abs(G - D);
|
|
1149
1149
|
Q > x && (Q = void 0), Ne();
|
|
1150
1150
|
return;
|
|
1151
1151
|
}
|
|
1152
1152
|
Q = void 0;
|
|
1153
|
-
}, mr = (h) => {
|
|
1154
|
-
J = h, Ne();
|
|
1155
1153
|
}, yr = (h) => {
|
|
1156
|
-
|
|
1154
|
+
J = h, Ne();
|
|
1157
1155
|
}, br = (h) => {
|
|
1158
|
-
(!ue(h) || h < 0) && (h =
|
|
1156
|
+
(!ue(h) || h < 0) && (h = 0), z = h;
|
|
1159
1157
|
}, xr = (h) => {
|
|
1158
|
+
(!ue(h) || h < 0) && (h = 1 / 0), ce = h;
|
|
1159
|
+
}, $r = (h) => {
|
|
1160
1160
|
fe = h, d.classList.toggle("disabled", fe), fe ? d.setAttribute("aria-disabled", "true") : d.hasAttribute("aria-disabled") && d.removeAttribute("aria-disabled");
|
|
1161
|
-
},
|
|
1161
|
+
}, Ti = (h) => {
|
|
1162
1162
|
we = h;
|
|
1163
|
-
},
|
|
1163
|
+
}, Ri = (h) => {
|
|
1164
1164
|
_e = h, _e ? document.removeEventListener("wheel", Tt) : document.addEventListener("wheel", Tt, { passive: !1 });
|
|
1165
|
-
},
|
|
1165
|
+
}, wr = (h) => {
|
|
1166
1166
|
if (h == null) {
|
|
1167
1167
|
B = void 0;
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
|
-
if (B =
|
|
1170
|
+
if (B = ns(h), B === void 0 || B.length <= 0) {
|
|
1171
1171
|
B = void 0;
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
1174
|
jt(0), Nt(B.length - 1), Q === void 0 && Ft(1);
|
|
1175
|
-
},
|
|
1175
|
+
}, _r = (h) => {
|
|
1176
1176
|
var x;
|
|
1177
|
-
typeof h == "string" ? ie = h.trim().toLowerCase() === ye ? ye :
|
|
1177
|
+
typeof h == "string" ? ie = h.trim().toLowerCase() === ye ? ye : Se : ie = Se;
|
|
1178
1178
|
let j = (x = l.shadowRoot) == null ? void 0 : x.querySelector(".range-slider-box");
|
|
1179
1179
|
if (!j)
|
|
1180
1180
|
return;
|
|
1181
1181
|
j.className = `range-slider-box type-${ie}`, Ne();
|
|
1182
|
-
let
|
|
1182
|
+
let ae = ie === ye ? "vertical" : "horizontal";
|
|
1183
1183
|
for (let pe of m)
|
|
1184
|
-
pe.setAttr("aria-orientation",
|
|
1185
|
-
}, _r = (h) => {
|
|
1186
|
-
xe = h, m.length > 1 && vi(m, xe, l), Ne(), Ze();
|
|
1184
|
+
pe.setAttr("aria-orientation", ae);
|
|
1187
1185
|
}, Er = (h) => {
|
|
1188
|
-
|
|
1186
|
+
xe = h, m.length > 1 && yi(m, xe, l), Ne(), Ze();
|
|
1189
1187
|
}, Mr = (h) => {
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
-
|
|
1193
|
-
},
|
|
1188
|
+
Y = h, m.length > 1 && yi(m, Y, l), Ne(), Ze();
|
|
1189
|
+
}, Ar = (h) => {
|
|
1190
|
+
Oe = oe(h, ct), Oe < 0 && (Oe = ct), Ze();
|
|
1191
|
+
}, Di = (h) => {
|
|
1192
|
+
h == null || h.toString().trim().toLowerCase() === "false" ? (Ve = void 0, d.style.removeProperty(pi), d.classList.remove(lt)) : (Ve = h.toString(), d.style.setProperty(pi, Ve), d.classList.add(lt));
|
|
1193
|
+
}, Ii = (h, x) => {
|
|
1194
1194
|
let j = m[h];
|
|
1195
|
-
!j || (j.setAttr("aria-label", x),
|
|
1195
|
+
!j || (j.setAttr("aria-label", x), xi[h] = x);
|
|
1196
1196
|
}, Ht = (h) => {
|
|
1197
1197
|
if (ge = void 0, m.length <= 1) {
|
|
1198
|
-
me = !1, d.classList.remove(
|
|
1198
|
+
me = !1, d.classList.remove(vi);
|
|
1199
1199
|
return;
|
|
1200
1200
|
}
|
|
1201
|
-
me = h, d.classList.toggle(
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1201
|
+
me = h, d.classList.toggle(vi, me);
|
|
1202
|
+
}, Xs = () => {
|
|
1203
|
+
$r(be(l.getAttribute(p))), we = be(l.getAttribute(b)), _e = be(l.getAttribute(S));
|
|
1204
1204
|
let h = kt(l, /^pointer([0-9]*)-disabled$/, (x) => be(x));
|
|
1205
1205
|
for (let x of h) {
|
|
1206
1206
|
let j = x[0];
|
|
1207
1207
|
!m[j] || (m[j].disabled = x[1]);
|
|
1208
1208
|
}
|
|
1209
|
-
},
|
|
1209
|
+
}, Vs = () => {
|
|
1210
1210
|
let h = kt(l, /^aria-label([0-9]*)$/);
|
|
1211
1211
|
for (let x of h) {
|
|
1212
1212
|
let j = x[0];
|
|
1213
|
-
|
|
1213
|
+
Ii(j, x[1]);
|
|
1214
1214
|
}
|
|
1215
|
-
},
|
|
1216
|
-
let x = m.length, j = m[x - 1].$pointer,
|
|
1217
|
-
j.after(
|
|
1218
|
-
let pe =
|
|
1219
|
-
return pe.setCallbacks(
|
|
1220
|
-
},
|
|
1215
|
+
}, Ws = (h) => {
|
|
1216
|
+
let x = m.length, j = m[x - 1].$pointer, ae = j.cloneNode(!0);
|
|
1217
|
+
j.after(ae);
|
|
1218
|
+
let pe = rr(l, ae, x);
|
|
1219
|
+
return pe.setCallbacks(_i, Ei, Mi, Ai), m.push(pe), Bt(h, x), Ne(), Ze(), x;
|
|
1220
|
+
}, qs = () => {
|
|
1221
1221
|
let h = m.length, x = m[h - 1];
|
|
1222
1222
|
return x ? (x.destroy(), m.pop(), m.length <= 1 && Ht(!1), Ne(), Ze(), h - 1) : -1;
|
|
1223
1223
|
};
|
|
1224
1224
|
return (() => {
|
|
1225
1225
|
var h, x;
|
|
1226
|
-
for (let
|
|
1227
|
-
|
|
1226
|
+
for (let ae of m)
|
|
1227
|
+
ae.setCallbacks(_i, Ei, Mi, Ai);
|
|
1228
1228
|
let j = (h = l.shadowRoot) == null ? void 0 : h.querySelector(".panel-fill");
|
|
1229
|
-
j && (
|
|
1229
|
+
j && (U = os(j)), _r(l.getAttribute(F)), Er(be(l.getAttribute(te))), Mr(be(l.getAttribute(f))), Ys(l.getAttribute(v), l.getAttribute(_)), Ft(l.getAttribute(E)), wr(l.getAttribute(g)), Li(y.map((ae) => ae[1])), yr(be(l.getAttribute(o))), br(oe(l.getAttribute(c), 0)), xr(oe(l.getAttribute(a), 1 / 0)), Ht(be(l.getAttribute(u))), Ar(oe(l.getAttribute(k), ct)), Xs(), Vs(), q = As(l, d, m), Di((x = l.getAttribute(Le)) != null ? x : bi), d.addEventListener("mousedown", $i), d.addEventListener("mouseup", Lt), d.addEventListener("touchmove", Je), d.addEventListener("touchstart", Je), _e || document.addEventListener("wheel", Tt, { passive: !1 }), R = Ss(l, js, { setValues: Li, setMin: jt, setMax: Nt, setStep: Ft, setPointersOverlap: yr, setPointersMinDistance: br, setPointersMaxDistance: xr, setDisabled: $r, setType: _r, setRightToLeft: Er, setBottomToTop: Mr, setRound: Ar, setKeyboardDisabled: Ti, setMousewheelDisabled: Ri, setRangeDragging: Ht, setData: wr }, { getPercents: Si, getValues: Oi, getPointerElements: Pi, getMin: Ci, getMax: ki, getStep: sr, getData: or, getType: ar, getRound: lr, getTextMin: Dt, getTextMax: It, isRightToLeft: hr, isBottomToTop: dr, isDisabled: fr, isKeyboardDisabled: pr, isMousewheelDisabled: gr, isPointersOverlap: vr, isRangeDraggingEnabled: mr, getPointersMinDistance: cr, getPointersMaxDistance: ur }), R.init();
|
|
1230
1230
|
})(), { get pointers() {
|
|
1231
1231
|
return m;
|
|
1232
1232
|
}, get styles() {
|
|
1233
|
-
return
|
|
1233
|
+
return q;
|
|
1234
1234
|
}, get pluginsManager() {
|
|
1235
1235
|
return R;
|
|
1236
1236
|
}, get min() {
|
|
@@ -1238,67 +1238,67 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1238
1238
|
}, get max() {
|
|
1239
1239
|
return It();
|
|
1240
1240
|
}, get step() {
|
|
1241
|
-
return
|
|
1241
|
+
return sr();
|
|
1242
1242
|
}, get pointersOverlap() {
|
|
1243
|
-
return
|
|
1243
|
+
return vr();
|
|
1244
1244
|
}, set pointersOverlap(h) {
|
|
1245
|
-
|
|
1245
|
+
yr(h);
|
|
1246
1246
|
}, get pointersMinDistance() {
|
|
1247
|
-
return
|
|
1247
|
+
return cr();
|
|
1248
1248
|
}, set pointersMinDistance(h) {
|
|
1249
|
-
|
|
1249
|
+
br(h);
|
|
1250
1250
|
}, get pointersMaxDistance() {
|
|
1251
|
-
return
|
|
1251
|
+
return ur();
|
|
1252
1252
|
}, set pointersMaxDistance(h) {
|
|
1253
|
-
|
|
1253
|
+
xr(h);
|
|
1254
1254
|
}, get disabled() {
|
|
1255
|
-
return
|
|
1255
|
+
return fr();
|
|
1256
1256
|
}, set disabled(h) {
|
|
1257
|
-
|
|
1257
|
+
$r(h);
|
|
1258
1258
|
}, get data() {
|
|
1259
|
-
return sr();
|
|
1260
|
-
}, get type() {
|
|
1261
1259
|
return or();
|
|
1260
|
+
}, get type() {
|
|
1261
|
+
return ar();
|
|
1262
1262
|
}, set type(h) {
|
|
1263
|
-
|
|
1263
|
+
_r(h);
|
|
1264
1264
|
}, get rightToLeft() {
|
|
1265
|
-
return
|
|
1265
|
+
return hr();
|
|
1266
1266
|
}, set rightToLeft(h) {
|
|
1267
|
-
|
|
1267
|
+
Er(h);
|
|
1268
1268
|
}, get bottomToTop() {
|
|
1269
|
-
return
|
|
1269
|
+
return dr();
|
|
1270
1270
|
}, set bottomToTop(h) {
|
|
1271
|
-
|
|
1271
|
+
Mr(h);
|
|
1272
1272
|
}, get round() {
|
|
1273
|
-
return
|
|
1273
|
+
return lr();
|
|
1274
1274
|
}, set round(h) {
|
|
1275
|
-
|
|
1275
|
+
Ar(h);
|
|
1276
1276
|
}, get animateOnClick() {
|
|
1277
|
-
return
|
|
1277
|
+
return Ve;
|
|
1278
1278
|
}, set animateOnClick(h) {
|
|
1279
|
-
|
|
1279
|
+
Di(h);
|
|
1280
1280
|
}, get keyboardDisabled() {
|
|
1281
|
-
return
|
|
1281
|
+
return pr();
|
|
1282
1282
|
}, set keyboardDisabled(h) {
|
|
1283
|
-
|
|
1283
|
+
Ti(h);
|
|
1284
1284
|
}, get mousewheelDisabled() {
|
|
1285
|
-
return
|
|
1285
|
+
return gr();
|
|
1286
1286
|
}, set mousewheelDisabled(h) {
|
|
1287
|
-
|
|
1287
|
+
Ri(h);
|
|
1288
1288
|
}, get rangeDragging() {
|
|
1289
|
-
return
|
|
1289
|
+
return mr();
|
|
1290
1290
|
}, set rangeDragging(h) {
|
|
1291
1291
|
Ht(h);
|
|
1292
|
-
}, setMin: jt, setMax: Nt, setValue: Bt, setStep: Ft, setData:
|
|
1293
|
-
d.removeEventListener("mousedown",
|
|
1292
|
+
}, setMin: jt, setMax: Nt, setValue: Bt, setStep: Ft, setData: wr, getTextValue: ut, setAriaLabel: Ii, getAriaLabel: Us, addPointer: Ws, removePointer: qs, destroy: () => {
|
|
1293
|
+
d.removeEventListener("mousedown", $i), d.removeEventListener("mouseup", Lt), d.removeEventListener("touchmove", Je), d.removeEventListener("touchstart", Je), document.removeEventListener("wheel", Tt);
|
|
1294
1294
|
for (let h of m)
|
|
1295
1295
|
h.destroy();
|
|
1296
1296
|
R == null || R.destroy();
|
|
1297
1297
|
} };
|
|
1298
|
-
},
|
|
1299
|
-
let m =
|
|
1298
|
+
}, Ls = (l, d, y) => {
|
|
1299
|
+
let m = gi.find(([R, D, G, Q]) => D.replace("#", "") === d.replace(/\d+/g, ""));
|
|
1300
1300
|
if (m && l.styles) {
|
|
1301
|
-
let [R, D,
|
|
1301
|
+
let [R, D, G, Q] = m, B = d.replace(/\D/g, "").trim(), ie = B === "" || B === "0" || B === "1" ? 0 : oe(B, 0) - 1;
|
|
1302
1302
|
l.styles.setStyle(R, y, ie);
|
|
1303
1303
|
return;
|
|
1304
1304
|
}
|
|
@@ -1320,7 +1320,7 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1320
1320
|
break;
|
|
1321
1321
|
}
|
|
1322
1322
|
case c: {
|
|
1323
|
-
l.pointersMinDistance =
|
|
1323
|
+
l.pointersMinDistance = oe(y, 0);
|
|
1324
1324
|
break;
|
|
1325
1325
|
}
|
|
1326
1326
|
case u: {
|
|
@@ -1328,7 +1328,7 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1328
1328
|
break;
|
|
1329
1329
|
}
|
|
1330
1330
|
case a: {
|
|
1331
|
-
l.pointersMaxDistance =
|
|
1331
|
+
l.pointersMaxDistance = oe(y, 1 / 0);
|
|
1332
1332
|
break;
|
|
1333
1333
|
}
|
|
1334
1334
|
case p: {
|
|
@@ -1360,10 +1360,10 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1360
1360
|
break;
|
|
1361
1361
|
}
|
|
1362
1362
|
case k: {
|
|
1363
|
-
l.round =
|
|
1363
|
+
l.round = oe(y, ct);
|
|
1364
1364
|
break;
|
|
1365
1365
|
}
|
|
1366
|
-
case
|
|
1366
|
+
case se: {
|
|
1367
1367
|
l.styles && (l.styles.theme = y);
|
|
1368
1368
|
break;
|
|
1369
1369
|
}
|
|
@@ -1375,29 +1375,29 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1375
1375
|
let T = null;
|
|
1376
1376
|
if (/^value([0-9]*)$/.test(d) && (T = "value"), /^pointer([0-9]*)-disabled$/.test(d) && (T = "pointer-disabled"), /^aria-label([0-9]*)$/.test(d) && (T = "aria-label"), /^pointer([0-9]*)-shape$/.test(d) && (T = "pointer-shape"), !T)
|
|
1377
1377
|
return;
|
|
1378
|
-
let
|
|
1378
|
+
let U = d.replace(/\D/g, "").trim(), q = U === "" || U === "0" || U === "1" ? 0 : oe(U, 0) - 1;
|
|
1379
1379
|
switch (T) {
|
|
1380
1380
|
case "value": {
|
|
1381
|
-
l.setValue(y,
|
|
1381
|
+
l.setValue(y, q);
|
|
1382
1382
|
break;
|
|
1383
1383
|
}
|
|
1384
1384
|
case "pointer-disabled": {
|
|
1385
|
-
let R = l == null ? void 0 : l.pointers[
|
|
1385
|
+
let R = l == null ? void 0 : l.pointers[q];
|
|
1386
1386
|
if (!R)
|
|
1387
1387
|
return;
|
|
1388
1388
|
R.disabled = be(y);
|
|
1389
1389
|
break;
|
|
1390
1390
|
}
|
|
1391
1391
|
case "aria-label": {
|
|
1392
|
-
l.setAriaLabel(
|
|
1392
|
+
l.setAriaLabel(q, y);
|
|
1393
1393
|
break;
|
|
1394
1394
|
}
|
|
1395
1395
|
case "pointer-shape": {
|
|
1396
|
-
l.styles && l.styles.setPointerShape(
|
|
1396
|
+
l.styles && l.styles.setPointerShape(q, y);
|
|
1397
1397
|
break;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
},
|
|
1400
|
+
}, Ts = class extends HTMLElement {
|
|
1401
1401
|
constructor() {
|
|
1402
1402
|
super(), i(this, "slider"), i(this, "_externalCSSList", []), i(this, "_observer", null), this.attachShadow({ mode: "open" });
|
|
1403
1403
|
}
|
|
@@ -1447,11 +1447,11 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1447
1447
|
return (d = (l = this.slider) == null ? void 0 : l.round) != null ? d : ct;
|
|
1448
1448
|
}
|
|
1449
1449
|
set type(l) {
|
|
1450
|
-
!this.slider || (this.slider.type = l ??
|
|
1450
|
+
!this.slider || (this.slider.type = l ?? Se);
|
|
1451
1451
|
}
|
|
1452
1452
|
get type() {
|
|
1453
1453
|
var l;
|
|
1454
|
-
return ((l = this.slider) == null ? void 0 : l.type) ||
|
|
1454
|
+
return ((l = this.slider) == null ? void 0 : l.type) || Se;
|
|
1455
1455
|
}
|
|
1456
1456
|
set pointersOverlap(l) {
|
|
1457
1457
|
!this.slider || (this.slider.pointersOverlap = l);
|
|
@@ -1531,7 +1531,7 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1531
1531
|
if (!this.slider)
|
|
1532
1532
|
return;
|
|
1533
1533
|
let y = (d = this.slider) == null ? void 0 : d.addPointer(l);
|
|
1534
|
-
|
|
1534
|
+
mi(this, this.slider, y, `value${y + 1}`, `ariaLabel${y + 1}`, `pointerShape${y + 1}`, `pointer${y + 1}Disabled`);
|
|
1535
1535
|
}
|
|
1536
1536
|
removePointer() {
|
|
1537
1537
|
var l;
|
|
@@ -1547,36 +1547,36 @@ const yn = Symbol.for(""), ho = (r) => {
|
|
|
1547
1547
|
var l, d;
|
|
1548
1548
|
if (!this.shadowRoot)
|
|
1549
1549
|
return;
|
|
1550
|
-
this._externalCSSList =
|
|
1550
|
+
this._externalCSSList = Ms(this), this.shadowRoot.innerHTML = n(s, this._externalCSSList);
|
|
1551
1551
|
let y = (l = this.shadowRoot) == null ? void 0 : l.querySelector(".pointer");
|
|
1552
1552
|
if (!y)
|
|
1553
1553
|
return;
|
|
1554
1554
|
let m = (d = this.shadowRoot) == null ? void 0 : d.getElementById("range-slider");
|
|
1555
1555
|
if (!m)
|
|
1556
1556
|
return;
|
|
1557
|
-
let T =
|
|
1558
|
-
this.slider =
|
|
1559
|
-
|
|
1557
|
+
let T = Ps(this, y);
|
|
1558
|
+
this.slider = ks(this, m, T), Cs(this, this.slider), this._observer = new MutationObserver((U) => {
|
|
1559
|
+
U.forEach((q) => {
|
|
1560
1560
|
var R;
|
|
1561
|
-
if (!this.slider ||
|
|
1561
|
+
if (!this.slider || q.type !== "attributes")
|
|
1562
1562
|
return;
|
|
1563
|
-
let D =
|
|
1564
|
-
!D ||
|
|
1563
|
+
let D = q.attributeName;
|
|
1564
|
+
!D || Ls(this.slider, D, (R = this.getAttribute(D)) != null ? R : "");
|
|
1565
1565
|
});
|
|
1566
1566
|
}), this._observer.observe(this, { attributes: !0 });
|
|
1567
1567
|
}
|
|
1568
1568
|
disconnectedCallback() {
|
|
1569
1569
|
this._observer && this._observer.disconnect(), this.slider && this.slider.destroy();
|
|
1570
1570
|
}
|
|
1571
|
-
},
|
|
1572
|
-
window.tcRangeSlider =
|
|
1571
|
+
}, nr = Ts;
|
|
1572
|
+
window.tcRangeSlider = nr, customElements.get("toolcool-range-slider") || customElements.define("toolcool-range-slider", nr), customElements.get("tc-range-slider") || customElements.define("tc-range-slider", class extends nr {
|
|
1573
1573
|
});
|
|
1574
1574
|
})();
|
|
1575
|
-
var
|
|
1576
|
-
function
|
|
1575
|
+
var pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1576
|
+
function ri(r) {
|
|
1577
1577
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function ii(r) {
|
|
1580
1580
|
if (r.__esModule)
|
|
1581
1581
|
return r;
|
|
1582
1582
|
var e = r.default;
|
|
@@ -1603,12 +1603,12 @@ function ti(r) {
|
|
|
1603
1603
|
});
|
|
1604
1604
|
}), t;
|
|
1605
1605
|
}
|
|
1606
|
-
var
|
|
1606
|
+
var xn = { exports: {} };
|
|
1607
1607
|
(function(r, e) {
|
|
1608
1608
|
(function(t, i) {
|
|
1609
1609
|
r.exports = i();
|
|
1610
|
-
})(
|
|
1611
|
-
var t = 1e3, i = 6e4, n = 36e5, s = "millisecond", o = "second", c = "minute", a = "hour", u = "day", g = "week", v = "month", _ = "quarter", E = "year", k = "date", F = "Invalid Date",
|
|
1610
|
+
})(pt, function() {
|
|
1611
|
+
var t = 1e3, i = 6e4, n = 36e5, s = "millisecond", o = "second", c = "minute", a = "hour", u = "day", g = "week", v = "month", _ = "quarter", E = "year", k = "date", F = "Invalid Date", se = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, te = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, f = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(C) {
|
|
1612
1612
|
var $ = ["th", "st", "nd", "rd"], A = C % 100;
|
|
1613
1613
|
return "[" + C + ($[(A - 20) % 10] || $[A] || $[0]) + "]";
|
|
1614
1614
|
} }, p = function(C, $, A) {
|
|
@@ -1671,10 +1671,10 @@ var bn = { exports: {} };
|
|
|
1671
1671
|
if (O instanceof Date)
|
|
1672
1672
|
return new Date(O);
|
|
1673
1673
|
if (typeof O == "string" && !/Z$/i.test(O)) {
|
|
1674
|
-
var X = O.match(
|
|
1674
|
+
var X = O.match(se);
|
|
1675
1675
|
if (X) {
|
|
1676
|
-
var Z = X[2] - 1 || 0,
|
|
1677
|
-
return H ? new Date(Date.UTC(X[1], Z, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0,
|
|
1676
|
+
var Z = X[2] - 1 || 0, le = (X[7] || "0").substring(0, 3);
|
|
1677
|
+
return H ? new Date(Date.UTC(X[1], Z, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, le)) : new Date(X[1], Z, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, le);
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
return new Date(O);
|
|
@@ -1701,9 +1701,9 @@ var bn = { exports: {} };
|
|
|
1701
1701
|
return this.$d.getTime();
|
|
1702
1702
|
}, $.startOf = function(A, N) {
|
|
1703
1703
|
var O = this, H = !!I.u(N) || N, X = I.p(A), Z = function(je, ue) {
|
|
1704
|
-
var
|
|
1705
|
-
return H ?
|
|
1706
|
-
},
|
|
1704
|
+
var oe = I.w(O.$u ? Date.UTC(O.$y, ue, je) : new Date(O.$y, ue, je), O);
|
|
1705
|
+
return H ? oe : oe.endOf(u);
|
|
1706
|
+
}, le = function(je, ue) {
|
|
1707
1707
|
return I.w(O.toDate()[je].apply(O.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), O);
|
|
1708
1708
|
}, K = this.$W, ve = this.$M, Le = this.$D, Te = "set" + (this.$u ? "UTC" : "");
|
|
1709
1709
|
switch (X) {
|
|
@@ -1712,29 +1712,29 @@ var bn = { exports: {} };
|
|
|
1712
1712
|
case v:
|
|
1713
1713
|
return H ? Z(1, ve) : Z(0, ve + 1);
|
|
1714
1714
|
case g:
|
|
1715
|
-
var ye = this.$locale().weekStart || 0,
|
|
1716
|
-
return Z(H ? Le -
|
|
1715
|
+
var ye = this.$locale().weekStart || 0, Se = (K < ye ? K + 7 : K) - ye;
|
|
1716
|
+
return Z(H ? Le - Se : Le + (6 - Se), ve);
|
|
1717
1717
|
case u:
|
|
1718
1718
|
case k:
|
|
1719
|
-
return
|
|
1719
|
+
return le(Te + "Hours", 0);
|
|
1720
1720
|
case a:
|
|
1721
|
-
return
|
|
1721
|
+
return le(Te + "Minutes", 1);
|
|
1722
1722
|
case c:
|
|
1723
|
-
return
|
|
1723
|
+
return le(Te + "Seconds", 2);
|
|
1724
1724
|
case o:
|
|
1725
|
-
return
|
|
1725
|
+
return le(Te + "Milliseconds", 3);
|
|
1726
1726
|
default:
|
|
1727
1727
|
return this.clone();
|
|
1728
1728
|
}
|
|
1729
1729
|
}, $.endOf = function(A) {
|
|
1730
1730
|
return this.startOf(A, !1);
|
|
1731
1731
|
}, $.$set = function(A, N) {
|
|
1732
|
-
var O, H = I.p(A), X = "set" + (this.$u ? "UTC" : ""), Z = (O = {}, O[u] = X + "Date", O[k] = X + "Date", O[v] = X + "Month", O[E] = X + "FullYear", O[a] = X + "Hours", O[c] = X + "Minutes", O[o] = X + "Seconds", O[s] = X + "Milliseconds", O)[H],
|
|
1732
|
+
var O, H = I.p(A), X = "set" + (this.$u ? "UTC" : ""), Z = (O = {}, O[u] = X + "Date", O[k] = X + "Date", O[v] = X + "Month", O[E] = X + "FullYear", O[a] = X + "Hours", O[c] = X + "Minutes", O[o] = X + "Seconds", O[s] = X + "Milliseconds", O)[H], le = H === u ? this.$D + (N - this.$W) : N;
|
|
1733
1733
|
if (H === v || H === E) {
|
|
1734
1734
|
var K = this.clone().set(k, 1);
|
|
1735
|
-
K.$d[Z](
|
|
1735
|
+
K.$d[Z](le), K.init(), this.$d = K.set(k, Math.min(this.$D, K.daysInMonth())).$d;
|
|
1736
1736
|
} else
|
|
1737
|
-
Z && this.$d[Z](
|
|
1737
|
+
Z && this.$d[Z](le);
|
|
1738
1738
|
return this.init(), this;
|
|
1739
1739
|
}, $.set = function(A, N) {
|
|
1740
1740
|
return this.clone().$set(A, N);
|
|
@@ -1755,7 +1755,7 @@ var bn = { exports: {} };
|
|
|
1755
1755
|
return Z(1);
|
|
1756
1756
|
if (X === g)
|
|
1757
1757
|
return Z(7);
|
|
1758
|
-
var
|
|
1758
|
+
var le = (O = {}, O[c] = i, O[a] = n, O[o] = t, O)[X] || 1, K = this.$d.getTime() + A * le;
|
|
1759
1759
|
return I.w(K, this);
|
|
1760
1760
|
}, $.subtract = function(A, N) {
|
|
1761
1761
|
return this.add(-1 * A, N);
|
|
@@ -1763,22 +1763,22 @@ var bn = { exports: {} };
|
|
|
1763
1763
|
var N = this, O = this.$locale();
|
|
1764
1764
|
if (!this.isValid())
|
|
1765
1765
|
return O.invalidDate || F;
|
|
1766
|
-
var H = A || "YYYY-MM-DDTHH:mm:ssZ", X = I.z(this), Z = this.$H,
|
|
1767
|
-
return ue && (ue[
|
|
1766
|
+
var H = A || "YYYY-MM-DDTHH:mm:ssZ", X = I.z(this), Z = this.$H, le = this.$m, K = this.$M, ve = O.weekdays, Le = O.months, Te = function(ue, oe, ot, at) {
|
|
1767
|
+
return ue && (ue[oe] || ue(N, H)) || ot[oe].slice(0, at);
|
|
1768
1768
|
}, ye = function(ue) {
|
|
1769
1769
|
return I.s(Z % 12 || 12, ue, "0");
|
|
1770
|
-
},
|
|
1770
|
+
}, Se = O.meridiem || function(ue, oe, ot) {
|
|
1771
1771
|
var at = ue < 12 ? "AM" : "PM";
|
|
1772
1772
|
return ot ? at.toLowerCase() : at;
|
|
1773
|
-
}, je = { YY: String(this.$y).slice(-2), YYYY: I.s(this.$y, 4, "0"), M: K + 1, MM: I.s(K + 1, 2, "0"), MMM: Te(O.monthsShort, K, Le, 3), MMMM: Te(Le, K), D: this.$D, DD: I.s(this.$D, 2, "0"), d: String(this.$W), dd: Te(O.weekdaysMin, this.$W, ve, 2), ddd: Te(O.weekdaysShort, this.$W, ve, 3), dddd: ve[this.$W], H: String(Z), HH: I.s(Z, 2, "0"), h: ye(1), hh: ye(2), a:
|
|
1774
|
-
return H.replace(te, function(ue,
|
|
1775
|
-
return
|
|
1773
|
+
}, je = { YY: String(this.$y).slice(-2), YYYY: I.s(this.$y, 4, "0"), M: K + 1, MM: I.s(K + 1, 2, "0"), MMM: Te(O.monthsShort, K, Le, 3), MMMM: Te(Le, K), D: this.$D, DD: I.s(this.$D, 2, "0"), d: String(this.$W), dd: Te(O.weekdaysMin, this.$W, ve, 2), ddd: Te(O.weekdaysShort, this.$W, ve, 3), dddd: ve[this.$W], H: String(Z), HH: I.s(Z, 2, "0"), h: ye(1), hh: ye(2), a: Se(Z, le, !0), A: Se(Z, le, !1), m: String(le), mm: I.s(le, 2, "0"), s: String(this.$s), ss: I.s(this.$s, 2, "0"), SSS: I.s(this.$ms, 3, "0"), Z: X };
|
|
1774
|
+
return H.replace(te, function(ue, oe) {
|
|
1775
|
+
return oe || je[ue] || X.replace(":", "");
|
|
1776
1776
|
});
|
|
1777
1777
|
}, $.utcOffset = function() {
|
|
1778
1778
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1779
1779
|
}, $.diff = function(A, N, O) {
|
|
1780
|
-
var H, X = I.p(N), Z = L(A),
|
|
1781
|
-
return ve = (H = {}, H[E] = ve / 12, H[v] = ve, H[_] = ve / 3, H[g] = (K -
|
|
1780
|
+
var H, X = I.p(N), Z = L(A), le = (Z.utcOffset() - this.utcOffset()) * i, K = this - Z, ve = I.m(this, Z);
|
|
1781
|
+
return ve = (H = {}, H[E] = ve / 12, H[v] = ve, H[_] = ve / 3, H[g] = (K - le) / 6048e5, H[u] = (K - le) / 864e5, H[a] = K / n, H[c] = K / i, H[o] = K / t, H)[X] || K, O ? ve : I.a(ve);
|
|
1782
1782
|
}, $.daysInMonth = function() {
|
|
1783
1783
|
return this.endOf(v).$D;
|
|
1784
1784
|
}, $.$locale = function() {
|
|
@@ -1810,10 +1810,10 @@ var bn = { exports: {} };
|
|
|
1810
1810
|
return L(1e3 * C);
|
|
1811
1811
|
}, L.en = w[S], L.Ls = w, L.p = {}, L;
|
|
1812
1812
|
});
|
|
1813
|
-
})(
|
|
1814
|
-
var go =
|
|
1815
|
-
const
|
|
1816
|
-
class vo extends
|
|
1813
|
+
})(xn);
|
|
1814
|
+
var go = xn.exports;
|
|
1815
|
+
const qt = /* @__PURE__ */ ri(go);
|
|
1816
|
+
class vo extends Pe {
|
|
1817
1817
|
constructor() {
|
|
1818
1818
|
super(...arguments), this.templates = {}, this._renderedTemplates = {};
|
|
1819
1819
|
}
|
|
@@ -1930,7 +1930,7 @@ class vo extends Oe {
|
|
|
1930
1930
|
this.templates = this.getTemplates();
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
const
|
|
1933
|
+
const $n = `
|
|
1934
1934
|
:host {
|
|
1935
1935
|
display: flex;
|
|
1936
1936
|
box-sizing: border-box;
|
|
@@ -2150,7 +2150,7 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
2150
2150
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
2151
2151
|
border: 0;
|
|
2152
2152
|
}
|
|
2153
|
-
`,
|
|
2153
|
+
`, wn = `
|
|
2154
2154
|
* {
|
|
2155
2155
|
font-family: Roboto, sans-serif;
|
|
2156
2156
|
}
|
|
@@ -2193,21 +2193,21 @@ details summary .title {
|
|
|
2193
2193
|
display: flex;
|
|
2194
2194
|
font-weight: 500;
|
|
2195
2195
|
}
|
|
2196
|
-
details.details-filter summary
|
|
2197
|
-
details.details-results summary
|
|
2196
|
+
details.details-filter summary::after,
|
|
2197
|
+
details.details-results summary::before {
|
|
2198
2198
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230009' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
|
|
2199
2199
|
height: 24px;
|
|
2200
2200
|
width: 24px;
|
|
2201
2201
|
}
|
|
2202
|
-
details.details-filter summary
|
|
2202
|
+
details.details-filter summary::after {
|
|
2203
2203
|
position: absolute;
|
|
2204
2204
|
right: 8px;
|
|
2205
2205
|
transform: rotate(90deg);
|
|
2206
2206
|
}
|
|
2207
|
-
details[open] summary
|
|
2207
|
+
details[open] summary::before {
|
|
2208
2208
|
transform: rotate(90deg);
|
|
2209
2209
|
}
|
|
2210
|
-
details[open] summary
|
|
2210
|
+
details[open] summary::after {
|
|
2211
2211
|
transform: rotate(270deg);
|
|
2212
2212
|
}
|
|
2213
2213
|
eox-itemfilter-expandcontainer .title,
|
|
@@ -2252,9 +2252,12 @@ ul#results {
|
|
|
2252
2252
|
ul li {
|
|
2253
2253
|
padding-left: 0;
|
|
2254
2254
|
}
|
|
2255
|
-
eox-itemfilter-expandcontainer ul,
|
|
2256
|
-
details ul {
|
|
2257
|
-
padding: 0.
|
|
2255
|
+
eox-itemfilter-expandcontainer ul li,
|
|
2256
|
+
details ul li {
|
|
2257
|
+
padding: 0.2rem;
|
|
2258
|
+
}
|
|
2259
|
+
li.highlighted {
|
|
2260
|
+
background: #00417011;
|
|
2258
2261
|
}
|
|
2259
2262
|
section {
|
|
2260
2263
|
position: relative;
|
|
@@ -2304,23 +2307,23 @@ eox-itemfilter-range {
|
|
|
2304
2307
|
margin-left: .5rem;
|
|
2305
2308
|
}
|
|
2306
2309
|
`;
|
|
2307
|
-
var $o = Object.defineProperty, wo = Object.getOwnPropertyDescriptor,
|
|
2310
|
+
var $o = Object.defineProperty, wo = Object.getOwnPropertyDescriptor, ni = (r, e, t, i) => {
|
|
2308
2311
|
for (var n = i > 1 ? void 0 : i ? wo(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2309
2312
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
2310
2313
|
return i && n && $o(e, t, n), n;
|
|
2311
2314
|
};
|
|
2312
|
-
let Gt = class extends
|
|
2315
|
+
let Gt = class extends Pe {
|
|
2313
2316
|
render() {
|
|
2314
2317
|
return he`
|
|
2315
2318
|
<style>
|
|
2316
|
-
${
|
|
2317
|
-
${!this.unstyled &&
|
|
2319
|
+
${$n}
|
|
2320
|
+
${!this.unstyled && wn}
|
|
2318
2321
|
</style>
|
|
2319
2322
|
<details
|
|
2320
2323
|
class="details-filter"
|
|
2321
2324
|
part="details-filter"
|
|
2322
2325
|
data-filter="${this.filterObject.key}"
|
|
2323
|
-
open=${this.filterObject.expanded ||
|
|
2326
|
+
open=${this.filterObject.expanded || ne}
|
|
2324
2327
|
>
|
|
2325
2328
|
<summary>
|
|
2326
2329
|
<span
|
|
@@ -2337,21 +2340,21 @@ let Gt = class extends Oe {
|
|
|
2337
2340
|
`;
|
|
2338
2341
|
}
|
|
2339
2342
|
};
|
|
2340
|
-
|
|
2341
|
-
|
|
2343
|
+
ni([
|
|
2344
|
+
Ae({ attribute: !1 })
|
|
2342
2345
|
], Gt.prototype, "filterObject", 2);
|
|
2343
|
-
|
|
2344
|
-
|
|
2346
|
+
ni([
|
|
2347
|
+
Ae()
|
|
2345
2348
|
], Gt.prototype, "unstyled", 2);
|
|
2346
|
-
Gt =
|
|
2349
|
+
Gt = ni([
|
|
2347
2350
|
Ge("eox-itemfilter-expandcontainer")
|
|
2348
2351
|
], Gt);
|
|
2349
|
-
var _o = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor,
|
|
2352
|
+
var _o = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, _n = (r, e, t, i) => {
|
|
2350
2353
|
for (var n = i > 1 ? void 0 : i ? Eo(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2351
2354
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
2352
2355
|
return i && n && _o(e, t, n), n;
|
|
2353
2356
|
};
|
|
2354
|
-
let
|
|
2357
|
+
let Hr = class extends Pe {
|
|
2355
2358
|
reset() {
|
|
2356
2359
|
this.renderRoot.querySelectorAll("input[type='checkbox']").forEach((r) => {
|
|
2357
2360
|
r instanceof HTMLInputElement && (r.checked = !1);
|
|
@@ -2372,14 +2375,17 @@ let Br = class extends Oe {
|
|
|
2372
2375
|
(r, e) => r.localeCompare(e)
|
|
2373
2376
|
),
|
|
2374
2377
|
(r) => he`
|
|
2375
|
-
<li>
|
|
2378
|
+
<li class=${this.filterObject.state[r] ? "highlighted" : ne}>
|
|
2376
2379
|
<label>
|
|
2377
2380
|
<input
|
|
2381
|
+
data-cy="multiselect-checkbox"
|
|
2378
2382
|
name="selection"
|
|
2379
2383
|
type="checkbox"
|
|
2380
|
-
|
|
2384
|
+
class="multiselect-checkbox"
|
|
2385
|
+
id=${r}
|
|
2386
|
+
checked="${this.filterObject.state[r] || ne}"
|
|
2381
2387
|
@click=${() => {
|
|
2382
|
-
this.filterObject.state[r] = !this.filterObject.state[r], this.filterObject.dirty = !0, this.dispatchEvent(new CustomEvent("filter"));
|
|
2388
|
+
this.filterObject.state[r] = !this.filterObject.state[r], this.filterObject.dirty = !0, this.dispatchEvent(new CustomEvent("filter")), this.requestUpdate();
|
|
2383
2389
|
}}
|
|
2384
2390
|
/>
|
|
2385
2391
|
<span class="title">${r}</span>
|
|
@@ -2391,20 +2397,20 @@ let Br = class extends Oe {
|
|
|
2391
2397
|
`;
|
|
2392
2398
|
}
|
|
2393
2399
|
};
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
],
|
|
2397
|
-
|
|
2400
|
+
_n([
|
|
2401
|
+
Ae()
|
|
2402
|
+
], Hr.prototype, "filterObject", 2);
|
|
2403
|
+
Hr = _n([
|
|
2398
2404
|
Ge("eox-itemfilter-multiselect")
|
|
2399
|
-
],
|
|
2400
|
-
var Mo = "Expected a function",
|
|
2405
|
+
], Hr);
|
|
2406
|
+
var Mo = "Expected a function", Ji = 0 / 0, Ao = "[object Symbol]", So = /^\s+|\s+$/g, Oo = /^[-+]0x[0-9a-f]+$/i, Po = /^0b[01]+$/i, Co = /^0o[0-7]+$/i, ko = parseInt, Lo = typeof pt == "object" && pt && pt.Object === Object && pt, To = typeof self == "object" && self && self.Object === Object && self, Ro = Lo || To || Function("return this")(), Do = Object.prototype, Io = Do.toString, jo = Math.max, No = Math.min, Dr = function() {
|
|
2401
2407
|
return Ro.Date.now();
|
|
2402
2408
|
};
|
|
2403
2409
|
function Bo(r, e, t) {
|
|
2404
2410
|
var i, n, s, o, c, a, u = 0, g = !1, v = !1, _ = !0;
|
|
2405
2411
|
if (typeof r != "function")
|
|
2406
2412
|
throw new TypeError(Mo);
|
|
2407
|
-
e =
|
|
2413
|
+
e = Zi(e) || 0, Ur(t) && (g = !!t.leading, v = "maxWait" in t, s = v ? jo(Zi(t.maxWait) || 0, e) : s, _ = "trailing" in t ? !!t.trailing : _);
|
|
2408
2414
|
function E(w) {
|
|
2409
2415
|
var M = i, P = n;
|
|
2410
2416
|
return i = n = void 0, u = w, o = r.apply(P, M), o;
|
|
@@ -2416,13 +2422,13 @@ function Bo(r, e, t) {
|
|
|
2416
2422
|
var M = w - a, P = w - u, L = e - M;
|
|
2417
2423
|
return v ? No(L, s - P) : L;
|
|
2418
2424
|
}
|
|
2419
|
-
function
|
|
2425
|
+
function se(w) {
|
|
2420
2426
|
var M = w - a, P = w - u;
|
|
2421
2427
|
return a === void 0 || M >= e || M < 0 || v && P >= s;
|
|
2422
2428
|
}
|
|
2423
2429
|
function te() {
|
|
2424
|
-
var w =
|
|
2425
|
-
if (
|
|
2430
|
+
var w = Dr();
|
|
2431
|
+
if (se(w))
|
|
2426
2432
|
return f(w);
|
|
2427
2433
|
c = setTimeout(te, F(w));
|
|
2428
2434
|
}
|
|
@@ -2433,10 +2439,10 @@ function Bo(r, e, t) {
|
|
|
2433
2439
|
c !== void 0 && clearTimeout(c), u = 0, i = a = n = c = void 0;
|
|
2434
2440
|
}
|
|
2435
2441
|
function b() {
|
|
2436
|
-
return c === void 0 ? o : f(
|
|
2442
|
+
return c === void 0 ? o : f(Dr());
|
|
2437
2443
|
}
|
|
2438
2444
|
function S() {
|
|
2439
|
-
var w =
|
|
2445
|
+
var w = Dr(), M = se(w);
|
|
2440
2446
|
if (i = arguments, n = this, a = w, M) {
|
|
2441
2447
|
if (c === void 0)
|
|
2442
2448
|
return k(a);
|
|
@@ -2447,7 +2453,7 @@ function Bo(r, e, t) {
|
|
|
2447
2453
|
}
|
|
2448
2454
|
return S.cancel = p, S.flush = b, S;
|
|
2449
2455
|
}
|
|
2450
|
-
function
|
|
2456
|
+
function Ur(r) {
|
|
2451
2457
|
var e = typeof r;
|
|
2452
2458
|
return !!r && (e == "object" || e == "function");
|
|
2453
2459
|
}
|
|
@@ -2457,34 +2463,34 @@ function Fo(r) {
|
|
|
2457
2463
|
function Ho(r) {
|
|
2458
2464
|
return typeof r == "symbol" || Fo(r) && Io.call(r) == Ao;
|
|
2459
2465
|
}
|
|
2460
|
-
function
|
|
2466
|
+
function Zi(r) {
|
|
2461
2467
|
if (typeof r == "number")
|
|
2462
2468
|
return r;
|
|
2463
2469
|
if (Ho(r))
|
|
2464
|
-
return
|
|
2465
|
-
if (
|
|
2470
|
+
return Ji;
|
|
2471
|
+
if (Ur(r)) {
|
|
2466
2472
|
var e = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
2467
|
-
r =
|
|
2473
|
+
r = Ur(e) ? e + "" : e;
|
|
2468
2474
|
}
|
|
2469
2475
|
if (typeof r != "string")
|
|
2470
2476
|
return r === 0 ? r : +r;
|
|
2471
2477
|
r = r.replace(So, "");
|
|
2472
2478
|
var t = Po.test(r);
|
|
2473
|
-
return t || Co.test(r) ? ko(r.slice(2), t ? 2 : 8) : Oo.test(r) ?
|
|
2479
|
+
return t || Co.test(r) ? ko(r.slice(2), t ? 2 : 8) : Oo.test(r) ? Ji : +r;
|
|
2474
2480
|
}
|
|
2475
|
-
var
|
|
2476
|
-
const
|
|
2477
|
-
var
|
|
2481
|
+
var Uo = Bo;
|
|
2482
|
+
const En = /* @__PURE__ */ ri(Uo);
|
|
2483
|
+
var Yo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, Mn = (r, e, t, i) => {
|
|
2478
2484
|
for (var n = i > 1 ? void 0 : i ? zo(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2479
2485
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
2480
|
-
return i && n &&
|
|
2486
|
+
return i && n && Yo(e, t, n), n;
|
|
2481
2487
|
};
|
|
2482
|
-
let
|
|
2488
|
+
let Yr = class extends Pe {
|
|
2483
2489
|
constructor() {
|
|
2484
2490
|
super(...arguments), this.inputHandler = (r) => {
|
|
2485
2491
|
let e, t;
|
|
2486
2492
|
[e, t] = r.detail.values, (e !== this.filterObject.state.min || t != this.filterObject.state.max) && ([this.filterObject.state.min, this.filterObject.state.max] = [e, t], this.filterObject.dirty = !0), this.dispatchEvent(new CustomEvent("filter")), this.requestUpdate();
|
|
2487
|
-
}, this.debouncedInputHandler =
|
|
2493
|
+
}, this.debouncedInputHandler = En(this.inputHandler, 0, {
|
|
2488
2494
|
leading: !0
|
|
2489
2495
|
});
|
|
2490
2496
|
}
|
|
@@ -2498,7 +2504,7 @@ let Hr = class extends Oe {
|
|
|
2498
2504
|
render() {
|
|
2499
2505
|
return he`
|
|
2500
2506
|
<div class="range-before">
|
|
2501
|
-
${this.filterObject.format === "date" ?
|
|
2507
|
+
${this.filterObject.format === "date" ? qt.unix(this.filterObject.state.min) : this.filterObject.state.min}
|
|
2502
2508
|
</div>
|
|
2503
2509
|
<tc-range-slider
|
|
2504
2510
|
min="${this.filterObject.min}"
|
|
@@ -2509,23 +2515,23 @@ let Hr = class extends Oe {
|
|
|
2509
2515
|
@change="${this.debouncedInputHandler}"
|
|
2510
2516
|
></tc-range-slider>
|
|
2511
2517
|
<div class="range-after">
|
|
2512
|
-
${this.filterObject.format === "date" ?
|
|
2518
|
+
${this.filterObject.format === "date" ? qt.unix(this.filterObject.state.max) : this.filterObject.state.max}
|
|
2513
2519
|
</div>
|
|
2514
2520
|
`;
|
|
2515
2521
|
}
|
|
2516
2522
|
};
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
],
|
|
2520
|
-
|
|
2523
|
+
Mn([
|
|
2524
|
+
Ae()
|
|
2525
|
+
], Yr.prototype, "filterObject", 2);
|
|
2526
|
+
Yr = Mn([
|
|
2521
2527
|
Ge("eox-itemfilter-range")
|
|
2522
|
-
],
|
|
2523
|
-
var Xo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor,
|
|
2528
|
+
], Yr);
|
|
2529
|
+
var Xo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, An = (r, e, t, i) => {
|
|
2524
2530
|
for (var n = i > 1 ? void 0 : i ? Vo(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
2525
2531
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
2526
2532
|
return i && n && Xo(e, t, n), n;
|
|
2527
2533
|
};
|
|
2528
|
-
let
|
|
2534
|
+
let zr = class extends Pe {
|
|
2529
2535
|
reset() {
|
|
2530
2536
|
this.renderRoot.querySelectorAll("input[type='radio']").forEach((r) => {
|
|
2531
2537
|
r instanceof HTMLInputElement && (r.checked = !1);
|
|
@@ -2546,16 +2552,18 @@ let Yr = class extends Oe {
|
|
|
2546
2552
|
(r, e) => r.localeCompare(e)
|
|
2547
2553
|
),
|
|
2548
2554
|
(r) => he`
|
|
2549
|
-
<li>
|
|
2555
|
+
<li class=${this.filterObject.state[r] ? "highlighted" : ne}>
|
|
2550
2556
|
<label>
|
|
2551
2557
|
<input
|
|
2552
2558
|
name="selection"
|
|
2553
2559
|
type="radio"
|
|
2554
|
-
|
|
2560
|
+
class="select-radio"
|
|
2561
|
+
id=${r}
|
|
2562
|
+
checked="${this.filterObject.state[r] || ne}"
|
|
2555
2563
|
@click=${() => {
|
|
2556
2564
|
for (const e in this.filterObject.state)
|
|
2557
2565
|
this.filterObject.state[e] = e === r;
|
|
2558
|
-
this.filterObject.dirty = !0, this.dispatchEvent(new CustomEvent("filter"));
|
|
2566
|
+
this.filterObject.dirty = !0, this.dispatchEvent(new CustomEvent("filter")), this.requestUpdate();
|
|
2559
2567
|
}}
|
|
2560
2568
|
/>
|
|
2561
2569
|
<span class="title">${r}</span>
|
|
@@ -2567,24 +2575,24 @@ let Yr = class extends Oe {
|
|
|
2567
2575
|
`;
|
|
2568
2576
|
}
|
|
2569
2577
|
};
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
],
|
|
2573
|
-
|
|
2578
|
+
An([
|
|
2579
|
+
Ae()
|
|
2580
|
+
], zr.prototype, "filterObject", 2);
|
|
2581
|
+
zr = An([
|
|
2574
2582
|
Ge("eox-itemfilter-select")
|
|
2575
|
-
],
|
|
2583
|
+
], zr);
|
|
2576
2584
|
/**
|
|
2577
2585
|
* @license
|
|
2578
2586
|
* Copyright 2020 Google LLC
|
|
2579
2587
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2580
2588
|
*/
|
|
2581
|
-
const Wo = (r) => r.strings === void 0,
|
|
2589
|
+
const Wo = (r) => r.strings === void 0, qo = {}, Go = (r, e = qo) => r._$AH = e;
|
|
2582
2590
|
/**
|
|
2583
2591
|
* @license
|
|
2584
2592
|
* Copyright 2020 Google LLC
|
|
2585
2593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2586
2594
|
*/
|
|
2587
|
-
const Ko =
|
|
2595
|
+
const Ko = mn(class extends yn {
|
|
2588
2596
|
constructor(r) {
|
|
2589
2597
|
if (super(r), r.type !== et.PROPERTY && r.type !== et.ATTRIBUTE && r.type !== et.BOOLEAN_ATTRIBUTE)
|
|
2590
2598
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
@@ -2595,7 +2603,7 @@ const Ko = vn(class extends mn {
|
|
|
2595
2603
|
return r;
|
|
2596
2604
|
}
|
|
2597
2605
|
update(r, [e]) {
|
|
2598
|
-
if (e === De || e ===
|
|
2606
|
+
if (e === De || e === ne)
|
|
2599
2607
|
return e;
|
|
2600
2608
|
const t = r.element, i = r.name;
|
|
2601
2609
|
if (r.type === et.PROPERTY) {
|
|
@@ -2606,10 +2614,10 @@ const Ko = vn(class extends mn {
|
|
|
2606
2614
|
return De;
|
|
2607
2615
|
} else if (r.type === et.ATTRIBUTE && t.getAttribute(i) === e + "")
|
|
2608
2616
|
return De;
|
|
2609
|
-
return
|
|
2617
|
+
return Go(r), e;
|
|
2610
2618
|
}
|
|
2611
2619
|
});
|
|
2612
|
-
var $e = 63710088e-1,
|
|
2620
|
+
var $e = 63710088e-1, si = {
|
|
2613
2621
|
centimeters: $e * 100,
|
|
2614
2622
|
centimetres: $e * 100,
|
|
2615
2623
|
degrees: $e / 111325,
|
|
@@ -2641,7 +2649,7 @@ var $e = 63710088e-1, ii = {
|
|
|
2641
2649
|
nauticalmiles: 1 / 1852,
|
|
2642
2650
|
radians: 1 / $e,
|
|
2643
2651
|
yards: 1.0936133
|
|
2644
|
-
},
|
|
2652
|
+
}, Xr = {
|
|
2645
2653
|
acres: 247105e-9,
|
|
2646
2654
|
centimeters: 1e4,
|
|
2647
2655
|
centimetres: 1e4,
|
|
@@ -2657,7 +2665,7 @@ var $e = 63710088e-1, ii = {
|
|
|
2657
2665
|
millimetres: 1e6,
|
|
2658
2666
|
yards: 1.195990046
|
|
2659
2667
|
};
|
|
2660
|
-
function
|
|
2668
|
+
function ke(r, e, t) {
|
|
2661
2669
|
t === void 0 && (t = {});
|
|
2662
2670
|
var i = { type: "Feature" };
|
|
2663
2671
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = r, i;
|
|
@@ -2669,13 +2677,13 @@ function Zo(r, e, t) {
|
|
|
2669
2677
|
case "LineString":
|
|
2670
2678
|
return Ie(e).geometry;
|
|
2671
2679
|
case "Polygon":
|
|
2672
|
-
return
|
|
2680
|
+
return oi(e).geometry;
|
|
2673
2681
|
case "MultiPoint":
|
|
2674
|
-
return
|
|
2682
|
+
return Sn(e).geometry;
|
|
2675
2683
|
case "MultiLineString":
|
|
2676
|
-
return
|
|
2684
|
+
return ai(e).geometry;
|
|
2677
2685
|
case "MultiPolygon":
|
|
2678
|
-
return
|
|
2686
|
+
return On(e).geometry;
|
|
2679
2687
|
default:
|
|
2680
2688
|
throw new Error(r + " is invalid");
|
|
2681
2689
|
}
|
|
@@ -2687,20 +2695,20 @@ function Fe(r, e, t) {
|
|
|
2687
2695
|
throw new Error("coordinates must be an Array");
|
|
2688
2696
|
if (r.length < 2)
|
|
2689
2697
|
throw new Error("coordinates must be at least 2 numbers long");
|
|
2690
|
-
if (!
|
|
2698
|
+
if (!Kt(r[0]) || !Kt(r[1]))
|
|
2691
2699
|
throw new Error("coordinates must contain numbers");
|
|
2692
2700
|
var i = {
|
|
2693
2701
|
type: "Point",
|
|
2694
2702
|
coordinates: r
|
|
2695
2703
|
};
|
|
2696
|
-
return
|
|
2704
|
+
return ke(i, e, t);
|
|
2697
2705
|
}
|
|
2698
2706
|
function Qo(r, e, t) {
|
|
2699
|
-
return t === void 0 && (t = {}),
|
|
2707
|
+
return t === void 0 && (t = {}), qe(r.map(function(i) {
|
|
2700
2708
|
return Fe(i, e);
|
|
2701
2709
|
}), t);
|
|
2702
2710
|
}
|
|
2703
|
-
function
|
|
2711
|
+
function oi(r, e, t) {
|
|
2704
2712
|
t === void 0 && (t = {});
|
|
2705
2713
|
for (var i = 0, n = r; i < n.length; i++) {
|
|
2706
2714
|
var s = n[i];
|
|
@@ -2714,11 +2722,11 @@ function ni(r, e, t) {
|
|
|
2714
2722
|
type: "Polygon",
|
|
2715
2723
|
coordinates: r
|
|
2716
2724
|
};
|
|
2717
|
-
return
|
|
2725
|
+
return ke(c, e, t);
|
|
2718
2726
|
}
|
|
2719
2727
|
function ea(r, e, t) {
|
|
2720
|
-
return t === void 0 && (t = {}),
|
|
2721
|
-
return
|
|
2728
|
+
return t === void 0 && (t = {}), qe(r.map(function(i) {
|
|
2729
|
+
return oi(i, e);
|
|
2722
2730
|
}), t);
|
|
2723
2731
|
}
|
|
2724
2732
|
function Ie(r, e, t) {
|
|
@@ -2728,41 +2736,41 @@ function Ie(r, e, t) {
|
|
|
2728
2736
|
type: "LineString",
|
|
2729
2737
|
coordinates: r
|
|
2730
2738
|
};
|
|
2731
|
-
return
|
|
2739
|
+
return ke(i, e, t);
|
|
2732
2740
|
}
|
|
2733
2741
|
function ta(r, e, t) {
|
|
2734
|
-
return t === void 0 && (t = {}),
|
|
2742
|
+
return t === void 0 && (t = {}), qe(r.map(function(i) {
|
|
2735
2743
|
return Ie(i, e);
|
|
2736
2744
|
}), t);
|
|
2737
2745
|
}
|
|
2738
|
-
function
|
|
2746
|
+
function qe(r, e) {
|
|
2739
2747
|
e === void 0 && (e = {});
|
|
2740
2748
|
var t = { type: "FeatureCollection" };
|
|
2741
2749
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = r, t;
|
|
2742
2750
|
}
|
|
2743
|
-
function
|
|
2751
|
+
function ai(r, e, t) {
|
|
2744
2752
|
t === void 0 && (t = {});
|
|
2745
2753
|
var i = {
|
|
2746
2754
|
type: "MultiLineString",
|
|
2747
2755
|
coordinates: r
|
|
2748
2756
|
};
|
|
2749
|
-
return
|
|
2757
|
+
return ke(i, e, t);
|
|
2750
2758
|
}
|
|
2751
|
-
function
|
|
2759
|
+
function Sn(r, e, t) {
|
|
2752
2760
|
t === void 0 && (t = {});
|
|
2753
2761
|
var i = {
|
|
2754
2762
|
type: "MultiPoint",
|
|
2755
2763
|
coordinates: r
|
|
2756
2764
|
};
|
|
2757
|
-
return
|
|
2765
|
+
return ke(i, e, t);
|
|
2758
2766
|
}
|
|
2759
|
-
function
|
|
2767
|
+
function On(r, e, t) {
|
|
2760
2768
|
t === void 0 && (t = {});
|
|
2761
2769
|
var i = {
|
|
2762
2770
|
type: "MultiPolygon",
|
|
2763
2771
|
coordinates: r
|
|
2764
2772
|
};
|
|
2765
|
-
return
|
|
2773
|
+
return ke(i, e, t);
|
|
2766
2774
|
}
|
|
2767
2775
|
function ra(r, e, t) {
|
|
2768
2776
|
t === void 0 && (t = {});
|
|
@@ -2770,7 +2778,7 @@ function ra(r, e, t) {
|
|
|
2770
2778
|
type: "GeometryCollection",
|
|
2771
2779
|
geometries: r
|
|
2772
2780
|
};
|
|
2773
|
-
return
|
|
2781
|
+
return ke(i, e, t);
|
|
2774
2782
|
}
|
|
2775
2783
|
function ia(r, e) {
|
|
2776
2784
|
if (e === void 0 && (e = 0), e && !(e >= 0))
|
|
@@ -2778,28 +2786,28 @@ function ia(r, e) {
|
|
|
2778
2786
|
var t = Math.pow(10, e || 0);
|
|
2779
2787
|
return Math.round(r * t) / t;
|
|
2780
2788
|
}
|
|
2781
|
-
function
|
|
2789
|
+
function Pn(r, e) {
|
|
2782
2790
|
e === void 0 && (e = "kilometers");
|
|
2783
|
-
var t =
|
|
2791
|
+
var t = si[e];
|
|
2784
2792
|
if (!t)
|
|
2785
2793
|
throw new Error(e + " units is invalid");
|
|
2786
2794
|
return r * t;
|
|
2787
2795
|
}
|
|
2788
|
-
function
|
|
2796
|
+
function li(r, e) {
|
|
2789
2797
|
e === void 0 && (e = "kilometers");
|
|
2790
|
-
var t =
|
|
2798
|
+
var t = si[e];
|
|
2791
2799
|
if (!t)
|
|
2792
2800
|
throw new Error(e + " units is invalid");
|
|
2793
2801
|
return r / t;
|
|
2794
2802
|
}
|
|
2795
2803
|
function na(r, e) {
|
|
2796
|
-
return
|
|
2804
|
+
return Cn(li(r, e));
|
|
2797
2805
|
}
|
|
2798
2806
|
function sa(r) {
|
|
2799
2807
|
var e = r % 360;
|
|
2800
2808
|
return e < 0 && (e += 360), e;
|
|
2801
2809
|
}
|
|
2802
|
-
function
|
|
2810
|
+
function Cn(r) {
|
|
2803
2811
|
var e = r % (2 * Math.PI);
|
|
2804
2812
|
return e * 180 / Math.PI;
|
|
2805
2813
|
}
|
|
@@ -2810,23 +2818,23 @@ function oa(r) {
|
|
|
2810
2818
|
function aa(r, e, t) {
|
|
2811
2819
|
if (e === void 0 && (e = "kilometers"), t === void 0 && (t = "kilometers"), !(r >= 0))
|
|
2812
2820
|
throw new Error("length must be a positive number");
|
|
2813
|
-
return
|
|
2821
|
+
return Pn(li(r, e), t);
|
|
2814
2822
|
}
|
|
2815
2823
|
function la(r, e, t) {
|
|
2816
2824
|
if (e === void 0 && (e = "meters"), t === void 0 && (t = "kilometers"), !(r >= 0))
|
|
2817
2825
|
throw new Error("area must be a positive number");
|
|
2818
|
-
var i =
|
|
2826
|
+
var i = Xr[e];
|
|
2819
2827
|
if (!i)
|
|
2820
2828
|
throw new Error("invalid original units");
|
|
2821
|
-
var n =
|
|
2829
|
+
var n = Xr[t];
|
|
2822
2830
|
if (!n)
|
|
2823
2831
|
throw new Error("invalid final units");
|
|
2824
2832
|
return r / i * n;
|
|
2825
2833
|
}
|
|
2826
|
-
function
|
|
2834
|
+
function Kt(r) {
|
|
2827
2835
|
return !isNaN(r) && r !== null && !Array.isArray(r);
|
|
2828
2836
|
}
|
|
2829
|
-
function
|
|
2837
|
+
function ci(r) {
|
|
2830
2838
|
return !!r && r.constructor === Object;
|
|
2831
2839
|
}
|
|
2832
2840
|
function ca(r) {
|
|
@@ -2837,7 +2845,7 @@ function ca(r) {
|
|
|
2837
2845
|
if (r.length !== 4 && r.length !== 6)
|
|
2838
2846
|
throw new Error("bbox must be an Array of 4 or 6 numbers");
|
|
2839
2847
|
r.forEach(function(e) {
|
|
2840
|
-
if (!
|
|
2848
|
+
if (!Kt(e))
|
|
2841
2849
|
throw new Error("bbox must only contain numbers");
|
|
2842
2850
|
});
|
|
2843
2851
|
}
|
|
@@ -2849,38 +2857,38 @@ function ua(r) {
|
|
|
2849
2857
|
}
|
|
2850
2858
|
const ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2851
2859
|
__proto__: null,
|
|
2852
|
-
areaFactors:
|
|
2860
|
+
areaFactors: Xr,
|
|
2853
2861
|
bearingToAzimuth: sa,
|
|
2854
2862
|
convertArea: la,
|
|
2855
2863
|
convertLength: aa,
|
|
2856
2864
|
degreesToRadians: oa,
|
|
2857
2865
|
earthRadius: $e,
|
|
2858
|
-
factors:
|
|
2859
|
-
feature:
|
|
2860
|
-
featureCollection:
|
|
2866
|
+
factors: si,
|
|
2867
|
+
feature: ke,
|
|
2868
|
+
featureCollection: qe,
|
|
2861
2869
|
geometry: Zo,
|
|
2862
2870
|
geometryCollection: ra,
|
|
2863
|
-
isNumber:
|
|
2864
|
-
isObject:
|
|
2871
|
+
isNumber: Kt,
|
|
2872
|
+
isObject: ci,
|
|
2865
2873
|
lengthToDegrees: na,
|
|
2866
|
-
lengthToRadians:
|
|
2874
|
+
lengthToRadians: li,
|
|
2867
2875
|
lineString: Ie,
|
|
2868
2876
|
lineStrings: ta,
|
|
2869
|
-
multiLineString:
|
|
2870
|
-
multiPoint:
|
|
2871
|
-
multiPolygon:
|
|
2877
|
+
multiLineString: ai,
|
|
2878
|
+
multiPoint: Sn,
|
|
2879
|
+
multiPolygon: On,
|
|
2872
2880
|
point: Fe,
|
|
2873
2881
|
points: Qo,
|
|
2874
|
-
polygon:
|
|
2882
|
+
polygon: oi,
|
|
2875
2883
|
polygons: ea,
|
|
2876
|
-
radiansToDegrees:
|
|
2877
|
-
radiansToLength:
|
|
2884
|
+
radiansToDegrees: Cn,
|
|
2885
|
+
radiansToLength: Pn,
|
|
2878
2886
|
round: ia,
|
|
2879
2887
|
unitsFactors: Jo,
|
|
2880
2888
|
validateBBox: ca,
|
|
2881
2889
|
validateId: ua
|
|
2882
2890
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2883
|
-
function
|
|
2891
|
+
function kn(r) {
|
|
2884
2892
|
if (!r)
|
|
2885
2893
|
throw new Error("coord is required");
|
|
2886
2894
|
if (!Array.isArray(r)) {
|
|
@@ -2893,7 +2901,7 @@ function Cn(r) {
|
|
|
2893
2901
|
return r;
|
|
2894
2902
|
throw new Error("coord must be GeoJSON Point or an Array of numbers");
|
|
2895
2903
|
}
|
|
2896
|
-
function
|
|
2904
|
+
function mt(r) {
|
|
2897
2905
|
if (Array.isArray(r))
|
|
2898
2906
|
return r;
|
|
2899
2907
|
if (r.type === "Feature") {
|
|
@@ -2903,27 +2911,27 @@ function vt(r) {
|
|
|
2903
2911
|
return r.coordinates;
|
|
2904
2912
|
throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array");
|
|
2905
2913
|
}
|
|
2906
|
-
function
|
|
2914
|
+
function yt(r) {
|
|
2907
2915
|
return r.type === "Feature" ? r.geometry : r;
|
|
2908
2916
|
}
|
|
2909
|
-
function
|
|
2917
|
+
function Ce(r, e, t) {
|
|
2910
2918
|
if (t === void 0 && (t = {}), !r)
|
|
2911
2919
|
throw new Error("point is required");
|
|
2912
2920
|
if (!e)
|
|
2913
2921
|
throw new Error("polygon is required");
|
|
2914
|
-
var i =
|
|
2922
|
+
var i = kn(r), n = yt(e), s = n.type, o = e.bbox, c = n.coordinates;
|
|
2915
2923
|
if (o && da(i, o) === !1)
|
|
2916
2924
|
return !1;
|
|
2917
2925
|
s === "Polygon" && (c = [c]);
|
|
2918
2926
|
for (var a = !1, u = 0; u < c.length && !a; u++)
|
|
2919
|
-
if (
|
|
2927
|
+
if (Qi(i, c[u][0], t.ignoreBoundary)) {
|
|
2920
2928
|
for (var g = !1, v = 1; v < c[u].length && !g; )
|
|
2921
|
-
|
|
2929
|
+
Qi(i, c[u][v], !t.ignoreBoundary) && (g = !0), v++;
|
|
2922
2930
|
g || (a = !0);
|
|
2923
2931
|
}
|
|
2924
2932
|
return a;
|
|
2925
2933
|
}
|
|
2926
|
-
function
|
|
2934
|
+
function Qi(r, e, t) {
|
|
2927
2935
|
var i = !1;
|
|
2928
2936
|
e[0][0] === e[e.length - 1][0] && e[0][1] === e[e.length - 1][1] && (e = e.slice(0, e.length - 1));
|
|
2929
2937
|
for (var n = 0, s = e.length - 1; n < e.length; s = n++) {
|
|
@@ -2938,9 +2946,9 @@ function Zi(r, e, t) {
|
|
|
2938
2946
|
function da(r, e) {
|
|
2939
2947
|
return e[0] <= r[0] && e[1] <= r[1] && e[2] >= r[0] && e[3] >= r[1];
|
|
2940
2948
|
}
|
|
2941
|
-
function
|
|
2949
|
+
function bt(r, e, t) {
|
|
2942
2950
|
if (r !== null)
|
|
2943
|
-
for (var i, n, s, o, c, a, u, g = 0, v = 0, _, E = r.type, k = E === "FeatureCollection", F = E === "Feature",
|
|
2951
|
+
for (var i, n, s, o, c, a, u, g = 0, v = 0, _, E = r.type, k = E === "FeatureCollection", F = E === "Feature", se = k ? r.features.length : 1, te = 0; te < se; te++) {
|
|
2944
2952
|
u = k ? r.features[te].geometry : F ? r.geometry : r, _ = u ? u.type === "GeometryCollection" : !1, c = _ ? u.geometries.length : 1;
|
|
2945
2953
|
for (var f = 0; f < c; f++) {
|
|
2946
2954
|
var p = 0, b = 0;
|
|
@@ -3015,7 +3023,7 @@ function yt(r, e, t) {
|
|
|
3015
3023
|
break;
|
|
3016
3024
|
case "GeometryCollection":
|
|
3017
3025
|
for (i = 0; i < o.geometries.length; i++)
|
|
3018
|
-
if (
|
|
3026
|
+
if (bt(o.geometries[i], e, t) === !1)
|
|
3019
3027
|
return !1;
|
|
3020
3028
|
break;
|
|
3021
3029
|
default:
|
|
@@ -3027,7 +3035,7 @@ function yt(r, e, t) {
|
|
|
3027
3035
|
}
|
|
3028
3036
|
function fa(r, e, t, i) {
|
|
3029
3037
|
var n = t;
|
|
3030
|
-
return
|
|
3038
|
+
return bt(
|
|
3031
3039
|
r,
|
|
3032
3040
|
function(s, o, c, a, u) {
|
|
3033
3041
|
o === 0 && t === void 0 ? n = s : n = e(
|
|
@@ -3042,7 +3050,7 @@ function fa(r, e, t, i) {
|
|
|
3042
3050
|
i
|
|
3043
3051
|
), n;
|
|
3044
3052
|
}
|
|
3045
|
-
function
|
|
3053
|
+
function Ln(r, e) {
|
|
3046
3054
|
var t;
|
|
3047
3055
|
switch (r.type) {
|
|
3048
3056
|
case "FeatureCollection":
|
|
@@ -3056,11 +3064,11 @@ function kn(r, e) {
|
|
|
3056
3064
|
}
|
|
3057
3065
|
function pa(r, e, t) {
|
|
3058
3066
|
var i = t;
|
|
3059
|
-
return
|
|
3067
|
+
return Ln(r, function(n, s) {
|
|
3060
3068
|
s === 0 && t === void 0 ? i = n : i = e(i, n, s);
|
|
3061
3069
|
}), i;
|
|
3062
3070
|
}
|
|
3063
|
-
function
|
|
3071
|
+
function Jt(r, e) {
|
|
3064
3072
|
if (r.type === "Feature")
|
|
3065
3073
|
e(r, 0);
|
|
3066
3074
|
else if (r.type === "FeatureCollection")
|
|
@@ -3069,17 +3077,17 @@ function Kt(r, e) {
|
|
|
3069
3077
|
}
|
|
3070
3078
|
function ga(r, e, t) {
|
|
3071
3079
|
var i = t;
|
|
3072
|
-
return
|
|
3080
|
+
return Jt(r, function(n, s) {
|
|
3073
3081
|
s === 0 && t === void 0 ? i = n : i = e(i, n, s);
|
|
3074
3082
|
}), i;
|
|
3075
3083
|
}
|
|
3076
3084
|
function va(r) {
|
|
3077
3085
|
var e = [];
|
|
3078
|
-
return
|
|
3086
|
+
return bt(r, function(t) {
|
|
3079
3087
|
e.push(t);
|
|
3080
3088
|
}), e;
|
|
3081
3089
|
}
|
|
3082
|
-
function
|
|
3090
|
+
function ui(r, e) {
|
|
3083
3091
|
var t, i, n, s, o, c, a, u, g, v, _ = 0, E = r.type === "FeatureCollection", k = r.type === "Feature", F = E ? r.features.length : 1;
|
|
3084
3092
|
for (t = 0; t < F; t++) {
|
|
3085
3093
|
for (c = E ? r.features[t].geometry : k ? r.geometry : r, u = E ? r.features[t].properties : k ? r.properties : {}, g = E ? r.features[t].bbox : k ? r.bbox : void 0, v = E ? r.features[t].id : k ? r.id : void 0, a = c ? c.type === "GeometryCollection" : !1, o = a ? c.geometries.length : 1, n = 0; n < o; n++) {
|
|
@@ -3132,7 +3140,7 @@ function li(r, e) {
|
|
|
3132
3140
|
}
|
|
3133
3141
|
function ma(r, e, t) {
|
|
3134
3142
|
var i = t;
|
|
3135
|
-
return
|
|
3143
|
+
return ui(
|
|
3136
3144
|
r,
|
|
3137
3145
|
function(n, s, o, c, a) {
|
|
3138
3146
|
s === 0 && t === void 0 ? i = n : i = e(
|
|
@@ -3147,7 +3155,7 @@ function ma(r, e, t) {
|
|
|
3147
3155
|
), i;
|
|
3148
3156
|
}
|
|
3149
3157
|
function Ye(r, e) {
|
|
3150
|
-
|
|
3158
|
+
ui(r, function(t, i, n, s, o) {
|
|
3151
3159
|
var c = t === null ? null : t.type;
|
|
3152
3160
|
switch (c) {
|
|
3153
3161
|
case null:
|
|
@@ -3155,7 +3163,7 @@ function Ye(r, e) {
|
|
|
3155
3163
|
case "LineString":
|
|
3156
3164
|
case "Polygon":
|
|
3157
3165
|
return e(
|
|
3158
|
-
|
|
3166
|
+
ke(t, n, { bbox: s, id: o }),
|
|
3159
3167
|
i,
|
|
3160
3168
|
0
|
|
3161
3169
|
) === !1 ? !1 : void 0;
|
|
@@ -3177,7 +3185,7 @@ function Ye(r, e) {
|
|
|
3177
3185
|
type: a,
|
|
3178
3186
|
coordinates: g
|
|
3179
3187
|
};
|
|
3180
|
-
if (e(
|
|
3188
|
+
if (e(ke(v, n), i, u) === !1)
|
|
3181
3189
|
return !1;
|
|
3182
3190
|
}
|
|
3183
3191
|
});
|
|
@@ -3196,26 +3204,26 @@ function ya(r, e, t) {
|
|
|
3196
3204
|
}
|
|
3197
3205
|
), i;
|
|
3198
3206
|
}
|
|
3199
|
-
function
|
|
3207
|
+
function Tn(r, e) {
|
|
3200
3208
|
Ye(r, function(t, i, n) {
|
|
3201
3209
|
var s = 0;
|
|
3202
3210
|
if (t.geometry) {
|
|
3203
3211
|
var o = t.geometry.type;
|
|
3204
3212
|
if (!(o === "Point" || o === "MultiPoint")) {
|
|
3205
3213
|
var c, a = 0, u = 0, g = 0;
|
|
3206
|
-
if (
|
|
3214
|
+
if (bt(
|
|
3207
3215
|
t,
|
|
3208
3216
|
function(v, _, E, k, F) {
|
|
3209
3217
|
if (c === void 0 || i > a || k > u || F > g) {
|
|
3210
3218
|
c = v, a = i, u = k, g = F, s = 0;
|
|
3211
3219
|
return;
|
|
3212
3220
|
}
|
|
3213
|
-
var
|
|
3221
|
+
var se = Ie(
|
|
3214
3222
|
[c, v],
|
|
3215
3223
|
t.properties
|
|
3216
3224
|
);
|
|
3217
3225
|
if (e(
|
|
3218
|
-
|
|
3226
|
+
se,
|
|
3219
3227
|
i,
|
|
3220
3228
|
n,
|
|
3221
3229
|
F,
|
|
@@ -3232,7 +3240,7 @@ function Ln(r, e) {
|
|
|
3232
3240
|
}
|
|
3233
3241
|
function ba(r, e, t) {
|
|
3234
3242
|
var i = t, n = !1;
|
|
3235
|
-
return
|
|
3243
|
+
return Tn(
|
|
3236
3244
|
r,
|
|
3237
3245
|
function(s, o, c, a, u) {
|
|
3238
3246
|
n === !1 && t === void 0 ? i = s : i = e(
|
|
@@ -3246,7 +3254,7 @@ function ba(r, e, t) {
|
|
|
3246
3254
|
}
|
|
3247
3255
|
), i;
|
|
3248
3256
|
}
|
|
3249
|
-
function
|
|
3257
|
+
function Rn(r, e) {
|
|
3250
3258
|
if (!r)
|
|
3251
3259
|
throw new Error("geojson is required");
|
|
3252
3260
|
Ye(r, function(t, i, n) {
|
|
@@ -3273,7 +3281,7 @@ function Tn(r, e) {
|
|
|
3273
3281
|
}
|
|
3274
3282
|
function xa(r, e, t) {
|
|
3275
3283
|
var i = t;
|
|
3276
|
-
return
|
|
3284
|
+
return Rn(
|
|
3277
3285
|
r,
|
|
3278
3286
|
function(n, s, o, c) {
|
|
3279
3287
|
s === 0 && t === void 0 ? i = n : i = e(
|
|
@@ -3287,7 +3295,7 @@ function xa(r, e, t) {
|
|
|
3287
3295
|
), i;
|
|
3288
3296
|
}
|
|
3289
3297
|
function $a(r, e) {
|
|
3290
|
-
if (e = e || {}, !
|
|
3298
|
+
if (e = e || {}, !ci(e))
|
|
3291
3299
|
throw new Error("options is invalid");
|
|
3292
3300
|
var t = e.featureIndex || 0, i = e.multiFeatureIndex || 0, n = e.geometryIndex || 0, s = e.segmentIndex || 0, o = e.properties, c;
|
|
3293
3301
|
switch (r.type) {
|
|
@@ -3353,7 +3361,7 @@ function $a(r, e) {
|
|
|
3353
3361
|
throw new Error("geojson is invalid");
|
|
3354
3362
|
}
|
|
3355
3363
|
function wa(r, e) {
|
|
3356
|
-
if (e = e || {}, !
|
|
3364
|
+
if (e = e || {}, !ci(e))
|
|
3357
3365
|
throw new Error("options is invalid");
|
|
3358
3366
|
var t = e.featureIndex || 0, i = e.multiFeatureIndex || 0, n = e.geometryIndex || 0, s = e.coordIndex || 0, o = e.properties, c;
|
|
3359
3367
|
switch (r.type) {
|
|
@@ -3401,40 +3409,40 @@ function wa(r, e) {
|
|
|
3401
3409
|
const _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3402
3410
|
__proto__: null,
|
|
3403
3411
|
coordAll: va,
|
|
3404
|
-
coordEach:
|
|
3412
|
+
coordEach: bt,
|
|
3405
3413
|
coordReduce: fa,
|
|
3406
|
-
featureEach:
|
|
3414
|
+
featureEach: Jt,
|
|
3407
3415
|
featureReduce: ga,
|
|
3408
3416
|
findPoint: wa,
|
|
3409
3417
|
findSegment: $a,
|
|
3410
3418
|
flattenEach: Ye,
|
|
3411
3419
|
flattenReduce: ya,
|
|
3412
|
-
geomEach:
|
|
3420
|
+
geomEach: ui,
|
|
3413
3421
|
geomReduce: ma,
|
|
3414
|
-
lineEach:
|
|
3422
|
+
lineEach: Rn,
|
|
3415
3423
|
lineReduce: xa,
|
|
3416
|
-
propEach:
|
|
3424
|
+
propEach: Ln,
|
|
3417
3425
|
propReduce: pa,
|
|
3418
|
-
segmentEach:
|
|
3426
|
+
segmentEach: Tn,
|
|
3419
3427
|
segmentReduce: ba
|
|
3420
3428
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3421
|
-
function
|
|
3429
|
+
function en(r) {
|
|
3422
3430
|
if (!r)
|
|
3423
3431
|
throw new Error("geojson is required");
|
|
3424
3432
|
var e = [];
|
|
3425
3433
|
return Ye(r, function(t) {
|
|
3426
3434
|
Ea(t, e);
|
|
3427
|
-
}),
|
|
3435
|
+
}), qe(e);
|
|
3428
3436
|
}
|
|
3429
3437
|
function Ea(r, e) {
|
|
3430
3438
|
var t = [], i = r.geometry;
|
|
3431
3439
|
if (i !== null) {
|
|
3432
3440
|
switch (i.type) {
|
|
3433
3441
|
case "Polygon":
|
|
3434
|
-
t =
|
|
3442
|
+
t = mt(i);
|
|
3435
3443
|
break;
|
|
3436
3444
|
case "LineString":
|
|
3437
|
-
t = [
|
|
3445
|
+
t = [mt(i)];
|
|
3438
3446
|
}
|
|
3439
3447
|
t.forEach(function(n) {
|
|
3440
3448
|
var s = Ma(n, r.properties);
|
|
@@ -3455,11 +3463,11 @@ function Aa(r, e) {
|
|
|
3455
3463
|
var t = r[0], i = r[1], n = e[0], s = e[1], o = t < n ? t : n, c = i < s ? i : s, a = t > n ? t : n, u = i > s ? i : s;
|
|
3456
3464
|
return [o, c, a, u];
|
|
3457
3465
|
}
|
|
3458
|
-
var
|
|
3466
|
+
var hi = { exports: {} }, Dn = { exports: {} };
|
|
3459
3467
|
(function(r, e) {
|
|
3460
3468
|
(function(t, i) {
|
|
3461
3469
|
r.exports = i();
|
|
3462
|
-
})(
|
|
3470
|
+
})(pt, function() {
|
|
3463
3471
|
function t(f, p, b, S, w) {
|
|
3464
3472
|
(function M(P, L, I, W, ee) {
|
|
3465
3473
|
for (; W > I; ) {
|
|
@@ -3467,10 +3475,10 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3467
3475
|
var C = W - I + 1, $ = L - I + 1, A = Math.log(C), N = 0.5 * Math.exp(2 * A / 3), O = 0.5 * Math.sqrt(A * N * (C - N) / C) * ($ - C / 2 < 0 ? -1 : 1), H = Math.max(I, Math.floor(L - $ * N / C + O)), X = Math.min(W, Math.floor(L + (C - $) * N / C + O));
|
|
3468
3476
|
M(P, L, H, X, ee);
|
|
3469
3477
|
}
|
|
3470
|
-
var Z = P[L],
|
|
3471
|
-
for (i(P, I, L), ee(P[W], Z) > 0 && i(P, I, W);
|
|
3472
|
-
for (i(P,
|
|
3473
|
-
|
|
3478
|
+
var Z = P[L], le = I, K = W;
|
|
3479
|
+
for (i(P, I, L), ee(P[W], Z) > 0 && i(P, I, W); le < K; ) {
|
|
3480
|
+
for (i(P, le, K), le++, K--; ee(P[le], Z) < 0; )
|
|
3481
|
+
le++;
|
|
3474
3482
|
for (; ee(P[K], Z) > 0; )
|
|
3475
3483
|
K--;
|
|
3476
3484
|
}
|
|
@@ -3500,7 +3508,7 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3500
3508
|
a(f, 0, f.children.length, p, f);
|
|
3501
3509
|
}
|
|
3502
3510
|
function a(f, p, b, S, w) {
|
|
3503
|
-
w || (w =
|
|
3511
|
+
w || (w = se(null)), w.minX = 1 / 0, w.minY = 1 / 0, w.maxX = -1 / 0, w.maxY = -1 / 0;
|
|
3504
3512
|
for (var M = p; M < b; M++) {
|
|
3505
3513
|
var P = f.children[M];
|
|
3506
3514
|
u(w, f.leaf ? S(P) : P);
|
|
@@ -3528,7 +3536,7 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3528
3536
|
function F(f, p) {
|
|
3529
3537
|
return p.minX <= f.maxX && p.minY <= f.maxY && p.maxX >= f.minX && p.maxY >= f.minY;
|
|
3530
3538
|
}
|
|
3531
|
-
function
|
|
3539
|
+
function se(f) {
|
|
3532
3540
|
return { children: f, height: 1, leaf: !0, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
|
|
3533
3541
|
}
|
|
3534
3542
|
function te(f, p, b, S, w) {
|
|
@@ -3593,7 +3601,7 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3593
3601
|
}, s.prototype.insert = function(f) {
|
|
3594
3602
|
return f && this._insert(f, this.data.height - 1), this;
|
|
3595
3603
|
}, s.prototype.clear = function() {
|
|
3596
|
-
return this.data =
|
|
3604
|
+
return this.data = se([]), this;
|
|
3597
3605
|
}, s.prototype.remove = function(f, p) {
|
|
3598
3606
|
if (!f)
|
|
3599
3607
|
return this;
|
|
@@ -3623,8 +3631,8 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3623
3631
|
}, s.prototype._build = function(f, p, b, S) {
|
|
3624
3632
|
var w, M = b - p + 1, P = this._maxEntries;
|
|
3625
3633
|
if (M <= P)
|
|
3626
|
-
return c(w =
|
|
3627
|
-
S || (S = Math.ceil(Math.log(M) / Math.log(P)), P = Math.ceil(M / Math.pow(P, S - 1))), (w =
|
|
3634
|
+
return c(w = se(f.slice(p, b + 1)), this.toBBox), w;
|
|
3635
|
+
S || (S = Math.ceil(Math.log(M) / Math.log(P)), P = Math.ceil(M / Math.pow(P, S - 1))), (w = se([])).leaf = !1, w.height = S;
|
|
3628
3636
|
var L = Math.ceil(M / P), I = L * Math.ceil(Math.sqrt(P));
|
|
3629
3637
|
te(f, p, b, I, this.compareMinX);
|
|
3630
3638
|
for (var W = p; W <= b; W += I) {
|
|
@@ -3654,10 +3662,10 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3654
3662
|
}, s.prototype._split = function(f, p) {
|
|
3655
3663
|
var b = f[p], S = b.children.length, w = this._minEntries;
|
|
3656
3664
|
this._chooseSplitAxis(b, w, S);
|
|
3657
|
-
var M = this._chooseSplitIndex(b, w, S), P =
|
|
3665
|
+
var M = this._chooseSplitIndex(b, w, S), P = se(b.children.splice(M, b.children.length - M));
|
|
3658
3666
|
P.height = b.height, P.leaf = b.leaf, c(b, this.toBBox), c(P, this.toBBox), p ? f[p - 1].children.push(P) : this._splitRoot(b, P);
|
|
3659
3667
|
}, s.prototype._splitRoot = function(f, p) {
|
|
3660
|
-
this.data =
|
|
3668
|
+
this.data = se([f, p]), this.data.height = f.height + 1, this.data.leaf = !1, c(this.data, this.toBBox);
|
|
3661
3669
|
}, s.prototype._chooseSplitIndex = function(f, p, b) {
|
|
3662
3670
|
for (var S, w, M, P, L, I, W, ee = 1 / 0, C = 1 / 0, $ = p; $ <= b - p; $++) {
|
|
3663
3671
|
var A = a(f, 0, $, this.toBBox), N = a(f, $, b, this.toBBox), O = (w = A, M = N, P = void 0, L = void 0, I = void 0, W = void 0, P = Math.max(w.minX, M.minX), L = Math.max(w.minY, M.minY), I = Math.min(w.maxX, M.maxX), W = Math.min(w.maxY, M.maxY), Math.max(0, I - P) * Math.max(0, W - L)), H = _(A) + _(N);
|
|
@@ -3686,12 +3694,12 @@ var ci = { exports: {} }, Rn = { exports: {} };
|
|
|
3686
3694
|
f[p].children.length === 0 ? p > 0 ? (b = f[p - 1].children).splice(b.indexOf(f[p]), 1) : this.clear() : c(f[p], this.toBBox);
|
|
3687
3695
|
}, s;
|
|
3688
3696
|
});
|
|
3689
|
-
})(
|
|
3690
|
-
var Sa =
|
|
3691
|
-
const Oa = /* @__PURE__ */
|
|
3697
|
+
})(Dn);
|
|
3698
|
+
var Sa = Dn.exports;
|
|
3699
|
+
const Oa = /* @__PURE__ */ ii(ha), Pa = /* @__PURE__ */ ii(_a);
|
|
3692
3700
|
function st(r) {
|
|
3693
3701
|
var e = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
3694
|
-
return
|
|
3702
|
+
return bt(r, function(t) {
|
|
3695
3703
|
e[0] > t[0] && (e[0] = t[0]), e[1] > t[1] && (e[1] = t[1]), e[2] < t[0] && (e[2] = t[0]), e[3] < t[1] && (e[3] = t[1]);
|
|
3696
3704
|
}), e;
|
|
3697
3705
|
}
|
|
@@ -3699,42 +3707,42 @@ st.default = st;
|
|
|
3699
3707
|
const Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3700
3708
|
__proto__: null,
|
|
3701
3709
|
default: st
|
|
3702
|
-
}, Symbol.toStringTag, { value: "Module" })), ka = /* @__PURE__ */
|
|
3703
|
-
var Be = Sa,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
var
|
|
3707
|
-
function
|
|
3710
|
+
}, Symbol.toStringTag, { value: "Module" })), ka = /* @__PURE__ */ ii(Ca);
|
|
3711
|
+
var Be = Sa, In = Oa, jn = Pa, dt = ka.default, La = jn.featureEach;
|
|
3712
|
+
jn.coordEach;
|
|
3713
|
+
In.polygon;
|
|
3714
|
+
var tn = In.featureCollection;
|
|
3715
|
+
function Nn(r) {
|
|
3708
3716
|
var e = new Be(r);
|
|
3709
3717
|
return e.insert = function(t) {
|
|
3710
3718
|
if (t.type !== "Feature")
|
|
3711
3719
|
throw new Error("invalid feature");
|
|
3712
|
-
return t.bbox = t.bbox ? t.bbox :
|
|
3720
|
+
return t.bbox = t.bbox ? t.bbox : dt(t), Be.prototype.insert.call(this, t);
|
|
3713
3721
|
}, e.load = function(t) {
|
|
3714
3722
|
var i = [];
|
|
3715
3723
|
return Array.isArray(t) ? t.forEach(function(n) {
|
|
3716
3724
|
if (n.type !== "Feature")
|
|
3717
3725
|
throw new Error("invalid features");
|
|
3718
|
-
n.bbox = n.bbox ? n.bbox :
|
|
3726
|
+
n.bbox = n.bbox ? n.bbox : dt(n), i.push(n);
|
|
3719
3727
|
}) : La(t, function(n) {
|
|
3720
3728
|
if (n.type !== "Feature")
|
|
3721
3729
|
throw new Error("invalid features");
|
|
3722
|
-
n.bbox = n.bbox ? n.bbox :
|
|
3730
|
+
n.bbox = n.bbox ? n.bbox : dt(n), i.push(n);
|
|
3723
3731
|
}), Be.prototype.load.call(this, i);
|
|
3724
3732
|
}, e.remove = function(t, i) {
|
|
3725
3733
|
if (t.type !== "Feature")
|
|
3726
3734
|
throw new Error("invalid feature");
|
|
3727
|
-
return t.bbox = t.bbox ? t.bbox :
|
|
3735
|
+
return t.bbox = t.bbox ? t.bbox : dt(t), Be.prototype.remove.call(this, t, i);
|
|
3728
3736
|
}, e.clear = function() {
|
|
3729
3737
|
return Be.prototype.clear.call(this);
|
|
3730
3738
|
}, e.search = function(t) {
|
|
3731
3739
|
var i = Be.prototype.search.call(this, this.toBBox(t));
|
|
3732
|
-
return
|
|
3740
|
+
return tn(i);
|
|
3733
3741
|
}, e.collides = function(t) {
|
|
3734
3742
|
return Be.prototype.collides.call(this, this.toBBox(t));
|
|
3735
3743
|
}, e.all = function() {
|
|
3736
3744
|
var t = Be.prototype.all.call(this);
|
|
3737
|
-
return
|
|
3745
|
+
return tn(t);
|
|
3738
3746
|
}, e.toJSON = function() {
|
|
3739
3747
|
return Be.prototype.toJSON.call(this);
|
|
3740
3748
|
}, e.fromJSON = function(t) {
|
|
@@ -3748,9 +3756,9 @@ function jn(r) {
|
|
|
3748
3756
|
else if (Array.isArray(t) && t.length === 6)
|
|
3749
3757
|
i = [t[0], t[1], t[3], t[4]];
|
|
3750
3758
|
else if (t.type === "Feature")
|
|
3751
|
-
i =
|
|
3759
|
+
i = dt(t);
|
|
3752
3760
|
else if (t.type === "FeatureCollection")
|
|
3753
|
-
i =
|
|
3761
|
+
i = dt(t);
|
|
3754
3762
|
else
|
|
3755
3763
|
throw new Error("invalid geojson");
|
|
3756
3764
|
return {
|
|
@@ -3761,29 +3769,29 @@ function jn(r) {
|
|
|
3761
3769
|
};
|
|
3762
3770
|
}, e;
|
|
3763
3771
|
}
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
var Ta =
|
|
3767
|
-
const Ra = /* @__PURE__ */
|
|
3768
|
-
function
|
|
3772
|
+
hi.exports = Nn;
|
|
3773
|
+
hi.exports.default = Nn;
|
|
3774
|
+
var Ta = hi.exports;
|
|
3775
|
+
const Ra = /* @__PURE__ */ ri(Ta);
|
|
3776
|
+
function di(r, e) {
|
|
3769
3777
|
var t = {}, i = [];
|
|
3770
|
-
if (r.type === "LineString" && (r =
|
|
3771
|
-
var n =
|
|
3772
|
-
return n && i.push(n),
|
|
3778
|
+
if (r.type === "LineString" && (r = ke(r)), e.type === "LineString" && (e = ke(e)), r.type === "Feature" && e.type === "Feature" && r.geometry !== null && e.geometry !== null && r.geometry.type === "LineString" && e.geometry.type === "LineString" && r.geometry.coordinates.length === 2 && e.geometry.coordinates.length === 2) {
|
|
3779
|
+
var n = rn(r, e);
|
|
3780
|
+
return n && i.push(n), qe(i);
|
|
3773
3781
|
}
|
|
3774
3782
|
var s = Ra();
|
|
3775
|
-
return s.load(
|
|
3776
|
-
|
|
3777
|
-
var a =
|
|
3783
|
+
return s.load(en(e)), Jt(en(r), function(o) {
|
|
3784
|
+
Jt(s.search(o), function(c) {
|
|
3785
|
+
var a = rn(o, c);
|
|
3778
3786
|
if (a) {
|
|
3779
|
-
var u =
|
|
3787
|
+
var u = mt(a).join(",");
|
|
3780
3788
|
t[u] || (t[u] = !0, i.push(a));
|
|
3781
3789
|
}
|
|
3782
3790
|
});
|
|
3783
|
-
}),
|
|
3791
|
+
}), qe(i);
|
|
3784
3792
|
}
|
|
3785
|
-
function
|
|
3786
|
-
var t =
|
|
3793
|
+
function rn(r, e) {
|
|
3794
|
+
var t = mt(r), i = mt(e);
|
|
3787
3795
|
if (t.length !== 2)
|
|
3788
3796
|
throw new Error("<intersects> line1 must only contain 2 coordinates");
|
|
3789
3797
|
if (i.length !== 2)
|
|
@@ -3791,16 +3799,16 @@ function tn(r, e) {
|
|
|
3791
3799
|
var n = t[0][0], s = t[0][1], o = t[1][0], c = t[1][1], a = i[0][0], u = i[0][1], g = i[1][0], v = i[1][1], _ = (v - u) * (o - n) - (g - a) * (c - s), E = (g - a) * (s - u) - (v - u) * (n - a), k = (o - n) * (s - u) - (c - s) * (n - a);
|
|
3792
3800
|
if (_ === 0)
|
|
3793
3801
|
return null;
|
|
3794
|
-
var F = E / _,
|
|
3795
|
-
if (F >= 0 && F <= 1 &&
|
|
3802
|
+
var F = E / _, se = k / _;
|
|
3803
|
+
if (F >= 0 && F <= 1 && se >= 0 && se <= 1) {
|
|
3796
3804
|
var te = n + F * (o - n), f = s + F * (c - s);
|
|
3797
3805
|
return Fe([te, f]);
|
|
3798
3806
|
}
|
|
3799
3807
|
return null;
|
|
3800
3808
|
}
|
|
3801
|
-
function
|
|
3809
|
+
function Vr(r, e) {
|
|
3802
3810
|
e === void 0 && (e = {});
|
|
3803
|
-
var t =
|
|
3811
|
+
var t = yt(r);
|
|
3804
3812
|
switch (!e.properties && r.type === "Feature" && (e.properties = r.properties), t.type) {
|
|
3805
3813
|
case "Polygon":
|
|
3806
3814
|
return Da(t, e);
|
|
@@ -3812,18 +3820,18 @@ function zr(r, e) {
|
|
|
3812
3820
|
}
|
|
3813
3821
|
function Da(r, e) {
|
|
3814
3822
|
e === void 0 && (e = {});
|
|
3815
|
-
var t =
|
|
3816
|
-
return
|
|
3823
|
+
var t = yt(r), i = t.coordinates, n = e.properties ? e.properties : r.type === "Feature" ? r.properties : {};
|
|
3824
|
+
return Bn(i, n);
|
|
3817
3825
|
}
|
|
3818
3826
|
function Ia(r, e) {
|
|
3819
3827
|
e === void 0 && (e = {});
|
|
3820
|
-
var t =
|
|
3828
|
+
var t = yt(r), i = t.coordinates, n = e.properties ? e.properties : r.type === "Feature" ? r.properties : {}, s = [];
|
|
3821
3829
|
return i.forEach(function(o) {
|
|
3822
|
-
s.push(
|
|
3823
|
-
}),
|
|
3830
|
+
s.push(Bn(o, n));
|
|
3831
|
+
}), qe(s);
|
|
3824
3832
|
}
|
|
3825
|
-
function
|
|
3826
|
-
return r.length > 1 ?
|
|
3833
|
+
function Bn(r, e) {
|
|
3834
|
+
return r.length > 1 ? ai(r, e) : Ie(r[0], e);
|
|
3827
3835
|
}
|
|
3828
3836
|
function ja(r, e) {
|
|
3829
3837
|
var t = !0;
|
|
@@ -3840,76 +3848,76 @@ function Na(r, e) {
|
|
|
3840
3848
|
case "Point":
|
|
3841
3849
|
switch (e.type) {
|
|
3842
3850
|
case "Point":
|
|
3843
|
-
return !
|
|
3851
|
+
return !Ua(r.coordinates, e.coordinates);
|
|
3844
3852
|
case "LineString":
|
|
3845
|
-
return !
|
|
3853
|
+
return !nn(e, r);
|
|
3846
3854
|
case "Polygon":
|
|
3847
|
-
return !
|
|
3855
|
+
return !Ce(r, e);
|
|
3848
3856
|
}
|
|
3849
3857
|
break;
|
|
3850
3858
|
case "LineString":
|
|
3851
3859
|
switch (e.type) {
|
|
3852
3860
|
case "Point":
|
|
3853
|
-
return !
|
|
3861
|
+
return !nn(r, e);
|
|
3854
3862
|
case "LineString":
|
|
3855
3863
|
return !Ba(r, e);
|
|
3856
3864
|
case "Polygon":
|
|
3857
|
-
return !
|
|
3865
|
+
return !sn(e, r);
|
|
3858
3866
|
}
|
|
3859
3867
|
break;
|
|
3860
3868
|
case "Polygon":
|
|
3861
3869
|
switch (e.type) {
|
|
3862
3870
|
case "Point":
|
|
3863
|
-
return !
|
|
3871
|
+
return !Ce(e, r);
|
|
3864
3872
|
case "LineString":
|
|
3865
|
-
return !
|
|
3873
|
+
return !sn(r, e);
|
|
3866
3874
|
case "Polygon":
|
|
3867
3875
|
return !Fa(e, r);
|
|
3868
3876
|
}
|
|
3869
3877
|
}
|
|
3870
3878
|
return !1;
|
|
3871
3879
|
}
|
|
3872
|
-
function
|
|
3880
|
+
function nn(r, e) {
|
|
3873
3881
|
for (var t = 0; t < r.coordinates.length - 1; t++)
|
|
3874
3882
|
if (Ha(r.coordinates[t], r.coordinates[t + 1], e.coordinates))
|
|
3875
3883
|
return !0;
|
|
3876
3884
|
return !1;
|
|
3877
3885
|
}
|
|
3878
3886
|
function Ba(r, e) {
|
|
3879
|
-
var t =
|
|
3887
|
+
var t = di(r, e);
|
|
3880
3888
|
return t.features.length > 0;
|
|
3881
3889
|
}
|
|
3882
|
-
function
|
|
3890
|
+
function sn(r, e) {
|
|
3883
3891
|
for (var t = 0, i = e.coordinates; t < i.length; t++) {
|
|
3884
3892
|
var n = i[t];
|
|
3885
|
-
if (
|
|
3893
|
+
if (Ce(n, r))
|
|
3886
3894
|
return !0;
|
|
3887
3895
|
}
|
|
3888
|
-
var s =
|
|
3896
|
+
var s = di(e, Vr(r));
|
|
3889
3897
|
return s.features.length > 0;
|
|
3890
3898
|
}
|
|
3891
3899
|
function Fa(r, e) {
|
|
3892
3900
|
for (var t = 0, i = r.coordinates[0]; t < i.length; t++) {
|
|
3893
3901
|
var n = i[t];
|
|
3894
|
-
if (
|
|
3902
|
+
if (Ce(n, e))
|
|
3895
3903
|
return !0;
|
|
3896
3904
|
}
|
|
3897
3905
|
for (var s = 0, o = e.coordinates[0]; s < o.length; s++) {
|
|
3898
3906
|
var c = o[s];
|
|
3899
|
-
if (
|
|
3907
|
+
if (Ce(c, r))
|
|
3900
3908
|
return !0;
|
|
3901
3909
|
}
|
|
3902
|
-
var a =
|
|
3910
|
+
var a = di(Vr(r), Vr(e));
|
|
3903
3911
|
return a.features.length > 0;
|
|
3904
3912
|
}
|
|
3905
3913
|
function Ha(r, e, t) {
|
|
3906
3914
|
var i = t[0] - r[0], n = t[1] - r[1], s = e[0] - r[0], o = e[1] - r[1], c = i * o - n * s;
|
|
3907
3915
|
return c !== 0 ? !1 : Math.abs(s) >= Math.abs(o) ? s > 0 ? r[0] <= t[0] && t[0] <= e[0] : e[0] <= t[0] && t[0] <= r[0] : o > 0 ? r[1] <= t[1] && t[1] <= e[1] : e[1] <= t[1] && t[1] <= r[1];
|
|
3908
3916
|
}
|
|
3909
|
-
function
|
|
3917
|
+
function Ua(r, e) {
|
|
3910
3918
|
return r[0] === e[0] && r[1] === e[1];
|
|
3911
3919
|
}
|
|
3912
|
-
function
|
|
3920
|
+
function Ya(r, e) {
|
|
3913
3921
|
var t = !1;
|
|
3914
3922
|
return Ye(r, function(i) {
|
|
3915
3923
|
Ye(e, function(n) {
|
|
@@ -3919,9 +3927,9 @@ function Ua(r, e) {
|
|
|
3919
3927
|
});
|
|
3920
3928
|
}), t;
|
|
3921
3929
|
}
|
|
3922
|
-
function
|
|
3930
|
+
function Zt(r, e, t) {
|
|
3923
3931
|
t === void 0 && (t = {});
|
|
3924
|
-
for (var i =
|
|
3932
|
+
for (var i = kn(r), n = mt(e), s = 0; s < n.length - 1; s++) {
|
|
3925
3933
|
var o = !1;
|
|
3926
3934
|
if (t.ignoreEndVertices && (s === 0 && (o = "start"), s === n.length - 2 && (o = "end"), s === 0 && s + 1 === n.length - 1 && (o = "both")), za(n[s], n[s + 1], i, o, typeof t.epsilon > "u" ? null : t.epsilon))
|
|
3927
3935
|
return !0;
|
|
@@ -3947,17 +3955,17 @@ function za(r, e, t, i, n) {
|
|
|
3947
3955
|
return !1;
|
|
3948
3956
|
}
|
|
3949
3957
|
function Xa(r, e) {
|
|
3950
|
-
var t =
|
|
3958
|
+
var t = yt(r), i = yt(e), n = t.type, s = i.type;
|
|
3951
3959
|
switch (n) {
|
|
3952
3960
|
case "Point":
|
|
3953
3961
|
switch (s) {
|
|
3954
3962
|
case "MultiPoint":
|
|
3955
3963
|
return Va(t, i);
|
|
3956
3964
|
case "LineString":
|
|
3957
|
-
return
|
|
3965
|
+
return Zt(t, i, { ignoreEndVertices: !0 });
|
|
3958
3966
|
case "Polygon":
|
|
3959
3967
|
case "MultiPolygon":
|
|
3960
|
-
return
|
|
3968
|
+
return Ce(t, i, { ignoreBoundary: !0 });
|
|
3961
3969
|
default:
|
|
3962
3970
|
throw new Error("feature2 " + s + " geometry not supported");
|
|
3963
3971
|
}
|
|
@@ -3966,10 +3974,10 @@ function Xa(r, e) {
|
|
|
3966
3974
|
case "MultiPoint":
|
|
3967
3975
|
return Wa(t, i);
|
|
3968
3976
|
case "LineString":
|
|
3969
|
-
return
|
|
3977
|
+
return qa(t, i);
|
|
3970
3978
|
case "Polygon":
|
|
3971
3979
|
case "MultiPolygon":
|
|
3972
|
-
return
|
|
3980
|
+
return Ga(t, i);
|
|
3973
3981
|
default:
|
|
3974
3982
|
throw new Error("feature2 " + s + " geometry not supported");
|
|
3975
3983
|
}
|
|
@@ -3998,7 +4006,7 @@ function Xa(r, e) {
|
|
|
3998
4006
|
function Va(r, e) {
|
|
3999
4007
|
var t, i = !1;
|
|
4000
4008
|
for (t = 0; t < e.coordinates.length; t++)
|
|
4001
|
-
if (
|
|
4009
|
+
if (Hn(e.coordinates[t], r.coordinates)) {
|
|
4002
4010
|
i = !0;
|
|
4003
4011
|
break;
|
|
4004
4012
|
}
|
|
@@ -4007,27 +4015,27 @@ function Va(r, e) {
|
|
|
4007
4015
|
function Wa(r, e) {
|
|
4008
4016
|
for (var t = 0; t < r.coordinates.length; t++) {
|
|
4009
4017
|
for (var i = !1, n = 0; n < e.coordinates.length; n++)
|
|
4010
|
-
|
|
4018
|
+
Hn(r.coordinates[t], e.coordinates[n]) && (i = !0);
|
|
4011
4019
|
if (!i)
|
|
4012
4020
|
return !1;
|
|
4013
4021
|
}
|
|
4014
4022
|
return !0;
|
|
4015
4023
|
}
|
|
4016
|
-
function
|
|
4024
|
+
function qa(r, e) {
|
|
4017
4025
|
for (var t = !1, i = 0; i < r.coordinates.length; i++) {
|
|
4018
|
-
if (!
|
|
4026
|
+
if (!Zt(r.coordinates[i], e))
|
|
4019
4027
|
return !1;
|
|
4020
|
-
t || (t =
|
|
4028
|
+
t || (t = Zt(r.coordinates[i], e, { ignoreEndVertices: !0 }));
|
|
4021
4029
|
}
|
|
4022
4030
|
return t;
|
|
4023
4031
|
}
|
|
4024
|
-
function
|
|
4032
|
+
function Ga(r, e) {
|
|
4025
4033
|
for (var t = !0, i = !1, n = 0; n < r.coordinates.length; n++) {
|
|
4026
|
-
if (i =
|
|
4034
|
+
if (i = Ce(r.coordinates[1], e), !i) {
|
|
4027
4035
|
t = !1;
|
|
4028
4036
|
break;
|
|
4029
4037
|
}
|
|
4030
|
-
i =
|
|
4038
|
+
i = Ce(r.coordinates[1], e, {
|
|
4031
4039
|
ignoreBoundary: !0
|
|
4032
4040
|
});
|
|
4033
4041
|
}
|
|
@@ -4035,20 +4043,20 @@ function qa(r, e) {
|
|
|
4035
4043
|
}
|
|
4036
4044
|
function Ka(r, e) {
|
|
4037
4045
|
for (var t = 0; t < r.coordinates.length; t++)
|
|
4038
|
-
if (!
|
|
4046
|
+
if (!Zt(r.coordinates[t], e))
|
|
4039
4047
|
return !1;
|
|
4040
4048
|
return !0;
|
|
4041
4049
|
}
|
|
4042
4050
|
function Ja(r, e) {
|
|
4043
4051
|
var t = st(e), i = st(r);
|
|
4044
|
-
if (!
|
|
4052
|
+
if (!Fn(t, i))
|
|
4045
4053
|
return !1;
|
|
4046
4054
|
for (var n = !1, s = 0; s < r.coordinates.length - 1; s++) {
|
|
4047
|
-
if (!
|
|
4055
|
+
if (!Ce(r.coordinates[s], e))
|
|
4048
4056
|
return !1;
|
|
4049
|
-
if (n || (n =
|
|
4057
|
+
if (n || (n = Ce(r.coordinates[s], e, { ignoreBoundary: !0 })), !n) {
|
|
4050
4058
|
var o = Qa(r.coordinates[s], r.coordinates[s + 1]);
|
|
4051
|
-
n =
|
|
4059
|
+
n = Ce(o, e, {
|
|
4052
4060
|
ignoreBoundary: !0
|
|
4053
4061
|
});
|
|
4054
4062
|
}
|
|
@@ -4057,17 +4065,17 @@ function Ja(r, e) {
|
|
|
4057
4065
|
}
|
|
4058
4066
|
function Za(r, e) {
|
|
4059
4067
|
var t = st(r), i = st(e);
|
|
4060
|
-
if (!
|
|
4068
|
+
if (!Fn(i, t))
|
|
4061
4069
|
return !1;
|
|
4062
4070
|
for (var n = 0; n < r.coordinates[0].length; n++)
|
|
4063
|
-
if (!
|
|
4071
|
+
if (!Ce(r.coordinates[0][n], e))
|
|
4064
4072
|
return !1;
|
|
4065
4073
|
return !0;
|
|
4066
4074
|
}
|
|
4067
|
-
function
|
|
4075
|
+
function Fn(r, e) {
|
|
4068
4076
|
return !(r[0] > e[0] || r[2] < e[2] || r[1] > e[1] || r[3] < e[3]);
|
|
4069
4077
|
}
|
|
4070
|
-
function
|
|
4078
|
+
function Hn(r, e) {
|
|
4071
4079
|
return r[0] === e[0] && r[1] === e[1];
|
|
4072
4080
|
}
|
|
4073
4081
|
function Qa(r, e) {
|
|
@@ -4078,8 +4086,8 @@ var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, Ct = (r, e
|
|
|
4078
4086
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
4079
4087
|
return i && n && el(e, t, n), n;
|
|
4080
4088
|
};
|
|
4081
|
-
const rl = (r, e) => e ?
|
|
4082
|
-
let
|
|
4089
|
+
const rl = (r, e) => e ? Ya(r, e) : !0, il = (r, e) => e ? Xa(r, e) : !0;
|
|
4090
|
+
let Wr = class extends Pe {
|
|
4083
4091
|
reset() {
|
|
4084
4092
|
this.filterObject.state.geometry = void 0;
|
|
4085
4093
|
const r = this.renderRoot.querySelector(
|
|
@@ -4130,12 +4138,12 @@ let Xr = class extends Oe {
|
|
|
4130
4138
|
}
|
|
4131
4139
|
};
|
|
4132
4140
|
Ct([
|
|
4133
|
-
|
|
4134
|
-
],
|
|
4135
|
-
|
|
4141
|
+
Ae()
|
|
4142
|
+
], Wr.prototype, "filterObject", 2);
|
|
4143
|
+
Wr = Ct([
|
|
4136
4144
|
Ge("eox-itemfilter-spatial")
|
|
4137
|
-
],
|
|
4138
|
-
let
|
|
4145
|
+
], Wr);
|
|
4146
|
+
let Qt = class extends Pe {
|
|
4139
4147
|
render() {
|
|
4140
4148
|
return he`<eox-map part="map" style="height: 400px"></eox-map>`;
|
|
4141
4149
|
}
|
|
@@ -4163,34 +4171,36 @@ let Zt = class extends Oe {
|
|
|
4163
4171
|
}
|
|
4164
4172
|
}
|
|
4165
4173
|
];
|
|
4166
|
-
this.eoxMap = this.renderRoot.querySelector("eox-map"),
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
const
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4174
|
+
this.eoxMap = this.renderRoot.querySelector("eox-map"), setTimeout(() => {
|
|
4175
|
+
this.eoxMap.setLayers(r), this.eoxMap.addDraw("draw", {
|
|
4176
|
+
id: "drawInteraction",
|
|
4177
|
+
type: "Polygon"
|
|
4178
|
+
});
|
|
4179
|
+
const e = (t) => {
|
|
4180
|
+
const i = new CustomEvent("filter", {
|
|
4181
|
+
detail: {
|
|
4182
|
+
geometry: {
|
|
4183
|
+
type: "Polygon",
|
|
4184
|
+
coordinates: t.getGeometry().clone().transform("EPSG:3857", "EPSG:4326").getCoordinates()
|
|
4185
|
+
}
|
|
4176
4186
|
}
|
|
4187
|
+
});
|
|
4188
|
+
this.dispatchEvent(i);
|
|
4189
|
+
};
|
|
4190
|
+
this.eoxMap.interactions.drawInteraction.on(
|
|
4191
|
+
// @ts-ignore
|
|
4192
|
+
"drawend",
|
|
4193
|
+
(t) => {
|
|
4194
|
+
e(t.feature), this.eoxMap.removeInteraction("drawInteraction");
|
|
4177
4195
|
}
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
}
|
|
4187
|
-
), this.eoxMap.interactions.drawInteraction_modify.on(
|
|
4188
|
-
// @ts-ignore
|
|
4189
|
-
"modifyend",
|
|
4190
|
-
(t) => {
|
|
4191
|
-
e(t.features.getArray()[0]);
|
|
4192
|
-
}
|
|
4193
|
-
);
|
|
4196
|
+
), this.eoxMap.interactions.drawInteraction_modify.on(
|
|
4197
|
+
// @ts-ignore
|
|
4198
|
+
"modifyend",
|
|
4199
|
+
(t) => {
|
|
4200
|
+
e(t.features.getArray()[0]);
|
|
4201
|
+
}
|
|
4202
|
+
);
|
|
4203
|
+
});
|
|
4194
4204
|
}
|
|
4195
4205
|
// TODO move to epx-map helper function?
|
|
4196
4206
|
createFeatureUrl(r) {
|
|
@@ -4214,27 +4224,27 @@ let Zt = class extends Oe {
|
|
|
4214
4224
|
}
|
|
4215
4225
|
};
|
|
4216
4226
|
Ct([
|
|
4217
|
-
|
|
4218
|
-
],
|
|
4227
|
+
Ae()
|
|
4228
|
+
], Qt.prototype, "geometry", 2);
|
|
4219
4229
|
Ct([
|
|
4220
4230
|
Pt()
|
|
4221
|
-
],
|
|
4222
|
-
|
|
4231
|
+
], Qt.prototype, "eoxMap", 2);
|
|
4232
|
+
Qt = Ct([
|
|
4223
4233
|
Ge("eox-itemfilter-spatial-filter")
|
|
4224
|
-
],
|
|
4225
|
-
var nl = Object.defineProperty, sl = Object.getOwnPropertyDescriptor,
|
|
4234
|
+
], Qt);
|
|
4235
|
+
var nl = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, Un = (r, e, t, i) => {
|
|
4226
4236
|
for (var n = i > 1 ? void 0 : i ? sl(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
4227
4237
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
4228
4238
|
return i && n && nl(e, t, n), n;
|
|
4229
4239
|
};
|
|
4230
|
-
let
|
|
4240
|
+
let qr = class extends Pe {
|
|
4231
4241
|
constructor() {
|
|
4232
4242
|
super(...arguments), this.inputHandler = () => {
|
|
4233
4243
|
const r = this.renderRoot.querySelector("input[type='text']");
|
|
4234
4244
|
this.filterObject.keys.forEach((e) => {
|
|
4235
4245
|
this.filterObject.state[e] = r.value;
|
|
4236
4246
|
}), this.filterObject.dirty = !0, this.dispatchEvent(new CustomEvent("filter"));
|
|
4237
|
-
}, this.debouncedInputHandler =
|
|
4247
|
+
}, this.debouncedInputHandler = En(this.inputHandler, 500, {
|
|
4238
4248
|
leading: !0
|
|
4239
4249
|
});
|
|
4240
4250
|
}
|
|
@@ -4261,14 +4271,14 @@ let Vr = class extends Oe {
|
|
|
4261
4271
|
`;
|
|
4262
4272
|
}
|
|
4263
4273
|
};
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
],
|
|
4267
|
-
|
|
4274
|
+
Un([
|
|
4275
|
+
Ae()
|
|
4276
|
+
], qr.prototype, "filterObject", 2);
|
|
4277
|
+
qr = Un([
|
|
4268
4278
|
Ge("eox-itemfilter-text")
|
|
4269
|
-
],
|
|
4270
|
-
function
|
|
4271
|
-
return Array.isArray ? Array.isArray(r) :
|
|
4279
|
+
], qr);
|
|
4280
|
+
function ze(r) {
|
|
4281
|
+
return Array.isArray ? Array.isArray(r) : Xn(r) === "[object Array]";
|
|
4272
4282
|
}
|
|
4273
4283
|
const ol = 1 / 0;
|
|
4274
4284
|
function al(r) {
|
|
@@ -4287,30 +4297,30 @@ function Yn(r) {
|
|
|
4287
4297
|
return typeof r == "number";
|
|
4288
4298
|
}
|
|
4289
4299
|
function cl(r) {
|
|
4290
|
-
return r === !0 || r === !1 || ul(r) &&
|
|
4300
|
+
return r === !0 || r === !1 || ul(r) && Xn(r) == "[object Boolean]";
|
|
4291
4301
|
}
|
|
4292
|
-
function
|
|
4302
|
+
function zn(r) {
|
|
4293
4303
|
return typeof r == "object";
|
|
4294
4304
|
}
|
|
4295
4305
|
function ul(r) {
|
|
4296
|
-
return
|
|
4306
|
+
return zn(r) && r !== null;
|
|
4297
4307
|
}
|
|
4298
4308
|
function Me(r) {
|
|
4299
4309
|
return r != null;
|
|
4300
4310
|
}
|
|
4301
|
-
function
|
|
4311
|
+
function Ir(r) {
|
|
4302
4312
|
return !r.trim().length;
|
|
4303
4313
|
}
|
|
4304
|
-
function
|
|
4314
|
+
function Xn(r) {
|
|
4305
4315
|
return r == null ? r === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(r);
|
|
4306
4316
|
}
|
|
4307
|
-
const hl = "Incorrect 'index' type", dl = (r) => `Invalid value for key ${r}`, fl = (r) => `Pattern length exceeds max of ${r}.`, pl = (r) => `Missing ${r} property in key`, gl = (r) => `Property 'weight' in key '${r}' must be a positive integer`,
|
|
4317
|
+
const hl = "Incorrect 'index' type", dl = (r) => `Invalid value for key ${r}`, fl = (r) => `Pattern length exceeds max of ${r}.`, pl = (r) => `Missing ${r} property in key`, gl = (r) => `Property 'weight' in key '${r}' must be a positive integer`, on = Object.prototype.hasOwnProperty;
|
|
4308
4318
|
class vl {
|
|
4309
4319
|
constructor(e) {
|
|
4310
4320
|
this._keys = [], this._keyMap = {};
|
|
4311
4321
|
let t = 0;
|
|
4312
4322
|
e.forEach((i) => {
|
|
4313
|
-
let n =
|
|
4323
|
+
let n = Vn(i);
|
|
4314
4324
|
t += n.weight, this._keys.push(n), this._keyMap[n.id] = n, t += n.weight;
|
|
4315
4325
|
}), this._keys.forEach((i) => {
|
|
4316
4326
|
i.weight /= t;
|
|
@@ -4326,25 +4336,25 @@ class vl {
|
|
|
4326
4336
|
return JSON.stringify(this._keys);
|
|
4327
4337
|
}
|
|
4328
4338
|
}
|
|
4329
|
-
function
|
|
4339
|
+
function Vn(r) {
|
|
4330
4340
|
let e = null, t = null, i = null, n = 1, s = null;
|
|
4331
|
-
if (He(r) ||
|
|
4332
|
-
i = r, e =
|
|
4341
|
+
if (He(r) || ze(r))
|
|
4342
|
+
i = r, e = an(r), t = Gr(r);
|
|
4333
4343
|
else {
|
|
4334
|
-
if (!
|
|
4344
|
+
if (!on.call(r, "name"))
|
|
4335
4345
|
throw new Error(pl("name"));
|
|
4336
4346
|
const o = r.name;
|
|
4337
|
-
if (i = o,
|
|
4347
|
+
if (i = o, on.call(r, "weight") && (n = r.weight, n <= 0))
|
|
4338
4348
|
throw new Error(gl(o));
|
|
4339
|
-
e =
|
|
4349
|
+
e = an(o), t = Gr(o), s = r.getFn;
|
|
4340
4350
|
}
|
|
4341
4351
|
return { path: e, id: t, weight: n, src: i, getFn: s };
|
|
4342
4352
|
}
|
|
4343
|
-
function
|
|
4344
|
-
return
|
|
4353
|
+
function an(r) {
|
|
4354
|
+
return ze(r) ? r : r.split(".");
|
|
4345
4355
|
}
|
|
4346
|
-
function
|
|
4347
|
-
return
|
|
4356
|
+
function Gr(r) {
|
|
4357
|
+
return ze(r) ? r.join(".") : r;
|
|
4348
4358
|
}
|
|
4349
4359
|
function ml(r, e) {
|
|
4350
4360
|
let t = [], i = !1;
|
|
@@ -4359,7 +4369,7 @@ function ml(r, e) {
|
|
|
4359
4369
|
return;
|
|
4360
4370
|
if (c === o.length - 1 && (He(u) || Yn(u) || cl(u)))
|
|
4361
4371
|
t.push(ll(u));
|
|
4362
|
-
else if (
|
|
4372
|
+
else if (ze(u)) {
|
|
4363
4373
|
i = !0;
|
|
4364
4374
|
for (let g = 0, v = u.length; g < v; g += 1)
|
|
4365
4375
|
n(u[g], o, c + 1);
|
|
@@ -4442,7 +4452,7 @@ function _l(r = 1, e = 3) {
|
|
|
4442
4452
|
}
|
|
4443
4453
|
};
|
|
4444
4454
|
}
|
|
4445
|
-
class
|
|
4455
|
+
class fi {
|
|
4446
4456
|
constructor({
|
|
4447
4457
|
getFn: e = V.getFn,
|
|
4448
4458
|
fieldNormWeight: t = V.fieldNormWeight
|
|
@@ -4485,7 +4495,7 @@ class hi {
|
|
|
4485
4495
|
return this.records.length;
|
|
4486
4496
|
}
|
|
4487
4497
|
_addString(e, t) {
|
|
4488
|
-
if (!Me(e) ||
|
|
4498
|
+
if (!Me(e) || Ir(e))
|
|
4489
4499
|
return;
|
|
4490
4500
|
let i = {
|
|
4491
4501
|
v: e,
|
|
@@ -4499,13 +4509,13 @@ class hi {
|
|
|
4499
4509
|
this.keys.forEach((n, s) => {
|
|
4500
4510
|
let o = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
|
|
4501
4511
|
if (Me(o)) {
|
|
4502
|
-
if (
|
|
4512
|
+
if (ze(o)) {
|
|
4503
4513
|
let c = [];
|
|
4504
4514
|
const a = [{ nestedArrIndex: -1, value: o }];
|
|
4505
4515
|
for (; a.length; ) {
|
|
4506
4516
|
const { nestedArrIndex: u, value: g } = a.pop();
|
|
4507
4517
|
if (Me(g))
|
|
4508
|
-
if (He(g) && !
|
|
4518
|
+
if (He(g) && !Ir(g)) {
|
|
4509
4519
|
let v = {
|
|
4510
4520
|
v: g,
|
|
4511
4521
|
i: u,
|
|
@@ -4513,7 +4523,7 @@ class hi {
|
|
|
4513
4523
|
};
|
|
4514
4524
|
c.push(v);
|
|
4515
4525
|
} else
|
|
4516
|
-
|
|
4526
|
+
ze(g) && g.forEach((v, _) => {
|
|
4517
4527
|
a.push({
|
|
4518
4528
|
nestedArrIndex: _,
|
|
4519
4529
|
value: v
|
|
@@ -4521,7 +4531,7 @@ class hi {
|
|
|
4521
4531
|
});
|
|
4522
4532
|
}
|
|
4523
4533
|
i.$[s] = c;
|
|
4524
|
-
} else if (He(o) && !
|
|
4534
|
+
} else if (He(o) && !Ir(o)) {
|
|
4525
4535
|
let c = {
|
|
4526
4536
|
v: o,
|
|
4527
4537
|
n: this.norm.get(o)
|
|
@@ -4538,15 +4548,15 @@ class hi {
|
|
|
4538
4548
|
};
|
|
4539
4549
|
}
|
|
4540
4550
|
}
|
|
4541
|
-
function
|
|
4542
|
-
const n = new
|
|
4543
|
-
return n.setKeys(r.map(
|
|
4551
|
+
function Wn(r, e, { getFn: t = V.getFn, fieldNormWeight: i = V.fieldNormWeight } = {}) {
|
|
4552
|
+
const n = new fi({ getFn: t, fieldNormWeight: i });
|
|
4553
|
+
return n.setKeys(r.map(Vn)), n.setSources(e), n.create(), n;
|
|
4544
4554
|
}
|
|
4545
4555
|
function El(r, { getFn: e = V.getFn, fieldNormWeight: t = V.fieldNormWeight } = {}) {
|
|
4546
|
-
const { keys: i, records: n } = r, s = new
|
|
4556
|
+
const { keys: i, records: n } = r, s = new fi({ getFn: e, fieldNormWeight: t });
|
|
4547
4557
|
return s.setKeys(i), s.setIndexRecords(n), s;
|
|
4548
4558
|
}
|
|
4549
|
-
function
|
|
4559
|
+
function zt(r, {
|
|
4550
4560
|
errors: e = 0,
|
|
4551
4561
|
currentLocation: t = 0,
|
|
4552
4562
|
expectedLocation: i = 0,
|
|
@@ -4581,10 +4591,10 @@ function Al(r, e, t, {
|
|
|
4581
4591
|
throw new Error(fl(tt));
|
|
4582
4592
|
const g = e.length, v = r.length, _ = Math.max(0, Math.min(i, v));
|
|
4583
4593
|
let E = s, k = _;
|
|
4584
|
-
const F = c > 1 || a,
|
|
4594
|
+
const F = c > 1 || a, se = F ? Array(v) : [];
|
|
4585
4595
|
let te;
|
|
4586
4596
|
for (; (te = r.indexOf(e, k)) > -1; ) {
|
|
4587
|
-
let M =
|
|
4597
|
+
let M = zt(e, {
|
|
4588
4598
|
currentLocation: te,
|
|
4589
4599
|
expectedLocation: _,
|
|
4590
4600
|
distance: n,
|
|
@@ -4593,7 +4603,7 @@ function Al(r, e, t, {
|
|
|
4593
4603
|
if (E = Math.min(M, E), k = te + g, F) {
|
|
4594
4604
|
let P = 0;
|
|
4595
4605
|
for (; P < g; )
|
|
4596
|
-
|
|
4606
|
+
se[te + P] = 1, P += 1;
|
|
4597
4607
|
}
|
|
4598
4608
|
}
|
|
4599
4609
|
k = -1;
|
|
@@ -4602,7 +4612,7 @@ function Al(r, e, t, {
|
|
|
4602
4612
|
for (let M = 0; M < g; M += 1) {
|
|
4603
4613
|
let P = 0, L = b;
|
|
4604
4614
|
for (; P < L; )
|
|
4605
|
-
|
|
4615
|
+
zt(e, {
|
|
4606
4616
|
errors: M,
|
|
4607
4617
|
currentLocation: _ + L,
|
|
4608
4618
|
expectedLocation: _,
|
|
@@ -4614,7 +4624,7 @@ function Al(r, e, t, {
|
|
|
4614
4624
|
ee[W + 1] = (1 << M) - 1;
|
|
4615
4625
|
for (let $ = W; $ >= I; $ -= 1) {
|
|
4616
4626
|
let A = $ - 1, N = t[r.charAt(A)];
|
|
4617
|
-
if (F && (
|
|
4627
|
+
if (F && (se[A] = +!!N), ee[$] = (ee[$ + 1] << 1 | 1) & N, M && (ee[$] |= (f[$ + 1] | f[$]) << 1 | 1 | f[$ + 1]), ee[$] & S && (p = zt(e, {
|
|
4618
4628
|
errors: M,
|
|
4619
4629
|
currentLocation: A,
|
|
4620
4630
|
expectedLocation: _,
|
|
@@ -4626,7 +4636,7 @@ function Al(r, e, t, {
|
|
|
4626
4636
|
I = Math.max(1, 2 * _ - k);
|
|
4627
4637
|
}
|
|
4628
4638
|
}
|
|
4629
|
-
if (
|
|
4639
|
+
if (zt(e, {
|
|
4630
4640
|
errors: M + 1,
|
|
4631
4641
|
currentLocation: _,
|
|
4632
4642
|
expectedLocation: _,
|
|
@@ -4642,7 +4652,7 @@ function Al(r, e, t, {
|
|
|
4642
4652
|
score: Math.max(1e-3, p)
|
|
4643
4653
|
};
|
|
4644
4654
|
if (F) {
|
|
4645
|
-
const M = Ml(
|
|
4655
|
+
const M = Ml(se, c);
|
|
4646
4656
|
M.length ? a && (w.indices = M) : w.isMatch = !1;
|
|
4647
4657
|
}
|
|
4648
4658
|
return w;
|
|
@@ -4655,7 +4665,7 @@ function Sl(r) {
|
|
|
4655
4665
|
}
|
|
4656
4666
|
return e;
|
|
4657
4667
|
}
|
|
4658
|
-
class
|
|
4668
|
+
class qn {
|
|
4659
4669
|
constructor(e, {
|
|
4660
4670
|
location: t = V.location,
|
|
4661
4671
|
threshold: i = V.threshold,
|
|
@@ -4714,9 +4724,9 @@ class Wn {
|
|
|
4714
4724
|
ignoreLocation: u
|
|
4715
4725
|
} = this.options;
|
|
4716
4726
|
let g = [], v = 0, _ = !1;
|
|
4717
|
-
this.chunks.forEach(({ pattern: k, alphabet: F, startIndex:
|
|
4727
|
+
this.chunks.forEach(({ pattern: k, alphabet: F, startIndex: se }) => {
|
|
4718
4728
|
const { isMatch: te, score: f, indices: p } = Al(e, k, F, {
|
|
4719
|
-
location: n +
|
|
4729
|
+
location: n + se,
|
|
4720
4730
|
distance: s,
|
|
4721
4731
|
threshold: o,
|
|
4722
4732
|
findAllMatches: c,
|
|
@@ -4733,24 +4743,24 @@ class Wn {
|
|
|
4733
4743
|
return _ && i && (E.indices = g), E;
|
|
4734
4744
|
}
|
|
4735
4745
|
}
|
|
4736
|
-
class
|
|
4746
|
+
class Ke {
|
|
4737
4747
|
constructor(e) {
|
|
4738
4748
|
this.pattern = e;
|
|
4739
4749
|
}
|
|
4740
4750
|
static isMultiMatch(e) {
|
|
4741
|
-
return
|
|
4751
|
+
return ln(e, this.multiRegex);
|
|
4742
4752
|
}
|
|
4743
4753
|
static isSingleMatch(e) {
|
|
4744
|
-
return
|
|
4754
|
+
return ln(e, this.singleRegex);
|
|
4745
4755
|
}
|
|
4746
4756
|
search() {
|
|
4747
4757
|
}
|
|
4748
4758
|
}
|
|
4749
|
-
function
|
|
4759
|
+
function ln(r, e) {
|
|
4750
4760
|
const t = r.match(e);
|
|
4751
4761
|
return t ? t[1] : null;
|
|
4752
4762
|
}
|
|
4753
|
-
class Ol extends
|
|
4763
|
+
class Ol extends Ke {
|
|
4754
4764
|
constructor(e) {
|
|
4755
4765
|
super(e);
|
|
4756
4766
|
}
|
|
@@ -4772,7 +4782,7 @@ class Ol extends qe {
|
|
|
4772
4782
|
};
|
|
4773
4783
|
}
|
|
4774
4784
|
}
|
|
4775
|
-
class Pl extends
|
|
4785
|
+
class Pl extends Ke {
|
|
4776
4786
|
constructor(e) {
|
|
4777
4787
|
super(e);
|
|
4778
4788
|
}
|
|
@@ -4794,7 +4804,7 @@ class Pl extends qe {
|
|
|
4794
4804
|
};
|
|
4795
4805
|
}
|
|
4796
4806
|
}
|
|
4797
|
-
class Cl extends
|
|
4807
|
+
class Cl extends Ke {
|
|
4798
4808
|
constructor(e) {
|
|
4799
4809
|
super(e);
|
|
4800
4810
|
}
|
|
@@ -4816,7 +4826,7 @@ class Cl extends qe {
|
|
|
4816
4826
|
};
|
|
4817
4827
|
}
|
|
4818
4828
|
}
|
|
4819
|
-
class kl extends
|
|
4829
|
+
class kl extends Ke {
|
|
4820
4830
|
constructor(e) {
|
|
4821
4831
|
super(e);
|
|
4822
4832
|
}
|
|
@@ -4838,7 +4848,7 @@ class kl extends qe {
|
|
|
4838
4848
|
};
|
|
4839
4849
|
}
|
|
4840
4850
|
}
|
|
4841
|
-
class Ll extends
|
|
4851
|
+
class Ll extends Ke {
|
|
4842
4852
|
constructor(e) {
|
|
4843
4853
|
super(e);
|
|
4844
4854
|
}
|
|
@@ -4860,7 +4870,7 @@ class Ll extends qe {
|
|
|
4860
4870
|
};
|
|
4861
4871
|
}
|
|
4862
4872
|
}
|
|
4863
|
-
class Tl extends
|
|
4873
|
+
class Tl extends Ke {
|
|
4864
4874
|
constructor(e) {
|
|
4865
4875
|
super(e);
|
|
4866
4876
|
}
|
|
@@ -4882,7 +4892,7 @@ class Tl extends qe {
|
|
|
4882
4892
|
};
|
|
4883
4893
|
}
|
|
4884
4894
|
}
|
|
4885
|
-
class Gn extends
|
|
4895
|
+
class Gn extends Ke {
|
|
4886
4896
|
constructor(e, {
|
|
4887
4897
|
location: t = V.location,
|
|
4888
4898
|
threshold: i = V.threshold,
|
|
@@ -4893,7 +4903,7 @@ class Gn extends qe {
|
|
|
4893
4903
|
isCaseSensitive: a = V.isCaseSensitive,
|
|
4894
4904
|
ignoreLocation: u = V.ignoreLocation
|
|
4895
4905
|
} = {}) {
|
|
4896
|
-
super(e), this._bitapSearch = new
|
|
4906
|
+
super(e), this._bitapSearch = new qn(e, {
|
|
4897
4907
|
location: t,
|
|
4898
4908
|
threshold: i,
|
|
4899
4909
|
distance: n,
|
|
@@ -4917,7 +4927,7 @@ class Gn extends qe {
|
|
|
4917
4927
|
return this._bitapSearch.searchIn(e);
|
|
4918
4928
|
}
|
|
4919
4929
|
}
|
|
4920
|
-
class
|
|
4930
|
+
class Kn extends Ke {
|
|
4921
4931
|
constructor(e) {
|
|
4922
4932
|
super(e);
|
|
4923
4933
|
}
|
|
@@ -4943,30 +4953,30 @@ class qn extends qe {
|
|
|
4943
4953
|
};
|
|
4944
4954
|
}
|
|
4945
4955
|
}
|
|
4946
|
-
const
|
|
4956
|
+
const Kr = [
|
|
4947
4957
|
Ol,
|
|
4948
|
-
|
|
4958
|
+
Kn,
|
|
4949
4959
|
Cl,
|
|
4950
4960
|
kl,
|
|
4951
4961
|
Tl,
|
|
4952
4962
|
Ll,
|
|
4953
4963
|
Pl,
|
|
4954
4964
|
Gn
|
|
4955
|
-
],
|
|
4965
|
+
], cn = Kr.length, Rl = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Dl = "|";
|
|
4956
4966
|
function Il(r, e = {}) {
|
|
4957
4967
|
return r.split(Dl).map((t) => {
|
|
4958
4968
|
let i = t.trim().split(Rl).filter((s) => s && !!s.trim()), n = [];
|
|
4959
4969
|
for (let s = 0, o = i.length; s < o; s += 1) {
|
|
4960
4970
|
const c = i[s];
|
|
4961
4971
|
let a = !1, u = -1;
|
|
4962
|
-
for (; !a && ++u <
|
|
4963
|
-
const g =
|
|
4972
|
+
for (; !a && ++u < cn; ) {
|
|
4973
|
+
const g = Kr[u];
|
|
4964
4974
|
let v = g.isMultiMatch(c);
|
|
4965
4975
|
v && (n.push(new g(v, e)), a = !0);
|
|
4966
4976
|
}
|
|
4967
4977
|
if (!a)
|
|
4968
|
-
for (u = -1; ++u <
|
|
4969
|
-
const g =
|
|
4978
|
+
for (u = -1; ++u < cn; ) {
|
|
4979
|
+
const g = Kr[u];
|
|
4970
4980
|
let v = g.isSingleMatch(c);
|
|
4971
4981
|
if (v) {
|
|
4972
4982
|
n.push(new g(v, e));
|
|
@@ -4977,7 +4987,7 @@ function Il(r, e = {}) {
|
|
|
4977
4987
|
return n;
|
|
4978
4988
|
});
|
|
4979
4989
|
}
|
|
4980
|
-
const jl = /* @__PURE__ */ new Set([Gn.type,
|
|
4990
|
+
const jl = /* @__PURE__ */ new Set([Gn.type, Kn.type]);
|
|
4981
4991
|
class Nl {
|
|
4982
4992
|
constructor(e, {
|
|
4983
4993
|
isCaseSensitive: t = V.isCaseSensitive,
|
|
@@ -5017,9 +5027,9 @@ class Nl {
|
|
|
5017
5027
|
const g = t[a];
|
|
5018
5028
|
o.length = 0, s = 0;
|
|
5019
5029
|
for (let v = 0, _ = g.length; v < _; v += 1) {
|
|
5020
|
-
const E = g[v], { isMatch: k, indices: F, score:
|
|
5030
|
+
const E = g[v], { isMatch: k, indices: F, score: se } = E.search(e);
|
|
5021
5031
|
if (k) {
|
|
5022
|
-
if (s += 1, c +=
|
|
5032
|
+
if (s += 1, c += se, i) {
|
|
5023
5033
|
const te = E.constructor.type;
|
|
5024
5034
|
jl.has(te) ? o = [...o, ...F] : o.push(F);
|
|
5025
5035
|
}
|
|
@@ -5042,44 +5052,44 @@ class Nl {
|
|
|
5042
5052
|
};
|
|
5043
5053
|
}
|
|
5044
5054
|
}
|
|
5045
|
-
const
|
|
5055
|
+
const Jr = [];
|
|
5046
5056
|
function Bl(...r) {
|
|
5047
|
-
|
|
5057
|
+
Jr.push(...r);
|
|
5048
5058
|
}
|
|
5049
|
-
function
|
|
5050
|
-
for (let t = 0, i =
|
|
5051
|
-
let n =
|
|
5059
|
+
function Zr(r, e) {
|
|
5060
|
+
for (let t = 0, i = Jr.length; t < i; t += 1) {
|
|
5061
|
+
let n = Jr[t];
|
|
5052
5062
|
if (n.condition(r, e))
|
|
5053
5063
|
return new n(r, e);
|
|
5054
5064
|
}
|
|
5055
|
-
return new
|
|
5065
|
+
return new qn(r, e);
|
|
5056
5066
|
}
|
|
5057
|
-
const
|
|
5067
|
+
const er = {
|
|
5058
5068
|
AND: "$and",
|
|
5059
5069
|
OR: "$or"
|
|
5060
|
-
},
|
|
5070
|
+
}, Qr = {
|
|
5061
5071
|
PATH: "$path",
|
|
5062
5072
|
PATTERN: "$val"
|
|
5063
|
-
},
|
|
5064
|
-
[
|
|
5073
|
+
}, ei = (r) => !!(r[er.AND] || r[er.OR]), Fl = (r) => !!r[Qr.PATH], Hl = (r) => !ze(r) && zn(r) && !ei(r), un = (r) => ({
|
|
5074
|
+
[er.AND]: Object.keys(r).map((e) => ({
|
|
5065
5075
|
[e]: r[e]
|
|
5066
5076
|
}))
|
|
5067
5077
|
});
|
|
5068
|
-
function
|
|
5078
|
+
function Jn(r, e, { auto: t = !0 } = {}) {
|
|
5069
5079
|
const i = (n) => {
|
|
5070
5080
|
let s = Object.keys(n);
|
|
5071
5081
|
const o = Fl(n);
|
|
5072
|
-
if (!o && s.length > 1 && !
|
|
5073
|
-
return i(
|
|
5082
|
+
if (!o && s.length > 1 && !ei(n))
|
|
5083
|
+
return i(un(n));
|
|
5074
5084
|
if (Hl(n)) {
|
|
5075
|
-
const a = o ? n[
|
|
5085
|
+
const a = o ? n[Qr.PATH] : s[0], u = o ? n[Qr.PATTERN] : n[a];
|
|
5076
5086
|
if (!He(u))
|
|
5077
5087
|
throw new Error(dl(a));
|
|
5078
5088
|
const g = {
|
|
5079
|
-
keyId:
|
|
5089
|
+
keyId: Gr(a),
|
|
5080
5090
|
pattern: u
|
|
5081
5091
|
};
|
|
5082
|
-
return t && (g.searcher =
|
|
5092
|
+
return t && (g.searcher = Zr(u, e)), g;
|
|
5083
5093
|
}
|
|
5084
5094
|
let c = {
|
|
5085
5095
|
children: [],
|
|
@@ -5087,14 +5097,14 @@ function Kn(r, e, { auto: t = !0 } = {}) {
|
|
|
5087
5097
|
};
|
|
5088
5098
|
return s.forEach((a) => {
|
|
5089
5099
|
const u = n[a];
|
|
5090
|
-
|
|
5100
|
+
ze(u) && u.forEach((g) => {
|
|
5091
5101
|
c.children.push(i(g));
|
|
5092
5102
|
});
|
|
5093
5103
|
}), c;
|
|
5094
5104
|
};
|
|
5095
|
-
return
|
|
5105
|
+
return ei(r) || (r = un(r)), i(r);
|
|
5096
5106
|
}
|
|
5097
|
-
function
|
|
5107
|
+
function Ul(r, { ignoreFieldNorm: e = V.ignoreFieldNorm }) {
|
|
5098
5108
|
r.forEach((t) => {
|
|
5099
5109
|
let i = 1;
|
|
5100
5110
|
t.matches.forEach(({ key: n, norm: s, score: o }) => {
|
|
@@ -5106,7 +5116,7 @@ function Yl(r, { ignoreFieldNorm: e = V.ignoreFieldNorm }) {
|
|
|
5106
5116
|
}), t.score = i;
|
|
5107
5117
|
});
|
|
5108
5118
|
}
|
|
5109
|
-
function
|
|
5119
|
+
function Yl(r, e) {
|
|
5110
5120
|
const t = r.matches;
|
|
5111
5121
|
e.matches = [], Me(t) && t.forEach((i) => {
|
|
5112
5122
|
if (!Me(i.indices) || !i.indices.length)
|
|
@@ -5127,7 +5137,7 @@ function Xl(r, e, {
|
|
|
5127
5137
|
includeScore: i = V.includeScore
|
|
5128
5138
|
} = {}) {
|
|
5129
5139
|
const n = [];
|
|
5130
|
-
return t && n.push(
|
|
5140
|
+
return t && n.push(Yl), i && n.push(zl), r.map((s) => {
|
|
5131
5141
|
const { idx: o } = s, c = {
|
|
5132
5142
|
item: e[o],
|
|
5133
5143
|
refIndex: o
|
|
@@ -5137,14 +5147,14 @@ function Xl(r, e, {
|
|
|
5137
5147
|
}), c;
|
|
5138
5148
|
});
|
|
5139
5149
|
}
|
|
5140
|
-
class
|
|
5150
|
+
class xt {
|
|
5141
5151
|
constructor(e, t = {}, i) {
|
|
5142
5152
|
this.options = { ...V, ...t }, this.options.useExtendedSearch, this._keyStore = new vl(this.options.keys), this.setCollection(e, i);
|
|
5143
5153
|
}
|
|
5144
5154
|
setCollection(e, t) {
|
|
5145
|
-
if (this._docs = e, t && !(t instanceof
|
|
5155
|
+
if (this._docs = e, t && !(t instanceof fi))
|
|
5146
5156
|
throw new Error(hl);
|
|
5147
|
-
this._myIndex = t ||
|
|
5157
|
+
this._myIndex = t || Wn(this.options.keys, this._docs, {
|
|
5148
5158
|
getFn: this.options.getFn,
|
|
5149
5159
|
fieldNormWeight: this.options.fieldNormWeight
|
|
5150
5160
|
});
|
|
@@ -5175,13 +5185,13 @@ class bt {
|
|
|
5175
5185
|
ignoreFieldNorm: c
|
|
5176
5186
|
} = this.options;
|
|
5177
5187
|
let a = He(e) ? He(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
5178
|
-
return
|
|
5188
|
+
return Ul(a, { ignoreFieldNorm: c }), s && a.sort(o), Yn(t) && t > -1 && (a = a.slice(0, t)), Xl(a, this._docs, {
|
|
5179
5189
|
includeMatches: i,
|
|
5180
5190
|
includeScore: n
|
|
5181
5191
|
});
|
|
5182
5192
|
}
|
|
5183
5193
|
_searchStringList(e) {
|
|
5184
|
-
const t =
|
|
5194
|
+
const t = Zr(e, this.options), { records: i } = this._myIndex, n = [];
|
|
5185
5195
|
return i.forEach(({ v: s, i: o, n: c }) => {
|
|
5186
5196
|
if (!Me(s))
|
|
5187
5197
|
return;
|
|
@@ -5194,7 +5204,7 @@ class bt {
|
|
|
5194
5204
|
}), n;
|
|
5195
5205
|
}
|
|
5196
5206
|
_searchLogical(e) {
|
|
5197
|
-
const t =
|
|
5207
|
+
const t = Jn(e, this.options), i = (c, a, u) => {
|
|
5198
5208
|
if (!c.children) {
|
|
5199
5209
|
const { keyId: v, searcher: _ } = c, E = this._findMatches({
|
|
5200
5210
|
key: this._keyStore.get(v),
|
|
@@ -5214,7 +5224,7 @@ class bt {
|
|
|
5214
5224
|
const E = c.children[v], k = i(E, a, u);
|
|
5215
5225
|
if (k.length)
|
|
5216
5226
|
g.push(...k);
|
|
5217
|
-
else if (c.operator ===
|
|
5227
|
+
else if (c.operator === er.AND)
|
|
5218
5228
|
return [];
|
|
5219
5229
|
}
|
|
5220
5230
|
return g;
|
|
@@ -5229,7 +5239,7 @@ class bt {
|
|
|
5229
5239
|
}), o;
|
|
5230
5240
|
}
|
|
5231
5241
|
_searchObjectList(e) {
|
|
5232
|
-
const t =
|
|
5242
|
+
const t = Zr(e, this.options), { keys: i, records: n } = this._myIndex, s = [];
|
|
5233
5243
|
return n.forEach(({ $: o, i: c }) => {
|
|
5234
5244
|
if (!Me(o))
|
|
5235
5245
|
return;
|
|
@@ -5253,7 +5263,7 @@ class bt {
|
|
|
5253
5263
|
if (!Me(t))
|
|
5254
5264
|
return [];
|
|
5255
5265
|
let n = [];
|
|
5256
|
-
if (
|
|
5266
|
+
if (ze(t))
|
|
5257
5267
|
t.forEach(({ v: s, i: o, n: c }) => {
|
|
5258
5268
|
if (!Me(s))
|
|
5259
5269
|
return;
|
|
@@ -5274,11 +5284,11 @@ class bt {
|
|
|
5274
5284
|
return n;
|
|
5275
5285
|
}
|
|
5276
5286
|
}
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5287
|
+
xt.version = "6.6.2";
|
|
5288
|
+
xt.createIndex = Wn;
|
|
5289
|
+
xt.parseIndex = El;
|
|
5290
|
+
xt.config = V;
|
|
5291
|
+
xt.parseQuery = Jn;
|
|
5282
5292
|
Bl(Nl);
|
|
5283
5293
|
const Vl = (r, e = "highlight", t = "title") => {
|
|
5284
5294
|
const i = (s, o, c) => {
|
|
@@ -5310,9 +5320,9 @@ const Vl = (r, e = "highlight", t = "title") => {
|
|
|
5310
5320
|
}), c;
|
|
5311
5321
|
});
|
|
5312
5322
|
};
|
|
5313
|
-
let
|
|
5323
|
+
let Zn;
|
|
5314
5324
|
const Wl = (r, e) => {
|
|
5315
|
-
|
|
5325
|
+
Zn = new xt(r, {
|
|
5316
5326
|
// minMatchCharLength: 3,
|
|
5317
5327
|
// location: 0,
|
|
5318
5328
|
threshold: 0.4,
|
|
@@ -5321,7 +5331,7 @@ const Wl = (r, e) => {
|
|
|
5321
5331
|
useExtendedSearch: !0,
|
|
5322
5332
|
...e
|
|
5323
5333
|
});
|
|
5324
|
-
},
|
|
5334
|
+
}, ql = async (r, e, t) => {
|
|
5325
5335
|
const i = Object.entries(e).filter(
|
|
5326
5336
|
([c, a]) => a.type === "text" || a.type === "select" || a.type === "multiselect"
|
|
5327
5337
|
).reduce((c, [a, u]) => {
|
|
@@ -5339,7 +5349,7 @@ const Wl = (r, e) => {
|
|
|
5339
5349
|
else {
|
|
5340
5350
|
const c = {
|
|
5341
5351
|
$and: [...i]
|
|
5342
|
-
}, a =
|
|
5352
|
+
}, a = Zn.search(c);
|
|
5343
5353
|
n = t.enableHighlighting ? Vl(a, "highlight", t.titleProperty) : a.map((u) => u.item);
|
|
5344
5354
|
}
|
|
5345
5355
|
const s = Object.entries(e).filter(([c, a]) => a.type === "range").reduce((c, [a, u]) => (c[a] = {
|
|
@@ -5352,7 +5362,7 @@ const Wl = (r, e) => {
|
|
|
5352
5362
|
for (let a = 0; a < n.length; a++) {
|
|
5353
5363
|
const u = {};
|
|
5354
5364
|
for (const [g, v] of Object.entries(s)) {
|
|
5355
|
-
const _ = (E) => v.format === "date" ?
|
|
5365
|
+
const _ = (E) => v.format === "date" ? qt(E).unix() : E;
|
|
5356
5366
|
n[a].hasOwnProperty(g) ? Array.isArray(n[a][g]) ? u[g] = s[g].min <= _(n[a][g][1]) && _(n[a][g][0]) <= s[g].max : _(n[a][g]) >= s[g].min && _(n[a][g]) <= s[g].max ? u[g] = !0 : u[g] = !1 : u[g] = !0;
|
|
5357
5367
|
}
|
|
5358
5368
|
Object.values(u).every((g) => !!g) && c.push(n[a]);
|
|
@@ -5376,28 +5386,28 @@ const Wl = (r, e) => {
|
|
|
5376
5386
|
n = [...c];
|
|
5377
5387
|
}
|
|
5378
5388
|
return n;
|
|
5379
|
-
},
|
|
5380
|
-
var Kl = Object.defineProperty, Jl = Object.getOwnPropertyDescriptor,
|
|
5389
|
+
}, Gl = async (r, e, t) => (await (await fetch(`${t.externalFilter(r, e)}`)).json()).features;
|
|
5390
|
+
var Kl = Object.defineProperty, Jl = Object.getOwnPropertyDescriptor, Xe = (r, e, t, i) => {
|
|
5381
5391
|
for (var n = i > 1 ? void 0 : i ? Jl(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
5382
5392
|
(o = r[s]) && (n = (i ? o(e, t, n) : o(n)) || n);
|
|
5383
5393
|
return i && n && Kl(e, t, n), n;
|
|
5384
5394
|
};
|
|
5385
|
-
class
|
|
5395
|
+
class hn {
|
|
5386
5396
|
constructor() {
|
|
5387
5397
|
this.aggregateResults = void 0, this.enableHighlighting = !1, this.filterProperties = [], this.inlineMode = !1, this.matchAllWhenEmpty = !0, this.onFilter = () => {
|
|
5388
5398
|
}, this.onSelect = () => {
|
|
5389
5399
|
}, this.showResults = !0, this.titleProperty = "title";
|
|
5390
5400
|
}
|
|
5391
5401
|
}
|
|
5392
|
-
let
|
|
5402
|
+
let Ue = class extends vo {
|
|
5393
5403
|
constructor() {
|
|
5394
|
-
super(...arguments), this._resultAggregation = [], this.
|
|
5395
|
-
this.
|
|
5404
|
+
super(...arguments), this._resultAggregation = [], this.filters = {}, this.items = [], this._config = new hn(), this.apply = (r) => {
|
|
5405
|
+
this.items = r.map((t, i) => ({
|
|
5396
5406
|
id: `item-${i}`,
|
|
5397
5407
|
...t
|
|
5398
5408
|
})), this._config.filterProperties.length && this._config.filterProperties.forEach((t) => {
|
|
5399
|
-
const i = {}, n = (s) => t.format === "date" ?
|
|
5400
|
-
this.
|
|
5409
|
+
const i = {}, n = (s) => t.format === "date" ? qt(s).unix() : parseInt(s);
|
|
5410
|
+
this.items.forEach((s) => {
|
|
5401
5411
|
if (t.type === "range") {
|
|
5402
5412
|
if (Array.isArray(s[t.key])) {
|
|
5403
5413
|
const o = [
|
|
@@ -5414,7 +5424,7 @@ let ze = class extends vo {
|
|
|
5414
5424
|
Array.isArray(s[t.key]) ? s[t.key].forEach((o) => {
|
|
5415
5425
|
i[o] = void 0;
|
|
5416
5426
|
}) : t.type === "spatial" && (i.geometry = void 0, i.mode = t.mode || "intersects");
|
|
5417
|
-
}), this.
|
|
5427
|
+
}), this.filters[t.key || t.keys.join("|")] = {
|
|
5418
5428
|
...t,
|
|
5419
5429
|
type: t.type || "multiselect",
|
|
5420
5430
|
state: {
|
|
@@ -5430,9 +5440,9 @@ let ze = class extends vo {
|
|
|
5430
5440
|
format: t.format
|
|
5431
5441
|
}
|
|
5432
5442
|
};
|
|
5433
|
-
}), this._config.matchAllWhenEmpty !== !1 && (this.
|
|
5443
|
+
}), this._config.matchAllWhenEmpty !== !1 && (this.results = this.sortResults(this.items), this.requestUpdate()), this._config.aggregateResults && (this._resultAggregation = [
|
|
5434
5444
|
...new Set(
|
|
5435
|
-
this.
|
|
5445
|
+
this.items.reduce((t, i) => t.concat(i[this._config.aggregateResults]), [])
|
|
5436
5446
|
)
|
|
5437
5447
|
].sort((t, i) => t.localeCompare(i)));
|
|
5438
5448
|
const e = [];
|
|
@@ -5440,16 +5450,16 @@ let ze = class extends vo {
|
|
|
5440
5450
|
t.type === "text" ? t.keys.forEach((i) => {
|
|
5441
5451
|
e.includes(i) || e.push(i);
|
|
5442
5452
|
}) : (t.type === "select" || t.type === "multiselect") && (e.includes(t.key) || e.push(t.key));
|
|
5443
|
-
}), Wl(this.
|
|
5453
|
+
}), Wl(this.items, {
|
|
5444
5454
|
keys: e,
|
|
5445
5455
|
...this._config.fuseConfig
|
|
5446
|
-
});
|
|
5456
|
+
}), this.search();
|
|
5447
5457
|
};
|
|
5448
5458
|
}
|
|
5449
5459
|
set config(r) {
|
|
5450
5460
|
const e = this._config;
|
|
5451
5461
|
this._config = {
|
|
5452
|
-
...new
|
|
5462
|
+
...new hn(),
|
|
5453
5463
|
...r
|
|
5454
5464
|
}, this.requestUpdate("config", e);
|
|
5455
5465
|
}
|
|
@@ -5458,15 +5468,15 @@ let ze = class extends vo {
|
|
|
5458
5468
|
}
|
|
5459
5469
|
async search() {
|
|
5460
5470
|
let r;
|
|
5461
|
-
this.config.externalFilter ? r = await
|
|
5471
|
+
this.config.externalFilter ? r = await Gl(this.items, this.filters, this._config) : r = await ql(this.items, this.filters, this._config), this.results = this.sortResults(r), this._config.onFilter(this.results, this.filters);
|
|
5462
5472
|
}
|
|
5463
5473
|
aggregateResults(r, e) {
|
|
5464
5474
|
return r.filter((t) => {
|
|
5465
5475
|
const i = t[this._config.aggregateResults];
|
|
5466
5476
|
let n;
|
|
5467
|
-
return this.
|
|
5468
|
-
this.
|
|
5469
|
-
).filter((o) => this.
|
|
5477
|
+
return this.filters[this._config.aggregateResults] && (n = Object.keys(
|
|
5478
|
+
this.filters[this._config.aggregateResults]
|
|
5479
|
+
).filter((o) => this.filters[this._config.aggregateResults].state[o])), (n != null && n.length ? n.includes(e) : !0) && Array.isArray(i) ? i.includes(e) : i === e;
|
|
5470
5480
|
});
|
|
5471
5481
|
}
|
|
5472
5482
|
sortResults(r) {
|
|
@@ -5482,40 +5492,55 @@ let ze = class extends vo {
|
|
|
5482
5492
|
render() {
|
|
5483
5493
|
return he`
|
|
5484
5494
|
<style>
|
|
5485
|
-
${
|
|
5486
|
-
${!this.unstyled &&
|
|
5495
|
+
${$n}
|
|
5496
|
+
${!this.unstyled && wn}
|
|
5497
|
+
${this.styleOverride}
|
|
5487
5498
|
</style>
|
|
5488
5499
|
<form
|
|
5489
5500
|
id="itemfilter"
|
|
5490
5501
|
@submit="${(r) => r.preventDefault()}"
|
|
5491
5502
|
>
|
|
5492
|
-
${
|
|
5503
|
+
${ht(
|
|
5493
5504
|
this._config.filterProperties.length,
|
|
5494
5505
|
() => he`
|
|
5495
|
-
<section class="${this.config.inlineMode ? "inline" :
|
|
5496
|
-
${
|
|
5506
|
+
<section class="${this.config.inlineMode ? "inline" : ne}">
|
|
5507
|
+
${ht(
|
|
5497
5508
|
!this.config.inlineMode,
|
|
5498
5509
|
() => he` <slot name="filterstitle"><h4>Filters</h4></slot> `
|
|
5499
5510
|
)}
|
|
5500
5511
|
<ul id="filters">
|
|
5501
5512
|
${it(
|
|
5502
|
-
Object.values(this.
|
|
5503
|
-
(r) =>
|
|
5513
|
+
Object.values(this.filters),
|
|
5514
|
+
(r) => Rr`
|
|
5504
5515
|
<li>
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5516
|
+
${r.featured ? Rr`
|
|
5517
|
+
<eox-itemfilter-${Yt(r.type)}
|
|
5518
|
+
slot="filter"
|
|
5519
|
+
data-type="filter"
|
|
5520
|
+
.filterObject=${r}
|
|
5521
|
+
@filter="${() => this.search()}"
|
|
5522
|
+
></eox-itemfilter-${Yt(r.type)}>
|
|
5523
|
+
` : Rr`
|
|
5524
|
+
<eox-itemfilter-expandcontainer
|
|
5525
|
+
.filterObject=${r}
|
|
5526
|
+
.unstyled=${this.unstyled}
|
|
5527
|
+
>
|
|
5528
|
+
<eox-itemfilter-${Yt(r.type)}
|
|
5529
|
+
slot="filter"
|
|
5530
|
+
data-type="filter"
|
|
5531
|
+
.filterObject=${r}
|
|
5532
|
+
@filter="${() => this.search()}"
|
|
5533
|
+
></eox-itemfilter-${Yt(
|
|
5534
|
+
r.type
|
|
5535
|
+
)}>
|
|
5536
|
+
</eox-itemfilter-expandcontainer>
|
|
5537
|
+
`}
|
|
5513
5538
|
</li>
|
|
5514
5539
|
`
|
|
5515
5540
|
)}
|
|
5516
5541
|
</ul>
|
|
5517
|
-
${
|
|
5518
|
-
this._config.filterProperties && Object.values(this.
|
|
5542
|
+
${ht(
|
|
5543
|
+
this._config.filterProperties && Object.values(this.filters).map((r) => r.dirty).filter((r) => r).length > 0,
|
|
5519
5544
|
() => he`
|
|
5520
5545
|
<button
|
|
5521
5546
|
id="filter-reset"
|
|
@@ -5530,20 +5555,20 @@ let ze = class extends vo {
|
|
|
5530
5555
|
</section>
|
|
5531
5556
|
`
|
|
5532
5557
|
)}
|
|
5533
|
-
${
|
|
5534
|
-
this.config.showResults && this.
|
|
5558
|
+
${ht(
|
|
5559
|
+
this.config.showResults && this.results,
|
|
5535
5560
|
() => he`
|
|
5536
5561
|
<section id="section-results">
|
|
5537
5562
|
<div>
|
|
5538
5563
|
<slot name="resultstitle"><h4>Results</h4></slot>
|
|
5539
5564
|
</div>
|
|
5540
5565
|
<div id="container-results" class="scroll">
|
|
5541
|
-
${this.
|
|
5566
|
+
${this.results.length < 1 ? he` <small class="no-results">No matching items</small> ` : ne}
|
|
5542
5567
|
<ul id="results" part="results">
|
|
5543
5568
|
${this._config.aggregateResults ? it(
|
|
5544
5569
|
this._resultAggregation.filter(
|
|
5545
5570
|
(r) => this.aggregateResults(
|
|
5546
|
-
this.
|
|
5571
|
+
this.results,
|
|
5547
5572
|
r
|
|
5548
5573
|
).length
|
|
5549
5574
|
),
|
|
@@ -5556,7 +5581,7 @@ let ze = class extends vo {
|
|
|
5556
5581
|
${r}
|
|
5557
5582
|
<span class="count"
|
|
5558
5583
|
>${this.aggregateResults(
|
|
5559
|
-
this.
|
|
5584
|
+
this.results,
|
|
5560
5585
|
r
|
|
5561
5586
|
).length}</span
|
|
5562
5587
|
>
|
|
@@ -5565,45 +5590,77 @@ let ze = class extends vo {
|
|
|
5565
5590
|
<ul>
|
|
5566
5591
|
${it(
|
|
5567
5592
|
this.aggregateResults(
|
|
5568
|
-
this.
|
|
5593
|
+
this.results,
|
|
5569
5594
|
r
|
|
5570
5595
|
),
|
|
5571
|
-
(e) =>
|
|
5572
|
-
|
|
5596
|
+
(e) => {
|
|
5597
|
+
var t, i;
|
|
5598
|
+
return he`
|
|
5599
|
+
<li
|
|
5600
|
+
class=${((t = this.selectedResult) == null ? void 0 : t[this._config.titleProperty]) === e[this._config.titleProperty] ? "highlighted" : ne}
|
|
5601
|
+
>
|
|
5573
5602
|
<label>
|
|
5574
5603
|
<input
|
|
5604
|
+
data-cy="result-radio"
|
|
5575
5605
|
type="radio"
|
|
5606
|
+
class="result-radio"
|
|
5576
5607
|
name="result"
|
|
5577
5608
|
id="${e.id}"
|
|
5609
|
+
checked=${((i = this.selectedResult) == null ? void 0 : i[this._config.titleProperty]) === e[this._config.titleProperty] || ne}
|
|
5578
5610
|
@click=${() => {
|
|
5579
|
-
|
|
5580
|
-
|
|
5611
|
+
this.selectedResult = e, this._config.onSelect(e);
|
|
5612
|
+
}}
|
|
5581
5613
|
/>
|
|
5582
|
-
${
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5614
|
+
${ht(
|
|
5615
|
+
this.hasTemplate("result"),
|
|
5616
|
+
() => this.renderTemplate(
|
|
5617
|
+
"result",
|
|
5618
|
+
e,
|
|
5619
|
+
`result-${e.id}`
|
|
5620
|
+
),
|
|
5621
|
+
() => he`
|
|
5590
5622
|
<span class="title"
|
|
5591
|
-
>${
|
|
5592
|
-
|
|
5593
|
-
|
|
5623
|
+
>${Gi(
|
|
5624
|
+
e[this._config.titleProperty]
|
|
5625
|
+
)}</span
|
|
5594
5626
|
>
|
|
5595
5627
|
`
|
|
5596
|
-
|
|
5628
|
+
)}
|
|
5597
5629
|
</label>
|
|
5598
5630
|
</li>
|
|
5599
|
-
|
|
5631
|
+
`;
|
|
5632
|
+
}
|
|
5600
5633
|
)}
|
|
5601
5634
|
</ul>
|
|
5602
5635
|
</details>`
|
|
5603
5636
|
) : it(
|
|
5604
|
-
this.
|
|
5637
|
+
this.results,
|
|
5605
5638
|
(r) => he`<li part="result">
|
|
5606
|
-
|
|
5639
|
+
<label>
|
|
5640
|
+
<input
|
|
5641
|
+
type="radio"
|
|
5642
|
+
name="result"
|
|
5643
|
+
id="${r.id}"
|
|
5644
|
+
@click=${() => {
|
|
5645
|
+
this.selectedResult = r, this._config.onSelect(r);
|
|
5646
|
+
}}
|
|
5647
|
+
/>
|
|
5648
|
+
${ht(
|
|
5649
|
+
this.hasTemplate("result"),
|
|
5650
|
+
() => this.renderTemplate(
|
|
5651
|
+
"result",
|
|
5652
|
+
r,
|
|
5653
|
+
`result-${r.id}`
|
|
5654
|
+
),
|
|
5655
|
+
() => he`
|
|
5656
|
+
<span class="title"
|
|
5657
|
+
>${Gi(
|
|
5658
|
+
r[this._config.titleProperty]
|
|
5659
|
+
)}</span
|
|
5660
|
+
>
|
|
5661
|
+
`
|
|
5662
|
+
)}
|
|
5663
|
+
</label>
|
|
5607
5664
|
</li>`
|
|
5608
5665
|
)}
|
|
5609
5666
|
</ul>
|
|
@@ -5615,31 +5672,34 @@ let ze = class extends vo {
|
|
|
5615
5672
|
`;
|
|
5616
5673
|
}
|
|
5617
5674
|
};
|
|
5618
|
-
|
|
5675
|
+
Xe([
|
|
5619
5676
|
Pt()
|
|
5620
|
-
],
|
|
5621
|
-
|
|
5677
|
+
], Ue.prototype, "filters", 2);
|
|
5678
|
+
Xe([
|
|
5622
5679
|
Pt()
|
|
5623
|
-
],
|
|
5624
|
-
|
|
5680
|
+
], Ue.prototype, "items", 2);
|
|
5681
|
+
Xe([
|
|
5625
5682
|
Pt()
|
|
5626
|
-
],
|
|
5627
|
-
|
|
5683
|
+
], Ue.prototype, "results", 2);
|
|
5684
|
+
Xe([
|
|
5628
5685
|
Pt()
|
|
5629
|
-
],
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
],
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
],
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
],
|
|
5639
|
-
|
|
5686
|
+
], Ue.prototype, "selectedResult", 2);
|
|
5687
|
+
Xe([
|
|
5688
|
+
Ae({ attribute: !1 })
|
|
5689
|
+
], Ue.prototype, "config", 1);
|
|
5690
|
+
Xe([
|
|
5691
|
+
Ae()
|
|
5692
|
+
], Ue.prototype, "apply", 2);
|
|
5693
|
+
Xe([
|
|
5694
|
+
Ae({ attribute: !1 })
|
|
5695
|
+
], Ue.prototype, "styleOverride", 2);
|
|
5696
|
+
Xe([
|
|
5697
|
+
Ae({ type: Boolean })
|
|
5698
|
+
], Ue.prototype, "unstyled", 2);
|
|
5699
|
+
Ue = Xe([
|
|
5640
5700
|
Ge("eox-itemfilter")
|
|
5641
|
-
],
|
|
5701
|
+
], Ue);
|
|
5642
5702
|
export {
|
|
5643
|
-
|
|
5644
|
-
|
|
5703
|
+
Ue as EOxItemFilter,
|
|
5704
|
+
hn as ElementConfig
|
|
5645
5705
|
};
|