@eox/itemfilter 0.5.1 → 0.5.3
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 +1367 -1246
- package/dist/eox-itemfilter.umd.cjs +70 -80
- package/package.json +1 -1
- package/test/general.html +6 -0
package/dist/eox-itemfilter.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Or = Object.defineProperty;
|
|
2
|
+
var Lr = (i, e, t) => e in i ? Or(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var Z = (i, e, t) => (Lr(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2019 Google LLC
|
|
7
7
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
8
|
*/
|
|
9
|
-
const kt = window, Ms = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yi = Symbol(),
|
|
10
|
-
let
|
|
9
|
+
const kt = window, Ms = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yi = Symbol(), Gs = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
let Tr = class {
|
|
11
11
|
constructor(e, t, s) {
|
|
12
12
|
if (this._$cssResult$ = !0, s !== yi)
|
|
13
13
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -18,7 +18,7 @@ let Dr = class {
|
|
|
18
18
|
const t = this.t;
|
|
19
19
|
if (Ms && e === void 0) {
|
|
20
20
|
const s = t !== void 0 && t.length === 1;
|
|
21
|
-
s && (e =
|
|
21
|
+
s && (e = Gs.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Gs.set(t, e));
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
@@ -26,24 +26,24 @@ let Dr = class {
|
|
|
26
26
|
return this.cssText;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const Dr = (i) => new Tr(typeof i == "string" ? i : i + "", void 0, yi), Rr = (i, e) => {
|
|
30
30
|
Ms ? i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
|
31
|
-
const s = document.createElement("style"),
|
|
32
|
-
|
|
31
|
+
const s = document.createElement("style"), r = kt.litNonce;
|
|
32
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
|
|
33
33
|
});
|
|
34
34
|
}, Zs = Ms ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
35
35
|
let t = "";
|
|
36
36
|
for (const s of e.cssRules)
|
|
37
37
|
t += s.cssText;
|
|
38
|
-
return
|
|
38
|
+
return Dr(t);
|
|
39
39
|
})(i) : i;
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
const
|
|
45
|
+
var os;
|
|
46
|
+
const Ct = window, Qs = Ct.trustedTypes, Pr = Qs ? Qs.emptyScript : "", ei = Ct.reactiveElementPolyfillSupport, gs = { toAttribute(i, e) {
|
|
47
47
|
switch (e) {
|
|
48
48
|
case Boolean:
|
|
49
49
|
i = i ? Pr : null;
|
|
@@ -71,8 +71,8 @@ const Lt = window, Qs = Lt.trustedTypes, Pr = Qs ? Qs.emptyScript : "", ei = Lt.
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
return t;
|
|
74
|
-
} }, bi = (i, e) => e !== i && (e == e || i == i),
|
|
75
|
-
let
|
|
74
|
+
} }, bi = (i, e) => e !== i && (e == e || i == i), ls = { attribute: !0, type: String, converter: gs, reflect: !1, hasChanged: bi }, vs = "finalized";
|
|
75
|
+
let Qe = class extends HTMLElement {
|
|
76
76
|
constructor() {
|
|
77
77
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
78
78
|
}
|
|
@@ -84,36 +84,36 @@ let Ze = class extends HTMLElement {
|
|
|
84
84
|
this.finalize();
|
|
85
85
|
const e = [];
|
|
86
86
|
return this.elementProperties.forEach((t, s) => {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const r = this._$Ep(s, t);
|
|
88
|
+
r !== void 0 && (this._$Ev.set(r, s), e.push(r));
|
|
89
89
|
}), e;
|
|
90
90
|
}
|
|
91
|
-
static createProperty(e, t =
|
|
91
|
+
static createProperty(e, t = ls) {
|
|
92
92
|
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
93
|
-
const s = typeof e == "symbol" ? Symbol() : "__" + e,
|
|
94
|
-
|
|
93
|
+
const s = typeof e == "symbol" ? Symbol() : "__" + e, r = this.getPropertyDescriptor(e, s, t);
|
|
94
|
+
r !== void 0 && Object.defineProperty(this.prototype, e, r);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
static getPropertyDescriptor(e, t, s) {
|
|
98
98
|
return { get() {
|
|
99
99
|
return this[t];
|
|
100
|
-
}, set(
|
|
101
|
-
const
|
|
102
|
-
this[t] =
|
|
100
|
+
}, set(r) {
|
|
101
|
+
const o = this[e];
|
|
102
|
+
this[t] = r, this.requestUpdate(e, o, s);
|
|
103
103
|
}, configurable: !0, enumerable: !0 };
|
|
104
104
|
}
|
|
105
105
|
static getPropertyOptions(e) {
|
|
106
|
-
return this.elementProperties.get(e) ||
|
|
106
|
+
return this.elementProperties.get(e) || ls;
|
|
107
107
|
}
|
|
108
108
|
static finalize() {
|
|
109
|
-
if (this.hasOwnProperty(
|
|
109
|
+
if (this.hasOwnProperty(vs))
|
|
110
110
|
return !1;
|
|
111
|
-
this[
|
|
111
|
+
this[vs] = !0;
|
|
112
112
|
const e = Object.getPrototypeOf(this);
|
|
113
113
|
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")) {
|
|
114
114
|
const t = this.properties, s = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
115
|
-
for (const
|
|
116
|
-
this.createProperty(
|
|
115
|
+
for (const r of s)
|
|
116
|
+
this.createProperty(r, t[r]);
|
|
117
117
|
}
|
|
118
118
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
119
119
|
}
|
|
@@ -121,8 +121,8 @@ let Ze = class extends HTMLElement {
|
|
|
121
121
|
const t = [];
|
|
122
122
|
if (Array.isArray(e)) {
|
|
123
123
|
const s = new Set(e.flat(1 / 0).reverse());
|
|
124
|
-
for (const
|
|
125
|
-
t.unshift(Zs(
|
|
124
|
+
for (const r of s)
|
|
125
|
+
t.unshift(Zs(r));
|
|
126
126
|
} else
|
|
127
127
|
e !== void 0 && t.push(Zs(e));
|
|
128
128
|
return t;
|
|
@@ -172,25 +172,25 @@ let Ze = class extends HTMLElement {
|
|
|
172
172
|
attributeChangedCallback(e, t, s) {
|
|
173
173
|
this._$AK(e, s);
|
|
174
174
|
}
|
|
175
|
-
_$EO(e, t, s =
|
|
176
|
-
var
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
this._$El = e,
|
|
175
|
+
_$EO(e, t, s = ls) {
|
|
176
|
+
var r;
|
|
177
|
+
const o = this.constructor._$Ep(e, s);
|
|
178
|
+
if (o !== void 0 && s.reflect === !0) {
|
|
179
|
+
const l = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : gs).toAttribute(t, s.type);
|
|
180
|
+
this._$El = e, l == null ? this.removeAttribute(o) : this.setAttribute(o, l), this._$El = null;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
_$AK(e, t) {
|
|
184
184
|
var s;
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
this._$El =
|
|
185
|
+
const r = this.constructor, o = r._$Ev.get(e);
|
|
186
|
+
if (o !== void 0 && this._$El !== o) {
|
|
187
|
+
const l = r.getPropertyOptions(o), c = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((s = l.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? l.converter : gs;
|
|
188
|
+
this._$El = o, this[o] = c.fromAttribute(t, l.type), this._$El = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
requestUpdate(e, t, s) {
|
|
192
|
-
let
|
|
193
|
-
e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || bi)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) :
|
|
192
|
+
let r = !0;
|
|
193
|
+
e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || bi)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
194
194
|
}
|
|
195
195
|
async _$Ej() {
|
|
196
196
|
this.isUpdatePending = !0;
|
|
@@ -209,16 +209,16 @@ let Ze = class extends HTMLElement {
|
|
|
209
209
|
var e;
|
|
210
210
|
if (!this.isUpdatePending)
|
|
211
211
|
return;
|
|
212
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((
|
|
212
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, o) => this[o] = r), this._$Ei = void 0);
|
|
213
213
|
let t = !1;
|
|
214
214
|
const s = this._$AL;
|
|
215
215
|
try {
|
|
216
|
-
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((
|
|
217
|
-
var
|
|
218
|
-
return (
|
|
216
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((r) => {
|
|
217
|
+
var o;
|
|
218
|
+
return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
|
|
219
219
|
}), this.update(s)) : this._$Ek();
|
|
220
|
-
} catch (
|
|
221
|
-
throw t = !1, this._$Ek(),
|
|
220
|
+
} catch (r) {
|
|
221
|
+
throw t = !1, this._$Ek(), r;
|
|
222
222
|
}
|
|
223
223
|
t && this._$AE(s);
|
|
224
224
|
}
|
|
@@ -227,8 +227,8 @@ let Ze = class extends HTMLElement {
|
|
|
227
227
|
_$AE(e) {
|
|
228
228
|
var t;
|
|
229
229
|
(t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
|
230
|
-
var
|
|
231
|
-
return (
|
|
230
|
+
var r;
|
|
231
|
+
return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
|
|
232
232
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
233
233
|
}
|
|
234
234
|
_$Ek() {
|
|
@@ -251,89 +251,89 @@ let Ze = class extends HTMLElement {
|
|
|
251
251
|
firstUpdated(e) {
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
|
-
|
|
254
|
+
Qe[vs] = !0, Qe.elementProperties = /* @__PURE__ */ new Map(), Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, ei == null || ei({ ReactiveElement: Qe }), ((os = Ct.reactiveElementVersions) !== null && os !== void 0 ? os : Ct.reactiveElementVersions = []).push("1.6.2");
|
|
255
255
|
/**
|
|
256
256
|
* @license
|
|
257
257
|
* Copyright 2017 Google LLC
|
|
258
258
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
259
259
|
*/
|
|
260
|
-
var
|
|
261
|
-
const
|
|
262
|
-
\f\r]`,
|
|
263
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ri = /'/g, ni = /"/g, xi = /^(?:script|style|textarea|title)$/i, jr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }),
|
|
260
|
+
var as;
|
|
261
|
+
const Ot = window, et = Ot.trustedTypes, ti = et ? et.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ms = "$lit$", Ne = `lit$${(Math.random() + "").slice(9)}$`, $i = "?" + Ne, Ir = `<${$i}>`, Ve = document, ct = () => Ve.createComment(""), ut = (i) => i === null || typeof i != "object" && typeof i != "function", _i = Array.isArray, Nr = (i) => _i(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", hs = `[
|
|
262
|
+
\f\r]`, ot = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, si = /-->/g, ii = />/g, Be = RegExp(`>|${hs}(?:([^\\s"'>=/]+)(${hs}*=${hs}*(?:[^
|
|
263
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ri = /'/g, ni = /"/g, xi = /^(?:script|style|textarea|title)$/i, jr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), ge = jr(1), Ye = Symbol.for("lit-noChange"), te = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), We = Ve.createTreeWalker(Ve, 129, null, !1), Hr = (i, e) => {
|
|
264
264
|
const t = i.length - 1, s = [];
|
|
265
|
-
let
|
|
265
|
+
let r, o = e === 2 ? "<svg>" : "", l = ot;
|
|
266
266
|
for (let u = 0; u < t; u++) {
|
|
267
267
|
const d = i[u];
|
|
268
|
-
let m, v, $ = -1,
|
|
269
|
-
for (;
|
|
270
|
-
|
|
271
|
-
const j =
|
|
272
|
-
|
|
268
|
+
let m, v, $ = -1, E = 0;
|
|
269
|
+
for (; E < d.length && (l.lastIndex = E, v = l.exec(d), v !== null); )
|
|
270
|
+
E = l.lastIndex, l === ot ? v[1] === "!--" ? l = si : v[1] !== void 0 ? l = ii : v[2] !== void 0 ? (xi.test(v[2]) && (r = RegExp("</" + v[2], "g")), l = Be) : v[3] !== void 0 && (l = Be) : l === Be ? v[0] === ">" ? (l = r ?? ot, $ = -1) : v[1] === void 0 ? $ = -2 : ($ = l.lastIndex - v[2].length, m = v[1], l = v[3] === void 0 ? Be : v[3] === '"' ? ni : ri) : l === ni || l === ri ? l = Be : l === si || l === ii ? l = ot : (l = Be, r = void 0);
|
|
271
|
+
const j = l === Be && i[u + 1].startsWith("/>") ? " " : "";
|
|
272
|
+
o += l === ot ? d + Ir : $ >= 0 ? (s.push(m), d.slice(0, $) + ms + d.slice($) + Ne + j) : d + Ne + ($ === -2 ? (s.push(void 0), u) : j);
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const c = o + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
|
275
275
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
276
276
|
throw Error("invalid template strings array");
|
|
277
|
-
return [ti !== void 0 ? ti.createHTML(
|
|
277
|
+
return [ti !== void 0 ? ti.createHTML(c) : c, s];
|
|
278
278
|
};
|
|
279
279
|
class dt {
|
|
280
280
|
constructor({ strings: e, _$litType$: t }, s) {
|
|
281
|
-
let
|
|
281
|
+
let r;
|
|
282
282
|
this.parts = [];
|
|
283
|
-
let
|
|
284
|
-
const
|
|
285
|
-
if (this.el = dt.createElement(d, s),
|
|
283
|
+
let o = 0, l = 0;
|
|
284
|
+
const c = e.length - 1, u = this.parts, [d, m] = Hr(e, t);
|
|
285
|
+
if (this.el = dt.createElement(d, s), We.currentNode = this.el.content, t === 2) {
|
|
286
286
|
const v = this.el.content, $ = v.firstChild;
|
|
287
287
|
$.remove(), v.append(...$.childNodes);
|
|
288
288
|
}
|
|
289
|
-
for (; (
|
|
290
|
-
if (
|
|
291
|
-
if (
|
|
289
|
+
for (; (r = We.nextNode()) !== null && u.length < c; ) {
|
|
290
|
+
if (r.nodeType === 1) {
|
|
291
|
+
if (r.hasAttributes()) {
|
|
292
292
|
const v = [];
|
|
293
|
-
for (const $ of
|
|
294
|
-
if ($.endsWith(
|
|
295
|
-
const
|
|
296
|
-
if (v.push($),
|
|
297
|
-
const j =
|
|
298
|
-
u.push({ type: 1, index:
|
|
293
|
+
for (const $ of r.getAttributeNames())
|
|
294
|
+
if ($.endsWith(ms) || $.startsWith(Ne)) {
|
|
295
|
+
const E = m[l++];
|
|
296
|
+
if (v.push($), E !== void 0) {
|
|
297
|
+
const j = r.getAttribute(E.toLowerCase() + ms).split(Ne), G = /([.?@])?(.*)/.exec(E);
|
|
298
|
+
u.push({ type: 1, index: o, name: G[2], strings: j, ctor: G[1] === "." ? Fr : G[1] === "?" ? zr : G[1] === "@" ? Wr : Tt });
|
|
299
299
|
} else
|
|
300
|
-
u.push({ type: 6, index:
|
|
300
|
+
u.push({ type: 6, index: o });
|
|
301
301
|
}
|
|
302
302
|
for (const $ of v)
|
|
303
|
-
|
|
303
|
+
r.removeAttribute($);
|
|
304
304
|
}
|
|
305
|
-
if (xi.test(
|
|
306
|
-
const v =
|
|
305
|
+
if (xi.test(r.tagName)) {
|
|
306
|
+
const v = r.textContent.split(Ne), $ = v.length - 1;
|
|
307
307
|
if ($ > 0) {
|
|
308
|
-
|
|
309
|
-
for (let
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
r.textContent = et ? et.emptyScript : "";
|
|
309
|
+
for (let E = 0; E < $; E++)
|
|
310
|
+
r.append(v[E], ct()), We.nextNode(), u.push({ type: 2, index: ++o });
|
|
311
|
+
r.append(v[$], ct());
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
} else if (
|
|
315
|
-
if (
|
|
316
|
-
u.push({ type: 2, index:
|
|
314
|
+
} else if (r.nodeType === 8)
|
|
315
|
+
if (r.data === $i)
|
|
316
|
+
u.push({ type: 2, index: o });
|
|
317
317
|
else {
|
|
318
318
|
let v = -1;
|
|
319
|
-
for (; (v =
|
|
320
|
-
u.push({ type: 7, index:
|
|
319
|
+
for (; (v = r.data.indexOf(Ne, v + 1)) !== -1; )
|
|
320
|
+
u.push({ type: 7, index: o }), v += Ne.length - 1;
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
o++;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
static createElement(e, t) {
|
|
326
|
-
const s =
|
|
326
|
+
const s = Ve.createElement("template");
|
|
327
327
|
return s.innerHTML = e, s;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
var
|
|
332
|
-
if (e ===
|
|
330
|
+
function tt(i, e, t = i, s) {
|
|
331
|
+
var r, o, l, c;
|
|
332
|
+
if (e === Ye)
|
|
333
333
|
return e;
|
|
334
|
-
let u = s !== void 0 ? (
|
|
334
|
+
let u = s !== void 0 ? (r = t._$Co) === null || r === void 0 ? void 0 : r[s] : t._$Cl;
|
|
335
335
|
const d = ut(e) ? void 0 : e._$litDirective$;
|
|
336
|
-
return (u == null ? void 0 : u.constructor) !== d && ((
|
|
336
|
+
return (u == null ? void 0 : u.constructor) !== d && ((o = u == null ? void 0 : u._$AO) === null || o === void 0 || o.call(u, !1), d === void 0 ? u = void 0 : (u = new d(i), u._$AT(i, t, s)), s !== void 0 ? ((l = (c = t)._$Co) !== null && l !== void 0 ? l : c._$Co = [])[s] = u : t._$Cl = u), u !== void 0 && (e = tt(i, u._$AS(i, e.values), u, s)), e;
|
|
337
337
|
}
|
|
338
338
|
class Ur {
|
|
339
339
|
constructor(e, t) {
|
|
@@ -347,17 +347,17 @@ class Ur {
|
|
|
347
347
|
}
|
|
348
348
|
u(e) {
|
|
349
349
|
var t;
|
|
350
|
-
const { el: { content: s }, parts:
|
|
351
|
-
|
|
352
|
-
let
|
|
350
|
+
const { el: { content: s }, parts: r } = this._$AD, o = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : Ve).importNode(s, !0);
|
|
351
|
+
We.currentNode = o;
|
|
352
|
+
let l = We.nextNode(), c = 0, u = 0, d = r[0];
|
|
353
353
|
for (; d !== void 0; ) {
|
|
354
|
-
if (
|
|
354
|
+
if (c === d.index) {
|
|
355
355
|
let m;
|
|
356
|
-
d.type === 2 ? m = new pt(
|
|
356
|
+
d.type === 2 ? m = new pt(l, l.nextSibling, this, e) : d.type === 1 ? m = new d.ctor(l, d.name, d.strings, this, e) : d.type === 6 && (m = new Vr(l, this, e)), this._$AV.push(m), d = r[++u];
|
|
357
357
|
}
|
|
358
|
-
|
|
358
|
+
c !== (d == null ? void 0 : d.index) && (l = We.nextNode(), c++);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return We.currentNode = Ve, o;
|
|
361
361
|
}
|
|
362
362
|
v(e) {
|
|
363
363
|
let t = 0;
|
|
@@ -366,9 +366,9 @@ class Ur {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
class pt {
|
|
369
|
-
constructor(e, t, s,
|
|
370
|
-
var
|
|
371
|
-
this.type = 2, this._$AH = te, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options =
|
|
369
|
+
constructor(e, t, s, r) {
|
|
370
|
+
var o;
|
|
371
|
+
this.type = 2, this._$AH = te, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
|
|
372
372
|
}
|
|
373
373
|
get _$AU() {
|
|
374
374
|
var e, t;
|
|
@@ -386,7 +386,7 @@ class pt {
|
|
|
386
386
|
return this._$AB;
|
|
387
387
|
}
|
|
388
388
|
_$AI(e, t = this) {
|
|
389
|
-
e =
|
|
389
|
+
e = tt(this, e, t), ut(e) ? e === te || e == null || e === "" ? (this._$AH !== te && this._$AR(), this._$AH = te) : e !== this._$AH && e !== Ye && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : Nr(e) ? this.T(e) : this._(e);
|
|
390
390
|
}
|
|
391
391
|
k(e) {
|
|
392
392
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -395,16 +395,16 @@ class pt {
|
|
|
395
395
|
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
|
396
396
|
}
|
|
397
397
|
_(e) {
|
|
398
|
-
this._$AH !== te && ut(this._$AH) ? this._$AA.nextSibling.data = e : this.$(
|
|
398
|
+
this._$AH !== te && ut(this._$AH) ? this._$AA.nextSibling.data = e : this.$(Ve.createTextNode(e)), this._$AH = e;
|
|
399
399
|
}
|
|
400
400
|
g(e) {
|
|
401
401
|
var t;
|
|
402
|
-
const { values: s, _$litType$:
|
|
403
|
-
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) ===
|
|
402
|
+
const { values: s, _$litType$: r } = e, o = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = dt.createElement(r.h, this.options)), r);
|
|
403
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === o)
|
|
404
404
|
this._$AH.v(s);
|
|
405
405
|
else {
|
|
406
|
-
const
|
|
407
|
-
|
|
406
|
+
const l = new Ur(o, this), c = l.u(this.options);
|
|
407
|
+
l.v(s), this.$(c), this._$AH = l;
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
_$AC(e) {
|
|
@@ -414,16 +414,16 @@ class pt {
|
|
|
414
414
|
T(e) {
|
|
415
415
|
_i(this._$AH) || (this._$AH = [], this._$AR());
|
|
416
416
|
const t = this._$AH;
|
|
417
|
-
let s,
|
|
418
|
-
for (const
|
|
419
|
-
|
|
420
|
-
|
|
417
|
+
let s, r = 0;
|
|
418
|
+
for (const o of e)
|
|
419
|
+
r === t.length ? t.push(s = new pt(this.k(ct()), this.k(ct()), this, this.options)) : s = t[r], s._$AI(o), r++;
|
|
420
|
+
r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
|
|
421
421
|
}
|
|
422
422
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
423
423
|
var s;
|
|
424
424
|
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
|
425
|
-
const
|
|
426
|
-
e.remove(), e =
|
|
425
|
+
const r = e.nextSibling;
|
|
426
|
+
e.remove(), e = r;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
setConnected(e) {
|
|
@@ -431,9 +431,9 @@ class pt {
|
|
|
431
431
|
this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
class
|
|
435
|
-
constructor(e, t, s,
|
|
436
|
-
this.type = 1, this._$AH = te, this._$AN = void 0, this.element = e, this.name = t, this._$AM =
|
|
434
|
+
class Tt {
|
|
435
|
+
constructor(e, t, s, r, o) {
|
|
436
|
+
this.type = 1, this._$AH = te, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = te;
|
|
437
437
|
}
|
|
438
438
|
get tagName() {
|
|
439
439
|
return this.element.tagName;
|
|
@@ -441,24 +441,24 @@ class Dt {
|
|
|
441
441
|
get _$AU() {
|
|
442
442
|
return this._$AM._$AU;
|
|
443
443
|
}
|
|
444
|
-
_$AI(e, t = this, s,
|
|
445
|
-
const
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
448
|
-
e =
|
|
444
|
+
_$AI(e, t = this, s, r) {
|
|
445
|
+
const o = this.strings;
|
|
446
|
+
let l = !1;
|
|
447
|
+
if (o === void 0)
|
|
448
|
+
e = tt(this, e, t, 0), l = !ut(e) || e !== this._$AH && e !== Ye, l && (this._$AH = e);
|
|
449
449
|
else {
|
|
450
|
-
const
|
|
450
|
+
const c = e;
|
|
451
451
|
let u, d;
|
|
452
|
-
for (e =
|
|
453
|
-
d =
|
|
452
|
+
for (e = o[0], u = 0; u < o.length - 1; u++)
|
|
453
|
+
d = tt(this, c[s + u], t, u), d === Ye && (d = this._$AH[u]), l || (l = !ut(d) || d !== this._$AH[u]), d === te ? e = te : e !== te && (e += (d ?? "") + o[u + 1]), this._$AH[u] = d;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
l && !r && this.j(e);
|
|
456
456
|
}
|
|
457
457
|
j(e) {
|
|
458
458
|
e === te ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class Fr extends
|
|
461
|
+
class Fr extends Tt {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,8 +466,8 @@ class Fr extends Dt {
|
|
|
466
466
|
this.element[this.name] = e === te ? void 0 : e;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
const Br =
|
|
470
|
-
class zr extends
|
|
469
|
+
const Br = et ? et.emptyScript : "";
|
|
470
|
+
class zr extends Tt {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(...arguments), this.type = 4;
|
|
473
473
|
}
|
|
@@ -475,16 +475,16 @@ class zr extends Dt {
|
|
|
475
475
|
e && e !== te ? this.element.setAttribute(this.name, Br) : this.element.removeAttribute(this.name);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
class Wr extends
|
|
479
|
-
constructor(e, t, s,
|
|
480
|
-
super(e, t, s,
|
|
478
|
+
class Wr extends Tt {
|
|
479
|
+
constructor(e, t, s, r, o) {
|
|
480
|
+
super(e, t, s, r, o), this.type = 5;
|
|
481
481
|
}
|
|
482
482
|
_$AI(e, t = this) {
|
|
483
483
|
var s;
|
|
484
|
-
if ((e = (s =
|
|
484
|
+
if ((e = (s = tt(this, e, t, 0)) !== null && s !== void 0 ? s : te) === Ye)
|
|
485
485
|
return;
|
|
486
|
-
const
|
|
487
|
-
|
|
486
|
+
const r = this._$AH, o = e === te && r !== te || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, l = e !== te && (r === te || o);
|
|
487
|
+
o && this.element.removeEventListener(this.name, this, r), l && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(e) {
|
|
490
490
|
var t, s;
|
|
@@ -499,28 +499,28 @@ class Vr {
|
|
|
499
499
|
return this._$AM._$AU;
|
|
500
500
|
}
|
|
501
501
|
_$AI(e) {
|
|
502
|
-
|
|
502
|
+
tt(this, e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const li =
|
|
506
|
-
li == null || li(dt, pt), ((
|
|
505
|
+
const li = Ot.litHtmlPolyfillSupport;
|
|
506
|
+
li == null || li(dt, pt), ((as = Ot.litHtmlVersions) !== null && as !== void 0 ? as : Ot.litHtmlVersions = []).push("2.7.4");
|
|
507
507
|
const Yr = (i, e, t) => {
|
|
508
|
-
var s,
|
|
509
|
-
const
|
|
510
|
-
let
|
|
511
|
-
if (
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
return
|
|
508
|
+
var s, r;
|
|
509
|
+
const o = (s = t == null ? void 0 : t.renderBefore) !== null && s !== void 0 ? s : e;
|
|
510
|
+
let l = o._$litPart$;
|
|
511
|
+
if (l === void 0) {
|
|
512
|
+
const c = (r = t == null ? void 0 : t.renderBefore) !== null && r !== void 0 ? r : null;
|
|
513
|
+
o._$litPart$ = l = new pt(e.insertBefore(ct(), c), c, void 0, t ?? {});
|
|
514
|
+
}
|
|
515
|
+
return l._$AI(i), l;
|
|
516
516
|
};
|
|
517
517
|
/**
|
|
518
518
|
* @license
|
|
519
519
|
* Copyright 2017 Google LLC
|
|
520
520
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
521
521
|
*/
|
|
522
|
-
var cs,
|
|
523
|
-
class
|
|
522
|
+
var cs, us;
|
|
523
|
+
class ht extends Qe {
|
|
524
524
|
constructor() {
|
|
525
525
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
526
526
|
}
|
|
@@ -542,22 +542,22 @@ class ct extends Ze {
|
|
|
542
542
|
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
|
543
543
|
}
|
|
544
544
|
render() {
|
|
545
|
-
return
|
|
545
|
+
return Ye;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
ht.finalized = !0, ht._$litElement$ = !0, (cs = globalThis.litElementHydrateSupport) === null || cs === void 0 || cs.call(globalThis, { LitElement: ht });
|
|
549
549
|
const ai = globalThis.litElementPolyfillSupport;
|
|
550
|
-
ai == null || ai({ LitElement:
|
|
551
|
-
((
|
|
550
|
+
ai == null || ai({ LitElement: ht });
|
|
551
|
+
((us = globalThis.litElementVersions) !== null && us !== void 0 ? us : globalThis.litElementVersions = []).push("3.3.2");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
557
|
const Kr = (i) => (e) => typeof e == "function" ? ((t, s) => (customElements.define(t, s), s))(i, e) : ((t, s) => {
|
|
558
|
-
const { kind:
|
|
559
|
-
return { kind:
|
|
560
|
-
customElements.define(t,
|
|
558
|
+
const { kind: r, elements: o } = s;
|
|
559
|
+
return { kind: r, elements: o, finisher(l) {
|
|
560
|
+
customElements.define(t, l);
|
|
561
561
|
} };
|
|
562
562
|
})(i, e);
|
|
563
563
|
/**
|
|
@@ -574,7 +574,7 @@ const qr = (i, e) => e.kind === "method" && e.descriptor && !("value" in e.descr
|
|
|
574
574
|
} }, Xr = (i, e, t) => {
|
|
575
575
|
e.constructor.createProperty(t, i);
|
|
576
576
|
};
|
|
577
|
-
function
|
|
577
|
+
function Dt(i) {
|
|
578
578
|
return (e, t) => t !== void 0 ? Xr(i, e, t) : qr(i, e);
|
|
579
579
|
}
|
|
580
580
|
/**
|
|
@@ -582,22 +582,22 @@ function Ss(i) {
|
|
|
582
582
|
* Copyright 2017 Google LLC
|
|
583
583
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
584
584
|
*/
|
|
585
|
-
function
|
|
586
|
-
return
|
|
585
|
+
function Rt(i) {
|
|
586
|
+
return Dt({ ...i, state: !0 });
|
|
587
587
|
}
|
|
588
588
|
/**
|
|
589
589
|
* @license
|
|
590
590
|
* Copyright 2021 Google LLC
|
|
591
591
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
592
592
|
*/
|
|
593
|
-
var
|
|
594
|
-
((
|
|
593
|
+
var ds;
|
|
594
|
+
((ds = window.HTMLSlotElement) === null || ds === void 0 ? void 0 : ds.prototype.assignedElements) != null;
|
|
595
595
|
/**
|
|
596
596
|
* @license
|
|
597
597
|
* Copyright 2021 Google LLC
|
|
598
598
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
599
599
|
*/
|
|
600
|
-
function
|
|
600
|
+
function Ze(i, e, t) {
|
|
601
601
|
return i ? e() : t == null ? void 0 : t();
|
|
602
602
|
}
|
|
603
603
|
/**
|
|
@@ -617,7 +617,7 @@ function* lt(i, e) {
|
|
|
617
617
|
* Copyright 2017 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
|
-
const
|
|
620
|
+
const Jr = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Gr = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
621
621
|
class Zr {
|
|
622
622
|
constructor(e) {
|
|
623
623
|
}
|
|
@@ -639,15 +639,15 @@ class Zr {
|
|
|
639
639
|
* Copyright 2017 Google LLC
|
|
640
640
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
641
641
|
*/
|
|
642
|
-
class
|
|
642
|
+
class ys extends Zr {
|
|
643
643
|
constructor(e) {
|
|
644
|
-
if (super(e), this.et = te, e.type !==
|
|
644
|
+
if (super(e), this.et = te, e.type !== Jr.CHILD)
|
|
645
645
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
646
646
|
}
|
|
647
647
|
render(e) {
|
|
648
648
|
if (e === te || e == null)
|
|
649
649
|
return this.ft = void 0, this.et = e;
|
|
650
|
-
if (e ===
|
|
650
|
+
if (e === Ye)
|
|
651
651
|
return e;
|
|
652
652
|
if (typeof e != "string")
|
|
653
653
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
@@ -658,10 +658,10 @@ class ms extends Zr {
|
|
|
658
658
|
return t.raw = t, this.ft = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
|
|
662
|
-
const
|
|
661
|
+
ys.directiveName = "unsafeHTML", ys.resultType = 1;
|
|
662
|
+
const hi = Gr(ys);
|
|
663
663
|
function Re(i) {
|
|
664
|
-
return Array.isArray ? Array.isArray(i) :
|
|
664
|
+
return Array.isArray ? Array.isArray(i) : Ei(i) === "[object Array]";
|
|
665
665
|
}
|
|
666
666
|
const Qr = 1 / 0;
|
|
667
667
|
function en(i) {
|
|
@@ -673,14 +673,14 @@ function en(i) {
|
|
|
673
673
|
function tn(i) {
|
|
674
674
|
return i == null ? "" : en(i);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function De(i) {
|
|
677
677
|
return typeof i == "string";
|
|
678
678
|
}
|
|
679
679
|
function wi(i) {
|
|
680
680
|
return typeof i == "number";
|
|
681
681
|
}
|
|
682
682
|
function sn(i) {
|
|
683
|
-
return i === !0 || i === !1 || rn(i) &&
|
|
683
|
+
return i === !0 || i === !1 || rn(i) && Ei(i) == "[object Boolean]";
|
|
684
684
|
}
|
|
685
685
|
function Ai(i) {
|
|
686
686
|
return typeof i == "object";
|
|
@@ -691,20 +691,20 @@ function rn(i) {
|
|
|
691
691
|
function xe(i) {
|
|
692
692
|
return i != null;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function ps(i) {
|
|
695
695
|
return !i.trim().length;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Ei(i) {
|
|
698
698
|
return i == null ? i === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(i);
|
|
699
699
|
}
|
|
700
|
-
const nn = "Incorrect 'index' type", on = (i) => `Invalid value for key ${i}`, ln = (i) => `Pattern length exceeds max of ${i}.`, an = (i) => `Missing ${i} property in key`,
|
|
701
|
-
class
|
|
700
|
+
const nn = "Incorrect 'index' type", on = (i) => `Invalid value for key ${i}`, ln = (i) => `Pattern length exceeds max of ${i}.`, an = (i) => `Missing ${i} property in key`, hn = (i) => `Property 'weight' in key '${i}' must be a positive integer`, ci = Object.prototype.hasOwnProperty;
|
|
701
|
+
class cn {
|
|
702
702
|
constructor(e) {
|
|
703
703
|
this._keys = [], this._keyMap = {};
|
|
704
704
|
let t = 0;
|
|
705
705
|
e.forEach((s) => {
|
|
706
|
-
let
|
|
707
|
-
t +=
|
|
706
|
+
let r = Mi(s);
|
|
707
|
+
t += r.weight, this._keys.push(r), this._keyMap[r.id] = r, t += r.weight;
|
|
708
708
|
}), this._keys.forEach((s) => {
|
|
709
709
|
s.weight /= t;
|
|
710
710
|
});
|
|
@@ -719,48 +719,48 @@ class hn {
|
|
|
719
719
|
return JSON.stringify(this._keys);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
let e = null, t = null, s = null,
|
|
724
|
-
if (
|
|
725
|
-
s = i, e = ui(i), t =
|
|
722
|
+
function Mi(i) {
|
|
723
|
+
let e = null, t = null, s = null, r = 1, o = null;
|
|
724
|
+
if (De(i) || Re(i))
|
|
725
|
+
s = i, e = ui(i), t = bs(i);
|
|
726
726
|
else {
|
|
727
|
-
if (!
|
|
727
|
+
if (!ci.call(i, "name"))
|
|
728
728
|
throw new Error(an("name"));
|
|
729
|
-
const
|
|
730
|
-
if (s =
|
|
731
|
-
throw new Error(
|
|
732
|
-
e = ui(
|
|
729
|
+
const l = i.name;
|
|
730
|
+
if (s = l, ci.call(i, "weight") && (r = i.weight, r <= 0))
|
|
731
|
+
throw new Error(hn(l));
|
|
732
|
+
e = ui(l), t = bs(l), o = i.getFn;
|
|
733
733
|
}
|
|
734
|
-
return { path: e, id: t, weight:
|
|
734
|
+
return { path: e, id: t, weight: r, src: s, getFn: o };
|
|
735
735
|
}
|
|
736
736
|
function ui(i) {
|
|
737
737
|
return Re(i) ? i : i.split(".");
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function bs(i) {
|
|
740
740
|
return Re(i) ? i.join(".") : i;
|
|
741
741
|
}
|
|
742
742
|
function un(i, e) {
|
|
743
743
|
let t = [], s = !1;
|
|
744
|
-
const
|
|
745
|
-
if (xe(
|
|
746
|
-
if (!
|
|
747
|
-
t.push(
|
|
744
|
+
const r = (o, l, c) => {
|
|
745
|
+
if (xe(o))
|
|
746
|
+
if (!l[c])
|
|
747
|
+
t.push(o);
|
|
748
748
|
else {
|
|
749
|
-
let u =
|
|
750
|
-
const d =
|
|
749
|
+
let u = l[c];
|
|
750
|
+
const d = o[u];
|
|
751
751
|
if (!xe(d))
|
|
752
752
|
return;
|
|
753
|
-
if (
|
|
753
|
+
if (c === l.length - 1 && (De(d) || wi(d) || sn(d)))
|
|
754
754
|
t.push(tn(d));
|
|
755
755
|
else if (Re(d)) {
|
|
756
756
|
s = !0;
|
|
757
757
|
for (let m = 0, v = d.length; m < v; m += 1)
|
|
758
|
-
|
|
758
|
+
r(d[m], l, c + 1);
|
|
759
759
|
} else
|
|
760
|
-
|
|
760
|
+
l.length && r(d, l, c + 1);
|
|
761
761
|
}
|
|
762
762
|
};
|
|
763
|
-
return
|
|
763
|
+
return r(i, De(e) ? e.split(".") : e, 0), s ? t : t[0];
|
|
764
764
|
}
|
|
765
765
|
const dn = {
|
|
766
766
|
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
@@ -813,7 +813,7 @@ const dn = {
|
|
|
813
813
|
// The weight to determine how much field length norm effects scoring.
|
|
814
814
|
fieldNormWeight: 1
|
|
815
815
|
};
|
|
816
|
-
var
|
|
816
|
+
var D = {
|
|
817
817
|
...pn,
|
|
818
818
|
...dn,
|
|
819
819
|
...fn,
|
|
@@ -823,22 +823,22 @@ const vn = /[^ ]+/g;
|
|
|
823
823
|
function mn(i = 1, e = 3) {
|
|
824
824
|
const t = /* @__PURE__ */ new Map(), s = Math.pow(10, e);
|
|
825
825
|
return {
|
|
826
|
-
get(
|
|
827
|
-
const
|
|
828
|
-
if (t.has(
|
|
829
|
-
return t.get(
|
|
830
|
-
const
|
|
831
|
-
return t.set(
|
|
826
|
+
get(r) {
|
|
827
|
+
const o = r.match(vn).length;
|
|
828
|
+
if (t.has(o))
|
|
829
|
+
return t.get(o);
|
|
830
|
+
const l = 1 / Math.pow(o, 0.5 * i), c = parseFloat(Math.round(l * s) / s);
|
|
831
|
+
return t.set(o, c), c;
|
|
832
832
|
},
|
|
833
833
|
clear() {
|
|
834
834
|
t.clear();
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class Ss {
|
|
839
839
|
constructor({
|
|
840
|
-
getFn: e =
|
|
841
|
-
fieldNormWeight: t =
|
|
840
|
+
getFn: e = D.getFn,
|
|
841
|
+
fieldNormWeight: t = D.fieldNormWeight
|
|
842
842
|
} = {}) {
|
|
843
843
|
this.norm = mn(t, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
844
844
|
}
|
|
@@ -854,7 +854,7 @@ class Es {
|
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
create() {
|
|
857
|
-
this.isCreated || !this.docs.length || (this.isCreated = !0,
|
|
857
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, De(this.docs[0]) ? this.docs.forEach((e, t) => {
|
|
858
858
|
this._addString(e, t);
|
|
859
859
|
}) : this.docs.forEach((e, t) => {
|
|
860
860
|
this._addObject(e, t);
|
|
@@ -863,7 +863,7 @@ class Es {
|
|
|
863
863
|
// Adds a doc to the end of the index
|
|
864
864
|
add(e) {
|
|
865
865
|
const t = this.size();
|
|
866
|
-
|
|
866
|
+
De(e) ? this._addString(e, t) : this._addObject(e, t);
|
|
867
867
|
}
|
|
868
868
|
// Removes the doc at the specified index of the index
|
|
869
869
|
removeAt(e) {
|
|
@@ -878,7 +878,7 @@ class Es {
|
|
|
878
878
|
return this.records.length;
|
|
879
879
|
}
|
|
880
880
|
_addString(e, t) {
|
|
881
|
-
if (!xe(e) ||
|
|
881
|
+
if (!xe(e) || ps(e))
|
|
882
882
|
return;
|
|
883
883
|
let s = {
|
|
884
884
|
v: e,
|
|
@@ -889,22 +889,22 @@ class Es {
|
|
|
889
889
|
}
|
|
890
890
|
_addObject(e, t) {
|
|
891
891
|
let s = { i: t, $: {} };
|
|
892
|
-
this.keys.forEach((
|
|
893
|
-
let
|
|
894
|
-
if (xe(
|
|
895
|
-
if (Re(
|
|
896
|
-
let
|
|
897
|
-
const u = [{ nestedArrIndex: -1, value:
|
|
892
|
+
this.keys.forEach((r, o) => {
|
|
893
|
+
let l = r.getFn ? r.getFn(e) : this.getFn(e, r.path);
|
|
894
|
+
if (xe(l)) {
|
|
895
|
+
if (Re(l)) {
|
|
896
|
+
let c = [];
|
|
897
|
+
const u = [{ nestedArrIndex: -1, value: l }];
|
|
898
898
|
for (; u.length; ) {
|
|
899
899
|
const { nestedArrIndex: d, value: m } = u.pop();
|
|
900
900
|
if (xe(m))
|
|
901
|
-
if (
|
|
901
|
+
if (De(m) && !ps(m)) {
|
|
902
902
|
let v = {
|
|
903
903
|
v: m,
|
|
904
904
|
i: d,
|
|
905
905
|
n: this.norm.get(m)
|
|
906
906
|
};
|
|
907
|
-
|
|
907
|
+
c.push(v);
|
|
908
908
|
} else
|
|
909
909
|
Re(m) && m.forEach((v, $) => {
|
|
910
910
|
u.push({
|
|
@@ -913,13 +913,13 @@ class Es {
|
|
|
913
913
|
});
|
|
914
914
|
});
|
|
915
915
|
}
|
|
916
|
-
s.$[
|
|
917
|
-
} else if (
|
|
918
|
-
let
|
|
919
|
-
v:
|
|
920
|
-
n: this.norm.get(
|
|
916
|
+
s.$[o] = c;
|
|
917
|
+
} else if (De(l) && !ps(l)) {
|
|
918
|
+
let c = {
|
|
919
|
+
v: l,
|
|
920
|
+
n: this.norm.get(l)
|
|
921
921
|
};
|
|
922
|
-
s.$[
|
|
922
|
+
s.$[o] = c;
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
}), this.records.push(s);
|
|
@@ -931,111 +931,111 @@ class Es {
|
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
const
|
|
936
|
-
return
|
|
934
|
+
function Si(i, e, { getFn: t = D.getFn, fieldNormWeight: s = D.fieldNormWeight } = {}) {
|
|
935
|
+
const r = new Ss({ getFn: t, fieldNormWeight: s });
|
|
936
|
+
return r.setKeys(i.map(Mi)), r.setSources(e), r.create(), r;
|
|
937
937
|
}
|
|
938
|
-
function yn(i, { getFn: e =
|
|
939
|
-
const { keys: s, records:
|
|
940
|
-
return
|
|
938
|
+
function yn(i, { getFn: e = D.getFn, fieldNormWeight: t = D.fieldNormWeight } = {}) {
|
|
939
|
+
const { keys: s, records: r } = i, o = new Ss({ getFn: e, fieldNormWeight: t });
|
|
940
|
+
return o.setKeys(s), o.setIndexRecords(r), o;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Mt(i, {
|
|
943
943
|
errors: e = 0,
|
|
944
944
|
currentLocation: t = 0,
|
|
945
945
|
expectedLocation: s = 0,
|
|
946
|
-
distance:
|
|
947
|
-
ignoreLocation:
|
|
946
|
+
distance: r = D.distance,
|
|
947
|
+
ignoreLocation: o = D.ignoreLocation
|
|
948
948
|
} = {}) {
|
|
949
|
-
const
|
|
950
|
-
if (
|
|
951
|
-
return
|
|
952
|
-
const
|
|
953
|
-
return
|
|
949
|
+
const l = e / i.length;
|
|
950
|
+
if (o)
|
|
951
|
+
return l;
|
|
952
|
+
const c = Math.abs(s - t);
|
|
953
|
+
return r ? l + c / r : c ? 1 : l;
|
|
954
954
|
}
|
|
955
|
-
function bn(i = [], e =
|
|
956
|
-
let t = [], s = -1,
|
|
957
|
-
for (let
|
|
958
|
-
let
|
|
959
|
-
|
|
955
|
+
function bn(i = [], e = D.minMatchCharLength) {
|
|
956
|
+
let t = [], s = -1, r = -1, o = 0;
|
|
957
|
+
for (let l = i.length; o < l; o += 1) {
|
|
958
|
+
let c = i[o];
|
|
959
|
+
c && s === -1 ? s = o : !c && s !== -1 && (r = o - 1, r - s + 1 >= e && t.push([s, r]), s = -1);
|
|
960
960
|
}
|
|
961
|
-
return i[
|
|
961
|
+
return i[o - 1] && o - s >= e && t.push([s, o - 1]), t;
|
|
962
962
|
}
|
|
963
|
-
const
|
|
963
|
+
const ze = 32;
|
|
964
964
|
function $n(i, e, t, {
|
|
965
|
-
location: s =
|
|
966
|
-
distance:
|
|
967
|
-
threshold:
|
|
968
|
-
findAllMatches:
|
|
969
|
-
minMatchCharLength:
|
|
970
|
-
includeMatches: u =
|
|
971
|
-
ignoreLocation: d =
|
|
965
|
+
location: s = D.location,
|
|
966
|
+
distance: r = D.distance,
|
|
967
|
+
threshold: o = D.threshold,
|
|
968
|
+
findAllMatches: l = D.findAllMatches,
|
|
969
|
+
minMatchCharLength: c = D.minMatchCharLength,
|
|
970
|
+
includeMatches: u = D.includeMatches,
|
|
971
|
+
ignoreLocation: d = D.ignoreLocation
|
|
972
972
|
} = {}) {
|
|
973
|
-
if (e.length >
|
|
974
|
-
throw new Error(ln(
|
|
973
|
+
if (e.length > ze)
|
|
974
|
+
throw new Error(ln(ze));
|
|
975
975
|
const m = e.length, v = i.length, $ = Math.max(0, Math.min(s, v));
|
|
976
|
-
let
|
|
977
|
-
const
|
|
976
|
+
let E = o, j = $;
|
|
977
|
+
const G = c > 1 || u, ve = G ? Array(v) : [];
|
|
978
978
|
let le;
|
|
979
979
|
for (; (le = i.indexOf(e, j)) > -1; ) {
|
|
980
|
-
let X =
|
|
980
|
+
let X = Mt(e, {
|
|
981
981
|
currentLocation: le,
|
|
982
982
|
expectedLocation: $,
|
|
983
|
-
distance:
|
|
983
|
+
distance: r,
|
|
984
984
|
ignoreLocation: d
|
|
985
985
|
});
|
|
986
|
-
if (
|
|
986
|
+
if (E = Math.min(X, E), j = le + m, G) {
|
|
987
987
|
let ie = 0;
|
|
988
988
|
for (; ie < m; )
|
|
989
|
-
|
|
989
|
+
ve[le + ie] = 1, ie += 1;
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
j = -1;
|
|
993
|
-
let
|
|
994
|
-
const
|
|
993
|
+
let me = [], pe = 1, Ee = m + v;
|
|
994
|
+
const ye = 1 << m - 1;
|
|
995
995
|
for (let X = 0; X < m; X += 1) {
|
|
996
|
-
let ie = 0, z =
|
|
996
|
+
let ie = 0, z = Ee;
|
|
997
997
|
for (; ie < z; )
|
|
998
|
-
|
|
998
|
+
Mt(e, {
|
|
999
999
|
errors: X,
|
|
1000
1000
|
currentLocation: $ + z,
|
|
1001
1001
|
expectedLocation: $,
|
|
1002
|
-
distance:
|
|
1002
|
+
distance: r,
|
|
1003
1003
|
ignoreLocation: d
|
|
1004
|
-
}) <=
|
|
1005
|
-
|
|
1006
|
-
let B = Math.max(1, $ - z + 1),
|
|
1007
|
-
|
|
1008
|
-
for (let y =
|
|
1004
|
+
}) <= E ? ie = z : Ee = z, z = Math.floor((Ee - ie) / 2 + ie);
|
|
1005
|
+
Ee = z;
|
|
1006
|
+
let B = Math.max(1, $ - z + 1), Oe = l ? v : Math.min($ + z, v) + m, Me = Array(Oe + 2);
|
|
1007
|
+
Me[Oe + 1] = (1 << X) - 1;
|
|
1008
|
+
for (let y = Oe; y >= B; y -= 1) {
|
|
1009
1009
|
let b = y - 1, k = t[i.charAt(b)];
|
|
1010
|
-
if (
|
|
1010
|
+
if (G && (ve[b] = +!!k), Me[y] = (Me[y + 1] << 1 | 1) & k, X && (Me[y] |= (me[y + 1] | me[y]) << 1 | 1 | me[y + 1]), Me[y] & ye && (pe = Mt(e, {
|
|
1011
1011
|
errors: X,
|
|
1012
1012
|
currentLocation: b,
|
|
1013
1013
|
expectedLocation: $,
|
|
1014
|
-
distance:
|
|
1014
|
+
distance: r,
|
|
1015
1015
|
ignoreLocation: d
|
|
1016
|
-
}), pe <=
|
|
1017
|
-
if (
|
|
1016
|
+
}), pe <= E)) {
|
|
1017
|
+
if (E = pe, j = b, j <= $)
|
|
1018
1018
|
break;
|
|
1019
1019
|
B = Math.max(1, 2 * $ - j);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
if (
|
|
1022
|
+
if (Mt(e, {
|
|
1023
1023
|
errors: X + 1,
|
|
1024
1024
|
currentLocation: $,
|
|
1025
1025
|
expectedLocation: $,
|
|
1026
|
-
distance:
|
|
1026
|
+
distance: r,
|
|
1027
1027
|
ignoreLocation: d
|
|
1028
|
-
}) >
|
|
1028
|
+
}) > E)
|
|
1029
1029
|
break;
|
|
1030
|
-
|
|
1030
|
+
me = Me;
|
|
1031
1031
|
}
|
|
1032
1032
|
const F = {
|
|
1033
1033
|
isMatch: j >= 0,
|
|
1034
1034
|
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
1035
1035
|
score: Math.max(1e-3, pe)
|
|
1036
1036
|
};
|
|
1037
|
-
if (
|
|
1038
|
-
const X = bn(
|
|
1037
|
+
if (G) {
|
|
1038
|
+
const X = bn(ve, c);
|
|
1039
1039
|
X.length ? u && (F.indices = X) : F.isMatch = !1;
|
|
1040
1040
|
}
|
|
1041
1041
|
return F;
|
|
@@ -1043,48 +1043,48 @@ function $n(i, e, t, {
|
|
|
1043
1043
|
function _n(i) {
|
|
1044
1044
|
let e = {};
|
|
1045
1045
|
for (let t = 0, s = i.length; t < s; t += 1) {
|
|
1046
|
-
const
|
|
1047
|
-
e[
|
|
1046
|
+
const r = i.charAt(t);
|
|
1047
|
+
e[r] = (e[r] || 0) | 1 << s - t - 1;
|
|
1048
1048
|
}
|
|
1049
1049
|
return e;
|
|
1050
1050
|
}
|
|
1051
1051
|
class ki {
|
|
1052
1052
|
constructor(e, {
|
|
1053
|
-
location: t =
|
|
1054
|
-
threshold: s =
|
|
1055
|
-
distance:
|
|
1056
|
-
includeMatches:
|
|
1057
|
-
findAllMatches:
|
|
1058
|
-
minMatchCharLength:
|
|
1059
|
-
isCaseSensitive: u =
|
|
1060
|
-
ignoreLocation: d =
|
|
1053
|
+
location: t = D.location,
|
|
1054
|
+
threshold: s = D.threshold,
|
|
1055
|
+
distance: r = D.distance,
|
|
1056
|
+
includeMatches: o = D.includeMatches,
|
|
1057
|
+
findAllMatches: l = D.findAllMatches,
|
|
1058
|
+
minMatchCharLength: c = D.minMatchCharLength,
|
|
1059
|
+
isCaseSensitive: u = D.isCaseSensitive,
|
|
1060
|
+
ignoreLocation: d = D.ignoreLocation
|
|
1061
1061
|
} = {}) {
|
|
1062
1062
|
if (this.options = {
|
|
1063
1063
|
location: t,
|
|
1064
1064
|
threshold: s,
|
|
1065
|
-
distance:
|
|
1066
|
-
includeMatches:
|
|
1067
|
-
findAllMatches:
|
|
1068
|
-
minMatchCharLength:
|
|
1065
|
+
distance: r,
|
|
1066
|
+
includeMatches: o,
|
|
1067
|
+
findAllMatches: l,
|
|
1068
|
+
minMatchCharLength: c,
|
|
1069
1069
|
isCaseSensitive: u,
|
|
1070
1070
|
ignoreLocation: d
|
|
1071
1071
|
}, this.pattern = u ? e : e.toLowerCase(), this.chunks = [], !this.pattern.length)
|
|
1072
1072
|
return;
|
|
1073
|
-
const m = ($,
|
|
1073
|
+
const m = ($, E) => {
|
|
1074
1074
|
this.chunks.push({
|
|
1075
1075
|
pattern: $,
|
|
1076
1076
|
alphabet: _n($),
|
|
1077
|
-
startIndex:
|
|
1077
|
+
startIndex: E
|
|
1078
1078
|
});
|
|
1079
1079
|
}, v = this.pattern.length;
|
|
1080
|
-
if (v >
|
|
1080
|
+
if (v > ze) {
|
|
1081
1081
|
let $ = 0;
|
|
1082
|
-
const
|
|
1082
|
+
const E = v % ze, j = v - E;
|
|
1083
1083
|
for (; $ < j; )
|
|
1084
|
-
m(this.pattern.substr($,
|
|
1085
|
-
if (
|
|
1086
|
-
const
|
|
1087
|
-
m(this.pattern.substr(
|
|
1084
|
+
m(this.pattern.substr($, ze), $), $ += ze;
|
|
1085
|
+
if (E) {
|
|
1086
|
+
const G = v - ze;
|
|
1087
|
+
m(this.pattern.substr(G), G);
|
|
1088
1088
|
}
|
|
1089
1089
|
} else
|
|
1090
1090
|
m(this.pattern, 0);
|
|
@@ -1099,31 +1099,31 @@ class ki {
|
|
|
1099
1099
|
return s && (j.indices = [[0, e.length - 1]]), j;
|
|
1100
1100
|
}
|
|
1101
1101
|
const {
|
|
1102
|
-
location:
|
|
1103
|
-
distance:
|
|
1104
|
-
threshold:
|
|
1105
|
-
findAllMatches:
|
|
1102
|
+
location: r,
|
|
1103
|
+
distance: o,
|
|
1104
|
+
threshold: l,
|
|
1105
|
+
findAllMatches: c,
|
|
1106
1106
|
minMatchCharLength: u,
|
|
1107
1107
|
ignoreLocation: d
|
|
1108
1108
|
} = this.options;
|
|
1109
1109
|
let m = [], v = 0, $ = !1;
|
|
1110
|
-
this.chunks.forEach(({ pattern: j, alphabet:
|
|
1111
|
-
const { isMatch: le, score:
|
|
1112
|
-
location:
|
|
1113
|
-
distance:
|
|
1114
|
-
threshold:
|
|
1115
|
-
findAllMatches:
|
|
1110
|
+
this.chunks.forEach(({ pattern: j, alphabet: G, startIndex: ve }) => {
|
|
1111
|
+
const { isMatch: le, score: me, indices: pe } = $n(e, j, G, {
|
|
1112
|
+
location: r + ve,
|
|
1113
|
+
distance: o,
|
|
1114
|
+
threshold: l,
|
|
1115
|
+
findAllMatches: c,
|
|
1116
1116
|
minMatchCharLength: u,
|
|
1117
1117
|
includeMatches: s,
|
|
1118
1118
|
ignoreLocation: d
|
|
1119
1119
|
});
|
|
1120
|
-
le && ($ = !0), v +=
|
|
1120
|
+
le && ($ = !0), v += me, le && pe && (m = [...m, ...pe]);
|
|
1121
1121
|
});
|
|
1122
|
-
let
|
|
1122
|
+
let E = {
|
|
1123
1123
|
isMatch: $,
|
|
1124
1124
|
score: $ ? v / this.chunks.length : 1
|
|
1125
1125
|
};
|
|
1126
|
-
return $ && s && (
|
|
1126
|
+
return $ && s && (E.indices = m), E;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
class je {
|
|
@@ -1209,7 +1209,7 @@ class An extends je {
|
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
class
|
|
1212
|
+
class En extends je {
|
|
1213
1213
|
constructor(e) {
|
|
1214
1214
|
super(e);
|
|
1215
1215
|
}
|
|
@@ -1231,7 +1231,7 @@ class Mn extends je {
|
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
class
|
|
1234
|
+
class Mn extends je {
|
|
1235
1235
|
constructor(e) {
|
|
1236
1236
|
super(e);
|
|
1237
1237
|
}
|
|
@@ -1253,7 +1253,7 @@ class Sn extends je {
|
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
class
|
|
1256
|
+
class Sn extends je {
|
|
1257
1257
|
constructor(e) {
|
|
1258
1258
|
super(e);
|
|
1259
1259
|
}
|
|
@@ -1275,24 +1275,24 @@ class En extends je {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
|
-
class
|
|
1278
|
+
class Ci extends je {
|
|
1279
1279
|
constructor(e, {
|
|
1280
|
-
location: t =
|
|
1281
|
-
threshold: s =
|
|
1282
|
-
distance:
|
|
1283
|
-
includeMatches:
|
|
1284
|
-
findAllMatches:
|
|
1285
|
-
minMatchCharLength:
|
|
1286
|
-
isCaseSensitive: u =
|
|
1287
|
-
ignoreLocation: d =
|
|
1280
|
+
location: t = D.location,
|
|
1281
|
+
threshold: s = D.threshold,
|
|
1282
|
+
distance: r = D.distance,
|
|
1283
|
+
includeMatches: o = D.includeMatches,
|
|
1284
|
+
findAllMatches: l = D.findAllMatches,
|
|
1285
|
+
minMatchCharLength: c = D.minMatchCharLength,
|
|
1286
|
+
isCaseSensitive: u = D.isCaseSensitive,
|
|
1287
|
+
ignoreLocation: d = D.ignoreLocation
|
|
1288
1288
|
} = {}) {
|
|
1289
1289
|
super(e), this._bitapSearch = new ki(e, {
|
|
1290
1290
|
location: t,
|
|
1291
1291
|
threshold: s,
|
|
1292
|
-
distance:
|
|
1293
|
-
includeMatches:
|
|
1294
|
-
findAllMatches:
|
|
1295
|
-
minMatchCharLength:
|
|
1292
|
+
distance: r,
|
|
1293
|
+
includeMatches: o,
|
|
1294
|
+
findAllMatches: l,
|
|
1295
|
+
minMatchCharLength: c,
|
|
1296
1296
|
isCaseSensitive: u,
|
|
1297
1297
|
ignoreLocation: d
|
|
1298
1298
|
});
|
|
@@ -1310,7 +1310,7 @@ class Li extends je {
|
|
|
1310
1310
|
return this._bitapSearch.searchIn(e);
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
class
|
|
1313
|
+
class Oi extends je {
|
|
1314
1314
|
constructor(e) {
|
|
1315
1315
|
super(e);
|
|
1316
1316
|
}
|
|
@@ -1325,73 +1325,73 @@ class Ci extends je {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
search(e) {
|
|
1327
1327
|
let t = 0, s;
|
|
1328
|
-
const
|
|
1328
|
+
const r = [], o = this.pattern.length;
|
|
1329
1329
|
for (; (s = e.indexOf(this.pattern, t)) > -1; )
|
|
1330
|
-
t = s +
|
|
1331
|
-
const
|
|
1330
|
+
t = s + o, r.push([s, t - 1]);
|
|
1331
|
+
const l = !!r.length;
|
|
1332
1332
|
return {
|
|
1333
|
-
isMatch:
|
|
1334
|
-
score:
|
|
1335
|
-
indices:
|
|
1333
|
+
isMatch: l,
|
|
1334
|
+
score: l ? 0 : 1,
|
|
1335
|
+
indices: r
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
|
-
const
|
|
1339
|
+
const $s = [
|
|
1340
1340
|
xn,
|
|
1341
|
-
|
|
1341
|
+
Oi,
|
|
1342
1342
|
An,
|
|
1343
|
-
Mn,
|
|
1344
1343
|
En,
|
|
1345
1344
|
Sn,
|
|
1345
|
+
Mn,
|
|
1346
1346
|
wn,
|
|
1347
|
-
|
|
1348
|
-
], pi =
|
|
1349
|
-
function
|
|
1350
|
-
return i.split(
|
|
1351
|
-
let s = t.trim().split(kn).filter((
|
|
1352
|
-
for (let
|
|
1353
|
-
const
|
|
1347
|
+
Ci
|
|
1348
|
+
], pi = $s.length, kn = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Cn = "|";
|
|
1349
|
+
function On(i, e = {}) {
|
|
1350
|
+
return i.split(Cn).map((t) => {
|
|
1351
|
+
let s = t.trim().split(kn).filter((o) => o && !!o.trim()), r = [];
|
|
1352
|
+
for (let o = 0, l = s.length; o < l; o += 1) {
|
|
1353
|
+
const c = s[o];
|
|
1354
1354
|
let u = !1, d = -1;
|
|
1355
1355
|
for (; !u && ++d < pi; ) {
|
|
1356
|
-
const m =
|
|
1357
|
-
let v = m.isMultiMatch(
|
|
1358
|
-
v && (
|
|
1356
|
+
const m = $s[d];
|
|
1357
|
+
let v = m.isMultiMatch(c);
|
|
1358
|
+
v && (r.push(new m(v, e)), u = !0);
|
|
1359
1359
|
}
|
|
1360
1360
|
if (!u)
|
|
1361
1361
|
for (d = -1; ++d < pi; ) {
|
|
1362
|
-
const m =
|
|
1363
|
-
let v = m.isSingleMatch(
|
|
1362
|
+
const m = $s[d];
|
|
1363
|
+
let v = m.isSingleMatch(c);
|
|
1364
1364
|
if (v) {
|
|
1365
|
-
|
|
1365
|
+
r.push(new m(v, e));
|
|
1366
1366
|
break;
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
}
|
|
1370
|
-
return
|
|
1370
|
+
return r;
|
|
1371
1371
|
});
|
|
1372
1372
|
}
|
|
1373
|
-
const
|
|
1374
|
-
class
|
|
1373
|
+
const Ln = /* @__PURE__ */ new Set([Ci.type, Oi.type]);
|
|
1374
|
+
class Tn {
|
|
1375
1375
|
constructor(e, {
|
|
1376
|
-
isCaseSensitive: t =
|
|
1377
|
-
includeMatches: s =
|
|
1378
|
-
minMatchCharLength:
|
|
1379
|
-
ignoreLocation:
|
|
1380
|
-
findAllMatches:
|
|
1381
|
-
location:
|
|
1382
|
-
threshold: u =
|
|
1383
|
-
distance: d =
|
|
1376
|
+
isCaseSensitive: t = D.isCaseSensitive,
|
|
1377
|
+
includeMatches: s = D.includeMatches,
|
|
1378
|
+
minMatchCharLength: r = D.minMatchCharLength,
|
|
1379
|
+
ignoreLocation: o = D.ignoreLocation,
|
|
1380
|
+
findAllMatches: l = D.findAllMatches,
|
|
1381
|
+
location: c = D.location,
|
|
1382
|
+
threshold: u = D.threshold,
|
|
1383
|
+
distance: d = D.distance
|
|
1384
1384
|
} = {}) {
|
|
1385
1385
|
this.query = null, this.options = {
|
|
1386
1386
|
isCaseSensitive: t,
|
|
1387
1387
|
includeMatches: s,
|
|
1388
|
-
minMatchCharLength:
|
|
1389
|
-
findAllMatches:
|
|
1390
|
-
ignoreLocation:
|
|
1391
|
-
location:
|
|
1388
|
+
minMatchCharLength: r,
|
|
1389
|
+
findAllMatches: l,
|
|
1390
|
+
ignoreLocation: o,
|
|
1391
|
+
location: c,
|
|
1392
1392
|
threshold: u,
|
|
1393
1393
|
distance: d
|
|
1394
|
-
}, this.pattern = t ? e : e.toLowerCase(), this.query =
|
|
1394
|
+
}, this.pattern = t ? e : e.toLowerCase(), this.query = On(this.pattern, this.options);
|
|
1395
1395
|
}
|
|
1396
1396
|
static condition(e, t) {
|
|
1397
1397
|
return t.useExtendedSearch;
|
|
@@ -1403,30 +1403,30 @@ class Dn {
|
|
|
1403
1403
|
isMatch: !1,
|
|
1404
1404
|
score: 1
|
|
1405
1405
|
};
|
|
1406
|
-
const { includeMatches: s, isCaseSensitive:
|
|
1407
|
-
e =
|
|
1408
|
-
let
|
|
1406
|
+
const { includeMatches: s, isCaseSensitive: r } = this.options;
|
|
1407
|
+
e = r ? e : e.toLowerCase();
|
|
1408
|
+
let o = 0, l = [], c = 0;
|
|
1409
1409
|
for (let u = 0, d = t.length; u < d; u += 1) {
|
|
1410
1410
|
const m = t[u];
|
|
1411
|
-
|
|
1411
|
+
l.length = 0, o = 0;
|
|
1412
1412
|
for (let v = 0, $ = m.length; v < $; v += 1) {
|
|
1413
|
-
const
|
|
1413
|
+
const E = m[v], { isMatch: j, indices: G, score: ve } = E.search(e);
|
|
1414
1414
|
if (j) {
|
|
1415
|
-
if (
|
|
1416
|
-
const le =
|
|
1417
|
-
|
|
1415
|
+
if (o += 1, c += ve, s) {
|
|
1416
|
+
const le = E.constructor.type;
|
|
1417
|
+
Ln.has(le) ? l = [...l, ...G] : l.push(G);
|
|
1418
1418
|
}
|
|
1419
1419
|
} else {
|
|
1420
|
-
|
|
1420
|
+
c = 0, o = 0, l.length = 0;
|
|
1421
1421
|
break;
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
if (
|
|
1424
|
+
if (o) {
|
|
1425
1425
|
let v = {
|
|
1426
1426
|
isMatch: !0,
|
|
1427
|
-
score:
|
|
1427
|
+
score: c / o
|
|
1428
1428
|
};
|
|
1429
|
-
return s && (v.indices =
|
|
1429
|
+
return s && (v.indices = l), v;
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
return {
|
|
@@ -1435,66 +1435,66 @@ class Dn {
|
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1440
|
-
|
|
1438
|
+
const _s = [];
|
|
1439
|
+
function Dn(...i) {
|
|
1440
|
+
_s.push(...i);
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1443
|
-
for (let t = 0, s =
|
|
1444
|
-
let
|
|
1445
|
-
if (
|
|
1446
|
-
return new
|
|
1442
|
+
function xs(i, e) {
|
|
1443
|
+
for (let t = 0, s = _s.length; t < s; t += 1) {
|
|
1444
|
+
let r = _s[t];
|
|
1445
|
+
if (r.condition(i, e))
|
|
1446
|
+
return new r(i, e);
|
|
1447
1447
|
}
|
|
1448
1448
|
return new ki(i, e);
|
|
1449
1449
|
}
|
|
1450
|
-
const
|
|
1450
|
+
const Lt = {
|
|
1451
1451
|
AND: "$and",
|
|
1452
1452
|
OR: "$or"
|
|
1453
|
-
},
|
|
1453
|
+
}, ws = {
|
|
1454
1454
|
PATH: "$path",
|
|
1455
1455
|
PATTERN: "$val"
|
|
1456
|
-
},
|
|
1457
|
-
[
|
|
1456
|
+
}, As = (i) => !!(i[Lt.AND] || i[Lt.OR]), Rn = (i) => !!i[ws.PATH], Pn = (i) => !Re(i) && Ai(i) && !As(i), fi = (i) => ({
|
|
1457
|
+
[Lt.AND]: Object.keys(i).map((e) => ({
|
|
1458
1458
|
[e]: i[e]
|
|
1459
1459
|
}))
|
|
1460
1460
|
});
|
|
1461
|
-
function
|
|
1462
|
-
const s = (
|
|
1463
|
-
let
|
|
1464
|
-
const
|
|
1465
|
-
if (!
|
|
1466
|
-
return s(fi(
|
|
1467
|
-
if (Pn(
|
|
1468
|
-
const u =
|
|
1469
|
-
if (!
|
|
1461
|
+
function Li(i, e, { auto: t = !0 } = {}) {
|
|
1462
|
+
const s = (r) => {
|
|
1463
|
+
let o = Object.keys(r);
|
|
1464
|
+
const l = Rn(r);
|
|
1465
|
+
if (!l && o.length > 1 && !As(r))
|
|
1466
|
+
return s(fi(r));
|
|
1467
|
+
if (Pn(r)) {
|
|
1468
|
+
const u = l ? r[ws.PATH] : o[0], d = l ? r[ws.PATTERN] : r[u];
|
|
1469
|
+
if (!De(d))
|
|
1470
1470
|
throw new Error(on(u));
|
|
1471
1471
|
const m = {
|
|
1472
|
-
keyId:
|
|
1472
|
+
keyId: bs(u),
|
|
1473
1473
|
pattern: d
|
|
1474
1474
|
};
|
|
1475
|
-
return t && (m.searcher =
|
|
1475
|
+
return t && (m.searcher = xs(d, e)), m;
|
|
1476
1476
|
}
|
|
1477
|
-
let
|
|
1477
|
+
let c = {
|
|
1478
1478
|
children: [],
|
|
1479
|
-
operator:
|
|
1479
|
+
operator: o[0]
|
|
1480
1480
|
};
|
|
1481
|
-
return
|
|
1482
|
-
const d =
|
|
1481
|
+
return o.forEach((u) => {
|
|
1482
|
+
const d = r[u];
|
|
1483
1483
|
Re(d) && d.forEach((m) => {
|
|
1484
|
-
|
|
1484
|
+
c.children.push(s(m));
|
|
1485
1485
|
});
|
|
1486
|
-
}),
|
|
1486
|
+
}), c;
|
|
1487
1487
|
};
|
|
1488
|
-
return
|
|
1488
|
+
return As(i) || (i = fi(i)), s(i);
|
|
1489
1489
|
}
|
|
1490
|
-
function In(i, { ignoreFieldNorm: e =
|
|
1490
|
+
function In(i, { ignoreFieldNorm: e = D.ignoreFieldNorm }) {
|
|
1491
1491
|
i.forEach((t) => {
|
|
1492
1492
|
let s = 1;
|
|
1493
|
-
t.matches.forEach(({ key:
|
|
1494
|
-
const
|
|
1493
|
+
t.matches.forEach(({ key: r, norm: o, score: l }) => {
|
|
1494
|
+
const c = r ? r.weight : null;
|
|
1495
1495
|
s *= Math.pow(
|
|
1496
|
-
|
|
1497
|
-
(
|
|
1496
|
+
l === 0 && c ? Number.EPSILON : l,
|
|
1497
|
+
(c || 1) * (e ? 1 : o)
|
|
1498
1498
|
);
|
|
1499
1499
|
}), t.score = s;
|
|
1500
1500
|
});
|
|
@@ -1504,40 +1504,40 @@ function Nn(i, e) {
|
|
|
1504
1504
|
e.matches = [], xe(t) && t.forEach((s) => {
|
|
1505
1505
|
if (!xe(s.indices) || !s.indices.length)
|
|
1506
1506
|
return;
|
|
1507
|
-
const { indices:
|
|
1508
|
-
let
|
|
1509
|
-
indices:
|
|
1510
|
-
value:
|
|
1507
|
+
const { indices: r, value: o } = s;
|
|
1508
|
+
let l = {
|
|
1509
|
+
indices: r,
|
|
1510
|
+
value: o
|
|
1511
1511
|
};
|
|
1512
|
-
s.key && (
|
|
1512
|
+
s.key && (l.key = s.key.src), s.idx > -1 && (l.refIndex = s.idx), e.matches.push(l);
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
1515
1515
|
function jn(i, e) {
|
|
1516
1516
|
e.score = i.score;
|
|
1517
1517
|
}
|
|
1518
1518
|
function Hn(i, e, {
|
|
1519
|
-
includeMatches: t =
|
|
1520
|
-
includeScore: s =
|
|
1519
|
+
includeMatches: t = D.includeMatches,
|
|
1520
|
+
includeScore: s = D.includeScore
|
|
1521
1521
|
} = {}) {
|
|
1522
|
-
const
|
|
1523
|
-
return t &&
|
|
1524
|
-
const { idx:
|
|
1525
|
-
item: e[
|
|
1526
|
-
refIndex:
|
|
1522
|
+
const r = [];
|
|
1523
|
+
return t && r.push(Nn), s && r.push(jn), i.map((o) => {
|
|
1524
|
+
const { idx: l } = o, c = {
|
|
1525
|
+
item: e[l],
|
|
1526
|
+
refIndex: l
|
|
1527
1527
|
};
|
|
1528
|
-
return
|
|
1529
|
-
u(
|
|
1530
|
-
}),
|
|
1528
|
+
return r.length && r.forEach((u) => {
|
|
1529
|
+
u(o, c);
|
|
1530
|
+
}), c;
|
|
1531
1531
|
});
|
|
1532
1532
|
}
|
|
1533
|
-
class
|
|
1533
|
+
class st {
|
|
1534
1534
|
constructor(e, t = {}, s) {
|
|
1535
|
-
this.options = { ...
|
|
1535
|
+
this.options = { ...D, ...t }, this.options.useExtendedSearch, this._keyStore = new cn(this.options.keys), this.setCollection(e, s);
|
|
1536
1536
|
}
|
|
1537
1537
|
setCollection(e, t) {
|
|
1538
|
-
if (this._docs = e, t && !(t instanceof
|
|
1538
|
+
if (this._docs = e, t && !(t instanceof Ss))
|
|
1539
1539
|
throw new Error(nn);
|
|
1540
|
-
this._myIndex = t ||
|
|
1540
|
+
this._myIndex = t || Si(this.options.keys, this._docs, {
|
|
1541
1541
|
getFn: this.options.getFn,
|
|
1542
1542
|
fieldNormWeight: this.options.fieldNormWeight
|
|
1543
1543
|
});
|
|
@@ -1547,9 +1547,9 @@ class tt {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
remove(e = () => !1) {
|
|
1549
1549
|
const t = [];
|
|
1550
|
-
for (let s = 0,
|
|
1551
|
-
const
|
|
1552
|
-
e(
|
|
1550
|
+
for (let s = 0, r = this._docs.length; s < r; s += 1) {
|
|
1551
|
+
const o = this._docs[s];
|
|
1552
|
+
e(o, s) && (this.removeAt(s), s -= 1, r -= 1, t.push(o));
|
|
1553
1553
|
}
|
|
1554
1554
|
return t;
|
|
1555
1555
|
}
|
|
@@ -1562,172 +1562,172 @@ class tt {
|
|
|
1562
1562
|
search(e, { limit: t = -1 } = {}) {
|
|
1563
1563
|
const {
|
|
1564
1564
|
includeMatches: s,
|
|
1565
|
-
includeScore:
|
|
1566
|
-
shouldSort:
|
|
1567
|
-
sortFn:
|
|
1568
|
-
ignoreFieldNorm:
|
|
1565
|
+
includeScore: r,
|
|
1566
|
+
shouldSort: o,
|
|
1567
|
+
sortFn: l,
|
|
1568
|
+
ignoreFieldNorm: c
|
|
1569
1569
|
} = this.options;
|
|
1570
|
-
let u =
|
|
1571
|
-
return In(u, { ignoreFieldNorm:
|
|
1570
|
+
let u = De(e) ? De(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
1571
|
+
return In(u, { ignoreFieldNorm: c }), o && u.sort(l), wi(t) && t > -1 && (u = u.slice(0, t)), Hn(u, this._docs, {
|
|
1572
1572
|
includeMatches: s,
|
|
1573
|
-
includeScore:
|
|
1573
|
+
includeScore: r
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
1576
|
_searchStringList(e) {
|
|
1577
|
-
const t =
|
|
1578
|
-
return s.forEach(({ v:
|
|
1579
|
-
if (!xe(
|
|
1577
|
+
const t = xs(e, this.options), { records: s } = this._myIndex, r = [];
|
|
1578
|
+
return s.forEach(({ v: o, i: l, n: c }) => {
|
|
1579
|
+
if (!xe(o))
|
|
1580
1580
|
return;
|
|
1581
|
-
const { isMatch: u, score: d, indices: m } = t.searchIn(
|
|
1582
|
-
u &&
|
|
1583
|
-
item:
|
|
1584
|
-
idx:
|
|
1585
|
-
matches: [{ score: d, value:
|
|
1581
|
+
const { isMatch: u, score: d, indices: m } = t.searchIn(o);
|
|
1582
|
+
u && r.push({
|
|
1583
|
+
item: o,
|
|
1584
|
+
idx: l,
|
|
1585
|
+
matches: [{ score: d, value: o, norm: c, indices: m }]
|
|
1586
1586
|
});
|
|
1587
|
-
}),
|
|
1587
|
+
}), r;
|
|
1588
1588
|
}
|
|
1589
1589
|
_searchLogical(e) {
|
|
1590
|
-
const t =
|
|
1591
|
-
if (!
|
|
1592
|
-
const { keyId: v, searcher: $ } =
|
|
1590
|
+
const t = Li(e, this.options), s = (c, u, d) => {
|
|
1591
|
+
if (!c.children) {
|
|
1592
|
+
const { keyId: v, searcher: $ } = c, E = this._findMatches({
|
|
1593
1593
|
key: this._keyStore.get(v),
|
|
1594
1594
|
value: this._myIndex.getValueForItemAtKeyId(u, v),
|
|
1595
1595
|
searcher: $
|
|
1596
1596
|
});
|
|
1597
|
-
return
|
|
1597
|
+
return E && E.length ? [
|
|
1598
1598
|
{
|
|
1599
1599
|
idx: d,
|
|
1600
1600
|
item: u,
|
|
1601
|
-
matches:
|
|
1601
|
+
matches: E
|
|
1602
1602
|
}
|
|
1603
1603
|
] : [];
|
|
1604
1604
|
}
|
|
1605
1605
|
const m = [];
|
|
1606
|
-
for (let v = 0, $ =
|
|
1607
|
-
const
|
|
1606
|
+
for (let v = 0, $ = c.children.length; v < $; v += 1) {
|
|
1607
|
+
const E = c.children[v], j = s(E, u, d);
|
|
1608
1608
|
if (j.length)
|
|
1609
1609
|
m.push(...j);
|
|
1610
|
-
else if (
|
|
1610
|
+
else if (c.operator === Lt.AND)
|
|
1611
1611
|
return [];
|
|
1612
1612
|
}
|
|
1613
1613
|
return m;
|
|
1614
|
-
},
|
|
1615
|
-
return
|
|
1616
|
-
if (xe(
|
|
1617
|
-
let d = s(t,
|
|
1618
|
-
d.length && (
|
|
1619
|
-
|
|
1614
|
+
}, r = this._myIndex.records, o = {}, l = [];
|
|
1615
|
+
return r.forEach(({ $: c, i: u }) => {
|
|
1616
|
+
if (xe(c)) {
|
|
1617
|
+
let d = s(t, c, u);
|
|
1618
|
+
d.length && (o[u] || (o[u] = { idx: u, item: c, matches: [] }, l.push(o[u])), d.forEach(({ matches: m }) => {
|
|
1619
|
+
o[u].matches.push(...m);
|
|
1620
1620
|
}));
|
|
1621
1621
|
}
|
|
1622
|
-
}),
|
|
1622
|
+
}), l;
|
|
1623
1623
|
}
|
|
1624
1624
|
_searchObjectList(e) {
|
|
1625
|
-
const t =
|
|
1626
|
-
return
|
|
1627
|
-
if (!xe(
|
|
1625
|
+
const t = xs(e, this.options), { keys: s, records: r } = this._myIndex, o = [];
|
|
1626
|
+
return r.forEach(({ $: l, i: c }) => {
|
|
1627
|
+
if (!xe(l))
|
|
1628
1628
|
return;
|
|
1629
1629
|
let u = [];
|
|
1630
1630
|
s.forEach((d, m) => {
|
|
1631
1631
|
u.push(
|
|
1632
1632
|
...this._findMatches({
|
|
1633
1633
|
key: d,
|
|
1634
|
-
value:
|
|
1634
|
+
value: l[m],
|
|
1635
1635
|
searcher: t
|
|
1636
1636
|
})
|
|
1637
1637
|
);
|
|
1638
|
-
}), u.length &&
|
|
1639
|
-
idx:
|
|
1640
|
-
item:
|
|
1638
|
+
}), u.length && o.push({
|
|
1639
|
+
idx: c,
|
|
1640
|
+
item: l,
|
|
1641
1641
|
matches: u
|
|
1642
1642
|
});
|
|
1643
|
-
}),
|
|
1643
|
+
}), o;
|
|
1644
1644
|
}
|
|
1645
1645
|
_findMatches({ key: e, value: t, searcher: s }) {
|
|
1646
1646
|
if (!xe(t))
|
|
1647
1647
|
return [];
|
|
1648
|
-
let
|
|
1648
|
+
let r = [];
|
|
1649
1649
|
if (Re(t))
|
|
1650
|
-
t.forEach(({ v:
|
|
1651
|
-
if (!xe(
|
|
1650
|
+
t.forEach(({ v: o, i: l, n: c }) => {
|
|
1651
|
+
if (!xe(o))
|
|
1652
1652
|
return;
|
|
1653
|
-
const { isMatch: u, score: d, indices: m } = s.searchIn(
|
|
1654
|
-
u &&
|
|
1653
|
+
const { isMatch: u, score: d, indices: m } = s.searchIn(o);
|
|
1654
|
+
u && r.push({
|
|
1655
1655
|
score: d,
|
|
1656
1656
|
key: e,
|
|
1657
|
-
value:
|
|
1658
|
-
idx:
|
|
1659
|
-
norm:
|
|
1657
|
+
value: o,
|
|
1658
|
+
idx: l,
|
|
1659
|
+
norm: c,
|
|
1660
1660
|
indices: m
|
|
1661
1661
|
});
|
|
1662
1662
|
});
|
|
1663
1663
|
else {
|
|
1664
|
-
const { v:
|
|
1665
|
-
|
|
1664
|
+
const { v: o, n: l } = t, { isMatch: c, score: u, indices: d } = s.searchIn(o);
|
|
1665
|
+
c && r.push({ score: u, key: e, value: o, norm: l, indices: d });
|
|
1666
1666
|
}
|
|
1667
|
-
return
|
|
1667
|
+
return r;
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
Tn
|
|
1670
|
+
st.version = "6.6.2";
|
|
1671
|
+
st.createIndex = Si;
|
|
1672
|
+
st.parseIndex = yn;
|
|
1673
|
+
st.config = D;
|
|
1674
|
+
st.parseQuery = Li;
|
|
1675
|
+
Dn(Tn);
|
|
1676
1676
|
var at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1677
|
-
function
|
|
1677
|
+
function Ti(i) {
|
|
1678
1678
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
1679
1679
|
}
|
|
1680
|
-
var Un = "Expected a function", gi = 0 / 0, Fn = "[object Symbol]", Bn = /^\s+|\s+$/g, zn = /^[-+]0x[0-9a-f]+$/i, Wn = /^0b[01]+$/i, Vn = /^0o[0-7]+$/i, Yn = parseInt, Kn = typeof at == "object" && at && at.Object === Object && at, qn = typeof self == "object" && self && self.Object === Object && self, Xn = Kn || qn || Function("return this")(),
|
|
1680
|
+
var Un = "Expected a function", gi = 0 / 0, Fn = "[object Symbol]", Bn = /^\s+|\s+$/g, zn = /^[-+]0x[0-9a-f]+$/i, Wn = /^0b[01]+$/i, Vn = /^0o[0-7]+$/i, Yn = parseInt, Kn = typeof at == "object" && at && at.Object === Object && at, qn = typeof self == "object" && self && self.Object === Object && self, Xn = Kn || qn || Function("return this")(), Jn = Object.prototype, Gn = Jn.toString, Zn = Math.max, Qn = Math.min, fs = function() {
|
|
1681
1681
|
return Xn.Date.now();
|
|
1682
1682
|
};
|
|
1683
1683
|
function eo(i, e, t) {
|
|
1684
|
-
var s,
|
|
1684
|
+
var s, r, o, l, c, u, d = 0, m = !1, v = !1, $ = !0;
|
|
1685
1685
|
if (typeof i != "function")
|
|
1686
1686
|
throw new TypeError(Un);
|
|
1687
|
-
e = vi(e) || 0,
|
|
1688
|
-
function
|
|
1689
|
-
var X = s, ie =
|
|
1690
|
-
return s =
|
|
1687
|
+
e = vi(e) || 0, Es(t) && (m = !!t.leading, v = "maxWait" in t, o = v ? Zn(vi(t.maxWait) || 0, e) : o, $ = "trailing" in t ? !!t.trailing : $);
|
|
1688
|
+
function E(F) {
|
|
1689
|
+
var X = s, ie = r;
|
|
1690
|
+
return s = r = void 0, d = F, l = i.apply(ie, X), l;
|
|
1691
1691
|
}
|
|
1692
1692
|
function j(F) {
|
|
1693
|
-
return d = F,
|
|
1693
|
+
return d = F, c = setTimeout(le, e), m ? E(F) : l;
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1695
|
+
function G(F) {
|
|
1696
1696
|
var X = F - u, ie = F - d, z = e - X;
|
|
1697
|
-
return v ? Qn(z,
|
|
1697
|
+
return v ? Qn(z, o - ie) : z;
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function ve(F) {
|
|
1700
1700
|
var X = F - u, ie = F - d;
|
|
1701
|
-
return u === void 0 || X >= e || X < 0 || v && ie >=
|
|
1701
|
+
return u === void 0 || X >= e || X < 0 || v && ie >= o;
|
|
1702
1702
|
}
|
|
1703
1703
|
function le() {
|
|
1704
|
-
var F =
|
|
1705
|
-
if (
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1704
|
+
var F = fs();
|
|
1705
|
+
if (ve(F))
|
|
1706
|
+
return me(F);
|
|
1707
|
+
c = setTimeout(le, G(F));
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1710
|
-
return
|
|
1709
|
+
function me(F) {
|
|
1710
|
+
return c = void 0, $ && s ? E(F) : (s = r = void 0, l);
|
|
1711
1711
|
}
|
|
1712
1712
|
function pe() {
|
|
1713
|
-
|
|
1713
|
+
c !== void 0 && clearTimeout(c), d = 0, s = u = r = c = void 0;
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return
|
|
1715
|
+
function Ee() {
|
|
1716
|
+
return c === void 0 ? l : me(fs());
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1719
|
-
var F =
|
|
1720
|
-
if (s = arguments,
|
|
1721
|
-
if (
|
|
1718
|
+
function ye() {
|
|
1719
|
+
var F = fs(), X = ve(F);
|
|
1720
|
+
if (s = arguments, r = this, u = F, X) {
|
|
1721
|
+
if (c === void 0)
|
|
1722
1722
|
return j(u);
|
|
1723
1723
|
if (v)
|
|
1724
|
-
return
|
|
1724
|
+
return c = setTimeout(le, e), E(u);
|
|
1725
1725
|
}
|
|
1726
|
-
return
|
|
1726
|
+
return c === void 0 && (c = setTimeout(le, e)), l;
|
|
1727
1727
|
}
|
|
1728
|
-
return
|
|
1728
|
+
return ye.cancel = pe, ye.flush = Ee, ye;
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function Es(i) {
|
|
1731
1731
|
var e = typeof i;
|
|
1732
1732
|
return !!i && (e == "object" || e == "function");
|
|
1733
1733
|
}
|
|
@@ -1735,16 +1735,16 @@ function to(i) {
|
|
|
1735
1735
|
return !!i && typeof i == "object";
|
|
1736
1736
|
}
|
|
1737
1737
|
function so(i) {
|
|
1738
|
-
return typeof i == "symbol" || to(i) &&
|
|
1738
|
+
return typeof i == "symbol" || to(i) && Gn.call(i) == Fn;
|
|
1739
1739
|
}
|
|
1740
1740
|
function vi(i) {
|
|
1741
1741
|
if (typeof i == "number")
|
|
1742
1742
|
return i;
|
|
1743
1743
|
if (so(i))
|
|
1744
1744
|
return gi;
|
|
1745
|
-
if (
|
|
1745
|
+
if (Es(i)) {
|
|
1746
1746
|
var e = typeof i.valueOf == "function" ? i.valueOf() : i;
|
|
1747
|
-
i =
|
|
1747
|
+
i = Es(e) ? e + "" : e;
|
|
1748
1748
|
}
|
|
1749
1749
|
if (typeof i != "string")
|
|
1750
1750
|
return i === 0 ? i : +i;
|
|
@@ -1753,319 +1753,319 @@ function vi(i) {
|
|
|
1753
1753
|
return t || Vn.test(i) ? Yn(i.slice(2), t ? 2 : 8) : zn.test(i) ? gi : +i;
|
|
1754
1754
|
}
|
|
1755
1755
|
var io = eo;
|
|
1756
|
-
const ro = /* @__PURE__ */
|
|
1756
|
+
const ro = /* @__PURE__ */ Ti(io);
|
|
1757
1757
|
(() => {
|
|
1758
|
-
var i = Object.defineProperty, e = Math.pow, t = (
|
|
1759
|
-
let
|
|
1760
|
-
return
|
|
1761
|
-
},
|
|
1762
|
-
if (
|
|
1763
|
-
return
|
|
1764
|
-
let f = e(10,
|
|
1765
|
-
return Math.round(
|
|
1766
|
-
}, de = (
|
|
1767
|
-
|
|
1768
|
-
}, Pi = (
|
|
1769
|
-
|
|
1770
|
-
}, Ii = (
|
|
1771
|
-
|
|
1772
|
-
}, Ni = (
|
|
1773
|
-
|
|
1774
|
-
}, ji = (
|
|
1775
|
-
if (!
|
|
1758
|
+
var i = Object.defineProperty, e = Math.pow, t = (n, h, f) => h in n ? i(n, h, { enumerable: !0, configurable: !0, writable: !0, value: f }) : n[h] = f, s = (n, h, f) => (t(n, typeof h != "symbol" ? h + "" : h, f), f), r = (n, h) => ` ${h && h.length > 0 ? h.map((f) => `<link rel="stylesheet" href="${f}" />`).join("") : ""} <style> ${n} </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>`, o = ":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}", l = "pointers-overlap", c = "pointers-min-distance", u = "pointers-max-distance", d = "range-dragging", m = "data", v = "min", $ = "max", E = "step", j = "round", G = "type", ve = "theme", le = "rtl", me = "btt", pe = "disabled", Ee = "keyboard-disabled", ye = "mousewheel-disabled", F = "slider-width", X = "slider-height", ie = "slider-radius", z = "slider-bg", B = "slider-bg-hover", Oe = "slider-bg-fill", Me = "pointer-width", T = "pointer-height", y = "pointer-radius", b = "pointer-bg", k = "pointer-bg-hover", _ = "pointer-bg-focus", P = "pointer-shadow", R = "pointer-shadow-hover", V = "pointer-shadow-focus", se = "pointer-border", Q = "pointer-border-hover", he = "pointer-border-focus", Se = "animate-onclick", ke = "css-links", ue = "vertical", we = "horizontal", Le = (n, h, f, p, x) => {
|
|
1759
|
+
let C = h - n;
|
|
1760
|
+
return C === 0 ? f : (p - f) * (x - n) / C + f;
|
|
1761
|
+
}, ee = (n) => !isNaN(parseFloat(n)) && isFinite(n), K = (n, h) => ee(n) ? Number(n) : h, Ke = (n, h) => h === 0 ? 0 : Math.round(n / h) * h, qe = (n, h = 1 / 0) => {
|
|
1762
|
+
if (h === 1 / 0)
|
|
1763
|
+
return n;
|
|
1764
|
+
let f = e(10, h);
|
|
1765
|
+
return Math.round(n * f) / f;
|
|
1766
|
+
}, de = (n) => n == null ? !1 : typeof n == "boolean" ? n : n.trim().toLowerCase() === "true", Ri = (n, h) => {
|
|
1767
|
+
n.dispatchEvent(new CustomEvent("onPointerClicked", { detail: { $pointer: h } }));
|
|
1768
|
+
}, Pi = (n, h) => {
|
|
1769
|
+
n.dispatchEvent(new CustomEvent("onMouseDown", { detail: { nativeEvent: h } }));
|
|
1770
|
+
}, Ii = (n, h) => {
|
|
1771
|
+
n.dispatchEvent(new CustomEvent("onMouseUp", { detail: { nativeEvent: h } }));
|
|
1772
|
+
}, Ni = (n, h) => {
|
|
1773
|
+
n.dispatchEvent(new CustomEvent("onKeyDown", { detail: { nativeEvent: h } }));
|
|
1774
|
+
}, ji = (n, h) => {
|
|
1775
|
+
if (!h || h.length <= 0)
|
|
1776
1776
|
return;
|
|
1777
|
-
let f =
|
|
1777
|
+
let f = h.map((x) => ee(x) ? K(x, x) : x), p = { values: f || [] };
|
|
1778
1778
|
p.value = f[0], p.value0 = f[0], p.value1 = f[0];
|
|
1779
1779
|
for (let x = 1; x < f.length; x++)
|
|
1780
1780
|
p[`value${x + 1}`] = f[x];
|
|
1781
|
-
|
|
1782
|
-
},
|
|
1783
|
-
let p = 0, x,
|
|
1784
|
-
let ye = p;
|
|
1785
|
-
he !== void 0 && O > he && (O = he), G !== void 0 && O < G && (O = G), p = O;
|
|
1781
|
+
n.dispatchEvent(new CustomEvent("change", { detail: p }));
|
|
1782
|
+
}, Pt = (n, h, f) => {
|
|
1783
|
+
let p = 0, x, C, I, w, A = !1, N = (L, J, ce, ae, re, ne) => {
|
|
1786
1784
|
let be = p;
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
},
|
|
1791
|
-
|
|
1792
|
-
},
|
|
1793
|
-
|
|
1794
|
-
},
|
|
1785
|
+
ce !== void 0 && L > ce && (L = ce), J !== void 0 && L < J && (L = J), p = L;
|
|
1786
|
+
let $e = p;
|
|
1787
|
+
return (ae === ue && ne || ae === we && re) && ($e = 100 - $e), ae === ue ? h.style.top = `${$e}%` : h.style.left = `${$e}%`, be !== p;
|
|
1788
|
+
}, U = (L) => L === h || h.contains(L), S = (L, J, ce, ae) => {
|
|
1789
|
+
x = L, C = J, I = ce, w = ae;
|
|
1790
|
+
}, Y = (L) => {
|
|
1791
|
+
A = L, h.classList.toggle("disabled", A), A ? h.setAttribute("aria-disabled", "true") : h.hasAttribute("aria-disabled") && h.removeAttribute("aria-disabled");
|
|
1792
|
+
}, Ae = (L, J) => {
|
|
1793
|
+
J == null ? h.removeAttribute(L) : h.setAttribute(L, J);
|
|
1794
|
+
}, fe = (L) => h.getAttribute(L), O = (L) => {
|
|
1795
1795
|
if (!A) {
|
|
1796
|
-
switch (
|
|
1796
|
+
switch (L.key) {
|
|
1797
1797
|
case "ArrowLeft": {
|
|
1798
|
-
|
|
1798
|
+
L.preventDefault(), typeof x == "function" && x(f);
|
|
1799
1799
|
break;
|
|
1800
1800
|
}
|
|
1801
1801
|
case "ArrowRight": {
|
|
1802
|
-
|
|
1802
|
+
L.preventDefault(), typeof C == "function" && C(f);
|
|
1803
1803
|
break;
|
|
1804
1804
|
}
|
|
1805
1805
|
case "ArrowUp": {
|
|
1806
|
-
|
|
1806
|
+
L.preventDefault(), typeof I == "function" && I(f);
|
|
1807
1807
|
break;
|
|
1808
1808
|
}
|
|
1809
1809
|
case "ArrowDown": {
|
|
1810
|
-
|
|
1810
|
+
L.preventDefault(), typeof w == "function" && w(f);
|
|
1811
1811
|
break;
|
|
1812
1812
|
}
|
|
1813
1813
|
}
|
|
1814
|
-
Ni(
|
|
1814
|
+
Ni(n, L);
|
|
1815
1815
|
}
|
|
1816
1816
|
}, H = () => {
|
|
1817
|
-
A || Ri(
|
|
1817
|
+
A || Ri(n, h);
|
|
1818
1818
|
};
|
|
1819
|
-
return
|
|
1819
|
+
return h.className = `pointer pointer-${f}`, h.addEventListener("keydown", O), h.addEventListener("click", H), { $pointer: h, get percent() {
|
|
1820
1820
|
return p;
|
|
1821
1821
|
}, get disabled() {
|
|
1822
1822
|
return A;
|
|
1823
|
-
}, set disabled(
|
|
1824
|
-
Y(
|
|
1825
|
-
}, updatePosition: N, isClicked: U, setCallbacks:
|
|
1826
|
-
|
|
1823
|
+
}, set disabled(L) {
|
|
1824
|
+
Y(L);
|
|
1825
|
+
}, updatePosition: N, isClicked: U, setCallbacks: S, setAttr: Ae, getAttr: fe, destroy: () => {
|
|
1826
|
+
h.removeEventListener("keydown", O), h.removeEventListener("click", H), h.remove();
|
|
1827
1827
|
} };
|
|
1828
|
-
}, Hi = (
|
|
1829
|
-
if (
|
|
1828
|
+
}, Hi = (n) => {
|
|
1829
|
+
if (n == null)
|
|
1830
1830
|
return;
|
|
1831
|
-
if (Array.isArray(
|
|
1832
|
-
return
|
|
1833
|
-
if (
|
|
1831
|
+
if (Array.isArray(n))
|
|
1832
|
+
return n;
|
|
1833
|
+
if (n.trim() === "")
|
|
1834
1834
|
return;
|
|
1835
|
-
let
|
|
1836
|
-
for (let x = 0; x <
|
|
1837
|
-
let
|
|
1838
|
-
|
|
1835
|
+
let h = n.split(","), f = [], p = !0;
|
|
1836
|
+
for (let x = 0; x < h.length; x++) {
|
|
1837
|
+
let C = h[x].trim();
|
|
1838
|
+
C !== "" && (f.push(C), ee(C) || (p = !1));
|
|
1839
1839
|
}
|
|
1840
1840
|
return p ? f.map((x) => Number(x)) : f;
|
|
1841
|
-
}, Ui = (
|
|
1841
|
+
}, Ui = (n, h) => h ? h.findIndex((f) => f === n || f.toString().trim() === n.toString().trim()) : -1, Fi = (n) => ({ updatePosition: (h, f, p, x) => {
|
|
1842
1842
|
if (f.length <= 0)
|
|
1843
1843
|
return;
|
|
1844
|
-
let
|
|
1845
|
-
|
|
1846
|
-
} }), ks = "--animate-onclick", Bi = "--width", zi = "--height", Wi = "--panel-bg-border-radius", Vi = "--panel-bg", Yi = "--panel-bg-hover", Ki = "--panel-bg-fill", qi = "--pointer-width", Xi = "--pointer-height",
|
|
1844
|
+
let C = f.length === 1, I = f[0], w = f[f.length - 1];
|
|
1845
|
+
h === ue ? (n.style.removeProperty("width"), n.style.removeProperty("right"), n.style.removeProperty("left"), C ? n.style.height = `${I}%` : n.style.height = `${Math.abs(I - w)}%`, x ? (n.style.bottom = "0%", C ? n.style.top = "auto" : n.style.top = `${Math.min(100 - w, 100 - I)}%`) : (n.style.bottom = "auto", C ? n.style.top = "0%" : n.style.top = `${Math.min(I, w)}%`)) : (n.style.removeProperty("height"), n.style.removeProperty("top"), n.style.removeProperty("bottom"), C ? n.style.width = `${I}%` : n.style.width = `${Math.abs(I - w)}%`, p ? (n.style.right = "0%", C ? n.style.left = "auto" : n.style.left = `${Math.min(100 - w, 100 - I)}%`) : (n.style.right = "auto", C ? n.style.left = "0%" : n.style.left = `${Math.min(I, w)}%`));
|
|
1846
|
+
} }), ks = "--animate-onclick", Bi = "--width", zi = "--height", Wi = "--panel-bg-border-radius", Vi = "--panel-bg", Yi = "--panel-bg-hover", Ki = "--panel-bg-fill", qi = "--pointer-width", Xi = "--pointer-height", Ji = "--pointer-border-radius", Gi = "--pointer-bg", Zi = "--pointer-bg-hover", Qi = "--pointer-bg-focus", er = "--pointer-shadow", tr = "--pointer-shadow-hover", sr = "--pointer-shadow-focus", ir = "--pointer-border", rr = "--pointer-border-hover", nr = "--pointer-border-focus", ft = (n, h, f) => {
|
|
1847
1847
|
let p = /* @__PURE__ */ new Map();
|
|
1848
|
-
for (let x of
|
|
1849
|
-
let
|
|
1850
|
-
if (!
|
|
1848
|
+
for (let x of n.attributes) {
|
|
1849
|
+
let C = x.nodeName.trim().toLowerCase();
|
|
1850
|
+
if (!h.test(C))
|
|
1851
1851
|
continue;
|
|
1852
|
-
let I =
|
|
1852
|
+
let I = C.replace(/\D/g, "").trim(), w = I === "" || I === "0" || I === "1" ? 0 : K(I, 0) - 1, A = f && typeof f == "function" ? f(x.value) : x.value;
|
|
1853
1853
|
p.set(w, A);
|
|
1854
1854
|
}
|
|
1855
1855
|
return p;
|
|
1856
|
-
}, or = (
|
|
1857
|
-
if (!
|
|
1856
|
+
}, or = (n) => {
|
|
1857
|
+
if (!n)
|
|
1858
1858
|
return null;
|
|
1859
|
-
let
|
|
1860
|
-
if (!
|
|
1859
|
+
let h = n.getAttribute(ke);
|
|
1860
|
+
if (!h)
|
|
1861
1861
|
return null;
|
|
1862
|
-
let f =
|
|
1862
|
+
let f = h.split(";"), p = [];
|
|
1863
1863
|
for (let x of f)
|
|
1864
1864
|
x.trim() !== "" && p.push(x.trim());
|
|
1865
1865
|
return p;
|
|
1866
|
-
},
|
|
1867
|
-
let p = null, x = [],
|
|
1868
|
-
let
|
|
1869
|
-
for (let
|
|
1870
|
-
|
|
1866
|
+
}, Cs = [[Bi, F, "sliderWidth", null], [zi, X, "sliderHeight", null], [Wi, ie, "sliderRadius", null], [Vi, z, "sliderBg", null], [Yi, B, "sliderBgHover", null], [Ki, Oe, "sliderBgFill", null], [qi, Me, "pointer#Width", /^pointer([0-9]*)-width$/], [Xi, T, "pointer#Height", /^pointer([0-9]*)-height$/], [Ji, y, "pointer#Radius", /^pointer([0-9]*)-radius$/], [Gi, b, "pointer#Bg", /^pointer([0-9]*)-bg$/], [Zi, k, "pointer#BgHover", /^pointer([0-9]*)-bg-hover$/], [Qi, _, "pointer#BgFocus", /^pointer([0-9]*)-bg-focus$/], [er, P, "pointer#Shadow", /^pointer([0-9]*)-shadow$/], [tr, R, "pointer#ShadowHover", /^pointer([0-9]*)-shadow-hover$/], [sr, V, "pointer#ShadowFocus", /^pointer([0-9]*)-shadow-focus$/], [ir, se, "pointer#Border", /^pointer([0-9]*)-border$/], [rr, Q, "pointer#BorderHover", /^pointer([0-9]*)-border-hover$/], [nr, he, "pointer#BorderFocus", /^pointer([0-9]*)-border-focus$/]], lr = (n, h, f) => {
|
|
1867
|
+
let p = null, x = [], C = /* @__PURE__ */ new Map(), I = (O, H = h) => {
|
|
1868
|
+
let L = [...H.classList];
|
|
1869
|
+
for (let J of L)
|
|
1870
|
+
J.startsWith(O) && h.classList.remove(J);
|
|
1871
1871
|
}, w = () => {
|
|
1872
1872
|
I("shape");
|
|
1873
|
-
let
|
|
1874
|
-
for (let H of
|
|
1873
|
+
let O = h.querySelectorAll(".pointer");
|
|
1874
|
+
for (let H of O)
|
|
1875
1875
|
I("shape", H);
|
|
1876
|
-
}, A = (
|
|
1877
|
-
p =
|
|
1876
|
+
}, A = (O) => {
|
|
1877
|
+
p = O, I("theme-"), typeof O == "string" && h.classList.add(`theme-${O}`);
|
|
1878
1878
|
}, N = () => {
|
|
1879
1879
|
if (w(), !(x.length <= 0)) {
|
|
1880
|
-
|
|
1881
|
-
for (let
|
|
1882
|
-
let H = x[
|
|
1880
|
+
h.classList.add("shape", `shape-${x[0]}`);
|
|
1881
|
+
for (let O = 1; O < x.length; O++) {
|
|
1882
|
+
let H = x[O];
|
|
1883
1883
|
if (!H)
|
|
1884
1884
|
continue;
|
|
1885
|
-
let
|
|
1886
|
-
!
|
|
1885
|
+
let L = h.querySelector(`.pointer-${O}`);
|
|
1886
|
+
!L || L.classList.add("shape", `shape-${H}`);
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
}, U = (
|
|
1890
|
-
x[
|
|
1891
|
-
},
|
|
1889
|
+
}, U = (O, H) => {
|
|
1890
|
+
x[O] = H, N();
|
|
1891
|
+
}, S = () => {
|
|
1892
1892
|
w();
|
|
1893
|
-
let
|
|
1894
|
-
if (!(
|
|
1895
|
-
for (let H of
|
|
1896
|
-
let
|
|
1897
|
-
x[
|
|
1893
|
+
let O = ft(n, /^pointer([0-9]*)-shape$/);
|
|
1894
|
+
if (!(O.size <= 0)) {
|
|
1895
|
+
for (let H of O) {
|
|
1896
|
+
let L = H[0];
|
|
1897
|
+
x[L] = H[1];
|
|
1898
1898
|
}
|
|
1899
1899
|
N();
|
|
1900
1900
|
}
|
|
1901
|
-
}, Y = (
|
|
1902
|
-
let
|
|
1903
|
-
if (!
|
|
1901
|
+
}, Y = (O, H) => `${O}-${H}`, Ae = (O, H, L) => {
|
|
1902
|
+
let J = f[L];
|
|
1903
|
+
if (!J)
|
|
1904
1904
|
return;
|
|
1905
|
-
let
|
|
1905
|
+
let ce = L === 0 ? h : J.$pointer;
|
|
1906
1906
|
if (H == null) {
|
|
1907
|
-
|
|
1907
|
+
C.has(Y(O, L)) && C.delete(Y(O, L)), ce.style.removeProperty(O);
|
|
1908
1908
|
return;
|
|
1909
1909
|
}
|
|
1910
|
-
|
|
1911
|
-
}, fe = (
|
|
1910
|
+
C.set(Y(O, L), H), ce.style.setProperty(O, H);
|
|
1911
|
+
}, fe = (O, H) => C.get(Y(O, H));
|
|
1912
1912
|
return (() => {
|
|
1913
|
-
for (let
|
|
1914
|
-
let [H,
|
|
1915
|
-
if (
|
|
1916
|
-
let re = ft(
|
|
1913
|
+
for (let O of Cs) {
|
|
1914
|
+
let [H, L, J, ce] = O;
|
|
1915
|
+
if (ce) {
|
|
1916
|
+
let re = ft(n, ce);
|
|
1917
1917
|
for (let ne of re) {
|
|
1918
|
-
let
|
|
1919
|
-
Ae(H,
|
|
1918
|
+
let be = ne[0], $e = ne[1];
|
|
1919
|
+
Ae(H, $e, be);
|
|
1920
1920
|
}
|
|
1921
1921
|
} else {
|
|
1922
|
-
let re =
|
|
1922
|
+
let re = n.getAttribute(L);
|
|
1923
1923
|
Ae(H, re, 0);
|
|
1924
1924
|
}
|
|
1925
1925
|
let ae = [];
|
|
1926
|
-
if (
|
|
1927
|
-
ae.push([
|
|
1926
|
+
if (J.indexOf("#") === -1)
|
|
1927
|
+
ae.push([J, 0]);
|
|
1928
1928
|
else {
|
|
1929
|
-
ae.push([
|
|
1929
|
+
ae.push([J.replace("#", ""), 0]), ae.push([J.replace("#", "0"), 0]), ae.push([J.replace("#", "1"), 0]);
|
|
1930
1930
|
for (let re = 1; re < f.length; re++)
|
|
1931
|
-
ae.push([
|
|
1931
|
+
ae.push([J.replace("#", (re + 1).toString()), re]);
|
|
1932
1932
|
}
|
|
1933
1933
|
for (let re of ae)
|
|
1934
1934
|
try {
|
|
1935
|
-
let ne = re[0],
|
|
1936
|
-
Object.prototype.hasOwnProperty.call(
|
|
1937
|
-
return fe(H,
|
|
1938
|
-
}, set: (
|
|
1939
|
-
Ae(H,
|
|
1935
|
+
let ne = re[0], be = re[1];
|
|
1936
|
+
Object.prototype.hasOwnProperty.call(n, ne) || Object.defineProperty(n, ne, { get() {
|
|
1937
|
+
return fe(H, be);
|
|
1938
|
+
}, set: ($e) => {
|
|
1939
|
+
Ae(H, $e, be);
|
|
1940
1940
|
} });
|
|
1941
1941
|
} catch (ne) {
|
|
1942
1942
|
console.error(ne);
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
A(
|
|
1945
|
+
A(n.getAttribute(ve)), S();
|
|
1946
1946
|
})(), { setStyle: Ae, getStyle: fe, get theme() {
|
|
1947
1947
|
return p;
|
|
1948
|
-
}, set theme(
|
|
1949
|
-
A(
|
|
1948
|
+
}, set theme(O) {
|
|
1949
|
+
A(O);
|
|
1950
1950
|
}, get pointerShapes() {
|
|
1951
1951
|
return x;
|
|
1952
1952
|
}, setPointerShape: U };
|
|
1953
|
-
}, Xe = "animate-on-click",
|
|
1954
|
-
let x = [],
|
|
1955
|
-
for (let
|
|
1956
|
-
|
|
1953
|
+
}, Xe = "animate-on-click", Os = "range-dragging", ar = (n, h, f, p) => {
|
|
1954
|
+
let x = [], C = (U) => {
|
|
1955
|
+
for (let S of x)
|
|
1956
|
+
S.update && typeof S.update == "function" && S.update(U);
|
|
1957
1957
|
}, I = () => {
|
|
1958
1958
|
for (let U of x)
|
|
1959
1959
|
U.destroy && typeof U.destroy == "function" && U.destroy();
|
|
1960
|
-
}, w = (U,
|
|
1960
|
+
}, w = (U, S) => {
|
|
1961
1961
|
for (let Y of x)
|
|
1962
|
-
Y.onAttrChange && typeof Y.onAttrChange == "function" && Y.onAttrChange(U,
|
|
1962
|
+
Y.onAttrChange && typeof Y.onAttrChange == "function" && Y.onAttrChange(U, S);
|
|
1963
1963
|
}, A = (U) => {
|
|
1964
1964
|
if (U.gettersAndSetters) {
|
|
1965
|
-
for (let
|
|
1966
|
-
if (!(!
|
|
1965
|
+
for (let S of U.gettersAndSetters)
|
|
1966
|
+
if (!(!S.name || !S.attributes))
|
|
1967
1967
|
try {
|
|
1968
|
-
Object.prototype.hasOwnProperty.call(
|
|
1968
|
+
Object.prototype.hasOwnProperty.call(n, S.name) || Object.defineProperty(n, S.name, S.attributes);
|
|
1969
1969
|
} catch (Y) {
|
|
1970
1970
|
console.error("defineSettersGetters error:", Y);
|
|
1971
1971
|
}
|
|
1972
1972
|
}
|
|
1973
1973
|
}, N = (U) => {
|
|
1974
|
-
var
|
|
1974
|
+
var S;
|
|
1975
1975
|
if (!U.css)
|
|
1976
1976
|
return;
|
|
1977
|
-
let Y = (
|
|
1977
|
+
let Y = (S = n.shadowRoot) == null ? void 0 : S.querySelector("style");
|
|
1978
1978
|
!Y || (Y.innerHTML += U.css);
|
|
1979
1979
|
};
|
|
1980
1980
|
return { init: () => {
|
|
1981
1981
|
if (window.tcRangeSliderPlugins)
|
|
1982
1982
|
for (let U of window.tcRangeSliderPlugins) {
|
|
1983
|
-
let
|
|
1984
|
-
x.push(
|
|
1983
|
+
let S = U();
|
|
1984
|
+
x.push(S), S.init && typeof S.init == "function" && (S.init(n, h, f, p), A(S), N(S));
|
|
1985
1985
|
}
|
|
1986
|
-
}, update:
|
|
1987
|
-
},
|
|
1986
|
+
}, update: C, onAttrChange: w, destroy: I };
|
|
1987
|
+
}, hr = 10, cr = (n, h) => {
|
|
1988
1988
|
let f = /* @__PURE__ */ new Map(), p = /^value([0-9]*)$/;
|
|
1989
|
-
for (let w of
|
|
1989
|
+
for (let w of n.attributes) {
|
|
1990
1990
|
let A = w.nodeName.trim().toLowerCase();
|
|
1991
1991
|
if (!p.test(A))
|
|
1992
1992
|
continue;
|
|
1993
|
-
let N = A.replace("value", "").trim(), U = N === "" || N === "0" || N === "1" ? 0 : K(N, 0) - 1,
|
|
1994
|
-
f.set(U,
|
|
1993
|
+
let N = A.replace("value", "").trim(), U = N === "" || N === "0" || N === "1" ? 0 : K(N, 0) - 1, S = ee(w.value) ? K(w.value, 0) : w.value;
|
|
1994
|
+
f.set(U, S);
|
|
1995
1995
|
}
|
|
1996
|
-
let x = Math.max(...Array.from(f.keys())),
|
|
1997
|
-
|
|
1998
|
-
let I =
|
|
1996
|
+
let x = Math.max(...Array.from(f.keys())), C = [];
|
|
1997
|
+
C.push([Pt(n, h, 0), f.get(0)]);
|
|
1998
|
+
let I = h;
|
|
1999
1999
|
for (let w = 1; w <= x; w++) {
|
|
2000
|
-
let A =
|
|
2001
|
-
I.after(A), I = A,
|
|
2000
|
+
let A = h.cloneNode(!0);
|
|
2001
|
+
I.after(A), I = A, C.push([Pt(n, A, w), f.get(w)]);
|
|
2002
2002
|
}
|
|
2003
|
-
return
|
|
2004
|
-
},
|
|
2003
|
+
return C;
|
|
2004
|
+
}, Ls = (n, h, f, p, x, C, I) => {
|
|
2005
2005
|
try {
|
|
2006
|
-
Object.defineProperty(
|
|
2007
|
-
if (!
|
|
2006
|
+
Object.defineProperty(n, p, { configurable: !0, get() {
|
|
2007
|
+
if (!h)
|
|
2008
2008
|
return;
|
|
2009
|
-
let w =
|
|
2009
|
+
let w = h.pointers[f];
|
|
2010
2010
|
if (!w)
|
|
2011
2011
|
return;
|
|
2012
|
-
let A =
|
|
2013
|
-
return
|
|
2012
|
+
let A = h.getTextValue(w.percent);
|
|
2013
|
+
return ee(A) ? K(A, A) : A;
|
|
2014
2014
|
}, set: (w) => {
|
|
2015
|
-
|
|
2016
|
-
} }), Object.defineProperty(
|
|
2015
|
+
h.pointers[f] ? h == null || h.setValue(w, f) : h == null || h.addPointer(w);
|
|
2016
|
+
} }), Object.defineProperty(n, x, { configurable: !0, get() {
|
|
2017
2017
|
var w, A;
|
|
2018
|
-
return (A = (w =
|
|
2018
|
+
return (A = (w = h == null ? void 0 : h.pointers[f]) == null ? void 0 : w.getAttr("aria-label")) != null ? A : void 0;
|
|
2019
2019
|
}, set: (w) => {
|
|
2020
|
-
!
|
|
2021
|
-
} }), Object.defineProperty(
|
|
2020
|
+
!h || h.setAriaLabel(f, w);
|
|
2021
|
+
} }), Object.defineProperty(n, C, { configurable: !0, get() {
|
|
2022
2022
|
var w, A;
|
|
2023
|
-
return (A = (w =
|
|
2023
|
+
return (A = (w = h == null ? void 0 : h.styles) == null ? void 0 : w.pointerShapes[f]) != null ? A : null;
|
|
2024
2024
|
}, set: (w) => {
|
|
2025
|
-
!
|
|
2026
|
-
} }), Object.defineProperty(
|
|
2025
|
+
!h || !h.styles || h.styles.setPointerShape(f, w);
|
|
2026
|
+
} }), Object.defineProperty(n, I, { configurable: !0, get() {
|
|
2027
2027
|
var w;
|
|
2028
|
-
return (w =
|
|
2028
|
+
return (w = h == null ? void 0 : h.pointers[f].disabled) != null ? w : !1;
|
|
2029
2029
|
}, set: (w) => {
|
|
2030
|
-
if (!
|
|
2030
|
+
if (!h)
|
|
2031
2031
|
return;
|
|
2032
|
-
let A =
|
|
2032
|
+
let A = h == null ? void 0 : h.pointers[f];
|
|
2033
2033
|
!A || (A.disabled = w);
|
|
2034
2034
|
} });
|
|
2035
2035
|
} catch (w) {
|
|
2036
2036
|
console.error(w);
|
|
2037
2037
|
}
|
|
2038
|
-
}, ur = (
|
|
2038
|
+
}, ur = (n, h) => {
|
|
2039
2039
|
let f = [["value", "ariaLabel", "pointerShape", "pointerDisabled", 0], ["value0", "ariaLabel0", "pointerShape0", "pointer0Disabled", 0], ["value1", "ariaLabel1", "pointerShape1", "pointer1Disabled", 0]];
|
|
2040
|
-
for (let p = 2; p <
|
|
2040
|
+
for (let p = 2; p < hr; p++)
|
|
2041
2041
|
f.push([`value${p}`, `ariaLabel${p}`, `pointer${p}Shape`, `pointer${p}Disabled`, p - 1]);
|
|
2042
2042
|
for (let p of f)
|
|
2043
|
-
|
|
2044
|
-
},
|
|
2043
|
+
Ls(n, h, p[4], p[0], p[1], p[2], p[3]);
|
|
2044
|
+
}, Ts = (n, h, f) => {
|
|
2045
2045
|
var p;
|
|
2046
2046
|
let x = (p = f.shadowRoot) == null ? void 0 : p.querySelector(".container");
|
|
2047
2047
|
if (x)
|
|
2048
|
-
for (let
|
|
2049
|
-
|
|
2050
|
-
},
|
|
2051
|
-
let p = f.map((a) => a[0]), x = null,
|
|
2052
|
-
ne || (a.preventDefault && a.preventDefault(),
|
|
2048
|
+
for (let C of n)
|
|
2049
|
+
h ? x.prepend(C.$pointer) : x.append(C.$pointer);
|
|
2050
|
+
}, It = 0, it = 100, Je = 2, Ds = "0.3s", dr = (n, h, f) => {
|
|
2051
|
+
let p = f.map((a) => a[0]), x = null, C = null, I = null, w = null, A = It, N = it, U, S, Y = we, Ae = Je, fe = !1, O = !1, H = !1, L = 0, J = 1 / 0, ce = !1, ae, re, ne = !1, be = !1, $e = !1, Ie = Ds, Rs = [], Ps = (a) => {
|
|
2052
|
+
ne || (a.preventDefault && a.preventDefault(), Ue(a), window.addEventListener("mousemove", Ue), window.addEventListener("mouseup", gt), Pi(n, a));
|
|
2053
2053
|
}, gt = (a) => {
|
|
2054
|
-
ne || (ae = void 0, re = void 0, window.removeEventListener("mousemove",
|
|
2054
|
+
ne || (ae = void 0, re = void 0, window.removeEventListener("mousemove", Ue), window.removeEventListener("mouseup", gt), Ie && h.classList.add(Xe), Ii(n, a));
|
|
2055
2055
|
}, gr = (a, g) => {
|
|
2056
2056
|
if (p.length <= 0)
|
|
2057
2057
|
return;
|
|
2058
2058
|
if (p.length === 1)
|
|
2059
|
-
return p[0].isClicked(a) &&
|
|
2060
|
-
let
|
|
2061
|
-
if (
|
|
2062
|
-
let W = g,
|
|
2063
|
-
|
|
2059
|
+
return p[0].isClicked(a) && Ie && h.classList.remove(Xe), p[0];
|
|
2060
|
+
let M = mr(a);
|
|
2061
|
+
if (ce) {
|
|
2062
|
+
let W = g, Ce = mt(W);
|
|
2063
|
+
Ce !== void 0 && (W = Ke(W, Ce)), M ? (ae = W, re = 0, Ie && h.classList.remove(Xe)) : ae !== void 0 && (re = W - ae, ae = W);
|
|
2064
2064
|
}
|
|
2065
|
-
if (!vr(a) && !
|
|
2065
|
+
if (!vr(a) && !M) {
|
|
2066
2066
|
for (let W of p)
|
|
2067
2067
|
if (!(!W.isClicked(a) || W.disabled))
|
|
2068
|
-
return
|
|
2068
|
+
return Ie && h.classList.remove(Xe), W;
|
|
2069
2069
|
for (let W of p)
|
|
2070
2070
|
if (x === W)
|
|
2071
2071
|
return W;
|
|
@@ -2074,127 +2074,127 @@ const ro = /* @__PURE__ */ Di(io);
|
|
|
2074
2074
|
for (let W of p) {
|
|
2075
2075
|
if (W.disabled)
|
|
2076
2076
|
continue;
|
|
2077
|
-
let
|
|
2078
|
-
|
|
2077
|
+
let Ce = Math.abs(g - W.percent);
|
|
2078
|
+
Ce < q && (q = Ce, oe = W);
|
|
2079
2079
|
}
|
|
2080
2080
|
return oe;
|
|
2081
|
-
}, Is = () => p.findIndex((a) => x === a && !a.disabled),
|
|
2081
|
+
}, Is = () => p.findIndex((a) => x === a && !a.disabled), Ue = (a) => {
|
|
2082
2082
|
let g;
|
|
2083
2083
|
if (Y === ue) {
|
|
2084
|
-
let { height: q, top: oe } =
|
|
2084
|
+
let { height: q, top: oe } = h.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientY : a.touches[0].clientY;
|
|
2085
2085
|
g = Math.min(Math.max(0, W - oe), q) * 100 / q;
|
|
2086
2086
|
} else {
|
|
2087
|
-
let { width: q, left: oe } =
|
|
2087
|
+
let { width: q, left: oe } = h.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientX : a.touches[0].clientX;
|
|
2088
2088
|
g = Math.min(Math.max(0, W - oe), q) * 100 / q;
|
|
2089
2089
|
}
|
|
2090
|
-
if ((fe ||
|
|
2091
|
-
let q = p[0], oe = p[p.length - 1], W = q.percent + re < 0,
|
|
2092
|
-
if (W ||
|
|
2090
|
+
if ((fe || O) && (g = 100 - g), x = gr(a.target, g), ce && p.length > 1 && re !== void 0) {
|
|
2091
|
+
let q = p[0], oe = p[p.length - 1], W = q.percent + re < 0, Ce = oe.percent + re > 100;
|
|
2092
|
+
if (W || Ce)
|
|
2093
2093
|
return;
|
|
2094
|
-
for (let
|
|
2095
|
-
|
|
2094
|
+
for (let Et = 0; Et < p.length; Et++)
|
|
2095
|
+
_e(Et, p[Et].percent + re);
|
|
2096
2096
|
return;
|
|
2097
2097
|
}
|
|
2098
|
-
let
|
|
2099
|
-
|
|
2098
|
+
let M = Is();
|
|
2099
|
+
M !== -1 && (_e(M, g), x == null || x.$pointer.focus());
|
|
2100
2100
|
}, vt = (a) => {
|
|
2101
|
-
if (ne || document.activeElement !==
|
|
2101
|
+
if (ne || document.activeElement !== n || x != null && x.disabled)
|
|
2102
2102
|
return;
|
|
2103
2103
|
a.stopPropagation(), a.preventDefault();
|
|
2104
|
-
let g = a.deltaY < 0,
|
|
2105
|
-
oe !== -1 && (q ?
|
|
2104
|
+
let g = a.deltaY < 0, M = fe || O, q = g ? !M : M, oe = Is();
|
|
2105
|
+
oe !== -1 && (q ? rt(oe, p[oe].percent) : nt(oe, p[oe].percent));
|
|
2106
2106
|
}, Ns = (a) => {
|
|
2107
|
-
ne ||
|
|
2107
|
+
ne || be || (Y === ue ? O ? _e(a, 100) : _e(a, 0) : fe ? nt(a, p[a].percent) : rt(a, p[a].percent));
|
|
2108
2108
|
}, js = (a) => {
|
|
2109
|
-
ne ||
|
|
2109
|
+
ne || be || (Y === ue ? O ? _e(a, 0) : _e(a, 100) : fe ? rt(a, p[a].percent) : nt(a, p[a].percent));
|
|
2110
2110
|
}, Hs = (a) => {
|
|
2111
|
-
ne ||
|
|
2111
|
+
ne || be || (Y === ue ? O ? nt(a, p[a].percent) : rt(a, p[a].percent) : fe ? _e(a, 100) : _e(a, 0));
|
|
2112
2112
|
}, Us = (a) => {
|
|
2113
|
-
ne ||
|
|
2114
|
-
}, vr = (a) => a.classList.contains("panel"), mr = (a) => a.classList.contains("panel-fill"),
|
|
2113
|
+
ne || be || (Y === ue ? O ? rt(a, p[a].percent) : nt(a, p[a].percent) : fe ? _e(a, 0) : _e(a, 100));
|
|
2114
|
+
}, vr = (a) => a.classList.contains("panel"), mr = (a) => a.classList.contains("panel-fill"), rt = (a, g) => {
|
|
2115
2115
|
if (g === void 0)
|
|
2116
2116
|
return;
|
|
2117
|
-
let
|
|
2118
|
-
|
|
2119
|
-
},
|
|
2117
|
+
let M = mt(g);
|
|
2118
|
+
M == null && (M = 1), g -= M, g < 0 && (g = 0), _e(a, g);
|
|
2119
|
+
}, nt = (a, g) => {
|
|
2120
2120
|
if (g === void 0)
|
|
2121
2121
|
return;
|
|
2122
|
-
let
|
|
2123
|
-
|
|
2124
|
-
},
|
|
2125
|
-
!w || w.update({ percents: Fs(), values: Bs(), $pointers: zs(), min: Ws(), max: Vs(), data:
|
|
2122
|
+
let M = mt(g);
|
|
2123
|
+
M == null && (M = 1), g += M, g > 100 && (g = 100), _e(a, g);
|
|
2124
|
+
}, Fe = () => {
|
|
2125
|
+
!w || w.update({ percents: Fs(), values: Bs(), $pointers: zs(), min: Ws(), max: Vs(), data: Ht(), step: jt(), round: Ft(), type: Ut(), textMin: yt(), textMax: bt(), rightToLeft: Wt(), bottomToTop: Vt(), pointersOverlap: Xt(), pointersMinDistance: Bt(), pointersMaxDistance: zt(), rangeDragging: Jt(), disabled: Yt(), keyboardDisabled: Kt(), mousewheelDisabled: qt() });
|
|
2126
2126
|
}, yr = () => {
|
|
2127
|
-
|
|
2127
|
+
Fe();
|
|
2128
2128
|
}, br = (a) => {
|
|
2129
2129
|
if (!(H || p.length <= 1 || N === A))
|
|
2130
2130
|
if (a === 0) {
|
|
2131
|
-
let g =
|
|
2131
|
+
let g = J * 100 / (N - A);
|
|
2132
2132
|
return Math.max(0, p[a + 1].percent - g);
|
|
2133
2133
|
} else {
|
|
2134
|
-
let g =
|
|
2134
|
+
let g = L * 100 / (N - A);
|
|
2135
2135
|
return Math.min(p[a - 1].percent + g, 100);
|
|
2136
2136
|
}
|
|
2137
2137
|
}, $r = (a) => {
|
|
2138
2138
|
if (!(H || p.length <= 1 || N === A))
|
|
2139
2139
|
if (a === p.length - 1) {
|
|
2140
|
-
let g =
|
|
2140
|
+
let g = J * 100 / (N - A);
|
|
2141
2141
|
return Math.min(p[a - 1].percent + g, 100);
|
|
2142
2142
|
} else {
|
|
2143
|
-
let g =
|
|
2143
|
+
let g = L * 100 / (N - A);
|
|
2144
2144
|
return Math.max(0, p[a + 1].percent - g);
|
|
2145
2145
|
}
|
|
2146
2146
|
}, mt = (a) => {
|
|
2147
2147
|
let g;
|
|
2148
2148
|
if (typeof U == "function") {
|
|
2149
|
-
let
|
|
2150
|
-
g = U(
|
|
2149
|
+
let M = Le(0, 100, A, N, a);
|
|
2150
|
+
g = U(M, a);
|
|
2151
2151
|
} else
|
|
2152
2152
|
g = U;
|
|
2153
|
-
if (
|
|
2154
|
-
let
|
|
2155
|
-
return g =
|
|
2153
|
+
if (ee(g)) {
|
|
2154
|
+
let M = N - A;
|
|
2155
|
+
return g = M === 0 ? 0 : g * 100 / M, g;
|
|
2156
2156
|
}
|
|
2157
|
-
},
|
|
2157
|
+
}, Ge = (a) => {
|
|
2158
2158
|
if (a === void 0)
|
|
2159
2159
|
return;
|
|
2160
|
-
let g =
|
|
2161
|
-
return
|
|
2162
|
-
}, yt = () =>
|
|
2160
|
+
let g = Le(0, 100, A, N, a);
|
|
2161
|
+
return S !== void 0 ? S[Math.round(g)] : qe(g, Ae);
|
|
2162
|
+
}, yt = () => S !== void 0 ? S[A] : A, bt = () => S !== void 0 ? S[N] : N, jt = () => U, _r = (a) => {
|
|
2163
2163
|
var g;
|
|
2164
|
-
return a <= 0 || H ? yt() : (g =
|
|
2164
|
+
return a <= 0 || H ? yt() : (g = Ge(p[a - 1].percent)) != null ? g : "";
|
|
2165
2165
|
}, xr = (a) => {
|
|
2166
2166
|
var g;
|
|
2167
|
-
return p.length <= 1 || a >= p.length - 1 || H ? bt() : (g =
|
|
2168
|
-
}, Fs = () => p.map((a) => a.percent), Bs = () => p.map((a) =>
|
|
2167
|
+
return p.length <= 1 || a >= p.length - 1 || H ? bt() : (g = Ge(p[a + 1].percent)) != null ? g : "";
|
|
2168
|
+
}, Fs = () => p.map((a) => a.percent), Bs = () => p.map((a) => Ge(a.percent)), zs = () => p.map((a) => a.$pointer), Ws = () => A, Vs = () => N, Ht = () => S, Ut = () => Y, Ft = () => Ae, Bt = () => L, zt = () => J, wr = (a) => Rs[a], Wt = () => fe, Vt = () => O, Yt = () => ne, Kt = () => be, qt = () => $e, Xt = () => H, Jt = () => ce, _e = (a, g) => {
|
|
2169
2169
|
if (g === void 0)
|
|
2170
2170
|
return;
|
|
2171
|
-
let
|
|
2172
|
-
|
|
2171
|
+
let M = mt(g);
|
|
2172
|
+
M !== void 0 && (g = Ke(g, M));
|
|
2173
2173
|
let q = p[a];
|
|
2174
2174
|
if (!q)
|
|
2175
2175
|
return;
|
|
2176
|
-
let oe = q.updatePosition(g, br(a), $r(a), Y, fe,
|
|
2177
|
-
|
|
2176
|
+
let oe = q.updatePosition(g, br(a), $r(a), Y, fe, O);
|
|
2177
|
+
C == null || C.updatePosition(Y, p.map((W) => W.percent), fe, O), Fe();
|
|
2178
2178
|
for (let W of p) {
|
|
2179
|
-
let
|
|
2180
|
-
|
|
2179
|
+
let Ce = Ge(W.percent);
|
|
2180
|
+
Ce !== void 0 && (W.setAttr("aria-valuenow", Ce.toString()), W.setAttr("aria-valuetext", Ce.toString()));
|
|
2181
2181
|
}
|
|
2182
|
-
|
|
2183
|
-
},
|
|
2182
|
+
Er(), oe && ji(n, p.map((W) => Ge(W.percent)));
|
|
2183
|
+
}, Te = () => {
|
|
2184
2184
|
for (let a = 0; a < p.length; a++)
|
|
2185
|
-
|
|
2185
|
+
_e(a, p[a].percent);
|
|
2186
2186
|
}, Ar = (a, g) => {
|
|
2187
|
-
A =
|
|
2188
|
-
},
|
|
2187
|
+
A = S !== void 0 ? 0 : K(a, It), N = S !== void 0 ? S.length - 1 : K(g, it), $t(A), _t(N);
|
|
2188
|
+
}, Er = () => {
|
|
2189
2189
|
var a, g;
|
|
2190
|
-
for (let
|
|
2191
|
-
let q = p[
|
|
2192
|
-
q.setAttr("aria-valuemin", ((a = _r(
|
|
2190
|
+
for (let M = 0; M < p.length; M++) {
|
|
2191
|
+
let q = p[M];
|
|
2192
|
+
q.setAttr("aria-valuemin", ((a = _r(M)) != null ? a : "").toString()), q.setAttr("aria-valuemax", ((g = xr(M)) != null ? g : "").toString());
|
|
2193
2193
|
}
|
|
2194
2194
|
}, $t = (a) => {
|
|
2195
|
-
A = K(a,
|
|
2195
|
+
A = K(a, It), A > N && (N = A + it), Te();
|
|
2196
2196
|
}, _t = (a) => {
|
|
2197
|
-
N = K(a,
|
|
2197
|
+
N = K(a, it), N < A && (N = A + it), Te();
|
|
2198
2198
|
}, Ys = (a) => {
|
|
2199
2199
|
H = !0;
|
|
2200
2200
|
for (let g = 0; g < a.length; g++)
|
|
@@ -2203,103 +2203,103 @@ const ro = /* @__PURE__ */ Di(io);
|
|
|
2203
2203
|
for (let g = 0; g < a.length; g++)
|
|
2204
2204
|
xt(a[g], g);
|
|
2205
2205
|
}, xt = (a, g) => {
|
|
2206
|
-
let
|
|
2207
|
-
|
|
2208
|
-
let q =
|
|
2209
|
-
|
|
2206
|
+
let M;
|
|
2207
|
+
S !== void 0 ? (M = a == null ? 0 : Ui(a, S), M === -1 && (M = 0)) : (M = K(a, A), M < A && (M = A), M > N && (M = N));
|
|
2208
|
+
let q = Le(A, N, 0, 100, M);
|
|
2209
|
+
_e(g, q);
|
|
2210
2210
|
}, wt = (a) => {
|
|
2211
2211
|
if (a == null) {
|
|
2212
2212
|
U = void 0;
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
2215
2215
|
if (typeof a == "function") {
|
|
2216
|
-
U = a,
|
|
2216
|
+
U = a, Te();
|
|
2217
2217
|
return;
|
|
2218
2218
|
}
|
|
2219
|
-
if (
|
|
2219
|
+
if (ee(a)) {
|
|
2220
2220
|
U = K(a, 1);
|
|
2221
2221
|
let g = Math.abs(N - A);
|
|
2222
|
-
U > g && (U = void 0),
|
|
2222
|
+
U > g && (U = void 0), Te();
|
|
2223
2223
|
return;
|
|
2224
2224
|
}
|
|
2225
2225
|
U = void 0;
|
|
2226
2226
|
}, Gt = (a) => {
|
|
2227
|
-
H = a,
|
|
2228
|
-
}, Jt = (a) => {
|
|
2229
|
-
(!Q(a) || a < 0) && (a = 0), O = a;
|
|
2227
|
+
H = a, Te();
|
|
2230
2228
|
}, Zt = (a) => {
|
|
2231
|
-
(!
|
|
2229
|
+
(!ee(a) || a < 0) && (a = 0), L = a;
|
|
2232
2230
|
}, Qt = (a) => {
|
|
2233
|
-
|
|
2231
|
+
(!ee(a) || a < 0) && (a = 1 / 0), J = a;
|
|
2232
|
+
}, es = (a) => {
|
|
2233
|
+
ne = a, h.classList.toggle("disabled", ne), ne ? h.setAttribute("aria-disabled", "true") : h.hasAttribute("aria-disabled") && h.removeAttribute("aria-disabled");
|
|
2234
2234
|
}, Ks = (a) => {
|
|
2235
|
-
|
|
2235
|
+
be = a;
|
|
2236
2236
|
}, qs = (a) => {
|
|
2237
|
-
|
|
2238
|
-
},
|
|
2237
|
+
$e = a, $e ? document.removeEventListener("wheel", vt) : document.addEventListener("wheel", vt, { passive: !1 });
|
|
2238
|
+
}, ts = (a) => {
|
|
2239
2239
|
if (a == null) {
|
|
2240
|
-
|
|
2240
|
+
S = void 0;
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
|
-
if (
|
|
2244
|
-
|
|
2243
|
+
if (S = Hi(a), S === void 0 || S.length <= 0) {
|
|
2244
|
+
S = void 0;
|
|
2245
2245
|
return;
|
|
2246
2246
|
}
|
|
2247
|
-
$t(0), _t(
|
|
2248
|
-
},
|
|
2247
|
+
$t(0), _t(S.length - 1), U === void 0 && wt(1);
|
|
2248
|
+
}, ss = (a) => {
|
|
2249
2249
|
var g;
|
|
2250
2250
|
typeof a == "string" ? Y = a.trim().toLowerCase() === ue ? ue : we : Y = we;
|
|
2251
|
-
let
|
|
2252
|
-
if (!
|
|
2251
|
+
let M = (g = n.shadowRoot) == null ? void 0 : g.querySelector(".range-slider-box");
|
|
2252
|
+
if (!M)
|
|
2253
2253
|
return;
|
|
2254
|
-
|
|
2254
|
+
M.className = `range-slider-box type-${Y}`, Te();
|
|
2255
2255
|
let q = Y === ue ? "vertical" : "horizontal";
|
|
2256
2256
|
for (let oe of p)
|
|
2257
2257
|
oe.setAttr("aria-orientation", q);
|
|
2258
|
-
}, ss = (a) => {
|
|
2259
|
-
fe = a, p.length > 1 && Ds(p, fe, r), De(), Ue();
|
|
2260
2258
|
}, is = (a) => {
|
|
2261
|
-
|
|
2259
|
+
fe = a, p.length > 1 && Ts(p, fe, n), Te(), Fe();
|
|
2262
2260
|
}, rs = (a) => {
|
|
2263
|
-
|
|
2261
|
+
O = a, p.length > 1 && Ts(p, O, n), Te(), Fe();
|
|
2262
|
+
}, ns = (a) => {
|
|
2263
|
+
Ae = K(a, Je), Ae < 0 && (Ae = Je), Fe();
|
|
2264
2264
|
}, Xs = (a) => {
|
|
2265
|
-
a == null || a.toString().trim().toLowerCase() === "false" ? (
|
|
2266
|
-
},
|
|
2267
|
-
let
|
|
2268
|
-
!
|
|
2265
|
+
a == null || a.toString().trim().toLowerCase() === "false" ? (Ie = void 0, h.style.removeProperty(ks), h.classList.remove(Xe)) : (Ie = a.toString(), h.style.setProperty(ks, Ie), h.classList.add(Xe));
|
|
2266
|
+
}, Js = (a, g) => {
|
|
2267
|
+
let M = p[a];
|
|
2268
|
+
!M || (M.setAttr("aria-label", g), Rs[a] = g);
|
|
2269
2269
|
}, At = (a) => {
|
|
2270
2270
|
if (ae = void 0, p.length <= 1) {
|
|
2271
|
-
|
|
2271
|
+
ce = !1, h.classList.remove(Os);
|
|
2272
2272
|
return;
|
|
2273
2273
|
}
|
|
2274
|
-
|
|
2275
|
-
},
|
|
2276
|
-
|
|
2277
|
-
let a = ft(
|
|
2274
|
+
ce = a, h.classList.toggle(Os, ce);
|
|
2275
|
+
}, Mr = () => {
|
|
2276
|
+
es(de(n.getAttribute(pe))), be = de(n.getAttribute(Ee)), $e = de(n.getAttribute(ye));
|
|
2277
|
+
let a = ft(n, /^pointer([0-9]*)-disabled$/, (g) => de(g));
|
|
2278
2278
|
for (let g of a) {
|
|
2279
|
-
let
|
|
2280
|
-
!p[
|
|
2279
|
+
let M = g[0];
|
|
2280
|
+
!p[M] || (p[M].disabled = g[1]);
|
|
2281
2281
|
}
|
|
2282
|
-
},
|
|
2283
|
-
let a = ft(
|
|
2282
|
+
}, Sr = () => {
|
|
2283
|
+
let a = ft(n, /^aria-label([0-9]*)$/);
|
|
2284
2284
|
for (let g of a) {
|
|
2285
|
-
let
|
|
2286
|
-
|
|
2285
|
+
let M = g[0];
|
|
2286
|
+
Js(M, g[1]);
|
|
2287
2287
|
}
|
|
2288
2288
|
}, kr = (a) => {
|
|
2289
|
-
let g = p.length,
|
|
2290
|
-
|
|
2291
|
-
let oe =
|
|
2292
|
-
return oe.setCallbacks(Ns, js, Hs, Us), p.push(oe), xt(a, g),
|
|
2293
|
-
},
|
|
2289
|
+
let g = p.length, M = p[g - 1].$pointer, q = M.cloneNode(!0);
|
|
2290
|
+
M.after(q);
|
|
2291
|
+
let oe = Pt(n, q, g);
|
|
2292
|
+
return oe.setCallbacks(Ns, js, Hs, Us), p.push(oe), xt(a, g), Te(), Fe(), g;
|
|
2293
|
+
}, Cr = () => {
|
|
2294
2294
|
let a = p.length, g = p[a - 1];
|
|
2295
|
-
return g ? (g.destroy(), p.pop(), p.length <= 1 && At(!1),
|
|
2295
|
+
return g ? (g.destroy(), p.pop(), p.length <= 1 && At(!1), Te(), Fe(), a - 1) : -1;
|
|
2296
2296
|
};
|
|
2297
2297
|
return (() => {
|
|
2298
2298
|
var a, g;
|
|
2299
2299
|
for (let q of p)
|
|
2300
2300
|
q.setCallbacks(Ns, js, Hs, Us);
|
|
2301
|
-
let
|
|
2302
|
-
|
|
2301
|
+
let M = (a = n.shadowRoot) == null ? void 0 : a.querySelector(".panel-fill");
|
|
2302
|
+
M && (C = Fi(M)), ss(n.getAttribute(G)), is(de(n.getAttribute(le))), rs(de(n.getAttribute(me))), Ar(n.getAttribute(v), n.getAttribute($)), wt(n.getAttribute(E)), ts(n.getAttribute(m)), Ys(f.map((q) => q[1])), Gt(de(n.getAttribute(l))), Zt(K(n.getAttribute(c), 0)), Qt(K(n.getAttribute(u), 1 / 0)), At(de(n.getAttribute(d))), ns(K(n.getAttribute(j), Je)), Mr(), Sr(), I = lr(n, h, p), Xs((g = n.getAttribute(Se)) != null ? g : Ds), h.addEventListener("mousedown", Ps), h.addEventListener("mouseup", gt), h.addEventListener("touchmove", Ue), h.addEventListener("touchstart", Ue), $e || document.addEventListener("wheel", vt, { passive: !1 }), w = ar(n, yr, { setValues: Ys, setMin: $t, setMax: _t, setStep: wt, setPointersOverlap: Gt, setPointersMinDistance: Zt, setPointersMaxDistance: Qt, setDisabled: es, setType: ss, setRightToLeft: is, setBottomToTop: rs, setRound: ns, setKeyboardDisabled: Ks, setMousewheelDisabled: qs, setRangeDragging: At, setData: ts }, { getPercents: Fs, getValues: Bs, getPointerElements: zs, getMin: Ws, getMax: Vs, getStep: jt, getData: Ht, getType: Ut, getRound: Ft, getTextMin: yt, getTextMax: bt, isRightToLeft: Wt, isBottomToTop: Vt, isDisabled: Yt, isKeyboardDisabled: Kt, isMousewheelDisabled: qt, isPointersOverlap: Xt, isRangeDraggingEnabled: Jt, getPointersMinDistance: Bt, getPointersMaxDistance: zt }), w.init();
|
|
2303
2303
|
})(), { get pointers() {
|
|
2304
2304
|
return p;
|
|
2305
2305
|
}, get styles() {
|
|
@@ -2311,162 +2311,162 @@ const ro = /* @__PURE__ */ Di(io);
|
|
|
2311
2311
|
}, get max() {
|
|
2312
2312
|
return bt();
|
|
2313
2313
|
}, get step() {
|
|
2314
|
-
return
|
|
2314
|
+
return jt();
|
|
2315
2315
|
}, get pointersOverlap() {
|
|
2316
|
-
return
|
|
2316
|
+
return Xt();
|
|
2317
2317
|
}, set pointersOverlap(a) {
|
|
2318
2318
|
Gt(a);
|
|
2319
2319
|
}, get pointersMinDistance() {
|
|
2320
|
-
return
|
|
2320
|
+
return Bt();
|
|
2321
2321
|
}, set pointersMinDistance(a) {
|
|
2322
|
-
|
|
2322
|
+
Zt(a);
|
|
2323
2323
|
}, get pointersMaxDistance() {
|
|
2324
|
-
return
|
|
2324
|
+
return zt();
|
|
2325
2325
|
}, set pointersMaxDistance(a) {
|
|
2326
|
-
|
|
2326
|
+
Qt(a);
|
|
2327
2327
|
}, get disabled() {
|
|
2328
|
-
return
|
|
2328
|
+
return Yt();
|
|
2329
2329
|
}, set disabled(a) {
|
|
2330
|
-
|
|
2330
|
+
es(a);
|
|
2331
2331
|
}, get data() {
|
|
2332
|
-
return jt();
|
|
2333
|
-
}, get type() {
|
|
2334
2332
|
return Ht();
|
|
2333
|
+
}, get type() {
|
|
2334
|
+
return Ut();
|
|
2335
2335
|
}, set type(a) {
|
|
2336
|
-
|
|
2336
|
+
ss(a);
|
|
2337
2337
|
}, get rightToLeft() {
|
|
2338
|
-
return
|
|
2338
|
+
return Wt();
|
|
2339
2339
|
}, set rightToLeft(a) {
|
|
2340
|
-
|
|
2340
|
+
is(a);
|
|
2341
2341
|
}, get bottomToTop() {
|
|
2342
|
-
return
|
|
2342
|
+
return Vt();
|
|
2343
2343
|
}, set bottomToTop(a) {
|
|
2344
|
-
|
|
2344
|
+
rs(a);
|
|
2345
2345
|
}, get round() {
|
|
2346
|
-
return
|
|
2346
|
+
return Ft();
|
|
2347
2347
|
}, set round(a) {
|
|
2348
|
-
|
|
2348
|
+
ns(a);
|
|
2349
2349
|
}, get animateOnClick() {
|
|
2350
|
-
return
|
|
2350
|
+
return Ie;
|
|
2351
2351
|
}, set animateOnClick(a) {
|
|
2352
2352
|
Xs(a);
|
|
2353
2353
|
}, get keyboardDisabled() {
|
|
2354
|
-
return
|
|
2354
|
+
return Kt();
|
|
2355
2355
|
}, set keyboardDisabled(a) {
|
|
2356
2356
|
Ks(a);
|
|
2357
2357
|
}, get mousewheelDisabled() {
|
|
2358
|
-
return
|
|
2358
|
+
return qt();
|
|
2359
2359
|
}, set mousewheelDisabled(a) {
|
|
2360
2360
|
qs(a);
|
|
2361
2361
|
}, get rangeDragging() {
|
|
2362
|
-
return
|
|
2362
|
+
return Jt();
|
|
2363
2363
|
}, set rangeDragging(a) {
|
|
2364
2364
|
At(a);
|
|
2365
|
-
}, setMin: $t, setMax: _t, setValue: xt, setStep: wt, setData:
|
|
2366
|
-
|
|
2365
|
+
}, setMin: $t, setMax: _t, setValue: xt, setStep: wt, setData: ts, getTextValue: Ge, setAriaLabel: Js, getAriaLabel: wr, addPointer: kr, removePointer: Cr, destroy: () => {
|
|
2366
|
+
h.removeEventListener("mousedown", Ps), h.removeEventListener("mouseup", gt), h.removeEventListener("touchmove", Ue), h.removeEventListener("touchstart", Ue), document.removeEventListener("wheel", vt);
|
|
2367
2367
|
for (let a of p)
|
|
2368
2368
|
a.destroy();
|
|
2369
2369
|
w == null || w.destroy();
|
|
2370
2370
|
} };
|
|
2371
|
-
}, pr = (
|
|
2372
|
-
let p =
|
|
2373
|
-
if (p &&
|
|
2374
|
-
let [w, A, N, U] = p,
|
|
2375
|
-
|
|
2371
|
+
}, pr = (n, h, f) => {
|
|
2372
|
+
let p = Cs.find(([w, A, N, U]) => A.replace("#", "") === h.replace(/\d+/g, ""));
|
|
2373
|
+
if (p && n.styles) {
|
|
2374
|
+
let [w, A, N, U] = p, S = h.replace(/\D/g, "").trim(), Y = S === "" || S === "0" || S === "1" ? 0 : K(S, 0) - 1;
|
|
2375
|
+
n.styles.setStyle(w, f, Y);
|
|
2376
2376
|
return;
|
|
2377
2377
|
}
|
|
2378
|
-
switch (
|
|
2378
|
+
switch (n && n.pluginsManager && n.pluginsManager.onAttrChange(h, f), h) {
|
|
2379
2379
|
case v: {
|
|
2380
|
-
|
|
2380
|
+
n.setMin(f);
|
|
2381
2381
|
break;
|
|
2382
2382
|
}
|
|
2383
2383
|
case $: {
|
|
2384
|
-
|
|
2384
|
+
n.setMax(f);
|
|
2385
2385
|
break;
|
|
2386
2386
|
}
|
|
2387
|
-
case
|
|
2388
|
-
|
|
2387
|
+
case E: {
|
|
2388
|
+
n.setStep(f);
|
|
2389
2389
|
break;
|
|
2390
2390
|
}
|
|
2391
|
-
case
|
|
2392
|
-
|
|
2391
|
+
case l: {
|
|
2392
|
+
n.pointersOverlap = de(f);
|
|
2393
2393
|
break;
|
|
2394
2394
|
}
|
|
2395
|
-
case
|
|
2396
|
-
|
|
2395
|
+
case c: {
|
|
2396
|
+
n.pointersMinDistance = K(f, 0);
|
|
2397
2397
|
break;
|
|
2398
2398
|
}
|
|
2399
2399
|
case d: {
|
|
2400
|
-
|
|
2400
|
+
n.rangeDragging = de(f);
|
|
2401
2401
|
break;
|
|
2402
2402
|
}
|
|
2403
2403
|
case u: {
|
|
2404
|
-
|
|
2404
|
+
n.pointersMaxDistance = K(f, 1 / 0);
|
|
2405
2405
|
break;
|
|
2406
2406
|
}
|
|
2407
2407
|
case pe: {
|
|
2408
|
-
|
|
2408
|
+
n.disabled = de(f);
|
|
2409
2409
|
break;
|
|
2410
2410
|
}
|
|
2411
|
-
case
|
|
2412
|
-
|
|
2411
|
+
case Ee: {
|
|
2412
|
+
n.keyboardDisabled = de(f);
|
|
2413
2413
|
break;
|
|
2414
2414
|
}
|
|
2415
|
-
case
|
|
2416
|
-
|
|
2415
|
+
case ye: {
|
|
2416
|
+
n.mousewheelDisabled = de(f);
|
|
2417
2417
|
break;
|
|
2418
2418
|
}
|
|
2419
2419
|
case m: {
|
|
2420
|
-
|
|
2420
|
+
n.setData(f);
|
|
2421
2421
|
break;
|
|
2422
2422
|
}
|
|
2423
|
-
case
|
|
2424
|
-
|
|
2423
|
+
case G: {
|
|
2424
|
+
n.type = f;
|
|
2425
2425
|
break;
|
|
2426
2426
|
}
|
|
2427
2427
|
case le: {
|
|
2428
|
-
|
|
2428
|
+
n.rightToLeft = de(f);
|
|
2429
2429
|
break;
|
|
2430
2430
|
}
|
|
2431
|
-
case
|
|
2432
|
-
|
|
2431
|
+
case me: {
|
|
2432
|
+
n.bottomToTop = de(f);
|
|
2433
2433
|
break;
|
|
2434
2434
|
}
|
|
2435
2435
|
case j: {
|
|
2436
|
-
|
|
2436
|
+
n.round = K(f, Je);
|
|
2437
2437
|
break;
|
|
2438
2438
|
}
|
|
2439
|
-
case
|
|
2440
|
-
|
|
2439
|
+
case ve: {
|
|
2440
|
+
n.styles && (n.styles.theme = f);
|
|
2441
2441
|
break;
|
|
2442
2442
|
}
|
|
2443
|
-
case
|
|
2444
|
-
|
|
2443
|
+
case Se: {
|
|
2444
|
+
n.animateOnClick = f;
|
|
2445
2445
|
break;
|
|
2446
2446
|
}
|
|
2447
2447
|
}
|
|
2448
2448
|
let x = null;
|
|
2449
|
-
if (/^value([0-9]*)$/.test(
|
|
2449
|
+
if (/^value([0-9]*)$/.test(h) && (x = "value"), /^pointer([0-9]*)-disabled$/.test(h) && (x = "pointer-disabled"), /^aria-label([0-9]*)$/.test(h) && (x = "aria-label"), /^pointer([0-9]*)-shape$/.test(h) && (x = "pointer-shape"), !x)
|
|
2450
2450
|
return;
|
|
2451
|
-
let
|
|
2451
|
+
let C = h.replace(/\D/g, "").trim(), I = C === "" || C === "0" || C === "1" ? 0 : K(C, 0) - 1;
|
|
2452
2452
|
switch (x) {
|
|
2453
2453
|
case "value": {
|
|
2454
|
-
|
|
2454
|
+
n.setValue(f, I);
|
|
2455
2455
|
break;
|
|
2456
2456
|
}
|
|
2457
2457
|
case "pointer-disabled": {
|
|
2458
|
-
let w =
|
|
2458
|
+
let w = n == null ? void 0 : n.pointers[I];
|
|
2459
2459
|
if (!w)
|
|
2460
2460
|
return;
|
|
2461
2461
|
w.disabled = de(f);
|
|
2462
2462
|
break;
|
|
2463
2463
|
}
|
|
2464
2464
|
case "aria-label": {
|
|
2465
|
-
|
|
2465
|
+
n.setAriaLabel(I, f);
|
|
2466
2466
|
break;
|
|
2467
2467
|
}
|
|
2468
2468
|
case "pointer-shape": {
|
|
2469
|
-
|
|
2469
|
+
n.styles && n.styles.setPointerShape(I, f);
|
|
2470
2470
|
break;
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
@@ -2474,162 +2474,162 @@ const ro = /* @__PURE__ */ Di(io);
|
|
|
2474
2474
|
constructor() {
|
|
2475
2475
|
super(), s(this, "slider"), s(this, "_externalCSSList", []), s(this, "_observer", null), this.attachShadow({ mode: "open" });
|
|
2476
2476
|
}
|
|
2477
|
-
set step(
|
|
2478
|
-
this.slider && this.slider.setStep(
|
|
2477
|
+
set step(n) {
|
|
2478
|
+
this.slider && this.slider.setStep(n);
|
|
2479
2479
|
}
|
|
2480
2480
|
get step() {
|
|
2481
|
-
var
|
|
2482
|
-
return (
|
|
2481
|
+
var n;
|
|
2482
|
+
return (n = this.slider) == null ? void 0 : n.step;
|
|
2483
2483
|
}
|
|
2484
|
-
set disabled(
|
|
2485
|
-
this.slider && (this.slider.disabled =
|
|
2484
|
+
set disabled(n) {
|
|
2485
|
+
this.slider && (this.slider.disabled = n);
|
|
2486
2486
|
}
|
|
2487
2487
|
get disabled() {
|
|
2488
|
-
var
|
|
2489
|
-
return (
|
|
2488
|
+
var n, h;
|
|
2489
|
+
return (h = (n = this.slider) == null ? void 0 : n.disabled) != null ? h : !1;
|
|
2490
2490
|
}
|
|
2491
|
-
set data(
|
|
2492
|
-
var
|
|
2493
|
-
(
|
|
2491
|
+
set data(n) {
|
|
2492
|
+
var h;
|
|
2493
|
+
(h = this.slider) == null || h.setData(n);
|
|
2494
2494
|
}
|
|
2495
2495
|
get data() {
|
|
2496
|
-
var
|
|
2497
|
-
return (
|
|
2496
|
+
var n;
|
|
2497
|
+
return (n = this.slider) == null ? void 0 : n.data;
|
|
2498
2498
|
}
|
|
2499
|
-
set min(
|
|
2500
|
-
var
|
|
2501
|
-
(
|
|
2499
|
+
set min(n) {
|
|
2500
|
+
var h;
|
|
2501
|
+
(h = this.slider) == null || h.setMin(n);
|
|
2502
2502
|
}
|
|
2503
2503
|
get min() {
|
|
2504
|
-
var
|
|
2505
|
-
return (
|
|
2504
|
+
var n;
|
|
2505
|
+
return (n = this.slider) == null ? void 0 : n.min;
|
|
2506
2506
|
}
|
|
2507
|
-
set max(
|
|
2508
|
-
var
|
|
2509
|
-
(
|
|
2507
|
+
set max(n) {
|
|
2508
|
+
var h;
|
|
2509
|
+
(h = this.slider) == null || h.setMax(n);
|
|
2510
2510
|
}
|
|
2511
2511
|
get max() {
|
|
2512
|
-
var
|
|
2513
|
-
return (
|
|
2512
|
+
var n;
|
|
2513
|
+
return (n = this.slider) == null ? void 0 : n.max;
|
|
2514
2514
|
}
|
|
2515
|
-
set round(
|
|
2516
|
-
!this.slider || (this.slider.round =
|
|
2515
|
+
set round(n) {
|
|
2516
|
+
!this.slider || (this.slider.round = n);
|
|
2517
2517
|
}
|
|
2518
2518
|
get round() {
|
|
2519
|
-
var
|
|
2520
|
-
return (
|
|
2519
|
+
var n, h;
|
|
2520
|
+
return (h = (n = this.slider) == null ? void 0 : n.round) != null ? h : Je;
|
|
2521
2521
|
}
|
|
2522
|
-
set type(
|
|
2523
|
-
!this.slider || (this.slider.type =
|
|
2522
|
+
set type(n) {
|
|
2523
|
+
!this.slider || (this.slider.type = n ?? we);
|
|
2524
2524
|
}
|
|
2525
2525
|
get type() {
|
|
2526
|
-
var
|
|
2527
|
-
return ((
|
|
2526
|
+
var n;
|
|
2527
|
+
return ((n = this.slider) == null ? void 0 : n.type) || we;
|
|
2528
2528
|
}
|
|
2529
|
-
set pointersOverlap(
|
|
2530
|
-
!this.slider || (this.slider.pointersOverlap =
|
|
2529
|
+
set pointersOverlap(n) {
|
|
2530
|
+
!this.slider || (this.slider.pointersOverlap = n);
|
|
2531
2531
|
}
|
|
2532
2532
|
get pointersOverlap() {
|
|
2533
|
-
var
|
|
2534
|
-
return (
|
|
2533
|
+
var n, h;
|
|
2534
|
+
return (h = (n = this.slider) == null ? void 0 : n.pointersOverlap) != null ? h : !1;
|
|
2535
2535
|
}
|
|
2536
|
-
set pointersMinDistance(
|
|
2537
|
-
!this.slider || (this.slider.pointersMinDistance =
|
|
2536
|
+
set pointersMinDistance(n) {
|
|
2537
|
+
!this.slider || (this.slider.pointersMinDistance = n);
|
|
2538
2538
|
}
|
|
2539
2539
|
get pointersMinDistance() {
|
|
2540
|
-
var
|
|
2541
|
-
return (
|
|
2540
|
+
var n, h;
|
|
2541
|
+
return (h = (n = this.slider) == null ? void 0 : n.pointersMinDistance) != null ? h : 0;
|
|
2542
2542
|
}
|
|
2543
|
-
set pointersMaxDistance(
|
|
2544
|
-
!this.slider || (this.slider.pointersMaxDistance =
|
|
2543
|
+
set pointersMaxDistance(n) {
|
|
2544
|
+
!this.slider || (this.slider.pointersMaxDistance = n);
|
|
2545
2545
|
}
|
|
2546
2546
|
get pointersMaxDistance() {
|
|
2547
|
-
var
|
|
2548
|
-
return (
|
|
2547
|
+
var n, h;
|
|
2548
|
+
return (h = (n = this.slider) == null ? void 0 : n.pointersMaxDistance) != null ? h : 1 / 0;
|
|
2549
2549
|
}
|
|
2550
|
-
set theme(
|
|
2551
|
-
!this.slider || !this.slider.styles || (this.slider.styles.theme =
|
|
2550
|
+
set theme(n) {
|
|
2551
|
+
!this.slider || !this.slider.styles || (this.slider.styles.theme = n);
|
|
2552
2552
|
}
|
|
2553
2553
|
get theme() {
|
|
2554
|
-
var
|
|
2555
|
-
return (f = (
|
|
2554
|
+
var n, h, f;
|
|
2555
|
+
return (f = (h = (n = this.slider) == null ? void 0 : n.styles) == null ? void 0 : h.theme) != null ? f : null;
|
|
2556
2556
|
}
|
|
2557
|
-
set rtl(
|
|
2558
|
-
!this.slider || (this.slider.rightToLeft =
|
|
2557
|
+
set rtl(n) {
|
|
2558
|
+
!this.slider || (this.slider.rightToLeft = n);
|
|
2559
2559
|
}
|
|
2560
2560
|
get rtl() {
|
|
2561
|
-
var
|
|
2562
|
-
return (
|
|
2561
|
+
var n, h;
|
|
2562
|
+
return (h = (n = this.slider) == null ? void 0 : n.rightToLeft) != null ? h : !1;
|
|
2563
2563
|
}
|
|
2564
|
-
set btt(
|
|
2565
|
-
!this.slider || (this.slider.bottomToTop =
|
|
2564
|
+
set btt(n) {
|
|
2565
|
+
!this.slider || (this.slider.bottomToTop = n);
|
|
2566
2566
|
}
|
|
2567
2567
|
get btt() {
|
|
2568
|
-
var
|
|
2569
|
-
return (
|
|
2568
|
+
var n, h;
|
|
2569
|
+
return (h = (n = this.slider) == null ? void 0 : n.bottomToTop) != null ? h : !1;
|
|
2570
2570
|
}
|
|
2571
|
-
set keyboardDisabled(
|
|
2572
|
-
!this.slider || (this.slider.keyboardDisabled =
|
|
2571
|
+
set keyboardDisabled(n) {
|
|
2572
|
+
!this.slider || (this.slider.keyboardDisabled = n);
|
|
2573
2573
|
}
|
|
2574
2574
|
get keyboardDisabled() {
|
|
2575
|
-
var
|
|
2576
|
-
return (
|
|
2575
|
+
var n, h;
|
|
2576
|
+
return (h = (n = this.slider) == null ? void 0 : n.keyboardDisabled) != null ? h : !1;
|
|
2577
2577
|
}
|
|
2578
|
-
set mousewheelDisabled(
|
|
2579
|
-
!this.slider || (this.slider.mousewheelDisabled =
|
|
2578
|
+
set mousewheelDisabled(n) {
|
|
2579
|
+
!this.slider || (this.slider.mousewheelDisabled = n);
|
|
2580
2580
|
}
|
|
2581
2581
|
get mousewheelDisabled() {
|
|
2582
|
-
var
|
|
2583
|
-
return (
|
|
2582
|
+
var n, h;
|
|
2583
|
+
return (h = (n = this.slider) == null ? void 0 : n.mousewheelDisabled) != null ? h : !1;
|
|
2584
2584
|
}
|
|
2585
|
-
set animateOnClick(
|
|
2586
|
-
!this.slider || (this.slider.animateOnClick =
|
|
2585
|
+
set animateOnClick(n) {
|
|
2586
|
+
!this.slider || (this.slider.animateOnClick = n);
|
|
2587
2587
|
}
|
|
2588
2588
|
get animateOnClick() {
|
|
2589
|
-
var
|
|
2590
|
-
return (
|
|
2589
|
+
var n;
|
|
2590
|
+
return (n = this.slider) == null ? void 0 : n.animateOnClick;
|
|
2591
2591
|
}
|
|
2592
2592
|
get rangeDragging() {
|
|
2593
|
-
var
|
|
2594
|
-
return (
|
|
2593
|
+
var n, h;
|
|
2594
|
+
return (h = (n = this.slider) == null ? void 0 : n.rangeDragging) != null ? h : !1;
|
|
2595
2595
|
}
|
|
2596
|
-
set rangeDragging(
|
|
2597
|
-
this.slider && (this.slider.rangeDragging = de(
|
|
2596
|
+
set rangeDragging(n) {
|
|
2597
|
+
this.slider && (this.slider.rangeDragging = de(n));
|
|
2598
2598
|
}
|
|
2599
2599
|
get externalCSSList() {
|
|
2600
2600
|
return this._externalCSSList;
|
|
2601
2601
|
}
|
|
2602
|
-
addPointer(
|
|
2603
|
-
var
|
|
2602
|
+
addPointer(n) {
|
|
2603
|
+
var h;
|
|
2604
2604
|
if (!this.slider)
|
|
2605
2605
|
return;
|
|
2606
|
-
let f = (
|
|
2607
|
-
|
|
2606
|
+
let f = (h = this.slider) == null ? void 0 : h.addPointer(n);
|
|
2607
|
+
Ls(this, this.slider, f, `value${f + 1}`, `ariaLabel${f + 1}`, `pointerShape${f + 1}`, `pointer${f + 1}Disabled`);
|
|
2608
2608
|
}
|
|
2609
2609
|
removePointer() {
|
|
2610
|
-
var
|
|
2611
|
-
!this.slider || (
|
|
2610
|
+
var n;
|
|
2611
|
+
!this.slider || (n = this.slider) == null || n.removePointer();
|
|
2612
2612
|
}
|
|
2613
|
-
addCSS(
|
|
2613
|
+
addCSS(n) {
|
|
2614
2614
|
if (!this.shadowRoot)
|
|
2615
2615
|
return;
|
|
2616
|
-
let
|
|
2617
|
-
|
|
2616
|
+
let h = document.createElement("style");
|
|
2617
|
+
h.textContent = n, this.shadowRoot.appendChild(h);
|
|
2618
2618
|
}
|
|
2619
2619
|
connectedCallback() {
|
|
2620
|
-
var
|
|
2620
|
+
var n, h;
|
|
2621
2621
|
if (!this.shadowRoot)
|
|
2622
2622
|
return;
|
|
2623
|
-
this._externalCSSList = or(this), this.shadowRoot.innerHTML =
|
|
2624
|
-
let f = (
|
|
2623
|
+
this._externalCSSList = or(this), this.shadowRoot.innerHTML = r(o, this._externalCSSList);
|
|
2624
|
+
let f = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".pointer");
|
|
2625
2625
|
if (!f)
|
|
2626
2626
|
return;
|
|
2627
|
-
let p = (
|
|
2627
|
+
let p = (h = this.shadowRoot) == null ? void 0 : h.getElementById("range-slider");
|
|
2628
2628
|
if (!p)
|
|
2629
2629
|
return;
|
|
2630
|
-
let x =
|
|
2631
|
-
this.slider = dr(this, p, x), ur(this, this.slider), this._observer = new MutationObserver((
|
|
2632
|
-
|
|
2630
|
+
let x = cr(this, f);
|
|
2631
|
+
this.slider = dr(this, p, x), ur(this, this.slider), this._observer = new MutationObserver((C) => {
|
|
2632
|
+
C.forEach((I) => {
|
|
2633
2633
|
var w;
|
|
2634
2634
|
if (!this.slider || I.type !== "attributes")
|
|
2635
2635
|
return;
|
|
@@ -2641,68 +2641,68 @@ const ro = /* @__PURE__ */ Di(io);
|
|
|
2641
2641
|
disconnectedCallback() {
|
|
2642
2642
|
this._observer && this._observer.disconnect(), this.slider && this.slider.destroy();
|
|
2643
2643
|
}
|
|
2644
|
-
},
|
|
2645
|
-
window.tcRangeSlider =
|
|
2644
|
+
}, Nt = fr;
|
|
2645
|
+
window.tcRangeSlider = Nt, customElements.get("toolcool-range-slider") || customElements.define("toolcool-range-slider", Nt), customElements.get("tc-range-slider") || customElements.define("tc-range-slider", class extends Nt {
|
|
2646
2646
|
});
|
|
2647
2647
|
})();
|
|
2648
|
-
var
|
|
2648
|
+
var Di = { exports: {} };
|
|
2649
2649
|
(function(i, e) {
|
|
2650
2650
|
(function(t, s) {
|
|
2651
2651
|
i.exports = s();
|
|
2652
2652
|
})(at, function() {
|
|
2653
|
-
var t = 1e3, s = 6e4,
|
|
2654
|
-
var y = ["th", "st", "nd", "rd"], b =
|
|
2655
|
-
return "[" +
|
|
2656
|
-
} }, pe = function(
|
|
2657
|
-
var k = String(
|
|
2658
|
-
return !k || k.length >= y ?
|
|
2659
|
-
},
|
|
2660
|
-
var y = -
|
|
2653
|
+
var t = 1e3, s = 6e4, r = 36e5, o = "millisecond", l = "second", c = "minute", u = "hour", d = "day", m = "week", v = "month", $ = "quarter", E = "year", j = "date", G = "Invalid Date", ve = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, le = /\[([^\]]+)]|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, me = { 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(T) {
|
|
2654
|
+
var y = ["th", "st", "nd", "rd"], b = T % 100;
|
|
2655
|
+
return "[" + T + (y[(b - 20) % 10] || y[b] || y[0]) + "]";
|
|
2656
|
+
} }, pe = function(T, y, b) {
|
|
2657
|
+
var k = String(T);
|
|
2658
|
+
return !k || k.length >= y ? T : "" + Array(y + 1 - k.length).join(b) + T;
|
|
2659
|
+
}, Ee = { s: pe, z: function(T) {
|
|
2660
|
+
var y = -T.utcOffset(), b = Math.abs(y), k = Math.floor(b / 60), _ = b % 60;
|
|
2661
2661
|
return (y <= 0 ? "+" : "-") + pe(k, 2, "0") + ":" + pe(_, 2, "0");
|
|
2662
|
-
}, m: function
|
|
2662
|
+
}, m: function T(y, b) {
|
|
2663
2663
|
if (y.date() < b.date())
|
|
2664
|
-
return -
|
|
2664
|
+
return -T(b, y);
|
|
2665
2665
|
var k = 12 * (b.year() - y.year()) + (b.month() - y.month()), _ = y.clone().add(k, v), P = b - _ < 0, R = y.clone().add(k + (P ? -1 : 1), v);
|
|
2666
2666
|
return +(-(k + (b - _) / (P ? _ - R : R - _)) || 0);
|
|
2667
|
-
}, a: function(
|
|
2668
|
-
return
|
|
2669
|
-
}, p: function(
|
|
2670
|
-
return { M: v, y:
|
|
2671
|
-
}, u: function(
|
|
2672
|
-
return
|
|
2673
|
-
} },
|
|
2674
|
-
F[
|
|
2675
|
-
var X = function(
|
|
2676
|
-
return
|
|
2677
|
-
}, ie = function
|
|
2667
|
+
}, a: function(T) {
|
|
2668
|
+
return T < 0 ? Math.ceil(T) || 0 : Math.floor(T);
|
|
2669
|
+
}, p: function(T) {
|
|
2670
|
+
return { M: v, y: E, w: m, d, D: j, h: u, m: c, s: l, ms: o, Q: $ }[T] || String(T || "").toLowerCase().replace(/s$/, "");
|
|
2671
|
+
}, u: function(T) {
|
|
2672
|
+
return T === void 0;
|
|
2673
|
+
} }, ye = "en", F = {};
|
|
2674
|
+
F[ye] = me;
|
|
2675
|
+
var X = function(T) {
|
|
2676
|
+
return T instanceof Oe;
|
|
2677
|
+
}, ie = function T(y, b, k) {
|
|
2678
2678
|
var _;
|
|
2679
2679
|
if (!y)
|
|
2680
|
-
return
|
|
2680
|
+
return ye;
|
|
2681
2681
|
if (typeof y == "string") {
|
|
2682
2682
|
var P = y.toLowerCase();
|
|
2683
2683
|
F[P] && (_ = P), b && (F[P] = b, _ = P);
|
|
2684
2684
|
var R = y.split("-");
|
|
2685
2685
|
if (!_ && R.length > 1)
|
|
2686
|
-
return
|
|
2686
|
+
return T(R[0]);
|
|
2687
2687
|
} else {
|
|
2688
2688
|
var V = y.name;
|
|
2689
2689
|
F[V] = y, _ = V;
|
|
2690
2690
|
}
|
|
2691
|
-
return !k && _ && (
|
|
2692
|
-
}, z = function(
|
|
2693
|
-
if (X(
|
|
2694
|
-
return
|
|
2691
|
+
return !k && _ && (ye = _), _ || !k && ye;
|
|
2692
|
+
}, z = function(T, y) {
|
|
2693
|
+
if (X(T))
|
|
2694
|
+
return T.clone();
|
|
2695
2695
|
var b = typeof y == "object" ? y : {};
|
|
2696
|
-
return b.date =
|
|
2697
|
-
}, B =
|
|
2698
|
-
B.l = ie, B.i = X, B.w = function(
|
|
2699
|
-
return z(
|
|
2696
|
+
return b.date = T, b.args = arguments, new Oe(b);
|
|
2697
|
+
}, B = Ee;
|
|
2698
|
+
B.l = ie, B.i = X, B.w = function(T, y) {
|
|
2699
|
+
return z(T, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
|
|
2700
2700
|
};
|
|
2701
|
-
var
|
|
2702
|
-
function
|
|
2701
|
+
var Oe = function() {
|
|
2702
|
+
function T(b) {
|
|
2703
2703
|
this.$L = ie(b.locale, null, !0), this.parse(b);
|
|
2704
2704
|
}
|
|
2705
|
-
var y =
|
|
2705
|
+
var y = T.prototype;
|
|
2706
2706
|
return y.parse = function(b) {
|
|
2707
2707
|
this.$d = function(k) {
|
|
2708
2708
|
var _ = k.date, P = k.utc;
|
|
@@ -2713,7 +2713,7 @@ var Ti = { exports: {} };
|
|
|
2713
2713
|
if (_ instanceof Date)
|
|
2714
2714
|
return new Date(_);
|
|
2715
2715
|
if (typeof _ == "string" && !/Z$/i.test(_)) {
|
|
2716
|
-
var R = _.match(
|
|
2716
|
+
var R = _.match(ve);
|
|
2717
2717
|
if (R) {
|
|
2718
2718
|
var V = R[2] - 1 || 0, se = (R[7] || "0").substring(0, 3);
|
|
2719
2719
|
return P ? new Date(Date.UTC(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se)) : new Date(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se);
|
|
@@ -2727,7 +2727,7 @@ var Ti = { exports: {} };
|
|
|
2727
2727
|
}, y.$utils = function() {
|
|
2728
2728
|
return B;
|
|
2729
2729
|
}, y.isValid = function() {
|
|
2730
|
-
return this.$d.toString() !==
|
|
2730
|
+
return this.$d.toString() !== G;
|
|
2731
2731
|
}, y.isSame = function(b, k) {
|
|
2732
2732
|
var _ = z(b);
|
|
2733
2733
|
return this.startOf(k) <= _ && _ <= this.endOf(k);
|
|
@@ -2742,28 +2742,28 @@ var Ti = { exports: {} };
|
|
|
2742
2742
|
}, y.valueOf = function() {
|
|
2743
2743
|
return this.$d.getTime();
|
|
2744
2744
|
}, y.startOf = function(b, k) {
|
|
2745
|
-
var _ = this, P = !!B.u(k) || k, R = B.p(b), V = function(
|
|
2746
|
-
var K = B.w(_.$u ? Date.UTC(_.$y,
|
|
2745
|
+
var _ = this, P = !!B.u(k) || k, R = B.p(b), V = function(Le, ee) {
|
|
2746
|
+
var K = B.w(_.$u ? Date.UTC(_.$y, ee, Le) : new Date(_.$y, ee, Le), _);
|
|
2747
2747
|
return P ? K : K.endOf(d);
|
|
2748
|
-
}, se = function(
|
|
2749
|
-
return B.w(_.toDate()[
|
|
2750
|
-
},
|
|
2748
|
+
}, se = function(Le, ee) {
|
|
2749
|
+
return B.w(_.toDate()[Le].apply(_.toDate("s"), (P ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ee)), _);
|
|
2750
|
+
}, Q = this.$W, he = this.$M, Se = this.$D, ke = "set" + (this.$u ? "UTC" : "");
|
|
2751
2751
|
switch (R) {
|
|
2752
|
-
case
|
|
2752
|
+
case E:
|
|
2753
2753
|
return P ? V(1, 0) : V(31, 11);
|
|
2754
2754
|
case v:
|
|
2755
|
-
return P ? V(1,
|
|
2755
|
+
return P ? V(1, he) : V(0, he + 1);
|
|
2756
2756
|
case m:
|
|
2757
|
-
var ue = this.$locale().weekStart || 0, we = (
|
|
2758
|
-
return V(P ?
|
|
2757
|
+
var ue = this.$locale().weekStart || 0, we = (Q < ue ? Q + 7 : Q) - ue;
|
|
2758
|
+
return V(P ? Se - we : Se + (6 - we), he);
|
|
2759
2759
|
case d:
|
|
2760
2760
|
case j:
|
|
2761
2761
|
return se(ke + "Hours", 0);
|
|
2762
2762
|
case u:
|
|
2763
2763
|
return se(ke + "Minutes", 1);
|
|
2764
|
-
case
|
|
2764
|
+
case c:
|
|
2765
2765
|
return se(ke + "Seconds", 2);
|
|
2766
|
-
case
|
|
2766
|
+
case l:
|
|
2767
2767
|
return se(ke + "Milliseconds", 3);
|
|
2768
2768
|
default:
|
|
2769
2769
|
return this.clone();
|
|
@@ -2771,10 +2771,10 @@ var Ti = { exports: {} };
|
|
|
2771
2771
|
}, y.endOf = function(b) {
|
|
2772
2772
|
return this.startOf(b, !1);
|
|
2773
2773
|
}, y.$set = function(b, k) {
|
|
2774
|
-
var _, P = B.p(b), R = "set" + (this.$u ? "UTC" : ""), V = (_ = {}, _[d] = R + "Date", _[j] = R + "Date", _[v] = R + "Month", _[
|
|
2775
|
-
if (P === v || P ===
|
|
2776
|
-
var
|
|
2777
|
-
|
|
2774
|
+
var _, P = B.p(b), R = "set" + (this.$u ? "UTC" : ""), V = (_ = {}, _[d] = R + "Date", _[j] = R + "Date", _[v] = R + "Month", _[E] = R + "FullYear", _[u] = R + "Hours", _[c] = R + "Minutes", _[l] = R + "Seconds", _[o] = R + "Milliseconds", _)[P], se = P === d ? this.$D + (k - this.$W) : k;
|
|
2775
|
+
if (P === v || P === E) {
|
|
2776
|
+
var Q = this.clone().set(j, 1);
|
|
2777
|
+
Q.$d[V](se), Q.init(), this.$d = Q.set(j, Math.min(this.$D, Q.daysInMonth())).$d;
|
|
2778
2778
|
} else
|
|
2779
2779
|
V && this.$d[V](se);
|
|
2780
2780
|
return this.init(), this;
|
|
@@ -2785,42 +2785,42 @@ var Ti = { exports: {} };
|
|
|
2785
2785
|
}, y.add = function(b, k) {
|
|
2786
2786
|
var _, P = this;
|
|
2787
2787
|
b = Number(b);
|
|
2788
|
-
var R = B.p(k), V = function(
|
|
2789
|
-
var
|
|
2790
|
-
return B.w(
|
|
2788
|
+
var R = B.p(k), V = function(he) {
|
|
2789
|
+
var Se = z(P);
|
|
2790
|
+
return B.w(Se.date(Se.date() + Math.round(he * b)), P);
|
|
2791
2791
|
};
|
|
2792
2792
|
if (R === v)
|
|
2793
2793
|
return this.set(v, this.$M + b);
|
|
2794
|
-
if (R ===
|
|
2795
|
-
return this.set(
|
|
2794
|
+
if (R === E)
|
|
2795
|
+
return this.set(E, this.$y + b);
|
|
2796
2796
|
if (R === d)
|
|
2797
2797
|
return V(1);
|
|
2798
2798
|
if (R === m)
|
|
2799
2799
|
return V(7);
|
|
2800
|
-
var se = (_ = {}, _[
|
|
2801
|
-
return B.w(
|
|
2800
|
+
var se = (_ = {}, _[c] = s, _[u] = r, _[l] = t, _)[R] || 1, Q = this.$d.getTime() + b * se;
|
|
2801
|
+
return B.w(Q, this);
|
|
2802
2802
|
}, y.subtract = function(b, k) {
|
|
2803
2803
|
return this.add(-1 * b, k);
|
|
2804
2804
|
}, y.format = function(b) {
|
|
2805
2805
|
var k = this, _ = this.$locale();
|
|
2806
2806
|
if (!this.isValid())
|
|
2807
|
-
return _.invalidDate ||
|
|
2808
|
-
var P = b || "YYYY-MM-DDTHH:mm:ssZ", R = B.z(this), V = this.$H, se = this.$m,
|
|
2809
|
-
return
|
|
2810
|
-
}, ue = function(
|
|
2811
|
-
return B.s(V % 12 || 12,
|
|
2812
|
-
}, we = _.meridiem || function(
|
|
2813
|
-
var qe =
|
|
2807
|
+
return _.invalidDate || G;
|
|
2808
|
+
var P = b || "YYYY-MM-DDTHH:mm:ssZ", R = B.z(this), V = this.$H, se = this.$m, Q = this.$M, he = _.weekdays, Se = _.months, ke = function(ee, K, Ke, qe) {
|
|
2809
|
+
return ee && (ee[K] || ee(k, P)) || Ke[K].slice(0, qe);
|
|
2810
|
+
}, ue = function(ee) {
|
|
2811
|
+
return B.s(V % 12 || 12, ee, "0");
|
|
2812
|
+
}, we = _.meridiem || function(ee, K, Ke) {
|
|
2813
|
+
var qe = ee < 12 ? "AM" : "PM";
|
|
2814
2814
|
return Ke ? qe.toLowerCase() : qe;
|
|
2815
|
-
},
|
|
2816
|
-
return P.replace(le, function(
|
|
2817
|
-
return K ||
|
|
2815
|
+
}, Le = { YY: String(this.$y).slice(-2), YYYY: B.s(this.$y, 4, "0"), M: Q + 1, MM: B.s(Q + 1, 2, "0"), MMM: ke(_.monthsShort, Q, Se, 3), MMMM: ke(Se, Q), D: this.$D, DD: B.s(this.$D, 2, "0"), d: String(this.$W), dd: ke(_.weekdaysMin, this.$W, he, 2), ddd: ke(_.weekdaysShort, this.$W, he, 3), dddd: he[this.$W], H: String(V), HH: B.s(V, 2, "0"), h: ue(1), hh: ue(2), a: we(V, se, !0), A: we(V, se, !1), m: String(se), mm: B.s(se, 2, "0"), s: String(this.$s), ss: B.s(this.$s, 2, "0"), SSS: B.s(this.$ms, 3, "0"), Z: R };
|
|
2816
|
+
return P.replace(le, function(ee, K) {
|
|
2817
|
+
return K || Le[ee] || R.replace(":", "");
|
|
2818
2818
|
});
|
|
2819
2819
|
}, y.utcOffset = function() {
|
|
2820
2820
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
2821
2821
|
}, y.diff = function(b, k, _) {
|
|
2822
|
-
var P, R = B.p(k), V = z(b), se = (V.utcOffset() - this.utcOffset()) * s,
|
|
2823
|
-
return
|
|
2822
|
+
var P, R = B.p(k), V = z(b), se = (V.utcOffset() - this.utcOffset()) * s, Q = this - V, he = B.m(this, V);
|
|
2823
|
+
return he = (P = {}, P[E] = he / 12, P[v] = he, P[$] = he / 3, P[m] = (Q - se) / 6048e5, P[d] = (Q - se) / 864e5, P[u] = Q / r, P[c] = Q / s, P[l] = Q / t, P)[R] || Q, _ ? he : B.a(he);
|
|
2824
2824
|
}, y.daysInMonth = function() {
|
|
2825
2825
|
return this.endOf(v).$D;
|
|
2826
2826
|
}, y.$locale = function() {
|
|
@@ -2840,50 +2840,168 @@ var Ti = { exports: {} };
|
|
|
2840
2840
|
return this.$d.toISOString();
|
|
2841
2841
|
}, y.toString = function() {
|
|
2842
2842
|
return this.$d.toUTCString();
|
|
2843
|
-
},
|
|
2844
|
-
}(),
|
|
2845
|
-
return z.prototype =
|
|
2846
|
-
|
|
2847
|
-
return this.$g(y,
|
|
2843
|
+
}, T;
|
|
2844
|
+
}(), Me = Oe.prototype;
|
|
2845
|
+
return z.prototype = Me, [["$ms", o], ["$s", l], ["$m", c], ["$H", u], ["$W", d], ["$M", v], ["$y", E], ["$D", j]].forEach(function(T) {
|
|
2846
|
+
Me[T[1]] = function(y) {
|
|
2847
|
+
return this.$g(y, T[0], T[1]);
|
|
2848
2848
|
};
|
|
2849
|
-
}), z.extend = function(
|
|
2850
|
-
return
|
|
2851
|
-
}, z.locale = ie, z.isDayjs = X, z.unix = function(
|
|
2852
|
-
return z(1e3 *
|
|
2853
|
-
}, z.en = F[
|
|
2849
|
+
}), z.extend = function(T, y) {
|
|
2850
|
+
return T.$i || (T(y, Oe, z), T.$i = !0), z;
|
|
2851
|
+
}, z.locale = ie, z.isDayjs = X, z.unix = function(T) {
|
|
2852
|
+
return z(1e3 * T);
|
|
2853
|
+
}, z.en = F[ye], z.Ls = F, z.p = {}, z;
|
|
2854
2854
|
});
|
|
2855
|
-
})(
|
|
2856
|
-
var no =
|
|
2857
|
-
const
|
|
2858
|
-
|
|
2859
|
-
|
|
2855
|
+
})(Di);
|
|
2856
|
+
var no = Di.exports;
|
|
2857
|
+
const St = /* @__PURE__ */ Ti(no);
|
|
2858
|
+
class oo extends ht {
|
|
2859
|
+
constructor() {
|
|
2860
|
+
super(...arguments), this.templates = {}, this._renderedTemplates = {};
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* Set an alternative binding syntax. Default is {{ <value> }}
|
|
2864
|
+
*
|
|
2865
|
+
* @param {string} startStr start of binding syntax
|
|
2866
|
+
* @param {string} endStr end of binding syntax
|
|
2867
|
+
*/
|
|
2868
|
+
setBindingSyntax(e, t) {
|
|
2869
|
+
this._startExpression = e, this._endExpression = t;
|
|
2870
|
+
const s = this.escapeRegex(this._startExpression), r = this.escapeRegex(this._endExpression);
|
|
2871
|
+
this._expression = new RegExp(
|
|
2872
|
+
`${s}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${r}`,
|
|
2873
|
+
"g"
|
|
2874
|
+
);
|
|
2875
|
+
}
|
|
2876
|
+
/**
|
|
2877
|
+
* Check if a specific template has been provided.
|
|
2878
|
+
*
|
|
2879
|
+
* @param {string} templateName
|
|
2880
|
+
* @returns {boolean}
|
|
2881
|
+
*/
|
|
2882
|
+
hasTemplate(e) {
|
|
2883
|
+
return this.templates && !!this.templates[e];
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* Render a <template> by type and return content to render
|
|
2887
|
+
*
|
|
2888
|
+
* @param templateType type of template (indicated by the data-type attribute)
|
|
2889
|
+
* @param context the data context that should be expanded in template
|
|
2890
|
+
* @param slotName the slot name that will be used to host the new rendered template. set to a unique value if multiple templates of this type will be rendered. default is templateType
|
|
2891
|
+
*/
|
|
2892
|
+
renderTemplate(e, t, s) {
|
|
2893
|
+
if (!this.hasTemplate(e))
|
|
2894
|
+
return null;
|
|
2895
|
+
s = s || e;
|
|
2896
|
+
const r = ge` <slot name=${s}></slot> `, o = { [e]: { ...t } };
|
|
2897
|
+
if (this._renderedTemplates.hasOwnProperty(s)) {
|
|
2898
|
+
const { slot: c } = (
|
|
2899
|
+
// @ts-ignore
|
|
2900
|
+
this._renderedTemplates[s]
|
|
2901
|
+
);
|
|
2902
|
+
this.removeChild(c);
|
|
2903
|
+
}
|
|
2904
|
+
const l = document.createElement("div");
|
|
2905
|
+
return l.slot = s, l.dataset.generated = "template", this._renderTemplate(l, this.templates[e], o), this.appendChild(l), this._renderedTemplates[s] = { context: o, slot: l }, r;
|
|
2906
|
+
}
|
|
2907
|
+
getTemplates() {
|
|
2908
|
+
const e = {};
|
|
2909
|
+
for (let t = 0; t < this.children.length; t++) {
|
|
2910
|
+
const s = this.children[t];
|
|
2911
|
+
if (s.nodeName === "TEMPLATE") {
|
|
2912
|
+
const r = s;
|
|
2913
|
+
r.dataset.type ? e[r.dataset.type] = r : e.default = r, r.templateOrder = t;
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
return e;
|
|
2917
|
+
}
|
|
2918
|
+
_renderTemplate(e, t, s) {
|
|
2919
|
+
let r;
|
|
2920
|
+
if (t.content && t.content.childNodes.length) {
|
|
2921
|
+
const o = t.content.cloneNode(!0);
|
|
2922
|
+
r = this.renderNode(o, e, s);
|
|
2923
|
+
}
|
|
2924
|
+
r && e.appendChild(r);
|
|
2925
|
+
}
|
|
2926
|
+
expandExpressionsAsString(e, t) {
|
|
2927
|
+
return e.replace(this.expression, (s, r) => {
|
|
2928
|
+
const o = this.evalInContext(
|
|
2929
|
+
r || this.trimExpression(s),
|
|
2930
|
+
t
|
|
2931
|
+
);
|
|
2932
|
+
return o ? typeof o == "object" ? JSON.stringify(o) : o.toString() : "";
|
|
2933
|
+
});
|
|
2934
|
+
}
|
|
2935
|
+
get expression() {
|
|
2936
|
+
return this._expression || this.setBindingSyntax("{{", "}}"), this._expression;
|
|
2937
|
+
}
|
|
2938
|
+
escapeRegex(e) {
|
|
2939
|
+
return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
2940
|
+
}
|
|
2941
|
+
evalInContext(e, t) {
|
|
2942
|
+
t = { ...t };
|
|
2943
|
+
const s = new Function("with(this) { return " + e + ";}");
|
|
2944
|
+
let r;
|
|
2945
|
+
try {
|
|
2946
|
+
r = s.call(t);
|
|
2947
|
+
} catch {
|
|
2948
|
+
}
|
|
2949
|
+
return r;
|
|
2950
|
+
}
|
|
2951
|
+
trimExpression(e) {
|
|
2952
|
+
return e = e.trim(), e.startsWith(this._startExpression) && e.endsWith(this._endExpression) && (e = e.substr(
|
|
2953
|
+
this._startExpression.length,
|
|
2954
|
+
e.length - this._startExpression.length - this._endExpression.length
|
|
2955
|
+
), e = e.trim()), e;
|
|
2956
|
+
}
|
|
2957
|
+
renderNode(e, t, s) {
|
|
2958
|
+
if (e.nodeName === "#text")
|
|
2959
|
+
return e.textContent = this.expandExpressionsAsString(
|
|
2960
|
+
e.textContent,
|
|
2961
|
+
s
|
|
2962
|
+
), e;
|
|
2963
|
+
if (e.nodeName === "TEMPLATE")
|
|
2964
|
+
return e.$parentTemplateContext = s, e;
|
|
2965
|
+
for (let r = 0; r < e.childNodes.length; r++) {
|
|
2966
|
+
const o = e.childNodes[r];
|
|
2967
|
+
this.renderNode(o, t, s);
|
|
2968
|
+
}
|
|
2969
|
+
return e;
|
|
2970
|
+
}
|
|
2971
|
+
updated() {
|
|
2972
|
+
this.templates = this.getTemplates();
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
const lo = (i, e = "highlight", t = "title") => {
|
|
2976
|
+
const s = (o, l, c) => {
|
|
2977
|
+
const u = l.split(".");
|
|
2860
2978
|
let d;
|
|
2861
2979
|
for (d = 0; d < u.length - 1; d++)
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
},
|
|
2865
|
-
let
|
|
2866
|
-
return
|
|
2980
|
+
o = o[u[d]];
|
|
2981
|
+
o[u[d]] = c;
|
|
2982
|
+
}, r = (o, l = []) => {
|
|
2983
|
+
let c = "", u = 0;
|
|
2984
|
+
return l.forEach((d) => {
|
|
2867
2985
|
const m = d[1] + 1;
|
|
2868
|
-
|
|
2869
|
-
|
|
2986
|
+
c += [
|
|
2987
|
+
o.substring(u, d[0]),
|
|
2870
2988
|
`<mark class="${e}">`,
|
|
2871
|
-
|
|
2989
|
+
o.substring(d[0], m),
|
|
2872
2990
|
"</mark>"
|
|
2873
2991
|
].join(""), u = m;
|
|
2874
|
-
}),
|
|
2992
|
+
}), c += o.substring(u), c;
|
|
2875
2993
|
};
|
|
2876
|
-
return i.filter(({ matches:
|
|
2877
|
-
const
|
|
2878
|
-
return
|
|
2994
|
+
return i.filter(({ matches: o }) => o && o.length).map(({ item: o, matches: l }) => {
|
|
2995
|
+
const c = { ...o };
|
|
2996
|
+
return l.forEach((u) => {
|
|
2879
2997
|
u.key === t && s(
|
|
2880
|
-
|
|
2998
|
+
c,
|
|
2881
2999
|
u.key,
|
|
2882
|
-
|
|
3000
|
+
r(u.value, u.indices)
|
|
2883
3001
|
);
|
|
2884
|
-
}),
|
|
3002
|
+
}), c;
|
|
2885
3003
|
});
|
|
2886
|
-
},
|
|
3004
|
+
}, ao = `
|
|
2887
3005
|
:host {
|
|
2888
3006
|
display: flex;
|
|
2889
3007
|
box-sizing: border-box;
|
|
@@ -2901,6 +3019,9 @@ form {
|
|
|
2901
3019
|
display: flex;
|
|
2902
3020
|
flex-direction: column;
|
|
2903
3021
|
}
|
|
3022
|
+
|
|
3023
|
+
|
|
3024
|
+
`, ho = `
|
|
2904
3025
|
ul {
|
|
2905
3026
|
padding-left: 0;
|
|
2906
3027
|
margin-top: 0;
|
|
@@ -2939,22 +3060,31 @@ details summary {
|
|
|
2939
3060
|
.details-filter summary {
|
|
2940
3061
|
justify-content: space-between;
|
|
2941
3062
|
}
|
|
3063
|
+
.details-filter summary span {
|
|
3064
|
+
font-size: small;
|
|
3065
|
+
font-weight: 900;
|
|
3066
|
+
}
|
|
2942
3067
|
#details-results summary {
|
|
2943
3068
|
list-style: none;
|
|
2944
3069
|
}
|
|
2945
|
-
|
|
2946
|
-
|
|
3070
|
+
#details-results summary>.title {
|
|
3071
|
+
font-weight: 900;
|
|
3072
|
+
}
|
|
3073
|
+
.details-filter summary::after,
|
|
3074
|
+
#details-results summary::before {
|
|
3075
|
+
content: url("data:image/svg+xml,%3Csvg data-cy='expand-button' xmlns='http://www.w3.org/2000/svg' viewBox='6 6 12 12' %3E%3Ctitle%3Echevron-down%3C/title%3E%3Cpath d='M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z' /%3E%3C/svg%3E");
|
|
2947
3076
|
width: 14px;
|
|
2948
3077
|
height: 14px;
|
|
3078
|
+
margin-right: 4px;
|
|
2949
3079
|
transition: all ease-in-out 0.3s;
|
|
2950
3080
|
}
|
|
2951
|
-
#details-results summary
|
|
3081
|
+
#details-results summary::before {
|
|
2952
3082
|
transform: rotate(-90deg);
|
|
2953
3083
|
}
|
|
2954
|
-
.details-filter[open] summary
|
|
3084
|
+
.details-filter[open] summary::after {
|
|
2955
3085
|
transform: rotate(180deg);
|
|
2956
3086
|
}
|
|
2957
|
-
#details-results[open] summary
|
|
3087
|
+
#details-results[open] summary::before {
|
|
2958
3088
|
transform: rotate(0deg);
|
|
2959
3089
|
}
|
|
2960
3090
|
.details-filter li span,
|
|
@@ -3002,6 +3132,7 @@ ul#results li {
|
|
|
3002
3132
|
}
|
|
3003
3133
|
#filter-reset {
|
|
3004
3134
|
cursor: pointer;
|
|
3135
|
+
font-size: small;
|
|
3005
3136
|
}
|
|
3006
3137
|
section.inline,
|
|
3007
3138
|
section.inline > ul {
|
|
@@ -3028,92 +3159,92 @@ section.inline details.details-filter summary {
|
|
|
3028
3159
|
overflow-y: auto;
|
|
3029
3160
|
}
|
|
3030
3161
|
`;
|
|
3031
|
-
var
|
|
3032
|
-
for (var
|
|
3033
|
-
(
|
|
3034
|
-
return s &&
|
|
3162
|
+
var co = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, He = (i, e, t, s) => {
|
|
3163
|
+
for (var r = s > 1 ? void 0 : s ? uo(e, t) : e, o = i.length - 1, l; o >= 0; o--)
|
|
3164
|
+
(l = i[o]) && (r = (s ? l(e, t, r) : l(r)) || r);
|
|
3165
|
+
return s && r && co(e, t, r), r;
|
|
3035
3166
|
};
|
|
3036
3167
|
class mi {
|
|
3037
3168
|
constructor() {
|
|
3038
3169
|
/**
|
|
3039
3170
|
* Aggregate results by a property key
|
|
3040
3171
|
*/
|
|
3041
|
-
|
|
3172
|
+
Z(this, "aggregateResults");
|
|
3042
3173
|
/**
|
|
3043
3174
|
* Highlighting of search result character matches
|
|
3044
3175
|
*/
|
|
3045
|
-
|
|
3176
|
+
Z(this, "enableHighlighting", !1);
|
|
3046
3177
|
/**
|
|
3047
3178
|
* Search functionality
|
|
3048
3179
|
*/
|
|
3049
|
-
|
|
3180
|
+
Z(this, "enableSearch", !1);
|
|
3050
3181
|
/**
|
|
3051
3182
|
* Make the filters mutually exclusive
|
|
3052
3183
|
*/
|
|
3053
|
-
|
|
3184
|
+
Z(this, "exclusiveFilters", !1);
|
|
3054
3185
|
/**
|
|
3055
3186
|
* Use an external search endpoint instead of fuse search.
|
|
3056
3187
|
* Passed properties: input string, filters object
|
|
3057
3188
|
*/
|
|
3058
|
-
|
|
3189
|
+
Z(this, "externalSearch");
|
|
3059
3190
|
/**
|
|
3060
3191
|
* The filter properties.
|
|
3061
3192
|
* @param filterProperties
|
|
3062
3193
|
*/
|
|
3063
|
-
|
|
3194
|
+
Z(this, "filterProperties", []);
|
|
3064
3195
|
/**
|
|
3065
3196
|
* Native fuse.js config override
|
|
3066
3197
|
*/
|
|
3067
|
-
|
|
3198
|
+
Z(this, "fuseConfig", {
|
|
3068
3199
|
keys: ["title"]
|
|
3069
3200
|
});
|
|
3070
3201
|
/**
|
|
3071
3202
|
* Inline mode, for rendering the itemfilter in avery condensed space.
|
|
3072
3203
|
* Expexts showResults to be false and enableSearch to be true
|
|
3073
3204
|
*/
|
|
3074
|
-
|
|
3205
|
+
Z(this, "inlineMode", !1);
|
|
3075
3206
|
/**
|
|
3076
3207
|
* Show all result items if nothing is input by the user
|
|
3077
3208
|
* @default true
|
|
3078
3209
|
*/
|
|
3079
|
-
|
|
3210
|
+
Z(this, "matchAllWhenEmpty", !0);
|
|
3080
3211
|
/**
|
|
3081
3212
|
* Callback that is triggered on item search
|
|
3082
3213
|
* @returns result items
|
|
3083
3214
|
*/
|
|
3084
|
-
|
|
3215
|
+
Z(this, "onSearch", () => {
|
|
3085
3216
|
});
|
|
3086
3217
|
/**
|
|
3087
3218
|
* Callback that is triggered on item selection
|
|
3088
3219
|
* @returns selected item
|
|
3089
3220
|
*/
|
|
3090
|
-
|
|
3221
|
+
Z(this, "onSelect", () => {
|
|
3091
3222
|
});
|
|
3092
3223
|
/**
|
|
3093
3224
|
* Display results list
|
|
3094
3225
|
*/
|
|
3095
|
-
|
|
3226
|
+
Z(this, "showResults", !0);
|
|
3096
3227
|
/**
|
|
3097
3228
|
* The property of the result items used for display
|
|
3098
3229
|
*/
|
|
3099
|
-
|
|
3230
|
+
Z(this, "titleProperty", "title");
|
|
3100
3231
|
}
|
|
3101
3232
|
}
|
|
3102
|
-
let
|
|
3233
|
+
let Pe = class extends oo {
|
|
3103
3234
|
constructor() {
|
|
3104
3235
|
super(...arguments);
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3236
|
+
Z(this, "_fuse");
|
|
3237
|
+
Z(this, "_resultAggregation", []);
|
|
3238
|
+
Z(this, "_items", []);
|
|
3239
|
+
Z(this, "_results");
|
|
3240
|
+
Z(this, "_filters", {});
|
|
3241
|
+
Z(this, "_selectedResult");
|
|
3242
|
+
Z(this, "_config", new mi());
|
|
3243
|
+
Z(this, "apply", (e) => {
|
|
3113
3244
|
this._items = e.map((t, s) => ({
|
|
3114
3245
|
id: `item-${s}`,
|
|
3115
3246
|
...t
|
|
3116
|
-
})), this._fuse = new
|
|
3247
|
+
})), this._fuse = new st(this._items, {
|
|
3117
3248
|
// minMatchCharLength: 3,
|
|
3118
3249
|
// location: 0,
|
|
3119
3250
|
threshold: 0.4,
|
|
@@ -3122,42 +3253,42 @@ let Ne = class extends ct {
|
|
|
3122
3253
|
useExtendedSearch: !0,
|
|
3123
3254
|
...this._config.fuseConfig
|
|
3124
3255
|
}), this._config.filterProperties.length && this._config.filterProperties.forEach((t) => {
|
|
3125
|
-
const s = {},
|
|
3126
|
-
this._items.forEach((
|
|
3256
|
+
const s = {}, r = (o) => t.format === "date" ? St(o).unix() : parseInt(o);
|
|
3257
|
+
this._items.forEach((o) => {
|
|
3127
3258
|
if (t.type === "range") {
|
|
3128
|
-
if (Array.isArray(
|
|
3129
|
-
const
|
|
3259
|
+
if (Array.isArray(o[t.key])) {
|
|
3260
|
+
const l = [
|
|
3130
3261
|
// @ts-ignore
|
|
3131
|
-
|
|
3262
|
+
r(o[t.key][0]),
|
|
3132
3263
|
// @ts-ignore
|
|
3133
|
-
|
|
3264
|
+
r(o[t.key][1])
|
|
3134
3265
|
];
|
|
3135
3266
|
s.min = // @ts-ignore
|
|
3136
3267
|
s.min !== void 0 ? (
|
|
3137
3268
|
// @ts-ignore
|
|
3138
|
-
Math.min(s.min,
|
|
3139
|
-
) :
|
|
3269
|
+
Math.min(s.min, l[0])
|
|
3270
|
+
) : l[0], s.max = // @ts-ignore
|
|
3140
3271
|
s.max !== void 0 ? (
|
|
3141
3272
|
// @ts-ignore
|
|
3142
|
-
Math.max(s.max,
|
|
3143
|
-
) :
|
|
3273
|
+
Math.max(s.max, l[1])
|
|
3274
|
+
) : l[1];
|
|
3144
3275
|
} else {
|
|
3145
|
-
const
|
|
3276
|
+
const l = r(o[t.key]);
|
|
3146
3277
|
s.min = // @ts-ignore
|
|
3147
3278
|
s.min !== void 0 ? (
|
|
3148
3279
|
// @ts-ignore
|
|
3149
|
-
Math.min(s.min,
|
|
3150
|
-
) :
|
|
3280
|
+
Math.min(s.min, l)
|
|
3281
|
+
) : l, s.max = // @ts-ignore
|
|
3151
3282
|
s.max !== void 0 ? (
|
|
3152
3283
|
// @ts-ignore
|
|
3153
|
-
Math.max(s.max,
|
|
3154
|
-
) :
|
|
3284
|
+
Math.max(s.max, l)
|
|
3285
|
+
) : l;
|
|
3155
3286
|
}
|
|
3156
3287
|
return;
|
|
3157
3288
|
}
|
|
3158
|
-
Array.isArray(
|
|
3159
|
-
s[
|
|
3160
|
-
}) : s[
|
|
3289
|
+
Array.isArray(o[t.key]) ? o[t.key].forEach((l) => {
|
|
3290
|
+
s[l] = void 0;
|
|
3291
|
+
}) : s[o[t.key]] = void 0;
|
|
3161
3292
|
}), this._filters[t.key] = {
|
|
3162
3293
|
type: t.type || "string",
|
|
3163
3294
|
keys: s,
|
|
@@ -3175,10 +3306,11 @@ let Ne = class extends ct {
|
|
|
3175
3306
|
)
|
|
3176
3307
|
].sort((t, s) => t.localeCompare(s)));
|
|
3177
3308
|
});
|
|
3178
|
-
|
|
3309
|
+
Z(this, "unstyled");
|
|
3310
|
+
Z(this, "inputHandler", () => {
|
|
3179
3311
|
this.search(this.renderRoot.querySelector("input[type='text']").value);
|
|
3180
3312
|
});
|
|
3181
|
-
|
|
3313
|
+
Z(this, "debouncedInputHandler", ro(this.inputHandler, 500, {
|
|
3182
3314
|
leading: !0
|
|
3183
3315
|
}));
|
|
3184
3316
|
}
|
|
@@ -3193,24 +3325,24 @@ let Ne = class extends ct {
|
|
|
3193
3325
|
return this._config;
|
|
3194
3326
|
}
|
|
3195
3327
|
async search(e = "", t = this._filters) {
|
|
3196
|
-
const s = Object.entries(t).filter(([
|
|
3328
|
+
const s = Object.entries(t).filter(([l, c]) => c.type === "string").reduce((l, [c, u]) => {
|
|
3197
3329
|
const d = "$or", m = [], v = ($) => {
|
|
3198
|
-
const
|
|
3199
|
-
|
|
3330
|
+
const E = {};
|
|
3331
|
+
E[c] = `="${$}"`, m.push(E);
|
|
3200
3332
|
};
|
|
3201
|
-
return Object.entries(u.keys).filter(([$,
|
|
3333
|
+
return Object.entries(u.keys).filter(([$, E]) => E).forEach(([$, E]) => v($)), m.length > 0 && l.push({
|
|
3202
3334
|
[d]: m
|
|
3203
|
-
}),
|
|
3335
|
+
}), l;
|
|
3204
3336
|
}, []);
|
|
3205
|
-
let
|
|
3337
|
+
let r;
|
|
3206
3338
|
if (!(e.length > 0) && !s.length && this._config.matchAllWhenEmpty !== !1)
|
|
3207
|
-
|
|
3339
|
+
r = this._items;
|
|
3208
3340
|
else if (this.config.externalSearch)
|
|
3209
|
-
|
|
3341
|
+
r = (await (await fetch(
|
|
3210
3342
|
`${this.config.externalSearch(e, t)}`
|
|
3211
3343
|
)).json()).features;
|
|
3212
3344
|
else {
|
|
3213
|
-
const
|
|
3345
|
+
const l = {
|
|
3214
3346
|
$and: [
|
|
3215
3347
|
...e.length > 0 ? [
|
|
3216
3348
|
{
|
|
@@ -3224,42 +3356,42 @@ let Ne = class extends ct {
|
|
|
3224
3356
|
] : [],
|
|
3225
3357
|
...s
|
|
3226
3358
|
]
|
|
3227
|
-
},
|
|
3228
|
-
|
|
3359
|
+
}, c = this._fuse.search(l);
|
|
3360
|
+
r = this._config.enableHighlighting ? lo(c, "highlight", this._config.titleProperty) : c.map((u) => u.item);
|
|
3229
3361
|
}
|
|
3230
|
-
const
|
|
3362
|
+
const o = Object.entries(this._filters).filter(([l, c]) => c.type === "range").reduce((l, [c, u]) => (l[c] = {
|
|
3231
3363
|
min: u.keys.min,
|
|
3232
3364
|
max: u.keys.max,
|
|
3233
3365
|
format: u.format
|
|
3234
|
-
},
|
|
3235
|
-
if (Object.keys(
|
|
3236
|
-
const
|
|
3237
|
-
for (let
|
|
3366
|
+
}, l), {});
|
|
3367
|
+
if (Object.keys(o).length > 0) {
|
|
3368
|
+
const l = [];
|
|
3369
|
+
for (let c = 0; c < r.length; c++) {
|
|
3238
3370
|
const u = {};
|
|
3239
|
-
for (let [d, m] of Object.entries(
|
|
3240
|
-
const v = ($) => m.format === "date" ?
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
v(
|
|
3244
|
-
v(
|
|
3371
|
+
for (let [d, m] of Object.entries(o)) {
|
|
3372
|
+
const v = ($) => m.format === "date" ? St($).unix() : $;
|
|
3373
|
+
r[c].hasOwnProperty(d) ? Array.isArray(r[c][d]) ? u[d] = // @ts-ignore
|
|
3374
|
+
o[d].min <= v(r[c][d][1]) && // @ts-ignore
|
|
3375
|
+
v(r[c][d][0]) <= o[d].max : /* @ts-ignore */ v(r[c][d]) >= o[d].min && // @ts-ignore
|
|
3376
|
+
v(r[c][d]) <= o[d].max ? u[d] = !0 : u[d] = !1 : u[d] = !0;
|
|
3245
3377
|
}
|
|
3246
|
-
Object.values(u).every((d) => !!d) &&
|
|
3378
|
+
Object.values(u).every((d) => !!d) && l.push(r[c]);
|
|
3247
3379
|
}
|
|
3248
|
-
|
|
3380
|
+
r = [...l];
|
|
3249
3381
|
}
|
|
3250
|
-
this._results = this.sortResults(
|
|
3382
|
+
this._results = this.sortResults(r), this._config.onSearch(r), this.requestUpdate();
|
|
3251
3383
|
}
|
|
3252
3384
|
aggregateResults(e, t) {
|
|
3253
3385
|
return e.filter((s) => {
|
|
3254
|
-
const
|
|
3386
|
+
const r = s[this._config.aggregateResults], o = Object.keys(
|
|
3255
3387
|
// @ts-ignore
|
|
3256
3388
|
this._filters[this._config.aggregateResults]
|
|
3257
3389
|
// @ts-ignore
|
|
3258
|
-
).filter((
|
|
3259
|
-
return (
|
|
3390
|
+
).filter((c) => this._filters[this._config.aggregateResults].keys[c]);
|
|
3391
|
+
return (o.length ? (
|
|
3260
3392
|
// @ts-ignore
|
|
3261
|
-
|
|
3262
|
-
) : !0) && Array.isArray(
|
|
3393
|
+
o.includes(t)
|
|
3394
|
+
) : !0) && Array.isArray(r) ? r.includes(t) : r === t;
|
|
3263
3395
|
});
|
|
3264
3396
|
}
|
|
3265
3397
|
sortResults(e) {
|
|
@@ -3271,24 +3403,24 @@ let Ne = class extends ct {
|
|
|
3271
3403
|
);
|
|
3272
3404
|
}
|
|
3273
3405
|
toggleFilter(e, t, s) {
|
|
3274
|
-
s && Object.keys(this._filters).filter((
|
|
3275
|
-
this._config.filterProperties.find((
|
|
3276
|
-
this._filters[
|
|
3406
|
+
s && Object.keys(this._filters).filter((l) => this._filters[l].type === "string").forEach((l) => {
|
|
3407
|
+
this._config.filterProperties.find((c) => c.key === l).exclusive && Object.keys(this._filters[l].keys).forEach((c) => {
|
|
3408
|
+
this._filters[l].keys[c] = !1;
|
|
3277
3409
|
});
|
|
3278
3410
|
}), this._filters[e].keys[t] = !this._filters[e].keys[t];
|
|
3279
|
-
const
|
|
3280
|
-
|
|
3281
|
-
const
|
|
3411
|
+
const r = this.renderRoot.querySelector('input[type="text"]');
|
|
3412
|
+
r ? this.search(r.value) : this.search();
|
|
3413
|
+
const o = this.renderRoot.querySelectorAll(
|
|
3282
3414
|
"ul#results input[type='radio']"
|
|
3283
3415
|
);
|
|
3284
|
-
for (let
|
|
3285
|
-
l
|
|
3416
|
+
for (let l = 0; l < o.length; l++)
|
|
3417
|
+
o[l].checked = !1;
|
|
3286
3418
|
this._selectedResult && setTimeout(() => {
|
|
3287
|
-
const
|
|
3419
|
+
const l = this.renderRoot.querySelector(
|
|
3288
3420
|
// @ts-ignore
|
|
3289
3421
|
`#${this._selectedResult.id}`
|
|
3290
3422
|
);
|
|
3291
|
-
|
|
3423
|
+
l && (l.checked = !0, this.requestUpdate());
|
|
3292
3424
|
});
|
|
3293
3425
|
}
|
|
3294
3426
|
resetFilters() {
|
|
@@ -3307,14 +3439,15 @@ let Ne = class extends ct {
|
|
|
3307
3439
|
}), this.search(), this.requestUpdate();
|
|
3308
3440
|
}
|
|
3309
3441
|
render() {
|
|
3310
|
-
return
|
|
3442
|
+
return ge`
|
|
3311
3443
|
<style>
|
|
3312
|
-
${
|
|
3444
|
+
${ao}
|
|
3445
|
+
${!this.unstyled && ho}
|
|
3313
3446
|
</style>
|
|
3314
3447
|
<form @submit="${(e) => e.preventDefault()}">
|
|
3315
|
-
${
|
|
3448
|
+
${Ze(
|
|
3316
3449
|
this._config.enableSearch,
|
|
3317
|
-
() =>
|
|
3450
|
+
() => ge`
|
|
3318
3451
|
<section>
|
|
3319
3452
|
<input
|
|
3320
3453
|
type="text"
|
|
@@ -3326,58 +3459,42 @@ let Ne = class extends ct {
|
|
|
3326
3459
|
</section>
|
|
3327
3460
|
`
|
|
3328
3461
|
)}
|
|
3329
|
-
${
|
|
3462
|
+
${Ze(
|
|
3330
3463
|
this._config.filterProperties.length,
|
|
3331
|
-
() =>
|
|
3464
|
+
() => ge`
|
|
3332
3465
|
<section class="${this.config.inlineMode ? "inline" : te}">
|
|
3333
|
-
${
|
|
3466
|
+
${Ze(
|
|
3334
3467
|
!this.config.inlineMode,
|
|
3335
|
-
() =>
|
|
3468
|
+
() => ge` <slot name="filterstitle"></slot> `
|
|
3336
3469
|
)}
|
|
3337
3470
|
<ul id="filters">
|
|
3338
3471
|
${lt(
|
|
3339
3472
|
this._config.filterProperties,
|
|
3340
|
-
(e) =>
|
|
3473
|
+
(e) => ge`
|
|
3341
3474
|
<details
|
|
3342
3475
|
class="details-filter"
|
|
3343
3476
|
part="details-filter"
|
|
3344
3477
|
data-filter="${e.key}"
|
|
3345
3478
|
>
|
|
3346
3479
|
<summary>
|
|
3347
|
-
<
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
${e.type === "string" && Object.values(
|
|
3480
|
+
<span
|
|
3481
|
+
class="title"
|
|
3482
|
+
style="${!e.title && "text-transform: capitalize"}"
|
|
3483
|
+
>
|
|
3484
|
+
${e.title || e.key}
|
|
3485
|
+
${e.type === "string" && Object.values(
|
|
3354
3486
|
// @ts-ignore
|
|
3355
3487
|
this._filters[e.key].keys
|
|
3356
3488
|
).filter((t) => t).length ? `(${Object.values(
|
|
3357
3489
|
// @ts-ignore
|
|
3358
3490
|
this._filters[e.key].keys
|
|
3359
3491
|
).filter((t) => t).length})` : te}
|
|
3360
|
-
|
|
3361
|
-
</small>
|
|
3362
|
-
<div
|
|
3363
|
-
style="display: flex; align-items: center; justify-content: center; margin-left: 4px;"
|
|
3364
|
-
>
|
|
3365
|
-
<svg
|
|
3366
|
-
data-cy="expand-button"
|
|
3367
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3368
|
-
viewBox="6 6 12 12"
|
|
3369
|
-
>
|
|
3370
|
-
<title>chevron-down</title>
|
|
3371
|
-
<path
|
|
3372
|
-
d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
|
|
3373
|
-
/>
|
|
3374
|
-
</svg>
|
|
3375
|
-
</div>
|
|
3492
|
+
</span>
|
|
3376
3493
|
</summary>
|
|
3377
3494
|
<div class="scroll" style="max-height: 150px">
|
|
3378
|
-
${e.type === "range" ?
|
|
3495
|
+
${e.type === "range" ? ge`
|
|
3379
3496
|
<div>
|
|
3380
|
-
${e.format === "date" ?
|
|
3497
|
+
${e.format === "date" ? St.unix(
|
|
3381
3498
|
// @ts-ignore
|
|
3382
3499
|
this._filters[e.key].keys.min
|
|
3383
3500
|
) : (
|
|
@@ -3395,7 +3512,6 @@ let Ne = class extends ct {
|
|
|
3395
3512
|
value2="${// @ts-ignore
|
|
3396
3513
|
this._filters[e.key].keys.max}"
|
|
3397
3514
|
step="1"
|
|
3398
|
-
style="margin: 5px"
|
|
3399
3515
|
@change="${(t) => {
|
|
3400
3516
|
[
|
|
3401
3517
|
// @ts-ignore
|
|
@@ -3412,7 +3528,7 @@ let Ne = class extends ct {
|
|
|
3412
3528
|
}}"
|
|
3413
3529
|
></tc-range-slider>
|
|
3414
3530
|
<div>
|
|
3415
|
-
${e.format === "date" ?
|
|
3531
|
+
${e.format === "date" ? St.unix(
|
|
3416
3532
|
// @ts-ignore
|
|
3417
3533
|
this._filters[e.key].keys.max
|
|
3418
3534
|
) : (
|
|
@@ -3420,7 +3536,7 @@ let Ne = class extends ct {
|
|
|
3420
3536
|
this._filters[e.key].keys.max
|
|
3421
3537
|
)}
|
|
3422
3538
|
</div>
|
|
3423
|
-
` :
|
|
3539
|
+
` : ge`
|
|
3424
3540
|
<ul>
|
|
3425
3541
|
${// @ts-ignore
|
|
3426
3542
|
this._filters[e.key] ? lt(
|
|
@@ -3428,7 +3544,7 @@ let Ne = class extends ct {
|
|
|
3428
3544
|
// @ts-ignore
|
|
3429
3545
|
this._filters[e.key].keys
|
|
3430
3546
|
).sort((t, s) => t.localeCompare(s)),
|
|
3431
|
-
(t) =>
|
|
3547
|
+
(t) => ge`
|
|
3432
3548
|
<li>
|
|
3433
3549
|
<label>
|
|
3434
3550
|
<input
|
|
@@ -3454,29 +3570,29 @@ let Ne = class extends ct {
|
|
|
3454
3570
|
`
|
|
3455
3571
|
)}
|
|
3456
3572
|
</ul>
|
|
3457
|
-
${
|
|
3573
|
+
${Ze(
|
|
3458
3574
|
this._config.filterProperties,
|
|
3459
|
-
() =>
|
|
3575
|
+
() => ge`
|
|
3460
3576
|
<a
|
|
3461
3577
|
id="filter-reset"
|
|
3462
3578
|
data-cy="filter-reset"
|
|
3463
3579
|
@click=${() => this.resetFilters()}
|
|
3464
|
-
|
|
3580
|
+
>Reset filters</a
|
|
3465
3581
|
>
|
|
3466
3582
|
`
|
|
3467
3583
|
)}
|
|
3468
3584
|
</section>
|
|
3469
3585
|
`
|
|
3470
3586
|
)}
|
|
3471
|
-
${
|
|
3587
|
+
${Ze(
|
|
3472
3588
|
this.config.showResults && this._results,
|
|
3473
|
-
() =>
|
|
3589
|
+
() => ge`
|
|
3474
3590
|
<section id="section-results">
|
|
3475
3591
|
<div>
|
|
3476
3592
|
<slot name="resultstitle"></slot>
|
|
3477
3593
|
</div>
|
|
3478
3594
|
<div id="container-results" class="scroll">
|
|
3479
|
-
${this._results.length < 1 ?
|
|
3595
|
+
${this._results.length < 1 ? ge` <small class="no-results">No matching items</small> ` : te}
|
|
3480
3596
|
<ul id="results" part="results">
|
|
3481
3597
|
${this._config.aggregateResults ? lt(
|
|
3482
3598
|
this._resultAggregation.filter(
|
|
@@ -3485,29 +3601,20 @@ let Ne = class extends ct {
|
|
|
3485
3601
|
e
|
|
3486
3602
|
).length
|
|
3487
3603
|
),
|
|
3488
|
-
(e) =>
|
|
3604
|
+
(e) => ge`<details
|
|
3489
3605
|
id="details-results"
|
|
3490
3606
|
open
|
|
3491
3607
|
>
|
|
3492
3608
|
<summary>
|
|
3493
|
-
<
|
|
3494
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3495
|
-
viewBox="0 0 24 24"
|
|
3496
|
-
>
|
|
3497
|
-
<title>chevron-down</title>
|
|
3498
|
-
<path
|
|
3499
|
-
d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
|
|
3500
|
-
/>
|
|
3501
|
-
</svg>
|
|
3502
|
-
<strong class="title">
|
|
3609
|
+
<span class="title">
|
|
3503
3610
|
${e}
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
>(${this.aggregateResults(
|
|
3611
|
+
<span class="count"
|
|
3612
|
+
>(${this.aggregateResults(
|
|
3507
3613
|
this._results,
|
|
3508
3614
|
e
|
|
3509
3615
|
).length})</span
|
|
3510
|
-
|
|
3616
|
+
>
|
|
3617
|
+
</span>
|
|
3511
3618
|
</summary>
|
|
3512
3619
|
<ul>
|
|
3513
3620
|
${lt(
|
|
@@ -3516,7 +3623,7 @@ let Ne = class extends ct {
|
|
|
3516
3623
|
e
|
|
3517
3624
|
),
|
|
3518
3625
|
// @ts-ignore
|
|
3519
|
-
(t) =>
|
|
3626
|
+
(t) => ge`
|
|
3520
3627
|
<li>
|
|
3521
3628
|
<label>
|
|
3522
3629
|
<input
|
|
@@ -3528,12 +3635,23 @@ let Ne = class extends ct {
|
|
|
3528
3635
|
this._selectedResult = t, this._config.onSelect(t);
|
|
3529
3636
|
}}
|
|
3530
3637
|
/>
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3638
|
+
${Ze(
|
|
3639
|
+
this.hasTemplate("result"),
|
|
3640
|
+
() => this.renderTemplate(
|
|
3641
|
+
"result",
|
|
3642
|
+
t,
|
|
3643
|
+
// @ts-ignore
|
|
3644
|
+
`result-${t.id}`
|
|
3645
|
+
),
|
|
3646
|
+
() => ge`
|
|
3647
|
+
<span class="title"
|
|
3648
|
+
>${hi(
|
|
3649
|
+
// @ts-ignore
|
|
3650
|
+
t[this._config.titleProperty]
|
|
3651
|
+
)}</span
|
|
3652
|
+
>
|
|
3653
|
+
`
|
|
3654
|
+
)}
|
|
3537
3655
|
</label>
|
|
3538
3656
|
</li>
|
|
3539
3657
|
`
|
|
@@ -3543,9 +3661,9 @@ let Ne = class extends ct {
|
|
|
3543
3661
|
) : lt(
|
|
3544
3662
|
this._results,
|
|
3545
3663
|
// @ts-ignore
|
|
3546
|
-
(e) =>
|
|
3664
|
+
(e) => ge`<li part="result">
|
|
3547
3665
|
${// @ts-ignore
|
|
3548
|
-
|
|
3666
|
+
hi(e[this._config.titleProperty])}
|
|
3549
3667
|
</li>`
|
|
3550
3668
|
)}
|
|
3551
3669
|
</ul>
|
|
@@ -3573,27 +3691,30 @@ let Ne = class extends ct {
|
|
|
3573
3691
|
// slot.replaceWith(clon);
|
|
3574
3692
|
// }
|
|
3575
3693
|
};
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
],
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
],
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
],
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
],
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
],
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
],
|
|
3594
|
-
|
|
3694
|
+
He([
|
|
3695
|
+
Rt()
|
|
3696
|
+
], Pe.prototype, "_items", 2);
|
|
3697
|
+
He([
|
|
3698
|
+
Rt()
|
|
3699
|
+
], Pe.prototype, "_results", 2);
|
|
3700
|
+
He([
|
|
3701
|
+
Rt()
|
|
3702
|
+
], Pe.prototype, "_filters", 2);
|
|
3703
|
+
He([
|
|
3704
|
+
Rt()
|
|
3705
|
+
], Pe.prototype, "_selectedResult", 2);
|
|
3706
|
+
He([
|
|
3707
|
+
Dt({ attribute: !1 })
|
|
3708
|
+
], Pe.prototype, "config", 1);
|
|
3709
|
+
He([
|
|
3710
|
+
Dt()
|
|
3711
|
+
], Pe.prototype, "apply", 2);
|
|
3712
|
+
He([
|
|
3713
|
+
Dt({ type: Boolean })
|
|
3714
|
+
], Pe.prototype, "unstyled", 2);
|
|
3715
|
+
Pe = He([
|
|
3595
3716
|
Kr("eox-itemfilter")
|
|
3596
|
-
],
|
|
3717
|
+
], Pe);
|
|
3597
3718
|
export {
|
|
3598
|
-
|
|
3719
|
+
Pe as EOxItemFilter
|
|
3599
3720
|
};
|