@oomol-lab/open-flow 0.1.0-beta.11 → 0.1.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/browser/{createResourceDialog-DhIU-HYW.js → createResourceDialog-2pESP2wA.js} +11 -11
  2. package/dist/browser/{esm-C64_h7HF.js → esm-BPZ0P6x4.js} +1 -1
  3. package/dist/browser/flow-authoring.js +88 -74
  4. package/dist/browser/flow-change-schema.d.ts +4 -1
  5. package/dist/browser/flow-change.js +1408 -1390
  6. package/dist/browser/{flowChanges-BINNGoug.js → flowChanges-CHPdBmZb.js} +953 -937
  7. package/dist/browser/{flowWorkspace-Dp_b8KXF.js → flowWorkspace-BLGcgnHj.js} +25733 -25724
  8. package/dist/browser/host-conformance.d.ts +7 -0
  9. package/dist/browser/host-conformance.js +33 -0
  10. package/dist/browser/{select-CbQHq-GM.js → select-Dn3vpjGC.js} +506 -485
  11. package/dist/browser/{waitNotificationInputs-fzyKN6mk.js → waitNotificationInputs-BFbQUOyp.js} +1 -1
  12. package/dist/browser/workbench.js +67 -61
  13. package/dist/browser/{workbenchSelect-BjbJjlNd.js → workbenchSelect-DzF8oik9.js} +7 -7
  14. package/dist/common/control-api-conformance.d.ts +6 -0
  15. package/dist/common/control-api-conformance.js +67 -1
  16. package/dist/common/control-api.js +5117 -434
  17. package/dist/common/control-requests.d.ts +68 -0
  18. package/dist/common/control-requests.js +4913 -0
  19. package/dist/common/flow-encoding.d.ts +3 -1
  20. package/dist/common/flow-encoding.js +4755 -59
  21. package/dist/common/flow-json.d.ts +2 -0
  22. package/dist/common/flow-semantics.js +1121 -1107
  23. package/dist/common/mcp-conformance.d.ts +2 -0
  24. package/dist/common/mcp.d.ts +545 -0
  25. package/dist/common/mcp.js +4964 -0
  26. package/dist/common/scheduler.js +513 -499
  27. package/package.json +13 -1
