@dialpad/dialtone 9.116.0 → 9.117.1

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 (130) hide show
  1. package/dist/css/dialtone-default-theme.css +4 -4
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone-docs.json +1 -1
  4. package/dist/css/tokens/tokens-base-dark.css +1 -1
  5. package/dist/css/tokens/tokens-base-deca-dark.css +1 -1
  6. package/dist/css/tokens/tokens-base-deca-light.css +1 -1
  7. package/dist/css/tokens/tokens-base-light.css +1 -1
  8. package/dist/css/tokens/tokens-debug-base.css +1 -1
  9. package/dist/css/tokens/tokens-debug-dp.css +3 -3
  10. package/dist/css/tokens/tokens-deca-dark.css +3 -3
  11. package/dist/css/tokens/tokens-deca-light.css +3 -3
  12. package/dist/css/tokens/tokens-dp-dark.css +3 -3
  13. package/dist/css/tokens/tokens-dp-light.css +3 -3
  14. package/dist/css/tokens/tokens-expressive-dark.css +3 -3
  15. package/dist/css/tokens/tokens-expressive-light.css +3 -3
  16. package/dist/css/tokens/tokens-expressive-sm-dark.css +3 -3
  17. package/dist/css/tokens/tokens-expressive-sm-light.css +3 -3
  18. package/dist/css/tokens/tokens-tmo-dark.css +3 -3
  19. package/dist/css/tokens/tokens-tmo-light.css +3 -3
  20. package/dist/css/tokens-docs.json +1 -1
  21. package/dist/tokens/css/tokens-base-dark.css +1 -1
  22. package/dist/tokens/css/tokens-base-deca-dark.css +1 -1
  23. package/dist/tokens/css/tokens-base-deca-light.css +1 -1
  24. package/dist/tokens/css/tokens-base-light.css +1 -1
  25. package/dist/tokens/css/tokens-debug-base.css +1 -1
  26. package/dist/tokens/css/tokens-debug-dp.css +3 -3
  27. package/dist/tokens/css/tokens-deca-dark.css +3 -3
  28. package/dist/tokens/css/tokens-deca-light.css +3 -3
  29. package/dist/tokens/css/tokens-dp-dark.css +3 -3
  30. package/dist/tokens/css/tokens-dp-light.css +3 -3
  31. package/dist/tokens/css/tokens-expressive-dark.css +3 -3
  32. package/dist/tokens/css/tokens-expressive-light.css +3 -3
  33. package/dist/tokens/css/tokens-expressive-sm-dark.css +3 -3
  34. package/dist/tokens/css/tokens-expressive-sm-light.css +3 -3
  35. package/dist/tokens/css/tokens-tmo-dark.css +3 -3
  36. package/dist/tokens/css/tokens-tmo-light.css +3 -3
  37. package/dist/tokens/doc.json +27262 -27262
  38. package/dist/tokens/less/tokens-base-dark.less +1 -1
  39. package/dist/tokens/less/tokens-base-deca-dark.less +1 -1
  40. package/dist/tokens/less/tokens-base-deca-light.less +1 -1
  41. package/dist/tokens/less/tokens-base-light.less +1 -1
  42. package/dist/tokens/less/tokens-deca-dark.less +3 -3
  43. package/dist/tokens/less/tokens-deca-light.less +3 -3
  44. package/dist/tokens/less/tokens-dp-dark.less +3 -3
  45. package/dist/tokens/less/tokens-dp-light.less +3 -3
  46. package/dist/tokens/less/tokens-expressive-dark.less +3 -3
  47. package/dist/tokens/less/tokens-expressive-light.less +3 -3
  48. package/dist/tokens/less/tokens-expressive-sm-dark.less +3 -3
  49. package/dist/tokens/less/tokens-expressive-sm-light.less +3 -3
  50. package/dist/tokens/less/tokens-tmo-dark.less +3 -3
  51. package/dist/tokens/less/tokens-tmo-light.less +3 -3
  52. package/dist/tokens/themes/chunks/tokens-base-dark-CKvoqrK2.js +1 -0
  53. package/dist/tokens/themes/chunks/tokens-base-dark-CLL9Sz8C.js +4 -0
  54. package/dist/tokens/themes/chunks/tokens-base-light-C7afXvK5.js +4 -0
  55. package/dist/tokens/themes/chunks/tokens-base-light-DgGeYJGp.js +1 -0
  56. package/dist/tokens/themes/debug.cjs +1 -1
  57. package/dist/tokens/themes/debug.js +1 -1
  58. package/dist/tokens/themes/dp-dark.cjs +1 -1
  59. package/dist/tokens/themes/dp-dark.js +2 -2
  60. package/dist/tokens/themes/dp-deca-dark.cjs +1 -1
  61. package/dist/tokens/themes/dp-deca-dark.js +1 -1
  62. package/dist/tokens/themes/dp-deca-light.cjs +1 -1
  63. package/dist/tokens/themes/dp-deca-light.js +1 -1
  64. package/dist/tokens/themes/dp-light.cjs +1 -1
  65. package/dist/tokens/themes/dp-light.js +2 -2
  66. package/dist/tokens/themes/expressive-dark.cjs +1 -1
  67. package/dist/tokens/themes/expressive-dark.js +2 -2
  68. package/dist/tokens/themes/expressive-light.cjs +1 -1
  69. package/dist/tokens/themes/expressive-light.js +2 -2
  70. package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
  71. package/dist/tokens/themes/expressive-sm-dark.js +2 -2
  72. package/dist/tokens/themes/expressive-sm-light.cjs +1 -1
  73. package/dist/tokens/themes/expressive-sm-light.js +2 -2
  74. package/dist/tokens/themes/tmo-dark.cjs +1 -1
  75. package/dist/tokens/themes/tmo-dark.js +2 -2
  76. package/dist/tokens/themes/tmo-light.cjs +1 -1
  77. package/dist/tokens/themes/tmo-light.js +2 -2
  78. package/dist/tokens/tokens-base-dark.json +1 -1
  79. package/dist/tokens/tokens-base-deca-dark.json +1 -1
  80. package/dist/tokens/tokens-base-deca-light.json +1 -1
  81. package/dist/tokens/tokens-base-light.json +1 -1
  82. package/dist/tokens/tokens-deca-dark.json +3 -3
  83. package/dist/tokens/tokens-deca-light.json +3 -3
  84. package/dist/tokens/tokens-dp-dark.json +3 -3
  85. package/dist/tokens/tokens-dp-light.json +3 -3
  86. package/dist/tokens/tokens-expressive-dark.json +3 -3
  87. package/dist/tokens/tokens-expressive-light.json +3 -3
  88. package/dist/tokens/tokens-expressive-sm-dark.json +3 -3
  89. package/dist/tokens/tokens-expressive-sm-light.json +3 -3
  90. package/dist/tokens/tokens-tmo-dark.json +3 -3
  91. package/dist/tokens/tokens-tmo-light.json +3 -3
  92. package/dist/vue2/component-documentation.json +1 -1
  93. package/dist/vue2/lib/editor/editor.cjs +1 -1
  94. package/dist/vue2/lib/editor/editor.cjs.map +1 -1
  95. package/dist/vue2/lib/editor/editor.js +6 -6
  96. package/dist/vue2/lib/editor/editor.js.map +1 -1
  97. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  98. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  99. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +183 -166
  100. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  101. package/dist/vue2/localization/index.cjs +5 -1
  102. package/dist/vue2/localization/index.cjs.map +1 -1
  103. package/dist/vue2/localization/index.js +4865 -21
  104. package/dist/vue2/localization/index.js.map +1 -1
  105. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  106. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  107. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +18 -0
  108. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  109. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  110. package/dist/vue3/component-documentation.json +1 -1
  111. package/dist/vue3/lib/editor/editor.cjs +1 -1
  112. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  113. package/dist/vue3/lib/editor/editor.js +15 -13
  114. package/dist/vue3/lib/editor/editor.js.map +1 -1
  115. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  116. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  117. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +181 -164
  118. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  119. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +18 -0
  120. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  121. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  122. package/package.json +3 -4
  123. package/dist/tokens/themes/chunks/tokens-base-dark-B42c8NRe.js +0 -1
  124. package/dist/tokens/themes/chunks/tokens-base-dark-D3XlzClW.js +0 -4
  125. package/dist/tokens/themes/chunks/tokens-base-light-5p3ZOPKU.js +0 -1
  126. package/dist/tokens/themes/chunks/tokens-base-light-C_G4p7UU.js +0 -4
  127. package/dist/vue2/node_modules/@dialpad/i18n-vue2.cjs +0 -6
  128. package/dist/vue2/node_modules/@dialpad/i18n-vue2.cjs.map +0 -1
  129. package/dist/vue2/node_modules/@dialpad/i18n-vue2.js +0 -4906
  130. package/dist/vue2/node_modules/@dialpad/i18n-vue2.js.map +0 -1
