@oomol-lab/open-flow 0.1.0-beta.39 → 0.1.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/codeDiagnostics-BtH_YuXu.js +44 -0
- package/dist/browser/{createResourceDialog-DnlKSqIs.js → createResourceDialog-BOrW62JW.js} +1 -1
- package/dist/browser/{dist-DYjIVIZC.js → dist-Cdna4VV_.js} +1 -1
- package/dist/browser/{dist-CeSZ2xSM.js → dist-DINmJ4Gr.js} +171 -112
- package/dist/browser/{editorComponent-T-GmTa-C.js → editorComponent-0skblWYk.js} +190 -107
- package/dist/browser/flow-authoring-node.d.ts +2 -5
- package/dist/browser/flow-authoring.js +111 -83
- package/dist/browser/flow-change-schema.d.ts +1 -1
- package/dist/browser/flow-change.d.ts +16 -5
- package/dist/browser/flow-change.js +196 -143
- package/dist/browser/{flowChanges-BXqN4jyH.js → flowChanges-3o9Vs_1I.js} +2479 -3906
- package/dist/browser/{flowWorkspace-a5QLISui.js → flowWorkspace-DJzQVVtZ.js} +12035 -10159
- package/dist/browser/{inputValues-Do4FrC_6.js → inputValues-DkDT6u0o.js} +1 -1
- package/dist/browser/{typeScriptSession-vC9uPDVV.js → typeScriptSession-v9Pb3G6d.js} +136 -136
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +0 -3
- package/dist/browser/workbench.js +1046 -1025
- package/dist/browser/{workbenchSelect-Dx2Y46cD.js → workbenchSelect-B5zXyaaX.js} +1116 -1063
- package/dist/common/connectorDecoders.d.ts +2 -1
- package/dist/common/control-api-conformance.js +1589 -1518
- package/dist/common/control-api.d.ts +18 -6
- package/dist/common/control-api.js +1470 -1392
- package/dist/common/control-requests.js +1550 -1535
- package/dist/common/draftOperations.d.ts +0 -1
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.js +1092 -1060
- package/dist/common/flow-semantics.d.ts +1 -0
- package/dist/common/flow-semantics.js +2777 -2699
- package/dist/common/flowInspection.d.ts +1 -1
- package/dist/common/integration-trigger.js +350 -328
- package/dist/common/mcp.d.ts +27 -0
- package/dist/common/mcp.js +807 -728
- package/dist/common/poll-trigger.js +993 -971
- package/dist/common/provider-triggers.js +1521 -1203
- package/dist/common/runtime-contract.js +13 -6
- package/dist/common/scheduler.js +1430 -1408
- package/dist/common/trigger-catalog.d.ts +2 -1
- package/dist/common/webhook-trigger.js +221 -199
- package/dist/common/{zh-CN-D2od3TNw.js → zh-CN-CxZ3yYfR.js} +2 -2
- package/package.json +1 -1
|
@@ -4535,28 +4535,28 @@ var O = /*@__PURE__*/ x("ZodType", (e, t) => (ac(), C.init(e, t), e.def = t, e.t
|
|
|
4535
4535
|
return e.add(this, t), this;
|
|
4536
4536
|
},
|
|
4537
4537
|
refine(e, t) {
|
|
4538
|
-
return this.check(
|
|
4538
|
+
return this.check(wl(e, t));
|
|
4539
4539
|
},
|
|
4540
4540
|
superRefine(e, t) {
|
|
4541
|
-
return this.check(
|
|
4541
|
+
return this.check(Tl(e, t));
|
|
4542
4542
|
},
|
|
4543
4543
|
overwrite(e) {
|
|
4544
4544
|
return this.check(/* @__PURE__ */ jo(e));
|
|
4545
4545
|
},
|
|
4546
4546
|
optional() {
|
|
4547
|
-
return
|
|
4547
|
+
return il(this);
|
|
4548
4548
|
},
|
|
4549
4549
|
exactOptional() {
|
|
4550
|
-
return
|
|
4550
|
+
return ol(this);
|
|
4551
4551
|
},
|
|
4552
4552
|
nullable() {
|
|
4553
|
-
return
|
|
4553
|
+
return cl(this);
|
|
4554
4554
|
},
|
|
4555
4555
|
nullish() {
|
|
4556
|
-
return
|
|
4556
|
+
return il(cl(this));
|
|
4557
4557
|
},
|
|
4558
4558
|
nonoptional(e) {
|
|
4559
|
-
return
|
|
4559
|
+
return ml(this, e);
|
|
4560
4560
|
},
|
|
4561
4561
|
array() {
|
|
4562
4562
|
return A(this);
|
|
@@ -4568,22 +4568,22 @@ var O = /*@__PURE__*/ x("ZodType", (e, t) => (ac(), C.init(e, t), e.def = t, e.t
|
|
|
4568
4568
|
return Xc(this, e);
|
|
4569
4569
|
},
|
|
4570
4570
|
transform(e) {
|
|
4571
|
-
return
|
|
4571
|
+
return vl(this, nl(e));
|
|
4572
4572
|
},
|
|
4573
4573
|
default(e) {
|
|
4574
|
-
return
|
|
4574
|
+
return ul(this, e);
|
|
4575
4575
|
},
|
|
4576
4576
|
prefault(e) {
|
|
4577
|
-
return
|
|
4577
|
+
return fl(this, e);
|
|
4578
4578
|
},
|
|
4579
4579
|
catch(e) {
|
|
4580
|
-
return
|
|
4580
|
+
return gl(this, e);
|
|
4581
4581
|
},
|
|
4582
4582
|
pipe(e) {
|
|
4583
|
-
return
|
|
4583
|
+
return vl(this, e);
|
|
4584
4584
|
},
|
|
4585
4585
|
readonly() {
|
|
4586
|
-
return
|
|
4586
|
+
return bl(this);
|
|
4587
4587
|
},
|
|
4588
4588
|
describe(e) {
|
|
4589
4589
|
let t = this.clone();
|
|
@@ -4979,7 +4979,7 @@ var Kc = /*@__PURE__*/ x("ZodObject", (e, t) => {
|
|
|
4979
4979
|
oc(), zi.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ds(e, t, n, r), Qt(e, "shape", (e) => e._zod.def.shape, !1);
|
|
4980
4980
|
}, {
|
|
4981
4981
|
keyof() {
|
|
4982
|
-
return
|
|
4982
|
+
return $c(Object.keys(this._zod.def.shape));
|
|
4983
4983
|
},
|
|
4984
4984
|
catchall(e) {
|
|
4985
4985
|
return this.clone(v(this._zod.def, { catchall: e }));
|
|
@@ -5012,13 +5012,13 @@ var Kc = /*@__PURE__*/ x("ZodObject", (e, t) => {
|
|
|
5012
5012
|
return Tt(this, e);
|
|
5013
5013
|
},
|
|
5014
5014
|
partial(...e) {
|
|
5015
|
-
return At(
|
|
5015
|
+
return At(rl, this, e[0]);
|
|
5016
5016
|
},
|
|
5017
5017
|
exactPartial(...e) {
|
|
5018
|
-
return At(
|
|
5018
|
+
return At(al, this, e[0], "exactPartial");
|
|
5019
5019
|
},
|
|
5020
5020
|
required(...e) {
|
|
5021
|
-
return jt(
|
|
5021
|
+
return jt(pl, this, e[0]);
|
|
5022
5022
|
}
|
|
5023
5023
|
});
|
|
5024
5024
|
function j(e, t) {
|
|
@@ -5097,27 +5097,27 @@ var Qc = /*@__PURE__*/ x("ZodEnum", (e, t) => {
|
|
|
5097
5097
|
});
|
|
5098
5098
|
};
|
|
5099
5099
|
});
|
|
5100
|
-
function
|
|
5100
|
+
function $c(e, t) {
|
|
5101
5101
|
return new Qc({
|
|
5102
5102
|
type: "enum",
|
|
5103
5103
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
5104
5104
|
...y(t)
|
|
5105
5105
|
});
|
|
5106
5106
|
}
|
|
5107
|
-
var
|
|
5107
|
+
var el = /*@__PURE__*/ x("ZodLiteral", (e, t) => {
|
|
5108
5108
|
qi.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ss(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
5109
5109
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
5110
5110
|
return t.values[0];
|
|
5111
5111
|
} });
|
|
5112
5112
|
});
|
|
5113
|
-
function
|
|
5114
|
-
return new
|
|
5113
|
+
function P(e, t) {
|
|
5114
|
+
return new el({
|
|
5115
5115
|
type: "literal",
|
|
5116
5116
|
values: Array.isArray(e) ? e : [e],
|
|
5117
5117
|
...y(t)
|
|
5118
5118
|
});
|
|
5119
5119
|
}
|
|
5120
|
-
var
|
|
5120
|
+
var tl = /*@__PURE__*/ x("ZodTransform", (e, t) => {
|
|
5121
5121
|
oc(), Ji.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => ws(e, t, n, r), e._zod.parse = (n, r) => {
|
|
5122
5122
|
if (r.direction === "backward") throw new sn(e.constructor.name);
|
|
5123
5123
|
n.addIssue = (r) => {
|
|
@@ -5131,44 +5131,44 @@ var el = /*@__PURE__*/ x("ZodTransform", (e, t) => {
|
|
|
5131
5131
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
5132
5132
|
};
|
|
5133
5133
|
});
|
|
5134
|
-
function
|
|
5135
|
-
return new
|
|
5134
|
+
function nl(e) {
|
|
5135
|
+
return new tl({
|
|
5136
5136
|
type: "transform",
|
|
5137
5137
|
transform: e
|
|
5138
5138
|
});
|
|
5139
5139
|
}
|
|
5140
|
-
var
|
|
5140
|
+
var rl = /*@__PURE__*/ x("ZodOptional", (e, t) => {
|
|
5141
5141
|
Xi.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Us(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5142
5142
|
});
|
|
5143
|
-
function
|
|
5144
|
-
return new
|
|
5143
|
+
function il(e) {
|
|
5144
|
+
return new rl({
|
|
5145
5145
|
type: "optional",
|
|
5146
5146
|
innerType: e
|
|
5147
5147
|
});
|
|
5148
5148
|
}
|
|
5149
|
-
var
|
|
5149
|
+
var al = /*@__PURE__*/ x("ZodExactOptional", (e, t) => {
|
|
5150
5150
|
Zi.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Us(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5151
5151
|
});
|
|
5152
|
-
function
|
|
5153
|
-
return new
|
|
5152
|
+
function ol(e) {
|
|
5153
|
+
return new al({
|
|
5154
5154
|
type: "optional",
|
|
5155
5155
|
innerType: e
|
|
5156
5156
|
});
|
|
5157
5157
|
}
|
|
5158
|
-
var
|
|
5158
|
+
var sl = /*@__PURE__*/ x("ZodNullable", (e, t) => {
|
|
5159
5159
|
Qi.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ps(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5160
5160
|
});
|
|
5161
|
-
function
|
|
5162
|
-
return new
|
|
5161
|
+
function cl(e) {
|
|
5162
|
+
return new sl({
|
|
5163
5163
|
type: "nullable",
|
|
5164
5164
|
innerType: e
|
|
5165
5165
|
});
|
|
5166
5166
|
}
|
|
5167
|
-
var
|
|
5167
|
+
var ll = /*@__PURE__*/ x("ZodDefault", (e, t) => {
|
|
5168
5168
|
$i.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Rs(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
5169
5169
|
});
|
|
5170
|
-
function
|
|
5171
|
-
return new
|
|
5170
|
+
function ul(e, t) {
|
|
5171
|
+
return new ll({
|
|
5172
5172
|
type: "default",
|
|
5173
5173
|
innerType: e,
|
|
5174
5174
|
get defaultValue() {
|
|
@@ -5176,11 +5176,11 @@ function ll(e, t) {
|
|
|
5176
5176
|
}
|
|
5177
5177
|
});
|
|
5178
5178
|
}
|
|
5179
|
-
var
|
|
5179
|
+
var dl = /*@__PURE__*/ x("ZodPrefault", (e, t) => {
|
|
5180
5180
|
ta.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => zs(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5181
5181
|
});
|
|
5182
|
-
function
|
|
5183
|
-
return new
|
|
5182
|
+
function fl(e, t) {
|
|
5183
|
+
return new dl({
|
|
5184
5184
|
type: "prefault",
|
|
5185
5185
|
innerType: e,
|
|
5186
5186
|
get defaultValue() {
|
|
@@ -5188,65 +5188,65 @@ function dl(e, t) {
|
|
|
5188
5188
|
}
|
|
5189
5189
|
});
|
|
5190
5190
|
}
|
|
5191
|
-
var
|
|
5191
|
+
var pl = /*@__PURE__*/ x("ZodNonOptional", (e, t) => {
|
|
5192
5192
|
na.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fs(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5193
5193
|
});
|
|
5194
|
-
function
|
|
5195
|
-
return new
|
|
5194
|
+
function ml(e, t) {
|
|
5195
|
+
return new pl({
|
|
5196
5196
|
type: "nonoptional",
|
|
5197
5197
|
innerType: e,
|
|
5198
5198
|
...y(t)
|
|
5199
5199
|
});
|
|
5200
5200
|
}
|
|
5201
|
-
var
|
|
5201
|
+
var hl = /*@__PURE__*/ x("ZodCatch", (e, t) => {
|
|
5202
5202
|
aa.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bs(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
5203
5203
|
});
|
|
5204
|
-
function
|
|
5205
|
-
return new
|
|
5204
|
+
function gl(e, t) {
|
|
5205
|
+
return new hl({
|
|
5206
5206
|
type: "catch",
|
|
5207
5207
|
innerType: e,
|
|
5208
5208
|
catchValue: typeof t == "function" ? t : en(t)
|
|
5209
5209
|
});
|
|
5210
5210
|
}
|
|
5211
|
-
var
|
|
5211
|
+
var _l = /*@__PURE__*/ x("ZodPipe", (e, t) => {
|
|
5212
5212
|
oa.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vs(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
5213
5213
|
});
|
|
5214
|
-
function
|
|
5215
|
-
return new
|
|
5214
|
+
function vl(e, t) {
|
|
5215
|
+
return new _l({
|
|
5216
5216
|
type: "pipe",
|
|
5217
5217
|
in: e,
|
|
5218
5218
|
out: t
|
|
5219
5219
|
});
|
|
5220
5220
|
}
|
|
5221
|
-
var
|
|
5221
|
+
var yl = /*@__PURE__*/ x("ZodReadonly", (e, t) => {
|
|
5222
5222
|
ca.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hs(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
5223
5223
|
});
|
|
5224
|
-
function
|
|
5225
|
-
return new
|
|
5224
|
+
function bl(e) {
|
|
5225
|
+
return new yl({
|
|
5226
5226
|
type: "readonly",
|
|
5227
5227
|
innerType: e
|
|
5228
5228
|
});
|
|
5229
5229
|
}
|
|
5230
|
-
var
|
|
5230
|
+
var xl = /*@__PURE__*/ x("ZodLazy", (e, t) => {
|
|
5231
5231
|
ua.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ws(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
5232
5232
|
});
|
|
5233
|
-
function
|
|
5234
|
-
return new
|
|
5233
|
+
function Sl(e) {
|
|
5234
|
+
return new xl({
|
|
5235
5235
|
type: "lazy",
|
|
5236
5236
|
getter: e
|
|
5237
5237
|
});
|
|
5238
5238
|
}
|
|
5239
|
-
var
|
|
5239
|
+
var Cl = /*@__PURE__*/ x("ZodCustom", (e, t) => {
|
|
5240
5240
|
da.init(e, t), O.init(e, t), e._zod.processJSONSchema = (t, n, r) => Cs(e, t, n, r);
|
|
5241
5241
|
});
|
|
5242
|
-
function
|
|
5243
|
-
return /* @__PURE__ */ Ro(
|
|
5242
|
+
function wl(e, t = {}) {
|
|
5243
|
+
return /* @__PURE__ */ Ro(Cl, e, t);
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function Tl(e, t) {
|
|
5246
5246
|
return /* @__PURE__ */ zo(e, t);
|
|
5247
5247
|
}
|
|
5248
|
-
function
|
|
5249
|
-
let t =
|
|
5248
|
+
function El(e) {
|
|
5249
|
+
let t = Sl(() => M([
|
|
5250
5250
|
lc(e),
|
|
5251
5251
|
Pc(),
|
|
5252
5252
|
Rc(),
|
|
@@ -5258,13 +5258,13 @@ function Tl(e) {
|
|
|
5258
5258
|
}
|
|
5259
5259
|
//#endregion
|
|
5260
5260
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
5261
|
-
var
|
|
5262
|
-
type:
|
|
5261
|
+
var Dl = A(M([j({
|
|
5262
|
+
type: P("cron"),
|
|
5263
5263
|
expression: lc(),
|
|
5264
5264
|
timezone: lc()
|
|
5265
5265
|
}), j({
|
|
5266
|
-
type:
|
|
5267
|
-
unit:
|
|
5266
|
+
type: P("every"),
|
|
5267
|
+
unit: $c([
|
|
5268
5268
|
"day",
|
|
5269
5269
|
"hour",
|
|
5270
5270
|
"minute",
|
|
@@ -5272,122 +5272,137 @@ var El = A(M([j({
|
|
|
5272
5272
|
"week"
|
|
5273
5273
|
]),
|
|
5274
5274
|
value: Pc()
|
|
5275
|
-
})])),
|
|
5275
|
+
})])), Ol = [
|
|
5276
5276
|
"GET",
|
|
5277
5277
|
"POST",
|
|
5278
5278
|
"PUT",
|
|
5279
5279
|
"PATCH",
|
|
5280
5280
|
"DELETE"
|
|
5281
|
-
],
|
|
5282
|
-
description:
|
|
5283
|
-
jsonSchema:
|
|
5281
|
+
], F = lc(), kl = El(), Al = A(F), jl = j({
|
|
5282
|
+
description: F.optional(),
|
|
5283
|
+
jsonSchema: kl,
|
|
5284
5284
|
nullable: Rc(),
|
|
5285
|
-
handle:
|
|
5286
|
-
}),
|
|
5285
|
+
handle: F
|
|
5286
|
+
}), I = jl.extend({ value: kl.optional() }), Ml = j({
|
|
5287
5287
|
collapsed: Rc().optional(),
|
|
5288
|
-
group:
|
|
5289
|
-
}), Ml = j({
|
|
5290
|
-
kind: F("node"),
|
|
5291
|
-
nodeId: I,
|
|
5292
|
-
output: I,
|
|
5293
|
-
field: I.optional()
|
|
5288
|
+
group: F
|
|
5294
5289
|
}), Nl = j({
|
|
5295
|
-
kind:
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5290
|
+
kind: P("node"),
|
|
5291
|
+
nodeId: F,
|
|
5292
|
+
output: F,
|
|
5293
|
+
field: F.optional()
|
|
5294
|
+
}), Pl = j({
|
|
5295
|
+
kind: P("flow"),
|
|
5296
|
+
input: F
|
|
5297
|
+
}), Fl = M([
|
|
5299
5298
|
Nl,
|
|
5299
|
+
Pl,
|
|
5300
5300
|
j({
|
|
5301
|
-
kind:
|
|
5302
|
-
bindingId:
|
|
5301
|
+
kind: P("binding"),
|
|
5302
|
+
bindingId: F
|
|
5303
5303
|
})
|
|
5304
|
-
]),
|
|
5305
|
-
kind:
|
|
5306
|
-
value:
|
|
5307
|
-
})]),
|
|
5308
|
-
kind:
|
|
5309
|
-
sources: A(
|
|
5310
|
-
})]),
|
|
5311
|
-
inputs: A(M([
|
|
5312
|
-
outputs: A(M([
|
|
5313
|
-
},
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
})
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
}),
|
|
5335
|
-
|
|
5336
|
-
|
|
5304
|
+
]), Il = M([j({ kind: P("unset") }), j({
|
|
5305
|
+
kind: P("value"),
|
|
5306
|
+
value: kl
|
|
5307
|
+
})]), Ll = M([Il, j({
|
|
5308
|
+
kind: P("sources"),
|
|
5309
|
+
sources: A(Fl)
|
|
5310
|
+
})]), Rl = N(F, Ll), zl = {
|
|
5311
|
+
inputs: A(M([I, Ml])),
|
|
5312
|
+
outputs: A(M([jl, Ml]))
|
|
5313
|
+
}, Bl = M([
|
|
5314
|
+
qc({
|
|
5315
|
+
kind: P("connector"),
|
|
5316
|
+
action: F,
|
|
5317
|
+
connectionId: F.optional(),
|
|
5318
|
+
connections: A(qc({
|
|
5319
|
+
connectionId: F,
|
|
5320
|
+
alias: F.optional()
|
|
5321
|
+
}))
|
|
5322
|
+
}),
|
|
5323
|
+
qc({
|
|
5324
|
+
kind: P("connector"),
|
|
5325
|
+
mode: P("shared")
|
|
5326
|
+
}),
|
|
5327
|
+
qc({
|
|
5328
|
+
kind: P("connector"),
|
|
5329
|
+
mode: P("independent"),
|
|
5330
|
+
actions: A(qc({
|
|
5331
|
+
action: F,
|
|
5332
|
+
connectionId: F.optional()
|
|
5333
|
+
}))
|
|
5334
|
+
}),
|
|
5335
|
+
qc({
|
|
5336
|
+
kind: P("connector"),
|
|
5337
|
+
actionHints: A(F).optional(),
|
|
5338
|
+
connectionHints: A(qc({
|
|
5339
|
+
action: F,
|
|
5340
|
+
connectionId: F,
|
|
5341
|
+
alias: F.optional()
|
|
5342
|
+
})).optional()
|
|
5343
|
+
})
|
|
5344
|
+
]), Vl = j({
|
|
5345
|
+
...zl,
|
|
5346
|
+
name: F,
|
|
5347
|
+
moduleId: F,
|
|
5348
|
+
capabilities: A(Bl).optional()
|
|
5349
|
+
}), Hl = M([j({
|
|
5350
|
+
kind: P("value"),
|
|
5351
|
+
value: kl
|
|
5337
5352
|
}), j({
|
|
5338
|
-
kind:
|
|
5339
|
-
input:
|
|
5340
|
-
})]),
|
|
5341
|
-
...
|
|
5342
|
-
name:
|
|
5353
|
+
kind: P("input"),
|
|
5354
|
+
input: F
|
|
5355
|
+
})]), Ul = M([Hl, j({ kind: P("model") })]), Wl = j({
|
|
5356
|
+
...zl,
|
|
5357
|
+
name: F,
|
|
5343
5358
|
executor: M([
|
|
5344
5359
|
j({
|
|
5345
|
-
kind:
|
|
5346
|
-
action:
|
|
5347
|
-
connectionId:
|
|
5360
|
+
kind: P("connector"),
|
|
5361
|
+
action: F,
|
|
5362
|
+
connectionId: F.optional()
|
|
5348
5363
|
}),
|
|
5349
5364
|
j({
|
|
5350
|
-
kind:
|
|
5351
|
-
mode:
|
|
5365
|
+
kind: P("llm"),
|
|
5366
|
+
mode: $c(["chat", "json"])
|
|
5352
5367
|
}),
|
|
5353
5368
|
j({
|
|
5354
|
-
kind:
|
|
5369
|
+
kind: P("agent"),
|
|
5355
5370
|
code: Rc().optional(),
|
|
5356
|
-
model:
|
|
5357
|
-
prompt:
|
|
5358
|
-
system:
|
|
5371
|
+
model: F,
|
|
5372
|
+
prompt: Hl,
|
|
5373
|
+
system: F,
|
|
5359
5374
|
maxRounds: Pc(),
|
|
5360
5375
|
tools: A(j({
|
|
5361
|
-
id:
|
|
5362
|
-
name:
|
|
5363
|
-
description:
|
|
5364
|
-
action:
|
|
5365
|
-
connectionId:
|
|
5376
|
+
id: F,
|
|
5377
|
+
name: F,
|
|
5378
|
+
description: F,
|
|
5379
|
+
action: F,
|
|
5380
|
+
connectionId: F.optional(),
|
|
5366
5381
|
approval: Rc(),
|
|
5367
|
-
inputs: A(
|
|
5382
|
+
inputs: A(I.extend({ source: Ul }))
|
|
5368
5383
|
})),
|
|
5369
5384
|
notification: j({
|
|
5370
|
-
taskId:
|
|
5371
|
-
messageHandle:
|
|
5372
|
-
inputs: N(
|
|
5385
|
+
taskId: F,
|
|
5386
|
+
messageHandle: F,
|
|
5387
|
+
inputs: N(F, Hl)
|
|
5373
5388
|
}).optional()
|
|
5374
5389
|
})
|
|
5375
5390
|
])
|
|
5376
|
-
}),
|
|
5377
|
-
kind:
|
|
5378
|
-
value:
|
|
5379
|
-
jsonSchema:
|
|
5391
|
+
}), Gl = M([j({
|
|
5392
|
+
kind: P("value"),
|
|
5393
|
+
value: kl.optional(),
|
|
5394
|
+
jsonSchema: kl.optional()
|
|
5380
5395
|
}), j({
|
|
5381
|
-
kind:
|
|
5382
|
-
source:
|
|
5383
|
-
})]),
|
|
5384
|
-
matchMode:
|
|
5396
|
+
kind: P("source"),
|
|
5397
|
+
source: Fl
|
|
5398
|
+
})]), Kl = {
|
|
5399
|
+
matchMode: $c(["first", "all"]),
|
|
5385
5400
|
cases: A(j({
|
|
5386
|
-
description:
|
|
5387
|
-
output:
|
|
5401
|
+
description: F.optional(),
|
|
5402
|
+
output: F,
|
|
5388
5403
|
groups: A(j({ expressions: A(j({
|
|
5389
|
-
left:
|
|
5390
|
-
operator:
|
|
5404
|
+
left: Gl,
|
|
5405
|
+
operator: $c([
|
|
5391
5406
|
"!=",
|
|
5392
5407
|
"<",
|
|
5393
5408
|
"<=",
|
|
@@ -5409,44 +5424,44 @@ var El = A(M([j({
|
|
|
5409
5424
|
"notHasValue",
|
|
5410
5425
|
"startsWith"
|
|
5411
5426
|
]),
|
|
5412
|
-
right:
|
|
5427
|
+
right: Gl.optional()
|
|
5413
5428
|
})) }))
|
|
5414
5429
|
}))
|
|
5415
|
-
},
|
|
5416
|
-
inputDefinitions: A(
|
|
5417
|
-
prompt:
|
|
5418
|
-
},
|
|
5430
|
+
}, ql = {
|
|
5431
|
+
inputDefinitions: A(I),
|
|
5432
|
+
prompt: F
|
|
5433
|
+
}, Jl = j({
|
|
5419
5434
|
allowedMethods: Wc().optional(),
|
|
5420
|
-
allowedOrigins:
|
|
5435
|
+
allowedOrigins: Al.optional(),
|
|
5421
5436
|
noResponseBody: Wc().optional(),
|
|
5422
|
-
responseData:
|
|
5423
|
-
responseHeaders: N(
|
|
5437
|
+
responseData: F.optional(),
|
|
5438
|
+
responseHeaders: N(F, F).optional(),
|
|
5424
5439
|
responseStatusCode: Pc().int().min(200).max(599).optional()
|
|
5425
|
-
}),
|
|
5426
|
-
bodyFields: A(
|
|
5427
|
-
method:
|
|
5428
|
-
options:
|
|
5429
|
-
},
|
|
5430
|
-
configInputs:
|
|
5431
|
-
definitionVersion:
|
|
5432
|
-
description:
|
|
5433
|
-
displayName:
|
|
5434
|
-
key:
|
|
5435
|
-
name:
|
|
5436
|
-
outputs: A(
|
|
5437
|
-
provider:
|
|
5438
|
-
},
|
|
5440
|
+
}), Yl = {
|
|
5441
|
+
bodyFields: A(I),
|
|
5442
|
+
method: $c(Ol),
|
|
5443
|
+
options: Jl.optional()
|
|
5444
|
+
}, Xl = {
|
|
5445
|
+
configInputs: zl.inputs,
|
|
5446
|
+
definitionVersion: P(2),
|
|
5447
|
+
description: F,
|
|
5448
|
+
displayName: F,
|
|
5449
|
+
key: F,
|
|
5450
|
+
name: F,
|
|
5451
|
+
outputs: A(jl).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
5452
|
+
provider: F
|
|
5453
|
+
}, Zl = j({
|
|
5439
5454
|
body: j({
|
|
5440
5455
|
allowArray: Rc(),
|
|
5441
5456
|
allowEmpty: Rc(),
|
|
5442
|
-
formats: A(
|
|
5457
|
+
formats: A($c([
|
|
5443
5458
|
"form",
|
|
5444
5459
|
"json",
|
|
5445
5460
|
"multipart",
|
|
5446
5461
|
"text"
|
|
5447
5462
|
]))
|
|
5448
5463
|
}),
|
|
5449
|
-
methods: A(
|
|
5464
|
+
methods: A($c([
|
|
5450
5465
|
"DELETE",
|
|
5451
5466
|
"GET",
|
|
5452
5467
|
"HEAD",
|
|
@@ -5455,317 +5470,324 @@ var El = A(M([j({
|
|
|
5455
5470
|
"PUT"
|
|
5456
5471
|
])),
|
|
5457
5472
|
successStatus: Pc()
|
|
5458
|
-
}),
|
|
5459
|
-
name:
|
|
5460
|
-
description:
|
|
5461
|
-
icon:
|
|
5462
|
-
},
|
|
5473
|
+
}), Ql = {
|
|
5474
|
+
name: F,
|
|
5475
|
+
description: F.optional(),
|
|
5476
|
+
icon: F.optional()
|
|
5477
|
+
}, $l = {
|
|
5463
5478
|
maxExecutions: Pc().int().positive().max(2 ** 53 - 1).optional(),
|
|
5464
|
-
inputs:
|
|
5465
|
-
name:
|
|
5466
|
-
description:
|
|
5467
|
-
icon:
|
|
5479
|
+
inputs: Rl,
|
|
5480
|
+
name: F.optional(),
|
|
5481
|
+
description: F.optional(),
|
|
5482
|
+
icon: F.optional(),
|
|
5468
5483
|
timeoutMs: Pc().optional()
|
|
5469
|
-
},
|
|
5484
|
+
}, eu = M([
|
|
5470
5485
|
j({
|
|
5471
|
-
|
|
5472
|
-
inputs: N(
|
|
5473
|
-
kind:
|
|
5474
|
-
...
|
|
5486
|
+
...$l,
|
|
5487
|
+
inputs: N(F, Wc()),
|
|
5488
|
+
kind: P("condition"),
|
|
5489
|
+
...Kl
|
|
5475
5490
|
}),
|
|
5476
5491
|
j({
|
|
5477
|
-
|
|
5492
|
+
...$l,
|
|
5478
5493
|
inputs: Hc().transform(() => ({})).default({}),
|
|
5479
|
-
kind:
|
|
5480
|
-
values: A(
|
|
5494
|
+
kind: P("value"),
|
|
5495
|
+
values: A(I)
|
|
5481
5496
|
}),
|
|
5482
5497
|
j({
|
|
5483
|
-
|
|
5484
|
-
kind:
|
|
5485
|
-
subflowId:
|
|
5498
|
+
...$l,
|
|
5499
|
+
kind: P("subflow"),
|
|
5500
|
+
subflowId: F
|
|
5486
5501
|
}),
|
|
5487
5502
|
j({
|
|
5488
|
-
|
|
5489
|
-
kind:
|
|
5490
|
-
task:
|
|
5491
|
-
additionalInputs: A(
|
|
5503
|
+
...$l,
|
|
5504
|
+
kind: P("task"),
|
|
5505
|
+
task: Vl,
|
|
5506
|
+
additionalInputs: A(I).optional()
|
|
5492
5507
|
}),
|
|
5493
5508
|
j({
|
|
5494
|
-
|
|
5495
|
-
kind:
|
|
5496
|
-
taskId:
|
|
5497
|
-
additionalInputs: A(
|
|
5509
|
+
...$l,
|
|
5510
|
+
kind: P("task"),
|
|
5511
|
+
taskId: F,
|
|
5512
|
+
additionalInputs: A(I).optional()
|
|
5498
5513
|
}),
|
|
5499
5514
|
qc({
|
|
5500
|
-
|
|
5501
|
-
kind:
|
|
5502
|
-
...
|
|
5515
|
+
...$l,
|
|
5516
|
+
kind: P("approval"),
|
|
5517
|
+
...ql
|
|
5503
5518
|
}).omit({ timeoutMs: !0 }),
|
|
5504
5519
|
qc({
|
|
5505
|
-
|
|
5506
|
-
kind:
|
|
5507
|
-
...
|
|
5520
|
+
...$l,
|
|
5521
|
+
kind: P("wait"),
|
|
5522
|
+
...ql
|
|
5508
5523
|
}).omit({ timeoutMs: !0 }),
|
|
5509
5524
|
j({
|
|
5510
|
-
...
|
|
5511
|
-
kind:
|
|
5525
|
+
...Ql,
|
|
5526
|
+
kind: P("manual")
|
|
5512
5527
|
}),
|
|
5513
5528
|
j({
|
|
5514
|
-
...
|
|
5515
|
-
kind:
|
|
5516
|
-
...
|
|
5529
|
+
...Ql,
|
|
5530
|
+
kind: P("webhook"),
|
|
5531
|
+
...Yl
|
|
5517
5532
|
}),
|
|
5518
5533
|
j({
|
|
5519
|
-
...
|
|
5520
|
-
kind:
|
|
5521
|
-
cronTimes:
|
|
5534
|
+
...Ql,
|
|
5535
|
+
kind: P("cron"),
|
|
5536
|
+
cronTimes: Dl
|
|
5522
5537
|
}),
|
|
5523
5538
|
j({
|
|
5524
|
-
...
|
|
5525
|
-
kind:
|
|
5526
|
-
|
|
5527
|
-
config: N(
|
|
5539
|
+
...Ql,
|
|
5540
|
+
kind: P("poll"),
|
|
5541
|
+
connectionId: F.min(1).optional(),
|
|
5542
|
+
config: N(F, Il),
|
|
5528
5543
|
definition: j({
|
|
5529
|
-
...
|
|
5530
|
-
type:
|
|
5544
|
+
...Xl,
|
|
5545
|
+
type: P("poll")
|
|
5531
5546
|
}),
|
|
5532
|
-
pollTimes:
|
|
5547
|
+
pollTimes: Dl
|
|
5533
5548
|
}),
|
|
5534
5549
|
j({
|
|
5535
|
-
...
|
|
5536
|
-
kind:
|
|
5537
|
-
|
|
5538
|
-
config: N(
|
|
5550
|
+
...Ql,
|
|
5551
|
+
kind: P("integration"),
|
|
5552
|
+
connectionId: F.min(1).optional(),
|
|
5553
|
+
config: N(F, Il),
|
|
5539
5554
|
definition: j({
|
|
5540
|
-
...
|
|
5541
|
-
type:
|
|
5542
|
-
endpoint:
|
|
5555
|
+
...Xl,
|
|
5556
|
+
type: P("integration"),
|
|
5557
|
+
endpoint: Zl
|
|
5543
5558
|
})
|
|
5544
5559
|
})
|
|
5545
|
-
]),
|
|
5546
|
-
kind:
|
|
5547
|
-
id:
|
|
5548
|
-
})]),
|
|
5549
|
-
source:
|
|
5550
|
-
target:
|
|
5551
|
-
sourceHandle:
|
|
5552
|
-
}),
|
|
5553
|
-
nodeId:
|
|
5554
|
-
target:
|
|
5555
|
-
},
|
|
5556
|
-
name:
|
|
5557
|
-
inputs: A(
|
|
5558
|
-
outputs: A(
|
|
5559
|
-
}), ru = j({
|
|
5560
|
-
nodes: N(I, $l),
|
|
5561
|
-
edges: A(tu).default([])
|
|
5560
|
+
]), tu = M([j({ kind: P("flow") }), j({
|
|
5561
|
+
kind: P("subflow"),
|
|
5562
|
+
id: F
|
|
5563
|
+
})]), nu = j({
|
|
5564
|
+
source: F,
|
|
5565
|
+
target: F,
|
|
5566
|
+
sourceHandle: F.optional()
|
|
5567
|
+
}), L = {
|
|
5568
|
+
nodeId: F,
|
|
5569
|
+
target: tu
|
|
5570
|
+
}, ru = j({
|
|
5571
|
+
name: F,
|
|
5572
|
+
inputs: A(I),
|
|
5573
|
+
outputs: A(jl.extend({ sources: A(M([Nl, Pl])) }))
|
|
5562
5574
|
}), iu = j({
|
|
5563
|
-
|
|
5564
|
-
|
|
5575
|
+
nodes: N(F, eu),
|
|
5576
|
+
edges: A(nu).default([])
|
|
5565
5577
|
}), au = j({
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
source: I
|
|
5578
|
+
kind: P("variable"),
|
|
5579
|
+
target: F
|
|
5569
5580
|
}), ou = j({
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5581
|
+
name: F,
|
|
5582
|
+
imports: Al,
|
|
5583
|
+
source: F
|
|
5584
|
+
}), su = j({
|
|
5585
|
+
bindings: N(F, au),
|
|
5586
|
+
graph: iu,
|
|
5587
|
+
subflows: N(F, ru.extend({ graph: iu })),
|
|
5588
|
+
tasks: N(F, Wl)
|
|
5574
5589
|
});
|
|
5575
5590
|
j({
|
|
5576
|
-
modelVersion: M([
|
|
5577
|
-
document:
|
|
5578
|
-
modules: N(
|
|
5591
|
+
modelVersion: M([P(2), P(4)]),
|
|
5592
|
+
document: su,
|
|
5593
|
+
modules: N(F, ou)
|
|
5579
5594
|
}).extend({
|
|
5580
|
-
kind:
|
|
5581
|
-
version:
|
|
5595
|
+
kind: P("open-flow-flow-revision"),
|
|
5596
|
+
version: P(1)
|
|
5582
5597
|
});
|
|
5583
|
-
var
|
|
5598
|
+
var cu = {
|
|
5584
5599
|
"binding.create": {
|
|
5585
|
-
bindingId:
|
|
5586
|
-
binding:
|
|
5600
|
+
bindingId: F,
|
|
5601
|
+
binding: au
|
|
5587
5602
|
},
|
|
5588
|
-
"binding.delete": { bindingId:
|
|
5603
|
+
"binding.delete": { bindingId: F },
|
|
5589
5604
|
"binding.target.set": {
|
|
5590
|
-
bindingId:
|
|
5591
|
-
before:
|
|
5592
|
-
value:
|
|
5605
|
+
bindingId: F,
|
|
5606
|
+
before: F,
|
|
5607
|
+
value: F
|
|
5593
5608
|
},
|
|
5594
5609
|
"graph.edge.connect": {
|
|
5595
|
-
target:
|
|
5596
|
-
edge:
|
|
5610
|
+
target: tu,
|
|
5611
|
+
edge: nu
|
|
5597
5612
|
},
|
|
5598
5613
|
"graph.edge.disconnect": {
|
|
5599
|
-
target:
|
|
5600
|
-
edge:
|
|
5614
|
+
target: tu,
|
|
5615
|
+
edge: nu
|
|
5601
5616
|
},
|
|
5602
5617
|
"graph.node.create": {
|
|
5603
|
-
...
|
|
5604
|
-
node:
|
|
5618
|
+
...L,
|
|
5619
|
+
node: eu
|
|
5605
5620
|
},
|
|
5606
|
-
"graph.node.delete":
|
|
5621
|
+
"graph.node.delete": L,
|
|
5607
5622
|
"graph.node.field.set": M([
|
|
5608
5623
|
j({
|
|
5609
|
-
...
|
|
5610
|
-
kind:
|
|
5611
|
-
field: P(
|
|
5624
|
+
...L,
|
|
5625
|
+
kind: P("graph.node.field.set"),
|
|
5626
|
+
field: P("connectionId"),
|
|
5627
|
+
before: F.min(1).optional(),
|
|
5628
|
+
value: F.min(1).optional()
|
|
5629
|
+
}),
|
|
5630
|
+
j({
|
|
5631
|
+
...L,
|
|
5632
|
+
kind: P("graph.node.field.set"),
|
|
5633
|
+
field: $c([
|
|
5612
5634
|
"description",
|
|
5613
5635
|
"icon",
|
|
5614
5636
|
"name"
|
|
5615
5637
|
]),
|
|
5616
|
-
before:
|
|
5617
|
-
value:
|
|
5638
|
+
before: F.optional(),
|
|
5639
|
+
value: F.optional()
|
|
5618
5640
|
}),
|
|
5619
5641
|
j({
|
|
5620
|
-
...
|
|
5621
|
-
kind:
|
|
5622
|
-
field:
|
|
5642
|
+
...L,
|
|
5643
|
+
kind: P("graph.node.field.set"),
|
|
5644
|
+
field: P("maxExecutions"),
|
|
5623
5645
|
before: Pc().int().positive().max(2 ** 53 - 1).optional(),
|
|
5624
5646
|
value: Pc().int().positive().max(2 ** 53 - 1).optional()
|
|
5625
5647
|
}),
|
|
5626
5648
|
j({
|
|
5627
|
-
...
|
|
5628
|
-
kind:
|
|
5629
|
-
field:
|
|
5649
|
+
...L,
|
|
5650
|
+
kind: P("graph.node.field.set"),
|
|
5651
|
+
field: P("timeoutMs"),
|
|
5630
5652
|
before: Pc().optional(),
|
|
5631
5653
|
value: Pc().optional()
|
|
5632
5654
|
})
|
|
5633
5655
|
]),
|
|
5634
5656
|
"graph.node.input.set": {
|
|
5635
|
-
...
|
|
5636
|
-
handle:
|
|
5637
|
-
before:
|
|
5638
|
-
value:
|
|
5657
|
+
...L,
|
|
5658
|
+
handle: F,
|
|
5659
|
+
before: Ll.optional(),
|
|
5660
|
+
value: Ll.optional()
|
|
5639
5661
|
},
|
|
5640
5662
|
"graph.node.additional-inputs.set": {
|
|
5641
|
-
...
|
|
5642
|
-
before: A(
|
|
5643
|
-
value: A(
|
|
5663
|
+
...L,
|
|
5664
|
+
before: A(I).optional(),
|
|
5665
|
+
value: A(I).optional()
|
|
5644
5666
|
},
|
|
5645
5667
|
"graph.node.condition.set": {
|
|
5646
|
-
...
|
|
5647
|
-
before: j(
|
|
5648
|
-
value: j(
|
|
5668
|
+
...L,
|
|
5669
|
+
before: j(Kl),
|
|
5670
|
+
value: j(Kl)
|
|
5649
5671
|
},
|
|
5650
5672
|
"graph.node.values.set": {
|
|
5651
|
-
...
|
|
5652
|
-
before: A(
|
|
5653
|
-
value: A(
|
|
5673
|
+
...L,
|
|
5674
|
+
before: A(I),
|
|
5675
|
+
value: A(I)
|
|
5654
5676
|
},
|
|
5655
5677
|
"graph.node.resolution.set": {
|
|
5656
|
-
...
|
|
5657
|
-
target: j({ kind:
|
|
5658
|
-
before: j(
|
|
5659
|
-
value: j(
|
|
5678
|
+
...L,
|
|
5679
|
+
target: j({ kind: P("flow") }),
|
|
5680
|
+
before: j(ql),
|
|
5681
|
+
value: j(ql)
|
|
5660
5682
|
},
|
|
5661
5683
|
"graph.node.webhook.set": {
|
|
5662
|
-
...
|
|
5663
|
-
target: j({ kind:
|
|
5664
|
-
before: j(
|
|
5665
|
-
value: j(
|
|
5684
|
+
...L,
|
|
5685
|
+
target: j({ kind: P("flow") }),
|
|
5686
|
+
before: j(Yl),
|
|
5687
|
+
value: j(Yl)
|
|
5666
5688
|
},
|
|
5667
5689
|
"graph.node.task.ports.set": {
|
|
5668
|
-
...
|
|
5669
|
-
before: j(
|
|
5670
|
-
value: j(
|
|
5690
|
+
...L,
|
|
5691
|
+
before: j(zl),
|
|
5692
|
+
value: j(zl)
|
|
5671
5693
|
},
|
|
5672
5694
|
"graph.node.task.name.set": {
|
|
5673
|
-
...
|
|
5674
|
-
before:
|
|
5675
|
-
value:
|
|
5695
|
+
...L,
|
|
5696
|
+
before: F,
|
|
5697
|
+
value: F
|
|
5676
5698
|
},
|
|
5677
5699
|
"graph.node.task.capabilities.set": {
|
|
5678
|
-
...
|
|
5679
|
-
before: A(
|
|
5680
|
-
value: A(
|
|
5700
|
+
...L,
|
|
5701
|
+
before: A(Bl).optional(),
|
|
5702
|
+
value: A(Bl).optional()
|
|
5681
5703
|
},
|
|
5682
5704
|
"graph.trigger.config.set": {
|
|
5683
|
-
nodeId:
|
|
5684
|
-
name:
|
|
5685
|
-
before:
|
|
5686
|
-
value:
|
|
5705
|
+
nodeId: F,
|
|
5706
|
+
name: F,
|
|
5707
|
+
before: Il.optional(),
|
|
5708
|
+
value: Il.optional()
|
|
5687
5709
|
},
|
|
5688
5710
|
"graph.trigger.schedule.set": {
|
|
5689
|
-
nodeId:
|
|
5690
|
-
before:
|
|
5691
|
-
value:
|
|
5711
|
+
nodeId: F,
|
|
5712
|
+
before: Dl,
|
|
5713
|
+
value: Dl
|
|
5692
5714
|
},
|
|
5693
5715
|
"module.create": {
|
|
5694
|
-
moduleId:
|
|
5695
|
-
module:
|
|
5716
|
+
moduleId: F,
|
|
5717
|
+
module: ou
|
|
5696
5718
|
},
|
|
5697
|
-
"module.delete": { moduleId:
|
|
5719
|
+
"module.delete": { moduleId: F },
|
|
5698
5720
|
"module.rename": {
|
|
5699
|
-
moduleId:
|
|
5700
|
-
before:
|
|
5701
|
-
name:
|
|
5721
|
+
moduleId: F,
|
|
5722
|
+
before: F,
|
|
5723
|
+
name: F
|
|
5702
5724
|
},
|
|
5703
5725
|
"module.source.replace": {
|
|
5704
|
-
moduleId:
|
|
5705
|
-
beforeImports:
|
|
5706
|
-
beforeSource:
|
|
5707
|
-
imports:
|
|
5708
|
-
source:
|
|
5726
|
+
moduleId: F,
|
|
5727
|
+
beforeImports: Al,
|
|
5728
|
+
beforeSource: F,
|
|
5729
|
+
imports: Al,
|
|
5730
|
+
source: F
|
|
5709
5731
|
},
|
|
5710
5732
|
"subflow.create": {
|
|
5711
|
-
subflowId:
|
|
5712
|
-
subflow:
|
|
5733
|
+
subflowId: F,
|
|
5734
|
+
subflow: ru.extend({ graph: iu })
|
|
5713
5735
|
},
|
|
5714
5736
|
"subflow.definition.set": {
|
|
5715
|
-
subflowId:
|
|
5716
|
-
before:
|
|
5717
|
-
definition:
|
|
5737
|
+
subflowId: F,
|
|
5738
|
+
before: ru,
|
|
5739
|
+
definition: ru
|
|
5718
5740
|
},
|
|
5719
|
-
"subflow.delete": { subflowId:
|
|
5741
|
+
"subflow.delete": { subflowId: F },
|
|
5720
5742
|
"task.create": {
|
|
5721
|
-
taskId:
|
|
5722
|
-
task:
|
|
5743
|
+
taskId: F,
|
|
5744
|
+
task: Wl
|
|
5723
5745
|
},
|
|
5724
|
-
"task.delete": { taskId:
|
|
5746
|
+
"task.delete": { taskId: F },
|
|
5725
5747
|
"task.connector.connection.set": {
|
|
5726
|
-
taskId:
|
|
5727
|
-
before:
|
|
5728
|
-
value:
|
|
5748
|
+
taskId: F,
|
|
5749
|
+
before: F.optional(),
|
|
5750
|
+
value: F.optional()
|
|
5729
5751
|
},
|
|
5730
5752
|
"task.agent.set": {
|
|
5731
|
-
taskId:
|
|
5732
|
-
before:
|
|
5733
|
-
value:
|
|
5753
|
+
taskId: F,
|
|
5754
|
+
before: Wl,
|
|
5755
|
+
value: Wl
|
|
5734
5756
|
},
|
|
5735
5757
|
"task.llm.mode.set": {
|
|
5736
|
-
taskId:
|
|
5737
|
-
before:
|
|
5738
|
-
value:
|
|
5758
|
+
taskId: F,
|
|
5759
|
+
before: $c(["chat", "json"]),
|
|
5760
|
+
value: $c(["chat", "json"])
|
|
5739
5761
|
},
|
|
5740
5762
|
"task.name.set": {
|
|
5741
|
-
taskId:
|
|
5742
|
-
before:
|
|
5743
|
-
value:
|
|
5763
|
+
taskId: F,
|
|
5764
|
+
before: F,
|
|
5765
|
+
value: F
|
|
5744
5766
|
}
|
|
5745
5767
|
};
|
|
5746
|
-
A(M([...new Map(Object.entries(
|
|
5747
|
-
kind:
|
|
5768
|
+
A(M([...new Map(Object.entries(cu).map(([e, t]) => [e, t instanceof O ? t : j({
|
|
5769
|
+
kind: P(e),
|
|
5748
5770
|
...t
|
|
5749
5771
|
})])).values()])).min(1);
|
|
5750
5772
|
//#endregion
|
|
5751
5773
|
//#region src/flow/common/encoding.ts
|
|
5752
|
-
var
|
|
5753
|
-
function
|
|
5774
|
+
var lu = new TextEncoder();
|
|
5775
|
+
function uu(e) {
|
|
5754
5776
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
5755
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
5777
|
+
if (Array.isArray(e)) return `[${e.map(uu).join(",")}]`;
|
|
5756
5778
|
let t = e;
|
|
5757
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
5779
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${uu(t[e])}`).join(",")}}`;
|
|
5758
5780
|
}
|
|
5759
|
-
function
|
|
5760
|
-
return
|
|
5781
|
+
function du(e) {
|
|
5782
|
+
return lu.encode(uu(e));
|
|
5761
5783
|
}
|
|
5762
|
-
async function
|
|
5784
|
+
async function fu(e) {
|
|
5763
5785
|
let t = new Uint8Array(e.byteLength);
|
|
5764
5786
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
5765
5787
|
}
|
|
5766
5788
|
//#endregion
|
|
5767
5789
|
//#region src/trigger/providers/github/watch-pull-request.ts
|
|
5768
|
-
var
|
|
5790
|
+
var pu = {
|
|
5769
5791
|
configInputs: [
|
|
5770
5792
|
{
|
|
5771
5793
|
handle: "owner",
|
|
@@ -5841,7 +5863,7 @@ var fu = {
|
|
|
5841
5863
|
nullable: !1
|
|
5842
5864
|
}]
|
|
5843
5865
|
};
|
|
5844
|
-
function
|
|
5866
|
+
function mu(e) {
|
|
5845
5867
|
return {
|
|
5846
5868
|
owner: e.owner,
|
|
5847
5869
|
repo: e.repo,
|
|
@@ -5849,8 +5871,8 @@ function pu(e) {
|
|
|
5849
5871
|
insecureSsl: !1
|
|
5850
5872
|
};
|
|
5851
5873
|
}
|
|
5852
|
-
var
|
|
5853
|
-
snapshot:
|
|
5874
|
+
var hu = {
|
|
5875
|
+
snapshot: pu,
|
|
5854
5876
|
initialState: {
|
|
5855
5877
|
checkpoint: null,
|
|
5856
5878
|
subscription: {}
|
|
@@ -5858,7 +5880,7 @@ var mu = {
|
|
|
5858
5880
|
async reconcile(e) {
|
|
5859
5881
|
if (e.state == null) throw new t("GitHub listener state is missing.");
|
|
5860
5882
|
if (e.active && e.state.checkpoint == null) {
|
|
5861
|
-
let t = await
|
|
5883
|
+
let t = await gu(e);
|
|
5862
5884
|
await e.state.saveCheckpoint({
|
|
5863
5885
|
version: t.version,
|
|
5864
5886
|
sequence: 0
|
|
@@ -5866,13 +5888,13 @@ var mu = {
|
|
|
5866
5888
|
}
|
|
5867
5889
|
return await Ne.reconcile({
|
|
5868
5890
|
...e,
|
|
5869
|
-
config:
|
|
5891
|
+
config: mu(e.config)
|
|
5870
5892
|
});
|
|
5871
5893
|
},
|
|
5872
5894
|
async receive(e) {
|
|
5873
5895
|
let t = await Ne.receive({
|
|
5874
5896
|
...e,
|
|
5875
|
-
config:
|
|
5897
|
+
config: mu(e.config)
|
|
5876
5898
|
});
|
|
5877
5899
|
return t.outcome == "event" ? !c(e.payload) || e.payload.number !== e.config.number ? {
|
|
5878
5900
|
outcome: "ignored",
|
|
@@ -5884,7 +5906,7 @@ var mu = {
|
|
|
5884
5906
|
async read(e) {
|
|
5885
5907
|
let n = e.checkpoint;
|
|
5886
5908
|
if (!c(n) || typeof n.version != "string" || !Number.isSafeInteger(n.sequence) || Number(n.sequence) < 0 || Number(n.sequence) >= 2 ** 53 - 1) throw new t("GitHub listener checkpoint is invalid.");
|
|
5887
|
-
let r = await
|
|
5909
|
+
let r = await gu(e);
|
|
5888
5910
|
if (r.version == n.version) return {
|
|
5889
5911
|
checkpoint: n,
|
|
5890
5912
|
dedupeKey: r.version,
|
|
@@ -5904,7 +5926,7 @@ var mu = {
|
|
|
5904
5926
|
}
|
|
5905
5927
|
}
|
|
5906
5928
|
};
|
|
5907
|
-
async function
|
|
5929
|
+
async function gu(r) {
|
|
5908
5930
|
let { owner: i, repo: a, number: o } = r.config;
|
|
5909
5931
|
if (typeof i != "string" || typeof a != "string" || !Number.isSafeInteger(o) || Number(o) < 1) throw new t("GitHub pull request configuration is invalid.");
|
|
5910
5932
|
let s = await r.connector.execute({
|
|
@@ -5932,12 +5954,12 @@ async function hu(r) {
|
|
|
5932
5954
|
};
|
|
5933
5955
|
return {
|
|
5934
5956
|
pullRequest: u,
|
|
5935
|
-
version: await du(
|
|
5957
|
+
version: await fu(du(u))
|
|
5936
5958
|
};
|
|
5937
5959
|
}
|
|
5938
5960
|
//#endregion
|
|
5939
5961
|
//#region src/trigger/providers/gitlab/on-project-event.ts
|
|
5940
|
-
var
|
|
5962
|
+
var _u = [
|
|
5941
5963
|
"push",
|
|
5942
5964
|
"tag_push",
|
|
5943
5965
|
"issues",
|
|
@@ -5955,7 +5977,7 @@ var gu = [
|
|
|
5955
5977
|
"emoji",
|
|
5956
5978
|
"resource_access_token",
|
|
5957
5979
|
"resource_deploy_token"
|
|
5958
|
-
],
|
|
5980
|
+
], vu = /* @__PURE__ */ new Map([
|
|
5959
5981
|
["Push Hook", "push"],
|
|
5960
5982
|
["Tag Push Hook", "tag_push"],
|
|
5961
5983
|
["Issue Hook", "issues"],
|
|
@@ -5973,7 +5995,7 @@ var gu = [
|
|
|
5973
5995
|
["Emoji Hook", "emoji"],
|
|
5974
5996
|
["Resource Access Token Hook", "resource_access_token"],
|
|
5975
5997
|
["Resource Deploy Token Hook", "resource_deploy_token"]
|
|
5976
|
-
]),
|
|
5998
|
+
]), yu = {
|
|
5977
5999
|
initialState: {
|
|
5978
6000
|
checkpoint: null,
|
|
5979
6001
|
subscription: {}
|
|
@@ -5984,7 +6006,7 @@ var gu = [
|
|
|
5984
6006
|
handle: "events",
|
|
5985
6007
|
jsonSchema: {
|
|
5986
6008
|
items: {
|
|
5987
|
-
enum:
|
|
6009
|
+
enum: _u,
|
|
5988
6010
|
type: "string"
|
|
5989
6011
|
},
|
|
5990
6012
|
minItems: 1,
|
|
@@ -6070,12 +6092,12 @@ var gu = [
|
|
|
6070
6092
|
outcome: "ignored",
|
|
6071
6093
|
reason: "GitLab event header is missing."
|
|
6072
6094
|
};
|
|
6073
|
-
let n =
|
|
6095
|
+
let n = vu.get(t);
|
|
6074
6096
|
if (n == null) return {
|
|
6075
6097
|
outcome: "ignored",
|
|
6076
6098
|
reason: "GitLab event header is unknown."
|
|
6077
6099
|
};
|
|
6078
|
-
if (!
|
|
6100
|
+
if (!bu(e.config).events.includes(n)) return {
|
|
6079
6101
|
outcome: "ignored",
|
|
6080
6102
|
reason: "GitLab event is not subscribed."
|
|
6081
6103
|
};
|
|
@@ -6092,36 +6114,36 @@ var gu = [
|
|
|
6092
6114
|
};
|
|
6093
6115
|
},
|
|
6094
6116
|
async reconcile(e) {
|
|
6095
|
-
let n =
|
|
6117
|
+
let n = Ou(e.state), r = bu(e.config), i = ku(n);
|
|
6096
6118
|
if (!e.active) {
|
|
6097
|
-
let t = i == null ? await
|
|
6098
|
-
for (let n of t ?? []) await
|
|
6099
|
-
return await n.saveSubscription({},
|
|
6119
|
+
let t = i == null ? await Cu(e, r) : [i];
|
|
6120
|
+
for (let n of t ?? []) await wu(e, r, n);
|
|
6121
|
+
return await n.saveSubscription({}, Au(e.now)), { outcome: "ready" };
|
|
6100
6122
|
}
|
|
6101
|
-
let a = await
|
|
6123
|
+
let a = await Cu(e, r);
|
|
6102
6124
|
if (a == null) throw new t("The GitLab project does not exist or is not visible.");
|
|
6103
6125
|
let o = i ?? a[0];
|
|
6104
6126
|
if (o == null) {
|
|
6105
|
-
let t = await
|
|
6106
|
-
body:
|
|
6107
|
-
endpoint:
|
|
6127
|
+
let t = await Tu(e, "hook create", {
|
|
6128
|
+
body: Su(e.endpointUrl, e.callbackSecret, r),
|
|
6129
|
+
endpoint: xu(r),
|
|
6108
6130
|
method: "POST"
|
|
6109
6131
|
});
|
|
6110
|
-
|
|
6132
|
+
Eu(t, "hook create"), o = Du(t.data);
|
|
6111
6133
|
} else {
|
|
6112
|
-
let t = await
|
|
6113
|
-
body:
|
|
6114
|
-
endpoint: `${
|
|
6134
|
+
let t = await Tu(e, "hook update", {
|
|
6135
|
+
body: Su(e.endpointUrl, e.callbackSecret, r),
|
|
6136
|
+
endpoint: `${xu(r)}/${o}`,
|
|
6115
6137
|
method: "PUT"
|
|
6116
6138
|
});
|
|
6117
6139
|
if (t.status == 404) return await n.saveSubscription({}, e.now), { outcome: "pending" };
|
|
6118
|
-
|
|
6140
|
+
Eu(t, "hook update");
|
|
6119
6141
|
}
|
|
6120
|
-
for (let t of a.filter((e) => e != o)) await
|
|
6121
|
-
return await n.saveSubscription({ hookId: o },
|
|
6142
|
+
for (let t of a.filter((e) => e != o)) await wu(e, r, t);
|
|
6143
|
+
return await n.saveSubscription({ hookId: o }, Au(e.now)), { outcome: "ready" };
|
|
6122
6144
|
}
|
|
6123
6145
|
};
|
|
6124
|
-
function
|
|
6146
|
+
function bu(e) {
|
|
6125
6147
|
return {
|
|
6126
6148
|
events: e.events,
|
|
6127
6149
|
insecureSsl: e.insecureSsl,
|
|
@@ -6129,10 +6151,10 @@ function yu(e) {
|
|
|
6129
6151
|
pushBranchFilter: e.pushBranchFilter
|
|
6130
6152
|
};
|
|
6131
6153
|
}
|
|
6132
|
-
function
|
|
6154
|
+
function xu(e) {
|
|
6133
6155
|
return `/projects/${encodeURIComponent(e.project)}/hooks`;
|
|
6134
6156
|
}
|
|
6135
|
-
function
|
|
6157
|
+
function Su(e, t, n) {
|
|
6136
6158
|
return {
|
|
6137
6159
|
branch_filter_strategy: "wildcard",
|
|
6138
6160
|
description: "Managed by Open Flow.",
|
|
@@ -6141,14 +6163,14 @@ function xu(e, t, n) {
|
|
|
6141
6163
|
push_events_branch_filter: n.pushBranchFilter,
|
|
6142
6164
|
url: e,
|
|
6143
6165
|
token: t,
|
|
6144
|
-
...Object.fromEntries(
|
|
6166
|
+
...Object.fromEntries(_u.map((e) => [`${e}_events`, n.events.includes(e)]))
|
|
6145
6167
|
};
|
|
6146
6168
|
}
|
|
6147
|
-
async function
|
|
6169
|
+
async function Cu(e, t) {
|
|
6148
6170
|
let n = [];
|
|
6149
6171
|
for (let r = 1; r <= 10; r += 1) {
|
|
6150
|
-
let i = await
|
|
6151
|
-
endpoint:
|
|
6172
|
+
let i = await Tu(e, "hook list", {
|
|
6173
|
+
endpoint: xu(t),
|
|
6152
6174
|
method: "GET",
|
|
6153
6175
|
query: {
|
|
6154
6176
|
page: r,
|
|
@@ -6156,59 +6178,59 @@ async function Su(e, t) {
|
|
|
6156
6178
|
}
|
|
6157
6179
|
});
|
|
6158
6180
|
if (i.status == 404) return null;
|
|
6159
|
-
|
|
6181
|
+
Eu(i, "hook list");
|
|
6160
6182
|
let a = Array.isArray(i.data) ? i.data : [];
|
|
6161
6183
|
for (let t of a) {
|
|
6162
|
-
let r =
|
|
6184
|
+
let r = ju(t);
|
|
6163
6185
|
r?.url === e.endpointUrl && (typeof r.id == "number" || typeof r.id == "string") && n.push(String(r.id));
|
|
6164
6186
|
}
|
|
6165
6187
|
if (a.length < 100) break;
|
|
6166
6188
|
}
|
|
6167
6189
|
return n;
|
|
6168
6190
|
}
|
|
6169
|
-
async function
|
|
6170
|
-
let r = await
|
|
6171
|
-
endpoint: `${
|
|
6191
|
+
async function wu(e, t, n) {
|
|
6192
|
+
let r = await Tu(e, "hook delete", {
|
|
6193
|
+
endpoint: `${xu(t)}/${n}`,
|
|
6172
6194
|
method: "DELETE"
|
|
6173
6195
|
});
|
|
6174
|
-
r.status != 404 &&
|
|
6196
|
+
r.status != 404 && Eu(r, "hook delete");
|
|
6175
6197
|
}
|
|
6176
|
-
async function
|
|
6198
|
+
async function Tu(t, r, i) {
|
|
6177
6199
|
try {
|
|
6178
6200
|
return await t.connector.execute(i, t.signal);
|
|
6179
6201
|
} catch (t) {
|
|
6180
6202
|
throw t instanceof e ? t : new n(`GitLab ${r} request failed.`, { cause: t });
|
|
6181
6203
|
}
|
|
6182
6204
|
}
|
|
6183
|
-
function
|
|
6205
|
+
function Eu(r, i) {
|
|
6184
6206
|
if (!(r.status >= 200 && r.status < 300)) throw r.status == 401 || r.status == 403 ? new e(`GitLab ${i} rejected the Connection.`) : [
|
|
6185
6207
|
400,
|
|
6186
6208
|
404,
|
|
6187
6209
|
422
|
|
6188
6210
|
].includes(r.status) ? new t(`GitLab ${i} rejected the subscription.`) : new n(`GitLab ${i} failed with status ${r.status}.`);
|
|
6189
6211
|
}
|
|
6190
|
-
function
|
|
6191
|
-
let t =
|
|
6212
|
+
function Du(e) {
|
|
6213
|
+
let t = ju(e)?.id;
|
|
6192
6214
|
if (typeof t != "number" && typeof t != "string") throw new n("GitLab hook response is missing its ID.");
|
|
6193
6215
|
return String(t);
|
|
6194
6216
|
}
|
|
6195
|
-
function
|
|
6217
|
+
function Ou(e) {
|
|
6196
6218
|
if (e == null) throw new t("GitLab Integration state is missing.");
|
|
6197
6219
|
return e;
|
|
6198
6220
|
}
|
|
6199
|
-
function
|
|
6221
|
+
function ku(e) {
|
|
6200
6222
|
let t = e.subscription.hookId;
|
|
6201
6223
|
return typeof t == "string" && t.length > 0 ? t : null;
|
|
6202
6224
|
}
|
|
6203
|
-
function
|
|
6225
|
+
function Au(e) {
|
|
6204
6226
|
return new Date(e.getTime() + 2592e6);
|
|
6205
6227
|
}
|
|
6206
|
-
function
|
|
6228
|
+
function ju(e) {
|
|
6207
6229
|
return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
6208
6230
|
}
|
|
6209
6231
|
//#endregion
|
|
6210
6232
|
//#region src/trigger/providers/gmail/on-message-received.ts
|
|
6211
|
-
var
|
|
6233
|
+
var Mu = 25, Nu = 5, Pu = {
|
|
6212
6234
|
buildOutputs: o,
|
|
6213
6235
|
snapshot: {
|
|
6214
6236
|
configInputs: [
|
|
@@ -6247,7 +6269,7 @@ var ju = 25, Mu = 5, Nu = {
|
|
|
6247
6269
|
type: "integer"
|
|
6248
6270
|
},
|
|
6249
6271
|
nullable: !1,
|
|
6250
|
-
value:
|
|
6272
|
+
value: Mu
|
|
6251
6273
|
},
|
|
6252
6274
|
{
|
|
6253
6275
|
handle: "readStatus",
|
|
@@ -6320,20 +6342,20 @@ var ju = 25, Mu = 5, Nu = {
|
|
|
6320
6342
|
type: "poll"
|
|
6321
6343
|
},
|
|
6322
6344
|
async poll(e) {
|
|
6323
|
-
let t =
|
|
6345
|
+
let t = Fu(e.config);
|
|
6324
6346
|
if (e.checkpoint === null) return {
|
|
6325
|
-
checkpoint: { historyId: await
|
|
6347
|
+
checkpoint: { historyId: await Iu(e) },
|
|
6326
6348
|
events: []
|
|
6327
6349
|
};
|
|
6328
|
-
let n =
|
|
6350
|
+
let n = Lu(e.checkpoint), r = await Ru(e, t.labelNamesOrIds), { candidates: i, lastPage: a } = await zu(e, n, r, t.maxMessagesPerPoll), o = Bu(n.historyId, a), s = [], c = 0;
|
|
6329
6351
|
for (let n of i) {
|
|
6330
|
-
let i = await
|
|
6352
|
+
let i = await Vu(e, n.id);
|
|
6331
6353
|
if (i != null) {
|
|
6332
|
-
if (!await
|
|
6354
|
+
if (!await Hu(e, i, t, r)) {
|
|
6333
6355
|
c += 1;
|
|
6334
6356
|
continue;
|
|
6335
6357
|
}
|
|
6336
|
-
s.push(
|
|
6358
|
+
s.push(Gu(i));
|
|
6337
6359
|
}
|
|
6338
6360
|
}
|
|
6339
6361
|
return {
|
|
@@ -6344,7 +6366,7 @@ var ju = 25, Mu = 5, Nu = {
|
|
|
6344
6366
|
};
|
|
6345
6367
|
}
|
|
6346
6368
|
};
|
|
6347
|
-
function
|
|
6369
|
+
function Fu(e) {
|
|
6348
6370
|
return {
|
|
6349
6371
|
includeDrafts: e.includeDrafts,
|
|
6350
6372
|
includeSpamAndTrash: e.includeSpamAndTrash,
|
|
@@ -6355,28 +6377,28 @@ function Pu(e) {
|
|
|
6355
6377
|
sender: e.sender.trim()
|
|
6356
6378
|
};
|
|
6357
6379
|
}
|
|
6358
|
-
async function
|
|
6359
|
-
let t = await
|
|
6360
|
-
|
|
6361
|
-
let n =
|
|
6380
|
+
async function Iu(e) {
|
|
6381
|
+
let t = await Ku(e, "/users/me/profile");
|
|
6382
|
+
qu(t, "profile fetch");
|
|
6383
|
+
let n = Xu(t.data)?.historyId;
|
|
6362
6384
|
if (typeof n != "string" || n.length == 0) throw new a("Gmail profile historyId is missing.");
|
|
6363
6385
|
return n;
|
|
6364
6386
|
}
|
|
6365
|
-
function
|
|
6366
|
-
let t =
|
|
6387
|
+
function Lu(e) {
|
|
6388
|
+
let t = Xu(e);
|
|
6367
6389
|
if (typeof t?.historyId != "string" || t.historyId.length == 0) throw new r("Gmail checkpoint historyId is missing; recreate the Trigger.");
|
|
6368
6390
|
return {
|
|
6369
6391
|
historyId: t.historyId,
|
|
6370
6392
|
...typeof t.pageToken == "string" ? { pageToken: t.pageToken } : {}
|
|
6371
6393
|
};
|
|
6372
6394
|
}
|
|
6373
|
-
async function
|
|
6395
|
+
async function Ru(e, t) {
|
|
6374
6396
|
if (t.length == 0) return [];
|
|
6375
|
-
let n = await
|
|
6376
|
-
|
|
6377
|
-
let i =
|
|
6397
|
+
let n = await Ku(e, "/users/me/labels");
|
|
6398
|
+
qu(n, "labels list");
|
|
6399
|
+
let i = Xu(n.data)?.labels, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
6378
6400
|
if (Array.isArray(i)) for (let e of i) {
|
|
6379
|
-
let t =
|
|
6401
|
+
let t = Xu(e);
|
|
6380
6402
|
typeof t?.id == "string" && t.id.length != 0 && (a.add(t.id), typeof t.name == "string" && t.name.length > 0 && o.set(t.name.toLowerCase(), t.id));
|
|
6381
6403
|
}
|
|
6382
6404
|
return [...new Set(t.map((e) => {
|
|
@@ -6385,10 +6407,10 @@ async function Lu(e, t) {
|
|
|
6385
6407
|
return t;
|
|
6386
6408
|
}))];
|
|
6387
6409
|
}
|
|
6388
|
-
async function
|
|
6410
|
+
async function zu(e, t, n, i) {
|
|
6389
6411
|
let a = /* @__PURE__ */ new Map(), o = t.pageToken, s = {};
|
|
6390
|
-
for (let c = 0; c <
|
|
6391
|
-
let c = await
|
|
6412
|
+
for (let c = 0; c < Nu; c += 1) {
|
|
6413
|
+
let c = await Ku(e, "/users/me/history", {
|
|
6392
6414
|
historyTypes: "messageAdded",
|
|
6393
6415
|
labelId: n[0],
|
|
6394
6416
|
maxResults: i,
|
|
@@ -6396,7 +6418,7 @@ async function Ru(e, t, n, i) {
|
|
|
6396
6418
|
startHistoryId: t.historyId
|
|
6397
6419
|
});
|
|
6398
6420
|
if (c.status == 404) throw new r("Gmail history checkpoint expired; recreate the Trigger.");
|
|
6399
|
-
|
|
6421
|
+
qu(c, "history list"), s = Xu(c.data) ?? {};
|
|
6400
6422
|
for (let e of s.history ?? []) for (let t of e.messagesAdded ?? []) {
|
|
6401
6423
|
let e = t.message?.id;
|
|
6402
6424
|
e != null && e.length > 0 && !a.has(e) && a.set(e, { id: e });
|
|
@@ -6408,7 +6430,7 @@ async function Ru(e, t, n, i) {
|
|
|
6408
6430
|
lastPage: s
|
|
6409
6431
|
};
|
|
6410
6432
|
}
|
|
6411
|
-
function
|
|
6433
|
+
function Bu(e, t) {
|
|
6412
6434
|
if (t.nextPageToken) return {
|
|
6413
6435
|
checkpoint: {
|
|
6414
6436
|
historyId: e,
|
|
@@ -6422,32 +6444,32 @@ function zu(e, t) {
|
|
|
6422
6444
|
hasMore: !1
|
|
6423
6445
|
};
|
|
6424
6446
|
}
|
|
6425
|
-
async function
|
|
6426
|
-
let n = await
|
|
6427
|
-
return n.status == 404 ? null : (
|
|
6447
|
+
async function Vu(e, t) {
|
|
6448
|
+
let n = await Ku(e, `/users/me/messages/${encodeURIComponent(t)}`, { format: "metadata" });
|
|
6449
|
+
return n.status == 404 ? null : (qu(n, "message metadata fetch"), Xu(n.data) ?? null);
|
|
6428
6450
|
}
|
|
6429
|
-
async function
|
|
6451
|
+
async function Hu(e, t, n, r) {
|
|
6430
6452
|
let i = t.labelIds ?? [];
|
|
6431
6453
|
if (!n.includeSpamAndTrash && (i.includes("SPAM") || i.includes("TRASH")) || !n.includeDrafts && i.includes("DRAFT") || n.readStatus == "Unread" && !i.includes("UNREAD") || n.readStatus == "Read" && i.includes("UNREAD") || !r.every((e) => i.includes(e))) return !1;
|
|
6432
|
-
let a =
|
|
6433
|
-
return a.length == 0 || await
|
|
6454
|
+
let a = Uu(n);
|
|
6455
|
+
return a.length == 0 || await Wu(e, t, a, n.includeSpamAndTrash);
|
|
6434
6456
|
}
|
|
6435
|
-
function
|
|
6457
|
+
function Uu(e) {
|
|
6436
6458
|
let t = e.search.length == 0 ? [] : [e.search], n = e.sender.replaceAll("\"", "").trim();
|
|
6437
6459
|
return n.length > 0 && t.push(`from:${/\s/.test(n) ? `"${n}"` : n}`), t.join(" ");
|
|
6438
6460
|
}
|
|
6439
|
-
async function
|
|
6440
|
-
let i =
|
|
6461
|
+
async function Wu(e, t, n, r) {
|
|
6462
|
+
let i = Ju(t.payload?.headers ?? [], "Message-ID").replace(/^</, "").replace(/>$/, "");
|
|
6441
6463
|
if (i.length == 0) return !1;
|
|
6442
|
-
let a = await
|
|
6464
|
+
let a = await Ku(e, "/users/me/messages", {
|
|
6443
6465
|
includeSpamTrash: r ? "true" : void 0,
|
|
6444
6466
|
q: `${n} rfc822msgid:${i}`
|
|
6445
6467
|
});
|
|
6446
|
-
|
|
6447
|
-
let o =
|
|
6448
|
-
return Array.isArray(o) && o.some((e) =>
|
|
6468
|
+
qu(a, "query match");
|
|
6469
|
+
let o = Xu(a.data)?.messages;
|
|
6470
|
+
return Array.isArray(o) && o.some((e) => Xu(e)?.id === t.id);
|
|
6449
6471
|
}
|
|
6450
|
-
function
|
|
6472
|
+
function Gu(e) {
|
|
6451
6473
|
let t = e.payload?.headers ?? [];
|
|
6452
6474
|
return {
|
|
6453
6475
|
dedupeKey: e.id,
|
|
@@ -6455,15 +6477,15 @@ function Wu(e) {
|
|
|
6455
6477
|
historyId: e.historyId ?? null,
|
|
6456
6478
|
labelIds: e.labelIds ?? [],
|
|
6457
6479
|
messageId: e.id,
|
|
6458
|
-
messageTimestamp:
|
|
6459
|
-
sender:
|
|
6460
|
-
subject:
|
|
6480
|
+
messageTimestamp: Yu(e.internalDate, Ju(t, "Date")),
|
|
6481
|
+
sender: Ju(t, "From"),
|
|
6482
|
+
subject: Ju(t, "Subject"),
|
|
6461
6483
|
threadId: e.threadId ?? "",
|
|
6462
|
-
to:
|
|
6484
|
+
to: Ju(t, "To")
|
|
6463
6485
|
}
|
|
6464
6486
|
};
|
|
6465
6487
|
}
|
|
6466
|
-
async function
|
|
6488
|
+
async function Ku(e, t, n = {}) {
|
|
6467
6489
|
try {
|
|
6468
6490
|
return await e.connector.execute({
|
|
6469
6491
|
endpoint: t,
|
|
@@ -6474,13 +6496,13 @@ async function Gu(e, t, n = {}) {
|
|
|
6474
6496
|
throw new a(`Gmail proxy request to ${t} failed.`, { cause: e });
|
|
6475
6497
|
}
|
|
6476
6498
|
}
|
|
6477
|
-
function
|
|
6499
|
+
function qu(e, t) {
|
|
6478
6500
|
if (!(e.status >= 200 && e.status < 300)) throw e.status == 401 || e.status == 403 ? new i(`Gmail ${t} rejected the Connection.`) : new a(`Gmail ${t} failed with status ${e.status}.`);
|
|
6479
6501
|
}
|
|
6480
|
-
function
|
|
6502
|
+
function Ju(e, t) {
|
|
6481
6503
|
return e.find((e) => e.name.toLowerCase() == t.toLowerCase())?.value ?? "";
|
|
6482
6504
|
}
|
|
6483
|
-
function
|
|
6505
|
+
function Yu(e, t) {
|
|
6484
6506
|
let n = e == null ? NaN : Number(e);
|
|
6485
6507
|
if (Number.isFinite(n)) {
|
|
6486
6508
|
let e = new Date(n);
|
|
@@ -6489,21 +6511,21 @@ function Ju(e, t) {
|
|
|
6489
6511
|
let r = Date.parse(t);
|
|
6490
6512
|
return Number.isNaN(r) ? "" : new Date(r).toISOString();
|
|
6491
6513
|
}
|
|
6492
|
-
function
|
|
6514
|
+
function Xu(e) {
|
|
6493
6515
|
return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
6494
6516
|
}
|
|
6495
6517
|
//#endregion
|
|
6496
6518
|
//#region src/trigger/providers/google-calendar/on-event-changed.ts
|
|
6497
|
-
var
|
|
6519
|
+
var Zu = [
|
|
6498
6520
|
"created",
|
|
6499
6521
|
"updated",
|
|
6500
6522
|
"cancelled"
|
|
6501
|
-
],
|
|
6523
|
+
], Qu = /* @__PURE__ */ new Set([
|
|
6502
6524
|
"rateLimitExceeded",
|
|
6503
6525
|
"userRateLimitExceeded",
|
|
6504
6526
|
"quotaExceeded",
|
|
6505
6527
|
"usageLimits"
|
|
6506
|
-
]),
|
|
6528
|
+
]), $u = {
|
|
6507
6529
|
buildOutputs: o,
|
|
6508
6530
|
snapshot: {
|
|
6509
6531
|
configInputs: [
|
|
@@ -6520,7 +6542,7 @@ var Xu = [
|
|
|
6520
6542
|
handle: "changes",
|
|
6521
6543
|
jsonSchema: {
|
|
6522
6544
|
items: {
|
|
6523
|
-
enum:
|
|
6545
|
+
enum: Zu,
|
|
6524
6546
|
type: "string"
|
|
6525
6547
|
},
|
|
6526
6548
|
minItems: 1,
|
|
@@ -6528,7 +6550,7 @@ var Xu = [
|
|
|
6528
6550
|
uniqueItems: !0
|
|
6529
6551
|
},
|
|
6530
6552
|
nullable: !1,
|
|
6531
|
-
value:
|
|
6553
|
+
value: Zu
|
|
6532
6554
|
},
|
|
6533
6555
|
{
|
|
6534
6556
|
handle: "matchTerm",
|
|
@@ -6564,7 +6586,7 @@ var Xu = [
|
|
|
6564
6586
|
},
|
|
6565
6587
|
calendarId: { type: "string" },
|
|
6566
6588
|
changeType: {
|
|
6567
|
-
enum:
|
|
6589
|
+
enum: Zu,
|
|
6568
6590
|
type: "string"
|
|
6569
6591
|
},
|
|
6570
6592
|
created: { type: ["string", "null"] },
|
|
@@ -6613,13 +6635,13 @@ var Xu = [
|
|
|
6613
6635
|
type: "poll"
|
|
6614
6636
|
},
|
|
6615
6637
|
async poll(e) {
|
|
6616
|
-
let t =
|
|
6617
|
-
if (e.checkpoint === null) return
|
|
6618
|
-
let n =
|
|
6619
|
-
return n.calendarId === t.calendarId ? "seedTimeMin" in n ?
|
|
6638
|
+
let t = ed(e.config);
|
|
6639
|
+
if (e.checkpoint === null) return nd(e, t, e.now.toISOString());
|
|
6640
|
+
let n = td(e.checkpoint);
|
|
6641
|
+
return n.calendarId === t.calendarId ? "seedTimeMin" in n ? nd(e, t, n.seedTimeMin, n.pageToken) : rd(e, t, n) : nd(e, t, e.now.toISOString());
|
|
6620
6642
|
}
|
|
6621
6643
|
};
|
|
6622
|
-
function
|
|
6644
|
+
function ed(e) {
|
|
6623
6645
|
return {
|
|
6624
6646
|
calendarId: e.calendarId,
|
|
6625
6647
|
changes: new Set(e.changes),
|
|
@@ -6627,8 +6649,8 @@ function $u(e) {
|
|
|
6627
6649
|
maxEventsPerPoll: e.maxEventsPerPoll
|
|
6628
6650
|
};
|
|
6629
6651
|
}
|
|
6630
|
-
function
|
|
6631
|
-
let t =
|
|
6652
|
+
function td(e) {
|
|
6653
|
+
let t = md(e), n = typeof t?.pageToken == "string" ? t.pageToken : void 0, i = typeof t?.calendarId == "string" ? t.calendarId : void 0;
|
|
6632
6654
|
if (typeof t?.syncToken == "string" && t.syncToken.length > 0) return {
|
|
6633
6655
|
calendarId: i,
|
|
6634
6656
|
...n == null ? {} : { pageToken: n },
|
|
@@ -6641,25 +6663,25 @@ function ed(e) {
|
|
|
6641
6663
|
};
|
|
6642
6664
|
throw new r("Google Calendar checkpoint is invalid; recreate the Trigger.");
|
|
6643
6665
|
}
|
|
6644
|
-
async function
|
|
6666
|
+
async function nd(e, t, n, r) {
|
|
6645
6667
|
let i = r;
|
|
6646
6668
|
for (let r = 0; r < 2; r += 1) {
|
|
6647
|
-
let r = await
|
|
6669
|
+
let r = await sd(e, t.calendarId, {
|
|
6648
6670
|
maxResults: 2500,
|
|
6649
6671
|
pageToken: i,
|
|
6650
6672
|
showDeleted: "true",
|
|
6651
6673
|
singleEvents: "false",
|
|
6652
6674
|
timeMin: n
|
|
6653
6675
|
});
|
|
6654
|
-
if (i != null &&
|
|
6676
|
+
if (i != null && ld(r)) return {
|
|
6655
6677
|
checkpoint: {
|
|
6656
6678
|
calendarId: t.calendarId,
|
|
6657
6679
|
seedTimeMin: n
|
|
6658
6680
|
},
|
|
6659
6681
|
events: []
|
|
6660
6682
|
};
|
|
6661
|
-
|
|
6662
|
-
let o =
|
|
6683
|
+
cd(e, r, "seed full sync");
|
|
6684
|
+
let o = md(r.data) ?? {};
|
|
6663
6685
|
if (o.nextSyncToken) return {
|
|
6664
6686
|
checkpoint: {
|
|
6665
6687
|
calendarId: t.calendarId,
|
|
@@ -6680,17 +6702,17 @@ async function td(e, t, n, r) {
|
|
|
6680
6702
|
hasMore: !0
|
|
6681
6703
|
};
|
|
6682
6704
|
}
|
|
6683
|
-
async function
|
|
6705
|
+
async function rd(e, t, n) {
|
|
6684
6706
|
let r = [], i = 0, o = n.pageToken;
|
|
6685
6707
|
for (let s = 0; s < 5; s += 1) {
|
|
6686
|
-
let s = await
|
|
6708
|
+
let s = await sd(e, t.calendarId, {
|
|
6687
6709
|
maxResults: t.maxEventsPerPoll,
|
|
6688
6710
|
pageToken: o,
|
|
6689
6711
|
showDeleted: "true",
|
|
6690
6712
|
singleEvents: "false",
|
|
6691
6713
|
syncToken: n.syncToken
|
|
6692
6714
|
});
|
|
6693
|
-
if (o != null &&
|
|
6715
|
+
if (o != null && ld(s)) return {
|
|
6694
6716
|
checkpoint: {
|
|
6695
6717
|
calendarId: t.calendarId,
|
|
6696
6718
|
syncToken: n.syncToken
|
|
@@ -6698,16 +6720,16 @@ async function nd(e, t, n) {
|
|
|
6698
6720
|
events: r,
|
|
6699
6721
|
filtered: i
|
|
6700
6722
|
};
|
|
6701
|
-
|
|
6702
|
-
let c =
|
|
6723
|
+
cd(e, s, "incremental sync");
|
|
6724
|
+
let c = md(s.data) ?? {};
|
|
6703
6725
|
for (let e of c.items ?? []) {
|
|
6704
6726
|
if (e.id == null || e.id.length == 0) continue;
|
|
6705
|
-
let n =
|
|
6706
|
-
if (!t.changes.has(n) || !
|
|
6727
|
+
let n = id(e);
|
|
6728
|
+
if (!t.changes.has(n) || !ad(e, t.matchTerm)) {
|
|
6707
6729
|
i += 1;
|
|
6708
6730
|
continue;
|
|
6709
6731
|
}
|
|
6710
|
-
r.push(
|
|
6732
|
+
r.push(od(e, e.id, n, t.calendarId));
|
|
6711
6733
|
}
|
|
6712
6734
|
if (c.nextSyncToken) return {
|
|
6713
6735
|
checkpoint: {
|
|
@@ -6731,12 +6753,12 @@ async function nd(e, t, n) {
|
|
|
6731
6753
|
hasMore: !0
|
|
6732
6754
|
};
|
|
6733
6755
|
}
|
|
6734
|
-
function
|
|
6756
|
+
function id(e) {
|
|
6735
6757
|
if (e.status == "cancelled") return "cancelled";
|
|
6736
|
-
let t =
|
|
6758
|
+
let t = pd(e.created), n = pd(e.updated);
|
|
6737
6759
|
return t != null && t == n ? "created" : "updated";
|
|
6738
6760
|
}
|
|
6739
|
-
function
|
|
6761
|
+
function ad(e, t) {
|
|
6740
6762
|
if (t.length == 0) return !0;
|
|
6741
6763
|
let n = t.toLowerCase();
|
|
6742
6764
|
return [
|
|
@@ -6746,14 +6768,14 @@ function id(e, t) {
|
|
|
6746
6768
|
...(e.attendees ?? []).map(({ email: e }) => e)
|
|
6747
6769
|
].some((e) => typeof e == "string" && e.toLowerCase().includes(n));
|
|
6748
6770
|
}
|
|
6749
|
-
function
|
|
6771
|
+
function od(e, t, n, r) {
|
|
6750
6772
|
return {
|
|
6751
6773
|
dedupeKey: `${t}:${e.updated ?? e.etag ?? ""}`,
|
|
6752
6774
|
payload: {
|
|
6753
6775
|
attendeeEmails: (e.attendees ?? []).flatMap(({ email: e }) => e == null || e.length == 0 ? [] : [e]),
|
|
6754
6776
|
calendarId: r,
|
|
6755
6777
|
changeType: n,
|
|
6756
|
-
created:
|
|
6778
|
+
created: fd(e.created),
|
|
6757
6779
|
creatorEmail: e.creator?.email ?? null,
|
|
6758
6780
|
description: e.description ?? null,
|
|
6759
6781
|
end: e.end ?? null,
|
|
@@ -6767,11 +6789,11 @@ function ad(e, t, n, r) {
|
|
|
6767
6789
|
start: e.start ?? null,
|
|
6768
6790
|
status: e.status ?? "",
|
|
6769
6791
|
summary: e.summary ?? null,
|
|
6770
|
-
updated:
|
|
6792
|
+
updated: fd(e.updated)
|
|
6771
6793
|
}
|
|
6772
6794
|
};
|
|
6773
6795
|
}
|
|
6774
|
-
async function
|
|
6796
|
+
async function sd(e, t, n) {
|
|
6775
6797
|
let r = `/calendars/${encodeURIComponent(t)}/events`;
|
|
6776
6798
|
try {
|
|
6777
6799
|
return await e.connector.execute({
|
|
@@ -6783,81 +6805,81 @@ async function od(e, t, n) {
|
|
|
6783
6805
|
throw new a(`Google Calendar proxy request to ${r} failed.`, { cause: e });
|
|
6784
6806
|
}
|
|
6785
6807
|
}
|
|
6786
|
-
function
|
|
6787
|
-
if (!(t.status >= 200 && t.status < 300)) throw t.status == 410 || t.status == 400 &&
|
|
6788
|
-
}
|
|
6789
|
-
function cd(e) {
|
|
6790
|
-
return e.status == 400 && !ud(e.data);
|
|
6808
|
+
function cd(e, t, n) {
|
|
6809
|
+
if (!(t.status >= 200 && t.status < 300)) throw t.status == 410 || t.status == 400 && dd(t.data) ? new r("Google Calendar sync token expired; recreate the Trigger.") : t.status == 400 || t.status == 404 && e.checkpoint === null ? new r(`Google Calendar ${n} rejected the configuration.`) : t.status == 401 ? new i(`Google Calendar ${n} rejected the Connection.`) : t.status == 403 ? ud(t.data).some((e) => Qu.has(e)) ? new a(`Google Calendar ${n} was rate limited.`) : new i(`Google Calendar ${n} rejected the Connection.`) : new a(`Google Calendar ${n} failed with status ${t.status}.`);
|
|
6791
6810
|
}
|
|
6792
6811
|
function ld(e) {
|
|
6793
|
-
|
|
6812
|
+
return e.status == 400 && !dd(e.data);
|
|
6813
|
+
}
|
|
6814
|
+
function ud(e) {
|
|
6815
|
+
let t = md(md(e)?.error)?.errors;
|
|
6794
6816
|
return Array.isArray(t) ? t.flatMap((e) => {
|
|
6795
|
-
let t =
|
|
6817
|
+
let t = md(e)?.reason;
|
|
6796
6818
|
return typeof t == "string" ? [t] : [];
|
|
6797
6819
|
}) : [];
|
|
6798
6820
|
}
|
|
6799
|
-
function
|
|
6800
|
-
if (
|
|
6801
|
-
let t =
|
|
6821
|
+
function dd(e) {
|
|
6822
|
+
if (ud(e).includes("fullSyncRequired")) return !0;
|
|
6823
|
+
let t = md(md(e)?.error)?.message;
|
|
6802
6824
|
return typeof t == "string" && t.includes("fullSyncRequired");
|
|
6803
6825
|
}
|
|
6804
|
-
function
|
|
6826
|
+
function fd(e) {
|
|
6805
6827
|
if (e == null || e.length == 0) return null;
|
|
6806
6828
|
let t = Date.parse(e);
|
|
6807
6829
|
return Number.isNaN(t) ? null : new Date(t).toISOString();
|
|
6808
6830
|
}
|
|
6809
|
-
function
|
|
6831
|
+
function pd(e) {
|
|
6810
6832
|
if (e == null || e.length == 0) return null;
|
|
6811
6833
|
let t = Date.parse(e);
|
|
6812
6834
|
return Number.isNaN(t) ? null : Math.floor(t / 1e3);
|
|
6813
6835
|
}
|
|
6814
|
-
function
|
|
6836
|
+
function md(e) {
|
|
6815
6837
|
return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
6816
6838
|
}
|
|
6817
6839
|
//#endregion
|
|
6818
6840
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
6819
|
-
function
|
|
6841
|
+
function hd(e, t) {
|
|
6820
6842
|
let n = typeof e;
|
|
6821
6843
|
if (n !== typeof t) return !1;
|
|
6822
6844
|
if (Array.isArray(e)) {
|
|
6823
6845
|
if (!Array.isArray(t)) return !1;
|
|
6824
6846
|
let n = e.length;
|
|
6825
6847
|
if (n !== t.length) return !1;
|
|
6826
|
-
for (let r = 0; r < n; r++) if (!
|
|
6848
|
+
for (let r = 0; r < n; r++) if (!hd(e[r], t[r])) return !1;
|
|
6827
6849
|
return !0;
|
|
6828
6850
|
}
|
|
6829
6851
|
if (n === "object") {
|
|
6830
6852
|
if (!e || !t) return e === t;
|
|
6831
6853
|
let n = Object.keys(e), r = Object.keys(t);
|
|
6832
6854
|
if (n.length !== r.length) return !1;
|
|
6833
|
-
for (let r of n) if (!
|
|
6855
|
+
for (let r of n) if (!hd(e[r], t[r])) return !1;
|
|
6834
6856
|
return !0;
|
|
6835
6857
|
}
|
|
6836
6858
|
return e === t;
|
|
6837
6859
|
}
|
|
6838
6860
|
//#endregion
|
|
6839
6861
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js
|
|
6840
|
-
function hd(e) {
|
|
6841
|
-
return encodeURI(gd(e));
|
|
6842
|
-
}
|
|
6843
6862
|
function gd(e) {
|
|
6863
|
+
return encodeURI(_d(e));
|
|
6864
|
+
}
|
|
6865
|
+
function _d(e) {
|
|
6844
6866
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
6845
6867
|
}
|
|
6846
6868
|
//#endregion
|
|
6847
6869
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js
|
|
6848
|
-
var
|
|
6870
|
+
var vd = {
|
|
6849
6871
|
prefixItems: !0,
|
|
6850
6872
|
items: !0,
|
|
6851
6873
|
allOf: !0,
|
|
6852
6874
|
anyOf: !0,
|
|
6853
6875
|
oneOf: !0
|
|
6854
|
-
},
|
|
6876
|
+
}, yd = {
|
|
6855
6877
|
$defs: !0,
|
|
6856
6878
|
definitions: !0,
|
|
6857
6879
|
properties: !0,
|
|
6858
6880
|
patternProperties: !0,
|
|
6859
6881
|
dependentSchemas: !0
|
|
6860
|
-
},
|
|
6882
|
+
}, bd = {
|
|
6861
6883
|
id: !0,
|
|
6862
6884
|
$id: !0,
|
|
6863
6885
|
$ref: !0,
|
|
@@ -6884,13 +6906,13 @@ var _d = {
|
|
|
6884
6906
|
uniqueItems: !0,
|
|
6885
6907
|
maxProperties: !0,
|
|
6886
6908
|
minProperties: !0
|
|
6887
|
-
},
|
|
6888
|
-
function
|
|
6909
|
+
}, xd = typeof self < "u" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker");
|
|
6910
|
+
function Sd(e, t = Object.create(null), n = xd, r = "") {
|
|
6889
6911
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
6890
6912
|
let i = e.$id || e.id;
|
|
6891
6913
|
if (i) {
|
|
6892
6914
|
let a = new URL(i, n.href);
|
|
6893
|
-
a.hash.length > 1 ? t[a.href] = e : (a.hash = "", r === "" ? n = a :
|
|
6915
|
+
a.hash.length > 1 ? t[a.href] = e : (a.hash = "", r === "" ? n = a : Sd(e, t, n));
|
|
6894
6916
|
}
|
|
6895
6917
|
} else if (e !== !0 && e !== !1) return t;
|
|
6896
6918
|
let i = n.href + (r ? "#" + r : "");
|
|
@@ -6918,21 +6940,21 @@ function xd(e, t = Object.create(null), n = bd, r = "") {
|
|
|
6918
6940
|
t[r.href] = e;
|
|
6919
6941
|
}
|
|
6920
6942
|
for (let i in e) {
|
|
6921
|
-
if (
|
|
6922
|
-
let a = `${r}/${
|
|
6943
|
+
if (bd[i]) continue;
|
|
6944
|
+
let a = `${r}/${gd(i)}`, o = e[i];
|
|
6923
6945
|
if (Array.isArray(o)) {
|
|
6924
|
-
if (
|
|
6946
|
+
if (vd[i]) {
|
|
6925
6947
|
let e = o.length;
|
|
6926
|
-
for (let r = 0; r < e; r++)
|
|
6948
|
+
for (let r = 0; r < e; r++) Sd(o[r], t, n, `${a}/${r}`);
|
|
6927
6949
|
}
|
|
6928
|
-
} else if (
|
|
6929
|
-
else
|
|
6950
|
+
} else if (yd[i]) for (let e in o) Sd(o[e], t, n, `${a}/${gd(e)}`);
|
|
6951
|
+
else Sd(o, t, n, a);
|
|
6930
6952
|
}
|
|
6931
6953
|
return t;
|
|
6932
6954
|
}
|
|
6933
6955
|
//#endregion
|
|
6934
6956
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js
|
|
6935
|
-
var
|
|
6957
|
+
var Cd = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, wd = [
|
|
6936
6958
|
0,
|
|
6937
6959
|
31,
|
|
6938
6960
|
28,
|
|
@@ -6946,60 +6968,60 @@ var Sd = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, Cd = [
|
|
|
6946
6968
|
31,
|
|
6947
6969
|
30,
|
|
6948
6970
|
31
|
|
6949
|
-
],
|
|
6971
|
+
], Td = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, Ed = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, Dd = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, Od = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, kd = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, Ad = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, jd = /^(?:\/(?:[^~/]|~0|~1)*)*$/, Md = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, Nd = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, Pd = (e) => {
|
|
6950
6972
|
if (e[0] === "\"") return !1;
|
|
6951
6973
|
let [t, n, ...r] = e.split("@");
|
|
6952
6974
|
return !t || !n || r.length !== 0 || t.length > 64 || n.length > 253 || t[0] === "." || t.endsWith(".") || t.includes("..") || !/^[a-z0-9.-]+$/i.test(n) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t) ? !1 : n.split(".").every((e) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e));
|
|
6953
|
-
},
|
|
6954
|
-
function
|
|
6975
|
+
}, Fd = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, Id = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, Ld = (e) => e.length > 1 && e.length < 80 && (/^P\d+([.,]\d+)?W$/.test(e) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));
|
|
6976
|
+
function Rd(e) {
|
|
6955
6977
|
return e.test.bind(e);
|
|
6956
6978
|
}
|
|
6957
|
-
var
|
|
6958
|
-
date:
|
|
6959
|
-
time:
|
|
6960
|
-
"date-time":
|
|
6961
|
-
duration:
|
|
6962
|
-
uri:
|
|
6963
|
-
"uri-reference":
|
|
6964
|
-
"uri-template":
|
|
6965
|
-
url:
|
|
6966
|
-
email:
|
|
6967
|
-
hostname:
|
|
6968
|
-
ipv4:
|
|
6969
|
-
ipv6:
|
|
6970
|
-
regex:
|
|
6971
|
-
uuid:
|
|
6972
|
-
"json-pointer":
|
|
6973
|
-
"json-pointer-uri-fragment":
|
|
6974
|
-
"relative-json-pointer":
|
|
6979
|
+
var zd = {
|
|
6980
|
+
date: Vd,
|
|
6981
|
+
time: Hd.bind(void 0, !1),
|
|
6982
|
+
"date-time": Wd,
|
|
6983
|
+
duration: Ld,
|
|
6984
|
+
uri: qd,
|
|
6985
|
+
"uri-reference": Rd(Dd),
|
|
6986
|
+
"uri-template": Rd(Od),
|
|
6987
|
+
url: Rd(kd),
|
|
6988
|
+
email: Pd,
|
|
6989
|
+
hostname: Rd(Ed),
|
|
6990
|
+
ipv4: Rd(Fd),
|
|
6991
|
+
ipv6: Rd(Id),
|
|
6992
|
+
regex: Yd,
|
|
6993
|
+
uuid: Rd(Ad),
|
|
6994
|
+
"json-pointer": Rd(jd),
|
|
6995
|
+
"json-pointer-uri-fragment": Rd(Md),
|
|
6996
|
+
"relative-json-pointer": Rd(Nd)
|
|
6975
6997
|
};
|
|
6976
|
-
function
|
|
6998
|
+
function Bd(e) {
|
|
6977
6999
|
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
6978
7000
|
}
|
|
6979
|
-
function
|
|
6980
|
-
let t = e.match(
|
|
7001
|
+
function Vd(e) {
|
|
7002
|
+
let t = e.match(Cd);
|
|
6981
7003
|
if (!t) return !1;
|
|
6982
7004
|
let n = +t[1], r = +t[2], i = +t[3];
|
|
6983
|
-
return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 &&
|
|
7005
|
+
return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 && Bd(n) ? 29 : wd[r]);
|
|
6984
7006
|
}
|
|
6985
|
-
function
|
|
6986
|
-
let n = t.match(
|
|
7007
|
+
function Hd(e, t) {
|
|
7008
|
+
let n = t.match(Td);
|
|
6987
7009
|
if (!n) return !1;
|
|
6988
7010
|
let r = +n[1], i = +n[2], a = +n[3], o = !!n[5];
|
|
6989
7011
|
return (r <= 23 && i <= 59 && a <= 59 || r == 23 && i == 59 && a == 60) && (!e || o);
|
|
6990
7012
|
}
|
|
6991
|
-
var
|
|
6992
|
-
function
|
|
6993
|
-
let t = e.split(
|
|
6994
|
-
return t.length == 2 &&
|
|
7013
|
+
var Ud = /t|\s/i;
|
|
7014
|
+
function Wd(e) {
|
|
7015
|
+
let t = e.split(Ud);
|
|
7016
|
+
return t.length == 2 && Vd(t[0]) && Hd(!0, t[1]);
|
|
6995
7017
|
}
|
|
6996
|
-
var
|
|
6997
|
-
function
|
|
6998
|
-
return
|
|
7018
|
+
var Gd = /\/|:/, Kd = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
7019
|
+
function qd(e) {
|
|
7020
|
+
return Gd.test(e) && Kd.test(e);
|
|
6999
7021
|
}
|
|
7000
|
-
var
|
|
7001
|
-
function
|
|
7002
|
-
if (
|
|
7022
|
+
var Jd = /[^\\]\\Z/;
|
|
7023
|
+
function Yd(e) {
|
|
7024
|
+
if (Jd.test(e)) return !1;
|
|
7003
7025
|
try {
|
|
7004
7026
|
return new RegExp(e, "u"), !0;
|
|
7005
7027
|
} catch {
|
|
@@ -7008,14 +7030,14 @@ function Jd(e) {
|
|
|
7008
7030
|
}
|
|
7009
7031
|
//#endregion
|
|
7010
7032
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js
|
|
7011
|
-
function
|
|
7033
|
+
function Xd(e) {
|
|
7012
7034
|
let t = 0, n = e.length, r = 0, i;
|
|
7013
7035
|
for (; r < n;) t++, i = e.charCodeAt(r++), i >= 55296 && i <= 56319 && r < n && (i = e.charCodeAt(r), (i & 64512) == 56320 && r++);
|
|
7014
7036
|
return t;
|
|
7015
7037
|
}
|
|
7016
7038
|
//#endregion
|
|
7017
7039
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js
|
|
7018
|
-
function
|
|
7040
|
+
function R(e, t, n = "2019-09", r = Sd(t), i = !0, a = null, o = "#", s = "#", c = Object.create(null)) {
|
|
7019
7041
|
if (t === !0) return {
|
|
7020
7042
|
valid: !0,
|
|
7021
7043
|
errors: []
|
|
@@ -7043,7 +7065,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7043
7065
|
}
|
|
7044
7066
|
let { $ref: d, $recursiveRef: f, $recursiveAnchor: p, type: m, const: h, enum: ee, required: te, not: ne, anyOf: re, allOf: ie, oneOf: ae, if: oe, then: se, else: ce, format: le, properties: ue, patternProperties: de, additionalProperties: fe, unevaluatedProperties: pe, minProperties: me, maxProperties: he, propertyNames: ge, dependentRequired: _e, dependentSchemas: ve, dependencies: ye, prefixItems: be, items: xe, additionalItems: Se, unevaluatedItems: Ce, contains: we, minContains: g, maxContains: Te, minItems: Ee, maxItems: De, uniqueItems: Oe, minimum: ke, maximum: Ae, exclusiveMinimum: je, exclusiveMaximum: Me, multipleOf: Ne, minLength: Pe, maxLength: Fe, pattern: Ie, __absolute_ref__: Le, __absolute_recursive_ref__: Re } = t, _ = [];
|
|
7045
7067
|
if (p === !0 && a === null && (a = t), f === "#") {
|
|
7046
|
-
let l = a === null ? r[Re] : a, u = `${s}/$recursiveRef`, d =
|
|
7068
|
+
let l = a === null ? r[Re] : a, u = `${s}/$recursiveRef`, d = R(e, a === null ? t : a, n, r, i, l, o, u, c);
|
|
7047
7069
|
d.valid || _.push({
|
|
7048
7070
|
instanceLocation: o,
|
|
7049
7071
|
keyword: "$recursiveRef",
|
|
@@ -7057,7 +7079,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7057
7079
|
let e = `Unresolved $ref "${d}".`;
|
|
7058
7080
|
throw Le && Le !== d && (e += ` Absolute URI "${Le}".`), e += `\nKnown schemas:\n- ${Object.keys(r).join("\n- ")}`, Error(e);
|
|
7059
7081
|
}
|
|
7060
|
-
let l = `${s}/$ref`, u =
|
|
7082
|
+
let l = `${s}/$ref`, u = R(e, t, n, r, i, a, o, l, c);
|
|
7061
7083
|
if (u.valid || _.push({
|
|
7062
7084
|
instanceLocation: o,
|
|
7063
7085
|
keyword: "$ref",
|
|
@@ -7091,7 +7113,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7091
7113
|
keywordLocation: `${s}/type`,
|
|
7092
7114
|
error: `Instance type "${u}" is invalid. Expected "${m}".`
|
|
7093
7115
|
});
|
|
7094
|
-
if (h !== void 0 && (u === "object" || u === "array" ?
|
|
7116
|
+
if (h !== void 0 && (u === "object" || u === "array" ? hd(e, h) || _.push({
|
|
7095
7117
|
instanceLocation: o,
|
|
7096
7118
|
keyword: "const",
|
|
7097
7119
|
keywordLocation: `${s}/const`,
|
|
@@ -7101,7 +7123,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7101
7123
|
keyword: "const",
|
|
7102
7124
|
keywordLocation: `${s}/const`,
|
|
7103
7125
|
error: `Instance does not match ${JSON.stringify(h)}.`
|
|
7104
|
-
})), ee !== void 0 && (u === "object" || u === "array" ? ee.some((t) =>
|
|
7126
|
+
})), ee !== void 0 && (u === "object" || u === "array" ? ee.some((t) => hd(e, t)) || _.push({
|
|
7105
7127
|
instanceLocation: o,
|
|
7106
7128
|
keyword: "enum",
|
|
7107
7129
|
keywordLocation: `${s}/enum`,
|
|
@@ -7113,7 +7135,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7113
7135
|
error: `Instance does not match any of ${JSON.stringify(ee)}.`
|
|
7114
7136
|
})), ne !== void 0) {
|
|
7115
7137
|
let t = `${s}/not`;
|
|
7116
|
-
|
|
7138
|
+
R(e, ne, n, r, i, a, o, t).valid && _.push({
|
|
7117
7139
|
instanceLocation: o,
|
|
7118
7140
|
keyword: "not",
|
|
7119
7141
|
keywordLocation: t,
|
|
@@ -7124,7 +7146,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7124
7146
|
if (re !== void 0) {
|
|
7125
7147
|
let t = `${s}/anyOf`, l = _.length, u = !1;
|
|
7126
7148
|
for (let s = 0; s < re.length; s++) {
|
|
7127
|
-
let l = re[s], d = Object.create(c), f =
|
|
7149
|
+
let l = re[s], d = Object.create(c), f = R(e, l, n, r, i, p === !0 ? a : null, o, `${t}/${s}`, d);
|
|
7128
7150
|
_.push(...f.errors), u ||= f.valid, f.valid && ze.push(d);
|
|
7129
7151
|
}
|
|
7130
7152
|
u ? _.length = l : _.splice(l, 0, {
|
|
@@ -7137,7 +7159,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7137
7159
|
if (ie !== void 0) {
|
|
7138
7160
|
let t = `${s}/allOf`, l = _.length, u = !0;
|
|
7139
7161
|
for (let s = 0; s < ie.length; s++) {
|
|
7140
|
-
let l = ie[s], d = Object.create(c), f =
|
|
7162
|
+
let l = ie[s], d = Object.create(c), f = R(e, l, n, r, i, p === !0 ? a : null, o, `${t}/${s}`, d);
|
|
7141
7163
|
_.push(...f.errors), u &&= f.valid, f.valid && ze.push(d);
|
|
7142
7164
|
}
|
|
7143
7165
|
u ? _.length = l : _.splice(l, 0, {
|
|
@@ -7149,7 +7171,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7149
7171
|
}
|
|
7150
7172
|
if (ae !== void 0) {
|
|
7151
7173
|
let t = `${s}/oneOf`, l = _.length, u = ae.filter((s, l) => {
|
|
7152
|
-
let u = Object.create(c), d =
|
|
7174
|
+
let u = Object.create(c), d = R(e, s, n, r, i, p === !0 ? a : null, o, `${t}/${l}`, u);
|
|
7153
7175
|
return _.push(...d.errors), d.valid && ze.push(u), d.valid;
|
|
7154
7176
|
}).length;
|
|
7155
7177
|
u === 1 ? _.length = l : _.splice(l, 0, {
|
|
@@ -7161,9 +7183,9 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7161
7183
|
}
|
|
7162
7184
|
if ((u === "object" || u === "array") && Object.assign(c, ...ze), oe !== void 0) {
|
|
7163
7185
|
let t = `${s}/if`;
|
|
7164
|
-
if (
|
|
7186
|
+
if (R(e, oe, n, r, i, a, o, t, c).valid) {
|
|
7165
7187
|
if (se !== void 0) {
|
|
7166
|
-
let l =
|
|
7188
|
+
let l = R(e, se, n, r, i, a, o, `${s}/then`, c);
|
|
7167
7189
|
l.valid || _.push({
|
|
7168
7190
|
instanceLocation: o,
|
|
7169
7191
|
keyword: "if",
|
|
@@ -7172,7 +7194,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7172
7194
|
}, ...l.errors);
|
|
7173
7195
|
}
|
|
7174
7196
|
} else if (ce !== void 0) {
|
|
7175
|
-
let l =
|
|
7197
|
+
let l = R(e, ce, n, r, i, a, o, `${s}/else`, c);
|
|
7176
7198
|
l.valid || _.push({
|
|
7177
7199
|
instanceLocation: o,
|
|
7178
7200
|
keyword: "if",
|
|
@@ -7202,7 +7224,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7202
7224
|
}), ge !== void 0) {
|
|
7203
7225
|
let t = `${s}/propertyNames`;
|
|
7204
7226
|
for (let s in e) {
|
|
7205
|
-
let e = `${o}/${
|
|
7227
|
+
let e = `${o}/${gd(s)}`, c = R(s, ge, n, r, i, a, e, t);
|
|
7206
7228
|
c.valid || _.push({
|
|
7207
7229
|
instanceLocation: o,
|
|
7208
7230
|
keyword: "propertyNames",
|
|
@@ -7226,7 +7248,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7226
7248
|
if (ve !== void 0) for (let t in ve) {
|
|
7227
7249
|
let l = `${s}/dependentSchemas`;
|
|
7228
7250
|
if (t in e) {
|
|
7229
|
-
let s =
|
|
7251
|
+
let s = R(e, ve[t], n, r, i, a, o, `${l}/${gd(t)}`, c);
|
|
7230
7252
|
s.valid || _.push({
|
|
7231
7253
|
instanceLocation: o,
|
|
7232
7254
|
keyword: "dependentSchemas",
|
|
@@ -7246,7 +7268,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7246
7268
|
error: `Instance has "${s}" but does not have "${n}".`
|
|
7247
7269
|
});
|
|
7248
7270
|
else {
|
|
7249
|
-
let l =
|
|
7271
|
+
let l = R(e, c, n, r, i, a, o, `${t}/${gd(s)}`);
|
|
7250
7272
|
l.valid || _.push({
|
|
7251
7273
|
instanceLocation: o,
|
|
7252
7274
|
keyword: "dependencies",
|
|
@@ -7261,7 +7283,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7261
7283
|
let t = `${s}/properties`;
|
|
7262
7284
|
for (let s in ue) {
|
|
7263
7285
|
if (!(s in e)) continue;
|
|
7264
|
-
let d = `${o}/${
|
|
7286
|
+
let d = `${o}/${gd(s)}`, f = R(e[s], ue[s], n, r, i, a, d, `${t}/${gd(s)}`);
|
|
7265
7287
|
if (f.valid) c[s] = l[s] = !0;
|
|
7266
7288
|
else if (u = i, _.push({
|
|
7267
7289
|
instanceLocation: o,
|
|
@@ -7277,7 +7299,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7277
7299
|
let d = new RegExp(s, "u"), f = de[s];
|
|
7278
7300
|
for (let p in e) {
|
|
7279
7301
|
if (!d.test(p)) continue;
|
|
7280
|
-
let m = `${o}/${
|
|
7302
|
+
let m = `${o}/${gd(p)}`, h = R(e[p], f, n, r, i, a, m, `${t}/${gd(s)}`);
|
|
7281
7303
|
h.valid ? c[p] = l[p] = !0 : (u = i, _.push({
|
|
7282
7304
|
instanceLocation: o,
|
|
7283
7305
|
keyword: "patternProperties",
|
|
@@ -7291,7 +7313,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7291
7313
|
let t = `${s}/additionalProperties`;
|
|
7292
7314
|
for (let s in e) {
|
|
7293
7315
|
if (l[s]) continue;
|
|
7294
|
-
let d = `${o}/${
|
|
7316
|
+
let d = `${o}/${gd(s)}`, f = R(e[s], fe, n, r, i, a, d, t);
|
|
7295
7317
|
f.valid ? c[s] = !0 : (u = i, _.push({
|
|
7296
7318
|
instanceLocation: o,
|
|
7297
7319
|
keyword: "additionalProperties",
|
|
@@ -7302,7 +7324,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7302
7324
|
} else if (!u && pe !== void 0) {
|
|
7303
7325
|
let t = `${s}/unevaluatedProperties`;
|
|
7304
7326
|
for (let s in e) if (!c[s]) {
|
|
7305
|
-
let l = `${o}/${
|
|
7327
|
+
let l = `${o}/${gd(s)}`, u = R(e[s], pe, n, r, i, a, l, t);
|
|
7306
7328
|
u.valid ? c[s] = !0 : _.push({
|
|
7307
7329
|
instanceLocation: o,
|
|
7308
7330
|
keyword: "unevaluatedProperties",
|
|
@@ -7327,7 +7349,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7327
7349
|
if (be !== void 0) {
|
|
7328
7350
|
let d = `${s}/prefixItems`, f = Math.min(be.length, t);
|
|
7329
7351
|
for (; l < f; l++) {
|
|
7330
|
-
let t =
|
|
7352
|
+
let t = R(e[l], be[l], n, r, i, a, `${o}/${l}`, `${d}/${l}`);
|
|
7331
7353
|
if (c[l] = !0, !t.valid && (u = i, _.push({
|
|
7332
7354
|
instanceLocation: o,
|
|
7333
7355
|
keyword: "prefixItems",
|
|
@@ -7341,7 +7363,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7341
7363
|
if (Array.isArray(xe)) {
|
|
7342
7364
|
let s = Math.min(xe.length, t);
|
|
7343
7365
|
for (; l < s; l++) {
|
|
7344
|
-
let t =
|
|
7366
|
+
let t = R(e[l], xe[l], n, r, i, a, `${o}/${l}`, `${d}/${l}`);
|
|
7345
7367
|
if (c[l] = !0, !t.valid && (u = i, _.push({
|
|
7346
7368
|
instanceLocation: o,
|
|
7347
7369
|
keyword: "items",
|
|
@@ -7350,7 +7372,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7350
7372
|
}, ...t.errors), u)) break;
|
|
7351
7373
|
}
|
|
7352
7374
|
} else for (; l < t; l++) {
|
|
7353
|
-
let t =
|
|
7375
|
+
let t = R(e[l], xe, n, r, i, a, `${o}/${l}`, d);
|
|
7354
7376
|
if (c[l] = !0, !t.valid && (u = i, _.push({
|
|
7355
7377
|
instanceLocation: o,
|
|
7356
7378
|
keyword: "items",
|
|
@@ -7361,7 +7383,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7361
7383
|
if (!u && Se !== void 0) {
|
|
7362
7384
|
let d = `${s}/additionalItems`;
|
|
7363
7385
|
for (; l < t; l++) {
|
|
7364
|
-
let t =
|
|
7386
|
+
let t = R(e[l], Se, n, r, i, a, `${o}/${l}`, d);
|
|
7365
7387
|
c[l] = !0, t.valid || (u = i, _.push({
|
|
7366
7388
|
instanceLocation: o,
|
|
7367
7389
|
keyword: "additionalItems",
|
|
@@ -7387,7 +7409,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7387
7409
|
else {
|
|
7388
7410
|
let l = `${s}/contains`, u = _.length, d = 0;
|
|
7389
7411
|
for (let s = 0; s < t; s++) {
|
|
7390
|
-
let t =
|
|
7412
|
+
let t = R(e[s], we, n, r, i, a, `${o}/${s}`, l);
|
|
7391
7413
|
t.valid ? (c[s] = !0, d++) : _.push(...t.errors);
|
|
7392
7414
|
}
|
|
7393
7415
|
d >= (g || 0) && (_.length = u), g === void 0 && Te === void 0 && d === 0 ? _.splice(u, 0, {
|
|
@@ -7412,7 +7434,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7412
7434
|
let u = `${s}/unevaluatedItems`;
|
|
7413
7435
|
for (; l < t; l++) {
|
|
7414
7436
|
if (c[l]) continue;
|
|
7415
|
-
let t =
|
|
7437
|
+
let t = R(e[l], Ce, n, r, i, a, `${o}/${l}`, u);
|
|
7416
7438
|
c[l] = !0, t.valid || _.push({
|
|
7417
7439
|
instanceLocation: o,
|
|
7418
7440
|
keyword: "unevaluatedItems",
|
|
@@ -7426,7 +7448,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7426
7448
|
for (let a = 0; a < t; a++) {
|
|
7427
7449
|
if (n === a) continue;
|
|
7428
7450
|
let t = e[a];
|
|
7429
|
-
(r === t || i && typeof t == "object" && t &&
|
|
7451
|
+
(r === t || i && typeof t == "object" && t && hd(r, t)) && (_.push({
|
|
7430
7452
|
instanceLocation: o,
|
|
7431
7453
|
keyword: "uniqueItems",
|
|
7432
7454
|
keywordLocation: `${s}/uniqueItems`,
|
|
@@ -7475,7 +7497,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7475
7497
|
});
|
|
7476
7498
|
}
|
|
7477
7499
|
} else if (u === "string") {
|
|
7478
|
-
let t = Pe === void 0 && Fe === void 0 ? 0 :
|
|
7500
|
+
let t = Pe === void 0 && Fe === void 0 ? 0 : Xd(e);
|
|
7479
7501
|
Pe !== void 0 && t < Pe && _.push({
|
|
7480
7502
|
instanceLocation: o,
|
|
7481
7503
|
keyword: "minLength",
|
|
@@ -7491,7 +7513,7 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7491
7513
|
keyword: "pattern",
|
|
7492
7514
|
keywordLocation: `${s}/pattern`,
|
|
7493
7515
|
error: "String does not match pattern."
|
|
7494
|
-
}), le !== void 0 &&
|
|
7516
|
+
}), le !== void 0 && zd[le] && !zd[le](e) && _.push({
|
|
7495
7517
|
instanceLocation: o,
|
|
7496
7518
|
keyword: "format",
|
|
7497
7519
|
keywordLocation: `${s}/format`,
|
|
@@ -7505,122 +7527,122 @@ function z(e, t, n = "2019-09", r = xd(t), i = !0, a = null, o = "#", s = "#", c
|
|
|
7505
7527
|
}
|
|
7506
7528
|
//#endregion
|
|
7507
7529
|
//#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js
|
|
7508
|
-
var
|
|
7530
|
+
var Zd = class {
|
|
7509
7531
|
schema;
|
|
7510
7532
|
draft;
|
|
7511
7533
|
shortCircuit;
|
|
7512
7534
|
lookup;
|
|
7513
7535
|
constructor(e, t = "2019-09", n = !0) {
|
|
7514
|
-
this.schema = e, this.draft = t, this.shortCircuit = n, this.lookup =
|
|
7536
|
+
this.schema = e, this.draft = t, this.shortCircuit = n, this.lookup = Sd(e);
|
|
7515
7537
|
}
|
|
7516
7538
|
validate(e) {
|
|
7517
|
-
return
|
|
7539
|
+
return R(e, this.schema, this.draft, this.lookup, this.shortCircuit);
|
|
7518
7540
|
}
|
|
7519
7541
|
addSchema(e, t) {
|
|
7520
7542
|
t && (e = {
|
|
7521
7543
|
...e,
|
|
7522
7544
|
$id: t
|
|
7523
|
-
}),
|
|
7545
|
+
}), Sd(e, this.lookup);
|
|
7524
7546
|
}
|
|
7525
|
-
},
|
|
7526
|
-
function
|
|
7527
|
-
let e =
|
|
7528
|
-
return
|
|
7547
|
+
}, Qd = 0;
|
|
7548
|
+
function $d() {
|
|
7549
|
+
let e = Qd;
|
|
7550
|
+
return Qd += 1, e;
|
|
7529
7551
|
}
|
|
7530
|
-
function
|
|
7552
|
+
function ef(e) {
|
|
7531
7553
|
if (typeof e == "object" && e && !Object.isFrozen(e)) {
|
|
7532
|
-
for (let t of Object.getOwnPropertyNames(e))
|
|
7554
|
+
for (let t of Object.getOwnPropertyNames(e)) ef(Reflect.get(e, t));
|
|
7533
7555
|
Object.freeze(e);
|
|
7534
7556
|
}
|
|
7535
7557
|
return e;
|
|
7536
7558
|
}
|
|
7537
|
-
function
|
|
7559
|
+
function tf(e, t) {
|
|
7538
7560
|
let n = {};
|
|
7539
7561
|
for (let r of t) r in e && (n[r] = e[r]);
|
|
7540
7562
|
return n;
|
|
7541
7563
|
}
|
|
7542
|
-
function
|
|
7564
|
+
function nf(e) {
|
|
7543
7565
|
if (typeof e != "object" || !e) return e;
|
|
7544
7566
|
if (Array.isArray(e)) {
|
|
7545
7567
|
let t = [];
|
|
7546
|
-
for (let [n, r] of e.entries()) t[n] =
|
|
7568
|
+
for (let [n, r] of e.entries()) t[n] = nf(r);
|
|
7547
7569
|
return t;
|
|
7548
7570
|
}
|
|
7549
7571
|
{
|
|
7550
7572
|
let t = {};
|
|
7551
|
-
for (let n in e) t[n] =
|
|
7573
|
+
for (let n in e) t[n] = nf(e[n]);
|
|
7552
7574
|
return t;
|
|
7553
7575
|
}
|
|
7554
7576
|
}
|
|
7555
|
-
function
|
|
7577
|
+
function rf(e, t) {
|
|
7556
7578
|
if (e === t) return !0;
|
|
7557
7579
|
if (typeof e != "object" || !e || typeof e != typeof t) return !1;
|
|
7558
7580
|
if (Array.isArray(e)) {
|
|
7559
7581
|
if (!Array.isArray(t) || e.length !== t.length) return !1;
|
|
7560
|
-
for (let [n, r] of e.entries()) if (!
|
|
7582
|
+
for (let [n, r] of e.entries()) if (!rf(r, t[n])) return !1;
|
|
7561
7583
|
} else {
|
|
7562
7584
|
if (Array.isArray(t)) return !1;
|
|
7563
|
-
for (let n in e) if (!(n in t) || !
|
|
7585
|
+
for (let n in e) if (!(n in t) || !rf(e[n], t[n])) return !1;
|
|
7564
7586
|
for (let n in t) if (!(n in e)) return !1;
|
|
7565
7587
|
}
|
|
7566
7588
|
return !0;
|
|
7567
7589
|
}
|
|
7568
7590
|
//#endregion
|
|
7569
7591
|
//#region src/json-schema-subset/expression/result.ts
|
|
7570
|
-
var
|
|
7592
|
+
var z = Object.freeze({
|
|
7571
7593
|
Equals: 0,
|
|
7572
7594
|
Containing: 1,
|
|
7573
7595
|
ContainedBy: 2,
|
|
7574
7596
|
Rejection: 3,
|
|
7575
7597
|
Intersection: 4
|
|
7576
|
-
}),
|
|
7577
|
-
[
|
|
7578
|
-
[
|
|
7579
|
-
[
|
|
7580
|
-
[
|
|
7581
|
-
[
|
|
7582
|
-
]),
|
|
7598
|
+
}), B = ff(z.Equals), V = ff(z.Containing), H = ff(z.ContainedBy), U = ff(z.Rejection), W = ff(z.Intersection), af = ef([
|
|
7599
|
+
[z.Equals, B],
|
|
7600
|
+
[z.Containing, V],
|
|
7601
|
+
[z.ContainedBy, H],
|
|
7602
|
+
[z.Rejection, U],
|
|
7603
|
+
[z.Intersection, W]
|
|
7604
|
+
]), of = (() => {
|
|
7583
7605
|
let e = 0;
|
|
7584
|
-
for (let [t, n] of
|
|
7606
|
+
for (let [t, n] of af) e |= n;
|
|
7585
7607
|
return e;
|
|
7586
7608
|
})();
|
|
7587
|
-
function of(e) {
|
|
7588
|
-
return !!(e & V);
|
|
7589
|
-
}
|
|
7590
7609
|
function sf(e) {
|
|
7591
|
-
return !!(e &
|
|
7610
|
+
return !!(e & B);
|
|
7592
7611
|
}
|
|
7593
7612
|
function cf(e) {
|
|
7594
|
-
return !!(e &
|
|
7613
|
+
return !!(e & V);
|
|
7595
7614
|
}
|
|
7596
7615
|
function lf(e) {
|
|
7597
|
-
return !!(e &
|
|
7616
|
+
return !!(e & H);
|
|
7598
7617
|
}
|
|
7599
7618
|
function uf(e) {
|
|
7600
|
-
return !!(e &
|
|
7619
|
+
return !!(e & U);
|
|
7601
7620
|
}
|
|
7602
7621
|
function df(e) {
|
|
7622
|
+
return !!(e & W);
|
|
7623
|
+
}
|
|
7624
|
+
function ff(e) {
|
|
7603
7625
|
return 1 << e;
|
|
7604
7626
|
}
|
|
7605
7627
|
//#endregion
|
|
7606
7628
|
//#region src/json-schema-subset/expression/combination.ts
|
|
7607
|
-
function
|
|
7608
|
-
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r :
|
|
7629
|
+
function pf(e) {
|
|
7630
|
+
let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : mf(t, r, e), n += 1, t) };
|
|
7609
7631
|
return Object.defineProperties(r, {
|
|
7610
7632
|
result: { get: () => t },
|
|
7611
7633
|
count: { get: () => n }
|
|
7612
7634
|
}), r;
|
|
7613
7635
|
}
|
|
7614
|
-
function
|
|
7636
|
+
function mf(e, t, n) {
|
|
7615
7637
|
let r = 0;
|
|
7616
|
-
for (let [i, a] of
|
|
7617
|
-
for (let [e, a] of
|
|
7638
|
+
for (let [i, a] of af) if (a & e) {
|
|
7639
|
+
for (let [e, a] of af) if (a & t && (r |= n(i, e), r === of)) return r;
|
|
7618
7640
|
}
|
|
7619
7641
|
return r;
|
|
7620
7642
|
}
|
|
7621
7643
|
//#endregion
|
|
7622
7644
|
//#region src/json-schema-subset/expression/calculator.ts
|
|
7623
|
-
var
|
|
7645
|
+
var G = Object.freeze({
|
|
7624
7646
|
Save: 0,
|
|
7625
7647
|
OneOf: 1,
|
|
7626
7648
|
AllOf: 2,
|
|
@@ -7628,289 +7650,289 @@ var K = Object.freeze({
|
|
|
7628
7650
|
Not: 4,
|
|
7629
7651
|
Swap: 5
|
|
7630
7652
|
});
|
|
7631
|
-
function
|
|
7653
|
+
function hf(e, t) {
|
|
7632
7654
|
switch (e) {
|
|
7633
|
-
case
|
|
7634
|
-
case
|
|
7635
|
-
case
|
|
7636
|
-
case
|
|
7637
|
-
case
|
|
7638
|
-
case
|
|
7655
|
+
case G.Save: return t[0];
|
|
7656
|
+
case G.OneOf: return _f(t);
|
|
7657
|
+
case G.AllOf:
|
|
7658
|
+
case G.AnyOf: return vf(e, t);
|
|
7659
|
+
case G.Not:
|
|
7660
|
+
case G.Swap: return yf(e, t[0]);
|
|
7639
7661
|
}
|
|
7640
7662
|
}
|
|
7641
|
-
function hf(e) {
|
|
7642
|
-
return vf(K.Swap, e);
|
|
7643
|
-
}
|
|
7644
7663
|
function gf(e) {
|
|
7664
|
+
return yf(G.Swap, e);
|
|
7665
|
+
}
|
|
7666
|
+
function _f(e) {
|
|
7645
7667
|
if (e.length === 1) return e[0];
|
|
7646
|
-
let t =
|
|
7668
|
+
let t = vf(G.AnyOf, e), n = [];
|
|
7647
7669
|
for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
|
|
7648
|
-
let i = e[t], a = e[r], o =
|
|
7670
|
+
let i = e[t], a = e[r], o = vf(G.AllOf, [i, a]);
|
|
7649
7671
|
n.push(o);
|
|
7650
7672
|
}
|
|
7651
|
-
let r =
|
|
7652
|
-
return
|
|
7673
|
+
let r = vf(G.AnyOf, n), i = yf(G.Not, r);
|
|
7674
|
+
return vf(G.AllOf, [t, i]);
|
|
7653
7675
|
}
|
|
7654
|
-
function
|
|
7676
|
+
function vf(e, t) {
|
|
7655
7677
|
if (t.length < 0) throw Error("invalid expressions: empty array");
|
|
7656
7678
|
let n;
|
|
7657
7679
|
switch (e) {
|
|
7658
|
-
case
|
|
7659
|
-
n =
|
|
7680
|
+
case G.AllOf:
|
|
7681
|
+
n = pf(bf);
|
|
7660
7682
|
break;
|
|
7661
|
-
case
|
|
7662
|
-
n =
|
|
7683
|
+
case G.AnyOf:
|
|
7684
|
+
n = pf(xf);
|
|
7663
7685
|
break;
|
|
7664
7686
|
default: throw Error(`invalid operator ${e}`);
|
|
7665
7687
|
}
|
|
7666
7688
|
for (let e of t) n.push(e);
|
|
7667
7689
|
return n.result;
|
|
7668
7690
|
}
|
|
7669
|
-
function
|
|
7691
|
+
function yf(e, t) {
|
|
7670
7692
|
let n, r = 0;
|
|
7671
7693
|
switch (e) {
|
|
7672
|
-
case
|
|
7673
|
-
n = xf;
|
|
7674
|
-
break;
|
|
7675
|
-
case K.Swap:
|
|
7694
|
+
case G.Not:
|
|
7676
7695
|
n = Sf;
|
|
7677
7696
|
break;
|
|
7697
|
+
case G.Swap:
|
|
7698
|
+
n = Cf;
|
|
7699
|
+
break;
|
|
7678
7700
|
default: throw Error(`invalid operator ${e}`);
|
|
7679
7701
|
}
|
|
7680
|
-
for (let [e, i] of
|
|
7702
|
+
for (let [e, i] of af) i & t && (r |= n(e));
|
|
7681
7703
|
return r;
|
|
7682
7704
|
}
|
|
7683
|
-
function
|
|
7705
|
+
function bf(e, t) {
|
|
7684
7706
|
let n = 0;
|
|
7685
7707
|
switch (e) {
|
|
7686
|
-
case
|
|
7708
|
+
case z.Equals:
|
|
7687
7709
|
switch (t) {
|
|
7688
|
-
case
|
|
7689
|
-
n =
|
|
7710
|
+
case z.Equals:
|
|
7711
|
+
n = B;
|
|
7690
7712
|
break;
|
|
7691
|
-
case
|
|
7692
|
-
n =
|
|
7713
|
+
case z.Containing:
|
|
7714
|
+
n = B;
|
|
7693
7715
|
break;
|
|
7694
|
-
case
|
|
7695
|
-
n =
|
|
7716
|
+
case z.ContainedBy:
|
|
7717
|
+
n = H;
|
|
7696
7718
|
break;
|
|
7697
|
-
case
|
|
7719
|
+
case z.Rejection:
|
|
7698
7720
|
n = 0;
|
|
7699
7721
|
break;
|
|
7700
|
-
case
|
|
7722
|
+
case z.Intersection: n = H;
|
|
7701
7723
|
}
|
|
7702
7724
|
break;
|
|
7703
|
-
case
|
|
7725
|
+
case z.Containing:
|
|
7704
7726
|
switch (t) {
|
|
7705
|
-
case
|
|
7706
|
-
n =
|
|
7727
|
+
case z.Equals:
|
|
7728
|
+
n = B;
|
|
7707
7729
|
break;
|
|
7708
|
-
case
|
|
7709
|
-
n =
|
|
7730
|
+
case z.Containing:
|
|
7731
|
+
n = B | V;
|
|
7710
7732
|
break;
|
|
7711
|
-
case
|
|
7712
|
-
n =
|
|
7733
|
+
case z.ContainedBy:
|
|
7734
|
+
n = H;
|
|
7713
7735
|
break;
|
|
7714
|
-
case
|
|
7715
|
-
n =
|
|
7736
|
+
case z.Rejection:
|
|
7737
|
+
n = U;
|
|
7716
7738
|
break;
|
|
7717
|
-
case
|
|
7739
|
+
case z.Intersection: n = W | H;
|
|
7718
7740
|
}
|
|
7719
7741
|
break;
|
|
7720
|
-
case
|
|
7742
|
+
case z.ContainedBy:
|
|
7721
7743
|
switch (t) {
|
|
7722
|
-
case
|
|
7723
|
-
n =
|
|
7744
|
+
case z.Equals:
|
|
7745
|
+
n = H;
|
|
7724
7746
|
break;
|
|
7725
|
-
case
|
|
7726
|
-
n =
|
|
7747
|
+
case z.Containing:
|
|
7748
|
+
n = H;
|
|
7727
7749
|
break;
|
|
7728
|
-
case
|
|
7729
|
-
n =
|
|
7750
|
+
case z.ContainedBy:
|
|
7751
|
+
n = H;
|
|
7730
7752
|
break;
|
|
7731
|
-
case
|
|
7753
|
+
case z.Rejection:
|
|
7732
7754
|
n = 0;
|
|
7733
7755
|
break;
|
|
7734
|
-
case
|
|
7756
|
+
case z.Intersection: n = H;
|
|
7735
7757
|
}
|
|
7736
7758
|
break;
|
|
7737
|
-
case
|
|
7759
|
+
case z.Rejection:
|
|
7738
7760
|
switch (t) {
|
|
7739
|
-
case
|
|
7761
|
+
case z.Equals:
|
|
7740
7762
|
n = 0;
|
|
7741
7763
|
break;
|
|
7742
|
-
case
|
|
7743
|
-
n =
|
|
7764
|
+
case z.Containing:
|
|
7765
|
+
n = U;
|
|
7744
7766
|
break;
|
|
7745
|
-
case
|
|
7767
|
+
case z.ContainedBy:
|
|
7746
7768
|
n = 0;
|
|
7747
7769
|
break;
|
|
7748
|
-
case
|
|
7749
|
-
n =
|
|
7770
|
+
case z.Rejection:
|
|
7771
|
+
n = U;
|
|
7750
7772
|
break;
|
|
7751
|
-
case
|
|
7773
|
+
case z.Intersection: n = U;
|
|
7752
7774
|
}
|
|
7753
7775
|
break;
|
|
7754
|
-
case
|
|
7755
|
-
case
|
|
7756
|
-
n =
|
|
7776
|
+
case z.Intersection: switch (t) {
|
|
7777
|
+
case z.Equals:
|
|
7778
|
+
n = H;
|
|
7757
7779
|
break;
|
|
7758
|
-
case
|
|
7759
|
-
n =
|
|
7780
|
+
case z.Containing:
|
|
7781
|
+
n = W | H;
|
|
7760
7782
|
break;
|
|
7761
|
-
case
|
|
7762
|
-
n =
|
|
7783
|
+
case z.ContainedBy:
|
|
7784
|
+
n = H;
|
|
7763
7785
|
break;
|
|
7764
|
-
case
|
|
7765
|
-
n =
|
|
7786
|
+
case z.Rejection:
|
|
7787
|
+
n = U;
|
|
7766
7788
|
break;
|
|
7767
|
-
case
|
|
7789
|
+
case z.Intersection: n = H | U | W;
|
|
7768
7790
|
}
|
|
7769
7791
|
}
|
|
7770
7792
|
return n;
|
|
7771
7793
|
}
|
|
7772
|
-
function
|
|
7794
|
+
function xf(e, t) {
|
|
7773
7795
|
let n = 0;
|
|
7774
7796
|
switch (e) {
|
|
7775
|
-
case
|
|
7797
|
+
case z.Equals:
|
|
7776
7798
|
switch (t) {
|
|
7777
|
-
case
|
|
7799
|
+
case z.Equals:
|
|
7800
|
+
n = B;
|
|
7801
|
+
break;
|
|
7802
|
+
case z.Containing:
|
|
7778
7803
|
n = V;
|
|
7779
7804
|
break;
|
|
7780
|
-
case
|
|
7781
|
-
n =
|
|
7805
|
+
case z.ContainedBy:
|
|
7806
|
+
n = B;
|
|
7782
7807
|
break;
|
|
7783
|
-
case
|
|
7808
|
+
case z.Rejection:
|
|
7784
7809
|
n = V;
|
|
7785
7810
|
break;
|
|
7786
|
-
case
|
|
7787
|
-
n = H;
|
|
7788
|
-
break;
|
|
7789
|
-
case B.Intersection: n = H;
|
|
7811
|
+
case z.Intersection: n = V;
|
|
7790
7812
|
}
|
|
7791
7813
|
break;
|
|
7792
|
-
case
|
|
7814
|
+
case z.Containing:
|
|
7793
7815
|
switch (t) {
|
|
7794
|
-
case
|
|
7795
|
-
n =
|
|
7816
|
+
case z.Equals:
|
|
7817
|
+
n = V;
|
|
7796
7818
|
break;
|
|
7797
|
-
case
|
|
7798
|
-
n =
|
|
7819
|
+
case z.Containing:
|
|
7820
|
+
n = V;
|
|
7799
7821
|
break;
|
|
7800
|
-
case
|
|
7801
|
-
n =
|
|
7822
|
+
case z.ContainedBy:
|
|
7823
|
+
n = V;
|
|
7802
7824
|
break;
|
|
7803
|
-
case
|
|
7804
|
-
n =
|
|
7825
|
+
case z.Rejection:
|
|
7826
|
+
n = V;
|
|
7805
7827
|
break;
|
|
7806
|
-
case
|
|
7828
|
+
case z.Intersection: n = V;
|
|
7807
7829
|
}
|
|
7808
7830
|
break;
|
|
7809
|
-
case
|
|
7831
|
+
case z.ContainedBy:
|
|
7810
7832
|
switch (t) {
|
|
7811
|
-
case
|
|
7812
|
-
n =
|
|
7833
|
+
case z.Equals:
|
|
7834
|
+
n = B;
|
|
7813
7835
|
break;
|
|
7814
|
-
case
|
|
7815
|
-
n =
|
|
7836
|
+
case z.Containing:
|
|
7837
|
+
n = V;
|
|
7816
7838
|
break;
|
|
7817
|
-
case
|
|
7818
|
-
n =
|
|
7839
|
+
case z.ContainedBy:
|
|
7840
|
+
n = B | H;
|
|
7819
7841
|
break;
|
|
7820
|
-
case
|
|
7821
|
-
n =
|
|
7842
|
+
case z.Rejection:
|
|
7843
|
+
n = W;
|
|
7822
7844
|
break;
|
|
7823
|
-
case
|
|
7845
|
+
case z.Intersection: n = V | W;
|
|
7824
7846
|
}
|
|
7825
7847
|
break;
|
|
7826
|
-
case
|
|
7848
|
+
case z.Rejection:
|
|
7827
7849
|
switch (t) {
|
|
7828
|
-
case
|
|
7829
|
-
n =
|
|
7830
|
-
break;
|
|
7831
|
-
case B.Containing:
|
|
7832
|
-
n = H;
|
|
7850
|
+
case z.Equals:
|
|
7851
|
+
n = V;
|
|
7833
7852
|
break;
|
|
7834
|
-
case
|
|
7835
|
-
n =
|
|
7853
|
+
case z.Containing:
|
|
7854
|
+
n = V;
|
|
7836
7855
|
break;
|
|
7837
|
-
case
|
|
7856
|
+
case z.ContainedBy:
|
|
7838
7857
|
n = W;
|
|
7839
7858
|
break;
|
|
7840
|
-
case
|
|
7859
|
+
case z.Rejection:
|
|
7860
|
+
n = U;
|
|
7861
|
+
break;
|
|
7862
|
+
case z.Intersection: n = W;
|
|
7841
7863
|
}
|
|
7842
7864
|
break;
|
|
7843
|
-
case
|
|
7844
|
-
case
|
|
7845
|
-
n =
|
|
7865
|
+
case z.Intersection: switch (t) {
|
|
7866
|
+
case z.Equals:
|
|
7867
|
+
n = V;
|
|
7846
7868
|
break;
|
|
7847
|
-
case
|
|
7848
|
-
n =
|
|
7869
|
+
case z.Containing:
|
|
7870
|
+
n = V;
|
|
7849
7871
|
break;
|
|
7850
|
-
case
|
|
7851
|
-
n =
|
|
7872
|
+
case z.ContainedBy:
|
|
7873
|
+
n = V | W;
|
|
7852
7874
|
break;
|
|
7853
|
-
case
|
|
7854
|
-
n =
|
|
7875
|
+
case z.Rejection:
|
|
7876
|
+
n = W;
|
|
7855
7877
|
break;
|
|
7856
|
-
case
|
|
7878
|
+
case z.Intersection: n = V | W;
|
|
7857
7879
|
}
|
|
7858
7880
|
}
|
|
7859
7881
|
return n;
|
|
7860
7882
|
}
|
|
7861
|
-
function
|
|
7883
|
+
function Sf(e) {
|
|
7862
7884
|
let t = 0;
|
|
7863
7885
|
switch (e) {
|
|
7864
|
-
case
|
|
7865
|
-
t =
|
|
7886
|
+
case z.Equals:
|
|
7887
|
+
t = U;
|
|
7866
7888
|
break;
|
|
7867
|
-
case
|
|
7868
|
-
t =
|
|
7889
|
+
case z.Containing:
|
|
7890
|
+
t = U;
|
|
7869
7891
|
break;
|
|
7870
|
-
case
|
|
7871
|
-
t =
|
|
7892
|
+
case z.ContainedBy:
|
|
7893
|
+
t = W;
|
|
7872
7894
|
break;
|
|
7873
|
-
case
|
|
7874
|
-
t =
|
|
7895
|
+
case z.Rejection:
|
|
7896
|
+
t = B | V;
|
|
7875
7897
|
break;
|
|
7876
|
-
case
|
|
7898
|
+
case z.Intersection: t = H | W;
|
|
7877
7899
|
}
|
|
7878
7900
|
return t;
|
|
7879
7901
|
}
|
|
7880
|
-
function
|
|
7902
|
+
function Cf(e) {
|
|
7881
7903
|
let t = 0;
|
|
7882
7904
|
switch (e) {
|
|
7883
|
-
case
|
|
7884
|
-
t =
|
|
7885
|
-
break;
|
|
7886
|
-
case B.Containing:
|
|
7887
|
-
t = U;
|
|
7905
|
+
case z.Equals:
|
|
7906
|
+
t = B;
|
|
7888
7907
|
break;
|
|
7889
|
-
case
|
|
7908
|
+
case z.Containing:
|
|
7890
7909
|
t = H;
|
|
7891
7910
|
break;
|
|
7892
|
-
case
|
|
7893
|
-
t =
|
|
7911
|
+
case z.ContainedBy:
|
|
7912
|
+
t = V;
|
|
7913
|
+
break;
|
|
7914
|
+
case z.Rejection:
|
|
7915
|
+
t = U;
|
|
7894
7916
|
break;
|
|
7895
|
-
case
|
|
7917
|
+
case z.Intersection: t = W;
|
|
7896
7918
|
}
|
|
7897
7919
|
return t;
|
|
7898
7920
|
}
|
|
7899
7921
|
//#endregion
|
|
7900
7922
|
//#region src/json-schema-subset/expression/types.ts
|
|
7901
|
-
var
|
|
7923
|
+
var wf = Object.freeze({
|
|
7902
7924
|
Leaf: 0,
|
|
7903
7925
|
Not: 1,
|
|
7904
7926
|
AllOf: 2,
|
|
7905
7927
|
AnyOf: 3,
|
|
7906
7928
|
OneOf: 4
|
|
7907
|
-
}),
|
|
7929
|
+
}), Tf = (e) => (t, n) => {
|
|
7908
7930
|
let r = {
|
|
7909
7931
|
parent: null,
|
|
7910
7932
|
swapped: !1,
|
|
7911
7933
|
expressions: null,
|
|
7912
7934
|
calculation: {
|
|
7913
|
-
operator:
|
|
7935
|
+
operator: G.Save,
|
|
7914
7936
|
results: [0],
|
|
7915
7937
|
willSwap: !1,
|
|
7916
7938
|
count: 0
|
|
@@ -7929,10 +7951,10 @@ var Cf = Object.freeze({
|
|
|
7929
7951
|
for (; a.length > 0;) c(a.pop());
|
|
7930
7952
|
}
|
|
7931
7953
|
function o(t) {
|
|
7932
|
-
let n =
|
|
7954
|
+
let n = B, [r, o] = t.expressions;
|
|
7933
7955
|
if (!e.equals(r, o)) {
|
|
7934
7956
|
let a = e.describe(r);
|
|
7935
|
-
if (a.kind !==
|
|
7957
|
+
if (a.kind !== wf.Leaf) {
|
|
7936
7958
|
let [e, n] = s(a, !1);
|
|
7937
7959
|
t.expressions = null, t.calculation = e;
|
|
7938
7960
|
for (let [e, r] of n.entries()) i.push({
|
|
@@ -7947,7 +7969,7 @@ var Cf = Object.freeze({
|
|
|
7947
7969
|
return;
|
|
7948
7970
|
}
|
|
7949
7971
|
let c = e.describe(o);
|
|
7950
|
-
if (c.kind !==
|
|
7972
|
+
if (c.kind !== wf.Leaf) {
|
|
7951
7973
|
let [e, n] = s(c, !0);
|
|
7952
7974
|
t.expressions = null, t.calculation = e;
|
|
7953
7975
|
for (let [e, a] of n.entries()) i.push({
|
|
@@ -7964,26 +7986,26 @@ var Cf = Object.freeze({
|
|
|
7964
7986
|
if (n = e.calculate(r, o), e.observeCalculation?.(r, o, n, t.swapped), n === 0) throw Error("cannot response expression as none");
|
|
7965
7987
|
}
|
|
7966
7988
|
t.expressions = null, t.calculation = {
|
|
7967
|
-
operator:
|
|
7989
|
+
operator: G.Save,
|
|
7968
7990
|
results: [n],
|
|
7969
7991
|
willSwap: !1,
|
|
7970
7992
|
count: 0
|
|
7971
7993
|
}, a.push(t);
|
|
7972
7994
|
}
|
|
7973
7995
|
function s(e, t) {
|
|
7974
|
-
let n =
|
|
7996
|
+
let n = G.Save, r;
|
|
7975
7997
|
switch (e.kind) {
|
|
7976
|
-
case
|
|
7977
|
-
n =
|
|
7998
|
+
case wf.Not:
|
|
7999
|
+
n = G.Not, r = [e.expression];
|
|
7978
8000
|
break;
|
|
7979
|
-
case
|
|
7980
|
-
n =
|
|
8001
|
+
case wf.AllOf:
|
|
8002
|
+
n = G.AllOf, r = [...e.expressions];
|
|
7981
8003
|
break;
|
|
7982
|
-
case
|
|
7983
|
-
n =
|
|
8004
|
+
case wf.AnyOf:
|
|
8005
|
+
n = G.AnyOf, r = [...e.expressions];
|
|
7984
8006
|
break;
|
|
7985
|
-
case
|
|
7986
|
-
n =
|
|
8007
|
+
case wf.OneOf:
|
|
8008
|
+
n = G.OneOf, r = [...e.expressions];
|
|
7987
8009
|
break;
|
|
7988
8010
|
default: throw Error(`invalid kind ${e.kind}`);
|
|
7989
8011
|
}
|
|
@@ -7995,8 +8017,8 @@ var Cf = Object.freeze({
|
|
|
7995
8017
|
}, r];
|
|
7996
8018
|
}
|
|
7997
8019
|
function c(e) {
|
|
7998
|
-
let t = e.calculation, n = e.parent, r =
|
|
7999
|
-
if (r === 0 && (r =
|
|
8020
|
+
let t = e.calculation, n = e.parent, r = hf(t.operator, t.results);
|
|
8021
|
+
if (r === 0 && (r = H), t.willSwap && (r = gf(r)), n) {
|
|
8000
8022
|
let e = n.node.calculation, t = e.results;
|
|
8001
8023
|
t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
|
|
8002
8024
|
}
|
|
@@ -8004,79 +8026,79 @@ var Cf = Object.freeze({
|
|
|
8004
8026
|
let l = r.calculation.results[0];
|
|
8005
8027
|
if (l === 0) throw Error("cannot find result of root");
|
|
8006
8028
|
return l;
|
|
8007
|
-
},
|
|
8029
|
+
}, Ef = class extends Error {
|
|
8008
8030
|
constructor(e = []) {
|
|
8009
|
-
super(
|
|
8031
|
+
super(kf(e)), this.name = "SchemaError", this.items = e;
|
|
8010
8032
|
}
|
|
8011
|
-
},
|
|
8033
|
+
}, Df = Object.freeze({
|
|
8012
8034
|
Compiled: 0,
|
|
8013
8035
|
External: 1
|
|
8014
8036
|
});
|
|
8015
|
-
function
|
|
8037
|
+
function Of(e) {
|
|
8016
8038
|
switch (e.kind) {
|
|
8017
|
-
case
|
|
8039
|
+
case Df.Compiled: {
|
|
8018
8040
|
let { message: t, path: n } = e;
|
|
8019
8041
|
return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
|
|
8020
8042
|
}
|
|
8021
|
-
case
|
|
8043
|
+
case Df.External: return String(e.error);
|
|
8022
8044
|
}
|
|
8023
8045
|
}
|
|
8024
|
-
function
|
|
8046
|
+
function kf(e) {
|
|
8025
8047
|
switch (e.length) {
|
|
8026
8048
|
case 0: return "without any items";
|
|
8027
|
-
case 1: return
|
|
8028
|
-
default: return `${
|
|
8049
|
+
case 1: return Of(e[0]);
|
|
8050
|
+
default: return `${Of(e[0])} ... omit the rest ${e.length - 1} items`;
|
|
8029
8051
|
}
|
|
8030
8052
|
}
|
|
8031
8053
|
//#endregion
|
|
8032
8054
|
//#region src/json-schema-subset/compiler/common.ts
|
|
8033
|
-
var
|
|
8034
|
-
function Af(e) {
|
|
8035
|
-
return kf.has(e);
|
|
8036
|
-
}
|
|
8055
|
+
var Af = /* @__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("."));
|
|
8037
8056
|
function jf(e) {
|
|
8038
|
-
|
|
8057
|
+
return Af.has(e);
|
|
8058
|
+
}
|
|
8059
|
+
function Mf(e) {
|
|
8060
|
+
for (let t in e) if (jf(t)) return !1;
|
|
8039
8061
|
return !0;
|
|
8040
8062
|
}
|
|
8041
|
-
function
|
|
8063
|
+
function Nf(e, ...t) {
|
|
8042
8064
|
return {
|
|
8043
8065
|
...e,
|
|
8044
8066
|
path: [...e.path, ...t]
|
|
8045
8067
|
};
|
|
8046
8068
|
}
|
|
8047
|
-
function
|
|
8069
|
+
function Pf(e) {
|
|
8048
8070
|
if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
|
|
8049
8071
|
return e;
|
|
8050
8072
|
}
|
|
8051
|
-
function
|
|
8052
|
-
t.push(
|
|
8073
|
+
function Ff({ path: e, errors: t }, n, ...r) {
|
|
8074
|
+
t.push(If(e, r, n));
|
|
8053
8075
|
}
|
|
8054
|
-
function
|
|
8055
|
-
t.push(
|
|
8076
|
+
function K({ path: e, warns: t }, n, ...r) {
|
|
8077
|
+
t.push(If(e, r, n));
|
|
8056
8078
|
}
|
|
8057
|
-
function
|
|
8079
|
+
function If(e, t, n) {
|
|
8058
8080
|
return {
|
|
8059
|
-
kind:
|
|
8081
|
+
kind: Df.Compiled,
|
|
8060
8082
|
message: n,
|
|
8061
8083
|
path: [...e, ...t]
|
|
8062
8084
|
};
|
|
8063
8085
|
}
|
|
8064
8086
|
//#endregion
|
|
8065
8087
|
//#region src/json-schema-subset/compiler/utils.ts
|
|
8066
|
-
function
|
|
8088
|
+
function Lf(e) {
|
|
8067
8089
|
for (let t in e) {
|
|
8068
8090
|
let n = e[t];
|
|
8069
|
-
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] :
|
|
8091
|
+
n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : Rf(n) && delete e[t]);
|
|
8070
8092
|
}
|
|
8071
8093
|
return e;
|
|
8072
8094
|
}
|
|
8073
|
-
function
|
|
8095
|
+
function Rf(e) {
|
|
8074
8096
|
for (let t in e) return !1;
|
|
8075
8097
|
return !0;
|
|
8076
8098
|
}
|
|
8077
8099
|
//#endregion
|
|
8078
8100
|
//#region src/json-schema-subset/compiler/wrapper.ts
|
|
8079
|
-
var
|
|
8101
|
+
var zf = Symbol("compiledId"), Bf = Symbol("compiledKind"), Vf = Symbol("compiledPath"), Hf = Symbol("validatorLoader"), q = Object.freeze({
|
|
8080
8102
|
Extends: 0,
|
|
8081
8103
|
Never: 1,
|
|
8082
8104
|
Any: 2,
|
|
@@ -8089,62 +8111,62 @@ var Rf = Symbol("compiledId"), zf = Symbol("compiledKind"), Bf = Symbol("compile
|
|
|
8089
8111
|
Not: 9,
|
|
8090
8112
|
Combination: 10,
|
|
8091
8113
|
EnumOrConst: 11
|
|
8092
|
-
}),
|
|
8114
|
+
}), Uf = ef(Zf(q.Any, $d(), {}, () => () => !0)), Wf = ef(Zf(q.Never, $d(), {
|
|
8093
8115
|
type: "string",
|
|
8094
8116
|
maxLength: 0,
|
|
8095
8117
|
minLength: 1
|
|
8096
8118
|
}, () => () => !1));
|
|
8097
|
-
function Wf(e) {
|
|
8098
|
-
return typeof e != "object" || !e ? !1 : Rf in e;
|
|
8099
|
-
}
|
|
8100
8119
|
function Gf(e) {
|
|
8101
|
-
return typeof e != "object" || !e ? !1 :
|
|
8102
|
-
}
|
|
8103
|
-
function Y(e) {
|
|
8104
|
-
return Gf(e) ? e[zf] : J.Extends;
|
|
8120
|
+
return typeof e != "object" || !e ? !1 : zf in e;
|
|
8105
8121
|
}
|
|
8106
8122
|
function Kf(e) {
|
|
8107
|
-
return
|
|
8123
|
+
return typeof e != "object" || !e ? !1 : zf in e && Bf in e;
|
|
8124
|
+
}
|
|
8125
|
+
function J(e) {
|
|
8126
|
+
return Kf(e) ? e[Bf] : q.Extends;
|
|
8108
8127
|
}
|
|
8109
8128
|
function qf(e) {
|
|
8110
|
-
return Gf(e) ? e[
|
|
8129
|
+
return Kf(e) || Gf(e) ? e[zf] : e.id;
|
|
8111
8130
|
}
|
|
8112
8131
|
function Jf(e) {
|
|
8113
|
-
return
|
|
8114
|
-
|
|
8132
|
+
return Kf(e) ? e[Vf] : void 0;
|
|
8133
|
+
}
|
|
8134
|
+
function Yf(e) {
|
|
8135
|
+
return typeof e != "object" || !e || Object.defineProperty(e, zf, {
|
|
8136
|
+
value: $d(),
|
|
8115
8137
|
configurable: !1,
|
|
8116
8138
|
writable: !1,
|
|
8117
8139
|
enumerable: !1
|
|
8118
8140
|
}), e;
|
|
8119
8141
|
}
|
|
8120
|
-
function
|
|
8121
|
-
return
|
|
8142
|
+
function Y(e, t, n, r = []) {
|
|
8143
|
+
return Zf(e, $d(), t, n && (() => n.compile(t)), r);
|
|
8122
8144
|
}
|
|
8123
|
-
function
|
|
8124
|
-
return
|
|
8145
|
+
function Xf(e) {
|
|
8146
|
+
return Zf(q.Never, $d(), { ...e }, e[Hf], e[Vf]);
|
|
8125
8147
|
}
|
|
8126
|
-
function
|
|
8148
|
+
function Zf(e, t, n, r, i = []) {
|
|
8127
8149
|
let a = null;
|
|
8128
8150
|
return Object.defineProperties(n, {
|
|
8129
|
-
[
|
|
8151
|
+
[Bf]: {
|
|
8130
8152
|
value: e,
|
|
8131
8153
|
configurable: !1,
|
|
8132
8154
|
writable: !1,
|
|
8133
8155
|
enumerable: !1
|
|
8134
8156
|
},
|
|
8135
|
-
[
|
|
8157
|
+
[zf]: {
|
|
8136
8158
|
value: t,
|
|
8137
8159
|
configurable: !1,
|
|
8138
8160
|
writable: !1,
|
|
8139
8161
|
enumerable: !1
|
|
8140
8162
|
},
|
|
8141
|
-
[
|
|
8163
|
+
[Vf]: {
|
|
8142
8164
|
value: i,
|
|
8143
8165
|
configurable: !1,
|
|
8144
8166
|
writable: !1,
|
|
8145
8167
|
enumerable: !1
|
|
8146
8168
|
},
|
|
8147
|
-
[
|
|
8169
|
+
[Hf]: {
|
|
8148
8170
|
value: r,
|
|
8149
8171
|
configurable: !1,
|
|
8150
8172
|
writable: !1,
|
|
@@ -8161,16 +8183,16 @@ function Xf(e, t, n, r, i = []) {
|
|
|
8161
8183
|
}
|
|
8162
8184
|
//#endregion
|
|
8163
8185
|
//#region src/json-schema-subset/compiler/array.ts
|
|
8164
|
-
function
|
|
8165
|
-
let n =
|
|
8166
|
-
if (Array.isArray(n) ? s =
|
|
8186
|
+
function Qf(e, t) {
|
|
8187
|
+
let n = $f(e, t), r = ep(e, "maxItems", t), i = ep(e, "minItems", t), a = tp(e, t), o = t.uniqueItems, s;
|
|
8188
|
+
if (Array.isArray(n) ? s = np(e, t) : t.additionalItems && K(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
|
|
8167
8189
|
let c = !1, l = !1;
|
|
8168
8190
|
if (Array.isArray(n)) {
|
|
8169
|
-
r !== void 0 && r <= n.length && (n = n.splice(r), s =
|
|
8170
|
-
let t = n.findIndex((e) =>
|
|
8171
|
-
t !== -1 && (n = n.splice(t), s =
|
|
8172
|
-
} else
|
|
8173
|
-
return r !== void 0 && i !== void 0 && r < i && (l ||
|
|
8191
|
+
r !== void 0 && r <= n.length && (n = n.splice(r), s = rp(s, e.delegate));
|
|
8192
|
+
let t = n.findIndex((e) => J(e) === q.Never);
|
|
8193
|
+
t !== -1 && (n = n.splice(t), s = rp(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);
|
|
8194
|
+
} else J(n) === q.Never && (c = !0);
|
|
8195
|
+
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, Lf({
|
|
8174
8196
|
type: "array",
|
|
8175
8197
|
items: n,
|
|
8176
8198
|
contains: a,
|
|
@@ -8180,12 +8202,12 @@ function Zf(e, t) {
|
|
|
8180
8202
|
additionalItems: s
|
|
8181
8203
|
}), e.delegate, e.path);
|
|
8182
8204
|
}
|
|
8183
|
-
function
|
|
8184
|
-
if (!t) return
|
|
8205
|
+
function $f(e, { items: t }) {
|
|
8206
|
+
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
8185
8207
|
if (Array.isArray(t)) {
|
|
8186
8208
|
let n = [], r = !1;
|
|
8187
8209
|
for (let [i, a] of t.entries()) {
|
|
8188
|
-
let t =
|
|
8210
|
+
let t = Z(Nf(e, "items", i), Pf(a));
|
|
8189
8211
|
if (!t) {
|
|
8190
8212
|
r = !0;
|
|
8191
8213
|
continue;
|
|
@@ -8194,80 +8216,80 @@ function Qf(e, { items: t }) {
|
|
|
8194
8216
|
}
|
|
8195
8217
|
return r ? null : n;
|
|
8196
8218
|
}
|
|
8197
|
-
return
|
|
8219
|
+
return Z(Nf(e, "items"), Pf(t));
|
|
8198
8220
|
}
|
|
8199
|
-
function
|
|
8221
|
+
function ep(e, t, n) {
|
|
8200
8222
|
let r = n[t];
|
|
8201
8223
|
if (r !== void 0) {
|
|
8202
8224
|
if (Number.isNaN(r)) {
|
|
8203
|
-
|
|
8225
|
+
K(e, "find NaN", t);
|
|
8204
8226
|
return;
|
|
8205
8227
|
}
|
|
8206
8228
|
if (r < 0) {
|
|
8207
|
-
|
|
8229
|
+
K(e, `find invalid number ${r}`, t);
|
|
8208
8230
|
return;
|
|
8209
8231
|
}
|
|
8210
8232
|
return r;
|
|
8211
8233
|
}
|
|
8212
8234
|
}
|
|
8213
|
-
function
|
|
8214
|
-
return t ?
|
|
8235
|
+
function tp(e, { contains: t }) {
|
|
8236
|
+
return t ? Z(Nf(e, "contains"), Pf(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
8215
8237
|
}
|
|
8216
|
-
function
|
|
8238
|
+
function np(e, { additionalItems: t }) {
|
|
8217
8239
|
switch (typeof t) {
|
|
8218
|
-
case "boolean": return t ?
|
|
8219
|
-
case "object": return
|
|
8220
|
-
default: return
|
|
8240
|
+
case "boolean": return t ? Y(q.Any, {}, e.delegate, e.path) : !1;
|
|
8241
|
+
case "object": return Z(Nf(e, "additionalItems"), t);
|
|
8242
|
+
default: return Y(q.Any, {}, e.delegate, e.path);
|
|
8221
8243
|
}
|
|
8222
8244
|
}
|
|
8223
|
-
function
|
|
8224
|
-
return e === void 0 ?
|
|
8245
|
+
function rp(e, t) {
|
|
8246
|
+
return e === void 0 ? Y(q.Never, {
|
|
8225
8247
|
type: "string",
|
|
8226
8248
|
maxLength: 0,
|
|
8227
8249
|
minLength: 1
|
|
8228
|
-
}, t) :
|
|
8250
|
+
}, t) : Kf(e) ? J(e) === q.Never ? e : Xf(e) : e;
|
|
8229
8251
|
}
|
|
8230
8252
|
//#endregion
|
|
8231
8253
|
//#region src/json-schema-subset/compiler/combination.ts
|
|
8232
|
-
var
|
|
8254
|
+
var ip = Object.freeze([
|
|
8233
8255
|
"allOf",
|
|
8234
8256
|
"anyOf",
|
|
8235
8257
|
"oneOf"
|
|
8236
8258
|
]);
|
|
8237
|
-
function
|
|
8238
|
-
if (n.length === 0) return
|
|
8259
|
+
function ap(e, t, n, r) {
|
|
8260
|
+
if (n.length === 0) return Ff(e, "disable empty list", t), null;
|
|
8239
8261
|
let i = [];
|
|
8240
8262
|
for (let [r, a] of n.entries()) {
|
|
8241
|
-
let n =
|
|
8263
|
+
let n = Z(Nf(e, t, r), Pf(a));
|
|
8242
8264
|
n && i.push(n);
|
|
8243
8265
|
}
|
|
8244
8266
|
if (i.length < n.length) return null;
|
|
8245
8267
|
let a = 0, o = 0;
|
|
8246
|
-
for (let e of i) switch (
|
|
8247
|
-
case
|
|
8268
|
+
for (let e of i) switch (J(e)) {
|
|
8269
|
+
case q.Any:
|
|
8248
8270
|
a += 1;
|
|
8249
8271
|
break;
|
|
8250
|
-
case
|
|
8272
|
+
case q.Never: o += 1;
|
|
8251
8273
|
}
|
|
8252
|
-
let s =
|
|
8274
|
+
let s = q.Combination;
|
|
8253
8275
|
switch (t) {
|
|
8254
8276
|
case "allOf":
|
|
8255
|
-
o > 0 ? s =
|
|
8277
|
+
o > 0 ? s = q.Never : a === i.length ? s = q.Any : op(i) || (s = q.Never);
|
|
8256
8278
|
break;
|
|
8257
8279
|
case "anyOf":
|
|
8258
|
-
a > 0 ? s =
|
|
8280
|
+
a > 0 ? s = q.Any : o === i.length && (s = q.Never);
|
|
8259
8281
|
break;
|
|
8260
|
-
case "oneOf": a > 1 || o === i.length ? s =
|
|
8282
|
+
case "oneOf": a > 1 || o === i.length ? s = q.Never : a === 1 && o === i.length - 1 && (s = q.Any);
|
|
8261
8283
|
}
|
|
8262
|
-
return
|
|
8284
|
+
return Y(s, { [t]: i }, r, e.path);
|
|
8263
8285
|
}
|
|
8264
|
-
function
|
|
8286
|
+
function op(e) {
|
|
8265
8287
|
let t = null;
|
|
8266
8288
|
for (let n of e) {
|
|
8267
|
-
let e =
|
|
8289
|
+
let e = J(n);
|
|
8268
8290
|
switch (e) {
|
|
8269
|
-
case
|
|
8270
|
-
case
|
|
8291
|
+
case q.Any:
|
|
8292
|
+
case q.Never: break;
|
|
8271
8293
|
default: if (t === null) t = e;
|
|
8272
8294
|
else if (t !== e) return !1;
|
|
8273
8295
|
}
|
|
@@ -8276,47 +8298,47 @@ function ap(e) {
|
|
|
8276
8298
|
}
|
|
8277
8299
|
//#endregion
|
|
8278
8300
|
//#region src/json-schema-subset/checker/validator.ts
|
|
8279
|
-
var
|
|
8301
|
+
var X = Object.freeze({
|
|
8280
8302
|
Valid: 0,
|
|
8281
8303
|
Invalid: 1,
|
|
8282
8304
|
Unknown: 2
|
|
8283
8305
|
});
|
|
8284
|
-
function
|
|
8306
|
+
function sp(e, t) {
|
|
8285
8307
|
let n = e.isValid;
|
|
8286
|
-
return n ? n(t) === !0 ?
|
|
8308
|
+
return n ? n(t) === !0 ? X.Valid : X.Invalid : X.Unknown;
|
|
8287
8309
|
}
|
|
8288
8310
|
//#endregion
|
|
8289
8311
|
//#region src/json-schema-subset/compiler/enumAndConst.ts
|
|
8290
|
-
function
|
|
8312
|
+
function cp(e, t, n, r) {
|
|
8291
8313
|
let i, a = !1;
|
|
8292
8314
|
if (t) {
|
|
8293
|
-
if (t.length === 0) return
|
|
8315
|
+
if (t.length === 0) return Ff(e, "disable empty list", "enum"), null;
|
|
8294
8316
|
i = [];
|
|
8295
|
-
for (let [n, a] of t.entries()) switch (
|
|
8296
|
-
case
|
|
8297
|
-
i.push(
|
|
8317
|
+
for (let [n, a] of t.entries()) switch (sp(r, a)) {
|
|
8318
|
+
case X.Valid:
|
|
8319
|
+
i.push(Yf(a));
|
|
8298
8320
|
break;
|
|
8299
|
-
case
|
|
8321
|
+
case X.Invalid: K(e, "cannot pass JSON schema of currently schema object", "enum", n);
|
|
8300
8322
|
}
|
|
8301
|
-
i.length === 0 &&
|
|
8323
|
+
i.length === 0 && K(e, "all of elements from list is rejected by currently schema object", "enum");
|
|
8302
8324
|
}
|
|
8303
|
-
if (n &&
|
|
8325
|
+
if (n && sp(r, n) === X.Invalid && (a = !0), i) {
|
|
8304
8326
|
if (i.length === 0) a = !0;
|
|
8305
8327
|
else if (n) {
|
|
8306
8328
|
let e = !1;
|
|
8307
|
-
for (let t of i) if (
|
|
8329
|
+
for (let t of i) if (rf(t, n)) {
|
|
8308
8330
|
e = !0;
|
|
8309
8331
|
break;
|
|
8310
8332
|
}
|
|
8311
8333
|
e || (a = !0);
|
|
8312
8334
|
}
|
|
8313
8335
|
}
|
|
8314
|
-
let o = a ?
|
|
8315
|
-
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const =
|
|
8336
|
+
let o = a ? q.Never : q.EnumOrConst, s = {};
|
|
8337
|
+
return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = Yf(nf(n))), Y(o, s, e.delegate, e.path);
|
|
8316
8338
|
}
|
|
8317
8339
|
//#endregion
|
|
8318
8340
|
//#region src/json-schema-subset/compiler/object.ts
|
|
8319
|
-
var
|
|
8341
|
+
var lp = /* @__PURE__ */ new Set([
|
|
8320
8342
|
"type",
|
|
8321
8343
|
"maxProperties",
|
|
8322
8344
|
"minProperties",
|
|
@@ -8327,56 +8349,56 @@ var cp = /* @__PURE__ */ new Set([
|
|
|
8327
8349
|
"dependencies",
|
|
8328
8350
|
"propertyNames"
|
|
8329
8351
|
]);
|
|
8330
|
-
function
|
|
8331
|
-
let n = Object.keys(t).filter((e) => !
|
|
8332
|
-
n.length > 0 &&
|
|
8333
|
-
let r =
|
|
8352
|
+
function up(e, t) {
|
|
8353
|
+
let n = Object.keys(t).filter((e) => !lp.has(e) && jf(e));
|
|
8354
|
+
n.length > 0 && K(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
8355
|
+
let r = dp(e, "maxProperties", t), i = dp(e, "minProperties", t), a = fp(e, t), o = pp(e, t), s = mp(e, t), c = gp(e, t);
|
|
8334
8356
|
if (!a || !o || !s || !c) return null;
|
|
8335
|
-
let l =
|
|
8357
|
+
let l = hp(e, o, s, t);
|
|
8336
8358
|
if (!l) return null;
|
|
8337
|
-
let u =
|
|
8338
|
-
return
|
|
8359
|
+
let u = vp(e, _p(a, o, s, l), c, t);
|
|
8360
|
+
return Y(yp(e, a, l, u, r, i) ? q.Never : q.Object, Lf({
|
|
8339
8361
|
type: "object",
|
|
8340
8362
|
required: u,
|
|
8341
8363
|
properties: l,
|
|
8342
8364
|
minProperties: i,
|
|
8343
8365
|
maxProperties: r,
|
|
8344
8366
|
additionalProperties: a,
|
|
8345
|
-
patternProperties:
|
|
8346
|
-
dependencies:
|
|
8367
|
+
patternProperties: wp(o),
|
|
8368
|
+
dependencies: Tp(c, t),
|
|
8347
8369
|
propertyNames: s
|
|
8348
8370
|
}), e.delegate, e.path);
|
|
8349
8371
|
}
|
|
8350
|
-
function
|
|
8372
|
+
function dp(e, t, n) {
|
|
8351
8373
|
let r = n[t];
|
|
8352
8374
|
if (r !== void 0) {
|
|
8353
8375
|
if (Number.isNaN(r)) {
|
|
8354
|
-
|
|
8376
|
+
K(e, "find NaN", t);
|
|
8355
8377
|
return;
|
|
8356
8378
|
}
|
|
8357
8379
|
if (r < 0) {
|
|
8358
|
-
|
|
8380
|
+
K(e, `find invalid number ${r}`, t);
|
|
8359
8381
|
return;
|
|
8360
8382
|
}
|
|
8361
8383
|
return r;
|
|
8362
8384
|
}
|
|
8363
8385
|
}
|
|
8364
|
-
function
|
|
8365
|
-
return t === !1 ?
|
|
8386
|
+
function fp(e, { additionalProperties: t }) {
|
|
8387
|
+
return t === !1 ? Y(q.Never, {
|
|
8366
8388
|
type: "string",
|
|
8367
8389
|
maxLength: 0,
|
|
8368
8390
|
minLength: 1
|
|
8369
|
-
}, e.delegate, e.path) : typeof t == "object" ?
|
|
8391
|
+
}, e.delegate, e.path) : typeof t == "object" ? Z(Nf(e, "additionalProperties"), Pf(t)) : Y(q.Any, {}, e.delegate, e.path);
|
|
8370
8392
|
}
|
|
8371
|
-
function
|
|
8393
|
+
function pp(e, { patternProperties: t }) {
|
|
8372
8394
|
let n = !1, r = {};
|
|
8373
8395
|
for (let i in t) {
|
|
8374
|
-
let a =
|
|
8396
|
+
let a = Cp(i);
|
|
8375
8397
|
if (a instanceof Error) {
|
|
8376
|
-
|
|
8398
|
+
K(e, `property name invalid. ${i}`, "patternProperties", i);
|
|
8377
8399
|
continue;
|
|
8378
8400
|
}
|
|
8379
|
-
let o =
|
|
8401
|
+
let o = Pf(t[i]), s = Z(Nf(e, "patternProperties", i), o);
|
|
8380
8402
|
if (!s) {
|
|
8381
8403
|
n = !0;
|
|
8382
8404
|
continue;
|
|
@@ -8385,29 +8407,29 @@ function fp(e, { patternProperties: t }) {
|
|
|
8385
8407
|
}
|
|
8386
8408
|
return n ? null : r;
|
|
8387
8409
|
}
|
|
8388
|
-
function
|
|
8389
|
-
if (!t) return
|
|
8390
|
-
t =
|
|
8391
|
-
let n =
|
|
8410
|
+
function mp(e, { propertyNames: t }) {
|
|
8411
|
+
if (!t) return Y(q.Any, {}, e.delegate, e.path);
|
|
8412
|
+
t = Pf(t);
|
|
8413
|
+
let n = Z(Nf(e, "propertyNames"), t);
|
|
8392
8414
|
if (!n) return null;
|
|
8393
|
-
let r =
|
|
8394
|
-
return r !==
|
|
8415
|
+
let r = J(n);
|
|
8416
|
+
return r !== q.String && r !== q.Any ? Xf(n) : n;
|
|
8395
8417
|
}
|
|
8396
|
-
function
|
|
8418
|
+
function hp(e, t, n, { properties: r }) {
|
|
8397
8419
|
let i = !1;
|
|
8398
8420
|
if (!r) return {};
|
|
8399
8421
|
let a = {};
|
|
8400
8422
|
for (let o in r) {
|
|
8401
|
-
if (
|
|
8402
|
-
|
|
8423
|
+
if (sp(n, o) === X.Invalid) {
|
|
8424
|
+
K(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
|
|
8403
8425
|
continue;
|
|
8404
8426
|
}
|
|
8405
|
-
let s =
|
|
8406
|
-
if (s &&
|
|
8407
|
-
|
|
8427
|
+
let s = Sp(t, o);
|
|
8428
|
+
if (s && J(s) === q.Never) {
|
|
8429
|
+
K(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
|
|
8408
8430
|
continue;
|
|
8409
8431
|
}
|
|
8410
|
-
let c =
|
|
8432
|
+
let c = Pf(r[o]), l = Z(Nf(e, "properties", o), c);
|
|
8411
8433
|
if (!l) {
|
|
8412
8434
|
i = !0;
|
|
8413
8435
|
continue;
|
|
@@ -8416,62 +8438,62 @@ function mp(e, t, n, { properties: r }) {
|
|
|
8416
8438
|
}
|
|
8417
8439
|
return i ? null : a;
|
|
8418
8440
|
}
|
|
8419
|
-
function
|
|
8441
|
+
function gp(e, { dependencies: t }) {
|
|
8420
8442
|
if (!t) return [{}, {}];
|
|
8421
8443
|
let n = {}, r = {};
|
|
8422
8444
|
for (let i in t) {
|
|
8423
|
-
let a =
|
|
8445
|
+
let a = Pf(t[i]);
|
|
8424
8446
|
if (Array.isArray(a)) {
|
|
8425
|
-
let { keys: t, duplicated: r } =
|
|
8426
|
-
r &&
|
|
8447
|
+
let { keys: t, duplicated: r } = xp(a);
|
|
8448
|
+
r && K(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
|
|
8427
8449
|
} else {
|
|
8428
|
-
let t =
|
|
8450
|
+
let t = Z(Nf(e, "dependencies", i), a);
|
|
8429
8451
|
if (t) {
|
|
8430
|
-
let e =
|
|
8431
|
-
r[i] = e ===
|
|
8452
|
+
let e = J(t);
|
|
8453
|
+
r[i] = e === q.Object || e === q.Any ? t : e === q.Extends ? Wf : Xf(t);
|
|
8432
8454
|
}
|
|
8433
8455
|
}
|
|
8434
8456
|
}
|
|
8435
8457
|
return [n, r];
|
|
8436
8458
|
}
|
|
8437
|
-
function
|
|
8459
|
+
function _p(e, t, n, r) {
|
|
8438
8460
|
return (i) => {
|
|
8439
|
-
if (
|
|
8440
|
-
let a =
|
|
8441
|
-
return !!(a &&
|
|
8461
|
+
if (sp(n, i) === X.Invalid) return !0;
|
|
8462
|
+
let a = Sp(t, i);
|
|
8463
|
+
return !!(a && J(a) === q.Never || J(r[i] ?? e) === q.Never);
|
|
8442
8464
|
};
|
|
8443
8465
|
}
|
|
8444
|
-
function
|
|
8466
|
+
function vp(e, t, n, { required: r }) {
|
|
8445
8467
|
if (!r) return [];
|
|
8446
|
-
let i =
|
|
8447
|
-
i.duplicated &&
|
|
8468
|
+
let i = xp(r);
|
|
8469
|
+
i.duplicated && K(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
|
|
8448
8470
|
let a = [], o = [];
|
|
8449
|
-
for (let e of i.keys)
|
|
8450
|
-
return o.length > 0 &&
|
|
8451
|
-
}
|
|
8452
|
-
function
|
|
8453
|
-
if (i !== void 0 && a !== void 0 && i < a) return
|
|
8454
|
-
if (i !== void 0 && r.length > i) return
|
|
8455
|
-
if (a !== void 0 && r.length < a) return
|
|
8456
|
-
if (
|
|
8471
|
+
for (let e of i.keys) bp(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
|
|
8472
|
+
return o.length > 0 && K(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
|
|
8473
|
+
}
|
|
8474
|
+
function yp(e, t, n, r, i, a) {
|
|
8475
|
+
if (i !== void 0 && a !== void 0 && i < a) return K(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
|
|
8476
|
+
if (i !== void 0 && r.length > i) return K(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
|
|
8477
|
+
if (a !== void 0 && r.length < a) return K(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
|
|
8478
|
+
if (J(t) !== q.Never) return !1;
|
|
8457
8479
|
for (let e in n) {
|
|
8458
8480
|
let t = n[e];
|
|
8459
|
-
if (
|
|
8481
|
+
if (J(t) !== q.Never) return !1;
|
|
8460
8482
|
}
|
|
8461
8483
|
return !0;
|
|
8462
8484
|
}
|
|
8463
|
-
function
|
|
8485
|
+
function bp([e, t], n) {
|
|
8464
8486
|
let r = [n], i = new Set(r);
|
|
8465
8487
|
for (; r.length > 0;) {
|
|
8466
8488
|
let n = r.pop(), i = t[n], o = e[n];
|
|
8467
|
-
i &&
|
|
8489
|
+
i && J(i) === q.Object && a(i.required), o && a(o);
|
|
8468
8490
|
}
|
|
8469
8491
|
function a(e) {
|
|
8470
8492
|
if (e) for (let t of e) i.has(t) || (i.add(t), r.push(t));
|
|
8471
8493
|
}
|
|
8472
8494
|
return [...i];
|
|
8473
8495
|
}
|
|
8474
|
-
function
|
|
8496
|
+
function xp(e) {
|
|
8475
8497
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
8476
8498
|
for (let r of e) t.has(r) ? n.add(r) : t.add(r);
|
|
8477
8499
|
return n.size === 0 ? {
|
|
@@ -8482,14 +8504,14 @@ function bp(e) {
|
|
|
8482
8504
|
duplicated: [...n]
|
|
8483
8505
|
};
|
|
8484
8506
|
}
|
|
8485
|
-
function
|
|
8507
|
+
function Sp(e, t) {
|
|
8486
8508
|
for (let n in e) {
|
|
8487
8509
|
let [r, i] = e[n];
|
|
8488
8510
|
if (i.test(t)) return r;
|
|
8489
8511
|
}
|
|
8490
8512
|
return null;
|
|
8491
8513
|
}
|
|
8492
|
-
function
|
|
8514
|
+
function Cp(e) {
|
|
8493
8515
|
try {
|
|
8494
8516
|
return new RegExp(e, "i");
|
|
8495
8517
|
} catch (e) {
|
|
@@ -8497,12 +8519,12 @@ function Sp(e) {
|
|
|
8497
8519
|
throw e;
|
|
8498
8520
|
}
|
|
8499
8521
|
}
|
|
8500
|
-
function
|
|
8522
|
+
function wp(e) {
|
|
8501
8523
|
let t = {};
|
|
8502
8524
|
for (let n in e) t[n] = e[n][0];
|
|
8503
8525
|
return t;
|
|
8504
8526
|
}
|
|
8505
|
-
function
|
|
8527
|
+
function Tp([e, t], { dependencies: n }) {
|
|
8506
8528
|
let r = {};
|
|
8507
8529
|
for (let i in n) {
|
|
8508
8530
|
let n = e[i], a = t[i];
|
|
@@ -8512,79 +8534,79 @@ function wp([e, t], { dependencies: n }) {
|
|
|
8512
8534
|
}
|
|
8513
8535
|
//#endregion
|
|
8514
8536
|
//#region src/json-schema-subset/compiler/primitive.ts
|
|
8515
|
-
var
|
|
8537
|
+
var Ep = /* @__PURE__ */ new Set([
|
|
8516
8538
|
"type",
|
|
8517
8539
|
"multipleOf",
|
|
8518
8540
|
"maximum",
|
|
8519
8541
|
"exclusiveMaximum",
|
|
8520
8542
|
"minimum",
|
|
8521
8543
|
"exclusiveMinimum"
|
|
8522
|
-
]),
|
|
8544
|
+
]), Dp = /* @__PURE__ */ new Set([
|
|
8523
8545
|
"type",
|
|
8524
8546
|
"format",
|
|
8525
8547
|
"maxLength",
|
|
8526
8548
|
"minLength",
|
|
8527
8549
|
"pattern"
|
|
8528
8550
|
]);
|
|
8529
|
-
function
|
|
8551
|
+
function Op(e, t) {
|
|
8530
8552
|
let { type: n } = t;
|
|
8531
8553
|
switch (n) {
|
|
8532
8554
|
case "number":
|
|
8533
|
-
case "integer": return
|
|
8534
|
-
case "string": return
|
|
8555
|
+
case "integer": return kp(e, t);
|
|
8556
|
+
case "string": return jp(e, t);
|
|
8535
8557
|
case "boolean":
|
|
8536
8558
|
case "null": {
|
|
8537
|
-
let r = Object.keys(t).filter((e) =>
|
|
8538
|
-
return r.length > 0 &&
|
|
8559
|
+
let r = Object.keys(t).filter((e) => jf(e) && e !== "type");
|
|
8560
|
+
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);
|
|
8539
8561
|
}
|
|
8540
|
-
default: return
|
|
8562
|
+
default: return Ff(e, `invalid type ${JSON.stringify(n)}`), null;
|
|
8541
8563
|
}
|
|
8542
8564
|
}
|
|
8543
|
-
function
|
|
8544
|
-
let n = Object.keys(t).filter((e) => !
|
|
8545
|
-
n.length > 0 &&
|
|
8546
|
-
let r =
|
|
8547
|
-
for (let t of
|
|
8565
|
+
function kp(e, t) {
|
|
8566
|
+
let n = Object.keys(t).filter((e) => !Ep.has(e) && jf(e));
|
|
8567
|
+
n.length > 0 && K(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
8568
|
+
let r = tf(t, Ep);
|
|
8569
|
+
for (let t of Ep) {
|
|
8548
8570
|
let n = r[t];
|
|
8549
|
-
t !== "type" && n !== void 0 && Number.isNaN(n) && (
|
|
8571
|
+
t !== "type" && n !== void 0 && Number.isNaN(n) && (K(e, "found NaN", t), delete r[t]);
|
|
8550
8572
|
}
|
|
8551
8573
|
let { maximum: i, exclusiveMaximum: a, minimum: o, exclusiveMinimum: s } = r;
|
|
8552
8574
|
i !== void 0 && a !== void 0 && (i === a ? delete r.maximum : i < a ? delete r.exclusiveMaximum : i > a && delete r.maximum), o !== void 0 && s !== void 0 && (o === s ? delete r.minimum : o < s ? delete r.exclusiveMinimum : o > s && delete r.minimum);
|
|
8553
8575
|
let { multipleOf: c } = r;
|
|
8554
|
-
c === 0 && (delete r.multipleOf, r.type = "number",
|
|
8555
|
-
let l =
|
|
8556
|
-
return
|
|
8576
|
+
c === 0 && (delete r.multipleOf, r.type = "number", K(e, "cannot be 0", "multipleOf"));
|
|
8577
|
+
let l = q.Numeric;
|
|
8578
|
+
return Ap(r) || (l = q.Never), Y(l, r, e.delegate, e.path);
|
|
8557
8579
|
}
|
|
8558
|
-
function
|
|
8580
|
+
function Ap(e) {
|
|
8559
8581
|
let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
|
|
8560
8582
|
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;
|
|
8561
8583
|
}
|
|
8562
|
-
function
|
|
8563
|
-
let n = Object.keys(t).filter((e) => !
|
|
8564
|
-
n.length > 0 &&
|
|
8565
|
-
let r =
|
|
8566
|
-
|
|
8567
|
-
let i = r.maxLength, a = r.minLength, o =
|
|
8568
|
-
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o =
|
|
8584
|
+
function jp(e, t) {
|
|
8585
|
+
let n = Object.keys(t).filter((e) => !Dp.has(e) && jf(e));
|
|
8586
|
+
n.length > 0 && K(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
|
|
8587
|
+
let r = tf(t, Dp);
|
|
8588
|
+
Mp(e, r, "maxLength"), Mp(e, r, "minLength");
|
|
8589
|
+
let i = r.maxLength, a = r.minLength, o = q.String;
|
|
8590
|
+
return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = q.Never), Y(o, r, e.delegate, e.path);
|
|
8569
8591
|
}
|
|
8570
|
-
function
|
|
8592
|
+
function Mp(e, t, n) {
|
|
8571
8593
|
let r = t[n];
|
|
8572
|
-
r !== void 0 && Number.isNaN(r) && (
|
|
8594
|
+
r !== void 0 && Number.isNaN(r) && (K(e, "found NaN", n), delete t[n]);
|
|
8573
8595
|
}
|
|
8574
8596
|
//#endregion
|
|
8575
8597
|
//#region src/json-schema-subset/compiler/compiler.ts
|
|
8576
|
-
var
|
|
8577
|
-
function
|
|
8578
|
-
if (
|
|
8598
|
+
var Np = Object.freeze([]);
|
|
8599
|
+
function Pp(e, t, n, r) {
|
|
8600
|
+
if (Kf(e) || t.isExtendsSchema(e)) return {
|
|
8579
8601
|
schema: e,
|
|
8580
|
-
warns:
|
|
8602
|
+
warns: Np
|
|
8581
8603
|
};
|
|
8582
8604
|
if (r) {
|
|
8583
8605
|
let t = r.isSchema(e);
|
|
8584
8606
|
if (typeof t == "object") {
|
|
8585
8607
|
let e = [];
|
|
8586
8608
|
for (let n of t) e.push({
|
|
8587
|
-
kind:
|
|
8609
|
+
kind: Df.External,
|
|
8588
8610
|
error: n
|
|
8589
8611
|
});
|
|
8590
8612
|
if (e.length > 0) return e;
|
|
@@ -8597,19 +8619,19 @@ function Np(e, t, n, r) {
|
|
|
8597
8619
|
path: [],
|
|
8598
8620
|
errors: [],
|
|
8599
8621
|
warns: []
|
|
8600
|
-
}, a =
|
|
8601
|
-
if (a)
|
|
8602
|
-
else return
|
|
8622
|
+
}, a = Z(i, e);
|
|
8623
|
+
if (a) Fp(i.errors.length === 0, "found errors (it should be empty)");
|
|
8624
|
+
else return Fp(i.errors.length > 0, "cannot found any errors"), i.errors;
|
|
8603
8625
|
return {
|
|
8604
8626
|
schema: a,
|
|
8605
8627
|
warns: i.warns
|
|
8606
8628
|
};
|
|
8607
8629
|
}
|
|
8608
|
-
function
|
|
8630
|
+
function Fp(e, t) {
|
|
8609
8631
|
if (!e) throw Error(t);
|
|
8610
8632
|
}
|
|
8611
|
-
function
|
|
8612
|
-
if (e.extends.isExtendsSchema(t) ||
|
|
8633
|
+
function Z(e, t) {
|
|
8634
|
+
if (e.extends.isExtendsSchema(t) || Kf(t)) return t;
|
|
8613
8635
|
let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
|
|
8614
8636
|
if (n) return n;
|
|
8615
8637
|
let r = t, i = !1, { enum: a, const: o } = t;
|
|
@@ -8617,58 +8639,58 @@ function Q(e, t) {
|
|
|
8617
8639
|
let { enum: e, const: n, ...a } = t;
|
|
8618
8640
|
r = a, i = !0;
|
|
8619
8641
|
}
|
|
8620
|
-
let s =
|
|
8621
|
-
return s && i && (s =
|
|
8642
|
+
let s = Ip(e, r);
|
|
8643
|
+
return s && i && (s = cp(e, a, o, s)), s || null;
|
|
8622
8644
|
}
|
|
8623
|
-
function
|
|
8624
|
-
for (let n of
|
|
8645
|
+
function Ip(e, t) {
|
|
8646
|
+
for (let n of ip) {
|
|
8625
8647
|
let r = t[n];
|
|
8626
8648
|
if (r) {
|
|
8627
|
-
let i = Object.keys(t).filter((e) =>
|
|
8628
|
-
return i.length > 0 &&
|
|
8649
|
+
let i = Object.keys(t).filter((e) => jf(e) && e !== n);
|
|
8650
|
+
return i.length > 0 && K(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), ap(e, n, r) || null;
|
|
8629
8651
|
}
|
|
8630
8652
|
}
|
|
8631
8653
|
{
|
|
8632
|
-
let n =
|
|
8654
|
+
let n = Pf(t.not);
|
|
8633
8655
|
if (n) {
|
|
8634
|
-
let r = Object.keys(t).filter((e) =>
|
|
8635
|
-
r.length > 0 &&
|
|
8636
|
-
let i =
|
|
8656
|
+
let r = Object.keys(t).filter((e) => jf(e) && e !== "not");
|
|
8657
|
+
r.length > 0 && K(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
|
|
8658
|
+
let i = Z(Nf(e, "not"), n);
|
|
8637
8659
|
if (!i) return null;
|
|
8638
|
-
let a =
|
|
8639
|
-
switch (
|
|
8640
|
-
case
|
|
8641
|
-
a =
|
|
8660
|
+
let a = q.Not;
|
|
8661
|
+
switch (J(i)) {
|
|
8662
|
+
case q.Never:
|
|
8663
|
+
a = q.Any;
|
|
8642
8664
|
break;
|
|
8643
|
-
case
|
|
8665
|
+
case q.Any: a = q.Never;
|
|
8644
8666
|
}
|
|
8645
|
-
return
|
|
8667
|
+
return Y(a, { not: i }, e.delegate, e.path);
|
|
8646
8668
|
}
|
|
8647
8669
|
}
|
|
8648
8670
|
if (t.type) {
|
|
8649
8671
|
let { type: n } = t;
|
|
8650
8672
|
if (Array.isArray(n)) {
|
|
8651
8673
|
let { type: r, ...i } = t;
|
|
8652
|
-
return
|
|
8674
|
+
return ap(e, "anyOf", n.map((e) => ({
|
|
8653
8675
|
...i,
|
|
8654
8676
|
type: e
|
|
8655
8677
|
})));
|
|
8656
8678
|
}
|
|
8657
8679
|
switch (n) {
|
|
8658
|
-
case "object": return
|
|
8659
|
-
case "array": return
|
|
8660
|
-
default: return
|
|
8680
|
+
case "object": return up(e, t);
|
|
8681
|
+
case "array": return Qf(e, t);
|
|
8682
|
+
default: return Op(e, t);
|
|
8661
8683
|
}
|
|
8662
8684
|
}
|
|
8663
|
-
return
|
|
8685
|
+
return Mf(t) ? Y(q.Any, {}, e.delegate, e.path) : (Ff(e, "unrecognized"), null);
|
|
8664
8686
|
}
|
|
8665
8687
|
//#endregion
|
|
8666
8688
|
//#region src/json-schema-subset/checker/tools/mark.ts
|
|
8667
|
-
var
|
|
8689
|
+
var Lp = class {
|
|
8668
8690
|
constructor(e) {
|
|
8669
8691
|
let t = Object.freeze(e.toSorted());
|
|
8670
8692
|
if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
|
|
8671
|
-
this.keys = t, this.clazz = class extends
|
|
8693
|
+
this.keys = t, this.clazz = class extends Rp {
|
|
8672
8694
|
constructor(e) {
|
|
8673
8695
|
super(t, e);
|
|
8674
8696
|
}
|
|
@@ -8692,7 +8714,7 @@ var Ip = class {
|
|
|
8692
8714
|
else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
|
|
8693
8715
|
return new this.clazz(t);
|
|
8694
8716
|
}
|
|
8695
|
-
},
|
|
8717
|
+
}, Rp = class {
|
|
8696
8718
|
constructor(e, t) {
|
|
8697
8719
|
this.keys = e, this.int32 = t;
|
|
8698
8720
|
}
|
|
@@ -8707,21 +8729,21 @@ var Ip = class {
|
|
|
8707
8729
|
};
|
|
8708
8730
|
//#endregion
|
|
8709
8731
|
//#region src/json-schema-subset/checker/tools/quantum.ts
|
|
8710
|
-
function
|
|
8711
|
-
return new
|
|
8732
|
+
function zp(e) {
|
|
8733
|
+
return new Bp(e);
|
|
8712
8734
|
}
|
|
8713
|
-
var
|
|
8735
|
+
var Bp = class {
|
|
8714
8736
|
constructor(e) {
|
|
8715
|
-
this.description = new
|
|
8737
|
+
this.description = new Lp(e);
|
|
8716
8738
|
}
|
|
8717
8739
|
get keys() {
|
|
8718
8740
|
return this.description.keys;
|
|
8719
8741
|
}
|
|
8720
8742
|
variable(e) {
|
|
8721
8743
|
let t;
|
|
8722
|
-
return e && (t = this.description.toBundle(e).toInt32()), new
|
|
8744
|
+
return e && (t = this.description.toBundle(e).toInt32()), new Vp(this.description, t);
|
|
8723
8745
|
}
|
|
8724
|
-
},
|
|
8746
|
+
}, Vp = class {
|
|
8725
8747
|
constructor(e, t) {
|
|
8726
8748
|
this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
|
|
8727
8749
|
}
|
|
@@ -8742,7 +8764,7 @@ var zp = class {
|
|
|
8742
8764
|
}
|
|
8743
8765
|
push(e, t) {
|
|
8744
8766
|
let n = /* @__PURE__ */ new Set();
|
|
8745
|
-
for (let r of this.values) for (let [i, a] of
|
|
8767
|
+
for (let r of this.values) for (let [i, a] of af) if (e & a) {
|
|
8746
8768
|
let e = this.description.toBundle(r);
|
|
8747
8769
|
t(i, e), n.add(e.toInt32());
|
|
8748
8770
|
}
|
|
@@ -8759,11 +8781,11 @@ var zp = class {
|
|
|
8759
8781
|
};
|
|
8760
8782
|
//#endregion
|
|
8761
8783
|
//#region src/json-schema-subset/checker/tools/range.ts
|
|
8762
|
-
function
|
|
8784
|
+
function Hp(e, t) {
|
|
8763
8785
|
let [n] = e, [r] = t;
|
|
8764
|
-
return n.num < r.num ?
|
|
8786
|
+
return n.num < r.num ? Up(e, t) : n.num > r.num ? Wp(e, t) : Gp(e, t);
|
|
8765
8787
|
}
|
|
8766
|
-
function
|
|
8788
|
+
function Up(e, t) {
|
|
8767
8789
|
let [n, r] = e, [i, a] = t;
|
|
8768
8790
|
if (r.num <= i.num) {
|
|
8769
8791
|
let n = r.exclusive, a = i.exclusive;
|
|
@@ -8788,11 +8810,11 @@ function Hp(e, t) {
|
|
|
8788
8810
|
let t;
|
|
8789
8811
|
return e && (t = {
|
|
8790
8812
|
fromLeft: !1,
|
|
8791
|
-
range: [
|
|
8813
|
+
range: [Q(r), a]
|
|
8792
8814
|
}), {
|
|
8793
8815
|
left: {
|
|
8794
8816
|
fromLeft: !0,
|
|
8795
|
-
range: [n,
|
|
8817
|
+
range: [n, Q(i)]
|
|
8796
8818
|
},
|
|
8797
8819
|
center: [i, r],
|
|
8798
8820
|
right: t
|
|
@@ -8802,16 +8824,16 @@ function Hp(e, t) {
|
|
|
8802
8824
|
return {
|
|
8803
8825
|
left: {
|
|
8804
8826
|
fromLeft: !0,
|
|
8805
|
-
range: [n,
|
|
8827
|
+
range: [n, Q(i)]
|
|
8806
8828
|
},
|
|
8807
8829
|
center: [i, a],
|
|
8808
8830
|
right: {
|
|
8809
8831
|
fromLeft: !0,
|
|
8810
|
-
range: [
|
|
8832
|
+
range: [Q(a), r]
|
|
8811
8833
|
}
|
|
8812
8834
|
};
|
|
8813
8835
|
}
|
|
8814
|
-
function
|
|
8836
|
+
function Wp(e, t) {
|
|
8815
8837
|
let [n, r] = e, [i, a] = t;
|
|
8816
8838
|
if (n.num >= a.num) {
|
|
8817
8839
|
let r = a.exclusive, i = n.exclusive;
|
|
@@ -8836,11 +8858,11 @@ function Up(e, t) {
|
|
|
8836
8858
|
let t;
|
|
8837
8859
|
return e && (t = {
|
|
8838
8860
|
fromLeft: !0,
|
|
8839
|
-
range: [
|
|
8861
|
+
range: [Q(a), r]
|
|
8840
8862
|
}), {
|
|
8841
8863
|
left: {
|
|
8842
8864
|
fromLeft: !1,
|
|
8843
|
-
range: [i,
|
|
8865
|
+
range: [i, Q(n)]
|
|
8844
8866
|
},
|
|
8845
8867
|
center: [n, a],
|
|
8846
8868
|
right: t
|
|
@@ -8850,23 +8872,23 @@ function Up(e, t) {
|
|
|
8850
8872
|
return {
|
|
8851
8873
|
left: {
|
|
8852
8874
|
fromLeft: !1,
|
|
8853
|
-
range: [i,
|
|
8875
|
+
range: [i, Q(n)]
|
|
8854
8876
|
},
|
|
8855
8877
|
center: [n, r],
|
|
8856
8878
|
right: {
|
|
8857
8879
|
fromLeft: !1,
|
|
8858
|
-
range: [
|
|
8880
|
+
range: [Q(r), a]
|
|
8859
8881
|
}
|
|
8860
8882
|
};
|
|
8861
8883
|
}
|
|
8862
|
-
function
|
|
8884
|
+
function Gp(e, t) {
|
|
8863
8885
|
let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
|
|
8864
8886
|
if (!o && s ? (l = i, c = {
|
|
8865
8887
|
fromLeft: !0,
|
|
8866
|
-
range: [n,
|
|
8888
|
+
range: [n, Q(i)]
|
|
8867
8889
|
}) : o && !s && (c = {
|
|
8868
8890
|
fromLeft: !1,
|
|
8869
|
-
range: [i,
|
|
8891
|
+
range: [i, Q(n)]
|
|
8870
8892
|
}), r.num <= a.num) {
|
|
8871
8893
|
let e = !0, t = !1;
|
|
8872
8894
|
if (r.num === a.num) {
|
|
@@ -8877,7 +8899,7 @@ function Wp(e, t) {
|
|
|
8877
8899
|
let t;
|
|
8878
8900
|
return e && (t = {
|
|
8879
8901
|
fromLeft: !1,
|
|
8880
|
-
range: [
|
|
8902
|
+
range: [Q(r), a]
|
|
8881
8903
|
}), {
|
|
8882
8904
|
left: c,
|
|
8883
8905
|
center: [l, r],
|
|
@@ -8890,11 +8912,11 @@ function Wp(e, t) {
|
|
|
8890
8912
|
center: [l, a],
|
|
8891
8913
|
right: {
|
|
8892
8914
|
fromLeft: !0,
|
|
8893
|
-
range: [
|
|
8915
|
+
range: [Q(a), r]
|
|
8894
8916
|
}
|
|
8895
8917
|
};
|
|
8896
8918
|
}
|
|
8897
|
-
function
|
|
8919
|
+
function Q(e) {
|
|
8898
8920
|
return {
|
|
8899
8921
|
num: e.num,
|
|
8900
8922
|
exclusive: !e.exclusive
|
|
@@ -8903,7 +8925,7 @@ function Gp(e) {
|
|
|
8903
8925
|
//#endregion
|
|
8904
8926
|
//#region src/json-schema-subset/checker/range.ts
|
|
8905
8927
|
var Kp = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
8906
|
-
let { left: a, center: o, right: s } =
|
|
8928
|
+
let { left: a, center: o, right: s } = Hp([{
|
|
8907
8929
|
num: t,
|
|
8908
8930
|
exclusive: !1
|
|
8909
8931
|
}, {
|
|
@@ -8934,13 +8956,13 @@ var Kp = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
|
|
|
8934
8956
|
};
|
|
8935
8957
|
};
|
|
8936
8958
|
function qp({ left: e, right: t, intersection: n }) {
|
|
8937
|
-
if (!n) return
|
|
8959
|
+
if (!n) return z.Rejection;
|
|
8938
8960
|
let r = !1, i = !1;
|
|
8939
|
-
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ?
|
|
8961
|
+
return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? z.Intersection : r ? z.Containing : i ? z.ContainedBy : z.Equals;
|
|
8940
8962
|
}
|
|
8941
8963
|
//#endregion
|
|
8942
8964
|
//#region src/json-schema-subset/checker/array.ts
|
|
8943
|
-
var Jp = Kp(0), Yp =
|
|
8965
|
+
var Jp = Kp(0), Yp = zp([
|
|
8944
8966
|
"hasCommon",
|
|
8945
8967
|
"hasExtra1",
|
|
8946
8968
|
"hasExtra2",
|
|
@@ -8949,57 +8971,57 @@ var Jp = Kp(0), Yp = Rp([
|
|
|
8949
8971
|
]);
|
|
8950
8972
|
function Xp({ calculate: e }, t, n) {
|
|
8951
8973
|
let r = Jp(t.minItems, t.maxItems, n.minItems, n.maxItems), i = qp(r);
|
|
8952
|
-
if (i ===
|
|
8974
|
+
if (i === z.Rejection) return U;
|
|
8953
8975
|
let [a, o] = Zp(t), [s, c] = Zp(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = Yp.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
|
|
8954
8976
|
for (let t = 0; t < u; t++) {
|
|
8955
8977
|
let n = e(a[t] ?? o, s[t] ?? c);
|
|
8956
8978
|
d.push(n, (e, n) => {
|
|
8957
8979
|
switch (e) {
|
|
8958
|
-
case
|
|
8980
|
+
case z.Equals:
|
|
8959
8981
|
n.hasRejection || (n.hasCommon = !0);
|
|
8960
8982
|
break;
|
|
8961
|
-
case
|
|
8983
|
+
case z.Containing:
|
|
8962
8984
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra1 = !0;
|
|
8963
8985
|
break;
|
|
8964
|
-
case
|
|
8986
|
+
case z.ContainedBy:
|
|
8965
8987
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra2 = !0;
|
|
8966
8988
|
break;
|
|
8967
|
-
case
|
|
8989
|
+
case z.Intersection:
|
|
8968
8990
|
n.hasRejection || (n.hasCommon = !0), n.hasExtra1 = !0, n.hasExtra2 = !0;
|
|
8969
8991
|
break;
|
|
8970
|
-
case
|
|
8992
|
+
case z.Rejection: t < f && (n.hasCommonBroken = !0), n.hasRejection = !0, n.hasExtra1 = !0, n.hasExtra2 = !0;
|
|
8971
8993
|
}
|
|
8972
8994
|
});
|
|
8973
8995
|
}
|
|
8974
8996
|
d.update((e) => {
|
|
8975
8997
|
switch (i) {
|
|
8976
|
-
case
|
|
8998
|
+
case z.Containing:
|
|
8977
8999
|
e.hasExtra1 = !0;
|
|
8978
9000
|
break;
|
|
8979
|
-
case
|
|
9001
|
+
case z.ContainedBy:
|
|
8980
9002
|
e.hasExtra2 = !0;
|
|
8981
9003
|
break;
|
|
8982
|
-
case
|
|
9004
|
+
case z.Intersection: e.hasExtra1 = !0, e.hasExtra2 = !0;
|
|
8983
9005
|
}
|
|
8984
9006
|
t.uniqueItems && !n.uniqueItems && (n.maxItems ?? Infinity) > 1 ? e.hasExtra2 = !0 : !t.uniqueItems && n.uniqueItems && (t.maxItems ?? Infinity) > 1 && (e.hasExtra1 = !0), (t.maxItems === 0 || n.maxItems === 0) && (e.hasCommon = !0, t.maxItems !== 0 && (e.hasExtra1 = !0), n.maxItems !== 0 && (e.hasExtra2 = !0));
|
|
8985
9007
|
});
|
|
8986
9008
|
let p = 0;
|
|
8987
9009
|
for (let { hasExtra1: e, hasExtra2: t, hasCommon: n, hasCommonBroken: r } of d) {
|
|
8988
9010
|
let i = n;
|
|
8989
|
-
r && (i = !1), p |= i ? e && t ?
|
|
9011
|
+
r && (i = !1), p |= i ? e && t ? W : e ? V : t ? H : B : U;
|
|
8990
9012
|
}
|
|
8991
9013
|
return p;
|
|
8992
9014
|
}
|
|
8993
9015
|
function Zp({ items: e, additionalItems: t }) {
|
|
8994
|
-
return Array.isArray(e) ? [e, t ??
|
|
9016
|
+
return Array.isArray(e) ? [e, t ?? Uf] : [[], e ?? Uf];
|
|
8995
9017
|
}
|
|
8996
9018
|
//#endregion
|
|
8997
9019
|
//#region src/json-schema-subset/checker/cache.ts
|
|
8998
9020
|
function Qp(e) {
|
|
8999
9021
|
let t = /* @__PURE__ */ new Map();
|
|
9000
9022
|
return (n, r) => {
|
|
9001
|
-
let i =
|
|
9002
|
-
return i ===
|
|
9023
|
+
let i = Gf(n);
|
|
9024
|
+
return i === Gf(r) ? i ? em(t, n, r, e) : n === r : !1;
|
|
9003
9025
|
};
|
|
9004
9026
|
}
|
|
9005
9027
|
function $p(e) {
|
|
@@ -9007,7 +9029,7 @@ function $p(e) {
|
|
|
9007
9029
|
return (n, r) => em(t, n, r, e);
|
|
9008
9030
|
}
|
|
9009
9031
|
function em(e, t, n, r) {
|
|
9010
|
-
let i = `${
|
|
9032
|
+
let i = `${qf(t)}/${qf(n)}`, a = e.get(i);
|
|
9011
9033
|
return a === void 0 && e.set(i, a = r(t, n)), a;
|
|
9012
9034
|
}
|
|
9013
9035
|
//#endregion
|
|
@@ -9016,23 +9038,23 @@ function tm(e, t, n) {
|
|
|
9016
9038
|
let r = rm(t), i = rm(n), a = !1, o = !1, s = !1;
|
|
9017
9039
|
for (let t of r) if (im(e, i, t) ? s = !0 : a = !0, a && s) break;
|
|
9018
9040
|
for (let t of i) if (im(e, r, t) ? s = !0 : o = !0, o && s) break;
|
|
9019
|
-
return s ? a && o ?
|
|
9041
|
+
return s ? a && o ? W : a ? V : o ? H : B : U;
|
|
9020
9042
|
}
|
|
9021
9043
|
function nm(e, t) {
|
|
9022
9044
|
let n = !1, r = !1;
|
|
9023
9045
|
for (let i of rm(e)) {
|
|
9024
|
-
switch (
|
|
9025
|
-
case
|
|
9046
|
+
switch (sp(t, i)) {
|
|
9047
|
+
case X.Valid:
|
|
9026
9048
|
n = !0;
|
|
9027
9049
|
break;
|
|
9028
|
-
case
|
|
9050
|
+
case X.Invalid:
|
|
9029
9051
|
r = !0;
|
|
9030
9052
|
break;
|
|
9031
|
-
case
|
|
9053
|
+
case X.Unknown: return of;
|
|
9032
9054
|
}
|
|
9033
9055
|
if (n && r) break;
|
|
9034
9056
|
}
|
|
9035
|
-
return n && r ?
|
|
9057
|
+
return n && r ? W : n ? B | H : r ? U : J(t) === q.Never ? B : H;
|
|
9036
9058
|
}
|
|
9037
9059
|
function rm({ const: e, enum: t }) {
|
|
9038
9060
|
if (e !== void 0) return [e];
|
|
@@ -9052,7 +9074,7 @@ function am(e) {
|
|
|
9052
9074
|
}
|
|
9053
9075
|
let n = /* @__PURE__ */ new Map();
|
|
9054
9076
|
function r(e, t) {
|
|
9055
|
-
let r =
|
|
9077
|
+
let r = qf(e), a = qf(t);
|
|
9056
9078
|
if (r === a) return !0;
|
|
9057
9079
|
let o = `${r}/${a}`, s = n.get(o);
|
|
9058
9080
|
return s === void 0 && (s = i(e, t), n.set(o, s)), s;
|
|
@@ -9069,7 +9091,7 @@ function am(e) {
|
|
|
9069
9091
|
return !0;
|
|
9070
9092
|
}
|
|
9071
9093
|
function a(e, t) {
|
|
9072
|
-
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 :
|
|
9094
|
+
return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : Kf(e) && Kf(t) ? r(e, t) : i(e, t);
|
|
9073
9095
|
}
|
|
9074
9096
|
return t;
|
|
9075
9097
|
}
|
|
@@ -9105,18 +9127,18 @@ function um(e, t) {
|
|
|
9105
9127
|
//#endregion
|
|
9106
9128
|
//#region src/json-schema-subset/checker/numeric/float.ts
|
|
9107
9129
|
function dm(e, t) {
|
|
9108
|
-
let { left: n, right: r, center: i } =
|
|
9109
|
-
if (!i) return
|
|
9130
|
+
let { left: n, right: r, center: i } = Hp(pm(e), pm(t));
|
|
9131
|
+
if (!i) return U;
|
|
9110
9132
|
let a = !1, o = !1;
|
|
9111
|
-
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ?
|
|
9133
|
+
return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? W : a ? V : o ? H : B;
|
|
9112
9134
|
}
|
|
9113
9135
|
function fm(e, t) {
|
|
9114
9136
|
let n = pm(e), r = om(t);
|
|
9115
|
-
if (!r) return
|
|
9116
|
-
let i =
|
|
9117
|
-
if (!i.center) return
|
|
9137
|
+
if (!r) return V;
|
|
9138
|
+
let i = Hp(n, r.range), a = cm(i.center, r.multipleOf), o = mm(i.left, r.multipleOf), s = mm(i.right, r.multipleOf);
|
|
9139
|
+
if (!i.center) return U;
|
|
9118
9140
|
let c = !1, l = !1;
|
|
9119
|
-
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !sm(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ?
|
|
9141
|
+
return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !sm(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? W : c ? V : l ? H : B;
|
|
9120
9142
|
}
|
|
9121
9143
|
function pm(e) {
|
|
9122
9144
|
let t, n;
|
|
@@ -9147,16 +9169,16 @@ function mm(e, t) {
|
|
|
9147
9169
|
//#region src/json-schema-subset/checker/numeric/integer.ts
|
|
9148
9170
|
function hm(e, t) {
|
|
9149
9171
|
let n = om(e), r = om(t);
|
|
9150
|
-
if (!n && !r) return
|
|
9151
|
-
if (!n) return
|
|
9152
|
-
if (!r) return
|
|
9153
|
-
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c =
|
|
9154
|
-
if (c.center && (u = _m(a, s), l = cm(c.center, u)), !l) return
|
|
9172
|
+
if (!n && !r) return B;
|
|
9173
|
+
if (!n) return H;
|
|
9174
|
+
if (!r) return V;
|
|
9175
|
+
let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = Hp(i, o), l, u = 0;
|
|
9176
|
+
if (c.center && (u = _m(a, s), l = cm(c.center, u)), !l) return U;
|
|
9155
9177
|
let d = !1, f = !1, { left: p, right: m } = c;
|
|
9156
|
-
return p && cm(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && cm(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= gm(n, l, u), f ||= gm(r, l, u), d && f ?
|
|
9178
|
+
return p && cm(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && cm(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= gm(n, l, u), f ||= gm(r, l, u), d && f ? W : d ? V : f ? H : B;
|
|
9157
9179
|
}
|
|
9158
9180
|
function gm({ range: e, multipleOf: t }, n, r) {
|
|
9159
|
-
let i =
|
|
9181
|
+
let i = Hp(e, n);
|
|
9160
9182
|
if (cm(i.left?.range, t) || cm(i.right?.range, t)) return !0;
|
|
9161
9183
|
let a = cm(i.center, t);
|
|
9162
9184
|
if (!a) return !1;
|
|
@@ -9177,9 +9199,9 @@ function ym(e) {
|
|
|
9177
9199
|
//#endregion
|
|
9178
9200
|
//#region src/json-schema-subset/checker/numeric/checker.ts
|
|
9179
9201
|
function bm(e, t) {
|
|
9180
|
-
if (xm(e) || xm(t)) return
|
|
9202
|
+
if (xm(e) || xm(t)) return of;
|
|
9181
9203
|
let n = Sm(e), r = Sm(t);
|
|
9182
|
-
return n && r ? dm(e, t) : n ? fm(e, t) : r ?
|
|
9204
|
+
return n && r ? dm(e, t) : n ? fm(e, t) : r ? gf(fm(t, e)) : hm(e, t);
|
|
9183
9205
|
}
|
|
9184
9206
|
function xm(e) {
|
|
9185
9207
|
let { multipleOf: t } = e;
|
|
@@ -9191,7 +9213,7 @@ function Sm(e) {
|
|
|
9191
9213
|
}
|
|
9192
9214
|
//#endregion
|
|
9193
9215
|
//#region src/json-schema-subset/checker/object.ts
|
|
9194
|
-
var Cm = Kp(0), wm =
|
|
9216
|
+
var Cm = Kp(0), wm = zp([
|
|
9195
9217
|
"hasCommonInRequired",
|
|
9196
9218
|
"hasCommonOutRequired",
|
|
9197
9219
|
"hasExtra1",
|
|
@@ -9199,9 +9221,9 @@ var Cm = Kp(0), wm = Rp([
|
|
|
9199
9221
|
"hasRejection"
|
|
9200
9222
|
]);
|
|
9201
9223
|
function Tm(e, t, n) {
|
|
9202
|
-
if (Em(t, n)) return
|
|
9224
|
+
if (Em(t, n)) return U;
|
|
9203
9225
|
let r = Dm(t, n);
|
|
9204
|
-
if (!r) return
|
|
9226
|
+
if (!r) return U;
|
|
9205
9227
|
let i = Nm(t), a = Nm(n), o = (t) => {
|
|
9206
9228
|
let n = i(t), r = a(t);
|
|
9207
9229
|
return Pm(n, r) ? e.calculate(n, r) : 0;
|
|
@@ -9216,7 +9238,7 @@ function Tm(e, t, n) {
|
|
|
9216
9238
|
let t = o(e);
|
|
9217
9239
|
t !== 0 && u.push(t, r);
|
|
9218
9240
|
}
|
|
9219
|
-
let i = t.additionalProperties ??
|
|
9241
|
+
let i = t.additionalProperties ?? Uf, a = n.additionalProperties ?? Uf;
|
|
9220
9242
|
if (Pm(i, a)) {
|
|
9221
9243
|
let t = e.calculate(i, a);
|
|
9222
9244
|
u.push(t, r);
|
|
@@ -9226,11 +9248,11 @@ function Tm(e, t, n) {
|
|
|
9226
9248
|
e.hasRejection || (c.size > 0 && (e.hasExtra2 = !0), l.size > 0 && (e.hasExtra1 = !0));
|
|
9227
9249
|
});
|
|
9228
9250
|
let { requiredKeysCount: p } = r, m = 0;
|
|
9229
|
-
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ?
|
|
9251
|
+
for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ? U : e && t ? W : e ? V : t ? H : B;
|
|
9230
9252
|
return m;
|
|
9231
9253
|
}
|
|
9232
9254
|
function Em(e, t) {
|
|
9233
|
-
return qp(Cm(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) ===
|
|
9255
|
+
return qp(Cm(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === z.Rejection;
|
|
9234
9256
|
}
|
|
9235
9257
|
function Dm(e, t) {
|
|
9236
9258
|
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;
|
|
@@ -9258,61 +9280,61 @@ function Om(e, t) {
|
|
|
9258
9280
|
}
|
|
9259
9281
|
var km = (e, t) => {
|
|
9260
9282
|
switch (e) {
|
|
9261
|
-
case
|
|
9283
|
+
case z.Equals:
|
|
9262
9284
|
t.hasCommonInRequired = !0;
|
|
9263
9285
|
break;
|
|
9264
|
-
case
|
|
9286
|
+
case z.Containing:
|
|
9265
9287
|
t.hasExtra1 = !0, t.hasCommonInRequired = !0;
|
|
9266
9288
|
break;
|
|
9267
|
-
case
|
|
9289
|
+
case z.ContainedBy:
|
|
9268
9290
|
t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
9269
9291
|
break;
|
|
9270
|
-
case
|
|
9292
|
+
case z.Intersection:
|
|
9271
9293
|
t.hasExtra1 = !0, t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
9272
9294
|
break;
|
|
9273
|
-
case
|
|
9295
|
+
case z.Rejection: t.hasRejection = !0;
|
|
9274
9296
|
}
|
|
9275
9297
|
}, Am = (e, t) => {
|
|
9276
9298
|
switch (e) {
|
|
9277
|
-
case
|
|
9278
|
-
case
|
|
9299
|
+
case z.Equals:
|
|
9300
|
+
case z.ContainedBy:
|
|
9279
9301
|
t.hasCommonInRequired = !0;
|
|
9280
9302
|
break;
|
|
9281
|
-
case
|
|
9282
|
-
case
|
|
9303
|
+
case z.Intersection:
|
|
9304
|
+
case z.Containing:
|
|
9283
9305
|
t.hasExtra1 = !0, t.hasCommonInRequired = !0;
|
|
9284
9306
|
break;
|
|
9285
|
-
case
|
|
9307
|
+
case z.Rejection: t.hasRejection = !0;
|
|
9286
9308
|
}
|
|
9287
9309
|
}, jm = (e, t) => {
|
|
9288
9310
|
switch (e) {
|
|
9289
|
-
case
|
|
9290
|
-
case
|
|
9311
|
+
case z.Equals:
|
|
9312
|
+
case z.Containing:
|
|
9291
9313
|
t.hasCommonInRequired = !0;
|
|
9292
9314
|
break;
|
|
9293
|
-
case
|
|
9294
|
-
case
|
|
9315
|
+
case z.Intersection:
|
|
9316
|
+
case z.ContainedBy:
|
|
9295
9317
|
t.hasExtra2 = !0, t.hasCommonInRequired = !0;
|
|
9296
9318
|
break;
|
|
9297
|
-
case
|
|
9319
|
+
case z.Rejection: t.hasRejection = !0;
|
|
9298
9320
|
}
|
|
9299
9321
|
}, Mm = (e, t) => (n, r) => {
|
|
9300
9322
|
if (r.hasRejection) return;
|
|
9301
9323
|
let i = !1, a = !1, o = !1;
|
|
9302
9324
|
switch (n) {
|
|
9303
|
-
case
|
|
9325
|
+
case z.Equals:
|
|
9304
9326
|
o = !0;
|
|
9305
9327
|
break;
|
|
9306
|
-
case
|
|
9328
|
+
case z.Containing:
|
|
9307
9329
|
i = !0, o = !0;
|
|
9308
9330
|
break;
|
|
9309
|
-
case
|
|
9331
|
+
case z.ContainedBy:
|
|
9310
9332
|
a = !0, o = !0;
|
|
9311
9333
|
break;
|
|
9312
|
-
case
|
|
9334
|
+
case z.Intersection:
|
|
9313
9335
|
i = !0, a = !0, o = !0;
|
|
9314
9336
|
break;
|
|
9315
|
-
case
|
|
9337
|
+
case z.Rejection: i = !0, a = !0;
|
|
9316
9338
|
}
|
|
9317
9339
|
e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
|
|
9318
9340
|
};
|
|
@@ -9326,40 +9348,40 @@ function Nm(e) {
|
|
|
9326
9348
|
});
|
|
9327
9349
|
}
|
|
9328
9350
|
return (e) => {
|
|
9329
|
-
if (n &&
|
|
9351
|
+
if (n && sp(n, e) === X.Invalid) return Wf;
|
|
9330
9352
|
for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
|
|
9331
|
-
return ((t && t[e]) ?? r) ||
|
|
9353
|
+
return ((t && t[e]) ?? r) || Uf;
|
|
9332
9354
|
};
|
|
9333
9355
|
}
|
|
9334
9356
|
function Pm(e, t) {
|
|
9335
|
-
let n =
|
|
9336
|
-
return n !==
|
|
9357
|
+
let n = J(e), r = J(t);
|
|
9358
|
+
return n !== q.Never || r !== q.Never;
|
|
9337
9359
|
}
|
|
9338
9360
|
//#endregion
|
|
9339
9361
|
//#region src/json-schema-subset/checker/string.ts
|
|
9340
9362
|
var Fm = Kp(0);
|
|
9341
9363
|
function Im(e, t) {
|
|
9342
|
-
if (t.format && !e.format) return
|
|
9343
|
-
if (e.format && t.format && e.format !== t.format) return
|
|
9364
|
+
if (t.format && !e.format) return V;
|
|
9365
|
+
if (e.format && t.format && e.format !== t.format) return of;
|
|
9344
9366
|
let n = qp(Fm(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
|
|
9345
9367
|
switch (n) {
|
|
9346
|
-
case
|
|
9347
|
-
case
|
|
9348
|
-
case
|
|
9349
|
-
case
|
|
9350
|
-
case
|
|
9368
|
+
case z.Rejection: return U;
|
|
9369
|
+
case z.Containing: return r ? of : V;
|
|
9370
|
+
case z.ContainedBy: return i ? of : H;
|
|
9371
|
+
case z.Equals: return r && i ? e.pattern === t.pattern ? B : of : r ? B | H : i ? B | V : B;
|
|
9372
|
+
case z.Intersection: return r && i ? of : r ? W | U | H : i ? W | U | V : W;
|
|
9351
9373
|
}
|
|
9352
9374
|
}
|
|
9353
9375
|
//#endregion
|
|
9354
9376
|
//#region src/json-schema-subset/checker/checker.ts
|
|
9355
9377
|
function Lm(e, t, n) {
|
|
9356
9378
|
let r = {}, i = [], a = $p(zm(e, r)), o = Rm(), s = am(e);
|
|
9357
|
-
r.isEquals = Qp(
|
|
9379
|
+
r.isEquals = Qp(rf), r.calculate = Tf({
|
|
9358
9380
|
describe: o,
|
|
9359
9381
|
equals: s,
|
|
9360
9382
|
calculate: a,
|
|
9361
9383
|
observeCalculation: (e, t, n, r) => {
|
|
9362
|
-
if (!Vm(r ?
|
|
9384
|
+
if (!Vm(r ? gf(n) : n)) return;
|
|
9363
9385
|
let a = r ? Hm(t, e) : Hm(e, t);
|
|
9364
9386
|
a && i.push(a);
|
|
9365
9387
|
}
|
|
@@ -9372,93 +9394,93 @@ function Lm(e, t, n) {
|
|
|
9372
9394
|
}
|
|
9373
9395
|
var Rm = () => (e) => {
|
|
9374
9396
|
let t;
|
|
9375
|
-
switch (
|
|
9376
|
-
case
|
|
9397
|
+
switch (J(e)) {
|
|
9398
|
+
case q.Not:
|
|
9377
9399
|
t = {
|
|
9378
|
-
kind:
|
|
9400
|
+
kind: wf.Not,
|
|
9379
9401
|
expression: e.not
|
|
9380
9402
|
};
|
|
9381
9403
|
break;
|
|
9382
|
-
case
|
|
9404
|
+
case q.Combination:
|
|
9383
9405
|
if ("allOf" in e) t = {
|
|
9384
|
-
kind:
|
|
9385
|
-
expressions: Bm(e.allOf,
|
|
9406
|
+
kind: wf.AllOf,
|
|
9407
|
+
expressions: Bm(e.allOf, q.Any)
|
|
9386
9408
|
};
|
|
9387
9409
|
else if ("anyOf" in e) t = {
|
|
9388
|
-
kind:
|
|
9389
|
-
expressions: Bm(e.anyOf,
|
|
9410
|
+
kind: wf.AnyOf,
|
|
9411
|
+
expressions: Bm(e.anyOf, q.Never)
|
|
9390
9412
|
};
|
|
9391
9413
|
else if ("oneOf" in e) t = {
|
|
9392
|
-
kind:
|
|
9393
|
-
expressions: Bm(e.oneOf,
|
|
9414
|
+
kind: wf.OneOf,
|
|
9415
|
+
expressions: Bm(e.oneOf, q.Never)
|
|
9394
9416
|
};
|
|
9395
9417
|
else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
|
|
9396
9418
|
break;
|
|
9397
|
-
default: t = { kind:
|
|
9419
|
+
default: t = { kind: wf.Leaf };
|
|
9398
9420
|
}
|
|
9399
9421
|
return t;
|
|
9400
9422
|
}, zm = (e, t) => (n, r) => {
|
|
9401
|
-
let i =
|
|
9402
|
-
if (i ===
|
|
9423
|
+
let i = J(n), a = J(r);
|
|
9424
|
+
if (i === q.Extends || a === q.Extends) return e.calculate(n, r);
|
|
9403
9425
|
switch (i) {
|
|
9404
|
-
case
|
|
9405
|
-
case
|
|
9426
|
+
case q.Any: return a === q.Any ? B : V;
|
|
9427
|
+
case q.Never: return a === q.Never ? B : H;
|
|
9406
9428
|
}
|
|
9407
9429
|
switch (a) {
|
|
9408
|
-
case
|
|
9409
|
-
case
|
|
9430
|
+
case q.Any: return H;
|
|
9431
|
+
case q.Never: return V;
|
|
9410
9432
|
}
|
|
9411
|
-
if (i ===
|
|
9412
|
-
if (i ===
|
|
9413
|
-
if (a ===
|
|
9414
|
-
if (i !== a) return
|
|
9433
|
+
if (i === q.EnumOrConst && a === q.EnumOrConst) return tm(t, n, r);
|
|
9434
|
+
if (i === q.EnumOrConst) return nm(n, r);
|
|
9435
|
+
if (a === q.EnumOrConst) return gf(nm(r, n));
|
|
9436
|
+
if (i !== a) return U;
|
|
9415
9437
|
switch (i) {
|
|
9416
|
-
case
|
|
9417
|
-
case
|
|
9418
|
-
case
|
|
9419
|
-
case
|
|
9420
|
-
case
|
|
9421
|
-
case
|
|
9438
|
+
case q.Null: return B;
|
|
9439
|
+
case q.Numeric: return bm(n, r);
|
|
9440
|
+
case q.String: return Im(n, r);
|
|
9441
|
+
case q.Boolean: return B;
|
|
9442
|
+
case q.Object: return Tm(t, n, r);
|
|
9443
|
+
case q.Array: return Xp(t, n, r);
|
|
9422
9444
|
default: throw Error(`invalid kind ${i}`);
|
|
9423
9445
|
}
|
|
9424
9446
|
};
|
|
9425
9447
|
function Bm(e, t) {
|
|
9426
|
-
return e.filter((e) =>
|
|
9448
|
+
return e.filter((e) => J(e) !== t);
|
|
9427
9449
|
}
|
|
9428
9450
|
function Vm(e) {
|
|
9429
|
-
return !
|
|
9451
|
+
return !sf(e) && !lf(e) && (cf(e) || df(e) || uf(e));
|
|
9430
9452
|
}
|
|
9431
9453
|
function Hm(e, t) {
|
|
9432
|
-
let n =
|
|
9454
|
+
let n = Jf(t);
|
|
9433
9455
|
if (!n) return;
|
|
9434
|
-
let r =
|
|
9456
|
+
let r = J(e), i = J(t);
|
|
9435
9457
|
if (r !== i) return [...n, "type"];
|
|
9436
9458
|
let a = e, o = t;
|
|
9437
9459
|
switch (i) {
|
|
9438
|
-
case
|
|
9460
|
+
case q.String:
|
|
9439
9461
|
if ((a.minLength ?? 0) < (o.minLength ?? 0)) return [...n, "minLength"];
|
|
9440
9462
|
if ((a.maxLength ?? Infinity) > (o.maxLength ?? Infinity)) return [...n, "maxLength"];
|
|
9441
9463
|
if (a.pattern !== o.pattern && o.pattern) return [...n, "pattern"];
|
|
9442
9464
|
if (a.format !== o.format && o.format) return [...n, "format"];
|
|
9443
9465
|
break;
|
|
9444
|
-
case
|
|
9466
|
+
case q.Numeric:
|
|
9445
9467
|
if ((a.minimum ?? a.exclusiveMinimum ?? -Infinity) < (o.minimum ?? o.exclusiveMinimum ?? -Infinity)) return [...n, o.exclusiveMinimum == null ? "minimum" : "exclusiveMinimum"];
|
|
9446
9468
|
if ((a.maximum ?? a.exclusiveMaximum ?? Infinity) > (o.maximum ?? o.exclusiveMaximum ?? Infinity)) return [...n, o.exclusiveMaximum == null ? "maximum" : "exclusiveMaximum"];
|
|
9447
9469
|
if (a.multipleOf !== o.multipleOf && o.multipleOf != null) return [...n, "multipleOf"];
|
|
9448
9470
|
break;
|
|
9449
|
-
case
|
|
9471
|
+
case q.Array:
|
|
9450
9472
|
if ((a.minItems ?? 0) < (o.minItems ?? 0)) return [...n, "minItems"];
|
|
9451
9473
|
if ((a.maxItems ?? Infinity) > (o.maxItems ?? Infinity)) return [...n, "maxItems"];
|
|
9452
9474
|
if (!a.uniqueItems && o.uniqueItems) return [...n, "uniqueItems"];
|
|
9453
9475
|
break;
|
|
9454
|
-
case
|
|
9476
|
+
case q.Object: {
|
|
9455
9477
|
let e = new Set(a.required ?? []);
|
|
9456
9478
|
if ((o.required ?? []).some((t) => !e.has(t))) return [...n, "required"];
|
|
9457
9479
|
if ((a.minProperties ?? 0) < (o.minProperties ?? 0)) return [...n, "minProperties"];
|
|
9458
9480
|
if ((a.maxProperties ?? Infinity) > (o.maxProperties ?? Infinity)) return [...n, "maxProperties"];
|
|
9459
9481
|
break;
|
|
9460
9482
|
}
|
|
9461
|
-
case
|
|
9483
|
+
case q.EnumOrConst: return [...n, o.const == null ? "enum" : "const"];
|
|
9462
9484
|
}
|
|
9463
9485
|
return n;
|
|
9464
9486
|
}
|
|
@@ -9469,7 +9491,7 @@ var Um = class e {
|
|
|
9469
9491
|
this.extendsSchemaClasses = Object.freeze([...e]);
|
|
9470
9492
|
}
|
|
9471
9493
|
tryCompiledExtendsSchema(e, t) {
|
|
9472
|
-
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(
|
|
9494
|
+
for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n($d(), e, t);
|
|
9473
9495
|
return null;
|
|
9474
9496
|
}
|
|
9475
9497
|
isExtendsSchema(e) {
|
|
@@ -9479,7 +9501,7 @@ var Um = class e {
|
|
|
9479
9501
|
calculate(t, n) {
|
|
9480
9502
|
let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
|
|
9481
9503
|
a = r ? n.compare(t) : t.compare(n);
|
|
9482
|
-
for (let t of a) r && (t = e.swap(t)), i |=
|
|
9504
|
+
for (let t of a) r && (t = e.swap(t)), i |= ff(t);
|
|
9483
9505
|
return i;
|
|
9484
9506
|
}
|
|
9485
9507
|
equals(e, t) {
|
|
@@ -9491,8 +9513,8 @@ var Um = class e {
|
|
|
9491
9513
|
}
|
|
9492
9514
|
static swap(e) {
|
|
9493
9515
|
switch (e) {
|
|
9494
|
-
case
|
|
9495
|
-
case
|
|
9516
|
+
case z.Containing: return z.ContainedBy;
|
|
9517
|
+
case z.ContainedBy: return z.Containing;
|
|
9496
9518
|
default: return e;
|
|
9497
9519
|
}
|
|
9498
9520
|
}
|
|
@@ -9503,12 +9525,12 @@ function Wm(e, t, n = !1) {
|
|
|
9503
9525
|
let r = t(e);
|
|
9504
9526
|
if (Array.isArray(r)) {
|
|
9505
9527
|
let e = [];
|
|
9506
|
-
throw Km(e, r, "$"), new
|
|
9528
|
+
throw Km(e, r, "$"), new Ef(e);
|
|
9507
9529
|
}
|
|
9508
9530
|
let { schema: i, warns: a } = r;
|
|
9509
9531
|
if (n && a.length > 0) {
|
|
9510
9532
|
console.warn(`found ${a.length} warns after compile schema`);
|
|
9511
|
-
for (let e of a) console.warn(
|
|
9533
|
+
for (let e of a) console.warn(Of(e));
|
|
9512
9534
|
}
|
|
9513
9535
|
return i;
|
|
9514
9536
|
}
|
|
@@ -9516,14 +9538,14 @@ function Gm(e, t, n, r = !1) {
|
|
|
9516
9538
|
let i = n(e), a = n(t);
|
|
9517
9539
|
if (Array.isArray(i) || Array.isArray(a)) {
|
|
9518
9540
|
let e = [];
|
|
9519
|
-
throw Array.isArray(i) && Km(e, i, "$1"), Array.isArray(a) && Km(e, a, "$2"), new
|
|
9541
|
+
throw Array.isArray(i) && Km(e, i, "$1"), Array.isArray(a) && Km(e, a, "$2"), new Ef(e);
|
|
9520
9542
|
}
|
|
9521
9543
|
let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
|
|
9522
9544
|
if (r) {
|
|
9523
9545
|
s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
|
|
9524
|
-
for (let e of s) console.warn(
|
|
9546
|
+
for (let e of s) console.warn(Of(e));
|
|
9525
9547
|
l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
|
|
9526
|
-
for (let e of l) console.warn(
|
|
9548
|
+
for (let e of l) console.warn(Of(e));
|
|
9527
9549
|
}
|
|
9528
9550
|
return [o, c];
|
|
9529
9551
|
}
|
|
@@ -9546,9 +9568,9 @@ var qm = Object.freeze({
|
|
|
9546
9568
|
function Jm({ extendsSchemaClasses: e, delegate: t } = {}) {
|
|
9547
9569
|
let n = new Um(e);
|
|
9548
9570
|
return Object.freeze({
|
|
9549
|
-
compile: (e, r, i) => Wm(e, (e) =>
|
|
9571
|
+
compile: (e, r, i) => Wm(e, (e) => Pp(e, n, r, t), i),
|
|
9550
9572
|
isSubset: (e, r, i = !1) => {
|
|
9551
|
-
let [a, o] = Gm(e, r, (e) =>
|
|
9573
|
+
let [a, o] = Gm(e, r, (e) => Pp(e, n, void 0, t), i), { errorPath: s, expression: c } = Lm(n, a, o), l = sf(c) || lf(c), u = cf(c) || df(c) || uf(c);
|
|
9552
9574
|
return l && !u ? { result: qm.True } : !l && u ? {
|
|
9553
9575
|
errorPath: s,
|
|
9554
9576
|
result: qm.False
|
|
@@ -9579,7 +9601,7 @@ var rh = class e {
|
|
|
9579
9601
|
this.id = e, this.value = t, this.context = nh(n);
|
|
9580
9602
|
}
|
|
9581
9603
|
compare(e) {
|
|
9582
|
-
return
|
|
9604
|
+
return Kf(e) && J(e) === q.Any ? [z.ContainedBy] : this.compareImpl(e);
|
|
9583
9605
|
}
|
|
9584
9606
|
}, ih = class e extends rh {
|
|
9585
9607
|
static isMatch(e) {
|
|
@@ -9591,13 +9613,13 @@ var rh = class e {
|
|
|
9591
9613
|
super(t, n, r);
|
|
9592
9614
|
}
|
|
9593
9615
|
compareImpl(t) {
|
|
9594
|
-
if (eh(t)) return [
|
|
9616
|
+
if (eh(t)) return [z.ContainedBy];
|
|
9595
9617
|
if (t instanceof e) {
|
|
9596
|
-
let e = new Set(this.value.enum), n =
|
|
9597
|
-
for (let r of t.value.enum) e.has(r) || (n =
|
|
9598
|
-
return e.size === 0 ? [n] : e.size === this.value.enum.length ? [
|
|
9618
|
+
let e = new Set(this.value.enum), n = z.Equals;
|
|
9619
|
+
for (let r of t.value.enum) e.has(r) || (n = z.ContainedBy), e.delete(r);
|
|
9620
|
+
return e.size === 0 ? [n] : e.size === this.value.enum.length ? [z.Rejection] : [z.Intersection];
|
|
9599
9621
|
}
|
|
9600
|
-
return [
|
|
9622
|
+
return [z.Rejection];
|
|
9601
9623
|
}
|
|
9602
9624
|
equals(t) {
|
|
9603
9625
|
if (t instanceof e) {
|
|
@@ -9619,7 +9641,7 @@ var rh = class e {
|
|
|
9619
9641
|
super(t, n, r);
|
|
9620
9642
|
}
|
|
9621
9643
|
compareImpl(t) {
|
|
9622
|
-
return t instanceof e ? [
|
|
9644
|
+
return t instanceof e ? [z.Equals] : (rh.setError(this, t, "edgeError.binDiffType"), [z.Rejection]);
|
|
9623
9645
|
}
|
|
9624
9646
|
equals(t) {
|
|
9625
9647
|
return t instanceof e;
|
|
@@ -9633,7 +9655,7 @@ var rh = class e {
|
|
|
9633
9655
|
super(t, n, r);
|
|
9634
9656
|
}
|
|
9635
9657
|
compareImpl(t) {
|
|
9636
|
-
return t instanceof e ? [
|
|
9658
|
+
return t instanceof e ? [z.Equals] : (rh.setError(this, t, "edgeError.artifactDiffType"), [z.Rejection]);
|
|
9637
9659
|
}
|
|
9638
9660
|
equals(t) {
|
|
9639
9661
|
return t instanceof e;
|
|
@@ -9661,7 +9683,7 @@ function uh(e, t) {
|
|
|
9661
9683
|
let t = lh.get(n);
|
|
9662
9684
|
if (t == null) {
|
|
9663
9685
|
let e = typeof n.$schema == "string" ? n.$schema : "", r = e.includes("draft-04") ? "4" : e.includes("draft-07") ? "7" : e.includes("2020-12") ? "2020-12" : "2019-09";
|
|
9664
|
-
t = new
|
|
9686
|
+
t = new Zd(structuredClone(n), r), lh.set(n, t);
|
|
9665
9687
|
}
|
|
9666
9688
|
return t.validate(e).valid;
|
|
9667
9689
|
} catch {
|
|
@@ -11574,7 +11596,7 @@ function x_(e) {
|
|
|
11574
11596
|
}
|
|
11575
11597
|
async function S_(e, t, n, r, i) {
|
|
11576
11598
|
return {
|
|
11577
|
-
dedupeKey: t.deleted == null ? `${e}:${t.eTag ?? t.lastModifiedDateTime}` : await du(
|
|
11599
|
+
dedupeKey: t.deleted == null ? `${e}:${t.eTag ?? t.lastModifiedDateTime}` : await fu(du([
|
|
11578
11600
|
"one-drive-deleted",
|
|
11579
11601
|
i,
|
|
11580
11602
|
e
|
|
@@ -13626,32 +13648,328 @@ var Iy = {
|
|
|
13626
13648
|
}
|
|
13627
13649
|
}
|
|
13628
13650
|
}, Ry = {
|
|
13629
|
-
|
|
13651
|
+
en: {
|
|
13652
|
+
"feishu_app_bot.on_event": {
|
|
13653
|
+
sourceId: "Event source",
|
|
13654
|
+
eventTypes: "Events to receive"
|
|
13655
|
+
},
|
|
13656
|
+
"airtable.on_record_changed": {
|
|
13657
|
+
baseId: "Base",
|
|
13658
|
+
tableIdOrName: "Table",
|
|
13659
|
+
triggerField: "Trigger field"
|
|
13660
|
+
},
|
|
13661
|
+
"github.on_repo_event": {
|
|
13662
|
+
events: "Events",
|
|
13663
|
+
owner: "Repository owner",
|
|
13664
|
+
repo: "Repository"
|
|
13665
|
+
},
|
|
13666
|
+
"github.watch_pull_request": {
|
|
13667
|
+
owner: "Repository owner",
|
|
13668
|
+
repo: "Repository",
|
|
13669
|
+
number: "Pull request number"
|
|
13670
|
+
},
|
|
13671
|
+
"gitlab.on_project_event": {
|
|
13672
|
+
events: "Events",
|
|
13673
|
+
project: "Project"
|
|
13674
|
+
},
|
|
13675
|
+
"googlecalendar.on_event_changed": { calendarId: "Calendar" },
|
|
13676
|
+
"googledrive.on_file_change": {
|
|
13677
|
+
changeType: "Change type",
|
|
13678
|
+
folderId: "Folder"
|
|
13679
|
+
},
|
|
13680
|
+
"googlesheets.on_row_added": {
|
|
13681
|
+
sheet: "Worksheet",
|
|
13682
|
+
spreadsheetId: "Spreadsheet"
|
|
13683
|
+
},
|
|
13684
|
+
"linear.on_issue_changed": { teamId: "Team" },
|
|
13685
|
+
"notion.on_database_page_event": { databaseId: "Database" },
|
|
13686
|
+
"shopify.on_shop_event": { topics: "Topics" },
|
|
13687
|
+
"slack.on_message_posted": { channelId: "Channel" },
|
|
13688
|
+
"stripe.on_event": { events: "Events" },
|
|
13689
|
+
"telegram.on_update": { updates: "Updates" },
|
|
13690
|
+
"woocommerce.on_store_event": { events: "Events" },
|
|
13691
|
+
"zendesk.on_event": { events: "Events" }
|
|
13692
|
+
},
|
|
13693
|
+
"zh-CN": {
|
|
13694
|
+
"feishu_app_bot.on_event": {
|
|
13695
|
+
sourceId: "事件源",
|
|
13696
|
+
eventTypes: "接收的事件"
|
|
13697
|
+
},
|
|
13698
|
+
"airtable.on_record_changed": {
|
|
13699
|
+
baseId: "Base",
|
|
13700
|
+
tableIdOrName: "数据表",
|
|
13701
|
+
triggerField: "触发字段"
|
|
13702
|
+
},
|
|
13703
|
+
"github.on_repo_event": {
|
|
13704
|
+
events: "事件",
|
|
13705
|
+
owner: "仓库所有者",
|
|
13706
|
+
repo: "仓库"
|
|
13707
|
+
},
|
|
13708
|
+
"github.watch_pull_request": {
|
|
13709
|
+
owner: "仓库所有者",
|
|
13710
|
+
repo: "仓库",
|
|
13711
|
+
number: "拉取请求编号"
|
|
13712
|
+
},
|
|
13713
|
+
"gitlab.on_project_event": {
|
|
13714
|
+
events: "事件",
|
|
13715
|
+
project: "项目"
|
|
13716
|
+
},
|
|
13717
|
+
"googlecalendar.on_event_changed": { calendarId: "日历" },
|
|
13718
|
+
"googledrive.on_file_change": {
|
|
13719
|
+
changeType: "变更类型",
|
|
13720
|
+
folderId: "文件夹"
|
|
13721
|
+
},
|
|
13722
|
+
"googlesheets.on_row_added": {
|
|
13723
|
+
sheet: "工作表",
|
|
13724
|
+
spreadsheetId: "电子表格"
|
|
13725
|
+
},
|
|
13726
|
+
"linear.on_issue_changed": { teamId: "团队" },
|
|
13727
|
+
"notion.on_database_page_event": { databaseId: "数据库" },
|
|
13728
|
+
"shopify.on_shop_event": { topics: "主题" },
|
|
13729
|
+
"slack.on_message_posted": { channelId: "频道" },
|
|
13730
|
+
"stripe.on_event": { events: "事件" },
|
|
13731
|
+
"telegram.on_update": { updates: "更新类型" },
|
|
13732
|
+
"woocommerce.on_store_event": { events: "事件" },
|
|
13733
|
+
"zendesk.on_event": { events: "事件" }
|
|
13734
|
+
},
|
|
13735
|
+
"zh-TW": {
|
|
13736
|
+
"feishu_app_bot.on_event": {
|
|
13737
|
+
sourceId: "事件來源",
|
|
13738
|
+
eventTypes: "接收的事件"
|
|
13739
|
+
},
|
|
13740
|
+
"airtable.on_record_changed": {
|
|
13741
|
+
baseId: "Base",
|
|
13742
|
+
tableIdOrName: "資料表",
|
|
13743
|
+
triggerField: "觸發欄位"
|
|
13744
|
+
},
|
|
13745
|
+
"github.on_repo_event": {
|
|
13746
|
+
events: "事件",
|
|
13747
|
+
owner: "儲存庫擁有者",
|
|
13748
|
+
repo: "儲存庫"
|
|
13749
|
+
},
|
|
13750
|
+
"github.watch_pull_request": {
|
|
13751
|
+
owner: "儲存庫擁有者",
|
|
13752
|
+
repo: "儲存庫",
|
|
13753
|
+
number: "提取要求編號"
|
|
13754
|
+
},
|
|
13755
|
+
"gitlab.on_project_event": {
|
|
13756
|
+
events: "事件",
|
|
13757
|
+
project: "專案"
|
|
13758
|
+
},
|
|
13759
|
+
"googlecalendar.on_event_changed": { calendarId: "日曆" },
|
|
13760
|
+
"googledrive.on_file_change": {
|
|
13761
|
+
changeType: "變更類型",
|
|
13762
|
+
folderId: "資料夾"
|
|
13763
|
+
},
|
|
13764
|
+
"googlesheets.on_row_added": {
|
|
13765
|
+
sheet: "工作表",
|
|
13766
|
+
spreadsheetId: "試算表"
|
|
13767
|
+
},
|
|
13768
|
+
"linear.on_issue_changed": { teamId: "團隊" },
|
|
13769
|
+
"notion.on_database_page_event": { databaseId: "資料庫" },
|
|
13770
|
+
"shopify.on_shop_event": { topics: "主題" },
|
|
13771
|
+
"slack.on_message_posted": { channelId: "頻道" },
|
|
13772
|
+
"stripe.on_event": { events: "事件" },
|
|
13773
|
+
"telegram.on_update": { updates: "更新類型" },
|
|
13774
|
+
"woocommerce.on_store_event": { events: "事件" },
|
|
13775
|
+
"zendesk.on_event": { events: "事件" }
|
|
13776
|
+
},
|
|
13777
|
+
ja: {
|
|
13778
|
+
"feishu_app_bot.on_event": {
|
|
13779
|
+
sourceId: "イベントソース",
|
|
13780
|
+
eventTypes: "受信するイベント"
|
|
13781
|
+
},
|
|
13782
|
+
"airtable.on_record_changed": {
|
|
13783
|
+
baseId: "ベース",
|
|
13784
|
+
tableIdOrName: "テーブル",
|
|
13785
|
+
triggerField: "トリガーフィールド"
|
|
13786
|
+
},
|
|
13787
|
+
"github.on_repo_event": {
|
|
13788
|
+
events: "イベント",
|
|
13789
|
+
owner: "リポジトリの所有者",
|
|
13790
|
+
repo: "リポジトリ"
|
|
13791
|
+
},
|
|
13792
|
+
"github.watch_pull_request": {
|
|
13793
|
+
owner: "リポジトリの所有者",
|
|
13794
|
+
repo: "リポジトリ",
|
|
13795
|
+
number: "プルリクエスト番号"
|
|
13796
|
+
},
|
|
13797
|
+
"gitlab.on_project_event": {
|
|
13798
|
+
events: "イベント",
|
|
13799
|
+
project: "プロジェクト"
|
|
13800
|
+
},
|
|
13801
|
+
"googlecalendar.on_event_changed": { calendarId: "カレンダー" },
|
|
13802
|
+
"googledrive.on_file_change": {
|
|
13803
|
+
changeType: "変更の種類",
|
|
13804
|
+
folderId: "フォルダー"
|
|
13805
|
+
},
|
|
13806
|
+
"googlesheets.on_row_added": {
|
|
13807
|
+
sheet: "シート",
|
|
13808
|
+
spreadsheetId: "スプレッドシート"
|
|
13809
|
+
},
|
|
13810
|
+
"linear.on_issue_changed": { teamId: "チーム" },
|
|
13811
|
+
"notion.on_database_page_event": { databaseId: "データベース" },
|
|
13812
|
+
"shopify.on_shop_event": { topics: "トピック" },
|
|
13813
|
+
"slack.on_message_posted": { channelId: "チャンネル" },
|
|
13814
|
+
"stripe.on_event": { events: "イベント" },
|
|
13815
|
+
"telegram.on_update": { updates: "更新の種類" },
|
|
13816
|
+
"woocommerce.on_store_event": { events: "イベント" },
|
|
13817
|
+
"zendesk.on_event": { events: "イベント" }
|
|
13818
|
+
},
|
|
13819
|
+
ko: {
|
|
13820
|
+
"feishu_app_bot.on_event": {
|
|
13821
|
+
sourceId: "이벤트 소스",
|
|
13822
|
+
eventTypes: "수신할 이벤트"
|
|
13823
|
+
},
|
|
13824
|
+
"airtable.on_record_changed": {
|
|
13825
|
+
baseId: "베이스",
|
|
13826
|
+
tableIdOrName: "테이블",
|
|
13827
|
+
triggerField: "트리거 필드"
|
|
13828
|
+
},
|
|
13829
|
+
"github.on_repo_event": {
|
|
13830
|
+
events: "이벤트",
|
|
13831
|
+
owner: "저장소 소유자",
|
|
13832
|
+
repo: "저장소"
|
|
13833
|
+
},
|
|
13834
|
+
"github.watch_pull_request": {
|
|
13835
|
+
owner: "저장소 소유자",
|
|
13836
|
+
repo: "저장소",
|
|
13837
|
+
number: "풀 리퀘스트 번호"
|
|
13838
|
+
},
|
|
13839
|
+
"gitlab.on_project_event": {
|
|
13840
|
+
events: "이벤트",
|
|
13841
|
+
project: "프로젝트"
|
|
13842
|
+
},
|
|
13843
|
+
"googlecalendar.on_event_changed": { calendarId: "캘린더" },
|
|
13844
|
+
"googledrive.on_file_change": {
|
|
13845
|
+
changeType: "변경 유형",
|
|
13846
|
+
folderId: "폴더"
|
|
13847
|
+
},
|
|
13848
|
+
"googlesheets.on_row_added": {
|
|
13849
|
+
sheet: "시트",
|
|
13850
|
+
spreadsheetId: "스프레드시트"
|
|
13851
|
+
},
|
|
13852
|
+
"linear.on_issue_changed": { teamId: "팀" },
|
|
13853
|
+
"notion.on_database_page_event": { databaseId: "데이터베이스" },
|
|
13854
|
+
"shopify.on_shop_event": { topics: "주제" },
|
|
13855
|
+
"slack.on_message_posted": { channelId: "채널" },
|
|
13856
|
+
"stripe.on_event": { events: "이벤트" },
|
|
13857
|
+
"telegram.on_update": { updates: "업데이트 유형" },
|
|
13858
|
+
"woocommerce.on_store_event": { events: "이벤트" },
|
|
13859
|
+
"zendesk.on_event": { events: "이벤트" }
|
|
13860
|
+
},
|
|
13861
|
+
ru: {
|
|
13862
|
+
"feishu_app_bot.on_event": {
|
|
13863
|
+
sourceId: "Источник событий",
|
|
13864
|
+
eventTypes: "Принимаемые события"
|
|
13865
|
+
},
|
|
13866
|
+
"airtable.on_record_changed": {
|
|
13867
|
+
baseId: "База",
|
|
13868
|
+
tableIdOrName: "Таблица",
|
|
13869
|
+
triggerField: "Поле триггера"
|
|
13870
|
+
},
|
|
13871
|
+
"github.on_repo_event": {
|
|
13872
|
+
events: "События",
|
|
13873
|
+
owner: "Владелец репозитория",
|
|
13874
|
+
repo: "Репозиторий"
|
|
13875
|
+
},
|
|
13876
|
+
"github.watch_pull_request": {
|
|
13877
|
+
owner: "Владелец репозитория",
|
|
13878
|
+
repo: "Репозиторий",
|
|
13879
|
+
number: "Номер запроса на слияние"
|
|
13880
|
+
},
|
|
13881
|
+
"gitlab.on_project_event": {
|
|
13882
|
+
events: "События",
|
|
13883
|
+
project: "Проект"
|
|
13884
|
+
},
|
|
13885
|
+
"googlecalendar.on_event_changed": { calendarId: "Календарь" },
|
|
13886
|
+
"googledrive.on_file_change": {
|
|
13887
|
+
changeType: "Тип изменения",
|
|
13888
|
+
folderId: "Папка"
|
|
13889
|
+
},
|
|
13890
|
+
"googlesheets.on_row_added": {
|
|
13891
|
+
sheet: "Лист",
|
|
13892
|
+
spreadsheetId: "Таблица"
|
|
13893
|
+
},
|
|
13894
|
+
"linear.on_issue_changed": { teamId: "Команда" },
|
|
13895
|
+
"notion.on_database_page_event": { databaseId: "База данных" },
|
|
13896
|
+
"shopify.on_shop_event": { topics: "Темы" },
|
|
13897
|
+
"slack.on_message_posted": { channelId: "Канал" },
|
|
13898
|
+
"stripe.on_event": { events: "События" },
|
|
13899
|
+
"telegram.on_update": { updates: "Типы обновлений" },
|
|
13900
|
+
"woocommerce.on_store_event": { events: "События" },
|
|
13901
|
+
"zendesk.on_event": { events: "События" }
|
|
13902
|
+
},
|
|
13903
|
+
fr: {
|
|
13904
|
+
"feishu_app_bot.on_event": {
|
|
13905
|
+
sourceId: "Source d’événements",
|
|
13906
|
+
eventTypes: "Événements à recevoir"
|
|
13907
|
+
},
|
|
13908
|
+
"airtable.on_record_changed": {
|
|
13909
|
+
baseId: "Base",
|
|
13910
|
+
tableIdOrName: "Table",
|
|
13911
|
+
triggerField: "Champ déclencheur"
|
|
13912
|
+
},
|
|
13913
|
+
"github.on_repo_event": {
|
|
13914
|
+
events: "Événements",
|
|
13915
|
+
owner: "Propriétaire du dépôt",
|
|
13916
|
+
repo: "Dépôt"
|
|
13917
|
+
},
|
|
13918
|
+
"github.watch_pull_request": {
|
|
13919
|
+
owner: "Propriétaire du dépôt",
|
|
13920
|
+
repo: "Dépôt",
|
|
13921
|
+
number: "Numéro de la demande de tirage"
|
|
13922
|
+
},
|
|
13923
|
+
"gitlab.on_project_event": {
|
|
13924
|
+
events: "Événements",
|
|
13925
|
+
project: "Projet"
|
|
13926
|
+
},
|
|
13927
|
+
"googlecalendar.on_event_changed": { calendarId: "Agenda" },
|
|
13928
|
+
"googledrive.on_file_change": {
|
|
13929
|
+
changeType: "Type de modification",
|
|
13930
|
+
folderId: "Dossier"
|
|
13931
|
+
},
|
|
13932
|
+
"googlesheets.on_row_added": {
|
|
13933
|
+
sheet: "Feuille",
|
|
13934
|
+
spreadsheetId: "Feuille de calcul"
|
|
13935
|
+
},
|
|
13936
|
+
"linear.on_issue_changed": { teamId: "Équipe" },
|
|
13937
|
+
"notion.on_database_page_event": { databaseId: "Base de données" },
|
|
13938
|
+
"shopify.on_shop_event": { topics: "Sujets" },
|
|
13939
|
+
"slack.on_message_posted": { channelId: "Canal" },
|
|
13940
|
+
"stripe.on_event": { events: "Événements" },
|
|
13941
|
+
"telegram.on_update": { updates: "Types de mise à jour" },
|
|
13942
|
+
"woocommerce.on_store_event": { events: "Événements" },
|
|
13943
|
+
"zendesk.on_event": { events: "Événements" }
|
|
13944
|
+
}
|
|
13945
|
+
}, zy = {
|
|
13946
|
+
"zh-CN": () => import("./zh-CN-CxZ3yYfR.js"),
|
|
13630
13947
|
"zh-TW": () => import("./zh-TW-CRmc3FMz.js"),
|
|
13631
13948
|
ja: () => import("./ja-BJF-VrP2.js"),
|
|
13632
13949
|
ko: () => import("./ko-Bght_VaB.js"),
|
|
13633
13950
|
ru: () => import("./ru-DrP4BRM5.js"),
|
|
13634
13951
|
fr: () => import("./fr-ClB96SQY.js")
|
|
13635
|
-
},
|
|
13636
|
-
function
|
|
13637
|
-
if (e == "en") return
|
|
13638
|
-
let t =
|
|
13952
|
+
}, By = /* @__PURE__ */ new Map(), Vy = Promise.resolve({});
|
|
13953
|
+
function Hy(e) {
|
|
13954
|
+
if (e == "en") return Vy;
|
|
13955
|
+
let t = By.get(e);
|
|
13639
13956
|
if (t != null) return t;
|
|
13640
|
-
let n =
|
|
13641
|
-
return
|
|
13642
|
-
|
|
13957
|
+
let n = zy[e]().then((e) => e.default);
|
|
13958
|
+
return By.set(e, n), n.catch(() => {
|
|
13959
|
+
By.get(e) == n && By.delete(e);
|
|
13643
13960
|
}), n;
|
|
13644
13961
|
}
|
|
13645
|
-
async function
|
|
13646
|
-
let n = (await
|
|
13962
|
+
async function Uy(e, t) {
|
|
13963
|
+
let n = (await Hy(t))[e.key], r = Ly[e.key];
|
|
13647
13964
|
return {
|
|
13648
|
-
configInputs:
|
|
13965
|
+
configInputs: Wy(e.configInputs, n?.configInputs, r?.configInputs),
|
|
13966
|
+
configInputLabels: Ry[t][e.key] ?? {},
|
|
13649
13967
|
displayName: n?.displayName ?? e.displayName,
|
|
13650
13968
|
description: n?.description ?? e.description,
|
|
13651
|
-
outputs:
|
|
13969
|
+
outputs: Wy(e.outputs, n?.outputs, r?.outputs)
|
|
13652
13970
|
};
|
|
13653
13971
|
}
|
|
13654
|
-
function
|
|
13972
|
+
function Wy(e, t, n) {
|
|
13655
13973
|
return Object.fromEntries(e.flatMap((e) => {
|
|
13656
13974
|
if (!("handle" in e)) return [];
|
|
13657
13975
|
let r = t?.[e.handle] ?? n?.[e.handle] ?? e.description;
|
|
@@ -13660,14 +13978,14 @@ function Uy(e, t, n) {
|
|
|
13660
13978
|
}
|
|
13661
13979
|
//#endregion
|
|
13662
13980
|
//#region src/trigger/providers/definitions.ts
|
|
13663
|
-
var
|
|
13981
|
+
var Gy = [
|
|
13664
13982
|
...f,
|
|
13665
13983
|
re,
|
|
13666
|
-
|
|
13984
|
+
Pu,
|
|
13667
13985
|
Ne,
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13986
|
+
hu,
|
|
13987
|
+
yu,
|
|
13988
|
+
$u,
|
|
13671
13989
|
Sh,
|
|
13672
13990
|
Gh,
|
|
13673
13991
|
Xh,
|
|
@@ -13682,6 +14000,6 @@ var Wy = [
|
|
|
13682
14000
|
Kv,
|
|
13683
14001
|
iy,
|
|
13684
14002
|
Sy
|
|
13685
|
-
],
|
|
14003
|
+
], Ky = Gy.filter((e) => e.snapshot.type == "poll"), qy = Gy.filter((e) => e.snapshot.type == "integration");
|
|
13686
14004
|
//#endregion
|
|
13687
|
-
export { d as feishuResponse, u as feishuSubscriptions,
|
|
14005
|
+
export { d as feishuResponse, u as feishuSubscriptions, qy as integrationDefinitions, Uy as localizeTrigger, te as matchesFeishuEvent, Ky as pollDefinitions, h as receiveFeishuEvent, Gy as triggerDefinitions };
|