Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eox/itemfilter

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eox/itemfilter - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

1266

dist/eox-itemfilter.js
var ae = Object.defineProperty;
var ue = (n, t, e) => t in n ? ae(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
var w = (n, t, e) => (ue(n, typeof t != "symbol" ? t + "" : t, e), e);
var ue = (i, t, e) => t in i ? ae(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
var x = (i, t, e) => (ue(i, typeof t != "symbol" ? t + "" : t, e), e);
/**

@@ -9,3 +9,3 @@ * @license

*/
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();
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();
let de = class {

@@ -20,3 +20,3 @@ constructor(t, e, s) {

const e = this.t;
if (bt && t === void 0) {
if (wt && t === void 0) {
const s = e !== void 0 && e.length === 1;

@@ -31,8 +31,8 @@ s && (t = Lt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Lt.set(e, t));

};
const fe = (n) => new de(typeof n == "string" ? n : n + "", void 0, Jt), pe = (n, t) => {
bt ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
const s = document.createElement("style"), i = et.litNonce;
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
const fe = (i) => new de(typeof i == "string" ? i : i + "", void 0, Jt), pe = (i, t) => {
wt ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
const s = document.createElement("style"), r = et.litNonce;
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
});
}, Nt = bt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
}, Nt = wt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
let e = "";

@@ -42,3 +42,3 @@ for (const s of t.cssRules)

return fe(e);
})(n) : n;
})(i) : i;
/**

@@ -49,21 +49,21 @@ * @license

*/
var ct;
const st = window, Ot = st.trustedTypes, ge = Ot ? Ot.emptyScript : "", Tt = st.reactiveElementPolyfillSupport, mt = { toAttribute(n, t) {
var ht;
const st = window, Ot = st.trustedTypes, ge = Ot ? Ot.emptyScript : "", kt = st.reactiveElementPolyfillSupport, _t = { toAttribute(i, t) {
switch (t) {
case Boolean:
n = n ? ge : null;
i = i ? ge : null;
break;
case Object:
case Array:
n = n == null ? n : JSON.stringify(n);
i = i == null ? i : JSON.stringify(i);
}
return n;
}, fromAttribute(n, t) {
let e = n;
return i;
}, fromAttribute(i, t) {
let e = i;
switch (t) {
case Boolean:
e = n !== null;
e = i !== null;
break;
case Number:
e = n === null ? null : Number(n);
e = i === null ? null : Number(i);
break;

@@ -73,3 +73,3 @@ case Object:

try {
e = JSON.parse(n);
e = JSON.parse(i);
} catch {

@@ -80,4 +80,4 @@ e = null;

return e;
} }, Qt = (n, t) => t !== n && (t == t || n == n), ht = { attribute: !0, type: String, converter: mt, reflect: !1, hasChanged: Qt };
let F = class extends HTMLElement {
} }, Qt = (i, t) => t !== i && (t == t || i == i), at = { attribute: !0, type: String, converter: _t, reflect: !1, hasChanged: Qt };
let z = class extends HTMLElement {
constructor() {

@@ -94,10 +94,10 @@ super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();

return this.elementProperties.forEach((e, s) => {
const i = this._$Ep(s, e);
i !== void 0 && (this._$Ev.set(i, s), t.push(i));
const r = this._$Ep(s, e);
r !== void 0 && (this._$Ev.set(r, s), t.push(r));
}), t;
}
static createProperty(t, e = ht) {
static createProperty(t, e = at) {
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
const s = typeof t == "symbol" ? Symbol() : "__" + t, i = this.getPropertyDescriptor(t, s, e);
i !== void 0 && Object.defineProperty(this.prototype, t, i);
const s = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, s, e);
r !== void 0 && Object.defineProperty(this.prototype, t, r);
}

@@ -108,9 +108,9 @@ }

return this[e];
}, set(i) {
const r = this[t];
this[e] = i, this.requestUpdate(t, r, s);
}, set(r) {
const n = this[t];
this[e] = r, this.requestUpdate(t, n, s);
}, configurable: !0, enumerable: !0 };
}
static getPropertyOptions(t) {
return this.elementProperties.get(t) || ht;
return this.elementProperties.get(t) || at;
}

@@ -124,4 +124,4 @@ static finalize() {

const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
for (const i of s)
this.createProperty(i, e[i]);
for (const r of s)
this.createProperty(r, e[r]);
}

@@ -134,4 +134,4 @@ return this.elementStyles = this.finalizeStyles(this.styles), !0;

const s = new Set(t.flat(1 / 0).reverse());
for (const i of s)
e.unshift(Nt(i));
for (const r of s)
e.unshift(Nt(r));
} else

@@ -186,8 +186,8 @@ t !== void 0 && e.push(Nt(t));

}
_$EO(t, e, s = ht) {
var i;
const r = this.constructor._$Ep(t, s);
if (r !== void 0 && s.reflect === !0) {
const o = (((i = s.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== void 0 ? s.converter : mt).toAttribute(e, s.type);
this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
_$EO(t, e, s = at) {
var r;
const n = this.constructor._$Ep(t, s);
if (n !== void 0 && s.reflect === !0) {
const o = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : _t).toAttribute(e, s.type);
this._$El = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$El = null;
}

@@ -197,11 +197,11 @@ }

var s;
const i = this.constructor, r = i._$Ev.get(t);
if (r !== void 0 && this._$El !== r) {
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;
this._$El = r, this[r] = c.fromAttribute(e, o.type), this._$El = null;
const r = this.constructor, n = r._$Ev.get(t);
if (n !== void 0 && this._$El !== n) {
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 : _t;
this._$El = n, this[n] = c.fromAttribute(e, o.type), this._$El = null;
}
}
requestUpdate(t, e, s) {
let i = !0;
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());
let r = !0;
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());
}

@@ -225,12 +225,12 @@ async _$Ej() {

return;
this.hasUpdated, this._$Ei && (this._$Ei.forEach((i, r) => this[r] = i), this._$Ei = void 0);
this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, n) => this[n] = r), this._$Ei = void 0);
let e = !1;
const s = this._$AL;
try {
e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((i) => {
var r;
return (r = i.hostUpdate) === null || r === void 0 ? void 0 : r.call(i);
e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
var n;
return (n = r.hostUpdate) === null || n === void 0 ? void 0 : n.call(r);
}), this.update(s)) : this._$Ek();
} catch (i) {
throw e = !1, this._$Ek(), i;
} catch (r) {
throw e = !1, this._$Ek(), r;
}

@@ -244,4 +244,4 @@ e && this._$AE(s);

