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/dist/browser.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LocaleConfig, formatCutoff, formatMessage, isValidLocale, requiresTranslation, resolveCanonicalLocale, standardizeLocale } from "@generaltranslation/format";
2
2
  import { GT } from "generaltranslation";
3
3
  import * as e from "react";
4
- import React, { Children, Suspense, cloneElement, isValidElement, use, useCallback, useMemo } from "react";
4
+ import t$1, { Children, Suspense, cloneElement, isValidElement, use, useMemo } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region \0rolldown/runtime.js
7
7
  var __defProp = Object.defineProperty;
@@ -31,26 +31,46 @@ var __copyProps = (to, from, except, desc) => {
31
31
  };
32
32
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
33
  //#endregion
34
- //#region src/shared/messages.ts
35
- const PACKAGE_NAME = "gt-react";
36
- const BROWSER_ENVIRONMENT_ERROR = `${PACKAGE_NAME}/browser Error: The ${PACKAGE_NAME}/browser module requires a browser environment`;
37
- const GENERIC_BROWSER_ENVIRONMENT_ERROR = `${PACKAGE_NAME} Error: You are trying to import a browser-only module into a non-browser environment.`;
38
- const BROWSER_I18N_MANAGER_NOT_INITIALIZED_ERROR = `${PACKAGE_NAME} Error: BrowserI18nManager not initialized. Invoke initializeGT() to initialize.`;
39
- const createTranslationFailedDueToBrowserEnvironmentWarning = (message) => `${PACKAGE_NAME} Warning: Translation failed for t("${typeof message === "string" ? message : "`" + message?.join("${}") + "`"}") because it was used outside of a browser environment. Falling back to original message.`;
40
- const createNoLocaleCouldBeDeterminedFromCustomGetLocaleWarning = ({ customLocale, defaultLocale }) => `${PACKAGE_NAME} Warning: Custom getLocale() function returned an unsupported locale: "${customLocale}". Falling back to default locale: "${defaultLocale}".`;
41
- const createInvalidLocaleWarning = (locale) => `${PACKAGE_NAME} Warning: Invalid locale: "${locale}".`;
42
- //#endregion
43
- //#region src/i18n-context/utils/enforceBrowser.ts
44
- /**
45
- * @internal
46
- *
47
- * Throws an error when imported outside of a browser environment.
48
- */
49
- function enforceBrowser(errorMessage = GENERIC_BROWSER_ENVIRONMENT_ERROR) {
50
- if (typeof window === "undefined") throw new Error(errorMessage);
34
+ //#region ../core/dist/base64-r7YWJYWt.mjs
35
+ function ensureSentence(text) {
36
+ const trimmed = text.trim();
37
+ if (!trimmed) return "";
38
+ return /[.!?)]$/.test(trimmed) ? trimmed : `${trimmed}.`;
39
+ }
40
+ function stripSentence(text) {
41
+ const trimmed = text.trim();
42
+ let end = trimmed.length;
43
+ while (end > 0) {
44
+ const char = trimmed[end - 1];
45
+ if (char !== "." && char !== "!" && char !== "?") break;
46
+ end -= 1;
47
+ }
48
+ return trimmed.slice(0, end);
49
+ }
50
+ function lowercaseFirstWord(text) {
51
+ return text.replace(/^[A-Z][a-z]/, (match) => match.toLowerCase());
52
+ }
53
+ function formatDetails(details) {
54
+ if (!details) return "";
55
+ const detailText = Array.isArray(details) ? details.join(", ") : details;
56
+ if (!detailText.trim()) return "";
57
+ return ensureSentence(`Details: ${detailText}`);
58
+ }
59
+ function createDiagnosticMessage({ source, severity, whatHappened, reassurance, why, fix, wayOut, details, docsUrl }) {
60
+ const prefix = source ? severity ? `${source} ${severity}:` : `${source}:` : severity ? `${severity}:` : "";
61
+ const whatAndWhy = why ? `${stripSentence(whatHappened)} because ${lowercaseFirstWord(stripSentence(why))}` : whatHappened;
62
+ const shouldCombineWayOut = !!fix && !!wayOut && /^[a-z]/.test(stripSentence(wayOut));
63
+ const messageParts = [
64
+ whatAndWhy,
65
+ reassurance,
66
+ shouldCombineWayOut ? `${stripSentence(fix)}, or ${lowercaseFirstWord(stripSentence(wayOut))}` : fix,
67
+ shouldCombineWayOut ? void 0 : wayOut,
68
+ formatDetails(details)
69
+ ].filter((part) => !!part).map(ensureSentence);
70
+ if (docsUrl) messageParts.push(`Learn more: ${docsUrl}`);
71
+ const message = messageParts.join(" ");
72
+ return prefix ? `${prefix} ${message}` : message;
51
73
  }
52
- //#endregion
53
- //#region ../core/dist/base64-CWITCfhU.mjs
54
74
  const defaultCacheUrl = "https://cdn.gtx.dev";
55
75
  //#endregion
56
76
  //#region ../core/dist/isVariable-fAKEB7gF.mjs
@@ -4191,6 +4211,56 @@ function condenseVars(icuString) {
4191
4211
  }));
4192
4212
  }
4193
4213
  //#endregion
4214
+ //#region src/shared/messages.ts
4215
+ const PACKAGE_NAME = "gt-react";
4216
+ const BROWSER_ENVIRONMENT_ERROR = createDiagnosticMessage({
4217
+ source: `${PACKAGE_NAME}/browser`,
4218
+ severity: "Error",
4219
+ whatHappened: "This module requires a browser environment",
4220
+ fix: "Import it only from client-side code"
4221
+ });
4222
+ const GENERIC_BROWSER_ENVIRONMENT_ERROR = createDiagnosticMessage({
4223
+ source: PACKAGE_NAME,
4224
+ severity: "Error",
4225
+ whatHappened: "A browser-only module was imported outside the browser",
4226
+ fix: "Move this import to client-side code"
4227
+ });
4228
+ const BROWSER_I18N_MANAGER_NOT_INITIALIZED_ERROR = createDiagnosticMessage({
4229
+ source: PACKAGE_NAME,
4230
+ severity: "Error",
4231
+ whatHappened: "BrowserI18nManager is not initialized",
4232
+ fix: "Call initializeGT() before using browser translation APIs"
4233
+ });
4234
+ const createTranslationFailedDueToBrowserEnvironmentWarning = (message) => createDiagnosticMessage({
4235
+ source: PACKAGE_NAME,
4236
+ severity: "Warning",
4237
+ whatHappened: `t("${typeof message === "string" ? message : "`" + message?.join("${}") + "`"}") could not be translated because it ran outside the browser`,
4238
+ wayOut: "The original message will render as a fallback"
4239
+ });
4240
+ const createNoLocaleCouldBeDeterminedFromCustomGetLocaleWarning = ({ customLocale, defaultLocale }) => createDiagnosticMessage({
4241
+ source: PACKAGE_NAME,
4242
+ severity: "Warning",
4243
+ whatHappened: `Custom getLocale() returned unsupported locale "${customLocale}"`,
4244
+ wayOut: `Falling back to default locale "${defaultLocale}"`,
4245
+ fix: "Add the locale to your config if you want to support it"
4246
+ });
4247
+ const createInvalidLocaleWarning = (locale) => createDiagnosticMessage({
4248
+ source: PACKAGE_NAME,
4249
+ severity: "Warning",
4250
+ whatHappened: `Locale "${locale}" is not valid`,
4251
+ fix: "Use a valid BCP 47 locale code or add a custom mapping"
4252
+ });
4253
+ //#endregion
4254
+ //#region src/i18n-context/utils/enforceBrowser.ts
4255
+ /**
4256
+ * @internal
4257
+ *
4258
+ * Throws an error when imported outside of a browser environment.
4259
+ */
4260
+ function enforceBrowser(errorMessage = GENERIC_BROWSER_ENVIRONMENT_ERROR) {
4261
+ if (typeof window === "undefined") throw new Error(errorMessage);
4262
+ }
4263
+ //#endregion
4194
4264
  //#region ../i18n/dist/isEncodedTranslationOptions-BOwWa_-J.mjs
