@searchstax-inc/searchstudio-ux-react 4.1.72 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var ar = Object.defineProperty;
|
|
2
2
|
var sr = (r, e, t) => e in r ? ar(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var h = (r, e, t) => (sr(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import rr, { useState as
|
|
5
|
-
var
|
|
4
|
+
import rr, { useState as W, useEffect as xe, useRef as ir, createRef as Is } from "react";
|
|
5
|
+
var fa = { exports: {} }, lt = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,11 +12,11 @@ var ma = { exports: {} }, nt = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var is;
|
|
16
16
|
function nr() {
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
19
|
-
|
|
17
|
+
if (is)
|
|
18
|
+
return lt;
|
|
19
|
+
is = 1;
|
|
20
20
|
var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
21
21
|
function t(a, s, i) {
|
|
22
22
|
var n = null;
|
|
@@ -34,9 +34,9 @@ function nr() {
|
|
|
34
34
|
props: i
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return lt.Fragment = e, lt.jsx = t, lt.jsxs = t, lt;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var ht = {};
|
|
40
40
|
/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-jsx-runtime.development.js
|
|
@@ -46,20 +46,20 @@ var ot = {};
|
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
var
|
|
49
|
+
var ns;
|
|
50
50
|
function or() {
|
|
51
|
-
return
|
|
51
|
+
return ns || (ns = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
52
|
function r(L) {
|
|
53
53
|
if (L == null)
|
|
54
54
|
return null;
|
|
55
55
|
if (typeof L == "function")
|
|
56
|
-
return L.$$typeof ===
|
|
56
|
+
return L.$$typeof === H ? null : L.displayName || L.name || null;
|
|
57
57
|
if (typeof L == "string")
|
|
58
58
|
return L;
|
|
59
59
|
switch (L) {
|
|
60
60
|
case x:
|
|
61
61
|
return "Fragment";
|
|
62
|
-
case
|
|
62
|
+
case A:
|
|
63
63
|
return "Profiler";
|
|
64
64
|
case k:
|
|
65
65
|
return "StrictMode";
|
|
@@ -67,7 +67,7 @@ function or() {
|
|
|
67
67
|
return "Suspense";
|
|
68
68
|
case v:
|
|
69
69
|
return "SuspenseList";
|
|
70
|
-
case
|
|
70
|
+
case ge:
|
|
71
71
|
return "Activity";
|
|
72
72
|
}
|
|
73
73
|
if (typeof L == "object")
|
|
@@ -81,14 +81,14 @@ function or() {
|
|
|
81
81
|
case P:
|
|
82
82
|
return (L._context.displayName || "Context") + ".Consumer";
|
|
83
83
|
case O:
|
|
84
|
-
var
|
|
85
|
-
return L = L.displayName, L || (L =
|
|
84
|
+
var j = L.render;
|
|
85
|
+
return L = L.displayName, L || (L = j.displayName || j.name || "", L = L !== "" ? "ForwardRef(" + L + ")" : "ForwardRef"), L;
|
|
86
86
|
case D:
|
|
87
|
-
return
|
|
87
|
+
return j = L.displayName || null, j !== null ? j : r(L.type) || "Memo";
|
|
88
88
|
case B:
|
|
89
|
-
|
|
89
|
+
j = L._payload, L = L._init;
|
|
90
90
|
try {
|
|
91
|
-
return r(L(
|
|
91
|
+
return r(L(j));
|
|
92
92
|
} catch {
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -100,15 +100,15 @@ function or() {
|
|
|
100
100
|
function t(L) {
|
|
101
101
|
try {
|
|
102
102
|
e(L);
|
|
103
|
-
var
|
|
103
|
+
var j = !1;
|
|
104
104
|
} catch {
|
|
105
|
-
|
|
105
|
+
j = !0;
|
|
106
106
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
var I =
|
|
107
|
+
if (j) {
|
|
108
|
+
j = console;
|
|
109
|
+
var I = j.error, J = typeof Symbol == "function" && Symbol.toStringTag && L[Symbol.toStringTag] || L.constructor.name || "Object";
|
|
110
110
|
return I.call(
|
|
111
|
-
|
|
111
|
+
j,
|
|
112
112
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
113
113
|
J
|
|
114
114
|
), e(L);
|
|
@@ -120,8 +120,8 @@ function or() {
|
|
|
120
120
|
if (typeof L == "object" && L !== null && L.$$typeof === B)
|
|
121
121
|
return "<...>";
|
|
122
122
|
try {
|
|
123
|
-
var
|
|
124
|
-
return
|
|
123
|
+
var j = r(L);
|
|
124
|
+
return j ? "<" + j + ">" : "<...>";
|
|
125
125
|
} catch {
|
|
126
126
|
return "<...>";
|
|
127
127
|
}
|
|
@@ -134,18 +134,18 @@ function or() {
|
|
|
134
134
|
return Error("react-stack-top-frame");
|
|
135
135
|
}
|
|
136
136
|
function n(L) {
|
|
137
|
-
if (
|
|
138
|
-
var
|
|
139
|
-
if (
|
|
137
|
+
if (be.call(L, "key")) {
|
|
138
|
+
var j = Object.getOwnPropertyDescriptor(L, "key").get;
|
|
139
|
+
if (j && j.isReactWarning)
|
|
140
140
|
return !1;
|
|
141
141
|
}
|
|
142
142
|
return L.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function o(L,
|
|
144
|
+
function o(L, j) {
|
|
145
145
|
function I() {
|
|
146
|
-
|
|
146
|
+
Et || (Et = !0, console.error(
|
|
147
147
|
"%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)",
|
|
148
|
-
|
|
148
|
+
j
|
|
149
149
|
));
|
|
150
150
|
}
|
|
151
151
|
I.isReactWarning = !0, Object.defineProperty(L, "key", {
|
|
@@ -155,16 +155,16 @@ function or() {
|
|
|
155
155
|
}
|
|
156
156
|
function c() {
|
|
157
157
|
var L = r(this.type);
|
|
158
|
-
return
|
|
158
|
+
return At[L] || (At[L] = !0, console.error(
|
|
159
159
|
"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."
|
|
160
160
|
)), L = this.props.ref, L !== void 0 ? L : null;
|
|
161
161
|
}
|
|
162
|
-
function l(L,
|
|
162
|
+
function l(L, j, I, J, Q, ve) {
|
|
163
163
|
var U = I.ref;
|
|
164
164
|
return L = {
|
|
165
165
|
$$typeof: w,
|
|
166
166
|
type: L,
|
|
167
|
-
key:
|
|
167
|
+
key: j,
|
|
168
168
|
props: I,
|
|
169
169
|
_owner: J
|
|
170
170
|
}, (U !== void 0 ? U : null) !== null ? Object.defineProperty(L, "ref", {
|
|
@@ -189,14 +189,14 @@ function or() {
|
|
|
189
189
|
configurable: !1,
|
|
190
190
|
enumerable: !1,
|
|
191
191
|
writable: !0,
|
|
192
|
-
value:
|
|
192
|
+
value: ve
|
|
193
193
|
}), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
|
|
194
194
|
}
|
|
195
|
-
function g(L,
|
|
196
|
-
var U =
|
|
195
|
+
function g(L, j, I, J, Q, ve) {
|
|
196
|
+
var U = j.children;
|
|
197
197
|
if (U !== void 0)
|
|
198
198
|
if (J)
|
|
199
|
-
if (
|
|
199
|
+
if (Te(U)) {
|
|
200
200
|
for (J = 0; J < U.length; J++)
|
|
201
201
|
f(U[J]);
|
|
202
202
|
Object.freeze && Object.freeze(U);
|
|
@@ -206,12 +206,12 @@ function or() {
|
|
|
206
206
|
);
|
|
207
207
|
else
|
|
208
208
|
f(U);
|
|
209
|
-
if (
|
|
209
|
+
if (be.call(j, "key")) {
|
|
210
210
|
U = r(L);
|
|
211
|
-
var ie = Object.keys(
|
|
212
|
-
return
|
|
211
|
+
var ie = Object.keys(j).filter(function(rt) {
|
|
212
|
+
return rt !== "key";
|
|
213
213
|
});
|
|
214
|
-
J = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
214
|
+
J = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", st[U + J] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
215
215
|
`A props object containing a "key" prop is being spread into JSX:
|
|
216
216
|
let props = %s;
|
|
217
217
|
<%s {...props} />
|
|
@@ -222,14 +222,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
222
222
|
U,
|
|
223
223
|
ie,
|
|
224
224
|
U
|
|
225
|
-
),
|
|
225
|
+
), st[U + J] = !0);
|
|
226
226
|
}
|
|
227
|
-
if (U = null, I !== void 0 && (t(I), U = "" + I), n(
|
|
227
|
+
if (U = null, I !== void 0 && (t(I), U = "" + I), n(j) && (t(j.key), U = "" + j.key), "key" in j) {
|
|
228
228
|
I = {};
|
|
229
|
-
for (var
|
|
230
|
-
|
|
229
|
+
for (var We in j)
|
|
230
|
+
We !== "key" && (I[We] = j[We]);
|
|
231
231
|
} else
|
|
232
|
-
I =
|
|
232
|
+
I = j;
|
|
233
233
|
return U && o(
|
|
234
234
|
I,
|
|
235
235
|
typeof L == "function" ? L.displayName || L.name || "Unknown" : L
|
|
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
I,
|
|
240
240
|
s(),
|
|
241
241
|
Q,
|
|
242
|
-
|
|
242
|
+
ve
|
|
243
243
|
);
|
|
244
244
|
}
|
|
245
245
|
function f(L) {
|
|
@@ -248,7 +248,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
function p(L) {
|
|
249
249
|
return typeof L == "object" && L !== null && L.$$typeof === w;
|
|
250
250
|
}
|
|
251
|
-
var y = rr, w = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"),
|
|
251
|
+
var y = rr, w = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), T = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), re = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, be = Object.prototype.hasOwnProperty, Te = Array.isArray, tt = console.createTask ? console.createTask : function() {
|
|
252
252
|
return null;
|
|
253
253
|
};
|
|
254
254
|
y = {
|
|
@@ -256,77 +256,77 @@ React keys must be passed directly to JSX without using spread:
|
|
|
256
256
|
return L();
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
var
|
|
259
|
+
var Et, At = {}, at = y.react_stack_bottom_frame.bind(
|
|
260
260
|
y,
|
|
261
261
|
i
|
|
262
|
-
)(),
|
|
263
|
-
|
|
262
|
+
)(), jt = tt(a(i)), st = {};
|
|
263
|
+
ht.Fragment = x, ht.jsx = function(L, j, I) {
|
|
264
264
|
var J = 1e4 > re.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return g(
|
|
266
266
|
L,
|
|
267
|
-
|
|
267
|
+
j,
|
|
268
268
|
I,
|
|
269
269
|
!1,
|
|
270
|
-
J ? Error("react-stack-top-frame") :
|
|
271
|
-
J ?
|
|
270
|
+
J ? Error("react-stack-top-frame") : at,
|
|
271
|
+
J ? tt(a(L)) : jt
|
|
272
272
|
);
|
|
273
|
-
},
|
|
273
|
+
}, ht.jsxs = function(L, j, I) {
|
|
274
274
|
var J = 1e4 > re.recentlyCreatedOwnerStacks++;
|
|
275
275
|
return g(
|
|
276
276
|
L,
|
|
277
|
-
|
|
277
|
+
j,
|
|
278
278
|
I,
|
|
279
279
|
!0,
|
|
280
|
-
J ? Error("react-stack-top-frame") :
|
|
281
|
-
J ?
|
|
280
|
+
J ? Error("react-stack-top-frame") : at,
|
|
281
|
+
J ? tt(a(L)) : jt
|
|
282
282
|
);
|
|
283
283
|
};
|
|
284
|
-
}()),
|
|
284
|
+
}()), ht;
|
|
285
285
|
}
|
|
286
|
-
process.env.NODE_ENV === "production" ?
|
|
287
|
-
var u =
|
|
288
|
-
function
|
|
286
|
+
process.env.NODE_ENV === "production" ? fa.exports = nr() : fa.exports = or();
|
|
287
|
+
var u = fa.exports, G = ((r) => (r[r.mustache = 0] = "mustache", r[r.vue = 1] = "vue", r[r.react = 2] = "react", r[r.angular = 3] = "angular", r))(G || {});
|
|
288
|
+
function Ia() {
|
|
289
289
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
290
290
|
}
|
|
291
|
-
var
|
|
292
|
-
function
|
|
293
|
-
|
|
291
|
+
var _e = Ia();
|
|
292
|
+
function os(r) {
|
|
293
|
+
_e = r;
|
|
294
294
|
}
|
|
295
|
-
var
|
|
295
|
+
var Mt = { exec: () => null };
|
|
296
296
|
function _(r, e = "") {
|
|
297
297
|
let t = typeof r == "string" ? r : r.source;
|
|
298
298
|
const a = { replace: (s, i) => {
|
|
299
299
|
let n = typeof i == "string" ? i : i.source;
|
|
300
|
-
return n = n.replace(
|
|
300
|
+
return n = n.replace(le.caret, "$1"), t = t.replace(s, n), a;
|
|
301
301
|
}, getRegex: () => new RegExp(t, e) };
|
|
302
302
|
return a;
|
|
303
303
|
}
|
|
304
|
-
var
|
|
305
|
-
]`).replace("lheading",
|
|
306
|
-
function
|
|
304
|
+
var le = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), htmlBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i") }, cr = /^(?:[ \t]*(?:\n|$))+/, lr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {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+|$)/, ur = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Da = /(?:[*+-]|\d{1,9}[.)])/, Ds = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ns = _(Ds).replace(/bull/g, Da).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(), dr = _(Ds).replace(/bull/g, Da).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(), Na = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, gr = /^[^\n]+/, Ra = /(?!\s*\])(?:\\.|[^\[\]\\])+/, pr = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ra).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = _(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Da).getRegex(), Yt = "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", Oa = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, fr = _("^ {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|$))", "i").replace("comment", Oa).replace("tag", Yt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Rs = _(Na).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", Yt).getRegex(), Lr = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Rs).getRegex(), Pa = { blockquote: Lr, code: lr, def: pr, fences: hr, heading: ur, hr: vt, html: fr, lheading: Ns, list: mr, newline: cr, paragraph: Rs, table: Mt, text: gr }, cs = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").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", Yt).getRegex(), yr = { ...Pa, lheading: dr, table: cs, paragraph: _(Na).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", cs).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", Yt).getRegex() }, wr = { ...Pa, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Oa).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(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Mt, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Na).replace("hr", vt).replace("heading", ` *#{1,6} *[^
|
|
305
|
+
]`).replace("lheading", Ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, xr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, br = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Os = /^( {2,}|\\)\n(?!\s*$)/, Mr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Jt = /[\p{P}\p{S}]/u, Fa = /[\s\p{P}\p{S}]/u, Ps = /[^\s\p{P}\p{S}]/u, Cr = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Fa).getRegex(), Fs = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, kr = /(?:[^\s\p{P}\p{S}]|~)/u, Tr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, $s = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, vr = _($s, "u").replace(/punct/g, Jt).getRegex(), Er = _($s, "u").replace(/punct/g, Fs).getRegex(), zs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ar = _(zs, "gu").replace(/notPunctSpace/g, Ps).replace(/punctSpace/g, Fa).replace(/punct/g, Jt).getRegex(), jr = _(zs, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, Sr).replace(/punct/g, Fs).getRegex(), Ir = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ps).replace(/punctSpace/g, Fa).replace(/punct/g, Jt).getRegex(), Dr = _(/\\(punct)/, "gu").replace(/punct/g, Jt).getRegex(), Nr = _(/^<(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(), Rr = _(Oa).replace("(?:-->|$)", "-->").getRegex(), Or = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Rr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Qt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Pr = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Qt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), _s = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Qt).replace("ref", Ra).getRegex(), Ws = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ra).getRegex(), Fr = _("reflink|nolink(?!\\()", "g").replace("reflink", _s).replace("nolink", Ws).getRegex(), $a = { _backpedal: Mt, anyPunctuation: Dr, autolink: Nr, blockSkip: Tr, br: Os, code: br, del: Mt, emStrongLDelim: vr, emStrongRDelimAst: Ar, emStrongRDelimUnd: Ir, escape: xr, link: Pr, nolink: Ws, punctuation: Cr, reflink: _s, reflinkSearch: Fr, tag: Or, text: Mr, url: Mt }, $r = { ...$a, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Qt).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qt).getRegex() }, La = { ...$a, emStrongRDelimAst: jr, emStrongLDelim: Er, 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(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, zr = { ...La, br: _(Os).replace("{2,}", "*").getRegex(), text: _(La.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ft = { normal: Pa, gfm: yr, pedantic: wr }, ut = { normal: $a, gfm: La, breaks: zr, pedantic: $r }, _r = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ls = (r) => _r[r];
|
|
306
|
+
function Se(r, e) {
|
|
307
307
|
if (e) {
|
|
308
|
-
if (
|
|
309
|
-
return r.replace(
|
|
310
|
-
} else if (
|
|
311
|
-
return r.replace(
|
|
308
|
+
if (le.escapeTest.test(r))
|
|
309
|
+
return r.replace(le.escapeReplace, ls);
|
|
310
|
+
} else if (le.escapeTestNoEncode.test(r))
|
|
311
|
+
return r.replace(le.escapeReplaceNoEncode, ls);
|
|
312
312
|
return r;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function hs(r) {
|
|
315
315
|
try {
|
|
316
|
-
r = encodeURI(r).replace(
|
|
316
|
+
r = encodeURI(r).replace(le.percentDecode, "%");
|
|
317
317
|
} catch {
|
|
318
318
|
return null;
|
|
319
319
|
}
|
|
320
320
|
return r;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function us(r, e) {
|
|
323
323
|
var i;
|
|
324
|
-
const t = r.replace(
|
|
324
|
+
const t = r.replace(le.findPipe, (n, o, c) => {
|
|
325
325
|
let l = !1, g = o;
|
|
326
326
|
for (; --g >= 0 && c[g] === "\\"; )
|
|
327
327
|
l = !l;
|
|
328
328
|
return l ? "|" : " |";
|
|
329
|
-
}), a = t.split(
|
|
329
|
+
}), a = t.split(le.splitPipe);
|
|
330
330
|
let s = 0;
|
|
331
331
|
if (a[0].trim() || a.shift(), a.length > 0 && !((i = a.at(-1)) != null && i.trim()) && a.pop(), e)
|
|
332
332
|
if (a.length > e)
|
|
@@ -335,10 +335,10 @@ function hs(r, e) {
|
|
|
335
335
|
for (; a.length < e; )
|
|
336
336
|
a.push("");
|
|
337
337
|
for (; s < a.length; s++)
|
|
338
|
-
a[s] = a[s].trim().replace(
|
|
338
|
+
a[s] = a[s].trim().replace(le.slashPipe, "|");
|
|
339
339
|
return a;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function dt(r, e, t) {
|
|
342
342
|
const a = r.length;
|
|
343
343
|
if (a === 0)
|
|
344
344
|
return "";
|
|
@@ -360,7 +360,7 @@ function Wr(r, e) {
|
|
|
360
360
|
return a;
|
|
361
361
|
return t > 0 ? -2 : -1;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function ds(r, e, t, a, s) {
|
|
364
364
|
const i = e.href, n = e.title || null, o = r[1].replace(s.other.outputLinkReplace, "$1");
|
|
365
365
|
a.state.inLink = !0;
|
|
366
366
|
const c = { type: r[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: n, text: o, tokens: a.inlineTokens(o) };
|
|
@@ -381,12 +381,12 @@ function Hr(r, e, t) {
|
|
|
381
381
|
}).join(`
|
|
382
382
|
`);
|
|
383
383
|
}
|
|
384
|
-
var
|
|
384
|
+
var Bt = class {
|
|
385
385
|
constructor(r) {
|
|
386
386
|
h(this, "options");
|
|
387
387
|
h(this, "rules");
|
|
388
388
|
h(this, "lexer");
|
|
389
|
-
this.options = r ||
|
|
389
|
+
this.options = r || _e;
|
|
390
390
|
}
|
|
391
391
|
space(r) {
|
|
392
392
|
const e = this.rules.block.newline.exec(r);
|
|
@@ -397,7 +397,7 @@ var Qt = class {
|
|
|
397
397
|
const e = this.rules.block.code.exec(r);
|
|
398
398
|
if (e) {
|
|
399
399
|
const t = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
400
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t :
|
|
400
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t : dt(t, `
|
|
401
401
|
`) };
|
|
402
402
|
}
|
|
403
403
|
}
|
|
@@ -413,7 +413,7 @@ var Qt = class {
|
|
|
413
413
|
if (e) {
|
|
414
414
|
let t = e[2].trim();
|
|
415
415
|
if (this.rules.other.endingHash.test(t)) {
|
|
416
|
-
const a =
|
|
416
|
+
const a = dt(t, "#");
|
|
417
417
|
(this.options.pedantic || !a || this.rules.other.endingSpaceChar.test(a)) && (t = a.trim());
|
|
418
418
|
}
|
|
419
419
|
return { type: "heading", raw: e[0], depth: e[1].length, text: t, tokens: this.lexer.inline(t) };
|
|
@@ -422,13 +422,13 @@ var Qt = class {
|
|
|
422
422
|
hr(r) {
|
|
423
423
|
const e = this.rules.block.hr.exec(r);
|
|
424
424
|
if (e)
|
|
425
|
-
return { type: "hr", raw:
|
|
425
|
+
return { type: "hr", raw: dt(e[0], `
|
|
426
426
|
`) };
|
|
427
427
|
}
|
|
428
428
|
blockquote(r) {
|
|
429
429
|
const e = this.rules.block.blockquote.exec(r);
|
|
430
430
|
if (e) {
|
|
431
|
-
let t =
|
|
431
|
+
let t = dt(e[0], `
|
|
432
432
|
`).split(`
|
|
433
433
|
`), a = "", s = "";
|
|
434
434
|
const i = [];
|
|
@@ -492,18 +492,18 @@ ${g}` : g;
|
|
|
492
492
|
`, 1)[0], y = !f.trim(), w = 0;
|
|
493
493
|
if (this.options.pedantic ? (w = 2, g = f.trimStart()) : y ? w = e[1].length + 1 : (w = e[2].search(this.rules.other.nonSpaceChar), w = w > 4 ? 1 : w, g = f.slice(w), w += e[1].length), y && this.rules.other.blankLine.test(p) && (l += p + `
|
|
494
494
|
`, r = r.substring(p.length + 1), c = !0), !c) {
|
|
495
|
-
const k = this.rules.other.nextBulletRegex(w),
|
|
495
|
+
const k = this.rules.other.nextBulletRegex(w), A = this.rules.other.hrRegex(w), P = this.rules.other.fencesBeginRegex(w), T = this.rules.other.headingBeginRegex(w), O = this.rules.other.htmlBeginRegex(w);
|
|
496
496
|
for (; r; ) {
|
|
497
497
|
const $ = r.split(`
|
|
498
498
|
`, 1)[0];
|
|
499
499
|
let v;
|
|
500
|
-
if (p = $, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), v = p) : v = p.replace(this.rules.other.tabCharGlobal, " "), P.test(p) || T.test(p) || O.test(p) || k.test(p) ||
|
|
500
|
+
if (p = $, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), v = p) : v = p.replace(this.rules.other.tabCharGlobal, " "), P.test(p) || T.test(p) || O.test(p) || k.test(p) || A.test(p))
|
|
501
501
|
break;
|
|
502
502
|
if (v.search(this.rules.other.nonSpaceChar) >= w || !p.trim())
|
|
503
503
|
g += `
|
|
504
504
|
` + v.slice(w);
|
|
505
505
|
else {
|
|
506
|
-
if (y || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(f) || T.test(f) ||
|
|
506
|
+
if (y || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(f) || T.test(f) || A.test(f))
|
|
507
507
|
break;
|
|
508
508
|
g += `
|
|
509
509
|
` + p;
|
|
@@ -550,7 +550,7 @@ ${g}` : g;
|
|
|
550
550
|
const e = this.rules.block.table.exec(r);
|
|
551
551
|
if (!e || !this.rules.other.tableDelimiter.test(e[2]))
|
|
552
552
|
return;
|
|
553
|
-
const t =
|
|
553
|
+
const t = us(e[1]), a = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (n = e[3]) != null && n.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
554
554
|
`) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
555
555
|
if (t.length === a.length) {
|
|
556
556
|
for (const o of a)
|
|
@@ -558,7 +558,7 @@ ${g}` : g;
|
|
|
558
558
|
for (let o = 0; o < t.length; o++)
|
|
559
559
|
i.header.push({ text: t[o], tokens: this.lexer.inline(t[o]), header: !0, align: i.align[o] });
|
|
560
560
|
for (const o of s)
|
|
561
|
-
i.rows.push(
|
|
561
|
+
i.rows.push(us(o, i.header.length).map((c, l) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: i.align[l] })));
|
|
562
562
|
return i;
|
|
563
563
|
}
|
|
564
564
|
}
|
|
@@ -597,7 +597,7 @@ ${g}` : g;
|
|
|
597
597
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(t)) {
|
|
598
598
|
if (!this.rules.other.endAngleBracket.test(t))
|
|
599
599
|
return;
|
|
600
|
-
const i =
|
|
600
|
+
const i = dt(t.slice(0, -1), "\\");
|
|
601
601
|
if ((t.length - i.length) % 2 === 0)
|
|
602
602
|
return;
|
|
603
603
|
} else {
|
|
@@ -615,7 +615,7 @@ ${g}` : g;
|
|
|
615
615
|
i && (a = i[1], s = i[3]);
|
|
616
616
|
} else
|
|
617
617
|
s = e[3] ? e[3].slice(1, -1) : "";
|
|
618
|
-
return a = a.trim(), this.rules.other.startAngleBracket.test(a) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? a = a.slice(1) : a = a.slice(1, -1)),
|
|
618
|
+
return a = a.trim(), this.rules.other.startAngleBracket.test(a) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? a = a.slice(1) : a = a.slice(1, -1)), ds(e, { href: a && a.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
reflink(r, e) {
|
|
@@ -626,7 +626,7 @@ ${g}` : g;
|
|
|
626
626
|
const i = t[0].charAt(0);
|
|
627
627
|
return { type: "text", raw: i, text: i };
|
|
628
628
|
}
|
|
629
|
-
return
|
|
629
|
+
return ds(t, s, t[0], this.lexer, this.rules);
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
emStrong(r, e, t = "") {
|
|
@@ -707,28 +707,28 @@ ${g}` : g;
|
|
|
707
707
|
return { type: "text", raw: e[0], text: e[0], escaped: t };
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
},
|
|
710
|
+
}, Ie = class ya {
|
|
711
711
|
constructor(e) {
|
|
712
712
|
h(this, "tokens");
|
|
713
713
|
h(this, "options");
|
|
714
714
|
h(this, "state");
|
|
715
715
|
h(this, "tokenizer");
|
|
716
716
|
h(this, "inlineQueue");
|
|
717
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
718
|
-
const t = { other:
|
|
719
|
-
this.options.pedantic ? (t.block =
|
|
717
|
+
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 = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
718
|
+
const t = { other: le, block: Ft.normal, inline: ut.normal };
|
|
719
|
+
this.options.pedantic ? (t.block = Ft.pedantic, t.inline = ut.pedantic) : this.options.gfm && (t.block = Ft.gfm, this.options.breaks ? t.inline = ut.breaks : t.inline = ut.gfm), this.tokenizer.rules = t;
|
|
720
720
|
}
|
|
721
721
|
static get rules() {
|
|
722
|
-
return { block:
|
|
722
|
+
return { block: Ft, inline: ut };
|
|
723
723
|
}
|
|
724
724
|
static lex(e, t) {
|
|
725
|
-
return new
|
|
725
|
+
return new ya(t).lex(e);
|
|
726
726
|
}
|
|
727
727
|
static lexInline(e, t) {
|
|
728
|
-
return new
|
|
728
|
+
return new ya(t).inlineTokens(e);
|
|
729
729
|
}
|
|
730
730
|
lex(e) {
|
|
731
|
-
e = e.replace(
|
|
731
|
+
e = e.replace(le.carriageReturn, `
|
|
732
732
|
`), this.blockTokens(e, this.tokens);
|
|
733
733
|
for (let t = 0; t < this.inlineQueue.length; t++) {
|
|
734
734
|
const a = this.inlineQueue[t];
|
|
@@ -738,7 +738,7 @@ ${g}` : g;
|
|
|
738
738
|
}
|
|
739
739
|
blockTokens(e, t = [], a = !1) {
|
|
740
740
|
var s, i, n;
|
|
741
|
-
for (this.options.pedantic && (e = e.replace(
|
|
741
|
+
for (this.options.pedantic && (e = e.replace(le.tabCharGlobal, " ").replace(le.spaceLine, "")); e; ) {
|
|
742
742
|
let o;
|
|
743
743
|
if ((i = (s = this.options.extensions) == null ? void 0 : s.block) != null && i.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1))
|
|
744
744
|
continue;
|
|
@@ -922,21 +922,21 @@ ${g}` : g;
|
|
|
922
922
|
}
|
|
923
923
|
return t;
|
|
924
924
|
}
|
|
925
|
-
},
|
|
925
|
+
}, Ut = class {
|
|
926
926
|
constructor(r) {
|
|
927
927
|
h(this, "options");
|
|
928
928
|
h(this, "parser");
|
|
929
|
-
this.options = r ||
|
|
929
|
+
this.options = r || _e;
|
|
930
930
|
}
|
|
931
931
|
space(r) {
|
|
932
932
|
return "";
|
|
933
933
|
}
|
|
934
934
|
code({ text: r, lang: e, escaped: t }) {
|
|
935
935
|
var i;
|
|
936
|
-
const a = (i = (e || "").match(
|
|
936
|
+
const a = (i = (e || "").match(le.notSpaceStart)) == null ? void 0 : i[0], s = r.replace(le.endingNewline, "") + `
|
|
937
937
|
`;
|
|
938
|
-
return a ? '<pre><code class="language-' +
|
|
939
|
-
` : "<pre><code>" + (t ? s :
|
|
938
|
+
return a ? '<pre><code class="language-' + Se(a) + '">' + (t ? s : Se(s, !0)) + `</code></pre>
|
|
939
|
+
` : "<pre><code>" + (t ? s : Se(s, !0)) + `</code></pre>
|
|
940
940
|
`;
|
|
941
941
|
}
|
|
942
942
|
blockquote({ tokens: r }) {
|
|
@@ -972,7 +972,7 @@ ${this.parser.parse(r)}</blockquote>
|
|
|
972
972
|
let e = "";
|
|
973
973
|
if (r.task) {
|
|
974
974
|
const a = this.checkbox({ checked: !!r.checked });
|
|
975
|
-
r.loose ? ((t = r.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (r.tokens[0].text = a + " " + r.tokens[0].text, r.tokens[0].tokens && r.tokens[0].tokens.length > 0 && r.tokens[0].tokens[0].type === "text" && (r.tokens[0].tokens[0].text = a + " " +
|
|
975
|
+
r.loose ? ((t = r.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (r.tokens[0].text = a + " " + r.tokens[0].text, r.tokens[0].tokens && r.tokens[0].tokens.length > 0 && r.tokens[0].tokens[0].type === "text" && (r.tokens[0].tokens[0].text = a + " " + Se(r.tokens[0].tokens[0].text), r.tokens[0].tokens[0].escaped = !0)) : r.tokens.unshift({ type: "text", raw: a + " ", text: a + " ", escaped: !0 }) : e += a + " ";
|
|
976
976
|
}
|
|
977
977
|
return e += this.parser.parse(r.tokens, !!r.loose), `<li>${e}</li>
|
|
978
978
|
`;
|
|
@@ -1020,7 +1020,7 @@ ${r}</tr>
|
|
|
1020
1020
|
return `<em>${this.parser.parseInline(r)}</em>`;
|
|
1021
1021
|
}
|
|
1022
1022
|
codespan({ text: r }) {
|
|
1023
|
-
return `<code>${
|
|
1023
|
+
return `<code>${Se(r, !0)}</code>`;
|
|
1024
1024
|
}
|
|
1025
1025
|
br(r) {
|
|
1026
1026
|
return "<br>";
|
|
@@ -1029,26 +1029,26 @@ ${r}</tr>
|
|
|
1029
1029
|
return `<del>${this.parser.parseInline(r)}</del>`;
|
|
1030
1030
|
}
|
|
1031
1031
|
link({ href: r, title: e, tokens: t }) {
|
|
1032
|
-
const a = this.parser.parseInline(t), s =
|
|
1032
|
+
const a = this.parser.parseInline(t), s = hs(r);
|
|
1033
1033
|
if (s === null)
|
|
1034
1034
|
return a;
|
|
1035
1035
|
r = s;
|
|
1036
1036
|
let i = '<a href="' + r + '"';
|
|
1037
|
-
return e && (i += ' title="' +
|
|
1037
|
+
return e && (i += ' title="' + Se(e) + '"'), i += ">" + a + "</a>", i;
|
|
1038
1038
|
}
|
|
1039
1039
|
image({ href: r, title: e, text: t, tokens: a }) {
|
|
1040
1040
|
a && (t = this.parser.parseInline(a, this.parser.textRenderer));
|
|
1041
|
-
const s =
|
|
1041
|
+
const s = hs(r);
|
|
1042
1042
|
if (s === null)
|
|
1043
|
-
return
|
|
1043
|
+
return Se(t);
|
|
1044
1044
|
r = s;
|
|
1045
1045
|
let i = `<img src="${r}" alt="${t}"`;
|
|
1046
|
-
return e && (i += ` title="${
|
|
1046
|
+
return e && (i += ` title="${Se(e)}"`), i += ">", i;
|
|
1047
1047
|
}
|
|
1048
1048
|
text(r) {
|
|
1049
|
-
return "tokens" in r && r.tokens ? this.parser.parseInline(r.tokens) : "escaped" in r && r.escaped ? r.text :
|
|
1049
|
+
return "tokens" in r && r.tokens ? this.parser.parseInline(r.tokens) : "escaped" in r && r.escaped ? r.text : Se(r.text);
|
|
1050
1050
|
}
|
|
1051
|
-
},
|
|
1051
|
+
}, za = class {
|
|
1052
1052
|
strong({ text: r }) {
|
|
1053
1053
|
return r;
|
|
1054
1054
|
}
|
|
@@ -1076,18 +1076,18 @@ ${r}</tr>
|
|
|
1076
1076
|
br() {
|
|
1077
1077
|
return "";
|
|
1078
1078
|
}
|
|
1079
|
-
},
|
|
1079
|
+
}, De = class wa {
|
|
1080
1080
|
constructor(e) {
|
|
1081
1081
|
h(this, "options");
|
|
1082
1082
|
h(this, "renderer");
|
|
1083
1083
|
h(this, "textRenderer");
|
|
1084
|
-
this.options = e ||
|
|
1084
|
+
this.options = e || _e, this.options.renderer = this.options.renderer || new Ut(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new za();
|
|
1085
1085
|
}
|
|
1086
1086
|
static parse(e, t) {
|
|
1087
|
-
return new
|
|
1087
|
+
return new wa(t).parse(e);
|
|
1088
1088
|
}
|
|
1089
1089
|
static parseInline(e, t) {
|
|
1090
|
-
return new
|
|
1090
|
+
return new wa(t).parseInline(e);
|
|
1091
1091
|
}
|
|
1092
1092
|
parse(e, t = !0) {
|
|
1093
1093
|
var s, i;
|
|
@@ -1221,11 +1221,11 @@ ${r}</tr>
|
|
|
1221
1221
|
}
|
|
1222
1222
|
return a;
|
|
1223
1223
|
}
|
|
1224
|
-
},
|
|
1224
|
+
}, ma, _t = (ma = class {
|
|
1225
1225
|
constructor(r) {
|
|
1226
1226
|
h(this, "options");
|
|
1227
1227
|
h(this, "block");
|
|
1228
|
-
this.options = r ||
|
|
1228
|
+
this.options = r || _e;
|
|
1229
1229
|
}
|
|
1230
1230
|
preprocess(r) {
|
|
1231
1231
|
return r;
|
|
@@ -1237,23 +1237,23 @@ ${r}</tr>
|
|
|
1237
1237
|
return r;
|
|
1238
1238
|
}
|
|
1239
1239
|
provideLexer() {
|
|
1240
|
-
return this.block ?
|
|
1240
|
+
return this.block ? Ie.lex : Ie.lexInline;
|
|
1241
1241
|
}
|
|
1242
1242
|
provideParser() {
|
|
1243
|
-
return this.block ?
|
|
1243
|
+
return this.block ? De.parse : De.parseInline;
|
|
1244
1244
|
}
|
|
1245
|
-
}, h(
|
|
1245
|
+
}, h(ma, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ma), Vr = class {
|
|
1246
1246
|
constructor(...r) {
|
|
1247
|
-
h(this, "defaults",
|
|
1247
|
+
h(this, "defaults", Ia());
|
|
1248
1248
|
h(this, "options", this.setOptions);
|
|
1249
1249
|
h(this, "parse", this.parseMarkdown(!0));
|
|
1250
1250
|
h(this, "parseInline", this.parseMarkdown(!1));
|
|
1251
|
-
h(this, "Parser",
|
|
1252
|
-
h(this, "Renderer",
|
|
1253
|
-
h(this, "TextRenderer",
|
|
1254
|
-
h(this, "Lexer",
|
|
1255
|
-
h(this, "Tokenizer",
|
|
1256
|
-
h(this, "Hooks",
|
|
1251
|
+
h(this, "Parser", De);
|
|
1252
|
+
h(this, "Renderer", Ut);
|
|
1253
|
+
h(this, "TextRenderer", za);
|
|
1254
|
+
h(this, "Lexer", Ie);
|
|
1255
|
+
h(this, "Tokenizer", Bt);
|
|
1256
|
+
h(this, "Hooks", _t);
|
|
1257
1257
|
this.use(...r);
|
|
1258
1258
|
}
|
|
1259
1259
|
walkTokens(r, e) {
|
|
@@ -1307,7 +1307,7 @@ ${r}</tr>
|
|
|
1307
1307
|
}
|
|
1308
1308
|
"childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
|
|
1309
1309
|
}), a.extensions = e), t.renderer) {
|
|
1310
|
-
const s = this.defaults.renderer || new
|
|
1310
|
+
const s = this.defaults.renderer || new Ut(this.defaults);
|
|
1311
1311
|
for (const i in t.renderer) {
|
|
1312
1312
|
if (!(i in s))
|
|
1313
1313
|
throw new Error(`renderer '${i}' does not exist`);
|
|
@@ -1322,7 +1322,7 @@ ${r}</tr>
|
|
|
1322
1322
|
a.renderer = s;
|
|
1323
1323
|
}
|
|
1324
1324
|
if (t.tokenizer) {
|
|
1325
|
-
const s = this.defaults.tokenizer || new
|
|
1325
|
+
const s = this.defaults.tokenizer || new Bt(this.defaults);
|
|
1326
1326
|
for (const i in t.tokenizer) {
|
|
1327
1327
|
if (!(i in s))
|
|
1328
1328
|
throw new Error(`tokenizer '${i}' does not exist`);
|
|
@@ -1337,14 +1337,14 @@ ${r}</tr>
|
|
|
1337
1337
|
a.tokenizer = s;
|
|
1338
1338
|
}
|
|
1339
1339
|
if (t.hooks) {
|
|
1340
|
-
const s = this.defaults.hooks || new
|
|
1340
|
+
const s = this.defaults.hooks || new _t();
|
|
1341
1341
|
for (const i in t.hooks) {
|
|
1342
1342
|
if (!(i in s))
|
|
1343
1343
|
throw new Error(`hook '${i}' does not exist`);
|
|
1344
1344
|
if (["options", "block"].includes(i))
|
|
1345
1345
|
continue;
|
|
1346
1346
|
const n = i, o = t.hooks[n], c = s[n];
|
|
1347
|
-
|
|
1347
|
+
_t.passThroughHooks.has(i) ? s[n] = (l) => {
|
|
1348
1348
|
if (this.defaults.async)
|
|
1349
1349
|
return Promise.resolve(o.call(s, l)).then((f) => c.call(s, f));
|
|
1350
1350
|
const g = o.call(s, l);
|
|
@@ -1370,10 +1370,10 @@ ${r}</tr>
|
|
|
1370
1370
|
return this.defaults = { ...this.defaults, ...r }, this;
|
|
1371
1371
|
}
|
|
1372
1372
|
lexer(r, e) {
|
|
1373
|
-
return
|
|
1373
|
+
return Ie.lex(r, e ?? this.defaults);
|
|
1374
1374
|
}
|
|
1375
1375
|
parser(r, e) {
|
|
1376
|
-
return
|
|
1376
|
+
return De.parse(r, e ?? this.defaults);
|
|
1377
1377
|
}
|
|
1378
1378
|
parseMarkdown(r) {
|
|
1379
1379
|
return (e, t) => {
|
|
@@ -1385,7 +1385,7 @@ ${r}</tr>
|
|
|
1385
1385
|
if (typeof e != "string")
|
|
1386
1386
|
return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1387
1387
|
s.hooks && (s.hooks.options = s, s.hooks.block = r);
|
|
1388
|
-
const n = s.hooks ? s.hooks.provideLexer() : r ?
|
|
1388
|
+
const n = s.hooks ? s.hooks.provideLexer() : r ? Ie.lex : Ie.lexInline, o = s.hooks ? s.hooks.provideParser() : r ? De.parse : De.parseInline;
|
|
1389
1389
|
if (s.async)
|
|
1390
1390
|
return Promise.resolve(s.hooks ? s.hooks.preprocess(e) : e).then((c) => n(c, s)).then((c) => s.hooks ? s.hooks.processAllTokens(c) : c).then((c) => s.walkTokens ? Promise.all(this.walkTokens(c, s.walkTokens)).then(() => c) : c).then((c) => o(c, s)).then((c) => s.hooks ? s.hooks.postprocess(c) : c).catch(i);
|
|
1391
1391
|
try {
|
|
@@ -1403,7 +1403,7 @@ ${r}</tr>
|
|
|
1403
1403
|
return (t) => {
|
|
1404
1404
|
if (t.message += `
|
|
1405
1405
|
Please report this to https://github.com/markedjs/marked.`, r) {
|
|
1406
|
-
const a = "<p>An error occurred:</p><pre>" +
|
|
1406
|
+
const a = "<p>An error occurred:</p><pre>" + Se(t.message + "", !0) + "</pre>";
|
|
1407
1407
|
return e ? Promise.resolve(a) : a;
|
|
1408
1408
|
}
|
|
1409
1409
|
if (e)
|
|
@@ -1411,51 +1411,51 @@ Please report this to https://github.com/markedjs/marked.`, r) {
|
|
|
1411
1411
|
throw t;
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
|
-
},
|
|
1414
|
+
}, $e = new Vr();
|
|
1415
1415
|
function z(r, e) {
|
|
1416
|
-
return
|
|
1416
|
+
return $e.parse(r, e);
|
|
1417
1417
|
}
|
|
1418
1418
|
z.options = z.setOptions = function(r) {
|
|
1419
|
-
return
|
|
1420
|
-
}, z.getDefaults =
|
|
1421
|
-
return
|
|
1419
|
+
return $e.setOptions(r), z.defaults = $e.defaults, os(z.defaults), z;
|
|
1420
|
+
}, z.getDefaults = Ia, z.defaults = _e, z.use = function(...r) {
|
|
1421
|
+
return $e.use(...r), z.defaults = $e.defaults, os(z.defaults), z;
|
|
1422
1422
|
}, z.walkTokens = function(r, e) {
|
|
1423
|
-
return
|
|
1424
|
-
}, z.parseInline =
|
|
1425
|
-
const { entries:
|
|
1426
|
-
let { freeze:
|
|
1427
|
-
|
|
1423
|
+
return $e.walkTokens(r, e);
|
|
1424
|
+
}, z.parseInline = $e.parseInline, z.Parser = De, z.parser = De.parse, z.Renderer = Ut, z.TextRenderer = za, z.Lexer = Ie, z.lexer = Ie.lex, z.Tokenizer = Bt, z.Hooks = _t, z.parse = z, z.options, z.setOptions, z.use, z.walkTokens, z.parseInline, De.parse, Ie.lex;
|
|
1425
|
+
const { entries: Hs, setPrototypeOf: gs, isFrozen: Qr, getPrototypeOf: Br, getOwnPropertyDescriptor: Ur } = Object;
|
|
1426
|
+
let { freeze: he, seal: me, create: yt } = Object, { apply: xa, construct: ba } = typeof Reflect < "u" && Reflect;
|
|
1427
|
+
he || (he = function(r) {
|
|
1428
1428
|
return r;
|
|
1429
1429
|
}), me || (me = function(r) {
|
|
1430
1430
|
return r;
|
|
1431
|
-
}),
|
|
1431
|
+
}), xa || (xa = function(r, e) {
|
|
1432
1432
|
for (var t = arguments.length, a = new Array(t > 2 ? t - 2 : 0), s = 2; s < t; s++)
|
|
1433
1433
|
a[s - 2] = arguments[s];
|
|
1434
1434
|
return r.apply(e, a);
|
|
1435
|
-
}),
|
|
1435
|
+
}), ba || (ba = function(r) {
|
|
1436
1436
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), a = 1; a < e; a++)
|
|
1437
1437
|
t[a - 1] = arguments[a];
|
|
1438
1438
|
return new r(...t);
|
|
1439
1439
|
});
|
|
1440
|
-
const
|
|
1441
|
-
function
|
|
1440
|
+
const gt = ue(Array.prototype.forEach), qr = ue(Array.prototype.lastIndexOf), ps = ue(Array.prototype.pop), pt = ue(Array.prototype.push), Yr = ue(Array.prototype.splice), Wt = ue(String.prototype.toLowerCase), na = ue(String.prototype.toString), oa = ue(String.prototype.match), Ue = ue(String.prototype.replace), Jr = ue(String.prototype.indexOf), Gr = ue(String.prototype.trim), Le = ue(Object.prototype.hasOwnProperty), oe = ue(RegExp.prototype.test), mt = Kr(TypeError);
|
|
1441
|
+
function ue(r) {
|
|
1442
1442
|
return function(e) {
|
|
1443
1443
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
1444
1444
|
for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
1445
1445
|
a[s - 1] = arguments[s];
|
|
1446
|
-
return
|
|
1446
|
+
return xa(r, e, a);
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
1449
|
function Kr(r) {
|
|
1450
1450
|
return function() {
|
|
1451
1451
|
for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++)
|
|
1452
1452
|
t[a] = arguments[a];
|
|
1453
|
-
return
|
|
1453
|
+
return ba(r, t);
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
1456
|
function N(r, e) {
|
|
1457
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1458
|
-
|
|
1457
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Wt;
|
|
1458
|
+
gs && gs(r, null);
|
|
1459
1459
|
let a = e.length;
|
|
1460
1460
|
for (; a--; ) {
|
|
1461
1461
|
let s = e[a];
|
|
@@ -1469,23 +1469,23 @@ function N(r, e) {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
function Zr(r) {
|
|
1471
1471
|
for (let e = 0; e < r.length; e++)
|
|
1472
|
-
|
|
1472
|
+
Le(r, e) || (r[e] = null);
|
|
1473
1473
|
return r;
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
const e =
|
|
1477
|
-
for (const [t, a] of
|
|
1478
|
-
|
|
1475
|
+
function ke(r) {
|
|
1476
|
+
const e = yt(null);
|
|
1477
|
+
for (const [t, a] of Hs(r))
|
|
1478
|
+
Le(r, t) && (Array.isArray(a) ? e[t] = Zr(a) : a && typeof a == "object" && a.constructor === Object ? e[t] = ke(a) : e[t] = a);
|
|
1479
1479
|
return e;
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function ft(r, e) {
|
|
1482
1482
|
for (; r !== null; ) {
|
|
1483
1483
|
const a = Ur(r, e);
|
|
1484
1484
|
if (a) {
|
|
1485
1485
|
if (a.get)
|
|
1486
|
-
return
|
|
1486
|
+
return ue(a.get);
|
|
1487
1487
|
if (typeof a.value == "function")
|
|
1488
|
-
return
|
|
1488
|
+
return ue(a.value);
|
|
1489
1489
|
}
|
|
1490
1490
|
r = Br(r);
|
|
1491
1491
|
}
|
|
@@ -1494,9 +1494,9 @@ function gt(r, e) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
return t;
|
|
1496
1496
|
}
|
|
1497
|
-
const
|
|
1498
|
-
var
|
|
1499
|
-
const
|
|
1497
|
+
const ms = he(["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"]), ca = he(["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", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), la = he(["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"]), Xr = he(["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"]), ha = he(["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"]), ei = he(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), fs = he(["#text"]), Ls = he(["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"]), ua = he(["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", "mask-type", "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"]), ys = he(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), $t = he(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ti = me(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ai = me(/<%[\w\W]*|[\w\W]*%>/gm), si = me(/\$\{[\w\W]*/gm), ri = me(/^data-[\-\w.\u00B7-\uFFFF]+$/), ii = me(/^aria-[\-\w]+$/), Vs = me(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ni = me(/^(?:\w+script|data):/i), oi = me(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Qs = me(/^html$/i), ci = me(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
1498
|
+
var ws = Object.freeze({ __proto__: null, ARIA_ATTR: ii, ATTR_WHITESPACE: oi, CUSTOM_ELEMENT: ci, DATA_ATTR: ri, DOCTYPE_NAME: Qs, ERB_EXPR: ai, IS_ALLOWED_URI: Vs, IS_SCRIPT_OR_DATA: ni, MUSTACHE_EXPR: ti, TMPLIT_EXPR: si });
|
|
1499
|
+
const Lt = { element: 1, text: 3, progressingInstruction: 7, comment: 8, document: 9 }, li = function() {
|
|
1500
1500
|
return typeof window > "u" ? null : window;
|
|
1501
1501
|
}, hi = function(r, e) {
|
|
1502
1502
|
if (typeof r != "object" || typeof r.createPolicy != "function")
|
|
@@ -1514,202 +1514,202 @@ const pt = { element: 1, text: 3, progressingInstruction: 7, comment: 8, documen
|
|
|
1514
1514
|
} catch {
|
|
1515
1515
|
return console.warn("TrustedTypes policy " + s + " could not be created."), null;
|
|
1516
1516
|
}
|
|
1517
|
-
},
|
|
1517
|
+
}, xs = function() {
|
|
1518
1518
|
return { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] };
|
|
1519
1519
|
};
|
|
1520
|
-
function
|
|
1520
|
+
function Bs() {
|
|
1521
1521
|
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : li();
|
|
1522
|
-
const e = (d) =>
|
|
1523
|
-
if (e.version = "3.
|
|
1522
|
+
const e = (d) => Bs(d);
|
|
1523
|
+
if (e.version = "3.4.0", e.removed = [], !r || !r.document || r.document.nodeType !== Lt.document || !r.Element)
|
|
1524
1524
|
return e.isSupported = !1, e;
|
|
1525
1525
|
let { document: t } = r;
|
|
1526
|
-
const a = t, s = a.currentScript, { DocumentFragment: i, HTMLTemplateElement: n, Node: o, Element: c, NodeFilter: l, NamedNodeMap: g = r.NamedNodeMap || r.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: y } = r, w = c.prototype, m =
|
|
1526
|
+
const a = t, s = a.currentScript, { DocumentFragment: i, HTMLTemplateElement: n, Node: o, Element: c, NodeFilter: l, NamedNodeMap: g = r.NamedNodeMap || r.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: y } = r, w = c.prototype, m = ft(w, "cloneNode"), x = ft(w, "remove"), k = ft(w, "nextSibling"), A = ft(w, "childNodes"), P = ft(w, "parentNode");
|
|
1527
1527
|
if (typeof n == "function") {
|
|
1528
1528
|
const d = t.createElement("template");
|
|
1529
1529
|
d.content && d.content.ownerDocument && (t = d.content.ownerDocument);
|
|
1530
1530
|
}
|
|
1531
1531
|
let T, O = "";
|
|
1532
|
-
const { implementation: $, createNodeIterator: v, createDocumentFragment: D, getElementsByTagName: B } = t, { importNode:
|
|
1533
|
-
let
|
|
1534
|
-
e.isSupported = typeof
|
|
1535
|
-
const { MUSTACHE_EXPR: re, ERB_EXPR:
|
|
1536
|
-
let { IS_ALLOWED_URI:
|
|
1537
|
-
const
|
|
1532
|
+
const { implementation: $, createNodeIterator: v, createDocumentFragment: D, getElementsByTagName: B } = t, { importNode: ge } = a;
|
|
1533
|
+
let H = xs();
|
|
1534
|
+
e.isSupported = typeof Hs == "function" && typeof P == "function" && $ && $.createHTMLDocument !== void 0;
|
|
1535
|
+
const { MUSTACHE_EXPR: re, ERB_EXPR: be, TMPLIT_EXPR: Te, DATA_ATTR: tt, ARIA_ATTR: Et, IS_SCRIPT_OR_DATA: At, ATTR_WHITESPACE: at, CUSTOM_ELEMENT: jt } = ws;
|
|
1536
|
+
let { IS_ALLOWED_URI: st } = ws, L = null;
|
|
1537
|
+
const j = N({}, [...ms, ...ca, ...la, ...ha, ...fs]);
|
|
1538
1538
|
let I = null;
|
|
1539
|
-
const J = N({}, [...
|
|
1540
|
-
let Q = Object.seal(
|
|
1541
|
-
const ie = Object.seal(
|
|
1542
|
-
let
|
|
1543
|
-
const
|
|
1544
|
-
let
|
|
1545
|
-
const
|
|
1546
|
-
let
|
|
1547
|
-
const
|
|
1548
|
-
let
|
|
1549
|
-
const
|
|
1550
|
-
let Qe =
|
|
1551
|
-
const
|
|
1552
|
-
let
|
|
1553
|
-
const
|
|
1554
|
-
let
|
|
1555
|
-
const
|
|
1539
|
+
const J = N({}, [...Ls, ...ua, ...ys, ...$t]);
|
|
1540
|
+
let Q = Object.seal(yt(null, { tagNameCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, attributeNameCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, allowCustomizedBuiltInElements: { writable: !0, configurable: !1, enumerable: !0, value: !1 } })), ve = null, U = null;
|
|
1541
|
+
const ie = Object.seal(yt(null, { tagCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, attributeCheck: { writable: !0, configurable: !1, enumerable: !0, value: null } }));
|
|
1542
|
+
let We = !0, rt = !0, Wa = !1, Ha = !0, Re = !1, it = !0, Oe = !1, Gt = !1, Kt = !1, He = !1, It = !1, Dt = !1, Va = !0, Qa = !1;
|
|
1543
|
+
const Ys = "user-content-";
|
|
1544
|
+
let Zt = !0, nt = !1, Ve = {}, Me = null;
|
|
1545
|
+
const Xt = N({}, ["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"]);
|
|
1546
|
+
let Ba = null;
|
|
1547
|
+
const Ua = N({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1548
|
+
let ea = null;
|
|
1549
|
+
const qa = N({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Nt = "http://www.w3.org/1998/Math/MathML", Rt = "http://www.w3.org/2000/svg", Ce = "http://www.w3.org/1999/xhtml";
|
|
1550
|
+
let Qe = Ce, ta = !1, aa = null;
|
|
1551
|
+
const Js = N({}, [Nt, Rt, Ce], na);
|
|
1552
|
+
let Ot = N({}, ["mi", "mo", "mn", "ms", "mtext"]), Pt = N({}, ["annotation-xml"]);
|
|
1553
|
+
const Gs = N({}, ["title", "style", "font", "a", "script"]);
|
|
1554
|
+
let ot = null;
|
|
1555
|
+
const Ks = ["application/xhtml+xml", "text/html"], Zs = "text/html";
|
|
1556
1556
|
let Z = null, Be = null;
|
|
1557
|
-
const
|
|
1557
|
+
const Xs = t.createElement("form"), Ya = function(d) {
|
|
1558
1558
|
return d instanceof RegExp || d instanceof Function;
|
|
1559
|
-
},
|
|
1559
|
+
}, sa = function() {
|
|
1560
1560
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1561
1561
|
if (!(Be && Be === d)) {
|
|
1562
|
-
if ((!d || typeof d != "object") && (d = {}), d =
|
|
1562
|
+
if ((!d || typeof d != "object") && (d = {}), d = ke(d), ot = Ks.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Zs : d.PARSER_MEDIA_TYPE, Z = ot === "application/xhtml+xml" ? na : Wt, L = Le(d, "ALLOWED_TAGS") ? N({}, d.ALLOWED_TAGS, Z) : j, I = Le(d, "ALLOWED_ATTR") ? N({}, d.ALLOWED_ATTR, Z) : J, aa = Le(d, "ALLOWED_NAMESPACES") ? N({}, d.ALLOWED_NAMESPACES, na) : Js, ea = Le(d, "ADD_URI_SAFE_ATTR") ? N(ke(qa), d.ADD_URI_SAFE_ATTR, Z) : qa, Ba = Le(d, "ADD_DATA_URI_TAGS") ? N(ke(Ua), d.ADD_DATA_URI_TAGS, Z) : Ua, Me = Le(d, "FORBID_CONTENTS") ? N({}, d.FORBID_CONTENTS, Z) : Xt, ve = Le(d, "FORBID_TAGS") ? N({}, d.FORBID_TAGS, Z) : ke({}), U = Le(d, "FORBID_ATTR") ? N({}, d.FORBID_ATTR, Z) : ke({}), Ve = Le(d, "USE_PROFILES") ? d.USE_PROFILES : !1, We = d.ALLOW_ARIA_ATTR !== !1, rt = d.ALLOW_DATA_ATTR !== !1, Wa = d.ALLOW_UNKNOWN_PROTOCOLS || !1, Ha = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Re = d.SAFE_FOR_TEMPLATES || !1, it = d.SAFE_FOR_XML !== !1, Oe = d.WHOLE_DOCUMENT || !1, He = d.RETURN_DOM || !1, It = d.RETURN_DOM_FRAGMENT || !1, Dt = d.RETURN_TRUSTED_TYPE || !1, Kt = d.FORCE_BODY || !1, Va = d.SANITIZE_DOM !== !1, Qa = d.SANITIZE_NAMED_PROPS || !1, Zt = d.KEEP_CONTENT !== !1, nt = d.IN_PLACE || !1, st = d.ALLOWED_URI_REGEXP || Vs, Qe = d.NAMESPACE || Ce, Ot = d.MATHML_TEXT_INTEGRATION_POINTS || Ot, Pt = d.HTML_INTEGRATION_POINTS || Pt, Q = d.CUSTOM_ELEMENT_HANDLING || yt(null), d.CUSTOM_ELEMENT_HANDLING && Ya(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Q.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && Ya(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Q.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Re && (rt = !1), It && (He = !0), Ve && (L = N({}, fs), I = yt(null), Ve.html === !0 && (N(L, ms), N(I, Ls)), Ve.svg === !0 && (N(L, ca), N(I, ua), N(I, $t)), Ve.svgFilters === !0 && (N(L, la), N(I, ua), N(I, $t)), Ve.mathMl === !0 && (N(L, ha), N(I, ys), N(I, $t))), ie.tagCheck = null, ie.attributeCheck = null, d.ADD_TAGS && (typeof d.ADD_TAGS == "function" ? ie.tagCheck = d.ADD_TAGS : (L === j && (L = ke(L)), N(L, d.ADD_TAGS, Z))), d.ADD_ATTR && (typeof d.ADD_ATTR == "function" ? ie.attributeCheck = d.ADD_ATTR : (I === J && (I = ke(I)), N(I, d.ADD_ATTR, Z))), d.ADD_URI_SAFE_ATTR && N(ea, d.ADD_URI_SAFE_ATTR, Z), d.FORBID_CONTENTS && (Me === Xt && (Me = ke(Me)), N(Me, d.FORBID_CONTENTS, Z)), d.ADD_FORBID_CONTENTS && (Me === Xt && (Me = ke(Me)), N(Me, d.ADD_FORBID_CONTENTS, Z)), Zt && (L["#text"] = !0), Oe && N(L, ["html", "head", "body"]), L.table && (N(L, ["tbody"]), delete ve.tbody), d.TRUSTED_TYPES_POLICY) {
|
|
1563
1563
|
if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1564
|
-
throw
|
|
1564
|
+
throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1565
1565
|
if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
1566
|
-
throw
|
|
1566
|
+
throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1567
1567
|
T = d.TRUSTED_TYPES_POLICY, O = T.createHTML("");
|
|
1568
1568
|
} else
|
|
1569
1569
|
T === void 0 && (T = hi(y, s)), T !== null && typeof O == "string" && (O = T.createHTML(""));
|
|
1570
|
-
|
|
1570
|
+
he && he(d), Be = d;
|
|
1571
1571
|
}
|
|
1572
|
-
},
|
|
1573
|
-
let
|
|
1574
|
-
(!
|
|
1575
|
-
const b =
|
|
1576
|
-
return
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1572
|
+
}, Ja = N({}, [...ca, ...la, ...Xr]), Ga = N({}, [...ha, ...ei]), er = function(d) {
|
|
1573
|
+
let M = P(d);
|
|
1574
|
+
(!M || !M.tagName) && (M = { namespaceURI: Qe, tagName: "template" });
|
|
1575
|
+
const b = Wt(d.tagName), V = Wt(M.tagName);
|
|
1576
|
+
return aa[d.namespaceURI] ? d.namespaceURI === Rt ? M.namespaceURI === Ce ? b === "svg" : M.namespaceURI === Nt ? b === "svg" && (V === "annotation-xml" || Ot[V]) : !!Ja[b] : d.namespaceURI === Nt ? M.namespaceURI === Ce ? b === "math" : M.namespaceURI === Rt ? b === "math" && Pt[V] : !!Ga[b] : d.namespaceURI === Ce ? M.namespaceURI === Rt && !Pt[V] || M.namespaceURI === Nt && !Ot[V] ? !1 : !Ga[b] && (Gs[b] || !Ja[b]) : !!(ot === "application/xhtml+xml" && aa[d.namespaceURI]) : !1;
|
|
1577
|
+
}, Pe = function(d) {
|
|
1578
|
+
pt(e.removed, { element: d });
|
|
1579
1579
|
try {
|
|
1580
1580
|
P(d).removeChild(d);
|
|
1581
1581
|
} catch {
|
|
1582
1582
|
x(d);
|
|
1583
1583
|
}
|
|
1584
|
-
},
|
|
1584
|
+
}, Fe = function(d, M) {
|
|
1585
1585
|
try {
|
|
1586
|
-
|
|
1586
|
+
pt(e.removed, { attribute: M.getAttributeNode(d), from: M });
|
|
1587
1587
|
} catch {
|
|
1588
|
-
|
|
1588
|
+
pt(e.removed, { attribute: null, from: M });
|
|
1589
1589
|
}
|
|
1590
|
-
if (
|
|
1591
|
-
if (He ||
|
|
1590
|
+
if (M.removeAttribute(d), d === "is")
|
|
1591
|
+
if (He || It)
|
|
1592
1592
|
try {
|
|
1593
|
-
|
|
1593
|
+
Pe(M);
|
|
1594
1594
|
} catch {
|
|
1595
1595
|
}
|
|
1596
1596
|
else
|
|
1597
1597
|
try {
|
|
1598
|
-
|
|
1598
|
+
M.setAttribute(d, "");
|
|
1599
1599
|
} catch {
|
|
1600
1600
|
}
|
|
1601
|
-
},
|
|
1602
|
-
let
|
|
1603
|
-
if (
|
|
1601
|
+
}, Ka = function(d) {
|
|
1602
|
+
let M = null, b = null;
|
|
1603
|
+
if (Kt)
|
|
1604
1604
|
d = "<remove></remove>" + d;
|
|
1605
1605
|
else {
|
|
1606
|
-
const Y =
|
|
1606
|
+
const Y = oa(d, /^[\r\n\t ]+/);
|
|
1607
1607
|
b = Y && Y[0];
|
|
1608
1608
|
}
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1611
|
-
if (Qe ===
|
|
1609
|
+
ot === "application/xhtml+xml" && Qe === Ce && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
|
|
1610
|
+
const V = T ? T.createHTML(d) : d;
|
|
1611
|
+
if (Qe === Ce)
|
|
1612
1612
|
try {
|
|
1613
|
-
|
|
1613
|
+
M = new p().parseFromString(V, ot);
|
|
1614
1614
|
} catch {
|
|
1615
1615
|
}
|
|
1616
|
-
if (!
|
|
1617
|
-
|
|
1616
|
+
if (!M || !M.documentElement) {
|
|
1617
|
+
M = $.createDocument(Qe, "template", null);
|
|
1618
1618
|
try {
|
|
1619
|
-
|
|
1619
|
+
M.documentElement.innerHTML = ta ? O : V;
|
|
1620
1620
|
} catch {
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
const ae =
|
|
1624
|
-
return d && b && ae.insertBefore(t.createTextNode(b), ae.childNodes[0] || null), Qe ===
|
|
1625
|
-
},
|
|
1623
|
+
const ae = M.body || M.documentElement;
|
|
1624
|
+
return d && b && ae.insertBefore(t.createTextNode(b), ae.childNodes[0] || null), Qe === Ce ? B.call(M, Oe ? "html" : "body")[0] : Oe ? M.documentElement : ae;
|
|
1625
|
+
}, Za = function(d) {
|
|
1626
1626
|
return v.call(d.ownerDocument || d, d, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
1627
|
-
},
|
|
1627
|
+
}, ra = function(d) {
|
|
1628
1628
|
return d instanceof f && (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");
|
|
1629
|
-
},
|
|
1629
|
+
}, ia = function(d) {
|
|
1630
1630
|
return typeof o == "function" && d instanceof o;
|
|
1631
1631
|
};
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1634
|
-
|
|
1632
|
+
function Ee(d, M, b) {
|
|
1633
|
+
gt(d, (V) => {
|
|
1634
|
+
V.call(e, M, b, Be);
|
|
1635
1635
|
});
|
|
1636
1636
|
}
|
|
1637
1637
|
const Xa = function(d) {
|
|
1638
|
-
let
|
|
1639
|
-
if (
|
|
1640
|
-
return
|
|
1638
|
+
let M = null;
|
|
1639
|
+
if (Ee(H.beforeSanitizeElements, d, null), ra(d))
|
|
1640
|
+
return Pe(d), !0;
|
|
1641
1641
|
const b = Z(d.nodeName);
|
|
1642
|
-
if (
|
|
1643
|
-
return
|
|
1644
|
-
if (!(ie.tagCheck instanceof Function && ie.tagCheck(b)) &&
|
|
1645
|
-
if (!
|
|
1642
|
+
if (Ee(H.uponSanitizeElement, d, { tagName: b, allowedTags: L }), it && d.hasChildNodes() && !ia(d.firstElementChild) && oe(/<[/\w!]/g, d.innerHTML) && oe(/<[/\w!]/g, d.textContent) || it && d.namespaceURI === Ce && b === "style" && ia(d.firstElementChild) || d.nodeType === Lt.progressingInstruction || it && d.nodeType === Lt.comment && oe(/<[/\w]/g, d.data))
|
|
1643
|
+
return Pe(d), !0;
|
|
1644
|
+
if (ve[b] || !(ie.tagCheck instanceof Function && ie.tagCheck(b)) && !L[b]) {
|
|
1645
|
+
if (!ve[b] && ts(b) && (Q.tagNameCheck instanceof RegExp && oe(Q.tagNameCheck, b) || Q.tagNameCheck instanceof Function && Q.tagNameCheck(b)))
|
|
1646
1646
|
return !1;
|
|
1647
|
-
if (
|
|
1648
|
-
const
|
|
1649
|
-
if (ae &&
|
|
1647
|
+
if (Zt && !Me[b]) {
|
|
1648
|
+
const V = P(d) || d.parentNode, ae = A(d) || d.childNodes;
|
|
1649
|
+
if (ae && V) {
|
|
1650
1650
|
const Y = ae.length;
|
|
1651
|
-
for (let
|
|
1652
|
-
const fe = m(ae[
|
|
1653
|
-
fe.__removalCount = (d.__removalCount || 0) + 1,
|
|
1651
|
+
for (let Ae = Y - 1; Ae >= 0; --Ae) {
|
|
1652
|
+
const fe = m(ae[Ae], !0);
|
|
1653
|
+
fe.__removalCount = (d.__removalCount || 0) + 1, V.insertBefore(fe, k(d));
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
|
-
return
|
|
1657
|
+
return Pe(d), !0;
|
|
1658
1658
|
}
|
|
1659
|
-
return d instanceof c && !
|
|
1660
|
-
|
|
1661
|
-
}), d.textContent !==
|
|
1662
|
-
}, es = function(d,
|
|
1663
|
-
if (U[
|
|
1659
|
+
return d instanceof c && !er(d) || (b === "noscript" || b === "noembed" || b === "noframes") && oe(/<\/no(script|embed|frames)/i, d.innerHTML) ? (Pe(d), !0) : (Re && d.nodeType === Lt.text && (M = d.textContent, gt([re, be, Te], (V) => {
|
|
1660
|
+
M = Ue(M, V, " ");
|
|
1661
|
+
}), d.textContent !== M && (pt(e.removed, { element: d.cloneNode() }), d.textContent = M)), Ee(H.afterSanitizeElements, d, null), !1);
|
|
1662
|
+
}, es = function(d, M, b) {
|
|
1663
|
+
if (U[M] || Va && (M === "id" || M === "name") && (b in t || b in Xs))
|
|
1664
1664
|
return !1;
|
|
1665
|
-
if (!(
|
|
1666
|
-
if (!I[
|
|
1667
|
-
if (!(ts(d) && (Q.tagNameCheck instanceof RegExp &&
|
|
1665
|
+
if (!(rt && !U[M] && oe(tt, M)) && !(We && oe(Et, M)) && !(ie.attributeCheck instanceof Function && ie.attributeCheck(M, d))) {
|
|
1666
|
+
if (!I[M] || U[M]) {
|
|
1667
|
+
if (!(ts(d) && (Q.tagNameCheck instanceof RegExp && oe(Q.tagNameCheck, d) || Q.tagNameCheck instanceof Function && Q.tagNameCheck(d)) && (Q.attributeNameCheck instanceof RegExp && oe(Q.attributeNameCheck, M) || Q.attributeNameCheck instanceof Function && Q.attributeNameCheck(M, d)) || M === "is" && Q.allowCustomizedBuiltInElements && (Q.tagNameCheck instanceof RegExp && oe(Q.tagNameCheck, b) || Q.tagNameCheck instanceof Function && Q.tagNameCheck(b))))
|
|
1668
1668
|
return !1;
|
|
1669
|
-
} else if (!
|
|
1669
|
+
} else if (!ea[M] && !oe(st, Ue(b, at, "")) && !((M === "src" || M === "xlink:href" || M === "href") && d !== "script" && Jr(b, "data:") === 0 && Ba[d]) && !(Wa && !oe(At, Ue(b, at, ""))) && b)
|
|
1670
1670
|
return !1;
|
|
1671
1671
|
}
|
|
1672
1672
|
return !0;
|
|
1673
1673
|
}, ts = function(d) {
|
|
1674
|
-
return d !== "annotation-xml" &&
|
|
1674
|
+
return d !== "annotation-xml" && oa(d, jt);
|
|
1675
1675
|
}, as = function(d) {
|
|
1676
|
-
|
|
1677
|
-
const { attributes:
|
|
1678
|
-
if (!
|
|
1676
|
+
Ee(H.beforeSanitizeAttributes, d, null);
|
|
1677
|
+
const { attributes: M } = d;
|
|
1678
|
+
if (!M || ra(d))
|
|
1679
1679
|
return;
|
|
1680
1680
|
const b = { attrName: "", attrValue: "", keepAttr: !0, allowedAttributes: I, forceKeepAttr: void 0 };
|
|
1681
|
-
let
|
|
1682
|
-
for (;
|
|
1683
|
-
const ae =
|
|
1684
|
-
let se = Y === "value" ?
|
|
1685
|
-
if (b.attrName =
|
|
1686
|
-
|
|
1681
|
+
let V = M.length;
|
|
1682
|
+
for (; V--; ) {
|
|
1683
|
+
const ae = M[V], { name: Y, namespaceURI: Ae, value: fe } = ae, ne = Z(Y), ct = fe;
|
|
1684
|
+
let se = Y === "value" ? ct : Gr(ct);
|
|
1685
|
+
if (b.attrName = ne, b.attrValue = se, b.keepAttr = !0, b.forceKeepAttr = void 0, Ee(H.uponSanitizeAttribute, d, b), se = b.attrValue, Qa && (ne === "id" || ne === "name") && (Fe(Y, d), se = Ys + se), it && oe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, se)) {
|
|
1686
|
+
Fe(Y, d);
|
|
1687
1687
|
continue;
|
|
1688
1688
|
}
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1689
|
+
if (ne === "attributename" && oa(se, "href")) {
|
|
1690
|
+
Fe(Y, d);
|
|
1691
1691
|
continue;
|
|
1692
1692
|
}
|
|
1693
1693
|
if (b.forceKeepAttr)
|
|
1694
1694
|
continue;
|
|
1695
1695
|
if (!b.keepAttr) {
|
|
1696
|
-
|
|
1696
|
+
Fe(Y, d);
|
|
1697
1697
|
continue;
|
|
1698
1698
|
}
|
|
1699
|
-
if (!
|
|
1700
|
-
|
|
1699
|
+
if (!Ha && oe(/\/>/i, se)) {
|
|
1700
|
+
Fe(Y, d);
|
|
1701
1701
|
continue;
|
|
1702
1702
|
}
|
|
1703
|
-
|
|
1704
|
-
se =
|
|
1703
|
+
Re && gt([re, be, Te], (tr) => {
|
|
1704
|
+
se = Ue(se, tr, " ");
|
|
1705
1705
|
});
|
|
1706
|
-
const
|
|
1707
|
-
if (!es(
|
|
1708
|
-
|
|
1706
|
+
const rs = Z(d.nodeName);
|
|
1707
|
+
if (!es(rs, ne, se)) {
|
|
1708
|
+
Fe(Y, d);
|
|
1709
1709
|
continue;
|
|
1710
1710
|
}
|
|
1711
|
-
if (T && typeof y == "object" && typeof y.getAttributeType == "function" && !
|
|
1712
|
-
switch (y.getAttributeType(
|
|
1711
|
+
if (T && typeof y == "object" && typeof y.getAttributeType == "function" && !Ae)
|
|
1712
|
+
switch (y.getAttributeType(rs, ne)) {
|
|
1713
1713
|
case "TrustedHTML": {
|
|
1714
1714
|
se = T.createHTML(se);
|
|
1715
1715
|
break;
|
|
@@ -1719,88 +1719,95 @@ function Qs() {
|
|
|
1719
1719
|
break;
|
|
1720
1720
|
}
|
|
1721
1721
|
}
|
|
1722
|
-
if (se !==
|
|
1722
|
+
if (se !== ct)
|
|
1723
1723
|
try {
|
|
1724
|
-
|
|
1724
|
+
Ae ? d.setAttributeNS(Ae, Y, se) : d.setAttribute(Y, se), ra(d) ? Pe(d) : ps(e.removed);
|
|
1725
1725
|
} catch {
|
|
1726
|
-
|
|
1726
|
+
Fe(Y, d);
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
|
-
|
|
1730
|
-
},
|
|
1731
|
-
let
|
|
1732
|
-
const
|
|
1733
|
-
for (
|
|
1734
|
-
|
|
1735
|
-
|
|
1729
|
+
Ee(H.afterSanitizeAttributes, d, null);
|
|
1730
|
+
}, ss = function(d) {
|
|
1731
|
+
let M = null;
|
|
1732
|
+
const b = Za(d);
|
|
1733
|
+
for (Ee(H.beforeSanitizeShadowDOM, d, null); M = b.nextNode(); )
|
|
1734
|
+
Ee(H.uponSanitizeShadowNode, M, null), Xa(M), as(M), M.content instanceof i && ss(M.content);
|
|
1735
|
+
Ee(H.afterSanitizeShadowDOM, d, null);
|
|
1736
1736
|
};
|
|
1737
1737
|
return e.sanitize = function(d) {
|
|
1738
|
-
let
|
|
1739
|
-
if (
|
|
1738
|
+
let M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = null, V = null, ae = null, Y = null;
|
|
1739
|
+
if (ta = !d, ta && (d = "<!-->"), typeof d != "string" && !ia(d))
|
|
1740
1740
|
if (typeof d.toString == "function") {
|
|
1741
1741
|
if (d = d.toString(), typeof d != "string")
|
|
1742
|
-
throw
|
|
1742
|
+
throw mt("dirty is not a string, aborting");
|
|
1743
1743
|
} else
|
|
1744
|
-
throw
|
|
1744
|
+
throw mt("toString is not a function");
|
|
1745
1745
|
if (!e.isSupported)
|
|
1746
1746
|
return d;
|
|
1747
|
-
if (
|
|
1747
|
+
if (Gt || sa(M), e.removed = [], typeof d == "string" && (nt = !1), nt) {
|
|
1748
1748
|
if (d.nodeName) {
|
|
1749
|
-
const
|
|
1750
|
-
if (!L[
|
|
1751
|
-
throw
|
|
1749
|
+
const ne = Z(d.nodeName);
|
|
1750
|
+
if (!L[ne] || ve[ne])
|
|
1751
|
+
throw mt("root node is forbidden and cannot be sanitized in-place");
|
|
1752
1752
|
}
|
|
1753
1753
|
} else if (d instanceof o)
|
|
1754
|
-
b =
|
|
1754
|
+
b = Ka("<!---->"), V = b.ownerDocument.importNode(d, !0), V.nodeType === Lt.element && V.nodeName === "BODY" || V.nodeName === "HTML" ? b = V : b.appendChild(V);
|
|
1755
1755
|
else {
|
|
1756
|
-
if (!He && !
|
|
1757
|
-
return T &&
|
|
1758
|
-
if (b =
|
|
1759
|
-
return He ? null :
|
|
1756
|
+
if (!He && !Re && !Oe && d.indexOf("<") === -1)
|
|
1757
|
+
return T && Dt ? T.createHTML(d) : d;
|
|
1758
|
+
if (b = Ka(d), !b)
|
|
1759
|
+
return He ? null : Dt ? O : "";
|
|
1760
1760
|
}
|
|
1761
|
-
b &&
|
|
1762
|
-
const
|
|
1763
|
-
for (; ae =
|
|
1764
|
-
Xa(ae), as(ae), ae.content instanceof i &&
|
|
1765
|
-
if (
|
|
1761
|
+
b && Kt && Pe(b.firstChild);
|
|
1762
|
+
const Ae = Za(nt ? d : b);
|
|
1763
|
+
for (; ae = Ae.nextNode(); )
|
|
1764
|
+
Xa(ae), as(ae), ae.content instanceof i && ss(ae.content);
|
|
1765
|
+
if (nt)
|
|
1766
1766
|
return d;
|
|
1767
1767
|
if (He) {
|
|
1768
|
-
if (
|
|
1768
|
+
if (Re) {
|
|
1769
|
+
b.normalize();
|
|
1770
|
+
let ne = b.innerHTML;
|
|
1771
|
+
gt([re, be, Te], (ct) => {
|
|
1772
|
+
ne = Ue(ne, ct, " ");
|
|
1773
|
+
}), b.innerHTML = ne;
|
|
1774
|
+
}
|
|
1775
|
+
if (It)
|
|
1769
1776
|
for (Y = D.call(b.ownerDocument); b.firstChild; )
|
|
1770
1777
|
Y.appendChild(b.firstChild);
|
|
1771
1778
|
else
|
|
1772
1779
|
Y = b;
|
|
1773
|
-
return (I.shadowroot || I.shadowrootmode) && (Y =
|
|
1780
|
+
return (I.shadowroot || I.shadowrootmode) && (Y = ge.call(a, Y, !0)), Y;
|
|
1774
1781
|
}
|
|
1775
|
-
let fe =
|
|
1776
|
-
return
|
|
1777
|
-
` + fe),
|
|
1778
|
-
fe =
|
|
1779
|
-
}), T &&
|
|
1782
|
+
let fe = Oe ? b.outerHTML : b.innerHTML;
|
|
1783
|
+
return Oe && L["!doctype"] && b.ownerDocument && b.ownerDocument.doctype && b.ownerDocument.doctype.name && oe(Qs, b.ownerDocument.doctype.name) && (fe = "<!DOCTYPE " + b.ownerDocument.doctype.name + `>
|
|
1784
|
+
` + fe), Re && gt([re, be, Te], (ne) => {
|
|
1785
|
+
fe = Ue(fe, ne, " ");
|
|
1786
|
+
}), T && Dt ? T.createHTML(fe) : fe;
|
|
1780
1787
|
}, e.setConfig = function() {
|
|
1781
1788
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1782
|
-
|
|
1789
|
+
sa(d), Gt = !0;
|
|
1783
1790
|
}, e.clearConfig = function() {
|
|
1784
|
-
Be = null,
|
|
1785
|
-
}, e.isValidAttribute = function(d,
|
|
1786
|
-
Be ||
|
|
1787
|
-
const
|
|
1788
|
-
return es(
|
|
1789
|
-
}, e.addHook = function(d,
|
|
1790
|
-
typeof
|
|
1791
|
-
}, e.removeHook = function(d,
|
|
1792
|
-
if (
|
|
1793
|
-
const b = qr(
|
|
1794
|
-
return b === -1 ? void 0 : Yr(
|
|
1791
|
+
Be = null, Gt = !1;
|
|
1792
|
+
}, e.isValidAttribute = function(d, M, b) {
|
|
1793
|
+
Be || sa({});
|
|
1794
|
+
const V = Z(d), ae = Z(M);
|
|
1795
|
+
return es(V, ae, b);
|
|
1796
|
+
}, e.addHook = function(d, M) {
|
|
1797
|
+
typeof M == "function" && pt(H[d], M);
|
|
1798
|
+
}, e.removeHook = function(d, M) {
|
|
1799
|
+
if (M !== void 0) {
|
|
1800
|
+
const b = qr(H[d], M);
|
|
1801
|
+
return b === -1 ? void 0 : Yr(H[d], b, 1)[0];
|
|
1795
1802
|
}
|
|
1796
|
-
return
|
|
1803
|
+
return ps(H[d]);
|
|
1797
1804
|
}, e.removeHooks = function(d) {
|
|
1798
|
-
|
|
1805
|
+
H[d] = [];
|
|
1799
1806
|
}, e.removeAllHooks = function() {
|
|
1800
|
-
|
|
1807
|
+
H = xs();
|
|
1801
1808
|
}, e;
|
|
1802
1809
|
}
|
|
1803
|
-
var
|
|
1810
|
+
var bs = Bs();
|
|
1804
1811
|
class ui {
|
|
1805
1812
|
constructor(e) {
|
|
1806
1813
|
h(this, "dataLayer");
|
|
@@ -1872,7 +1879,7 @@ class ui {
|
|
|
1872
1879
|
return this.dataLayer.getAnswerData.split(" ").slice(0, this.answerWidgetShowMoreLimit).join(" ") + "...";
|
|
1873
1880
|
}
|
|
1874
1881
|
get fullAnswerFormatted() {
|
|
1875
|
-
return
|
|
1882
|
+
return bs.sanitize(z.parse(this.dataLayer.getAnswerData)).replace(/<a /g, '<a target="_blank" class="searchstax-answer-link" rel="noopener noreferrer" ');
|
|
1876
1883
|
}
|
|
1877
1884
|
get answerLoading() {
|
|
1878
1885
|
return this.dataLayer.answerLoading;
|
|
@@ -1918,7 +1925,7 @@ class ui {
|
|
|
1918
1925
|
return this.dataLayer.isInfiniteScroll ?? !1;
|
|
1919
1926
|
}
|
|
1920
1927
|
get answerErrorMessage() {
|
|
1921
|
-
return
|
|
1928
|
+
return bs.sanitize(z.parse(this.dataLayer.answerErrorMessage)).replace("<br>", "");
|
|
1922
1929
|
}
|
|
1923
1930
|
get searchExecuted() {
|
|
1924
1931
|
var e, t, a;
|
|
@@ -2031,7 +2038,7 @@ class E {
|
|
|
2031
2038
|
}
|
|
2032
2039
|
}
|
|
2033
2040
|
}
|
|
2034
|
-
class
|
|
2041
|
+
class da {
|
|
2035
2042
|
static getOrSetCookie(e, t) {
|
|
2036
2043
|
let a = this.getCookie(e);
|
|
2037
2044
|
return a == null && (a = t ?? this.makeid(25), this.setCookie(e, a, { secure: !0, "max-age": 3600 })), a;
|
|
@@ -2135,7 +2142,7 @@ class di {
|
|
|
2135
2142
|
});
|
|
2136
2143
|
}
|
|
2137
2144
|
cookieHandlingCallback(e) {
|
|
2138
|
-
this.cookiesDisabled ? (this.sessionIdValue = null,
|
|
2145
|
+
this.cookiesDisabled ? (this.sessionIdValue = null, da.deleteCookie(this.sessionId), da.deleteCookie("ms_visitorid")) : this.sessionIdValue = da.getOrSetCookie(this.sessionId, e);
|
|
2139
2146
|
}
|
|
2140
2147
|
setIsInfiniteScroll(e) {
|
|
2141
2148
|
this.isInfiniteScroll = e;
|
|
@@ -2428,7 +2435,7 @@ class di {
|
|
|
2428
2435
|
return this.searchResultUnparsed;
|
|
2429
2436
|
}
|
|
2430
2437
|
}
|
|
2431
|
-
class
|
|
2438
|
+
class wt {
|
|
2432
2439
|
static combineResultsWithMetadata(e) {
|
|
2433
2440
|
const t = [], a = parseInt(e.response.start + "");
|
|
2434
2441
|
return e.response.docs.forEach((s, i) => {
|
|
@@ -2520,7 +2527,7 @@ class mt {
|
|
|
2520
2527
|
return e === null ? "" : typeof e == "string" ? e : Array.isArray(e) ? e.join(" ") : "";
|
|
2521
2528
|
}
|
|
2522
2529
|
}
|
|
2523
|
-
class
|
|
2530
|
+
class Ms {
|
|
2524
2531
|
constructor(e) {
|
|
2525
2532
|
h(this, "routeName", "searchstax");
|
|
2526
2533
|
h(this, "ignoredKeys", []);
|
|
@@ -2610,24 +2617,24 @@ class gi {
|
|
|
2610
2617
|
return e.indexOf("?") !== -1;
|
|
2611
2618
|
}
|
|
2612
2619
|
}
|
|
2613
|
-
const
|
|
2614
|
-
class
|
|
2620
|
+
const Ge = { question: "I_AM_A_QUESTION", notQuestion: "I_AM_NOT_A_QUESTION", close: "CLOSE" };
|
|
2621
|
+
class Cs extends Error {
|
|
2615
2622
|
constructor(e, t) {
|
|
2616
2623
|
super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
|
|
2617
2624
|
}
|
|
2618
2625
|
}
|
|
2619
|
-
function
|
|
2626
|
+
function ga(r) {
|
|
2620
2627
|
}
|
|
2621
2628
|
function pi(r) {
|
|
2622
2629
|
if (typeof r == "function")
|
|
2623
2630
|
throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
|
|
2624
|
-
const { onEvent: e =
|
|
2631
|
+
const { onEvent: e = ga, onError: t = ga, onRetry: a = ga, onComment: s } = r;
|
|
2625
2632
|
let i = "", n = !0, o, c = "", l = "";
|
|
2626
2633
|
function g(m) {
|
|
2627
|
-
const x = n ? m.replace(/^\xEF\xBB\xBF/, "") : m, [k,
|
|
2634
|
+
const x = n ? m.replace(/^\xEF\xBB\xBF/, "") : m, [k, A] = mi(`${i}${x}`);
|
|
2628
2635
|
for (const P of k)
|
|
2629
2636
|
f(P);
|
|
2630
|
-
i =
|
|
2637
|
+
i = A, n = !1;
|
|
2631
2638
|
}
|
|
2632
2639
|
function f(m) {
|
|
2633
2640
|
if (m === "") {
|
|
@@ -2640,7 +2647,7 @@ function pi(r) {
|
|
|
2640
2647
|
}
|
|
2641
2648
|
const x = m.indexOf(":");
|
|
2642
2649
|
if (x !== -1) {
|
|
2643
|
-
const k = m.slice(0, x),
|
|
2650
|
+
const k = m.slice(0, x), A = m[x + 1] === " " ? 2 : 1, P = m.slice(x + A);
|
|
2644
2651
|
p(k, P, m);
|
|
2645
2652
|
return;
|
|
2646
2653
|
}
|
|
@@ -2659,10 +2666,10 @@ function pi(r) {
|
|
|
2659
2666
|
o = x.includes("\0") ? void 0 : x;
|
|
2660
2667
|
break;
|
|
2661
2668
|
case "retry":
|
|
2662
|
-
/^\d+$/.test(x) ? a(parseInt(x, 10)) : t(new
|
|
2669
|
+
/^\d+$/.test(x) ? a(parseInt(x, 10)) : t(new Cs(`Invalid \`retry\` value: "${x}"`, { type: "invalid-retry", value: x, line: k }));
|
|
2663
2670
|
break;
|
|
2664
2671
|
default:
|
|
2665
|
-
t(new
|
|
2672
|
+
t(new Cs(`Unknown field "${m.length > 20 ? `${m.slice(0, 20)}…` : m}"`, { type: "unknown-field", field: m, value: x, line: k }));
|
|
2666
2673
|
break;
|
|
2667
2674
|
}
|
|
2668
2675
|
}
|
|
@@ -2693,113 +2700,113 @@ function mi(r) {
|
|
|
2693
2700
|
}
|
|
2694
2701
|
return [e, t];
|
|
2695
2702
|
}
|
|
2696
|
-
class
|
|
2703
|
+
class Ss extends Event {
|
|
2697
2704
|
constructor(e, t) {
|
|
2698
2705
|
var a, s;
|
|
2699
2706
|
super(e), this.code = (a = t == null ? void 0 : t.code) != null ? a : void 0, this.message = (s = t == null ? void 0 : t.message) != null ? s : void 0;
|
|
2700
2707
|
}
|
|
2701
2708
|
[Symbol.for("nodejs.util.inspect.custom")](e, t, a) {
|
|
2702
|
-
return a(
|
|
2709
|
+
return a(ks(this), t);
|
|
2703
2710
|
}
|
|
2704
2711
|
[Symbol.for("Deno.customInspect")](e, t) {
|
|
2705
|
-
return e(
|
|
2712
|
+
return e(ks(this), t);
|
|
2706
2713
|
}
|
|
2707
2714
|
}
|
|
2708
2715
|
function fi(r) {
|
|
2709
2716
|
const e = globalThis.DOMException;
|
|
2710
2717
|
return typeof e == "function" ? new e(r, "SyntaxError") : new SyntaxError(r);
|
|
2711
2718
|
}
|
|
2712
|
-
function
|
|
2713
|
-
return r instanceof Error ? "errors" in r && Array.isArray(r.errors) ? r.errors.map(
|
|
2719
|
+
function Ma(r) {
|
|
2720
|
+
return r instanceof Error ? "errors" in r && Array.isArray(r.errors) ? r.errors.map(Ma).join(", ") : "cause" in r && r.cause instanceof Error ? `${r}: ${Ma(r.cause)}` : r.message : `${r}`;
|
|
2714
2721
|
}
|
|
2715
|
-
function
|
|
2722
|
+
function ks(r) {
|
|
2716
2723
|
return { type: r.type, message: r.message, code: r.code, defaultPrevented: r.defaultPrevented, cancelable: r.cancelable, timeStamp: r.timeStamp };
|
|
2717
2724
|
}
|
|
2718
|
-
var
|
|
2725
|
+
var Us = (r) => {
|
|
2719
2726
|
throw TypeError(r);
|
|
2720
|
-
},
|
|
2721
|
-
class
|
|
2727
|
+
}, _a = (r, e, t) => e.has(r) || Us("Cannot " + t), R = (r, e, t) => (_a(r, e, "read from private field"), t ? t.call(r) : e.get(r)), X = (r, e, t) => e.has(r) ? Us("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), q = (r, e, t, a) => (_a(r, e, "write to private field"), e.set(r, t), t), je = (r, e, t) => (_a(r, e, "access private method"), t), de, ze, qe, Ht, qt, Ct, Ke, St, Ne, Ye, Xe, Je, xt, ye, Ca, Sa, ka, Ts, Ta, va, bt, Ea, Aa;
|
|
2728
|
+
class Vt extends EventTarget {
|
|
2722
2729
|
constructor(e, t) {
|
|
2723
2730
|
var a, s;
|
|
2724
|
-
super(), X(this, ye), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, X(this,
|
|
2731
|
+
super(), X(this, ye), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, X(this, de), X(this, ze), X(this, qe), X(this, Ht), X(this, qt), X(this, Ct), X(this, Ke), X(this, St, null), X(this, Ne), X(this, Ye), X(this, Xe, null), X(this, Je, null), X(this, xt, null), X(this, Sa, async (i) => {
|
|
2725
2732
|
var n;
|
|
2726
|
-
R(this,
|
|
2733
|
+
R(this, Ye).reset();
|
|
2727
2734
|
const { body: o, redirected: c, status: l, headers: g } = i;
|
|
2728
2735
|
if (l === 204) {
|
|
2729
|
-
je(this, ye,
|
|
2736
|
+
je(this, ye, bt).call(this, "Server sent HTTP 204, not reconnecting", 204), this.close();
|
|
2730
2737
|
return;
|
|
2731
2738
|
}
|
|
2732
|
-
if (c ? q(this,
|
|
2733
|
-
je(this, ye,
|
|
2739
|
+
if (c ? q(this, qe, new URL(i.url)) : q(this, qe, void 0), l !== 200) {
|
|
2740
|
+
je(this, ye, bt).call(this, `Non-200 status code (${l})`, l);
|
|
2734
2741
|
return;
|
|
2735
2742
|
}
|
|
2736
2743
|
if (!(g.get("content-type") || "").startsWith("text/event-stream")) {
|
|
2737
|
-
je(this, ye,
|
|
2744
|
+
je(this, ye, bt).call(this, 'Invalid content type, expected "text/event-stream"', l);
|
|
2738
2745
|
return;
|
|
2739
2746
|
}
|
|
2740
|
-
if (R(this,
|
|
2747
|
+
if (R(this, de) === this.CLOSED)
|
|
2741
2748
|
return;
|
|
2742
|
-
q(this,
|
|
2749
|
+
q(this, de, this.OPEN);
|
|
2743
2750
|
const f = new Event("open");
|
|
2744
|
-
if ((n = R(this,
|
|
2745
|
-
je(this, ye,
|
|
2751
|
+
if ((n = R(this, xt)) == null || n.call(this, f), this.dispatchEvent(f), typeof o != "object" || !o || !("getReader" in o)) {
|
|
2752
|
+
je(this, ye, bt).call(this, "Invalid response body, expected a web ReadableStream", l), this.close();
|
|
2746
2753
|
return;
|
|
2747
2754
|
}
|
|
2748
2755
|
const p = new TextDecoder(), y = o.getReader();
|
|
2749
2756
|
let w = !0;
|
|
2750
2757
|
do {
|
|
2751
2758
|
const { done: m, value: x } = await y.read();
|
|
2752
|
-
x && R(this,
|
|
2759
|
+
x && R(this, Ye).feed(p.decode(x, { stream: !m })), m && (w = !1, R(this, Ye).reset(), je(this, ye, Ea).call(this));
|
|
2753
2760
|
} while (w);
|
|
2754
|
-
}), X(this, Sa, (i) => {
|
|
2755
|
-
q(this, Ne, void 0), !(i.name === "AbortError" || i.type === "aborted") && je(this, ye, va).call(this, ba(i));
|
|
2756
2761
|
}), X(this, ka, (i) => {
|
|
2757
|
-
|
|
2758
|
-
const n = new MessageEvent(i.event || "message", { data: i.data, origin: R(this, Ue) ? R(this, Ue).origin : R(this, $e).origin, lastEventId: i.id || "" });
|
|
2759
|
-
R(this, Ye) && (!i.event || i.event === "message") && R(this, Ye).call(this, n), this.dispatchEvent(n);
|
|
2762
|
+
q(this, Ne, void 0), !(i.name === "AbortError" || i.type === "aborted") && je(this, ye, Ea).call(this, Ma(i));
|
|
2760
2763
|
}), X(this, Ta, (i) => {
|
|
2761
|
-
q(this,
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
+
typeof i.id == "string" && q(this, St, i.id);
|
|
2765
|
+
const n = new MessageEvent(i.event || "message", { data: i.data, origin: R(this, qe) ? R(this, qe).origin : R(this, ze).origin, lastEventId: i.id || "" });
|
|
2766
|
+
R(this, Je) && (!i.event || i.event === "message") && R(this, Je).call(this, n), this.dispatchEvent(n);
|
|
2767
|
+
}), X(this, va, (i) => {
|
|
2768
|
+
q(this, Ct, i);
|
|
2769
|
+
}), X(this, Aa, () => {
|
|
2770
|
+
q(this, Ke, void 0), R(this, de) === this.CONNECTING && je(this, ye, Ca).call(this);
|
|
2764
2771
|
});
|
|
2765
2772
|
try {
|
|
2766
2773
|
if (e instanceof URL)
|
|
2767
|
-
q(this,
|
|
2774
|
+
q(this, ze, e);
|
|
2768
2775
|
else if (typeof e == "string")
|
|
2769
|
-
q(this,
|
|
2776
|
+
q(this, ze, new URL(e, Li()));
|
|
2770
2777
|
else
|
|
2771
2778
|
throw new Error("Invalid URL");
|
|
2772
2779
|
} catch {
|
|
2773
2780
|
throw fi("An invalid or illegal string was specified");
|
|
2774
2781
|
}
|
|
2775
|
-
q(this,
|
|
2782
|
+
q(this, Ye, pi({ onEvent: R(this, Ta), onRetry: R(this, va) })), q(this, de, this.CONNECTING), q(this, Ct, 3e3), q(this, qt, (a = t == null ? void 0 : t.fetch) != null ? a : globalThis.fetch), q(this, Ht, (s = t == null ? void 0 : t.withCredentials) != null ? s : !1), je(this, ye, Ca).call(this);
|
|
2776
2783
|
}
|
|
2777
2784
|
get readyState() {
|
|
2778
|
-
return R(this,
|
|
2785
|
+
return R(this, de);
|
|
2779
2786
|
}
|
|
2780
2787
|
get url() {
|
|
2781
|
-
return R(this,
|
|
2788
|
+
return R(this, ze).href;
|
|
2782
2789
|
}
|
|
2783
2790
|
get withCredentials() {
|
|
2784
|
-
return R(this,
|
|
2791
|
+
return R(this, Ht);
|
|
2785
2792
|
}
|
|
2786
2793
|
get onerror() {
|
|
2787
|
-
return R(this,
|
|
2794
|
+
return R(this, Xe);
|
|
2788
2795
|
}
|
|
2789
2796
|
set onerror(e) {
|
|
2790
|
-
q(this,
|
|
2797
|
+
q(this, Xe, e);
|
|
2791
2798
|
}
|
|
2792
2799
|
get onmessage() {
|
|
2793
|
-
return R(this,
|
|
2800
|
+
return R(this, Je);
|
|
2794
2801
|
}
|
|
2795
2802
|
set onmessage(e) {
|
|
2796
|
-
q(this,
|
|
2803
|
+
q(this, Je, e);
|
|
2797
2804
|
}
|
|
2798
2805
|
get onopen() {
|
|
2799
|
-
return R(this,
|
|
2806
|
+
return R(this, xt);
|
|
2800
2807
|
}
|
|
2801
2808
|
set onopen(e) {
|
|
2802
|
-
q(this,
|
|
2809
|
+
q(this, xt, e);
|
|
2803
2810
|
}
|
|
2804
2811
|
addEventListener(e, t, a) {
|
|
2805
2812
|
const s = t;
|
|
@@ -2810,28 +2817,28 @@ class Ht extends EventTarget {
|
|
|
2810
2817
|
super.removeEventListener(e, s, a);
|
|
2811
2818
|
}
|
|
2812
2819
|
close() {
|
|
2813
|
-
R(this,
|
|
2820
|
+
R(this, Ke) && clearTimeout(R(this, Ke)), R(this, de) !== this.CLOSED && (R(this, Ne) && R(this, Ne).abort(), q(this, de, this.CLOSED), q(this, Ne, void 0));
|
|
2814
2821
|
}
|
|
2815
2822
|
}
|
|
2816
|
-
|
|
2817
|
-
q(this,
|
|
2818
|
-
},
|
|
2823
|
+
de = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakSet(), Ca = function() {
|
|
2824
|
+
q(this, de, this.CONNECTING), q(this, Ne, new AbortController()), R(this, qt)(R(this, ze), je(this, ye, Ts).call(this)).then(R(this, Sa)).catch(R(this, ka));
|
|
2825
|
+
}, Sa = /* @__PURE__ */ new WeakMap(), ka = /* @__PURE__ */ new WeakMap(), Ts = function() {
|
|
2819
2826
|
var r;
|
|
2820
|
-
const e = { mode: "cors", redirect: "follow", headers: { Accept: "text/event-stream", ...R(this,
|
|
2827
|
+
const e = { mode: "cors", redirect: "follow", headers: { Accept: "text/event-stream", ...R(this, St) ? { "Last-Event-ID": R(this, St) } : void 0 }, cache: "no-store", signal: (r = R(this, Ne)) == null ? void 0 : r.signal };
|
|
2821
2828
|
return "window" in globalThis && (e.credentials = this.withCredentials ? "include" : "same-origin"), e;
|
|
2822
|
-
},
|
|
2829
|
+
}, Ta = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), bt = function(r, e) {
|
|
2823
2830
|
var t;
|
|
2824
|
-
R(this,
|
|
2825
|
-
const a = new
|
|
2826
|
-
(t = R(this,
|
|
2827
|
-
},
|
|
2831
|
+
R(this, de) !== this.CLOSED && q(this, de, this.CLOSED);
|
|
2832
|
+
const a = new Ss("error", { code: e, message: r });
|
|
2833
|
+
(t = R(this, Xe)) == null || t.call(this, a), this.dispatchEvent(a);
|
|
2834
|
+
}, Ea = function(r, e) {
|
|
2828
2835
|
var t;
|
|
2829
|
-
if (R(this,
|
|
2836
|
+
if (R(this, de) === this.CLOSED)
|
|
2830
2837
|
return;
|
|
2831
|
-
q(this,
|
|
2832
|
-
const a = new
|
|
2833
|
-
(t = R(this,
|
|
2834
|
-
},
|
|
2838
|
+
q(this, de, this.CONNECTING);
|
|
2839
|
+
const a = new Ss("error", { code: e, message: r });
|
|
2840
|
+
(t = R(this, Xe)) == null || t.call(this, a), this.dispatchEvent(a), q(this, Ke, setTimeout(R(this, Aa), R(this, Ct)));
|
|
2841
|
+
}, Aa = /* @__PURE__ */ new WeakMap(), Vt.CONNECTING = 0, Vt.OPEN = 1, Vt.CLOSED = 2;
|
|
2835
2842
|
function Li() {
|
|
2836
2843
|
const r = "document" in globalThis ? globalThis.document : void 0;
|
|
2837
2844
|
return r && typeof r == "object" && "baseURI" in r && typeof r.baseURI == "string" ? r.baseURI : void 0;
|
|
@@ -2967,7 +2974,7 @@ class yi {
|
|
|
2967
2974
|
});
|
|
2968
2975
|
}
|
|
2969
2976
|
cacheFacetsCallback(e, t) {
|
|
2970
|
-
let a =
|
|
2977
|
+
let a = wt.extractFacets(e);
|
|
2971
2978
|
t ? this.dataLayer.setSearchFacetsCachedTabs(a) : this.dataLayer.setSearchFacetsCached(a), this.resolveFn && this.resolveFn();
|
|
2972
2979
|
}
|
|
2973
2980
|
search(e, t, a = !1, s = !1, i = !1) {
|
|
@@ -2989,25 +2996,25 @@ class yi {
|
|
|
2989
2996
|
startSSE(e, t) {
|
|
2990
2997
|
if (!this.dataLayer.turnAIAnswerGenerationOn || e === "*" || this.dataLayer.searchObject.page !== 1)
|
|
2991
2998
|
return;
|
|
2992
|
-
const a = new
|
|
2999
|
+
const a = new Vt(this.dataLayer.questionURL + this.generateQueryParams(this.dataLayer.searchObject), { fetch: (i, n) => fetch(i, { ...n, headers: { ...n == null ? void 0 : n.headers, Authorization: this._authToken } }) }), s = this.dataLayer;
|
|
2993
3000
|
return a.onmessage = (i) => {
|
|
2994
|
-
if (i.data ===
|
|
2995
|
-
i.data ===
|
|
3001
|
+
if (i.data === Ge.question || i.data === Ge.notQuestion) {
|
|
3002
|
+
i.data === Ge.question ? (this.dataLayer.setAnswerLoading(!0), this.dataLayer.setIsQuestion(!0)) : (s.setAnswerLoading(!1), this.dataLayer.setIsQuestion(!1)), s.setAnswerData("");
|
|
2996
3003
|
return;
|
|
2997
3004
|
}
|
|
2998
|
-
if (i.data ===
|
|
3005
|
+
if (i.data === Ge.close) {
|
|
2999
3006
|
we.trackAnswerData({ ...s.parsedData.trackingData, answer: s.$answer.getValue(), isQuestion: this.dataLayer.isQuestion }), s.setAnswerLoading(!1), a.close();
|
|
3000
3007
|
return;
|
|
3001
3008
|
}
|
|
3002
|
-
if (i.data.indexOf("[comment]: <> ({") !== -1) {
|
|
3003
|
-
const n = i.data.split("[comment]: <> ({")[1].split("})")[0], o = JSON.parse("{" + n + "}");
|
|
3004
|
-
this.dataLayer.answerWidgetShowMoreLimit = o.displayShowMoreAfter, o.showMoreEnabled || (this.dataLayer.answerWidgetShowMoreLimit = 1e17);
|
|
3005
|
-
}
|
|
3006
3009
|
if (i.data.indexOf("[!CAUTION]") !== -1) {
|
|
3007
3010
|
s.setAnswerError(!0), s.setAnswerErrorMessage("We're having trouble generating an answer. Please try again."), a.close();
|
|
3008
3011
|
return;
|
|
3009
3012
|
}
|
|
3010
|
-
|
|
3013
|
+
if (i.data.indexOf("[comment]: <> ({") !== -1) {
|
|
3014
|
+
const n = i.data.split("[comment]: <> ({")[1].split("})")[0], o = JSON.parse("{" + n + "}");
|
|
3015
|
+
this.dataLayer.answerWidgetShowMoreLimit = o.displayShowMoreAfter, o.showMoreEnabled || (this.dataLayer.answerWidgetShowMoreLimit = 1e17), t("");
|
|
3016
|
+
} else
|
|
3017
|
+
t(i.data);
|
|
3011
3018
|
}, a.addEventListener("error", (i) => {
|
|
3012
3019
|
(i.code === 401 || i.code === 500) && (s.setAnswerErrorMessage("We're having trouble generating an answer. Please try again."), s.setAnswerError(!0));
|
|
3013
3020
|
}), a.onerror = () => {
|
|
@@ -3036,19 +3043,19 @@ class yi {
|
|
|
3036
3043
|
return "&" + t.join("&");
|
|
3037
3044
|
}
|
|
3038
3045
|
}
|
|
3039
|
-
var wi = Object.prototype.toString,
|
|
3046
|
+
var wi = Object.prototype.toString, Ze = Array.isArray || function(r) {
|
|
3040
3047
|
return wi.call(r) === "[object Array]";
|
|
3041
3048
|
};
|
|
3042
3049
|
function ja(r) {
|
|
3043
3050
|
return typeof r == "function";
|
|
3044
3051
|
}
|
|
3045
3052
|
function xi(r) {
|
|
3046
|
-
return
|
|
3053
|
+
return Ze(r) ? "array" : typeof r;
|
|
3047
3054
|
}
|
|
3048
|
-
function
|
|
3055
|
+
function pa(r) {
|
|
3049
3056
|
return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
3050
3057
|
}
|
|
3051
|
-
function
|
|
3058
|
+
function vs(r, e) {
|
|
3052
3059
|
return r != null && typeof r == "object" && e in r;
|
|
3053
3060
|
}
|
|
3054
3061
|
function bi(r, e) {
|
|
@@ -3068,7 +3075,7 @@ function vi(r) {
|
|
|
3068
3075
|
return Ti[e];
|
|
3069
3076
|
});
|
|
3070
3077
|
}
|
|
3071
|
-
var Ei = /\s*/,
|
|
3078
|
+
var Ei = /\s*/, Ai = /\s+/, Es = /\s*=/, ji = /\s*\}/, Ii = /#|\^|\/|>|\{|&|=|!/;
|
|
3072
3079
|
function Di(r, e) {
|
|
3073
3080
|
if (!r)
|
|
3074
3081
|
return [];
|
|
@@ -3083,29 +3090,29 @@ function Di(r, e) {
|
|
|
3083
3090
|
}
|
|
3084
3091
|
var f, p, y;
|
|
3085
3092
|
function w(D) {
|
|
3086
|
-
if (typeof D == "string" && (D = D.split(
|
|
3093
|
+
if (typeof D == "string" && (D = D.split(Ai, 2)), !Ze(D) || D.length !== 2)
|
|
3087
3094
|
throw new Error("Invalid tags: " + D);
|
|
3088
|
-
f = new RegExp(
|
|
3095
|
+
f = new RegExp(pa(D[0]) + "\\s*"), p = new RegExp("\\s*" + pa(D[1])), y = new RegExp("\\s*" + pa("}" + D[1]));
|
|
3089
3096
|
}
|
|
3090
3097
|
w(e || F.tags);
|
|
3091
|
-
for (var m = new
|
|
3092
|
-
if (x = m.pos,
|
|
3093
|
-
for (var $ = 0, v =
|
|
3094
|
-
P =
|
|
3098
|
+
for (var m = new kt(r), x, k, A, P, T, O; !m.eos(); ) {
|
|
3099
|
+
if (x = m.pos, A = m.scanUntil(f), A)
|
|
3100
|
+
for (var $ = 0, v = A.length; $ < v; ++$)
|
|
3101
|
+
P = A.charAt($), ki(P) ? (i.push(s.length), c += P) : (o = !0, t = !0, c += " "), s.push(["text", P, x, x + 1]), x += 1, P === `
|
|
3095
3102
|
` && (g(), c = "", l = 0, t = !1);
|
|
3096
3103
|
if (!m.scan(f))
|
|
3097
3104
|
break;
|
|
3098
|
-
if (n = !0, k = m.scan(Ii) || "name", m.scan(Ei), k === "=" ? (
|
|
3105
|
+
if (n = !0, k = m.scan(Ii) || "name", m.scan(Ei), k === "=" ? (A = m.scanUntil(Es), m.scan(Es), m.scanUntil(p)) : k === "{" ? (A = m.scanUntil(y), m.scan(ji), m.scanUntil(p), k = "&") : A = m.scanUntil(p), !m.scan(p))
|
|
3099
3106
|
throw new Error("Unclosed tag at " + m.pos);
|
|
3100
|
-
if (k == ">" ? T = [k,
|
|
3107
|
+
if (k == ">" ? T = [k, A, x, m.pos, c, l, t] : T = [k, A, x, m.pos], l++, s.push(T), k === "#" || k === "^")
|
|
3101
3108
|
a.push(T);
|
|
3102
3109
|
else if (k === "/") {
|
|
3103
3110
|
if (O = a.pop(), !O)
|
|
3104
|
-
throw new Error('Unopened section "' +
|
|
3105
|
-
if (O[1] !==
|
|
3111
|
+
throw new Error('Unopened section "' + A + '" at ' + x);
|
|
3112
|
+
if (O[1] !== A)
|
|
3106
3113
|
throw new Error('Unclosed section "' + O[1] + '" at ' + x);
|
|
3107
3114
|
} else
|
|
3108
|
-
k === "name" || k === "{" || k === "&" ? o = !0 : k === "=" && w(
|
|
3115
|
+
k === "name" || k === "{" || k === "&" ? o = !0 : k === "=" && w(A);
|
|
3109
3116
|
}
|
|
3110
3117
|
if (g(), O = a.pop(), O)
|
|
3111
3118
|
throw new Error('Unclosed section "' + O[1] + '" at ' + m.pos);
|
|
@@ -3131,18 +3138,18 @@ function Ri(r) {
|
|
|
3131
3138
|
}
|
|
3132
3139
|
return e;
|
|
3133
3140
|
}
|
|
3134
|
-
function
|
|
3141
|
+
function kt(r) {
|
|
3135
3142
|
this.string = r, this.tail = r, this.pos = 0;
|
|
3136
3143
|
}
|
|
3137
|
-
|
|
3144
|
+
kt.prototype.eos = function() {
|
|
3138
3145
|
return this.tail === "";
|
|
3139
|
-
},
|
|
3146
|
+
}, kt.prototype.scan = function(r) {
|
|
3140
3147
|
var e = this.tail.match(r);
|
|
3141
3148
|
if (!e || e.index !== 0)
|
|
3142
3149
|
return "";
|
|
3143
3150
|
var t = e[0];
|
|
3144
3151
|
return this.tail = this.tail.substring(t.length), this.pos += t.length, t;
|
|
3145
|
-
},
|
|
3152
|
+
}, kt.prototype.scanUntil = function(r) {
|
|
3146
3153
|
var e = this.tail.search(r), t;
|
|
3147
3154
|
switch (e) {
|
|
3148
3155
|
case -1:
|
|
@@ -3156,12 +3163,12 @@ bt.prototype.eos = function() {
|
|
|
3156
3163
|
}
|
|
3157
3164
|
return this.pos += t.length, t;
|
|
3158
3165
|
};
|
|
3159
|
-
function
|
|
3166
|
+
function et(r, e) {
|
|
3160
3167
|
this.view = r, this.cache = { ".": this.view }, this.parent = e;
|
|
3161
3168
|
}
|
|
3162
|
-
|
|
3163
|
-
return new
|
|
3164
|
-
},
|
|
3169
|
+
et.prototype.push = function(r) {
|
|
3170
|
+
return new et(r, this);
|
|
3171
|
+
}, et.prototype.lookup = function(r) {
|
|
3165
3172
|
var e = this.cache, t;
|
|
3166
3173
|
if (e.hasOwnProperty(r))
|
|
3167
3174
|
t = e[r];
|
|
@@ -3169,9 +3176,9 @@ Xe.prototype.push = function(r) {
|
|
|
3169
3176
|
for (var a = this, s, i, n, o = !1; a; ) {
|
|
3170
3177
|
if (r.indexOf(".") > 0)
|
|
3171
3178
|
for (s = a.view, i = r.split("."), n = 0; s != null && n < i.length; )
|
|
3172
|
-
n === i.length - 1 && (o =
|
|
3179
|
+
n === i.length - 1 && (o = vs(s, i[n]) || bi(s, i[n])), s = s[i[n++]];
|
|
3173
3180
|
else
|
|
3174
|
-
s = a.view[r], o =
|
|
3181
|
+
s = a.view[r], o = vs(a.view, r);
|
|
3175
3182
|
if (o) {
|
|
3176
3183
|
t = s;
|
|
3177
3184
|
break;
|
|
@@ -3182,7 +3189,7 @@ Xe.prototype.push = function(r) {
|
|
|
3182
3189
|
}
|
|
3183
3190
|
return ja(t) && (t = t.call(this.view)), t;
|
|
3184
3191
|
};
|
|
3185
|
-
function
|
|
3192
|
+
function ce() {
|
|
3186
3193
|
this.templateCache = { _cache: {}, set: function(r, e) {
|
|
3187
3194
|
this._cache[r] = e;
|
|
3188
3195
|
}, get: function(r) {
|
|
@@ -3191,25 +3198,25 @@ function oe() {
|
|
|
3191
3198
|
this._cache = {};
|
|
3192
3199
|
} };
|
|
3193
3200
|
}
|
|
3194
|
-
|
|
3201
|
+
ce.prototype.clearCache = function() {
|
|
3195
3202
|
typeof this.templateCache < "u" && this.templateCache.clear();
|
|
3196
|
-
},
|
|
3203
|
+
}, ce.prototype.parse = function(r, e) {
|
|
3197
3204
|
var t = this.templateCache, a = r + ":" + (e || F.tags).join(":"), s = typeof t < "u", i = s ? t.get(a) : void 0;
|
|
3198
3205
|
return i == null && (i = Di(r, e), s && t.set(a, i)), i;
|
|
3199
|
-
},
|
|
3200
|
-
var s = this.getConfigTags(a), i = this.parse(r, s), n = e instanceof
|
|
3206
|
+
}, ce.prototype.render = function(r, e, t, a) {
|
|
3207
|
+
var s = this.getConfigTags(a), i = this.parse(r, s), n = e instanceof et ? e : new et(e, void 0);
|
|
3201
3208
|
return this.renderTokens(i, n, t, r, a);
|
|
3202
|
-
},
|
|
3209
|
+
}, ce.prototype.renderTokens = function(r, e, t, a, s) {
|
|
3203
3210
|
for (var i = "", n, o, c, l = 0, g = r.length; l < g; ++l)
|
|
3204
3211
|
c = void 0, n = r[l], o = n[0], o === "#" ? c = this.renderSection(n, e, t, a, s) : o === "^" ? c = this.renderInverted(n, e, t, a, s) : o === ">" ? c = this.renderPartial(n, e, t, s) : o === "&" ? c = this.unescapedValue(n, e) : o === "name" ? c = this.escapedValue(n, e, s) : o === "text" && (c = this.rawValue(n)), c !== void 0 && (i += c);
|
|
3205
3212
|
return i;
|
|
3206
|
-
},
|
|
3213
|
+
}, ce.prototype.renderSection = function(r, e, t, a, s) {
|
|
3207
3214
|
var i = this, n = "", o = e.lookup(r[1]);
|
|
3208
3215
|
function c(f) {
|
|
3209
3216
|
return i.render(f, e, t, s);
|
|
3210
3217
|
}
|
|
3211
3218
|
if (o) {
|
|
3212
|
-
if (
|
|
3219
|
+
if (Ze(o))
|
|
3213
3220
|
for (var l = 0, g = o.length; l < g; ++l)
|
|
3214
3221
|
n += this.renderTokens(r[4], e.push(o[l]), t, a, s);
|
|
3215
3222
|
else if (typeof o == "object" || typeof o == "string" || typeof o == "number")
|
|
@@ -3222,17 +3229,17 @@ oe.prototype.clearCache = function() {
|
|
|
3222
3229
|
n += this.renderTokens(r[4], e, t, a, s);
|
|
3223
3230
|
return n;
|
|
3224
3231
|
}
|
|
3225
|
-
},
|
|
3232
|
+
}, ce.prototype.renderInverted = function(r, e, t, a, s) {
|
|
3226
3233
|
var i = e.lookup(r[1]);
|
|
3227
|
-
if (!i ||
|
|
3234
|
+
if (!i || Ze(i) && i.length === 0)
|
|
3228
3235
|
return this.renderTokens(r[4], e, t, a, s);
|
|
3229
|
-
},
|
|
3236
|
+
}, ce.prototype.indentPartial = function(r, e, t) {
|
|
3230
3237
|
for (var a = e.replace(/[^ \t]/g, ""), s = r.split(`
|
|
3231
3238
|
`), i = 0; i < s.length; i++)
|
|
3232
3239
|
s[i].length && (i > 0 || !t) && (s[i] = a + s[i]);
|
|
3233
3240
|
return s.join(`
|
|
3234
3241
|
`);
|
|
3235
|
-
},
|
|
3242
|
+
}, ce.prototype.renderPartial = function(r, e, t, a) {
|
|
3236
3243
|
if (t) {
|
|
3237
3244
|
var s = this.getConfigTags(a), i = ja(t) ? t(r[1]) : t[r[1]];
|
|
3238
3245
|
if (i != null) {
|
|
@@ -3242,36 +3249,36 @@ oe.prototype.clearCache = function() {
|
|
|
3242
3249
|
return this.renderTokens(g, e, t, l, a);
|
|
3243
3250
|
}
|
|
3244
3251
|
}
|
|
3245
|
-
},
|
|
3252
|
+
}, ce.prototype.unescapedValue = function(r, e) {
|
|
3246
3253
|
var t = e.lookup(r[1]);
|
|
3247
3254
|
if (t != null)
|
|
3248
3255
|
return t;
|
|
3249
|
-
},
|
|
3256
|
+
}, ce.prototype.escapedValue = function(r, e, t) {
|
|
3250
3257
|
var a = this.getConfigEscape(t) || F.escape, s = e.lookup(r[1]);
|
|
3251
3258
|
if (s != null)
|
|
3252
3259
|
return typeof s == "number" && a === F.escape ? String(s) : a(s);
|
|
3253
|
-
},
|
|
3260
|
+
}, ce.prototype.rawValue = function(r) {
|
|
3254
3261
|
return r[1];
|
|
3255
|
-
},
|
|
3256
|
-
return
|
|
3257
|
-
},
|
|
3258
|
-
if (r && typeof r == "object" && !
|
|
3262
|
+
}, ce.prototype.getConfigTags = function(r) {
|
|
3263
|
+
return Ze(r) ? r : r && typeof r == "object" ? r.tags : void 0;
|
|
3264
|
+
}, ce.prototype.getConfigEscape = function(r) {
|
|
3265
|
+
if (r && typeof r == "object" && !Ze(r))
|
|
3259
3266
|
return r.escape;
|
|
3260
3267
|
};
|
|
3261
3268
|
var F = { name: "mustache.js", version: "4.2.0", tags: ["{{", "}}"], clearCache: void 0, escape: void 0, parse: void 0, render: void 0, Scanner: void 0, Context: void 0, Writer: void 0, set templateCache(r) {
|
|
3262
|
-
|
|
3269
|
+
Tt.templateCache = r;
|
|
3263
3270
|
}, get templateCache() {
|
|
3264
|
-
return
|
|
3265
|
-
} },
|
|
3271
|
+
return Tt.templateCache;
|
|
3272
|
+
} }, Tt = new ce();
|
|
3266
3273
|
F.clearCache = function() {
|
|
3267
|
-
return
|
|
3274
|
+
return Tt.clearCache();
|
|
3268
3275
|
}, F.parse = function(r, e) {
|
|
3269
|
-
return
|
|
3276
|
+
return Tt.parse(r, e);
|
|
3270
3277
|
}, F.render = function(r, e, t, a) {
|
|
3271
3278
|
if (typeof r != "string")
|
|
3272
3279
|
throw new TypeError('Invalid template! Template should be a "string" but "' + xi(r) + '" was given as the first argument for mustache#render(template, view, partials)');
|
|
3273
|
-
return
|
|
3274
|
-
}, F.escape = vi, F.Scanner =
|
|
3280
|
+
return Tt.render(r, e, t, a);
|
|
3281
|
+
}, F.escape = vi, F.Scanner = kt, F.Context = et, F.Writer = ce;
|
|
3275
3282
|
const Oi = { main: { template: `
|
|
3276
3283
|
{{#shouldShowAnswer}}
|
|
3277
3284
|
<div class="searchstax-answer-wrap">
|
|
@@ -3795,7 +3802,7 @@ class Ui {
|
|
|
3795
3802
|
}
|
|
3796
3803
|
}
|
|
3797
3804
|
createFacetItem(e, t, a) {
|
|
3798
|
-
var s, i, n, o, c, l, g, f, p, y, w, m, x, k,
|
|
3805
|
+
var s, i, n, o, c, l, g, f, p, y, w, m, x, k, A, P;
|
|
3799
3806
|
if (typeof document < "u") {
|
|
3800
3807
|
const T = document == null ? void 0 : document.createElement("div");
|
|
3801
3808
|
T.classList.add("searchstax-facet-container"), this.deactivatedFacets[e.name] || T.classList.add("active");
|
|
@@ -3809,11 +3816,11 @@ class Ui {
|
|
|
3809
3816
|
}), (m = $ == null ? void 0 : $.querySelector("." + ((w = (y = (p = this.config) == null ? void 0 : p.templates) == null ? void 0 : y.facetItemContainerTemplate) == null ? void 0 : w.facetListTitleContainerInner))) == null || m.addEventListener("keydown", (D) => {
|
|
3810
3817
|
if (D.code === "Enter" || D.code === "Space") {
|
|
3811
3818
|
D.preventDefault(), T.classList.toggle("active");
|
|
3812
|
-
const B = T.classList.contains("active"),
|
|
3813
|
-
|
|
3819
|
+
const B = T.classList.contains("active"), ge = $.querySelector(".searchstax-facet-title");
|
|
3820
|
+
ge && ge.setAttribute("aria-expanded", String(B));
|
|
3814
3821
|
}
|
|
3815
3822
|
});
|
|
3816
|
-
const v = T.querySelector("." + (((
|
|
3823
|
+
const v = T.querySelector("." + (((A = (k = (x = this.config) == null ? void 0 : x.templates) == null ? void 0 : k.facetItemContainerTemplate) == null ? void 0 : A.facetListContainerClass) || ((P = S.facets.facetItemContainerTemplate) == null ? void 0 : P.facetListContainerClass)));
|
|
3817
3824
|
v && (e.values.forEach((D) => {
|
|
3818
3825
|
this.createFacetListItem(D, v, e.name);
|
|
3819
3826
|
}), e.hasMoreFacets && this.createHasMoreComponent(e, v, a));
|
|
@@ -3828,8 +3835,8 @@ class Ui {
|
|
|
3828
3835
|
if (typeof document < "u") {
|
|
3829
3836
|
const x = document == null ? void 0 : document.createElement("div");
|
|
3830
3837
|
x.classList.add("searchstax-facet-value-container"), e.disabled && x.classList.add("searchstax-facet-value-disabled");
|
|
3831
|
-
const k = this.isChecked(e),
|
|
3832
|
-
x.innerHTML = F.render(
|
|
3838
|
+
const k = this.isChecked(e), A = ((n = (i = (s = this.config) == null ? void 0 : s.templates) == null ? void 0 : i.facetItemTemplate) == null ? void 0 : n.template) || ((o = S.facets.facetItemTemplate) == null ? void 0 : o.template);
|
|
3839
|
+
x.innerHTML = F.render(A, { ...e, isChecked: k });
|
|
3833
3840
|
let P = (c = S.facets.facetItemTemplate) == null ? void 0 : c.checkTriggerClasses;
|
|
3834
3841
|
P = ((f = (g = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : g.facetItemTemplate) == null ? void 0 : f.checkTriggerClasses) || P, P.forEach((O) => {
|
|
3835
3842
|
var $;
|
|
@@ -3891,8 +3898,8 @@ class Ui {
|
|
|
3891
3898
|
T instanceof HTMLElement && T.focus(), this.focusedElement = null;
|
|
3892
3899
|
return;
|
|
3893
3900
|
}
|
|
3894
|
-
const k = this.focusedElement.getAttribute("data-test-value"),
|
|
3895
|
-
|
|
3901
|
+
const k = this.focusedElement.getAttribute("data-test-value"), A = this.searchFacetsMainContainer.querySelector(`[data-test-value="${k}"]`);
|
|
3902
|
+
A instanceof HTMLInputElement && A.focus(), this.focusedElement = null;
|
|
3896
3903
|
}
|
|
3897
3904
|
}
|
|
3898
3905
|
}
|
|
@@ -3982,23 +3989,23 @@ class Ui {
|
|
|
3982
3989
|
ee.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"));
|
|
3983
3990
|
}
|
|
3984
3991
|
renderMobileTemplate(e) {
|
|
3985
|
-
var t, a, s, i, n, o, c, l, g, f, p, y, w, m, x, k,
|
|
3992
|
+
var t, a, s, i, n, o, c, l, g, f, p, y, w, m, x, k, A, P, T;
|
|
3986
3993
|
if (e && typeof document < "u") {
|
|
3987
3994
|
const O = document == null ? void 0 : document.createElement("div");
|
|
3988
3995
|
O.classList.add("searchstax-facets-container-mobile");
|
|
3989
3996
|
const $ = ((s = (a = (t = this.config) == null ? void 0 : t.templates) == null ? void 0 : a.mainTemplateMobile) == null ? void 0 : s.template) || ((i = S.facets.mainTemplateMobile) == null ? void 0 : i.template);
|
|
3990
3997
|
if (this.dataLayer.renderingEngine === G.mustache) {
|
|
3991
3998
|
if (O.innerHTML = F.render($, { ...e, overlayOpened: this.overlayOpened }), (n = this.searchFacetsMainContainer) == null || n.appendChild(O), (c = (o = this.config) == null ? void 0 : o.templates) == null ? void 0 : c.mainTemplateMobile)
|
|
3992
|
-
for (const
|
|
3993
|
-
const
|
|
3994
|
-
|
|
3999
|
+
for (const ge of ((f = (g = (l = this.config) == null ? void 0 : l.templates) == null ? void 0 : g.mainTemplateMobile) == null ? void 0 : f.closeOverlayTriggerClasses) || []) {
|
|
4000
|
+
const H = O.querySelector("." + ge);
|
|
4001
|
+
H && (H.addEventListener("click", this.closeOverlay.bind(this)), H.addEventListener("keyup", (re) => {
|
|
3995
4002
|
(re.code === "Space" || re.code === "Enter") && this.closeOverlay();
|
|
3996
4003
|
}));
|
|
3997
4004
|
}
|
|
3998
4005
|
else
|
|
3999
|
-
for (const
|
|
4000
|
-
const
|
|
4001
|
-
|
|
4006
|
+
for (const ge of S.facets.mainTemplateMobile.closeOverlayTriggerClasses) {
|
|
4007
|
+
const H = O.querySelector("." + ge);
|
|
4008
|
+
H && (H.addEventListener("click", this.closeOverlay.bind(this)), H.addEventListener("keyup", (re) => {
|
|
4002
4009
|
(re.code === "Space" || re.code === "Enter") && this.closeOverlay();
|
|
4003
4010
|
}));
|
|
4004
4011
|
}
|
|
@@ -4006,11 +4013,11 @@ class Ui {
|
|
|
4006
4013
|
v && this.createFilterByComponent(v);
|
|
4007
4014
|
const D = O.querySelector("." + (((k = (x = (m = this.config) == null ? void 0 : m.templates) == null ? void 0 : x.mainTemplateMobile) == null ? void 0 : k.selectedFacetsContainerClass) || S.facets.mainTemplateMobile.selectedFacetsContainerClass));
|
|
4008
4015
|
D && (this.createSelectedFacetsComponents(D), this.createClearFacetsComponents(D));
|
|
4009
|
-
const B = O.querySelector("." + (((T = (P = (
|
|
4016
|
+
const B = O.querySelector("." + (((T = (P = (A = this.config) == null ? void 0 : A.templates) == null ? void 0 : P.mainTemplateMobile) == null ? void 0 : T.facetsContainerClass) || S.facets.mainTemplateMobile.facetsContainerClass));
|
|
4010
4017
|
if (B) {
|
|
4011
4018
|
B.innerHTML = "";
|
|
4012
|
-
for (const
|
|
4013
|
-
this.createFacetItem(
|
|
4019
|
+
for (const ge of e.facets)
|
|
4020
|
+
this.createFacetItem(ge, B, !0);
|
|
4014
4021
|
}
|
|
4015
4022
|
}
|
|
4016
4023
|
}
|
|
@@ -4732,7 +4739,7 @@ class en {
|
|
|
4732
4739
|
return this.config.testString && (e.searchExecuted = !0), this.dataLayer.setAnswerFullData(e), e;
|
|
4733
4740
|
}
|
|
4734
4741
|
}
|
|
4735
|
-
class
|
|
4742
|
+
class As {
|
|
4736
4743
|
constructor(e) {
|
|
4737
4744
|
h(this, "dataLayer");
|
|
4738
4745
|
h(this, "config");
|
|
@@ -4764,8 +4771,8 @@ class Es {
|
|
|
4764
4771
|
throw new Error("Input not found");
|
|
4765
4772
|
const m = ((n = (i = this.config.templates) == null ? void 0 : i.mainTemplate) == null ? void 0 : n.radiusInputId) || S.location.mainTemplate.radiusInputId, x = document == null ? void 0 : document.querySelector(`#${m}`);
|
|
4766
4773
|
x instanceof HTMLSelectElement && (this.radiusInput = x, x.addEventListener("change", this.radiusSelectChangeEvent.bind(this)));
|
|
4767
|
-
const k = ((c = (o = this.config.templates) == null ? void 0 : o.mainTemplate) == null ? void 0 : c.currentLocationActionButtonId) || S.location.mainTemplate.currentLocationActionButtonId,
|
|
4768
|
-
|
|
4774
|
+
const k = ((c = (o = this.config.templates) == null ? void 0 : o.mainTemplate) == null ? void 0 : c.currentLocationActionButtonId) || S.location.mainTemplate.currentLocationActionButtonId, A = document == null ? void 0 : document.querySelector(`#${k}`);
|
|
4775
|
+
A && A.addEventListener("click", this.getCurrentLocation.bind(this));
|
|
4769
4776
|
}
|
|
4770
4777
|
}
|
|
4771
4778
|
}
|
|
@@ -4873,13 +4880,13 @@ class tn {
|
|
|
4873
4880
|
initialize(e) {
|
|
4874
4881
|
var t, a;
|
|
4875
4882
|
if (this.dataLayer = new di("searchstax_session_id", e.sessionId), this.renderEngine && this.dataLayer.setRenderingEngine(this.renderEngine), this.handleHooks(), e.questionURL && (this.dataLayer.questionURL = e.questionURL), e.analyticsBaseUrl && typeof window < "u" && (window.analyticsBaseUrl = e.analyticsBaseUrl, window._msq = e._msq || [], this.attachAnalyticsScript(e.analyticsSrc)), e.autoCorrect === !1 && (this.dataLayer.autoCorrect = !1), e.language && this.dataLayer.setLanguage(e.language), e.model && this.dataLayer.setModel(e.model), this.dataLayer.searchstaxConfig || (this.dataLayer.setSearchstaxConfig(e), this.searchHelper = new yi({ ...e, sessionId: this.dataLayer.sessionId }, this.dataLayer), this.dataLayer.searchHelper = this.searchHelper), ((t = e.router) == null ? void 0 : t.enabled) === void 0 || ((a = e.router) == null ? void 0 : a.enabled) === !0) {
|
|
4876
|
-
this.routerEnabled = !0, this.routerHelper = new
|
|
4883
|
+
this.routerEnabled = !0, this.routerHelper = new Ms(e.router ? e.router : { enabled: !0 });
|
|
4877
4884
|
const s = this.routerHelper.urlToSearchObject((window == null ? void 0 : window.location.href) ?? "");
|
|
4878
4885
|
this.dataLayer.searchObject.itemsPerPage ? s.itemsPerPage = this.dataLayer.searchObject.itemsPerPage : s.itemsPerPage && this.dataLayer.setItemsPerPage(s.itemsPerPage), s.model && this.dataLayer.setModel(s.model), s.location && (s.location.address && this.dataLayer.setSearchLocation(s.location.address), s.location.lat && this.dataLayer.setSearchLat(s.location.lat), s.location.lon && this.dataLayer.setSearchLong(s.location.lon), s.location.radius && this.dataLayer.setSearchRadius(s.location.radius)), this.dataLayer.setSearchObject(s), addEventListener("popstate", () => {
|
|
4879
4886
|
this.routerHelper && this.dataLayer.setSearchObject(this.routerHelper.urlToSearchObject((window == null ? void 0 : window.location.href) ?? "", this.dataLayer.searchObject.itemsPerPage));
|
|
4880
4887
|
});
|
|
4881
4888
|
} else
|
|
4882
|
-
this.routerHelper = new
|
|
4889
|
+
this.routerHelper = new Ms({});
|
|
4883
4890
|
}
|
|
4884
4891
|
getMetadata(e) {
|
|
4885
4892
|
this.searchHelper && (e.query === "undefined" || e.query === void 0) && this.dataLayer.setSearchObject({ ...e, query: "*" });
|
|
@@ -4909,17 +4916,17 @@ class tn {
|
|
|
4909
4916
|
}
|
|
4910
4917
|
parseSearchResultsResponseMetadata(e) {
|
|
4911
4918
|
var s, i, n, o;
|
|
4912
|
-
const t =
|
|
4919
|
+
const t = wt.extractSearchResultsMetadata(e), a = ((i = (s = this.dataLayer.searchLocationConfig) == null ? void 0 : s.locationValuesOverride) == null ? void 0 : i.locationFilterDefaultValue) ?? ((o = (n = t.location) == null ? void 0 : n.filter) == null ? void 0 : o.defaultValue);
|
|
4913
4920
|
!this.dataLayer.searchRadius && a && this.dataLayer.setSearchRadius(a), this.dataLayer.setSearchResultsMetadata(t);
|
|
4914
4921
|
}
|
|
4915
4922
|
parseSearchResultsResponse(e) {
|
|
4916
4923
|
var s, i;
|
|
4917
4924
|
this.handleRouter(), this.dataLayer.setItemsPerPage(parseInt(e.responseHeader.params.rows)), this.dataLayer.setModel(e.responseHeader.params.model);
|
|
4918
|
-
let t =
|
|
4925
|
+
let t = wt.combineResultsWithMetadata(e), a = wt.extractFacets(e);
|
|
4919
4926
|
this.dataLayer.setSearchFacets(a), (i = (s = this.dataLayer.searchstaxConfig) == null ? void 0 : s.hooks) != null && i.afterSearch && (t = this.dataLayer.searchstaxConfig.hooks.afterSearch(t, e)), this.dataLayer.setSearchExternalPromotions(e.externalLinks ?? []), this.parseSearchResultsResponseMetadata(e), this.dataLayer.setSearchResultUnparsedData(e), this.dataLayer.setSearchResults(t);
|
|
4920
4927
|
}
|
|
4921
4928
|
parseAnswerResultsResponse(e) {
|
|
4922
|
-
this.handleRouter(), e !==
|
|
4929
|
+
this.handleRouter(), e !== Ge.question && e !== Ge.notQuestion && (this.dataLayer.setAnswerLoading(!0), this.dataLayer.setAnswerData(this.dataLayer.getAnswerData + e));
|
|
4923
4930
|
}
|
|
4924
4931
|
cacheFacets(e) {
|
|
4925
4932
|
var t, a;
|
|
@@ -4945,8 +4952,8 @@ class tn {
|
|
|
4945
4952
|
}
|
|
4946
4953
|
addSearchLocationWidget(e, t) {
|
|
4947
4954
|
var a, s;
|
|
4948
|
-
this.dataLayer.searchLocationConfig || (t.locationSearchEnabled ? (this.dataLayer.setLocationEnabled(!0), this.dataLayer.setSearchLocationConfig(t), t.locationValuesOverride ? (this.searchLocationWidget = new
|
|
4949
|
-
this.searchLocationWidget = new
|
|
4955
|
+
this.dataLayer.searchLocationConfig || (t.locationSearchEnabled ? (this.dataLayer.setLocationEnabled(!0), this.dataLayer.setSearchLocationConfig(t), t.locationValuesOverride ? (this.searchLocationWidget = new As({ containerId: e, config: t, dataLayer: this.dataLayer }), (a = t == null ? void 0 : t.locationValuesOverride) != null && a.locationFilterDefaultValue && this.dataLayer.setSearchRadius((s = t == null ? void 0 : t.locationValuesOverride) == null ? void 0 : s.locationFilterDefaultValue)) : this.dataLayer.$searchResultsMetadata.subscribeUntilHasValue(() => {
|
|
4956
|
+
this.searchLocationWidget = new As({ containerId: e, config: t, dataLayer: this.dataLayer });
|
|
4950
4957
|
}, 0)) : this.dataLayer.setLocationEnabled(!1));
|
|
4951
4958
|
}
|
|
4952
4959
|
addAnswerWidget(e, t) {
|
|
@@ -4995,7 +5002,7 @@ class tn {
|
|
|
4995
5002
|
}
|
|
4996
5003
|
executeLinkClick(e) {
|
|
4997
5004
|
var a, s;
|
|
4998
|
-
let t =
|
|
5005
|
+
let t = wt.findResultByUniqueId(e, this.dataLayer.searchResults ?? []);
|
|
4999
5006
|
t && ((s = (a = this.searchResultsConfig) == null ? void 0 : a.hooks) != null && s.afterLinkClick && (t = this.searchResultsConfig.hooks.afterLinkClick(t)), t && this.dataLayer.searchResultsMetadata && !this.dataLayer.cookiesDisabled && we.trackClick({ result: t, ...this.dataLayer.parsedData.trackingData }).then(() => {
|
|
5000
5007
|
typeof window < "u" && (window.location.href = (t == null ? void 0 : t.url) ?? "");
|
|
5001
5008
|
}).catch(() => {
|
|
@@ -5014,11 +5021,11 @@ class tn {
|
|
|
5014
5021
|
this.searchResultsConfig && (this.searchResultsConfig.templates = (t = this.searchResultsConfig) != null && t.templates ? { ...(a = this.searchResultsConfig) == null ? void 0 : a.templates, ...e } : e, (s = this.searchResultsWidget) == null || s.changeTemplate());
|
|
5015
5022
|
}
|
|
5016
5023
|
}
|
|
5017
|
-
const
|
|
5024
|
+
const C = {
|
|
5018
5025
|
//@ts-ignore
|
|
5019
5026
|
searchstax: new tn("react")
|
|
5020
5027
|
};
|
|
5021
|
-
function
|
|
5028
|
+
function qs(r, e, t, a, s, i, n, o) {
|
|
5022
5029
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: r && /* @__PURE__ */ u.jsx(
|
|
5023
5030
|
"div",
|
|
5024
5031
|
{
|
|
@@ -5064,14 +5071,14 @@ function Us(r, e, t, a, s, i, n, o) {
|
|
|
5064
5071
|
}
|
|
5065
5072
|
function an(r) {
|
|
5066
5073
|
let e = !1;
|
|
5067
|
-
const [t, a] =
|
|
5074
|
+
const [t, a] = W(
|
|
5068
5075
|
null
|
|
5069
|
-
), [s, i] =
|
|
5076
|
+
), [s, i] = W(null), [n, o] = W(!1), [c, l] = W(
|
|
5070
5077
|
void 0
|
|
5071
|
-
), [g] =
|
|
5078
|
+
), [g] = W(Math.random());
|
|
5072
5079
|
xe(() => {
|
|
5073
|
-
if (f(),
|
|
5074
|
-
|
|
5080
|
+
if (f(), C.searchstax)
|
|
5081
|
+
C.searchstax.addSearchLocationWidget(
|
|
5075
5082
|
"search-location-container" + g,
|
|
5076
5083
|
{ hooks: r.hooks, locationSearchEnabled: r.locationSearchEnabled, locationValuesOverride: r.locationValuesOverride }
|
|
5077
5084
|
);
|
|
@@ -5079,21 +5086,21 @@ function an(r) {
|
|
|
5079
5086
|
throw Error("Searchstax instance needs to be passed via props");
|
|
5080
5087
|
}, []);
|
|
5081
5088
|
function f() {
|
|
5082
|
-
e || (
|
|
5089
|
+
e || (C.searchstax.dataLayer.$locationWidgetTemplateData.subscribe(
|
|
5083
5090
|
(m) => {
|
|
5084
5091
|
a(m);
|
|
5085
5092
|
}
|
|
5086
|
-
),
|
|
5093
|
+
), C.searchstax.dataLayer.$searchObject.subscribe((m) => {
|
|
5087
5094
|
i(m.location.address ?? ""), l(m.location.radius || "");
|
|
5088
|
-
}),
|
|
5095
|
+
}), C.searchstax.dataLayer.$searchLocationChange.subscribe(
|
|
5089
5096
|
(m) => {
|
|
5090
5097
|
i(m);
|
|
5091
5098
|
}
|
|
5092
|
-
),
|
|
5099
|
+
), C.searchstax.dataLayer.$searchRadiusChange.subscribe(
|
|
5093
5100
|
(m) => {
|
|
5094
5101
|
l(m);
|
|
5095
5102
|
}
|
|
5096
|
-
),
|
|
5103
|
+
), C.searchstax.dataLayer.$locationError.subscribe(
|
|
5097
5104
|
(m) => {
|
|
5098
5105
|
o(m);
|
|
5099
5106
|
}
|
|
@@ -5101,25 +5108,25 @@ function an(r) {
|
|
|
5101
5108
|
}
|
|
5102
5109
|
function p() {
|
|
5103
5110
|
var m;
|
|
5104
|
-
(m =
|
|
5111
|
+
(m = C.searchstax.searchLocationWidget) == null || m.getCurrentLocation();
|
|
5105
5112
|
}
|
|
5106
5113
|
function y(m) {
|
|
5107
5114
|
var x;
|
|
5108
|
-
l(m), (x =
|
|
5115
|
+
l(m), (x = C.searchstax.searchLocationWidget) == null || x.setRadiusValue(m + "");
|
|
5109
5116
|
}
|
|
5110
5117
|
function w(m) {
|
|
5111
5118
|
var x;
|
|
5112
|
-
i(m), (x =
|
|
5119
|
+
i(m), (x = C.searchstax.searchLocationWidget) == null || x.triggerGeocoder(m);
|
|
5113
5120
|
}
|
|
5114
5121
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-location-container" + g, children: [
|
|
5115
|
-
!r.searchLocationTemplate && t && /* @__PURE__ */ u.jsx(u.Fragment, { children:
|
|
5122
|
+
!r.searchLocationTemplate && t && /* @__PURE__ */ u.jsx(u.Fragment, { children: qs(t, i, w, y, p, s, c, n) }),
|
|
5116
5123
|
r.searchLocationTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: r.searchLocationTemplate(t, i, w, y, p, s, c, n) })
|
|
5117
5124
|
] }) });
|
|
5118
5125
|
}
|
|
5119
5126
|
const js = {
|
|
5120
5127
|
appId: "APP_ID",
|
|
5121
5128
|
relatedSearchesAPIKey: "KEY"
|
|
5122
|
-
},
|
|
5129
|
+
}, zt = {
|
|
5123
5130
|
locationDecode: (r) => new Promise((e) => {
|
|
5124
5131
|
const t = "GEOCODING_API_KEY", a = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(
|
|
5125
5132
|
r
|
|
@@ -5237,13 +5244,13 @@ function sn(r, e, t, a) {
|
|
|
5237
5244
|
/* @__PURE__ */ u.jsx(
|
|
5238
5245
|
an,
|
|
5239
5246
|
{
|
|
5240
|
-
searchLocationTemplate:
|
|
5247
|
+
searchLocationTemplate: qs,
|
|
5241
5248
|
hooks: {
|
|
5242
|
-
locationDecode:
|
|
5243
|
-
locationDecodeCoordinatesToAddress:
|
|
5249
|
+
locationDecode: zt.locationDecode,
|
|
5250
|
+
locationDecodeCoordinatesToAddress: zt.locationDecodeCoordinatesToAddress
|
|
5244
5251
|
},
|
|
5245
|
-
locationSearchEnabled:
|
|
5246
|
-
locationValuesOverride:
|
|
5252
|
+
locationSearchEnabled: zt.locationSearchEnabled,
|
|
5253
|
+
locationValuesOverride: zt.locationValuesOverride
|
|
5247
5254
|
}
|
|
5248
5255
|
),
|
|
5249
5256
|
/* @__PURE__ */ u.jsx(
|
|
@@ -5258,13 +5265,13 @@ function sn(r, e, t, a) {
|
|
|
5258
5265
|
}
|
|
5259
5266
|
function yn(r) {
|
|
5260
5267
|
let e = !1;
|
|
5261
|
-
const [t, a] =
|
|
5268
|
+
const [t, a] = W([]), [s, i] = W(
|
|
5262
5269
|
null
|
|
5263
5270
|
);
|
|
5264
5271
|
xe(() => {
|
|
5265
|
-
if (n(),
|
|
5272
|
+
if (n(), C.searchstax) {
|
|
5266
5273
|
const g = {};
|
|
5267
|
-
r.afterAutosuggest && (g.afterAutosuggest = r.afterAutosuggest), r.beforeAutosuggest && (g.beforeAutosuggest = r.beforeAutosuggest),
|
|
5274
|
+
r.afterAutosuggest && (g.afterAutosuggest = r.afterAutosuggest), r.beforeAutosuggest && (g.beforeAutosuggest = r.beforeAutosuggest), C.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
5268
5275
|
suggestAfterMinChars: r.suggestAfterMinChars,
|
|
5269
5276
|
hooks: g,
|
|
5270
5277
|
templates: {
|
|
@@ -5276,14 +5283,14 @@ function yn(r) {
|
|
|
5276
5283
|
});
|
|
5277
5284
|
} else
|
|
5278
5285
|
throw Error("Searchstax instance needs to be passed via props");
|
|
5279
|
-
|
|
5286
|
+
C.searchstax.dataLayer.setInputTemplateRendered(!0);
|
|
5280
5287
|
}, []);
|
|
5281
5288
|
function n() {
|
|
5282
|
-
e || (
|
|
5289
|
+
e || (C.searchstax.dataLayer.$autosuggestResults.subscribe(
|
|
5283
5290
|
(g) => {
|
|
5284
5291
|
a((g == null ? void 0 : g.suggestions) ?? []);
|
|
5285
5292
|
}
|
|
5286
|
-
),
|
|
5293
|
+
), C.searchstax.dataLayer.$inputWidgetTemplateData.subscribe(
|
|
5287
5294
|
(g) => {
|
|
5288
5295
|
i(g);
|
|
5289
5296
|
}
|
|
@@ -5291,15 +5298,15 @@ function yn(r) {
|
|
|
5291
5298
|
}
|
|
5292
5299
|
function o() {
|
|
5293
5300
|
var g, f;
|
|
5294
|
-
(g =
|
|
5301
|
+
(g = C.searchstax.searchInputWidget) == null || g.resetAutosuggestSelection(), (f = C.searchstax.searchInputWidget) == null || f.markActiveAutosuggestItem();
|
|
5295
5302
|
}
|
|
5296
5303
|
function c(g) {
|
|
5297
5304
|
var f;
|
|
5298
|
-
(f =
|
|
5305
|
+
(f = C.searchstax.searchInputWidget) == null || f.onSuggestionEnter(g);
|
|
5299
5306
|
}
|
|
5300
5307
|
function l() {
|
|
5301
5308
|
var g;
|
|
5302
|
-
(g =
|
|
5309
|
+
(g = C.searchstax.searchInputWidget) == null || g.suggestionChosen();
|
|
5303
5310
|
}
|
|
5304
5311
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("div", { id: "searchstax-input-container", children: /* @__PURE__ */ u.jsxs(
|
|
5305
5312
|
"div",
|
|
@@ -5324,10 +5331,10 @@ function yn(r) {
|
|
|
5324
5331
|
) }) });
|
|
5325
5332
|
}
|
|
5326
5333
|
function wn(r) {
|
|
5327
|
-
const [e, t] =
|
|
5334
|
+
const [e, t] = W(!1);
|
|
5328
5335
|
return xe(() => {
|
|
5329
5336
|
const a = {};
|
|
5330
|
-
r.beforeSearch && (a.beforeSearch = r.beforeSearch), r != null && r.afterSearch && (a.afterSearch = r.afterSearch),
|
|
5337
|
+
r.beforeSearch && (a.beforeSearch = r.beforeSearch), r != null && r.afterSearch && (a.afterSearch = r.afterSearch), C.searchstax.initialize({
|
|
5331
5338
|
language: r.language ?? "en",
|
|
5332
5339
|
model: r.model,
|
|
5333
5340
|
sessionId: r.sessionId,
|
|
@@ -5344,7 +5351,7 @@ function wn(r) {
|
|
|
5344
5351
|
analyticsSrc: r.analyticsSrc
|
|
5345
5352
|
}), setTimeout(() => {
|
|
5346
5353
|
t(!0);
|
|
5347
|
-
}, 100), r.initialized(
|
|
5354
|
+
}, 100), r.initialized(C.searchstax);
|
|
5348
5355
|
}, []), /* @__PURE__ */ u.jsx(u.Fragment, { children: e && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
5349
5356
|
" ",
|
|
5350
5357
|
r.children,
|
|
@@ -5488,19 +5495,19 @@ function nn(r, e) {
|
|
|
5488
5495
|
}) }) });
|
|
5489
5496
|
}
|
|
5490
5497
|
function xn(r) {
|
|
5491
|
-
const [e, t] =
|
|
5498
|
+
const [e, t] = W(
|
|
5492
5499
|
null
|
|
5493
5500
|
), a = ir();
|
|
5494
5501
|
a.current = e;
|
|
5495
|
-
const [s, i] =
|
|
5502
|
+
const [s, i] = W(""), [n, o] = W(
|
|
5496
5503
|
null
|
|
5497
5504
|
), c = (f, p) => {
|
|
5498
|
-
p.preventDefault(), p.stopPropagation(),
|
|
5505
|
+
p.preventDefault(), p.stopPropagation(), C.searchstax.executeLinkClick(f.uniqueId);
|
|
5499
5506
|
};
|
|
5500
5507
|
xe(() => {
|
|
5501
5508
|
g();
|
|
5502
5509
|
const f = {};
|
|
5503
|
-
r.afterLinkClick && (f.afterLinkClick = r.afterLinkClick),
|
|
5510
|
+
r.afterLinkClick && (f.afterLinkClick = r.afterLinkClick), C.searchstax.addSearchResultsWidget("searchstax-results-container", {
|
|
5504
5511
|
templates: {},
|
|
5505
5512
|
renderMethod: r.renderMethod ?? "pagination",
|
|
5506
5513
|
resultsPerPage: r.resultsPerPage,
|
|
@@ -5508,26 +5515,26 @@ function xn(r) {
|
|
|
5508
5515
|
});
|
|
5509
5516
|
}, []);
|
|
5510
5517
|
function l(f) {
|
|
5511
|
-
|
|
5518
|
+
C.searchstax.executeSearch(f);
|
|
5512
5519
|
}
|
|
5513
5520
|
function g() {
|
|
5514
|
-
|
|
5521
|
+
C.searchstax.dataLayer.$searchResults.subscribe(
|
|
5515
5522
|
(f) => {
|
|
5516
5523
|
var m;
|
|
5517
5524
|
const p = a.current ?? [], y = f ?? [], w = r.renderMethod === "infiniteScroll" ? [...p, ...y] : f;
|
|
5518
|
-
((m =
|
|
5525
|
+
((m = C.searchstax.dataLayer.$searchObject.value) == null ? void 0 : m.page) === 1 ? t(y) : t(w);
|
|
5519
5526
|
}
|
|
5520
|
-
),
|
|
5527
|
+
), C.searchstax.dataLayer.$searchTermChange.subscribe((f) => {
|
|
5521
5528
|
i(f);
|
|
5522
|
-
}),
|
|
5529
|
+
}), C.searchstax.dataLayer.$searchResultsMetadata.subscribe(
|
|
5523
5530
|
(f) => {
|
|
5524
5531
|
o(f);
|
|
5525
5532
|
}
|
|
5526
5533
|
);
|
|
5527
5534
|
}
|
|
5528
5535
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("div", { id: "searchstax-results-container", children: /* @__PURE__ */ u.jsx("section", { "aria-label": "search results container", tabIndex: 0, children: /* @__PURE__ */ u.jsx("div", { className: "searchstax-search-results-container", id: "searchstax-search-results-container", children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-result-container", children: [
|
|
5529
|
-
e && e.length === 0 && s !== "" && s !== "*" &&
|
|
5530
|
-
e && e.length === 0 && s !== "" && s !== "*" &&
|
|
5536
|
+
e && e.length === 0 && s !== "" && s !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && !r.noResultTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: rn(s, n, l) }),
|
|
5537
|
+
e && e.length === 0 && s !== "" && s !== "*" && C.searchstax.dataLayer.parsedData.firstSearchHappened && r.noResultTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: r.noResultTemplate(s, n, l) }),
|
|
5531
5538
|
e && e.length > 0 && !r.resultsTemplate && nn(e, c),
|
|
5532
5539
|
e && e.length > 0 && r.resultsTemplate && /* @__PURE__ */ u.jsx(u.Fragment, { children: r.resultsTemplate(e, c) })
|
|
5533
5540
|
] }) }) }) }) });
|
|
@@ -5600,12 +5607,12 @@ function cn(r, e) {
|
|
|
5600
5607
|
}
|
|
5601
5608
|
function bn(r) {
|
|
5602
5609
|
let e = !1;
|
|
5603
|
-
const [t, a] =
|
|
5610
|
+
const [t, a] = W(!1), [s, i] = W(
|
|
5604
5611
|
null
|
|
5605
|
-
), [n] =
|
|
5612
|
+
), [n] = W(Math.random());
|
|
5606
5613
|
xe(() => {
|
|
5607
|
-
if (o(),
|
|
5608
|
-
|
|
5614
|
+
if (o(), C.searchstax)
|
|
5615
|
+
C.searchstax.addPaginationWidget(
|
|
5609
5616
|
"searchstax-pagination-container" + n,
|
|
5610
5617
|
{}
|
|
5611
5618
|
);
|
|
@@ -5613,29 +5620,29 @@ function bn(r) {
|
|
|
5613
5620
|
throw Error("Searchstax instance needs to be passed via props");
|
|
5614
5621
|
}, []);
|
|
5615
5622
|
function o() {
|
|
5616
|
-
e || (
|
|
5623
|
+
e || (C.searchstax.dataLayer.$searchObject.subscribe(() => {
|
|
5617
5624
|
c();
|
|
5618
|
-
}),
|
|
5625
|
+
}), C.searchstax.dataLayer.$paginationData.subscribe(
|
|
5619
5626
|
(f) => {
|
|
5620
5627
|
i(f);
|
|
5621
5628
|
}
|
|
5622
5629
|
), e = !0);
|
|
5623
5630
|
}
|
|
5624
5631
|
function c() {
|
|
5625
|
-
!t &&
|
|
5632
|
+
!t && C.searchstax.routerHelper && (a(!0), C.searchstax.addPaginationWidget(
|
|
5626
5633
|
"searchstax-pagination-container" + n,
|
|
5627
5634
|
{}
|
|
5628
5635
|
));
|
|
5629
5636
|
}
|
|
5630
5637
|
function l(f) {
|
|
5631
5638
|
var p;
|
|
5632
|
-
(p =
|
|
5639
|
+
(p = C.searchstax.searchPaginationWidget) == null || p.nextPage(
|
|
5633
5640
|
f
|
|
5634
5641
|
);
|
|
5635
5642
|
}
|
|
5636
5643
|
function g(f) {
|
|
5637
5644
|
var p;
|
|
5638
|
-
(p =
|
|
5645
|
+
(p = C.searchstax.searchPaginationWidget) == null || p.previousPage(
|
|
5639
5646
|
f
|
|
5640
5647
|
);
|
|
5641
5648
|
}
|
|
@@ -5667,12 +5674,12 @@ function ln(r, e, t) {
|
|
|
5667
5674
|
}
|
|
5668
5675
|
function Mn(r) {
|
|
5669
5676
|
let e = !1;
|
|
5670
|
-
const [t, a] =
|
|
5677
|
+
const [t, a] = W(
|
|
5671
5678
|
null
|
|
5672
|
-
), [s, i] =
|
|
5679
|
+
), [s, i] = W(""), [n] = W(Math.random());
|
|
5673
5680
|
xe(() => {
|
|
5674
|
-
if (o(),
|
|
5675
|
-
|
|
5681
|
+
if (o(), C.searchstax)
|
|
5682
|
+
C.searchstax.addSearchSortingWidget(
|
|
5676
5683
|
"search-sorting-container" + n,
|
|
5677
5684
|
{}
|
|
5678
5685
|
);
|
|
@@ -5680,11 +5687,11 @@ function Mn(r) {
|
|
|
5680
5687
|
throw Error("Searchstax instance needs to be passed via props");
|
|
5681
5688
|
}, []);
|
|
5682
5689
|
function o() {
|
|
5683
|
-
e || (
|
|
5690
|
+
e || (C.searchstax.dataLayer.$searchSortingData.subscribe(
|
|
5684
5691
|
(l) => {
|
|
5685
5692
|
a(l);
|
|
5686
5693
|
}
|
|
5687
|
-
),
|
|
5694
|
+
), C.searchstax.dataLayer.$searchObject.subscribe(
|
|
5688
5695
|
(l) => {
|
|
5689
5696
|
i(decodeURIComponent((l == null ? void 0 : l.order) ?? ""));
|
|
5690
5697
|
}
|
|
@@ -5692,7 +5699,7 @@ function Mn(r) {
|
|
|
5692
5699
|
}
|
|
5693
5700
|
function c(l) {
|
|
5694
5701
|
var g;
|
|
5695
|
-
(g =
|
|
5702
|
+
(g = C.searchstax.searchSortingWidget) == null || g.setOrderQuery(l);
|
|
5696
5703
|
}
|
|
5697
5704
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "search-sorting-container" + n, children: [
|
|
5698
5705
|
!r.searchSortingTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasResultsOrExternalPromotions) && /* @__PURE__ */ u.jsx(u.Fragment, { children: ln(t, c, s) }),
|
|
@@ -5747,15 +5754,15 @@ function hn(r, e) {
|
|
|
5747
5754
|
}
|
|
5748
5755
|
function Cn(r) {
|
|
5749
5756
|
let e = !1;
|
|
5750
|
-
const [t, a] =
|
|
5757
|
+
const [t, a] = W(null), [s] = W(Math.random());
|
|
5751
5758
|
xe(() => {
|
|
5752
|
-
if (i(),
|
|
5753
|
-
|
|
5759
|
+
if (i(), C.searchstax)
|
|
5760
|
+
C.searchstax.addSearchFeedbackWidget("search-feedback-container" + s, {});
|
|
5754
5761
|
else
|
|
5755
5762
|
throw Error("Searchstax instance needs to be passed via props");
|
|
5756
5763
|
}, []);
|
|
5757
5764
|
function i() {
|
|
5758
|
-
e || (
|
|
5765
|
+
e || (C.searchstax.dataLayer.$searchFeedbackData.subscribe(
|
|
5759
5766
|
(o) => {
|
|
5760
5767
|
a(o);
|
|
5761
5768
|
}
|
|
@@ -5763,7 +5770,7 @@ function Cn(r) {
|
|
|
5763
5770
|
}
|
|
5764
5771
|
function n(o) {
|
|
5765
5772
|
var c;
|
|
5766
|
-
(c =
|
|
5773
|
+
(c = C.searchstax.searchFeedbackWidget) == null || c.onOriginalQueryClick(o);
|
|
5767
5774
|
}
|
|
5768
5775
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { className: "search-feedback-container", id: "search-feedback-container" + s, children: [
|
|
5769
5776
|
!r.searchOverviewTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.totalResults) > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children: hn(t, n) }),
|
|
@@ -5795,7 +5802,7 @@ function un(r, e, t, a, s, i, n) {
|
|
|
5795
5802
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", "aria-live": "polite", children: [
|
|
5796
5803
|
o.values.map(
|
|
5797
5804
|
//@ts-ignore
|
|
5798
|
-
(c, l) => (e[l + o.name] =
|
|
5805
|
+
(c, l) => (e[l + o.name] = Is(), /* @__PURE__ */ u.jsxs(
|
|
5799
5806
|
"div",
|
|
5800
5807
|
{
|
|
5801
5808
|
className: `searchstax-facet-value-container ${c.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
@@ -5964,7 +5971,7 @@ function dn(r, e, t, a, s, i, n, o, c, l, g, f) {
|
|
|
5964
5971
|
/* @__PURE__ */ u.jsxs("div", { className: "searchstax-facet-values-container", "aria-live": "polite", children: [
|
|
5965
5972
|
p.values.map(
|
|
5966
5973
|
//@ts-ignore
|
|
5967
|
-
(y, w) => (t[w + p.name] =
|
|
5974
|
+
(y, w) => (t[w + p.name] = Is(), /* @__PURE__ */ u.jsxs(
|
|
5968
5975
|
"div",
|
|
5969
5976
|
{
|
|
5970
5977
|
className: `searchstax-facet-value-container ${y.disabled ? "searchstax-facet-value-disabled" : ""}`,
|
|
@@ -6081,19 +6088,19 @@ function dn(r, e, t, a, s, i, n, o, c, l, g, f) {
|
|
|
6081
6088
|
] }) }) : /* @__PURE__ */ u.jsx(u.Fragment, {});
|
|
6082
6089
|
}
|
|
6083
6090
|
function Sn(r) {
|
|
6084
|
-
const [e, t] =
|
|
6091
|
+
const [e, t] = W(
|
|
6085
6092
|
null
|
|
6086
|
-
), [a, s] =
|
|
6093
|
+
), [a, s] = W(
|
|
6087
6094
|
null
|
|
6088
|
-
), [i, n] =
|
|
6095
|
+
), [i, n] = W(
|
|
6089
6096
|
[]
|
|
6090
|
-
), [o, c] =
|
|
6097
|
+
), [o, c] = W(
|
|
6091
6098
|
{}
|
|
6092
6099
|
), l = {}, g = Math.random();
|
|
6093
6100
|
let f = !1;
|
|
6094
6101
|
xe(() => {
|
|
6095
|
-
if (p(),
|
|
6096
|
-
|
|
6102
|
+
if (p(), C.searchstax)
|
|
6103
|
+
C.searchstax.addFacetsWidget("searchstax-facets-container" + g, {
|
|
6097
6104
|
facetingType: r.facetingType,
|
|
6098
6105
|
specificFacets: r.specificFacets,
|
|
6099
6106
|
itemsPerPageDesktop: r.itemsPerPageDesktop,
|
|
@@ -6106,11 +6113,11 @@ function Sn(r) {
|
|
|
6106
6113
|
throw Error("Searchstax instance needs to be passed via props");
|
|
6107
6114
|
}, []);
|
|
6108
6115
|
function p() {
|
|
6109
|
-
f || (
|
|
6116
|
+
f || (C.searchstax.dataLayer.$facetsTemplateData.subscribe(
|
|
6110
6117
|
(v) => {
|
|
6111
6118
|
v != null && v.isMobile ? s(v) : t(v);
|
|
6112
6119
|
}
|
|
6113
|
-
),
|
|
6120
|
+
), C.searchstax.dataLayer.$selectedFacetsTemplateData.subscribe(
|
|
6114
6121
|
(v) => {
|
|
6115
6122
|
n(
|
|
6116
6123
|
(v ?? []).filter((B) => B.type === "checkbox")
|
|
@@ -6120,11 +6127,11 @@ function Sn(r) {
|
|
|
6120
6127
|
}
|
|
6121
6128
|
function y(v) {
|
|
6122
6129
|
var D;
|
|
6123
|
-
(D =
|
|
6130
|
+
(D = C.searchstax.searchFacetsWidget) == null || D.unselectFacet(v);
|
|
6124
6131
|
}
|
|
6125
6132
|
function w() {
|
|
6126
6133
|
var v;
|
|
6127
|
-
(v =
|
|
6134
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.removeSelectedFacets();
|
|
6128
6135
|
}
|
|
6129
6136
|
function m(v) {
|
|
6130
6137
|
return !o[v];
|
|
@@ -6134,22 +6141,22 @@ function Sn(r) {
|
|
|
6134
6141
|
}
|
|
6135
6142
|
function k(v) {
|
|
6136
6143
|
var D;
|
|
6137
|
-
return (D =
|
|
6144
|
+
return (D = C.searchstax.searchFacetsWidget) == null ? void 0 : D.isChecked(v);
|
|
6138
6145
|
}
|
|
6139
|
-
function
|
|
6140
|
-
var
|
|
6141
|
-
const re =
|
|
6142
|
-
|
|
6146
|
+
function A(v, D, B, ge, H) {
|
|
6147
|
+
var Te;
|
|
6148
|
+
const re = H ? "mobile-" : "desktop-", be = document.getElementsByClassName(re + v);
|
|
6149
|
+
be[0] && ((Te = C.searchstax.searchFacetsWidget) == null || Te.onFacetSelect(
|
|
6143
6150
|
D,
|
|
6144
6151
|
B,
|
|
6145
|
-
|
|
6152
|
+
be[0],
|
|
6146
6153
|
!1,
|
|
6147
6154
|
k(B)
|
|
6148
6155
|
));
|
|
6149
6156
|
}
|
|
6150
6157
|
function P(v, D) {
|
|
6151
6158
|
var B;
|
|
6152
|
-
(B =
|
|
6159
|
+
(B = C.searchstax.searchFacetsWidget) == null || B.onShowMoreLessClick(
|
|
6153
6160
|
v,
|
|
6154
6161
|
D,
|
|
6155
6162
|
!1
|
|
@@ -6157,7 +6164,7 @@ function Sn(r) {
|
|
|
6157
6164
|
}
|
|
6158
6165
|
function T(v, D) {
|
|
6159
6166
|
var B;
|
|
6160
|
-
(B =
|
|
6167
|
+
(B = C.searchstax.searchFacetsWidget) == null || B.onShowMoreLessClick(
|
|
6161
6168
|
v,
|
|
6162
6169
|
D,
|
|
6163
6170
|
!0
|
|
@@ -6165,31 +6172,31 @@ function Sn(r) {
|
|
|
6165
6172
|
}
|
|
6166
6173
|
function O() {
|
|
6167
6174
|
var v;
|
|
6168
|
-
(v =
|
|
6175
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.openOverlay();
|
|
6169
6176
|
}
|
|
6170
6177
|
function $() {
|
|
6171
6178
|
var v;
|
|
6172
|
-
(v =
|
|
6179
|
+
(v = C.searchstax.searchFacetsWidget) == null || v.closeOverlay();
|
|
6173
6180
|
}
|
|
6174
6181
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-facets-container" + g, children: [
|
|
6175
|
-
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !r.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: un(e, l, m, x,
|
|
6182
|
+
(e == null ? void 0 : e.hasResultsOrExternalPromotions) && !r.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: un(e, l, m, x, A, k, P) }),
|
|
6176
6183
|
r.facetsTemplateDesktop && /* @__PURE__ */ u.jsx(u.Fragment, { children: r.facetsTemplateDesktop(
|
|
6177
6184
|
e,
|
|
6178
6185
|
l,
|
|
6179
6186
|
m,
|
|
6180
6187
|
x,
|
|
6181
|
-
|
|
6188
|
+
A,
|
|
6182
6189
|
k,
|
|
6183
6190
|
P
|
|
6184
6191
|
) }),
|
|
6185
|
-
(a == null ? void 0 : a.hasResultsOrExternalPromotions) && !r.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: dn(a, i, l, m, x,
|
|
6192
|
+
(a == null ? void 0 : a.hasResultsOrExternalPromotions) && !r.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: dn(a, i, l, m, x, A, k, y, T, O, $, w) }),
|
|
6186
6193
|
r.facetsTemplateMobile && /* @__PURE__ */ u.jsx(u.Fragment, { children: r.facetsTemplateMobile(
|
|
6187
6194
|
a,
|
|
6188
6195
|
i,
|
|
6189
6196
|
l,
|
|
6190
6197
|
m,
|
|
6191
6198
|
x,
|
|
6192
|
-
|
|
6199
|
+
A,
|
|
6193
6200
|
k,
|
|
6194
6201
|
y,
|
|
6195
6202
|
T,
|
|
@@ -6235,10 +6242,10 @@ function gn(r, e) {
|
|
|
6235
6242
|
}
|
|
6236
6243
|
function kn(r) {
|
|
6237
6244
|
let e = !1;
|
|
6238
|
-
const [t, a] =
|
|
6245
|
+
const [t, a] = W(null), [s] = W(Math.random());
|
|
6239
6246
|
xe(() => {
|
|
6240
|
-
if (i(),
|
|
6241
|
-
|
|
6247
|
+
if (i(), C.searchstax)
|
|
6248
|
+
C.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + s, {
|
|
6242
6249
|
relatedSearchesURL: r.relatedSearchesURL,
|
|
6243
6250
|
relatedSearchesAPIKey: r.relatedSearchesAPIKey
|
|
6244
6251
|
});
|
|
@@ -6246,7 +6253,7 @@ function kn(r) {
|
|
|
6246
6253
|
throw Error("Searchstax instance needs to be passed via props");
|
|
6247
6254
|
}, []);
|
|
6248
6255
|
function i() {
|
|
6249
|
-
e || (
|
|
6256
|
+
e || (C.searchstax.dataLayer.$searchRelatedSearchesData.subscribe(
|
|
6250
6257
|
(o) => {
|
|
6251
6258
|
a(o);
|
|
6252
6259
|
}
|
|
@@ -6254,7 +6261,7 @@ function kn(r) {
|
|
|
6254
6261
|
}
|
|
6255
6262
|
function n(o) {
|
|
6256
6263
|
var c;
|
|
6257
|
-
(c =
|
|
6264
|
+
(c = C.searchstax.relatedSearchesWidget) == null || c.executeSearch(o);
|
|
6258
6265
|
}
|
|
6259
6266
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
6260
6267
|
!r.searchRelatedSearchesTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasRelatedSearches) && /* @__PURE__ */ u.jsx(u.Fragment, { children: gn(t, n) }),
|
|
@@ -6296,17 +6303,17 @@ function pn(r, e) {
|
|
|
6296
6303
|
}
|
|
6297
6304
|
function Tn(r) {
|
|
6298
6305
|
let e = !1;
|
|
6299
|
-
const [t, a] =
|
|
6306
|
+
const [t, a] = W(
|
|
6300
6307
|
null
|
|
6301
|
-
), [s] =
|
|
6308
|
+
), [s] = W(Math.random());
|
|
6302
6309
|
xe(() => {
|
|
6303
|
-
if (i(),
|
|
6304
|
-
|
|
6310
|
+
if (i(), C.searchstax)
|
|
6311
|
+
C.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + s, {});
|
|
6305
6312
|
else
|
|
6306
6313
|
throw Error("Searchstax instance needs to be passed via props");
|
|
6307
6314
|
}, []);
|
|
6308
6315
|
function i() {
|
|
6309
|
-
e || (
|
|
6316
|
+
e || (C.searchstax.dataLayer.$searchExternalPromotionsData.subscribe(
|
|
6310
6317
|
(o) => {
|
|
6311
6318
|
a(o);
|
|
6312
6319
|
}
|
|
@@ -6314,7 +6321,7 @@ function Tn(r) {
|
|
|
6314
6321
|
}
|
|
6315
6322
|
function n(o, c) {
|
|
6316
6323
|
var l;
|
|
6317
|
-
(l =
|
|
6324
|
+
(l = C.searchstax.externalPromotionsWidget) == null || l.trackClick(o, c);
|
|
6318
6325
|
}
|
|
6319
6326
|
return /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsxs("div", { id: "searchstax-external-promotions-layout-container" + s, children: [
|
|
6320
6327
|
!r.searchExternalPromotionsTemplate && t && (t == null ? void 0 : t.searchExecuted) && (t == null ? void 0 : t.hasExternalPromotions) && /* @__PURE__ */ u.jsx(u.Fragment, { children: pn(t, n) }),
|
|
@@ -6357,13 +6364,13 @@ function mn(r, e) {
|
|
|
6357
6364
|
}
|
|
6358
6365
|
function vn(r) {
|
|
6359
6366
|
let e = !1;
|
|
6360
|
-
const [t, a] =
|
|
6367
|
+
const [t, a] = W(
|
|
6361
6368
|
null
|
|
6362
|
-
), [s] =
|
|
6369
|
+
), [s] = W(Math.random());
|
|
6363
6370
|
xe(() => {
|
|
6364
|
-
if (n(),
|
|
6371
|
+
if (n(), C.searchstax) {
|
|
6365
6372
|
const o = r.feedbackwidget ?? void 0;
|
|
6366
|
-
|
|
6373
|
+
C.searchstax.addAnswerWidget(
|
|
6367
6374
|
"searchstax-answer-container" + s,
|
|
6368
6375
|
{
|
|
6369
6376
|
showMoreAfterWordCount: r.showMoreAfterWordCount,
|
|
@@ -6376,10 +6383,10 @@ function vn(r) {
|
|
|
6376
6383
|
}, []);
|
|
6377
6384
|
function i(o) {
|
|
6378
6385
|
var c;
|
|
6379
|
-
|
|
6386
|
+
C.searchstax && ((c = C.searchstax.answerWidget) == null || c.showMore(o));
|
|
6380
6387
|
}
|
|
6381
6388
|
function n() {
|
|
6382
|
-
e || (
|
|
6389
|
+
e || (C.searchstax.dataLayer.$answerData.subscribe(
|
|
6383
6390
|
(o) => {
|
|
6384
6391
|
a(o);
|
|
6385
6392
|
}
|