@fewangsit/wangsvue 1.5.229-alpha.36 → 1.5.229-alpha.38

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.
package/mcp/main.js CHANGED
@@ -51,7 +51,9 @@ function ll(t, e = !1) {
51
51
  const n = t.split(`
52
52
  `), r = [];
53
53
  for (const s of n) {
54
- const i = s.match(/\[([^\]]+)\]\(([^)]*\/(?:style-guide|testing-guide)\/[^)]+)\)/);
54
+ const i = s.match(
55
+ /\[([^\]]+)\]\(([^)]*\/(?:style-guide|testing-guide)\/[^)]+)\)/
56
+ );
55
57
  if (i) {
56
58
  const a = i[1], o = i[2];
57
59
  e ? (a.toLowerCase().includes("api-services") || o.toLowerCase().includes("api-services")) && r.push({
@@ -87,13 +89,19 @@ function fl(t, e, n) {
87
89
  s += `---
88
90
  `;
89
91
  let i = t.replace(/^---[\s\S]*?---\n/, "");
90
- return i = i.replace(/\[([^\]]+)\]\(\/vue\/docs\/([^)]+)\)/g, (a, o, c) => {
91
- const l = qs(c);
92
- return `[${o}](${l})`;
93
- }), i = i.replace(/\[([^\]]+)\]\(https:\/\/fewangsit\.gitbook\.io\/vue\/docs\/([^)]+)\)/g, (a, o, c) => {
94
- let l = qs(c);
95
- return l.endsWith(".md") || (l += ".md"), `[${o}](${l})`;
96
- }), s + i;
92
+ return i = i.replace(
93
+ /\[([^\]]+)\]\(\/vue\/docs\/([^)]+)\)/g,
94
+ (a, o, c) => {
95
+ let l = qs(c);
96
+ return n === "copilot" && (l = l.replace(/\.md$/, ".instructions.md")), `[${o}](${l})`;
97
+ }
98
+ ), i = i.replace(
99
+ /\[([^\]]+)\]\(https:\/\/fewangsit\.gitbook\.io\/vue\/docs\/([^)]+)\)/g,
100
+ (a, o, c) => {
101
+ let l = qs(c);
102
+ return !l.endsWith(".md") && !l.endsWith(".instructions.md") && (l += n === "copilot" ? ".instructions.md" : ".md"), `[${o}](${l})`;
103
+ }
104
+ ), s + i;
97
105
  }
