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