gt-react 10.19.16 → 10.19.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/browser.cjs +626 -501
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +71 -104
- package/dist/browser.d.cts.map +1 -1
- package/dist/browser.d.mts +71 -104
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +622 -496
- package/dist/browser.mjs.map +1 -1
- package/dist/client.cjs +399 -304
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +7 -8
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +7 -8
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +399 -303
- package/dist/client.mjs.map +1 -1
- package/dist/index.cjs +602 -420
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +601 -418
- package/dist/index.mjs.map +1 -1
- package/dist/internal.cjs +590 -498
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +18 -18
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.mts +8 -8
- package/dist/internal.d.mts.map +1 -1
- package/dist/internal.mjs +556 -464
- package/dist/internal.mjs.map +1 -1
- package/dist/macros.cjs +100 -33
- package/dist/macros.cjs.map +1 -1
- package/dist/macros.mjs +100 -33
- package/dist/macros.mjs.map +1 -1
- package/package.json +7 -7
package/dist/browser.cjs
CHANGED
|
@@ -36,29 +36,48 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
36
36
|
let _generaltranslation_format = require("@generaltranslation/format");
|
|
37
37
|
let generaltranslation = require("generaltranslation");
|
|
38
38
|
let react = require("react");
|
|
39
|
-
|
|
40
|
-
react = __toESM(react);
|
|
39
|
+
react = __toESM(react, 1);
|
|
41
40
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
//#region
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
//#region ../core/dist/base64-r7YWJYWt.mjs
|
|
42
|
+
function ensureSentence(text) {
|
|
43
|
+
const trimmed = text.trim();
|
|
44
|
+
if (!trimmed) return "";
|
|
45
|
+
return /[.!?)]$/.test(trimmed) ? trimmed : `${trimmed}.`;
|
|
46
|
+
}
|
|
47
|
+
function stripSentence(text) {
|
|
48
|
+
const trimmed = text.trim();
|
|
49
|
+
let end = trimmed.length;
|
|
50
|
+
while (end > 0) {
|
|
51
|
+
const char = trimmed[end - 1];
|
|
52
|
+
if (char !== "." && char !== "!" && char !== "?") break;
|
|
53
|
+
end -= 1;
|
|
54
|
+
}
|
|
55
|
+
return trimmed.slice(0, end);
|
|
56
|
+
}
|
|
57
|
+
function lowercaseFirstWord(text) {
|
|
58
|
+
return text.replace(/^[A-Z][a-z]/, (match) => match.toLowerCase());
|
|
59
|
+
}
|
|
60
|
+
function formatDetails(details) {
|
|
61
|
+
if (!details) return "";
|
|
62
|
+
const detailText = Array.isArray(details) ? details.join(", ") : details;
|
|
63
|
+
if (!detailText.trim()) return "";
|
|
64
|
+
return ensureSentence(`Details: ${detailText}`);
|
|
65
|
+
}
|
|
66
|
+
function createDiagnosticMessage({ source, severity, whatHappened, reassurance, why, fix, wayOut, details, docsUrl }) {
|
|
67
|
+
const prefix = source ? severity ? `${source} ${severity}:` : `${source}:` : severity ? `${severity}:` : "";
|
|
68
|
+
const whatAndWhy = why ? `${stripSentence(whatHappened)} because ${lowercaseFirstWord(stripSentence(why))}` : whatHappened;
|
|
69
|
+
const shouldCombineWayOut = !!fix && !!wayOut && /^[a-z]/.test(stripSentence(wayOut));
|
|
70
|
+
const messageParts = [
|
|
71
|
+
whatAndWhy,
|
|
72
|
+
reassurance,
|
|
73
|
+
shouldCombineWayOut ? `${stripSentence(fix)}, or ${lowercaseFirstWord(stripSentence(wayOut))}` : fix,
|
|
74
|
+
shouldCombineWayOut ? void 0 : wayOut,
|
|
75
|
+
formatDetails(details)
|
|
76
|
+
].filter((part) => !!part).map(ensureSentence);
|
|
77
|
+
if (docsUrl) messageParts.push(`Learn more: ${docsUrl}`);
|
|
78
|
+
const message = messageParts.join(" ");
|
|
79
|
+
return prefix ? `${prefix} ${message}` : message;
|
|
59
80
|
}
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region ../core/dist/base64-CWITCfhU.mjs
|
|
62
81
|
const defaultCacheUrl = "https://cdn.gtx.dev";
|
|
63
82
|
//#endregion
|
|
64
83
|
//#region ../core/dist/isVariable-fAKEB7gF.mjs
|
|
@@ -4199,6 +4218,56 @@ function condenseVars(icuString) {
|
|
|
4199
4218
|
}));
|
|
4200
4219
|
}
|
|
4201
4220
|
//#endregion
|
|
4221
|
+
//#region src/shared/messages.ts
|
|
4222
|
+
const PACKAGE_NAME = "gt-react";
|
|
4223
|
+
const BROWSER_ENVIRONMENT_ERROR = createDiagnosticMessage({
|
|
4224
|
+
source: `${PACKAGE_NAME}/browser`,
|
|
4225
|
+
severity: "Error",
|
|
4226
|
+
whatHappened: "This module requires a browser environment",
|
|
4227
|
+
fix: "Import it only from client-side code"
|
|
4228
|
+
});
|
|
4229
|
+
const GENERIC_BROWSER_ENVIRONMENT_ERROR = createDiagnosticMessage({
|
|
4230
|
+
source: PACKAGE_NAME,
|
|
4231
|
+
severity: "Error",
|
|
4232
|
+
whatHappened: "A browser-only module was imported outside the browser",
|
|
4233
|
+
fix: "Move this import to client-side code"
|
|
4234
|
+
});
|
|
4235
|
+
const BROWSER_I18N_MANAGER_NOT_INITIALIZED_ERROR = createDiagnosticMessage({
|
|
4236
|
+
source: PACKAGE_NAME,
|
|
4237
|
+
severity: "Error",
|
|
4238
|
+
whatHappened: "BrowserI18nManager is not initialized",
|
|
4239
|
+
fix: "Call initializeGT() before using browser translation APIs"
|
|
4240
|
+
});
|
|
4241
|
+
const createTranslationFailedDueToBrowserEnvironmentWarning = (message) => createDiagnosticMessage({
|
|
4242
|
+
source: PACKAGE_NAME,
|
|
4243
|
+
severity: "Warning",
|
|
4244
|
+
whatHappened: `t("${typeof message === "string" ? message : "`" + message?.join("${}") + "`"}") could not be translated because it ran outside the browser`,
|
|
4245
|
+
wayOut: "The original message will render as a fallback"
|
|
4246
|
+
});
|
|
4247
|
+
const createNoLocaleCouldBeDeterminedFromCustomGetLocaleWarning = ({ customLocale, defaultLocale }) => createDiagnosticMessage({
|
|
4248
|
+
source: PACKAGE_NAME,
|
|
4249
|
+
severity: "Warning",
|
|
4250
|
+
whatHappened: `Custom getLocale() returned unsupported locale "${customLocale}"`,
|
|
4251
|
+
wayOut: `Falling back to default locale "${defaultLocale}"`,
|
|
4252
|
+
fix: "Add the locale to your config if you want to support it"
|
|
4253
|
+
});
|
|
4254
|
+
const createInvalidLocaleWarning = (locale) => createDiagnosticMessage({
|
|
4255
|
+
source: PACKAGE_NAME,
|
|
4256
|
+
severity: "Warning",
|
|
4257
|
+
whatHappened: `Locale "${locale}" is not valid`,
|
|
4258
|
+
fix: "Use a valid BCP 47 locale code or add a custom mapping"
|
|
4259
|
+
});
|
|
4260
|
+
//#endregion
|
|
4261
|
+
//#region src/i18n-context/utils/enforceBrowser.ts
|
|
4262
|
+
/**
|
|
4263
|
+
* @internal
|
|
4264
|
+
*
|
|
4265
|
+
* Throws an error when imported outside of a browser environment.
|
|
4266
|
+
*/
|
|
4267
|
+
function enforceBrowser(errorMessage = GENERIC_BROWSER_ENVIRONMENT_ERROR) {
|
|
4268
|
+
if (typeof window === "undefined") throw new Error(errorMessage);
|
|
4269
|
+
}
|
|
4270
|
+
//#endregion
|
|
4202
4271
|
//#region ../i18n/dist/isEncodedTranslationOptions-BOwWa_-J.mjs
|
|
4203
4272
|
var logger_default = {
|
|
4204
4273
|
warn(message) {
|
|
@@ -4333,7 +4402,7 @@ function sanitizeJsxChildren(childrenAsObjects) {
|
|
|
4333
4402
|
return Array.isArray(childrenAsObjects) ? childrenAsObjects.map(sanitizeChild) : sanitizeChild(childrenAsObjects);
|
|
4334
4403
|
}
|
|
4335
4404
|
//#endregion
|
|
4336
|
-
//#region ../i18n/dist/versionId-
|
|
4405
|
+
//#region ../i18n/dist/versionId-BkJZGHXr.mjs
|
|
4337
4406
|
/**
|
|
4338
4407
|
* Throw errors if there are any errors and log warnings if there are any warnings
|
|
4339
4408
|
* @param {ValidationResult[]} results - The results to print
|
|
@@ -4379,9 +4448,9 @@ function getLoadTranslationsType(config) {
|
|
|
4379
4448
|
* Requirements:
|
|
4380
4449
|
* - REMOTE:
|
|
4381
4450
|
* - GT_REMOTE:
|
|
4382
|
-
* - projectId is
|
|
4451
|
+
* - projectId is needed
|
|
4383
4452
|
* - CUSTOM:
|
|
4384
|
-
* - loadTranslations is
|
|
4453
|
+
* - loadTranslations is needed
|
|
4385
4454
|
* - DISABLED:
|
|
4386
4455
|
* - no requirements
|
|
4387
4456
|
*/
|
|
@@ -4393,13 +4462,19 @@ function validateLoadTranslations(params) {
|
|
|
4393
4462
|
case "gt-remote":
|
|
4394
4463
|
if (!projectId) results.push({
|
|
4395
4464
|
type: "warning",
|
|
4396
|
-
message:
|
|
4465
|
+
message: createDiagnosticMessage({
|
|
4466
|
+
whatHappened: "Loading translations from a remote store needs a projectId",
|
|
4467
|
+
fix: "Add projectId to the I18nManager config or disable remote translation loading"
|
|
4468
|
+
})
|
|
4397
4469
|
});
|
|
4398
4470
|
break;
|
|
4399
4471
|
case "custom":
|
|
4400
4472
|
if (!loadTranslations) results.push({
|
|
4401
4473
|
type: "error",
|
|
4402
|
-
message:
|
|
4474
|
+
message: createDiagnosticMessage({
|
|
4475
|
+
whatHappened: "Custom translation loading needs loadTranslations",
|
|
4476
|
+
fix: "Provide a loadTranslations function or disable custom translation loading"
|
|
4477
|
+
})
|
|
4403
4478
|
});
|
|
4404
4479
|
break;
|
|
4405
4480
|
case "disabled": break;
|
|
@@ -4412,8 +4487,9 @@ function validateLoadTranslations(params) {
|
|
|
4412
4487
|
* @returns The runtime translation type
|
|
4413
4488
|
*/
|
|
4414
4489
|
function getTranslationApiType(params) {
|
|
4415
|
-
|
|
4416
|
-
|
|
4490
|
+
const usesDefaultRuntimeUrl = params.runtimeUrl === void 0 || params.runtimeUrl === "https://runtime2.gtx.dev";
|
|
4491
|
+
if (usesDefaultRuntimeUrl && params.projectId && (params.devApiKey || params.apiKey)) return "gt";
|
|
4492
|
+
else if (params.runtimeUrl && !usesDefaultRuntimeUrl) return "custom";
|
|
4417
4493
|
else return "disabled";
|
|
4418
4494
|
}
|
|
4419
4495
|
/**
|
|
@@ -4429,8 +4505,8 @@ function getTranslationApiType(params) {
|
|
|
4429
4505
|
* Requirements:
|
|
4430
4506
|
* - CUSTOM:
|
|
4431
4507
|
* - GT:
|
|
4432
|
-
* - projectId is
|
|
4433
|
-
* - devApiKey or apiKey is
|
|
4508
|
+
* - projectId is needed
|
|
4509
|
+
* - devApiKey or apiKey is needed
|
|
4434
4510
|
* - DISABLED:
|
|
4435
4511
|
* - no requirements
|
|
4436
4512
|
*
|
|
@@ -4443,11 +4519,17 @@ function validateTranslationApi(params) {
|
|
|
4443
4519
|
case "gt":
|
|
4444
4520
|
if (!params.projectId) results.push({
|
|
4445
4521
|
type: "warning",
|
|
4446
|
-
message:
|
|
4522
|
+
message: createDiagnosticMessage({
|
|
4523
|
+
whatHappened: "Runtime translation needs a projectId",
|
|
4524
|
+
fix: "Add projectId to the I18nManager config or disable runtime translation"
|
|
4525
|
+
})
|
|
4447
4526
|
});
|
|
4448
4527
|
if (!params.devApiKey && !params.apiKey) results.push({
|
|
4449
4528
|
type: "warning",
|
|
4450
|
-
message:
|
|
4529
|
+
message: createDiagnosticMessage({
|
|
4530
|
+
whatHappened: "Runtime translation needs devApiKey or apiKey",
|
|
4531
|
+
fix: "Add credentials to the I18nManager config or disable runtime translation"
|
|
4532
|
+
})
|
|
4451
4533
|
});
|
|
4452
4534
|
break;
|
|
4453
4535
|
case "disabled": break;
|
|
@@ -4476,7 +4558,10 @@ function validateLocales(params) {
|
|
|
4476
4558
|
new Set([...defaultLocale ? [defaultLocale] : [], ...locales || []]).forEach((locale) => {
|
|
4477
4559
|
if (!(0, _generaltranslation_format.isValidLocale)(locale, customMapping)) results.push({
|
|
4478
4560
|
type: "error",
|
|
4479
|
-
message:
|
|
4561
|
+
message: createDiagnosticMessage({
|
|
4562
|
+
whatHappened: `Locale "${locale}" is not valid`,
|
|
4563
|
+
fix: "Use a valid BCP 47 locale code or add a custom mapping"
|
|
4564
|
+
})
|
|
4480
4565
|
});
|
|
4481
4566
|
});
|
|
4482
4567
|
return results;
|
|
@@ -4491,7 +4576,10 @@ function validateDictionary(params) {
|
|
|
4491
4576
|
const results = [];
|
|
4492
4577
|
if (params.loadDictionary && !params.dictionary) results.push({
|
|
4493
4578
|
type: "error",
|
|
4494
|
-
message:
|
|
4579
|
+
message: createDiagnosticMessage({
|
|
4580
|
+
whatHappened: "loadDictionary needs a source dictionary",
|
|
4581
|
+
fix: "Provide dictionary so the default locale has source content"
|
|
4582
|
+
})
|
|
4495
4583
|
});
|
|
4496
4584
|
return results;
|
|
4497
4585
|
}
|
|
@@ -5761,7 +5849,7 @@ var I18nManager = class extends EventEmitter {
|
|
|
5761
5849
|
}
|
|
5762
5850
|
resolveLocale(locale) {
|
|
5763
5851
|
const resolvedLocale = this.localeConfig.determineLocale(locale);
|
|
5764
|
-
if (!this.localeConfig.isValidLocale(locale) || !resolvedLocale) throw new Error(`
|
|
5852
|
+
if (!this.localeConfig.isValidLocale(locale) || !resolvedLocale) throw new Error(`Locale "${locale}" is not valid. Use a valid BCP 47 locale code or add a custom mapping.`);
|
|
5765
5853
|
return resolvedLocale;
|
|
5766
5854
|
}
|
|
5767
5855
|
/**
|
|
@@ -5808,7 +5896,7 @@ var I18nManager = class extends EventEmitter {
|
|
|
5808
5896
|
*/
|
|
5809
5897
|
async dictionaryRuntimeTranslate(locale, id, sourceEntry) {
|
|
5810
5898
|
const translation = await this.lookupTranslationWithFallbackResolved(locale, sourceEntry.entry, resolveDictionaryLookupOptions(sourceEntry.options));
|
|
5811
|
-
if (typeof translation !== "string") throw new Error(`
|
|
5899
|
+
if (typeof translation !== "string") throw new Error(`Dictionary entry "${id}" could not be translated into a string. Check the source entry and translation loader output.`);
|
|
5812
5900
|
return translation;
|
|
5813
5901
|
}
|
|
5814
5902
|
/**
|
|
@@ -5941,7 +6029,7 @@ let conditionStore = fallbackConditionStore;
|
|
|
5941
6029
|
*/
|
|
5942
6030
|
function getI18nManager() {
|
|
5943
6031
|
if (!i18nManager) {
|
|
5944
|
-
logger_default.warn("getI18nManager():
|
|
6032
|
+
logger_default.warn("getI18nManager(): I18nManager was not initialized. Falling back to the default locale until initializeGT() configures translations.");
|
|
5945
6033
|
i18nManager = new I18nManager({
|
|
5946
6034
|
defaultLocale: "en",
|
|
5947
6035
|
locales: ["en"]
|
|
@@ -6235,7 +6323,40 @@ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.g
|
|
|
6235
6323
|
});
|
|
6236
6324
|
return e;
|
|
6237
6325
|
}, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
|
|
6238
|
-
function
|
|
6326
|
+
function b(e) {
|
|
6327
|
+
let t = e.trim();
|
|
6328
|
+
return t ? /[.!?)]$/.test(t) ? t : `${t}.` : ``;
|
|
6329
|
+
}
|
|
6330
|
+
function x(e) {
|
|
6331
|
+
let t = e.trim(), n = t.length;
|
|
6332
|
+
for (; n > 0;) {
|
|
6333
|
+
let e = t[n - 1];
|
|
6334
|
+
if (e !== `.` && e !== `!` && e !== `?`) break;
|
|
6335
|
+
--n;
|
|
6336
|
+
}
|
|
6337
|
+
return t.slice(0, n);
|
|
6338
|
+
}
|
|
6339
|
+
function te(e) {
|
|
6340
|
+
return e.replace(/^[A-Z][a-z]/, (e) => e.toLowerCase());
|
|
6341
|
+
}
|
|
6342
|
+
function ne(e) {
|
|
6343
|
+
if (!e) return ``;
|
|
6344
|
+
let t = Array.isArray(e) ? e.join(`, `) : e;
|
|
6345
|
+
return t.trim() ? b(`Details: ${t}`) : ``;
|
|
6346
|
+
}
|
|
6347
|
+
function S({ source: e, severity: t, whatHappened: n, reassurance: r, why: i, fix: a, wayOut: o, details: s, docsUrl: c }) {
|
|
6348
|
+
let l = e ? t ? `${e} ${t}:` : `${e}:` : t ? `${t}:` : ``, u = i ? `${x(n)} because ${te(x(i))}` : n, d = !!a && !!o && /^[a-z]/.test(x(o)), f = [
|
|
6349
|
+
u,
|
|
6350
|
+
r,
|
|
6351
|
+
d ? `${x(a)}, or ${te(x(o))}` : a,
|
|
6352
|
+
d ? void 0 : o,
|
|
6353
|
+
ne(s)
|
|
6354
|
+
].filter((e) => !!e).map(b);
|
|
6355
|
+
c && f.push(`Learn more: ${c}`);
|
|
6356
|
+
let p = f.join(` `);
|
|
6357
|
+
return l ? `${l} ${p}` : p;
|
|
6358
|
+
}
|
|
6359
|
+
function E(e) {
|
|
6239
6360
|
let t = e;
|
|
6240
6361
|
if (t && typeof t == `object` && typeof t.k == `string`) {
|
|
6241
6362
|
let e = Object.keys(t);
|
|
@@ -6243,43 +6364,43 @@ function C(e) {
|
|
|
6243
6364
|
}
|
|
6244
6365
|
return !1;
|
|
6245
6366
|
}
|
|
6246
|
-
function
|
|
6367
|
+
function ie(e) {
|
|
6247
6368
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
|
|
6248
6369
|
}
|
|
6249
|
-
function
|
|
6250
|
-
let r =
|
|
6370
|
+
function D(e, t, n = ``) {
|
|
6371
|
+
let r = ie(e), i = e?.length, a = t !== void 0;
|
|
6251
6372
|
if (!r || a && i !== t) {
|
|
6252
6373
|
let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
|
|
6253
6374
|
throw r ? RangeError(l) : TypeError(l);
|
|
6254
6375
|
}
|
|
6255
6376
|
return e;
|
|
6256
6377
|
}
|
|
6257
|
-
function
|
|
6378
|
+
function ae(e, t = !0) {
|
|
6258
6379
|
if (e.destroyed) throw Error(`Hash instance has been destroyed`);
|
|
6259
6380
|
if (t && e.finished) throw Error(`Hash#digest() has already been called`);
|
|
6260
6381
|
}
|
|
6261
|
-
function
|
|
6262
|
-
|
|
6382
|
+
function oe(e, t) {
|
|
6383
|
+
D(e, void 0, `digestInto() output`);
|
|
6263
6384
|
let n = t.outputLen;
|
|
6264
6385
|
if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
|
|
6265
6386
|
}
|
|
6266
|
-
function
|
|
6387
|
+
function se(...e) {
|
|
6267
6388
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
6268
6389
|
}
|
|
6269
|
-
function
|
|
6390
|
+
function ce(e) {
|
|
6270
6391
|
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
6271
6392
|
}
|
|
6272
|
-
function
|
|
6393
|
+
function O(e, t) {
|
|
6273
6394
|
return e << 32 - t | e >>> t;
|
|
6274
6395
|
}
|
|
6275
6396
|
new Uint8Array(new Uint32Array([287454020]).buffer)[0];
|
|
6276
6397
|
typeof Uint8Array.from([]).toHex == `function` && Uint8Array.fromHex;
|
|
6277
6398
|
Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
|
|
6278
|
-
function
|
|
6399
|
+
function pe(e, t = {}) {
|
|
6279
6400
|
let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
|
|
6280
6401
|
return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
|
|
6281
6402
|
}
|
|
6282
|
-
const
|
|
6403
|
+
const me = (e) => ({ oid: Uint8Array.from([
|
|
6283
6404
|
6,
|
|
6284
6405
|
9,
|
|
6285
6406
|
96,
|
|
@@ -6292,13 +6413,13 @@ const se = (e) => ({ oid: Uint8Array.from([
|
|
|
6292
6413
|
2,
|
|
6293
6414
|
e
|
|
6294
6415
|
]) });
|
|
6295
|
-
function
|
|
6416
|
+
function he(e, t, n) {
|
|
6296
6417
|
return e & t ^ ~e & n;
|
|
6297
6418
|
}
|
|
6298
|
-
function
|
|
6419
|
+
function ge(e, t, n) {
|
|
6299
6420
|
return e & t ^ e & n ^ t & n;
|
|
6300
6421
|
}
|
|
6301
|
-
var
|
|
6422
|
+
var _e = class {
|
|
6302
6423
|
blockLen;
|
|
6303
6424
|
outputLen;
|
|
6304
6425
|
canXOF = !1;
|
|
@@ -6311,15 +6432,15 @@ var ue = class {
|
|
|
6311
6432
|
pos = 0;
|
|
6312
6433
|
destroyed = !1;
|
|
6313
6434
|
constructor(e, t, n, r) {
|
|
6314
|
-
this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view =
|
|
6435
|
+
this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = ce(this.buffer);
|
|
6315
6436
|
}
|
|
6316
6437
|
update(e) {
|
|
6317
|
-
|
|
6438
|
+
ae(this), D(e);
|
|
6318
6439
|
let { view: t, buffer: n, blockLen: r } = this, i = e.length;
|
|
6319
6440
|
for (let a = 0; a < i;) {
|
|
6320
6441
|
let o = Math.min(r - this.pos, i - a);
|
|
6321
6442
|
if (o === r) {
|
|
6322
|
-
let t =
|
|
6443
|
+
let t = ce(e);
|
|
6323
6444
|
for (; r <= i - a; a += r) this.process(t, a);
|
|
6324
6445
|
continue;
|
|
6325
6446
|
}
|
|
@@ -6328,12 +6449,12 @@ var ue = class {
|
|
|
6328
6449
|
return this.length += e.length, this.roundClean(), this;
|
|
6329
6450
|
}
|
|
6330
6451
|
digestInto(e) {
|
|
6331
|
-
|
|
6452
|
+
ae(this), oe(e, this), this.finished = !0;
|
|
6332
6453
|
let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
|
|
6333
|
-
t[a++] = 128,
|
|
6454
|
+
t[a++] = 128, se(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
|
|
6334
6455
|
for (let e = a; e < r; e++) t[e] = 0;
|
|
6335
6456
|
n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
|
|
6336
|
-
let o =
|
|
6457
|
+
let o = ce(e), s = this.outputLen;
|
|
6337
6458
|
if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
|
|
6338
6459
|
let c = s / 4, l = this.get();
|
|
6339
6460
|
if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
|
|
@@ -6354,7 +6475,7 @@ var ue = class {
|
|
|
6354
6475
|
return this._cloneInto();
|
|
6355
6476
|
}
|
|
6356
6477
|
};
|
|
6357
|
-
const
|
|
6478
|
+
const k = Uint32Array.from([
|
|
6358
6479
|
1779033703,
|
|
6359
6480
|
3144134277,
|
|
6360
6481
|
1013904242,
|
|
@@ -6363,25 +6484,25 @@ const j = Uint32Array.from([
|
|
|
6363
6484
|
2600822924,
|
|
6364
6485
|
528734635,
|
|
6365
6486
|
1541459225
|
|
6366
|
-
]),
|
|
6367
|
-
function
|
|
6487
|
+
]), A = BigInt(2 ** 32 - 1), ve = BigInt(32);
|
|
6488
|
+
function ye(e, t = !1) {
|
|
6368
6489
|
return t ? {
|
|
6369
|
-
h: Number(e &
|
|
6370
|
-
l: Number(e >>
|
|
6490
|
+
h: Number(e & A),
|
|
6491
|
+
l: Number(e >> ve & A)
|
|
6371
6492
|
} : {
|
|
6372
|
-
h: Number(e >>
|
|
6373
|
-
l: Number(e &
|
|
6493
|
+
h: Number(e >> ve & A) | 0,
|
|
6494
|
+
l: Number(e & A) | 0
|
|
6374
6495
|
};
|
|
6375
6496
|
}
|
|
6376
|
-
function
|
|
6497
|
+
function be(e, t = !1) {
|
|
6377
6498
|
let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
|
|
6378
6499
|
for (let a = 0; a < n; a++) {
|
|
6379
|
-
let { h: n, l: o } =
|
|
6500
|
+
let { h: n, l: o } = ye(e[a], t);
|
|
6380
6501
|
[r[a], i[a]] = [n, o];
|
|
6381
6502
|
}
|
|
6382
6503
|
return [r, i];
|
|
6383
6504
|
}
|
|
6384
|
-
const
|
|
6505
|
+
const xe = Uint32Array.from([
|
|
6385
6506
|
1116352408,
|
|
6386
6507
|
1899447441,
|
|
6387
6508
|
3049323471,
|
|
@@ -6446,8 +6567,8 @@ const me = Uint32Array.from([
|
|
|
6446
6567
|
2756734187,
|
|
6447
6568
|
3204031479,
|
|
6448
6569
|
3329325298
|
|
6449
|
-
]),
|
|
6450
|
-
var
|
|
6570
|
+
]), j = new Uint32Array(64);
|
|
6571
|
+
var Se = class extends _e {
|
|
6451
6572
|
constructor(e) {
|
|
6452
6573
|
super(64, e, 8, !1);
|
|
6453
6574
|
}
|
|
@@ -6468,41 +6589,41 @@ var he = class extends ue {
|
|
|
6468
6589
|
this.A = e | 0, this.B = t | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = s | 0;
|
|
6469
6590
|
}
|
|
6470
6591
|
process(e, t) {
|
|
6471
|
-
for (let n = 0; n < 16; n++, t += 4)
|
|
6592
|
+
for (let n = 0; n < 16; n++, t += 4) j[n] = e.getUint32(t, !1);
|
|
6472
6593
|
for (let e = 16; e < 64; e++) {
|
|
6473
|
-
let t =
|
|
6474
|
-
|
|
6594
|
+
let t = j[e - 15], n = j[e - 2], r = O(t, 7) ^ O(t, 18) ^ t >>> 3;
|
|
6595
|
+
j[e] = (O(n, 17) ^ O(n, 19) ^ n >>> 10) + j[e - 7] + r + j[e - 16] | 0;
|
|
6475
6596
|
}
|
|
6476
6597
|
let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
|
|
6477
6598
|
for (let e = 0; e < 64; e++) {
|
|
6478
|
-
let t =
|
|
6599
|
+
let t = O(o, 6) ^ O(o, 11) ^ O(o, 25), u = l + t + he(o, s, c) + xe[e] + j[e] | 0, d = (O(n, 2) ^ O(n, 13) ^ O(n, 22)) + ge(n, r, i) | 0;
|
|
6479
6600
|
l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
|
|
6480
6601
|
}
|
|
6481
6602
|
n = n + this.A | 0, r = r + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, s = s + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(n, r, i, a, o, s, c, l);
|
|
6482
6603
|
}
|
|
6483
6604
|
roundClean() {
|
|
6484
|
-
|
|
6605
|
+
se(j);
|
|
6485
6606
|
}
|
|
6486
6607
|
destroy() {
|
|
6487
|
-
this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0),
|
|
6488
|
-
}
|
|
6489
|
-
},
|
|
6490
|
-
A =
|
|
6491
|
-
B =
|
|
6492
|
-
C =
|
|
6493
|
-
D =
|
|
6494
|
-
E =
|
|
6495
|
-
F =
|
|
6496
|
-
G =
|
|
6497
|
-
H =
|
|
6608
|
+
this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), se(this.buffer);
|
|
6609
|
+
}
|
|
6610
|
+
}, Ce = class extends Se {
|
|
6611
|
+
A = k[0] | 0;
|
|
6612
|
+
B = k[1] | 0;
|
|
6613
|
+
C = k[2] | 0;
|
|
6614
|
+
D = k[3] | 0;
|
|
6615
|
+
E = k[4] | 0;
|
|
6616
|
+
F = k[5] | 0;
|
|
6617
|
+
G = k[6] | 0;
|
|
6618
|
+
H = k[7] | 0;
|
|
6498
6619
|
constructor() {
|
|
6499
6620
|
super(32);
|
|
6500
6621
|
}
|
|
6501
6622
|
};
|
|
6502
|
-
const
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
const
|
|
6623
|
+
const we = be(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map((e) => BigInt(e)));
|
|
6624
|
+
we[0], we[1];
|
|
6625
|
+
pe(() => new Ce(), me(1));
|
|
6626
|
+
const Ee = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, De = `DEFAULT_TERMINATOR_KEY`, Oe = {
|
|
6506
6627
|
ellipsis: {
|
|
6507
6628
|
fr: {
|
|
6508
6629
|
terminator: `…`,
|
|
@@ -6516,37 +6637,35 @@ const ye = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${
|
|
|
6516
6637
|
terminator: `……`,
|
|
6517
6638
|
separator: void 0
|
|
6518
6639
|
},
|
|
6519
|
-
[
|
|
6640
|
+
[De]: {
|
|
6520
6641
|
terminator: `…`,
|
|
6521
6642
|
separator: void 0
|
|
6522
6643
|
}
|
|
6523
6644
|
},
|
|
6524
|
-
none: { [
|
|
6645
|
+
none: { [De]: {
|
|
6525
6646
|
terminator: void 0,
|
|
6526
6647
|
separator: void 0
|
|
6527
6648
|
} }
|
|
6528
6649
|
};
|
|
6529
|
-
var
|
|
6530
|
-
|
|
6650
|
+
var ke = class e {
|
|
6651
|
+
static resolveLocale(e) {
|
|
6531
6652
|
try {
|
|
6532
|
-
let t = e ? Array.isArray(e) ? e.map(
|
|
6533
|
-
|
|
6653
|
+
let t = e ? Array.isArray(e) ? e.map(String) : [String(e)] : [`en`], [n] = Intl.getCanonicalLocales(t);
|
|
6654
|
+
return n ?? `en`;
|
|
6534
6655
|
} catch {
|
|
6535
|
-
|
|
6536
|
-
}
|
|
6537
|
-
if (!xe[t.style ?? `ellipsis`]) throw Error(ye(t.style ?? `ellipsis`));
|
|
6538
|
-
let n, r;
|
|
6539
|
-
if (t.maxChars !== void 0) {
|
|
6540
|
-
n = t.style ?? `ellipsis`;
|
|
6541
|
-
let e = new Intl.Locale(this.locale).language;
|
|
6542
|
-
r = xe[n][e] || xe[n].DEFAULT_TERMINATOR_KEY;
|
|
6656
|
+
return `en`;
|
|
6543
6657
|
}
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6658
|
+
}
|
|
6659
|
+
constructor(t, n = {}) {
|
|
6660
|
+
this.locale = e.resolveLocale(t);
|
|
6661
|
+
let r = n.style ?? `ellipsis`;
|
|
6662
|
+
if (!Oe[r]) throw Error(Ee(r));
|
|
6663
|
+
let i = n.maxChars === void 0 ? void 0 : Oe[r][new Intl.Locale(this.locale).language] || Oe[r].DEFAULT_TERMINATOR_KEY, a = n.terminator ?? i?.terminator, o = a == null ? void 0 : n.separator ?? i?.separator;
|
|
6664
|
+
this.additionLength = (a?.length ?? 0) + (o?.length ?? 0), n.maxChars !== void 0 && Math.abs(n.maxChars) < this.additionLength && (a = void 0, o = void 0), this.options = {
|
|
6665
|
+
maxChars: n.maxChars,
|
|
6666
|
+
style: n.maxChars === void 0 ? void 0 : r,
|
|
6667
|
+
terminator: a,
|
|
6668
|
+
separator: o
|
|
6550
6669
|
};
|
|
6551
6670
|
}
|
|
6552
6671
|
format(e) {
|
|
@@ -6568,7 +6687,7 @@ var Se = class {
|
|
|
6568
6687
|
return this.options;
|
|
6569
6688
|
}
|
|
6570
6689
|
};
|
|
6571
|
-
const
|
|
6690
|
+
const Ae = {
|
|
6572
6691
|
Collator: Intl.Collator,
|
|
6573
6692
|
DateTimeFormat: Intl.DateTimeFormat,
|
|
6574
6693
|
DisplayNames: Intl.DisplayNames,
|
|
@@ -6578,83 +6697,85 @@ const Ce = {
|
|
|
6578
6697
|
PluralRules: Intl.PluralRules,
|
|
6579
6698
|
RelativeTimeFormat: Intl.RelativeTimeFormat,
|
|
6580
6699
|
Segmenter: Intl.Segmenter,
|
|
6581
|
-
CutoffFormat:
|
|
6582
|
-
},
|
|
6700
|
+
CutoffFormat: ke
|
|
6701
|
+
}, je = new class {
|
|
6583
6702
|
constructor() {
|
|
6584
6703
|
this.cache = {};
|
|
6585
6704
|
}
|
|
6586
|
-
|
|
6705
|
+
generateKey(e, t = {}) {
|
|
6587
6706
|
return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
|
|
6588
6707
|
}
|
|
6589
6708
|
get(e, ...t) {
|
|
6590
|
-
let [n = `en`, r = {}] = t, i = this.
|
|
6591
|
-
|
|
6709
|
+
let [n = `en`, r = {}] = t, i = this.generateKey(n, r), a = this.cache[e];
|
|
6710
|
+
a === void 0 && (a = {}, this.cache[e] = a);
|
|
6711
|
+
let o = a[i];
|
|
6712
|
+
return o === void 0 && (o = new Ae[e](...t), a[i] = o), o;
|
|
6592
6713
|
}
|
|
6593
6714
|
}();
|
|
6594
|
-
function
|
|
6595
|
-
return
|
|
6596
|
-
}
|
|
6597
|
-
var
|
|
6598
|
-
__addDisposableResource: () =>
|
|
6599
|
-
__assign: () =>
|
|
6600
|
-
__asyncDelegator: () =>
|
|
6601
|
-
__asyncGenerator: () =>
|
|
6602
|
-
__asyncValues: () =>
|
|
6603
|
-
__await: () =>
|
|
6604
|
-
__awaiter: () =>
|
|
6605
|
-
__classPrivateFieldGet: () =>
|
|
6606
|
-
__classPrivateFieldIn: () =>
|
|
6607
|
-
__classPrivateFieldSet: () =>
|
|
6608
|
-
__createBinding: () =>
|
|
6609
|
-
__decorate: () =>
|
|
6610
|
-
__disposeResources: () =>
|
|
6611
|
-
__esDecorate: () =>
|
|
6612
|
-
__exportStar: () =>
|
|
6613
|
-
__extends: () =>
|
|
6614
|
-
__generator: () =>
|
|
6615
|
-
__importDefault: () =>
|
|
6616
|
-
__importStar: () =>
|
|
6617
|
-
__makeTemplateObject: () =>
|
|
6618
|
-
__metadata: () =>
|
|
6619
|
-
__param: () =>
|
|
6620
|
-
__propKey: () =>
|
|
6621
|
-
__read: () =>
|
|
6622
|
-
__rest: () =>
|
|
6623
|
-
__rewriteRelativeImportExtension: () =>
|
|
6624
|
-
__runInitializers: () =>
|
|
6625
|
-
__setFunctionName: () =>
|
|
6626
|
-
__spread: () =>
|
|
6627
|
-
__spreadArray: () =>
|
|
6628
|
-
__spreadArrays: () =>
|
|
6629
|
-
__values: () =>
|
|
6630
|
-
default: () =>
|
|
6715
|
+
function Me(e) {
|
|
6716
|
+
return je.get(`PluralRules`, e);
|
|
6717
|
+
}
|
|
6718
|
+
var M = m({
|
|
6719
|
+
__addDisposableResource: () => it,
|
|
6720
|
+
__assign: () => F,
|
|
6721
|
+
__asyncDelegator: () => Xe,
|
|
6722
|
+
__asyncGenerator: () => Ye,
|
|
6723
|
+
__asyncValues: () => Ze,
|
|
6724
|
+
__await: () => P,
|
|
6725
|
+
__awaiter: () => He,
|
|
6726
|
+
__classPrivateFieldGet: () => tt,
|
|
6727
|
+
__classPrivateFieldIn: () => rt,
|
|
6728
|
+
__classPrivateFieldSet: () => nt,
|
|
6729
|
+
__createBinding: () => I,
|
|
6730
|
+
__decorate: () => Fe,
|
|
6731
|
+
__disposeResources: () => at,
|
|
6732
|
+
__esDecorate: () => Le,
|
|
6733
|
+
__exportStar: () => We,
|
|
6734
|
+
__extends: () => Ne,
|
|
6735
|
+
__generator: () => Ue,
|
|
6736
|
+
__importDefault: () => et,
|
|
6737
|
+
__importStar: () => $e,
|
|
6738
|
+
__makeTemplateObject: () => Qe,
|
|
6739
|
+
__metadata: () => Ve,
|
|
6740
|
+
__param: () => Ie,
|
|
6741
|
+
__propKey: () => ze,
|
|
6742
|
+
__read: () => Ge,
|
|
6743
|
+
__rest: () => Pe,
|
|
6744
|
+
__rewriteRelativeImportExtension: () => ot,
|
|
6745
|
+
__runInitializers: () => Re,
|
|
6746
|
+
__setFunctionName: () => Be,
|
|
6747
|
+
__spread: () => Ke,
|
|
6748
|
+
__spreadArray: () => Je,
|
|
6749
|
+
__spreadArrays: () => qe,
|
|
6750
|
+
__values: () => N,
|
|
6751
|
+
default: () => ut
|
|
6631
6752
|
});
|
|
6632
|
-
function
|
|
6753
|
+
function Ne(e, t) {
|
|
6633
6754
|
if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
|
|
6634
|
-
|
|
6755
|
+
st(e, t);
|
|
6635
6756
|
function n() {
|
|
6636
6757
|
this.constructor = e;
|
|
6637
6758
|
}
|
|
6638
6759
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
6639
6760
|
}
|
|
6640
|
-
function
|
|
6761
|
+
function Pe(e, t) {
|
|
6641
6762
|
var n = {};
|
|
6642
6763
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
6643
6764
|
if (e != null && typeof Object.getOwnPropertySymbols == `function`) for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
6644
6765
|
return n;
|
|
6645
6766
|
}
|
|
6646
|
-
function
|
|
6767
|
+
function Fe(e, t, n, r) {
|
|
6647
6768
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
6648
6769
|
if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
|
|
6649
6770
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
6650
6771
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
6651
6772
|
}
|
|
6652
|
-
function
|
|
6773
|
+
function Ie(e, t) {
|
|
6653
6774
|
return function(n, r) {
|
|
6654
6775
|
t(n, r, e);
|
|
6655
6776
|
};
|
|
6656
6777
|
}
|
|
6657
|
-
function
|
|
6778
|
+
function Le(e, t, n, r, i, a) {
|
|
6658
6779
|
function o(e) {
|
|
6659
6780
|
if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
|
|
6660
6781
|
return e;
|
|
@@ -6679,23 +6800,23 @@ function Ae(e, t, n, r, i, a) {
|
|
|
6679
6800
|
}
|
|
6680
6801
|
l && Object.defineProperty(l, r.name, u), f = !0;
|
|
6681
6802
|
}
|
|
6682
|
-
function
|
|
6803
|
+
function Re(e, t, n) {
|
|
6683
6804
|
for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
|
|
6684
6805
|
return r ? n : void 0;
|
|
6685
6806
|
}
|
|
6686
|
-
function
|
|
6807
|
+
function ze(e) {
|
|
6687
6808
|
return typeof e == `symbol` ? e : `${e}`;
|
|
6688
6809
|
}
|
|
6689
|
-
function
|
|
6810
|
+
function Be(e, t, n) {
|
|
6690
6811
|
return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
|
|
6691
6812
|
configurable: !0,
|
|
6692
6813
|
value: n ? `${n} ${t}` : t
|
|
6693
6814
|
});
|
|
6694
6815
|
}
|
|
6695
|
-
function
|
|
6816
|
+
function Ve(e, t) {
|
|
6696
6817
|
if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
|
|
6697
6818
|
}
|
|
6698
|
-
function
|
|
6819
|
+
function He(e, t, n, r) {
|
|
6699
6820
|
function i(e) {
|
|
6700
6821
|
return e instanceof n ? e : new n(function(t) {
|
|
6701
6822
|
t(e);
|
|
@@ -6722,7 +6843,7 @@ function Fe(e, t, n, r) {
|
|
|
6722
6843
|
c((r = r.apply(e, t || [])).next());
|
|
6723
6844
|
});
|
|
6724
6845
|
}
|
|
6725
|
-
function
|
|
6846
|
+
function Ue(e, t) {
|
|
6726
6847
|
var n = {
|
|
6727
6848
|
label: 0,
|
|
6728
6849
|
sent: function() {
|
|
@@ -6792,10 +6913,10 @@ function Ie(e, t) {
|
|
|
6792
6913
|
};
|
|
6793
6914
|
}
|
|
6794
6915
|
}
|
|
6795
|
-
function
|
|
6796
|
-
for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) &&
|
|
6916
|
+
function We(e, t) {
|
|
6917
|
+
for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && I(t, e, n);
|
|
6797
6918
|
}
|
|
6798
|
-
function
|
|
6919
|
+
function N(e) {
|
|
6799
6920
|
var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
|
|
6800
6921
|
if (n) return n.call(e);
|
|
6801
6922
|
if (e && typeof e.length == `number`) return { next: function() {
|
|
@@ -6806,7 +6927,7 @@ function F(e) {
|
|
|
6806
6927
|
} };
|
|
6807
6928
|
throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
|
|
6808
6929
|
}
|
|
6809
|
-
function
|
|
6930
|
+
function Ge(e, t) {
|
|
6810
6931
|
var n = typeof Symbol == `function` && e[Symbol.iterator];
|
|
6811
6932
|
if (!n) return e;
|
|
6812
6933
|
var r = n.call(e), i, a = [], o;
|
|
@@ -6823,23 +6944,23 @@ function Re(e, t) {
|
|
|
6823
6944
|
}
|
|
6824
6945
|
return a;
|
|
6825
6946
|
}
|
|
6826
|
-
function
|
|
6827
|
-
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(
|
|
6947
|
+
function Ke() {
|
|
6948
|
+
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Ge(arguments[t]));
|
|
6828
6949
|
return e;
|
|
6829
6950
|
}
|
|
6830
|
-
function
|
|
6951
|
+
function qe() {
|
|
6831
6952
|
for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
|
|
6832
6953
|
for (var r = Array(e), i = 0, t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
|
|
6833
6954
|
return r;
|
|
6834
6955
|
}
|
|
6835
|
-
function
|
|
6956
|
+
function Je(e, t, n) {
|
|
6836
6957
|
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
6837
6958
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
6838
6959
|
}
|
|
6839
|
-
function
|
|
6840
|
-
return this instanceof
|
|
6960
|
+
function P(e) {
|
|
6961
|
+
return this instanceof P ? (this.v = e, this) : new P(e);
|
|
6841
6962
|
}
|
|
6842
|
-
function
|
|
6963
|
+
function Ye(e, t, n) {
|
|
6843
6964
|
if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
|
|
6844
6965
|
var r = n.apply(e, t || []), i, a = [];
|
|
6845
6966
|
return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
|
|
@@ -6870,7 +6991,7 @@ function He(e, t, n) {
|
|
|
6870
6991
|
}
|
|
6871
6992
|
}
|
|
6872
6993
|
function l(e) {
|
|
6873
|
-
e.value instanceof
|
|
6994
|
+
e.value instanceof P ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
|
|
6874
6995
|
}
|
|
6875
6996
|
function u(e) {
|
|
6876
6997
|
c(`next`, e);
|
|
@@ -6882,7 +7003,7 @@ function He(e, t, n) {
|
|
|
6882
7003
|
e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
|
|
6883
7004
|
}
|
|
6884
7005
|
}
|
|
6885
|
-
function
|
|
7006
|
+
function Xe(e) {
|
|
6886
7007
|
var t, n;
|
|
6887
7008
|
return t = {}, r(`next`), r(`throw`, function(e) {
|
|
6888
7009
|
throw e;
|
|
@@ -6892,16 +7013,16 @@ function Ue(e) {
|
|
|
6892
7013
|
function r(r, i) {
|
|
6893
7014
|
t[r] = e[r] ? function(t) {
|
|
6894
7015
|
return (n = !n) ? {
|
|
6895
|
-
value:
|
|
7016
|
+
value: P(e[r](t)),
|
|
6896
7017
|
done: !1
|
|
6897
7018
|
} : i ? i(t) : t;
|
|
6898
7019
|
} : i;
|
|
6899
7020
|
}
|
|
6900
7021
|
}
|
|
6901
|
-
function
|
|
7022
|
+
function Ze(e) {
|
|
6902
7023
|
if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
|
|
6903
7024
|
var t = e[Symbol.asyncIterator], n;
|
|
6904
|
-
return t ? t.call(e) : (e = typeof
|
|
7025
|
+
return t ? t.call(e) : (e = typeof N == `function` ? N(e) : e[Symbol.iterator](), n = {}, r(`next`), r(`throw`), r(`return`), n[Symbol.asyncIterator] = function() {
|
|
6905
7026
|
return this;
|
|
6906
7027
|
}, n);
|
|
6907
7028
|
function r(t) {
|
|
@@ -6920,34 +7041,34 @@ function We(e) {
|
|
|
6920
7041
|
}, t);
|
|
6921
7042
|
}
|
|
6922
7043
|
}
|
|
6923
|
-
function
|
|
7044
|
+
function Qe(e, t) {
|
|
6924
7045
|
return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
|
|
6925
7046
|
}
|
|
6926
|
-
function
|
|
7047
|
+
function $e(e) {
|
|
6927
7048
|
if (e && e.__esModule) return e;
|
|
6928
7049
|
var t = {};
|
|
6929
|
-
if (e != null) for (var n =
|
|
6930
|
-
return
|
|
7050
|
+
if (e != null) for (var n = L(e), r = 0; r < n.length; r++) n[r] !== `default` && I(t, e, n[r]);
|
|
7051
|
+
return ct(t, e), t;
|
|
6931
7052
|
}
|
|
6932
|
-
function
|
|
7053
|
+
function et(e) {
|
|
6933
7054
|
return e && e.__esModule ? e : { default: e };
|
|
6934
7055
|
}
|
|
6935
|
-
function
|
|
7056
|
+
function tt(e, t, n, r) {
|
|
6936
7057
|
if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
|
|
6937
7058
|
if (typeof t == `function` ? e !== t || !r : !t.has(e)) throw TypeError(`Cannot read private member from an object whose class did not declare it`);
|
|
6938
7059
|
return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
|
|
6939
7060
|
}
|
|
6940
|
-
function
|
|
7061
|
+
function nt(e, t, n, r, i) {
|
|
6941
7062
|
if (r === `m`) throw TypeError(`Private method is not writable`);
|
|
6942
7063
|
if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
|
|
6943
7064
|
if (typeof t == `function` ? e !== t || !i : !t.has(e)) throw TypeError(`Cannot write private member to an object whose class did not declare it`);
|
|
6944
7065
|
return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
|
|
6945
7066
|
}
|
|
6946
|
-
function
|
|
7067
|
+
function rt(e, t) {
|
|
6947
7068
|
if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
|
|
6948
7069
|
return typeof e == `function` ? t === e : e.has(t);
|
|
6949
7070
|
}
|
|
6950
|
-
function
|
|
7071
|
+
function it(e, t, n) {
|
|
6951
7072
|
if (t != null) {
|
|
6952
7073
|
if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
|
|
6953
7074
|
var r, i;
|
|
@@ -6974,9 +7095,9 @@ function Ze(e, t, n) {
|
|
|
6974
7095
|
} else n && e.stack.push({ async: !0 });
|
|
6975
7096
|
return t;
|
|
6976
7097
|
}
|
|
6977
|
-
function
|
|
7098
|
+
function at(e) {
|
|
6978
7099
|
function t(t) {
|
|
6979
|
-
e.error = e.hasError ? new
|
|
7100
|
+
e.error = e.hasError ? new lt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
|
|
6980
7101
|
}
|
|
6981
7102
|
var n, r = 0;
|
|
6982
7103
|
function i() {
|
|
@@ -6996,24 +7117,24 @@ function Qe(e) {
|
|
|
6996
7117
|
}
|
|
6997
7118
|
return i();
|
|
6998
7119
|
}
|
|
6999
|
-
function
|
|
7120
|
+
function ot(e, t) {
|
|
7000
7121
|
return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
|
|
7001
7122
|
return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
|
|
7002
7123
|
}) : e;
|
|
7003
7124
|
}
|
|
7004
|
-
var
|
|
7005
|
-
|
|
7006
|
-
return
|
|
7125
|
+
var st, F, I, ct, L, lt, ut, R = f((() => {
|
|
7126
|
+
st = function(e, t) {
|
|
7127
|
+
return st = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
7007
7128
|
e.__proto__ = t;
|
|
7008
7129
|
} || function(e, t) {
|
|
7009
7130
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
7010
|
-
},
|
|
7011
|
-
},
|
|
7012
|
-
return
|
|
7131
|
+
}, st(e, t);
|
|
7132
|
+
}, F = function() {
|
|
7133
|
+
return F = Object.assign || function(e) {
|
|
7013
7134
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
7014
7135
|
return e;
|
|
7015
|
-
},
|
|
7016
|
-
},
|
|
7136
|
+
}, F.apply(this, arguments);
|
|
7137
|
+
}, I = Object.create ? (function(e, t, n, r) {
|
|
7017
7138
|
r === void 0 && (r = n);
|
|
7018
7139
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
7019
7140
|
(!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
@@ -7024,63 +7145,63 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
7024
7145
|
}), Object.defineProperty(e, r, i);
|
|
7025
7146
|
}) : (function(e, t, n, r) {
|
|
7026
7147
|
r === void 0 && (r = n), e[r] = t[n];
|
|
7027
|
-
}),
|
|
7148
|
+
}), ct = Object.create ? (function(e, t) {
|
|
7028
7149
|
Object.defineProperty(e, `default`, {
|
|
7029
7150
|
enumerable: !0,
|
|
7030
7151
|
value: t
|
|
7031
7152
|
});
|
|
7032
7153
|
}) : function(e, t) {
|
|
7033
7154
|
e.default = t;
|
|
7034
|
-
},
|
|
7035
|
-
return
|
|
7155
|
+
}, L = function(e) {
|
|
7156
|
+
return L = Object.getOwnPropertyNames || function(e) {
|
|
7036
7157
|
var t = [];
|
|
7037
7158
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
|
|
7038
7159
|
return t;
|
|
7039
|
-
},
|
|
7040
|
-
},
|
|
7160
|
+
}, L(e);
|
|
7161
|
+
}, lt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
|
|
7041
7162
|
var r = Error(n);
|
|
7042
7163
|
return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
|
|
7043
|
-
},
|
|
7044
|
-
__extends:
|
|
7045
|
-
__assign:
|
|
7046
|
-
__rest:
|
|
7047
|
-
__decorate:
|
|
7048
|
-
__param:
|
|
7049
|
-
__esDecorate:
|
|
7050
|
-
__runInitializers:
|
|
7051
|
-
__propKey:
|
|
7052
|
-
__setFunctionName:
|
|
7053
|
-
__metadata:
|
|
7054
|
-
__awaiter:
|
|
7055
|
-
__generator:
|
|
7056
|
-
__createBinding:
|
|
7057
|
-
__exportStar:
|
|
7058
|
-
__values:
|
|
7059
|
-
__read:
|
|
7060
|
-
__spread:
|
|
7061
|
-
__spreadArrays:
|
|
7062
|
-
__spreadArray:
|
|
7063
|
-
__await:
|
|
7064
|
-
__asyncGenerator:
|
|
7065
|
-
__asyncDelegator:
|
|
7066
|
-
__asyncValues:
|
|
7067
|
-
__makeTemplateObject:
|
|
7068
|
-
__importStar:
|
|
7069
|
-
__importDefault:
|
|
7070
|
-
__classPrivateFieldGet:
|
|
7071
|
-
__classPrivateFieldSet:
|
|
7072
|
-
__classPrivateFieldIn:
|
|
7073
|
-
__addDisposableResource:
|
|
7074
|
-
__disposeResources:
|
|
7075
|
-
__rewriteRelativeImportExtension:
|
|
7164
|
+
}, ut = {
|
|
7165
|
+
__extends: Ne,
|
|
7166
|
+
__assign: F,
|
|
7167
|
+
__rest: Pe,
|
|
7168
|
+
__decorate: Fe,
|
|
7169
|
+
__param: Ie,
|
|
7170
|
+
__esDecorate: Le,
|
|
7171
|
+
__runInitializers: Re,
|
|
7172
|
+
__propKey: ze,
|
|
7173
|
+
__setFunctionName: Be,
|
|
7174
|
+
__metadata: Ve,
|
|
7175
|
+
__awaiter: He,
|
|
7176
|
+
__generator: Ue,
|
|
7177
|
+
__createBinding: I,
|
|
7178
|
+
__exportStar: We,
|
|
7179
|
+
__values: N,
|
|
7180
|
+
__read: Ge,
|
|
7181
|
+
__spread: Ke,
|
|
7182
|
+
__spreadArrays: qe,
|
|
7183
|
+
__spreadArray: Je,
|
|
7184
|
+
__await: P,
|
|
7185
|
+
__asyncGenerator: Ye,
|
|
7186
|
+
__asyncDelegator: Xe,
|
|
7187
|
+
__asyncValues: Ze,
|
|
7188
|
+
__makeTemplateObject: Qe,
|
|
7189
|
+
__importStar: $e,
|
|
7190
|
+
__importDefault: et,
|
|
7191
|
+
__classPrivateFieldGet: tt,
|
|
7192
|
+
__classPrivateFieldSet: nt,
|
|
7193
|
+
__classPrivateFieldIn: rt,
|
|
7194
|
+
__addDisposableResource: it,
|
|
7195
|
+
__disposeResources: at,
|
|
7196
|
+
__rewriteRelativeImportExtension: ot
|
|
7076
7197
|
};
|
|
7077
|
-
})),
|
|
7198
|
+
})), dt = p(((e) => {
|
|
7078
7199
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
|
|
7079
7200
|
var t;
|
|
7080
7201
|
(function(e) {
|
|
7081
7202
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e[e.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e[e.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e[e.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e[e.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e[e.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e[e.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e[e.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e[e.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e[e.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e[e.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e[e.INVALID_TAG = 23] = `INVALID_TAG`, e[e.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e[e.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e[e.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`;
|
|
7082
7203
|
})(t || (e.ErrorKind = t = {}));
|
|
7083
|
-
})),
|
|
7204
|
+
})), z = p(((e) => {
|
|
7084
7205
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.SKELETON_TYPE = e.TYPE = void 0, e.isLiteralElement = r, e.isArgumentElement = i, e.isNumberElement = a, e.isDateElement = o, e.isTimeElement = s, e.isSelectElement = c, e.isPluralElement = l, e.isPoundElement = u, e.isTagElement = d, e.isNumberSkeleton = f, e.isDateTimeSkeleton = p, e.createLiteralElement = m, e.createNumberElement = h;
|
|
7085
7206
|
var t;
|
|
7086
7207
|
(function(e) {
|
|
@@ -7136,9 +7257,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
7136
7257
|
style: n
|
|
7137
7258
|
};
|
|
7138
7259
|
}
|
|
7139
|
-
})),
|
|
7260
|
+
})), ft = p(((e) => {
|
|
7140
7261
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = e.SPACE_SEPARATOR_REGEX = void 0, e.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
|
|
7141
|
-
})),
|
|
7262
|
+
})), pt = p(((e) => {
|
|
7142
7263
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
|
|
7143
7264
|
var t = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
7144
7265
|
function n(e) {
|
|
@@ -7238,11 +7359,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
7238
7359
|
return ``;
|
|
7239
7360
|
}), n;
|
|
7240
7361
|
}
|
|
7241
|
-
})),
|
|
7362
|
+
})), mt = p(((e) => {
|
|
7242
7363
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
7243
|
-
})),
|
|
7364
|
+
})), ht = p(((e) => {
|
|
7244
7365
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
|
|
7245
|
-
var t = (
|
|
7366
|
+
var t = (R(), g(M)), n = mt();
|
|
7246
7367
|
function r(e) {
|
|
7247
7368
|
if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
7248
7369
|
for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
|
|
@@ -7420,11 +7541,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
7420
7541
|
}
|
|
7421
7542
|
return n;
|
|
7422
7543
|
}
|
|
7423
|
-
})),
|
|
7544
|
+
})), gt = p(((e) => {
|
|
7424
7545
|
Object.defineProperty(e, `__esModule`, { value: !0 });
|
|
7425
|
-
var t = (
|
|
7426
|
-
t.__exportStar(
|
|
7427
|
-
})),
|
|
7546
|
+
var t = (R(), g(M));
|
|
7547
|
+
t.__exportStar(pt(), e), t.__exportStar(ht(), e);
|
|
7548
|
+
})), _t = p(((e) => {
|
|
7428
7549
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
|
|
7429
7550
|
"001": [`H`, `h`],
|
|
7430
7551
|
419: [
|
|
@@ -8581,9 +8702,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8581
8702
|
`h`
|
|
8582
8703
|
]
|
|
8583
8704
|
};
|
|
8584
|
-
})),
|
|
8705
|
+
})), vt = p(((e) => {
|
|
8585
8706
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
|
|
8586
|
-
var t =
|
|
8707
|
+
var t = _t();
|
|
8587
8708
|
function n(e, t) {
|
|
8588
8709
|
for (var n = ``, i = 0; i < e.length; i++) {
|
|
8589
8710
|
var a = e.charAt(i);
|
|
@@ -8608,9 +8729,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8608
8729
|
var r = e.language, i;
|
|
8609
8730
|
return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
|
|
8610
8731
|
}
|
|
8611
|
-
})),
|
|
8732
|
+
})), yt = p(((e) => {
|
|
8612
8733
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
|
|
8613
|
-
var t = (
|
|
8734
|
+
var t = (R(), g(M)), n = dt(), r = z(), i = ft(), a = gt(), o = vt(), s = RegExp(`^${i.SPACE_SEPARATOR_REGEX.source}*`), c = RegExp(`${i.SPACE_SEPARATOR_REGEX.source}*\$`);
|
|
8614
8735
|
function l(e, t) {
|
|
8615
8736
|
return {
|
|
8616
8737
|
start: e,
|
|
@@ -8621,21 +8742,21 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8621
8742
|
return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
|
|
8622
8743
|
}, v = !0;
|
|
8623
8744
|
try {
|
|
8624
|
-
v =
|
|
8745
|
+
v = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
|
|
8625
8746
|
} catch {
|
|
8626
8747
|
v = !1;
|
|
8627
8748
|
}
|
|
8628
|
-
var
|
|
8749
|
+
var ee = u ? function(e, t, n) {
|
|
8629
8750
|
return e.startsWith(t, n);
|
|
8630
8751
|
} : function(e, t, n) {
|
|
8631
8752
|
return e.slice(n, n + t.length) === t;
|
|
8632
|
-
},
|
|
8753
|
+
}, y = d ? String.fromCodePoint : function() {
|
|
8633
8754
|
for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
|
|
8634
8755
|
if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
|
|
8635
8756
|
t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
|
|
8636
8757
|
}
|
|
8637
8758
|
return t;
|
|
8638
|
-
},
|
|
8759
|
+
}, b = f ? Object.fromEntries : function(e) {
|
|
8639
8760
|
for (var t = {}, n = 0, r = e; n < r.length; n++) {
|
|
8640
8761
|
var i = r[n], a = i[0];
|
|
8641
8762
|
t[a] = i[1];
|
|
@@ -8649,31 +8770,31 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8649
8770
|
var r = e.charCodeAt(t), i;
|
|
8650
8771
|
return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
|
|
8651
8772
|
}
|
|
8652
|
-
},
|
|
8773
|
+
}, te = m ? function(e) {
|
|
8653
8774
|
return e.trimStart();
|
|
8654
8775
|
} : function(e) {
|
|
8655
8776
|
return e.replace(s, ``);
|
|
8656
|
-
},
|
|
8777
|
+
}, ne = h ? function(e) {
|
|
8657
8778
|
return e.trimEnd();
|
|
8658
8779
|
} : function(e) {
|
|
8659
8780
|
return e.replace(c, ``);
|
|
8660
8781
|
};
|
|
8661
|
-
function
|
|
8782
|
+
function S(e, t) {
|
|
8662
8783
|
return new RegExp(e, t);
|
|
8663
8784
|
}
|
|
8664
|
-
var
|
|
8785
|
+
var C;
|
|
8665
8786
|
if (v) {
|
|
8666
|
-
var
|
|
8667
|
-
|
|
8668
|
-
return
|
|
8787
|
+
var w = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
8788
|
+
C = function(e, t) {
|
|
8789
|
+
return w.lastIndex = t, w.exec(e)[1] ?? ``;
|
|
8669
8790
|
};
|
|
8670
|
-
} else
|
|
8791
|
+
} else C = function(e, t) {
|
|
8671
8792
|
for (var n = [];;) {
|
|
8672
8793
|
var r = x(e, t);
|
|
8673
|
-
if (r === void 0 ||
|
|
8794
|
+
if (r === void 0 || ie(r) || D(r)) break;
|
|
8674
8795
|
n.push(r), t += r >= 65536 ? 2 : 1;
|
|
8675
8796
|
}
|
|
8676
|
-
return
|
|
8797
|
+
return y.apply(void 0, n);
|
|
8677
8798
|
};
|
|
8678
8799
|
e.Parser = function() {
|
|
8679
8800
|
function e(e, t) {
|
|
@@ -8703,7 +8824,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8703
8824
|
} else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
8704
8825
|
if (i) break;
|
|
8705
8826
|
return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
|
|
8706
|
-
} else if (o === 60 && !this.ignoreTag &&
|
|
8827
|
+
} else if (o === 60 && !this.ignoreTag && T(this.peek() || 0)) {
|
|
8707
8828
|
var s = this.parseTag(e, t);
|
|
8708
8829
|
if (s.err) return s;
|
|
8709
8830
|
a.push(s.val);
|
|
@@ -8734,7 +8855,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8734
8855
|
if (o.err) return o;
|
|
8735
8856
|
var s = o.val, c = this.clonePosition();
|
|
8736
8857
|
if (this.bumpIf(`</`)) {
|
|
8737
|
-
if (this.isEOF() || !
|
|
8858
|
+
if (this.isEOF() || !T(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
|
|
8738
8859
|
var u = this.clonePosition();
|
|
8739
8860
|
return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
|
|
8740
8861
|
val: {
|
|
@@ -8749,7 +8870,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8749
8870
|
} else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
|
|
8750
8871
|
}, e.prototype.parseTagName = function() {
|
|
8751
8872
|
var e = this.offset();
|
|
8752
|
-
for (this.bump(); !this.isEOF() &&
|
|
8873
|
+
for (this.bump(); !this.isEOF() && E(this.char());) this.bump();
|
|
8753
8874
|
return this.message.slice(e, this.offset());
|
|
8754
8875
|
}, e.prototype.parseLiteral = function(e, t) {
|
|
8755
8876
|
for (var n = this.clonePosition(), i = ``;;) {
|
|
@@ -8780,7 +8901,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8780
8901
|
err: null
|
|
8781
8902
|
};
|
|
8782
8903
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
8783
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
8904
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !re(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
8784
8905
|
}, e.prototype.tryParseQuote = function(e) {
|
|
8785
8906
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
8786
8907
|
switch (this.peek()) {
|
|
@@ -8806,11 +8927,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8806
8927
|
else t.push(n);
|
|
8807
8928
|
this.bump();
|
|
8808
8929
|
}
|
|
8809
|
-
return
|
|
8930
|
+
return y.apply(void 0, t);
|
|
8810
8931
|
}, e.prototype.tryParseUnquoted = function(e, t) {
|
|
8811
8932
|
if (this.isEOF()) return null;
|
|
8812
8933
|
var n = this.char();
|
|
8813
|
-
return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(),
|
|
8934
|
+
return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), y(n));
|
|
8814
8935
|
}, e.prototype.parseArgument = function(e, t) {
|
|
8815
8936
|
var i = this.clonePosition();
|
|
8816
8937
|
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
|
|
@@ -8831,7 +8952,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8831
8952
|
default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
|
|
8832
8953
|
}
|
|
8833
8954
|
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
8834
|
-
var e = this.clonePosition(), t = this.offset(), n =
|
|
8955
|
+
var e = this.clonePosition(), t = this.offset(), n = C(this.message, t), r = t + n.length;
|
|
8835
8956
|
return this.bumpTo(r), {
|
|
8836
8957
|
value: n,
|
|
8837
8958
|
location: l(e, this.clonePosition())
|
|
@@ -8849,7 +8970,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8849
8970
|
this.bumpSpace();
|
|
8850
8971
|
var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
|
|
8851
8972
|
if (h.err) return h;
|
|
8852
|
-
var g =
|
|
8973
|
+
var g = ne(h.val);
|
|
8853
8974
|
if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
|
|
8854
8975
|
p = {
|
|
8855
8976
|
style: g,
|
|
@@ -8859,10 +8980,10 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8859
8980
|
var _ = this.tryParseArgumentClose(c);
|
|
8860
8981
|
if (_.err) return _;
|
|
8861
8982
|
var v = l(c, this.clonePosition());
|
|
8862
|
-
if (p &&
|
|
8863
|
-
var
|
|
8983
|
+
if (p && ee(p?.style, `::`, 0)) {
|
|
8984
|
+
var y = te(p.style.slice(2));
|
|
8864
8985
|
if (d === `number`) {
|
|
8865
|
-
var h = this.parseNumberSkeletonFromString(
|
|
8986
|
+
var h = this.parseNumberSkeletonFromString(y, p.styleLocation);
|
|
8866
8987
|
return h.err ? h : {
|
|
8867
8988
|
val: {
|
|
8868
8989
|
type: r.TYPE.number,
|
|
@@ -8873,9 +8994,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8873
8994
|
err: null
|
|
8874
8995
|
};
|
|
8875
8996
|
} else {
|
|
8876
|
-
if (
|
|
8877
|
-
var x =
|
|
8878
|
-
this.locale && (x = (0, o.getBestPattern)(
|
|
8997
|
+
if (y.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
|
|
8998
|
+
var x = y;
|
|
8999
|
+
this.locale && (x = (0, o.getBestPattern)(y, this.locale));
|
|
8879
9000
|
var g = {
|
|
8880
9001
|
type: r.SKELETON_TYPE.dateTime,
|
|
8881
9002
|
pattern: x,
|
|
@@ -8905,38 +9026,38 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
8905
9026
|
case `plural`:
|
|
8906
9027
|
case `selectordinal`:
|
|
8907
9028
|
case `select`:
|
|
8908
|
-
var
|
|
8909
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(
|
|
9029
|
+
var S = this.clonePosition();
|
|
9030
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(S, t.__assign({}, S)));
|
|
8910
9031
|
this.bumpSpace();
|
|
8911
|
-
var
|
|
8912
|
-
if (d !== `select` &&
|
|
9032
|
+
var C = this.parseIdentifierIfPossible(), w = 0;
|
|
9033
|
+
if (d !== `select` && C.value === `offset`) {
|
|
8913
9034
|
if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
|
|
8914
9035
|
this.bumpSpace();
|
|
8915
9036
|
var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
8916
9037
|
if (h.err) return h;
|
|
8917
|
-
this.bumpSpace(),
|
|
9038
|
+
this.bumpSpace(), C = this.parseIdentifierIfPossible(), w = h.val;
|
|
8918
9039
|
}
|
|
8919
|
-
var
|
|
8920
|
-
if (
|
|
9040
|
+
var T = this.tryParsePluralOrSelectOptions(e, d, i, C);
|
|
9041
|
+
if (T.err) return T;
|
|
8921
9042
|
var _ = this.tryParseArgumentClose(c);
|
|
8922
9043
|
if (_.err) return _;
|
|
8923
|
-
var
|
|
9044
|
+
var re = l(c, this.clonePosition());
|
|
8924
9045
|
return d === `select` ? {
|
|
8925
9046
|
val: {
|
|
8926
9047
|
type: r.TYPE.select,
|
|
8927
9048
|
value: s,
|
|
8928
|
-
options:
|
|
8929
|
-
location:
|
|
9049
|
+
options: b(T.val),
|
|
9050
|
+
location: re
|
|
8930
9051
|
},
|
|
8931
9052
|
err: null
|
|
8932
9053
|
} : {
|
|
8933
9054
|
val: {
|
|
8934
9055
|
type: r.TYPE.plural,
|
|
8935
9056
|
value: s,
|
|
8936
|
-
options:
|
|
8937
|
-
offset:
|
|
9057
|
+
options: b(T.val),
|
|
9058
|
+
offset: w,
|
|
8938
9059
|
pluralType: d === `plural` ? `cardinal` : `ordinal`,
|
|
8939
|
-
location:
|
|
9060
|
+
location: re
|
|
8940
9061
|
},
|
|
8941
9062
|
err: null
|
|
8942
9063
|
};
|
|
@@ -9060,7 +9181,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
9060
9181
|
e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
|
|
9061
9182
|
}
|
|
9062
9183
|
}, e.prototype.bumpIf = function(e) {
|
|
9063
|
-
if (
|
|
9184
|
+
if (ee(this.message, e, this.offset())) {
|
|
9064
9185
|
for (var t = 0; t < e.length; t++) this.bump();
|
|
9065
9186
|
return !0;
|
|
9066
9187
|
}
|
|
@@ -9077,31 +9198,31 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
9077
9198
|
if (this.bump(), this.isEOF()) break;
|
|
9078
9199
|
}
|
|
9079
9200
|
}, e.prototype.bumpSpace = function() {
|
|
9080
|
-
for (; !this.isEOF() &&
|
|
9201
|
+
for (; !this.isEOF() && ie(this.char());) this.bump();
|
|
9081
9202
|
}, e.prototype.peek = function() {
|
|
9082
9203
|
if (this.isEOF()) return null;
|
|
9083
9204
|
var e = this.char(), t = this.offset();
|
|
9084
9205
|
return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
|
|
9085
9206
|
}, e;
|
|
9086
9207
|
}();
|
|
9087
|
-
function
|
|
9208
|
+
function T(e) {
|
|
9088
9209
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
9089
9210
|
}
|
|
9090
|
-
function
|
|
9091
|
-
return
|
|
9211
|
+
function re(e) {
|
|
9212
|
+
return T(e) || e === 47;
|
|
9092
9213
|
}
|
|
9093
|
-
function
|
|
9214
|
+
function E(e) {
|
|
9094
9215
|
return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
9095
9216
|
}
|
|
9096
|
-
function
|
|
9217
|
+
function ie(e) {
|
|
9097
9218
|
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
|
|
9098
9219
|
}
|
|
9099
|
-
function
|
|
9220
|
+
function D(e) {
|
|
9100
9221
|
return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
|
|
9101
9222
|
}
|
|
9102
|
-
})),
|
|
9223
|
+
})), bt = p(((e) => {
|
|
9103
9224
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
|
|
9104
|
-
var t = (
|
|
9225
|
+
var t = (R(), g(M)), n = z();
|
|
9105
9226
|
function r(e) {
|
|
9106
9227
|
return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
|
|
9107
9228
|
return t[n] = r(e[n]), t;
|
|
@@ -9158,9 +9279,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
9158
9279
|
error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
|
|
9159
9280
|
};
|
|
9160
9281
|
}
|
|
9161
|
-
})),
|
|
9282
|
+
})), xt = p(((e) => {
|
|
9162
9283
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
|
|
9163
|
-
var t = (
|
|
9284
|
+
var t = (R(), g(M)), n = dt(), r = yt(), i = z();
|
|
9164
9285
|
function a(e) {
|
|
9165
9286
|
e.forEach(function(e) {
|
|
9166
9287
|
if (delete e.location, (0, i.isSelectElement)(e) || (0, i.isPluralElement)(e)) for (var t in e.options) delete e.options[t].location, a(e.options[t].value);
|
|
@@ -9179,17 +9300,17 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
9179
9300
|
}
|
|
9180
9301
|
return i?.captureLocation || a(o.val), o.val;
|
|
9181
9302
|
}
|
|
9182
|
-
t.__exportStar(
|
|
9183
|
-
var s =
|
|
9303
|
+
t.__exportStar(z(), e), e._Parser = r.Parser;
|
|
9304
|
+
var s = bt();
|
|
9184
9305
|
Object.defineProperty(e, `isStructurallySame`, {
|
|
9185
9306
|
enumerable: !0,
|
|
9186
9307
|
get: function() {
|
|
9187
9308
|
return s.isStructurallySame;
|
|
9188
9309
|
}
|
|
9189
9310
|
});
|
|
9190
|
-
})),
|
|
9311
|
+
})), St = p(((e) => {
|
|
9191
9312
|
Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
|
|
9192
|
-
var t = (
|
|
9313
|
+
var t = (R(), g(M)), n = z();
|
|
9193
9314
|
function r(e) {
|
|
9194
9315
|
return i(e, !1);
|
|
9195
9316
|
}
|
|
@@ -9252,10 +9373,10 @@ var L, R, z, et, B, tt, nt, V = f((() => {
|
|
|
9252
9373
|
].join(`,`)}}`;
|
|
9253
9374
|
}
|
|
9254
9375
|
}));
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
const
|
|
9376
|
+
xt();
|
|
9377
|
+
z();
|
|
9378
|
+
St();
|
|
9379
|
+
const wt = [
|
|
9259
9380
|
`singular`,
|
|
9260
9381
|
`plural`,
|
|
9261
9382
|
`dual`,
|
|
@@ -9266,11 +9387,11 @@ const gt = [
|
|
|
9266
9387
|
`many`,
|
|
9267
9388
|
`other`
|
|
9268
9389
|
];
|
|
9269
|
-
function
|
|
9270
|
-
return
|
|
9390
|
+
function Tt(e) {
|
|
9391
|
+
return wt.includes(e);
|
|
9271
9392
|
}
|
|
9272
|
-
function
|
|
9273
|
-
let r =
|
|
9393
|
+
function Et(e, t = wt, n = [`en`]) {
|
|
9394
|
+
let r = Me(n).select(e), i = Math.abs(e);
|
|
9274
9395
|
if (i === 0 && t.includes(`zero`)) return `zero`;
|
|
9275
9396
|
if (i === 1) {
|
|
9276
9397
|
if (t.includes(`singular`)) return `singular`;
|
|
@@ -9283,20 +9404,20 @@ function vt(e, t = gt, n = [`en`]) {
|
|
|
9283
9404
|
}
|
|
9284
9405
|
return r === `two` && t.includes(`dual`) ? `dual` : t.includes(r) ? r : r === `two` && t.includes(`dual`) ? `dual` : r === `two` && t.includes(`plural`) ? `plural` : r === `two` && t.includes(`other`) ? `other` : r === `few` && t.includes(`plural`) ? `plural` : r === `few` && t.includes(`other`) ? `other` : r === `many` && t.includes(`plural`) ? `plural` : r === `many` && t.includes(`other`) ? `other` : r === `other` && t.includes(`plural`) ? `plural` : ``;
|
|
9285
9406
|
}
|
|
9286
|
-
const
|
|
9407
|
+
const Dt = {
|
|
9287
9408
|
variable: `v`,
|
|
9288
9409
|
number: `n`,
|
|
9289
9410
|
datetime: `d`,
|
|
9290
9411
|
currency: `c`,
|
|
9291
9412
|
"relative-time": `rt`
|
|
9292
9413
|
};
|
|
9293
|
-
function
|
|
9294
|
-
return
|
|
9414
|
+
function Ot(e) {
|
|
9415
|
+
return Dt[e];
|
|
9295
9416
|
}
|
|
9296
|
-
const
|
|
9297
|
-
RegExp(`^${
|
|
9298
|
-
RegExp(`^${
|
|
9299
|
-
function
|
|
9417
|
+
const U = `_gt_`;
|
|
9418
|
+
RegExp(`^${U}\\d+$`);
|
|
9419
|
+
RegExp(`^${U}$`);
|
|
9420
|
+
function Vt(e, n = 0) {
|
|
9300
9421
|
let r = n, a = (e) => {
|
|
9301
9422
|
let { type: t, props: n } = e;
|
|
9302
9423
|
r += 1;
|
|
@@ -9310,11 +9431,11 @@ function Nt(e, n = 0) {
|
|
|
9310
9431
|
if (a) {
|
|
9311
9432
|
let e = a.split(`-`);
|
|
9312
9433
|
if ((e[1] === `automatic` || e[2] === `automatic`) && (i.injectionType = `automatic`), e[0] === `translate` && (e[0] = `fragment`), e[0] === `variable` && (i.variableType = e?.[1] || `variable`), e[0] === `plural`) {
|
|
9313
|
-
let e = Object.entries(n).reduce((e, [t, n]) => (
|
|
9434
|
+
let e = Object.entries(n).reduce((e, [t, n]) => (Tt(t) && (e[t] = Vt(n, r)), e), {});
|
|
9314
9435
|
Object.keys(e).length && (i.branches = e);
|
|
9315
9436
|
}
|
|
9316
9437
|
if (e[0] === `branch`) {
|
|
9317
|
-
let { children: e, branch: t, ...a } = n, o = Object.fromEntries(Object.entries(a).filter(([e]) => !e.startsWith(`data-`))), s = Object.entries(o).reduce((e, [t, n]) => (e[t] =
|
|
9438
|
+
let { children: e, branch: t, ...a } = n, o = Object.fromEntries(Object.entries(a).filter(([e]) => !e.startsWith(`data-`))), s = Object.entries(o).reduce((e, [t, n]) => (e[t] = Vt(n, r), e), {});
|
|
9318
9439
|
Object.keys(s).length && (i.branches = s);
|
|
9319
9440
|
}
|
|
9320
9441
|
i.transformation = e[0];
|
|
@@ -9326,50 +9447,97 @@ function Nt(e, n = 0) {
|
|
|
9326
9447
|
...n,
|
|
9327
9448
|
"data-_gt": r
|
|
9328
9449
|
};
|
|
9329
|
-
return n.children && !r.variableType && (i.children = c(n.children)), e.type === react
|
|
9450
|
+
return n.children && !r.variableType && (i.children = c(n.children)), e.type === react.default.Fragment && (i[`data-_gt`].transformation = `fragment`), react.default.cloneElement(e, i);
|
|
9330
9451
|
}
|
|
9331
9452
|
function s(e) {
|
|
9332
|
-
return (0, react
|
|
9453
|
+
return (0, react.isValidElement)(e) ? o(e) : e;
|
|
9333
9454
|
}
|
|
9334
9455
|
function c(e) {
|
|
9335
|
-
return Array.isArray(e) ? react
|
|
9456
|
+
return Array.isArray(e) ? react.default.Children.map(e, s) : s(e);
|
|
9336
9457
|
}
|
|
9337
9458
|
return c(e);
|
|
9338
9459
|
}
|
|
9339
|
-
const
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9460
|
+
const Ht = `@generaltranslation/react-core`;
|
|
9461
|
+
function W(e) {
|
|
9462
|
+
return S({
|
|
9463
|
+
source: Ht,
|
|
9464
|
+
...e
|
|
9465
|
+
});
|
|
9466
|
+
}
|
|
9467
|
+
W({
|
|
9468
|
+
severity: `Error`,
|
|
9469
|
+
whatHappened: `Runtime translation needs a project ID`,
|
|
9470
|
+
fix: `Add projectId to your <GTProvider> configuration or set GT_PROJECT_ID in your environment`,
|
|
9471
|
+
docsUrl: `https://generaltranslation.com/dashboard`
|
|
9472
|
+
}), W({
|
|
9473
|
+
severity: `Error`,
|
|
9474
|
+
whatHappened: `Production environments cannot use a development API key`,
|
|
9475
|
+
fix: `Replace it with a production API key before deploying`
|
|
9476
|
+
}), W({
|
|
9477
|
+
severity: `Error`,
|
|
9478
|
+
whatHappened: `The API key is available to client-side production code`,
|
|
9479
|
+
fix: `Move translation credentials to a server-only environment before deploying`
|
|
9480
|
+
}), W({
|
|
9481
|
+
severity: `Error`,
|
|
9482
|
+
whatHappened: `Runtime translation is not configured`,
|
|
9483
|
+
fix: `Add projectId and devApiKey to your environment, or pass them to <GTProvider> directly`
|
|
9484
|
+
}), W({
|
|
9485
|
+
severity: `Error`,
|
|
9486
|
+
whatHappened: `Runtime translations could not be loaded`,
|
|
9487
|
+
wayOut: `Source content will render as a fallback`,
|
|
9488
|
+
fix: `Check your runtime translation configuration and try again`
|
|
9489
|
+
}), W({
|
|
9490
|
+
severity: `Error`,
|
|
9491
|
+
whatHappened: `Runtime translation could not be completed`
|
|
9492
|
+
});
|
|
9493
|
+
W({
|
|
9494
|
+
severity: `Warning`,
|
|
9495
|
+
whatHappened: `Runtime translation needs a project ID`,
|
|
9496
|
+
fix: `Add projectId to <GTProvider> or set GT_PROJECT_ID in your environment`,
|
|
9497
|
+
docsUrl: `https://generaltranslation.com/dashboard`
|
|
9498
|
+
}), W({
|
|
9499
|
+
severity: `Warning`,
|
|
9500
|
+
whatHappened: `Runtime translation needs a development API key`,
|
|
9501
|
+
fix: `Find your development API key at generaltranslation.com/dashboard, or set runtimeUrl to an empty string to disable runtime translation`
|
|
9502
|
+
}), W({
|
|
9503
|
+
severity: `Warning`,
|
|
9504
|
+
whatHappened: `Runtime translation timed out`
|
|
9505
|
+
}), W({
|
|
9506
|
+
severity: `Warning`,
|
|
9507
|
+
whatHappened: `No dictionary was found`,
|
|
9508
|
+
fix: `Pass a dictionary to <GTProvider> or configure a dictionary loader before rendering translations`
|
|
9509
|
+
});
|
|
9510
|
+
const Kt = `${Ht} Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.`;
|
|
9511
|
+
function qt(e) {
|
|
9512
|
+
return K(e, 0);
|
|
9345
9513
|
}
|
|
9346
|
-
function
|
|
9347
|
-
let { type: n, props: i } = e, a =
|
|
9514
|
+
function Jt(e, t) {
|
|
9515
|
+
let { type: n, props: i } = e, a = Yt(n);
|
|
9348
9516
|
if (typeof i != `object` || !i) return e;
|
|
9349
9517
|
if (a) {
|
|
9350
9518
|
let { componentType: n, injectionType: o } = a;
|
|
9351
9519
|
if (n === `variable`) return e;
|
|
9352
|
-
if (n === `branch`) return (0, react
|
|
9353
|
-
if (n === `plural`) return (0, react
|
|
9354
|
-
if (n === `derive`) return (0, react
|
|
9520
|
+
if (n === `branch`) return (0, react.cloneElement)(e, { ...Object.entries(i).reduce((e, [n, r]) => (n !== `branch` && !n.startsWith(`data-`) ? e[n] = G(r, t) : e[n] = r, e), {}) });
|
|
9521
|
+
if (n === `plural`) return (0, react.cloneElement)(e, { ...Object.entries(i).reduce((e, [n, r]) => (Tt(n) || n === `children` ? e[n] = G(r, t) : e[n] = r, e), {}) });
|
|
9522
|
+
if (n === `derive`) return (0, react.cloneElement)(e, {
|
|
9355
9523
|
...i,
|
|
9356
|
-
...`children` in i && { children:
|
|
9524
|
+
...`children` in i && { children: K(i.children, t + 1) }
|
|
9357
9525
|
});
|
|
9358
|
-
if (n === `translate` && o === `automatic` && t > 0) return `children` in i ?
|
|
9359
|
-
n === `translate` && o === `automatic` && console.warn(
|
|
9526
|
+
if (n === `translate` && o === `automatic` && t > 0) return `children` in i ? K(i.children, t) : void 0;
|
|
9527
|
+
n === `translate` && o === `automatic` && console.warn(Kt);
|
|
9360
9528
|
}
|
|
9361
|
-
return (0, react
|
|
9529
|
+
return (0, react.cloneElement)(e, {
|
|
9362
9530
|
...i,
|
|
9363
|
-
...`children` in i && { children:
|
|
9531
|
+
...`children` in i && { children: K(i.children, t) }
|
|
9364
9532
|
});
|
|
9365
9533
|
}
|
|
9366
|
-
function
|
|
9367
|
-
return (0, react
|
|
9534
|
+
function G(e, t) {
|
|
9535
|
+
return (0, react.isValidElement)(e) ? Jt(e, t) : e;
|
|
9368
9536
|
}
|
|
9369
|
-
function
|
|
9370
|
-
return Array.isArray(e) ? react
|
|
9537
|
+
function K(e, t) {
|
|
9538
|
+
return Array.isArray(e) ? react.Children.map(e, (e) => G(e, t)) : G(e, t);
|
|
9371
9539
|
}
|
|
9372
|
-
function
|
|
9540
|
+
function Yt(e) {
|
|
9373
9541
|
let t = typeof e == `function` && `_gtt` in e ? e._gtt : void 0;
|
|
9374
9542
|
if (t == null || typeof t != `string`) return;
|
|
9375
9543
|
let n = t.split(`-`);
|
|
@@ -9378,27 +9546,27 @@ function Vt(e) {
|
|
|
9378
9546
|
injectionType: n[1] === `automatic` || n[2] === `automatic` ? `automatic` : `manual`
|
|
9379
9547
|
};
|
|
9380
9548
|
}
|
|
9381
|
-
const
|
|
9549
|
+
const Xt = {
|
|
9382
9550
|
variable: `value`,
|
|
9383
9551
|
number: `n`,
|
|
9384
9552
|
datetime: `date`,
|
|
9385
9553
|
currency: `cost`,
|
|
9386
9554
|
"relative-time": `time`
|
|
9387
9555
|
};
|
|
9388
|
-
function
|
|
9389
|
-
return typeof e.name == `string` ? e.name : `_gt_${
|
|
9556
|
+
function Zt(e = {}, t) {
|
|
9557
|
+
return typeof e.name == `string` ? e.name : `_gt_${Xt[t] || `value`}_${e[`data-_gt`]?.id}`;
|
|
9390
9558
|
}
|
|
9391
|
-
function
|
|
9392
|
-
return react
|
|
9559
|
+
function Qt(e) {
|
|
9560
|
+
return react.default.isValidElement(e);
|
|
9393
9561
|
}
|
|
9394
|
-
const
|
|
9562
|
+
const $t = {
|
|
9395
9563
|
pl: `placeholder`,
|
|
9396
9564
|
ti: `title`,
|
|
9397
9565
|
alt: `alt`,
|
|
9398
9566
|
arl: `aria-label`,
|
|
9399
9567
|
arb: `aria-labelledby`,
|
|
9400
9568
|
ard: `aria-describedby`
|
|
9401
|
-
},
|
|
9569
|
+
}, en = (e) => {
|
|
9402
9570
|
if (!e) return ``;
|
|
9403
9571
|
let { type: t, props: n } = e;
|
|
9404
9572
|
if (t && typeof t == `function`) {
|
|
@@ -9406,15 +9574,15 @@ const Gt = {
|
|
|
9406
9574
|
if (`name` in t && typeof t.name == `string` && t.name) return t.name;
|
|
9407
9575
|
}
|
|
9408
9576
|
return t && typeof t == `string` ? t : n.href ? `a` : n[`data-_gt`]?.id ? `C${n[`data-_gt`].id}` : `function`;
|
|
9409
|
-
},
|
|
9410
|
-
let r = Object.entries(
|
|
9577
|
+
}, tn = (e, t, n) => {
|
|
9578
|
+
let r = Object.entries($t).reduce((e, [n, r]) => {
|
|
9411
9579
|
let i = t[r];
|
|
9412
9580
|
return typeof i == `string` && (e[n] = i), e;
|
|
9413
9581
|
}, {});
|
|
9414
9582
|
if (e === `plural` && n) {
|
|
9415
9583
|
let e = {};
|
|
9416
9584
|
Object.entries(n).forEach(([t, n]) => {
|
|
9417
|
-
e[t] =
|
|
9585
|
+
e[t] = q(n);
|
|
9418
9586
|
}), r = {
|
|
9419
9587
|
...r,
|
|
9420
9588
|
b: e,
|
|
@@ -9424,7 +9592,7 @@ const Gt = {
|
|
|
9424
9592
|
if (e === `branch` && n) {
|
|
9425
9593
|
let e = {};
|
|
9426
9594
|
Object.entries(n).forEach(([t, n]) => {
|
|
9427
|
-
e[t] =
|
|
9595
|
+
e[t] = q(n);
|
|
9428
9596
|
}), r = {
|
|
9429
9597
|
...r,
|
|
9430
9598
|
b: e,
|
|
@@ -9432,27 +9600,27 @@ const Gt = {
|
|
|
9432
9600
|
};
|
|
9433
9601
|
}
|
|
9434
9602
|
return Object.keys(r).length ? r : void 0;
|
|
9435
|
-
},
|
|
9436
|
-
let { props: t } = e, n = { t:
|
|
9603
|
+
}, nn = (e) => {
|
|
9604
|
+
let { props: t } = e, n = { t: en(e) };
|
|
9437
9605
|
if (t[`data-_gt`]) {
|
|
9438
9606
|
let e = t[`data-_gt`], r = e.transformation;
|
|
9439
9607
|
if (r === `variable`) {
|
|
9440
|
-
let n = e.variableType || `variable`, r =
|
|
9608
|
+
let n = e.variableType || `variable`, r = Zt(t, n), i = Ot(n);
|
|
9441
9609
|
return {
|
|
9442
9610
|
i: e.id,
|
|
9443
9611
|
k: r,
|
|
9444
9612
|
v: i
|
|
9445
9613
|
};
|
|
9446
9614
|
}
|
|
9447
|
-
n.i = e.id, n.d =
|
|
9448
|
-
let i = Object.entries(
|
|
9615
|
+
n.i = e.id, n.d = tn(r, t, e.branches);
|
|
9616
|
+
let i = Object.entries($t).reduce((e, [n, r]) => {
|
|
9449
9617
|
let i = t[r];
|
|
9450
9618
|
return typeof i == `string` && (e[n] = i), e;
|
|
9451
9619
|
}, {});
|
|
9452
9620
|
if (r === `plural` && e.branches) {
|
|
9453
9621
|
let t = {};
|
|
9454
9622
|
Object.entries(e.branches).forEach(([e, n]) => {
|
|
9455
|
-
t[e] =
|
|
9623
|
+
t[e] = q(n);
|
|
9456
9624
|
}), i = {
|
|
9457
9625
|
...i,
|
|
9458
9626
|
b: t,
|
|
@@ -9462,7 +9630,7 @@ const Gt = {
|
|
|
9462
9630
|
if (r === `branch` && e.branches) {
|
|
9463
9631
|
let t = {};
|
|
9464
9632
|
Object.entries(e.branches).forEach(([e, n]) => {
|
|
9465
|
-
t[e] =
|
|
9633
|
+
t[e] = q(n);
|
|
9466
9634
|
}), i = {
|
|
9467
9635
|
...i,
|
|
9468
9636
|
b: t,
|
|
@@ -9471,23 +9639,23 @@ const Gt = {
|
|
|
9471
9639
|
}
|
|
9472
9640
|
n.d = Object.keys(i).length ? i : void 0;
|
|
9473
9641
|
}
|
|
9474
|
-
return t.children && (n.c =
|
|
9475
|
-
},
|
|
9476
|
-
function
|
|
9477
|
-
return Array.isArray(e) ? e.map(
|
|
9642
|
+
return t.children && (n.c = q(t.children)), n;
|
|
9643
|
+
}, rn = (e) => Qt(e) ? nn(e) : typeof e == `number` ? e.toString() : e;
|
|
9644
|
+
function q(e) {
|
|
9645
|
+
return Array.isArray(e) ? e.map(rn) : rn(e);
|
|
9478
9646
|
}
|
|
9479
|
-
function
|
|
9647
|
+
function J(e, t, n) {
|
|
9480
9648
|
let r = ``, i = null;
|
|
9481
|
-
return typeof e == `number` && !i && n && (r =
|
|
9649
|
+
return typeof e == `number` && !i && n && (r = Et(e, Object.keys(n).filter(Tt), t)), r && !i && (i = n[r]), i;
|
|
9482
9650
|
}
|
|
9483
|
-
function
|
|
9651
|
+
function on(e) {
|
|
9484
9652
|
return typeof e == `object` && !!e && `data-_gt` in e && typeof e[`data-_gt`] == `object` && !!e[`data-_gt`] && `transformation` in e[`data-_gt`] && e[`data-_gt`]?.transformation === `variable`;
|
|
9485
9653
|
}
|
|
9486
|
-
function
|
|
9654
|
+
function sn(e) {
|
|
9487
9655
|
let t = e[`data-_gt`]?.variableType || `variable`;
|
|
9488
9656
|
return {
|
|
9489
|
-
variableName:
|
|
9490
|
-
variableType:
|
|
9657
|
+
variableName: Zt(e, t),
|
|
9658
|
+
variableType: Ot(t),
|
|
9491
9659
|
injectionType: e[`data-_gt`]?.injectionType || `manual`,
|
|
9492
9660
|
variableValue: (() => {
|
|
9493
9661
|
if (e.value !== void 0) return e.value;
|
|
@@ -9506,14 +9674,14 @@ function en(e) {
|
|
|
9506
9674
|
})()
|
|
9507
9675
|
};
|
|
9508
9676
|
}
|
|
9509
|
-
function
|
|
9677
|
+
function ln(e) {
|
|
9510
9678
|
return e && e.props && e.props[`data-_gt`] ? e.props[`data-_gt`] : null;
|
|
9511
9679
|
}
|
|
9512
9680
|
function Z({ children: e, defaultLocale: n = `en`, renderVariable: r }) {
|
|
9513
9681
|
let i = (e) => {
|
|
9514
|
-
let i =
|
|
9515
|
-
if (
|
|
9516
|
-
let { variableType: t, variableValue: i, variableOptions: a, injectionType: o } =
|
|
9682
|
+
let i = ln(e);
|
|
9683
|
+
if (on(e.props)) {
|
|
9684
|
+
let { variableType: t, variableValue: i, variableOptions: a, injectionType: o } = sn(e.props);
|
|
9517
9685
|
return r({
|
|
9518
9686
|
variableType: t,
|
|
9519
9687
|
variableValue: i,
|
|
@@ -9525,30 +9693,30 @@ function Z({ children: e, defaultLocale: n = `en`, renderVariable: r }) {
|
|
|
9525
9693
|
if (i?.transformation === `plural`) {
|
|
9526
9694
|
let t = i.branches || {};
|
|
9527
9695
|
if (typeof e.props.n != `number`) return e.props.children == null ? null : o(e.props.children);
|
|
9528
|
-
let r =
|
|
9696
|
+
let r = J(e.props.n, [n], t);
|
|
9529
9697
|
return o(r === null ? e.props.children : r);
|
|
9530
9698
|
}
|
|
9531
9699
|
if (i?.transformation === `branch`) {
|
|
9532
9700
|
let { children: t, branch: n } = e.props, r = i.branches || {}, a = n == null || n === `` ? void 0 : n.toString();
|
|
9533
9701
|
return o(a && r[a] !== void 0 ? r[a] : t);
|
|
9534
9702
|
}
|
|
9535
|
-
return i?.transformation === `fragment` ? react
|
|
9703
|
+
return i?.transformation === `fragment` ? react.default.createElement(react.default.Fragment, {
|
|
9536
9704
|
key: e.props.key,
|
|
9537
9705
|
children: o(e.props.children)
|
|
9538
|
-
}) : e.props.children ? react
|
|
9706
|
+
}) : e.props.children ? react.default.cloneElement(e, {
|
|
9539
9707
|
...e.props,
|
|
9540
9708
|
"data-_gt": void 0,
|
|
9541
9709
|
children: o(e.props.children)
|
|
9542
|
-
}) : react
|
|
9710
|
+
}) : react.default.cloneElement(e, {
|
|
9543
9711
|
...e.props,
|
|
9544
9712
|
"data-_gt": void 0
|
|
9545
9713
|
});
|
|
9546
|
-
}, a = (e) => react
|
|
9714
|
+
}, a = (e) => react.default.isValidElement(e) ? i(e) : e, o = (e) => Array.isArray(e) ? react.default.Children.map(e, a) : a(e);
|
|
9547
9715
|
return o(e);
|
|
9548
9716
|
}
|
|
9549
|
-
function
|
|
9717
|
+
function un({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVariable: i }) {
|
|
9550
9718
|
let { props: a } = e, o = a[`data-_gt`], s = o?.transformation, c = n.d, l = {};
|
|
9551
|
-
if (c && Object.entries(
|
|
9719
|
+
if (c && Object.entries($t).forEach(([e, t]) => {
|
|
9552
9720
|
c[e] && (l[t] = c[e]);
|
|
9553
9721
|
}), s === `plural`) {
|
|
9554
9722
|
let t = e.props.n;
|
|
@@ -9557,7 +9725,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
|
|
|
9557
9725
|
defaultLocale: r[0],
|
|
9558
9726
|
renderVariable: i
|
|
9559
9727
|
});
|
|
9560
|
-
let a =
|
|
9728
|
+
let a = J(t, r, o.branches || {}), s = a === null ? e.props.children : a, c = J(t, r, n.d?.b || {});
|
|
9561
9729
|
return Q({
|
|
9562
9730
|
source: s,
|
|
9563
9731
|
target: c === null ? n.c : c,
|
|
@@ -9574,7 +9742,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
|
|
|
9574
9742
|
renderVariable: i
|
|
9575
9743
|
});
|
|
9576
9744
|
}
|
|
9577
|
-
return s === `fragment` && n.c ? react
|
|
9745
|
+
return s === `fragment` && n.c ? react.default.createElement(react.default.Fragment, {
|
|
9578
9746
|
key: e.props.key,
|
|
9579
9747
|
children: Q({
|
|
9580
9748
|
source: a.children,
|
|
@@ -9582,7 +9750,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
|
|
|
9582
9750
|
locales: r,
|
|
9583
9751
|
renderVariable: i
|
|
9584
9752
|
})
|
|
9585
|
-
}) : a?.children && n?.c ? react
|
|
9753
|
+
}) : a?.children && n?.c ? react.default.cloneElement(e, {
|
|
9586
9754
|
...a,
|
|
9587
9755
|
...l,
|
|
9588
9756
|
"data-_gt": void 0,
|
|
@@ -9607,18 +9775,18 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
|
|
|
9607
9775
|
if (typeof n == `string`) return n;
|
|
9608
9776
|
if (Array.isArray(n) && !Array.isArray(e) && e && (e = [e]), Array.isArray(e) && Array.isArray(n)) {
|
|
9609
9777
|
let a = {}, o = {}, c = {}, l = e.filter((e) => {
|
|
9610
|
-
if (react
|
|
9611
|
-
let { variableName: t, variableValue: n, variableOptions: r, injectionType: i } =
|
|
9778
|
+
if (react.default.isValidElement(e)) if (on(e.props)) {
|
|
9779
|
+
let { variableName: t, variableValue: n, variableOptions: r, injectionType: i } = sn(e.props);
|
|
9612
9780
|
a[t] = n, o[t] = r, c[t] = i;
|
|
9613
9781
|
} else return !0;
|
|
9614
9782
|
return !1;
|
|
9615
9783
|
}), u = (e) => l.find((t) => {
|
|
9616
|
-
let n =
|
|
9784
|
+
let n = ln(t);
|
|
9617
9785
|
return n?.id === void 0 ? !1 : n.id === e.i;
|
|
9618
9786
|
}) || l.shift();
|
|
9619
9787
|
return n.map((e, n) => {
|
|
9620
|
-
if (typeof e == `string`) return (0, react_jsx_runtime.jsx)(react
|
|
9621
|
-
if (
|
|
9788
|
+
if (typeof e == `string`) return (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: e }, `string_${n}`);
|
|
9789
|
+
if (E(e)) return (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: i({
|
|
9622
9790
|
variableType: e.v || `v`,
|
|
9623
9791
|
variableValue: a[e.k],
|
|
9624
9792
|
variableOptions: o[e.k],
|
|
@@ -9626,7 +9794,7 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
|
|
|
9626
9794
|
injectionType: c[e.k] || `manual`
|
|
9627
9795
|
}) }, `var_${n}`);
|
|
9628
9796
|
let l = u(e);
|
|
9629
|
-
return l ? (0, react_jsx_runtime.jsx)(react
|
|
9797
|
+
return l ? (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: un({
|
|
9630
9798
|
sourceElement: l,
|
|
9631
9799
|
targetElement: e,
|
|
9632
9800
|
locales: r,
|
|
@@ -9635,16 +9803,16 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
|
|
|
9635
9803
|
});
|
|
9636
9804
|
}
|
|
9637
9805
|
if (n && typeof n == `object` && !Array.isArray(n)) {
|
|
9638
|
-
let a =
|
|
9639
|
-
if (react
|
|
9640
|
-
if (a === `element`) return
|
|
9806
|
+
let a = E(n) ? `variable` : `element`;
|
|
9807
|
+
if (react.default.isValidElement(e)) {
|
|
9808
|
+
if (a === `element`) return un({
|
|
9641
9809
|
sourceElement: e,
|
|
9642
9810
|
targetElement: n,
|
|
9643
9811
|
locales: r,
|
|
9644
9812
|
renderVariable: i
|
|
9645
9813
|
});
|
|
9646
|
-
if (
|
|
9647
|
-
let { variableValue: t, variableOptions: n, variableType: a, injectionType: o } =
|
|
9814
|
+
if (on(e.props)) {
|
|
9815
|
+
let { variableValue: t, variableOptions: n, variableType: a, injectionType: o } = sn(e.props);
|
|
9648
9816
|
return i({
|
|
9649
9817
|
variableType: a,
|
|
9650
9818
|
variableValue: t,
|
|
@@ -9661,33 +9829,32 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
|
|
|
9661
9829
|
renderVariable: i
|
|
9662
9830
|
});
|
|
9663
9831
|
}
|
|
9664
|
-
const
|
|
9665
|
-
react
|
|
9666
|
-
function
|
|
9832
|
+
const pn = `generaltranslation.locale`;
|
|
9833
|
+
react.use;
|
|
9834
|
+
function Jn({ children: e }) {
|
|
9667
9835
|
return e;
|
|
9668
9836
|
}
|
|
9669
|
-
function
|
|
9670
|
-
return
|
|
9837
|
+
function Yn(e) {
|
|
9838
|
+
return Jn(e);
|
|
9671
9839
|
}
|
|
9672
|
-
|
|
9840
|
+
Jn._gtt = `derive`, Yn._gtt = `derive`;
|
|
9673
9841
|
//#endregion
|
|
9674
|
-
//#region src/
|
|
9842
|
+
//#region src/shared/cookies.ts
|
|
9675
9843
|
/**
|
|
9676
|
-
* Minimally parses a cookie value for a given cookie name
|
|
9844
|
+
* Minimally parses a cookie value for a given cookie name.
|
|
9677
9845
|
* @param cookieName - The name of the cookie
|
|
9678
|
-
* @returns The
|
|
9846
|
+
* @returns The cookie value, or undefined when it is not found
|
|
9679
9847
|
*/
|
|
9680
|
-
function getCookieValue(
|
|
9848
|
+
function getCookieValue(cookieName) {
|
|
9681
9849
|
if (typeof document === "undefined") return void 0;
|
|
9682
9850
|
return document.cookie.split("; ").find((row) => row.startsWith(`${cookieName}=`))?.split("=")[1];
|
|
9683
9851
|
}
|
|
9684
9852
|
/**
|
|
9685
|
-
* Sets a cookie value for a given cookie name
|
|
9853
|
+
* Sets a cookie value for a given cookie name.
|
|
9686
9854
|
* @param cookieName - The name of the cookie
|
|
9687
9855
|
* @param value - The value to set
|
|
9688
|
-
* @returns The value that was set
|
|
9689
9856
|
*/
|
|
9690
|
-
function setCookieValue(
|
|
9857
|
+
function setCookieValue(cookieName, value) {
|
|
9691
9858
|
if (typeof document === "undefined") return;
|
|
9692
9859
|
document.cookie = `${cookieName}=${value};path=/`;
|
|
9693
9860
|
}
|
|
@@ -9701,7 +9868,7 @@ function setCookieValue({ cookieName, value }) {
|
|
|
9701
9868
|
* @returns The determined locale
|
|
9702
9869
|
*
|
|
9703
9870
|
*/
|
|
9704
|
-
function determineLocale({ defaultLocale, locales, customMapping, localeCookieName =
|
|
9871
|
+
function determineLocale({ defaultLocale, locales, customMapping, localeCookieName = pn, getLocale }) {
|
|
9705
9872
|
const localeConfig = {
|
|
9706
9873
|
defaultLocale,
|
|
9707
9874
|
locales,
|
|
@@ -9721,7 +9888,7 @@ function determineLocale({ defaultLocale, locales, customMapping, localeCookieNa
|
|
|
9721
9888
|
return determinedLocale;
|
|
9722
9889
|
}
|
|
9723
9890
|
const candidates = [];
|
|
9724
|
-
const cookieLocale = getCookieValue(
|
|
9891
|
+
const cookieLocale = getCookieValue(localeCookieName);
|
|
9725
9892
|
if (cookieLocale) candidates.push(cookieLocale);
|
|
9726
9893
|
const navigatorLocales = navigator?.languages || [];
|
|
9727
9894
|
candidates.push(...navigatorLocales);
|
|
@@ -9736,7 +9903,7 @@ var BrowserConditionStore = class {
|
|
|
9736
9903
|
/**
|
|
9737
9904
|
* @param {BrowserConditionStoreConstructorParams} params - The configuration for the BrowserConditionStore
|
|
9738
9905
|
*/
|
|
9739
|
-
constructor({ getLocale, localeCookieName =
|
|
9906
|
+
constructor({ getLocale, localeCookieName = pn, ...localeConfig } = {}) {
|
|
9740
9907
|
this.localeConfig = localeConfig;
|
|
9741
9908
|
this.customGetLocale = getLocale;
|
|
9742
9909
|
this.localeCookieName = localeCookieName;
|
|
@@ -9752,10 +9919,7 @@ var BrowserConditionStore = class {
|
|
|
9752
9919
|
});
|
|
9753
9920
|
}
|
|
9754
9921
|
setLocale(locale) {
|
|
9755
|
-
setCookieValue(
|
|
9756
|
-
cookieName: this.localeCookieName,
|
|
9757
|
-
value: locale
|
|
9758
|
-
});
|
|
9922
|
+
setCookieValue(this.localeCookieName, locale);
|
|
9759
9923
|
}
|
|
9760
9924
|
};
|
|
9761
9925
|
//#endregion
|
|
@@ -10169,7 +10333,7 @@ async function bootstrap(params) {
|
|
|
10169
10333
|
*/
|
|
10170
10334
|
function Branch({ children, branch, ...branches }) {
|
|
10171
10335
|
const branchKey = branch?.toString();
|
|
10172
|
-
if (
|
|
10336
|
+
if (branchKey?.startsWith("data-")) return children;
|
|
10173
10337
|
return branchKey && typeof branches[branchKey] !== "undefined" ? branches[branchKey] : children;
|
|
10174
10338
|
}
|
|
10175
10339
|
/**
|
|
@@ -10196,7 +10360,7 @@ function Plural({ children, n, locales: localesProp, ...branches }) {
|
|
|
10196
10360
|
getDefaultLocale()
|
|
10197
10361
|
];
|
|
10198
10362
|
if (typeof n !== "number") return children;
|
|
10199
|
-
const branch =
|
|
10363
|
+
const branch = J(n, locales, branches);
|
|
10200
10364
|
return branch != null ? branch : children;
|
|
10201
10365
|
}
|
|
10202
10366
|
/**
|
|
@@ -10229,8 +10393,8 @@ function Derive({ children }) {
|
|
|
10229
10393
|
/**
|
|
10230
10394
|
* Equivalent to the `<Derive>` component, but used for auto insertion.
|
|
10231
10395
|
*/
|
|
10232
|
-
function GtInternalDerive(
|
|
10233
|
-
return
|
|
10396
|
+
function GtInternalDerive(props) {
|
|
10397
|
+
return Derive(props);
|
|
10234
10398
|
}
|
|
10235
10399
|
/** @internal _gtt - The GT transformation and injection identifier for the component. */
|
|
10236
10400
|
Derive._gtt = "derive";
|
|
@@ -10280,7 +10444,7 @@ const t = (messageOrStrings, ...values) => {
|
|
|
10280
10444
|
*/
|
|
10281
10445
|
function handleTaggedTemplateLiteralTranslation(messageOrStrings, values) {
|
|
10282
10446
|
const locale = getLocale();
|
|
10283
|
-
const translatedInterpolatedTemplate = resolveTranslationSync(locale,
|
|
10447
|
+
const translatedInterpolatedTemplate = resolveTranslationSync(locale, messageOrStrings.map((string, index) => string + (values[index] ?? "")).join(""));
|
|
10284
10448
|
if (translatedInterpolatedTemplate) return translatedInterpolatedTemplate;
|
|
10285
10449
|
const { message, variables } = extractInterpolatableValues(messageOrStrings, values);
|
|
10286
10450
|
return resolveTranslationSyncWithFallback(locale, message, variables);
|
|
@@ -10309,17 +10473,6 @@ function extractInterpolatableValues(strings, values) {
|
|
|
10309
10473
|
variables
|
|
10310
10474
|
};
|
|
10311
10475
|
}
|
|
10312
|
-
/**
|
|
10313
|
-
* Interpolate a template literal
|
|
10314
|
-
* @param message - The message to interpolate.
|
|
10315
|
-
* @param variables - The variables to interpolate.
|
|
10316
|
-
* @returns The interpolated message.
|
|
10317
|
-
*/
|
|
10318
|
-
function interpolateTemplateLiteral(strings, values) {
|
|
10319
|
-
return strings.map((string, index) => {
|
|
10320
|
-
return string + (values[index] ?? "");
|
|
10321
|
-
}).join("");
|
|
10322
|
-
}
|
|
10323
10476
|
//#endregion
|
|
10324
10477
|
//#region src/i18n-context/functions/translation/GtInternalRuntimeTranslateString.ts
|
|
10325
10478
|
/**
|
|
@@ -10370,27 +10523,18 @@ function Num(props) {
|
|
|
10370
10523
|
GtInternalNum._gtt = "variable-number-automatic";
|
|
10371
10524
|
Num._gtt = "variable-number";
|
|
10372
10525
|
//#endregion
|
|
10373
|
-
//#region src/i18n-context/functions/variables/utils/computeVar.ts
|
|
10374
|
-
/**
|
|
10375
|
-
* Internal implementation of Var component for standardization
|
|
10376
|
-
* @internal
|
|
10377
|
-
*/
|
|
10378
|
-
function computeVar({ children }) {
|
|
10379
|
-
return children;
|
|
10380
|
-
}
|
|
10381
|
-
//#endregion
|
|
10382
10526
|
//#region src/i18n-context/functions/variables/GtInternalVar.tsx
|
|
10383
10527
|
/**
|
|
10384
10528
|
* Equivalent to the `<Var>` component, but used for auto insertion
|
|
10385
10529
|
*/
|
|
10386
10530
|
function GtInternalVar({ children }) {
|
|
10387
|
-
return
|
|
10531
|
+
return children;
|
|
10388
10532
|
}
|
|
10389
10533
|
/**
|
|
10390
10534
|
* User facing version of the Var component
|
|
10391
10535
|
*/
|
|
10392
10536
|
function Var({ children }) {
|
|
10393
|
-
return
|
|
10537
|
+
return children;
|
|
10394
10538
|
}
|
|
10395
10539
|
/** @internal _gtt - The GT transformation and injection identifier for the component. */
|
|
10396
10540
|
Var._gtt = "variable-variable";
|
|
@@ -10450,6 +10594,7 @@ GtInternalDateTime._gtt = "variable-datetime-automatic";
|
|
|
10450
10594
|
DateTime._gtt = "variable-datetime";
|
|
10451
10595
|
//#endregion
|
|
10452
10596
|
//#region src/i18n-context/functions/variables/utils/renderVariable.tsx
|
|
10597
|
+
const getStringOrNumberValue = (value) => typeof value === "string" || typeof value === "number" || value == null ? value : void 0;
|
|
10453
10598
|
/**
|
|
10454
10599
|
* Custom override for the renderVariable function
|
|
10455
10600
|
* to use the GtInternal components instead of the regular components
|
|
@@ -10466,7 +10611,7 @@ const renderVariable = ({ variableType, variableValue, variableOptions, injectio
|
|
|
10466
10611
|
switch (variableType) {
|
|
10467
10612
|
case "n": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(injectionType === "automatic" ? Num : GtInternalNum, {
|
|
10468
10613
|
options: variableOptions,
|
|
10469
|
-
children:
|
|
10614
|
+
children: getStringOrNumberValue(variableValue)
|
|
10470
10615
|
});
|
|
10471
10616
|
case "d": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(injectionType === "automatic" ? DateTime : GtInternalDateTime, {
|
|
10472
10617
|
options: variableOptions,
|
|
@@ -10474,11 +10619,11 @@ const renderVariable = ({ variableType, variableValue, variableOptions, injectio
|
|
|
10474
10619
|
});
|
|
10475
10620
|
case "c": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(injectionType === "automatic" ? Currency : GtInternalCurrency, {
|
|
10476
10621
|
options: variableOptions,
|
|
10477
|
-
children:
|
|
10622
|
+
children: getStringOrNumberValue(variableValue)
|
|
10478
10623
|
});
|
|
10479
10624
|
default: {
|
|
10480
10625
|
const renderedValue = variableValue;
|
|
10481
|
-
return injectionType === "automatic" ?
|
|
10626
|
+
return injectionType === "automatic" ? renderedValue : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Var, { children: renderedValue });
|
|
10482
10627
|
}
|
|
10483
10628
|
}
|
|
10484
10629
|
};
|
|
@@ -10503,10 +10648,29 @@ GtInternalTranslateJsx._gtt = "translate-client-automatic";
|
|
|
10503
10648
|
* Implementation for the T component logic
|
|
10504
10649
|
*/
|
|
10505
10650
|
function useComputeT({ children: sourceChildren, ...params }) {
|
|
10506
|
-
const
|
|
10507
|
-
|
|
10508
|
-
|
|
10651
|
+
const taggedSourceChildren = (0, react.useMemo)(() => Vt(qt(sourceChildren)), [sourceChildren]);
|
|
10652
|
+
const sourceJsxChildren = (0, react.useMemo)(() => q(taggedSourceChildren), [taggedSourceChildren]);
|
|
10653
|
+
const renderSourceChildren = () => Z({
|
|
10654
|
+
children: taggedSourceChildren,
|
|
10655
|
+
defaultLocale: getLocale(),
|
|
10656
|
+
renderVariable
|
|
10509
10657
|
});
|
|
10658
|
+
const options = (0, react.useMemo)(() => ({
|
|
10659
|
+
$format: "JSX",
|
|
10660
|
+
$context: params.context,
|
|
10661
|
+
$id: params.id,
|
|
10662
|
+
$_hash: params._hash,
|
|
10663
|
+
...params
|
|
10664
|
+
}), [
|
|
10665
|
+
params.format,
|
|
10666
|
+
params.context,
|
|
10667
|
+
params.id,
|
|
10668
|
+
params._hash,
|
|
10669
|
+
params.$format,
|
|
10670
|
+
params.$context,
|
|
10671
|
+
params.$id,
|
|
10672
|
+
params.$_hash
|
|
10673
|
+
]);
|
|
10510
10674
|
const targetLocale = getLocale();
|
|
10511
10675
|
if (!(0, _generaltranslation_format.requiresTranslation)(getDefaultLocale(), targetLocale)) return renderSourceChildren();
|
|
10512
10676
|
const targetOptions = {
|
|
@@ -10532,44 +10696,6 @@ function useComputeT({ children: sourceChildren, ...params }) {
|
|
|
10532
10696
|
return renderSourceChildren();
|
|
10533
10697
|
}
|
|
10534
10698
|
/**
|
|
10535
|
-
* Returns the tagged source children and the default render function for the source children
|
|
10536
|
-
*/
|
|
10537
|
-
function usePrepSourceRender({ sourceChildren, params }) {
|
|
10538
|
-
const taggedSourceChildren = (0, react.useMemo)(() => Nt(Rt(sourceChildren)), [sourceChildren]);
|
|
10539
|
-
return {
|
|
10540
|
-
taggedSourceChildren,
|
|
10541
|
-
sourceJsxChildren: (0, react.useMemo)(() => Y(taggedSourceChildren), [taggedSourceChildren]),
|
|
10542
|
-
renderSourceChildren: (0, react.useCallback)(() => {
|
|
10543
|
-
return Z({
|
|
10544
|
-
children: taggedSourceChildren,
|
|
10545
|
-
defaultLocale: getLocale(),
|
|
10546
|
-
renderVariable
|
|
10547
|
-
});
|
|
10548
|
-
}, [taggedSourceChildren]),
|
|
10549
|
-
options: (0, react.useMemo)(() => normalizeParameters(params), [
|
|
10550
|
-
params.context,
|
|
10551
|
-
params.id,
|
|
10552
|
-
params._hash,
|
|
10553
|
-
params.$format,
|
|
10554
|
-
params.$context,
|
|
10555
|
-
params.$id,
|
|
10556
|
-
params.$_hash
|
|
10557
|
-
])
|
|
10558
|
-
};
|
|
10559
|
-
}
|
|
10560
|
-
/**
|
|
10561
|
-
* Normalizes the parameters into a lookup options object.
|
|
10562
|
-
*/
|
|
10563
|
-
function normalizeParameters(parameters) {
|
|
10564
|
-
return {
|
|
10565
|
-
$format: "JSX",
|
|
10566
|
-
$context: parameters.context,
|
|
10567
|
-
$id: parameters.id,
|
|
10568
|
-
$_hash: parameters._hash,
|
|
10569
|
-
...parameters
|
|
10570
|
-
};
|
|
10571
|
-
}
|
|
10572
|
-
/**
|
|
10573
10699
|
* Dev-only translation resolver that uses React Suspense.
|
|
10574
10700
|
* Sync cache check already happened in computeT() — this only handles cache misses.
|
|
10575
10701
|
* use() suspends until the async translation resolves.
|
|
@@ -10694,13 +10820,12 @@ function _convertCustomNamesToMapping(customNames) {
|
|
|
10694
10820
|
*/
|
|
10695
10821
|
function InternalLocaleSelector({ locale, locales, customNames, customMapping = _convertCustomNamesToMapping(customNames), setLocale, getLocaleProperties, ...props }) {
|
|
10696
10822
|
const getDisplayName = (locale) => {
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
}
|
|
10823
|
+
const customLocale = customMapping?.[locale];
|
|
10824
|
+
if (typeof customLocale === "string") return customLocale;
|
|
10825
|
+
if (customLocale?.name) return customLocale.name;
|
|
10701
10826
|
return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);
|
|
10702
10827
|
};
|
|
10703
|
-
if (!locales
|
|
10828
|
+
if (!locales?.length || !setLocale) return null;
|
|
10704
10829
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
10705
10830
|
...props,
|
|
10706
10831
|
value: locale || "",
|