@searchcraft/react-sdk 0.1.4 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +42 -161
- package/dist/index.js +2619 -777
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
- package/dist/style.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,820 +1,2662 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
debug(e) {
|
|
38
|
-
this.logLevel <= 0 && console.log(this.logFormatter(0, e));
|
|
39
|
-
}
|
|
40
|
-
info(e) {
|
|
41
|
-
this.logLevel <= 1 && console.info(this.logFormatter(1, e));
|
|
42
|
-
}
|
|
43
|
-
warn(e) {
|
|
44
|
-
this.logLevel <= 2 && console.warn(this.logFormatter(2, e));
|
|
45
|
-
}
|
|
46
|
-
error(e) {
|
|
47
|
-
this.logLevel <= 3 && console.error(this.logFormatter(3, e));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const lt = {
|
|
51
|
-
error: null,
|
|
52
|
-
index: [""],
|
|
53
|
-
isRequesting: !1,
|
|
54
|
-
mode: "fuzzy",
|
|
55
|
-
query: "",
|
|
56
|
-
setQuery: (n) => n,
|
|
57
|
-
search: async () => null
|
|
58
|
-
}, nt = Y(lt), et = Y(
|
|
59
|
-
void 0
|
|
60
|
-
), ut = ({
|
|
61
|
-
children: n,
|
|
62
|
-
searchcraft: e,
|
|
63
|
-
debug: i = !1
|
|
64
|
-
}) => {
|
|
65
|
-
const [a, c] = y(""), [r, s] = y(!1), [l, o] = y(null), [p, m] = y("light"), h = U(() => i ? new ht({ logLevel: _.DEBUG }) : null, [i]), d = (v, I) => {
|
|
66
|
-
if (h)
|
|
67
|
-
switch (v) {
|
|
68
|
-
case _.DEBUG:
|
|
69
|
-
h.debug(I);
|
|
70
|
-
break;
|
|
71
|
-
case _.INFO:
|
|
72
|
-
h.info(I);
|
|
73
|
-
break;
|
|
74
|
-
case _.WARN:
|
|
75
|
-
h.warn(I);
|
|
76
|
-
break;
|
|
77
|
-
case _.ERROR:
|
|
78
|
-
h.error(I);
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
}, R = async () => {
|
|
82
|
-
d(_.INFO, `Starting search with query: "${a}"`), s(!0);
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import _ from "react";
|
|
3
|
+
const Zt = "searchcraft-javascript-sdk", G = (
|
|
4
|
+
/* searchcraft-javascript-sdk */
|
|
5
|
+
{ allRenderFn: !0, appendChildSlotFix: !1, asyncLoading: !0, asyncQueue: !1, attachStyles: !0, cloneNodeFix: !1, cmpDidLoad: !0, cmpDidRender: !1, cmpDidUnload: !1, cmpDidUpdate: !1, cmpShouldUpdate: !1, cmpWillLoad: !1, cmpWillRender: !1, cmpWillUpdate: !1, connectedCallback: !0, constructableCSS: !0, cssAnnotations: !0, devTools: !1, disconnectedCallback: !0, element: !1, event: !0, experimentalScopedSlotChanges: !1, experimentalSlotFixes: !1, formAssociated: !1, hasRenderFn: !0, hostListener: !1, hostListenerTarget: !1, hostListenerTargetBody: !1, hostListenerTargetDocument: !1, hostListenerTargetParent: !1, hostListenerTargetWindow: !1, hotModuleReplacement: !1, hydrateClientSide: !1, hydrateServerSide: !1, hydratedAttribute: !1, hydratedClass: !0, hydratedSelectorName: "hydrated", invisiblePrehydration: !0, isDebug: !1, isDev: !1, isTesting: !1, lazyLoad: !1, lifecycle: !0, lifecycleDOMEvents: !1, member: !0, method: !1, mode: !1, observeAttribute: !0, profile: !1, prop: !0, propBoolean: !0, propMutable: !1, propNumber: !0, propString: !0, reflect: !1, scoped: !1, scopedSlotTextContentFix: !1, scriptDataOpts: !1, shadowDelegatesFocus: !1, shadowDom: !1, slot: !0, slotChildNodesFix: !1, slotRelocation: !0, state: !0, style: !0, svg: !0, taskQueue: !0, updatable: !0, vdomAttribute: !0, vdomClass: !0, vdomFunctional: !0, vdomKey: !0, vdomListener: !0, vdomPropOrAttr: !0, vdomRef: !1, vdomRender: !0, vdomStyle: !0, vdomText: !0, vdomXlink: !1, watchCallback: !0 }
|
|
6
|
+
);
|
|
7
|
+
var er = Object.defineProperty, tr = (e, t) => {
|
|
8
|
+
for (var r in t)
|
|
9
|
+
er(e, r, { get: t[r], enumerable: !0 });
|
|
10
|
+
}, nt = /* @__PURE__ */ new WeakMap(), Q = (e) => nt.get(e), rr = (e, t) => {
|
|
11
|
+
const r = {
|
|
12
|
+
$flags$: 0,
|
|
13
|
+
$hostElement$: e,
|
|
14
|
+
$cmpMeta$: t,
|
|
15
|
+
$instanceValues$: /* @__PURE__ */ new Map()
|
|
16
|
+
};
|
|
17
|
+
return r.$onReadyPromise$ = new Promise((s) => r.$onReadyResolve$ = s), e["s-p"] = [], e["s-rc"] = [], nt.set(e, r);
|
|
18
|
+
}, Me = (e, t) => t in e, le = (e, t) => (0, console.error)(e, t), ne = /* @__PURE__ */ new Map(), sr = "slot-fb{display:contents}slot-fb[hidden]{display:none}", ue = typeof window < "u" ? window : {}, j = ue.document || { head: {} }, A = ue.HTMLElement || class {
|
|
19
|
+
}, S = {
|
|
20
|
+
$flags$: 0,
|
|
21
|
+
$resourcesUrl$: "",
|
|
22
|
+
jmp: (e) => e(),
|
|
23
|
+
raf: (e) => requestAnimationFrame(e),
|
|
24
|
+
ael: (e, t, r, s) => e.addEventListener(t, r, s),
|
|
25
|
+
rel: (e, t, r, s) => e.removeEventListener(t, r, s),
|
|
26
|
+
ce: (e, t) => new CustomEvent(e, t)
|
|
27
|
+
}, nr = G.shadowDom, ar = (e) => Promise.resolve(e), at = /* @__PURE__ */ (() => {
|
|
28
|
+
try {
|
|
29
|
+
return new CSSStyleSheet(), typeof new CSSStyleSheet().replaceSync == "function";
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
return !1;
|
|
33
|
+
})(), fe = !1, Be = [], ct = [], cr = (e, t) => (r) => {
|
|
34
|
+
e.push(r), fe || (fe = !0, S.$flags$ & 4 ? me(pe) : S.raf(pe));
|
|
35
|
+
}, Le = (e) => {
|
|
36
|
+
for (let t = 0; t < e.length; t++)
|
|
83
37
|
try {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
d(
|
|
88
|
-
_.ERROR,
|
|
89
|
-
`Search failed with error: ${v.message}`
|
|
90
|
-
);
|
|
91
|
-
} finally {
|
|
92
|
-
s(!1);
|
|
38
|
+
e[t](performance.now());
|
|
39
|
+
} catch (r) {
|
|
40
|
+
le(r);
|
|
93
41
|
}
|
|
42
|
+
e.length = 0;
|
|
43
|
+
}, pe = () => {
|
|
44
|
+
Le(Be), Le(ct), (fe = Be.length > 0) && S.raf(pe);
|
|
45
|
+
}, me = (e) => ar().then(e), ir = /* @__PURE__ */ cr(ct), Ie = {}, or = "http://www.w3.org/2000/svg", lr = "http://www.w3.org/1999/xhtml", ye = (e) => (e = typeof e, e === "object" || e === "function");
|
|
46
|
+
function ur(e) {
|
|
47
|
+
var t, r, s;
|
|
48
|
+
return (s = (r = (t = e.head) == null ? void 0 : t.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : r.getAttribute("content")) != null ? s : void 0;
|
|
49
|
+
}
|
|
50
|
+
var dr = {};
|
|
51
|
+
tr(dr, {
|
|
52
|
+
err: () => it,
|
|
53
|
+
map: () => hr,
|
|
54
|
+
ok: () => ge,
|
|
55
|
+
unwrap: () => fr,
|
|
56
|
+
unwrapErr: () => pr
|
|
57
|
+
});
|
|
58
|
+
var ge = (e) => ({
|
|
59
|
+
isOk: !0,
|
|
60
|
+
isErr: !1,
|
|
61
|
+
value: e
|
|
62
|
+
}), it = (e) => ({
|
|
63
|
+
isOk: !1,
|
|
64
|
+
isErr: !0,
|
|
65
|
+
value: e
|
|
66
|
+
});
|
|
67
|
+
function hr(e, t) {
|
|
68
|
+
if (e.isOk) {
|
|
69
|
+
const r = t(e.value);
|
|
70
|
+
return r instanceof Promise ? r.then((s) => ge(s)) : ge(r);
|
|
71
|
+
}
|
|
72
|
+
if (e.isErr) {
|
|
73
|
+
const r = e.value;
|
|
74
|
+
return it(r);
|
|
75
|
+
}
|
|
76
|
+
throw "should never get here";
|
|
77
|
+
}
|
|
78
|
+
var fr = (e) => {
|
|
79
|
+
if (e.isOk)
|
|
80
|
+
return e.value;
|
|
81
|
+
throw e.value;
|
|
82
|
+
}, pr = (e) => {
|
|
83
|
+
if (e.isErr)
|
|
84
|
+
return e.value;
|
|
85
|
+
throw e.value;
|
|
86
|
+
}, V = (e, t = "") => () => {
|
|
87
|
+
}, d = (e, t, ...r) => {
|
|
88
|
+
let s = null, c = null, a = null, n = !1, o = !1;
|
|
89
|
+
const u = [], i = (h) => {
|
|
90
|
+
for (let f = 0; f < h.length; f++)
|
|
91
|
+
s = h[f], Array.isArray(s) ? i(s) : s != null && typeof s != "boolean" && ((n = typeof e != "function" && !ye(s)) && (s = String(s)), n && o ? u[u.length - 1].$text$ += s : u.push(n ? ae(null, s) : s), o = n);
|
|
94
92
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}, k = at(() => {
|
|
108
|
-
m((v) => v === "light" ? "dark" : "light");
|
|
109
|
-
}, []), ot = U(
|
|
110
|
-
() => ({
|
|
111
|
-
theme: p,
|
|
112
|
-
toggleTheme: k
|
|
113
|
-
}),
|
|
114
|
-
[p, k]
|
|
115
|
-
);
|
|
116
|
-
return /* @__PURE__ */ t(nt.Provider, { value: F, children: /* @__PURE__ */ t(et.Provider, { value: ot, children: n }) });
|
|
117
|
-
}, S = () => {
|
|
118
|
-
const n = V(nt);
|
|
119
|
-
if (!n)
|
|
120
|
-
throw new Error(
|
|
121
|
-
"Searchcraft compound components must be used within Searchcraft.Provider"
|
|
93
|
+
if (i(r), t) {
|
|
94
|
+
t.key && (c = t.key), t.name && (a = t.name);
|
|
95
|
+
{
|
|
96
|
+
const h = t.className || t.class;
|
|
97
|
+
h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((f) => h[f]).join(" "));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (typeof e == "function")
|
|
101
|
+
return e(
|
|
102
|
+
t === null ? {} : t,
|
|
103
|
+
u,
|
|
104
|
+
mr
|
|
122
105
|
);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
106
|
+
const l = ae(e, null);
|
|
107
|
+
return l.$attrs$ = t, u.length > 0 && (l.$children$ = u), l.$key$ = c, l.$name$ = a, l;
|
|
108
|
+
}, ae = (e, t) => {
|
|
109
|
+
const r = {
|
|
110
|
+
$flags$: 0,
|
|
111
|
+
$tag$: e,
|
|
112
|
+
$text$: t,
|
|
113
|
+
$elm$: null,
|
|
114
|
+
$children$: null
|
|
115
|
+
};
|
|
116
|
+
return r.$attrs$ = null, r.$key$ = null, r.$name$ = null, r;
|
|
117
|
+
}, gr = {}, br = (e) => e && e.$tag$ === gr, mr = {
|
|
118
|
+
forEach: (e, t) => e.map(Oe).forEach(t),
|
|
119
|
+
map: (e, t) => e.map(Oe).map(t).map(yr)
|
|
120
|
+
}, Oe = (e) => ({
|
|
121
|
+
vattrs: e.$attrs$,
|
|
122
|
+
vchildren: e.$children$,
|
|
123
|
+
vkey: e.$key$,
|
|
124
|
+
vname: e.$name$,
|
|
125
|
+
vtag: e.$tag$,
|
|
126
|
+
vtext: e.$text$
|
|
127
|
+
}), yr = (e) => {
|
|
128
|
+
if (typeof e.vtag == "function") {
|
|
129
|
+
const r = { ...e.vattrs };
|
|
130
|
+
return e.vkey && (r.key = e.vkey), e.vname && (r.name = e.vname), d(e.vtag, r, ...e.vchildren || []);
|
|
131
|
+
}
|
|
132
|
+
const t = ae(e.vtag, e.vtext);
|
|
133
|
+
return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
|
|
134
|
+
}, vr = (e, t) => e != null && !ye(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, Fr = (e) => e, M = (e, t, r) => {
|
|
135
|
+
const s = Fr(e);
|
|
136
|
+
return {
|
|
137
|
+
emit: (c) => ot(s, t, {
|
|
138
|
+
bubbles: !!(r & 4),
|
|
139
|
+
composed: !!(r & 2),
|
|
140
|
+
cancelable: !!(r & 1),
|
|
141
|
+
detail: c
|
|
142
|
+
})
|
|
143
|
+
};
|
|
144
|
+
}, ot = (e, t, r) => {
|
|
145
|
+
const s = S.ce(t, r);
|
|
146
|
+
return e.dispatchEvent(s), s;
|
|
147
|
+
}, je = /* @__PURE__ */ new WeakMap(), xr = (e, t, r) => {
|
|
148
|
+
let s = ne.get(e);
|
|
149
|
+
at && r ? (s = s || new CSSStyleSheet(), typeof s == "string" ? s = t : s.replaceSync(t)) : s = t, ne.set(e, s);
|
|
150
|
+
}, Er = (e, t, r) => {
|
|
151
|
+
var s;
|
|
152
|
+
const c = lt(t), a = ne.get(c);
|
|
153
|
+
if (e = e.nodeType === 11 ? e : j, a)
|
|
154
|
+
if (typeof a == "string") {
|
|
155
|
+
e = e.head || e;
|
|
156
|
+
let n = je.get(e), o;
|
|
157
|
+
if (n || je.set(e, n = /* @__PURE__ */ new Set()), !n.has(c)) {
|
|
158
|
+
{
|
|
159
|
+
o = j.createElement("style"), o.innerHTML = a;
|
|
160
|
+
const u = (s = S.$nonce$) != null ? s : ur(j);
|
|
161
|
+
if (u != null && o.setAttribute("nonce", u), !(t.$flags$ & 1))
|
|
162
|
+
if (e.nodeName === "HEAD") {
|
|
163
|
+
const i = e.querySelectorAll("link[rel=preconnect]"), l = i.length > 0 ? i[i.length - 1].nextSibling : e.querySelector("style");
|
|
164
|
+
e.insertBefore(o, l);
|
|
165
|
+
} else if ("host" in e)
|
|
166
|
+
if (at) {
|
|
167
|
+
const i = new CSSStyleSheet();
|
|
168
|
+
i.replaceSync(a), e.adoptedStyleSheets = [i, ...e.adoptedStyleSheets];
|
|
169
|
+
} else {
|
|
170
|
+
const i = e.querySelector("style");
|
|
171
|
+
i ? i.innerHTML = a + i.innerHTML : e.prepend(o);
|
|
172
|
+
}
|
|
173
|
+
else
|
|
174
|
+
e.append(o);
|
|
175
|
+
t.$flags$ & 1 && e.nodeName !== "HEAD" && e.insertBefore(o, null);
|
|
176
|
+
}
|
|
177
|
+
t.$flags$ & 4 && (o.innerHTML += sr), n && n.add(c);
|
|
178
|
+
}
|
|
179
|
+
} else e.adoptedStyleSheets.includes(a) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, a]);
|
|
180
|
+
return c;
|
|
181
|
+
}, $r = (e) => {
|
|
182
|
+
const t = e.$cmpMeta$, r = e.$hostElement$, s = V("attachStyles", t.$tagName$);
|
|
183
|
+
Er(
|
|
184
|
+
r.getRootNode(),
|
|
185
|
+
t
|
|
186
|
+
), s();
|
|
187
|
+
}, lt = (e, t) => "sc-" + e.$tagName$, Ue = (e, t, r, s, c, a) => {
|
|
188
|
+
if (r !== s) {
|
|
189
|
+
let n = Me(e, t), o = t.toLowerCase();
|
|
190
|
+
if (t === "class") {
|
|
191
|
+
const u = e.classList, i = Ne(r), l = Ne(s);
|
|
192
|
+
u.remove(...i.filter((h) => h && !l.includes(h))), u.add(...l.filter((h) => h && !i.includes(h)));
|
|
193
|
+
} else if (t === "style") {
|
|
194
|
+
for (const u in r)
|
|
195
|
+
(!s || s[u] == null) && (u.includes("-") ? e.style.removeProperty(u) : e.style[u] = "");
|
|
196
|
+
for (const u in s)
|
|
197
|
+
(!r || s[u] !== r[u]) && (u.includes("-") ? e.style.setProperty(u, s[u]) : e.style[u] = s[u]);
|
|
198
|
+
} else if (t !== "key") if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n") {
|
|
199
|
+
if (t[2] === "-" ? t = t.slice(3) : Me(ue, o) ? t = o.slice(2) : t = o[2] + t.slice(3), r || s) {
|
|
200
|
+
const u = t.endsWith(ut);
|
|
201
|
+
t = t.replace(wr, ""), r && S.rel(e, t, r, u), s && S.ael(e, t, s, u);
|
|
202
|
+
}
|
|
203
|
+
} else {
|
|
204
|
+
const u = ye(s);
|
|
205
|
+
if ((n || u && s !== null) && !c)
|
|
206
|
+
try {
|
|
207
|
+
if (e.tagName.includes("-"))
|
|
208
|
+
e[t] = s;
|
|
209
|
+
else {
|
|
210
|
+
const i = s ?? "";
|
|
211
|
+
t === "list" ? n = !1 : (r == null || e[t] != i) && (typeof e.__lookupSetter__(t) == "function" ? e[t] = i : e.setAttribute(t, i));
|
|
212
|
+
}
|
|
213
|
+
} catch {
|
|
214
|
+
}
|
|
215
|
+
s == null || s === !1 ? (s !== !1 || e.getAttribute(t) === "") && e.removeAttribute(t) : (!n || a & 4 || c) && !u && (s = s === !0 ? "" : s, e.setAttribute(t, s));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}, Sr = /\s/, Ne = (e) => e ? e.split(Sr) : [], ut = "Capture", wr = new RegExp(ut + "$"), dt = (e, t, r) => {
|
|
219
|
+
const s = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, c = e && e.$attrs$ || Ie, a = t.$attrs$ || Ie;
|
|
220
|
+
for (const n of qe(Object.keys(c)))
|
|
221
|
+
n in a || Ue(s, n, c[n], void 0, r, t.$flags$);
|
|
222
|
+
for (const n of qe(Object.keys(a)))
|
|
223
|
+
Ue(s, n, c[n], a[n], r, t.$flags$);
|
|
129
224
|
};
|
|
130
|
-
function
|
|
131
|
-
return
|
|
225
|
+
function qe(e) {
|
|
226
|
+
return e.includes("ref") ? (
|
|
227
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
228
|
+
[...e.filter((t) => t !== "ref"), "ref"]
|
|
229
|
+
) : (
|
|
230
|
+
// no need to sort, return the original array
|
|
231
|
+
e
|
|
232
|
+
);
|
|
132
233
|
}
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
234
|
+
var be, ve, ce = !1, ie = !1, Fe = !1, C = !1, oe = (e, t, r, s) => {
|
|
235
|
+
var c;
|
|
236
|
+
const a = t.$children$[r];
|
|
237
|
+
let n = 0, o, u, i;
|
|
238
|
+
if (ce || (Fe = !0, a.$tag$ === "slot" && (a.$flags$ |= a.$children$ ? (
|
|
239
|
+
// slot element has fallback content
|
|
240
|
+
// still create an element that "mocks" the slot element
|
|
241
|
+
2
|
|
242
|
+
) : (
|
|
243
|
+
// slot element does not have fallback content
|
|
244
|
+
// create an html comment we'll use to always reference
|
|
245
|
+
// where actual slot content should sit next to
|
|
246
|
+
1
|
|
247
|
+
))), a.$text$ !== null)
|
|
248
|
+
o = a.$elm$ = j.createTextNode(a.$text$);
|
|
249
|
+
else if (a.$flags$ & 1)
|
|
250
|
+
o = a.$elm$ = j.createTextNode("");
|
|
251
|
+
else {
|
|
252
|
+
if (C || (C = a.$tag$ === "svg"), o = a.$elm$ = j.createElementNS(
|
|
253
|
+
C ? or : lr,
|
|
254
|
+
!ce && G.slotRelocation && a.$flags$ & 2 ? "slot-fb" : a.$tag$
|
|
255
|
+
), C && a.$tag$ === "foreignObject" && (C = !1), dt(null, a, C), o.getRootNode().querySelector("body"), a.$children$)
|
|
256
|
+
for (n = 0; n < a.$children$.length; ++n)
|
|
257
|
+
u = oe(e, a, n), u && o.appendChild(u);
|
|
258
|
+
a.$tag$ === "svg" ? C = !1 : o.tagName === "foreignObject" && (C = !0);
|
|
259
|
+
}
|
|
260
|
+
return o["s-hn"] = ve, a.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = be, o["s-sn"] = a.$name$ || "", o["s-rf"] = (c = a.$attrs$) == null ? void 0 : c.ref, i = e && e.$children$ && e.$children$[r], i && i.$tag$ === a.$tag$ && e.$elm$ && K(e.$elm$, !1)), o;
|
|
261
|
+
}, K = (e, t) => {
|
|
262
|
+
S.$flags$ |= 1;
|
|
263
|
+
const r = Array.from(e.childNodes);
|
|
264
|
+
e["s-sr"] && G.experimentalSlotFixes;
|
|
265
|
+
for (let s = r.length - 1; s >= 0; s--) {
|
|
266
|
+
const c = r[s];
|
|
267
|
+
c["s-hn"] !== ve && c["s-ol"] && (N(pt(c), c, xe(c)), c["s-ol"].remove(), c["s-ol"] = void 0, c["s-sh"] = void 0, Fe = !0), t && K(c, t);
|
|
268
|
+
}
|
|
269
|
+
S.$flags$ &= -2;
|
|
270
|
+
}, ht = (e, t, r, s, c, a) => {
|
|
271
|
+
let n = e["s-cr"] && e["s-cr"].parentNode || e, o;
|
|
272
|
+
for (; c <= a; ++c)
|
|
273
|
+
s[c] && (o = oe(null, r, c), o && (s[c].$elm$ = o, N(n, o, xe(t))));
|
|
274
|
+
}, ft = (e, t, r) => {
|
|
275
|
+
for (let s = t; s <= r; ++s) {
|
|
276
|
+
const c = e[s];
|
|
277
|
+
if (c) {
|
|
278
|
+
const a = c.$elm$;
|
|
279
|
+
a && (ie = !0, a["s-ol"] ? a["s-ol"].remove() : K(a, !0), a.remove());
|
|
148
280
|
}
|
|
149
|
-
function a(r) {
|
|
150
|
-
if (typeof r == "string" || typeof r == "number")
|
|
151
|
-
return r;
|
|
152
|
-
if (typeof r != "object")
|
|
153
|
-
return "";
|
|
154
|
-
if (Array.isArray(r))
|
|
155
|
-
return i.apply(null, r);
|
|
156
|
-
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
157
|
-
return r.toString();
|
|
158
|
-
var s = "";
|
|
159
|
-
for (var l in r)
|
|
160
|
-
e.call(r, l) && r[l] && (s = c(s, l));
|
|
161
|
-
return s;
|
|
162
|
-
}
|
|
163
|
-
function c(r, s) {
|
|
164
|
-
return s ? r ? r + " " + s : r + s : r;
|
|
165
|
-
}
|
|
166
|
-
n.exports ? (i.default = i, n.exports = i) : window.classNames = i;
|
|
167
|
-
})();
|
|
168
|
-
})(rt);
|
|
169
|
-
var gt = rt.exports;
|
|
170
|
-
const L = /* @__PURE__ */ pt(gt), Lt = "_formLTR_dvuqa_5", dt = "_formRTL_dvuqa_9", _t = "_searchContainer_dvuqa_13", D = {
|
|
171
|
-
formLTR: Lt,
|
|
172
|
-
formRTL: dt,
|
|
173
|
-
searchContainer: _t
|
|
174
|
-
}, ft = "_inputContainerLTR_1nio0_5", mt = "_inputContainerRTL_1nio0_9", Ct = "_inputLightLTR_1nio0_14", Rt = "_inputDarkLTR_1nio0_38", kt = "_inputErrorLightLTR_1nio0_62", vt = "_inputErrorDarkLTR_1nio0_90", Tt = "_inputLightRTL_1nio0_118", bt = "_inputDarkRTL_1nio0_143", yt = "_inputErrorLightRTL_1nio0_168", Dt = "_inputErrorDarkRTL_1nio0_197", C = {
|
|
175
|
-
inputContainerLTR: ft,
|
|
176
|
-
inputContainerRTL: mt,
|
|
177
|
-
inputLightLTR: Ct,
|
|
178
|
-
inputDarkLTR: Rt,
|
|
179
|
-
inputErrorLightLTR: kt,
|
|
180
|
-
inputErrorDarkLTR: vt,
|
|
181
|
-
inputLightRTL: Tt,
|
|
182
|
-
inputDarkRTL: bt,
|
|
183
|
-
inputErrorLightRTL: yt,
|
|
184
|
-
inputErrorDarkRTL: Dt
|
|
185
|
-
}, St = "_inputClearButtonLTR_t63ei_5", It = "_inputClearButtonRTL_t63ei_19", z = {
|
|
186
|
-
inputClearButtonLTR: St,
|
|
187
|
-
inputClearButtonRTL: It
|
|
188
|
-
}, Z = () => /* @__PURE__ */ u("svg", { width: "22", height: "22", viewBox: "0 0 22 22", fill: "none", children: [
|
|
189
|
-
/* @__PURE__ */ t("title", { children: "Searchcraft Clear Input Icon Light" }),
|
|
190
|
-
/* @__PURE__ */ t(
|
|
191
|
-
"path",
|
|
192
|
-
{
|
|
193
|
-
d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",
|
|
194
|
-
stroke: "black",
|
|
195
|
-
strokeWidth: "1.5",
|
|
196
|
-
strokeLinecap: "round",
|
|
197
|
-
strokeLinejoin: "round"
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
] }), G = () => /* @__PURE__ */ u(
|
|
201
|
-
"svg",
|
|
202
|
-
{
|
|
203
|
-
width: "22",
|
|
204
|
-
height: "22",
|
|
205
|
-
viewBox: "0 0 22 22",
|
|
206
|
-
fill: "none",
|
|
207
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ t("title", { children: "Searchcraft Clear Input Icon Dark" }),
|
|
210
|
-
/* @__PURE__ */ t(
|
|
211
|
-
"path",
|
|
212
|
-
{
|
|
213
|
-
d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",
|
|
214
|
-
stroke: "white",
|
|
215
|
-
strokeWidth: "1.5",
|
|
216
|
-
strokeLinecap: "round",
|
|
217
|
-
strokeLinejoin: "round"
|
|
218
|
-
}
|
|
219
|
-
)
|
|
220
|
-
]
|
|
221
281
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
{
|
|
247
|
-
d: "M1.5 11L6.5 6L1.5 1",
|
|
248
|
-
stroke: "#BFBFBF",
|
|
249
|
-
strokeWidth: "1.5",
|
|
250
|
-
strokeLinecap: "round",
|
|
251
|
-
strokeLinejoin: "round"
|
|
282
|
+
}, Cr = (e, t, r, s, c = !1) => {
|
|
283
|
+
let a = 0, n = 0, o = 0, u = 0, i = t.length - 1, l = t[0], h = t[i], f = s.length - 1, g = s[0], b = s[f], v, y;
|
|
284
|
+
for (; a <= i && n <= f; )
|
|
285
|
+
if (l == null)
|
|
286
|
+
l = t[++a];
|
|
287
|
+
else if (h == null)
|
|
288
|
+
h = t[--i];
|
|
289
|
+
else if (g == null)
|
|
290
|
+
g = s[++n];
|
|
291
|
+
else if (b == null)
|
|
292
|
+
b = s[--f];
|
|
293
|
+
else if (Z(l, g, c))
|
|
294
|
+
W(l, g, c), l = t[++a], g = s[++n];
|
|
295
|
+
else if (Z(h, b, c))
|
|
296
|
+
W(h, b, c), h = t[--i], b = s[--f];
|
|
297
|
+
else if (Z(l, b, c))
|
|
298
|
+
(l.$tag$ === "slot" || b.$tag$ === "slot") && K(l.$elm$.parentNode, !1), W(l, b, c), N(e, l.$elm$, h.$elm$.nextSibling), l = t[++a], b = s[--f];
|
|
299
|
+
else if (Z(h, g, c))
|
|
300
|
+
(l.$tag$ === "slot" || b.$tag$ === "slot") && K(h.$elm$.parentNode, !1), W(h, g, c), N(e, h.$elm$, l.$elm$), h = t[--i], g = s[++n];
|
|
301
|
+
else {
|
|
302
|
+
for (o = -1, u = a; u <= i; ++u)
|
|
303
|
+
if (t[u] && t[u].$key$ !== null && t[u].$key$ === g.$key$) {
|
|
304
|
+
o = u;
|
|
305
|
+
break;
|
|
252
306
|
}
|
|
253
|
-
)
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
), wt = "_spinnerContainer_1noam_1", Et = "_spinnerDark_1noam_7", Nt = "_spinning_1noam_1", xt = "_spinnerLight_1noam_16", x = {
|
|
257
|
-
spinnerContainer: wt,
|
|
258
|
-
spinnerDark: Et,
|
|
259
|
-
spinning: Nt,
|
|
260
|
-
spinnerLight: xt
|
|
261
|
-
}, J = () => /* @__PURE__ */ t("div", { className: x.spinnerContainer, children: /* @__PURE__ */ t("div", { className: x.spinnerLight }) }), B = () => /* @__PURE__ */ t("div", { className: x.spinnerContainer, children: /* @__PURE__ */ t("div", { className: x.spinnerDark }) }), $ = ({
|
|
262
|
-
onClearInput: n,
|
|
263
|
-
rightToLeftOrientation: e = !1
|
|
264
|
-
}) => {
|
|
265
|
-
const { isRequesting: i } = S(), { theme: a } = b(), c = a === "light";
|
|
266
|
-
return e ? /* @__PURE__ */ t(
|
|
267
|
-
"button",
|
|
268
|
-
{
|
|
269
|
-
className: L(
|
|
270
|
-
z.inputClearButtonRTL,
|
|
271
|
-
".sc-clear-input-button-rtl"
|
|
272
|
-
),
|
|
273
|
-
onClick: n,
|
|
274
|
-
type: "button",
|
|
275
|
-
children: i ? c ? /* @__PURE__ */ t(J, {}) : /* @__PURE__ */ t(B, {}) : c ? /* @__PURE__ */ t(Z, {}) : /* @__PURE__ */ t(G, {})
|
|
276
|
-
}
|
|
277
|
-
) : /* @__PURE__ */ t(
|
|
278
|
-
"button",
|
|
279
|
-
{
|
|
280
|
-
className: L(
|
|
281
|
-
z.inputClearButtonLTR,
|
|
282
|
-
".sc-clear-input-button-ltr"
|
|
283
|
-
),
|
|
284
|
-
onClick: n,
|
|
285
|
-
type: "button",
|
|
286
|
-
children: i ? c ? /* @__PURE__ */ t(J, {}) : /* @__PURE__ */ t(B, {}) : c ? /* @__PURE__ */ t(Z, {}) : /* @__PURE__ */ t(G, {})
|
|
307
|
+
o >= 0 ? (y = t[o], y.$tag$ !== g.$tag$ ? v = oe(t && t[n], r, o) : (W(y, g, c), t[o] = void 0, v = y.$elm$), g = s[++n]) : (v = oe(t && t[n], r, n), g = s[++n]), v && N(pt(l.$elm$), v, xe(l.$elm$));
|
|
287
308
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
309
|
+
a > i ? ht(
|
|
310
|
+
e,
|
|
311
|
+
s[f + 1] == null ? null : s[f + 1].$elm$,
|
|
312
|
+
r,
|
|
313
|
+
s,
|
|
314
|
+
n,
|
|
315
|
+
f
|
|
316
|
+
) : n > f && ft(t, a, i);
|
|
317
|
+
}, Z = (e, t, r = !1) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? (
|
|
318
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
319
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
320
|
+
"$nodeId$" in e && r && // `leftNode` is not from type HTMLComment which would cause many
|
|
321
|
+
// hydration comments to be removed
|
|
322
|
+
e.$elm$.nodeType !== 8 ? !1 : e.$name$ === t.$name$
|
|
323
|
+
) : r ? !0 : e.$key$ === t.$key$ : !1, xe = (e) => e && e["s-ol"] || e, pt = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, W = (e, t, r = !1) => {
|
|
324
|
+
const s = t.$elm$ = e.$elm$, c = e.$children$, a = t.$children$, n = t.$tag$, o = t.$text$;
|
|
325
|
+
let u;
|
|
326
|
+
o === null ? (C = n === "svg" ? !0 : n === "foreignObject" ? !1 : C, n === "slot" && !ce || dt(e, t, C), c !== null && a !== null ? Cr(s, c, t, a, r) : a !== null ? (e.$text$ !== null && (s.textContent = ""), ht(s, null, t, a, 0, a.length - 1)) : (
|
|
327
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
328
|
+
!r && G.updatable && c !== null && ft(c, 0, c.length - 1)
|
|
329
|
+
), C && n === "svg" && (C = !1)) : (u = s["s-cr"]) ? u.parentNode.textContent = o : e.$text$ !== o && (s.data = o);
|
|
330
|
+
}, gt = (e) => {
|
|
331
|
+
const t = e.childNodes;
|
|
332
|
+
for (const r of t)
|
|
333
|
+
if (r.nodeType === 1) {
|
|
334
|
+
if (r["s-sr"]) {
|
|
335
|
+
const s = r["s-sn"];
|
|
336
|
+
r.hidden = !1;
|
|
337
|
+
for (const c of t)
|
|
338
|
+
if (c !== r) {
|
|
339
|
+
if (c["s-hn"] !== r["s-hn"] || s !== "") {
|
|
340
|
+
if (c.nodeType === 1 && (s === c.getAttribute("slot") || s === c["s-sn"]) || c.nodeType === 3 && s === c["s-sn"]) {
|
|
341
|
+
r.hidden = !0;
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
} else if (c.nodeType === 1 || c.nodeType === 3 && c.textContent.trim() !== "") {
|
|
345
|
+
r.hidden = !0;
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
gt(r);
|
|
324
351
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
352
|
+
}, B = [], bt = (e) => {
|
|
353
|
+
let t, r, s;
|
|
354
|
+
for (const c of e.childNodes) {
|
|
355
|
+
if (c["s-sr"] && (t = c["s-cr"]) && t.parentNode) {
|
|
356
|
+
r = t.parentNode.childNodes;
|
|
357
|
+
const a = c["s-sn"];
|
|
358
|
+
for (s = r.length - 1; s >= 0; s--)
|
|
359
|
+
if (t = r[s], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== c["s-hn"] && !G.experimentalSlotFixes)
|
|
360
|
+
if (He(t, a)) {
|
|
361
|
+
let n = B.find((o) => o.$nodeToRelocate$ === t);
|
|
362
|
+
ie = !0, t["s-sn"] = t["s-sn"] || a, n ? (n.$nodeToRelocate$["s-sh"] = c["s-hn"], n.$slotRefNode$ = c) : (t["s-sh"] = c["s-hn"], B.push({
|
|
363
|
+
$slotRefNode$: c,
|
|
364
|
+
$nodeToRelocate$: t
|
|
365
|
+
})), t["s-sr"] && B.map((o) => {
|
|
366
|
+
He(o.$nodeToRelocate$, t["s-sn"]) && (n = B.find((u) => u.$nodeToRelocate$ === t), n && !o.$slotRefNode$ && (o.$slotRefNode$ = n.$slotRefNode$));
|
|
367
|
+
});
|
|
368
|
+
} else B.some((n) => n.$nodeToRelocate$ === t) || B.push({
|
|
369
|
+
$nodeToRelocate$: t
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
c.nodeType === 1 && bt(c);
|
|
373
|
+
}
|
|
374
|
+
}, He = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", N = (e, t, r) => e == null ? void 0 : e.insertBefore(t, r), kr = (e, t, r = !1) => {
|
|
375
|
+
var s, c, a, n;
|
|
376
|
+
const o = e.$hostElement$, u = e.$vnode$ || ae(null, null), i = br(t) ? t : d(null, null, t);
|
|
377
|
+
if (ve = o.tagName, r && i.$attrs$)
|
|
378
|
+
for (const l of Object.keys(i.$attrs$))
|
|
379
|
+
o.hasAttribute(l) && !["key", "ref", "style", "class"].includes(l) && (i.$attrs$[l] = o[l]);
|
|
380
|
+
i.$tag$ = null, i.$flags$ |= 4, e.$vnode$ = i, i.$elm$ = u.$elm$ = o, ce = nr, be = o["s-cr"], ie = !1, W(u, i, r);
|
|
343
381
|
{
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
/* @__PURE__ */ t(
|
|
352
|
-
"path",
|
|
353
|
-
{
|
|
354
|
-
d: "M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z",
|
|
355
|
-
stroke: "#E6E6E6",
|
|
356
|
-
strokeWidth: "1.5",
|
|
357
|
-
strokeLinecap: "round",
|
|
358
|
-
strokeLinejoin: "round"
|
|
382
|
+
if (S.$flags$ |= 1, Fe) {
|
|
383
|
+
bt(i.$elm$);
|
|
384
|
+
for (const l of B) {
|
|
385
|
+
const h = l.$nodeToRelocate$;
|
|
386
|
+
if (!h["s-ol"]) {
|
|
387
|
+
const f = j.createTextNode("");
|
|
388
|
+
f["s-nr"] = h, N(h.parentNode, h["s-ol"] = f, h);
|
|
359
389
|
}
|
|
360
|
-
|
|
361
|
-
|
|
390
|
+
}
|
|
391
|
+
for (const l of B) {
|
|
392
|
+
const h = l.$nodeToRelocate$, f = l.$slotRefNode$;
|
|
393
|
+
if (f) {
|
|
394
|
+
const g = f.parentNode;
|
|
395
|
+
let b = f.nextSibling;
|
|
396
|
+
{
|
|
397
|
+
let v = (s = h["s-ol"]) == null ? void 0 : s.previousSibling;
|
|
398
|
+
for (; v; ) {
|
|
399
|
+
let y = (c = v["s-nr"]) != null ? c : null;
|
|
400
|
+
if (y && y["s-sn"] === h["s-sn"] && g === y.parentNode) {
|
|
401
|
+
for (y = y.nextSibling; y === h || y != null && y["s-sr"]; )
|
|
402
|
+
y = y == null ? void 0 : y.nextSibling;
|
|
403
|
+
if (!y || !y["s-nr"]) {
|
|
404
|
+
b = y;
|
|
405
|
+
break;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
v = v.previousSibling;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
(!b && g !== h.parentNode || h.nextSibling !== b) && h !== b && (!h["s-hn"] && h["s-ol"] && (h["s-hn"] = h["s-ol"].parentNode.nodeName), N(g, h, b), h.nodeType === 1 && (h.hidden = (a = h["s-ih"]) != null ? a : !1)), h && typeof f["s-rf"] == "function" && f["s-rf"](h);
|
|
412
|
+
} else
|
|
413
|
+
h.nodeType === 1 && (r && (h["s-ih"] = (n = h.hidden) != null ? n : !1), h.hidden = !0);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
ie && gt(i.$elm$), S.$flags$ &= -2, B.length = 0;
|
|
362
417
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
)
|
|
375
|
-
|
|
376
|
-
|
|
418
|
+
be = void 0;
|
|
419
|
+
}, mt = (e, t) => {
|
|
420
|
+
t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((r) => e.$onRenderResolve$ = r));
|
|
421
|
+
}, Ee = (e, t) => {
|
|
422
|
+
if (e.$flags$ |= 16, e.$flags$ & 4) {
|
|
423
|
+
e.$flags$ |= 512;
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
return mt(e, e.$ancestorComponent$), ir(() => Rr(e, t));
|
|
427
|
+
}, Rr = (e, t) => {
|
|
428
|
+
const r = e.$hostElement$, s = V("scheduleUpdate", e.$cmpMeta$.$tagName$), c = r;
|
|
429
|
+
if (!c)
|
|
430
|
+
throw new Error(
|
|
431
|
+
`Can't render component <${r.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
|
|
432
|
+
);
|
|
433
|
+
let a;
|
|
434
|
+
return s(), zr(a, () => _r(e, c, t));
|
|
435
|
+
}, zr = (e, t) => Tr(e) ? e.then(t).catch((r) => {
|
|
436
|
+
console.error(r), t();
|
|
437
|
+
}) : t(), Tr = (e) => e instanceof Promise || e && e.then && typeof e.then == "function", _r = async (e, t, r) => {
|
|
438
|
+
var s;
|
|
439
|
+
const c = e.$hostElement$, a = V("update", e.$cmpMeta$.$tagName$), n = c["s-rc"];
|
|
440
|
+
r && $r(e);
|
|
441
|
+
const o = V("render", e.$cmpMeta$.$tagName$);
|
|
442
|
+
Ar(e, t, c, r), n && (n.map((u) => u()), c["s-rc"] = void 0), o(), a();
|
|
377
443
|
{
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
rightToLeftOrientation: e = !1
|
|
400
|
-
}) => {
|
|
401
|
-
const { theme: i } = b(), a = i === "light";
|
|
402
|
-
return n ? /* @__PURE__ */ t(
|
|
403
|
-
"div",
|
|
404
|
-
{
|
|
405
|
-
className: e ? w.inputIconRTL : w.inputIconLTR,
|
|
406
|
-
children: a ? /* @__PURE__ */ t(Zt, {}) : /* @__PURE__ */ t(Gt, {})
|
|
444
|
+
const u = (s = c["s-p"]) != null ? s : [], i = () => Pr(e);
|
|
445
|
+
u.length === 0 ? i() : (Promise.all(u).then(i), e.$flags$ |= 4, u.length = 0);
|
|
446
|
+
}
|
|
447
|
+
}, Ar = (e, t, r, s) => {
|
|
448
|
+
try {
|
|
449
|
+
t = t.render(), e.$flags$ &= -17, e.$flags$ |= 2, kr(e, t, s);
|
|
450
|
+
} catch (c) {
|
|
451
|
+
le(c, e.$hostElement$);
|
|
452
|
+
}
|
|
453
|
+
return null;
|
|
454
|
+
}, Pr = (e) => {
|
|
455
|
+
const t = e.$cmpMeta$.$tagName$, r = e.$hostElement$, s = V("postUpdate", t), c = r, a = e.$ancestorComponent$;
|
|
456
|
+
e.$flags$ & 64 ? s() : (e.$flags$ |= 64, yt(r), Mr(c, "componentDidLoad"), s(), e.$onReadyResolve$(r), a || Dr()), e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0), e.$flags$ & 512 && me(() => Ee(e, !1)), e.$flags$ &= -517;
|
|
457
|
+
}, Dr = (e) => {
|
|
458
|
+
yt(j.documentElement), me(() => ot(ue, "appload", { detail: { namespace: Zt } }));
|
|
459
|
+
}, Mr = (e, t, r) => {
|
|
460
|
+
if (e && e[t])
|
|
461
|
+
try {
|
|
462
|
+
return e[t](r);
|
|
463
|
+
} catch (s) {
|
|
464
|
+
le(s);
|
|
407
465
|
}
|
|
408
|
-
|
|
409
|
-
|
|
466
|
+
}, yt = (e) => {
|
|
467
|
+
var t;
|
|
468
|
+
return e.classList.add((t = G.hydratedSelectorName) != null ? t : "hydrated");
|
|
469
|
+
}, Br = (e, t) => Q(e).$instanceValues$.get(t), Lr = (e, t, r, s) => {
|
|
470
|
+
const c = Q(e), a = e, n = c.$instanceValues$.get(t), o = c.$flags$, u = a;
|
|
471
|
+
r = vr(r, s.$members$[t][0]);
|
|
472
|
+
const i = Number.isNaN(n) && Number.isNaN(r);
|
|
473
|
+
if (r !== n && !i) {
|
|
474
|
+
c.$instanceValues$.set(t, r);
|
|
410
475
|
{
|
|
411
|
-
|
|
412
|
-
|
|
476
|
+
if (s.$watchers$ && o & 128) {
|
|
477
|
+
const h = s.$watchers$[t];
|
|
478
|
+
h && h.map((f) => {
|
|
479
|
+
try {
|
|
480
|
+
u[f](r, n, t);
|
|
481
|
+
} catch (g) {
|
|
482
|
+
le(g, a);
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
(o & 18) === 2 && Ee(c, !1);
|
|
413
487
|
}
|
|
414
|
-
|
|
415
|
-
},
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
488
|
+
}
|
|
489
|
+
}, Ir = (e, t, r) => {
|
|
490
|
+
var s, c;
|
|
491
|
+
const a = e.prototype;
|
|
492
|
+
if (t.$members$ || t.$watchers$ || e.watchers) {
|
|
493
|
+
e.watchers && !t.$watchers$ && (t.$watchers$ = e.watchers);
|
|
494
|
+
const n = Object.entries((s = t.$members$) != null ? s : {});
|
|
495
|
+
n.map(([o, [u]]) => {
|
|
496
|
+
(u & 31 || u & 32) && Object.defineProperty(a, o, {
|
|
497
|
+
get() {
|
|
498
|
+
return Br(this, o);
|
|
499
|
+
},
|
|
500
|
+
set(i) {
|
|
501
|
+
Lr(this, o, i, t);
|
|
502
|
+
},
|
|
503
|
+
configurable: !0,
|
|
504
|
+
enumerable: !0
|
|
505
|
+
});
|
|
506
|
+
});
|
|
430
507
|
{
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
c && /* @__PURE__ */ t(
|
|
453
|
-
q,
|
|
454
|
-
{
|
|
455
|
-
inputCaptionClassName: i,
|
|
456
|
-
inputCaptionValue: c,
|
|
457
|
-
rightToLeftOrientation: o
|
|
458
|
-
}
|
|
459
|
-
),
|
|
460
|
-
p.length > 0 && /* @__PURE__ */ t(
|
|
461
|
-
$,
|
|
462
|
-
{
|
|
463
|
-
onClearInput: r,
|
|
464
|
-
rightToLeftOrientation: o
|
|
465
|
-
}
|
|
466
|
-
),
|
|
467
|
-
/* @__PURE__ */ t(
|
|
468
|
-
A,
|
|
469
|
-
{
|
|
470
|
-
error: n,
|
|
471
|
-
rightToLeftOrientation: o
|
|
472
|
-
}
|
|
473
|
-
)
|
|
474
|
-
] }) : /* @__PURE__ */ u(j, { children: [
|
|
475
|
-
/* @__PURE__ */ t(
|
|
476
|
-
"input",
|
|
477
|
-
{
|
|
478
|
-
className: L(
|
|
479
|
-
n ? h ? C.inputErrorLightLTR : C.inputErrorDarkLTR : h ? C.inputLightLTR : C.inputDarkLTR,
|
|
480
|
-
a,
|
|
481
|
-
"searchcraft-input"
|
|
482
|
-
),
|
|
483
|
-
id: "searchcraft-input-id",
|
|
484
|
-
onChange: s,
|
|
485
|
-
placeholder: l,
|
|
486
|
-
type: "text",
|
|
487
|
-
value: p
|
|
488
|
-
}
|
|
489
|
-
),
|
|
490
|
-
c && /* @__PURE__ */ t(
|
|
491
|
-
q,
|
|
492
|
-
{
|
|
493
|
-
inputCaptionClassName: i,
|
|
494
|
-
inputCaptionValue: c,
|
|
495
|
-
rightToLeftOrientation: o
|
|
496
|
-
}
|
|
497
|
-
),
|
|
498
|
-
p.length > 0 && /* @__PURE__ */ t(
|
|
499
|
-
$,
|
|
500
|
-
{
|
|
501
|
-
onClearInput: r,
|
|
502
|
-
rightToLeftOrientation: o
|
|
508
|
+
const o = /* @__PURE__ */ new Map();
|
|
509
|
+
a.attributeChangedCallback = function(u, i, l) {
|
|
510
|
+
S.jmp(() => {
|
|
511
|
+
var h;
|
|
512
|
+
const f = o.get(u);
|
|
513
|
+
if (this.hasOwnProperty(f))
|
|
514
|
+
l = this[f], delete this[f];
|
|
515
|
+
else {
|
|
516
|
+
if (a.hasOwnProperty(f) && typeof this[f] == "number" && // cast type to number to avoid TS compiler issues
|
|
517
|
+
this[f] == l)
|
|
518
|
+
return;
|
|
519
|
+
if (f == null) {
|
|
520
|
+
const g = Q(this), b = g == null ? void 0 : g.$flags$;
|
|
521
|
+
if (b && !(b & 8) && b & 128 && l !== i) {
|
|
522
|
+
const y = this, Pe = (h = t.$watchers$) == null ? void 0 : h[u];
|
|
523
|
+
Pe == null || Pe.forEach((De) => {
|
|
524
|
+
y[De] != null && y[De].call(y, l, i, u);
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
503
529
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
530
|
+
this[f] = l === null && typeof this[f] == "boolean" ? !1 : l;
|
|
531
|
+
});
|
|
532
|
+
}, e.observedAttributes = Array.from(
|
|
533
|
+
/* @__PURE__ */ new Set([
|
|
534
|
+
...Object.keys((c = t.$watchers$) != null ? c : {}),
|
|
535
|
+
...n.filter(
|
|
536
|
+
([u, i]) => i[0] & 15
|
|
537
|
+
/* HasAttribute */
|
|
538
|
+
).map(([u, i]) => {
|
|
539
|
+
const l = i[1] || u;
|
|
540
|
+
return o.set(l, u), l;
|
|
541
|
+
})
|
|
542
|
+
])
|
|
543
|
+
);
|
|
507
544
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
label: e = "Enter Search"
|
|
515
|
-
}) => {
|
|
516
|
-
const { theme: i } = b(), a = i === "light" ? H.labelLight : H.labelDark;
|
|
517
|
-
return /* @__PURE__ */ t(
|
|
518
|
-
"label",
|
|
545
|
+
}
|
|
546
|
+
return e;
|
|
547
|
+
}, Or = async (e, t, r, s) => {
|
|
548
|
+
let c;
|
|
549
|
+
if (!(t.$flags$ & 32)) {
|
|
550
|
+
t.$flags$ |= 32;
|
|
519
551
|
{
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
552
|
+
c = e.constructor;
|
|
553
|
+
const o = e.localName;
|
|
554
|
+
customElements.whenDefined(o).then(
|
|
555
|
+
() => t.$flags$ |= 128
|
|
556
|
+
/* isWatchReady */
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
if (c && c.style) {
|
|
560
|
+
let o;
|
|
561
|
+
typeof c.style == "string" && (o = c.style);
|
|
562
|
+
const u = lt(r);
|
|
563
|
+
if (!ne.has(u)) {
|
|
564
|
+
const i = V("registerStyles", r.$tagName$);
|
|
565
|
+
xr(u, o, !!(r.$flags$ & 1)), i();
|
|
566
|
+
}
|
|
523
567
|
}
|
|
568
|
+
}
|
|
569
|
+
const a = t.$ancestorComponent$, n = () => Ee(t, !0);
|
|
570
|
+
a && a["s-rc"] ? a["s-rc"].push(n) : n();
|
|
571
|
+
}, jr = (e) => {
|
|
572
|
+
}, Ur = (e) => {
|
|
573
|
+
if (!(S.$flags$ & 1)) {
|
|
574
|
+
const t = Q(e), r = t.$cmpMeta$, s = V("connectedCallback", r.$tagName$);
|
|
575
|
+
if (t.$flags$ & 1)
|
|
576
|
+
t != null && t.$lazyInstance$ || t != null && t.$onReadyPromise$ && t.$onReadyPromise$.then(() => jr());
|
|
577
|
+
else {
|
|
578
|
+
t.$flags$ |= 1, // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
579
|
+
r.$flags$ & 12 && Nr(e);
|
|
580
|
+
{
|
|
581
|
+
let c = e;
|
|
582
|
+
for (; c = c.parentNode || c.host; )
|
|
583
|
+
if (c["s-p"]) {
|
|
584
|
+
mt(t, t.$ancestorComponent$ = c);
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
r.$members$ && Object.entries(r.$members$).map(([c, [a]]) => {
|
|
589
|
+
if (a & 31 && e.hasOwnProperty(c)) {
|
|
590
|
+
const n = e[c];
|
|
591
|
+
delete e[c], e[c] = n;
|
|
592
|
+
}
|
|
593
|
+
}), Or(e, t, r);
|
|
594
|
+
}
|
|
595
|
+
s();
|
|
596
|
+
}
|
|
597
|
+
}, Nr = (e) => {
|
|
598
|
+
const t = e["s-cr"] = j.createComment(
|
|
599
|
+
""
|
|
524
600
|
);
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
placeholderValue: r = "Search here",
|
|
533
|
-
rightToLeftOrientation: s = !1,
|
|
534
|
-
searchContainerClass: l = ""
|
|
535
|
-
}) => {
|
|
536
|
-
const { query: o, setQuery: p } = S(), [m, h] = y(!1), d = s ? D.formRTL : D.formLTR, R = (k) => {
|
|
537
|
-
k.preventDefault(), p(k.currentTarget.value), o !== k.currentTarget.value && h(!0);
|
|
538
|
-
}, F = () => {
|
|
539
|
-
p(""), c();
|
|
601
|
+
t["s-cn"] = !0, N(e, t, e.firstChild);
|
|
602
|
+
}, qr = async (e) => {
|
|
603
|
+
S.$flags$ & 1 || Q(e);
|
|
604
|
+
}, P = (e, t) => {
|
|
605
|
+
const r = {
|
|
606
|
+
$flags$: t[0],
|
|
607
|
+
$tagName$: t[1]
|
|
540
608
|
};
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
{
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
609
|
+
r.$members$ = t[2], r.$watchers$ = e.$watchers$;
|
|
610
|
+
const s = e.prototype.connectedCallback, c = e.prototype.disconnectedCallback;
|
|
611
|
+
let a = !1;
|
|
612
|
+
return Object.assign(e.prototype, {
|
|
613
|
+
__registerHost() {
|
|
614
|
+
rr(this, r);
|
|
615
|
+
},
|
|
616
|
+
connectedCallback() {
|
|
617
|
+
a || (Q(this), a = !0), Ur(this), s && s.call(this);
|
|
618
|
+
},
|
|
619
|
+
disconnectedCallback() {
|
|
620
|
+
qr(this), c && c.call(this);
|
|
621
|
+
},
|
|
622
|
+
__attachShadow() {
|
|
623
|
+
this.shadowRoot = this;
|
|
624
|
+
}
|
|
625
|
+
}), e.is = r.$tagName$, Ir(e, r);
|
|
626
|
+
}, $e = (e, t) => t, Se = {}, we = {};
|
|
627
|
+
const Ve = (e) => {
|
|
628
|
+
let t;
|
|
629
|
+
const r = /* @__PURE__ */ new Set(), s = (i, l) => {
|
|
630
|
+
const h = typeof i == "function" ? i(t) : i;
|
|
631
|
+
if (!Object.is(h, t)) {
|
|
632
|
+
const f = t;
|
|
633
|
+
t = l ?? (typeof h != "object" || h === null) ? h : Object.assign({}, t, h), r.forEach((g) => g(t, f));
|
|
634
|
+
}
|
|
635
|
+
}, c = () => t, o = { setState: s, getState: c, getInitialState: () => u, subscribe: (i) => (r.add(i), () => r.delete(i)) }, u = t = e(s, c, o);
|
|
636
|
+
return o;
|
|
637
|
+
}, Hr = (e) => e ? Ve(e) : Ve;
|
|
638
|
+
we.createStore = Hr;
|
|
639
|
+
var Ce = {}, vt = { exports: {} }, m = {};
|
|
640
|
+
/**
|
|
641
|
+
* @license React
|
|
642
|
+
* react.production.min.js
|
|
643
|
+
*
|
|
644
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
645
|
+
*
|
|
646
|
+
* This source code is licensed under the MIT license found in the
|
|
647
|
+
* LICENSE file in the root directory of this source tree.
|
|
648
|
+
*/
|
|
649
|
+
var X = Symbol.for("react.element"), Vr = Symbol.for("react.portal"), Wr = Symbol.for("react.fragment"), Gr = Symbol.for("react.strict_mode"), Qr = Symbol.for("react.profiler"), Jr = Symbol.for("react.provider"), Kr = Symbol.for("react.context"), Yr = Symbol.for("react.forward_ref"), Xr = Symbol.for("react.suspense"), Zr = Symbol.for("react.memo"), es = Symbol.for("react.lazy"), We = Symbol.iterator;
|
|
650
|
+
function ts(e) {
|
|
651
|
+
return e === null || typeof e != "object" ? null : (e = We && e[We] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
652
|
+
}
|
|
653
|
+
var Ft = { isMounted: function() {
|
|
654
|
+
return !1;
|
|
655
|
+
}, enqueueForceUpdate: function() {
|
|
656
|
+
}, enqueueReplaceState: function() {
|
|
657
|
+
}, enqueueSetState: function() {
|
|
658
|
+
} }, xt = Object.assign, Et = {};
|
|
659
|
+
function J(e, t, r) {
|
|
660
|
+
this.props = e, this.context = t, this.refs = Et, this.updater = r || Ft;
|
|
661
|
+
}
|
|
662
|
+
J.prototype.isReactComponent = {};
|
|
663
|
+
J.prototype.setState = function(e, t) {
|
|
664
|
+
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
665
|
+
this.updater.enqueueSetState(this, e, t, "setState");
|
|
666
|
+
};
|
|
667
|
+
J.prototype.forceUpdate = function(e) {
|
|
668
|
+
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
669
|
+
};
|
|
670
|
+
function $t() {
|
|
671
|
+
}
|
|
672
|
+
$t.prototype = J.prototype;
|
|
673
|
+
function ke(e, t, r) {
|
|
674
|
+
this.props = e, this.context = t, this.refs = Et, this.updater = r || Ft;
|
|
675
|
+
}
|
|
676
|
+
var Re = ke.prototype = new $t();
|
|
677
|
+
Re.constructor = ke;
|
|
678
|
+
xt(Re, J.prototype);
|
|
679
|
+
Re.isPureReactComponent = !0;
|
|
680
|
+
var Ge = Array.isArray, St = Object.prototype.hasOwnProperty, ze = { current: null }, wt = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
681
|
+
function Ct(e, t, r) {
|
|
682
|
+
var s, c = {}, a = null, n = null;
|
|
683
|
+
if (t != null) for (s in t.ref !== void 0 && (n = t.ref), t.key !== void 0 && (a = "" + t.key), t) St.call(t, s) && !wt.hasOwnProperty(s) && (c[s] = t[s]);
|
|
684
|
+
var o = arguments.length - 2;
|
|
685
|
+
if (o === 1) c.children = r;
|
|
686
|
+
else if (1 < o) {
|
|
687
|
+
for (var u = Array(o), i = 0; i < o; i++) u[i] = arguments[i + 2];
|
|
688
|
+
c.children = u;
|
|
689
|
+
}
|
|
690
|
+
if (e && e.defaultProps) for (s in o = e.defaultProps, o) c[s] === void 0 && (c[s] = o[s]);
|
|
691
|
+
return { $$typeof: X, type: e, key: a, ref: n, props: c, _owner: ze.current };
|
|
692
|
+
}
|
|
693
|
+
function rs(e, t) {
|
|
694
|
+
return { $$typeof: X, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner };
|
|
695
|
+
}
|
|
696
|
+
function Te(e) {
|
|
697
|
+
return typeof e == "object" && e !== null && e.$$typeof === X;
|
|
698
|
+
}
|
|
699
|
+
function ss(e) {
|
|
700
|
+
var t = { "=": "=0", ":": "=2" };
|
|
701
|
+
return "$" + e.replace(/[=:]/g, function(r) {
|
|
702
|
+
return t[r];
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
var Qe = /\/+/g;
|
|
706
|
+
function de(e, t) {
|
|
707
|
+
return typeof e == "object" && e !== null && e.key != null ? ss("" + e.key) : t.toString(36);
|
|
708
|
+
}
|
|
709
|
+
function re(e, t, r, s, c) {
|
|
710
|
+
var a = typeof e;
|
|
711
|
+
(a === "undefined" || a === "boolean") && (e = null);
|
|
712
|
+
var n = !1;
|
|
713
|
+
if (e === null) n = !0;
|
|
714
|
+
else switch (a) {
|
|
715
|
+
case "string":
|
|
716
|
+
case "number":
|
|
717
|
+
n = !0;
|
|
718
|
+
break;
|
|
719
|
+
case "object":
|
|
720
|
+
switch (e.$$typeof) {
|
|
721
|
+
case X:
|
|
722
|
+
case Vr:
|
|
723
|
+
n = !0;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
if (n) return n = e, c = c(n), e = s === "" ? "." + de(n, 0) : s, Ge(c) ? (r = "", e != null && (r = e.replace(Qe, "$&/") + "/"), re(c, t, r, "", function(i) {
|
|
727
|
+
return i;
|
|
728
|
+
})) : c != null && (Te(c) && (c = rs(c, r + (!c.key || n && n.key === c.key ? "" : ("" + c.key).replace(Qe, "$&/") + "/") + e)), t.push(c)), 1;
|
|
729
|
+
if (n = 0, s = s === "" ? "." : s + ":", Ge(e)) for (var o = 0; o < e.length; o++) {
|
|
730
|
+
a = e[o];
|
|
731
|
+
var u = s + de(a, o);
|
|
732
|
+
n += re(a, t, r, u, c);
|
|
733
|
+
}
|
|
734
|
+
else if (u = ts(e), typeof u == "function") for (e = u.call(e), o = 0; !(a = e.next()).done; ) a = a.value, u = s + de(a, o++), n += re(a, t, r, u, c);
|
|
735
|
+
else if (a === "object") throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
|
|
736
|
+
return n;
|
|
737
|
+
}
|
|
738
|
+
function ee(e, t, r) {
|
|
739
|
+
if (e == null) return e;
|
|
740
|
+
var s = [], c = 0;
|
|
741
|
+
return re(e, s, "", "", function(a) {
|
|
742
|
+
return t.call(r, a, c++);
|
|
743
|
+
}), s;
|
|
744
|
+
}
|
|
745
|
+
function ns(e) {
|
|
746
|
+
if (e._status === -1) {
|
|
747
|
+
var t = e._result;
|
|
748
|
+
t = t(), t.then(function(r) {
|
|
749
|
+
(e._status === 0 || e._status === -1) && (e._status = 1, e._result = r);
|
|
750
|
+
}, function(r) {
|
|
751
|
+
(e._status === 0 || e._status === -1) && (e._status = 2, e._result = r);
|
|
752
|
+
}), e._status === -1 && (e._status = 0, e._result = t);
|
|
753
|
+
}
|
|
754
|
+
if (e._status === 1) return e._result.default;
|
|
755
|
+
throw e._result;
|
|
756
|
+
}
|
|
757
|
+
var $ = { current: null }, se = { transition: null }, as = { ReactCurrentDispatcher: $, ReactCurrentBatchConfig: se, ReactCurrentOwner: ze };
|
|
758
|
+
function kt() {
|
|
759
|
+
throw Error("act(...) is not supported in production builds of React.");
|
|
760
|
+
}
|
|
761
|
+
m.Children = { map: ee, forEach: function(e, t, r) {
|
|
762
|
+
ee(e, function() {
|
|
763
|
+
t.apply(this, arguments);
|
|
764
|
+
}, r);
|
|
765
|
+
}, count: function(e) {
|
|
766
|
+
var t = 0;
|
|
767
|
+
return ee(e, function() {
|
|
768
|
+
t++;
|
|
769
|
+
}), t;
|
|
770
|
+
}, toArray: function(e) {
|
|
771
|
+
return ee(e, function(t) {
|
|
772
|
+
return t;
|
|
773
|
+
}) || [];
|
|
774
|
+
}, only: function(e) {
|
|
775
|
+
if (!Te(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
776
|
+
return e;
|
|
777
|
+
} };
|
|
778
|
+
m.Component = J;
|
|
779
|
+
m.Fragment = Wr;
|
|
780
|
+
m.Profiler = Qr;
|
|
781
|
+
m.PureComponent = ke;
|
|
782
|
+
m.StrictMode = Gr;
|
|
783
|
+
m.Suspense = Xr;
|
|
784
|
+
m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = as;
|
|
785
|
+
m.act = kt;
|
|
786
|
+
m.cloneElement = function(e, t, r) {
|
|
787
|
+
if (e == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
788
|
+
var s = xt({}, e.props), c = e.key, a = e.ref, n = e._owner;
|
|
789
|
+
if (t != null) {
|
|
790
|
+
if (t.ref !== void 0 && (a = t.ref, n = ze.current), t.key !== void 0 && (c = "" + t.key), e.type && e.type.defaultProps) var o = e.type.defaultProps;
|
|
791
|
+
for (u in t) St.call(t, u) && !wt.hasOwnProperty(u) && (s[u] = t[u] === void 0 && o !== void 0 ? o[u] : t[u]);
|
|
792
|
+
}
|
|
793
|
+
var u = arguments.length - 2;
|
|
794
|
+
if (u === 1) s.children = r;
|
|
795
|
+
else if (1 < u) {
|
|
796
|
+
o = Array(u);
|
|
797
|
+
for (var i = 0; i < u; i++) o[i] = arguments[i + 2];
|
|
798
|
+
s.children = o;
|
|
799
|
+
}
|
|
800
|
+
return { $$typeof: X, type: e.type, key: c, ref: a, props: s, _owner: n };
|
|
801
|
+
};
|
|
802
|
+
m.createContext = function(e) {
|
|
803
|
+
return e = { $$typeof: Kr, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: Jr, _context: e }, e.Consumer = e;
|
|
804
|
+
};
|
|
805
|
+
m.createElement = Ct;
|
|
806
|
+
m.createFactory = function(e) {
|
|
807
|
+
var t = Ct.bind(null, e);
|
|
808
|
+
return t.type = e, t;
|
|
809
|
+
};
|
|
810
|
+
m.createRef = function() {
|
|
811
|
+
return { current: null };
|
|
812
|
+
};
|
|
813
|
+
m.forwardRef = function(e) {
|
|
814
|
+
return { $$typeof: Yr, render: e };
|
|
815
|
+
};
|
|
816
|
+
m.isValidElement = Te;
|
|
817
|
+
m.lazy = function(e) {
|
|
818
|
+
return { $$typeof: es, _payload: { _status: -1, _result: e }, _init: ns };
|
|
819
|
+
};
|
|
820
|
+
m.memo = function(e, t) {
|
|
821
|
+
return { $$typeof: Zr, type: e, compare: t === void 0 ? null : t };
|
|
822
|
+
};
|
|
823
|
+
m.startTransition = function(e) {
|
|
824
|
+
var t = se.transition;
|
|
825
|
+
se.transition = {};
|
|
826
|
+
try {
|
|
827
|
+
e();
|
|
828
|
+
} finally {
|
|
829
|
+
se.transition = t;
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
m.unstable_act = kt;
|
|
833
|
+
m.useCallback = function(e, t) {
|
|
834
|
+
return $.current.useCallback(e, t);
|
|
835
|
+
};
|
|
836
|
+
m.useContext = function(e) {
|
|
837
|
+
return $.current.useContext(e);
|
|
838
|
+
};
|
|
839
|
+
m.useDebugValue = function() {
|
|
840
|
+
};
|
|
841
|
+
m.useDeferredValue = function(e) {
|
|
842
|
+
return $.current.useDeferredValue(e);
|
|
843
|
+
};
|
|
844
|
+
m.useEffect = function(e, t) {
|
|
845
|
+
return $.current.useEffect(e, t);
|
|
846
|
+
};
|
|
847
|
+
m.useId = function() {
|
|
848
|
+
return $.current.useId();
|
|
849
|
+
};
|
|
850
|
+
m.useImperativeHandle = function(e, t, r) {
|
|
851
|
+
return $.current.useImperativeHandle(e, t, r);
|
|
852
|
+
};
|
|
853
|
+
m.useInsertionEffect = function(e, t) {
|
|
854
|
+
return $.current.useInsertionEffect(e, t);
|
|
855
|
+
};
|
|
856
|
+
m.useLayoutEffect = function(e, t) {
|
|
857
|
+
return $.current.useLayoutEffect(e, t);
|
|
858
|
+
};
|
|
859
|
+
m.useMemo = function(e, t) {
|
|
860
|
+
return $.current.useMemo(e, t);
|
|
861
|
+
};
|
|
862
|
+
m.useReducer = function(e, t, r) {
|
|
863
|
+
return $.current.useReducer(e, t, r);
|
|
864
|
+
};
|
|
865
|
+
m.useRef = function(e) {
|
|
866
|
+
return $.current.useRef(e);
|
|
867
|
+
};
|
|
868
|
+
m.useState = function(e) {
|
|
869
|
+
return $.current.useState(e);
|
|
870
|
+
};
|
|
871
|
+
m.useSyncExternalStore = function(e, t, r) {
|
|
872
|
+
return $.current.useSyncExternalStore(e, t, r);
|
|
873
|
+
};
|
|
874
|
+
m.useTransition = function() {
|
|
875
|
+
return $.current.useTransition();
|
|
876
|
+
};
|
|
877
|
+
m.version = "18.3.1";
|
|
878
|
+
vt.exports = m;
|
|
879
|
+
var Je = vt.exports, cs = we;
|
|
880
|
+
const is = (e) => e;
|
|
881
|
+
function Rt(e, t = is) {
|
|
882
|
+
const r = Je.useSyncExternalStore(
|
|
883
|
+
e.subscribe,
|
|
884
|
+
() => t(e.getState()),
|
|
885
|
+
() => t(e.getInitialState())
|
|
886
|
+
);
|
|
887
|
+
return Je.useDebugValue(r), r;
|
|
888
|
+
}
|
|
889
|
+
const Ke = (e) => {
|
|
890
|
+
const t = cs.createStore(e), r = (s) => Rt(t, s);
|
|
891
|
+
return Object.assign(r, t), r;
|
|
892
|
+
}, os = (e) => e ? Ke(e) : Ke;
|
|
893
|
+
Ce.create = os;
|
|
894
|
+
Ce.useStore = Rt;
|
|
895
|
+
(function(e) {
|
|
896
|
+
var t = we, r = Ce;
|
|
897
|
+
Object.keys(t).forEach(function(s) {
|
|
898
|
+
s !== "default" && !Object.prototype.hasOwnProperty.call(e, s) && Object.defineProperty(e, s, {
|
|
899
|
+
enumerable: !0,
|
|
900
|
+
get: function() {
|
|
901
|
+
return t[s];
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}), Object.keys(r).forEach(function(s) {
|
|
905
|
+
s !== "default" && !Object.prototype.hasOwnProperty.call(e, s) && Object.defineProperty(e, s, {
|
|
906
|
+
enumerable: !0,
|
|
907
|
+
get: function() {
|
|
908
|
+
return r[s];
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
});
|
|
912
|
+
})(Se);
|
|
913
|
+
var ls = Object.defineProperty, us = (e, t, r) => t in e ? ls(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, U = (e, t, r) => us(e, typeof t != "symbol" ? t + "" : t, r);
|
|
914
|
+
const ds = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
915
|
+
let hs = (e = 21) => {
|
|
916
|
+
let t = "", r = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
917
|
+
for (; e--; )
|
|
918
|
+
t += ds[r[e] & 63];
|
|
919
|
+
return t;
|
|
920
|
+
};
|
|
921
|
+
function L(e, t, r, s) {
|
|
922
|
+
return new (r || (r = Promise))(function(c, a) {
|
|
923
|
+
function n(i) {
|
|
924
|
+
try {
|
|
925
|
+
u(s.next(i));
|
|
926
|
+
} catch (l) {
|
|
927
|
+
a(l);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function o(i) {
|
|
931
|
+
try {
|
|
932
|
+
u(s.throw(i));
|
|
933
|
+
} catch (l) {
|
|
934
|
+
a(l);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
function u(i) {
|
|
938
|
+
var l;
|
|
939
|
+
i.done ? c(i.value) : (l = i.value, l instanceof r ? l : new r(function(h) {
|
|
940
|
+
h(l);
|
|
941
|
+
})).then(n, o);
|
|
942
|
+
}
|
|
943
|
+
u((s = s.apply(e, [])).next());
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
function I(e, t) {
|
|
947
|
+
var r, s, c, a, n = { label: 0, sent: function() {
|
|
948
|
+
if (1 & c[0]) throw c[1];
|
|
949
|
+
return c[1];
|
|
950
|
+
}, trys: [], ops: [] };
|
|
951
|
+
return a = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
952
|
+
return this;
|
|
953
|
+
}), a;
|
|
954
|
+
function o(u) {
|
|
955
|
+
return function(i) {
|
|
956
|
+
return function(l) {
|
|
957
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
958
|
+
for (; a && (a = 0, l[0] && (n = 0)), n; ) try {
|
|
959
|
+
if (r = 1, s && (c = 2 & l[0] ? s.return : l[0] ? s.throw || ((c = s.return) && c.call(s), 0) : s.next) && !(c = c.call(s, l[1])).done) return c;
|
|
960
|
+
switch (s = 0, c && (l = [2 & l[0], c.value]), l[0]) {
|
|
961
|
+
case 0:
|
|
962
|
+
case 1:
|
|
963
|
+
c = l;
|
|
964
|
+
break;
|
|
965
|
+
case 4:
|
|
966
|
+
return n.label++, { value: l[1], done: !1 };
|
|
967
|
+
case 5:
|
|
968
|
+
n.label++, s = l[1], l = [0];
|
|
969
|
+
continue;
|
|
970
|
+
case 7:
|
|
971
|
+
l = n.ops.pop(), n.trys.pop();
|
|
972
|
+
continue;
|
|
973
|
+
default:
|
|
974
|
+
if (c = n.trys, !((c = c.length > 0 && c[c.length - 1]) || l[0] !== 6 && l[0] !== 2)) {
|
|
975
|
+
n = 0;
|
|
976
|
+
continue;
|
|
977
|
+
}
|
|
978
|
+
if (l[0] === 3 && (!c || l[1] > c[0] && l[1] < c[3])) {
|
|
979
|
+
n.label = l[1];
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
if (l[0] === 6 && n.label < c[1]) {
|
|
983
|
+
n.label = c[1], c = l;
|
|
984
|
+
break;
|
|
576
985
|
}
|
|
577
|
-
|
|
986
|
+
if (c && n.label < c[2]) {
|
|
987
|
+
n.label = c[2], n.ops.push(l);
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
c[2] && n.ops.pop(), n.trys.pop();
|
|
991
|
+
continue;
|
|
578
992
|
}
|
|
579
|
-
|
|
580
|
-
|
|
993
|
+
l = t.call(e, n);
|
|
994
|
+
} catch (h) {
|
|
995
|
+
l = [6, h], s = 0;
|
|
996
|
+
} finally {
|
|
997
|
+
r = c = 0;
|
|
998
|
+
}
|
|
999
|
+
if (5 & l[0]) throw l[1];
|
|
1000
|
+
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
1001
|
+
}([u, i]);
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
var O = { exclude: [] }, zt = {}, fs = { timeout: "true" }, R = function(e, t) {
|
|
1006
|
+
typeof window < "u" && (zt[e] = t);
|
|
1007
|
+
}, ps = function() {
|
|
1008
|
+
return Object.fromEntries(Object.entries(zt).filter(function(e) {
|
|
1009
|
+
var t, r = e[0];
|
|
1010
|
+
return !(!((t = O == null ? void 0 : O.exclude) === null || t === void 0) && t.includes(r));
|
|
1011
|
+
}).map(function(e) {
|
|
1012
|
+
return [e[0], (0, e[1])()];
|
|
1013
|
+
}));
|
|
1014
|
+
};
|
|
1015
|
+
function te(e) {
|
|
1016
|
+
return e ^= e >>> 16, e = Math.imul(e, 2246822507), e ^= e >>> 13, e = Math.imul(e, 3266489909), (e ^= e >>> 16) >>> 0;
|
|
1017
|
+
}
|
|
1018
|
+
var F = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
|
|
1019
|
+
function k(e, t) {
|
|
1020
|
+
return e << t | e >>> 32 - t;
|
|
1021
|
+
}
|
|
1022
|
+
function _e(e, t) {
|
|
1023
|
+
var r;
|
|
1024
|
+
if (t === void 0 && (t = 0), t = t ? 0 | t : 0, typeof e == "string" && (r = e, e = new TextEncoder().encode(r).buffer), !(e instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
|
|
1025
|
+
var s = new Uint32Array([t, t, t, t]);
|
|
1026
|
+
(function(a, n) {
|
|
1027
|
+
for (var o = a.byteLength / 16 | 0, u = new Uint32Array(a, 0, 4 * o), i = 0; i < o; i++) {
|
|
1028
|
+
var l = u.subarray(4 * i, 4 * (i + 1));
|
|
1029
|
+
l[0] = Math.imul(l[0], F[0]), l[0] = k(l[0], 15), l[0] = Math.imul(l[0], F[1]), n[0] = n[0] ^ l[0], n[0] = k(n[0], 19), n[0] = n[0] + n[1], n[0] = Math.imul(n[0], 5) + 1444728091, l[1] = Math.imul(l[1], F[1]), l[1] = k(l[1], 16), l[1] = Math.imul(l[1], F[2]), n[1] = n[1] ^ l[1], n[1] = k(n[1], 17), n[1] = n[1] + n[2], n[1] = Math.imul(n[1], 5) + 197830471, l[2] = Math.imul(l[2], F[2]), l[2] = k(l[2], 17), l[2] = Math.imul(l[2], F[3]), n[2] = n[2] ^ l[2], n[2] = k(n[2], 15), n[2] = n[2] + n[3], n[2] = Math.imul(n[2], 5) + 2530024501, l[3] = Math.imul(l[3], F[3]), l[3] = k(l[3], 18), l[3] = Math.imul(l[3], F[0]), n[3] = n[3] ^ l[3], n[3] = k(n[3], 13), n[3] = n[3] + n[0], n[3] = Math.imul(n[3], 5) + 850148119;
|
|
581
1030
|
}
|
|
582
|
-
)
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1031
|
+
})(e, s), function(a, n) {
|
|
1032
|
+
var o = a.byteLength / 16 | 0, u = a.byteLength % 16, i = new Uint32Array(4), l = new Uint8Array(a, 16 * o, u);
|
|
1033
|
+
switch (u) {
|
|
1034
|
+
case 15:
|
|
1035
|
+
i[3] = i[3] ^ l[14] << 16;
|
|
1036
|
+
case 14:
|
|
1037
|
+
i[3] = i[3] ^ l[13] << 8;
|
|
1038
|
+
case 13:
|
|
1039
|
+
i[3] = i[3] ^ l[12] << 0, i[3] = Math.imul(i[3], F[3]), i[3] = k(i[3], 18), i[3] = Math.imul(i[3], F[0]), n[3] = n[3] ^ i[3];
|
|
1040
|
+
case 12:
|
|
1041
|
+
i[2] = i[2] ^ l[11] << 24;
|
|
1042
|
+
case 11:
|
|
1043
|
+
i[2] = i[2] ^ l[10] << 16;
|
|
1044
|
+
case 10:
|
|
1045
|
+
i[2] = i[2] ^ l[9] << 8;
|
|
1046
|
+
case 9:
|
|
1047
|
+
i[2] = i[2] ^ l[8] << 0, i[2] = Math.imul(i[2], F[2]), i[2] = k(i[2], 17), i[2] = Math.imul(i[2], F[3]), n[2] = n[2] ^ i[2];
|
|
1048
|
+
case 8:
|
|
1049
|
+
i[1] = i[1] ^ l[7] << 24;
|
|
1050
|
+
case 7:
|
|
1051
|
+
i[1] = i[1] ^ l[6] << 16;
|
|
1052
|
+
case 6:
|
|
1053
|
+
i[1] = i[1] ^ l[5] << 8;
|
|
1054
|
+
case 5:
|
|
1055
|
+
i[1] = i[1] ^ l[4] << 0, i[1] = Math.imul(i[1], F[1]), i[1] = k(i[1], 16), i[1] = Math.imul(i[1], F[2]), n[1] = n[1] ^ i[1];
|
|
1056
|
+
case 4:
|
|
1057
|
+
i[0] = i[0] ^ l[3] << 24;
|
|
1058
|
+
case 3:
|
|
1059
|
+
i[0] = i[0] ^ l[2] << 16;
|
|
1060
|
+
case 2:
|
|
1061
|
+
i[0] = i[0] ^ l[1] << 8;
|
|
1062
|
+
case 1:
|
|
1063
|
+
i[0] = i[0] ^ l[0] << 0, i[0] = Math.imul(i[0], F[0]), i[0] = k(i[0], 15), i[0] = Math.imul(i[0], F[1]), n[0] = n[0] ^ i[0];
|
|
1064
|
+
}
|
|
1065
|
+
}(e, s), function(a, n) {
|
|
1066
|
+
n[0] = n[0] ^ a.byteLength, n[1] = n[1] ^ a.byteLength, n[2] = n[2] ^ a.byteLength, n[3] = n[3] ^ a.byteLength, n[0] = n[0] + n[1] | 0, n[0] = n[0] + n[2] | 0, n[0] = n[0] + n[3] | 0, n[1] = n[1] + n[0] | 0, n[2] = n[2] + n[0] | 0, n[3] = n[3] + n[0] | 0, n[0] = te(n[0]), n[1] = te(n[1]), n[2] = te(n[2]), n[3] = te(n[3]), n[0] = n[0] + n[1] | 0, n[0] = n[0] + n[2] | 0, n[0] = n[0] + n[3] | 0, n[1] = n[1] + n[0] | 0, n[2] = n[2] + n[0] | 0, n[3] = n[3] + n[0] | 0;
|
|
1067
|
+
}(e, s);
|
|
1068
|
+
var c = new Uint8Array(s.buffer);
|
|
1069
|
+
return Array.from(c).map(function(a) {
|
|
1070
|
+
return a.toString(16).padStart(2, "0");
|
|
1071
|
+
}).join("");
|
|
1072
|
+
}
|
|
1073
|
+
function gs(e, t) {
|
|
1074
|
+
return new Promise(function(r) {
|
|
1075
|
+
setTimeout(function() {
|
|
1076
|
+
return r(t);
|
|
1077
|
+
}, e);
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
function bs(e, t, r) {
|
|
1081
|
+
return Promise.all(e.map(function(s) {
|
|
1082
|
+
return Promise.race([s, gs(t, r)]);
|
|
1083
|
+
}));
|
|
1084
|
+
}
|
|
1085
|
+
function ms() {
|
|
1086
|
+
return L(this, void 0, void 0, function() {
|
|
1087
|
+
var e, t, r, s, c;
|
|
1088
|
+
return I(this, function(a) {
|
|
1089
|
+
switch (a.label) {
|
|
1090
|
+
case 0:
|
|
1091
|
+
return a.trys.push([0, 2, , 3]), e = ps(), t = Object.keys(e), [4, bs(Object.values(e), (O == null ? void 0 : O.timeout) || 1e3, fs)];
|
|
1092
|
+
case 1:
|
|
1093
|
+
return r = a.sent(), s = r.filter(function(n) {
|
|
1094
|
+
return n !== void 0;
|
|
1095
|
+
}), c = {}, s.forEach(function(n, o) {
|
|
1096
|
+
c[t[o]] = n;
|
|
1097
|
+
}), [2, Tt(c, O.exclude || [])];
|
|
1098
|
+
case 2:
|
|
1099
|
+
throw a.sent();
|
|
1100
|
+
case 3:
|
|
1101
|
+
return [2];
|
|
607
1102
|
}
|
|
608
|
-
)
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
s && E.buttonLabel,
|
|
622
|
-
n,
|
|
623
|
-
".searchcraft-button-label"
|
|
624
|
-
),
|
|
625
|
-
children: c
|
|
626
|
-
}
|
|
627
|
-
)
|
|
628
|
-
]
|
|
1103
|
+
});
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
function Tt(e, t) {
|
|
1107
|
+
var r = {}, s = function(a) {
|
|
1108
|
+
if (e.hasOwnProperty(a)) {
|
|
1109
|
+
var n = e[a];
|
|
1110
|
+
if (typeof n != "object" || Array.isArray(n)) t.includes(a) || (r[a] = n);
|
|
1111
|
+
else {
|
|
1112
|
+
var o = Tt(n, t.map(function(u) {
|
|
1113
|
+
return u.startsWith(a + ".") ? u.slice(a.length + 1) : u;
|
|
1114
|
+
}));
|
|
1115
|
+
Object.keys(o).length > 0 && (r[a] = o);
|
|
629
1116
|
}
|
|
630
|
-
|
|
631
|
-
] });
|
|
632
|
-
}, nn = "_errorMessageLight_1endn_5", en = "_errorMessageDark_1endn_14", X = {
|
|
633
|
-
errorMessageLight: nn,
|
|
634
|
-
errorMessageDark: en
|
|
635
|
-
}, O = ({ className: n, errorMessage: e }) => {
|
|
636
|
-
const { theme: i } = b(), a = i === "light" ? X.errorMessageLight : X.errorMessageDark;
|
|
637
|
-
return /* @__PURE__ */ t("p", { className: L(a, n), children: e || "Search term is required." });
|
|
638
|
-
}, rn = ({
|
|
639
|
-
errorMessage: n,
|
|
640
|
-
handleSubmit: e,
|
|
641
|
-
labelForInput: i = "Search",
|
|
642
|
-
onClearInput: a = () => {
|
|
643
|
-
},
|
|
644
|
-
placeholderValue: c = "Enter Search Term",
|
|
645
|
-
rightToLeftOrientation: r = !1
|
|
646
|
-
}) => {
|
|
647
|
-
const { query: s, setQuery: l } = S(), [o, p] = y(!1), m = (R) => {
|
|
648
|
-
R.preventDefault(), s.trim() === "" ? p(!0) : (p(!1), e(s));
|
|
649
|
-
}, h = (R) => l(R.target.value), d = () => {
|
|
650
|
-
l(""), a();
|
|
1117
|
+
}
|
|
651
1118
|
};
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
1119
|
+
for (var c in e) s(c);
|
|
1120
|
+
return r;
|
|
1121
|
+
}
|
|
1122
|
+
function ys(e) {
|
|
1123
|
+
return L(this, void 0, void 0, function() {
|
|
1124
|
+
var t, r;
|
|
1125
|
+
return I(this, function(s) {
|
|
1126
|
+
switch (s.label) {
|
|
1127
|
+
case 0:
|
|
1128
|
+
return s.trys.push([0, 2, , 3]), [4, ms()];
|
|
1129
|
+
case 1:
|
|
1130
|
+
return t = s.sent(), r = _e(JSON.stringify(t)), [2, r.toString()];
|
|
1131
|
+
case 2:
|
|
1132
|
+
throw s.sent();
|
|
1133
|
+
case 3:
|
|
1134
|
+
return [2];
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
function vs(e) {
|
|
1140
|
+
for (var t = 0, r = 0; r < e.length; ++r) t += Math.abs(e[r]);
|
|
1141
|
+
return t;
|
|
1142
|
+
}
|
|
1143
|
+
function _t(e, t, r) {
|
|
1144
|
+
for (var s = [], c = 0; c < e[0].data.length; c++) {
|
|
1145
|
+
for (var a = [], n = 0; n < e.length; n++) a.push(e[n].data[c]);
|
|
1146
|
+
s.push(Fs(a));
|
|
1147
|
+
}
|
|
1148
|
+
var o = new Uint8ClampedArray(s);
|
|
1149
|
+
return new ImageData(o, t, r);
|
|
1150
|
+
}
|
|
1151
|
+
function Fs(e) {
|
|
1152
|
+
if (e.length === 0) return 0;
|
|
1153
|
+
for (var t = {}, r = 0, s = e; r < s.length; r++)
|
|
1154
|
+
t[a = s[r]] = (t[a] || 0) + 1;
|
|
1155
|
+
var c = e[0];
|
|
1156
|
+
for (var a in t) t[a] > t[c] && (c = parseInt(a, 10));
|
|
1157
|
+
return c;
|
|
1158
|
+
}
|
|
1159
|
+
function Y() {
|
|
1160
|
+
if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
|
|
1161
|
+
for (var e = navigator.userAgent, t = { Edg: "Edge", OPR: "Opera" }, r = 0, s = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; r < s.length; r++) {
|
|
1162
|
+
var c = s[r], a = e.match(c);
|
|
1163
|
+
if (a && a.groups) return { name: t[a.groups.name] || a.groups.name, version: a.groups.version };
|
|
1164
|
+
}
|
|
1165
|
+
return { name: "unknown", version: "unknown" };
|
|
1166
|
+
}
|
|
1167
|
+
R("audio", function() {
|
|
1168
|
+
return L(this, void 0, void 0, function() {
|
|
1169
|
+
return I(this, function(e) {
|
|
1170
|
+
return [2, new Promise(function(t, r) {
|
|
1171
|
+
try {
|
|
1172
|
+
var s = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), c = s.createBufferSource(), a = s.createOscillator();
|
|
1173
|
+
a.frequency.value = 1e3;
|
|
1174
|
+
var n, o = s.createDynamicsCompressor();
|
|
1175
|
+
o.threshold.value = -50, o.knee.value = 40, o.ratio.value = 12, o.attack.value = 0, o.release.value = 0.2, a.connect(o), o.connect(s.destination), a.start(), s.oncomplete = function(u) {
|
|
1176
|
+
n = u.renderedBuffer.getChannelData(0), t({ sampleHash: vs(n), oscillator: a.type, maxChannels: s.destination.maxChannelCount, channelCountMode: c.channelCountMode });
|
|
1177
|
+
}, s.startRendering();
|
|
1178
|
+
} catch (u) {
|
|
1179
|
+
console.error("Error creating audio fingerprint:", u), r(u);
|
|
1180
|
+
}
|
|
1181
|
+
})];
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
});
|
|
1185
|
+
var xs = Y().name !== "SamsungBrowser" ? 1 : 3, Ye = 280, Xe = 20;
|
|
1186
|
+
Y().name != "Firefox" && R("canvas", function() {
|
|
1187
|
+
return document.createElement("canvas").getContext("2d"), new Promise(function(e) {
|
|
1188
|
+
var t = Array.from({ length: xs }, function() {
|
|
1189
|
+
return function() {
|
|
1190
|
+
var r = document.createElement("canvas"), s = r.getContext("2d");
|
|
1191
|
+
if (!s) return new ImageData(1, 1);
|
|
1192
|
+
r.width = Ye, r.height = Xe;
|
|
1193
|
+
var c = s.createLinearGradient(0, 0, r.width, r.height);
|
|
1194
|
+
c.addColorStop(0, "red"), c.addColorStop(0.16666666666666666, "orange"), c.addColorStop(0.3333333333333333, "yellow"), c.addColorStop(0.5, "green"), c.addColorStop(0.6666666666666666, "blue"), c.addColorStop(0.8333333333333334, "indigo"), c.addColorStop(1, "violet"), s.fillStyle = c, s.fillRect(0, 0, r.width, r.height);
|
|
1195
|
+
var a = "Random Text WMwmil10Oo";
|
|
1196
|
+
s.font = "23.123px Arial", s.fillStyle = "black", s.fillText(a, -5, 15), s.fillStyle = "rgba(0, 0, 255, 0.5)", s.fillText(a, -3.3, 17.7), s.beginPath(), s.moveTo(0, 0), s.lineTo(2 * r.width / 7, r.height), s.strokeStyle = "white", s.lineWidth = 2, s.stroke();
|
|
1197
|
+
var n = s.getImageData(0, 0, r.width, r.height);
|
|
1198
|
+
return n;
|
|
1199
|
+
}();
|
|
1200
|
+
});
|
|
1201
|
+
e({ commonImageDataHash: _e(_t(t, Ye, Xe).data.toString()).toString() });
|
|
1202
|
+
});
|
|
1203
|
+
});
|
|
1204
|
+
var he, Es = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], $s = ["monospace", "sans-serif", "serif"];
|
|
1205
|
+
function Ze(e, t) {
|
|
1206
|
+
if (!e) throw new Error("Canvas context not supported");
|
|
1207
|
+
return e.font = "72px ".concat(t), e.measureText("WwMmLli0Oo").width;
|
|
1208
|
+
}
|
|
1209
|
+
function Ss() {
|
|
1210
|
+
var e, t = document.createElement("canvas"), r = (e = t.getContext("webgl")) !== null && e !== void 0 ? e : t.getContext("experimental-webgl");
|
|
1211
|
+
if (r && "getParameter" in r) try {
|
|
1212
|
+
var s = (r.getParameter(r.VENDOR) || "").toString(), c = (r.getParameter(r.RENDERER) || "").toString(), a = { vendor: s, renderer: c, version: (r.getParameter(r.VERSION) || "").toString(), shadingLanguageVersion: (r.getParameter(r.SHADING_LANGUAGE_VERSION) || "").toString() };
|
|
1213
|
+
if (!c.length || !s.length) {
|
|
1214
|
+
var n = r.getExtension("WEBGL_debug_renderer_info");
|
|
1215
|
+
if (n) {
|
|
1216
|
+
var o = (r.getParameter(n.UNMASKED_VENDOR_WEBGL) || "").toString(), u = (r.getParameter(n.UNMASKED_RENDERER_WEBGL) || "").toString();
|
|
1217
|
+
o && (a.vendorUnmasked = o), u && (a.rendererUnmasked = u);
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
return a;
|
|
1221
|
+
} catch {
|
|
1222
|
+
}
|
|
1223
|
+
return "undefined";
|
|
1224
|
+
}
|
|
1225
|
+
function ws() {
|
|
1226
|
+
var e = new Float32Array(1), t = new Uint8Array(e.buffer);
|
|
1227
|
+
return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3];
|
|
1228
|
+
}
|
|
1229
|
+
function Cs(e, t) {
|
|
1230
|
+
var r = {};
|
|
1231
|
+
return t.forEach(function(s) {
|
|
1232
|
+
var c = function(a) {
|
|
1233
|
+
if (a.length === 0) return null;
|
|
1234
|
+
var n = {};
|
|
1235
|
+
a.forEach(function(i) {
|
|
1236
|
+
var l = String(i);
|
|
1237
|
+
n[l] = (n[l] || 0) + 1;
|
|
1238
|
+
});
|
|
1239
|
+
var o = a[0], u = 1;
|
|
1240
|
+
return Object.keys(n).forEach(function(i) {
|
|
1241
|
+
n[i] > u && (o = i, u = n[i]);
|
|
1242
|
+
}), o;
|
|
1243
|
+
}(e.map(function(a) {
|
|
1244
|
+
return s in a ? a[s] : void 0;
|
|
1245
|
+
}).filter(function(a) {
|
|
1246
|
+
return a !== void 0;
|
|
1247
|
+
}));
|
|
1248
|
+
c && (r[s] = c);
|
|
1249
|
+
}), r;
|
|
1250
|
+
}
|
|
1251
|
+
function ks() {
|
|
1252
|
+
var e = [], t = { "prefers-contrast": ["high", "more", "low", "less", "forced", "no-preference"], "any-hover": ["hover", "none"], "any-pointer": ["none", "coarse", "fine"], pointer: ["none", "coarse", "fine"], hover: ["hover", "none"], update: ["fast", "slow"], "inverted-colors": ["inverted", "none"], "prefers-reduced-motion": ["reduce", "no-preference"], "prefers-reduced-transparency": ["reduce", "no-preference"], scripting: ["none", "initial-only", "enabled"], "forced-colors": ["active", "none"] };
|
|
1253
|
+
return Object.keys(t).forEach(function(r) {
|
|
1254
|
+
t[r].forEach(function(s) {
|
|
1255
|
+
matchMedia("(".concat(r, ": ").concat(s, ")")).matches && e.push("".concat(r, ": ").concat(s));
|
|
1256
|
+
});
|
|
1257
|
+
}), e;
|
|
1258
|
+
}
|
|
1259
|
+
function Rs() {
|
|
1260
|
+
if (window.location.protocol === "https:" && typeof window.ApplePaySession == "function") try {
|
|
1261
|
+
for (var e = window.ApplePaySession.supportsVersion, t = 15; t > 0; t--) if (e(t)) return t;
|
|
1262
|
+
} catch {
|
|
1263
|
+
return 0;
|
|
1264
|
+
}
|
|
1265
|
+
return 0;
|
|
1266
|
+
}
|
|
1267
|
+
Y().name != "Firefox" && R("fonts", function() {
|
|
1268
|
+
var e = this;
|
|
1269
|
+
return new Promise(function(t, r) {
|
|
1270
|
+
try {
|
|
1271
|
+
(function(s) {
|
|
1272
|
+
var c;
|
|
1273
|
+
L(this, void 0, void 0, function() {
|
|
1274
|
+
var a, n, o;
|
|
1275
|
+
return I(this, function(u) {
|
|
1276
|
+
switch (u.label) {
|
|
1277
|
+
case 0:
|
|
1278
|
+
return document.body ? [3, 2] : [4, (i = 50, new Promise(function(h) {
|
|
1279
|
+
return setTimeout(h, i, l);
|
|
1280
|
+
}))];
|
|
1281
|
+
case 1:
|
|
1282
|
+
return u.sent(), [3, 0];
|
|
1283
|
+
case 2:
|
|
1284
|
+
if ((a = document.createElement("iframe")).setAttribute("frameBorder", "0"), (n = a.style).setProperty("position", "fixed"), n.setProperty("display", "block", "important"), n.setProperty("visibility", "visible"), n.setProperty("border", "0"), n.setProperty("opacity", "0"), a.src = "about:blank", document.body.appendChild(a), !(o = a.contentDocument || ((c = a.contentWindow) === null || c === void 0 ? void 0 : c.document))) throw new Error("Iframe document is not accessible");
|
|
1285
|
+
return s({ iframe: o }), setTimeout(function() {
|
|
1286
|
+
document.body.removeChild(a);
|
|
1287
|
+
}, 0), [2];
|
|
670
1288
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
1289
|
+
var i, l;
|
|
1290
|
+
});
|
|
1291
|
+
});
|
|
1292
|
+
})(function(s) {
|
|
1293
|
+
var c = s.iframe;
|
|
1294
|
+
return L(e, void 0, void 0, function() {
|
|
1295
|
+
var a, n, o, u;
|
|
1296
|
+
return I(this, function(i) {
|
|
1297
|
+
return a = c.createElement("canvas"), n = a.getContext("2d"), o = $s.map(function(l) {
|
|
1298
|
+
return Ze(n, l);
|
|
1299
|
+
}), u = {}, Es.forEach(function(l) {
|
|
1300
|
+
var h = Ze(n, l);
|
|
1301
|
+
o.includes(h) || (u[l] = h);
|
|
1302
|
+
}), t(u), [2];
|
|
1303
|
+
});
|
|
1304
|
+
});
|
|
1305
|
+
});
|
|
1306
|
+
} catch {
|
|
1307
|
+
r({ error: "unsupported" });
|
|
676
1308
|
}
|
|
677
|
-
);
|
|
678
|
-
},
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1309
|
+
});
|
|
1310
|
+
}), R("hardware", function() {
|
|
1311
|
+
return new Promise(function(e, t) {
|
|
1312
|
+
var r = navigator.deviceMemory !== void 0 ? navigator.deviceMemory : 0, s = window.performance && window.performance.memory ? window.performance.memory : 0;
|
|
1313
|
+
e({ videocard: Ss(), architecture: ws(), deviceMemory: r.toString() || "undefined", jsHeapSizeLimit: s.jsHeapSizeLimit || 0 });
|
|
1314
|
+
});
|
|
1315
|
+
}), R("locales", function() {
|
|
1316
|
+
return new Promise(function(e) {
|
|
1317
|
+
e({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
|
|
1318
|
+
});
|
|
1319
|
+
}), R("permissions", function() {
|
|
1320
|
+
return L(this, void 0, void 0, function() {
|
|
1321
|
+
var e;
|
|
1322
|
+
return I(this, function(t) {
|
|
1323
|
+
return he = (O == null ? void 0 : O.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], e = Array.from({ length: (O == null ? void 0 : O.retries) || 3 }, function() {
|
|
1324
|
+
return function() {
|
|
1325
|
+
return L(this, void 0, void 0, function() {
|
|
1326
|
+
var r, s, c, a, n;
|
|
1327
|
+
return I(this, function(o) {
|
|
1328
|
+
switch (o.label) {
|
|
1329
|
+
case 0:
|
|
1330
|
+
r = {}, s = 0, c = he, o.label = 1;
|
|
1331
|
+
case 1:
|
|
1332
|
+
if (!(s < c.length)) return [3, 6];
|
|
1333
|
+
a = c[s], o.label = 2;
|
|
1334
|
+
case 2:
|
|
1335
|
+
return o.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: a })];
|
|
1336
|
+
case 3:
|
|
1337
|
+
return n = o.sent(), r[a] = n.state.toString(), [3, 5];
|
|
1338
|
+
case 4:
|
|
1339
|
+
return o.sent(), [3, 5];
|
|
1340
|
+
case 5:
|
|
1341
|
+
return s++, [3, 1];
|
|
1342
|
+
case 6:
|
|
1343
|
+
return [2, r];
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
});
|
|
1347
|
+
}();
|
|
1348
|
+
}), [2, Promise.all(e).then(function(r) {
|
|
1349
|
+
return Cs(r, he);
|
|
1350
|
+
})];
|
|
1351
|
+
});
|
|
1352
|
+
});
|
|
1353
|
+
}), R("plugins", function() {
|
|
1354
|
+
var e = [];
|
|
1355
|
+
if (navigator.plugins) for (var t = 0; t < navigator.plugins.length; t++) {
|
|
1356
|
+
var r = navigator.plugins[t];
|
|
1357
|
+
e.push([r.name, r.filename, r.description].join("|"));
|
|
1358
|
+
}
|
|
1359
|
+
return new Promise(function(s) {
|
|
1360
|
+
s({ plugins: e });
|
|
1361
|
+
});
|
|
1362
|
+
}), R("screen", function() {
|
|
1363
|
+
return new Promise(function(e) {
|
|
1364
|
+
e({ is_touchscreen: navigator.maxTouchPoints > 0, maxTouchPoints: navigator.maxTouchPoints, colorDepth: screen.colorDepth, mediaMatches: ks() });
|
|
1365
|
+
});
|
|
1366
|
+
}), R("system", function() {
|
|
1367
|
+
return new Promise(function(e) {
|
|
1368
|
+
var t = Y();
|
|
1369
|
+
e({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: t.name, version: t.version }, applePayVersion: Rs() });
|
|
1370
|
+
});
|
|
1371
|
+
});
|
|
1372
|
+
var E, zs = Y().name !== "SamsungBrowser" ? 1 : 3, p = null;
|
|
1373
|
+
R("webgl", function() {
|
|
1374
|
+
return L(this, void 0, void 0, function() {
|
|
1375
|
+
var e;
|
|
1376
|
+
return I(this, function(t) {
|
|
1377
|
+
typeof document < "u" && ((E = document.createElement("canvas")).width = 200, E.height = 100, p = E.getContext("webgl"));
|
|
1378
|
+
try {
|
|
1379
|
+
if (!p) throw new Error("WebGL not supported");
|
|
1380
|
+
return e = Array.from({ length: zs }, function() {
|
|
1381
|
+
return function() {
|
|
1382
|
+
try {
|
|
1383
|
+
if (!p) throw new Error("WebGL not supported");
|
|
1384
|
+
var r = `
|
|
1385
|
+
attribute vec2 position;
|
|
1386
|
+
void main() {
|
|
1387
|
+
gl_Position = vec4(position, 0.0, 1.0);
|
|
732
1388
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
1389
|
+
`, s = `
|
|
1390
|
+
precision mediump float;
|
|
1391
|
+
void main() {
|
|
1392
|
+
gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
|
|
1393
|
+
}
|
|
1394
|
+
`, c = p.createShader(p.VERTEX_SHADER), a = p.createShader(p.FRAGMENT_SHADER);
|
|
1395
|
+
if (!c || !a) throw new Error("Failed to create shaders");
|
|
1396
|
+
if (p.shaderSource(c, r), p.shaderSource(a, s), p.compileShader(c), !p.getShaderParameter(c, p.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + p.getShaderInfoLog(c));
|
|
1397
|
+
if (p.compileShader(a), !p.getShaderParameter(a, p.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + p.getShaderInfoLog(a));
|
|
1398
|
+
var n = p.createProgram();
|
|
1399
|
+
if (!n) throw new Error("Failed to create shader program");
|
|
1400
|
+
if (p.attachShader(n, c), p.attachShader(n, a), p.linkProgram(n), !p.getProgramParameter(n, p.LINK_STATUS)) throw new Error("Shader program linking failed: " + p.getProgramInfoLog(n));
|
|
1401
|
+
p.useProgram(n);
|
|
1402
|
+
for (var o = 137, u = new Float32Array(4 * o), i = 2 * Math.PI / o, l = 0; l < o; l++) {
|
|
1403
|
+
var h = l * i;
|
|
1404
|
+
u[4 * l] = 0, u[4 * l + 1] = 0, u[4 * l + 2] = Math.cos(h) * (E.width / 2), u[4 * l + 3] = Math.sin(h) * (E.height / 2);
|
|
1405
|
+
}
|
|
1406
|
+
var f = p.createBuffer();
|
|
1407
|
+
p.bindBuffer(p.ARRAY_BUFFER, f), p.bufferData(p.ARRAY_BUFFER, u, p.STATIC_DRAW);
|
|
1408
|
+
var g = p.getAttribLocation(n, "position");
|
|
1409
|
+
p.enableVertexAttribArray(g), p.vertexAttribPointer(g, 2, p.FLOAT, !1, 0, 0), p.viewport(0, 0, E.width, E.height), p.clearColor(0, 0, 0, 1), p.clear(p.COLOR_BUFFER_BIT), p.drawArrays(p.LINES, 0, 2 * o);
|
|
1410
|
+
var b = new Uint8ClampedArray(E.width * E.height * 4);
|
|
1411
|
+
return p.readPixels(0, 0, E.width, E.height, p.RGBA, p.UNSIGNED_BYTE, b), new ImageData(b, E.width, E.height);
|
|
1412
|
+
} catch {
|
|
1413
|
+
return new ImageData(1, 1);
|
|
1414
|
+
} finally {
|
|
1415
|
+
p && (p.bindBuffer(p.ARRAY_BUFFER, null), p.useProgram(null), p.viewport(0, 0, p.drawingBufferWidth, p.drawingBufferHeight), p.clearColor(0, 0, 0, 0));
|
|
752
1416
|
}
|
|
753
|
-
)
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
1417
|
+
}();
|
|
1418
|
+
}), [2, { commonImageHash: _e(_t(e, E.width, E.height).data.toString()).toString() }];
|
|
1419
|
+
} catch {
|
|
1420
|
+
return [2, { webgl: "unsupported" }];
|
|
1421
|
+
}
|
|
1422
|
+
return [2];
|
|
1423
|
+
});
|
|
1424
|
+
});
|
|
1425
|
+
});
|
|
1426
|
+
var q = function(e, t, r, s) {
|
|
1427
|
+
for (var c = (r - t) / s, a = 0, n = 0; n < s; n++)
|
|
1428
|
+
a += e(t + (n + 0.5) * c);
|
|
1429
|
+
return a * c;
|
|
1430
|
+
};
|
|
1431
|
+
R("math", function() {
|
|
1432
|
+
return L(void 0, void 0, void 0, function() {
|
|
1433
|
+
return I(this, function(e) {
|
|
1434
|
+
return [2, { acos: Math.acos(0.5), asin: q(Math.asin, -1, 1, 97), atan: q(Math.atan, -1, 1, 97), cos: q(Math.cos, 0, Math.PI, 97), cosh: Math.cosh(9 / 7), e: Math.E, largeCos: Math.cos(1e20), largeSin: Math.sin(1e20), largeTan: Math.tan(1e20), log: Math.log(1e3), pi: Math.PI, sin: q(Math.sin, -Math.PI, Math.PI, 97), sinh: q(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: q(Math.tan, 0, 2 * Math.PI, 97), tanh: q(Math.tanh, -9 / 7, 7 / 9, 97) }];
|
|
1435
|
+
});
|
|
1436
|
+
});
|
|
1437
|
+
});
|
|
1438
|
+
class Ts {
|
|
1439
|
+
constructor(t, r) {
|
|
1440
|
+
if (U(this, "config"), U(this, "sdkInfo"), U(this, "userId"), U(this, "sessionId"), U(this, "search", async (s) => {
|
|
1441
|
+
if (this.sendMeasureEvent("search_requested", {
|
|
1442
|
+
search_term: s.query
|
|
1443
|
+
}), (s.query.match(/"/g) || []).length % 2 !== 0)
|
|
1444
|
+
throw new Error(
|
|
1445
|
+
"The search term contains an uneven number of quote characters."
|
|
1446
|
+
);
|
|
1447
|
+
try {
|
|
1448
|
+
const c = {
|
|
1449
|
+
query: this.buildQueryObject(s),
|
|
1450
|
+
limit: s.limit ?? 20
|
|
1451
|
+
// Default to 20 if not provided
|
|
1452
|
+
};
|
|
1453
|
+
s.offset !== void 0 && (c.offset = s.offset), s.order_by && (c.order_by = s.order_by, c.sort = s.sort === "desc" || s.sort === "asc" ? s.sort : "asc");
|
|
1454
|
+
const a = {
|
|
1455
|
+
method: "POST",
|
|
1456
|
+
headers: {
|
|
1457
|
+
Authorization: this.config.readKey,
|
|
1458
|
+
"Content-Type": "application/json",
|
|
1459
|
+
"X-Sc-User-Id": this.userId
|
|
776
1460
|
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
1461
|
+
body: JSON.stringify(c)
|
|
1462
|
+
}, n = await fetch(this.baseSearchUrl, a);
|
|
1463
|
+
if (!n.ok)
|
|
1464
|
+
throw new Error(
|
|
1465
|
+
`Error: ${n.statusText} (Status: ${n.status})`
|
|
1466
|
+
);
|
|
1467
|
+
const o = await n.json();
|
|
1468
|
+
return this.sendMeasureEvent("search_response_received", {
|
|
1469
|
+
search_term: s.query,
|
|
1470
|
+
number_of_documents: o.data.count
|
|
1471
|
+
}), o;
|
|
1472
|
+
} catch (c) {
|
|
1473
|
+
throw console.error("Error parsing response:", c), c;
|
|
1474
|
+
}
|
|
1475
|
+
}), U(this, "sendMeasureEvent", async (s, c = {}, a = {}) => {
|
|
1476
|
+
const n = {
|
|
1477
|
+
event_name: s,
|
|
1478
|
+
properties: {
|
|
1479
|
+
searchcraft_index_names: this.config.index,
|
|
1480
|
+
...c
|
|
782
1481
|
},
|
|
783
|
-
|
|
1482
|
+
user: {
|
|
1483
|
+
...this.measureRequestUser,
|
|
1484
|
+
...a
|
|
1485
|
+
}
|
|
1486
|
+
}, o = JSON.stringify(n), u = `${this.baseMeasureUrl}/event`;
|
|
1487
|
+
try {
|
|
1488
|
+
const i = await fetch(u, {
|
|
1489
|
+
method: "POST",
|
|
1490
|
+
headers: {
|
|
1491
|
+
"Content-Type": "application/json",
|
|
1492
|
+
Authorization: this.config.readKey,
|
|
1493
|
+
"X-Sc-User-Id": this.userId
|
|
1494
|
+
},
|
|
1495
|
+
body: o,
|
|
1496
|
+
keepalive: !0
|
|
1497
|
+
});
|
|
1498
|
+
if (!i.ok)
|
|
1499
|
+
throw new Error(
|
|
1500
|
+
`Failed to send request: ${i.status} ${i.statusText}`
|
|
1501
|
+
);
|
|
1502
|
+
return;
|
|
1503
|
+
} catch (i) {
|
|
1504
|
+
throw console.error("Error sending MeasureRequest:", i), i;
|
|
1505
|
+
}
|
|
1506
|
+
}), !t.endpointURL || !t.index || !t.readKey)
|
|
1507
|
+
throw new Error(
|
|
1508
|
+
"Endpoint URL, Index value(s), and Read Key must be provided"
|
|
784
1509
|
);
|
|
1510
|
+
this.config = t, this.sdkInfo = r, this.userId = t.userId || "", this.sessionId = hs(), this.initMeasure();
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Initializes this.userId based on config & sends the `sdk_innitialized` event.
|
|
1514
|
+
*/
|
|
1515
|
+
async initMeasure() {
|
|
1516
|
+
if (!this.config.userId) {
|
|
1517
|
+
const t = await ys();
|
|
1518
|
+
this.userId = t;
|
|
1519
|
+
}
|
|
1520
|
+
this.sendMeasureEvent("sdk_initialized");
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Getter for the base url used by the /search endpoint.
|
|
1524
|
+
*/
|
|
1525
|
+
get baseSearchUrl() {
|
|
1526
|
+
return `${this.config.endpointURL}/index/${this.config.index.join(",")}/search`;
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* Getter for the base url used by the /measure endpoints.
|
|
1530
|
+
*/
|
|
1531
|
+
get baseMeasureUrl() {
|
|
1532
|
+
return `${this.config.endpointURL}/measure`;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Getter for the measure request user. Uses config values + navigator values.
|
|
1536
|
+
*/
|
|
1537
|
+
get measureRequestUser() {
|
|
1538
|
+
return {
|
|
1539
|
+
user_id: this.userId,
|
|
1540
|
+
locale: navigator.language || "en-US",
|
|
1541
|
+
os: navigator.userAgent.includes("Windows") ? "Windows" : navigator.userAgent.includes("Mac") ? "Mac" : navigator.userAgent.includes("Linux") ? "Linux" : "Unknown",
|
|
1542
|
+
platform: navigator.platform || "Unknown",
|
|
1543
|
+
sdk_name: this.sdkInfo.sdkName,
|
|
1544
|
+
sdk_version: this.sdkInfo.sdkVersion,
|
|
1545
|
+
user_agent: navigator.userAgent || "Unknown"
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
/**
|
|
1549
|
+
* Builds a query object for the search request.
|
|
1550
|
+
* @param {SearchParams} searchParams - The parameters for the search.
|
|
1551
|
+
* @returns {QueryObject} - A properly formatted query object.
|
|
1552
|
+
*/
|
|
1553
|
+
buildQueryObject(t) {
|
|
1554
|
+
const r = [];
|
|
1555
|
+
let s = "should";
|
|
1556
|
+
return t.facetPathsForIndexFields && Object.keys(t.facetPathsForIndexFields).forEach(
|
|
1557
|
+
(c) => {
|
|
1558
|
+
var a;
|
|
1559
|
+
const n = (a = t.facetPathsForIndexFields) == null ? void 0 : a[c];
|
|
1560
|
+
n && (s = "must", r.push({
|
|
1561
|
+
occur: s,
|
|
1562
|
+
normal: {
|
|
1563
|
+
ctx: n.value
|
|
1564
|
+
}
|
|
1565
|
+
}));
|
|
1566
|
+
}
|
|
1567
|
+
), t.rangeValueForIndexFields && Object.keys(t.rangeValueForIndexFields).forEach(
|
|
1568
|
+
(c) => {
|
|
1569
|
+
var a;
|
|
1570
|
+
const n = (a = t.rangeValueForIndexFields) == null ? void 0 : a[c];
|
|
1571
|
+
n && (s = "must", r.push({
|
|
1572
|
+
occur: s,
|
|
1573
|
+
normal: {
|
|
1574
|
+
ctx: n.value
|
|
1575
|
+
}
|
|
1576
|
+
}));
|
|
1577
|
+
}
|
|
1578
|
+
), t.sort === "desc" ? t.order_by = "date_published" : t.order_by = "", r.push({
|
|
1579
|
+
occur: s,
|
|
1580
|
+
// Valid, as 'occur' is a required property in QueryItem
|
|
1581
|
+
[t.mode]: { ctx: t.query }
|
|
1582
|
+
// Ensure dynamic mode is inside queryType
|
|
1583
|
+
}), r;
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
var w = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(w || {});
|
|
1587
|
+
class _s {
|
|
1588
|
+
constructor(t) {
|
|
1589
|
+
U(this, "logLevel"), U(this, "logFormatter"), this.logLevel = t.logLevel || 1, this.logFormatter = t.logFormatter || this.defaultFormatter;
|
|
1590
|
+
}
|
|
1591
|
+
defaultFormatter(t, r) {
|
|
1592
|
+
return `[${w[t]}] ${(/* @__PURE__ */ new Date()).toISOString()}: ${r}`;
|
|
1593
|
+
}
|
|
1594
|
+
debug(t) {
|
|
1595
|
+
this.logLevel <= 0 && console.log(this.logFormatter(0, t));
|
|
1596
|
+
}
|
|
1597
|
+
info(t) {
|
|
1598
|
+
this.logLevel <= 1 && console.info(this.logFormatter(1, t));
|
|
1599
|
+
}
|
|
1600
|
+
warn(t) {
|
|
1601
|
+
this.logLevel <= 2 && console.warn(this.logFormatter(2, t));
|
|
1602
|
+
}
|
|
1603
|
+
error(t) {
|
|
1604
|
+
this.logLevel <= 3 && console.error(this.logFormatter(3, t));
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
const z = Se.create((e, t) => {
|
|
1608
|
+
let r = null, s = null;
|
|
1609
|
+
const c = (a, n) => {
|
|
1610
|
+
if (s)
|
|
1611
|
+
switch (a) {
|
|
1612
|
+
case w.DEBUG:
|
|
1613
|
+
s.debug(n);
|
|
1614
|
+
break;
|
|
1615
|
+
case w.INFO:
|
|
1616
|
+
s.info(n);
|
|
1617
|
+
break;
|
|
1618
|
+
case w.WARN:
|
|
1619
|
+
s.warn(n);
|
|
1620
|
+
break;
|
|
1621
|
+
case w.ERROR:
|
|
1622
|
+
s.error(n);
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
};
|
|
1626
|
+
return {
|
|
1627
|
+
resetFacetPaths: () => {
|
|
1628
|
+
e({
|
|
1629
|
+
facetPathsForIndexFields: {}
|
|
1630
|
+
});
|
|
1631
|
+
},
|
|
1632
|
+
addFacetPathsForIndexField: (a) => e((n) => ({
|
|
1633
|
+
facetPathsForIndexFields: Object.assign(Object.assign({}, n.facetPathsForIndexFields), { [a.fieldName]: a })
|
|
1634
|
+
})),
|
|
1635
|
+
removeFacetPathsForIndexField: (a) => e((n) => {
|
|
1636
|
+
const o = n.facetPathsForIndexFields;
|
|
1637
|
+
return delete o[a], {
|
|
1638
|
+
facetPathsForIndexFields: Object.assign({}, o)
|
|
1639
|
+
};
|
|
785
1640
|
}),
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
1641
|
+
addRangeValueForIndexField: (a) => e((n) => ({
|
|
1642
|
+
rangeValueForIndexFields: Object.assign(Object.assign({}, n.rangeValueForIndexFields), { [a.fieldName]: a })
|
|
1643
|
+
})),
|
|
1644
|
+
removeRangeValueForIndexField: (a) => e((n) => {
|
|
1645
|
+
const o = n.rangeValueForIndexFields;
|
|
1646
|
+
return delete o[a], {
|
|
1647
|
+
rangeValueForIndexFields: Object.assign({}, o)
|
|
1648
|
+
};
|
|
1649
|
+
}),
|
|
1650
|
+
setSearchMode: (a) => e({ searchMode: a }),
|
|
1651
|
+
setSortType: (a) => e({ sortType: a }),
|
|
1652
|
+
searchMode: "fuzzy",
|
|
1653
|
+
sortType: "asc",
|
|
1654
|
+
facetPathsForIndexFields: {},
|
|
1655
|
+
rangeValueForIndexFields: {},
|
|
1656
|
+
query: "",
|
|
1657
|
+
isRequesting: !1,
|
|
1658
|
+
searchResults: null,
|
|
1659
|
+
facets: null,
|
|
1660
|
+
getSearchcraftInstance: () => r,
|
|
1661
|
+
setQuery: (a) => {
|
|
1662
|
+
e(Object.assign({ query: a, facetPathsForIndexFields: {} }, a.trim().length === 0 && {
|
|
1663
|
+
searchMode: "fuzzy",
|
|
1664
|
+
sortType: "asc"
|
|
1665
|
+
}));
|
|
1666
|
+
},
|
|
1667
|
+
setSearchResults: (a) => e({ searchResults: a }),
|
|
1668
|
+
setFacets: (a) => e({ facets: a }),
|
|
1669
|
+
setIsRequesting: (a) => e({ isRequesting: a }),
|
|
1670
|
+
search: async () => {
|
|
1671
|
+
const a = t();
|
|
1672
|
+
if (c(w.INFO, `Starting search with search term: "${a.query}"`), !r)
|
|
1673
|
+
throw new Error("Searchcraft instance is not initialized.");
|
|
1674
|
+
if (!a.query.trim()) {
|
|
1675
|
+
c(w.INFO, "No search request was made: search term was empty."), a.setSearchResults(null);
|
|
1676
|
+
return;
|
|
1677
|
+
}
|
|
1678
|
+
a.setIsRequesting(!0);
|
|
1679
|
+
try {
|
|
1680
|
+
const n = await r.search({
|
|
1681
|
+
query: a.query,
|
|
1682
|
+
mode: a.searchMode,
|
|
1683
|
+
sort: a.sortType,
|
|
1684
|
+
facetPathsForIndexFields: a.facetPathsForIndexFields,
|
|
1685
|
+
rangeValueForIndexFields: a.rangeValueForIndexFields
|
|
1686
|
+
}), o = n.data.facets || null;
|
|
1687
|
+
a.setSearchResults(n), a.setFacets(o), c(w.DEBUG, `Search results: ${JSON.stringify(n)}`), c(w.DEBUG, `Updated facets: ${JSON.stringify(o)}`);
|
|
1688
|
+
} catch (n) {
|
|
1689
|
+
console.error(`Search failed: ${n.message}`), c(w.ERROR, `Search failed with error: ${n.message}`);
|
|
1690
|
+
} finally {
|
|
1691
|
+
a.setIsRequesting(!1);
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
initialize: (a, n = !1) => {
|
|
1695
|
+
r = a, s = n ? new _s({ logLevel: w.DEBUG }) : null, c(w.INFO, "Searchcraft store initialized.");
|
|
1696
|
+
}
|
|
1697
|
+
};
|
|
1698
|
+
});
|
|
1699
|
+
Se.create((e) => ({
|
|
1700
|
+
theme: "light",
|
|
1701
|
+
toggleTheme: () => e((t) => ({ theme: t.theme === "light" ? "dark" : "light" }))
|
|
1702
|
+
}));
|
|
1703
|
+
const As = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-search-result-container{all:unset;align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;color:inherit;background-color:var(--sc-surface-neutral-primary)}@media (min-width: 900px){.searchcraft-search-result-container{flex-direction:row}}a.searchcraft-search-result-container{cursor:pointer;transition:background-color 100ms}.searchcraft-base-search-result-content-container{flex:1;display:flex;flex-direction:column;gap:8px}.searchcraft-search-result-image{border-radius:var(--sc-image-border-radius);width:100%}@media (min-width: 900px){.searchcraft-search-result-image{width:200px}}.searchcraft-base-search-result-title{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-bold-font-size);font-weight:var(--sc-body-bold-font-weight);line-height:var(--sc-body-bold-line-height);margin:0;color:var(--sc-content-neutral-primary)}.searchcraft-base-search-result-subtitle{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);margin:0;color:var(--sc-content-disabled)}.searchcraft-base-search-result-body-content{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-body-font-weight);line-height:var(--sc-body-line-height);margin:0;color:var(--sc-content-neutral-secondary)}.searchcraft-base-search-result-footer-content{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-body-font-weight);line-height:var(--sc-body-line-height);margin:0;color:var(--sc-content-disabled)}", Ps = As, At = /* @__PURE__ */ P(class extends A {
|
|
1704
|
+
constructor() {
|
|
1705
|
+
super(), this.__registerHost(), this.searchcraftStore = z.getState(), this.recordMeasureEvent = () => {
|
|
1706
|
+
var t, r, s;
|
|
1707
|
+
const c = this.searchcraftStore.getSearchcraftInstance();
|
|
1708
|
+
if (c) {
|
|
1709
|
+
const a = this.documentPosition, n = this.searchcraftStore.query, o = ((s = (r = (t = this.searchcraftStore.searchResults) === null || t === void 0 ? void 0 : t.data) === null || r === void 0 ? void 0 : r.hits) === null || s === void 0 ? void 0 : s.length) || 0;
|
|
1710
|
+
c.sendMeasureEvent("document_clicked", {
|
|
1711
|
+
document_position: a,
|
|
1712
|
+
number_of_documents: o,
|
|
1713
|
+
search_term: n
|
|
1714
|
+
});
|
|
790
1715
|
}
|
|
791
|
-
)
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1716
|
+
}, this.parseStyles = () => {
|
|
1717
|
+
if (this.customStyles)
|
|
1718
|
+
try {
|
|
1719
|
+
return JSON.parse(this.customStyles);
|
|
1720
|
+
} catch (t) {
|
|
1721
|
+
return console.error("Error parsing custom styles:", t), {};
|
|
1722
|
+
}
|
|
1723
|
+
return {};
|
|
1724
|
+
}, this.titleContent = void 0, this.subtitleContent = void 0, this.bodyContent = void 0, this.footerContent = void 0, this.buttonLabel = void 0, this.buttonHref = void 0, this.buttonTarget = "_blank", this.buttonRel = void 0, this.containerHref = void 0, this.containerTarget = "_blank", this.containerRel = void 0, this.imageSrc = void 0, this.imageAlt = void 0, this.imagePlacement = void 0, this.customStyles = void 0, this.documentPosition = 0;
|
|
1725
|
+
}
|
|
1726
|
+
render() {
|
|
1727
|
+
const t = this.parseStyles(), r = this.imageSrc && d("img", { alt: this.imageAlt, class: "searchcraft-search-result-image", src: this.imageSrc, style: t.image || {} }), s = d($e, null, this.imageSrc && this.imagePlacement === "left" && r, d("div", { class: "searchcraft-base-search-result-content-container" }, this.titleContent && d("h2", { class: "searchcraft-base-search-result-title", style: t.title || {} }, this.titleContent), this.subtitleContent && d("h3", { class: "searchcraft-base-search-result-subtitle", style: t.subtitle || {} }, this.subtitleContent), this.bodyContent && d("p", { class: "searchcraft-base-search-result-body-content", style: t.primaryContent || {} }, this.bodyContent), this.footerContent && d("p", { class: "searchcraft-base-search-result-footer-content", style: t.secondaryContent || {} }, this.footerContent), this.buttonHref && !this.containerHref && this.buttonLabel && d("a", { class: "searchcraft-search-result-button", href: this.buttonHref, style: t.button || {}, target: this.buttonTarget, rel: this.buttonRel }, this.buttonLabel)), this.imageSrc && this.imagePlacement === "right" && r);
|
|
1728
|
+
return this.containerHref ? d("a", { class: "searchcraft-search-result-container", onClick: this.recordMeasureEvent, href: this.containerHref, rel: this.containerRel, style: t.container || {}, tabindex: "0", target: this.containerTarget }, s) : d("div", { class: "searchcraft-search-result-container", style: t.container || {} }, s);
|
|
1729
|
+
}
|
|
1730
|
+
static get style() {
|
|
1731
|
+
return Ps;
|
|
1732
|
+
}
|
|
1733
|
+
}, [0, "searchcraft-base-search-result", {
|
|
1734
|
+
titleContent: [1, "title-content"],
|
|
1735
|
+
subtitleContent: [1, "subtitle-content"],
|
|
1736
|
+
bodyContent: [1, "body-content"],
|
|
1737
|
+
footerContent: [1, "footer-content"],
|
|
1738
|
+
buttonLabel: [1, "button-label"],
|
|
1739
|
+
buttonHref: [1, "button-href"],
|
|
1740
|
+
buttonTarget: [1, "button-target"],
|
|
1741
|
+
buttonRel: [1, "button-rel"],
|
|
1742
|
+
containerHref: [1, "container-href"],
|
|
1743
|
+
containerTarget: [1, "container-target"],
|
|
1744
|
+
containerRel: [1, "container-rel"],
|
|
1745
|
+
imageSrc: [1, "image-src"],
|
|
1746
|
+
imageAlt: [1, "image-alt"],
|
|
1747
|
+
imagePlacement: [1, "image-placement"],
|
|
1748
|
+
customStyles: [1, "custom-styles"],
|
|
1749
|
+
documentPosition: [2, "document-position"]
|
|
1750
|
+
}]);
|
|
1751
|
+
function Pt() {
|
|
1752
|
+
if (typeof customElements > "u")
|
|
1753
|
+
return;
|
|
1754
|
+
["searchcraft-base-search-result"].forEach((t) => {
|
|
1755
|
+
switch (t) {
|
|
1756
|
+
case "searchcraft-base-search-result":
|
|
1757
|
+
customElements.get(t) || customElements.define(t, At);
|
|
1758
|
+
break;
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1762
|
+
const Ds = At, Ms = Pt;
|
|
1763
|
+
function Bs(e) {
|
|
1764
|
+
if (typeof e == "string")
|
|
1765
|
+
try {
|
|
1766
|
+
return JSON.parse(e);
|
|
1767
|
+
} catch {
|
|
1768
|
+
return console.error("Invalid customStyles format:", e), {};
|
|
1769
|
+
}
|
|
1770
|
+
return e || {};
|
|
1771
|
+
}
|
|
1772
|
+
function Ls(e) {
|
|
1773
|
+
try {
|
|
1774
|
+
return JSON.stringify(e);
|
|
1775
|
+
} catch (t) {
|
|
1776
|
+
return console.error("Error serializing styles:", t), "{}";
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
function Is(e) {
|
|
1780
|
+
const t = /* @__PURE__ */ new Date(), r = new Date(e), s = Math.floor((t.getTime() - r.getTime()) / 1e3), c = Math.floor(s / 60), a = Math.floor(c / 60), n = Math.floor(a / 24), o = Math.floor(n / 365);
|
|
1781
|
+
return c < 60 ? `${c}m ago` : a < 24 ? `${a}h ago` : n < 365 ? `${n}d ago` : `${o}y ago`;
|
|
1782
|
+
}
|
|
1783
|
+
function Os(e) {
|
|
1784
|
+
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1785
|
+
}
|
|
1786
|
+
function Dt(e) {
|
|
1787
|
+
switch (e) {
|
|
1788
|
+
case "hour":
|
|
1789
|
+
return 36e5;
|
|
1790
|
+
case "day":
|
|
1791
|
+
return 864e5;
|
|
1792
|
+
case "month":
|
|
1793
|
+
return 2592e6;
|
|
1794
|
+
case "year":
|
|
1795
|
+
return 31536e6;
|
|
1796
|
+
default:
|
|
1797
|
+
return 36e5;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
function js(e) {
|
|
1801
|
+
return e.filter((t, r, s) => !s.some((c, a) => a !== r && c.includes(t)));
|
|
1802
|
+
}
|
|
1803
|
+
function H(e, t) {
|
|
1804
|
+
if (e && t)
|
|
1805
|
+
return t.fieldNames.map((r) => {
|
|
1806
|
+
let s = e[r.fieldName];
|
|
1807
|
+
return s && r.dataType === "date" && (s = Is(s)), s;
|
|
1808
|
+
}).filter((r) => !!r).join(t.delimiter || " ");
|
|
1809
|
+
}
|
|
1810
|
+
function Mt(e, t) {
|
|
1811
|
+
const r = Object.assign({}, e);
|
|
1812
|
+
for (const s in t)
|
|
1813
|
+
t.hasOwnProperty(s) && (t[s] instanceof Object && e[s] instanceof Object ? r[s] = Mt(e[s], t[s]) : r[s] = t[s]);
|
|
1814
|
+
return r;
|
|
1815
|
+
}
|
|
1816
|
+
function et(e) {
|
|
1817
|
+
const t = {}, r = (s) => {
|
|
1818
|
+
var c;
|
|
1819
|
+
t[s.path] = {
|
|
1820
|
+
count: s.count,
|
|
1821
|
+
path: s.path
|
|
1822
|
+
}, (c = s.children) === null || c === void 0 || c.forEach((a) => {
|
|
1823
|
+
r(a);
|
|
1824
|
+
});
|
|
1825
|
+
};
|
|
1826
|
+
return r(e), t;
|
|
1827
|
+
}
|
|
1828
|
+
function Us(e) {
|
|
1829
|
+
const t = {
|
|
1830
|
+
count: 0,
|
|
1831
|
+
path: "/",
|
|
1832
|
+
children: {}
|
|
1833
|
+
};
|
|
1834
|
+
return Object.keys(e).forEach((r) => {
|
|
1835
|
+
const s = e[r];
|
|
1836
|
+
if (s.path === "/")
|
|
1837
|
+
return;
|
|
1838
|
+
const c = s.path.substring(1).split("/");
|
|
1839
|
+
let a = t, n = "";
|
|
1840
|
+
c.forEach((o, u) => {
|
|
1841
|
+
const i = `${n}/${o}`;
|
|
1842
|
+
a.children[i] || (a.children[i] = {
|
|
1843
|
+
count: 0,
|
|
1844
|
+
path: i,
|
|
1845
|
+
children: {}
|
|
1846
|
+
}), u === c.length - 1 && (a.children[i].count = s.count), n = i, a = a.children[i];
|
|
1847
|
+
});
|
|
1848
|
+
}), t;
|
|
1849
|
+
}
|
|
1850
|
+
function Bt(e) {
|
|
1851
|
+
const t = {
|
|
1852
|
+
count: e.count,
|
|
1853
|
+
path: e.path,
|
|
1854
|
+
children: []
|
|
1855
|
+
};
|
|
1856
|
+
return Object.keys(e.children).length > 0 && (t.children = Object.values(e.children).map((r) => Bt(r))), t;
|
|
1857
|
+
}
|
|
1858
|
+
function Ns(e, t) {
|
|
1859
|
+
const r = Object.keys(e), s = Object.keys(t), c = new Set(s.filter((n) => n.split("/").length > 2).map((n) => n.substring(0, n.lastIndexOf("/"))));
|
|
1860
|
+
return Object.fromEntries(r.filter((n) => !c.has(n.substring(0, n.lastIndexOf("/")))).map((n) => [n, e[n]]));
|
|
1861
|
+
}
|
|
1862
|
+
function qs(e, t, r) {
|
|
1863
|
+
const s = t[e], c = r[e], a = {
|
|
1864
|
+
count: 0,
|
|
1865
|
+
path: "/",
|
|
1866
|
+
children: s
|
|
1867
|
+
}, n = {
|
|
1868
|
+
count: 0,
|
|
1869
|
+
path: "/",
|
|
1870
|
+
children: c
|
|
1871
|
+
}, o = et(a), u = et(n), i = Ns(o, u), l = Mt(i, u), h = Us(l), f = Bt(h);
|
|
1872
|
+
return {
|
|
1873
|
+
[e]: f.children
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
const Hs = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-error-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-danger);margin:0}", Vs = Hs, Lt = /* @__PURE__ */ P(class extends A {
|
|
1877
|
+
constructor() {
|
|
1878
|
+
super(), this.__registerHost(), this.errorMessage = void 0;
|
|
1879
|
+
}
|
|
1880
|
+
render() {
|
|
1881
|
+
return d("p", { key: "68c4058c43418e96729a91e6a2a9a106303c8bc0", class: "searchcraft-error-message" }, this.errorMessage || "Search term is required.");
|
|
1882
|
+
}
|
|
1883
|
+
static get style() {
|
|
1884
|
+
return Vs;
|
|
1885
|
+
}
|
|
1886
|
+
}, [0, "searchcraft-error-message", {
|
|
1887
|
+
errorMessage: [1, "error-message"]
|
|
1888
|
+
}]);
|
|
1889
|
+
function Ae() {
|
|
1890
|
+
if (typeof customElements > "u")
|
|
1891
|
+
return;
|
|
1892
|
+
["searchcraft-error-message"].forEach((t) => {
|
|
1893
|
+
switch (t) {
|
|
1894
|
+
case "searchcraft-error-message":
|
|
1895
|
+
customElements.get(t) || customElements.define(t, Lt);
|
|
1896
|
+
break;
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
const Ws = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-search-results-container{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-ad-section{align-items:center;background-color:#F1F1F1;border-radius:16px;display:flex;flex-direction:column;font-size:16px;justify-content:center;min-height:176px;text-align:center}.searchcraft-ad-section p{margin:0;color:var(--sc-content-disabled)}.searchcraft-search-results-empty-state-container{text-align:center}.searchcraft-search-results-error-message-container{text-align:center}", Gs = Ws, It = /* @__PURE__ */ P(class extends A {
|
|
1901
|
+
constructor() {
|
|
1902
|
+
super(), this.__registerHost(), this.noResults = M(this, "noResults", 7), this.adInterval = 4, this.customStylesForResults = void 0, this.searchResultMappings = void 0, this.placeAdAtEnd = !1, this.placeAdAtStart = !0, this.resultImagePlacement = "right", this.buttonLabel = void 0, this.buttonTarget = "_blank", this.buttonRel = void 0, this.containerTarget = "_blank", this.containerRel = void 0, this.hasSearched = !1, this.query = "", this.searchResults = null;
|
|
1903
|
+
}
|
|
1904
|
+
componentDidLoad() {
|
|
1905
|
+
this.unsubscribe = z.subscribe((s) => {
|
|
1906
|
+
s.query.length > 0 ? this.hasSearched = !0 : this.hasSearched = !1, this.searchResults = Object.assign({}, s.searchResults), this.query = s.query;
|
|
1907
|
+
});
|
|
1908
|
+
const { searchResults: t, query: r } = z.getState();
|
|
1909
|
+
this.searchResults = t, this.query = r;
|
|
1910
|
+
}
|
|
1911
|
+
disconnectedCallback() {
|
|
1912
|
+
this.unsubscribe && this.unsubscribe();
|
|
1913
|
+
}
|
|
1914
|
+
renderDocument(t, r) {
|
|
1915
|
+
const s = H(t, this.searchResultMappings.title), c = H(t, this.searchResultMappings.subtitle), a = H(t, this.searchResultMappings.body), n = H(t, this.searchResultMappings.containerHref), o = H(t, this.searchResultMappings.buttonHref), u = H(t, this.searchResultMappings.imageSource), i = H(t, this.searchResultMappings.footer), l = typeof this.customStylesForResults == "string" ? this.customStylesForResults : Ls(this.customStylesForResults);
|
|
1916
|
+
return d("searchcraft-base-search-result", { key: `${t.document_id}-${r}`, "custom-styles": l, "image-placement": this.resultImagePlacement, "container-rel": this.containerRel, "container-target": this.containerTarget, "button-label": this.buttonLabel || "View more", "button-rel": this.buttonRel, "button-target": this.buttonTarget, "document-position": r, "title-content": s, "subtitle-content": c, "body-content": a, "footer-content": i, "container-href": n, "button-href": o, "image-src": u });
|
|
1917
|
+
}
|
|
1918
|
+
render() {
|
|
1919
|
+
var t, r, s, c, a, n, o, u, i, l;
|
|
1920
|
+
if (this.query.trim() === "")
|
|
1921
|
+
return d("div", { class: "searchcraft-search-results-empty-state-container" }, d("slot", { name: "empty-search" }));
|
|
1922
|
+
if (!(!((t = this.searchResults) === null || t === void 0) && t.data))
|
|
1923
|
+
return;
|
|
1924
|
+
const h = (c = (s = (r = this.searchResults) === null || r === void 0 ? void 0 : r.data) === null || s === void 0 ? void 0 : s.hits) === null || c === void 0 ? void 0 : c.map((g, b) => {
|
|
1925
|
+
const { doc: v } = g;
|
|
1926
|
+
return v;
|
|
1927
|
+
}), f = [];
|
|
1928
|
+
if (this.placeAdAtStart && f.push(d("div", { key: "ad-section-start", class: "searchcraft-ad-section" }, d("p", null, "Ad Section"))), this.adInterval > 0)
|
|
1929
|
+
h.forEach((g, b) => {
|
|
1930
|
+
f.push(this.renderDocument(g, b)), (b + 1) % this.adInterval === 0 && f.push(d("div", { key: `ad-section-${b + 1}`, class: "searchcraft-ad-section " }, d("p", null, "Ad Section")));
|
|
1931
|
+
});
|
|
1932
|
+
else {
|
|
1933
|
+
const g = h.map((b, v) => this.renderDocument(b, v));
|
|
1934
|
+
f.push(...g);
|
|
1935
|
+
}
|
|
1936
|
+
return this.placeAdAtEnd && f.push(d("div", { key: "ad-section-end", class: "searchcraft-ad-section" }, d("p", null, "Ad Section"))), this.query.length > 0 && ((o = (n = (a = this.searchResults) === null || a === void 0 ? void 0 : a.data) === null || n === void 0 ? void 0 : n.hits) === null || o === void 0 ? void 0 : o.length) === 0 && this.noResults.emit(), d("div", { class: "searchcraft-search-results-container" }, f, this.query.length > 0 && ((l = (i = (u = this.searchResults) === null || u === void 0 ? void 0 : u.data) === null || i === void 0 ? void 0 : i.hits) === null || l === void 0 ? void 0 : l.length) === 0 && d("div", { class: "searchcraft-search-results-error-message-container" }, d("searchcraft-error-message", { "error-message": `No search results found for "${this.query}" query` })));
|
|
1937
|
+
}
|
|
1938
|
+
static get style() {
|
|
1939
|
+
return Gs;
|
|
1940
|
+
}
|
|
1941
|
+
}, [4, "searchcraft-base-search-results", {
|
|
1942
|
+
adInterval: [2, "ad-interval"],
|
|
1943
|
+
customStylesForResults: [1, "custom-styles-for-results"],
|
|
1944
|
+
searchResultMappings: [16],
|
|
1945
|
+
placeAdAtEnd: [4, "place-ad-at-end"],
|
|
1946
|
+
placeAdAtStart: [4, "place-ad-at-start"],
|
|
1947
|
+
resultImagePlacement: [1, "result-image-placement"],
|
|
1948
|
+
buttonLabel: [1, "button-label"],
|
|
1949
|
+
buttonTarget: [1, "button-target"],
|
|
1950
|
+
buttonRel: [1, "button-rel"],
|
|
1951
|
+
containerTarget: [1, "container-target"],
|
|
1952
|
+
containerRel: [1, "container-rel"],
|
|
1953
|
+
hasSearched: [32],
|
|
1954
|
+
query: [32],
|
|
1955
|
+
searchResults: [32]
|
|
1956
|
+
}]);
|
|
1957
|
+
function Qs() {
|
|
1958
|
+
if (typeof customElements > "u")
|
|
1959
|
+
return;
|
|
1960
|
+
["searchcraft-base-search-results", "searchcraft-base-search-result", "searchcraft-error-message"].forEach((t) => {
|
|
1961
|
+
switch (t) {
|
|
1962
|
+
case "searchcraft-base-search-results":
|
|
1963
|
+
customElements.get(t) || customElements.define(t, It);
|
|
1964
|
+
break;
|
|
1965
|
+
case "searchcraft-base-search-result":
|
|
1966
|
+
customElements.get(t) || Pt();
|
|
1967
|
+
break;
|
|
1968
|
+
case "searchcraft-error-message":
|
|
1969
|
+
customElements.get(t) || Ae();
|
|
1970
|
+
break;
|
|
1971
|
+
}
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
const Js = It, Ks = Qs;
|
|
1975
|
+
var Ot = { exports: {} };
|
|
1976
|
+
/*!
|
|
1977
|
+
Copyright (c) 2018 Jed Watson.
|
|
1978
|
+
Licensed under the MIT License (MIT), see
|
|
1979
|
+
http://jedwatson.github.io/classnames
|
|
1980
|
+
*/
|
|
1981
|
+
(function(e) {
|
|
1982
|
+
(function() {
|
|
1983
|
+
var t = {}.hasOwnProperty;
|
|
1984
|
+
function r() {
|
|
1985
|
+
for (var a = "", n = 0; n < arguments.length; n++) {
|
|
1986
|
+
var o = arguments[n];
|
|
1987
|
+
o && (a = c(a, s(o)));
|
|
1988
|
+
}
|
|
1989
|
+
return a;
|
|
1990
|
+
}
|
|
1991
|
+
function s(a) {
|
|
1992
|
+
if (typeof a == "string" || typeof a == "number")
|
|
1993
|
+
return a;
|
|
1994
|
+
if (typeof a != "object")
|
|
1995
|
+
return "";
|
|
1996
|
+
if (Array.isArray(a))
|
|
1997
|
+
return r.apply(null, a);
|
|
1998
|
+
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]"))
|
|
1999
|
+
return a.toString();
|
|
2000
|
+
var n = "";
|
|
2001
|
+
for (var o in a)
|
|
2002
|
+
t.call(a, o) && a[o] && (n = c(n, o));
|
|
2003
|
+
return n;
|
|
2004
|
+
}
|
|
2005
|
+
function c(a, n) {
|
|
2006
|
+
return n ? a ? a + " " + n : a + n : a;
|
|
2007
|
+
}
|
|
2008
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
2009
|
+
})();
|
|
2010
|
+
})(Ot);
|
|
2011
|
+
const x = Ot.exports, Ys = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-button{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-bold-font-size);font-weight:var(--sc-body-bold-font-weight);line-height:var(--sc-body-bold-line-height);border-radius:8px;display:flex;padding:12px 20px;position:relative;background-color:var(--sc-surface-brand-primary);border:1px solid var(--sc-border-primary);color:var(--sc-content-brand-on-primary)}.searchcraft-button:hover{cursor:pointer;background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button:focus{outline:2px solid var(--sc-surface-brand-primary)}.buttonLabel{position:relative}", Xs = Ys, jt = /* @__PURE__ */ P(class extends A {
|
|
2012
|
+
constructor() {
|
|
2013
|
+
super(), this.__registerHost(), this.buttonClick = M(this, "buttonClick", 7), this.handleClick = () => {
|
|
2014
|
+
this.buttonClick.emit();
|
|
2015
|
+
}, this.iconElement = void 0, this.iconOnly = !1, this.iconPosition = "left", this.label = "Search", this.isRequesting = !1;
|
|
2016
|
+
}
|
|
2017
|
+
render() {
|
|
2018
|
+
return d($e, { key: "8ea823d757ceca459ef80affa8dfdf7e96076c32" }, this.iconOnly ? d("button", { class: x("searchcraft-button"), onClick: this.handleClick, type: "submit" }, this.isRequesting ? d("searchcraft-spinner-dark", null) : this.iconElement) : d("button", { class: x("searchcraft-button"), onClick: this.handleClick, type: "submit" }, this.iconPosition === "left" && this.iconElement, d("span", { class: x("buttonLabel", "searchcraft-button-label") }, this.label)));
|
|
2019
|
+
}
|
|
2020
|
+
static get style() {
|
|
2021
|
+
return Xs;
|
|
2022
|
+
}
|
|
2023
|
+
}, [0, "searchcraft-button", {
|
|
2024
|
+
iconElement: [16],
|
|
2025
|
+
iconOnly: [4, "icon-only"],
|
|
2026
|
+
iconPosition: [1, "icon-position"],
|
|
2027
|
+
label: [1],
|
|
2028
|
+
isRequesting: [32]
|
|
2029
|
+
}]);
|
|
2030
|
+
function Ut() {
|
|
2031
|
+
if (typeof customElements > "u")
|
|
2032
|
+
return;
|
|
2033
|
+
["searchcraft-button"].forEach((t) => {
|
|
2034
|
+
switch (t) {
|
|
2035
|
+
case "searchcraft-button":
|
|
2036
|
+
customElements.get(t) || customElements.define(t, jt);
|
|
2037
|
+
break;
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
const Zs = jt, en = Ut, tn = Lt, rn = Ae, sn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.filtersListContainer{width:100%}.filterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.filterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.filterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.filterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.filterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.filterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.childFilterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:12px;margin-left:24px;position:relative}.childFilterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childFilterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.childFilterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.childFilterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childFilterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:9px;left:8px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:3px;left:9px}.searchcraft-facet-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-disabled);text-align:center}", nn = sn, Nt = /* @__PURE__ */ P(class extends A {
|
|
2042
|
+
constructor() {
|
|
2043
|
+
super(), this.__registerHost(), this.facetSelectionUpdated = M(this, "facetSelectionUpdated", 7), this.searchStore = z.getState(), this.formatLabel = (t) => {
|
|
2044
|
+
const r = t.path.replace(/^\//, ""), s = t.count;
|
|
2045
|
+
return `${r.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())} (${s})`;
|
|
2046
|
+
}, this.formatSubLabel = (t, r) => {
|
|
2047
|
+
const c = t.path.substring(r.path.length).replace(/^\//, ""), a = t.count;
|
|
2048
|
+
return `${c.replace(/-/g, " ").replace(/\b\w/g, (n) => n.toUpperCase())} (${a})`;
|
|
2049
|
+
}, this.fieldName = void 0, this.baseFacetRoot = void 0, this.facetRoot = void 0, this.selectedPaths = {}, this.lastTimeTaken = void 0, this.hasNewSearchTerm = !1, this.lastQuery = void 0, this.lastSearchMode = void 0, this.lastSortType = void 0, this.unsubscribe = void 0;
|
|
2050
|
+
}
|
|
2051
|
+
handleStateUpdate(t) {
|
|
2052
|
+
var r, s;
|
|
2053
|
+
const c = (r = t.searchResults) === null || r === void 0 ? void 0 : r.data.facets, a = (s = t.searchResults) === null || s === void 0 ? void 0 : s.data.time_taken;
|
|
2054
|
+
if ((t.query !== this.lastQuery || t.searchMode !== this.lastSearchMode || t.sortType !== this.lastSortType) && (this.selectedPaths = {}, this.hasNewSearchTerm = !0), a !== this.lastTimeTaken && c) {
|
|
2055
|
+
this.facetRoot = void 0;
|
|
2056
|
+
const n = c.find((o) => this.fieldName === Object.keys(o)[0]);
|
|
2057
|
+
this.hasNewSearchTerm ? (this.baseFacetRoot = n, this.facetRoot = n, this.hasNewSearchTerm = !1) : this.baseFacetRoot && (this.facetRoot = qs(this.fieldName, this.baseFacetRoot, n));
|
|
2058
|
+
}
|
|
2059
|
+
this.lastQuery = t.query, this.lastSearchMode = t.searchMode, this.lastSortType = t.sortType, this.lastTimeTaken = a;
|
|
2060
|
+
}
|
|
2061
|
+
connectedCallback() {
|
|
2062
|
+
this.handleStateUpdate(this.searchStore), this.unsubscribe = z.subscribe((t) => {
|
|
2063
|
+
this.handleStateUpdate(t);
|
|
2064
|
+
});
|
|
2065
|
+
}
|
|
2066
|
+
disconnectedCallback() {
|
|
2067
|
+
var t;
|
|
2068
|
+
(t = this.unsubscribe) === null || t === void 0 || t.call(this);
|
|
2069
|
+
}
|
|
2070
|
+
handleCheckboxChange(t) {
|
|
2071
|
+
if (!this.selectedPaths[t])
|
|
2072
|
+
this.selectedPaths = Object.assign(Object.assign({}, this.selectedPaths), { [t]: !0 });
|
|
2073
|
+
else {
|
|
2074
|
+
const a = Object.keys(this.selectedPaths).filter((n) => !n.includes(t));
|
|
2075
|
+
this.selectedPaths = a.reduce((n, o) => (n[o] = !0, n), {});
|
|
2076
|
+
}
|
|
2077
|
+
const s = Object.keys(this.selectedPaths).filter((a) => this.selectedPaths[a]), c = js(s);
|
|
2078
|
+
this.facetSelectionUpdated.emit({ paths: c });
|
|
2079
|
+
}
|
|
2080
|
+
render() {
|
|
2081
|
+
var t;
|
|
2082
|
+
const r = (t = this.facetRoot) === null || t === void 0 ? void 0 : t[this.fieldName];
|
|
2083
|
+
return d("div", { key: "c7b6a2c7bbb48d0835745b4bcae43a283ade4139", class: x("filtersListContainer", "searchcraft-filters-list-container") }, !r && d("p", { key: "a682f57ff51fdcfec670744ef84930c90c9b9c20", class: "searchcraft-facet-message" }, "Enter a search to view facets."), r == null ? void 0 : r.map((s) => {
|
|
2084
|
+
var c;
|
|
2085
|
+
const a = s.children ? (c = s.children) === null || c === void 0 ? void 0 : c.some((n) => this.selectedPaths[n.path]) : !1;
|
|
2086
|
+
return d("div", { key: s.path, class: x("searchcraft-filters-list-item") }, d("label", { class: x("filterCheckboxLabel", "searchcraft-filters-list-checkbox-label") }, d("input", { checked: this.selectedPaths[s.path], onChange: (n) => this.handleCheckboxChange(s.path), type: "checkbox" }), a ? d("div", { class: x("dashContainer", "searchcraft-filter-list-dash-container") }, d("searchcraft-dash-icon", null)) : d("div", { class: x("checkContainer", "searchcraft-filter-list-check-container") }, d("searchcraft-check-icon", null)), this.formatLabel(s)), s.children && s.children.length > 0 && d($e, null, s.children.map((n) => d("label", { key: n.path, class: x("childFilterCheckboxLabel", "searchcraft-child-filter-checkbox-label"), style: {
|
|
2087
|
+
display: this.selectedPaths[s.path] ? "flex" : "none"
|
|
2088
|
+
} }, d("input", { checked: this.selectedPaths[n.path], onChange: (o) => {
|
|
2089
|
+
this.handleCheckboxChange(n.path);
|
|
2090
|
+
}, type: "checkbox" }), d("div", { class: x("checkContainer", "searchcraft-filter-list-check-container") }, d("searchcraft-check-icon", null)), this.formatSubLabel(n, s)))));
|
|
2091
|
+
}));
|
|
2092
|
+
}
|
|
2093
|
+
static get style() {
|
|
2094
|
+
return nn;
|
|
2095
|
+
}
|
|
2096
|
+
}, [0, "searchcraft-facet-list", {
|
|
2097
|
+
fieldName: [1, "field-name"],
|
|
2098
|
+
baseFacetRoot: [32],
|
|
2099
|
+
facetRoot: [32],
|
|
2100
|
+
selectedPaths: [32],
|
|
2101
|
+
lastTimeTaken: [32],
|
|
2102
|
+
hasNewSearchTerm: [32],
|
|
2103
|
+
lastQuery: [32],
|
|
2104
|
+
lastSearchMode: [32],
|
|
2105
|
+
lastSortType: [32],
|
|
2106
|
+
unsubscribe: [32]
|
|
2107
|
+
}]);
|
|
2108
|
+
function qt() {
|
|
2109
|
+
if (typeof customElements > "u")
|
|
2110
|
+
return;
|
|
2111
|
+
["searchcraft-facet-list"].forEach((t) => {
|
|
2112
|
+
switch (t) {
|
|
2113
|
+
case "searchcraft-facet-list":
|
|
2114
|
+
customElements.get(t) || customElements.define(t, Nt);
|
|
2115
|
+
break;
|
|
2116
|
+
}
|
|
2117
|
+
});
|
|
2118
|
+
}
|
|
2119
|
+
const an = Nt, cn = qt, on = ':root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-slider-container{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%}.searchcraft-slider-range-container{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range-container::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range-container .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range-container .searchcraft-slider-input{appearance:none;background:transparent;border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range-container .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px;-webkit-appearance:none}.searchcraft-slider-range-container .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:2px solid var(--sc-border-neutral);cursor:pointer;height:20px;pointer-events:all;width:20px}.searchcraft-slider-label-container{color:var(--sc-content-primary);display:flex;font-family:"Source Sans Pro", sans-serif;font-size:15px;font-weight:600;justify-content:space-between;margin-top:10px;width:100%}.searchcraft-slider-label{min-width:30px;text-align:center}', ln = on, Ht = /* @__PURE__ */ P(class extends A {
|
|
2120
|
+
constructor() {
|
|
2121
|
+
super(), this.__registerHost(), this.rangeChanged = M(this, "rangeChanged", 7), this.emitUpdate = async () => {
|
|
2122
|
+
this.rangeChanged.emit({
|
|
2123
|
+
startValue: this.startValue,
|
|
2124
|
+
endValue: this.endValue
|
|
2125
|
+
});
|
|
2126
|
+
}, this.handleStartValueChange = (t) => {
|
|
2127
|
+
const r = t.target, s = Number.parseInt(r.value, 10);
|
|
2128
|
+
this.lastFocusedHandle = "min", s <= this.endValue ? (this.startValue = s, this.emitUpdate()) : (this.startValue = this.endValue, r.value = `${this.endValue}`);
|
|
2129
|
+
}, this.handleEndValueChange = (t) => {
|
|
2130
|
+
const r = t.target, s = Number.parseInt(r.value, 10);
|
|
2131
|
+
this.lastFocusedHandle = "max", s >= this.startValue ? (this.endValue = s, this.emitUpdate()) : (this.endValue = this.startValue, r.value = `${this.startValue}`);
|
|
2132
|
+
}, this.max = 100, this.min = 0, this.granularity = Dt("month"), this.dataType = "number", this.endValue = this.max, this.startValue = this.min, this.lastFocusedHandle = "max";
|
|
2133
|
+
}
|
|
2134
|
+
componentDidLoad() {
|
|
2135
|
+
this.startValue = this.min, this.endValue = this.max;
|
|
2136
|
+
}
|
|
2137
|
+
render() {
|
|
2138
|
+
const t = this.min, r = this.max, s = (this.startValue - t) / (r - t) * 100, c = (this.endValue - t) / (r - t) * 100, a = this.dataType === "number" ? this.startValue : new Date(this.startValue).getFullYear(), n = this.dataType === "number" ? this.endValue : new Date(this.endValue).getFullYear();
|
|
2139
|
+
return d("div", { key: "51de4996df052bf178590aeb4c56a67ec57c92e5", class: "searchcraft-slider-container" }, d("div", { key: "634bead69c3fbc462cda3dd65dd4ba6a398c6913", class: "searchcraft-slider-range-container" }, d("div", { key: "1b7a0b63ef208884f24b9f56b48a72bca320c71b", class: "searchcraft-slider-active-range", style: {
|
|
2140
|
+
left: `${s}%`,
|
|
2141
|
+
width: `${c - s}%`
|
|
2142
|
+
} }), d("input", { key: "29313d6909d5ff646d7f3810163f5f01fe09cc36", class: x("searchcraft-slider-input", "searchcraft-slider-input-min-handle"), max: this.max, min: this.min, onInput: this.handleStartValueChange.bind(this), step: this.granularity, style: { zIndex: this.lastFocusedHandle === "min" ? "2" : "1" }, type: "range", value: this.startValue }), d("input", { key: "1e95e93a028c7bc204e2f3894bfe8b77ac6c9d28", class: x("searchcraft-slider-input", "searchcraft-slider-input-max-handle"), max: this.max, min: this.min, onInput: this.handleEndValueChange.bind(this), step: this.granularity, style: { zIndex: this.lastFocusedHandle === "max" ? "2" : "1" }, type: "range", value: this.endValue })), d("div", { key: "c1560933a38f3153ac1dbaece041ef75df479dc4", class: "searchcraft-slider-label-container" }, d("span", { key: "638f72b8c081a324cc3ecb833163cd036a6ab90c", class: "searchcraft-slider-label" }, a), d("span", { key: "011968bdf897de9960fe2214b4adceee4d79b6d0", class: "searchcraft-slider-label" }, n)));
|
|
2143
|
+
}
|
|
2144
|
+
static get style() {
|
|
2145
|
+
return ln;
|
|
2146
|
+
}
|
|
2147
|
+
}, [0, "searchcraft-slider", {
|
|
2148
|
+
max: [2],
|
|
2149
|
+
min: [2],
|
|
2150
|
+
granularity: [2],
|
|
2151
|
+
dataType: [1, "data-type"],
|
|
2152
|
+
endValue: [32],
|
|
2153
|
+
startValue: [32],
|
|
2154
|
+
lastFocusedHandle: [32]
|
|
2155
|
+
}]);
|
|
2156
|
+
function Vt() {
|
|
2157
|
+
if (typeof customElements > "u")
|
|
2158
|
+
return;
|
|
2159
|
+
["searchcraft-slider"].forEach((t) => {
|
|
2160
|
+
switch (t) {
|
|
2161
|
+
case "searchcraft-slider":
|
|
2162
|
+
customElements.get(t) || customElements.define(t, Ht);
|
|
2163
|
+
break;
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
const un = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-toggle-button-container{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-body-font-weight);line-height:var(--sc-body-line-height);margin:0;color:var(--sc-content-neutral-primary)}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);margin:0;color:var(--sc-content-neutral-secondary)}.searchcraft-toggle-button-background{transition:background-color 0.2s;background:var(--sc-surface-disabled);border:none;border-radius:16px;cursor:pointer;height:26px;position:relative;width:44px;flex-shrink:0}.searchcraft-toggle-button-background.active{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.05)}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform 0.3s ease;width:18px}.searchcraft-toggle-button-handle.active{transform:translateX(16px)}", dn = un, Wt = /* @__PURE__ */ P(class extends A {
|
|
2168
|
+
constructor() {
|
|
2169
|
+
super(), this.__registerHost(), this.toggleUpdated = M(this, "toggleUpdated", 7), this.handleToggle = async () => {
|
|
2170
|
+
this.isActive = !this.isActive, this.toggleUpdated.emit(this.isActive);
|
|
2171
|
+
}, this.label = "Toggle", this.subLabel = void 0, this.isActive = !1, this.unsubscribe = void 0, this.lastQuery = void 0;
|
|
2172
|
+
}
|
|
2173
|
+
connectedCallback() {
|
|
2174
|
+
this.unsubscribe = z.subscribe((t) => {
|
|
2175
|
+
t.query !== this.lastQuery && t.query.trim().length === 0 && (this.isActive = !1), this.lastQuery = t.query;
|
|
2176
|
+
});
|
|
2177
|
+
}
|
|
2178
|
+
disconnectedCallback() {
|
|
2179
|
+
var t;
|
|
2180
|
+
(t = this.unsubscribe) === null || t === void 0 || t.call(this);
|
|
2181
|
+
}
|
|
2182
|
+
render() {
|
|
2183
|
+
return d("div", { key: "90a7816e1e02125939f3f05a9dbfd94a5f161959", class: "searchcraft-toggle-button-container" }, d("div", { key: "6a3e570ba3d00ccc315cd092d5b1c618c0b23ea2" }, d("p", { key: "41d1d0ab4557c856bb0ed12af8a4b0c81203d6d5", class: "searchcraft-toggle-button-label" }, this.label), this.subLabel && d("p", { key: "ec145b4f655bacec600ac9aa137662f7fed9b7d2", class: "searchcraft-toggle-button-sub-label" }, this.subLabel)), d("button", { key: "226599543806881f306630708eee24e922ff592e", class: x("searchcraft-toggle-button-background", {
|
|
2184
|
+
active: this.isActive
|
|
2185
|
+
}), onClick: this.handleToggle, type: "button" }, d("div", { key: "b83e81e7820705952cfc8c911223e67dfbc0f98d", class: x("searchcraft-toggle-button-handle", {
|
|
2186
|
+
active: this.isActive
|
|
2187
|
+
}) })));
|
|
2188
|
+
}
|
|
2189
|
+
static get style() {
|
|
2190
|
+
return dn;
|
|
2191
|
+
}
|
|
2192
|
+
}, [0, "searchcraft-toggle-button", {
|
|
2193
|
+
label: [1],
|
|
2194
|
+
subLabel: [1, "sub-label"],
|
|
2195
|
+
isActive: [32],
|
|
2196
|
+
unsubscribe: [32],
|
|
2197
|
+
lastQuery: [32]
|
|
2198
|
+
}]);
|
|
2199
|
+
function Gt() {
|
|
2200
|
+
if (typeof customElements > "u")
|
|
2201
|
+
return;
|
|
2202
|
+
["searchcraft-toggle-button"].forEach((t) => {
|
|
2203
|
+
switch (t) {
|
|
2204
|
+
case "searchcraft-toggle-button":
|
|
2205
|
+
customElements.get(t) || customElements.define(t, Wt);
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
const hn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-bold-font-size);font-weight:var(--sc-body-small-bold-font-weight);line-height:var(--sc-body-small-bold-line-height)}", fn = hn, Qt = /* @__PURE__ */ P(class extends A {
|
|
2211
|
+
constructor() {
|
|
2212
|
+
super(), this.__registerHost(), this.searchStore = z.getState(), this.items = [], this.unsubscribe = void 0, this.lastQuery = void 0;
|
|
2213
|
+
}
|
|
2214
|
+
componentDidLoad() {
|
|
2215
|
+
this.unsubscribe = z.subscribe((t) => {
|
|
2216
|
+
this.lastQuery = t.query || "";
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
disconnectedCallback() {
|
|
2220
|
+
var t;
|
|
2221
|
+
(t = this.unsubscribe) === null || t === void 0 || t.call(this);
|
|
2222
|
+
}
|
|
2223
|
+
handleDateRangeChanged(t, r, s) {
|
|
2224
|
+
const c = new Date(r), a = new Date(s);
|
|
2225
|
+
this.searchStore.addRangeValueForIndexField({
|
|
2226
|
+
fieldName: t,
|
|
2227
|
+
value: `${t}:[${c.toISOString()} TO ${a.toISOString()}]`
|
|
2228
|
+
}), this.searchStore.search();
|
|
2229
|
+
}
|
|
2230
|
+
handleNumericRangeChanged(t, r, s) {
|
|
2231
|
+
this.searchStore.addRangeValueForIndexField({
|
|
2232
|
+
fieldName: t,
|
|
2233
|
+
value: `${t}:[${r} TO ${s}]`
|
|
2234
|
+
}), this.searchStore.search();
|
|
2235
|
+
}
|
|
2236
|
+
handleFacetSelectionUpdated(t, r) {
|
|
2237
|
+
r.length > 0 ? this.searchStore.addFacetPathsForIndexField({
|
|
2238
|
+
fieldName: t,
|
|
2239
|
+
value: `${t}: IN [${r.join(" ")}]`
|
|
2240
|
+
}) : this.searchStore.removeFacetPathsForIndexField(t), this.searchStore.search();
|
|
2241
|
+
}
|
|
2242
|
+
handleExactMatchToggleUpdated(t) {
|
|
2243
|
+
this.searchStore.setSearchMode(t ? "normal" : "fuzzy"), this.searchStore.search();
|
|
2244
|
+
}
|
|
2245
|
+
handleMostRecentToggleUpdated(t) {
|
|
2246
|
+
this.searchStore.setSortType(t ? "desc" : "asc"), this.searchStore.search();
|
|
2247
|
+
}
|
|
2248
|
+
/**
|
|
2249
|
+
* Iterate through `items` and render them based on `type`
|
|
2250
|
+
*/
|
|
2251
|
+
render() {
|
|
2252
|
+
return d("div", { key: "45bcbe509465b8fe3720f3a535902906acfac2ea", class: "searchcraft-filter-panel" }, this.items.map((t) => {
|
|
2253
|
+
switch (t.type) {
|
|
2254
|
+
case "dateRange": {
|
|
2255
|
+
const r = t, s = new Date(r.options.minDate).getTime(), c = new Date(r.options.maxDate).getTime(), a = Dt(r.options.granularity);
|
|
2256
|
+
return d("div", { class: "searchcraft-filter-panel-section" }, d("p", { class: "searchcraft-filter-panel-label" }, t.label), d("searchcraft-slider", { min: s, max: c, granularity: a, dataType: "date", onRangeChanged: (n) => {
|
|
2257
|
+
this.handleDateRangeChanged(r.fieldName, n.detail.startValue, n.detail.endValue);
|
|
2258
|
+
} }));
|
|
2259
|
+
}
|
|
2260
|
+
case "numericRange": {
|
|
2261
|
+
const r = t;
|
|
2262
|
+
return d("div", { class: "searchcraft-filter-panel-section" }, d("p", { class: "searchcraft-filter-panel-label" }, t.label), d("searchcraft-slider", { min: r.options.min, max: r.options.max, granularity: r.options.granularity, onRangeChanged: (s) => {
|
|
2263
|
+
this.handleNumericRangeChanged(r.fieldName, s.detail.startValue, s.detail.endValue);
|
|
2264
|
+
} }));
|
|
2265
|
+
}
|
|
2266
|
+
case "facets": {
|
|
2267
|
+
const r = t;
|
|
2268
|
+
return d("div", { class: "searchcraft-filter-panel-section" }, d("p", { class: "searchcraft-filter-panel-label" }, t.label), d("searchcraft-facet-list", { fieldName: r.fieldName, onFacetSelectionUpdated: (s) => {
|
|
2269
|
+
this.handleFacetSelectionUpdated(r.fieldName, s.detail.paths);
|
|
2270
|
+
} }));
|
|
2271
|
+
}
|
|
2272
|
+
case "exactMatchToggle": {
|
|
2273
|
+
const r = t;
|
|
2274
|
+
return d("searchcraft-toggle-button", { label: r.label, subLabel: r.options.subLabel, onToggleUpdated: (s) => {
|
|
2275
|
+
this.handleExactMatchToggleUpdated(s.detail);
|
|
2276
|
+
} });
|
|
2277
|
+
}
|
|
2278
|
+
case "mostRecentToggle": {
|
|
2279
|
+
const r = t;
|
|
2280
|
+
return d("searchcraft-toggle-button", { label: r.label, subLabel: r.options.subLabel, onToggleUpdated: (s) => {
|
|
2281
|
+
this.handleMostRecentToggleUpdated(s.detail);
|
|
2282
|
+
} });
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
}));
|
|
2286
|
+
}
|
|
2287
|
+
static get style() {
|
|
2288
|
+
return fn;
|
|
2289
|
+
}
|
|
2290
|
+
}, [0, "searchcraft-filter-panel", {
|
|
2291
|
+
items: [16],
|
|
2292
|
+
unsubscribe: [32],
|
|
2293
|
+
lastQuery: [32]
|
|
2294
|
+
}]);
|
|
2295
|
+
function pn() {
|
|
2296
|
+
if (typeof customElements > "u")
|
|
2297
|
+
return;
|
|
2298
|
+
["searchcraft-filter-panel", "searchcraft-facet-list", "searchcraft-slider", "searchcraft-toggle-button"].forEach((t) => {
|
|
2299
|
+
switch (t) {
|
|
2300
|
+
case "searchcraft-filter-panel":
|
|
2301
|
+
customElements.get(t) || customElements.define(t, Qt);
|
|
2302
|
+
break;
|
|
2303
|
+
case "searchcraft-facet-list":
|
|
2304
|
+
customElements.get(t) || qt();
|
|
2305
|
+
break;
|
|
2306
|
+
case "searchcraft-slider":
|
|
2307
|
+
customElements.get(t) || Vt();
|
|
2308
|
+
break;
|
|
2309
|
+
case "searchcraft-toggle-button":
|
|
2310
|
+
customElements.get(t) || Gt();
|
|
2311
|
+
break;
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
const gn = Qt, bn = pn, mn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-input-label{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-bold-font-size);font-weight:var(--sc-body-small-bold-font-weight);line-height:var(--sc-body-small-bold-line-height);color:var(--sc-content-neutral-primary);margin-top:4px;margin-bottom:4px}", yn = mn, Jt = /* @__PURE__ */ P(class extends A {
|
|
2316
|
+
constructor() {
|
|
2317
|
+
super(), this.__registerHost(), this.inputLabelClassName = "", this.label = void 0;
|
|
2318
|
+
}
|
|
2319
|
+
render() {
|
|
2320
|
+
return this.label ? d("label", { class: x("searchcraft-input-label", this.inputLabelClassName), htmlFor: "searchcraft-input-id" }, this.label) : null;
|
|
2321
|
+
}
|
|
2322
|
+
static get style() {
|
|
2323
|
+
return yn;
|
|
2324
|
+
}
|
|
2325
|
+
}, [0, "searchcraft-input-label", {
|
|
2326
|
+
inputLabelClassName: [1, "input-label-class-name"],
|
|
2327
|
+
label: [1]
|
|
2328
|
+
}]);
|
|
2329
|
+
function Kt() {
|
|
2330
|
+
if (typeof customElements > "u")
|
|
2331
|
+
return;
|
|
2332
|
+
["searchcraft-input-label"].forEach((t) => {
|
|
2333
|
+
switch (t) {
|
|
2334
|
+
case "searchcraft-input-label":
|
|
2335
|
+
customElements.get(t) || customElements.define(t, Jt);
|
|
2336
|
+
break;
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javascript SDK", En = "Searchcraft", $n = "Apache-2.0", Sn = "dist/index.cjs.js", wn = "dist/index.js", Cn = "dist/types/index.d.ts", kn = "dist/collection/collection-manifest.json", Rn = "dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js", zn = {
|
|
2341
|
+
".": {
|
|
2342
|
+
import: "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js",
|
|
2343
|
+
require: "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.cjs.js",
|
|
2344
|
+
types: "./dist/types/index.d.ts"
|
|
2345
|
+
},
|
|
2346
|
+
"./dist/*": {
|
|
2347
|
+
import: "./dist/*",
|
|
2348
|
+
types: "./dist/*"
|
|
2349
|
+
},
|
|
2350
|
+
"./components": {
|
|
2351
|
+
import: "./dist/components/index.js",
|
|
2352
|
+
types: "./dist/components/index.d.ts"
|
|
2353
|
+
},
|
|
2354
|
+
"./loader": {
|
|
2355
|
+
import: "./dist/loader/index.js",
|
|
2356
|
+
require: "./dist/loader/index.cjs",
|
|
2357
|
+
types: "./dist/loader/index.d.ts"
|
|
2358
|
+
}
|
|
2359
|
+
}, Tn = {
|
|
2360
|
+
type: "git",
|
|
2361
|
+
url: "https://bitbucket.org/madebychalk/searchcraft-javascript-sdks/"
|
|
2362
|
+
}, _n = [
|
|
2363
|
+
"dist/"
|
|
2364
|
+
], An = {
|
|
2365
|
+
build: "stencil build",
|
|
2366
|
+
dev: "stencil build --dev --watch",
|
|
2367
|
+
test: "stencil test --spec --e2e",
|
|
2368
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
2369
|
+
generate: "stencil generate"
|
|
2370
|
+
}, Pn = {
|
|
2371
|
+
classnames: "^2.3.2"
|
|
2372
|
+
}, Dn = {
|
|
2373
|
+
"@searchcraft/core": "*",
|
|
2374
|
+
"@searchcraft/javascript-sdk": "*",
|
|
2375
|
+
"@stencil/core": "^4.7.0",
|
|
2376
|
+
"@stencil/react-output-target": "^0.8.2",
|
|
2377
|
+
"@stencil/sass": "^3.0.12",
|
|
2378
|
+
"@types/node": "^16.18.11",
|
|
2379
|
+
zustand: "^5.0.1"
|
|
2380
|
+
}, tt = {
|
|
2381
|
+
name: vn,
|
|
2382
|
+
private: !1,
|
|
2383
|
+
version: Fn,
|
|
2384
|
+
description: xn,
|
|
2385
|
+
author: En,
|
|
2386
|
+
license: $n,
|
|
2387
|
+
main: Sn,
|
|
2388
|
+
module: wn,
|
|
2389
|
+
types: Cn,
|
|
2390
|
+
collection: kn,
|
|
2391
|
+
"collection:main": "dist/collection/index.js",
|
|
2392
|
+
unpkg: Rn,
|
|
2393
|
+
exports: zn,
|
|
2394
|
+
repository: Tn,
|
|
2395
|
+
files: _n,
|
|
2396
|
+
scripts: An,
|
|
2397
|
+
dependencies: Pn,
|
|
2398
|
+
devDependencies: Dn
|
|
2399
|
+
}, Mn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-input-wrapper{position:relative;display:flex}.searchcraft-input-grid{display:grid;gap:4px 8px}.searchcraft-input-grid-buttonLeft{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-grid-buttonLeft .searchcraft-input-button-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-label-wrapper{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-error-wrapper{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-grid-buttonRight .searchcraft-input-button-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonNone{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-grid-buttonNone .searchcraft-input-button-wrapper{display:none}.searchcraft-input-grid-buttonNone .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-body-font-weight);line-height:var(--sc-body-line-height);background-color:var(--sc-surface-neutral-secondary);border:none;border-radius:var(--sc-input-border-radius);color:var(--sc-content-neutral-primary);outline:none;padding-left:var(--sc-input-padding-left);padding-right:var(--sc-input-padding-right);padding-top:12px;padding-bottom:12px;flex:1}.searchcraft-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input:focus{outline:var(--sc-border-brand) solid 2px}.searchcraft-input:focus::placeholder{opacity:0}.searchcraft-input.error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input.error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-search-icon-wrapper{align-items:center;justify-content:center;display:flex;position:absolute;pointer-events:none;bottom:0;left:0;top:0;width:var(--sc-input-padding-left)}.searchcraft-input-search-icon{pointer-events:none;width:var(--sc-input-search-icon-size);height:var(--sc-input-search-icon-size)}.searchcraft-input-clear-button{all:unset;align-items:center;justify-content:center;cursor:pointer;display:flex;position:absolute;border:none;outline:none;bottom:0;right:0;top:0;width:var(--sc-input-padding-right)}.searchcraft-input-clear-icon{width:var(--sc-input-clear-icon-size);height:var(--sc-input-clear-icon-size)}", Bn = Mn, Yt = /* @__PURE__ */ P(class extends A {
|
|
2400
|
+
constructor() {
|
|
2401
|
+
super(), this.__registerHost(), this.inputCleared = M(this, "inputCleared", 7), this.noResultsReceived = M(this, "noResultsReceived", 7), this.querySubmit = M(this, "querySubmit", 7), this.inputFocus = M(this, "inputFocus", 7), this.inputBlur = M(this, "inputBlur", 7), this.debounceTimeout = null, this.searchStore = z.getState(), this.handleOnInput = (t) => {
|
|
2402
|
+
const r = t.target;
|
|
2403
|
+
if (this.inputValue = r.value, r.value.trim() === "") {
|
|
2404
|
+
this.inputCleared.emit();
|
|
2405
|
+
return;
|
|
2406
|
+
}
|
|
2407
|
+
this.autoSearch && (this.debounceDelay > 0 ? (this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(() => this.performSearch(r.value), this.debounceDelay)) : this.performSearch(r.value));
|
|
2408
|
+
}, this.performSearch = async (t) => {
|
|
2409
|
+
if (t !== z.getState().query) {
|
|
2410
|
+
this.querySubmit.emit(t), this.searchTerm = t.trim(), this.error = !1, this.searchStore.setQuery(this.searchTerm);
|
|
2411
|
+
try {
|
|
2412
|
+
await this.searchStore.search();
|
|
2413
|
+
} catch {
|
|
2414
|
+
this.error = !0, this.inputCleared.emit();
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}, this.handleClearInput = () => {
|
|
2418
|
+
this.inputValue = "", this.debounceTimeout && clearTimeout(this.debounceTimeout), this.searchTerm = "", this.searchStore.setQuery(""), this.searchStore.setSearchResults(null), this.error = !1, this.inputCleared && this.inputCleared.emit();
|
|
2419
|
+
}, this.handleFormSubmit = async (t) => {
|
|
2420
|
+
t.preventDefault(), await this.performSearch(this.searchTerm);
|
|
2421
|
+
}, this.config = void 0, this.autoSearch = !0, this.buttonPlacement = "none", this.buttonLabel = void 0, this.inputLabel = void 0, this.customStyles = {}, this.placeholderValue = "Enter Search", this.searchTerm = "", this.debounceDelay = 0, this.inputValue = this.searchTerm, this.error = !1;
|
|
2422
|
+
}
|
|
2423
|
+
init() {
|
|
2424
|
+
if (this.config) {
|
|
2425
|
+
const t = new Ts(this.config, {
|
|
2426
|
+
sdkName: tt.name,
|
|
2427
|
+
sdkVersion: tt.version
|
|
2428
|
+
});
|
|
2429
|
+
this.searchStore.initialize(t, !0);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
componentDidLoad() {
|
|
2433
|
+
this.init();
|
|
2434
|
+
}
|
|
2435
|
+
onConfigChange() {
|
|
2436
|
+
this.init();
|
|
2437
|
+
}
|
|
2438
|
+
render() {
|
|
2439
|
+
const t = Bs(this.customStyles), r = this.inputValue.length > 0, s = x("searchcraft-input-grid", {
|
|
2440
|
+
"searchcraft-input-grid-buttonLeft": this.buttonPlacement === "left",
|
|
2441
|
+
"searchcraft-input-grid-buttonRight": this.buttonPlacement === "right",
|
|
2442
|
+
"searchcraft-input-grid-buttonNone": this.buttonPlacement === "none"
|
|
2443
|
+
});
|
|
2444
|
+
return d("form", { key: "ac7eeb57d1d06df0be4354f2bb64b36d954d9cac", class: "searchcraft-input-form", onSubmit: this.handleFormSubmit }, d("div", { key: "544156a87b038bd8585ea1c5613fee9f6906c973", class: s }, d("div", { key: "7ff6b5150e440c45eef51f103e41314bd68dbe43", class: "searchcraft-input-button-wrapper" }, d("searchcraft-button", { key: "3b0c6c94485133259dc247905d0bd5b224f74e4e", onButtonClick: this.handleFormSubmit, label: this.buttonLabel })), d("div", { key: "8604e917290120905a92cf948a5a76f52197e882", class: "searchcraft-input-label-wrapper" }, d("searchcraft-input-label", { key: "376e1c3e3b84f683872e118a14da2a229e4b8eb5", label: this.inputLabel })), this.error && d("div", { key: "aa26f0b978e134ca026ea290eb149d6626185ac2", class: "searchcraft-input-error-wrapper" }, d("searchcraft-error-message", { key: "87340701fd0a5fcbd0249d9798a607e920089080", errorMessage: "Please enter a search query." })), d("div", { key: "ebd7c6d07da299a7d2553ccb96fc618222e228df", class: "searchcraft-input-wrapper" }, d("input", { key: "1961a43111858561b4d2e84935b3c47cec45397f", autoComplete: "off", class: "searchcraft-input", onFocus: () => this.inputFocus.emit(), onBlur: () => this.inputBlur.emit(), onInput: (c) => {
|
|
2445
|
+
this.handleOnInput(c);
|
|
2446
|
+
}, placeholder: this.placeholderValue, style: t, type: "text", value: this.inputValue }), d("div", { key: "966ac230dd6946dad185d9f657145ebab76a262a", class: "searchcraft-input-search-icon-wrapper" }, d("svg", { key: "12d139c60fe38055df9ea502c877fb773b38682d", class: "searchcraft-input-search-icon", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "searchcraft-title" }, d("title", { key: "b8eea376073c55c6e0e4bf29d40230f1d2220ce7", id: "searchcraft-title" }, "Searchcraft Search Icon Light"), d("path", { key: "c513ef3b3cea3823e7838ac2574cd5a237e06ef1", d: "M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z", stroke: "#404040", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), r && d("button", { key: "35e056ea1d2530e045c3edae231204f9c490d10b", type: "button", class: "searchcraft-input-clear-button", onClick: this.handleClearInput }, d("svg", { key: "3ab21fc44269d2f13ba91c21d24becd3ea5e2728", class: "searchcraft-input-clear-icon", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "icon-title" }, d("title", { key: "c9c4c5c1a5772cac63e3cf5557cc6e90f0b1a1f1", id: "icon-title" }, "Searchcraft Clear Input Icon Light"), d("path", { key: "36740b841f8ec8e439c8e7fbefd37dafafcf5d00", d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z", stroke: "black", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
|
|
2447
|
+
}
|
|
2448
|
+
static get watchers() {
|
|
2449
|
+
return {
|
|
2450
|
+
config: ["onConfigChange"]
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
static get style() {
|
|
2454
|
+
return Bn;
|
|
2455
|
+
}
|
|
2456
|
+
}, [0, "searchcraft-input-form", {
|
|
2457
|
+
config: [16],
|
|
2458
|
+
autoSearch: [4, "auto-search"],
|
|
2459
|
+
buttonPlacement: [1, "button-placement"],
|
|
2460
|
+
buttonLabel: [1, "button-label"],
|
|
2461
|
+
inputLabel: [1, "input-label"],
|
|
2462
|
+
customStyles: [1, "custom-styles"],
|
|
2463
|
+
placeholderValue: [1, "placeholder-value"],
|
|
2464
|
+
searchTerm: [1, "search-term"],
|
|
2465
|
+
debounceDelay: [2, "debounce-delay"],
|
|
2466
|
+
inputValue: [32],
|
|
2467
|
+
error: [32]
|
|
2468
|
+
}, void 0, {
|
|
2469
|
+
config: ["onConfigChange"]
|
|
2470
|
+
}]);
|
|
2471
|
+
function Ln() {
|
|
2472
|
+
if (typeof customElements > "u")
|
|
2473
|
+
return;
|
|
2474
|
+
["searchcraft-input-form", "searchcraft-button", "searchcraft-error-message", "searchcraft-input-label"].forEach((t) => {
|
|
2475
|
+
switch (t) {
|
|
2476
|
+
case "searchcraft-input-form":
|
|
2477
|
+
customElements.get(t) || customElements.define(t, Yt);
|
|
2478
|
+
break;
|
|
2479
|
+
case "searchcraft-button":
|
|
2480
|
+
customElements.get(t) || Ut();
|
|
2481
|
+
break;
|
|
2482
|
+
case "searchcraft-error-message":
|
|
2483
|
+
customElements.get(t) || Ae();
|
|
2484
|
+
break;
|
|
2485
|
+
case "searchcraft-input-label":
|
|
2486
|
+
customElements.get(t) || Kt();
|
|
2487
|
+
break;
|
|
2488
|
+
}
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
const In = Yt, On = Ln, jn = Jt, Un = Kt, Nn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-results-info-container{border-bottom:1px solid var(--sc-surface-disabled);display:flex;justify-content:flex-start}.searchcraft-results-info-content{color:var(--sc-content-primary);font-family:var(--sc-font-family);font-size:18px;font-weight:600;line-height:20px;margin:0px 0 8px}@media (max-width: 900px){.searchcraft-results-info-content{margin:0;margin-bottom:8px}}", qn = Nn, Xt = /* @__PURE__ */ P(class extends A {
|
|
2492
|
+
constructor() {
|
|
2493
|
+
super(), this.__registerHost(), this.isRequesting = !1, this.resultsCount = 0, this.responseTime = "", this.query = "";
|
|
2494
|
+
}
|
|
2495
|
+
connectedCallback() {
|
|
2496
|
+
this.unsubscribe = z.subscribe((t) => {
|
|
2497
|
+
var r, s, c, a;
|
|
2498
|
+
this.isRequesting = t.isRequesting, this.resultsCount = ((s = (r = t.searchResults) === null || r === void 0 ? void 0 : r.data) === null || s === void 0 ? void 0 : s.count) || 0, this.responseTime = ((((a = (c = t.searchResults) === null || c === void 0 ? void 0 : c.data) === null || a === void 0 ? void 0 : a.time_taken) || 0) * 1e3).toFixed(2), this.query = t.query || "";
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
disconnectedCallback() {
|
|
2502
|
+
this.unsubscribe && this.unsubscribe();
|
|
2503
|
+
}
|
|
2504
|
+
render() {
|
|
2505
|
+
if (!this.query || this.resultsCount === 0)
|
|
2506
|
+
return null;
|
|
2507
|
+
const t = Os(this.resultsCount);
|
|
2508
|
+
return d("div", { class: "searchcraft-results-info-container" }, d("p", { class: "searchcraft-results-info-content" }, t, " results found in ", this.responseTime, "ms"));
|
|
2509
|
+
}
|
|
2510
|
+
static get style() {
|
|
2511
|
+
return qn;
|
|
2512
|
+
}
|
|
2513
|
+
}, [0, "searchcraft-results-info", {
|
|
2514
|
+
isRequesting: [32],
|
|
2515
|
+
resultsCount: [32],
|
|
2516
|
+
responseTime: [32],
|
|
2517
|
+
query: [32]
|
|
2518
|
+
}]);
|
|
2519
|
+
function Hn() {
|
|
2520
|
+
if (typeof customElements > "u")
|
|
2521
|
+
return;
|
|
2522
|
+
["searchcraft-results-info"].forEach((t) => {
|
|
2523
|
+
switch (t) {
|
|
2524
|
+
case "searchcraft-results-info":
|
|
2525
|
+
customElements.get(t) || customElements.define(t, Xt);
|
|
2526
|
+
break;
|
|
2527
|
+
}
|
|
2528
|
+
});
|
|
2529
|
+
}
|
|
2530
|
+
const Vn = Xt, Wn = Hn, Gn = Ht, Qn = Vt, Jn = Wt, Kn = Gt;
|
|
2531
|
+
/**
|
|
2532
|
+
* @license
|
|
2533
|
+
* Copyright 2018 Google LLC
|
|
2534
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2535
|
+
*/
|
|
2536
|
+
const Yn = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), rt = /* @__PURE__ */ new WeakMap(), st = (e, t, r, s, c) => {
|
|
2537
|
+
const a = c == null ? void 0 : c[t];
|
|
2538
|
+
a === void 0 ? (e[t] = r, r == null && t in HTMLElement.prototype && e.removeAttribute(t)) : r !== s && ((n, o, u) => {
|
|
2539
|
+
let i = rt.get(n);
|
|
2540
|
+
i === void 0 && rt.set(n, i = /* @__PURE__ */ new Map());
|
|
2541
|
+
let l = i.get(o);
|
|
2542
|
+
u !== void 0 ? l === void 0 ? (i.set(o, l = { handleEvent: u }), n.addEventListener(o, l)) : l.handleEvent = u : l !== void 0 && (i.delete(o), n.removeEventListener(o, l));
|
|
2543
|
+
})(e, a, r);
|
|
2544
|
+
}, Xn = ({ react: e, tagName: t, elementClass: r, events: s, displayName: c }) => {
|
|
2545
|
+
const a = new Set(Object.keys(s ?? {})), n = e.forwardRef((o, u) => {
|
|
2546
|
+
const i = e.useRef(/* @__PURE__ */ new Map()), l = e.useRef(null), h = {}, f = {};
|
|
2547
|
+
for (const [g, b] of Object.entries(o)) Yn.has(g) ? h[g === "className" ? "class" : g] = b : a.has(g) || g in r.prototype ? f[g] = b : h[g] = b;
|
|
2548
|
+
return e.useLayoutEffect(() => {
|
|
2549
|
+
if (l.current === null) return;
|
|
2550
|
+
const g = /* @__PURE__ */ new Map();
|
|
2551
|
+
for (const b in f) st(l.current, b, o[b], i.current.get(b), s), i.current.delete(b), g.set(b, o[b]);
|
|
2552
|
+
for (const [b, v] of i.current) st(l.current, b, void 0, v, s);
|
|
2553
|
+
i.current = g;
|
|
2554
|
+
}), e.useLayoutEffect(() => {
|
|
2555
|
+
var g;
|
|
2556
|
+
(g = l.current) == null || g.removeAttribute("defer-hydration");
|
|
2557
|
+
}, []), h.suppressHydrationWarning = !0, e.createElement(t, { ...h, ref: e.useCallback((g) => {
|
|
2558
|
+
l.current = g, typeof u == "function" ? u(g) : u !== null && (u.current = g);
|
|
2559
|
+
}, [u]) });
|
|
2560
|
+
});
|
|
2561
|
+
return n.displayName = c ?? r.name, n;
|
|
2562
|
+
}, D = ({
|
|
2563
|
+
defineCustomElement: e,
|
|
2564
|
+
...t
|
|
2565
|
+
}) => (typeof e < "u" && e(), Xn(t)), Zn = /* @__PURE__ */ D({
|
|
2566
|
+
tagName: "searchcraft-base-search-result",
|
|
2567
|
+
elementClass: Ds,
|
|
2568
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2569
|
+
react: _,
|
|
2570
|
+
events: {},
|
|
2571
|
+
defineCustomElement: Ms
|
|
2572
|
+
}), ea = /* @__PURE__ */ D({
|
|
2573
|
+
tagName: "searchcraft-base-search-results",
|
|
2574
|
+
elementClass: Js,
|
|
2575
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2576
|
+
react: _,
|
|
2577
|
+
events: { onNoResults: "noResults" },
|
|
2578
|
+
defineCustomElement: Ks
|
|
2579
|
+
}), ta = /* @__PURE__ */ D({
|
|
2580
|
+
tagName: "searchcraft-button",
|
|
2581
|
+
elementClass: Zs,
|
|
2582
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2583
|
+
react: _,
|
|
2584
|
+
events: { onButtonClick: "buttonClick" },
|
|
2585
|
+
defineCustomElement: en
|
|
2586
|
+
}), ra = /* @__PURE__ */ D({
|
|
2587
|
+
tagName: "searchcraft-error-message",
|
|
2588
|
+
elementClass: tn,
|
|
2589
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2590
|
+
react: _,
|
|
2591
|
+
events: {},
|
|
2592
|
+
defineCustomElement: rn
|
|
2593
|
+
}), sa = /* @__PURE__ */ D({
|
|
2594
|
+
tagName: "searchcraft-facet-list",
|
|
2595
|
+
elementClass: an,
|
|
2596
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2597
|
+
react: _,
|
|
2598
|
+
events: { onFacetSelectionUpdated: "facetSelectionUpdated" },
|
|
2599
|
+
defineCustomElement: cn
|
|
2600
|
+
}), na = /* @__PURE__ */ D({
|
|
2601
|
+
tagName: "searchcraft-filter-panel",
|
|
2602
|
+
elementClass: gn,
|
|
2603
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2604
|
+
react: _,
|
|
2605
|
+
events: {},
|
|
2606
|
+
defineCustomElement: bn
|
|
2607
|
+
}), aa = /* @__PURE__ */ D({
|
|
2608
|
+
tagName: "searchcraft-input-form",
|
|
2609
|
+
elementClass: In,
|
|
2610
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2611
|
+
react: _,
|
|
2612
|
+
events: {
|
|
2613
|
+
onInputCleared: "inputCleared",
|
|
2614
|
+
onNoResultsReceived: "noResultsReceived",
|
|
2615
|
+
onQuerySubmit: "querySubmit",
|
|
2616
|
+
onInputFocus: "inputFocus",
|
|
2617
|
+
onInputBlur: "inputBlur"
|
|
2618
|
+
},
|
|
2619
|
+
defineCustomElement: On
|
|
2620
|
+
}), ca = /* @__PURE__ */ D({
|
|
2621
|
+
tagName: "searchcraft-input-label",
|
|
2622
|
+
elementClass: jn,
|
|
2623
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2624
|
+
react: _,
|
|
2625
|
+
events: {},
|
|
2626
|
+
defineCustomElement: Un
|
|
2627
|
+
}), ia = /* @__PURE__ */ D({
|
|
2628
|
+
tagName: "searchcraft-results-info",
|
|
2629
|
+
elementClass: Vn,
|
|
2630
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2631
|
+
react: _,
|
|
2632
|
+
events: {},
|
|
2633
|
+
defineCustomElement: Wn
|
|
2634
|
+
}), oa = /* @__PURE__ */ D({
|
|
2635
|
+
tagName: "searchcraft-slider",
|
|
2636
|
+
elementClass: Gn,
|
|
2637
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2638
|
+
react: _,
|
|
2639
|
+
events: { onRangeChanged: "rangeChanged" },
|
|
2640
|
+
defineCustomElement: Qn
|
|
2641
|
+
}), la = /* @__PURE__ */ D({
|
|
2642
|
+
tagName: "searchcraft-toggle-button",
|
|
2643
|
+
elementClass: Jn,
|
|
2644
|
+
// @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
|
|
2645
|
+
react: _,
|
|
2646
|
+
events: { onToggleUpdated: "toggleUpdated" },
|
|
2647
|
+
defineCustomElement: Kn
|
|
2648
|
+
}), $a = (e) => /* @__PURE__ */ T(Zn, { ...e }), Sa = (e) => /* @__PURE__ */ T(ea, { ...e }), wa = (e) => /* @__PURE__ */ T(ta, { ...e }), Ca = (e) => /* @__PURE__ */ T(ra, { ...e }), ka = (e) => /* @__PURE__ */ T(sa, { ...e }), Ra = (e) => /* @__PURE__ */ T(na, { ...e }), za = (e) => /* @__PURE__ */ T(aa, { ...e }), Ta = (e) => /* @__PURE__ */ T(ca, { ...e }), _a = (e) => /* @__PURE__ */ T(ia, { ...e }), Aa = (e) => /* @__PURE__ */ T(oa, { ...e }), Pa = (e) => /* @__PURE__ */ T(la, { ...e });
|
|
806
2649
|
export {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
b as useTheme
|
|
2650
|
+
$a as SearchcraftBaseSearchResult,
|
|
2651
|
+
Sa as SearchcraftBaseSearchResults,
|
|
2652
|
+
wa as SearchcraftButton,
|
|
2653
|
+
Ca as SearchcraftErrorMessage,
|
|
2654
|
+
ka as SearchcraftFacetList,
|
|
2655
|
+
Ra as SearchcraftFilterPanel,
|
|
2656
|
+
za as SearchcraftInputForm,
|
|
2657
|
+
Ta as SearchcraftInputLabel,
|
|
2658
|
+
_a as SearchcraftResultsInfo,
|
|
2659
|
+
Aa as SearchcraftSlider,
|
|
2660
|
+
Pa as SearchcraftToggleButton
|
|
819
2661
|
};
|
|
820
2662
|
//# sourceMappingURL=index.js.map
|