@eox/itemfilter 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  var ae = Object.defineProperty;
2
- var ue = (n, t, e) => t in n ? ae(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var w = (n, t, e) => (ue(n, typeof t != "symbol" ? t + "" : t, e), e);
2
+ var ue = (i, t, e) => t in i ? ae(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var x = (i, t, e) => (ue(i, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC
7
7
  * SPDX-License-Identifier: BSD-3-Clause
8
8
  */
9
- const et = window, bt = et.ShadowRoot && (et.ShadyCSS === void 0 || et.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Jt = Symbol(), Lt = /* @__PURE__ */ new WeakMap();
9
+ const et = window, wt = et.ShadowRoot && (et.ShadyCSS === void 0 || et.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Jt = Symbol(), Lt = /* @__PURE__ */ new WeakMap();
10
10
  let de = class {
11
11
  constructor(t, e, s) {
12
12
  if (this._$cssResult$ = !0, s !== Jt)
@@ -16,7 +16,7 @@ let de = class {
16
16
  get styleSheet() {
17
17
  let t = this.o;
18
18
  const e = this.t;
19
- if (bt && t === void 0) {
19
+ if (wt && t === void 0) {
20
20
  const s = e !== void 0 && e.length === 1;
21
21
  s && (t = Lt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Lt.set(e, t));
22
22
  }
@@ -26,53 +26,53 @@ let de = class {
26
26
  return this.cssText;
27
27
  }
28
28
  };
29
- const fe = (n) => new de(typeof n == "string" ? n : n + "", void 0, Jt), pe = (n, t) => {
30
- bt ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
31
- const s = document.createElement("style"), i = et.litNonce;
32
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
29
+ const fe = (i) => new de(typeof i == "string" ? i : i + "", void 0, Jt), pe = (i, t) => {
30
+ wt ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
31
+ const s = document.createElement("style"), r = et.litNonce;
32
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
33
33
  });
34
- }, Nt = bt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
34
+ }, Ot = wt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
35
35
  let e = "";
36
36
  for (const s of t.cssRules)
37
37
  e += s.cssText;
38
38
  return fe(e);
39
- })(n) : n;
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 ct;
46
- const st = window, Ot = st.trustedTypes, ge = Ot ? Ot.emptyScript : "", Tt = st.reactiveElementPolyfillSupport, mt = { toAttribute(n, t) {
45
+ var ht;
46
+ const st = window, kt = st.trustedTypes, ge = kt ? kt.emptyScript : "", Nt = st.reactiveElementPolyfillSupport, mt = { toAttribute(i, t) {
47
47
  switch (t) {
48
48
  case Boolean:
49
- n = n ? ge : null;
49
+ i = i ? ge : null;
50
50
  break;
51
51
  case Object:
52
52
  case Array:
53
- n = n == null ? n : JSON.stringify(n);
53
+ i = i == null ? i : JSON.stringify(i);
54
54
  }
55
- return n;
56
- }, fromAttribute(n, t) {
57
- let e = n;
55
+ return i;
56
+ }, fromAttribute(i, t) {
57
+ let e = i;
58
58
  switch (t) {
59
59
  case Boolean:
60
- e = n !== null;
60
+ e = i !== null;
61
61
  break;
62
62
  case Number:
63
- e = n === null ? null : Number(n);
63
+ e = i === null ? null : Number(i);
64
64
  break;
65
65
  case Object:
66
66
  case Array:
67
67
  try {
68
- e = JSON.parse(n);
68
+ e = JSON.parse(i);
69
69
  } catch {
70
70
  e = null;
71
71
  }
72
72
  }
73
73
  return e;
74
- } }, Qt = (n, t) => t !== n && (t == t || n == n), ht = { attribute: !0, type: String, converter: mt, reflect: !1, hasChanged: Qt };
75
- let F = class extends HTMLElement {
74
+ } }, Qt = (i, t) => t !== i && (t == t || i == i), at = { attribute: !0, type: String, converter: mt, reflect: !1, hasChanged: Qt };
75
+ let z = 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,26 +84,26 @@ let F = class extends HTMLElement {
84
84
  this.finalize();
85
85
  const t = [];
86
86
  return this.elementProperties.forEach((e, s) => {
87
- const i = this._$Ep(s, e);
88
- i !== void 0 && (this._$Ev.set(i, s), t.push(i));
87
+ const r = this._$Ep(s, e);
88
+ r !== void 0 && (this._$Ev.set(r, s), t.push(r));
89
89
  }), t;
90
90
  }
91
- static createProperty(t, e = ht) {
91
+ static createProperty(t, e = at) {
92
92
  if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
93
- const s = typeof t == "symbol" ? Symbol() : "__" + t, i = this.getPropertyDescriptor(t, s, e);
94
- i !== void 0 && Object.defineProperty(this.prototype, t, i);
93
+ const s = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, s, e);
94
+ r !== void 0 && Object.defineProperty(this.prototype, t, r);
95
95
  }
96
96
  }
97
97
  static getPropertyDescriptor(t, e, s) {
98
98
  return { get() {
99
99
  return this[e];
100
- }, set(i) {
101
- const r = this[t];
102
- this[e] = i, this.requestUpdate(t, r, s);
100
+ }, set(r) {
101
+ const n = this[t];
102
+ this[e] = r, this.requestUpdate(t, n, s);
103
103
  }, configurable: !0, enumerable: !0 };
104
104
  }
105
105
  static getPropertyOptions(t) {
106
- return this.elementProperties.get(t) || ht;
106
+ return this.elementProperties.get(t) || at;
107
107
  }
108
108
  static finalize() {
109
109
  if (this.hasOwnProperty("finalized"))
@@ -112,8 +112,8 @@ let F = class extends HTMLElement {
112
112
  const t = Object.getPrototypeOf(this);
113
113
  if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
114
114
  const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
115
- for (const i of s)
116
- this.createProperty(i, e[i]);
115
+ for (const r of s)
116
+ this.createProperty(r, e[r]);
117
117
  }
118
118
  return this.elementStyles = this.finalizeStyles(this.styles), !0;
119
119
  }
@@ -121,10 +121,10 @@ let F = class extends HTMLElement {
121
121
  const e = [];
122
122
  if (Array.isArray(t)) {
123
123
  const s = new Set(t.flat(1 / 0).reverse());
124
- for (const i of s)
125
- e.unshift(Nt(i));
124
+ for (const r of s)
125
+ e.unshift(Ot(r));
126
126
  } else
127
- t !== void 0 && e.push(Nt(t));
127
+ t !== void 0 && e.push(Ot(t));
128
128
  return e;
129
129
  }
130
130
  static _$Ep(t, e) {
@@ -172,25 +172,25 @@ let F = class extends HTMLElement {
172
172
  attributeChangedCallback(t, e, s) {
173
173
  this._$AK(t, s);
174
174
  }
175
- _$EO(t, e, s = ht) {
176
- var i;
177
- const r = this.constructor._$Ep(t, s);
178
- if (r !== void 0 && s.reflect === !0) {
179
- const o = (((i = s.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== void 0 ? s.converter : mt).toAttribute(e, s.type);
180
- this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
175
+ _$EO(t, e, s = at) {
176
+ var r;
177
+ const n = this.constructor._$Ep(t, s);
178
+ if (n !== void 0 && s.reflect === !0) {
179
+ const o = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : mt).toAttribute(e, s.type);
180
+ this._$El = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$El = null;
181
181
  }
182
182
  }
183
183
  _$AK(t, e) {
184
184
  var s;
185
- const i = this.constructor, r = i._$Ev.get(t);
186
- if (r !== void 0 && this._$El !== r) {
187
- const o = i.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : mt;
188
- this._$El = r, this[r] = c.fromAttribute(e, o.type), this._$El = null;
185
+ const r = this.constructor, n = r._$Ev.get(t);
186
+ if (n !== void 0 && this._$El !== n) {
187
+ const o = r.getPropertyOptions(n), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : mt;
188
+ this._$El = n, this[n] = c.fromAttribute(e, o.type), this._$El = null;
189
189
  }
190
190
  }
191
191
  requestUpdate(t, e, s) {
192
- let i = !0;
193
- t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || Qt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : i = !1), !this.isUpdatePending && i && (this._$E_ = this._$Ej());
192
+ let r = !0;
193
+ t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || Qt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, 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 F = class extends HTMLElement {
209
209
  var t;
210
210
  if (!this.isUpdatePending)
211
211
  return;
212
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((i, r) => this[r] = i), this._$Ei = void 0);
212
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, n) => this[n] = r), this._$Ei = void 0);
213
213
  let e = !1;
214
214
  const s = this._$AL;
215
215
  try {
216
- e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((i) => {
217
- var r;
218
- return (r = i.hostUpdate) === null || r === void 0 ? void 0 : r.call(i);
216
+ e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
217
+ var n;
218
+ return (n = r.hostUpdate) === null || n === void 0 ? void 0 : n.call(r);
219
219
  }), this.update(s)) : this._$Ek();
220
- } catch (i) {
221
- throw e = !1, this._$Ek(), i;
220
+ } catch (r) {
221
+ throw e = !1, this._$Ek(), r;
222
222
  }
223
223
  e && this._$AE(s);
224
224
  }
@@ -227,8 +227,8 @@ let F = class extends HTMLElement {
227
227
  _$AE(t) {
228
228
  var e;
229
229
  (e = this._$ES) === null || e === void 0 || e.forEach((s) => {
230
- var i;
231
- return (i = s.hostUpdated) === null || i === void 0 ? void 0 : i.call(s);
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(t)), this.updated(t);
233
233
  }
234
234
  _$Ek() {
@@ -251,75 +251,75 @@ let F = class extends HTMLElement {
251
251
  firstUpdated(t) {
252
252
  }
253
253
  };
254
- F.finalized = !0, F.elementProperties = /* @__PURE__ */ new Map(), F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, Tt == null || Tt({ ReactiveElement: F }), ((ct = st.reactiveElementVersions) !== null && ct !== void 0 ? ct : st.reactiveElementVersions = []).push("1.6.1");
254
+ z.finalized = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, Nt == null || Nt({ ReactiveElement: z }), ((ht = st.reactiveElementVersions) !== null && ht !== void 0 ? ht : st.reactiveElementVersions = []).push("1.6.1");
255
255
  /**
256
256
  * @license
257
257
  * Copyright 2017 Google LLC
258
258
  * SPDX-License-Identifier: BSD-3-Clause
259
259
  */
260
- var at;
261
- const it = window, z = it.trustedTypes, kt = z ? z.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, _t = "$lit$", M = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + M, me = `<${Xt}>`, T = document, G = () => T.createComment(""), J = (n) => n === null || typeof n != "object" && typeof n != "function", Zt = Array.isArray, _e = (n) => Zt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ut = `[
262
- \f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pt = /-->/g, Ht = />/g, L = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
263
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ut = /'/g, jt = /"/g, qt = /^(?:script|style|textarea|title)$/i, $e = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), j = $e(1), k = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), O = T.createTreeWalker(T, 129, null, !1), ve = (n, t) => {
264
- const e = n.length - 1, s = [];
265
- let i, r = t === 2 ? "<svg>" : "", o = K;
260
+ var ut;
261
+ const it = window, D = it.trustedTypes, Pt = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", M = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + M, _e = `<${Xt}>`, T = document, G = () => T.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", Zt = Array.isArray, me = (i) => Zt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", dt = `[
262
+ \f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, Ut = />/g, O = RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
263
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, jt = /"/g, qt = /^(?:script|style|textarea|title)$/i, $e = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), k = $e(1), U = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), P = T.createTreeWalker(T, 129, null, !1), ve = (i, t) => {
264
+ const e = i.length - 1, s = [];
265
+ let r, n = t === 2 ? "<svg>" : "", o = K;
266
266
  for (let l = 0; l < e; l++) {
267
- const h = n[l];
268
- let u, a, d = -1, p = 0;
269
- for (; p < h.length && (o.lastIndex = p, a = o.exec(h), a !== null); )
270
- p = o.lastIndex, o === K ? a[1] === "!--" ? o = Pt : a[1] !== void 0 ? o = Ht : a[2] !== void 0 ? (qt.test(a[2]) && (i = RegExp("</" + a[2], "g")), o = L) : a[3] !== void 0 && (o = L) : o === L ? a[0] === ">" ? (o = i ?? K, d = -1) : a[1] === void 0 ? d = -2 : (d = o.lastIndex - a[2].length, u = a[1], o = a[3] === void 0 ? L : a[3] === '"' ? jt : Ut) : o === jt || o === Ut ? o = L : o === Pt || o === Ht ? o = K : (o = L, i = void 0);
271
- const g = o === L && n[l + 1].startsWith("/>") ? " " : "";
272
- r += o === K ? h + me : d >= 0 ? (s.push(u), h.slice(0, d) + _t + h.slice(d) + M + g) : h + M + (d === -2 ? (s.push(void 0), l) : g);
273
- }
274
- const c = r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
275
- if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
267
+ const h = i[l];
268
+ let a, u, d = -1, p = 0;
269
+ for (; p < h.length && (o.lastIndex = p, u = o.exec(h), u !== null); )
270
+ p = o.lastIndex, o === K ? u[1] === "!--" ? o = Tt : u[1] !== void 0 ? o = Ut : u[2] !== void 0 ? (qt.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = O) : u[3] !== void 0 && (o = O) : o === O ? u[0] === ">" ? (o = r ?? K, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, a = u[1], o = u[3] === void 0 ? O : u[3] === '"' ? jt : Ht) : o === jt || o === Ht ? o = O : o === Tt || o === Ut ? o = K : (o = O, r = void 0);
271
+ const g = o === O && i[l + 1].startsWith("/>") ? " " : "";
272
+ n += o === K ? h + _e : d >= 0 ? (s.push(a), h.slice(0, d) + $t + h.slice(d) + M + g) : h + M + (d === -2 ? (s.push(void 0), l) : g);
273
+ }
274
+ const c = n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
275
+ if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
276
276
  throw Error("invalid template strings array");
277
- return [kt !== void 0 ? kt.createHTML(c) : c, s];
277
+ return [Pt !== void 0 ? Pt.createHTML(c) : c, s];
278
278
  };
279
279
  class Q {
280
280
  constructor({ strings: t, _$litType$: e }, s) {
281
- let i;
281
+ let r;
282
282
  this.parts = [];
283
- let r = 0, o = 0;
284
- const c = t.length - 1, l = this.parts, [h, u] = ve(t, e);
285
- if (this.el = Q.createElement(h, s), O.currentNode = this.el.content, e === 2) {
286
- const a = this.el.content, d = a.firstChild;
287
- d.remove(), a.append(...d.childNodes);
283
+ let n = 0, o = 0;
284
+ const c = t.length - 1, l = this.parts, [h, a] = ve(t, e);
285
+ if (this.el = Q.createElement(h, s), P.currentNode = this.el.content, e === 2) {
286
+ const u = this.el.content, d = u.firstChild;
287
+ d.remove(), u.append(...d.childNodes);
288
288
  }
289
- for (; (i = O.nextNode()) !== null && l.length < c; ) {
290
- if (i.nodeType === 1) {
291
- if (i.hasAttributes()) {
292
- const a = [];
293
- for (const d of i.getAttributeNames())
294
- if (d.endsWith(_t) || d.startsWith(M)) {
295
- const p = u[o++];
296
- if (a.push(d), p !== void 0) {
297
- const g = i.getAttribute(p.toLowerCase() + _t).split(M), _ = /([.?@])?(.*)/.exec(p);
298
- l.push({ type: 1, index: r, name: _[2], strings: g, ctor: _[1] === "." ? Ae : _[1] === "?" ? xe : _[1] === "@" ? Se : rt });
289
+ for (; (r = P.nextNode()) !== null && l.length < c; ) {
290
+ if (r.nodeType === 1) {
291
+ if (r.hasAttributes()) {
292
+ const u = [];
293
+ for (const d of r.getAttributeNames())
294
+ if (d.endsWith($t) || d.startsWith(M)) {
295
+ const p = a[o++];
296
+ if (u.push(d), p !== void 0) {
297
+ const g = r.getAttribute(p.toLowerCase() + $t).split(M), m = /([.?@])?(.*)/.exec(p);
298
+ l.push({ type: 1, index: n, name: m[2], strings: g, ctor: m[1] === "." ? Ae : m[1] === "?" ? xe : m[1] === "@" ? Se : nt });
299
299
  } else
300
- l.push({ type: 6, index: r });
300
+ l.push({ type: 6, index: n });
301
301
  }
302
- for (const d of a)
303
- i.removeAttribute(d);
302
+ for (const d of u)
303
+ r.removeAttribute(d);
304
304
  }
305
- if (qt.test(i.tagName)) {
306
- const a = i.textContent.split(M), d = a.length - 1;
305
+ if (qt.test(r.tagName)) {
306
+ const u = r.textContent.split(M), d = u.length - 1;
307
307
  if (d > 0) {
308
- i.textContent = z ? z.emptyScript : "";
308
+ r.textContent = D ? D.emptyScript : "";
309
309
  for (let p = 0; p < d; p++)
310
- i.append(a[p], G()), O.nextNode(), l.push({ type: 2, index: ++r });
311
- i.append(a[d], G());
310
+ r.append(u[p], G()), P.nextNode(), l.push({ type: 2, index: ++n });
311
+ r.append(u[d], G());
312
312
  }
313
313
  }
314
- } else if (i.nodeType === 8)
315
- if (i.data === Xt)
316
- l.push({ type: 2, index: r });
314
+ } else if (r.nodeType === 8)
315
+ if (r.data === Xt)
316
+ l.push({ type: 2, index: n });
317
317
  else {
318
- let a = -1;
319
- for (; (a = i.data.indexOf(M, a + 1)) !== -1; )
320
- l.push({ type: 7, index: r }), a += M.length - 1;
318
+ let u = -1;
319
+ for (; (u = r.data.indexOf(M, u + 1)) !== -1; )
320
+ l.push({ type: 7, index: n }), u += M.length - 1;
321
321
  }
322
- r++;
322
+ n++;
323
323
  }
324
324
  }
325
325
  static createElement(t, e) {
@@ -327,13 +327,13 @@ class Q {
327
327
  return s.innerHTML = t, s;
328
328
  }
329
329
  }
330
- function D(n, t, e = n, s) {
331
- var i, r, o, c;
332
- if (t === k)
330
+ function B(i, t, e = i, s) {
331
+ var r, n, o, c;
332
+ if (t === U)
333
333
  return t;
334
- let l = s !== void 0 ? (i = e._$Co) === null || i === void 0 ? void 0 : i[s] : e._$Cl;
334
+ let l = s !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[s] : e._$Cl;
335
335
  const h = J(t) ? void 0 : t._$litDirective$;
336
- return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(n), l._$AT(n, e, s)), s !== void 0 ? ((o = (c = e)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[s] = l : e._$Cl = l), l !== void 0 && (t = D(n, l._$AS(n, t.values), l, s)), t;
336
+ return (l == null ? void 0 : l.constructor) !== h && ((n = l == null ? void 0 : l._$AO) === null || n === void 0 || n.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, s)), s !== void 0 ? ((o = (c = e)._$Co) !== null && o !== void 0 ? o : c._$Co = [])[s] = l : e._$Cl = l), l !== void 0 && (t = B(i, l._$AS(i, t.values), l, s)), t;
337
337
  }
338
338
  class ye {
339
339
  constructor(t, e) {
@@ -347,17 +347,17 @@ class ye {
347
347
  }
348
348
  u(t) {
349
349
  var e;
350
- const { el: { content: s }, parts: i } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : T).importNode(s, !0);
351
- O.currentNode = r;
352
- let o = O.nextNode(), c = 0, l = 0, h = i[0];
350
+ const { el: { content: s }, parts: r } = this._$AD, n = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : T).importNode(s, !0);
351
+ P.currentNode = n;
352
+ let o = P.nextNode(), c = 0, l = 0, h = r[0];
353
353
  for (; h !== void 0; ) {
354
354
  if (c === h.index) {
355
- let u;
356
- h.type === 2 ? u = new X(o, o.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (u = new be(o, this, t)), this._$AV.push(u), h = i[++l];
355
+ let a;
356
+ h.type === 2 ? a = new X(o, o.nextSibling, this, t) : h.type === 1 ? a = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (a = new be(o, this, t)), this._$AV.push(a), h = r[++l];
357
357
  }
358
- c !== (h == null ? void 0 : h.index) && (o = O.nextNode(), c++);
358
+ c !== (h == null ? void 0 : h.index) && (o = P.nextNode(), c++);
359
359
  }
360
- return O.currentNode = T, r;
360
+ return P.currentNode = T, n;
361
361
  }
362
362
  v(t) {
363
363
  let e = 0;
@@ -366,9 +366,9 @@ class ye {
366
366
  }
367
367
  }
368
368
  class X {
369
- constructor(t, e, s, i) {
370
- var r;
371
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
369
+ constructor(t, e, s, r) {
370
+ var n;
371
+ this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cp = (n = r == null ? void 0 : r.isConnected) === null || n === void 0 || n;
372
372
  }
373
373
  get _$AU() {
374
374
  var t, e;
@@ -386,7 +386,7 @@ class X {
386
386
  return this._$AB;
387
387
  }
388
388
  _$AI(t, e = this) {
389
- t = D(this, t, e), J(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== k && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : _e(t) ? this.T(t) : this._(t);
389
+ t = B(this, t, e), J(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : me(t) ? this.T(t) : this._(t);
390
390
  }
391
391
  k(t) {
392
392
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -395,15 +395,15 @@ class X {
395
395
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
396
396
  }
397
397
  _(t) {
398
- this._$AH !== m && J(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
398
+ this._$AH !== _ && J(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
399
399
  }
400
400
  g(t) {
401
401
  var e;
402
- const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = Q.createElement(i.h, this.options)), i);
403
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
402
+ const { values: s, _$litType$: r } = t, n = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Q.createElement(r.h, this.options)), r);
403
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === n)
404
404
  this._$AH.v(s);
405
405
  else {
406
- const o = new ye(r, this), c = o.u(this.options);
406
+ const o = new ye(n, this), c = o.u(this.options);
407
407
  o.v(s), this.$(c), this._$AH = o;
408
408
  }
409
409
  }
@@ -414,16 +414,16 @@ class X {
414
414
  T(t) {
415
415
  Zt(this._$AH) || (this._$AH = [], this._$AR());
416
416
  const e = this._$AH;
417
- let s, i = 0;
418
- for (const r of t)
419
- i === e.length ? e.push(s = new X(this.k(G()), this.k(G()), this, this.options)) : s = e[i], s._$AI(r), i++;
420
- i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
417
+ let s, r = 0;
418
+ for (const n of t)
419
+ r === e.length ? e.push(s = new X(this.k(G()), this.k(G()), this, this.options)) : s = e[r], s._$AI(n), r++;
420
+ r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
421
421
  }
422
422
  _$AR(t = this._$AA.nextSibling, e) {
423
423
  var s;
424
424
  for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, e); t && t !== this._$AB; ) {
425
- const i = t.nextSibling;
426
- t.remove(), t = i;
425
+ const r = t.nextSibling;
426
+ t.remove(), t = r;
427
427
  }
428
428
  }
429
429
  setConnected(t) {
@@ -431,9 +431,9 @@ class X {
431
431
  this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
432
432
  }
433
433
  }
434
- class rt {
435
- constructor(t, e, s, i, r) {
436
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = m;
434
+ class nt {
435
+ constructor(t, e, s, r, n) {
436
+ this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = _;
437
437
  }
438
438
  get tagName() {
439
439
  return this.element.tagName;
@@ -441,50 +441,50 @@ class rt {
441
441
  get _$AU() {
442
442
  return this._$AM._$AU;
443
443
  }
444
- _$AI(t, e = this, s, i) {
445
- const r = this.strings;
444
+ _$AI(t, e = this, s, r) {
445
+ const n = this.strings;
446
446
  let o = !1;
447
- if (r === void 0)
448
- t = D(this, t, e, 0), o = !J(t) || t !== this._$AH && t !== k, o && (this._$AH = t);
447
+ if (n === void 0)
448
+ t = B(this, t, e, 0), o = !J(t) || t !== this._$AH && t !== U, o && (this._$AH = t);
449
449
  else {
450
450
  const c = t;
451
451
  let l, h;
452
- for (t = r[0], l = 0; l < r.length - 1; l++)
453
- h = D(this, c[s + l], e, l), h === k && (h = this._$AH[l]), o || (o = !J(h) || h !== this._$AH[l]), h === m ? t = m : t !== m && (t += (h ?? "") + r[l + 1]), this._$AH[l] = h;
452
+ for (t = n[0], l = 0; l < n.length - 1; l++)
453
+ h = B(this, c[s + l], e, l), h === U && (h = this._$AH[l]), o || (o = !J(h) || h !== this._$AH[l]), h === _ ? t = _ : t !== _ && (t += (h ?? "") + n[l + 1]), this._$AH[l] = h;
454
454
  }
455
- o && !i && this.j(t);
455
+ o && !r && this.j(t);
456
456
  }
457
457
  j(t) {
458
- t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
458
+ t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
- class Ae extends rt {
461
+ class Ae extends nt {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
465
465
  j(t) {
466
- this.element[this.name] = t === m ? void 0 : t;
466
+ this.element[this.name] = t === _ ? void 0 : t;
467
467
  }
468
468
  }
469
- const Ee = z ? z.emptyScript : "";
470
- class xe extends rt {
469
+ const Ee = D ? D.emptyScript : "";
470
+ class xe extends nt {
471
471
  constructor() {
472
472
  super(...arguments), this.type = 4;
473
473
  }
474
474
  j(t) {
475
- t && t !== m ? this.element.setAttribute(this.name, Ee) : this.element.removeAttribute(this.name);
475
+ t && t !== _ ? this.element.setAttribute(this.name, Ee) : this.element.removeAttribute(this.name);
476
476
  }
477
477
  }
478
- class Se extends rt {
479
- constructor(t, e, s, i, r) {
480
- super(t, e, s, i, r), this.type = 5;
478
+ class Se extends nt {
479
+ constructor(t, e, s, r, n) {
480
+ super(t, e, s, r, n), this.type = 5;
481
481
  }
482
482
  _$AI(t, e = this) {
483
483
  var s;
484
- if ((t = (s = D(this, t, e, 0)) !== null && s !== void 0 ? s : m) === k)
484
+ if ((t = (s = B(this, t, e, 0)) !== null && s !== void 0 ? s : _) === U)
485
485
  return;
486
- const i = this._$AH, r = t === m && i !== m || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== m && (i === m || r);
487
- r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
486
+ const r = this._$AH, n = t === _ && r !== _ || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== _ && (r === _ || n);
487
+ n && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
488
  }
489
489
  handleEvent(t) {
490
490
  var e, s;
@@ -499,28 +499,28 @@ class be {
499
499
  return this._$AM._$AU;
500
500
  }
501
501
  _$AI(t) {
502
- D(this, t);
502
+ B(this, t);
503
503
  }
504
504
  }
505
505
  const zt = it.litHtmlPolyfillSupport;
506
- zt == null || zt(Q, X), ((at = it.litHtmlVersions) !== null && at !== void 0 ? at : it.litHtmlVersions = []).push("2.7.4");
507
- const we = (n, t, e) => {
508
- var s, i;
509
- const r = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
510
- let o = r._$litPart$;
506
+ zt == null || zt(Q, X), ((ut = it.litHtmlVersions) !== null && ut !== void 0 ? ut : it.litHtmlVersions = []).push("2.7.4");
507
+ const we = (i, t, e) => {
508
+ var s, r;
509
+ const n = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
510
+ let o = n._$litPart$;
511
511
  if (o === void 0) {
512
- const c = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : null;
513
- r._$litPart$ = o = new X(t.insertBefore(G(), c), c, void 0, e ?? {});
512
+ const c = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
513
+ n._$litPart$ = o = new X(t.insertBefore(G(), c), c, void 0, e ?? {});
514
514
  }
515
- return o._$AI(n), o;
515
+ return o._$AI(i), o;
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 dt, ft;
523
- class Y extends F {
522
+ var ft, pt;
523
+ class Y extends z {
524
524
  constructor() {
525
525
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
526
526
  }
@@ -542,65 +542,65 @@ class Y extends F {
542
542
  super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
543
543
  }
544
544
  render() {
545
- return k;
545
+ return U;
546
546
  }
547
547
  }
548
- Y.finalized = !0, Y._$litElement$ = !0, (dt = globalThis.litElementHydrateSupport) === null || dt === void 0 || dt.call(globalThis, { LitElement: Y });
548
+ Y.finalized = !0, Y._$litElement$ = !0, (ft = globalThis.litElementHydrateSupport) === null || ft === void 0 || ft.call(globalThis, { LitElement: Y });
549
549
  const Dt = globalThis.litElementPolyfillSupport;
550
550
  Dt == null || Dt({ LitElement: Y });
551
- ((ft = globalThis.litElementVersions) !== null && ft !== void 0 ? ft : globalThis.litElementVersions = []).push("3.3.2");
551
+ ((pt = globalThis.litElementVersions) !== null && pt !== void 0 ? pt : 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
- const Me = (n) => (t) => typeof t == "function" ? ((e, s) => (customElements.define(e, s), s))(n, t) : ((e, s) => {
558
- const { kind: i, elements: r } = s;
559
- return { kind: i, elements: r, finisher(o) {
557
+ const Me = (i) => (t) => typeof t == "function" ? ((e, s) => (customElements.define(e, s), s))(i, t) : ((e, s) => {
558
+ const { kind: r, elements: n } = s;
559
+ return { kind: r, elements: n, finisher(o) {
560
560
  customElements.define(e, o);
561
561
  } };
562
- })(n, t);
562
+ })(i, t);
563
563
  /**
564
564
  * @license
565
565
  * Copyright 2017 Google LLC
566
566
  * SPDX-License-Identifier: BSD-3-Clause
567
567
  */
568
- const Ce = (n, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
- e.createProperty(t.key, n);
568
+ const Re = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
+ e.createProperty(t.key, i);
570
570
  } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
571
  typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
572
572
  }, finisher(e) {
573
- e.createProperty(t.key, n);
573
+ e.createProperty(t.key, i);
574
574
  } };
575
- function wt(n) {
576
- return (t, e) => e !== void 0 ? ((s, i, r) => {
577
- i.constructor.createProperty(r, s);
578
- })(n, t, e) : Ce(n, t);
575
+ function Mt(i) {
576
+ return (t, e) => e !== void 0 ? ((s, r, n) => {
577
+ r.constructor.createProperty(n, s);
578
+ })(i, t, e) : Re(i, t);
579
579
  }
580
580
  /**
581
581
  * @license
582
582
  * Copyright 2017 Google LLC
583
583
  * SPDX-License-Identifier: BSD-3-Clause
584
584
  */
585
- function Mt(n) {
586
- return wt({ ...n, state: !0 });
585
+ function ot(i) {
586
+ return Mt({ ...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 pt;
594
- ((pt = window.HTMLSlotElement) === null || pt === void 0 ? void 0 : pt.prototype.assignedElements) != null;
593
+ var gt;
594
+ ((gt = window.HTMLSlotElement) === null || gt === void 0 ? void 0 : gt.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* V(n, t) {
601
- if (n !== void 0) {
600
+ function* V(i, t) {
601
+ if (i !== void 0) {
602
602
  let e = 0;
603
- for (const s of n)
603
+ for (const s of i)
604
604
  yield t(s, e++);
605
605
  }
606
606
  }
@@ -609,7 +609,7 @@ function* V(n, t) {
609
609
  * Copyright 2017 Google LLC
610
610
  * SPDX-License-Identifier: BSD-3-Clause
611
611
  */
612
- const Ie = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Re = (n) => (...t) => ({ _$litDirective$: n, values: t });
612
+ const Ce = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ie = (i) => (...t) => ({ _$litDirective$: i, values: t });
613
613
  class Le {
614
614
  constructor(t) {
615
615
  }
@@ -631,15 +631,15 @@ class Le {
631
631
  * Copyright 2017 Google LLC
632
632
  * SPDX-License-Identifier: BSD-3-Clause
633
633
  */
634
- class $t extends Le {
634
+ class vt extends Le {
635
635
  constructor(t) {
636
- if (super(t), this.et = m, t.type !== Ie.CHILD)
636
+ if (super(t), this.et = _, t.type !== Ce.CHILD)
637
637
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
638
638
  }
639
639
  render(t) {
640
- if (t === m || t == null)
640
+ if (t === _ || t == null)
641
641
  return this.ft = void 0, this.et = t;
642
- if (t === k)
642
+ if (t === U)
643
643
  return t;
644
644
  if (typeof t != "string")
645
645
  throw Error(this.constructor.directiveName + "() called with a non-string value");
@@ -650,53 +650,53 @@ class $t extends Le {
650
650
  return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
651
651
  }
652
652
  }
653
- $t.directiveName = "unsafeHTML", $t.resultType = 1;
654
- const Bt = Re($t);
655
- function x(n) {
656
- return Array.isArray ? Array.isArray(n) : se(n) === "[object Array]";
653
+ vt.directiveName = "unsafeHTML", vt.resultType = 1;
654
+ const Bt = Ie(vt);
655
+ function S(i) {
656
+ return Array.isArray ? Array.isArray(i) : se(i) === "[object Array]";
657
657
  }
658
- const Ne = 1 / 0;
659
- function Oe(n) {
660
- if (typeof n == "string")
661
- return n;
662
- let t = n + "";
663
- return t == "0" && 1 / n == -Ne ? "-0" : t;
658
+ const Oe = 1 / 0;
659
+ function ke(i) {
660
+ if (typeof i == "string")
661
+ return i;
662
+ let t = i + "";
663
+ return t == "0" && 1 / i == -Oe ? "-0" : t;
664
664
  }
665
- function Te(n) {
666
- return n == null ? "" : Oe(n);
665
+ function Ne(i) {
666
+ return i == null ? "" : ke(i);
667
667
  }
668
- function A(n) {
669
- return typeof n == "string";
668
+ function A(i) {
669
+ return typeof i == "string";
670
670
  }
671
- function te(n) {
672
- return typeof n == "number";
671
+ function te(i) {
672
+ return typeof i == "number";
673
673
  }
674
- function ke(n) {
675
- return n === !0 || n === !1 || Pe(n) && se(n) == "[object Boolean]";
674
+ function Pe(i) {
675
+ return i === !0 || i === !1 || Te(i) && se(i) == "[object Boolean]";
676
676
  }
677
- function ee(n) {
678
- return typeof n == "object";
677
+ function ee(i) {
678
+ return typeof i == "object";
679
679
  }
680
- function Pe(n) {
681
- return ee(n) && n !== null;
680
+ function Te(i) {
681
+ return ee(i) && i !== null;
682
682
  }
683
- function $(n) {
684
- return n != null;
683
+ function $(i) {
684
+ return i != null;
685
685
  }
686
- function gt(n) {
687
- return !n.trim().length;
686
+ function _t(i) {
687
+ return !i.trim().length;
688
688
  }
689
- function se(n) {
690
- return n == null ? n === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(n);
689
+ function se(i) {
690
+ return i == null ? i === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(i);
691
691
  }
692
- const He = "Incorrect 'index' type", Ue = (n) => `Invalid value for key ${n}`, je = (n) => `Pattern length exceeds max of ${n}.`, Fe = (n) => `Missing ${n} property in key`, ze = (n) => `Property 'weight' in key '${n}' must be a positive integer`, Wt = Object.prototype.hasOwnProperty;
692
+ const Ue = "Incorrect 'index' type", He = (i) => `Invalid value for key ${i}`, je = (i) => `Pattern length exceeds max of ${i}.`, Fe = (i) => `Missing ${i} property in key`, ze = (i) => `Property 'weight' in key '${i}' must be a positive integer`, Wt = Object.prototype.hasOwnProperty;
693
693
  class De {
694
694
  constructor(t) {
695
695
  this._keys = [], this._keyMap = {};
696
696
  let e = 0;
697
697
  t.forEach((s) => {
698
- let i = ie(s);
699
- e += i.weight, this._keys.push(i), this._keyMap[i.id] = i, e += i.weight;
698
+ let r = ie(s);
699
+ e += r.weight, this._keys.push(r), this._keyMap[r.id] = r, e += r.weight;
700
700
  }), this._keys.forEach((s) => {
701
701
  s.weight /= e;
702
702
  });
@@ -711,48 +711,48 @@ class De {
711
711
  return JSON.stringify(this._keys);
712
712
  }
713
713
  }
714
- function ie(n) {
715
- let t = null, e = null, s = null, i = 1, r = null;
716
- if (A(n) || x(n))
717
- s = n, t = Kt(n), e = vt(n);
714
+ function ie(i) {
715
+ let t = null, e = null, s = null, r = 1, n = null;
716
+ if (A(i) || S(i))
717
+ s = i, t = Kt(i), e = yt(i);
718
718
  else {
719
- if (!Wt.call(n, "name"))
719
+ if (!Wt.call(i, "name"))
720
720
  throw new Error(Fe("name"));
721
- const o = n.name;
722
- if (s = o, Wt.call(n, "weight") && (i = n.weight, i <= 0))
721
+ const o = i.name;
722
+ if (s = o, Wt.call(i, "weight") && (r = i.weight, r <= 0))
723
723
  throw new Error(ze(o));
724
- t = Kt(o), e = vt(o), r = n.getFn;
724
+ t = Kt(o), e = yt(o), n = i.getFn;
725
725
  }
726
- return { path: t, id: e, weight: i, src: s, getFn: r };
726
+ return { path: t, id: e, weight: r, src: s, getFn: n };
727
727
  }
728
- function Kt(n) {
729
- return x(n) ? n : n.split(".");
728
+ function Kt(i) {
729
+ return S(i) ? i : i.split(".");
730
730
  }
731
- function vt(n) {
732
- return x(n) ? n.join(".") : n;
731
+ function yt(i) {
732
+ return S(i) ? i.join(".") : i;
733
733
  }
734
- function Be(n, t) {
734
+ function Be(i, t) {
735
735
  let e = [], s = !1;
736
- const i = (r, o, c) => {
737
- if ($(r))
736
+ const r = (n, o, c) => {
737
+ if ($(n))
738
738
  if (!o[c])
739
- e.push(r);
739
+ e.push(n);
740
740
  else {
741
741
  let l = o[c];
742
- const h = r[l];
742
+ const h = n[l];
743
743
  if (!$(h))
744
744
  return;
745
- if (c === o.length - 1 && (A(h) || te(h) || ke(h)))
746
- e.push(Te(h));
747
- else if (x(h)) {
745
+ if (c === o.length - 1 && (A(h) || te(h) || Pe(h)))
746
+ e.push(Ne(h));
747
+ else if (S(h)) {
748
748
  s = !0;
749
- for (let u = 0, a = h.length; u < a; u += 1)
750
- i(h[u], o, c + 1);
749
+ for (let a = 0, u = h.length; a < u; a += 1)
750
+ r(h[a], o, c + 1);
751
751
  } else
752
- o.length && i(h, o, c + 1);
752
+ o.length && r(h, o, c + 1);
753
753
  }
754
754
  };
755
- return i(n, A(t) ? t.split(".") : t, 0), s ? e : e[0];
755
+ return r(i, A(t) ? t.split(".") : t, 0), s ? e : e[0];
756
756
  }
757
757
  const We = {
758
758
  // Whether the matches should be included in the result set. When `true`, each record in the result
@@ -775,7 +775,7 @@ const We = {
775
775
  // Whether to sort the result list, by score
776
776
  shouldSort: !0,
777
777
  // Default sort function: sort by ascending score, ascending index
778
- sortFn: (n, t) => n.score === t.score ? n.idx < t.idx ? -1 : 1 : n.score < t.score ? -1 : 1
778
+ sortFn: (i, t) => i.score === t.score ? i.idx < t.idx ? -1 : 1 : i.score < t.score ? -1 : 1
779
779
  }, Ve = {
780
780
  // Approximately where in the text is the pattern expected to be found?
781
781
  location: 0,
@@ -812,22 +812,22 @@ var f = {
812
812
  ...Ye
813
813
  };
814
814
  const Ge = /[^ ]+/g;
815
- function Je(n = 1, t = 3) {
815
+ function Je(i = 1, t = 3) {
816
816
  const e = /* @__PURE__ */ new Map(), s = Math.pow(10, t);
817
817
  return {
818
- get(i) {
819
- const r = i.match(Ge).length;
820
- if (e.has(r))
821
- return e.get(r);
822
- const o = 1 / Math.pow(r, 0.5 * n), c = parseFloat(Math.round(o * s) / s);
823
- return e.set(r, c), c;
818
+ get(r) {
819
+ const n = r.match(Ge).length;
820
+ if (e.has(n))
821
+ return e.get(n);
822
+ const o = 1 / Math.pow(n, 0.5 * i), c = parseFloat(Math.round(o * s) / s);
823
+ return e.set(n, c), c;
824
824
  },
825
825
  clear() {
826
826
  e.clear();
827
827
  }
828
828
  };
829
829
  }
830
- class Ct {
830
+ class Rt {
831
831
  constructor({
832
832
  getFn: t = f.getFn,
833
833
  fieldNormWeight: e = f.fieldNormWeight
@@ -870,7 +870,7 @@ class Ct {
870
870
  return this.records.length;
871
871
  }
872
872
  _addString(t, e) {
873
- if (!$(t) || gt(t))
873
+ if (!$(t) || _t(t))
874
874
  return;
875
875
  let s = {
876
876
  v: t,
@@ -881,37 +881,37 @@ class Ct {
881
881
  }
882
882
  _addObject(t, e) {
883
883
  let s = { i: e, $: {} };
884
- this.keys.forEach((i, r) => {
885
- let o = i.getFn ? i.getFn(t) : this.getFn(t, i.path);
884
+ this.keys.forEach((r, n) => {
885
+ let o = r.getFn ? r.getFn(t) : this.getFn(t, r.path);
886
886
  if ($(o)) {
887
- if (x(o)) {
887
+ if (S(o)) {
888
888
  let c = [];
889
889
  const l = [{ nestedArrIndex: -1, value: o }];
890
890
  for (; l.length; ) {
891
- const { nestedArrIndex: h, value: u } = l.pop();
892
- if ($(u))
893
- if (A(u) && !gt(u)) {
894
- let a = {
895
- v: u,
891
+ const { nestedArrIndex: h, value: a } = l.pop();
892
+ if ($(a))
893
+ if (A(a) && !_t(a)) {
894
+ let u = {
895
+ v: a,
896
896
  i: h,
897
- n: this.norm.get(u)
897
+ n: this.norm.get(a)
898
898
  };
899
- c.push(a);
899
+ c.push(u);
900
900
  } else
901
- x(u) && u.forEach((a, d) => {
901
+ S(a) && a.forEach((u, d) => {
902
902
  l.push({
903
903
  nestedArrIndex: d,
904
- value: a
904
+ value: u
905
905
  });
906
906
  });
907
907
  }
908
- s.$[r] = c;
909
- } else if (A(o) && !gt(o)) {
908
+ s.$[n] = c;
909
+ } else if (A(o) && !_t(o)) {
910
910
  let c = {
911
911
  v: o,
912
912
  n: this.norm.get(o)
913
913
  };
914
- s.$[r] = c;
914
+ s.$[n] = c;
915
915
  }
916
916
  }
917
917
  }), this.records.push(s);
@@ -923,40 +923,40 @@ class Ct {
923
923
  };
924
924
  }
925
925
  }
926
- function ne(n, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
927
- const i = new Ct({ getFn: e, fieldNormWeight: s });
928
- return i.setKeys(n.map(ie)), i.setSources(t), i.create(), i;
926
+ function re(i, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
927
+ const r = new Rt({ getFn: e, fieldNormWeight: s });
928
+ return r.setKeys(i.map(ie)), r.setSources(t), r.create(), r;
929
929
  }
930
- function Qe(n, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
931
- const { keys: s, records: i } = n, r = new Ct({ getFn: t, fieldNormWeight: e });
932
- return r.setKeys(s), r.setIndexRecords(i), r;
930
+ function Qe(i, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
931
+ const { keys: s, records: r } = i, n = new Rt({ getFn: t, fieldNormWeight: e });
932
+ return n.setKeys(s), n.setIndexRecords(r), n;
933
933
  }
934
- function tt(n, {
934
+ function tt(i, {
935
935
  errors: t = 0,
936
936
  currentLocation: e = 0,
937
937
  expectedLocation: s = 0,
938
- distance: i = f.distance,
939
- ignoreLocation: r = f.ignoreLocation
938
+ distance: r = f.distance,
939
+ ignoreLocation: n = f.ignoreLocation
940
940
  } = {}) {
941
- const o = t / n.length;
942
- if (r)
941
+ const o = t / i.length;
942
+ if (n)
943
943
  return o;
944
944
  const c = Math.abs(s - e);
945
- return i ? o + c / i : c ? 1 : o;
945
+ return r ? o + c / r : c ? 1 : o;
946
946
  }
947
- function Xe(n = [], t = f.minMatchCharLength) {
948
- let e = [], s = -1, i = -1, r = 0;
949
- for (let o = n.length; r < o; r += 1) {
950
- let c = n[r];
951
- c && s === -1 ? s = r : !c && s !== -1 && (i = r - 1, i - s + 1 >= t && e.push([s, i]), s = -1);
947
+ function Xe(i = [], t = f.minMatchCharLength) {
948
+ let e = [], s = -1, r = -1, n = 0;
949
+ for (let o = i.length; n < o; n += 1) {
950
+ let c = i[n];
951
+ c && s === -1 ? s = n : !c && s !== -1 && (r = n - 1, r - s + 1 >= t && e.push([s, r]), s = -1);
952
952
  }
953
- return n[r - 1] && r - s >= t && e.push([s, r - 1]), e;
953
+ return i[n - 1] && n - s >= t && e.push([s, n - 1]), e;
954
954
  }
955
955
  const N = 32;
956
- function Ze(n, t, e, {
956
+ function Ze(i, t, e, {
957
957
  location: s = f.location,
958
- distance: i = f.distance,
959
- threshold: r = f.threshold,
958
+ distance: r = f.distance,
959
+ threshold: n = f.threshold,
960
960
  findAllMatches: o = f.findAllMatches,
961
961
  minMatchCharLength: c = f.minMatchCharLength,
962
962
  includeMatches: l = f.includeMatches,
@@ -964,88 +964,88 @@ function Ze(n, t, e, {
964
964
  } = {}) {
965
965
  if (t.length > N)
966
966
  throw new Error(je(N));
967
- const u = t.length, a = n.length, d = Math.max(0, Math.min(s, a));
968
- let p = r, g = d;
969
- const _ = c > 1 || l, I = _ ? Array(a) : [];
967
+ const a = t.length, u = i.length, d = Math.max(0, Math.min(s, u));
968
+ let p = n, g = d;
969
+ const m = c > 1 || l, I = m ? Array(u) : [];
970
970
  let E;
971
- for (; (E = n.indexOf(t, g)) > -1; ) {
971
+ for (; (E = i.indexOf(t, g)) > -1; ) {
972
972
  let v = tt(t, {
973
973
  currentLocation: E,
974
974
  expectedLocation: d,
975
- distance: i,
975
+ distance: r,
976
976
  ignoreLocation: h
977
977
  });
978
- if (p = Math.min(v, p), g = E + u, _) {
979
- let S = 0;
980
- for (; S < u; )
981
- I[E + S] = 1, S += 1;
978
+ if (p = Math.min(v, p), g = E + a, m) {
979
+ let b = 0;
980
+ for (; b < a; )
981
+ I[E + b] = 1, b += 1;
982
982
  }
983
983
  }
984
984
  g = -1;
985
- let H = [], R = 1, Z = u + a;
986
- const he = 1 << u - 1;
987
- for (let v = 0; v < u; v += 1) {
988
- let S = 0, b = Z;
989
- for (; S < b; )
985
+ let j = [], L = 1, Z = a + u;
986
+ const he = 1 << a - 1;
987
+ for (let v = 0; v < a; v += 1) {
988
+ let b = 0, w = Z;
989
+ for (; b < w; )
990
990
  tt(t, {
991
991
  errors: v,
992
- currentLocation: d + b,
992
+ currentLocation: d + w,
993
993
  expectedLocation: d,
994
- distance: i,
994
+ distance: r,
995
995
  ignoreLocation: h
996
- }) <= p ? S = b : Z = b, b = Math.floor((Z - S) / 2 + S);
997
- Z = b;
998
- let It = Math.max(1, d - b + 1), lt = o ? a : Math.min(d + b, a) + u, U = Array(lt + 2);
999
- U[lt + 1] = (1 << v) - 1;
1000
- for (let y = lt; y >= It; y -= 1) {
1001
- let q = y - 1, Rt = e[n.charAt(q)];
1002
- if (_ && (I[q] = +!!Rt), U[y] = (U[y + 1] << 1 | 1) & Rt, v && (U[y] |= (H[y + 1] | H[y]) << 1 | 1 | H[y + 1]), U[y] & he && (R = tt(t, {
996
+ }) <= p ? b = w : Z = w, w = Math.floor((Z - b) / 2 + b);
997
+ Z = w;
998
+ let Ct = Math.max(1, d - w + 1), ct = o ? u : Math.min(d + w, u) + a, F = Array(ct + 2);
999
+ F[ct + 1] = (1 << v) - 1;
1000
+ for (let y = ct; y >= Ct; y -= 1) {
1001
+ let q = y - 1, It = e[i.charAt(q)];
1002
+ if (m && (I[q] = +!!It), F[y] = (F[y + 1] << 1 | 1) & It, v && (F[y] |= (j[y + 1] | j[y]) << 1 | 1 | j[y + 1]), F[y] & he && (L = tt(t, {
1003
1003
  errors: v,
1004
1004
  currentLocation: q,
1005
1005
  expectedLocation: d,
1006
- distance: i,
1006
+ distance: r,
1007
1007
  ignoreLocation: h
1008
- }), R <= p)) {
1009
- if (p = R, g = q, g <= d)
1008
+ }), L <= p)) {
1009
+ if (p = L, g = q, g <= d)
1010
1010
  break;
1011
- It = Math.max(1, 2 * d - g);
1011
+ Ct = Math.max(1, 2 * d - g);
1012
1012
  }
1013
1013
  }
1014
1014
  if (tt(t, {
1015
1015
  errors: v + 1,
1016
1016
  currentLocation: d,
1017
1017
  expectedLocation: d,
1018
- distance: i,
1018
+ distance: r,
1019
1019
  ignoreLocation: h
1020
1020
  }) > p)
1021
1021
  break;
1022
- H = U;
1022
+ j = F;
1023
1023
  }
1024
- const ot = {
1024
+ const lt = {
1025
1025
  isMatch: g >= 0,
1026
1026
  // Count exact matches (those with a score of 0) to be "almost" exact
1027
- score: Math.max(1e-3, R)
1027
+ score: Math.max(1e-3, L)
1028
1028
  };
1029
- if (_) {
1029
+ if (m) {
1030
1030
  const v = Xe(I, c);
1031
- v.length ? l && (ot.indices = v) : ot.isMatch = !1;
1031
+ v.length ? l && (lt.indices = v) : lt.isMatch = !1;
1032
1032
  }
1033
- return ot;
1033
+ return lt;
1034
1034
  }
1035
- function qe(n) {
1035
+ function qe(i) {
1036
1036
  let t = {};
1037
- for (let e = 0, s = n.length; e < s; e += 1) {
1038
- const i = n.charAt(e);
1039
- t[i] = (t[i] || 0) | 1 << s - e - 1;
1037
+ for (let e = 0, s = i.length; e < s; e += 1) {
1038
+ const r = i.charAt(e);
1039
+ t[r] = (t[r] || 0) | 1 << s - e - 1;
1040
1040
  }
1041
1041
  return t;
1042
1042
  }
1043
- class re {
1043
+ class ne {
1044
1044
  constructor(t, {
1045
1045
  location: e = f.location,
1046
1046
  threshold: s = f.threshold,
1047
- distance: i = f.distance,
1048
- includeMatches: r = f.includeMatches,
1047
+ distance: r = f.distance,
1048
+ includeMatches: n = f.includeMatches,
1049
1049
  findAllMatches: o = f.findAllMatches,
1050
1050
  minMatchCharLength: c = f.minMatchCharLength,
1051
1051
  isCaseSensitive: l = f.isCaseSensitive,
@@ -1054,32 +1054,32 @@ class re {
1054
1054
  if (this.options = {
1055
1055
  location: e,
1056
1056
  threshold: s,
1057
- distance: i,
1058
- includeMatches: r,
1057
+ distance: r,
1058
+ includeMatches: n,
1059
1059
  findAllMatches: o,
1060
1060
  minMatchCharLength: c,
1061
1061
  isCaseSensitive: l,
1062
1062
  ignoreLocation: h
1063
1063
  }, this.pattern = l ? t : t.toLowerCase(), this.chunks = [], !this.pattern.length)
1064
1064
  return;
1065
- const u = (d, p) => {
1065
+ const a = (d, p) => {
1066
1066
  this.chunks.push({
1067
1067
  pattern: d,
1068
1068
  alphabet: qe(d),
1069
1069
  startIndex: p
1070
1070
  });
1071
- }, a = this.pattern.length;
1072
- if (a > N) {
1071
+ }, u = this.pattern.length;
1072
+ if (u > N) {
1073
1073
  let d = 0;
1074
- const p = a % N, g = a - p;
1074
+ const p = u % N, g = u - p;
1075
1075
  for (; d < g; )
1076
- u(this.pattern.substr(d, N), d), d += N;
1076
+ a(this.pattern.substr(d, N), d), d += N;
1077
1077
  if (p) {
1078
- const _ = a - N;
1079
- u(this.pattern.substr(_), _);
1078
+ const m = u - N;
1079
+ a(this.pattern.substr(m), m);
1080
1080
  }
1081
1081
  } else
1082
- u(this.pattern, 0);
1082
+ a(this.pattern, 0);
1083
1083
  }
1084
1084
  searchIn(t) {
1085
1085
  const { isCaseSensitive: e, includeMatches: s } = this.options;
@@ -1091,31 +1091,31 @@ class re {
1091
1091
  return s && (g.indices = [[0, t.length - 1]]), g;
1092
1092
  }
1093
1093
  const {
1094
- location: i,
1095
- distance: r,
1094
+ location: r,
1095
+ distance: n,
1096
1096
  threshold: o,
1097
1097
  findAllMatches: c,
1098
1098
  minMatchCharLength: l,
1099
1099
  ignoreLocation: h
1100
1100
  } = this.options;
1101
- let u = [], a = 0, d = !1;
1102
- this.chunks.forEach(({ pattern: g, alphabet: _, startIndex: I }) => {
1103
- const { isMatch: E, score: H, indices: R } = Ze(t, g, _, {
1104
- location: i + I,
1105
- distance: r,
1101
+ let a = [], u = 0, d = !1;
1102
+ this.chunks.forEach(({ pattern: g, alphabet: m, startIndex: I }) => {
1103
+ const { isMatch: E, score: j, indices: L } = Ze(t, g, m, {
1104
+ location: r + I,
1105
+ distance: n,
1106
1106
  threshold: o,
1107
1107
  findAllMatches: c,
1108
1108
  minMatchCharLength: l,
1109
1109
  includeMatches: s,
1110
1110
  ignoreLocation: h
1111
1111
  });
1112
- E && (d = !0), a += H, E && R && (u = [...u, ...R]);
1112
+ E && (d = !0), u += j, E && L && (a = [...a, ...L]);
1113
1113
  });
1114
1114
  let p = {
1115
1115
  isMatch: d,
1116
- score: d ? a / this.chunks.length : 1
1116
+ score: d ? u / this.chunks.length : 1
1117
1117
  };
1118
- return d && s && (p.indices = u), p;
1118
+ return d && s && (p.indices = a), p;
1119
1119
  }
1120
1120
  }
1121
1121
  class C {
@@ -1131,8 +1131,8 @@ class C {
1131
1131
  search() {
1132
1132
  }
1133
1133
  }
1134
- function Vt(n, t) {
1135
- const e = n.match(t);
1134
+ function Vt(i, t) {
1135
+ const e = i.match(t);
1136
1136
  return e ? e[1] : null;
1137
1137
  }
1138
1138
  class ts extends C {
@@ -1223,7 +1223,7 @@ class is extends C {
1223
1223
  };
1224
1224
  }
1225
1225
  }
1226
- class ns extends C {
1226
+ class rs extends C {
1227
1227
  constructor(t) {
1228
1228
  super(t);
1229
1229
  }
@@ -1245,7 +1245,7 @@ class ns extends C {
1245
1245
  };
1246
1246
  }
1247
1247
  }
1248
- class rs extends C {
1248
+ class ns extends C {
1249
1249
  constructor(t) {
1250
1250
  super(t);
1251
1251
  }
@@ -1271,18 +1271,18 @@ class oe extends C {
1271
1271
  constructor(t, {
1272
1272
  location: e = f.location,
1273
1273
  threshold: s = f.threshold,
1274
- distance: i = f.distance,
1275
- includeMatches: r = f.includeMatches,
1274
+ distance: r = f.distance,
1275
+ includeMatches: n = f.includeMatches,
1276
1276
  findAllMatches: o = f.findAllMatches,
1277
1277
  minMatchCharLength: c = f.minMatchCharLength,
1278
1278
  isCaseSensitive: l = f.isCaseSensitive,
1279
1279
  ignoreLocation: h = f.ignoreLocation
1280
1280
  } = {}) {
1281
- super(t), this._bitapSearch = new re(t, {
1281
+ super(t), this._bitapSearch = new ne(t, {
1282
1282
  location: e,
1283
1283
  threshold: s,
1284
- distance: i,
1285
- includeMatches: r,
1284
+ distance: r,
1285
+ includeMatches: n,
1286
1286
  findAllMatches: o,
1287
1287
  minMatchCharLength: c,
1288
1288
  isCaseSensitive: l,
@@ -1317,49 +1317,49 @@ class le extends C {
1317
1317
  }
1318
1318
  search(t) {
1319
1319
  let e = 0, s;
1320
- const i = [], r = this.pattern.length;
1320
+ const r = [], n = this.pattern.length;
1321
1321
  for (; (s = t.indexOf(this.pattern, e)) > -1; )
1322
- e = s + r, i.push([s, e - 1]);
1323
- const o = !!i.length;
1322
+ e = s + n, r.push([s, e - 1]);
1323
+ const o = !!r.length;
1324
1324
  return {
1325
1325
  isMatch: o,
1326
1326
  score: o ? 0 : 1,
1327
- indices: i
1327
+ indices: r
1328
1328
  };
1329
1329
  }
1330
1330
  }
1331
- const yt = [
1331
+ const At = [
1332
1332
  ts,
1333
1333
  le,
1334
1334
  ss,
1335
1335
  is,
1336
- rs,
1337
1336
  ns,
1337
+ rs,
1338
1338
  es,
1339
1339
  oe
1340
- ], Yt = yt.length, os = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, ls = "|";
1341
- function cs(n, t = {}) {
1342
- return n.split(ls).map((e) => {
1343
- let s = e.trim().split(os).filter((r) => r && !!r.trim()), i = [];
1344
- for (let r = 0, o = s.length; r < o; r += 1) {
1345
- const c = s[r];
1340
+ ], Yt = At.length, os = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, ls = "|";
1341
+ function cs(i, t = {}) {
1342
+ return i.split(ls).map((e) => {
1343
+ let s = e.trim().split(os).filter((n) => n && !!n.trim()), r = [];
1344
+ for (let n = 0, o = s.length; n < o; n += 1) {
1345
+ const c = s[n];
1346
1346
  let l = !1, h = -1;
1347
1347
  for (; !l && ++h < Yt; ) {
1348
- const u = yt[h];
1349
- let a = u.isMultiMatch(c);
1350
- a && (i.push(new u(a, t)), l = !0);
1348
+ const a = At[h];
1349
+ let u = a.isMultiMatch(c);
1350
+ u && (r.push(new a(u, t)), l = !0);
1351
1351
  }
1352
1352
  if (!l)
1353
1353
  for (h = -1; ++h < Yt; ) {
1354
- const u = yt[h];
1355
- let a = u.isSingleMatch(c);
1356
- if (a) {
1357
- i.push(new u(a, t));
1354
+ const a = At[h];
1355
+ let u = a.isSingleMatch(c);
1356
+ if (u) {
1357
+ r.push(new a(u, t));
1358
1358
  break;
1359
1359
  }
1360
1360
  }
1361
1361
  }
1362
- return i;
1362
+ return r;
1363
1363
  });
1364
1364
  }
1365
1365
  const hs = /* @__PURE__ */ new Set([oe.type, le.type]);
@@ -1367,8 +1367,8 @@ class as {
1367
1367
  constructor(t, {
1368
1368
  isCaseSensitive: e = f.isCaseSensitive,
1369
1369
  includeMatches: s = f.includeMatches,
1370
- minMatchCharLength: i = f.minMatchCharLength,
1371
- ignoreLocation: r = f.ignoreLocation,
1370
+ minMatchCharLength: r = f.minMatchCharLength,
1371
+ ignoreLocation: n = f.ignoreLocation,
1372
1372
  findAllMatches: o = f.findAllMatches,
1373
1373
  location: c = f.location,
1374
1374
  threshold: l = f.threshold,
@@ -1377,9 +1377,9 @@ class as {
1377
1377
  this.query = null, this.options = {
1378
1378
  isCaseSensitive: e,
1379
1379
  includeMatches: s,
1380
- minMatchCharLength: i,
1380
+ minMatchCharLength: r,
1381
1381
  findAllMatches: o,
1382
- ignoreLocation: r,
1382
+ ignoreLocation: n,
1383
1383
  location: c,
1384
1384
  threshold: l,
1385
1385
  distance: h
@@ -1395,30 +1395,30 @@ class as {
1395
1395
  isMatch: !1,
1396
1396
  score: 1
1397
1397
  };
1398
- const { includeMatches: s, isCaseSensitive: i } = this.options;
1399
- t = i ? t : t.toLowerCase();
1400
- let r = 0, o = [], c = 0;
1398
+ const { includeMatches: s, isCaseSensitive: r } = this.options;
1399
+ t = r ? t : t.toLowerCase();
1400
+ let n = 0, o = [], c = 0;
1401
1401
  for (let l = 0, h = e.length; l < h; l += 1) {
1402
- const u = e[l];
1403
- o.length = 0, r = 0;
1404
- for (let a = 0, d = u.length; a < d; a += 1) {
1405
- const p = u[a], { isMatch: g, indices: _, score: I } = p.search(t);
1402
+ const a = e[l];
1403
+ o.length = 0, n = 0;
1404
+ for (let u = 0, d = a.length; u < d; u += 1) {
1405
+ const p = a[u], { isMatch: g, indices: m, score: I } = p.search(t);
1406
1406
  if (g) {
1407
- if (r += 1, c += I, s) {
1407
+ if (n += 1, c += I, s) {
1408
1408
  const E = p.constructor.type;
1409
- hs.has(E) ? o = [...o, ..._] : o.push(_);
1409
+ hs.has(E) ? o = [...o, ...m] : o.push(m);
1410
1410
  }
1411
1411
  } else {
1412
- c = 0, r = 0, o.length = 0;
1412
+ c = 0, n = 0, o.length = 0;
1413
1413
  break;
1414
1414
  }
1415
1415
  }
1416
- if (r) {
1417
- let a = {
1416
+ if (n) {
1417
+ let u = {
1418
1418
  isMatch: !0,
1419
- score: c / r
1419
+ score: c / n
1420
1420
  };
1421
- return s && (a.indices = o), a;
1421
+ return s && (u.indices = o), u;
1422
1422
  }
1423
1423
  }
1424
1424
  return {
@@ -1427,109 +1427,109 @@ class as {
1427
1427
  };
1428
1428
  }
1429
1429
  }
1430
- const At = [];
1431
- function us(...n) {
1432
- At.push(...n);
1430
+ const Et = [];
1431
+ function us(...i) {
1432
+ Et.push(...i);
1433
1433
  }
1434
- function Et(n, t) {
1435
- for (let e = 0, s = At.length; e < s; e += 1) {
1436
- let i = At[e];
1437
- if (i.condition(n, t))
1438
- return new i(n, t);
1434
+ function xt(i, t) {
1435
+ for (let e = 0, s = Et.length; e < s; e += 1) {
1436
+ let r = Et[e];
1437
+ if (r.condition(i, t))
1438
+ return new r(i, t);
1439
1439
  }
1440
- return new re(n, t);
1440
+ return new ne(i, t);
1441
1441
  }
1442
- const nt = {
1442
+ const rt = {
1443
1443
  AND: "$and",
1444
1444
  OR: "$or"
1445
- }, xt = {
1445
+ }, St = {
1446
1446
  PATH: "$path",
1447
1447
  PATTERN: "$val"
1448
- }, St = (n) => !!(n[nt.AND] || n[nt.OR]), ds = (n) => !!n[xt.PATH], fs = (n) => !x(n) && ee(n) && !St(n), Gt = (n) => ({
1449
- [nt.AND]: Object.keys(n).map((t) => ({
1450
- [t]: n[t]
1448
+ }, bt = (i) => !!(i[rt.AND] || i[rt.OR]), ds = (i) => !!i[St.PATH], fs = (i) => !S(i) && ee(i) && !bt(i), Gt = (i) => ({
1449
+ [rt.AND]: Object.keys(i).map((t) => ({
1450
+ [t]: i[t]
1451
1451
  }))
1452
1452
  });
1453
- function ce(n, t, { auto: e = !0 } = {}) {
1454
- const s = (i) => {
1455
- let r = Object.keys(i);
1456
- const o = ds(i);
1457
- if (!o && r.length > 1 && !St(i))
1458
- return s(Gt(i));
1459
- if (fs(i)) {
1460
- const l = o ? i[xt.PATH] : r[0], h = o ? i[xt.PATTERN] : i[l];
1453
+ function ce(i, t, { auto: e = !0 } = {}) {
1454
+ const s = (r) => {
1455
+ let n = Object.keys(r);
1456
+ const o = ds(r);
1457
+ if (!o && n.length > 1 && !bt(r))
1458
+ return s(Gt(r));
1459
+ if (fs(r)) {
1460
+ const l = o ? r[St.PATH] : n[0], h = o ? r[St.PATTERN] : r[l];
1461
1461
  if (!A(h))
1462
- throw new Error(Ue(l));
1463
- const u = {
1464
- keyId: vt(l),
1462
+ throw new Error(He(l));
1463
+ const a = {
1464
+ keyId: yt(l),
1465
1465
  pattern: h
1466
1466
  };
1467
- return e && (u.searcher = Et(h, t)), u;
1467
+ return e && (a.searcher = xt(h, t)), a;
1468
1468
  }
1469
1469
  let c = {
1470
1470
  children: [],
1471
- operator: r[0]
1471
+ operator: n[0]
1472
1472
  };
1473
- return r.forEach((l) => {
1474
- const h = i[l];
1475
- x(h) && h.forEach((u) => {
1476
- c.children.push(s(u));
1473
+ return n.forEach((l) => {
1474
+ const h = r[l];
1475
+ S(h) && h.forEach((a) => {
1476
+ c.children.push(s(a));
1477
1477
  });
1478
1478
  }), c;
1479
1479
  };
1480
- return St(n) || (n = Gt(n)), s(n);
1480
+ return bt(i) || (i = Gt(i)), s(i);
1481
1481
  }
1482
- function ps(n, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
1483
- n.forEach((e) => {
1482
+ function ps(i, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
1483
+ i.forEach((e) => {
1484
1484
  let s = 1;
1485
- e.matches.forEach(({ key: i, norm: r, score: o }) => {
1486
- const c = i ? i.weight : null;
1485
+ e.matches.forEach(({ key: r, norm: n, score: o }) => {
1486
+ const c = r ? r.weight : null;
1487
1487
  s *= Math.pow(
1488
1488
  o === 0 && c ? Number.EPSILON : o,
1489
- (c || 1) * (t ? 1 : r)
1489
+ (c || 1) * (t ? 1 : n)
1490
1490
  );
1491
1491
  }), e.score = s;
1492
1492
  });
1493
1493
  }
1494
- function gs(n, t) {
1495
- const e = n.matches;
1494
+ function gs(i, t) {
1495
+ const e = i.matches;
1496
1496
  t.matches = [], $(e) && e.forEach((s) => {
1497
1497
  if (!$(s.indices) || !s.indices.length)
1498
1498
  return;
1499
- const { indices: i, value: r } = s;
1499
+ const { indices: r, value: n } = s;
1500
1500
  let o = {
1501
- indices: i,
1502
- value: r
1501
+ indices: r,
1502
+ value: n
1503
1503
  };
1504
1504
  s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx), t.matches.push(o);
1505
1505
  });
1506
1506
  }
1507
- function ms(n, t) {
1508
- t.score = n.score;
1507
+ function _s(i, t) {
1508
+ t.score = i.score;
1509
1509
  }
1510
- function _s(n, t, {
1510
+ function ms(i, t, {
1511
1511
  includeMatches: e = f.includeMatches,
1512
1512
  includeScore: s = f.includeScore
1513
1513
  } = {}) {
1514
- const i = [];
1515
- return e && i.push(gs), s && i.push(ms), n.map((r) => {
1516
- const { idx: o } = r, c = {
1514
+ const r = [];
1515
+ return e && r.push(gs), s && r.push(_s), i.map((n) => {
1516
+ const { idx: o } = n, c = {
1517
1517
  item: t[o],
1518
1518
  refIndex: o
1519
1519
  };
1520
- return i.length && i.forEach((l) => {
1521
- l(r, c);
1520
+ return r.length && r.forEach((l) => {
1521
+ l(n, c);
1522
1522
  }), c;
1523
1523
  });
1524
1524
  }
1525
- class B {
1525
+ class W {
1526
1526
  constructor(t, e = {}, s) {
1527
1527
  this.options = { ...f, ...e }, this.options.useExtendedSearch, this._keyStore = new De(this.options.keys), this.setCollection(t, s);
1528
1528
  }
1529
1529
  setCollection(t, e) {
1530
- if (this._docs = t, e && !(e instanceof Ct))
1531
- throw new Error(He);
1532
- this._myIndex = e || ne(this.options.keys, this._docs, {
1530
+ if (this._docs = t, e && !(e instanceof Rt))
1531
+ throw new Error(Ue);
1532
+ this._myIndex = e || re(this.options.keys, this._docs, {
1533
1533
  getFn: this.options.getFn,
1534
1534
  fieldNormWeight: this.options.fieldNormWeight
1535
1535
  });
@@ -1539,9 +1539,9 @@ class B {
1539
1539
  }
1540
1540
  remove(t = () => !1) {
1541
1541
  const e = [];
1542
- for (let s = 0, i = this._docs.length; s < i; s += 1) {
1543
- const r = this._docs[s];
1544
- t(r, s) && (this.removeAt(s), s -= 1, i -= 1, e.push(r));
1542
+ for (let s = 0, r = this._docs.length; s < r; s += 1) {
1543
+ const n = this._docs[s];
1544
+ t(n, s) && (this.removeAt(s), s -= 1, r -= 1, e.push(n));
1545
1545
  }
1546
1546
  return e;
1547
1547
  }
@@ -1554,36 +1554,36 @@ class B {
1554
1554
  search(t, { limit: e = -1 } = {}) {
1555
1555
  const {
1556
1556
  includeMatches: s,
1557
- includeScore: i,
1558
- shouldSort: r,
1557
+ includeScore: r,
1558
+ shouldSort: n,
1559
1559
  sortFn: o,
1560
1560
  ignoreFieldNorm: c
1561
1561
  } = this.options;
1562
1562
  let l = A(t) ? A(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
1563
- return ps(l, { ignoreFieldNorm: c }), r && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), _s(l, this._docs, {
1563
+ return ps(l, { ignoreFieldNorm: c }), n && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), ms(l, this._docs, {
1564
1564
  includeMatches: s,
1565
- includeScore: i
1565
+ includeScore: r
1566
1566
  });
1567
1567
  }
1568
1568
  _searchStringList(t) {
1569
- const e = Et(t, this.options), { records: s } = this._myIndex, i = [];
1570
- return s.forEach(({ v: r, i: o, n: c }) => {
1571
- if (!$(r))
1569
+ const e = xt(t, this.options), { records: s } = this._myIndex, r = [];
1570
+ return s.forEach(({ v: n, i: o, n: c }) => {
1571
+ if (!$(n))
1572
1572
  return;
1573
- const { isMatch: l, score: h, indices: u } = e.searchIn(r);
1574
- l && i.push({
1575
- item: r,
1573
+ const { isMatch: l, score: h, indices: a } = e.searchIn(n);
1574
+ l && r.push({
1575
+ item: n,
1576
1576
  idx: o,
1577
- matches: [{ score: h, value: r, norm: c, indices: u }]
1577
+ matches: [{ score: h, value: n, norm: c, indices: a }]
1578
1578
  });
1579
- }), i;
1579
+ }), r;
1580
1580
  }
1581
1581
  _searchLogical(t) {
1582
1582
  const e = ce(t, this.options), s = (c, l, h) => {
1583
1583
  if (!c.children) {
1584
- const { keyId: a, searcher: d } = c, p = this._findMatches({
1585
- key: this._keyStore.get(a),
1586
- value: this._myIndex.getValueForItemAtKeyId(l, a),
1584
+ const { keyId: u, searcher: d } = c, p = this._findMatches({
1585
+ key: this._keyStore.get(u),
1586
+ value: this._myIndex.getValueForItemAtKeyId(l, u),
1587
1587
  searcher: d
1588
1588
  });
1589
1589
  return p && p.length ? [
@@ -1594,105 +1594,105 @@ class B {
1594
1594
  }
1595
1595
  ] : [];
1596
1596
  }
1597
- const u = [];
1598
- for (let a = 0, d = c.children.length; a < d; a += 1) {
1599
- const p = c.children[a], g = s(p, l, h);
1597
+ const a = [];
1598
+ for (let u = 0, d = c.children.length; u < d; u += 1) {
1599
+ const p = c.children[u], g = s(p, l, h);
1600
1600
  if (g.length)
1601
- u.push(...g);
1602
- else if (c.operator === nt.AND)
1601
+ a.push(...g);
1602
+ else if (c.operator === rt.AND)
1603
1603
  return [];
1604
1604
  }
1605
- return u;
1606
- }, i = this._myIndex.records, r = {}, o = [];
1607
- return i.forEach(({ $: c, i: l }) => {
1605
+ return a;
1606
+ }, r = this._myIndex.records, n = {}, o = [];
1607
+ return r.forEach(({ $: c, i: l }) => {
1608
1608
  if ($(c)) {
1609
1609
  let h = s(e, c, l);
1610
- h.length && (r[l] || (r[l] = { idx: l, item: c, matches: [] }, o.push(r[l])), h.forEach(({ matches: u }) => {
1611
- r[l].matches.push(...u);
1610
+ h.length && (n[l] || (n[l] = { idx: l, item: c, matches: [] }, o.push(n[l])), h.forEach(({ matches: a }) => {
1611
+ n[l].matches.push(...a);
1612
1612
  }));
1613
1613
  }
1614
1614
  }), o;
1615
1615
  }
1616
1616
  _searchObjectList(t) {
1617
- const e = Et(t, this.options), { keys: s, records: i } = this._myIndex, r = [];
1618
- return i.forEach(({ $: o, i: c }) => {
1617
+ const e = xt(t, this.options), { keys: s, records: r } = this._myIndex, n = [];
1618
+ return r.forEach(({ $: o, i: c }) => {
1619
1619
  if (!$(o))
1620
1620
  return;
1621
1621
  let l = [];
1622
- s.forEach((h, u) => {
1622
+ s.forEach((h, a) => {
1623
1623
  l.push(
1624
1624
  ...this._findMatches({
1625
1625
  key: h,
1626
- value: o[u],
1626
+ value: o[a],
1627
1627
  searcher: e
1628
1628
  })
1629
1629
  );
1630
- }), l.length && r.push({
1630
+ }), l.length && n.push({
1631
1631
  idx: c,
1632
1632
  item: o,
1633
1633
  matches: l
1634
1634
  });
1635
- }), r;
1635
+ }), n;
1636
1636
  }
1637
1637
  _findMatches({ key: t, value: e, searcher: s }) {
1638
1638
  if (!$(e))
1639
1639
  return [];
1640
- let i = [];
1641
- if (x(e))
1642
- e.forEach(({ v: r, i: o, n: c }) => {
1643
- if (!$(r))
1640
+ let r = [];
1641
+ if (S(e))
1642
+ e.forEach(({ v: n, i: o, n: c }) => {
1643
+ if (!$(n))
1644
1644
  return;
1645
- const { isMatch: l, score: h, indices: u } = s.searchIn(r);
1646
- l && i.push({
1645
+ const { isMatch: l, score: h, indices: a } = s.searchIn(n);
1646
+ l && r.push({
1647
1647
  score: h,
1648
1648
  key: t,
1649
- value: r,
1649
+ value: n,
1650
1650
  idx: o,
1651
1651
  norm: c,
1652
- indices: u
1652
+ indices: a
1653
1653
  });
1654
1654
  });
1655
1655
  else {
1656
- const { v: r, n: o } = e, { isMatch: c, score: l, indices: h } = s.searchIn(r);
1657
- c && i.push({ score: l, key: t, value: r, norm: o, indices: h });
1656
+ const { v: n, n: o } = e, { isMatch: c, score: l, indices: h } = s.searchIn(n);
1657
+ c && r.push({ score: l, key: t, value: n, norm: o, indices: h });
1658
1658
  }
1659
- return i;
1659
+ return r;
1660
1660
  }
1661
1661
  }
1662
- B.version = "6.6.2";
1663
- B.createIndex = ne;
1664
- B.parseIndex = Qe;
1665
- B.config = f;
1666
- B.parseQuery = ce;
1662
+ W.version = "6.6.2";
1663
+ W.createIndex = re;
1664
+ W.parseIndex = Qe;
1665
+ W.config = f;
1666
+ W.parseQuery = ce;
1667
1667
  us(as);
1668
- const $s = (n, t = "highlight") => {
1669
- const e = (i, r, o) => {
1670
- const c = r.split(".");
1671
- let l;
1672
- for (l = 0; l < c.length - 1; l++)
1673
- i = i[c[l]];
1674
- i[c[l]] = o;
1675
- }, s = (i, r = []) => {
1676
- let o = "", c = 0;
1677
- return r.forEach((l) => {
1678
- const h = l[1] + 1;
1679
- o += [
1680
- i.substring(c, l[0]),
1668
+ const $s = (i, t = "highlight", e = "title") => {
1669
+ const s = (n, o, c) => {
1670
+ const l = o.split(".");
1671
+ let h;
1672
+ for (h = 0; h < l.length - 1; h++)
1673
+ n = n[l[h]];
1674
+ n[l[h]] = c;
1675
+ }, r = (n, o = []) => {
1676
+ let c = "", l = 0;
1677
+ return o.forEach((h) => {
1678
+ const a = h[1] + 1;
1679
+ c += [
1680
+ n.substring(l, h[0]),
1681
1681
  `<mark class="${t}">`,
1682
- i.substring(l[0], h),
1682
+ n.substring(h[0], a),
1683
1683
  "</mark>"
1684
- ].join(""), c = h;
1685
- }), o += i.substring(c), o;
1684
+ ].join(""), l = a;
1685
+ }), c += n.substring(l), c;
1686
1686
  };
1687
- return n.filter(({ matches: i }) => i && i.length).map(({ item: i, matches: r }) => {
1688
- const o = { ...i };
1689
- return r.forEach((c) => {
1690
- c.key === "name" && e(
1691
- o,
1692
- c.key,
1693
- s(c.value, c.indices)
1687
+ return i.filter(({ matches: n }) => n && n.length).map(({ item: n, matches: o }) => {
1688
+ const c = { ...n };
1689
+ return o.forEach((l) => {
1690
+ l.key === e && s(
1691
+ c,
1692
+ l.key,
1693
+ r(l.value, l.indices)
1694
1694
  );
1695
- }), o;
1695
+ }), c;
1696
1696
  });
1697
1697
  }, vs = `
1698
1698
  :host {
@@ -1761,7 +1761,7 @@ details summary {
1761
1761
  #details-results[open] summary svg {
1762
1762
  transform: rotate(0deg);
1763
1763
  }
1764
- li span,
1764
+ #details-filter li span,
1765
1765
  details summary {
1766
1766
  text-transform: capitalize;
1767
1767
  }
@@ -1780,6 +1780,7 @@ input[type="radio"] {
1780
1780
  input[type="text"] {
1781
1781
  width: 100%;
1782
1782
  margin-bottom: 0.5rem;
1783
+ padding: 5px 7px;
1783
1784
  }
1784
1785
  section {
1785
1786
  padding-left: 1rem;
@@ -1803,26 +1804,31 @@ ul#results {
1803
1804
  ul#results li {
1804
1805
  padding-left: 0.5rem;
1805
1806
  }
1807
+ #filter-reset {
1808
+ cursor: pointer;
1809
+ }
1806
1810
  .scroll {
1807
1811
  height: 100%;
1808
1812
  overflow-x: hidden;
1809
1813
  overflow-y: auto;
1810
1814
  }
1811
1815
  `;
1812
- var ys = Object.defineProperty, As = Object.getOwnPropertyDescriptor, W = (n, t, e, s) => {
1813
- for (var i = s > 1 ? void 0 : s ? As(t, e) : t, r = n.length - 1, o; r >= 0; r--)
1814
- (o = n[r]) && (i = (s ? o(t, e, i) : o(i)) || i);
1815
- return s && i && ys(t, e, i), i;
1816
+ var ys = Object.defineProperty, As = Object.getOwnPropertyDescriptor, H = (i, t, e, s) => {
1817
+ for (var r = s > 1 ? void 0 : s ? As(t, e) : t, n = i.length - 1, o; n >= 0; n--)
1818
+ (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
1819
+ return s && r && ys(t, e, r), r;
1816
1820
  };
1817
- let P = class extends Y {
1821
+ let R = class extends Y {
1818
1822
  constructor() {
1819
1823
  super(...arguments);
1820
- w(this, "_fuse");
1821
- w(this, "_resultAggregation", []);
1822
- w(this, "_items", []);
1823
- w(this, "_results", []);
1824
- w(this, "_filters", {});
1825
- w(this, "config", {
1824
+ x(this, "_fuse");
1825
+ x(this, "_resultAggregation", []);
1826
+ x(this, "_items", []);
1827
+ x(this, "_results", []);
1828
+ x(this, "_filters", {});
1829
+ x(this, "_selectedResult");
1830
+ x(this, "config", {
1831
+ titleProperty: "title",
1826
1832
  filterProperties: ["themes"],
1827
1833
  aggregateResults: "themes",
1828
1834
  fuseConfig: {},
@@ -1833,22 +1839,26 @@ let P = class extends Y {
1833
1839
  matchAllWhenEmpty: !0,
1834
1840
  exclusiveFilters: !1
1835
1841
  });
1836
- w(this, "apply", (t) => {
1837
- this._items = t, this._fuse = new B(this._items, {
1838
- minMatchCharLength: 1,
1842
+ x(this, "apply", (t) => {
1843
+ this._items = t.map((e, s) => ({
1844
+ ...e,
1845
+ id: `item-${s}`
1846
+ })), this._fuse = new W(this._items, {
1847
+ minMatchCharLength: 3,
1848
+ // location: 0,
1849
+ threshold: 0.4,
1850
+ distance: 50,
1839
1851
  includeMatches: !0,
1840
- // Search in same fields as specified by filter properties, plus name
1841
- keys: ["name", ...this.config.filterProperties],
1842
1852
  useExtendedSearch: !0,
1843
1853
  ...this.config.fuseConfig
1844
1854
  }), this.config.filterProperties.forEach((e) => {
1845
1855
  const s = {};
1846
- this._items.forEach((i) => {
1847
- Array.isArray(i[e]) ? i[e].forEach((r) => {
1848
- s[r] = void 0;
1849
- }) : s[i[e]] = void 0;
1856
+ this._items.forEach((r) => {
1857
+ Array.isArray(r[e]) ? r[e].forEach((n) => {
1858
+ s[n] = void 0;
1859
+ }) : s[r[e]] = void 0;
1850
1860
  }), this._filters[e] = s;
1851
- }), this.config.matchAllWhenEmpty !== !1 && (this._results = this._items, this.requestUpdate()), this.config.aggregateResults && (this._resultAggregation = [
1861
+ }), this.config.matchAllWhenEmpty !== !1 && (this._results = this.sortResults(this._items), this.requestUpdate()), this.config.aggregateResults && (this._resultAggregation = [
1852
1862
  ...new Set(
1853
1863
  this._items.reduce((e, s) => e.concat(s[this.config.aggregateResults]), [])
1854
1864
  )
@@ -1857,55 +1867,105 @@ let P = class extends Y {
1857
1867
  }
1858
1868
  search(t = "", e = this._filters) {
1859
1869
  const s = Object.entries(e).reduce(
1860
- (r, [o, c]) => {
1870
+ (n, [o, c]) => {
1861
1871
  const l = (h) => {
1862
- const u = {};
1863
- u[o] = `=${h}`, r.push(u);
1872
+ const a = {};
1873
+ a[o] = `="${h}"`, n.push(a);
1864
1874
  };
1865
- return Object.entries(c).filter(([h, u]) => u).forEach(([h, u]) => l(h)), r;
1875
+ return Object.entries(c).filter(([h, a]) => a).forEach(([h, a]) => l(h)), n;
1866
1876
  },
1867
1877
  []
1868
1878
  );
1869
- let i;
1870
- if (!t.length && !s.length && this.config.matchAllWhenEmpty !== !1)
1871
- i = this._items;
1879
+ let r;
1880
+ if (!(t.length > 2) && !s.length && this.config.matchAllWhenEmpty !== !1)
1881
+ r = this._items;
1872
1882
  else {
1873
- const r = {
1874
- ...t.length && s.length ? {
1883
+ const n = {
1884
+ ...t.length > 2 && s.length ? {
1875
1885
  $and: [
1876
- { name: t },
1886
+ {
1887
+ $or: [
1888
+ // @ts-ignore
1889
+ ...this.config.fuseConfig.keys.map((c) => ({
1890
+ [c]: t
1891
+ }))
1892
+ ]
1893
+ },
1877
1894
  {
1878
1895
  $or: s
1879
1896
  }
1880
1897
  ]
1881
1898
  } : {
1882
1899
  $or: [
1883
- { name: t },
1900
+ // @ts-ignore
1901
+ ...this.config.fuseConfig.keys.map((c) => ({
1902
+ [c]: t
1903
+ })),
1884
1904
  {
1885
1905
  $or: s
1886
1906
  }
1887
1907
  ]
1888
1908
  }
1889
- }, o = this._fuse.search(r);
1890
- i = this.config.enableHighlighting ? $s(o) : o.map((c) => c.item);
1909
+ }, o = this._fuse.search(n);
1910
+ r = this.config.enableHighlighting ? $s(o, "highlight", this.config.titleProperty) : o.map((c) => c.item);
1891
1911
  }
1892
- this._results = i, this.requestUpdate();
1912
+ this._results = this.sortResults(r), this.requestUpdate();
1893
1913
  }
1894
1914
  aggregateResults(t, e) {
1895
1915
  return t.filter((s) => {
1896
- const i = s[this.config.aggregateResults];
1897
- return Array.isArray(i) ? i.includes(e) : i === e;
1916
+ const r = s[this.config.aggregateResults], n = Object.keys(
1917
+ // @ts-ignore
1918
+ this._filters[this.config.aggregateResults]
1919
+ // @ts-ignore
1920
+ ).filter((c) => this._filters[this.config.aggregateResults][c]);
1921
+ return (n.length ? (
1922
+ // @ts-ignore
1923
+ n.includes(e)
1924
+ ) : !0) && Array.isArray(r) ? r.includes(e) : r === e;
1898
1925
  });
1899
1926
  }
1927
+ sortResults(t) {
1928
+ return [...t].sort(
1929
+ (e, s) => (
1930
+ // @ts-ignore
1931
+ e[this.config.titleProperty] < s[this.config.titleProperty] ? -1 : 1
1932
+ )
1933
+ );
1934
+ }
1900
1935
  toggleFilter(t, e) {
1901
- this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((s) => {
1902
- Object.keys(this._filters[s]).forEach((i) => {
1903
- this._filters[s][i] = !1;
1936
+ this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((n) => {
1937
+ Object.keys(this._filters[n]).forEach((o) => {
1938
+ this._filters[n][o] = !1;
1939
+ });
1940
+ }), this._filters[t][e] = !this._filters[t][e];
1941
+ const s = this.renderRoot.querySelector('input[type="text"]');
1942
+ s ? this.search(s.value) : this.search();
1943
+ const r = this.renderRoot.querySelectorAll(
1944
+ "ul#results input[type='radio']"
1945
+ );
1946
+ for (let n = 0; n < r.length; n++)
1947
+ r[n].checked = !1;
1948
+ this._selectedResult && setTimeout(() => {
1949
+ const n = this.renderRoot.querySelector(
1950
+ // @ts-ignore
1951
+ `#${this._selectedResult.id}`
1952
+ );
1953
+ n && (n.checked = !0, this.requestUpdate());
1954
+ });
1955
+ }
1956
+ resetFilters() {
1957
+ this.renderRoot.querySelectorAll("#details-filter input").forEach((e) => {
1958
+ e.checked = !1;
1959
+ });
1960
+ const t = this.renderRoot.querySelector('input[type="text"]');
1961
+ t && (t.value = ""), Object.keys(this._filters).forEach((e) => {
1962
+ Object.keys(this._filters[e]).forEach((s) => {
1963
+ this._filters[e][s] = !1;
1904
1964
  });
1905
- }), this._filters[t][e] = !this._filters[t][e], console.log(this._filters), this.search();
1965
+ }), this.search(), this.requestUpdate();
1906
1966
  }
1907
1967
  render() {
1908
- return j`
1968
+ return k`
1909
1969
  <style>
1910
1970
  ${vs}
1911
1971
  </style>
@@ -1923,8 +1983,14 @@ let P = class extends Y {
1923
1983
  <ul id="filters">
1924
1984
  ${V(
1925
1985
  this.config.filterProperties,
1926
- (t) => j`
1927
- <details id="details-filter">
1986
+ (t) => k`
1987
+ <details
1988
+ id="details-filter"
1989
+ data-filter="${t}"
1990
+ @click=${() => this.renderRoot.querySelectorAll("details#details-filter").forEach((e) => {
1991
+ e.getAttribute("data-filter") !== t && (e.removeAttribute("open"), this.requestUpdate());
1992
+ })}
1993
+ >
1928
1994
  <summary>
1929
1995
  <small>
1930
1996
  <strong class="title"> ${t} </strong>
@@ -1941,37 +2007,43 @@ let P = class extends Y {
1941
2007
  </svg>
1942
2008
  </div>
1943
2009
  </summary>
1944
- <ul>
1945
- ${// @ts-ignore
2010
+ <div class="scroll" style="max-height: 150px">
2011
+ <ul>
2012
+ ${// @ts-ignore
1946
2013
  this._filters[t] ? V(
1947
2014
  // @ts-ignore
1948
2015
  Object.keys(this._filters[t]).sort(),
1949
- (e) => j`
1950
- <li>
1951
- <label>
1952
- <input
1953
- name="selection"
1954
- type="${this.config.exclusiveFilters === !0 ? "radio" : "checkbox"}"
1955
- checked="${// @ts-ignore
1956
- this._filters[t][e] || m}"
1957
- @click=${() => this.toggleFilter(t, e)}
1958
- />
1959
- <span class="title">${e}</span>
1960
- </label>
1961
- </li>
1962
- `
2016
+ (e) => k`
2017
+ <li>
2018
+ <label>
2019
+ <input
2020
+ name="selection"
2021
+ type="${this.config.exclusiveFilters === !0 ? "radio" : "checkbox"}"
2022
+ checked="${// @ts-ignore
2023
+ this._filters[t][e] || _}"
2024
+ @click=${() => this.toggleFilter(t, e)}
2025
+ />
2026
+ <span class="title">${e}</span>
2027
+ </label>
2028
+ </li>
2029
+ `
1963
2030
  ) : null}
1964
- </ul>
2031
+ </ul>
2032
+ </div>
1965
2033
  </details>
1966
2034
  `
1967
2035
  )}
1968
2036
  </ul>
2037
+ <a id="filter-reset" @click=${() => this.resetFilters()}
2038
+ ><small>Reset filters</small></a
2039
+ >
1969
2040
  </section>
1970
2041
  <section id="section-results">
1971
2042
  <div>
1972
2043
  <slot name="resultstitle"></slot>
1973
2044
  </div>
1974
2045
  <div id="container-results" class="scroll">
2046
+ ${this._results.length < 1 ? k` <small class="no-results">No matching items</small> ` : _}
1975
2047
  <ul id="results">
1976
2048
  ${this.config.aggregateResults ? V(
1977
2049
  this._resultAggregation.filter(
@@ -1980,7 +2052,7 @@ let P = class extends Y {
1980
2052
  t
1981
2053
  ).length
1982
2054
  ),
1983
- (t) => j`<details
2055
+ (t) => k`<details
1984
2056
  id="details-results"
1985
2057
  open
1986
2058
  >
@@ -2009,17 +2081,21 @@ let P = class extends Y {
2009
2081
  t
2010
2082
  ),
2011
2083
  // @ts-ignore
2012
- (e) => j`
2084
+ (e) => k`
2013
2085
  <li>
2014
2086
  <label>
2015
2087
  <input
2016
2088
  type="radio"
2017
2089
  name="result"
2018
- @click=${() => this.config.onSelect(e)}
2090
+ id="${// @ts-ignore
2091
+ e.id}"
2092
+ @click=${() => {
2093
+ this._selectedResult = e, this.config.onSelect(e);
2094
+ }}
2019
2095
  />
2020
2096
  <span class="title"
2021
2097
  >${// @ts-ignore
2022
- Bt(e.name)}</span
2098
+ Bt(e[this.config.titleProperty])}</span
2023
2099
  >
2024
2100
  </label>
2025
2101
  </li>
@@ -2030,7 +2106,10 @@ let P = class extends Y {
2030
2106
  ) : V(
2031
2107
  this._results,
2032
2108
  // @ts-ignore
2033
- (t) => j`<li>${Bt(t.name)}</li>`
2109
+ (t) => k`<li>
2110
+ ${// @ts-ignore
2111
+ Bt(t[this.config.titleProperty])}
2112
+ </li>`
2034
2113
  )}
2035
2114
  </ul>
2036
2115
  </div>
@@ -2039,24 +2118,27 @@ let P = class extends Y {
2039
2118
  `;
2040
2119
  }
2041
2120
  };
2042
- W([
2043
- Mt()
2044
- ], P.prototype, "_items", 2);
2045
- W([
2046
- Mt()
2047
- ], P.prototype, "_results", 2);
2048
- W([
2121
+ H([
2122
+ ot()
2123
+ ], R.prototype, "_items", 2);
2124
+ H([
2125
+ ot()
2126
+ ], R.prototype, "_results", 2);
2127
+ H([
2128
+ ot()
2129
+ ], R.prototype, "_filters", 2);
2130
+ H([
2131
+ ot()
2132
+ ], R.prototype, "_selectedResult", 2);
2133
+ H([
2134
+ Mt({ attribute: !1 })
2135
+ ], R.prototype, "config", 2);
2136
+ H([
2049
2137
  Mt()
2050
- ], P.prototype, "_filters", 2);
2051
- W([
2052
- wt({ attribute: !1 })
2053
- ], P.prototype, "config", 2);
2054
- W([
2055
- wt()
2056
- ], P.prototype, "apply", 2);
2057
- P = W([
2138
+ ], R.prototype, "apply", 2);
2139
+ R = H([
2058
2140
  Me("eox-itemfilter")
2059
- ], P);
2141
+ ], R);
2060
2142
  export {
2061
- P as EOxItemFilter
2143
+ R as EOxItemFilter
2062
2144
  };