4195
4265
  var logger_default = {
4196
4266
  warn(message) {
@@ -4325,7 +4395,7 @@ function sanitizeJsxChildren(childrenAsObjects) {
4325
4395
  return Array.isArray(childrenAsObjects) ? childrenAsObjects.map(sanitizeChild) : sanitizeChild(childrenAsObjects);
4326
4396
  }
4327
4397
  //#endregion
4328
- //#region ../i18n/dist/versionId-B2xfz6jP.mjs
4398
+ //#region ../i18n/dist/versionId-BkJZGHXr.mjs
4329
4399
  /**
4330
4400
  * Throw errors if there are any errors and log warnings if there are any warnings
4331
4401
  * @param {ValidationResult[]} results - The results to print
@@ -4371,9 +4441,9 @@ function getLoadTranslationsType(config) {
4371
4441
  * Requirements:
4372
4442
  * - REMOTE:
4373
4443
  * - GT_REMOTE:
4374
- * - projectId is required
4444
+ * - projectId is needed
4375
4445
  * - CUSTOM:
4376
- * - loadTranslations is required
4446
+ * - loadTranslations is needed
4377
4447
  * - DISABLED:
4378
4448
  * - no requirements
4379
4449
  */
@@ -4385,13 +4455,19 @@ function validateLoadTranslations(params) {
4385
4455
  case "gt-remote":
4386
4456
  if (!projectId) results.push({
4387
4457
  type: "warning",
4388
- message: "projectId is required when loading translations from a remote store"
4458
+ message: createDiagnosticMessage({
4459
+ whatHappened: "Loading translations from a remote store needs a projectId",
4460
+ fix: "Add projectId to the I18nManager config or disable remote translation loading"
4461
+ })
4389
4462
  });
4390
4463
  break;
4391
4464
  case "custom":
4392
4465
  if (!loadTranslations) results.push({
4393
4466
  type: "error",
4394
- message: "loadTranslations is required when loading translations from a custom loader"
4467
+ message: createDiagnosticMessage({
4468
+ whatHappened: "Custom translation loading needs loadTranslations",
4469
+ fix: "Provide a loadTranslations function or disable custom translation loading"
4470
+ })
4395
4471
  });
4396
4472
  break;
4397
4473
  case "disabled": break;
@@ -4404,8 +4480,9 @@ function validateLoadTranslations(params) {
4404
4480
  * @returns The runtime translation type
4405
4481
  */
4406
4482
  function getTranslationApiType(params) {
4407
- if ((params.runtimeUrl === void 0 || params.runtimeUrl === "https://runtime2.gtx.dev") && params.projectId && (params.devApiKey || params.apiKey)) return "gt";
4408
- else if (params.runtimeUrl) return "custom";
4483
+ const usesDefaultRuntimeUrl = params.runtimeUrl === void 0 || params.runtimeUrl === "https://runtime2.gtx.dev";
4484
+ if (usesDefaultRuntimeUrl && params.projectId && (params.devApiKey || params.apiKey)) return "gt";
4485
+ else if (params.runtimeUrl && !usesDefaultRuntimeUrl) return "custom";
4409
4486
  else return "disabled";
4410
4487
  }
4411
4488
  /**
@@ -4421,8 +4498,8 @@ function getTranslationApiType(params) {
4421
4498
  * Requirements:
4422
4499
  * - CUSTOM:
4423
4500
  * - GT:
4424
- * - projectId is required
4425
- * - devApiKey or apiKey is required
4501
+ * - projectId is needed
4502
+ * - devApiKey or apiKey is needed
4426
4503
  * - DISABLED:
4427
4504
  * - no requirements
4428
4505
  *
@@ -4435,11 +4512,17 @@ function validateTranslationApi(params) {
4435
4512
  case "gt":
4436
4513
  if (!params.projectId) results.push({
4437
4514
  type: "warning",
4438
- message: "projectId is required"
4515
+ message: createDiagnosticMessage({
4516
+ whatHappened: "Runtime translation needs a projectId",
4517
+ fix: "Add projectId to the I18nManager config or disable runtime translation"
4518
+ })
4439
4519
  });
4440
4520
  if (!params.devApiKey && !params.apiKey) results.push({
4441
4521
  type: "warning",
4442
- message: "devApiKey or apiKey is required"
4522
+ message: createDiagnosticMessage({
4523
+ whatHappened: "Runtime translation needs devApiKey or apiKey",
4524
+ fix: "Add credentials to the I18nManager config or disable runtime translation"
4525
+ })
4443
4526
  });
4444
4527
  break;
4445
4528
  case "disabled": break;
@@ -4468,7 +4551,10 @@ function validateLocales(params) {
4468
4551
  new Set([...defaultLocale ? [defaultLocale] : [], ...locales || []]).forEach((locale) => {
4469
4552
  if (!isValidLocale(locale, customMapping)) results.push({
4470
4553
  type: "error",
4471
- message: `Invalid locale: ${locale}`
4554
+ message: createDiagnosticMessage({
4555
+ whatHappened: `Locale "${locale}" is not valid`,
4556
+ fix: "Use a valid BCP 47 locale code or add a custom mapping"
4557
+ })
4472
4558
  });
4473
4559
  });
4474
4560
  return results;
@@ -4483,7 +4569,10 @@ function validateDictionary(params) {
4483
4569
  const results = [];
4484
4570
  if (params.loadDictionary && !params.dictionary) results.push({
4485
4571
  type: "error",
4486
- message: "dictionary is required when loadDictionary is provided"
4572
+ message: createDiagnosticMessage({
4573
+ whatHappened: "loadDictionary needs a source dictionary",
4574
+ fix: "Provide dictionary so the default locale has source content"
4575
+ })
4487
4576
  });
4488
4577
  return results;
4489
4578
  }
@@ -5753,7 +5842,7 @@ var I18nManager = class extends EventEmitter {
5753
5842
  }
5754
5843
  resolveLocale(locale) {
5755
5844
  const resolvedLocale = this.localeConfig.determineLocale(locale);
5756
- if (!this.localeConfig.isValidLocale(locale) || !resolvedLocale) throw new Error(`I18nManager: validateLocale(): locale ${locale} is not valid`);
5845
+ 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.`);
5757
5846
  return resolvedLocale;
5758
5847
  }
5759
5848
  /**
@@ -5800,7 +5889,7 @@ var I18nManager = class extends EventEmitter {
5800
5889
  */
5801
5890
  async dictionaryRuntimeTranslate(locale, id, sourceEntry) {
5802
5891
  const translation = await this.lookupTranslationWithFallbackResolved(locale, sourceEntry.entry, resolveDictionaryLookupOptions(sourceEntry.options));
5803
- if (typeof translation !== "string") throw new Error(`I18nManager: dictionaryRuntimeTranslate(): unable to translate dictionary entry ${id}`);
5892
+ 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.`);
5804
5893
  return translation;
5805
5894
  }
5806
5895
  /**
@@ -5933,7 +6022,7 @@ let conditionStore = fallbackConditionStore;
5933
6022
  */
5934
6023
  function getI18nManager() {
5935
6024
  if (!i18nManager) {
5936
- logger_default.warn("getI18nManager(): Translation failed because I18nManager not initialized.");
6025
+ logger_default.warn("getI18nManager(): I18nManager was not initialized. Falling back to the default locale until initializeGT() configures translations.");
5937
6026
  i18nManager = new I18nManager({
5938
6027
  defaultLocale: "en",
5939
6028
  locales: ["en"]
@@ -6227,7 +6316,40 @@ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.g
6227
6316
  });
6228
6317
  return e;
6229
6318
  }, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
6230
- function C(e) {
6319
+ function b(e) {
6320
+ let t = e.trim();
6321
+ return t ? /[.!?)]$/.test(t) ? t : `${t}.` : ``;
6322
+ }
6323
+ function x(e) {
6324
+ let t = e.trim(), n = t.length;
6325
+ for (; n > 0;) {
6326
+ let e = t[n - 1];
6327
+ if (e !== `.` && e !== `!` && e !== `?`) break;
6328
+ --n;
6329
+ }
6330
+ return t.slice(0, n);
6331
+ }
6332
+ function te(e) {
6333
+ return e.replace(/^[A-Z][a-z]/, (e) => e.toLowerCase());
6334
+ }
6335
+ function ne(e) {
6336
+ if (!e) return ``;
6337
+ let t = Array.isArray(e) ? e.join(`, `) : e;
6338
+ return t.trim() ? b(`Details: ${t}`) : ``;
6339
+ }
6340
+ function S({ source: e, severity: t, whatHappened: n, reassurance: r, why: i, fix: a, wayOut: o, details: s, docsUrl: c }) {
6341
+ 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 = [
6342
+ u,
6343
+ r,
6344
+ d ? `${x(a)}, or ${te(x(o))}` : a,
6345
+ d ? void 0 : o,
6346
+ ne(s)
6347
+ ].filter((e) => !!e).map(b);
6348
+ c && f.push(`Learn more: ${c}`);
6349
+ let p = f.join(` `);
6350
+ return l ? `${l} ${p}` : p;
6351
+ }
6352
+ function E(e) {
6231
6353
  let t = e;
6232
6354
  if (t && typeof t == `object` && typeof t.k == `string`) {
6233
6355
  let e = Object.keys(t);
@@ -6235,43 +6357,43 @@ function C(e) {
6235
6357
  }
6236
6358
  return !1;
6237
6359
  }
6238
- function w(e) {
6360
+ function ie(e) {
6239
6361
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
6240
6362
  }
6241
- function T$1(e, t, n = ``) {
6242
- let r = w(e), i = e?.length, a = t !== void 0;
6363
+ function D(e, t, n = ``) {
6364
+ let r = ie(e), i = e?.length, a = t !== void 0;
6243
6365
  if (!r || a && i !== t) {
6244
6366
  let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
6245
6367
  throw r ? RangeError(l) : TypeError(l);
6246
6368
  }
6247
6369
  return e;
6248
6370
  }
6249
- function E(e, t = !0) {
6371
+ function ae(e, t = !0) {
6250
6372
  if (e.destroyed) throw Error(`Hash instance has been destroyed`);
6251
6373
  if (t && e.finished) throw Error(`Hash#digest() has already been called`);
6252
6374
  }
6253
- function D(e, t) {
6254
- T$1(e, void 0, `digestInto() output`);
6375
+ function oe(e, t) {
6376
+ D(e, void 0, `digestInto() output`);
6255
6377
  let n = t.outputLen;
6256
6378
  if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
6257
6379
  }
6258
- function O(...e) {
6380
+ function se(...e) {
6259
6381
  for (let t = 0; t < e.length; t++) e[t].fill(0);
6260
6382
  }
6261
- function k(e) {
6383
+ function ce(e) {
6262
6384
  return new DataView(e.buffer, e.byteOffset, e.byteLength);
6263
6385
  }
6264
- function A(e, t) {
6386
+ function O(e, t) {
6265
6387
  return e << 32 - t | e >>> t;
6266
6388
  }
6267
6389
  new Uint8Array(new Uint32Array([287454020]).buffer)[0];
6268
6390
  typeof Uint8Array.from([]).toHex == `function` && Uint8Array.fromHex;
6269
6391
  Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
6270
- function oe(e, t = {}) {
6392
+ function pe(e, t = {}) {
6271
6393
  let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
6272
6394
  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);
6273
6395
  }
6274
- const se = (e) => ({ oid: Uint8Array.from([
6396
+ const me = (e) => ({ oid: Uint8Array.from([
6275
6397
  6,
6276
6398
  9,
6277
6399
  96,
@@ -6284,13 +6406,13 @@ const se = (e) => ({ oid: Uint8Array.from([
6284
6406
  2,
6285
6407
  e
6286
6408
  ]) });
6287
- function ce(e, t, n) {
6409
+ function he(e, t, n) {
6288
6410
  return e & t ^ ~e & n;
6289
6411
  }
6290
- function le(e, t, n) {
6412
+ function ge(e, t, n) {
6291
6413
  return e & t ^ e & n ^ t & n;
6292
6414
  }
6293
- var ue = class {
6415
+ var _e = class {
6294
6416
  blockLen;
6295
6417
  outputLen;
6296
6418
  canXOF = !1;
@@ -6303,15 +6425,15 @@ var ue = class {
6303
6425
  pos = 0;
6304
6426
  destroyed = !1;
6305
6427
  constructor(e, t, n, r) {
6306
- this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = k(this.buffer);
6428
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = ce(this.buffer);
6307
6429
  }
6308
6430
  update(e) {
6309
- E(this), T$1(e);
6431
+ ae(this), D(e);
6310
6432
  let { view: t, buffer: n, blockLen: r } = this, i = e.length;
6311
6433
  for (let a = 0; a < i;) {
6312
6434
  let o = Math.min(r - this.pos, i - a);
6313
6435
  if (o === r) {
6314
- let t = k(e);
6436
+ let t = ce(e);
6315
6437
  for (; r <= i - a; a += r) this.process(t, a);
6316
6438
  continue;
6317
6439
  }
@@ -6320,12 +6442,12 @@ var ue = class {
6320
6442
  return this.length += e.length, this.roundClean(), this;
6321
6443
  }
6322
6444
  digestInto(e) {
6323
- E(this), D(e, this), this.finished = !0;
6445
+ ae(this), oe(e, this), this.finished = !0;
6324
6446
  let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
6325
- t[a++] = 128, O(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
6447
+ t[a++] = 128, se(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
6326
6448
  for (let e = a; e < r; e++) t[e] = 0;
6327
6449
  n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
6328
- let o = k(e), s = this.outputLen;
6450
+ let o = ce(e), s = this.outputLen;
6329
6451
  if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
6330
6452
  let c = s / 4, l = this.get();
6331
6453
  if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
@@ -6346,7 +6468,7 @@ var ue = class {
6346
6468
  return this._cloneInto();
6347
6469
  }
6348
6470
  };
6349
- const j = Uint32Array.from([
6471
+ const k = Uint32Array.from([
6350
6472
  1779033703,
6351
6473
  3144134277,
6352
6474
  1013904242,
@@ -6355,25 +6477,25 @@ const j = Uint32Array.from([
6355
6477
  2600822924,
6356
6478
  528734635,
6357
6479
  1541459225
6358
- ]), M = BigInt(2 ** 32 - 1), de = BigInt(32);
6359
- function fe(e, t = !1) {
6480
+ ]), A = BigInt(2 ** 32 - 1), ve = BigInt(32);
6481
+ function ye(e, t = !1) {
6360
6482
  return t ? {
6361
- h: Number(e & M),
6362
- l: Number(e >> de & M)
6483
+ h: Number(e & A),
6484
+ l: Number(e >> ve & A)
6363
6485
  } : {
6364
- h: Number(e >> de & M) | 0,
6365
- l: Number(e & M) | 0
6486
+ h: Number(e >> ve & A) | 0,
6487
+ l: Number(e & A) | 0
6366
6488
  };
6367
6489
  }
6368
- function pe(e, t = !1) {
6490
+ function be(e, t = !1) {
6369
6491
  let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
6370
6492
  for (let a = 0; a < n; a++) {
6371
- let { h: n, l: o } = fe(e[a], t);
6493
+ let { h: n, l: o } = ye(e[a], t);
6372
6494
  [r[a], i[a]] = [n, o];
6373
6495
  }
6374
6496
  return [r, i];
6375
6497
  }
6376
- const me = Uint32Array.from([
6498
+ const xe = Uint32Array.from([
6377
6499
  1116352408,
6378
6500
  1899447441,
6379
6501
  3049323471,
@@ -6438,8 +6560,8 @@ const me = Uint32Array.from([
6438
6560
  2756734187,
6439
6561
  3204031479,
6440
6562
  3329325298
6441
- ]), N = new Uint32Array(64);
6442
- var he = class extends ue {
6563
+ ]), j = new Uint32Array(64);
6564
+ var Se = class extends _e {
6443
6565
  constructor(e) {
6444
6566
  super(64, e, 8, !1);
6445
6567
  }
@@ -6460,41 +6582,41 @@ var he = class extends ue {
6460
6582
  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;
6461
6583
  }
6462
6584
  process(e, t) {
6463
- for (let n = 0; n < 16; n++, t += 4) N[n] = e.getUint32(t, !1);
6585
+ for (let n = 0; n < 16; n++, t += 4) j[n] = e.getUint32(t, !1);
6464
6586
  for (let e = 16; e < 64; e++) {
6465
- let t = N[e - 15], n = N[e - 2], r = A(t, 7) ^ A(t, 18) ^ t >>> 3;
6466
- N[e] = (A(n, 17) ^ A(n, 19) ^ n >>> 10) + N[e - 7] + r + N[e - 16] | 0;
6587
+ let t = j[e - 15], n = j[e - 2], r = O(t, 7) ^ O(t, 18) ^ t >>> 3;
6588
+ j[e] = (O(n, 17) ^ O(n, 19) ^ n >>> 10) + j[e - 7] + r + j[e - 16] | 0;
6467
6589
  }
6468
6590
  let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
6469
6591
  for (let e = 0; e < 64; e++) {
6470
- let t = A(o, 6) ^ A(o, 11) ^ A(o, 25), u = l + t + ce(o, s, c) + me[e] + N[e] | 0, d = (A(n, 2) ^ A(n, 13) ^ A(n, 22)) + le(n, r, i) | 0;
6592
+ 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;
6471
6593
  l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
6472
6594
  }
6473
6595
  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);
6474
6596
  }
6475
6597
  roundClean() {
6476
- O(N);
6598
+ se(j);
6477
6599
  }
6478
6600
  destroy() {
6479
- this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), O(this.buffer);
6480
- }
6481
- }, ge = class extends he {
6482
- A = j[0] | 0;
6483
- B = j[1] | 0;
6484
- C = j[2] | 0;
6485
- D = j[3] | 0;
6486
- E = j[4] | 0;
6487
- F = j[5] | 0;
6488
- G = j[6] | 0;
6489
- H = j[7] | 0;
6601
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), se(this.buffer);
6602
+ }
6603
+ }, Ce = class extends Se {
6604
+ A = k[0] | 0;
6605
+ B = k[1] | 0;
6606
+ C = k[2] | 0;
6607
+ D = k[3] | 0;
6608
+ E = k[4] | 0;
6609
+ F = k[5] | 0;
6610
+ G = k[6] | 0;
6611
+ H = k[7] | 0;
6490
6612
  constructor() {
6491
6613
  super(32);
6492
6614
  }
6493
6615
  };
6494
- const _e = pe(`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)));
6495
- _e[0], _e[1];
6496
- oe(() => new ge(), se(1));
6497
- const ye = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, be = `DEFAULT_TERMINATOR_KEY`, xe = {
6616
+ 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)));
6617
+ we[0], we[1];
6618
+ pe(() => new Ce(), me(1));
6619
+ const Ee = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, De = `DEFAULT_TERMINATOR_KEY`, Oe = {
6498
6620
  ellipsis: {
6499
6621
  fr: {
6500
6622
  terminator: `…`,
@@ -6508,37 +6630,35 @@ const ye = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${
6508
6630
  terminator: `……`,
6509
6631
  separator: void 0
6510
6632
  },
6511
- [be]: {
6633
+ [De]: {
6512
6634
  terminator: `…`,
6513
6635
  separator: void 0
6514
6636
  }
6515
6637
  },
6516
- none: { [be]: {
6638
+ none: { [De]: {
6517
6639
  terminator: void 0,
6518
6640
  separator: void 0
6519
6641
  } }
6520
6642
  };
6521
- var Se = class {
6522
- constructor(e, t = {}) {
6643
+ var ke = class e {
6644
+ static resolveLocale(e) {
6523
6645
  try {
6524
- let t = e ? Array.isArray(e) ? e.map((e) => String(e)) : [String(e)] : [`en`], n = Intl.getCanonicalLocales(t);
6525
- this.locale = n.length ? n[0] : `en`;
6646
+ let t = e ? Array.isArray(e) ? e.map(String) : [String(e)] : [`en`], [n] = Intl.getCanonicalLocales(t);
6647
+ return n ?? `en`;
6526
6648
  } catch {
6527
- this.locale = `en`;
6528
- }
6529
- if (!xe[t.style ?? `ellipsis`]) throw Error(ye(t.style ?? `ellipsis`));
6530
- let n, r;
6531
- if (t.maxChars !== void 0) {
6532
- n = t.style ?? `ellipsis`;
6533
- let e = new Intl.Locale(this.locale).language;
6534
- r = xe[n][e] || xe[n].DEFAULT_TERMINATOR_KEY;
6649
+ return `en`;
6535
6650
  }
6536
- let i = t.terminator ?? r?.terminator, a = i == null ? void 0 : t.separator ?? r?.separator;
6537
- this.additionLength = (i?.length ?? 0) + (a?.length ?? 0), t.maxChars !== void 0 && Math.abs(t.maxChars) < this.additionLength && (i = void 0, a = void 0), this.options = {
6538
- maxChars: t.maxChars,
6539
- style: n,
6540
- terminator: i,
6541
- separator: a
6651
+ }
6652
+ constructor(t, n = {}) {
6653
+ this.locale = e.resolveLocale(t);
6654
+ let r = n.style ?? `ellipsis`;
6655
+ if (!Oe[r]) throw Error(Ee(r));
6656
+ 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;
6657
+ 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 = {
6658
+ maxChars: n.maxChars,
6659
+ style: n.maxChars === void 0 ? void 0 : r,
6660
+ terminator: a,
6661
+ separator: o
6542
6662
  };
6543
6663
  }
6544
6664
  format(e) {
@@ -6560,7 +6680,7 @@ var Se = class {
6560
6680
  return this.options;
6561
6681
  }
6562
6682
  };
6563
- const Ce = {
6683
+ const Ae = {
6564
6684
  Collator: Intl.Collator,
6565
6685
  DateTimeFormat: Intl.DateTimeFormat,
6566
6686
  DisplayNames: Intl.DisplayNames,
@@ -6570,83 +6690,85 @@ const Ce = {
6570
6690
  PluralRules: Intl.PluralRules,
6571
6691
  RelativeTimeFormat: Intl.RelativeTimeFormat,
6572
6692
  Segmenter: Intl.Segmenter,
6573
- CutoffFormat: Se
6574
- }, we = new class {
6693
+ CutoffFormat: ke
6694
+ }, je = new class {
6575
6695
  constructor() {
6576
6696
  this.cache = {};
6577
6697
  }
6578
- _generateKey(e, t = {}) {
6698
+ generateKey(e, t = {}) {
6579
6699
  return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
6580
6700
  }
6581
6701
  get(e, ...t) {
6582
- let [n = `en`, r = {}] = t, i = this._generateKey(n, r), a = this.cache[e]?.[i];
6583
- return a === void 0 && (a = new Ce[e](...t), this.cache[e] || (this.cache[e] = {}), this.cache[e][i] = a), a;
6702
+ let [n = `en`, r = {}] = t, i = this.generateKey(n, r), a = this.cache[e];
6703
+ a === void 0 && (a = {}, this.cache[e] = a);
6704
+ let o = a[i];
6705
+ return o === void 0 && (o = new Ae[e](...t), a[i] = o), o;
6584
6706
  }
6585
6707
  }();
6586
- function Te(e) {
6587
- return we.get(`PluralRules`, e);
6588
- }
6589
- var P = m({
6590
- __addDisposableResource: () => Ze,
6591
- __assign: () => R,
6592
- __asyncDelegator: () => Ue,
6593
- __asyncGenerator: () => He,
6594
- __asyncValues: () => We,
6595
- __await: () => I,
6596
- __awaiter: () => Fe,
6597
- __classPrivateFieldGet: () => Je,
6598
- __classPrivateFieldIn: () => Xe,
6599
- __classPrivateFieldSet: () => Ye,
6600
- __createBinding: () => z,
6601
- __decorate: () => Oe,
6602
- __disposeResources: () => Qe,
6603
- __esDecorate: () => Ae,
6604
- __exportStar: () => Le,
6605
- __extends: () => Ee,
6606
- __generator: () => Ie,
6607
- __importDefault: () => qe,
6608
- __importStar: () => Ke,
6609
- __makeTemplateObject: () => Ge,
6610
- __metadata: () => Pe,
6611
- __param: () => ke,
6612
- __propKey: () => Me,
6613
- __read: () => Re,
6614
- __rest: () => De,
6615
- __rewriteRelativeImportExtension: () => $e,
6616
- __runInitializers: () => je,
6617
- __setFunctionName: () => Ne,
6618
- __spread: () => ze,
6619
- __spreadArray: () => Ve,
6620
- __spreadArrays: () => Be,
6621
- __values: () => F,
6622
- default: () => nt
6708
+ function Me(e) {
6709
+ return je.get(`PluralRules`, e);
6710
+ }
6711
+ var M = m({
6712
+ __addDisposableResource: () => it,
6713
+ __assign: () => F,
6714
+ __asyncDelegator: () => Xe,
6715
+ __asyncGenerator: () => Ye,
6716
+ __asyncValues: () => Ze,
6717
+ __await: () => P,
6718
+ __awaiter: () => He,
6719
+ __classPrivateFieldGet: () => tt,
6720
+ __classPrivateFieldIn: () => rt,
6721
+ __classPrivateFieldSet: () => nt,
6722
+ __createBinding: () => I,
6723
+ __decorate: () => Fe,
6724
+ __disposeResources: () => at,
6725
+ __esDecorate: () => Le,
6726
+ __exportStar: () => We,
6727
+ __extends: () => Ne,
6728
+ __generator: () => Ue,
6729
+ __importDefault: () => et,
6730
+ __importStar: () => $e,
6731
+ __makeTemplateObject: () => Qe,
6732
+ __metadata: () => Ve,
6733
+ __param: () => Ie,
6734
+ __propKey: () => ze,
6735
+ __read: () => Ge,
6736
+ __rest: () => Pe,
6737
+ __rewriteRelativeImportExtension: () => ot,
6738
+ __runInitializers: () => Re,
6739
+ __setFunctionName: () => Be,
6740
+ __spread: () => Ke,
6741
+ __spreadArray: () => Je,
6742
+ __spreadArrays: () => qe,
6743
+ __values: () => N,
6744
+ default: () => ut
6623
6745
  });
6624
- function Ee(e, t) {
6746
+ function Ne(e, t) {
6625
6747
  if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
6626
- L(e, t);
6748
+ st(e, t);
6627
6749
  function n() {
6628
6750
  this.constructor = e;
6629
6751
  }
6630
6752
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
6631
6753
  }
6632
- function De(e, t) {
6754
+ function Pe(e, t) {
6633
6755
  var n = {};
6634
6756
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
6635
6757
  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]]);
6636
6758
  return n;
6637
6759
  }
6638
- function Oe(e, t, n, r) {
6760
+ function Fe(e, t, n, r) {
6639
6761
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
6640
6762
  if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
6641
6763
  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);
6642
6764
  return i > 3 && a && Object.defineProperty(t, n, a), a;
6643
6765
  }
6644
- function ke(e, t) {
6766
+ function Ie(e, t) {
6645
6767
  return function(n, r) {
6646
6768
  t(n, r, e);
6647
6769
  };
6648
6770
  }
6649
- function Ae(e, t, n, r, i, a) {
6771
+ function Le(e, t, n, r, i, a) {
6650
6772
  function o(e) {
6651
6773
  if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
6652
6774
  return e;
@@ -6671,23 +6793,23 @@ function Ae(e, t, n, r, i, a) {
6671
6793
  }
6672
6794
  l && Object.defineProperty(l, r.name, u), f = !0;
6673
6795
  }
6674
- function je(e, t, n) {
6796
+ function Re(e, t, n) {
6675
6797
  for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
6676
6798
  return r ? n : void 0;
6677
6799
  }
6678
- function Me(e) {
6800
+ function ze(e) {
6679
6801
  return typeof e == `symbol` ? e : `${e}`;
6680
6802
  }
6681
- function Ne(e, t, n) {
6803
+ function Be(e, t, n) {
6682
6804
  return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
6683
6805
  configurable: !0,
6684
6806
  value: n ? `${n} ${t}` : t
6685
6807
  });
6686
6808
  }
6687
- function Pe(e, t) {
6809
+ function Ve(e, t) {
6688
6810
  if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
6689
6811
  }
6690
- function Fe(e, t, n, r) {
6812
+ function He(e, t, n, r) {
6691
6813
  function i(e) {
6692
6814
  return e instanceof n ? e : new n(function(t) {
6693
6815
  t(e);
@@ -6714,7 +6836,7 @@ function Fe(e, t, n, r) {
6714
6836
  c((r = r.apply(e, t || [])).next());
6715
6837
  });
6716
6838
  }
6717
- function Ie(e, t) {
6839
+ function Ue(e, t) {
6718
6840
  var n = {
6719
6841
  label: 0,
6720
6842
  sent: function() {
@@ -6784,10 +6906,10 @@ function Ie(e, t) {
6784
6906
  };
6785
6907
  }
6786
6908
  }
6787
- function Le(e, t) {
6788
- for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && z(t, e, n);
6909
+ function We(e, t) {
6910
+ for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && I(t, e, n);
6789
6911
  }
6790
- function F(e) {
6912
+ function N(e) {
6791
6913
  var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
6792
6914
  if (n) return n.call(e);
6793
6915
  if (e && typeof e.length == `number`) return { next: function() {
@@ -6798,7 +6920,7 @@ function F(e) {
6798
6920
  } };
6799
6921
  throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
6800
6922
  }
6801
- function Re(e, t) {
6923
+ function Ge(e, t) {
6802
6924
  var n = typeof Symbol == `function` && e[Symbol.iterator];
6803
6925
  if (!n) return e;
6804
6926
  var r = n.call(e), i, a = [], o;
@@ -6815,23 +6937,23 @@ function Re(e, t) {
6815
6937
  }
6816
6938
  return a;
6817
6939
  }
6818
- function ze() {
6819
- for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Re(arguments[t]));
6940
+ function Ke() {
6941
+ for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Ge(arguments[t]));
6820
6942
  return e;
6821
6943
  }
6822
- function Be() {
6944
+ function qe() {
6823
6945
  for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
6824
6946
  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];
6825
6947
  return r;
6826
6948
  }
6827
- function Ve(e, t, n) {
6949
+ function Je(e, t, n) {
6828
6950
  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]);
6829
6951
  return e.concat(a || Array.prototype.slice.call(t));
6830
6952
  }
6831
- function I(e) {
6832
- return this instanceof I ? (this.v = e, this) : new I(e);
6953
+ function P(e) {
6954
+ return this instanceof P ? (this.v = e, this) : new P(e);
6833
6955
  }
6834
- function He(e, t, n) {
6956
+ function Ye(e, t, n) {
6835
6957
  if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
6836
6958
  var r = n.apply(e, t || []), i, a = [];
6837
6959
  return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
@@ -6862,7 +6984,7 @@ function He(e, t, n) {
6862
6984
  }
6863
6985
  }
6864
6986
  function l(e) {
6865
- e.value instanceof I ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
6987
+ e.value instanceof P ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
6866
6988
  }
6867
6989
  function u(e) {
6868
6990
  c(`next`, e);
@@ -6874,7 +6996,7 @@ function He(e, t, n) {
6874
6996
  e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
6875
6997
  }
6876
6998
  }
6877
- function Ue(e) {
6999
+ function Xe(e) {
6878
7000
  var t, n;
6879
7001
  return t = {}, r(`next`), r(`throw`, function(e) {
6880
7002
  throw e;
@@ -6884,16 +7006,16 @@ function Ue(e) {
6884
7006
  function r(r, i) {
6885
7007
  t[r] = e[r] ? function(t) {
6886
7008
  return (n = !n) ? {
6887
- value: I(e[r](t)),
7009
+ value: P(e[r](t)),
6888
7010
  done: !1
6889
7011
  } : i ? i(t) : t;
6890
7012
  } : i;
6891
7013
  }
6892
7014
  }
6893
- function We(e) {
7015
+ function Ze(e) {
6894
7016
  if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
6895
7017
  var t = e[Symbol.asyncIterator], n;
6896
- return t ? t.call(e) : (e = typeof F == `function` ? F(e) : e[Symbol.iterator](), n = {}, r(`next`), r(`throw`), r(`return`), n[Symbol.asyncIterator] = function() {
7018
+ 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() {
6897
7019
  return this;
6898
7020
  }, n);
6899
7021
  function r(t) {
@@ -6912,34 +7034,34 @@ function We(e) {
6912
7034
  }, t);
6913
7035
  }
6914
7036
  }
6915
- function Ge(e, t) {
7037
+ function Qe(e, t) {
6916
7038
  return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
6917
7039
  }
6918
- function Ke(e) {
7040
+ function $e(e) {
6919
7041
  if (e && e.__esModule) return e;
6920
7042
  var t = {};
6921
- if (e != null) for (var n = B(e), r = 0; r < n.length; r++) n[r] !== `default` && z(t, e, n[r]);
6922
- return et(t, e), t;
7043
+ if (e != null) for (var n = L(e), r = 0; r < n.length; r++) n[r] !== `default` && I(t, e, n[r]);
7044
+ return ct(t, e), t;
6923
7045
  }
6924
- function qe(e) {
7046
+ function et(e) {
6925
7047
  return e && e.__esModule ? e : { default: e };
6926
7048
  }
6927
- function Je(e, t, n, r) {
7049
+ function tt(e, t, n, r) {
6928
7050
  if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
6929
7051
  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`);
6930
7052
  return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
6931
7053
  }
6932
- function Ye(e, t, n, r, i) {
7054
+ function nt(e, t, n, r, i) {
6933
7055
  if (r === `m`) throw TypeError(`Private method is not writable`);
6934
7056
  if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
6935
7057
  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`);
6936
7058
  return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
6937
7059
  }
6938
- function Xe(e, t) {
7060
+ function rt(e, t) {
6939
7061
  if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
6940
7062
  return typeof e == `function` ? t === e : e.has(t);
6941
7063
  }
6942
- function Ze(e, t, n) {
7064
+ function it(e, t, n) {
6943
7065
  if (t != null) {
6944
7066
  if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
6945
7067
  var r, i;
@@ -6966,9 +7088,9 @@ function Ze(e, t, n) {
6966
7088
  } else n && e.stack.push({ async: !0 });
6967
7089
  return t;
6968
7090
  }
6969
- function Qe(e) {
7091
+ function at(e) {
6970
7092
  function t(t) {
6971
- e.error = e.hasError ? new tt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
7093
+ e.error = e.hasError ? new lt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
6972
7094
  }
6973
7095
  var n, r = 0;
6974
7096
  function i() {
@@ -6988,24 +7110,24 @@ function Qe(e) {
6988
7110
  }
6989
7111
  return i();
6990
7112
  }
6991
- function $e(e, t) {
7113
+ function ot(e, t) {
6992
7114
  return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
6993
7115
  return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
6994
7116
  }) : e;
6995
7117
  }
6996
- var L, R, z, et, B, tt, nt, V = f((() => {
6997
- L = function(e, t) {
6998
- return L = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
7118
+ var st, F, I, ct, L, lt, ut, R = f((() => {
7119
+ st = function(e, t) {
7120
+ return st = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
6999
7121
  e.__proto__ = t;
7000
7122
  } || function(e, t) {
7001
7123
  for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
7002
- }, L(e, t);
7003
- }, R = function() {
7004
- return R = Object.assign || function(e) {
7124
+ }, st(e, t);
7125
+ }, F = function() {
7126
+ return F = Object.assign || function(e) {
7005
7127
  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]);
7006
7128
  return e;
7007
- }, R.apply(this, arguments);
7008
- }, z = Object.create ? (function(e, t, n, r) {
7129
+ }, F.apply(this, arguments);
7130
+ }, I = Object.create ? (function(e, t, n, r) {
7009
7131
  r === void 0 && (r = n);
7010
7132
  var i = Object.getOwnPropertyDescriptor(t, n);
7011
7133
  (!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
@@ -7016,63 +7138,63 @@ var L, R, z, et, B, tt, nt, V = f((() => {
7016
7138
  }), Object.defineProperty(e, r, i);
7017
7139
  }) : (function(e, t, n, r) {
7018
7140
  r === void 0 && (r = n), e[r] = t[n];
7019
- }), et = Object.create ? (function(e, t) {
7141
+ }), ct = Object.create ? (function(e, t) {
7020
7142
  Object.defineProperty(e, `default`, {
7021
7143
  enumerable: !0,
7022
7144
  value: t
7023
7145
  });
7024
7146
  }) : function(e, t) {
7025
7147
  e.default = t;
7026
- }, B = function(e) {
7027
- return B = Object.getOwnPropertyNames || function(e) {
7148
+ }, L = function(e) {
7149
+ return L = Object.getOwnPropertyNames || function(e) {
7028
7150
  var t = [];
7029
7151
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
7030
7152
  return t;
7031
- }, B(e);
7032
- }, tt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
7153
+ }, L(e);
7154
+ }, lt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
7033
7155
  var r = Error(n);
7034
7156
  return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
7035
- }, nt = {
7036
- __extends: Ee,
7037
- __assign: R,
7038
- __rest: De,
7039
- __decorate: Oe,
7040
- __param: ke,
7041
- __esDecorate: Ae,
7042
- __runInitializers: je,
7043
- __propKey: Me,
7044
- __setFunctionName: Ne,
7045
- __metadata: Pe,
7046
- __awaiter: Fe,
7047
- __generator: Ie,
7048
- __createBinding: z,
7049
- __exportStar: Le,
7050
- __values: F,
7051
- __read: Re,
7052
- __spread: ze,
7053
- __spreadArrays: Be,
7054
- __spreadArray: Ve,
7055
- __await: I,
7056
- __asyncGenerator: He,
7057
- __asyncDelegator: Ue,
7058
- __asyncValues: We,
7059
- __makeTemplateObject: Ge,
7060
- __importStar: Ke,
7061
- __importDefault: qe,
7062
- __classPrivateFieldGet: Je,
7063
- __classPrivateFieldSet: Ye,
7064
- __classPrivateFieldIn: Xe,
7065
- __addDisposableResource: Ze,
7066
- __disposeResources: Qe,
7067
- __rewriteRelativeImportExtension: $e
7157
+ }, ut = {
7158
+ __extends: Ne,
7159
+ __assign: F,
7160
+ __rest: Pe,
7161
+ __decorate: Fe,
7162
+ __param: Ie,
7163
+ __esDecorate: Le,
7164
+ __runInitializers: Re,
7165
+ __propKey: ze,
7166
+ __setFunctionName: Be,
7167
+ __metadata: Ve,
7168
+ __awaiter: He,
7169
+ __generator: Ue,
7170
+ __createBinding: I,
7171
+ __exportStar: We,
7172
+ __values: N,
7173
+ __read: Ge,
7174
+ __spread: Ke,
7175
+ __spreadArrays: qe,
7176
+ __spreadArray: Je,
7177
+ __await: P,
7178
+ __asyncGenerator: Ye,
7179
+ __asyncDelegator: Xe,
7180
+ __asyncValues: Ze,
7181
+ __makeTemplateObject: Qe,
7182
+ __importStar: $e,
7183
+ __importDefault: et,
7184
+ __classPrivateFieldGet: tt,
7185
+ __classPrivateFieldSet: nt,
7186
+ __classPrivateFieldIn: rt,
7187
+ __addDisposableResource: it,
7188
+ __disposeResources: at,
7189
+ __rewriteRelativeImportExtension: ot
7068
7190
  };
7069
- })), rt = p(((e) => {
7191
+ })), dt = p(((e) => {
7070
7192
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
7071
7193
  var t;
7072
7194
  (function(e) {
7073
7195
  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`;
7074
7196
  })(t || (e.ErrorKind = t = {}));
7075
- })), H = p(((e) => {
7197
+ })), z = p(((e) => {
7076
7198
  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;
7077
7199
  var t;
7078
7200
  (function(e) {
@@ -7128,9 +7250,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
7128
7250
  style: n
7129
7251
  };
7130
7252
  }
7131
- })), it = p(((e) => {
7253
+ })), ft = p(((e) => {
7132
7254
  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]/;
7133
- })), at = p(((e) => {
7255
+ })), pt = p(((e) => {
7134
7256
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
7135
7257
  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;
7136
7258
  function n(e) {
@@ -7230,11 +7352,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
7230
7352
  return ``;
7231
7353
  }), n;
7232
7354
  }
7233
- })), ot = p(((e) => {
7355
+ })), mt = p(((e) => {
7234
7356
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
7235
- })), st = p(((e) => {
7357
+ })), ht = p(((e) => {
7236
7358
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
7237
- var t = (V(), g(P)), n = ot();
7359
+ var t = (R(), g(M)), n = mt();
7238
7360
  function r(e) {
7239
7361
  if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
7240
7362
  for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
@@ -7412,11 +7534,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
7412
7534
  }
7413
7535
  return n;
7414
7536
  }
7415
- })), ct = p(((e) => {
7537
+ })), gt = p(((e) => {
7416
7538
  Object.defineProperty(e, `__esModule`, { value: !0 });
7417
- var t = (V(), g(P));
7418
- t.__exportStar(at(), e), t.__exportStar(st(), e);
7419
- })), lt = p(((e) => {
7539
+ var t = (R(), g(M));
7540
+ t.__exportStar(pt(), e), t.__exportStar(ht(), e);
7541
+ })), _t = p(((e) => {
7420
7542
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
7421
7543
  "001": [`H`, `h`],
7422
7544
  419: [
@@ -8573,9 +8695,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8573
8695
  `h`
8574
8696
  ]
8575
8697
  };
8576
- })), ut = p(((e) => {
8698
+ })), vt = p(((e) => {
8577
8699
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
8578
- var t = lt();
8700
+ var t = _t();
8579
8701
  function n(e, t) {
8580
8702
  for (var n = ``, i = 0; i < e.length; i++) {
8581
8703
  var a = e.charAt(i);
@@ -8600,9 +8722,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8600
8722
  var r = e.language, i;
8601
8723
  return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
8602
8724
  }
8603
- })), dt = p(((e) => {
8725
+ })), yt = p(((e) => {
8604
8726
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
8605
- var t = (V(), g(P)), n = rt(), r = H(), i = it(), a = ct(), o = ut(), s = RegExp(`^${i.SPACE_SEPARATOR_REGEX.source}*`), c = RegExp(`${i.SPACE_SEPARATOR_REGEX.source}*\$`);
8727
+ 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}*\$`);
8606
8728
  function l(e, t) {
8607
8729
  return {
8608
8730
  start: e,
@@ -8613,21 +8735,21 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8613
8735
  return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
8614
8736
  }, v = !0;
8615
8737
  try {
8616
- v = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
8738
+ v = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
8617
8739
  } catch {
8618
8740
  v = !1;
8619
8741
  }
8620
- var y = u ? function(e, t, n) {
8742
+ var ee = u ? function(e, t, n) {
8621
8743
  return e.startsWith(t, n);
8622
8744
  } : function(e, t, n) {
8623
8745
  return e.slice(n, n + t.length) === t;
8624
- }, b = d ? String.fromCodePoint : function() {
8746
+ }, y = d ? String.fromCodePoint : function() {
8625
8747
  for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
8626
8748
  if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
8627
8749
  t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
8628
8750
  }
8629
8751
  return t;
8630
- }, ee = f ? Object.fromEntries : function(e) {
8752
+ }, b = f ? Object.fromEntries : function(e) {
8631
8753
  for (var t = {}, n = 0, r = e; n < r.length; n++) {
8632
8754
  var i = r[n], a = i[0];
8633
8755
  t[a] = i[1];
@@ -8641,31 +8763,31 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8641
8763
  var r = e.charCodeAt(t), i;
8642
8764
  return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
8643
8765
  }
8644
- }, S = m ? function(e) {
8766
+ }, te = m ? function(e) {
8645
8767
  return e.trimStart();
8646
8768
  } : function(e) {
8647
8769
  return e.replace(s, ``);
8648
- }, te = h ? function(e) {
8770
+ }, ne = h ? function(e) {
8649
8771
  return e.trimEnd();
8650
8772
  } : function(e) {
8651
8773
  return e.replace(c, ``);
8652
8774
  };
8653
- function C(e, t) {
8775
+ function S(e, t) {
8654
8776
  return new RegExp(e, t);
8655
8777
  }
8656
- var w;
8778
+ var C;
8657
8779
  if (v) {
8658
- var T = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
8659
- w = function(e, t) {
8660
- return T.lastIndex = t, T.exec(e)[1] ?? ``;
8780
+ var w = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
8781
+ C = function(e, t) {
8782
+ return w.lastIndex = t, w.exec(e)[1] ?? ``;
8661
8783
  };
8662
- } else w = function(e, t) {
8784
+ } else C = function(e, t) {
8663
8785
  for (var n = [];;) {
8664
8786
  var r = x(e, t);
8665
- if (r === void 0 || k(r) || A(r)) break;
8787
+ if (r === void 0 || ie(r) || D(r)) break;
8666
8788
  n.push(r), t += r >= 65536 ? 2 : 1;
8667
8789
  }
8668
- return b.apply(void 0, n);
8790
+ return y.apply(void 0, n);
8669
8791
  };
8670
8792
  e.Parser = function() {
8671
8793
  function e(e, t) {
@@ -8695,7 +8817,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8695
8817
  } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
8696
8818
  if (i) break;
8697
8819
  return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
8698
- } else if (o === 60 && !this.ignoreTag && E(this.peek() || 0)) {
8820
+ } else if (o === 60 && !this.ignoreTag && T(this.peek() || 0)) {
8699
8821
  var s = this.parseTag(e, t);
8700
8822
  if (s.err) return s;
8701
8823
  a.push(s.val);
@@ -8726,7 +8848,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8726
8848
  if (o.err) return o;
8727
8849
  var s = o.val, c = this.clonePosition();
8728
8850
  if (this.bumpIf(`</`)) {
8729
- if (this.isEOF() || !E(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
8851
+ if (this.isEOF() || !T(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
8730
8852
  var u = this.clonePosition();
8731
8853
  return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
8732
8854
  val: {
@@ -8741,7 +8863,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8741
8863
  } else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
8742
8864
  }, e.prototype.parseTagName = function() {
8743
8865
  var e = this.offset();
8744
- for (this.bump(); !this.isEOF() && O(this.char());) this.bump();
8866
+ for (this.bump(); !this.isEOF() && E(this.char());) this.bump();
8745
8867
  return this.message.slice(e, this.offset());
8746
8868
  }, e.prototype.parseLiteral = function(e, t) {
8747
8869
  for (var n = this.clonePosition(), i = ``;;) {
@@ -8772,7 +8894,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8772
8894
  err: null
8773
8895
  };
8774
8896
  }, e.prototype.tryParseLeftAngleBracket = function() {
8775
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !D(this.peek() || 0)) ? (this.bump(), `<`) : null;
8897
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !re(this.peek() || 0)) ? (this.bump(), `<`) : null;
8776
8898
  }, e.prototype.tryParseQuote = function(e) {
8777
8899
  if (this.isEOF() || this.char() !== 39) return null;
8778
8900
  switch (this.peek()) {
@@ -8798,11 +8920,11 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8798
8920
  else t.push(n);
8799
8921
  this.bump();
8800
8922
  }
8801
- return b.apply(void 0, t);
8923
+ return y.apply(void 0, t);
8802
8924
  }, e.prototype.tryParseUnquoted = function(e, t) {
8803
8925
  if (this.isEOF()) return null;
8804
8926
  var n = this.char();
8805
- return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), b(n));
8927
+ return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), y(n));
8806
8928
  }, e.prototype.parseArgument = function(e, t) {
8807
8929
  var i = this.clonePosition();
8808
8930
  if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
@@ -8823,7 +8945,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8823
8945
  default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
8824
8946
  }
8825
8947
  }, e.prototype.parseIdentifierIfPossible = function() {
8826
- var e = this.clonePosition(), t = this.offset(), n = w(this.message, t), r = t + n.length;
8948
+ var e = this.clonePosition(), t = this.offset(), n = C(this.message, t), r = t + n.length;
8827
8949
  return this.bumpTo(r), {
8828
8950
  value: n,
8829
8951
  location: l(e, this.clonePosition())
@@ -8841,7 +8963,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8841
8963
  this.bumpSpace();
8842
8964
  var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
8843
8965
  if (h.err) return h;
8844
- var g = te(h.val);
8966
+ var g = ne(h.val);
8845
8967
  if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
8846
8968
  p = {
8847
8969
  style: g,
@@ -8851,10 +8973,10 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8851
8973
  var _ = this.tryParseArgumentClose(c);
8852
8974
  if (_.err) return _;
8853
8975
  var v = l(c, this.clonePosition());
8854
- if (p && y(p?.style, `::`, 0)) {
8855
- var b = S(p.style.slice(2));
8976
+ if (p && ee(p?.style, `::`, 0)) {
8977
+ var y = te(p.style.slice(2));
8856
8978
  if (d === `number`) {
8857
- var h = this.parseNumberSkeletonFromString(b, p.styleLocation);
8979
+ var h = this.parseNumberSkeletonFromString(y, p.styleLocation);
8858
8980
  return h.err ? h : {
8859
8981
  val: {
8860
8982
  type: r.TYPE.number,
@@ -8865,9 +8987,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8865
8987
  err: null
8866
8988
  };
8867
8989
  } else {
8868
- if (b.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
8869
- var x = b;
8870
- this.locale && (x = (0, o.getBestPattern)(b, this.locale));
8990
+ if (y.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
8991
+ var x = y;
8992
+ this.locale && (x = (0, o.getBestPattern)(y, this.locale));
8871
8993
  var g = {
8872
8994
  type: r.SKELETON_TYPE.dateTime,
8873
8995
  pattern: x,
@@ -8897,38 +9019,38 @@ var L, R, z, et, B, tt, nt, V = f((() => {
8897
9019
  case `plural`:
8898
9020
  case `selectordinal`:
8899
9021
  case `select`:
8900
- var C = this.clonePosition();
8901
- if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(C, t.__assign({}, C)));
9022
+ var S = this.clonePosition();
9023
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(S, t.__assign({}, S)));
8902
9024
  this.bumpSpace();
8903
- var w = this.parseIdentifierIfPossible(), T = 0;
8904
- if (d !== `select` && w.value === `offset`) {
9025
+ var C = this.parseIdentifierIfPossible(), w = 0;
9026
+ if (d !== `select` && C.value === `offset`) {
8905
9027
  if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
8906
9028
  this.bumpSpace();
8907
9029
  var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
8908
9030
  if (h.err) return h;
8909
- this.bumpSpace(), w = this.parseIdentifierIfPossible(), T = h.val;
9031
+ this.bumpSpace(), C = this.parseIdentifierIfPossible(), w = h.val;
8910
9032
  }
8911
- var E = this.tryParsePluralOrSelectOptions(e, d, i, w);
8912
- if (E.err) return E;
9033
+ var T = this.tryParsePluralOrSelectOptions(e, d, i, C);
9034
+ if (T.err) return T;
8913
9035
  var _ = this.tryParseArgumentClose(c);
8914
9036
  if (_.err) return _;
8915
- var D = l(c, this.clonePosition());
9037
+ var re = l(c, this.clonePosition());
8916
9038
  return d === `select` ? {
8917
9039
  val: {
8918
9040
  type: r.TYPE.select,
8919
9041
  value: s,
8920
- options: ee(E.val),
8921
- location: D
9042
+ options: b(T.val),
9043
+ location: re
8922
9044
  },
8923
9045
  err: null
8924
9046
  } : {
8925
9047
  val: {
8926
9048
  type: r.TYPE.plural,
8927
9049
  value: s,
8928
- options: ee(E.val),
8929
- offset: T,
9050
+ options: b(T.val),
9051
+ offset: w,
8930
9052
  pluralType: d === `plural` ? `cardinal` : `ordinal`,
8931
- location: D
9053
+ location: re
8932
9054
  },
8933
9055
  err: null
8934
9056
  };
@@ -9052,7 +9174,7 @@ var L, R, z, et, B, tt, nt, V = f((() => {
9052
9174
  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);
9053
9175
  }
9054
9176
  }, e.prototype.bumpIf = function(e) {
9055
- if (y(this.message, e, this.offset())) {
9177
+ if (ee(this.message, e, this.offset())) {
9056
9178
  for (var t = 0; t < e.length; t++) this.bump();
9057
9179
  return !0;
9058
9180
  }
@@ -9069,31 +9191,31 @@ var L, R, z, et, B, tt, nt, V = f((() => {
9069
9191
  if (this.bump(), this.isEOF()) break;
9070
9192
  }
9071
9193
  }, e.prototype.bumpSpace = function() {
9072
- for (; !this.isEOF() && k(this.char());) this.bump();
9194
+ for (; !this.isEOF() && ie(this.char());) this.bump();
9073
9195
  }, e.prototype.peek = function() {
9074
9196
  if (this.isEOF()) return null;
9075
9197
  var e = this.char(), t = this.offset();
9076
9198
  return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
9077
9199
  }, e;
9078
9200
  }();
9079
- function E(e) {
9201
+ function T(e) {
9080
9202
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
9081
9203
  }
9082
- function D(e) {
9083
- return E(e) || e === 47;
9204
+ function re(e) {
9205
+ return T(e) || e === 47;
9084
9206
  }
9085
- function O(e) {
9207
+ function E(e) {
9086
9208
  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;
9087
9209
  }
9088
- function k(e) {
9210
+ function ie(e) {
9089
9211
  return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
9090
9212
  }
9091
- function A(e) {
9213
+ function D(e) {
9092
9214
  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;
9093
9215
  }
9094
- })), ft = p(((e) => {
9216
+ })), bt = p(((e) => {
9095
9217
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
9096
- var t = (V(), g(P)), n = H();
9218
+ var t = (R(), g(M)), n = z();
9097
9219
  function r(e) {
9098
9220
  return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
9099
9221
  return t[n] = r(e[n]), t;
@@ -9150,9 +9272,9 @@ var L, R, z, et, B, tt, nt, V = f((() => {
9150
9272
  error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
9151
9273
  };
9152
9274
  }
9153
- })), pt = p(((e) => {
9275
+ })), xt = p(((e) => {
9154
9276
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
9155
- var t = (V(), g(P)), n = rt(), r = dt(), i = H();
9277
+ var t = (R(), g(M)), n = dt(), r = yt(), i = z();
9156
9278
  function a(e) {
9157
9279
  e.forEach(function(e) {
9158
9280
  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);
@@ -9171,17 +9293,17 @@ var L, R, z, et, B, tt, nt, V = f((() => {
9171
9293
  }
9172
9294
  return i?.captureLocation || a(o.val), o.val;
9173
9295
  }
9174
- t.__exportStar(H(), e), e._Parser = r.Parser;
9175
- var s = ft();
9296
+ t.__exportStar(z(), e), e._Parser = r.Parser;
9297
+ var s = bt();
9176
9298
  Object.defineProperty(e, `isStructurallySame`, {
9177
9299
  enumerable: !0,
9178
9300
  get: function() {
9179
9301
  return s.isStructurallySame;
9180
9302
  }
9181
9303
  });
9182
- })), mt = p(((e) => {
9304
+ })), St = p(((e) => {
9183
9305
  Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
9184
- var t = (V(), g(P)), n = H();
9306
+ var t = (R(), g(M)), n = z();
9185
9307
  function r(e) {
9186
9308
  return i(e, !1);
9187
9309
  }
@@ -9244,10 +9366,10 @@ var L, R, z, et, B, tt, nt, V = f((() => {
9244
9366
  ].join(`,`)}}`;
9245
9367
  }
9246
9368
  }));
9247
- pt();
9248
- H();
9249
- mt();
9250
- const gt = [
9369
+ xt();
9370
+ z();
9371
+ St();
9372
+ const wt = [
9251
9373
  `singular`,
9252
9374
  `plural`,
9253
9375
  `dual`,
@@ -9258,11 +9380,11 @@ const gt = [
9258
9380
  `many`,
9259
9381
  `other`
9260
9382
  ];
9261
- function _t(e) {
9262
- return gt.includes(e);
9383
+ function Tt(e) {
9384
+ return wt.includes(e);
9263
9385
  }
9264
- function vt(e, t = gt, n = [`en`]) {
9265
- let r = Te(n).select(e), i = Math.abs(e);
9386
+ function Et(e, t = wt, n = [`en`]) {
9387
+ let r = Me(n).select(e), i = Math.abs(e);
9266
9388
  if (i === 0 && t.includes(`zero`)) return `zero`;
9267
9389
  if (i === 1) {
9268
9390
  if (t.includes(`singular`)) return `singular`;
@@ -9275,20 +9397,20 @@ function vt(e, t = gt, n = [`en`]) {
9275
9397
  }
9276
9398
  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` : ``;
9277
9399
  }
9278
- const yt = {
9400
+ const Dt = {
9279
9401
  variable: `v`,
9280
9402
  number: `n`,
9281
9403
  datetime: `d`,
9282
9404
  currency: `c`,
9283
9405
  "relative-time": `rt`
9284
9406
  };
9285
- function bt(e) {
9286
- return yt[e];
9407
+ function Ot(e) {
9408
+ return Dt[e];
9287
9409
  }
9288
- const K = `_gt_`;
9289
- RegExp(`^${K}\\d+$`);
9290
- RegExp(`^${K}$`);
9291
- function Nt(e, n = 0) {
9410
+ const U = `_gt_`;
9411
+ RegExp(`^${U}\\d+$`);
9412
+ RegExp(`^${U}$`);
9413
+ function Vt(e, n = 0) {
9292
9414
  let r = n, a = (e) => {
9293
9415
  let { type: t, props: n } = e;
9294
9416
  r += 1;
@@ -9302,11 +9424,11 @@ function Nt(e, n = 0) {
9302
9424
  if (a) {
9303
9425
  let e = a.split(`-`);
9304
9426
  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`) {
9305
- let e = Object.entries(n).reduce((e, [t, n]) => (_t(t) && (e[t] = Nt(n, r)), e), {});
9427
+ let e = Object.entries(n).reduce((e, [t, n]) => (Tt(t) && (e[t] = Vt(n, r)), e), {});
9306
9428
  Object.keys(e).length && (i.branches = e);
9307
9429
  }
9308
9430
  if (e[0] === `branch`) {
9309
- 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] = Nt(n, r), e), {});
9431
+ 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), {});
9310
9432
  Object.keys(s).length && (i.branches = s);
9311
9433
  }
9312
9434
  i.transformation = e[0];
@@ -9318,50 +9440,97 @@ function Nt(e, n = 0) {
9318
9440
  ...n,
9319
9441
  "data-_gt": r
9320
9442
  };
9321
- return n.children && !r.variableType && (i.children = c(n.children)), e.type === React.Fragment && (i[`data-_gt`].transformation = `fragment`), React.cloneElement(e, i);
9443
+ return n.children && !r.variableType && (i.children = c(n.children)), e.type === t$1.Fragment && (i[`data-_gt`].transformation = `fragment`), t$1.cloneElement(e, i);
9322
9444
  }
9323
9445
  function s(e) {
9324
9446
  return isValidElement(e) ? o(e) : e;
9325
9447
  }
9326
9448
  function c(e) {
9327
- return Array.isArray(e) ? React.Children.map(e, s) : s(e);
9449
+ return Array.isArray(e) ? t$1.Children.map(e, s) : s(e);
9328
9450
  }
9329
9451
  return c(e);
9330
9452
  }
9331
- const q = `@generaltranslation/react-core`;
9332
- `${q}`, `${q}`, `${q}`, `${q}`, `${q}`, `${q}`;
9333
- `${q}`, `${q}`, `${q}`, `${q}`;
9334
- const Lt = `${q} Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.`;
9335
- function Rt(e) {
9336
- return Bt(e, 0);
9453
+ const Ht = `@generaltranslation/react-core`;
9454
+ function W(e) {
9455
+ return S({
9456
+ source: Ht,
9457
+ ...e
9458
+ });
9459
+ }
9460
+ W({
9461
+ severity: `Error`,
9462
+ whatHappened: `Runtime translation needs a project ID`,
9463
+ fix: `Add projectId to your <GTProvider> configuration or set GT_PROJECT_ID in your environment`,
9464
+ docsUrl: `https://generaltranslation.com/dashboard`
9465
+ }), W({
9466
+ severity: `Error`,
9467
+ whatHappened: `Production environments cannot use a development API key`,
9468
+ fix: `Replace it with a production API key before deploying`
9469
+ }), W({
9470
+ severity: `Error`,
9471
+ whatHappened: `The API key is available to client-side production code`,
9472
+ fix: `Move translation credentials to a server-only environment before deploying`
9473
+ }), W({
9474
+ severity: `Error`,
9475
+ whatHappened: `Runtime translation is not configured`,
9476
+ fix: `Add projectId and devApiKey to your environment, or pass them to <GTProvider> directly`
9477
+ }), W({
9478
+ severity: `Error`,
9479
+ whatHappened: `Runtime translations could not be loaded`,
9480
+ wayOut: `Source content will render as a fallback`,
9481
+ fix: `Check your runtime translation configuration and try again`
9482
+ }), W({
9483
+ severity: `Error`,
9484
+ whatHappened: `Runtime translation could not be completed`
9485
+ });
9486
+ W({
9487
+ severity: `Warning`,
9488
+ whatHappened: `Runtime translation needs a project ID`,
9489
+ fix: `Add projectId to <GTProvider> or set GT_PROJECT_ID in your environment`,
9490
+ docsUrl: `https://generaltranslation.com/dashboard`
9491
+ }), W({
9492
+ severity: `Warning`,
9493
+ whatHappened: `Runtime translation needs a development API key`,
9494
+ fix: `Find your development API key at generaltranslation.com/dashboard, or set runtimeUrl to an empty string to disable runtime translation`
9495
+ }), W({
9496
+ severity: `Warning`,
9497
+ whatHappened: `Runtime translation timed out`
9498
+ }), W({
9499
+ severity: `Warning`,
9500
+ whatHappened: `No dictionary was found`,
9501
+ fix: `Pass a dictionary to <GTProvider> or configure a dictionary loader before rendering translations`
9502
+ });
9503
+ const Kt = `${Ht} Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.`;
9504
+ function qt(e) {
9505
+ return K(e, 0);
9337
9506
  }
9338
- function zt(e, t) {
9339
- let { type: n, props: i } = e, a = Vt(n);
9507
+ function Jt(e, t) {
9508
+ let { type: n, props: i } = e, a = Yt(n);
9340
9509
  if (typeof i != `object` || !i) return e;
9341
9510
  if (a) {
9342
9511
  let { componentType: n, injectionType: o } = a;
9343
9512
  if (n === `variable`) return e;
9344
- if (n === `branch`) return cloneElement(e, { ...Object.entries(i).reduce((e, [n, r]) => (n !== `branch` && !n.startsWith(`data-`) ? e[n] = J(r, t) : e[n] = r, e), {}) });
9345
- if (n === `plural`) return cloneElement(e, { ...Object.entries(i).reduce((e, [n, r]) => (_t(n) || n === `children` ? e[n] = J(r, t) : e[n] = r, e), {}) });
9513
+ if (n === `branch`) return cloneElement(e, { ...Object.entries(i).reduce((e, [n, r]) => (n !== `branch` && !n.startsWith(`data-`) ? e[n] = G(r, t) : e[n] = r, e), {}) });
9514
+ if (n === `plural`) return cloneElement(e, { ...Object.entries(i).reduce((e, [n, r]) => (Tt(n) || n === `children` ? e[n] = G(r, t) : e[n] = r, e), {}) });
9346
9515
  if (n === `derive`) return cloneElement(e, {
9347
9516
  ...i,
9348
- ...`children` in i && { children: Bt(i.children, t + 1) }
9517
+ ...`children` in i && { children: K(i.children, t + 1) }
9349
9518
  });
9350
- if (n === `translate` && o === `automatic` && t > 0) return `children` in i ? Bt(i.children, t) : void 0;
9351
- n === `translate` && o === `automatic` && console.warn(Lt);
9519
+ if (n === `translate` && o === `automatic` && t > 0) return `children` in i ? K(i.children, t) : void 0;
9520
+ n === `translate` && o === `automatic` && console.warn(Kt);
9352
9521
  }
9353
9522
  return cloneElement(e, {
9354
9523
  ...i,
9355
- ...`children` in i && { children: Bt(i.children, t) }
9524
+ ...`children` in i && { children: K(i.children, t) }
9356
9525
  });
9357
9526
  }
9358
- function J(e, t) {
9359
- return isValidElement(e) ? zt(e, t) : e;
9527
+ function G(e, t) {
9528
+ return isValidElement(e) ? Jt(e, t) : e;
9360
9529
  }
9361
- function Bt(e, t) {
9362
- return Array.isArray(e) ? Children.map(e, (e) => J(e, t)) : J(e, t);
9530
+ function K(e, t) {
9531
+ return Array.isArray(e) ? Children.map(e, (e) => G(e, t)) : G(e, t);
9363
9532
  }
9364
- function Vt(e) {
9533
+ function Yt(e) {
9365
9534
  let t = typeof e == `function` && `_gtt` in e ? e._gtt : void 0;
9366
9535
  if (t == null || typeof t != `string`) return;
9367
9536
  let n = t.split(`-`);
@@ -9370,27 +9539,27 @@ function Vt(e) {
9370
9539
  injectionType: n[1] === `automatic` || n[2] === `automatic` ? `automatic` : `manual`
9371
9540
  };
9372
9541
  }
9373
- const Ht = {
9542
+ const Xt = {
9374
9543
  variable: `value`,
9375
9544
  number: `n`,
9376
9545
  datetime: `date`,
9377
9546
  currency: `cost`,
9378
9547
  "relative-time": `time`
9379
9548
  };
9380
- function Ut(e = {}, t) {
9381
- return typeof e.name == `string` ? e.name : `_gt_${Ht[t] || `value`}_${e[`data-_gt`]?.id}`;
9549
+ function Zt(e = {}, t) {
9550
+ return typeof e.name == `string` ? e.name : `_gt_${Xt[t] || `value`}_${e[`data-_gt`]?.id}`;
9382
9551
  }
9383
- function Wt(e) {
9384
- return React.isValidElement(e);
9552
+ function Qt(e) {
9553
+ return t$1.isValidElement(e);
9385
9554
  }
9386
- const Gt = {
9555
+ const $t = {
9387
9556
  pl: `placeholder`,
9388
9557
  ti: `title`,
9389
9558
  alt: `alt`,
9390
9559
  arl: `aria-label`,
9391
9560
  arb: `aria-labelledby`,
9392
9561
  ard: `aria-describedby`
9393
- }, Kt = (e) => {
9562
+ }, en = (e) => {
9394
9563
  if (!e) return ``;
9395
9564
  let { type: t, props: n } = e;
9396
9565
  if (t && typeof t == `function`) {
@@ -9398,15 +9567,15 @@ const Gt = {
9398
9567
  if (`name` in t && typeof t.name == `string` && t.name) return t.name;
9399
9568
  }
9400
9569
  return t && typeof t == `string` ? t : n.href ? `a` : n[`data-_gt`]?.id ? `C${n[`data-_gt`].id}` : `function`;
9401
- }, qt = (e, t, n) => {
9402
- let r = Object.entries(Gt).reduce((e, [n, r]) => {
9570
+ }, tn = (e, t, n) => {
9571
+ let r = Object.entries($t).reduce((e, [n, r]) => {
9403
9572
  let i = t[r];
9404
9573
  return typeof i == `string` && (e[n] = i), e;
9405
9574
  }, {});
9406
9575
  if (e === `plural` && n) {
9407
9576
  let e = {};
9408
9577
  Object.entries(n).forEach(([t, n]) => {
9409
- e[t] = Y(n);
9578
+ e[t] = q(n);
9410
9579
  }), r = {
9411
9580
  ...r,
9412
9581
  b: e,
@@ -9416,7 +9585,7 @@ const Gt = {
9416
9585
  if (e === `branch` && n) {
9417
9586
  let e = {};
9418
9587
  Object.entries(n).forEach(([t, n]) => {
9419
- e[t] = Y(n);
9588
+ e[t] = q(n);
9420
9589
  }), r = {
9421
9590
  ...r,
9422
9591
  b: e,
@@ -9424,27 +9593,27 @@ const Gt = {
9424
9593
  };
9425
9594
  }
9426
9595
  return Object.keys(r).length ? r : void 0;
9427
- }, Jt = (e) => {
9428
- let { props: t } = e, n = { t: Kt(e) };
9596
+ }, nn = (e) => {
9597
+ let { props: t } = e, n = { t: en(e) };
9429
9598
  if (t[`data-_gt`]) {
9430
9599
  let e = t[`data-_gt`], r = e.transformation;
9431
9600
  if (r === `variable`) {
9432
- let n = e.variableType || `variable`, r = Ut(t, n), i = bt(n);
9601
+ let n = e.variableType || `variable`, r = Zt(t, n), i = Ot(n);
9433
9602
  return {
9434
9603
  i: e.id,
9435
9604
  k: r,
9436
9605
  v: i
9437
9606
  };
9438
9607
  }
9439
- n.i = e.id, n.d = qt(r, t, e.branches);
9440
- let i = Object.entries(Gt).reduce((e, [n, r]) => {
9608
+ n.i = e.id, n.d = tn(r, t, e.branches);
9609
+ let i = Object.entries($t).reduce((e, [n, r]) => {
9441
9610
  let i = t[r];
9442
9611
  return typeof i == `string` && (e[n] = i), e;
9443
9612
  }, {});
9444
9613
  if (r === `plural` && e.branches) {
9445
9614
  let t = {};
9446
9615
  Object.entries(e.branches).forEach(([e, n]) => {
9447
- t[e] = Y(n);
9616
+ t[e] = q(n);
9448
9617
  }), i = {
9449
9618
  ...i,
9450
9619
  b: t,
@@ -9454,7 +9623,7 @@ const Gt = {
9454
9623
  if (r === `branch` && e.branches) {
9455
9624
  let t = {};
9456
9625
  Object.entries(e.branches).forEach(([e, n]) => {
9457
- t[e] = Y(n);
9626
+ t[e] = q(n);
9458
9627
  }), i = {
9459
9628
  ...i,
9460
9629
  b: t,
@@ -9463,23 +9632,23 @@ const Gt = {
9463
9632
  }
9464
9633
  n.d = Object.keys(i).length ? i : void 0;
9465
9634
  }
9466
- return t.children && (n.c = Y(t.children)), n;
9467
- }, Yt = (e) => Wt(e) ? Jt(e) : typeof e == `number` ? e.toString() : e;
9468
- function Y(e) {
9469
- return Array.isArray(e) ? e.map(Yt) : Yt(e);
9635
+ return t.children && (n.c = q(t.children)), n;
9636
+ }, rn = (e) => Qt(e) ? nn(e) : typeof e == `number` ? e.toString() : e;
9637
+ function q(e) {
9638
+ return Array.isArray(e) ? e.map(rn) : rn(e);
9470
9639
  }
9471
- function Xt(e, t, n) {
9640
+ function J(e, t, n) {
9472
9641
  let r = ``, i = null;
9473
- return typeof e == `number` && !i && n && (r = vt(e, Object.keys(n).filter(_t), t)), r && !i && (i = n[r]), i;
9642
+ return typeof e == `number` && !i && n && (r = Et(e, Object.keys(n).filter(Tt), t)), r && !i && (i = n[r]), i;
9474
9643
  }
9475
- function $t(e) {
9644
+ function on(e) {
9476
9645
  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`;
9477
9646
  }
9478
- function en(e) {
9647
+ function sn(e) {
9479
9648
  let t = e[`data-_gt`]?.variableType || `variable`;
9480
9649
  return {
9481
- variableName: Ut(e, t),
9482
- variableType: bt(t),
9650
+ variableName: Zt(e, t),
9651
+ variableType: Ot(t),
9483
9652
  injectionType: e[`data-_gt`]?.injectionType || `manual`,
9484
9653
  variableValue: (() => {
9485
9654
  if (e.value !== void 0) return e.value;
@@ -9498,14 +9667,14 @@ function en(e) {
9498
9667
  })()
9499
9668
  };
9500
9669
  }
9501
- function nn(e) {
9670
+ function ln(e) {
9502
9671
  return e && e.props && e.props[`data-_gt`] ? e.props[`data-_gt`] : null;
9503
9672
  }
9504
9673
  function Z({ children: e, defaultLocale: n = `en`, renderVariable: r }) {
9505
9674
  let i = (e) => {
9506
- let i = nn(e);
9507
- if ($t(e.props)) {
9508
- let { variableType: t, variableValue: i, variableOptions: a, injectionType: o } = en(e.props);
9675
+ let i = ln(e);
9676
+ if (on(e.props)) {
9677
+ let { variableType: t, variableValue: i, variableOptions: a, injectionType: o } = sn(e.props);
9509
9678
  return r({
9510
9679
  variableType: t,
9511
9680
  variableValue: i,
@@ -9517,30 +9686,30 @@ function Z({ children: e, defaultLocale: n = `en`, renderVariable: r }) {
9517
9686
  if (i?.transformation === `plural`) {
9518
9687
  let t = i.branches || {};
9519
9688
  if (typeof e.props.n != `number`) return e.props.children == null ? null : o(e.props.children);
9520
- let r = Xt(e.props.n, [n], t);
9689
+ let r = J(e.props.n, [n], t);
9521
9690
  return o(r === null ? e.props.children : r);
9522
9691
  }
9523
9692
  if (i?.transformation === `branch`) {
9524
9693
  let { children: t, branch: n } = e.props, r = i.branches || {}, a = n == null || n === `` ? void 0 : n.toString();
9525
9694
  return o(a && r[a] !== void 0 ? r[a] : t);
9526
9695
  }
9527
- return i?.transformation === `fragment` ? React.createElement(React.Fragment, {
9696
+ return i?.transformation === `fragment` ? t$1.createElement(t$1.Fragment, {
9528
9697
  key: e.props.key,
9529
9698
  children: o(e.props.children)
9530
- }) : e.props.children ? React.cloneElement(e, {
9699
+ }) : e.props.children ? t$1.cloneElement(e, {
9531
9700
  ...e.props,
9532
9701
  "data-_gt": void 0,
9533
9702
  children: o(e.props.children)
9534
- }) : React.cloneElement(e, {
9703
+ }) : t$1.cloneElement(e, {
9535
9704
  ...e.props,
9536
9705
  "data-_gt": void 0
9537
9706
  });
9538
- }, a = (e) => React.isValidElement(e) ? i(e) : e, o = (e) => Array.isArray(e) ? React.Children.map(e, a) : a(e);
9707
+ }, a = (e) => t$1.isValidElement(e) ? i(e) : e, o = (e) => Array.isArray(e) ? t$1.Children.map(e, a) : a(e);
9539
9708
  return o(e);
9540
9709
  }
9541
- function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVariable: i }) {
9710
+ function un({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVariable: i }) {
9542
9711
  let { props: a } = e, o = a[`data-_gt`], s = o?.transformation, c = n.d, l = {};
9543
- if (c && Object.entries(Gt).forEach(([e, t]) => {
9712
+ if (c && Object.entries($t).forEach(([e, t]) => {
9544
9713
  c[e] && (l[t] = c[e]);
9545
9714
  }), s === `plural`) {
9546
9715
  let t = e.props.n;
@@ -9549,7 +9718,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
9549
9718
  defaultLocale: r[0],
9550
9719
  renderVariable: i
9551
9720
  });
9552
- let a = Xt(t, r, o.branches || {}), s = a === null ? e.props.children : a, c = Xt(t, r, n.d?.b || {});
9721
+ let a = J(t, r, o.branches || {}), s = a === null ? e.props.children : a, c = J(t, r, n.d?.b || {});
9553
9722
  return Q({
9554
9723
  source: s,
9555
9724
  target: c === null ? n.c : c,
@@ -9566,7 +9735,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
9566
9735
  renderVariable: i
9567
9736
  });
9568
9737
  }
9569
- return s === `fragment` && n.c ? React.createElement(React.Fragment, {
9738
+ return s === `fragment` && n.c ? t$1.createElement(t$1.Fragment, {
9570
9739
  key: e.props.key,
9571
9740
  children: Q({
9572
9741
  source: a.children,
@@ -9574,7 +9743,7 @@ function rn({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVar
9574
9743
  locales: r,
9575
9744
  renderVariable: i
9576
9745
  })
9577
- }) : a?.children && n?.c ? React.cloneElement(e, {
9746
+ }) : a?.children && n?.c ? t$1.cloneElement(e, {
9578
9747
  ...a,
9579
9748
  ...l,
9580
9749
  "data-_gt": void 0,
@@ -9599,18 +9768,18 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
9599
9768
  if (typeof n == `string`) return n;
9600
9769
  if (Array.isArray(n) && !Array.isArray(e) && e && (e = [e]), Array.isArray(e) && Array.isArray(n)) {
9601
9770
  let a = {}, o = {}, c = {}, l = e.filter((e) => {
9602
- if (React.isValidElement(e)) if ($t(e.props)) {
9603
- let { variableName: t, variableValue: n, variableOptions: r, injectionType: i } = en(e.props);
9771
+ if (t$1.isValidElement(e)) if (on(e.props)) {
9772
+ let { variableName: t, variableValue: n, variableOptions: r, injectionType: i } = sn(e.props);
9604
9773
  a[t] = n, o[t] = r, c[t] = i;
9605
9774
  } else return !0;
9606
9775
  return !1;
9607
9776
  }), u = (e) => l.find((t) => {
9608
- let n = nn(t);
9777
+ let n = ln(t);
9609
9778
  return n?.id === void 0 ? !1 : n.id === e.i;
9610
9779
  }) || l.shift();
9611
9780
  return n.map((e, n) => {
9612
- if (typeof e == `string`) return jsx(React.Fragment, { children: e }, `string_${n}`);
9613
- if (C(e)) return jsx(React.Fragment, { children: i({
9781
+ if (typeof e == `string`) return jsx(t$1.Fragment, { children: e }, `string_${n}`);
9782
+ if (E(e)) return jsx(t$1.Fragment, { children: i({
9614
9783
  variableType: e.v || `v`,
9615
9784
  variableValue: a[e.k],
9616
9785
  variableOptions: o[e.k],
@@ -9618,7 +9787,7 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
9618
9787
  injectionType: c[e.k] || `manual`
9619
9788
  }) }, `var_${n}`);
9620
9789
  let l = u(e);
9621
- return l ? jsx(React.Fragment, { children: rn({
9790
+ return l ? jsx(t$1.Fragment, { children: un({
9622
9791
  sourceElement: l,
9623
9792
  targetElement: e,
9624
9793
  locales: r,
@@ -9627,16 +9796,16 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
9627
9796
  });
9628
9797
  }
9629
9798
  if (n && typeof n == `object` && !Array.isArray(n)) {
9630
- let a = C(n) ? `variable` : `element`;
9631
- if (React.isValidElement(e)) {
9632
- if (a === `element`) return rn({
9799
+ let a = E(n) ? `variable` : `element`;
9800
+ if (t$1.isValidElement(e)) {
9801
+ if (a === `element`) return un({
9633
9802
  sourceElement: e,
9634
9803
  targetElement: n,
9635
9804
  locales: r,
9636
9805
  renderVariable: i
9637
9806
  });
9638
- if ($t(e.props)) {
9639
- let { variableValue: t, variableOptions: n, variableType: a, injectionType: o } = en(e.props);
9807
+ if (on(e.props)) {
9808
+ let { variableValue: t, variableOptions: n, variableType: a, injectionType: o } = sn(e.props);
9640
9809
  return i({
9641
9810
  variableType: a,
9642
9811
  variableValue: t,
@@ -9653,33 +9822,32 @@ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
9653
9822
  renderVariable: i
9654
9823
  });
9655
9824
  }
9656
- const sn = `generaltranslation.locale`;
9825
+ const pn = `generaltranslation.locale`;
9657
9826
  e.use;
9658
- function Hn({ children: e }) {
9827
+ function Jn({ children: e }) {
9659
9828
  return e;
9660
9829
  }
9661
- function Un(e) {
9662
- return Hn(e);
9830
+ function Yn(e) {
9831
+ return Jn(e);
9663
9832
  }
9664
- Hn._gtt = `derive`, Un._gtt = `derive`;
9833
+ Jn._gtt = `derive`, Yn._gtt = `derive`;
9665
9834
  //#endregion
9666
- //#region src/i18n-context/browser-i18n-manager/utils/cookies.ts
9835
+ //#region src/shared/cookies.ts
9667
9836
  /**
9668
- * Minimally parses a cookie value for a given cookie name
9837
+ * Minimally parses a cookie value for a given cookie name.
9669
9838
  * @param cookieName - The name of the cookie
9670
- * @returns The locale from the cookie or undefined if not found or invalid
9839
+ * @returns The cookie value, or undefined when it is not found
9671
9840
  */
9672
- function getCookieValue({ cookieName }) {
9841
+ function getCookieValue(cookieName) {
9673
9842
  if (typeof document === "undefined") return void 0;
9674
9843
  return document.cookie.split("; ").find((row) => row.startsWith(`${cookieName}=`))?.split("=")[1];
9675
9844
  }
9676
9845
  /**
9677
- * Sets a cookie value for a given cookie name
9846
+ * Sets a cookie value for a given cookie name.
9678
9847
  * @param cookieName - The name of the cookie
9679
9848
  * @param value - The value to set
9680
- * @returns The value that was set
9681
9849
  */
9682
- function setCookieValue({ cookieName, value }) {
9850
+ function setCookieValue(cookieName, value) {
9683
9851
  if (typeof document === "undefined") return;
9684
9852
  document.cookie = `${cookieName}=${value};path=/`;
9685
9853
  }
@@ -9693,7 +9861,7 @@ function setCookieValue({ cookieName, value }) {
9693
9861
  * @returns The determined locale
9694
9862
  *
9695
9863
  */
9696
- function determineLocale({ defaultLocale, locales, customMapping, localeCookieName = sn, getLocale }) {
9864
+ function determineLocale({ defaultLocale, locales, customMapping, localeCookieName = pn, getLocale }) {
9697
9865
  const localeConfig = {
9698
9866
  defaultLocale,
9699
9867
  locales,
@@ -9713,7 +9881,7 @@ function determineLocale({ defaultLocale, locales, customMapping, localeCookieNa
9713
9881
  return determinedLocale;
9714
9882
  }
9715
9883
  const candidates = [];
9716
- const cookieLocale = getCookieValue({ cookieName: localeCookieName });
9884
+ const cookieLocale = getCookieValue(localeCookieName);
9717
9885
  if (cookieLocale) candidates.push(cookieLocale);
9718
9886
  const navigatorLocales = navigator?.languages || [];
9719
9887
  candidates.push(...navigatorLocales);
@@ -9728,7 +9896,7 @@ var BrowserConditionStore = class {
9728
9896
  /**
9729
9897
  * @param {BrowserConditionStoreConstructorParams} params - The configuration for the BrowserConditionStore
9730
9898
  */
9731
- constructor({ getLocale, localeCookieName = sn, ...localeConfig } = {}) {
9899
+ constructor({ getLocale, localeCookieName = pn, ...localeConfig } = {}) {
9732
9900
  this.localeConfig = localeConfig;
9733
9901
  this.customGetLocale = getLocale;
9734
9902
  this.localeCookieName = localeCookieName;
@@ -9744,10 +9912,7 @@ var BrowserConditionStore = class {
9744
9912
  });
9745
9913
  }
9746
9914
  setLocale(locale) {
9747
- setCookieValue({
9748
- cookieName: this.localeCookieName,
9749
- value: locale
9750
- });
9915
+ setCookieValue(this.localeCookieName, locale);
9751
9916
  }
9752
9917
  };
9753
9918
  //#endregion
@@ -10161,7 +10326,7 @@ async function bootstrap(params) {
10161
10326
  */
10162
10327
  function Branch({ children, branch, ...branches }) {
10163
10328
  const branchKey = branch?.toString();
10164
- if (typeof branch === "string" && branch.startsWith("data-")) branch = void 0;
10329
+ if (branchKey?.startsWith("data-")) return children;
10165
10330
  return branchKey && typeof branches[branchKey] !== "undefined" ? branches[branchKey] : children;
10166
10331
  }
10167
10332
  /**
@@ -10188,7 +10353,7 @@ function Plural({ children, n, locales: localesProp, ...branches }) {
10188
10353
  getDefaultLocale()
10189
10354
  ];
10190
10355
  if (typeof n !== "number") return children;
10191
- const branch = Xt(n, locales, branches);
10356
+ const branch = J(n, locales, branches);
10192
10357
  return branch != null ? branch : children;
10193
10358
  }
10194
10359
  /**
@@ -10221,8 +10386,8 @@ function Derive({ children }) {
10221
10386
  /**
10222
10387
  * Equivalent to the `<Derive>` component, but used for auto insertion.
10223
10388
  */
10224
- function GtInternalDerive({ children }) {
10225
- return children;
10389
+ function GtInternalDerive(props) {
10390
+ return Derive(props);
10226
10391
  }
10227
10392
  /** @internal _gtt - The GT transformation and injection identifier for the component. */
10228
10393
  Derive._gtt = "derive";
@@ -10272,7 +10437,7 @@ const t = (messageOrStrings, ...values) => {
10272
10437
  */
10273
10438
  function handleTaggedTemplateLiteralTranslation(messageOrStrings, values) {
10274
10439
  const locale = getLocale();
10275
- const translatedInterpolatedTemplate = resolveTranslationSync(locale, interpolateTemplateLiteral(messageOrStrings, values));
10440
+ const translatedInterpolatedTemplate = resolveTranslationSync(locale, messageOrStrings.map((string, index) => string + (values[index] ?? "")).join(""));
10276
10441
  if (translatedInterpolatedTemplate) return translatedInterpolatedTemplate;
10277
10442
  const { message, variables } = extractInterpolatableValues(messageOrStrings, values);
10278
10443
  return resolveTranslationSyncWithFallback(locale, message, variables);
@@ -10301,17 +10466,6 @@ function extractInterpolatableValues(strings, values) {
10301
10466
  variables
10302
10467
  };
10303
10468
  }
10304
- /**
10305
- * Interpolate a template literal
10306
- * @param message - The message to interpolate.
10307
- * @param variables - The variables to interpolate.
10308
- * @returns The interpolated message.
10309
- */
10310
- function interpolateTemplateLiteral(strings, values) {
10311
- return strings.map((string, index) => {
10312
- return string + (values[index] ?? "");
10313
- }).join("");
10314
- }
10315
10469
  //#endregion
10316
10470
  //#region src/i18n-context/functions/translation/GtInternalRuntimeTranslateString.ts
10317
10471
  /**
@@ -10362,27 +10516,18 @@ function Num(props) {
10362
10516
  GtInternalNum._gtt = "variable-number-automatic";
10363
10517
  Num._gtt = "variable-number";
10364
10518
  //#endregion
10365
- //#region src/i18n-context/functions/variables/utils/computeVar.ts
10366
- /**
10367
- * Internal implementation of Var component for standardization
10368
- * @internal
10369
- */
10370
- function computeVar({ children }) {
10371
- return children;
10372
- }
10373
- //#endregion
10374
10519
  //#region src/i18n-context/functions/variables/GtInternalVar.tsx
10375
10520
  /**
10376
10521
  * Equivalent to the `<Var>` component, but used for auto insertion
10377
10522
  */
10378
10523
  function GtInternalVar({ children }) {
10379
- return computeVar({ children });
10524
+ return children;
10380
10525
  }
10381
10526
  /**
10382
10527
  * User facing version of the Var component
10383
10528
  */
10384
10529
  function Var({ children }) {
10385
- return computeVar({ children });
10530
+ return children;
10386
10531
  }
10387
10532
  /** @internal _gtt - The GT transformation and injection identifier for the component. */
10388
10533
  Var._gtt = "variable-variable";
@@ -10442,6 +10587,7 @@ GtInternalDateTime._gtt = "variable-datetime-automatic";
10442
10587
  DateTime._gtt = "variable-datetime";
10443
10588
  //#endregion
10444
10589
  //#region src/i18n-context/functions/variables/utils/renderVariable.tsx
10590
+ const getStringOrNumberValue = (value) => typeof value === "string" || typeof value === "number" || value == null ? value : void 0;
10445
10591
  /**
10446
10592
  * Custom override for the renderVariable function
10447
10593
  * to use the GtInternal components instead of the regular components
@@ -10458,7 +10604,7 @@ const renderVariable = ({ variableType, variableValue, variableOptions, injectio
10458
10604
  switch (variableType) {
10459
10605
  case "n": return /* @__PURE__ */ jsx(injectionType === "automatic" ? Num : GtInternalNum, {
10460
10606
  options: variableOptions,
10461
- children: typeof variableValue === "string" || typeof variableValue === "number" ? variableValue : variableValue == null ? variableValue : void 0
10607
+ children: getStringOrNumberValue(variableValue)
10462
10608
  });
10463
10609
  case "d": return /* @__PURE__ */ jsx(injectionType === "automatic" ? DateTime : GtInternalDateTime, {
10464
10610
  options: variableOptions,
@@ -10466,11 +10612,11 @@ const renderVariable = ({ variableType, variableValue, variableOptions, injectio
10466
10612
  });
10467
10613
  case "c": return /* @__PURE__ */ jsx(injectionType === "automatic" ? Currency : GtInternalCurrency, {
10468
10614
  options: variableOptions,
10469
- children: typeof variableValue === "string" || typeof variableValue === "number" ? variableValue : variableValue == null ? variableValue : void 0
10615
+ children: getStringOrNumberValue(variableValue)
10470
10616
  });
10471
10617
  default: {
10472
10618
  const renderedValue = variableValue;
10473
- return injectionType === "automatic" ? computeVar({ children: renderedValue }) : /* @__PURE__ */ jsx(Var, { children: renderedValue });
10619
+ return injectionType === "automatic" ? renderedValue : /* @__PURE__ */ jsx(Var, { children: renderedValue });
10474
10620
  }
10475
10621
  }
10476
10622
  };
@@ -10495,10 +10641,29 @@ GtInternalTranslateJsx._gtt = "translate-client-automatic";
10495
10641
  * Implementation for the T component logic
10496
10642
  */
10497
10643
  function useComputeT({ children: sourceChildren, ...params }) {
10498
- const { taggedSourceChildren, sourceJsxChildren, renderSourceChildren, options } = usePrepSourceRender({
10499
- sourceChildren,
10500
- params
10644
+ const taggedSourceChildren = useMemo(() => Vt(qt(sourceChildren)), [sourceChildren]);
10645
+ const sourceJsxChildren = useMemo(() => q(taggedSourceChildren), [taggedSourceChildren]);
10646
+ const renderSourceChildren = () => Z({
10647
+ children: taggedSourceChildren,
10648
+ defaultLocale: getLocale(),
10649
+ renderVariable
10501
10650
  });
10651
+ const options = useMemo(() => ({
10652
+ $format: "JSX",
10653
+ $context: params.context,
10654
+ $id: params.id,
10655
+ $_hash: params._hash,
10656
+ ...params
10657
+ }), [
10658
+ params.format,
10659
+ params.context,
10660
+ params.id,
10661
+ params._hash,
10662
+ params.$format,
10663
+ params.$context,
10664
+ params.$id,
10665
+ params.$_hash
10666
+ ]);
10502
10667
  const targetLocale = getLocale();
10503
10668
  if (!requiresTranslation(getDefaultLocale(), targetLocale)) return renderSourceChildren();
10504
10669
  const targetOptions = {
@@ -10524,44 +10689,6 @@ function useComputeT({ children: sourceChildren, ...params }) {
10524
10689
  return renderSourceChildren();
10525
10690
  }
10526
10691
  /**
10527
- * Returns the tagged source children and the default render function for the source children
10528
- */
10529
- function usePrepSourceRender({ sourceChildren, params }) {
10530
- const taggedSourceChildren = useMemo(() => Nt(Rt(sourceChildren)), [sourceChildren]);
10531
- return {
10532
- taggedSourceChildren,
10533
- sourceJsxChildren: useMemo(() => Y(taggedSourceChildren), [taggedSourceChildren]),
10534
- renderSourceChildren: useCallback(() => {
10535
- return Z({
10536
- children: taggedSourceChildren,
10537
- defaultLocale: getLocale(),
10538
- renderVariable
10539
- });
10540
- }, [taggedSourceChildren]),
10541
- options: useMemo(() => normalizeParameters(params), [
10542
- params.context,
10543
- params.id,
10544
- params._hash,
10545
- params.$format,
10546
- params.$context,
10547
- params.$id,
10548
- params.$_hash
10549
- ])
10550
- };
10551
- }
10552
- /**
10553
- * Normalizes the parameters into a lookup options object.
10554
- */
10555
- function normalizeParameters(parameters) {
10556
- return {
10557
- $format: "JSX",
10558
- $context: parameters.context,
10559
- $id: parameters.id,
10560
- $_hash: parameters._hash,
10561
- ...parameters
10562
- };
10563
- }
10564
- /**
10565
10692
  * Dev-only translation resolver that uses React Suspense.
10566
10693
  * Sync cache check already happened in computeT() — this only handles cache misses.
10567
10694
  * use() suspends until the async translation resolves.
@@ -10686,13 +10813,12 @@ function _convertCustomNamesToMapping(customNames) {
10686
10813
  */
10687
10814
  function InternalLocaleSelector({ locale, locales, customNames, customMapping = _convertCustomNamesToMapping(customNames), setLocale, getLocaleProperties, ...props }) {
10688
10815
  const getDisplayName = (locale) => {
10689
- if (customMapping && customMapping[locale]) {
10690
- if (typeof customMapping[locale] === "string") return customMapping[locale];
10691
- if (customMapping[locale].name) return customMapping[locale].name;
10692
- }
10816
+ const customLocale = customMapping?.[locale];
10817
+ if (typeof customLocale === "string") return customLocale;
10818
+ if (customLocale?.name) return customLocale.name;
10693
10819
  return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);
10694
10820
  };
10695
- if (!locales || locales.length === 0 || !setLocale) return null;
10821
+ if (!locales?.length || !setLocale) return null;
10696
10822
  return /* @__PURE__ */ jsxs("select", {
10697
10823
  ...props,
10698
10824
  value: locale || "",