98
106
  async function pl(t, e = !1) {
99
107
  try {
@@ -104,17 +112,29 @@ async function pl(t, e = !1) {
104
112
  for (const a of i)
105
113
  try {
106
114
  console.log(`Fetching: ${a.title} from ${a.path}`);
107
- const o = `${cl}${a.path}`, c = await Xi(o), l = qs(a.path), d = `${r}/${l}`;
115
+ const o = `${cl}${a.path}`, c = await Xi(o), l = qs(a.path), d = t === "copilot" ? `${r}/${l.replace(/\.md$/, ".instructions.md")}` : `${r}/${l}`;
108
116
  dl(d);
109
- const h = fl(c, a.title, t);
110
- xr.writeFileSync(d, h, "utf8"), console.log(`✓ Saved: ${n.output_dir}/${l}`);
117
+ const h = fl(
118
+ c,
119
+ a.title,
120
+ t
121
+ );
122
+ xr.writeFileSync(d, h, "utf8");
123
+ const k = t === "copilot" ? `${n.output_dir}/${l.replace(/\.md$/, ".instructions.md")}` : `${n.output_dir}/${l}`;
124
+ console.log(`✓ Saved: ${k}`);
111
125
  } catch (o) {
112
- console.error(`✗ Failed to fetch ${a.title}:`, o instanceof Error ? o.message : String(o));
126
+ console.error(
127
+ `✗ Failed to fetch ${a.title}:`,
128
+ o instanceof Error ? o.message : String(o)
129
+ );
113
130
  }
114
131
  console.log(`
115
132
  Documentation fetch completed!`);
116
133
  } catch (n) {
117
- throw console.error("Error:", n instanceof Error ? n.message : String(n)), n;
134
+ throw console.error(
135
+ "Error:",
136
+ n instanceof Error ? n.message : String(n)
137
+ ), n;
118
138
  }
119
139
  }
120
140
  function vc(t) {
@@ -154,7 +174,7 @@ function gl() {
154
174
  const M = new Error(`MISSING_DATA: Cannot parse ${$} for an unknown reason`);
155
175
  throw M.code = "MISSING_DATA", M;
156
176
  }
157
- const R = S(g).split(","), z = R.length;
177
+ const R = k(g).split(","), z = R.length;
158
178
  let C;
159
179
  for (let M = 0; M < z; M++)
160
180
  try {
@@ -176,7 +196,7 @@ function gl() {
176
196
  function h(g) {
177
197
  console.log(`[dotenv@${i}] ${g}`);
178
198
  }
179
- function S(g) {
199
+ function k(g) {
180
200
  return g && g.DOTENV_KEY && g.DOTENV_KEY.length > 0 ? g.DOTENV_KEY : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 ? process.env.DOTENV_KEY : "";
181
201
  }
182
202
  function b(g, $) {
@@ -267,7 +287,7 @@ function gl() {
267
287
  return M ? { parsed: q, error: M } : { parsed: q };
268
288
  }
269
289
  function u(g) {
270
- if (S(g).length === 0)
290
+ if (k(g).length === 0)
271
291
  return w.configDotenv(g);
272
292
  const $ = v(g);
273
293
  return $ ? w._configVault(g) : (l(`You set DOTENV_KEY but you are missing a .env.vault file at ${$}. Did you forget to build it?`), w.configDotenv(g));
@@ -2030,10 +2050,10 @@ let $t = class at extends pe {
2030
2050
  return s.common.async ? Promise.resolve().then(async () => {
2031
2051
  const l = [];
2032
2052
  for (const d of c) {
2033
- const h = await d.key, S = await d.value;
2053
+ const h = await d.key, k = await d.value;
2034
2054
  l.push({
2035
2055
  key: h,
2036
- value: S,
2056
+ value: k,
2037
2057
  alwaysSet: d.alwaysSet
2038
2058
  });
2039
2059
  }
@@ -3683,12 +3703,12 @@ const tf = {
3683
3703
  continue;
3684
3704
  } else if (c)
3685
3705
  continue;
3686
- const h = i.issues.length, S = d._zod.check(i);
3687
- if (S instanceof Promise && o?.async === !1)
3706
+ const h = i.issues.length, k = d._zod.check(i);
3707
+ if (k instanceof Promise && o?.async === !1)
3688
3708
  throw new $n();
3689
- if (l || S instanceof Promise)
3709
+ if (l || k instanceof Promise)
3690
3710
  l = (l ?? Promise.resolve()).then(async () => {
3691
- await S, i.issues.length !== h && (c || (c = vn(i, h)));
3711
+ await k, i.issues.length !== h && (c || (c = vn(i, h)));
3692
3712
  });
3693
3713
  else {
3694
3714
  if (i.issues.length === h)
@@ -4022,44 +4042,44 @@ const qc = /* @__PURE__ */ A("$ZodObject", (t, e) => {
4022
4042
  for (const b of h)
4023
4043
  if (!(e.shape[b] instanceof Se))
4024
4044
  throw new Error(`Invalid element at key "${b}": expected a Zod schema`);
4025
- const S = nd(e.shape);
4045
+ const k = nd(e.shape);
4026
4046
  return {
4027
4047
  shape: e.shape,
4028
4048
  keys: h,
4029
4049
  keySet: new Set(h),
4030
4050
  numKeys: h.length,
4031
- optionalKeys: new Set(S)
4051
+ optionalKeys: new Set(k)
4032
4052
  };
4033
4053
  });
4034
4054
  we(t._zod, "propValues", () => {
4035
- const h = e.shape, S = {};
4055
+ const h = e.shape, k = {};
4036
4056
  for (const b in h) {
4037
4057
  const v = h[b]._zod;
4038
4058
  if (v.values) {
4039
- S[b] ?? (S[b] = /* @__PURE__ */ new Set());
4059
+ k[b] ?? (k[b] = /* @__PURE__ */ new Set());
4040
4060
  for (const y of v.values)
4041
- S[b].add(y);
4061
+ k[b].add(y);
4042
4062
  }
4043
4063
  }
4044
- return S;
4064
+ return k;
4045
4065
  });
4046
4066
  const r = (h) => {
4047
- const S = new ef(["shape", "payload", "ctx"]), b = n.value, v = (u) => {
4067
+ const k = new ef(["shape", "payload", "ctx"]), b = n.value, v = (u) => {
4048
4068
  const p = cn(u);
4049
4069
  return `shape[${p}]._zod.run({ value: input[${p}], issues: [] }, ctx)`;
4050
4070
  };
4051
- S.write("const input = payload.value;");
4071
+ k.write("const input = payload.value;");
4052
4072
  const y = /* @__PURE__ */ Object.create(null);
4053
4073
  let f = 0;
4054
4074
  for (const u of b.keys)
4055
4075
  y[u] = `key_${f++}`;
4056
- S.write("const newResult = {}");
4076
+ k.write("const newResult = {}");
4057
4077
  for (const u of b.keys)
4058
4078
  if (b.optionalKeys.has(u)) {
4059
4079
  const p = y[u];
4060
- S.write(`const ${p} = ${v(u)};`);
4080
+ k.write(`const ${p} = ${v(u)};`);
4061
4081
  const _ = cn(u);
4062
- S.write(`
4082
+ k.write(`
4063
4083
  if (${p}.issues.length) {
4064
4084
  if (input[${_}] === undefined) {
4065
4085
  if (${_} in input) {
@@ -4081,20 +4101,20 @@ const qc = /* @__PURE__ */ A("$ZodObject", (t, e) => {
4081
4101
  `);
4082
4102
  } else {
4083
4103
  const p = y[u];
4084
- S.write(`const ${p} = ${v(u)};`), S.write(`
4104
+ k.write(`const ${p} = ${v(u)};`), k.write(`
4085
4105
  if (${p}.issues.length) payload.issues = payload.issues.concat(${p}.issues.map(iss => ({
4086
4106
  ...iss,
4087
4107
  path: iss.path ? [${cn(u)}, ...iss.path] : [${cn(u)}]
4088
- })));`), S.write(`newResult[${cn(u)}] = ${p}.value`);
4108
+ })));`), k.write(`newResult[${cn(u)}] = ${p}.value`);
4089
4109
  }
4090
- S.write("payload.value = newResult;"), S.write("return payload;");
4091
- const m = S.compile();
4110
+ k.write("payload.value = newResult;"), k.write("return payload;");
4111
+ const m = k.compile();
4092
4112
  return (u, p) => m(h, u, p);
4093
4113
  };
4094
4114
  let s;
4095
4115
  const i = Dr, a = !Sc.jitless, c = a && ed.value, l = e.catchall;
4096
4116
  let d;
4097
- t._zod.parse = (h, S) => {
4117
+ t._zod.parse = (h, k) => {
4098
4118
  d ?? (d = n.value);
4099
4119
  const b = h.value;
4100
4120
  if (!i(b))
@@ -4105,13 +4125,13 @@ const qc = /* @__PURE__ */ A("$ZodObject", (t, e) => {
4105
4125
  inst: t
4106
4126
  }), h;
4107
4127
  const v = [];
4108
- if (a && c && S?.async === !1 && S.jitless !== !0)
4109
- s || (s = r(e.shape)), h = s(h, S);
4128
+ if (a && c && k?.async === !1 && k.jitless !== !0)
4129
+ s || (s = r(e.shape)), h = s(h, k);
4110
4130
  else {
4111
4131
  h.value = {};
4112
4132
  const p = d.shape;
4113
4133
  for (const _ of d.keys) {
4114
- const w = p[_], g = w._zod.run({ value: b[_], issues: [] }, S), $ = w._zod.optin === "optional" && w._zod.optout === "optional";
4134
+ const w = p[_], g = w._zod.run({ value: b[_], issues: [] }, k), $ = w._zod.optin === "optional" && w._zod.optout === "optional";
4115
4135
  g instanceof Promise ? v.push(g.then((E) => $ ? _a(E, h, _, b) : qn(E, h, _))) : $ ? _a(g, h, _, b) : qn(g, h, _);
4116
4136
  }
4117
4137
  }
@@ -4125,7 +4145,7 @@ const qc = /* @__PURE__ */ A("$ZodObject", (t, e) => {
4125
4145
  y.push(p);
4126
4146
  continue;
4127
4147
  }
4128
- const _ = m.run({ value: b[p], issues: [] }, S);
4148
+ const _ = m.run({ value: b[p], issues: [] }, k);
4129
4149
  _ instanceof Promise ? v.push(_.then((w) => qn(w, h, p))) : qn(_, h, p);
4130
4150
  }
4131
4151
  return y.length && h.issues.push({
@@ -4955,9 +4975,9 @@ class Oa {
4955
4975
  ...n,
4956
4976
  schemaPath: [...n.schemaPath, e],
4957
4977
  path: n.path
4958
- }, S = e._zod.parent;
4959
- if (S)
4960
- o.ref = S, this.process(S, h), this.seen.get(S).isParent = !0;
4978
+ }, k = e._zod.parent;
4979
+ if (k)
4980
+ o.ref = k, this.process(k, h), this.seen.get(k).isParent = !0;
4961
4981
  else {
4962
4982
  const b = o.schema;
4963
4983
  switch (s.type) {
@@ -5249,12 +5269,12 @@ class Oa {
5249
5269
  }, a = (d) => {
5250
5270
  if (d[1].schema.$ref)
5251
5271
  return;
5252
- const h = d[1], { ref: S, defId: b } = i(d);
5272
+ const h = d[1], { ref: k, defId: b } = i(d);
5253
5273
  h.def = { ...h.schema }, b && (h.defId = b);
5254
5274
  const v = h.schema;
5255
5275
  for (const y in v)
5256
5276
  delete v[y];
5257
- v.$ref = S;
5277
+ v.$ref = k;
5258
5278
  };
5259
5279
  if (r.cycles === "throw")
5260
5280
  for (const d of this.seen.entries()) {
@@ -5291,19 +5311,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5291
5311
  }
5292
5312
  }
5293
5313
  const o = (d, h) => {
5294
- const S = this.seen.get(d), b = S.def ?? S.schema, v = { ...b };
5295
- if (S.ref === null)
5314
+ const k = this.seen.get(d), b = k.def ?? k.schema, v = { ...b };
5315
+ if (k.ref === null)
5296
5316
  return;
5297
- const y = S.ref;
5298
- if (S.ref = null, y) {
5317
+ const y = k.ref;
5318
+ if (k.ref = null, y) {
5299
5319
  o(y, h);
5300
5320
  const f = this.seen.get(y).schema;
5301
5321
  f.$ref && h.target === "draft-7" ? (b.allOf = b.allOf ?? [], b.allOf.push(f)) : (Object.assign(b, f), Object.assign(b, v));
5302
5322
  }
5303
- S.isParent || this.override({
5323
+ k.isParent || this.override({
5304
5324
  zodSchema: d,
5305
5325
  jsonSchema: b,
5306
- path: S.path ?? []
5326
+ path: k.path ?? []
5307
5327
  });
5308
5328
  };
5309
5329
  for (const d of [...this.seen.entries()].reverse())
@@ -8272,12 +8292,12 @@ class my {
8272
8292
  if (this._requestResolvers.delete(d), c.type === "response")
8273
8293
  h(l);
8274
8294
  else {
8275
- const S = l, b = new ne(S.error.code, S.error.message, S.error.data);
8295
+ const k = l, b = new ne(k.error.code, k.error.message, k.error.data);
8276
8296
  h(b);
8277
8297
  }
8278
8298
  else {
8279
- const S = c.type === "response" ? "Response" : "Error";
8280
- this._onerror(new Error(`${S} handler missing for request ${d}`));
8299
+ const k = c.type === "response" ? "Response" : "Error";
8300
+ this._onerror(new Error(`${k} handler missing for request ${d}`));
8281
8301
  }
8282
8302
  continue;
8283
8303
  }
@@ -8424,10 +8444,10 @@ class my {
8424
8444
  }, d?.sessionId).catch((m) => this._onerror(new Error(`Failed to enqueue error response: ${m}`))) : d?.send(f).catch((m) => this._onerror(new Error(`Failed to send an error response: ${m}`)));
8425
8445
  return;
8426
8446
  }
8427
- const S = new AbortController();
8428
- this._requestHandlerAbortControllers.set(e.id, S);
8447
+ const k = new AbortController();
8448
+ this._requestHandlerAbortControllers.set(e.id, k);
8429
8449
  const b = (o = e.params) === null || o === void 0 ? void 0 : o.task, v = this._taskStore ? this.requestTaskStore(e, d?.sessionId) : void 0, y = {
8430
- signal: S.signal,
8450
+ signal: k.signal,
8431
8451
  sessionId: d?.sessionId,
8432
8452
  _meta: (c = e.params) === null || c === void 0 ? void 0 : c._meta,
8433
8453
  sendNotification: async (f) => {
@@ -8453,7 +8473,7 @@ class my {
8453
8473
  Promise.resolve().then(() => {
8454
8474
  b && this.assertTaskHandlerCapability(e.method);
8455
8475
  }).then(() => l(e, y)).then(async (f) => {
8456
- if (S.signal.aborted)
8476
+ if (k.signal.aborted)
8457
8477
  return;
8458
8478
  const m = {
8459
8479
  result: f,
@@ -8467,7 +8487,7 @@ class my {
8467
8487
  }, d?.sessionId) : await d?.send(m);
8468
8488
  }, async (f) => {
8469
8489
  var m;
8470
- if (S.signal.aborted)
8490
+ if (k.signal.aborted)
8471
8491
  return;
8472
8492
  const u = {
8473
8493
  jsonrpc: "2.0",
@@ -8609,8 +8629,8 @@ class my {
8609
8629
  yield { type: "result", result: await this.getTaskResult({ taskId: l }, n, r) };
8610
8630
  return;
8611
8631
  }
8612
- const S = (a = (s = h.pollInterval) !== null && s !== void 0 ? s : (i = this._options) === null || i === void 0 ? void 0 : i.defaultTaskPollInterval) !== null && a !== void 0 ? a : 1e3;
8613
- await new Promise((b) => setTimeout(b, S)), (o = r?.signal) === null || o === void 0 || o.throwIfAborted();
8632
+ const k = (a = (s = h.pollInterval) !== null && s !== void 0 ? s : (i = this._options) === null || i === void 0 ? void 0 : i.defaultTaskPollInterval) !== null && a !== void 0 ? a : 1e3;
8633
+ await new Promise((b) => setTimeout(b, k)), (o = r?.signal) === null || o === void 0 || o.throwIfAborted();
8614
8634
  }
8615
8635
  } catch (d) {
8616
8636
  yield {
@@ -8627,7 +8647,7 @@ class my {
8627
8647
  request(e, n, r) {
8628
8648
  const { relatedRequestId: s, resumptionToken: i, onresumptiontoken: a, task: o, relatedTask: c } = r ?? {};
8629
8649
  return new Promise((l, d) => {
8630
- var h, S, b, v, y, f, m;
8650
+ var h, k, b, v, y, f, m;
8631
8651
  const u = (R) => {
8632
8652
  d(R);
8633
8653
  };
@@ -8642,7 +8662,7 @@ class my {
8642
8662
  u(R);
8643
8663
  return;
8644
8664
  }
8645
- (S = r?.signal) === null || S === void 0 || S.throwIfAborted();
8665
+ (k = r?.signal) === null || k === void 0 || k.throwIfAborted();
8646
8666
  const p = this._requestMessageId++, _ = {
8647
8667
  ...e,
8648
8668
  jsonrpc: "2.0",
@@ -8756,7 +8776,7 @@ class my {
8756
8776
  this.assertNotificationCapability(e.method);
8757
8777
  const c = (r = n?.relatedTask) === null || r === void 0 ? void 0 : r.taskId;
8758
8778
  if (c) {
8759
- const S = {
8779
+ const k = {
8760
8780
  ...e,
8761
8781
  jsonrpc: "2.0",
8762
8782
  params: {
@@ -8769,7 +8789,7 @@ class my {
8769
8789
  };
8770
8790
  await this._enqueueTaskMessage(c, {
8771
8791
  type: "notification",
8772
- message: S,
8792
+ message: k,
8773
8793
  timestamp: Date.now()
8774
8794
  });
8775
8795
  return;
@@ -8778,7 +8798,7 @@ class my {
8778
8798
  if (this._pendingDebouncedNotifications.has(e.method))
8779
8799
  return;
8780
8800
  this._pendingDebouncedNotifications.add(e.method), Promise.resolve().then(() => {
8781
- var S, b;
8801
+ var k, b;
8782
8802
  if (this._pendingDebouncedNotifications.delete(e.method), !this._transport)
8783
8803
  return;
8784
8804
  let v = {
@@ -8790,7 +8810,7 @@ class my {
8790
8810
  params: {
8791
8811
  ...v.params,
8792
8812
  _meta: {
8793
- ...((S = v.params) === null || S === void 0 ? void 0 : S._meta) || {},
8813
+ ...((k = v.params) === null || k === void 0 ? void 0 : k._meta) || {},
8794
8814
  [bt]: n.relatedTask
8795
8815
  }
8796
8816
  }
@@ -9087,10 +9107,10 @@ function Wr() {
9087
9107
  function h(m) {
9088
9108
  return typeof m == "number" || typeof m == "boolean" || m === null ? m : b(Array.isArray(m) ? m.join(",") : m);
9089
9109
  }
9090
- function S(m) {
9110
+ function k(m) {
9091
9111
  return new r(b(m));
9092
9112
  }
9093
- t.stringify = S;
9113
+ t.stringify = k;
9094
9114
  function b(m) {
9095
9115
  return JSON.stringify(m).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
9096
9116
  }
@@ -9175,7 +9195,7 @@ function Ka() {
9175
9195
  var h;
9176
9196
  if (d.ref === void 0)
9177
9197
  throw new Error("CodeGen: ref must be passed in value");
9178
- const S = this.toName(l), { prefix: b } = S, v = (h = d.key) !== null && h !== void 0 ? h : d.ref;
9198
+ const k = this.toName(l), { prefix: b } = k, v = (h = d.key) !== null && h !== void 0 ? h : d.ref;
9179
9199
  let y = this._values[b];
9180
9200
  if (y) {
9181
9201
  const u = y.get(v);
@@ -9183,9 +9203,9 @@ function Ka() {
9183
9203
  return u;
9184
9204
  } else
9185
9205
  y = this._values[b] = /* @__PURE__ */ new Map();
9186
- y.set(v, S);
9206
+ y.set(v, k);
9187
9207
  const f = this._scope[b] || (this._scope[b] = []), m = f.length;
9188
- return f[m] = d.ref, S.setValue(d, { property: b, itemIndex: m }), S;
9208
+ return f[m] = d.ref, k.setValue(d, { property: b, itemIndex: m }), k;
9189
9209
  }
9190
9210
  getValue(l, d) {
9191
9211
  const h = this._values[l];
@@ -9200,13 +9220,13 @@ function Ka() {
9200
9220
  });
9201
9221
  }
9202
9222
  scopeCode(l = this._values, d, h) {
9203
- return this._reduceValues(l, (S) => {
9204
- if (S.value === void 0)
9205
- throw new Error(`CodeGen: name "${S}" has no value`);
9206
- return S.value.code;
9223
+ return this._reduceValues(l, (k) => {
9224
+ if (k.value === void 0)
9225
+ throw new Error(`CodeGen: name "${k}" has no value`);
9226
+ return k.value.code;
9207
9227
  }, d, h);
9208
9228
  }
9209
- _reduceValues(l, d, h = {}, S) {
9229
+ _reduceValues(l, d, h = {}, k) {
9210
9230
  let b = e.nil;
9211
9231
  for (const v in l) {
9212
9232
  const y = l[v];
@@ -9221,7 +9241,7 @@ function Ka() {
9221
9241
  if (u) {
9222
9242
  const p = this.opts.es5 ? t.varKinds.var : t.varKinds.const;
9223
9243
  b = (0, e._)`${b}${p} ${m} = ${u};${this.opts._n}`;
9224
- } else if (u = S?.(m))
9244
+ } else if (u = k?.(m))
9225
9245
  b = (0, e._)`${b}${u}${this.opts._n}`;
9226
9246
  else
9227
9247
  throw new n(m);
@@ -9282,126 +9302,126 @@ function oe() {
9282
9302
  optimizeNodes() {
9283
9303
  return this;
9284
9304
  }
9285
- optimizeNames(k, T) {
9305
+ optimizeNames(S, T) {
9286
9306
  return this;
9287
9307
  }
9288
9308
  }
9289
9309
  class a extends i {
9290
- constructor(k, T, j) {
9291
- super(), this.varKind = k, this.name = T, this.rhs = j;
9310
+ constructor(S, T, j) {
9311
+ super(), this.varKind = S, this.name = T, this.rhs = j;
9292
9312
  }
9293
- render({ es5: k, _n: T }) {
9294
- const j = k ? n.varKinds.var : this.varKind, G = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
9313
+ render({ es5: S, _n: T }) {
9314
+ const j = S ? n.varKinds.var : this.varKind, G = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
9295
9315
  return `${j} ${this.name}${G};` + T;
9296
9316
  }
9297
- optimizeNames(k, T) {
9298
- if (k[this.name.str])
9299
- return this.rhs && (this.rhs = H(this.rhs, k, T)), this;
9317
+ optimizeNames(S, T) {
9318
+ if (S[this.name.str])
9319
+ return this.rhs && (this.rhs = H(this.rhs, S, T)), this;
9300
9320
  }
9301
9321
  get names() {
9302
9322
  return this.rhs instanceof e._CodeOrName ? this.rhs.names : {};
9303
9323
  }
9304
9324
  }
9305
9325
  class o extends i {
9306
- constructor(k, T, j) {
9307
- super(), this.lhs = k, this.rhs = T, this.sideEffects = j;
9326
+ constructor(S, T, j) {
9327
+ super(), this.lhs = S, this.rhs = T, this.sideEffects = j;
9308
9328
  }
9309
- render({ _n: k }) {
9310
- return `${this.lhs} = ${this.rhs};` + k;
9329
+ render({ _n: S }) {
9330
+ return `${this.lhs} = ${this.rhs};` + S;
9311
9331
  }
9312
- optimizeNames(k, T) {
9313
- if (!(this.lhs instanceof e.Name && !k[this.lhs.str] && !this.sideEffects))
9314
- return this.rhs = H(this.rhs, k, T), this;
9332
+ optimizeNames(S, T) {
9333
+ if (!(this.lhs instanceof e.Name && !S[this.lhs.str] && !this.sideEffects))
9334
+ return this.rhs = H(this.rhs, S, T), this;
9315
9335
  }
9316
9336
  get names() {
9317
- const k = this.lhs instanceof e.Name ? {} : { ...this.lhs.names };
9318
- return q(k, this.rhs);
9337
+ const S = this.lhs instanceof e.Name ? {} : { ...this.lhs.names };
9338
+ return q(S, this.rhs);
9319
9339
  }
9320
9340
  }
9321
9341
  class c extends o {
9322
- constructor(k, T, j, G) {
9323
- super(k, j, G), this.op = T;
9342
+ constructor(S, T, j, G) {
9343
+ super(S, j, G), this.op = T;
9324
9344
  }
9325
- render({ _n: k }) {
9326
- return `${this.lhs} ${this.op}= ${this.rhs};` + k;
9345
+ render({ _n: S }) {
9346
+ return `${this.lhs} ${this.op}= ${this.rhs};` + S;
9327
9347
  }
9328
9348
  }
9329
9349
  class l extends i {
9330
- constructor(k) {
9331
- super(), this.label = k, this.names = {};
9350
+ constructor(S) {
9351
+ super(), this.label = S, this.names = {};
9332
9352
  }
9333
- render({ _n: k }) {
9334
- return `${this.label}:` + k;
9353
+ render({ _n: S }) {
9354
+ return `${this.label}:` + S;
9335
9355
  }
9336
9356
  }
9337
9357
  class d extends i {
9338
- constructor(k) {
9339
- super(), this.label = k, this.names = {};
9358
+ constructor(S) {
9359
+ super(), this.label = S, this.names = {};
9340
9360
  }
9341
- render({ _n: k }) {
9342
- return `break${this.label ? ` ${this.label}` : ""};` + k;
9361
+ render({ _n: S }) {
9362
+ return `break${this.label ? ` ${this.label}` : ""};` + S;
9343
9363
  }
9344
9364
  }
9345
9365
  class h extends i {
9346
- constructor(k) {
9347
- super(), this.error = k;
9366
+ constructor(S) {
9367
+ super(), this.error = S;
9348
9368
  }
9349
- render({ _n: k }) {
9350
- return `throw ${this.error};` + k;
9369
+ render({ _n: S }) {
9370
+ return `throw ${this.error};` + S;
9351
9371
  }
9352
9372
  get names() {
9353
9373
  return this.error.names;
9354
9374
  }
9355
9375
  }
9356
- class S extends i {
9357
- constructor(k) {
9358
- super(), this.code = k;
9376
+ class k extends i {
9377
+ constructor(S) {
9378
+ super(), this.code = S;
9359
9379
  }
9360
- render({ _n: k }) {
9361
- return `${this.code};` + k;
9380
+ render({ _n: S }) {
9381
+ return `${this.code};` + S;
9362
9382
  }
9363
9383
  optimizeNodes() {
9364
9384
  return `${this.code}` ? this : void 0;
9365
9385
  }
9366
- optimizeNames(k, T) {
9367
- return this.code = H(this.code, k, T), this;
9386
+ optimizeNames(S, T) {
9387
+ return this.code = H(this.code, S, T), this;
9368
9388
  }
9369
9389
  get names() {
9370
9390
  return this.code instanceof e._CodeOrName ? this.code.names : {};
9371
9391
  }
9372
9392
  }
9373
9393
  class b extends i {
9374
- constructor(k = []) {
9375
- super(), this.nodes = k;
9394
+ constructor(S = []) {
9395
+ super(), this.nodes = S;
9376
9396
  }
9377
- render(k) {
9378
- return this.nodes.reduce((T, j) => T + j.render(k), "");
9397
+ render(S) {
9398
+ return this.nodes.reduce((T, j) => T + j.render(S), "");
9379
9399
  }
9380
9400
  optimizeNodes() {
9381
- const { nodes: k } = this;
9382
- let T = k.length;
9401
+ const { nodes: S } = this;
9402
+ let T = S.length;
9383
9403
  for (; T--; ) {
9384
- const j = k[T].optimizeNodes();
9385
- Array.isArray(j) ? k.splice(T, 1, ...j) : j ? k[T] = j : k.splice(T, 1);
9404
+ const j = S[T].optimizeNodes();
9405
+ Array.isArray(j) ? S.splice(T, 1, ...j) : j ? S[T] = j : S.splice(T, 1);
9386
9406
  }
9387
- return k.length > 0 ? this : void 0;
9407
+ return S.length > 0 ? this : void 0;
9388
9408
  }
9389
- optimizeNames(k, T) {
9409
+ optimizeNames(S, T) {
9390
9410
  const { nodes: j } = this;
9391
9411
  let G = j.length;
9392
9412
  for (; G--; ) {
9393
9413
  const te = j[G];
9394
- te.optimizeNames(k, T) || (ie(k, te.names), j.splice(G, 1));
9414
+ te.optimizeNames(S, T) || (ie(S, te.names), j.splice(G, 1));
9395
9415
  }
9396
9416
  return j.length > 0 ? this : void 0;
9397
9417
  }
9398
9418
  get names() {
9399
- return this.nodes.reduce((k, T) => M(k, T.names), {});
9419
+ return this.nodes.reduce((S, T) => M(S, T.names), {});
9400
9420
  }
9401
9421
  }
9402
9422
  class v extends b {
9403
- render(k) {
9404
- return "{" + k._n + super.render(k) + "}" + k._n;
9423
+ render(S) {
9424
+ return "{" + S._n + super.render(S) + "}" + S._n;
9405
9425
  }
9406
9426
  }
9407
9427
  class y extends b {
@@ -9410,17 +9430,17 @@ function oe() {
9410
9430
  }
9411
9431
  f.kind = "else";
9412
9432
  class m extends v {
9413
- constructor(k, T) {
9414
- super(T), this.condition = k;
9433
+ constructor(S, T) {
9434
+ super(T), this.condition = S;
9415
9435
  }
9416
- render(k) {
9417
- let T = `if(${this.condition})` + super.render(k);
9418
- return this.else && (T += "else " + this.else.render(k)), T;
9436
+ render(S) {
9437
+ let T = `if(${this.condition})` + super.render(S);
9438
+ return this.else && (T += "else " + this.else.render(S)), T;
9419
9439
  }
9420
9440
  optimizeNodes() {
9421
9441
  super.optimizeNodes();
9422
- const k = this.condition;
9423
- if (k === !0)
9442
+ const S = this.condition;
9443
+ if (S === !0)
9424
9444
  return this.nodes;
9425
9445
  let T = this.else;
9426
9446
  if (T) {
@@ -9428,18 +9448,18 @@ function oe() {
9428
9448
  T = this.else = Array.isArray(j) ? new f(j) : j;
9429
9449
  }
9430
9450
  if (T)
9431
- return k === !1 ? T instanceof m ? T : T.nodes : this.nodes.length ? this : new m(ve(k), T instanceof m ? [T] : T.nodes);
9432
- if (!(k === !1 || !this.nodes.length))
9451
+ return S === !1 ? T instanceof m ? T : T.nodes : this.nodes.length ? this : new m(ve(S), T instanceof m ? [T] : T.nodes);
9452
+ if (!(S === !1 || !this.nodes.length))
9433
9453
  return this;
9434
9454
  }
9435
- optimizeNames(k, T) {
9455
+ optimizeNames(S, T) {
9436
9456
  var j;
9437
- if (this.else = (j = this.else) === null || j === void 0 ? void 0 : j.optimizeNames(k, T), !!(super.optimizeNames(k, T) || this.else))
9438
- return this.condition = H(this.condition, k, T), this;
9457
+ if (this.else = (j = this.else) === null || j === void 0 ? void 0 : j.optimizeNames(S, T), !!(super.optimizeNames(S, T) || this.else))
9458
+ return this.condition = H(this.condition, S, T), this;
9439
9459
  }
9440
9460
  get names() {
9441
- const k = super.names;
9442
- return q(k, this.condition), this.else && M(k, this.else.names), k;
9461
+ const S = super.names;
9462
+ return q(S, this.condition), this.else && M(S, this.else.names), S;
9443
9463
  }
9444
9464
  }
9445
9465
  m.kind = "if";
@@ -9447,166 +9467,166 @@ function oe() {
9447
9467
  }
9448
9468
  u.kind = "for";
9449
9469
  class p extends u {
9450
- constructor(k) {
9451
- super(), this.iteration = k;
9470
+ constructor(S) {
9471
+ super(), this.iteration = S;
9452
9472
  }
9453
- render(k) {
9454
- return `for(${this.iteration})` + super.render(k);
9473
+ render(S) {
9474
+ return `for(${this.iteration})` + super.render(S);
9455
9475
  }
9456
- optimizeNames(k, T) {
9457
- if (super.optimizeNames(k, T))
9458
- return this.iteration = H(this.iteration, k, T), this;
9476
+ optimizeNames(S, T) {
9477
+ if (super.optimizeNames(S, T))
9478
+ return this.iteration = H(this.iteration, S, T), this;
9459
9479
  }
9460
9480
  get names() {
9461
9481
  return M(super.names, this.iteration.names);
9462
9482
  }
9463
9483
  }
9464
9484
  class _ extends u {
9465
- constructor(k, T, j, G) {
9466
- super(), this.varKind = k, this.name = T, this.from = j, this.to = G;
9485
+ constructor(S, T, j, G) {
9486
+ super(), this.varKind = S, this.name = T, this.from = j, this.to = G;
9467
9487
  }
9468
- render(k) {
9469
- const T = k.es5 ? n.varKinds.var : this.varKind, { name: j, from: G, to: te } = this;
9470
- return `for(${T} ${j}=${G}; ${j}<${te}; ${j}++)` + super.render(k);
9488
+ render(S) {
9489
+ const T = S.es5 ? n.varKinds.var : this.varKind, { name: j, from: G, to: te } = this;
9490
+ return `for(${T} ${j}=${G}; ${j}<${te}; ${j}++)` + super.render(S);
9471
9491
  }
9472
9492
  get names() {
9473
- const k = q(super.names, this.from);
9474
- return q(k, this.to);
9493
+ const S = q(super.names, this.from);
9494
+ return q(S, this.to);
9475
9495
  }
9476
9496
  }
9477
9497
  class w extends u {
9478
- constructor(k, T, j, G) {
9479
- super(), this.loop = k, this.varKind = T, this.name = j, this.iterable = G;
9498
+ constructor(S, T, j, G) {
9499
+ super(), this.loop = S, this.varKind = T, this.name = j, this.iterable = G;
9480
9500
  }
9481
- render(k) {
9482
- return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(k);
9501
+ render(S) {
9502
+ return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(S);
9483
9503
  }
9484
- optimizeNames(k, T) {
9485
- if (super.optimizeNames(k, T))
9486
- return this.iterable = H(this.iterable, k, T), this;
9504
+ optimizeNames(S, T) {
9505
+ if (super.optimizeNames(S, T))
9506
+ return this.iterable = H(this.iterable, S, T), this;
9487
9507
  }
9488
9508
  get names() {
9489
9509
  return M(super.names, this.iterable.names);
9490
9510
  }
9491
9511
  }
9492
9512
  class g extends v {
9493
- constructor(k, T, j) {
9494
- super(), this.name = k, this.args = T, this.async = j;
9513
+ constructor(S, T, j) {
9514
+ super(), this.name = S, this.args = T, this.async = j;
9495
9515
  }
9496
- render(k) {
9497
- return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(k);
9516
+ render(S) {
9517
+ return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(S);
9498
9518
  }
9499
9519
  }
9500
9520
  g.kind = "func";
9501
9521
  class $ extends b {
9502
- render(k) {
9503
- return "return " + super.render(k);
9522
+ render(S) {
9523
+ return "return " + super.render(S);
9504
9524
  }
9505
9525
  }
9506
9526
  $.kind = "return";
9507
9527
  class E extends v {
9508
- render(k) {
9509
- let T = "try" + super.render(k);
9510
- return this.catch && (T += this.catch.render(k)), this.finally && (T += this.finally.render(k)), T;
9528
+ render(S) {
9529
+ let T = "try" + super.render(S);
9530
+ return this.catch && (T += this.catch.render(S)), this.finally && (T += this.finally.render(S)), T;
9511
9531
  }
9512
9532
  optimizeNodes() {
9513
- var k, T;
9514
- return super.optimizeNodes(), (k = this.catch) === null || k === void 0 || k.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
9533
+ var S, T;
9534
+ return super.optimizeNodes(), (S = this.catch) === null || S === void 0 || S.optimizeNodes(), (T = this.finally) === null || T === void 0 || T.optimizeNodes(), this;
9515
9535
  }
9516
- optimizeNames(k, T) {
9536
+ optimizeNames(S, T) {
9517
9537
  var j, G;
9518
- return super.optimizeNames(k, T), (j = this.catch) === null || j === void 0 || j.optimizeNames(k, T), (G = this.finally) === null || G === void 0 || G.optimizeNames(k, T), this;
9538
+ return super.optimizeNames(S, T), (j = this.catch) === null || j === void 0 || j.optimizeNames(S, T), (G = this.finally) === null || G === void 0 || G.optimizeNames(S, T), this;
9519
9539
  }
9520
9540
  get names() {
9521
- const k = super.names;
9522
- return this.catch && M(k, this.catch.names), this.finally && M(k, this.finally.names), k;
9541
+ const S = super.names;
9542
+ return this.catch && M(S, this.catch.names), this.finally && M(S, this.finally.names), S;
9523
9543
  }
9524
9544
  }
9525
9545
  class R extends v {
9526
- constructor(k) {
9527
- super(), this.error = k;
9546
+ constructor(S) {
9547
+ super(), this.error = S;
9528
9548
  }
9529
- render(k) {
9530
- return `catch(${this.error})` + super.render(k);
9549
+ render(S) {
9550
+ return `catch(${this.error})` + super.render(S);
9531
9551
  }
9532
9552
  }
9533
9553
  R.kind = "catch";
9534
9554
  class z extends v {
9535
- render(k) {
9536
- return "finally" + super.render(k);
9555
+ render(S) {
9556
+ return "finally" + super.render(S);
9537
9557
  }
9538
9558
  }
9539
9559
  z.kind = "finally";
9540
9560
  class C {
9541
- constructor(k, T = {}) {
9561
+ constructor(S, T = {}) {
9542
9562
  this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...T, _n: T.lines ? `
9543
- ` : "" }, this._extScope = k, this._scope = new n.Scope({ parent: k }), this._nodes = [new y()];
9563
+ ` : "" }, this._extScope = S, this._scope = new n.Scope({ parent: S }), this._nodes = [new y()];
9544
9564
  }
9545
9565
  toString() {
9546
9566
  return this._root.render(this.opts);
9547
9567
  }
9548
9568
  // returns unique name in the internal scope
9549
- name(k) {
9550
- return this._scope.name(k);
9569
+ name(S) {
9570
+ return this._scope.name(S);
9551
9571
  }
9552
9572
  // reserves unique name in the external scope
9553
- scopeName(k) {
9554
- return this._extScope.name(k);
9573
+ scopeName(S) {
9574
+ return this._extScope.name(S);
9555
9575
  }
9556
9576
  // reserves unique name in the external scope and assigns value to it
9557
- scopeValue(k, T) {
9558
- const j = this._extScope.value(k, T);
9577
+ scopeValue(S, T) {
9578
+ const j = this._extScope.value(S, T);
9559
9579
  return (this._values[j.prefix] || (this._values[j.prefix] = /* @__PURE__ */ new Set())).add(j), j;
9560
9580
  }
9561
- getScopeValue(k, T) {
9562
- return this._extScope.getValue(k, T);
9581
+ getScopeValue(S, T) {
9582
+ return this._extScope.getValue(S, T);
9563
9583
  }
9564
9584
  // return code that assigns values in the external scope to the names that are used internally
9565
9585
  // (same names that were returned by gen.scopeName or gen.scopeValue)
9566
- scopeRefs(k) {
9567
- return this._extScope.scopeRefs(k, this._values);
9586
+ scopeRefs(S) {
9587
+ return this._extScope.scopeRefs(S, this._values);
9568
9588
  }
9569
9589
  scopeCode() {
9570
9590
  return this._extScope.scopeCode(this._values);
9571
9591
  }
9572
- _def(k, T, j, G) {
9592
+ _def(S, T, j, G) {
9573
9593
  const te = this._scope.toName(T);
9574
- return j !== void 0 && G && (this._constants[te.str] = j), this._leafNode(new a(k, te, j)), te;
9594
+ return j !== void 0 && G && (this._constants[te.str] = j), this._leafNode(new a(S, te, j)), te;
9575
9595
  }
9576
9596
  // `const` declaration (`var` in es5 mode)
9577
- const(k, T, j) {
9578
- return this._def(n.varKinds.const, k, T, j);
9597
+ const(S, T, j) {
9598
+ return this._def(n.varKinds.const, S, T, j);
9579
9599
  }
9580
9600
  // `let` declaration with optional assignment (`var` in es5 mode)
9581
- let(k, T, j) {
9582
- return this._def(n.varKinds.let, k, T, j);
9601
+ let(S, T, j) {
9602
+ return this._def(n.varKinds.let, S, T, j);
9583
9603
  }
9584
9604
  // `var` declaration with optional assignment
9585
- var(k, T, j) {
9586
- return this._def(n.varKinds.var, k, T, j);
9605
+ var(S, T, j) {
9606
+ return this._def(n.varKinds.var, S, T, j);
9587
9607
  }
9588
9608
  // assignment code
9589
- assign(k, T, j) {
9590
- return this._leafNode(new o(k, T, j));
9609
+ assign(S, T, j) {
9610
+ return this._leafNode(new o(S, T, j));
9591
9611
  }
9592
9612
  // `+=` code
9593
- add(k, T) {
9594
- return this._leafNode(new c(k, t.operators.ADD, T));
9613
+ add(S, T) {
9614
+ return this._leafNode(new c(S, t.operators.ADD, T));
9595
9615
  }
9596
9616
  // appends passed SafeExpr to code or executes Block
9597
- code(k) {
9598
- return typeof k == "function" ? k() : k !== e.nil && this._leafNode(new S(k)), this;
9617
+ code(S) {
9618
+ return typeof S == "function" ? S() : S !== e.nil && this._leafNode(new k(S)), this;
9599
9619
  }
9600
9620
  // returns code for object literal for the passed argument list of key-value pairs
9601
- object(...k) {
9621
+ object(...S) {
9602
9622
  const T = ["{"];
9603
- for (const [j, G] of k)
9623
+ for (const [j, G] of S)
9604
9624
  T.length > 1 && T.push(","), T.push(j), (j !== G || this.opts.es5) && (T.push(":"), (0, e.addCodeArg)(T, G));
9605
9625
  return T.push("}"), new e._Code(T);
9606
9626
  }
9607
9627
  // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
9608
- if(k, T, j) {
9609
- if (this._blockNode(new m(k)), T && j)
9628
+ if(S, T, j) {
9629
+ if (this._blockNode(new m(S)), T && j)
9610
9630
  this.code(T).else().code(j).endIf();
9611
9631
  else if (T)
9612
9632
  this.code(T).endIf();
@@ -9615,8 +9635,8 @@ function oe() {
9615
9635
  return this;
9616
9636
  }
9617
9637
  // `else if` clause - invalid without `if` or after `else` clauses
9618
- elseIf(k) {
9619
- return this._elseNode(new m(k));
9638
+ elseIf(S) {
9639
+ return this._elseNode(new m(S));
9620
9640
  }
9621
9641
  // `else` clause - only valid after `if` or `else if` clauses
9622
9642
  else() {
@@ -9626,21 +9646,21 @@ function oe() {
9626
9646
  endIf() {
9627
9647
  return this._endBlockNode(m, f);
9628
9648
  }
9629
- _for(k, T) {
9630
- return this._blockNode(k), T && this.code(T).endFor(), this;
9649
+ _for(S, T) {
9650
+ return this._blockNode(S), T && this.code(T).endFor(), this;
9631
9651
  }
9632
9652
  // a generic `for` clause (or statement if `forBody` is passed)
9633
- for(k, T) {
9634
- return this._for(new p(k), T);
9653
+ for(S, T) {
9654
+ return this._for(new p(S), T);
9635
9655
  }
9636
9656
  // `for` statement for a range of values
9637
- forRange(k, T, j, G, te = this.opts.es5 ? n.varKinds.var : n.varKinds.let) {
9638
- const ge = this._scope.toName(k);
9657
+ forRange(S, T, j, G, te = this.opts.es5 ? n.varKinds.var : n.varKinds.let) {
9658
+ const ge = this._scope.toName(S);
9639
9659
  return this._for(new _(te, ge, T, j), () => G(ge));
9640
9660
  }
9641
9661
  // `for-of` statement (in es5 mode replace with a normal for loop)
9642
- forOf(k, T, j, G = n.varKinds.const) {
9643
- const te = this._scope.toName(k);
9662
+ forOf(S, T, j, G = n.varKinds.const) {
9663
+ const te = this._scope.toName(S);
9644
9664
  if (this.opts.es5) {
9645
9665
  const ge = T instanceof e.Name ? T : this.var("_arr", T);
9646
9666
  return this.forRange("_i", 0, (0, e._)`${ge}.length`, (le) => {
@@ -9651,10 +9671,10 @@ function oe() {
9651
9671
  }
9652
9672
  // `for-in` statement.
9653
9673
  // With option `ownProperties` replaced with a `for-of` loop for object keys
9654
- forIn(k, T, j, G = this.opts.es5 ? n.varKinds.var : n.varKinds.const) {
9674
+ forIn(S, T, j, G = this.opts.es5 ? n.varKinds.var : n.varKinds.const) {
9655
9675
  if (this.opts.ownProperties)
9656
- return this.forOf(k, (0, e._)`Object.keys(${T})`, j);
9657
- const te = this._scope.toName(k);
9676
+ return this.forOf(S, (0, e._)`Object.keys(${T})`, j);
9677
+ const te = this._scope.toName(S);
9658
9678
  return this._for(new w("in", G, te, T), () => j(te));
9659
9679
  }
9660
9680
  // end `for` loop
@@ -9662,101 +9682,101 @@ function oe() {
9662
9682
  return this._endBlockNode(u);
9663
9683
  }
9664
9684
  // `label` statement
9665
- label(k) {
9666
- return this._leafNode(new l(k));
9685
+ label(S) {
9686
+ return this._leafNode(new l(S));
9667
9687
  }
9668
9688
  // `break` statement
9669
- break(k) {
9670
- return this._leafNode(new d(k));
9689
+ break(S) {
9690
+ return this._leafNode(new d(S));
9671
9691
  }
9672
9692
  // `return` statement
9673
- return(k) {
9693
+ return(S) {
9674
9694
  const T = new $();
9675
- if (this._blockNode(T), this.code(k), T.nodes.length !== 1)
9695
+ if (this._blockNode(T), this.code(S), T.nodes.length !== 1)
9676
9696
  throw new Error('CodeGen: "return" should have one node');
9677
9697
  return this._endBlockNode($);
9678
9698
  }
9679
9699
  // `try` statement
9680
- try(k, T, j) {
9700
+ try(S, T, j) {
9681
9701
  if (!T && !j)
9682
9702
  throw new Error('CodeGen: "try" without "catch" and "finally"');
9683
9703
  const G = new E();
9684
- if (this._blockNode(G), this.code(k), T) {
9704
+ if (this._blockNode(G), this.code(S), T) {
9685
9705
  const te = this.name("e");
9686
9706
  this._currNode = G.catch = new R(te), T(te);
9687
9707
  }
9688
9708
  return j && (this._currNode = G.finally = new z(), this.code(j)), this._endBlockNode(R, z);
9689
9709
  }
9690
9710
  // `throw` statement
9691
- throw(k) {
9692
- return this._leafNode(new h(k));
9711
+ throw(S) {
9712
+ return this._leafNode(new h(S));
9693
9713
  }
9694
9714
  // start self-balancing block
9695
- block(k, T) {
9696
- return this._blockStarts.push(this._nodes.length), k && this.code(k).endBlock(T), this;
9715
+ block(S, T) {
9716
+ return this._blockStarts.push(this._nodes.length), S && this.code(S).endBlock(T), this;
9697
9717
  }
9698
9718
  // end the current self-balancing block
9699
- endBlock(k) {
9719
+ endBlock(S) {
9700
9720
  const T = this._blockStarts.pop();
9701
9721
  if (T === void 0)
9702
9722
  throw new Error("CodeGen: not in self-balancing block");
9703
9723
  const j = this._nodes.length - T;
9704
- if (j < 0 || k !== void 0 && j !== k)
9705
- throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${k} expected`);
9724
+ if (j < 0 || S !== void 0 && j !== S)
9725
+ throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${S} expected`);
9706
9726
  return this._nodes.length = T, this;
9707
9727
  }
9708
9728
  // `function` heading (or definition if funcBody is passed)
9709
- func(k, T = e.nil, j, G) {
9710
- return this._blockNode(new g(k, T, j)), G && this.code(G).endFunc(), this;
9729
+ func(S, T = e.nil, j, G) {
9730
+ return this._blockNode(new g(S, T, j)), G && this.code(G).endFunc(), this;
9711
9731
  }
9712
9732
  // end function definition
9713
9733
  endFunc() {
9714
9734
  return this._endBlockNode(g);
9715
9735
  }
9716
- optimize(k = 1) {
9717
- for (; k-- > 0; )
9736
+ optimize(S = 1) {
9737
+ for (; S-- > 0; )
9718
9738
  this._root.optimizeNodes(), this._root.optimizeNames(this._root.names, this._constants);
9719
9739
  }
9720
- _leafNode(k) {
9721
- return this._currNode.nodes.push(k), this;
9740
+ _leafNode(S) {
9741
+ return this._currNode.nodes.push(S), this;
9722
9742
  }
9723
- _blockNode(k) {
9724
- this._currNode.nodes.push(k), this._nodes.push(k);
9743
+ _blockNode(S) {
9744
+ this._currNode.nodes.push(S), this._nodes.push(S);
9725
9745
  }
9726
- _endBlockNode(k, T) {
9746
+ _endBlockNode(S, T) {
9727
9747
  const j = this._currNode;
9728
- if (j instanceof k || T && j instanceof T)
9748
+ if (j instanceof S || T && j instanceof T)
9729
9749
  return this._nodes.pop(), this;
9730
- throw new Error(`CodeGen: not in block "${T ? `${k.kind}/${T.kind}` : k.kind}"`);
9750
+ throw new Error(`CodeGen: not in block "${T ? `${S.kind}/${T.kind}` : S.kind}"`);
9731
9751
  }
9732
- _elseNode(k) {
9752
+ _elseNode(S) {
9733
9753
  const T = this._currNode;
9734
9754
  if (!(T instanceof m))
9735
9755
  throw new Error('CodeGen: "else" without "if"');
9736
- return this._currNode = T.else = k, this;
9756
+ return this._currNode = T.else = S, this;
9737
9757
  }
9738
9758
  get _root() {
9739
9759
  return this._nodes[0];
9740
9760
  }
9741
9761
  get _currNode() {
9742
- const k = this._nodes;
9743
- return k[k.length - 1];
9762
+ const S = this._nodes;
9763
+ return S[S.length - 1];
9744
9764
  }
9745
- set _currNode(k) {
9765
+ set _currNode(S) {
9746
9766
  const T = this._nodes;
9747
- T[T.length - 1] = k;
9767
+ T[T.length - 1] = S;
9748
9768
  }
9749
9769
  }
9750
9770
  t.CodeGen = C;
9751
- function M(N, k) {
9752
- for (const T in k)
9753
- N[T] = (N[T] || 0) + (k[T] || 0);
9771
+ function M(N, S) {
9772
+ for (const T in S)
9773
+ N[T] = (N[T] || 0) + (S[T] || 0);
9754
9774
  return N;
9755
9775
  }
9756
- function q(N, k) {
9757
- return k instanceof e._CodeOrName ? M(N, k.names) : N;
9776
+ function q(N, S) {
9777
+ return S instanceof e._CodeOrName ? M(N, S.names) : N;
9758
9778
  }
9759
- function H(N, k, T) {
9779
+ function H(N, S, T) {
9760
9780
  if (N instanceof e.Name)
9761
9781
  return j(N);
9762
9782
  if (!G(N))
@@ -9764,15 +9784,15 @@ function oe() {
9764
9784
  return new e._Code(N._items.reduce((te, ge) => (ge instanceof e.Name && (ge = j(ge)), ge instanceof e._Code ? te.push(...ge._items) : te.push(ge), te), []));
9765
9785
  function j(te) {
9766
9786
  const ge = T[te.str];
9767
- return ge === void 0 || k[te.str] !== 1 ? te : (delete k[te.str], ge);
9787
+ return ge === void 0 || S[te.str] !== 1 ? te : (delete S[te.str], ge);
9768
9788
  }
9769
9789
  function G(te) {
9770
- return te instanceof e._Code && te._items.some((ge) => ge instanceof e.Name && k[ge.str] === 1 && T[ge.str] !== void 0);
9790
+ return te instanceof e._Code && te._items.some((ge) => ge instanceof e.Name && S[ge.str] === 1 && T[ge.str] !== void 0);
9771
9791
  }
9772
9792
  }
9773
- function ie(N, k) {
9774
- for (const T in k)
9775
- N[T] = (N[T] || 0) - (k[T] || 0);
9793
+ function ie(N, S) {
9794
+ for (const T in S)
9795
+ N[T] = (N[T] || 0) - (S[T] || 0);
9776
9796
  }
9777
9797
  function ve(N) {
9778
9798
  return typeof N == "boolean" || typeof N == "number" || N === null ? !N : (0, e._)`!${D(N)}`;
@@ -9789,7 +9809,7 @@ function oe() {
9789
9809
  }
9790
9810
  t.or = V;
9791
9811
  function I(N) {
9792
- return (k, T) => k === e.nil ? T : T === e.nil ? k : (0, e._)`${D(k)} ${N} ${D(T)}`;
9812
+ return (S, T) => S === e.nil ? T : T === e.nil ? S : (0, e._)`${D(S)} ${N} ${D(T)}`;
9793
9813
  }
9794
9814
  function D(N) {
9795
9815
  return N instanceof e.Name ? N : (0, e._)`(${N})`;
@@ -9865,14 +9885,14 @@ function me() {
9865
9885
  return w.replace(/~1/g, "/").replace(/~0/g, "~");
9866
9886
  }
9867
9887
  ae.unescapeJsonPointer = h;
9868
- function S(w, g) {
9888
+ function k(w, g) {
9869
9889
  if (Array.isArray(w))
9870
9890
  for (const $ of w)
9871
9891
  g($);
9872
9892
  else
9873
9893
  g(w);
9874
9894
  }
9875
- ae.eachItem = S;
9895
+ ae.eachItem = k;
9876
9896
  function b({ mergeNames: w, mergeToName: g, mergeValues: $, resultToName: E }) {
9877
9897
  return (R, z, C, M) => {
9878
9898
  const q = C === void 0 ? z : C instanceof t.Name ? (z instanceof t.Name ? w(R, z, C) : g(R, z, C), C) : z instanceof t.Name ? (g(R, C, z), z) : $(z, C);
@@ -10025,9 +10045,9 @@ function as() {
10025
10045
  };
10026
10046
  function h(f, m, u) {
10027
10047
  const { createErrors: p } = f.it;
10028
- return p === !1 ? (0, e._)`{}` : S(f, m, u);
10048
+ return p === !1 ? (0, e._)`{}` : k(f, m, u);
10029
10049
  }
10030
- function S(f, m, u = {}) {
10050
+ function k(f, m, u = {}) {
10031
10051
  const { gen: p, it: _ } = f, w = [
10032
10052
  b(_, u),
10033
10053
  v(f, u)
@@ -10175,7 +10195,7 @@ function Br() {
10175
10195
  for (const C of _)
10176
10196
  (l.has(C) || C === "array" && $.coerceTypes === "array") && z(C);
10177
10197
  w.else(), f(u), w.endIf(), w.if((0, r._)`${R} !== undefined`, () => {
10178
- w.assign(g, R), S(u, R);
10198
+ w.assign(g, R), k(u, R);
10179
10199
  });
10180
10200
  function z(C) {
10181
10201
  switch (C) {
@@ -10202,7 +10222,7 @@ function Br() {
10202
10222
  }
10203
10223
  }
10204
10224
  }
10205
- function S({ gen: u, parentData: p, parentDataProperty: _ }, w) {
10225
+ function k({ gen: u, parentData: p, parentDataProperty: _ }, w) {
10206
10226
  u.if((0, r._)`${p} !== undefined`, () => u.assign((0, r._)`${p}[${_}]`, w));
10207
10227
  }
10208
10228
  function b(u, p, _, w = i.Correct) {
@@ -10295,8 +10315,8 @@ function vy() {
10295
10315
  (0, e.checkStrictMode)(s, `default is ignored for: ${h}`);
10296
10316
  return;
10297
10317
  }
10298
- let S = (0, t._)`${h} === undefined`;
10299
- d.useDefaults === "empty" && (S = (0, t._)`${S} || ${h} === null || ${h} === ""`), o.if(S, (0, t._)`${h} = ${(0, t.stringify)(a)}`);
10318
+ let k = (0, t._)`${h} === undefined`;
10319
+ d.useDefaults === "empty" && (k = (0, t._)`${k} || ${h} === null || ${h} === ""`), o.if(k, (0, t._)`${h} = ${(0, t.stringify)(a)}`);
10300
10320
  }
10301
10321
  return ln;
10302
10322
  }
@@ -10346,10 +10366,10 @@ function ft() {
10346
10366
  return u ? Object.keys(u).filter((p) => p !== "__proto__") : [];
10347
10367
  }
10348
10368
  _e.allSchemaProperties = h;
10349
- function S(u, p) {
10369
+ function k(u, p) {
10350
10370
  return h(p).filter((_) => !(0, e.alwaysValidSchema)(u, p[_]));
10351
10371
  }
10352
- _e.schemaProperties = S;
10372
+ _e.schemaProperties = k;
10353
10373
  function b({ schemaCode: u, data: p, it: { gen: _, topSchemaRef: w, schemaPath: g, errorPath: $ }, it: E }, R, z, C) {
10354
10374
  const M = C ? (0, t._)`${u}, ${p}, ${w}${g}` : p, q = [
10355
10375
  [n.default.instancePath, (0, t.strConcat)(n.default.instancePath, $)],
@@ -10414,31 +10434,31 @@ function _y() {
10414
10434
  if (ro) return it;
10415
10435
  ro = 1, Object.defineProperty(it, "__esModule", { value: !0 }), it.validateKeywordUsage = it.validSchemaType = it.funcKeywordCode = it.macroKeywordCode = void 0;
10416
10436
  const t = oe(), e = Mt(), n = ft(), r = as();
10417
- function s(S, b) {
10418
- const { gen: v, keyword: y, schema: f, parentSchema: m, it: u } = S, p = b.macro.call(u.self, f, m, u), _ = l(v, y, p);
10437
+ function s(k, b) {
10438
+ const { gen: v, keyword: y, schema: f, parentSchema: m, it: u } = k, p = b.macro.call(u.self, f, m, u), _ = l(v, y, p);
10419
10439
  u.opts.validateSchema !== !1 && u.self.validateSchema(p, !0);
10420
10440
  const w = v.name("valid");
10421
- S.subschema({
10441
+ k.subschema({
10422
10442
  schema: p,
10423
10443
  schemaPath: t.nil,
10424
10444
  errSchemaPath: `${u.errSchemaPath}/${y}`,
10425
10445
  topSchemaRef: _,
10426
10446
  compositeRule: !0
10427
- }, w), S.pass(w, () => S.error(!0));
10447
+ }, w), k.pass(w, () => k.error(!0));
10428
10448
  }
10429
10449
  it.macroKeywordCode = s;
10430
- function i(S, b) {
10450
+ function i(k, b) {
10431
10451
  var v;
10432
- const { gen: y, keyword: f, schema: m, parentSchema: u, $data: p, it: _ } = S;
10452
+ const { gen: y, keyword: f, schema: m, parentSchema: u, $data: p, it: _ } = k;
10433
10453
  c(_, b);
10434
10454
  const w = !p && b.compile ? b.compile.call(_.self, m, u, _) : b.validate, g = l(y, f, w), $ = y.let("valid");
10435
- S.block$data($, E), S.ok((v = b.valid) !== null && v !== void 0 ? v : $);
10455
+ k.block$data($, E), k.ok((v = b.valid) !== null && v !== void 0 ? v : $);
10436
10456
  function E() {
10437
10457
  if (b.errors === !1)
10438
- C(), b.modifying && a(S), M(() => S.error());
10458
+ C(), b.modifying && a(k), M(() => k.error());
10439
10459
  else {
10440
10460
  const q = b.async ? R() : z();
10441
- b.modifying && a(S), M(() => o(S, q));
10461
+ b.modifying && a(k), M(() => o(k, q));
10442
10462
  }
10443
10463
  }
10444
10464
  function R() {
@@ -10451,7 +10471,7 @@ function _y() {
10451
10471
  }
10452
10472
  function C(q = b.async ? (0, t._)`await ` : t.nil) {
10453
10473
  const H = _.opts.passContext ? e.default.this : e.default.self, ie = !("compile" in b && !p || b.schema === !1);
10454
- y.assign($, (0, t._)`${q}${(0, n.callValidateCode)(S, g, H, ie)}`, b.modifying);
10474
+ y.assign($, (0, t._)`${q}${(0, n.callValidateCode)(k, g, H, ie)}`, b.modifying);
10455
10475
  }
10456
10476
  function M(q) {
10457
10477
  var H;
@@ -10459,36 +10479,36 @@ function _y() {
10459
10479
  }
10460
10480
  }
10461
10481
  it.funcKeywordCode = i;
10462
- function a(S) {
10463
- const { gen: b, data: v, it: y } = S;
10482
+ function a(k) {
10483
+ const { gen: b, data: v, it: y } = k;
10464
10484
  b.if(y.parentData, () => b.assign(v, (0, t._)`${y.parentData}[${y.parentDataProperty}]`));
10465
10485
  }
10466
- function o(S, b) {
10467
- const { gen: v } = S;
10486
+ function o(k, b) {
10487
+ const { gen: v } = k;
10468
10488
  v.if((0, t._)`Array.isArray(${b})`, () => {
10469
- v.assign(e.default.vErrors, (0, t._)`${e.default.vErrors} === null ? ${b} : ${e.default.vErrors}.concat(${b})`).assign(e.default.errors, (0, t._)`${e.default.vErrors}.length`), (0, r.extendErrors)(S);
10470
- }, () => S.error());
10489
+ v.assign(e.default.vErrors, (0, t._)`${e.default.vErrors} === null ? ${b} : ${e.default.vErrors}.concat(${b})`).assign(e.default.errors, (0, t._)`${e.default.vErrors}.length`), (0, r.extendErrors)(k);
10490
+ }, () => k.error());
10471
10491
  }
10472
- function c({ schemaEnv: S }, b) {
10473
- if (b.async && !S.$async)
10492
+ function c({ schemaEnv: k }, b) {
10493
+ if (b.async && !k.$async)
10474
10494
  throw new Error("async keyword in sync schema");
10475
10495
  }
10476
- function l(S, b, v) {
10496
+ function l(k, b, v) {
10477
10497
  if (v === void 0)
10478
10498
  throw new Error(`keyword "${b}" failed to compile`);
10479
- return S.scopeValue("keyword", typeof v == "function" ? { ref: v } : { ref: v, code: (0, t.stringify)(v) });
10499
+ return k.scopeValue("keyword", typeof v == "function" ? { ref: v } : { ref: v, code: (0, t.stringify)(v) });
10480
10500
  }
10481
- function d(S, b, v = !1) {
10482
- return !b.length || b.some((y) => y === "array" ? Array.isArray(S) : y === "object" ? S && typeof S == "object" && !Array.isArray(S) : typeof S == y || v && typeof S > "u");
10501
+ function d(k, b, v = !1) {
10502
+ return !b.length || b.some((y) => y === "array" ? Array.isArray(k) : y === "object" ? k && typeof k == "object" && !Array.isArray(k) : typeof k == y || v && typeof k > "u");
10483
10503
  }
10484
10504
  it.validSchemaType = d;
10485
- function h({ schema: S, opts: b, self: v, errSchemaPath: y }, f, m) {
10505
+ function h({ schema: k, opts: b, self: v, errSchemaPath: y }, f, m) {
10486
10506
  if (Array.isArray(f.keyword) ? !f.keyword.includes(m) : f.keyword !== m)
10487
10507
  throw new Error("ajv implementation error");
10488
10508
  const u = f.dependencies;
10489
- if (u?.some((p) => !Object.prototype.hasOwnProperty.call(S, p)))
10509
+ if (u?.some((p) => !Object.prototype.hasOwnProperty.call(k, p)))
10490
10510
  throw new Error(`parent schema must have dependencies of ${m}: ${u.join(",")}`);
10491
- if (f.validateSchema && !f.validateSchema(S[m])) {
10511
+ if (f.validateSchema && !f.validateSchema(k[m])) {
10492
10512
  const _ = `keyword "${m}" value is invalid at path "${y}": ` + v.errorsText(f.validateSchema.errors);
10493
10513
  if (b.validateSchema === "log")
10494
10514
  v.logger.error(_);
@@ -10507,13 +10527,13 @@ function by() {
10507
10527
  if (a !== void 0 && c !== void 0)
10508
10528
  throw new Error('both "keyword" and "schema" passed, only one allowed');
10509
10529
  if (a !== void 0) {
10510
- const S = i.schema[a];
10530
+ const k = i.schema[a];
10511
10531
  return o === void 0 ? {
10512
- schema: S,
10532
+ schema: k,
10513
10533
  schemaPath: (0, t._)`${i.schemaPath}${(0, t.getProperty)(a)}`,
10514
10534
  errSchemaPath: `${i.errSchemaPath}/${a}`
10515
10535
  } : {
10516
- schema: S[o],
10536
+ schema: k[o],
10517
10537
  schemaPath: (0, t._)`${i.schemaPath}${(0, t.getProperty)(a)}${(0, t.getProperty)(o)}`,
10518
10538
  errSchemaPath: `${i.errSchemaPath}/${a}/${(0, e.escapeFragment)(o)}`
10519
10539
  };
@@ -10534,13 +10554,13 @@ function by() {
10534
10554
  function r(i, a, { dataProp: o, dataPropType: c, data: l, dataTypes: d, propertyName: h }) {
10535
10555
  if (l !== void 0 && o !== void 0)
10536
10556
  throw new Error('both "data" and "dataProp" passed, only one allowed');
10537
- const { gen: S } = a;
10557
+ const { gen: k } = a;
10538
10558
  if (o !== void 0) {
10539
- const { errorPath: v, dataPathArr: y, opts: f } = a, m = S.let("data", (0, t._)`${a.data}${(0, t.getProperty)(o)}`, !0);
10559
+ const { errorPath: v, dataPathArr: y, opts: f } = a, m = k.let("data", (0, t._)`${a.data}${(0, t.getProperty)(o)}`, !0);
10540
10560
  b(m), i.errorPath = (0, t.str)`${v}${(0, e.getErrorPath)(o, c, f.jsPropertySyntax)}`, i.parentDataProperty = (0, t._)`${o}`, i.dataPathArr = [...y, i.parentDataProperty];
10541
10561
  }
10542
10562
  if (l !== void 0) {
10543
- const v = l instanceof t.Name ? l : S.let("data", l, !0);
10563
+ const v = l instanceof t.Name ? l : k.let("data", l, !0);
10544
10564
  b(v), h !== void 0 && (i.propertyName = h);
10545
10565
  }
10546
10566
  d && (i.dataTypes = d);
@@ -10634,9 +10654,9 @@ function wy() {
10634
10654
  maxProperties: !0,
10635
10655
  minProperties: !0
10636
10656
  };
10637
- function e(r, s, i, a, o, c, l, d, h, S) {
10657
+ function e(r, s, i, a, o, c, l, d, h, k) {
10638
10658
  if (a && typeof a == "object" && !Array.isArray(a)) {
10639
- s(a, o, c, l, d, h, S);
10659
+ s(a, o, c, l, d, h, k);
10640
10660
  for (var b in a) {
10641
10661
  var v = a[b];
10642
10662
  if (Array.isArray(v)) {
@@ -10649,7 +10669,7 @@ function wy() {
10649
10669
  e(r, s, i, v[f], o + "/" + b + "/" + n(f), c, o, b, a, f);
10650
10670
  } else (b in t.keywords || r.allKeys && !(b in t.skipKeywords)) && e(r, s, i, v, o + "/" + b, c, o, b, a);
10651
10671
  }
10652
- i(a, o, c, l, d, h, S);
10672
+ i(a, o, c, l, d, h, k);
10653
10673
  }
10654
10674
  }
10655
10675
  function n(r) {
@@ -10725,10 +10745,10 @@ function os() {
10725
10745
  return y ? y.replace(d, "") : "";
10726
10746
  }
10727
10747
  Le.normalizeId = h;
10728
- function S(y, f, m) {
10748
+ function k(y, f, m) {
10729
10749
  return m = h(m), y.resolve(f, m);
10730
10750
  }
10731
- Le.resolveUrl = S;
10751
+ Le.resolveUrl = k;
10732
10752
  const b = /^[a-z_][-a-z0-9._]*$/i;
10733
10753
  function v(y, f) {
10734
10754
  if (typeof y == "boolean")
@@ -10771,14 +10791,14 @@ function cs() {
10771
10791
  if (co) return gt;
10772
10792
  co = 1, Object.defineProperty(gt, "__esModule", { value: !0 }), gt.getData = gt.KeywordCxt = gt.validateFunctionCode = void 0;
10773
10793
  const t = yy(), e = Br(), n = Cu(), r = Br(), s = vy(), i = _y(), a = by(), o = oe(), c = Mt(), l = os(), d = me(), h = as();
10774
- function S(P) {
10794
+ function k(P) {
10775
10795
  if (w(P) && ($(P), _(P))) {
10776
10796
  f(P);
10777
10797
  return;
10778
10798
  }
10779
10799
  b(P, () => (0, t.topBoolOrEmptySchema)(P));
10780
10800
  }
10781
- gt.validateFunctionCode = S;
10801
+ gt.validateFunctionCode = k;
10782
10802
  function b({ gen: P, validateName: O, schema: Z, schemaEnv: K, opts: Q }, ce) {
10783
10803
  Q.code.es5 ? P.func(O, (0, o._)`${c.default.data}, ${c.default.valCxt}`, K.$async, () => {
10784
10804
  P.code((0, o._)`"use strict"; ${u(Z, Q)}`), y(P, Q), P.code(ce);
@@ -10906,7 +10926,7 @@ function cs() {
10906
10926
  }
10907
10927
  O.forEach((Z) => {
10908
10928
  N(P.dataTypes, Z) || T(P, `type "${Z}" not allowed by context "${P.dataTypes.join(",")}"`);
10909
- }), k(P, O);
10929
+ }), S(P, O);
10910
10930
  }
10911
10931
  }
10912
10932
  function V(P, O) {
@@ -10928,7 +10948,7 @@ function cs() {
10928
10948
  function N(P, O) {
10929
10949
  return P.includes(O) || O === "integer" && P.includes("number");
10930
10950
  }
10931
- function k(P, O) {
10951
+ function S(P, O) {
10932
10952
  const Z = [];
10933
10953
  for (const K of P.dataTypes)
10934
10954
  N(O, K) ? Z.push(K) : O.includes("integer") && K === "number" && Z.push("integer");
@@ -11182,7 +11202,7 @@ function Li() {
11182
11202
  const _ = f.refs[u];
11183
11203
  if (_)
11184
11204
  return _;
11185
- let w = S.call(this, f, u);
11205
+ let w = k.call(this, f, u);
11186
11206
  if (w === void 0) {
11187
11207
  const g = (p = f.localRefs) === null || p === void 0 ? void 0 : p[u], { schemaId: $ } = this.opts;
11188
11208
  g && (w = new a({ schema: g, schemaId: $, root: f, baseId: m }));
@@ -11203,7 +11223,7 @@ function Li() {
11203
11223
  function h(f, m) {
11204
11224
  return f.schema === m.schema && f.root === m.root && f.baseId === m.baseId;
11205
11225
  }
11206
- function S(f, m) {
11226
+ function k(f, m) {
11207
11227
  let u;
11208
11228
  for (; typeof (u = this.refs[m]) == "string"; )
11209
11229
  m = u;
@@ -11383,7 +11403,7 @@ function Cy() {
11383
11403
  return m;
11384
11404
  }
11385
11405
  const c = /^\.\.?\//u, l = /^\/\.(?:\/|$)/u, d = /^\/\.\.(?:\/|$)/u, h = /^\/?(?:.|\n)*?(?=\/|$)/u;
11386
- function S(y) {
11406
+ function k(y) {
11387
11407
  const f = [];
11388
11408
  for (; y.length; )
11389
11409
  if (y.match(c))
@@ -11426,7 +11446,7 @@ function Cy() {
11426
11446
  return Ns = {
11427
11447
  recomposeAuthority: v,
11428
11448
  normalizeComponentEncoding: b,
11429
- removeDotSegments: S,
11449
+ removeDotSegments: k,
11430
11450
  normalizeIPv4: n,
11431
11451
  normalizeIPv6: i,
11432
11452
  stringArrayToHexStripped: r
@@ -11489,7 +11509,7 @@ function Oy() {
11489
11509
  domainHost: !0,
11490
11510
  parse: r,
11491
11511
  serialize: s
11492
- }, S = {
11512
+ }, k = {
11493
11513
  scheme: "https",
11494
11514
  domainHost: h.domainHost,
11495
11515
  parse: r,
@@ -11506,7 +11526,7 @@ function Oy() {
11506
11526
  serialize: b.serialize
11507
11527
  }, m = {
11508
11528
  http: h,
11509
- https: S,
11529
+ https: k,
11510
11530
  ws: b,
11511
11531
  wss: v,
11512
11532
  urn: {
@@ -11569,7 +11589,7 @@ function Ny() {
11569
11589
  return u.query !== void 0 && _.push("?", u.query), u.fragment !== void 0 && _.push("#", u.fragment), _.join("");
11570
11590
  }
11571
11591
  const h = Array.from({ length: 127 }, (f, m) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(m)));
11572
- function S(f) {
11592
+ function k(f) {
11573
11593
  let m = 0;
11574
11594
  for (let u = 0, p = f.length; u < p; ++u)
11575
11595
  if (m = f.charCodeAt(u), m > 126 || h[m])
@@ -11601,7 +11621,7 @@ function Ny() {
11601
11621
  }
11602
11622
  p.scheme === void 0 && p.userinfo === void 0 && p.host === void 0 && p.port === void 0 && p.query === void 0 && !p.path ? p.reference = "same-document" : p.scheme === void 0 ? p.reference = "relative" : p.fragment === void 0 ? p.reference = "absolute" : p.reference = "uri", u.reference && u.reference !== "suffix" && u.reference !== p.reference && (p.error = p.error || "URI is not a " + u.reference + " reference.");
11603
11623
  const $ = i[(u.scheme || p.scheme || "").toLowerCase()];
11604
- if (!u.unicodeSupport && (!$ || !$.unicodeSupport) && p.host && (u.domainHost || $ && $.domainHost) && w === !1 && S(p.host))
11624
+ if (!u.unicodeSupport && (!$ || !$.unicodeSupport) && p.host && (u.domainHost || $ && $.domainHost) && w === !1 && k(p.host))
11605
11625
  try {
11606
11626
  p.host = URL.domainToASCII(p.host.toLowerCase());
11607
11627
  } catch (E) {
@@ -11652,7 +11672,7 @@ function Ay() {
11652
11672
  } }), Object.defineProperty(t, "CodeGen", { enumerable: !0, get: function() {
11653
11673
  return n.CodeGen;
11654
11674
  } });
11655
- const r = qi(), s = us(), i = Iu(), a = Li(), o = oe(), c = os(), l = Br(), d = me(), h = Ry, S = xy(), b = (V, I) => new RegExp(V, I);
11675
+ const r = qi(), s = us(), i = Iu(), a = Li(), o = oe(), c = os(), l = Br(), d = me(), h = Ry, k = xy(), b = (V, I) => new RegExp(V, I);
11656
11676
  b.code = "new RegExp";
11657
11677
  const v = ["removeAdditional", "useDefaults", "coerceTypes"], y = /* @__PURE__ */ new Set([
11658
11678
  "validate",
@@ -11690,8 +11710,8 @@ function Ay() {
11690
11710
  unicode: '"minLength"/"maxLength" account for unicode characters by default.'
11691
11711
  }, u = 200;
11692
11712
  function p(V) {
11693
- var I, D, N, k, T, j, G, te, ge, le, P, O, Z, K, Q, ce, xe, nt, Fe, Ue, Ae, Wt, Ye, hs, ms;
11694
- const on = V.strict, gs = (I = V.code) === null || I === void 0 ? void 0 : I.optimize, Gi = gs === !0 || gs === void 0 ? 1 : gs || 0, Ji = (N = (D = V.code) === null || D === void 0 ? void 0 : D.regExp) !== null && N !== void 0 ? N : b, Xu = (k = V.uriResolver) !== null && k !== void 0 ? k : S.default;
11713
+ var I, D, N, S, T, j, G, te, ge, le, P, O, Z, K, Q, ce, xe, nt, Fe, Ue, Ae, Wt, Ye, hs, ms;
11714
+ const on = V.strict, gs = (I = V.code) === null || I === void 0 ? void 0 : I.optimize, Gi = gs === !0 || gs === void 0 ? 1 : gs || 0, Ji = (N = (D = V.code) === null || D === void 0 ? void 0 : D.regExp) !== null && N !== void 0 ? N : b, Xu = (S = V.uriResolver) !== null && S !== void 0 ? S : k.default;
11695
11715
  return {
11696
11716
  strictSchema: (j = (T = V.strictSchema) !== null && T !== void 0 ? T : on) !== null && j !== void 0 ? j : !0,
11697
11717
  strictNumbers: (te = (G = V.strictNumbers) !== null && G !== void 0 ? G : on) !== null && te !== void 0 ? te : !0,
@@ -11718,16 +11738,16 @@ function Ay() {
11718
11738
  this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), I = this.opts = { ...I, ...p(I) };
11719
11739
  const { es5: D, lines: N } = this.opts.code;
11720
11740
  this.scope = new o.ValueScope({ scope: {}, prefixes: y, es5: D, lines: N }), this.logger = M(I.logger);
11721
- const k = I.validateFormats;
11722
- I.validateFormats = !1, this.RULES = (0, i.getRules)(), w.call(this, f, I, "NOT SUPPORTED"), w.call(this, m, I, "DEPRECATED", "warn"), this._metaOpts = z.call(this), I.formats && E.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), I.keywords && R.call(this, I.keywords), typeof I.meta == "object" && this.addMetaSchema(I.meta), $.call(this), I.validateFormats = k;
11741
+ const S = I.validateFormats;
11742
+ I.validateFormats = !1, this.RULES = (0, i.getRules)(), w.call(this, f, I, "NOT SUPPORTED"), w.call(this, m, I, "DEPRECATED", "warn"), this._metaOpts = z.call(this), I.formats && E.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), I.keywords && R.call(this, I.keywords), typeof I.meta == "object" && this.addMetaSchema(I.meta), $.call(this), I.validateFormats = S;
11723
11743
  }
11724
11744
  _addVocabularies() {
11725
11745
  this.addKeyword("$async");
11726
11746
  }
11727
11747
  _addDefaultMetaSchema() {
11728
11748
  const { $data: I, meta: D, schemaId: N } = this.opts;
11729
- let k = h;
11730
- N === "id" && (k = { ...h }, k.id = k.$id, delete k.$id), D && I && this.addMetaSchema(k, k[N], !1);
11749
+ let S = h;
11750
+ N === "id" && (S = { ...h }, S.id = S.$id, delete S.$id), D && I && this.addMetaSchema(S, S[N], !1);
11731
11751
  }
11732
11752
  defaultMeta() {
11733
11753
  const { meta: I, schemaId: D } = this.opts;
@@ -11740,8 +11760,8 @@ function Ay() {
11740
11760
  throw new Error(`no schema with key or ref "${I}"`);
11741
11761
  } else
11742
11762
  N = this.compile(I);
11743
- const k = N(D);
11744
- return "$async" in N || (this.errors = N.errors), k;
11763
+ const S = N(D);
11764
+ return "$async" in N || (this.errors = N.errors), S;
11745
11765
  }
11746
11766
  compile(I, D) {
11747
11767
  const N = this._addSchema(I, D);
@@ -11751,14 +11771,14 @@ function Ay() {
11751
11771
  if (typeof this.opts.loadSchema != "function")
11752
11772
  throw new Error("options.loadSchema should be a function");
11753
11773
  const { loadSchema: N } = this.opts;
11754
- return k.call(this, I, D);
11755
- async function k(le, P) {
11774
+ return S.call(this, I, D);
11775
+ async function S(le, P) {
11756
11776
  await T.call(this, le.$schema);
11757
11777
  const O = this._addSchema(le, P);
11758
11778
  return O.validate || j.call(this, O);
11759
11779
  }
11760
11780
  async function T(le) {
11761
- le && !this.getSchema(le) && await k.call(this, { $ref: le }, !0);
11781
+ le && !this.getSchema(le) && await S.call(this, { $ref: le }, !0);
11762
11782
  }
11763
11783
  async function j(le) {
11764
11784
  try {
@@ -11789,10 +11809,10 @@ function Ay() {
11789
11809
  }
11790
11810
  }
11791
11811
  // Adds schema to the instance
11792
- addSchema(I, D, N, k = this.opts.validateSchema) {
11812
+ addSchema(I, D, N, S = this.opts.validateSchema) {
11793
11813
  if (Array.isArray(I)) {
11794
11814
  for (const j of I)
11795
- this.addSchema(j, void 0, N, k);
11815
+ this.addSchema(j, void 0, N, S);
11796
11816
  return this;
11797
11817
  }
11798
11818
  let T;
@@ -11801,7 +11821,7 @@ function Ay() {
11801
11821
  if (T = I[j], T !== void 0 && typeof T != "string")
11802
11822
  throw new Error(`schema ${j} must be string`);
11803
11823
  }
11804
- return D = (0, c.normalizeId)(D || T), this._checkUnique(D), this.schemas[D] = this._addSchema(I, N, D, k, !0), this;
11824
+ return D = (0, c.normalizeId)(D || T), this._checkUnique(D), this.schemas[D] = this._addSchema(I, N, D, S, !0), this;
11805
11825
  }
11806
11826
  // Add schema that will be used to validate other schemas
11807
11827
  // options in META_IGNORE_OPTIONS are alway set to false
@@ -11817,15 +11837,15 @@ function Ay() {
11817
11837
  throw new Error("$schema must be a string");
11818
11838
  if (N = N || this.opts.defaultMeta || this.defaultMeta(), !N)
11819
11839
  return this.logger.warn("meta-schema not available"), this.errors = null, !0;
11820
- const k = this.validate(N, I);
11821
- if (!k && D) {
11840
+ const S = this.validate(N, I);
11841
+ if (!S && D) {
11822
11842
  const T = "schema is invalid: " + this.errorsText();
11823
11843
  if (this.opts.validateSchema === "log")
11824
11844
  this.logger.error(T);
11825
11845
  else
11826
11846
  throw new Error(T);
11827
11847
  }
11828
- return k;
11848
+ return S;
11829
11849
  }
11830
11850
  // Get compiled schema by `key` or `ref`.
11831
11851
  // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
@@ -11834,8 +11854,8 @@ function Ay() {
11834
11854
  for (; typeof (D = g.call(this, I)) == "string"; )
11835
11855
  I = D;
11836
11856
  if (D === void 0) {
11837
- const { schemaId: N } = this.opts, k = new a.SchemaEnv({ schema: {}, schemaId: N });
11838
- if (D = a.resolveSchema.call(this, k, I), !D)
11857
+ const { schemaId: N } = this.opts, S = new a.SchemaEnv({ schema: {}, schemaId: N });
11858
+ if (D = a.resolveSchema.call(this, S, I), !D)
11839
11859
  return;
11840
11860
  this.refs[I] = D;
11841
11861
  }
@@ -11883,12 +11903,12 @@ function Ay() {
11883
11903
  if (H.call(this, N, D), !D)
11884
11904
  return (0, d.eachItem)(N, (T) => ie.call(this, T)), this;
11885
11905
  Ne.call(this, D);
11886
- const k = {
11906
+ const S = {
11887
11907
  ...D,
11888
11908
  type: (0, l.getJSONTypes)(D.type),
11889
11909
  schemaType: (0, l.getJSONTypes)(D.schemaType)
11890
11910
  };
11891
- return (0, d.eachItem)(N, k.type.length === 0 ? (T) => ie.call(this, T, k) : (T) => k.type.forEach((j) => ie.call(this, T, k, j))), this;
11911
+ return (0, d.eachItem)(N, S.type.length === 0 ? (T) => ie.call(this, T, S) : (T) => S.type.forEach((j) => ie.call(this, T, S, j))), this;
11892
11912
  }
11893
11913
  getKeyword(I) {
11894
11914
  const D = this.RULES.all[I];
@@ -11899,8 +11919,8 @@ function Ay() {
11899
11919
  const { RULES: D } = this;
11900
11920
  delete D.keywords[I], delete D.all[I];
11901
11921
  for (const N of D.rules) {
11902
- const k = N.rules.findIndex((T) => T.keyword === I);
11903
- k >= 0 && N.rules.splice(k, 1);
11922
+ const S = N.rules.findIndex((T) => T.keyword === I);
11923
+ S >= 0 && N.rules.splice(S, 1);
11904
11924
  }
11905
11925
  return this;
11906
11926
  }
@@ -11909,13 +11929,13 @@ function Ay() {
11909
11929
  return typeof D == "string" && (D = new RegExp(D)), this.formats[I] = D, this;
11910
11930
  }
11911
11931
  errorsText(I = this.errors, { separator: D = ", ", dataVar: N = "data" } = {}) {
11912
- return !I || I.length === 0 ? "No errors" : I.map((k) => `${N}${k.instancePath} ${k.message}`).reduce((k, T) => k + D + T);
11932
+ return !I || I.length === 0 ? "No errors" : I.map((S) => `${N}${S.instancePath} ${S.message}`).reduce((S, T) => S + D + T);
11913
11933
  }
11914
11934
  $dataMetaSchema(I, D) {
11915
11935
  const N = this.RULES.all;
11916
11936
  I = JSON.parse(JSON.stringify(I));
11917
- for (const k of D) {
11918
- const T = k.split("/").slice(1);
11937
+ for (const S of D) {
11938
+ const T = S.split("/").slice(1);
11919
11939
  let j = I;
11920
11940
  for (const G of T)
11921
11941
  j = j[G];
@@ -11931,11 +11951,11 @@ function Ay() {
11931
11951
  }
11932
11952
  _removeAllSchemas(I, D) {
11933
11953
  for (const N in I) {
11934
- const k = I[N];
11935
- (!D || D.test(N)) && (typeof k == "string" ? delete I[N] : k && !k.meta && (this._cache.delete(k.schema), delete I[N]));
11954
+ const S = I[N];
11955
+ (!D || D.test(N)) && (typeof S == "string" ? delete I[N] : S && !S.meta && (this._cache.delete(S.schema), delete I[N]));
11936
11956
  }
11937
11957
  }
11938
- _addSchema(I, D, N, k = this.opts.validateSchema, T = this.opts.addUsedSchema) {
11958
+ _addSchema(I, D, N, S = this.opts.validateSchema, T = this.opts.addUsedSchema) {
11939
11959
  let j;
11940
11960
  const { schemaId: G } = this.opts;
11941
11961
  if (typeof I == "object")
@@ -11951,7 +11971,7 @@ function Ay() {
11951
11971
  return te;
11952
11972
  N = (0, c.normalizeId)(j || N);
11953
11973
  const ge = c.getSchemaRefs.call(this, I, N);
11954
- return te = new a.SchemaEnv({ schema: I, schemaId: G, meta: D, baseId: N, localRefs: ge }), this._cache.set(te.schema, te), T && !N.startsWith("#") && (N && this._checkUnique(N), this.refs[N] = te), k && this.validateSchema(I, !0), te;
11974
+ return te = new a.SchemaEnv({ schema: I, schemaId: G, meta: D, baseId: N, localRefs: ge }), this._cache.set(te.schema, te), T && !N.startsWith("#") && (N && this._checkUnique(N), this.refs[N] = te), S && this.validateSchema(I, !0), te;
11955
11975
  }
11956
11976
  _checkUnique(I) {
11957
11977
  if (this.schemas[I] || this.refs[I])
@@ -11974,9 +11994,9 @@ function Ay() {
11974
11994
  }
11975
11995
  _.ValidationError = r.default, _.MissingRefError = s.default, t.default = _;
11976
11996
  function w(V, I, D, N = "error") {
11977
- for (const k in V) {
11978
- const T = k;
11979
- T in I && this.logger[N](`${D}: option ${k}. ${V[T]}`);
11997
+ for (const S in V) {
11998
+ const T = S;
11999
+ T in I && this.logger[N](`${D}: option ${S}. ${V[T]}`);
11980
12000
  }
11981
12001
  }
11982
12002
  function g(V) {
@@ -12040,11 +12060,11 @@ function Ay() {
12040
12060
  }
12041
12061
  function ie(V, I, D) {
12042
12062
  var N;
12043
- const k = I?.post;
12044
- if (D && k)
12063
+ const S = I?.post;
12064
+ if (D && S)
12045
12065
  throw new Error('keyword with "post" flag cannot have "type"');
12046
12066
  const { RULES: T } = this;
12047
- let j = k ? T.post : T.rules.find(({ type: te }) => te === D);
12067
+ let j = S ? T.post : T.rules.find(({ type: te }) => te === D);
12048
12068
  if (j || (j = { type: D, rules: [] }, T.rules.push(j)), T.keywords[V] = !0, !I)
12049
12069
  return;
12050
12070
  const G = {
@@ -12058,7 +12078,7 @@ function Ay() {
12058
12078
  I.before ? ve.call(this, j, G, I.before) : j.rules.push(G), T.all[V] = G, (N = I.implements) === null || N === void 0 || N.forEach((te) => this.addKeyword(te));
12059
12079
  }
12060
12080
  function ve(V, I, D) {
12061
- const N = V.rules.findIndex((k) => k.keyword === D);
12081
+ const N = V.rules.findIndex((S) => S.keyword === D);
12062
12082
  N >= 0 ? V.rules.splice(N, 0, I) : (V.rules.push(I), this.logger.warn(`rule ${D} is not defined`));
12063
12083
  }
12064
12084
  function Ne(V) {
@@ -12093,12 +12113,12 @@ function zy() {
12093
12113
  keyword: "$ref",
12094
12114
  schemaType: "string",
12095
12115
  code(l) {
12096
- const { gen: d, schema: h, it: S } = l, { baseId: b, schemaEnv: v, validateName: y, opts: f, self: m } = S, { root: u } = v;
12116
+ const { gen: d, schema: h, it: k } = l, { baseId: b, schemaEnv: v, validateName: y, opts: f, self: m } = k, { root: u } = v;
12097
12117
  if ((h === "#" || h === "#/") && b === u.baseId)
12098
12118
  return _();
12099
12119
  const p = s.resolveRef.call(m, u, b, h);
12100
12120
  if (p === void 0)
12101
- throw new t.default(S.opts.uriResolver, b, h);
12121
+ throw new t.default(k.opts.uriResolver, b, h);
12102
12122
  if (p instanceof s.SchemaEnv)
12103
12123
  return w(p);
12104
12124
  return g(p);
@@ -12129,9 +12149,9 @@ function zy() {
12129
12149
  return d.validate ? h.scopeValue("validate", { ref: d.validate }) : (0, n._)`${h.scopeValue("wrapper", { ref: d })}.validate`;
12130
12150
  }
12131
12151
  Et.getValidate = o;
12132
- function c(l, d, h, S) {
12152
+ function c(l, d, h, k) {
12133
12153
  const { gen: b, it: v } = l, { allErrors: y, schemaEnv: f, opts: m } = v, u = m.passContext ? r.default.this : n.nil;
12134
- S ? p() : _();
12154
+ k ? p() : _();
12135
12155
  function p() {
12136
12156
  if (!f.$async)
12137
12157
  throw new Error("async schema referenced by sync schema");
@@ -12326,11 +12346,11 @@ function Uy() {
12326
12346
  params: ({ params: { missingProperty: i } }) => (0, e._)`{missingProperty: ${i}}`
12327
12347
  },
12328
12348
  code(i) {
12329
- const { gen: a, schema: o, schemaCode: c, data: l, $data: d, it: h } = i, { opts: S } = h;
12349
+ const { gen: a, schema: o, schemaCode: c, data: l, $data: d, it: h } = i, { opts: k } = h;
12330
12350
  if (!d && o.length === 0)
12331
12351
  return;
12332
- const b = o.length >= S.loopRequired;
12333
- if (h.allErrors ? v() : y(), S.strictRequired) {
12352
+ const b = o.length >= k.loopRequired;
12353
+ if (h.allErrors ? v() : y(), k.strictRequired) {
12334
12354
  const u = i.parentSchema.properties, { definedProperties: p } = i.it;
12335
12355
  for (const _ of o)
12336
12356
  if (u?.[_] === void 0 && !p.has(_)) {
@@ -12355,12 +12375,12 @@ function Uy() {
12355
12375
  }
12356
12376
  function f() {
12357
12377
  a.forOf("prop", c, (u) => {
12358
- i.setParams({ missingProperty: u }), a.if((0, t.noPropertyInData)(a, l, u, S.ownProperties), () => i.error());
12378
+ i.setParams({ missingProperty: u }), a.if((0, t.noPropertyInData)(a, l, u, k.ownProperties), () => i.error());
12359
12379
  });
12360
12380
  }
12361
12381
  function m(u, p) {
12362
12382
  i.setParams({ missingProperty: u }), a.forOf(u, c, () => {
12363
- a.assign(p, (0, t.propertyInData)(a, l, u, S.ownProperties)), a.if((0, e.not)(p), () => {
12383
+ a.assign(p, (0, t.propertyInData)(a, l, u, k.ownProperties)), a.if((0, e.not)(p), () => {
12364
12384
  i.error(), a.break();
12365
12385
  });
12366
12386
  }, e.nil);
@@ -12413,11 +12433,11 @@ function Ky() {
12413
12433
  params: ({ params: { i: a, j: o } }) => (0, e._)`{i: ${a}, j: ${o}}`
12414
12434
  },
12415
12435
  code(a) {
12416
- const { gen: o, data: c, $data: l, schema: d, parentSchema: h, schemaCode: S, it: b } = a;
12436
+ const { gen: o, data: c, $data: l, schema: d, parentSchema: h, schemaCode: k, it: b } = a;
12417
12437
  if (!l && !d)
12418
12438
  return;
12419
12439
  const v = o.let("valid"), y = h.items ? (0, t.getSchemaTypes)(h.items) : [];
12420
- a.block$data(v, f, (0, e._)`${S} === false`), a.ok(v);
12440
+ a.block$data(v, f, (0, e._)`${k} === false`), a.ok(v);
12421
12441
  function f() {
12422
12442
  const _ = o.let("i", (0, e._)`${c}.length`), w = o.let("j");
12423
12443
  a.setParams({ i: _, j: w }), o.assign(v, !0), o.if((0, e._)`${_} > 1`, () => (m() ? u : p)(_, w));
@@ -12477,11 +12497,11 @@ function By() {
12477
12497
  const { gen: a, data: o, $data: c, schema: l, schemaCode: d, it: h } = i;
12478
12498
  if (!c && l.length === 0)
12479
12499
  throw new Error("enum must have non-empty array");
12480
- const S = l.length >= h.opts.loopEnum;
12500
+ const k = l.length >= h.opts.loopEnum;
12481
12501
  let b;
12482
12502
  const v = () => b ?? (b = (0, e.useFunc)(a, n.default));
12483
12503
  let y;
12484
- if (S || c)
12504
+ if (k || c)
12485
12505
  y = a.let("valid"), i.block$data(y, f);
12486
12506
  else {
12487
12507
  if (!Array.isArray(l))
@@ -12551,15 +12571,15 @@ function Nu() {
12551
12571
  function s(i, a) {
12552
12572
  const { gen: o, schema: c, data: l, keyword: d, it: h } = i;
12553
12573
  h.items = !0;
12554
- const S = o.const("len", (0, t._)`${l}.length`);
12574
+ const k = o.const("len", (0, t._)`${l}.length`);
12555
12575
  if (c === !1)
12556
- i.setParams({ len: a.length }), i.pass((0, t._)`${S} <= ${a.length}`);
12576
+ i.setParams({ len: a.length }), i.pass((0, t._)`${k} <= ${a.length}`);
12557
12577
  else if (typeof c == "object" && !(0, e.alwaysValidSchema)(h, c)) {
12558
- const v = o.var("valid", (0, t._)`${S} <= ${a.length}`);
12578
+ const v = o.var("valid", (0, t._)`${k} <= ${a.length}`);
12559
12579
  o.if((0, t.not)(v), () => b(v)), i.ok(v);
12560
12580
  }
12561
12581
  function b(v) {
12562
- o.forRange("i", a.length, S, (y) => {
12582
+ o.forRange("i", a.length, k, (y) => {
12563
12583
  i.subschema({ keyword: d, dataProp: y, dataPropType: e.Type.Num }, v), h.allErrors || o.if((0, t.not)(v), () => o.break());
12564
12584
  });
12565
12585
  }
@@ -12583,21 +12603,21 @@ function xu() {
12583
12603
  }
12584
12604
  };
12585
12605
  function s(i, a, o = i.schema) {
12586
- const { gen: c, parentSchema: l, data: d, keyword: h, it: S } = i;
12587
- y(l), S.opts.unevaluated && o.length && S.items !== !0 && (S.items = e.mergeEvaluated.items(c, o.length, S.items));
12606
+ const { gen: c, parentSchema: l, data: d, keyword: h, it: k } = i;
12607
+ y(l), k.opts.unevaluated && o.length && k.items !== !0 && (k.items = e.mergeEvaluated.items(c, o.length, k.items));
12588
12608
  const b = c.name("valid"), v = c.const("len", (0, t._)`${d}.length`);
12589
12609
  o.forEach((f, m) => {
12590
- (0, e.alwaysValidSchema)(S, f) || (c.if((0, t._)`${v} > ${m}`, () => i.subschema({
12610
+ (0, e.alwaysValidSchema)(k, f) || (c.if((0, t._)`${v} > ${m}`, () => i.subschema({
12591
12611
  keyword: h,
12592
12612
  schemaProp: m,
12593
12613
  dataProp: m
12594
12614
  }, b)), i.ok(b));
12595
12615
  });
12596
12616
  function y(f) {
12597
- const { opts: m, errSchemaPath: u } = S, p = o.length, _ = p === f.minItems && (p === f.maxItems || f[a] === !1);
12617
+ const { opts: m, errSchemaPath: u } = k, p = o.length, _ = p === f.minItems && (p === f.maxItems || f[a] === !1);
12598
12618
  if (m.strictTuples && !_) {
12599
12619
  const w = `"${h}" is ${p}-tuple, but minItems or maxItems/${a} are not specified or different at path "${u}"`;
12600
- (0, e.checkStrictMode)(S, w, m.strictTuples);
12620
+ (0, e.checkStrictMode)(k, w, m.strictTuples);
12601
12621
  }
12602
12622
  }
12603
12623
  }
@@ -12653,8 +12673,8 @@ function Qy() {
12653
12673
  code(s) {
12654
12674
  const { gen: i, schema: a, parentSchema: o, data: c, it: l } = s;
12655
12675
  let d, h;
12656
- const { minContains: S, maxContains: b } = o;
12657
- l.opts.next ? (d = S === void 0 ? 1 : S, h = b) : d = 1;
12676
+ const { minContains: k, maxContains: b } = o;
12677
+ l.opts.next ? (d = k === void 0 ? 1 : k, h = b) : d = 1;
12658
12678
  const v = i.const("len", (0, t._)`${c}.length`);
12659
12679
  if (s.setParams({ min: d, max: h }), h === void 0 && d === 0) {
12660
12680
  (0, e.checkStrictMode)(l, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
@@ -12724,13 +12744,13 @@ function Xy() {
12724
12744
  for (const h in c) {
12725
12745
  if (h === "__proto__")
12726
12746
  continue;
12727
- const S = Array.isArray(c[h]) ? l : d;
12728
- S[h] = c[h];
12747
+ const k = Array.isArray(c[h]) ? l : d;
12748
+ k[h] = c[h];
12729
12749
  }
12730
12750
  return [l, d];
12731
12751
  }
12732
12752
  function a(c, l = c.schema) {
12733
- const { gen: d, data: h, it: S } = c;
12753
+ const { gen: d, data: h, it: k } = c;
12734
12754
  if (Object.keys(l).length === 0)
12735
12755
  return;
12736
12756
  const b = d.let("missing");
@@ -12738,12 +12758,12 @@ function Xy() {
12738
12758
  const y = l[v];
12739
12759
  if (y.length === 0)
12740
12760
  continue;
12741
- const f = (0, r.propertyInData)(d, h, v, S.opts.ownProperties);
12761
+ const f = (0, r.propertyInData)(d, h, v, k.opts.ownProperties);
12742
12762
  c.setParams({
12743
12763
  property: v,
12744
12764
  depsCount: y.length,
12745
12765
  deps: y.join(", ")
12746
- }), S.allErrors ? d.if(f, () => {
12766
+ }), k.allErrors ? d.if(f, () => {
12747
12767
  for (const m of y)
12748
12768
  (0, r.checkReportMissingProp)(c, m);
12749
12769
  }) : (d.if((0, e._)`${f} && (${(0, r.checkMissingProp)(c, y, b)})`), (0, r.reportMissingProp)(c, b), d.else());
@@ -12751,12 +12771,12 @@ function Xy() {
12751
12771
  }
12752
12772
  t.validatePropertyDeps = a;
12753
12773
  function o(c, l = c.schema) {
12754
- const { gen: d, data: h, keyword: S, it: b } = c, v = d.name("valid");
12774
+ const { gen: d, data: h, keyword: k, it: b } = c, v = d.name("valid");
12755
12775
  for (const y in l)
12756
12776
  (0, n.alwaysValidSchema)(b, l[y]) || (d.if(
12757
12777
  (0, r.propertyInData)(d, h, y, b.opts.ownProperties),
12758
12778
  () => {
12759
- const f = c.subschema({ keyword: S, schemaProp: y }, v);
12779
+ const f = c.subschema({ keyword: k, schemaProp: y }, v);
12760
12780
  c.mergeValidEvaluated(f, v);
12761
12781
  },
12762
12782
  () => d.var(v, !0)
@@ -12813,11 +12833,11 @@ function Au() {
12813
12833
  params: ({ params: a }) => (0, e._)`{additionalProperty: ${a.additionalProperty}}`
12814
12834
  },
12815
12835
  code(a) {
12816
- const { gen: o, schema: c, parentSchema: l, data: d, errsCount: h, it: S } = a;
12836
+ const { gen: o, schema: c, parentSchema: l, data: d, errsCount: h, it: k } = a;
12817
12837
  if (!h)
12818
12838
  throw new Error("ajv implementation error");
12819
- const { allErrors: b, opts: v } = S;
12820
- if (S.props = !0, v.removeAdditional !== "all" && (0, r.alwaysValidSchema)(S, c))
12839
+ const { allErrors: b, opts: v } = k;
12840
+ if (k.props = !0, v.removeAdditional !== "all" && (0, r.alwaysValidSchema)(k, c))
12821
12841
  return;
12822
12842
  const y = (0, t.allSchemaProperties)(l.properties), f = (0, t.allSchemaProperties)(l.patternProperties);
12823
12843
  m(), a.ok((0, e._)`${h} === ${n.default.errors}`);
@@ -12829,7 +12849,7 @@ function Au() {
12829
12849
  function u(g) {
12830
12850
  let $;
12831
12851
  if (y.length > 8) {
12832
- const E = (0, r.schemaRefOrVal)(S, l.properties, "properties");
12852
+ const E = (0, r.schemaRefOrVal)(k, l.properties, "properties");
12833
12853
  $ = (0, t.isOwnProperty)(o, E, g);
12834
12854
  } else y.length ? $ = (0, e.or)(...y.map((E) => (0, e._)`${g} === ${E}`)) : $ = e.nil;
12835
12855
  return f.length && ($ = (0, e.or)($, ...f.map((E) => (0, e._)`${(0, t.usePattern)(a, E)}.test(${g})`))), (0, e.not)($);
@@ -12846,7 +12866,7 @@ function Au() {
12846
12866
  a.setParams({ additionalProperty: g }), a.error(), b || o.break();
12847
12867
  return;
12848
12868
  }
12849
- if (typeof c == "object" && !(0, r.alwaysValidSchema)(S, c)) {
12869
+ if (typeof c == "object" && !(0, r.alwaysValidSchema)(k, c)) {
12850
12870
  const $ = o.name("valid");
12851
12871
  v.removeAdditional === "failing" ? (w(g, $, !1), o.if((0, e.not)($), () => {
12852
12872
  a.reset(), p(g);
@@ -12884,11 +12904,11 @@ function tv() {
12884
12904
  for (const f of h)
12885
12905
  d.definedProperties.add(f);
12886
12906
  d.opts.unevaluated && h.length && d.props !== !0 && (d.props = n.mergeEvaluated.props(a, (0, n.toHash)(h), d.props));
12887
- const S = h.filter((f) => !(0, n.alwaysValidSchema)(d, o[f]));
12888
- if (S.length === 0)
12907
+ const k = h.filter((f) => !(0, n.alwaysValidSchema)(d, o[f]));
12908
+ if (k.length === 0)
12889
12909
  return;
12890
12910
  const b = a.name("valid");
12891
- for (const f of S)
12911
+ for (const f of k)
12892
12912
  v(f) ? y(f) : (a.if((0, e.propertyInData)(a, l, f, d.opts.ownProperties)), y(f), d.allErrors || a.else().var(b, !0), a.endIf()), i.it.definedProperties.add(f), i.ok(b);
12893
12913
  function v(f) {
12894
12914
  return d.opts.useDefaults && !d.compositeRule && o[f].default !== void 0;
@@ -12913,15 +12933,15 @@ function nv() {
12913
12933
  type: "object",
12914
12934
  schemaType: "object",
12915
12935
  code(i) {
12916
- const { gen: a, schema: o, data: c, parentSchema: l, it: d } = i, { opts: h } = d, S = (0, t.allSchemaProperties)(o), b = S.filter((_) => (0, n.alwaysValidSchema)(d, o[_]));
12917
- if (S.length === 0 || b.length === S.length && (!d.opts.unevaluated || d.props === !0))
12936
+ const { gen: a, schema: o, data: c, parentSchema: l, it: d } = i, { opts: h } = d, k = (0, t.allSchemaProperties)(o), b = k.filter((_) => (0, n.alwaysValidSchema)(d, o[_]));
12937
+ if (k.length === 0 || b.length === k.length && (!d.opts.unevaluated || d.props === !0))
12918
12938
  return;
12919
12939
  const v = h.strictSchema && !h.allowMatchingProperties && l.properties, y = a.name("valid");
12920
12940
  d.props !== !0 && !(d.props instanceof e.Name) && (d.props = (0, r.evaluatedPropsToName)(a, d.props));
12921
12941
  const { props: f } = d;
12922
12942
  m();
12923
12943
  function m() {
12924
- for (const _ of S)
12944
+ for (const _ of k)
12925
12945
  v && u(_), d.allErrors ? p(_) : (a.var(y, !0), p(_), a.if(y));
12926
12946
  }
12927
12947
  function u(_) {
@@ -13002,16 +13022,16 @@ function iv() {
13002
13022
  throw new Error("ajv implementation error");
13003
13023
  if (c.opts.discriminator && o.discriminator)
13004
13024
  return;
13005
- const l = a, d = i.let("valid", !1), h = i.let("passing", null), S = i.name("_valid");
13025
+ const l = a, d = i.let("valid", !1), h = i.let("passing", null), k = i.name("_valid");
13006
13026
  s.setParams({ passing: h }), i.block(b), s.result(d, () => s.reset(), () => s.error(!0));
13007
13027
  function b() {
13008
13028
  l.forEach((v, y) => {
13009
13029
  let f;
13010
- (0, e.alwaysValidSchema)(c, v) ? i.var(S, !0) : f = s.subschema({
13030
+ (0, e.alwaysValidSchema)(c, v) ? i.var(k, !0) : f = s.subschema({
13011
13031
  keyword: "oneOf",
13012
13032
  schemaProp: y,
13013
13033
  compositeRule: !0
13014
- }, S), y > 0 && i.if((0, t._)`${S} && ${d}`).assign(d, !1).assign(h, (0, t._)`[${h}, ${y}]`).else(), i.if(S, () => {
13034
+ }, k), y > 0 && i.if((0, t._)`${k} && ${d}`).assign(d, !1).assign(h, (0, t._)`[${h}, ${y}]`).else(), i.if(k, () => {
13015
13035
  i.assign(d, !0), i.assign(h, y), f && s.mergeEvaluated(f, t.Name);
13016
13036
  });
13017
13037
  });
@@ -13060,11 +13080,11 @@ function ov() {
13060
13080
  const l = s(c, "then"), d = s(c, "else");
13061
13081
  if (!l && !d)
13062
13082
  return;
13063
- const h = a.let("valid", !0), S = a.name("_valid");
13083
+ const h = a.let("valid", !0), k = a.name("_valid");
13064
13084
  if (b(), i.reset(), l && d) {
13065
13085
  const y = a.let("ifClause");
13066
- i.setParams({ ifClause: y }), a.if(S, v("then", y), v("else", y));
13067
- } else l ? a.if(S, v("then")) : a.if((0, t.not)(S), v("else"));
13086
+ i.setParams({ ifClause: y }), a.if(k, v("then", y), v("else", y));
13087
+ } else l ? a.if(k, v("then")) : a.if((0, t.not)(k), v("else"));
13068
13088
  i.pass(h, () => i.error(!0));
13069
13089
  function b() {
13070
13090
  const y = i.subschema({
@@ -13072,13 +13092,13 @@ function ov() {
13072
13092
  compositeRule: !0,
13073
13093
  createErrors: !1,
13074
13094
  allErrors: !1
13075
- }, S);
13095
+ }, k);
13076
13096
  i.mergeEvaluated(y);
13077
13097
  }
13078
13098
  function v(y, f) {
13079
13099
  return () => {
13080
- const m = i.subschema({ keyword: y }, S);
13081
- a.assign(h, S), i.mergeValidEvaluated(m, h), f ? a.assign(f, (0, t._)`${y}`) : i.setParams({ ifClause: y });
13100
+ const m = i.subschema({ keyword: y }, k);
13101
+ a.assign(h, k), i.mergeValidEvaluated(m, h), f ? a.assign(f, (0, t._)`${y}`) : i.setParams({ ifClause: y });
13082
13102
  };
13083
13103
  }
13084
13104
  }
@@ -13106,13 +13126,13 @@ var Yo;
13106
13126
  function uv() {
13107
13127
  if (Yo) return lr;
13108
13128
  Yo = 1, Object.defineProperty(lr, "__esModule", { value: !0 });
13109
- const t = Nu(), e = Jy(), n = xu(), r = Yy(), s = Qy(), i = Xy(), a = ev(), o = Au(), c = tv(), l = nv(), d = rv(), h = sv(), S = iv(), b = av(), v = ov(), y = cv();
13129
+ const t = Nu(), e = Jy(), n = xu(), r = Yy(), s = Qy(), i = Xy(), a = ev(), o = Au(), c = tv(), l = nv(), d = rv(), h = sv(), k = iv(), b = av(), v = ov(), y = cv();
13110
13130
  function f(m = !1) {
13111
13131
  const u = [
13112
13132
  // any
13113
13133
  d.default,
13114
13134
  h.default,
13115
- S.default,
13135
+ k.default,
13116
13136
  b.default,
13117
13137
  v.default,
13118
13138
  y.default,
@@ -13141,7 +13161,7 @@ function lv() {
13141
13161
  params: ({ schemaCode: r }) => (0, t._)`{format: ${r}}`
13142
13162
  },
13143
13163
  code(r, s) {
13144
- const { gen: i, data: a, $data: o, schema: c, schemaCode: l, it: d } = r, { opts: h, errSchemaPath: S, schemaEnv: b, self: v } = d;
13164
+ const { gen: i, data: a, $data: o, schema: c, schemaCode: l, it: d } = r, { opts: h, errSchemaPath: k, schemaEnv: b, self: v } = d;
13145
13165
  if (!h.validateFormats)
13146
13166
  return;
13147
13167
  o ? y() : f();
@@ -13176,7 +13196,7 @@ function lv() {
13176
13196
  }
13177
13197
  throw new Error(E());
13178
13198
  function E() {
13179
- return `unknown format "${c}" ignored in schema at path "${S}"`;
13199
+ return `unknown format "${c}" ignored in schema at path "${k}"`;
13180
13200
  }
13181
13201
  }
13182
13202
  function g(E) {
@@ -13255,8 +13275,8 @@ function mv() {
13255
13275
  params: ({ params: { discrError: o, tag: c, tagName: l } }) => (0, t._)`{error: ${o}, tag: ${l}, tagValue: ${c}}`
13256
13276
  },
13257
13277
  code(o) {
13258
- const { gen: c, data: l, schema: d, parentSchema: h, it: S } = o, { oneOf: b } = h;
13259
- if (!S.opts.discriminator)
13278
+ const { gen: c, data: l, schema: d, parentSchema: h, it: k } = o, { oneOf: b } = h;
13279
+ if (!k.opts.discriminator)
13260
13280
  throw new Error("discriminator: requires discriminator option");
13261
13281
  const v = d.propertyName;
13262
13282
  if (typeof v != "string")
@@ -13284,10 +13304,10 @@ function mv() {
13284
13304
  let $ = !0;
13285
13305
  for (let C = 0; C < b.length; C++) {
13286
13306
  let M = b[C];
13287
- if (M?.$ref && !(0, s.schemaHasRulesButRef)(M, S.self.RULES)) {
13307
+ if (M?.$ref && !(0, s.schemaHasRulesButRef)(M, k.self.RULES)) {
13288
13308
  const H = M.$ref;
13289
- if (M = n.resolveRef.call(S.self, S.schemaEnv.root, S.baseId, H), M instanceof n.SchemaEnv && (M = M.schema), M === void 0)
13290
- throw new r.default(S.opts.uriResolver, S.baseId, H);
13309
+ if (M = n.resolveRef.call(k.self, k.schemaEnv.root, k.baseId, H), M instanceof n.SchemaEnv && (M = M.schema), M === void 0)
13310
+ throw new r.default(k.opts.uriResolver, k.baseId, H);
13291
13311
  }
13292
13312
  const q = (_ = M?.properties) === null || _ === void 0 ? void 0 : _[v];
13293
13313
  if (typeof q != "object")
@@ -13370,9 +13390,9 @@ function ju() {
13370
13390
  Object.defineProperty(e, "ValidationError", { enumerable: !0, get: function() {
13371
13391
  return h.default;
13372
13392
  } });
13373
- var S = us();
13393
+ var k = us();
13374
13394
  Object.defineProperty(e, "MissingRefError", { enumerable: !0, get: function() {
13375
- return S.default;
13395
+ return k.default;
13376
13396
  } });
13377
13397
  }(Fn, Fn.exports)), Fn.exports;
13378
13398
  }
@@ -13388,9 +13408,9 @@ function $v() {
13388
13408
  date: e(i, a),
13389
13409
  // date-time: http://tools.ietf.org/html/rfc3339#section-5.6
13390
13410
  time: e(c(!0), l),
13391
- "date-time": e(S(!0), b),
13411
+ "date-time": e(k(!0), b),
13392
13412
  "iso-time": e(c(), d),
13393
- "iso-date-time": e(S(), v),
13413
+ "iso-date-time": e(k(), v),
13394
13414
  // duration: https://tools.ietf.org/html/rfc3339#appendix-A
13395
13415
  duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
13396
13416
  uri: m,
@@ -13489,7 +13509,7 @@ function $v() {
13489
13509
  return C = q[1] + q[2] + q[3], M = H[1] + H[2] + H[3], C > M ? 1 : C < M ? -1 : 0;
13490
13510
  }
13491
13511
  const h = /t|\s/i;
13492
- function S(C) {
13512
+ function k(C) {
13493
13513
  const M = c(C);
13494
13514
  return function(H) {
13495
13515
  const ie = H.split(h);
@@ -13560,10 +13580,10 @@ function Tv() {
13560
13580
  $data: !0,
13561
13581
  error: i,
13562
13582
  code(o) {
13563
- const { gen: c, data: l, schemaCode: d, keyword: h, it: S } = o, { opts: b, self: v } = S;
13583
+ const { gen: c, data: l, schemaCode: d, keyword: h, it: k } = o, { opts: b, self: v } = k;
13564
13584
  if (!b.validateFormats)
13565
13585
  return;
13566
- const y = new e.KeywordCxt(S, v.RULES.all.format.definition, "format");
13586
+ const y = new e.KeywordCxt(k, v.RULES.all.format.definition, "format");
13567
13587
  y.$data ? f() : m();
13568
13588
  function f() {
13569
13589
  const p = c.scopeValue("formats", {
@@ -13602,18 +13622,18 @@ function Ev() {
13602
13622
  const n = $v(), r = Tv(), s = oe(), i = new s.Name("fullFormats"), a = new s.Name("fastFormats"), o = (l, d = { keywords: !0 }) => {
13603
13623
  if (Array.isArray(d))
13604
13624
  return c(l, d, n.fullFormats, i), l;
13605
- const [h, S] = d.mode === "fast" ? [n.fastFormats, a] : [n.fullFormats, i], b = d.formats || n.formatNames;
13606
- return c(l, b, h, S), d.keywords && (0, r.default)(l), l;
13625
+ const [h, k] = d.mode === "fast" ? [n.fastFormats, a] : [n.fullFormats, i], b = d.formats || n.formatNames;
13626
+ return c(l, b, h, k), d.keywords && (0, r.default)(l), l;
13607
13627
  };
13608
13628
  o.get = (l, d = "full") => {
13609
- const S = (d === "fast" ? n.fastFormats : n.fullFormats)[l];
13610
- if (!S)
13629
+ const k = (d === "fast" ? n.fastFormats : n.fullFormats)[l];
13630
+ if (!k)
13611
13631
  throw new Error(`Unknown format "${l}"`);
13612
- return S;
13632
+ return k;
13613
13633
  };
13614
- function c(l, d, h, S) {
13634
+ function c(l, d, h, k) {
13615
13635
  var b, v;
13616
- (b = (v = l.opts.code).formats) !== null && b !== void 0 || (v.formats = (0, s._)`require("ajv-formats/dist/formats").${S}`);
13636
+ (b = (v = l.opts.code).formats) !== null && b !== void 0 || (v.formats = (0, s._)`require("ajv-formats/dist/formats").${k}`);
13617
13637
  for (const y of d)
13618
13638
  l.addFormat(y, h[y]);
13619
13639
  }
@@ -13833,13 +13853,13 @@ class Av extends my {
13833
13853
  if (typeof c != "string")
13834
13854
  throw new Error("Schema method literal must be a string");
13835
13855
  if (c === "tools/call") {
13836
- const d = async (h, S) => {
13856
+ const d = async (h, k) => {
13837
13857
  const b = bn(Fr, h);
13838
13858
  if (!b.success) {
13839
13859
  const m = b.error instanceof Error ? b.error.message : String(b.error);
13840
13860
  throw new ne(re.InvalidParams, `Invalid tools/call request: ${m}`);
13841
13861
  }
13842
- const { params: v } = b.data, y = await Promise.resolve(n(h, S));
13862
+ const { params: v } = b.data, y = await Promise.resolve(n(h, k));
13843
13863
  if (v.task) {
13844
13864
  const m = bn(is, y);
13845
13865
  if (!m.success) {
@@ -13987,8 +14007,8 @@ class Av extends my {
13987
14007
  throw new Error("tool_result blocks are not matching any tool_use from the previous message");
13988
14008
  }
13989
14009
  if (d) {
13990
- const h = new Set(l.filter((b) => b.type === "tool_use").map((b) => b.id)), S = new Set(a.filter((b) => b.type === "tool_result").map((b) => b.toolUseId));
13991
- if (h.size !== S.size || ![...h].every((b) => S.has(b)))
14010
+ const h = new Set(l.filter((b) => b.type === "tool_use").map((b) => b.id)), k = new Set(a.filter((b) => b.type === "tool_result").map((b) => b.toolUseId));
14011
+ if (h.size !== k.size || ![...h].every((b) => k.has(b)))
13992
14012
  throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
13993
14013
  }
13994
14014
  }
@@ -14016,9 +14036,9 @@ class Av extends my {
14016
14036
  const l = e.mode === "form" ? e : { ...e, mode: "form" }, d = await this.request({ method: "elicitation/create", params: l }, ii, n);
14017
14037
  if (d.action === "accept" && d.content && l.requestedSchema)
14018
14038
  try {
14019
- const S = this._jsonSchemaValidator.getValidator(l.requestedSchema)(d.content);
14020
- if (!S.valid)
14021
- throw new ne(re.InvalidParams, `Elicitation response content does not match requested schema: ${S.errorMessage}`);
14039
+ const k = this._jsonSchemaValidator.getValidator(l.requestedSchema)(d.content);
14040
+ if (!k.valid)
14041
+ throw new ne(re.InvalidParams, `Elicitation response content does not match requested schema: ${k.errorMessage}`);
14022
14042
  } catch (h) {
14023
14043
  throw h instanceof ne ? h : new ne(re.InternalError, `Error validating elicitation response: ${h instanceof Error ? h.message : String(h)}`);
14024
14044
  }
@@ -14306,10 +14326,10 @@ class Lv {
14306
14326
  const h = (s = d.pollInterval) !== null && s !== void 0 ? s : 5e3;
14307
14327
  for (; d.status !== "completed" && d.status !== "failed" && d.status !== "cancelled"; ) {
14308
14328
  await new Promise((b) => setTimeout(b, h));
14309
- const S = await r.taskStore.getTask(l);
14310
- if (!S)
14329
+ const k = await r.taskStore.getTask(l);
14330
+ if (!k)
14311
14331
  throw new ne(re.InternalError, `Task ${l} not found during polling`);
14312
- d = S;
14332
+ d = k;
14313
14333
  }
14314
14334
  return await r.taskStore.getTaskResult(l);
14315
14335
  }
@@ -14754,17 +14774,17 @@ class Fi {
14754
14774
  await this.loadDataSource();
14755
14775
  const a = (this.dataSource?.components || []).filter((l) => !(n.category && l.category !== n.category || n.source && l.source !== n.source || n.overrideType && l.overrideType !== n.overrideType || n.status && l.status !== n.status || n.treeshakable !== void 0 && l.importInfo.treeshakable !== n.treeshakable || n.hasIndividualImport !== void 0 && !!l.importInfo.individualImport !== n.hasIndividualImport || n.responsive !== void 0 && l.responsive !== n.responsive || n.accessible !== void 0 && l.accessibility.ariaSupport !== n.accessible || n.tags && n.tags.length > 0 && !n.tags.some(
14756
14776
  (h) => l.tags.some(
14757
- (S) => S.toLowerCase().includes(h.toLowerCase())
14777
+ (k) => k.toLowerCase().includes(h.toLowerCase())
14758
14778
  )
14759
14779
  ))), o = [], c = e.toLowerCase();
14760
14780
  for (const l of a) {
14761
14781
  const d = [];
14762
14782
  let h = 0;
14763
14783
  l.name.toLowerCase().includes(c) && (d.push("name"), h += 100, l.name.toLowerCase() === c && (h += 50)), l.description.toLowerCase().includes(c) && (d.push("description"), h += 50);
14764
- const S = l.tags.filter(
14784
+ const k = l.tags.filter(
14765
14785
  (v) => v.toLowerCase().includes(c)
14766
14786
  );
14767
- S.length > 0 && (d.push("tags"), h += S.length * 30);
14787
+ k.length > 0 && (d.push("tags"), h += k.length * 30);
14768
14788
  const b = l.useCases.filter(
14769
14789
  (v) => v.toLowerCase().includes(c)
14770
14790
  );
@@ -14920,7 +14940,7 @@ function Jr(t, e) {
14920
14940
  } catch {
14921
14941
  return;
14922
14942
  }
14923
- const { length: S, delimiter: b } = h;
14943
+ const { length: k, delimiter: b } = h;
14924
14944
  let v;
14925
14945
  if (o !== -1 && o < i) {
14926
14946
  const y = t.indexOf(pc, o);
@@ -14929,7 +14949,7 @@ function Jr(t, e) {
14929
14949
  return {
14930
14950
  header: {
14931
14951
  key: c,
14932
- length: S,
14952
+ length: k,
14933
14953
  delimiter: b,
14934
14954
  fields: v
14935
14955
  },
@@ -15527,7 +15547,7 @@ function T_(t) {
15527
15547
  function E_(t, e, n, r, s, i, a) {
15528
15548
  if (r.keyFolding !== "safe" || !ct(e)) return;
15529
15549
  const { segments: o, tail: c, leafValue: l } = P_(t, e, a ?? r.flattenDepth);
15530
- if (o.length < 2 || !o.every((S) => __(S))) return;
15550
+ if (o.length < 2 || !o.every((k) => __(k))) return;
15531
15551
  const d = R_(o), h = i ? `${i}${Gr}${d}` : d;
15532
15552
  if (!n.includes(d) && !(s && s.has(h)))
15533
15553
  return {
@@ -15599,13 +15619,13 @@ function* O_(t, e, n, r, s, i, a, o) {
15599
15619
  if (r.keyFolding === "safe" && s) {
15600
15620
  const h = E_(t, e, s, r, i, a, l);
15601
15621
  if (h) {
15602
- const { foldedKey: S, remainder: b, leafValue: v, segmentCount: y } = h, f = Cn(S);
15622
+ const { foldedKey: k, remainder: b, leafValue: v, segmentCount: y } = h, f = Cn(k);
15603
15623
  if (b === void 0) {
15604
15624
  if (Ht(v)) {
15605
15625
  yield Ge(n, `${f}: ${sn(v, r.delimiter)}`, r.indent);
15606
15626
  return;
15607
15627
  } else if (jt(v)) {
15608
- yield* li(S, v, n, r);
15628
+ yield* li(k, v, n, r);
15609
15629
  return;
15610
15630
  } else if (ct(v) && Rn(v)) {
15611
15631
  yield Ge(n, `${f}:`, r.indent);
@@ -15614,7 +15634,7 @@ function* O_(t, e, n, r, s, i, a, o) {
15614
15634
  }
15615
15635
  if (ct(b)) {
15616
15636
  yield Ge(n, `${f}:`, r.indent);
15617
- const m = l - y, u = a ? `${a}${Gr}${S}` : S;
15637
+ const m = l - y, u = a ? `${a}${Gr}${k}` : k;
15618
15638
  yield* Qt(b, n + 1, r, i, u, m);
15619
15639
  return;
15620
15640
  }
@@ -16076,8 +16096,8 @@ function K_(t, e) {
16076
16096
 
16077
16097
  EXAMPLES|${l.examples.length}
16078
16098
  `;
16079
- for (const S of l.examples)
16080
- h += `${S.id}|${S.title}|${S.complexity}|${S.useCase}
16099
+ for (const k of l.examples)
16100
+ h += `${k.id}|${k.title}|${k.complexity}|${k.useCase}
16081
16101
  `;
16082
16102
  }
16083
16103
  return {
@@ -16320,9 +16340,9 @@ function Q_(t, e) {
16320
16340
  }
16321
16341
  }
16322
16342
  const h = /\b(Omit|Pick|Partial|Required|Record|Extract|Exclude|NonNullable|ReturnType|Parameters)<\s*([A-Z][a-zA-Z0-9_]*)/g;
16323
- let S;
16324
- for (; (S = h.exec(a)) !== null; ) {
16325
- const b = S[2];
16343
+ let k;
16344
+ for (; (k = h.exec(a)) !== null; ) {
16345
+ const b = k[2];
16326
16346
  c.has(b) || b && b[0] === b[0].toUpperCase() && b.length > 1 && l.add(b);
16327
16347
  }
16328
16348
  for (const b of l)
@@ -16472,14 +16492,14 @@ function n0(t, e) {
16472
16492
  a = JSON.parse(fi(g, "utf-8")).name || a;
16473
16493
  } catch {
16474
16494
  }
16475
- const o = {}, c = /* @__PURE__ */ new Set(), l = [...r], d = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), S = Wi(i);
16495
+ const o = {}, c = /* @__PURE__ */ new Set(), l = [...r], d = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Map(), k = Wi(i);
16476
16496
  let b = 0;
16477
16497
  const v = 100;
16478
16498
  for (; l.length > 0 && b < v; ) {
16479
16499
  b++;
16480
16500
  const g = l.shift();
16481
16501
  if (!c.has(g) && (c.add(g), o[g] = [], gc(i).isDirectory()))
16482
- for (const $ of S) {
16502
+ for (const $ of k) {
16483
16503
  const E = wn(i, $), R = t0(E, g);
16484
16504
  for (const z of R) {
16485
16505
  const C = {