@searchstax-inc/searchstudio-ux-react 4.1.0 → 4.1.9
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/CHANGELOG.md +37 -15
- package/README.md +2 -1
- package/README.mustache +1 -1
- package/dist/@searchstax-inc/searchstudio-ux-react.cjs +29 -29
- package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +27 -27
- package/dist/@searchstax-inc/searchstudio-ux-react.mjs +612 -554
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ti, { useState as
|
|
2
|
-
var
|
|
1
|
+
import ti, { useState as V, useEffect as we, useRef as ai, createRef as Ts } from "react";
|
|
2
|
+
var pa = { exports: {} }, rt = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -9,11 +9,11 @@ var ga = { exports: {} }, rt = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var as;
|
|
13
13
|
function si() {
|
|
14
|
-
if (
|
|
14
|
+
if (as)
|
|
15
15
|
return rt;
|
|
16
|
-
|
|
16
|
+
as = 1;
|
|
17
17
|
var i = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
18
18
|
function t(s, a, r) {
|
|
19
19
|
var o = null;
|
|
@@ -43,14 +43,14 @@ var nt = {};
|
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
var
|
|
46
|
+
var ss;
|
|
47
47
|
function ii() {
|
|
48
|
-
return
|
|
48
|
+
return ss || (ss = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
49
|
function i(y) {
|
|
50
50
|
if (y == null)
|
|
51
51
|
return null;
|
|
52
52
|
if (typeof y == "function")
|
|
53
|
-
return y.$$typeof ===
|
|
53
|
+
return y.$$typeof === xe ? null : y.displayName || y.name || null;
|
|
54
54
|
if (typeof y == "string")
|
|
55
55
|
return y;
|
|
56
56
|
switch (y) {
|
|
@@ -75,9 +75,9 @@ function ii() {
|
|
|
75
75
|
return "Portal";
|
|
76
76
|
case P:
|
|
77
77
|
return (y.displayName || "Context") + ".Provider";
|
|
78
|
-
case E:
|
|
79
|
-
return (y._context.displayName || "Context") + ".Consumer";
|
|
80
78
|
case A:
|
|
79
|
+
return (y._context.displayName || "Context") + ".Consumer";
|
|
80
|
+
case E:
|
|
81
81
|
var S = y.render;
|
|
82
82
|
return y = y.displayName, y || (y = S.displayName || S.name || "", y = y !== "" ? "ForwardRef(" + y + ")" : "ForwardRef"), y;
|
|
83
83
|
case T:
|
|
@@ -103,8 +103,8 @@ function ii() {
|
|
|
103
103
|
}
|
|
104
104
|
if (S) {
|
|
105
105
|
S = console;
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var B = S.error, D = typeof Symbol == "function" && Symbol.toStringTag && y[Symbol.toStringTag] || y.constructor.name || "Object";
|
|
107
|
+
return B.call(
|
|
108
108
|
S,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
110
|
D
|
|
@@ -131,7 +131,7 @@ function ii() {
|
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
133
|
function o(y) {
|
|
134
|
-
if (
|
|
134
|
+
if (ce.call(y, "key")) {
|
|
135
135
|
var S = Object.getOwnPropertyDescriptor(y, "key").get;
|
|
136
136
|
if (S && S.isReactWarning)
|
|
137
137
|
return !1;
|
|
@@ -139,14 +139,14 @@ function ii() {
|
|
|
139
139
|
return y.key !== void 0;
|
|
140
140
|
}
|
|
141
141
|
function n(y, S) {
|
|
142
|
-
function
|
|
142
|
+
function B() {
|
|
143
143
|
Mt || (Mt = !0, console.error(
|
|
144
144
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
145
145
|
S
|
|
146
146
|
));
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
get:
|
|
148
|
+
B.isReactWarning = !0, Object.defineProperty(y, "key", {
|
|
149
|
+
get: B,
|
|
150
150
|
configurable: !0
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -156,14 +156,14 @@ function ii() {
|
|
|
156
156
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
157
157
|
)), y = this.props.ref, y !== void 0 ? y : null;
|
|
158
158
|
}
|
|
159
|
-
function c(y, S,
|
|
160
|
-
return
|
|
159
|
+
function c(y, S, B, D, de, F, Ce, De) {
|
|
160
|
+
return B = F.ref, y = {
|
|
161
161
|
$$typeof: L,
|
|
162
162
|
type: y,
|
|
163
163
|
key: S,
|
|
164
164
|
props: F,
|
|
165
165
|
_owner: de
|
|
166
|
-
}, (
|
|
166
|
+
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(y, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
get: l
|
|
169
169
|
}) : Object.defineProperty(y, "ref", { enumerable: !1, value: null }), y._store = {}, Object.defineProperty(y._store, "validated", {
|
|
@@ -188,7 +188,7 @@ function ii() {
|
|
|
188
188
|
value: De
|
|
189
189
|
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
|
|
190
190
|
}
|
|
191
|
-
function g(y, S,
|
|
191
|
+
function g(y, S, B, D, de, F, Ce, De) {
|
|
192
192
|
var J = S.children;
|
|
193
193
|
if (J !== void 0)
|
|
194
194
|
if (D)
|
|
@@ -202,12 +202,12 @@ function ii() {
|
|
|
202
202
|
);
|
|
203
203
|
else
|
|
204
204
|
m(J);
|
|
205
|
-
if (
|
|
205
|
+
if (ce.call(S, "key")) {
|
|
206
206
|
J = i(y);
|
|
207
|
-
var
|
|
207
|
+
var be = Object.keys(S).filter(function(Tt) {
|
|
208
208
|
return Tt !== "key";
|
|
209
209
|
});
|
|
210
|
-
D = 0 <
|
|
210
|
+
D = 0 < be.length ? "{key: someKey, " + be.join(": ..., ") + ": ...}" : "{key: someKey}", kt[J + D] || (be = 0 < be.length ? "{" + be.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
211
211
|
`A props object containing a "key" prop is being spread into JSX:
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s {...props} />
|
|
@@ -216,18 +216,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
216
216
|
<%s key={someKey} {...props} />`,
|
|
217
217
|
D,
|
|
218
218
|
J,
|
|
219
|
-
|
|
219
|
+
be,
|
|
220
220
|
J
|
|
221
221
|
), kt[J + D] = !0);
|
|
222
222
|
}
|
|
223
|
-
if (J = null,
|
|
224
|
-
|
|
225
|
-
for (var
|
|
226
|
-
|
|
223
|
+
if (J = null, B !== void 0 && (t(B), J = "" + B), o(S) && (t(S.key), J = "" + S.key), "key" in S) {
|
|
224
|
+
B = {};
|
|
225
|
+
for (var We in S)
|
|
226
|
+
We !== "key" && (B[We] = S[We]);
|
|
227
227
|
} else
|
|
228
|
-
|
|
228
|
+
B = S;
|
|
229
229
|
return J && n(
|
|
230
|
-
|
|
230
|
+
B,
|
|
231
231
|
typeof y == "function" ? y.displayName || y.name || "Unknown" : y
|
|
232
232
|
), c(
|
|
233
233
|
y,
|
|
@@ -235,7 +235,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
235
|
F,
|
|
236
236
|
de,
|
|
237
237
|
a(),
|
|
238
|
-
|
|
238
|
+
B,
|
|
239
239
|
Ce,
|
|
240
240
|
De
|
|
241
241
|
);
|
|
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
243
|
function m(y) {
|
|
244
244
|
typeof y == "object" && y !== null && y.$$typeof === L && y._store && (y._store.validated = 1);
|
|
245
245
|
}
|
|
246
|
-
var p = ti, L = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"),
|
|
246
|
+
var p = ti, L = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), P = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), Y = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), Z = Symbol.for("react.activity"), xe = Symbol.for("react.client.reference"), W = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ce = Object.prototype.hasOwnProperty, Re = Array.isArray, ve = console.createTask ? console.createTask : function() {
|
|
247
247
|
return null;
|
|
248
248
|
};
|
|
249
249
|
p = {
|
|
@@ -254,37 +254,37 @@ React keys must be passed directly to JSX without using spread:
|
|
|
254
254
|
var Mt, Ct = {}, St = p.react_stack_bottom_frame.bind(
|
|
255
255
|
p,
|
|
256
256
|
r
|
|
257
|
-
)(), at =
|
|
258
|
-
nt.Fragment = f, nt.jsx = function(y, S,
|
|
257
|
+
)(), at = ve(s(r)), kt = {};
|
|
258
|
+
nt.Fragment = f, nt.jsx = function(y, S, B, D, de) {
|
|
259
259
|
var F = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
260
260
|
return g(
|
|
261
261
|
y,
|
|
262
262
|
S,
|
|
263
|
-
|
|
263
|
+
B,
|
|
264
264
|
!1,
|
|
265
265
|
D,
|
|
266
266
|
de,
|
|
267
267
|
F ? Error("react-stack-top-frame") : St,
|
|
268
|
-
F ?
|
|
268
|
+
F ? ve(s(y)) : at
|
|
269
269
|
);
|
|
270
|
-
}, nt.jsxs = function(y, S,
|
|
270
|
+
}, nt.jsxs = function(y, S, B, D, de) {
|
|
271
271
|
var F = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
272
272
|
return g(
|
|
273
273
|
y,
|
|
274
274
|
S,
|
|
275
|
-
|
|
275
|
+
B,
|
|
276
276
|
!0,
|
|
277
277
|
D,
|
|
278
278
|
de,
|
|
279
279
|
F ? Error("react-stack-top-frame") : St,
|
|
280
|
-
F ?
|
|
280
|
+
F ? ve(s(y)) : at
|
|
281
281
|
);
|
|
282
282
|
};
|
|
283
283
|
}()), nt;
|
|
284
284
|
}
|
|
285
|
-
process.env.NODE_ENV === "production" ?
|
|
286
|
-
var u =
|
|
287
|
-
function
|
|
285
|
+
process.env.NODE_ENV === "production" ? pa.exports = si() : pa.exports = ii();
|
|
286
|
+
var u = pa.exports, ri = Object.defineProperty, ni = (i, e, t) => e in i ? ri(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, h = (i, e, t) => (ni(i, typeof e != "symbol" ? e + "" : e, t), t), U = /* @__PURE__ */ ((i) => (i[i.mustache = 0] = "mustache", i[i.vue = 1] = "vue", i[i.react = 2] = "react", i[i.angular = 3] = "angular", i))(U || {});
|
|
287
|
+
function ja() {
|
|
288
288
|
return {
|
|
289
289
|
async: !1,
|
|
290
290
|
breaks: !1,
|
|
@@ -298,9 +298,9 @@ function Ta() {
|
|
|
298
298
|
walkTokens: null
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
var
|
|
301
|
+
var _e = ja();
|
|
302
302
|
function js(i) {
|
|
303
|
-
|
|
303
|
+
_e = i;
|
|
304
304
|
}
|
|
305
305
|
var Lt = { exec: () => null };
|
|
306
306
|
function _(i, e = "") {
|
|
@@ -308,13 +308,13 @@ function _(i, e = "") {
|
|
|
308
308
|
const s = {
|
|
309
309
|
replace: (a, r) => {
|
|
310
310
|
let o = typeof r == "string" ? r : r.source;
|
|
311
|
-
return o = o.replace(
|
|
311
|
+
return o = o.replace(re.caret, "$1"), t = t.replace(a, o), s;
|
|
312
312
|
},
|
|
313
313
|
getRegex: () => new RegExp(t, e)
|
|
314
314
|
};
|
|
315
315
|
return s;
|
|
316
316
|
}
|
|
317
|
-
var
|
|
317
|
+
var re = {
|
|
318
318
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
319
319
|
outputLinkReplace: /\\([\[\]])/g,
|
|
320
320
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -371,10 +371,10 @@ var ie = {
|
|
|
371
371
|
fencesBeginRegex: (i) => new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:\`\`\`|~~~)`),
|
|
372
372
|
headingBeginRegex: (i) => new RegExp(`^ {0,${Math.min(3, i - 1)}}#`),
|
|
373
373
|
htmlBeginRegex: (i) => new RegExp(`^ {0,${Math.min(3, i - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
374
|
-
}, oi = /^(?:[ \t]*(?:\n|$))+/, li = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ci = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, vt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
|
|
374
|
+
}, oi = /^(?:[ \t]*(?:\n|$))+/, li = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ci = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, vt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ea = /(?:[*+-]|\d{1,9}[.)])/, Es = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, As = _(Es).replace(/bull/g, Ea).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ui = _(Es).replace(/bull/g, Ea).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Aa = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, di = /^[^\n]+/, Ia = /(?!\s*\])(?:\\.|[^\[\]\\])+/, gi = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ia).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), pi = _(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ea).getRegex(), Ut = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ra = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mi = _(
|
|
375
375
|
"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
|
|
376
376
|
"i"
|
|
377
|
-
).replace("comment",
|
|
377
|
+
).replace("comment", Ra).replace("tag", Ut).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Is = _(Aa).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ut).getRegex(), fi = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Is).getRegex(), Na = {
|
|
378
378
|
blockquote: fi,
|
|
379
379
|
code: li,
|
|
380
380
|
def: gi,
|
|
@@ -382,37 +382,37 @@ var ie = {
|
|
|
382
382
|
heading: hi,
|
|
383
383
|
hr: vt,
|
|
384
384
|
html: mi,
|
|
385
|
-
lheading:
|
|
385
|
+
lheading: As,
|
|
386
386
|
list: pi,
|
|
387
387
|
newline: oi,
|
|
388
388
|
paragraph: Is,
|
|
389
389
|
table: Lt,
|
|
390
390
|
text: di
|
|
391
|
-
},
|
|
391
|
+
}, is = _(
|
|
392
392
|
"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
|
|
393
393
|
).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ut).getRegex(), Li = {
|
|
394
|
-
...
|
|
394
|
+
...Na,
|
|
395
395
|
lheading: ui,
|
|
396
|
-
table:
|
|
397
|
-
paragraph: _(Aa).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table",
|
|
396
|
+
table: is,
|
|
397
|
+
paragraph: _(Aa).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", is).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ut).getRegex()
|
|
398
398
|
}, yi = {
|
|
399
|
-
...
|
|
399
|
+
...Na,
|
|
400
400
|
html: _(
|
|
401
401
|
`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
|
|
402
|
-
).replace("comment",
|
|
402
|
+
).replace("comment", Ra).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
403
403
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
404
404
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
405
405
|
fences: Lt,
|
|
406
406
|
// fences not supported
|
|
407
407
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
408
408
|
paragraph: _(Aa).replace("hr", vt).replace("heading", ` *#{1,6} *[^
|
|
409
|
-
]`).replace("lheading",
|
|
410
|
-
}, wi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, xi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rs = /^( {2,}|\\)\n(?!\s*$)/, vi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yt = /[\p{P}\p{S}]/u,
|
|
409
|
+
]`).replace("lheading", As).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
410
|
+
}, wi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, xi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rs = /^( {2,}|\\)\n(?!\s*$)/, vi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Yt = /[\p{P}\p{S}]/u, Da = /[\s\p{P}\p{S}]/u, Ns = /[^\s\p{P}\p{S}]/u, bi = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Da).getRegex(), Ds = /(?!~)[\p{P}\p{S}]/u, Mi = /(?!~)[\s\p{P}\p{S}]/u, Ci = /(?:[^\s\p{P}\p{S}]|~)/u, Si = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Os = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ki = _(Os, "u").replace(/punct/g, Yt).getRegex(), Ti = _(Os, "u").replace(/punct/g, Ds).getRegex(), Ps = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ji = _(Ps, "gu").replace(/notPunctSpace/g, Ns).replace(/punctSpace/g, Da).replace(/punct/g, Yt).getRegex(), Ei = _(Ps, "gu").replace(/notPunctSpace/g, Ci).replace(/punctSpace/g, Mi).replace(/punct/g, Ds).getRegex(), Ai = _(
|
|
411
411
|
"^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
|
|
412
412
|
"gu"
|
|
413
|
-
).replace(/notPunctSpace/g, Ns).replace(/punctSpace/g,
|
|
413
|
+
).replace(/notPunctSpace/g, Ns).replace(/punctSpace/g, Da).replace(/punct/g, Yt).getRegex(), Ii = _(/\\(punct)/, "gu").replace(/punct/g, Yt).getRegex(), Ri = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ni = _(Ra).replace("(?:-->|$)", "-->").getRegex(), Di = _(
|
|
414
414
|
"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
|
|
415
|
-
).replace("comment", Ni).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),
|
|
415
|
+
).replace("comment", Ni).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Vt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Oi = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Fs = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Vt).replace("ref", Ia).getRegex(), $s = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ia).getRegex(), Pi = _("reflink|nolink(?!\\()", "g").replace("reflink", Fs).replace("nolink", $s).getRegex(), Oa = {
|
|
416
416
|
_backpedal: Lt,
|
|
417
417
|
// only used for GFM url
|
|
418
418
|
anyPunctuation: Ii,
|
|
@@ -423,7 +423,7 @@ var ie = {
|
|
|
423
423
|
del: Lt,
|
|
424
424
|
emStrongLDelim: ki,
|
|
425
425
|
emStrongRDelimAst: ji,
|
|
426
|
-
emStrongRDelimUnd:
|
|
426
|
+
emStrongRDelimUnd: Ai,
|
|
427
427
|
escape: wi,
|
|
428
428
|
link: Oi,
|
|
429
429
|
nolink: $s,
|
|
@@ -434,28 +434,28 @@ var ie = {
|
|
|
434
434
|
text: vi,
|
|
435
435
|
url: Lt
|
|
436
436
|
}, Fi = {
|
|
437
|
-
...
|
|
438
|
-
link: _(/^!?\[(label)\]\((.*?)\)/).replace("label",
|
|
439
|
-
reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",
|
|
440
|
-
},
|
|
441
|
-
...
|
|
442
|
-
emStrongRDelimAst:
|
|
437
|
+
...Oa,
|
|
438
|
+
link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Vt).getRegex(),
|
|
439
|
+
reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Vt).getRegex()
|
|
440
|
+
}, ma = {
|
|
441
|
+
...Oa,
|
|
442
|
+
emStrongRDelimAst: Ei,
|
|
443
443
|
emStrongLDelim: Ti,
|
|
444
444
|
url: _(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
445
445
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
446
446
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
447
447
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
448
448
|
}, $i = {
|
|
449
|
-
...
|
|
449
|
+
...ma,
|
|
450
450
|
br: _(Rs).replace("{2,}", "*").getRegex(),
|
|
451
|
-
text: _(
|
|
451
|
+
text: _(ma.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
452
452
|
}, Ot = {
|
|
453
|
-
normal:
|
|
453
|
+
normal: Na,
|
|
454
454
|
gfm: Li,
|
|
455
455
|
pedantic: yi
|
|
456
456
|
}, ot = {
|
|
457
|
-
normal:
|
|
458
|
-
gfm:
|
|
457
|
+
normal: Oa,
|
|
458
|
+
gfm: ma,
|
|
459
459
|
breaks: $i,
|
|
460
460
|
pedantic: Fi
|
|
461
461
|
}, zi = {
|
|
@@ -464,31 +464,31 @@ var ie = {
|
|
|
464
464
|
">": ">",
|
|
465
465
|
'"': """,
|
|
466
466
|
"'": "'"
|
|
467
|
-
},
|
|
467
|
+
}, rs = (i) => zi[i];
|
|
468
468
|
function Me(i, e) {
|
|
469
469
|
if (e) {
|
|
470
|
-
if (
|
|
471
|
-
return i.replace(
|
|
472
|
-
} else if (
|
|
473
|
-
return i.replace(
|
|
470
|
+
if (re.escapeTest.test(i))
|
|
471
|
+
return i.replace(re.escapeReplace, rs);
|
|
472
|
+
} else if (re.escapeTestNoEncode.test(i))
|
|
473
|
+
return i.replace(re.escapeReplaceNoEncode, rs);
|
|
474
474
|
return i;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function ns(i) {
|
|
477
477
|
try {
|
|
478
|
-
i = encodeURI(i).replace(
|
|
478
|
+
i = encodeURI(i).replace(re.percentDecode, "%");
|
|
479
479
|
} catch {
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
482
|
return i;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function os(i, e) {
|
|
485
485
|
var t;
|
|
486
|
-
const s = i.replace(
|
|
486
|
+
const s = i.replace(re.findPipe, (o, n, l) => {
|
|
487
487
|
let c = !1, g = n;
|
|
488
488
|
for (; --g >= 0 && l[g] === "\\"; )
|
|
489
489
|
c = !c;
|
|
490
490
|
return c ? "|" : " |";
|
|
491
|
-
}), a = s.split(
|
|
491
|
+
}), a = s.split(re.splitPipe);
|
|
492
492
|
let r = 0;
|
|
493
493
|
if (a[0].trim() || a.shift(), a.length > 0 && !((t = a.at(-1)) != null && t.trim()) && a.pop(), e)
|
|
494
494
|
if (a.length > e)
|
|
@@ -497,7 +497,7 @@ function ns(i, e) {
|
|
|
497
497
|
for (; a.length < e; )
|
|
498
498
|
a.push("");
|
|
499
499
|
for (; r < a.length; r++)
|
|
500
|
-
a[r] = a[r].trim().replace(
|
|
500
|
+
a[r] = a[r].trim().replace(re.slashPipe, "|");
|
|
501
501
|
return a;
|
|
502
502
|
}
|
|
503
503
|
function lt(i, e, t) {
|
|
@@ -529,7 +529,7 @@ function _i(i, e) {
|
|
|
529
529
|
return s;
|
|
530
530
|
return t > 0 ? -2 : -1;
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function ls(i, e, t, s, a) {
|
|
533
533
|
const r = e.href, o = e.title || null, n = i[1].replace(a.other.outputLinkReplace, "$1");
|
|
534
534
|
s.state.inLink = !0;
|
|
535
535
|
const l = {
|
|
@@ -557,10 +557,10 @@ function Wi(i, e, t) {
|
|
|
557
557
|
}).join(`
|
|
558
558
|
`);
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var Bt = class {
|
|
561
561
|
// set by the lexer
|
|
562
562
|
constructor(i) {
|
|
563
|
-
h(this, "options"), h(this, "rules"), h(this, "lexer"), this.options = i ||
|
|
563
|
+
h(this, "options"), h(this, "rules"), h(this, "lexer"), this.options = i || _e;
|
|
564
564
|
}
|
|
565
565
|
space(i) {
|
|
566
566
|
const e = this.rules.block.newline.exec(i);
|
|
@@ -700,18 +700,18 @@ ${g}` : g;
|
|
|
700
700
|
`, 1)[0], L = !m.trim(), w = 0;
|
|
701
701
|
if (this.options.pedantic ? (w = 2, g = m.trimStart()) : L ? w = e[1].length + 1 : (w = e[2].search(this.rules.other.nonSpaceChar), w = w > 4 ? 1 : w, g = m.slice(w), w += e[1].length), L && this.rules.other.blankLine.test(p) && (c += p + `
|
|
702
702
|
`, i = i.substring(p.length + 1), l = !0), !l) {
|
|
703
|
-
const k = this.rules.other.nextBulletRegex(w),
|
|
703
|
+
const k = this.rules.other.nextBulletRegex(w), A = this.rules.other.hrRegex(w), P = this.rules.other.fencesBeginRegex(w), E = this.rules.other.headingBeginRegex(w), N = this.rules.other.htmlBeginRegex(w);
|
|
704
704
|
for (; i; ) {
|
|
705
705
|
const Y = i.split(`
|
|
706
706
|
`, 1)[0];
|
|
707
707
|
let T;
|
|
708
|
-
if (p = Y, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), T = p) : T = p.replace(this.rules.other.tabCharGlobal, " "), P.test(p) ||
|
|
708
|
+
if (p = Y, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), T = p) : T = p.replace(this.rules.other.tabCharGlobal, " "), P.test(p) || E.test(p) || N.test(p) || k.test(p) || A.test(p))
|
|
709
709
|
break;
|
|
710
710
|
if (T.search(this.rules.other.nonSpaceChar) >= w || !p.trim())
|
|
711
711
|
g += `
|
|
712
712
|
` + T.slice(w);
|
|
713
713
|
else {
|
|
714
|
-
if (L || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(m) ||
|
|
714
|
+
if (L || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(m) || E.test(m) || A.test(m))
|
|
715
715
|
break;
|
|
716
716
|
g += `
|
|
717
717
|
` + p;
|
|
@@ -778,7 +778,7 @@ ${g}` : g;
|
|
|
778
778
|
const t = this.rules.block.table.exec(i);
|
|
779
779
|
if (!t || !this.rules.other.tableDelimiter.test(t[2]))
|
|
780
780
|
return;
|
|
781
|
-
const s =
|
|
781
|
+
const s = os(t[1]), a = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = (e = t[3]) != null && e.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
782
782
|
`) : [], o = {
|
|
783
783
|
type: "table",
|
|
784
784
|
raw: t[0],
|
|
@@ -797,7 +797,7 @@ ${g}` : g;
|
|
|
797
797
|
align: o.align[n]
|
|
798
798
|
});
|
|
799
799
|
for (const n of r)
|
|
800
|
-
o.rows.push(
|
|
800
|
+
o.rows.push(os(n, o.header.length).map((l, c) => ({
|
|
801
801
|
text: l,
|
|
802
802
|
tokens: this.lexer.inline(l),
|
|
803
803
|
header: !1,
|
|
@@ -886,7 +886,7 @@ ${g}` : g;
|
|
|
886
886
|
r && (s = r[1], a = r[3]);
|
|
887
887
|
} else
|
|
888
888
|
a = e[3] ? e[3].slice(1, -1) : "";
|
|
889
|
-
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
889
|
+
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? s = s.slice(1) : s = s.slice(1, -1)), ls(e, {
|
|
890
890
|
href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
891
891
|
title: a && a.replace(this.rules.inline.anyPunctuation, "$1")
|
|
892
892
|
}, e[0], this.lexer, this.rules);
|
|
@@ -904,7 +904,7 @@ ${g}` : g;
|
|
|
904
904
|
text: r
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
return
|
|
907
|
+
return ls(t, a, t[0], this.lexer, this.rules);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
emStrong(i, e, t = "") {
|
|
@@ -1036,15 +1036,15 @@ ${g}` : g;
|
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
},
|
|
1039
|
+
}, Ae = class fa {
|
|
1040
1040
|
constructor(e) {
|
|
1041
|
-
h(this, "tokens"), h(this, "options"), h(this, "state"), h(this, "tokenizer"), h(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
1041
|
+
h(this, "tokens"), h(this, "options"), h(this, "state"), h(this, "tokenizer"), h(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || _e, this.options.tokenizer = this.options.tokenizer || new Bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1042
1042
|
inLink: !1,
|
|
1043
1043
|
inRawBlock: !1,
|
|
1044
1044
|
top: !0
|
|
1045
1045
|
};
|
|
1046
1046
|
const t = {
|
|
1047
|
-
other:
|
|
1047
|
+
other: re,
|
|
1048
1048
|
block: Ot.normal,
|
|
1049
1049
|
inline: ot.normal
|
|
1050
1050
|
};
|
|
@@ -1063,19 +1063,19 @@ ${g}` : g;
|
|
|
1063
1063
|
* Static Lex Method
|
|
1064
1064
|
*/
|
|
1065
1065
|
static lex(e, t) {
|
|
1066
|
-
return new
|
|
1066
|
+
return new fa(t).lex(e);
|
|
1067
1067
|
}
|
|
1068
1068
|
/**
|
|
1069
1069
|
* Static Lex Inline Method
|
|
1070
1070
|
*/
|
|
1071
1071
|
static lexInline(e, t) {
|
|
1072
|
-
return new
|
|
1072
|
+
return new fa(t).inlineTokens(e);
|
|
1073
1073
|
}
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Preprocessing
|
|
1076
1076
|
*/
|
|
1077
1077
|
lex(e) {
|
|
1078
|
-
e = e.replace(
|
|
1078
|
+
e = e.replace(re.carriageReturn, `
|
|
1079
1079
|
`), this.blockTokens(e, this.tokens);
|
|
1080
1080
|
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
1081
1081
|
const s = this.inlineQueue[t];
|
|
@@ -1085,7 +1085,7 @@ ${g}` : g;
|
|
|
1085
1085
|
}
|
|
1086
1086
|
blockTokens(e, t = [], s = !1) {
|
|
1087
1087
|
var a, r, o;
|
|
1088
|
-
for (this.options.pedantic && (e = e.replace(
|
|
1088
|
+
for (this.options.pedantic && (e = e.replace(re.tabCharGlobal, " ").replace(re.spaceLine, "")); e; ) {
|
|
1089
1089
|
let n;
|
|
1090
1090
|
if ((r = (a = this.options.extensions) == null ? void 0 : a.block) != null && r.some((c) => (n = c.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))
|
|
1091
1091
|
continue;
|
|
@@ -1275,17 +1275,17 @@ ${g}` : g;
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return t;
|
|
1277
1277
|
}
|
|
1278
|
-
},
|
|
1278
|
+
}, Ht = class {
|
|
1279
1279
|
// set by the parser
|
|
1280
1280
|
constructor(i) {
|
|
1281
|
-
h(this, "options"), h(this, "parser"), this.options = i ||
|
|
1281
|
+
h(this, "options"), h(this, "parser"), this.options = i || _e;
|
|
1282
1282
|
}
|
|
1283
1283
|
space(i) {
|
|
1284
1284
|
return "";
|
|
1285
1285
|
}
|
|
1286
1286
|
code({ text: i, lang: e, escaped: t }) {
|
|
1287
1287
|
var s;
|
|
1288
|
-
const a = (s = (e || "").match(
|
|
1288
|
+
const a = (s = (e || "").match(re.notSpaceStart)) == null ? void 0 : s[0], r = i.replace(re.endingNewline, "") + `
|
|
1289
1289
|
`;
|
|
1290
1290
|
return a ? '<pre><code class="language-' + Me(a) + '">' + (t ? r : Me(r, !0)) + `</code></pre>
|
|
1291
1291
|
` : "<pre><code>" + (t ? r : Me(r, !0)) + `</code></pre>
|
|
@@ -1389,7 +1389,7 @@ ${i}</tr>
|
|
|
1389
1389
|
return `<del>${this.parser.parseInline(i)}</del>`;
|
|
1390
1390
|
}
|
|
1391
1391
|
link({ href: i, title: e, tokens: t }) {
|
|
1392
|
-
const s = this.parser.parseInline(t), a =
|
|
1392
|
+
const s = this.parser.parseInline(t), a = ns(i);
|
|
1393
1393
|
if (a === null)
|
|
1394
1394
|
return s;
|
|
1395
1395
|
i = a;
|
|
@@ -1398,7 +1398,7 @@ ${i}</tr>
|
|
|
1398
1398
|
}
|
|
1399
1399
|
image({ href: i, title: e, text: t, tokens: s }) {
|
|
1400
1400
|
s && (t = this.parser.parseInline(s, this.parser.textRenderer));
|
|
1401
|
-
const a =
|
|
1401
|
+
const a = ns(i);
|
|
1402
1402
|
if (a === null)
|
|
1403
1403
|
return Me(t);
|
|
1404
1404
|
i = a;
|
|
@@ -1408,7 +1408,7 @@ ${i}</tr>
|
|
|
1408
1408
|
text(i) {
|
|
1409
1409
|
return "tokens" in i && i.tokens ? this.parser.parseInline(i.tokens) : "escaped" in i && i.escaped ? i.text : Me(i.text);
|
|
1410
1410
|
}
|
|
1411
|
-
},
|
|
1411
|
+
}, Pa = class {
|
|
1412
1412
|
// no need for block level renderers
|
|
1413
1413
|
strong({ text: i }) {
|
|
1414
1414
|
return i;
|
|
@@ -1437,21 +1437,21 @@ ${i}</tr>
|
|
|
1437
1437
|
br() {
|
|
1438
1438
|
return "";
|
|
1439
1439
|
}
|
|
1440
|
-
}, Ie = class
|
|
1440
|
+
}, Ie = class La {
|
|
1441
1441
|
constructor(e) {
|
|
1442
|
-
h(this, "options"), h(this, "renderer"), h(this, "textRenderer"), this.options = e ||
|
|
1442
|
+
h(this, "options"), h(this, "renderer"), h(this, "textRenderer"), this.options = e || _e, this.options.renderer = this.options.renderer || new Ht(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Pa();
|
|
1443
1443
|
}
|
|
1444
1444
|
/**
|
|
1445
1445
|
* Static Parse Method
|
|
1446
1446
|
*/
|
|
1447
1447
|
static parse(e, t) {
|
|
1448
|
-
return new
|
|
1448
|
+
return new La(t).parse(e);
|
|
1449
1449
|
}
|
|
1450
1450
|
/**
|
|
1451
1451
|
* Static Parse Inline Method
|
|
1452
1452
|
*/
|
|
1453
1453
|
static parseInline(e, t) {
|
|
1454
|
-
return new
|
|
1454
|
+
return new La(t).parseInline(e);
|
|
1455
1455
|
}
|
|
1456
1456
|
/**
|
|
1457
1457
|
* Parse Loop
|
|
@@ -1598,7 +1598,7 @@ ${i}</tr>
|
|
|
1598
1598
|
}
|
|
1599
1599
|
}, ia, zt = (ia = class {
|
|
1600
1600
|
constructor(i) {
|
|
1601
|
-
h(this, "options"), h(this, "block"), this.options = i ||
|
|
1601
|
+
h(this, "options"), h(this, "block"), this.options = i || _e;
|
|
1602
1602
|
}
|
|
1603
1603
|
/**
|
|
1604
1604
|
* Process markdown before marked
|
|
@@ -1622,7 +1622,7 @@ ${i}</tr>
|
|
|
1622
1622
|
* Provide function to tokenize markdown
|
|
1623
1623
|
*/
|
|
1624
1624
|
provideLexer() {
|
|
1625
|
-
return this.block ?
|
|
1625
|
+
return this.block ? Ae.lex : Ae.lexInline;
|
|
1626
1626
|
}
|
|
1627
1627
|
/**
|
|
1628
1628
|
* Provide function to parse tokens
|
|
@@ -1634,9 +1634,9 @@ ${i}</tr>
|
|
|
1634
1634
|
"preprocess",
|
|
1635
1635
|
"postprocess",
|
|
1636
1636
|
"processAllTokens"
|
|
1637
|
-
])), ia),
|
|
1637
|
+
])), ia), Qi = class {
|
|
1638
1638
|
constructor(...i) {
|
|
1639
|
-
h(this, "defaults",
|
|
1639
|
+
h(this, "defaults", ja()), h(this, "options", this.setOptions), h(this, "parse", this.parseMarkdown(!0)), h(this, "parseInline", this.parseMarkdown(!1)), h(this, "Parser", Ie), h(this, "Renderer", Ht), h(this, "TextRenderer", Pa), h(this, "Lexer", Ae), h(this, "Tokenizer", Bt), h(this, "Hooks", zt), this.use(...i);
|
|
1640
1640
|
}
|
|
1641
1641
|
/**
|
|
1642
1642
|
* Run callback for every token
|
|
@@ -1692,7 +1692,7 @@ ${i}</tr>
|
|
|
1692
1692
|
}
|
|
1693
1693
|
"childTokens" in a && a.childTokens && (e.childTokens[a.name] = a.childTokens);
|
|
1694
1694
|
}), s.extensions = e), t.renderer) {
|
|
1695
|
-
const a = this.defaults.renderer || new
|
|
1695
|
+
const a = this.defaults.renderer || new Ht(this.defaults);
|
|
1696
1696
|
for (const r in t.renderer) {
|
|
1697
1697
|
if (!(r in a))
|
|
1698
1698
|
throw new Error(`renderer '${r}' does not exist`);
|
|
@@ -1707,7 +1707,7 @@ ${i}</tr>
|
|
|
1707
1707
|
s.renderer = a;
|
|
1708
1708
|
}
|
|
1709
1709
|
if (t.tokenizer) {
|
|
1710
|
-
const a = this.defaults.tokenizer || new
|
|
1710
|
+
const a = this.defaults.tokenizer || new Bt(this.defaults);
|
|
1711
1711
|
for (const r in t.tokenizer) {
|
|
1712
1712
|
if (!(r in a))
|
|
1713
1713
|
throw new Error(`tokenizer '${r}' does not exist`);
|
|
@@ -1755,7 +1755,7 @@ ${i}</tr>
|
|
|
1755
1755
|
return this.defaults = { ...this.defaults, ...i }, this;
|
|
1756
1756
|
}
|
|
1757
1757
|
lexer(i, e) {
|
|
1758
|
-
return
|
|
1758
|
+
return Ae.lex(i, e ?? this.defaults);
|
|
1759
1759
|
}
|
|
1760
1760
|
parser(i, e) {
|
|
1761
1761
|
return Ie.parse(i, e ?? this.defaults);
|
|
@@ -1770,7 +1770,7 @@ ${i}</tr>
|
|
|
1770
1770
|
if (typeof e != "string")
|
|
1771
1771
|
return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1772
1772
|
a.hooks && (a.hooks.options = a, a.hooks.block = i);
|
|
1773
|
-
const o = a.hooks ? a.hooks.provideLexer() : i ?
|
|
1773
|
+
const o = a.hooks ? a.hooks.provideLexer() : i ? Ae.lex : Ae.lexInline, n = a.hooks ? a.hooks.provideParser() : i ? Ie.parse : Ie.parseInline;
|
|
1774
1774
|
if (a.async)
|
|
1775
1775
|
return Promise.resolve(a.hooks ? a.hooks.preprocess(e) : e).then((l) => o(l, a)).then((l) => a.hooks ? a.hooks.processAllTokens(l) : l).then((l) => a.walkTokens ? Promise.all(this.walkTokens(l, a.walkTokens)).then(() => l) : l).then((l) => n(l, a)).then((l) => a.hooks ? a.hooks.postprocess(l) : l).catch(r);
|
|
1776
1776
|
try {
|
|
@@ -1796,29 +1796,29 @@ Please report this to https://github.com/markedjs/marked.`, i) {
|
|
|
1796
1796
|
throw t;
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
|
-
},
|
|
1799
|
+
}, ze = new Qi();
|
|
1800
1800
|
function z(i, e) {
|
|
1801
|
-
return
|
|
1801
|
+
return ze.parse(i, e);
|
|
1802
1802
|
}
|
|
1803
1803
|
z.options = z.setOptions = function(i) {
|
|
1804
|
-
return
|
|
1804
|
+
return ze.setOptions(i), z.defaults = ze.defaults, js(z.defaults), z;
|
|
1805
1805
|
};
|
|
1806
|
-
z.getDefaults =
|
|
1807
|
-
z.defaults =
|
|
1806
|
+
z.getDefaults = ja;
|
|
1807
|
+
z.defaults = _e;
|
|
1808
1808
|
z.use = function(...i) {
|
|
1809
|
-
return
|
|
1809
|
+
return ze.use(...i), z.defaults = ze.defaults, js(z.defaults), z;
|
|
1810
1810
|
};
|
|
1811
1811
|
z.walkTokens = function(i, e) {
|
|
1812
|
-
return
|
|
1812
|
+
return ze.walkTokens(i, e);
|
|
1813
1813
|
};
|
|
1814
|
-
z.parseInline =
|
|
1814
|
+
z.parseInline = ze.parseInline;
|
|
1815
1815
|
z.Parser = Ie;
|
|
1816
1816
|
z.parser = Ie.parse;
|
|
1817
|
-
z.Renderer =
|
|
1818
|
-
z.TextRenderer =
|
|
1819
|
-
z.Lexer =
|
|
1820
|
-
z.lexer =
|
|
1821
|
-
z.Tokenizer =
|
|
1817
|
+
z.Renderer = Ht;
|
|
1818
|
+
z.TextRenderer = Pa;
|
|
1819
|
+
z.Lexer = Ae;
|
|
1820
|
+
z.lexer = Ae.lex;
|
|
1821
|
+
z.Tokenizer = Bt;
|
|
1822
1822
|
z.Hooks = zt;
|
|
1823
1823
|
z.parse = z;
|
|
1824
1824
|
z.options;
|
|
@@ -1827,60 +1827,64 @@ z.use;
|
|
|
1827
1827
|
z.walkTokens;
|
|
1828
1828
|
z.parseInline;
|
|
1829
1829
|
Ie.parse;
|
|
1830
|
-
|
|
1831
|
-
/*! @license DOMPurify 3.2.
|
|
1830
|
+
Ae.lex;
|
|
1831
|
+
/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
|
|
1832
1832
|
const {
|
|
1833
1833
|
entries: zs,
|
|
1834
|
-
setPrototypeOf:
|
|
1835
|
-
isFrozen:
|
|
1836
|
-
getPrototypeOf:
|
|
1837
|
-
getOwnPropertyDescriptor:
|
|
1834
|
+
setPrototypeOf: cs,
|
|
1835
|
+
isFrozen: Vi,
|
|
1836
|
+
getPrototypeOf: Bi,
|
|
1837
|
+
getOwnPropertyDescriptor: Hi
|
|
1838
1838
|
} = Object;
|
|
1839
1839
|
let {
|
|
1840
|
-
freeze:
|
|
1840
|
+
freeze: ne,
|
|
1841
1841
|
seal: ue,
|
|
1842
1842
|
create: _s
|
|
1843
1843
|
} = Object, {
|
|
1844
|
-
apply:
|
|
1845
|
-
construct:
|
|
1844
|
+
apply: ya,
|
|
1845
|
+
construct: wa
|
|
1846
1846
|
} = typeof Reflect < "u" && Reflect;
|
|
1847
|
-
|
|
1847
|
+
ne || (ne = function(i) {
|
|
1848
1848
|
return i;
|
|
1849
1849
|
});
|
|
1850
1850
|
ue || (ue = function(i) {
|
|
1851
1851
|
return i;
|
|
1852
1852
|
});
|
|
1853
|
-
La || (La = function(i, e, t) {
|
|
1854
|
-
return i.apply(e, t);
|
|
1855
|
-
});
|
|
1856
1853
|
ya || (ya = function(i, e) {
|
|
1857
|
-
|
|
1854
|
+
for (var t = arguments.length, s = new Array(t > 2 ? t - 2 : 0), a = 2; a < t; a++)
|
|
1855
|
+
s[a - 2] = arguments[a];
|
|
1856
|
+
return i.apply(e, s);
|
|
1857
|
+
});
|
|
1858
|
+
wa || (wa = function(i) {
|
|
1859
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
|
|
1860
|
+
t[s - 1] = arguments[s];
|
|
1861
|
+
return new i(...t);
|
|
1858
1862
|
});
|
|
1859
|
-
const Pt =
|
|
1860
|
-
function
|
|
1863
|
+
const Pt = oe(Array.prototype.forEach), qi = oe(Array.prototype.lastIndexOf), hs = oe(Array.prototype.pop), ct = oe(Array.prototype.push), Ui = oe(Array.prototype.splice), _t = oe(String.prototype.toLowerCase), ra = oe(String.prototype.toString), na = oe(String.prototype.match), ht = oe(String.prototype.replace), Yi = oe(String.prototype.indexOf), Ji = oe(String.prototype.trim), me = oe(Object.prototype.hasOwnProperty), se = oe(RegExp.prototype.test), ut = Gi(TypeError);
|
|
1864
|
+
function oe(i) {
|
|
1861
1865
|
return function(e) {
|
|
1862
1866
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
1863
1867
|
for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
|
|
1864
1868
|
s[a - 1] = arguments[a];
|
|
1865
|
-
return
|
|
1869
|
+
return ya(i, e, s);
|
|
1866
1870
|
};
|
|
1867
1871
|
}
|
|
1868
1872
|
function Gi(i) {
|
|
1869
1873
|
return function() {
|
|
1870
1874
|
for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
|
|
1871
1875
|
t[s] = arguments[s];
|
|
1872
|
-
return
|
|
1876
|
+
return wa(i, t);
|
|
1873
1877
|
};
|
|
1874
1878
|
}
|
|
1875
1879
|
function I(i, e) {
|
|
1876
1880
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
|
|
1877
|
-
|
|
1881
|
+
cs && cs(i, null);
|
|
1878
1882
|
let s = e.length;
|
|
1879
1883
|
for (; s--; ) {
|
|
1880
1884
|
let a = e[s];
|
|
1881
1885
|
if (typeof a == "string") {
|
|
1882
1886
|
const r = t(a);
|
|
1883
|
-
r !== a && (
|
|
1887
|
+
r !== a && (Vi(e) || (e[s] = r), a = r);
|
|
1884
1888
|
}
|
|
1885
1889
|
i[a] = !0;
|
|
1886
1890
|
}
|
|
@@ -1888,45 +1892,45 @@ function I(i, e) {
|
|
|
1888
1892
|
}
|
|
1889
1893
|
function Ki(i) {
|
|
1890
1894
|
for (let e = 0; e < i.length; e++)
|
|
1891
|
-
|
|
1895
|
+
me(i, e) || (i[e] = null);
|
|
1892
1896
|
return i;
|
|
1893
1897
|
}
|
|
1894
1898
|
function je(i) {
|
|
1895
1899
|
const e = _s(null);
|
|
1896
1900
|
for (const [t, s] of zs(i))
|
|
1897
|
-
|
|
1901
|
+
me(i, t) && (Array.isArray(s) ? e[t] = Ki(s) : s && typeof s == "object" && s.constructor === Object ? e[t] = je(s) : e[t] = s);
|
|
1898
1902
|
return e;
|
|
1899
1903
|
}
|
|
1900
1904
|
function dt(i, e) {
|
|
1901
1905
|
for (; i !== null; ) {
|
|
1902
|
-
const s =
|
|
1906
|
+
const s = Hi(i, e);
|
|
1903
1907
|
if (s) {
|
|
1904
1908
|
if (s.get)
|
|
1905
|
-
return
|
|
1909
|
+
return oe(s.get);
|
|
1906
1910
|
if (typeof s.value == "function")
|
|
1907
|
-
return
|
|
1911
|
+
return oe(s.value);
|
|
1908
1912
|
}
|
|
1909
|
-
i =
|
|
1913
|
+
i = Bi(i);
|
|
1910
1914
|
}
|
|
1911
1915
|
function t() {
|
|
1912
1916
|
return null;
|
|
1913
1917
|
}
|
|
1914
1918
|
return t;
|
|
1915
1919
|
}
|
|
1916
|
-
const us =
|
|
1920
|
+
const us = ne(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), oa = ne(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), la = ne(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Zi = ne(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ca = ne(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xi = ne(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ds = ne(["#text"]), gs = ne(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), ha = ne(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ps = ne(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ft = ne(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), er = ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm), tr = ue(/<%[\w\W]*|[\w\W]*%>/gm), ar = ue(/\$\{[\w\W]*/gm), sr = ue(/^data-[\-\w.\u00B7-\uFFFF]+$/), ir = ue(/^aria-[\-\w]+$/), Ws = ue(
|
|
1917
1921
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1918
1922
|
// eslint-disable-line no-useless-escape
|
|
1919
1923
|
), rr = ue(/^(?:\w+script|data):/i), nr = ue(
|
|
1920
1924
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
1921
1925
|
// eslint-disable-line no-control-regex
|
|
1922
|
-
),
|
|
1926
|
+
), Qs = ue(/^html$/i), or = ue(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
1923
1927
|
var ms = /* @__PURE__ */ Object.freeze({
|
|
1924
1928
|
__proto__: null,
|
|
1925
1929
|
ARIA_ATTR: ir,
|
|
1926
1930
|
ATTR_WHITESPACE: nr,
|
|
1927
1931
|
CUSTOM_ELEMENT: or,
|
|
1928
1932
|
DATA_ATTR: sr,
|
|
1929
|
-
DOCTYPE_NAME:
|
|
1933
|
+
DOCTYPE_NAME: Qs,
|
|
1930
1934
|
ERB_EXPR: tr,
|
|
1931
1935
|
IS_ALLOWED_URI: Ws,
|
|
1932
1936
|
IS_SCRIPT_OR_DATA: rr,
|
|
@@ -1983,10 +1987,10 @@ const gt = {
|
|
|
1983
1987
|
uponSanitizeShadowNode: []
|
|
1984
1988
|
};
|
|
1985
1989
|
};
|
|
1986
|
-
function
|
|
1990
|
+
function Vs() {
|
|
1987
1991
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : lr();
|
|
1988
|
-
const e = (d) =>
|
|
1989
|
-
if (e.version = "3.2.
|
|
1992
|
+
const e = (d) => Vs(d);
|
|
1993
|
+
if (e.version = "3.2.7", e.removed = [], !i || !i.document || i.document.nodeType !== gt.document || !i.Element)
|
|
1990
1994
|
return e.isSupported = !1, e;
|
|
1991
1995
|
let {
|
|
1992
1996
|
document: t
|
|
@@ -2001,26 +2005,26 @@ function Qs() {
|
|
|
2001
2005
|
HTMLFormElement: m,
|
|
2002
2006
|
DOMParser: p,
|
|
2003
2007
|
trustedTypes: L
|
|
2004
|
-
} = i, w = l.prototype, f = dt(w, "cloneNode"), x = dt(w, "remove"), k = dt(w, "nextSibling"),
|
|
2008
|
+
} = i, w = l.prototype, f = dt(w, "cloneNode"), x = dt(w, "remove"), k = dt(w, "nextSibling"), A = dt(w, "childNodes"), P = dt(w, "parentNode");
|
|
2005
2009
|
if (typeof o == "function") {
|
|
2006
2010
|
const d = t.createElement("template");
|
|
2007
2011
|
d.content && d.content.ownerDocument && (t = d.content.ownerDocument);
|
|
2008
2012
|
}
|
|
2009
|
-
let
|
|
2013
|
+
let E, N = "";
|
|
2010
2014
|
const {
|
|
2011
2015
|
implementation: Y,
|
|
2012
2016
|
createNodeIterator: T,
|
|
2013
2017
|
createDocumentFragment: $,
|
|
2014
2018
|
getElementsByTagName: Z
|
|
2015
2019
|
} = t, {
|
|
2016
|
-
importNode:
|
|
2020
|
+
importNode: xe
|
|
2017
2021
|
} = s;
|
|
2018
2022
|
let W = fs();
|
|
2019
2023
|
e.isSupported = typeof zs == "function" && typeof P == "function" && Y && Y.createHTMLDocument !== void 0;
|
|
2020
2024
|
const {
|
|
2021
|
-
MUSTACHE_EXPR:
|
|
2025
|
+
MUSTACHE_EXPR: ce,
|
|
2022
2026
|
ERB_EXPR: Re,
|
|
2023
|
-
TMPLIT_EXPR:
|
|
2027
|
+
TMPLIT_EXPR: ve,
|
|
2024
2028
|
DATA_ATTR: Mt,
|
|
2025
2029
|
ARIA_ATTR: Ct,
|
|
2026
2030
|
IS_SCRIPT_OR_DATA: St,
|
|
@@ -2030,9 +2034,9 @@ function Qs() {
|
|
|
2030
2034
|
let {
|
|
2031
2035
|
IS_ALLOWED_URI: y
|
|
2032
2036
|
} = ms, S = null;
|
|
2033
|
-
const
|
|
2037
|
+
const B = I({}, [...us, ...oa, ...la, ...ca, ...ds]);
|
|
2034
2038
|
let D = null;
|
|
2035
|
-
const de = I({}, [...gs, ...
|
|
2039
|
+
const de = I({}, [...gs, ...ha, ...ps, ...Ft]);
|
|
2036
2040
|
let F = Object.seal(_s(null, {
|
|
2037
2041
|
tagNameCheck: {
|
|
2038
2042
|
writable: !0,
|
|
@@ -2052,45 +2056,45 @@ function Qs() {
|
|
|
2052
2056
|
enumerable: !0,
|
|
2053
2057
|
value: !1
|
|
2054
2058
|
}
|
|
2055
|
-
})), Ce = null, De = null, J = !0,
|
|
2056
|
-
const
|
|
2057
|
-
let Kt = !0, st = !1,
|
|
2058
|
-
const
|
|
2059
|
-
let
|
|
2059
|
+
})), Ce = null, De = null, J = !0, be = !0, We = !1, Tt = !0, Qe = !1, jt = !0, Oe = !1, Jt = !1, Gt = !1, Ve = !1, Et = !1, At = !1, za = !0, _a = !1;
|
|
2060
|
+
const qs = "user-content-";
|
|
2061
|
+
let Kt = !0, st = !1, Be = {}, He = null;
|
|
2062
|
+
const Wa = I({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
2063
|
+
let Qa = null;
|
|
2060
2064
|
const Va = I({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
2061
2065
|
let Zt = null;
|
|
2062
|
-
const
|
|
2066
|
+
const Ba = I({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), It = "http://www.w3.org/1998/Math/MathML", Rt = "http://www.w3.org/2000/svg", Se = "http://www.w3.org/1999/xhtml";
|
|
2063
2067
|
let qe = Se, Xt = !1, ea = null;
|
|
2064
2068
|
const Us = I({}, [It, Rt, Se], ra);
|
|
2065
2069
|
let Nt = I({}, ["mi", "mo", "mn", "ms", "mtext"]), Dt = I({}, ["annotation-xml"]);
|
|
2066
2070
|
const Ys = I({}, ["title", "style", "font", "a", "script"]);
|
|
2067
2071
|
let it = null;
|
|
2068
2072
|
const Js = ["application/xhtml+xml", "text/html"], Gs = "text/html";
|
|
2069
|
-
let X = null,
|
|
2073
|
+
let X = null, Ue = null;
|
|
2070
2074
|
const Ks = t.createElement("form"), Ha = function(d) {
|
|
2071
2075
|
return d instanceof RegExp || d instanceof Function;
|
|
2072
2076
|
}, ta = function() {
|
|
2073
2077
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2074
|
-
if (!(
|
|
2078
|
+
if (!(Ue && Ue === d)) {
|
|
2075
2079
|
if ((!d || typeof d != "object") && (d = {}), d = je(d), it = // eslint-disable-next-line unicorn/prefer-includes
|
|
2076
|
-
Js.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Gs : d.PARSER_MEDIA_TYPE, X = it === "application/xhtml+xml" ? ra : _t, S =
|
|
2080
|
+
Js.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Gs : d.PARSER_MEDIA_TYPE, X = it === "application/xhtml+xml" ? ra : _t, S = me(d, "ALLOWED_TAGS") ? I({}, d.ALLOWED_TAGS, X) : B, D = me(d, "ALLOWED_ATTR") ? I({}, d.ALLOWED_ATTR, X) : de, ea = me(d, "ALLOWED_NAMESPACES") ? I({}, d.ALLOWED_NAMESPACES, ra) : Us, Zt = me(d, "ADD_URI_SAFE_ATTR") ? I(je(Ba), d.ADD_URI_SAFE_ATTR, X) : Ba, Qa = me(d, "ADD_DATA_URI_TAGS") ? I(je(Va), d.ADD_DATA_URI_TAGS, X) : Va, He = me(d, "FORBID_CONTENTS") ? I({}, d.FORBID_CONTENTS, X) : Wa, Ce = me(d, "FORBID_TAGS") ? I({}, d.FORBID_TAGS, X) : je({}), De = me(d, "FORBID_ATTR") ? I({}, d.FORBID_ATTR, X) : je({}), Be = me(d, "USE_PROFILES") ? d.USE_PROFILES : !1, J = d.ALLOW_ARIA_ATTR !== !1, be = d.ALLOW_DATA_ATTR !== !1, We = d.ALLOW_UNKNOWN_PROTOCOLS || !1, Tt = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Qe = d.SAFE_FOR_TEMPLATES || !1, jt = d.SAFE_FOR_XML !== !1, Oe = d.WHOLE_DOCUMENT || !1, Ve = d.RETURN_DOM || !1, Et = d.RETURN_DOM_FRAGMENT || !1, At = d.RETURN_TRUSTED_TYPE || !1, Gt = d.FORCE_BODY || !1, za = d.SANITIZE_DOM !== !1, _a = d.SANITIZE_NAMED_PROPS || !1, Kt = d.KEEP_CONTENT !== !1, st = d.IN_PLACE || !1, y = d.ALLOWED_URI_REGEXP || Ws, qe = d.NAMESPACE || Se, Nt = d.MATHML_TEXT_INTEGRATION_POINTS || Nt, Dt = d.HTML_INTEGRATION_POINTS || Dt, F = d.CUSTOM_ELEMENT_HANDLING || {}, d.CUSTOM_ELEMENT_HANDLING && Ha(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (F.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && Ha(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (F.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Qe && (be = !1), Et && (Ve = !0), Be && (S = I({}, ds), D = [], Be.html === !0 && (I(S, us), I(D, gs)), Be.svg === !0 && (I(S, oa), I(D, ha), I(D, Ft)), Be.svgFilters === !0 && (I(S, la), I(D, ha), I(D, Ft)), Be.mathMl === !0 && (I(S, ca), I(D, ps), I(D, Ft))), d.ADD_TAGS && (S === B && (S = je(S)), I(S, d.ADD_TAGS, X)), d.ADD_ATTR && (D === de && (D = je(D)), I(D, d.ADD_ATTR, X)), d.ADD_URI_SAFE_ATTR && I(Zt, d.ADD_URI_SAFE_ATTR, X), d.FORBID_CONTENTS && (He === Wa && (He = je(He)), I(He, d.FORBID_CONTENTS, X)), Kt && (S["#text"] = !0), Oe && I(S, ["html", "head", "body"]), S.table && (I(S, ["tbody"]), delete Ce.tbody), d.TRUSTED_TYPES_POLICY) {
|
|
2077
2081
|
if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2078
2082
|
throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2079
2083
|
if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
2080
2084
|
throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
2081
|
-
|
|
2085
|
+
E = d.TRUSTED_TYPES_POLICY, N = E.createHTML("");
|
|
2082
2086
|
} else
|
|
2083
|
-
|
|
2084
|
-
|
|
2087
|
+
E === void 0 && (E = cr(L, a)), E !== null && typeof N == "string" && (N = E.createHTML(""));
|
|
2088
|
+
ne && ne(d), Ue = d;
|
|
2085
2089
|
}
|
|
2086
|
-
}, qa = I({}, [...
|
|
2090
|
+
}, qa = I({}, [...oa, ...la, ...Zi]), Ua = I({}, [...ca, ...Xi]), Zs = function(d) {
|
|
2087
2091
|
let M = P(d);
|
|
2088
2092
|
(!M || !M.tagName) && (M = {
|
|
2089
2093
|
namespaceURI: qe,
|
|
2090
2094
|
tagName: "template"
|
|
2091
2095
|
});
|
|
2092
|
-
const v = _t(d.tagName),
|
|
2093
|
-
return ea[d.namespaceURI] ? d.namespaceURI === Rt ? M.namespaceURI === Se ? v === "svg" : M.namespaceURI === It ? v === "svg" && (
|
|
2096
|
+
const v = _t(d.tagName), Q = _t(M.tagName);
|
|
2097
|
+
return ea[d.namespaceURI] ? d.namespaceURI === Rt ? M.namespaceURI === Se ? v === "svg" : M.namespaceURI === It ? v === "svg" && (Q === "annotation-xml" || Nt[Q]) : !!qa[v] : d.namespaceURI === It ? M.namespaceURI === Se ? v === "math" : M.namespaceURI === Rt ? v === "math" && Dt[Q] : !!Ua[v] : d.namespaceURI === Se ? M.namespaceURI === Rt && !Dt[Q] || M.namespaceURI === It && !Nt[Q] ? !1 : !Ua[v] && (Ys[v] || !qa[v]) : !!(it === "application/xhtml+xml" && ea[d.namespaceURI]) : !1;
|
|
2094
2098
|
}, Pe = function(d) {
|
|
2095
2099
|
ct(e.removed, {
|
|
2096
2100
|
element: d
|
|
@@ -2100,7 +2104,7 @@ function Qs() {
|
|
|
2100
2104
|
} catch {
|
|
2101
2105
|
x(d);
|
|
2102
2106
|
}
|
|
2103
|
-
},
|
|
2107
|
+
}, Fe = function(d, M) {
|
|
2104
2108
|
try {
|
|
2105
2109
|
ct(e.removed, {
|
|
2106
2110
|
attribute: M.getAttributeNode(d),
|
|
@@ -2113,7 +2117,7 @@ function Qs() {
|
|
|
2113
2117
|
});
|
|
2114
2118
|
}
|
|
2115
2119
|
if (M.removeAttribute(d), d === "is")
|
|
2116
|
-
if (Ve ||
|
|
2120
|
+
if (Ve || Et)
|
|
2117
2121
|
try {
|
|
2118
2122
|
Pe(M);
|
|
2119
2123
|
} catch {
|
|
@@ -2123,31 +2127,31 @@ function Qs() {
|
|
|
2123
2127
|
M.setAttribute(d, "");
|
|
2124
2128
|
} catch {
|
|
2125
2129
|
}
|
|
2126
|
-
},
|
|
2130
|
+
}, Ya = function(d) {
|
|
2127
2131
|
let M = null, v = null;
|
|
2128
2132
|
if (Gt)
|
|
2129
2133
|
d = "<remove></remove>" + d;
|
|
2130
2134
|
else {
|
|
2131
|
-
const
|
|
2132
|
-
v =
|
|
2135
|
+
const q = na(d, /^[\r\n\t ]+/);
|
|
2136
|
+
v = q && q[0];
|
|
2133
2137
|
}
|
|
2134
2138
|
it === "application/xhtml+xml" && qe === Se && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
|
|
2135
|
-
const
|
|
2139
|
+
const Q = E ? E.createHTML(d) : d;
|
|
2136
2140
|
if (qe === Se)
|
|
2137
2141
|
try {
|
|
2138
|
-
M = new p().parseFromString(
|
|
2142
|
+
M = new p().parseFromString(Q, it);
|
|
2139
2143
|
} catch {
|
|
2140
2144
|
}
|
|
2141
2145
|
if (!M || !M.documentElement) {
|
|
2142
2146
|
M = Y.createDocument(qe, "template", null);
|
|
2143
2147
|
try {
|
|
2144
|
-
M.documentElement.innerHTML = Xt ? N :
|
|
2148
|
+
M.documentElement.innerHTML = Xt ? N : Q;
|
|
2145
2149
|
} catch {
|
|
2146
2150
|
}
|
|
2147
2151
|
}
|
|
2148
2152
|
const ee = M.body || M.documentElement;
|
|
2149
2153
|
return d && v && ee.insertBefore(t.createTextNode(v), ee.childNodes[0] || null), qe === Se ? Z.call(M, Oe ? "html" : "body")[0] : Oe ? M.documentElement : ee;
|
|
2150
|
-
},
|
|
2154
|
+
}, Ja = function(d) {
|
|
2151
2155
|
return T.call(
|
|
2152
2156
|
d.ownerDocument || d,
|
|
2153
2157
|
d,
|
|
@@ -2157,15 +2161,15 @@ function Qs() {
|
|
|
2157
2161
|
);
|
|
2158
2162
|
}, aa = function(d) {
|
|
2159
2163
|
return d instanceof m && (typeof d.nodeName != "string" || typeof d.textContent != "string" || typeof d.removeChild != "function" || !(d.attributes instanceof g) || typeof d.removeAttribute != "function" || typeof d.setAttribute != "function" || typeof d.namespaceURI != "string" || typeof d.insertBefore != "function" || typeof d.hasChildNodes != "function");
|
|
2160
|
-
},
|
|
2164
|
+
}, Ga = function(d) {
|
|
2161
2165
|
return typeof n == "function" && d instanceof n;
|
|
2162
2166
|
};
|
|
2163
2167
|
function ke(d, M, v) {
|
|
2164
|
-
Pt(d, (
|
|
2165
|
-
|
|
2168
|
+
Pt(d, (Q) => {
|
|
2169
|
+
Q.call(e, M, v, Ue);
|
|
2166
2170
|
});
|
|
2167
2171
|
}
|
|
2168
|
-
const
|
|
2172
|
+
const Ka = function(d) {
|
|
2169
2173
|
let M = null;
|
|
2170
2174
|
if (ke(W.beforeSanitizeElements, d, null), aa(d))
|
|
2171
2175
|
return Pe(d), !0;
|
|
@@ -2173,49 +2177,49 @@ function Qs() {
|
|
|
2173
2177
|
if (ke(W.uponSanitizeElement, d, {
|
|
2174
2178
|
tagName: v,
|
|
2175
2179
|
allowedTags: S
|
|
2176
|
-
}), jt && d.hasChildNodes() && !
|
|
2180
|
+
}), jt && d.hasChildNodes() && !Ga(d.firstElementChild) && se(/<[/\w!]/g, d.innerHTML) && se(/<[/\w!]/g, d.textContent) || d.nodeType === gt.progressingInstruction || jt && d.nodeType === gt.comment && se(/<[/\w]/g, d.data))
|
|
2177
2181
|
return Pe(d), !0;
|
|
2178
2182
|
if (!S[v] || Ce[v]) {
|
|
2179
|
-
if (!Ce[v] &&
|
|
2183
|
+
if (!Ce[v] && Xa(v) && (F.tagNameCheck instanceof RegExp && se(F.tagNameCheck, v) || F.tagNameCheck instanceof Function && F.tagNameCheck(v)))
|
|
2180
2184
|
return !1;
|
|
2181
2185
|
if (Kt && !He[v]) {
|
|
2182
|
-
const
|
|
2183
|
-
if (ee &&
|
|
2184
|
-
const
|
|
2185
|
-
for (let Te =
|
|
2186
|
+
const Q = P(d) || d.parentNode, ee = A(d) || d.childNodes;
|
|
2187
|
+
if (ee && Q) {
|
|
2188
|
+
const q = ee.length;
|
|
2189
|
+
for (let Te = q - 1; Te >= 0; --Te) {
|
|
2186
2190
|
const ge = f(ee[Te], !0);
|
|
2187
|
-
ge.__removalCount = (d.__removalCount || 0) + 1,
|
|
2191
|
+
ge.__removalCount = (d.__removalCount || 0) + 1, Q.insertBefore(ge, k(d));
|
|
2188
2192
|
}
|
|
2189
2193
|
}
|
|
2190
2194
|
}
|
|
2191
2195
|
return Pe(d), !0;
|
|
2192
2196
|
}
|
|
2193
|
-
return d instanceof l && !Zs(d) || (v === "noscript" || v === "noembed" || v === "noframes") && se(/<\/no(script|embed|frames)/i, d.innerHTML) ? (Pe(d), !0) : (
|
|
2194
|
-
M = ht(M,
|
|
2197
|
+
return d instanceof l && !Zs(d) || (v === "noscript" || v === "noembed" || v === "noframes") && se(/<\/no(script|embed|frames)/i, d.innerHTML) ? (Pe(d), !0) : (Qe && d.nodeType === gt.text && (M = d.textContent, Pt([ce, Re, ve], (Q) => {
|
|
2198
|
+
M = ht(M, Q, " ");
|
|
2195
2199
|
}), d.textContent !== M && (ct(e.removed, {
|
|
2196
2200
|
element: d.cloneNode()
|
|
2197
2201
|
}), d.textContent = M)), ke(W.afterSanitizeElements, d, null), !1);
|
|
2198
|
-
},
|
|
2199
|
-
if (
|
|
2202
|
+
}, Za = function(d, M, v) {
|
|
2203
|
+
if (za && (M === "id" || M === "name") && (v in t || v in Ks))
|
|
2200
2204
|
return !1;
|
|
2201
|
-
if (!(
|
|
2205
|
+
if (!(be && !De[M] && se(Mt, M)) && !(J && se(Ct, M))) {
|
|
2202
2206
|
if (!D[M] || De[M]) {
|
|
2203
2207
|
if (
|
|
2204
2208
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
2205
2209
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2206
2210
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
2207
|
-
!(
|
|
2211
|
+
!(Xa(d) && (F.tagNameCheck instanceof RegExp && se(F.tagNameCheck, d) || F.tagNameCheck instanceof Function && F.tagNameCheck(d)) && (F.attributeNameCheck instanceof RegExp && se(F.attributeNameCheck, M) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(M, d)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2208
2212
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2209
2213
|
M === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && se(F.tagNameCheck, v) || F.tagNameCheck instanceof Function && F.tagNameCheck(v)))
|
|
2210
2214
|
)
|
|
2211
2215
|
return !1;
|
|
2212
|
-
} else if (!Zt[M] && !se(y, ht(v, at, "")) && !((M === "src" || M === "xlink:href" || M === "href") && d !== "script" && Yi(v, "data:") === 0 &&
|
|
2216
|
+
} else if (!Zt[M] && !se(y, ht(v, at, "")) && !((M === "src" || M === "xlink:href" || M === "href") && d !== "script" && Yi(v, "data:") === 0 && Qa[d]) && !(We && !se(St, ht(v, at, ""))) && v)
|
|
2213
2217
|
return !1;
|
|
2214
2218
|
}
|
|
2215
2219
|
return !0;
|
|
2216
|
-
}, Za = function(d) {
|
|
2217
|
-
return d !== "annotation-xml" && hs(d, kt);
|
|
2218
2220
|
}, Xa = function(d) {
|
|
2221
|
+
return d !== "annotation-xml" && na(d, kt);
|
|
2222
|
+
}, es = function(d) {
|
|
2219
2223
|
ke(W.beforeSanitizeAttributes, d, null);
|
|
2220
2224
|
const {
|
|
2221
2225
|
attributes: M
|
|
@@ -2229,65 +2233,69 @@ function Qs() {
|
|
|
2229
2233
|
allowedAttributes: D,
|
|
2230
2234
|
forceKeepAttr: void 0
|
|
2231
2235
|
};
|
|
2232
|
-
let
|
|
2233
|
-
for (;
|
|
2234
|
-
const ee = M[
|
|
2235
|
-
name:
|
|
2236
|
+
let Q = M.length;
|
|
2237
|
+
for (; Q--; ) {
|
|
2238
|
+
const ee = M[Q], {
|
|
2239
|
+
name: q,
|
|
2236
2240
|
namespaceURI: Te,
|
|
2237
2241
|
value: ge
|
|
2238
|
-
} = ee,
|
|
2239
|
-
let
|
|
2240
|
-
if (v.attrName =
|
|
2241
|
-
|
|
2242
|
+
} = ee, pe = X(q), sa = ge;
|
|
2243
|
+
let te = q === "value" ? sa : Ji(sa);
|
|
2244
|
+
if (v.attrName = pe, v.attrValue = te, v.keepAttr = !0, v.forceKeepAttr = void 0, ke(W.uponSanitizeAttribute, d, v), te = v.attrValue, _a && (pe === "id" || pe === "name") && (Fe(q, d), te = qs + te), jt && se(/((--!?|])>)|<\/(style|title|textarea)/i, te)) {
|
|
2245
|
+
Fe(q, d);
|
|
2246
|
+
continue;
|
|
2247
|
+
}
|
|
2248
|
+
if (pe === "attributename" && na(te, "href")) {
|
|
2249
|
+
Fe(q, d);
|
|
2242
2250
|
continue;
|
|
2243
2251
|
}
|
|
2244
2252
|
if (v.forceKeepAttr)
|
|
2245
2253
|
continue;
|
|
2246
2254
|
if (!v.keepAttr) {
|
|
2247
|
-
|
|
2255
|
+
Fe(q, d);
|
|
2248
2256
|
continue;
|
|
2249
2257
|
}
|
|
2250
|
-
if (!Tt && se(/\/>/i,
|
|
2251
|
-
|
|
2258
|
+
if (!Tt && se(/\/>/i, te)) {
|
|
2259
|
+
Fe(q, d);
|
|
2252
2260
|
continue;
|
|
2253
2261
|
}
|
|
2254
|
-
|
|
2255
|
-
|
|
2262
|
+
Qe && Pt([ce, Re, ve], (ei) => {
|
|
2263
|
+
te = ht(te, ei, " ");
|
|
2256
2264
|
});
|
|
2257
|
-
const
|
|
2258
|
-
if (!
|
|
2259
|
-
|
|
2265
|
+
const ts = X(d.nodeName);
|
|
2266
|
+
if (!Za(ts, pe, te)) {
|
|
2267
|
+
Fe(q, d);
|
|
2260
2268
|
continue;
|
|
2261
2269
|
}
|
|
2262
|
-
if (
|
|
2263
|
-
switch (L.getAttributeType(
|
|
2270
|
+
if (E && typeof L == "object" && typeof L.getAttributeType == "function" && !Te)
|
|
2271
|
+
switch (L.getAttributeType(ts, pe)) {
|
|
2264
2272
|
case "TrustedHTML": {
|
|
2265
|
-
|
|
2273
|
+
te = E.createHTML(te);
|
|
2266
2274
|
break;
|
|
2267
2275
|
}
|
|
2268
2276
|
case "TrustedScriptURL": {
|
|
2269
|
-
|
|
2277
|
+
te = E.createScriptURL(te);
|
|
2270
2278
|
break;
|
|
2271
2279
|
}
|
|
2272
2280
|
}
|
|
2273
|
-
if (
|
|
2281
|
+
if (te !== sa)
|
|
2274
2282
|
try {
|
|
2275
|
-
Te ? d.setAttributeNS(Te,
|
|
2283
|
+
Te ? d.setAttributeNS(Te, q, te) : d.setAttribute(q, te), aa(d) ? Pe(d) : hs(e.removed);
|
|
2276
2284
|
} catch {
|
|
2277
|
-
|
|
2285
|
+
Fe(q, d);
|
|
2278
2286
|
}
|
|
2279
2287
|
}
|
|
2280
2288
|
ke(W.afterSanitizeAttributes, d, null);
|
|
2281
2289
|
}, Xs = function d(M) {
|
|
2282
2290
|
let v = null;
|
|
2283
|
-
const
|
|
2284
|
-
for (ke(W.beforeSanitizeShadowDOM, M, null); v =
|
|
2285
|
-
ke(W.uponSanitizeShadowNode, v, null),
|
|
2291
|
+
const Q = Ja(M);
|
|
2292
|
+
for (ke(W.beforeSanitizeShadowDOM, M, null); v = Q.nextNode(); )
|
|
2293
|
+
ke(W.uponSanitizeShadowNode, v, null), Ka(v), es(v), v.content instanceof r && d(v.content);
|
|
2286
2294
|
ke(W.afterSanitizeShadowDOM, M, null);
|
|
2287
2295
|
};
|
|
2288
2296
|
return e.sanitize = function(d) {
|
|
2289
|
-
let M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = null,
|
|
2290
|
-
if (Xt = !d, Xt && (d = "<!-->"), typeof d != "string" && !
|
|
2297
|
+
let M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = null, Q = null, ee = null, q = null;
|
|
2298
|
+
if (Xt = !d, Xt && (d = "<!-->"), typeof d != "string" && !Ga(d))
|
|
2291
2299
|
if (typeof d.toString == "function") {
|
|
2292
2300
|
if (d = d.toString(), typeof d != "string")
|
|
2293
2301
|
throw ut("dirty is not a string, aborting");
|
|
@@ -2297,62 +2305,62 @@ function Qs() {
|
|
|
2297
2305
|
return d;
|
|
2298
2306
|
if (Jt || ta(M), e.removed = [], typeof d == "string" && (st = !1), st) {
|
|
2299
2307
|
if (d.nodeName) {
|
|
2300
|
-
const
|
|
2301
|
-
if (!S[
|
|
2308
|
+
const pe = X(d.nodeName);
|
|
2309
|
+
if (!S[pe] || Ce[pe])
|
|
2302
2310
|
throw ut("root node is forbidden and cannot be sanitized in-place");
|
|
2303
2311
|
}
|
|
2304
2312
|
} else if (d instanceof n)
|
|
2305
|
-
v =
|
|
2313
|
+
v = Ya("<!---->"), Q = v.ownerDocument.importNode(d, !0), Q.nodeType === gt.element && Q.nodeName === "BODY" || Q.nodeName === "HTML" ? v = Q : v.appendChild(Q);
|
|
2306
2314
|
else {
|
|
2307
|
-
if (!Ve && !
|
|
2315
|
+
if (!Ve && !Qe && !Oe && // eslint-disable-next-line unicorn/prefer-includes
|
|
2308
2316
|
d.indexOf("<") === -1)
|
|
2309
|
-
return
|
|
2310
|
-
if (v =
|
|
2311
|
-
return Ve ? null :
|
|
2317
|
+
return E && At ? E.createHTML(d) : d;
|
|
2318
|
+
if (v = Ya(d), !v)
|
|
2319
|
+
return Ve ? null : At ? N : "";
|
|
2312
2320
|
}
|
|
2313
2321
|
v && Gt && Pe(v.firstChild);
|
|
2314
|
-
const Te =
|
|
2322
|
+
const Te = Ja(st ? d : v);
|
|
2315
2323
|
for (; ee = Te.nextNode(); )
|
|
2316
|
-
|
|
2324
|
+
Ka(ee), es(ee), ee.content instanceof r && Xs(ee.content);
|
|
2317
2325
|
if (st)
|
|
2318
2326
|
return d;
|
|
2319
2327
|
if (Ve) {
|
|
2320
|
-
if (
|
|
2321
|
-
for (
|
|
2322
|
-
|
|
2328
|
+
if (Et)
|
|
2329
|
+
for (q = $.call(v.ownerDocument); v.firstChild; )
|
|
2330
|
+
q.appendChild(v.firstChild);
|
|
2323
2331
|
else
|
|
2324
|
-
|
|
2325
|
-
return (D.shadowroot || D.shadowrootmode) && (
|
|
2332
|
+
q = v;
|
|
2333
|
+
return (D.shadowroot || D.shadowrootmode) && (q = xe.call(s, q, !0)), q;
|
|
2326
2334
|
}
|
|
2327
2335
|
let ge = Oe ? v.outerHTML : v.innerHTML;
|
|
2328
|
-
return Oe && S["!doctype"] && v.ownerDocument && v.ownerDocument.doctype && v.ownerDocument.doctype.name && se(
|
|
2329
|
-
` + ge),
|
|
2330
|
-
ge = ht(ge,
|
|
2331
|
-
}),
|
|
2336
|
+
return Oe && S["!doctype"] && v.ownerDocument && v.ownerDocument.doctype && v.ownerDocument.doctype.name && se(Qs, v.ownerDocument.doctype.name) && (ge = "<!DOCTYPE " + v.ownerDocument.doctype.name + `>
|
|
2337
|
+
` + ge), Qe && Pt([ce, Re, ve], (pe) => {
|
|
2338
|
+
ge = ht(ge, pe, " ");
|
|
2339
|
+
}), E && At ? E.createHTML(ge) : ge;
|
|
2332
2340
|
}, e.setConfig = function() {
|
|
2333
2341
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2334
2342
|
ta(d), Jt = !0;
|
|
2335
2343
|
}, e.clearConfig = function() {
|
|
2336
|
-
|
|
2344
|
+
Ue = null, Jt = !1;
|
|
2337
2345
|
}, e.isValidAttribute = function(d, M, v) {
|
|
2338
|
-
|
|
2339
|
-
const
|
|
2340
|
-
return
|
|
2346
|
+
Ue || ta({});
|
|
2347
|
+
const Q = X(d), ee = X(M);
|
|
2348
|
+
return Za(Q, ee, v);
|
|
2341
2349
|
}, e.addHook = function(d, M) {
|
|
2342
2350
|
typeof M == "function" && ct(W[d], M);
|
|
2343
2351
|
}, e.removeHook = function(d, M) {
|
|
2344
2352
|
if (M !== void 0) {
|
|
2345
|
-
const v =
|
|
2353
|
+
const v = qi(W[d], M);
|
|
2346
2354
|
return v === -1 ? void 0 : Ui(W[d], v, 1)[0];
|
|
2347
2355
|
}
|
|
2348
|
-
return
|
|
2356
|
+
return hs(W[d]);
|
|
2349
2357
|
}, e.removeHooks = function(d) {
|
|
2350
2358
|
W[d] = [];
|
|
2351
2359
|
}, e.removeAllHooks = function() {
|
|
2352
2360
|
W = fs();
|
|
2353
2361
|
}, e;
|
|
2354
2362
|
}
|
|
2355
|
-
var Ls =
|
|
2363
|
+
var Ls = Vs();
|
|
2356
2364
|
class hr {
|
|
2357
2365
|
constructor(e) {
|
|
2358
2366
|
h(this, "dataLayer"), this.dataLayer = e;
|
|
@@ -2560,7 +2568,7 @@ class hr {
|
|
|
2560
2568
|
};
|
|
2561
2569
|
}
|
|
2562
2570
|
}
|
|
2563
|
-
class
|
|
2571
|
+
class Le {
|
|
2564
2572
|
static deepEqual(e, t) {
|
|
2565
2573
|
const s = Object.keys(e), a = Object.keys(t);
|
|
2566
2574
|
if (s.length !== a.length)
|
|
@@ -2631,7 +2639,7 @@ class j {
|
|
|
2631
2639
|
}
|
|
2632
2640
|
}
|
|
2633
2641
|
}
|
|
2634
|
-
class
|
|
2642
|
+
class ua {
|
|
2635
2643
|
static getOrSetCookie(e, t) {
|
|
2636
2644
|
let s = this.getCookie(e);
|
|
2637
2645
|
return s == null && (s = t ?? this.makeid(25), this.setCookie(e, s, {
|
|
@@ -2672,7 +2680,7 @@ class ha {
|
|
|
2672
2680
|
typeof document < "u" && (document.cookie = r);
|
|
2673
2681
|
}
|
|
2674
2682
|
}
|
|
2675
|
-
class
|
|
2683
|
+
class ae {
|
|
2676
2684
|
static removeXSSRiskyTags(e) {
|
|
2677
2685
|
var t = "script|style|iframe|object|embed|form|input|button", s = new RegExp("</?(" + t + ")(\\s[^>]*)?>", "gi");
|
|
2678
2686
|
return e ? e.replace(s, "") : "";
|
|
@@ -2699,17 +2707,17 @@ class ur {
|
|
|
2699
2707
|
});
|
|
2700
2708
|
}
|
|
2701
2709
|
cookieHandlingCallback(e) {
|
|
2702
|
-
this.cookiesDisabled ? (this.sessionIdValue = null,
|
|
2710
|
+
this.cookiesDisabled ? (this.sessionIdValue = null, ua.deleteCookie(this.sessionId), ua.deleteCookie("ms_visitorid")) : this.sessionIdValue = ua.getOrSetCookie(this.sessionId, e);
|
|
2703
2711
|
}
|
|
2704
2712
|
setIsInfiniteScroll(e) {
|
|
2705
2713
|
this.isInfiniteScroll = e;
|
|
2706
2714
|
}
|
|
2707
2715
|
setSearchTerm(e) {
|
|
2708
|
-
this.$searchTermChange.setValue(
|
|
2716
|
+
this.$searchTermChange.setValue(ae.removeXSSRiskyTags(e));
|
|
2709
2717
|
}
|
|
2710
2718
|
setSearchLocation(e) {
|
|
2711
2719
|
this.$searchLocationChange.setValue(
|
|
2712
|
-
|
|
2720
|
+
ae.removeXSSRiskyTags(e)
|
|
2713
2721
|
);
|
|
2714
2722
|
}
|
|
2715
2723
|
setSearchRadius(e) {
|
|
@@ -2728,10 +2736,10 @@ class ur {
|
|
|
2728
2736
|
this.$loadingChange.setValue(e);
|
|
2729
2737
|
}
|
|
2730
2738
|
setSearchResults(e) {
|
|
2731
|
-
this.firstSearchHappened = !0, (!
|
|
2739
|
+
this.firstSearchHappened = !0, (!Le.deepEqual(e, this.searchResults ?? [""]) || this.facetsWereSet) && (this.facetsWereSet = !1, this.$searchResults.setValue(e));
|
|
2732
2740
|
}
|
|
2733
2741
|
setSearchResultsMetadata(e) {
|
|
2734
|
-
|
|
2742
|
+
Le.deepEqual(e, this.searchResultsMetadata ?? {}) || this.$searchResultsMetadata.setValue(e);
|
|
2735
2743
|
}
|
|
2736
2744
|
setSearchAutosuggest(e) {
|
|
2737
2745
|
this.$searchAutosuggest.setValue(e);
|
|
@@ -2739,19 +2747,19 @@ class ur {
|
|
|
2739
2747
|
setSearchObject(e) {
|
|
2740
2748
|
var t, s;
|
|
2741
2749
|
let a = e;
|
|
2742
|
-
a = { ...a, itemsPerPage: this.itemsPerPage, model: this.model }, (s = (t = this.searchstaxConfig) == null ? void 0 : t.hooks) != null && s.beforeSearch && a && (a = this.searchstaxConfig.hooks.beforeSearch(a)), a && (!
|
|
2750
|
+
a = { ...a, itemsPerPage: this.itemsPerPage, model: this.model }, (s = (t = this.searchstaxConfig) == null ? void 0 : t.hooks) != null && s.beforeSearch && a && (a = this.searchstaxConfig.hooks.beforeSearch(a)), a && (!Le.deepEqual(a, this.searchObject ?? {}) || this.forceNotCorrect) && this.$searchObject.setValue(a);
|
|
2743
2751
|
}
|
|
2744
2752
|
setSearchFacets(e) {
|
|
2745
|
-
this.facetsWereSet = !0,
|
|
2753
|
+
this.facetsWereSet = !0, Le.deepEqual(e, this.searchFacets ?? []) || this.$searchFacets.setValue(e);
|
|
2746
2754
|
}
|
|
2747
2755
|
setSearchFacetsCached(e) {
|
|
2748
|
-
|
|
2756
|
+
Le.deepEqual(e, this.searchFacetsCached ?? []) || this.$searchFacetsCached.setValue(e);
|
|
2749
2757
|
}
|
|
2750
2758
|
setSearchRelatedSearches(e) {
|
|
2751
|
-
|
|
2759
|
+
Le.deepEqual(e, this.searchRelatedSearches ?? []) || this.$searchRelatedSearches.setValue(e);
|
|
2752
2760
|
}
|
|
2753
2761
|
setSearchExternalPromotions(e) {
|
|
2754
|
-
|
|
2762
|
+
Le.deepEqual(e, this.searchExternalPromotions ?? []) || this.$searchExternalPromotions.setValue(e);
|
|
2755
2763
|
}
|
|
2756
2764
|
setLanguage(e) {
|
|
2757
2765
|
this.$language.setValue(e);
|
|
@@ -2839,7 +2847,7 @@ class ur {
|
|
|
2839
2847
|
}
|
|
2840
2848
|
setLocationCoordinatesDecoded(e) {
|
|
2841
2849
|
this.$searchLocationCoordinatesDecoded.setValue(
|
|
2842
|
-
|
|
2850
|
+
ae.removeXSSRiskyTags(e)
|
|
2843
2851
|
);
|
|
2844
2852
|
}
|
|
2845
2853
|
setLocationEnabled(e) {
|
|
@@ -3199,11 +3207,11 @@ class ys {
|
|
|
3199
3207
|
const r = [];
|
|
3200
3208
|
for (const o in e)
|
|
3201
3209
|
if (o.startsWith(this.routeName + "[facets]")) {
|
|
3202
|
-
const n =
|
|
3210
|
+
const n = ae.removeXSSRiskyTags(
|
|
3203
3211
|
(t = e[o].split(":")) == null ? void 0 : t[0]
|
|
3204
|
-
), l =
|
|
3212
|
+
), l = ae.removeXSSRiskyTags(
|
|
3205
3213
|
decodeURIComponent((s = e[o].split(":")) == null ? void 0 : s[1])
|
|
3206
|
-
), c =
|
|
3214
|
+
), c = ae.removeXSSRiskyTags(
|
|
3207
3215
|
decodeURIComponent((a = e[o].split(":")) == null ? void 0 : a[2])
|
|
3208
3216
|
);
|
|
3209
3217
|
r.push({ type: n, name: l, value: c });
|
|
@@ -3211,29 +3219,29 @@ class ys {
|
|
|
3211
3219
|
return r;
|
|
3212
3220
|
}
|
|
3213
3221
|
urlToSearchObject(e, t) {
|
|
3214
|
-
const s = this.queryStringHelper.urlToParams(e), a =
|
|
3222
|
+
const s = this.queryStringHelper.urlToParams(e), a = ae.removeXSSRiskyTags(
|
|
3215
3223
|
decodeURIComponent(s[this.routeName + "[page]"])
|
|
3216
3224
|
), r = parseInt(a), o = isNaN(r) ? 1 : r;
|
|
3217
3225
|
return {
|
|
3218
|
-
query:
|
|
3226
|
+
query: ae.removeXSSRiskyTags(
|
|
3219
3227
|
decodeURIComponent(s[this.routeName + "[query]"])
|
|
3220
3228
|
) || "",
|
|
3221
3229
|
page: o,
|
|
3222
3230
|
itemsPerPage: t,
|
|
3223
|
-
order:
|
|
3231
|
+
order: ae.removeXSSRiskyTags(s[this.routeName + "[order]"]) || "",
|
|
3224
3232
|
facets: this.extractArrayOfFacetsFromQueryParameters(s) || [],
|
|
3225
|
-
model:
|
|
3233
|
+
model: ae.removeXSSRiskyTags(s[this.routeName + "[model]"]) || "",
|
|
3226
3234
|
location: {
|
|
3227
|
-
address:
|
|
3235
|
+
address: ae.removeXSSRiskyTags(
|
|
3228
3236
|
decodeURIComponent(s[this.routeName + "[location][address]"] || "")
|
|
3229
3237
|
),
|
|
3230
|
-
radius:
|
|
3238
|
+
radius: ae.removeXSSRiskyTags(
|
|
3231
3239
|
decodeURIComponent(s[this.routeName + "[location][radius]"] || "")
|
|
3232
3240
|
),
|
|
3233
|
-
lat:
|
|
3241
|
+
lat: ae.removeXSSRiskyTags(
|
|
3234
3242
|
decodeURIComponent(s[this.routeName + "[location][lat]"] || "")
|
|
3235
3243
|
),
|
|
3236
|
-
lon:
|
|
3244
|
+
lon: ae.removeXSSRiskyTags(
|
|
3237
3245
|
decodeURIComponent(s[this.routeName + "[location][lon]"] || "")
|
|
3238
3246
|
)
|
|
3239
3247
|
}
|
|
@@ -3281,20 +3289,20 @@ class ws extends Error {
|
|
|
3281
3289
|
super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
|
|
3282
3290
|
}
|
|
3283
3291
|
}
|
|
3284
|
-
function
|
|
3292
|
+
function da(i) {
|
|
3285
3293
|
}
|
|
3286
3294
|
function gr(i) {
|
|
3287
3295
|
if (typeof i == "function")
|
|
3288
3296
|
throw new TypeError(
|
|
3289
3297
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
3290
3298
|
);
|
|
3291
|
-
const { onEvent: e =
|
|
3299
|
+
const { onEvent: e = da, onError: t = da, onRetry: s = da, onComment: a } = i;
|
|
3292
3300
|
let r = "", o = !0, n, l = "", c = "";
|
|
3293
3301
|
function g(f) {
|
|
3294
|
-
const x = o ? f.replace(/^\xEF\xBB\xBF/, "") : f, [k,
|
|
3302
|
+
const x = o ? f.replace(/^\xEF\xBB\xBF/, "") : f, [k, A] = pr(`${r}${x}`);
|
|
3295
3303
|
for (const P of k)
|
|
3296
3304
|
m(P);
|
|
3297
|
-
r =
|
|
3305
|
+
r = A, o = !1;
|
|
3298
3306
|
}
|
|
3299
3307
|
function m(f) {
|
|
3300
3308
|
if (f === "") {
|
|
@@ -3307,7 +3315,7 @@ function gr(i) {
|
|
|
3307
3315
|
}
|
|
3308
3316
|
const x = f.indexOf(":");
|
|
3309
3317
|
if (x !== -1) {
|
|
3310
|
-
const k = f.slice(0, x),
|
|
3318
|
+
const k = f.slice(0, x), A = f[x + 1] === " " ? 2 : 1, P = f.slice(x + A);
|
|
3311
3319
|
p(k, P, f);
|
|
3312
3320
|
return;
|
|
3313
3321
|
}
|
|
@@ -3423,8 +3431,8 @@ function mr(i) {
|
|
|
3423
3431
|
const e = globalThis.DOMException;
|
|
3424
3432
|
return typeof e == "function" ? new e(i, "SyntaxError") : new SyntaxError(i);
|
|
3425
3433
|
}
|
|
3426
|
-
function
|
|
3427
|
-
return i instanceof Error ? "errors" in i && Array.isArray(i.errors) ? i.errors.map(
|
|
3434
|
+
function xa(i) {
|
|
3435
|
+
return i instanceof Error ? "errors" in i && Array.isArray(i.errors) ? i.errors.map(xa).join(", ") : "cause" in i && i.cause instanceof Error ? `${i}: ${xa(i.cause)}` : i.message : `${i}`;
|
|
3428
3436
|
}
|
|
3429
3437
|
function vs(i) {
|
|
3430
3438
|
return {
|
|
@@ -3436,71 +3444,71 @@ function vs(i) {
|
|
|
3436
3444
|
timeStamp: i.timeStamp
|
|
3437
3445
|
};
|
|
3438
3446
|
}
|
|
3439
|
-
var
|
|
3447
|
+
var Bs = (i) => {
|
|
3440
3448
|
throw TypeError(i);
|
|
3441
|
-
},
|
|
3442
|
-
class
|
|
3449
|
+
}, Fa = (i, e, t) => e.has(i) || Bs("Cannot " + t), R = (i, e, t) => (Fa(i, e, "read from private field"), t ? t.call(i) : e.get(i)), G = (i, e, t) => e.has(i) ? Bs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), H = (i, e, t, s) => (Fa(i, e, "write to private field"), e.set(i, t), t), Ee = (i, e, t) => (Fa(i, e, "access private method"), t), he, $e, Ye, Wt, qt, yt, Ze, wt, Ne, Je, Xe, Ge, mt, fe, va, ba, Ma, bs, Ca, Sa, ft, ka, Ta;
|
|
3450
|
+
class Qt extends EventTarget {
|
|
3443
3451
|
constructor(e, t) {
|
|
3444
3452
|
var s, a;
|
|
3445
|
-
super(), G(this,
|
|
3453
|
+
super(), G(this, fe), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, G(this, he), G(this, $e), G(this, Ye), G(this, Wt), G(this, qt), G(this, yt), G(this, Ze), G(this, wt, null), G(this, Ne), G(this, Je), G(this, Xe, null), G(this, Ge, null), G(this, mt, null), G(this, ba, async (r) => {
|
|
3446
3454
|
var o;
|
|
3447
3455
|
R(this, Je).reset();
|
|
3448
3456
|
const { body: n, redirected: l, status: c, headers: g } = r;
|
|
3449
3457
|
if (c === 204) {
|
|
3450
|
-
|
|
3458
|
+
Ee(this, fe, ft).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
3451
3459
|
return;
|
|
3452
3460
|
}
|
|
3453
|
-
if (l ?
|
|
3454
|
-
|
|
3461
|
+
if (l ? H(this, Ye, new URL(r.url)) : H(this, Ye, void 0), c !== 200) {
|
|
3462
|
+
Ee(this, fe, ft).call(this, `Non-200 status code (${c})`, c);
|
|
3455
3463
|
return;
|
|
3456
3464
|
}
|
|
3457
3465
|
if (!(g.get("content-type") || "").startsWith("text/event-stream")) {
|
|
3458
|
-
|
|
3466
|
+
Ee(this, fe, ft).call(this, 'Invalid content type, expected "text/event-stream"', c);
|
|
3459
3467
|
return;
|
|
3460
3468
|
}
|
|
3461
3469
|
if (R(this, he) === this.CLOSED)
|
|
3462
3470
|
return;
|
|
3463
|
-
|
|
3471
|
+
H(this, he, this.OPEN);
|
|
3464
3472
|
const m = new Event("open");
|
|
3465
3473
|
if ((o = R(this, mt)) == null || o.call(this, m), this.dispatchEvent(m), typeof n != "object" || !n || !("getReader" in n)) {
|
|
3466
|
-
|
|
3474
|
+
Ee(this, fe, ft).call(this, "Invalid response body, expected a web ReadableStream", c), this.close();
|
|
3467
3475
|
return;
|
|
3468
3476
|
}
|
|
3469
3477
|
const p = new TextDecoder(), L = n.getReader();
|
|
3470
3478
|
let w = !0;
|
|
3471
3479
|
do {
|
|
3472
3480
|
const { done: f, value: x } = await L.read();
|
|
3473
|
-
x && R(this, Je).feed(p.decode(x, { stream: !f })), f && (w = !1, R(this, Je).reset(),
|
|
3481
|
+
x && R(this, Je).feed(p.decode(x, { stream: !f })), f && (w = !1, R(this, Je).reset(), Ee(this, fe, ka).call(this));
|
|
3474
3482
|
} while (w);
|
|
3475
|
-
}), G(this, ba, (r) => {
|
|
3476
|
-
q(this, Ne, void 0), !(r.name === "AbortError" || r.type === "aborted") && Ae(this, me, Sa).call(this, wa(r));
|
|
3477
3483
|
}), G(this, Ma, (r) => {
|
|
3478
|
-
|
|
3484
|
+
H(this, Ne, void 0), !(r.name === "AbortError" || r.type === "aborted") && Ee(this, fe, ka).call(this, xa(r));
|
|
3485
|
+
}), G(this, Ca, (r) => {
|
|
3486
|
+
typeof r.id == "string" && H(this, wt, r.id);
|
|
3479
3487
|
const o = new MessageEvent(r.event || "message", {
|
|
3480
3488
|
data: r.data,
|
|
3481
|
-
origin: R(this, Ye) ? R(this, Ye).origin : R(this,
|
|
3489
|
+
origin: R(this, Ye) ? R(this, Ye).origin : R(this, $e).origin,
|
|
3482
3490
|
lastEventId: r.id || ""
|
|
3483
3491
|
});
|
|
3484
3492
|
R(this, Ge) && (!r.event || r.event === "message") && R(this, Ge).call(this, o), this.dispatchEvent(o);
|
|
3485
|
-
}), G(this,
|
|
3486
|
-
|
|
3487
|
-
}), G(this,
|
|
3488
|
-
|
|
3493
|
+
}), G(this, Sa, (r) => {
|
|
3494
|
+
H(this, yt, r);
|
|
3495
|
+
}), G(this, Ta, () => {
|
|
3496
|
+
H(this, Ze, void 0), R(this, he) === this.CONNECTING && Ee(this, fe, va).call(this);
|
|
3489
3497
|
});
|
|
3490
3498
|
try {
|
|
3491
3499
|
if (e instanceof URL)
|
|
3492
|
-
|
|
3500
|
+
H(this, $e, e);
|
|
3493
3501
|
else if (typeof e == "string")
|
|
3494
|
-
|
|
3502
|
+
H(this, $e, new URL(e, fr()));
|
|
3495
3503
|
else
|
|
3496
3504
|
throw new Error("Invalid URL");
|
|
3497
3505
|
} catch {
|
|
3498
3506
|
throw mr("An invalid or illegal string was specified");
|
|
3499
3507
|
}
|
|
3500
|
-
|
|
3501
|
-
onEvent: R(this,
|
|
3502
|
-
onRetry: R(this,
|
|
3503
|
-
})),
|
|
3508
|
+
H(this, Je, gr({
|
|
3509
|
+
onEvent: R(this, Ca),
|
|
3510
|
+
onRetry: R(this, Sa)
|
|
3511
|
+
})), H(this, he, this.CONNECTING), H(this, yt, 3e3), H(this, qt, (s = t == null ? void 0 : t.fetch) != null ? s : globalThis.fetch), H(this, Wt, (a = t == null ? void 0 : t.withCredentials) != null ? a : !1), Ee(this, fe, va).call(this);
|
|
3504
3512
|
}
|
|
3505
3513
|
/**
|
|
3506
3514
|
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
@@ -3523,7 +3531,7 @@ class Vt extends EventTarget {
|
|
|
3523
3531
|
* @public
|
|
3524
3532
|
*/
|
|
3525
3533
|
get url() {
|
|
3526
|
-
return R(this,
|
|
3534
|
+
return R(this, $e).href;
|
|
3527
3535
|
}
|
|
3528
3536
|
/**
|
|
3529
3537
|
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
@@ -3538,21 +3546,21 @@ class Vt extends EventTarget {
|
|
|
3538
3546
|
return R(this, Xe);
|
|
3539
3547
|
}
|
|
3540
3548
|
set onerror(e) {
|
|
3541
|
-
|
|
3549
|
+
H(this, Xe, e);
|
|
3542
3550
|
}
|
|
3543
3551
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3544
3552
|
get onmessage() {
|
|
3545
3553
|
return R(this, Ge);
|
|
3546
3554
|
}
|
|
3547
3555
|
set onmessage(e) {
|
|
3548
|
-
|
|
3556
|
+
H(this, Ge, e);
|
|
3549
3557
|
}
|
|
3550
3558
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3551
3559
|
get onopen() {
|
|
3552
3560
|
return R(this, mt);
|
|
3553
3561
|
}
|
|
3554
3562
|
set onopen(e) {
|
|
3555
|
-
|
|
3563
|
+
H(this, mt, e);
|
|
3556
3564
|
}
|
|
3557
3565
|
addEventListener(e, t, s) {
|
|
3558
3566
|
const a = t;
|
|
@@ -3570,17 +3578,17 @@ class Vt extends EventTarget {
|
|
|
3570
3578
|
* @public
|
|
3571
3579
|
*/
|
|
3572
3580
|
close() {
|
|
3573
|
-
R(this, Ze) && clearTimeout(R(this, Ze)), R(this, he) !== this.CLOSED && (R(this, Ne) && R(this, Ne).abort(),
|
|
3581
|
+
R(this, Ze) && clearTimeout(R(this, Ze)), R(this, he) !== this.CLOSED && (R(this, Ne) && R(this, Ne).abort(), H(this, he, this.CLOSED), H(this, Ne, void 0));
|
|
3574
3582
|
}
|
|
3575
3583
|
}
|
|
3576
|
-
he = /* @__PURE__ */ new WeakMap(),
|
|
3584
|
+
he = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakSet(), /**
|
|
3577
3585
|
* Connect to the given URL and start receiving events
|
|
3578
3586
|
*
|
|
3579
3587
|
* @internal
|
|
3580
3588
|
*/
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
},
|
|
3589
|
+
va = function() {
|
|
3590
|
+
H(this, he, this.CONNECTING), H(this, Ne, new AbortController()), R(this, qt)(R(this, $e), Ee(this, fe, bs).call(this)).then(R(this, ba)).catch(R(this, Ma));
|
|
3591
|
+
}, ba = /* @__PURE__ */ new WeakMap(), Ma = /* @__PURE__ */ new WeakMap(), /**
|
|
3584
3592
|
* Get request options for the `fetch()` request
|
|
3585
3593
|
*
|
|
3586
3594
|
* @returns The request options
|
|
@@ -3598,7 +3606,7 @@ bs = function() {
|
|
|
3598
3606
|
signal: (i = R(this, Ne)) == null ? void 0 : i.signal
|
|
3599
3607
|
};
|
|
3600
3608
|
return "window" in globalThis && (e.credentials = this.withCredentials ? "include" : "same-origin"), e;
|
|
3601
|
-
},
|
|
3609
|
+
}, Ca = /* @__PURE__ */ new WeakMap(), Sa = /* @__PURE__ */ new WeakMap(), /**
|
|
3602
3610
|
* Handles the process referred to in the EventSource specification as "failing a connection".
|
|
3603
3611
|
*
|
|
3604
3612
|
* @param error - The error causing the connection to fail
|
|
@@ -3607,7 +3615,7 @@ bs = function() {
|
|
|
3607
3615
|
*/
|
|
3608
3616
|
ft = function(i, e) {
|
|
3609
3617
|
var t;
|
|
3610
|
-
R(this, he) !== this.CLOSED &&
|
|
3618
|
+
R(this, he) !== this.CLOSED && H(this, he, this.CLOSED);
|
|
3611
3619
|
const s = new xs("error", { code: e, message: i });
|
|
3612
3620
|
(t = R(this, Xe)) == null || t.call(this, s), this.dispatchEvent(s);
|
|
3613
3621
|
}, /**
|
|
@@ -3617,37 +3625,37 @@ ft = function(i, e) {
|
|
|
3617
3625
|
* @param code - The HTTP status code, if available
|
|
3618
3626
|
* @internal
|
|
3619
3627
|
*/
|
|
3620
|
-
|
|
3628
|
+
ka = function(i, e) {
|
|
3621
3629
|
var t;
|
|
3622
3630
|
if (R(this, he) === this.CLOSED)
|
|
3623
3631
|
return;
|
|
3624
|
-
|
|
3632
|
+
H(this, he, this.CONNECTING);
|
|
3625
3633
|
const s = new xs("error", { code: e, message: i });
|
|
3626
|
-
(t = R(this, Xe)) == null || t.call(this, s), this.dispatchEvent(s),
|
|
3627
|
-
},
|
|
3634
|
+
(t = R(this, Xe)) == null || t.call(this, s), this.dispatchEvent(s), H(this, Ze, setTimeout(R(this, Ta), R(this, yt)));
|
|
3635
|
+
}, Ta = /* @__PURE__ */ new WeakMap(), /**
|
|
3628
3636
|
* ReadyState representing an EventSource currently trying to connect
|
|
3629
3637
|
*
|
|
3630
3638
|
* @public
|
|
3631
3639
|
*/
|
|
3632
|
-
|
|
3640
|
+
Qt.CONNECTING = 0, /**
|
|
3633
3641
|
* ReadyState representing an EventSource connection that is open (eg connected)
|
|
3634
3642
|
*
|
|
3635
3643
|
* @public
|
|
3636
3644
|
*/
|
|
3637
|
-
|
|
3645
|
+
Qt.OPEN = 1, /**
|
|
3638
3646
|
* ReadyState representing an EventSource connection that is closed (eg disconnected)
|
|
3639
3647
|
*
|
|
3640
3648
|
* @public
|
|
3641
3649
|
*/
|
|
3642
|
-
|
|
3650
|
+
Qt.CLOSED = 2;
|
|
3643
3651
|
function fr() {
|
|
3644
3652
|
const i = "document" in globalThis ? globalThis.document : void 0;
|
|
3645
3653
|
return i && typeof i == "object" && "baseURI" in i && typeof i.baseURI == "string" ? i.baseURI : void 0;
|
|
3646
3654
|
}
|
|
3647
|
-
class
|
|
3655
|
+
class ye {
|
|
3648
3656
|
static attachAnalyticsScript(e) {
|
|
3649
3657
|
window._msq = window._msq || [];
|
|
3650
|
-
const t = "https://static.searchstax.com/studio-js/
|
|
3658
|
+
const t = "https://static.searchstax.com/studio-js/v4/js/studio-analytics.js";
|
|
3651
3659
|
if (document.querySelector(`script[src="${t}"]`))
|
|
3652
3660
|
return;
|
|
3653
3661
|
const s = e || t;
|
|
@@ -3782,7 +3790,7 @@ class Le {
|
|
|
3782
3790
|
}, 0);
|
|
3783
3791
|
}
|
|
3784
3792
|
}
|
|
3785
|
-
h(
|
|
3793
|
+
h(ye, "subscribedToClickEvent", !1), h(ye, "msq", () => typeof window < "u" && window != null && window._msq ? window == null ? void 0 : window._msq : []);
|
|
3786
3794
|
class Lr {
|
|
3787
3795
|
constructor(e, t) {
|
|
3788
3796
|
h(this, "cachedQuery", ""), h(this, "url", ""), h(this, "relatedSearches", ""), h(this, "suggester", ""), h(this, "authHeader"), h(this, "authHeaderRelated"), h(this, "trackApiKey", ""), h(this, "session", ""), h(this, "searchAuthType"), h(this, "searchAuth", ""), h(this, "controllerSearch"), h(this, "signalSearch"), h(this, "controllerSuggest"), h(this, "signalSuggest"), h(this, "_authToken", ""), h(this, "dataLayer"), this.dataLayer = t, this.url = e.searchURL, this.dataLayer.setLanguage(e.language), this.suggester = e.suggesterURL, this.trackApiKey = e.trackApiKey, this.session = e.sessionId, this.searchAuthType = e.authType, this.searchAuth = e.searchAuth, this.authHeader = new Headers(), this.authHeader.append("Accept", "application/json"), this._authToken = this.searchAuthType === "token" ? `Token ${e.searchAuth}` : `Basic ${e.searchAuth}`, this.authHeader.append("Authorization", this._authToken), this.authHeaderRelated = new Headers(), this.authHeaderRelated.append("Accept", "application/json"), this.authHeaderRelated.append("Authorization", e.searchAuth);
|
|
@@ -3857,77 +3865,84 @@ class Lr {
|
|
|
3857
3865
|
search(e, t, s = !1, a = !1) {
|
|
3858
3866
|
if (e.query && e.query !== "undefined") {
|
|
3859
3867
|
this.dataLayer.setSearchTerm(e.query), this.dataLayer.setLoading(!0), this.controllerSearch && this.controllerSearch.abort(), this.controllerSearch = new AbortController(), this.signalSearch = this.controllerSearch.signal;
|
|
3860
|
-
const r =
|
|
3861
|
-
new URLSearchParams((window == null ? void 0 : window.location.search) ?? ""),
|
|
3862
|
-
{
|
|
3863
|
-
get: (p, L) => p.get(L) ?? ""
|
|
3864
|
-
}
|
|
3865
|
-
), o = r.languageVariant ? (
|
|
3866
|
-
//@ts-expect-error - this is a hack to get around the fact that the urlQueryParams is a proxy
|
|
3867
|
-
"&fq=_language:" + r.languageVariant
|
|
3868
|
-
) : "";
|
|
3869
|
-
let n = e.itemsPerPage, l = (e.itemsPerPage ? e.itemsPerPage : 0) * (e.page - 1), c = e.order ? `&sort=${e.order}` : "";
|
|
3870
|
-
const g = this.url + "?q=" + encodeURIComponent(e.query.trim()) + "&start=" + l + this.toQueryString(e.additionalProps ?? []) + this.generateFacetQuery(
|
|
3871
|
-
e.facets.filter(
|
|
3872
|
-
(p) => p.type === "or" || p.type === "showUnavailable"
|
|
3873
|
-
),
|
|
3874
|
-
!0
|
|
3875
|
-
) + this.generateLocationQuery(e.location) + this.generateFacetQuery(
|
|
3876
|
-
e.facets.filter(
|
|
3877
|
-
(p) => p.type === "and" || p.type === "tabs"
|
|
3878
|
-
),
|
|
3879
|
-
!1
|
|
3880
|
-
) + c + `&spellcheck.correct=${this.dataLayer.autoCorrect && !a}` + (n ? `&rows=${n}` : "") + (this.dataLayer.model ? `&model=${this.dataLayer.model}` : "") + "&language=" + this.dataLayer.language + o, m = {
|
|
3868
|
+
const r = this.url + this.generateQueryParams(e, a), o = {
|
|
3881
3869
|
method: "GET",
|
|
3882
3870
|
headers: this.authHeader,
|
|
3883
3871
|
credentials: "same-origin",
|
|
3884
3872
|
signal: this.signalSearch
|
|
3885
3873
|
};
|
|
3886
|
-
s && delete
|
|
3887
|
-
this.dataLayer.setLoading(!1), t(
|
|
3874
|
+
s && delete o.signal, fetch(r, o).then((n) => n.json()).then((n) => {
|
|
3875
|
+
this.dataLayer.setLoading(!1), t(n);
|
|
3888
3876
|
}).catch(() => {
|
|
3889
3877
|
this.dataLayer.setLoading(!1);
|
|
3890
3878
|
});
|
|
3891
3879
|
}
|
|
3892
3880
|
}
|
|
3881
|
+
generateQueryParams(e, t) {
|
|
3882
|
+
let s = (e.itemsPerPage ? e.itemsPerPage : 0) * (e.page - 1), a = e.order ? `&sort=${e.order}` : "", r = e.itemsPerPage;
|
|
3883
|
+
const o = new Proxy(
|
|
3884
|
+
new URLSearchParams((window == null ? void 0 : window.location.search) ?? ""),
|
|
3885
|
+
{
|
|
3886
|
+
get: (l, c) => l.get(c) ?? ""
|
|
3887
|
+
}
|
|
3888
|
+
), n = o.languageVariant ? (
|
|
3889
|
+
//@ts-expect-error - this is a hack to get around the fact that the urlQueryParams is a proxy
|
|
3890
|
+
"&fq=_language:" + o.languageVariant
|
|
3891
|
+
) : "";
|
|
3892
|
+
return "?q=" + encodeURIComponent(e.query.trim()) + "&start=" + s + this.toQueryString(e.additionalProps ?? []) + this.generateFacetQuery(
|
|
3893
|
+
e.facets.filter(
|
|
3894
|
+
(l) => l.type === "or" || l.type === "showUnavailable"
|
|
3895
|
+
),
|
|
3896
|
+
!0
|
|
3897
|
+
) + this.generateLocationQuery(e.location) + this.generateFacetQuery(
|
|
3898
|
+
e.facets.filter(
|
|
3899
|
+
(l) => l.type === "and" || l.type === "tabs"
|
|
3900
|
+
),
|
|
3901
|
+
!1
|
|
3902
|
+
) + a + `&spellcheck.correct=${this.dataLayer.autoCorrect && !t}` + (r ? `&rows=${r}` : "") + (this.dataLayer.model ? `&model=${this.dataLayer.model}` : "") + "&language=" + this.dataLayer.language + n;
|
|
3903
|
+
}
|
|
3893
3904
|
startSSE(e, t) {
|
|
3894
3905
|
if (!this.dataLayer.turnAIAnswerGenerationOn || e === "*" || this.dataLayer.searchObject.page !== 1)
|
|
3895
3906
|
return;
|
|
3896
|
-
const s =
|
|
3897
|
-
this.dataLayer.questionURL +
|
|
3907
|
+
const s = new Qt(
|
|
3908
|
+
this.dataLayer.questionURL + this.generateQueryParams(this.dataLayer.searchObject),
|
|
3898
3909
|
{
|
|
3899
|
-
fetch: (
|
|
3900
|
-
...
|
|
3910
|
+
fetch: (r, o) => fetch(r, {
|
|
3911
|
+
...o,
|
|
3901
3912
|
headers: {
|
|
3902
|
-
...
|
|
3913
|
+
...o == null ? void 0 : o.headers,
|
|
3903
3914
|
Authorization: this._authToken
|
|
3904
3915
|
}
|
|
3905
3916
|
})
|
|
3906
3917
|
}
|
|
3907
|
-
),
|
|
3908
|
-
return
|
|
3909
|
-
if (
|
|
3910
|
-
|
|
3918
|
+
), a = this.dataLayer;
|
|
3919
|
+
return s.onmessage = (r) => {
|
|
3920
|
+
if (r.data === Ke.question || r.data === Ke.notQuestion) {
|
|
3921
|
+
r.data === Ke.question ? (this.dataLayer.setAnswerLoading(!0), this.dataLayer.setIsQuestion(!0)) : (a.setAnswerLoading(!1), this.dataLayer.setIsQuestion(!1)), a.setAnswerData("");
|
|
3911
3922
|
return;
|
|
3912
3923
|
}
|
|
3913
|
-
if (
|
|
3914
|
-
|
|
3915
|
-
...
|
|
3916
|
-
answer:
|
|
3924
|
+
if (r.data === Ke.close) {
|
|
3925
|
+
ye.trackAnswerData({
|
|
3926
|
+
...a.parsedData.trackingData,
|
|
3927
|
+
answer: a.$answer.getValue(),
|
|
3917
3928
|
isQuestion: this.dataLayer.isQuestion
|
|
3918
|
-
}),
|
|
3929
|
+
}), a.setAnswerLoading(!1), s.close();
|
|
3919
3930
|
return;
|
|
3920
3931
|
}
|
|
3921
|
-
if (
|
|
3922
|
-
|
|
3932
|
+
if (r.data.indexOf("[!CAUTION]") !== -1) {
|
|
3933
|
+
a.setAnswerError(!0), a.setAnswerErrorMessage(
|
|
3934
|
+
"We're having trouble generating an answer. Please try again."
|
|
3935
|
+
), s.close();
|
|
3923
3936
|
return;
|
|
3924
3937
|
}
|
|
3925
|
-
t(
|
|
3926
|
-
},
|
|
3927
|
-
(
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
},
|
|
3938
|
+
t(r.data);
|
|
3939
|
+
}, s.addEventListener("error", (r) => {
|
|
3940
|
+
(r.code === 401 || r.code === 500) && (a.setAnswerErrorMessage(
|
|
3941
|
+
"We're having trouble generating an answer. Please try again."
|
|
3942
|
+
), a.setAnswerError(!0));
|
|
3943
|
+
}), s.onerror = () => {
|
|
3944
|
+
a.setAnswerLoading(!1), s.close();
|
|
3945
|
+
}, s;
|
|
3931
3946
|
}
|
|
3932
3947
|
suggest(e, t, s) {
|
|
3933
3948
|
this.controllerSuggest && this.controllerSuggest.abort(), this.controllerSuggest = new AbortController(), this.signalSuggest = this.controllerSuggest.signal;
|
|
@@ -3963,13 +3978,13 @@ class Lr {
|
|
|
3963
3978
|
var yr = Object.prototype.toString, tt = Array.isArray || function(i) {
|
|
3964
3979
|
return yr.call(i) === "[object Array]";
|
|
3965
3980
|
};
|
|
3966
|
-
function
|
|
3981
|
+
function $a(i) {
|
|
3967
3982
|
return typeof i == "function";
|
|
3968
3983
|
}
|
|
3969
3984
|
function wr(i) {
|
|
3970
3985
|
return tt(i) ? "array" : typeof i;
|
|
3971
3986
|
}
|
|
3972
|
-
function
|
|
3987
|
+
function ga(i) {
|
|
3973
3988
|
return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
3974
3989
|
}
|
|
3975
3990
|
function Ms(i, e) {
|
|
@@ -4001,7 +4016,7 @@ function kr(i) {
|
|
|
4001
4016
|
return Sr[e];
|
|
4002
4017
|
});
|
|
4003
4018
|
}
|
|
4004
|
-
var Tr = /\s*/, jr = /\s+/, Cs = /\s*=/,
|
|
4019
|
+
var Tr = /\s*/, jr = /\s+/, Cs = /\s*=/, Er = /\s*\}/, Ar = /#|\^|\/|>|\{|&|=|!/;
|
|
4005
4020
|
function Ir(i, e) {
|
|
4006
4021
|
if (!i)
|
|
4007
4022
|
return [];
|
|
@@ -4018,27 +4033,27 @@ function Ir(i, e) {
|
|
|
4018
4033
|
function w($) {
|
|
4019
4034
|
if (typeof $ == "string" && ($ = $.split(jr, 2)), !tt($) || $.length !== 2)
|
|
4020
4035
|
throw new Error("Invalid tags: " + $);
|
|
4021
|
-
m = new RegExp(
|
|
4036
|
+
m = new RegExp(ga($[0]) + "\\s*"), p = new RegExp("\\s*" + ga($[1])), L = new RegExp("\\s*" + ga("}" + $[1]));
|
|
4022
4037
|
}
|
|
4023
4038
|
w(e || O.tags);
|
|
4024
|
-
for (var f = new bt(i), x, k,
|
|
4025
|
-
if (x = f.pos,
|
|
4026
|
-
for (var Y = 0, T =
|
|
4027
|
-
P =
|
|
4039
|
+
for (var f = new bt(i), x, k, A, P, E, N; !f.eos(); ) {
|
|
4040
|
+
if (x = f.pos, A = f.scanUntil(m), A)
|
|
4041
|
+
for (var Y = 0, T = A.length; Y < T; ++Y)
|
|
4042
|
+
P = A.charAt(Y), Cr(P) ? (r.push(a.length), l += P) : (n = !0, t = !0, l += " "), a.push(["text", P, x, x + 1]), x += 1, P === `
|
|
4028
4043
|
` && (g(), l = "", c = 0, t = !1);
|
|
4029
4044
|
if (!f.scan(m))
|
|
4030
4045
|
break;
|
|
4031
|
-
if (o = !0, k = f.scan(
|
|
4046
|
+
if (o = !0, k = f.scan(Ar) || "name", f.scan(Tr), k === "=" ? (A = f.scanUntil(Cs), f.scan(Cs), f.scanUntil(p)) : k === "{" ? (A = f.scanUntil(L), f.scan(Er), f.scanUntil(p), k = "&") : A = f.scanUntil(p), !f.scan(p))
|
|
4032
4047
|
throw new Error("Unclosed tag at " + f.pos);
|
|
4033
|
-
if (k == ">" ?
|
|
4034
|
-
s.push(
|
|
4048
|
+
if (k == ">" ? E = [k, A, x, f.pos, l, c, t] : E = [k, A, x, f.pos], c++, a.push(E), k === "#" || k === "^")
|
|
4049
|
+
s.push(E);
|
|
4035
4050
|
else if (k === "/") {
|
|
4036
4051
|
if (N = s.pop(), !N)
|
|
4037
|
-
throw new Error('Unopened section "' +
|
|
4038
|
-
if (N[1] !==
|
|
4052
|
+
throw new Error('Unopened section "' + A + '" at ' + x);
|
|
4053
|
+
if (N[1] !== A)
|
|
4039
4054
|
throw new Error('Unclosed section "' + N[1] + '" at ' + x);
|
|
4040
4055
|
} else
|
|
4041
|
-
k === "name" || k === "{" || k === "&" ? n = !0 : k === "=" && w(
|
|
4056
|
+
k === "name" || k === "{" || k === "&" ? n = !0 : k === "=" && w(A);
|
|
4042
4057
|
}
|
|
4043
4058
|
if (g(), N = s.pop(), N)
|
|
4044
4059
|
throw new Error('Unclosed section "' + N[1] + '" at ' + f.pos);
|
|
@@ -4116,9 +4131,9 @@ et.prototype.lookup = function(i) {
|
|
|
4116
4131
|
}
|
|
4117
4132
|
e[i] = t;
|
|
4118
4133
|
}
|
|
4119
|
-
return
|
|
4134
|
+
return $a(t) && (t = t.call(this.view)), t;
|
|
4120
4135
|
};
|
|
4121
|
-
function
|
|
4136
|
+
function le() {
|
|
4122
4137
|
this.templateCache = {
|
|
4123
4138
|
_cache: {},
|
|
4124
4139
|
set: function(i, e) {
|
|
@@ -4132,23 +4147,23 @@ function oe() {
|
|
|
4132
4147
|
}
|
|
4133
4148
|
};
|
|
4134
4149
|
}
|
|
4135
|
-
|
|
4150
|
+
le.prototype.clearCache = function() {
|
|
4136
4151
|
typeof this.templateCache < "u" && this.templateCache.clear();
|
|
4137
4152
|
};
|
|
4138
|
-
|
|
4153
|
+
le.prototype.parse = function(i, e) {
|
|
4139
4154
|
var t = this.templateCache, s = i + ":" + (e || O.tags).join(":"), a = typeof t < "u", r = a ? t.get(s) : void 0;
|
|
4140
4155
|
return r == null && (r = Ir(i, e), a && t.set(s, r)), r;
|
|
4141
4156
|
};
|
|
4142
|
-
|
|
4157
|
+
le.prototype.render = function(i, e, t, s) {
|
|
4143
4158
|
var a = this.getConfigTags(s), r = this.parse(i, a), o = e instanceof et ? e : new et(e, void 0);
|
|
4144
4159
|
return this.renderTokens(r, o, t, i, s);
|
|
4145
4160
|
};
|
|
4146
|
-
|
|
4161
|
+
le.prototype.renderTokens = function(i, e, t, s, a) {
|
|
4147
4162
|
for (var r = "", o, n, l, c = 0, g = i.length; c < g; ++c)
|
|
4148
4163
|
l = void 0, o = i[c], n = o[0], n === "#" ? l = this.renderSection(o, e, t, s, a) : n === "^" ? l = this.renderInverted(o, e, t, s, a) : n === ">" ? l = this.renderPartial(o, e, t, a) : n === "&" ? l = this.unescapedValue(o, e) : n === "name" ? l = this.escapedValue(o, e, a) : n === "text" && (l = this.rawValue(o)), l !== void 0 && (r += l);
|
|
4149
4164
|
return r;
|
|
4150
4165
|
};
|
|
4151
|
-
|
|
4166
|
+
le.prototype.renderSection = function(i, e, t, s, a) {
|
|
4152
4167
|
var r = this, o = "", n = e.lookup(i[1]);
|
|
4153
4168
|
function l(m) {
|
|
4154
4169
|
return r.render(m, e, t, a);
|
|
@@ -4159,7 +4174,7 @@ oe.prototype.renderSection = function(i, e, t, s, a) {
|
|
|
4159
4174
|
o += this.renderTokens(i[4], e.push(n[c]), t, s, a);
|
|
4160
4175
|
else if (typeof n == "object" || typeof n == "string" || typeof n == "number")
|
|
4161
4176
|
o += this.renderTokens(i[4], e.push(n), t, s, a);
|
|
4162
|
-
else if (
|
|
4177
|
+
else if ($a(n)) {
|
|
4163
4178
|
if (typeof s != "string")
|
|
4164
4179
|
throw new Error("Cannot use higher-order sections without the original template");
|
|
4165
4180
|
n = n.call(e.view, s.slice(i[3], i[5]), l), n != null && (o += n);
|
|
@@ -4168,21 +4183,21 @@ oe.prototype.renderSection = function(i, e, t, s, a) {
|
|
|
4168
4183
|
return o;
|
|
4169
4184
|
}
|
|
4170
4185
|
};
|
|
4171
|
-
|
|
4186
|
+
le.prototype.renderInverted = function(i, e, t, s, a) {
|
|
4172
4187
|
var r = e.lookup(i[1]);
|
|
4173
4188
|
if (!r || tt(r) && r.length === 0)
|
|
4174
4189
|
return this.renderTokens(i[4], e, t, s, a);
|
|
4175
4190
|
};
|
|
4176
|
-
|
|
4191
|
+
le.prototype.indentPartial = function(i, e, t) {
|
|
4177
4192
|
for (var s = e.replace(/[^ \t]/g, ""), a = i.split(`
|
|
4178
4193
|
`), r = 0; r < a.length; r++)
|
|
4179
4194
|
a[r].length && (r > 0 || !t) && (a[r] = s + a[r]);
|
|
4180
4195
|
return a.join(`
|
|
4181
4196
|
`);
|
|
4182
4197
|
};
|
|
4183
|
-
|
|
4198
|
+
le.prototype.renderPartial = function(i, e, t, s) {
|
|
4184
4199
|
if (t) {
|
|
4185
|
-
var a = this.getConfigTags(s), r =
|
|
4200
|
+
var a = this.getConfigTags(s), r = $a(t) ? t(i[1]) : t[i[1]];
|
|
4186
4201
|
if (r != null) {
|
|
4187
4202
|
var o = i[6], n = i[5], l = i[4], c = r;
|
|
4188
4203
|
n == 0 && l && (c = this.indentPartial(r, l, o));
|
|
@@ -4191,23 +4206,23 @@ oe.prototype.renderPartial = function(i, e, t, s) {
|
|
|
4191
4206
|
}
|
|
4192
4207
|
}
|
|
4193
4208
|
};
|
|
4194
|
-
|
|
4209
|
+
le.prototype.unescapedValue = function(i, e) {
|
|
4195
4210
|
var t = e.lookup(i[1]);
|
|
4196
4211
|
if (t != null)
|
|
4197
4212
|
return t;
|
|
4198
4213
|
};
|
|
4199
|
-
|
|
4214
|
+
le.prototype.escapedValue = function(i, e, t) {
|
|
4200
4215
|
var s = this.getConfigEscape(t) || O.escape, a = e.lookup(i[1]);
|
|
4201
4216
|
if (a != null)
|
|
4202
4217
|
return typeof a == "number" && s === O.escape ? String(a) : s(a);
|
|
4203
4218
|
};
|
|
4204
|
-
|
|
4219
|
+
le.prototype.rawValue = function(i) {
|
|
4205
4220
|
return i[1];
|
|
4206
4221
|
};
|
|
4207
|
-
|
|
4222
|
+
le.prototype.getConfigTags = function(i) {
|
|
4208
4223
|
return tt(i) ? i : i && typeof i == "object" ? i.tags : void 0;
|
|
4209
4224
|
};
|
|
4210
|
-
|
|
4225
|
+
le.prototype.getConfigEscape = function(i) {
|
|
4211
4226
|
if (i && typeof i == "object" && !tt(i))
|
|
4212
4227
|
return i.escape;
|
|
4213
4228
|
};
|
|
@@ -4236,7 +4251,7 @@ var O = {
|
|
|
4236
4251
|
get templateCache() {
|
|
4237
4252
|
return xt.templateCache;
|
|
4238
4253
|
}
|
|
4239
|
-
}, xt = new
|
|
4254
|
+
}, xt = new le();
|
|
4240
4255
|
O.clearCache = function() {
|
|
4241
4256
|
return xt.clearCache();
|
|
4242
4257
|
};
|
|
@@ -4251,7 +4266,7 @@ O.render = function(i, e, t, s) {
|
|
|
4251
4266
|
O.escape = kr;
|
|
4252
4267
|
O.Scanner = bt;
|
|
4253
4268
|
O.Context = et;
|
|
4254
|
-
O.Writer =
|
|
4269
|
+
O.Writer = le;
|
|
4255
4270
|
const Dr = {
|
|
4256
4271
|
main: {
|
|
4257
4272
|
template: `
|
|
@@ -4365,10 +4380,10 @@ const Dr = {
|
|
|
4365
4380
|
template: `
|
|
4366
4381
|
<div class="searchstax-facet-show-more-container" data-test-id="searchstax-facet-show-more-container">
|
|
4367
4382
|
{{#showingAllFacets}}
|
|
4368
|
-
<div class="searchstax-facet-show-less-button searchstax-facet-show-button" tabindex="0" data-test-id="searchstax-facet-show-less-button">less</div>
|
|
4383
|
+
<div class="searchstax-facet-show-less-button searchstax-facet-show-button" tabindex="0" data-test-id="searchstax-facet-show-less-button" role="button">less</div>
|
|
4369
4384
|
{{/showingAllFacets}}
|
|
4370
4385
|
{{^showingAllFacets}}
|
|
4371
|
-
<div class="searchstax-facet-show-more-button searchstax-facet-show-button" tabindex="0" data-test-id="searchstax-facet-show-more-button">more {{onShowMoreLessClick}}</div>
|
|
4386
|
+
<div class="searchstax-facet-show-more-button searchstax-facet-show-button" tabindex="0" data-test-id="searchstax-facet-show-more-button" role="button">more {{onShowMoreLessClick}}</div>
|
|
4372
4387
|
{{/showingAllFacets}}
|
|
4373
4388
|
</div>
|
|
4374
4389
|
`,
|
|
@@ -4436,11 +4451,11 @@ const Dr = {
|
|
|
4436
4451
|
{{#results.length}}
|
|
4437
4452
|
<div class="searchstax-pagination-container" data-test-id="searchstax-pagination-container">
|
|
4438
4453
|
<div class="searchstax-pagination-content">
|
|
4439
|
-
<a class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" id="searchstax-pagination-previous" data-test-id="searchstax-pagination-previous" tabindex="0" aria-label="Previous Page">< Previous</a>
|
|
4454
|
+
<a role="link" class="searchstax-pagination-previous {{#isFirstPage}}disabled{{/isFirstPage}}" {{#isFirstPage}} disabled="disabled" {{/isFirstPage}} id="searchstax-pagination-previous" data-test-id="searchstax-pagination-previous" {{^isFirstPage}} tabindex="0" {{/isFirstPage}} aria-label="Previous Page">< Previous</a>
|
|
4440
4455
|
<div class="searchstax-pagination-details" data-test-id="searchstax-pagination-details">
|
|
4441
4456
|
{{startResultIndex}} - {{endResultIndex}} of {{totalResults}}
|
|
4442
4457
|
</div>
|
|
4443
|
-
<a class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" data-test-id="searchstax-pagination-next" id="searchstax-pagination-next" tabindex="0" aria-label="Next Page">Next ></a>
|
|
4458
|
+
<a role="link" class="searchstax-pagination-next {{#isLastPage}}disabled{{/isLastPage}}" {{#isLastPage}}disabled="disabled"{{/isLastPage}} data-test-id="searchstax-pagination-next" id="searchstax-pagination-next" {{^isLastPage}} tabindex="0" {{/isLastPage}} aria-label="Next Page">Next ></a>
|
|
4444
4459
|
</div>
|
|
4445
4460
|
</div>
|
|
4446
4461
|
{{/results.length}}
|
|
@@ -4544,7 +4559,7 @@ const Dr = {
|
|
|
4544
4559
|
radiusInputId: "searchstax-location-radius-select",
|
|
4545
4560
|
currentLocationActionButtonId: "searchstax-location-get-current-location"
|
|
4546
4561
|
}
|
|
4547
|
-
},
|
|
4562
|
+
}, Qr = {
|
|
4548
4563
|
mainTemplate: {
|
|
4549
4564
|
template: `
|
|
4550
4565
|
<section aria-label="search results container" tabindex="0">
|
|
@@ -4630,7 +4645,7 @@ const Dr = {
|
|
|
4630
4645
|
{{/searchExecuted}}
|
|
4631
4646
|
`
|
|
4632
4647
|
}
|
|
4633
|
-
},
|
|
4648
|
+
}, Vr = {
|
|
4634
4649
|
main: {
|
|
4635
4650
|
template: `
|
|
4636
4651
|
{{#searchExecuted}}
|
|
@@ -4650,12 +4665,12 @@ const Dr = {
|
|
|
4650
4665
|
`,
|
|
4651
4666
|
selectId: "searchstax-search-order-select"
|
|
4652
4667
|
}
|
|
4653
|
-
},
|
|
4668
|
+
}, ie = {
|
|
4654
4669
|
mainTemplate: {
|
|
4655
4670
|
template: `
|
|
4656
4671
|
<div class="sf-widget-container">
|
|
4657
4672
|
<div id="sf-widget" class="sf-main">
|
|
4658
|
-
<a href="#" id="searchstax-open-feedback" class="sf-open-feedback" tabindex="0" aria-label="Open Search Feedback">[ - ] Search Feedback</a>
|
|
4673
|
+
<a role="button" href="#" id="searchstax-open-feedback" class="sf-open-feedback" tabindex="0" aria-label="Open Search Feedback">[ - ] Search Feedback</a>
|
|
4659
4674
|
<div class="sf-modal-content {{#feedbackOpen}}sf-open{{/feedbackOpen}}{{^feedbackOpen}}sf-close{{/feedbackOpen}}">
|
|
4660
4675
|
<div class="sf-modal-header">
|
|
4661
4676
|
<h2 class="sf-title">Search Feedback</h2>
|
|
@@ -4688,8 +4703,8 @@ const Dr = {
|
|
|
4688
4703
|
</div>
|
|
4689
4704
|
</div>
|
|
4690
4705
|
<div class="sf-comments sf-form-group">
|
|
4691
|
-
<label
|
|
4692
|
-
<textarea maxlength="{{maxLength}}" class="sf-form-control" id="sf-comments" placeholder="Enter any comments relating to your search experience">{{feedbackTextArea}}</textarea>
|
|
4706
|
+
<label>Comments <small> (<span class="searchstax-characters-remaining-container">2000</span> characters remaining)</small></label>
|
|
4707
|
+
<textarea aria-label="Comments" maxlength="{{maxLength}}" class="sf-form-control" id="sf-comments" placeholder="Enter any comments relating to your search experience">{{feedbackTextArea}}</textarea>
|
|
4693
4708
|
</div>
|
|
4694
4709
|
<div class="sf-email sf-form-group">
|
|
4695
4710
|
<label for="sf-email">Email</label>
|
|
@@ -4721,7 +4736,8 @@ const Dr = {
|
|
|
4721
4736
|
emailInputId: "sf-email",
|
|
4722
4737
|
feedbackTextAreaId: "sf-comments",
|
|
4723
4738
|
ratingInputclass: "sf-custom-control-input",
|
|
4724
|
-
charactersRemainingContainerclass: "searchstax-characters-remaining-container"
|
|
4739
|
+
charactersRemainingContainerclass: "searchstax-characters-remaining-container",
|
|
4740
|
+
modalContainerClass: "sf-modal-content"
|
|
4725
4741
|
},
|
|
4726
4742
|
lightweightTemplate: {
|
|
4727
4743
|
template: `
|
|
@@ -4746,8 +4762,8 @@ const Dr = {
|
|
|
4746
4762
|
};
|
|
4747
4763
|
class C {
|
|
4748
4764
|
}
|
|
4749
|
-
h(C, "answer", Dr), h(C, "externalPromotions", Or), h(C, "facets", Pr), h(C, "pagination", Fr), h(C, "relatedSearches", $r), h(C, "searchFeedback", zr), h(C, "searchInput", _r), h(C, "location", Wr), h(C, "searchResults",
|
|
4750
|
-
class
|
|
4765
|
+
h(C, "answer", Dr), h(C, "externalPromotions", Or), h(C, "facets", Pr), h(C, "pagination", Fr), h(C, "relatedSearches", $r), h(C, "searchFeedback", zr), h(C, "searchInput", _r), h(C, "location", Wr), h(C, "searchResults", Qr), h(C, "sorting", Vr), h(C, "feedback", ie);
|
|
4766
|
+
class Br {
|
|
4751
4767
|
constructor(e) {
|
|
4752
4768
|
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "externalPromotionsContainerId"), h(this, "searchExternalPromotionsMainContainer", null);
|
|
4753
4769
|
var t, s;
|
|
@@ -4805,19 +4821,19 @@ class K {
|
|
|
4805
4821
|
e.setAttribute("aria-live", "polite"), e.setAttribute("id", "searchAccessibilityContainer"), document.body.appendChild(e);
|
|
4806
4822
|
}
|
|
4807
4823
|
}
|
|
4808
|
-
static setAccessibilityText(e, t) {
|
|
4824
|
+
static setAccessibilityText(e, t, s) {
|
|
4809
4825
|
this.addAccessibilityNotificationContainerToBody();
|
|
4810
|
-
const s = document.getElementById(
|
|
4811
|
-
|
|
4812
|
-
const
|
|
4813
|
-
|
|
4814
|
-
const
|
|
4815
|
-
|
|
4816
|
-
|
|
4826
|
+
const a = s ?? "searchAccessibility", r = document.getElementById(a);
|
|
4827
|
+
r && r.remove();
|
|
4828
|
+
const o = document.createElement("span");
|
|
4829
|
+
o.setAttribute("id", a), o.innerHTML = e;
|
|
4830
|
+
const n = document.getElementById("searchAccessibilityContainer");
|
|
4831
|
+
n && setTimeout(() => {
|
|
4832
|
+
n.appendChild(o);
|
|
4817
4833
|
}, t ?? 100);
|
|
4818
4834
|
}
|
|
4819
4835
|
}
|
|
4820
|
-
class
|
|
4836
|
+
class Hr {
|
|
4821
4837
|
constructor(e, t) {
|
|
4822
4838
|
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "routerHelper"), h(this, "cachedPhrase", ""), h(this, "isCached", !1), h(this, "overlayOpened", !1), h(this, "facetPaginationStep"), h(this, "facetPaginationStepMobile"), h(this, "searchFacetsMainContainer", null), h(this, "searchFacetsMobileContainer", null), h(this, "searchFacetsDesktopContainer", null), h(this, "facetLimits", {}), h(this, "facetLimitsMobile", {}), h(this, "deactivatedFacets", {}), h(this, "focusedElement", null), h(this, "cachedData", null), h(this, "cacheFacets"), h(this, "onFacetSelect", (s, a, r, o, n) => {
|
|
4823
4839
|
if (s.stopPropagation(), !a.disabled) {
|
|
@@ -4827,8 +4843,8 @@ class qr {
|
|
|
4827
4843
|
const g = this.dataLayer.searchObject;
|
|
4828
4844
|
let m = [...g.facets];
|
|
4829
4845
|
const p = this.extractFacetValue(a);
|
|
4830
|
-
c ? m.find((L) =>
|
|
4831
|
-
(L) => !
|
|
4846
|
+
c ? m.find((L) => Le.deepEqual(L, p) ? L : !1) || (this.config.facetingType === "tabs" && (m = m.filter((L) => L.name !== p.name)), m.push(p)) : m = m.filter(
|
|
4847
|
+
(L) => !Le.deepEqual(L, p)
|
|
4832
4848
|
), setTimeout(() => {
|
|
4833
4849
|
this.dataLayer.setSearchObject({ ...g, facets: m, page: 1 }), this.config.facetingType === "tabs" && this.renderMainTemplate(this.generateTemplateData(), !0);
|
|
4834
4850
|
}, 0);
|
|
@@ -4923,22 +4939,22 @@ class qr {
|
|
|
4923
4939
|
k,
|
|
4924
4940
|
e
|
|
4925
4941
|
), t.appendChild(x);
|
|
4926
|
-
const
|
|
4942
|
+
const A = x.querySelector(
|
|
4927
4943
|
"." + (((g = (c = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : c.facetItemContainerTemplate) == null ? void 0 : g.facetListTitleContainerClass) || ((m = C.facets.facetItemContainerTemplate) == null ? void 0 : m.facetListTitleContainerClass))
|
|
4928
4944
|
);
|
|
4929
|
-
|
|
4945
|
+
A == null || A.addEventListener("click", () => {
|
|
4930
4946
|
x.classList.toggle("active");
|
|
4931
|
-
const
|
|
4947
|
+
const E = x.classList.contains("active"), N = A.querySelector(
|
|
4932
4948
|
".searchstax-facet-title"
|
|
4933
4949
|
);
|
|
4934
|
-
N && N.setAttribute("aria-expanded", String(
|
|
4950
|
+
N && N.setAttribute("aria-expanded", String(E));
|
|
4935
4951
|
});
|
|
4936
4952
|
const P = x.querySelector(
|
|
4937
4953
|
"." + (((w = (L = (p = this.config) == null ? void 0 : p.templates) == null ? void 0 : L.facetItemContainerTemplate) == null ? void 0 : w.facetListContainerClass) || ((f = C.facets.facetItemContainerTemplate) == null ? void 0 : f.facetListContainerClass))
|
|
4938
4954
|
);
|
|
4939
|
-
P && (e.values.forEach((
|
|
4955
|
+
P && (e.values.forEach((E) => {
|
|
4940
4956
|
this.createFacetListItem(
|
|
4941
|
-
|
|
4957
|
+
E,
|
|
4942
4958
|
P,
|
|
4943
4959
|
e.name
|
|
4944
4960
|
);
|
|
@@ -4947,16 +4963,16 @@ class qr {
|
|
|
4947
4963
|
}
|
|
4948
4964
|
isChecked(e) {
|
|
4949
4965
|
var t;
|
|
4950
|
-
return !!((t = this.dataLayer.searchObject.facets) != null && t.find((s) =>
|
|
4966
|
+
return !!((t = this.dataLayer.searchObject.facets) != null && t.find((s) => Le.deepEqual(s, this.extractFacetValue(e))));
|
|
4951
4967
|
}
|
|
4952
4968
|
createFacetListItem(e, t, s) {
|
|
4953
4969
|
var a, r, o, n, l, c, g, m, p, L, w, f;
|
|
4954
4970
|
if (typeof document < "u") {
|
|
4955
4971
|
const x = document == null ? void 0 : document.createElement("div");
|
|
4956
4972
|
x.classList.add("searchstax-facet-value-container"), e.disabled && x.classList.add("searchstax-facet-value-disabled");
|
|
4957
|
-
const k = this.isChecked(e),
|
|
4973
|
+
const k = this.isChecked(e), A = ((o = (r = (a = this.config) == null ? void 0 : a.templates) == null ? void 0 : r.facetItemTemplate) == null ? void 0 : o.template) || ((n = C.facets.facetItemTemplate) == null ? void 0 : n.template);
|
|
4958
4974
|
x.innerHTML = O.render(
|
|
4959
|
-
|
|
4975
|
+
A,
|
|
4960
4976
|
{ ...e, isChecked: k }
|
|
4961
4977
|
);
|
|
4962
4978
|
let P = (l = C.facets.facetItemTemplate) == null ? void 0 : l.checkTriggerClasses;
|
|
@@ -4966,12 +4982,12 @@ class qr {
|
|
|
4966
4982
|
this.onFacetSelect(T, e, x);
|
|
4967
4983
|
});
|
|
4968
4984
|
});
|
|
4969
|
-
const
|
|
4985
|
+
const E = x.querySelector(
|
|
4970
4986
|
"." + (((w = (L = (p = this.config) == null ? void 0 : p.templates) == null ? void 0 : L.facetItemTemplate) == null ? void 0 : w.inputCheckboxClass) || ((f = C.facets.facetItemTemplate) == null ? void 0 : f.inputCheckboxClass))
|
|
4971
4987
|
);
|
|
4972
|
-
|
|
4988
|
+
E == null || E.addEventListener("click", (N) => {
|
|
4973
4989
|
this.onFacetSelect(N, e, x, !0);
|
|
4974
|
-
}),
|
|
4990
|
+
}), E && (E == null || E.setAttribute(
|
|
4975
4991
|
"data-test-value",
|
|
4976
4992
|
`${encodeURIComponent(s)}:"${encodeURIComponent(
|
|
4977
4993
|
e.value
|
|
@@ -5006,14 +5022,18 @@ class qr {
|
|
|
5006
5022
|
e.preventDefault();
|
|
5007
5023
|
const a = s ? this.facetPaginationStepMobile : this.facetPaginationStep, r = s ? this.facetLimits : this.facetLimitsMobile;
|
|
5008
5024
|
r[t.name] === void 0 ? r[t.name] = a * 2 : r[t.name] <= t.values.length ? (K.setAccessibilityText(
|
|
5009
|
-
`More Facets shown for ${t.label}
|
|
5025
|
+
`More Facets shown for ${t.label}`,
|
|
5026
|
+
0,
|
|
5027
|
+
`moreLess${(/* @__PURE__ */ new Date()).getTime()}`
|
|
5010
5028
|
), r[t.name] = r[t.name] + a) : (K.setAccessibilityText(
|
|
5011
|
-
`Less Facets shown for ${t.label}
|
|
5029
|
+
`Less Facets shown for ${t.label}`,
|
|
5030
|
+
0,
|
|
5031
|
+
`moreLess${(/* @__PURE__ */ new Date()).getTime()}`
|
|
5012
5032
|
), r[t.name] = a), this.generateTemplateData(s), this.renderMainTemplate(this.generateTemplateData());
|
|
5013
5033
|
}
|
|
5014
5034
|
renderMainTemplate(e, t) {
|
|
5015
5035
|
var s, a, r, o, n, l, c, g, m, p, L;
|
|
5016
|
-
if (e && (!
|
|
5036
|
+
if (e && (!Le.deepEqual(this.cachedData ?? {}, e) || t)) {
|
|
5017
5037
|
this.cachedData = e;
|
|
5018
5038
|
const w = ((r = (a = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : a.mainTemplateDesktop) == null ? void 0 : r.template) || ((o = C.facets.mainTemplateDesktop) == null ? void 0 : o.template);
|
|
5019
5039
|
if (this.dataLayer.renderingEngine === U.mustache && this.searchFacetsMainContainer) {
|
|
@@ -5149,7 +5169,7 @@ class qr {
|
|
|
5149
5169
|
K.setAccessibilityText("Facet overlay closed"), this.overlayOpened = !1, this.searchFacetsMainContainer && (typeof document < "u" && document.body.classList.toggle("searchstax-no-scroll"), (e = this.searchFacetsMainContainer.querySelector(".searchstax-facets-mobile-overlay")) == null || e.classList.remove("searchstax-show"));
|
|
5150
5170
|
}
|
|
5151
5171
|
renderMobileTemplate(e) {
|
|
5152
|
-
var t, s, a, r, o, n, l, c, g, m, p, L, w, f, x, k,
|
|
5172
|
+
var t, s, a, r, o, n, l, c, g, m, p, L, w, f, x, k, A, P, E;
|
|
5153
5173
|
if (e && typeof document < "u") {
|
|
5154
5174
|
const N = document == null ? void 0 : document.createElement("div");
|
|
5155
5175
|
N.classList.add("searchstax-facets-container-mobile");
|
|
@@ -5159,17 +5179,17 @@ class qr {
|
|
|
5159
5179
|
...e,
|
|
5160
5180
|
overlayOpened: this.overlayOpened
|
|
5161
5181
|
}), (o = this.searchFacetsMainContainer) == null || o.appendChild(N), (l = (n = this.config) == null ? void 0 : n.templates) != null && l.mainTemplateMobile)
|
|
5162
|
-
for (const
|
|
5163
|
-
const W = N.querySelector("." +
|
|
5164
|
-
W && (W.addEventListener("click", this.closeOverlay.bind(this)), W.addEventListener("keyup", (
|
|
5165
|
-
(
|
|
5182
|
+
for (const xe of ((m = (g = (c = this.config) == null ? void 0 : c.templates) == null ? void 0 : g.mainTemplateMobile) == null ? void 0 : m.closeOverlayTriggerClasses) || []) {
|
|
5183
|
+
const W = N.querySelector("." + xe);
|
|
5184
|
+
W && (W.addEventListener("click", this.closeOverlay.bind(this)), W.addEventListener("keyup", (ce) => {
|
|
5185
|
+
(ce.code === "Space" || ce.code === "Enter") && this.closeOverlay();
|
|
5166
5186
|
}));
|
|
5167
5187
|
}
|
|
5168
5188
|
else
|
|
5169
|
-
for (const
|
|
5170
|
-
const W = N.querySelector("." +
|
|
5171
|
-
W && (W.addEventListener("click", this.closeOverlay.bind(this)), W.addEventListener("keyup", (
|
|
5172
|
-
(
|
|
5189
|
+
for (const xe of C.facets.mainTemplateMobile.closeOverlayTriggerClasses) {
|
|
5190
|
+
const W = N.querySelector("." + xe);
|
|
5191
|
+
W && (W.addEventListener("click", this.closeOverlay.bind(this)), W.addEventListener("keyup", (ce) => {
|
|
5192
|
+
(ce.code === "Space" || ce.code === "Enter") && this.closeOverlay();
|
|
5173
5193
|
}));
|
|
5174
5194
|
}
|
|
5175
5195
|
const T = N.querySelector(
|
|
@@ -5181,18 +5201,18 @@ class qr {
|
|
|
5181
5201
|
);
|
|
5182
5202
|
$ && (this.createSelectedFacetsComponents($), this.createClearFacetsComponents($));
|
|
5183
5203
|
const Z = N.querySelector(
|
|
5184
|
-
"." + (((
|
|
5204
|
+
"." + (((E = (P = (A = this.config) == null ? void 0 : A.templates) == null ? void 0 : P.mainTemplateMobile) == null ? void 0 : E.facetsContainerClass) || C.facets.mainTemplateMobile.facetsContainerClass)
|
|
5185
5205
|
);
|
|
5186
5206
|
if (Z) {
|
|
5187
5207
|
Z.innerHTML = "";
|
|
5188
|
-
for (const
|
|
5189
|
-
this.createFacetItem(
|
|
5208
|
+
for (const xe of e.facets)
|
|
5209
|
+
this.createFacetItem(xe, Z, !0);
|
|
5190
5210
|
}
|
|
5191
5211
|
}
|
|
5192
5212
|
}
|
|
5193
5213
|
}
|
|
5194
5214
|
}
|
|
5195
|
-
class
|
|
5215
|
+
class qr {
|
|
5196
5216
|
constructor(e) {
|
|
5197
5217
|
h(this, "dataLayer"), h(this, "config"), h(this, "containerId"), h(this, "previousButtonClass"), h(this, "nextButtonClass"), h(this, "loadMoreButtonClass"), h(this, "routerHelper"), h(this, "searchPaginationMainContainer", null);
|
|
5198
5218
|
var t, s, a, r, o, n, l, c, g;
|
|
@@ -5510,7 +5530,7 @@ class Jr {
|
|
|
5510
5530
|
}, 200);
|
|
5511
5531
|
}
|
|
5512
5532
|
cleanSuggestionTerm(e) {
|
|
5513
|
-
return
|
|
5533
|
+
return ae.removeXSSRiskyTags(
|
|
5514
5534
|
e.replace(/(<([^>]+)>)/gi, "")
|
|
5515
5535
|
).trim();
|
|
5516
5536
|
}
|
|
@@ -5700,7 +5720,7 @@ class Kr {
|
|
|
5700
5720
|
}
|
|
5701
5721
|
class Zr {
|
|
5702
5722
|
constructor(e) {
|
|
5703
|
-
h(this, "analyticsKey"), h(this, "containerId"), h(this, "mainContainer"), h(this, "isLightweight"), h(this, "emailOverride"), h(this, "feedbackTextAreaOverride"), h(this, "mainTemplateOverride"), h(this, "lightweightTemplateOverride"), h(this, "focusedElement", null), h(this, "templateData", {
|
|
5723
|
+
h(this, "analyticsKey"), h(this, "containerId"), h(this, "mainContainer"), h(this, "isLightweight"), h(this, "emailOverride"), h(this, "feedbackTextAreaOverride"), h(this, "mainTemplateOverride"), h(this, "lightweightTemplateOverride"), h(this, "focusedElement", null), h(this, "focusTrapListener", null), h(this, "lastFocusedElementBeforeModal", null), h(this, "templateData", {
|
|
5704
5724
|
feedbackOpen: !1,
|
|
5705
5725
|
ratings: [
|
|
5706
5726
|
{ index: 1, isSelected: !1 },
|
|
@@ -5728,7 +5748,7 @@ class Zr {
|
|
|
5728
5748
|
}), h(this, "thumbsUpValue", 10), h(this, "thumbsDownValue", 1), h(this, "ratedQuestion", ""), h(this, "language", ""), h(this, "model", ""), this.analyticsKey = e.analyticsKey, this.containerId = e.containerId ?? "sf-feedback", this.isLightweight = e.lightweight ?? !1, this.isLightweight && this.templateData.ratings.unshift({ index: 0, isSelected: !1 }), this.thumbsUpValue = e.thumbsUpValue ?? 10, this.thumbsDownValue = e.thumbsDownValue ?? 1, this.emailOverride = e.emailOverride, this.feedbackTextAreaOverride = e.feedbackTextAreaOverride, this.mainTemplateOverride = e.mainTemplateOverride, this.lightweightTemplateOverride = e.lightweightTemplateOverride, this.mainContainer = document.getElementById(this.containerId), this.language = e.language ?? "", this.model = e.model ?? "", this.init();
|
|
5729
5749
|
}
|
|
5730
5750
|
init() {
|
|
5731
|
-
|
|
5751
|
+
ye.attachAnalyticsScript(), this.renderMainTemplate(this.generateTemplateData());
|
|
5732
5752
|
}
|
|
5733
5753
|
generateTemplateData() {
|
|
5734
5754
|
return this.templateData;
|
|
@@ -5736,9 +5756,9 @@ class Zr {
|
|
|
5736
5756
|
renderMainTemplate(e) {
|
|
5737
5757
|
var t, s;
|
|
5738
5758
|
const a = document.activeElement;
|
|
5739
|
-
|
|
5740
|
-
let r = (t =
|
|
5741
|
-
if (this.mainTemplateOverride && (r = this.mainTemplateOverride), this.isLightweight && (r = (s =
|
|
5759
|
+
(a instanceof HTMLInputElement || a instanceof HTMLButtonElement) && (a.type === "radio" || a.type === "button") ? this.focusedElement = a : this.focusedElement = null, this.mainContainer;
|
|
5760
|
+
let r = (t = ie == null ? void 0 : ie.mainTemplate) == null ? void 0 : t.template;
|
|
5761
|
+
if (this.mainTemplateOverride && (r = this.mainTemplateOverride), this.isLightweight && (r = (s = ie.lightweightTemplate) == null ? void 0 : s.template, this.lightweightTemplateOverride && (r = this.lightweightTemplateOverride)), this.mainContainer.innerHTML = O.render(r, e), this.focusedElement && this.mainContainer) {
|
|
5742
5762
|
const o = this.focusedElement.type === "radio" ? this.focusedElement.getAttribute("id") : this.focusedElement.getAttribute("class"), n = this.focusedElement.type === "radio" ? "id" : "class", l = this.mainContainer.querySelector(
|
|
5743
5763
|
`[${n}="${o}"]`
|
|
5744
5764
|
);
|
|
@@ -5749,9 +5769,38 @@ class Zr {
|
|
|
5749
5769
|
attachEvents() {
|
|
5750
5770
|
this.isLightweight ? this.attachLightweightEvents() : (this.attachOpenModalEvent(), this.closeModalEvent(), this.attachRatingEvents(), this.attachTextAreaEvents(), this.attachEmailInputEvents(), this.attachSubmitButtonEvents());
|
|
5751
5771
|
}
|
|
5772
|
+
attachFocusTrap() {
|
|
5773
|
+
this.focusTrapListener && document.removeEventListener("keydown", this.focusTrapListener), this.focusTrapListener = (e) => {
|
|
5774
|
+
if (!this.templateData.feedbackOpen)
|
|
5775
|
+
return;
|
|
5776
|
+
const t = this.getModalElement();
|
|
5777
|
+
if (!t)
|
|
5778
|
+
return;
|
|
5779
|
+
const s = this.getFocusableElements(t), a = s[0], r = s[s.length - 1];
|
|
5780
|
+
e.key === "Tab" && (e.shiftKey ? document.activeElement === a && (e.preventDefault(), r == null || r.focus()) : document.activeElement === r && (e.preventDefault(), a == null || a.focus())), e.key === "Escape" && (e.preventDefault(), this.closeFeedbackModal());
|
|
5781
|
+
}, document.addEventListener("keydown", this.focusTrapListener);
|
|
5782
|
+
}
|
|
5783
|
+
getFocusableElements(e) {
|
|
5784
|
+
const t = [
|
|
5785
|
+
"button:not([disabled])",
|
|
5786
|
+
"input:not([disabled])",
|
|
5787
|
+
"textarea:not([disabled])",
|
|
5788
|
+
"select:not([disabled])",
|
|
5789
|
+
"a[href]",
|
|
5790
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
5791
|
+
].join(", ");
|
|
5792
|
+
return Array.from(
|
|
5793
|
+
e.querySelectorAll(t)
|
|
5794
|
+
);
|
|
5795
|
+
}
|
|
5796
|
+
getModalElement() {
|
|
5797
|
+
var e, t;
|
|
5798
|
+
const s = (e = ie.mainTemplate) == null ? void 0 : e.modalContainerClass;
|
|
5799
|
+
return ((t = this.mainContainer) == null ? void 0 : t.querySelector(`.${s}`)) || null;
|
|
5800
|
+
}
|
|
5752
5801
|
attachLightweightEvents() {
|
|
5753
5802
|
var e, t, s, a;
|
|
5754
|
-
const r = (e =
|
|
5803
|
+
const r = (e = ie.lightweightTemplate) == null ? void 0 : e.thumbsUpButtonClass, o = (t = ie.lightweightTemplate) == null ? void 0 : t.thumbsDownButtonClass, n = (s = this.mainContainer) == null ? void 0 : s.querySelector(
|
|
5755
5804
|
"." + r
|
|
5756
5805
|
), l = (a = this.mainContainer) == null ? void 0 : a.querySelector(
|
|
5757
5806
|
"." + o
|
|
@@ -5770,7 +5819,7 @@ class Zr {
|
|
|
5770
5819
|
}
|
|
5771
5820
|
attachSubmitButtonEvents() {
|
|
5772
5821
|
var e, t;
|
|
5773
|
-
const s = (e =
|
|
5822
|
+
const s = (e = ie.mainTemplate) == null ? void 0 : e.submitButtonClass, a = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5774
5823
|
"." + s
|
|
5775
5824
|
);
|
|
5776
5825
|
a && a.addEventListener("click", () => {
|
|
@@ -5780,7 +5829,7 @@ class Zr {
|
|
|
5780
5829
|
checkIfValid() {
|
|
5781
5830
|
var e, t;
|
|
5782
5831
|
const s = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5783
|
-
"#" + ((e =
|
|
5832
|
+
"#" + ((e = ie.mainTemplate) == null ? void 0 : e.emailInputId)
|
|
5784
5833
|
);
|
|
5785
5834
|
this.validateEmail(s.value) ? this.templateData.errors.email = !1 : (this.templateData.errors.email = !0, K.setAccessibilityText(
|
|
5786
5835
|
"Please enter a valid email address."
|
|
@@ -5794,17 +5843,14 @@ class Zr {
|
|
|
5794
5843
|
const t = (e = this.templateData.ratings.find(
|
|
5795
5844
|
(s) => s.isSelected
|
|
5796
5845
|
)) == null ? void 0 : e.index;
|
|
5797
|
-
t !== void 0 && (
|
|
5846
|
+
t !== void 0 && (ye.trackFeedback({
|
|
5798
5847
|
trackApiKey: this.analyticsKey,
|
|
5799
5848
|
email: this.emailOverride && this.isLightweight ? this.emailOverride() : this.templateData.emailInput,
|
|
5800
5849
|
rating: t,
|
|
5801
5850
|
feedback: this.feedbackTextAreaOverride && this.isLightweight ? this.feedbackTextAreaOverride() : this.templateData.feedbackTextArea,
|
|
5802
5851
|
model: this.model ? this.model : void 0,
|
|
5803
5852
|
language: this.language ? this.language : void 0
|
|
5804
|
-
}), K.setAccessibilityText(
|
|
5805
|
-
"Feedback has been sent.",
|
|
5806
|
-
1e3
|
|
5807
|
-
)), this.renderMainTemplate(this.generateTemplateData());
|
|
5853
|
+
}), K.setAccessibilityText("Feedback has been sent.", 1e3)), this.renderMainTemplate(this.generateTemplateData());
|
|
5808
5854
|
}
|
|
5809
5855
|
validateEmail(e) {
|
|
5810
5856
|
return e === "" ? !0 : /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
@@ -5812,7 +5858,7 @@ class Zr {
|
|
|
5812
5858
|
attachEmailInputEvents() {
|
|
5813
5859
|
var e, t;
|
|
5814
5860
|
const s = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5815
|
-
"#" + ((e =
|
|
5861
|
+
"#" + ((e = ie.mainTemplate) == null ? void 0 : e.emailInputId)
|
|
5816
5862
|
);
|
|
5817
5863
|
s && (s.addEventListener("input", () => {
|
|
5818
5864
|
this.templateData.emailInput = s.value;
|
|
@@ -5827,20 +5873,20 @@ class Zr {
|
|
|
5827
5873
|
attachTextAreaEvents() {
|
|
5828
5874
|
var e, t;
|
|
5829
5875
|
const s = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5830
|
-
"#" + ((e =
|
|
5876
|
+
"#" + ((e = ie.mainTemplate) == null ? void 0 : e.feedbackTextAreaId)
|
|
5831
5877
|
);
|
|
5832
5878
|
s && s.addEventListener("input", () => {
|
|
5833
5879
|
var a, r;
|
|
5834
5880
|
this.templateData.feedbackTextArea = s.value, this.templateData.charactersLeft = this.templateData.maxLength - s.value.length;
|
|
5835
5881
|
const o = (r = this.mainContainer) == null ? void 0 : r.querySelector(
|
|
5836
|
-
"." + ((a =
|
|
5882
|
+
"." + ((a = ie.mainTemplate) == null ? void 0 : a.charactersRemainingContainerclass)
|
|
5837
5883
|
);
|
|
5838
5884
|
o && (o.innerText = this.templateData.charactersLeft + "");
|
|
5839
5885
|
});
|
|
5840
5886
|
}
|
|
5841
5887
|
attachRatingEvents() {
|
|
5842
5888
|
var e, t;
|
|
5843
|
-
const s = (e =
|
|
5889
|
+
const s = (e = ie.mainTemplate) == null ? void 0 : e.ratingInputclass, a = (t = this.mainContainer) == null ? void 0 : t.querySelectorAll(
|
|
5844
5890
|
"." + s
|
|
5845
5891
|
);
|
|
5846
5892
|
a && a.forEach((r) => {
|
|
@@ -5854,7 +5900,7 @@ class Zr {
|
|
|
5854
5900
|
}
|
|
5855
5901
|
attachOpenModalEvent() {
|
|
5856
5902
|
var e, t;
|
|
5857
|
-
const s = (e =
|
|
5903
|
+
const s = (e = ie.mainTemplate) == null ? void 0 : e.openModalButtonClass, a = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5858
5904
|
"." + s
|
|
5859
5905
|
);
|
|
5860
5906
|
a && a.addEventListener("click", (r) => {
|
|
@@ -5866,7 +5912,7 @@ class Zr {
|
|
|
5866
5912
|
}
|
|
5867
5913
|
closeModalEvent() {
|
|
5868
5914
|
var e, t;
|
|
5869
|
-
const s = (e =
|
|
5915
|
+
const s = (e = ie.mainTemplate) == null ? void 0 : e.closeModalButtonClass, a = (t = this.mainContainer) == null ? void 0 : t.querySelector(
|
|
5870
5916
|
"." + s
|
|
5871
5917
|
);
|
|
5872
5918
|
a && a.addEventListener("click", () => {
|
|
@@ -5874,10 +5920,21 @@ class Zr {
|
|
|
5874
5920
|
});
|
|
5875
5921
|
}
|
|
5876
5922
|
openFeedbackModal() {
|
|
5877
|
-
this.templateData.feedbackOpen = !0, this.renderMainTemplate(this.generateTemplateData()),
|
|
5923
|
+
this.lastFocusedElementBeforeModal = document.activeElement, this.templateData.feedbackOpen = !0, this.renderMainTemplate(this.generateTemplateData()), setTimeout(() => {
|
|
5924
|
+
const e = this.getModalElement();
|
|
5925
|
+
if (e) {
|
|
5926
|
+
const t = this.getFocusableElements(e);
|
|
5927
|
+
t.length > 0 && t[0].focus();
|
|
5928
|
+
}
|
|
5929
|
+
this.attachFocusTrap();
|
|
5930
|
+
}, 0), K.setAccessibilityText("Feedback form opened", 1e3);
|
|
5878
5931
|
}
|
|
5879
5932
|
closeFeedbackModal() {
|
|
5880
|
-
this.templateData.feedbackOpen = !1, this.renderMainTemplate(this.generateTemplateData()), K.setAccessibilityText("Feedback form closed", 1e3);
|
|
5933
|
+
this.templateData.feedbackOpen = !1, this.focusTrapListener && (document.removeEventListener("keydown", this.focusTrapListener), this.focusTrapListener = null), this.renderMainTemplate(this.generateTemplateData()), this.lastFocusedElementBeforeModal && (this.lastFocusedElementBeforeModal.focus(), this.lastFocusedElementBeforeModal = null), K.setAccessibilityText("Feedback form closed", 1e3);
|
|
5934
|
+
}
|
|
5935
|
+
// Clean up event listeners when widget is destroyed
|
|
5936
|
+
destroy() {
|
|
5937
|
+
this.focusTrapListener && (document.removeEventListener("keydown", this.focusTrapListener), this.focusTrapListener = null);
|
|
5881
5938
|
}
|
|
5882
5939
|
}
|
|
5883
5940
|
class Xr {
|
|
@@ -5941,7 +5998,7 @@ class Xr {
|
|
|
5941
5998
|
trackLinkClick(e) {
|
|
5942
5999
|
e.preventDefault(), e.stopPropagation();
|
|
5943
6000
|
const t = e.target.getAttribute("href");
|
|
5944
|
-
|
|
6001
|
+
ye.trackAnswerLinkClick({ href: t, answer: this.dataLayer.parsedData.getAnswerData, ...this.dataLayer.parsedData.trackingData }).then(
|
|
5945
6002
|
() => {
|
|
5946
6003
|
window.open(t, "_blank");
|
|
5947
6004
|
}
|
|
@@ -6014,10 +6071,10 @@ class Ss {
|
|
|
6014
6071
|
"change",
|
|
6015
6072
|
this.radiusSelectChangeEvent.bind(this)
|
|
6016
6073
|
));
|
|
6017
|
-
const k = ((l = (n = this.config.templates) == null ? void 0 : n.mainTemplate) == null ? void 0 : l.currentLocationActionButtonId) || C.location.mainTemplate.currentLocationActionButtonId,
|
|
6074
|
+
const k = ((l = (n = this.config.templates) == null ? void 0 : n.mainTemplate) == null ? void 0 : l.currentLocationActionButtonId) || C.location.mainTemplate.currentLocationActionButtonId, A = document == null ? void 0 : document.querySelector(
|
|
6018
6075
|
`#${k}`
|
|
6019
6076
|
);
|
|
6020
|
-
|
|
6077
|
+
A && A.addEventListener(
|
|
6021
6078
|
"click",
|
|
6022
6079
|
this.getCurrentLocation.bind(this)
|
|
6023
6080
|
);
|
|
@@ -6060,7 +6117,7 @@ class Ss {
|
|
|
6060
6117
|
});
|
|
6061
6118
|
}
|
|
6062
6119
|
cleanSuggestionTerm(e) {
|
|
6063
|
-
return
|
|
6120
|
+
return ae.removeXSSRiskyTags(
|
|
6064
6121
|
e.replace(/(<([^>]+)>)/gi, "")
|
|
6065
6122
|
).trim();
|
|
6066
6123
|
}
|
|
@@ -6103,7 +6160,7 @@ class en {
|
|
|
6103
6160
|
), this.previousQuery = s.query;
|
|
6104
6161
|
});
|
|
6105
6162
|
}, 10), this.dataLayer.$searchResults.subscribe((s) => {
|
|
6106
|
-
s && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled &&
|
|
6163
|
+
s && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && ye.trackSearch({
|
|
6107
6164
|
...this.dataLayer.parsedData.trackingData,
|
|
6108
6165
|
impressions: this.dataLayer.searchResultsMetadata.impressions
|
|
6109
6166
|
});
|
|
@@ -6117,7 +6174,7 @@ class en {
|
|
|
6117
6174
|
));
|
|
6118
6175
|
}
|
|
6119
6176
|
attachAnalyticsScript(e) {
|
|
6120
|
-
|
|
6177
|
+
ye.attachAnalyticsScript(e);
|
|
6121
6178
|
}
|
|
6122
6179
|
initialize(e) {
|
|
6123
6180
|
var t, s;
|
|
@@ -6172,7 +6229,7 @@ class en {
|
|
|
6172
6229
|
relatedSearch: o.related_search,
|
|
6173
6230
|
position: o.position
|
|
6174
6231
|
});
|
|
6175
|
-
this.dataLayer.setSearchRelatedSearches(a), this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled &&
|
|
6232
|
+
this.dataLayer.setSearchRelatedSearches(a), this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && ye.trackRelatedSearches({
|
|
6176
6233
|
...this.dataLayer.parsedData.trackingData,
|
|
6177
6234
|
impressions: r,
|
|
6178
6235
|
totalRelatredSearches: ((s = this.dataLayer.searchRelatedSearches) == null ? void 0 : s.length) ?? 0
|
|
@@ -6263,7 +6320,7 @@ class en {
|
|
|
6263
6320
|
}));
|
|
6264
6321
|
}
|
|
6265
6322
|
addPaginationWidget(e, t) {
|
|
6266
|
-
this.searchPaginationConfig = t, this.searchPaginationWidget = new
|
|
6323
|
+
this.searchPaginationConfig = t, this.searchPaginationWidget = new qr({
|
|
6267
6324
|
containerId: e,
|
|
6268
6325
|
config: t,
|
|
6269
6326
|
dataLayer: this.dataLayer,
|
|
@@ -6296,14 +6353,14 @@ class en {
|
|
|
6296
6353
|
}, 0);
|
|
6297
6354
|
}
|
|
6298
6355
|
addExternalPromotionsWidget(e, t) {
|
|
6299
|
-
this.externalPromotionsConfig = t, this.externalPromotionsWidget = new
|
|
6356
|
+
this.externalPromotionsConfig = t, this.externalPromotionsWidget = new Br({
|
|
6300
6357
|
containerId: e,
|
|
6301
6358
|
config: t,
|
|
6302
6359
|
dataLayer: this.dataLayer
|
|
6303
6360
|
});
|
|
6304
6361
|
}
|
|
6305
6362
|
addFacetsWidget(e, t) {
|
|
6306
|
-
this.searchFacetsConfig = t, this.searchFacetsWidget = new
|
|
6363
|
+
this.searchFacetsConfig = t, this.searchFacetsWidget = new Hr(
|
|
6307
6364
|
{
|
|
6308
6365
|
containerId: e,
|
|
6309
6366
|
config: t,
|
|
@@ -6315,7 +6372,7 @@ class en {
|
|
|
6315
6372
|
}
|
|
6316
6373
|
executeSearch(e, t) {
|
|
6317
6374
|
const s = { ...this.dataLayer.searchObject };
|
|
6318
|
-
s.query =
|
|
6375
|
+
s.query = ae.removeXSSRiskyTags(e), s.page = 1, s.facets = [], s.location = { ...s.location }, this.locationObserver && this.dataLayer.$locationDecodingLoading.unsubscribe(
|
|
6319
6376
|
this.locationObserver
|
|
6320
6377
|
), this.locationObserver = this.dataLayer.$locationDecodingLoading.subscribeUntil(() => {
|
|
6321
6378
|
var a, r;
|
|
@@ -6331,7 +6388,7 @@ class en {
|
|
|
6331
6388
|
}
|
|
6332
6389
|
trackRelatedSearchClick(e) {
|
|
6333
6390
|
var t;
|
|
6334
|
-
this.dataLayer.searchResultsMetadata && this.dataLayer.searchRelatedSearches && !this.dataLayer.cookiesDisabled &&
|
|
6391
|
+
this.dataLayer.searchResultsMetadata && this.dataLayer.searchRelatedSearches && !this.dataLayer.cookiesDisabled && ye.trackRelatedSearchClick({
|
|
6335
6392
|
...this.dataLayer.parsedData.trackingData,
|
|
6336
6393
|
relatedSearch: e,
|
|
6337
6394
|
totalRelatredSearches: ((t = this.dataLayer.searchRelatedSearches) == null ? void 0 : t.length) ?? 0
|
|
@@ -6343,7 +6400,7 @@ class en {
|
|
|
6343
6400
|
e,
|
|
6344
6401
|
this.dataLayer.searchResults ?? []
|
|
6345
6402
|
);
|
|
6346
|
-
a && ((s = (t = this.searchResultsConfig) == null ? void 0 : t.hooks) != null && s.afterLinkClick && (a = this.searchResultsConfig.hooks.afterLinkClick(a)), a && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled &&
|
|
6403
|
+
a && ((s = (t = this.searchResultsConfig) == null ? void 0 : t.hooks) != null && s.afterLinkClick && (a = this.searchResultsConfig.hooks.afterLinkClick(a)), a && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && ye.trackClick({
|
|
6347
6404
|
result: a,
|
|
6348
6405
|
...this.dataLayer.parsedData.trackingData
|
|
6349
6406
|
}).then(() => {
|
|
@@ -6368,7 +6425,7 @@ const b = {
|
|
|
6368
6425
|
//@ts-ignore
|
|
6369
6426
|
searchstax: new en("react")
|
|
6370
6427
|
};
|
|
6371
|
-
function
|
|
6428
|
+
function Hs(i, e, t, s, a, r, o, n) {
|
|
6372
6429
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: i && /* @__PURE__ */ u.jsx(
|
|
6373
6430
|
"div",
|
|
6374
6431
|
{
|
|
@@ -6414,12 +6471,12 @@ function qs(i, e, t, s, a, r, o, n) {
|
|
|
6414
6471
|
}
|
|
6415
6472
|
function tn(i) {
|
|
6416
6473
|
let e = !1;
|
|
6417
|
-
const [t, s] =
|
|
6474
|
+
const [t, s] = V(
|
|
6418
6475
|
null
|
|
6419
|
-
), [a, r] =
|
|
6476
|
+
), [a, r] = V(null), [o, n] = V(!1), [l, c] = V(
|
|
6420
6477
|
void 0
|
|
6421
|
-
), [g] =
|
|
6422
|
-
|
|
6478
|
+
), [g] = V(Math.random());
|
|
6479
|
+
we(() => {
|
|
6423
6480
|
if (m(), b.searchstax)
|
|
6424
6481
|
b.searchstax.addSearchLocationWidget(
|
|
6425
6482
|
"search-location-container" + g,
|
|
@@ -6462,7 +6519,7 @@ function tn(i) {
|
|
|
6462
6519
|
r(f), (x = b.searchstax.searchLocationWidget) == null || x.triggerGeocoder(f);
|
|
6463
6520
|
}
|
|
6464
6521
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-location-container" + g, children: [
|
|
6465
|
-
!i.searchLocationTemplate && t && /* @__PURE__ */ u.jsx(u.Fragment, { children:
|
|
6522
|
+
!i.searchLocationTemplate && t && /* @__PURE__ */ u.jsx(u.Fragment, { children: Hs(t, r, w, L, p, a, l, o) }),
|
|
6466
6523
|
i.searchLocationTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.searchLocationTemplate(t, r, w, L, p, a, l, o) })
|
|
6467
6524
|
] }) });
|
|
6468
6525
|
}
|
|
@@ -6587,7 +6644,7 @@ function an(i, e, t, s) {
|
|
|
6587
6644
|
/* @__PURE__ */ u.jsx(
|
|
6588
6645
|
tn,
|
|
6589
6646
|
{
|
|
6590
|
-
searchLocationTemplate:
|
|
6647
|
+
searchLocationTemplate: Hs,
|
|
6591
6648
|
hooks: {
|
|
6592
6649
|
locationDecode: $t.locationDecode,
|
|
6593
6650
|
locationDecodeCoordinatesToAddress: $t.locationDecodeCoordinatesToAddress
|
|
@@ -6608,10 +6665,10 @@ function an(i, e, t, s) {
|
|
|
6608
6665
|
}
|
|
6609
6666
|
function fn(i) {
|
|
6610
6667
|
let e = !1;
|
|
6611
|
-
const [t, s] =
|
|
6668
|
+
const [t, s] = V([]), [a, r] = V(
|
|
6612
6669
|
null
|
|
6613
6670
|
);
|
|
6614
|
-
|
|
6671
|
+
we(() => {
|
|
6615
6672
|
if (o(), b.searchstax) {
|
|
6616
6673
|
const g = {};
|
|
6617
6674
|
i.afterAutosuggest && (g.afterAutosuggest = i.afterAutosuggest), i.beforeAutosuggest && (g.beforeAutosuggest = i.beforeAutosuggest), b.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
@@ -6674,8 +6731,8 @@ function fn(i) {
|
|
|
6674
6731
|
) }) });
|
|
6675
6732
|
}
|
|
6676
6733
|
function Ln(i) {
|
|
6677
|
-
const [e, t] =
|
|
6678
|
-
return
|
|
6734
|
+
const [e, t] = V(!1);
|
|
6735
|
+
return we(() => {
|
|
6679
6736
|
const s = {};
|
|
6680
6737
|
i.beforeSearch && (s.beforeSearch = i.beforeSearch), i != null && i.afterSearch && (s.afterSearch = i.afterSearch), b.searchstax.initialize({
|
|
6681
6738
|
language: i.language ?? "en",
|
|
@@ -6838,16 +6895,16 @@ function rn(i, e) {
|
|
|
6838
6895
|
}) }) });
|
|
6839
6896
|
}
|
|
6840
6897
|
function yn(i) {
|
|
6841
|
-
const [e, t] =
|
|
6898
|
+
const [e, t] = V(
|
|
6842
6899
|
null
|
|
6843
6900
|
), s = ai();
|
|
6844
6901
|
s.current = e;
|
|
6845
|
-
const [a, r] =
|
|
6902
|
+
const [a, r] = V(""), [o, n] = V(
|
|
6846
6903
|
null
|
|
6847
6904
|
), l = (m, p) => {
|
|
6848
6905
|
p.preventDefault(), p.stopPropagation(), b.searchstax.executeLinkClick(m.uniqueId);
|
|
6849
6906
|
};
|
|
6850
|
-
|
|
6907
|
+
we(() => {
|
|
6851
6908
|
g();
|
|
6852
6909
|
const m = {};
|
|
6853
6910
|
i.afterLinkClick && (m.afterLinkClick = i.afterLinkClick), b.searchstax.addSearchResultsWidget("searchstax-results-container", {
|
|
@@ -6950,10 +7007,10 @@ function on(i, e) {
|
|
|
6950
7007
|
}
|
|
6951
7008
|
function wn(i) {
|
|
6952
7009
|
let e = !1;
|
|
6953
|
-
const [t, s] =
|
|
7010
|
+
const [t, s] = V(!1), [a, r] = V(
|
|
6954
7011
|
null
|
|
6955
|
-
), [o] =
|
|
6956
|
-
|
|
7012
|
+
), [o] = V(Math.random());
|
|
7013
|
+
we(() => {
|
|
6957
7014
|
if (n(), b.searchstax)
|
|
6958
7015
|
b.searchstax.addPaginationWidget(
|
|
6959
7016
|
"searchstax-pagination-container" + o,
|
|
@@ -7017,10 +7074,10 @@ function ln(i, e, t) {
|
|
|
7017
7074
|
}
|
|
7018
7075
|
function xn(i) {
|
|
7019
7076
|
let e = !1;
|
|
7020
|
-
const [t, s] =
|
|
7077
|
+
const [t, s] = V(
|
|
7021
7078
|
null
|
|
7022
|
-
), [a, r] =
|
|
7023
|
-
|
|
7079
|
+
), [a, r] = V(""), [o] = V(Math.random());
|
|
7080
|
+
we(() => {
|
|
7024
7081
|
if (n(), b.searchstax)
|
|
7025
7082
|
b.searchstax.addSearchSortingWidget(
|
|
7026
7083
|
"search-sorting-container" + o,
|
|
@@ -7097,8 +7154,8 @@ function cn(i, e) {
|
|
|
7097
7154
|
}
|
|
7098
7155
|
function vn(i) {
|
|
7099
7156
|
let e = !1;
|
|
7100
|
-
const [t, s] =
|
|
7101
|
-
|
|
7157
|
+
const [t, s] = V(null), [a] = V(Math.random());
|
|
7158
|
+
we(() => {
|
|
7102
7159
|
if (r(), b.searchstax)
|
|
7103
7160
|
b.searchstax.addSearchFeedbackWidget("search-feedback-container" + a, {});
|
|
7104
7161
|
else
|
|
@@ -7401,6 +7458,7 @@ function un(i, e, t, s, a, r, o, n, l, c, g, m) {
|
|
|
7401
7458
|
(L.key === "Enter" || L.key === " ") && l(L, p);
|
|
7402
7459
|
},
|
|
7403
7460
|
tabIndex: 0,
|
|
7461
|
+
role: "button",
|
|
7404
7462
|
children: [
|
|
7405
7463
|
p.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-less-button searchstax-facet-show-button", children: "less" }),
|
|
7406
7464
|
!p.showingAllFacets && /* @__PURE__ */ u.jsx("div", { className: "searchstax-facet-show-more-button searchstax-facet-show-button", children: "more" })
|
|
@@ -7430,17 +7488,17 @@ function un(i, e, t, s, a, r, o, n, l, c, g, m) {
|
|
|
7430
7488
|
] }) }) : /* @__PURE__ */ u.jsx(u.Fragment, {});
|
|
7431
7489
|
}
|
|
7432
7490
|
function bn(i) {
|
|
7433
|
-
const [e, t] =
|
|
7491
|
+
const [e, t] = V(
|
|
7434
7492
|
null
|
|
7435
|
-
), [s, a] =
|
|
7493
|
+
), [s, a] = V(
|
|
7436
7494
|
null
|
|
7437
|
-
), [r, o] =
|
|
7495
|
+
), [r, o] = V(
|
|
7438
7496
|
[]
|
|
7439
|
-
), [n, l] =
|
|
7497
|
+
), [n, l] = V(
|
|
7440
7498
|
{}
|
|
7441
7499
|
), c = {}, g = Math.random();
|
|
7442
7500
|
let m = !1;
|
|
7443
|
-
|
|
7501
|
+
we(() => {
|
|
7444
7502
|
if (p(), b.searchstax)
|
|
7445
7503
|
b.searchstax.addFacetsWidget("searchstax-facets-container" + g, {
|
|
7446
7504
|
facetingType: i.facetingType,
|
|
@@ -7482,10 +7540,10 @@ function bn(i) {
|
|
|
7482
7540
|
var $;
|
|
7483
7541
|
return ($ = b.searchstax.searchFacetsWidget) == null ? void 0 : $.isChecked(T);
|
|
7484
7542
|
}
|
|
7485
|
-
function
|
|
7486
|
-
var
|
|
7487
|
-
const
|
|
7488
|
-
Re[0] && ((
|
|
7543
|
+
function A(T, $, Z, xe, W) {
|
|
7544
|
+
var ve;
|
|
7545
|
+
const ce = W ? "mobile-" : "desktop-", Re = document.getElementsByClassName(ce + T);
|
|
7546
|
+
Re[0] && ((ve = b.searchstax.searchFacetsWidget) == null || ve.onFacetSelect(
|
|
7489
7547
|
$,
|
|
7490
7548
|
Z,
|
|
7491
7549
|
Re[0],
|
|
@@ -7501,7 +7559,7 @@ function bn(i) {
|
|
|
7501
7559
|
!1
|
|
7502
7560
|
);
|
|
7503
7561
|
}
|
|
7504
|
-
function
|
|
7562
|
+
function E(T, $) {
|
|
7505
7563
|
var Z;
|
|
7506
7564
|
(Z = b.searchstax.searchFacetsWidget) == null || Z.onShowMoreLessClick(
|
|
7507
7565
|
T,
|
|
@@ -7518,27 +7576,27 @@ function bn(i) {
|
|
|
7518
7576
|
(T = b.searchstax.searchFacetsWidget) == null || T.closeOverlay();
|
|
7519
7577
|
}
|
|
7520
7578
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" + g, children: [
|
|
7521
|
-
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: hn(e, c, f, x,
|
|
7579
|
+
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: hn(e, c, f, x, A, k, P) }),
|
|
7522
7580
|
i.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateDesktop(
|
|
7523
7581
|
e,
|
|
7524
7582
|
c,
|
|
7525
7583
|
f,
|
|
7526
7584
|
x,
|
|
7527
|
-
|
|
7585
|
+
A,
|
|
7528
7586
|
k,
|
|
7529
7587
|
P
|
|
7530
7588
|
) }),
|
|
7531
|
-
(s == null ? void 0 : s.hasResultsOrExternalPromotions) && !i.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: un(s, r, c, f, x,
|
|
7589
|
+
(s == null ? void 0 : s.hasResultsOrExternalPromotions) && !i.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: un(s, r, c, f, x, A, k, L, E, N, Y, w) }),
|
|
7532
7590
|
i.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.facetsTemplateMobile(
|
|
7533
7591
|
s,
|
|
7534
7592
|
r,
|
|
7535
7593
|
c,
|
|
7536
7594
|
f,
|
|
7537
7595
|
x,
|
|
7538
|
-
|
|
7596
|
+
A,
|
|
7539
7597
|
k,
|
|
7540
7598
|
L,
|
|
7541
|
-
|
|
7599
|
+
E,
|
|
7542
7600
|
N,
|
|
7543
7601
|
Y,
|
|
7544
7602
|
w
|
|
@@ -7581,8 +7639,8 @@ function dn(i, e) {
|
|
|
7581
7639
|
}
|
|
7582
7640
|
function Mn(i) {
|
|
7583
7641
|
let e = !1;
|
|
7584
|
-
const [t, s] =
|
|
7585
|
-
|
|
7642
|
+
const [t, s] = V(null), [a] = V(Math.random());
|
|
7643
|
+
we(() => {
|
|
7586
7644
|
if (r(), b.searchstax)
|
|
7587
7645
|
b.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + a, {
|
|
7588
7646
|
relatedSearchesURL: i.relatedSearchesURL,
|
|
@@ -7642,10 +7700,10 @@ function gn(i, e) {
|
|
|
7642
7700
|
}
|
|
7643
7701
|
function Cn(i) {
|
|
7644
7702
|
let e = !1;
|
|
7645
|
-
const [t, s] =
|
|
7703
|
+
const [t, s] = V(
|
|
7646
7704
|
null
|
|
7647
|
-
), [a] =
|
|
7648
|
-
|
|
7705
|
+
), [a] = V(Math.random());
|
|
7706
|
+
we(() => {
|
|
7649
7707
|
if (r(), b.searchstax)
|
|
7650
7708
|
b.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + a, {});
|
|
7651
7709
|
else
|
|
@@ -7703,10 +7761,10 @@ function pn(i, e) {
|
|
|
7703
7761
|
}
|
|
7704
7762
|
function Sn(i) {
|
|
7705
7763
|
let e = !1;
|
|
7706
|
-
const [t, s] =
|
|
7764
|
+
const [t, s] = V(
|
|
7707
7765
|
null
|
|
7708
|
-
), [a] =
|
|
7709
|
-
|
|
7766
|
+
), [a] = V(Math.random());
|
|
7767
|
+
we(() => {
|
|
7710
7768
|
if (o(), b.searchstax) {
|
|
7711
7769
|
const n = i.feedbackwidget ?? void 0;
|
|
7712
7770
|
b.searchstax.addAnswerWidget(
|