xcstrings-cli 2.2.0 → 2.3.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 (3) hide show
  1. package/README.md +21 -6
  2. package/dist/index.js +937 -895
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import Lr from "yargs";
3
- import { hideBin as jr } from "yargs/helpers";
2
+ import Nr from "yargs";
3
+ import { hideBin as Rr } from "yargs/helpers";
4
4
  import { resolve as Oe, relative as we } from "node:path";
5
- import { cosmiconfig as Ir } from "cosmiconfig";
5
+ import { cosmiconfig as Pr } from "cosmiconfig";
6
6
  import De from "json5";
7
- import { select as Nr, checkbox as on, confirm as Rr } from "@inquirer/prompts";
7
+ import { select as Mr, checkbox as an, confirm as Dr } from "@inquirer/prompts";
8
8
  import k from "chalk";
9
- import { readFile as Mr, writeFile as jn, readdir as In } from "node:fs/promises";
10
- import { XcodeProject as Pr } from "@bacons/xcode";
11
- const Le = "xcstrings-cli", ln = Ir(Le, {
9
+ import { readFile as $r, writeFile as Nn, readdir as Rn } from "node:fs/promises";
10
+ import { XcodeProject as Br } from "@bacons/xcode";
11
+ const Le = "xcstrings-cli", sn = Pr(Le, {
12
12
  searchPlaces: [
13
13
  `${Le}.json`,
14
14
  `${Le}.json5`
@@ -18,30 +18,30 @@ const Le = "xcstrings-cli", ln = Ir(Le, {
18
18
  },
19
19
  cache: !1
20
20
  });
21
- async function He(e) {
21
+ async function We(e) {
22
22
  if (e) {
23
- const r = await ln.load(e);
23
+ const r = await sn.load(e);
24
24
  return r ? r.config : null;
25
25
  }
26
- const n = await ln.search();
26
+ const n = await sn.search();
27
27
  return n ? n.config : null;
28
28
  }
29
- function an(e, n) {
29
+ function cn(e, n) {
30
30
  if (!e || e.length === 0) return null;
31
31
  for (const r of e)
32
32
  if (typeof r != "string" && r.alias === n)
33
33
  return r.path;
34
34
  return null;
35
35
  }
36
- async function Dr(e, n, r) {
36
+ async function zr(e, n, r) {
37
37
  const i = n?.xcstringsPaths, t = i?.some((s) => typeof s != "string") ?? !1, o = e.startsWith("alias:") ? e.slice(6) : null;
38
38
  if (o) {
39
- const s = an(i, o);
39
+ const s = cn(i, o);
40
40
  if (!s)
41
41
  throw new Error(`Unknown alias: ${o}`);
42
42
  return s;
43
43
  }
44
- const l = an(i, e);
44
+ const l = cn(i, e);
45
45
  if (l)
46
46
  return l;
47
47
  const a = !e.includes("/") && !e.endsWith(".xcstrings");
@@ -53,23 +53,24 @@ async function Dr(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 Nr({
56
+ return await Mr({
57
57
  message: "Select xcstrings file:",
58
58
  choices: s
59
59
  });
60
60
  }
61
61
  return e;
62
62
  }
63
+ const $e = ["translated", "needs_review", "new", "stale"];
63
64
  async function me(e) {
64
- const n = await Mr(e, "utf-8");
65
+ const n = await $r(e, "utf-8");
65
66
  return JSON.parse(n);
66
67
  }
67
- async function Nn(e, n) {
68
- const r = JSON.stringify(n, null, 2), i = Br(r);
69
- await jn(e, i + `
68
+ async function Pn(e, n) {
69
+ const r = JSON.stringify(n, null, 2), i = Ur(r);
70
+ await Nn(e, i + `
70
71
  `, "utf-8");
71
72
  }
72
- function Br(e) {
73
+ function Ur(e) {
73
74
  let n = "", r = !1, i = !1;
74
75
  for (let t = 0; t < e.length; t++) {
75
76
  const o = e[t];
@@ -93,13 +94,13 @@ function Br(e) {
93
94
  }
94
95
  return n;
95
96
  }
96
- function $r(e) {
97
+ function Yr(e) {
97
98
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
98
99
  }
99
- var ce = { exports: {} }, je, sn;
100
- function Ur() {
101
- if (sn) return je;
102
- sn = 1;
100
+ var ce = { exports: {} }, je, un;
101
+ function Hr() {
102
+ if (un) return je;
103
+ un = 1;
103
104
  function e(r) {
104
105
  try {
105
106
  return JSON.stringify(r);
@@ -123,73 +124,73 @@ function Ur() {
123
124
  return r;
124
125
  var u = i.length;
125
126
  if (u === 0) return r;
126
- for (var f = "", h = 1 - l, d = -1, m = r && r.length || 0, g = 0; g < m; ) {
127
- if (r.charCodeAt(g) === 37 && g + 1 < m) {
128
- switch (d = d > -1 ? d : 0, r.charCodeAt(g + 1)) {
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)) {
129
130
  case 100:
130
131
  // 'd'
131
132
  case 102:
132
- if (h >= u || i[h] == null) break;
133
- d < g && (f += r.slice(d, g)), f += Number(i[h]), d = g + 2, g++;
133
+ if (d >= u || i[d] == null) break;
134
+ g < h && (f += r.slice(g, h)), f += Number(i[d]), g = h + 2, h++;
134
135
  break;
135
136
  case 105:
136
- if (h >= u || i[h] == null) break;
137
- d < g && (f += r.slice(d, g)), f += Math.floor(Number(i[h])), d = g + 2, g++;
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++;
138
139
  break;
139
140
  case 79:
140
141
  // 'O'
141
142
  case 111:
142
143
  // 'o'
143
144
  case 106:
144
- if (h >= u || i[h] === void 0) break;
145
- d < g && (f += r.slice(d, g));
146
- var b = typeof i[h];
147
- if (b === "string") {
148
- f += "'" + i[h] + "'", d = g + 2, g++;
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++;
149
150
  break;
150
151
  }
151
- if (b === "function") {
152
- f += i[h].name || "<anonymous>", d = g + 2, g++;
152
+ if (A === "function") {
153
+ f += i[d].name || "<anonymous>", g = h + 2, h++;
153
154
  break;
154
155
  }
155
- f += o(i[h]), d = g + 2, g++;
156
+ f += o(i[d]), g = h + 2, h++;
156
157
  break;
157
158
  case 115:
158
- if (h >= u)
159
+ if (d >= u)
159
160
  break;
160
- d < g && (f += r.slice(d, g)), f += String(i[h]), d = g + 2, g++;
161
+ g < h && (f += r.slice(g, h)), f += String(i[d]), g = h + 2, h++;
161
162
  break;
162
163
  case 37:
163
- d < g && (f += r.slice(d, g)), f += "%", d = g + 2, g++, h--;
164
+ g < h && (f += r.slice(g, h)), f += "%", g = h + 2, h++, d--;
164
165
  break;
165
166
  }
166
- ++h;
167
+ ++d;
167
168
  }
168
- ++g;
169
+ ++h;
169
170
  }
170
- return d === -1 ? r : (d < m && (f += r.slice(d)), f);
171
+ return g === -1 ? r : (g < v && (f += r.slice(g)), f);
171
172
  }
172
173
  return je;
173
174
  }
174
- var cn;
175
- function zr() {
176
- if (cn) return ce.exports;
177
- cn = 1;
178
- const e = Ur();
175
+ var fn;
176
+ function Kr() {
177
+ if (fn) return ce.exports;
178
+ fn = 1;
179
+ const e = Hr();
179
180
  ce.exports = u;
180
- const n = Or().console || {}, r = {
181
- mapHttpRequest: Q,
182
- mapHttpResponse: Q,
183
- wrapRequestSerializer: B,
184
- wrapResponseSerializer: B,
185
- wrapErrorSerializer: B,
186
- req: Q,
187
- res: Q,
188
- err: U,
189
- errWithCause: U
181
+ const n = Lr().console || {}, r = {
182
+ mapHttpRequest: V,
183
+ mapHttpResponse: V,
184
+ wrapRequestSerializer: I,
185
+ wrapResponseSerializer: I,
186
+ wrapErrorSerializer: I,
187
+ req: V,
188
+ res: V,
189
+ err: R,
190
+ errWithCause: R
190
191
  };
191
- function i(p, y) {
192
- return p === "silent" ? 1 / 0 : y.levels.values[p];
192
+ function i(p, m) {
193
+ return p === "silent" ? 1 / 0 : m.levels.values[p];
193
194
  }
194
195
  const t = Symbol("pino.logFuncs"), o = Symbol("pino.hierarchy"), l = {
195
196
  error: "log",
@@ -199,99 +200,99 @@ function zr() {
199
200
  debug: "log",
200
201
  trace: "log"
201
202
  };
202
- function a(p, y) {
203
- const A = {
204
- logger: y,
203
+ function a(p, m) {
204
+ const b = {
205
+ logger: m,
205
206
  parent: p[o]
206
207
  };
207
- y[o] = A;
208
+ m[o] = b;
208
209
  }
209
- function s(p, y, A) {
210
- const E = {};
211
- y.forEach((S) => {
212
- E[S] = A[S] ? A[S] : n[S] || n[l[S] || "log"] || se;
213
- }), p[t] = E;
210
+ function s(p, m, b) {
211
+ const S = {};
212
+ m.forEach((E) => {
213
+ S[E] = b[E] ? b[E] : n[E] || n[l[E] || "log"] || se;
214
+ }), p[t] = S;
214
215
  }
215
- function c(p, y) {
216
- return Array.isArray(p) ? p.filter(function(E) {
217
- return E !== "!stdSerializers.err";
218
- }) : p === !0 ? Object.keys(y) : !1;
216
+ function c(p, m) {
217
+ return Array.isArray(p) ? p.filter(function(S) {
218
+ return S !== "!stdSerializers.err";
219
+ }) : p === !0 ? Object.keys(m) : !1;
219
220
  }
220
221
  function u(p) {
221
222
  p = p || {}, p.browser = p.browser || {};
222
- const y = p.browser.transmit;
223
- if (y && typeof y.send != "function")
223
+ const m = p.browser.transmit;
224
+ if (m && typeof m.send != "function")
224
225
  throw Error("pino: transmit option must have a send function");
225
- const A = p.browser.write || n;
226
+ const b = p.browser.write || n;
226
227
  p.browser.write && (p.browser.asObject = !0);
227
- const E = p.serializers || {}, S = c(p.browser.serialize, E);
228
- let M = p.browser.serialize;
229
- Array.isArray(p.browser.serialize) && p.browser.serialize.indexOf("!stdSerializers.err") > -1 && (M = !1);
230
- const H = Object.keys(p.customLevels || {}), _ = ["error", "fatal", "warn", "info", "debug", "trace"].concat(H);
231
- typeof A == "function" && _.forEach(function(P) {
232
- A[P] = A;
228
+ const S = p.serializers || {}, E = c(p.browser.serialize, S);
229
+ let B = p.browser.serialize;
230
+ Array.isArray(p.browser.serialize) && p.browser.serialize.indexOf("!stdSerializers.err") > -1 && (B = !1);
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;
233
234
  }), (p.enabled === !1 || p.browser.disabled) && (p.level = "silent");
234
- const j = p.level || "info", w = Object.create(A);
235
- w.log || (w.log = se), s(w, _, A), a({}, w), Object.defineProperty(w, "levelVal", {
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", {
236
237
  get: ve
237
238
  }), Object.defineProperty(w, "level", {
238
- get: J,
239
- set: Fr
239
+ get: Z,
240
+ set: jr
240
241
  });
241
- const $ = {
242
- transmit: y,
243
- serialize: S,
242
+ const Y = {
243
+ transmit: m,
244
+ serialize: E,
244
245
  asObject: p.browser.asObject,
245
246
  formatters: p.browser.formatters,
246
- levels: _,
247
- timestamp: ae(p)
247
+ levels: O,
248
+ timestamp: J(p)
248
249
  };
249
- w.levels = f(p), w.level = j, 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 = E, w._serialize = S, w._stdErrSerialize = M, w.child = Tr, y && (w._logEvent = Y());
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
251
  function ve() {
251
252
  return i(this.level, this);
252
253
  }
253
- function J() {
254
+ function Z() {
254
255
  return this._level;
255
256
  }
256
- function Fr(P) {
257
- if (P !== "silent" && !this.levels.values[P])
258
- throw Error("unknown level " + P);
259
- this._level = P, m(this, $, w, "error"), m(this, $, w, "fatal"), m(this, $, w, "warn"), m(this, $, w, "info"), m(this, $, w, "debug"), m(this, $, w, "trace"), H.forEach((Z) => {
260
- m(this, $, w, Z);
257
+ function jr(z) {
258
+ if (z !== "silent" && !this.levels.values[z])
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);
261
262
  });
262
263
  }
263
- function Tr(P, Z) {
264
- if (!P)
264
+ function Ir(z, ee) {
265
+ if (!z)
265
266
  throw new Error("missing bindings for child Pino");
266
- Z = Z || {}, S && P.serializers && (Z.serializers = P.serializers);
267
- const en = Z.serializers;
268
- if (S && en) {
269
- var xe = Object.assign({}, E, en), nn = p.browser.serialize === !0 ? Object.keys(xe) : S;
270
- delete P.serializers, x([P], nn, xe, this._stdErrSerialize);
267
+ ee = ee || {}, E && z.serializers && (ee.serializers = z.serializers);
268
+ const rn = ee.serializers;
269
+ if (E && rn) {
270
+ var xe = Object.assign({}, S, rn), tn = p.browser.serialize === !0 ? Object.keys(xe) : E;
271
+ delete z.serializers, x([z], tn, xe, this._stdErrSerialize);
271
272
  }
272
- function rn(tn) {
273
- this._childLevel = (tn._childLevel | 0) + 1, this.bindings = P, xe && (this.serializers = xe, this._serialize = nn), y && (this._logEvent = Y(
274
- [].concat(tn._logEvent.bindings, P)
273
+ function on(ln) {
274
+ this._childLevel = (ln._childLevel | 0) + 1, this.bindings = z, xe && (this.serializers = xe, this._serialize = tn), m && (this._logEvent = L(
275
+ [].concat(ln._logEvent.bindings, z)
275
276
  ));
276
277
  }
277
- rn.prototype = this;
278
- const Te = new rn(this);
278
+ on.prototype = this;
279
+ const Te = new on(this);
279
280
  return a(this, Te), Te.level = this.level, Te;
280
281
  }
281
282
  return w;
282
283
  }
283
284
  function f(p) {
284
- const y = p.customLevels || {}, A = Object.assign({}, u.levels.values, y), E = Object.assign({}, u.levels.labels, h(y));
285
+ const m = p.customLevels || {}, b = Object.assign({}, u.levels.values, m), S = Object.assign({}, u.levels.labels, d(m));
285
286
  return {
286
- values: A,
287
- labels: E
287
+ values: b,
288
+ labels: S
288
289
  };
289
290
  }
290
- function h(p) {
291
- const y = {};
292
- return Object.keys(p).forEach(function(A) {
293
- y[p[A]] = A;
294
- }), y;
291
+ function d(p) {
292
+ const m = {};
293
+ return Object.keys(p).forEach(function(b) {
294
+ m[p[b]] = b;
295
+ }), m;
295
296
  }
296
297
  u.levels = {
297
298
  values: {
@@ -310,90 +311,90 @@ function zr() {
310
311
  50: "error",
311
312
  60: "fatal"
312
313
  }
313
- }, u.stdSerializers = r, u.stdTimeFunctions = Object.assign({}, { nullTime: Je, epochTime: Ze, unixTime: Sr, isoTime: _r });
314
- function d(p) {
315
- const y = [];
316
- p.bindings && y.push(p.bindings);
317
- let A = p[o];
318
- for (; A.parent; )
319
- A = A.parent, A.logger.bindings && y.push(A.logger.bindings);
320
- return y.reverse();
321
- }
322
- function m(p, y, A, E) {
323
- if (Object.defineProperty(p, E, {
324
- value: i(p.level, A) > i(E, A) ? se : A[t][E],
314
+ }, u.stdSerializers = r, u.stdTimeFunctions = Object.assign({}, { nullTime: en, epochTime: nn, unixTime: Fr, isoTime: Tr });
315
+ function g(p) {
316
+ const m = [];
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);
321
+ return m.reverse();
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],
325
326
  writable: !0,
326
327
  enumerable: !0,
327
328
  configurable: !0
328
- }), !y.transmit && p[E] === se)
329
+ }), !m.transmit && p[S] === se)
329
330
  return;
330
- p[E] = b(p, y, A, E);
331
- const S = d(p);
332
- S.length !== 0 && (p[E] = g(S, p[E]));
331
+ p[S] = A(p, m, b, S);
332
+ const E = g(p);
333
+ E.length !== 0 && (p[S] = h(E, p[S]));
333
334
  }
334
- function g(p, y) {
335
+ function h(p, m) {
335
336
  return function() {
336
- return y.apply(this, [...p, ...arguments]);
337
+ return m.apply(this, [...p, ...arguments]);
337
338
  };
338
339
  }
339
- function b(p, y, A, E) {
340
- return /* @__PURE__ */ (function(S) {
340
+ function A(p, m, b, S) {
341
+ return /* @__PURE__ */ (function(E) {
341
342
  return function() {
342
- const H = y.timestamp(), _ = new Array(arguments.length), j = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
343
- for (var w = 0; w < _.length; w++) _[w] = arguments[w];
344
- if (y.serialize && !y.asObject && x(_, this._serialize, this.serializers, this._stdErrSerialize), y.asObject || y.formatters ? S.call(j, C(this, E, _, H, y.formatters)) : S.apply(j, _), y.transmit) {
345
- const $ = y.transmit.level || p._level, ve = A.levels.values[$], J = A.levels.values[E];
346
- if (J < ve) return;
347
- W(this, {
348
- ts: H,
349
- methodLevel: E,
350
- methodValue: J,
351
- transmitValue: A.levels.values[y.transmit.level || p._level],
352
- send: y.transmit.send,
353
- val: i(p._level, A)
354
- }, _);
343
+ const K = m.timestamp(), O = new Array(arguments.length), P = Object.getPrototypeOf && Object.getPrototypeOf(this) === n ? n : this;
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];
347
+ if (Z < ve) return;
348
+ _(this, {
349
+ ts: K,
350
+ methodLevel: S,
351
+ methodValue: Z,
352
+ transmitValue: b.levels.values[m.transmit.level || p._level],
353
+ send: m.transmit.send,
354
+ val: i(p._level, b)
355
+ }, O);
355
356
  }
356
357
  };
357
- })(p[t][E]);
358
+ })(p[t][S]);
358
359
  }
359
- function C(p, y, A, E, S = {}) {
360
+ function C(p, m, b, S, E = {}) {
360
361
  const {
361
- level: M = () => p.levels.values[y],
362
- log: H = (J) => J
363
- } = S;
364
- p._serialize && x(A, p._serialize, p.serializers, p._stdErrSerialize);
365
- const _ = A.slice();
366
- let j = _[0];
362
+ level: B = () => p.levels.values[m],
363
+ log: K = (Z) => Z
364
+ } = E;
365
+ p._serialize && x(b, p._serialize, p.serializers, p._stdErrSerialize);
366
+ const O = b.slice();
367
+ let P = O[0];
367
368
  const w = {};
368
- E && (w.time = E), w.level = M(y, p.levels.values[y]);
369
- let $ = (p._childLevel | 0) + 1;
370
- if ($ < 1 && ($ = 1), j !== null && typeof j == "object") {
371
- for (; $-- && typeof _[0] == "object"; )
372
- Object.assign(w, _.shift());
373
- j = _.length ? e(_.shift(), _) : void 0;
374
- } else typeof j == "string" && (j = e(_.shift(), _));
375
- return j !== void 0 && (w.msg = j), H(w);
376
- }
377
- function x(p, y, A, E) {
378
- for (const S in p)
379
- if (E && p[S] instanceof Error)
380
- p[S] = u.stdSerializers.err(p[S]);
381
- else if (typeof p[S] == "object" && !Array.isArray(p[S]))
382
- for (const M in p[S])
383
- y && y.indexOf(M) > -1 && M in A && (p[S][M] = A[M](p[S][M]));
384
- }
385
- function W(p, y, A) {
386
- const E = y.send, S = y.ts, M = y.methodLevel, H = y.methodValue, _ = y.val, j = p._logEvent.bindings;
369
+ S && (w.time = S), w.level = B(m, p.levels.values[m]);
370
+ let Y = (p._childLevel | 0) + 1;
371
+ if (Y < 1 && (Y = 1), P !== null && typeof P == "object") {
372
+ for (; Y-- && typeof O[0] == "object"; )
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);
377
+ }
378
+ function x(p, m, b, S) {
379
+ for (const E in p)
380
+ if (S && p[E] instanceof Error)
381
+ p[E] = u.stdSerializers.err(p[E]);
382
+ else if (typeof p[E] == "object" && !Array.isArray(p[E]))
383
+ for (const B in p[E])
384
+ m && m.indexOf(B) > -1 && B in b && (p[E][B] = b[B](p[E][B]));
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;
387
388
  x(
388
- A,
389
+ b,
389
390
  p._serialize || Object.keys(p.serializers),
390
391
  p.serializers,
391
392
  p._stdErrSerialize === void 0 ? !0 : p._stdErrSerialize
392
- ), p._logEvent.ts = S, p._logEvent.messages = A.filter(function(w) {
393
- return j.indexOf(w) === -1;
394
- }), p._logEvent.level.label = M, p._logEvent.level.value = H, E(M, p._logEvent, _), p._logEvent = Y(j);
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);
395
396
  }
396
- function Y(p) {
397
+ function L(p) {
397
398
  return {
398
399
  ts: 0,
399
400
  messages: [],
@@ -401,42 +402,42 @@ function zr() {
401
402
  level: { label: "", value: 0 }
402
403
  };
403
404
  }
404
- function U(p) {
405
- const y = {
405
+ function R(p) {
406
+ const m = {
406
407
  type: p.constructor.name,
407
408
  msg: p.message,
408
409
  stack: p.stack
409
410
  };
410
- for (const A in p)
411
- y[A] === void 0 && (y[A] = p[A]);
412
- return y;
411
+ for (const b in p)
412
+ m[b] === void 0 && (m[b] = p[b]);
413
+ return m;
413
414
  }
414
- function ae(p) {
415
- return typeof p.timestamp == "function" ? p.timestamp : p.timestamp === !1 ? Je : Ze;
415
+ function J(p) {
416
+ return typeof p.timestamp == "function" ? p.timestamp : p.timestamp === !1 ? en : nn;
416
417
  }
417
- function Q() {
418
+ function V() {
418
419
  return {};
419
420
  }
420
- function B(p) {
421
+ function I(p) {
421
422
  return p;
422
423
  }
423
424
  function se() {
424
425
  }
425
- function Je() {
426
+ function en() {
426
427
  return !1;
427
428
  }
428
- function Ze() {
429
+ function nn() {
429
430
  return Date.now();
430
431
  }
431
- function Sr() {
432
+ function Fr() {
432
433
  return Math.round(Date.now() / 1e3);
433
434
  }
434
- function _r() {
435
+ function Tr() {
435
436
  return new Date(Date.now()).toISOString();
436
437
  }
437
- function Or() {
438
- function p(y) {
439
- return typeof y < "u" && y;
438
+ function Lr() {
439
+ function p(m) {
440
+ return typeof m < "u" && m;
440
441
  }
441
442
  try {
442
443
  return typeof globalThis < "u" || Object.defineProperty(Object.prototype, "globalThis", {
@@ -451,25 +452,25 @@ function zr() {
451
452
  }
452
453
  return ce.exports.default = u, ce.exports.pino = u, ce.exports;
453
454
  }
454
- var Yr = zr();
455
- const Hr = /* @__PURE__ */ $r(Yr), V = Hr({
455
+ var Wr = Kr();
456
+ const qr = /* @__PURE__ */ Yr(Wr), X = qr({
456
457
  level: process.env.LOG_LEVEL || "info"
457
458
  });
458
- function Kr() {
459
+ function Gr() {
459
460
  return {
460
461
  command: "languages",
461
462
  describe: "List supported languages from xcodeproj or xcstrings",
462
463
  handler: async (e) => {
463
- const n = await Rn(e.path, e.config);
464
- V.info(n.join(" "));
464
+ const n = await Mn(e.path, e.config);
465
+ X.info(n.join(" "));
465
466
  }
466
467
  };
467
468
  }
468
- function Wr(e) {
469
+ function Vr(e) {
469
470
  const n = Oe(e, "project.pbxproj");
470
- return (Pr.open(n).rootObject.props.knownRegions ?? []).filter((o) => o !== "Base").sort();
471
+ return (Br.open(n).rootObject.props.knownRegions ?? []).filter((o) => o !== "Base").sort();
471
472
  }
472
- async function qr(e) {
473
+ async function Xr(e) {
473
474
  const n = await me(e), r = /* @__PURE__ */ new Set();
474
475
  if (!n.sourceLanguage)
475
476
  throw new Error('The xcstrings file is missing "sourceLanguage".');
@@ -482,69 +483,69 @@ async function qr(e) {
482
483
  }
483
484
  return Array.from(r).sort();
484
485
  }
485
- async function Rn(e, n) {
486
+ async function Mn(e, n) {
486
487
  const { sourceLanguage: r } = await me(e);
487
488
  if (!r)
488
489
  throw new Error('The xcstrings file is missing "sourceLanguage".');
489
- const i = await He(n);
490
+ const i = await We(n);
490
491
  if (i?.xcodeprojPaths && i.xcodeprojPaths.length > 0) {
491
492
  const l = /* @__PURE__ */ new Set();
492
493
  l.add(r);
493
494
  for (const a of i.xcodeprojPaths)
494
- Wr(a).forEach((c) => l.add(c));
495
+ Vr(a).forEach((c) => l.add(c));
495
496
  return Array.from(l).sort();
496
497
  }
497
- const t = await qr(e), o = new Set(t);
498
+ const t = await Xr(e), o = new Set(t);
498
499
  return o.add(r), Array.from(o).sort();
499
500
  }
500
- function Mn(e) {
501
+ function Dn(e) {
501
502
  return typeof e > "u" || e === null;
502
503
  }
503
- function Gr(e) {
504
+ function Qr(e) {
504
505
  return typeof e == "object" && e !== null;
505
506
  }
506
- function Vr(e) {
507
- return Array.isArray(e) ? e : Mn(e) ? [] : [e];
507
+ function Jr(e) {
508
+ return Array.isArray(e) ? e : Dn(e) ? [] : [e];
508
509
  }
509
- function Xr(e, n) {
510
+ function Zr(e, n) {
510
511
  var r, i, t, o;
511
512
  if (n)
512
513
  for (o = Object.keys(n), r = 0, i = o.length; r < i; r += 1)
513
514
  t = o[r], e[t] = n[t];
514
515
  return e;
515
516
  }
516
- function Qr(e, n) {
517
+ function ei(e, n) {
517
518
  var r = "", i;
518
519
  for (i = 0; i < n; i += 1)
519
520
  r += e;
520
521
  return r;
521
522
  }
522
- function Jr(e) {
523
+ function ni(e) {
523
524
  return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
524
525
  }
525
- var Zr = Mn, ei = Gr, ni = Vr, ri = Qr, ii = Jr, ti = Xr, F = {
526
- isNothing: Zr,
527
- isObject: ei,
528
- toArray: ni,
529
- repeat: ri,
530
- isNegativeZero: ii,
531
- extend: ti
526
+ var ri = Dn, ii = Qr, ti = Jr, oi = ei, li = ni, ai = Zr, T = {
527
+ isNothing: ri,
528
+ isObject: ii,
529
+ toArray: ti,
530
+ repeat: oi,
531
+ isNegativeZero: li,
532
+ extend: ai
532
533
  };
533
- function Pn(e, n) {
534
+ function $n(e, n) {
534
535
  var r = "", i = e.reason || "(unknown reason)";
535
536
  return e.mark ? (e.mark.name && (r += 'in "' + e.mark.name + '" '), r += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (r += `
536
537
 
537
538
  ` + e.mark.snippet), i + " " + r) : i;
538
539
  }
539
540
  function fe(e, n) {
540
- Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = Pn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
541
+ Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = $n(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
541
542
  }
542
543
  fe.prototype = Object.create(Error.prototype);
543
544
  fe.prototype.constructor = fe;
544
545
  fe.prototype.toString = function(n) {
545
- return this.name + ": " + Pn(this, n);
546
+ return this.name + ": " + $n(this, n);
546
547
  };
547
- var I = fe;
548
+ var M = fe;
548
549
  function Ie(e, n, r, i, t) {
549
550
  var o = "", l = "", a = Math.floor(t / 2) - 1;
550
551
  return i - n > a && (o = " ... ", n = i - a + o.length), r - i > a && (l = " ...", r = i + a - l.length), {
@@ -554,9 +555,9 @@ function Ie(e, n, r, i, t) {
554
555
  };
555
556
  }
556
557
  function Ne(e, n) {
557
- return F.repeat(" ", n - e.length) + e;
558
+ return T.repeat(" ", n - e.length) + e;
558
559
  }
559
- function oi(e, n) {
560
+ function si(e, n) {
560
561
  if (n = Object.create(n || null), !e.buffer) return null;
561
562
  n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2);
562
563
  for (var r = /\r?\n|\r|\0/g, i = [0], t = [], o, l = -1; o = r.exec(e.buffer); )
@@ -570,10 +571,10 @@ function oi(e, n) {
570
571
  t[l - s],
571
572
  e.position - (i[l] - i[l - s]),
572
573
  f
573
- ), a = F.repeat(" ", n.indent) + Ne((e.line - s + 1).toString(), u) + " | " + c.str + `
574
+ ), a = T.repeat(" ", n.indent) + Ne((e.line - s + 1).toString(), u) + " | " + c.str + `
574
575
  ` + a;
575
- for (c = Ie(e.buffer, i[l], t[l], e.position, f), a += F.repeat(" ", n.indent) + Ne((e.line + 1).toString(), u) + " | " + c.str + `
576
- `, a += F.repeat("-", n.indent + u + 3 + c.pos) + `^
576
+ for (c = Ie(e.buffer, i[l], t[l], e.position, f), a += T.repeat(" ", n.indent) + Ne((e.line + 1).toString(), u) + " | " + c.str + `
577
+ `, a += T.repeat("-", n.indent + u + 3 + c.pos) + `^
577
578
  `, s = 1; s <= n.linesAfter && !(l + s >= t.length); s++)
578
579
  c = Ie(
579
580
  e.buffer,
@@ -581,11 +582,11 @@ function oi(e, n) {
581
582
  t[l + s],
582
583
  e.position - (i[l] - i[l + s]),
583
584
  f
584
- ), a += F.repeat(" ", n.indent) + Ne((e.line + s + 1).toString(), u) + " | " + c.str + `
585
+ ), a += T.repeat(" ", n.indent) + Ne((e.line + s + 1).toString(), u) + " | " + c.str + `
585
586
  `;
586
587
  return a.replace(/\n$/, "");
587
588
  }
588
- var li = oi, ai = [
589
+ var ci = si, ui = [
589
590
  "kind",
590
591
  "multi",
591
592
  "resolve",
@@ -596,12 +597,12 @@ var li = oi, ai = [
596
597
  "representName",
597
598
  "defaultStyle",
598
599
  "styleAliases"
599
- ], si = [
600
+ ], fi = [
600
601
  "scalar",
601
602
  "sequence",
602
603
  "mapping"
603
604
  ];
604
- function ci(e) {
605
+ function pi(e) {
605
606
  var n = {};
606
607
  return e !== null && Object.keys(e).forEach(function(r) {
607
608
  e[r].forEach(function(i) {
@@ -609,19 +610,19 @@ function ci(e) {
609
610
  });
610
611
  }), n;
611
612
  }
612
- function ui(e, n) {
613
+ function di(e, n) {
613
614
  if (n = n || {}, Object.keys(n).forEach(function(r) {
614
- if (ai.indexOf(r) === -1)
615
- throw new I('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
615
+ if (ui.indexOf(r) === -1)
616
+ throw new M('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
616
617
  }), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() {
617
618
  return !0;
618
619
  }, this.construct = n.construct || function(r) {
619
620
  return r;
620
- }, 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 = ci(n.styleAliases || null), si.indexOf(this.kind) === -1)
621
- throw new I('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
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
623
  }
623
- var T = ui;
624
- function un(e, n) {
624
+ var j = di;
625
+ function pn(e, n) {
625
626
  var r = [];
626
627
  return e[n].forEach(function(i) {
627
628
  var t = r.length;
@@ -630,7 +631,7 @@ function un(e, n) {
630
631
  }), r[t] = i;
631
632
  }), r;
632
633
  }
633
- function fi() {
634
+ function hi() {
634
635
  var e = {
635
636
  scalar: {},
636
637
  sequence: {},
@@ -655,66 +656,66 @@ function Be(e) {
655
656
  }
656
657
  Be.prototype.extend = function(n) {
657
658
  var r = [], i = [];
658
- if (n instanceof T)
659
+ if (n instanceof j)
659
660
  i.push(n);
660
661
  else if (Array.isArray(n))
661
662
  i = i.concat(n);
662
663
  else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit)))
663
664
  n.implicit && (r = r.concat(n.implicit)), n.explicit && (i = i.concat(n.explicit));
664
665
  else
665
- throw new I("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
666
+ throw new M("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
666
667
  r.forEach(function(o) {
667
- if (!(o instanceof T))
668
- throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
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
670
  if (o.loadKind && o.loadKind !== "scalar")
670
- throw new I("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
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
672
  if (o.multi)
672
- throw new I("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
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
674
  }), i.forEach(function(o) {
674
- if (!(o instanceof T))
675
- throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object.");
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
677
  });
677
678
  var t = Object.create(Be.prototype);
678
- return t.implicit = (this.implicit || []).concat(r), t.explicit = (this.explicit || []).concat(i), t.compiledImplicit = un(t, "implicit"), t.compiledExplicit = un(t, "explicit"), t.compiledTypeMap = fi(t.compiledImplicit, t.compiledExplicit), t;
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;
679
680
  };
680
- var Dn = Be, Bn = new T("tag:yaml.org,2002:str", {
681
+ var Bn = Be, zn = new j("tag:yaml.org,2002:str", {
681
682
  kind: "scalar",
682
683
  construct: function(e) {
683
684
  return e !== null ? e : "";
684
685
  }
685
- }), $n = new T("tag:yaml.org,2002:seq", {
686
+ }), Un = new j("tag:yaml.org,2002:seq", {
686
687
  kind: "sequence",
687
688
  construct: function(e) {
688
689
  return e !== null ? e : [];
689
690
  }
690
- }), Un = new T("tag:yaml.org,2002:map", {
691
+ }), Yn = new j("tag:yaml.org,2002:map", {
691
692
  kind: "mapping",
692
693
  construct: function(e) {
693
694
  return e !== null ? e : {};
694
695
  }
695
- }), zn = new Dn({
696
+ }), Hn = new Bn({
696
697
  explicit: [
697
- Bn,
698
- $n,
699
- Un
698
+ zn,
699
+ Un,
700
+ Yn
700
701
  ]
701
702
  });
702
- function pi(e) {
703
+ function gi(e) {
703
704
  if (e === null) return !0;
704
705
  var n = e.length;
705
706
  return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL");
706
707
  }
707
- function di() {
708
+ function mi() {
708
709
  return null;
709
710
  }
710
- function hi(e) {
711
+ function yi(e) {
711
712
  return e === null;
712
713
  }
713
- var Yn = new T("tag:yaml.org,2002:null", {
714
+ var Kn = new j("tag:yaml.org,2002:null", {
714
715
  kind: "scalar",
715
- resolve: pi,
716
- construct: di,
717
- predicate: hi,
716
+ resolve: gi,
717
+ construct: mi,
718
+ predicate: yi,
718
719
  represent: {
719
720
  canonical: function() {
720
721
  return "~";
@@ -734,22 +735,22 @@ var Yn = new T("tag:yaml.org,2002:null", {
734
735
  },
735
736
  defaultStyle: "lowercase"
736
737
  });
737
- function gi(e) {
738
+ function vi(e) {
738
739
  if (e === null) return !1;
739
740
  var n = e.length;
740
741
  return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE");
741
742
  }
742
- function mi(e) {
743
+ function xi(e) {
743
744
  return e === "true" || e === "True" || e === "TRUE";
744
745
  }
745
- function yi(e) {
746
+ function wi(e) {
746
747
  return Object.prototype.toString.call(e) === "[object Boolean]";
747
748
  }
748
- var Hn = new T("tag:yaml.org,2002:bool", {
749
+ var Wn = new j("tag:yaml.org,2002:bool", {
749
750
  kind: "scalar",
750
- resolve: gi,
751
- construct: mi,
752
- predicate: yi,
751
+ resolve: vi,
752
+ construct: xi,
753
+ predicate: wi,
753
754
  represent: {
754
755
  lowercase: function(e) {
755
756
  return e ? "true" : "false";
@@ -763,16 +764,16 @@ var Hn = new T("tag:yaml.org,2002:bool", {
763
764
  },
764
765
  defaultStyle: "lowercase"
765
766
  });
766
- function vi(e) {
767
+ function bi(e) {
767
768
  return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
768
769
  }
769
- function xi(e) {
770
+ function Ai(e) {
770
771
  return 48 <= e && e <= 55;
771
772
  }
772
- function wi(e) {
773
+ function Ci(e) {
773
774
  return 48 <= e && e <= 57;
774
775
  }
775
- function bi(e) {
776
+ function ki(e) {
776
777
  if (e === null) return !1;
777
778
  var n = e.length, r = 0, i = !1, t;
778
779
  if (!n) return !1;
@@ -789,7 +790,7 @@ function bi(e) {
789
790
  if (t === "x") {
790
791
  for (r++; r < n; r++)
791
792
  if (t = e[r], t !== "_") {
792
- if (!vi(e.charCodeAt(r))) return !1;
793
+ if (!bi(e.charCodeAt(r))) return !1;
793
794
  i = !0;
794
795
  }
795
796
  return i && t !== "_";
@@ -797,7 +798,7 @@ function bi(e) {
797
798
  if (t === "o") {
798
799
  for (r++; r < n; r++)
799
800
  if (t = e[r], t !== "_") {
800
- if (!xi(e.charCodeAt(r))) return !1;
801
+ if (!Ai(e.charCodeAt(r))) return !1;
801
802
  i = !0;
802
803
  }
803
804
  return i && t !== "_";
@@ -806,13 +807,13 @@ function bi(e) {
806
807
  if (t === "_") return !1;
807
808
  for (; r < n; r++)
808
809
  if (t = e[r], t !== "_") {
809
- if (!wi(e.charCodeAt(r)))
810
+ if (!Ci(e.charCodeAt(r)))
810
811
  return !1;
811
812
  i = !0;
812
813
  }
813
814
  return !(!i || t === "_");
814
815
  }
815
- function Ai(e) {
816
+ function Si(e) {
816
817
  var n = e, r = 1, i;
817
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;
818
819
  if (i === "0") {
@@ -822,14 +823,14 @@ function Ai(e) {
822
823
  }
823
824
  return r * parseInt(n, 10);
824
825
  }
825
- function Ci(e) {
826
- return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !F.isNegativeZero(e);
826
+ function Ei(e) {
827
+ return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !T.isNegativeZero(e);
827
828
  }
828
- var Kn = new T("tag:yaml.org,2002:int", {
829
+ var qn = new j("tag:yaml.org,2002:int", {
829
830
  kind: "scalar",
830
- resolve: bi,
831
- construct: Ai,
832
- predicate: Ci,
831
+ resolve: ki,
832
+ construct: Si,
833
+ predicate: Ei,
833
834
  represent: {
834
835
  binary: function(e) {
835
836
  return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
@@ -852,21 +853,21 @@ var Kn = new T("tag:yaml.org,2002:int", {
852
853
  decimal: [10, "dec"],
853
854
  hexadecimal: [16, "hex"]
854
855
  }
855
- }), ki = new RegExp(
856
+ }), _i = new RegExp(
856
857
  // 2.5e4, 2.5 and integers
857
858
  "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
858
859
  );
859
- function Ei(e) {
860
- return !(e === null || !ki.test(e) || // Quick hack to not allow integers end with `_`
860
+ function Oi(e) {
861
+ return !(e === null || !_i.test(e) || // Quick hack to not allow integers end with `_`
861
862
  // Probably should update regexp & check speed
862
863
  e[e.length - 1] === "_");
863
864
  }
864
- function Si(e) {
865
+ function Fi(e) {
865
866
  var n, r;
866
867
  return n = e.replace(/_/g, "").toLowerCase(), r = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : r * parseFloat(n, 10);
867
868
  }
868
- var _i = /^[-+]?[0-9]+e/;
869
- function Oi(e, n) {
869
+ var Ti = /^[-+]?[0-9]+e/;
870
+ function Li(e, n) {
870
871
  var r;
871
872
  if (isNaN(e))
872
873
  switch (n) {
@@ -895,38 +896,38 @@ function Oi(e, n) {
895
896
  case "camelcase":
896
897
  return "-.Inf";
897
898
  }
898
- else if (F.isNegativeZero(e))
899
+ else if (T.isNegativeZero(e))
899
900
  return "-0.0";
900
- return r = e.toString(10), _i.test(r) ? r.replace("e", ".e") : r;
901
+ return r = e.toString(10), Ti.test(r) ? r.replace("e", ".e") : r;
901
902
  }
902
- function Fi(e) {
903
- return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || F.isNegativeZero(e));
903
+ function ji(e) {
904
+ return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || T.isNegativeZero(e));
904
905
  }
905
- var Wn = new T("tag:yaml.org,2002:float", {
906
+ var Gn = new j("tag:yaml.org,2002:float", {
906
907
  kind: "scalar",
907
- resolve: Ei,
908
- construct: Si,
909
- predicate: Fi,
910
- represent: Oi,
908
+ resolve: Oi,
909
+ construct: Fi,
910
+ predicate: ji,
911
+ represent: Li,
911
912
  defaultStyle: "lowercase"
912
- }), qn = zn.extend({
913
+ }), Vn = Hn.extend({
913
914
  implicit: [
914
- Yn,
915
- Hn,
916
915
  Kn,
917
- Wn
916
+ Wn,
917
+ qn,
918
+ Gn
918
919
  ]
919
- }), Gn = qn, Vn = new RegExp(
920
+ }), Xn = Vn, Qn = new RegExp(
920
921
  "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
921
- ), Xn = new RegExp(
922
+ ), Jn = new RegExp(
922
923
  "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
923
924
  );
924
- function Ti(e) {
925
- return e === null ? !1 : Vn.exec(e) !== null || Xn.exec(e) !== null;
925
+ function Ii(e) {
926
+ return e === null ? !1 : Qn.exec(e) !== null || Jn.exec(e) !== null;
926
927
  }
927
- function Li(e) {
928
- var n, r, i, t, o, l, a, s = 0, c = null, u, f, h;
929
- if (n = Vn.exec(e), n === null && (n = Xn.exec(e)), n === null) throw new Error("Date resolve error");
928
+ function Ni(e) {
929
+ var n, r, i, t, o, l, a, s = 0, c = null, u, f, d;
930
+ if (n = Qn.exec(e), n === null && (n = Jn.exec(e)), n === null) throw new Error("Date resolve error");
930
931
  if (r = +n[1], i = +n[2] - 1, t = +n[3], !n[4])
931
932
  return new Date(Date.UTC(r, i, t));
932
933
  if (o = +n[4], l = +n[5], a = +n[6], n[7]) {
@@ -934,29 +935,29 @@ function Li(e) {
934
935
  s += "0";
935
936
  s = +s;
936
937
  }
937
- 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;
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
939
  }
939
- function ji(e) {
940
+ function Ri(e) {
940
941
  return e.toISOString();
941
942
  }
942
- var Qn = new T("tag:yaml.org,2002:timestamp", {
943
+ var Zn = new j("tag:yaml.org,2002:timestamp", {
943
944
  kind: "scalar",
944
- resolve: Ti,
945
- construct: Li,
945
+ resolve: Ii,
946
+ construct: Ni,
946
947
  instanceOf: Date,
947
- represent: ji
948
+ represent: Ri
948
949
  });
949
- function Ii(e) {
950
+ function Pi(e) {
950
951
  return e === "<<" || e === null;
951
952
  }
952
- var Jn = new T("tag:yaml.org,2002:merge", {
953
+ var er = new j("tag:yaml.org,2002:merge", {
953
954
  kind: "scalar",
954
- resolve: Ii
955
- }), Ke = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
955
+ resolve: Pi
956
+ }), qe = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
956
957
  \r`;
957
- function Ni(e) {
958
+ function Mi(e) {
958
959
  if (e === null) return !1;
959
- var n, r, i = 0, t = e.length, o = Ke;
960
+ var n, r, i = 0, t = e.length, o = qe;
960
961
  for (r = 0; r < t; r++)
961
962
  if (n = o.indexOf(e.charAt(r)), !(n > 64)) {
962
963
  if (n < 0) return !1;
@@ -964,35 +965,35 @@ function Ni(e) {
964
965
  }
965
966
  return i % 8 === 0;
966
967
  }
967
- function Ri(e) {
968
- var n, r, i = e.replace(/[\r\n=]/g, ""), t = i.length, o = Ke, l = 0, a = [];
968
+ function Di(e) {
969
+ var n, r, i = e.replace(/[\r\n=]/g, ""), t = i.length, o = qe, l = 0, a = [];
969
970
  for (n = 0; n < t; n++)
970
971
  n % 4 === 0 && n && (a.push(l >> 16 & 255), a.push(l >> 8 & 255), a.push(l & 255)), l = l << 6 | o.indexOf(i.charAt(n));
971
972
  return r = t % 4 * 6, r === 0 ? (a.push(l >> 16 & 255), a.push(l >> 8 & 255), a.push(l & 255)) : r === 18 ? (a.push(l >> 10 & 255), a.push(l >> 2 & 255)) : r === 12 && a.push(l >> 4 & 255), new Uint8Array(a);
972
973
  }
973
- function Mi(e) {
974
- var n = "", r = 0, i, t, o = e.length, l = Ke;
974
+ function $i(e) {
975
+ var n = "", r = 0, i, t, o = e.length, l = qe;
975
976
  for (i = 0; i < o; i++)
976
977
  i % 3 === 0 && i && (n += l[r >> 18 & 63], n += l[r >> 12 & 63], n += l[r >> 6 & 63], n += l[r & 63]), r = (r << 8) + e[i];
977
978
  return t = o % 3, t === 0 ? (n += l[r >> 18 & 63], n += l[r >> 12 & 63], n += l[r >> 6 & 63], n += l[r & 63]) : t === 2 ? (n += l[r >> 10 & 63], n += l[r >> 4 & 63], n += l[r << 2 & 63], n += l[64]) : t === 1 && (n += l[r >> 2 & 63], n += l[r << 4 & 63], n += l[64], n += l[64]), n;
978
979
  }
979
- function Pi(e) {
980
+ function Bi(e) {
980
981
  return Object.prototype.toString.call(e) === "[object Uint8Array]";
981
982
  }
982
- var Zn = new T("tag:yaml.org,2002:binary", {
983
+ var nr = new j("tag:yaml.org,2002:binary", {
983
984
  kind: "scalar",
984
- resolve: Ni,
985
- construct: Ri,
986
- predicate: Pi,
987
- represent: Mi
988
- }), Di = Object.prototype.hasOwnProperty, Bi = Object.prototype.toString;
989
- function $i(e) {
985
+ resolve: Mi,
986
+ construct: Di,
987
+ predicate: Bi,
988
+ represent: $i
989
+ }), zi = Object.prototype.hasOwnProperty, Ui = Object.prototype.toString;
990
+ function Yi(e) {
990
991
  if (e === null) return !0;
991
992
  var n = [], r, i, t, o, l, a = e;
992
993
  for (r = 0, i = a.length; r < i; r += 1) {
993
- if (t = a[r], l = !1, Bi.call(t) !== "[object Object]") return !1;
994
+ if (t = a[r], l = !1, Ui.call(t) !== "[object Object]") return !1;
994
995
  for (o in t)
995
- if (Di.call(t, o))
996
+ if (zi.call(t, o))
996
997
  if (!l) l = !0;
997
998
  else return !1;
998
999
  if (!l) return !1;
@@ -1001,98 +1002,98 @@ function $i(e) {
1001
1002
  }
1002
1003
  return !0;
1003
1004
  }
1004
- function Ui(e) {
1005
+ function Hi(e) {
1005
1006
  return e !== null ? e : [];
1006
1007
  }
1007
- var er = new T("tag:yaml.org,2002:omap", {
1008
+ var rr = new j("tag:yaml.org,2002:omap", {
1008
1009
  kind: "sequence",
1009
- resolve: $i,
1010
- construct: Ui
1011
- }), zi = Object.prototype.toString;
1012
- function Yi(e) {
1010
+ resolve: Yi,
1011
+ construct: Hi
1012
+ }), Ki = Object.prototype.toString;
1013
+ function Wi(e) {
1013
1014
  if (e === null) return !0;
1014
1015
  var n, r, i, t, o, l = e;
1015
1016
  for (o = new Array(l.length), n = 0, r = l.length; n < r; n += 1) {
1016
- if (i = l[n], zi.call(i) !== "[object Object]" || (t = Object.keys(i), t.length !== 1)) return !1;
1017
+ if (i = l[n], Ki.call(i) !== "[object Object]" || (t = Object.keys(i), t.length !== 1)) return !1;
1017
1018
  o[n] = [t[0], i[t[0]]];
1018
1019
  }
1019
1020
  return !0;
1020
1021
  }
1021
- function Hi(e) {
1022
+ function qi(e) {
1022
1023
  if (e === null) return [];
1023
1024
  var n, r, i, t, o, l = e;
1024
1025
  for (o = new Array(l.length), n = 0, r = l.length; n < r; n += 1)
1025
1026
  i = l[n], t = Object.keys(i), o[n] = [t[0], i[t[0]]];
1026
1027
  return o;
1027
1028
  }
1028
- var nr = new T("tag:yaml.org,2002:pairs", {
1029
+ var ir = new j("tag:yaml.org,2002:pairs", {
1029
1030
  kind: "sequence",
1030
- resolve: Yi,
1031
- construct: Hi
1032
- }), Ki = Object.prototype.hasOwnProperty;
1033
- function Wi(e) {
1031
+ resolve: Wi,
1032
+ construct: qi
1033
+ }), Gi = Object.prototype.hasOwnProperty;
1034
+ function Vi(e) {
1034
1035
  if (e === null) return !0;
1035
1036
  var n, r = e;
1036
1037
  for (n in r)
1037
- if (Ki.call(r, n) && r[n] !== null)
1038
+ if (Gi.call(r, n) && r[n] !== null)
1038
1039
  return !1;
1039
1040
  return !0;
1040
1041
  }
1041
- function qi(e) {
1042
+ function Xi(e) {
1042
1043
  return e !== null ? e : {};
1043
1044
  }
1044
- var rr = new T("tag:yaml.org,2002:set", {
1045
+ var tr = new j("tag:yaml.org,2002:set", {
1045
1046
  kind: "mapping",
1046
- resolve: Wi,
1047
- construct: qi
1048
- }), We = Gn.extend({
1047
+ resolve: Vi,
1048
+ construct: Xi
1049
+ }), Ge = Xn.extend({
1049
1050
  implicit: [
1050
- Qn,
1051
- Jn
1051
+ Zn,
1052
+ er
1052
1053
  ],
1053
1054
  explicit: [
1054
- Zn,
1055
- er,
1056
1055
  nr,
1057
- rr
1056
+ rr,
1057
+ ir,
1058
+ tr
1058
1059
  ]
1059
- }), G = Object.prototype.hasOwnProperty, Ce = 1, ir = 2, tr = 3, ke = 4, Re = 1, Gi = 2, fn = 3, Vi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Xi = /[\x85\u2028\u2029]/, Qi = /[,\[\]\{\}]/, or = /^(?:!|!!|![a-z\-]+!)$/i, lr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
1060
- function pn(e) {
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;
1061
+ function hn(e) {
1061
1062
  return Object.prototype.toString.call(e);
1062
1063
  }
1063
- function z(e) {
1064
+ function H(e) {
1064
1065
  return e === 10 || e === 13;
1065
1066
  }
1066
- function X(e) {
1067
+ function Q(e) {
1067
1068
  return e === 9 || e === 32;
1068
1069
  }
1069
- function D(e) {
1070
+ function U(e) {
1070
1071
  return e === 9 || e === 32 || e === 10 || e === 13;
1071
1072
  }
1072
- function re(e) {
1073
+ function ie(e) {
1073
1074
  return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
1074
1075
  }
1075
- function Ji(e) {
1076
+ function nt(e) {
1076
1077
  var n;
1077
1078
  return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1);
1078
1079
  }
1079
- function Zi(e) {
1080
+ function rt(e) {
1080
1081
  return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
1081
1082
  }
1082
- function et(e) {
1083
+ function it(e) {
1083
1084
  return 48 <= e && e <= 57 ? e - 48 : -1;
1084
1085
  }
1085
- function dn(e) {
1086
+ function gn(e) {
1086
1087
  return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
1087
1088
  ` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
1088
1089
  }
1089
- function nt(e) {
1090
+ function tt(e) {
1090
1091
  return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
1091
1092
  (e - 65536 >> 10) + 55296,
1092
1093
  (e - 65536 & 1023) + 56320
1093
1094
  );
1094
1095
  }
1095
- function ar(e, n, r) {
1096
+ function cr(e, n, r) {
1096
1097
  n === "__proto__" ? Object.defineProperty(e, n, {
1097
1098
  configurable: !0,
1098
1099
  enumerable: !0,
@@ -1100,13 +1101,13 @@ function ar(e, n, r) {
1100
1101
  value: r
1101
1102
  }) : e[n] = r;
1102
1103
  }
1103
- var sr = new Array(256), cr = new Array(256);
1104
- for (var ee = 0; ee < 256; ee++)
1105
- sr[ee] = dn(ee) ? 1 : 0, cr[ee] = dn(ee);
1106
- function rt(e, n) {
1107
- this.input = e, this.filename = n.filename || null, this.schema = n.schema || We, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
1104
+ var ur = new Array(256), fr = new Array(256);
1105
+ for (var ne = 0; ne < 256; ne++)
1106
+ ur[ne] = gn(ne) ? 1 : 0, fr[ne] = gn(ne);
1107
+ function ot(e, n) {
1108
+ this.input = e, this.filename = n.filename || null, this.schema = n.schema || Ge, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
1108
1109
  }
1109
- function ur(e, n) {
1110
+ function pr(e, n) {
1110
1111
  var r = {
1111
1112
  name: e.filename,
1112
1113
  buffer: e.input.slice(0, -1),
@@ -1115,26 +1116,26 @@ function ur(e, n) {
1115
1116
  line: e.line,
1116
1117
  column: e.position - e.lineStart
1117
1118
  };
1118
- return r.snippet = li(r), new I(n, r);
1119
+ return r.snippet = ci(r), new M(n, r);
1119
1120
  }
1120
- function v(e, n) {
1121
- throw ur(e, n);
1121
+ function y(e, n) {
1122
+ throw pr(e, n);
1122
1123
  }
1123
- function Ee(e, n) {
1124
- e.onWarning && e.onWarning.call(null, ur(e, n));
1124
+ function Se(e, n) {
1125
+ e.onWarning && e.onWarning.call(null, pr(e, n));
1125
1126
  }
1126
- var hn = {
1127
+ var mn = {
1127
1128
  YAML: function(n, r, i) {
1128
1129
  var t, o, l;
1129
- 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 && Ee(n, "unsupported YAML version of the document");
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
1131
  },
1131
1132
  TAG: function(n, r, i) {
1132
1133
  var t, o;
1133
- i.length !== 2 && v(n, "TAG directive accepts exactly two arguments"), t = i[0], o = i[1], or.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'), lr.test(o) || v(n, "ill-formed tag prefix (second argument) of the TAG directive");
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
1135
  try {
1135
1136
  o = decodeURIComponent(o);
1136
1137
  } catch {
1137
- v(n, "tag prefix is malformed: " + o);
1138
+ y(n, "tag prefix is malformed: " + o);
1138
1139
  }
1139
1140
  n.tagMap[t] = o;
1140
1141
  }
@@ -1144,87 +1145,87 @@ function q(e, n, r, i) {
1144
1145
  if (n < r) {
1145
1146
  if (a = e.input.slice(n, r), i)
1146
1147
  for (t = 0, o = a.length; t < o; t += 1)
1147
- l = a.charCodeAt(t), l === 9 || 32 <= l && l <= 1114111 || v(e, "expected valid JSON character");
1148
- else Vi.test(a) && v(e, "the stream contains non-printable characters");
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");
1149
1150
  e.result += a;
1150
1151
  }
1151
1152
  }
1152
- function gn(e, n, r, i) {
1153
+ function yn(e, n, r, i) {
1153
1154
  var t, o, l, a;
1154
- for (F.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)
1155
- o = t[l], G.call(n, o) || (ar(n, o, r[o]), i[o] = !0);
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)
1156
+ o = t[l], G.call(n, o) || (cr(n, o, r[o]), i[o] = !0);
1156
1157
  }
1157
- function ie(e, n, r, i, t, o, l, a, s) {
1158
+ function te(e, n, r, i, t, o, l, a, s) {
1158
1159
  var c, u;
1159
1160
  if (Array.isArray(t))
1160
1161
  for (t = Array.prototype.slice.call(t), c = 0, u = t.length; c < u; c += 1)
1161
- Array.isArray(t[c]) && v(e, "nested arrays are not supported inside keys"), typeof t == "object" && pn(t[c]) === "[object Object]" && (t[c] = "[object Object]");
1162
- if (typeof t == "object" && pn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge")
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]");
1163
+ if (typeof t == "object" && hn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge")
1163
1164
  if (Array.isArray(o))
1164
1165
  for (c = 0, u = o.length; c < u; c += 1)
1165
- gn(e, n, o[c], r);
1166
+ yn(e, n, o[c], r);
1166
1167
  else
1167
- gn(e, n, o, r);
1168
+ yn(e, n, o, r);
1168
1169
  else
1169
- !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")), ar(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, y(e, "duplicated mapping key")), cr(n, t, o), delete r[t];
1170
1171
  return n;
1171
1172
  }
1172
- function qe(e) {
1173
+ function Ve(e) {
1173
1174
  var n;
1174
- 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;
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
1176
  }
1176
- function O(e, n, r) {
1177
+ function F(e, n, r) {
1177
1178
  for (var i = 0, t = e.input.charCodeAt(e.position); t !== 0; ) {
1178
- for (; X(t); )
1179
+ for (; Q(t); )
1179
1180
  t === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), t = e.input.charCodeAt(++e.position);
1180
1181
  if (n && t === 35)
1181
1182
  do
1182
1183
  t = e.input.charCodeAt(++e.position);
1183
1184
  while (t !== 10 && t !== 13 && t !== 0);
1184
- if (z(t))
1185
- for (qe(e), t = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; t === 32; )
1185
+ if (H(t))
1186
+ for (Ve(e), t = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; t === 32; )
1186
1187
  e.lineIndent++, t = e.input.charCodeAt(++e.position);
1187
1188
  else
1188
1189
  break;
1189
1190
  }
1190
- return r !== -1 && i !== 0 && e.lineIndent < r && Ee(e, "deficient indentation"), i;
1191
+ return r !== -1 && i !== 0 && e.lineIndent < r && Se(e, "deficient indentation"), i;
1191
1192
  }
1192
1193
  function Fe(e) {
1193
1194
  var n = e.position, r;
1194
- return r = e.input.charCodeAt(n), !!((r === 45 || r === 46) && r === e.input.charCodeAt(n + 1) && r === e.input.charCodeAt(n + 2) && (n += 3, r = e.input.charCodeAt(n), r === 0 || D(r)));
1195
+ return r = e.input.charCodeAt(n), !!((r === 45 || r === 46) && r === e.input.charCodeAt(n + 1) && r === e.input.charCodeAt(n + 2) && (n += 3, r = e.input.charCodeAt(n), r === 0 || U(r)));
1195
1196
  }
1196
- function Ge(e, n) {
1197
- n === 1 ? e.result += " " : n > 1 && (e.result += F.repeat(`
1197
+ function Xe(e, n) {
1198
+ n === 1 ? e.result += " " : n > 1 && (e.result += T.repeat(`
1198
1199
  `, n - 1));
1199
1200
  }
1200
- function it(e, n, r) {
1201
- var i, t, o, l, a, s, c, u, f = e.kind, h = e.result, d;
1202
- if (d = e.input.charCodeAt(e.position), D(d) || re(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (t = e.input.charCodeAt(e.position + 1), D(t) || r && re(t)))
1201
+ function lt(e, n, r) {
1202
+ var i, t, o, l, a, s, c, u, f = e.kind, d = e.result, g;
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)))
1203
1204
  return !1;
1204
- for (e.kind = "scalar", e.result = "", o = l = e.position, a = !1; d !== 0; ) {
1205
- if (d === 58) {
1206
- if (t = e.input.charCodeAt(e.position + 1), D(t) || r && re(t))
1205
+ for (e.kind = "scalar", e.result = "", o = l = e.position, a = !1; g !== 0; ) {
1206
+ if (g === 58) {
1207
+ if (t = e.input.charCodeAt(e.position + 1), U(t) || r && ie(t))
1207
1208
  break;
1208
- } else if (d === 35) {
1209
- if (i = e.input.charCodeAt(e.position - 1), D(i))
1209
+ } else if (g === 35) {
1210
+ if (i = e.input.charCodeAt(e.position - 1), U(i))
1210
1211
  break;
1211
1212
  } else {
1212
- if (e.position === e.lineStart && Fe(e) || r && re(d))
1213
+ if (e.position === e.lineStart && Fe(e) || r && ie(g))
1213
1214
  break;
1214
- if (z(d))
1215
- if (s = e.line, c = e.lineStart, u = e.lineIndent, O(e, !1, -1), e.lineIndent >= n) {
1216
- a = !0, d = e.input.charCodeAt(e.position);
1215
+ if (H(g))
1216
+ if (s = e.line, c = e.lineStart, u = e.lineIndent, F(e, !1, -1), e.lineIndent >= n) {
1217
+ a = !0, g = e.input.charCodeAt(e.position);
1217
1218
  continue;
1218
1219
  } else {
1219
1220
  e.position = l, e.line = s, e.lineStart = c, e.lineIndent = u;
1220
1221
  break;
1221
1222
  }
1222
1223
  }
1223
- a && (q(e, o, l, !1), Ge(e, e.line - s), o = l = e.position, a = !1), X(d) || (l = e.position + 1), d = e.input.charCodeAt(++e.position);
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);
1224
1225
  }
1225
- return q(e, o, l, !1), e.result ? !0 : (e.kind = f, e.result = h, !1);
1226
+ return q(e, o, l, !1), e.result ? !0 : (e.kind = f, e.result = d, !1);
1226
1227
  }
1227
- function tt(e, n) {
1228
+ function at(e, n) {
1228
1229
  var r, i, t;
1229
1230
  if (r = e.input.charCodeAt(e.position), r !== 39)
1230
1231
  return !1;
@@ -1234,10 +1235,10 @@ function tt(e, n) {
1234
1235
  i = e.position, e.position++, t = e.position;
1235
1236
  else
1236
1237
  return !0;
1237
- else z(r) ? (q(e, i, t, !0), Ge(e, O(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);
1238
- v(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) ? 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");
1239
1240
  }
1240
- function ot(e, n) {
1241
+ function st(e, n) {
1241
1242
  var r, i, t, o, l, a;
1242
1243
  if (a = e.input.charCodeAt(e.position), a !== 34)
1243
1244
  return !1;
@@ -1245,37 +1246,37 @@ function ot(e, n) {
1245
1246
  if (a === 34)
1246
1247
  return q(e, r, e.position, !0), e.position++, !0;
1247
1248
  if (a === 92) {
1248
- if (q(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), z(a))
1249
- O(e, !1, n);
1250
- else if (a < 256 && sr[a])
1251
- e.result += cr[a], e.position++;
1252
- else if ((l = Zi(a)) > 0) {
1249
+ if (q(e, r, e.position, !0), a = e.input.charCodeAt(++e.position), H(a))
1250
+ F(e, !1, n);
1251
+ else if (a < 256 && ur[a])
1252
+ e.result += fr[a], e.position++;
1253
+ else if ((l = rt(a)) > 0) {
1253
1254
  for (t = l, o = 0; t > 0; t--)
1254
- a = e.input.charCodeAt(++e.position), (l = Ji(a)) >= 0 ? o = (o << 4) + l : v(e, "expected hexadecimal character");
1255
- e.result += nt(o), e.position++;
1255
+ a = e.input.charCodeAt(++e.position), (l = nt(a)) >= 0 ? o = (o << 4) + l : y(e, "expected hexadecimal character");
1256
+ e.result += tt(o), e.position++;
1256
1257
  } else
1257
- v(e, "unknown escape sequence");
1258
+ y(e, "unknown escape sequence");
1258
1259
  r = i = e.position;
1259
- } else z(a) ? (q(e, r, i, !0), Ge(e, O(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);
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
1261
  }
1261
- v(e, "unexpected end of the stream within a double quoted scalar");
1262
+ y(e, "unexpected end of the stream within a double quoted scalar");
1262
1263
  }
1263
- function lt(e, n) {
1264
- var r = !0, i, t, o, l = e.tag, a, s = e.anchor, c, u, f, h, d, m = /* @__PURE__ */ Object.create(null), g, b, C, x;
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
1266
  if (x = e.input.charCodeAt(e.position), x === 91)
1266
- u = 93, d = !1, a = [];
1267
+ u = 93, g = !1, a = [];
1267
1268
  else if (x === 123)
1268
- u = 125, d = !0, a = {};
1269
+ u = 125, g = !0, a = {};
1269
1270
  else
1270
1271
  return !1;
1271
1272
  for (e.anchor !== null && (e.anchorMap[e.anchor] = a), x = e.input.charCodeAt(++e.position); x !== 0; ) {
1272
- if (O(e, !0, n), x = e.input.charCodeAt(e.position), x === u)
1273
- return e.position++, e.tag = l, e.anchor = s, e.kind = d ? "mapping" : "sequence", e.result = a, !0;
1274
- r ? x === 44 && v(e, "expected the node content, but found ','") : v(e, "missed comma between flow collection entries"), b = g = C = null, f = h = !1, x === 63 && (c = e.input.charCodeAt(e.position + 1), D(c) && (f = h = !0, e.position++, O(e, !0, n))), i = e.line, t = e.lineStart, o = e.position, te(e, n, Ce, !1, !0), b = e.tag, g = e.result, O(e, !0, n), x = e.input.charCodeAt(e.position), (h || e.line === i) && x === 58 && (f = !0, x = e.input.charCodeAt(++e.position), O(e, !0, n), te(e, n, Ce, !1, !0), C = e.result), d ? ie(e, a, m, b, g, C, i, t, o) : f ? a.push(ie(e, null, m, b, g, C, i, t, o)) : a.push(g), O(e, !0, n), x = e.input.charCodeAt(e.position), x === 44 ? (r = !0, x = e.input.charCodeAt(++e.position)) : r = !1;
1273
+ if (F(e, !0, n), x = e.input.charCodeAt(e.position), x === u)
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
1276
  }
1276
- v(e, "unexpected end of the stream within a flow collection");
1277
+ y(e, "unexpected end of the stream within a flow collection");
1277
1278
  }
1278
- function at(e, n) {
1279
+ function ut(e, n) {
1279
1280
  var r, i, t = Re, o = !1, l = !1, a = n, s = 0, c = !1, u, f;
1280
1281
  if (f = e.input.charCodeAt(e.position), f === 124)
1281
1282
  i = !1;
@@ -1285,225 +1286,225 @@ function at(e, n) {
1285
1286
  return !1;
1286
1287
  for (e.kind = "scalar", e.result = ""; f !== 0; )
1287
1288
  if (f = e.input.charCodeAt(++e.position), f === 43 || f === 45)
1288
- Re === t ? t = f === 43 ? fn : Gi : v(e, "repeat of a chomping mode identifier");
1289
- else if ((u = et(f)) >= 0)
1290
- 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);
1289
+ Re === t ? t = f === 43 ? dn : Qi : y(e, "repeat of a chomping mode identifier");
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
1292
  else
1292
1293
  break;
1293
- if (X(f)) {
1294
+ if (Q(f)) {
1294
1295
  do
1295
1296
  f = e.input.charCodeAt(++e.position);
1296
- while (X(f));
1297
+ while (Q(f));
1297
1298
  if (f === 35)
1298
1299
  do
1299
1300
  f = e.input.charCodeAt(++e.position);
1300
- while (!z(f) && f !== 0);
1301
+ while (!H(f) && f !== 0);
1301
1302
  }
1302
1303
  for (; f !== 0; ) {
1303
- for (qe(e), e.lineIndent = 0, f = e.input.charCodeAt(e.position); (!l || e.lineIndent < a) && f === 32; )
1304
+ for (Ve(e), e.lineIndent = 0, f = e.input.charCodeAt(e.position); (!l || e.lineIndent < a) && f === 32; )
1304
1305
  e.lineIndent++, f = e.input.charCodeAt(++e.position);
1305
- if (!l && e.lineIndent > a && (a = e.lineIndent), z(f)) {
1306
+ if (!l && e.lineIndent > a && (a = e.lineIndent), H(f)) {
1306
1307
  s++;
1307
1308
  continue;
1308
1309
  }
1309
1310
  if (e.lineIndent < a) {
1310
- t === fn ? e.result += F.repeat(`
1311
+ t === dn ? e.result += T.repeat(`
1311
1312
  `, o ? 1 + s : s) : t === Re && o && (e.result += `
1312
1313
  `);
1313
1314
  break;
1314
1315
  }
1315
- for (i ? X(f) ? (c = !0, e.result += F.repeat(`
1316
- `, o ? 1 + s : s)) : c ? (c = !1, e.result += F.repeat(`
1317
- `, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += F.repeat(`
1318
- `, s) : e.result += F.repeat(`
1319
- `, o ? 1 + s : s), o = !0, l = !0, s = 0, r = e.position; !z(f) && f !== 0; )
1316
+ for (i ? Q(f) ? (c = !0, e.result += T.repeat(`
1317
+ `, o ? 1 + s : s)) : c ? (c = !1, e.result += T.repeat(`
1318
+ `, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += T.repeat(`
1319
+ `, s) : e.result += T.repeat(`
1320
+ `, o ? 1 + s : s), o = !0, l = !0, s = 0, r = e.position; !H(f) && f !== 0; )
1320
1321
  f = e.input.charCodeAt(++e.position);
1321
1322
  q(e, r, e.position, !1);
1322
1323
  }
1323
1324
  return !0;
1324
1325
  }
1325
- function mn(e, n) {
1326
+ function vn(e, n) {
1326
1327
  var r, i = e.tag, t = e.anchor, o = [], l, a = !1, s;
1327
1328
  if (e.firstTabInLine !== -1) return !1;
1328
- 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), !D(l)))); ) {
1329
- if (a = !0, e.position++, O(e, !0, -1) && e.lineIndent <= n) {
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)))); ) {
1330
+ if (a = !0, e.position++, F(e, !0, -1) && e.lineIndent <= n) {
1330
1331
  o.push(null), s = e.input.charCodeAt(e.position);
1331
1332
  continue;
1332
1333
  }
1333
- if (r = e.line, te(e, n, tr, !1, !0), o.push(e.result), O(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && s !== 0)
1334
- v(e, "bad indentation of a sequence entry");
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
1336
  else if (e.lineIndent < n)
1336
1337
  break;
1337
1338
  }
1338
1339
  return a ? (e.tag = i, e.anchor = t, e.kind = "sequence", e.result = o, !0) : !1;
1339
1340
  }
1340
- function st(e, n, r) {
1341
- var i, t, o, l, a, s, c = e.tag, u = e.anchor, f = {}, h = /* @__PURE__ */ Object.create(null), d = null, m = null, g = null, b = !1, C = !1, x;
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
1343
  if (e.firstTabInLine !== -1) return !1;
1343
1344
  for (e.anchor !== null && (e.anchorMap[e.anchor] = f), x = e.input.charCodeAt(e.position); x !== 0; ) {
1344
- 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) && D(i))
1345
- x === 63 ? (b && (ie(e, f, h, d, m, null, l, a, s), d = m = g = 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;
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;
1346
1347
  else {
1347
- if (l = e.line, a = e.lineStart, s = e.position, !te(e, r, ir, !1, !0))
1348
+ if (l = e.line, a = e.lineStart, s = e.position, !oe(e, r, or, !1, !0))
1348
1349
  break;
1349
1350
  if (e.line === o) {
1350
- for (x = e.input.charCodeAt(e.position); X(x); )
1351
+ for (x = e.input.charCodeAt(e.position); Q(x); )
1351
1352
  x = e.input.charCodeAt(++e.position);
1352
1353
  if (x === 58)
1353
- x = e.input.charCodeAt(++e.position), D(x) || v(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (ie(e, f, h, d, m, null, l, a, s), d = m = g = null), C = !0, b = !1, t = !1, d = e.tag, m = e.result;
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
1355
  else if (C)
1355
- v(e, "can not read an implicit mapping pair; a colon is missed");
1356
+ y(e, "can not read an implicit mapping pair; a colon is missed");
1356
1357
  else
1357
1358
  return e.tag = c, e.anchor = u, !0;
1358
1359
  } else if (C)
1359
- v(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1360
+ y(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
1360
1361
  else
1361
1362
  return e.tag = c, e.anchor = u, !0;
1362
1363
  }
1363
- if ((e.line === o || e.lineIndent > n) && (b && (l = e.line, a = e.lineStart, s = e.position), te(e, n, ke, !0, t) && (b ? m = e.result : g = e.result), b || (ie(e, f, h, d, m, g, l, a, s), d = m = g = null), O(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > n) && x !== 0)
1364
- v(e, "bad indentation of a mapping entry");
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");
1365
1366
  else if (e.lineIndent < n)
1366
1367
  break;
1367
1368
  }
1368
- return b && ie(e, f, h, d, m, null, l, a, s), C && (e.tag = c, e.anchor = u, e.kind = "mapping", e.result = f), C;
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
1370
  }
1370
- function ct(e) {
1371
+ function pt(e) {
1371
1372
  var n, r = !1, i = !1, t, o, l;
1372
1373
  if (l = e.input.charCodeAt(e.position), l !== 33) return !1;
1373
- 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) {
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
1375
  do
1375
1376
  l = e.input.charCodeAt(++e.position);
1376
1377
  while (l !== 0 && l !== 62);
1377
- 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");
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
1379
  } else {
1379
- for (; l !== 0 && !D(l); )
1380
- l === 33 && (i ? v(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), or.test(t) || v(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), l = e.input.charCodeAt(++e.position);
1381
- o = e.input.slice(n, e.position), Qi.test(o) && v(e, "tag suffix cannot contain flow indicator characters");
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");
1382
1383
  }
1383
- o && !lr.test(o) && v(e, "tag name cannot contain such characters: " + o);
1384
+ o && !sr.test(o) && y(e, "tag name cannot contain such characters: " + o);
1384
1385
  try {
1385
1386
  o = decodeURIComponent(o);
1386
1387
  } catch {
1387
- v(e, "tag name is malformed: " + o);
1388
+ y(e, "tag name is malformed: " + o);
1388
1389
  }
1389
- 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;
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
1391
  }
1391
- function ut(e) {
1392
+ function dt(e) {
1392
1393
  var n, r;
1393
1394
  if (r = e.input.charCodeAt(e.position), r !== 38) return !1;
1394
- for (e.anchor !== null && v(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !D(r) && !re(r); )
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
1396
  r = e.input.charCodeAt(++e.position);
1396
- 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;
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
1398
  }
1398
- function ft(e) {
1399
+ function ht(e) {
1399
1400
  var n, r, i;
1400
1401
  if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
1401
- for (i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !D(i) && !re(i); )
1402
+ for (i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !U(i) && !ie(i); )
1402
1403
  i = e.input.charCodeAt(++e.position);
1403
- 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], O(e, !0, -1), !0;
1404
- }
1405
- function te(e, n, r, i, t) {
1406
- var o, l, a, s = 1, c = !1, u = !1, f, h, d, m, g, b;
1407
- 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 || tr === r, i && O(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1)
1408
- for (; ct(e) || ut(e); )
1409
- O(e, !0, -1) ? (c = !0, a = o, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : a = !1;
1410
- if (a && (a = c || t), (s === 1 || ke === r) && (Ce === r || ir === r ? g = n : g = n + 1, b = e.position - e.lineStart, s === 1 ? a && (mn(e, b) || st(e, b, g)) || lt(e, g) ? u = !0 : (l && at(e, g) || tt(e, g) || ot(e, g) ? u = !0 : ft(e) ? (u = !0, (e.tag !== null || e.anchor !== null) && v(e, "alias node should not have any properties")) : it(e, g, Ce === r) && (u = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (u = a && mn(e, b))), e.tag === null)
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;
1405
+ }
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)
1409
+ for (; pt(e) || dt(e); )
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
1412
  e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
1412
1413
  else if (e.tag === "?") {
1413
- 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)
1414
- if (m = e.implicitTypes[f], m.resolve(e.result)) {
1415
- e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
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);
1416
1417
  break;
1417
1418
  }
1418
1419
  } else if (e.tag !== "!") {
1419
1420
  if (G.call(e.typeMap[e.kind || "fallback"], e.tag))
1420
- m = e.typeMap[e.kind || "fallback"][e.tag];
1421
+ v = e.typeMap[e.kind || "fallback"][e.tag];
1421
1422
  else
1422
- for (m = null, d = e.typeMap.multi[e.kind || "fallback"], f = 0, h = d.length; f < h; f += 1)
1423
- if (e.tag.slice(0, d[f].tag.length) === d[f].tag) {
1424
- m = d[f];
1423
+ for (v = null, g = e.typeMap.multi[e.kind || "fallback"], f = 0, d = g.length; f < d; f += 1)
1424
+ if (e.tag.slice(0, g[f].tag.length) === g[f].tag) {
1425
+ v = g[f];
1425
1426
  break;
1426
1427
  }
1427
- m || v(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && v(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + m.kind + '", not "' + e.kind + '"'), m.resolve(e.result, e.tag) ? (e.result = m.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");
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
1429
  }
1429
1430
  return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || u;
1430
1431
  }
1431
- function pt(e) {
1432
+ function gt(e) {
1432
1433
  var n = e.position, r, i, t, o = !1, l;
1433
- 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 && (O(e, !0, -1), l = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || l !== 37)); ) {
1434
- for (o = !0, l = e.input.charCodeAt(++e.position), r = e.position; l !== 0 && !D(l); )
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
+ for (o = !0, l = e.input.charCodeAt(++e.position), r = e.position; l !== 0 && !U(l); )
1435
1436
  l = e.input.charCodeAt(++e.position);
1436
- 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; ) {
1437
- for (; X(l); )
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; ) {
1438
+ for (; Q(l); )
1438
1439
  l = e.input.charCodeAt(++e.position);
1439
1440
  if (l === 35) {
1440
1441
  do
1441
1442
  l = e.input.charCodeAt(++e.position);
1442
- while (l !== 0 && !z(l));
1443
+ while (l !== 0 && !H(l));
1443
1444
  break;
1444
1445
  }
1445
- if (z(l)) break;
1446
- for (r = e.position; l !== 0 && !D(l); )
1446
+ if (H(l)) break;
1447
+ for (r = e.position; l !== 0 && !U(l); )
1447
1448
  l = e.input.charCodeAt(++e.position);
1448
1449
  t.push(e.input.slice(r, e.position));
1449
1450
  }
1450
- l !== 0 && qe(e), G.call(hn, i) ? hn[i](e, i, t) : Ee(e, 'unknown document directive "' + i + '"');
1451
+ l !== 0 && Ve(e), G.call(mn, i) ? mn[i](e, i, t) : Se(e, 'unknown document directive "' + i + '"');
1451
1452
  }
1452
- if (O(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, O(e, !0, -1)) : o && v(e, "directives end mark is expected"), te(e, e.lineIndent - 1, ke, !1, !0), O(e, !0, -1), e.checkLineBreaks && Xi.test(e.input.slice(n, e.position)) && Ee(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Fe(e)) {
1453
- e.input.charCodeAt(e.position) === 46 && (e.position += 3, O(e, !0, -1));
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)) {
1454
+ e.input.charCodeAt(e.position) === 46 && (e.position += 3, F(e, !0, -1));
1454
1455
  return;
1455
1456
  }
1456
1457
  if (e.position < e.length - 1)
1457
- v(e, "end of the stream or a document separator is expected");
1458
+ y(e, "end of the stream or a document separator is expected");
1458
1459
  else
1459
1460
  return;
1460
1461
  }
1461
- function fr(e, n) {
1462
+ function dr(e, n) {
1462
1463
  e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
1463
1464
  `), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
1464
- var r = new rt(e, n), i = e.indexOf("\0");
1465
- for (i !== -1 && (r.position = i, v(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; )
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
1467
  r.lineIndent += 1, r.position += 1;
1467
1468
  for (; r.position < r.length - 1; )
1468
- pt(r);
1469
+ gt(r);
1469
1470
  return r.documents;
1470
1471
  }
1471
- function dt(e, n, r) {
1472
+ function mt(e, n, r) {
1472
1473
  n !== null && typeof n == "object" && typeof r > "u" && (r = n, n = null);
1473
- var i = fr(e, r);
1474
+ var i = dr(e, r);
1474
1475
  if (typeof n != "function")
1475
1476
  return i;
1476
1477
  for (var t = 0, o = i.length; t < o; t += 1)
1477
1478
  n(i[t]);
1478
1479
  }
1479
- function ht(e, n) {
1480
- var r = fr(e, n);
1480
+ function yt(e, n) {
1481
+ var r = dr(e, n);
1481
1482
  if (r.length !== 0) {
1482
1483
  if (r.length === 1)
1483
1484
  return r[0];
1484
- throw new I("expected a single document in the stream, but found more");
1485
- }
1486
- }
1487
- var gt = dt, mt = ht, pr = {
1488
- loadAll: gt,
1489
- load: mt
1490
- }, dr = Object.prototype.toString, hr = Object.prototype.hasOwnProperty, Ve = 65279, yt = 9, pe = 10, vt = 13, xt = 32, wt = 33, bt = 34, $e = 35, At = 37, Ct = 38, kt = 39, Et = 42, gr = 44, St = 45, Se = 58, _t = 61, Ot = 62, Ft = 63, Tt = 64, mr = 91, yr = 93, Lt = 96, vr = 123, jt = 124, xr = 125, L = {};
1491
- L[0] = "\\0";
1492
- L[7] = "\\a";
1493
- L[8] = "\\b";
1494
- L[9] = "\\t";
1495
- L[10] = "\\n";
1496
- L[11] = "\\v";
1497
- L[12] = "\\f";
1498
- L[13] = "\\r";
1499
- L[27] = "\\e";
1500
- L[34] = '\\"';
1501
- L[92] = "\\\\";
1502
- L[133] = "\\N";
1503
- L[160] = "\\_";
1504
- L[8232] = "\\L";
1505
- L[8233] = "\\P";
1506
- var It = [
1485
+ throw new M("expected a single document in the stream, but found more");
1486
+ }
1487
+ }
1488
+ var vt = mt, xt = yt, hr = {
1489
+ loadAll: vt,
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 = {};
1492
+ N[0] = "\\0";
1493
+ N[7] = "\\a";
1494
+ N[8] = "\\b";
1495
+ N[9] = "\\t";
1496
+ N[10] = "\\n";
1497
+ N[11] = "\\v";
1498
+ N[12] = "\\f";
1499
+ N[13] = "\\r";
1500
+ N[27] = "\\e";
1501
+ N[34] = '\\"';
1502
+ N[92] = "\\\\";
1503
+ N[133] = "\\N";
1504
+ N[160] = "\\_";
1505
+ N[8232] = "\\L";
1506
+ N[8233] = "\\P";
1507
+ var Pt = [
1507
1508
  "y",
1508
1509
  "Y",
1509
1510
  "yes",
@@ -1520,15 +1521,15 @@ var It = [
1520
1521
  "off",
1521
1522
  "Off",
1522
1523
  "OFF"
1523
- ], Nt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1524
- function Rt(e, n) {
1524
+ ], Mt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
1525
+ function Dt(e, n) {
1525
1526
  var r, i, t, o, l, a, s;
1526
1527
  if (n === null) return {};
1527
1528
  for (r = {}, i = Object.keys(n), t = 0, o = i.length; t < o; t += 1)
1528
- l = i[t], a = String(n[l]), l.slice(0, 2) === "!!" && (l = "tag:yaml.org,2002:" + l.slice(2)), s = e.compiledTypeMap.fallback[l], s && hr.call(s.styleAliases, a) && (a = s.styleAliases[a]), r[l] = a;
1529
+ l = i[t], a = String(n[l]), l.slice(0, 2) === "!!" && (l = "tag:yaml.org,2002:" + l.slice(2)), s = e.compiledTypeMap.fallback[l], s && mr.call(s.styleAliases, a) && (a = s.styleAliases[a]), r[l] = a;
1529
1530
  return r;
1530
1531
  }
1531
- function Mt(e) {
1532
+ function $t(e) {
1532
1533
  var n, r, i;
1533
1534
  if (n = e.toString(16).toUpperCase(), e <= 255)
1534
1535
  r = "x", i = 2;
@@ -1537,15 +1538,15 @@ function Mt(e) {
1537
1538
  else if (e <= 4294967295)
1538
1539
  r = "U", i = 8;
1539
1540
  else
1540
- throw new I("code point within a string may not be greater than 0xFFFFFFFF");
1541
- return "\\" + r + F.repeat("0", i - n.length) + n;
1541
+ throw new M("code point within a string may not be greater than 0xFFFFFFFF");
1542
+ return "\\" + r + T.repeat("0", i - n.length) + n;
1542
1543
  }
1543
- var Pt = 1, de = 2;
1544
- function Dt(e) {
1545
- this.schema = e.schema || We, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = F.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Rt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? de : Pt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1544
+ var Bt = 1, de = 2;
1545
+ function zt(e) {
1546
+ this.schema = e.schema || Ge, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = T.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Dt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? de : Bt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1546
1547
  }
1547
- function yn(e, n) {
1548
- for (var r = F.repeat(" ", n), i = 0, t = -1, o = "", l, a = e.length; i < a; )
1548
+ function xn(e, n) {
1549
+ for (var r = T.repeat(" ", n), i = 0, t = -1, o = "", l, a = e.length; i < a; )
1549
1550
  t = e.indexOf(`
1550
1551
  `, i), t === -1 ? (l = e.slice(i), i = a) : (l = e.slice(i, t + 1), i = t + 1), l.length && l !== `
1551
1552
  ` && (o += r), o += l;
@@ -1553,9 +1554,9 @@ function yn(e, n) {
1553
1554
  }
1554
1555
  function Ue(e, n) {
1555
1556
  return `
1556
- ` + F.repeat(" ", e.indent * n);
1557
+ ` + T.repeat(" ", e.indent * n);
1557
1558
  }
1558
- function Bt(e, n) {
1559
+ function Ut(e, n) {
1559
1560
  var r, i, t;
1560
1561
  for (r = 0, i = e.implicitTypes.length; r < i; r += 1)
1561
1562
  if (t = e.implicitTypes[r], t.resolve(n))
@@ -1563,71 +1564,71 @@ function Bt(e, n) {
1563
1564
  return !1;
1564
1565
  }
1565
1566
  function _e(e) {
1566
- return e === xt || e === yt;
1567
+ return e === At || e === wt;
1567
1568
  }
1568
1569
  function he(e) {
1569
- return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Ve || 65536 <= e && e <= 1114111;
1570
+ return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Qe || 65536 <= e && e <= 1114111;
1570
1571
  }
1571
- function vn(e) {
1572
- return he(e) && e !== Ve && e !== vt && e !== pe;
1572
+ function wn(e) {
1573
+ return he(e) && e !== Qe && e !== bt && e !== pe;
1573
1574
  }
1574
- function xn(e, n, r) {
1575
- var i = vn(e), t = i && !_e(e);
1575
+ function bn(e, n, r) {
1576
+ var i = wn(e), t = i && !_e(e);
1576
1577
  return (
1577
1578
  // ns-plain-safe
1578
1579
  (r ? (
1579
1580
  // c = flow-in
1580
1581
  i
1581
- ) : i && e !== gr && e !== mr && e !== yr && e !== vr && e !== xr) && e !== $e && !(n === Se && !t) || vn(n) && !_e(n) && e === $e || n === Se && t
1582
+ ) : i && e !== yr && e !== vr && e !== xr && e !== wr && e !== br) && e !== ze && !(n === Ee && !t) || wn(n) && !_e(n) && e === ze || n === Ee && t
1582
1583
  );
1583
1584
  }
1584
- function $t(e) {
1585
- return he(e) && e !== Ve && !_e(e) && e !== St && e !== Ft && e !== Se && e !== gr && e !== mr && e !== yr && e !== vr && e !== xr && e !== $e && e !== Ct && e !== Et && e !== wt && e !== jt && e !== _t && e !== Ot && e !== kt && e !== bt && e !== At && e !== Tt && e !== Lt;
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
1587
  }
1587
- function Ut(e) {
1588
- return !_e(e) && e !== Se;
1588
+ function Ht(e) {
1589
+ return !_e(e) && e !== Ee;
1589
1590
  }
1590
1591
  function ue(e, n) {
1591
1592
  var r = e.charCodeAt(n), i;
1592
1593
  return r >= 55296 && r <= 56319 && n + 1 < e.length && (i = e.charCodeAt(n + 1), i >= 56320 && i <= 57343) ? (r - 55296) * 1024 + i - 56320 + 65536 : r;
1593
1594
  }
1594
- function wr(e) {
1595
+ function Ar(e) {
1595
1596
  var n = /^\n* /;
1596
1597
  return n.test(e);
1597
1598
  }
1598
- var br = 1, ze = 2, Ar = 3, Cr = 4, ne = 5;
1599
- function zt(e, n, r, i, t, o, l, a) {
1600
- var s, c = 0, u = null, f = !1, h = !1, d = i !== -1, m = -1, g = $t(ue(e, 0)) && Ut(ue(e, e.length - 1));
1599
+ var Cr = 1, Ye = 2, kr = 3, Sr = 4, re = 5;
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
1602
  if (n || l)
1602
1603
  for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1603
1604
  if (c = ue(e, s), !he(c))
1604
- return ne;
1605
- g = g && xn(c, u, a), u = c;
1605
+ return re;
1606
+ h = h && bn(c, u, a), u = c;
1606
1607
  }
1607
1608
  else {
1608
1609
  for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
1609
1610
  if (c = ue(e, s), c === pe)
1610
- f = !0, d && (h = h || // Foldable line = too long, and not more-indented.
1611
- s - m - 1 > i && e[m + 1] !== " ", m = s);
1611
+ f = !0, g && (d = d || // Foldable line = too long, and not more-indented.
1612
+ s - v - 1 > i && e[v + 1] !== " ", v = s);
1612
1613
  else if (!he(c))
1613
- return ne;
1614
- g = g && xn(c, u, a), u = c;
1614
+ return re;
1615
+ h = h && bn(c, u, a), u = c;
1615
1616
  }
1616
- h = h || d && s - m - 1 > i && e[m + 1] !== " ";
1617
+ d = d || g && s - v - 1 > i && e[v + 1] !== " ";
1617
1618
  }
1618
- return !f && !h ? g && !l && !t(e) ? br : o === de ? ne : ze : r > 9 && wr(e) ? ne : l ? o === de ? ne : ze : h ? Cr : Ar;
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
1620
  }
1620
- function Yt(e, n, r, i, t) {
1621
+ function Wt(e, n, r, i, t) {
1621
1622
  e.dump = (function() {
1622
1623
  if (n.length === 0)
1623
1624
  return e.quotingType === de ? '""' : "''";
1624
- if (!e.noCompatMode && (It.indexOf(n) !== -1 || Nt.test(n)))
1625
+ if (!e.noCompatMode && (Pt.indexOf(n) !== -1 || Mt.test(n)))
1625
1626
  return e.quotingType === de ? '"' + n + '"' : "'" + n + "'";
1626
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;
1627
1628
  function s(c) {
1628
- return Bt(e, c);
1629
+ return Ut(e, c);
1629
1630
  }
1630
- switch (zt(
1631
+ switch (Kt(
1631
1632
  n,
1632
1633
  a,
1633
1634
  e.indent,
@@ -1637,47 +1638,47 @@ function Yt(e, n, r, i, t) {
1637
1638
  e.forceQuotes && !i,
1638
1639
  t
1639
1640
  )) {
1640
- case br:
1641
+ case Cr:
1641
1642
  return n;
1642
- case ze:
1643
+ case Ye:
1643
1644
  return "'" + n.replace(/'/g, "''") + "'";
1644
- case Ar:
1645
- return "|" + wn(n, e.indent) + bn(yn(n, o));
1646
- case Cr:
1647
- return ">" + wn(n, e.indent) + bn(yn(Ht(n, l), o));
1648
- case ne:
1649
- return '"' + Kt(n) + '"';
1645
+ case kr:
1646
+ return "|" + An(n, e.indent) + Cn(xn(n, o));
1647
+ case Sr:
1648
+ return ">" + An(n, e.indent) + Cn(xn(qt(n, l), o));
1649
+ case re:
1650
+ return '"' + Gt(n) + '"';
1650
1651
  default:
1651
- throw new I("impossible error: invalid scalar style");
1652
+ throw new M("impossible error: invalid scalar style");
1652
1653
  }
1653
1654
  })();
1654
1655
  }
1655
- function wn(e, n) {
1656
- var r = wr(e) ? String(n) : "", i = e[e.length - 1] === `
1656
+ function An(e, n) {
1657
+ var r = Ar(e) ? String(n) : "", i = e[e.length - 1] === `
1657
1658
  `, t = i && (e[e.length - 2] === `
1658
1659
  ` || e === `
1659
1660
  `), o = t ? "+" : i ? "" : "-";
1660
1661
  return r + o + `
1661
1662
  `;
1662
1663
  }
1663
- function bn(e) {
1664
+ function Cn(e) {
1664
1665
  return e[e.length - 1] === `
1665
1666
  ` ? e.slice(0, -1) : e;
1666
1667
  }
1667
- function Ht(e, n) {
1668
+ function qt(e, n) {
1668
1669
  for (var r = /(\n+)([^\n]*)/g, i = (function() {
1669
1670
  var c = e.indexOf(`
1670
1671
  `);
1671
- return c = c !== -1 ? c : e.length, r.lastIndex = c, An(e.slice(0, c), n);
1672
+ return c = c !== -1 ? c : e.length, r.lastIndex = c, kn(e.slice(0, c), n);
1672
1673
  })(), t = e[0] === `
1673
1674
  ` || e[0] === " ", o, l; l = r.exec(e); ) {
1674
1675
  var a = l[1], s = l[2];
1675
1676
  o = s[0] === " ", i += a + (!t && !o && s !== "" ? `
1676
- ` : "") + An(s, n), t = o;
1677
+ ` : "") + kn(s, n), t = o;
1677
1678
  }
1678
1679
  return i;
1679
1680
  }
1680
- function An(e, n) {
1681
+ function kn(e, n) {
1681
1682
  if (e === "" || e[0] === " ") return e;
1682
1683
  for (var r = / [^ ]/g, i, t = 0, o, l = 0, a = 0, s = ""; i = r.exec(e); )
1683
1684
  a = i.index, a - t > n && (o = l > t ? l : a, s += `
@@ -1686,77 +1687,77 @@ function An(e, n) {
1686
1687
  `, e.length - t > n && l > t ? s += e.slice(t, l) + `
1687
1688
  ` + e.slice(l + 1) : s += e.slice(t), s.slice(1);
1688
1689
  }
1689
- function Kt(e) {
1690
+ function Gt(e) {
1690
1691
  for (var n = "", r = 0, i, t = 0; t < e.length; r >= 65536 ? t += 2 : t++)
1691
- r = ue(e, t), i = L[r], !i && he(r) ? (n += e[t], r >= 65536 && (n += e[t + 1])) : n += i || Mt(r);
1692
+ r = ue(e, t), i = N[r], !i && he(r) ? (n += e[t], r >= 65536 && (n += e[t + 1])) : n += i || $t(r);
1692
1693
  return n;
1693
1694
  }
1694
- function Wt(e, n, r) {
1695
+ function Vt(e, n, r) {
1695
1696
  var i = "", t = e.tag, o, l, a;
1696
1697
  for (o = 0, l = r.length; o < l; o += 1)
1697
- a = r[o], e.replacer && (a = e.replacer.call(r, String(o), a)), (K(e, n, a, !1, !1) || typeof a > "u" && K(e, n, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
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);
1698
1699
  e.tag = t, e.dump = "[" + i + "]";
1699
1700
  }
1700
- function Cn(e, n, r, i) {
1701
+ function Sn(e, n, r, i) {
1701
1702
  var t = "", o = e.tag, l, a, s;
1702
1703
  for (l = 0, a = r.length; l < a; l += 1)
1703
- s = r[l], e.replacer && (s = e.replacer.call(r, String(l), s)), (K(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && K(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);
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);
1704
1705
  e.tag = o, e.dump = t || "[]";
1705
1706
  }
1706
- function qt(e, n, r) {
1707
+ function Xt(e, n, r) {
1707
1708
  var i = "", t = e.tag, o = Object.keys(r), l, a, s, c, u;
1708
1709
  for (l = 0, a = o.length; l < a; l += 1)
1709
- u = "", i !== "" && (u += ", "), e.condenseFlow && (u += '"'), s = o[l], c = r[s], e.replacer && (c = e.replacer.call(r, s, c)), K(e, n, s, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), K(e, n, c, !1, !1) && (u += e.dump, i += u));
1710
+ u = "", i !== "" && (u += ", "), e.condenseFlow && (u += '"'), s = o[l], c = r[s], e.replacer && (c = e.replacer.call(r, s, c)), W(e, n, s, !1, !1) && (e.dump.length > 1024 && (u += "? "), u += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), W(e, n, c, !1, !1) && (u += e.dump, i += u));
1710
1711
  e.tag = t, e.dump = "{" + i + "}";
1711
1712
  }
1712
- function Gt(e, n, r, i) {
1713
- var t = "", o = e.tag, l = Object.keys(r), a, s, c, u, f, h;
1713
+ function Qt(e, n, r, i) {
1714
+ var t = "", o = e.tag, l = Object.keys(r), a, s, c, u, f, d;
1714
1715
  if (e.sortKeys === !0)
1715
1716
  l.sort();
1716
1717
  else if (typeof e.sortKeys == "function")
1717
1718
  l.sort(e.sortKeys);
1718
1719
  else if (e.sortKeys)
1719
- throw new I("sortKeys must be a boolean or a function");
1720
+ throw new M("sortKeys must be a boolean or a function");
1720
1721
  for (a = 0, s = l.length; a < s; a += 1)
1721
- h = "", (!i || t !== "") && (h += Ue(e, n)), c = l[a], u = r[c], e.replacer && (u = e.replacer.call(r, c, u)), K(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)), K(e, n + 1, u, !0, f) && (e.dump && pe === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, t += h));
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
1723
  e.tag = o, e.dump = t || "{}";
1723
1724
  }
1724
- function kn(e, n, r) {
1725
+ function En(e, n, r) {
1725
1726
  var i, t, o, l, a, s;
1726
1727
  for (t = r ? e.explicitTypes : e.implicitTypes, o = 0, l = t.length; o < l; o += 1)
1727
1728
  if (a = t[o], (a.instanceOf || a.predicate) && (!a.instanceOf || typeof n == "object" && n instanceof a.instanceOf) && (!a.predicate || a.predicate(n))) {
1728
1729
  if (r ? a.multi && a.representName ? e.tag = a.representName(n) : e.tag = a.tag : e.tag = "?", a.represent) {
1729
- if (s = e.styleMap[a.tag] || a.defaultStyle, dr.call(a.represent) === "[object Function]")
1730
+ if (s = e.styleMap[a.tag] || a.defaultStyle, gr.call(a.represent) === "[object Function]")
1730
1731
  i = a.represent(n, s);
1731
- else if (hr.call(a.represent, s))
1732
+ else if (mr.call(a.represent, s))
1732
1733
  i = a.represent[s](n, s);
1733
1734
  else
1734
- throw new I("!<" + a.tag + '> tag resolver accepts not "' + s + '" style');
1735
+ throw new M("!<" + a.tag + '> tag resolver accepts not "' + s + '" style');
1735
1736
  e.dump = i;
1736
1737
  }
1737
1738
  return !0;
1738
1739
  }
1739
1740
  return !1;
1740
1741
  }
1741
- function K(e, n, r, i, t, o, l) {
1742
- e.tag = null, e.dump = r, kn(e, r, !1) || kn(e, r, !0);
1743
- var a = dr.call(e.dump), s = i, c;
1742
+ function W(e, n, r, i, t, o, l) {
1743
+ e.tag = null, e.dump = r, En(e, r, !1) || En(e, r, !0);
1744
+ var a = gr.call(e.dump), s = i, c;
1744
1745
  i && (i = e.flowLevel < 0 || e.flowLevel > n);
1745
- var u = a === "[object Object]" || a === "[object Array]", f, h;
1746
- 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])
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])
1747
1748
  e.dump = "*ref_" + f;
1748
1749
  else {
1749
- if (u && h && !e.usedDuplicates[f] && (e.usedDuplicates[f] = !0), a === "[object Object]")
1750
- i && Object.keys(e.dump).length !== 0 ? (Gt(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (qt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
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));
1751
1752
  else if (a === "[object Array]")
1752
- i && e.dump.length !== 0 ? (e.noArrayIndent && !l && n > 0 ? Cn(e, n - 1, e.dump, t) : Cn(e, n, e.dump, t), h && (e.dump = "&ref_" + f + e.dump)) : (Wt(e, n, e.dump), h && (e.dump = "&ref_" + f + " " + e.dump));
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
1754
  else if (a === "[object String]")
1754
- e.tag !== "?" && Yt(e, e.dump, n, o, s);
1755
+ e.tag !== "?" && Wt(e, e.dump, n, o, s);
1755
1756
  else {
1756
1757
  if (a === "[object Undefined]")
1757
1758
  return !1;
1758
1759
  if (e.skipInvalid) return !1;
1759
- throw new I("unacceptable kind of an object to dump " + a);
1760
+ throw new M("unacceptable kind of an object to dump " + a);
1760
1761
  }
1761
1762
  e.tag !== null && e.tag !== "?" && (c = encodeURI(
1762
1763
  e.tag[0] === "!" ? e.tag.slice(1) : e.tag
@@ -1764,75 +1765,75 @@ function K(e, n, r, i, t, o, l) {
1764
1765
  }
1765
1766
  return !0;
1766
1767
  }
1767
- function Vt(e, n) {
1768
+ function Jt(e, n) {
1768
1769
  var r = [], i = [], t, o;
1769
- for (Ye(e, r, i), t = 0, o = i.length; t < o; t += 1)
1770
+ for (He(e, r, i), t = 0, o = i.length; t < o; t += 1)
1770
1771
  n.duplicates.push(r[i[t]]);
1771
1772
  n.usedDuplicates = new Array(o);
1772
1773
  }
1773
- function Ye(e, n, r) {
1774
+ function He(e, n, r) {
1774
1775
  var i, t, o;
1775
1776
  if (e !== null && typeof e == "object")
1776
1777
  if (t = n.indexOf(e), t !== -1)
1777
1778
  r.indexOf(t) === -1 && r.push(t);
1778
1779
  else if (n.push(e), Array.isArray(e))
1779
1780
  for (t = 0, o = e.length; t < o; t += 1)
1780
- Ye(e[t], n, r);
1781
+ He(e[t], n, r);
1781
1782
  else
1782
1783
  for (i = Object.keys(e), t = 0, o = i.length; t < o; t += 1)
1783
- Ye(e[i[t]], n, r);
1784
+ He(e[i[t]], n, r);
1784
1785
  }
1785
- function Xt(e, n) {
1786
+ function Zt(e, n) {
1786
1787
  n = n || {};
1787
- var r = new Dt(n);
1788
- r.noRefs || Vt(e, r);
1788
+ var r = new zt(n);
1789
+ r.noRefs || Jt(e, r);
1789
1790
  var i = e;
1790
- return r.replacer && (i = r.replacer.call({ "": i }, "", i)), K(r, 0, i, !0, !0) ? r.dump + `
1791
+ return r.replacer && (i = r.replacer.call({ "": i }, "", i)), W(r, 0, i, !0, !0) ? r.dump + `
1791
1792
  ` : "";
1792
1793
  }
1793
- var Qt = Xt, Jt = {
1794
- dump: Qt
1794
+ var eo = Zt, no = {
1795
+ dump: eo
1795
1796
  };
1796
- function Xe(e, n) {
1797
+ function Je(e, n) {
1797
1798
  return function() {
1798
1799
  throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default.");
1799
1800
  };
1800
1801
  }
1801
- var Zt = T, eo = Dn, no = zn, ro = qn, io = Gn, to = We, oo = pr.load, lo = pr.loadAll, ao = Jt.dump, so = I, co = {
1802
- binary: Zn,
1803
- float: Wn,
1804
- map: Un,
1805
- null: Yn,
1806
- pairs: nr,
1807
- set: rr,
1808
- timestamp: Qn,
1809
- bool: Hn,
1810
- int: Kn,
1811
- merge: Jn,
1812
- omap: er,
1813
- seq: $n,
1814
- str: Bn
1815
- }, uo = Xe("safeLoad", "load"), fo = Xe("safeLoadAll", "loadAll"), po = Xe("safeDump", "dump"), En = {
1816
- Type: Zt,
1817
- Schema: eo,
1818
- FAILSAFE_SCHEMA: no,
1819
- JSON_SCHEMA: ro,
1820
- CORE_SCHEMA: io,
1821
- DEFAULT_SCHEMA: to,
1822
- load: oo,
1823
- loadAll: lo,
1824
- dump: ao,
1825
- YAMLException: so,
1826
- types: co,
1827
- safeLoad: uo,
1828
- safeLoadAll: fo,
1829
- safeDump: 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 = M, po = {
1803
+ binary: nr,
1804
+ float: Gn,
1805
+ map: Yn,
1806
+ null: Kn,
1807
+ pairs: ir,
1808
+ set: tr,
1809
+ timestamp: Zn,
1810
+ bool: Wn,
1811
+ int: qn,
1812
+ merge: er,
1813
+ omap: rr,
1814
+ seq: Un,
1815
+ str: zn
1816
+ }, ho = Je("safeLoad", "load"), go = Je("safeLoadAll", "loadAll"), mo = Je("safeDump", "dump"), _n = {
1817
+ Type: ro,
1818
+ Schema: io,
1819
+ FAILSAFE_SCHEMA: to,
1820
+ JSON_SCHEMA: oo,
1821
+ CORE_SCHEMA: lo,
1822
+ DEFAULT_SCHEMA: ao,
1823
+ load: so,
1824
+ loadAll: co,
1825
+ dump: uo,
1826
+ YAMLException: fo,
1827
+ types: po,
1828
+ safeLoad: ho,
1829
+ safeLoadAll: go,
1830
+ safeDump: mo
1830
1831
  };
1831
1832
  const be = (e) => e instanceof Error ? e.message : String(e), Ae = (e, n) => {
1832
1833
  if (e && typeof e == "object" && !Array.isArray(e))
1833
1834
  return e;
1834
1835
  throw new Error(`Parsed --strings as ${n}, but it was not an object.`);
1835
- }, ho = (e, n) => {
1836
+ }, yo = (e, n) => {
1836
1837
  const r = e.trim();
1837
1838
  if (!r)
1838
1839
  return {};
@@ -1844,13 +1845,13 @@ const be = (e) => e instanceof Error ? e.message : String(e), Ae = (e, n) => {
1844
1845
  }
1845
1846
  if (n === "yaml")
1846
1847
  try {
1847
- return Ae(En.load(r), "yaml");
1848
+ return Ae(_n.load(r), "yaml");
1848
1849
  } catch (t) {
1849
1850
  throw new Error(`Failed to parse --strings as YAML. Hint: check --strings-format=yaml. ${be(t)}`);
1850
1851
  }
1851
1852
  const i = [];
1852
1853
  try {
1853
- return Ae(En.load(r), "yaml");
1854
+ return Ae(_n.load(r), "yaml");
1854
1855
  } catch (t) {
1855
1856
  i.push(`yaml error: ${be(t)}`);
1856
1857
  }
@@ -1861,7 +1862,7 @@ const be = (e) => e instanceof Error ? e.message : String(e), Ae = (e, n) => {
1861
1862
  }
1862
1863
  throw new Error(`Failed to parse --strings input. Provide valid YAML or JSON, or specify --strings-format. ${i.join(" | ")}`);
1863
1864
  };
1864
- async function kr() {
1865
+ async function Er() {
1865
1866
  return new Promise((e) => {
1866
1867
  let n = "";
1867
1868
  process.stdin.setEncoding("utf8"), process.stdin.on("data", (r) => {
@@ -1871,18 +1872,31 @@ async function kr() {
1871
1872
  }), process.stdin.readableEnded && e("");
1872
1873
  });
1873
1874
  }
1874
- const Er = (e, n) => {
1875
+ const _r = (e) => {
1876
+ if (e === void 0) return "translated";
1877
+ if ($e.includes(e))
1878
+ return e;
1879
+ throw new Error(`Invalid state "${e}". Allowed values: ${$e.join(", ")}.`);
1880
+ }, Or = (e, n) => {
1881
+ if (typeof e == "string")
1882
+ return { value: e, state: void 0 };
1883
+ if (e && typeof e == "object" && !Array.isArray(e)) {
1884
+ const r = e;
1885
+ if (typeof r.value != "string")
1886
+ throw new Error(`${n} must include a string "value".`);
1887
+ let i;
1888
+ return r.state !== void 0 && (i = _r(String(r.state))), { value: r.value, state: i };
1889
+ }
1890
+ throw new Error(`${n} must be a string or an object with "value" (and optional "state").`);
1891
+ }, Ke = (e, n) => {
1875
1892
  if (e === void 0) return;
1876
1893
  if (!e || typeof e != "object" || Array.isArray(e))
1877
1894
  throw new Error(`${n} must be an object of language -> text.`);
1878
1895
  const r = {};
1879
- for (const [i, t] of Object.entries(e)) {
1880
- if (typeof t != "string")
1881
- throw new Error(`${n} for "${i}" must be a string.`);
1882
- r[i] = t;
1883
- }
1896
+ for (const [i, t] of Object.entries(e))
1897
+ r[i] = Or(t, `${n} for "${i}"`);
1884
1898
  return r;
1885
- }, go = (e, n) => {
1899
+ }, vo = (e, n) => {
1886
1900
  if (e == null)
1887
1901
  return {};
1888
1902
  if (typeof e == "string")
@@ -1891,23 +1905,30 @@ const Er = (e, n) => {
1891
1905
  throw new Error(`Value for "${n}" must be an object.`);
1892
1906
  const r = e, i = {};
1893
1907
  typeof r.comment == "string" && (i.comment = r.comment);
1894
- const t = Er(r.translations, `translations for "${n}"`) || {}, o = {};
1908
+ const t = Ke(r.translations, `translations for "${n}"`) || {}, o = {};
1895
1909
  for (const [a, s] of Object.entries(r))
1896
- a === "comment" || a === "translations" || typeof s == "string" && (o[a] = s);
1910
+ a === "comment" || a === "translations" || (o[a] = Or(s, `Translation for "${a}" in "${n}"`));
1897
1911
  const l = { ...t, ...o };
1898
1912
  return Object.keys(l).length > 0 && (i.translations = l), i;
1899
- }, mo = (e) => Object.values(e).every((n) => typeof n == "string"), yo = (e) => {
1900
- if (mo(e))
1901
- return { kind: "single", translations: e };
1913
+ }, xo = (e) => {
1914
+ if (typeof e == "string") return !0;
1915
+ if (e && typeof e == "object" && !Array.isArray(e)) {
1916
+ const n = e;
1917
+ return typeof n.value == "string" && (n.state === void 0 || typeof n.state == "string");
1918
+ }
1919
+ return !1;
1920
+ }, wo = (e) => Object.values(e).every((n) => xo(n)), bo = (e) => {
1921
+ if (wo(e))
1922
+ return { kind: "single", translations: Ke(e, "translations") || {} };
1902
1923
  if (Object.keys(e).every((i) => i === "translations" || i === "comment") && "translations" in e) {
1903
- const i = Er(e.translations, "translations") || {}, t = typeof e.comment == "string" ? e.comment : void 0;
1924
+ const i = Ke(e.translations, "translations") || {}, t = typeof e.comment == "string" ? e.comment : void 0;
1904
1925
  return { kind: "single", translations: i, comment: t };
1905
1926
  }
1906
1927
  const r = {};
1907
1928
  for (const [i, t] of Object.entries(e))
1908
- r[i] = go(t, i);
1929
+ r[i] = vo(t, i);
1909
1930
  return { kind: "multi", entries: r };
1910
- }, vo = (e, n) => {
1931
+ }, Ao = (e, n) => {
1911
1932
  if (!e) return n;
1912
1933
  if (e.kind !== n.kind)
1913
1934
  throw new Error("Cannot merge single and multi --strings payloads. Provide one consistent shape.");
@@ -1930,12 +1951,12 @@ const Er = (e, n) => {
1930
1951
  }
1931
1952
  return e;
1932
1953
  };
1933
- async function xo(e, n = kr, r = "auto") {
1954
+ async function Co(e, n = Er, r = "auto") {
1934
1955
  if (e === void 0)
1935
1956
  return;
1936
1957
  const i = async (t) => {
1937
1958
  if (t.trim())
1938
- return yo(ho(t, r));
1959
+ return bo(yo(t, r));
1939
1960
  };
1940
1961
  if (e === "") {
1941
1962
  const t = await n();
@@ -1948,7 +1969,7 @@ async function xo(e, n = kr, r = "auto") {
1948
1969
  for (const o of e)
1949
1970
  if (typeof o == "string") {
1950
1971
  const l = await i(o);
1951
- l && (t = vo(t, l));
1972
+ l && (t = Ao(t, l));
1952
1973
  }
1953
1974
  return t;
1954
1975
  }
@@ -1957,7 +1978,7 @@ async function xo(e, n = kr, r = "auto") {
1957
1978
  return i(t);
1958
1979
  }
1959
1980
  }
1960
- async function wo({
1981
+ async function ko({
1961
1982
  path: e,
1962
1983
  key: n,
1963
1984
  comment: r,
@@ -1965,25 +1986,26 @@ async function wo({
1965
1986
  stringsFormat: t,
1966
1987
  defaultString: o,
1967
1988
  language: l,
1968
- stdinReader: a = kr,
1969
- configPath: s
1989
+ stdinReader: a = Er,
1990
+ configPath: s,
1991
+ state: c
1970
1992
  }) {
1971
- const c = await xo(i, a, t);
1972
- if (c?.kind === "multi") {
1993
+ const u = await Co(i, a, t), f = _r(c);
1994
+ if (u?.kind === "multi") {
1973
1995
  if (n || r || o !== void 0 || l)
1974
1996
  throw new Error("When adding multiple strings via --strings payload, omit --key, --comment, --text, and --language.");
1975
- const d = [];
1976
- for (const [m, g] of Object.entries(c.entries))
1977
- await Sn(e, m, g.comment, g.translations, s, void 0, void 0), d.push(m);
1978
- return { kind: "multi", keys: d };
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 };
1979
2001
  }
1980
- const u = n;
1981
- if (!u)
2002
+ const d = n;
2003
+ if (!d)
1982
2004
  throw new Error("--key is required unless the --strings payload contains multiple keys.");
1983
- const f = c?.kind === "single" ? c.translations : void 0, h = c?.kind === "single" ? c.comment : void 0;
1984
- return await Sn(e, u, r ?? h, f, s, o, l), { kind: "single", keys: [u] };
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] };
1985
2007
  }
1986
- function bo() {
2008
+ function So() {
1987
2009
  return {
1988
2010
  command: "add",
1989
2011
  describe: "Add a string",
@@ -1998,6 +2020,10 @@ function bo() {
1998
2020
  type: "string",
1999
2021
  alias: "l",
2000
2022
  describe: "The language of the string provided with --text"
2023
+ }).option("state", {
2024
+ type: "string",
2025
+ choices: $e,
2026
+ describe: "State to apply to added strings (translated | needs_review | new | stale)"
2001
2027
  }).option("text", {
2002
2028
  type: "string",
2003
2029
  describe: "The string value for the default language"
@@ -2011,7 +2037,7 @@ function bo() {
2011
2037
  describe: "Format for the data provided with --strings"
2012
2038
  }),
2013
2039
  handler: async (e) => {
2014
- const n = await wo({
2040
+ const n = await ko({
2015
2041
  path: e.path,
2016
2042
  key: e.key,
2017
2043
  comment: e.comment,
@@ -2019,60 +2045,76 @@ function bo() {
2019
2045
  stringsFormat: e["strings-format"],
2020
2046
  defaultString: e.text,
2021
2047
  language: e.language,
2048
+ state: e.state,
2022
2049
  stdinReader: void 0,
2023
2050
  configPath: e.config
2024
2051
  });
2025
- V.info(k.green(`✓ Added keys:
2052
+ X.info(k.green(`✓ Added keys:
2026
2053
  ${n.keys.map((r) => `- ${r}`).join(`
2027
2054
  `)}`));
2028
2055
  }
2029
2056
  };
2030
2057
  }
2031
- async function Sn(e, n, r, i, t, o, l) {
2032
- const a = await me(e);
2033
- if (!a.sourceLanguage)
2058
+ async function On(e, n, r, i, t, o, l, a) {
2059
+ const s = await me(e);
2060
+ if (!s.sourceLanguage)
2034
2061
  throw new Error('The xcstrings file is missing "sourceLanguage".');
2035
- const s = a.sourceLanguage;
2036
- a.strings || (a.strings = {});
2037
- const u = (await He(t))?.missingLanguagePolicy || "skip";
2038
- let f;
2039
- const h = async (b) => u === "include" ? !0 : (f || (f = await Rn(e, t)), f.includes(b)), d = (b) => {
2040
- V.warn(`Language "${b}" is not supported. Skipped adding its translation (missingLanguagePolicy=skip).`);
2041
- }, m = {
2042
- ...a.strings[n],
2062
+ const c = s.sourceLanguage;
2063
+ s.strings || (s.strings = {});
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 = (_) => {
2067
+ X.warn(`Language "${_}" is not supported. Skipped adding its translation (missingLanguagePolicy=skip).`);
2068
+ }, h = {
2069
+ ...s.strings[n],
2043
2070
  extractionState: "manual"
2044
2071
  };
2045
- if (r && (m.comment = r), o !== void 0) {
2046
- const b = l ?? s;
2047
- await h(b) ? (m.localizations = m.localizations || {}, m.localizations[b] = {
2048
- stringUnit: {
2049
- state: "translated",
2050
- value: o
2051
- }
2052
- }) : d(b);
2072
+ r && (h.comment = r);
2073
+ const A = a ?? "translated", C = (_) => {
2074
+ if (_ !== void 0)
2075
+ return typeof _ == "string" ? { value: _ } : _;
2076
+ };
2077
+ if (o !== void 0) {
2078
+ const _ = l ?? c;
2079
+ if (!await g(_))
2080
+ v(_);
2081
+ else {
2082
+ h.localizations = h.localizations || {};
2083
+ const L = C(i?.[_]);
2084
+ h.localizations[_] = {
2085
+ stringUnit: {
2086
+ state: L?.state ?? A,
2087
+ value: o
2088
+ }
2089
+ };
2090
+ }
2053
2091
  }
2054
- const g = i ? { ...i } : void 0;
2055
- if (g) {
2056
- const b = [];
2057
- for (const [C, x] of Object.entries(g)) {
2058
- if (o !== void 0 && C === (l ?? s))
2092
+ const x = i ? { ...i } : void 0;
2093
+ if (x) {
2094
+ const _ = [];
2095
+ for (const [L, R] of Object.entries(x)) {
2096
+ if (o !== void 0 && L === (l ?? c))
2059
2097
  continue;
2060
- (u === "include" ? !0 : C === s || await h(C)) ? b.push([C, x]) : d(C);
2098
+ if (f === "include" ? !0 : L === c || await g(L)) {
2099
+ const I = C(R);
2100
+ I && _.push([L, I]);
2101
+ } else
2102
+ v(L);
2061
2103
  }
2062
- if (b.length > 0) {
2063
- m.localizations = m.localizations || {};
2064
- for (const [C, x] of b)
2065
- m.localizations[C] = {
2104
+ if (_.length > 0) {
2105
+ h.localizations = h.localizations || {};
2106
+ for (const [L, R] of _)
2107
+ h.localizations[L] = {
2066
2108
  stringUnit: {
2067
- state: "translated",
2068
- value: x
2109
+ state: R.state ?? A,
2110
+ value: R.value
2069
2111
  }
2070
2112
  };
2071
2113
  }
2072
2114
  }
2073
- a.strings[n] = m, await Nn(e, a);
2115
+ s.strings[n] = h, await Pn(e, s);
2074
2116
  }
2075
- function Ao() {
2117
+ function Eo() {
2076
2118
  return {
2077
2119
  command: "remove",
2078
2120
  describe: "Remove a string",
@@ -2096,7 +2138,7 @@ function Ao() {
2096
2138
  throw new Error("Either --key or --languages must be provided");
2097
2139
  }),
2098
2140
  handler: async (e) => {
2099
- const n = await ko(
2141
+ const n = await Oo(
2100
2142
  e.path,
2101
2143
  e.key,
2102
2144
  e.languages,
@@ -2104,23 +2146,23 @@ function Ao() {
2104
2146
  ), r = Object.entries(n).map(([i, t]) => `- [${t.join(" ")}] ${i}`).join(`
2105
2147
  `);
2106
2148
  if (e.dryRun) {
2107
- r.length === 0 ? V.info(k.yellow("No matching strings found.")) : V.info(k.blue(`Would remove:
2149
+ r.length === 0 ? X.info(k.yellow("No matching strings found.")) : X.info(k.blue(`Would remove:
2108
2150
  ${r}`));
2109
2151
  return;
2110
2152
  }
2111
- r.length === 0 ? V.info(k.yellow("No matching strings found.")) : V.info(k.green(`✓ Removed
2153
+ r.length === 0 ? X.info(k.yellow("No matching strings found.")) : X.info(k.green(`✓ Removed
2112
2154
  ${r}`));
2113
2155
  }
2114
2156
  };
2115
2157
  }
2116
- function Co(e, n, r, i, t) {
2158
+ function _o(e, n, r, i, t) {
2117
2159
  if (e.localizations) {
2118
2160
  for (const o of n)
2119
2161
  e.localizations[o] && (t[i] ??= [], t[i].push(o), r || delete e.localizations[o]);
2120
2162
  !r && e.localizations && Object.keys(e.localizations).length === 0 && delete e.localizations;
2121
2163
  }
2122
2164
  }
2123
- async function ko(e, n, r, i = !1) {
2165
+ async function Oo(e, n, r, i = !1) {
2124
2166
  const t = await me(e), o = {}, l = t.strings || {};
2125
2167
  t.strings = l;
2126
2168
  const a = n ? [n] : Object.keys(l);
@@ -2130,31 +2172,31 @@ async function ko(e, n, r, i = !1) {
2130
2172
  if (!u)
2131
2173
  continue;
2132
2174
  if (!r || r.length === 0) {
2133
- const d = Object.keys(u.localizations ?? {});
2134
- o[c] = d, i || delete l[c], s = !0;
2175
+ const g = Object.keys(u.localizations ?? {});
2176
+ o[c] = g, i || delete l[c], s = !0;
2135
2177
  continue;
2136
2178
  }
2137
- Co(u, r, i, c, o);
2179
+ _o(u, r, i, c, o);
2138
2180
  const f = o[c]?.length ?? 0;
2139
2181
  !(u.localizations && Object.keys(u.localizations).length > 0) && f > 0 && (i || delete l[c]), f > 0 && (s = !0);
2140
2182
  }
2141
- return !i && s && await Nn(e, t), o;
2183
+ return !i && s && await Pn(e, t), o;
2142
2184
  }
2143
- const Me = "xcstrings-cli.json5";
2144
- function Eo() {
2185
+ const Pe = "xcstrings-cli.json5";
2186
+ function Fo() {
2145
2187
  return {
2146
2188
  command: "init",
2147
2189
  describe: "Initialize configuration file",
2148
2190
  handler: async () => {
2149
- await Oo();
2191
+ await jo();
2150
2192
  }
2151
2193
  };
2152
2194
  }
2153
- async function So(e) {
2195
+ async function To(e) {
2154
2196
  const n = [];
2155
2197
  async function r(i) {
2156
2198
  try {
2157
- const t = await In(i, { withFileTypes: !0 });
2199
+ const t = await Rn(i, { withFileTypes: !0 });
2158
2200
  for (const o of t) {
2159
2201
  const l = Oe(i, o.name);
2160
2202
  o.isDirectory() ? !o.name.startsWith(".") && o.name !== "node_modules" && await r(l) : o.name.endsWith(".xcstrings") && n.push(l);
@@ -2164,23 +2206,23 @@ async function So(e) {
2164
2206
  }
2165
2207
  return await r(e), n;
2166
2208
  }
2167
- async function _o(e) {
2209
+ async function Lo(e) {
2168
2210
  const n = [];
2169
2211
  let r = e;
2170
2212
  try {
2171
- const i = await In(r, { withFileTypes: !0 });
2213
+ const i = await Rn(r, { withFileTypes: !0 });
2172
2214
  for (const t of i)
2173
2215
  t.isDirectory() && t.name.endsWith(".xcodeproj") && n.push(Oe(r, t.name));
2174
2216
  } catch {
2175
2217
  }
2176
2218
  return n;
2177
2219
  }
2178
- async function Oo() {
2220
+ async function jo() {
2179
2221
  const e = process.cwd();
2180
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..."));
2181
- const n = await So(e);
2223
+ const n = await To(e);
2182
2224
  console.log(k.yellow("🔍 Searching for .xcodeproj directories..."));
2183
- const r = await _o(e);
2225
+ const r = await Lo(e);
2184
2226
  console.log();
2185
2227
  let i = [];
2186
2228
  if (n.length > 0) {
@@ -2190,7 +2232,7 @@ async function Oo() {
2190
2232
  value: we(e, u),
2191
2233
  checked: !0
2192
2234
  }));
2193
- i = await on({
2235
+ i = await an({
2194
2236
  message: k.bold("Select .xcstrings files to manage:"),
2195
2237
  choices: c
2196
2238
  });
@@ -2205,14 +2247,14 @@ async function Oo() {
2205
2247
  value: we(e, u) || u,
2206
2248
  checked: !0
2207
2249
  }));
2208
- t = await on({
2250
+ t = await an({
2209
2251
  message: k.bold("Select .xcodeproj directories for language detection:"),
2210
2252
  choices: c
2211
2253
  });
2212
2254
  } else
2213
2255
  console.log(k.dim(" No .xcodeproj directories found"));
2214
- 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 Rr({
2215
- message: k.bold(`Create ${k.yellow(Me)}?`),
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)}?`),
2216
2258
  default: !0
2217
2259
  })) {
2218
2260
  console.log(k.dim(" Configuration cancelled."));
@@ -2233,35 +2275,35 @@ ${a}
2233
2275
  missingLanguagePolicy: "skip",
2234
2276
  }
2235
2277
  `;
2236
- await jn(Me, s, "utf-8"), console.log(), console.log(k.bold.green(`✓ Created ${Me}`)), console.log(k.dim(` Run ${k.cyan("xcstrings --help")} to see available commands.`)), console.log();
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();
2237
2279
  }
2238
- var Fo = Object.prototype.toString, le = Array.isArray || function(n) {
2239
- return Fo.call(n) === "[object Array]";
2280
+ var Io = Object.prototype.toString, ae = Array.isArray || function(n) {
2281
+ return Io.call(n) === "[object Array]";
2240
2282
  };
2241
- function Qe(e) {
2283
+ function Ze(e) {
2242
2284
  return typeof e == "function";
2243
2285
  }
2244
- function To(e) {
2245
- return le(e) ? "array" : typeof e;
2286
+ function No(e) {
2287
+ return ae(e) ? "array" : typeof e;
2246
2288
  }
2247
- function Pe(e) {
2289
+ function Me(e) {
2248
2290
  return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
2249
2291
  }
2250
- function _n(e, n) {
2292
+ function Fn(e, n) {
2251
2293
  return e != null && typeof e == "object" && n in e;
2252
2294
  }
2253
- function Lo(e, n) {
2295
+ function Ro(e, n) {
2254
2296
  return e != null && typeof e != "object" && e.hasOwnProperty && e.hasOwnProperty(n);
2255
2297
  }
2256
- var jo = RegExp.prototype.test;
2257
- function Io(e, n) {
2258
- return jo.call(e, n);
2298
+ var Po = RegExp.prototype.test;
2299
+ function Mo(e, n) {
2300
+ return Po.call(e, n);
2259
2301
  }
2260
- var No = /\S/;
2261
- function Ro(e) {
2262
- return !Io(No, e);
2302
+ var Do = /\S/;
2303
+ function $o(e) {
2304
+ return !Mo(Do, e);
2263
2305
  }
2264
- var Mo = {
2306
+ var Bo = {
2265
2307
  "&": "&amp;",
2266
2308
  "<": "&lt;",
2267
2309
  ">": "&gt;",
@@ -2271,13 +2313,13 @@ var Mo = {
2271
2313
  "`": "&#x60;",
2272
2314
  "=": "&#x3D;"
2273
2315
  };
2274
- function Po(e) {
2316
+ function zo(e) {
2275
2317
  return String(e).replace(/[&<>"'`=\/]/g, function(r) {
2276
- return Mo[r];
2318
+ return Bo[r];
2277
2319
  });
2278
2320
  }
2279
- var Do = /\s*/, Bo = /\s+/, On = /\s*=/, $o = /\s*\}/, Uo = /#|\^|\/|>|\{|&|=|!/;
2280
- function zo(e, n) {
2321
+ var Uo = /\s*/, Yo = /\s+/, Tn = /\s*=/, Ho = /\s*\}/, Ko = /#|\^|\/|>|\{|&|=|!/;
2322
+ function Wo(e, n) {
2281
2323
  if (!e)
2282
2324
  return [];
2283
2325
  var r = !1, i = [], t = [], o = [], l = !1, a = !1, s = "", c = 0;
@@ -2289,41 +2331,41 @@ function zo(e, n) {
2289
2331
  o = [];
2290
2332
  l = !1, a = !1;
2291
2333
  }
2292
- var f, h, d;
2293
- function m(B) {
2294
- if (typeof B == "string" && (B = B.split(Bo, 2)), !le(B) || B.length !== 2)
2295
- throw new Error("Invalid tags: " + B);
2296
- f = new RegExp(Pe(B[0]) + "\\s*"), h = new RegExp("\\s*" + Pe(B[1])), d = new RegExp("\\s*" + Pe("}" + B[1]));
2297
- }
2298
- m(n || N.tags);
2299
- for (var g = new ye(e), b, C, x, W, Y, U; !g.eos(); ) {
2300
- if (b = g.pos, x = g.scanUntil(f), x)
2301
- for (var ae = 0, Q = x.length; ae < Q; ++ae)
2302
- W = x.charAt(ae), Ro(W) ? (o.push(t.length), s += W) : (a = !0, r = !0, s += " "), t.push(["text", W, b, b + 1]), b += 1, W === `
2334
+ var f, d, g;
2335
+ function v(I) {
2336
+ if (typeof I == "string" && (I = I.split(Yo, 2)), !ae(I) || I.length !== 2)
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]));
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)
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, _ === `
2303
2345
  ` && (u(), s = "", c = 0, r = !1);
2304
- if (!g.scan(f))
2346
+ if (!h.scan(f))
2305
2347
  break;
2306
- if (l = !0, C = g.scan(Uo) || "name", g.scan(Do), C === "=" ? (x = g.scanUntil(On), g.scan(On), g.scanUntil(h)) : C === "{" ? (x = g.scanUntil(d), g.scan($o), g.scanUntil(h), C = "&") : x = g.scanUntil(h), !g.scan(h))
2307
- throw new Error("Unclosed tag at " + g.pos);
2308
- if (C == ">" ? Y = [C, x, b, g.pos, s, c, r] : Y = [C, x, b, g.pos], c++, t.push(Y), C === "#" || C === "^")
2309
- i.push(Y);
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 === "^")
2351
+ i.push(L);
2310
2352
  else if (C === "/") {
2311
- if (U = i.pop(), !U)
2312
- throw new Error('Unopened section "' + x + '" at ' + b);
2313
- if (U[1] !== x)
2314
- throw new Error('Unclosed section "' + U[1] + '" at ' + b);
2315
- } else C === "name" || C === "{" || C === "&" ? a = !0 : C === "=" && m(x);
2353
+ if (R = i.pop(), !R)
2354
+ throw new Error('Unopened section "' + x + '" at ' + A);
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);
2316
2358
  }
2317
- if (u(), U = i.pop(), U)
2318
- throw new Error('Unclosed section "' + U[1] + '" at ' + g.pos);
2319
- return Ho(Yo(t));
2359
+ if (u(), R = i.pop(), R)
2360
+ throw new Error('Unclosed section "' + R[1] + '" at ' + h.pos);
2361
+ return Go(qo(t));
2320
2362
  }
2321
- function Yo(e) {
2363
+ function qo(e) {
2322
2364
  for (var n = [], r, i, t = 0, o = e.length; t < o; ++t)
2323
2365
  r = e[t], r && (r[0] === "text" && i && i[0] === "text" ? (i[1] += r[1], i[3] = r[3]) : (n.push(r), i = r));
2324
2366
  return n;
2325
2367
  }
2326
- function Ho(e) {
2368
+ function Go(e) {
2327
2369
  for (var n = [], r = n, i = [], t, o, l = 0, a = e.length; l < a; ++l)
2328
2370
  switch (t = e[l], t[0]) {
2329
2371
  case "#":
@@ -2365,13 +2407,13 @@ ye.prototype.scanUntil = function(n) {
2365
2407
  }
2366
2408
  return this.pos += i.length, i;
2367
2409
  };
2368
- function oe(e, n) {
2410
+ function le(e, n) {
2369
2411
  this.view = e, this.cache = { ".": this.view }, this.parent = n;
2370
2412
  }
2371
- oe.prototype.push = function(n) {
2372
- return new oe(n, this);
2413
+ le.prototype.push = function(n) {
2414
+ return new le(n, this);
2373
2415
  };
2374
- oe.prototype.lookup = function(n) {
2416
+ le.prototype.lookup = function(n) {
2375
2417
  var r = this.cache, i;
2376
2418
  if (r.hasOwnProperty(n))
2377
2419
  i = r[n];
@@ -2379,9 +2421,9 @@ oe.prototype.lookup = function(n) {
2379
2421
  for (var t = this, o, l, a, s = !1; t; ) {
2380
2422
  if (n.indexOf(".") > 0)
2381
2423
  for (o = t.view, l = n.split("."), a = 0; o != null && a < l.length; )
2382
- a === l.length - 1 && (s = _n(o, l[a]) || Lo(o, l[a])), o = o[l[a++]];
2424
+ a === l.length - 1 && (s = Fn(o, l[a]) || Ro(o, l[a])), o = o[l[a++]];
2383
2425
  else
2384
- o = t.view[n], s = _n(t.view, n);
2426
+ o = t.view[n], s = Fn(t.view, n);
2385
2427
  if (s) {
2386
2428
  i = o;
2387
2429
  break;
@@ -2390,9 +2432,9 @@ oe.prototype.lookup = function(n) {
2390
2432
  }
2391
2433
  r[n] = i;
2392
2434
  }
2393
- return Qe(i) && (i = i.call(this.view)), i;
2435
+ return Ze(i) && (i = i.call(this.view)), i;
2394
2436
  };
2395
- function R() {
2437
+ function $() {
2396
2438
  this.templateCache = {
2397
2439
  _cache: {},
2398
2440
  set: function(n, r) {
@@ -2406,34 +2448,34 @@ function R() {
2406
2448
  }
2407
2449
  };
2408
2450
  }
2409
- R.prototype.clearCache = function() {
2451
+ $.prototype.clearCache = function() {
2410
2452
  typeof this.templateCache < "u" && this.templateCache.clear();
2411
2453
  };
2412
- R.prototype.parse = function(n, r) {
2413
- var i = this.templateCache, t = n + ":" + (r || N.tags).join(":"), o = typeof i < "u", l = o ? i.get(t) : void 0;
2414
- return l == null && (l = zo(n, r), o && i.set(t, l)), l;
2454
+ $.prototype.parse = function(n, r) {
2455
+ var i = this.templateCache, t = n + ":" + (r || D.tags).join(":"), o = typeof i < "u", l = o ? i.get(t) : void 0;
2456
+ return l == null && (l = Wo(n, r), o && i.set(t, l)), l;
2415
2457
  };
2416
- R.prototype.render = function(n, r, i, t) {
2417
- var o = this.getConfigTags(t), l = this.parse(n, o), a = r instanceof oe ? r : new oe(r, void 0);
2458
+ $.prototype.render = function(n, r, i, t) {
2459
+ var o = this.getConfigTags(t), l = this.parse(n, o), a = r instanceof le ? r : new le(r, void 0);
2418
2460
  return this.renderTokens(l, a, i, n, t);
2419
2461
  };
2420
- R.prototype.renderTokens = function(n, r, i, t, o) {
2462
+ $.prototype.renderTokens = function(n, r, i, t, o) {
2421
2463
  for (var l = "", a, s, c, u = 0, f = n.length; u < f; ++u)
2422
2464
  c = void 0, a = n[u], s = a[0], s === "#" ? c = this.renderSection(a, r, i, t, o) : s === "^" ? c = this.renderInverted(a, r, i, t, o) : s === ">" ? c = this.renderPartial(a, r, i, o) : s === "&" ? c = this.unescapedValue(a, r) : s === "name" ? c = this.escapedValue(a, r, o) : s === "text" && (c = this.rawValue(a)), c !== void 0 && (l += c);
2423
2465
  return l;
2424
2466
  };
2425
- R.prototype.renderSection = function(n, r, i, t, o) {
2467
+ $.prototype.renderSection = function(n, r, i, t, o) {
2426
2468
  var l = this, a = "", s = r.lookup(n[1]);
2427
- function c(h) {
2428
- return l.render(h, r, i, o);
2469
+ function c(d) {
2470
+ return l.render(d, r, i, o);
2429
2471
  }
2430
2472
  if (s) {
2431
- if (le(s))
2473
+ if (ae(s))
2432
2474
  for (var u = 0, f = s.length; u < f; ++u)
2433
2475
  a += this.renderTokens(n[4], r.push(s[u]), i, t, o);
2434
2476
  else if (typeof s == "object" || typeof s == "string" || typeof s == "number")
2435
2477
  a += this.renderTokens(n[4], r.push(s), i, t, o);
2436
- else if (Qe(s)) {
2478
+ else if (Ze(s)) {
2437
2479
  if (typeof t != "string")
2438
2480
  throw new Error("Cannot use higher-order sections without the original template");
2439
2481
  s = s.call(r.view, t.slice(n[3], n[5]), c), s != null && (a += s);
@@ -2442,21 +2484,21 @@ R.prototype.renderSection = function(n, r, i, t, o) {
2442
2484
  return a;
2443
2485
  }
2444
2486
  };
2445
- R.prototype.renderInverted = function(n, r, i, t, o) {
2487
+ $.prototype.renderInverted = function(n, r, i, t, o) {
2446
2488
  var l = r.lookup(n[1]);
2447
- if (!l || le(l) && l.length === 0)
2489
+ if (!l || ae(l) && l.length === 0)
2448
2490
  return this.renderTokens(n[4], r, i, t, o);
2449
2491
  };
2450
- R.prototype.indentPartial = function(n, r, i) {
2492
+ $.prototype.indentPartial = function(n, r, i) {
2451
2493
  for (var t = r.replace(/[^ \t]/g, ""), o = n.split(`
2452
2494
  `), l = 0; l < o.length; l++)
2453
2495
  o[l].length && (l > 0 || !i) && (o[l] = t + o[l]);
2454
2496
  return o.join(`
2455
2497
  `);
2456
2498
  };
2457
- R.prototype.renderPartial = function(n, r, i, t) {
2499
+ $.prototype.renderPartial = function(n, r, i, t) {
2458
2500
  if (i) {
2459
- var o = this.getConfigTags(t), l = Qe(i) ? i(n[1]) : i[n[1]];
2501
+ var o = this.getConfigTags(t), l = Ze(i) ? i(n[1]) : i[n[1]];
2460
2502
  if (l != null) {
2461
2503
  var a = n[6], s = n[5], c = n[4], u = l;
2462
2504
  s == 0 && c && (u = this.indentPartial(l, c, a));
@@ -2465,27 +2507,27 @@ R.prototype.renderPartial = function(n, r, i, t) {
2465
2507
  }
2466
2508
  }
2467
2509
  };
2468
- R.prototype.unescapedValue = function(n, r) {
2510
+ $.prototype.unescapedValue = function(n, r) {
2469
2511
  var i = r.lookup(n[1]);
2470
2512
  if (i != null)
2471
2513
  return i;
2472
2514
  };
2473
- R.prototype.escapedValue = function(n, r, i) {
2474
- var t = this.getConfigEscape(i) || N.escape, o = r.lookup(n[1]);
2515
+ $.prototype.escapedValue = function(n, r, i) {
2516
+ var t = this.getConfigEscape(i) || D.escape, o = r.lookup(n[1]);
2475
2517
  if (o != null)
2476
- return typeof o == "number" && t === N.escape ? String(o) : t(o);
2518
+ return typeof o == "number" && t === D.escape ? String(o) : t(o);
2477
2519
  };
2478
- R.prototype.rawValue = function(n) {
2520
+ $.prototype.rawValue = function(n) {
2479
2521
  return n[1];
2480
2522
  };
2481
- R.prototype.getConfigTags = function(n) {
2482
- return le(n) ? n : n && typeof n == "object" ? n.tags : void 0;
2523
+ $.prototype.getConfigTags = function(n) {
2524
+ return ae(n) ? n : n && typeof n == "object" ? n.tags : void 0;
2483
2525
  };
2484
- R.prototype.getConfigEscape = function(n) {
2485
- if (n && typeof n == "object" && !le(n))
2526
+ $.prototype.getConfigEscape = function(n) {
2527
+ if (n && typeof n == "object" && !ae(n))
2486
2528
  return n.escape;
2487
2529
  };
2488
- var N = {
2530
+ var D = {
2489
2531
  name: "mustache.js",
2490
2532
  version: "4.2.0",
2491
2533
  tags: ["{{", "}}"],
@@ -2510,23 +2552,23 @@ var N = {
2510
2552
  get templateCache() {
2511
2553
  return ge.templateCache;
2512
2554
  }
2513
- }, ge = new R();
2514
- N.clearCache = function() {
2555
+ }, ge = new $();
2556
+ D.clearCache = function() {
2515
2557
  return ge.clearCache();
2516
2558
  };
2517
- N.parse = function(n, r) {
2559
+ D.parse = function(n, r) {
2518
2560
  return ge.parse(n, r);
2519
2561
  };
2520
- N.render = function(n, r, i, t) {
2562
+ D.render = function(n, r, i, t) {
2521
2563
  if (typeof n != "string")
2522
- throw new TypeError('Invalid template! Template should be a "string" but "' + To(n) + '" was given as the first argument for mustache#render(template, view, partials)');
2564
+ throw new TypeError('Invalid template! Template should be a "string" but "' + No(n) + '" was given as the first argument for mustache#render(template, view, partials)');
2523
2565
  return ge.render(n, r, i, t);
2524
2566
  };
2525
- N.escape = Po;
2526
- N.Scanner = ye;
2527
- N.Context = oe;
2528
- N.Writer = R;
2529
- function Fn(e, {
2567
+ D.escape = zo;
2568
+ D.Scanner = ye;
2569
+ D.Context = le;
2570
+ D.Writer = $;
2571
+ function Ln(e, {
2530
2572
  glob: n,
2531
2573
  regex: r,
2532
2574
  substring: i
@@ -2538,7 +2580,7 @@ function Fn(e, {
2538
2580
  return r !== void 0 ? { pattern: r, mode: "regex" } : i !== void 0 ? { pattern: i, mode: "substring" } : { pattern: n, mode: "glob" };
2539
2581
  }
2540
2582
  }
2541
- function Ko() {
2583
+ function Vo() {
2542
2584
  return {
2543
2585
  command: "list",
2544
2586
  describe: "List strings in the xcstrings file",
@@ -2584,15 +2626,15 @@ function Ko() {
2584
2626
  return !0;
2585
2627
  }),
2586
2628
  handler: async (e) => {
2587
- const n = [e.key, e["key-glob"]].filter((l) => l !== void 0), r = [e.text, e["text-glob"]].filter((l) => l !== void 0), i = Fn("key", {
2629
+ const n = [e.key, e["key-glob"]].filter((l) => l !== void 0), r = [e.text, e["text-glob"]].filter((l) => l !== void 0), i = Ln("key", {
2588
2630
  glob: n[0],
2589
2631
  regex: e["key-regex"],
2590
2632
  substring: e["key-substring"]
2591
- }), t = Fn("text", {
2633
+ }), t = Ln("text", {
2592
2634
  glob: r[0],
2593
2635
  regex: e["text-regex"],
2594
2636
  substring: e["text-substring"]
2595
- }), o = await Go({
2637
+ }), o = await Jo({
2596
2638
  path: e.path,
2597
2639
  languages: e.languages,
2598
2640
  keyFilter: i,
@@ -2603,11 +2645,11 @@ function Ko() {
2603
2645
  }
2604
2646
  };
2605
2647
  }
2606
- function Wo(e) {
2648
+ function Xo(e) {
2607
2649
  const n = e.replace(/[.+^${}()|\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
2608
2650
  return new RegExp(`^${n}$`);
2609
2651
  }
2610
- function Tn(e) {
2652
+ function jn(e) {
2611
2653
  if (!e) return () => !0;
2612
2654
  if (e.mode === "regex") {
2613
2655
  const r = new RegExp(e.pattern);
@@ -2617,50 +2659,50 @@ function Tn(e) {
2617
2659
  const r = e.pattern;
2618
2660
  return (i) => i.includes(r);
2619
2661
  }
2620
- const n = Wo(e.pattern);
2662
+ const n = Xo(e.pattern);
2621
2663
  return (r) => n.test(r);
2622
2664
  }
2623
- function qo(e, n) {
2624
- const r = N.escape;
2625
- N.escape = (i) => i;
2665
+ function Qo(e, n) {
2666
+ const r = D.escape;
2667
+ D.escape = (i) => i;
2626
2668
  try {
2627
- return N.render(e, n);
2669
+ return D.render(e, n);
2628
2670
  } finally {
2629
- N.escape = r;
2671
+ D.escape = r;
2630
2672
  }
2631
2673
  }
2632
- async function Go(e) {
2633
- const r = (await me(e.path)).strings ?? {}, i = Tn(e.keyFilter), t = Tn(e.textFilter), o = e.languages ? new Set(e.languages) : null, l = !!e.format, a = [];
2674
+ 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 = [];
2634
2676
  for (const s of Object.keys(r)) {
2635
2677
  if (!i(s)) continue;
2636
- const u = r[s]?.localizations ?? {}, f = Object.keys(u), h = [];
2637
- for (const d of f) {
2638
- if (o && !o.has(d)) continue;
2639
- const m = u[d]?.stringUnit?.value ?? "";
2640
- t(m) && (l && e.format ? h.push(qo(e.format, { language: d, key: s, text: m })) : h.push(` ${d}: ${JSON.stringify(m)}`));
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)}`));
2641
2683
  }
2642
- h.length !== 0 && (l ? a.push(...h) : a.push(`${s}:`, ...h));
2684
+ d.length !== 0 && (l ? a.push(...d) : a.push(`${s}:`, ...d));
2643
2685
  }
2644
2686
  return a.join(`
2645
2687
  `);
2646
2688
  }
2647
- const Ln = Oe(process.cwd(), "Localizable.xcstrings");
2648
- Lr(jr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("config", {
2689
+ const In = Oe(process.cwd(), "Localizable.xcstrings");
2690
+ Nr(Rr(process.argv)).scriptName("xcstrings").usage("$0 <cmd> [args]").option("config", {
2649
2691
  type: "string",
2650
2692
  describe: "Path to config file"
2651
2693
  }).option("path", {
2652
2694
  type: "string",
2653
2695
  describe: "Path to xcstrings file",
2654
- default: Ln
2696
+ default: In
2655
2697
  }).middleware(async (e) => {
2656
- const n = await He(e.config);
2657
- e.path = await Dr(e.path, n, Ln);
2698
+ const n = await We(e.config);
2699
+ e.path = await zr(e.path, n, In);
2658
2700
  }).command([
2659
- bo(),
2660
- Ao(),
2701
+ So(),
2661
2702
  Eo(),
2662
- Kr(),
2663
- Ko()
2703
+ Fo(),
2704
+ Gr(),
2705
+ Vo()
2664
2706
  ]).demandCommand(1, "").strictCommands().recommendCommands().showHelpOnFail(!0).fail((e, n, r) => {
2665
2707
  const i = e || n?.message;
2666
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);