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