@@ -4503,13 +4503,34 @@ var P = Do(), Ks = Gs(), qs = k(P), Js = A({
4503
4503
  name: P,
4504
4504
  inputs: k(F),
4505
4505
  outputs: k(Js.extend({ sources: k(j([Xs, Zs])) }))
4506
- }), _c = {
4506
+ }), _c = A({
4507
+ nodes: _s(P, pc),
4508
+ edges: k(hc)
4509
+ }), vc = A({
4510
+ kind: M(["connection", "variable"]),
4511
+ target: P
4512
+ }), yc = A({
4513
+ name: P,
4514
+ imports: qs,
4515
+ source: P
4516
+ }), bc = A({
4517
+ bindings: _s(P, vc),
4518
+ graph: _c,
4519
+ subflows: _s(P, gc.extend({ graph: _c })),
4520
+ tasks: _s(P, ic)
4521
+ });
4522
+ A({
4523
+ modelVersion: N(1),
4524
+ document: bc,
4525
+ modules: _s(P, yc)
4526
+ }).extend({
4527
+ kind: N("open-flow-flow-revision"),
4528
+ version: N(1)
4529
+ });
4530
+ var xc = {
4507
4531
  "binding.create": {
4508
4532
  bindingId: P,
4509
- binding: A({
4510
- kind: M(["connection", "variable"]),
4511
- target: P
4512
- })
4533
+ binding: vc
4513
4534
  },
4514
4535
  "binding.delete": { bindingId: P },
4515
4536
  "binding.target.set": {
@@ -4608,11 +4629,7 @@ var P = Do(), Ks = Gs(), qs = k(P), Js = A({
4608
4629
  },
4609
4630
  "module.create": {
4610
4631
  moduleId: P,
4611
- module: A({
4612
- name: P,
4613
- imports: qs,
4614
- source: P
4615
- })
4632
+ module: yc
4616
4633
  },
4617
4634
  "module.delete": { moduleId: P },
4618
4635
  "module.rename": {
@@ -4629,10 +4646,7 @@ var P = Do(), Ks = Gs(), qs = k(P), Js = A({
4629
4646
  },
4630
4647
  "subflow.create": {
4631
4648
  subflowId: P,
4632
- subflow: gc.extend({ graph: A({
4633
- nodes: _s(P, pc),
4634
- edges: k(hc)
4635
- }) })
4649
+ subflow: gc.extend({ graph: _c })
4636
4650
  },
4637
4651
  "subflow.definition.set": {
4638
4652
  subflowId: P,
@@ -4661,56 +4675,56 @@ var P = Do(), Ks = Gs(), qs = k(P), Js = A({
4661
4675
  value: P
4662
4676
  }
4663
4677
  };
4664
- k(j([...new Map(Object.entries(_c).map(([e, t]) => [e, t instanceof D ? t : A({
4678
+ k(j([...new Map(Object.entries(xc).map(([e, t]) => [e, t instanceof D ? t : A({
4665
4679
  kind: N(e),
4666
4680
  ...t
4667
4681
  })])).values()])).min(1);
4668
4682
  //#endregion
4669
4683
  //#region src/flow/common/change.ts
4670
- function vc(e) {
4684
+ function Sc(e) {
4671
4685
  return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
4672
4686
  }
4673
4687
  //#endregion
4674
4688
  //#region src/json-schema-subset/utils.ts
4675
- var yc = 0;
4676
- function bc() {
4677
- let e = yc;
4678
- return yc += 1, e;
4689
+ var Cc = 0;
4690
+ function wc() {
4691
+ let e = Cc;
4692
+ return Cc += 1, e;
4679
4693
  }
4680
- function xc(e) {
4694
+ function Tc(e) {
4681
4695
  if (typeof e == "object" && e && !Object.isFrozen(e)) {
4682
- for (let t of Object.getOwnPropertyNames(e)) xc(Reflect.get(e, t));
4696
+ for (let t of Object.getOwnPropertyNames(e)) Tc(Reflect.get(e, t));
4683
4697
  Object.freeze(e);
4684
4698
  }
4685
4699
  return e;
4686
4700
  }
4687
- function Sc(e, t) {
4701
+ function Ec(e, t) {
4688
4702
  let n = {};
4689
4703
  for (let r of t) r in e && (n[r] = e[r]);
4690
4704
  return n;
4691
4705
  }
4692
- function Cc(e) {
4706
+ function Dc(e) {
4693
4707
  if (typeof e != "object" || !e) return e;
4694
4708
  if (Array.isArray(e)) {
4695
4709
  let t = [];
4696
- for (let [n, r] of e.entries()) t[n] = Cc(r);
4710
+ for (let [n, r] of e.entries()) t[n] = Dc(r);
4697
4711
  return t;
4698
4712
  }
4699
4713
  {
4700
4714
  let t = {};
4701
- for (let n in e) t[n] = Cc(e[n]);
4715
+ for (let n in e) t[n] = Dc(e[n]);
4702
4716
  return t;
4703
4717
  }
4704
4718
  }
4705
- function wc(e, t) {
4719
+ function Oc(e, t) {
4706
4720
  if (e === t) return !0;
4707
4721
  if (typeof e != "object" || !e || typeof e != typeof t) return !1;
4708
4722
  if (Array.isArray(e)) {
4709
4723
  if (!Array.isArray(t) || e.length !== t.length) return !1;
4710
- for (let [n, r] of e.entries()) if (!wc(r, t[n])) return !1;
4724
+ for (let [n, r] of e.entries()) if (!Oc(r, t[n])) return !1;
4711
4725
  } else {
4712
4726
  if (Array.isArray(t)) return !1;
4713
- for (let n in e) if (!(n in t) || !wc(e[n], t[n])) return !1;
4727
+ for (let n in e) if (!(n in t) || !Oc(e[n], t[n])) return !1;
4714
4728
  for (let n in t) if (!(n in e)) return !1;
4715
4729
  }
4716
4730
  return !0;
@@ -4723,48 +4737,48 @@ var L = Object.freeze({
4723
4737
  ContainedBy: 2,
4724
4738
  Rejection: 3,
4725
4739
  Intersection: 4
4726
- }), R = Mc(L.Equals), z = Mc(L.Containing), B = Mc(L.ContainedBy), V = Mc(L.Rejection), H = Mc(L.Intersection), Tc = xc([
4740
+ }), R = Ic(L.Equals), z = Ic(L.Containing), B = Ic(L.ContainedBy), V = Ic(L.Rejection), H = Ic(L.Intersection), kc = Tc([
4727
4741
  [L.Equals, R],
4728
4742
  [L.Containing, z],
4729
4743
  [L.ContainedBy, B],
4730
4744
  [L.Rejection, V],
4731
4745
  [L.Intersection, H]
4732
- ]), Ec = (() => {
4746
+ ]), Ac = (() => {
4733
4747
  let e = 0;
4734
- for (let [t, n] of Tc) e |= n;
4748
+ for (let [t, n] of kc) e |= n;
4735
4749
  return e;
4736
4750
  })();
4737
- function Dc(e) {
4751
+ function jc(e) {
4738
4752
  return !!(e & R);
4739
4753
  }
4740
- function Oc(e) {
4754
+ function Mc(e) {
4741
4755
  return !!(e & z);
4742
4756
  }
4743
- function kc(e) {
4757
+ function Nc(e) {
4744
4758
  return !!(e & B);
4745
4759
  }
4746
- function Ac(e) {
4760
+ function Pc(e) {
4747
4761
  return !!(e & V);
4748
4762
  }
4749
- function jc(e) {
4763
+ function Fc(e) {
4750
4764
  return !!(e & H);
4751
4765
  }
4752
- function Mc(e) {
4766
+ function Ic(e) {
4753
4767
  return 1 << e;
4754
4768
  }
4755
4769
  //#endregion
4756
4770
  //#region src/json-schema-subset/expression/combination.ts
4757
- function Nc(e) {
4758
- let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : Pc(t, r, e), n += 1, t) };
4771
+ function Lc(e) {
4772
+ let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : Rc(t, r, e), n += 1, t) };
4759
4773
  return Object.defineProperties(r, {
4760
4774
  result: { get: () => t },
4761
4775
  count: { get: () => n }
4762
4776
  }), r;
4763
4777
  }
4764
- function Pc(e, t, n) {
4778
+ function Rc(e, t, n) {
4765
4779
  let r = 0;
4766
- for (let [i, a] of Tc) if (a & e) {
4767
- for (let [e, a] of Tc) if (a & t && (r |= n(i, e), r === Ec)) return r;
4780
+ for (let [i, a] of kc) if (a & e) {
4781
+ for (let [e, a] of kc) if (a & t && (r |= n(i, e), r === Ac)) return r;
4768
4782
  }
4769
4783
  return r;
4770
4784
  }
@@ -4778,59 +4792,59 @@ var U = Object.freeze({
4778
4792
  Not: 4,
4779
4793
  Swap: 5
4780
4794
  });
4781
- function Fc(e, t) {
4795
+ function zc(e, t) {
4782
4796
  switch (e) {
4783
4797
  case U.Save: return t[0];
4784
- case U.OneOf: return Lc(t);
4798
+ case U.OneOf: return Vc(t);
4785
4799
  case U.AllOf:
4786
- case U.AnyOf: return Rc(e, t);
4800
+ case U.AnyOf: return Hc(e, t);
4787
4801
  case U.Not:
4788
- case U.Swap: return zc(e, t[0]);
4802
+ case U.Swap: return Uc(e, t[0]);
4789
4803
  }
4790
4804
  }
4791
- function Ic(e) {
4792
- return zc(U.Swap, e);
4805
+ function Bc(e) {
4806
+ return Uc(U.Swap, e);
4793
4807
  }
4794
- function Lc(e) {
4808
+ function Vc(e) {
4795
4809
  if (e.length === 1) return e[0];
4796
- let t = Rc(U.AnyOf, e), n = [];
4810
+ let t = Hc(U.AnyOf, e), n = [];
4797
4811
  for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
4798
- let i = e[t], a = e[r], o = Rc(U.AllOf, [i, a]);
4812
+ let i = e[t], a = e[r], o = Hc(U.AllOf, [i, a]);
4799
4813
  n.push(o);
4800
4814
  }
4801
- let r = Rc(U.AnyOf, n), i = zc(U.Not, r);
4802
- return Rc(U.AllOf, [t, i]);
4815
+ let r = Hc(U.AnyOf, n), i = Uc(U.Not, r);
4816
+ return Hc(U.AllOf, [t, i]);
4803
4817
  }
4804
- function Rc(e, t) {
4818
+ function Hc(e, t) {
4805
4819
  if (t.length < 0) throw Error("invalid expressions: empty array");
4806
4820
  let n;
4807
4821
  switch (e) {
4808
4822
  case U.AllOf:
4809
- n = Nc(Bc);
4823
+ n = Lc(Wc);
4810
4824
  break;
4811
4825
  case U.AnyOf:
4812
- n = Nc(Vc);
4826
+ n = Lc(Gc);
4813
4827
  break;
4814
4828
  default: throw Error(`invalid operator ${e}`);
4815
4829
  }
4816
4830
  for (let e of t) n.push(e);
4817
4831
  return n.result;
4818
4832
  }
4819
- function zc(e, t) {
4833
+ function Uc(e, t) {
4820
4834
  let n, r = 0;
4821
4835
  switch (e) {
4822
4836
  case U.Not:
4823
- n = Hc;
4837
+ n = Kc;
4824
4838
  break;
4825
4839
  case U.Swap:
4826
- n = Uc;
4840
+ n = qc;
4827
4841
  break;
4828
4842
  default: throw Error(`invalid operator ${e}`);
4829
4843
  }
4830
- for (let [e, i] of Tc) i & t && (r |= n(e));
4844
+ for (let [e, i] of kc) i & t && (r |= n(e));
4831
4845
  return r;
4832
4846
  }
4833
- function Bc(e, t) {
4847
+ function Wc(e, t) {
4834
4848
  let n = 0;
4835
4849
  switch (e) {
4836
4850
  case L.Equals:
@@ -4919,7 +4933,7 @@ function Bc(e, t) {
4919
4933
  }
4920
4934
  return n;
4921
4935
  }
4922
- function Vc(e, t) {
4936
+ function Gc(e, t) {
4923
4937
  let n = 0;
4924
4938
  switch (e) {
4925
4939
  case L.Equals:
@@ -5008,7 +5022,7 @@ function Vc(e, t) {
5008
5022
  }
5009
5023
  return n;
5010
5024
  }
5011
- function Hc(e) {
5025
+ function Kc(e) {
5012
5026
  let t = 0;
5013
5027
  switch (e) {
5014
5028
  case L.Equals:
@@ -5027,7 +5041,7 @@ function Hc(e) {
5027
5041
  }
5028
5042
  return t;
5029
5043
  }
5030
- function Uc(e) {
5044
+ function qc(e) {
5031
5045
  let t = 0;
5032
5046
  switch (e) {
5033
5047
  case L.Equals:
@@ -5054,7 +5068,7 @@ var W = Object.freeze({
5054
5068
  AllOf: 2,
5055
5069
  AnyOf: 3,
5056
5070
  OneOf: 4
5057
- }), Wc = (e) => (t, n) => {
5071
+ }), Jc = (e) => (t, n) => {
5058
5072
  let r = {
5059
5073
  parent: null,
5060
5074
  swapped: !1,
@@ -5145,8 +5159,8 @@ var W = Object.freeze({
5145
5159
  }, r];
5146
5160
  }
5147
5161
  function c(e) {
5148
- let t = e.calculation, n = e.parent, r = Fc(t.operator, t.results);
5149
- if (r === 0 && (r = B), t.willSwap && (r = Ic(r)), n) {
5162
+ let t = e.calculation, n = e.parent, r = zc(t.operator, t.results);
5163
+ if (r === 0 && (r = B), t.willSwap && (r = Bc(r)), n) {
5150
5164
  let e = n.node.calculation, t = e.results;
5151
5165
  t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
5152
5166
  }
@@ -5154,38 +5168,38 @@ var W = Object.freeze({
5154
5168
  let l = r.calculation.results[0];
5155
5169
  if (l === 0) throw Error("cannot find result of root");
5156
5170
  return l;
5157
- }, Gc = class extends Error {
5171
+ }, Yc = class extends Error {
5158
5172
  constructor(e = []) {
5159
- super(Jc(e)), this.name = "SchemaError", this.items = e;
5173
+ super(Qc(e)), this.name = "SchemaError", this.items = e;
5160
5174
  }
5161
- }, Kc = Object.freeze({
5175
+ }, Xc = Object.freeze({
5162
5176
  Compiled: 0,
5163
5177
  External: 1
5164
5178
  });
5165
- function qc(e) {
5179
+ function Zc(e) {
5166
5180
  switch (e.kind) {
5167
- case Kc.Compiled: {
5181
+ case Xc.Compiled: {
5168
5182
  let { message: t, path: n } = e;
5169
5183
  return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
5170
5184
  }
5171
- case Kc.External: return String(e.error);
5185
+ case Xc.External: return String(e.error);
5172
5186
  }
5173
5187
  }
5174
- function Jc(e) {
5188
+ function Qc(e) {
5175
5189
  switch (e.length) {
5176
5190
  case 0: return "without any items";
5177
- case 1: return qc(e[0]);
5178
- default: return `${qc(e[0])} ... omit the rest ${e.length - 1} items`;
5191
+ case 1: return Zc(e[0]);
5192
+ default: return `${Zc(e[0])} ... omit the rest ${e.length - 1} items`;
5179
5193
  }
5180
5194
  }
5181
5195
  //#endregion
5182
5196
  //#region src/json-schema-subset/compiler/common.ts
5183
- var Yc = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
5184
- function Xc(e) {
5185
- return Yc.has(e);
5197
+ var $c = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
5198
+ function el(e) {
5199
+ return $c.has(e);
5186
5200
  }
5187
- function Zc(e) {
5188
- for (let t in e) if (Xc(t)) return !1;
5201
+ function tl(e) {
5202
+ for (let t in e) if (el(t)) return !1;
5189
5203
  return !0;
5190
5204
  }
5191
5205
  function G(e, ...t) {
@@ -5194,39 +5208,39 @@ function G(e, ...t) {
5194
5208
  path: [...e.path, ...t]
5195
5209
  };
5196
5210
  }
5197
- function Qc(e) {
5211
+ function nl(e) {
5198
5212
  if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
5199
5213
  return e;
5200
5214
  }
5201
- function $c({ path: e, errors: t }, n, ...r) {
5202
- t.push(el(e, r, n));
5215
+ function rl({ path: e, errors: t }, n, ...r) {
5216
+ t.push(il(e, r, n));
5203
5217
  }
5204
5218
  function K({ path: e, warns: t }, n, ...r) {
5205
- t.push(el(e, r, n));
5219
+ t.push(il(e, r, n));
5206
5220
  }
5207
- function el(e, t, n) {
5221
+ function il(e, t, n) {
5208
5222
  return {
5209
- kind: Kc.Compiled,
5223
+ kind: Xc.Compiled,
5210
5224
  message: n,
5211
5225
  path: [...e, ...t]
5212
5226
  };
5213
5227
  }
5214
5228
  //#endregion
5215
5229
  //#region src/json-schema-subset/compiler/utils.ts
5216
- function tl(e) {
5230
+ function al(e) {
5217
5231
  for (let t in e) {
5218
5232
  let n = e[t];
5219
- n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : nl(n) && delete e[t]);
5233
+ n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : ol(n) && delete e[t]);
5220
5234
  }
5221
5235
  return e;
5222
5236
  }
5223
- function nl(e) {
5237
+ function ol(e) {
5224
5238
  for (let t in e) return !1;
5225
5239
  return !0;
5226
5240
  }
5227
5241
  //#endregion
5228
5242
  //#region src/json-schema-subset/compiler/wrapper.ts
5229
- var rl = Symbol("compiledId"), il = Symbol("compiledKind"), al = Symbol("compiledPath"), ol = Symbol("validatorLoader"), q = Object.freeze({
5243
+ var sl = Symbol("compiledId"), cl = Symbol("compiledKind"), ll = Symbol("compiledPath"), ul = Symbol("validatorLoader"), q = Object.freeze({
5230
5244
  Extends: 0,
5231
5245
  Never: 1,
5232
5246
  Any: 2,
@@ -5239,62 +5253,62 @@ var rl = Symbol("compiledId"), il = Symbol("compiledKind"), al = Symbol("compile
5239
5253
  Not: 9,
5240
5254
  Combination: 10,
5241
5255
  EnumOrConst: 11
5242
- }), sl = xc(hl(q.Any, bc(), {}, () => () => !0)), cl = xc(hl(q.Never, bc(), {
5256
+ }), dl = Tc(yl(q.Any, wc(), {}, () => () => !0)), fl = Tc(yl(q.Never, wc(), {
5243
5257
  type: "string",
5244
5258
  maxLength: 0,
5245
5259
  minLength: 1
5246
5260
  }, () => () => !1));
5247
- function ll(e) {
5248
- return typeof e != "object" || !e ? !1 : rl in e;
5261
+ function pl(e) {
5262
+ return typeof e != "object" || !e ? !1 : sl in e;
5249
5263
  }
5250
- function ul(e) {
5251
- return typeof e != "object" || !e ? !1 : rl in e && il in e;
5264
+ function ml(e) {
5265
+ return typeof e != "object" || !e ? !1 : sl in e && cl in e;
5252
5266
  }
5253
5267
  function J(e) {
5254
- return ul(e) ? e[il] : q.Extends;
5268
+ return ml(e) ? e[cl] : q.Extends;
5255
5269
  }
5256
- function dl(e) {
5257
- return ul(e) || ll(e) ? e[rl] : e.id;
5270
+ function hl(e) {
5271
+ return ml(e) || pl(e) ? e[sl] : e.id;
5258
5272
  }
5259
- function fl(e) {
5260
- return ul(e) ? e[al] : void 0;
5273
+ function gl(e) {
5274
+ return ml(e) ? e[ll] : void 0;
5261
5275
  }
5262
- function pl(e) {
5263
- return typeof e != "object" || !e || Object.defineProperty(e, rl, {
5264
- value: bc(),
5276
+ function _l(e) {
5277
+ return typeof e != "object" || !e || Object.defineProperty(e, sl, {
5278
+ value: wc(),
5265
5279
  configurable: !1,
5266
5280
  writable: !1,
5267
5281
  enumerable: !1
5268
5282
  }), e;
5269
5283
  }
5270
5284
  function Y(e, t, n, r = []) {
5271
- return hl(e, bc(), t, n && (() => n.compile(t)), r);
5285
+ return yl(e, wc(), t, n && (() => n.compile(t)), r);
5272
5286
  }
5273
- function ml(e) {
5274
- return hl(q.Never, bc(), { ...e }, e[ol], e[al]);
5287
+ function vl(e) {
5288
+ return yl(q.Never, wc(), { ...e }, e[ul], e[ll]);
5275
5289
  }
5276
- function hl(e, t, n, r, i = []) {
5290
+ function yl(e, t, n, r, i = []) {
5277
5291
  let a = null;
5278
5292
  return Object.defineProperties(n, {
5279
- [il]: {
5293
+ [cl]: {
5280
5294
  value: e,
5281
5295
  configurable: !1,
5282
5296
  writable: !1,
5283
5297
  enumerable: !1
5284
5298
  },
5285
- [rl]: {
5299
+ [sl]: {
5286
5300
  value: t,
5287
5301
  configurable: !1,
5288
5302
  writable: !1,
5289
5303
  enumerable: !1
5290
5304
  },
5291
- [al]: {
5305
+ [ll]: {
5292
5306
  value: i,
5293
5307
  configurable: !1,
5294
5308
  writable: !1,
5295
5309
  enumerable: !1
5296
5310
  },
5297
- [ol]: {
5311
+ [ul]: {
5298
5312
  value: r,
5299
5313
  configurable: !1,
5300
5314
  writable: !1,
@@ -5311,16 +5325,16 @@ function hl(e, t, n, r, i = []) {
5311
5325
  }
5312
5326
  //#endregion
5313
5327
  //#region src/json-schema-subset/compiler/array.ts
5314
- function gl(e, t) {
5315
- let n = _l(e, t), r = vl(e, "maxItems", t), i = vl(e, "minItems", t), a = yl(e, t), o = t.uniqueItems, s;
5316
- if (Array.isArray(n) ? s = bl(e, t) : t.additionalItems && K(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
5328
+ function bl(e, t) {
5329
+ let n = xl(e, t), r = Sl(e, "maxItems", t), i = Sl(e, "minItems", t), a = Cl(e, t), o = t.uniqueItems, s;
5330
+ if (Array.isArray(n) ? s = wl(e, t) : t.additionalItems && K(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
5317
5331
  let c = !1, l = !1;
5318
5332
  if (Array.isArray(n)) {
5319
- r !== void 0 && r <= n.length && (n = n.splice(r), s = xl(s, e.delegate));
5333
+ r !== void 0 && r <= n.length && (n = n.splice(r), s = Tl(s, e.delegate));
5320
5334
  let t = n.findIndex((e) => J(e) === q.Never);
5321
- t !== -1 && (n = n.splice(t), s = xl(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (K(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && J(s) === q.Never && (c = !0);
5335
+ t !== -1 && (n = n.splice(t), s = Tl(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (K(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && J(s) === q.Never && (c = !0);
5322
5336
  } else J(n) === q.Never && (c = !0);
5323
- return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array, tl({
5337
+ return r !== void 0 && i !== void 0 && r < i && (l || K(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Y(c ? q.Never : q.Array, al({
5324
5338
  type: "array",
5325
5339
  items: n,
5326
5340
  contains: a,
@@ -5330,12 +5344,12 @@ function gl(e, t) {
5330
5344
  additionalItems: s
5331
5345
  }), e.delegate, e.path);
5332
5346
  }
5333
- function _l(e, { items: t }) {
5347
+ function xl(e, { items: t }) {
5334
5348
  if (!t) return Y(q.Any, {}, e.delegate, e.path);
5335
5349
  if (Array.isArray(t)) {
5336
5350
  let n = [], r = !1;
5337
5351
  for (let [i, a] of t.entries()) {
5338
- let t = Z(G(e, "items", i), Qc(a));
5352
+ let t = Z(G(e, "items", i), nl(a));
5339
5353
  if (!t) {
5340
5354
  r = !0;
5341
5355
  continue;
@@ -5344,9 +5358,9 @@ function _l(e, { items: t }) {
5344
5358
  }
5345
5359
  return r ? null : n;
5346
5360
  }
5347
- return Z(G(e, "items"), Qc(t));
5361
+ return Z(G(e, "items"), nl(t));
5348
5362
  }
5349
- function vl(e, t, n) {
5363
+ function Sl(e, t, n) {
5350
5364
  let r = n[t];
5351
5365
  if (r !== void 0) {
5352
5366
  if (Number.isNaN(r)) {
@@ -5360,35 +5374,35 @@ function vl(e, t, n) {
5360
5374
  return r;
5361
5375
  }
5362
5376
  }
5363
- function yl(e, { contains: t }) {
5364
- return t ? Z(G(e, "contains"), Qc(t)) : Y(q.Any, {}, e.delegate, e.path);
5377
+ function Cl(e, { contains: t }) {
5378
+ return t ? Z(G(e, "contains"), nl(t)) : Y(q.Any, {}, e.delegate, e.path);
5365
5379
  }
5366
- function bl(e, { additionalItems: t }) {
5380
+ function wl(e, { additionalItems: t }) {
5367
5381
  switch (typeof t) {
5368
5382
  case "boolean": return t ? Y(q.Any, {}, e.delegate, e.path) : !1;
5369
5383
  case "object": return Z(G(e, "additionalItems"), t);
5370
5384
  default: return Y(q.Any, {}, e.delegate, e.path);
5371
5385
  }
5372
5386
  }
5373
- function xl(e, t) {
5387
+ function Tl(e, t) {
5374
5388
  return e === void 0 ? Y(q.Never, {
5375
5389
  type: "string",
5376
5390
  maxLength: 0,
5377
5391
  minLength: 1
5378
- }, t) : ul(e) ? J(e) === q.Never ? e : ml(e) : e;
5392
+ }, t) : ml(e) ? J(e) === q.Never ? e : vl(e) : e;
5379
5393
  }
5380
5394
  //#endregion
5381
5395
  //#region src/json-schema-subset/compiler/combination.ts
5382
- var Sl = Object.freeze([
5396
+ var El = Object.freeze([
5383
5397
  "allOf",
5384
5398
  "anyOf",
5385
5399
  "oneOf"
5386
5400
  ]);
5387
- function Cl(e, t, n, r) {
5388
- if (n.length === 0) return $c(e, "disable empty list", t), null;
5401
+ function Dl(e, t, n, r) {
5402
+ if (n.length === 0) return rl(e, "disable empty list", t), null;
5389
5403
  let i = [];
5390
5404
  for (let [r, a] of n.entries()) {
5391
- let n = Z(G(e, t, r), Qc(a));
5405
+ let n = Z(G(e, t, r), nl(a));
5392
5406
  n && i.push(n);
5393
5407
  }
5394
5408
  if (i.length < n.length) return null;
@@ -5402,7 +5416,7 @@ function Cl(e, t, n, r) {
5402
5416
  let s = q.Combination;
5403
5417
  switch (t) {
5404
5418
  case "allOf":
5405
- o > 0 ? s = q.Never : a === i.length ? s = q.Any : wl(i) || (s = q.Never);
5419
+ o > 0 ? s = q.Never : a === i.length ? s = q.Any : Ol(i) || (s = q.Never);
5406
5420
  break;
5407
5421
  case "anyOf":
5408
5422
  a > 0 ? s = q.Any : o === i.length && (s = q.Never);
@@ -5411,7 +5425,7 @@ function Cl(e, t, n, r) {
5411
5425
  }
5412
5426
  return Y(s, { [t]: i }, r, e.path);
5413
5427
  }
5414
- function wl(e) {
5428
+ function Ol(e) {
5415
5429
  let t = null;
5416
5430
  for (let n of e) {
5417
5431
  let e = J(n);
@@ -5431,30 +5445,30 @@ var X = Object.freeze({
5431
5445
  Invalid: 1,
5432
5446
  Unknown: 2
5433
5447
  });
5434
- function Tl(e, t) {
5448
+ function kl(e, t) {
5435
5449
  let n = e.isValid;
5436
5450
  return n ? n(t) === !0 ? X.Valid : X.Invalid : X.Unknown;
5437
5451
  }
5438
5452
  //#endregion
5439
5453
  //#region src/json-schema-subset/compiler/enumAndConst.ts
5440
- function El(e, t, n, r) {
5454
+ function Al(e, t, n, r) {
5441
5455
  let i, a = !1;
5442
5456
  if (t) {
5443
- if (t.length === 0) return $c(e, "disable empty list", "enum"), null;
5457
+ if (t.length === 0) return rl(e, "disable empty list", "enum"), null;
5444
5458
  i = [];
5445
- for (let [n, a] of t.entries()) switch (Tl(r, a)) {
5459
+ for (let [n, a] of t.entries()) switch (kl(r, a)) {
5446
5460
  case X.Valid:
5447
- i.push(pl(a));
5461
+ i.push(_l(a));
5448
5462
  break;
5449
5463
  case X.Invalid: K(e, "cannot pass JSON schema of currently schema object", "enum", n);
5450
5464
  }
5451
5465
  i.length === 0 && K(e, "all of elements from list is rejected by currently schema object", "enum");
5452
5466
  }
5453
- if (n && Tl(r, n) === X.Invalid && (a = !0), i) {
5467
+ if (n && kl(r, n) === X.Invalid && (a = !0), i) {
5454
5468
  if (i.length === 0) a = !0;
5455
5469
  else if (n) {
5456
5470
  let e = !1;
5457
- for (let t of i) if (wc(t, n)) {
5471
+ for (let t of i) if (Oc(t, n)) {
5458
5472
  e = !0;
5459
5473
  break;
5460
5474
  }
@@ -5462,11 +5476,11 @@ function El(e, t, n, r) {
5462
5476
  }
5463
5477
  }
5464
5478
  let o = a ? q.Never : q.EnumOrConst, s = {};
5465
- return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = pl(Cc(n))), Y(o, s, e.delegate, e.path);
5479
+ return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = _l(Dc(n))), Y(o, s, e.delegate, e.path);
5466
5480
  }
5467
5481
  //#endregion
5468
5482
  //#region src/json-schema-subset/compiler/object.ts
5469
- var Dl = /* @__PURE__ */ new Set([
5483
+ var jl = /* @__PURE__ */ new Set([
5470
5484
  "type",
5471
5485
  "maxProperties",
5472
5486
  "minProperties",
@@ -5477,27 +5491,27 @@ var Dl = /* @__PURE__ */ new Set([
5477
5491
  "dependencies",
5478
5492
  "propertyNames"
5479
5493
  ]);
5480
- function Ol(e, t) {
5481
- let n = Object.keys(t).filter((e) => !Dl.has(e) && Xc(e));
5494
+ function Ml(e, t) {
5495
+ let n = Object.keys(t).filter((e) => !jl.has(e) && el(e));
5482
5496
  n.length > 0 && K(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
5483
- let r = kl(e, "maxProperties", t), i = kl(e, "minProperties", t), a = Al(e, t), o = jl(e, t), s = Ml(e, t), c = Pl(e, t);
5497
+ let r = Nl(e, "maxProperties", t), i = Nl(e, "minProperties", t), a = Pl(e, t), o = Fl(e, t), s = Il(e, t), c = Rl(e, t);
5484
5498
  if (!a || !o || !s || !c) return null;
5485
- let l = Nl(e, o, s, t);
5499
+ let l = Ll(e, o, s, t);
5486
5500
  if (!l) return null;
5487
- let u = Il(e, Fl(a, o, s, l), c, t);
5488
- return Y(Ll(e, a, l, u, r, i) ? q.Never : q.Object, tl({
5501
+ let u = Bl(e, zl(a, o, s, l), c, t);
5502
+ return Y(Vl(e, a, l, u, r, i) ? q.Never : q.Object, al({
5489
5503
  type: "object",
5490
5504
  required: u,
5491
5505
  properties: l,
5492
5506
  minProperties: i,
5493
5507
  maxProperties: r,
5494
5508
  additionalProperties: a,
5495
- patternProperties: Hl(o),
5496
- dependencies: Ul(c, t),
5509
+ patternProperties: Kl(o),
5510
+ dependencies: ql(c, t),
5497
5511
  propertyNames: s
5498
5512
  }), e.delegate, e.path);
5499
5513
  }
5500
- function kl(e, t, n) {
5514
+ function Nl(e, t, n) {
5501
5515
  let r = n[t];
5502
5516
  if (r !== void 0) {
5503
5517
  if (Number.isNaN(r)) {
@@ -5511,22 +5525,22 @@ function kl(e, t, n) {
5511
5525
  return r;
5512
5526
  }
5513
5527
  }
5514
- function Al(e, { additionalProperties: t }) {
5528
+ function Pl(e, { additionalProperties: t }) {
5515
5529
  return t === !1 ? Y(q.Never, {
5516
5530
  type: "string",
5517
5531
  maxLength: 0,
5518
5532
  minLength: 1
5519
- }, e.delegate, e.path) : typeof t == "object" ? Z(G(e, "additionalProperties"), Qc(t)) : Y(q.Any, {}, e.delegate, e.path);
5533
+ }, e.delegate, e.path) : typeof t == "object" ? Z(G(e, "additionalProperties"), nl(t)) : Y(q.Any, {}, e.delegate, e.path);
5520
5534
  }
5521
- function jl(e, { patternProperties: t }) {
5535
+ function Fl(e, { patternProperties: t }) {
5522
5536
  let n = !1, r = {};
5523
5537
  for (let i in t) {
5524
- let a = Vl(i);
5538
+ let a = Gl(i);
5525
5539
  if (a instanceof Error) {
5526
5540
  K(e, `property name invalid. ${i}`, "patternProperties", i);
5527
5541
  continue;
5528
5542
  }
5529
- let o = Qc(t[i]), s = Z(G(e, "patternProperties", i), o);
5543
+ let o = nl(t[i]), s = Z(G(e, "patternProperties", i), o);
5530
5544
  if (!s) {
5531
5545
  n = !0;
5532
5546
  continue;
@@ -5535,29 +5549,29 @@ function jl(e, { patternProperties: t }) {
5535
5549
  }
5536
5550
  return n ? null : r;
5537
5551
  }
5538
- function Ml(e, { propertyNames: t }) {
5552
+ function Il(e, { propertyNames: t }) {
5539
5553
  if (!t) return Y(q.Any, {}, e.delegate, e.path);
5540
- t = Qc(t);
5554
+ t = nl(t);
5541
5555
  let n = Z(G(e, "propertyNames"), t);
5542
5556
  if (!n) return null;
5543
5557
  let r = J(n);
5544
- return r !== q.String && r !== q.Any ? ml(n) : n;
5558
+ return r !== q.String && r !== q.Any ? vl(n) : n;
5545
5559
  }
5546
- function Nl(e, t, n, { properties: r }) {
5560
+ function Ll(e, t, n, { properties: r }) {
5547
5561
  let i = !1;
5548
5562
  if (!r) return {};
5549
5563
  let a = {};
5550
5564
  for (let o in r) {
5551
- if (Tl(n, o) === X.Invalid) {
5565
+ if (kl(n, o) === X.Invalid) {
5552
5566
  K(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
5553
5567
  continue;
5554
5568
  }
5555
- let s = Bl(t, o);
5569
+ let s = Wl(t, o);
5556
5570
  if (s && J(s) === q.Never) {
5557
5571
  K(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
5558
5572
  continue;
5559
5573
  }
5560
- let c = Qc(r[o]), l = Z(G(e, "properties", o), c);
5574
+ let c = nl(r[o]), l = Z(G(e, "properties", o), c);
5561
5575
  if (!l) {
5562
5576
  i = !0;
5563
5577
  continue;
@@ -5566,40 +5580,40 @@ function Nl(e, t, n, { properties: r }) {
5566
5580
  }
5567
5581
  return i ? null : a;
5568
5582
  }
5569
- function Pl(e, { dependencies: t }) {
5583
+ function Rl(e, { dependencies: t }) {
5570
5584
  if (!t) return [{}, {}];
5571
5585
  let n = {}, r = {};
5572
5586
  for (let i in t) {
5573
- let a = Qc(t[i]);
5587
+ let a = nl(t[i]);
5574
5588
  if (Array.isArray(a)) {
5575
- let { keys: t, duplicated: r } = zl(a);
5589
+ let { keys: t, duplicated: r } = Ul(a);
5576
5590
  r && K(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
5577
5591
  } else {
5578
5592
  let t = Z(G(e, "dependencies", i), a);
5579
5593
  if (t) {
5580
5594
  let e = J(t);
5581
- r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ? cl : ml(t);
5595
+ r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ? fl : vl(t);
5582
5596
  }
5583
5597
  }
5584
5598
  }
5585
5599
  return [n, r];
5586
5600
  }
5587
- function Fl(e, t, n, r) {
5601
+ function zl(e, t, n, r) {
5588
5602
  return (i) => {
5589
- if (Tl(n, i) === X.Invalid) return !0;
5590
- let a = Bl(t, i);
5603
+ if (kl(n, i) === X.Invalid) return !0;
5604
+ let a = Wl(t, i);
5591
5605
  return !!(a && J(a) === q.Never || J(r[i] ?? e) === q.Never);
5592
5606
  };
5593
5607
  }
5594
- function Il(e, t, n, { required: r }) {
5608
+ function Bl(e, t, n, { required: r }) {
5595
5609
  if (!r) return [];
5596
- let i = zl(r);
5610
+ let i = Ul(r);
5597
5611
  i.duplicated && K(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
5598
5612
  let a = [], o = [];
5599
- for (let e of i.keys) Rl(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
5613
+ for (let e of i.keys) Hl(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
5600
5614
  return o.length > 0 && K(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
5601
5615
  }
5602
- function Ll(e, t, n, r, i, a) {
5616
+ function Vl(e, t, n, r, i, a) {
5603
5617
  if (i !== void 0 && a !== void 0 && i < a) return K(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
5604
5618
  if (i !== void 0 && r.length > i) return K(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
5605
5619
  if (a !== void 0 && r.length < a) return K(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
@@ -5610,7 +5624,7 @@ function Ll(e, t, n, r, i, a) {
5610
5624
  }
5611
5625
  return !0;
5612
5626
  }
5613
- function Rl([e, t], n) {
5627
+ function Hl([e, t], n) {
5614
5628
  let r = [n], i = new Set(r);
5615
5629
  for (; r.length > 0;) {
5616
5630
  let n = r.pop(), i = t[n], o = e[n];
@@ -5621,7 +5635,7 @@ function Rl([e, t], n) {
5621
5635
  }
5622
5636
  return [...i];
5623
5637
  }
5624
- function zl(e) {
5638
+ function Ul(e) {
5625
5639
  let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
5626
5640
  for (let r of e) t.has(r) ? n.add(r) : t.add(r);
5627
5641
  return n.size === 0 ? {
@@ -5632,14 +5646,14 @@ function zl(e) {
5632
5646
  duplicated: [...n]
5633
5647
  };
5634
5648
  }
5635
- function Bl(e, t) {
5649
+ function Wl(e, t) {
5636
5650
  for (let n in e) {
5637
5651
  let [r, i] = e[n];
5638
5652
  if (i.test(t)) return r;
5639
5653
  }
5640
5654
  return null;
5641
5655
  }
5642
- function Vl(e) {
5656
+ function Gl(e) {
5643
5657
  try {
5644
5658
  return new RegExp(e, "i");
5645
5659
  } catch (e) {
@@ -5647,12 +5661,12 @@ function Vl(e) {
5647
5661
  throw e;
5648
5662
  }
5649
5663
  }
5650
- function Hl(e) {
5664
+ function Kl(e) {
5651
5665
  let t = {};
5652
5666
  for (let n in e) t[n] = e[n][0];
5653
5667
  return t;
5654
5668
  }
5655
- function Ul([e, t], { dependencies: n }) {
5669
+ function ql([e, t], { dependencies: n }) {
5656
5670
  let r = {};
5657
5671
  for (let i in n) {
5658
5672
  let n = e[i], a = t[i];
@@ -5662,38 +5676,38 @@ function Ul([e, t], { dependencies: n }) {
5662
5676
  }
5663
5677
  //#endregion
5664
5678
  //#region src/json-schema-subset/compiler/primitive.ts
5665
- var Wl = /* @__PURE__ */ new Set([
5679
+ var Jl = /* @__PURE__ */ new Set([
5666
5680
  "type",
5667
5681
  "multipleOf",
5668
5682
  "maximum",
5669
5683
  "exclusiveMaximum",
5670
5684
  "minimum",
5671
5685
  "exclusiveMinimum"
5672
- ]), Gl = /* @__PURE__ */ new Set([
5686
+ ]), Yl = /* @__PURE__ */ new Set([
5673
5687
  "type",
5674
5688
  "maxLength",
5675
5689
  "minLength",
5676
5690
  "pattern"
5677
5691
  ]);
5678
- function Kl(e, t) {
5692
+ function Xl(e, t) {
5679
5693
  let { type: n } = t;
5680
5694
  switch (n) {
5681
5695
  case "number":
5682
- case "integer": return ql(e, t);
5683
- case "string": return Yl(e, t);
5696
+ case "integer": return Zl(e, t);
5697
+ case "string": return $l(e, t);
5684
5698
  case "boolean":
5685
5699
  case "null": {
5686
- let r = Object.keys(t).filter((e) => Xc(e) && e !== "type");
5700
+ let r = Object.keys(t).filter((e) => el(e) && e !== "type");
5687
5701
  return r.length > 0 && K(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Y(n === "null" ? q.Null : q.Boolean, { type: n }, e.delegate, e.path);
5688
5702
  }
5689
- default: return $c(e, `invalid type ${JSON.stringify(n)}`), null;
5703
+ default: return rl(e, `invalid type ${JSON.stringify(n)}`), null;
5690
5704
  }
5691
5705
  }
5692
- function ql(e, t) {
5693
- let n = Object.keys(t).filter((e) => !Wl.has(e) && Xc(e));
5706
+ function Zl(e, t) {
5707
+ let n = Object.keys(t).filter((e) => !Jl.has(e) && el(e));
5694
5708
  n.length > 0 && K(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
5695
- let r = Sc(t, Wl);
5696
- for (let t of Wl) {
5709
+ let r = Ec(t, Jl);
5710
+ for (let t of Jl) {
5697
5711
  let n = r[t];
5698
5712
  t !== "type" && n !== void 0 && Number.isNaN(n) && (K(e, "found NaN", t), delete r[t]);
5699
5713
  }
@@ -5702,38 +5716,38 @@ function ql(e, t) {
5702
5716
  let { multipleOf: c } = r;
5703
5717
  c === 0 && (delete r.multipleOf, r.type = "number", K(e, "cannot be 0", "multipleOf"));
5704
5718
  let l = q.Numeric;
5705
- return Jl(r) || (l = q.Never), Y(l, r, e.delegate, e.path);
5719
+ return Ql(r) || (l = q.Never), Y(l, r, e.delegate, e.path);
5706
5720
  }
5707
- function Jl(e) {
5721
+ function Ql(e) {
5708
5722
  let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
5709
5723
  return t !== void 0 && r !== void 0 ? t >= r : n !== void 0 && r !== void 0 ? n > r : t !== void 0 && i !== void 0 ? t > i : n !== void 0 && i !== void 0 ? n > i : !0;
5710
5724
  }
5711
- function Yl(e, t) {
5712
- let n = Object.keys(t).filter((e) => !Gl.has(e) && Xc(e));
5725
+ function $l(e, t) {
5726
+ let n = Object.keys(t).filter((e) => !Yl.has(e) && el(e));
5713
5727
  n.length > 0 && K(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
5714
- let r = Sc(t, Gl);
5715
- Xl(e, r, "maxLength"), Xl(e, r, "minLength");
5728
+ let r = Ec(t, Yl);
5729
+ eu(e, r, "maxLength"), eu(e, r, "minLength");
5716
5730
  let i = r.maxLength, a = r.minLength, o = q.String;
5717
5731
  return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = q.Never), Y(o, r, e.delegate, e.path);
5718
5732
  }
5719
- function Xl(e, t, n) {
5733
+ function eu(e, t, n) {
5720
5734
  let r = t[n];
5721
5735
  r !== void 0 && Number.isNaN(r) && (K(e, "found NaN", n), delete t[n]);
5722
5736
  }
5723
5737
  //#endregion
5724
5738
  //#region src/json-schema-subset/compiler/compiler.ts
5725
- var Zl = Object.freeze([]);
5726
- function Ql(e, t, n, r) {
5727
- if (ul(e) || t.isExtendsSchema(e)) return {
5739
+ var tu = Object.freeze([]);
5740
+ function nu(e, t, n, r) {
5741
+ if (ml(e) || t.isExtendsSchema(e)) return {
5728
5742
  schema: e,
5729
- warns: Zl
5743
+ warns: tu
5730
5744
  };
5731
5745
  if (r) {
5732
5746
  let t = r.isSchema(e);
5733
5747
  if (typeof t == "object") {
5734
5748
  let e = [];
5735
5749
  for (let n of t) e.push({
5736
- kind: Kc.External,
5750
+ kind: Xc.External,
5737
5751
  error: n
5738
5752
  });
5739
5753
  if (e.length > 0) return e;
@@ -5747,18 +5761,18 @@ function Ql(e, t, n, r) {
5747
5761
  errors: [],
5748
5762
  warns: []
5749
5763
  }, a = Z(i, e);
5750
- if (a) $l(i.errors.length === 0, "found errors (it should be empty)");
5751
- else return $l(i.errors.length > 0, "cannot found any errors"), i.errors;
5764
+ if (a) ru(i.errors.length === 0, "found errors (it should be empty)");
5765
+ else return ru(i.errors.length > 0, "cannot found any errors"), i.errors;
5752
5766
  return {
5753
5767
  schema: a,
5754
5768
  warns: i.warns
5755
5769
  };
5756
5770
  }
5757
- function $l(e, t) {
5771
+ function ru(e, t) {
5758
5772
  if (!e) throw Error(t);
5759
5773
  }
5760
5774
  function Z(e, t) {
5761
- if (e.extends.isExtendsSchema(t) || ul(t)) return t;
5775
+ if (e.extends.isExtendsSchema(t) || ml(t)) return t;
5762
5776
  let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
5763
5777
  if (n) return n;
5764
5778
  let r = t, i = !1, { enum: a, const: o } = t;
@@ -5766,21 +5780,21 @@ function Z(e, t) {
5766
5780
  let { enum: e, const: n, ...a } = t;
5767
5781
  r = a, i = !0;
5768
5782
  }
5769
- let s = eu(e, r);
5770
- return s && i && (s = El(e, a, o, s)), s || null;
5783
+ let s = iu(e, r);
5784
+ return s && i && (s = Al(e, a, o, s)), s || null;
5771
5785
  }
5772
- function eu(e, t) {
5773
- for (let n of Sl) {
5786
+ function iu(e, t) {
5787
+ for (let n of El) {
5774
5788
  let r = t[n];
5775
5789
  if (r) {
5776
- let i = Object.keys(t).filter((e) => Xc(e) && e !== n);
5777
- return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), Cl(e, n, r) || null;
5790
+ let i = Object.keys(t).filter((e) => el(e) && e !== n);
5791
+ return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), Dl(e, n, r) || null;
5778
5792
  }
5779
5793
  }
5780
5794
  {
5781
- let n = Qc(t.not);
5795
+ let n = nl(t.not);
5782
5796
  if (n) {
5783
- let r = Object.keys(t).filter((e) => Xc(e) && e !== "not");
5797
+ let r = Object.keys(t).filter((e) => el(e) && e !== "not");
5784
5798
  r.length > 0 && K(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
5785
5799
  let i = Z(G(e, "not"), n);
5786
5800
  if (!i) return null;
@@ -5798,26 +5812,26 @@ function eu(e, t) {
5798
5812
  let { type: n } = t;
5799
5813
  if (Array.isArray(n)) {
5800
5814
  let { type: r, ...i } = t;
5801
- return Cl(e, "anyOf", n.map((e) => ({
5815
+ return Dl(e, "anyOf", n.map((e) => ({
5802
5816
  ...i,
5803
5817
  type: e
5804
5818
  })));
5805
5819
  }
5806
5820
  switch (n) {
5807
- case "object": return Ol(e, t);
5808
- case "array": return gl(e, t);
5809
- default: return Kl(e, t);
5821
+ case "object": return Ml(e, t);
5822
+ case "array": return bl(e, t);
5823
+ default: return Xl(e, t);
5810
5824
  }
5811
5825
  }
5812
- return Zc(t) ? Y(q.Any, {}, e.delegate, e.path) : ($c(e, "unrecognized"), null);
5826
+ return tl(t) ? Y(q.Any, {}, e.delegate, e.path) : (rl(e, "unrecognized"), null);
5813
5827
  }
5814
5828
  //#endregion
5815
5829
  //#region src/json-schema-subset/checker/tools/mark.ts
5816
- var tu = class {
5830
+ var au = class {
5817
5831
  constructor(e) {
5818
5832
  let t = Object.freeze(e.toSorted());
5819
5833
  if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
5820
- this.keys = t, this.clazz = class extends nu {
5834
+ this.keys = t, this.clazz = class extends ou {
5821
5835
  constructor(e) {
5822
5836
  super(t, e);
5823
5837
  }
@@ -5841,7 +5855,7 @@ var tu = class {
5841
5855
  else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
5842
5856
  return new this.clazz(t);
5843
5857
  }
5844
- }, nu = class {
5858
+ }, ou = class {
5845
5859
  constructor(e, t) {
5846
5860
  this.keys = e, this.int32 = t;
5847
5861
  }
@@ -5856,21 +5870,21 @@ var tu = class {
5856
5870
  };
5857
5871
  //#endregion
5858
5872
  //#region src/json-schema-subset/checker/tools/quantum.ts
5859
- function ru(e) {
5860
- return new iu(e);
5873
+ function su(e) {
5874
+ return new cu(e);
5861
5875
  }
5862
- var iu = class {
5876
+ var cu = class {
5863
5877
  constructor(e) {
5864
- this.description = new tu(e);
5878
+ this.description = new au(e);
5865
5879
  }
5866
5880
  get keys() {
5867
5881
  return this.description.keys;
5868
5882
  }
5869
5883
  variable(e) {
5870
5884
  let t;
5871
- return e && (t = this.description.toBundle(e).toInt32()), new au(this.description, t);
5885
+ return e && (t = this.description.toBundle(e).toInt32()), new lu(this.description, t);
5872
5886
  }
5873
- }, au = class {
5887
+ }, lu = class {
5874
5888
  constructor(e, t) {
5875
5889
  this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
5876
5890
  }
@@ -5891,7 +5905,7 @@ var iu = class {
5891
5905
  }
5892
5906
  push(e, t) {
5893
5907
  let n = /* @__PURE__ */ new Set();
5894
- for (let r of this.values) for (let [i, a] of Tc) if (e & a) {
5908
+ for (let r of this.values) for (let [i, a] of kc) if (e & a) {
5895
5909
  let e = this.description.toBundle(r);
5896
5910
  t(i, e), n.add(e.toInt32());
5897
5911
  }
@@ -5908,11 +5922,11 @@ var iu = class {
5908
5922
  };
5909
5923
  //#endregion
5910
5924
  //#region src/json-schema-subset/checker/tools/range.ts
5911
- function ou(e, t) {
5925
+ function uu(e, t) {
5912
5926
  let [n] = e, [r] = t;
5913
- return n.num < r.num ? su(e, t) : n.num > r.num ? cu(e, t) : lu(e, t);
5927
+ return n.num < r.num ? du(e, t) : n.num > r.num ? fu(e, t) : pu(e, t);
5914
5928
  }
5915
- function su(e, t) {
5929
+ function du(e, t) {
5916
5930
  let [n, r] = e, [i, a] = t;
5917
5931
  if (r.num <= i.num) {
5918
5932
  let n = r.exclusive, a = i.exclusive;
@@ -5960,7 +5974,7 @@ function su(e, t) {
5960
5974
  }
5961
5975
  };
5962
5976
  }
5963
- function cu(e, t) {
5977
+ function fu(e, t) {
5964
5978
  let [n, r] = e, [i, a] = t;
5965
5979
  if (n.num >= a.num) {
5966
5980
  let r = a.exclusive, i = n.exclusive;
@@ -6008,7 +6022,7 @@ function cu(e, t) {
6008
6022
  }
6009
6023
  };
6010
6024
  }
6011
- function lu(e, t) {
6025
+ function pu(e, t) {
6012
6026
  let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
6013
6027
  if (!o && s ? (l = i, c = {
6014
6028
  fromLeft: !0,
@@ -6051,8 +6065,8 @@ function Q(e) {
6051
6065
  }
6052
6066
  //#endregion
6053
6067
  //#region src/json-schema-subset/checker/range.ts
6054
- var uu = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6055
- let { left: a, center: o, right: s } = ou([{
6068
+ var mu = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6069
+ let { left: a, center: o, right: s } = uu([{
6056
6070
  num: t,
6057
6071
  exclusive: !1
6058
6072
  }, {
@@ -6082,24 +6096,24 @@ var uu = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6082
6096
  intersection: u
6083
6097
  };
6084
6098
  };
6085
- function du({ left: e, right: t, intersection: n }) {
6099
+ function hu({ left: e, right: t, intersection: n }) {
6086
6100
  if (!n) return L.Rejection;
6087
6101
  let r = !1, i = !1;
6088
6102
  return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? L.Intersection : r ? L.Containing : i ? L.ContainedBy : L.Equals;
6089
6103
  }
6090
6104
  //#endregion
6091
6105
  //#region src/json-schema-subset/checker/array.ts
6092
- var fu = uu(0), pu = ru([
6106
+ var gu = mu(0), _u = su([
6093
6107
  "hasCommon",
6094
6108
  "hasExtra1",
6095
6109
  "hasExtra2",
6096
6110
  "hasRejection",
6097
6111
  "hasCommonBroken"
6098
6112
  ]);
6099
- function mu({ calculate: e }, t, n) {
6100
- let r = fu(t.minItems, t.maxItems, n.minItems, n.maxItems), i = du(r);
6113
+ function vu({ calculate: e }, t, n) {
6114
+ let r = gu(t.minItems, t.maxItems, n.minItems, n.maxItems), i = hu(r);
6101
6115
  if (i === L.Rejection) return V;
6102
- let [a, o] = hu(t), [s, c] = hu(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = pu.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
6116
+ let [a, o] = yu(t), [s, c] = yu(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = _u.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
6103
6117
  for (let t = 0; t < u; t++) {
6104
6118
  let n = e(a[t] ?? o, s[t] ?? c);
6105
6119
  d.push(n, (e, n) => {
@@ -6139,69 +6153,69 @@ function mu({ calculate: e }, t, n) {
6139
6153
  }
6140
6154
  return p;
6141
6155
  }
6142
- function hu({ items: e, additionalItems: t }) {
6143
- return Array.isArray(e) ? [e, t ?? sl] : [[], e ?? sl];
6156
+ function yu({ items: e, additionalItems: t }) {
6157
+ return Array.isArray(e) ? [e, t ?? dl] : [[], e ?? dl];
6144
6158
  }
6145
6159
  //#endregion
6146
6160
  //#region src/json-schema-subset/checker/cache.ts
6147
- function gu(e) {
6161
+ function bu(e) {
6148
6162
  let t = /* @__PURE__ */ new Map();
6149
6163
  return (n, r) => {
6150
- let i = ll(n);
6151
- return i === ll(r) ? i ? vu(t, n, r, e) : n === r : !1;
6164
+ let i = pl(n);
6165
+ return i === pl(r) ? i ? Su(t, n, r, e) : n === r : !1;
6152
6166
  };
6153
6167
  }
6154
- function _u(e) {
6168
+ function xu(e) {
6155
6169
  let t = /* @__PURE__ */ new Map();
6156
- return (n, r) => vu(t, n, r, e);
6170
+ return (n, r) => Su(t, n, r, e);
6157
6171
  }
6158
- function vu(e, t, n, r) {
6159
- let i = `${dl(t)}/${dl(n)}`, a = e.get(i);
6172
+ function Su(e, t, n, r) {
6173
+ let i = `${hl(t)}/${hl(n)}`, a = e.get(i);
6160
6174
  return a === void 0 && e.set(i, a = r(t, n)), a;
6161
6175
  }
6162
6176
  //#endregion
6163
6177
  //#region src/json-schema-subset/checker/enumAndConst.ts
6164
- function yu(e, t, n) {
6165
- let r = xu(t), i = xu(n), a = !1, o = !1, s = !1;
6166
- for (let t of r) if (Su(e, i, t) ? s = !0 : a = !0, a && s) break;
6167
- for (let t of i) if (Su(e, r, t) ? s = !0 : o = !0, o && s) break;
6178
+ function Cu(e, t, n) {
6179
+ let r = Tu(t), i = Tu(n), a = !1, o = !1, s = !1;
6180
+ for (let t of r) if (Eu(e, i, t) ? s = !0 : a = !0, a && s) break;
6181
+ for (let t of i) if (Eu(e, r, t) ? s = !0 : o = !0, o && s) break;
6168
6182
  return s ? a && o ? H : a ? z : o ? B : R : V;
6169
6183
  }
6170
- function bu(e, t) {
6184
+ function wu(e, t) {
6171
6185
  let n = !1, r = !1;
6172
- for (let i of xu(e)) {
6173
- switch (Tl(t, i)) {
6186
+ for (let i of Tu(e)) {
6187
+ switch (kl(t, i)) {
6174
6188
  case X.Valid:
6175
6189
  n = !0;
6176
6190
  break;
6177
6191
  case X.Invalid:
6178
6192
  r = !0;
6179
6193
  break;
6180
- case X.Unknown: return Ec;
6194
+ case X.Unknown: return Ac;
6181
6195
  }
6182
6196
  if (n && r) break;
6183
6197
  }
6184
6198
  return n && r ? H : n ? R | B : r ? V : J(t) === q.Never ? R : B;
6185
6199
  }
6186
- function xu({ const: e, enum: t }) {
6200
+ function Tu({ const: e, enum: t }) {
6187
6201
  if (e !== void 0) return [e];
6188
6202
  if (t) return t;
6189
6203
  throw Error("invalid branch");
6190
6204
  }
6191
- function Su({ isEquals: e }, t, n) {
6205
+ function Eu({ isEquals: e }, t, n) {
6192
6206
  for (let r of t) if (e(r, n)) return !0;
6193
6207
  return !1;
6194
6208
  }
6195
6209
  //#endregion
6196
6210
  //#region src/json-schema-subset/checker/equals.ts
6197
- function Cu(e) {
6211
+ function Du(e) {
6198
6212
  function t(t, n) {
6199
6213
  let i = e.isExtendsSchema(t), a = e.isExtendsSchema(n);
6200
6214
  return i || a ? e.equals(t, n) : r(t, n);
6201
6215
  }
6202
6216
  let n = /* @__PURE__ */ new Map();
6203
6217
  function r(e, t) {
6204
- let r = dl(e), a = dl(t);
6218
+ let r = hl(e), a = hl(t);
6205
6219
  if (r === a) return !0;
6206
6220
  let o = `${r}/${a}`, s = n.get(o);
6207
6221
  return s === void 0 && (s = i(e, t), n.set(o, s)), s;
@@ -6218,25 +6232,25 @@ function Cu(e) {
6218
6232
  return !0;
6219
6233
  }
6220
6234
  function a(e, t) {
6221
- return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : ul(e) && ul(t) ? r(e, t) : i(e, t);
6235
+ return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : ml(e) && ml(t) ? r(e, t) : i(e, t);
6222
6236
  }
6223
6237
  return t;
6224
6238
  }
6225
6239
  //#endregion
6226
6240
  //#region src/json-schema-subset/checker/numeric/integerNormalizer.ts
6227
- function wu(e) {
6228
- let t = ju(e), n = e.multipleOf ?? 1, r = Eu(t, n);
6241
+ function Ou(e) {
6242
+ let t = Fu(e), n = e.multipleOf ?? 1, r = Au(t, n);
6229
6243
  return r ? {
6230
6244
  multipleOf: n,
6231
6245
  range: r
6232
6246
  } : null;
6233
6247
  }
6234
- function Tu([e, t]) {
6248
+ function ku([e, t]) {
6235
6249
  return !(e.num !== t.num || e.exclusive || t.exclusive);
6236
6250
  }
6237
- function Eu(e, t) {
6251
+ function Au(e, t) {
6238
6252
  if (!e) return;
6239
- let [n, r] = e, i = Du(n.num, t), a = Ou(r.num, t);
6253
+ let [n, r] = e, i = ju(n.num, t), a = Mu(r.num, t);
6240
6254
  if (i === n.num && n.exclusive && (i += t), a === r.num && r.exclusive && (a -= t), !(i > a) && (i !== a || i !== Infinity && i !== -Infinity)) return [{
6241
6255
  num: i,
6242
6256
  exclusive: !1
@@ -6245,29 +6259,29 @@ function Eu(e, t) {
6245
6259
  exclusive: !1
6246
6260
  }];
6247
6261
  }
6248
- function Du(e, t) {
6262
+ function ju(e, t) {
6249
6263
  return Math.ceil(e / t) * t;
6250
6264
  }
6251
- function Ou(e, t) {
6265
+ function Mu(e, t) {
6252
6266
  return Math.floor(e / t) * t;
6253
6267
  }
6254
6268
  //#endregion
6255
6269
  //#region src/json-schema-subset/checker/numeric/float.ts
6256
- function ku(e, t) {
6257
- let { left: n, right: r, center: i } = ou(ju(e), ju(t));
6270
+ function Nu(e, t) {
6271
+ let { left: n, right: r, center: i } = uu(Fu(e), Fu(t));
6258
6272
  if (!i) return V;
6259
6273
  let a = !1, o = !1;
6260
6274
  return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? H : a ? z : o ? B : R;
6261
6275
  }
6262
- function Au(e, t) {
6263
- let n = ju(e), r = wu(t);
6276
+ function Pu(e, t) {
6277
+ let n = Fu(e), r = Ou(t);
6264
6278
  if (!r) return z;
6265
- let i = ou(n, r.range), a = Eu(i.center, r.multipleOf), o = Mu(i.left, r.multipleOf), s = Mu(i.right, r.multipleOf);
6279
+ let i = uu(n, r.range), a = Au(i.center, r.multipleOf), o = Iu(i.left, r.multipleOf), s = Iu(i.right, r.multipleOf);
6266
6280
  if (!i.center) return V;
6267
6281
  let c = !1, l = !1;
6268
- return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !Tu(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? H : c ? z : l ? B : R;
6282
+ return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !ku(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? H : c ? z : l ? B : R;
6269
6283
  }
6270
- function ju(e) {
6284
+ function Fu(e) {
6271
6285
  let t, n;
6272
6286
  return t = e.exclusiveMinimum === void 0 ? e.minimum === void 0 ? {
6273
6287
  num: -Infinity,
@@ -6289,84 +6303,84 @@ function ju(e) {
6289
6303
  exclusive: !0
6290
6304
  }, [t, n];
6291
6305
  }
6292
- function Mu(e, t) {
6293
- if (e && !e.fromLeft) return Eu(e.range, t);
6306
+ function Iu(e, t) {
6307
+ if (e && !e.fromLeft) return Au(e.range, t);
6294
6308
  }
6295
6309
  //#endregion
6296
6310
  //#region src/json-schema-subset/checker/numeric/integer.ts
6297
- function Nu(e, t) {
6298
- let n = wu(e), r = wu(t);
6311
+ function Lu(e, t) {
6312
+ let n = Ou(e), r = Ou(t);
6299
6313
  if (!n && !r) return R;
6300
6314
  if (!n) return B;
6301
6315
  if (!r) return z;
6302
- let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = ou(i, o), l, u = 0;
6303
- if (c.center && (u = Fu(a, s), l = Eu(c.center, u)), !l) return V;
6316
+ let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = uu(i, o), l, u = 0;
6317
+ if (c.center && (u = zu(a, s), l = Au(c.center, u)), !l) return V;
6304
6318
  let d = !1, f = !1, { left: p, right: m } = c;
6305
- return p && Eu(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && Eu(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= Pu(n, l, u), f ||= Pu(r, l, u), d && f ? H : d ? z : f ? B : R;
6319
+ return p && Au(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && Au(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= Ru(n, l, u), f ||= Ru(r, l, u), d && f ? H : d ? z : f ? B : R;
6306
6320
  }
6307
- function Pu({ range: e, multipleOf: t }, n, r) {
6308
- let i = ou(e, n);
6309
- if (Eu(i.left?.range, t) || Eu(i.right?.range, t)) return !0;
6310
- let a = Eu(i.center, t);
6321
+ function Ru({ range: e, multipleOf: t }, n, r) {
6322
+ let i = uu(e, n);
6323
+ if (Au(i.left?.range, t) || Au(i.right?.range, t)) return !0;
6324
+ let a = Au(i.center, t);
6311
6325
  if (!a) return !1;
6312
- let o = Lu(n);
6313
- return Lu(a) > o || o !== 1 && t < r;
6326
+ let o = Vu(n);
6327
+ return Vu(a) > o || o !== 1 && t < r;
6314
6328
  }
6315
- function Fu(e, t) {
6316
- return e * t / Iu(e, t);
6329
+ function zu(e, t) {
6330
+ return e * t / Bu(e, t);
6317
6331
  }
6318
- function Iu(e, t) {
6319
- return e === 0 ? t : Iu(t % e, e);
6332
+ function Bu(e, t) {
6333
+ return e === 0 ? t : Bu(t % e, e);
6320
6334
  }
6321
- function Lu(e) {
6335
+ function Vu(e) {
6322
6336
  if (!e) return 0;
6323
6337
  let [t, n] = e;
6324
6338
  return n.num - t.num + 1;
6325
6339
  }
6326
6340
  //#endregion
6327
6341
  //#region src/json-schema-subset/checker/numeric/checker.ts
6328
- function Ru(e, t) {
6329
- if (zu(e) || zu(t)) return Ec;
6330
- let n = Bu(e), r = Bu(t);
6331
- return n && r ? ku(e, t) : n ? Au(e, t) : r ? Ic(Au(t, e)) : Nu(e, t);
6342
+ function Hu(e, t) {
6343
+ if (Uu(e) || Uu(t)) return Ac;
6344
+ let n = Wu(e), r = Wu(t);
6345
+ return n && r ? Nu(e, t) : n ? Pu(e, t) : r ? Bc(Pu(t, e)) : Lu(e, t);
6332
6346
  }
6333
- function zu(e) {
6347
+ function Uu(e) {
6334
6348
  let { multipleOf: t } = e;
6335
6349
  return t === void 0 ? !1 : !Number.isInteger(t) || t < 0;
6336
6350
  }
6337
- function Bu(e) {
6351
+ function Wu(e) {
6338
6352
  let { multipleOf: t } = e;
6339
6353
  return !(t !== void 0 && Number.isInteger(t) || e.type === "integer");
6340
6354
  }
6341
6355
  //#endregion
6342
6356
  //#region src/json-schema-subset/checker/object.ts
6343
- var Vu = uu(0), Hu = ru([
6357
+ var Gu = mu(0), Ku = su([
6344
6358
  "hasCommonInRequired",
6345
6359
  "hasCommonOutRequired",
6346
6360
  "hasExtra1",
6347
6361
  "hasExtra2",
6348
6362
  "hasRejection"
6349
6363
  ]);
6350
- function Uu(e, t, n) {
6351
- if (Wu(t, n)) return V;
6352
- let r = Gu(t, n);
6364
+ function qu(e, t, n) {
6365
+ if (Ju(t, n)) return V;
6366
+ let r = Yu(t, n);
6353
6367
  if (!r) return V;
6354
- let i = Zu(t), a = Zu(n), o = (t) => {
6368
+ let i = td(t), a = td(n), o = (t) => {
6355
6369
  let n = i(t), r = a(t);
6356
- return Qu(n, r) ? e.calculate(n, r) : 0;
6357
- }, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = Hu.variable({});
6358
- for (let e of [...s].toSorted()) u.push(o(e), qu);
6359
- for (let e of [...c].toSorted()) u.push(o(e), Ju);
6360
- for (let e of [...l].toSorted()) u.push(o(e), Yu);
6370
+ return nd(n, r) ? e.calculate(n, r) : 0;
6371
+ }, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = Ku.variable({});
6372
+ for (let e of [...s].toSorted()) u.push(o(e), Zu);
6373
+ for (let e of [...c].toSorted()) u.push(o(e), Qu);
6374
+ for (let e of [...l].toSorted()) u.push(o(e), $u);
6361
6375
  let { hasOptional1: d, hasOptional2: f } = r;
6362
6376
  if (d || f) {
6363
- let r = Xu(d, f);
6364
- for (let e of [...Ku(t, n)].toSorted()) {
6377
+ let r = ed(d, f);
6378
+ for (let e of [...Xu(t, n)].toSorted()) {
6365
6379
  let t = o(e);
6366
6380
  t !== 0 && u.push(t, r);
6367
6381
  }
6368
- let i = t.additionalProperties ?? sl, a = n.additionalProperties ?? sl;
6369
- if (Qu(i, a)) {
6382
+ let i = t.additionalProperties ?? dl, a = n.additionalProperties ?? dl;
6383
+ if (nd(i, a)) {
6370
6384
  let t = e.calculate(i, a);
6371
6385
  u.push(t, r);
6372
6386
  }
@@ -6378,10 +6392,10 @@ function Uu(e, t, n) {
6378
6392
  for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ? V : e && t ? H : e ? z : t ? B : R;
6379
6393
  return m;
6380
6394
  }
6381
- function Wu(e, t) {
6382
- return du(Vu(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === L.Rejection;
6395
+ function Ju(e, t) {
6396
+ return hu(Gu(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === L.Rejection;
6383
6397
  }
6384
- function Gu(e, t) {
6398
+ function Yu(e, t) {
6385
6399
  let n = new Set(e.required), r = new Set(t.required), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = n.size, s = r.size;
6386
6400
  for (let e of n) r.has(e) && i.add(e), a.add(e);
6387
6401
  for (let e of r) n.has(e) && i.add(e), a.add(e);
@@ -6397,7 +6411,7 @@ function Gu(e, t) {
6397
6411
  hasOptional2: u > s
6398
6412
  };
6399
6413
  }
6400
- function Ku(e, t) {
6414
+ function Xu(e, t) {
6401
6415
  let n = new Set(e.required), r = e.properties, i = t.properties, a = e.required, o = t.required;
6402
6416
  if (r) for (let e in r) n.add(e);
6403
6417
  if (i) for (let e in i) n.add(e);
@@ -6405,7 +6419,7 @@ function Ku(e, t) {
6405
6419
  if (o) for (let e of o) n.delete(e);
6406
6420
  return n;
6407
6421
  }
6408
- var qu = (e, t) => {
6422
+ var Zu = (e, t) => {
6409
6423
  switch (e) {
6410
6424
  case L.Equals:
6411
6425
  t.hasCommonInRequired = !0;
@@ -6421,7 +6435,7 @@ var qu = (e, t) => {
6421
6435
  break;
6422
6436
  case L.Rejection: t.hasRejection = !0;
6423
6437
  }
6424
- }, Ju = (e, t) => {
6438
+ }, Qu = (e, t) => {
6425
6439
  switch (e) {
6426
6440
  case L.Equals:
6427
6441
  case L.ContainedBy:
@@ -6433,7 +6447,7 @@ var qu = (e, t) => {
6433
6447
  break;
6434
6448
  case L.Rejection: t.hasRejection = !0;
6435
6449
  }
6436
- }, Yu = (e, t) => {
6450
+ }, $u = (e, t) => {
6437
6451
  switch (e) {
6438
6452
  case L.Equals:
6439
6453
  case L.Containing:
@@ -6445,7 +6459,7 @@ var qu = (e, t) => {
6445
6459
  break;
6446
6460
  case L.Rejection: t.hasRejection = !0;
6447
6461
  }
6448
- }, Xu = (e, t) => (n, r) => {
6462
+ }, ed = (e, t) => (n, r) => {
6449
6463
  if (r.hasRejection) return;
6450
6464
  let i = !1, a = !1, o = !1;
6451
6465
  switch (n) {
@@ -6465,7 +6479,7 @@ var qu = (e, t) => {
6465
6479
  }
6466
6480
  e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
6467
6481
  };
6468
- function Zu(e) {
6482
+ function td(e) {
6469
6483
  let t = e.properties, n = e.propertyNames, r = e.additionalProperties, i = [];
6470
6484
  if (e.patternProperties) for (let t in e.patternProperties) {
6471
6485
  let n = e.patternProperties[t], r = new RegExp(t, "i");
@@ -6475,39 +6489,39 @@ function Zu(e) {
6475
6489
  });
6476
6490
  }
6477
6491
  return (e) => {
6478
- if (n && Tl(n, e) === X.Invalid) return cl;
6492
+ if (n && kl(n, e) === X.Invalid) return fl;
6479
6493
  for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
6480
- return ((t && t[e]) ?? r) || sl;
6494
+ return ((t && t[e]) ?? r) || dl;
6481
6495
  };
6482
6496
  }
6483
- function Qu(e, t) {
6497
+ function nd(e, t) {
6484
6498
  let n = J(e), r = J(t);
6485
6499
  return n !== q.Never || r !== q.Never;
6486
6500
  }
6487
6501
  //#endregion
6488
6502
  //#region src/json-schema-subset/checker/string.ts
6489
- var $u = uu(0);
6490
- function ed(e, t) {
6491
- let n = du($u(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
6503
+ var rd = mu(0);
6504
+ function id(e, t) {
6505
+ let n = hu(rd(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
6492
6506
  switch (n) {
6493
6507
  case L.Rejection: return V;
6494
- case L.Containing: return r ? Ec : z;
6495
- case L.ContainedBy: return i ? Ec : B;
6496
- case L.Equals: return r && i ? e.pattern === t.pattern ? R : Ec : r ? R | B : i ? R | z : R;
6497
- case L.Intersection: return r && i ? Ec : r ? H | V | B : i ? H | V | z : H;
6508
+ case L.Containing: return r ? Ac : z;
6509
+ case L.ContainedBy: return i ? Ac : B;
6510
+ case L.Equals: return r && i ? e.pattern === t.pattern ? R : Ac : r ? R | B : i ? R | z : R;
6511
+ case L.Intersection: return r && i ? Ac : r ? H | V | B : i ? H | V | z : H;
6498
6512
  }
6499
6513
  }
6500
6514
  //#endregion
6501
6515
  //#region src/json-schema-subset/checker/checker.ts
6502
- function td(e, t, n) {
6503
- let r = {}, i = [], a = _u(rd(e, r)), o = nd(), s = Cu(e);
6504
- r.isEquals = gu(wc), r.calculate = Wc({
6516
+ function ad(e, t, n) {
6517
+ let r = {}, i = [], a = xu(sd(e, r)), o = od(), s = Du(e);
6518
+ r.isEquals = bu(Oc), r.calculate = Jc({
6505
6519
  describe: o,
6506
6520
  equals: s,
6507
6521
  calculate: a,
6508
6522
  observeCalculation: (e, t, n, r) => {
6509
- if (!ad(r ? Ic(n) : n)) return;
6510
- let a = r ? od(t, e) : od(e, t);
6523
+ if (!ld(r ? Bc(n) : n)) return;
6524
+ let a = r ? ud(t, e) : ud(e, t);
6511
6525
  a && i.push(a);
6512
6526
  }
6513
6527
  }), Object.freeze(r);
@@ -6517,7 +6531,7 @@ function td(e, t, n) {
6517
6531
  expression: c
6518
6532
  };
6519
6533
  }
6520
- var nd = () => (e) => {
6534
+ var od = () => (e) => {
6521
6535
  let t;
6522
6536
  switch (J(e)) {
6523
6537
  case q.Not:
@@ -6529,22 +6543,22 @@ var nd = () => (e) => {
6529
6543
  case q.Combination:
6530
6544
  if ("allOf" in e) t = {
6531
6545
  kind: W.AllOf,
6532
- expressions: id(e.allOf, q.Any)
6546
+ expressions: cd(e.allOf, q.Any)
6533
6547
  };
6534
6548
  else if ("anyOf" in e) t = {
6535
6549
  kind: W.AnyOf,
6536
- expressions: id(e.anyOf, q.Never)
6550
+ expressions: cd(e.anyOf, q.Never)
6537
6551
  };
6538
6552
  else if ("oneOf" in e) t = {
6539
6553
  kind: W.OneOf,
6540
- expressions: id(e.oneOf, q.Never)
6554
+ expressions: cd(e.oneOf, q.Never)
6541
6555
  };
6542
6556
  else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
6543
6557
  break;
6544
6558
  default: t = { kind: W.Leaf };
6545
6559
  }
6546
6560
  return t;
6547
- }, rd = (e, t) => (n, r) => {
6561
+ }, sd = (e, t) => (n, r) => {
6548
6562
  let i = J(n), a = J(r);
6549
6563
  if (i === q.Extends || a === q.Extends) return e.calculate(n, r);
6550
6564
  switch (i) {
@@ -6555,28 +6569,28 @@ var nd = () => (e) => {
6555
6569
  case q.Any: return B;
6556
6570
  case q.Never: return z;
6557
6571
  }
6558
- if (i === q.EnumOrConst && a === q.EnumOrConst) return yu(t, n, r);
6559
- if (i === q.EnumOrConst) return bu(n, r);
6560
- if (a === q.EnumOrConst) return Ic(bu(r, n));
6572
+ if (i === q.EnumOrConst && a === q.EnumOrConst) return Cu(t, n, r);
6573
+ if (i === q.EnumOrConst) return wu(n, r);
6574
+ if (a === q.EnumOrConst) return Bc(wu(r, n));
6561
6575
  if (i !== a) return V;
6562
6576
  switch (i) {
6563
6577
  case q.Null: return R;
6564
- case q.Numeric: return Ru(n, r);
6565
- case q.String: return ed(n, r);
6578
+ case q.Numeric: return Hu(n, r);
6579
+ case q.String: return id(n, r);
6566
6580
  case q.Boolean: return R;
6567
- case q.Object: return Uu(t, n, r);
6568
- case q.Array: return mu(t, n, r);
6581
+ case q.Object: return qu(t, n, r);
6582
+ case q.Array: return vu(t, n, r);
6569
6583
  default: throw Error(`invalid kind ${i}`);
6570
6584
  }
6571
6585
  };
6572
- function id(e, t) {
6586
+ function cd(e, t) {
6573
6587
  return e.filter((e) => J(e) !== t);
6574
6588
  }
6575
- function ad(e) {
6576
- return !Dc(e) && !kc(e) && (Oc(e) || jc(e) || Ac(e));
6589
+ function ld(e) {
6590
+ return !jc(e) && !Nc(e) && (Mc(e) || Fc(e) || Pc(e));
6577
6591
  }
6578
- function od(e, t) {
6579
- let n = fl(t);
6592
+ function ud(e, t) {
6593
+ let n = gl(t);
6580
6594
  if (!n) return;
6581
6595
  let r = J(e), i = J(t);
6582
6596
  if (r !== i) return [...n, "type"];
@@ -6609,12 +6623,12 @@ function od(e, t) {
6609
6623
  }
6610
6624
  //#endregion
6611
6625
  //#region src/json-schema-subset/extends/extendsContext.ts
6612
- var sd = class e {
6626
+ var dd = class e {
6613
6627
  constructor(e = []) {
6614
6628
  this.extendsSchemaClasses = Object.freeze([...e]);
6615
6629
  }
6616
6630
  tryCompiledExtendsSchema(e, t) {
6617
- for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(bc(), e, t);
6631
+ for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(wc(), e, t);
6618
6632
  return null;
6619
6633
  }
6620
6634
  isExtendsSchema(e) {
@@ -6624,7 +6638,7 @@ var sd = class e {
6624
6638
  calculate(t, n) {
6625
6639
  let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
6626
6640
  a = r ? n.compare(t) : t.compare(n);
6627
- for (let t of a) r && (t = e.swap(t)), i |= Mc(t);
6641
+ for (let t of a) r && (t = e.swap(t)), i |= Ic(t);
6628
6642
  return i;
6629
6643
  }
6630
6644
  equals(e, t) {
@@ -6644,35 +6658,35 @@ var sd = class e {
6644
6658
  };
6645
6659
  //#endregion
6646
6660
  //#region src/json-schema-subset/preprocessing.ts
6647
- function cd(e, t, n = !1) {
6661
+ function fd(e, t, n = !1) {
6648
6662
  let r = t(e);
6649
6663
  if (Array.isArray(r)) {
6650
6664
  let e = [];
6651
- throw ud(e, r, "$"), new Gc(e);
6665
+ throw md(e, r, "$"), new Yc(e);
6652
6666
  }
6653
6667
  let { schema: i, warns: a } = r;
6654
6668
  if (n && a.length > 0) {
6655
6669
  console.warn(`found ${a.length} warns after compile schema`);
6656
- for (let e of a) console.warn(qc(e));
6670
+ for (let e of a) console.warn(Zc(e));
6657
6671
  }
6658
6672
  return i;
6659
6673
  }
6660
- function ld(e, t, n, r = !1) {
6674
+ function pd(e, t, n, r = !1) {
6661
6675
  let i = n(e), a = n(t);
6662
6676
  if (Array.isArray(i) || Array.isArray(a)) {
6663
6677
  let e = [];
6664
- throw Array.isArray(i) && ud(e, i, "$1"), Array.isArray(a) && ud(e, a, "$2"), new Gc(e);
6678
+ throw Array.isArray(i) && md(e, i, "$1"), Array.isArray(a) && md(e, a, "$2"), new Yc(e);
6665
6679
  }
6666
6680
  let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
6667
6681
  if (r) {
6668
6682
  s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
6669
- for (let e of s) console.warn(qc(e));
6683
+ for (let e of s) console.warn(Zc(e));
6670
6684
  l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
6671
- for (let e of l) console.warn(qc(e));
6685
+ for (let e of l) console.warn(Zc(e));
6672
6686
  }
6673
6687
  return [o, c];
6674
6688
  }
6675
- function ud(e, t, n) {
6689
+ function md(e, t, n) {
6676
6690
  for (let r of t) {
6677
6691
  let t = {
6678
6692
  ...r,
@@ -6683,74 +6697,74 @@ function ud(e, t, n) {
6683
6697
  }
6684
6698
  //#endregion
6685
6699
  //#region src/json-schema-subset/global.ts
6686
- var dd = Object.freeze({
6700
+ var hd = Object.freeze({
6687
6701
  True: 0,
6688
6702
  False: 1,
6689
6703
  Unknown: 2
6690
6704
  });
6691
- function fd({ extendsSchemaClasses: e, delegate: t } = {}) {
6692
- let n = new sd(e);
6705
+ function gd({ extendsSchemaClasses: e, delegate: t } = {}) {
6706
+ let n = new dd(e);
6693
6707
  return Object.freeze({
6694
- compile: (e, r, i) => cd(e, (e) => Ql(e, n, r, t), i),
6708
+ compile: (e, r, i) => fd(e, (e) => nu(e, n, r, t), i),
6695
6709
  isSubset: (e, r, i = !1) => {
6696
- let [a, o] = ld(e, r, (e) => Ql(e, n, void 0, t), i), { errorPath: s, expression: c } = td(n, a, o), l = Dc(c) || kc(c), u = Oc(c) || jc(c) || Ac(c);
6697
- return l && !u ? { result: dd.True } : !l && u ? {
6710
+ let [a, o] = pd(e, r, (e) => nu(e, n, void 0, t), i), { errorPath: s, expression: c } = ad(n, a, o), l = jc(c) || Nc(c), u = Mc(c) || Fc(c) || Pc(c);
6711
+ return l && !u ? { result: hd.True } : !l && u ? {
6698
6712
  errorPath: s,
6699
- result: dd.False
6700
- } : { result: dd.Unknown };
6713
+ result: hd.False
6714
+ } : { result: hd.Unknown };
6701
6715
  }
6702
6716
  });
6703
6717
  }
6704
6718
  //#endregion
6705
6719
  //#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
6706
- var pd = (e) => e !== void 0, md = (e) => typeof e == "string", hd = Array.isArray, gd = (e) => typeof e == "object" && !!e, _d = (e) => gd(e) && !hd(e), $ = (e) => _d(e) ? e : void 0;
6720
+ var _d = (e) => e !== void 0, vd = (e) => typeof e == "string", yd = Array.isArray, bd = (e) => typeof e == "object" && !!e, xd = (e) => bd(e) && !yd(e), $ = (e) => xd(e) ? e : void 0;
6707
6721
  //#endregion
6708
6722
  //#region src/manifest/common/schemaComparer.ts
6709
- function vd(e) {
6723
+ function Sd(e) {
6710
6724
  return $(e)?.type === "string";
6711
6725
  }
6712
- function yd(e) {
6713
- return e instanceof Ed || $(e)?.type === "array";
6726
+ function Cd(e) {
6727
+ return e instanceof Ad || $(e)?.type === "array";
6714
6728
  }
6715
- function bd(e) {
6729
+ function wd(e) {
6716
6730
  let t = $(e);
6717
6731
  return t?.type === "array" && $(t.items)?.type === "string";
6718
6732
  }
6719
- function xd(e) {
6733
+ function Td(e) {
6720
6734
  let t = $(e);
6721
6735
  return t != null && Object.keys(t).length === 0;
6722
6736
  }
6723
- function Sd(e) {
6737
+ function Ed(e) {
6724
6738
  let t = $(e), n = $(t?.error);
6725
- if (t == null || n == null || t.packageId != null && !md(t.packageId) || n.message != null && !md(n.message)) throw TypeError("Invalid schema comparison context.");
6739
+ if (t == null || n == null || t.packageId != null && !vd(t.packageId) || n.message != null && !vd(n.message)) throw TypeError("Invalid schema comparison context.");
6726
6740
  }
6727
- function Cd(e) {
6728
- return e == null ? { error: {} } : (Sd(e), e);
6741
+ function Dd(e) {
6742
+ return e == null ? { error: {} } : (Ed(e), e);
6729
6743
  }
6730
- var wd = class e {
6744
+ var Od = class e {
6731
6745
  static setError(t, n, r) {
6732
6746
  t instanceof e ? t.context.error.message = r : n instanceof e && (n.context.error.message = r);
6733
6747
  }
6734
6748
  constructor(e, t, n) {
6735
- this.id = e, this.value = t, this.context = Cd(n);
6749
+ this.id = e, this.value = t, this.context = Dd(n);
6736
6750
  }
6737
6751
  compare(e) {
6738
6752
  return this.passThrough(e) || this.compareImpl(e);
6739
6753
  }
6740
6754
  passThrough(e) {
6741
- if (e instanceof Od) return [L.Equals];
6755
+ if (e instanceof Md) return [L.Equals];
6742
6756
  }
6743
- }, Td = class e extends wd {
6757
+ }, kd = class e extends Od {
6744
6758
  static isMatch(e) {
6745
6759
  let t = $(e)?.enum;
6746
- return Array.isArray(t) && t.every((e) => md(e));
6760
+ return Array.isArray(t) && t.every((e) => vd(e));
6747
6761
  }
6748
6762
  constructor(t, n, r) {
6749
6763
  if (!e.isMatch(n)) throw TypeError("Invalid single-select schema.");
6750
6764
  super(t, n, r);
6751
6765
  }
6752
6766
  compareImpl(t) {
6753
- if (vd(t)) return [L.ContainedBy];
6767
+ if (Sd(t)) return [L.ContainedBy];
6754
6768
  if (t instanceof e) {
6755
6769
  let e = new Set(this.value.enum), n = L.Equals;
6756
6770
  for (let r of t.value.enum) e.has(r) || (n = L.ContainedBy), e.delete(r);
@@ -6769,17 +6783,17 @@ var wd = class e {
6769
6783
  }
6770
6784
  return !1;
6771
6785
  }
6772
- }, Ed = class e extends wd {
6786
+ }, Ad = class e extends Od {
6773
6787
  static isMatch(e) {
6774
6788
  let t = $(e), n = $(t?.items)?.enum;
6775
- return t?.type === "array" && t.uniqueItems === !0 && Array.isArray(n) && n.every((e) => md(e));
6789
+ return t?.type === "array" && t.uniqueItems === !0 && Array.isArray(n) && n.every((e) => vd(e));
6776
6790
  }
6777
6791
  constructor(t, n, r) {
6778
6792
  if (!e.isMatch(n)) throw TypeError("Invalid multi-select schema.");
6779
6793
  super(t, n, r);
6780
6794
  }
6781
6795
  compareImpl(t) {
6782
- if (t instanceof Dd || bd(t)) return [L.ContainedBy];
6796
+ if (t instanceof jd || wd(t)) return [L.ContainedBy];
6783
6797
  if (t instanceof e) {
6784
6798
  let e = new Set(this.value.items.enum), n = L.Equals;
6785
6799
  for (let r of t.value.items.enum) e.has(r) || (n = L.ContainedBy), e.delete(r);
@@ -6798,24 +6812,24 @@ var wd = class e {
6798
6812
  }
6799
6813
  return !1;
6800
6814
  }
6801
- }, Dd = class e extends wd {
6815
+ }, jd = class e extends Od {
6802
6816
  static isMatch(e) {
6803
6817
  let t = $(e);
6804
- return t?.type === "array" && !t.uniqueItems && (!pd(t.items) || xd(t.items));
6818
+ return t?.type === "array" && !t.uniqueItems && (!_d(t.items) || Td(t.items));
6805
6819
  }
6806
6820
  constructor(t, n, r) {
6807
6821
  if (!e.isMatch(n)) throw TypeError("Invalid array schema.");
6808
6822
  super(t, n, r);
6809
6823
  }
6810
6824
  compareImpl(t) {
6811
- return t instanceof e || yd(t) ? [L.Equals] : [L.Rejection];
6825
+ return t instanceof e || Cd(t) ? [L.Equals] : [L.Rejection];
6812
6826
  }
6813
6827
  equals(t) {
6814
6828
  return t instanceof e;
6815
6829
  }
6816
- }, Od = class e extends wd {
6830
+ }, Md = class e extends Od {
6817
6831
  static isMatch(e) {
6818
- return xd(e);
6832
+ return Td(e);
6819
6833
  }
6820
6834
  constructor(t, n, r) {
6821
6835
  if (!e.isMatch(n)) throw TypeError("Invalid empty schema.");
@@ -6827,7 +6841,7 @@ var wd = class e {
6827
6841
  equals(e) {
6828
6842
  return !0;
6829
6843
  }
6830
- }, kd = class e extends wd {
6844
+ }, Nd = class e extends Od {
6831
6845
  static isMatch(e) {
6832
6846
  return $(e)?.contentMediaType === "oomol/bin";
6833
6847
  }
@@ -6836,12 +6850,12 @@ var wd = class e {
6836
6850
  super(t, n, r);
6837
6851
  }
6838
6852
  compareImpl(t) {
6839
- return t instanceof e ? [L.Equals] : (wd.setError(this, t, "edgeError.binDiffType"), [L.Rejection]);
6853
+ return t instanceof e ? [L.Equals] : (Od.setError(this, t, "edgeError.binDiffType"), [L.Rejection]);
6840
6854
  }
6841
6855
  equals(t) {
6842
6856
  return t instanceof e;
6843
6857
  }
6844
- }, Ad = class e extends wd {
6858
+ }, Pd = class e extends Od {
6845
6859
  static isMatch(e) {
6846
6860
  return $(e)?.contentMediaType === "oomol/artifact";
6847
6861
  }
@@ -6850,40 +6864,40 @@ var wd = class e {
6850
6864
  super(t, n, r);
6851
6865
  }
6852
6866
  compareImpl(t) {
6853
- return t instanceof e ? [L.Equals] : (wd.setError(this, t, "edgeError.artifactDiffType"), [L.Rejection]);
6867
+ return t instanceof e ? [L.Equals] : (Od.setError(this, t, "edgeError.artifactDiffType"), [L.Rejection]);
6854
6868
  }
6855
6869
  equals(t) {
6856
6870
  return t instanceof e;
6857
6871
  }
6858
6872
  };
6859
- function jd() {
6860
- return fd({ extendsSchemaClasses: [
6861
- Dd,
6862
- Od,
6863
- Td,
6864
- Ed,
6873
+ function Fd() {
6874
+ return gd({ extendsSchemaClasses: [
6875
+ jd,
6876
+ Md,
6865
6877
  kd,
6866
- Ad
6878
+ Ad,
6879
+ Nd,
6880
+ Pd
6867
6881
  ] });
6868
6882
  }
6869
- jd();
6883
+ Fd();
6870
6884
  //#endregion
6871
6885
  //#region src/flow/common/schema.ts
6872
- function Md(e, t) {
6886
+ function Id(e, t) {
6873
6887
  if (e === t) return !0;
6874
6888
  if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
6875
- if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => Md(e, t[n]));
6889
+ if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => Id(e, t[n]));
6876
6890
  let n = Object.entries(e), r = t;
6877
- return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) && Md(t, r[e]));
6891
+ return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) && Id(t, r[e]));
6878
6892
  }
6879
- function Nd(e) {
6893
+ function Ld(e) {
6880
6894
  return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
6881
6895
  }
6882
- function Pd(e) {
6896
+ function Rd(e) {
6883
6897
  return Array.isArray(e) ? e : void 0;
6884
6898
  }
6885
- function Fd(e, t) {
6886
- if (Array.isArray(e)) return e.some((e) => Fd(e, t));
6899
+ function zd(e, t) {
6900
+ if (Array.isArray(e)) return e.some((e) => zd(e, t));
6887
6901
  switch (e) {
6888
6902
  case void 0: return !0;
6889
6903
  case "null": return t == null;
@@ -6896,18 +6910,18 @@ function Fd(e, t) {
6896
6910
  default: return !1;
6897
6911
  }
6898
6912
  }
6899
- function Id(e, t) {
6913
+ function Bd(e, t) {
6900
6914
  if (typeof t == "boolean") return t;
6901
- let n = Nd(t);
6915
+ let n = Ld(t);
6902
6916
  if (n == null) return !1;
6903
- let r = Pd(n.allOf);
6904
- if (r != null && !r.every((t) => Id(e, t))) return !1;
6905
- let i = Pd(n.anyOf);
6906
- if (i != null && !i.some((t) => Id(e, t))) return !1;
6907
- let a = Pd(n.oneOf);
6908
- if (a != null && a.filter((t) => Id(e, t)).length != 1 || n.not != null && Id(e, n.not) || n.const != null && !Md(e, n.const)) return !1;
6909
- let o = Pd(n.enum);
6910
- if (o != null && !o.some((t) => Md(e, t)) || !Fd(n.type, e)) return !1;
6917
+ let r = Rd(n.allOf);
6918
+ if (r != null && !r.every((t) => Bd(e, t))) return !1;
6919
+ let i = Rd(n.anyOf);
6920
+ if (i != null && !i.some((t) => Bd(e, t))) return !1;
6921
+ let a = Rd(n.oneOf);
6922
+ if (a != null && a.filter((t) => Bd(e, t)).length != 1 || n.not != null && Bd(e, n.not) || n.const != null && !Id(e, n.const)) return !1;
6923
+ let o = Rd(n.enum);
6924
+ if (o != null && !o.some((t) => Id(e, t)) || !zd(n.type, e)) return !1;
6911
6925
  if (typeof e == "string") {
6912
6926
  if (typeof n.minLength == "number" && e.length < n.minLength || typeof n.maxLength == "number" && e.length > n.maxLength) return !1;
6913
6927
  if (typeof n.pattern == "string") try {
@@ -6916,25 +6930,25 @@ function Id(e, t) {
6916
6930
  return !1;
6917
6931
  }
6918
6932
  }
6919
- if (typeof e == "number" && (typeof n.minimum == "number" && e < n.minimum || typeof n.maximum == "number" && e > n.maximum || typeof n.exclusiveMinimum == "number" && e <= n.exclusiveMinimum || typeof n.exclusiveMaximum == "number" && e >= n.exclusiveMaximum) || Array.isArray(e) && (typeof n.minItems == "number" && e.length < n.minItems || typeof n.maxItems == "number" && e.length > n.maxItems || n.items != null && !e.every((e) => Id(e, n.items)))) return !1;
6933
+ if (typeof e == "number" && (typeof n.minimum == "number" && e < n.minimum || typeof n.maximum == "number" && e > n.maximum || typeof n.exclusiveMinimum == "number" && e <= n.exclusiveMinimum || typeof n.exclusiveMaximum == "number" && e >= n.exclusiveMaximum) || Array.isArray(e) && (typeof n.minItems == "number" && e.length < n.minItems || typeof n.maxItems == "number" && e.length > n.maxItems || n.items != null && !e.every((e) => Bd(e, n.items)))) return !1;
6920
6934
  if (typeof e == "object" && e && !Array.isArray(e)) {
6921
- let t = e, r = Pd(n.required);
6935
+ let t = e, r = Rd(n.required);
6922
6936
  if (r != null && r.some((e) => typeof e != "string" || !Object.hasOwn(t, e))) return !1;
6923
- let i = Nd(n.properties ?? {});
6937
+ let i = Ld(n.properties ?? {});
6924
6938
  if (i == null) return !1;
6925
6939
  for (let [e, r] of Object.entries(t)) {
6926
6940
  let t = i[e];
6927
6941
  if (t != null) {
6928
- if (!Id(r, t)) return !1;
6942
+ if (!Bd(r, t)) return !1;
6929
6943
  } else if (n.additionalProperties === !1) return !1;
6930
- else if (n.additionalProperties != null && n.additionalProperties !== !0 && !Id(r, n.additionalProperties)) return !1;
6944
+ else if (n.additionalProperties != null && n.additionalProperties !== !0 && !Bd(r, n.additionalProperties)) return !1;
6931
6945
  }
6932
6946
  }
6933
6947
  return !0;
6934
6948
  }
6935
6949
  //#endregion
6936
6950
  //#region src/flow/common/graph.ts
6937
- function Ld(e) {
6951
+ function Vd(e) {
6938
6952
  let t = new Map(Object.keys(e.nodes).map((e) => [e, /* @__PURE__ */ new Set()])), n = /* @__PURE__ */ new Map();
6939
6953
  for (let r of e.edges) {
6940
6954
  if (!t.has(r.source) || !t.has(r.target)) continue;
@@ -6955,38 +6969,38 @@ function Ld(e) {
6955
6969
  }
6956
6970
  //#endregion
6957
6971
  //#region src/execution/common/scheduler.ts
6958
- function Rd(e, t) {
6972
+ function Hd(e, t) {
6959
6973
  return t?.(e) ?? {
6960
6974
  code: "node.failed",
6961
6975
  message: e instanceof Error ? e.message : String(e)
6962
6976
  };
6963
6977
  }
6964
- var zd = "notification:";
6965
- function Bd(e) {
6966
- return `${zd}${e}`;
6978
+ var Ud = "notification:";
6979
+ function Wd(e) {
6980
+ return `${Ud}${e}`;
6967
6981
  }
6968
- function Vd(e) {
6982
+ function Gd(e) {
6969
6983
  return e.kind != "wait" || e.notification == null ? e.inputs : {
6970
6984
  ...e.inputs,
6971
- ...Object.fromEntries(Object.entries(e.notification.inputs).map(([e, t]) => [Bd(e), t]))
6985
+ ...Object.fromEntries(Object.entries(e.notification.inputs).map(([e, t]) => [Wd(e), t]))
6972
6986
  };
6973
6987
  }
6974
- function Hd(e, t) {
6988
+ function Kd(e, t) {
6975
6989
  switch (t.kind) {
6976
6990
  case "condition": return { [t.input.handle]: t.input };
6977
6991
  case "value": return {};
6978
- case "subflow": return vc(e.subflows[t.subflowId].inputs);
6979
- case "task": return vc([...t.task == null ? e.tasks[t.taskId].inputs : t.task.inputs, ...t.additionalInputs ?? []]);
6992
+ case "subflow": return Sc(e.subflows[t.subflowId].inputs);
6993
+ case "task": return Sc([...t.task == null ? e.tasks[t.taskId].inputs : t.task.inputs, ...t.additionalInputs ?? []]);
6980
6994
  case "wait": {
6981
6995
  let n = t.notification, r = n == null ? void 0 : e.tasks[n.taskId];
6982
6996
  return {
6983
6997
  [t.input.handle]: t.input,
6984
- ...n == null || r == null ? {} : Object.fromEntries(r.inputs.flatMap((e) => "handle" in e && e.handle != n.messageHandle ? [[Bd(e.handle), e]] : []))
6998
+ ...n == null || r == null ? {} : Object.fromEntries(r.inputs.flatMap((e) => "handle" in e && e.handle != n.messageHandle ? [[Wd(e.handle), e]] : []))
6985
6999
  };
6986
7000
  }
6987
7001
  }
6988
7002
  }
6989
- function Ud(e, t) {
7003
+ function qd(e, t) {
6990
7004
  if (t.name != null) return t.name;
6991
7005
  switch (t.kind) {
6992
7006
  case "condition": return;
@@ -6996,31 +7010,31 @@ function Ud(e, t) {
6996
7010
  case "wait": return "Wait";
6997
7011
  }
6998
7012
  }
6999
- function Wd(e, t) {
7013
+ function Jd(e, t) {
7000
7014
  return t.kind == "task" ? t.task == null ? e.tasks[t.taskId].executor.kind : "javascript" : t.kind;
7001
7015
  }
7002
- function Gd(e, t) {
7016
+ function Yd(e, t) {
7003
7017
  if (typeof e != "object" || !e || Array.isArray(e)) throw Error(`${t} must be an object.`);
7004
7018
  return e;
7005
7019
  }
7006
- function Kd(e, t, n) {
7020
+ function Xd(e, t, n) {
7007
7021
  let r = Object.keys(e);
7008
7022
  if (r.length != t.length || r.some((e) => !t.includes(e))) throw Error(`${n} contains unsupported fields.`);
7009
7023
  }
7010
- function qd(e, t) {
7024
+ function Zd(e, t) {
7011
7025
  if (typeof e != "string" || e.length == 0) throw Error(`${t} must be a non-empty string.`);
7012
7026
  return e;
7013
7027
  }
7014
- function Jd(e, t, n = 0) {
7028
+ function Qd(e, t, n = 0) {
7015
7029
  if (n > 64) throw Error(`${t} exceeds the maximum JSON depth.`);
7016
7030
  if (e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e)) return e;
7017
- if (Array.isArray(e)) return e.map((e) => Jd(e, t, n + 1));
7018
- let r = Gd(e, t);
7019
- return Object.fromEntries(Object.entries(r).map(([e, r]) => [e, Jd(r, t, n + 1)]));
7031
+ if (Array.isArray(e)) return e.map((e) => Qd(e, t, n + 1));
7032
+ let r = Yd(e, t);
7033
+ return Object.fromEntries(Object.entries(r).map(([e, r]) => [e, Qd(r, t, n + 1)]));
7020
7034
  }
7021
- function Yd(e) {
7022
- let t = Gd(e, "Flow Run checkpoint");
7023
- if (Kd(t, [
7035
+ function $d(e) {
7036
+ let t = Yd(e, "Flow Run checkpoint");
7037
+ if (Xd(t, [
7024
7038
  "bindingValues",
7025
7039
  "inputs",
7026
7040
  "results",
@@ -7028,27 +7042,27 @@ function Yd(e) {
7028
7042
  "version",
7029
7043
  "wait"
7030
7044
  ], "Flow Run checkpoint"), t.version != 1) throw Error("Flow Run checkpoint version is unsupported.");
7031
- let n = Object.fromEntries(Object.entries(Gd(t.bindingValues, "Checkpoint bindings")).map(([e, t]) => {
7045
+ let n = Object.fromEntries(Object.entries(Yd(t.bindingValues, "Checkpoint bindings")).map(([e, t]) => {
7032
7046
  if (typeof t != "string") throw Error("Checkpoint binding must be a string.");
7033
7047
  return [e, t];
7034
- })), r = Object.fromEntries(Object.entries(Gd(t.inputs, "Checkpoint inputs")).map(([e, t]) => [e, Object.fromEntries(Object.entries(Gd(t, "Checkpoint node inputs")).map(([e, t]) => [e, Jd(t, "Checkpoint input")]))])), i = Object.fromEntries(Object.entries(Gd(t.results, "Checkpoint results")).map(([e, t]) => {
7035
- let n = Gd(t, "Checkpoint result");
7036
- return Kd(n, ["jobId", "outputs"], "Checkpoint result"), [e, {
7037
- jobId: qd(n.jobId, "Checkpoint job ID"),
7038
- outputs: Object.fromEntries(Object.entries(Gd(n.outputs, "Checkpoint outputs")).map(([e, t]) => [e, Jd(t, "Checkpoint output")]))
7048
+ })), r = Object.fromEntries(Object.entries(Yd(t.inputs, "Checkpoint inputs")).map(([e, t]) => [e, Object.fromEntries(Object.entries(Yd(t, "Checkpoint node inputs")).map(([e, t]) => [e, Qd(t, "Checkpoint input")]))])), i = Object.fromEntries(Object.entries(Yd(t.results, "Checkpoint results")).map(([e, t]) => {
7049
+ let n = Yd(t, "Checkpoint result");
7050
+ return Xd(n, ["jobId", "outputs"], "Checkpoint result"), [e, {
7051
+ jobId: Zd(n.jobId, "Checkpoint job ID"),
7052
+ outputs: Object.fromEntries(Object.entries(Yd(n.outputs, "Checkpoint outputs")).map(([e, t]) => [e, Qd(t, "Checkpoint output")]))
7039
7053
  }];
7040
7054
  }));
7041
7055
  if (!Array.isArray(t.skipped)) throw Error("Checkpoint skipped nodes must be an array.");
7042
- let a = t.skipped.map((e) => qd(e, "Checkpoint skipped node"));
7056
+ let a = t.skipped.map((e) => Zd(e, "Checkpoint skipped node"));
7043
7057
  if (new Set(a).size != a.length || a.some((e) => i[e] != null)) throw Error("Checkpoint node states conflict.");
7044
- let o = Gd(t.wait, "Checkpoint wait");
7045
- Kd(o, [
7058
+ let o = Yd(t.wait, "Checkpoint wait");
7059
+ Xd(o, [
7046
7060
  "jobId",
7047
7061
  "nodeId",
7048
7062
  "value",
7049
7063
  "waitId"
7050
7064
  ], "Checkpoint wait");
7051
- let s = qd(o.nodeId, "Checkpoint wait node");
7065
+ let s = Zd(o.nodeId, "Checkpoint wait node");
7052
7066
  if (i[s] != null || a.includes(s)) throw Error("Checkpoint Wait is already settled.");
7053
7067
  return {
7054
7068
  bindingValues: n,
@@ -7058,24 +7072,24 @@ function Yd(e) {
7058
7072
  version: 1,
7059
7073
  wait: {
7060
7074
  nodeId: s,
7061
- jobId: qd(o.jobId, "Checkpoint Wait job"),
7062
- value: Jd(o.value, "Checkpoint Wait value"),
7063
- waitId: qd(o.waitId, "Checkpoint Wait ID")
7075
+ jobId: Zd(o.jobId, "Checkpoint Wait job"),
7076
+ value: Qd(o.value, "Checkpoint Wait value"),
7077
+ waitId: Zd(o.waitId, "Checkpoint Wait ID")
7064
7078
  }
7065
7079
  };
7066
7080
  }
7067
- function Xd(e, t) {
7081
+ function ef(e, t) {
7068
7082
  if (e === t) return !0;
7069
7083
  if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
7070
- if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => Xd(e, t[n]));
7084
+ if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => ef(e, t[n]));
7071
7085
  let n = Object.entries(e), r = Object.entries(t), i = t;
7072
- return n.length == r.length && n.every(([e, t]) => Object.hasOwn(i, e) && Xd(t, i[e]));
7086
+ return n.length == r.length && n.every(([e, t]) => Object.hasOwn(i, e) && ef(t, i[e]));
7073
7087
  }
7074
- function Zd(e, t, n) {
7088
+ function tf(e, t, n) {
7075
7089
  let r = Object.hasOwn(n, t.input) ? n[t.input] : null, i = t.value;
7076
7090
  switch (t.operator) {
7077
- case "==": return i !== void 0 && Xd(r, i);
7078
- case "!=": return i !== void 0 && !Xd(r, i);
7091
+ case "==": return i !== void 0 && ef(r, i);
7092
+ case "!=": return i !== void 0 && !ef(r, i);
7079
7093
  case ">": return typeof r == "number" && typeof i == "number" && r > i;
7080
7094
  case ">=": return typeof r == "number" && typeof i == "number" && r >= i;
7081
7095
  case "<": return typeof r == "number" && typeof i == "number" && r < i;
@@ -7083,7 +7097,7 @@ function Zd(e, t, n) {
7083
7097
  case "contains":
7084
7098
  case "notContains": {
7085
7099
  let e;
7086
- return typeof r == "string" && typeof i == "string" ? e = r.includes(i) : Array.isArray(r) && i !== void 0 && (e = r.some((e) => Xd(e, i))), e == null ? !1 : t.operator == "contains" ? e : !e;
7100
+ return typeof r == "string" && typeof i == "string" ? e = r.includes(i) : Array.isArray(r) && i !== void 0 && (e = r.some((e) => ef(e, i))), e == null ? !1 : t.operator == "contains" ? e : !e;
7087
7101
  }
7088
7102
  case "startsWith": return typeof r == "string" && typeof i == "string" && r.startsWith(i);
7089
7103
  case "endsWith": return typeof r == "string" && typeof i == "string" && r.endsWith(i);
@@ -7096,7 +7110,7 @@ function Zd(e, t, n) {
7096
7110
  case "hasValue":
7097
7111
  case "notHasValue": {
7098
7112
  if (r == null || Array.isArray(r) || typeof r != "object" || i === void 0) return !1;
7099
- let e = Object.values(r).some((e) => Xd(e, i));
7113
+ let e = Object.values(r).some((e) => ef(e, i));
7100
7114
  return t.operator == "hasValue" ? e : !e;
7101
7115
  }
7102
7116
  case "isEmpty":
@@ -7110,12 +7124,12 @@ function Zd(e, t, n) {
7110
7124
  case "isFalse": return r === !1;
7111
7125
  }
7112
7126
  }
7113
- function Qd(e, t) {
7127
+ function nf(e, t) {
7114
7128
  if (e === void 0) return {};
7115
7129
  if (typeof e != "object" || !e || Array.isArray(e)) throw Error(`Node "${t}" must return an object.`);
7116
7130
  return e;
7117
7131
  }
7118
- function $d(r, a, o, s, c, l = {}, u, d) {
7132
+ function rf(r, a, o, s, c, l = {}, u, d) {
7119
7133
  return e.scoped(e.gen(function* () {
7120
7134
  d ?? (yield* r.emit({
7121
7135
  flowId: a.flowId,
@@ -7126,7 +7140,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7126
7140
  runId: o,
7127
7141
  type: "run.started"
7128
7142
  }));
7129
- let f = Ld(a.graph).filter((e) => "inputs" in a.graph.nodes[e]), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
7143
+ let f = Vd(a.graph).filter((e) => "inputs" in a.graph.nodes[e]), p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
7130
7144
  for (let e of a.graph.edges) {
7131
7145
  let t = p.get(e.target) ?? [];
7132
7146
  t.push(e), p.set(e.target, t);
@@ -7158,13 +7172,13 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7158
7172
  if (t.length != 1) throw Error(`${i} requires exactly one available source.`);
7159
7173
  a = t[0];
7160
7174
  }
7161
- if (a === void 0 && t.nullable && (a = null), a === void 0 || !(a === null && t.nullable) && !Id(a, t.jsonSchema)) throw Error(`${i} does not match its declared schema.`);
7175
+ if (a === void 0 && t.nullable && (a = null), a === void 0 || !(a === null && t.nullable) && !Bd(a, t.jsonSchema)) throw Error(`${i} does not match its declared schema.`);
7162
7176
  return a;
7163
7177
  }, de = (e, t, n) => {
7164
- let i = Qd(Jd(n === void 0 ? {} : n, `Node "${e}" outputs`), e), a = t.kind == "task" ? vc(t.task == null ? r.prepared.tasks[t.taskId].outputs : t.task.outputs) : t.kind == "subflow" ? vc(r.prepared.subflows[t.subflowId].outputs) : t.kind == "value" ? vc(t.values) : Object.fromEntries((t.kind == "wait" ? t.actions : [...t.cases.map((e) => e.output), ...t.defaultOutput == null ? [] : [t.defaultOutput]]).map((e) => [e, t.input]));
7178
+ let i = nf(Qd(n === void 0 ? {} : n, `Node "${e}" outputs`), e), a = t.kind == "task" ? Sc(t.task == null ? r.prepared.tasks[t.taskId].outputs : t.task.outputs) : t.kind == "subflow" ? Sc(r.prepared.subflows[t.subflowId].outputs) : t.kind == "value" ? Sc(t.values) : Object.fromEntries((t.kind == "wait" ? t.actions : [...t.cases.map((e) => e.output), ...t.defaultOutput == null ? [] : [t.defaultOutput]]).map((e) => [e, t.input]));
7165
7179
  for (let [t, n] of Object.entries(i)) {
7166
7180
  let r = a[t];
7167
- if (r == null || !(n === null && r.nullable) && !Id(n, r.jsonSchema)) throw Error(`Node "${e}" output "${t}" does not match its declaration.`);
7181
+ if (r == null || !(n === null && r.nullable) && !Bd(n, r.jsonSchema)) throw Error(`Node "${e}" output "${t}" does not match its declaration.`);
7168
7182
  }
7169
7183
  if (t.kind != "condition" && t.kind != "wait") {
7170
7184
  for (let t of Object.keys(a)) if (!Object.hasOwn(i, t)) throw Error(`Node "${e}" did not return output "${t}".`);
@@ -7187,7 +7201,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7187
7201
  });
7188
7202
  })), pe, me = (t, n, i, s) => {
7189
7203
  let c = e.gen(function* () {
7190
- let c = Wd(r.prepared, n), l = Ud(r.prepared, n), u = Object.fromEntries(Object.entries(s).filter(([e]) => {
7204
+ let c = Jd(r.prepared, n), l = qd(r.prepared, n), u = Object.fromEntries(Object.entries(s).filter(([e]) => {
7191
7205
  if (n.kind == "wait") return e == n.input.handle;
7192
7206
  let t = n.inputs[e];
7193
7207
  return t?.kind != "sources" || t.sources.every((e) => e.kind != "binding");
@@ -7206,7 +7220,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7206
7220
  case "condition": {
7207
7221
  let e = n.cases.find((e) => {
7208
7222
  if (e.expressions.length == 0) return !1;
7209
- let t = e.expressions.map((e) => Zd(n, e, s));
7223
+ let t = e.expressions.map((e) => tf(n, e, s));
7210
7224
  return e.relation == "all" ? t.every(Boolean) : t.some(Boolean);
7211
7225
  })?.output ?? n.defaultOutput;
7212
7226
  d = e == null ? {} : { [e]: s[n.input.handle] ?? null };
@@ -7217,7 +7231,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7217
7231
  break;
7218
7232
  case "subflow": {
7219
7233
  let e = r.prepared.subflows[n.subflowId];
7220
- d = yield* $d(r, {
7234
+ d = yield* rf(r, {
7221
7235
  flowId: n.subflowId,
7222
7236
  graph: e.graph,
7223
7237
  kind: "subflow"
@@ -7229,7 +7243,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7229
7243
  }
7230
7244
  case "task": {
7231
7245
  let e = new Set((n.additionalInputs ?? []).map((e) => e.handle));
7232
- d = Qd(yield* r.invokeTask({
7246
+ d = nf(yield* r.invokeTask({
7233
7247
  additionalInputs: Object.fromEntries(Object.entries(s).filter(([t]) => e.has(t))),
7234
7248
  blockId: n.task == null ? n.taskId : n.task.moduleId,
7235
7249
  flowId: a.flowId,
@@ -7274,8 +7288,8 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7274
7288
  n.kind == "wait" && (ce = !0), ae(e.gen(function* () {
7275
7289
  let a = yield* e.try({
7276
7290
  try: () => {
7277
- let e = Vd(n);
7278
- return Object.fromEntries(Object.entries(Hd(r.prepared, n)).map(([n, r]) => [n, ue(e[n], r, re[t]?.[n], `Node "${t}" input "${n}"`)]));
7291
+ let e = Gd(n);
7292
+ return Object.fromEntries(Object.entries(Kd(r.prepared, n)).map(([n, r]) => [n, ue(e[n], r, re[t]?.[n], `Node "${t}" input "${n}"`)]));
7279
7293
  },
7280
7294
  catch: (e) => e instanceof Error ? e : Error(String(e))
7281
7295
  });
@@ -7301,7 +7315,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7301
7315
  waitId: s
7302
7316
  },
7303
7317
  ...n.notification == null ? {} : { notification: {
7304
- input: Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith(zd)).map(([e, t]) => [e.slice(13), t])),
7318
+ input: Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith(Ud)).map(([e, t]) => [e.slice(13), t])),
7305
7319
  messageHandle: n.notification.messageHandle,
7306
7320
  taskId: n.notification.taskId
7307
7321
  } }
@@ -7313,7 +7327,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7313
7327
  for (let e of m.get(t) ?? []) pe(e);
7314
7328
  }).pipe(e.tapError((n) => e.gen(function* () {
7315
7329
  oe ?? (se ??= n), yield* r.emit({
7316
- ...Rd(n, r.projectFailure),
7330
+ ...Hd(n, r.projectFailure),
7317
7331
  jobId: c,
7318
7332
  nodeId: t,
7319
7333
  runId: o,
@@ -7348,7 +7362,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7348
7362
  if (a.kind == "flow" && e != 1) throw Error("Checkpoint must contain exactly one selected Trigger.");
7349
7363
  for (let [e, t] of Object.entries(re)) {
7350
7364
  let n = a.graph.nodes[e];
7351
- if (!("inputs" in n) || Object.keys(t).some((e) => Hd(r.prepared, n)[e] == null)) throw Error("Checkpoint launch inputs do not match the prepared graph.");
7365
+ if (!("inputs" in n) || Object.keys(t).some((e) => Kd(r.prepared, n)[e] == null)) throw Error("Checkpoint launch inputs do not match the prepared graph.");
7352
7366
  }
7353
7367
  },
7354
7368
  catch: (e) => e instanceof Error ? e : Error(String(e))
@@ -7398,7 +7412,7 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7398
7412
  type: "run.failed"
7399
7413
  }), yield* e.fail(/* @__PURE__ */ Error(`run.checkpoint-too-large: ${t}`));
7400
7414
  }
7401
- let d = Yd(JSON.parse(u));
7415
+ let d = $d(JSON.parse(u));
7402
7416
  return {
7403
7417
  ...n,
7404
7418
  checkpoint: d
@@ -7442,15 +7456,15 @@ function $d(r, a, o, s, c, l = {}, u, d) {
7442
7456
  }), ge;
7443
7457
  }));
7444
7458
  }
7445
- function ef(t, n) {
7459
+ function af(t, n) {
7446
7460
  let r = n.emit ?? (() => e.void);
7447
7461
  return e.gen(function* () {
7448
7462
  if (n.resume != null && (n.inputs != null || n.trigger != null)) return yield* e.fail(/* @__PURE__ */ Error("A resumed Flow Run cannot accept launch inputs or a Trigger seed."));
7449
- let i = n.resume == null ? void 0 : Yd(n.resume.checkpoint);
7463
+ let i = n.resume == null ? void 0 : $d(n.resume.checkpoint);
7450
7464
  if (i != null && new TextEncoder().encode(JSON.stringify(i)).byteLength > 16777216) return yield* e.fail(/* @__PURE__ */ Error("Flow Run checkpoint exceeds 16 MiB."));
7451
7465
  if (i == null && n.trigger == null) return yield* e.fail(/* @__PURE__ */ Error("A Flow Run requires a Trigger seed."));
7452
7466
  let a = n.trigger == null ? void 0 : t.graph.nodes[n.trigger.nodeId];
7453
- return n.trigger != null && (a == null || "inputs" in a) ? yield* e.fail(/* @__PURE__ */ Error(`Node "${n.trigger.nodeId}" is not a TriggerNode in Flow "${n.flowId}".`)) : yield* $d({
7467
+ return n.trigger != null && (a == null || "inputs" in a) ? yield* e.fail(/* @__PURE__ */ Error(`Node "${n.trigger.nodeId}" is not a TriggerNode in Flow "${n.flowId}".`)) : yield* rf({
7454
7468
  bindingValues: i?.bindingValues ?? n.bindingValues ?? {},
7455
7469
  createId: n.createId,
7456
7470
  emit: r,
@@ -7468,4 +7482,4 @@ function ef(t, n) {
7468
7482
  });
7469
7483
  }
7470
7484
  //#endregion
7471
- export { Yd as decodeFlowRunCheckpoint, ef as runFlow };
7485
+ export { $d as decodeFlowRunCheckpoint, af as runFlow };