@nemme/js-sdk 0.6.0 → 0.6.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/chunks/{client-CEykSZ2c.js → client-BPx3v4ob.js} +2 -2
- package/dist/chunks/{client-CEykSZ2c.js.map → client-BPx3v4ob.js.map} +1 -1
- package/dist/chunks/{client-DZJN73sh.js → client-DVvy_lUY.js} +2 -2
- package/dist/chunks/{client-DZJN73sh.js.map → client-DVvy_lUY.js.map} +1 -1
- package/dist/chunks/{form-manager-Dre89wMr.js → form-manager-CH-LT8Ck.js} +718 -718
- package/dist/chunks/{form-manager-Dre89wMr.js.map → form-manager-CH-LT8Ck.js.map} +1 -1
- package/dist/chunks/form-manager-DSnwY9Sd.js +12 -0
- package/dist/chunks/{form-manager-CdG9IzjD.js.map → form-manager-DSnwY9Sd.js.map} +1 -1
- package/dist/forms.cjs +1 -1
- package/dist/forms.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/nemme-sdk.umd.js +4 -4
- package/dist/nemme-sdk.umd.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.esm.js +13 -13
- package/dist/react.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/form-manager-CdG9IzjD.js +0 -12
- package/dist/chunks/jsx-runtime-BubrbI3X.js +0 -2
- package/dist/chunks/jsx-runtime-BubrbI3X.js.map +0 -1
- package/dist/chunks/jsx-runtime-jIxVPx5o.js +0 -32
- package/dist/chunks/jsx-runtime-jIxVPx5o.js.map +0 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
import * as b from "react";
|
|
2
|
-
import
|
|
3
|
-
import { createRoot as
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
const E = (t) => typeof t == "string",
|
|
2
|
+
import je, { createContext as ke, useContext as St, useMemo as ue, useRef as he, useCallback as K, useState as Et, useEffect as tn, createElement as ye, forwardRef as nn } from "react";
|
|
3
|
+
import { createRoot as rn } from "react-dom/client";
|
|
4
|
+
import { c as an, h as We } from "./httpClient-D2IO92uv.js";
|
|
5
|
+
import { jsx as k, jsxs as j } from "react/jsx-runtime";
|
|
6
|
+
const E = (t) => typeof t == "string", ie = () => {
|
|
7
7
|
let t, e;
|
|
8
8
|
const n = new Promise((r, a) => {
|
|
9
9
|
t = r, e = a;
|
|
10
10
|
});
|
|
11
11
|
return n.resolve = t, n.reject = e, n;
|
|
12
|
-
},
|
|
12
|
+
}, Ge = (t) => t == null ? "" : "" + t, sn = (t, e, n) => {
|
|
13
13
|
t.forEach((r) => {
|
|
14
14
|
e[r] && (n[r] = e[r]);
|
|
15
15
|
});
|
|
16
|
-
},
|
|
16
|
+
}, on = /###/g, Ke = (t) => t && t.indexOf("###") > -1 ? t.replace(on, ".") : t, Ye = (t) => !t || E(t), de = (t, e, n) => {
|
|
17
17
|
const r = E(e) ? e.split(".") : e;
|
|
18
18
|
let a = 0;
|
|
19
19
|
for (; a < r.length - 1; ) {
|
|
20
|
-
if (
|
|
21
|
-
const s =
|
|
20
|
+
if (Ye(t)) return {};
|
|
21
|
+
const s = Ke(r[a]);
|
|
22
22
|
!t[s] && n && (t[s] = new n()), Object.prototype.hasOwnProperty.call(t, s) ? t = t[s] : t = {}, ++a;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return Ye(t) ? {} : {
|
|
25
25
|
obj: t,
|
|
26
|
-
k:
|
|
26
|
+
k: Ke(r[a])
|
|
27
27
|
};
|
|
28
|
-
},
|
|
28
|
+
}, Xe = (t, e, n) => {
|
|
29
29
|
const {
|
|
30
30
|
obj: r,
|
|
31
31
|
k: a
|
|
32
|
-
} =
|
|
32
|
+
} = de(t, e, Object);
|
|
33
33
|
if (r !== void 0 || e.length === 1) {
|
|
34
34
|
r[a] = n;
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
let s = e[e.length - 1], i = e.slice(0, e.length - 1), o =
|
|
37
|
+
let s = e[e.length - 1], i = e.slice(0, e.length - 1), o = de(t, i, Object);
|
|
38
38
|
for (; o.obj === void 0 && i.length; )
|
|
39
|
-
s = `${i[i.length - 1]}.${s}`, i = i.slice(0, i.length - 1), o =
|
|
39
|
+
s = `${i[i.length - 1]}.${s}`, i = i.slice(0, i.length - 1), o = de(t, i, Object), o?.obj && typeof o.obj[`${o.k}.${s}`] < "u" && (o.obj = void 0);
|
|
40
40
|
o.obj[`${o.k}.${s}`] = n;
|
|
41
|
-
},
|
|
41
|
+
}, ln = (t, e, n, r) => {
|
|
42
42
|
const {
|
|
43
43
|
obj: a,
|
|
44
44
|
k: s
|
|
45
|
-
} =
|
|
45
|
+
} = de(t, e, Object);
|
|
46
46
|
a[s] = a[s] || [], a[s].push(n);
|
|
47
|
-
},
|
|
47
|
+
}, be = (t, e) => {
|
|
48
48
|
const {
|
|
49
49
|
obj: n,
|
|
50
50
|
k: r
|
|
51
|
-
} =
|
|
51
|
+
} = de(t, e);
|
|
52
52
|
if (n && Object.prototype.hasOwnProperty.call(n, r))
|
|
53
53
|
return n[r];
|
|
54
|
-
},
|
|
55
|
-
const r =
|
|
56
|
-
return r !== void 0 ? r :
|
|
57
|
-
},
|
|
54
|
+
}, cn = (t, e, n) => {
|
|
55
|
+
const r = be(t, n);
|
|
56
|
+
return r !== void 0 ? r : be(e, n);
|
|
57
|
+
}, At = (t, e, n) => {
|
|
58
58
|
for (const r in e)
|
|
59
|
-
r !== "__proto__" && r !== "constructor" && (r in t ? E(t[r]) || t[r] instanceof String || E(e[r]) || e[r] instanceof String ? n && (t[r] = e[r]) :
|
|
59
|
+
r !== "__proto__" && r !== "constructor" && (r in t ? E(t[r]) || t[r] instanceof String || E(e[r]) || e[r] instanceof String ? n && (t[r] = e[r]) : At(t[r], e[r], n) : t[r] = e[r]);
|
|
60
60
|
return t;
|
|
61
|
-
},
|
|
62
|
-
var
|
|
61
|
+
}, J = (t) => t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
62
|
+
var un = {
|
|
63
63
|
"&": "&",
|
|
64
64
|
"<": "<",
|
|
65
65
|
">": ">",
|
|
@@ -67,8 +67,8 @@ var cn = {
|
|
|
67
67
|
"'": "'",
|
|
68
68
|
"/": "/"
|
|
69
69
|
};
|
|
70
|
-
const
|
|
71
|
-
class
|
|
70
|
+
const dn = (t) => E(t) ? t.replace(/[&<>"'\/]/g, (e) => un[e]) : t;
|
|
71
|
+
class pn {
|
|
72
72
|
constructor(e) {
|
|
73
73
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
74
74
|
}
|
|
@@ -80,18 +80,18 @@ class dn {
|
|
|
80
80
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const gn = [" ", ",", "?", "!", ";"], fn = new pn(20), hn = (t, e, n) => {
|
|
84
84
|
e = e || "", n = n || "";
|
|
85
|
-
const r =
|
|
85
|
+
const r = gn.filter((i) => e.indexOf(i) < 0 && n.indexOf(i) < 0);
|
|
86
86
|
if (r.length === 0) return !0;
|
|
87
|
-
const a =
|
|
87
|
+
const a = fn.getRegExp(`(${r.map((i) => i === "?" ? "\\?" : i).join("|")})`);
|
|
88
88
|
let s = !a.test(t);
|
|
89
89
|
if (!s) {
|
|
90
90
|
const i = t.indexOf(n);
|
|
91
91
|
i > 0 && !a.test(t.substring(0, i)) && (s = !0);
|
|
92
92
|
}
|
|
93
93
|
return s;
|
|
94
|
-
},
|
|
94
|
+
}, Be = (t, e, n = ".") => {
|
|
95
95
|
if (!t) return;
|
|
96
96
|
if (t[e])
|
|
97
97
|
return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
|
|
@@ -111,7 +111,7 @@ const pn = [" ", ",", "?", "!", ";"], gn = new dn(20), fn = (t, e, n) => {
|
|
|
111
111
|
a = i;
|
|
112
112
|
}
|
|
113
113
|
return a;
|
|
114
|
-
},
|
|
114
|
+
}, ge = (t) => t?.replace("_", "-"), mn = {
|
|
115
115
|
type: "logger",
|
|
116
116
|
log(t) {
|
|
117
117
|
this.output("log", t);
|
|
@@ -126,12 +126,12 @@ const pn = [" ", ",", "?", "!", ";"], gn = new dn(20), fn = (t, e, n) => {
|
|
|
126
126
|
console?.[t]?.apply?.(console, e);
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
class
|
|
129
|
+
class xe {
|
|
130
130
|
constructor(e, n = {}) {
|
|
131
131
|
this.init(e, n);
|
|
132
132
|
}
|
|
133
133
|
init(e, n = {}) {
|
|
134
|
-
this.prefix = n.prefix || "i18next:", this.logger = e ||
|
|
134
|
+
this.prefix = n.prefix || "i18next:", this.logger = e || mn, this.options = n, this.debug = n.debug;
|
|
135
135
|
}
|
|
136
136
|
log(...e) {
|
|
137
137
|
return this.forward(e, "log", "", !0);
|
|
@@ -149,17 +149,17 @@ class be {
|
|
|
149
149
|
return a && !this.debug ? null : (E(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[n](e));
|
|
150
150
|
}
|
|
151
151
|
create(e) {
|
|
152
|
-
return new
|
|
152
|
+
return new xe(this.logger, {
|
|
153
153
|
prefix: `${this.prefix}:${e}:`,
|
|
154
154
|
...this.options
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
clone(e) {
|
|
158
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
158
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new xe(this.logger, e);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
var
|
|
162
|
-
class
|
|
161
|
+
var W = new xe();
|
|
162
|
+
class Se {
|
|
163
163
|
constructor() {
|
|
164
164
|
this.observers = {};
|
|
165
165
|
}
|
|
@@ -189,7 +189,7 @@ class ke {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class
|
|
192
|
+
class Je extends Se {
|
|
193
193
|
constructor(e, n = {
|
|
194
194
|
ns: ["translation"],
|
|
195
195
|
defaultNS: "translation"
|
|
@@ -207,15 +207,15 @@ class Xe extends ke {
|
|
|
207
207
|
const s = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, i = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
208
208
|
let o;
|
|
209
209
|
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, n], r && (Array.isArray(r) ? o.push(...r) : E(r) && s ? o.push(...r.split(s)) : o.push(r)));
|
|
210
|
-
const c =
|
|
211
|
-
return !c && !n && !r && e.indexOf(".") > -1 && (e = o[0], n = o[1], r = o.slice(2).join(".")), c || !i || !E(r) ? c :
|
|
210
|
+
const c = be(this.data, o);
|
|
211
|
+
return !c && !n && !r && e.indexOf(".") > -1 && (e = o[0], n = o[1], r = o.slice(2).join(".")), c || !i || !E(r) ? c : Be(this.data?.[e]?.[n], r, s);
|
|
212
212
|
}
|
|
213
213
|
addResource(e, n, r, a, s = {
|
|
214
214
|
silent: !1
|
|
215
215
|
}) {
|
|
216
216
|
const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
|
|
217
217
|
let o = [e, n];
|
|
218
|
-
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = n, n = o[1]), this.addNamespaces(n),
|
|
218
|
+
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), a = n, n = o[1]), this.addNamespaces(n), Xe(this.data, o, a), s.silent || this.emit("added", e, n, r, a);
|
|
219
219
|
}
|
|
220
220
|
addResources(e, n, r, a = {
|
|
221
221
|
silent: !1
|
|
@@ -232,11 +232,11 @@ class Xe extends ke {
|
|
|
232
232
|
}) {
|
|
233
233
|
let o = [e, n];
|
|
234
234
|
e.indexOf(".") > -1 && (o = e.split("."), a = r, r = n, n = o[1]), this.addNamespaces(n);
|
|
235
|
-
let c =
|
|
236
|
-
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ?
|
|
235
|
+
let c = be(this.data, o) || {};
|
|
236
|
+
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), a ? At(c, r, s) : c = {
|
|
237
237
|
...c,
|
|
238
238
|
...r
|
|
239
|
-
},
|
|
239
|
+
}, Xe(this.data, o, c), i.silent || this.emit("added", e, n, r);
|
|
240
240
|
}
|
|
241
241
|
removeResourceBundle(e, n) {
|
|
242
242
|
this.hasResourceBundle(e, n) && delete this.data[e][n], this.removeNamespaces(n), this.emit("removed", e, n);
|
|
@@ -258,7 +258,7 @@ class Xe extends ke {
|
|
|
258
258
|
return this.data;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
var
|
|
261
|
+
var Lt = {
|
|
262
262
|
processors: {},
|
|
263
263
|
addPostProcessor(t) {
|
|
264
264
|
this.processors[t.name] = t;
|
|
@@ -269,22 +269,22 @@ var At = {
|
|
|
269
269
|
}), e;
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
|
-
const
|
|
273
|
-
function
|
|
272
|
+
const Ft = /* @__PURE__ */ Symbol("i18next/PATH_KEY");
|
|
273
|
+
function yn() {
|
|
274
274
|
const t = [], e = /* @__PURE__ */ Object.create(null);
|
|
275
275
|
let n;
|
|
276
|
-
return e.get = (r, a) => (n?.revoke?.(), a ===
|
|
276
|
+
return e.get = (r, a) => (n?.revoke?.(), a === Ft ? t : (t.push(a), n = Proxy.revocable(r, e), n.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Me(t, e) {
|
|
279
279
|
const {
|
|
280
|
-
[
|
|
281
|
-
} = t(
|
|
280
|
+
[Ft]: n
|
|
281
|
+
} = t(yn());
|
|
282
282
|
return n.join(e?.keySeparator ?? ".");
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
class
|
|
284
|
+
const Qe = {}, Ne = (t) => !E(t) && typeof t != "boolean" && typeof t != "number";
|
|
285
|
+
class ve extends Se {
|
|
286
286
|
constructor(e, n = {}) {
|
|
287
|
-
super(),
|
|
287
|
+
super(), sn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = W.create("translator");
|
|
288
288
|
}
|
|
289
289
|
changeLanguage(e) {
|
|
290
290
|
e && (this.language = e);
|
|
@@ -298,7 +298,7 @@ class xe extends ke {
|
|
|
298
298
|
if (e == null) return !1;
|
|
299
299
|
const a = this.resolve(e, r);
|
|
300
300
|
if (a?.res === void 0) return !1;
|
|
301
|
-
const s =
|
|
301
|
+
const s = Ne(a.res);
|
|
302
302
|
return !(r.returnObjects === !1 && s);
|
|
303
303
|
}
|
|
304
304
|
extractFromKey(e, n) {
|
|
@@ -306,7 +306,7 @@ class xe extends ke {
|
|
|
306
306
|
r === void 0 && (r = ":");
|
|
307
307
|
const a = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
308
308
|
let s = n.ns || this.options.defaultNS || [];
|
|
309
|
-
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !
|
|
309
|
+
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !hn(e, r, a);
|
|
310
310
|
if (i && !o) {
|
|
311
311
|
const c = e.match(this.interpolator.nestingRegexp);
|
|
312
312
|
if (c && c.length > 0)
|
|
@@ -329,7 +329,7 @@ class xe extends ke {
|
|
|
329
329
|
if (typeof a != "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), typeof a == "object" && (a = {
|
|
330
330
|
...a
|
|
331
331
|
}), a || (a = {}), e == null) return "";
|
|
332
|
-
typeof e == "function" && (e =
|
|
332
|
+
typeof e == "function" && (e = Me(e, {
|
|
333
333
|
...this.options,
|
|
334
334
|
...a
|
|
335
335
|
})), Array.isArray(e) || (e = [String(e)]);
|
|
@@ -358,71 +358,71 @@ class xe extends ke {
|
|
|
358
358
|
} : o;
|
|
359
359
|
const x = this.resolve(e, a);
|
|
360
360
|
let d = x?.res;
|
|
361
|
-
const g = x?.usedKey || o, f = x?.exactUsedKey || o, v = ["[object Number]", "[object Function]", "[object RegExp]"], y = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject, S = a.count !== void 0 && !E(a.count), A =
|
|
361
|
+
const g = x?.usedKey || o, f = x?.exactUsedKey || o, v = ["[object Number]", "[object Function]", "[object RegExp]"], y = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject, S = a.count !== void 0 && !E(a.count), A = ve.hasDefaultValue(a), O = S ? this.pluralResolver.getSuffix(u, a.count, a) : "", R = a.ordinal && S ? this.pluralResolver.getSuffix(u, a.count, {
|
|
362
362
|
ordinal: !1
|
|
363
363
|
}) : "", _ = S && !a.ordinal && a.count === 0, L = _ && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${O}`] || a[`defaultValue${R}`] || a.defaultValue;
|
|
364
364
|
let F = d;
|
|
365
365
|
w && !d && A && (F = L);
|
|
366
|
-
const N =
|
|
366
|
+
const N = Ne(F), T = Object.prototype.toString.apply(F);
|
|
367
367
|
if (w && F && N && v.indexOf(T) < 0 && !(E(y) && Array.isArray(F))) {
|
|
368
368
|
if (!a.returnObjects && !this.options.returnObjects) {
|
|
369
369
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
370
|
-
const
|
|
370
|
+
const I = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, F, {
|
|
371
371
|
...a,
|
|
372
372
|
ns: c
|
|
373
373
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
374
|
-
return s ? (x.res =
|
|
374
|
+
return s ? (x.res = I, x.usedParams = this.getUsedParamsDetails(a), x) : I;
|
|
375
375
|
}
|
|
376
376
|
if (i) {
|
|
377
|
-
const
|
|
378
|
-
for (const
|
|
379
|
-
if (Object.prototype.hasOwnProperty.call(F,
|
|
380
|
-
const
|
|
381
|
-
A && !d ? C[
|
|
377
|
+
const I = Array.isArray(F), C = I ? [] : {}, M = I ? f : g;
|
|
378
|
+
for (const $ in F)
|
|
379
|
+
if (Object.prototype.hasOwnProperty.call(F, $)) {
|
|
380
|
+
const z = `${M}${i}${$}`;
|
|
381
|
+
A && !d ? C[$] = this.translate(z, {
|
|
382
382
|
...a,
|
|
383
|
-
defaultValue:
|
|
383
|
+
defaultValue: Ne(L) ? L[$] : void 0,
|
|
384
384
|
joinArrays: !1,
|
|
385
385
|
ns: c
|
|
386
|
-
}) : C[
|
|
386
|
+
}) : C[$] = this.translate(z, {
|
|
387
387
|
...a,
|
|
388
388
|
joinArrays: !1,
|
|
389
389
|
ns: c
|
|
390
|
-
}), C[
|
|
390
|
+
}), C[$] === z && (C[$] = F[$]);
|
|
391
391
|
}
|
|
392
392
|
d = C;
|
|
393
393
|
}
|
|
394
394
|
} else if (w && E(y) && Array.isArray(d))
|
|
395
395
|
d = d.join(y), d && (d = this.extendTranslation(d, e, a, r));
|
|
396
396
|
else {
|
|
397
|
-
let
|
|
398
|
-
!this.isValidLookup(d) && A && (
|
|
399
|
-
const
|
|
400
|
-
if (C ||
|
|
401
|
-
if (this.logger.log(
|
|
397
|
+
let I = !1, C = !1;
|
|
398
|
+
!this.isValidLookup(d) && A && (I = !0, d = L), this.isValidLookup(d) || (C = !0, d = o);
|
|
399
|
+
const $ = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && C ? void 0 : d, z = A && L !== d && this.options.updateMissing;
|
|
400
|
+
if (C || I || z) {
|
|
401
|
+
if (this.logger.log(z ? "updateKey" : "missingKey", u, l, o, z ? L : d), i) {
|
|
402
402
|
const P = this.resolve(o, {
|
|
403
403
|
...a,
|
|
404
404
|
keySeparator: !1
|
|
405
405
|
});
|
|
406
406
|
P && P.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
407
407
|
}
|
|
408
|
-
let
|
|
409
|
-
const
|
|
410
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
411
|
-
for (let P = 0; P <
|
|
412
|
-
|
|
413
|
-
else this.options.saveMissingTo === "all" ?
|
|
414
|
-
const
|
|
415
|
-
const
|
|
416
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(P, l,
|
|
408
|
+
let D = [];
|
|
409
|
+
const te = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
410
|
+
if (this.options.saveMissingTo === "fallback" && te && te[0])
|
|
411
|
+
for (let P = 0; P < te.length; P++)
|
|
412
|
+
D.push(te[P]);
|
|
413
|
+
else this.options.saveMissingTo === "all" ? D = this.languageUtils.toResolveHierarchy(a.lng || this.language) : D.push(a.lng || this.language);
|
|
414
|
+
const Z = (P, V, q) => {
|
|
415
|
+
const ne = A && q !== d ? q : $;
|
|
416
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(P, l, V, ne, z, a) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(P, l, V, ne, z, a), this.emit("missingKey", P, l, V, d);
|
|
417
417
|
};
|
|
418
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && S ?
|
|
419
|
-
const
|
|
420
|
-
_ && a[`defaultValue${this.options.pluralSeparator}zero`] &&
|
|
421
|
-
|
|
418
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && S ? D.forEach((P) => {
|
|
419
|
+
const V = this.pluralResolver.getSuffixes(P, a);
|
|
420
|
+
_ && a[`defaultValue${this.options.pluralSeparator}zero`] && V.indexOf(`${this.options.pluralSeparator}zero`) < 0 && V.push(`${this.options.pluralSeparator}zero`), V.forEach((q) => {
|
|
421
|
+
Z([P], o + q, a[`defaultValue${q}`] || L);
|
|
422
422
|
});
|
|
423
|
-
}) :
|
|
423
|
+
}) : Z(D, o, L));
|
|
424
424
|
}
|
|
425
|
-
d = this.extendTranslation(d, e, a, x, r), C && d === o && this.options.appendNamespaceToMissingKey && (d = `${l}${p}${o}`), (C ||
|
|
425
|
+
d = this.extendTranslation(d, e, a, x, r), C && d === o && this.options.appendNamespaceToMissingKey && (d = `${l}${p}${o}`), (C || I) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${p}${o}` : o, I ? d : void 0, a));
|
|
426
426
|
}
|
|
427
427
|
return s ? (x.res = d, x.usedParams = this.getUsedParamsDetails(a), x) : d;
|
|
428
428
|
}
|
|
@@ -459,7 +459,7 @@ class xe extends ke {
|
|
|
459
459
|
!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: ${n[0]}`), null) : this.translate(...u, n), r)), r.interpolation && this.interpolator.reset();
|
|
460
460
|
}
|
|
461
461
|
const i = r.postProcess || this.options.postProcess, o = E(i) ? [i] : i;
|
|
462
|
-
return e != null && o?.length && r.applyPostProcessor !== !1 && (e =
|
|
462
|
+
return e != null && o?.length && r.applyPostProcessor !== !1 && (e = Lt.handle(o, e, n, this.options && this.options.postProcessPassResolved ? {
|
|
463
463
|
i18nResolved: {
|
|
464
464
|
...a,
|
|
465
465
|
usedParams: this.getUsedParamsDetails(r)
|
|
@@ -477,7 +477,7 @@ class xe extends ke {
|
|
|
477
477
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
478
478
|
const h = n.count !== void 0 && !E(n.count), x = h && !n.ordinal && n.count === 0, d = n.context !== void 0 && (E(n.context) || typeof n.context == "number") && n.context !== "", g = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
|
|
479
479
|
u.forEach((f) => {
|
|
480
|
-
this.isValidLookup(r) || (o = f, !
|
|
480
|
+
this.isValidLookup(r) || (o = f, !Qe[`${g[0]}-${f}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Qe[`${g[0]}-${f}`] = !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((v) => {
|
|
481
481
|
if (this.isValidLookup(r)) return;
|
|
482
482
|
i = v;
|
|
483
483
|
const y = [p];
|
|
@@ -534,17 +534,17 @@ class xe extends ke {
|
|
|
534
534
|
return !1;
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
class
|
|
537
|
+
class et {
|
|
538
538
|
constructor(e) {
|
|
539
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
539
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = W.create("languageUtils");
|
|
540
540
|
}
|
|
541
541
|
getScriptPartFromCode(e) {
|
|
542
|
-
if (e =
|
|
542
|
+
if (e = ge(e), !e || e.indexOf("-") < 0) return null;
|
|
543
543
|
const n = e.split("-");
|
|
544
544
|
return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-"));
|
|
545
545
|
}
|
|
546
546
|
getLanguagePartFromCode(e) {
|
|
547
|
-
if (e =
|
|
547
|
+
if (e = ge(e), !e || e.indexOf("-") < 0) return e;
|
|
548
548
|
const n = e.split("-");
|
|
549
549
|
return this.formatLanguageCode(n[0]);
|
|
550
550
|
}
|
|
@@ -598,28 +598,28 @@ class Qe {
|
|
|
598
598
|
}), a;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
const
|
|
601
|
+
const tt = {
|
|
602
602
|
zero: 0,
|
|
603
603
|
one: 1,
|
|
604
604
|
two: 2,
|
|
605
605
|
few: 3,
|
|
606
606
|
many: 4,
|
|
607
607
|
other: 5
|
|
608
|
-
},
|
|
608
|
+
}, nt = {
|
|
609
609
|
select: (t) => t === 1 ? "one" : "other",
|
|
610
610
|
resolvedOptions: () => ({
|
|
611
611
|
pluralCategories: ["one", "other"]
|
|
612
612
|
})
|
|
613
613
|
};
|
|
614
|
-
class
|
|
614
|
+
class bn {
|
|
615
615
|
constructor(e, n = {}) {
|
|
616
|
-
this.languageUtils = e, this.options = n, this.logger =
|
|
616
|
+
this.languageUtils = e, this.options = n, this.logger = W.create("pluralResolver"), this.pluralRulesCache = {};
|
|
617
617
|
}
|
|
618
618
|
clearCache() {
|
|
619
619
|
this.pluralRulesCache = {};
|
|
620
620
|
}
|
|
621
621
|
getRule(e, n = {}) {
|
|
622
|
-
const r =
|
|
622
|
+
const r = ge(e === "dev" ? "en" : e), a = n.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({
|
|
623
623
|
cleanedCode: r,
|
|
624
624
|
type: a
|
|
625
625
|
});
|
|
@@ -632,8 +632,8 @@ class yn {
|
|
|
632
632
|
});
|
|
633
633
|
} catch {
|
|
634
634
|
if (typeof Intl > "u")
|
|
635
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
636
|
-
if (!e.match(/-|_/)) return
|
|
635
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), nt;
|
|
636
|
+
if (!e.match(/-|_/)) return nt;
|
|
637
637
|
const c = this.languageUtils.getLanguagePartFromCode(e);
|
|
638
638
|
i = this.getRule(c, n);
|
|
639
639
|
}
|
|
@@ -648,20 +648,20 @@ class yn {
|
|
|
648
648
|
}
|
|
649
649
|
getSuffixes(e, n = {}) {
|
|
650
650
|
let r = this.getRule(e, n);
|
|
651
|
-
return r || (r = this.getRule("dev", n)), r ? r.resolvedOptions().pluralCategories.sort((a, s) =>
|
|
651
|
+
return r || (r = this.getRule("dev", n)), r ? r.resolvedOptions().pluralCategories.sort((a, s) => tt[a] - tt[s]).map((a) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : [];
|
|
652
652
|
}
|
|
653
653
|
getSuffix(e, n, r = {}) {
|
|
654
654
|
const a = this.getRule(e, r);
|
|
655
655
|
return a ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(n)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", n, r));
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
let s =
|
|
660
|
-
return !s && a && E(n) && (s =
|
|
661
|
-
},
|
|
662
|
-
class
|
|
658
|
+
const rt = (t, e, n, r = ".", a = !0) => {
|
|
659
|
+
let s = cn(t, e, n);
|
|
660
|
+
return !s && a && E(n) && (s = Be(t, n, r), s === void 0 && (s = Be(e, n, r))), s;
|
|
661
|
+
}, Ce = (t) => t.replace(/\$/g, "$$$$");
|
|
662
|
+
class at {
|
|
663
663
|
constructor(e = {}) {
|
|
664
|
-
this.logger =
|
|
664
|
+
this.logger = W.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((n) => n), this.init(e);
|
|
665
665
|
}
|
|
666
666
|
init(e = {}) {
|
|
667
667
|
e.interpolation || (e.interpolation = {
|
|
@@ -686,7 +686,7 @@ class rt {
|
|
|
686
686
|
maxReplaces: v,
|
|
687
687
|
alwaysFormat: y
|
|
688
688
|
} = e.interpolation;
|
|
689
|
-
this.escape = n !== void 0 ? n :
|
|
689
|
+
this.escape = n !== void 0 ? n : dn, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = s ? J(s) : i || "{{", this.suffix = o ? J(o) : c || "}}", this.formatSeparator = l || ",", this.unescapePrefix = p ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : p || "", this.nestingPrefix = h ? J(h) : x || J("$t("), this.nestingSuffix = d ? J(d) : g || J(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
|
|
690
690
|
}
|
|
691
691
|
reset() {
|
|
692
692
|
this.options && this.init(this.options);
|
|
@@ -699,7 +699,7 @@ class rt {
|
|
|
699
699
|
let s, i, o;
|
|
700
700
|
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (x) => {
|
|
701
701
|
if (x.indexOf(this.formatSeparator) < 0) {
|
|
702
|
-
const v =
|
|
702
|
+
const v = rt(n, c, x, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
703
703
|
return this.alwaysFormat ? this.format(v, void 0, r, {
|
|
704
704
|
...a,
|
|
705
705
|
...n,
|
|
@@ -707,7 +707,7 @@ class rt {
|
|
|
707
707
|
}) : v;
|
|
708
708
|
}
|
|
709
709
|
const d = x.split(this.formatSeparator), g = d.shift().trim(), f = d.join(this.formatSeparator).trim();
|
|
710
|
-
return this.format(
|
|
710
|
+
return this.format(rt(n, c, g, this.options.keySeparator, this.options.ignoreJSONStructure), f, r, {
|
|
711
711
|
...a,
|
|
712
712
|
...n,
|
|
713
713
|
interpolationkey: g
|
|
@@ -717,10 +717,10 @@ class rt {
|
|
|
717
717
|
const p = a?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = a?.interpolation?.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
718
718
|
return [{
|
|
719
719
|
regex: this.regexpUnescape,
|
|
720
|
-
safeValue: (x) =>
|
|
720
|
+
safeValue: (x) => Ce(x)
|
|
721
721
|
}, {
|
|
722
722
|
regex: this.regexp,
|
|
723
|
-
safeValue: (x) => this.escapeValue ?
|
|
723
|
+
safeValue: (x) => this.escapeValue ? Ce(this.escape(x)) : Ce(x)
|
|
724
724
|
}].forEach((x) => {
|
|
725
725
|
for (o = 0; s = x.regex.exec(e); ) {
|
|
726
726
|
const d = s[1].trim();
|
|
@@ -735,7 +735,7 @@ class rt {
|
|
|
735
735
|
continue;
|
|
736
736
|
} else
|
|
737
737
|
this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`), i = "";
|
|
738
|
-
else !E(i) && !this.useRawValueToEscape && (i =
|
|
738
|
+
else !E(i) && !this.useRawValueToEscape && (i = Ge(i));
|
|
739
739
|
const g = x.safeValue(i);
|
|
740
740
|
if (e = e.replace(s[0], g), u ? (x.regex.lastIndex += i.length, x.regex.lastIndex -= s[0].length) : x.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
741
741
|
break;
|
|
@@ -747,7 +747,7 @@ class rt {
|
|
|
747
747
|
const o = (c, l) => {
|
|
748
748
|
const p = this.nestingOptionsSeparator;
|
|
749
749
|
if (c.indexOf(p) < 0) return c;
|
|
750
|
-
const u = c.split(new RegExp(`${
|
|
750
|
+
const u = c.split(new RegExp(`${J(p)}[ ]*{`));
|
|
751
751
|
let h = `{${u[1]}`;
|
|
752
752
|
c = u[0], h = this.interpolate(h, i);
|
|
753
753
|
const x = h.match(/'/g), d = h.match(/"/g);
|
|
@@ -769,7 +769,7 @@ class rt {
|
|
|
769
769
|
}, i = i.replace && !E(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
770
770
|
const l = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
771
771
|
if (l !== -1 && (c = a[1].slice(l).split(this.formatSeparator).map((p) => p.trim()).filter(Boolean), a[1] = a[1].slice(0, l)), s = n(o.call(this, a[1].trim(), i), i), s && a[0] === e && !E(s)) return s;
|
|
772
|
-
E(s) || (s =
|
|
772
|
+
E(s) || (s = Ge(s)), s || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), s = ""), c.length && (s = c.reduce((p, u) => this.format(p, u, r.lng, {
|
|
773
773
|
...r,
|
|
774
774
|
interpolationkey: a[1].trim()
|
|
775
775
|
}), s.trim())), e = e.replace(a[0], s), this.regexp.lastIndex = 0;
|
|
@@ -777,7 +777,7 @@ class rt {
|
|
|
777
777
|
return e;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
const
|
|
780
|
+
const xn = (t) => {
|
|
781
781
|
let e = t.toLowerCase().trim();
|
|
782
782
|
const n = {};
|
|
783
783
|
if (t.indexOf("(") > -1) {
|
|
@@ -795,7 +795,7 @@ const bn = (t) => {
|
|
|
795
795
|
formatName: e,
|
|
796
796
|
formatOptions: n
|
|
797
797
|
};
|
|
798
|
-
},
|
|
798
|
+
}, st = (t) => {
|
|
799
799
|
const e = {};
|
|
800
800
|
return (n, r, a) => {
|
|
801
801
|
let s = a;
|
|
@@ -805,18 +805,18 @@ const bn = (t) => {
|
|
|
805
805
|
});
|
|
806
806
|
const i = r + JSON.stringify(s);
|
|
807
807
|
let o = e[i];
|
|
808
|
-
return o || (o = t(
|
|
808
|
+
return o || (o = t(ge(r), a), e[i] = o), o(n);
|
|
809
809
|
};
|
|
810
|
-
},
|
|
811
|
-
class
|
|
810
|
+
}, vn = (t) => (e, n, r) => t(ge(n), r)(e);
|
|
811
|
+
class wn {
|
|
812
812
|
constructor(e = {}) {
|
|
813
|
-
this.logger =
|
|
813
|
+
this.logger = W.create("formatter"), this.options = e, this.init(e);
|
|
814
814
|
}
|
|
815
815
|
init(e, n = {
|
|
816
816
|
interpolation: {}
|
|
817
817
|
}) {
|
|
818
818
|
this.formatSeparator = n.interpolation.formatSeparator || ",";
|
|
819
|
-
const r = n.cacheInBuiltFormats ?
|
|
819
|
+
const r = n.cacheInBuiltFormats ? st : vn;
|
|
820
820
|
this.formats = {
|
|
821
821
|
number: r((a, s) => {
|
|
822
822
|
const i = new Intl.NumberFormat(a, {
|
|
@@ -855,7 +855,7 @@ class vn {
|
|
|
855
855
|
this.formats[e.toLowerCase().trim()] = n;
|
|
856
856
|
}
|
|
857
857
|
addCached(e, n) {
|
|
858
|
-
this.formats[e.toLowerCase().trim()] =
|
|
858
|
+
this.formats[e.toLowerCase().trim()] = st(n);
|
|
859
859
|
}
|
|
860
860
|
format(e, n, r, a = {}) {
|
|
861
861
|
const s = n.split(this.formatSeparator);
|
|
@@ -867,7 +867,7 @@ class vn {
|
|
|
867
867
|
const {
|
|
868
868
|
formatName: l,
|
|
869
869
|
formatOptions: p
|
|
870
|
-
} =
|
|
870
|
+
} = xn(c);
|
|
871
871
|
if (this.formats[l]) {
|
|
872
872
|
let u = o;
|
|
873
873
|
try {
|
|
@@ -887,12 +887,12 @@ class vn {
|
|
|
887
887
|
}, e);
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
const
|
|
890
|
+
const kn = (t, e) => {
|
|
891
891
|
t.pending[e] !== void 0 && (delete t.pending[e], t.pendingCount--);
|
|
892
892
|
};
|
|
893
|
-
class
|
|
893
|
+
class Sn extends Se {
|
|
894
894
|
constructor(e, n, r, a = {}) {
|
|
895
|
-
super(), this.backend = e, this.store = n, this.services = r, this.languageUtils = r.languageUtils, this.options = a, this.logger =
|
|
895
|
+
super(), this.backend = e, this.store = n, 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);
|
|
896
896
|
}
|
|
897
897
|
queueLoad(e, n, r, a) {
|
|
898
898
|
const s = {}, i = {}, o = {}, c = {};
|
|
@@ -922,7 +922,7 @@ class kn extends ke {
|
|
|
922
922
|
}), this.state[e] = n ? -1 : 2, n && r && (this.state[e] = 0);
|
|
923
923
|
const o = {};
|
|
924
924
|
this.queue.forEach((c) => {
|
|
925
|
-
|
|
925
|
+
ln(c.loaded, [s], i), kn(c, e), n && c.errors.push(n), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((l) => {
|
|
926
926
|
o[l] || (o[l] = {});
|
|
927
927
|
const p = c.loaded[l];
|
|
928
928
|
p.length && p.forEach((u) => {
|
|
@@ -1020,7 +1020,7 @@ class kn extends ke {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1023
|
+
const Te = () => ({
|
|
1024
1024
|
debug: !1,
|
|
1025
1025
|
initAsync: !0,
|
|
1026
1026
|
ns: ["translation"],
|
|
@@ -1077,19 +1077,19 @@ const Ce = () => ({
|
|
|
1077
1077
|
skipOnVariables: !0
|
|
1078
1078
|
},
|
|
1079
1079
|
cacheInBuiltFormats: !0
|
|
1080
|
-
}),
|
|
1081
|
-
},
|
|
1080
|
+
}), it = (t) => (E(t.ns) && (t.ns = [t.ns]), E(t.fallbackLng) && (t.fallbackLng = [t.fallbackLng]), E(t.fallbackNS) && (t.fallbackNS = [t.fallbackNS]), t.supportedLngs?.indexOf?.("cimode") < 0 && (t.supportedLngs = t.supportedLngs.concat(["cimode"])), typeof t.initImmediate == "boolean" && (t.initAsync = t.initImmediate), t), me = () => {
|
|
1081
|
+
}, En = (t) => {
|
|
1082
1082
|
Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((n) => {
|
|
1083
1083
|
typeof t[n] == "function" && (t[n] = t[n].bind(t));
|
|
1084
1084
|
});
|
|
1085
1085
|
};
|
|
1086
|
-
let
|
|
1087
|
-
const
|
|
1088
|
-
class
|
|
1086
|
+
let ot = !1;
|
|
1087
|
+
const An = (t) => !!(t?.modules?.backend?.name?.indexOf("Locize") > 0 || t?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || t?.options?.backend?.backends && t.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0));
|
|
1088
|
+
class pe extends Se {
|
|
1089
1089
|
constructor(e = {}, n) {
|
|
1090
|
-
if (super(), this.options =
|
|
1090
|
+
if (super(), this.options = it(e), this.services = {}, this.logger = W, this.modules = {
|
|
1091
1091
|
external: []
|
|
1092
|
-
},
|
|
1092
|
+
}, En(this), n && !this.isInitialized && !e.isClone) {
|
|
1093
1093
|
if (!this.options.initAsync)
|
|
1094
1094
|
return this.init(e, n), this;
|
|
1095
1095
|
setTimeout(() => {
|
|
@@ -1099,37 +1099,37 @@ class de extends ke {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
init(e = {}, n) {
|
|
1101
1101
|
this.isInitializing = !0, typeof e == "function" && (n = e, e = {}), e.defaultNS == null && e.ns && (E(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1102
|
-
const r =
|
|
1102
|
+
const r = Te();
|
|
1103
1103
|
this.options = {
|
|
1104
1104
|
...r,
|
|
1105
1105
|
...this.options,
|
|
1106
|
-
...
|
|
1106
|
+
...it(e)
|
|
1107
1107
|
}, this.options.interpolation = {
|
|
1108
1108
|
...r.interpolation,
|
|
1109
1109
|
...this.options.interpolation
|
|
1110
|
-
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = r.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !
|
|
1110
|
+
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = r.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !An(this) && !ot && (typeof console < "u" && typeof console.info < "u" && console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), ot = !0);
|
|
1111
1111
|
const a = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1112
1112
|
if (!this.options.isClone) {
|
|
1113
|
-
this.modules.logger ?
|
|
1113
|
+
this.modules.logger ? W.init(a(this.modules.logger), this.options) : W.init(null, this.options);
|
|
1114
1114
|
let l;
|
|
1115
|
-
this.modules.formatter ? l = this.modules.formatter : l =
|
|
1116
|
-
const p = new
|
|
1117
|
-
this.store = new
|
|
1115
|
+
this.modules.formatter ? l = this.modules.formatter : l = wn;
|
|
1116
|
+
const p = new et(this.options);
|
|
1117
|
+
this.store = new Je(this.options.resources, this.options);
|
|
1118
1118
|
const u = this.services;
|
|
1119
|
-
u.logger =
|
|
1119
|
+
u.logger = W, u.resourceStore = this.store, u.languageUtils = p, u.pluralResolver = new bn(p, {
|
|
1120
1120
|
prepend: this.options.pluralSeparator,
|
|
1121
1121
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1122
|
-
}), 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"), l && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(l), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
1122
|
+
}), 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"), l && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = a(l), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new at(this.options), u.utils = {
|
|
1123
1123
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1124
|
-
}, u.backendConnector = new
|
|
1124
|
+
}, u.backendConnector = new Sn(a(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (x, ...d) => {
|
|
1125
1125
|
this.emit(x, ...d);
|
|
1126
|
-
}), 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
|
|
1126
|
+
}), 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 ve(this.services, this.options), this.translator.on("*", (x, ...d) => {
|
|
1127
1127
|
this.emit(x, ...d);
|
|
1128
1128
|
}), this.modules.external.forEach((x) => {
|
|
1129
1129
|
x.init && x.init(this);
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
|
-
if (this.format = this.options.interpolation.format, n || (n =
|
|
1132
|
+
if (this.format = this.options.interpolation.format, n || (n = me), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1133
1133
|
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1134
1134
|
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
1135
1135
|
}
|
|
@@ -1138,7 +1138,7 @@ class de extends ke {
|
|
|
1138
1138
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
|
|
1139
1139
|
this[l] = (...p) => (this.store[l](...p), this);
|
|
1140
1140
|
});
|
|
1141
|
-
const o =
|
|
1141
|
+
const o = ie(), c = () => {
|
|
1142
1142
|
const l = (p, u) => {
|
|
1143
1143
|
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(u), n(p, u);
|
|
1144
1144
|
};
|
|
@@ -1147,7 +1147,7 @@ class de extends ke {
|
|
|
1147
1147
|
};
|
|
1148
1148
|
return this.options.resources || !this.options.initAsync ? c() : setTimeout(c, 0), o;
|
|
1149
1149
|
}
|
|
1150
|
-
loadResources(e, n =
|
|
1150
|
+
loadResources(e, n = me) {
|
|
1151
1151
|
let r = n;
|
|
1152
1152
|
const a = E(e) ? e : this.language;
|
|
1153
1153
|
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
@@ -1165,15 +1165,15 @@ class de extends ke {
|
|
|
1165
1165
|
r(null);
|
|
1166
1166
|
}
|
|
1167
1167
|
reloadResources(e, n, r) {
|
|
1168
|
-
const a =
|
|
1169
|
-
return typeof e == "function" && (r = e, e = void 0), typeof n == "function" && (r = n, n = void 0), e || (e = this.languages), n || (n = this.options.ns), r || (r =
|
|
1168
|
+
const a = ie();
|
|
1169
|
+
return typeof e == "function" && (r = e, e = void 0), typeof n == "function" && (r = n, n = void 0), e || (e = this.languages), n || (n = this.options.ns), r || (r = me), this.services.backendConnector.reload(e, n, (s) => {
|
|
1170
1170
|
a.resolve(), r(s);
|
|
1171
1171
|
}), a;
|
|
1172
1172
|
}
|
|
1173
1173
|
use(e) {
|
|
1174
1174
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1175
1175
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1176
|
-
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" &&
|
|
1176
|
+
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" && Lt.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1177
1177
|
}
|
|
1178
1178
|
setResolvedLanguage(e) {
|
|
1179
1179
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1189,7 +1189,7 @@ class de extends ke {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
changeLanguage(e, n) {
|
|
1191
1191
|
this.isLanguageChangingTo = e;
|
|
1192
|
-
const r =
|
|
1192
|
+
const r = ie();
|
|
1193
1193
|
this.emit("languageChanging", e);
|
|
1194
1194
|
const a = (o) => {
|
|
1195
1195
|
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
@@ -1212,10 +1212,10 @@ class de extends ke {
|
|
|
1212
1212
|
}, c.lng = c.lng || a.lng, c.lngs = c.lngs || a.lngs, c.ns = c.ns || a.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || r || a.keyPrefix);
|
|
1213
1213
|
const l = this.options.keySeparator || ".";
|
|
1214
1214
|
let p;
|
|
1215
|
-
return c.keyPrefix && Array.isArray(s) ? p = s.map((u) => (typeof u == "function" && (u =
|
|
1215
|
+
return c.keyPrefix && Array.isArray(s) ? p = s.map((u) => (typeof u == "function" && (u = Me(u, {
|
|
1216
1216
|
...this.options,
|
|
1217
1217
|
...i
|
|
1218
|
-
})), `${c.keyPrefix}${l}${u}`)) : (typeof s == "function" && (s =
|
|
1218
|
+
})), `${c.keyPrefix}${l}${u}`)) : (typeof s == "function" && (s = Me(s, {
|
|
1219
1219
|
...this.options,
|
|
1220
1220
|
...i
|
|
1221
1221
|
})), p = c.keyPrefix ? `${c.keyPrefix}${l}${s}` : s), this.t(p, c);
|
|
@@ -1249,7 +1249,7 @@ class de extends ke {
|
|
|
1249
1249
|
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || i(r, e) && (!a || i(s, e)));
|
|
1250
1250
|
}
|
|
1251
1251
|
loadNamespaces(e, n) {
|
|
1252
|
-
const r =
|
|
1252
|
+
const r = ie();
|
|
1253
1253
|
return this.options.ns ? (E(e) && (e = [e]), e.forEach((a) => {
|
|
1254
1254
|
this.options.ns.indexOf(a) < 0 && this.options.ns.push(a);
|
|
1255
1255
|
}), this.loadResources((a) => {
|
|
@@ -1257,7 +1257,7 @@ class de extends ke {
|
|
|
1257
1257
|
}), r) : (n && n(), Promise.resolve());
|
|
1258
1258
|
}
|
|
1259
1259
|
loadLanguages(e, n) {
|
|
1260
|
-
const r =
|
|
1260
|
+
const r = ie();
|
|
1261
1261
|
E(e) && (e = [e]);
|
|
1262
1262
|
const a = this.options.preload || [], s = e.filter((i) => a.indexOf(i) < 0 && this.services.languageUtils.isSupportedCode(i));
|
|
1263
1263
|
return s.length ? (this.options.preload = a.concat(s), this.loadResources((i) => {
|
|
@@ -1274,21 +1274,21 @@ class de extends ke {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
} catch {
|
|
1276
1276
|
}
|
|
1277
|
-
const n = ["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
|
|
1277
|
+
const n = ["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 et(Te());
|
|
1278
1278
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : n.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1279
1279
|
}
|
|
1280
1280
|
static createInstance(e = {}, n) {
|
|
1281
|
-
const r = new
|
|
1282
|
-
return r.createInstance =
|
|
1281
|
+
const r = new pe(e, n);
|
|
1282
|
+
return r.createInstance = pe.createInstance, r;
|
|
1283
1283
|
}
|
|
1284
|
-
cloneInstance(e = {}, n =
|
|
1284
|
+
cloneInstance(e = {}, n = me) {
|
|
1285
1285
|
const r = e.forkResourceStore;
|
|
1286
1286
|
r && delete e.forkResourceStore;
|
|
1287
1287
|
const a = {
|
|
1288
1288
|
...this.options,
|
|
1289
1289
|
...e,
|
|
1290
1290
|
isClone: !0
|
|
1291
|
-
}, s = new
|
|
1291
|
+
}, s = new pe(a);
|
|
1292
1292
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
|
|
1293
1293
|
s[o] = this[o];
|
|
1294
1294
|
}), s.services = {
|
|
@@ -1301,20 +1301,20 @@ class de extends ke {
|
|
|
1301
1301
|
}, c[l] = Object.keys(c[l]).reduce((p, u) => (p[u] = {
|
|
1302
1302
|
...c[l][u]
|
|
1303
1303
|
}, p), c[l]), c), {});
|
|
1304
|
-
s.store = new
|
|
1304
|
+
s.store = new Je(o, a), s.services.resourceStore = s.store;
|
|
1305
1305
|
}
|
|
1306
1306
|
if (e.interpolation) {
|
|
1307
1307
|
const c = {
|
|
1308
|
-
...
|
|
1308
|
+
...Te().interpolation,
|
|
1309
1309
|
...this.options.interpolation,
|
|
1310
1310
|
...e.interpolation
|
|
1311
1311
|
}, l = {
|
|
1312
1312
|
...a,
|
|
1313
1313
|
interpolation: c
|
|
1314
1314
|
};
|
|
1315
|
-
s.services.interpolator = new
|
|
1315
|
+
s.services.interpolator = new at(l);
|
|
1316
1316
|
}
|
|
1317
|
-
return s.translator = new
|
|
1317
|
+
return s.translator = new ve(s.services, a), s.translator.on("*", (o, ...c) => {
|
|
1318
1318
|
s.emit(o, ...c);
|
|
1319
1319
|
}), s.init(a, n), s.translator.options = a, s.translator.backendConnector.services.utils = {
|
|
1320
1320
|
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
@@ -1330,32 +1330,32 @@ class de extends ke {
|
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1333
|
+
const B = pe.createInstance();
|
|
1334
|
+
B.createInstance;
|
|
1335
|
+
B.dir;
|
|
1336
|
+
B.init;
|
|
1337
|
+
B.loadResources;
|
|
1338
|
+
B.reloadResources;
|
|
1339
|
+
B.use;
|
|
1340
|
+
B.changeLanguage;
|
|
1341
|
+
B.getFixedT;
|
|
1342
|
+
B.t;
|
|
1343
|
+
B.exists;
|
|
1344
|
+
B.setDefaultNamespace;
|
|
1345
|
+
B.hasLoadedNamespace;
|
|
1346
|
+
B.loadNamespaces;
|
|
1347
|
+
B.loadLanguages;
|
|
1348
|
+
const Ln = (t, e, n, r) => {
|
|
1349
1349
|
const a = [n, {
|
|
1350
1350
|
code: e,
|
|
1351
1351
|
...r || {}
|
|
1352
1352
|
}];
|
|
1353
1353
|
if (t?.services?.logger?.forward)
|
|
1354
1354
|
return t.services.logger.forward(a, "warn", "react-i18next::", !0);
|
|
1355
|
-
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1358
|
-
},
|
|
1355
|
+
ee(a[0]) && (a[0] = `react-i18next:: ${a[0]}`), t?.services?.logger?.warn ? t.services.logger.warn(...a) : console?.warn && console.warn(...a);
|
|
1356
|
+
}, lt = {}, Ot = (t, e, n, r) => {
|
|
1357
|
+
ee(n) && lt[n] || (ee(n) && (lt[n] = /* @__PURE__ */ new Date()), Ln(t, e, n, r));
|
|
1358
|
+
}, Rt = (t, e) => () => {
|
|
1359
1359
|
if (t.isInitialized)
|
|
1360
1360
|
e();
|
|
1361
1361
|
else {
|
|
@@ -1366,21 +1366,21 @@ const An = (t, e, n, r) => {
|
|
|
1366
1366
|
};
|
|
1367
1367
|
t.on("initialized", n);
|
|
1368
1368
|
}
|
|
1369
|
-
},
|
|
1370
|
-
t.loadNamespaces(e,
|
|
1371
|
-
},
|
|
1372
|
-
if (
|
|
1369
|
+
}, ze = (t, e, n) => {
|
|
1370
|
+
t.loadNamespaces(e, Rt(t, n));
|
|
1371
|
+
}, ct = (t, e, n, r) => {
|
|
1372
|
+
if (ee(n) && (n = [n]), t.options.preload && t.options.preload.indexOf(e) > -1) return ze(t, n, r);
|
|
1373
1373
|
n.forEach((a) => {
|
|
1374
1374
|
t.options.ns.indexOf(a) < 0 && t.options.ns.push(a);
|
|
1375
|
-
}), t.loadLanguages(e,
|
|
1376
|
-
},
|
|
1375
|
+
}), t.loadLanguages(e, Rt(t, r));
|
|
1376
|
+
}, Fn = (t, e, n = {}) => !e.languages || !e.languages.length ? (Ot(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
1377
1377
|
languages: e.languages
|
|
1378
1378
|
}), !0) : e.hasLoadedNamespace(t, {
|
|
1379
1379
|
lng: n.lng,
|
|
1380
1380
|
precheck: (r, a) => {
|
|
1381
1381
|
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !a(r.isLanguageChangingTo, t)) return !1;
|
|
1382
1382
|
}
|
|
1383
|
-
}),
|
|
1383
|
+
}), ee = (t) => typeof t == "string", On = (t) => typeof t == "object" && t !== null, Rn = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Nn = {
|
|
1384
1384
|
"&": "&",
|
|
1385
1385
|
"&": "&",
|
|
1386
1386
|
"<": "<",
|
|
@@ -1401,8 +1401,8 @@ const An = (t, e, n, r) => {
|
|
|
1401
1401
|
"…": "…",
|
|
1402
1402
|
"/": "/",
|
|
1403
1403
|
"/": "/"
|
|
1404
|
-
},
|
|
1405
|
-
let
|
|
1404
|
+
}, Cn = (t) => Nn[t], Tn = (t) => t.replace(Rn, Cn);
|
|
1405
|
+
let Ue = {
|
|
1406
1406
|
bindI18n: "languageChanged",
|
|
1407
1407
|
bindI18nStore: "",
|
|
1408
1408
|
transEmptyNodeValue: "",
|
|
@@ -1410,25 +1410,25 @@ let ze = {
|
|
|
1410
1410
|
transWrapTextNodes: "",
|
|
1411
1411
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
1412
1412
|
useSuspense: !0,
|
|
1413
|
-
unescape:
|
|
1413
|
+
unescape: Tn,
|
|
1414
1414
|
transDefaultProps: void 0
|
|
1415
1415
|
};
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1418
|
-
...
|
|
1416
|
+
const _n = (t = {}) => {
|
|
1417
|
+
Ue = {
|
|
1418
|
+
...Ue,
|
|
1419
1419
|
...t
|
|
1420
1420
|
};
|
|
1421
|
-
},
|
|
1422
|
-
let
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1421
|
+
}, Pn = () => Ue;
|
|
1422
|
+
let Nt;
|
|
1423
|
+
const In = (t) => {
|
|
1424
|
+
Nt = t;
|
|
1425
|
+
}, $n = () => Nt, Dn = {
|
|
1426
1426
|
type: "3rdParty",
|
|
1427
1427
|
init(t) {
|
|
1428
|
-
|
|
1428
|
+
_n(t.options.react), In(t);
|
|
1429
1429
|
}
|
|
1430
|
-
},
|
|
1431
|
-
class
|
|
1430
|
+
}, Ct = ke();
|
|
1431
|
+
class jn {
|
|
1432
1432
|
constructor() {
|
|
1433
1433
|
this.usedNamespaces = {};
|
|
1434
1434
|
}
|
|
@@ -1441,12 +1441,12 @@ class $n {
|
|
|
1441
1441
|
return Object.keys(this.usedNamespaces);
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
var
|
|
1445
|
-
var
|
|
1446
|
-
function
|
|
1447
|
-
if (
|
|
1448
|
-
|
|
1449
|
-
var t =
|
|
1444
|
+
var _e = { exports: {} }, Pe = {};
|
|
1445
|
+
var ut;
|
|
1446
|
+
function Bn() {
|
|
1447
|
+
if (ut) return Pe;
|
|
1448
|
+
ut = 1;
|
|
1449
|
+
var t = je;
|
|
1450
1450
|
function e(u, h) {
|
|
1451
1451
|
return u === h && (u !== 0 || 1 / u === 1 / h) || u !== u && h !== h;
|
|
1452
1452
|
}
|
|
@@ -1481,36 +1481,36 @@ function Dn() {
|
|
|
1481
1481
|
return h();
|
|
1482
1482
|
}
|
|
1483
1483
|
var p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : o;
|
|
1484
|
-
return
|
|
1484
|
+
return Pe.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : p, Pe;
|
|
1485
1485
|
}
|
|
1486
|
-
var
|
|
1487
|
-
function
|
|
1488
|
-
return
|
|
1486
|
+
var dt;
|
|
1487
|
+
function Mn() {
|
|
1488
|
+
return dt || (dt = 1, _e.exports = Bn()), _e.exports;
|
|
1489
1489
|
}
|
|
1490
|
-
var
|
|
1491
|
-
const
|
|
1492
|
-
t:
|
|
1490
|
+
var zn = Mn();
|
|
1491
|
+
const Un = (t, e) => ee(e) ? e : On(e) && ee(e.defaultValue) ? e.defaultValue : Array.isArray(t) ? t[t.length - 1] : t, Hn = {
|
|
1492
|
+
t: Un,
|
|
1493
1493
|
ready: !1
|
|
1494
|
-
},
|
|
1495
|
-
},
|
|
1494
|
+
}, Vn = () => () => {
|
|
1495
|
+
}, He = (t, e = {}) => {
|
|
1496
1496
|
const {
|
|
1497
1497
|
i18n: n
|
|
1498
1498
|
} = e, {
|
|
1499
1499
|
i18n: r,
|
|
1500
1500
|
defaultNS: a
|
|
1501
|
-
} =
|
|
1502
|
-
s && !s.reportNamespaces && (s.reportNamespaces = new
|
|
1503
|
-
const i =
|
|
1504
|
-
...
|
|
1501
|
+
} = St(Ct) || {}, s = n || r || $n();
|
|
1502
|
+
s && !s.reportNamespaces && (s.reportNamespaces = new jn()), s || Ot(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
1503
|
+
const i = ue(() => ({
|
|
1504
|
+
...Pn(),
|
|
1505
1505
|
...s?.options?.react,
|
|
1506
1506
|
...e
|
|
1507
1507
|
}), [s, e]), {
|
|
1508
1508
|
useSuspense: o,
|
|
1509
1509
|
keyPrefix: c
|
|
1510
|
-
} = i, l = a || s?.options?.defaultNS, p =
|
|
1510
|
+
} = i, l = a || s?.options?.defaultNS, p = ee(l) ? [l] : l || ["translation"], u = ue(() => p, p);
|
|
1511
1511
|
s?.reportNamespaces?.addUsedNamespaces?.(u);
|
|
1512
|
-
const h =
|
|
1513
|
-
if (!s) return
|
|
1512
|
+
const h = he(0), x = K((L) => {
|
|
1513
|
+
if (!s) return Vn;
|
|
1514
1514
|
const {
|
|
1515
1515
|
bindI18n: F,
|
|
1516
1516
|
bindI18nStore: N
|
|
@@ -1518,12 +1518,12 @@ const zn = (t, e) => Q(e) ? e : Fn(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1518
1518
|
h.current += 1, L();
|
|
1519
1519
|
};
|
|
1520
1520
|
return F && s.on(F, T), N && s.store.on(N, T), () => {
|
|
1521
|
-
F && F.split(" ").forEach((
|
|
1521
|
+
F && F.split(" ").forEach((I) => s.off(I, T)), N && N.split(" ").forEach((I) => s.store.off(I, T));
|
|
1522
1522
|
};
|
|
1523
|
-
}, [s, i]), d =
|
|
1523
|
+
}, [s, i]), d = he(), g = K(() => {
|
|
1524
1524
|
if (!s)
|
|
1525
|
-
return
|
|
1526
|
-
const L = !!(s.isInitialized || s.initializedStoreOnce) && u.every((
|
|
1525
|
+
return Hn;
|
|
1526
|
+
const L = !!(s.isInitialized || s.initializedStoreOnce) && u.every((M) => Fn(M, s, i)), F = e.lng || s.language, N = h.current, T = d.current;
|
|
1527
1527
|
if (T && T.ready === L && T.lng === F && T.keyPrefix === c && T.revision === N)
|
|
1528
1528
|
return T;
|
|
1529
1529
|
const C = {
|
|
@@ -1534,17 +1534,17 @@ const zn = (t, e) => Q(e) ? e : Fn(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1534
1534
|
revision: N
|
|
1535
1535
|
};
|
|
1536
1536
|
return d.current = C, C;
|
|
1537
|
-
}, [s, u, c, i, e.lng]), [f, v] =
|
|
1537
|
+
}, [s, u, c, i, e.lng]), [f, v] = Et(0), {
|
|
1538
1538
|
t: y,
|
|
1539
1539
|
ready: w
|
|
1540
|
-
} =
|
|
1541
|
-
|
|
1540
|
+
} = zn.useSyncExternalStore(x, g, g);
|
|
1541
|
+
tn(() => {
|
|
1542
1542
|
if (s && !w && !o) {
|
|
1543
1543
|
const L = () => v((F) => F + 1);
|
|
1544
|
-
e.lng ?
|
|
1544
|
+
e.lng ? ct(s, e.lng, u, L) : ze(s, u, L);
|
|
1545
1545
|
}
|
|
1546
1546
|
}, [s, e.lng, u, w, o, f]);
|
|
1547
|
-
const S = s || {}, A =
|
|
1547
|
+
const S = s || {}, A = he(null), O = he(), R = (L) => {
|
|
1548
1548
|
const F = Object.getOwnPropertyDescriptors(L);
|
|
1549
1549
|
F.__original && delete F.__original;
|
|
1550
1550
|
const N = Object.create(Object.getPrototypeOf(L), F);
|
|
@@ -1559,7 +1559,7 @@ const zn = (t, e) => Q(e) ? e : Fn(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1559
1559
|
} catch {
|
|
1560
1560
|
}
|
|
1561
1561
|
return N;
|
|
1562
|
-
}, _ =
|
|
1562
|
+
}, _ = ue(() => {
|
|
1563
1563
|
const L = S, F = L?.language;
|
|
1564
1564
|
let N = L;
|
|
1565
1565
|
L && (A.current && A.current.__original === L ? O.current !== F ? (N = R(L), A.current = N, O.current = F) : N = A.current : (N = R(L), A.current = N, O.current = F));
|
|
@@ -1569,25 +1569,25 @@ const zn = (t, e) => Q(e) ? e : Fn(e) && Q(e.defaultValue) ? e.defaultValue : Ar
|
|
|
1569
1569
|
if (s && o && !w)
|
|
1570
1570
|
throw new Promise((L) => {
|
|
1571
1571
|
const F = () => L();
|
|
1572
|
-
e.lng ?
|
|
1572
|
+
e.lng ? ct(s, e.lng, u, F) : ze(s, u, F);
|
|
1573
1573
|
});
|
|
1574
1574
|
return _;
|
|
1575
1575
|
};
|
|
1576
|
-
function
|
|
1576
|
+
function Zn({
|
|
1577
1577
|
i18n: t,
|
|
1578
1578
|
defaultNS: e,
|
|
1579
1579
|
children: n
|
|
1580
1580
|
}) {
|
|
1581
|
-
const r =
|
|
1581
|
+
const r = ue(() => ({
|
|
1582
1582
|
i18n: t,
|
|
1583
1583
|
defaultNS: e
|
|
1584
1584
|
}), [t, e]);
|
|
1585
|
-
return
|
|
1585
|
+
return ye(Ct.Provider, {
|
|
1586
1586
|
value: r
|
|
1587
1587
|
}, n);
|
|
1588
1588
|
}
|
|
1589
|
-
const
|
|
1590
|
-
const { t: o } =
|
|
1589
|
+
const qn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPreviousStep: s, onUpdateResponse: i }) => {
|
|
1590
|
+
const { t: o } = He(), l = ((p) => {
|
|
1591
1591
|
let u = 0;
|
|
1592
1592
|
if (e.startTransition) {
|
|
1593
1593
|
if (p === u)
|
|
@@ -1628,8 +1628,8 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1628
1628
|
customOptOutButton: f,
|
|
1629
1629
|
optOutButtonText: v
|
|
1630
1630
|
} = l.transition;
|
|
1631
|
-
return /* @__PURE__ */ k
|
|
1632
|
-
|
|
1631
|
+
return /* @__PURE__ */ k(
|
|
1632
|
+
Ea,
|
|
1633
1633
|
{
|
|
1634
1634
|
title: p,
|
|
1635
1635
|
description: u,
|
|
@@ -1644,8 +1644,8 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1644
1644
|
}
|
|
1645
1645
|
if (l.type === "end") {
|
|
1646
1646
|
const { title: p, description: u, image: h, customEndButton: x, endButtonText: d, customEndButtonLink: g, endButtonLink: f } = l.transition;
|
|
1647
|
-
return /* @__PURE__ */ k
|
|
1648
|
-
|
|
1647
|
+
return /* @__PURE__ */ k(
|
|
1648
|
+
Sa,
|
|
1649
1649
|
{
|
|
1650
1650
|
title: p,
|
|
1651
1651
|
description: u,
|
|
@@ -1662,8 +1662,8 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1662
1662
|
if (!p) throw new Error("No question found");
|
|
1663
1663
|
if (p.questionType === "choice") {
|
|
1664
1664
|
const { title: u, description: h, image: x, alternatives: d, maxSelections: g, required: f, verticalAlignment: v } = p, y = n.responses[p.id] || [], w = (g ? y.length <= g || g === 4 : !0) && (f ? y.length > 0 : !0);
|
|
1665
|
-
return /* @__PURE__ */ k
|
|
1666
|
-
|
|
1665
|
+
return /* @__PURE__ */ k(
|
|
1666
|
+
va,
|
|
1667
1667
|
{
|
|
1668
1668
|
title: u,
|
|
1669
1669
|
description: h,
|
|
@@ -1691,8 +1691,8 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1691
1691
|
}
|
|
1692
1692
|
if (p.questionType === "text") {
|
|
1693
1693
|
const { title: u, description: h, image: x, maxChars: d, limited: g, required: f } = p, v = n.responses[p.id] || "", y = (g && d ? v.length <= d : !0) && (f ? v.length > 0 : !0);
|
|
1694
|
-
return /* @__PURE__ */ k
|
|
1695
|
-
|
|
1694
|
+
return /* @__PURE__ */ k(
|
|
1695
|
+
ka,
|
|
1696
1696
|
{
|
|
1697
1697
|
title: u,
|
|
1698
1698
|
icon: e.icon,
|
|
@@ -1714,12 +1714,12 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
return null;
|
|
1717
|
-
},
|
|
1718
|
-
const s = (t.startTransition ? 1 : 0) + t.questions.length + (t.endTransition ? 1 : 0) - 1, [i, o] =
|
|
1717
|
+
}, Wn = ({ form: t, onDismiss: e, onComplete: n, zIndex: r = 100 }) => {
|
|
1718
|
+
const s = (t.startTransition ? 1 : 0) + t.questions.length + (t.endTransition ? 1 : 0) - 1, [i, o] = Et({
|
|
1719
1719
|
responses: {},
|
|
1720
1720
|
currentStep: 0,
|
|
1721
1721
|
startedAt: /* @__PURE__ */ new Date()
|
|
1722
|
-
}), c =
|
|
1722
|
+
}), c = K((h, x) => {
|
|
1723
1723
|
o((d) => ({
|
|
1724
1724
|
...d,
|
|
1725
1725
|
responses: {
|
|
@@ -1727,12 +1727,12 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1727
1727
|
[h]: x
|
|
1728
1728
|
}
|
|
1729
1729
|
}));
|
|
1730
|
-
}, []), l =
|
|
1730
|
+
}, []), l = K((h) => {
|
|
1731
1731
|
o((x) => ({
|
|
1732
1732
|
...x,
|
|
1733
1733
|
currentStep: h
|
|
1734
1734
|
}));
|
|
1735
|
-
}, []), p =
|
|
1735
|
+
}, []), p = K(() => {
|
|
1736
1736
|
if (i.currentStep < s)
|
|
1737
1737
|
l(i.currentStep + 1);
|
|
1738
1738
|
else {
|
|
@@ -1742,16 +1742,16 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1742
1742
|
};
|
|
1743
1743
|
n(h);
|
|
1744
1744
|
}
|
|
1745
|
-
}, [i, s, l, n]), u =
|
|
1745
|
+
}, [i, s, l, n]), u = K(() => {
|
|
1746
1746
|
i.currentStep > 0 && l(i.currentStep - 1);
|
|
1747
1747
|
}, [i.currentStep, l]);
|
|
1748
|
-
return /* @__PURE__ */ k
|
|
1748
|
+
return /* @__PURE__ */ k(
|
|
1749
1749
|
"div",
|
|
1750
1750
|
{
|
|
1751
1751
|
className: "flex flex-col justify-center items-center fixed inset-0 bg-overlay-background-default-light dark:bg-overlay-background-default-dark",
|
|
1752
1752
|
style: { zIndex: r },
|
|
1753
|
-
children: /* @__PURE__ */ k
|
|
1754
|
-
|
|
1753
|
+
children: /* @__PURE__ */ k(
|
|
1754
|
+
qn,
|
|
1755
1755
|
{
|
|
1756
1756
|
step: i.currentStep,
|
|
1757
1757
|
form: t,
|
|
@@ -1764,7 +1764,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1764
1764
|
)
|
|
1765
1765
|
}
|
|
1766
1766
|
);
|
|
1767
|
-
},
|
|
1767
|
+
}, Gn = /* @__PURE__ */ new Map([
|
|
1768
1768
|
[
|
|
1769
1769
|
"bold",
|
|
1770
1770
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
@@ -1795,7 +1795,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1795
1795
|
"thin",
|
|
1796
1796
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
1797
1797
|
]
|
|
1798
|
-
]),
|
|
1798
|
+
]), Kn = /* @__PURE__ */ new Map([
|
|
1799
1799
|
[
|
|
1800
1800
|
"bold",
|
|
1801
1801
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
@@ -1820,7 +1820,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1820
1820
|
"thin",
|
|
1821
1821
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
1822
1822
|
]
|
|
1823
|
-
]),
|
|
1823
|
+
]), Yn = /* @__PURE__ */ new Map([
|
|
1824
1824
|
[
|
|
1825
1825
|
"bold",
|
|
1826
1826
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
@@ -1845,7 +1845,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1845
1845
|
"thin",
|
|
1846
1846
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
1847
1847
|
]
|
|
1848
|
-
]),
|
|
1848
|
+
]), Xn = /* @__PURE__ */ new Map([
|
|
1849
1849
|
[
|
|
1850
1850
|
"bold",
|
|
1851
1851
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
@@ -1870,7 +1870,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1870
1870
|
"thin",
|
|
1871
1871
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
1872
1872
|
]
|
|
1873
|
-
]),
|
|
1873
|
+
]), Jn = /* @__PURE__ */ new Map([
|
|
1874
1874
|
[
|
|
1875
1875
|
"bold",
|
|
1876
1876
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
@@ -1901,12 +1901,12 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1901
1901
|
"thin",
|
|
1902
1902
|
/* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.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" }))
|
|
1903
1903
|
]
|
|
1904
|
-
]),
|
|
1904
|
+
]), Tt = ke({
|
|
1905
1905
|
color: "currentColor",
|
|
1906
1906
|
size: "1em",
|
|
1907
1907
|
weight: "regular",
|
|
1908
1908
|
mirrored: !1
|
|
1909
|
-
}),
|
|
1909
|
+
}), se = b.forwardRef(
|
|
1910
1910
|
(t, e) => {
|
|
1911
1911
|
const {
|
|
1912
1912
|
alt: n,
|
|
@@ -1923,7 +1923,7 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1923
1923
|
weight: h = "regular",
|
|
1924
1924
|
mirrored: x = !1,
|
|
1925
1925
|
...d
|
|
1926
|
-
} = b.useContext(
|
|
1926
|
+
} = b.useContext(Tt);
|
|
1927
1927
|
return /* @__PURE__ */ b.createElement(
|
|
1928
1928
|
"svg",
|
|
1929
1929
|
{
|
|
@@ -1943,63 +1943,63 @@ const Zn = ({ step: t, form: e, formState: n, onDismiss: r, onNextStep: a, onPre
|
|
|
1943
1943
|
);
|
|
1944
1944
|
}
|
|
1945
1945
|
);
|
|
1946
|
-
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
const
|
|
1956
|
-
|
|
1957
|
-
function
|
|
1946
|
+
se.displayName = "IconBase";
|
|
1947
|
+
const _t = b.forwardRef((t, e) => /* @__PURE__ */ b.createElement(se, { ref: e, ...t, weights: Gn }));
|
|
1948
|
+
_t.displayName = "ArrowSquareOutIcon";
|
|
1949
|
+
const Pt = b.forwardRef((t, e) => /* @__PURE__ */ b.createElement(se, { ref: e, ...t, weights: Kn }));
|
|
1950
|
+
Pt.displayName = "CaretLeftIcon";
|
|
1951
|
+
const It = b.forwardRef((t, e) => /* @__PURE__ */ b.createElement(se, { ref: e, ...t, weights: Yn }));
|
|
1952
|
+
It.displayName = "CaretRightIcon";
|
|
1953
|
+
const $t = b.forwardRef((t, e) => /* @__PURE__ */ b.createElement(se, { ref: e, ...t, weights: Xn }));
|
|
1954
|
+
$t.displayName = "CircleNotchIcon";
|
|
1955
|
+
const Ee = b.forwardRef((t, e) => /* @__PURE__ */ b.createElement(se, { ref: e, ...t, weights: Jn }));
|
|
1956
|
+
Ee.displayName = "XIcon";
|
|
1957
|
+
function Dt(t) {
|
|
1958
1958
|
var e, n, r = "";
|
|
1959
1959
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1960
1960
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1961
1961
|
var a = t.length;
|
|
1962
|
-
for (e = 0; e < a; e++) t[e] && (n =
|
|
1962
|
+
for (e = 0; e < a; e++) t[e] && (n = Dt(t[e])) && (r && (r += " "), r += n);
|
|
1963
1963
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1964
1964
|
return r;
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1967
|
-
for (var t, e, n = 0, r = "", a = arguments.length; n < a; n++) (t = arguments[n]) && (e =
|
|
1966
|
+
function jt() {
|
|
1967
|
+
for (var t, e, n = 0, r = "", a = arguments.length; n < a; n++) (t = arguments[n]) && (e = Dt(t)) && (r && (r += " "), r += e);
|
|
1968
1968
|
return r;
|
|
1969
1969
|
}
|
|
1970
|
-
var
|
|
1970
|
+
var Qn = Object.create, Ae = Object.defineProperty, er = Object.defineProperties, tr = Object.getOwnPropertyDescriptor, nr = Object.getOwnPropertyDescriptors, Bt = Object.getOwnPropertyNames, we = Object.getOwnPropertySymbols, rr = Object.getPrototypeOf, Ve = Object.prototype.hasOwnProperty, Mt = Object.prototype.propertyIsEnumerable, pt = (t, e, n) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, G = (t, e) => {
|
|
1971
1971
|
for (var n in e || (e = {}))
|
|
1972
|
-
|
|
1973
|
-
if (
|
|
1974
|
-
for (var n of
|
|
1975
|
-
|
|
1972
|
+
Ve.call(e, n) && pt(t, n, e[n]);
|
|
1973
|
+
if (we)
|
|
1974
|
+
for (var n of we(e))
|
|
1975
|
+
Mt.call(e, n) && pt(t, n, e[n]);
|
|
1976
1976
|
return t;
|
|
1977
|
-
},
|
|
1977
|
+
}, Le = (t, e) => er(t, nr(e)), zt = (t, e) => {
|
|
1978
1978
|
var n = {};
|
|
1979
1979
|
for (var r in t)
|
|
1980
|
-
|
|
1981
|
-
if (t != null &&
|
|
1982
|
-
for (var r of
|
|
1983
|
-
e.indexOf(r) < 0 &&
|
|
1980
|
+
Ve.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
1981
|
+
if (t != null && we)
|
|
1982
|
+
for (var r of we(t))
|
|
1983
|
+
e.indexOf(r) < 0 && Mt.call(t, r) && (n[r] = t[r]);
|
|
1984
1984
|
return n;
|
|
1985
|
-
},
|
|
1986
|
-
return e || (0, t[
|
|
1987
|
-
},
|
|
1985
|
+
}, ar = (t, e) => function() {
|
|
1986
|
+
return e || (0, t[Bt(t)[0]])((e = { exports: {} }).exports, e), e.exports;
|
|
1987
|
+
}, sr = (t, e) => {
|
|
1988
1988
|
for (var n in e)
|
|
1989
|
-
|
|
1990
|
-
},
|
|
1989
|
+
Ae(t, n, { get: e[n], enumerable: !0 });
|
|
1990
|
+
}, ir = (t, e, n, r) => {
|
|
1991
1991
|
if (e && typeof e == "object" || typeof e == "function")
|
|
1992
|
-
for (let a of
|
|
1993
|
-
!
|
|
1992
|
+
for (let a of Bt(e))
|
|
1993
|
+
!Ve.call(t, a) && a !== n && Ae(t, a, { get: () => e[a], enumerable: !(r = tr(e, a)) || r.enumerable });
|
|
1994
1994
|
return t;
|
|
1995
|
-
},
|
|
1995
|
+
}, or = (t, e, n) => (n = t != null ? Qn(rr(t)) : {}, ir(
|
|
1996
1996
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
1997
1997
|
// file that has been converted to a CommonJS file using a Babel-
|
|
1998
1998
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
1999
1999
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
2000
|
-
!t || !t.__esModule ?
|
|
2000
|
+
!t || !t.__esModule ? Ae(n, "default", { value: t, enumerable: !0 }) : n,
|
|
2001
2001
|
t
|
|
2002
|
-
)),
|
|
2002
|
+
)), lr = ar({
|
|
2003
2003
|
"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(t, e) {
|
|
2004
2004
|
var n = (function() {
|
|
2005
2005
|
var r = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, a = 0, s = {}, i = {
|
|
@@ -2442,36 +2442,36 @@ var Jn = Object.create, Ee = Object.defineProperty, Qn = Object.defineProperties
|
|
|
2442
2442
|
var T = R.pattern.toString().match(/[imsuy]*$/)[0];
|
|
2443
2443
|
R.pattern = RegExp(R.pattern.source, T + "g");
|
|
2444
2444
|
}
|
|
2445
|
-
for (var
|
|
2446
|
-
var
|
|
2445
|
+
for (var I = R.pattern || R, C = v.next, M = y; C !== g.tail && !(w && M >= w.reach); M += C.value.length, C = C.next) {
|
|
2446
|
+
var $ = C.value;
|
|
2447
2447
|
if (g.length > d.length)
|
|
2448
2448
|
return;
|
|
2449
|
-
if (!(
|
|
2450
|
-
var
|
|
2449
|
+
if (!($ instanceof o)) {
|
|
2450
|
+
var z = 1, D;
|
|
2451
2451
|
if (F) {
|
|
2452
|
-
if (
|
|
2452
|
+
if (D = c(I, M, d, L), !D || D.index >= d.length)
|
|
2453
2453
|
break;
|
|
2454
|
-
var
|
|
2455
|
-
for (
|
|
2456
|
-
C = C.next,
|
|
2457
|
-
if (
|
|
2454
|
+
var V = D.index, te = D.index + D[0].length, Z = M;
|
|
2455
|
+
for (Z += C.value.length; V >= Z; )
|
|
2456
|
+
C = C.next, Z += C.value.length;
|
|
2457
|
+
if (Z -= C.value.length, M = Z, C.value instanceof o)
|
|
2458
2458
|
continue;
|
|
2459
|
-
for (var P = C; P !== g.tail && (
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
} else if (
|
|
2459
|
+
for (var P = C; P !== g.tail && (Z < te || typeof P.value == "string"); P = P.next)
|
|
2460
|
+
z++, Z += P.value.length;
|
|
2461
|
+
z--, $ = d.slice(M, Z), D.index -= M;
|
|
2462
|
+
} else if (D = c(I, 0, $, L), !D)
|
|
2463
2463
|
continue;
|
|
2464
|
-
var
|
|
2465
|
-
w &&
|
|
2466
|
-
var
|
|
2467
|
-
|
|
2468
|
-
var
|
|
2469
|
-
if (C = u(g,
|
|
2470
|
-
var
|
|
2464
|
+
var V = D.index, q = D[0], ne = $.slice(0, V), qe = $.slice(V + q.length), Oe = M + $.length;
|
|
2465
|
+
w && Oe > w.reach && (w.reach = Oe);
|
|
2466
|
+
var fe = C.prev;
|
|
2467
|
+
ne && (fe = u(g, fe, ne), M += ne.length), h(g, fe, z);
|
|
2468
|
+
var en = new o(S, _ ? i.tokenize(q, _) : q, N, q);
|
|
2469
|
+
if (C = u(g, fe, en), qe && u(g, C, qe), z > 1) {
|
|
2470
|
+
var Re = {
|
|
2471
2471
|
cause: S + "," + O,
|
|
2472
|
-
reach:
|
|
2472
|
+
reach: Oe
|
|
2473
2473
|
};
|
|
2474
|
-
l(d, g, f, C.prev,
|
|
2474
|
+
l(d, g, f, C.prev, M, Re), w && Re.reach > w.reach && (w.reach = Re.reach);
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
@@ -2500,7 +2500,7 @@ var Jn = Object.create, Ee = Object.defineProperty, Qn = Object.defineProperties
|
|
|
2500
2500
|
})();
|
|
2501
2501
|
e.exports = n, n.default = n;
|
|
2502
2502
|
}
|
|
2503
|
-
}), m =
|
|
2503
|
+
}), m = or(lr());
|
|
2504
2504
|
m.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] }, m.languages.markup.tag.inside["attr-value"].inside.entity = m.languages.markup.entity, m.languages.markup.doctype.inside["internal-subset"].inside = m.languages.markup, m.hooks.add("wrap", function(t) {
|
|
2505
2505
|
t.type === "entity" && (t.attributes.title = t.content.replace(/&/, "&"));
|
|
2506
2506
|
}), Object.defineProperty(m.languages.markup.tag, "addInlined", { value: function(t, r) {
|
|
@@ -2771,30 +2771,30 @@ m.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
2771
2771
|
return n;
|
|
2772
2772
|
}) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), t.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: t.languages.cpp } } } }), t.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), t.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: t.languages.extend("cpp", {}) } }), t.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, t.languages.cpp["base-clause"]);
|
|
2773
2773
|
})(m), m.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: /[{}[\];(),.:]/ }, m.languages.python["string-interpolation"].inside.interpolation.inside.rest = m.languages.python, m.languages.py = m.languages.python, m.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" } }, m.languages.webmanifest = m.languages.json;
|
|
2774
|
-
var
|
|
2775
|
-
|
|
2776
|
-
dracula: () =>
|
|
2777
|
-
duotoneDark: () =>
|
|
2778
|
-
duotoneLight: () =>
|
|
2779
|
-
github: () =>
|
|
2780
|
-
gruvboxMaterialDark: () =>
|
|
2781
|
-
gruvboxMaterialLight: () =>
|
|
2782
|
-
jettwaveDark: () =>
|
|
2783
|
-
jettwaveLight: () =>
|
|
2784
|
-
nightOwl: () =>
|
|
2785
|
-
nightOwlLight: () =>
|
|
2786
|
-
oceanicNext: () =>
|
|
2787
|
-
okaidia: () =>
|
|
2788
|
-
oneDark: () =>
|
|
2789
|
-
oneLight: () =>
|
|
2790
|
-
palenight: () =>
|
|
2791
|
-
shadesOfPurple: () =>
|
|
2792
|
-
synthwave84: () =>
|
|
2793
|
-
ultramin: () =>
|
|
2794
|
-
vsDark: () =>
|
|
2795
|
-
vsLight: () =>
|
|
2774
|
+
var cr = {};
|
|
2775
|
+
sr(cr, {
|
|
2776
|
+
dracula: () => dr,
|
|
2777
|
+
duotoneDark: () => gr,
|
|
2778
|
+
duotoneLight: () => hr,
|
|
2779
|
+
github: () => yr,
|
|
2780
|
+
gruvboxMaterialDark: () => qr,
|
|
2781
|
+
gruvboxMaterialLight: () => Gr,
|
|
2782
|
+
jettwaveDark: () => jr,
|
|
2783
|
+
jettwaveLight: () => Mr,
|
|
2784
|
+
nightOwl: () => xr,
|
|
2785
|
+
nightOwlLight: () => wr,
|
|
2786
|
+
oceanicNext: () => Sr,
|
|
2787
|
+
okaidia: () => Ar,
|
|
2788
|
+
oneDark: () => Ur,
|
|
2789
|
+
oneLight: () => Vr,
|
|
2790
|
+
palenight: () => Fr,
|
|
2791
|
+
shadesOfPurple: () => Rr,
|
|
2792
|
+
synthwave84: () => Cr,
|
|
2793
|
+
ultramin: () => _r,
|
|
2794
|
+
vsDark: () => Ut,
|
|
2795
|
+
vsLight: () => $r
|
|
2796
2796
|
});
|
|
2797
|
-
var
|
|
2797
|
+
var ur = {
|
|
2798
2798
|
plain: {
|
|
2799
2799
|
color: "#F8F8F2",
|
|
2800
2800
|
backgroundColor: "#282A36"
|
|
@@ -2856,7 +2856,7 @@ var cr = {
|
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
2858
|
]
|
|
2859
|
-
},
|
|
2859
|
+
}, dr = ur, pr = {
|
|
2860
2860
|
plain: {
|
|
2861
2861
|
backgroundColor: "#2a2734",
|
|
2862
2862
|
color: "#9a86fd"
|
|
@@ -2950,7 +2950,7 @@ var cr = {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
}
|
|
2952
2952
|
]
|
|
2953
|
-
},
|
|
2953
|
+
}, gr = pr, fr = {
|
|
2954
2954
|
plain: {
|
|
2955
2955
|
backgroundColor: "#faf8f5",
|
|
2956
2956
|
color: "#728fcb"
|
|
@@ -3048,7 +3048,7 @@ var cr = {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
}
|
|
3050
3050
|
]
|
|
3051
|
-
},
|
|
3051
|
+
}, hr = fr, mr = {
|
|
3052
3052
|
plain: {
|
|
3053
3053
|
color: "#393A34",
|
|
3054
3054
|
backgroundColor: "#f6f8fa"
|
|
@@ -3121,7 +3121,7 @@ var cr = {
|
|
|
3121
3121
|
}
|
|
3122
3122
|
}
|
|
3123
3123
|
]
|
|
3124
|
-
},
|
|
3124
|
+
}, yr = mr, br = {
|
|
3125
3125
|
plain: {
|
|
3126
3126
|
color: "#d6deeb",
|
|
3127
3127
|
backgroundColor: "#011627"
|
|
@@ -3225,7 +3225,7 @@ var cr = {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
}
|
|
3227
3227
|
]
|
|
3228
|
-
},
|
|
3228
|
+
}, xr = br, vr = {
|
|
3229
3229
|
plain: {
|
|
3230
3230
|
color: "#403f53",
|
|
3231
3231
|
backgroundColor: "#FBFBFB"
|
|
@@ -3317,7 +3317,7 @@ var cr = {
|
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
3319
|
]
|
|
3320
|
-
},
|
|
3320
|
+
}, wr = vr, H = {
|
|
3321
3321
|
char: "#D8DEE9",
|
|
3322
3322
|
comment: "#999999",
|
|
3323
3323
|
keyword: "#c5a5c5",
|
|
@@ -3328,7 +3328,7 @@ var cr = {
|
|
|
3328
3328
|
tag: "#fc929e",
|
|
3329
3329
|
function: "#79b6f2",
|
|
3330
3330
|
className: "#FAC863"
|
|
3331
|
-
},
|
|
3331
|
+
}, kr = {
|
|
3332
3332
|
plain: {
|
|
3333
3333
|
backgroundColor: "#282c34",
|
|
3334
3334
|
color: "#ffffff"
|
|
@@ -3337,13 +3337,13 @@ var cr = {
|
|
|
3337
3337
|
{
|
|
3338
3338
|
types: ["attr-name"],
|
|
3339
3339
|
style: {
|
|
3340
|
-
color:
|
|
3340
|
+
color: H.keyword
|
|
3341
3341
|
}
|
|
3342
3342
|
},
|
|
3343
3343
|
{
|
|
3344
3344
|
types: ["attr-value"],
|
|
3345
3345
|
style: {
|
|
3346
|
-
color:
|
|
3346
|
+
color: H.string
|
|
3347
3347
|
}
|
|
3348
3348
|
},
|
|
3349
3349
|
{
|
|
@@ -3356,7 +3356,7 @@ var cr = {
|
|
|
3356
3356
|
"shebang"
|
|
3357
3357
|
],
|
|
3358
3358
|
style: {
|
|
3359
|
-
color:
|
|
3359
|
+
color: H.comment
|
|
3360
3360
|
}
|
|
3361
3361
|
},
|
|
3362
3362
|
{
|
|
@@ -3369,61 +3369,61 @@ var cr = {
|
|
|
3369
3369
|
"deleted"
|
|
3370
3370
|
],
|
|
3371
3371
|
style: {
|
|
3372
|
-
color:
|
|
3372
|
+
color: H.primitive
|
|
3373
3373
|
}
|
|
3374
3374
|
},
|
|
3375
3375
|
{
|
|
3376
3376
|
types: ["boolean"],
|
|
3377
3377
|
style: {
|
|
3378
|
-
color:
|
|
3378
|
+
color: H.boolean
|
|
3379
3379
|
}
|
|
3380
3380
|
},
|
|
3381
3381
|
{
|
|
3382
3382
|
types: ["tag"],
|
|
3383
3383
|
style: {
|
|
3384
|
-
color:
|
|
3384
|
+
color: H.tag
|
|
3385
3385
|
}
|
|
3386
3386
|
},
|
|
3387
3387
|
{
|
|
3388
3388
|
types: ["string"],
|
|
3389
3389
|
style: {
|
|
3390
|
-
color:
|
|
3390
|
+
color: H.string
|
|
3391
3391
|
}
|
|
3392
3392
|
},
|
|
3393
3393
|
{
|
|
3394
3394
|
types: ["punctuation"],
|
|
3395
3395
|
style: {
|
|
3396
|
-
color:
|
|
3396
|
+
color: H.string
|
|
3397
3397
|
}
|
|
3398
3398
|
},
|
|
3399
3399
|
{
|
|
3400
3400
|
types: ["selector", "char", "builtin", "inserted"],
|
|
3401
3401
|
style: {
|
|
3402
|
-
color:
|
|
3402
|
+
color: H.char
|
|
3403
3403
|
}
|
|
3404
3404
|
},
|
|
3405
3405
|
{
|
|
3406
3406
|
types: ["function"],
|
|
3407
3407
|
style: {
|
|
3408
|
-
color:
|
|
3408
|
+
color: H.function
|
|
3409
3409
|
}
|
|
3410
3410
|
},
|
|
3411
3411
|
{
|
|
3412
3412
|
types: ["operator", "entity", "url", "variable"],
|
|
3413
3413
|
style: {
|
|
3414
|
-
color:
|
|
3414
|
+
color: H.variable
|
|
3415
3415
|
}
|
|
3416
3416
|
},
|
|
3417
3417
|
{
|
|
3418
3418
|
types: ["keyword"],
|
|
3419
3419
|
style: {
|
|
3420
|
-
color:
|
|
3420
|
+
color: H.keyword
|
|
3421
3421
|
}
|
|
3422
3422
|
},
|
|
3423
3423
|
{
|
|
3424
3424
|
types: ["atrule", "class-name"],
|
|
3425
3425
|
style: {
|
|
3426
|
-
color:
|
|
3426
|
+
color: H.className
|
|
3427
3427
|
}
|
|
3428
3428
|
},
|
|
3429
3429
|
{
|
|
@@ -3451,7 +3451,7 @@ var cr = {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
}
|
|
3453
3453
|
]
|
|
3454
|
-
},
|
|
3454
|
+
}, Sr = kr, Er = {
|
|
3455
3455
|
plain: {
|
|
3456
3456
|
color: "#f8f8f2",
|
|
3457
3457
|
backgroundColor: "#272822"
|
|
@@ -3566,7 +3566,7 @@ var cr = {
|
|
|
3566
3566
|
}
|
|
3567
3567
|
}
|
|
3568
3568
|
]
|
|
3569
|
-
},
|
|
3569
|
+
}, Ar = Er, Lr = {
|
|
3570
3570
|
plain: {
|
|
3571
3571
|
color: "#bfc7d5",
|
|
3572
3572
|
backgroundColor: "#292d3e"
|
|
@@ -3659,7 +3659,7 @@ var cr = {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
}
|
|
3661
3661
|
]
|
|
3662
|
-
},
|
|
3662
|
+
}, Fr = Lr, Or = {
|
|
3663
3663
|
plain: {
|
|
3664
3664
|
color: "#9EFEFF",
|
|
3665
3665
|
backgroundColor: "#2D2A55"
|
|
@@ -3747,7 +3747,7 @@ var cr = {
|
|
|
3747
3747
|
}
|
|
3748
3748
|
}
|
|
3749
3749
|
]
|
|
3750
|
-
},
|
|
3750
|
+
}, Rr = Or, Nr = {
|
|
3751
3751
|
plain: {
|
|
3752
3752
|
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
3753
3753
|
backgroundImage: "#34294f",
|
|
@@ -3872,7 +3872,7 @@ var cr = {
|
|
|
3872
3872
|
}
|
|
3873
3873
|
}
|
|
3874
3874
|
]
|
|
3875
|
-
},
|
|
3875
|
+
}, Cr = Nr, Tr = {
|
|
3876
3876
|
plain: {
|
|
3877
3877
|
color: "#282a2e",
|
|
3878
3878
|
backgroundColor: "#ffffff"
|
|
@@ -3897,7 +3897,7 @@ var cr = {
|
|
|
3897
3897
|
}
|
|
3898
3898
|
}
|
|
3899
3899
|
]
|
|
3900
|
-
},
|
|
3900
|
+
}, _r = Tr, Pr = {
|
|
3901
3901
|
plain: {
|
|
3902
3902
|
color: "#9CDCFE",
|
|
3903
3903
|
backgroundColor: "#1E1E1E"
|
|
@@ -3999,7 +3999,7 @@ var cr = {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
4001
|
]
|
|
4002
|
-
},
|
|
4002
|
+
}, Ut = Pr, Ir = {
|
|
4003
4003
|
plain: {
|
|
4004
4004
|
color: "#000000",
|
|
4005
4005
|
backgroundColor: "#ffffff"
|
|
@@ -4072,7 +4072,7 @@ var cr = {
|
|
|
4072
4072
|
}
|
|
4073
4073
|
}
|
|
4074
4074
|
]
|
|
4075
|
-
},
|
|
4075
|
+
}, $r = Ir, Dr = {
|
|
4076
4076
|
plain: {
|
|
4077
4077
|
color: "#f8fafc",
|
|
4078
4078
|
backgroundColor: "#011627"
|
|
@@ -4171,7 +4171,7 @@ var cr = {
|
|
|
4171
4171
|
}
|
|
4172
4172
|
}
|
|
4173
4173
|
]
|
|
4174
|
-
},
|
|
4174
|
+
}, jr = Dr, Br = {
|
|
4175
4175
|
plain: {
|
|
4176
4176
|
color: "#0f172a",
|
|
4177
4177
|
backgroundColor: "#f1f5f9"
|
|
@@ -4270,7 +4270,7 @@ var cr = {
|
|
|
4270
4270
|
}
|
|
4271
4271
|
}
|
|
4272
4272
|
]
|
|
4273
|
-
},
|
|
4273
|
+
}, Mr = Br, zr = {
|
|
4274
4274
|
plain: {
|
|
4275
4275
|
backgroundColor: "hsl(220, 13%, 18%)",
|
|
4276
4276
|
color: "hsl(220, 14%, 71%)",
|
|
@@ -4368,7 +4368,7 @@ var cr = {
|
|
|
4368
4368
|
}
|
|
4369
4369
|
}
|
|
4370
4370
|
]
|
|
4371
|
-
},
|
|
4371
|
+
}, Ur = zr, Hr = {
|
|
4372
4372
|
plain: {
|
|
4373
4373
|
backgroundColor: "hsl(230, 1%, 98%)",
|
|
4374
4374
|
color: "hsl(230, 8%, 24%)"
|
|
@@ -4469,7 +4469,7 @@ var cr = {
|
|
|
4469
4469
|
}
|
|
4470
4470
|
}
|
|
4471
4471
|
]
|
|
4472
|
-
},
|
|
4472
|
+
}, Vr = Hr, Zr = {
|
|
4473
4473
|
plain: {
|
|
4474
4474
|
color: "#ebdbb2",
|
|
4475
4475
|
backgroundColor: "#292828"
|
|
@@ -4542,7 +4542,7 @@ var cr = {
|
|
|
4542
4542
|
}
|
|
4543
4543
|
}
|
|
4544
4544
|
]
|
|
4545
|
-
},
|
|
4545
|
+
}, qr = Zr, Wr = {
|
|
4546
4546
|
plain: {
|
|
4547
4547
|
color: "#654735",
|
|
4548
4548
|
backgroundColor: "#f9f5d7"
|
|
@@ -4614,17 +4614,17 @@ var cr = {
|
|
|
4614
4614
|
}
|
|
4615
4615
|
}
|
|
4616
4616
|
]
|
|
4617
|
-
},
|
|
4617
|
+
}, Gr = Wr, Kr = (t) => K(
|
|
4618
4618
|
(e) => {
|
|
4619
|
-
var n = e, { className: r, style: a, line: s } = n, i =
|
|
4620
|
-
const o =
|
|
4621
|
-
className:
|
|
4619
|
+
var n = e, { className: r, style: a, line: s } = n, i = zt(n, ["className", "style", "line"]);
|
|
4620
|
+
const o = Le(G({}, i), {
|
|
4621
|
+
className: jt("token-line", r)
|
|
4622
4622
|
});
|
|
4623
|
-
return typeof t == "object" && "plain" in t && (o.style = t.plain), typeof a == "object" && (o.style =
|
|
4623
|
+
return typeof t == "object" && "plain" in t && (o.style = t.plain), typeof a == "object" && (o.style = G(G({}, o.style || {}), a)), o;
|
|
4624
4624
|
},
|
|
4625
4625
|
[t]
|
|
4626
|
-
),
|
|
4627
|
-
const e =
|
|
4626
|
+
), Yr = (t) => {
|
|
4627
|
+
const e = K(
|
|
4628
4628
|
({ types: n, empty: r }) => {
|
|
4629
4629
|
if (t != null) {
|
|
4630
4630
|
{
|
|
@@ -4641,19 +4641,19 @@ var cr = {
|
|
|
4641
4641
|
},
|
|
4642
4642
|
[t]
|
|
4643
4643
|
);
|
|
4644
|
-
return
|
|
4644
|
+
return K(
|
|
4645
4645
|
(n) => {
|
|
4646
|
-
var r = n, { token: a, className: s, style: i } = r, o =
|
|
4647
|
-
const c =
|
|
4648
|
-
className:
|
|
4646
|
+
var r = n, { token: a, className: s, style: i } = r, o = zt(r, ["token", "className", "style"]);
|
|
4647
|
+
const c = Le(G({}, o), {
|
|
4648
|
+
className: jt("token", ...a.types, s),
|
|
4649
4649
|
children: a.content,
|
|
4650
4650
|
style: e(a)
|
|
4651
4651
|
});
|
|
4652
|
-
return i != null && (c.style =
|
|
4652
|
+
return i != null && (c.style = G(G({}, c.style || {}), i)), c;
|
|
4653
4653
|
},
|
|
4654
4654
|
[e]
|
|
4655
4655
|
);
|
|
4656
|
-
},
|
|
4656
|
+
}, Xr = /\r\n|\r|\n/, gt = (t) => {
|
|
4657
4657
|
t.length === 0 ? t.push({
|
|
4658
4658
|
types: ["plain"],
|
|
4659
4659
|
content: `
|
|
@@ -4661,10 +4661,10 @@ var cr = {
|
|
|
4661
4661
|
empty: !0
|
|
4662
4662
|
}) : t.length === 1 && t[0].content === "" && (t[0].content = `
|
|
4663
4663
|
`, t[0].empty = !0);
|
|
4664
|
-
},
|
|
4664
|
+
}, ft = (t, e) => {
|
|
4665
4665
|
const n = t.length;
|
|
4666
4666
|
return n > 0 && t[n - 1] === e ? t : t.concat(e);
|
|
4667
|
-
},
|
|
4667
|
+
}, Jr = (t) => {
|
|
4668
4668
|
const e = [[]], n = [t], r = [0], a = [t.length];
|
|
4669
4669
|
let s = 0, i = 0, o = [];
|
|
4670
4670
|
const c = [o];
|
|
@@ -4672,57 +4672,57 @@ var cr = {
|
|
|
4672
4672
|
for (; (s = r[i]++) < a[i]; ) {
|
|
4673
4673
|
let l, p = e[i];
|
|
4674
4674
|
const h = n[i][s];
|
|
4675
|
-
if (typeof h == "string" ? (p = i > 0 ? p : ["plain"], l = h) : (p =
|
|
4675
|
+
if (typeof h == "string" ? (p = i > 0 ? p : ["plain"], l = h) : (p = ft(p, h.type), h.alias && (p = ft(p, h.alias)), l = h.content), typeof l != "string") {
|
|
4676
4676
|
i++, e.push(p), n.push(l), r.push(0), a.push(l.length);
|
|
4677
4677
|
continue;
|
|
4678
4678
|
}
|
|
4679
|
-
const x = l.split(
|
|
4679
|
+
const x = l.split(Xr), d = x.length;
|
|
4680
4680
|
o.push({
|
|
4681
4681
|
types: p,
|
|
4682
4682
|
content: x[0]
|
|
4683
4683
|
});
|
|
4684
4684
|
for (let g = 1; g < d; g++)
|
|
4685
|
-
|
|
4685
|
+
gt(o), c.push(o = []), o.push({
|
|
4686
4686
|
types: p,
|
|
4687
4687
|
content: x[g]
|
|
4688
4688
|
});
|
|
4689
4689
|
}
|
|
4690
4690
|
i--, e.pop(), n.pop(), r.pop(), a.pop();
|
|
4691
4691
|
}
|
|
4692
|
-
return
|
|
4693
|
-
},
|
|
4692
|
+
return gt(o), c;
|
|
4693
|
+
}, ht = Jr, Qr = ({ prism: t, code: e, grammar: n, language: r }) => ue(() => {
|
|
4694
4694
|
if (n == null)
|
|
4695
|
-
return
|
|
4695
|
+
return ht([e]);
|
|
4696
4696
|
const a = {
|
|
4697
4697
|
code: e,
|
|
4698
4698
|
grammar: n,
|
|
4699
4699
|
language: r,
|
|
4700
4700
|
tokens: []
|
|
4701
4701
|
};
|
|
4702
|
-
return t.hooks.run("before-tokenize", a), a.tokens = t.tokenize(e, n), t.hooks.run("after-tokenize", a),
|
|
4702
|
+
return t.hooks.run("before-tokenize", a), a.tokens = t.tokenize(e, n), t.hooks.run("after-tokenize", a), ht(a.tokens);
|
|
4703
4703
|
}, [
|
|
4704
4704
|
e,
|
|
4705
4705
|
n,
|
|
4706
4706
|
r,
|
|
4707
4707
|
// prism is a stable import
|
|
4708
4708
|
t
|
|
4709
|
-
]),
|
|
4709
|
+
]), ea = (t, e) => {
|
|
4710
4710
|
const { plain: n } = t, r = t.styles.reduce((a, s) => {
|
|
4711
4711
|
const { languages: i, style: o } = s;
|
|
4712
4712
|
return i && !i.includes(e) || s.types.forEach((c) => {
|
|
4713
|
-
const l =
|
|
4713
|
+
const l = G(G({}, a[c]), o);
|
|
4714
4714
|
a[c] = l;
|
|
4715
4715
|
}), a;
|
|
4716
4716
|
}, {});
|
|
4717
|
-
return r.root = n, r.plain =
|
|
4718
|
-
},
|
|
4717
|
+
return r.root = n, r.plain = Le(G({}, n), { backgroundColor: void 0 }), r;
|
|
4718
|
+
}, ta = ea, na = ({
|
|
4719
4719
|
children: t,
|
|
4720
4720
|
language: e,
|
|
4721
4721
|
code: n,
|
|
4722
4722
|
theme: r,
|
|
4723
4723
|
prism: a
|
|
4724
4724
|
}) => {
|
|
4725
|
-
const s = e.toLowerCase(), i =
|
|
4725
|
+
const s = e.toLowerCase(), i = ta(r, s), o = Kr(i), c = Yr(i), l = a.languages[s], p = Qr({ prism: a, language: s, code: n, grammar: l });
|
|
4726
4726
|
return t({
|
|
4727
4727
|
tokens: p,
|
|
4728
4728
|
className: `prism-code language-${s}`,
|
|
@@ -4730,57 +4730,57 @@ var cr = {
|
|
|
4730
4730
|
getLineProps: o,
|
|
4731
4731
|
getTokenProps: c
|
|
4732
4732
|
});
|
|
4733
|
-
},
|
|
4733
|
+
}, ra = (t) => ye(na, Le(G({}, t), {
|
|
4734
4734
|
prism: t.prism || m,
|
|
4735
|
-
theme: t.theme ||
|
|
4735
|
+
theme: t.theme || Ut,
|
|
4736
4736
|
code: t.code,
|
|
4737
4737
|
language: t.language
|
|
4738
4738
|
}));
|
|
4739
|
-
const
|
|
4739
|
+
const aa = (t, e) => e.some((n) => {
|
|
4740
4740
|
if (typeof n == "number")
|
|
4741
4741
|
return t === n;
|
|
4742
4742
|
const [r, a] = n.split(":").map((s) => parseInt(s));
|
|
4743
4743
|
return r <= t && t <= a;
|
|
4744
|
-
}),
|
|
4745
|
-
const n =
|
|
4744
|
+
}), sa = (t, e, n) => n.some(([r, [a, s]]) => r === t && a <= e && e <= s), ia = (t, e) => t.split(new RegExp(`(${e.map(([n]) => n).join("|")})`)).filter(Boolean), Ht = (t, e) => () => {
|
|
4745
|
+
const n = St(t);
|
|
4746
4746
|
if (n === void 0)
|
|
4747
4747
|
throw new Error(e);
|
|
4748
4748
|
return n;
|
|
4749
|
-
},
|
|
4749
|
+
}, Fe = (t) => Object.assign(nn(t), {
|
|
4750
4750
|
displayName: t.displayName ?? t.name
|
|
4751
|
-
}),
|
|
4752
|
-
const { lines: a, words: s, ...i } =
|
|
4753
|
-
return k
|
|
4754
|
-
const u = p + 1, h =
|
|
4755
|
-
return k
|
|
4751
|
+
}), oa = ke(void 0), Vt = ke(void 0), Zt = Ht(oa, 'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block".'), Ze = Ht(Vt, 'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block".'), la = ({ as: t, children: e, ...n }, r) => {
|
|
4752
|
+
const { lines: a, words: s, ...i } = Zt(), o = t ?? "pre";
|
|
4753
|
+
return k(ra, { ...i, children: (c) => k(o, { ...n, ref: r, children: c.tokens.map((l, p) => {
|
|
4754
|
+
const u = p + 1, h = aa(u, a);
|
|
4755
|
+
return k(Vt.Provider, { value: { highlight: c, line: l, lineNumber: u }, children: typeof e == "function" ? e({ isLineHighlighted: h, lineNumber: u }, p) : e }, p);
|
|
4756
4756
|
}) }) });
|
|
4757
|
-
},
|
|
4758
|
-
const { highlight: s, line: i } =
|
|
4759
|
-
return k
|
|
4760
|
-
},
|
|
4761
|
-
const { words: s } =
|
|
4762
|
-
return k
|
|
4757
|
+
}, ca = ({ as: t, children: e, className: n, ...r }, a) => {
|
|
4758
|
+
const { highlight: s, line: i } = Ze(), { getLineProps: o } = s;
|
|
4759
|
+
return k(t ?? "div", { ...o({ line: i, className: n }), ...r, ref: a, children: e });
|
|
4760
|
+
}, ua = ({ as: t, children: e = ({ children: s }) => k("span", { children: s }), className: n, ...r }, a) => {
|
|
4761
|
+
const { words: s } = Zt(), { line: i, highlight: o, lineNumber: c } = Ze(), { getTokenProps: l } = o, p = t ?? "span";
|
|
4762
|
+
return k(je.Fragment, { children: i.map((u, h) => {
|
|
4763
4763
|
const { children: x, ...d } = l({
|
|
4764
4764
|
token: u,
|
|
4765
4765
|
className: n
|
|
4766
|
-
}), g = s.length ?
|
|
4767
|
-
return k
|
|
4766
|
+
}), g = s.length ? ia(x, s) : [x];
|
|
4767
|
+
return k(je.Fragment, { children: g.map((f, v) => k(p, { ...d, ...r, ref: a, children: e({
|
|
4768
4768
|
children: f,
|
|
4769
|
-
isTokenHighlighted:
|
|
4769
|
+
isTokenHighlighted: sa(f, c, s)
|
|
4770
4770
|
}) }, v)) }, h);
|
|
4771
4771
|
}) });
|
|
4772
|
-
},
|
|
4773
|
-
const { lineNumber: r } =
|
|
4774
|
-
return k
|
|
4772
|
+
}, da = ({ as: t, ...e }, n) => {
|
|
4773
|
+
const { lineNumber: r } = Ze();
|
|
4774
|
+
return k(t ?? "span", { ...e, ref: n, children: r });
|
|
4775
4775
|
};
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
var
|
|
4781
|
-
function
|
|
4782
|
-
if (
|
|
4783
|
-
|
|
4776
|
+
Fe(la);
|
|
4777
|
+
Fe(ca);
|
|
4778
|
+
Fe(ua);
|
|
4779
|
+
Fe(da);
|
|
4780
|
+
var mt = { exports: {} }, oe = {}, yt;
|
|
4781
|
+
function pa() {
|
|
4782
|
+
if (yt) return oe;
|
|
4783
|
+
yt = 1;
|
|
4784
4784
|
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
4785
4785
|
function n(r, a, s) {
|
|
4786
4786
|
var i = null;
|
|
@@ -4797,27 +4797,27 @@ function da() {
|
|
|
4797
4797
|
props: s
|
|
4798
4798
|
};
|
|
4799
4799
|
}
|
|
4800
|
-
return
|
|
4800
|
+
return oe.Fragment = e, oe.jsx = n, oe.jsxs = n, oe;
|
|
4801
4801
|
}
|
|
4802
|
-
var
|
|
4803
|
-
function
|
|
4804
|
-
return
|
|
4802
|
+
var bt;
|
|
4803
|
+
function ga() {
|
|
4804
|
+
return bt || (bt = 1, mt.exports = /* @__PURE__ */ pa()), mt.exports;
|
|
4805
4805
|
}
|
|
4806
|
-
var
|
|
4807
|
-
function
|
|
4806
|
+
var Q = /* @__PURE__ */ ga();
|
|
4807
|
+
function qt(t) {
|
|
4808
4808
|
var e, n, r = "";
|
|
4809
4809
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
4810
4810
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
4811
4811
|
var a = t.length;
|
|
4812
|
-
for (e = 0; e < a; e++) t[e] && (n =
|
|
4812
|
+
for (e = 0; e < a; e++) t[e] && (n = qt(t[e])) && (r && (r += " "), r += n);
|
|
4813
4813
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
4814
4814
|
return r;
|
|
4815
4815
|
}
|
|
4816
|
-
function
|
|
4817
|
-
for (var t, e, n = 0, r = "", a = arguments.length; n < a; n++) (t = arguments[n]) && (e =
|
|
4816
|
+
function fa() {
|
|
4817
|
+
for (var t, e, n = 0, r = "", a = arguments.length; n < a; n++) (t = arguments[n]) && (e = qt(t)) && (r && (r += " "), r += e);
|
|
4818
4818
|
return r;
|
|
4819
4819
|
}
|
|
4820
|
-
const
|
|
4820
|
+
const U = fa, Y = ({
|
|
4821
4821
|
variant: t = "primary",
|
|
4822
4822
|
size: e = "medium",
|
|
4823
4823
|
text: n,
|
|
@@ -4828,35 +4828,35 @@ const z = ga, K = ({
|
|
|
4828
4828
|
loading: o = !1,
|
|
4829
4829
|
round: c = !1,
|
|
4830
4830
|
...l
|
|
4831
|
-
}) => /* @__PURE__ */
|
|
4831
|
+
}) => /* @__PURE__ */ Q.jsx(
|
|
4832
4832
|
"button",
|
|
4833
4833
|
{
|
|
4834
|
-
className:
|
|
4834
|
+
className: U(
|
|
4835
4835
|
"flex gap-2 justify-center items-center disabled:pointer-events-none",
|
|
4836
4836
|
c ? "rounded-full" : "rounded-lg",
|
|
4837
|
-
|
|
4838
|
-
|
|
4837
|
+
ha(t),
|
|
4838
|
+
ma(e),
|
|
4839
4839
|
s
|
|
4840
4840
|
),
|
|
4841
4841
|
disabled: i,
|
|
4842
4842
|
...l,
|
|
4843
|
-
children: /* @__PURE__ */
|
|
4844
|
-
|
|
4843
|
+
children: /* @__PURE__ */ Q.jsx(
|
|
4844
|
+
Tt.Provider,
|
|
4845
4845
|
{
|
|
4846
4846
|
value: {
|
|
4847
4847
|
size: e === "xsmall" ? 12 : 16,
|
|
4848
4848
|
weight: "regular",
|
|
4849
|
-
className:
|
|
4849
|
+
className: U(Ie(t, i))
|
|
4850
4850
|
},
|
|
4851
|
-
children: o ? /* @__PURE__ */
|
|
4851
|
+
children: o ? /* @__PURE__ */ Q.jsx($t, { className: U(Ie(t, i), "animate-spin") }) : /* @__PURE__ */ Q.jsxs(Q.Fragment, { children: [
|
|
4852
4852
|
r && r,
|
|
4853
|
-
n && /* @__PURE__ */
|
|
4853
|
+
n && /* @__PURE__ */ Q.jsx("span", { className: U(Ie(t, i), ya(e)), children: n }),
|
|
4854
4854
|
a && a
|
|
4855
4855
|
] })
|
|
4856
4856
|
}
|
|
4857
4857
|
)
|
|
4858
4858
|
}
|
|
4859
|
-
),
|
|
4859
|
+
), ha = (t) => {
|
|
4860
4860
|
switch (t) {
|
|
4861
4861
|
case "primary":
|
|
4862
4862
|
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";
|
|
@@ -4869,7 +4869,7 @@ const z = ga, K = ({
|
|
|
4869
4869
|
case "subtle":
|
|
4870
4870
|
return "border border-grey-0/0 hover:bg-background-universal-overlay-light dark:hover:bg-background-universal-overlay-dark";
|
|
4871
4871
|
}
|
|
4872
|
-
},
|
|
4872
|
+
}, Ie = (t, e) => {
|
|
4873
4873
|
if (e) return "text-label-tertiary-light dark:text-label-tertiary-dark";
|
|
4874
4874
|
switch (t) {
|
|
4875
4875
|
case "primary":
|
|
@@ -4883,7 +4883,7 @@ const z = ga, K = ({
|
|
|
4883
4883
|
case "subtle":
|
|
4884
4884
|
return "text-label-primary-light dark:text-label-primary-dark";
|
|
4885
4885
|
}
|
|
4886
|
-
},
|
|
4886
|
+
}, ma = (t) => {
|
|
4887
4887
|
switch (t) {
|
|
4888
4888
|
case "xsmall":
|
|
4889
4889
|
return "p-1";
|
|
@@ -4892,7 +4892,7 @@ const z = ga, K = ({
|
|
|
4892
4892
|
case "medium":
|
|
4893
4893
|
return "p-3";
|
|
4894
4894
|
}
|
|
4895
|
-
},
|
|
4895
|
+
}, ya = (t) => {
|
|
4896
4896
|
switch (t) {
|
|
4897
4897
|
case "xsmall":
|
|
4898
4898
|
return "text-[10px] leading-[14px]";
|
|
@@ -4901,7 +4901,7 @@ const z = ga, K = ({
|
|
|
4901
4901
|
case "medium":
|
|
4902
4902
|
return "text-[15px] leading-[16px] -tracking-0,1";
|
|
4903
4903
|
}
|
|
4904
|
-
},
|
|
4904
|
+
}, Wt = {
|
|
4905
4905
|
Di1: "text-[72px] font-bold leading-[90px] -tracking-2,5",
|
|
4906
4906
|
Di2: "text-[60px] font-bold leading-[72px] -tracking-2,0",
|
|
4907
4907
|
Di3: "text-[48px] font-bold leading-[60px] -tracking-1,5",
|
|
@@ -4920,10 +4920,10 @@ const z = ga, K = ({
|
|
|
4920
4920
|
D1B: "text-[12px] font-bold leading-[16px]",
|
|
4921
4921
|
D1: "text-[12px] leading-[16px]",
|
|
4922
4922
|
M: "text-[10px] leading-[16px]"
|
|
4923
|
-
},
|
|
4924
|
-
const s = a ??
|
|
4925
|
-
return /* @__PURE__ */
|
|
4926
|
-
},
|
|
4923
|
+
}, X = ({ children: t, className: e, variant: n = "B1", significance: r = "primary", as: a }) => {
|
|
4924
|
+
const s = a ?? ba[n], i = Wt[n];
|
|
4925
|
+
return /* @__PURE__ */ Q.jsx(s, { className: U("font-sans", xa[r], e, i), children: t });
|
|
4926
|
+
}, ba = {
|
|
4927
4927
|
Di1: "h1",
|
|
4928
4928
|
Di2: "h2",
|
|
4929
4929
|
Di3: "h3",
|
|
@@ -4942,7 +4942,7 @@ const z = ga, K = ({
|
|
|
4942
4942
|
D1B: "p",
|
|
4943
4943
|
D1: "p",
|
|
4944
4944
|
M: "p"
|
|
4945
|
-
},
|
|
4945
|
+
}, xa = {
|
|
4946
4946
|
primary: "text-label-primary-light dark:text-label-primary-dark",
|
|
4947
4947
|
secondary: "text-label-secondary-light dark:text-label-secondary-dark",
|
|
4948
4948
|
tertiary: "text-label-tertiary-light dark:text-label-tertiary-dark",
|
|
@@ -4953,7 +4953,7 @@ const z = ga, K = ({
|
|
|
4953
4953
|
"brand-yellow": "text-brand-yellow-text-big-light dark:text-brand-yellow-text-big-dark",
|
|
4954
4954
|
"brand-coral": "text-brand-coral-text-big-light dark:text-brand-coral-text-big-dark",
|
|
4955
4955
|
"brand-mint": "text-brand-mint-text-big-light dark:text-brand-mint-text-big-dark"
|
|
4956
|
-
},
|
|
4956
|
+
}, Gt = ({
|
|
4957
4957
|
title: t,
|
|
4958
4958
|
icon: e,
|
|
4959
4959
|
description: n,
|
|
@@ -4966,11 +4966,11 @@ const z = ga, K = ({
|
|
|
4966
4966
|
hasPreviousStep: l,
|
|
4967
4967
|
hasNextStep: p
|
|
4968
4968
|
}) => {
|
|
4969
|
-
const { t: u } =
|
|
4970
|
-
return /* @__PURE__ */
|
|
4969
|
+
const { t: u } = He();
|
|
4970
|
+
return /* @__PURE__ */ j(
|
|
4971
4971
|
"div",
|
|
4972
4972
|
{
|
|
4973
|
-
className:
|
|
4973
|
+
className: U(
|
|
4974
4974
|
"grid mx-4 my-8 rounded-xl border relative",
|
|
4975
4975
|
"grid-cols-1 p-4 pt-10",
|
|
4976
4976
|
"md:p-8 md:gap-16 md:max-w-[960px] md:min-w-[660px]",
|
|
@@ -4978,64 +4978,64 @@ const z = ga, K = ({
|
|
|
4978
4978
|
"border-separator-opaque-light dark:border-separator-opaque-dark material-ultra-thick"
|
|
4979
4979
|
),
|
|
4980
4980
|
children: [
|
|
4981
|
-
/* @__PURE__ */
|
|
4982
|
-
/* @__PURE__ */
|
|
4983
|
-
/* @__PURE__ */
|
|
4984
|
-
e && /* @__PURE__ */ k
|
|
4981
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col justify-between order-2 md:order-1", children: [
|
|
4982
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col", children: [
|
|
4983
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col gap-1 md:gap-2 pb-3", children: [
|
|
4984
|
+
e && /* @__PURE__ */ k(
|
|
4985
4985
|
"div",
|
|
4986
4986
|
{
|
|
4987
|
-
className:
|
|
4988
|
-
children: /* @__PURE__ */ k
|
|
4987
|
+
className: U("h-8 w-8 rounded-lg overflow-hidden mb-1 md:mb-2", r ? "hidden md:block" : "block"),
|
|
4988
|
+
children: /* @__PURE__ */ k("img", { className: "w-full h-full object-cover", src: e, alt: "icon" })
|
|
4989
4989
|
}
|
|
4990
4990
|
),
|
|
4991
|
-
/* @__PURE__ */ k
|
|
4991
|
+
/* @__PURE__ */ k(X, { variant: "H2", children: t }),
|
|
4992
4992
|
n && n.trim().replace(/\n{3,}/g, `
|
|
4993
4993
|
|
|
4994
4994
|
`).split(`
|
|
4995
4995
|
|
|
4996
|
-
`).map((h, x) => /* @__PURE__ */ k
|
|
4996
|
+
`).map((h, x) => /* @__PURE__ */ k(X, { significance: "secondary", children: h.trim() }, x))
|
|
4997
4997
|
] }),
|
|
4998
4998
|
a
|
|
4999
4999
|
] }),
|
|
5000
|
-
/* @__PURE__ */
|
|
5001
|
-
l && /* @__PURE__ */ k
|
|
5002
|
-
|
|
5000
|
+
/* @__PURE__ */ j("div", { className: "flex justify-end pt-4 gap-2", children: [
|
|
5001
|
+
l && /* @__PURE__ */ k(
|
|
5002
|
+
Y,
|
|
5003
5003
|
{
|
|
5004
5004
|
variant: "subtle",
|
|
5005
5005
|
onClick: s,
|
|
5006
|
-
iconBefore: /* @__PURE__ */ k
|
|
5006
|
+
iconBefore: /* @__PURE__ */ k(Pt, {}),
|
|
5007
5007
|
disabled: !s,
|
|
5008
5008
|
text: u("Previous")
|
|
5009
5009
|
}
|
|
5010
5010
|
),
|
|
5011
|
-
/* @__PURE__ */ k
|
|
5012
|
-
|
|
5011
|
+
/* @__PURE__ */ k(
|
|
5012
|
+
Y,
|
|
5013
5013
|
{
|
|
5014
5014
|
variant: "subtle",
|
|
5015
5015
|
onClick: i,
|
|
5016
|
-
iconAfter: /* @__PURE__ */ k
|
|
5016
|
+
iconAfter: /* @__PURE__ */ k(It, {}),
|
|
5017
5017
|
disabled: !i || !c,
|
|
5018
5018
|
text: u(p ? "Next" : "Submit")
|
|
5019
5019
|
}
|
|
5020
5020
|
)
|
|
5021
5021
|
] }),
|
|
5022
|
-
o && /* @__PURE__ */ k
|
|
5023
|
-
|
|
5022
|
+
o && /* @__PURE__ */ k(
|
|
5023
|
+
Y,
|
|
5024
5024
|
{
|
|
5025
5025
|
className: "absolute -top-2 -right-2",
|
|
5026
5026
|
variant: "secondary",
|
|
5027
5027
|
size: "xsmall",
|
|
5028
5028
|
onClick: o,
|
|
5029
|
-
iconAfter: /* @__PURE__ */ k
|
|
5029
|
+
iconAfter: /* @__PURE__ */ k(Ee, {}),
|
|
5030
5030
|
"aria-label": "quit"
|
|
5031
5031
|
}
|
|
5032
5032
|
)
|
|
5033
5033
|
] }),
|
|
5034
|
-
r && /* @__PURE__ */ k
|
|
5034
|
+
r && /* @__PURE__ */ k("div", { className: "flex flex-col justify-center order-1 md:order-2", children: /* @__PURE__ */ k("div", { className: "rounded-lg overflow-hidden mb-6 md:mb-0", children: /* @__PURE__ */ k("img", { className: "w-full h-full object-cover aspect-video md:aspect-square", src: r, alt: "image" }) }) })
|
|
5035
5035
|
]
|
|
5036
5036
|
}
|
|
5037
5037
|
);
|
|
5038
|
-
},
|
|
5038
|
+
}, va = ({
|
|
5039
5039
|
title: t,
|
|
5040
5040
|
icon: e,
|
|
5041
5041
|
description: n,
|
|
@@ -5051,8 +5051,8 @@ const z = ga, K = ({
|
|
|
5051
5051
|
isValid: h,
|
|
5052
5052
|
hasPreviousStep: x,
|
|
5053
5053
|
hasNextStep: d
|
|
5054
|
-
}) => /* @__PURE__ */ k
|
|
5055
|
-
|
|
5054
|
+
}) => /* @__PURE__ */ k(
|
|
5055
|
+
Gt,
|
|
5056
5056
|
{
|
|
5057
5057
|
title: t,
|
|
5058
5058
|
icon: e,
|
|
@@ -5064,42 +5064,42 @@ const z = ga, K = ({
|
|
|
5064
5064
|
isValid: h,
|
|
5065
5065
|
hasPreviousStep: x,
|
|
5066
5066
|
hasNextStep: d,
|
|
5067
|
-
children: /* @__PURE__ */ k
|
|
5067
|
+
children: /* @__PURE__ */ k("div", { className: "flex flex-col max-h-[272px] md:max-h-full overflow-y-auto scrollbar-thin", children: p === 1 ? /* @__PURE__ */ k(
|
|
5068
5068
|
"div",
|
|
5069
5069
|
{
|
|
5070
|
-
className:
|
|
5070
|
+
className: U(
|
|
5071
5071
|
"flex py-3 md:py-4 gap-2 items-end md:items-start justify-end md:justify-start",
|
|
5072
5072
|
u ? "flex-col" : "flex-wrap"
|
|
5073
5073
|
),
|
|
5074
|
-
children: o.map((g) => /* @__PURE__ */ k
|
|
5074
|
+
children: o.map((g) => /* @__PURE__ */ k("div", { children: /* @__PURE__ */ j(
|
|
5075
5075
|
"button",
|
|
5076
5076
|
{
|
|
5077
5077
|
onClick: () => c(g.id),
|
|
5078
5078
|
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",
|
|
5079
5079
|
children: [
|
|
5080
|
-
/* @__PURE__ */ k
|
|
5081
|
-
/* @__PURE__ */ k
|
|
5080
|
+
/* @__PURE__ */ k(X, { variant: "B1Button", children: g.text }),
|
|
5081
|
+
/* @__PURE__ */ k(wa, { size: 20, selected: l.includes(g.id) })
|
|
5082
5082
|
]
|
|
5083
5083
|
}
|
|
5084
5084
|
) }, g.id))
|
|
5085
5085
|
}
|
|
5086
|
-
) : /* @__PURE__ */ k
|
|
5086
|
+
) : /* @__PURE__ */ k(
|
|
5087
5087
|
"div",
|
|
5088
5088
|
{
|
|
5089
|
-
className:
|
|
5089
|
+
className: U(
|
|
5090
5090
|
"flex py-3 md:py-4 gap-2 justify-end md:justify-start items-end md:items-start",
|
|
5091
5091
|
u ? "flex-col" : "flex-wrap"
|
|
5092
5092
|
),
|
|
5093
|
-
children: o.map((g) => /* @__PURE__ */ k
|
|
5093
|
+
children: o.map((g) => /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(
|
|
5094
5094
|
"button",
|
|
5095
5095
|
{
|
|
5096
5096
|
onClick: () => c(g.id),
|
|
5097
|
-
className:
|
|
5097
|
+
className: U(
|
|
5098
5098
|
"flex items-center gap-2 p-3 justify-end rounded-lg border shrink",
|
|
5099
5099
|
l.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"
|
|
5100
5100
|
),
|
|
5101
|
-
children: /* @__PURE__ */ k
|
|
5102
|
-
|
|
5101
|
+
children: /* @__PURE__ */ k(
|
|
5102
|
+
X,
|
|
5103
5103
|
{
|
|
5104
5104
|
variant: "B1Button",
|
|
5105
5105
|
significance: l.includes(g.id) ? "quaternary" : "primary",
|
|
@@ -5111,9 +5111,9 @@ const z = ga, K = ({
|
|
|
5111
5111
|
}
|
|
5112
5112
|
) })
|
|
5113
5113
|
}
|
|
5114
|
-
),
|
|
5114
|
+
), wa = ({ size: t = 16, strokeColor: e = "currentColor", fillColor: n = "none", selected: r = !1 }) => {
|
|
5115
5115
|
const a = t + 1, s = a / 2, i = (t - 2) / 2;
|
|
5116
|
-
return /* @__PURE__ */
|
|
5116
|
+
return /* @__PURE__ */ j(
|
|
5117
5117
|
"svg",
|
|
5118
5118
|
{
|
|
5119
5119
|
className: "shrink-0",
|
|
@@ -5123,7 +5123,7 @@ const z = ga, K = ({
|
|
|
5123
5123
|
fill: r ? n : "none",
|
|
5124
5124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5125
5125
|
children: [
|
|
5126
|
-
/* @__PURE__ */ k
|
|
5126
|
+
/* @__PURE__ */ k(
|
|
5127
5127
|
"circle",
|
|
5128
5128
|
{
|
|
5129
5129
|
cx: s,
|
|
@@ -5135,7 +5135,7 @@ const z = ga, K = ({
|
|
|
5135
5135
|
strokeLinejoin: "round"
|
|
5136
5136
|
}
|
|
5137
5137
|
),
|
|
5138
|
-
r && /* @__PURE__ */ k
|
|
5138
|
+
r && /* @__PURE__ */ k(
|
|
5139
5139
|
"circle",
|
|
5140
5140
|
{
|
|
5141
5141
|
cx: s,
|
|
@@ -5147,7 +5147,7 @@ const z = ga, K = ({
|
|
|
5147
5147
|
]
|
|
5148
5148
|
}
|
|
5149
5149
|
);
|
|
5150
|
-
},
|
|
5150
|
+
}, ka = ({
|
|
5151
5151
|
title: t,
|
|
5152
5152
|
icon: e,
|
|
5153
5153
|
description: n,
|
|
@@ -5162,9 +5162,9 @@ const z = ga, K = ({
|
|
|
5162
5162
|
hasPreviousStep: u,
|
|
5163
5163
|
hasNextStep: h
|
|
5164
5164
|
}) => {
|
|
5165
|
-
const { t: x } =
|
|
5166
|
-
return /* @__PURE__ */ k
|
|
5167
|
-
|
|
5165
|
+
const { t: x } = He();
|
|
5166
|
+
return /* @__PURE__ */ k(
|
|
5167
|
+
Gt,
|
|
5168
5168
|
{
|
|
5169
5169
|
title: t,
|
|
5170
5170
|
icon: e,
|
|
@@ -5176,33 +5176,33 @@ const z = ga, K = ({
|
|
|
5176
5176
|
isValid: p,
|
|
5177
5177
|
hasPreviousStep: u,
|
|
5178
5178
|
hasNextStep: h,
|
|
5179
|
-
children: /* @__PURE__ */
|
|
5180
|
-
l && /* @__PURE__ */
|
|
5181
|
-
/* @__PURE__ */ k
|
|
5182
|
-
/* @__PURE__ */ k
|
|
5179
|
+
children: /* @__PURE__ */ j("div", { className: "flex flex-col py-3 gap-2", children: [
|
|
5180
|
+
l && /* @__PURE__ */ j("div", { className: "flex items-center justify-between", children: [
|
|
5181
|
+
/* @__PURE__ */ k(X, { significance: "secondary", children: x("Max {{maxCharacters}} characters", { maxCharacters: l }) }),
|
|
5182
|
+
/* @__PURE__ */ k(X, { significance: "secondary", children: `${o.length}/${l}` })
|
|
5183
5183
|
] }),
|
|
5184
|
-
/* @__PURE__ */
|
|
5185
|
-
/* @__PURE__ */ k
|
|
5186
|
-
|
|
5184
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col relative", children: [
|
|
5185
|
+
/* @__PURE__ */ k(
|
|
5186
|
+
X,
|
|
5187
5187
|
{
|
|
5188
5188
|
as: "div",
|
|
5189
|
-
className:
|
|
5189
|
+
className: U(
|
|
5190
5190
|
"overflow-y-hidden whitespace-pre-wrap invisible break-words rounded-lg py-3 px-4 min-h-20 border-separator-opaque-light dark:border-separator-opaque-dark"
|
|
5191
5191
|
),
|
|
5192
5192
|
children: o
|
|
5193
5193
|
}
|
|
5194
5194
|
),
|
|
5195
|
-
/* @__PURE__ */ k
|
|
5195
|
+
/* @__PURE__ */ k(
|
|
5196
5196
|
"textarea",
|
|
5197
5197
|
{
|
|
5198
5198
|
id: "primary",
|
|
5199
5199
|
placeholder: x("Type your answer here"),
|
|
5200
|
-
className:
|
|
5200
|
+
className: U(
|
|
5201
5201
|
"absolute inset-0 resize-none",
|
|
5202
5202
|
"overflow-hidden break-words outline-hidden resize-none material-medium",
|
|
5203
5203
|
"rounded-lg py-3 px-4 min-h-20 border border-separator-opaque-light dark:border-separator-opaque-dark",
|
|
5204
5204
|
"text-label-primary-light dark:text-label-primary-dark",
|
|
5205
|
-
|
|
5205
|
+
Wt.B1
|
|
5206
5206
|
),
|
|
5207
5207
|
value: o,
|
|
5208
5208
|
onChange: (d) => c(d.target.value)
|
|
@@ -5212,10 +5212,10 @@ const z = ga, K = ({
|
|
|
5212
5212
|
] })
|
|
5213
5213
|
}
|
|
5214
5214
|
);
|
|
5215
|
-
},
|
|
5215
|
+
}, Kt = ({ title: t, icon: e, description: n, image: r, children: a, wrapperClassName: s }) => /* @__PURE__ */ j(
|
|
5216
5216
|
"div",
|
|
5217
5217
|
{
|
|
5218
|
-
className:
|
|
5218
|
+
className: U(
|
|
5219
5219
|
"grid mx-4 my-8 rounded-xl border",
|
|
5220
5220
|
"grid-cols-1 p-4 pt-10",
|
|
5221
5221
|
"md:p-8 md:gap-16 md:max-w-[960px] md:min-w-[660px]",
|
|
@@ -5224,47 +5224,47 @@ const z = ga, K = ({
|
|
|
5224
5224
|
s
|
|
5225
5225
|
),
|
|
5226
5226
|
children: [
|
|
5227
|
-
/* @__PURE__ */
|
|
5228
|
-
/* @__PURE__ */
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
e && /* @__PURE__ */ k
|
|
5231
|
-
/* @__PURE__ */ k
|
|
5227
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col justify-between gap-6 md:gap-8 order-2 md:order-1", children: [
|
|
5228
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col gap-6 md:gap-8", children: [
|
|
5229
|
+
/* @__PURE__ */ j("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
5230
|
+
e && /* @__PURE__ */ k("div", { className: U("h-8 w-8 rounded-lg overflow-hidden", r ? "hidden md:block" : "block"), children: /* @__PURE__ */ k("img", { className: "w-full h-full object-cover", src: e, alt: "icon" }) }),
|
|
5231
|
+
/* @__PURE__ */ k(X, { variant: "H2", children: t })
|
|
5232
5232
|
] }),
|
|
5233
5233
|
n && n.trim().replace(/\n{3,}/g, `
|
|
5234
5234
|
|
|
5235
5235
|
`).split(`
|
|
5236
5236
|
|
|
5237
|
-
`).map((i, o) => /* @__PURE__ */ k
|
|
5237
|
+
`).map((i, o) => /* @__PURE__ */ k(X, { children: i.trim() }, o))
|
|
5238
5238
|
] }),
|
|
5239
5239
|
a
|
|
5240
5240
|
] }),
|
|
5241
|
-
r && /* @__PURE__ */ k
|
|
5241
|
+
r && /* @__PURE__ */ k("div", { className: "flex flex-col justify-center order-1 md:order-2", children: /* @__PURE__ */ k("div", { className: "rounded-lg overflow-hidden mb-6 md:mb-0", children: /* @__PURE__ */ k("img", { className: "w-full h-full object-cover aspect-video md:aspect-square", src: r, alt: "image" }) }) })
|
|
5242
5242
|
]
|
|
5243
5243
|
}
|
|
5244
|
-
),
|
|
5245
|
-
/* @__PURE__ */ k
|
|
5246
|
-
|
|
5244
|
+
), Sa = ({ title: t, icon: e, description: n, image: r, quitText: a, onQuit: s, externalLink: i }) => /* @__PURE__ */ j(Kt, { title: t, icon: e, description: n, image: r, children: [
|
|
5245
|
+
/* @__PURE__ */ k("div", { className: "flex justify-end gap-2", children: i ? /* @__PURE__ */ k(
|
|
5246
|
+
Y,
|
|
5247
5247
|
{
|
|
5248
5248
|
variant: "secondary",
|
|
5249
5249
|
text: a,
|
|
5250
|
-
iconAfter: /* @__PURE__ */ k
|
|
5250
|
+
iconAfter: /* @__PURE__ */ k(_t, {}),
|
|
5251
5251
|
onClick: () => {
|
|
5252
5252
|
window.open(i, "_blank"), s();
|
|
5253
5253
|
}
|
|
5254
5254
|
}
|
|
5255
|
-
) : /* @__PURE__ */ k
|
|
5256
|
-
i && /* @__PURE__ */ k
|
|
5257
|
-
|
|
5255
|
+
) : /* @__PURE__ */ k(Y, { variant: "secondary", onClick: s, text: a }) }),
|
|
5256
|
+
i && /* @__PURE__ */ k(
|
|
5257
|
+
Y,
|
|
5258
5258
|
{
|
|
5259
5259
|
className: "absolute -top-2 -right-2 md:-top-4 md:-right-4",
|
|
5260
5260
|
variant: "secondary",
|
|
5261
5261
|
size: "small",
|
|
5262
5262
|
onClick: s,
|
|
5263
|
-
iconAfter: /* @__PURE__ */ k
|
|
5263
|
+
iconAfter: /* @__PURE__ */ k(Ee, {}),
|
|
5264
5264
|
"aria-label": "quit"
|
|
5265
5265
|
}
|
|
5266
5266
|
)
|
|
5267
|
-
] }),
|
|
5267
|
+
] }), Ea = ({
|
|
5268
5268
|
title: t,
|
|
5269
5269
|
icon: e,
|
|
5270
5270
|
description: n,
|
|
@@ -5273,31 +5273,31 @@ const z = ga, K = ({
|
|
|
5273
5273
|
onQuit: s,
|
|
5274
5274
|
startText: i,
|
|
5275
5275
|
onStart: o
|
|
5276
|
-
}) => /* @__PURE__ */
|
|
5277
|
-
/* @__PURE__ */
|
|
5278
|
-
s && a && /* @__PURE__ */ k
|
|
5279
|
-
/* @__PURE__ */ k
|
|
5276
|
+
}) => /* @__PURE__ */ j(Kt, { title: t, icon: e, description: n, image: r, wrapperClassName: "relative", children: [
|
|
5277
|
+
/* @__PURE__ */ j("div", { className: "flex justify-end gap-2", children: [
|
|
5278
|
+
s && a && /* @__PURE__ */ k(Y, { variant: "subtle", text: a, onClick: s }),
|
|
5279
|
+
/* @__PURE__ */ k(Y, { variant: "secondary", text: i, onClick: o })
|
|
5280
5280
|
] }),
|
|
5281
|
-
s && /* @__PURE__ */ k
|
|
5282
|
-
|
|
5281
|
+
s && /* @__PURE__ */ k(
|
|
5282
|
+
Y,
|
|
5283
5283
|
{
|
|
5284
5284
|
className: "absolute -top-2 -right-2",
|
|
5285
5285
|
variant: "secondary",
|
|
5286
5286
|
size: "xsmall",
|
|
5287
5287
|
onClick: s,
|
|
5288
|
-
iconAfter: /* @__PURE__ */ k
|
|
5288
|
+
iconAfter: /* @__PURE__ */ k(Ee, {}),
|
|
5289
5289
|
"aria-label": "quit"
|
|
5290
5290
|
}
|
|
5291
5291
|
)
|
|
5292
5292
|
] });
|
|
5293
|
-
let
|
|
5294
|
-
function
|
|
5295
|
-
return
|
|
5293
|
+
let Yt = {};
|
|
5294
|
+
function Aa() {
|
|
5295
|
+
return Yt;
|
|
5296
5296
|
}
|
|
5297
|
-
function
|
|
5298
|
-
|
|
5297
|
+
function La(t) {
|
|
5298
|
+
Yt = t;
|
|
5299
5299
|
}
|
|
5300
|
-
const
|
|
5300
|
+
const Fa = {
|
|
5301
5301
|
lessThanXSeconds: {
|
|
5302
5302
|
one: "less than a second",
|
|
5303
5303
|
other: "less than {{count}} seconds"
|
|
@@ -5359,26 +5359,26 @@ const La = {
|
|
|
5359
5359
|
one: "almost 1 year",
|
|
5360
5360
|
other: "almost {{count}} years"
|
|
5361
5361
|
}
|
|
5362
|
-
},
|
|
5362
|
+
}, Oa = (t, e, n) => {
|
|
5363
5363
|
let r;
|
|
5364
|
-
const a =
|
|
5364
|
+
const a = Fa[t];
|
|
5365
5365
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
5366
5366
|
};
|
|
5367
|
-
function
|
|
5367
|
+
function $e(t) {
|
|
5368
5368
|
return (e = {}) => {
|
|
5369
5369
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
5370
5370
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
5371
5371
|
};
|
|
5372
5372
|
}
|
|
5373
|
-
const
|
|
5373
|
+
const Ra = {
|
|
5374
5374
|
lastWeek: "'last' eeee 'at' p",
|
|
5375
5375
|
yesterday: "'yesterday at' p",
|
|
5376
5376
|
today: "'today at' p",
|
|
5377
5377
|
tomorrow: "'tomorrow at' p",
|
|
5378
5378
|
nextWeek: "eeee 'at' p",
|
|
5379
5379
|
other: "P"
|
|
5380
|
-
},
|
|
5381
|
-
function
|
|
5380
|
+
}, Na = (t, e, n, r) => Ra[t];
|
|
5381
|
+
function le(t) {
|
|
5382
5382
|
return (e, n) => {
|
|
5383
5383
|
const r = n?.context ? String(n.context) : "standalone";
|
|
5384
5384
|
let a;
|
|
@@ -5393,15 +5393,15 @@ function oe(t) {
|
|
|
5393
5393
|
return a[s];
|
|
5394
5394
|
};
|
|
5395
5395
|
}
|
|
5396
|
-
const
|
|
5396
|
+
const Ca = {
|
|
5397
5397
|
narrow: ["B", "A"],
|
|
5398
5398
|
abbreviated: ["BC", "AD"],
|
|
5399
5399
|
wide: ["Before Christ", "Anno Domini"]
|
|
5400
|
-
},
|
|
5400
|
+
}, Ta = {
|
|
5401
5401
|
narrow: ["1", "2", "3", "4"],
|
|
5402
5402
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
5403
5403
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
5404
|
-
},
|
|
5404
|
+
}, _a = {
|
|
5405
5405
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
5406
5406
|
abbreviated: [
|
|
5407
5407
|
"Jan",
|
|
@@ -5431,7 +5431,7 @@ const Na = {
|
|
|
5431
5431
|
"November",
|
|
5432
5432
|
"December"
|
|
5433
5433
|
]
|
|
5434
|
-
},
|
|
5434
|
+
}, Pa = {
|
|
5435
5435
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
5436
5436
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
5437
5437
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -5444,7 +5444,7 @@ const Na = {
|
|
|
5444
5444
|
"Friday",
|
|
5445
5445
|
"Saturday"
|
|
5446
5446
|
]
|
|
5447
|
-
},
|
|
5447
|
+
}, Ia = {
|
|
5448
5448
|
narrow: {
|
|
5449
5449
|
am: "a",
|
|
5450
5450
|
pm: "p",
|
|
@@ -5475,7 +5475,7 @@ const Na = {
|
|
|
5475
5475
|
evening: "evening",
|
|
5476
5476
|
night: "night"
|
|
5477
5477
|
}
|
|
5478
|
-
},
|
|
5478
|
+
}, $a = {
|
|
5479
5479
|
narrow: {
|
|
5480
5480
|
am: "a",
|
|
5481
5481
|
pm: "p",
|
|
@@ -5506,7 +5506,7 @@ const Na = {
|
|
|
5506
5506
|
evening: "in the evening",
|
|
5507
5507
|
night: "at night"
|
|
5508
5508
|
}
|
|
5509
|
-
},
|
|
5509
|
+
}, Da = (t, e) => {
|
|
5510
5510
|
const n = Number(t), r = n % 100;
|
|
5511
5511
|
if (r > 20 || r < 10)
|
|
5512
5512
|
switch (r % 10) {
|
|
@@ -5518,40 +5518,40 @@ const Na = {
|
|
|
5518
5518
|
return n + "rd";
|
|
5519
5519
|
}
|
|
5520
5520
|
return n + "th";
|
|
5521
|
-
},
|
|
5522
|
-
ordinalNumber:
|
|
5523
|
-
era:
|
|
5524
|
-
values:
|
|
5521
|
+
}, ja = {
|
|
5522
|
+
ordinalNumber: Da,
|
|
5523
|
+
era: le({
|
|
5524
|
+
values: Ca,
|
|
5525
5525
|
defaultWidth: "wide"
|
|
5526
5526
|
}),
|
|
5527
|
-
quarter:
|
|
5528
|
-
values:
|
|
5527
|
+
quarter: le({
|
|
5528
|
+
values: Ta,
|
|
5529
5529
|
defaultWidth: "wide",
|
|
5530
5530
|
argumentCallback: (t) => t - 1
|
|
5531
5531
|
}),
|
|
5532
|
-
month:
|
|
5533
|
-
values: Ta,
|
|
5534
|
-
defaultWidth: "wide"
|
|
5535
|
-
}),
|
|
5536
|
-
day: oe({
|
|
5532
|
+
month: le({
|
|
5537
5533
|
values: _a,
|
|
5538
5534
|
defaultWidth: "wide"
|
|
5539
5535
|
}),
|
|
5540
|
-
|
|
5536
|
+
day: le({
|
|
5541
5537
|
values: Pa,
|
|
5538
|
+
defaultWidth: "wide"
|
|
5539
|
+
}),
|
|
5540
|
+
dayPeriod: le({
|
|
5541
|
+
values: Ia,
|
|
5542
5542
|
defaultWidth: "wide",
|
|
5543
|
-
formattingValues:
|
|
5543
|
+
formattingValues: $a,
|
|
5544
5544
|
defaultFormattingWidth: "wide"
|
|
5545
5545
|
})
|
|
5546
5546
|
};
|
|
5547
|
-
function
|
|
5547
|
+
function ce(t) {
|
|
5548
5548
|
return (e, n = {}) => {
|
|
5549
5549
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], s = e.match(a);
|
|
5550
5550
|
if (!s)
|
|
5551
5551
|
return null;
|
|
5552
|
-
const i = s[0], o = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(o) ?
|
|
5552
|
+
const i = s[0], o = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(o) ? Ma(o, (u) => u.test(i)) : (
|
|
5553
5553
|
// [TODO] -- I challenge you to fix the type
|
|
5554
|
-
|
|
5554
|
+
Ba(o, (u) => u.test(i))
|
|
5555
5555
|
);
|
|
5556
5556
|
let l;
|
|
5557
5557
|
l = t.valueCallback ? t.valueCallback(c) : c, l = n.valueCallback ? (
|
|
@@ -5562,17 +5562,17 @@ function le(t) {
|
|
|
5562
5562
|
return { value: l, rest: p };
|
|
5563
5563
|
};
|
|
5564
5564
|
}
|
|
5565
|
-
function
|
|
5565
|
+
function Ba(t, e) {
|
|
5566
5566
|
for (const n in t)
|
|
5567
5567
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
5568
5568
|
return n;
|
|
5569
5569
|
}
|
|
5570
|
-
function
|
|
5570
|
+
function Ma(t, e) {
|
|
5571
5571
|
for (let n = 0; n < t.length; n++)
|
|
5572
5572
|
if (e(t[n]))
|
|
5573
5573
|
return n;
|
|
5574
5574
|
}
|
|
5575
|
-
function
|
|
5575
|
+
function za(t) {
|
|
5576
5576
|
return (e, n = {}) => {
|
|
5577
5577
|
const r = e.match(t.matchPattern);
|
|
5578
5578
|
if (!r) return null;
|
|
@@ -5584,23 +5584,23 @@ function Ma(t) {
|
|
|
5584
5584
|
return { value: i, rest: o };
|
|
5585
5585
|
};
|
|
5586
5586
|
}
|
|
5587
|
-
const
|
|
5587
|
+
const Ua = /^(\d+)(th|st|nd|rd)?/i, Ha = /\d+/i, Va = {
|
|
5588
5588
|
narrow: /^(b|a)/i,
|
|
5589
5589
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
5590
5590
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
5591
|
-
}, Va = {
|
|
5592
|
-
any: [/^b/i, /^(a|c)/i]
|
|
5593
5591
|
}, Za = {
|
|
5592
|
+
any: [/^b/i, /^(a|c)/i]
|
|
5593
|
+
}, qa = {
|
|
5594
5594
|
narrow: /^[1234]/i,
|
|
5595
5595
|
abbreviated: /^q[1234]/i,
|
|
5596
5596
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5597
|
-
}, qa = {
|
|
5598
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5599
5597
|
}, Wa = {
|
|
5598
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5599
|
+
}, Ga = {
|
|
5600
5600
|
narrow: /^[jfmasond]/i,
|
|
5601
5601
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5602
5602
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5603
|
-
},
|
|
5603
|
+
}, Ka = {
|
|
5604
5604
|
narrow: [
|
|
5605
5605
|
/^j/i,
|
|
5606
5606
|
/^f/i,
|
|
@@ -5629,18 +5629,18 @@ const za = /^(\d+)(th|st|nd|rd)?/i, Ua = /\d+/i, Ha = {
|
|
|
5629
5629
|
/^n/i,
|
|
5630
5630
|
/^d/i
|
|
5631
5631
|
]
|
|
5632
|
-
},
|
|
5632
|
+
}, Ya = {
|
|
5633
5633
|
narrow: /^[smtwf]/i,
|
|
5634
5634
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
5635
5635
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
5636
5636
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
5637
|
-
},
|
|
5637
|
+
}, Xa = {
|
|
5638
5638
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
5639
5639
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
5640
|
-
},
|
|
5640
|
+
}, Ja = {
|
|
5641
5641
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
5642
5642
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
5643
|
-
},
|
|
5643
|
+
}, Qa = {
|
|
5644
5644
|
any: {
|
|
5645
5645
|
am: /^a/i,
|
|
5646
5646
|
pm: /^p/i,
|
|
@@ -5651,106 +5651,106 @@ const za = /^(\d+)(th|st|nd|rd)?/i, Ua = /\d+/i, Ha = {
|
|
|
5651
5651
|
evening: /evening/i,
|
|
5652
5652
|
night: /night/i
|
|
5653
5653
|
}
|
|
5654
|
-
},
|
|
5655
|
-
ordinalNumber:
|
|
5656
|
-
matchPattern:
|
|
5657
|
-
parsePattern:
|
|
5654
|
+
}, es = {
|
|
5655
|
+
ordinalNumber: za({
|
|
5656
|
+
matchPattern: Ua,
|
|
5657
|
+
parsePattern: Ha,
|
|
5658
5658
|
valueCallback: (t) => parseInt(t, 10)
|
|
5659
5659
|
}),
|
|
5660
|
-
era:
|
|
5661
|
-
matchPatterns:
|
|
5660
|
+
era: ce({
|
|
5661
|
+
matchPatterns: Va,
|
|
5662
5662
|
defaultMatchWidth: "wide",
|
|
5663
|
-
parsePatterns:
|
|
5663
|
+
parsePatterns: Za,
|
|
5664
5664
|
defaultParseWidth: "any"
|
|
5665
5665
|
}),
|
|
5666
|
-
quarter:
|
|
5667
|
-
matchPatterns:
|
|
5666
|
+
quarter: ce({
|
|
5667
|
+
matchPatterns: qa,
|
|
5668
5668
|
defaultMatchWidth: "wide",
|
|
5669
|
-
parsePatterns:
|
|
5669
|
+
parsePatterns: Wa,
|
|
5670
5670
|
defaultParseWidth: "any",
|
|
5671
5671
|
valueCallback: (t) => t + 1
|
|
5672
5672
|
}),
|
|
5673
|
-
month:
|
|
5674
|
-
matchPatterns:
|
|
5673
|
+
month: ce({
|
|
5674
|
+
matchPatterns: Ga,
|
|
5675
5675
|
defaultMatchWidth: "wide",
|
|
5676
|
-
parsePatterns:
|
|
5676
|
+
parsePatterns: Ka,
|
|
5677
5677
|
defaultParseWidth: "any"
|
|
5678
5678
|
}),
|
|
5679
|
-
day:
|
|
5680
|
-
matchPatterns:
|
|
5679
|
+
day: ce({
|
|
5680
|
+
matchPatterns: Ya,
|
|
5681
5681
|
defaultMatchWidth: "wide",
|
|
5682
|
-
parsePatterns:
|
|
5682
|
+
parsePatterns: Xa,
|
|
5683
5683
|
defaultParseWidth: "any"
|
|
5684
5684
|
}),
|
|
5685
|
-
dayPeriod:
|
|
5686
|
-
matchPatterns:
|
|
5685
|
+
dayPeriod: ce({
|
|
5686
|
+
matchPatterns: Ja,
|
|
5687
5687
|
defaultMatchWidth: "any",
|
|
5688
|
-
parsePatterns:
|
|
5688
|
+
parsePatterns: Qa,
|
|
5689
5689
|
defaultParseWidth: "any"
|
|
5690
5690
|
})
|
|
5691
5691
|
};
|
|
5692
|
-
function
|
|
5693
|
-
const e = {}, n =
|
|
5692
|
+
function ts(t) {
|
|
5693
|
+
const e = {}, n = Aa();
|
|
5694
5694
|
for (const r in n)
|
|
5695
5695
|
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
5696
5696
|
for (const r in t)
|
|
5697
5697
|
Object.prototype.hasOwnProperty.call(t, r) && (t[r] === void 0 ? delete e[r] : e[r] = t[r]);
|
|
5698
|
-
|
|
5698
|
+
La(e);
|
|
5699
5699
|
}
|
|
5700
|
-
const
|
|
5700
|
+
const ns = {
|
|
5701
5701
|
full: "EEEE, d MMMM yyyy",
|
|
5702
5702
|
long: "d MMMM yyyy",
|
|
5703
5703
|
medium: "d MMM yyyy",
|
|
5704
5704
|
short: "dd/MM/yyyy"
|
|
5705
|
-
},
|
|
5705
|
+
}, rs = {
|
|
5706
5706
|
full: "HH:mm:ss zzzz",
|
|
5707
5707
|
long: "HH:mm:ss z",
|
|
5708
5708
|
medium: "HH:mm:ss",
|
|
5709
5709
|
short: "HH:mm"
|
|
5710
|
-
},
|
|
5710
|
+
}, as = {
|
|
5711
5711
|
full: "{{date}} 'at' {{time}}",
|
|
5712
5712
|
long: "{{date}} 'at' {{time}}",
|
|
5713
5713
|
medium: "{{date}}, {{time}}",
|
|
5714
5714
|
short: "{{date}}, {{time}}"
|
|
5715
|
-
},
|
|
5716
|
-
date:
|
|
5717
|
-
formats: ts,
|
|
5718
|
-
defaultWidth: "full"
|
|
5719
|
-
}),
|
|
5720
|
-
time: je({
|
|
5715
|
+
}, ss = {
|
|
5716
|
+
date: $e({
|
|
5721
5717
|
formats: ns,
|
|
5722
5718
|
defaultWidth: "full"
|
|
5723
5719
|
}),
|
|
5724
|
-
|
|
5720
|
+
time: $e({
|
|
5725
5721
|
formats: rs,
|
|
5726
5722
|
defaultWidth: "full"
|
|
5723
|
+
}),
|
|
5724
|
+
dateTime: $e({
|
|
5725
|
+
formats: as,
|
|
5726
|
+
defaultWidth: "full"
|
|
5727
5727
|
})
|
|
5728
|
-
},
|
|
5728
|
+
}, is = {
|
|
5729
5729
|
code: "en-GB",
|
|
5730
|
-
formatDistance:
|
|
5731
|
-
formatLong:
|
|
5732
|
-
formatRelative:
|
|
5733
|
-
localize:
|
|
5734
|
-
match:
|
|
5730
|
+
formatDistance: Oa,
|
|
5731
|
+
formatLong: ss,
|
|
5732
|
+
formatRelative: Na,
|
|
5733
|
+
localize: ja,
|
|
5734
|
+
match: es,
|
|
5735
5735
|
options: {
|
|
5736
5736
|
weekStartsOn: 1,
|
|
5737
5737
|
firstWeekContainsDate: 4
|
|
5738
5738
|
}
|
|
5739
5739
|
}, {
|
|
5740
|
-
slice:
|
|
5741
|
-
forEach:
|
|
5740
|
+
slice: os,
|
|
5741
|
+
forEach: ls
|
|
5742
5742
|
} = [];
|
|
5743
|
-
function
|
|
5744
|
-
return
|
|
5743
|
+
function cs(t) {
|
|
5744
|
+
return ls.call(os.call(arguments, 1), (e) => {
|
|
5745
5745
|
if (e)
|
|
5746
5746
|
for (const n in e)
|
|
5747
5747
|
t[n] === void 0 && (t[n] = e[n]);
|
|
5748
5748
|
}), t;
|
|
5749
5749
|
}
|
|
5750
|
-
function
|
|
5750
|
+
function us(t) {
|
|
5751
5751
|
return typeof t != "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((n) => n.test(t));
|
|
5752
5752
|
}
|
|
5753
|
-
const
|
|
5753
|
+
const xt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ds = function(t, e) {
|
|
5754
5754
|
const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
5755
5755
|
path: "/"
|
|
5756
5756
|
}, a = encodeURIComponent(e);
|
|
@@ -5761,12 +5761,12 @@ const bt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, us = function(t, e) {
|
|
|
5761
5761
|
s += `; Max-Age=${Math.floor(i)}`;
|
|
5762
5762
|
}
|
|
5763
5763
|
if (r.domain) {
|
|
5764
|
-
if (!
|
|
5764
|
+
if (!xt.test(r.domain))
|
|
5765
5765
|
throw new TypeError("option domain is invalid");
|
|
5766
5766
|
s += `; Domain=${r.domain}`;
|
|
5767
5767
|
}
|
|
5768
5768
|
if (r.path) {
|
|
5769
|
-
if (!
|
|
5769
|
+
if (!xt.test(r.path))
|
|
5770
5770
|
throw new TypeError("option path is invalid");
|
|
5771
5771
|
s += `; Path=${r.path}`;
|
|
5772
5772
|
}
|
|
@@ -5793,13 +5793,13 @@ const bt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, us = function(t, e) {
|
|
|
5793
5793
|
throw new TypeError("option sameSite is invalid");
|
|
5794
5794
|
}
|
|
5795
5795
|
return r.partitioned && (s += "; Partitioned"), s;
|
|
5796
|
-
},
|
|
5796
|
+
}, vt = {
|
|
5797
5797
|
create(t, e, n, r) {
|
|
5798
5798
|
let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
5799
5799
|
path: "/",
|
|
5800
5800
|
sameSite: "strict"
|
|
5801
5801
|
};
|
|
5802
|
-
n && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + n * 60 * 1e3)), r && (a.domain = r), document.cookie =
|
|
5802
|
+
n && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + n * 60 * 1e3)), r && (a.domain = r), document.cookie = ds(t, e, a);
|
|
5803
5803
|
},
|
|
5804
5804
|
read(t) {
|
|
5805
5805
|
const e = `${t}=`, n = document.cookie.split(";");
|
|
@@ -5814,7 +5814,7 @@ const bt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, us = function(t, e) {
|
|
|
5814
5814
|
this.create(t, "", -1, e);
|
|
5815
5815
|
}
|
|
5816
5816
|
};
|
|
5817
|
-
var
|
|
5817
|
+
var ps = {
|
|
5818
5818
|
name: "cookie",
|
|
5819
5819
|
// Deconstruct the options object and extract the lookupCookie property
|
|
5820
5820
|
lookup(t) {
|
|
@@ -5822,7 +5822,7 @@ var ds = {
|
|
|
5822
5822
|
lookupCookie: e
|
|
5823
5823
|
} = t;
|
|
5824
5824
|
if (e && typeof document < "u")
|
|
5825
|
-
return
|
|
5825
|
+
return vt.read(e) || void 0;
|
|
5826
5826
|
},
|
|
5827
5827
|
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
|
5828
5828
|
cacheUserLanguage(t, e) {
|
|
@@ -5832,9 +5832,9 @@ var ds = {
|
|
|
5832
5832
|
cookieDomain: a,
|
|
5833
5833
|
cookieOptions: s
|
|
5834
5834
|
} = e;
|
|
5835
|
-
n && typeof document < "u" &&
|
|
5835
|
+
n && typeof document < "u" && vt.create(n, t, r, a, s);
|
|
5836
5836
|
}
|
|
5837
|
-
},
|
|
5837
|
+
}, gs = {
|
|
5838
5838
|
name: "querystring",
|
|
5839
5839
|
// Deconstruct the options object and extract the lookupQuerystring property
|
|
5840
5840
|
lookup(t) {
|
|
@@ -5854,7 +5854,7 @@ var ds = {
|
|
|
5854
5854
|
}
|
|
5855
5855
|
return n;
|
|
5856
5856
|
}
|
|
5857
|
-
},
|
|
5857
|
+
}, fs = {
|
|
5858
5858
|
name: "hash",
|
|
5859
5859
|
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
5860
5860
|
lookup(t) {
|
|
@@ -5885,27 +5885,27 @@ var ds = {
|
|
|
5885
5885
|
return r;
|
|
5886
5886
|
}
|
|
5887
5887
|
};
|
|
5888
|
-
let
|
|
5889
|
-
const
|
|
5890
|
-
if (
|
|
5888
|
+
let re = null;
|
|
5889
|
+
const wt = () => {
|
|
5890
|
+
if (re !== null) return re;
|
|
5891
5891
|
try {
|
|
5892
|
-
if (
|
|
5892
|
+
if (re = typeof window < "u" && window.localStorage !== null, !re)
|
|
5893
5893
|
return !1;
|
|
5894
5894
|
const t = "i18next.translate.boo";
|
|
5895
5895
|
window.localStorage.setItem(t, "foo"), window.localStorage.removeItem(t);
|
|
5896
5896
|
} catch {
|
|
5897
|
-
|
|
5897
|
+
re = !1;
|
|
5898
5898
|
}
|
|
5899
|
-
return
|
|
5899
|
+
return re;
|
|
5900
5900
|
};
|
|
5901
|
-
var
|
|
5901
|
+
var hs = {
|
|
5902
5902
|
name: "localStorage",
|
|
5903
5903
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
5904
5904
|
lookup(t) {
|
|
5905
5905
|
let {
|
|
5906
5906
|
lookupLocalStorage: e
|
|
5907
5907
|
} = t;
|
|
5908
|
-
if (e &&
|
|
5908
|
+
if (e && wt())
|
|
5909
5909
|
return window.localStorage.getItem(e) || void 0;
|
|
5910
5910
|
},
|
|
5911
5911
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
@@ -5913,38 +5913,38 @@ var fs = {
|
|
|
5913
5913
|
let {
|
|
5914
5914
|
lookupLocalStorage: n
|
|
5915
5915
|
} = e;
|
|
5916
|
-
n &&
|
|
5916
|
+
n && wt() && window.localStorage.setItem(n, t);
|
|
5917
5917
|
}
|
|
5918
5918
|
};
|
|
5919
|
-
let
|
|
5920
|
-
const
|
|
5921
|
-
if (
|
|
5919
|
+
let ae = null;
|
|
5920
|
+
const kt = () => {
|
|
5921
|
+
if (ae !== null) return ae;
|
|
5922
5922
|
try {
|
|
5923
|
-
if (
|
|
5923
|
+
if (ae = typeof window < "u" && window.sessionStorage !== null, !ae)
|
|
5924
5924
|
return !1;
|
|
5925
5925
|
const t = "i18next.translate.boo";
|
|
5926
5926
|
window.sessionStorage.setItem(t, "foo"), window.sessionStorage.removeItem(t);
|
|
5927
5927
|
} catch {
|
|
5928
|
-
|
|
5928
|
+
ae = !1;
|
|
5929
5929
|
}
|
|
5930
|
-
return
|
|
5930
|
+
return ae;
|
|
5931
5931
|
};
|
|
5932
|
-
var
|
|
5932
|
+
var ms = {
|
|
5933
5933
|
name: "sessionStorage",
|
|
5934
5934
|
lookup(t) {
|
|
5935
5935
|
let {
|
|
5936
5936
|
lookupSessionStorage: e
|
|
5937
5937
|
} = t;
|
|
5938
|
-
if (e &&
|
|
5938
|
+
if (e && kt())
|
|
5939
5939
|
return window.sessionStorage.getItem(e) || void 0;
|
|
5940
5940
|
},
|
|
5941
5941
|
cacheUserLanguage(t, e) {
|
|
5942
5942
|
let {
|
|
5943
5943
|
lookupSessionStorage: n
|
|
5944
5944
|
} = e;
|
|
5945
|
-
n &&
|
|
5945
|
+
n && kt() && window.sessionStorage.setItem(n, t);
|
|
5946
5946
|
}
|
|
5947
|
-
},
|
|
5947
|
+
}, ys = {
|
|
5948
5948
|
name: "navigator",
|
|
5949
5949
|
lookup(t) {
|
|
5950
5950
|
const e = [];
|
|
@@ -5961,7 +5961,7 @@ var hs = {
|
|
|
5961
5961
|
}
|
|
5962
5962
|
return e.length > 0 ? e : void 0;
|
|
5963
5963
|
}
|
|
5964
|
-
},
|
|
5964
|
+
}, bs = {
|
|
5965
5965
|
name: "htmlTag",
|
|
5966
5966
|
// Deconstruct the options object and extract the htmlTag property
|
|
5967
5967
|
lookup(t) {
|
|
@@ -5971,7 +5971,7 @@ var hs = {
|
|
|
5971
5971
|
const r = e || (typeof document < "u" ? document.documentElement : null);
|
|
5972
5972
|
return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n;
|
|
5973
5973
|
}
|
|
5974
|
-
},
|
|
5974
|
+
}, xs = {
|
|
5975
5975
|
name: "path",
|
|
5976
5976
|
// Deconstruct the options object and extract the lookupFromPathIndex property
|
|
5977
5977
|
lookup(t) {
|
|
@@ -5982,7 +5982,7 @@ var hs = {
|
|
|
5982
5982
|
const n = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
5983
5983
|
return Array.isArray(n) ? n[typeof e == "number" ? e : 0]?.replace("/", "") : void 0;
|
|
5984
5984
|
}
|
|
5985
|
-
},
|
|
5985
|
+
}, vs = {
|
|
5986
5986
|
name: "subdomain",
|
|
5987
5987
|
lookup(t) {
|
|
5988
5988
|
let {
|
|
@@ -5993,15 +5993,15 @@ var hs = {
|
|
|
5993
5993
|
return r[n];
|
|
5994
5994
|
}
|
|
5995
5995
|
};
|
|
5996
|
-
let
|
|
5996
|
+
let Xt = !1;
|
|
5997
5997
|
try {
|
|
5998
|
-
document.cookie,
|
|
5998
|
+
document.cookie, Xt = !0;
|
|
5999
5999
|
} catch {
|
|
6000
6000
|
}
|
|
6001
|
-
const
|
|
6002
|
-
|
|
6003
|
-
const
|
|
6004
|
-
order:
|
|
6001
|
+
const Jt = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
6002
|
+
Xt || Jt.splice(1, 1);
|
|
6003
|
+
const ws = () => ({
|
|
6004
|
+
order: Jt,
|
|
6005
6005
|
lookupQuerystring: "lng",
|
|
6006
6006
|
lookupCookie: "i18next",
|
|
6007
6007
|
lookupLocalStorage: "i18nextLng",
|
|
@@ -6013,7 +6013,7 @@ const vs = () => ({
|
|
|
6013
6013
|
// cookieDomain: 'myDomain'
|
|
6014
6014
|
convertDetectedLanguage: (t) => t
|
|
6015
6015
|
});
|
|
6016
|
-
class
|
|
6016
|
+
class Qt {
|
|
6017
6017
|
constructor(e) {
|
|
6018
6018
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6019
6019
|
this.type = "languageDetector", this.detectors = {}, this.init(e, n);
|
|
@@ -6022,7 +6022,7 @@ class Jt {
|
|
|
6022
6022
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
6023
6023
|
languageUtils: {}
|
|
6024
6024
|
}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6025
|
-
this.services = e, this.options =
|
|
6025
|
+
this.services = e, this.options = cs(n, this.options || {}, ws()), 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(ps), this.addDetector(gs), this.addDetector(hs), this.addDetector(ms), this.addDetector(ys), this.addDetector(bs), this.addDetector(xs), this.addDetector(vs), this.addDetector(fs);
|
|
6026
6026
|
}
|
|
6027
6027
|
addDetector(e) {
|
|
6028
6028
|
return this.detectors[e.name] = e, this;
|
|
@@ -6034,7 +6034,7 @@ class Jt {
|
|
|
6034
6034
|
let a = this.detectors[r].lookup(this.options);
|
|
6035
6035
|
a && typeof a == "string" && (a = [a]), a && (n = n.concat(a));
|
|
6036
6036
|
}
|
|
6037
|
-
}), n = n.filter((r) => r != null && !
|
|
6037
|
+
}), n = n.filter((r) => r != null && !us(r)).map((r) => this.options.convertDetectedLanguage(r)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? n : n.length > 0 ? n[0] : null;
|
|
6038
6038
|
}
|
|
6039
6039
|
cacheUserLanguage(e) {
|
|
6040
6040
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
|
|
@@ -6043,18 +6043,18 @@ class Jt {
|
|
|
6043
6043
|
}));
|
|
6044
6044
|
}
|
|
6045
6045
|
}
|
|
6046
|
-
|
|
6047
|
-
const
|
|
6048
|
-
Previous:
|
|
6049
|
-
Next:
|
|
6050
|
-
Done:
|
|
6051
|
-
Submit:
|
|
6046
|
+
Qt.type = "languageDetector";
|
|
6047
|
+
const ks = "Previous", Ss = "Next", Es = "Done", As = "Submit", Ls = {
|
|
6048
|
+
Previous: ks,
|
|
6049
|
+
Next: Ss,
|
|
6050
|
+
Done: Es,
|
|
6051
|
+
Submit: As,
|
|
6052
6052
|
"Type your answer here": "Type your answer here",
|
|
6053
6053
|
"Max {{maxCharacters}} characters": "Max {{maxCharacters}} characters"
|
|
6054
|
-
},
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
debug:
|
|
6054
|
+
}, Fs = {};
|
|
6055
|
+
ts({ locale: is });
|
|
6056
|
+
B.use(Qt).use(Dn).init({
|
|
6057
|
+
debug: an.debug,
|
|
6058
6058
|
fallbackLng: "en",
|
|
6059
6059
|
interpolation: {
|
|
6060
6060
|
escapeValue: !1
|
|
@@ -6062,20 +6062,20 @@ D.use(Jt).use(In).init({
|
|
|
6062
6062
|
},
|
|
6063
6063
|
resources: {
|
|
6064
6064
|
en: {
|
|
6065
|
-
translation:
|
|
6065
|
+
translation: Ls
|
|
6066
6066
|
},
|
|
6067
6067
|
nb: {
|
|
6068
|
-
tranlation:
|
|
6068
|
+
tranlation: Fs
|
|
6069
6069
|
}
|
|
6070
6070
|
}
|
|
6071
6071
|
});
|
|
6072
|
-
class
|
|
6072
|
+
class De extends Error {
|
|
6073
6073
|
errorType;
|
|
6074
6074
|
constructor(e, n) {
|
|
6075
6075
|
super(n), this.name = "FormError", this.errorType = e;
|
|
6076
6076
|
}
|
|
6077
6077
|
}
|
|
6078
|
-
class
|
|
6078
|
+
class Os {
|
|
6079
6079
|
logger;
|
|
6080
6080
|
headers;
|
|
6081
6081
|
config;
|
|
@@ -6085,17 +6085,17 @@ class Fs {
|
|
|
6085
6085
|
async fetchAndDisplayForm(e, n, r) {
|
|
6086
6086
|
this.logger.debug(`Fetching form config for: ${e}`);
|
|
6087
6087
|
try {
|
|
6088
|
-
const a = await
|
|
6088
|
+
const a = await We.get(`/external/forms/${e}`, {
|
|
6089
6089
|
headers: this.headers
|
|
6090
6090
|
});
|
|
6091
6091
|
if (!a.ok && this.config.onFormError) {
|
|
6092
|
-
const s = new
|
|
6092
|
+
const s = new De("FETCH_ERROR", a.error?.message);
|
|
6093
6093
|
this.config.onFormError(s);
|
|
6094
6094
|
}
|
|
6095
6095
|
a.ok && a.data ? (this.logger.info(`Form config loaded for: ${e}`, a.data), this.displayForm(a.data, n, r)) : this.logger.warn(`No form config found for: ${e}`);
|
|
6096
6096
|
} catch (a) {
|
|
6097
6097
|
if (this.logger.error(`Failed to fetch form config for: ${e}`, a), this.config.onFormError) {
|
|
6098
|
-
const s = new
|
|
6098
|
+
const s = new De("FETCH_ERROR");
|
|
6099
6099
|
this.config.onFormError(s);
|
|
6100
6100
|
}
|
|
6101
6101
|
}
|
|
@@ -6103,10 +6103,10 @@ class Fs {
|
|
|
6103
6103
|
displayForm(e, n, r) {
|
|
6104
6104
|
const a = document.createElement("div");
|
|
6105
6105
|
a.id = "nm", document.body.appendChild(a);
|
|
6106
|
-
const s =
|
|
6107
|
-
|
|
6108
|
-
{ i18n:
|
|
6109
|
-
|
|
6106
|
+
const s = rn(a), i = ye(
|
|
6107
|
+
Zn,
|
|
6108
|
+
{ i18n: B },
|
|
6109
|
+
ye(Wn, {
|
|
6110
6110
|
form: e,
|
|
6111
6111
|
onDismiss: async (o) => {
|
|
6112
6112
|
await n(), s.unmount(), a.remove(), this.logger.info("Form dismissed", o);
|
|
@@ -6121,23 +6121,23 @@ class Fs {
|
|
|
6121
6121
|
}
|
|
6122
6122
|
async postFormResponse(e, n) {
|
|
6123
6123
|
this.logger.info("Posting form response", n);
|
|
6124
|
-
const r = await
|
|
6124
|
+
const r = await We.post(`/external/forms/${e.slug}`, n, {
|
|
6125
6125
|
headers: this.headers
|
|
6126
6126
|
});
|
|
6127
6127
|
if (!r.ok && this.config.onFormError) {
|
|
6128
|
-
const a = new
|
|
6128
|
+
const a = new De("SUBMISSION_ERROR", r.error?.message);
|
|
6129
6129
|
this.config.onFormError(a);
|
|
6130
6130
|
} else
|
|
6131
6131
|
this.logger.info("Form response posted", r.data);
|
|
6132
6132
|
}
|
|
6133
6133
|
}
|
|
6134
|
-
const
|
|
6134
|
+
const _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6135
6135
|
__proto__: null,
|
|
6136
|
-
FormManager:
|
|
6136
|
+
FormManager: Os
|
|
6137
6137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6138
6138
|
export {
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6139
|
+
De as F,
|
|
6140
|
+
Os as a,
|
|
6141
|
+
_s as f
|
|
6142
6142
|
};
|
|
6143
|
-
//# sourceMappingURL=form-manager-
|
|
6143
|
+
//# sourceMappingURL=form-manager-CH-LT8Ck.js.map
|