gt-react 10.19.15 → 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.
Files changed (170) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/browser.cjs +10914 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +699 -0
  5. package/dist/browser.d.cts.map +1 -0
  6. package/dist/browser.d.mts +701 -0
  7. package/dist/browser.d.mts.map +1 -0
  8. package/dist/browser.mjs +10877 -0
  9. package/dist/browser.mjs.map +1 -0
  10. package/dist/client.cjs +3451 -0
  11. package/dist/client.cjs.map +1 -0
  12. package/dist/client.d.cts +248 -0
  13. package/dist/client.d.cts.map +1 -0
  14. package/dist/client.d.mts +249 -0
  15. package/dist/client.d.mts.map +1 -0
  16. package/dist/client.mjs +3392 -0
  17. package/dist/client.mjs.map +1 -0
  18. package/dist/index.cjs +3691 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +377 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +376 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +3636 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/internal.cjs +4046 -0
  27. package/dist/internal.cjs.map +1 -0
  28. package/dist/internal.d.cts +1118 -0
  29. package/dist/internal.d.cts.map +1 -0
  30. package/dist/internal.d.mts +1118 -0
  31. package/dist/internal.d.mts.map +1 -0
  32. package/dist/internal.mjs +3985 -0
  33. package/dist/internal.mjs.map +1 -0
  34. package/dist/macros.cjs +6206 -0
  35. package/dist/macros.cjs.map +1 -0
  36. package/dist/macros.d.cts +25 -0
  37. package/dist/macros.d.cts.map +1 -0
  38. package/dist/macros.d.mts +25 -0
  39. package/dist/macros.d.mts.map +1 -0
  40. package/dist/macros.mjs +6207 -0
  41. package/dist/macros.mjs.map +1 -0
  42. package/package.json +61 -41
  43. package/dist/browser-types.d.ts +0 -5
  44. package/dist/browser-types.d.ts.map +0 -1
  45. package/dist/browser.cjs.min.cjs +0 -2
  46. package/dist/browser.cjs.min.cjs.map +0 -1
  47. package/dist/browser.d.ts +0 -4
  48. package/dist/browser.d.ts.map +0 -1
  49. package/dist/browser.esm.min.mjs +0 -2
  50. package/dist/browser.esm.min.mjs.map +0 -1
  51. package/dist/client.cjs.min.cjs +0 -2
  52. package/dist/client.cjs.min.cjs.map +0 -1
  53. package/dist/client.d.ts +0 -6
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/client.esm.min.mjs +0 -2
  56. package/dist/client.esm.min.mjs.map +0 -1
  57. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
  58. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
  59. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
  60. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
  61. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
  62. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
  63. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
  64. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
  65. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
  66. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
  67. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
  68. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
  69. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
  70. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
  71. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
  72. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
  73. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
  74. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
  75. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
  76. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
  77. package/dist/i18n-context/functions/branching/index.d.ts +0 -3
  78. package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
  79. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
  80. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
  81. package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
  82. package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
  83. package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
  84. package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
  85. package/dist/i18n-context/functions/index.d.ts +0 -8
  86. package/dist/i18n-context/functions/index.d.ts.map +0 -1
  87. package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
  88. package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
  89. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
  90. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
  91. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
  92. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
  93. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
  94. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
  95. package/dist/i18n-context/functions/translation/index.d.ts +0 -5
  96. package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
  97. package/dist/i18n-context/functions/translation/t.d.ts +0 -25
  98. package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
  99. package/dist/i18n-context/functions/translation/types.d.ts +0 -21
  100. package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
  101. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
  102. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
  103. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
  104. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
  105. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
  106. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
  107. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
  108. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
  109. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
  110. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
  111. package/dist/i18n-context/functions/variables/index.d.ts +0 -6
  112. package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
  113. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
  114. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
  115. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
  116. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
  117. package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
  118. package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
  119. package/dist/i18n-context/setup/index.d.ts +0 -3
  120. package/dist/i18n-context/setup/index.d.ts.map +0 -1
  121. package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
  122. package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
  123. package/dist/i18n-context/setup/types.d.ts +0 -19
  124. package/dist/i18n-context/setup/types.d.ts.map +0 -1
  125. package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
  126. package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
  127. package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
  128. package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
  129. package/dist/index.cjs.min.cjs +0 -2
  130. package/dist/index.cjs.min.cjs.map +0 -1
  131. package/dist/index.d.ts +0 -8
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.esm.min.mjs +0 -2
  134. package/dist/index.esm.min.mjs.map +0 -1
  135. package/dist/internal.cjs.min.cjs +0 -2
  136. package/dist/internal.cjs.min.cjs.map +0 -1
  137. package/dist/internal.d.ts +0 -7
  138. package/dist/internal.d.ts.map +0 -1
  139. package/dist/internal.esm.min.mjs +0 -2
  140. package/dist/internal.esm.min.mjs.map +0 -1
  141. package/dist/macros.cjs.min.cjs +0 -2
  142. package/dist/macros.cjs.min.cjs.map +0 -1
  143. package/dist/macros.d.ts +0 -22
  144. package/dist/macros.d.ts.map +0 -1
  145. package/dist/macros.esm.min.mjs +0 -2
  146. package/dist/macros.esm.min.mjs.map +0 -1
  147. package/dist/react-context/provider/ClientProvider.d.ts +0 -4
  148. package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
  149. package/dist/react-context/provider/GTProvider.d.ts +0 -29
  150. package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
  151. package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
  152. package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
  153. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
  154. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  155. package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
  156. package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
  157. package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
  158. package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
  159. package/dist/react-context/types/config.d.ts +0 -67
  160. package/dist/react-context/types/config.d.ts.map +0 -1
  161. package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
  162. package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
  163. package/dist/react-context/ui/RegionSelector.d.ts +0 -38
  164. package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
  165. package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
  166. package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
  167. package/dist/shared/InternalLocaleSelector.d.ts +0 -26
  168. package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
  169. package/dist/shared/messages.d.ts +0 -11
  170. package/dist/shared/messages.d.ts.map +0 -1