@@ -1,4906 +0,0 @@
1
- var cr = Object.defineProperty;
2
- var fr = (e, t, n) => t in e ? cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var oe = (e, t, n) => fr(e, typeof t != "symbol" ? t + "" : t, n);
4
- import me, { shallowRef as dr, computed as Ae, getCurrentInstance as On, watchEffect as Sn, defineComponent as _r, h as ot } from "vue";
5
- class Oe {
6
- /**
7
- * Create a `FluentType` instance.
8
- *
9
- * @param value The JavaScript value to wrap.
10
- */
11
- constructor(t) {
12
- this.value = t;
13
- }
14
- /**
15
- * Unwrap the raw value stored by this `FluentType`.
16
- */
17
- valueOf() {
18
- return this.value;
19
- }
20
- }
21
- class C extends Oe {
22
- /**
23
- * Create an instance of `FluentNone` with an optional fallback value.
24
- * @param value The fallback value of this `FluentNone`.
25
- */
26
- constructor(t = "???") {
27
- super(t);
28
- }
29
- /**
30
- * Format this `FluentNone` to the fallback string.
31
- */
32
- toString(t) {
33
- return `{${this.value}}`;
34
- }
35
- }
36
- class M extends Oe {
37
- /**
38
- * Create an instance of `FluentNumber` with options to the
39
- * `Intl.NumberFormat` constructor.
40
- *
41
- * @param value The number value of this `FluentNumber`.
42
- * @param opts Options which will be passed to `Intl.NumberFormat`.
43
- */
44
- constructor(t, n = {}) {
45
- super(t), this.opts = n;
46
- }
47
- /**
48
- * Format this `FluentNumber` to a string.
49
- */
50
- toString(t) {
51
- try {
52
- return t.memoizeIntlObject(Intl.NumberFormat, this.opts).format(this.value);
53
- } catch (n) {
54
- return t.reportError(n), this.value.toString(10);
55
- }
56
- }
57
- }
58
- class ae extends Oe {
59
- /**
60
- * Create an instance of `FluentDateTime` with options to the
61
- * `Intl.DateTimeFormat` constructor.
62
- *
63
- * @param value The number value of this `FluentDateTime`, in milliseconds.
64
- * @param opts Options which will be passed to `Intl.DateTimeFormat`.
65
- */
66
- constructor(t, n = {}) {
67
- super(t), this.opts = n;
68
- }
69
- /**
70
- * Format this `FluentDateTime` to a string.
71
- */
72
- toString(t) {
73
- try {
74
- return t.memoizeIntlObject(Intl.DateTimeFormat, this.opts).format(this.value);
75
- } catch (n) {
76
- return t.reportError(n), new Date(this.value).toISOString();
77
- }
78
- }
79
- }
80
- const st = 100, hr = "⁨", Er = "⁩";
81
- function pr(e, t, n) {
82
- if (n === t || n instanceof M && t instanceof M && n.value === t.value)
83
- return !0;
84
- if (t instanceof M && typeof n == "string") {
85
- let r = e.memoizeIntlObject(Intl.PluralRules, t.opts).select(t.value);
86
- if (n === r)
87
- return !0;
88
- }
89
- return !1;
90
- }
91
- function at(e, t, n) {
92
- return t[n] ? X(e, t[n].value) : (e.reportError(new RangeError("No default")), new C());
93
- }
94
- function Le(e, t) {
95
- const n = [], r = /* @__PURE__ */ Object.create(null);
96
- for (const u of t)
97
- u.type === "narg" ? r[u.name] = le(e, u.value) : n.push(le(e, u));
98
- return { positional: n, named: r };
99
- }
100
- function le(e, t) {
101
- switch (t.type) {
102
- case "str":
103
- return t.value;
104
- case "num":
105
- return new M(t.value, {
106
- minimumFractionDigits: t.precision
107
- });
108
- case "var":
109
- return gr(e, t);
110
- case "mesg":
111
- return mr(e, t);
112
- case "term":
113
- return vr(e, t);
114
- case "func":
115
- return yr(e, t);
116
- case "select":
117
- return Ar(e, t);
118
- default:
119
- return new C();
120
- }
121
- }
122
- function gr(e, { name: t }) {
123
- let n;
124
- if (e.params)
125
- if (Object.prototype.hasOwnProperty.call(e.params, t))
126
- n = e.params[t];
127
- else
128
- return new C(`$${t}`);
129
- else if (e.args && Object.prototype.hasOwnProperty.call(e.args, t))
130
- n = e.args[t];
131
- else
132
- return e.reportError(new ReferenceError(`Unknown variable: $${t}`)), new C(`$${t}`);
133
- if (n instanceof Oe)
134
- return n;
135
- switch (typeof n) {
136
- case "string":
137
- return n;
138
- case "number":
139
- return new M(n);
140
- case "object":
141
- if (n instanceof Date)
142
- return new ae(n.getTime());
143
- default:
144
- return e.reportError(new TypeError(`Variable type not supported: $${t}, ${typeof n}`)), new C(`$${t}`);
145
- }
146
- }
147
- function mr(e, { name: t, attr: n }) {
148
- const r = e.bundle._messages.get(t);
149
- if (!r)
150
- return e.reportError(new ReferenceError(`Unknown message: ${t}`)), new C(t);
151
- if (n) {
152
- const u = r.attributes[n];
153
- return u ? X(e, u) : (e.reportError(new ReferenceError(`Unknown attribute: ${n}`)), new C(`${t}.${n}`));
154
- }
155
- return r.value ? X(e, r.value) : (e.reportError(new ReferenceError(`No value: ${t}`)), new C(t));
156
- }
157
- function vr(e, { name: t, attr: n, args: r }) {
158
- const u = `-${t}`, o = e.bundle._terms.get(u);
159
- if (!o)
160
- return e.reportError(new ReferenceError(`Unknown term: ${u}`)), new C(u);
161
- if (n) {
162
- const a = o.attributes[n];
163
- if (a) {
164
- e.params = Le(e, r).named;
165
- const f = X(e, a);
166
- return e.params = null, f;
167
- }
168
- return e.reportError(new ReferenceError(`Unknown attribute: ${n}`)), new C(`${u}.${n}`);
169
- }
170
- e.params = Le(e, r).named;
171
- const s = X(e, o.value);
172
- return e.params = null, s;
173
- }
174
- function yr(e, { name: t, args: n }) {
175
- let r = e.bundle._functions[t];
176
- if (!r)
177
- return e.reportError(new ReferenceError(`Unknown function: ${t}()`)), new C(`${t}()`);
178
- if (typeof r != "function")
179
- return e.reportError(new TypeError(`Function ${t}() is not callable`)), new C(`${t}()`);
180
- try {
181
- let u = Le(e, n);
182
- return r(u.positional, u.named);
183
- } catch (u) {
184
- return e.reportError(u), new C(`${t}()`);
185
- }
186
- }
187
- function Ar(e, { selector: t, variants: n, star: r }) {
188
- let u = le(e, t);
189
- if (u instanceof C)
190
- return at(e, n, r);
191
- for (const o of n) {
192
- const s = le(e, o.key);
193
- if (pr(e, u, s))
194
- return X(e, o.value);
195
- }
196
- return at(e, n, r);
197
- }
198
- function Tn(e, t) {
199
- if (e.dirty.has(t))
200
- return e.reportError(new RangeError("Cyclic reference")), new C();
201
- e.dirty.add(t);
202
- const n = [], r = e.bundle._useIsolating && t.length > 1;
203
- for (const u of t) {
204
- if (typeof u == "string") {
205
- n.push(e.bundle._transform(u));
206
- continue;
207
- }
208
- if (e.placeables++, e.placeables > st)
209
- throw e.dirty.delete(t), new RangeError(`Too many placeables expanded: ${e.placeables}, max allowed is ${st}`);
210
- r && n.push(hr), n.push(le(e, u).toString(e)), r && n.push(Er);
211
- }
212
- return e.dirty.delete(t), n.join("");
213
- }
214
- function X(e, t) {
215
- return typeof t == "string" ? e.bundle._transform(t) : Tn(e, t);
216
- }
217
- class br {
218
- constructor(t, n, r) {
219
- this.dirty = /* @__PURE__ */ new WeakSet(), this.params = null, this.placeables = 0, this.bundle = t, this.errors = n, this.args = r;
220
- }
221
- reportError(t) {
222
- if (!this.errors || !(t instanceof Error))
223
- throw t;
224
- this.errors.push(t);
225
- }
226
- memoizeIntlObject(t, n) {
227
- let r = this.bundle._intls.get(t);
228
- r || (r = {}, this.bundle._intls.set(t, r));
229
- let u = JSON.stringify(n);
230
- return r[u] || (r[u] = new t(this.bundle.locales, n)), r[u];
231
- }
232
- }
233
- function be(e, t) {
234
- const n = /* @__PURE__ */ Object.create(null);
235
- for (const [r, u] of Object.entries(e))
236
- t.includes(r) && (n[r] = u.valueOf());
237
- return n;
238
- }
239
- const it = [
240
- "unitDisplay",
241
- "currencyDisplay",
242
- "useGrouping",
243
- "minimumIntegerDigits",
244
- "minimumFractionDigits",
245
- "maximumFractionDigits",
246
- "minimumSignificantDigits",
247
- "maximumSignificantDigits"
248
- ];
249
- function wr(e, t) {
250
- let n = e[0];
251
- if (n instanceof C)
252
- return new C(`NUMBER(${n.valueOf()})`);
253
- if (n instanceof M)
254
- return new M(n.valueOf(), {
255
- ...n.opts,
256
- ...be(t, it)
257
- });
258
- if (n instanceof ae)
259
- return new M(n.valueOf(), {
260
- ...be(t, it)
261
- });
262
- throw new TypeError("Invalid argument to NUMBER");
263
- }
264
- const lt = [
265
- "dateStyle",
266
- "timeStyle",
267
- "fractionalSecondDigits",
268
- "dayPeriod",
269
- "hour12",
270
- "weekday",
271
- "era",
272
- "year",
273
- "month",
274
- "day",
275
- "hour",
276
- "minute",
277
- "second",
278
- "timeZoneName"
279
- ];
280
- function Or(e, t) {
281
- let n = e[0];
282
- if (n instanceof C)
283
- return new C(`DATETIME(${n.valueOf()})`);
284
- if (n instanceof ae)
285
- return new ae(n.valueOf(), {
286
- ...n.opts,
287
- ...be(t, lt)
288
- });
289
- if (n instanceof M)
290
- return new ae(n.valueOf(), {
291
- ...be(t, lt)
292
- });
293
- throw new TypeError("Invalid argument to DATETIME");
294
- }
295
- const ct = /* @__PURE__ */ new Map();
296
- function Sr(e) {
297
- const t = Array.isArray(e) ? e.join(" ") : e;
298
- let n = ct.get(t);
299
- return n === void 0 && (n = /* @__PURE__ */ new Map(), ct.set(t, n)), n;
300
- }
301
- class Se {
302
- /**
303
- * Create an instance of `FluentBundle`.
304
- *
305
- * The `locales` argument is used to instantiate `Intl` formatters used by
306
- * translations. The `options` object can be used to configure the bundle.
307
- *
308
- * Examples:
309
- *
310
- * let bundle = new FluentBundle(["en-US", "en"]);
311
- *
312
- * let bundle = new FluentBundle(locales, {useIsolating: false});
313
- *
314
- * let bundle = new FluentBundle(locales, {
315
- * useIsolating: true,
316
- * functions: {
317
- * NODE_ENV: () => process.env.NODE_ENV
318
- * }
319
- * });
320
- *
321
- * Available options:
322
- *
323
- * - `functions` - an object of additional functions available to
324
- * translations as builtins.
325
- *
326
- * - `useIsolating` - boolean specifying whether to use Unicode isolation
327
- * marks (FSI, PDI) for bidi interpolations. Default: `true`.
328
- *
329
- * - `transform` - a function used to transform string parts of patterns.
330
- */
331
- constructor(t, { functions: n, useIsolating: r = !0, transform: u = (o) => o } = {}) {
332
- this._terms = /* @__PURE__ */ new Map(), this._messages = /* @__PURE__ */ new Map(), this.locales = Array.isArray(t) ? t : [t], this._functions = {
333
- NUMBER: wr,
334
- DATETIME: Or,
335
- ...n
336
- }, this._useIsolating = r, this._transform = u, this._intls = Sr(t);
337
- }
338
- /**
339
- * Check if a message is present in the bundle.
340
- *
341
- * @param id - The identifier of the message to check.
342
- */
343
- hasMessage(t) {
344
- return this._messages.has(t);
345
- }
346
- /**
347
- * Return a raw unformatted message object from the bundle.
348
- *
349
- * Raw messages are `{value, attributes}` shapes containing translation units
350
- * called `Patterns`. `Patterns` are implementation-specific; they should be
351
- * treated as black boxes and formatted with `FluentBundle.formatPattern`.
352
- *
353
- * @param id - The identifier of the message to check.
354
- */
355
- getMessage(t) {
356
- return this._messages.get(t);
357
- }
358
- /**
359
- * Add a translation resource to the bundle.
360
- *
361
- * The translation resource must be an instance of `FluentResource`.
362
- *
363
- * let res = new FluentResource("foo = Foo");
364
- * bundle.addResource(res);
365
- * bundle.getMessage("foo");
366
- * // → {value: .., attributes: {..}}
367
- *
368
- * Available options:
369
- *
370
- * - `allowOverrides` - boolean specifying whether it's allowed to override
371
- * an existing message or term with a new value. Default: `false`.
372
- *
373
- * @param res - FluentResource object.
374
- * @param options
375
- */
376
- addResource(t, { allowOverrides: n = !1 } = {}) {
377
- const r = [];
378
- for (let u = 0; u < t.body.length; u++) {
379
- let o = t.body[u];
380
- if (o.id.startsWith("-")) {
381
- if (n === !1 && this._terms.has(o.id)) {
382
- r.push(new Error(`Attempt to override an existing term: "${o.id}"`));
383
- continue;
384
- }
385
- this._terms.set(o.id, o);
386
- } else {
387
- if (n === !1 && this._messages.has(o.id)) {
388
- r.push(new Error(`Attempt to override an existing message: "${o.id}"`));
389
- continue;
390
- }
391
- this._messages.set(o.id, o);
392
- }
393
- }
394
- return r;
395
- }
396
- /**
397
- * Format a `Pattern` to a string.
398
- *
399
- * Format a raw `Pattern` into a string. `args` will be used to resolve
400
- * references to variables passed as arguments to the translation.
401
- *
402
- * In case of errors `formatPattern` will try to salvage as much of the
403
- * translation as possible and will still return a string. For performance
404
- * reasons, the encountered errors are not returned but instead are appended
405
- * to the `errors` array passed as the third argument.
406
- *
407
- * let errors = [];
408
- * bundle.addResource(
409
- * new FluentResource("hello = Hello, {$name}!"));
410
- *
411
- * let hello = bundle.getMessage("hello");
412
- * if (hello.value) {
413
- * bundle.formatPattern(hello.value, {name: "Jane"}, errors);
414
- * // Returns "Hello, Jane!" and `errors` is empty.
415
- *
416
- * bundle.formatPattern(hello.value, undefined, errors);
417
- * // Returns "Hello, {$name}!" and `errors` is now:
418
- * // [<ReferenceError: Unknown variable: name>]
419
- * }
420
- *
421
- * If `errors` is omitted, the first encountered error will be thrown.
422
- */
423
- formatPattern(t, n = null, r = null) {
424
- if (typeof t == "string")
425
- return this._transform(t);
426
- let u = new br(this, r, n);
427
- try {
428
- return Tn(u, t).toString(u);
429
- } catch (o) {
430
- if (u.errors && o instanceof Error)
431
- return u.errors.push(o), new C().toString(u);
432
- throw o;
433
- }
434
- }
435
- }
436
- class Tr extends Array {
437
- /**
438
- * Create a `CachedIterable` instance from an iterable or, if another
439
- * instance of `CachedIterable` is passed, return it without any
440
- * modifications.
441
- *
442
- * @param {Iterable} iterable
443
- * @returns {CachedIterable}
444
- */
445
- static from(t) {
446
- return t instanceof this ? t : new this(t);
447
- }
448
- }
449
- class Cr extends Tr {
450
- /**
451
- * Create an `CachedSyncIterable` instance.
452
- *
453
- * @param {Iterable} iterable
454
- * @returns {CachedSyncIterable}
455
- */
456
- constructor(t) {
457
- if (super(), Symbol.iterator in Object(t))
458
- this.iterator = t[Symbol.iterator]();
459
- else
460
- throw new TypeError("Argument must implement the iteration protocol.");
461
- }
462
- [Symbol.iterator]() {
463
- const t = this;
464
- let n = 0;
465
- return {
466
- next() {
467
- return t.length <= n && t.push(t.iterator.next()), t[n++];
468
- }
469
- };
470
- }
471
- /**
472
- * This method allows user to consume the next element from the iterator
473
- * into the cache.
474
- *
475
- * @param {number} count - number of elements to consume
476
- */
477
- touchNext(t = 1) {
478
- let n = 0;
479
- for (; n++ < t; ) {
480
- const r = this[this.length - 1];
481
- if (r && r.done)
482
- break;
483
- this.push(this.iterator.next());
484
- }
485
- return this[this.length - 1];
486
- }
487
- }
488
- function Ir(e, t) {
489
- return Array.isArray(t) ? t.map((n) => ft(e, n)) : ft(e, t);
490
- }
491
- function ft(e, t) {
492
- for (const n of e)
493
- if (n.hasMessage(t))
494
- return n;
495
- return null;
496
- }
497
- function Dr(e, t) {
498
- const n = new Se(e, {
499
- functions: t._functions,
500
- useIsolating: t._useIsolating,
501
- transform: t._transform
502
- });
503
- return n._terms = new Map(t._terms), n._messages = new Map(t._messages), n;
504
- }
505
- function kr(e, t) {
506
- if (!e)
507
- throw new Error(`[fluent-vue] ${t}`);
508
- }
509
- function J(e, ...t) {
510
- console.warn(`[fluent-vue] ${e}`, ...t);
511
- }
512
- var Cn = class {
513
- constructor(e, t) {
514
- this.options = t, this.format = (n, r) => {
515
- const u = this.getBundle(n), o = this.getMessage(u, n);
516
- return this._format(u, o, r) ?? n;
517
- }, this.formatAttrs = (n, r) => {
518
- const u = this.getBundle(n), o = this.getMessage(u, n);
519
- return this._formatAttrs(u, o, r) ?? {};
520
- }, this.formatWithAttrs = (n, r) => {
521
- const u = this.getBundle(n), o = this.getMessage(u, n), s = this._format(u, o, r);
522
- return {
523
- value: s ?? n,
524
- attributes: this._formatAttrs(u, o, r) ?? {},
525
- hasValue: s !== null
526
- };
527
- }, this.$t = this.format, this.$ta = this.formatAttrs, this.bundles = e;
528
- }
529
- getBundle(e) {
530
- return Ir(this.bundles.value, e);
531
- }
532
- getMessage(e, t) {
533
- const n = e == null ? void 0 : e.getMessage(t);
534
- return n === void 0 ? (this.options.warnMissing(t), null) : n;
535
- }
536
- formatPattern(e, t, n, r) {
537
- const u = [], o = r;
538
- if (o != null && this.options.mapVariable != null)
539
- for (const [a, f] of Object.entries(o)) {
540
- const h = this.options.mapVariable(f);
541
- h != null && (o[a] = h);
542
- }
543
- const s = e.formatPattern(n, o, u);
544
- for (const a of u)
545
- J(`Error when formatting message with key [${t}]`, a);
546
- return s;
547
- }
548
- _format(e, t, n) {
549
- return e === null || t === null || t.value === null ? null : this.formatPattern(e, t.id, t.value, n);
550
- }
551
- _formatAttrs(e, t, n) {
552
- if (e === null || t === null)
553
- return null;
554
- const r = {};
555
- for (const [u, o] of Object.entries(t.attributes))
556
- r[u] = this.formatPattern(e, t.id, o, n);
557
- return r;
558
- }
559
- };
560
- function* Rr(e, t) {
561
- for (const n of e)
562
- yield* t(n);
563
- }
564
- function Y(e, t, n = !1) {
565
- if (t == null)
566
- return e;
567
- const r = t.$options;
568
- if (r._fluent != null)
569
- return r._fluent;
570
- const u = In(e, r.fluent);
571
- return !n && !(typeof window > "u") && (r._fluent = u), u;
572
- }
573
- function In(e, t) {
574
- if (t == null)
575
- return e;
576
- const n = Ae(
577
- () => Cr.from(
578
- Rr(e.bundles.value, (r) => Object.entries(t).map(([u, o]) => {
579
- const s = u.split(/[\s+,]/);
580
- if (r.locales.filter((h) => s.includes(h)).length === 0)
581
- return r;
582
- const f = Dr(s, r);
583
- return f.addResource(o, { allowOverrides: !0 }), f;
584
- }))
585
- )
586
- );
587
- return new Cn(n, e.options);
588
- }
589
- var xr = Symbol("root-context"), Pr = Object.create, Dn = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, Ge = Object.getOwnPropertyNames, Fr = Object.getPrototypeOf, Lr = Object.prototype.hasOwnProperty, Vr = (e, t) => function() {
590
- return e && (t = (0, e[Ge(e)[0]])(e = 0)), t;
591
- }, Br = (e, t) => function() {
592
- return t || (0, e[Ge(e)[0]])((t = { exports: {} }).exports, t), t.exports;
593
- }, Ur = (e, t, n, r) => {
594
- if (t && typeof t == "object" || typeof t == "function")
595
- for (let u of Ge(t))
596
- !Lr.call(e, u) && u !== n && Dn(e, u, { get: () => t[u], enumerable: !(r = Nr(t, u)) || r.enumerable });
597
- return e;
598
- }, Mr = (e, t, n) => (n = e != null ? Pr(Fr(e)) : {}, Ur(
599
- // If the importer is in node compatibility mode or this is not an ESM
600
- // file that has been converted to a CommonJS file using a Babel-
601
- // compatible transform (i.e. "__esModule" has not been set), then set
602
- // "default" to the CommonJS "module.exports" for node compatibility.
603
- Dn(n, "default", { value: e, enumerable: !0 }),
604
- e
605
- )), he = Vr({
606
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"() {
607
- }
608
- }), $r = Br({
609
- "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e, t) {
610
- he(), t.exports = r;
611
- function n(o) {
612
- return o instanceof Buffer ? Buffer.from(o) : new o.constructor(o.buffer.slice(), o.byteOffset, o.length);
613
- }
614
- function r(o) {
615
- if (o = o || {}, o.circles) return u(o);
616
- const s = /* @__PURE__ */ new Map();
617
- if (s.set(Date, (i) => new Date(i)), s.set(Map, (i, E) => new Map(f(Array.from(i), E))), s.set(Set, (i, E) => new Set(f(Array.from(i), E))), o.constructorHandlers)
618
- for (const i of o.constructorHandlers)
619
- s.set(i[0], i[1]);
620
- let a = null;
621
- return o.proto ? A : h;
622
- function f(i, E) {
623
- const c = Object.keys(i), _ = new Array(c.length);
624
- for (let v = 0; v < c.length; v++) {
625
- const p = c[v], g = i[p];
626
- typeof g != "object" || g === null ? _[p] = g : g.constructor !== Object && (a = s.get(g.constructor)) ? _[p] = a(g, E) : ArrayBuffer.isView(g) ? _[p] = n(g) : _[p] = E(g);
627
- }
628
- return _;
629
- }
630
- function h(i) {
631
- if (typeof i != "object" || i === null) return i;
632
- if (Array.isArray(i)) return f(i, h);
633
- if (i.constructor !== Object && (a = s.get(i.constructor)))
634
- return a(i, h);
635
- const E = {};
636
- for (const c in i) {
637
- if (Object.hasOwnProperty.call(i, c) === !1) continue;
638
- const _ = i[c];
639
- typeof _ != "object" || _ === null ? E[c] = _ : _.constructor !== Object && (a = s.get(_.constructor)) ? E[c] = a(_, h) : ArrayBuffer.isView(_) ? E[c] = n(_) : E[c] = h(_);
640
- }
641
- return E;
642
- }
643
- function A(i) {
644
- if (typeof i != "object" || i === null) return i;
645
- if (Array.isArray(i)) return f(i, A);
646
- if (i.constructor !== Object && (a = s.get(i.constructor)))
647
- return a(i, A);
648
- const E = {};
649
- for (const c in i) {
650
- const _ = i[c];
651
- typeof _ != "object" || _ === null ? E[c] = _ : _.constructor !== Object && (a = s.get(_.constructor)) ? E[c] = a(_, A) : ArrayBuffer.isView(_) ? E[c] = n(_) : E[c] = A(_);
652
- }
653
- return E;
654
- }
655
- }
656
- function u(o) {
657
- const s = [], a = [], f = /* @__PURE__ */ new Map();
658
- if (f.set(Date, (c) => new Date(c)), f.set(Map, (c, _) => new Map(A(Array.from(c), _))), f.set(Set, (c, _) => new Set(A(Array.from(c), _))), o.constructorHandlers)
659
- for (const c of o.constructorHandlers)
660
- f.set(c[0], c[1]);
661
- let h = null;
662
- return o.proto ? E : i;
663
- function A(c, _) {
664
- const v = Object.keys(c), p = new Array(v.length);
665
- for (let g = 0; g < v.length; g++) {
666
- const O = v[g], b = c[O];
667
- if (typeof b != "object" || b === null)
668
- p[O] = b;
669
- else if (b.constructor !== Object && (h = f.get(b.constructor)))
670
- p[O] = h(b, _);
671
- else if (ArrayBuffer.isView(b))
672
- p[O] = n(b);
673
- else {
674
- const I = s.indexOf(b);
675
- I !== -1 ? p[O] = a[I] : p[O] = _(b);
676
- }
677
- }
678
- return p;
679
- }
680
- function i(c) {
681
- if (typeof c != "object" || c === null) return c;
682
- if (Array.isArray(c)) return A(c, i);
683
- if (c.constructor !== Object && (h = f.get(c.constructor)))
684
- return h(c, i);
685
- const _ = {};
686
- s.push(c), a.push(_);
687
- for (const v in c) {
688
- if (Object.hasOwnProperty.call(c, v) === !1) continue;
689
- const p = c[v];
690
- if (typeof p != "object" || p === null)
691
- _[v] = p;
692
- else if (p.constructor !== Object && (h = f.get(p.constructor)))
693
- _[v] = h(p, i);
694
- else if (ArrayBuffer.isView(p))
695
- _[v] = n(p);
696
- else {
697
- const g = s.indexOf(p);
698
- g !== -1 ? _[v] = a[g] : _[v] = i(p);
699
- }
700
- }
701
- return s.pop(), a.pop(), _;
702
- }
703
- function E(c) {
704
- if (typeof c != "object" || c === null) return c;
705
- if (Array.isArray(c)) return A(c, E);
706
- if (c.constructor !== Object && (h = f.get(c.constructor)))
707
- return h(c, E);
708
- const _ = {};
709
- s.push(c), a.push(_);
710
- for (const v in c) {
711
- const p = c[v];
712
- if (typeof p != "object" || p === null)
713
- _[v] = p;
714
- else if (p.constructor !== Object && (h = f.get(p.constructor)))
715
- _[v] = h(p, E);
716
- else if (ArrayBuffer.isView(p))
717
- _[v] = n(p);
718
- else {
719
- const g = s.indexOf(p);
720
- g !== -1 ? _[v] = a[g] : _[v] = E(p);
721
- }
722
- }
723
- return s.pop(), a.pop(), _;
724
- }
725
- }
726
- }
727
- });
728
- he();
729
- he();
730
- he();
731
- var Kr = typeof navigator < "u", m = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : {}, dt;
732
- typeof navigator < "u" && ((dt = navigator.userAgent) == null || dt.toLowerCase().includes("electron"));
733
- he();
734
- var zr = Mr($r()), Hr = /(?:^|[-_/])(\w)/g;
735
- function jr(e, t) {
736
- return t ? t.toUpperCase() : "";
737
- }
738
- function Gr(e) {
739
- return e && `${e}`.replace(Hr, jr);
740
- }
741
- function Wr(e, t) {
742
- let n = e.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
743
- n.endsWith(`index${t}`) && (n = n.replace(`/index${t}`, t));
744
- const r = n.lastIndexOf("/"), u = n.substring(r + 1);
745
- {
746
- const o = u.lastIndexOf(t);
747
- return u.substring(0, o);
748
- }
749
- }
750
- var _t = (0, zr.default)({ circles: !0 });
751
- const qr = {
752
- trailing: !0
753
- };
754
- function Q(e, t = 25, n = {}) {
755
- if (n = { ...qr, ...n }, !Number.isFinite(t))
756
- throw new TypeError("Expected `wait` to be a finite number");
757
- let r, u, o = [], s, a;
758
- const f = (h, A) => (s = Yr(e, h, A), s.finally(() => {
759
- if (s = null, n.trailing && a && !u) {
760
- const i = f(h, a);
761
- return a = null, i;
762
- }
763
- }), s);
764
- return function(...h) {
765
- return s ? (n.trailing && (a = h), s) : new Promise((A) => {
766
- const i = !u && n.leading;
767
- clearTimeout(u), u = setTimeout(() => {
768
- u = null;
769
- const E = n.leading ? r : f(this, h);
770
- for (const c of o)
771
- c(E);
772
- o = [];
773
- }, t), i ? (r = f(this, h), A(r)) : o.push(A);
774
- });
775
- };
776
- }
777
- async function Yr(e, t, n) {
778
- return await e.apply(t, n);
779
- }
780
- function Ve(e, t = {}, n) {
781
- for (const r in e) {
782
- const u = e[r], o = n ? `${n}:${r}` : r;
783
- typeof u == "object" && u !== null ? Ve(u, t, o) : typeof u == "function" && (t[o] = u);
784
- }
785
- return t;
786
- }
787
- const Zr = { run: (e) => e() }, Xr = () => Zr, kn = typeof console.createTask < "u" ? console.createTask : Xr;
788
- function Jr(e, t) {
789
- const n = t.shift(), r = kn(n);
790
- return e.reduce(
791
- (u, o) => u.then(() => r.run(() => o(...t))),
792
- Promise.resolve()
793
- );
794
- }
795
- function Qr(e, t) {
796
- const n = t.shift(), r = kn(n);
797
- return Promise.all(e.map((u) => r.run(() => u(...t))));
798
- }
799
- function ke(e, t) {
800
- for (const n of [...e])
801
- n(t);
802
- }
803
- class eu {
804
- constructor() {
805
- this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this);
806
- }
807
- hook(t, n, r = {}) {
808
- if (!t || typeof n != "function")
809
- return () => {
810
- };
811
- const u = t;
812
- let o;
813
- for (; this._deprecatedHooks[t]; )
814
- o = this._deprecatedHooks[t], t = o.to;
815
- if (o && !r.allowDeprecated) {
816
- let s = o.message;
817
- s || (s = `${u} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = /* @__PURE__ */ new Set()), this._deprecatedMessages.has(s) || (console.warn(s), this._deprecatedMessages.add(s));
818
- }
819
- if (!n.name)
820
- try {
821
- Object.defineProperty(n, "name", {
822
- get: () => "_" + t.replace(/\W+/g, "_") + "_hook_cb",
823
- configurable: !0
824
- });
825
- } catch {
826
- }
827
- return this._hooks[t] = this._hooks[t] || [], this._hooks[t].push(n), () => {
828
- n && (this.removeHook(t, n), n = void 0);
829
- };
830
- }
831
- hookOnce(t, n) {
832
- let r, u = (...o) => (typeof r == "function" && r(), r = void 0, u = void 0, n(...o));
833
- return r = this.hook(t, u), r;
834
- }
835
- removeHook(t, n) {
836
- if (this._hooks[t]) {
837
- const r = this._hooks[t].indexOf(n);
838
- r !== -1 && this._hooks[t].splice(r, 1), this._hooks[t].length === 0 && delete this._hooks[t];
839
- }
840
- }
841
- deprecateHook(t, n) {
842
- this._deprecatedHooks[t] = typeof n == "string" ? { to: n } : n;
843
- const r = this._hooks[t] || [];
844
- delete this._hooks[t];
845
- for (const u of r)
846
- this.hook(t, u);
847
- }
848
- deprecateHooks(t) {
849
- Object.assign(this._deprecatedHooks, t);
850
- for (const n in t)
851
- this.deprecateHook(n, t[n]);
852
- }
853
- addHooks(t) {
854
- const n = Ve(t), r = Object.keys(n).map(
855
- (u) => this.hook(u, n[u])
856
- );
857
- return () => {
858
- for (const u of r.splice(0, r.length))
859
- u();
860
- };
861
- }
862
- removeHooks(t) {
863
- const n = Ve(t);
864
- for (const r in n)
865
- this.removeHook(r, n[r]);
866
- }
867
- removeAllHooks() {
868
- for (const t in this._hooks)
869
- delete this._hooks[t];
870
- }
871
- callHook(t, ...n) {
872
- return n.unshift(t), this.callHookWith(Jr, t, ...n);
873
- }
874
- callHookParallel(t, ...n) {
875
- return n.unshift(t), this.callHookWith(Qr, t, ...n);
876
- }
877
- callHookWith(t, n, ...r) {
878
- const u = this._before || this._after ? { name: n, args: r, context: {} } : void 0;
879
- this._before && ke(this._before, u);
880
- const o = t(
881
- n in this._hooks ? [...this._hooks[n]] : [],
882
- r
883
- );
884
- return o instanceof Promise ? o.finally(() => {
885
- this._after && u && ke(this._after, u);
886
- }) : (this._after && u && ke(this._after, u), o);
887
- }
888
- beforeEach(t) {
889
- return this._before = this._before || [], this._before.push(t), () => {
890
- if (this._before !== void 0) {
891
- const n = this._before.indexOf(t);
892
- n !== -1 && this._before.splice(n, 1);
893
- }
894
- };
895
- }
896
- afterEach(t) {
897
- return this._after = this._after || [], this._after.push(t), () => {
898
- if (this._after !== void 0) {
899
- const n = this._after.indexOf(t);
900
- n !== -1 && this._after.splice(n, 1);
901
- }
902
- };
903
- }
904
- }
905
- function Rn() {
906
- return new eu();
907
- }
908
- var tu = Object.create, xn = Object.defineProperty, nu = Object.getOwnPropertyDescriptor, We = Object.getOwnPropertyNames, ru = Object.getPrototypeOf, uu = Object.prototype.hasOwnProperty, ou = (e, t) => function() {
909
- return e && (t = (0, e[We(e)[0]])(e = 0)), t;
910
- }, Pn = (e, t) => function() {
911
- return t || (0, e[We(e)[0]])((t = { exports: {} }).exports, t), t.exports;
912
- }, su = (e, t, n, r) => {
913
- if (t && typeof t == "object" || typeof t == "function")
914
- for (let u of We(t))
915
- !uu.call(e, u) && u !== n && xn(e, u, { get: () => t[u], enumerable: !(r = nu(t, u)) || r.enumerable });
916
- return e;
917
- }, au = (e, t, n) => (n = e != null ? tu(ru(e)) : {}, su(
918
- // If the importer is in node compatibility mode or this is not an ESM
919
- // file that has been converted to a CommonJS file using a Babel-
920
- // compatible transform (i.e. "__esModule" has not been set), then set
921
- // "default" to the CommonJS "module.exports" for node compatibility.
922
- xn(n, "default", { value: e, enumerable: !0 }),
923
- e
924
- )), l = ou({
925
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"() {
926
- }
927
- }), iu = Pn({
928
- "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e, t) {
929
- l(), function(n) {
930
- var r = {
931
- // latin
932
- À: "A",
933
- Á: "A",
934
- Â: "A",
935
- Ã: "A",
936
- Ä: "Ae",
937
- Å: "A",
938
- Æ: "AE",
939
- Ç: "C",
940
- È: "E",
941
- É: "E",
942
- Ê: "E",
943
- Ë: "E",
944
- Ì: "I",
945
- Í: "I",
946
- Î: "I",
947
- Ï: "I",
948
- Ð: "D",
949
- Ñ: "N",
950
- Ò: "O",
951
- Ó: "O",
952
- Ô: "O",
953
- Õ: "O",
954
- Ö: "Oe",
955
- Ő: "O",
956
- Ø: "O",
957
- Ù: "U",
958
- Ú: "U",
959
- Û: "U",
960
- Ü: "Ue",
961
- Ű: "U",
962
- Ý: "Y",
963
- Þ: "TH",
964
- ß: "ss",
965
- à: "a",
966
- á: "a",
967
- â: "a",
968
- ã: "a",
969
- ä: "ae",
970
- å: "a",
971
- æ: "ae",
972
- ç: "c",
973
- è: "e",
974
- é: "e",
975
- ê: "e",
976
- ë: "e",
977
- ì: "i",
978
- í: "i",
979
- î: "i",
980
- ï: "i",
981
- ð: "d",
982
- ñ: "n",
983
- ò: "o",
984
- ó: "o",
985
- ô: "o",
986
- õ: "o",
987
- ö: "oe",
988
- ő: "o",
989
- ø: "o",
990
- ù: "u",
991
- ú: "u",
992
- û: "u",
993
- ü: "ue",
994
- ű: "u",
995
- ý: "y",
996
- þ: "th",
997
- ÿ: "y",
998
- "ẞ": "SS",
999
- // language specific
1000
- // Arabic
1001
- ا: "a",
1002
- أ: "a",
1003
- إ: "i",
1004
- آ: "aa",
1005
- ؤ: "u",
1006
- ئ: "e",
1007
- ء: "a",
1008
- ب: "b",
1009
- ت: "t",
1010
- ث: "th",
1011
- ج: "j",
1012
- ح: "h",
1013
- خ: "kh",
1014
- د: "d",
1015
- ذ: "th",
1016
- ر: "r",
1017
- ز: "z",
1018
- س: "s",
1019
- ش: "sh",
1020
- ص: "s",
1021
- ض: "dh",
1022
- ط: "t",
1023
- ظ: "z",
1024
- ع: "a",
1025
- غ: "gh",
1026
- ف: "f",
1027
- ق: "q",
1028
- ك: "k",
1029
- ل: "l",
1030
- م: "m",
1031
- ن: "n",
1032
- ه: "h",
1033
- و: "w",
1034
- ي: "y",
1035
- ى: "a",
1036
- ة: "h",
1037
- ﻻ: "la",
1038
- ﻷ: "laa",
1039
- ﻹ: "lai",
1040
- ﻵ: "laa",
1041
- // Persian additional characters than Arabic
1042
- گ: "g",
1043
- چ: "ch",
1044
- پ: "p",
1045
- ژ: "zh",
1046
- ک: "k",
1047
- ی: "y",
1048
- // Arabic diactrics
1049
- "َ": "a",
1050
- "ً": "an",
1051
- "ِ": "e",
1052
- "ٍ": "en",
1053
- "ُ": "u",
1054
- "ٌ": "on",
1055
- "ْ": "",
1056
- // Arabic numbers
1057
- "٠": "0",
1058
- "١": "1",
1059
- "٢": "2",
1060
- "٣": "3",
1061
- "٤": "4",
1062
- "٥": "5",
1063
- "٦": "6",
1064
- "٧": "7",
1065
- "٨": "8",
1066
- "٩": "9",
1067
- // Persian numbers
1068
- "۰": "0",
1069
- "۱": "1",
1070
- "۲": "2",
1071
- "۳": "3",
1072
- "۴": "4",
1073
- "۵": "5",
1074
- "۶": "6",
1075
- "۷": "7",
1076
- "۸": "8",
1077
- "۹": "9",
1078
- // Burmese consonants
1079
- က: "k",
1080
- ခ: "kh",
1081
- ဂ: "g",
1082
- ဃ: "ga",
1083
- င: "ng",
1084
- စ: "s",
1085
- ဆ: "sa",
1086
- ဇ: "z",
1087
- "စျ": "za",
1088
- ည: "ny",
1089
- ဋ: "t",
1090
- ဌ: "ta",
1091
- ဍ: "d",
1092
- ဎ: "da",
1093
- ဏ: "na",
1094
- တ: "t",
1095
- ထ: "ta",
1096
- ဒ: "d",
1097
- ဓ: "da",
1098
- န: "n",
1099
- ပ: "p",
1100
- ဖ: "pa",
1101
- ဗ: "b",
1102
- ဘ: "ba",
1103
- မ: "m",
1104
- ယ: "y",
1105
- ရ: "ya",
1106
- လ: "l",
1107
- ဝ: "w",
1108
- သ: "th",
1109
- ဟ: "h",
1110
- ဠ: "la",
1111
- အ: "a",
1112
- // consonant character combos
1113
- "ြ": "y",
1114
- "ျ": "ya",
1115
- "ွ": "w",
1116
- "ြွ": "yw",
1117
- "ျွ": "ywa",
1118
- "ှ": "h",
1119
- // independent vowels
1120
- ဧ: "e",
1121
- "၏": "-e",
1122
- ဣ: "i",
1123
- ဤ: "-i",
1124
- ဉ: "u",
1125
- ဦ: "-u",
1126
- ဩ: "aw",
1127
- "သြော": "aw",
1128
- ဪ: "aw",
1129
- // numbers
1130
- "၀": "0",
1131
- "၁": "1",
1132
- "၂": "2",
1133
- "၃": "3",
1134
- "၄": "4",
1135
- "၅": "5",
1136
- "၆": "6",
1137
- "၇": "7",
1138
- "၈": "8",
1139
- "၉": "9",
1140
- // virama and tone marks which are silent in transliteration
1141
- "္": "",
1142
- "့": "",
1143
- "း": "",
1144
- // Czech
1145
- č: "c",
1146
- ď: "d",
1147
- ě: "e",
1148
- ň: "n",
1149
- ř: "r",
1150
- š: "s",
1151
- ť: "t",
1152
- ů: "u",
1153
- ž: "z",
1154
- Č: "C",
1155
- Ď: "D",
1156
- Ě: "E",
1157
- Ň: "N",
1158
- Ř: "R",
1159
- Š: "S",
1160
- Ť: "T",
1161
- Ů: "U",
1162
- Ž: "Z",
1163
- // Dhivehi
1164
- ހ: "h",
1165
- ށ: "sh",
1166
- ނ: "n",
1167
- ރ: "r",
1168
- ބ: "b",
1169
- ޅ: "lh",
1170
- ކ: "k",
1171
- އ: "a",
1172
- ވ: "v",
1173
- މ: "m",
1174
- ފ: "f",
1175
- ދ: "dh",
1176
- ތ: "th",
1177
- ލ: "l",
1178
- ގ: "g",
1179
- ޏ: "gn",
1180
- ސ: "s",
1181
- ޑ: "d",
1182
- ޒ: "z",
1183
- ޓ: "t",
1184
- ޔ: "y",
1185
- ޕ: "p",
1186
- ޖ: "j",
1187
- ޗ: "ch",
1188
- ޘ: "tt",
1189
- ޙ: "hh",
1190
- ޚ: "kh",
1191
- ޛ: "th",
1192
- ޜ: "z",
1193
- ޝ: "sh",
1194
- ޞ: "s",
1195
- ޟ: "d",
1196
- ޠ: "t",
1197
- ޡ: "z",
1198
- ޢ: "a",
1199
- ޣ: "gh",
1200
- ޤ: "q",
1201
- ޥ: "w",
1202
- "ަ": "a",
1203
- "ާ": "aa",
1204
- "ި": "i",
1205
- "ީ": "ee",
1206
- "ު": "u",
1207
- "ޫ": "oo",
1208
- "ެ": "e",
1209
- "ޭ": "ey",
1210
- "ޮ": "o",
1211
- "ޯ": "oa",
1212
- "ް": "",
1213
- // Georgian https://en.wikipedia.org/wiki/Romanization_of_Georgian
1214
- // National system (2002)
1215
- ა: "a",
1216
- ბ: "b",
1217
- გ: "g",
1218
- დ: "d",
1219
- ე: "e",
1220
- ვ: "v",
1221
- ზ: "z",
1222
- თ: "t",
1223
- ი: "i",
1224
- კ: "k",
1225
- ლ: "l",
1226
- მ: "m",
1227
- ნ: "n",
1228
- ო: "o",
1229
- პ: "p",
1230
- ჟ: "zh",
1231
- რ: "r",
1232
- ს: "s",
1233
- ტ: "t",
1234
- უ: "u",
1235
- ფ: "p",
1236
- ქ: "k",
1237
- ღ: "gh",
1238
- ყ: "q",
1239
- შ: "sh",
1240
- ჩ: "ch",
1241
- ც: "ts",
1242
- ძ: "dz",
1243
- წ: "ts",
1244
- ჭ: "ch",
1245
- ხ: "kh",
1246
- ჯ: "j",
1247
- ჰ: "h",
1248
- // Greek
1249
- α: "a",
1250
- β: "v",
1251
- γ: "g",
1252
- δ: "d",
1253
- ε: "e",
1254
- ζ: "z",
1255
- η: "i",
1256
- θ: "th",
1257
- ι: "i",
1258
- κ: "k",
1259
- λ: "l",
1260
- μ: "m",
1261
- ν: "n",
1262
- ξ: "ks",
1263
- ο: "o",
1264
- π: "p",
1265
- ρ: "r",
1266
- σ: "s",
1267
- τ: "t",
1268
- υ: "y",
1269
- φ: "f",
1270
- χ: "x",
1271
- ψ: "ps",
1272
- ω: "o",
1273
- ά: "a",
1274
- έ: "e",
1275
- ί: "i",
1276
- ό: "o",
1277
- ύ: "y",
1278
- ή: "i",
1279
- ώ: "o",
1280
- ς: "s",
1281
- ϊ: "i",
1282
- ΰ: "y",
1283
- ϋ: "y",
1284
- ΐ: "i",
1285
- Α: "A",
1286
- Β: "B",
1287
- Γ: "G",
1288
- Δ: "D",
1289
- Ε: "E",
1290
- Ζ: "Z",
1291
- Η: "I",
1292
- Θ: "TH",
1293
- Ι: "I",
1294
- Κ: "K",
1295
- Λ: "L",
1296
- Μ: "M",
1297
- Ν: "N",
1298
- Ξ: "KS",
1299
- Ο: "O",
1300
- Π: "P",
1301
- Ρ: "R",
1302
- Σ: "S",
1303
- Τ: "T",
1304
- Υ: "Y",
1305
- Φ: "F",
1306
- Χ: "X",
1307
- Ψ: "PS",
1308
- Ω: "O",
1309
- Ά: "A",
1310
- Έ: "E",
1311
- Ί: "I",
1312
- Ό: "O",
1313
- Ύ: "Y",
1314
- Ή: "I",
1315
- Ώ: "O",
1316
- Ϊ: "I",
1317
- Ϋ: "Y",
1318
- // Latvian
1319
- ā: "a",
1320
- // 'č': 'c', // duplicate
1321
- ē: "e",
1322
- ģ: "g",
1323
- ī: "i",
1324
- ķ: "k",
1325
- ļ: "l",
1326
- ņ: "n",
1327
- // 'š': 's', // duplicate
1328
- ū: "u",
1329
- // 'ž': 'z', // duplicate
1330
- Ā: "A",
1331
- // 'Č': 'C', // duplicate
1332
- Ē: "E",
1333
- Ģ: "G",
1334
- Ī: "I",
1335
- Ķ: "k",
1336
- Ļ: "L",
1337
- Ņ: "N",
1338
- // 'Š': 'S', // duplicate
1339
- Ū: "U",
1340
- // 'Ž': 'Z', // duplicate
1341
- // Macedonian
1342
- Ќ: "Kj",
1343
- ќ: "kj",
1344
- Љ: "Lj",
1345
- љ: "lj",
1346
- Њ: "Nj",
1347
- њ: "nj",
1348
- Тс: "Ts",
1349
- тс: "ts",
1350
- // Polish
1351
- ą: "a",
1352
- ć: "c",
1353
- ę: "e",
1354
- ł: "l",
1355
- ń: "n",
1356
- // 'ó': 'o', // duplicate
1357
- ś: "s",
1358
- ź: "z",
1359
- ż: "z",
1360
- Ą: "A",
1361
- Ć: "C",
1362
- Ę: "E",
1363
- Ł: "L",
1364
- Ń: "N",
1365
- Ś: "S",
1366
- Ź: "Z",
1367
- Ż: "Z",
1368
- // Ukranian
1369
- Є: "Ye",
1370
- І: "I",
1371
- Ї: "Yi",
1372
- Ґ: "G",
1373
- є: "ye",
1374
- і: "i",
1375
- ї: "yi",
1376
- ґ: "g",
1377
- // Romanian
1378
- ă: "a",
1379
- Ă: "A",
1380
- ș: "s",
1381
- Ș: "S",
1382
- // 'ş': 's', // duplicate
1383
- // 'Ş': 'S', // duplicate
1384
- ț: "t",
1385
- Ț: "T",
1386
- ţ: "t",
1387
- Ţ: "T",
1388
- // Russian https://en.wikipedia.org/wiki/Romanization_of_Russian
1389
- // ICAO
1390
- а: "a",
1391
- б: "b",
1392
- в: "v",
1393
- г: "g",
1394
- д: "d",
1395
- е: "e",
1396
- ё: "yo",
1397
- ж: "zh",
1398
- з: "z",
1399
- и: "i",
1400
- й: "i",
1401
- к: "k",
1402
- л: "l",
1403
- м: "m",
1404
- н: "n",
1405
- о: "o",
1406
- п: "p",
1407
- р: "r",
1408
- с: "s",
1409
- т: "t",
1410
- у: "u",
1411
- ф: "f",
1412
- х: "kh",
1413
- ц: "c",
1414
- ч: "ch",
1415
- ш: "sh",
1416
- щ: "sh",
1417
- ъ: "",
1418
- ы: "y",
1419
- ь: "",
1420
- э: "e",
1421
- ю: "yu",
1422
- я: "ya",
1423
- А: "A",
1424
- Б: "B",
1425
- В: "V",
1426
- Г: "G",
1427
- Д: "D",
1428
- Е: "E",
1429
- Ё: "Yo",
1430
- Ж: "Zh",
1431
- З: "Z",
1432
- И: "I",
1433
- Й: "I",
1434
- К: "K",
1435
- Л: "L",
1436
- М: "M",
1437
- Н: "N",
1438
- О: "O",
1439
- П: "P",
1440
- Р: "R",
1441
- С: "S",
1442
- Т: "T",
1443
- У: "U",
1444
- Ф: "F",
1445
- Х: "Kh",
1446
- Ц: "C",
1447
- Ч: "Ch",
1448
- Ш: "Sh",
1449
- Щ: "Sh",
1450
- Ъ: "",
1451
- Ы: "Y",
1452
- Ь: "",
1453
- Э: "E",
1454
- Ю: "Yu",
1455
- Я: "Ya",
1456
- // Serbian
1457
- ђ: "dj",
1458
- ј: "j",
1459
- // 'љ': 'lj', // duplicate
1460
- // 'њ': 'nj', // duplicate
1461
- ћ: "c",
1462
- џ: "dz",
1463
- Ђ: "Dj",
1464
- Ј: "j",
1465
- // 'Љ': 'Lj', // duplicate
1466
- // 'Њ': 'Nj', // duplicate
1467
- Ћ: "C",
1468
- Џ: "Dz",
1469
- // Slovak
1470
- ľ: "l",
1471
- ĺ: "l",
1472
- ŕ: "r",
1473
- Ľ: "L",
1474
- Ĺ: "L",
1475
- Ŕ: "R",
1476
- // Turkish
1477
- ş: "s",
1478
- Ş: "S",
1479
- ı: "i",
1480
- İ: "I",
1481
- // 'ç': 'c', // duplicate
1482
- // 'Ç': 'C', // duplicate
1483
- // 'ü': 'u', // duplicate, see langCharMap
1484
- // 'Ü': 'U', // duplicate, see langCharMap
1485
- // 'ö': 'o', // duplicate, see langCharMap
1486
- // 'Ö': 'O', // duplicate, see langCharMap
1487
- ğ: "g",
1488
- Ğ: "G",
1489
- // Vietnamese
1490
- ả: "a",
1491
- Ả: "A",
1492
- ẳ: "a",
1493
- Ẳ: "A",
1494
- ẩ: "a",
1495
- Ẩ: "A",
1496
- đ: "d",
1497
- Đ: "D",
1498
- ẹ: "e",
1499
- Ẹ: "E",
1500
- ẽ: "e",
1501
- Ẽ: "E",
1502
- ẻ: "e",
1503
- Ẻ: "E",
1504
- ế: "e",
1505
- Ế: "E",
1506
- ề: "e",
1507
- Ề: "E",
1508
- ệ: "e",
1509
- Ệ: "E",
1510
- ễ: "e",
1511
- Ễ: "E",
1512
- ể: "e",
1513
- Ể: "E",
1514
- ỏ: "o",
1515
- ọ: "o",
1516
- Ọ: "o",
1517
- ố: "o",
1518
- Ố: "O",
1519
- ồ: "o",
1520
- Ồ: "O",
1521
- ổ: "o",
1522
- Ổ: "O",
1523
- ộ: "o",
1524
- Ộ: "O",
1525
- ỗ: "o",
1526
- Ỗ: "O",
1527
- ơ: "o",
1528
- Ơ: "O",
1529
- ớ: "o",
1530
- Ớ: "O",
1531
- ờ: "o",
1532
- Ờ: "O",
1533
- ợ: "o",
1534
- Ợ: "O",
1535
- ỡ: "o",
1536
- Ỡ: "O",
1537
- Ở: "o",
1538
- ở: "o",
1539
- ị: "i",
1540
- Ị: "I",
1541
- ĩ: "i",
1542
- Ĩ: "I",
1543
- ỉ: "i",
1544
- Ỉ: "i",
1545
- ủ: "u",
1546
- Ủ: "U",
1547
- ụ: "u",
1548
- Ụ: "U",
1549
- ũ: "u",
1550
- Ũ: "U",
1551
- ư: "u",
1552
- Ư: "U",
1553
- ứ: "u",
1554
- Ứ: "U",
1555
- ừ: "u",
1556
- Ừ: "U",
1557
- ự: "u",
1558
- Ự: "U",
1559
- ữ: "u",
1560
- Ữ: "U",
1561
- ử: "u",
1562
- Ử: "ư",
1563
- ỷ: "y",
1564
- Ỷ: "y",
1565
- ỳ: "y",
1566
- Ỳ: "Y",
1567
- ỵ: "y",
1568
- Ỵ: "Y",
1569
- ỹ: "y",
1570
- Ỹ: "Y",
1571
- ạ: "a",
1572
- Ạ: "A",
1573
- ấ: "a",
1574
- Ấ: "A",
1575
- ầ: "a",
1576
- Ầ: "A",
1577
- ậ: "a",
1578
- Ậ: "A",
1579
- ẫ: "a",
1580
- Ẫ: "A",
1581
- // 'ă': 'a', // duplicate
1582
- // 'Ă': 'A', // duplicate
1583
- ắ: "a",
1584
- Ắ: "A",
1585
- ằ: "a",
1586
- Ằ: "A",
1587
- ặ: "a",
1588
- Ặ: "A",
1589
- ẵ: "a",
1590
- Ẵ: "A",
1591
- "⓪": "0",
1592
- "①": "1",
1593
- "②": "2",
1594
- "③": "3",
1595
- "④": "4",
1596
- "⑤": "5",
1597
- "⑥": "6",
1598
- "⑦": "7",
1599
- "⑧": "8",
1600
- "⑨": "9",
1601
- "⑩": "10",
1602
- "⑪": "11",
1603
- "⑫": "12",
1604
- "⑬": "13",
1605
- "⑭": "14",
1606
- "⑮": "15",
1607
- "⑯": "16",
1608
- "⑰": "17",
1609
- "⑱": "18",
1610
- "⑲": "18",
1611
- "⑳": "18",
1612
- "⓵": "1",
1613
- "⓶": "2",
1614
- "⓷": "3",
1615
- "⓸": "4",
1616
- "⓹": "5",
1617
- "⓺": "6",
1618
- "⓻": "7",
1619
- "⓼": "8",
1620
- "⓽": "9",
1621
- "⓾": "10",
1622
- "⓿": "0",
1623
- "⓫": "11",
1624
- "⓬": "12",
1625
- "⓭": "13",
1626
- "⓮": "14",
1627
- "⓯": "15",
1628
- "⓰": "16",
1629
- "⓱": "17",
1630
- "⓲": "18",
1631
- "⓳": "19",
1632
- "⓴": "20",
1633
- "Ⓐ": "A",
1634
- "Ⓑ": "B",
1635
- "Ⓒ": "C",
1636
- "Ⓓ": "D",
1637
- "Ⓔ": "E",
1638
- "Ⓕ": "F",
1639
- "Ⓖ": "G",
1640
- "Ⓗ": "H",
1641
- "Ⓘ": "I",
1642
- "Ⓙ": "J",
1643
- "Ⓚ": "K",
1644
- "Ⓛ": "L",
1645
- "Ⓜ": "M",
1646
- "Ⓝ": "N",
1647
- "Ⓞ": "O",
1648
- "Ⓟ": "P",
1649
- "Ⓠ": "Q",
1650
- "Ⓡ": "R",
1651
- "Ⓢ": "S",
1652
- "Ⓣ": "T",
1653
- "Ⓤ": "U",
1654
- "Ⓥ": "V",
1655
- "Ⓦ": "W",
1656
- "Ⓧ": "X",
1657
- "Ⓨ": "Y",
1658
- "Ⓩ": "Z",
1659
- "ⓐ": "a",
1660
- "ⓑ": "b",
1661
- "ⓒ": "c",
1662
- "ⓓ": "d",
1663
- "ⓔ": "e",
1664
- "ⓕ": "f",
1665
- "ⓖ": "g",
1666
- "ⓗ": "h",
1667
- "ⓘ": "i",
1668
- "ⓙ": "j",
1669
- "ⓚ": "k",
1670
- "ⓛ": "l",
1671
- "ⓜ": "m",
1672
- "ⓝ": "n",
1673
- "ⓞ": "o",
1674
- "ⓟ": "p",
1675
- "ⓠ": "q",
1676
- "ⓡ": "r",
1677
- "ⓢ": "s",
1678
- "ⓣ": "t",
1679
- "ⓤ": "u",
1680
- "ⓦ": "v",
1681
- "ⓥ": "w",
1682
- "ⓧ": "x",
1683
- "ⓨ": "y",
1684
- "ⓩ": "z",
1685
- // symbols
1686
- "“": '"',
1687
- "”": '"',
1688
- "‘": "'",
1689
- "’": "'",
1690
- "∂": "d",
1691
- ƒ: "f",
1692
- "™": "(TM)",
1693
- "©": "(C)",
1694
- œ: "oe",
1695
- Œ: "OE",
1696
- "®": "(R)",
1697
- "†": "+",
1698
- "℠": "(SM)",
1699
- "…": "...",
1700
- "˚": "o",
1701
- º: "o",
1702
- ª: "a",
1703
- "•": "*",
1704
- "၊": ",",
1705
- "။": ".",
1706
- // currency
1707
- $: "USD",
1708
- "€": "EUR",
1709
- "₢": "BRN",
1710
- "₣": "FRF",
1711
- "£": "GBP",
1712
- "₤": "ITL",
1713
- "₦": "NGN",
1714
- "₧": "ESP",
1715
- "₩": "KRW",
1716
- "₪": "ILS",
1717
- "₫": "VND",
1718
- "₭": "LAK",
1719
- "₮": "MNT",
1720
- "₯": "GRD",
1721
- "₱": "ARS",
1722
- "₲": "PYG",
1723
- "₳": "ARA",
1724
- "₴": "UAH",
1725
- "₵": "GHS",
1726
- "¢": "cent",
1727
- "¥": "CNY",
1728
- 元: "CNY",
1729
- 円: "YEN",
1730
- "﷼": "IRR",
1731
- "₠": "EWE",
1732
- "฿": "THB",
1733
- "₨": "INR",
1734
- "₹": "INR",
1735
- "₰": "PF",
1736
- "₺": "TRY",
1737
- "؋": "AFN",
1738
- "₼": "AZN",
1739
- лв: "BGN",
1740
- "៛": "KHR",
1741
- "₡": "CRC",
1742
- "₸": "KZT",
1743
- ден: "MKD",
1744
- zł: "PLN",
1745
- "₽": "RUB",
1746
- "₾": "GEL"
1747
- }, u = [
1748
- // burmese
1749
- "်",
1750
- // Dhivehi
1751
- "ް"
1752
- ], o = {
1753
- // Burmese
1754
- // dependent vowels
1755
- "ာ": "a",
1756
- "ါ": "a",
1757
- "ေ": "e",
1758
- "ဲ": "e",
1759
- "ိ": "i",
1760
- "ီ": "i",
1761
- "ို": "o",
1762
- "ု": "u",
1763
- "ူ": "u",
1764
- "ေါင်": "aung",
1765
- "ော": "aw",
1766
- "ော်": "aw",
1767
- "ေါ": "aw",
1768
- "ေါ်": "aw",
1769
- "်": "်",
1770
- // this is special case but the character will be converted to latin in the code
1771
- "က်": "et",
1772
- "ိုက်": "aik",
1773
- "ောက်": "auk",
1774
- "င်": "in",
1775
- "ိုင်": "aing",
1776
- "ောင်": "aung",
1777
- "စ်": "it",
1778
- "ည်": "i",
1779
- "တ်": "at",
1780
- "ိတ်": "eik",
1781
- "ုတ်": "ok",
1782
- "ွတ်": "ut",
1783
- "ေတ်": "it",
1784
- "ဒ်": "d",
1785
- "ိုဒ်": "ok",
1786
- "ုဒ်": "ait",
1787
- "န်": "an",
1788
- "ာန်": "an",
1789
- "ိန်": "ein",
1790
- "ုန်": "on",
1791
- "ွန်": "un",
1792
- "ပ်": "at",
1793
- "ိပ်": "eik",
1794
- "ုပ်": "ok",
1795
- "ွပ်": "ut",
1796
- "န်ုပ်": "nub",
1797
- "မ်": "an",
1798
- "ိမ်": "ein",
1799
- "ုမ်": "on",
1800
- "ွမ်": "un",
1801
- "ယ်": "e",
1802
- "ိုလ်": "ol",
1803
- "ဉ်": "in",
1804
- "ံ": "an",
1805
- "ိံ": "ein",
1806
- "ုံ": "on",
1807
- // Dhivehi
1808
- "ައް": "ah",
1809
- "ަށް": "ah"
1810
- }, s = {
1811
- en: {},
1812
- // default language
1813
- az: {
1814
- // Azerbaijani
1815
- ç: "c",
1816
- ə: "e",
1817
- ğ: "g",
1818
- ı: "i",
1819
- ö: "o",
1820
- ş: "s",
1821
- ü: "u",
1822
- Ç: "C",
1823
- Ə: "E",
1824
- Ğ: "G",
1825
- İ: "I",
1826
- Ö: "O",
1827
- Ş: "S",
1828
- Ü: "U"
1829
- },
1830
- cs: {
1831
- // Czech
1832
- č: "c",
1833
- ď: "d",
1834
- ě: "e",
1835
- ň: "n",
1836
- ř: "r",
1837
- š: "s",
1838
- ť: "t",
1839
- ů: "u",
1840
- ž: "z",
1841
- Č: "C",
1842
- Ď: "D",
1843
- Ě: "E",
1844
- Ň: "N",
1845
- Ř: "R",
1846
- Š: "S",
1847
- Ť: "T",
1848
- Ů: "U",
1849
- Ž: "Z"
1850
- },
1851
- fi: {
1852
- // Finnish
1853
- // 'å': 'a', duplicate see charMap/latin
1854
- // 'Å': 'A', duplicate see charMap/latin
1855
- ä: "a",
1856
- // ok
1857
- Ä: "A",
1858
- // ok
1859
- ö: "o",
1860
- // ok
1861
- Ö: "O"
1862
- // ok
1863
- },
1864
- hu: {
1865
- // Hungarian
1866
- ä: "a",
1867
- // ok
1868
- Ä: "A",
1869
- // ok
1870
- // 'á': 'a', duplicate see charMap/latin
1871
- // 'Á': 'A', duplicate see charMap/latin
1872
- ö: "o",
1873
- // ok
1874
- Ö: "O",
1875
- // ok
1876
- // 'ő': 'o', duplicate see charMap/latin
1877
- // 'Ő': 'O', duplicate see charMap/latin
1878
- ü: "u",
1879
- Ü: "U",
1880
- ű: "u",
1881
- Ű: "U"
1882
- },
1883
- lt: {
1884
- // Lithuanian
1885
- ą: "a",
1886
- č: "c",
1887
- ę: "e",
1888
- ė: "e",
1889
- į: "i",
1890
- š: "s",
1891
- ų: "u",
1892
- ū: "u",
1893
- ž: "z",
1894
- Ą: "A",
1895
- Č: "C",
1896
- Ę: "E",
1897
- Ė: "E",
1898
- Į: "I",
1899
- Š: "S",
1900
- Ų: "U",
1901
- Ū: "U"
1902
- },
1903
- lv: {
1904
- // Latvian
1905
- ā: "a",
1906
- č: "c",
1907
- ē: "e",
1908
- ģ: "g",
1909
- ī: "i",
1910
- ķ: "k",
1911
- ļ: "l",
1912
- ņ: "n",
1913
- š: "s",
1914
- ū: "u",
1915
- ž: "z",
1916
- Ā: "A",
1917
- Č: "C",
1918
- Ē: "E",
1919
- Ģ: "G",
1920
- Ī: "i",
1921
- Ķ: "k",
1922
- Ļ: "L",
1923
- Ņ: "N",
1924
- Š: "S",
1925
- Ū: "u",
1926
- Ž: "Z"
1927
- },
1928
- pl: {
1929
- // Polish
1930
- ą: "a",
1931
- ć: "c",
1932
- ę: "e",
1933
- ł: "l",
1934
- ń: "n",
1935
- ó: "o",
1936
- ś: "s",
1937
- ź: "z",
1938
- ż: "z",
1939
- Ą: "A",
1940
- Ć: "C",
1941
- Ę: "e",
1942
- Ł: "L",
1943
- Ń: "N",
1944
- Ó: "O",
1945
- Ś: "S",
1946
- Ź: "Z",
1947
- Ż: "Z"
1948
- },
1949
- sv: {
1950
- // Swedish
1951
- // 'å': 'a', duplicate see charMap/latin
1952
- // 'Å': 'A', duplicate see charMap/latin
1953
- ä: "a",
1954
- // ok
1955
- Ä: "A",
1956
- // ok
1957
- ö: "o",
1958
- // ok
1959
- Ö: "O"
1960
- // ok
1961
- },
1962
- sk: {
1963
- // Slovak
1964
- ä: "a",
1965
- Ä: "A"
1966
- },
1967
- sr: {
1968
- // Serbian
1969
- љ: "lj",
1970
- њ: "nj",
1971
- Љ: "Lj",
1972
- Њ: "Nj",
1973
- đ: "dj",
1974
- Đ: "Dj"
1975
- },
1976
- tr: {
1977
- // Turkish
1978
- Ü: "U",
1979
- Ö: "O",
1980
- ü: "u",
1981
- ö: "o"
1982
- }
1983
- }, a = {
1984
- ar: {
1985
- "∆": "delta",
1986
- "∞": "la-nihaya",
1987
- "♥": "hob",
1988
- "&": "wa",
1989
- "|": "aw",
1990
- "<": "aqal-men",
1991
- ">": "akbar-men",
1992
- "∑": "majmou",
1993
- "¤": "omla"
1994
- },
1995
- az: {},
1996
- ca: {
1997
- "∆": "delta",
1998
- "∞": "infinit",
1999
- "♥": "amor",
2000
- "&": "i",
2001
- "|": "o",
2002
- "<": "menys que",
2003
- ">": "mes que",
2004
- "∑": "suma dels",
2005
- "¤": "moneda"
2006
- },
2007
- cs: {
2008
- "∆": "delta",
2009
- "∞": "nekonecno",
2010
- "♥": "laska",
2011
- "&": "a",
2012
- "|": "nebo",
2013
- "<": "mensi nez",
2014
- ">": "vetsi nez",
2015
- "∑": "soucet",
2016
- "¤": "mena"
2017
- },
2018
- de: {
2019
- "∆": "delta",
2020
- "∞": "unendlich",
2021
- "♥": "Liebe",
2022
- "&": "und",
2023
- "|": "oder",
2024
- "<": "kleiner als",
2025
- ">": "groesser als",
2026
- "∑": "Summe von",
2027
- "¤": "Waehrung"
2028
- },
2029
- dv: {
2030
- "∆": "delta",
2031
- "∞": "kolunulaa",
2032
- "♥": "loabi",
2033
- "&": "aai",
2034
- "|": "noonee",
2035
- "<": "ah vure kuda",
2036
- ">": "ah vure bodu",
2037
- "∑": "jumula",
2038
- "¤": "faisaa"
2039
- },
2040
- en: {
2041
- "∆": "delta",
2042
- "∞": "infinity",
2043
- "♥": "love",
2044
- "&": "and",
2045
- "|": "or",
2046
- "<": "less than",
2047
- ">": "greater than",
2048
- "∑": "sum",
2049
- "¤": "currency"
2050
- },
2051
- es: {
2052
- "∆": "delta",
2053
- "∞": "infinito",
2054
- "♥": "amor",
2055
- "&": "y",
2056
- "|": "u",
2057
- "<": "menos que",
2058
- ">": "mas que",
2059
- "∑": "suma de los",
2060
- "¤": "moneda"
2061
- },
2062
- fa: {
2063
- "∆": "delta",
2064
- "∞": "bi-nahayat",
2065
- "♥": "eshgh",
2066
- "&": "va",
2067
- "|": "ya",
2068
- "<": "kamtar-az",
2069
- ">": "bishtar-az",
2070
- "∑": "majmooe",
2071
- "¤": "vahed"
2072
- },
2073
- fi: {
2074
- "∆": "delta",
2075
- "∞": "aarettomyys",
2076
- "♥": "rakkaus",
2077
- "&": "ja",
2078
- "|": "tai",
2079
- "<": "pienempi kuin",
2080
- ">": "suurempi kuin",
2081
- "∑": "summa",
2082
- "¤": "valuutta"
2083
- },
2084
- fr: {
2085
- "∆": "delta",
2086
- "∞": "infiniment",
2087
- "♥": "Amour",
2088
- "&": "et",
2089
- "|": "ou",
2090
- "<": "moins que",
2091
- ">": "superieure a",
2092
- "∑": "somme des",
2093
- "¤": "monnaie"
2094
- },
2095
- ge: {
2096
- "∆": "delta",
2097
- "∞": "usasruloba",
2098
- "♥": "siqvaruli",
2099
- "&": "da",
2100
- "|": "an",
2101
- "<": "naklebi",
2102
- ">": "meti",
2103
- "∑": "jami",
2104
- "¤": "valuta"
2105
- },
2106
- gr: {},
2107
- hu: {
2108
- "∆": "delta",
2109
- "∞": "vegtelen",
2110
- "♥": "szerelem",
2111
- "&": "es",
2112
- "|": "vagy",
2113
- "<": "kisebb mint",
2114
- ">": "nagyobb mint",
2115
- "∑": "szumma",
2116
- "¤": "penznem"
2117
- },
2118
- it: {
2119
- "∆": "delta",
2120
- "∞": "infinito",
2121
- "♥": "amore",
2122
- "&": "e",
2123
- "|": "o",
2124
- "<": "minore di",
2125
- ">": "maggiore di",
2126
- "∑": "somma",
2127
- "¤": "moneta"
2128
- },
2129
- lt: {
2130
- "∆": "delta",
2131
- "∞": "begalybe",
2132
- "♥": "meile",
2133
- "&": "ir",
2134
- "|": "ar",
2135
- "<": "maziau nei",
2136
- ">": "daugiau nei",
2137
- "∑": "suma",
2138
- "¤": "valiuta"
2139
- },
2140
- lv: {
2141
- "∆": "delta",
2142
- "∞": "bezgaliba",
2143
- "♥": "milestiba",
2144
- "&": "un",
2145
- "|": "vai",
2146
- "<": "mazak neka",
2147
- ">": "lielaks neka",
2148
- "∑": "summa",
2149
- "¤": "valuta"
2150
- },
2151
- my: {
2152
- "∆": "kwahkhyaet",
2153
- "∞": "asaonasme",
2154
- "♥": "akhyait",
2155
- "&": "nhin",
2156
- "|": "tho",
2157
- "<": "ngethaw",
2158
- ">": "kyithaw",
2159
- "∑": "paungld",
2160
- "¤": "ngwekye"
2161
- },
2162
- mk: {},
2163
- nl: {
2164
- "∆": "delta",
2165
- "∞": "oneindig",
2166
- "♥": "liefde",
2167
- "&": "en",
2168
- "|": "of",
2169
- "<": "kleiner dan",
2170
- ">": "groter dan",
2171
- "∑": "som",
2172
- "¤": "valuta"
2173
- },
2174
- pl: {
2175
- "∆": "delta",
2176
- "∞": "nieskonczonosc",
2177
- "♥": "milosc",
2178
- "&": "i",
2179
- "|": "lub",
2180
- "<": "mniejsze niz",
2181
- ">": "wieksze niz",
2182
- "∑": "suma",
2183
- "¤": "waluta"
2184
- },
2185
- pt: {
2186
- "∆": "delta",
2187
- "∞": "infinito",
2188
- "♥": "amor",
2189
- "&": "e",
2190
- "|": "ou",
2191
- "<": "menor que",
2192
- ">": "maior que",
2193
- "∑": "soma",
2194
- "¤": "moeda"
2195
- },
2196
- ro: {
2197
- "∆": "delta",
2198
- "∞": "infinit",
2199
- "♥": "dragoste",
2200
- "&": "si",
2201
- "|": "sau",
2202
- "<": "mai mic ca",
2203
- ">": "mai mare ca",
2204
- "∑": "suma",
2205
- "¤": "valuta"
2206
- },
2207
- ru: {
2208
- "∆": "delta",
2209
- "∞": "beskonechno",
2210
- "♥": "lubov",
2211
- "&": "i",
2212
- "|": "ili",
2213
- "<": "menshe",
2214
- ">": "bolshe",
2215
- "∑": "summa",
2216
- "¤": "valjuta"
2217
- },
2218
- sk: {
2219
- "∆": "delta",
2220
- "∞": "nekonecno",
2221
- "♥": "laska",
2222
- "&": "a",
2223
- "|": "alebo",
2224
- "<": "menej ako",
2225
- ">": "viac ako",
2226
- "∑": "sucet",
2227
- "¤": "mena"
2228
- },
2229
- sr: {},
2230
- tr: {
2231
- "∆": "delta",
2232
- "∞": "sonsuzluk",
2233
- "♥": "ask",
2234
- "&": "ve",
2235
- "|": "veya",
2236
- "<": "kucuktur",
2237
- ">": "buyuktur",
2238
- "∑": "toplam",
2239
- "¤": "para birimi"
2240
- },
2241
- uk: {
2242
- "∆": "delta",
2243
- "∞": "bezkinechnist",
2244
- "♥": "lubov",
2245
- "&": "i",
2246
- "|": "abo",
2247
- "<": "menshe",
2248
- ">": "bilshe",
2249
- "∑": "suma",
2250
- "¤": "valjuta"
2251
- },
2252
- vn: {
2253
- "∆": "delta",
2254
- "∞": "vo cuc",
2255
- "♥": "yeu",
2256
- "&": "va",
2257
- "|": "hoac",
2258
- "<": "nho hon",
2259
- ">": "lon hon",
2260
- "∑": "tong",
2261
- "¤": "tien te"
2262
- }
2263
- }, f = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join(""), h = [";", "?", ":", "@", "&", "=", "+", "$", ","].join(""), A = [".", "!", "~", "*", "'", "(", ")"].join(""), i = function(p, g) {
2264
- var O = "-", b = "", I = "", z = !0, P = {}, G, H, d, y, S, L, N, k, rt, U, w, Ee, V, W, $ = "";
2265
- if (typeof p != "string")
2266
- return "";
2267
- if (typeof g == "string" && (O = g), N = a.en, k = s.en, typeof g == "object") {
2268
- G = g.maintainCase || !1, P = g.custom && typeof g.custom == "object" ? g.custom : P, d = +g.truncate > 1 && g.truncate || !1, y = g.uric || !1, S = g.uricNoSlash || !1, L = g.mark || !1, z = !(g.symbols === !1 || g.lang === !1), O = g.separator || O, y && ($ += f), S && ($ += h), L && ($ += A), N = g.lang && a[g.lang] && z ? a[g.lang] : z ? a.en : {}, k = g.lang && s[g.lang] ? s[g.lang] : g.lang === !1 || g.lang === !0 ? {} : s.en, g.titleCase && typeof g.titleCase.length == "number" && Array.prototype.toString.call(g.titleCase) ? (g.titleCase.forEach(function(F) {
2269
- P[F + ""] = F + "";
2270
- }), H = !0) : H = !!g.titleCase, g.custom && typeof g.custom.length == "number" && Array.prototype.toString.call(g.custom) && g.custom.forEach(function(F) {
2271
- P[F + ""] = F + "";
2272
- }), Object.keys(P).forEach(function(F) {
2273
- var ue;
2274
- F.length > 1 ? ue = new RegExp("\\b" + c(F) + "\\b", "gi") : ue = new RegExp(c(F), "gi"), p = p.replace(ue, P[F]);
2275
- });
2276
- for (w in P)
2277
- $ += w;
2278
- }
2279
- for ($ += O, $ = c($), p = p.replace(/(^\s+|\s+$)/g, ""), V = !1, W = !1, U = 0, Ee = p.length; U < Ee; U++)
2280
- w = p[U], _(w, P) ? V = !1 : k[w] ? (w = V && k[w].match(/[A-Za-z0-9]/) ? " " + k[w] : k[w], V = !1) : w in r ? (U + 1 < Ee && u.indexOf(p[U + 1]) >= 0 ? (I += w, w = "") : W === !0 ? (w = o[I] + r[w], I = "") : w = V && r[w].match(/[A-Za-z0-9]/) ? " " + r[w] : r[w], V = !1, W = !1) : w in o ? (I += w, w = "", U === Ee - 1 && (w = o[I]), W = !0) : /* process symbol chars */ N[w] && !(y && f.indexOf(w) !== -1) && !(S && h.indexOf(w) !== -1) ? (w = V || b.substr(-1).match(/[A-Za-z0-9]/) ? O + N[w] : N[w], w += p[U + 1] !== void 0 && p[U + 1].match(/[A-Za-z0-9]/) ? O : "", V = !0) : (W === !0 ? (w = o[I] + w, I = "", W = !1) : V && (/[A-Za-z0-9]/.test(w) || b.substr(-1).match(/A-Za-z0-9]/)) && (w = " " + w), V = !1), b += w.replace(new RegExp("[^\\w\\s" + $ + "_-]", "g"), O);
2281
- return H && (b = b.replace(/(\w)(\S*)/g, function(F, ue, ut) {
2282
- var De = ue.toUpperCase() + (ut !== null ? ut : "");
2283
- return Object.keys(P).indexOf(De.toLowerCase()) < 0 ? De : De.toLowerCase();
2284
- })), b = b.replace(/\s+/g, O).replace(new RegExp("\\" + O + "+", "g"), O).replace(new RegExp("(^\\" + O + "+|\\" + O + "+$)", "g"), ""), d && b.length > d && (rt = b.charAt(d) === O, b = b.slice(0, d), rt || (b = b.slice(0, b.lastIndexOf(O)))), !G && !H && (b = b.toLowerCase()), b;
2285
- }, E = function(p) {
2286
- return function(O) {
2287
- return i(O, p);
2288
- };
2289
- }, c = function(p) {
2290
- return p.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
2291
- }, _ = function(v, p) {
2292
- for (var g in p)
2293
- if (p[g] === v)
2294
- return !0;
2295
- };
2296
- if (typeof t < "u" && t.exports)
2297
- t.exports = i, t.exports.createSlug = E;
2298
- else if (typeof define < "u" && define.amd)
2299
- define([], function() {
2300
- return i;
2301
- });
2302
- else
2303
- try {
2304
- if (n.getSlug || n.createSlug)
2305
- throw "speakingurl: globals exists /(getSlug|createSlug)/";
2306
- n.getSlug = i, n.createSlug = E;
2307
- } catch {
2308
- }
2309
- }(e);
2310
- }
2311
- }), lu = Pn({
2312
- "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e, t) {
2313
- l(), t.exports = iu();
2314
- }
2315
- });
2316
- l();
2317
- l();
2318
- l();
2319
- l();
2320
- l();
2321
- l();
2322
- l();
2323
- l();
2324
- function cu(e) {
2325
- var t;
2326
- const n = e.name || e._componentTag || e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || e.__name;
2327
- return n === "index" && ((t = e.__file) != null && t.endsWith("index.vue")) ? "" : n;
2328
- }
2329
- function fu(e) {
2330
- const t = e.__file;
2331
- if (t)
2332
- return Gr(Wr(t, ".vue"));
2333
- }
2334
- function ht(e, t) {
2335
- return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = t, t;
2336
- }
2337
- function qe(e) {
2338
- if (e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
2339
- return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
2340
- if (e.root)
2341
- return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
2342
- }
2343
- function Nn(e) {
2344
- var t, n;
2345
- const r = (t = e.subTree) == null ? void 0 : t.type, u = qe(e);
2346
- return u ? ((n = u == null ? void 0 : u.types) == null ? void 0 : n.Fragment) === r : !1;
2347
- }
2348
- function Te(e) {
2349
- var t, n, r;
2350
- const u = cu((e == null ? void 0 : e.type) || {});
2351
- if (u)
2352
- return u;
2353
- if ((e == null ? void 0 : e.root) === e)
2354
- return "Root";
2355
- for (const s in (n = (t = e.parent) == null ? void 0 : t.type) == null ? void 0 : n.components)
2356
- if (e.parent.type.components[s] === (e == null ? void 0 : e.type))
2357
- return ht(e, s);
2358
- for (const s in (r = e.appContext) == null ? void 0 : r.components)
2359
- if (e.appContext.components[s] === (e == null ? void 0 : e.type))
2360
- return ht(e, s);
2361
- const o = fu((e == null ? void 0 : e.type) || {});
2362
- return o || "Anonymous Component";
2363
- }
2364
- function du(e) {
2365
- var t, n, r;
2366
- const u = (r = (n = (t = e == null ? void 0 : e.appContext) == null ? void 0 : t.app) == null ? void 0 : n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? r : 0, o = e === (e == null ? void 0 : e.root) ? "root" : e.uid;
2367
- return `${u}:${o}`;
2368
- }
2369
- function Be(e, t) {
2370
- return t = t || `${e.id}:root`, e.instanceMap.get(t) || e.instanceMap.get(":root");
2371
- }
2372
- function _u() {
2373
- const e = {
2374
- top: 0,
2375
- bottom: 0,
2376
- left: 0,
2377
- right: 0,
2378
- get width() {
2379
- return e.right - e.left;
2380
- },
2381
- get height() {
2382
- return e.bottom - e.top;
2383
- }
2384
- };
2385
- return e;
2386
- }
2387
- var pe;
2388
- function hu(e) {
2389
- return pe || (pe = document.createRange()), pe.selectNode(e), pe.getBoundingClientRect();
2390
- }
2391
- function Eu(e) {
2392
- const t = _u();
2393
- if (!e.children)
2394
- return t;
2395
- for (let n = 0, r = e.children.length; n < r; n++) {
2396
- const u = e.children[n];
2397
- let o;
2398
- if (u.component)
2399
- o = j(u.component);
2400
- else if (u.el) {
2401
- const s = u.el;
2402
- s.nodeType === 1 || s.getBoundingClientRect ? o = s.getBoundingClientRect() : s.nodeType === 3 && s.data.trim() && (o = hu(s));
2403
- }
2404
- o && pu(t, o);
2405
- }
2406
- return t;
2407
- }
2408
- function pu(e, t) {
2409
- return (!e.top || t.top < e.top) && (e.top = t.top), (!e.bottom || t.bottom > e.bottom) && (e.bottom = t.bottom), (!e.left || t.left < e.left) && (e.left = t.left), (!e.right || t.right > e.right) && (e.right = t.right), e;
2410
- }
2411
- var Et = {
2412
- top: 0,
2413
- left: 0,
2414
- right: 0,
2415
- bottom: 0,
2416
- width: 0,
2417
- height: 0
2418
- };
2419
- function j(e) {
2420
- const t = e.subTree.el;
2421
- return typeof window > "u" ? Et : Nn(e) ? Eu(e.subTree) : (t == null ? void 0 : t.nodeType) === 1 ? t == null ? void 0 : t.getBoundingClientRect() : e.subTree.component ? j(e.subTree.component) : Et;
2422
- }
2423
- l();
2424
- function Ye(e) {
2425
- return Nn(e) ? gu(e.subTree) : e.subTree ? [e.subTree.el] : [];
2426
- }
2427
- function gu(e) {
2428
- if (!e.children)
2429
- return [];
2430
- const t = [];
2431
- return e.children.forEach((n) => {
2432
- n.component ? t.push(...Ye(n.component)) : n != null && n.el && t.push(n.el);
2433
- }), t;
2434
- }
2435
- var Fn = "__vue-devtools-component-inspector__", Ln = "__vue-devtools-component-inspector__card__", Vn = "__vue-devtools-component-inspector__name__", Bn = "__vue-devtools-component-inspector__indicator__", Un = {
2436
- display: "block",
2437
- zIndex: 2147483640,
2438
- position: "fixed",
2439
- backgroundColor: "#42b88325",
2440
- border: "1px solid #42b88350",
2441
- borderRadius: "5px",
2442
- transition: "all 0.1s ease-in",
2443
- pointerEvents: "none"
2444
- }, mu = {
2445
- fontFamily: "Arial, Helvetica, sans-serif",
2446
- padding: "5px 8px",
2447
- borderRadius: "4px",
2448
- textAlign: "left",
2449
- position: "absolute",
2450
- left: 0,
2451
- color: "#e9e9e9",
2452
- fontSize: "14px",
2453
- fontWeight: 600,
2454
- lineHeight: "24px",
2455
- backgroundColor: "#42b883",
2456
- boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
2457
- }, vu = {
2458
- display: "inline-block",
2459
- fontWeight: 400,
2460
- fontStyle: "normal",
2461
- fontSize: "12px",
2462
- opacity: 0.7
2463
- };
2464
- function ne() {
2465
- return document.getElementById(Fn);
2466
- }
2467
- function yu() {
2468
- return document.getElementById(Ln);
2469
- }
2470
- function Au() {
2471
- return document.getElementById(Bn);
2472
- }
2473
- function bu() {
2474
- return document.getElementById(Vn);
2475
- }
2476
- function Ze(e) {
2477
- return {
2478
- left: `${Math.round(e.left * 100) / 100}px`,
2479
- top: `${Math.round(e.top * 100) / 100}px`,
2480
- width: `${Math.round(e.width * 100) / 100}px`,
2481
- height: `${Math.round(e.height * 100) / 100}px`
2482
- };
2483
- }
2484
- function Xe(e) {
2485
- var t;
2486
- const n = document.createElement("div");
2487
- n.id = (t = e.elementId) != null ? t : Fn, Object.assign(n.style, {
2488
- ...Un,
2489
- ...Ze(e.bounds),
2490
- ...e.style
2491
- });
2492
- const r = document.createElement("span");
2493
- r.id = Ln, Object.assign(r.style, {
2494
- ...mu,
2495
- top: e.bounds.top < 35 ? 0 : "-35px"
2496
- });
2497
- const u = document.createElement("span");
2498
- u.id = Vn, u.innerHTML = `&lt;${e.name}&gt;&nbsp;&nbsp;`;
2499
- const o = document.createElement("i");
2500
- return o.id = Bn, o.innerHTML = `${Math.round(e.bounds.width * 100) / 100} x ${Math.round(e.bounds.height * 100) / 100}`, Object.assign(o.style, vu), r.appendChild(u), r.appendChild(o), n.appendChild(r), document.body.appendChild(n), n;
2501
- }
2502
- function Je(e) {
2503
- const t = ne(), n = yu(), r = bu(), u = Au();
2504
- t && (Object.assign(t.style, {
2505
- ...Un,
2506
- ...Ze(e.bounds)
2507
- }), Object.assign(n.style, {
2508
- top: e.bounds.top < 35 ? 0 : "-35px"
2509
- }), r.innerHTML = `&lt;${e.name}&gt;&nbsp;&nbsp;`, u.innerHTML = `${Math.round(e.bounds.width * 100) / 100} x ${Math.round(e.bounds.height * 100) / 100}`);
2510
- }
2511
- function wu(e) {
2512
- const t = j(e);
2513
- if (!t.width && !t.height)
2514
- return;
2515
- const n = Te(e);
2516
- ne() ? Je({ bounds: t, name: n }) : Xe({ bounds: t, name: n });
2517
- }
2518
- function Mn() {
2519
- const e = ne();
2520
- e && (e.style.display = "none");
2521
- }
2522
- var Ue = null;
2523
- function Me(e) {
2524
- const t = e.target;
2525
- if (t) {
2526
- const n = t.__vueParentComponent;
2527
- if (n && (Ue = n, n.vnode.el)) {
2528
- const u = j(n), o = Te(n);
2529
- ne() ? Je({ bounds: u, name: o }) : Xe({ bounds: u, name: o });
2530
- }
2531
- }
2532
- }
2533
- function Ou(e, t) {
2534
- if (e.preventDefault(), e.stopPropagation(), Ue) {
2535
- const n = du(Ue);
2536
- t(n);
2537
- }
2538
- }
2539
- var we = null;
2540
- function Su() {
2541
- Mn(), window.removeEventListener("mouseover", Me), window.removeEventListener("click", we, !0), we = null;
2542
- }
2543
- function Tu() {
2544
- return window.addEventListener("mouseover", Me), new Promise((e) => {
2545
- function t(n) {
2546
- n.preventDefault(), n.stopPropagation(), Ou(n, (r) => {
2547
- window.removeEventListener("click", t, !0), we = null, window.removeEventListener("mouseover", Me);
2548
- const u = ne();
2549
- u && (u.style.display = "none"), e(JSON.stringify({ id: r }));
2550
- });
2551
- }
2552
- we = t, window.addEventListener("click", t, !0);
2553
- });
2554
- }
2555
- function Cu(e) {
2556
- const t = Be(R.value, e.id);
2557
- if (t) {
2558
- const [n] = Ye(t);
2559
- if (typeof n.scrollIntoView == "function")
2560
- n.scrollIntoView({
2561
- behavior: "smooth"
2562
- });
2563
- else {
2564
- const r = j(t), u = document.createElement("div"), o = {
2565
- ...Ze(r),
2566
- position: "absolute"
2567
- };
2568
- Object.assign(u.style, o), document.body.appendChild(u), u.scrollIntoView({
2569
- behavior: "smooth"
2570
- }), setTimeout(() => {
2571
- document.body.removeChild(u);
2572
- }, 2e3);
2573
- }
2574
- setTimeout(() => {
2575
- const r = j(t);
2576
- if (r.width || r.height) {
2577
- const u = Te(t), o = ne();
2578
- o ? Je({ name: u, bounds: r }) : Xe({ ...e, name: u, bounds: r }), setTimeout(() => {
2579
- o && (o.style.display = "none");
2580
- }, 1500);
2581
- }
2582
- }, 1200);
2583
- }
2584
- }
2585
- l();
2586
- var pt, gt;
2587
- (gt = (pt = m).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null || (pt.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = !0);
2588
- function Iu(e) {
2589
- let t = 0;
2590
- const n = setInterval(() => {
2591
- m.__VUE_INSPECTOR__ && (clearInterval(n), t += 30, e()), t >= /* 5s */
2592
- 5e3 && clearInterval(n);
2593
- }, 30);
2594
- }
2595
- function Du() {
2596
- const e = m.__VUE_INSPECTOR__, t = e.openInEditor;
2597
- e.openInEditor = async (...n) => {
2598
- e.disable(), t(...n);
2599
- };
2600
- }
2601
- function ku() {
2602
- return new Promise((e) => {
2603
- function t() {
2604
- Du(), e(m.__VUE_INSPECTOR__);
2605
- }
2606
- m.__VUE_INSPECTOR__ ? t() : Iu(() => {
2607
- t();
2608
- });
2609
- });
2610
- }
2611
- l();
2612
- l();
2613
- function Ru(e) {
2614
- return !!(e && e.__v_isReadonly);
2615
- }
2616
- function $n(e) {
2617
- return Ru(e) ? $n(e.__v_raw) : !!(e && e.__v_isReactive);
2618
- }
2619
- function Re(e) {
2620
- return !!(e && e.__v_isRef === !0);
2621
- }
2622
- function se(e) {
2623
- const t = e && e.__v_raw;
2624
- return t ? se(t) : e;
2625
- }
2626
- var xu = class {
2627
- constructor() {
2628
- this.refEditor = new Pu();
2629
- }
2630
- set(e, t, n, r) {
2631
- const u = Array.isArray(t) ? t : t.split(".");
2632
- for (; u.length > 1; ) {
2633
- const a = u.shift();
2634
- e instanceof Map && (e = e.get(a)), e instanceof Set ? e = Array.from(e.values())[a] : e = e[a], this.refEditor.isRef(e) && (e = this.refEditor.get(e));
2635
- }
2636
- const o = u[0], s = this.refEditor.get(e)[o];
2637
- r ? r(e, o, n) : this.refEditor.isRef(s) ? this.refEditor.set(s, n) : e[o] = n;
2638
- }
2639
- get(e, t) {
2640
- const n = Array.isArray(t) ? t : t.split(".");
2641
- for (let r = 0; r < n.length; r++)
2642
- if (e instanceof Map ? e = e.get(n[r]) : e = e[n[r]], this.refEditor.isRef(e) && (e = this.refEditor.get(e)), !e)
2643
- return;
2644
- return e;
2645
- }
2646
- has(e, t, n = !1) {
2647
- if (typeof e > "u")
2648
- return !1;
2649
- const r = Array.isArray(t) ? t.slice() : t.split("."), u = n ? 2 : 1;
2650
- for (; e && r.length > u; ) {
2651
- const o = r.shift();
2652
- e = e[o], this.refEditor.isRef(e) && (e = this.refEditor.get(e));
2653
- }
2654
- return e != null && Object.prototype.hasOwnProperty.call(e, r[0]);
2655
- }
2656
- createDefaultSetCallback(e) {
2657
- return (t, n, r) => {
2658
- if ((e.remove || e.newKey) && (Array.isArray(t) ? t.splice(n, 1) : se(t) instanceof Map ? t.delete(n) : se(t) instanceof Set ? t.delete(Array.from(t.values())[n]) : Reflect.deleteProperty(t, n)), !e.remove) {
2659
- const u = t[e.newKey || n];
2660
- this.refEditor.isRef(u) ? this.refEditor.set(u, r) : se(t) instanceof Map ? t.set(e.newKey || n, r) : se(t) instanceof Set ? t.add(r) : t[e.newKey || n] = r;
2661
- }
2662
- };
2663
- }
2664
- }, Pu = class {
2665
- set(e, t) {
2666
- if (Re(e))
2667
- e.value = t;
2668
- else {
2669
- if (e instanceof Set && Array.isArray(t)) {
2670
- e.clear(), t.forEach((u) => e.add(u));
2671
- return;
2672
- }
2673
- const n = Object.keys(t);
2674
- if (e instanceof Map) {
2675
- const u = new Set(e.keys());
2676
- n.forEach((o) => {
2677
- e.set(o, Reflect.get(t, o)), u.delete(o);
2678
- }), u.forEach((o) => e.delete(o));
2679
- return;
2680
- }
2681
- const r = new Set(Object.keys(e));
2682
- n.forEach((u) => {
2683
- Reflect.set(e, u, Reflect.get(t, u)), r.delete(u);
2684
- }), r.forEach((u) => Reflect.deleteProperty(e, u));
2685
- }
2686
- }
2687
- get(e) {
2688
- return Re(e) ? e.value : e;
2689
- }
2690
- isRef(e) {
2691
- return Re(e) || $n(e);
2692
- }
2693
- };
2694
- l();
2695
- l();
2696
- l();
2697
- var Nu = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
2698
- function Fu() {
2699
- if (!Kr || typeof localStorage > "u" || localStorage === null)
2700
- return {
2701
- recordingState: !1,
2702
- mouseEventEnabled: !1,
2703
- keyboardEventEnabled: !1,
2704
- componentEventEnabled: !1,
2705
- performanceEventEnabled: !1,
2706
- selected: ""
2707
- };
2708
- const e = localStorage.getItem(Nu);
2709
- return e ? JSON.parse(e) : {
2710
- recordingState: !1,
2711
- mouseEventEnabled: !1,
2712
- keyboardEventEnabled: !1,
2713
- componentEventEnabled: !1,
2714
- performanceEventEnabled: !1,
2715
- selected: ""
2716
- };
2717
- }
2718
- l();
2719
- l();
2720
- l();
2721
- var mt, vt;
2722
- (vt = (mt = m).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null || (mt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = []);
2723
- var Lu = new Proxy(m.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
2724
- get(e, t, n) {
2725
- return Reflect.get(e, t, n);
2726
- }
2727
- });
2728
- function Vu(e, t) {
2729
- D.timelineLayersState[t.id] = !1, Lu.push({
2730
- ...e,
2731
- descriptorId: t.id,
2732
- appRecord: qe(t.app)
2733
- });
2734
- }
2735
- var yt, At;
2736
- (At = (yt = m).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null || (yt.__VUE_DEVTOOLS_KIT_INSPECTOR__ = []);
2737
- var Qe = new Proxy(m.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
2738
- get(e, t, n) {
2739
- return Reflect.get(e, t, n);
2740
- }
2741
- }), Kn = Q(() => {
2742
- re.hooks.callHook("sendInspectorToClient", zn());
2743
- });
2744
- function Bu(e, t) {
2745
- var n, r;
2746
- Qe.push({
2747
- options: e,
2748
- descriptor: t,
2749
- treeFilterPlaceholder: (n = e.treeFilterPlaceholder) != null ? n : "Search tree...",
2750
- stateFilterPlaceholder: (r = e.stateFilterPlaceholder) != null ? r : "Search state...",
2751
- treeFilter: "",
2752
- selectedNodeId: "",
2753
- appRecord: qe(t.app)
2754
- }), Kn();
2755
- }
2756
- function zn() {
2757
- return Qe.filter((e) => e.descriptor.app === R.value.app).filter((e) => e.descriptor.id !== "components").map((e) => {
2758
- var t;
2759
- const n = e.descriptor, r = e.options;
2760
- return {
2761
- id: r.id,
2762
- label: r.label,
2763
- logo: n.logo,
2764
- icon: `custom-ic-baseline-${(t = r == null ? void 0 : r.icon) == null ? void 0 : t.replace(/_/g, "-")}`,
2765
- packageName: n.packageName,
2766
- homepage: n.homepage,
2767
- pluginId: n.id
2768
- };
2769
- });
2770
- }
2771
- function ve(e, t) {
2772
- return Qe.find((n) => n.options.id === e && (t ? n.descriptor.app === t : !0));
2773
- }
2774
- function Uu() {
2775
- const e = Rn();
2776
- e.hook("addInspector", ({ inspector: r, plugin: u }) => {
2777
- Bu(r, u.descriptor);
2778
- });
2779
- const t = Q(async ({ inspectorId: r, plugin: u }) => {
2780
- var o;
2781
- if (!r || !((o = u == null ? void 0 : u.descriptor) != null && o.app) || D.highPerfModeEnabled)
2782
- return;
2783
- const s = ve(r, u.descriptor.app), a = {
2784
- app: u.descriptor.app,
2785
- inspectorId: r,
2786
- filter: (s == null ? void 0 : s.treeFilter) || "",
2787
- rootNodes: []
2788
- };
2789
- await new Promise((f) => {
2790
- e.callHookWith(
2791
- async (h) => {
2792
- await Promise.all(h.map((A) => A(a))), f();
2793
- },
2794
- "getInspectorTree"
2795
- /* GET_INSPECTOR_TREE */
2796
- );
2797
- }), e.callHookWith(
2798
- async (f) => {
2799
- await Promise.all(f.map((h) => h({
2800
- inspectorId: r,
2801
- rootNodes: a.rootNodes
2802
- })));
2803
- },
2804
- "sendInspectorTreeToClient"
2805
- /* SEND_INSPECTOR_TREE_TO_CLIENT */
2806
- );
2807
- }, 120);
2808
- e.hook("sendInspectorTree", t);
2809
- const n = Q(async ({ inspectorId: r, plugin: u }) => {
2810
- var o;
2811
- if (!r || !((o = u == null ? void 0 : u.descriptor) != null && o.app) || D.highPerfModeEnabled)
2812
- return;
2813
- const s = ve(r, u.descriptor.app), a = {
2814
- app: u.descriptor.app,
2815
- inspectorId: r,
2816
- nodeId: (s == null ? void 0 : s.selectedNodeId) || "",
2817
- state: null
2818
- }, f = {
2819
- currentTab: `custom-inspector:${r}`
2820
- };
2821
- a.nodeId && await new Promise((h) => {
2822
- e.callHookWith(
2823
- async (A) => {
2824
- await Promise.all(A.map((i) => i(a, f))), h();
2825
- },
2826
- "getInspectorState"
2827
- /* GET_INSPECTOR_STATE */
2828
- );
2829
- }), e.callHookWith(
2830
- async (h) => {
2831
- await Promise.all(h.map((A) => A({
2832
- inspectorId: r,
2833
- nodeId: a.nodeId,
2834
- state: a.state
2835
- })));
2836
- },
2837
- "sendInspectorStateToClient"
2838
- /* SEND_INSPECTOR_STATE_TO_CLIENT */
2839
- );
2840
- }, 120);
2841
- return e.hook("sendInspectorState", n), e.hook("customInspectorSelectNode", ({ inspectorId: r, nodeId: u, plugin: o }) => {
2842
- const s = ve(r, o.descriptor.app);
2843
- s && (s.selectedNodeId = u);
2844
- }), e.hook("timelineLayerAdded", ({ options: r, plugin: u }) => {
2845
- Vu(r, u.descriptor);
2846
- }), e.hook("timelineEventAdded", ({ options: r, plugin: u }) => {
2847
- var o;
2848
- const s = ["performance", "component-event", "keyboard", "mouse"];
2849
- D.highPerfModeEnabled || !((o = D.timelineLayersState) != null && o[u.descriptor.id]) && !s.includes(r.layerId) || e.callHookWith(
2850
- async (a) => {
2851
- await Promise.all(a.map((f) => f(r)));
2852
- },
2853
- "sendTimelineEventToClient"
2854
- /* SEND_TIMELINE_EVENT_TO_CLIENT */
2855
- );
2856
- }), e.hook("getComponentInstances", async ({ app: r }) => {
2857
- const u = r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
2858
- if (!u)
2859
- return null;
2860
- const o = u.id.toString();
2861
- return [...u.instanceMap].filter(([a]) => a.split(":")[0] === o).map(([, a]) => a);
2862
- }), e.hook("getComponentBounds", async ({ instance: r }) => j(r)), e.hook("getComponentName", ({ instance: r }) => Te(r)), e.hook("componentHighlight", ({ uid: r }) => {
2863
- const u = R.value.instanceMap.get(r);
2864
- u && wu(u);
2865
- }), e.hook("componentUnhighlight", () => {
2866
- Mn();
2867
- }), e;
2868
- }
2869
- var bt, wt;
2870
- (wt = (bt = m).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null || (bt.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = []);
2871
- var Ot, St;
2872
- (St = (Ot = m).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null || (Ot.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {});
2873
- var Tt, Ct;
2874
- (Ct = (Tt = m).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null || (Tt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "");
2875
- var It, Dt;
2876
- (Dt = (It = m).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null || (It.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = []);
2877
- var kt, Rt;
2878
- (Rt = (kt = m).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null || (kt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = []);
2879
- var Z = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
2880
- function Mu() {
2881
- return {
2882
- connected: !1,
2883
- clientConnected: !1,
2884
- vitePluginDetected: !0,
2885
- appRecords: [],
2886
- activeAppRecordId: "",
2887
- tabs: [],
2888
- commands: [],
2889
- highPerfModeEnabled: !0,
2890
- devtoolsClientDetected: {},
2891
- perfUniqueGroupId: 0,
2892
- timelineLayersState: Fu()
2893
- };
2894
- }
2895
- var xt, Pt;
2896
- (Pt = (xt = m)[Z]) != null || (xt[Z] = Mu());
2897
- var $u = Q((e) => {
2898
- re.hooks.callHook("devtoolsStateUpdated", { state: e });
2899
- });
2900
- Q((e, t) => {
2901
- re.hooks.callHook("devtoolsConnectedUpdated", { state: e, oldState: t });
2902
- });
2903
- var Ce = new Proxy(m.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
2904
- get(e, t, n) {
2905
- return t === "value" ? m.__VUE_DEVTOOLS_KIT_APP_RECORDS__ : m.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t];
2906
- }
2907
- }), R = new Proxy(m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, {
2908
- get(e, t, n) {
2909
- return t === "value" ? m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ : t === "id" ? m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ : m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t];
2910
- }
2911
- });
2912
- function Hn() {
2913
- $u({
2914
- ...m[Z],
2915
- appRecords: Ce.value,
2916
- activeAppRecordId: R.id,
2917
- tabs: m.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
2918
- commands: m.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
2919
- });
2920
- }
2921
- function Ku(e) {
2922
- m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = e, Hn();
2923
- }
2924
- function zu(e) {
2925
- m.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = e, Hn();
2926
- }
2927
- var D = new Proxy(m[Z], {
2928
- get(e, t) {
2929
- return t === "appRecords" ? Ce : t === "activeAppRecordId" ? R.id : t === "tabs" ? m.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ : t === "commands" ? m.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ : m[Z][t];
2930
- },
2931
- deleteProperty(e, t) {
2932
- return delete e[t], !0;
2933
- },
2934
- set(e, t, n) {
2935
- return e[t] = n, m[Z][t] = n, !0;
2936
- }
2937
- });
2938
- function Hu(e = {}) {
2939
- var t, n, r;
2940
- const { file: u, host: o, baseUrl: s = window.location.origin, line: a = 0, column: f = 0 } = e;
2941
- if (u) {
2942
- if (o === "chrome-extension") {
2943
- const h = u.replace(/\\/g, "\\\\"), A = (n = (t = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : t.openInEditorHost) != null ? n : "/";
2944
- fetch(`${A}__open-in-editor?file=${encodeURI(u)}`).then((i) => {
2945
- if (!i.ok) {
2946
- const E = `Opening component ${h} failed`;
2947
- console.log(`%c${E}`, "color:red");
2948
- }
2949
- });
2950
- } else if (D.vitePluginDetected) {
2951
- const h = (r = m.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? r : s;
2952
- m.__VUE_INSPECTOR__.openInEditor(h, u, a, f);
2953
- }
2954
- }
2955
- }
2956
- l();
2957
- l();
2958
- l();
2959
- l();
2960
- l();
2961
- var Nt, Ft;
2962
- (Ft = (Nt = m).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null || (Nt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = []);
2963
- var et = new Proxy(m.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
2964
- get(e, t, n) {
2965
- return Reflect.get(e, t, n);
2966
- }
2967
- });
2968
- function $e(e) {
2969
- const t = {};
2970
- return Object.keys(e).forEach((n) => {
2971
- t[n] = e[n].defaultValue;
2972
- }), t;
2973
- }
2974
- function tt(e) {
2975
- return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`;
2976
- }
2977
- function ju(e) {
2978
- var t, n, r;
2979
- const u = (n = (t = et.find((o) => {
2980
- var s;
2981
- return o[0].id === e && !!((s = o[0]) != null && s.settings);
2982
- })) == null ? void 0 : t[0]) != null ? n : null;
2983
- return (r = u == null ? void 0 : u.settings) != null ? r : null;
2984
- }
2985
- function jn(e, t) {
2986
- var n, r, u;
2987
- const o = tt(e);
2988
- if (o) {
2989
- const s = localStorage.getItem(o);
2990
- if (s)
2991
- return JSON.parse(s);
2992
- }
2993
- if (e) {
2994
- const s = (r = (n = et.find((a) => a[0].id === e)) == null ? void 0 : n[0]) != null ? r : null;
2995
- return $e((u = s == null ? void 0 : s.settings) != null ? u : {});
2996
- }
2997
- return $e(t);
2998
- }
2999
- function Gu(e, t) {
3000
- const n = tt(e);
3001
- localStorage.getItem(n) || localStorage.setItem(n, JSON.stringify($e(t)));
3002
- }
3003
- function Wu(e, t, n) {
3004
- const r = tt(e), u = localStorage.getItem(r), o = JSON.parse(u || "{}"), s = {
3005
- ...o,
3006
- [t]: n
3007
- };
3008
- localStorage.setItem(r, JSON.stringify(s)), re.hooks.callHookWith(
3009
- (a) => {
3010
- a.forEach((f) => f({
3011
- pluginId: e,
3012
- key: t,
3013
- oldValue: o[t],
3014
- newValue: n,
3015
- settings: s
3016
- }));
3017
- },
3018
- "setPluginSettings"
3019
- /* SET_PLUGIN_SETTINGS */
3020
- );
3021
- }
3022
- l();
3023
- l();
3024
- l();
3025
- l();
3026
- l();
3027
- l();
3028
- l();
3029
- l();
3030
- l();
3031
- l();
3032
- l();
3033
- var Lt, Vt, x = (Vt = (Lt = m).__VUE_DEVTOOLS_HOOK) != null ? Vt : Lt.__VUE_DEVTOOLS_HOOK = Rn(), qu = {
3034
- vueAppInit(e) {
3035
- x.hook("app:init", e);
3036
- },
3037
- vueAppUnmount(e) {
3038
- x.hook("app:unmount", e);
3039
- },
3040
- vueAppConnected(e) {
3041
- x.hook("app:connected", e);
3042
- },
3043
- componentAdded(e) {
3044
- return x.hook("component:added", e);
3045
- },
3046
- componentEmit(e) {
3047
- return x.hook("component:emit", e);
3048
- },
3049
- componentUpdated(e) {
3050
- return x.hook("component:updated", e);
3051
- },
3052
- componentRemoved(e) {
3053
- return x.hook("component:removed", e);
3054
- },
3055
- setupDevtoolsPlugin(e) {
3056
- x.hook("devtools-plugin:setup", e);
3057
- },
3058
- perfStart(e) {
3059
- return x.hook("perf:start", e);
3060
- },
3061
- perfEnd(e) {
3062
- return x.hook("perf:end", e);
3063
- }
3064
- }, Gn = {
3065
- on: qu,
3066
- setupDevToolsPlugin(e, t) {
3067
- return x.callHook("devtools-plugin:setup", e, t);
3068
- }
3069
- }, Yu = class {
3070
- constructor({ plugin: e, ctx: t }) {
3071
- this.hooks = t.hooks, this.plugin = e;
3072
- }
3073
- get on() {
3074
- return {
3075
- // component inspector
3076
- visitComponentTree: (e) => {
3077
- this.hooks.hook("visitComponentTree", e);
3078
- },
3079
- inspectComponent: (e) => {
3080
- this.hooks.hook("inspectComponent", e);
3081
- },
3082
- editComponentState: (e) => {
3083
- this.hooks.hook("editComponentState", e);
3084
- },
3085
- // custom inspector
3086
- getInspectorTree: (e) => {
3087
- this.hooks.hook("getInspectorTree", e);
3088
- },
3089
- getInspectorState: (e) => {
3090
- this.hooks.hook("getInspectorState", e);
3091
- },
3092
- editInspectorState: (e) => {
3093
- this.hooks.hook("editInspectorState", e);
3094
- },
3095
- // timeline
3096
- inspectTimelineEvent: (e) => {
3097
- this.hooks.hook("inspectTimelineEvent", e);
3098
- },
3099
- timelineCleared: (e) => {
3100
- this.hooks.hook("timelineCleared", e);
3101
- },
3102
- // settings
3103
- setPluginSettings: (e) => {
3104
- this.hooks.hook("setPluginSettings", e);
3105
- }
3106
- };
3107
- }
3108
- // component inspector
3109
- notifyComponentUpdate(e) {
3110
- var t;
3111
- if (D.highPerfModeEnabled)
3112
- return;
3113
- const n = zn().find((r) => r.packageName === this.plugin.descriptor.packageName);
3114
- if (n != null && n.id) {
3115
- if (e) {
3116
- const r = [
3117
- e.appContext.app,
3118
- e.uid,
3119
- (t = e.parent) == null ? void 0 : t.uid,
3120
- e
3121
- ];
3122
- x.callHook("component:updated", ...r);
3123
- } else
3124
- x.callHook(
3125
- "component:updated"
3126
- /* COMPONENT_UPDATED */
3127
- );
3128
- this.hooks.callHook("sendInspectorState", { inspectorId: n.id, plugin: this.plugin });
3129
- }
3130
- }
3131
- // custom inspector
3132
- addInspector(e) {
3133
- this.hooks.callHook("addInspector", { inspector: e, plugin: this.plugin }), this.plugin.descriptor.settings && Gu(e.id, this.plugin.descriptor.settings);
3134
- }
3135
- sendInspectorTree(e) {
3136
- D.highPerfModeEnabled || this.hooks.callHook("sendInspectorTree", { inspectorId: e, plugin: this.plugin });
3137
- }
3138
- sendInspectorState(e) {
3139
- D.highPerfModeEnabled || this.hooks.callHook("sendInspectorState", { inspectorId: e, plugin: this.plugin });
3140
- }
3141
- selectInspectorNode(e, t) {
3142
- this.hooks.callHook("customInspectorSelectNode", { inspectorId: e, nodeId: t, plugin: this.plugin });
3143
- }
3144
- visitComponentTree(e) {
3145
- return this.hooks.callHook("visitComponentTree", e);
3146
- }
3147
- // timeline
3148
- now() {
3149
- return D.highPerfModeEnabled ? 0 : Date.now();
3150
- }
3151
- addTimelineLayer(e) {
3152
- this.hooks.callHook("timelineLayerAdded", { options: e, plugin: this.plugin });
3153
- }
3154
- addTimelineEvent(e) {
3155
- D.highPerfModeEnabled || this.hooks.callHook("timelineEventAdded", { options: e, plugin: this.plugin });
3156
- }
3157
- // settings
3158
- getSettings(e) {
3159
- return jn(e ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
3160
- }
3161
- // utilities
3162
- getComponentInstances(e) {
3163
- return this.hooks.callHook("getComponentInstances", { app: e });
3164
- }
3165
- getComponentBounds(e) {
3166
- return this.hooks.callHook("getComponentBounds", { instance: e });
3167
- }
3168
- getComponentName(e) {
3169
- return this.hooks.callHook("getComponentName", { instance: e });
3170
- }
3171
- highlightElement(e) {
3172
- const t = e.__VUE_DEVTOOLS_NEXT_UID__;
3173
- return this.hooks.callHook("componentHighlight", { uid: t });
3174
- }
3175
- unhighlightElement() {
3176
- return this.hooks.callHook(
3177
- "componentUnhighlight"
3178
- /* COMPONENT_UNHIGHLIGHT */
3179
- );
3180
- }
3181
- }, Zu = Yu;
3182
- l();
3183
- l();
3184
- l();
3185
- l();
3186
- var Xu = "__vue_devtool_undefined__", Ju = "__vue_devtool_infinity__", Qu = "__vue_devtool_negative_infinity__", eo = "__vue_devtool_nan__";
3187
- l();
3188
- l();
3189
- var to = {
3190
- [Xu]: "undefined",
3191
- [eo]: "NaN",
3192
- [Ju]: "Infinity",
3193
- [Qu]: "-Infinity"
3194
- };
3195
- Object.entries(to).reduce((e, [t, n]) => (e[n] = t, e), {});
3196
- l();
3197
- l();
3198
- l();
3199
- l();
3200
- l();
3201
- var Bt, Ut;
3202
- (Ut = (Bt = m).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null || (Bt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set());
3203
- function no(e, t) {
3204
- return Gn.setupDevToolsPlugin(e, t);
3205
- }
3206
- function ro(e, t) {
3207
- const [n, r] = e;
3208
- if (n.app !== t)
3209
- return;
3210
- const u = new Zu({
3211
- plugin: {
3212
- setupFn: r,
3213
- descriptor: n
3214
- },
3215
- ctx: re
3216
- });
3217
- n.packageName === "vuex" && u.on.editInspectorState((o) => {
3218
- u.sendInspectorState(o.inspectorId);
3219
- }), r(u);
3220
- }
3221
- function Wn(e, t) {
3222
- m.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e) || D.highPerfModeEnabled && !(t != null && t.inspectingComponent) || (m.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e), et.forEach((n) => {
3223
- ro(n, e);
3224
- }));
3225
- }
3226
- l();
3227
- l();
3228
- var ce = "__VUE_DEVTOOLS_ROUTER__", ee = "__VUE_DEVTOOLS_ROUTER_INFO__", Mt, $t;
3229
- ($t = (Mt = m)[ee]) != null || (Mt[ee] = {
3230
- currentRoute: null,
3231
- routes: []
3232
- });
3233
- var Kt, zt;
3234
- (zt = (Kt = m)[ce]) != null || (Kt[ce] = {});
3235
- new Proxy(m[ee], {
3236
- get(e, t) {
3237
- return m[ee][t];
3238
- }
3239
- });
3240
- new Proxy(m[ce], {
3241
- get(e, t) {
3242
- if (t === "value")
3243
- return m[ce];
3244
- }
3245
- });
3246
- function uo(e) {
3247
- const t = /* @__PURE__ */ new Map();
3248
- return ((e == null ? void 0 : e.getRoutes()) || []).filter((n) => !t.has(n.path) && t.set(n.path, 1));
3249
- }
3250
- function nt(e) {
3251
- return e.map((t) => {
3252
- let { path: n, name: r, children: u, meta: o } = t;
3253
- return u != null && u.length && (u = nt(u)), {
3254
- path: n,
3255
- name: r,
3256
- children: u,
3257
- meta: o
3258
- };
3259
- });
3260
- }
3261
- function oo(e) {
3262
- if (e) {
3263
- const { fullPath: t, hash: n, href: r, path: u, name: o, matched: s, params: a, query: f } = e;
3264
- return {
3265
- fullPath: t,
3266
- hash: n,
3267
- href: r,
3268
- path: u,
3269
- name: o,
3270
- params: a,
3271
- query: f,
3272
- matched: nt(s)
3273
- };
3274
- }
3275
- return e;
3276
- }
3277
- function so(e, t) {
3278
- function n() {
3279
- var r;
3280
- const u = (r = e.app) == null ? void 0 : r.config.globalProperties.$router, o = oo(u == null ? void 0 : u.currentRoute.value), s = nt(uo(u)), a = console.warn;
3281
- console.warn = () => {
3282
- }, m[ee] = {
3283
- currentRoute: o ? _t(o) : {},
3284
- routes: _t(s)
3285
- }, m[ce] = u, console.warn = a;
3286
- }
3287
- n(), Gn.on.componentUpdated(Q(() => {
3288
- var r;
3289
- ((r = t.value) == null ? void 0 : r.app) === e.app && (n(), !D.highPerfModeEnabled && re.hooks.callHook("routerInfoUpdated", { state: m[ee] }));
3290
- }, 200));
3291
- }
3292
- function ao(e) {
3293
- return {
3294
- // get inspector tree
3295
- async getInspectorTree(t) {
3296
- const n = {
3297
- ...t,
3298
- app: R.value.app,
3299
- rootNodes: []
3300
- };
3301
- return await new Promise((r) => {
3302
- e.callHookWith(
3303
- async (u) => {
3304
- await Promise.all(u.map((o) => o(n))), r();
3305
- },
3306
- "getInspectorTree"
3307
- /* GET_INSPECTOR_TREE */
3308
- );
3309
- }), n.rootNodes;
3310
- },
3311
- // get inspector state
3312
- async getInspectorState(t) {
3313
- const n = {
3314
- ...t,
3315
- app: R.value.app,
3316
- state: null
3317
- }, r = {
3318
- currentTab: `custom-inspector:${t.inspectorId}`
3319
- };
3320
- return await new Promise((u) => {
3321
- e.callHookWith(
3322
- async (o) => {
3323
- await Promise.all(o.map((s) => s(n, r))), u();
3324
- },
3325
- "getInspectorState"
3326
- /* GET_INSPECTOR_STATE */
3327
- );
3328
- }), n.state;
3329
- },
3330
- // edit inspector state
3331
- editInspectorState(t) {
3332
- const n = new xu(), r = {
3333
- ...t,
3334
- app: R.value.app,
3335
- set: (u, o = t.path, s = t.state.value, a) => {
3336
- n.set(u, o, s, a || n.createDefaultSetCallback(t.state));
3337
- }
3338
- };
3339
- e.callHookWith(
3340
- (u) => {
3341
- u.forEach((o) => o(r));
3342
- },
3343
- "editInspectorState"
3344
- /* EDIT_INSPECTOR_STATE */
3345
- );
3346
- },
3347
- // send inspector state
3348
- sendInspectorState(t) {
3349
- const n = ve(t);
3350
- e.callHook("sendInspectorState", { inspectorId: t, plugin: {
3351
- descriptor: n.descriptor,
3352
- setupFn: () => ({})
3353
- } });
3354
- },
3355
- // inspect component inspector
3356
- inspectComponentInspector() {
3357
- return Tu();
3358
- },
3359
- // cancel inspect component inspector
3360
- cancelInspectComponentInspector() {
3361
- return Su();
3362
- },
3363
- // get component render code
3364
- getComponentRenderCode(t) {
3365
- const n = Be(R.value, t);
3366
- if (n)
3367
- return (n == null ? void 0 : n.type) instanceof Function ? n.type.toString() : n.render.toString();
3368
- },
3369
- // scroll to component
3370
- scrollToComponent(t) {
3371
- return Cu({ id: t });
3372
- },
3373
- // open in editor
3374
- openInEditor: Hu,
3375
- // get vue inspector
3376
- getVueInspector: ku,
3377
- // toggle app
3378
- toggleApp(t, n) {
3379
- const r = Ce.value.find((u) => u.id === t);
3380
- r && (zu(t), Ku(r), so(r, R), Kn(), Wn(r.app, n));
3381
- },
3382
- // inspect dom
3383
- inspectDOM(t) {
3384
- const n = Be(R.value, t);
3385
- if (n) {
3386
- const [r] = Ye(n);
3387
- r && (m.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = r);
3388
- }
3389
- },
3390
- updatePluginSettings(t, n, r) {
3391
- Wu(t, n, r);
3392
- },
3393
- getPluginSettings(t) {
3394
- return {
3395
- options: ju(t),
3396
- values: jn(t)
3397
- };
3398
- }
3399
- };
3400
- }
3401
- l();
3402
- var Ht, jt;
3403
- (jt = (Ht = m).__VUE_DEVTOOLS_ENV__) != null || (Ht.__VUE_DEVTOOLS_ENV__ = {
3404
- vitePluginDetected: !1
3405
- });
3406
- var Gt = Uu(), Wt, qt;
3407
- (qt = (Wt = m).__VUE_DEVTOOLS_KIT_CONTEXT__) != null || (Wt.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
3408
- hooks: Gt,
3409
- get state() {
3410
- return {
3411
- ...D,
3412
- activeAppRecordId: R.id,
3413
- activeAppRecord: R.value,
3414
- appRecords: Ce.value
3415
- };
3416
- },
3417
- api: ao(Gt)
3418
- });
3419
- var re = m.__VUE_DEVTOOLS_KIT_CONTEXT__;
3420
- l();
3421
- au(lu());
3422
- var Yt, Zt;
3423
- (Zt = (Yt = m).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null || (Yt.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
3424
- id: 0,
3425
- appIds: /* @__PURE__ */ new Set()
3426
- });
3427
- l();
3428
- function io(e) {
3429
- D.highPerfModeEnabled = e ?? !D.highPerfModeEnabled, !e && R.value && Wn(R.value.app);
3430
- }
3431
- l();
3432
- l();
3433
- l();
3434
- function lo(e) {
3435
- D.devtoolsClientDetected = {
3436
- ...D.devtoolsClientDetected,
3437
- ...e
3438
- };
3439
- const t = Object.values(D.devtoolsClientDetected).some(Boolean);
3440
- io(!t);
3441
- }
3442
- var Xt, Jt;
3443
- (Jt = (Xt = m).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null || (Xt.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = lo);
3444
- l();
3445
- l();
3446
- l();
3447
- l();
3448
- l();
3449
- l();
3450
- l();
3451
- var co = class {
3452
- constructor() {
3453
- this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
3454
- }
3455
- set(e, t) {
3456
- this.keyToValue.set(e, t), this.valueToKey.set(t, e);
3457
- }
3458
- getByKey(e) {
3459
- return this.keyToValue.get(e);
3460
- }
3461
- getByValue(e) {
3462
- return this.valueToKey.get(e);
3463
- }
3464
- clear() {
3465
- this.keyToValue.clear(), this.valueToKey.clear();
3466
- }
3467
- }, qn = class {
3468
- constructor(e) {
3469
- this.generateIdentifier = e, this.kv = new co();
3470
- }
3471
- register(e, t) {
3472
- this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
3473
- }
3474
- clear() {
3475
- this.kv.clear();
3476
- }
3477
- getIdentifier(e) {
3478
- return this.kv.getByValue(e);
3479
- }
3480
- getValue(e) {
3481
- return this.kv.getByKey(e);
3482
- }
3483
- }, fo = class extends qn {
3484
- constructor() {
3485
- super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
3486
- }
3487
- register(e, t) {
3488
- typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(e, t.allowProps), super.register(e, t.identifier)) : super.register(e, t);
3489
- }
3490
- getAllowedProps(e) {
3491
- return this.classToAllowedProps.get(e);
3492
- }
3493
- };
3494
- l();
3495
- l();
3496
- function _o(e) {
3497
- if ("values" in Object)
3498
- return Object.values(e);
3499
- const t = [];
3500
- for (const n in e)
3501
- e.hasOwnProperty(n) && t.push(e[n]);
3502
- return t;
3503
- }
3504
- function ho(e, t) {
3505
- const n = _o(e);
3506
- if ("find" in n)
3507
- return n.find(t);
3508
- const r = n;
3509
- for (let u = 0; u < r.length; u++) {
3510
- const o = r[u];
3511
- if (t(o))
3512
- return o;
3513
- }
3514
- }
3515
- function te(e, t) {
3516
- Object.entries(e).forEach(([n, r]) => t(r, n));
3517
- }
3518
- function ye(e, t) {
3519
- return e.indexOf(t) !== -1;
3520
- }
3521
- function Qt(e, t) {
3522
- for (let n = 0; n < e.length; n++) {
3523
- const r = e[n];
3524
- if (t(r))
3525
- return r;
3526
- }
3527
- }
3528
- var Eo = class {
3529
- constructor() {
3530
- this.transfomers = {};
3531
- }
3532
- register(e) {
3533
- this.transfomers[e.name] = e;
3534
- }
3535
- findApplicable(e) {
3536
- return ho(this.transfomers, (t) => t.isApplicable(e));
3537
- }
3538
- findByName(e) {
3539
- return this.transfomers[e];
3540
- }
3541
- };
3542
- l();
3543
- l();
3544
- var po = (e) => Object.prototype.toString.call(e).slice(8, -1), Yn = (e) => typeof e > "u", go = (e) => e === null, fe = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Ke = (e) => fe(e) && Object.keys(e).length === 0, K = (e) => Array.isArray(e), mo = (e) => typeof e == "string", vo = (e) => typeof e == "number" && !isNaN(e), yo = (e) => typeof e == "boolean", Ao = (e) => e instanceof RegExp, de = (e) => e instanceof Map, _e = (e) => e instanceof Set, Zn = (e) => po(e) === "Symbol", bo = (e) => e instanceof Date && !isNaN(e.valueOf()), wo = (e) => e instanceof Error, en = (e) => typeof e == "number" && isNaN(e), Oo = (e) => yo(e) || go(e) || Yn(e) || vo(e) || mo(e) || Zn(e), So = (e) => typeof e == "bigint", To = (e) => e === 1 / 0 || e === -1 / 0, Co = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Io = (e) => e instanceof URL;
3545
- l();
3546
- var Xn = (e) => e.replace(/\./g, "\\."), xe = (e) => e.map(String).map(Xn).join("."), ie = (e) => {
3547
- const t = [];
3548
- let n = "";
3549
- for (let u = 0; u < e.length; u++) {
3550
- let o = e.charAt(u);
3551
- if (o === "\\" && e.charAt(u + 1) === ".") {
3552
- n += ".", u++;
3553
- continue;
3554
- }
3555
- if (o === ".") {
3556
- t.push(n), n = "";
3557
- continue;
3558
- }
3559
- n += o;
3560
- }
3561
- const r = n;
3562
- return t.push(r), t;
3563
- };
3564
- l();
3565
- function B(e, t, n, r) {
3566
- return {
3567
- isApplicable: e,
3568
- annotation: t,
3569
- transform: n,
3570
- untransform: r
3571
- };
3572
- }
3573
- var Jn = [
3574
- B(Yn, "undefined", () => null, () => {
3575
- }),
3576
- B(So, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
3577
- B(bo, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3578
- B(wo, "Error", (e, t) => {
3579
- const n = {
3580
- name: e.name,
3581
- message: e.message
3582
- };
3583
- return t.allowedErrorProps.forEach((r) => {
3584
- n[r] = e[r];
3585
- }), n;
3586
- }, (e, t) => {
3587
- const n = new Error(e.message);
3588
- return n.name = e.name, n.stack = e.stack, t.allowedErrorProps.forEach((r) => {
3589
- n[r] = e[r];
3590
- }), n;
3591
- }),
3592
- B(Ao, "regexp", (e) => "" + e, (e) => {
3593
- const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
3594
- return new RegExp(t, n);
3595
- }),
3596
- B(
3597
- _e,
3598
- "set",
3599
- // (sets only exist in es6+)
3600
- // eslint-disable-next-line es5/no-es6-methods
3601
- (e) => [...e.values()],
3602
- (e) => new Set(e)
3603
- ),
3604
- B(de, "map", (e) => [...e.entries()], (e) => new Map(e)),
3605
- B((e) => en(e) || To(e), "number", (e) => en(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3606
- B((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
3607
- B(Io, "URL", (e) => e.toString(), (e) => new URL(e))
3608
- ];
3609
- function Ie(e, t, n, r) {
3610
- return {
3611
- isApplicable: e,
3612
- annotation: t,
3613
- transform: n,
3614
- untransform: r
3615
- };
3616
- }
3617
- var Qn = Ie((e, t) => Zn(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
3618
- const r = n.symbolRegistry.getValue(t[1]);
3619
- if (!r)
3620
- throw new Error("Trying to deserialize unknown symbol");
3621
- return r;
3622
- }), Do = [
3623
- Int8Array,
3624
- Uint8Array,
3625
- Int16Array,
3626
- Uint16Array,
3627
- Int32Array,
3628
- Uint32Array,
3629
- Float32Array,
3630
- Float64Array,
3631
- Uint8ClampedArray
3632
- ].reduce((e, t) => (e[t.name] = t, e), {}), er = Ie(Co, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3633
- const n = Do[t[1]];
3634
- if (!n)
3635
- throw new Error("Trying to deserialize unknown typed array");
3636
- return new n(e);
3637
- });
3638
- function tr(e, t) {
3639
- return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
3640
- }
3641
- var nr = Ie(tr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
3642
- const n = t.classRegistry.getAllowedProps(e.constructor);
3643
- if (!n)
3644
- return { ...e };
3645
- const r = {};
3646
- return n.forEach((u) => {
3647
- r[u] = e[u];
3648
- }), r;
3649
- }, (e, t, n) => {
3650
- const r = n.classRegistry.getValue(t[1]);
3651
- if (!r)
3652
- throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3653
- return Object.assign(Object.create(r.prototype), e);
3654
- }), rr = Ie((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
3655
- const r = n.customTransformerRegistry.findByName(t[1]);
3656
- if (!r)
3657
- throw new Error("Trying to deserialize unknown custom value");
3658
- return r.deserialize(e);
3659
- }), ko = [nr, Qn, rr, er], tn = (e, t) => {
3660
- const n = Qt(ko, (u) => u.isApplicable(e, t));
3661
- if (n)
3662
- return {
3663
- value: n.transform(e, t),
3664
- type: n.annotation(e, t)
3665
- };
3666
- const r = Qt(Jn, (u) => u.isApplicable(e, t));
3667
- if (r)
3668
- return {
3669
- value: r.transform(e, t),
3670
- type: r.annotation
3671
- };
3672
- }, ur = {};
3673
- Jn.forEach((e) => {
3674
- ur[e.annotation] = e;
3675
- });
3676
- var Ro = (e, t, n) => {
3677
- if (K(t))
3678
- switch (t[0]) {
3679
- case "symbol":
3680
- return Qn.untransform(e, t, n);
3681
- case "class":
3682
- return nr.untransform(e, t, n);
3683
- case "custom":
3684
- return rr.untransform(e, t, n);
3685
- case "typed-array":
3686
- return er.untransform(e, t, n);
3687
- default:
3688
- throw new Error("Unknown transformation: " + t);
3689
- }
3690
- else {
3691
- const r = ur[t];
3692
- if (!r)
3693
- throw new Error("Unknown transformation: " + t);
3694
- return r.untransform(e, n);
3695
- }
3696
- };
3697
- l();
3698
- var q = (e, t) => {
3699
- if (t > e.size)
3700
- throw new Error("index out of bounds");
3701
- const n = e.keys();
3702
- for (; t > 0; )
3703
- n.next(), t--;
3704
- return n.next().value;
3705
- };
3706
- function or(e) {
3707
- if (ye(e, "__proto__"))
3708
- throw new Error("__proto__ is not allowed as a property");
3709
- if (ye(e, "prototype"))
3710
- throw new Error("prototype is not allowed as a property");
3711
- if (ye(e, "constructor"))
3712
- throw new Error("constructor is not allowed as a property");
3713
- }
3714
- var xo = (e, t) => {
3715
- or(t);
3716
- for (let n = 0; n < t.length; n++) {
3717
- const r = t[n];
3718
- if (_e(e))
3719
- e = q(e, +r);
3720
- else if (de(e)) {
3721
- const u = +r, o = +t[++n] == 0 ? "key" : "value", s = q(e, u);
3722
- switch (o) {
3723
- case "key":
3724
- e = s;
3725
- break;
3726
- case "value":
3727
- e = e.get(s);
3728
- break;
3729
- }
3730
- } else
3731
- e = e[r];
3732
- }
3733
- return e;
3734
- }, ze = (e, t, n) => {
3735
- if (or(t), t.length === 0)
3736
- return n(e);
3737
- let r = e;
3738
- for (let o = 0; o < t.length - 1; o++) {
3739
- const s = t[o];
3740
- if (K(r)) {
3741
- const a = +s;
3742
- r = r[a];
3743
- } else if (fe(r))
3744
- r = r[s];
3745
- else if (_e(r)) {
3746
- const a = +s;
3747
- r = q(r, a);
3748
- } else if (de(r)) {
3749
- if (o === t.length - 2)
3750
- break;
3751
- const f = +s, h = +t[++o] == 0 ? "key" : "value", A = q(r, f);
3752
- switch (h) {
3753
- case "key":
3754
- r = A;
3755
- break;
3756
- case "value":
3757
- r = r.get(A);
3758
- break;
3759
- }
3760
- }
3761
- }
3762
- const u = t[t.length - 1];
3763
- if (K(r) ? r[+u] = n(r[+u]) : fe(r) && (r[u] = n(r[u])), _e(r)) {
3764
- const o = q(r, +u), s = n(o);
3765
- o !== s && (r.delete(o), r.add(s));
3766
- }
3767
- if (de(r)) {
3768
- const o = +t[t.length - 2], s = q(r, o);
3769
- switch (+u == 0 ? "key" : "value") {
3770
- case "key": {
3771
- const f = n(s);
3772
- r.set(f, r.get(s)), f !== s && r.delete(s);
3773
- break;
3774
- }
3775
- case "value": {
3776
- r.set(s, n(r.get(s)));
3777
- break;
3778
- }
3779
- }
3780
- }
3781
- return e;
3782
- };
3783
- function He(e, t, n = []) {
3784
- if (!e)
3785
- return;
3786
- if (!K(e)) {
3787
- te(e, (o, s) => He(o, t, [...n, ...ie(s)]));
3788
- return;
3789
- }
3790
- const [r, u] = e;
3791
- u && te(u, (o, s) => {
3792
- He(o, t, [...n, ...ie(s)]);
3793
- }), t(r, n);
3794
- }
3795
- function Po(e, t, n) {
3796
- return He(t, (r, u) => {
3797
- e = ze(e, u, (o) => Ro(o, r, n));
3798
- }), e;
3799
- }
3800
- function No(e, t) {
3801
- function n(r, u) {
3802
- const o = xo(e, ie(u));
3803
- r.map(ie).forEach((s) => {
3804
- e = ze(e, s, () => o);
3805
- });
3806
- }
3807
- if (K(t)) {
3808
- const [r, u] = t;
3809
- r.forEach((o) => {
3810
- e = ze(e, ie(o), () => e);
3811
- }), u && te(u, n);
3812
- } else
3813
- te(t, n);
3814
- return e;
3815
- }
3816
- var Fo = (e, t) => fe(e) || K(e) || de(e) || _e(e) || tr(e, t);
3817
- function Lo(e, t, n) {
3818
- const r = n.get(e);
3819
- r ? r.push(t) : n.set(e, [t]);
3820
- }
3821
- function Vo(e, t) {
3822
- const n = {};
3823
- let r;
3824
- return e.forEach((u) => {
3825
- if (u.length <= 1)
3826
- return;
3827
- t || (u = u.map((a) => a.map(String)).sort((a, f) => a.length - f.length));
3828
- const [o, ...s] = u;
3829
- o.length === 0 ? r = s.map(xe) : n[xe(o)] = s.map(xe);
3830
- }), r ? Ke(n) ? [r] : [r, n] : Ke(n) ? void 0 : n;
3831
- }
3832
- var sr = (e, t, n, r, u = [], o = [], s = /* @__PURE__ */ new Map()) => {
3833
- var a;
3834
- const f = Oo(e);
3835
- if (!f) {
3836
- Lo(e, u, t);
3837
- const _ = s.get(e);
3838
- if (_)
3839
- return r ? {
3840
- transformedValue: null
3841
- } : _;
3842
- }
3843
- if (!Fo(e, n)) {
3844
- const _ = tn(e, n), v = _ ? {
3845
- transformedValue: _.value,
3846
- annotations: [_.type]
3847
- } : {
3848
- transformedValue: e
3849
- };
3850
- return f || s.set(e, v), v;
3851
- }
3852
- if (ye(o, e))
3853
- return {
3854
- transformedValue: null
3855
- };
3856
- const h = tn(e, n), A = (a = h == null ? void 0 : h.value) != null ? a : e, i = K(A) ? [] : {}, E = {};
3857
- te(A, (_, v) => {
3858
- if (v === "__proto__" || v === "constructor" || v === "prototype")
3859
- throw new Error(`Detected property ${v}. This is a prototype pollution risk, please remove it from your object.`);
3860
- const p = sr(_, t, n, r, [...u, v], [...o, e], s);
3861
- i[v] = p.transformedValue, K(p.annotations) ? E[v] = p.annotations : fe(p.annotations) && te(p.annotations, (g, O) => {
3862
- E[Xn(v) + "." + O] = g;
3863
- });
3864
- });
3865
- const c = Ke(E) ? {
3866
- transformedValue: i,
3867
- annotations: h ? [h.type] : void 0
3868
- } : {
3869
- transformedValue: i,
3870
- annotations: h ? [h.type, E] : E
3871
- };
3872
- return f || s.set(e, c), c;
3873
- };
3874
- l();
3875
- l();
3876
- function ar(e) {
3877
- return Object.prototype.toString.call(e).slice(8, -1);
3878
- }
3879
- function nn(e) {
3880
- return ar(e) === "Array";
3881
- }
3882
- function Bo(e) {
3883
- if (ar(e) !== "Object")
3884
- return !1;
3885
- const t = Object.getPrototypeOf(e);
3886
- return !!t && t.constructor === Object && t === Object.prototype;
3887
- }
3888
- function Uo(e, t, n, r, u) {
3889
- const o = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
3890
- o === "enumerable" && (e[t] = n), u && o === "nonenumerable" && Object.defineProperty(e, t, {
3891
- value: n,
3892
- enumerable: !1,
3893
- writable: !0,
3894
- configurable: !0
3895
- });
3896
- }
3897
- function je(e, t = {}) {
3898
- if (nn(e))
3899
- return e.map((u) => je(u, t));
3900
- if (!Bo(e))
3901
- return e;
3902
- const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
3903
- return [...n, ...r].reduce((u, o) => {
3904
- if (nn(t.props) && !t.props.includes(o))
3905
- return u;
3906
- const s = e[o], a = je(s, t);
3907
- return Uo(u, o, a, e, t.nonenumerable), u;
3908
- }, {});
3909
- }
3910
- var T = class {
3911
- /**
3912
- * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3913
- */
3914
- constructor({ dedupe: e = !1 } = {}) {
3915
- this.classRegistry = new fo(), this.symbolRegistry = new qn((t) => {
3916
- var n;
3917
- return (n = t.description) != null ? n : "";
3918
- }), this.customTransformerRegistry = new Eo(), this.allowedErrorProps = [], this.dedupe = e;
3919
- }
3920
- serialize(e) {
3921
- const t = /* @__PURE__ */ new Map(), n = sr(e, t, this, this.dedupe), r = {
3922
- json: n.transformedValue
3923
- };
3924
- n.annotations && (r.meta = {
3925
- ...r.meta,
3926
- values: n.annotations
3927
- });
3928
- const u = Vo(t, this.dedupe);
3929
- return u && (r.meta = {
3930
- ...r.meta,
3931
- referentialEqualities: u
3932
- }), r;
3933
- }
3934
- deserialize(e) {
3935
- const { json: t, meta: n } = e;
3936
- let r = je(t);
3937
- return n != null && n.values && (r = Po(r, n.values, this)), n != null && n.referentialEqualities && (r = No(r, n.referentialEqualities)), r;
3938
- }
3939
- stringify(e) {
3940
- return JSON.stringify(this.serialize(e));
3941
- }
3942
- parse(e) {
3943
- return this.deserialize(JSON.parse(e));
3944
- }
3945
- registerClass(e, t) {
3946
- this.classRegistry.register(e, t);
3947
- }
3948
- registerSymbol(e, t) {
3949
- this.symbolRegistry.register(e, t);
3950
- }
3951
- registerCustom(e, t) {
3952
- this.customTransformerRegistry.register({
3953
- name: t,
3954
- ...e
3955
- });
3956
- }
3957
- allowErrorProps(...e) {
3958
- this.allowedErrorProps.push(...e);
3959
- }
3960
- };
3961
- T.defaultInstance = new T();
3962
- T.serialize = T.defaultInstance.serialize.bind(T.defaultInstance);
3963
- T.deserialize = T.defaultInstance.deserialize.bind(T.defaultInstance);
3964
- T.stringify = T.defaultInstance.stringify.bind(T.defaultInstance);
3965
- T.parse = T.defaultInstance.parse.bind(T.defaultInstance);
3966
- T.registerClass = T.defaultInstance.registerClass.bind(T.defaultInstance);
3967
- T.registerSymbol = T.defaultInstance.registerSymbol.bind(T.defaultInstance);
3968
- T.registerCustom = T.defaultInstance.registerCustom.bind(T.defaultInstance);
3969
- T.allowErrorProps = T.defaultInstance.allowErrorProps.bind(T.defaultInstance);
3970
- l();
3971
- l();
3972
- l();
3973
- l();
3974
- l();
3975
- l();
3976
- l();
3977
- l();
3978
- l();
3979
- l();
3980
- l();
3981
- l();
3982
- l();
3983
- l();
3984
- l();
3985
- l();
3986
- l();
3987
- l();
3988
- l();
3989
- l();
3990
- l();
3991
- l();
3992
- l();
3993
- var rn, un;
3994
- (un = (rn = m).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null || (rn.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = []);
3995
- var on, sn;
3996
- (sn = (on = m).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null || (on.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null);
3997
- var an, ln;
3998
- (ln = (an = m).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null || (an.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null);
3999
- var cn, fn;
4000
- (fn = (cn = m).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null || (cn.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null);
4001
- var dn, _n;
4002
- (_n = (dn = m).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null || (dn.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null);
4003
- var hn, En;
4004
- (En = (hn = m).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null || (hn.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null);
4005
- l();
4006
- l();
4007
- l();
4008
- l();
4009
- l();
4010
- l();
4011
- l();
4012
- var Mo = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", $o = "âḃćḋèḟĝḫíĵǩĺṁńŏṗɋŕśṭůṿẘẋẏẓḀḂḈḊḔḞḠḢḬĴḴĻḾŊÕṔɊŔṠṮŨṼẄẌŸƵ";
4013
- function Ko(e, t) {
4014
- let n = "";
4015
- t.prefix && (n += t.prefix);
4016
- for (let r = 0; r < e.length; r++) {
4017
- const u = e[r], o = t.accents ? $o[Mo.indexOf(u)] ?? u : u;
4018
- n += o;
4019
- }
4020
- return t.suffix && (n += t.suffix), n;
4021
- }
4022
- function zo(e, t, n) {
4023
- let r;
4024
- const u = /* @__PURE__ */ new Map(), o = t.warnMissing;
4025
- t.warnMissing = (f) => {
4026
- const h = On();
4027
- o(f), h && (u.set(h, u.get(h) ?? /* @__PURE__ */ new Set()), u.get(h).add(f));
4028
- };
4029
- const s = /* @__PURE__ */ new WeakSet();
4030
- Sn(() => {
4031
- const f = n.bundles;
4032
- for (const h of f) {
4033
- if (s.has(h))
4034
- continue;
4035
- const A = h._transform;
4036
- h._transform = (i) => (A != null && (i = A(i)), r != null && (i = r(i)), i), s.add(h);
4037
- }
4038
- }, { flush: "sync" });
4039
- const a = Ae(() => [...n.bundles].map((f) => {
4040
- const h = new Se(f.locales, {
4041
- functions: f._functions,
4042
- useIsolating: f._useIsolating
4043
- });
4044
- return h._terms = f._terms, h._messages = f._messages, h;
4045
- }));
4046
- no({
4047
- id: "fluent-vue",
4048
- label: "fluent-vue",
4049
- packageName: "fluent-vue",
4050
- homepage: "https://fluent-vue.demivan.me",
4051
- logo: "https://fluent-vue.demivan.me/assets/logo.svg",
4052
- componentStateTypes: ["fluent-vue"],
4053
- app: e,
4054
- settings: {
4055
- components: {
4056
- label: "Components"
4057
- },
4058
- // Use option as a header
4059
- showLocalized: {
4060
- defaultValue: !0,
4061
- label: "Mark localized",
4062
- description: "Mark localized components in component tree",
4063
- type: "boolean"
4064
- },
4065
- markMissing: {
4066
- defaultValue: !0,
4067
- label: "Mark missing",
4068
- description: "Mark missing translations in component tree",
4069
- type: "boolean"
4070
- },
4071
- showI18n: {
4072
- defaultValue: !0,
4073
- label: "Mark i18n",
4074
- description: "Mark i18n components in component tree",
4075
- type: "boolean"
4076
- },
4077
- pseudo: {
4078
- label: "Pseudolocalization"
4079
- },
4080
- // Use option as a header
4081
- pseudoEnable: {
4082
- defaultValue: !1,
4083
- label: "Enable",
4084
- description: "Enable pseudolocalization",
4085
- type: "boolean"
4086
- },
4087
- pseudoAccents: {
4088
- defaultValue: !0,
4089
- label: "Accents",
4090
- description: "Enable pseudolocalization accents",
4091
- type: "boolean"
4092
- },
4093
- pseudoPrefix: {
4094
- label: "Prefix",
4095
- type: "text",
4096
- description: "Prefix to wrap translation",
4097
- defaultValue: "["
4098
- },
4099
- pseudoSuffix: {
4100
- label: "Suffix",
4101
- type: "text",
4102
- description: "Suffix to wrap translation",
4103
- defaultValue: "]"
4104
- }
4105
- }
4106
- }, (f) => {
4107
- f.on.visitComponentTree(({ treeNode: i, componentInstance: E }) => {
4108
- var c;
4109
- const _ = f.getSettings();
4110
- _.showI18n && i.name === t.componentName && i.tags.push({
4111
- label: "fluent-vue",
4112
- textColor: 0,
4113
- backgroundColor: 4307075
4114
- }), _.showLocalized && ((c = E == null ? void 0 : E.proxy) == null ? void 0 : c.$options.fluent) != null && i.tags.push({
4115
- label: "localized",
4116
- textColor: 0,
4117
- backgroundColor: 4307075
4118
- });
4119
- const v = u.get(E);
4120
- _.markMissing && v != null && v.size > 0 && i.tags.push({
4121
- label: "missing translations",
4122
- textColor: 16777215,
4123
- backgroundColor: 11534368
4124
- });
4125
- }), f.on.inspectComponent(({ componentInstance: i, instanceData: E }) => {
4126
- var c;
4127
- const _ = u.get(i);
4128
- if (_)
4129
- for (const g of _.values())
4130
- E.state.push({
4131
- type: "Missing translations",
4132
- key: g,
4133
- editable: !1,
4134
- value: {
4135
- _custom: {
4136
- type: "custom",
4137
- display: '<span style="color:#B00020">Missing</span>'
4138
- }
4139
- }
4140
- });
4141
- const v = (c = i == null ? void 0 : i.proxy) == null ? void 0 : c.$options.fluent;
4142
- if (!v)
4143
- return;
4144
- const p = a.value;
4145
- for (const [g, O] of Object.entries(v)) {
4146
- const b = p.find((I) => I.locales.includes(g));
4147
- if (b != null)
4148
- for (const I of O.body) {
4149
- const z = b.hasMessage(I.id);
4150
- E.state.push({
4151
- type: `Component translations (${g})`,
4152
- key: I.id,
4153
- editable: !1,
4154
- value: {
4155
- _custom: {
4156
- type: "custom",
4157
- display: (I.value ? b.formatPattern(I.value, {}, []) : "") + (z ? '&nbsp;<span style="color:#ffa726">Global</span>' : "")
4158
- }
4159
- }
4160
- });
4161
- }
4162
- }
4163
- }), f.on.getInspectorTree((i) => {
4164
- i.inspectorId === "fluent-vue-inspector" && (i.rootNodes = [
4165
- {
4166
- id: "global",
4167
- label: "Global translations"
4168
- },
4169
- {
4170
- id: "missing",
4171
- label: "Missing translations"
4172
- }
4173
- ]);
4174
- });
4175
- const h = /* @__PURE__ */ new Set();
4176
- f.on.getInspectorState(async (i) => {
4177
- if (i.inspectorId === "fluent-vue-inspector") {
4178
- if (i.nodeId === "global") {
4179
- i.state = {};
4180
- for (const E of a.value)
4181
- i.state[E.locales.join(",")] = [...E._messages.entries()].map(([c, _]) => ({
4182
- key: _.id,
4183
- value: _.value ? E.formatPattern(_.value, {}, []) : ""
4184
- }));
4185
- }
4186
- if (i.nodeId === "missing") {
4187
- i.state = {};
4188
- for (const E of a.value) {
4189
- const c = E.locales.join(",");
4190
- for (const [_, v] of u.entries())
4191
- for (const p of v)
4192
- i.state[c] = i.state[c] ?? [], i.state[c].push({
4193
- key: p,
4194
- editable: !0,
4195
- value: {
4196
- _custom: {
4197
- type: "component",
4198
- value: h.has(_),
4199
- display: await f.getComponentName(_)
4200
- }
4201
- }
4202
- });
4203
- }
4204
- }
4205
- }
4206
- }), f.on.editInspectorState((i) => {
4207
- if (i.inspectorId === "fluent-vue-inspector" && i.nodeId === "missing") {
4208
- const E = i.path[0], [c] = u.entries().find(([_, v]) => v.has(E)) ?? [];
4209
- c != null && (i.state.value ? (h.add(c), f.highlightElement(c)) : (h.delete(c), f.unhighlightElement()));
4210
- }
4211
- });
4212
- function A(i) {
4213
- i.pseudoEnable ? r = (E) => Ko(E, {
4214
- prefix: i.pseudoPrefix ?? void 0,
4215
- suffix: i.pseudoSuffix ?? void 0,
4216
- accents: i.pseudoAccents ?? !1
4217
- }) : r = void 0, n.bundles = [...n.bundles];
4218
- }
4219
- f.on.setPluginSettings((i) => {
4220
- A(i.settings);
4221
- }), A(f.getSettings()), f.addInspector({
4222
- id: "fluent-vue-inspector",
4223
- label: "fluent-vue"
4224
- });
4225
- });
4226
- }
4227
- function Ho(e) {
4228
- kr(typeof DOMParser < "u", "DOMParser is not available. Please provide a custom parseMarkup function.");
4229
- const n = new DOMParser().parseFromString(e, "text/html");
4230
- return Array.from(n.body.childNodes);
4231
- }
4232
- function jo(e) {
4233
- J(`Could not find translation for key [${e}]`);
4234
- }
4235
- function Go(e) {
4236
- return e.warnMissing === !0 || e.warnMissing == null ? jo : e.warnMissing === !1 ? () => {
4237
- } : e.warnMissing;
4238
- }
4239
- function Wo(e) {
4240
- var t, n, r, u, o, s;
4241
- return {
4242
- warnMissing: Go(e),
4243
- parseMarkup: e.parseMarkup ?? Ho,
4244
- mapVariable: e.mapVariable,
4245
- globalFormatName: ((n = (t = e.globals) == null ? void 0 : t.functions) == null ? void 0 : n.format) ?? "$t",
4246
- globalFormatAttrsName: ((u = (r = e.globals) == null ? void 0 : r.functions) == null ? void 0 : u.formatAttrs) ?? "$ta",
4247
- directiveName: ((o = e.globals) == null ? void 0 : o.directive) ?? "t",
4248
- componentName: ((s = e.globals) == null ? void 0 : s.component) ?? "i18n",
4249
- componentTag: e.componentTag ?? "span"
4250
- };
4251
- }
4252
- var qo = /-(\w)/g;
4253
- function Yo(e) {
4254
- return e.replace(qo, (t, n) => n.toUpperCase());
4255
- }
4256
- function ir(e) {
4257
- const t = e == null ? void 0 : e.$parent, n = t == null ? void 0 : t.$options;
4258
- return n != null && n.fluent == null ? ir(t) : t;
4259
- }
4260
- var Zo = /<|&#?\w+;/;
4261
- function Xo(e, t) {
4262
- return _r({
4263
- name: e.componentName,
4264
- props: {
4265
- path: { type: String, required: !0 },
4266
- tag: { type: [String, Boolean], default: e.componentTag },
4267
- args: { type: Object, default: () => ({}) },
4268
- html: { type: Boolean, default: !1 },
4269
- noTag: { type: Boolean, default: !1 }
4270
- },
4271
- setup(n, { slots: r, attrs: u }) {
4272
- const o = On(), s = ir(o == null ? void 0 : o.proxy), a = Y(t, s), f = Ae(() => {
4273
- const E = Object.assign(
4274
- {},
4275
- n.args,
4276
- ...Object.keys(r).map((v) => ({
4277
- [v]: `￿￾${v}￿`
4278
- }))
4279
- ), c = a.formatWithAttrs(n.path, E), _ = Object.fromEntries(
4280
- Object.entries(c.attributes).map(([v, p]) => [Yo(v), p])
4281
- );
4282
- return {
4283
- value: c.value,
4284
- attributes: _
4285
- };
4286
- }), h = (E) => E == null ? void 0 : E.split("￿").map(
4287
- (c) => c.startsWith("￾") ? r[c.replace("￾", "")](f.value.attributes) : c
4288
- ), A = (E) => {
4289
- if (E.nodeType === 3)
4290
- return h(E.nodeValue);
4291
- if (E.nodeType === 1) {
4292
- const c = E;
4293
- return ot(
4294
- c.nodeName.toLowerCase(),
4295
- {
4296
- ...Object.fromEntries(
4297
- Array.from(c.attributes).map((_) => [_.name, _.value])
4298
- )
4299
- },
4300
- Array.from(c.childNodes).map((_) => A(_))
4301
- );
4302
- }
4303
- return J(`Unsupported node type: ${E.nodeType}. If you need support for it, please, create an issue in fluent-vue repository.`), [];
4304
- }, i = Ae(() => !n.html || !Zo.test(f.value.value) ? h(f.value.value) : a.options.parseMarkup(f.value.value).map(A));
4305
- return () => n.tag === !1 || n.noTag ? i.value : ot(n.tag, { ...u }, i.value);
4306
- }
4307
- });
4308
- }
4309
- var Pe = {
4310
- global: ["title", "aria-label", "aria-valuetext", "aria-moz-hint"],
4311
- a: ["download"],
4312
- area: ["download", "alt"],
4313
- // value is special-cased in isAttrNameLocalizable
4314
- input: ["alt", "placeholder"],
4315
- menuitem: ["label"],
4316
- menu: ["label"],
4317
- optgroup: ["label"],
4318
- option: ["label"],
4319
- track: ["label"],
4320
- img: ["alt"],
4321
- textarea: ["placeholder"],
4322
- th: ["abbr"]
4323
- };
4324
- function Jo(e, t, n = []) {
4325
- if (n.includes(e))
4326
- return !0;
4327
- const r = e.toLowerCase(), u = t.localName;
4328
- if (Pe.global.includes(r))
4329
- return !0;
4330
- if (Pe[u] == null)
4331
- return !1;
4332
- if (Pe[u].includes(r))
4333
- return !0;
4334
- if (t.namespaceURI === "http://www.w3.org/1999/xhtml" && u === "input" && r === "value") {
4335
- const o = t.type.toLowerCase();
4336
- if (o === "submit" || o === "button" || o === "reset")
4337
- return !0;
4338
- }
4339
- return !1;
4340
- }
4341
- function pn(e, t, n) {
4342
- const r = n.arg;
4343
- if (r === void 0) {
4344
- J("v-t directive is missing arg with translation key");
4345
- return;
4346
- }
4347
- const u = t.formatWithAttrs(r, n.value);
4348
- u.hasValue && (e.textContent = u.value);
4349
- const o = Object.keys(n.modifiers);
4350
- for (const [s, a] of Object.entries(u.attributes))
4351
- Jo(s, e, o) ? e.setAttribute(s, a) : J(`Attribute '${s}' on element <${e.tagName.toLowerCase()}> is not localizable. Remove it from the translation. Translation key: ${r}`);
4352
- }
4353
- function Qo(e) {
4354
- return {
4355
- mounted(t, n) {
4356
- Sn(() => {
4357
- const r = Y(e, n.instance);
4358
- pn(t, r, n);
4359
- });
4360
- },
4361
- updated(t, n) {
4362
- const r = Y(e, n.instance);
4363
- pn(t, r, n);
4364
- },
4365
- getSSRProps(t) {
4366
- const n = Y(e, t.instance);
4367
- if (t.arg === void 0)
4368
- return J("v-t directive is missing arg with translation key"), {};
4369
- const r = n.formatWithAttrs(t.arg, t.value), u = r.attributes;
4370
- return r.hasValue && (u.textContent = r.value), u;
4371
- }
4372
- };
4373
- }
4374
- function es(e) {
4375
- const t = dr(e.bundles), n = Wo(e), r = new Cn(t, n);
4376
- return {
4377
- get bundles() {
4378
- return t.value;
4379
- },
4380
- set bundles(u) {
4381
- t.value = u;
4382
- },
4383
- mergedWith: (u) => In(r, u),
4384
- format: r.format.bind(r),
4385
- formatAttrs: r.formatAttrs.bind(r),
4386
- formatWithAttrs: r.formatWithAttrs.bind(r),
4387
- $t: r.format.bind(r),
4388
- $ta: r.formatAttrs.bind(r),
4389
- install(u) {
4390
- {
4391
- const o = u;
4392
- process.env.NODE_ENV !== "production" && zo(o, n, this), o.provide(xr, r), o.config.globalProperties[n.globalFormatName] = function(s, a) {
4393
- return Y(r, this).format(s, a);
4394
- }, o.config.globalProperties[n.globalFormatAttrsName] = function(s, a) {
4395
- return Y(r, this).formatAttrs(s, a);
4396
- }, o.directive(n.directiveName, Qo(r));
4397
- }
4398
- u.component(n.componentName, Xo(n, r));
4399
- }
4400
- };
4401
- }
4402
- const ts = {
4403
- useCache: !0
4404
- }, ns = `No bundles! you must await .ready before installing
4405
- LocaleManager as a plugin. Either instantiate with warmUp = true (default) or
4406
- call and await .change() manually.`.replace(`
4407
- `, " ");
4408
- class rs {
4409
- constructor({
4410
- bundleSource: t,
4411
- preferredLocale: n,
4412
- allowedLocales: r,
4413
- namespaces: u,
4414
- // locale to use for any translations that do not exist for user's
4415
- // preferred locale. Defaults to en-US like in the current app.
4416
- fallbackLocale: o,
4417
- // will automatically "warm up" the bundles specified by the initial locale
4418
- // and namespace options.
4419
- warmUp: s = !0
4420
- }) {
4421
- this.localStorageKey = "user-locale", this.allowedLocales = [], this.currentNamespaces = /* @__PURE__ */ new Set(), this._resolveReady = null, this.fluent = null, this._cachedBundles = null, this._cachedHash = null, this.preferredLocale = null, this.bundleSource = t, this.fallbackLocale = o, this.setOptions({ allowedLocales: r, preferredLocale: n, namespaces: u }), this.ready = new Promise((a) => {
4422
- this._resolveReady = a;
4423
- }), s && this.warmUp();
4424
- }
4425
- async warmUp() {
4426
- if (this._resolveReady === null)
4427
- throw new Error("you should not have called this!");
4428
- if (this.currentNamespaces.size === 0)
4429
- throw new Error("provide at least one namespace when using auto-init!");
4430
- try {
4431
- await this.getCurrentBundles(), this._resolveReady(null);
4432
- } catch (t) {
4433
- t instanceof Error ? this._resolveReady(t) : this._resolveReady(new Error(`${t}`));
4434
- } finally {
4435
- this._resolveReady = null;
4436
- }
4437
- }
4438
- get fluentFormat() {
4439
- var t;
4440
- if ((t = this.fluent) != null && t.format)
4441
- return this.fluent.format;
4442
- throw new Error("fluent not ready");
4443
- }
4444
- get fluentFormatAttrs() {
4445
- var t;
4446
- if ((t = this.fluent) != null && t.formatAttrs)
4447
- return this.fluent.formatAttrs;
4448
- throw new Error("fluent not ready");
4449
- }
4450
- // possibly use return type to relate failed attempts to change the locale?
4451
- // TODO - really hate this name. lol.
4452
- async change(t) {
4453
- const n = { ...ts, ...t };
4454
- n.useCache || (this._cachedHash = null, this._cachedBundles = null), this.setOptions({
4455
- allowedLocales: n.allowedLocales,
4456
- preferredLocale: n.preferredLocale,
4457
- namespaces: n.namespaces
4458
- });
4459
- const r = await this.getCurrentBundles();
4460
- this.fluent !== null && (this.fluent.bundles = r), this._resolveReady && this._resolveReady(null);
4461
- }
4462
- initFluent() {
4463
- return es({ bundles: this.currentBundles });
4464
- }
4465
- determineLocale({
4466
- preferredLocale: t,
4467
- allowedLocales: n
4468
- }) {
4469
- if (t)
4470
- return t;
4471
- if (n && n.length > 0)
4472
- return n[0];
4473
- const r = this.getStoredLocale();
4474
- if (r)
4475
- return r;
4476
- const u = this.getBrowserLocale();
4477
- return u || this.fallbackLocale;
4478
- }
4479
- // TODO - use a local storage wrapper instead of window.localStorage
4480
- getStoredLocale() {
4481
- return localStorage.getItem(this.localStorageKey);
4482
- }
4483
- saveLocale(t) {
4484
- localStorage.setItem(this.localStorageKey, t);
4485
- }
4486
- getBrowserLocale() {
4487
- const t = navigator.languages;
4488
- return t.length > 0 ? t[0] : null;
4489
- }
4490
- get fluentPlugin() {
4491
- return this.fluent === null && (this.fluent = this.initFluent()), this.fluent;
4492
- }
4493
- get currentBundles() {
4494
- if (this._cachedBundles === null)
4495
- throw new Error(ns);
4496
- return this._cachedBundles;
4497
- }
4498
- // how about for now just attempt to load the primary and the fallback. I feel
4499
- // like doing more than that is probably not necessary in the forseeable
4500
- // future, but we could be a lot more discerning here based on what locales
4501
- // we support and so on.
4502
- get activeLocales() {
4503
- return !this.preferredLocale || this.preferredLocale === this.fallbackLocale ? [this.fallbackLocale] : [this.preferredLocale, this.fallbackLocale];
4504
- }
4505
- setOptions({
4506
- preferredLocale: t,
4507
- allowedLocales: n,
4508
- namespaces: r
4509
- }) {
4510
- n && this.setAllowedLocales(n), this.setPreferredLocale(
4511
- this.determineLocale({ allowedLocales: n, preferredLocale: t })
4512
- ), r && this.addNamespaces(r);
4513
- }
4514
- setPreferredLocale(t) {
4515
- this.preferredLocale = t;
4516
- const n = this.allowedLocales.indexOf(t);
4517
- n !== -1 && this.allowedLocales.splice(n, 1), this.allowedLocales.unshift(t), this.setCurrentLocaleProp(this.preferredLocale), this.saveLocale(t);
4518
- }
4519
- setAllowedLocales(t) {
4520
- this.allowedLocales = [...t], this.allowedLocales.includes(this.fallbackLocale) || this.allowedLocales.push(this.fallbackLocale);
4521
- }
4522
- addNamespaces(t) {
4523
- for (const n of t)
4524
- this.currentNamespaces.add(n);
4525
- }
4526
- async getCurrentBundles() {
4527
- if (this.currentNamespaces.size === 0)
4528
- throw new Error("no namespaces set!");
4529
- const t = this.activeLocales, n = [...this.currentNamespaces], r = this.hashState(t, n);
4530
- return this.getCachedBundles(r) ?? this.loadBundles(t, n);
4531
- }
4532
- async loadBundles(t, n) {
4533
- const r = await this.bundleSource.getBundles(t, n);
4534
- return this._cachedHash = this.hashState(t, n), this._cachedBundles = r, r;
4535
- }
4536
- getCachedBundles(t) {
4537
- return this._cachedBundles === null || this._cachedHash !== t ? null : this._cachedBundles;
4538
- }
4539
- hashState(t, n) {
4540
- return `${t}|${[...n].sort()}`;
4541
- }
4542
- }
4543
- const Ne = /^(-?[a-zA-Z][\w-]*) *= */gm, gn = /\.([a-zA-Z][\w-]*) *= */y, us = /\*?\[/y, Fe = /(-?[0-9]+(?:\.([0-9]+))?)/y, os = /([a-zA-Z][\w-]*)/y, mn = /([$-])?([a-zA-Z][\w-]*)(?:\.([a-zA-Z][\w-]*))?/y, ss = /^[A-Z][A-Z0-9_-]*$/, ge = /([^{}\n\r]+)/y, as = /([^\\"\n\r]*)/y, vn = /\\([\\"])/y, yn = /\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{6})/y, is = /^\n+/, An = / +$/, ls = / *\r?\n/g, cs = /( *)$/, fs = /{\s*/y, bn = /\s*}/y, ds = /\[\s*/y, _s = /\s*] */y, hs = /\s*\(\s*/y, Es = /\s*->\s*/y, ps = /\s*:\s*/y, gs = /\s*,?\s*/y, ms = /\s+/y;
4544
- class lr {
4545
- constructor(t) {
4546
- this.body = [], Ne.lastIndex = 0;
4547
- let n = 0;
4548
- for (; ; ) {
4549
- let d = Ne.exec(t);
4550
- if (d === null)
4551
- break;
4552
- n = Ne.lastIndex;
4553
- try {
4554
- this.body.push(f(d[1]));
4555
- } catch (y) {
4556
- if (y instanceof SyntaxError)
4557
- continue;
4558
- throw y;
4559
- }
4560
- }
4561
- function r(d) {
4562
- return d.lastIndex = n, d.test(t);
4563
- }
4564
- function u(d, y) {
4565
- if (t[n] === d)
4566
- return n++, !0;
4567
- if (y)
4568
- throw new y(`Expected ${d}`);
4569
- return !1;
4570
- }
4571
- function o(d, y) {
4572
- if (r(d))
4573
- return n = d.lastIndex, !0;
4574
- if (y)
4575
- throw new y(`Expected ${d.toString()}`);
4576
- return !1;
4577
- }
4578
- function s(d) {
4579
- d.lastIndex = n;
4580
- let y = d.exec(t);
4581
- if (y === null)
4582
- throw new SyntaxError(`Expected ${d.toString()}`);
4583
- return n = d.lastIndex, y;
4584
- }
4585
- function a(d) {
4586
- return s(d)[1];
4587
- }
4588
- function f(d) {
4589
- let y = A(), S = h();
4590
- if (y === null && Object.keys(S).length === 0)
4591
- throw new SyntaxError("Expected message value or attributes");
4592
- return { id: d, value: y, attributes: S };
4593
- }
4594
- function h() {
4595
- let d = /* @__PURE__ */ Object.create(null);
4596
- for (; r(gn); ) {
4597
- let y = a(gn), S = A();
4598
- if (S === null)
4599
- throw new SyntaxError("Expected attribute value");
4600
- d[y] = S;
4601
- }
4602
- return d;
4603
- }
4604
- function A() {
4605
- let d;
4606
- if (r(ge) && (d = a(ge)), t[n] === "{" || t[n] === "}")
4607
- return i(d ? [d] : [], 1 / 0);
4608
- let y = P();
4609
- return y ? d ? i([d, y], y.length) : (y.value = G(y.value, is), i([y], y.length)) : d ? G(d, An) : null;
4610
- }
4611
- function i(d = [], y) {
4612
- for (; ; ) {
4613
- if (r(ge)) {
4614
- d.push(a(ge));
4615
- continue;
4616
- }
4617
- if (t[n] === "{") {
4618
- d.push(E());
4619
- continue;
4620
- }
4621
- if (t[n] === "}")
4622
- throw new SyntaxError("Unbalanced closing brace");
4623
- let k = P();
4624
- if (k) {
4625
- d.push(k), y = Math.min(y, k.length);
4626
- continue;
4627
- }
4628
- break;
4629
- }
4630
- let S = d.length - 1, L = d[S];
4631
- typeof L == "string" && (d[S] = G(L, An));
4632
- let N = [];
4633
- for (let k of d)
4634
- k instanceof wn && (k = k.value.slice(0, k.value.length - y)), k && N.push(k);
4635
- return N;
4636
- }
4637
- function E() {
4638
- o(fs, SyntaxError);
4639
- let d = c();
4640
- if (o(bn))
4641
- return d;
4642
- if (o(Es)) {
4643
- let y = p();
4644
- return o(bn, SyntaxError), {
4645
- type: "select",
4646
- selector: d,
4647
- ...y
4648
- };
4649
- }
4650
- throw new SyntaxError("Unclosed placeable");
4651
- }
4652
- function c() {
4653
- if (t[n] === "{")
4654
- return E();
4655
- if (r(mn)) {
4656
- let [, d, y, S = null] = s(mn);
4657
- if (d === "$")
4658
- return { type: "var", name: y };
4659
- if (o(hs)) {
4660
- let L = _();
4661
- if (d === "-")
4662
- return { type: "term", name: y, attr: S, args: L };
4663
- if (ss.test(y))
4664
- return { type: "func", name: y, args: L };
4665
- throw new SyntaxError("Function names must be all upper-case");
4666
- }
4667
- return d === "-" ? {
4668
- type: "term",
4669
- name: y,
4670
- attr: S,
4671
- args: []
4672
- } : { type: "mesg", name: y, attr: S };
4673
- }
4674
- return O();
4675
- }
4676
- function _() {
4677
- let d = [];
4678
- for (; ; ) {
4679
- switch (t[n]) {
4680
- case ")":
4681
- return n++, d;
4682
- case void 0:
4683
- throw new SyntaxError("Unclosed argument list");
4684
- }
4685
- d.push(v()), o(gs);
4686
- }
4687
- }
4688
- function v() {
4689
- let d = c();
4690
- return d.type !== "mesg" ? d : o(ps) ? {
4691
- type: "narg",
4692
- name: d.name,
4693
- value: O()
4694
- } : d;
4695
- }
4696
- function p() {
4697
- let d = [], y = 0, S;
4698
- for (; r(us); ) {
4699
- u("*") && (S = y);
4700
- let L = g(), N = A();
4701
- if (N === null)
4702
- throw new SyntaxError("Expected variant value");
4703
- d[y++] = { key: L, value: N };
4704
- }
4705
- if (y === 0)
4706
- return null;
4707
- if (S === void 0)
4708
- throw new SyntaxError("Expected default variant");
4709
- return { variants: d, star: S };
4710
- }
4711
- function g() {
4712
- o(ds, SyntaxError);
4713
- let d;
4714
- return r(Fe) ? d = b() : d = {
4715
- type: "str",
4716
- value: a(os)
4717
- }, o(_s, SyntaxError), d;
4718
- }
4719
- function O() {
4720
- if (r(Fe))
4721
- return b();
4722
- if (t[n] === '"')
4723
- return I();
4724
- throw new SyntaxError("Invalid expression");
4725
- }
4726
- function b() {
4727
- let [, d, y = ""] = s(Fe), S = y.length;
4728
- return {
4729
- type: "num",
4730
- value: parseFloat(d),
4731
- precision: S
4732
- };
4733
- }
4734
- function I() {
4735
- u('"', SyntaxError);
4736
- let d = "";
4737
- for (; ; ) {
4738
- if (d += a(as), t[n] === "\\") {
4739
- d += z();
4740
- continue;
4741
- }
4742
- if (u('"'))
4743
- return { type: "str", value: d };
4744
- throw new SyntaxError("Unclosed string literal");
4745
- }
4746
- }
4747
- function z() {
4748
- if (r(vn))
4749
- return a(vn);
4750
- if (r(yn)) {
4751
- let [, d, y] = s(yn), S = parseInt(d || y, 16);
4752
- return S <= 55295 || 57344 <= S ? String.fromCodePoint(S) : "�";
4753
- }
4754
- throw new SyntaxError("Unknown escape sequence");
4755
- }
4756
- function P() {
4757
- let d = n;
4758
- switch (o(ms), t[n]) {
4759
- case ".":
4760
- case "[":
4761
- case "*":
4762
- case "}":
4763
- case void 0:
4764
- return !1;
4765
- case "{":
4766
- return H(t.slice(d, n));
4767
- }
4768
- return t[n - 1] === " " ? H(t.slice(d, n)) : !1;
4769
- }
4770
- function G(d, y) {
4771
- return d.replace(y, "");
4772
- }
4773
- function H(d) {
4774
- let y = d.replace(ls, `
4775
- `), S = cs.exec(d)[1].length;
4776
- return new wn(y, S);
4777
- }
4778
- }
4779
- }
4780
- class wn {
4781
- constructor(t, n) {
4782
- this.value = t, this.length = n;
4783
- }
4784
- }
4785
- const vs = (e, t) => fetch(`/locales/${e}`, t);
4786
- class Ss {
4787
- constructor(t) {
4788
- oe(this, "fetch");
4789
- oe(this, "resources", /* @__PURE__ */ new Map());
4790
- this.fetch = t.fetch ?? vs;
4791
- }
4792
- getKey(t, n) {
4793
- return `${n}/${t}`;
4794
- }
4795
- async getBundles(t, n) {
4796
- const r = [], u = [];
4797
- for (const o of t) {
4798
- const s = new Se(o);
4799
- r.push(s);
4800
- for (const a of n) {
4801
- const f = this.getKey(o, a), h = this.resources.get(f);
4802
- h ? s.addResource(h) : u.push([s, f, this.fetchResource(f)]);
4803
- }
4804
- }
4805
- return await this.awaitResources(u), r;
4806
- }
4807
- async awaitResources(t) {
4808
- for (const [n, r, u] of t) {
4809
- let o = null;
4810
- try {
4811
- o = await u;
4812
- } catch (s) {
4813
- console.warn(`exception while fetching resource for "${r}"`), console.error(s);
4814
- }
4815
- o === null ? console.warn(`couldn't load resource for "${r}"`) : n.addResource(o);
4816
- }
4817
- }
4818
- async fetchResource(t) {
4819
- const n = await this.fetch(t);
4820
- if (n.ok) {
4821
- const r = new lr(await n.text());
4822
- return this.resources.set(t, r), r;
4823
- } else
4824
- return console.warn(`could not load i18n for ${t}`), null;
4825
- }
4826
- }
4827
- class Ts {
4828
- constructor(t) {
4829
- oe(this, "bundles", /* @__PURE__ */ new Map());
4830
- oe(this, "keys", /* @__PURE__ */ new Set());
4831
- for (const [n, r, u] of t.resources) {
4832
- const o = this.getKey(n, r);
4833
- if (this.keys.has(o))
4834
- throw new Error(`${o} was provided more than once!`);
4835
- this.keys.add(o), this.getBundle(n).addResource(new lr(u));
4836
- }
4837
- }
4838
- // TODO - we should make a bundle source that handles this a little more
4839
- // elegantly, but for now this should be fine.
4840
- static async dynamicResources(t) {
4841
- const n = [];
4842
- for (const [r, u, o] of t)
4843
- if (typeof o == "string")
4844
- n.push([r, u, o]);
4845
- else {
4846
- const s = await o;
4847
- if (typeof s.default != "string")
4848
- throw new Error(".ftl text needs to be the default export!");
4849
- n.push([r, u, s.default]);
4850
- }
4851
- return n;
4852
- }
4853
- getBundle(t) {
4854
- if (this.bundles.has(t))
4855
- return this.bundles.get(t);
4856
- const n = new Se(t);
4857
- return this.bundles.set(t, n), n;
4858
- }
4859
- getKey(t, n) {
4860
- return `${n}/${t}`;
4861
- }
4862
- async getBundles(t, n) {
4863
- const r = [];
4864
- for (const u of t) {
4865
- for (const o of n) {
4866
- const s = this.getKey(u, o);
4867
- if (!this.keys.has(s))
4868
- throw new Error(`resource ${s} was not provided at init!`);
4869
- }
4870
- r.push(this.getBundle(u));
4871
- }
4872
- return r;
4873
- }
4874
- }
4875
- var ys = Object.defineProperty, As = (e, t, n) => t in e ? ys(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bs = (e, t, n) => (As(e, t + "", n), n);
4876
- const Cs = Symbol("GLOBAL_LOCALE_MANAGER");
4877
- class Is extends rs {
4878
- constructor() {
4879
- super(...arguments), bs(this, "currentLocaleProp", me.observable({ value: null }));
4880
- }
4881
- setCurrentLocaleProp(t) {
4882
- this.currentLocaleProp = me.observable({ value: t });
4883
- }
4884
- install() {
4885
- this.fluent === null && (this.fluent = this.initFluent()), me.prototype.$localeManager = this;
4886
- }
4887
- }
4888
- function Ds() {
4889
- const e = me.prototype.$localeManager;
4890
- if (!e)
4891
- throw new Error("LocaleManager not found!");
4892
- return {
4893
- currentLocale: e.currentLocaleProp.value,
4894
- setI18N: (t) => e.change(t),
4895
- $t: e.fluentFormat,
4896
- $ta: e.fluentFormatAttrs
4897
- };
4898
- }
4899
- export {
4900
- Cs as DEFAULT_INJECTION_KEY,
4901
- Ss as HTTPBundleSource,
4902
- Is as LocaleManager,
4903
- Ts as RawBundleSource,
4904
- Ds as useI18N
4905
- };
4906
- //# sourceMappingURL=i18n-vue2.js.map