(e = this._$ES) === null || e === void 0 || e.forEach((s) => {
var i;
return (i = s.hostUpdated) === null || i === void 0 ? void 0 : i.call(s);
var r;
return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);

@@ -269,3 +269,3 @@ }

};
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");
z.finalized = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, kt == null || kt({ ReactiveElement: z }), ((ht = st.reactiveElementVersions) !== null && ht !== void 0 ? ht : st.reactiveElementVersions = []).push("1.6.1");
/**

@@ -276,65 +276,65 @@ * @license

*/
var at;
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 = `[
\f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pt = /-->/g, Ht = />/g, L = RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^
\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) => {
const e = n.length - 1, s = [];
let i, r = t === 2 ? "<svg>" : "", o = K;
var ut;
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, me = `<${Xt}>`, T = document, G = () => T.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", Zt = Array.isArray, _e = (i) => Zt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", dt = `[
\f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, Ut = />/g, N = RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, jt = /"/g, qt = /^(?:script|style|textarea|title)$/i, $e = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), O = $e(1), U = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), P = T.createTreeWalker(T, 129, null, !1), ve = (i, t) => {
const e = i.length - 1, s = [];
let r, n = t === 2 ? "<svg>" : "", o = K;
for (let l = 0; l < e; l++) {
const h = n[l];
let u, a, d = -1, p = 0;
for (; p < h.length && (o.lastIndex = p, a = o.exec(h), a !== null); )
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);
const g = o === L && n[l + 1].startsWith("/>") ? " " : "";
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);
const h = i[l];
let a, u, d = -1, p = 0;
for (; p < h.length && (o.lastIndex = p, u = o.exec(h), u !== null); )
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 = N) : u[3] !== void 0 && (o = N) : o === N ? 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 ? N : u[3] === '"' ? jt : Ht) : o === jt || o === Ht ? o = N : o === Tt || o === Ut ? o = K : (o = N, r = void 0);
const g = o === N && i[l + 1].startsWith("/>") ? " " : "";
n += o === K ? h + me : 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);
}
const c = r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
const c = n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
throw Error("invalid template strings array");
return [kt !== void 0 ? kt.createHTML(c) : c, s];
return [Pt !== void 0 ? Pt.createHTML(c) : c, s];
};
class Q {
constructor({ strings: t, _$litType$: e }, s) {
let i;
let r;
this.parts = [];
let r = 0, o = 0;
const c = t.length - 1, l = this.parts, [h, u] = ve(t, e);
if (this.el = Q.createElement(h, s), O.currentNode = this.el.content, e === 2) {
const a = this.el.content, d = a.firstChild;
d.remove(), a.append(...d.childNodes);
let n = 0, o = 0;
const c = t.length - 1, l = this.parts, [h, a] = ve(t, e);
if (this.el = Q.createElement(h, s), P.currentNode = this.el.content, e === 2) {
const u = this.el.content, d = u.firstChild;
d.remove(), u.append(...d.childNodes);
}
for (; (i = O.nextNode()) !== null && l.length < c; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) {
const a = [];
for (const d of i.getAttributeNames())
if (d.endsWith(_t) || d.startsWith(M)) {
const p = u[o++];
if (a.push(d), p !== void 0) {
const g = i.getAttribute(p.toLowerCase() + _t).split(M), _ = /([.?@])?(.*)/.exec(p);
l.push({ type: 1, index: r, name: _[2], strings: g, ctor: _[1] === "." ? Ae : _[1] === "?" ? xe : _[1] === "@" ? Se : rt });
for (; (r = P.nextNode()) !== null && l.length < c; ) {
if (r.nodeType === 1) {
if (r.hasAttributes()) {
const u = [];
for (const d of r.getAttributeNames())
if (d.endsWith($t) || d.startsWith(M)) {
const p = a[o++];
if (u.push(d), p !== void 0) {
const g = r.getAttribute(p.toLowerCase() + $t).split(M), _ = /([.?@])?(.*)/.exec(p);
l.push({ type: 1, index: n, name: _[2], strings: g, ctor: _[1] === "." ? Ae : _[1] === "?" ? xe : _[1] === "@" ? Se : nt });
} else
l.push({ type: 6, index: r });
l.push({ type: 6, index: n });
}
for (const d of a)
i.removeAttribute(d);
for (const d of u)
r.removeAttribute(d);
}
if (qt.test(i.tagName)) {
const a = i.textContent.split(M), d = a.length - 1;
if (qt.test(r.tagName)) {
const u = r.textContent.split(M), d = u.length - 1;
if (d > 0) {
i.textContent = z ? z.emptyScript : "";
r.textContent = D ? D.emptyScript : "";
for (let p = 0; p < d; p++)
i.append(a[p], G()), O.nextNode(), l.push({ type: 2, index: ++r });
i.append(a[d], G());
r.append(u[p], G()), P.nextNode(), l.push({ type: 2, index: ++n });
r.append(u[d], G());
}
}
} else if (i.nodeType === 8)
if (i.data === Xt)
l.push({ type: 2, index: r });
} else if (r.nodeType === 8)
if (r.data === Xt)
l.push({ type: 2, index: n });
else {
let a = -1;
for (; (a = i.data.indexOf(M, a + 1)) !== -1; )
l.push({ type: 7, index: r }), a += M.length - 1;
let u = -1;
for (; (u = r.data.indexOf(M, u + 1)) !== -1; )
l.push({ type: 7, index: n }), u += M.length - 1;
}
r++;
n++;
}

@@ -347,9 +347,9 @@ }

}
function D(n, t, e = n, s) {
var i, r, o, c;
if (t === k)
function B(i, t, e = i, s) {
var r, n, o, c;
if (t === U)
return t;
let l = s !== void 0 ? (i = e._$Co) === null || i === void 0 ? void 0 : i[s] : e._$Cl;
let l = s !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[s] : e._$Cl;
const h = J(t) ? void 0 : t._$litDirective$;
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;
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;
}

@@ -368,13 +368,13 @@ class ye {

var e;
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);
O.currentNode = r;
let o = O.nextNode(), c = 0, l = 0, h = i[0];
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);
P.currentNode = n;
let o = P.nextNode(), c = 0, l = 0, h = r[0];
for (; h !== void 0; ) {
if (c === h.index) {
let u;
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];
let a;
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];
}
c !== (h == null ? void 0 : h.index) && (o = O.nextNode(), c++);
c !== (h == null ? void 0 : h.index) && (o = P.nextNode(), c++);
}
return O.currentNode = T, r;
return P.currentNode = T, n;
}

@@ -388,5 +388,5 @@ v(t) {

class X {
constructor(t, e, s, i) {
var r;
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;
constructor(t, e, s, r) {
var n;
this.type = 2, this._$AH = m, 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;
}

@@ -409,3 +409,3 @@ get _$AU() {

_$AI(t, e = this) {
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);
t = B(this, t, e), J(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : _e(t) ? this.T(t) : this._(t);
}

@@ -423,7 +423,7 @@ k(t) {

var e;
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);
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
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);
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === n)
this._$AH.v(s);
else {
const o = new ye(r, this), c = o.u(this.options);
const o = new ye(n, this), c = o.u(this.options);
o.v(s), this.$(c), this._$AH = o;

@@ -439,6 +439,6 @@ }

const e = this._$AH;
let s, i = 0;
for (const r of t)
i === e.length ? e.push(s = new X(this.k(G()), this.k(G()), this, this.options)) : s = e[i], s._$AI(r), i++;
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
let s, r = 0;
for (const n of t)
r === e.length ? e.push(s = new X(this.k(G()), this.k(G()), this, this.options)) : s = e[r], s._$AI(n), r++;
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
}

@@ -448,4 +448,4 @@ _$AR(t = this._$AA.nextSibling, e) {

for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, e); t && t !== this._$AB; ) {
const i = t.nextSibling;
t.remove(), t = i;
const r = t.nextSibling;
t.remove(), t = r;
}

@@ -458,5 +458,5 @@ }

}
class rt {
constructor(t, e, s, i, r) {
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;
class nt {
constructor(t, e, s, r, n) {
this.type = 1, this._$AH = m, 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 = m;
}

@@ -469,14 +469,14 @@ get tagName() {

}
_$AI(t, e = this, s, i) {
const r = this.strings;
_$AI(t, e = this, s, r) {
const n = this.strings;
let o = !1;
if (r === void 0)
t = D(this, t, e, 0), o = !J(t) || t !== this._$AH && t !== k, o && (this._$AH = t);
if (n === void 0)
t = B(this, t, e, 0), o = !J(t) || t !== this._$AH && t !== U, o && (this._$AH = t);
else {
const c = t;
let l, h;
for (t = r[0], l = 0; l < r.length - 1; l++)
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;
for (t = n[0], l = 0; l < n.length - 1; l++)
h = B(this, c[s + l], e, l), h === U && (h = this._$AH[l]), o || (o = !J(h) || h !== this._$AH[l]), h === m ? t = m : t !== m && (t += (h ?? "") + n[l + 1]), this._$AH[l] = h;
}
o && !i && this.j(t);
o && !r && this.j(t);
}

@@ -487,3 +487,3 @@ j(t) {

}
class Ae extends rt {
class Ae extends nt {
constructor() {

@@ -496,4 +496,4 @@ super(...arguments), this.type = 3;

}
const Ee = z ? z.emptyScript : "";
class xe extends rt {
const Ee = D ? D.emptyScript : "";
class xe extends nt {
constructor() {

@@ -506,12 +506,12 @@ super(...arguments), this.type = 4;

}
class Se extends rt {
constructor(t, e, s, i, r) {
super(t, e, s, i, r), this.type = 5;
class Se extends nt {
constructor(t, e, s, r, n) {
super(t, e, s, r, n), this.type = 5;
}
_$AI(t, e = this) {
var s;
if ((t = (s = D(this, t, e, 0)) !== null && s !== void 0 ? s : m) === k)
if ((t = (s = B(this, t, e, 0)) !== null && s !== void 0 ? s : m) === U)
return;
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);
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
const r = this._$AH, n = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== m && (r === m || n);
n && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
}

@@ -531,16 +531,16 @@ handleEvent(t) {

_$AI(t) {
D(this, t);
B(this, t);
}
}
const zt = it.litHtmlPolyfillSupport;
zt == null || zt(Q, X), ((at = it.litHtmlVersions) !== null && at !== void 0 ? at : it.litHtmlVersions = []).push("2.7.4");
const we = (n, t, e) => {
var s, i;
const r = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
let o = r._$litPart$;
zt == null || zt(Q, X), ((ut = it.litHtmlVersions) !== null && ut !== void 0 ? ut : it.litHtmlVersions = []).push("2.7.4");
const we = (i, t, e) => {
var s, r;
const n = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
let o = n._$litPart$;
if (o === void 0) {
const c = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : null;
r._$litPart$ = o = new X(t.insertBefore(G(), c), c, void 0, e ?? {});
const c = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
n._$litPart$ = o = new X(t.insertBefore(G(), c), c, void 0, e ?? {});
}
return o._$AI(n), o;
return o._$AI(i), o;
};

@@ -552,4 +552,4 @@ /**

*/
var dt, ft;
class Y extends F {
var ft, pt;
class Y extends z {
constructor() {

@@ -576,9 +576,9 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;

render() {
return k;
return U;
}
}
Y.finalized = !0, Y._$litElement$ = !0, (dt = globalThis.litElementHydrateSupport) === null || dt === void 0 || dt.call(globalThis, { LitElement: Y });
Y.finalized = !0, Y._$litElement$ = !0, (ft = globalThis.litElementHydrateSupport) === null || ft === void 0 || ft.call(globalThis, { LitElement: Y });
const Dt = globalThis.litElementPolyfillSupport;
Dt == null || Dt({ LitElement: Y });
((ft = globalThis.litElementVersions) !== null && ft !== void 0 ? ft : globalThis.litElementVersions = []).push("3.3.2");
((pt = globalThis.litElementVersions) !== null && pt !== void 0 ? pt : globalThis.litElementVersions = []).push("3.3.2");
/**

@@ -589,8 +589,8 @@ * @license

*/
const Me = (n) => (t) => typeof t == "function" ? ((e, s) => (customElements.define(e, s), s))(n, t) : ((e, s) => {
const { kind: i, elements: r } = s;
return { kind: i, elements: r, finisher(o) {
const Me = (i) => (t) => typeof t == "function" ? ((e, s) => (customElements.define(e, s), s))(i, t) : ((e, s) => {
const { kind: r, elements: n } = s;
return { kind: r, elements: n, finisher(o) {
customElements.define(e, o);
} };
})(n, t);
})(i, t);
/**

@@ -601,13 +601,13 @@ * @license

*/
const Ce = (n, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
e.createProperty(t.key, n);
const Ce = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
e.createProperty(t.key, i);
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
}, finisher(e) {
e.createProperty(t.key, n);
e.createProperty(t.key, i);
} };
function wt(n) {
return (t, e) => e !== void 0 ? ((s, i, r) => {
i.constructor.createProperty(r, s);
})(n, t, e) : Ce(n, t);
function Mt(i) {
return (t, e) => e !== void 0 ? ((s, r, n) => {
r.constructor.createProperty(n, s);
})(i, t, e) : Ce(i, t);
}

@@ -619,4 +619,4 @@ /**

*/
function Mt(n) {
return wt({ ...n, state: !0 });
function ot(i) {
return Mt({ ...i, state: !0 });
}

@@ -628,4 +628,4 @@ /**

*/
var pt;
((pt = window.HTMLSlotElement) === null || pt === void 0 ? void 0 : pt.prototype.assignedElements) != null;
var gt;
((gt = window.HTMLSlotElement) === null || gt === void 0 ? void 0 : gt.prototype.assignedElements) != null;
/**

@@ -636,6 +636,6 @@ * @license

*/
function* V(n, t) {
if (n !== void 0) {
function* V(i, t) {
if (i !== void 0) {
let e = 0;
for (const s of n)
for (const s of i)
yield t(s, e++);

@@ -649,3 +649,3 @@ }

*/
const Ie = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Re = (n) => (...t) => ({ _$litDirective$: n, values: t });
const Re = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ie = (i) => (...t) => ({ _$litDirective$: i, values: t });
class Le {

@@ -672,5 +672,5 @@ constructor(t) {

*/
class $t extends Le {
class vt extends Le {
constructor(t) {
if (super(t), this.et = m, t.type !== Ie.CHILD)
if (super(t), this.et = m, t.type !== Re.CHILD)
throw Error(this.constructor.directiveName + "() can only be used in child bindings");

@@ -681,3 +681,3 @@ }

return this.ft = void 0, this.et = t;
if (t === k)
if (t === U)
return t;

@@ -693,42 +693,42 @@ if (typeof t != "string")

}
$t.directiveName = "unsafeHTML", $t.resultType = 1;
const Bt = Re($t);
function x(n) {
return Array.isArray ? Array.isArray(n) : se(n) === "[object Array]";
vt.directiveName = "unsafeHTML", vt.resultType = 1;
const Bt = Ie(vt);
function S(i) {
return Array.isArray ? Array.isArray(i) : se(i) === "[object Array]";
}
const Ne = 1 / 0;
function Oe(n) {
if (typeof n == "string")
return n;
let t = n + "";
return t == "0" && 1 / n == -Ne ? "-0" : t;
function Oe(i) {
if (typeof i == "string")
return i;
let t = i + "";
return t == "0" && 1 / i == -Ne ? "-0" : t;
}
function Te(n) {
return n == null ? "" : Oe(n);
function ke(i) {
return i == null ? "" : Oe(i);
}
function A(n) {
return typeof n == "string";
function A(i) {
return typeof i == "string";
}
function te(n) {
return typeof n == "number";
function te(i) {
return typeof i == "number";
}
function ke(n) {
return n === !0 || n === !1 || Pe(n) && se(n) == "[object Boolean]";
function Pe(i) {
return i === !0 || i === !1 || Te(i) && se(i) == "[object Boolean]";
}
function ee(n) {
return typeof n == "object";
function ee(i) {
return typeof i == "object";
}
function Pe(n) {
return ee(n) && n !== null;
function Te(i) {
return ee(i) && i !== null;
}
function $(n) {
return n != null;
function $(i) {
return i != null;
}
function gt(n) {
return !n.trim().length;
function mt(i) {
return !i.trim().length;
}
function se(n) {
return n == null ? n === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(n);
function se(i) {
return i == null ? i === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(i);
}
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;
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;
class De {

@@ -739,4 +739,4 @@ constructor(t) {

t.forEach((s) => {
let i = ie(s);
e += i.weight, this._keys.push(i), this._keyMap[i.id] = i, e += i.weight;
let r = ie(s);
e += r.weight, this._keys.push(r), this._keyMap[r.id] = r, e += r.weight;
}), this._keys.forEach((s) => {

@@ -756,44 +756,44 @@ s.weight /= e;

}
function ie(n) {
let t = null, e = null, s = null, i = 1, r = null;
if (A(n) || x(n))
s = n, t = Kt(n), e = vt(n);
function ie(i) {
let t = null, e = null, s = null, r = 1, n = null;
if (A(i) || S(i))
s = i, t = Kt(i), e = yt(i);
else {
if (!Wt.call(n, "name"))
if (!Wt.call(i, "name"))
throw new Error(Fe("name"));
const o = n.name;
if (s = o, Wt.call(n, "weight") && (i = n.weight, i <= 0))
const o = i.name;
if (s = o, Wt.call(i, "weight") && (r = i.weight, r <= 0))
throw new Error(ze(o));
t = Kt(o), e = vt(o), r = n.getFn;
t = Kt(o), e = yt(o), n = i.getFn;
}
return { path: t, id: e, weight: i, src: s, getFn: r };
return { path: t, id: e, weight: r, src: s, getFn: n };
}
function Kt(n) {
return x(n) ? n : n.split(".");
function Kt(i) {
return S(i) ? i : i.split(".");
}
function vt(n) {
return x(n) ? n.join(".") : n;
function yt(i) {
return S(i) ? i.join(".") : i;
}
function Be(n, t) {
function Be(i, t) {
let e = [], s = !1;
const i = (r, o, c) => {
if ($(r))
const r = (n, o, c) => {
if ($(n))
if (!o[c])
e.push(r);
e.push(n);
else {
let l = o[c];
const h = r[l];
const h = n[l];
if (!$(h))
return;
if (c === o.length - 1 && (A(h) || te(h) || ke(h)))
e.push(Te(h));
else if (x(h)) {
if (c === o.length - 1 && (A(h) || te(h) || Pe(h)))
e.push(ke(h));
else if (S(h)) {
s = !0;
for (let u = 0, a = h.length; u < a; u += 1)
i(h[u], o, c + 1);
for (let a = 0, u = h.length; a < u; a += 1)
r(h[a], o, c + 1);
} else
o.length && i(h, o, c + 1);
o.length && r(h, o, c + 1);
}
};
return i(n, A(t) ? t.split(".") : t, 0), s ? e : e[0];
return r(i, A(t) ? t.split(".") : t, 0), s ? e : e[0];
}

@@ -821,3 +821,3 @@ const We = {

// Default sort function: sort by ascending score, ascending index
sortFn: (n, t) => n.score === t.score ? n.idx < t.idx ? -1 : 1 : n.score < t.score ? -1 : 1
sortFn: (i, t) => i.score === t.score ? i.idx < t.idx ? -1 : 1 : i.score < t.score ? -1 : 1
}, Ve = {

@@ -859,11 +859,11 @@ // Approximately where in the text is the pattern expected to be found?

const Ge = /[^ ]+/g;
function Je(n = 1, t = 3) {
function Je(i = 1, t = 3) {
const e = /* @__PURE__ */ new Map(), s = Math.pow(10, t);
return {
get(i) {
const r = i.match(Ge).length;
if (e.has(r))
return e.get(r);
const o = 1 / Math.pow(r, 0.5 * n), c = parseFloat(Math.round(o * s) / s);
return e.set(r, c), c;
get(r) {
const n = r.match(Ge).length;
if (e.has(n))
return e.get(n);
const o = 1 / Math.pow(n, 0.5 * i), c = parseFloat(Math.round(o * s) / s);
return e.set(n, c), c;
},

@@ -918,3 +918,3 @@ clear() {

_addString(t, e) {
if (!$(t) || gt(t))
if (!$(t) || mt(t))
return;

@@ -930,28 +930,28 @@ let s = {

let s = { i: e, $: {} };
this.keys.forEach((i, r) => {
let o = i.getFn ? i.getFn(t) : this.getFn(t, i.path);
this.keys.forEach((r, n) => {
let o = r.getFn ? r.getFn(t) : this.getFn(t, r.path);
if ($(o)) {
if (x(o)) {
if (S(o)) {
let c = [];
const l = [{ nestedArrIndex: -1, value: o }];
for (; l.length; ) {
const { nestedArrIndex: h, value: u } = l.pop();
if ($(u))
if (A(u) && !gt(u)) {
let a = {
v: u,
const { nestedArrIndex: h, value: a } = l.pop();
if ($(a))
if (A(a) && !mt(a)) {
let u = {
v: a,
i: h,
n: this.norm.get(u)
n: this.norm.get(a)
};
c.push(a);
c.push(u);
} else
x(u) && u.forEach((a, d) => {
S(a) && a.forEach((u, d) => {
l.push({
nestedArrIndex: d,
value: a
value: u
});
});
}
s.$[r] = c;
} else if (A(o) && !gt(o)) {
s.$[n] = c;
} else if (A(o) && !mt(o)) {
let c = {

@@ -961,3 +961,3 @@ v: o,

};
s.$[r] = c;
s.$[n] = c;
}

@@ -974,36 +974,36 @@ }

}
function ne(n, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
const i = new Ct({ getFn: e, fieldNormWeight: s });
return i.setKeys(n.map(ie)), i.setSources(t), i.create(), i;
function re(i, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
const r = new Ct({ getFn: e, fieldNormWeight: s });
return r.setKeys(i.map(ie)), r.setSources(t), r.create(), r;
}
function Qe(n, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
const { keys: s, records: i } = n, r = new Ct({ getFn: t, fieldNormWeight: e });
return r.setKeys(s), r.setIndexRecords(i), r;
function Qe(i, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
const { keys: s, records: r } = i, n = new Ct({ getFn: t, fieldNormWeight: e });
return n.setKeys(s), n.setIndexRecords(r), n;
}
function tt(n, {
function tt(i, {
errors: t = 0,
currentLocation: e = 0,
expectedLocation: s = 0,
distance: i = f.distance,
ignoreLocation: r = f.ignoreLocation
distance: r = f.distance,
ignoreLocation: n = f.ignoreLocation
} = {}) {
const o = t / n.length;
if (r)
const o = t / i.length;
if (n)
return o;
const c = Math.abs(s - e);
return i ? o + c / i : c ? 1 : o;
return r ? o + c / r : c ? 1 : o;
}
function Xe(n = [], t = f.minMatchCharLength) {
let e = [], s = -1, i = -1, r = 0;
for (let o = n.length; r < o; r += 1) {
let c = n[r];
c && s === -1 ? s = r : !c && s !== -1 && (i = r - 1, i - s + 1 >= t && e.push([s, i]), s = -1);
function Xe(i = [], t = f.minMatchCharLength) {
let e = [], s = -1, r = -1, n = 0;
for (let o = i.length; n < o; n += 1) {
let c = i[n];
c && s === -1 ? s = n : !c && s !== -1 && (r = n - 1, r - s + 1 >= t && e.push([s, r]), s = -1);
}
return n[r - 1] && r - s >= t && e.push([s, r - 1]), e;
return i[n - 1] && n - s >= t && e.push([s, n - 1]), e;
}
const N = 32;
function Ze(n, t, e, {
const k = 32;
function Ze(i, t, e, {
location: s = f.location,
distance: i = f.distance,
threshold: r = f.threshold,
distance: r = f.distance,
threshold: n = f.threshold,
findAllMatches: o = f.findAllMatches,

@@ -1014,49 +1014,49 @@ minMatchCharLength: c = f.minMatchCharLength,

} = {}) {
if (t.length > N)
throw new Error(je(N));
const u = t.length, a = n.length, d = Math.max(0, Math.min(s, a));
let p = r, g = d;
const _ = c > 1 || l, I = _ ? Array(a) : [];
if (t.length > k)
throw new Error(je(k));
const a = t.length, u = i.length, d = Math.max(0, Math.min(s, u));
let p = n, g = d;
const _ = c > 1 || l, I = _ ? Array(u) : [];
let E;
for (; (E = n.indexOf(t, g)) > -1; ) {
for (; (E = i.indexOf(t, g)) > -1; ) {
let v = tt(t, {
currentLocation: E,
expectedLocation: d,
distance: i,
distance: r,
ignoreLocation: h
});
if (p = Math.min(v, p), g = E + u, _) {
let S = 0;
for (; S < u; )
I[E + S] = 1, S += 1;
if (p = Math.min(v, p), g = E + a, _) {
let b = 0;
for (; b < a; )
I[E + b] = 1, b += 1;
}
}
g = -1;
let H = [], R = 1, Z = u + a;
const he = 1 << u - 1;
for (let v = 0; v < u; v += 1) {
let S = 0, b = Z;
for (; S < b; )
let j = [], L = 1, Z = a + u;
const he = 1 << a - 1;
for (let v = 0; v < a; v += 1) {
let b = 0, w = Z;
for (; b < w; )
tt(t, {
errors: v,
currentLocation: d + b,
currentLocation: d + w,
expectedLocation: d,
distance: i,
distance: r,
ignoreLocation: h
}) <= p ? S = b : Z = b, b = Math.floor((Z - S) / 2 + S);
Z = b;
let It = Math.max(1, d - b + 1), lt = o ? a : Math.min(d + b, a) + u, U = Array(lt + 2);
U[lt + 1] = (1 << v) - 1;
for (let y = lt; y >= It; y -= 1) {
let q = y - 1, Rt = e[n.charAt(q)];
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, {
}) <= p ? b = w : Z = w, w = Math.floor((Z - b) / 2 + b);
Z = w;
let Rt = Math.max(1, d - w + 1), ct = o ? u : Math.min(d + w, u) + a, F = Array(ct + 2);
F[ct + 1] = (1 << v) - 1;
for (let y = ct; y >= Rt; y -= 1) {
let q = y - 1, It = e[i.charAt(q)];
if (_ && (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, {
errors: v,
currentLocation: q,
expectedLocation: d,
distance: i,
distance: r,
ignoreLocation: h
}), R <= p)) {
if (p = R, g = q, g <= d)
}), L <= p)) {
if (p = L, g = q, g <= d)
break;
It = Math.max(1, 2 * d - g);
Rt = Math.max(1, 2 * d - g);
}

@@ -1068,33 +1068,33 @@ }

expectedLocation: d,
distance: i,
distance: r,
ignoreLocation: h
}) > p)
break;
H = U;
j = F;
}
const ot = {
const lt = {
isMatch: g >= 0,
// Count exact matches (those with a score of 0) to be "almost" exact
score: Math.max(1e-3, R)
score: Math.max(1e-3, L)
};
if (_) {
const v = Xe(I, c);
v.length ? l && (ot.indices = v) : ot.isMatch = !1;
v.length ? l && (lt.indices = v) : lt.isMatch = !1;
}
return ot;
return lt;
}
function qe(n) {
function qe(i) {
let t = {};
for (let e = 0, s = n.length; e < s; e += 1) {
const i = n.charAt(e);
t[i] = (t[i] || 0) | 1 << s - e - 1;
for (let e = 0, s = i.length; e < s; e += 1) {
const r = i.charAt(e);
t[r] = (t[r] || 0) | 1 << s - e - 1;
}
return t;
}
class re {
class ne {
constructor(t, {
location: e = f.location,
threshold: s = f.threshold,
distance: i = f.distance,
includeMatches: r = f.includeMatches,
distance: r = f.distance,
includeMatches: n = f.includeMatches,
findAllMatches: o = f.findAllMatches,

@@ -1108,4 +1108,4 @@ minMatchCharLength: c = f.minMatchCharLength,

threshold: s,
distance: i,
includeMatches: r,
distance: r,
includeMatches: n,
findAllMatches: o,

@@ -1117,3 +1117,3 @@ minMatchCharLength: c,

return;
const u = (d, p) => {
const a = (d, p) => {
this.chunks.push({

@@ -1124,14 +1124,14 @@ pattern: d,

});
}, a = this.pattern.length;
if (a > N) {
}, u = this.pattern.length;
if (u > k) {
let d = 0;
const p = a % N, g = a - p;
const p = u % k, g = u - p;
for (; d < g; )
u(this.pattern.substr(d, N), d), d += N;
a(this.pattern.substr(d, k), d), d += k;
if (p) {
const _ = a - N;
u(this.pattern.substr(_), _);
const _ = u - k;
a(this.pattern.substr(_), _);
}
} else
u(this.pattern, 0);
a(this.pattern, 0);
}

@@ -1148,4 +1148,4 @@ searchIn(t) {

const {
location: i,
distance: r,
location: r,
distance: n,
threshold: o,

@@ -1156,7 +1156,7 @@ findAllMatches: c,

} = this.options;
let u = [], a = 0, d = !1;
let a = [], u = 0, d = !1;
this.chunks.forEach(({ pattern: g, alphabet: _, startIndex: I }) => {
const { isMatch: E, score: H, indices: R } = Ze(t, g, _, {
location: i + I,
distance: r,
const { isMatch: E, score: j, indices: L } = Ze(t, g, _, {
location: r + I,
distance: n,
threshold: o,

@@ -1168,12 +1168,12 @@ findAllMatches: c,

});
E && (d = !0), a += H, E && R && (u = [...u, ...R]);
E && (d = !0), u += j, E && L && (a = [...a, ...L]);
});
let p = {
isMatch: d,
score: d ? a / this.chunks.length : 1
score: d ? u / this.chunks.length : 1
};
return d && s && (p.indices = u), p;
return d && s && (p.indices = a), p;
}
}
class C {
class R {
constructor(t) {

@@ -1191,7 +1191,7 @@ this.pattern = t;

}
function Vt(n, t) {
const e = n.match(t);
function Vt(i, t) {
const e = i.match(t);
return e ? e[1] : null;
}
class ts extends C {
class ts extends R {
constructor(t) {

@@ -1218,3 +1218,3 @@ super(t);

}
class es extends C {
class es extends R {
constructor(t) {

@@ -1241,3 +1241,3 @@ super(t);

}
class ss extends C {
class ss extends R {
constructor(t) {

@@ -1264,3 +1264,3 @@ super(t);

}
class is extends C {
class is extends R {
constructor(t) {

@@ -1287,3 +1287,3 @@ super(t);

}
class ns extends C {
class rs extends R {
constructor(t) {

@@ -1310,3 +1310,3 @@ super(t);

}
class rs extends C {
class ns extends R {
constructor(t) {

@@ -1333,8 +1333,8 @@ super(t);

}
class oe extends C {
class oe extends R {
constructor(t, {
location: e = f.location,
threshold: s = f.threshold,
distance: i = f.distance,
includeMatches: r = f.includeMatches,
distance: r = f.distance,
includeMatches: n = f.includeMatches,
findAllMatches: o = f.findAllMatches,

@@ -1345,7 +1345,7 @@ minMatchCharLength: c = f.minMatchCharLength,

} = {}) {
super(t), this._bitapSearch = new re(t, {
super(t), this._bitapSearch = new ne(t, {
location: e,
threshold: s,
distance: i,
includeMatches: r,
distance: r,
includeMatches: n,
findAllMatches: o,

@@ -1370,3 +1370,3 @@ minMatchCharLength: c,

}
class le extends C {
class le extends R {
constructor(t) {

@@ -1386,14 +1386,14 @@ super(t);

let e = 0, s;
const i = [], r = this.pattern.length;
const r = [], n = this.pattern.length;
for (; (s = t.indexOf(this.pattern, e)) > -1; )
e = s + r, i.push([s, e - 1]);
const o = !!i.length;
e = s + n, r.push([s, e - 1]);
const o = !!r.length;
return {
isMatch: o,
score: o ? 0 : 1,
indices: i
indices: r
};
}
}
const yt = [
const At = [
ts,

@@ -1403,24 +1403,24 @@ le,

is,
ns,
rs,
ns,
es,
oe
], Yt = yt.length, os = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, ls = "|";
function cs(n, t = {}) {
return n.split(ls).map((e) => {
let s = e.trim().split(os).filter((r) => r && !!r.trim()), i = [];
for (let r = 0, o = s.length; r < o; r += 1) {
const c = s[r];
], Yt = At.length, os = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, ls = "|";
function cs(i, t = {}) {
return i.split(ls).map((e) => {
let s = e.trim().split(os).filter((n) => n && !!n.trim()), r = [];
for (let n = 0, o = s.length; n < o; n += 1) {
const c = s[n];
let l = !1, h = -1;
for (; !l && ++h < Yt; ) {
const u = yt[h];
let a = u.isMultiMatch(c);
a && (i.push(new u(a, t)), l = !0);
const a = At[h];
let u = a.isMultiMatch(c);
u && (r.push(new a(u, t)), l = !0);
}
if (!l)
for (h = -1; ++h < Yt; ) {
const u = yt[h];
let a = u.isSingleMatch(c);
if (a) {
i.push(new u(a, t));
const a = At[h];
let u = a.isSingleMatch(c);
if (u) {
r.push(new a(u, t));
break;

@@ -1430,3 +1430,3 @@ }

}
return i;
return r;
});

@@ -1439,4 +1439,4 @@ }

includeMatches: s = f.includeMatches,
minMatchCharLength: i = f.minMatchCharLength,
ignoreLocation: r = f.ignoreLocation,
minMatchCharLength: r = f.minMatchCharLength,
ignoreLocation: n = f.ignoreLocation,
findAllMatches: o = f.findAllMatches,

@@ -1450,5 +1450,5 @@ location: c = f.location,

includeMatches: s,
minMatchCharLength: i,
minMatchCharLength: r,
findAllMatches: o,
ignoreLocation: r,
ignoreLocation: n,
location: c,

@@ -1469,12 +1469,12 @@ threshold: l,

};
const { includeMatches: s, isCaseSensitive: i } = this.options;
t = i ? t : t.toLowerCase();
let r = 0, o = [], c = 0;
const { includeMatches: s, isCaseSensitive: r } = this.options;
t = r ? t : t.toLowerCase();
let n = 0, o = [], c = 0;
for (let l = 0, h = e.length; l < h; l += 1) {
const u = e[l];
o.length = 0, r = 0;
for (let a = 0, d = u.length; a < d; a += 1) {
const p = u[a], { isMatch: g, indices: _, score: I } = p.search(t);
const a = e[l];
o.length = 0, n = 0;
for (let u = 0, d = a.length; u < d; u += 1) {
const p = a[u], { isMatch: g, indices: _, score: I } = p.search(t);
if (g) {
if (r += 1, c += I, s) {
if (n += 1, c += I, s) {
const E = p.constructor.type;

@@ -1484,12 +1484,12 @@ hs.has(E) ? o = [...o, ..._] : o.push(_);

} else {
c = 0, r = 0, o.length = 0;
c = 0, n = 0, o.length = 0;
break;
}
}
if (r) {
let a = {
if (n) {
let u = {
isMatch: !0,
score: c / r
score: c / n
};
return s && (a.indices = o), a;
return s && (u.indices = o), u;
}

@@ -1503,62 +1503,62 @@ }

}
const At = [];
function us(...n) {
At.push(...n);
const Et = [];
function us(...i) {
Et.push(...i);
}
function Et(n, t) {
for (let e = 0, s = At.length; e < s; e += 1) {
let i = At[e];
if (i.condition(n, t))
return new i(n, t);
function xt(i, t) {
for (let e = 0, s = Et.length; e < s; e += 1) {
let r = Et[e];
if (r.condition(i, t))
return new r(i, t);
}
return new re(n, t);
return new ne(i, t);
}
const nt = {
const rt = {
AND: "$and",
OR: "$or"
}, xt = {
}, St = {
PATH: "$path",
PATTERN: "$val"
}, St = (n) => !!(n[nt.AND] || n[nt.OR]), ds = (n) => !!n[xt.PATH], fs = (n) => !x(n) && ee(n) && !St(n), Gt = (n) => ({
[nt.AND]: Object.keys(n).map((t) => ({
[t]: n[t]
}, bt = (i) => !!(i[rt.AND] || i[rt.OR]), ds = (i) => !!i[St.PATH], fs = (i) => !S(i) && ee(i) && !bt(i), Gt = (i) => ({
[rt.AND]: Object.keys(i).map((t) => ({
[t]: i[t]
}))
});
function ce(n, t, { auto: e = !0 } = {}) {
const s = (i) => {
let r = Object.keys(i);
const o = ds(i);
if (!o && r.length > 1 && !St(i))
return s(Gt(i));
if (fs(i)) {
const l = o ? i[xt.PATH] : r[0], h = o ? i[xt.PATTERN] : i[l];
function ce(i, t, { auto: e = !0 } = {}) {
const s = (r) => {
let n = Object.keys(r);
const o = ds(r);
if (!o && n.length > 1 && !bt(r))
return s(Gt(r));
if (fs(r)) {
const l = o ? r[St.PATH] : n[0], h = o ? r[St.PATTERN] : r[l];
if (!A(h))
throw new Error(Ue(l));
const u = {
keyId: vt(l),
throw new Error(He(l));
const a = {
keyId: yt(l),
pattern: h
};
return e && (u.searcher = Et(h, t)), u;
return e && (a.searcher = xt(h, t)), a;
}
let c = {
children: [],
operator: r[0]
operator: n[0]
};
return r.forEach((l) => {
const h = i[l];
x(h) && h.forEach((u) => {
c.children.push(s(u));
return n.forEach((l) => {
const h = r[l];
S(h) && h.forEach((a) => {
c.children.push(s(a));
});
}), c;
};
return St(n) || (n = Gt(n)), s(n);
return bt(i) || (i = Gt(i)), s(i);
}
function ps(n, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
n.forEach((e) => {
function ps(i, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
i.forEach((e) => {
let s = 1;
e.matches.forEach(({ key: i, norm: r, score: o }) => {
const c = i ? i.weight : null;
e.matches.forEach(({ key: r, norm: n, score: o }) => {
const c = r ? r.weight : null;
s *= Math.pow(
o === 0 && c ? Number.EPSILON : o,
(c || 1) * (t ? 1 : r)
(c || 1) * (t ? 1 : n)
);

@@ -1568,11 +1568,11 @@ }), e.score = s;

}
function gs(n, t) {
const e = n.matches;
function gs(i, t) {
const e = i.matches;
t.matches = [], $(e) && e.forEach((s) => {
if (!$(s.indices) || !s.indices.length)
return;
const { indices: i, value: r } = s;
const { indices: r, value: n } = s;
let o = {
indices: i,
value: r
indices: r,
value: n
};

@@ -1582,21 +1582,21 @@ s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx), t.matches.push(o);

}
function ms(n, t) {
t.score = n.score;
function ms(i, t) {
t.score = i.score;
}
function _s(n, t, {
function _s(i, t, {
includeMatches: e = f.includeMatches,
includeScore: s = f.includeScore
} = {}) {
const i = [];
return e && i.push(gs), s && i.push(ms), n.map((r) => {
const { idx: o } = r, c = {
const r = [];
return e && r.push(gs), s && r.push(ms), i.map((n) => {
const { idx: o } = n, c = {
item: t[o],
refIndex: o
};
return i.length && i.forEach((l) => {
l(r, c);
return r.length && r.forEach((l) => {
l(n, c);
}), c;
});
}
class B {
class W {
constructor(t, e = {}, s) {

@@ -1607,4 +1607,4 @@ this.options = { ...f, ...e }, this.options.useExtendedSearch, this._keyStore = new De(this.options.keys), this.setCollection(t, s);

if (this._docs = t, e && !(e instanceof Ct))
throw new Error(He);
this._myIndex = e || ne(this.options.keys, this._docs, {
throw new Error(Ue);
this._myIndex = e || re(this.options.keys, this._docs, {
getFn: this.options.getFn,

@@ -1619,5 +1619,5 @@ fieldNormWeight: this.options.fieldNormWeight

const e = [];
for (let s = 0, i = this._docs.length; s < i; s += 1) {
const r = this._docs[s];
t(r, s) && (this.removeAt(s), s -= 1, i -= 1, e.push(r));
for (let s = 0, r = this._docs.length; s < r; s += 1) {
const n = this._docs[s];
t(n, s) && (this.removeAt(s), s -= 1, r -= 1, e.push(n));
}

@@ -1635,4 +1635,4 @@ return e;

includeMatches: s,
includeScore: i,
shouldSort: r,
includeScore: r,
shouldSort: n,
sortFn: o,

@@ -1642,19 +1642,19 @@ ignoreFieldNorm: c

let l = A(t) ? A(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
return ps(l, { ignoreFieldNorm: c }), r && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), _s(l, this._docs, {
return ps(l, { ignoreFieldNorm: c }), n && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), _s(l, this._docs, {
includeMatches: s,
includeScore: i
includeScore: r
});
}
_searchStringList(t) {
const e = Et(t, this.options), { records: s } = this._myIndex, i = [];
return s.forEach(({ v: r, i: o, n: c }) => {
if (!$(r))
const e = xt(t, this.options), { records: s } = this._myIndex, r = [];
return s.forEach(({ v: n, i: o, n: c }) => {
if (!$(n))
return;
const { isMatch: l, score: h, indices: u } = e.searchIn(r);
l && i.push({
item: r,
const { isMatch: l, score: h, indices: a } = e.searchIn(n);
l && r.push({
item: n,
idx: o,
matches: [{ score: h, value: r, norm: c, indices: u }]
matches: [{ score: h, value: n, norm: c, indices: a }]
});
}), i;
}), r;
}

@@ -1664,5 +1664,5 @@ _searchLogical(t) {

if (!c.children) {
const { keyId: a, searcher: d } = c, p = this._findMatches({
key: this._keyStore.get(a),
value: this._myIndex.getValueForItemAtKeyId(l, a),
const { keyId: u, searcher: d } = c, p = this._findMatches({
key: this._keyStore.get(u),
value: this._myIndex.getValueForItemAtKeyId(l, u),
searcher: d

@@ -1678,17 +1678,17 @@ });

}
const u = [];
for (let a = 0, d = c.children.length; a < d; a += 1) {
const p = c.children[a], g = s(p, l, h);
const a = [];
for (let u = 0, d = c.children.length; u < d; u += 1) {
const p = c.children[u], g = s(p, l, h);
if (g.length)
u.push(...g);
else if (c.operator === nt.AND)
a.push(...g);
else if (c.operator === rt.AND)
return [];
}
return u;
}, i = this._myIndex.records, r = {}, o = [];
return i.forEach(({ $: c, i: l }) => {
return a;
}, r = this._myIndex.records, n = {}, o = [];
return r.forEach(({ $: c, i: l }) => {
if ($(c)) {
let h = s(e, c, l);
h.length && (r[l] || (r[l] = { idx: l, item: c, matches: [] }, o.push(r[l])), h.forEach(({ matches: u }) => {
r[l].matches.push(...u);
h.length && (n[l] || (n[l] = { idx: l, item: c, matches: [] }, o.push(n[l])), h.forEach(({ matches: a }) => {
n[l].matches.push(...a);
}));

@@ -1699,16 +1699,16 @@ }

_searchObjectList(t) {
const e = Et(t, this.options), { keys: s, records: i } = this._myIndex, r = [];
return i.forEach(({ $: o, i: c }) => {
const e = xt(t, this.options), { keys: s, records: r } = this._myIndex, n = [];
return r.forEach(({ $: o, i: c }) => {
if (!$(o))
return;
let l = [];
s.forEach((h, u) => {
s.forEach((h, a) => {
l.push(
...this._findMatches({
key: h,
value: o[u],
value: o[a],
searcher: e
})
);
}), l.length && r.push({
}), l.length && n.push({
idx: c,

@@ -1718,3 +1718,3 @@ item: o,

});
}), r;
}), n;
}

@@ -1724,58 +1724,58 @@ _findMatches({ key: t, value: e, searcher: s }) {

return [];
let i = [];
if (x(e))
e.forEach(({ v: r, i: o, n: c }) => {
if (!$(r))
let r = [];
if (S(e))
e.forEach(({ v: n, i: o, n: c }) => {
if (!$(n))
return;
const { isMatch: l, score: h, indices: u } = s.searchIn(r);
l && i.push({
const { isMatch: l, score: h, indices: a } = s.searchIn(n);
l && r.push({
score: h,
key: t,
value: r,
value: n,
idx: o,
norm: c,
indices: u
indices: a
});
});
else {
const { v: r, n: o } = e, { isMatch: c, score: l, indices: h } = s.searchIn(r);
c && i.push({ score: l, key: t, value: r, norm: o, indices: h });
const { v: n, n: o } = e, { isMatch: c, score: l, indices: h } = s.searchIn(n);
c && r.push({ score: l, key: t, value: n, norm: o, indices: h });
}
return i;
return r;
}
}
B.version = "6.6.2";
B.createIndex = ne;
B.parseIndex = Qe;
B.config = f;
B.parseQuery = ce;
W.version = "6.6.2";
W.createIndex = re;
W.parseIndex = Qe;
W.config = f;
W.parseQuery = ce;
us(as);
const $s = (n, t = "highlight") => {
const e = (i, r, o) => {
const c = r.split(".");
let l;
for (l = 0; l < c.length - 1; l++)
i = i[c[l]];
i[c[l]] = o;
}, s = (i, r = []) => {
let o = "", c = 0;
return r.forEach((l) => {
const h = l[1] + 1;
o += [
i.substring(c, l[0]),
const $s = (i, t = "highlight", e = "title") => {
const s = (n, o, c) => {
const l = o.split(".");
let h;
for (h = 0; h < l.length - 1; h++)
n = n[l[h]];
n[l[h]] = c;
}, r = (n, o = []) => {
let c = "", l = 0;
return o.forEach((h) => {
const a = h[1] + 1;
c += [
n.substring(l, h[0]),
`<mark class="${t}">`,
i.substring(l[0], h),
n.substring(h[0], a),
"</mark>"
].join(""), c = h;
}), o += i.substring(c), o;
].join(""), l = a;
}), c += n.substring(l), c;
};
return n.filter(({ matches: i }) => i && i.length).map(({ item: i, matches: r }) => {
const o = { ...i };
return r.forEach((c) => {
c.key === "name" && e(
o,
c.key,
s(c.value, c.indices)
return i.filter(({ matches: n }) => n && n.length).map(({ item: n, matches: o }) => {
const c = { ...n };
return o.forEach((l) => {
l.key === e && s(
c,
l.key,
r(l.value, l.indices)
);
}), o;
}), c;
});

@@ -1849,3 +1849,3 @@ }, vs = `

}
li span,
#details-filter li span,
details summary {

@@ -1869,2 +1869,3 @@ text-transform: capitalize;

margin-bottom: 0.5rem;
padding: 5px 7px;
}

@@ -1899,16 +1900,18 @@ section {

`;
var ys = Object.defineProperty, As = Object.getOwnPropertyDescriptor, W = (n, t, e, s) => {
for (var i = s > 1 ? void 0 : s ? As(t, e) : t, r = n.length - 1, o; r >= 0; r--)
(o = n[r]) && (i = (s ? o(t, e, i) : o(i)) || i);
return s && i && ys(t, e, i), i;
var ys = Object.defineProperty, As = Object.getOwnPropertyDescriptor, H = (i, t, e, s) => {
for (var r = s > 1 ? void 0 : s ? As(t, e) : t, n = i.length - 1, o; n >= 0; n--)
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
return s && r && ys(t, e, r), r;
};
let P = class extends Y {
let C = class extends Y {
constructor() {
super(...arguments);
w(this, "_fuse");
w(this, "_resultAggregation", []);
w(this, "_items", []);
w(this, "_results", []);
w(this, "_filters", {});
w(this, "config", {
x(this, "_fuse");
x(this, "_resultAggregation", []);
x(this, "_items", []);
x(this, "_results", []);
x(this, "_filters", {});
x(this, "_selectedResult");
x(this, "config", {
titleProperty: "title",
filterProperties: ["themes"],

@@ -1924,8 +1927,12 @@ aggregateResults: "themes",

});
w(this, "apply", (t) => {
this._items = t, this._fuse = new B(this._items, {
minMatchCharLength: 1,
x(this, "apply", (t) => {
this._items = t.map((e, s) => ({
...e,
id: `item-${s}`
})), this._fuse = new W(this._items, {
minMatchCharLength: 3,
// location: 0,
threshold: 0.4,
distance: 50,
includeMatches: !0,
// Search in same fields as specified by filter properties, plus name
keys: ["name", ...this.config.filterProperties],
useExtendedSearch: !0,

@@ -1935,8 +1942,8 @@ ...this.config.fuseConfig

const s = {};
this._items.forEach((i) => {
Array.isArray(i[e]) ? i[e].forEach((r) => {
s[r] = void 0;
}) : s[i[e]] = void 0;
this._items.forEach((r) => {
Array.isArray(r[e]) ? r[e].forEach((n) => {
s[n] = void 0;
}) : s[r[e]] = void 0;
}), this._filters[e] = s;
}), this.config.matchAllWhenEmpty !== !1 && (this._results = this._items, this.requestUpdate()), this.config.aggregateResults && (this._resultAggregation = [
}), this.config.matchAllWhenEmpty !== !1 && (this._results = this.sortResults(this._items), this.requestUpdate()), this.config.aggregateResults && (this._resultAggregation = [
...new Set(

@@ -1950,19 +1957,22 @@ this._items.reduce((e, s) => e.concat(s[this.config.aggregateResults]), [])

const s = Object.entries(e).reduce(
(r, [o, c]) => {
(n, [o, c]) => {
const l = (h) => {
const u = {};
u[o] = `=${h}`, r.push(u);
const a = {};
a[o] = `="${h}"`, n.push(a);
};
return Object.entries(c).filter(([h, u]) => u).forEach(([h, u]) => l(h)), r;
return Object.entries(c).filter(([h, a]) => a).forEach(([h, a]) => l(h)), n;
},
[]
);
let i;
if (!t.length && !s.length && this.config.matchAllWhenEmpty !== !1)
i = this._items;
let r;
if (!(t.length > 2) && !s.length && this.config.matchAllWhenEmpty !== !1)
r = this._items;
else {
const r = {
...t.length && s.length ? {
const n = {
...t.length > 2 && s.length ? {
$and: [
{ name: t },
// @ts-ignore
...this.config.fuseConfig.keys.map((c) => ({
[c]: t
})),
{

@@ -1974,3 +1984,6 @@ $or: s

$or: [
{ name: t },
// @ts-ignore
...this.config.fuseConfig.keys.map((c) => ({
[c]: t
})),
{

@@ -1981,22 +1994,42 @@ $or: s

}
}, o = this._fuse.search(r);
i = this.config.enableHighlighting ? $s(o) : o.map((c) => c.item);
}, o = this._fuse.search(n);
r = this.config.enableHighlighting ? $s(o, "highlight", this.config.titleProperty) : o.map((c) => c.item);
}
this._results = i, this.requestUpdate();
this._results = this.sortResults(r), this.requestUpdate();
}
aggregateResults(t, e) {
return t.filter((s) => {
const i = s[this.config.aggregateResults];
return Array.isArray(i) ? i.includes(e) : i === e;
const r = s[this.config.aggregateResults];
return Array.isArray(r) ? r.includes(e) : r === e;
});
}
sortResults(t) {
return [...t].sort(
(e, s) => (
// @ts-ignore
e[this.config.titleProperty] < s[this.config.titleProperty] ? -1 : 1
)
);
}
toggleFilter(t, e) {
this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((s) => {
Object.keys(this._filters[s]).forEach((i) => {
this._filters[s][i] = !1;
this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((r) => {
Object.keys(this._filters[r]).forEach((n) => {
this._filters[r][n] = !1;
});
}), this._filters[t][e] = !this._filters[t][e], console.log(this._filters), this.search();
}), this._filters[t][e] = !this._filters[t][e], this.search();
const s = this.renderRoot.querySelectorAll(
"ul#results input[type='radio']"
);
for (let r = 0; r < s.length; r++)
s[r].checked = !1;
setTimeout(() => {
const r = this.renderRoot.querySelector(
// @ts-ignore
`#${this._selectedResult.id}`
);
r && (r.checked = !0, this.requestUpdate());
});
}
render() {
return j`
return O`
<style>

@@ -2019,4 +2052,10 @@ ${vs}

this.config.filterProperties,
(t) => j`
<details id="details-filter">
(t) => O`
<details
id="details-filter"
data-filter="${t}"
@click=${() => this.renderRoot.querySelectorAll("details#details-filter").forEach((e) => {
e.getAttribute("data-filter") !== t && (e.removeAttribute("open"), this.requestUpdate());
})}
>
<summary>

@@ -2038,23 +2077,25 @@ <small>

</summary>
<ul>
${// @ts-ignore
<div class="scroll" style="max-height: 150px">
<ul>
${// @ts-ignore
this._filters[t] ? V(
// @ts-ignore
Object.keys(this._filters[t]).sort(),
(e) => j`
<li>
<label>
<input
name="selection"
type="${this.config.exclusiveFilters === !0 ? "radio" : "checkbox"}"
checked="${// @ts-ignore
(e) => O`
<li>
<label>
<input
name="selection"
type="${this.config.exclusiveFilters === !0 ? "radio" : "checkbox"}"
checked="${// @ts-ignore
this._filters[t][e] || m}"
@click=${() => this.toggleFilter(t, e)}
/>
<span class="title">${e}</span>
</label>
</li>
`
@click=${() => this.toggleFilter(t, e)}
/>
<span class="title">${e}</span>
</label>
</li>
`
) : null}
</ul>
</ul>
</div>
</details>

@@ -2070,2 +2111,3 @@ `

<div id="container-results" class="scroll">
${this._results.length < 1 ? O` <small class="no-results">No matching items</small> ` : m}
<ul id="results">

@@ -2079,3 +2121,3 @@ ${this.config.aggregateResults ? V(

),
(t) => j`<details
(t) => O`<details
id="details-results"

@@ -2109,3 +2151,3 @@ open

// @ts-ignore
(e) => j`
(e) => O`
<li>

@@ -2116,7 +2158,11 @@ <label>

name="result"
@click=${() => this.config.onSelect(e)}
id="${// @ts-ignore
e.id}"
@click=${() => {
this._selectedResult = e, this.config.onSelect(e);
}}
/>
<span class="title"
>${// @ts-ignore
Bt(e.name)}</span
Bt(e[this.config.titleProperty])}</span
>

@@ -2132,3 +2178,6 @@ </label>

// @ts-ignore
(t) => j`<li>${Bt(t.name)}</li>`
(t) => O`<li>
${// @ts-ignore
Bt(t[this.config.titleProperty])}
</li>`
)}

@@ -2142,22 +2191,25 @@ </ul>

};
W([
H([
ot()
], C.prototype, "_items", 2);
H([
ot()
], C.prototype, "_results", 2);
H([
ot()
], C.prototype, "_filters", 2);
H([
ot()
], C.prototype, "_selectedResult", 2);
H([
Mt({ attribute: !1 })
], C.prototype, "config", 2);
H([
Mt()
], P.prototype, "_items", 2);
W([
Mt()
], P.prototype, "_results", 2);
W([
Mt()
], P.prototype, "_filters", 2);
W([
wt({ attribute: !1 })
], P.prototype, "config", 2);
W([
wt()
], P.prototype, "apply", 2);
P = W([
], C.prototype, "apply", 2);
C = H([
Me("eox-itemfilter")
], P);
], C);
export {
P as EOxItemFilter
C as EOxItemFilter
};
{
"name": "@eox/itemfilter",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -13,9 +13,13 @@ import { EOxItemFilter } from "../src/main";

EOxItemFilter.config = {
filterProperties: ["themes"],
titleProperty: "title",
filterProperties: ["themes", "code", "description"],
aggregateResults: "themes",
enableSearch: true,
// enableHighlighting: false,
// onSelect: (item: any) => {
// console.log(item);
// },
enableHighlighting: true,
fuseConfig: {
keys: ["title", "description", "themes"],
},
onSelect: (item: any) => {
console.log(item);
},
// matchAllWhenEmpty: true,

@@ -22,0 +26,0 @@ // exclusiveFilters: true,

@@ -13,2 +13,3 @@ import { EOxItemFilter } from "../src/main";

EOxItemFilter.config = {
titleProperty: "title",
filterProperties: ["themes"],

@@ -15,0 +16,0 @@ aggregateResults: "themes",

@@ -5,4 +5,6 @@ [

"code": "E10a2",
"description": "Actively managed total area from Sentinel-2 data",
"indicator": "Actively managed total area from Sentinel-2 data",
"themes": ["agriculture"],
"title": "White Asparagus area [%]",
"name": "Actively managed total area from Sentinel-2 data"

@@ -13,4 +15,6 @@ },

"code": "E10a9",
"description": "Agricultural Workers",
"indicator": "Agricultural Workers",
"themes": ["agriculture"],
"title": "Workers availability [nr]",
"name": "Agricultural Workers"

@@ -21,4 +25,6 @@ },

"code": "N1",
"description": "Air Quality",
"indicator": "Air Quality",
"themes": ["air"],
"title": "City level NO2 (S5p)",
"name": "Air Quality"

@@ -29,4 +35,6 @@ },

"code": "E13o",
"description": "Average number of vessels in a km2 cell in a given period",
"indicator": "Average number of vessels in a km2 cell in a given period",
"themes": ["economy"],
"title": "Vessel density (all) [h/sqkm]",
"name": "Average number of vessels in a km2 cell in a given period"

@@ -37,4 +45,6 @@ },

"code": "E13p",
"description": "Average number of vessels in a km2 cell in a given period",
"indicator": "Average number of vessels in a km2 cell in a given period",
"themes": ["economy"],
"title": "Vessel density (cargo) [h/sqkm]",
"name": "Average number of vessels in a km2 cell in a given period"

@@ -45,4 +55,6 @@ },

"code": "E13q",
"description": "Average number of vessels in a km2 cell in a given period",
"indicator": "Average number of vessels in a km2 cell in a given period",
"themes": ["economy"],
"title": "Vessel density (tanker) [h/sqkm]",
"name": "Average number of vessels in a km2 cell in a given period"

@@ -53,4 +65,6 @@ },

"code": "E13r",
"description": "Average number of vessels in a km2 cell in a given period",
"indicator": "Average number of vessels in a km2 cell in a given period",
"themes": ["economy"],
"title": "Vessel density (others) [h/sqkm]",
"name": "Average number of vessels in a km2 cell in a given period"

@@ -61,4 +75,6 @@ },

"code": "C1",
"description": "Boat traffic - NO2 level",
"indicator": "Boat traffic - NO2 level",
"themes": ["economy", "air"],
"title": "Ships - NO2 Correlation",
"indicatorOverwrite": "Ports and Shipping - impact on air quality",

@@ -70,4 +86,6 @@ "name": "Boat traffic - NO2 level"

"code": "CDS1",
"description": "C3S Data",
"indicator": "C3S Data",
"themes": ["air"],
"title": "Temperature",
"name": "C3S Data"

@@ -78,4 +96,6 @@ },

"code": "N1a",
"description": "CAMS Air Quality",
"indicator": "CAMS Air Quality",
"themes": ["air"],
"title": "City level PM2.5 (model)",
"name": "CAMS Air Quality"

@@ -86,4 +106,6 @@ },

"code": "N1b",
"description": "CAMS Air Quality",
"indicator": "CAMS Air Quality",
"themes": ["air"],
"title": "City level NO2 (model)",
"name": "CAMS Air Quality"

@@ -94,4 +116,6 @@ },

"code": "N1c",
"description": "CAMS Air Quality",
"indicator": "CAMS Air Quality",
"themes": ["air"],
"title": "City level PM10 (model)",
"name": "CAMS Air Quality"

@@ -102,4 +126,6 @@ },

"code": "N1d",
"description": "CAMS Air Quality",
"indicator": "CAMS Air Quality",
"themes": ["air"],
"title": "City level O3 (model)",
"name": "CAMS Air Quality"

@@ -110,4 +136,6 @@ },

"code": "E13e",
"description": "Cargo ships in port based on AIS data",
"indicator": "Cargo ships in port based on AIS data",
"themes": ["economy"],
"title": "Cargo Ships [nr]",
"name": "Cargo ships in port based on AIS data"

@@ -118,4 +146,6 @@ },

"code": "E13n",
"description": "Changes in traffic based on mobile data",
"indicator": "Changes in traffic based on mobile data",
"themes": ["economy"],
"title": "Trucks transiting ports [%]",
"name": "Changes in traffic based on mobile data"

@@ -126,4 +156,6 @@ },

"code": "N3c",
"description": "CMEMS product",
"indicator": "CMEMS product",
"themes": ["water"],
"title": "CHL-a concentration (map, 1km)",
"name": "CMEMS product"

@@ -134,4 +166,6 @@ },

"code": "CV",
"description": "Covid-19 cases",
"indicator": "Covid-19 cases",
"themes": ["health"],
"title": "Covid-19 cases",
"name": "Covid-19 cases"

@@ -142,4 +176,6 @@ },

"code": "OW",
"description": "Covid-19 vaccinations",
"indicator": "Covid-19 vaccinations",
"themes": ["health"],
"title": "Covid-19 vaccinations",
"name": "Covid-19 vaccinations"

@@ -150,4 +186,6 @@ },

"code": "E3",
"description": "Crude Oil and other input materials",
"indicator": "Crude Oil and other input materials",
"themes": ["economy"],
"title": "Raw Material Inventory",
"name": "Crude Oil and other input materials"

@@ -158,6 +196,8 @@ },

"code": "E13l",
"description": "Cruise ships in port based on AIS data",
"indicator": "Cruise ships in port based on AIS data",
"themes": ["economy"],
"title": "Cruise Ships [nr]",
"name": "Cruise ships in port based on AIS data"
}
]

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc