xcstrings-cli 2.4.0 → 2.5.0

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 (2) hide show
  1. package/dist/index.js +288 -283
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,13 +2,13 @@
2
2
  import Nr from "yargs";
3
3
  import { hideBin as Rr } from "yargs/helpers";
4
4
  import { resolve as Oe, relative as we } from "node:path";
5
- import { cosmiconfig as Pr } from "cosmiconfig";
5
+ import { cosmiconfig as Mr } from "cosmiconfig";
6
6
  import De from "json5";
7
- import { select as Mr, checkbox as an, confirm as Dr } from "@inquirer/prompts";
8
- import k from "chalk";
7
+ import { select as Pr, checkbox as an, confirm as Dr } from "@inquirer/prompts";
8
+ import S from "chalk";
9
9
  import { readFile as $r, writeFile as Nn, readdir as Rn } from "node:fs/promises";
10
10
  import { XcodeProject as Br } from "@bacons/xcode";
11
- const Le = "xcstrings-cli", sn = Pr(Le, {
11
+ const Le = "xcstrings-cli", sn = Mr(Le, {
12
12
  searchPlaces: [
13
13
  `${Le}.json`,
14
14
  `${Le}.json5`
@@ -53,7 +53,7 @@ async function zr(e, n, r) {
53
53
  return typeof u == "string" ? u : u.path;
54
54
  }
55
55
  const s = i.map((u) => typeof u == "string" ? { name: u, value: u } : { name: `${u.alias} (${u.path})`, value: u.path });
56
- return await Mr({
56
+ return await Pr({
57
57
  message: "Select xcstrings file:",
58
58
  choices: s
59
59
  });
@@ -65,7 +65,7 @@ async function me(e) {
65
65
  const n = await $r(e, "utf-8");
66
66
  return JSON.parse(n);
67
67
  }
68
- async function Pn(e, n) {
68
+ async function Mn(e, n) {
69
69
  const r = JSON.stringify(n, null, 2), i = Ur(r);
70
70
  await Nn(e, i + `
71
71
  `, "utf-8");
@@ -124,51 +124,51 @@ function Hr() {
124
124
  return r;
125
125
  var u = i.length;
126
126
  if (u === 0) return r;
127
- for (var f = "", d = 1 - l, g = -1, v = r && r.length || 0, h = 0; h < v; ) {
128
- if (r.charCodeAt(h) === 37 && h + 1 < v) {
129
- switch (g = g > -1 ? g : 0, r.charCodeAt(h + 1)) {
127
+ for (var f = "", h = 1 - l, g = -1, y = r && r.length || 0, d = 0; d < y; ) {
128
+ if (r.charCodeAt(d) === 37 && d + 1 < y) {
129
+ switch (g = g > -1 ? g : 0, r.charCodeAt(d + 1)) {
130
130
  case 100:
131
131
  // 'd'
132
132
  case 102:
133
- if (d >= u || i[d] == null) break;
134
- g < h && (f += r.slice(g, h)), f += Number(i[d]), g = h + 2, h++;
133
+ if (h >= u || i[h] == null) break;
134
+ g < d && (f += r.slice(g, d)), f += Number(i[h]), g = d + 2, d++;
135
135
  break;
136
136
  case 105:
137
- if (d >= u || i[d] == null) break;
138
- g < h && (f += r.slice(g, h)), f += Math.floor(Number(i[d])), g = h + 2, h++;
137
+ if (h >= u || i[h] == null) break;
138
+ g < d && (f += r.slice(g, d)), f += Math.floor(Number(i[h])), g = d + 2, d++;
139
139
  break;
140
140
  case 79:
141
141
  // 'O'
142
142
  case 111:
143
143
  // 'o'
144
144
  case 106:
145
- if (d >= u || i[d] === void 0) break;
146
- g < h && (f += r.slice(g, h));
147
- var A = typeof i[d];
148
- if (A === "string") {
149
- f += "'" + i[d] + "'", g = h + 2, h++;
145
+ if (h >= u || i[h] === void 0) break;
146
+ g < d && (f += r.slice(g, d));
147
+ var b = typeof i[h];
148
+ if (b === "string") {
149
+ f += "'" + i[h] + "'", g = d + 2, d++;
150
150
  break;
151
151
  }
152
- if (A === "function") {
153
- f += i[d].name || "<anonymous>", g = h + 2, h++;
152
+ if (b === "function") {
153
+ f += i[h].name || "<anonymous>", g = d + 2, d++;
154
154
  break;
155
155
  }
156
- f += o(i[d]), g = h + 2, h++;
156
+ f += o(i[h]), g = d + 2, d++;
157
157
  break;
158
158
  case 115:
159
- if (d >= u)
159
+ if (h >= u)
160
160
  break;
161
- g < h && (f += r.slice(g, h)), f += String(i[d]), g = h + 2, h++;
161
+ g < d && (f += r.slice(g, d)), f += String(i[h]), g = d + 2, d++;
162
162
  break;
163
163
  case 37:
164
- g < h && (f += r.slice(g, h)), f += "%", g = h + 2, h++, d--;
164
+ g < d && (f += r.slice(g, d)), f += "%", g = d + 2, d++, h--;
165
165
  break;
166
166
  }
167
- ++d;
167
+ ++h;
168
168
  }
169
- ++h;
169
+ ++d;
170
170
  }
171
- return g === -1 ? r : (g < v && (f += r.slice(g)), f);
171
+ return g === -1 ? r : (g < y && (f += r.slice(g)), f);
172
172
  }
173
173
  return je;
174
174
  }
@@ -201,21 +201,21 @@ function Kr() {
201
201
  trace: "log"
202
202
  };
203
203
  function a(p, m) {
204
- const b = {
204
+ const A = {
205
205
  logger: m,
206
206
  parent: p[o]
207
207
  };
208
- m[o] = b;
208
+ m[o] = A;
209
209
  }
210
- function s(p, m, b) {
211
- const S = {};
210
+ function s(p, m, A) {
211
+ const k = {};
212
212
  m.forEach((E) => {
213
- S[E] = b[E] ? b[E] : n[E] || n[l[E] || "log"] || se;
214
- }), p[t] = S;
213
+ k[E] = A[E] ? A[E] : n[E] || n[l[E] || "log"] || se;
214
+ }), p[t] = k;
215
215
  }
216
216
  function c(p, m) {
217
- return Array.isArray(p) ? p.filter(function(S) {
218
- return S !== "!stdSerializers.err";
217
+ return Array.isArray(p) ? p.filter(function(k) {
218
+ return k !== "!stdSerializers.err";
219
219
  }) : p === !0 ? Object.keys(m) : !1;
220
220
  }
221
221
  function u(p) {
@@ -223,17 +223,17 @@ function Kr() {
223
223
  const m = p.browser.transmit;
224
224
  if (m && typeof m.send != "function")
225
225
  throw Error("pino: transmit option must have a send function");
226
- const b = p.browser.write || n;
226
+ const A = p.browser.write || n;
227
227
  p.browser.write && (p.browser.asObject = !0);
228
- const S = p.serializers || {}, E = c(p.browser.serialize, S);
228
+ const k = p.serializers || {}, E = c(p.browser.serialize, k);
229
229
  let B = p.browser.serialize;
230
230
  Array.isArray(p.browser.serialize) && p.browser.serialize.indexOf("!stdSerializers.err") > -1 && (B = !1);
231
231
  const K = Object.keys(p.customLevels || {}), O = ["error", "fatal", "warn", "info", "debug", "trace"].concat(K);
232
- typeof b == "function" && O.forEach(function(z) {
233
- b[z] = b;
232
+ typeof A == "function" && O.forEach(function(z) {
233
+ A[z] = A;
234
234
  }), (p.enabled === !1 || p.browser.disabled) && (p.level = "silent");
235
- const P = p.level || "info", w = Object.create(b);
236
- w.log || (w.log = se), s(w, O, b), a({}, w), Object.defineProperty(w, "levelVal", {
235
+ const M = p.level || "info", w = Object.create(A);
236
+ w.log || (w.log = se), s(w, O, A), a({}, w), Object.defineProperty(w, "levelVal", {
237
237
  get: ve
238
238
  }), Object.defineProperty(w, "level", {
239
239
  get: Z,
@@ -247,7 +247,7 @@ function Kr() {
247
247
  levels: O,
248
248
  timestamp: J(p)
249
249
  };
250
- w.levels = f(p), w.level = P, w.setMaxListeners = w.getMaxListeners = w.emit = w.addListener = w.on = w.prependListener = w.once = w.prependOnceListener = w.removeListener = w.removeAllListeners = w.listeners = w.listenerCount = w.eventNames = w.write = w.flush = se, w.serializers = S, w._serialize = E, w._stdErrSerialize = B, w.child = Ir, m && (w._logEvent = L());
250
+ w.levels = f(p), w.level = M, w.setMaxListeners = w.getMaxListeners = w.emit = w.addListener = w.on = w.prependListener = w.once = w.prependOnceListener = w.removeListener = w.removeAllListeners = w.listeners = w.listenerCount = w.eventNames = w.write = w.flush = se, w.serializers = k, w._serialize = E, w._stdErrSerialize = B, w.child = Ir, m && (w._logEvent = L());
251
251
  function ve() {
252
252
  return i(this.level, this);
253
253
  }
@@ -257,8 +257,8 @@ function Kr() {
257
257
  function jr(z) {
258
258
  if (z !== "silent" && !this.levels.values[z])
259
259
  throw Error("unknown level " + z);
260
- this._level = z, v(this, Y, w, "error"), v(this, Y, w, "fatal"), v(this, Y, w, "warn"), v(this, Y, w, "info"), v(this, Y, w, "debug"), v(this, Y, w, "trace"), K.forEach((ee) => {
261
- v(this, Y, w, ee);
260
+ this._level = z, y(this, Y, w, "error"), y(this, Y, w, "fatal"), y(this, Y, w, "warn"), y(this, Y, w, "info"), y(this, Y, w, "debug"), y(this, Y, w, "trace"), K.forEach((ee) => {
261
+ y(this, Y, w, ee);
262
262
  });
263
263
  }
264
264
  function Ir(z, ee) {
@@ -267,7 +267,7 @@ function Kr() {
267
267
  ee = ee || {}, E && z.serializers && (ee.serializers = z.serializers);
268
268
  const rn = ee.serializers;
269
269
  if (E && rn) {
270
- var xe = Object.assign({}, S, rn), tn = p.browser.serialize === !0 ? Object.keys(xe) : E;
270
+ var xe = Object.assign({}, k, rn), tn = p.browser.serialize === !0 ? Object.keys(xe) : E;
271
271
  delete z.serializers, x([z], tn, xe, this._stdErrSerialize);
272
272
  }
273
273
  function on(ln) {
@@ -282,16 +282,16 @@ function Kr() {
282
282
  return w;
283
283
  }
284
284
  function f(p) {
285
- const m = p.customLevels || {}, b = Object.assign({}, u.levels.values, m), S = Object.assign({}, u.levels.labels, d(m));
285
+ const m = p.customLevels || {}, A = Object.assign({}, u.levels.values, m), k = Object.assign({}, u.levels.labels, h(m));
286
286
  return {
287
- values: b,
288
- labels: S
287
+ values: A,
288
+ labels: k
289
289
  };
290
290
  }
291
- function d(p) {
291
+ function h(p) {
292
292
  const m = {};
293
- return Object.keys(p).forEach(function(b) {
294
- m[p[b]] = b;
293
+ return Object.keys(p).forEach(function(A) {
294
+ m[p[A]] = A;
295
295
  }), m;
296
296
  }
297
297
  u.levels = {
@@ -315,84 +315,84 @@ function Kr() {
315
315
  function g(p) {
316
316
  const m = [];
317
317
  p.bindings && m.push(p.bindings);
318
- let b = p[o];
319
- for (; b.parent; )
320
- b = b.parent, b.logger.bindings && m.push(b.logger.bindings);
318
+ let A = p[o];
319
+ for (; A.parent; )
320
+ A = A.parent, A.logger.bindings && m.push(A.logger.bindings);
321
321
  return m.reverse();
322
322
  }
323
- function v(p, m, b, S) {
324
- if (Object.defineProperty(p, S, {
325
- value: i(p.level, b) > i(S, b) ? se : b[t][S],
323
+ function y(p, m, A, k) {
324
+ if (Object.defineProperty(p, k, {
325
+ value: i(p.level, A) > i(k, A) ? se : A[t][k],
326
326
  writable: !0,
327
327
  enumerable: !0,
328
328
  configurable: !0
329
- }), !m.transmit && p[S] === se)
329
+ }), !m.transmit && p[k] === se)
330
330
  return;
331
- p[S] = A(p, m, b, S);
331
+ p[k] = b(p, m, A, k);
332
332
  const E = g(p);
333
- E.length !== 0 && (p[S] = h(E, p[S]));
333
+ E.length !== 0 && (p[k] = d(E, p[k]));
334
334
  }
335
- function h(p, m) {
335
+ function d(p, m) {
336
336
  return function() {
337
337
  return m.apply(this, [...p, ...arguments]);
338
338
  };
339
339
  }
340
- function A(p, m, b, S) {
340
+ function b(p, m, A, k) {
341
341
  return /* @__PURE__ */ (function(E) {
342
342
  return function() {
343
- const K = m.timestamp(), O = new Array(arguments.length), P = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
343
+ const K = m.timestamp(), O = new Array(arguments.length), M = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
344
344
  for (var w = 0; w < O.length; w++) O[w] = arguments[w];
345
- if (m.serialize && !m.asObject && x(O, this._serialize, this.serializers, this._stdErrSerialize), m.asObject || m.formatters ? E.call(P, C(this, S, O, K, m.formatters)) : E.apply(P, O), m.transmit) {
346
- const Y = m.transmit.level || p._level, ve = b.levels.values[Y], Z = b.levels.values[S];
345
+ if (m.serialize && !m.asObject && x(O, this._serialize, this.serializers, this._stdErrSerialize), m.asObject || m.formatters ? E.call(M, C(this, k, O, K, m.formatters)) : E.apply(M, O), m.transmit) {
346
+ const Y = m.transmit.level || p._level, ve = A.levels.values[Y], Z = A.levels.values[k];
347
347
  if (Z < ve) return;
348
348
  _(this, {
349
349
  ts: K,
350
- methodLevel: S,
350
+ methodLevel: k,
351
351
  methodValue: Z,
352
- transmitValue: b.levels.values[m.transmit.level || p._level],
352
+ transmitValue: A.levels.values[m.transmit.level || p._level],
353
353
  send: m.transmit.send,
354
- val: i(p._level, b)
354
+ val: i(p._level, A)
355
355
  }, O);
356
356
  }
357
357
  };
358
- })(p[t][S]);
358
+ })(p[t][k]);
359
359
  }
360
- function C(p, m, b, S, E = {}) {
360
+ function C(p, m, A, k, E = {}) {
361
361
  const {
362
362
  level: B = () => p.levels.values[m],
363
363
  log: K = (Z) => Z
364
364
  } = E;
365
- p._serialize && x(b, p._serialize, p.serializers, p._stdErrSerialize);
366
- const O = b.slice();
367
- let P = O[0];
365
+ p._serialize && x(A, p._serialize, p.serializers, p._stdErrSerialize);
366
+ const O = A.slice();
367
+ let M = O[0];
368
368
  const w = {};
369
- S && (w.time = S), w.level = B(m, p.levels.values[m]);
369
+ k && (w.time = k), w.level = B(m, p.levels.values[m]);
370
370
  let Y = (p._childLevel | 0) + 1;
371
- if (Y < 1 && (Y = 1), P !== null && typeof P == "object") {
371
+ if (Y < 1 && (Y = 1), M !== null && typeof M == "object") {
372
372
  for (; Y-- && typeof O[0] == "object"; )
373
373
  Object.assign(w, O.shift());
374
- P = O.length ? e(O.shift(), O) : void 0;
375
- } else typeof P == "string" && (P = e(O.shift(), O));
376
- return P !== void 0 && (w.msg = P), K(w);
374
+ M = O.length ? e(O.shift(), O) : void 0;
375
+ } else typeof M == "string" && (M = e(O.shift(), O));
376
+ return M !== void 0 && (w.msg = M), K(w);
377
377
  }
378
- function x(p, m, b, S) {
378
+ function x(p, m, A, k) {
379
379
  for (const E in p)
380
- if (S && p[E] instanceof Error)
380
+ if (k && p[E] instanceof Error)
381
381
  p[E] = u.stdSerializers.err(p[E]);
382
382
  else if (typeof p[E] == "object" && !Array.isArray(p[E]))
383
383
  for (const B in p[E])
384
- m && m.indexOf(B) > -1 && B in b && (p[E][B] = b[B](p[E][B]));
384
+ m && m.indexOf(B) > -1 && B in A && (p[E][B] = A[B](p[E][B]));
385
385
  }
386
- function _(p, m, b) {
387
- const S = m.send, E = m.ts, B = m.methodLevel, K = m.methodValue, O = m.val, P = p._logEvent.bindings;
386
+ function _(p, m, A) {
387
+ const k = m.send, E = m.ts, B = m.methodLevel, K = m.methodValue, O = m.val, M = p._logEvent.bindings;
388
388
  x(
389
- b,
389
+ A,
390
390
  p._serialize || Object.keys(p.serializers),
391
391
  p.serializers,
392
392
  p._stdErrSerialize === void 0 ? !0 : p._stdErrSerialize
393
- ), p._logEvent.ts = E, p._logEvent.messages = b.filter(function(w) {
394
- return P.indexOf(w) === -1;
395
- }), p._logEvent.level.label = B, p._logEvent.level.value = K, S(B, p._logEvent, O), p._logEvent = L(P);
393
+ ), p._logEvent.ts = E, p._logEvent.messages = A.filter(function(w) {
394
+ return M.indexOf(w) === -1;
395
+ }), p._logEvent.level.label = B, p._logEvent.level.value = K, k(B, p._logEvent, O), p._logEvent = L(M);
396
396
  }
397
397
  function L(p) {
398
398
  return {
@@ -408,8 +408,8 @@ function Kr() {
408
408
  msg: p.message,
409
409
  stack: p.stack
410
410
  };
411
- for (const b in p)
412
- m[b] === void 0 && (m[b] = p[b]);
411
+ for (const A in p)
412
+ m[A] === void 0 && (m[A] = p[A]);
413
413
  return m;
414
414
  }
415
415
  function J(p) {
@@ -461,7 +461,7 @@ function Gr() {
461
461
  command: "languages",
462
462
  describe: "List supported languages from xcodeproj or xcstrings",
463
463
  handler: async (e) => {
464
- const n = await Mn(e.path, e.config);
464
+ const n = await Pn(e.path, e.config);
465
465
  X.info(n.join(" "));
466
466
  }
467
467
  };
@@ -483,7 +483,7 @@ async function Xr(e) {
483
483
  }
484
484
  return Array.from(r).sort();
485
485
  }
486
- async function Mn(e, n) {
486
+ async function Pn(e, n) {
487
487
  const { sourceLanguage: r } = await me(e);
488
488
  if (!r)
489
489
  throw new Error('The xcstrings file is missing "sourceLanguage".');
@@ -545,7 +545,7 @@ fe.prototype.constructor = fe;
545
545
  fe.prototype.toString = function(n) {
546
546
  return this.name + ": " + $n(this, n);
547
547
  };
548
- var M = fe;
548
+ var P = fe;
549
549
  function Ie(e, n, r, i, t) {
550
550
  var o = "", l = "", a = Math.floor(t / 2) - 1;
551
551
  return i - n > a && (o = " ... ", n = i - a + o.length), r - i > a && (l = " ...", r = i + a - l.length), {
@@ -613,13 +613,13 @@ function pi(e) {
613
613
  function di(e, n) {
614
614
  if (n = n || {}, Object.keys(n).forEach(function(r) {
615
615
  if (ui.indexOf(r) === -1)
616
- throw new M('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
616
+ throw new P('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
617
617
  }), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
618
618
  return !0;
619
619
  }, this.construct = n.construct || function(r) {
620
620
  return r;
621
621
  }, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = pi(n.styleAliases || null), fi.indexOf(this.kind) === -1)
622
- throw new M('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
622
+ throw new P('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
623
623
  }
624
624
  var j = di;
625
625
  function pn(e, n) {
@@ -663,17 +663,17 @@ Be.prototype.extend = function(n) {
663
663
  else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
664
664
  n.implicit && (r = r.concat(n.implicit)), n.explicit && (i = i.concat(n.explicit));
665
665
  else
666
- throw new M("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
666
+ throw new P("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
667
667
  r.forEach(function(o) {
668
668
  if (!(o instanceof j))
669
- throw new M("Specified list of YAML types (or a single Type object) contains a non-Type object.");
669
+ throw new P("Specified list of YAML types (or a single Type object) contains a non-Type object.");
670
670
  if (o.loadKind && o.loadKind !== "scalar")
671
- throw new M("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
671
+ throw new P("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
672
672
  if (o.multi)
673
- throw new M("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
673
+ throw new P("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
674
674
  }), i.forEach(function(o) {
675
675
  if (!(o instanceof j))
676
- throw new M("Specified list of YAML types (or a single Type object) contains a non-Type object.");
676
+ throw new P("Specified list of YAML types (or a single Type object) contains a non-Type object.");
677
677
  });
678
678
  var t = Object.create(Be.prototype);
679
679
  return t.implicit = (this.implicit || []).concat(r), t.explicit = (this.explicit || []).concat(i), t.compiledImplicit = pn(t, "implicit"), t.compiledExplicit = pn(t, "explicit"), t.compiledTypeMap = hi(t.compiledImplicit, t.compiledExplicit), t;
@@ -773,7 +773,7 @@ function Ai(e) {
773
773
  function Ci(e) {
774
774
  return 48 <= e && e <= 57;
775
775
  }
776
- function ki(e) {
776
+ function Si(e) {
777
777
  if (e === null) return !1;
778
778
  var n = e.length, r = 0, i = !1, t;
779
779
  if (!n) return !1;
@@ -813,7 +813,7 @@ function ki(e) {
813
813
  }
814
814
  return !(!i || t === "_");
815
815
  }
816
- function Si(e) {
816
+ function ki(e) {
817
817
  var n = e, r = 1, i;
818
818
  if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), i = n[0], (i === "-" || i === "+") && (i === "-" && (r = -1), n = n.slice(1), i = n[0]), n === "0") return 0;
819
819
  if (i === "0") {
@@ -828,8 +828,8 @@ function Ei(e) {
828
828
  }
829
829
  var qn = new j("tag:yaml.org,2002:int", {
830
830
  kind: "scalar",
831
- resolve: ki,
832
- construct: Si,
831
+ resolve: Si,
832
+ construct: ki,
833
833
  predicate: Ei,
834
834
  represent: {
835
835
  binary: function(e) {
@@ -926,7 +926,7 @@ function Ii(e) {
926
926
  return e === null ? !1 : Qn.exec(e) !== null || Jn.exec(e) !== null;
927
927
  }
928
928
  function Ni(e) {
929
- var n, r, i, t, o, l, a, s = 0, c = null, u, f, d;
929
+ var n, r, i, t, o, l, a, s = 0, c = null, u, f, h;
930
930
  if (n = Qn.exec(e), n === null && (n = Jn.exec(e)), n === null) throw new Error("Date resolve error");
931
931
  if (r = +n[1], i = +n[2] - 1, t = +n[3], !n[4])
932
932
  return new Date(Date.UTC(r, i, t));
@@ -935,7 +935,7 @@ function Ni(e) {
935
935
  s += "0";
936
936
  s = +s;
937
937
  }
938
- return n[9] && (u = +n[10], f = +(n[11] || 0), c = (u * 60 + f) * 6e4, n[9] === "-" && (c = -c)), d = new Date(Date.UTC(r, i, t, o, l, a, s)), c && d.setTime(d.getTime() - c), d;
938
+ return n[9] && (u = +n[10], f = +(n[11] || 0), c = (u * 60 + f) * 6e4, n[9] === "-" && (c = -c)), h = new Date(Date.UTC(r, i, t, o, l, a, s)), c && h.setTime(h.getTime() - c), h;
939
939
  }
940
940
  function Ri(e) {
941
941
  return e.toISOString();
@@ -947,15 +947,15 @@ var Zn = new j("tag:yaml.org,2002:timestamp", {
947
947
  instanceOf: Date,
948
948
  represent: Ri
949
949
  });
950
- function Pi(e) {
950
+ function Mi(e) {
951
951
  return e === "<<" || e === null;
952
952
  }
953
953
  var er = new j("tag:yaml.org,2002:merge", {
954
954
  kind: "scalar",
955
- resolve: Pi
955
+ resolve: Mi
956
956
  }), qe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
957
957
  \r`;
958
- function Mi(e) {
958
+ function Pi(e) {
959
959
  if (e === null) return !1;
960
960
  var n, r, i = 0, t = e.length, o = qe;
961
961
  for (r = 0; r < t; r++)
@@ -982,7 +982,7 @@ function Bi(e) {
982
982
  }
983
983
  var nr = new j("tag:yaml.org,2002:binary", {
984
984
  kind: "scalar",
985
- resolve: Mi,
985
+ resolve: Pi,
986
986
  construct: Di,
987
987
  predicate: Bi,
988
988
  represent: $i
@@ -1057,7 +1057,7 @@ var tr = new j("tag:yaml.org,2002:set", {
1057
1057
  ir,
1058
1058
  tr
1059
1059
  ]
1060
- }), G = Object.prototype.hasOwnProperty, Ce = 1, or = 2, lr = 3, ke = 4, Re = 1, Qi = 2, dn = 3, Ji = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Zi = /[\x85\u2028\u2029]/, et = /[,\[\]\{\}]/, ar = /^(?:!|!!|![a-z\-]+!)$/i, sr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1060
+ }), G = Object.prototype.hasOwnProperty, Ce = 1, or = 2, lr = 3, Se = 4, Re = 1, Qi = 2, dn = 3, Ji = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Zi = /[\x85\u2028\u2029]/, et = /[,\[\]\{\}]/, ar = /^(?:!|!!|![a-z\-]+!)$/i, sr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1061
1061
  function hn(e) {
1062
1062
  return Object.prototype.toString.call(e);
1063
1063
  }
@@ -1116,26 +1116,26 @@ function pr(e, n) {
1116
1116
  line: e.line,
1117
1117
  column: e.position - e.lineStart
1118
1118
  };
1119
- return r.snippet = ci(r), new M(n, r);
1119
+ return r.snippet = ci(r), new P(n, r);
1120
1120
  }
1121
- function y(e, n) {
1121
+ function v(e, n) {
1122
1122
  throw pr(e, n);
1123
1123
  }
1124
- function Se(e, n) {
1124
+ function ke(e, n) {
1125
1125
  e.onWarning && e.onWarning.call(null, pr(e, n));
1126
1126
  }
1127
1127
  var mn = {
1128
1128
  YAML: function(n, r, i) {
1129
1129
  var t, o, l;
1130
- n.version !== null && y(n, "duplication of %YAML directive"), i.length !== 1 && y(n, "YAML directive accepts exactly one argument"), t = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), t === null && y(n, "ill-formed argument of the YAML directive"), o = parseInt(t[1], 10), l = parseInt(t[2], 10), o !== 1 && y(n, "unacceptable YAML version of the document"), n.version = i[0], n.checkLineBreaks = l < 2, l !== 1 && l !== 2 && Se(n, "unsupported YAML version of the document");
1130
+ n.version !== null && v(n, "duplication of %YAML directive"), i.length !== 1 && v(n, "YAML directive accepts exactly one argument"), t = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), t === null && v(n, "ill-formed argument of the YAML directive"), o = parseInt(t[1], 10), l = parseInt(t[2], 10), o !== 1 && v(n, "unacceptable YAML version of the document"), n.version = i[0], n.checkLineBreaks = l < 2, l !== 1 && l !== 2 && ke(n, "unsupported YAML version of the document");
1131
1131
  },
1132
1132
  TAG: function(n, r, i) {
1133
1133
  var t, o;
1134
- i.length !== 2 && y(n, "TAG directive accepts exactly two arguments"), t = i[0], o = i[1], ar.test(t) || y(n, "ill-formed tag handle (first argument) of the TAG directive"), G.call(n.tagMap, t) && y(n, 'there is a previously declared suffix for "' + t + '" tag handle'), sr.test(o) || y(n, "ill-formed tag prefix (second argument) of the TAG directive");
1134
+ i.length !== 2 && v(n, "TAG directive accepts exactly two arguments"), t = i[0], o = i[1], ar.test(t) || v(n, "ill-formed tag handle (first argument) of the TAG directive"), G.call(n.tagMap, t) && v(n, 'there is a previously declared suffix for "' + t + '" tag handle'), sr.test(o) || v(n, "ill-formed tag prefix (second argument) of the TAG directive");
1135
1135
  try {
1136
1136
  o = decodeURIComponent(o);
1137
1137
  } catch {
1138
- y(n, "tag prefix is malformed: " + o);
1138
+ v(n, "tag prefix is malformed: " + o);
1139
1139
  }
1140
1140
  n.tagMap[t] = o;
1141
1141
  }
@@ -1145,21 +1145,21 @@ function q(e, n, r, i) {
1145
1145
  if (n < r) {
1146
1146
  if (a = e.input.slice(n, r), i)
1147
1147
  for (t = 0, o = a.length; t < o; t += 1)
1148
- l = a.charCodeAt(t), l === 9 || 32 <= l && l <= 1114111 || y(e, "expected valid JSON character");
1149
- else Ji.test(a) && y(e, "the stream contains non-printable characters");
1148
+ l = a.charCodeAt(t), l === 9 || 32 <= l && l <= 1114111 || v(e, "expected valid JSON character");
1149
+ else Ji.test(a) && v(e, "the stream contains non-printable characters");
1150
1150
  e.result += a;
1151
1151
  }
1152
1152
  }
1153
1153
  function yn(e, n, r, i) {
1154
1154
  var t, o, l, a;
1155
- for (T.isObject(r) || y(e, "cannot merge mappings; the provided source object is unacceptable"), t = Object.keys(r), l = 0, a = t.length; l < a; l += 1)
1155
+ for (T.isObject(r) || v(e, "cannot merge mappings; the provided source object is unacceptable"), t = Object.keys(r), l = 0, a = t.length; l < a; l += 1)
1156
1156
  o = t[l], G.call(n, o) || (cr(n, o, r[o]), i[o] = !0);
1157
1157
  }
1158
1158
  function te(e, n, r, i, t, o, l, a, s) {
1159
1159
  var c, u;
1160
1160
  if (Array.isArray(t))
1161
1161
  for (t = Array.prototype.slice.call(t), c = 0, u = t.length; c < u; c += 1)
1162
- Array.isArray(t[c]) && y(e, "nested arrays are not supported inside keys"), typeof t == "object" && hn(t[c]) === "[object Object]" && (t[c] = "[object Object]");
1162
+ Array.isArray(t[c]) && v(e, "nested arrays are not supported inside keys"), typeof t == "object" && hn(t[c]) === "[object Object]" && (t[c] = "[object Object]");
1163
1163
  if (typeof t == "object" && hn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge")
1164
1164
  if (Array.isArray(o))
1165
1165
  for (c = 0, u = o.length; c < u; c += 1)
@@ -1167,12 +1167,12 @@ function te(e, n, r, i, t, o, l, a, s) {
1167
1167
  else
1168
1168
  yn(e, n, o, r);
1169
1169
  else
1170
- !e.json && !G.call(r, t) && G.call(n, t) && (e.line = l || e.line, e.lineStart = a || e.lineStart, e.position = s || e.position, y(e, "duplicated mapping key")), cr(n, t, o), delete r[t];
1170
+ !e.json && !G.call(r, t) && G.call(n, t) && (e.line = l || e.line, e.lineStart = a || e.lineStart, e.position = s || e.position, v(e, "duplicated mapping key")), cr(n, t, o), delete r[t];
1171
1171
  return n;
1172
1172
  }
1173
1173
  function Ve(e) {
1174
1174
  var n;
1175
- n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : y(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
1175
+ n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : v(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
1176
1176
  }
1177
1177
  function F(e, n, r) {
1178
1178
  for (var i = 0, t = e.input.charCodeAt(e.position); t !== 0; ) {
@@ -1188,7 +1188,7 @@ function F(e, n, r) {
1188
1188
  else
1189
1189
  break;
1190
1190
  }
1191
- return r !== -1 && i !== 0 && e.lineIndent < r && Se(e, "deficient indentation"), i;
1191
+ return r !== -1 && i !== 0 && e.lineIndent < r && ke(e, "deficient indentation"), i;
1192
1192
  }
1193
1193
  function Fe(e) {
1194
1194
  var n = e.position, r;
@@ -1199,7 +1199,7 @@ function Xe(e, n) {
1199
1199
  `, n - 1));
1200
1200
  }
1201
1201
  function lt(e, n, r) {
1202
- var i, t, o, l, a, s, c, u, f = e.kind, d = e.result, g;
1202
+ var i, t, o, l, a, s, c, u, f = e.kind, h = e.result, g;
1203
1203
  if (g = e.input.charCodeAt(e.position), U(g) || ie(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (t = e.input.charCodeAt(e.position + 1), U(t) || r && ie(t)))
1204
1204
  return !1;
1205
1205
  for (e.kind = "scalar", e.result = "", o = l = e.position, a = !1; g !== 0; ) {
@@ -1223,7 +1223,7 @@ function lt(e, n, r) {
1223
1223
  }
1224
1224
  a && (q(e, o, l, !1), Xe(e, e.line - s), o = l = e.position, a = !1), Q(g) || (l = e.position + 1), g = e.input.charCodeAt(++e.position);
1225
1225
  }
1226
- return q(e, o, l, !1), e.result ? !0 : (e.kind = f, e.result = d, !1);
1226
+ return q(e, o, l, !1), e.result ? !0 : (e.kind = f, e.result = h, !1);
1227
1227
  }
1228
1228
  function at(e, n) {
1229
1229
  var r, i, t;
@@ -1235,8 +1235,8 @@ function at(e, n) {
1235
1235
  i = e.position, e.position++, t = e.position;
1236
1236
  else
1237
1237
  return !0;
1238
- else H(r) ? (q(e, i, t, !0), Xe(e, F(e, !1, n)), i = t = e.position) : e.position === e.lineStart && Fe(e) ? y(e, "unexpected end of the document within a single quoted scalar") : (e.position++, t = e.position);
1239
- y(e, "unexpected end of the stream within a single quoted scalar");
1238
+ else H(r) ? (q(e, i, t, !0), Xe(e, F(e, !1, n)), i = t = e.position) : e.position === e.lineStart && Fe(e) ? v(e, "unexpected end of the document within a single quoted scalar") : (e.position++, t = e.position);
1239
+ v(e, "unexpected end of the stream within a single quoted scalar");
1240
1240
  }
1241
1241
  function st(e, n) {
1242
1242
  var r, i, t, o, l, a;
@@ -1252,17 +1252,17 @@ function st(e, n) {
1252
1252
  e.result += fr[a], e.position++;
1253
1253
  else if ((l = rt(a)) > 0) {
1254
1254
  for (t = l, o = 0; t > 0; t--)
1255
- a = e.input.charCodeAt(++e.position), (l = nt(a)) >= 0 ? o = (o << 4) + l : y(e, "expected hexadecimal character");
1255
+ a = e.input.charCodeAt(++e.position), (l = nt(a)) >= 0 ? o = (o << 4) + l : v(e, "expected hexadecimal character");
1256
1256
  e.result += tt(o), e.position++;
1257
1257
  } else
1258
- y(e, "unknown escape sequence");
1258
+ v(e, "unknown escape sequence");
1259
1259
  r = i = e.position;
1260
- } else H(a) ? (q(e, r, i, !0), Xe(e, F(e, !1, n)), r = i = e.position) : e.position === e.lineStart && Fe(e) ? y(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
1260
+ } else H(a) ? (q(e, r, i, !0), Xe(e, F(e, !1, n)), r = i = e.position) : e.position === e.lineStart && Fe(e) ? v(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
1261
1261
  }
1262
- y(e, "unexpected end of the stream within a double quoted scalar");
1262
+ v(e, "unexpected end of the stream within a double quoted scalar");
1263
1263
  }
1264
1264
  function ct(e, n) {
1265
- var r = !0, i, t, o, l = e.tag, a, s = e.anchor, c, u, f, d, g, v = /* @__PURE__ */ Object.create(null), h, A, C, x;
1265
+ var r = !0, i, t, o, l = e.tag, a, s = e.anchor, c, u, f, h, g, y = /* @__PURE__ */ Object.create(null), d, b, C, x;
1266
1266
  if (x = e.input.charCodeAt(e.position), x === 91)
1267
1267
  u = 93, g = !1, a = [];
1268
1268
  else if (x === 123)
@@ -1272,9 +1272,9 @@ function ct(e, n) {
1272
1272
  for (e.anchor !== null && (e.anchorMap[e.anchor] = a), x = e.input.charCodeAt(++e.position); x !== 0; ) {
1273
1273
  if (F(e, !0, n), x = e.input.charCodeAt(e.position), x === u)
1274
1274
  return e.position++, e.tag = l, e.anchor = s, e.kind = g ? "mapping" : "sequence", e.result = a, !0;
1275
- r ? x === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), A = h = C = null, f = d = !1, x === 63 && (c = e.input.charCodeAt(e.position + 1), U(c) && (f = d = !0, e.position++, F(e, !0, n))), i = e.line, t = e.lineStart, o = e.position, oe(e, n, Ce, !1, !0), A = e.tag, h = e.result, F(e, !0, n), x = e.input.charCodeAt(e.position), (d || e.line === i) && x === 58 && (f = !0, x = e.input.charCodeAt(++e.position), F(e, !0, n), oe(e, n, Ce, !1, !0), C = e.result), g ? te(e, a, v, A, h, C, i, t, o) : f ? a.push(te(e, null, v, A, h, C, i, t, o)) : a.push(h), F(e, !0, n), x = e.input.charCodeAt(e.position), x === 44 ? (r = !0, x = e.input.charCodeAt(++e.position)) : r = !1;
1275
+ r ? x === 44 && v(e, "expected the node content, but found ','") : v(e, "missed comma between flow collection entries"), b = d = C = null, f = h = !1, x === 63 && (c = e.input.charCodeAt(e.position + 1), U(c) && (f = h = !0, e.position++, F(e, !0, n))), i = e.line, t = e.lineStart, o = e.position, oe(e, n, Ce, !1, !0), b = e.tag, d = e.result, F(e, !0, n), x = e.input.charCodeAt(e.position), (h || e.line === i) && x === 58 && (f = !0, x = e.input.charCodeAt(++e.position), F(e, !0, n), oe(e, n, Ce, !1, !0), C = e.result), g ? te(e, a, y, b, d, C, i, t, o) : f ? a.push(te(e, null, y, b, d, C, i, t, o)) : a.push(d), F(e, !0, n), x = e.input.charCodeAt(e.position), x === 44 ? (r = !0, x = e.input.charCodeAt(++e.position)) : r = !1;
1276
1276
  }
1277
- y(e, "unexpected end of the stream within a flow collection");
1277
+ v(e, "unexpected end of the stream within a flow collection");
1278
1278
  }
1279
1279
  function ut(e, n) {
1280
1280
  var r, i, t = Re, o = !1, l = !1, a = n, s = 0, c = !1, u, f;
@@ -1286,9 +1286,9 @@ function ut(e, n) {
1286
1286
  return !1;
1287
1287
  for (e.kind = "scalar", e.result = ""; f !== 0; )
1288
1288
  if (f = e.input.charCodeAt(++e.position), f === 43 || f === 45)
1289
- Re === t ? t = f === 43 ? dn : Qi : y(e, "repeat of a chomping mode identifier");
1289
+ Re === t ? t = f === 43 ? dn : Qi : v(e, "repeat of a chomping mode identifier");
1290
1290
  else if ((u = it(f)) >= 0)
1291
- u === 0 ? y(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : l ? y(e, "repeat of an indentation width identifier") : (a = n + u - 1, l = !0);
1291
+ u === 0 ? v(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : l ? v(e, "repeat of an indentation width identifier") : (a = n + u - 1, l = !0);
1292
1292
  else
1293
1293
  break;
1294
1294
  if (Q(f)) {
@@ -1326,24 +1326,24 @@ function ut(e, n) {
1326
1326
  function vn(e, n) {
1327
1327
  var r, i = e.tag, t = e.anchor, o = [], l, a = !1, s;
1328
1328
  if (e.firstTabInLine !== -1) return !1;
1329
- for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(s !== 45 || (l = e.input.charCodeAt(e.position + 1), !U(l)))); ) {
1329
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, v(e, "tab characters must not be used in indentation")), !(s !== 45 || (l = e.input.charCodeAt(e.position + 1), !U(l)))); ) {
1330
1330
  if (a = !0, e.position++, F(e, !0, -1) && e.lineIndent <= n) {
1331
1331
  o.push(null), s = e.input.charCodeAt(e.position);
1332
1332
  continue;
1333
1333
  }
1334
1334
  if (r = e.line, oe(e, n, lr, !1, !0), o.push(e.result), F(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && s !== 0)
1335
- y(e, "bad indentation of a sequence entry");
1335
+ v(e, "bad indentation of a sequence entry");
1336
1336
  else if (e.lineIndent < n)
1337
1337
  break;
1338
1338
  }
1339
1339
  return a ? (e.tag = i, e.anchor = t, e.kind = "sequence", e.result = o, !0) : !1;
1340
1340
  }
1341
1341
  function ft(e, n, r) {
1342
- var i, t, o, l, a, s, c = e.tag, u = e.anchor, f = {}, d = /* @__PURE__ */ Object.create(null), g = null, v = null, h = null, A = !1, C = !1, x;
1342
+ var i, t, o, l, a, s, c = e.tag, u = e.anchor, f = {}, h = /* @__PURE__ */ Object.create(null), g = null, y = null, d = null, b = !1, C = !1, x;
1343
1343
  if (e.firstTabInLine !== -1) return !1;
1344
1344
  for (e.anchor !== null && (e.anchorMap[e.anchor] = f), x = e.input.charCodeAt(e.position); x !== 0; ) {
1345
- if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (x === 63 || x === 58) && U(i))
1346
- x === 63 ? (A && (te(e, f, d, g, v, null, l, a, s), g = v = h = null), C = !0, A = !0, t = !0) : A ? (A = !1, t = !0) : y(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
1345
+ if (!b && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, v(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (x === 63 || x === 58) && U(i))
1346
+ x === 63 ? (b && (te(e, f, h, g, y, null, l, a, s), g = y = d = null), C = !0, b = !0, t = !0) : b ? (b = !1, t = !0) : v(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
1347
1347
  else {
1348
1348
  if (l = e.line, a = e.lineStart, s = e.position, !oe(e, r, or, !1, !0))
1349
1349
  break;
@@ -1351,81 +1351,81 @@ function ft(e, n, r) {
1351
1351
  for (x = e.input.charCodeAt(e.position); Q(x); )
1352
1352
  x = e.input.charCodeAt(++e.position);
1353
1353
  if (x === 58)
1354
- x = e.input.charCodeAt(++e.position), U(x) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (te(e, f, d, g, v, null, l, a, s), g = v = h = null), C = !0, A = !1, t = !1, g = e.tag, v = e.result;
1354
+ x = e.input.charCodeAt(++e.position), U(x) || v(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (te(e, f, h, g, y, null, l, a, s), g = y = d = null), C = !0, b = !1, t = !1, g = e.tag, y = e.result;
1355
1355
  else if (C)
1356
- y(e, "can not read an implicit mapping pair; a colon is missed");
1356
+ v(e, "can not read an implicit mapping pair; a colon is missed");
1357
1357
  else
1358
1358
  return e.tag = c, e.anchor = u, !0;
1359
1359
  } else if (C)
1360
- y(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1360
+ v(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1361
1361
  else
1362
1362
  return e.tag = c, e.anchor = u, !0;
1363
1363
  }
1364
- if ((e.line === o || e.lineIndent > n) && (A && (l = e.line, a = e.lineStart, s = e.position), oe(e, n, ke, !0, t) && (A ? v = e.result : h = e.result), A || (te(e, f, d, g, v, h, l, a, s), g = v = h = null), F(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && x !== 0)
1365
- y(e, "bad indentation of a mapping entry");
1364
+ if ((e.line === o || e.lineIndent > n) && (b && (l = e.line, a = e.lineStart, s = e.position), oe(e, n, Se, !0, t) && (b ? y = e.result : d = e.result), b || (te(e, f, h, g, y, d, l, a, s), g = y = d = null), F(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && x !== 0)
1365
+ v(e, "bad indentation of a mapping entry");
1366
1366
  else if (e.lineIndent < n)
1367
1367
  break;
1368
1368
  }
1369
- return A && te(e, f, d, g, v, null, l, a, s), C && (e.tag = c, e.anchor = u, e.kind = "mapping", e.result = f), C;
1369
+ return b && te(e, f, h, g, y, null, l, a, s), C && (e.tag = c, e.anchor = u, e.kind = "mapping", e.result = f), C;
1370
1370
  }
1371
1371
  function pt(e) {
1372
1372
  var n, r = !1, i = !1, t, o, l;
1373
1373
  if (l = e.input.charCodeAt(e.position), l !== 33) return !1;
1374
- if (e.tag !== null && y(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (r = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (i = !0, t = "!!", l = e.input.charCodeAt(++e.position)) : t = "!", n = e.position, r) {
1374
+ if (e.tag !== null && v(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (r = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (i = !0, t = "!!", l = e.input.charCodeAt(++e.position)) : t = "!", n = e.position, r) {
1375
1375
  do
1376
1376
  l = e.input.charCodeAt(++e.position);
1377
1377
  while (l !== 0 && l !== 62);
1378
- e.position < e.length ? (o = e.input.slice(n, e.position), l = e.input.charCodeAt(++e.position)) : y(e, "unexpected end of the stream within a verbatim tag");
1378
+ e.position < e.length ? (o = e.input.slice(n, e.position), l = e.input.charCodeAt(++e.position)) : v(e, "unexpected end of the stream within a verbatim tag");
1379
1379
  } else {
1380
1380
  for (; l !== 0 && !U(l); )
1381
- l === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), ar.test(t) || y(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), l = e.input.charCodeAt(++e.position);
1382
- o = e.input.slice(n, e.position), et.test(o) && y(e, "tag suffix cannot contain flow indicator characters");
1381
+ l === 33 && (i ? v(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), ar.test(t) || v(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), l = e.input.charCodeAt(++e.position);
1382
+ o = e.input.slice(n, e.position), et.test(o) && v(e, "tag suffix cannot contain flow indicator characters");
1383
1383
  }
1384
- o && !sr.test(o) && y(e, "tag name cannot contain such characters: " + o);
1384
+ o && !sr.test(o) && v(e, "tag name cannot contain such characters: " + o);
1385
1385
  try {
1386
1386
  o = decodeURIComponent(o);
1387
1387
  } catch {
1388
- y(e, "tag name is malformed: " + o);
1388
+ v(e, "tag name is malformed: " + o);
1389
1389
  }
1390
- return r ? e.tag = o : G.call(e.tagMap, t) ? e.tag = e.tagMap[t] + o : t === "!" ? e.tag = "!" + o : t === "!!" ? e.tag = "tag:yaml.org,2002:" + o : y(e, 'undeclared tag handle "' + t + '"'), !0;
1390
+ return r ? e.tag = o : G.call(e.tagMap, t) ? e.tag = e.tagMap[t] + o : t === "!" ? e.tag = "!" + o : t === "!!" ? e.tag = "tag:yaml.org,2002:" + o : v(e, 'undeclared tag handle "' + t + '"'), !0;
1391
1391
  }
1392
1392
  function dt(e) {
1393
1393
  var n, r;
1394
1394
  if (r = e.input.charCodeAt(e.position), r !== 38) return !1;
1395
- for (e.anchor !== null && y(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !U(r) && !ie(r); )
1395
+ for (e.anchor !== null && v(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !U(r) && !ie(r); )
1396
1396
  r = e.input.charCodeAt(++e.position);
1397
- return e.position === n && y(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
1397
+ return e.position === n && v(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0;
1398
1398
  }
1399
1399
  function ht(e) {
1400
1400
  var n, r, i;
1401
1401
  if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
1402
1402
  for (i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !U(i) && !ie(i); )
1403
1403
  i = e.input.charCodeAt(++e.position);
1404
- return e.position === n && y(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), G.call(e.anchorMap, r) || y(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], F(e, !0, -1), !0;
1404
+ return e.position === n && v(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), G.call(e.anchorMap, r) || v(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], F(e, !0, -1), !0;
1405
1405
  }
1406
1406
  function oe(e, n, r, i, t) {
1407
- var o, l, a, s = 1, c = !1, u = !1, f, d, g, v, h, A;
1408
- if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = l = a = ke === r || lr === r, i && F(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
1407
+ var o, l, a, s = 1, c = !1, u = !1, f, h, g, y, d, b;
1408
+ if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = l = a = Se === r || lr === r, i && F(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
1409
1409
  for (; pt(e) || dt(e); )
1410
1410
  F(e, !0, -1) ? (c = !0, a = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : a = !1;
1411
- if (a && (a = c || t), (s === 1 || ke === r) && (Ce === r || or === r ? h = n : h = n + 1, A = e.position - e.lineStart, s === 1 ? a && (vn(e, A) || ft(e, A, h)) || ct(e, h) ? u = !0 : (l && ut(e, h) || at(e, h) || st(e, h) ? u = !0 : ht(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : lt(e, h, Ce === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (u = a && vn(e, A))), e.tag === null)
1411
+ if (a && (a = c || t), (s === 1 || Se === r) && (Ce === r || or === r ? d = n : d = n + 1, b = e.position - e.lineStart, s === 1 ? a && (vn(e, b) || ft(e, b, d)) || ct(e, d) ? u = !0 : (l && ut(e, d) || at(e, d) || st(e, d) ? u = !0 : ht(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && v(e, "alias node should not have any properties")) : lt(e, d, Ce === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (u = a && vn(e, b))), e.tag === null)
1412
1412
  e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1413
1413
  else if (e.tag === "?") {
1414
- for (e.result !== null && e.kind !== "scalar" && y(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), f = 0, d = e.implicitTypes.length; f < d; f += 1)
1415
- if (v = e.implicitTypes[f], v.resolve(e.result)) {
1416
- e.result = v.construct(e.result), e.tag = v.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1414
+ for (e.result !== null && e.kind !== "scalar" && v(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), f = 0, h = e.implicitTypes.length; f < h; f += 1)
1415
+ if (y = e.implicitTypes[f], y.resolve(e.result)) {
1416
+ e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1417
1417
  break;
1418
1418
  }
1419
1419
  } else if (e.tag !== "!") {
1420
1420
  if (G.call(e.typeMap[e.kind || "fallback"], e.tag))
1421
- v = e.typeMap[e.kind || "fallback"][e.tag];
1421
+ y = e.typeMap[e.kind || "fallback"][e.tag];
1422
1422
  else
1423
- for (v = null, g = e.typeMap.multi[e.kind || "fallback"], f = 0, d = g.length; f < d; f += 1)
1423
+ for (y = null, g = e.typeMap.multi[e.kind || "fallback"], f = 0, h = g.length; f < h; f += 1)
1424
1424
  if (e.tag.slice(0, g[f].tag.length) === g[f].tag) {
1425
- v = g[f];
1425
+ y = g[f];
1426
1426
  break;
1427
1427
  }
1428
- v || y(e, "unknown tag !<" + e.tag + ">"), e.result !== null && v.kind !== e.kind && y(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + v.kind + '", not "' + e.kind + '"'), v.resolve(e.result, e.tag) ? (e.result = v.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : y(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1428
+ y || v(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && v(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : v(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
1429
1429
  }
1430
1430
  return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
1431
1431
  }
@@ -1434,7 +1434,7 @@ function gt(e) {
1434
1434
  for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (l = e.input.charCodeAt(e.position)) !== 0 && (F(e, !0, -1), l = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || l !== 37)); ) {
1435
1435
  for (o = !0, l = e.input.charCodeAt(++e.position), r = e.position; l !== 0 && !U(l); )
1436
1436
  l = e.input.charCodeAt(++e.position);
1437
- for (i = e.input.slice(r, e.position), t = [], i.length < 1 && y(e, "directive name must not be less than one character in length"); l !== 0; ) {
1437
+ for (i = e.input.slice(r, e.position), t = [], i.length < 1 && v(e, "directive name must not be less than one character in length"); l !== 0; ) {
1438
1438
  for (; Q(l); )
1439
1439
  l = e.input.charCodeAt(++e.position);
1440
1440
  if (l === 35) {
@@ -1448,14 +1448,14 @@ function gt(e) {
1448
1448
  l = e.input.charCodeAt(++e.position);
1449
1449
  t.push(e.input.slice(r, e.position));
1450
1450
  }
1451
- l !== 0 && Ve(e), G.call(mn, i) ? mn[i](e, i, t) : Se(e, 'unknown document directive "' + i + '"');
1451
+ l !== 0 && Ve(e), G.call(mn, i) ? mn[i](e, i, t) : ke(e, 'unknown document directive "' + i + '"');
1452
1452
  }
1453
- if (F(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, F(e, !0, -1)) : o && y(e, "directives end mark is expected"), oe(e, e.lineIndent - 1, ke, !1, !0), F(e, !0, -1), e.checkLineBreaks && Zi.test(e.input.slice(n, e.position)) && Se(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Fe(e)) {
1453
+ if (F(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, F(e, !0, -1)) : o && v(e, "directives end mark is expected"), oe(e, e.lineIndent - 1, Se, !1, !0), F(e, !0, -1), e.checkLineBreaks && Zi.test(e.input.slice(n, e.position)) && ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Fe(e)) {
1454
1454
  e.input.charCodeAt(e.position) === 46 && (e.position += 3, F(e, !0, -1));
1455
1455
  return;
1456
1456
  }
1457
1457
  if (e.position < e.length - 1)
1458
- y(e, "end of the stream or a document separator is expected");
1458
+ v(e, "end of the stream or a document separator is expected");
1459
1459
  else
1460
1460
  return;
1461
1461
  }
@@ -1463,7 +1463,7 @@ function dr(e, n) {
1463
1463
  e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
1464
1464
  `), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
1465
1465
  var r = new ot(e, n), i = e.indexOf("\0");
1466
- for (i !== -1 && (r.position = i, y(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
1466
+ for (i !== -1 && (r.position = i, v(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
1467
1467
  r.lineIndent += 1, r.position += 1;
1468
1468
  for (; r.position < r.length - 1; )
1469
1469
  gt(r);
@@ -1482,13 +1482,13 @@ function yt(e, n) {
1482
1482
  if (r.length !== 0) {
1483
1483
  if (r.length === 1)
1484
1484
  return r[0];
1485
- throw new M("expected a single document in the stream, but found more");
1485
+ throw new P("expected a single document in the stream, but found more");
1486
1486
  }
1487
1487
  }
1488
1488
  var vt = mt, xt = yt, hr = {
1489
1489
  loadAll: vt,
1490
1490
  load: xt
1491
- }, gr = Object.prototype.toString, mr = Object.prototype.hasOwnProperty, Qe = 65279, wt = 9, pe = 10, bt = 13, At = 32, Ct = 33, kt = 34, ze = 35, St = 37, Et = 38, _t = 39, Ot = 42, yr = 44, Ft = 45, Ee = 58, Tt = 61, Lt = 62, jt = 63, It = 64, vr = 91, xr = 93, Nt = 96, wr = 123, Rt = 124, br = 125, N = {};
1491
+ }, gr = Object.prototype.toString, mr = Object.prototype.hasOwnProperty, Qe = 65279, wt = 9, pe = 10, bt = 13, At = 32, Ct = 33, St = 34, ze = 35, kt = 37, Et = 38, _t = 39, Ot = 42, yr = 44, Ft = 45, Ee = 58, Tt = 61, Lt = 62, jt = 63, It = 64, vr = 91, xr = 93, Nt = 96, wr = 123, Rt = 124, br = 125, N = {};
1492
1492
  N[0] = "\\0";
1493
1493
  N[7] = "\\a";
1494
1494
  N[8] = "\\b";
@@ -1504,7 +1504,7 @@ N[133] = "\\N";
1504
1504
  N[160] = "\\_";
1505
1505
  N[8232] = "\\L";
1506
1506
  N[8233] = "\\P";
1507
- var Pt = [
1507
+ var Mt = [
1508
1508
  "y",
1509
1509
  "Y",
1510
1510
  "yes",
@@ -1521,7 +1521,7 @@ var Pt = [
1521
1521
  "off",
1522
1522
  "Off",
1523
1523
  "OFF"
1524
- ], Mt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1524
+ ], Pt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1525
1525
  function Dt(e, n) {
1526
1526
  var r, i, t, o, l, a, s;
1527
1527
  if (n === null) return {};
@@ -1538,7 +1538,7 @@ function $t(e) {
1538
1538
  else if (e <= 4294967295)
1539
1539
  r = "U", i = 8;
1540
1540
  else
1541
- throw new M("code point within a string may not be greater than 0xFFFFFFFF");
1541
+ throw new P("code point within a string may not be greater than 0xFFFFFFFF");
1542
1542
  return "\\" + r + T.repeat("0", i - n.length) + n;
1543
1543
  }
1544
1544
  var Bt = 1, de = 2;
@@ -1583,7 +1583,7 @@ function bn(e, n, r) {
1583
1583
  );
1584
1584
  }
1585
1585
  function Yt(e) {
1586
- return he(e) && e !== Qe && !_e(e) && e !== Ft && e !== jt && e !== Ee && e !== yr && e !== vr && e !== xr && e !== wr && e !== br && e !== ze && e !== Et && e !== Ot && e !== Ct && e !== Rt && e !== Tt && e !== Lt && e !== _t && e !== kt && e !== St && e !== It && e !== Nt;
1586
+ return he(e) && e !== Qe && !_e(e) && e !== Ft && e !== jt && e !== Ee && e !== yr && e !== vr && e !== xr && e !== wr && e !== br && e !== ze && e !== Et && e !== Ot && e !== Ct && e !== Rt && e !== Tt && e !== Lt && e !== _t && e !== St && e !== kt && e !== It && e !== Nt;
1587
1587
  }
1588
1588
  function Ht(e) {
1589
1589
  return !_e(e) && e !== Ee;
@@ -1596,33 +1596,33 @@ function Ar(e) {
1596
1596
  var n = /^\n* /;
1597
1597
  return n.test(e);
1598
1598
  }
1599
- var Cr = 1, Ye = 2, kr = 3, Sr = 4, re = 5;
1599
+ var Cr = 1, Ye = 2, Sr = 3, kr = 4, re = 5;
1600
1600
  function Kt(e, n, r, i, t, o, l, a) {
1601
- var s, c = 0, u = null, f = !1, d = !1, g = i !== -1, v = -1, h = Yt(ue(e, 0)) && Ht(ue(e, e.length - 1));
1601
+ var s, c = 0, u = null, f = !1, h = !1, g = i !== -1, y = -1, d = Yt(ue(e, 0)) && Ht(ue(e, e.length - 1));
1602
1602
  if (n || l)
1603
1603
  for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1604
1604
  if (c = ue(e, s), !he(c))
1605
1605
  return re;
1606
- h = h && bn(c, u, a), u = c;
1606
+ d = d && bn(c, u, a), u = c;
1607
1607
  }
1608
1608
  else {
1609
1609
  for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1610
1610
  if (c = ue(e, s), c === pe)
1611
- f = !0, g && (d = d || // Foldable line = too long, and not more-indented.
1612
- s - v - 1 > i && e[v + 1] !== " ", v = s);
1611
+ f = !0, g && (h = h || // Foldable line = too long, and not more-indented.
1612
+ s - y - 1 > i && e[y + 1] !== " ", y = s);
1613
1613
  else if (!he(c))
1614
1614
  return re;
1615
- h = h && bn(c, u, a), u = c;
1615
+ d = d && bn(c, u, a), u = c;
1616
1616
  }
1617
- d = d || g && s - v - 1 > i && e[v + 1] !== " ";
1617
+ h = h || g && s - y - 1 > i && e[y + 1] !== " ";
1618
1618
  }
1619
- return !f && !d ? h && !l && !t(e) ? Cr : o === de ? re : Ye : r > 9 && Ar(e) ? re : l ? o === de ? re : Ye : d ? Sr : kr;
1619
+ return !f && !h ? d && !l && !t(e) ? Cr : o === de ? re : Ye : r > 9 && Ar(e) ? re : l ? o === de ? re : Ye : h ? kr : Sr;
1620
1620
  }
1621
1621
  function Wt(e, n, r, i, t) {
1622
1622
  e.dump = (function() {
1623
1623
  if (n.length === 0)
1624
1624
  return e.quotingType === de ? '""' : "''";
1625
- if (!e.noCompatMode && (Pt.indexOf(n) !== -1 || Mt.test(n)))
1625
+ if (!e.noCompatMode && (Mt.indexOf(n) !== -1 || Pt.test(n)))
1626
1626
  return e.quotingType === de ? '"' + n + '"' : "'" + n + "'";
1627
1627
  var o = e.indent * Math.max(1, r), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), a = i || e.flowLevel > -1 && r >= e.flowLevel;
1628
1628
  function s(c) {
@@ -1642,14 +1642,14 @@ function Wt(e, n, r, i, t) {
1642
1642
  return n;
1643
1643
  case Ye:
1644
1644
  return "'" + n.replace(/'/g, "''") + "'";
1645
- case kr:
1646
- return "|" + An(n, e.indent) + Cn(xn(n, o));
1647
1645
  case Sr:
1646
+ return "|" + An(n, e.indent) + Cn(xn(n, o));
1647
+ case kr:
1648
1648
  return ">" + An(n, e.indent) + Cn(xn(qt(n, l), o));
1649
1649
  case re:
1650
1650
  return '"' + Gt(n) + '"';
1651
1651
  default:
1652
- throw new M("impossible error: invalid scalar style");
1652
+ throw new P("impossible error: invalid scalar style");
1653
1653
  }
1654
1654
  })();
1655
1655
  }
@@ -1669,16 +1669,16 @@ function qt(e, n) {
1669
1669
  for (var r = /(\n+)([^\n]*)/g, i = (function() {
1670
1670
  var c = e.indexOf(`
1671
1671
  `);
1672
- return c = c !== -1 ? c : e.length, r.lastIndex = c, kn(e.slice(0, c), n);
1672
+ return c = c !== -1 ? c : e.length, r.lastIndex = c, Sn(e.slice(0, c), n);
1673
1673
  })(), t = e[0] === `
1674
1674
  ` || e[0] === " ", o, l; l = r.exec(e); ) {
1675
1675
  var a = l[1], s = l[2];
1676
1676
  o = s[0] === " ", i += a + (!t && !o && s !== "" ? `
1677
- ` : "") + kn(s, n), t = o;
1677
+ ` : "") + Sn(s, n), t = o;
1678
1678
  }
1679
1679
  return i;
1680
1680
  }
1681
- function kn(e, n) {
1681
+ function Sn(e, n) {
1682
1682
  if (e === "" || e[0] === " ") return e;
1683
1683
  for (var r = / [^ ]/g, i, t = 0, o, l = 0, a = 0, s = ""; i = r.exec(e); )
1684
1684
  a = i.index, a - t > n && (o = l > t ? l : a, s += `
@@ -1698,7 +1698,7 @@ function Vt(e, n, r) {
1698
1698
  a = r[o], e.replacer && (a = e.replacer.call(r, String(o), a)), (W(e, n, a, !1, !1) || typeof a > "u" && W(e, n, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
1699
1699
  e.tag = t, e.dump = "[" + i + "]";
1700
1700
  }
1701
- function Sn(e, n, r, i) {
1701
+ function kn(e, n, r, i) {
1702
1702
  var t = "", o = e.tag, l, a, s;
1703
1703
  for (l = 0, a = r.length; l < a; l += 1)
1704
1704
  s = r[l], e.replacer && (s = e.replacer.call(r, String(l), s)), (W(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && W(e, n + 1, null, !0, !0, !1, !0)) && ((!i || t !== "") && (t += Ue(e, n)), e.dump && pe === e.dump.charCodeAt(0) ? t += "-" : t += "- ", t += e.dump);
@@ -1711,15 +1711,15 @@ function Xt(e, n, r) {
1711
1711
  e.tag = t, e.dump = "{" + i + "}";
1712
1712
  }
1713
1713
  function Qt(e, n, r, i) {
1714
- var t = "", o = e.tag, l = Object.keys(r), a, s, c, u, f, d;
1714
+ var t = "", o = e.tag, l = Object.keys(r), a, s, c, u, f, h;
1715
1715
  if (e.sortKeys === !0)
1716
1716
  l.sort();
1717
1717
  else if (typeof e.sortKeys == "function")
1718
1718
  l.sort(e.sortKeys);
1719
1719
  else if (e.sortKeys)
1720
- throw new M("sortKeys must be a boolean or a function");
1720
+ throw new P("sortKeys must be a boolean or a function");
1721
1721
  for (a = 0, s = l.length; a < s; a += 1)
1722
- d = "", (!i || t !== "") && (d += Ue(e, n)), c = l[a], u = r[c], e.replacer && (u = e.replacer.call(r, c, u)), W(e, n + 1, c, !0, !0, !0) && (f = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, f && (e.dump && pe === e.dump.charCodeAt(0) ? d += "?" : d += "? "), d += e.dump, f && (d += Ue(e, n)), W(e, n + 1, u, !0, f) && (e.dump && pe === e.dump.charCodeAt(0) ? d += ":" : d += ": ", d += e.dump, t += d));
1722
+ h = "", (!i || t !== "") && (h += Ue(e, n)), c = l[a], u = r[c], e.replacer && (u = e.replacer.call(r, c, u)), W(e, n + 1, c, !0, !0, !0) && (f = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, f && (e.dump && pe === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, f && (h += Ue(e, n)), W(e, n + 1, u, !0, f) && (e.dump && pe === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, t += h));
1723
1723
  e.tag = o, e.dump = t || "{}";
1724
1724
  }
1725
1725
  function En(e, n, r) {
@@ -1732,7 +1732,7 @@ function En(e, n, r) {
1732
1732
  else if (mr.call(a.represent, s))
1733
1733
  i = a.represent[s](n, s);
1734
1734
  else
1735
- throw new M("!<" + a.tag + '> tag resolver accepts not "' + s + '" style');
1735
+ throw new P("!<" + a.tag + '> tag resolver accepts not "' + s + '" style');
1736
1736
  e.dump = i;
1737
1737
  }
1738
1738
  return !0;
@@ -1743,21 +1743,21 @@ function W(e, n, r, i, t, o, l) {
1743
1743
  e.tag = null, e.dump = r, En(e, r, !1) || En(e, r, !0);
1744
1744
  var a = gr.call(e.dump), s = i, c;
1745
1745
  i && (i = e.flowLevel < 0 || e.flowLevel > n);
1746
- var u = a === "[object Object]" || a === "[object Array]", f, d;
1747
- if (u && (f = e.duplicates.indexOf(r), d = f !== -1), (e.tag !== null && e.tag !== "?" || d || e.indent !== 2 && n > 0) && (t = !1), d && e.usedDuplicates[f])
1746
+ var u = a === "[object Object]" || a === "[object Array]", f, h;
1747
+ if (u && (f = e.duplicates.indexOf(r), h = f !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && n > 0) && (t = !1), h && e.usedDuplicates[f])
1748
1748
  e.dump = "*ref_" + f;
1749
1749
  else {
1750
- if (u && d && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), a === "[object Object]")
1751
- i && Object.keys(e.dump).length !== 0 ? (Qt(e, n, e.dump, t), d && (e.dump = "&ref_" + f + e.dump)) : (Xt(e, n, e.dump), d && (e.dump = "&ref_" + f + " " + e.dump));
1750
+ if (u && h && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), a === "[object Object]")
1751
+ i && Object.keys(e.dump).length !== 0 ? (Qt(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (Xt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
1752
1752
  else if (a === "[object Array]")
1753
- i && e.dump.length !== 0 ? (e.noArrayIndent && !l && n > 0 ? Sn(e, n - 1, e.dump, t) : Sn(e, n, e.dump, t), d && (e.dump = "&ref_" + f + e.dump)) : (Vt(e, n, e.dump), d && (e.dump = "&ref_" + f + " " + e.dump));
1753
+ i && e.dump.length !== 0 ? (e.noArrayIndent && !l && n > 0 ? kn(e, n - 1, e.dump, t) : kn(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (Vt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
1754
1754
  else if (a === "[object String]")
1755
1755
  e.tag !== "?" && Wt(e, e.dump, n, o, s);
1756
1756
  else {
1757
1757
  if (a === "[object Undefined]")
1758
1758
  return !1;
1759
1759
  if (e.skipInvalid) return !1;
1760
- throw new M("unacceptable kind of an object to dump " + a);
1760
+ throw new P("unacceptable kind of an object to dump " + a);
1761
1761
  }
1762
1762
  e.tag !== null && e.tag !== "?" && (c = encodeURI(
1763
1763
  e.tag[0] === "!" ? e.tag.slice(1) : e.tag
@@ -1799,7 +1799,7 @@ function Je(e, n) {
1799
1799
  throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
1800
1800
  };
1801
1801
  }
1802
- var ro = j, io = Bn, to = Hn, oo = Vn, lo = Xn, ao = Ge, so = hr.load, co = hr.loadAll, uo = no.dump, fo = M, po = {
1802
+ var ro = j, io = Bn, to = Hn, oo = Vn, lo = Xn, ao = Ge, so = hr.load, co = hr.loadAll, uo = no.dump, fo = P, po = {
1803
1803
  binary: nr,
1804
1804
  float: Gn,
1805
1805
  map: Yn,
@@ -1978,7 +1978,7 @@ async function Co(e, n = Er, r = "auto") {
1978
1978
  return i(t);
1979
1979
  }
1980
1980
  }
1981
- async function ko({
1981
+ async function So({
1982
1982
  path: e,
1983
1983
  key: n,
1984
1984
  comment: r,
@@ -1994,18 +1994,18 @@ async function ko({
1994
1994
  if (u?.kind === "multi") {
1995
1995
  if (n || r || o !== void 0 || l)
1996
1996
  throw new Error("When adding multiple strings via --strings payload, omit --key, --comment, --text, and --language.");
1997
- const h = [];
1998
- for (const [A, C] of Object.entries(u.entries))
1999
- await On(e, A, C.comment, C.translations, s, void 0, void 0, f), h.push(A);
2000
- return { kind: "multi", keys: h };
1997
+ const d = [];
1998
+ for (const [b, C] of Object.entries(u.entries))
1999
+ await On(e, b, C.comment, C.translations, s, void 0, void 0, f), d.push(b);
2000
+ return { kind: "multi", keys: d };
2001
2001
  }
2002
- const d = n;
2003
- if (!d)
2002
+ const h = n;
2003
+ if (!h)
2004
2004
  throw new Error("--key is required unless the --strings payload contains multiple keys.");
2005
- const g = u?.kind === "single" ? u.translations : void 0, v = u?.kind === "single" ? u.comment : void 0;
2006
- return await On(e, d, r ?? v, g, s, o, l, f), { kind: "single", keys: [d] };
2005
+ const g = u?.kind === "single" ? u.translations : void 0, y = u?.kind === "single" ? u.comment : void 0;
2006
+ return await On(e, h, r ?? y, g, s, o, l, f), { kind: "single", keys: [h] };
2007
2007
  }
2008
- function So() {
2008
+ function ko() {
2009
2009
  return {
2010
2010
  command: "add",
2011
2011
  describe: "Add a string",
@@ -2037,7 +2037,7 @@ function So() {
2037
2037
  describe: "Format for the data provided with --strings"
2038
2038
  }),
2039
2039
  handler: async (e) => {
2040
- const n = await ko({
2040
+ const n = await So({
2041
2041
  path: e.path,
2042
2042
  key: e.key,
2043
2043
  comment: e.comment,
@@ -2049,7 +2049,7 @@ function So() {
2049
2049
  stdinReader: void 0,
2050
2050
  configPath: e.config
2051
2051
  });
2052
- X.info(k.green(`✓ Added keys:
2052
+ X.info(S.green(`✓ Added keys:
2053
2053
  ${n.keys.map((r) => `- ${r}`).join(`
2054
2054
  `)}`));
2055
2055
  }
@@ -2062,28 +2062,28 @@ async function On(e, n, r, i, t, o, l, a) {
2062
2062
  const c = s.sourceLanguage;
2063
2063
  s.strings || (s.strings = {});
2064
2064
  const f = (await We(t))?.missingLanguagePolicy || "skip";
2065
- let d;
2066
- const g = async (_) => f === "include" ? !0 : (d || (d = await Mn(e, t)), d.includes(_)), v = (_) => {
2065
+ let h;
2066
+ const g = async (_) => f === "include" ? !0 : (h || (h = await Pn(e, t)), h.includes(_)), y = (_) => {
2067
2067
  X.warn(`Language "${_}" is not supported. Skipped adding its translation (missingLanguagePolicy=skip).`);
2068
- }, h = {
2068
+ }, d = {
2069
2069
  ...s.strings[n],
2070
2070
  extractionState: "manual"
2071
2071
  };
2072
- r && (h.comment = r);
2073
- const A = a ?? "translated", C = (_) => {
2072
+ r && (d.comment = r);
2073
+ const b = a ?? "translated", C = (_) => {
2074
2074
  if (_ !== void 0)
2075
2075
  return typeof _ == "string" ? { value: _ } : _;
2076
2076
  };
2077
2077
  if (o !== void 0) {
2078
2078
  const _ = l ?? c;
2079
2079
  if (!await g(_))
2080
- v(_);
2080
+ y(_);
2081
2081
  else {
2082
- h.localizations = h.localizations || {};
2082
+ d.localizations = d.localizations || {};
2083
2083
  const L = C(i?.[_]);
2084
- h.localizations[_] = {
2084
+ d.localizations[_] = {
2085
2085
  stringUnit: {
2086
- state: L?.state ?? A,
2086
+ state: L?.state ?? b,
2087
2087
  value: o
2088
2088
  }
2089
2089
  };
@@ -2099,20 +2099,20 @@ async function On(e, n, r, i, t, o, l, a) {
2099
2099
  const I = C(R);
2100
2100
  I && _.push([L, I]);
2101
2101
  } else
2102
- v(L);
2102
+ y(L);
2103
2103
  }
2104
2104
  if (_.length > 0) {
2105
- h.localizations = h.localizations || {};
2105
+ d.localizations = d.localizations || {};
2106
2106
  for (const [L, R] of _)
2107
- h.localizations[L] = {
2107
+ d.localizations[L] = {
2108
2108
  stringUnit: {
2109
- state: R.state ?? A,
2109
+ state: R.state ?? b,
2110
2110
  value: R.value
2111
2111
  }
2112
2112
  };
2113
2113
  }
2114
2114
  }
2115
- s.strings[n] = h, await Pn(e, s);
2115
+ s.strings[n] = d, await Mn(e, s);
2116
2116
  }
2117
2117
  function Eo() {
2118
2118
  return {
@@ -2146,11 +2146,11 @@ function Eo() {
2146
2146
  ), r = Object.entries(n).map(([i, t]) => `- [${t.join(" ")}] ${i}`).join(`
2147
2147
  `);
2148
2148
  if (e.dryRun) {
2149
- r.length === 0 ? X.info(k.yellow("No matching strings found.")) : X.info(k.blue(`Would remove:
2149
+ r.length === 0 ? X.info(S.yellow("No matching strings found.")) : X.info(S.blue(`Would remove:
2150
2150
  ${r}`));
2151
2151
  return;
2152
2152
  }
2153
- r.length === 0 ? X.info(k.yellow("No matching strings found.")) : X.info(k.green(`✓ Removed
2153
+ r.length === 0 ? X.info(S.yellow("No matching strings found.")) : X.info(S.green(`✓ Removed
2154
2154
  ${r}`));
2155
2155
  }
2156
2156
  };
@@ -2180,9 +2180,9 @@ async function Oo(e, n, r, i = !1) {
2180
2180
  const f = o[c]?.length ?? 0;
2181
2181
  !(u.localizations && Object.keys(u.localizations).length > 0) && f > 0 && (i || delete l[c]), f > 0 && (s = !0);
2182
2182
  }
2183
- return !i && s && await Pn(e, t), o;
2183
+ return !i && s && await Mn(e, t), o;
2184
2184
  }
2185
- const Pe = "xcstrings-cli.json5";
2185
+ const Me = "xcstrings-cli.json5";
2186
2186
  function Fo() {
2187
2187
  return {
2188
2188
  command: "init",
@@ -2219,45 +2219,45 @@ async function Lo(e) {
2219
2219
  }
2220
2220
  async function jo() {
2221
2221
  const e = process.cwd();
2222
- console.log(), console.log(k.bold.cyan("🚀 xcstrings-cli Configuration Setup")), console.log(k.dim("─".repeat(40))), console.log(), console.log(k.yellow("🔍 Searching for .xcstrings files..."));
2222
+ console.log(), console.log(S.bold.cyan("🚀 xcstrings-cli Configuration Setup")), console.log(S.dim("─".repeat(40))), console.log(), console.log(S.yellow("🔍 Searching for .xcstrings files..."));
2223
2223
  const n = await To(e);
2224
- console.log(k.yellow("🔍 Searching for .xcodeproj directories..."));
2224
+ console.log(S.yellow("🔍 Searching for .xcodeproj directories..."));
2225
2225
  const r = await Lo(e);
2226
2226
  console.log();
2227
2227
  let i = [];
2228
2228
  if (n.length > 0) {
2229
- console.log(k.green(`✓ Found ${n.length} .xcstrings file(s)`)), console.log();
2229
+ console.log(S.green(`✓ Found ${n.length} .xcstrings file(s)`)), console.log();
2230
2230
  const c = n.map((u) => ({
2231
- name: k.white(we(e, u)) + k.dim(` (${u})`),
2231
+ name: S.white(we(e, u)) + S.dim(` (${u})`),
2232
2232
  value: we(e, u),
2233
2233
  checked: !0
2234
2234
  }));
2235
2235
  i = await an({
2236
- message: k.bold("Select .xcstrings files to manage:"),
2236
+ message: S.bold("Select .xcstrings files to manage:"),
2237
2237
  choices: c
2238
2238
  });
2239
2239
  } else
2240
- console.log(k.dim(" No .xcstrings files found in current directory"));
2240
+ console.log(S.dim(" No .xcstrings files found in current directory"));
2241
2241
  console.log();
2242
2242
  let t = [];
2243
2243
  if (r.length > 0) {
2244
- console.log(k.green(`✓ Found ${r.length} .xcodeproj director${r.length === 1 ? "y" : "ies"}`)), console.log();
2244
+ console.log(S.green(`✓ Found ${r.length} .xcodeproj director${r.length === 1 ? "y" : "ies"}`)), console.log();
2245
2245
  const c = r.map((u) => ({
2246
- name: k.white(we(e, u) || u) + k.dim(` (${u})`),
2246
+ name: S.white(we(e, u) || u) + S.dim(` (${u})`),
2247
2247
  value: we(e, u) || u,
2248
2248
  checked: !0
2249
2249
  }));
2250
2250
  t = await an({
2251
- message: k.bold("Select .xcodeproj directories for language detection:"),
2251
+ message: S.bold("Select .xcodeproj directories for language detection:"),
2252
2252
  choices: c
2253
2253
  });
2254
2254
  } else
2255
- console.log(k.dim(" No .xcodeproj directories found"));
2256
- if (console.log(), console.log(k.dim("─".repeat(40))), console.log(), console.log(k.bold("📋 Configuration Summary:")), console.log(), console.log(k.cyan(" xcstringsPaths:")), i.length > 0 ? i.forEach((c) => console.log(k.white(` • ${c}`))) : console.log(k.dim(" (none)")), console.log(), console.log(k.cyan(" xcodeprojPaths:")), t.length > 0 ? t.forEach((c) => console.log(k.white(` • ${c}`))) : console.log(k.dim(" (none)")), console.log(), !await Dr({
2257
- message: k.bold(`Create ${k.yellow(Pe)}?`),
2255
+ console.log(S.dim(" No .xcodeproj directories found"));
2256
+ if (console.log(), console.log(S.dim("─".repeat(40))), console.log(), console.log(S.bold("📋 Configuration Summary:")), console.log(), console.log(S.cyan(" xcstringsPaths:")), i.length > 0 ? i.forEach((c) => console.log(S.white(` • ${c}`))) : console.log(S.dim(" (none)")), console.log(), console.log(S.cyan(" xcodeprojPaths:")), t.length > 0 ? t.forEach((c) => console.log(S.white(` • ${c}`))) : console.log(S.dim(" (none)")), console.log(), !await Dr({
2257
+ message: S.bold(`Create ${S.yellow(Me)}?`),
2258
2258
  default: !0
2259
2259
  })) {
2260
- console.log(k.dim(" Configuration cancelled."));
2260
+ console.log(S.dim(" Configuration cancelled."));
2261
2261
  return;
2262
2262
  }
2263
2263
  const l = i.map((c) => ` "${c}"`).join(`,
@@ -2275,7 +2275,7 @@ ${a}
2275
2275
  missingLanguagePolicy: "skip",
2276
2276
  }
2277
2277
  `;
2278
- await Nn(Pe, s, "utf-8"), console.log(), console.log(k.bold.green(`✓ Created ${Pe}`)), console.log(k.dim(` Run ${k.cyan("xcstrings --help")} to see available commands.`)), console.log();
2278
+ await Nn(Me, s, "utf-8"), console.log(), console.log(S.bold.green(`✓ Created ${Me}`)), console.log(S.dim(` Run ${S.cyan("xcstrings --help")} to see available commands.`)), console.log();
2279
2279
  }
2280
2280
  var Io = Object.prototype.toString, ae = Array.isArray || function(n) {
2281
2281
  return Io.call(n) === "[object Array]";
@@ -2286,7 +2286,7 @@ function Ze(e) {
2286
2286
  function No(e) {
2287
2287
  return ae(e) ? "array" : typeof e;
2288
2288
  }
2289
- function Me(e) {
2289
+ function Pe(e) {
2290
2290
  return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
2291
2291
  }
2292
2292
  function Fn(e, n) {
@@ -2295,13 +2295,13 @@ function Fn(e, n) {
2295
2295
  function Ro(e, n) {
2296
2296
  return e != null && typeof e != "object" && e.hasOwnProperty && e.hasOwnProperty(n);
2297
2297
  }
2298
- var Po = RegExp.prototype.test;
2299
- function Mo(e, n) {
2300
- return Po.call(e, n);
2298
+ var Mo = RegExp.prototype.test;
2299
+ function Po(e, n) {
2300
+ return Mo.call(e, n);
2301
2301
  }
2302
2302
  var Do = /\S/;
2303
2303
  function $o(e) {
2304
- return !Mo(Do, e);
2304
+ return !Po(Do, e);
2305
2305
  }
2306
2306
  var Bo = {
2307
2307
  "&": "&amp;",
@@ -2331,33 +2331,33 @@ function Wo(e, n) {
2331
2331
  o = [];
2332
2332
  l = !1, a = !1;
2333
2333
  }
2334
- var f, d, g;
2335
- function v(I) {
2334
+ var f, h, g;
2335
+ function y(I) {
2336
2336
  if (typeof I == "string" && (I = I.split(Yo, 2)), !ae(I) || I.length !== 2)
2337
2337
  throw new Error("Invalid tags: " + I);
2338
- f = new RegExp(Me(I[0]) + "\\s*"), d = new RegExp("\\s*" + Me(I[1])), g = new RegExp("\\s*" + Me("}" + I[1]));
2338
+ f = new RegExp(Pe(I[0]) + "\\s*"), h = new RegExp("\\s*" + Pe(I[1])), g = new RegExp("\\s*" + Pe("}" + I[1]));
2339
2339
  }
2340
- v(n || D.tags);
2341
- for (var h = new ye(e), A, C, x, _, L, R; !h.eos(); ) {
2342
- if (A = h.pos, x = h.scanUntil(f), x)
2340
+ y(n || D.tags);
2341
+ for (var d = new ye(e), b, C, x, _, L, R; !d.eos(); ) {
2342
+ if (b = d.pos, x = d.scanUntil(f), x)
2343
2343
  for (var J = 0, V = x.length; J < V; ++J)
2344
- _ = x.charAt(J), $o(_) ? (o.push(t.length), s += _) : (a = !0, r = !0, s += " "), t.push(["text", _, A, A + 1]), A += 1, _ === `
2344
+ _ = x.charAt(J), $o(_) ? (o.push(t.length), s += _) : (a = !0, r = !0, s += " "), t.push(["text", _, b, b + 1]), b += 1, _ === `
2345
2345
  ` && (u(), s = "", c = 0, r = !1);
2346
- if (!h.scan(f))
2346
+ if (!d.scan(f))
2347
2347
  break;
2348
- if (l = !0, C = h.scan(Ko) || "name", h.scan(Uo), C === "=" ? (x = h.scanUntil(Tn), h.scan(Tn), h.scanUntil(d)) : C === "{" ? (x = h.scanUntil(g), h.scan(Ho), h.scanUntil(d), C = "&") : x = h.scanUntil(d), !h.scan(d))
2349
- throw new Error("Unclosed tag at " + h.pos);
2350
- if (C == ">" ? L = [C, x, A, h.pos, s, c, r] : L = [C, x, A, h.pos], c++, t.push(L), C === "#" || C === "^")
2348
+ if (l = !0, C = d.scan(Ko) || "name", d.scan(Uo), C === "=" ? (x = d.scanUntil(Tn), d.scan(Tn), d.scanUntil(h)) : C === "{" ? (x = d.scanUntil(g), d.scan(Ho), d.scanUntil(h), C = "&") : x = d.scanUntil(h), !d.scan(h))
2349
+ throw new Error("Unclosed tag at " + d.pos);
2350
+ if (C == ">" ? L = [C, x, b, d.pos, s, c, r] : L = [C, x, b, d.pos], c++, t.push(L), C === "#" || C === "^")
2351
2351
  i.push(L);
2352
2352
  else if (C === "/") {
2353
2353
  if (R = i.pop(), !R)
2354
- throw new Error('Unopened section "' + x + '" at ' + A);
2354
+ throw new Error('Unopened section "' + x + '" at ' + b);
2355
2355
  if (R[1] !== x)
2356
- throw new Error('Unclosed section "' + R[1] + '" at ' + A);
2357
- } else C === "name" || C === "{" || C === "&" ? a = !0 : C === "=" && v(x);
2356
+ throw new Error('Unclosed section "' + R[1] + '" at ' + b);
2357
+ } else C === "name" || C === "{" || C === "&" ? a = !0 : C === "=" && y(x);
2358
2358
  }
2359
2359
  if (u(), R = i.pop(), R)
2360
- throw new Error('Unclosed section "' + R[1] + '" at ' + h.pos);
2360
+ throw new Error('Unclosed section "' + R[1] + '" at ' + d.pos);
2361
2361
  return Go(qo(t));
2362
2362
  }
2363
2363
  function qo(e) {
@@ -2466,8 +2466,8 @@ $.prototype.renderTokens = function(n, r, i, t, o) {
2466
2466
  };
2467
2467
  $.prototype.renderSection = function(n, r, i, t, o) {
2468
2468
  var l = this, a = "", s = r.lookup(n[1]);
2469
- function c(d) {
2470
- return l.render(d, r, i, o);
2469
+ function c(h) {
2470
+ return l.render(h, r, i, o);
2471
2471
  }
2472
2472
  if (s) {
2473
2473
  if (ae(s))
@@ -2613,6 +2613,10 @@ function Vo() {
2613
2613
  array: !0,
2614
2614
  alias: "l",
2615
2615
  describe: "Include only these languages"
2616
+ }).option("missing-languages", {
2617
+ type: "string",
2618
+ array: !0,
2619
+ describe: "Include only keys missing any of these languages"
2616
2620
  }).option("format", {
2617
2621
  type: "string",
2618
2622
  describe: "Mustache template. Available variables: {{language}}, {{key}}, {{text}}"
@@ -2637,6 +2641,7 @@ function Vo() {
2637
2641
  }), o = await Jo({
2638
2642
  path: e.path,
2639
2643
  languages: e.languages,
2644
+ missingLanguages: e["missing-languages"],
2640
2645
  keyFilter: i,
2641
2646
  textFilter: t,
2642
2647
  format: e.format
@@ -2672,18 +2677,18 @@ function Qo(e, n) {
2672
2677
  }
2673
2678
  }
2674
2679
  async function Jo(e) {
2675
- const r = (await me(e.path)).strings ?? {}, i = jn(e.keyFilter), t = jn(e.textFilter), o = e.languages ? new Set(e.languages) : null, l = !!e.format, a = [];
2676
- for (const s of Object.keys(r)) {
2677
- if (!i(s)) continue;
2678
- const u = r[s]?.localizations ?? {}, f = Object.keys(u), d = [];
2679
- for (const g of f) {
2680
- if (o && !o.has(g)) continue;
2681
- const v = u[g]?.stringUnit?.value ?? "";
2682
- t(v) && (l && e.format ? d.push(Qo(e.format, { language: g, key: s, text: v })) : d.push(` ${g}: ${JSON.stringify(v)}`));
2680
+ const r = (await me(e.path)).strings ?? {}, i = jn(e.keyFilter), t = jn(e.textFilter), o = e.languages ? new Set(e.languages) : null, l = e.missingLanguages ? new Set(e.missingLanguages) : null, a = !!e.format, s = [];
2681
+ for (const c of Object.keys(r)) {
2682
+ if (!i(c)) continue;
2683
+ const f = r[c]?.localizations ?? {}, h = Object.keys(f), g = l ? Array.from(l).some((d) => !(d in f)) : !0, y = [];
2684
+ for (const d of h) {
2685
+ if (o && !o.has(d)) continue;
2686
+ const b = f[d]?.stringUnit?.value ?? "";
2687
+ t(b) && (a && e.format ? y.push(Qo(e.format, { language: d, key: c, text: b })) : y.push(` ${d}: ${JSON.stringify(b)}`));
2683
2688
  }
2684
- d.length !== 0 && (l ? a.push(...d) : a.push(`${s}:`, ...d));
2689
+ y.length !== 0 && g && (a ? s.push(...y) : s.push(`${c}:`, ...y));
2685
2690
  }
2686
- return a.join(`
2691
+ return s.join(`
2687
2692
  `);
2688
2693
  }
2689
2694
  const In = Oe(process.cwd(), "Localizable.xcstrings");
@@ -2698,12 +2703,12 @@ Nr(Rr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("co
2698
2703
  const n = await We(e.config);
2699
2704
  e.path = await zr(e.path, n, In);
2700
2705
  }).command([
2701
- So(),
2706
+ ko(),
2702
2707
  Eo(),
2703
2708
  Fo(),
2704
2709
  Gr(),
2705
2710
  Vo()
2706
2711
  ]).demandCommand(1, "").strictCommands().recommendCommands().showHelpOnFail(!0).fail((e, n, r) => {
2707
2712
  const i = e || n?.message;
2708
- i && (console.error(k.red(i)), console.log(), r.showHelp(), process.exit(1)), n && (console.error(n), process.exit(1)), r.showHelp(), process.exit(1);
2713
+ i && (console.error(S.red(i)), console.log(), r.showHelp(), process.exit(1)), n && (console.error(n), process.exit(1)), r.showHelp(), process.exit(1);
2709
2714
  }).help().argv;