@@ -0,0 +1,3985 @@
1
+ import * as e from "react";
2
+ import t, { isValidElement } from "react";
3
+ import { formatCutoff, formatMessage } from "@generaltranslation/format";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import "generaltranslation";
6
+ //#region ../react-core/dist/internal.esm.min.mjs
7
+ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.prototype.hasOwnProperty, f = (e, t) => () => (e && (t = e(e = 0)), t), p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), m = (e, t) => {
8
+ let n = {};
9
+ for (var r in e) c(n, r, {
10
+ get: e[r],
11
+ enumerable: !0
12
+ });
13
+ return t || c(n, Symbol.toStringTag, { value: `Module` }), n;
14
+ }, h = (e, t, n, r) => {
15
+ if (t && typeof t == `object` || typeof t == `function`) for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !d.call(e, s) && s !== n && c(e, s, {
16
+ get: ((e) => t[e]).bind(null, s),
17
+ enumerable: !(r = l(t, s)) || r.enumerable
18
+ });
19
+ return e;
20
+ }, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
21
+ function _(e, t) {
22
+ if (e == null) throw Error(`Cannot index into an undefined dictionary`);
23
+ return e[t];
24
+ }
25
+ function v(e, t, n) {
26
+ e[t] = n;
27
+ }
28
+ const ee = (e) => `Duplicate key found in dictionary: "${e}"`;
29
+ function y(e, t = ``) {
30
+ let n = {};
31
+ for (let r in e) if (e.hasOwnProperty(r)) {
32
+ let i = t ? `${t}.${r}` : r;
33
+ if (typeof _(e, r) == `object` && _(e, r) !== null && !Array.isArray(_(e, r))) {
34
+ let t = y(_(e, r), i);
35
+ for (let e in t) {
36
+ if (n.hasOwnProperty(e)) throw Error(ee(e));
37
+ n[e] = t[e];
38
+ }
39
+ } else {
40
+ if (n.hasOwnProperty(i)) throw Error(ee(i));
41
+ n[i] = _(e, r);
42
+ }
43
+ }
44
+ return n;
45
+ }
46
+ function b(e) {
47
+ let t = e.trim();
48
+ return t ? /[.!?)]$/.test(t) ? t : `${t}.` : ``;
49
+ }
50
+ function x(e) {
51
+ let t = e.trim(), n = t.length;
52
+ for (; n > 0;) {
53
+ let e = t[n - 1];
54
+ if (e !== `.` && e !== `!` && e !== `?`) break;
55
+ --n;
56
+ }
57
+ return t.slice(0, n);
58
+ }
59
+ function te(e) {
60
+ return e.replace(/^[A-Z][a-z]/, (e) => e.toLowerCase());
61
+ }
62
+ function ne(e) {
63
+ if (!e) return ``;
64
+ let t = Array.isArray(e) ? e.join(`, `) : e;
65
+ return t.trim() ? b(`Details: ${t}`) : ``;
66
+ }
67
+ function S({ source: e, severity: t, whatHappened: n, reassurance: r, why: i, fix: a, wayOut: o, details: s, docsUrl: c }) {
68
+ 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 = [
69
+ u,
70
+ r,
71
+ d ? `${x(a)}, or ${te(x(o))}` : a,
72
+ d ? void 0 : o,
73
+ ne(s)
74
+ ].filter((e) => !!e).map(b);
75
+ c && f.push(`Learn more: ${c}`);
76
+ let p = f.join(` `);
77
+ return l ? `${l} ${p}` : p;
78
+ }
79
+ function C(e) {
80
+ if (typeof Buffer < `u`) return Buffer.from(e, `utf8`).toString(`base64`);
81
+ let t = new TextEncoder().encode(e), n = ``;
82
+ for (let e = 0; e < t.length; e++) n += String.fromCharCode(t[e]);
83
+ return btoa(n);
84
+ }
85
+ function w(e) {
86
+ if (typeof Buffer < `u`) return Buffer.from(e, `base64`).toString(`utf8`);
87
+ let t = atob(e), n = new Uint8Array(t.length);
88
+ for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
89
+ return new TextDecoder().decode(n);
90
+ }
91
+ function T(e) {
92
+ if (e === void 0) return;
93
+ if (e === null) return `null`;
94
+ if (typeof e == `number`) return isFinite(e) ? `` + e : `null`;
95
+ if (typeof e != `object`) return JSON.stringify(e);
96
+ if (Array.isArray(e)) {
97
+ let t = `[`;
98
+ for (let n = 0; n < e.length; n++) n && (t += `,`), t += T(e[n]) || `null`;
99
+ return t + `]`;
100
+ }
101
+ let t = Object.keys(e).sort(), n = ``;
102
+ for (let r of t) {
103
+ let t = T(e[r]);
104
+ t && (n && (n += `,`), n += JSON.stringify(r) + `:` + t);
105
+ }
106
+ return `{` + n + `}`;
107
+ }
108
+ function re(e) {
109
+ return T(e) ?? ``;
110
+ }
111
+ function E(e) {
112
+ let t = e;
113
+ if (t && typeof t == `object` && typeof t.k == `string`) {
114
+ let e = Object.keys(t);
115
+ if (e.length === 1 || e.length === 2 && (typeof t.i == `number` || typeof t.v == `string`) || e.length === 3 && typeof t.v == `string` && typeof t.i == `number`) return !0;
116
+ }
117
+ return !1;
118
+ }
119
+ function ie(e) {
120
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
121
+ }
122
+ function D(e, t, n = ``) {
123
+ let r = ie(e), i = e?.length, a = t !== void 0;
124
+ if (!r || a && i !== t) {
125
+ let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
126
+ throw r ? RangeError(l) : TypeError(l);
127
+ }
128
+ return e;
129
+ }
130
+ function ae(e, t = !0) {
131
+ if (e.destroyed) throw Error(`Hash instance has been destroyed`);
132
+ if (t && e.finished) throw Error(`Hash#digest() has already been called`);
133
+ }
134
+ function oe(e, t) {
135
+ D(e, void 0, `digestInto() output`);
136
+ let n = t.outputLen;
137
+ if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
138
+ }
139
+ function se(...e) {
140
+ for (let t = 0; t < e.length; t++) e[t].fill(0);
141
+ }
142
+ function ce(e) {
143
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
144
+ }
145
+ function O(e, t) {
146
+ return e << 32 - t | e >>> t;
147
+ }
148
+ new Uint8Array(new Uint32Array([287454020]).buffer)[0];
149
+ const le = typeof Uint8Array.from([]).toHex == `function` && typeof Uint8Array.fromHex == `function`, ue = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
150
+ function de(e) {
151
+ if (D(e), le) return e.toHex();
152
+ let t = ``;
153
+ for (let n = 0; n < e.length; n++) t += ue[e[n]];
154
+ return t;
155
+ }
156
+ function fe(e) {
157
+ if (typeof e != `string`) throw TypeError(`string expected`);
158
+ return new Uint8Array(new TextEncoder().encode(e));
159
+ }
160
+ function pe(e, t = {}) {
161
+ let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
162
+ 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);
163
+ }
164
+ const me = (e) => ({ oid: Uint8Array.from([
165
+ 6,
166
+ 9,
167
+ 96,
168
+ 134,
169
+ 72,
170
+ 1,
171
+ 101,
172
+ 3,
173
+ 4,
174
+ 2,
175
+ e
176
+ ]) });
177
+ function he(e, t, n) {
178
+ return e & t ^ ~e & n;
179
+ }
180
+ function ge(e, t, n) {
181
+ return e & t ^ e & n ^ t & n;
182
+ }
183
+ var _e = class {
184
+ blockLen;
185
+ outputLen;
186
+ canXOF = !1;
187
+ padOffset;
188
+ isLE;
189
+ buffer;
190
+ view;
191
+ finished = !1;
192
+ length = 0;
193
+ pos = 0;
194
+ destroyed = !1;
195
+ constructor(e, t, n, r) {
196
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = ce(this.buffer);
197
+ }
198
+ update(e) {
199
+ ae(this), D(e);
200
+ let { view: t, buffer: n, blockLen: r } = this, i = e.length;
201
+ for (let a = 0; a < i;) {
202
+ let o = Math.min(r - this.pos, i - a);
203
+ if (o === r) {
204
+ let t = ce(e);
205
+ for (; r <= i - a; a += r) this.process(t, a);
206
+ continue;
207
+ }
208
+ n.set(e.subarray(a, a + o), this.pos), this.pos += o, a += o, this.pos === r && (this.process(t, 0), this.pos = 0);
209
+ }
210
+ return this.length += e.length, this.roundClean(), this;
211
+ }
212
+ digestInto(e) {
213
+ ae(this), oe(e, this), this.finished = !0;
214
+ let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
215
+ t[a++] = 128, se(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
216
+ for (let e = a; e < r; e++) t[e] = 0;
217
+ n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
218
+ let o = ce(e), s = this.outputLen;
219
+ if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
220
+ let c = s / 4, l = this.get();
221
+ if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
222
+ for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
223
+ }
224
+ digest() {
225
+ let { buffer: e, outputLen: t } = this;
226
+ this.digestInto(e);
227
+ let n = e.slice(0, t);
228
+ return this.destroy(), n;
229
+ }
230
+ _cloneInto(e) {
231
+ e ||= new this.constructor(), e.set(...this.get());
232
+ let { blockLen: t, buffer: n, length: r, finished: i, destroyed: a, pos: o } = this;
233
+ return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
234
+ }
235
+ clone() {
236
+ return this._cloneInto();
237
+ }
238
+ };
239
+ const k = Uint32Array.from([
240
+ 1779033703,
241
+ 3144134277,
242
+ 1013904242,
243
+ 2773480762,
244
+ 1359893119,
245
+ 2600822924,
246
+ 528734635,
247
+ 1541459225
248
+ ]), A = BigInt(2 ** 32 - 1), ve = BigInt(32);
249
+ function ye(e, t = !1) {
250
+ return t ? {
251
+ h: Number(e & A),
252
+ l: Number(e >> ve & A)
253
+ } : {
254
+ h: Number(e >> ve & A) | 0,
255
+ l: Number(e & A) | 0
256
+ };
257
+ }
258
+ function be(e, t = !1) {
259
+ let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
260
+ for (let a = 0; a < n; a++) {
261
+ let { h: n, l: o } = ye(e[a], t);
262
+ [r[a], i[a]] = [n, o];
263
+ }
264
+ return [r, i];
265
+ }
266
+ const xe = Uint32Array.from([
267
+ 1116352408,
268
+ 1899447441,
269
+ 3049323471,
270
+ 3921009573,
271
+ 961987163,
272
+ 1508970993,
273
+ 2453635748,
274
+ 2870763221,
275
+ 3624381080,
276
+ 310598401,
277
+ 607225278,
278
+ 1426881987,
279
+ 1925078388,
280
+ 2162078206,
281
+ 2614888103,
282
+ 3248222580,
283
+ 3835390401,
284
+ 4022224774,
285
+ 264347078,
286
+ 604807628,
287
+ 770255983,
288
+ 1249150122,
289
+ 1555081692,
290
+ 1996064986,
291
+ 2554220882,
292
+ 2821834349,
293
+ 2952996808,
294
+ 3210313671,
295
+ 3336571891,
296
+ 3584528711,
297
+ 113926993,
298
+ 338241895,
299
+ 666307205,
300
+ 773529912,
301
+ 1294757372,
302
+ 1396182291,
303
+ 1695183700,
304
+ 1986661051,
305
+ 2177026350,
306
+ 2456956037,
307
+ 2730485921,
308
+ 2820302411,
309
+ 3259730800,
310
+ 3345764771,
311
+ 3516065817,
312
+ 3600352804,
313
+ 4094571909,
314
+ 275423344,
315
+ 430227734,
316
+ 506948616,
317
+ 659060556,
318
+ 883997877,
319
+ 958139571,
320
+ 1322822218,
321
+ 1537002063,
322
+ 1747873779,
323
+ 1955562222,
324
+ 2024104815,
325
+ 2227730452,
326
+ 2361852424,
327
+ 2428436474,
328
+ 2756734187,
329
+ 3204031479,
330
+ 3329325298
331
+ ]), j = new Uint32Array(64);
332
+ var Se = class extends _e {
333
+ constructor(e) {
334
+ super(64, e, 8, !1);
335
+ }
336
+ get() {
337
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
338
+ return [
339
+ e,
340
+ t,
341
+ n,
342
+ r,
343
+ i,
344
+ a,
345
+ o,
346
+ s
347
+ ];
348
+ }
349
+ set(e, t, n, r, i, a, o, s) {
350
+ 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;
351
+ }
352
+ process(e, t) {
353
+ for (let n = 0; n < 16; n++, t += 4) j[n] = e.getUint32(t, !1);
354
+ for (let e = 16; e < 64; e++) {
355
+ let t = j[e - 15], n = j[e - 2], r = O(t, 7) ^ O(t, 18) ^ t >>> 3;
356
+ j[e] = (O(n, 17) ^ O(n, 19) ^ n >>> 10) + j[e - 7] + r + j[e - 16] | 0;
357
+ }
358
+ let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
359
+ for (let e = 0; e < 64; e++) {
360
+ 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;
361
+ l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
362
+ }
363
+ 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);
364
+ }
365
+ roundClean() {
366
+ se(j);
367
+ }
368
+ destroy() {
369
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), se(this.buffer);
370
+ }
371
+ }, Ce = class extends Se {
372
+ A = k[0] | 0;
373
+ B = k[1] | 0;
374
+ C = k[2] | 0;
375
+ D = k[3] | 0;
376
+ E = k[4] | 0;
377
+ F = k[5] | 0;
378
+ G = k[6] | 0;
379
+ H = k[7] | 0;
380
+ constructor() {
381
+ super(32);
382
+ }
383
+ };
384
+ 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)));
385
+ we[0], we[1];
386
+ const Te = pe(() => new Ce(), me(1)), Ee = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, De = `DEFAULT_TERMINATOR_KEY`, Oe = {
387
+ ellipsis: {
388
+ fr: {
389
+ terminator: `…`,
390
+ separator: ` `
391
+ },
392
+ zh: {
393
+ terminator: `……`,
394
+ separator: void 0
395
+ },
396
+ ja: {
397
+ terminator: `……`,
398
+ separator: void 0
399
+ },
400
+ [De]: {
401
+ terminator: `…`,
402
+ separator: void 0
403
+ }
404
+ },
405
+ none: { [De]: {
406
+ terminator: void 0,
407
+ separator: void 0
408
+ } }
409
+ };
410
+ var ke = class e {
411
+ static resolveLocale(e) {
412
+ try {
413
+ let t = e ? Array.isArray(e) ? e.map(String) : [String(e)] : [`en`], [n] = Intl.getCanonicalLocales(t);
414
+ return n ?? `en`;
415
+ } catch {
416
+ return `en`;
417
+ }
418
+ }
419
+ constructor(t, n = {}) {
420
+ this.locale = e.resolveLocale(t);
421
+ let r = n.style ?? `ellipsis`;
422
+ if (!Oe[r]) throw Error(Ee(r));
423
+ 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;
424
+ 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 = {
425
+ maxChars: n.maxChars,
426
+ style: n.maxChars === void 0 ? void 0 : r,
427
+ terminator: a,
428
+ separator: o
429
+ };
430
+ }
431
+ format(e) {
432
+ return this.formatToParts(e).join(``);
433
+ }
434
+ formatToParts(e) {
435
+ let { maxChars: t, terminator: n, separator: r } = this.options, i = t === void 0 || Math.abs(t) >= e.length ? t : t >= 0 ? Math.max(0, t - this.additionLength) : Math.min(0, t + this.additionLength), a = i !== void 0 && i > -1 ? e.slice(0, i) : e.slice(i);
436
+ return t == null || i == null || i === 0 || n == null || e.length <= Math.abs(t) ? [a] : i > 0 ? r == null ? [a, n] : [
437
+ a,
438
+ r,
439
+ n
440
+ ] : r == null ? [n, a] : [
441
+ n,
442
+ r,
443
+ a
444
+ ];
445
+ }
446
+ resolvedOptions() {
447
+ return this.options;
448
+ }
449
+ };
450
+ const Ae = {
451
+ Collator: Intl.Collator,
452
+ DateTimeFormat: Intl.DateTimeFormat,
453
+ DisplayNames: Intl.DisplayNames,
454
+ ListFormat: Intl.ListFormat,
455
+ Locale: Intl.Locale,
456
+ NumberFormat: Intl.NumberFormat,
457
+ PluralRules: Intl.PluralRules,
458
+ RelativeTimeFormat: Intl.RelativeTimeFormat,
459
+ Segmenter: Intl.Segmenter,
460
+ CutoffFormat: ke
461
+ }, je = new class {
462
+ constructor() {
463
+ this.cache = {};
464
+ }
465
+ generateKey(e, t = {}) {
466
+ return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
467
+ }
468
+ get(e, ...t) {
469
+ let [n = `en`, r = {}] = t, i = this.generateKey(n, r), a = this.cache[e];
470
+ a === void 0 && (a = {}, this.cache[e] = a);
471
+ let o = a[i];
472
+ return o === void 0 && (o = new Ae[e](...t), a[i] = o), o;
473
+ }
474
+ }();
475
+ function Me(e) {
476
+ return je.get(`PluralRules`, e);
477
+ }
478
+ var M = m({
479
+ __addDisposableResource: () => it,
480
+ __assign: () => F,
481
+ __asyncDelegator: () => Xe,
482
+ __asyncGenerator: () => Ye,
483
+ __asyncValues: () => Ze,
484
+ __await: () => P,
485
+ __awaiter: () => He,
486
+ __classPrivateFieldGet: () => tt,
487
+ __classPrivateFieldIn: () => rt,
488
+ __classPrivateFieldSet: () => nt,
489
+ __createBinding: () => I,
490
+ __decorate: () => Fe,
491
+ __disposeResources: () => at,
492
+ __esDecorate: () => Le,
493
+ __exportStar: () => We,
494
+ __extends: () => Ne,
495
+ __generator: () => Ue,
496
+ __importDefault: () => et,
497
+ __importStar: () => $e,
498
+ __makeTemplateObject: () => Qe,
499
+ __metadata: () => Ve,
500
+ __param: () => Ie,
501
+ __propKey: () => ze,
502
+ __read: () => Ge,
503
+ __rest: () => Pe,
504
+ __rewriteRelativeImportExtension: () => ot,
505
+ __runInitializers: () => Re,
506
+ __setFunctionName: () => Be,
507
+ __spread: () => Ke,
508
+ __spreadArray: () => Je,
509
+ __spreadArrays: () => qe,
510
+ __values: () => N,
511
+ default: () => ut
512
+ });
513
+ function Ne(e, t) {
514
+ if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
515
+ st(e, t);
516
+ function n() {
517
+ this.constructor = e;
518
+ }
519
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
520
+ }
521
+ function Pe(e, t) {
522
+ var n = {};
523
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
524
+ 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]]);
525
+ return n;
526
+ }
527
+ function Fe(e, t, n, r) {
528
+ var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
529
+ if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
530
+ 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);
531
+ return i > 3 && a && Object.defineProperty(t, n, a), a;
532
+ }
533
+ function Ie(e, t) {
534
+ return function(n, r) {
535
+ t(n, r, e);
536
+ };
537
+ }
538
+ function Le(e, t, n, r, i, a) {
539
+ function o(e) {
540
+ if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
541
+ return e;
542
+ }
543
+ for (var s = r.kind, c = s === `getter` ? `get` : s === `setter` ? `set` : `value`, l = !t && e ? r.static ? e : e.prototype : null, u = t || (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, f = !1, p = n.length - 1; p >= 0; p--) {
544
+ var m = {};
545
+ for (var h in r) m[h] = h === `access` ? {} : r[h];
546
+ for (var h in r.access) m.access[h] = r.access[h];
547
+ m.addInitializer = function(e) {
548
+ if (f) throw TypeError(`Cannot add initializers after decoration has completed`);
549
+ a.push(o(e || null));
550
+ };
551
+ var g = (0, n[p])(s === `accessor` ? {
552
+ get: u.get,
553
+ set: u.set
554
+ } : u[c], m);
555
+ if (s === `accessor`) {
556
+ if (g === void 0) continue;
557
+ if (typeof g != `object` || !g) throw TypeError(`Object expected`);
558
+ (d = o(g.get)) && (u.get = d), (d = o(g.set)) && (u.set = d), (d = o(g.init)) && i.unshift(d);
559
+ } else (d = o(g)) && (s === `field` ? i.unshift(d) : u[c] = d);
560
+ }
561
+ l && Object.defineProperty(l, r.name, u), f = !0;
562
+ }
563
+ function Re(e, t, n) {
564
+ for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
565
+ return r ? n : void 0;
566
+ }
567
+ function ze(e) {
568
+ return typeof e == `symbol` ? e : `${e}`;
569
+ }
570
+ function Be(e, t, n) {
571
+ return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
572
+ configurable: !0,
573
+ value: n ? `${n} ${t}` : t
574
+ });
575
+ }
576
+ function Ve(e, t) {
577
+ if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
578
+ }
579
+ function He(e, t, n, r) {
580
+ function i(e) {
581
+ return e instanceof n ? e : new n(function(t) {
582
+ t(e);
583
+ });
584
+ }
585
+ return new (n ||= Promise)(function(n, a) {
586
+ function o(e) {
587
+ try {
588
+ c(r.next(e));
589
+ } catch (e) {
590
+ a(e);
591
+ }
592
+ }
593
+ function s(e) {
594
+ try {
595
+ c(r.throw(e));
596
+ } catch (e) {
597
+ a(e);
598
+ }
599
+ }
600
+ function c(e) {
601
+ e.done ? n(e.value) : i(e.value).then(o, s);
602
+ }
603
+ c((r = r.apply(e, t || [])).next());
604
+ });
605
+ }
606
+ function Ue(e, t) {
607
+ var n = {
608
+ label: 0,
609
+ sent: function() {
610
+ if (a[0] & 1) throw a[1];
611
+ return a[1];
612
+ },
613
+ trys: [],
614
+ ops: []
615
+ }, r, i, a, o = Object.create((typeof Iterator == `function` ? Iterator : Object).prototype);
616
+ return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == `function` && (o[Symbol.iterator] = function() {
617
+ return this;
618
+ }), o;
619
+ function s(e) {
620
+ return function(t) {
621
+ return c([e, t]);
622
+ };
623
+ }
624
+ function c(s) {
625
+ if (r) throw TypeError(`Generator is already executing.`);
626
+ for (; o && (o = 0, s[0] && (n = 0)), n;) try {
627
+ if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
628
+ switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
629
+ case 0:
630
+ case 1:
631
+ a = s;
632
+ break;
633
+ case 4: return n.label++, {
634
+ value: s[1],
635
+ done: !1
636
+ };
637
+ case 5:
638
+ n.label++, i = s[1], s = [0];
639
+ continue;
640
+ case 7:
641
+ s = n.ops.pop(), n.trys.pop();
642
+ continue;
643
+ default:
644
+ if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
645
+ n = 0;
646
+ continue;
647
+ }
648
+ if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
649
+ n.label = s[1];
650
+ break;
651
+ }
652
+ if (s[0] === 6 && n.label < a[1]) {
653
+ n.label = a[1], a = s;
654
+ break;
655
+ }
656
+ if (a && n.label < a[2]) {
657
+ n.label = a[2], n.ops.push(s);
658
+ break;
659
+ }
660
+ a[2] && n.ops.pop(), n.trys.pop();
661
+ continue;
662
+ }
663
+ s = t.call(e, n);
664
+ } catch (e) {
665
+ s = [6, e], i = 0;
666
+ } finally {
667
+ r = a = 0;
668
+ }
669
+ if (s[0] & 5) throw s[1];
670
+ return {
671
+ value: s[0] ? s[1] : void 0,
672
+ done: !0
673
+ };
674
+ }
675
+ }
676
+ function We(e, t) {
677
+ for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && I(t, e, n);
678
+ }
679
+ function N(e) {
680
+ var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
681
+ if (n) return n.call(e);
682
+ if (e && typeof e.length == `number`) return { next: function() {
683
+ return e && r >= e.length && (e = void 0), {
684
+ value: e && e[r++],
685
+ done: !e
686
+ };
687
+ } };
688
+ throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
689
+ }
690
+ function Ge(e, t) {
691
+ var n = typeof Symbol == `function` && e[Symbol.iterator];
692
+ if (!n) return e;
693
+ var r = n.call(e), i, a = [], o;
694
+ try {
695
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
696
+ } catch (e) {
697
+ o = { error: e };
698
+ } finally {
699
+ try {
700
+ i && !i.done && (n = r.return) && n.call(r);
701
+ } finally {
702
+ if (o) throw o.error;
703
+ }
704
+ }
705
+ return a;
706
+ }
707
+ function Ke() {
708
+ for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Ge(arguments[t]));
709
+ return e;
710
+ }
711
+ function qe() {
712
+ for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
713
+ 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];
714
+ return r;
715
+ }
716
+ function Je(e, t, n) {
717
+ 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]);
718
+ return e.concat(a || Array.prototype.slice.call(t));
719
+ }
720
+ function P(e) {
721
+ return this instanceof P ? (this.v = e, this) : new P(e);
722
+ }
723
+ function Ye(e, t, n) {
724
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
725
+ var r = n.apply(e, t || []), i, a = [];
726
+ return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
727
+ return this;
728
+ }, i;
729
+ function o(e) {
730
+ return function(t) {
731
+ return Promise.resolve(t).then(e, d);
732
+ };
733
+ }
734
+ function s(e, t) {
735
+ r[e] && (i[e] = function(t) {
736
+ return new Promise(function(n, r) {
737
+ a.push([
738
+ e,
739
+ t,
740
+ n,
741
+ r
742
+ ]) > 1 || c(e, t);
743
+ });
744
+ }, t && (i[e] = t(i[e])));
745
+ }
746
+ function c(e, t) {
747
+ try {
748
+ l(r[e](t));
749
+ } catch (e) {
750
+ f(a[0][3], e);
751
+ }
752
+ }
753
+ function l(e) {
754
+ e.value instanceof P ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
755
+ }
756
+ function u(e) {
757
+ c(`next`, e);
758
+ }
759
+ function d(e) {
760
+ c(`throw`, e);
761
+ }
762
+ function f(e, t) {
763
+ e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
764
+ }
765
+ }
766
+ function Xe(e) {
767
+ var t, n;
768
+ return t = {}, r(`next`), r(`throw`, function(e) {
769
+ throw e;
770
+ }), r(`return`), t[Symbol.iterator] = function() {
771
+ return this;
772
+ }, t;
773
+ function r(r, i) {
774
+ t[r] = e[r] ? function(t) {
775
+ return (n = !n) ? {
776
+ value: P(e[r](t)),
777
+ done: !1
778
+ } : i ? i(t) : t;
779
+ } : i;
780
+ }
781
+ }
782
+ function Ze(e) {
783
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
784
+ var t = e[Symbol.asyncIterator], n;
785
+ 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() {
786
+ return this;
787
+ }, n);
788
+ function r(t) {
789
+ n[t] = e[t] && function(n) {
790
+ return new Promise(function(r, a) {
791
+ n = e[t](n), i(r, a, n.done, n.value);
792
+ });
793
+ };
794
+ }
795
+ function i(e, t, n, r) {
796
+ Promise.resolve(r).then(function(t) {
797
+ e({
798
+ value: t,
799
+ done: n
800
+ });
801
+ }, t);
802
+ }
803
+ }
804
+ function Qe(e, t) {
805
+ return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
806
+ }
807
+ function $e(e) {
808
+ if (e && e.__esModule) return e;
809
+ var t = {};
810
+ if (e != null) for (var n = L(e), r = 0; r < n.length; r++) n[r] !== `default` && I(t, e, n[r]);
811
+ return ct(t, e), t;
812
+ }
813
+ function et(e) {
814
+ return e && e.__esModule ? e : { default: e };
815
+ }
816
+ function tt(e, t, n, r) {
817
+ if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
818
+ 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`);
819
+ return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
820
+ }
821
+ function nt(e, t, n, r, i) {
822
+ if (r === `m`) throw TypeError(`Private method is not writable`);
823
+ if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
824
+ 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`);
825
+ return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
826
+ }
827
+ function rt(e, t) {
828
+ if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
829
+ return typeof e == `function` ? t === e : e.has(t);
830
+ }
831
+ function it(e, t, n) {
832
+ if (t != null) {
833
+ if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
834
+ var r, i;
835
+ if (n) {
836
+ if (!Symbol.asyncDispose) throw TypeError(`Symbol.asyncDispose is not defined.`);
837
+ r = t[Symbol.asyncDispose];
838
+ }
839
+ if (r === void 0) {
840
+ if (!Symbol.dispose) throw TypeError(`Symbol.dispose is not defined.`);
841
+ r = t[Symbol.dispose], n && (i = r);
842
+ }
843
+ if (typeof r != `function`) throw TypeError(`Object not disposable.`);
844
+ i && (r = function() {
845
+ try {
846
+ i.call(this);
847
+ } catch (e) {
848
+ return Promise.reject(e);
849
+ }
850
+ }), e.stack.push({
851
+ value: t,
852
+ dispose: r,
853
+ async: n
854
+ });
855
+ } else n && e.stack.push({ async: !0 });
856
+ return t;
857
+ }
858
+ function at(e) {
859
+ function t(t) {
860
+ e.error = e.hasError ? new lt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
861
+ }
862
+ var n, r = 0;
863
+ function i() {
864
+ for (; n = e.stack.pop();) try {
865
+ if (!n.async && r === 1) return r = 0, e.stack.push(n), Promise.resolve().then(i);
866
+ if (n.dispose) {
867
+ var a = n.dispose.call(n.value);
868
+ if (n.async) return r |= 2, Promise.resolve(a).then(i, function(e) {
869
+ return t(e), i();
870
+ });
871
+ } else r |= 1;
872
+ } catch (e) {
873
+ t(e);
874
+ }
875
+ if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
876
+ if (e.hasError) throw e.error;
877
+ }
878
+ return i();
879
+ }
880
+ function ot(e, t) {
881
+ return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
882
+ return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
883
+ }) : e;
884
+ }
885
+ var st, F, I, ct, L, lt, ut, R = f((() => {
886
+ st = function(e, t) {
887
+ return st = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
888
+ e.__proto__ = t;
889
+ } || function(e, t) {
890
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
891
+ }, st(e, t);
892
+ }, F = function() {
893
+ return F = Object.assign || function(e) {
894
+ 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]);
895
+ return e;
896
+ }, F.apply(this, arguments);
897
+ }, I = Object.create ? (function(e, t, n, r) {
898
+ r === void 0 && (r = n);
899
+ var i = Object.getOwnPropertyDescriptor(t, n);
900
+ (!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
901
+ enumerable: !0,
902
+ get: function() {
903
+ return t[n];
904
+ }
905
+ }), Object.defineProperty(e, r, i);
906
+ }) : (function(e, t, n, r) {
907
+ r === void 0 && (r = n), e[r] = t[n];
908
+ }), ct = Object.create ? (function(e, t) {
909
+ Object.defineProperty(e, `default`, {
910
+ enumerable: !0,
911
+ value: t
912
+ });
913
+ }) : function(e, t) {
914
+ e.default = t;
915
+ }, L = function(e) {
916
+ return L = Object.getOwnPropertyNames || function(e) {
917
+ var t = [];
918
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
919
+ return t;
920
+ }, L(e);
921
+ }, lt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
922
+ var r = Error(n);
923
+ return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
924
+ }, ut = {
925
+ __extends: Ne,
926
+ __assign: F,
927
+ __rest: Pe,
928
+ __decorate: Fe,
929
+ __param: Ie,
930
+ __esDecorate: Le,
931
+ __runInitializers: Re,
932
+ __propKey: ze,
933
+ __setFunctionName: Be,
934
+ __metadata: Ve,
935
+ __awaiter: He,
936
+ __generator: Ue,
937
+ __createBinding: I,
938
+ __exportStar: We,
939
+ __values: N,
940
+ __read: Ge,
941
+ __spread: Ke,
942
+ __spreadArrays: qe,
943
+ __spreadArray: Je,
944
+ __await: P,
945
+ __asyncGenerator: Ye,
946
+ __asyncDelegator: Xe,
947
+ __asyncValues: Ze,
948
+ __makeTemplateObject: Qe,
949
+ __importStar: $e,
950
+ __importDefault: et,
951
+ __classPrivateFieldGet: tt,
952
+ __classPrivateFieldSet: nt,
953
+ __classPrivateFieldIn: rt,
954
+ __addDisposableResource: it,
955
+ __disposeResources: at,
956
+ __rewriteRelativeImportExtension: ot
957
+ };
958
+ })), dt = p(((e) => {
959
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
960
+ var t;
961
+ (function(e) {
962
+ 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`;
963
+ })(t || (e.ErrorKind = t = {}));
964
+ })), z = p(((e) => {
965
+ 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;
966
+ var t;
967
+ (function(e) {
968
+ e[e.literal = 0] = `literal`, e[e.argument = 1] = `argument`, e[e.number = 2] = `number`, e[e.date = 3] = `date`, e[e.time = 4] = `time`, e[e.select = 5] = `select`, e[e.plural = 6] = `plural`, e[e.pound = 7] = `pound`, e[e.tag = 8] = `tag`;
969
+ })(t || (e.TYPE = t = {}));
970
+ var n;
971
+ (function(e) {
972
+ e[e.number = 0] = `number`, e[e.dateTime = 1] = `dateTime`;
973
+ })(n || (e.SKELETON_TYPE = n = {}));
974
+ function r(e) {
975
+ return e.type === t.literal;
976
+ }
977
+ function i(e) {
978
+ return e.type === t.argument;
979
+ }
980
+ function a(e) {
981
+ return e.type === t.number;
982
+ }
983
+ function o(e) {
984
+ return e.type === t.date;
985
+ }
986
+ function s(e) {
987
+ return e.type === t.time;
988
+ }
989
+ function c(e) {
990
+ return e.type === t.select;
991
+ }
992
+ function l(e) {
993
+ return e.type === t.plural;
994
+ }
995
+ function u(e) {
996
+ return e.type === t.pound;
997
+ }
998
+ function d(e) {
999
+ return e.type === t.tag;
1000
+ }
1001
+ function f(e) {
1002
+ return !!(e && typeof e == `object` && e.type === n.number);
1003
+ }
1004
+ function p(e) {
1005
+ return !!(e && typeof e == `object` && e.type === n.dateTime);
1006
+ }
1007
+ function m(e) {
1008
+ return {
1009
+ type: t.literal,
1010
+ value: e
1011
+ };
1012
+ }
1013
+ function h(e, n) {
1014
+ return {
1015
+ type: t.number,
1016
+ value: e,
1017
+ style: n
1018
+ };
1019
+ }
1020
+ })), ft = p(((e) => {
1021
+ 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]/;
1022
+ })), pt = p(((e) => {
1023
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
1024
+ 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;
1025
+ function n(e) {
1026
+ var n = {};
1027
+ return e.replace(t, function(e) {
1028
+ var t = e.length;
1029
+ switch (e[0]) {
1030
+ case `G`:
1031
+ n.era = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
1032
+ break;
1033
+ case `y`:
1034
+ n.year = t === 2 ? `2-digit` : `numeric`;
1035
+ break;
1036
+ case `Y`:
1037
+ case `u`:
1038
+ case `U`:
1039
+ case `r`: throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
1040
+ case `q`:
1041
+ case `Q`: throw RangeError("`q/Q` (quarter) patterns are not supported");
1042
+ case `M`:
1043
+ case `L`:
1044
+ n.month = [
1045
+ `numeric`,
1046
+ `2-digit`,
1047
+ `short`,
1048
+ `long`,
1049
+ `narrow`
1050
+ ][t - 1];
1051
+ break;
1052
+ case `w`:
1053
+ case `W`: throw RangeError("`w/W` (week) patterns are not supported");
1054
+ case `d`:
1055
+ n.day = [`numeric`, `2-digit`][t - 1];
1056
+ break;
1057
+ case `D`:
1058
+ case `F`:
1059
+ case `g`: throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
1060
+ case `E`:
1061
+ n.weekday = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
1062
+ break;
1063
+ case `e`:
1064
+ if (t < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
1065
+ n.weekday = [
1066
+ `short`,
1067
+ `long`,
1068
+ `narrow`,
1069
+ `short`
1070
+ ][t - 4];
1071
+ break;
1072
+ case `c`:
1073
+ if (t < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
1074
+ n.weekday = [
1075
+ `short`,
1076
+ `long`,
1077
+ `narrow`,
1078
+ `short`
1079
+ ][t - 4];
1080
+ break;
1081
+ case `a`:
1082
+ n.hour12 = !0;
1083
+ break;
1084
+ case `b`:
1085
+ case `B`: throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
1086
+ case `h`:
1087
+ n.hourCycle = `h12`, n.hour = [`numeric`, `2-digit`][t - 1];
1088
+ break;
1089
+ case `H`:
1090
+ n.hourCycle = `h23`, n.hour = [`numeric`, `2-digit`][t - 1];
1091
+ break;
1092
+ case `K`:
1093
+ n.hourCycle = `h11`, n.hour = [`numeric`, `2-digit`][t - 1];
1094
+ break;
1095
+ case `k`:
1096
+ n.hourCycle = `h24`, n.hour = [`numeric`, `2-digit`][t - 1];
1097
+ break;
1098
+ case `j`:
1099
+ case `J`:
1100
+ case `C`: throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
1101
+ case `m`:
1102
+ n.minute = [`numeric`, `2-digit`][t - 1];
1103
+ break;
1104
+ case `s`:
1105
+ n.second = [`numeric`, `2-digit`][t - 1];
1106
+ break;
1107
+ case `S`:
1108
+ case `A`: throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
1109
+ case `z`:
1110
+ n.timeZoneName = t < 4 ? `short` : `long`;
1111
+ break;
1112
+ case `Z`:
1113
+ case `O`:
1114
+ case `v`:
1115
+ case `V`:
1116
+ case `X`:
1117
+ case `x`: throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
1118
+ }
1119
+ return ``;
1120
+ }), n;
1121
+ }
1122
+ })), mt = p(((e) => {
1123
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
1124
+ })), ht = p(((e) => {
1125
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
1126
+ var t = (R(), g(M)), n = mt();
1127
+ function r(e) {
1128
+ if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
1129
+ for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
1130
+ return e.length > 0;
1131
+ }), r = [], i = 0, a = t; i < a.length; i++) {
1132
+ var o = a[i].split(`/`);
1133
+ if (o.length === 0) throw Error(`Invalid number skeleton`);
1134
+ for (var s = o[0], c = o.slice(1), l = 0, u = c; l < u.length; l++) if (u[l].length === 0) throw Error(`Invalid number skeleton`);
1135
+ r.push({
1136
+ stem: s,
1137
+ options: c
1138
+ });
1139
+ }
1140
+ return r;
1141
+ }
1142
+ function i(e) {
1143
+ return e.replace(/^(.*?)-/, ``);
1144
+ }
1145
+ var a = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, o = /^(@+)?(\+|#+)?[rs]?$/g, s = /(\*)(0+)|(#+)(0+)|(0+)/g, c = /^(0+)$/;
1146
+ function l(e) {
1147
+ var t = {};
1148
+ return e[e.length - 1] === `r` ? t.roundingPriority = `morePrecision` : e[e.length - 1] === `s` && (t.roundingPriority = `lessPrecision`), e.replace(o, function(e, n, r) {
1149
+ return typeof r == `string` ? r === `+` ? t.minimumSignificantDigits = n.length : n[0] === `#` ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof r == `string` ? r.length : 0)) : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length), ``;
1150
+ }), t;
1151
+ }
1152
+ function u(e) {
1153
+ switch (e) {
1154
+ case `sign-auto`: return { signDisplay: `auto` };
1155
+ case `sign-accounting`:
1156
+ case `()`: return { currencySign: `accounting` };
1157
+ case `sign-always`:
1158
+ case `+!`: return { signDisplay: `always` };
1159
+ case `sign-accounting-always`:
1160
+ case `()!`: return {
1161
+ signDisplay: `always`,
1162
+ currencySign: `accounting`
1163
+ };
1164
+ case `sign-except-zero`:
1165
+ case `+?`: return { signDisplay: `exceptZero` };
1166
+ case `sign-accounting-except-zero`:
1167
+ case `()?`: return {
1168
+ signDisplay: `exceptZero`,
1169
+ currencySign: `accounting`
1170
+ };
1171
+ case `sign-never`:
1172
+ case `+_`: return { signDisplay: `never` };
1173
+ }
1174
+ }
1175
+ function d(e) {
1176
+ var t;
1177
+ if (e[0] === `E` && e[1] === `E` ? (t = { notation: `engineering` }, e = e.slice(2)) : e[0] === `E` && (t = { notation: `scientific` }, e = e.slice(1)), t) {
1178
+ var n = e.slice(0, 2);
1179
+ if (n === `+!` ? (t.signDisplay = `always`, e = e.slice(2)) : n === `+?` && (t.signDisplay = `exceptZero`, e = e.slice(2)), !c.test(e)) throw Error(`Malformed concise eng/scientific notation`);
1180
+ t.minimumIntegerDigits = e.length;
1181
+ }
1182
+ return t;
1183
+ }
1184
+ function f(e) {
1185
+ return u(e) || {};
1186
+ }
1187
+ function p(e) {
1188
+ for (var n = {}, r = 0, p = e; r < p.length; r++) {
1189
+ var m = p[r];
1190
+ switch (m.stem) {
1191
+ case `percent`:
1192
+ case `%`:
1193
+ n.style = `percent`;
1194
+ continue;
1195
+ case `%x100`:
1196
+ n.style = `percent`, n.scale = 100;
1197
+ continue;
1198
+ case `currency`:
1199
+ n.style = `currency`, n.currency = m.options[0];
1200
+ continue;
1201
+ case `group-off`:
1202
+ case `,_`:
1203
+ n.useGrouping = !1;
1204
+ continue;
1205
+ case `precision-integer`:
1206
+ case `.`:
1207
+ n.maximumFractionDigits = 0;
1208
+ continue;
1209
+ case `measure-unit`:
1210
+ case `unit`:
1211
+ n.style = `unit`, n.unit = i(m.options[0]);
1212
+ continue;
1213
+ case `compact-short`:
1214
+ case `K`:
1215
+ n.notation = `compact`, n.compactDisplay = `short`;
1216
+ continue;
1217
+ case `compact-long`:
1218
+ case `KK`:
1219
+ n.notation = `compact`, n.compactDisplay = `long`;
1220
+ continue;
1221
+ case `scientific`:
1222
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `scientific` }), m.options.reduce(function(e, n) {
1223
+ return t.__assign(t.__assign({}, e), f(n));
1224
+ }, {}));
1225
+ continue;
1226
+ case `engineering`:
1227
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `engineering` }), m.options.reduce(function(e, n) {
1228
+ return t.__assign(t.__assign({}, e), f(n));
1229
+ }, {}));
1230
+ continue;
1231
+ case `notation-simple`:
1232
+ n.notation = `standard`;
1233
+ continue;
1234
+ case `unit-width-narrow`:
1235
+ n.currencyDisplay = `narrowSymbol`, n.unitDisplay = `narrow`;
1236
+ continue;
1237
+ case `unit-width-short`:
1238
+ n.currencyDisplay = `code`, n.unitDisplay = `short`;
1239
+ continue;
1240
+ case `unit-width-full-name`:
1241
+ n.currencyDisplay = `name`, n.unitDisplay = `long`;
1242
+ continue;
1243
+ case `unit-width-iso-code`:
1244
+ n.currencyDisplay = `symbol`;
1245
+ continue;
1246
+ case `scale`:
1247
+ n.scale = parseFloat(m.options[0]);
1248
+ continue;
1249
+ case `rounding-mode-floor`:
1250
+ n.roundingMode = `floor`;
1251
+ continue;
1252
+ case `rounding-mode-ceiling`:
1253
+ n.roundingMode = `ceil`;
1254
+ continue;
1255
+ case `rounding-mode-down`:
1256
+ n.roundingMode = `trunc`;
1257
+ continue;
1258
+ case `rounding-mode-up`:
1259
+ n.roundingMode = `expand`;
1260
+ continue;
1261
+ case `rounding-mode-half-even`:
1262
+ n.roundingMode = `halfEven`;
1263
+ continue;
1264
+ case `rounding-mode-half-down`:
1265
+ n.roundingMode = `halfTrunc`;
1266
+ continue;
1267
+ case `rounding-mode-half-up`:
1268
+ n.roundingMode = `halfExpand`;
1269
+ continue;
1270
+ case `integer-width`:
1271
+ if (m.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
1272
+ m.options[0].replace(s, function(e, t, r, i, a, o) {
1273
+ if (t) n.minimumIntegerDigits = r.length;
1274
+ else if (i && a) throw Error(`We currently do not support maximum integer digits`);
1275
+ else if (o) throw Error(`We currently do not support exact integer digits`);
1276
+ return ``;
1277
+ });
1278
+ continue;
1279
+ }
1280
+ if (c.test(m.stem)) {
1281
+ n.minimumIntegerDigits = m.stem.length;
1282
+ continue;
1283
+ }
1284
+ if (a.test(m.stem)) {
1285
+ if (m.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
1286
+ m.stem.replace(a, function(e, t, r, i, a, o) {
1287
+ return r === `*` ? n.minimumFractionDigits = t.length : i && i[0] === `#` ? n.maximumFractionDigits = i.length : a && o ? (n.minimumFractionDigits = a.length, n.maximumFractionDigits = a.length + o.length) : (n.minimumFractionDigits = t.length, n.maximumFractionDigits = t.length), ``;
1288
+ });
1289
+ var h = m.options[0];
1290
+ h === `w` ? n = t.__assign(t.__assign({}, n), { trailingZeroDisplay: `stripIfInteger` }) : h && (n = t.__assign(t.__assign({}, n), l(h)));
1291
+ continue;
1292
+ }
1293
+ if (o.test(m.stem)) {
1294
+ n = t.__assign(t.__assign({}, n), l(m.stem));
1295
+ continue;
1296
+ }
1297
+ var g = u(m.stem);
1298
+ g && (n = t.__assign(t.__assign({}, n), g));
1299
+ var _ = d(m.stem);
1300
+ _ && (n = t.__assign(t.__assign({}, n), _));
1301
+ }
1302
+ return n;
1303
+ }
1304
+ })), gt = p(((e) => {
1305
+ Object.defineProperty(e, `__esModule`, { value: !0 });
1306
+ var t = (R(), g(M));
1307
+ t.__exportStar(pt(), e), t.__exportStar(ht(), e);
1308
+ })), _t = p(((e) => {
1309
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
1310
+ "001": [`H`, `h`],
1311
+ 419: [
1312
+ `h`,
1313
+ `H`,
1314
+ `hB`,
1315
+ `hb`
1316
+ ],
1317
+ AC: [
1318
+ `H`,
1319
+ `h`,
1320
+ `hb`,
1321
+ `hB`
1322
+ ],
1323
+ AD: [`H`, `hB`],
1324
+ AE: [
1325
+ `h`,
1326
+ `hB`,
1327
+ `hb`,
1328
+ `H`
1329
+ ],
1330
+ AF: [
1331
+ `H`,
1332
+ `hb`,
1333
+ `hB`,
1334
+ `h`
1335
+ ],
1336
+ AG: [
1337
+ `h`,
1338
+ `hb`,
1339
+ `H`,
1340
+ `hB`
1341
+ ],
1342
+ AI: [
1343
+ `H`,
1344
+ `h`,
1345
+ `hb`,
1346
+ `hB`
1347
+ ],
1348
+ AL: [
1349
+ `h`,
1350
+ `H`,
1351
+ `hB`
1352
+ ],
1353
+ AM: [`H`, `hB`],
1354
+ AO: [`H`, `hB`],
1355
+ AR: [
1356
+ `h`,
1357
+ `H`,
1358
+ `hB`,
1359
+ `hb`
1360
+ ],
1361
+ AS: [`h`, `H`],
1362
+ AT: [`H`, `hB`],
1363
+ AU: [
1364
+ `h`,
1365
+ `hb`,
1366
+ `H`,
1367
+ `hB`
1368
+ ],
1369
+ AW: [`H`, `hB`],
1370
+ AX: [`H`],
1371
+ AZ: [
1372
+ `H`,
1373
+ `hB`,
1374
+ `h`
1375
+ ],
1376
+ BA: [
1377
+ `H`,
1378
+ `hB`,
1379
+ `h`
1380
+ ],
1381
+ BB: [
1382
+ `h`,
1383
+ `hb`,
1384
+ `H`,
1385
+ `hB`
1386
+ ],
1387
+ BD: [
1388
+ `h`,
1389
+ `hB`,
1390
+ `H`
1391
+ ],
1392
+ BE: [`H`, `hB`],
1393
+ BF: [`H`, `hB`],
1394
+ BG: [
1395
+ `H`,
1396
+ `hB`,
1397
+ `h`
1398
+ ],
1399
+ BH: [
1400
+ `h`,
1401
+ `hB`,
1402
+ `hb`,
1403
+ `H`
1404
+ ],
1405
+ BI: [`H`, `h`],
1406
+ BJ: [`H`, `hB`],
1407
+ BL: [`H`, `hB`],
1408
+ BM: [
1409
+ `h`,
1410
+ `hb`,
1411
+ `H`,
1412
+ `hB`
1413
+ ],
1414
+ BN: [
1415
+ `hb`,
1416
+ `hB`,
1417
+ `h`,
1418
+ `H`
1419
+ ],
1420
+ BO: [
1421
+ `h`,
1422
+ `H`,
1423
+ `hB`,
1424
+ `hb`
1425
+ ],
1426
+ BQ: [`H`],
1427
+ BR: [`H`, `hB`],
1428
+ BS: [
1429
+ `h`,
1430
+ `hb`,
1431
+ `H`,
1432
+ `hB`
1433
+ ],
1434
+ BT: [`h`, `H`],
1435
+ BW: [
1436
+ `H`,
1437
+ `h`,
1438
+ `hb`,
1439
+ `hB`
1440
+ ],
1441
+ BY: [`H`, `h`],
1442
+ BZ: [
1443
+ `H`,
1444
+ `h`,
1445
+ `hb`,
1446
+ `hB`
1447
+ ],
1448
+ CA: [
1449
+ `h`,
1450
+ `hb`,
1451
+ `H`,
1452
+ `hB`
1453
+ ],
1454
+ CC: [
1455
+ `H`,
1456
+ `h`,
1457
+ `hb`,
1458
+ `hB`
1459
+ ],
1460
+ CD: [`hB`, `H`],
1461
+ CF: [
1462
+ `H`,
1463
+ `h`,
1464
+ `hB`
1465
+ ],
1466
+ CG: [`H`, `hB`],
1467
+ CH: [
1468
+ `H`,
1469
+ `hB`,
1470
+ `h`
1471
+ ],
1472
+ CI: [`H`, `hB`],
1473
+ CK: [
1474
+ `H`,
1475
+ `h`,
1476
+ `hb`,
1477
+ `hB`
1478
+ ],
1479
+ CL: [
1480
+ `h`,
1481
+ `H`,
1482
+ `hB`,
1483
+ `hb`
1484
+ ],
1485
+ CM: [
1486
+ `H`,
1487
+ `h`,
1488
+ `hB`
1489
+ ],
1490
+ CN: [
1491
+ `H`,
1492
+ `hB`,
1493
+ `hb`,
1494
+ `h`
1495
+ ],
1496
+ CO: [
1497
+ `h`,
1498
+ `H`,
1499
+ `hB`,
1500
+ `hb`
1501
+ ],
1502
+ CP: [`H`],
1503
+ CR: [
1504
+ `h`,
1505
+ `H`,
1506
+ `hB`,
1507
+ `hb`
1508
+ ],
1509
+ CU: [
1510
+ `h`,
1511
+ `H`,
1512
+ `hB`,
1513
+ `hb`
1514
+ ],
1515
+ CV: [`H`, `hB`],
1516
+ CW: [`H`, `hB`],
1517
+ CX: [
1518
+ `H`,
1519
+ `h`,
1520
+ `hb`,
1521
+ `hB`
1522
+ ],
1523
+ CY: [
1524
+ `h`,
1525
+ `H`,
1526
+ `hb`,
1527
+ `hB`
1528
+ ],
1529
+ CZ: [`H`],
1530
+ DE: [`H`, `hB`],
1531
+ DG: [
1532
+ `H`,
1533
+ `h`,
1534
+ `hb`,
1535
+ `hB`
1536
+ ],
1537
+ DJ: [`h`, `H`],
1538
+ DK: [`H`],
1539
+ DM: [
1540
+ `h`,
1541
+ `hb`,
1542
+ `H`,
1543
+ `hB`
1544
+ ],
1545
+ DO: [
1546
+ `h`,
1547
+ `H`,
1548
+ `hB`,
1549
+ `hb`
1550
+ ],
1551
+ DZ: [
1552
+ `h`,
1553
+ `hB`,
1554
+ `hb`,
1555
+ `H`
1556
+ ],
1557
+ EA: [
1558
+ `H`,
1559
+ `h`,
1560
+ `hB`,
1561
+ `hb`
1562
+ ],
1563
+ EC: [
1564
+ `h`,
1565
+ `H`,
1566
+ `hB`,
1567
+ `hb`
1568
+ ],
1569
+ EE: [`H`, `hB`],
1570
+ EG: [
1571
+ `h`,
1572
+ `hB`,
1573
+ `hb`,
1574
+ `H`
1575
+ ],
1576
+ EH: [
1577
+ `h`,
1578
+ `hB`,
1579
+ `hb`,
1580
+ `H`
1581
+ ],
1582
+ ER: [`h`, `H`],
1583
+ ES: [
1584
+ `H`,
1585
+ `hB`,
1586
+ `h`,
1587
+ `hb`
1588
+ ],
1589
+ ET: [
1590
+ `hB`,
1591
+ `hb`,
1592
+ `h`,
1593
+ `H`
1594
+ ],
1595
+ FI: [`H`],
1596
+ FJ: [
1597
+ `h`,
1598
+ `hb`,
1599
+ `H`,
1600
+ `hB`
1601
+ ],
1602
+ FK: [
1603
+ `H`,
1604
+ `h`,
1605
+ `hb`,
1606
+ `hB`
1607
+ ],
1608
+ FM: [
1609
+ `h`,
1610
+ `hb`,
1611
+ `H`,
1612
+ `hB`
1613
+ ],
1614
+ FO: [`H`, `h`],
1615
+ FR: [`H`, `hB`],
1616
+ GA: [`H`, `hB`],
1617
+ GB: [
1618
+ `H`,
1619
+ `h`,
1620
+ `hb`,
1621
+ `hB`
1622
+ ],
1623
+ GD: [
1624
+ `h`,
1625
+ `hb`,
1626
+ `H`,
1627
+ `hB`
1628
+ ],
1629
+ GE: [
1630
+ `H`,
1631
+ `hB`,
1632
+ `h`
1633
+ ],
1634
+ GF: [`H`, `hB`],
1635
+ GG: [
1636
+ `H`,
1637
+ `h`,
1638
+ `hb`,
1639
+ `hB`
1640
+ ],
1641
+ GH: [`h`, `H`],
1642
+ GI: [
1643
+ `H`,
1644
+ `h`,
1645
+ `hb`,
1646
+ `hB`
1647
+ ],
1648
+ GL: [`H`, `h`],
1649
+ GM: [
1650
+ `h`,
1651
+ `hb`,
1652
+ `H`,
1653
+ `hB`
1654
+ ],
1655
+ GN: [`H`, `hB`],
1656
+ GP: [`H`, `hB`],
1657
+ GQ: [
1658
+ `H`,
1659
+ `hB`,
1660
+ `h`,
1661
+ `hb`
1662
+ ],
1663
+ GR: [
1664
+ `h`,
1665
+ `H`,
1666
+ `hb`,
1667
+ `hB`
1668
+ ],
1669
+ GT: [
1670
+ `h`,
1671
+ `H`,
1672
+ `hB`,
1673
+ `hb`
1674
+ ],
1675
+ GU: [
1676
+ `h`,
1677
+ `hb`,
1678
+ `H`,
1679
+ `hB`
1680
+ ],
1681
+ GW: [`H`, `hB`],
1682
+ GY: [
1683
+ `h`,
1684
+ `hb`,
1685
+ `H`,
1686
+ `hB`
1687
+ ],
1688
+ HK: [
1689
+ `h`,
1690
+ `hB`,
1691
+ `hb`,
1692
+ `H`
1693
+ ],
1694
+ HN: [
1695
+ `h`,
1696
+ `H`,
1697
+ `hB`,
1698
+ `hb`
1699
+ ],
1700
+ HR: [`H`, `hB`],
1701
+ HU: [`H`, `h`],
1702
+ IC: [
1703
+ `H`,
1704
+ `h`,
1705
+ `hB`,
1706
+ `hb`
1707
+ ],
1708
+ ID: [`H`],
1709
+ IE: [
1710
+ `H`,
1711
+ `h`,
1712
+ `hb`,
1713
+ `hB`
1714
+ ],
1715
+ IL: [`H`, `hB`],
1716
+ IM: [
1717
+ `H`,
1718
+ `h`,
1719
+ `hb`,
1720
+ `hB`
1721
+ ],
1722
+ IN: [`h`, `H`],
1723
+ IO: [
1724
+ `H`,
1725
+ `h`,
1726
+ `hb`,
1727
+ `hB`
1728
+ ],
1729
+ IQ: [
1730
+ `h`,
1731
+ `hB`,
1732
+ `hb`,
1733
+ `H`
1734
+ ],
1735
+ IR: [`hB`, `H`],
1736
+ IS: [`H`],
1737
+ IT: [`H`, `hB`],
1738
+ JE: [
1739
+ `H`,
1740
+ `h`,
1741
+ `hb`,
1742
+ `hB`
1743
+ ],
1744
+ JM: [
1745
+ `h`,
1746
+ `hb`,
1747
+ `H`,
1748
+ `hB`
1749
+ ],
1750
+ JO: [
1751
+ `h`,
1752
+ `hB`,
1753
+ `hb`,
1754
+ `H`
1755
+ ],
1756
+ JP: [
1757
+ `H`,
1758
+ `K`,
1759
+ `h`
1760
+ ],
1761
+ KE: [
1762
+ `hB`,
1763
+ `hb`,
1764
+ `H`,
1765
+ `h`
1766
+ ],
1767
+ KG: [
1768
+ `H`,
1769
+ `h`,
1770
+ `hB`,
1771
+ `hb`
1772
+ ],
1773
+ KH: [
1774
+ `hB`,
1775
+ `h`,
1776
+ `H`,
1777
+ `hb`
1778
+ ],
1779
+ KI: [
1780
+ `h`,
1781
+ `hb`,
1782
+ `H`,
1783
+ `hB`
1784
+ ],
1785
+ KM: [
1786
+ `H`,
1787
+ `h`,
1788
+ `hB`,
1789
+ `hb`
1790
+ ],
1791
+ KN: [
1792
+ `h`,
1793
+ `hb`,
1794
+ `H`,
1795
+ `hB`
1796
+ ],
1797
+ KP: [
1798
+ `h`,
1799
+ `H`,
1800
+ `hB`,
1801
+ `hb`
1802
+ ],
1803
+ KR: [
1804
+ `h`,
1805
+ `H`,
1806
+ `hB`,
1807
+ `hb`
1808
+ ],
1809
+ KW: [
1810
+ `h`,
1811
+ `hB`,
1812
+ `hb`,
1813
+ `H`
1814
+ ],
1815
+ KY: [
1816
+ `h`,
1817
+ `hb`,
1818
+ `H`,
1819
+ `hB`
1820
+ ],
1821
+ KZ: [`H`, `hB`],
1822
+ LA: [
1823
+ `H`,
1824
+ `hb`,
1825
+ `hB`,
1826
+ `h`
1827
+ ],
1828
+ LB: [
1829
+ `h`,
1830
+ `hB`,
1831
+ `hb`,
1832
+ `H`
1833
+ ],
1834
+ LC: [
1835
+ `h`,
1836
+ `hb`,
1837
+ `H`,
1838
+ `hB`
1839
+ ],
1840
+ LI: [
1841
+ `H`,
1842
+ `hB`,
1843
+ `h`
1844
+ ],
1845
+ LK: [
1846
+ `H`,
1847
+ `h`,
1848
+ `hB`,
1849
+ `hb`
1850
+ ],
1851
+ LR: [
1852
+ `h`,
1853
+ `hb`,
1854
+ `H`,
1855
+ `hB`
1856
+ ],
1857
+ LS: [`h`, `H`],
1858
+ LT: [
1859
+ `H`,
1860
+ `h`,
1861
+ `hb`,
1862
+ `hB`
1863
+ ],
1864
+ LU: [
1865
+ `H`,
1866
+ `h`,
1867
+ `hB`
1868
+ ],
1869
+ LV: [
1870
+ `H`,
1871
+ `hB`,
1872
+ `hb`,
1873
+ `h`
1874
+ ],
1875
+ LY: [
1876
+ `h`,
1877
+ `hB`,
1878
+ `hb`,
1879
+ `H`
1880
+ ],
1881
+ MA: [
1882
+ `H`,
1883
+ `h`,
1884
+ `hB`,
1885
+ `hb`
1886
+ ],
1887
+ MC: [`H`, `hB`],
1888
+ MD: [`H`, `hB`],
1889
+ ME: [
1890
+ `H`,
1891
+ `hB`,
1892
+ `h`
1893
+ ],
1894
+ MF: [`H`, `hB`],
1895
+ MG: [`H`, `h`],
1896
+ MH: [
1897
+ `h`,
1898
+ `hb`,
1899
+ `H`,
1900
+ `hB`
1901
+ ],
1902
+ MK: [
1903
+ `H`,
1904
+ `h`,
1905
+ `hb`,
1906
+ `hB`
1907
+ ],
1908
+ ML: [`H`],
1909
+ MM: [
1910
+ `hB`,
1911
+ `hb`,
1912
+ `H`,
1913
+ `h`
1914
+ ],
1915
+ MN: [
1916
+ `H`,
1917
+ `h`,
1918
+ `hb`,
1919
+ `hB`
1920
+ ],
1921
+ MO: [
1922
+ `h`,
1923
+ `hB`,
1924
+ `hb`,
1925
+ `H`
1926
+ ],
1927
+ MP: [
1928
+ `h`,
1929
+ `hb`,
1930
+ `H`,
1931
+ `hB`
1932
+ ],
1933
+ MQ: [`H`, `hB`],
1934
+ MR: [
1935
+ `h`,
1936
+ `hB`,
1937
+ `hb`,
1938
+ `H`
1939
+ ],
1940
+ MS: [
1941
+ `H`,
1942
+ `h`,
1943
+ `hb`,
1944
+ `hB`
1945
+ ],
1946
+ MT: [`H`, `h`],
1947
+ MU: [`H`, `h`],
1948
+ MV: [`H`, `h`],
1949
+ MW: [
1950
+ `h`,
1951
+ `hb`,
1952
+ `H`,
1953
+ `hB`
1954
+ ],
1955
+ MX: [
1956
+ `h`,
1957
+ `H`,
1958
+ `hB`,
1959
+ `hb`
1960
+ ],
1961
+ MY: [
1962
+ `hb`,
1963
+ `hB`,
1964
+ `h`,
1965
+ `H`
1966
+ ],
1967
+ MZ: [`H`, `hB`],
1968
+ NA: [
1969
+ `h`,
1970
+ `H`,
1971
+ `hB`,
1972
+ `hb`
1973
+ ],
1974
+ NC: [`H`, `hB`],
1975
+ NE: [`H`],
1976
+ NF: [
1977
+ `H`,
1978
+ `h`,
1979
+ `hb`,
1980
+ `hB`
1981
+ ],
1982
+ NG: [
1983
+ `H`,
1984
+ `h`,
1985
+ `hb`,
1986
+ `hB`
1987
+ ],
1988
+ NI: [
1989
+ `h`,
1990
+ `H`,
1991
+ `hB`,
1992
+ `hb`
1993
+ ],
1994
+ NL: [`H`, `hB`],
1995
+ NO: [`H`, `h`],
1996
+ NP: [
1997
+ `H`,
1998
+ `h`,
1999
+ `hB`
2000
+ ],
2001
+ NR: [
2002
+ `H`,
2003
+ `h`,
2004
+ `hb`,
2005
+ `hB`
2006
+ ],
2007
+ NU: [
2008
+ `H`,
2009
+ `h`,
2010
+ `hb`,
2011
+ `hB`
2012
+ ],
2013
+ NZ: [
2014
+ `h`,
2015
+ `hb`,
2016
+ `H`,
2017
+ `hB`
2018
+ ],
2019
+ OM: [
2020
+ `h`,
2021
+ `hB`,
2022
+ `hb`,
2023
+ `H`
2024
+ ],
2025
+ PA: [
2026
+ `h`,
2027
+ `H`,
2028
+ `hB`,
2029
+ `hb`
2030
+ ],
2031
+ PE: [
2032
+ `h`,
2033
+ `H`,
2034
+ `hB`,
2035
+ `hb`
2036
+ ],
2037
+ PF: [
2038
+ `H`,
2039
+ `h`,
2040
+ `hB`
2041
+ ],
2042
+ PG: [`h`, `H`],
2043
+ PH: [
2044
+ `h`,
2045
+ `hB`,
2046
+ `hb`,
2047
+ `H`
2048
+ ],
2049
+ PK: [
2050
+ `h`,
2051
+ `hB`,
2052
+ `H`
2053
+ ],
2054
+ PL: [`H`, `h`],
2055
+ PM: [`H`, `hB`],
2056
+ PN: [
2057
+ `H`,
2058
+ `h`,
2059
+ `hb`,
2060
+ `hB`
2061
+ ],
2062
+ PR: [
2063
+ `h`,
2064
+ `H`,
2065
+ `hB`,
2066
+ `hb`
2067
+ ],
2068
+ PS: [
2069
+ `h`,
2070
+ `hB`,
2071
+ `hb`,
2072
+ `H`
2073
+ ],
2074
+ PT: [`H`, `hB`],
2075
+ PW: [`h`, `H`],
2076
+ PY: [
2077
+ `h`,
2078
+ `H`,
2079
+ `hB`,
2080
+ `hb`
2081
+ ],
2082
+ QA: [
2083
+ `h`,
2084
+ `hB`,
2085
+ `hb`,
2086
+ `H`
2087
+ ],
2088
+ RE: [`H`, `hB`],
2089
+ RO: [`H`, `hB`],
2090
+ RS: [
2091
+ `H`,
2092
+ `hB`,
2093
+ `h`
2094
+ ],
2095
+ RU: [`H`],
2096
+ RW: [`H`, `h`],
2097
+ SA: [
2098
+ `h`,
2099
+ `hB`,
2100
+ `hb`,
2101
+ `H`
2102
+ ],
2103
+ SB: [
2104
+ `h`,
2105
+ `hb`,
2106
+ `H`,
2107
+ `hB`
2108
+ ],
2109
+ SC: [
2110
+ `H`,
2111
+ `h`,
2112
+ `hB`
2113
+ ],
2114
+ SD: [
2115
+ `h`,
2116
+ `hB`,
2117
+ `hb`,
2118
+ `H`
2119
+ ],
2120
+ SE: [`H`],
2121
+ SG: [
2122
+ `h`,
2123
+ `hb`,
2124
+ `H`,
2125
+ `hB`
2126
+ ],
2127
+ SH: [
2128
+ `H`,
2129
+ `h`,
2130
+ `hb`,
2131
+ `hB`
2132
+ ],
2133
+ SI: [`H`, `hB`],
2134
+ SJ: [`H`],
2135
+ SK: [`H`],
2136
+ SL: [
2137
+ `h`,
2138
+ `hb`,
2139
+ `H`,
2140
+ `hB`
2141
+ ],
2142
+ SM: [
2143
+ `H`,
2144
+ `h`,
2145
+ `hB`
2146
+ ],
2147
+ SN: [
2148
+ `H`,
2149
+ `h`,
2150
+ `hB`
2151
+ ],
2152
+ SO: [`h`, `H`],
2153
+ SR: [`H`, `hB`],
2154
+ SS: [
2155
+ `h`,
2156
+ `hb`,
2157
+ `H`,
2158
+ `hB`
2159
+ ],
2160
+ ST: [`H`, `hB`],
2161
+ SV: [
2162
+ `h`,
2163
+ `H`,
2164
+ `hB`,
2165
+ `hb`
2166
+ ],
2167
+ SX: [
2168
+ `H`,
2169
+ `h`,
2170
+ `hb`,
2171
+ `hB`
2172
+ ],
2173
+ SY: [
2174
+ `h`,
2175
+ `hB`,
2176
+ `hb`,
2177
+ `H`
2178
+ ],
2179
+ SZ: [
2180
+ `h`,
2181
+ `hb`,
2182
+ `H`,
2183
+ `hB`
2184
+ ],
2185
+ TA: [
2186
+ `H`,
2187
+ `h`,
2188
+ `hb`,
2189
+ `hB`
2190
+ ],
2191
+ TC: [
2192
+ `h`,
2193
+ `hb`,
2194
+ `H`,
2195
+ `hB`
2196
+ ],
2197
+ TD: [
2198
+ `h`,
2199
+ `H`,
2200
+ `hB`
2201
+ ],
2202
+ TF: [
2203
+ `H`,
2204
+ `h`,
2205
+ `hB`
2206
+ ],
2207
+ TG: [`H`, `hB`],
2208
+ TH: [`H`, `h`],
2209
+ TJ: [`H`, `h`],
2210
+ TL: [
2211
+ `H`,
2212
+ `hB`,
2213
+ `hb`,
2214
+ `h`
2215
+ ],
2216
+ TM: [`H`, `h`],
2217
+ TN: [
2218
+ `h`,
2219
+ `hB`,
2220
+ `hb`,
2221
+ `H`
2222
+ ],
2223
+ TO: [`h`, `H`],
2224
+ TR: [`H`, `hB`],
2225
+ TT: [
2226
+ `h`,
2227
+ `hb`,
2228
+ `H`,
2229
+ `hB`
2230
+ ],
2231
+ TW: [
2232
+ `hB`,
2233
+ `hb`,
2234
+ `h`,
2235
+ `H`
2236
+ ],
2237
+ TZ: [
2238
+ `hB`,
2239
+ `hb`,
2240
+ `H`,
2241
+ `h`
2242
+ ],
2243
+ UA: [
2244
+ `H`,
2245
+ `hB`,
2246
+ `h`
2247
+ ],
2248
+ UG: [
2249
+ `hB`,
2250
+ `hb`,
2251
+ `H`,
2252
+ `h`
2253
+ ],
2254
+ UM: [
2255
+ `h`,
2256
+ `hb`,
2257
+ `H`,
2258
+ `hB`
2259
+ ],
2260
+ US: [
2261
+ `h`,
2262
+ `hb`,
2263
+ `H`,
2264
+ `hB`
2265
+ ],
2266
+ UY: [
2267
+ `h`,
2268
+ `H`,
2269
+ `hB`,
2270
+ `hb`
2271
+ ],
2272
+ UZ: [
2273
+ `H`,
2274
+ `hB`,
2275
+ `h`
2276
+ ],
2277
+ VA: [
2278
+ `H`,
2279
+ `h`,
2280
+ `hB`
2281
+ ],
2282
+ VC: [
2283
+ `h`,
2284
+ `hb`,
2285
+ `H`,
2286
+ `hB`
2287
+ ],
2288
+ VE: [
2289
+ `h`,
2290
+ `H`,
2291
+ `hB`,
2292
+ `hb`
2293
+ ],
2294
+ VG: [
2295
+ `h`,
2296
+ `hb`,
2297
+ `H`,
2298
+ `hB`
2299
+ ],
2300
+ VI: [
2301
+ `h`,
2302
+ `hb`,
2303
+ `H`,
2304
+ `hB`
2305
+ ],
2306
+ VN: [`H`, `h`],
2307
+ VU: [`h`, `H`],
2308
+ WF: [`H`, `hB`],
2309
+ WS: [`h`, `H`],
2310
+ XK: [
2311
+ `H`,
2312
+ `hB`,
2313
+ `h`
2314
+ ],
2315
+ YE: [
2316
+ `h`,
2317
+ `hB`,
2318
+ `hb`,
2319
+ `H`
2320
+ ],
2321
+ YT: [`H`, `hB`],
2322
+ ZA: [
2323
+ `H`,
2324
+ `h`,
2325
+ `hb`,
2326
+ `hB`
2327
+ ],
2328
+ ZM: [
2329
+ `h`,
2330
+ `hb`,
2331
+ `H`,
2332
+ `hB`
2333
+ ],
2334
+ ZW: [`H`, `h`],
2335
+ "af-ZA": [
2336
+ `H`,
2337
+ `h`,
2338
+ `hB`,
2339
+ `hb`
2340
+ ],
2341
+ "ar-001": [
2342
+ `h`,
2343
+ `hB`,
2344
+ `hb`,
2345
+ `H`
2346
+ ],
2347
+ "ca-ES": [
2348
+ `H`,
2349
+ `h`,
2350
+ `hB`
2351
+ ],
2352
+ "en-001": [
2353
+ `h`,
2354
+ `hb`,
2355
+ `H`,
2356
+ `hB`
2357
+ ],
2358
+ "en-HK": [
2359
+ `h`,
2360
+ `hb`,
2361
+ `H`,
2362
+ `hB`
2363
+ ],
2364
+ "en-IL": [
2365
+ `H`,
2366
+ `h`,
2367
+ `hb`,
2368
+ `hB`
2369
+ ],
2370
+ "en-MY": [
2371
+ `h`,
2372
+ `hb`,
2373
+ `H`,
2374
+ `hB`
2375
+ ],
2376
+ "es-BR": [
2377
+ `H`,
2378
+ `h`,
2379
+ `hB`,
2380
+ `hb`
2381
+ ],
2382
+ "es-ES": [
2383
+ `H`,
2384
+ `h`,
2385
+ `hB`,
2386
+ `hb`
2387
+ ],
2388
+ "es-GQ": [
2389
+ `H`,
2390
+ `h`,
2391
+ `hB`,
2392
+ `hb`
2393
+ ],
2394
+ "fr-CA": [
2395
+ `H`,
2396
+ `h`,
2397
+ `hB`
2398
+ ],
2399
+ "gl-ES": [
2400
+ `H`,
2401
+ `h`,
2402
+ `hB`
2403
+ ],
2404
+ "gu-IN": [
2405
+ `hB`,
2406
+ `hb`,
2407
+ `h`,
2408
+ `H`
2409
+ ],
2410
+ "hi-IN": [
2411
+ `hB`,
2412
+ `h`,
2413
+ `H`
2414
+ ],
2415
+ "it-CH": [
2416
+ `H`,
2417
+ `h`,
2418
+ `hB`
2419
+ ],
2420
+ "it-IT": [
2421
+ `H`,
2422
+ `h`,
2423
+ `hB`
2424
+ ],
2425
+ "kn-IN": [
2426
+ `hB`,
2427
+ `h`,
2428
+ `H`
2429
+ ],
2430
+ "ml-IN": [
2431
+ `hB`,
2432
+ `h`,
2433
+ `H`
2434
+ ],
2435
+ "mr-IN": [
2436
+ `hB`,
2437
+ `hb`,
2438
+ `h`,
2439
+ `H`
2440
+ ],
2441
+ "pa-IN": [
2442
+ `hB`,
2443
+ `hb`,
2444
+ `h`,
2445
+ `H`
2446
+ ],
2447
+ "ta-IN": [
2448
+ `hB`,
2449
+ `h`,
2450
+ `hb`,
2451
+ `H`
2452
+ ],
2453
+ "te-IN": [
2454
+ `hB`,
2455
+ `h`,
2456
+ `H`
2457
+ ],
2458
+ "zu-ZA": [
2459
+ `H`,
2460
+ `hB`,
2461
+ `hb`,
2462
+ `h`
2463
+ ]
2464
+ };
2465
+ })), vt = p(((e) => {
2466
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
2467
+ var t = _t();
2468
+ function n(e, t) {
2469
+ for (var n = ``, i = 0; i < e.length; i++) {
2470
+ var a = e.charAt(i);
2471
+ if (a === `j`) {
2472
+ for (var o = 0; i + 1 < e.length && e.charAt(i + 1) === a;) o++, i++;
2473
+ var s = 1 + (o & 1), c = o < 2 ? 1 : 3 + (o >> 1), l = `a`, u = r(t);
2474
+ for ((u == `H` || u == `k`) && (c = 0); c-- > 0;) n += l;
2475
+ for (; s-- > 0;) n = u + n;
2476
+ } else a === `J` ? n += `H` : n += a;
2477
+ }
2478
+ return n;
2479
+ }
2480
+ function r(e) {
2481
+ var n = e.hourCycle;
2482
+ if (n === void 0 && e.hourCycles && e.hourCycles.length && (n = e.hourCycles[0]), n) switch (n) {
2483
+ case `h24`: return `k`;
2484
+ case `h23`: return `H`;
2485
+ case `h12`: return `h`;
2486
+ case `h11`: return `K`;
2487
+ default: throw Error(`Invalid hourCycle`);
2488
+ }
2489
+ var r = e.language, i;
2490
+ return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
2491
+ }
2492
+ })), yt = p(((e) => {
2493
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
2494
+ 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}*\$`);
2495
+ function l(e, t) {
2496
+ return {
2497
+ start: e,
2498
+ end: t
2499
+ };
2500
+ }
2501
+ var u = !!String.prototype.startsWith && `_a`.startsWith(`a`, 1), d = !!String.fromCodePoint, f = !!Object.fromEntries, p = !!String.prototype.codePointAt, m = !!String.prototype.trimStart, h = !!String.prototype.trimEnd, _ = Number.isSafeInteger ? Number.isSafeInteger : function(e) {
2502
+ return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2503
+ }, v = !0;
2504
+ try {
2505
+ v = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
2506
+ } catch {
2507
+ v = !1;
2508
+ }
2509
+ var ee = u ? function(e, t, n) {
2510
+ return e.startsWith(t, n);
2511
+ } : function(e, t, n) {
2512
+ return e.slice(n, n + t.length) === t;
2513
+ }, y = d ? String.fromCodePoint : function() {
2514
+ for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
2515
+ if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
2516
+ t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
2517
+ }
2518
+ return t;
2519
+ }, b = f ? Object.fromEntries : function(e) {
2520
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
2521
+ var i = r[n], a = i[0];
2522
+ t[a] = i[1];
2523
+ }
2524
+ return t;
2525
+ }, x = p ? function(e, t) {
2526
+ return e.codePointAt(t);
2527
+ } : function(e, t) {
2528
+ var n = e.length;
2529
+ if (!(t < 0 || t >= n)) {
2530
+ var r = e.charCodeAt(t), i;
2531
+ return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
2532
+ }
2533
+ }, te = m ? function(e) {
2534
+ return e.trimStart();
2535
+ } : function(e) {
2536
+ return e.replace(s, ``);
2537
+ }, ne = h ? function(e) {
2538
+ return e.trimEnd();
2539
+ } : function(e) {
2540
+ return e.replace(c, ``);
2541
+ };
2542
+ function S(e, t) {
2543
+ return new RegExp(e, t);
2544
+ }
2545
+ var C;
2546
+ if (v) {
2547
+ var w = S(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2548
+ C = function(e, t) {
2549
+ return w.lastIndex = t, w.exec(e)[1] ?? ``;
2550
+ };
2551
+ } else C = function(e, t) {
2552
+ for (var n = [];;) {
2553
+ var r = x(e, t);
2554
+ if (r === void 0 || ie(r) || D(r)) break;
2555
+ n.push(r), t += r >= 65536 ? 2 : 1;
2556
+ }
2557
+ return y.apply(void 0, n);
2558
+ };
2559
+ e.Parser = function() {
2560
+ function e(e, t) {
2561
+ t === void 0 && (t = {}), this.message = e, this.position = {
2562
+ offset: 0,
2563
+ line: 1,
2564
+ column: 1
2565
+ }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons;
2566
+ }
2567
+ return e.prototype.parse = function() {
2568
+ if (this.offset() !== 0) throw Error(`parser can only be used once`);
2569
+ return this.parseMessage(0, ``, !1);
2570
+ }, e.prototype.parseMessage = function(e, t, i) {
2571
+ for (var a = []; !this.isEOF();) {
2572
+ var o = this.char();
2573
+ if (o === 123) {
2574
+ var s = this.parseArgument(e, i);
2575
+ if (s.err) return s;
2576
+ a.push(s.val);
2577
+ } else if (o === 125 && e > 0) break;
2578
+ else if (o === 35 && (t === `plural` || t === `selectordinal`)) {
2579
+ var c = this.clonePosition();
2580
+ this.bump(), a.push({
2581
+ type: r.TYPE.pound,
2582
+ location: l(c, this.clonePosition())
2583
+ });
2584
+ } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2585
+ if (i) break;
2586
+ return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
2587
+ } else if (o === 60 && !this.ignoreTag && T(this.peek() || 0)) {
2588
+ var s = this.parseTag(e, t);
2589
+ if (s.err) return s;
2590
+ a.push(s.val);
2591
+ } else {
2592
+ var s = this.parseLiteral(e, t);
2593
+ if (s.err) return s;
2594
+ a.push(s.val);
2595
+ }
2596
+ }
2597
+ return {
2598
+ val: a,
2599
+ err: null
2600
+ };
2601
+ }, e.prototype.parseTag = function(e, t) {
2602
+ var i = this.clonePosition();
2603
+ this.bump();
2604
+ var a = this.parseTagName();
2605
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return {
2606
+ val: {
2607
+ type: r.TYPE.literal,
2608
+ value: `<${a}/>`,
2609
+ location: l(i, this.clonePosition())
2610
+ },
2611
+ err: null
2612
+ };
2613
+ if (this.bumpIf(`>`)) {
2614
+ var o = this.parseMessage(e + 1, t, !0);
2615
+ if (o.err) return o;
2616
+ var s = o.val, c = this.clonePosition();
2617
+ if (this.bumpIf(`</`)) {
2618
+ if (this.isEOF() || !T(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
2619
+ var u = this.clonePosition();
2620
+ return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
2621
+ val: {
2622
+ type: r.TYPE.tag,
2623
+ value: a,
2624
+ children: s,
2625
+ location: l(i, this.clonePosition())
2626
+ },
2627
+ err: null
2628
+ } : this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()))) : this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(u, this.clonePosition()));
2629
+ } else return this.error(n.ErrorKind.UNCLOSED_TAG, l(i, this.clonePosition()));
2630
+ } else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
2631
+ }, e.prototype.parseTagName = function() {
2632
+ var e = this.offset();
2633
+ for (this.bump(); !this.isEOF() && E(this.char());) this.bump();
2634
+ return this.message.slice(e, this.offset());
2635
+ }, e.prototype.parseLiteral = function(e, t) {
2636
+ for (var n = this.clonePosition(), i = ``;;) {
2637
+ var a = this.tryParseQuote(t);
2638
+ if (a) {
2639
+ i += a;
2640
+ continue;
2641
+ }
2642
+ var o = this.tryParseUnquoted(e, t);
2643
+ if (o) {
2644
+ i += o;
2645
+ continue;
2646
+ }
2647
+ var s = this.tryParseLeftAngleBracket();
2648
+ if (s) {
2649
+ i += s;
2650
+ continue;
2651
+ }
2652
+ break;
2653
+ }
2654
+ var c = l(n, this.clonePosition());
2655
+ return {
2656
+ val: {
2657
+ type: r.TYPE.literal,
2658
+ value: i,
2659
+ location: c
2660
+ },
2661
+ err: null
2662
+ };
2663
+ }, e.prototype.tryParseLeftAngleBracket = function() {
2664
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !re(this.peek() || 0)) ? (this.bump(), `<`) : null;
2665
+ }, e.prototype.tryParseQuote = function(e) {
2666
+ if (this.isEOF() || this.char() !== 39) return null;
2667
+ switch (this.peek()) {
2668
+ case 39: return this.bump(), this.bump(), `'`;
2669
+ case 123:
2670
+ case 60:
2671
+ case 62:
2672
+ case 125: break;
2673
+ case 35:
2674
+ if (e === `plural` || e === `selectordinal`) break;
2675
+ return null;
2676
+ default: return null;
2677
+ }
2678
+ this.bump();
2679
+ var t = [this.char()];
2680
+ for (this.bump(); !this.isEOF();) {
2681
+ var n = this.char();
2682
+ if (n === 39) if (this.peek() === 39) t.push(39), this.bump();
2683
+ else {
2684
+ this.bump();
2685
+ break;
2686
+ }
2687
+ else t.push(n);
2688
+ this.bump();
2689
+ }
2690
+ return y.apply(void 0, t);
2691
+ }, e.prototype.tryParseUnquoted = function(e, t) {
2692
+ if (this.isEOF()) return null;
2693
+ var n = this.char();
2694
+ return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), y(n));
2695
+ }, e.prototype.parseArgument = function(e, t) {
2696
+ var i = this.clonePosition();
2697
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2698
+ if (this.char() === 125) return this.bump(), this.error(n.ErrorKind.EMPTY_ARGUMENT, l(i, this.clonePosition()));
2699
+ var a = this.parseIdentifierIfPossible().value;
2700
+ if (!a) return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2701
+ if (this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2702
+ switch (this.char()) {
2703
+ case 125: return this.bump(), {
2704
+ val: {
2705
+ type: r.TYPE.argument,
2706
+ value: a,
2707
+ location: l(i, this.clonePosition())
2708
+ },
2709
+ err: null
2710
+ };
2711
+ case 44: return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition())) : this.parseArgumentOptions(e, t, a, i);
2712
+ default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2713
+ }
2714
+ }, e.prototype.parseIdentifierIfPossible = function() {
2715
+ var e = this.clonePosition(), t = this.offset(), n = C(this.message, t), r = t + n.length;
2716
+ return this.bumpTo(r), {
2717
+ value: n,
2718
+ location: l(e, this.clonePosition())
2719
+ };
2720
+ }, e.prototype.parseArgumentOptions = function(e, i, s, c) {
2721
+ var u = this.clonePosition(), d = this.parseIdentifierIfPossible().value, f = this.clonePosition();
2722
+ switch (d) {
2723
+ case ``: return this.error(n.ErrorKind.EXPECT_ARGUMENT_TYPE, l(u, f));
2724
+ case `number`:
2725
+ case `date`:
2726
+ case `time`:
2727
+ this.bumpSpace();
2728
+ var p = null;
2729
+ if (this.bumpIf(`,`)) {
2730
+ this.bumpSpace();
2731
+ var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
2732
+ if (h.err) return h;
2733
+ var g = ne(h.val);
2734
+ if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
2735
+ p = {
2736
+ style: g,
2737
+ styleLocation: l(m, this.clonePosition())
2738
+ };
2739
+ }
2740
+ var _ = this.tryParseArgumentClose(c);
2741
+ if (_.err) return _;
2742
+ var v = l(c, this.clonePosition());
2743
+ if (p && ee(p?.style, `::`, 0)) {
2744
+ var y = te(p.style.slice(2));
2745
+ if (d === `number`) {
2746
+ var h = this.parseNumberSkeletonFromString(y, p.styleLocation);
2747
+ return h.err ? h : {
2748
+ val: {
2749
+ type: r.TYPE.number,
2750
+ value: s,
2751
+ location: v,
2752
+ style: h.val
2753
+ },
2754
+ err: null
2755
+ };
2756
+ } else {
2757
+ if (y.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
2758
+ var x = y;
2759
+ this.locale && (x = (0, o.getBestPattern)(y, this.locale));
2760
+ var g = {
2761
+ type: r.SKELETON_TYPE.dateTime,
2762
+ pattern: x,
2763
+ location: p.styleLocation,
2764
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseDateTimeSkeleton)(x) : {}
2765
+ };
2766
+ return {
2767
+ val: {
2768
+ type: d === `date` ? r.TYPE.date : r.TYPE.time,
2769
+ value: s,
2770
+ location: v,
2771
+ style: g
2772
+ },
2773
+ err: null
2774
+ };
2775
+ }
2776
+ }
2777
+ return {
2778
+ val: {
2779
+ type: d === `number` ? r.TYPE.number : d === `date` ? r.TYPE.date : r.TYPE.time,
2780
+ value: s,
2781
+ location: v,
2782
+ style: p?.style ?? null
2783
+ },
2784
+ err: null
2785
+ };
2786
+ case `plural`:
2787
+ case `selectordinal`:
2788
+ case `select`:
2789
+ var S = this.clonePosition();
2790
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(S, t.__assign({}, S)));
2791
+ this.bumpSpace();
2792
+ var C = this.parseIdentifierIfPossible(), w = 0;
2793
+ if (d !== `select` && C.value === `offset`) {
2794
+ if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
2795
+ this.bumpSpace();
2796
+ var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2797
+ if (h.err) return h;
2798
+ this.bumpSpace(), C = this.parseIdentifierIfPossible(), w = h.val;
2799
+ }
2800
+ var T = this.tryParsePluralOrSelectOptions(e, d, i, C);
2801
+ if (T.err) return T;
2802
+ var _ = this.tryParseArgumentClose(c);
2803
+ if (_.err) return _;
2804
+ var re = l(c, this.clonePosition());
2805
+ return d === `select` ? {
2806
+ val: {
2807
+ type: r.TYPE.select,
2808
+ value: s,
2809
+ options: b(T.val),
2810
+ location: re
2811
+ },
2812
+ err: null
2813
+ } : {
2814
+ val: {
2815
+ type: r.TYPE.plural,
2816
+ value: s,
2817
+ options: b(T.val),
2818
+ offset: w,
2819
+ pluralType: d === `plural` ? `cardinal` : `ordinal`,
2820
+ location: re
2821
+ },
2822
+ err: null
2823
+ };
2824
+ default: return this.error(n.ErrorKind.INVALID_ARGUMENT_TYPE, l(u, f));
2825
+ }
2826
+ }, e.prototype.tryParseArgumentClose = function(e) {
2827
+ return this.isEOF() || this.char() !== 125 ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(e, this.clonePosition())) : (this.bump(), {
2828
+ val: !0,
2829
+ err: null
2830
+ });
2831
+ }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2832
+ for (var e = 0, t = this.clonePosition(); !this.isEOF();) switch (this.char()) {
2833
+ case 39:
2834
+ this.bump();
2835
+ var r = this.clonePosition();
2836
+ if (!this.bumpUntil(`'`)) return this.error(n.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, l(r, this.clonePosition()));
2837
+ this.bump();
2838
+ break;
2839
+ case 123:
2840
+ e += 1, this.bump();
2841
+ break;
2842
+ case 125:
2843
+ if (e > 0) --e;
2844
+ else return {
2845
+ val: this.message.slice(t.offset, this.offset()),
2846
+ err: null
2847
+ };
2848
+ break;
2849
+ default:
2850
+ this.bump();
2851
+ break;
2852
+ }
2853
+ return {
2854
+ val: this.message.slice(t.offset, this.offset()),
2855
+ err: null
2856
+ };
2857
+ }, e.prototype.parseNumberSkeletonFromString = function(e, t) {
2858
+ var i = [];
2859
+ try {
2860
+ i = (0, a.parseNumberSkeletonFromString)(e);
2861
+ } catch {
2862
+ return this.error(n.ErrorKind.INVALID_NUMBER_SKELETON, t);
2863
+ }
2864
+ return {
2865
+ val: {
2866
+ type: r.SKELETON_TYPE.number,
2867
+ tokens: i,
2868
+ location: t,
2869
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseNumberSkeleton)(i) : {}
2870
+ },
2871
+ err: null
2872
+ };
2873
+ }, e.prototype.tryParsePluralOrSelectOptions = function(e, t, r, i) {
2874
+ for (var a, o = !1, s = [], c = /* @__PURE__ */ new Set(), u = i.value, d = i.location;;) {
2875
+ if (u.length === 0) {
2876
+ var f = this.clonePosition();
2877
+ if (t !== `select` && this.bumpIf(`=`)) {
2878
+ var p = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, n.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2879
+ if (p.err) return p;
2880
+ d = l(f, this.clonePosition()), u = this.message.slice(f.offset, this.offset());
2881
+ } else break;
2882
+ }
2883
+ if (c.has(u)) return this.error(t === `select` ? n.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, d);
2884
+ u === `other` && (o = !0), this.bumpSpace();
2885
+ var m = this.clonePosition();
2886
+ if (!this.bumpIf(`{`)) return this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, l(this.clonePosition(), this.clonePosition()));
2887
+ var h = this.parseMessage(e + 1, t, r);
2888
+ if (h.err) return h;
2889
+ var g = this.tryParseArgumentClose(m);
2890
+ if (g.err) return g;
2891
+ s.push([u, {
2892
+ value: h.val,
2893
+ location: l(m, this.clonePosition())
2894
+ }]), c.add(u), this.bumpSpace(), a = this.parseIdentifierIfPossible(), u = a.value, d = a.location;
2895
+ }
2896
+ return s.length === 0 ? this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, l(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(n.ErrorKind.MISSING_OTHER_CLAUSE, l(this.clonePosition(), this.clonePosition())) : {
2897
+ val: s,
2898
+ err: null
2899
+ };
2900
+ }, e.prototype.tryParseDecimalInteger = function(e, t) {
2901
+ var n = 1, r = this.clonePosition();
2902
+ this.bumpIf(`+`) || this.bumpIf(`-`) && (n = -1);
2903
+ for (var i = !1, a = 0; !this.isEOF();) {
2904
+ var o = this.char();
2905
+ if (o >= 48 && o <= 57) i = !0, a = a * 10 + (o - 48), this.bump();
2906
+ else break;
2907
+ }
2908
+ var s = l(r, this.clonePosition());
2909
+ return i ? (a *= n, _(a) ? {
2910
+ val: a,
2911
+ err: null
2912
+ } : this.error(t, s)) : this.error(e, s);
2913
+ }, e.prototype.offset = function() {
2914
+ return this.position.offset;
2915
+ }, e.prototype.isEOF = function() {
2916
+ return this.offset() === this.message.length;
2917
+ }, e.prototype.clonePosition = function() {
2918
+ return {
2919
+ offset: this.position.offset,
2920
+ line: this.position.line,
2921
+ column: this.position.column
2922
+ };
2923
+ }, e.prototype.char = function() {
2924
+ var e = this.position.offset;
2925
+ if (e >= this.message.length) throw Error(`out of bound`);
2926
+ var t = x(this.message, e);
2927
+ if (t === void 0) throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);
2928
+ return t;
2929
+ }, e.prototype.error = function(e, t) {
2930
+ return {
2931
+ val: null,
2932
+ err: {
2933
+ kind: e,
2934
+ message: this.message,
2935
+ location: t
2936
+ }
2937
+ };
2938
+ }, e.prototype.bump = function() {
2939
+ if (!this.isEOF()) {
2940
+ var e = this.char();
2941
+ 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);
2942
+ }
2943
+ }, e.prototype.bumpIf = function(e) {
2944
+ if (ee(this.message, e, this.offset())) {
2945
+ for (var t = 0; t < e.length; t++) this.bump();
2946
+ return !0;
2947
+ }
2948
+ return !1;
2949
+ }, e.prototype.bumpUntil = function(e) {
2950
+ var t = this.offset(), n = this.message.indexOf(e, t);
2951
+ return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
2952
+ }, e.prototype.bumpTo = function(e) {
2953
+ if (this.offset() > e) throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);
2954
+ for (e = Math.min(e, this.message.length);;) {
2955
+ var t = this.offset();
2956
+ if (t === e) break;
2957
+ if (t > e) throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);
2958
+ if (this.bump(), this.isEOF()) break;
2959
+ }
2960
+ }, e.prototype.bumpSpace = function() {
2961
+ for (; !this.isEOF() && ie(this.char());) this.bump();
2962
+ }, e.prototype.peek = function() {
2963
+ if (this.isEOF()) return null;
2964
+ var e = this.char(), t = this.offset();
2965
+ return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
2966
+ }, e;
2967
+ }();
2968
+ function T(e) {
2969
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
2970
+ }
2971
+ function re(e) {
2972
+ return T(e) || e === 47;
2973
+ }
2974
+ function E(e) {
2975
+ 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;
2976
+ }
2977
+ function ie(e) {
2978
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
2979
+ }
2980
+ function D(e) {
2981
+ 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;
2982
+ }
2983
+ })), bt = p(((e) => {
2984
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
2985
+ var t = (R(), g(M)), n = z();
2986
+ function r(e) {
2987
+ return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
2988
+ return t[n] = r(e[n]), t;
2989
+ }, {}) : e;
2990
+ }
2991
+ function i(e, n, i) {
2992
+ var a = r(n), o = a.options;
2993
+ return a.options = Object.keys(o).reduce(function(n, r) {
2994
+ return n[r] = { value: s(t.__spreadArray(t.__spreadArray(t.__spreadArray([], e.slice(0, i), !0), o[r].value, !0), e.slice(i + 1), !0)) }, n;
2995
+ }, {}), a;
2996
+ }
2997
+ function a(e) {
2998
+ return (0, n.isPluralElement)(e) || (0, n.isSelectElement)(e);
2999
+ }
3000
+ function o(e) {
3001
+ return !!e.find(function(e) {
3002
+ return a(e) ? !0 : (0, n.isTagElement)(e) ? o(e.children) : !1;
3003
+ });
3004
+ }
3005
+ function s(e) {
3006
+ for (var t = 0; t < e.length; t++) {
3007
+ var r = e[t];
3008
+ if (a(r)) return [i(e, r, t)];
3009
+ if ((0, n.isTagElement)(r) && o([r])) throw Error(`Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option`);
3010
+ }
3011
+ return e;
3012
+ }
3013
+ function c(e, t) {
3014
+ t === void 0 && (t = /* @__PURE__ */ new Map()), e.forEach(function(e) {
3015
+ if ((0, n.isArgumentElement)(e) || (0, n.isDateElement)(e) || (0, n.isTimeElement)(e) || (0, n.isNumberElement)(e)) {
3016
+ if (e.value in t && t.get(e.value) !== e.type) throw Error(`Variable ${e.value} has conflicting types`);
3017
+ t.set(e.value, e.type);
3018
+ }
3019
+ ((0, n.isPluralElement)(e) || (0, n.isSelectElement)(e)) && (t.set(e.value, e.type), Object.keys(e.options).forEach(function(n) {
3020
+ c(e.options[n].value, t);
3021
+ })), (0, n.isTagElement)(e) && (t.set(e.value, e.type), c(e.children, t));
3022
+ });
3023
+ }
3024
+ function l(e, t) {
3025
+ var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
3026
+ return c(e, r), c(t, i), r.size === i.size ? Array.from(r.entries()).reduce(function(e, t) {
3027
+ var r = t[0], a = t[1];
3028
+ if (!e.success) return e;
3029
+ var o = i.get(r);
3030
+ return o == null ? {
3031
+ success: !1,
3032
+ error: Error(`Missing variable ${r} in message`)
3033
+ } : o === a ? e : {
3034
+ success: !1,
3035
+ error: Error(`Variable ${r} has conflicting types: ${n.TYPE[a]} vs ${n.TYPE[o]}`)
3036
+ };
3037
+ }, { success: !0 }) : {
3038
+ success: !1,
3039
+ error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
3040
+ };
3041
+ }
3042
+ })), xt = p(((e) => {
3043
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
3044
+ var t = (R(), g(M)), n = dt(), r = yt(), i = z();
3045
+ function a(e) {
3046
+ e.forEach(function(e) {
3047
+ 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);
3048
+ else (0, i.isNumberElement)(e) && (0, i.isNumberSkeleton)(e.style) || ((0, i.isDateElement)(e) || (0, i.isTimeElement)(e)) && (0, i.isDateTimeSkeleton)(e.style) ? delete e.style.location : (0, i.isTagElement)(e) && a(e.children);
3049
+ });
3050
+ }
3051
+ function o(e, i) {
3052
+ i === void 0 && (i = {}), i = t.__assign({
3053
+ shouldParseSkeletons: !0,
3054
+ requiresOtherClause: !0
3055
+ }, i);
3056
+ var o = new r.Parser(e, i).parse();
3057
+ if (o.err) {
3058
+ var s = SyntaxError(n.ErrorKind[o.err.kind]);
3059
+ throw s.location = o.err.location, s.originalMessage = o.err.message, s;
3060
+ }
3061
+ return i?.captureLocation || a(o.val), o.val;
3062
+ }
3063
+ t.__exportStar(z(), e), e._Parser = r.Parser;
3064
+ var s = bt();
3065
+ Object.defineProperty(e, `isStructurallySame`, {
3066
+ enumerable: !0,
3067
+ get: function() {
3068
+ return s.isStructurallySame;
3069
+ }
3070
+ });
3071
+ })), St = p(((e) => {
3072
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
3073
+ var t = (R(), g(M)), n = z();
3074
+ function r(e) {
3075
+ return i(e, !1);
3076
+ }
3077
+ function i(e, t) {
3078
+ return e.map(function(r, i) {
3079
+ if ((0, n.isLiteralElement)(r)) return s(r, t, i === 0, i === e.length - 1);
3080
+ if ((0, n.isArgumentElement)(r)) return c(r);
3081
+ if ((0, n.isDateElement)(r) || (0, n.isTimeElement)(r) || (0, n.isNumberElement)(r)) return l(r);
3082
+ if ((0, n.isPluralElement)(r)) return m(r);
3083
+ if ((0, n.isSelectElement)(r)) return p(r);
3084
+ if ((0, n.isPoundElement)(r)) return `#`;
3085
+ if ((0, n.isTagElement)(r)) return a(r);
3086
+ }).join(``);
3087
+ }
3088
+ function a(e) {
3089
+ return `<${e.value}>${r(e.children)}</${e.value}>`;
3090
+ }
3091
+ function o(e) {
3092
+ return e.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
3093
+ }
3094
+ function s(e, t, n, r) {
3095
+ var i = e.value;
3096
+ return !n && i[0] === `'` && (i = `''${i.slice(1)}`), !r && i[i.length - 1] === `'` && (i = `${i.slice(0, i.length - 1)}''`), i = o(i), t ? i.replace(`#`, `'#'`) : i;
3097
+ }
3098
+ function c(e) {
3099
+ return `{${e.value}}`;
3100
+ }
3101
+ function l(e) {
3102
+ return `{${e.value}, ${n.TYPE[e.type]}${e.style ? `, ${d(e.style)}` : ``}}`;
3103
+ }
3104
+ function u(e) {
3105
+ var t = e.stem, n = e.options;
3106
+ return n.length === 0 ? t : `${t}${n.map(function(e) {
3107
+ return `/${e}`;
3108
+ }).join(``)}`;
3109
+ }
3110
+ function d(e) {
3111
+ return typeof e == `string` ? o(e) : e.type === n.SKELETON_TYPE.dateTime ? `::${f(e)}` : `::${e.tokens.map(u).join(` `)}`;
3112
+ }
3113
+ function f(e) {
3114
+ return e.pattern;
3115
+ }
3116
+ function p(e) {
3117
+ return `{${[
3118
+ e.value,
3119
+ `select`,
3120
+ Object.keys(e.options).map(function(t) {
3121
+ return `${t}{${i(e.options[t].value, !1)}}`;
3122
+ }).join(` `)
3123
+ ].join(`,`)}}`;
3124
+ }
3125
+ function m(e) {
3126
+ var n = e.pluralType === `cardinal` ? `plural` : `selectordinal`;
3127
+ return `{${[
3128
+ e.value,
3129
+ n,
3130
+ t.__spreadArray([e.offset ? `offset:${e.offset}` : ``], Object.keys(e.options).map(function(t) {
3131
+ return `${t}{${i(e.options[t].value, !0)}}`;
3132
+ }), !0).filter(Boolean).join(` `)
3133
+ ].join(`,`)}}`;
3134
+ }
3135
+ })), B = xt(), V = z(), Ct = St();
3136
+ const wt = [
3137
+ `singular`,
3138
+ `plural`,
3139
+ `dual`,
3140
+ `zero`,
3141
+ `one`,
3142
+ `two`,
3143
+ `few`,
3144
+ `many`,
3145
+ `other`
3146
+ ];
3147
+ function Tt(e) {
3148
+ return wt.includes(e);
3149
+ }
3150
+ function Et(e, t = wt, n = [`en`]) {
3151
+ let r = Me(n).select(e), i = Math.abs(e);
3152
+ if (i === 0 && t.includes(`zero`)) return `zero`;
3153
+ if (i === 1) {
3154
+ if (t.includes(`singular`)) return `singular`;
3155
+ if (t.includes(`one`)) return `one`;
3156
+ }
3157
+ if (r === `one` && t.includes(`singular`)) return `singular`;
3158
+ if (i === 2) {
3159
+ if (t.includes(`dual`)) return `dual`;
3160
+ if (t.includes(`two`)) return `two`;
3161
+ }
3162
+ 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` : ``;
3163
+ }
3164
+ const Dt = {
3165
+ variable: `v`,
3166
+ number: `n`,
3167
+ datetime: `d`,
3168
+ currency: `c`,
3169
+ "relative-time": `rt`
3170
+ };
3171
+ function Ot(e) {
3172
+ return Dt[e];
3173
+ }
3174
+ function H({ icuString: e, shouldVisit: t, visitor: n, options: { recurseIntoVisited: r = !0, ...i } }) {
3175
+ let a = (0, B.parse)(e, i);
3176
+ return o(a), a;
3177
+ function o(e) {
3178
+ e.map(s);
3179
+ }
3180
+ function s(e) {
3181
+ let i = !1;
3182
+ t(e) && (n(e), i = !0), (!i || r) && (e.type === B.TYPE.select || e.type === B.TYPE.plural ? Object.values(e.options).map((e) => e.value).map(o) : e.type === B.TYPE.tag && o(e.children));
3183
+ }
3184
+ }
3185
+ const U = `_gt_`, kt = RegExp(`^${U}\\d+$`), At = RegExp(`^${U}$`);
3186
+ function jt(e) {
3187
+ return e.type === V.TYPE.select && kt.test(e.value) && !!e.options.other && (e.options.other.value.length === 0 || e.options.other.value.length > 0 && e.options.other.value[0]?.type === V.TYPE.literal);
3188
+ }
3189
+ function Mt(e) {
3190
+ return e.type === V.TYPE.select && At.test(e.value) && !!e.options.other && (e.options.other.value.length === 0 || e.options.other.value.length > 0 && e.options.other.value[0]?.type === V.TYPE.literal);
3191
+ }
3192
+ function Nt(e) {
3193
+ if (!e.includes(`_gt_`)) return e;
3194
+ let t = [];
3195
+ function n(e) {
3196
+ t.push({
3197
+ start: e.location?.start.offset ?? 0,
3198
+ end: e.location?.end.offset ?? 0,
3199
+ value: e.options.other.value.length > 0 ? e.options.other.value[0].value : ``
3200
+ });
3201
+ }
3202
+ H({
3203
+ icuString: e,
3204
+ shouldVisit: Mt,
3205
+ visitor: n,
3206
+ options: {
3207
+ recurseIntoVisited: !1,
3208
+ captureLocation: !0
3209
+ }
3210
+ });
3211
+ let r = 0, i = [];
3212
+ for (let n = 0; n < t.length; n++) i.push(e.slice(r, t[n].start)), i.push(t[n].value), r = t[n].end;
3213
+ return r < e.length && i.push(e.slice(r)), i.join(``);
3214
+ }
3215
+ function Pt(e) {
3216
+ let t = e.replace(/'/g, `''`), n = /[{}<>]/, r = t.search(n);
3217
+ if (r === -1) return t;
3218
+ let i = -1;
3219
+ for (let e = t.length - 1; e >= 0; e--) if (n.test(t[e])) {
3220
+ i = e;
3221
+ break;
3222
+ }
3223
+ return t = t.slice(0, r) + `'` + t.slice(r, i + 1) + `'` + t.slice(i + 1), t;
3224
+ }
3225
+ function Ft(e, t) {
3226
+ let n = ` other {${Pt(String(e ?? ``))}}`, r = ``;
3227
+ return t?.$name && (r = ` _gt_var_name {${Pt(t.$name)}}`), `{${U}, select,${n}${r}}`;
3228
+ }
3229
+ function It(e) {
3230
+ return e;
3231
+ }
3232
+ const Lt = It;
3233
+ function Rt(e) {
3234
+ if (!e.includes(`_gt_`)) return e;
3235
+ let t = [];
3236
+ function n(e) {
3237
+ t.push({
3238
+ start: e.location?.start.offset ?? 0,
3239
+ end: e.location?.end.offset ?? 0,
3240
+ otherStart: e.options.other.location?.start.offset ?? 0,
3241
+ otherEnd: e.options.other.location?.end.offset ?? 0
3242
+ });
3243
+ }
3244
+ H({
3245
+ icuString: e,
3246
+ shouldVisit: Mt,
3247
+ visitor: n,
3248
+ options: {
3249
+ recurseIntoVisited: !1,
3250
+ captureLocation: !0
3251
+ }
3252
+ });
3253
+ let r = [], i = 0;
3254
+ for (let n = 0; n < t.length; n++) {
3255
+ let { start: a, end: o, otherStart: s, otherEnd: c } = t[n];
3256
+ r.push(e.slice(i, a)), r.push(e.slice(a, a + 4 + 1)), r.push(String(n + 1)), r.push(e.slice(a + 4 + 1, s)), r.push(`{}`), r.push(e.slice(c, o)), i = o;
3257
+ }
3258
+ return r.push(e.slice(i, e.length)), r.join(``);
3259
+ }
3260
+ function zt(e) {
3261
+ if (!e.includes(`_gt_`)) return {};
3262
+ let t = 1, n = {};
3263
+ function r(e) {
3264
+ n[e.value + t] = e.options.other.value.length ? e.options.other.value[0]?.value : ``, t += 1;
3265
+ }
3266
+ return H({
3267
+ icuString: e,
3268
+ shouldVisit: Mt,
3269
+ visitor: r,
3270
+ options: { recurseIntoVisited: !1 }
3271
+ }), n;
3272
+ }
3273
+ function Bt(e) {
3274
+ if (!e.includes(`_gt_`)) return e;
3275
+ function t(e) {
3276
+ e.type = V.TYPE.argument, Reflect.deleteProperty(e, `options`);
3277
+ }
3278
+ return (0, Ct.printAST)(H({
3279
+ icuString: e,
3280
+ shouldVisit: jt,
3281
+ visitor: t,
3282
+ options: { recurseIntoVisited: !1 }
3283
+ }));
3284
+ }
3285
+ function Vt(e, n = 0) {
3286
+ let r = n, a = (e) => {
3287
+ let { type: t, props: n } = e;
3288
+ r += 1;
3289
+ let i = {
3290
+ id: r,
3291
+ injectionType: `manual`
3292
+ }, a;
3293
+ try {
3294
+ a = typeof t == `function` ? t._gtt : void 0;
3295
+ } catch {}
3296
+ if (a) {
3297
+ let e = a.split(`-`);
3298
+ 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`) {
3299
+ let e = Object.entries(n).reduce((e, [t, n]) => (Tt(t) && (e[t] = Vt(n, r)), e), {});
3300
+ Object.keys(e).length && (i.branches = e);
3301
+ }
3302
+ if (e[0] === `branch`) {
3303
+ 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), {});
3304
+ Object.keys(s).length && (i.branches = s);
3305
+ }
3306
+ i.transformation = e[0];
3307
+ }
3308
+ return i;
3309
+ };
3310
+ function o(e) {
3311
+ let { props: n } = e, r = a(e), i = {
3312
+ ...n,
3313
+ "data-_gt": r
3314
+ };
3315
+ return n.children && !r.variableType && (i.children = c(n.children)), e.type === t.Fragment && (i[`data-_gt`].transformation = `fragment`), t.cloneElement(e, i);
3316
+ }
3317
+ function s(e) {
3318
+ return isValidElement(e) ? o(e) : e;
3319
+ }
3320
+ function c(e) {
3321
+ return Array.isArray(e) ? t.Children.map(e, s) : s(e);
3322
+ }
3323
+ return c(e);
3324
+ }
3325
+ const Ht = `@generaltranslation/react-core`;
3326
+ function W(e) {
3327
+ return S({
3328
+ source: Ht,
3329
+ ...e
3330
+ });
3331
+ }
3332
+ W({
3333
+ severity: `Error`,
3334
+ whatHappened: `Runtime translation needs a project ID`,
3335
+ fix: `Add projectId to your <GTProvider> configuration or set GT_PROJECT_ID in your environment`,
3336
+ docsUrl: `https://generaltranslation.com/dashboard`
3337
+ }), W({
3338
+ severity: `Error`,
3339
+ whatHappened: `Production environments cannot use a development API key`,
3340
+ fix: `Replace it with a production API key before deploying`
3341
+ }), W({
3342
+ severity: `Error`,
3343
+ whatHappened: `The API key is available to client-side production code`,
3344
+ fix: `Move translation credentials to a server-only environment before deploying`
3345
+ }), W({
3346
+ severity: `Error`,
3347
+ whatHappened: `Runtime translation is not configured`,
3348
+ fix: `Add projectId and devApiKey to your environment, or pass them to <GTProvider> directly`
3349
+ }), W({
3350
+ severity: `Error`,
3351
+ whatHappened: `Runtime translations could not be loaded`,
3352
+ wayOut: `Source content will render as a fallback`,
3353
+ fix: `Check your runtime translation configuration and try again`
3354
+ }), W({
3355
+ severity: `Error`,
3356
+ whatHappened: `Runtime translation could not be completed`
3357
+ });
3358
+ const Ut = (e) => W({
3359
+ severity: `Error`,
3360
+ whatHappened: `Dictionary subtree "${e}" could not be found`,
3361
+ fix: `Check that the id matches your dictionary structure`
3362
+ }), Wt = () => W({
3363
+ severity: `Error`,
3364
+ whatHappened: `A dictionary entry cannot be injected as a subtree`,
3365
+ fix: `Pass a dictionary object instead`
3366
+ }), Gt = () => W({
3367
+ severity: `Error`,
3368
+ whatHappened: `A dictionary entry cannot be merged into another dictionary entry`,
3369
+ fix: `Pass a dictionary subtree instead`
3370
+ });
3371
+ W({
3372
+ severity: `Warning`,
3373
+ whatHappened: `Runtime translation needs a project ID`,
3374
+ fix: `Add projectId to <GTProvider> or set GT_PROJECT_ID in your environment`,
3375
+ docsUrl: `https://generaltranslation.com/dashboard`
3376
+ }), W({
3377
+ severity: `Warning`,
3378
+ whatHappened: `Runtime translation needs a development API key`,
3379
+ fix: `Find your development API key at generaltranslation.com/dashboard, or set runtimeUrl to an empty string to disable runtime translation`
3380
+ }), W({
3381
+ severity: `Warning`,
3382
+ whatHappened: `Runtime translation timed out`
3383
+ }), W({
3384
+ severity: `Warning`,
3385
+ whatHappened: `No dictionary was found`,
3386
+ fix: `Pass a dictionary to <GTProvider> or configure a dictionary loader before rendering translations`
3387
+ });
3388
+ `${Ht}`;
3389
+ const Xt = {
3390
+ variable: `value`,
3391
+ number: `n`,
3392
+ datetime: `date`,
3393
+ currency: `cost`,
3394
+ "relative-time": `time`
3395
+ };
3396
+ function Zt(e = {}, t) {
3397
+ return typeof e.name == `string` ? e.name : `_gt_${Xt[t] || `value`}_${e[`data-_gt`]?.id}`;
3398
+ }
3399
+ function Qt(e) {
3400
+ return t.isValidElement(e);
3401
+ }
3402
+ const $t = {
3403
+ pl: `placeholder`,
3404
+ ti: `title`,
3405
+ alt: `alt`,
3406
+ arl: `aria-label`,
3407
+ arb: `aria-labelledby`,
3408
+ ard: `aria-describedby`
3409
+ }, en = (e) => {
3410
+ if (!e) return ``;
3411
+ let { type: t, props: n } = e;
3412
+ if (t && typeof t == `function`) {
3413
+ if (`displayName` in t && typeof t.displayName == `string` && t.displayName) return t.displayName;
3414
+ if (`name` in t && typeof t.name == `string` && t.name) return t.name;
3415
+ }
3416
+ return t && typeof t == `string` ? t : n.href ? `a` : n[`data-_gt`]?.id ? `C${n[`data-_gt`].id}` : `function`;
3417
+ }, tn = (e, t, n) => {
3418
+ let r = Object.entries($t).reduce((e, [n, r]) => {
3419
+ let i = t[r];
3420
+ return typeof i == `string` && (e[n] = i), e;
3421
+ }, {});
3422
+ if (e === `plural` && n) {
3423
+ let e = {};
3424
+ Object.entries(n).forEach(([t, n]) => {
3425
+ e[t] = q(n);
3426
+ }), r = {
3427
+ ...r,
3428
+ b: e,
3429
+ t: `p`
3430
+ };
3431
+ }
3432
+ if (e === `branch` && n) {
3433
+ let e = {};
3434
+ Object.entries(n).forEach(([t, n]) => {
3435
+ e[t] = q(n);
3436
+ }), r = {
3437
+ ...r,
3438
+ b: e,
3439
+ t: `b`
3440
+ };
3441
+ }
3442
+ return Object.keys(r).length ? r : void 0;
3443
+ }, nn = (e) => {
3444
+ let { props: t } = e, n = { t: en(e) };
3445
+ if (t[`data-_gt`]) {
3446
+ let e = t[`data-_gt`], r = e.transformation;
3447
+ if (r === `variable`) {
3448
+ let n = e.variableType || `variable`, r = Zt(t, n), i = Ot(n);
3449
+ return {
3450
+ i: e.id,
3451
+ k: r,
3452
+ v: i
3453
+ };
3454
+ }
3455
+ n.i = e.id, n.d = tn(r, t, e.branches);
3456
+ let i = Object.entries($t).reduce((e, [n, r]) => {
3457
+ let i = t[r];
3458
+ return typeof i == `string` && (e[n] = i), e;
3459
+ }, {});
3460
+ if (r === `plural` && e.branches) {
3461
+ let t = {};
3462
+ Object.entries(e.branches).forEach(([e, n]) => {
3463
+ t[e] = q(n);
3464
+ }), i = {
3465
+ ...i,
3466
+ b: t,
3467
+ t: `p`
3468
+ };
3469
+ }
3470
+ if (r === `branch` && e.branches) {
3471
+ let t = {};
3472
+ Object.entries(e.branches).forEach(([e, n]) => {
3473
+ t[e] = q(n);
3474
+ }), i = {
3475
+ ...i,
3476
+ b: t,
3477
+ t: `b`
3478
+ };
3479
+ }
3480
+ n.d = Object.keys(i).length ? i : void 0;
3481
+ }
3482
+ return t.children && (n.c = q(t.children)), n;
3483
+ }, rn = (e) => Qt(e) ? nn(e) : typeof e == `number` ? e.toString() : e;
3484
+ function q(e) {
3485
+ return Array.isArray(e) ? e.map(rn) : rn(e);
3486
+ }
3487
+ function J(e, t, n) {
3488
+ let r = ``, i = null;
3489
+ return typeof e == `number` && !i && n && (r = Et(e, Object.keys(n).filter(Tt), t)), r && !i && (i = n[r]), i;
3490
+ }
3491
+ function an(e) {
3492
+ if (typeof e == `string`) return !0;
3493
+ if (Array.isArray(e)) {
3494
+ if (typeof e?.[0] != `string`) return !1;
3495
+ let t = e?.[1];
3496
+ if (t === void 0 || t && typeof t == `object`) return !0;
3497
+ }
3498
+ return !1;
3499
+ }
3500
+ function Y(e, t) {
3501
+ let n = e, r = t.split(`.`);
3502
+ for (let e of r) {
3503
+ if (typeof n != `object` && !Array.isArray(n)) return;
3504
+ n = _(n, e);
3505
+ }
3506
+ return n;
3507
+ }
3508
+ function X(e) {
3509
+ if (Array.isArray(e)) {
3510
+ if (e.length === 1) return { entry: e[0] };
3511
+ if (e.length === 2) return {
3512
+ entry: e[0],
3513
+ metadata: e[1]
3514
+ };
3515
+ }
3516
+ return { entry: e };
3517
+ }
3518
+ function on(e) {
3519
+ 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`;
3520
+ }
3521
+ function sn(e) {
3522
+ let t = e[`data-_gt`]?.variableType || `variable`;
3523
+ return {
3524
+ variableName: Zt(e, t),
3525
+ variableType: Ot(t),
3526
+ injectionType: e[`data-_gt`]?.injectionType || `manual`,
3527
+ variableValue: (() => {
3528
+ if (e.value !== void 0) return e.value;
3529
+ if (e.date !== void 0) return e.date;
3530
+ if (e[`data-_gt-unformatted-value`] !== void 0) return e[`data-_gt-unformatted-value`];
3531
+ if (e.children !== void 0) return e.children;
3532
+ })(),
3533
+ variableOptions: (() => {
3534
+ let t = {
3535
+ ...e.currency !== void 0 && { currency: e.currency },
3536
+ ...e.unit !== void 0 && { unit: e.unit },
3537
+ ...e.baseDate !== void 0 && { baseDate: e.baseDate },
3538
+ ...e.options !== void 0 && e.options
3539
+ };
3540
+ return Object.keys(t).length ? t : typeof e[`data-_gt-variable-options`] == `string` ? JSON.parse(e[`data-_gt-variable-options`]) : e[`data-_gt-variable-options`] || void 0;
3541
+ })()
3542
+ };
3543
+ }
3544
+ function cn(e) {
3545
+ let t = e;
3546
+ if (t && typeof t == `object` && typeof t.k == `string`) {
3547
+ let e = Object.keys(t);
3548
+ if (e.length === 1 || e.length === 2 && (typeof t.i == `number` || typeof t.v == `string`) || e.length === 3 && typeof t.v == `string` && typeof t.i == `number`) return !0;
3549
+ }
3550
+ return !1;
3551
+ }
3552
+ function ln(e) {
3553
+ return e && e.props && e.props[`data-_gt`] ? e.props[`data-_gt`] : null;
3554
+ }
3555
+ function Z({ children: e, defaultLocale: n = `en`, renderVariable: r }) {
3556
+ let i = (e) => {
3557
+ let i = ln(e);
3558
+ if (on(e.props)) {
3559
+ let { variableType: t, variableValue: i, variableOptions: a, injectionType: o } = sn(e.props);
3560
+ return r({
3561
+ variableType: t,
3562
+ variableValue: i,
3563
+ variableOptions: a,
3564
+ locales: [n],
3565
+ injectionType: o
3566
+ });
3567
+ }
3568
+ if (i?.transformation === `plural`) {
3569
+ let t = i.branches || {};
3570
+ if (typeof e.props.n != `number`) return e.props.children == null ? null : o(e.props.children);
3571
+ let r = J(e.props.n, [n], t);
3572
+ return o(r === null ? e.props.children : r);
3573
+ }
3574
+ if (i?.transformation === `branch`) {
3575
+ let { children: t, branch: n } = e.props, r = i.branches || {}, a = n == null || n === `` ? void 0 : n.toString();
3576
+ return o(a && r[a] !== void 0 ? r[a] : t);
3577
+ }
3578
+ return i?.transformation === `fragment` ? t.createElement(t.Fragment, {
3579
+ key: e.props.key,
3580
+ children: o(e.props.children)
3581
+ }) : e.props.children ? t.cloneElement(e, {
3582
+ ...e.props,
3583
+ "data-_gt": void 0,
3584
+ children: o(e.props.children)
3585
+ }) : t.cloneElement(e, {
3586
+ ...e.props,
3587
+ "data-_gt": void 0
3588
+ });
3589
+ }, a = (e) => t.isValidElement(e) ? i(e) : e, o = (e) => Array.isArray(e) ? t.Children.map(e, a) : a(e);
3590
+ return o(e);
3591
+ }
3592
+ function un({ sourceElement: e, targetElement: n, locales: r = [`en`], renderVariable: i }) {
3593
+ let { props: a } = e, o = a[`data-_gt`], s = o?.transformation, c = n.d, l = {};
3594
+ if (c && Object.entries($t).forEach(([e, t]) => {
3595
+ c[e] && (l[t] = c[e]);
3596
+ }), s === `plural`) {
3597
+ let t = e.props.n;
3598
+ if (typeof t != `number`) return Z({
3599
+ children: e,
3600
+ defaultLocale: r[0],
3601
+ renderVariable: i
3602
+ });
3603
+ let a = J(t, r, o.branches || {}), s = a === null ? e.props.children : a, c = J(t, r, n.d?.b || {});
3604
+ return Q({
3605
+ source: s,
3606
+ target: c === null ? n.c : c,
3607
+ locales: r,
3608
+ renderVariable: i
3609
+ });
3610
+ }
3611
+ if (s === `branch`) {
3612
+ let { branch: e, children: t } = a, s = e == null || e === `` ? void 0 : e.toString(), c = o.branches || {}, l = n.d?.b || {};
3613
+ return Q({
3614
+ source: s && c[s] !== void 0 ? c[s] : t,
3615
+ target: s && l[s] !== void 0 ? l[s] : n.c,
3616
+ locales: r,
3617
+ renderVariable: i
3618
+ });
3619
+ }
3620
+ return s === `fragment` && n.c ? t.createElement(t.Fragment, {
3621
+ key: e.props.key,
3622
+ children: Q({
3623
+ source: a.children,
3624
+ target: n.c,
3625
+ locales: r,
3626
+ renderVariable: i
3627
+ })
3628
+ }) : a?.children && n?.c ? t.cloneElement(e, {
3629
+ ...a,
3630
+ ...l,
3631
+ "data-_gt": void 0,
3632
+ children: Q({
3633
+ source: a.children,
3634
+ target: n.c,
3635
+ locales: r,
3636
+ renderVariable: i
3637
+ })
3638
+ }) : Z({
3639
+ children: e,
3640
+ defaultLocale: r[0],
3641
+ renderVariable: i
3642
+ });
3643
+ }
3644
+ function Q({ source: e, target: n, locales: r = [`en`], renderVariable: i }) {
3645
+ if (n == null && e) return Z({
3646
+ children: e,
3647
+ defaultLocale: r[0],
3648
+ renderVariable: i
3649
+ });
3650
+ if (typeof n == `string`) return n;
3651
+ if (Array.isArray(n) && !Array.isArray(e) && e && (e = [e]), Array.isArray(e) && Array.isArray(n)) {
3652
+ let a = {}, o = {}, c = {}, l = e.filter((e) => {
3653
+ if (t.isValidElement(e)) if (on(e.props)) {
3654
+ let { variableName: t, variableValue: n, variableOptions: r, injectionType: i } = sn(e.props);
3655
+ a[t] = n, o[t] = r, c[t] = i;
3656
+ } else return !0;
3657
+ return !1;
3658
+ }), u = (e) => l.find((t) => {
3659
+ let n = ln(t);
3660
+ return n?.id === void 0 ? !1 : n.id === e.i;
3661
+ }) || l.shift();
3662
+ return n.map((e, n) => {
3663
+ if (typeof e == `string`) return jsx(t.Fragment, { children: e }, `string_${n}`);
3664
+ if (E(e)) return jsx(t.Fragment, { children: i({
3665
+ variableType: e.v || `v`,
3666
+ variableValue: a[e.k],
3667
+ variableOptions: o[e.k],
3668
+ locales: r,
3669
+ injectionType: c[e.k] || `manual`
3670
+ }) }, `var_${n}`);
3671
+ let l = u(e);
3672
+ return l ? jsx(t.Fragment, { children: un({
3673
+ sourceElement: l,
3674
+ targetElement: e,
3675
+ locales: r,
3676
+ renderVariable: i
3677
+ }) }, `element_${n}`) : null;
3678
+ });
3679
+ }
3680
+ if (n && typeof n == `object` && !Array.isArray(n)) {
3681
+ let a = E(n) ? `variable` : `element`;
3682
+ if (t.isValidElement(e)) {
3683
+ if (a === `element`) return un({
3684
+ sourceElement: e,
3685
+ targetElement: n,
3686
+ locales: r,
3687
+ renderVariable: i
3688
+ });
3689
+ if (on(e.props)) {
3690
+ let { variableValue: t, variableOptions: n, variableType: a, injectionType: o } = sn(e.props);
3691
+ return i({
3692
+ variableType: a,
3693
+ variableValue: t,
3694
+ variableOptions: n,
3695
+ locales: r,
3696
+ injectionType: o
3697
+ });
3698
+ }
3699
+ }
3700
+ }
3701
+ return Z({
3702
+ children: e,
3703
+ defaultLocale: r[0],
3704
+ renderVariable: i
3705
+ });
3706
+ }
3707
+ const dn = (e = `production`) => ({
3708
+ method: `default`,
3709
+ timeout: e === `development` ? 8e3 : 12e3
3710
+ });
3711
+ function fn() {
3712
+ return ``;
3713
+ }
3714
+ const pn = `generaltranslation.locale`, mn = `generaltranslation.region`;
3715
+ function $(e) {
3716
+ return e === void 0 ? !1 : typeof e == `string` ? !0 : Array.isArray(e) ? !(e.length !== 1 && e.length !== 2 || typeof e[0] != `string` || e.length === 2 && (typeof e[1] != `object` || e[1] === null || !(`$context` in e[1]) && !(`$maxChars` in e[1]) && !(`$_hash` in e[1]))) : !1;
3717
+ }
3718
+ const gn = (e) => typeof e == `string` || Array.isArray(e), _n = (e) => typeof e == `object` && !!e && !Array.isArray(e);
3719
+ function vn(e, t) {
3720
+ if (Array.isArray(e)) return e.map((e, n) => $(e) ? t[n] : vn(e, t[n]));
3721
+ let n = {
3722
+ ...Object.fromEntries(Object.entries(e).filter(([, e]) => gn(e))),
3723
+ ...Object.fromEntries(Object.entries(t).filter(([, e]) => gn(e)))
3724
+ }, r = Object.entries(e).filter(([, e]) => _n(e)).map(([e]) => e), i = Object.entries(t).filter(([, e]) => _n(e)).map(([e]) => e), a = new Set([...r, ...i]);
3725
+ for (let r of a) n[r] = vn(_(e, r) || {}, _(t, r) || {});
3726
+ return n;
3727
+ }
3728
+ const yn = typeof e.use == `function`;
3729
+ function bn({ dictionary: e, id: t }) {
3730
+ if (t === ``) return e;
3731
+ let n = e, r = t.split(`.`);
3732
+ for (let e of r) n = _(n, e);
3733
+ return n;
3734
+ }
3735
+ function xn({ dictionary: e, id: t, sourceDictionary: n }) {
3736
+ if (t === ``) return e;
3737
+ let r = e, i = n, a = t.split(`.`);
3738
+ for (let e of a) _(r, e) === void 0 && (Array.isArray(_(i, e)) ? v(r, e, []) : v(r, e, {})), r = _(r, e);
3739
+ return r;
3740
+ }
3741
+ const Sn = [
3742
+ `constructor`,
3743
+ `prototype`,
3744
+ `__proto__`
3745
+ ];
3746
+ function Cn(e) {
3747
+ return !!Sn.includes(e);
3748
+ }
3749
+ function wn(e, t, n, r) {
3750
+ if ($(t)) return e;
3751
+ let i = n.split(`.`);
3752
+ i.forEach((e) => {
3753
+ if (Cn(e)) throw Error(`Invalid key: ${e}`);
3754
+ }), t ||= {};
3755
+ for (let e of i.slice(0, -1)) _(t, e) ?? v(t, e, Array.isArray(_(r, e)) ? [] : {}), t = _(t, e), r = _(r, e);
3756
+ let a = i[i.length - 1];
3757
+ v(t, a, e);
3758
+ }
3759
+ function Tn(e) {
3760
+ let t = {};
3761
+ return Array.isArray(e) && (t = []), Object.entries(e).forEach(([e, n]) => {
3762
+ if ($(n)) {
3763
+ let { entry: r } = X(n);
3764
+ v(t, e, r);
3765
+ } else v(t, e, Tn(n));
3766
+ }), t;
3767
+ }
3768
+ function En(e) {
3769
+ return de(Te(fe(e))).slice(0, 16);
3770
+ }
3771
+ function Dn({ source: e, context: t, id: n, maxChars: r, dataFormat: i }, a = En) {
3772
+ let o;
3773
+ return o = i === `JSX` ? kn(e) : e, a(re({
3774
+ source: o,
3775
+ ...n && { id: n },
3776
+ ...t && { context: t },
3777
+ ...r != null && { maxChars: Math.abs(r) },
3778
+ ...i && { dataFormat: i }
3779
+ }));
3780
+ }
3781
+ const On = (e) => {
3782
+ if (e && typeof e == `object`) {
3783
+ let t = {};
3784
+ if (`c` in e && e.c && (t.c = kn(e.c)), `d` in e) {
3785
+ let n = e?.d;
3786
+ n?.b && (t.b = Object.fromEntries(Object.entries(n.b).map(([e, t]) => [e, kn(t)]))), n?.t && (t.t = n.t);
3787
+ }
3788
+ return E(e) ? {
3789
+ k: e.k,
3790
+ ...e.v && { v: e.v }
3791
+ } : t;
3792
+ }
3793
+ return e;
3794
+ };
3795
+ function kn(e) {
3796
+ return Array.isArray(e) ? e.map(On) : On(e);
3797
+ }
3798
+ function An(e, t = ``) {
3799
+ let n = !1;
3800
+ return Object.entries(e).forEach(([r, i]) => {
3801
+ let a = t ? `${t}.${r}` : r;
3802
+ if ($(i)) {
3803
+ let { entry: t, metadata: o } = X(i);
3804
+ o?.$_hash || (o ||= {}, o.$_hash = Dn({
3805
+ source: Rt(t),
3806
+ ...o?.$context && { context: o.$context },
3807
+ ...o?.$maxChars != null && { maxChars: Math.abs(o.$maxChars) },
3808
+ id: a,
3809
+ dataFormat: `ICU`
3810
+ }), v(e, r, [t, o]), n = !0);
3811
+ } else {
3812
+ let { updateDictionary: e } = An(i, a);
3813
+ n ||= e;
3814
+ }
3815
+ }), {
3816
+ dictionary: e,
3817
+ updateDictionary: n
3818
+ };
3819
+ }
3820
+ function jn(e, t, n, r, i = ``) {
3821
+ let a = !1, o = i ? i.split(`.`) : [];
3822
+ return r.forEach(({ metadata: r }) => {
3823
+ let { $_hash: i, $id: s } = r, c = o.length > 0 ? s.split(`.`).slice(o.length).join(`.`) : s, l = Y(t, c), u;
3824
+ $(l) && (u = X(l).entry);
3825
+ let d = n[i] || u;
3826
+ d && (wn(d, t, c, e), a = !0);
3827
+ }), {
3828
+ dictionary: t,
3829
+ updateDictionary: a
3830
+ };
3831
+ }
3832
+ function Mn(e, t, n, r = ``) {
3833
+ let i = r ? r.split(`.`) : [];
3834
+ return n.forEach(({ source: n, metadata: r }) => {
3835
+ let { $id: a } = r, o = i.length > 0 ? a.split(`.`).slice(i.length).join(`.`) : a, s = Y(t, o), c;
3836
+ $(s) && (c = X(s).entry), wn(c || n, t, o, e);
3837
+ }), t;
3838
+ }
3839
+ function Nn(e, t, n) {
3840
+ let r = bn({
3841
+ dictionary: e,
3842
+ id: n
3843
+ });
3844
+ if (!r) throw Error(Ut(n));
3845
+ if ($(r)) throw Error(Wt());
3846
+ return Pn(e, vn(r, t), n);
3847
+ }
3848
+ function Pn(e, t, n) {
3849
+ let r = Y(e, n);
3850
+ if (!r) throw Error(Ut(n));
3851
+ if ($(r)) throw Error(Gt());
3852
+ let i = n.split(`.`), a = i.slice(0, -1), o = i[i.length - 1], s = e;
3853
+ return a.forEach((e) => {
3854
+ s = _(s, e);
3855
+ }), v(s, o, t), e;
3856
+ }
3857
+ function Fn(e, t, n = ``) {
3858
+ let r = [];
3859
+ return Object.entries(e).forEach(([e, i]) => {
3860
+ let a = n ? `${n}.${e}` : e;
3861
+ if ($(i)) {
3862
+ let { entry: n, metadata: o } = X(i);
3863
+ _(t, e) || r.push({
3864
+ source: n,
3865
+ metadata: {
3866
+ $id: a,
3867
+ $context: o?.$context,
3868
+ $maxChars: o?.$maxChars,
3869
+ $_hash: o?.$_hash || ``
3870
+ }
3871
+ });
3872
+ } else r.push(...Fn(i, _(t, e) || (Array.isArray(i) ? [] : {}), a));
3873
+ }), r;
3874
+ }
3875
+ var In = {
3876
+ warn(e) {
3877
+ console.warn(e);
3878
+ },
3879
+ error(e) {
3880
+ console.error(e);
3881
+ },
3882
+ info(e) {
3883
+ console.info(e);
3884
+ },
3885
+ debug(e) {
3886
+ console.debug(e);
3887
+ }
3888
+ };
3889
+ function Ln(e) {
3890
+ return Object.fromEntries(Object.entries(e).filter(([e]) => e !== `$id` && e !== `$context` && e !== `$maxChars` && e !== `$hash` && e !== `$_hash` && e !== `$_source` && e !== `$_fallback` && e !== `$format` && e !== `$_locales` && e !== `$locale`));
3891
+ }
3892
+ const Rn = (e) => `String interpolation failed for message: "${e}".`;
3893
+ function zn(e, t, n, r) {
3894
+ try {
3895
+ return formatMessage(e, {
3896
+ variables: t,
3897
+ locales: n,
3898
+ dataFormat: r
3899
+ });
3900
+ } catch {
3901
+ return In.warn(Rn(e)), e;
3902
+ }
3903
+ }
3904
+ function Bn(e, t) {
3905
+ if (!e) return e;
3906
+ let n = t.$_fallback, r = Ln(t);
3907
+ try {
3908
+ let i = zt(n || ``);
3909
+ return formatCutoff(zn(Object.keys(i).length ? Bt(e) : e, {
3910
+ ...r,
3911
+ ...i,
3912
+ [U]: `other`
3913
+ }, t.$locale ?? t.$_locales, t.$format), { maxChars: t.$maxChars });
3914
+ } catch {
3915
+ return In.warn(Rn(e)), t.$_fallback == null ? formatCutoff(e, { maxChars: t.$maxChars }) : Bn(t.$_fallback, {
3916
+ ...t,
3917
+ $_fallback: void 0
3918
+ });
3919
+ }
3920
+ }
3921
+ function Vn(e) {
3922
+ if (e.lastIndexOf(`:`) === -1) return null;
3923
+ let t = e.slice(e.lastIndexOf(`:`) + 1);
3924
+ try {
3925
+ return JSON.parse(w(t));
3926
+ } catch {
3927
+ return null;
3928
+ }
3929
+ }
3930
+ function Hn(e) {
3931
+ return !!(e.$_hash && e.$_source);
3932
+ }
3933
+ function Un(e, t) {
3934
+ let n = t;
3935
+ return n.$_hash == null ? Dn({
3936
+ source: t.$format === `ICU` ? Rt(e) : e,
3937
+ ...n.$context && { context: n.$context },
3938
+ ...n.$id && { id: n.$id },
3939
+ ...n.$maxChars != null && { maxChars: Math.abs(n.$maxChars) },
3940
+ dataFormat: t.$format
3941
+ }) : n.$_hash;
3942
+ }
3943
+ function Wn(e) {
3944
+ return typeof e == `string` && e.lastIndexOf(`:`) !== -1 ? e.slice(0, e.lastIndexOf(`:`)) : e;
3945
+ }
3946
+ const Gn = (e, t = {}) => Bn(e, t), Kn = (e, t = {}) => e && (Hn(Vn(e) ?? {}) ? Wn(e) : Bn(e, t));
3947
+ function qn(e, t) {
3948
+ if (typeof e != `string`) return t ? e.map((e, n) => qn(e, {
3949
+ ...t,
3950
+ ...t.$id && { $id: `${t.$id}.${n}` }
3951
+ })) : e;
3952
+ if (!t) return e;
3953
+ let n = Ln(t), r = e;
3954
+ try {
3955
+ r = formatMessage(e, {
3956
+ locales: [`en`],
3957
+ variables: {
3958
+ ...n,
3959
+ [U]: `other`
3960
+ }
3961
+ });
3962
+ } catch {
3963
+ return In.warn(Rn(e)), e;
3964
+ }
3965
+ let i = e, a = t.$_hash || Un(e, {
3966
+ $format: `ICU`,
3967
+ ...t
3968
+ }), s = {
3969
+ ...t,
3970
+ $_source: i,
3971
+ $_hash: a
3972
+ }, c = C(JSON.stringify(s));
3973
+ return `${r}:${c}`;
3974
+ }
3975
+ function Jn({ children: e }) {
3976
+ return e;
3977
+ }
3978
+ function Yn(e) {
3979
+ return Jn(e);
3980
+ }
3981
+ Jn._gtt = `derive`, Yn._gtt = `derive`;
3982
+ //#endregion
3983
+ export { Jn as Derive, Yn as Static, Vt as addGTIdentifier, Fn as collectUntranslatedEntries, Lt as declareStatic, Ft as declareVar, Wn as decodeMsg, Vn as decodeOptions, Nt as decodeVars, pn as defaultLocaleCookieName, mn as defaultRegionCookieName, It as derive, y as flattenDictionary, dn as getDefaultRenderSettings, Y as getDictionaryEntry, X as getEntryAndMetadata, J as getPluralBranch, bn as getSubtree, xn as getSubtreeWithCreation, Zt as getVariableName, sn as getVariableProps, Gn as gtFallback, Nn as injectAndMerge, wn as injectEntry, Mn as injectFallbacks, An as injectHashes, jn as injectTranslations, $ as isDictionaryEntry, an as isValidDictionaryEntry, cn as isVariableObject, Kn as mFallback, vn as mergeDictionaries, qn as msg, yn as reactHasUse, Z as renderDefaultChildren, fn as renderSkeleton, Q as renderTranslatedChildren, Tn as stripMetadataFromEntries, q as writeChildrenAsObjects };
3984
+
3985
+ //# sourceMappingURL=internal.mjs.map