@nemme/js-sdk 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/js-sdk.css +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/forms/form-manager.d.ts +6 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +572 -519
- package/dist/index.esm.js.map +1 -1
- package/dist/nemme-sdk.umd.js +8 -8
- package/dist/nemme-sdk.umd.js.map +1 -1
- package/dist/tracking/tracking-manager.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import * as x from "react";
|
|
2
|
-
import fe, { createContext as ye, useContext as
|
|
3
|
-
import { createRoot as
|
|
2
|
+
import fe, { createContext as ye, useContext as He, useMemo as de, useRef as Xe, useCallback as q, useState as pe, useEffect as Tt, createElement as we, forwardRef as dn } from "react";
|
|
3
|
+
import { createRoot as pn } from "react-dom/client";
|
|
4
4
|
const L = (n) => typeof n == "string", ie = () => {
|
|
5
5
|
let n, e;
|
|
6
6
|
const t = new Promise((r, a) => {
|
|
7
7
|
n = r, e = a;
|
|
8
8
|
});
|
|
9
9
|
return t.resolve = n, t.reject = e, t;
|
|
10
|
-
},
|
|
10
|
+
}, Qe = (n) => n == null ? "" : "" + n, gn = (n, e, t) => {
|
|
11
11
|
n.forEach((r) => {
|
|
12
12
|
e[r] && (t[r] = e[r]);
|
|
13
13
|
});
|
|
14
|
-
},
|
|
14
|
+
}, fn = /###/g, et = (n) => n && n.indexOf("###") > -1 ? n.replace(fn, ".") : n, tt = (n) => !n || L(n), ge = (n, e, t) => {
|
|
15
15
|
const r = L(e) ? e.split(".") : e;
|
|
16
16
|
let a = 0;
|
|
17
17
|
for (; a < r.length - 1; ) {
|
|
18
|
-
if (
|
|
19
|
-
const s =
|
|
18
|
+
if (tt(n)) return {};
|
|
19
|
+
const s = et(r[a]);
|
|
20
20
|
!n[s] && t && (n[s] = new t()), Object.prototype.hasOwnProperty.call(n, s) ? n = n[s] : n = {}, ++a;
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return tt(n) ? {} : {
|
|
23
23
|
obj: n,
|
|
24
|
-
k:
|
|
24
|
+
k: et(r[a])
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, nt = (n, e, t) => {
|
|
27
27
|
const {
|
|
28
28
|
obj: r,
|
|
29
29
|
k: a
|
|
@@ -36,7 +36,7 @@ const L = (n) => typeof n == "string", ie = () => {
|
|
|
36
36
|
for (; o.obj === void 0 && i.length; )
|
|
37
37
|
s = `${i[i.length - 1]}.${s}`, i = i.slice(0, i.length - 1), o = ge(n, i, Object), o?.obj && typeof o.obj[`${o.k}.${s}`] < "u" && (o.obj = void 0);
|
|
38
38
|
o.obj[`${o.k}.${s}`] = t;
|
|
39
|
-
},
|
|
39
|
+
}, hn = (n, e, t, r) => {
|
|
40
40
|
const {
|
|
41
41
|
obj: a,
|
|
42
42
|
k: s
|
|
@@ -49,15 +49,15 @@ const L = (n) => typeof n == "string", ie = () => {
|
|
|
49
49
|
} = ge(n, e);
|
|
50
50
|
if (t && Object.prototype.hasOwnProperty.call(t, r))
|
|
51
51
|
return t[r];
|
|
52
|
-
},
|
|
52
|
+
}, mn = (n, e, t) => {
|
|
53
53
|
const r = ve(n, t);
|
|
54
54
|
return r !== void 0 ? r : ve(e, t);
|
|
55
|
-
},
|
|
55
|
+
}, Ct = (n, e, t) => {
|
|
56
56
|
for (const r in e)
|
|
57
|
-
r !== "__proto__" && r !== "constructor" && (r in n ? L(n[r]) || n[r] instanceof String || L(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) :
|
|
57
|
+
r !== "__proto__" && r !== "constructor" && (r in n ? L(n[r]) || n[r] instanceof String || L(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Ct(n[r], e[r], t) : n[r] = e[r]);
|
|
58
58
|
return n;
|
|
59
59
|
}, ne = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
60
|
-
var
|
|
60
|
+
var yn = {
|
|
61
61
|
"&": "&",
|
|
62
62
|
"<": "<",
|
|
63
63
|
">": ">",
|
|
@@ -65,8 +65,8 @@ var mn = {
|
|
|
65
65
|
"'": "'",
|
|
66
66
|
"/": "/"
|
|
67
67
|
};
|
|
68
|
-
const
|
|
69
|
-
class
|
|
68
|
+
const bn = (n) => L(n) ? n.replace(/[&<>"'\/]/g, (e) => yn[e]) : n;
|
|
69
|
+
class xn {
|
|
70
70
|
constructor(e) {
|
|
71
71
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
72
72
|
}
|
|
@@ -78,18 +78,18 @@ class bn {
|
|
|
78
78
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const wn = [" ", ",", "?", "!", ";"], vn = new xn(20), kn = (n, e, t) => {
|
|
82
82
|
e = e || "", t = t || "";
|
|
83
|
-
const r =
|
|
83
|
+
const r = wn.filter((i) => e.indexOf(i) < 0 && t.indexOf(i) < 0);
|
|
84
84
|
if (r.length === 0) return !0;
|
|
85
|
-
const a =
|
|
85
|
+
const a = vn.getRegExp(`(${r.map((i) => i === "?" ? "\\?" : i).join("|")})`);
|
|
86
86
|
let s = !a.test(n);
|
|
87
87
|
if (!s) {
|
|
88
88
|
const i = n.indexOf(t);
|
|
89
89
|
i > 0 && !a.test(n.substring(0, i)) && (s = !0);
|
|
90
90
|
}
|
|
91
91
|
return s;
|
|
92
|
-
},
|
|
92
|
+
}, Me = (n, e, t = ".") => {
|
|
93
93
|
if (!n) return;
|
|
94
94
|
if (n[e])
|
|
95
95
|
return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0;
|
|
@@ -109,7 +109,7 @@ const xn = [" ", ",", "?", "!", ";"], wn = new bn(20), vn = (n, e, t) => {
|
|
|
109
109
|
a = i;
|
|
110
110
|
}
|
|
111
111
|
return a;
|
|
112
|
-
}, he = (n) => n?.replace("_", "-"),
|
|
112
|
+
}, he = (n) => n?.replace("_", "-"), Sn = {
|
|
113
113
|
type: "logger",
|
|
114
114
|
log(n) {
|
|
115
115
|
this.output("log", n);
|
|
@@ -124,12 +124,12 @@ const xn = [" ", ",", "?", "!", ";"], wn = new bn(20), vn = (n, e, t) => {
|
|
|
124
124
|
console?.[n]?.apply?.(console, e);
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
let
|
|
127
|
+
let En = class Be {
|
|
128
128
|
constructor(e, t = {}) {
|
|
129
129
|
this.init(e, t);
|
|
130
130
|
}
|
|
131
131
|
init(e, t = {}) {
|
|
132
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
132
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || Sn, this.options = t, this.debug = t.debug;
|
|
133
133
|
}
|
|
134
134
|
log(...e) {
|
|
135
135
|
return this.forward(e, "log", "", !0);
|
|
@@ -147,16 +147,16 @@ let Sn = class Me {
|
|
|
147
147
|
return a && !this.debug ? null : (L(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
148
148
|
}
|
|
149
149
|
create(e) {
|
|
150
|
-
return new
|
|
150
|
+
return new Be(this.logger, {
|
|
151
151
|
prefix: `${this.prefix}:${e}:`,
|
|
152
152
|
...this.options
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
clone(e) {
|
|
156
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
156
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new Be(this.logger, e);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
var W = new
|
|
159
|
+
var W = new En();
|
|
160
160
|
class Ee {
|
|
161
161
|
constructor() {
|
|
162
162
|
this.observers = {};
|
|
@@ -187,7 +187,7 @@ class Ee {
|
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
class
|
|
190
|
+
class rt extends Ee {
|
|
191
191
|
constructor(e, t = {
|
|
192
192
|
ns: ["translation"],
|
|
193
193
|
defaultNS: "translation"
|
|
@@ -206,14 +206,14 @@ class nt extends Ee {
|
|
|
206
206
|
let o;
|
|
207
207
|
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], r && (Array.isArray(r) ? o.push(...r) : L(r) && s ? o.push(...r.split(s)) : o.push(r)));
|
|
208
208
|
const l = ve(this.data, o);
|
|
209
|
-
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !i || !L(r) ? l :
|
|
209
|
+
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !i || !L(r) ? l : Me(this.data?.[e]?.[t], r, s);
|
|
210
210
|
}
|
|
211
211
|
addResource(e, t, r, a, s = {
|
|
212
212
|
silent: !1
|
|
213
213
|
}) {
|
|
214
214
|
const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
|
|
215
215
|
let o = [e, t];
|
|
216
|
-
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t),
|
|
216
|
+
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t), nt(this.data, o, a), s.silent || this.emit("added", e, t, r, a);
|
|
217
217
|
}
|
|
218
218
|
addResources(e, t, r, a = {
|
|
219
219
|
silent: !1
|
|
@@ -231,10 +231,10 @@ class nt extends Ee {
|
|
|
231
231
|
let o = [e, t];
|
|
232
232
|
e.indexOf(".") > -1 && (o = e.split("."), a = r, r = t, t = o[1]), this.addNamespaces(t);
|
|
233
233
|
let l = ve(this.data, o) || {};
|
|
234
|
-
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ?
|
|
234
|
+
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ? Ct(l, r, s) : l = {
|
|
235
235
|
...l,
|
|
236
236
|
...r
|
|
237
|
-
},
|
|
237
|
+
}, nt(this.data, o, l), i.silent || this.emit("added", e, t, r);
|
|
238
238
|
}
|
|
239
239
|
removeResourceBundle(e, t) {
|
|
240
240
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -256,7 +256,7 @@ class nt extends Ee {
|
|
|
256
256
|
return this.data;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var Pt = {
|
|
260
260
|
processors: {},
|
|
261
261
|
addPostProcessor(n) {
|
|
262
262
|
this.processors[n.name] = n;
|
|
@@ -267,22 +267,22 @@ var Ct = {
|
|
|
267
267
|
}), e;
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const
|
|
271
|
-
function
|
|
270
|
+
const jt = Symbol("i18next/PATH_KEY");
|
|
271
|
+
function Ln() {
|
|
272
272
|
const n = [], e = /* @__PURE__ */ Object.create(null);
|
|
273
273
|
let t;
|
|
274
|
-
return e.get = (r, a) => (t?.revoke?.(), a ===
|
|
274
|
+
return e.get = (r, a) => (t?.revoke?.(), a === jt ? n : (n.push(a), t = Proxy.revocable(r, e), t.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function ze(n, e) {
|
|
277
277
|
const {
|
|
278
|
-
[
|
|
279
|
-
} = n(
|
|
278
|
+
[jt]: t
|
|
279
|
+
} = n(Ln());
|
|
280
280
|
return t.join(e?.keySeparator ?? ".");
|
|
281
281
|
}
|
|
282
|
-
const
|
|
282
|
+
const at = {}, Te = (n) => !L(n) && typeof n != "boolean" && typeof n != "number";
|
|
283
283
|
class ke extends Ee {
|
|
284
284
|
constructor(e, t = {}) {
|
|
285
|
-
super(),
|
|
285
|
+
super(), gn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = W.create("translator");
|
|
286
286
|
}
|
|
287
287
|
changeLanguage(e) {
|
|
288
288
|
e && (this.language = e);
|
|
@@ -304,7 +304,7 @@ class ke extends Ee {
|
|
|
304
304
|
r === void 0 && (r = ":");
|
|
305
305
|
const a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
306
306
|
let s = t.ns || this.options.defaultNS || [];
|
|
307
|
-
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
307
|
+
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !kn(e, r, a);
|
|
308
308
|
if (i && !o) {
|
|
309
309
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
310
310
|
if (l && l.length > 0)
|
|
@@ -327,7 +327,7 @@ class ke extends Ee {
|
|
|
327
327
|
if (typeof a != "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), typeof a == "object" && (a = {
|
|
328
328
|
...a
|
|
329
329
|
}), a || (a = {}), e == null) return "";
|
|
330
|
-
typeof e == "function" && (e =
|
|
330
|
+
typeof e == "function" && (e = ze(e, {
|
|
331
331
|
...this.options,
|
|
332
332
|
...a
|
|
333
333
|
})), Array.isArray(e) || (e = [String(e)]);
|
|
@@ -409,16 +409,16 @@ class ke extends Ee {
|
|
|
409
409
|
for (let C = 0; C < ee.length; C++)
|
|
410
410
|
j.push(ee[C]);
|
|
411
411
|
else this.options.saveMissingTo === "all" ? j = this.languageUtils.toResolveHierarchy(a.lng || this.language) : j.push(a.lng || this.language);
|
|
412
|
-
const
|
|
412
|
+
const K = (C, V, Z) => {
|
|
413
413
|
const te = E && Z !== p ? Z : P;
|
|
414
414
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(C, c, V, te, D, a) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(C, c, V, te, D, a), this.emit("missingKey", C, c, V, p);
|
|
415
415
|
};
|
|
416
416
|
this.options.saveMissing && (this.options.saveMissingPlurals && k ? j.forEach((C) => {
|
|
417
417
|
const V = this.pluralResolver.getSuffixes(C, a);
|
|
418
418
|
R && a[`defaultValue${this.options.pluralSeparator}zero`] && V.indexOf(`${this.options.pluralSeparator}zero`) < 0 && V.push(`${this.options.pluralSeparator}zero`), V.forEach((Z) => {
|
|
419
|
-
|
|
419
|
+
K([C], o + Z, a[`defaultValue${Z}`] || N);
|
|
420
420
|
});
|
|
421
|
-
}) :
|
|
421
|
+
}) : K(j, o, N));
|
|
422
422
|
}
|
|
423
423
|
p = this.extendTranslation(p, e, a, m, r), O && p === o && this.options.appendNamespaceToMissingKey && (p = `${c}${d}${o}`), (O || M) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${d}${o}` : o, M ? p : void 0, a));
|
|
424
424
|
}
|
|
@@ -457,7 +457,7 @@ class ke extends Ee {
|
|
|
457
457
|
!r.lng && a && a.res && (r.lng = this.language || a.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...u) => s?.[0] === u[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${t[0]}`), null) : this.translate(...u, t), r)), r.interpolation && this.interpolator.reset();
|
|
458
458
|
}
|
|
459
459
|
const i = r.postProcess || this.options.postProcess, o = L(i) ? [i] : i;
|
|
460
|
-
return e != null && o?.length && r.applyPostProcessor !== !1 && (e =
|
|
460
|
+
return e != null && o?.length && r.applyPostProcessor !== !1 && (e = Pt.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
461
461
|
i18nResolved: {
|
|
462
462
|
...a,
|
|
463
463
|
usedParams: this.getUsedParamsDetails(r)
|
|
@@ -475,7 +475,7 @@ class ke extends Ee {
|
|
|
475
475
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
476
476
|
const f = t.count !== void 0 && !L(t.count), m = f && !t.ordinal && t.count === 0, p = t.context !== void 0 && (L(t.context) || typeof t.context == "number") && t.context !== "", g = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
477
477
|
u.forEach((h) => {
|
|
478
|
-
this.isValidLookup(r) || (o = h, !
|
|
478
|
+
this.isValidLookup(r) || (o = h, !at[`${g[0]}-${h}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (at[`${g[0]}-${h}`] = !0, this.logger.warn(`key "${a}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), g.forEach((w) => {
|
|
479
479
|
if (this.isValidLookup(r)) return;
|
|
480
480
|
i = w;
|
|
481
481
|
const b = [d];
|
|
@@ -532,7 +532,7 @@ class ke extends Ee {
|
|
|
532
532
|
return !1;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
class
|
|
535
|
+
class st {
|
|
536
536
|
constructor(e) {
|
|
537
537
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = W.create("languageUtils");
|
|
538
538
|
}
|
|
@@ -596,20 +596,20 @@ class at {
|
|
|
596
596
|
}), a;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const it = {
|
|
600
600
|
zero: 0,
|
|
601
601
|
one: 1,
|
|
602
602
|
two: 2,
|
|
603
603
|
few: 3,
|
|
604
604
|
many: 4,
|
|
605
605
|
other: 5
|
|
606
|
-
},
|
|
606
|
+
}, ot = {
|
|
607
607
|
select: (n) => n === 1 ? "one" : "other",
|
|
608
608
|
resolvedOptions: () => ({
|
|
609
609
|
pluralCategories: ["one", "other"]
|
|
610
610
|
})
|
|
611
611
|
};
|
|
612
|
-
class
|
|
612
|
+
class Fn {
|
|
613
613
|
constructor(e, t = {}) {
|
|
614
614
|
this.languageUtils = e, this.options = t, this.logger = W.create("pluralResolver"), this.pluralRulesCache = {};
|
|
615
615
|
}
|
|
@@ -633,8 +633,8 @@ class Ln {
|
|
|
633
633
|
});
|
|
634
634
|
} catch {
|
|
635
635
|
if (!Intl)
|
|
636
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
637
|
-
if (!e.match(/-|_/)) return
|
|
636
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), ot;
|
|
637
|
+
if (!e.match(/-|_/)) return ot;
|
|
638
638
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
639
639
|
i = this.getRule(l, t);
|
|
640
640
|
}
|
|
@@ -649,18 +649,18 @@ class Ln {
|
|
|
649
649
|
}
|
|
650
650
|
getSuffixes(e, t = {}) {
|
|
651
651
|
let r = this.getRule(e, t);
|
|
652
|
-
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((a, s) =>
|
|
652
|
+
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((a, s) => it[a] - it[s]).map((a) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : [];
|
|
653
653
|
}
|
|
654
654
|
getSuffix(e, t, r = {}) {
|
|
655
655
|
const a = this.getRule(e, r);
|
|
656
656
|
return a ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
const
|
|
660
|
-
let s =
|
|
661
|
-
return !s && a && L(t) && (s =
|
|
659
|
+
const lt = (n, e, t, r = ".", a = !0) => {
|
|
660
|
+
let s = mn(n, e, t);
|
|
661
|
+
return !s && a && L(t) && (s = Me(n, t, r), s === void 0 && (s = Me(e, t, r))), s;
|
|
662
662
|
}, Ce = (n) => n.replace(/\$/g, "$$$$");
|
|
663
|
-
class
|
|
663
|
+
class An {
|
|
664
664
|
constructor(e = {}) {
|
|
665
665
|
this.logger = W.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e);
|
|
666
666
|
}
|
|
@@ -687,7 +687,7 @@ class Fn {
|
|
|
687
687
|
maxReplaces: w,
|
|
688
688
|
alwaysFormat: b
|
|
689
689
|
} = e.interpolation;
|
|
690
|
-
this.escape = t !== void 0 ? t :
|
|
690
|
+
this.escape = t !== void 0 ? t : bn, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = s ? ne(s) : i || "{{", this.suffix = o ? ne(o) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = f ? ne(f) : m || ne("$t("), this.nestingSuffix = p ? ne(p) : g || ne(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
691
691
|
}
|
|
692
692
|
reset() {
|
|
693
693
|
this.options && this.init(this.options);
|
|
@@ -700,7 +700,7 @@ class Fn {
|
|
|
700
700
|
let s, i, o;
|
|
701
701
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
|
|
702
702
|
if (m.indexOf(this.formatSeparator) < 0) {
|
|
703
|
-
const w =
|
|
703
|
+
const w = lt(t, l, m, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
704
704
|
return this.alwaysFormat ? this.format(w, void 0, r, {
|
|
705
705
|
...a,
|
|
706
706
|
...t,
|
|
@@ -708,7 +708,7 @@ class Fn {
|
|
|
708
708
|
}) : w;
|
|
709
709
|
}
|
|
710
710
|
const p = m.split(this.formatSeparator), g = p.shift().trim(), h = p.join(this.formatSeparator).trim();
|
|
711
|
-
return this.format(
|
|
711
|
+
return this.format(lt(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure), h, r, {
|
|
712
712
|
...a,
|
|
713
713
|
...t,
|
|
714
714
|
interpolationkey: g
|
|
@@ -736,7 +736,7 @@ class Fn {
|
|
|
736
736
|
continue;
|
|
737
737
|
} else
|
|
738
738
|
this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), i = "";
|
|
739
|
-
else !L(i) && !this.useRawValueToEscape && (i =
|
|
739
|
+
else !L(i) && !this.useRawValueToEscape && (i = Qe(i));
|
|
740
740
|
const g = m.safeValue(i);
|
|
741
741
|
if (e = e.replace(s[0], g), u ? (m.regex.lastIndex += i.length, m.regex.lastIndex -= s[0].length) : m.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
742
742
|
break;
|
|
@@ -770,7 +770,7 @@ class Fn {
|
|
|
770
770
|
}, i = i.replace && !L(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
771
771
|
const c = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
772
772
|
if (c !== -1 && (l = a[1].slice(c).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), s = t(o.call(this, a[1].trim(), i), i), s && a[0] === e && !L(s)) return s;
|
|
773
|
-
L(s) || (s =
|
|
773
|
+
L(s) || (s = Qe(s)), s || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), s = ""), l.length && (s = l.reduce((d, u) => this.format(d, u, r.lng, {
|
|
774
774
|
...r,
|
|
775
775
|
interpolationkey: a[1].trim()
|
|
776
776
|
}), s.trim())), e = e.replace(a[0], s), this.regexp.lastIndex = 0;
|
|
@@ -778,7 +778,7 @@ class Fn {
|
|
|
778
778
|
return e;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
|
-
const
|
|
781
|
+
const On = (n) => {
|
|
782
782
|
let e = n.toLowerCase().trim();
|
|
783
783
|
const t = {};
|
|
784
784
|
if (n.indexOf("(") > -1) {
|
|
@@ -796,7 +796,7 @@ const An = (n) => {
|
|
|
796
796
|
formatName: e,
|
|
797
797
|
formatOptions: t
|
|
798
798
|
};
|
|
799
|
-
},
|
|
799
|
+
}, ct = (n) => {
|
|
800
800
|
const e = {};
|
|
801
801
|
return (t, r, a) => {
|
|
802
802
|
let s = a;
|
|
@@ -808,8 +808,8 @@ const An = (n) => {
|
|
|
808
808
|
let o = e[i];
|
|
809
809
|
return o || (o = n(he(r), a), e[i] = o), o(t);
|
|
810
810
|
};
|
|
811
|
-
},
|
|
812
|
-
class
|
|
811
|
+
}, Nn = (n) => (e, t, r) => n(he(t), r)(e);
|
|
812
|
+
class Rn {
|
|
813
813
|
constructor(e = {}) {
|
|
814
814
|
this.logger = W.create("formatter"), this.options = e, this.init(e);
|
|
815
815
|
}
|
|
@@ -817,7 +817,7 @@ class Nn {
|
|
|
817
817
|
interpolation: {}
|
|
818
818
|
}) {
|
|
819
819
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
820
|
-
const r = t.cacheInBuiltFormats ?
|
|
820
|
+
const r = t.cacheInBuiltFormats ? ct : Nn;
|
|
821
821
|
this.formats = {
|
|
822
822
|
number: r((a, s) => {
|
|
823
823
|
const i = new Intl.NumberFormat(a, {
|
|
@@ -856,7 +856,7 @@ class Nn {
|
|
|
856
856
|
this.formats[e.toLowerCase().trim()] = t;
|
|
857
857
|
}
|
|
858
858
|
addCached(e, t) {
|
|
859
|
-
this.formats[e.toLowerCase().trim()] =
|
|
859
|
+
this.formats[e.toLowerCase().trim()] = ct(t);
|
|
860
860
|
}
|
|
861
861
|
format(e, t, r, a = {}) {
|
|
862
862
|
const s = t.split(this.formatSeparator);
|
|
@@ -868,7 +868,7 @@ class Nn {
|
|
|
868
868
|
const {
|
|
869
869
|
formatName: c,
|
|
870
870
|
formatOptions: d
|
|
871
|
-
} =
|
|
871
|
+
} = On(l);
|
|
872
872
|
if (this.formats[c]) {
|
|
873
873
|
let u = o;
|
|
874
874
|
try {
|
|
@@ -888,10 +888,10 @@ class Nn {
|
|
|
888
888
|
}, e);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const Tn = (n, e) => {
|
|
892
892
|
n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
|
|
893
893
|
};
|
|
894
|
-
class
|
|
894
|
+
class Cn extends Ee {
|
|
895
895
|
constructor(e, t, r, a = {}) {
|
|
896
896
|
super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = a, this.logger = W.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = a.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = a.maxRetries >= 0 ? a.maxRetries : 5, this.retryTimeout = a.retryTimeout >= 1 ? a.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(r, a.backend, a);
|
|
897
897
|
}
|
|
@@ -923,7 +923,7 @@ class Tn extends Ee {
|
|
|
923
923
|
}), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
|
|
924
924
|
const o = {};
|
|
925
925
|
this.queue.forEach((l) => {
|
|
926
|
-
|
|
926
|
+
hn(l.loaded, [s], i), Tn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
927
927
|
o[c] || (o[c] = {});
|
|
928
928
|
const d = l.loaded[c];
|
|
929
929
|
d.length && d.forEach((u) => {
|
|
@@ -1021,7 +1021,7 @@ class Tn extends Ee {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const ut = () => ({
|
|
1025
1025
|
debug: !1,
|
|
1026
1026
|
initAsync: !0,
|
|
1027
1027
|
ns: ["translation"],
|
|
@@ -1078,17 +1078,17 @@ const ct = () => ({
|
|
|
1078
1078
|
skipOnVariables: !0
|
|
1079
1079
|
},
|
|
1080
1080
|
cacheInBuiltFormats: !0
|
|
1081
|
-
}),
|
|
1082
|
-
},
|
|
1081
|
+
}), dt = (n) => (L(n.ns) && (n.ns = [n.ns]), L(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), L(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs?.indexOf?.("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n), xe = () => {
|
|
1082
|
+
}, Pn = (n) => {
|
|
1083
1083
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
1084
1084
|
typeof n[t] == "function" && (n[t] = n[t].bind(n));
|
|
1085
1085
|
});
|
|
1086
1086
|
};
|
|
1087
1087
|
class me extends Ee {
|
|
1088
1088
|
constructor(e = {}, t) {
|
|
1089
|
-
if (super(), this.options =
|
|
1089
|
+
if (super(), this.options = dt(e), this.services = {}, this.logger = W, this.modules = {
|
|
1090
1090
|
external: []
|
|
1091
|
-
},
|
|
1091
|
+
}, Pn(this), t && !this.isInitialized && !e.isClone) {
|
|
1092
1092
|
if (!this.options.initAsync)
|
|
1093
1093
|
return this.init(e, t), this;
|
|
1094
1094
|
setTimeout(() => {
|
|
@@ -1098,11 +1098,11 @@ class me extends Ee {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
init(e = {}, t) {
|
|
1100
1100
|
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (L(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1101
|
-
const r =
|
|
1101
|
+
const r = ut();
|
|
1102
1102
|
this.options = {
|
|
1103
1103
|
...r,
|
|
1104
1104
|
...this.options,
|
|
1105
|
-
...
|
|
1105
|
+
...dt(e)
|
|
1106
1106
|
}, this.options.interpolation = {
|
|
1107
1107
|
...r.interpolation,
|
|
1108
1108
|
...this.options.interpolation
|
|
@@ -1111,16 +1111,16 @@ class me extends Ee {
|
|
|
1111
1111
|
if (!this.options.isClone) {
|
|
1112
1112
|
this.modules.logger ? W.init(a(this.modules.logger), this.options) : W.init(null, this.options);
|
|
1113
1113
|
let c;
|
|
1114
|
-
this.modules.formatter ? c = this.modules.formatter : c =
|
|
1115
|
-
const d = new
|
|
1116
|
-
this.store = new
|
|
1114
|
+
this.modules.formatter ? c = this.modules.formatter : c = Rn;
|
|
1115
|
+
const d = new st(this.options);
|
|
1116
|
+
this.store = new rt(this.options.resources, this.options);
|
|
1117
1117
|
const u = this.services;
|
|
1118
|
-
u.logger = W, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new
|
|
1118
|
+
u.logger = W, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new Fn(d, {
|
|
1119
1119
|
prepend: this.options.pluralSeparator,
|
|
1120
1120
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1121
|
-
}), this.options.interpolation.format && this.options.interpolation.format !== r.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(c), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
1121
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== r.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(c), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new An(this.options), u.utils = {
|
|
1122
1122
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1123
|
-
}, u.backendConnector = new
|
|
1123
|
+
}, u.backendConnector = new Cn(a(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (m, ...p) => {
|
|
1124
1124
|
this.emit(m, ...p);
|
|
1125
1125
|
}), this.modules.languageDetector && (u.languageDetector = a(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = a(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new ke(this.services, this.options), this.translator.on("*", (m, ...p) => {
|
|
1126
1126
|
this.emit(m, ...p);
|
|
@@ -1172,7 +1172,7 @@ class me extends Ee {
|
|
|
1172
1172
|
use(e) {
|
|
1173
1173
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1174
1174
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1175
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1175
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Pt.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1176
1176
|
}
|
|
1177
1177
|
setResolvedLanguage(e) {
|
|
1178
1178
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1211,10 +1211,10 @@ class me extends Ee {
|
|
|
1211
1211
|
}, l.lng = l.lng || a.lng, l.lngs = l.lngs || a.lngs, l.ns = l.ns || a.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || r || a.keyPrefix);
|
|
1212
1212
|
const c = this.options.keySeparator || ".";
|
|
1213
1213
|
let d;
|
|
1214
|
-
return l.keyPrefix && Array.isArray(s) ? d = s.map((u) => (typeof u == "function" && (u =
|
|
1214
|
+
return l.keyPrefix && Array.isArray(s) ? d = s.map((u) => (typeof u == "function" && (u = ze(u, {
|
|
1215
1215
|
...this.options,
|
|
1216
1216
|
...i
|
|
1217
|
-
})), `${l.keyPrefix}${c}${u}`)) : (typeof s == "function" && (s =
|
|
1217
|
+
})), `${l.keyPrefix}${c}${u}`)) : (typeof s == "function" && (s = ze(s, {
|
|
1218
1218
|
...this.options,
|
|
1219
1219
|
...i
|
|
1220
1220
|
})), d = l.keyPrefix ? `${l.keyPrefix}${c}${s}` : s), this.t(d, l);
|
|
@@ -1273,7 +1273,7 @@ class me extends Ee {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
} catch {
|
|
1275
1275
|
}
|
|
1276
|
-
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services?.languageUtils || new
|
|
1276
|
+
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services?.languageUtils || new st(ut());
|
|
1277
1277
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1278
1278
|
}
|
|
1279
1279
|
static createInstance(e = {}, t) {
|
|
@@ -1299,7 +1299,7 @@ class me extends Ee {
|
|
|
1299
1299
|
}, l[c] = Object.keys(l[c]).reduce((d, u) => (d[u] = {
|
|
1300
1300
|
...l[c][u]
|
|
1301
1301
|
}, d), l[c]), l), {});
|
|
1302
|
-
s.store = new
|
|
1302
|
+
s.store = new rt(o, a), s.services.resourceStore = s.store;
|
|
1303
1303
|
}
|
|
1304
1304
|
return s.translator = new ke(s.services, a), s.translator.on("*", (o, ...l) => {
|
|
1305
1305
|
s.emit(o, ...l);
|
|
@@ -1317,23 +1317,23 @@ class me extends Ee {
|
|
|
1317
1317
|
};
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
const
|
|
1320
|
+
const $ = me.createInstance();
|
|
1321
|
+
$.createInstance = me.createInstance;
|
|
1322
|
+
$.createInstance;
|
|
1323
|
+
$.dir;
|
|
1324
|
+
$.init;
|
|
1325
|
+
$.loadResources;
|
|
1326
|
+
$.reloadResources;
|
|
1327
|
+
$.use;
|
|
1328
|
+
$.changeLanguage;
|
|
1329
|
+
$.getFixedT;
|
|
1330
|
+
$.t;
|
|
1331
|
+
$.exists;
|
|
1332
|
+
$.setDefaultNamespace;
|
|
1333
|
+
$.hasLoadedNamespace;
|
|
1334
|
+
$.loadNamespaces;
|
|
1335
|
+
$.loadLanguages;
|
|
1336
|
+
const jn = (n, e, t, r) => {
|
|
1337
1337
|
const a = [t, {
|
|
1338
1338
|
code: e,
|
|
1339
1339
|
...r || {}
|
|
@@ -1341,8 +1341,8 @@ const Pn = (n, e, t, r) => {
|
|
|
1341
1341
|
if (n?.services?.logger?.forward)
|
|
1342
1342
|
return n.services.logger.forward(a, "warn", "react-i18next::", !0);
|
|
1343
1343
|
Q(a[0]) && (a[0] = `react-i18next:: ${a[0]}`), n?.services?.logger?.warn ? n.services.logger.warn(...a) : console?.warn && console.warn(...a);
|
|
1344
|
-
},
|
|
1345
|
-
Q(t) &&
|
|
1344
|
+
}, pt = {}, $t = (n, e, t, r) => {
|
|
1345
|
+
Q(t) && pt[t] || (Q(t) && (pt[t] = /* @__PURE__ */ new Date()), jn(n, e, t, r));
|
|
1346
1346
|
}, It = (n, e) => () => {
|
|
1347
1347
|
if (n.isInitialized)
|
|
1348
1348
|
e();
|
|
@@ -1354,21 +1354,21 @@ const Pn = (n, e, t, r) => {
|
|
|
1354
1354
|
};
|
|
1355
1355
|
n.on("initialized", t);
|
|
1356
1356
|
}
|
|
1357
|
-
},
|
|
1357
|
+
}, Ue = (n, e, t) => {
|
|
1358
1358
|
n.loadNamespaces(e, It(n, t));
|
|
1359
|
-
},
|
|
1360
|
-
if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return
|
|
1359
|
+
}, gt = (n, e, t, r) => {
|
|
1360
|
+
if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return Ue(n, t, r);
|
|
1361
1361
|
t.forEach((a) => {
|
|
1362
1362
|
n.options.ns.indexOf(a) < 0 && n.options.ns.push(a);
|
|
1363
1363
|
}), n.loadLanguages(e, It(n, r));
|
|
1364
|
-
},
|
|
1364
|
+
}, $n = (n, e, t = {}) => !e.languages || !e.languages.length ? ($t(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
1365
1365
|
languages: e.languages
|
|
1366
1366
|
}), !0) : e.hasLoadedNamespace(n, {
|
|
1367
1367
|
lng: t.lng,
|
|
1368
1368
|
precheck: (r, a) => {
|
|
1369
1369
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !a(r.isLanguageChangingTo, n)) return !1;
|
|
1370
1370
|
}
|
|
1371
|
-
}), Q = (n) => typeof n == "string", In = (n) => typeof n == "object" && n !== null,
|
|
1371
|
+
}), Q = (n) => typeof n == "string", In = (n) => typeof n == "object" && n !== null, Dn = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, _n = {
|
|
1372
1372
|
"&": "&",
|
|
1373
1373
|
"&": "&",
|
|
1374
1374
|
"<": "<",
|
|
@@ -1389,8 +1389,8 @@ const Pn = (n, e, t, r) => {
|
|
|
1389
1389
|
"…": "…",
|
|
1390
1390
|
"/": "/",
|
|
1391
1391
|
"/": "/"
|
|
1392
|
-
},
|
|
1393
|
-
let
|
|
1392
|
+
}, Mn = (n) => _n[n], Bn = (n) => n.replace(Dn, Mn);
|
|
1393
|
+
let Ve = {
|
|
1394
1394
|
bindI18n: "languageChanged",
|
|
1395
1395
|
bindI18nStore: "",
|
|
1396
1396
|
transEmptyNodeValue: "",
|
|
@@ -1398,23 +1398,23 @@ let Ue = {
|
|
|
1398
1398
|
transWrapTextNodes: "",
|
|
1399
1399
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
1400
1400
|
useSuspense: !0,
|
|
1401
|
-
unescape:
|
|
1401
|
+
unescape: Bn
|
|
1402
1402
|
};
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
...
|
|
1403
|
+
const zn = (n = {}) => {
|
|
1404
|
+
Ve = {
|
|
1405
|
+
...Ve,
|
|
1406
1406
|
...n
|
|
1407
1407
|
};
|
|
1408
|
-
},
|
|
1409
|
-
let
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1412
|
-
},
|
|
1408
|
+
}, Un = () => Ve;
|
|
1409
|
+
let Dt;
|
|
1410
|
+
const Vn = (n) => {
|
|
1411
|
+
Dt = n;
|
|
1412
|
+
}, Hn = () => Dt, Kn = {
|
|
1413
1413
|
type: "3rdParty",
|
|
1414
1414
|
init(n) {
|
|
1415
|
-
|
|
1415
|
+
zn(n.options.react), Vn(n);
|
|
1416
1416
|
}
|
|
1417
|
-
},
|
|
1417
|
+
}, _t = ye();
|
|
1418
1418
|
class qn {
|
|
1419
1419
|
constructor() {
|
|
1420
1420
|
this.usedNamespaces = {};
|
|
@@ -1438,10 +1438,10 @@ var Pe = { exports: {} }, je = {};
|
|
|
1438
1438
|
* This source code is licensed under the MIT license found in the
|
|
1439
1439
|
* LICENSE file in the root directory of this source tree.
|
|
1440
1440
|
*/
|
|
1441
|
-
var
|
|
1442
|
-
function
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1441
|
+
var ft;
|
|
1442
|
+
function Zn() {
|
|
1443
|
+
if (ft) return je;
|
|
1444
|
+
ft = 1;
|
|
1445
1445
|
var n = fe;
|
|
1446
1446
|
function e(u, f) {
|
|
1447
1447
|
return u === f && (u !== 0 || 1 / u === 1 / f) || u !== u && f !== f;
|
|
@@ -1479,25 +1479,25 @@ function Kn() {
|
|
|
1479
1479
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? c : o;
|
|
1480
1480
|
return je.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : d, je;
|
|
1481
1481
|
}
|
|
1482
|
-
var
|
|
1483
|
-
function
|
|
1484
|
-
return
|
|
1482
|
+
var ht;
|
|
1483
|
+
function Wn() {
|
|
1484
|
+
return ht || (ht = 1, Pe.exports = Zn()), Pe.exports;
|
|
1485
1485
|
}
|
|
1486
|
-
var
|
|
1487
|
-
const
|
|
1488
|
-
t:
|
|
1486
|
+
var Gn = Wn();
|
|
1487
|
+
const Yn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Array.isArray(n) ? n[n.length - 1] : n, Jn = {
|
|
1488
|
+
t: Yn,
|
|
1489
1489
|
ready: !1
|
|
1490
|
-
},
|
|
1491
|
-
},
|
|
1490
|
+
}, Xn = () => () => {
|
|
1491
|
+
}, Ke = (n, e = {}) => {
|
|
1492
1492
|
const {
|
|
1493
1493
|
i18n: t
|
|
1494
1494
|
} = e, {
|
|
1495
1495
|
i18n: r,
|
|
1496
1496
|
defaultNS: a
|
|
1497
|
-
} =
|
|
1498
|
-
s && !s.reportNamespaces && (s.reportNamespaces = new qn()), s ||
|
|
1497
|
+
} = He(_t) || {}, s = t || r || Hn();
|
|
1498
|
+
s && !s.reportNamespaces && (s.reportNamespaces = new qn()), s || $t(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
1499
1499
|
const i = de(() => ({
|
|
1500
|
-
...
|
|
1500
|
+
...Un(),
|
|
1501
1501
|
...s?.options?.react,
|
|
1502
1502
|
...e
|
|
1503
1503
|
}), [s, e]), {
|
|
@@ -1508,8 +1508,8 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1508
1508
|
return Q(k) ? [k] : k || ["translation"];
|
|
1509
1509
|
}, [n, a, s]);
|
|
1510
1510
|
s?.reportNamespaces?.addUsedNamespaces?.(c);
|
|
1511
|
-
const d =
|
|
1512
|
-
if (!s) return
|
|
1511
|
+
const d = Xe(0), u = q((k) => {
|
|
1512
|
+
if (!s) return Xn;
|
|
1513
1513
|
const {
|
|
1514
1514
|
bindI18n: E,
|
|
1515
1515
|
bindI18nStore: A
|
|
@@ -1519,10 +1519,10 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1519
1519
|
return E && s.on(E, F), A && s.store.on(A, F), () => {
|
|
1520
1520
|
E && E.split(" ").forEach((R) => s.off(R, F)), A && A.split(" ").forEach((R) => s.store.off(R, F));
|
|
1521
1521
|
};
|
|
1522
|
-
}, [s, i]), f =
|
|
1522
|
+
}, [s, i]), f = Xe(), m = q(() => {
|
|
1523
1523
|
if (!s)
|
|
1524
|
-
return
|
|
1525
|
-
const k = !!(s.isInitialized || s.initializedStoreOnce) && c.every((T) =>
|
|
1524
|
+
return Jn;
|
|
1525
|
+
const k = !!(s.isInitialized || s.initializedStoreOnce) && c.every((T) => $n(T, s, i)), E = e.lng || s.language, A = d.current, F = f.current;
|
|
1526
1526
|
if (F && F.ready === k && F.lng === E && F.keyPrefix === l && F.revision === A)
|
|
1527
1527
|
return F;
|
|
1528
1528
|
const N = {
|
|
@@ -1536,11 +1536,11 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1536
1536
|
}, [s, c, l, i, e.lng]), [p, g] = pe(0), {
|
|
1537
1537
|
t: h,
|
|
1538
1538
|
ready: w
|
|
1539
|
-
} =
|
|
1540
|
-
|
|
1539
|
+
} = Gn.useSyncExternalStore(u, m, m);
|
|
1540
|
+
Tt(() => {
|
|
1541
1541
|
if (s && !w && !o) {
|
|
1542
1542
|
const k = () => g((E) => E + 1);
|
|
1543
|
-
e.lng ?
|
|
1543
|
+
e.lng ? gt(s, e.lng, c, k) : Ue(s, c, k);
|
|
1544
1544
|
}
|
|
1545
1545
|
}, [s, e.lng, c, w, o, p]);
|
|
1546
1546
|
const b = s || {}, v = de(() => {
|
|
@@ -1550,11 +1550,11 @@ const Gn = (n, e) => Q(e) ? e : In(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1550
1550
|
if (s && o && !w)
|
|
1551
1551
|
throw new Promise((k) => {
|
|
1552
1552
|
const E = () => k();
|
|
1553
|
-
e.lng ?
|
|
1553
|
+
e.lng ? gt(s, e.lng, c, E) : Ue(s, c, E);
|
|
1554
1554
|
});
|
|
1555
1555
|
return v;
|
|
1556
1556
|
};
|
|
1557
|
-
function
|
|
1557
|
+
function Qn({
|
|
1558
1558
|
i18n: n,
|
|
1559
1559
|
defaultNS: e,
|
|
1560
1560
|
children: t
|
|
@@ -1563,11 +1563,11 @@ function Xn({
|
|
|
1563
1563
|
i18n: n,
|
|
1564
1564
|
defaultNS: e
|
|
1565
1565
|
}), [n, e]);
|
|
1566
|
-
return we(
|
|
1566
|
+
return we(_t.Provider, {
|
|
1567
1567
|
value: r
|
|
1568
1568
|
}, t);
|
|
1569
1569
|
}
|
|
1570
|
-
var
|
|
1570
|
+
var $e = { exports: {} }, oe = {};
|
|
1571
1571
|
/**
|
|
1572
1572
|
* @license React
|
|
1573
1573
|
* react-jsx-runtime.production.min.js
|
|
@@ -1577,10 +1577,10 @@ var Ie = { exports: {} }, oe = {};
|
|
|
1577
1577
|
* This source code is licensed under the MIT license found in the
|
|
1578
1578
|
* LICENSE file in the root directory of this source tree.
|
|
1579
1579
|
*/
|
|
1580
|
-
var
|
|
1581
|
-
function
|
|
1582
|
-
if (
|
|
1583
|
-
|
|
1580
|
+
var mt;
|
|
1581
|
+
function er() {
|
|
1582
|
+
if (mt) return oe;
|
|
1583
|
+
mt = 1;
|
|
1584
1584
|
var n = fe, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1585
1585
|
function i(o, l, c) {
|
|
1586
1586
|
var d, u = {}, f = null, m = null;
|
|
@@ -1591,13 +1591,13 @@ function Qn() {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
return oe.Fragment = t, oe.jsx = i, oe.jsxs = i, oe;
|
|
1593
1593
|
}
|
|
1594
|
-
var
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1594
|
+
var yt;
|
|
1595
|
+
function tr() {
|
|
1596
|
+
return yt || (yt = 1, $e.exports = er()), $e.exports;
|
|
1597
1597
|
}
|
|
1598
|
-
var S =
|
|
1599
|
-
const
|
|
1600
|
-
const { t: o } =
|
|
1598
|
+
var S = tr();
|
|
1599
|
+
const nr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPreviousStep: s, onUpdateResponse: i }) => {
|
|
1600
|
+
const { t: o } = Ke(), c = ((d) => {
|
|
1601
1601
|
let u = 0;
|
|
1602
1602
|
if (e.startTransition) {
|
|
1603
1603
|
if (d === u)
|
|
@@ -1639,7 +1639,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1639
1639
|
optOutButtonText: w
|
|
1640
1640
|
} = c.transition;
|
|
1641
1641
|
return /* @__PURE__ */ S.jsx(
|
|
1642
|
-
|
|
1642
|
+
Pa,
|
|
1643
1643
|
{
|
|
1644
1644
|
title: d,
|
|
1645
1645
|
description: u,
|
|
@@ -1655,7 +1655,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1655
1655
|
if (c.type === "end") {
|
|
1656
1656
|
const { title: d, description: u, image: f, customEndButton: m, endButtonText: p, customEndButtonLink: g, endButtonLink: h } = c.transition;
|
|
1657
1657
|
return /* @__PURE__ */ S.jsx(
|
|
1658
|
-
|
|
1658
|
+
Ca,
|
|
1659
1659
|
{
|
|
1660
1660
|
title: d,
|
|
1661
1661
|
description: u,
|
|
@@ -1673,7 +1673,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1673
1673
|
if (d.questionType === "choice") {
|
|
1674
1674
|
const { title: u, description: f, image: m, alternatives: p, maxSelections: g, required: h, verticalAlignment: w } = d, b = t.responses[d.id] || [], v = (g ? b.length <= g || g === 4 : !0) && (h ? b.length > 0 : !0);
|
|
1675
1675
|
return /* @__PURE__ */ S.jsx(
|
|
1676
|
-
|
|
1676
|
+
Na,
|
|
1677
1677
|
{
|
|
1678
1678
|
title: u,
|
|
1679
1679
|
description: f,
|
|
@@ -1702,7 +1702,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1702
1702
|
if (d.questionType === "text") {
|
|
1703
1703
|
const { title: u, description: f, image: m, maxChars: p, limited: g, required: h } = d, w = t.responses[d.id] || "", b = (g && p ? w.length <= p : !0) && (h ? w.length > 0 : !0);
|
|
1704
1704
|
return /* @__PURE__ */ S.jsx(
|
|
1705
|
-
|
|
1705
|
+
Ta,
|
|
1706
1706
|
{
|
|
1707
1707
|
title: u,
|
|
1708
1708
|
icon: e.icon,
|
|
@@ -1724,12 +1724,12 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
1726
|
return null;
|
|
1727
|
-
},
|
|
1727
|
+
}, rr = ({ form: n, onDismiss: e, onComplete: t, zIndex: r = 100 }) => {
|
|
1728
1728
|
const s = (n.startTransition ? 1 : 0) + n.questions.length + (n.endTransition ? 1 : 0) - 1, [i, o] = pe({
|
|
1729
1729
|
responses: {},
|
|
1730
1730
|
currentStep: 0,
|
|
1731
1731
|
startedAt: /* @__PURE__ */ new Date()
|
|
1732
|
-
}), l =
|
|
1732
|
+
}), l = q((f, m) => {
|
|
1733
1733
|
o((p) => ({
|
|
1734
1734
|
...p,
|
|
1735
1735
|
responses: {
|
|
@@ -1737,12 +1737,12 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1737
1737
|
[f]: m
|
|
1738
1738
|
}
|
|
1739
1739
|
}));
|
|
1740
|
-
}, []), c =
|
|
1740
|
+
}, []), c = q((f) => {
|
|
1741
1741
|
o((m) => ({
|
|
1742
1742
|
...m,
|
|
1743
1743
|
currentStep: f
|
|
1744
1744
|
}));
|
|
1745
|
-
}, []), d =
|
|
1745
|
+
}, []), d = q(() => {
|
|
1746
1746
|
if (i.currentStep < s)
|
|
1747
1747
|
c(i.currentStep + 1);
|
|
1748
1748
|
else {
|
|
@@ -1752,16 +1752,16 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1752
1752
|
};
|
|
1753
1753
|
t(f);
|
|
1754
1754
|
}
|
|
1755
|
-
}, [i, s, c, t]), u =
|
|
1755
|
+
}, [i, s, c, t]), u = q(() => {
|
|
1756
1756
|
i.currentStep > 0 && c(i.currentStep - 1);
|
|
1757
1757
|
}, [i.currentStep, c]);
|
|
1758
1758
|
return /* @__PURE__ */ S.jsx(
|
|
1759
1759
|
"div",
|
|
1760
1760
|
{
|
|
1761
|
-
className: "flex flex-col justify-center items-center
|
|
1761
|
+
className: "flex flex-col justify-center items-center fixed inset-0 bg-overlay-background-default-light dark:bg-overlay-background-default-dark",
|
|
1762
1762
|
style: { zIndex: r },
|
|
1763
1763
|
children: /* @__PURE__ */ S.jsx(
|
|
1764
|
-
|
|
1764
|
+
nr,
|
|
1765
1765
|
{
|
|
1766
1766
|
step: i.currentStep,
|
|
1767
1767
|
form: n,
|
|
@@ -1774,7 +1774,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1774
1774
|
)
|
|
1775
1775
|
}
|
|
1776
1776
|
);
|
|
1777
|
-
},
|
|
1777
|
+
}, ar = /* @__PURE__ */ new Map([
|
|
1778
1778
|
[
|
|
1779
1779
|
"bold",
|
|
1780
1780
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z" }))
|
|
@@ -1805,7 +1805,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1805
1805
|
"thin",
|
|
1806
1806
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z" }))
|
|
1807
1807
|
]
|
|
1808
|
-
]),
|
|
1808
|
+
]), sr = /* @__PURE__ */ new Map([
|
|
1809
1809
|
[
|
|
1810
1810
|
"bold",
|
|
1811
1811
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z" }))
|
|
@@ -1830,7 +1830,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1830
1830
|
"thin",
|
|
1831
1831
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z" }))
|
|
1832
1832
|
]
|
|
1833
|
-
]),
|
|
1833
|
+
]), ir = /* @__PURE__ */ new Map([
|
|
1834
1834
|
[
|
|
1835
1835
|
"bold",
|
|
1836
1836
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z" }))
|
|
@@ -1855,7 +1855,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1855
1855
|
"thin",
|
|
1856
1856
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z" }))
|
|
1857
1857
|
]
|
|
1858
|
-
]),
|
|
1858
|
+
]), or = /* @__PURE__ */ new Map([
|
|
1859
1859
|
[
|
|
1860
1860
|
"bold",
|
|
1861
1861
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z" }))
|
|
@@ -1880,7 +1880,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1880
1880
|
"thin",
|
|
1881
1881
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z" }))
|
|
1882
1882
|
]
|
|
1883
|
-
]),
|
|
1883
|
+
]), lr = /* @__PURE__ */ new Map([
|
|
1884
1884
|
[
|
|
1885
1885
|
"bold",
|
|
1886
1886
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
@@ -1911,7 +1911,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1911
1911
|
"thin",
|
|
1912
1912
|
/* @__PURE__ */ x.createElement(x.Fragment, null, /* @__PURE__ */ x.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
1913
1913
|
]
|
|
1914
|
-
]),
|
|
1914
|
+
]), Mt = ye({
|
|
1915
1915
|
color: "currentColor",
|
|
1916
1916
|
size: "1em",
|
|
1917
1917
|
weight: "regular",
|
|
@@ -1933,7 +1933,7 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1933
1933
|
weight: f = "regular",
|
|
1934
1934
|
mirrored: m = !1,
|
|
1935
1935
|
...p
|
|
1936
|
-
} = x.useContext(
|
|
1936
|
+
} = x.useContext(Mt);
|
|
1937
1937
|
return /* @__PURE__ */ x.createElement(
|
|
1938
1938
|
"svg",
|
|
1939
1939
|
{
|
|
@@ -1954,17 +1954,17 @@ const tr = ({ step: n, form: e, formState: t, onDismiss: r, onNextStep: a, onPre
|
|
|
1954
1954
|
}
|
|
1955
1955
|
);
|
|
1956
1956
|
se.displayName = "IconBase";
|
|
1957
|
-
const Mt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: rr }));
|
|
1958
|
-
Mt.displayName = "ArrowSquareOutIcon";
|
|
1959
1957
|
const Bt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: ar }));
|
|
1960
|
-
Bt.displayName = "
|
|
1958
|
+
Bt.displayName = "ArrowSquareOutIcon";
|
|
1961
1959
|
const zt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: sr }));
|
|
1962
|
-
zt.displayName = "
|
|
1960
|
+
zt.displayName = "CaretLeftIcon";
|
|
1963
1961
|
const Ut = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: ir }));
|
|
1964
|
-
Ut.displayName = "
|
|
1965
|
-
const
|
|
1962
|
+
Ut.displayName = "CaretRightIcon";
|
|
1963
|
+
const Vt = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: or }));
|
|
1964
|
+
Vt.displayName = "CircleNotchIcon";
|
|
1965
|
+
const Le = x.forwardRef((n, e) => /* @__PURE__ */ x.createElement(se, { ref: e, ...n, weights: lr }));
|
|
1966
1966
|
Le.displayName = "XIcon";
|
|
1967
|
-
var
|
|
1967
|
+
var bt = { exports: {} }, le = {};
|
|
1968
1968
|
/**
|
|
1969
1969
|
* @license React
|
|
1970
1970
|
* react-jsx-runtime.production.min.js
|
|
@@ -1974,10 +1974,10 @@ var yt = { exports: {} }, le = {};
|
|
|
1974
1974
|
* This source code is licensed under the MIT license found in the
|
|
1975
1975
|
* LICENSE file in the root directory of this source tree.
|
|
1976
1976
|
*/
|
|
1977
|
-
var
|
|
1978
|
-
function
|
|
1979
|
-
if (
|
|
1980
|
-
|
|
1977
|
+
var xt;
|
|
1978
|
+
function cr() {
|
|
1979
|
+
if (xt) return le;
|
|
1980
|
+
xt = 1;
|
|
1981
1981
|
var n = fe, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1982
1982
|
function i(o, l, c) {
|
|
1983
1983
|
var d, u = {}, f = null, m = null;
|
|
@@ -1988,22 +1988,22 @@ function lr() {
|
|
|
1988
1988
|
}
|
|
1989
1989
|
return le.Fragment = t, le.jsx = i, le.jsxs = i, le;
|
|
1990
1990
|
}
|
|
1991
|
-
var
|
|
1992
|
-
function
|
|
1993
|
-
return
|
|
1991
|
+
var wt;
|
|
1992
|
+
function ur() {
|
|
1993
|
+
return wt || (wt = 1, bt.exports = /* @__PURE__ */ cr()), bt.exports;
|
|
1994
1994
|
}
|
|
1995
|
-
var
|
|
1996
|
-
function
|
|
1995
|
+
var I = /* @__PURE__ */ ur();
|
|
1996
|
+
function Ht(n) {
|
|
1997
1997
|
var e, t, r = "";
|
|
1998
1998
|
if (typeof n == "string" || typeof n == "number") r += n;
|
|
1999
1999
|
else if (typeof n == "object") if (Array.isArray(n)) {
|
|
2000
2000
|
var a = n.length;
|
|
2001
|
-
for (e = 0; e < a; e++) n[e] && (t =
|
|
2001
|
+
for (e = 0; e < a; e++) n[e] && (t = Ht(n[e])) && (r && (r += " "), r += t);
|
|
2002
2002
|
} else for (t in n) n[t] && (r && (r += " "), r += t);
|
|
2003
2003
|
return r;
|
|
2004
2004
|
}
|
|
2005
2005
|
function qe() {
|
|
2006
|
-
for (var n, e, t = 0, r = "", a = arguments.length; t < a; t++) (n = arguments[t]) && (e =
|
|
2006
|
+
for (var n, e, t = 0, r = "", a = arguments.length; t < a; t++) (n = arguments[t]) && (e = Ht(n)) && (r && (r += " "), r += e);
|
|
2007
2007
|
return r;
|
|
2008
2008
|
}
|
|
2009
2009
|
const _ = qe, J = ({
|
|
@@ -2015,58 +2015,64 @@ const _ = qe, J = ({
|
|
|
2015
2015
|
className: s,
|
|
2016
2016
|
disabled: i = !1,
|
|
2017
2017
|
loading: o = !1,
|
|
2018
|
-
|
|
2019
|
-
|
|
2018
|
+
round: l = !1,
|
|
2019
|
+
...c
|
|
2020
|
+
}) => /* @__PURE__ */ I.jsx(
|
|
2020
2021
|
"button",
|
|
2021
2022
|
{
|
|
2022
2023
|
className: _(
|
|
2023
|
-
"flex gap-2 justify-center items-center
|
|
2024
|
-
|
|
2025
|
-
dr(
|
|
2024
|
+
"flex gap-2 justify-center items-center disabled:pointer-events-none",
|
|
2025
|
+
l ? "rounded-full" : "rounded-lg",
|
|
2026
|
+
dr(n),
|
|
2027
|
+
pr(e),
|
|
2026
2028
|
s
|
|
2027
2029
|
),
|
|
2028
2030
|
disabled: i,
|
|
2029
|
-
...
|
|
2030
|
-
children: /* @__PURE__ */
|
|
2031
|
-
|
|
2031
|
+
...c,
|
|
2032
|
+
children: /* @__PURE__ */ I.jsx(
|
|
2033
|
+
Mt.Provider,
|
|
2032
2034
|
{
|
|
2033
2035
|
value: {
|
|
2034
|
-
size: e === "xsmall" ?
|
|
2036
|
+
size: e === "xsmall" ? 12 : 16,
|
|
2035
2037
|
weight: "regular",
|
|
2036
|
-
className: _(
|
|
2038
|
+
className: _(Ie(n, i))
|
|
2037
2039
|
},
|
|
2038
|
-
children: o ? /* @__PURE__ */
|
|
2040
|
+
children: o ? /* @__PURE__ */ I.jsx(Vt, { className: _(Ie(n, i), "animate-spin") }) : /* @__PURE__ */ I.jsxs(I.Fragment, { children: [
|
|
2039
2041
|
r && r,
|
|
2040
|
-
t && /* @__PURE__ */
|
|
2042
|
+
t && /* @__PURE__ */ I.jsx("span", { className: _(Ie(n, i), gr(e)), children: t }),
|
|
2041
2043
|
a && a
|
|
2042
2044
|
] })
|
|
2043
2045
|
}
|
|
2044
2046
|
)
|
|
2045
2047
|
}
|
|
2046
|
-
),
|
|
2048
|
+
), dr = (n) => {
|
|
2047
2049
|
switch (n) {
|
|
2048
2050
|
case "primary":
|
|
2049
2051
|
return "border border-grey-0/0 bg-primary-action-button-light dark:bg-primary-action-button-dark hover:bg-primary-action-button-hover-light dark:hover:bg-primary-action-button-hover-dark disabled:bg-primary-action-disabled-light dark:disabled:bg-primary-action-disabled-dark";
|
|
2050
2052
|
case "secondary":
|
|
2051
|
-
return "border border-grey-0/0 bg-secondary-action-
|
|
2053
|
+
return "border border-grey-0/0 bg-secondary-action-button-light dark:bg-secondary-action-button-dark hover:bg-secondary-action-button-hover-light dark:hover:bg-secondary-action-button-hover-dark disabled:bg-secondary-action-disabled-light dark:disabled:bg-secondary-action-disabled-dark";
|
|
2054
|
+
case "tertiary":
|
|
2055
|
+
return "border border-grey-0/0 bg-tertiary-action-button-light dark:bg-tertiary-action-button-dark hover:bg-tertiary-action-button-hover-light dark:hover:bg-tertiary-action-button-hover-dark disabled:bg-tertiary-action-disabled-light dark:disabled:bg-tertiary-action-disabled-dark";
|
|
2052
2056
|
case "neutral":
|
|
2053
2057
|
return "border border-separator-regular-light dark:border-separator-regular-dark hover:bg-background-universal-overlay-light dark:hover:bg-background-universal-overlay-dark disabled:bg-secondary-action-disabled-light dark:disabled:bg-secondary-action-disabled-dark disabled:border-separator-opaque-light dark:disabled:border-separator-opaque-dark";
|
|
2054
2058
|
case "subtle":
|
|
2055
2059
|
return "border border-grey-0/0 hover:bg-background-universal-overlay-light dark:hover:bg-background-universal-overlay-dark";
|
|
2056
2060
|
}
|
|
2057
|
-
},
|
|
2061
|
+
}, Ie = (n, e) => {
|
|
2058
2062
|
if (e) return "text-label-tertiary-light dark:text-label-tertiary-dark";
|
|
2059
2063
|
switch (n) {
|
|
2060
2064
|
case "primary":
|
|
2061
2065
|
return "text-nonadaptable-text-light";
|
|
2062
2066
|
case "secondary":
|
|
2063
2067
|
return "text-label-quaternary-light dark:text-label-quaternary-dark";
|
|
2068
|
+
case "tertiary":
|
|
2069
|
+
return "text-label-primary-light dark:text-label-primary-dark";
|
|
2064
2070
|
case "neutral":
|
|
2065
2071
|
return "text-label-primary-light dark:text-label-primary-dark";
|
|
2066
2072
|
case "subtle":
|
|
2067
2073
|
return "text-label-primary-light dark:text-label-primary-dark";
|
|
2068
2074
|
}
|
|
2069
|
-
},
|
|
2075
|
+
}, pr = (n) => {
|
|
2070
2076
|
switch (n) {
|
|
2071
2077
|
case "xsmall":
|
|
2072
2078
|
return "p-1";
|
|
@@ -2075,7 +2081,7 @@ const _ = qe, J = ({
|
|
|
2075
2081
|
case "medium":
|
|
2076
2082
|
return "p-3";
|
|
2077
2083
|
}
|
|
2078
|
-
},
|
|
2084
|
+
}, gr = (n) => {
|
|
2079
2085
|
switch (n) {
|
|
2080
2086
|
case "xsmall":
|
|
2081
2087
|
return "text-[10px] leading-[14px]";
|
|
@@ -2085,39 +2091,39 @@ const _ = qe, J = ({
|
|
|
2085
2091
|
return "text-[15px] leading-[16px] -tracking-0,1";
|
|
2086
2092
|
}
|
|
2087
2093
|
};
|
|
2088
|
-
var
|
|
2094
|
+
var fr = Object.create, Fe = Object.defineProperty, hr = Object.defineProperties, mr = Object.getOwnPropertyDescriptor, yr = Object.getOwnPropertyDescriptors, Kt = Object.getOwnPropertyNames, Se = Object.getOwnPropertySymbols, br = Object.getPrototypeOf, Ze = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable, vt = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, G = (n, e) => {
|
|
2089
2095
|
for (var t in e || (e = {}))
|
|
2090
|
-
|
|
2096
|
+
Ze.call(e, t) && vt(n, t, e[t]);
|
|
2091
2097
|
if (Se)
|
|
2092
2098
|
for (var t of Se(e))
|
|
2093
|
-
qt.call(e, t) &&
|
|
2099
|
+
qt.call(e, t) && vt(n, t, e[t]);
|
|
2094
2100
|
return n;
|
|
2095
|
-
}, Ae = (n, e) =>
|
|
2101
|
+
}, Ae = (n, e) => hr(n, yr(e)), Zt = (n, e) => {
|
|
2096
2102
|
var t = {};
|
|
2097
2103
|
for (var r in n)
|
|
2098
|
-
|
|
2104
|
+
Ze.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
2099
2105
|
if (n != null && Se)
|
|
2100
2106
|
for (var r of Se(n))
|
|
2101
2107
|
e.indexOf(r) < 0 && qt.call(n, r) && (t[r] = n[r]);
|
|
2102
2108
|
return t;
|
|
2103
|
-
},
|
|
2104
|
-
return e || (0, n[
|
|
2105
|
-
},
|
|
2109
|
+
}, xr = (n, e) => function() {
|
|
2110
|
+
return e || (0, n[Kt(n)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
2111
|
+
}, wr = (n, e) => {
|
|
2106
2112
|
for (var t in e)
|
|
2107
2113
|
Fe(n, t, { get: e[t], enumerable: !0 });
|
|
2108
|
-
},
|
|
2114
|
+
}, vr = (n, e, t, r) => {
|
|
2109
2115
|
if (e && typeof e == "object" || typeof e == "function")
|
|
2110
|
-
for (let a of
|
|
2111
|
-
!
|
|
2116
|
+
for (let a of Kt(e))
|
|
2117
|
+
!Ze.call(n, a) && a !== t && Fe(n, a, { get: () => e[a], enumerable: !(r = mr(e, a)) || r.enumerable });
|
|
2112
2118
|
return n;
|
|
2113
|
-
},
|
|
2119
|
+
}, kr = (n, e, t) => (t = n != null ? fr(br(n)) : {}, vr(
|
|
2114
2120
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
2115
2121
|
// file that has been converted to a CommonJS file using a Babel-
|
|
2116
2122
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
2117
2123
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
2118
2124
|
!n || !n.__esModule ? Fe(t, "default", { value: n, enumerable: !0 }) : t,
|
|
2119
2125
|
n
|
|
2120
|
-
)),
|
|
2126
|
+
)), Sr = xr({
|
|
2121
2127
|
"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(n, e) {
|
|
2122
2128
|
var t = (function() {
|
|
2123
2129
|
var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, a = 0, s = {}, i = {
|
|
@@ -2569,22 +2575,22 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2569
2575
|
if (T) {
|
|
2570
2576
|
if (j = l(M, B, p, N), !j || j.index >= p.length)
|
|
2571
2577
|
break;
|
|
2572
|
-
var V = j.index, ee = j.index + j[0].length,
|
|
2573
|
-
for (
|
|
2574
|
-
O = O.next,
|
|
2575
|
-
if (
|
|
2578
|
+
var V = j.index, ee = j.index + j[0].length, K = B;
|
|
2579
|
+
for (K += O.value.length; V >= K; )
|
|
2580
|
+
O = O.next, K += O.value.length;
|
|
2581
|
+
if (K -= O.value.length, B = K, O.value instanceof o)
|
|
2576
2582
|
continue;
|
|
2577
|
-
for (var C = O; C !== g.tail && (
|
|
2578
|
-
D++,
|
|
2579
|
-
D--, P = p.slice(B,
|
|
2583
|
+
for (var C = O; C !== g.tail && (K < ee || typeof C.value == "string"); C = C.next)
|
|
2584
|
+
D++, K += C.value.length;
|
|
2585
|
+
D--, P = p.slice(B, K), j.index -= B;
|
|
2580
2586
|
} else if (j = l(M, 0, P, N), !j)
|
|
2581
2587
|
continue;
|
|
2582
|
-
var V = j.index, Z = j[0], te = P.slice(0, V),
|
|
2588
|
+
var V = j.index, Z = j[0], te = P.slice(0, V), Je = P.slice(V + Z.length), Ne = B + P.length;
|
|
2583
2589
|
v && Ne > v.reach && (v.reach = Ne);
|
|
2584
2590
|
var be = O.prev;
|
|
2585
2591
|
te && (be = u(g, be, te), B += te.length), f(g, be, D);
|
|
2586
|
-
var
|
|
2587
|
-
if (O = u(g, be,
|
|
2592
|
+
var un = new o(k, R ? i.tokenize(Z, R) : Z, H, Z);
|
|
2593
|
+
if (O = u(g, be, un), Je && u(g, O, Je), D > 1) {
|
|
2588
2594
|
var Re = {
|
|
2589
2595
|
cause: k + "," + A,
|
|
2590
2596
|
reach: Ne
|
|
@@ -2618,7 +2624,7 @@ var gr = Object.create, Fe = Object.defineProperty, fr = Object.defineProperties
|
|
|
2618
2624
|
})();
|
|
2619
2625
|
e.exports = t, t.default = t;
|
|
2620
2626
|
}
|
|
2621
|
-
}), y =
|
|
2627
|
+
}), y = kr(Sr());
|
|
2622
2628
|
y.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, y.languages.markup.tag.inside["attr-value"].inside.entity = y.languages.markup.entity, y.languages.markup.doctype.inside["internal-subset"].inside = y.languages.markup, y.hooks.add("wrap", function(n) {
|
|
2623
2629
|
n.type === "entity" && (n.attributes.title = n.content.replace(/&/, "&"));
|
|
2624
2630
|
}), Object.defineProperty(y.languages.markup.tag, "addInlined", { value: function(n, r) {
|
|
@@ -2889,30 +2895,30 @@ y.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
2889
2895
|
return t;
|
|
2890
2896
|
}) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), n.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: n.languages.cpp } } } }), n.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), n.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: n.languages.extend("cpp", {}) } }), n.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, n.languages.cpp["base-clause"]);
|
|
2891
2897
|
})(y), y.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, y.languages.python["string-interpolation"].inside.interpolation.inside.rest = y.languages.python, y.languages.py = y.languages.python, y.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, y.languages.webmanifest = y.languages.json;
|
|
2892
|
-
var
|
|
2893
|
-
|
|
2894
|
-
dracula: () =>
|
|
2895
|
-
duotoneDark: () =>
|
|
2896
|
-
duotoneLight: () =>
|
|
2897
|
-
github: () =>
|
|
2898
|
-
gruvboxMaterialDark: () =>
|
|
2899
|
-
gruvboxMaterialLight: () =>
|
|
2900
|
-
jettwaveDark: () =>
|
|
2901
|
-
jettwaveLight: () =>
|
|
2902
|
-
nightOwl: () =>
|
|
2898
|
+
var Er = {};
|
|
2899
|
+
wr(Er, {
|
|
2900
|
+
dracula: () => Fr,
|
|
2901
|
+
duotoneDark: () => Or,
|
|
2902
|
+
duotoneLight: () => Rr,
|
|
2903
|
+
github: () => Cr,
|
|
2904
|
+
gruvboxMaterialDark: () => oa,
|
|
2905
|
+
gruvboxMaterialLight: () => ca,
|
|
2906
|
+
jettwaveDark: () => Qr,
|
|
2907
|
+
jettwaveLight: () => ta,
|
|
2908
|
+
nightOwl: () => jr,
|
|
2903
2909
|
nightOwlLight: () => Ir,
|
|
2904
|
-
oceanicNext: () =>
|
|
2905
|
-
okaidia: () =>
|
|
2906
|
-
oneDark: () =>
|
|
2907
|
-
oneLight: () =>
|
|
2908
|
-
palenight: () =>
|
|
2909
|
-
shadesOfPurple: () =>
|
|
2910
|
+
oceanicNext: () => _r,
|
|
2911
|
+
okaidia: () => Br,
|
|
2912
|
+
oneDark: () => ra,
|
|
2913
|
+
oneLight: () => sa,
|
|
2914
|
+
palenight: () => Ur,
|
|
2915
|
+
shadesOfPurple: () => Hr,
|
|
2910
2916
|
synthwave84: () => qr,
|
|
2911
|
-
ultramin: () =>
|
|
2912
|
-
vsDark: () =>
|
|
2913
|
-
vsLight: () =>
|
|
2917
|
+
ultramin: () => Wr,
|
|
2918
|
+
vsDark: () => Wt,
|
|
2919
|
+
vsLight: () => Jr
|
|
2914
2920
|
});
|
|
2915
|
-
var
|
|
2921
|
+
var Lr = {
|
|
2916
2922
|
plain: {
|
|
2917
2923
|
color: "#F8F8F2",
|
|
2918
2924
|
backgroundColor: "#282A36"
|
|
@@ -2974,7 +2980,7 @@ var Er = {
|
|
|
2974
2980
|
}
|
|
2975
2981
|
}
|
|
2976
2982
|
]
|
|
2977
|
-
},
|
|
2983
|
+
}, Fr = Lr, Ar = {
|
|
2978
2984
|
plain: {
|
|
2979
2985
|
backgroundColor: "#2a2734",
|
|
2980
2986
|
color: "#9a86fd"
|
|
@@ -3068,7 +3074,7 @@ var Er = {
|
|
|
3068
3074
|
}
|
|
3069
3075
|
}
|
|
3070
3076
|
]
|
|
3071
|
-
},
|
|
3077
|
+
}, Or = Ar, Nr = {
|
|
3072
3078
|
plain: {
|
|
3073
3079
|
backgroundColor: "#faf8f5",
|
|
3074
3080
|
color: "#728fcb"
|
|
@@ -3166,7 +3172,7 @@ var Er = {
|
|
|
3166
3172
|
}
|
|
3167
3173
|
}
|
|
3168
3174
|
]
|
|
3169
|
-
},
|
|
3175
|
+
}, Rr = Nr, Tr = {
|
|
3170
3176
|
plain: {
|
|
3171
3177
|
color: "#393A34",
|
|
3172
3178
|
backgroundColor: "#f6f8fa"
|
|
@@ -3239,7 +3245,7 @@ var Er = {
|
|
|
3239
3245
|
}
|
|
3240
3246
|
}
|
|
3241
3247
|
]
|
|
3242
|
-
},
|
|
3248
|
+
}, Cr = Tr, Pr = {
|
|
3243
3249
|
plain: {
|
|
3244
3250
|
color: "#d6deeb",
|
|
3245
3251
|
backgroundColor: "#011627"
|
|
@@ -3343,7 +3349,7 @@ var Er = {
|
|
|
3343
3349
|
}
|
|
3344
3350
|
}
|
|
3345
3351
|
]
|
|
3346
|
-
},
|
|
3352
|
+
}, jr = Pr, $r = {
|
|
3347
3353
|
plain: {
|
|
3348
3354
|
color: "#403f53",
|
|
3349
3355
|
backgroundColor: "#FBFBFB"
|
|
@@ -3435,7 +3441,7 @@ var Er = {
|
|
|
3435
3441
|
}
|
|
3436
3442
|
}
|
|
3437
3443
|
]
|
|
3438
|
-
}, Ir =
|
|
3444
|
+
}, Ir = $r, z = {
|
|
3439
3445
|
char: "#D8DEE9",
|
|
3440
3446
|
comment: "#999999",
|
|
3441
3447
|
keyword: "#c5a5c5",
|
|
@@ -3446,7 +3452,7 @@ var Er = {
|
|
|
3446
3452
|
tag: "#fc929e",
|
|
3447
3453
|
function: "#79b6f2",
|
|
3448
3454
|
className: "#FAC863"
|
|
3449
|
-
},
|
|
3455
|
+
}, Dr = {
|
|
3450
3456
|
plain: {
|
|
3451
3457
|
backgroundColor: "#282c34",
|
|
3452
3458
|
color: "#ffffff"
|
|
@@ -3569,7 +3575,7 @@ var Er = {
|
|
|
3569
3575
|
}
|
|
3570
3576
|
}
|
|
3571
3577
|
]
|
|
3572
|
-
},
|
|
3578
|
+
}, _r = Dr, Mr = {
|
|
3573
3579
|
plain: {
|
|
3574
3580
|
color: "#f8f8f2",
|
|
3575
3581
|
backgroundColor: "#272822"
|
|
@@ -3684,7 +3690,7 @@ var Er = {
|
|
|
3684
3690
|
}
|
|
3685
3691
|
}
|
|
3686
3692
|
]
|
|
3687
|
-
},
|
|
3693
|
+
}, Br = Mr, zr = {
|
|
3688
3694
|
plain: {
|
|
3689
3695
|
color: "#bfc7d5",
|
|
3690
3696
|
backgroundColor: "#292d3e"
|
|
@@ -3777,7 +3783,7 @@ var Er = {
|
|
|
3777
3783
|
}
|
|
3778
3784
|
}
|
|
3779
3785
|
]
|
|
3780
|
-
},
|
|
3786
|
+
}, Ur = zr, Vr = {
|
|
3781
3787
|
plain: {
|
|
3782
3788
|
color: "#9EFEFF",
|
|
3783
3789
|
backgroundColor: "#2D2A55"
|
|
@@ -3865,7 +3871,7 @@ var Er = {
|
|
|
3865
3871
|
}
|
|
3866
3872
|
}
|
|
3867
3873
|
]
|
|
3868
|
-
},
|
|
3874
|
+
}, Hr = Vr, Kr = {
|
|
3869
3875
|
plain: {
|
|
3870
3876
|
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
3871
3877
|
backgroundImage: "#34294f",
|
|
@@ -3990,7 +3996,7 @@ var Er = {
|
|
|
3990
3996
|
}
|
|
3991
3997
|
}
|
|
3992
3998
|
]
|
|
3993
|
-
}, qr =
|
|
3999
|
+
}, qr = Kr, Zr = {
|
|
3994
4000
|
plain: {
|
|
3995
4001
|
color: "#282a2e",
|
|
3996
4002
|
backgroundColor: "#ffffff"
|
|
@@ -4015,7 +4021,7 @@ var Er = {
|
|
|
4015
4021
|
}
|
|
4016
4022
|
}
|
|
4017
4023
|
]
|
|
4018
|
-
},
|
|
4024
|
+
}, Wr = Zr, Gr = {
|
|
4019
4025
|
plain: {
|
|
4020
4026
|
color: "#9CDCFE",
|
|
4021
4027
|
backgroundColor: "#1E1E1E"
|
|
@@ -4117,7 +4123,7 @@ var Er = {
|
|
|
4117
4123
|
}
|
|
4118
4124
|
}
|
|
4119
4125
|
]
|
|
4120
|
-
},
|
|
4126
|
+
}, Wt = Gr, Yr = {
|
|
4121
4127
|
plain: {
|
|
4122
4128
|
color: "#000000",
|
|
4123
4129
|
backgroundColor: "#ffffff"
|
|
@@ -4190,7 +4196,7 @@ var Er = {
|
|
|
4190
4196
|
}
|
|
4191
4197
|
}
|
|
4192
4198
|
]
|
|
4193
|
-
},
|
|
4199
|
+
}, Jr = Yr, Xr = {
|
|
4194
4200
|
plain: {
|
|
4195
4201
|
color: "#f8fafc",
|
|
4196
4202
|
backgroundColor: "#011627"
|
|
@@ -4289,7 +4295,7 @@ var Er = {
|
|
|
4289
4295
|
}
|
|
4290
4296
|
}
|
|
4291
4297
|
]
|
|
4292
|
-
},
|
|
4298
|
+
}, Qr = Xr, ea = {
|
|
4293
4299
|
plain: {
|
|
4294
4300
|
color: "#0f172a",
|
|
4295
4301
|
backgroundColor: "#f1f5f9"
|
|
@@ -4388,7 +4394,7 @@ var Er = {
|
|
|
4388
4394
|
}
|
|
4389
4395
|
}
|
|
4390
4396
|
]
|
|
4391
|
-
},
|
|
4397
|
+
}, ta = ea, na = {
|
|
4392
4398
|
plain: {
|
|
4393
4399
|
backgroundColor: "hsl(220, 13%, 18%)",
|
|
4394
4400
|
color: "hsl(220, 14%, 71%)",
|
|
@@ -4486,7 +4492,7 @@ var Er = {
|
|
|
4486
4492
|
}
|
|
4487
4493
|
}
|
|
4488
4494
|
]
|
|
4489
|
-
},
|
|
4495
|
+
}, ra = na, aa = {
|
|
4490
4496
|
plain: {
|
|
4491
4497
|
backgroundColor: "hsl(230, 1%, 98%)",
|
|
4492
4498
|
color: "hsl(230, 8%, 24%)"
|
|
@@ -4587,7 +4593,7 @@ var Er = {
|
|
|
4587
4593
|
}
|
|
4588
4594
|
}
|
|
4589
4595
|
]
|
|
4590
|
-
},
|
|
4596
|
+
}, sa = aa, ia = {
|
|
4591
4597
|
plain: {
|
|
4592
4598
|
color: "#ebdbb2",
|
|
4593
4599
|
backgroundColor: "#292828"
|
|
@@ -4660,7 +4666,7 @@ var Er = {
|
|
|
4660
4666
|
}
|
|
4661
4667
|
}
|
|
4662
4668
|
]
|
|
4663
|
-
},
|
|
4669
|
+
}, oa = ia, la = {
|
|
4664
4670
|
plain: {
|
|
4665
4671
|
color: "#654735",
|
|
4666
4672
|
backgroundColor: "#f9f5d7"
|
|
@@ -4732,17 +4738,17 @@ var Er = {
|
|
|
4732
4738
|
}
|
|
4733
4739
|
}
|
|
4734
4740
|
]
|
|
4735
|
-
},
|
|
4741
|
+
}, ca = la, ua = (n) => q(
|
|
4736
4742
|
(e) => {
|
|
4737
|
-
var t = e, { className: r, style: a } = t, s =
|
|
4743
|
+
var t = e, { className: r, style: a } = t, s = Zt(t, ["className", "style", "line"]);
|
|
4738
4744
|
const i = Ae(G({}, s), {
|
|
4739
4745
|
className: qe("token-line", r)
|
|
4740
4746
|
});
|
|
4741
4747
|
return typeof n == "object" && "plain" in n && (i.style = n.plain), typeof a == "object" && (i.style = G(G({}, i.style || {}), a)), i;
|
|
4742
4748
|
},
|
|
4743
4749
|
[n]
|
|
4744
|
-
),
|
|
4745
|
-
const e =
|
|
4750
|
+
), da = (n) => {
|
|
4751
|
+
const e = q(
|
|
4746
4752
|
({ types: t, empty: r }) => {
|
|
4747
4753
|
if (n != null) {
|
|
4748
4754
|
{
|
|
@@ -4759,9 +4765,9 @@ var Er = {
|
|
|
4759
4765
|
},
|
|
4760
4766
|
[n]
|
|
4761
4767
|
);
|
|
4762
|
-
return
|
|
4768
|
+
return q(
|
|
4763
4769
|
(t) => {
|
|
4764
|
-
var r = t, { token: a, className: s, style: i } = r, o =
|
|
4770
|
+
var r = t, { token: a, className: s, style: i } = r, o = Zt(r, ["token", "className", "style"]);
|
|
4765
4771
|
const l = Ae(G({}, o), {
|
|
4766
4772
|
className: qe("token", ...a.types, s),
|
|
4767
4773
|
children: a.content,
|
|
@@ -4771,7 +4777,7 @@ var Er = {
|
|
|
4771
4777
|
},
|
|
4772
4778
|
[e]
|
|
4773
4779
|
);
|
|
4774
|
-
},
|
|
4780
|
+
}, pa = /\r\n|\r|\n/, kt = (n) => {
|
|
4775
4781
|
n.length === 0 ? n.push({
|
|
4776
4782
|
types: ["plain"],
|
|
4777
4783
|
content: `
|
|
@@ -4779,10 +4785,10 @@ var Er = {
|
|
|
4779
4785
|
empty: !0
|
|
4780
4786
|
}) : n.length === 1 && n[0].content === "" && (n[0].content = `
|
|
4781
4787
|
`, n[0].empty = !0);
|
|
4782
|
-
},
|
|
4788
|
+
}, St = (n, e) => {
|
|
4783
4789
|
const t = n.length;
|
|
4784
4790
|
return t > 0 && n[t - 1] === e ? n : n.concat(e);
|
|
4785
|
-
},
|
|
4791
|
+
}, ga = (n) => {
|
|
4786
4792
|
const e = [[]], t = [n], r = [0], a = [n.length];
|
|
4787
4793
|
let s = 0, i = 0, o = [];
|
|
4788
4794
|
const l = [o];
|
|
@@ -4790,41 +4796,41 @@ var Er = {
|
|
|
4790
4796
|
for (; (s = r[i]++) < a[i]; ) {
|
|
4791
4797
|
let c, d = e[i];
|
|
4792
4798
|
const u = t[i][s];
|
|
4793
|
-
if (typeof u == "string" ? (d = i > 0 ? d : ["plain"], c = u) : (d =
|
|
4799
|
+
if (typeof u == "string" ? (d = i > 0 ? d : ["plain"], c = u) : (d = St(d, u.type), u.alias && (d = St(d, u.alias)), c = u.content), typeof c != "string") {
|
|
4794
4800
|
i++, e.push(d), t.push(c), r.push(0), a.push(c.length);
|
|
4795
4801
|
continue;
|
|
4796
4802
|
}
|
|
4797
|
-
const f = c.split(
|
|
4803
|
+
const f = c.split(pa), m = f.length;
|
|
4798
4804
|
o.push({
|
|
4799
4805
|
types: d,
|
|
4800
4806
|
content: f[0]
|
|
4801
4807
|
});
|
|
4802
4808
|
for (let p = 1; p < m; p++)
|
|
4803
|
-
|
|
4809
|
+
kt(o), l.push(o = []), o.push({
|
|
4804
4810
|
types: d,
|
|
4805
4811
|
content: f[p]
|
|
4806
4812
|
});
|
|
4807
4813
|
}
|
|
4808
4814
|
i--, e.pop(), t.pop(), r.pop(), a.pop();
|
|
4809
4815
|
}
|
|
4810
|
-
return
|
|
4811
|
-
},
|
|
4816
|
+
return kt(o), l;
|
|
4817
|
+
}, Et = ga, fa = ({ prism: n, code: e, grammar: t, language: r }) => de(() => {
|
|
4812
4818
|
if (t == null)
|
|
4813
|
-
return
|
|
4819
|
+
return Et([e]);
|
|
4814
4820
|
const a = {
|
|
4815
4821
|
code: e,
|
|
4816
4822
|
grammar: t,
|
|
4817
4823
|
language: r,
|
|
4818
4824
|
tokens: []
|
|
4819
4825
|
};
|
|
4820
|
-
return n.hooks.run("before-tokenize", a), a.tokens = n.tokenize(e, t), n.hooks.run("after-tokenize", a),
|
|
4826
|
+
return n.hooks.run("before-tokenize", a), a.tokens = n.tokenize(e, t), n.hooks.run("after-tokenize", a), Et(a.tokens);
|
|
4821
4827
|
}, [
|
|
4822
4828
|
e,
|
|
4823
4829
|
t,
|
|
4824
4830
|
r,
|
|
4825
4831
|
// prism is a stable import
|
|
4826
4832
|
n
|
|
4827
|
-
]),
|
|
4833
|
+
]), ha = (n, e) => {
|
|
4828
4834
|
const { plain: t } = n, r = n.styles.reduce((a, s) => {
|
|
4829
4835
|
const { languages: i, style: o } = s;
|
|
4830
4836
|
return i && !i.includes(e) || s.types.forEach((l) => {
|
|
@@ -4833,14 +4839,14 @@ var Er = {
|
|
|
4833
4839
|
}), a;
|
|
4834
4840
|
}, {});
|
|
4835
4841
|
return r.root = t, r.plain = Ae(G({}, t), { backgroundColor: void 0 }), r;
|
|
4836
|
-
},
|
|
4842
|
+
}, ma = ha, ya = ({
|
|
4837
4843
|
children: n,
|
|
4838
4844
|
language: e,
|
|
4839
4845
|
code: t,
|
|
4840
4846
|
theme: r,
|
|
4841
4847
|
prism: a
|
|
4842
4848
|
}) => {
|
|
4843
|
-
const s = e.toLowerCase(), i =
|
|
4849
|
+
const s = e.toLowerCase(), i = ma(r, s), o = ua(i), l = da(i), c = a.languages[s], d = fa({ prism: a, language: s, code: t, grammar: c });
|
|
4844
4850
|
return n({
|
|
4845
4851
|
tokens: d,
|
|
4846
4852
|
className: `prism-code language-${s}`,
|
|
@@ -4848,9 +4854,9 @@ var Er = {
|
|
|
4848
4854
|
getLineProps: o,
|
|
4849
4855
|
getTokenProps: l
|
|
4850
4856
|
});
|
|
4851
|
-
},
|
|
4857
|
+
}, ba = (n) => we(ya, Ae(G({}, n), {
|
|
4852
4858
|
prism: n.prism || y,
|
|
4853
|
-
theme: n.theme ||
|
|
4859
|
+
theme: n.theme || Wt,
|
|
4854
4860
|
code: n.code,
|
|
4855
4861
|
language: n.language
|
|
4856
4862
|
}));
|
|
@@ -4866,48 +4872,48 @@ prismjs/prism.js:
|
|
|
4866
4872
|
* @public
|
|
4867
4873
|
*)
|
|
4868
4874
|
*/
|
|
4869
|
-
const
|
|
4875
|
+
const xa = (n, e) => e.some((t) => {
|
|
4870
4876
|
if (typeof t == "number")
|
|
4871
4877
|
return n === t;
|
|
4872
4878
|
const [r, a] = t.split(":").map((s) => parseInt(s));
|
|
4873
4879
|
return r <= n && n <= a;
|
|
4874
|
-
}),
|
|
4875
|
-
const t =
|
|
4880
|
+
}), wa = (n, e, t) => t.some(([r, [a, s]]) => r === n && a <= e && e <= s), va = (n, e) => n.split(new RegExp(`(${e.map(([t]) => t).join("|")})`)).filter(Boolean), Gt = (n, e) => () => {
|
|
4881
|
+
const t = He(n);
|
|
4876
4882
|
if (t === void 0)
|
|
4877
4883
|
throw new Error(e);
|
|
4878
4884
|
return t;
|
|
4879
|
-
}, Oe = (n) => Object.assign(
|
|
4885
|
+
}, Oe = (n) => Object.assign(dn(n), {
|
|
4880
4886
|
displayName: n.displayName ?? n.name
|
|
4881
|
-
}),
|
|
4882
|
-
const { lines: a, words: s, ...i } =
|
|
4883
|
-
return
|
|
4884
|
-
const u = d + 1, f =
|
|
4885
|
-
return
|
|
4887
|
+
}), ka = ye(void 0), Yt = ye(void 0), Jt = Gt(ka, 'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'), We = Gt(Yt, 'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'), Sa = ({ as: n, children: e, ...t }, r) => {
|
|
4888
|
+
const { lines: a, words: s, ...i } = Jt(), o = n ?? "pre";
|
|
4889
|
+
return I.jsx(ba, { ...i, children: (l) => I.jsx(o, { ...t, ref: r, children: l.tokens.map((c, d) => {
|
|
4890
|
+
const u = d + 1, f = xa(u, a);
|
|
4891
|
+
return I.jsx(Yt.Provider, { value: { highlight: l, line: c, lineNumber: u }, children: typeof e == "function" ? e({ isLineHighlighted: f, lineNumber: u }, d) : e }, d);
|
|
4886
4892
|
}) }) });
|
|
4887
|
-
},
|
|
4888
|
-
const { highlight: s, line: i } =
|
|
4889
|
-
return
|
|
4890
|
-
},
|
|
4891
|
-
const { words: s } =
|
|
4892
|
-
return
|
|
4893
|
+
}, Ea = ({ as: n, children: e, className: t, ...r }, a) => {
|
|
4894
|
+
const { highlight: s, line: i } = We(), { getLineProps: o } = s, l = n ?? "div";
|
|
4895
|
+
return I.jsx(l, { ...o({ line: i, className: t }), ...r, ref: a, children: e });
|
|
4896
|
+
}, La = ({ as: n, children: e = ({ children: s }) => I.jsx("span", { children: s }), className: t, ...r }, a) => {
|
|
4897
|
+
const { words: s } = Jt(), { line: i, highlight: o, lineNumber: l } = We(), { getTokenProps: c } = o, d = n ?? "span";
|
|
4898
|
+
return I.jsx(fe.Fragment, { children: i.map((u, f) => {
|
|
4893
4899
|
const { children: m, ...p } = c({
|
|
4894
4900
|
token: u,
|
|
4895
4901
|
className: t
|
|
4896
|
-
}), g = s.length ?
|
|
4897
|
-
return
|
|
4902
|
+
}), g = s.length ? va(m, s) : [m];
|
|
4903
|
+
return I.jsx(fe.Fragment, { children: g.map((h, w) => I.jsx(d, { ...p, ...r, ref: a, children: e({
|
|
4898
4904
|
children: h,
|
|
4899
|
-
isTokenHighlighted:
|
|
4905
|
+
isTokenHighlighted: wa(h, l, s)
|
|
4900
4906
|
}) }, w)) }, f);
|
|
4901
4907
|
}) });
|
|
4902
|
-
},
|
|
4903
|
-
const { lineNumber: r } =
|
|
4904
|
-
return
|
|
4908
|
+
}, Fa = ({ as: n, ...e }, t) => {
|
|
4909
|
+
const { lineNumber: r } = We(), a = n ?? "span";
|
|
4910
|
+
return I.jsx(a, { ...e, ref: t, children: r });
|
|
4905
4911
|
};
|
|
4906
|
-
Oe(ka);
|
|
4907
4912
|
Oe(Sa);
|
|
4908
4913
|
Oe(Ea);
|
|
4909
4914
|
Oe(La);
|
|
4910
|
-
|
|
4915
|
+
Oe(Fa);
|
|
4916
|
+
const Xt = {
|
|
4911
4917
|
Di1: "text-[72px] font-bold leading-[90px] -tracking-2,5",
|
|
4912
4918
|
Di2: "text-[60px] font-bold leading-[72px] -tracking-2,0",
|
|
4913
4919
|
Di3: "text-[48px] font-bold leading-[60px] -tracking-1,5",
|
|
@@ -4927,9 +4933,9 @@ const Jt = {
|
|
|
4927
4933
|
D1: "text-[12px] leading-[16px]",
|
|
4928
4934
|
M: "text-[10px] leading-[16px]"
|
|
4929
4935
|
}, X = ({ children: n, className: e, variant: t = "B1", significance: r = "primary", as: a }) => {
|
|
4930
|
-
const s = a ??
|
|
4931
|
-
return /* @__PURE__ */
|
|
4932
|
-
},
|
|
4936
|
+
const s = a ?? Aa[t], i = Xt[t];
|
|
4937
|
+
return /* @__PURE__ */ I.jsx(s, { className: _("font-sans", Oa[r], e, i), children: n });
|
|
4938
|
+
}, Aa = {
|
|
4933
4939
|
Di1: "h1",
|
|
4934
4940
|
Di2: "h2",
|
|
4935
4941
|
Di3: "h3",
|
|
@@ -4948,7 +4954,7 @@ const Jt = {
|
|
|
4948
4954
|
D1B: "p",
|
|
4949
4955
|
D1: "p",
|
|
4950
4956
|
M: "p"
|
|
4951
|
-
},
|
|
4957
|
+
}, Oa = {
|
|
4952
4958
|
primary: "text-label-primary-light dark:text-label-primary-dark",
|
|
4953
4959
|
secondary: "text-label-secondary-light dark:text-label-secondary-dark",
|
|
4954
4960
|
tertiary: "text-label-tertiary-light dark:text-label-tertiary-dark",
|
|
@@ -4956,7 +4962,7 @@ const Jt = {
|
|
|
4956
4962
|
placeholder: "text-label-placeholder-light dark:text-label-placeholder-dark",
|
|
4957
4963
|
"nonadaptable-text": "text-nonadaptable-text-light dark:text-nonadaptable-text-dark",
|
|
4958
4964
|
disabled: "text-primary-action-disabled-light dark:text-primary-action-disabled-dark"
|
|
4959
|
-
},
|
|
4965
|
+
}, Qt = ({
|
|
4960
4966
|
title: n,
|
|
4961
4967
|
icon: e,
|
|
4962
4968
|
description: t,
|
|
@@ -4969,7 +4975,7 @@ const Jt = {
|
|
|
4969
4975
|
hasPreviousStep: c,
|
|
4970
4976
|
hasNextStep: d
|
|
4971
4977
|
}) => {
|
|
4972
|
-
const { t: u } =
|
|
4978
|
+
const { t: u } = Ke();
|
|
4973
4979
|
return /* @__PURE__ */ S.jsxs(
|
|
4974
4980
|
"div",
|
|
4975
4981
|
{
|
|
@@ -5006,7 +5012,7 @@ const Jt = {
|
|
|
5006
5012
|
{
|
|
5007
5013
|
variant: "subtle",
|
|
5008
5014
|
onClick: s,
|
|
5009
|
-
iconBefore: /* @__PURE__ */ S.jsx(
|
|
5015
|
+
iconBefore: /* @__PURE__ */ S.jsx(zt, {}),
|
|
5010
5016
|
disabled: !s,
|
|
5011
5017
|
text: u("Previous")
|
|
5012
5018
|
}
|
|
@@ -5016,7 +5022,7 @@ const Jt = {
|
|
|
5016
5022
|
{
|
|
5017
5023
|
variant: "subtle",
|
|
5018
5024
|
onClick: i,
|
|
5019
|
-
iconAfter: /* @__PURE__ */ S.jsx(
|
|
5025
|
+
iconAfter: /* @__PURE__ */ S.jsx(Ut, {}),
|
|
5020
5026
|
disabled: !i || !l,
|
|
5021
5027
|
text: u(d ? "Next" : "Submit")
|
|
5022
5028
|
}
|
|
@@ -5038,7 +5044,7 @@ const Jt = {
|
|
|
5038
5044
|
]
|
|
5039
5045
|
}
|
|
5040
5046
|
);
|
|
5041
|
-
},
|
|
5047
|
+
}, Na = ({
|
|
5042
5048
|
title: n,
|
|
5043
5049
|
icon: e,
|
|
5044
5050
|
description: t,
|
|
@@ -5055,7 +5061,7 @@ const Jt = {
|
|
|
5055
5061
|
hasPreviousStep: m,
|
|
5056
5062
|
hasNextStep: p
|
|
5057
5063
|
}) => /* @__PURE__ */ S.jsx(
|
|
5058
|
-
|
|
5064
|
+
Qt,
|
|
5059
5065
|
{
|
|
5060
5066
|
title: n,
|
|
5061
5067
|
icon: e,
|
|
@@ -5081,7 +5087,7 @@ const Jt = {
|
|
|
5081
5087
|
className: "flex md:flex-row-reverse items-center gap-2 p-3 justify-end rounded-lg border text-label-primary-light dark:text-label-primary-dark border-separator-regular-light dark:border-separator-regular-dark",
|
|
5082
5088
|
children: [
|
|
5083
5089
|
/* @__PURE__ */ S.jsx(X, { variant: "B1Button", children: g.text }),
|
|
5084
|
-
/* @__PURE__ */ S.jsx(
|
|
5090
|
+
/* @__PURE__ */ S.jsx(Ra, { size: 20, selected: c.includes(g.id) })
|
|
5085
5091
|
]
|
|
5086
5092
|
}
|
|
5087
5093
|
) }, g.id))
|
|
@@ -5099,7 +5105,7 @@ const Jt = {
|
|
|
5099
5105
|
onClick: () => l(g.id),
|
|
5100
5106
|
className: _(
|
|
5101
5107
|
"flex items-center gap-2 p-3 justify-end rounded-lg border shrink",
|
|
5102
|
-
c.includes(g.id) ? "text-label-quaternary-light dark:text-label-quaternary-dark border-label-quaternary-light dark:border-label-quaternary-dark bg-secondary-action-
|
|
5108
|
+
c.includes(g.id) ? "text-label-quaternary-light dark:text-label-quaternary-dark border-label-quaternary-light dark:border-label-quaternary-dark bg-secondary-action-button-light dark:bg-secondary-action-button-dark" : "text-label-primary-light dark:text-label-primary-dark border-separator-regular-light dark:border-separator-regular-dark"
|
|
5103
5109
|
),
|
|
5104
5110
|
children: /* @__PURE__ */ S.jsx(
|
|
5105
5111
|
X,
|
|
@@ -5114,7 +5120,7 @@ const Jt = {
|
|
|
5114
5120
|
}
|
|
5115
5121
|
) })
|
|
5116
5122
|
}
|
|
5117
|
-
),
|
|
5123
|
+
), Ra = ({ size: n = 16, strokeColor: e = "currentColor", fillColor: t = "none", selected: r = !1 }) => {
|
|
5118
5124
|
const a = n + 1, s = a / 2, i = (n - 2) / 2;
|
|
5119
5125
|
return /* @__PURE__ */ S.jsxs(
|
|
5120
5126
|
"svg",
|
|
@@ -5150,7 +5156,7 @@ const Jt = {
|
|
|
5150
5156
|
]
|
|
5151
5157
|
}
|
|
5152
5158
|
);
|
|
5153
|
-
},
|
|
5159
|
+
}, Ta = ({
|
|
5154
5160
|
title: n,
|
|
5155
5161
|
icon: e,
|
|
5156
5162
|
description: t,
|
|
@@ -5165,9 +5171,9 @@ const Jt = {
|
|
|
5165
5171
|
hasPreviousStep: u,
|
|
5166
5172
|
hasNextStep: f
|
|
5167
5173
|
}) => {
|
|
5168
|
-
const { t: m } =
|
|
5174
|
+
const { t: m } = Ke();
|
|
5169
5175
|
return /* @__PURE__ */ S.jsx(
|
|
5170
|
-
|
|
5176
|
+
Qt,
|
|
5171
5177
|
{
|
|
5172
5178
|
title: n,
|
|
5173
5179
|
icon: e,
|
|
@@ -5205,7 +5211,7 @@ const Jt = {
|
|
|
5205
5211
|
"overflow-hidden break-words outline-hidden resize-none material-medium",
|
|
5206
5212
|
"rounded-lg py-3 px-4 min-h-20 border border-separator-opaque-light dark:border-separator-opaque-dark",
|
|
5207
5213
|
"text-label-primary-light dark:text-label-primary-dark",
|
|
5208
|
-
|
|
5214
|
+
Xt.B1
|
|
5209
5215
|
),
|
|
5210
5216
|
value: o,
|
|
5211
5217
|
onChange: (p) => l(p.target.value)
|
|
@@ -5215,7 +5221,7 @@ const Jt = {
|
|
|
5215
5221
|
] })
|
|
5216
5222
|
}
|
|
5217
5223
|
);
|
|
5218
|
-
},
|
|
5224
|
+
}, en = ({ title: n, icon: e, description: t, image: r, children: a, wrapperClassName: s }) => /* @__PURE__ */ S.jsxs(
|
|
5219
5225
|
"div",
|
|
5220
5226
|
{
|
|
5221
5227
|
className: _(
|
|
@@ -5244,13 +5250,13 @@ const Jt = {
|
|
|
5244
5250
|
r && /* @__PURE__ */ S.jsx("div", { className: "flex flex-col justify-center order-1 md:order-2", children: /* @__PURE__ */ S.jsx("div", { className: "rounded-lg overflow-hidden mb-6 md:mb-0", children: /* @__PURE__ */ S.jsx("img", { className: "w-full h-full object-cover aspect-video md:aspect-square", src: r, alt: "image" }) }) })
|
|
5245
5251
|
]
|
|
5246
5252
|
}
|
|
5247
|
-
),
|
|
5253
|
+
), Ca = ({ title: n, icon: e, description: t, image: r, quitText: a, onQuit: s, externalLink: i }) => /* @__PURE__ */ S.jsxs(en, { title: n, icon: e, description: t, image: r, children: [
|
|
5248
5254
|
/* @__PURE__ */ S.jsx("div", { className: "flex justify-end gap-2", children: i ? /* @__PURE__ */ S.jsx(
|
|
5249
5255
|
J,
|
|
5250
5256
|
{
|
|
5251
5257
|
variant: "secondary",
|
|
5252
5258
|
text: a,
|
|
5253
|
-
iconAfter: /* @__PURE__ */ S.jsx(
|
|
5259
|
+
iconAfter: /* @__PURE__ */ S.jsx(Bt, {}),
|
|
5254
5260
|
onClick: () => {
|
|
5255
5261
|
window.open(i, "_blank"), s();
|
|
5256
5262
|
}
|
|
@@ -5267,7 +5273,7 @@ const Jt = {
|
|
|
5267
5273
|
"aria-label": "quit"
|
|
5268
5274
|
}
|
|
5269
5275
|
)
|
|
5270
|
-
] }),
|
|
5276
|
+
] }), Pa = ({
|
|
5271
5277
|
title: n,
|
|
5272
5278
|
icon: e,
|
|
5273
5279
|
description: t,
|
|
@@ -5276,7 +5282,7 @@ const Jt = {
|
|
|
5276
5282
|
onQuit: s,
|
|
5277
5283
|
startText: i,
|
|
5278
5284
|
onStart: o
|
|
5279
|
-
}) => /* @__PURE__ */ S.jsxs(
|
|
5285
|
+
}) => /* @__PURE__ */ S.jsxs(en, { title: n, icon: e, description: t, image: r, wrapperClassName: "relative", children: [
|
|
5280
5286
|
/* @__PURE__ */ S.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
5281
5287
|
s && a && /* @__PURE__ */ S.jsx(J, { variant: "subtle", text: a, onClick: s }),
|
|
5282
5288
|
/* @__PURE__ */ S.jsx(J, { variant: "secondary", text: i, onClick: o })
|
|
@@ -5293,12 +5299,12 @@ const Jt = {
|
|
|
5293
5299
|
}
|
|
5294
5300
|
)
|
|
5295
5301
|
] });
|
|
5296
|
-
let
|
|
5297
|
-
function
|
|
5298
|
-
return
|
|
5302
|
+
let tn = {};
|
|
5303
|
+
function ja() {
|
|
5304
|
+
return tn;
|
|
5299
5305
|
}
|
|
5300
|
-
function
|
|
5301
|
-
|
|
5306
|
+
function $a(n) {
|
|
5307
|
+
tn = n;
|
|
5302
5308
|
}
|
|
5303
5309
|
const Ia = {
|
|
5304
5310
|
lessThanXSeconds: {
|
|
@@ -5362,7 +5368,7 @@ const Ia = {
|
|
|
5362
5368
|
one: "almost 1 year",
|
|
5363
5369
|
other: "almost {{count}} years"
|
|
5364
5370
|
}
|
|
5365
|
-
},
|
|
5371
|
+
}, Da = (n, e, t) => {
|
|
5366
5372
|
let r;
|
|
5367
5373
|
const a = Ia[n];
|
|
5368
5374
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
@@ -5373,14 +5379,14 @@ function De(n) {
|
|
|
5373
5379
|
return n.formats[t] || n.formats[n.defaultWidth];
|
|
5374
5380
|
};
|
|
5375
5381
|
}
|
|
5376
|
-
const
|
|
5382
|
+
const _a = {
|
|
5377
5383
|
lastWeek: "'last' eeee 'at' p",
|
|
5378
5384
|
yesterday: "'yesterday at' p",
|
|
5379
5385
|
today: "'today at' p",
|
|
5380
5386
|
tomorrow: "'tomorrow at' p",
|
|
5381
5387
|
nextWeek: "eeee 'at' p",
|
|
5382
5388
|
other: "P"
|
|
5383
|
-
},
|
|
5389
|
+
}, Ma = (n, e, t, r) => _a[n];
|
|
5384
5390
|
function ce(n) {
|
|
5385
5391
|
return (e, t) => {
|
|
5386
5392
|
const r = t?.context ? String(t.context) : "standalone";
|
|
@@ -5396,15 +5402,15 @@ function ce(n) {
|
|
|
5396
5402
|
return a[s];
|
|
5397
5403
|
};
|
|
5398
5404
|
}
|
|
5399
|
-
const
|
|
5405
|
+
const Ba = {
|
|
5400
5406
|
narrow: ["B", "A"],
|
|
5401
5407
|
abbreviated: ["BC", "AD"],
|
|
5402
5408
|
wide: ["Before Christ", "Anno Domini"]
|
|
5403
|
-
},
|
|
5409
|
+
}, za = {
|
|
5404
5410
|
narrow: ["1", "2", "3", "4"],
|
|
5405
5411
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
5406
5412
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
5407
|
-
},
|
|
5413
|
+
}, Ua = {
|
|
5408
5414
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
5409
5415
|
abbreviated: [
|
|
5410
5416
|
"Jan",
|
|
@@ -5434,7 +5440,7 @@ const Ma = {
|
|
|
5434
5440
|
"November",
|
|
5435
5441
|
"December"
|
|
5436
5442
|
]
|
|
5437
|
-
},
|
|
5443
|
+
}, Va = {
|
|
5438
5444
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
5439
5445
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
5440
5446
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -5447,7 +5453,7 @@ const Ma = {
|
|
|
5447
5453
|
"Friday",
|
|
5448
5454
|
"Saturday"
|
|
5449
5455
|
]
|
|
5450
|
-
},
|
|
5456
|
+
}, Ha = {
|
|
5451
5457
|
narrow: {
|
|
5452
5458
|
am: "a",
|
|
5453
5459
|
pm: "p",
|
|
@@ -5478,7 +5484,7 @@ const Ma = {
|
|
|
5478
5484
|
evening: "evening",
|
|
5479
5485
|
night: "night"
|
|
5480
5486
|
}
|
|
5481
|
-
},
|
|
5487
|
+
}, Ka = {
|
|
5482
5488
|
narrow: {
|
|
5483
5489
|
am: "a",
|
|
5484
5490
|
pm: "p",
|
|
@@ -5521,29 +5527,29 @@ const Ma = {
|
|
|
5521
5527
|
return t + "rd";
|
|
5522
5528
|
}
|
|
5523
5529
|
return t + "th";
|
|
5524
|
-
},
|
|
5530
|
+
}, Za = {
|
|
5525
5531
|
ordinalNumber: qa,
|
|
5526
5532
|
era: ce({
|
|
5527
|
-
values:
|
|
5533
|
+
values: Ba,
|
|
5528
5534
|
defaultWidth: "wide"
|
|
5529
5535
|
}),
|
|
5530
5536
|
quarter: ce({
|
|
5531
|
-
values:
|
|
5537
|
+
values: za,
|
|
5532
5538
|
defaultWidth: "wide",
|
|
5533
5539
|
argumentCallback: (n) => n - 1
|
|
5534
5540
|
}),
|
|
5535
5541
|
month: ce({
|
|
5536
|
-
values:
|
|
5542
|
+
values: Ua,
|
|
5537
5543
|
defaultWidth: "wide"
|
|
5538
5544
|
}),
|
|
5539
5545
|
day: ce({
|
|
5540
|
-
values:
|
|
5546
|
+
values: Va,
|
|
5541
5547
|
defaultWidth: "wide"
|
|
5542
5548
|
}),
|
|
5543
5549
|
dayPeriod: ce({
|
|
5544
|
-
values:
|
|
5550
|
+
values: Ha,
|
|
5545
5551
|
defaultWidth: "wide",
|
|
5546
|
-
formattingValues:
|
|
5552
|
+
formattingValues: Ka,
|
|
5547
5553
|
defaultFormattingWidth: "wide"
|
|
5548
5554
|
})
|
|
5549
5555
|
};
|
|
@@ -5552,9 +5558,9 @@ function ue(n) {
|
|
|
5552
5558
|
const r = t.width, a = r && n.matchPatterns[r] || n.matchPatterns[n.defaultMatchWidth], s = e.match(a);
|
|
5553
5559
|
if (!s)
|
|
5554
5560
|
return null;
|
|
5555
|
-
const i = s[0], o = r && n.parsePatterns[r] || n.parsePatterns[n.defaultParseWidth], l = Array.isArray(o) ?
|
|
5561
|
+
const i = s[0], o = r && n.parsePatterns[r] || n.parsePatterns[n.defaultParseWidth], l = Array.isArray(o) ? Ga(o, (u) => u.test(i)) : (
|
|
5556
5562
|
// [TODO] -- I challenge you to fix the type
|
|
5557
|
-
|
|
5563
|
+
Wa(o, (u) => u.test(i))
|
|
5558
5564
|
);
|
|
5559
5565
|
let c;
|
|
5560
5566
|
c = n.valueCallback ? n.valueCallback(l) : l, c = t.valueCallback ? (
|
|
@@ -5565,17 +5571,17 @@ function ue(n) {
|
|
|
5565
5571
|
return { value: c, rest: d };
|
|
5566
5572
|
};
|
|
5567
5573
|
}
|
|
5568
|
-
function
|
|
5574
|
+
function Wa(n, e) {
|
|
5569
5575
|
for (const t in n)
|
|
5570
5576
|
if (Object.prototype.hasOwnProperty.call(n, t) && e(n[t]))
|
|
5571
5577
|
return t;
|
|
5572
5578
|
}
|
|
5573
|
-
function
|
|
5579
|
+
function Ga(n, e) {
|
|
5574
5580
|
for (let t = 0; t < n.length; t++)
|
|
5575
5581
|
if (e(n[t]))
|
|
5576
5582
|
return t;
|
|
5577
5583
|
}
|
|
5578
|
-
function
|
|
5584
|
+
function Ya(n) {
|
|
5579
5585
|
return (e, t = {}) => {
|
|
5580
5586
|
const r = e.match(n.matchPattern);
|
|
5581
5587
|
if (!r) return null;
|
|
@@ -5587,23 +5593,23 @@ function Ga(n) {
|
|
|
5587
5593
|
return { value: i, rest: o };
|
|
5588
5594
|
};
|
|
5589
5595
|
}
|
|
5590
|
-
const
|
|
5596
|
+
const Ja = /^(\d+)(th|st|nd|rd)?/i, Xa = /\d+/i, Qa = {
|
|
5591
5597
|
narrow: /^(b|a)/i,
|
|
5592
5598
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
5593
5599
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
5594
|
-
}, Qa = {
|
|
5595
|
-
any: [/^b/i, /^(a|c)/i]
|
|
5596
5600
|
}, es = {
|
|
5601
|
+
any: [/^b/i, /^(a|c)/i]
|
|
5602
|
+
}, ts = {
|
|
5597
5603
|
narrow: /^[1234]/i,
|
|
5598
5604
|
abbreviated: /^q[1234]/i,
|
|
5599
5605
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5600
|
-
}, ts = {
|
|
5601
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5602
5606
|
}, ns = {
|
|
5607
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5608
|
+
}, rs = {
|
|
5603
5609
|
narrow: /^[jfmasond]/i,
|
|
5604
5610
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5605
5611
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5606
|
-
},
|
|
5612
|
+
}, as = {
|
|
5607
5613
|
narrow: [
|
|
5608
5614
|
/^j/i,
|
|
5609
5615
|
/^f/i,
|
|
@@ -5632,18 +5638,18 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Ja = /\d+/i, Xa = {
|
|
|
5632
5638
|
/^n/i,
|
|
5633
5639
|
/^d/i
|
|
5634
5640
|
]
|
|
5635
|
-
},
|
|
5641
|
+
}, ss = {
|
|
5636
5642
|
narrow: /^[smtwf]/i,
|
|
5637
5643
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
5638
5644
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
5639
5645
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
5640
|
-
},
|
|
5646
|
+
}, is = {
|
|
5641
5647
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
5642
5648
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
5643
|
-
},
|
|
5649
|
+
}, os = {
|
|
5644
5650
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
5645
5651
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
5646
|
-
},
|
|
5652
|
+
}, ls = {
|
|
5647
5653
|
any: {
|
|
5648
5654
|
am: /^a/i,
|
|
5649
5655
|
pm: /^p/i,
|
|
@@ -5654,106 +5660,106 @@ const Ya = /^(\d+)(th|st|nd|rd)?/i, Ja = /\d+/i, Xa = {
|
|
|
5654
5660
|
evening: /evening/i,
|
|
5655
5661
|
night: /night/i
|
|
5656
5662
|
}
|
|
5657
|
-
},
|
|
5658
|
-
ordinalNumber:
|
|
5659
|
-
matchPattern:
|
|
5660
|
-
parsePattern:
|
|
5663
|
+
}, cs = {
|
|
5664
|
+
ordinalNumber: Ya({
|
|
5665
|
+
matchPattern: Ja,
|
|
5666
|
+
parsePattern: Xa,
|
|
5661
5667
|
valueCallback: (n) => parseInt(n, 10)
|
|
5662
5668
|
}),
|
|
5663
5669
|
era: ue({
|
|
5664
|
-
matchPatterns:
|
|
5670
|
+
matchPatterns: Qa,
|
|
5665
5671
|
defaultMatchWidth: "wide",
|
|
5666
|
-
parsePatterns:
|
|
5672
|
+
parsePatterns: es,
|
|
5667
5673
|
defaultParseWidth: "any"
|
|
5668
5674
|
}),
|
|
5669
5675
|
quarter: ue({
|
|
5670
|
-
matchPatterns:
|
|
5676
|
+
matchPatterns: ts,
|
|
5671
5677
|
defaultMatchWidth: "wide",
|
|
5672
|
-
parsePatterns:
|
|
5678
|
+
parsePatterns: ns,
|
|
5673
5679
|
defaultParseWidth: "any",
|
|
5674
5680
|
valueCallback: (n) => n + 1
|
|
5675
5681
|
}),
|
|
5676
5682
|
month: ue({
|
|
5677
|
-
matchPatterns:
|
|
5683
|
+
matchPatterns: rs,
|
|
5678
5684
|
defaultMatchWidth: "wide",
|
|
5679
|
-
parsePatterns:
|
|
5685
|
+
parsePatterns: as,
|
|
5680
5686
|
defaultParseWidth: "any"
|
|
5681
5687
|
}),
|
|
5682
5688
|
day: ue({
|
|
5683
|
-
matchPatterns:
|
|
5689
|
+
matchPatterns: ss,
|
|
5684
5690
|
defaultMatchWidth: "wide",
|
|
5685
|
-
parsePatterns:
|
|
5691
|
+
parsePatterns: is,
|
|
5686
5692
|
defaultParseWidth: "any"
|
|
5687
5693
|
}),
|
|
5688
5694
|
dayPeriod: ue({
|
|
5689
|
-
matchPatterns:
|
|
5695
|
+
matchPatterns: os,
|
|
5690
5696
|
defaultMatchWidth: "any",
|
|
5691
|
-
parsePatterns:
|
|
5697
|
+
parsePatterns: ls,
|
|
5692
5698
|
defaultParseWidth: "any"
|
|
5693
5699
|
})
|
|
5694
5700
|
};
|
|
5695
|
-
function
|
|
5696
|
-
const e = {}, t =
|
|
5701
|
+
function us(n) {
|
|
5702
|
+
const e = {}, t = ja();
|
|
5697
5703
|
for (const r in t)
|
|
5698
5704
|
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
5699
5705
|
for (const r in n)
|
|
5700
5706
|
Object.prototype.hasOwnProperty.call(n, r) && (n[r] === void 0 ? delete e[r] : e[r] = n[r]);
|
|
5701
|
-
|
|
5707
|
+
$a(e);
|
|
5702
5708
|
}
|
|
5703
|
-
const
|
|
5709
|
+
const ds = {
|
|
5704
5710
|
full: "EEEE, d MMMM yyyy",
|
|
5705
5711
|
long: "d MMMM yyyy",
|
|
5706
5712
|
medium: "d MMM yyyy",
|
|
5707
5713
|
short: "dd/MM/yyyy"
|
|
5708
|
-
},
|
|
5714
|
+
}, ps = {
|
|
5709
5715
|
full: "HH:mm:ss zzzz",
|
|
5710
5716
|
long: "HH:mm:ss z",
|
|
5711
5717
|
medium: "HH:mm:ss",
|
|
5712
5718
|
short: "HH:mm"
|
|
5713
|
-
},
|
|
5719
|
+
}, gs = {
|
|
5714
5720
|
full: "{{date}} 'at' {{time}}",
|
|
5715
5721
|
long: "{{date}} 'at' {{time}}",
|
|
5716
5722
|
medium: "{{date}}, {{time}}",
|
|
5717
5723
|
short: "{{date}}, {{time}}"
|
|
5718
|
-
},
|
|
5724
|
+
}, fs = {
|
|
5719
5725
|
date: De({
|
|
5720
|
-
formats:
|
|
5726
|
+
formats: ds,
|
|
5721
5727
|
defaultWidth: "full"
|
|
5722
5728
|
}),
|
|
5723
5729
|
time: De({
|
|
5724
|
-
formats:
|
|
5730
|
+
formats: ps,
|
|
5725
5731
|
defaultWidth: "full"
|
|
5726
5732
|
}),
|
|
5727
5733
|
dateTime: De({
|
|
5728
|
-
formats:
|
|
5734
|
+
formats: gs,
|
|
5729
5735
|
defaultWidth: "full"
|
|
5730
5736
|
})
|
|
5731
|
-
},
|
|
5737
|
+
}, hs = {
|
|
5732
5738
|
code: "en-GB",
|
|
5733
|
-
formatDistance:
|
|
5734
|
-
formatLong:
|
|
5735
|
-
formatRelative:
|
|
5736
|
-
localize:
|
|
5737
|
-
match:
|
|
5739
|
+
formatDistance: Da,
|
|
5740
|
+
formatLong: fs,
|
|
5741
|
+
formatRelative: Ma,
|
|
5742
|
+
localize: Za,
|
|
5743
|
+
match: cs,
|
|
5738
5744
|
options: {
|
|
5739
5745
|
weekStartsOn: 1,
|
|
5740
5746
|
firstWeekContainsDate: 4
|
|
5741
5747
|
}
|
|
5742
5748
|
}, {
|
|
5743
|
-
slice:
|
|
5744
|
-
forEach:
|
|
5749
|
+
slice: ms,
|
|
5750
|
+
forEach: ys
|
|
5745
5751
|
} = [];
|
|
5746
|
-
function
|
|
5747
|
-
return
|
|
5752
|
+
function bs(n) {
|
|
5753
|
+
return ys.call(ms.call(arguments, 1), (e) => {
|
|
5748
5754
|
if (e)
|
|
5749
5755
|
for (const t in e)
|
|
5750
5756
|
n[t] === void 0 && (n[t] = e[t]);
|
|
5751
5757
|
}), n;
|
|
5752
5758
|
}
|
|
5753
|
-
function
|
|
5759
|
+
function xs(n) {
|
|
5754
5760
|
return typeof n != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((t) => t.test(n));
|
|
5755
5761
|
}
|
|
5756
|
-
const
|
|
5762
|
+
const Lt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ws = function(n, e) {
|
|
5757
5763
|
const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
5758
5764
|
path: "/"
|
|
5759
5765
|
}, a = encodeURIComponent(e);
|
|
@@ -5764,12 +5770,12 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5764
5770
|
s += `; Max-Age=${Math.floor(i)}`;
|
|
5765
5771
|
}
|
|
5766
5772
|
if (r.domain) {
|
|
5767
|
-
if (!
|
|
5773
|
+
if (!Lt.test(r.domain))
|
|
5768
5774
|
throw new TypeError("option domain is invalid");
|
|
5769
5775
|
s += `; Domain=${r.domain}`;
|
|
5770
5776
|
}
|
|
5771
5777
|
if (r.path) {
|
|
5772
|
-
if (!
|
|
5778
|
+
if (!Lt.test(r.path))
|
|
5773
5779
|
throw new TypeError("option path is invalid");
|
|
5774
5780
|
s += `; Path=${r.path}`;
|
|
5775
5781
|
}
|
|
@@ -5796,13 +5802,13 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5796
5802
|
throw new TypeError("option sameSite is invalid");
|
|
5797
5803
|
}
|
|
5798
5804
|
return r.partitioned && (s += "; Partitioned"), s;
|
|
5799
|
-
},
|
|
5805
|
+
}, Ft = {
|
|
5800
5806
|
create(n, e, t, r) {
|
|
5801
5807
|
let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
5802
5808
|
path: "/",
|
|
5803
5809
|
sameSite: "strict"
|
|
5804
5810
|
};
|
|
5805
|
-
t && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + t * 60 * 1e3)), r && (a.domain = r), document.cookie =
|
|
5811
|
+
t && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + t * 60 * 1e3)), r && (a.domain = r), document.cookie = ws(n, e, a);
|
|
5806
5812
|
},
|
|
5807
5813
|
read(n) {
|
|
5808
5814
|
const e = `${n}=`, t = document.cookie.split(";");
|
|
@@ -5817,7 +5823,7 @@ const Et = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, xs = function(n, e) {
|
|
|
5817
5823
|
this.create(n, "", -1, e);
|
|
5818
5824
|
}
|
|
5819
5825
|
};
|
|
5820
|
-
var
|
|
5826
|
+
var vs = {
|
|
5821
5827
|
name: "cookie",
|
|
5822
5828
|
// Deconstruct the options object and extract the lookupCookie property
|
|
5823
5829
|
lookup(n) {
|
|
@@ -5825,7 +5831,7 @@ var ws = {
|
|
|
5825
5831
|
lookupCookie: e
|
|
5826
5832
|
} = n;
|
|
5827
5833
|
if (e && typeof document < "u")
|
|
5828
|
-
return
|
|
5834
|
+
return Ft.read(e) || void 0;
|
|
5829
5835
|
},
|
|
5830
5836
|
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
|
5831
5837
|
cacheUserLanguage(n, e) {
|
|
@@ -5835,9 +5841,9 @@ var ws = {
|
|
|
5835
5841
|
cookieDomain: a,
|
|
5836
5842
|
cookieOptions: s
|
|
5837
5843
|
} = e;
|
|
5838
|
-
t && typeof document < "u" &&
|
|
5844
|
+
t && typeof document < "u" && Ft.create(t, n, r, a, s);
|
|
5839
5845
|
}
|
|
5840
|
-
},
|
|
5846
|
+
}, ks = {
|
|
5841
5847
|
name: "querystring",
|
|
5842
5848
|
// Deconstruct the options object and extract the lookupQuerystring property
|
|
5843
5849
|
lookup(n) {
|
|
@@ -5857,7 +5863,7 @@ var ws = {
|
|
|
5857
5863
|
}
|
|
5858
5864
|
return t;
|
|
5859
5865
|
}
|
|
5860
|
-
},
|
|
5866
|
+
}, Ss = {
|
|
5861
5867
|
name: "hash",
|
|
5862
5868
|
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
5863
5869
|
lookup(n) {
|
|
@@ -5889,7 +5895,7 @@ var ws = {
|
|
|
5889
5895
|
}
|
|
5890
5896
|
};
|
|
5891
5897
|
let re = null;
|
|
5892
|
-
const
|
|
5898
|
+
const At = () => {
|
|
5893
5899
|
if (re !== null) return re;
|
|
5894
5900
|
try {
|
|
5895
5901
|
if (re = typeof window < "u" && window.localStorage !== null, !re)
|
|
@@ -5901,14 +5907,14 @@ const Ft = () => {
|
|
|
5901
5907
|
}
|
|
5902
5908
|
return re;
|
|
5903
5909
|
};
|
|
5904
|
-
var
|
|
5910
|
+
var Es = {
|
|
5905
5911
|
name: "localStorage",
|
|
5906
5912
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
5907
5913
|
lookup(n) {
|
|
5908
5914
|
let {
|
|
5909
5915
|
lookupLocalStorage: e
|
|
5910
5916
|
} = n;
|
|
5911
|
-
if (e &&
|
|
5917
|
+
if (e && At())
|
|
5912
5918
|
return window.localStorage.getItem(e) || void 0;
|
|
5913
5919
|
},
|
|
5914
5920
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
@@ -5916,11 +5922,11 @@ var Ss = {
|
|
|
5916
5922
|
let {
|
|
5917
5923
|
lookupLocalStorage: t
|
|
5918
5924
|
} = e;
|
|
5919
|
-
t &&
|
|
5925
|
+
t && At() && window.localStorage.setItem(t, n);
|
|
5920
5926
|
}
|
|
5921
5927
|
};
|
|
5922
5928
|
let ae = null;
|
|
5923
|
-
const
|
|
5929
|
+
const Ot = () => {
|
|
5924
5930
|
if (ae !== null) return ae;
|
|
5925
5931
|
try {
|
|
5926
5932
|
if (ae = typeof window < "u" && window.sessionStorage !== null, !ae)
|
|
@@ -5932,22 +5938,22 @@ const At = () => {
|
|
|
5932
5938
|
}
|
|
5933
5939
|
return ae;
|
|
5934
5940
|
};
|
|
5935
|
-
var
|
|
5941
|
+
var Ls = {
|
|
5936
5942
|
name: "sessionStorage",
|
|
5937
5943
|
lookup(n) {
|
|
5938
5944
|
let {
|
|
5939
5945
|
lookupSessionStorage: e
|
|
5940
5946
|
} = n;
|
|
5941
|
-
if (e &&
|
|
5947
|
+
if (e && Ot())
|
|
5942
5948
|
return window.sessionStorage.getItem(e) || void 0;
|
|
5943
5949
|
},
|
|
5944
5950
|
cacheUserLanguage(n, e) {
|
|
5945
5951
|
let {
|
|
5946
5952
|
lookupSessionStorage: t
|
|
5947
5953
|
} = e;
|
|
5948
|
-
t &&
|
|
5954
|
+
t && Ot() && window.sessionStorage.setItem(t, n);
|
|
5949
5955
|
}
|
|
5950
|
-
},
|
|
5956
|
+
}, Fs = {
|
|
5951
5957
|
name: "navigator",
|
|
5952
5958
|
lookup(n) {
|
|
5953
5959
|
const e = [];
|
|
@@ -5964,7 +5970,7 @@ var Es = {
|
|
|
5964
5970
|
}
|
|
5965
5971
|
return e.length > 0 ? e : void 0;
|
|
5966
5972
|
}
|
|
5967
|
-
},
|
|
5973
|
+
}, As = {
|
|
5968
5974
|
name: "htmlTag",
|
|
5969
5975
|
// Deconstruct the options object and extract the htmlTag property
|
|
5970
5976
|
lookup(n) {
|
|
@@ -5974,7 +5980,7 @@ var Es = {
|
|
|
5974
5980
|
const r = e || (typeof document < "u" ? document.documentElement : null);
|
|
5975
5981
|
return r && typeof r.getAttribute == "function" && (t = r.getAttribute("lang")), t;
|
|
5976
5982
|
}
|
|
5977
|
-
},
|
|
5983
|
+
}, Os = {
|
|
5978
5984
|
name: "path",
|
|
5979
5985
|
// Deconstruct the options object and extract the lookupFromPathIndex property
|
|
5980
5986
|
lookup(n) {
|
|
@@ -5985,7 +5991,7 @@ var Es = {
|
|
|
5985
5991
|
const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
5986
5992
|
return Array.isArray(t) ? t[typeof e == "number" ? e : 0]?.replace("/", "") : void 0;
|
|
5987
5993
|
}
|
|
5988
|
-
},
|
|
5994
|
+
}, Ns = {
|
|
5989
5995
|
name: "subdomain",
|
|
5990
5996
|
lookup(n) {
|
|
5991
5997
|
let {
|
|
@@ -5996,15 +6002,15 @@ var Es = {
|
|
|
5996
6002
|
return r[t];
|
|
5997
6003
|
}
|
|
5998
6004
|
};
|
|
5999
|
-
let
|
|
6005
|
+
let nn = !1;
|
|
6000
6006
|
try {
|
|
6001
|
-
document.cookie,
|
|
6007
|
+
document.cookie, nn = !0;
|
|
6002
6008
|
} catch {
|
|
6003
6009
|
}
|
|
6004
|
-
const
|
|
6005
|
-
|
|
6006
|
-
const
|
|
6007
|
-
order:
|
|
6010
|
+
const rn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
6011
|
+
nn || rn.splice(1, 1);
|
|
6012
|
+
const Rs = () => ({
|
|
6013
|
+
order: rn,
|
|
6008
6014
|
lookupQuerystring: "lng",
|
|
6009
6015
|
lookupCookie: "i18next",
|
|
6010
6016
|
lookupLocalStorage: "i18nextLng",
|
|
@@ -6016,7 +6022,7 @@ const Ns = () => ({
|
|
|
6016
6022
|
// cookieDomain: 'myDomain'
|
|
6017
6023
|
convertDetectedLanguage: (n) => n
|
|
6018
6024
|
});
|
|
6019
|
-
class
|
|
6025
|
+
class an {
|
|
6020
6026
|
constructor(e) {
|
|
6021
6027
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6022
6028
|
this.type = "languageDetector", this.detectors = {}, this.init(e, t);
|
|
@@ -6025,7 +6031,7 @@ class rn {
|
|
|
6025
6031
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6026
6032
|
languageUtils: {}
|
|
6027
6033
|
}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6028
|
-
this.services = e, this.options =
|
|
6034
|
+
this.services = e, this.options = bs(t, this.options || {}, Rs()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (a) => a.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(vs), this.addDetector(ks), this.addDetector(Es), this.addDetector(Ls), this.addDetector(Fs), this.addDetector(As), this.addDetector(Os), this.addDetector(Ns), this.addDetector(Ss);
|
|
6029
6035
|
}
|
|
6030
6036
|
addDetector(e) {
|
|
6031
6037
|
return this.detectors[e.name] = e, this;
|
|
@@ -6037,7 +6043,7 @@ class rn {
|
|
|
6037
6043
|
let a = this.detectors[r].lookup(this.options);
|
|
6038
6044
|
a && typeof a == "string" && (a = [a]), a && (t = t.concat(a));
|
|
6039
6045
|
}
|
|
6040
|
-
}), t = t.filter((r) => r != null && !
|
|
6046
|
+
}), t = t.filter((r) => r != null && !xs(r)).map((r) => this.options.convertDetectedLanguage(r)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
|
|
6041
6047
|
}
|
|
6042
6048
|
cacheUserLanguage(e) {
|
|
6043
6049
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
|
|
@@ -6046,21 +6052,21 @@ class rn {
|
|
|
6046
6052
|
}));
|
|
6047
6053
|
}
|
|
6048
6054
|
}
|
|
6049
|
-
|
|
6050
|
-
const
|
|
6055
|
+
an.type = "languageDetector";
|
|
6056
|
+
const sn = {
|
|
6051
6057
|
apiBaseUrl: "https://api.nemme.io",
|
|
6052
6058
|
debug: !1
|
|
6053
|
-
},
|
|
6054
|
-
Previous:
|
|
6055
|
-
Next:
|
|
6056
|
-
Done:
|
|
6057
|
-
Submit:
|
|
6059
|
+
}, Ts = "Previous", Cs = "Next", Ps = "Done", js = "Submit", $s = {
|
|
6060
|
+
Previous: Ts,
|
|
6061
|
+
Next: Cs,
|
|
6062
|
+
Done: Ps,
|
|
6063
|
+
Submit: js,
|
|
6058
6064
|
"Type your answer here": "Type your answer here",
|
|
6059
6065
|
"Max {{maxCharacters}} characters": "Max {{maxCharacters}} characters"
|
|
6060
6066
|
}, Is = {};
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
debug:
|
|
6067
|
+
us({ locale: hs });
|
|
6068
|
+
$.use(an).use(Kn).init({
|
|
6069
|
+
debug: sn.debug,
|
|
6064
6070
|
fallbackLng: "en",
|
|
6065
6071
|
interpolation: {
|
|
6066
6072
|
escapeValue: !1
|
|
@@ -6068,20 +6074,20 @@ I.use(rn).use(Hn).init({
|
|
|
6068
6074
|
},
|
|
6069
6075
|
resources: {
|
|
6070
6076
|
en: {
|
|
6071
|
-
translation:
|
|
6077
|
+
translation: $s
|
|
6072
6078
|
},
|
|
6073
6079
|
nb: {
|
|
6074
6080
|
tranlation: Is
|
|
6075
6081
|
}
|
|
6076
6082
|
}
|
|
6077
6083
|
});
|
|
6078
|
-
const
|
|
6084
|
+
const Nt = {
|
|
6079
6085
|
debug: 0,
|
|
6080
6086
|
info: 1,
|
|
6081
6087
|
warn: 2,
|
|
6082
6088
|
error: 3
|
|
6083
6089
|
};
|
|
6084
|
-
class
|
|
6090
|
+
class Ge {
|
|
6085
6091
|
prefix;
|
|
6086
6092
|
enabled;
|
|
6087
6093
|
level;
|
|
@@ -6089,7 +6095,7 @@ class We {
|
|
|
6089
6095
|
this.prefix = e.prefix || "Nemme SDK", this.enabled = e.enabled !== void 0 ? e.enabled : !0, this.level = e.level || "info";
|
|
6090
6096
|
}
|
|
6091
6097
|
shouldLog(e) {
|
|
6092
|
-
return this.enabled &&
|
|
6098
|
+
return this.enabled && Nt[e] >= Nt[this.level];
|
|
6093
6099
|
}
|
|
6094
6100
|
formatMessage(e) {
|
|
6095
6101
|
return `[${this.prefix}] ${e}`;
|
|
@@ -6108,7 +6114,7 @@ class We {
|
|
|
6108
6114
|
}
|
|
6109
6115
|
// Create a child logger with a new prefix
|
|
6110
6116
|
child(e) {
|
|
6111
|
-
return new
|
|
6117
|
+
return new Ge({
|
|
6112
6118
|
prefix: `${this.prefix}:${e}`,
|
|
6113
6119
|
enabled: this.enabled,
|
|
6114
6120
|
level: this.level
|
|
@@ -6119,8 +6125,8 @@ class We {
|
|
|
6119
6125
|
e.prefix !== void 0 && (this.prefix = e.prefix), e.enabled !== void 0 && (this.enabled = e.enabled), e.level !== void 0 && (this.level = e.level);
|
|
6120
6126
|
}
|
|
6121
6127
|
}
|
|
6122
|
-
const
|
|
6123
|
-
const t = new URL(n,
|
|
6128
|
+
const on = new Ge(), Rt = on.child("network"), Ds = 3e4, _s = (n, e) => {
|
|
6129
|
+
const t = new URL(n, sn.apiBaseUrl);
|
|
6124
6130
|
return e && Object.entries(e).forEach(([r, a]) => {
|
|
6125
6131
|
a != null && t.searchParams.append(r, String(a));
|
|
6126
6132
|
}), t.toString();
|
|
@@ -6129,7 +6135,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6129
6135
|
* Make an HTTP request
|
|
6130
6136
|
*/
|
|
6131
6137
|
async request(n, e = {}) {
|
|
6132
|
-
const { method: t = "GET", headers: r = {}, body: a, params: s, timeout: i =
|
|
6138
|
+
const { method: t = "GET", headers: r = {}, body: a, params: s, timeout: i = Ds } = e, o = _s(n, s), l = {
|
|
6133
6139
|
"Content-Type": "application/json",
|
|
6134
6140
|
Accept: "application/json",
|
|
6135
6141
|
...r
|
|
@@ -6164,7 +6170,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6164
6170
|
g.ok = !0;
|
|
6165
6171
|
else {
|
|
6166
6172
|
const h = `Request failed with status ${f.status}: ${f.statusText}`;
|
|
6167
|
-
|
|
6173
|
+
Rt.error(h, {
|
|
6168
6174
|
url: o,
|
|
6169
6175
|
method: t,
|
|
6170
6176
|
status: f.status,
|
|
@@ -6181,7 +6187,7 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6181
6187
|
message: f instanceof Error ? f.message : String(f),
|
|
6182
6188
|
url: o,
|
|
6183
6189
|
method: t
|
|
6184
|
-
},
|
|
6190
|
+
}, Rt.error(m, p), {
|
|
6185
6191
|
data: {},
|
|
6186
6192
|
status: 0,
|
|
6187
6193
|
statusText: m,
|
|
@@ -6215,7 +6221,13 @@ const sn = new We(), Nt = sn.child("network"), $s = 3e4, Ds = (n, e) => {
|
|
|
6215
6221
|
return this.request(n, { ...e, method: "DELETE" });
|
|
6216
6222
|
}
|
|
6217
6223
|
};
|
|
6218
|
-
class
|
|
6224
|
+
class _e extends Error {
|
|
6225
|
+
errorType;
|
|
6226
|
+
constructor(e, t) {
|
|
6227
|
+
super(t), this.name = "FormError", this.errorType = e;
|
|
6228
|
+
}
|
|
6229
|
+
}
|
|
6230
|
+
class Ms {
|
|
6219
6231
|
logger;
|
|
6220
6232
|
headers;
|
|
6221
6233
|
config;
|
|
@@ -6228,18 +6240,25 @@ class _s {
|
|
|
6228
6240
|
const a = await Y.get(`/external/forms/${e}`, {
|
|
6229
6241
|
headers: this.headers
|
|
6230
6242
|
});
|
|
6243
|
+
if (!a.ok && this.config.onFormError) {
|
|
6244
|
+
const s = new _e("FETCH_ERROR", a.error?.message);
|
|
6245
|
+
this.config.onFormError(s);
|
|
6246
|
+
}
|
|
6231
6247
|
a.ok && a.data ? (this.logger.info(`Form config loaded for: ${e}`, a.data), this.displayForm(a.data, t, r)) : this.logger.warn(`No form config found for: ${e}`);
|
|
6232
6248
|
} catch (a) {
|
|
6233
|
-
this.logger.error(`Failed to fetch form config for: ${e}`, a)
|
|
6249
|
+
if (this.logger.error(`Failed to fetch form config for: ${e}`, a), this.config.onFormError) {
|
|
6250
|
+
const s = new _e("FETCH_ERROR");
|
|
6251
|
+
this.config.onFormError(s);
|
|
6252
|
+
}
|
|
6234
6253
|
}
|
|
6235
6254
|
}
|
|
6236
6255
|
displayForm(e, t, r) {
|
|
6237
6256
|
const a = document.createElement("div");
|
|
6238
6257
|
a.id = "nm", document.body.appendChild(a);
|
|
6239
|
-
const s =
|
|
6240
|
-
|
|
6241
|
-
{ i18n:
|
|
6242
|
-
we(
|
|
6258
|
+
const s = pn(a), i = we(
|
|
6259
|
+
Qn,
|
|
6260
|
+
{ i18n: $ },
|
|
6261
|
+
we(rr, {
|
|
6243
6262
|
form: e,
|
|
6244
6263
|
onDismiss: async (o) => {
|
|
6245
6264
|
await t(), s.unmount(), a.remove(), this.logger.info("Form dismissed", o);
|
|
@@ -6257,16 +6276,20 @@ class _s {
|
|
|
6257
6276
|
const r = await Y.post(`/external/forms/${e.slug}`, t, {
|
|
6258
6277
|
headers: this.headers
|
|
6259
6278
|
});
|
|
6260
|
-
|
|
6279
|
+
if (!r.ok && this.config.onFormError) {
|
|
6280
|
+
const a = new _e("SUBMISSION_ERROR", r.error?.message);
|
|
6281
|
+
this.config.onFormError(a);
|
|
6282
|
+
} else
|
|
6283
|
+
this.logger.info("Form response posted", r.data);
|
|
6261
6284
|
}
|
|
6262
6285
|
}
|
|
6263
|
-
class
|
|
6286
|
+
class Bs {
|
|
6264
6287
|
logger;
|
|
6265
6288
|
headers;
|
|
6266
6289
|
formManager;
|
|
6267
6290
|
deliveries = [];
|
|
6268
6291
|
constructor(e, t, r) {
|
|
6269
|
-
this.logger = e, this.headers = t, this.formManager = new
|
|
6292
|
+
this.logger = e, this.headers = t, this.formManager = new Ms(e, t, r);
|
|
6270
6293
|
}
|
|
6271
6294
|
async loadDeliveries() {
|
|
6272
6295
|
try {
|
|
@@ -6381,13 +6404,14 @@ class Ms {
|
|
|
6381
6404
|
}
|
|
6382
6405
|
}
|
|
6383
6406
|
}
|
|
6384
|
-
class
|
|
6407
|
+
class zs {
|
|
6385
6408
|
logger;
|
|
6386
6409
|
headers;
|
|
6387
6410
|
sessionId;
|
|
6388
6411
|
eventDefinitions = [];
|
|
6389
6412
|
onPageView;
|
|
6390
6413
|
onEvent;
|
|
6414
|
+
trackUrlParamChanges = !0;
|
|
6391
6415
|
// Batching
|
|
6392
6416
|
backlog = [];
|
|
6393
6417
|
flushTimeout = null;
|
|
@@ -6401,8 +6425,18 @@ class Bs {
|
|
|
6401
6425
|
// Page view tracking
|
|
6402
6426
|
originalHistoryMethods = null;
|
|
6403
6427
|
EVENT_PAGE_VIEW = "page_view";
|
|
6404
|
-
|
|
6405
|
-
|
|
6428
|
+
lastTrackedPageKey;
|
|
6429
|
+
constructor({
|
|
6430
|
+
logger: e,
|
|
6431
|
+
headers: t,
|
|
6432
|
+
sessionId: r,
|
|
6433
|
+
eventDefinitions: a,
|
|
6434
|
+
batchConfig: s,
|
|
6435
|
+
onPageView: i,
|
|
6436
|
+
onEvent: o,
|
|
6437
|
+
trackUrlParamChanges: l
|
|
6438
|
+
}) {
|
|
6439
|
+
this.logger = e, this.headers = t, this.sessionId = r, this.eventDefinitions = a, this.onPageView = i, this.onEvent = o, typeof l == "boolean" && (this.trackUrlParamChanges = l), this.flushEvents = this.flushEvents.bind(this), this.handlePopState = this.handlePopState.bind(this), this.handleVisibilityChange = this.handleVisibilityChange.bind(this), this.setupBatching(s);
|
|
6406
6440
|
}
|
|
6407
6441
|
setupBatching(e) {
|
|
6408
6442
|
typeof e == "boolean" ? this.batchConfig.enabled = e : e && (this.batchConfig = {
|
|
@@ -6442,13 +6476,30 @@ class Bs {
|
|
|
6442
6476
|
this.validateEvent(s), this.batchConfig.enabled ? (this.backlog.push(s), this.scheduleFlush()) : await this.sendEvents([s]), t === this.EVENT_PAGE_VIEW ? this.onPageView?.(window.location.href) : this.onEvent?.(s, a);
|
|
6443
6477
|
}
|
|
6444
6478
|
async trackPageView() {
|
|
6445
|
-
typeof window > "u"
|
|
6479
|
+
if (typeof window > "u") return;
|
|
6480
|
+
const e = window.location.href;
|
|
6481
|
+
if (!this.trackUrlParamChanges) {
|
|
6482
|
+
const t = this.getPageKeyWithoutQuery(e);
|
|
6483
|
+
if (this.lastTrackedPageKey === t)
|
|
6484
|
+
return;
|
|
6485
|
+
this.lastTrackedPageKey = t;
|
|
6486
|
+
}
|
|
6487
|
+
await this.track({
|
|
6446
6488
|
eventKey: this.EVENT_PAGE_VIEW,
|
|
6447
6489
|
data: {
|
|
6448
6490
|
title: document.title
|
|
6449
6491
|
}
|
|
6450
6492
|
});
|
|
6451
6493
|
}
|
|
6494
|
+
getPageKeyWithoutQuery(e) {
|
|
6495
|
+
try {
|
|
6496
|
+
const t = new URL(e);
|
|
6497
|
+
return `${t.origin}${t.pathname}${t.hash}`;
|
|
6498
|
+
} catch {
|
|
6499
|
+
const [t] = e.split("?");
|
|
6500
|
+
return t;
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6452
6503
|
/**
|
|
6453
6504
|
* Manually flush any pending events
|
|
6454
6505
|
*/
|
|
@@ -6519,11 +6570,11 @@ class Bs {
|
|
|
6519
6570
|
await Y.post("/external/trackings/batch", e, { headers: this.headers });
|
|
6520
6571
|
}
|
|
6521
6572
|
}
|
|
6522
|
-
class
|
|
6573
|
+
class Ye {
|
|
6523
6574
|
clientKey;
|
|
6524
6575
|
userIdentifier;
|
|
6525
6576
|
initialized = !1;
|
|
6526
|
-
clientLogger =
|
|
6577
|
+
clientLogger = on.child("client");
|
|
6527
6578
|
headers = {};
|
|
6528
6579
|
formConfig;
|
|
6529
6580
|
constructor(e) {
|
|
@@ -6539,7 +6590,8 @@ class Ge {
|
|
|
6539
6590
|
debug: t = !1,
|
|
6540
6591
|
batch: r,
|
|
6541
6592
|
formConfig: a,
|
|
6542
|
-
deactivate: s = !1
|
|
6593
|
+
deactivate: s = !1,
|
|
6594
|
+
trackUrlParamChanges: i
|
|
6543
6595
|
}) {
|
|
6544
6596
|
if (s)
|
|
6545
6597
|
return this.clientLogger.info("Nemme client deactivated and will stop initialization."), this.initialized = !0, this.clientLogger.configure({ enabled: !1 }), this;
|
|
@@ -6552,13 +6604,13 @@ class Ge {
|
|
|
6552
6604
|
"X-User-Id": this.userIdentifier
|
|
6553
6605
|
}, this.formConfig = a;
|
|
6554
6606
|
try {
|
|
6555
|
-
const
|
|
6556
|
-
await this.initializeManagers(
|
|
6607
|
+
const o = await this.initializeSession();
|
|
6608
|
+
await this.initializeManagers(o, r, i), this.initialized = !0, this.clientLogger.info("Nemme client initialized", {
|
|
6557
6609
|
clientKey: this.clientKey,
|
|
6558
6610
|
userIdentifier: this.userIdentifier
|
|
6559
6611
|
});
|
|
6560
|
-
} catch (
|
|
6561
|
-
this.clientLogger.error("Error during initialization:",
|
|
6612
|
+
} catch (o) {
|
|
6613
|
+
this.clientLogger.error("Error during initialization:", o);
|
|
6562
6614
|
}
|
|
6563
6615
|
return this;
|
|
6564
6616
|
}
|
|
@@ -6589,30 +6641,31 @@ class Ge {
|
|
|
6589
6641
|
throw this.clientLogger.error("Error during initialization", e), e;
|
|
6590
6642
|
}
|
|
6591
6643
|
}
|
|
6592
|
-
async initializeManagers(e, t) {
|
|
6593
|
-
const
|
|
6644
|
+
async initializeManagers(e, t, r) {
|
|
6645
|
+
const a = new Bs(this.clientLogger, this.headers, this.formConfig), s = new zs({
|
|
6594
6646
|
logger: this.clientLogger,
|
|
6595
6647
|
headers: this.headers,
|
|
6596
6648
|
sessionId: e.sessionId,
|
|
6597
6649
|
eventDefinitions: e.eventDefinitions,
|
|
6598
6650
|
batchConfig: t,
|
|
6599
|
-
|
|
6600
|
-
|
|
6651
|
+
trackUrlParamChanges: r,
|
|
6652
|
+
onPageView: async (i) => {
|
|
6653
|
+
await a.evaluateDeliveryTriggers({ url: i });
|
|
6601
6654
|
},
|
|
6602
|
-
onEvent: async (
|
|
6603
|
-
await
|
|
6655
|
+
onEvent: async (i, o) => {
|
|
6656
|
+
await a.evaluateDeliveryTriggers({ eventKey: i.eventKey, eventData: i.data, url: o });
|
|
6604
6657
|
}
|
|
6605
6658
|
});
|
|
6606
|
-
await
|
|
6659
|
+
await a.loadDeliveries(), typeof window < "u" && (await s.setupPageViewTracking(), await s.trackPageView(), await s.flush()), this.trackingManager = s;
|
|
6607
6660
|
}
|
|
6608
6661
|
}
|
|
6609
|
-
const
|
|
6662
|
+
const ln = (n) => new Ye(n), cn = ye(void 0), Ws = ({ clientKey: n, config: e, children: t }) => {
|
|
6610
6663
|
const [r, a] = pe(null), [s, i] = pe(!1), [o, l] = pe(null);
|
|
6611
|
-
|
|
6664
|
+
Tt(() => {
|
|
6612
6665
|
let d = null, u = !1;
|
|
6613
6666
|
const f = async () => {
|
|
6614
6667
|
try {
|
|
6615
|
-
const p = new
|
|
6668
|
+
const p = new Ye(n);
|
|
6616
6669
|
if (await p.init(e), u) {
|
|
6617
6670
|
p.destroy();
|
|
6618
6671
|
return;
|
|
@@ -6633,14 +6686,14 @@ const on = (n) => new Ge(n), ln = ye(void 0), Zs = ({ clientKey: n, config: e, c
|
|
|
6633
6686
|
isInitialized: s,
|
|
6634
6687
|
error: o
|
|
6635
6688
|
};
|
|
6636
|
-
return /* @__PURE__ */ S.jsx(
|
|
6637
|
-
},
|
|
6638
|
-
const n =
|
|
6689
|
+
return /* @__PURE__ */ S.jsx(cn.Provider, { value: c, children: t });
|
|
6690
|
+
}, Us = () => {
|
|
6691
|
+
const n = He(cn);
|
|
6639
6692
|
if (n === void 0)
|
|
6640
6693
|
throw new Error("useNemmeContext must be used within a NemmeProvider");
|
|
6641
6694
|
return n;
|
|
6642
|
-
},
|
|
6643
|
-
const { client: n, isInitialized: e, error: t } =
|
|
6695
|
+
}, Gs = () => {
|
|
6696
|
+
const { client: n, isInitialized: e, error: t } = Us(), r = q(
|
|
6644
6697
|
async (s) => {
|
|
6645
6698
|
if (!n || !e) {
|
|
6646
6699
|
console.warn("Nemme client not initialized");
|
|
@@ -6649,7 +6702,7 @@ const on = (n) => new Ge(n), ln = ye(void 0), Zs = ({ clientKey: n, config: e, c
|
|
|
6649
6702
|
return n.track(s);
|
|
6650
6703
|
},
|
|
6651
6704
|
[n, e]
|
|
6652
|
-
), a =
|
|
6705
|
+
), a = q(async () => {
|
|
6653
6706
|
if (!n || !e) {
|
|
6654
6707
|
console.warn("Nemme client not initialized");
|
|
6655
6708
|
return;
|
|
@@ -6663,20 +6716,20 @@ const on = (n) => new Ge(n), ln = ye(void 0), Zs = ({ clientKey: n, config: e, c
|
|
|
6663
6716
|
error: t,
|
|
6664
6717
|
client: n
|
|
6665
6718
|
};
|
|
6666
|
-
},
|
|
6719
|
+
}, Vs = (n) => ln(n), Hs = async (n) => {
|
|
6667
6720
|
const { clientKey: e, ...t } = n;
|
|
6668
|
-
return await
|
|
6669
|
-
},
|
|
6670
|
-
NemmeClient:
|
|
6671
|
-
init:
|
|
6721
|
+
return await ln(e).init(t);
|
|
6722
|
+
}, Ks = Object.assign((n) => Vs(n), {
|
|
6723
|
+
NemmeClient: Ye,
|
|
6724
|
+
init: Hs
|
|
6672
6725
|
});
|
|
6673
|
-
typeof window < "u" && (window.NemmeSDK =
|
|
6726
|
+
typeof window < "u" && (window.NemmeSDK = Ks);
|
|
6674
6727
|
export {
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6728
|
+
Ye as NemmeClient,
|
|
6729
|
+
Ws as NemmeProvider,
|
|
6730
|
+
Ks as NemmeSDK,
|
|
6731
|
+
Ks as default,
|
|
6732
|
+
Gs as useNemme,
|
|
6733
|
+
Us as useNemmeContext
|
|
6681
6734
|
};
|
|
6682
6735
|
//# sourceMappingURL=index.esm.js.map
|