gt-react 10.19.14 → 10.19.16

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