@kohost/api-client 1.0.0-beta.5 → 3.0.0-beta.10
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/cjs/Client.js +666 -383
- package/dist/cjs/Commands.js +100 -25
- package/dist/cjs/Errors.js +24 -22
- package/dist/cjs/Events.js +26 -14
- package/dist/cjs/Models.js +68 -40
- package/dist/cjs/defs.js +4 -1
- package/dist/cjs/utils.js +8 -4
- package/dist/esm/Client.js +954 -587
- package/dist/esm/Client.js.map +3 -3
- package/dist/esm/Commands.js +100 -25
- package/dist/esm/Commands.js.map +3 -3
- package/dist/esm/Errors.js +24 -22
- package/dist/esm/Errors.js.map +1 -1
- package/dist/esm/Events.js +26 -14
- package/dist/esm/Events.js.map +2 -2
- package/dist/esm/Models.js +742 -110
- package/dist/esm/Models.js.map +2 -2
- package/dist/esm/defs.js +292 -205
- package/dist/esm/defs.js.map +2 -2
- package/dist/esm/index.js +10 -10
- package/dist/esm/utils.js +390 -51
- package/dist/esm/utils.js.map +2 -2
- package/dist/useCases/AddDefaultScenesToRooms.js +2 -2
- package/dist/useCases/AddScenesToRoom.js +2 -2
- package/dist/useCases/AdminCreateAdminUser.js +32 -0
- package/dist/useCases/AdminCreateCustomer.js +32 -0
- package/dist/useCases/AdminCreateProperty.js +2 -2
- package/dist/useCases/AdminDescribeCustomer.js +32 -0
- package/dist/useCases/AdminDescribeProperty.js +2 -2
- package/dist/useCases/AdminListAdminUsers.js +32 -0
- package/dist/useCases/AdminListCustomers.js +2 -2
- package/dist/useCases/AdminListProperties.js +2 -2
- package/dist/useCases/{LoginGateway.js → AdminLoginUser.js} +3 -3
- package/dist/useCases/AdminRefreshToken.js +32 -0
- package/dist/useCases/AdminRequestLoginLink.js +32 -0
- package/dist/useCases/AdminUpdateCustomer.js +32 -0
- package/dist/useCases/AdminUpdateProperty.js +2 -2
- package/dist/useCases/BatchNotifyPreArrival.js +2 -2
- package/dist/useCases/CheckInReservation.js +2 -2
- package/dist/useCases/CheckVerificationCode.js +2 -2
- package/dist/useCases/CreateAlarm.js +2 -2
- package/dist/useCases/CreateCamera.js +2 -2
- package/dist/useCases/CreateCourtesy.js +2 -2
- package/dist/useCases/CreateDefaultScenes.js +2 -2
- package/dist/useCases/CreateDimmer.js +2 -2
- package/dist/useCases/CreateDiscoveredDevice.js +2 -2
- package/dist/useCases/CreateDiscoveredDeviceAssociation.js +2 -2
- package/dist/useCases/CreateIntegration.js +2 -2
- package/dist/useCases/CreateIntegrationDeviceMapEntry.js +2 -2
- package/dist/useCases/CreateLock.js +2 -2
- package/dist/useCases/CreateReservation.js +2 -2
- package/dist/useCases/CreateRoom.js +2 -2
- package/dist/useCases/CreateRoomInSpace.js +2 -2
- package/dist/useCases/CreateSource.js +2 -2
- package/dist/useCases/CreateSpace.js +2 -2
- package/dist/useCases/CreateSwitch.js +2 -2
- package/dist/useCases/CreateThermostat.js +2 -2
- package/dist/useCases/CreateTicket.js +2 -2
- package/dist/useCases/CreateTicketMessage.js +2 -2
- package/dist/useCases/CreateUser.js +2 -2
- package/dist/useCases/CreateWindowCovering.js +2 -2
- package/dist/useCases/DeleteAlarm.js +2 -2
- package/dist/useCases/DeleteCamera.js +2 -2
- package/dist/useCases/DeleteCourtesy.js +2 -2
- package/dist/useCases/DeleteDimmer.js +2 -2
- package/dist/useCases/DeleteDiscoveredDevice.js +2 -2
- package/dist/useCases/DeleteIntegration.js +2 -2
- package/dist/useCases/DeleteLock.js +2 -2
- package/dist/useCases/DeleteReservation.js +2 -2
- package/dist/useCases/DeleteRoom.js +2 -2
- package/dist/useCases/DeleteSource.js +2 -2
- package/dist/useCases/DeleteSpace.js +2 -2
- package/dist/useCases/DeleteSwitch.js +2 -2
- package/dist/useCases/DeleteThermostat.js +2 -2
- package/dist/useCases/DeleteTicket.js +2 -2
- package/dist/useCases/DeleteUser.js +2 -2
- package/dist/useCases/DeleteWindowCovering.js +2 -2
- package/dist/useCases/DescribeAlarm.js +2 -2
- package/dist/useCases/DescribeCamera.js +2 -2
- package/dist/useCases/DescribeCourtesy.js +2 -2
- package/dist/useCases/DescribeDimmer.js +2 -2
- package/dist/useCases/DescribeDiscoveredDevice.js +2 -2
- package/dist/useCases/DescribeIntegration.js +2 -2
- package/dist/useCases/DescribeLock.js +2 -2
- package/dist/useCases/DescribeMyProperty.js +2 -2
- package/dist/useCases/DescribeReservation.js +2 -2
- package/dist/useCases/DescribeReservationCheckinStatus.js +2 -2
- package/dist/useCases/DescribeRoom.js +2 -2
- package/dist/useCases/DescribeSelf.js +2 -2
- package/dist/useCases/DescribeSource.js +2 -2
- package/dist/useCases/DescribeSpace.js +2 -2
- package/dist/useCases/DescribeSwitch.js +2 -2
- package/dist/useCases/DescribeThermostat.js +2 -2
- package/dist/useCases/DescribeTicket.js +2 -2
- package/dist/useCases/DescribeUser.js +2 -2
- package/dist/useCases/DescribeWindowCovering.js +2 -2
- package/dist/useCases/DiscoverReservations.js +2 -2
- package/dist/useCases/EmailUserAccountSetup.js +2 -2
- package/dist/useCases/ListAlarms.js +2 -2
- package/dist/useCases/ListCameras.js +2 -2
- package/dist/useCases/ListCourtesy.js +2 -2
- package/dist/useCases/ListDimmers.js +2 -2
- package/dist/useCases/ListDiscoveredDevices.js +2 -2
- package/dist/useCases/ListIntegrations.js +2 -2
- package/dist/useCases/ListLocks.js +2 -2
- package/dist/useCases/ListMyReservations.js +2 -2
- package/dist/useCases/ListMySpaces.js +2 -2
- package/dist/useCases/ListReservations.js +2 -2
- package/dist/useCases/ListRooms.js +2 -2
- package/dist/useCases/ListRoomsInSpace.js +2 -2
- package/dist/useCases/ListSources.js +2 -2
- package/dist/useCases/ListSpaces.js +2 -2
- package/dist/useCases/ListSwitches.js +2 -2
- package/dist/useCases/ListThermostats.js +2 -2
- package/dist/useCases/ListTickets.js +2 -2
- package/dist/useCases/ListUserReservations.js +2 -2
- package/dist/useCases/ListUsers.js +2 -2
- package/dist/useCases/ListWindowCoverings.js +2 -2
- package/dist/useCases/LoginUser.js +2 -2
- package/dist/useCases/MatchUserIdentification.js +2 -2
- package/dist/useCases/OCRDocument.js +2 -2
- package/dist/useCases/RefreshToken.js +2 -2
- package/dist/useCases/RequestLoginLink.js +2 -2
- package/dist/useCases/SendPreArrivalEmail.js +2 -2
- package/dist/useCases/SendPreArrivalSMS.js +2 -2
- package/dist/useCases/SendVerificationCode.js +2 -2
- package/dist/useCases/SetCamera.js +2 -2
- package/dist/useCases/SetCourtesy.js +2 -2
- package/dist/useCases/SetLock.js +2 -2
- package/dist/useCases/SetSource.js +2 -2
- package/dist/useCases/SetSwitch.js +2 -2
- package/dist/useCases/SetThermostat.js +2 -2
- package/dist/useCases/SetWindowCovering.js +2 -2
- package/dist/useCases/UpdateAlarm.js +2 -2
- package/dist/useCases/UpdateCamera.js +2 -2
- package/dist/useCases/UpdateCourtesy.js +2 -2
- package/dist/useCases/UpdateDimmer.js +2 -2
- package/dist/useCases/UpdateDiscoveredDevice.js +2 -2
- package/dist/useCases/UpdateIntegration.js +2 -2
- package/dist/useCases/UpdateLock.js +2 -2
- package/dist/useCases/UpdateMessageReadStatus.js +2 -2
- package/dist/useCases/UpdateReservation.js +2 -2
- package/dist/useCases/UpdateRoom.js +2 -2
- package/dist/useCases/UpdateSelf.js +2 -2
- package/dist/useCases/UpdateSource.js +2 -2
- package/dist/useCases/UpdateSpace.js +2 -2
- package/dist/useCases/UpdateSwitch.js +2 -2
- package/dist/useCases/UpdateThermostat.js +2 -2
- package/dist/useCases/UpdateTicket.js +2 -2
- package/dist/useCases/UpdateTicketStatus.js +2 -2
- package/dist/useCases/UpdateUser.js +2 -2
- package/dist/useCases/UpdateWindowCovering.js +2 -2
- package/dist/useCases/UpsertDiscoveredDevice.js +2 -2
- package/package.json +2 -1
package/dist/esm/Models.js
CHANGED
|
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
6
|
var __esm = (fn, res) => function __init() {
|
|
6
7
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
8
|
};
|
|
@@ -30,6 +31,7 @@ var require_code = __commonJS({
|
|
|
30
31
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
31
32
|
var _CodeOrName = class {
|
|
32
33
|
};
|
|
34
|
+
__name(_CodeOrName, "_CodeOrName");
|
|
33
35
|
exports._CodeOrName = _CodeOrName;
|
|
34
36
|
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
35
37
|
var Name = class extends _CodeOrName {
|
|
@@ -49,6 +51,7 @@ var require_code = __commonJS({
|
|
|
49
51
|
return { [this.str]: 1 };
|
|
50
52
|
}
|
|
51
53
|
};
|
|
54
|
+
__name(Name, "Name");
|
|
52
55
|
exports.Name = Name;
|
|
53
56
|
var _Code = class extends _CodeOrName {
|
|
54
57
|
constructor(code) {
|
|
@@ -77,6 +80,7 @@ var require_code = __commonJS({
|
|
|
77
80
|
}, {});
|
|
78
81
|
}
|
|
79
82
|
};
|
|
83
|
+
__name(_Code, "_Code");
|
|
80
84
|
exports._Code = _Code;
|
|
81
85
|
exports.nil = new _Code("");
|
|
82
86
|
function _(strs, ...args) {
|
|
@@ -88,6 +92,7 @@ var require_code = __commonJS({
|
|
|
88
92
|
}
|
|
89
93
|
return new _Code(code);
|
|
90
94
|
}
|
|
95
|
+
__name(_, "_");
|
|
91
96
|
exports._ = _;
|
|
92
97
|
var plus = new _Code("+");
|
|
93
98
|
function str(strs, ...args) {
|
|
@@ -101,6 +106,7 @@ var require_code = __commonJS({
|
|
|
101
106
|
optimize(expr);
|
|
102
107
|
return new _Code(expr);
|
|
103
108
|
}
|
|
109
|
+
__name(str, "str");
|
|
104
110
|
exports.str = str;
|
|
105
111
|
function addCodeArg(code, arg) {
|
|
106
112
|
if (arg instanceof _Code)
|
|
@@ -110,6 +116,7 @@ var require_code = __commonJS({
|
|
|
110
116
|
else
|
|
111
117
|
code.push(interpolate(arg));
|
|
112
118
|
}
|
|
119
|
+
__name(addCodeArg, "addCodeArg");
|
|
113
120
|
exports.addCodeArg = addCodeArg;
|
|
114
121
|
function optimize(expr) {
|
|
115
122
|
let i = 1;
|
|
@@ -125,6 +132,7 @@ var require_code = __commonJS({
|
|
|
125
132
|
i++;
|
|
126
133
|
}
|
|
127
134
|
}
|
|
135
|
+
__name(optimize, "optimize");
|
|
128
136
|
function mergeExprItems(a, b) {
|
|
129
137
|
if (b === '""')
|
|
130
138
|
return a;
|
|
@@ -143,24 +151,30 @@ var require_code = __commonJS({
|
|
|
143
151
|
return `"${a}${b.slice(1)}`;
|
|
144
152
|
return;
|
|
145
153
|
}
|
|
154
|
+
__name(mergeExprItems, "mergeExprItems");
|
|
146
155
|
function strConcat(c1, c2) {
|
|
147
156
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
|
|
148
157
|
}
|
|
158
|
+
__name(strConcat, "strConcat");
|
|
149
159
|
exports.strConcat = strConcat;
|
|
150
160
|
function interpolate(x) {
|
|
151
161
|
return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
|
|
152
162
|
}
|
|
163
|
+
__name(interpolate, "interpolate");
|
|
153
164
|
function stringify(x) {
|
|
154
165
|
return new _Code(safeStringify(x));
|
|
155
166
|
}
|
|
167
|
+
__name(stringify, "stringify");
|
|
156
168
|
exports.stringify = stringify;
|
|
157
169
|
function safeStringify(x) {
|
|
158
170
|
return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
159
171
|
}
|
|
172
|
+
__name(safeStringify, "safeStringify");
|
|
160
173
|
exports.safeStringify = safeStringify;
|
|
161
174
|
function getProperty(key) {
|
|
162
175
|
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
|
|
163
176
|
}
|
|
177
|
+
__name(getProperty, "getProperty");
|
|
164
178
|
exports.getProperty = getProperty;
|
|
165
179
|
function getEsmExportName(key) {
|
|
166
180
|
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
|
|
@@ -168,10 +182,12 @@ var require_code = __commonJS({
|
|
|
168
182
|
}
|
|
169
183
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
170
184
|
}
|
|
185
|
+
__name(getEsmExportName, "getEsmExportName");
|
|
171
186
|
exports.getEsmExportName = getEsmExportName;
|
|
172
187
|
function regexpCode(rx) {
|
|
173
188
|
return new _Code(rx.toString());
|
|
174
189
|
}
|
|
190
|
+
__name(regexpCode, "regexpCode");
|
|
175
191
|
exports.regexpCode = regexpCode;
|
|
176
192
|
}
|
|
177
193
|
});
|
|
@@ -189,6 +205,7 @@ var require_scope = __commonJS({
|
|
|
189
205
|
this.value = name.value;
|
|
190
206
|
}
|
|
191
207
|
};
|
|
208
|
+
__name(ValueError, "ValueError");
|
|
192
209
|
var UsedValueState;
|
|
193
210
|
(function(UsedValueState2) {
|
|
194
211
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
@@ -223,6 +240,7 @@ var require_scope = __commonJS({
|
|
|
223
240
|
return this._names[prefix] = { prefix, index: 0 };
|
|
224
241
|
}
|
|
225
242
|
};
|
|
243
|
+
__name(Scope, "Scope");
|
|
226
244
|
exports.Scope = Scope;
|
|
227
245
|
var ValueScopeName = class extends code_1.Name {
|
|
228
246
|
constructor(prefix, nameStr) {
|
|
@@ -234,6 +252,7 @@ var require_scope = __commonJS({
|
|
|
234
252
|
this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
|
|
235
253
|
}
|
|
236
254
|
};
|
|
255
|
+
__name(ValueScopeName, "ValueScopeName");
|
|
237
256
|
exports.ValueScopeName = ValueScopeName;
|
|
238
257
|
var line = (0, code_1._)`\n`;
|
|
239
258
|
var ValueScope = class extends Scope {
|
|
@@ -317,6 +336,7 @@ var require_scope = __commonJS({
|
|
|
317
336
|
return code;
|
|
318
337
|
}
|
|
319
338
|
};
|
|
339
|
+
__name(ValueScope, "ValueScope");
|
|
320
340
|
exports.ValueScope = ValueScope;
|
|
321
341
|
}
|
|
322
342
|
});
|
|
@@ -387,6 +407,7 @@ var require_codegen = __commonJS({
|
|
|
387
407
|
return this;
|
|
388
408
|
}
|
|
389
409
|
};
|
|
410
|
+
__name(Node, "Node");
|
|
390
411
|
var Def = class extends Node {
|
|
391
412
|
constructor(varKind, name, rhs) {
|
|
392
413
|
super();
|
|
@@ -410,6 +431,7 @@ var require_codegen = __commonJS({
|
|
|
410
431
|
return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
|
|
411
432
|
}
|
|
412
433
|
};
|
|
434
|
+
__name(Def, "Def");
|
|
413
435
|
var Assign = class extends Node {
|
|
414
436
|
constructor(lhs, rhs, sideEffects) {
|
|
415
437
|
super();
|
|
@@ -431,6 +453,7 @@ var require_codegen = __commonJS({
|
|
|
431
453
|
return addExprNames(names, this.rhs);
|
|
432
454
|
}
|
|
433
455
|
};
|
|
456
|
+
__name(Assign, "Assign");
|
|
434
457
|
var AssignOp = class extends Assign {
|
|
435
458
|
constructor(lhs, op, rhs, sideEffects) {
|
|
436
459
|
super(lhs, rhs, sideEffects);
|
|
@@ -440,6 +463,7 @@ var require_codegen = __commonJS({
|
|
|
440
463
|
return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
|
|
441
464
|
}
|
|
442
465
|
};
|
|
466
|
+
__name(AssignOp, "AssignOp");
|
|
443
467
|
var Label = class extends Node {
|
|
444
468
|
constructor(label) {
|
|
445
469
|
super();
|
|
@@ -450,6 +474,7 @@ var require_codegen = __commonJS({
|
|
|
450
474
|
return `${this.label}:` + _n;
|
|
451
475
|
}
|
|
452
476
|
};
|
|
477
|
+
__name(Label, "Label");
|
|
453
478
|
var Break = class extends Node {
|
|
454
479
|
constructor(label) {
|
|
455
480
|
super();
|
|
@@ -461,6 +486,7 @@ var require_codegen = __commonJS({
|
|
|
461
486
|
return `break${label};` + _n;
|
|
462
487
|
}
|
|
463
488
|
};
|
|
489
|
+
__name(Break, "Break");
|
|
464
490
|
var Throw = class extends Node {
|
|
465
491
|
constructor(error) {
|
|
466
492
|
super();
|
|
@@ -473,6 +499,7 @@ var require_codegen = __commonJS({
|
|
|
473
499
|
return this.error.names;
|
|
474
500
|
}
|
|
475
501
|
};
|
|
502
|
+
__name(Throw, "Throw");
|
|
476
503
|
var AnyCode = class extends Node {
|
|
477
504
|
constructor(code) {
|
|
478
505
|
super();
|
|
@@ -492,6 +519,7 @@ var require_codegen = __commonJS({
|
|
|
492
519
|
return this.code instanceof code_1._CodeOrName ? this.code.names : {};
|
|
493
520
|
}
|
|
494
521
|
};
|
|
522
|
+
__name(AnyCode, "AnyCode");
|
|
495
523
|
var ParentNode = class extends Node {
|
|
496
524
|
constructor(nodes = []) {
|
|
497
525
|
super();
|
|
@@ -530,15 +558,19 @@ var require_codegen = __commonJS({
|
|
|
530
558
|
return this.nodes.reduce((names, n) => addNames(names, n.names), {});
|
|
531
559
|
}
|
|
532
560
|
};
|
|
561
|
+
__name(ParentNode, "ParentNode");
|
|
533
562
|
var BlockNode = class extends ParentNode {
|
|
534
563
|
render(opts) {
|
|
535
564
|
return "{" + opts._n + super.render(opts) + "}" + opts._n;
|
|
536
565
|
}
|
|
537
566
|
};
|
|
567
|
+
__name(BlockNode, "BlockNode");
|
|
538
568
|
var Root = class extends ParentNode {
|
|
539
569
|
};
|
|
570
|
+
__name(Root, "Root");
|
|
540
571
|
var Else = class extends BlockNode {
|
|
541
572
|
};
|
|
573
|
+
__name(Else, "Else");
|
|
542
574
|
Else.kind = "else";
|
|
543
575
|
var If = class extends BlockNode {
|
|
544
576
|
constructor(condition, nodes) {
|
|
@@ -588,9 +620,11 @@ var require_codegen = __commonJS({
|
|
|
588
620
|
return names;
|
|
589
621
|
}
|
|
590
622
|
};
|
|
623
|
+
__name(If, "If");
|
|
591
624
|
If.kind = "if";
|
|
592
625
|
var For = class extends BlockNode {
|
|
593
626
|
};
|
|
627
|
+
__name(For, "For");
|
|
594
628
|
For.kind = "for";
|
|
595
629
|
var ForLoop = class extends For {
|
|
596
630
|
constructor(iteration) {
|
|
@@ -610,6 +644,7 @@ var require_codegen = __commonJS({
|
|
|
610
644
|
return addNames(super.names, this.iteration.names);
|
|
611
645
|
}
|
|
612
646
|
};
|
|
647
|
+
__name(ForLoop, "ForLoop");
|
|
613
648
|
var ForRange = class extends For {
|
|
614
649
|
constructor(varKind, name, from, to) {
|
|
615
650
|
super();
|
|
@@ -628,6 +663,7 @@ var require_codegen = __commonJS({
|
|
|
628
663
|
return addExprNames(names, this.to);
|
|
629
664
|
}
|
|
630
665
|
};
|
|
666
|
+
__name(ForRange, "ForRange");
|
|
631
667
|
var ForIter = class extends For {
|
|
632
668
|
constructor(loop, varKind, name, iterable) {
|
|
633
669
|
super();
|
|
@@ -649,6 +685,7 @@ var require_codegen = __commonJS({
|
|
|
649
685
|
return addNames(super.names, this.iterable.names);
|
|
650
686
|
}
|
|
651
687
|
};
|
|
688
|
+
__name(ForIter, "ForIter");
|
|
652
689
|
var Func = class extends BlockNode {
|
|
653
690
|
constructor(name, args, async) {
|
|
654
691
|
super();
|
|
@@ -661,12 +698,14 @@ var require_codegen = __commonJS({
|
|
|
661
698
|
return `${_async}function ${this.name}(${this.args})` + super.render(opts);
|
|
662
699
|
}
|
|
663
700
|
};
|
|
701
|
+
__name(Func, "Func");
|
|
664
702
|
Func.kind = "func";
|
|
665
703
|
var Return = class extends ParentNode {
|
|
666
704
|
render(opts) {
|
|
667
705
|
return "return " + super.render(opts);
|
|
668
706
|
}
|
|
669
707
|
};
|
|
708
|
+
__name(Return, "Return");
|
|
670
709
|
Return.kind = "return";
|
|
671
710
|
var Try = class extends BlockNode {
|
|
672
711
|
render(opts) {
|
|
@@ -700,6 +739,7 @@ var require_codegen = __commonJS({
|
|
|
700
739
|
return names;
|
|
701
740
|
}
|
|
702
741
|
};
|
|
742
|
+
__name(Try, "Try");
|
|
703
743
|
var Catch = class extends BlockNode {
|
|
704
744
|
constructor(error) {
|
|
705
745
|
super();
|
|
@@ -709,12 +749,14 @@ var require_codegen = __commonJS({
|
|
|
709
749
|
return `catch(${this.error})` + super.render(opts);
|
|
710
750
|
}
|
|
711
751
|
};
|
|
752
|
+
__name(Catch, "Catch");
|
|
712
753
|
Catch.kind = "catch";
|
|
713
754
|
var Finally = class extends BlockNode {
|
|
714
755
|
render(opts) {
|
|
715
756
|
return "finally" + super.render(opts);
|
|
716
757
|
}
|
|
717
758
|
};
|
|
759
|
+
__name(Finally, "Finally");
|
|
718
760
|
Finally.kind = "finally";
|
|
719
761
|
var CodeGen = class {
|
|
720
762
|
constructor(extScope, opts = {}) {
|
|
@@ -980,15 +1022,18 @@ var require_codegen = __commonJS({
|
|
|
980
1022
|
ns[ns.length - 1] = node;
|
|
981
1023
|
}
|
|
982
1024
|
};
|
|
1025
|
+
__name(CodeGen, "CodeGen");
|
|
983
1026
|
exports.CodeGen = CodeGen;
|
|
984
1027
|
function addNames(names, from) {
|
|
985
1028
|
for (const n in from)
|
|
986
1029
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
987
1030
|
return names;
|
|
988
1031
|
}
|
|
1032
|
+
__name(addNames, "addNames");
|
|
989
1033
|
function addExprNames(names, from) {
|
|
990
1034
|
return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
|
|
991
1035
|
}
|
|
1036
|
+
__name(addExprNames, "addExprNames");
|
|
992
1037
|
function optimizeExpr(expr, names, constants) {
|
|
993
1038
|
if (expr instanceof code_1.Name)
|
|
994
1039
|
return replaceName(expr);
|
|
@@ -1010,34 +1055,43 @@ var require_codegen = __commonJS({
|
|
|
1010
1055
|
delete names[n.str];
|
|
1011
1056
|
return c;
|
|
1012
1057
|
}
|
|
1058
|
+
__name(replaceName, "replaceName");
|
|
1013
1059
|
function canOptimize(e) {
|
|
1014
1060
|
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);
|
|
1015
1061
|
}
|
|
1062
|
+
__name(canOptimize, "canOptimize");
|
|
1016
1063
|
}
|
|
1064
|
+
__name(optimizeExpr, "optimizeExpr");
|
|
1017
1065
|
function subtractNames(names, from) {
|
|
1018
1066
|
for (const n in from)
|
|
1019
1067
|
names[n] = (names[n] || 0) - (from[n] || 0);
|
|
1020
1068
|
}
|
|
1069
|
+
__name(subtractNames, "subtractNames");
|
|
1021
1070
|
function not(x) {
|
|
1022
1071
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
|
|
1023
1072
|
}
|
|
1073
|
+
__name(not, "not");
|
|
1024
1074
|
exports.not = not;
|
|
1025
1075
|
var andCode = mappend(exports.operators.AND);
|
|
1026
1076
|
function and(...args) {
|
|
1027
1077
|
return args.reduce(andCode);
|
|
1028
1078
|
}
|
|
1079
|
+
__name(and, "and");
|
|
1029
1080
|
exports.and = and;
|
|
1030
1081
|
var orCode = mappend(exports.operators.OR);
|
|
1031
1082
|
function or(...args) {
|
|
1032
1083
|
return args.reduce(orCode);
|
|
1033
1084
|
}
|
|
1085
|
+
__name(or, "or");
|
|
1034
1086
|
exports.or = or;
|
|
1035
1087
|
function mappend(op) {
|
|
1036
1088
|
return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
|
|
1037
1089
|
}
|
|
1090
|
+
__name(mappend, "mappend");
|
|
1038
1091
|
function par(x) {
|
|
1039
1092
|
return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
|
|
1040
1093
|
}
|
|
1094
|
+
__name(par, "par");
|
|
1041
1095
|
}
|
|
1042
1096
|
});
|
|
1043
1097
|
|
|
@@ -1055,6 +1109,7 @@ var require_util = __commonJS({
|
|
|
1055
1109
|
hash[item] = true;
|
|
1056
1110
|
return hash;
|
|
1057
1111
|
}
|
|
1112
|
+
__name(toHash, "toHash");
|
|
1058
1113
|
exports.toHash = toHash;
|
|
1059
1114
|
function alwaysValidSchema(it, schema) {
|
|
1060
1115
|
if (typeof schema == "boolean")
|
|
@@ -1064,6 +1119,7 @@ var require_util = __commonJS({
|
|
|
1064
1119
|
checkUnknownRules(it, schema);
|
|
1065
1120
|
return !schemaHasRules(schema, it.self.RULES.all);
|
|
1066
1121
|
}
|
|
1122
|
+
__name(alwaysValidSchema, "alwaysValidSchema");
|
|
1067
1123
|
exports.alwaysValidSchema = alwaysValidSchema;
|
|
1068
1124
|
function checkUnknownRules(it, schema = it.schema) {
|
|
1069
1125
|
const { opts, self: self2 } = it;
|
|
@@ -1077,6 +1133,7 @@ var require_util = __commonJS({
|
|
|
1077
1133
|
checkStrictMode(it, `unknown keyword: "${key}"`);
|
|
1078
1134
|
}
|
|
1079
1135
|
}
|
|
1136
|
+
__name(checkUnknownRules, "checkUnknownRules");
|
|
1080
1137
|
exports.checkUnknownRules = checkUnknownRules;
|
|
1081
1138
|
function schemaHasRules(schema, rules) {
|
|
1082
1139
|
if (typeof schema == "boolean")
|
|
@@ -1086,6 +1143,7 @@ var require_util = __commonJS({
|
|
|
1086
1143
|
return true;
|
|
1087
1144
|
return false;
|
|
1088
1145
|
}
|
|
1146
|
+
__name(schemaHasRules, "schemaHasRules");
|
|
1089
1147
|
exports.schemaHasRules = schemaHasRules;
|
|
1090
1148
|
function schemaHasRulesButRef(schema, RULES) {
|
|
1091
1149
|
if (typeof schema == "boolean")
|
|
@@ -1095,6 +1153,7 @@ var require_util = __commonJS({
|
|
|
1095
1153
|
return true;
|
|
1096
1154
|
return false;
|
|
1097
1155
|
}
|
|
1156
|
+
__name(schemaHasRulesButRef, "schemaHasRulesButRef");
|
|
1098
1157
|
exports.schemaHasRulesButRef = schemaHasRulesButRef;
|
|
1099
1158
|
function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
|
|
1100
1159
|
if (!$data) {
|
|
@@ -1105,24 +1164,29 @@ var require_util = __commonJS({
|
|
|
1105
1164
|
}
|
|
1106
1165
|
return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
|
|
1107
1166
|
}
|
|
1167
|
+
__name(schemaRefOrVal, "schemaRefOrVal");
|
|
1108
1168
|
exports.schemaRefOrVal = schemaRefOrVal;
|
|
1109
1169
|
function unescapeFragment(str) {
|
|
1110
1170
|
return unescapeJsonPointer(decodeURIComponent(str));
|
|
1111
1171
|
}
|
|
1172
|
+
__name(unescapeFragment, "unescapeFragment");
|
|
1112
1173
|
exports.unescapeFragment = unescapeFragment;
|
|
1113
1174
|
function escapeFragment(str) {
|
|
1114
1175
|
return encodeURIComponent(escapeJsonPointer(str));
|
|
1115
1176
|
}
|
|
1177
|
+
__name(escapeFragment, "escapeFragment");
|
|
1116
1178
|
exports.escapeFragment = escapeFragment;
|
|
1117
1179
|
function escapeJsonPointer(str) {
|
|
1118
1180
|
if (typeof str == "number")
|
|
1119
1181
|
return `${str}`;
|
|
1120
1182
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
1121
1183
|
}
|
|
1184
|
+
__name(escapeJsonPointer, "escapeJsonPointer");
|
|
1122
1185
|
exports.escapeJsonPointer = escapeJsonPointer;
|
|
1123
1186
|
function unescapeJsonPointer(str) {
|
|
1124
1187
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1125
1188
|
}
|
|
1189
|
+
__name(unescapeJsonPointer, "unescapeJsonPointer");
|
|
1126
1190
|
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
1127
1191
|
function eachItem(xs, f) {
|
|
1128
1192
|
if (Array.isArray(xs)) {
|
|
@@ -1132,6 +1196,7 @@ var require_util = __commonJS({
|
|
|
1132
1196
|
f(xs);
|
|
1133
1197
|
}
|
|
1134
1198
|
}
|
|
1199
|
+
__name(eachItem, "eachItem");
|
|
1135
1200
|
exports.eachItem = eachItem;
|
|
1136
1201
|
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
|
|
1137
1202
|
return (gen, from, to, toName) => {
|
|
@@ -1139,6 +1204,7 @@ var require_util = __commonJS({
|
|
|
1139
1204
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
1140
1205
|
};
|
|
1141
1206
|
}
|
|
1207
|
+
__name(makeMergeEvaluated, "makeMergeEvaluated");
|
|
1142
1208
|
exports.mergeEvaluated = {
|
|
1143
1209
|
props: makeMergeEvaluated({
|
|
1144
1210
|
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
@@ -1170,10 +1236,12 @@ var require_util = __commonJS({
|
|
|
1170
1236
|
setEvaluated(gen, props, ps);
|
|
1171
1237
|
return props;
|
|
1172
1238
|
}
|
|
1239
|
+
__name(evaluatedPropsToName, "evaluatedPropsToName");
|
|
1173
1240
|
exports.evaluatedPropsToName = evaluatedPropsToName;
|
|
1174
1241
|
function setEvaluated(gen, props, ps) {
|
|
1175
1242
|
Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
|
|
1176
1243
|
}
|
|
1244
|
+
__name(setEvaluated, "setEvaluated");
|
|
1177
1245
|
exports.setEvaluated = setEvaluated;
|
|
1178
1246
|
var snippets = {};
|
|
1179
1247
|
function useFunc(gen, f) {
|
|
@@ -1182,6 +1250,7 @@ var require_util = __commonJS({
|
|
|
1182
1250
|
code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
|
|
1183
1251
|
});
|
|
1184
1252
|
}
|
|
1253
|
+
__name(useFunc, "useFunc");
|
|
1185
1254
|
exports.useFunc = useFunc;
|
|
1186
1255
|
var Type;
|
|
1187
1256
|
(function(Type2) {
|
|
@@ -1195,6 +1264,7 @@ var require_util = __commonJS({
|
|
|
1195
1264
|
}
|
|
1196
1265
|
return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
|
|
1197
1266
|
}
|
|
1267
|
+
__name(getErrorPath, "getErrorPath");
|
|
1198
1268
|
exports.getErrorPath = getErrorPath;
|
|
1199
1269
|
function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
|
|
1200
1270
|
if (!mode)
|
|
@@ -1204,6 +1274,7 @@ var require_util = __commonJS({
|
|
|
1204
1274
|
throw new Error(msg);
|
|
1205
1275
|
it.self.logger.warn(msg);
|
|
1206
1276
|
}
|
|
1277
|
+
__name(checkStrictMode, "checkStrictMode");
|
|
1207
1278
|
exports.checkStrictMode = checkStrictMode;
|
|
1208
1279
|
}
|
|
1209
1280
|
});
|
|
@@ -1266,6 +1337,7 @@ var require_errors = __commonJS({
|
|
|
1266
1337
|
returnErrors(it, (0, codegen_1._)`[${errObj}]`);
|
|
1267
1338
|
}
|
|
1268
1339
|
}
|
|
1340
|
+
__name(reportError, "reportError");
|
|
1269
1341
|
exports.reportError = reportError;
|
|
1270
1342
|
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
|
|
1271
1343
|
const { it } = cxt;
|
|
@@ -1276,11 +1348,13 @@ var require_errors = __commonJS({
|
|
|
1276
1348
|
returnErrors(it, names_1.default.vErrors);
|
|
1277
1349
|
}
|
|
1278
1350
|
}
|
|
1351
|
+
__name(reportExtraError, "reportExtraError");
|
|
1279
1352
|
exports.reportExtraError = reportExtraError;
|
|
1280
1353
|
function resetErrorsCount(gen, errsCount) {
|
|
1281
1354
|
gen.assign(names_1.default.errors, errsCount);
|
|
1282
1355
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
|
1283
1356
|
}
|
|
1357
|
+
__name(resetErrorsCount, "resetErrorsCount");
|
|
1284
1358
|
exports.resetErrorsCount = resetErrorsCount;
|
|
1285
1359
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
|
|
1286
1360
|
if (errsCount === void 0)
|
|
@@ -1296,12 +1370,14 @@ var require_errors = __commonJS({
|
|
|
1296
1370
|
}
|
|
1297
1371
|
});
|
|
1298
1372
|
}
|
|
1373
|
+
__name(extendErrors, "extendErrors");
|
|
1299
1374
|
exports.extendErrors = extendErrors;
|
|
1300
1375
|
function addError(gen, errObj) {
|
|
1301
1376
|
const err = gen.const("err", errObj);
|
|
1302
1377
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
|
|
1303
1378
|
gen.code((0, codegen_1._)`${names_1.default.errors}++`);
|
|
1304
1379
|
}
|
|
1380
|
+
__name(addError, "addError");
|
|
1305
1381
|
function returnErrors(it, errs) {
|
|
1306
1382
|
const { gen, validateName, schemaEnv } = it;
|
|
1307
1383
|
if (schemaEnv.$async) {
|
|
@@ -1311,6 +1387,7 @@ var require_errors = __commonJS({
|
|
|
1311
1387
|
gen.return(false);
|
|
1312
1388
|
}
|
|
1313
1389
|
}
|
|
1390
|
+
__name(returnErrors, "returnErrors");
|
|
1314
1391
|
var E = {
|
|
1315
1392
|
keyword: new codegen_1.Name("keyword"),
|
|
1316
1393
|
schemaPath: new codegen_1.Name("schemaPath"),
|
|
@@ -1326,6 +1403,7 @@ var require_errors = __commonJS({
|
|
|
1326
1403
|
return (0, codegen_1._)`{}`;
|
|
1327
1404
|
return errorObject(cxt, error, errorPaths);
|
|
1328
1405
|
}
|
|
1406
|
+
__name(errorObjectCode, "errorObjectCode");
|
|
1329
1407
|
function errorObject(cxt, error, errorPaths = {}) {
|
|
1330
1408
|
const { gen, it } = cxt;
|
|
1331
1409
|
const keyValues = [
|
|
@@ -1335,10 +1413,12 @@ var require_errors = __commonJS({
|
|
|
1335
1413
|
extraErrorProps(cxt, error, keyValues);
|
|
1336
1414
|
return gen.object(...keyValues);
|
|
1337
1415
|
}
|
|
1416
|
+
__name(errorObject, "errorObject");
|
|
1338
1417
|
function errorInstancePath({ errorPath }, { instancePath }) {
|
|
1339
1418
|
const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;
|
|
1340
1419
|
return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
|
|
1341
1420
|
}
|
|
1421
|
+
__name(errorInstancePath, "errorInstancePath");
|
|
1342
1422
|
function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
|
|
1343
1423
|
let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;
|
|
1344
1424
|
if (schemaPath) {
|
|
@@ -1346,6 +1426,7 @@ var require_errors = __commonJS({
|
|
|
1346
1426
|
}
|
|
1347
1427
|
return [E.schemaPath, schPath];
|
|
1348
1428
|
}
|
|
1429
|
+
__name(errorSchemaPath, "errorSchemaPath");
|
|
1349
1430
|
function extraErrorProps(cxt, { params, message }, keyValues) {
|
|
1350
1431
|
const { keyword, data, schemaValue, it } = cxt;
|
|
1351
1432
|
const { opts, propertyName, topSchemaRef, schemaPath } = it;
|
|
@@ -1359,6 +1440,7 @@ var require_errors = __commonJS({
|
|
|
1359
1440
|
if (propertyName)
|
|
1360
1441
|
keyValues.push([E.propertyName, propertyName]);
|
|
1361
1442
|
}
|
|
1443
|
+
__name(extraErrorProps, "extraErrorProps");
|
|
1362
1444
|
}
|
|
1363
1445
|
});
|
|
1364
1446
|
|
|
@@ -1385,6 +1467,7 @@ var require_boolSchema = __commonJS({
|
|
|
1385
1467
|
gen.return(true);
|
|
1386
1468
|
}
|
|
1387
1469
|
}
|
|
1470
|
+
__name(topBoolOrEmptySchema, "topBoolOrEmptySchema");
|
|
1388
1471
|
exports.topBoolOrEmptySchema = topBoolOrEmptySchema;
|
|
1389
1472
|
function boolOrEmptySchema(it, valid) {
|
|
1390
1473
|
const { gen, schema } = it;
|
|
@@ -1395,6 +1478,7 @@ var require_boolSchema = __commonJS({
|
|
|
1395
1478
|
gen.var(valid, true);
|
|
1396
1479
|
}
|
|
1397
1480
|
}
|
|
1481
|
+
__name(boolOrEmptySchema, "boolOrEmptySchema");
|
|
1398
1482
|
exports.boolOrEmptySchema = boolOrEmptySchema;
|
|
1399
1483
|
function falseSchemaError(it, overrideAllErrors) {
|
|
1400
1484
|
const { gen, data } = it;
|
|
@@ -1410,6 +1494,7 @@ var require_boolSchema = __commonJS({
|
|
|
1410
1494
|
};
|
|
1411
1495
|
(0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
|
|
1412
1496
|
}
|
|
1497
|
+
__name(falseSchemaError, "falseSchemaError");
|
|
1413
1498
|
}
|
|
1414
1499
|
});
|
|
1415
1500
|
|
|
@@ -1424,6 +1509,7 @@ var require_rules = __commonJS({
|
|
|
1424
1509
|
function isJSONType(x) {
|
|
1425
1510
|
return typeof x == "string" && jsonTypes.has(x);
|
|
1426
1511
|
}
|
|
1512
|
+
__name(isJSONType, "isJSONType");
|
|
1427
1513
|
exports.isJSONType = isJSONType;
|
|
1428
1514
|
function getRules() {
|
|
1429
1515
|
const groups = {
|
|
@@ -1440,6 +1526,7 @@ var require_rules = __commonJS({
|
|
|
1440
1526
|
keywords: {}
|
|
1441
1527
|
};
|
|
1442
1528
|
}
|
|
1529
|
+
__name(getRules, "getRules");
|
|
1443
1530
|
exports.getRules = getRules;
|
|
1444
1531
|
}
|
|
1445
1532
|
});
|
|
@@ -1454,15 +1541,18 @@ var require_applicability = __commonJS({
|
|
|
1454
1541
|
const group = self2.RULES.types[type];
|
|
1455
1542
|
return group && group !== true && shouldUseGroup(schema, group);
|
|
1456
1543
|
}
|
|
1544
|
+
__name(schemaHasRulesForType, "schemaHasRulesForType");
|
|
1457
1545
|
exports.schemaHasRulesForType = schemaHasRulesForType;
|
|
1458
1546
|
function shouldUseGroup(schema, group) {
|
|
1459
1547
|
return group.rules.some((rule) => shouldUseRule(schema, rule));
|
|
1460
1548
|
}
|
|
1549
|
+
__name(shouldUseGroup, "shouldUseGroup");
|
|
1461
1550
|
exports.shouldUseGroup = shouldUseGroup;
|
|
1462
1551
|
function shouldUseRule(schema, rule) {
|
|
1463
1552
|
var _a;
|
|
1464
1553
|
return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));
|
|
1465
1554
|
}
|
|
1555
|
+
__name(shouldUseRule, "shouldUseRule");
|
|
1466
1556
|
exports.shouldUseRule = shouldUseRule;
|
|
1467
1557
|
}
|
|
1468
1558
|
});
|
|
@@ -1498,6 +1588,7 @@ var require_dataType = __commonJS({
|
|
|
1498
1588
|
}
|
|
1499
1589
|
return types;
|
|
1500
1590
|
}
|
|
1591
|
+
__name(getSchemaTypes, "getSchemaTypes");
|
|
1501
1592
|
exports.getSchemaTypes = getSchemaTypes;
|
|
1502
1593
|
function getJSONTypes(ts) {
|
|
1503
1594
|
const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
|
|
@@ -1505,6 +1596,7 @@ var require_dataType = __commonJS({
|
|
|
1505
1596
|
return types;
|
|
1506
1597
|
throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
|
|
1507
1598
|
}
|
|
1599
|
+
__name(getJSONTypes, "getJSONTypes");
|
|
1508
1600
|
exports.getJSONTypes = getJSONTypes;
|
|
1509
1601
|
function coerceAndCheckDataType(it, types) {
|
|
1510
1602
|
const { gen, data, opts } = it;
|
|
@@ -1521,11 +1613,13 @@ var require_dataType = __commonJS({
|
|
|
1521
1613
|
}
|
|
1522
1614
|
return checkTypes;
|
|
1523
1615
|
}
|
|
1616
|
+
__name(coerceAndCheckDataType, "coerceAndCheckDataType");
|
|
1524
1617
|
exports.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
1525
1618
|
var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
1526
1619
|
function coerceToTypes(types, coerceTypes) {
|
|
1527
1620
|
return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
1528
1621
|
}
|
|
1622
|
+
__name(coerceToTypes, "coerceToTypes");
|
|
1529
1623
|
function coerceData(it, types, coerceTo) {
|
|
1530
1624
|
const { gen, data, opts } = it;
|
|
1531
1625
|
const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
|
|
@@ -1571,10 +1665,13 @@ var require_dataType = __commonJS({
|
|
|
1571
1665
|
|| ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);
|
|
1572
1666
|
}
|
|
1573
1667
|
}
|
|
1668
|
+
__name(coerceSpecificType, "coerceSpecificType");
|
|
1574
1669
|
}
|
|
1670
|
+
__name(coerceData, "coerceData");
|
|
1575
1671
|
function assignParentData({ gen, parentData, parentDataProperty }, expr) {
|
|
1576
1672
|
gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
|
|
1577
1673
|
}
|
|
1674
|
+
__name(assignParentData, "assignParentData");
|
|
1578
1675
|
function checkDataType(dataType, data, strictNums, correct = DataType.Correct) {
|
|
1579
1676
|
const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
|
|
1580
1677
|
let cond;
|
|
@@ -1600,7 +1697,9 @@ var require_dataType = __commonJS({
|
|
|
1600
1697
|
function numCond(_cond = codegen_1.nil) {
|
|
1601
1698
|
return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
|
|
1602
1699
|
}
|
|
1700
|
+
__name(numCond, "numCond");
|
|
1603
1701
|
}
|
|
1702
|
+
__name(checkDataType, "checkDataType");
|
|
1604
1703
|
exports.checkDataType = checkDataType;
|
|
1605
1704
|
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
1606
1705
|
if (dataTypes.length === 1) {
|
|
@@ -1623,6 +1722,7 @@ var require_dataType = __commonJS({
|
|
|
1623
1722
|
cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
|
|
1624
1723
|
return cond;
|
|
1625
1724
|
}
|
|
1725
|
+
__name(checkDataTypes, "checkDataTypes");
|
|
1626
1726
|
exports.checkDataTypes = checkDataTypes;
|
|
1627
1727
|
var typeError = {
|
|
1628
1728
|
message: ({ schema }) => `must be ${schema}`,
|
|
@@ -1632,6 +1732,7 @@ var require_dataType = __commonJS({
|
|
|
1632
1732
|
const cxt = getTypeErrorContext(it);
|
|
1633
1733
|
(0, errors_1.reportError)(cxt, typeError);
|
|
1634
1734
|
}
|
|
1735
|
+
__name(reportTypeError, "reportTypeError");
|
|
1635
1736
|
exports.reportTypeError = reportTypeError;
|
|
1636
1737
|
function getTypeErrorContext(it) {
|
|
1637
1738
|
const { gen, data, schema } = it;
|
|
@@ -1648,6 +1749,7 @@ var require_dataType = __commonJS({
|
|
|
1648
1749
|
it
|
|
1649
1750
|
};
|
|
1650
1751
|
}
|
|
1752
|
+
__name(getTypeErrorContext, "getTypeErrorContext");
|
|
1651
1753
|
}
|
|
1652
1754
|
});
|
|
1653
1755
|
|
|
@@ -1669,6 +1771,7 @@ var require_defaults = __commonJS({
|
|
|
1669
1771
|
items.forEach((sch, i) => assignDefault(it, i, sch.default));
|
|
1670
1772
|
}
|
|
1671
1773
|
}
|
|
1774
|
+
__name(assignDefaults, "assignDefaults");
|
|
1672
1775
|
exports.assignDefaults = assignDefaults;
|
|
1673
1776
|
function assignDefault(it, prop, defaultValue) {
|
|
1674
1777
|
const { gen, compositeRule, data, opts } = it;
|
|
@@ -1685,6 +1788,7 @@ var require_defaults = __commonJS({
|
|
|
1685
1788
|
}
|
|
1686
1789
|
gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
|
|
1687
1790
|
}
|
|
1791
|
+
__name(assignDefault, "assignDefault");
|
|
1688
1792
|
}
|
|
1689
1793
|
});
|
|
1690
1794
|
|
|
@@ -1705,15 +1809,18 @@ var require_code2 = __commonJS({
|
|
|
1705
1809
|
cxt.error();
|
|
1706
1810
|
});
|
|
1707
1811
|
}
|
|
1812
|
+
__name(checkReportMissingProp, "checkReportMissingProp");
|
|
1708
1813
|
exports.checkReportMissingProp = checkReportMissingProp;
|
|
1709
1814
|
function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
|
|
1710
1815
|
return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
|
|
1711
1816
|
}
|
|
1817
|
+
__name(checkMissingProp, "checkMissingProp");
|
|
1712
1818
|
exports.checkMissingProp = checkMissingProp;
|
|
1713
1819
|
function reportMissingProp(cxt, missing) {
|
|
1714
1820
|
cxt.setParams({ missingProperty: missing }, true);
|
|
1715
1821
|
cxt.error();
|
|
1716
1822
|
}
|
|
1823
|
+
__name(reportMissingProp, "reportMissingProp");
|
|
1717
1824
|
exports.reportMissingProp = reportMissingProp;
|
|
1718
1825
|
function hasPropFunc(gen) {
|
|
1719
1826
|
return gen.scopeValue("func", {
|
|
@@ -1722,28 +1829,34 @@ var require_code2 = __commonJS({
|
|
|
1722
1829
|
code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
|
|
1723
1830
|
});
|
|
1724
1831
|
}
|
|
1832
|
+
__name(hasPropFunc, "hasPropFunc");
|
|
1725
1833
|
exports.hasPropFunc = hasPropFunc;
|
|
1726
1834
|
function isOwnProperty(gen, data, property) {
|
|
1727
1835
|
return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;
|
|
1728
1836
|
}
|
|
1837
|
+
__name(isOwnProperty, "isOwnProperty");
|
|
1729
1838
|
exports.isOwnProperty = isOwnProperty;
|
|
1730
1839
|
function propertyInData(gen, data, property, ownProperties) {
|
|
1731
1840
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;
|
|
1732
1841
|
return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;
|
|
1733
1842
|
}
|
|
1843
|
+
__name(propertyInData, "propertyInData");
|
|
1734
1844
|
exports.propertyInData = propertyInData;
|
|
1735
1845
|
function noPropertyInData(gen, data, property, ownProperties) {
|
|
1736
1846
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;
|
|
1737
1847
|
return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;
|
|
1738
1848
|
}
|
|
1849
|
+
__name(noPropertyInData, "noPropertyInData");
|
|
1739
1850
|
exports.noPropertyInData = noPropertyInData;
|
|
1740
1851
|
function allSchemaProperties(schemaMap) {
|
|
1741
1852
|
return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
|
|
1742
1853
|
}
|
|
1854
|
+
__name(allSchemaProperties, "allSchemaProperties");
|
|
1743
1855
|
exports.allSchemaProperties = allSchemaProperties;
|
|
1744
1856
|
function schemaProperties(it, schemaMap) {
|
|
1745
1857
|
return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
|
|
1746
1858
|
}
|
|
1859
|
+
__name(schemaProperties, "schemaProperties");
|
|
1747
1860
|
exports.schemaProperties = schemaProperties;
|
|
1748
1861
|
function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
|
|
1749
1862
|
const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
|
|
@@ -1758,6 +1871,7 @@ var require_code2 = __commonJS({
|
|
|
1758
1871
|
const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
|
|
1759
1872
|
return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;
|
|
1760
1873
|
}
|
|
1874
|
+
__name(callValidateCode, "callValidateCode");
|
|
1761
1875
|
exports.callValidateCode = callValidateCode;
|
|
1762
1876
|
var newRegExp = (0, codegen_1._)`new RegExp`;
|
|
1763
1877
|
function usePattern({ gen, it: { opts } }, pattern) {
|
|
@@ -1770,6 +1884,7 @@ var require_code2 = __commonJS({
|
|
|
1770
1884
|
code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
|
|
1771
1885
|
});
|
|
1772
1886
|
}
|
|
1887
|
+
__name(usePattern, "usePattern");
|
|
1773
1888
|
exports.usePattern = usePattern;
|
|
1774
1889
|
function validateArray(cxt) {
|
|
1775
1890
|
const { gen, data, keyword, it } = cxt;
|
|
@@ -1793,7 +1908,9 @@ var require_code2 = __commonJS({
|
|
|
1793
1908
|
gen.if((0, codegen_1.not)(valid), notValid);
|
|
1794
1909
|
});
|
|
1795
1910
|
}
|
|
1911
|
+
__name(validateItems, "validateItems");
|
|
1796
1912
|
}
|
|
1913
|
+
__name(validateArray, "validateArray");
|
|
1797
1914
|
exports.validateArray = validateArray;
|
|
1798
1915
|
function validateUnion(cxt) {
|
|
1799
1916
|
const { gen, schema, keyword, it } = cxt;
|
|
@@ -1817,6 +1934,7 @@ var require_code2 = __commonJS({
|
|
|
1817
1934
|
}));
|
|
1818
1935
|
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
1819
1936
|
}
|
|
1937
|
+
__name(validateUnion, "validateUnion");
|
|
1820
1938
|
exports.validateUnion = validateUnion;
|
|
1821
1939
|
}
|
|
1822
1940
|
});
|
|
@@ -1847,6 +1965,7 @@ var require_keyword = __commonJS({
|
|
|
1847
1965
|
}, valid);
|
|
1848
1966
|
cxt.pass(valid, () => cxt.error(true));
|
|
1849
1967
|
}
|
|
1968
|
+
__name(macroKeywordCode, "macroKeywordCode");
|
|
1850
1969
|
exports.macroKeywordCode = macroKeywordCode;
|
|
1851
1970
|
function funcKeywordCode(cxt, def) {
|
|
1852
1971
|
var _a;
|
|
@@ -1870,32 +1989,39 @@ var require_keyword = __commonJS({
|
|
|
1870
1989
|
reportErrs(() => addErrs(cxt, ruleErrs));
|
|
1871
1990
|
}
|
|
1872
1991
|
}
|
|
1992
|
+
__name(validateKeyword, "validateKeyword");
|
|
1873
1993
|
function validateAsync() {
|
|
1874
1994
|
const ruleErrs = gen.let("ruleErrs", null);
|
|
1875
1995
|
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
1876
1996
|
return ruleErrs;
|
|
1877
1997
|
}
|
|
1998
|
+
__name(validateAsync, "validateAsync");
|
|
1878
1999
|
function validateSync() {
|
|
1879
2000
|
const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
|
|
1880
2001
|
gen.assign(validateErrs, null);
|
|
1881
2002
|
assignValid(codegen_1.nil);
|
|
1882
2003
|
return validateErrs;
|
|
1883
2004
|
}
|
|
2005
|
+
__name(validateSync, "validateSync");
|
|
1884
2006
|
function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
|
|
1885
2007
|
const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
|
|
1886
2008
|
const passSchema = !("compile" in def && !$data || def.schema === false);
|
|
1887
2009
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1888
2010
|
}
|
|
2011
|
+
__name(assignValid, "assignValid");
|
|
1889
2012
|
function reportErrs(errors) {
|
|
1890
2013
|
var _a2;
|
|
1891
2014
|
gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors);
|
|
1892
2015
|
}
|
|
2016
|
+
__name(reportErrs, "reportErrs");
|
|
1893
2017
|
}
|
|
2018
|
+
__name(funcKeywordCode, "funcKeywordCode");
|
|
1894
2019
|
exports.funcKeywordCode = funcKeywordCode;
|
|
1895
2020
|
function modifyData(cxt) {
|
|
1896
2021
|
const { gen, data, it } = cxt;
|
|
1897
2022
|
gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
|
|
1898
2023
|
}
|
|
2024
|
+
__name(modifyData, "modifyData");
|
|
1899
2025
|
function addErrs(cxt, errs) {
|
|
1900
2026
|
const { gen } = cxt;
|
|
1901
2027
|
gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
|
|
@@ -1903,18 +2029,22 @@ var require_keyword = __commonJS({
|
|
|
1903
2029
|
(0, errors_1.extendErrors)(cxt);
|
|
1904
2030
|
}, () => cxt.error());
|
|
1905
2031
|
}
|
|
2032
|
+
__name(addErrs, "addErrs");
|
|
1906
2033
|
function checkAsyncKeyword({ schemaEnv }, def) {
|
|
1907
2034
|
if (def.async && !schemaEnv.$async)
|
|
1908
2035
|
throw new Error("async keyword in sync schema");
|
|
1909
2036
|
}
|
|
2037
|
+
__name(checkAsyncKeyword, "checkAsyncKeyword");
|
|
1910
2038
|
function useKeyword(gen, keyword, result) {
|
|
1911
2039
|
if (result === void 0)
|
|
1912
2040
|
throw new Error(`keyword "${keyword}" failed to compile`);
|
|
1913
2041
|
return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
|
|
1914
2042
|
}
|
|
2043
|
+
__name(useKeyword, "useKeyword");
|
|
1915
2044
|
function validSchemaType(schema, schemaType, allowUndefined = false) {
|
|
1916
2045
|
return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
|
|
1917
2046
|
}
|
|
2047
|
+
__name(validSchemaType, "validSchemaType");
|
|
1918
2048
|
exports.validSchemaType = validSchemaType;
|
|
1919
2049
|
function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def, keyword) {
|
|
1920
2050
|
if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
|
|
@@ -1935,6 +2065,7 @@ var require_keyword = __commonJS({
|
|
|
1935
2065
|
}
|
|
1936
2066
|
}
|
|
1937
2067
|
}
|
|
2068
|
+
__name(validateKeywordUsage, "validateKeywordUsage");
|
|
1938
2069
|
exports.validateKeywordUsage = validateKeywordUsage;
|
|
1939
2070
|
}
|
|
1940
2071
|
});
|
|
@@ -1976,6 +2107,7 @@ var require_subschema = __commonJS({
|
|
|
1976
2107
|
}
|
|
1977
2108
|
throw new Error('either "keyword" or "schema" must be passed');
|
|
1978
2109
|
}
|
|
2110
|
+
__name(getSubschema, "getSubschema");
|
|
1979
2111
|
exports.getSubschema = getSubschema;
|
|
1980
2112
|
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
|
|
1981
2113
|
if (data !== void 0 && dataProp !== void 0) {
|
|
@@ -2006,7 +2138,9 @@ var require_subschema = __commonJS({
|
|
|
2006
2138
|
subschema.parentData = it.data;
|
|
2007
2139
|
subschema.dataNames = [...it.dataNames, _nextData];
|
|
2008
2140
|
}
|
|
2141
|
+
__name(dataContextProps, "dataContextProps");
|
|
2009
2142
|
}
|
|
2143
|
+
__name(extendSubschemaData, "extendSubschemaData");
|
|
2010
2144
|
exports.extendSubschemaData = extendSubschemaData;
|
|
2011
2145
|
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
|
|
2012
2146
|
if (compositeRule !== void 0)
|
|
@@ -2018,6 +2152,7 @@ var require_subschema = __commonJS({
|
|
|
2018
2152
|
subschema.jtdDiscriminator = jtdDiscriminator;
|
|
2019
2153
|
subschema.jtdMetadata = jtdMetadata;
|
|
2020
2154
|
}
|
|
2155
|
+
__name(extendSubschemaMode, "extendSubschemaMode");
|
|
2021
2156
|
exports.extendSubschemaMode = extendSubschemaMode;
|
|
2022
2157
|
}
|
|
2023
2158
|
});
|
|
@@ -2026,7 +2161,7 @@ var require_subschema = __commonJS({
|
|
|
2026
2161
|
var require_fast_deep_equal = __commonJS({
|
|
2027
2162
|
"node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
2028
2163
|
"use strict";
|
|
2029
|
-
module.exports = function equal(a, b) {
|
|
2164
|
+
module.exports = /* @__PURE__ */ __name(function equal(a, b) {
|
|
2030
2165
|
if (a === b)
|
|
2031
2166
|
return true;
|
|
2032
2167
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
@@ -2063,7 +2198,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
2063
2198
|
return true;
|
|
2064
2199
|
}
|
|
2065
2200
|
return a !== a && b !== b;
|
|
2066
|
-
};
|
|
2201
|
+
}, "equal");
|
|
2067
2202
|
}
|
|
2068
2203
|
});
|
|
2069
2204
|
|
|
@@ -2149,9 +2284,11 @@ var require_json_schema_traverse = __commonJS({
|
|
|
2149
2284
|
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
2150
2285
|
}
|
|
2151
2286
|
}
|
|
2287
|
+
__name(_traverse, "_traverse");
|
|
2152
2288
|
function escapeJsonPtr(str) {
|
|
2153
2289
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2154
2290
|
}
|
|
2291
|
+
__name(escapeJsonPtr, "escapeJsonPtr");
|
|
2155
2292
|
}
|
|
2156
2293
|
});
|
|
2157
2294
|
|
|
@@ -2191,6 +2328,7 @@ var require_resolve = __commonJS({
|
|
|
2191
2328
|
return false;
|
|
2192
2329
|
return countKeys(schema) <= limit;
|
|
2193
2330
|
}
|
|
2331
|
+
__name(inlineRef, "inlineRef");
|
|
2194
2332
|
exports.inlineRef = inlineRef;
|
|
2195
2333
|
var REF_KEYWORDS = /* @__PURE__ */ new Set([
|
|
2196
2334
|
"$ref",
|
|
@@ -2211,6 +2349,7 @@ var require_resolve = __commonJS({
|
|
|
2211
2349
|
}
|
|
2212
2350
|
return false;
|
|
2213
2351
|
}
|
|
2352
|
+
__name(hasRef, "hasRef");
|
|
2214
2353
|
function countKeys(schema) {
|
|
2215
2354
|
let count = 0;
|
|
2216
2355
|
for (const key in schema) {
|
|
@@ -2227,27 +2366,32 @@ var require_resolve = __commonJS({
|
|
|
2227
2366
|
}
|
|
2228
2367
|
return count;
|
|
2229
2368
|
}
|
|
2369
|
+
__name(countKeys, "countKeys");
|
|
2230
2370
|
function getFullPath(resolver, id = "", normalize) {
|
|
2231
2371
|
if (normalize !== false)
|
|
2232
2372
|
id = normalizeId(id);
|
|
2233
2373
|
const p = resolver.parse(id);
|
|
2234
2374
|
return _getFullPath(resolver, p);
|
|
2235
2375
|
}
|
|
2376
|
+
__name(getFullPath, "getFullPath");
|
|
2236
2377
|
exports.getFullPath = getFullPath;
|
|
2237
2378
|
function _getFullPath(resolver, p) {
|
|
2238
2379
|
const serialized = resolver.serialize(p);
|
|
2239
2380
|
return serialized.split("#")[0] + "#";
|
|
2240
2381
|
}
|
|
2382
|
+
__name(_getFullPath, "_getFullPath");
|
|
2241
2383
|
exports._getFullPath = _getFullPath;
|
|
2242
2384
|
var TRAILING_SLASH_HASH = /#\/?$/;
|
|
2243
2385
|
function normalizeId(id) {
|
|
2244
2386
|
return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
|
|
2245
2387
|
}
|
|
2388
|
+
__name(normalizeId, "normalizeId");
|
|
2246
2389
|
exports.normalizeId = normalizeId;
|
|
2247
2390
|
function resolveUrl(resolver, baseId, id) {
|
|
2248
2391
|
id = normalizeId(id);
|
|
2249
2392
|
return resolver.resolve(baseId, id);
|
|
2250
2393
|
}
|
|
2394
|
+
__name(resolveUrl, "resolveUrl");
|
|
2251
2395
|
exports.resolveUrl = resolveUrl;
|
|
2252
2396
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
2253
2397
|
function getSchemaRefs(schema, baseId) {
|
|
@@ -2290,6 +2434,7 @@ var require_resolve = __commonJS({
|
|
|
2290
2434
|
}
|
|
2291
2435
|
return ref;
|
|
2292
2436
|
}
|
|
2437
|
+
__name(addRef, "addRef");
|
|
2293
2438
|
function addAnchor(anchor) {
|
|
2294
2439
|
if (typeof anchor == "string") {
|
|
2295
2440
|
if (!ANCHOR.test(anchor))
|
|
@@ -2297,16 +2442,20 @@ var require_resolve = __commonJS({
|
|
|
2297
2442
|
addRef.call(this, `#${anchor}`);
|
|
2298
2443
|
}
|
|
2299
2444
|
}
|
|
2445
|
+
__name(addAnchor, "addAnchor");
|
|
2300
2446
|
});
|
|
2301
2447
|
return localRefs;
|
|
2302
2448
|
function checkAmbiguosRef(sch1, sch2, ref) {
|
|
2303
2449
|
if (sch2 !== void 0 && !equal(sch1, sch2))
|
|
2304
2450
|
throw ambiguos(ref);
|
|
2305
2451
|
}
|
|
2452
|
+
__name(checkAmbiguosRef, "checkAmbiguosRef");
|
|
2306
2453
|
function ambiguos(ref) {
|
|
2307
2454
|
return new Error(`reference "${ref}" resolves to more than one schema`);
|
|
2308
2455
|
}
|
|
2456
|
+
__name(ambiguos, "ambiguos");
|
|
2309
2457
|
}
|
|
2458
|
+
__name(getSchemaRefs, "getSchemaRefs");
|
|
2310
2459
|
exports.getSchemaRefs = getSchemaRefs;
|
|
2311
2460
|
}
|
|
2312
2461
|
});
|
|
@@ -2339,6 +2488,7 @@ var require_validate = __commonJS({
|
|
|
2339
2488
|
}
|
|
2340
2489
|
validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
|
|
2341
2490
|
}
|
|
2491
|
+
__name(validateFunctionCode, "validateFunctionCode");
|
|
2342
2492
|
exports.validateFunctionCode = validateFunctionCode;
|
|
2343
2493
|
function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
|
|
2344
2494
|
if (opts.code.es5) {
|
|
@@ -2351,9 +2501,11 @@ var require_validate = __commonJS({
|
|
|
2351
2501
|
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
|
|
2352
2502
|
}
|
|
2353
2503
|
}
|
|
2504
|
+
__name(validateFunction, "validateFunction");
|
|
2354
2505
|
function destructureValCxt(opts) {
|
|
2355
2506
|
return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
|
|
2356
2507
|
}
|
|
2508
|
+
__name(destructureValCxt, "destructureValCxt");
|
|
2357
2509
|
function destructureValCxtES5(gen, opts) {
|
|
2358
2510
|
gen.if(names_1.default.valCxt, () => {
|
|
2359
2511
|
gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
|
|
@@ -2371,6 +2523,7 @@ var require_validate = __commonJS({
|
|
|
2371
2523
|
gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
|
|
2372
2524
|
});
|
|
2373
2525
|
}
|
|
2526
|
+
__name(destructureValCxtES5, "destructureValCxtES5");
|
|
2374
2527
|
function topSchemaObjCode(it) {
|
|
2375
2528
|
const { schema, opts, gen } = it;
|
|
2376
2529
|
validateFunction(it, () => {
|
|
@@ -2386,16 +2539,19 @@ var require_validate = __commonJS({
|
|
|
2386
2539
|
});
|
|
2387
2540
|
return;
|
|
2388
2541
|
}
|
|
2542
|
+
__name(topSchemaObjCode, "topSchemaObjCode");
|
|
2389
2543
|
function resetEvaluated(it) {
|
|
2390
2544
|
const { gen, validateName } = it;
|
|
2391
2545
|
it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
|
|
2392
2546
|
gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
|
|
2393
2547
|
gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
|
|
2394
2548
|
}
|
|
2549
|
+
__name(resetEvaluated, "resetEvaluated");
|
|
2395
2550
|
function funcSourceUrl(schema, opts) {
|
|
2396
2551
|
const schId = typeof schema == "object" && schema[opts.schemaId];
|
|
2397
2552
|
return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
|
|
2398
2553
|
}
|
|
2554
|
+
__name(funcSourceUrl, "funcSourceUrl");
|
|
2399
2555
|
function subschemaCode(it, valid) {
|
|
2400
2556
|
if (isSchemaObj(it)) {
|
|
2401
2557
|
checkKeywords(it);
|
|
@@ -2406,6 +2562,7 @@ var require_validate = __commonJS({
|
|
|
2406
2562
|
}
|
|
2407
2563
|
(0, boolSchema_1.boolOrEmptySchema)(it, valid);
|
|
2408
2564
|
}
|
|
2565
|
+
__name(subschemaCode, "subschemaCode");
|
|
2409
2566
|
function schemaCxtHasRules({ schema, self: self2 }) {
|
|
2410
2567
|
if (typeof schema == "boolean")
|
|
2411
2568
|
return !schema;
|
|
@@ -2414,9 +2571,11 @@ var require_validate = __commonJS({
|
|
|
2414
2571
|
return true;
|
|
2415
2572
|
return false;
|
|
2416
2573
|
}
|
|
2574
|
+
__name(schemaCxtHasRules, "schemaCxtHasRules");
|
|
2417
2575
|
function isSchemaObj(it) {
|
|
2418
2576
|
return typeof it.schema != "boolean";
|
|
2419
2577
|
}
|
|
2578
|
+
__name(isSchemaObj, "isSchemaObj");
|
|
2420
2579
|
function subSchemaObjCode(it, valid) {
|
|
2421
2580
|
const { schema, gen, opts } = it;
|
|
2422
2581
|
if (opts.$comment && schema.$comment)
|
|
@@ -2427,10 +2586,12 @@ var require_validate = __commonJS({
|
|
|
2427
2586
|
typeAndKeywords(it, errsCount);
|
|
2428
2587
|
gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
2429
2588
|
}
|
|
2589
|
+
__name(subSchemaObjCode, "subSchemaObjCode");
|
|
2430
2590
|
function checkKeywords(it) {
|
|
2431
2591
|
(0, util_1.checkUnknownRules)(it);
|
|
2432
2592
|
checkRefsAndKeywords(it);
|
|
2433
2593
|
}
|
|
2594
|
+
__name(checkKeywords, "checkKeywords");
|
|
2434
2595
|
function typeAndKeywords(it, errsCount) {
|
|
2435
2596
|
if (it.opts.jtd)
|
|
2436
2597
|
return schemaKeywords(it, [], false, errsCount);
|
|
@@ -2438,27 +2599,32 @@ var require_validate = __commonJS({
|
|
|
2438
2599
|
const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);
|
|
2439
2600
|
schemaKeywords(it, types, !checkedTypes, errsCount);
|
|
2440
2601
|
}
|
|
2602
|
+
__name(typeAndKeywords, "typeAndKeywords");
|
|
2441
2603
|
function checkRefsAndKeywords(it) {
|
|
2442
2604
|
const { schema, errSchemaPath, opts, self: self2 } = it;
|
|
2443
2605
|
if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self2.RULES)) {
|
|
2444
2606
|
self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
|
|
2445
2607
|
}
|
|
2446
2608
|
}
|
|
2609
|
+
__name(checkRefsAndKeywords, "checkRefsAndKeywords");
|
|
2447
2610
|
function checkNoDefault(it) {
|
|
2448
2611
|
const { schema, opts } = it;
|
|
2449
2612
|
if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
|
|
2450
2613
|
(0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
|
|
2451
2614
|
}
|
|
2452
2615
|
}
|
|
2616
|
+
__name(checkNoDefault, "checkNoDefault");
|
|
2453
2617
|
function updateContext(it) {
|
|
2454
2618
|
const schId = it.schema[it.opts.schemaId];
|
|
2455
2619
|
if (schId)
|
|
2456
2620
|
it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
|
|
2457
2621
|
}
|
|
2622
|
+
__name(updateContext, "updateContext");
|
|
2458
2623
|
function checkAsyncSchema(it) {
|
|
2459
2624
|
if (it.schema.$async && !it.schemaEnv.$async)
|
|
2460
2625
|
throw new Error("async schema in sync schema");
|
|
2461
2626
|
}
|
|
2627
|
+
__name(checkAsyncSchema, "checkAsyncSchema");
|
|
2462
2628
|
function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
|
|
2463
2629
|
const msg = schema.$comment;
|
|
2464
2630
|
if (opts.$comment === true) {
|
|
@@ -2469,6 +2635,7 @@ var require_validate = __commonJS({
|
|
|
2469
2635
|
gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
|
|
2470
2636
|
}
|
|
2471
2637
|
}
|
|
2638
|
+
__name(commentKeyword, "commentKeyword");
|
|
2472
2639
|
function returnResults(it) {
|
|
2473
2640
|
const { gen, schemaEnv, validateName, ValidationError, opts } = it;
|
|
2474
2641
|
if (schemaEnv.$async) {
|
|
@@ -2480,12 +2647,14 @@ var require_validate = __commonJS({
|
|
|
2480
2647
|
gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
|
|
2481
2648
|
}
|
|
2482
2649
|
}
|
|
2650
|
+
__name(returnResults, "returnResults");
|
|
2483
2651
|
function assignEvaluated({ gen, evaluated, props, items }) {
|
|
2484
2652
|
if (props instanceof codegen_1.Name)
|
|
2485
2653
|
gen.assign((0, codegen_1._)`${evaluated}.props`, props);
|
|
2486
2654
|
if (items instanceof codegen_1.Name)
|
|
2487
2655
|
gen.assign((0, codegen_1._)`${evaluated}.items`, items);
|
|
2488
2656
|
}
|
|
2657
|
+
__name(assignEvaluated, "assignEvaluated");
|
|
2489
2658
|
function schemaKeywords(it, types, typeErrors, errsCount) {
|
|
2490
2659
|
const { gen, schema, data, allErrors, opts, self: self2 } = it;
|
|
2491
2660
|
const { RULES } = self2;
|
|
@@ -2517,7 +2686,9 @@ var require_validate = __commonJS({
|
|
|
2517
2686
|
if (!allErrors)
|
|
2518
2687
|
gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
|
|
2519
2688
|
}
|
|
2689
|
+
__name(groupKeywords, "groupKeywords");
|
|
2520
2690
|
}
|
|
2691
|
+
__name(schemaKeywords, "schemaKeywords");
|
|
2521
2692
|
function iterateKeywords(it, group) {
|
|
2522
2693
|
const { gen, schema, opts: { useDefaults } } = it;
|
|
2523
2694
|
if (useDefaults)
|
|
@@ -2530,6 +2701,7 @@ var require_validate = __commonJS({
|
|
|
2530
2701
|
}
|
|
2531
2702
|
});
|
|
2532
2703
|
}
|
|
2704
|
+
__name(iterateKeywords, "iterateKeywords");
|
|
2533
2705
|
function checkStrictTypes(it, types) {
|
|
2534
2706
|
if (it.schemaEnv.meta || !it.opts.strictTypes)
|
|
2535
2707
|
return;
|
|
@@ -2538,6 +2710,7 @@ var require_validate = __commonJS({
|
|
|
2538
2710
|
checkMultipleTypes(it, types);
|
|
2539
2711
|
checkKeywordTypes(it, it.dataTypes);
|
|
2540
2712
|
}
|
|
2713
|
+
__name(checkStrictTypes, "checkStrictTypes");
|
|
2541
2714
|
function checkContextTypes(it, types) {
|
|
2542
2715
|
if (!types.length)
|
|
2543
2716
|
return;
|
|
@@ -2550,13 +2723,15 @@ var require_validate = __commonJS({
|
|
|
2550
2723
|
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
|
|
2551
2724
|
}
|
|
2552
2725
|
});
|
|
2553
|
-
it
|
|
2726
|
+
narrowSchemaTypes(it, types);
|
|
2554
2727
|
}
|
|
2728
|
+
__name(checkContextTypes, "checkContextTypes");
|
|
2555
2729
|
function checkMultipleTypes(it, ts) {
|
|
2556
2730
|
if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
|
|
2557
2731
|
strictTypesError(it, "use allowUnionTypes to allow union type keyword");
|
|
2558
2732
|
}
|
|
2559
2733
|
}
|
|
2734
|
+
__name(checkMultipleTypes, "checkMultipleTypes");
|
|
2560
2735
|
function checkKeywordTypes(it, ts) {
|
|
2561
2736
|
const rules = it.self.RULES.all;
|
|
2562
2737
|
for (const keyword in rules) {
|
|
@@ -2569,17 +2744,32 @@ var require_validate = __commonJS({
|
|
|
2569
2744
|
}
|
|
2570
2745
|
}
|
|
2571
2746
|
}
|
|
2747
|
+
__name(checkKeywordTypes, "checkKeywordTypes");
|
|
2572
2748
|
function hasApplicableType(schTs, kwdT) {
|
|
2573
2749
|
return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
|
|
2574
2750
|
}
|
|
2751
|
+
__name(hasApplicableType, "hasApplicableType");
|
|
2575
2752
|
function includesType(ts, t) {
|
|
2576
2753
|
return ts.includes(t) || t === "integer" && ts.includes("number");
|
|
2577
2754
|
}
|
|
2755
|
+
__name(includesType, "includesType");
|
|
2756
|
+
function narrowSchemaTypes(it, withTypes) {
|
|
2757
|
+
const ts = [];
|
|
2758
|
+
for (const t of it.dataTypes) {
|
|
2759
|
+
if (includesType(withTypes, t))
|
|
2760
|
+
ts.push(t);
|
|
2761
|
+
else if (withTypes.includes("integer") && t === "number")
|
|
2762
|
+
ts.push("integer");
|
|
2763
|
+
}
|
|
2764
|
+
it.dataTypes = ts;
|
|
2765
|
+
}
|
|
2766
|
+
__name(narrowSchemaTypes, "narrowSchemaTypes");
|
|
2578
2767
|
function strictTypesError(it, msg) {
|
|
2579
2768
|
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
|
|
2580
2769
|
msg += ` at "${schemaPath}" (strictTypes)`;
|
|
2581
2770
|
(0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
|
|
2582
2771
|
}
|
|
2772
|
+
__name(strictTypesError, "strictTypesError");
|
|
2583
2773
|
var KeywordCxt = class {
|
|
2584
2774
|
constructor(it, def, keyword) {
|
|
2585
2775
|
(0, keyword_1.validateKeywordUsage)(it, def, keyword);
|
|
@@ -2715,6 +2905,7 @@ var require_validate = __commonJS({
|
|
|
2715
2905
|
}
|
|
2716
2906
|
return codegen_1.nil;
|
|
2717
2907
|
}
|
|
2908
|
+
__name(wrong$DataType, "wrong$DataType");
|
|
2718
2909
|
function invalid$DataSchema() {
|
|
2719
2910
|
if (def.validateSchema) {
|
|
2720
2911
|
const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema });
|
|
@@ -2722,6 +2913,7 @@ var require_validate = __commonJS({
|
|
|
2722
2913
|
}
|
|
2723
2914
|
return codegen_1.nil;
|
|
2724
2915
|
}
|
|
2916
|
+
__name(invalid$DataSchema, "invalid$DataSchema");
|
|
2725
2917
|
}
|
|
2726
2918
|
subschema(appl, valid) {
|
|
2727
2919
|
const subschema = (0, subschema_1.getSubschema)(this.it, appl);
|
|
@@ -2750,6 +2942,7 @@ var require_validate = __commonJS({
|
|
|
2750
2942
|
}
|
|
2751
2943
|
}
|
|
2752
2944
|
};
|
|
2945
|
+
__name(KeywordCxt, "KeywordCxt");
|
|
2753
2946
|
exports.KeywordCxt = KeywordCxt;
|
|
2754
2947
|
function keywordCode(it, keyword, def, ruleType) {
|
|
2755
2948
|
const cxt = new KeywordCxt(it, def, keyword);
|
|
@@ -2763,6 +2956,7 @@ var require_validate = __commonJS({
|
|
|
2763
2956
|
(0, keyword_1.funcKeywordCode)(cxt, def);
|
|
2764
2957
|
}
|
|
2765
2958
|
}
|
|
2959
|
+
__name(keywordCode, "keywordCode");
|
|
2766
2960
|
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
|
|
2767
2961
|
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
2768
2962
|
function getData($data, { dataLevel, dataNames, dataPathArr }) {
|
|
@@ -2804,7 +2998,9 @@ var require_validate = __commonJS({
|
|
|
2804
2998
|
function errorMsg(pointerType, up) {
|
|
2805
2999
|
return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
|
|
2806
3000
|
}
|
|
3001
|
+
__name(errorMsg, "errorMsg");
|
|
2807
3002
|
}
|
|
3003
|
+
__name(getData, "getData");
|
|
2808
3004
|
exports.getData = getData;
|
|
2809
3005
|
}
|
|
2810
3006
|
});
|
|
@@ -2821,6 +3017,7 @@ var require_validation_error = __commonJS({
|
|
|
2821
3017
|
this.ajv = this.validation = true;
|
|
2822
3018
|
}
|
|
2823
3019
|
};
|
|
3020
|
+
__name(ValidationError, "ValidationError");
|
|
2824
3021
|
exports.default = ValidationError;
|
|
2825
3022
|
}
|
|
2826
3023
|
});
|
|
@@ -2838,6 +3035,7 @@ var require_ref_error = __commonJS({
|
|
|
2838
3035
|
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
|
|
2839
3036
|
}
|
|
2840
3037
|
};
|
|
3038
|
+
__name(MissingRefError, "MissingRefError");
|
|
2841
3039
|
exports.default = MissingRefError;
|
|
2842
3040
|
}
|
|
2843
3041
|
});
|
|
@@ -2873,6 +3071,7 @@ var require_compile = __commonJS({
|
|
|
2873
3071
|
this.refs = {};
|
|
2874
3072
|
}
|
|
2875
3073
|
};
|
|
3074
|
+
__name(SchemaEnv, "SchemaEnv");
|
|
2876
3075
|
exports.SchemaEnv = SchemaEnv;
|
|
2877
3076
|
function compileSchema(sch) {
|
|
2878
3077
|
const _sch = getCompilingSchema.call(this, sch);
|
|
@@ -2958,6 +3157,7 @@ var require_compile = __commonJS({
|
|
|
2958
3157
|
this._compilations.delete(sch);
|
|
2959
3158
|
}
|
|
2960
3159
|
}
|
|
3160
|
+
__name(compileSchema, "compileSchema");
|
|
2961
3161
|
exports.compileSchema = compileSchema;
|
|
2962
3162
|
function resolveRef(root, baseId, ref) {
|
|
2963
3163
|
var _a;
|
|
@@ -2976,28 +3176,33 @@ var require_compile = __commonJS({
|
|
|
2976
3176
|
return;
|
|
2977
3177
|
return root.refs[ref] = inlineOrCompile.call(this, _sch);
|
|
2978
3178
|
}
|
|
3179
|
+
__name(resolveRef, "resolveRef");
|
|
2979
3180
|
exports.resolveRef = resolveRef;
|
|
2980
3181
|
function inlineOrCompile(sch) {
|
|
2981
3182
|
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
|
2982
3183
|
return sch.schema;
|
|
2983
3184
|
return sch.validate ? sch : compileSchema.call(this, sch);
|
|
2984
3185
|
}
|
|
3186
|
+
__name(inlineOrCompile, "inlineOrCompile");
|
|
2985
3187
|
function getCompilingSchema(schEnv) {
|
|
2986
3188
|
for (const sch of this._compilations) {
|
|
2987
3189
|
if (sameSchemaEnv(sch, schEnv))
|
|
2988
3190
|
return sch;
|
|
2989
3191
|
}
|
|
2990
3192
|
}
|
|
3193
|
+
__name(getCompilingSchema, "getCompilingSchema");
|
|
2991
3194
|
exports.getCompilingSchema = getCompilingSchema;
|
|
2992
3195
|
function sameSchemaEnv(s1, s2) {
|
|
2993
3196
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
2994
3197
|
}
|
|
3198
|
+
__name(sameSchemaEnv, "sameSchemaEnv");
|
|
2995
3199
|
function resolve(root, ref) {
|
|
2996
3200
|
let sch;
|
|
2997
3201
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
2998
3202
|
ref = sch;
|
|
2999
3203
|
return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
|
|
3000
3204
|
}
|
|
3205
|
+
__name(resolve, "resolve");
|
|
3001
3206
|
function resolveSchema(root, ref) {
|
|
3002
3207
|
const p = this.opts.uriResolver.parse(ref);
|
|
3003
3208
|
const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
|
|
@@ -3027,6 +3232,7 @@ var require_compile = __commonJS({
|
|
|
3027
3232
|
}
|
|
3028
3233
|
return getJsonPointer.call(this, p, schOrRef);
|
|
3029
3234
|
}
|
|
3235
|
+
__name(resolveSchema, "resolveSchema");
|
|
3030
3236
|
exports.resolveSchema = resolveSchema;
|
|
3031
3237
|
var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
|
|
3032
3238
|
"properties",
|
|
@@ -3062,6 +3268,7 @@ var require_compile = __commonJS({
|
|
|
3062
3268
|
return env;
|
|
3063
3269
|
return void 0;
|
|
3064
3270
|
}
|
|
3271
|
+
__name(getJsonPointer, "getJsonPointer");
|
|
3065
3272
|
}
|
|
3066
3273
|
});
|
|
3067
3274
|
|
|
@@ -3107,18 +3314,23 @@ var require_uri_all = __commonJS({
|
|
|
3107
3314
|
return sets[0];
|
|
3108
3315
|
}
|
|
3109
3316
|
}
|
|
3317
|
+
__name(merge, "merge");
|
|
3110
3318
|
function subexp(str) {
|
|
3111
3319
|
return "(?:" + str + ")";
|
|
3112
3320
|
}
|
|
3321
|
+
__name(subexp, "subexp");
|
|
3113
3322
|
function typeOf(o) {
|
|
3114
3323
|
return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
|
|
3115
3324
|
}
|
|
3325
|
+
__name(typeOf, "typeOf");
|
|
3116
3326
|
function toUpperCase(str) {
|
|
3117
3327
|
return str.toUpperCase();
|
|
3118
3328
|
}
|
|
3329
|
+
__name(toUpperCase, "toUpperCase");
|
|
3119
3330
|
function toArray(obj) {
|
|
3120
3331
|
return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
|
|
3121
3332
|
}
|
|
3333
|
+
__name(toArray, "toArray");
|
|
3122
3334
|
function assign(target, source) {
|
|
3123
3335
|
var obj = target;
|
|
3124
3336
|
if (source) {
|
|
@@ -3128,6 +3340,7 @@ var require_uri_all = __commonJS({
|
|
|
3128
3340
|
}
|
|
3129
3341
|
return obj;
|
|
3130
3342
|
}
|
|
3343
|
+
__name(assign, "assign");
|
|
3131
3344
|
function buildExps(isIRI2) {
|
|
3132
3345
|
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
|
3133
3346
|
return {
|
|
@@ -3147,6 +3360,7 @@ var require_uri_all = __commonJS({
|
|
|
3147
3360
|
//RFC 6874, with relaxed parsing rules
|
|
3148
3361
|
};
|
|
3149
3362
|
}
|
|
3363
|
+
__name(buildExps, "buildExps");
|
|
3150
3364
|
var URI_PROTOCOL = buildExps(false);
|
|
3151
3365
|
var IRI_PROTOCOL = buildExps(true);
|
|
3152
3366
|
var slicedToArray = function() {
|
|
@@ -3175,6 +3389,7 @@ var require_uri_all = __commonJS({
|
|
|
3175
3389
|
}
|
|
3176
3390
|
return _arr;
|
|
3177
3391
|
}
|
|
3392
|
+
__name(sliceIterator, "sliceIterator");
|
|
3178
3393
|
return function(arr, i) {
|
|
3179
3394
|
if (Array.isArray(arr)) {
|
|
3180
3395
|
return arr;
|
|
@@ -3185,7 +3400,7 @@ var require_uri_all = __commonJS({
|
|
|
3185
3400
|
}
|
|
3186
3401
|
};
|
|
3187
3402
|
}();
|
|
3188
|
-
var toConsumableArray = function(arr) {
|
|
3403
|
+
var toConsumableArray = /* @__PURE__ */ __name(function(arr) {
|
|
3189
3404
|
if (Array.isArray(arr)) {
|
|
3190
3405
|
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++)
|
|
3191
3406
|
arr2[i] = arr[i];
|
|
@@ -3193,7 +3408,7 @@ var require_uri_all = __commonJS({
|
|
|
3193
3408
|
} else {
|
|
3194
3409
|
return Array.from(arr);
|
|
3195
3410
|
}
|
|
3196
|
-
};
|
|
3411
|
+
}, "toConsumableArray");
|
|
3197
3412
|
var maxInt = 2147483647;
|
|
3198
3413
|
var base = 36;
|
|
3199
3414
|
var tMin = 1;
|
|
@@ -3217,6 +3432,7 @@ var require_uri_all = __commonJS({
|
|
|
3217
3432
|
function error$1(type) {
|
|
3218
3433
|
throw new RangeError(errors[type]);
|
|
3219
3434
|
}
|
|
3435
|
+
__name(error$1, "error$1");
|
|
3220
3436
|
function map(array, fn) {
|
|
3221
3437
|
var result = [];
|
|
3222
3438
|
var length = array.length;
|
|
@@ -3225,6 +3441,7 @@ var require_uri_all = __commonJS({
|
|
|
3225
3441
|
}
|
|
3226
3442
|
return result;
|
|
3227
3443
|
}
|
|
3444
|
+
__name(map, "map");
|
|
3228
3445
|
function mapDomain(string, fn) {
|
|
3229
3446
|
var parts = string.split("@");
|
|
3230
3447
|
var result = "";
|
|
@@ -3237,6 +3454,7 @@ var require_uri_all = __commonJS({
|
|
|
3237
3454
|
var encoded = map(labels, fn).join(".");
|
|
3238
3455
|
return result + encoded;
|
|
3239
3456
|
}
|
|
3457
|
+
__name(mapDomain, "mapDomain");
|
|
3240
3458
|
function ucs2decode(string) {
|
|
3241
3459
|
var output = [];
|
|
3242
3460
|
var counter = 0;
|
|
@@ -3257,10 +3475,11 @@ var require_uri_all = __commonJS({
|
|
|
3257
3475
|
}
|
|
3258
3476
|
return output;
|
|
3259
3477
|
}
|
|
3260
|
-
|
|
3478
|
+
__name(ucs2decode, "ucs2decode");
|
|
3479
|
+
var ucs2encode = /* @__PURE__ */ __name(function ucs2encode2(array) {
|
|
3261
3480
|
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
|
3262
|
-
};
|
|
3263
|
-
var basicToDigit = function basicToDigit2(codePoint) {
|
|
3481
|
+
}, "ucs2encode");
|
|
3482
|
+
var basicToDigit = /* @__PURE__ */ __name(function basicToDigit2(codePoint) {
|
|
3264
3483
|
if (codePoint - 48 < 10) {
|
|
3265
3484
|
return codePoint - 22;
|
|
3266
3485
|
}
|
|
@@ -3271,11 +3490,11 @@ var require_uri_all = __commonJS({
|
|
|
3271
3490
|
return codePoint - 97;
|
|
3272
3491
|
}
|
|
3273
3492
|
return base;
|
|
3274
|
-
};
|
|
3275
|
-
var digitToBasic = function digitToBasic2(digit, flag) {
|
|
3493
|
+
}, "basicToDigit");
|
|
3494
|
+
var digitToBasic = /* @__PURE__ */ __name(function digitToBasic2(digit, flag) {
|
|
3276
3495
|
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
3277
|
-
};
|
|
3278
|
-
var adapt = function adapt2(delta, numPoints, firstTime) {
|
|
3496
|
+
}, "digitToBasic");
|
|
3497
|
+
var adapt = /* @__PURE__ */ __name(function adapt2(delta, numPoints, firstTime) {
|
|
3279
3498
|
var k = 0;
|
|
3280
3499
|
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
3281
3500
|
delta += floor(delta / numPoints);
|
|
@@ -3288,8 +3507,8 @@ var require_uri_all = __commonJS({
|
|
|
3288
3507
|
delta = floor(delta / baseMinusTMin);
|
|
3289
3508
|
}
|
|
3290
3509
|
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
3291
|
-
};
|
|
3292
|
-
var decode = function decode2(input) {
|
|
3510
|
+
}, "adapt");
|
|
3511
|
+
var decode = /* @__PURE__ */ __name(function decode2(input) {
|
|
3293
3512
|
var output = [];
|
|
3294
3513
|
var inputLength = input.length;
|
|
3295
3514
|
var i = 0;
|
|
@@ -3341,8 +3560,8 @@ var require_uri_all = __commonJS({
|
|
|
3341
3560
|
output.splice(i++, 0, n);
|
|
3342
3561
|
}
|
|
3343
3562
|
return String.fromCodePoint.apply(String, output);
|
|
3344
|
-
};
|
|
3345
|
-
var encode = function encode2(input) {
|
|
3563
|
+
}, "decode");
|
|
3564
|
+
var encode = /* @__PURE__ */ __name(function encode2(input) {
|
|
3346
3565
|
var output = [];
|
|
3347
3566
|
input = ucs2decode(input);
|
|
3348
3567
|
var inputLength = input.length;
|
|
@@ -3460,17 +3679,17 @@ var require_uri_all = __commonJS({
|
|
|
3460
3679
|
++n;
|
|
3461
3680
|
}
|
|
3462
3681
|
return output.join("");
|
|
3463
|
-
};
|
|
3464
|
-
var toUnicode = function toUnicode2(input) {
|
|
3682
|
+
}, "encode");
|
|
3683
|
+
var toUnicode = /* @__PURE__ */ __name(function toUnicode2(input) {
|
|
3465
3684
|
return mapDomain(input, function(string) {
|
|
3466
3685
|
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
|
3467
3686
|
});
|
|
3468
|
-
};
|
|
3469
|
-
var toASCII = function toASCII2(input) {
|
|
3687
|
+
}, "toUnicode");
|
|
3688
|
+
var toASCII = /* @__PURE__ */ __name(function toASCII2(input) {
|
|
3470
3689
|
return mapDomain(input, function(string) {
|
|
3471
3690
|
return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
|
|
3472
3691
|
});
|
|
3473
|
-
};
|
|
3692
|
+
}, "toASCII");
|
|
3474
3693
|
var punycode = {
|
|
3475
3694
|
/**
|
|
3476
3695
|
* A string representing the current Punycode.js version number.
|
|
@@ -3508,6 +3727,7 @@ var require_uri_all = __commonJS({
|
|
|
3508
3727
|
e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
3509
3728
|
return e;
|
|
3510
3729
|
}
|
|
3730
|
+
__name(pctEncChar, "pctEncChar");
|
|
3511
3731
|
function pctDecChars(str) {
|
|
3512
3732
|
var newStr = "";
|
|
3513
3733
|
var i = 0;
|
|
@@ -3541,11 +3761,13 @@ var require_uri_all = __commonJS({
|
|
|
3541
3761
|
}
|
|
3542
3762
|
return newStr;
|
|
3543
3763
|
}
|
|
3764
|
+
__name(pctDecChars, "pctDecChars");
|
|
3544
3765
|
function _normalizeComponentEncoding(components, protocol) {
|
|
3545
3766
|
function decodeUnreserved2(str) {
|
|
3546
3767
|
var decStr = pctDecChars(str);
|
|
3547
3768
|
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
3548
3769
|
}
|
|
3770
|
+
__name(decodeUnreserved2, "decodeUnreserved");
|
|
3549
3771
|
if (components.scheme)
|
|
3550
3772
|
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
3551
3773
|
if (components.userinfo !== void 0)
|
|
@@ -3560,9 +3782,11 @@ var require_uri_all = __commonJS({
|
|
|
3560
3782
|
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3561
3783
|
return components;
|
|
3562
3784
|
}
|
|
3785
|
+
__name(_normalizeComponentEncoding, "_normalizeComponentEncoding");
|
|
3563
3786
|
function _stripLeadingZeros(str) {
|
|
3564
3787
|
return str.replace(/^0*(.*)/, "$1") || "0";
|
|
3565
3788
|
}
|
|
3789
|
+
__name(_stripLeadingZeros, "_stripLeadingZeros");
|
|
3566
3790
|
function _normalizeIPv4(host, protocol) {
|
|
3567
3791
|
var matches = host.match(protocol.IPV4ADDRESS) || [];
|
|
3568
3792
|
var _matches = slicedToArray(matches, 2), address = _matches[1];
|
|
@@ -3572,6 +3796,7 @@ var require_uri_all = __commonJS({
|
|
|
3572
3796
|
return host;
|
|
3573
3797
|
}
|
|
3574
3798
|
}
|
|
3799
|
+
__name(_normalizeIPv4, "_normalizeIPv4");
|
|
3575
3800
|
function _normalizeIPv6(host, protocol) {
|
|
3576
3801
|
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
|
3577
3802
|
var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
|
|
@@ -3619,6 +3844,7 @@ var require_uri_all = __commonJS({
|
|
|
3619
3844
|
return host;
|
|
3620
3845
|
}
|
|
3621
3846
|
}
|
|
3847
|
+
__name(_normalizeIPv6, "_normalizeIPv6");
|
|
3622
3848
|
var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
|
|
3623
3849
|
var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
|
|
3624
3850
|
function parse(uriString) {
|
|
@@ -3688,6 +3914,7 @@ var require_uri_all = __commonJS({
|
|
|
3688
3914
|
}
|
|
3689
3915
|
return components;
|
|
3690
3916
|
}
|
|
3917
|
+
__name(parse, "parse");
|
|
3691
3918
|
function _recomposeAuthority(components, options) {
|
|
3692
3919
|
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
3693
3920
|
var uriTokens = [];
|
|
@@ -3706,6 +3933,7 @@ var require_uri_all = __commonJS({
|
|
|
3706
3933
|
}
|
|
3707
3934
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
3708
3935
|
}
|
|
3936
|
+
__name(_recomposeAuthority, "_recomposeAuthority");
|
|
3709
3937
|
var RDS1 = /^\.\.?\//;
|
|
3710
3938
|
var RDS2 = /^\/\.(\/|$)/;
|
|
3711
3939
|
var RDS3 = /^\/\.\.(\/|$)/;
|
|
@@ -3735,6 +3963,7 @@ var require_uri_all = __commonJS({
|
|
|
3735
3963
|
}
|
|
3736
3964
|
return output.join("");
|
|
3737
3965
|
}
|
|
3966
|
+
__name(removeDotSegments, "removeDotSegments");
|
|
3738
3967
|
function serialize(components) {
|
|
3739
3968
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3740
3969
|
var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
@@ -3787,6 +4016,7 @@ var require_uri_all = __commonJS({
|
|
|
3787
4016
|
}
|
|
3788
4017
|
return uriTokens.join("");
|
|
3789
4018
|
}
|
|
4019
|
+
__name(serialize, "serialize");
|
|
3790
4020
|
function resolveComponents(base2, relative) {
|
|
3791
4021
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3792
4022
|
var skipNormalization = arguments[3];
|
|
@@ -3842,10 +4072,12 @@ var require_uri_all = __commonJS({
|
|
|
3842
4072
|
target.fragment = relative.fragment;
|
|
3843
4073
|
return target;
|
|
3844
4074
|
}
|
|
4075
|
+
__name(resolveComponents, "resolveComponents");
|
|
3845
4076
|
function resolve(baseURI, relativeURI, options) {
|
|
3846
4077
|
var schemelessOptions = assign({ scheme: "null" }, options);
|
|
3847
4078
|
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
3848
4079
|
}
|
|
4080
|
+
__name(resolve, "resolve");
|
|
3849
4081
|
function normalize(uri, options) {
|
|
3850
4082
|
if (typeof uri === "string") {
|
|
3851
4083
|
uri = serialize(parse(uri, options), options);
|
|
@@ -3854,6 +4086,7 @@ var require_uri_all = __commonJS({
|
|
|
3854
4086
|
}
|
|
3855
4087
|
return uri;
|
|
3856
4088
|
}
|
|
4089
|
+
__name(normalize, "normalize");
|
|
3857
4090
|
function equal(uriA, uriB, options) {
|
|
3858
4091
|
if (typeof uriA === "string") {
|
|
3859
4092
|
uriA = serialize(parse(uriA, options), options);
|
|
@@ -3867,22 +4100,25 @@ var require_uri_all = __commonJS({
|
|
|
3867
4100
|
}
|
|
3868
4101
|
return uriA === uriB;
|
|
3869
4102
|
}
|
|
4103
|
+
__name(equal, "equal");
|
|
3870
4104
|
function escapeComponent(str, options) {
|
|
3871
4105
|
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
|
|
3872
4106
|
}
|
|
4107
|
+
__name(escapeComponent, "escapeComponent");
|
|
3873
4108
|
function unescapeComponent(str, options) {
|
|
3874
4109
|
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
|
|
3875
4110
|
}
|
|
4111
|
+
__name(unescapeComponent, "unescapeComponent");
|
|
3876
4112
|
var handler = {
|
|
3877
4113
|
scheme: "http",
|
|
3878
4114
|
domainHost: true,
|
|
3879
|
-
parse: function parse2(components, options) {
|
|
4115
|
+
parse: /* @__PURE__ */ __name(function parse2(components, options) {
|
|
3880
4116
|
if (!components.host) {
|
|
3881
4117
|
components.error = components.error || "HTTP URIs must have a host.";
|
|
3882
4118
|
}
|
|
3883
4119
|
return components;
|
|
3884
|
-
},
|
|
3885
|
-
serialize: function serialize2(components, options) {
|
|
4120
|
+
}, "parse"),
|
|
4121
|
+
serialize: /* @__PURE__ */ __name(function serialize2(components, options) {
|
|
3886
4122
|
var secure = String(components.scheme).toLowerCase() === "https";
|
|
3887
4123
|
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
3888
4124
|
components.port = void 0;
|
|
@@ -3891,7 +4127,7 @@ var require_uri_all = __commonJS({
|
|
|
3891
4127
|
components.path = "/";
|
|
3892
4128
|
}
|
|
3893
4129
|
return components;
|
|
3894
|
-
}
|
|
4130
|
+
}, "serialize")
|
|
3895
4131
|
};
|
|
3896
4132
|
var handler$1 = {
|
|
3897
4133
|
scheme: "https",
|
|
@@ -3902,18 +4138,19 @@ var require_uri_all = __commonJS({
|
|
|
3902
4138
|
function isSecure(wsComponents) {
|
|
3903
4139
|
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
3904
4140
|
}
|
|
4141
|
+
__name(isSecure, "isSecure");
|
|
3905
4142
|
var handler$2 = {
|
|
3906
4143
|
scheme: "ws",
|
|
3907
4144
|
domainHost: true,
|
|
3908
|
-
parse: function parse2(components, options) {
|
|
4145
|
+
parse: /* @__PURE__ */ __name(function parse2(components, options) {
|
|
3909
4146
|
var wsComponents = components;
|
|
3910
4147
|
wsComponents.secure = isSecure(wsComponents);
|
|
3911
4148
|
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
3912
4149
|
wsComponents.path = void 0;
|
|
3913
4150
|
wsComponents.query = void 0;
|
|
3914
4151
|
return wsComponents;
|
|
3915
|
-
},
|
|
3916
|
-
serialize: function serialize2(wsComponents, options) {
|
|
4152
|
+
}, "parse"),
|
|
4153
|
+
serialize: /* @__PURE__ */ __name(function serialize2(wsComponents, options) {
|
|
3917
4154
|
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
3918
4155
|
wsComponents.port = void 0;
|
|
3919
4156
|
}
|
|
@@ -3929,7 +4166,7 @@ var require_uri_all = __commonJS({
|
|
|
3929
4166
|
}
|
|
3930
4167
|
wsComponents.fragment = void 0;
|
|
3931
4168
|
return wsComponents;
|
|
3932
|
-
}
|
|
4169
|
+
}, "serialize")
|
|
3933
4170
|
};
|
|
3934
4171
|
var handler$3 = {
|
|
3935
4172
|
scheme: "wss",
|
|
@@ -3955,9 +4192,10 @@ var require_uri_all = __commonJS({
|
|
|
3955
4192
|
var decStr = pctDecChars(str);
|
|
3956
4193
|
return !decStr.match(UNRESERVED) ? str : decStr;
|
|
3957
4194
|
}
|
|
4195
|
+
__name(decodeUnreserved, "decodeUnreserved");
|
|
3958
4196
|
var handler$4 = {
|
|
3959
4197
|
scheme: "mailto",
|
|
3960
|
-
parse: function parse$$1(components, options) {
|
|
4198
|
+
parse: /* @__PURE__ */ __name(function parse$$1(components, options) {
|
|
3961
4199
|
var mailtoComponents = components;
|
|
3962
4200
|
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
|
3963
4201
|
mailtoComponents.path = void 0;
|
|
@@ -4005,8 +4243,8 @@ var require_uri_all = __commonJS({
|
|
|
4005
4243
|
to[_x2] = addr.join("@");
|
|
4006
4244
|
}
|
|
4007
4245
|
return mailtoComponents;
|
|
4008
|
-
},
|
|
4009
|
-
serialize: function serialize$$1(mailtoComponents, options) {
|
|
4246
|
+
}, "parse$$1"),
|
|
4247
|
+
serialize: /* @__PURE__ */ __name(function serialize$$1(mailtoComponents, options) {
|
|
4010
4248
|
var components = mailtoComponents;
|
|
4011
4249
|
var to = toArray(mailtoComponents.to);
|
|
4012
4250
|
if (to) {
|
|
@@ -4039,12 +4277,12 @@ var require_uri_all = __commonJS({
|
|
|
4039
4277
|
components.query = fields.join("&");
|
|
4040
4278
|
}
|
|
4041
4279
|
return components;
|
|
4042
|
-
}
|
|
4280
|
+
}, "serialize$$1")
|
|
4043
4281
|
};
|
|
4044
4282
|
var URN_PARSE = /^([^\:]+)\:(.*)/;
|
|
4045
4283
|
var handler$5 = {
|
|
4046
4284
|
scheme: "urn",
|
|
4047
|
-
parse: function parse$$1(components, options) {
|
|
4285
|
+
parse: /* @__PURE__ */ __name(function parse$$1(components, options) {
|
|
4048
4286
|
var matches = components.path && components.path.match(URN_PARSE);
|
|
4049
4287
|
var urnComponents = components;
|
|
4050
4288
|
if (matches) {
|
|
@@ -4063,8 +4301,8 @@ var require_uri_all = __commonJS({
|
|
|
4063
4301
|
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
4064
4302
|
}
|
|
4065
4303
|
return urnComponents;
|
|
4066
|
-
},
|
|
4067
|
-
serialize: function serialize$$1(urnComponents, options) {
|
|
4304
|
+
}, "parse$$1"),
|
|
4305
|
+
serialize: /* @__PURE__ */ __name(function serialize$$1(urnComponents, options) {
|
|
4068
4306
|
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
4069
4307
|
var nid = urnComponents.nid;
|
|
4070
4308
|
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
@@ -4076,12 +4314,12 @@ var require_uri_all = __commonJS({
|
|
|
4076
4314
|
var nss = urnComponents.nss;
|
|
4077
4315
|
uriComponents.path = (nid || options.nid) + ":" + nss;
|
|
4078
4316
|
return uriComponents;
|
|
4079
|
-
}
|
|
4317
|
+
}, "serialize$$1")
|
|
4080
4318
|
};
|
|
4081
4319
|
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
4082
4320
|
var handler$6 = {
|
|
4083
4321
|
scheme: "urn:uuid",
|
|
4084
|
-
parse: function parse2(urnComponents, options) {
|
|
4322
|
+
parse: /* @__PURE__ */ __name(function parse2(urnComponents, options) {
|
|
4085
4323
|
var uuidComponents = urnComponents;
|
|
4086
4324
|
uuidComponents.uuid = uuidComponents.nss;
|
|
4087
4325
|
uuidComponents.nss = void 0;
|
|
@@ -4089,12 +4327,12 @@ var require_uri_all = __commonJS({
|
|
|
4089
4327
|
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
4090
4328
|
}
|
|
4091
4329
|
return uuidComponents;
|
|
4092
|
-
},
|
|
4093
|
-
serialize: function serialize2(uuidComponents, options) {
|
|
4330
|
+
}, "parse"),
|
|
4331
|
+
serialize: /* @__PURE__ */ __name(function serialize2(uuidComponents, options) {
|
|
4094
4332
|
var urnComponents = uuidComponents;
|
|
4095
4333
|
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
4096
4334
|
return urnComponents;
|
|
4097
|
-
}
|
|
4335
|
+
}, "serialize")
|
|
4098
4336
|
};
|
|
4099
4337
|
SCHEMES[handler.scheme] = handler;
|
|
4100
4338
|
SCHEMES[handler$1.scheme] = handler$1;
|
|
@@ -4170,7 +4408,7 @@ var require_core = __commonJS({
|
|
|
4170
4408
|
var util_1 = require_util();
|
|
4171
4409
|
var $dataRefSchema = require_data();
|
|
4172
4410
|
var uri_1 = require_uri();
|
|
4173
|
-
var defaultRegExp = (str, flags) => new RegExp(str, flags);
|
|
4411
|
+
var defaultRegExp = /* @__PURE__ */ __name((str, flags) => new RegExp(str, flags), "defaultRegExp");
|
|
4174
4412
|
defaultRegExp.code = "new RegExp";
|
|
4175
4413
|
var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
|
|
4176
4414
|
var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -4239,6 +4477,7 @@ var require_core = __commonJS({
|
|
|
4239
4477
|
uriResolver
|
|
4240
4478
|
};
|
|
4241
4479
|
}
|
|
4480
|
+
__name(requiredOptions, "requiredOptions");
|
|
4242
4481
|
var Ajv = class {
|
|
4243
4482
|
constructor(opts = {}) {
|
|
4244
4483
|
this.schemas = {};
|
|
@@ -4315,11 +4554,13 @@ var require_core = __commonJS({
|
|
|
4315
4554
|
const sch = this._addSchema(_schema, _meta);
|
|
4316
4555
|
return sch.validate || _compileAsync.call(this, sch);
|
|
4317
4556
|
}
|
|
4557
|
+
__name(runCompileAsync, "runCompileAsync");
|
|
4318
4558
|
async function loadMetaSchema($ref) {
|
|
4319
4559
|
if ($ref && !this.getSchema($ref)) {
|
|
4320
4560
|
await runCompileAsync.call(this, { $ref }, true);
|
|
4321
4561
|
}
|
|
4322
4562
|
}
|
|
4563
|
+
__name(loadMetaSchema, "loadMetaSchema");
|
|
4323
4564
|
async function _compileAsync(sch) {
|
|
4324
4565
|
try {
|
|
4325
4566
|
return this._compileSchemaEnv(sch);
|
|
@@ -4331,11 +4572,13 @@ var require_core = __commonJS({
|
|
|
4331
4572
|
return _compileAsync.call(this, sch);
|
|
4332
4573
|
}
|
|
4333
4574
|
}
|
|
4575
|
+
__name(_compileAsync, "_compileAsync");
|
|
4334
4576
|
function checkLoaded({ missingSchema: ref, missingRef }) {
|
|
4335
4577
|
if (this.refs[ref]) {
|
|
4336
4578
|
throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);
|
|
4337
4579
|
}
|
|
4338
4580
|
}
|
|
4581
|
+
__name(checkLoaded, "checkLoaded");
|
|
4339
4582
|
async function loadMissingSchema(ref) {
|
|
4340
4583
|
const _schema = await _loadSchema.call(this, ref);
|
|
4341
4584
|
if (!this.refs[ref])
|
|
@@ -4343,6 +4586,7 @@ var require_core = __commonJS({
|
|
|
4343
4586
|
if (!this.refs[ref])
|
|
4344
4587
|
this.addSchema(_schema, ref, meta);
|
|
4345
4588
|
}
|
|
4589
|
+
__name(loadMissingSchema, "loadMissingSchema");
|
|
4346
4590
|
async function _loadSchema(ref) {
|
|
4347
4591
|
const p = this._loading[ref];
|
|
4348
4592
|
if (p)
|
|
@@ -4353,6 +4597,7 @@ var require_core = __commonJS({
|
|
|
4353
4597
|
delete this._loading[ref];
|
|
4354
4598
|
}
|
|
4355
4599
|
}
|
|
4600
|
+
__name(_loadSchema, "_loadSchema");
|
|
4356
4601
|
}
|
|
4357
4602
|
// Adds schema to the instance
|
|
4358
4603
|
addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
|
|
@@ -4609,6 +4854,7 @@ var require_core = __commonJS({
|
|
|
4609
4854
|
}
|
|
4610
4855
|
}
|
|
4611
4856
|
};
|
|
4857
|
+
__name(Ajv, "Ajv");
|
|
4612
4858
|
exports.default = Ajv;
|
|
4613
4859
|
Ajv.ValidationError = validation_error_1.default;
|
|
4614
4860
|
Ajv.MissingRefError = ref_error_1.default;
|
|
@@ -4619,10 +4865,12 @@ var require_core = __commonJS({
|
|
|
4619
4865
|
this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
|
|
4620
4866
|
}
|
|
4621
4867
|
}
|
|
4868
|
+
__name(checkOptions, "checkOptions");
|
|
4622
4869
|
function getSchEnv(keyRef) {
|
|
4623
4870
|
keyRef = (0, resolve_1.normalizeId)(keyRef);
|
|
4624
4871
|
return this.schemas[keyRef] || this.refs[keyRef];
|
|
4625
4872
|
}
|
|
4873
|
+
__name(getSchEnv, "getSchEnv");
|
|
4626
4874
|
function addInitialSchemas() {
|
|
4627
4875
|
const optsSchemas = this.opts.schemas;
|
|
4628
4876
|
if (!optsSchemas)
|
|
@@ -4633,6 +4881,7 @@ var require_core = __commonJS({
|
|
|
4633
4881
|
for (const key in optsSchemas)
|
|
4634
4882
|
this.addSchema(optsSchemas[key], key);
|
|
4635
4883
|
}
|
|
4884
|
+
__name(addInitialSchemas, "addInitialSchemas");
|
|
4636
4885
|
function addInitialFormats() {
|
|
4637
4886
|
for (const name in this.opts.formats) {
|
|
4638
4887
|
const format = this.opts.formats[name];
|
|
@@ -4640,6 +4889,7 @@ var require_core = __commonJS({
|
|
|
4640
4889
|
this.addFormat(name, format);
|
|
4641
4890
|
}
|
|
4642
4891
|
}
|
|
4892
|
+
__name(addInitialFormats, "addInitialFormats");
|
|
4643
4893
|
function addInitialKeywords(defs) {
|
|
4644
4894
|
if (Array.isArray(defs)) {
|
|
4645
4895
|
this.addVocabulary(defs);
|
|
@@ -4653,12 +4903,14 @@ var require_core = __commonJS({
|
|
|
4653
4903
|
this.addKeyword(def);
|
|
4654
4904
|
}
|
|
4655
4905
|
}
|
|
4906
|
+
__name(addInitialKeywords, "addInitialKeywords");
|
|
4656
4907
|
function getMetaSchemaOptions() {
|
|
4657
4908
|
const metaOpts = { ...this.opts };
|
|
4658
4909
|
for (const opt of META_IGNORE_OPTIONS)
|
|
4659
4910
|
delete metaOpts[opt];
|
|
4660
4911
|
return metaOpts;
|
|
4661
4912
|
}
|
|
4913
|
+
__name(getMetaSchemaOptions, "getMetaSchemaOptions");
|
|
4662
4914
|
var noLogs = { log() {
|
|
4663
4915
|
}, warn() {
|
|
4664
4916
|
}, error() {
|
|
@@ -4672,6 +4924,7 @@ var require_core = __commonJS({
|
|
|
4672
4924
|
return logger;
|
|
4673
4925
|
throw new Error("logger must implement log, warn and error methods");
|
|
4674
4926
|
}
|
|
4927
|
+
__name(getLogger, "getLogger");
|
|
4675
4928
|
var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
|
|
4676
4929
|
function checkKeyword(keyword, def) {
|
|
4677
4930
|
const { RULES } = this;
|
|
@@ -4687,6 +4940,7 @@ var require_core = __commonJS({
|
|
|
4687
4940
|
throw new Error('$data keyword must have "code" or "validate" function');
|
|
4688
4941
|
}
|
|
4689
4942
|
}
|
|
4943
|
+
__name(checkKeyword, "checkKeyword");
|
|
4690
4944
|
function addRule(keyword, definition, dataType) {
|
|
4691
4945
|
var _a;
|
|
4692
4946
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
@@ -4716,6 +4970,7 @@ var require_core = __commonJS({
|
|
|
4716
4970
|
RULES.all[keyword] = rule;
|
|
4717
4971
|
(_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));
|
|
4718
4972
|
}
|
|
4973
|
+
__name(addRule, "addRule");
|
|
4719
4974
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
4720
4975
|
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
|
|
4721
4976
|
if (i >= 0) {
|
|
@@ -4725,6 +4980,7 @@ var require_core = __commonJS({
|
|
|
4725
4980
|
this.logger.warn(`rule ${before} is not defined`);
|
|
4726
4981
|
}
|
|
4727
4982
|
}
|
|
4983
|
+
__name(addBeforeRule, "addBeforeRule");
|
|
4728
4984
|
function keywordMetaschema(def) {
|
|
4729
4985
|
let { metaSchema } = def;
|
|
4730
4986
|
if (metaSchema === void 0)
|
|
@@ -4733,12 +4989,14 @@ var require_core = __commonJS({
|
|
|
4733
4989
|
metaSchema = schemaOrData(metaSchema);
|
|
4734
4990
|
def.validateSchema = this.compile(metaSchema, true);
|
|
4735
4991
|
}
|
|
4992
|
+
__name(keywordMetaschema, "keywordMetaschema");
|
|
4736
4993
|
var $dataRef = {
|
|
4737
4994
|
$ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
|
|
4738
4995
|
};
|
|
4739
4996
|
function schemaOrData(schema) {
|
|
4740
4997
|
return { anyOf: [schema, $dataRef] };
|
|
4741
4998
|
}
|
|
4999
|
+
__name(schemaOrData, "schemaOrData");
|
|
4742
5000
|
}
|
|
4743
5001
|
});
|
|
4744
5002
|
|
|
@@ -4790,10 +5048,12 @@ var require_ref = __commonJS({
|
|
|
4790
5048
|
const rootName = gen.scopeValue("root", { ref: root });
|
|
4791
5049
|
return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
|
|
4792
5050
|
}
|
|
5051
|
+
__name(callRootRef, "callRootRef");
|
|
4793
5052
|
function callValidate(sch) {
|
|
4794
5053
|
const v = getValidate(cxt, sch);
|
|
4795
5054
|
callRef(cxt, v, sch, sch.$async);
|
|
4796
5055
|
}
|
|
5056
|
+
__name(callValidate, "callValidate");
|
|
4797
5057
|
function inlineRefSchema(sch) {
|
|
4798
5058
|
const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
|
|
4799
5059
|
const valid = gen.name("valid");
|
|
@@ -4807,12 +5067,14 @@ var require_ref = __commonJS({
|
|
|
4807
5067
|
cxt.mergeEvaluated(schCxt);
|
|
4808
5068
|
cxt.ok(valid);
|
|
4809
5069
|
}
|
|
5070
|
+
__name(inlineRefSchema, "inlineRefSchema");
|
|
4810
5071
|
}
|
|
4811
5072
|
};
|
|
4812
5073
|
function getValidate(cxt, sch) {
|
|
4813
5074
|
const { gen } = cxt;
|
|
4814
5075
|
return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
|
|
4815
5076
|
}
|
|
5077
|
+
__name(getValidate, "getValidate");
|
|
4816
5078
|
exports.getValidate = getValidate;
|
|
4817
5079
|
function callRef(cxt, v, sch, $async) {
|
|
4818
5080
|
const { gen, it } = cxt;
|
|
@@ -4839,14 +5101,17 @@ var require_ref = __commonJS({
|
|
|
4839
5101
|
});
|
|
4840
5102
|
cxt.ok(valid);
|
|
4841
5103
|
}
|
|
5104
|
+
__name(callAsyncRef, "callAsyncRef");
|
|
4842
5105
|
function callSyncRef() {
|
|
4843
5106
|
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
4844
5107
|
}
|
|
5108
|
+
__name(callSyncRef, "callSyncRef");
|
|
4845
5109
|
function addErrorsFrom(source) {
|
|
4846
5110
|
const errs = (0, codegen_1._)`${source}.errors`;
|
|
4847
5111
|
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
|
|
4848
5112
|
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
4849
5113
|
}
|
|
5114
|
+
__name(addErrorsFrom, "addErrorsFrom");
|
|
4850
5115
|
function addEvaluatedFrom(source) {
|
|
4851
5116
|
var _a;
|
|
4852
5117
|
if (!it.opts.unevaluated)
|
|
@@ -4873,7 +5138,9 @@ var require_ref = __commonJS({
|
|
|
4873
5138
|
}
|
|
4874
5139
|
}
|
|
4875
5140
|
}
|
|
5141
|
+
__name(addEvaluatedFrom, "addEvaluatedFrom");
|
|
4876
5142
|
}
|
|
5143
|
+
__name(callRef, "callRef");
|
|
4877
5144
|
exports.callRef = callRef;
|
|
4878
5145
|
exports.default = def;
|
|
4879
5146
|
}
|
|
@@ -4981,6 +5248,7 @@ var require_ucs2length = __commonJS({
|
|
|
4981
5248
|
}
|
|
4982
5249
|
return length;
|
|
4983
5250
|
}
|
|
5251
|
+
__name(ucs2length, "ucs2length");
|
|
4984
5252
|
exports.default = ucs2length;
|
|
4985
5253
|
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
4986
5254
|
}
|
|
@@ -5123,6 +5391,7 @@ var require_required = __commonJS({
|
|
|
5123
5391
|
}
|
|
5124
5392
|
}
|
|
5125
5393
|
}
|
|
5394
|
+
__name(allErrorsMode, "allErrorsMode");
|
|
5126
5395
|
function exitOnErrorMode() {
|
|
5127
5396
|
const missing = gen.let("missing");
|
|
5128
5397
|
if (useLoop || $data) {
|
|
@@ -5135,12 +5404,14 @@ var require_required = __commonJS({
|
|
|
5135
5404
|
gen.else();
|
|
5136
5405
|
}
|
|
5137
5406
|
}
|
|
5407
|
+
__name(exitOnErrorMode, "exitOnErrorMode");
|
|
5138
5408
|
function loopAllRequired() {
|
|
5139
5409
|
gen.forOf("prop", schemaCode, (prop) => {
|
|
5140
5410
|
cxt.setParams({ missingProperty: prop });
|
|
5141
5411
|
gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());
|
|
5142
5412
|
});
|
|
5143
5413
|
}
|
|
5414
|
+
__name(loopAllRequired, "loopAllRequired");
|
|
5144
5415
|
function loopUntilMissing(missing, valid) {
|
|
5145
5416
|
cxt.setParams({ missingProperty: missing });
|
|
5146
5417
|
gen.forOf(missing, schemaCode, () => {
|
|
@@ -5151,6 +5422,7 @@ var require_required = __commonJS({
|
|
|
5151
5422
|
});
|
|
5152
5423
|
}, codegen_1.nil);
|
|
5153
5424
|
}
|
|
5425
|
+
__name(loopUntilMissing, "loopUntilMissing");
|
|
5154
5426
|
}
|
|
5155
5427
|
};
|
|
5156
5428
|
exports.default = def;
|
|
@@ -5231,9 +5503,11 @@ var require_uniqueItems = __commonJS({
|
|
|
5231
5503
|
gen.assign(valid, true);
|
|
5232
5504
|
gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
|
|
5233
5505
|
}
|
|
5506
|
+
__name(validateUniqueItems, "validateUniqueItems");
|
|
5234
5507
|
function canOptimize() {
|
|
5235
5508
|
return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
|
|
5236
5509
|
}
|
|
5510
|
+
__name(canOptimize, "canOptimize");
|
|
5237
5511
|
function loopN(i, j) {
|
|
5238
5512
|
const item = gen.name("item");
|
|
5239
5513
|
const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
|
|
@@ -5250,6 +5524,7 @@ var require_uniqueItems = __commonJS({
|
|
|
5250
5524
|
}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
|
|
5251
5525
|
});
|
|
5252
5526
|
}
|
|
5527
|
+
__name(loopN, "loopN");
|
|
5253
5528
|
function loopN2(i, j) {
|
|
5254
5529
|
const eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
5255
5530
|
const outer = gen.name("outer");
|
|
@@ -5258,6 +5533,7 @@ var require_uniqueItems = __commonJS({
|
|
|
5258
5533
|
gen.assign(valid, false).break(outer);
|
|
5259
5534
|
})));
|
|
5260
5535
|
}
|
|
5536
|
+
__name(loopN2, "loopN2");
|
|
5261
5537
|
}
|
|
5262
5538
|
};
|
|
5263
5539
|
exports.default = def;
|
|
@@ -5316,7 +5592,7 @@ var require_enum = __commonJS({
|
|
|
5316
5592
|
throw new Error("enum must have non-empty array");
|
|
5317
5593
|
const useLoop = schema.length >= it.opts.loopEnum;
|
|
5318
5594
|
let eql;
|
|
5319
|
-
const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
5595
|
+
const getEql = /* @__PURE__ */ __name(() => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default), "getEql");
|
|
5320
5596
|
let valid;
|
|
5321
5597
|
if (useLoop || $data) {
|
|
5322
5598
|
valid = gen.let("valid");
|
|
@@ -5332,10 +5608,12 @@ var require_enum = __commonJS({
|
|
|
5332
5608
|
gen.assign(valid, false);
|
|
5333
5609
|
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
|
|
5334
5610
|
}
|
|
5611
|
+
__name(loopEnum, "loopEnum");
|
|
5335
5612
|
function equalCode(vSchema, i) {
|
|
5336
5613
|
const sch = schema[i];
|
|
5337
5614
|
return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
|
|
5338
5615
|
}
|
|
5616
|
+
__name(equalCode, "equalCode");
|
|
5339
5617
|
}
|
|
5340
5618
|
};
|
|
5341
5619
|
exports.default = def;
|
|
@@ -5427,7 +5705,9 @@ var require_additionalItems = __commonJS({
|
|
|
5427
5705
|
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
5428
5706
|
});
|
|
5429
5707
|
}
|
|
5708
|
+
__name(validateItems, "validateItems");
|
|
5430
5709
|
}
|
|
5710
|
+
__name(validateAdditionalItems, "validateAdditionalItems");
|
|
5431
5711
|
exports.validateAdditionalItems = validateAdditionalItems;
|
|
5432
5712
|
exports.default = def;
|
|
5433
5713
|
}
|
|
@@ -5484,7 +5764,9 @@ var require_items = __commonJS({
|
|
|
5484
5764
|
(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
|
|
5485
5765
|
}
|
|
5486
5766
|
}
|
|
5767
|
+
__name(checkStrictTuple, "checkStrictTuple");
|
|
5487
5768
|
}
|
|
5769
|
+
__name(validateTuple, "validateTuple");
|
|
5488
5770
|
exports.validateTuple = validateTuple;
|
|
5489
5771
|
exports.default = def;
|
|
5490
5772
|
}
|
|
@@ -5607,6 +5889,7 @@ var require_contains = __commonJS({
|
|
|
5607
5889
|
const count = gen.let("count", 0);
|
|
5608
5890
|
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
|
|
5609
5891
|
}
|
|
5892
|
+
__name(validateItemsWithCount, "validateItemsWithCount");
|
|
5610
5893
|
function validateItems(_valid, block) {
|
|
5611
5894
|
gen.forRange("i", 0, len, (i) => {
|
|
5612
5895
|
cxt.subschema({
|
|
@@ -5618,6 +5901,7 @@ var require_contains = __commonJS({
|
|
|
5618
5901
|
block();
|
|
5619
5902
|
});
|
|
5620
5903
|
}
|
|
5904
|
+
__name(validateItems, "validateItems");
|
|
5621
5905
|
function checkLimits(count) {
|
|
5622
5906
|
gen.code((0, codegen_1._)`${count}++`);
|
|
5623
5907
|
if (max === void 0) {
|
|
@@ -5630,6 +5914,7 @@ var require_contains = __commonJS({
|
|
|
5630
5914
|
gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
|
|
5631
5915
|
}
|
|
5632
5916
|
}
|
|
5917
|
+
__name(checkLimits, "checkLimits");
|
|
5633
5918
|
}
|
|
5634
5919
|
};
|
|
5635
5920
|
exports.default = def;
|
|
@@ -5678,6 +5963,7 @@ var require_dependencies = __commonJS({
|
|
|
5678
5963
|
}
|
|
5679
5964
|
return [propertyDeps, schemaDeps];
|
|
5680
5965
|
}
|
|
5966
|
+
__name(splitDependencies, "splitDependencies");
|
|
5681
5967
|
function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
|
|
5682
5968
|
const { gen, data, it } = cxt;
|
|
5683
5969
|
if (Object.keys(propertyDeps).length === 0)
|
|
@@ -5706,6 +5992,7 @@ var require_dependencies = __commonJS({
|
|
|
5706
5992
|
}
|
|
5707
5993
|
}
|
|
5708
5994
|
}
|
|
5995
|
+
__name(validatePropertyDeps, "validatePropertyDeps");
|
|
5709
5996
|
exports.validatePropertyDeps = validatePropertyDeps;
|
|
5710
5997
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
5711
5998
|
const { gen, data, keyword, it } = cxt;
|
|
@@ -5725,6 +6012,7 @@ var require_dependencies = __commonJS({
|
|
|
5725
6012
|
cxt.ok(valid);
|
|
5726
6013
|
}
|
|
5727
6014
|
}
|
|
6015
|
+
__name(validateSchemaDeps, "validateSchemaDeps");
|
|
5728
6016
|
exports.validateSchemaDeps = validateSchemaDeps;
|
|
5729
6017
|
exports.default = def;
|
|
5730
6018
|
}
|
|
@@ -5813,6 +6101,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5813
6101
|
gen.if(isAdditional(key), () => additionalPropertyCode(key));
|
|
5814
6102
|
});
|
|
5815
6103
|
}
|
|
6104
|
+
__name(checkAdditionalProperties, "checkAdditionalProperties");
|
|
5816
6105
|
function isAdditional(key) {
|
|
5817
6106
|
let definedProp;
|
|
5818
6107
|
if (props.length > 8) {
|
|
@@ -5828,9 +6117,11 @@ var require_additionalProperties = __commonJS({
|
|
|
5828
6117
|
}
|
|
5829
6118
|
return (0, codegen_1.not)(definedProp);
|
|
5830
6119
|
}
|
|
6120
|
+
__name(isAdditional, "isAdditional");
|
|
5831
6121
|
function deleteAdditional(key) {
|
|
5832
6122
|
gen.code((0, codegen_1._)`delete ${data}[${key}]`);
|
|
5833
6123
|
}
|
|
6124
|
+
__name(deleteAdditional, "deleteAdditional");
|
|
5834
6125
|
function additionalPropertyCode(key) {
|
|
5835
6126
|
if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
|
|
5836
6127
|
deleteAdditional(key);
|
|
@@ -5858,6 +6149,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5858
6149
|
}
|
|
5859
6150
|
}
|
|
5860
6151
|
}
|
|
6152
|
+
__name(additionalPropertyCode, "additionalPropertyCode");
|
|
5861
6153
|
function applyAdditionalSchema(key, valid, errors) {
|
|
5862
6154
|
const subschema = {
|
|
5863
6155
|
keyword: "additionalProperties",
|
|
@@ -5873,6 +6165,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5873
6165
|
}
|
|
5874
6166
|
cxt.subschema(subschema, valid);
|
|
5875
6167
|
}
|
|
6168
|
+
__name(applyAdditionalSchema, "applyAdditionalSchema");
|
|
5876
6169
|
}
|
|
5877
6170
|
};
|
|
5878
6171
|
exports.default = def;
|
|
@@ -5924,6 +6217,7 @@ var require_properties = __commonJS({
|
|
|
5924
6217
|
function hasDefault(prop) {
|
|
5925
6218
|
return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
|
|
5926
6219
|
}
|
|
6220
|
+
__name(hasDefault, "hasDefault");
|
|
5927
6221
|
function applyPropertySchema(prop) {
|
|
5928
6222
|
cxt.subschema({
|
|
5929
6223
|
keyword: "properties",
|
|
@@ -5931,6 +6225,7 @@ var require_properties = __commonJS({
|
|
|
5931
6225
|
dataProp: prop
|
|
5932
6226
|
}, valid);
|
|
5933
6227
|
}
|
|
6228
|
+
__name(applyPropertySchema, "applyPropertySchema");
|
|
5934
6229
|
}
|
|
5935
6230
|
};
|
|
5936
6231
|
exports.default = def;
|
|
@@ -5978,6 +6273,7 @@ var require_patternProperties = __commonJS({
|
|
|
5978
6273
|
}
|
|
5979
6274
|
}
|
|
5980
6275
|
}
|
|
6276
|
+
__name(validatePatternProperties, "validatePatternProperties");
|
|
5981
6277
|
function checkMatchingProperties(pat) {
|
|
5982
6278
|
for (const prop in checkProperties) {
|
|
5983
6279
|
if (new RegExp(pat).test(prop)) {
|
|
@@ -5985,6 +6281,7 @@ var require_patternProperties = __commonJS({
|
|
|
5985
6281
|
}
|
|
5986
6282
|
}
|
|
5987
6283
|
}
|
|
6284
|
+
__name(checkMatchingProperties, "checkMatchingProperties");
|
|
5988
6285
|
function validateProperties(pat) {
|
|
5989
6286
|
gen.forIn("key", data, (key) => {
|
|
5990
6287
|
gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
|
|
@@ -6005,6 +6302,7 @@ var require_patternProperties = __commonJS({
|
|
|
6005
6302
|
});
|
|
6006
6303
|
});
|
|
6007
6304
|
}
|
|
6305
|
+
__name(validateProperties, "validateProperties");
|
|
6008
6306
|
}
|
|
6009
6307
|
};
|
|
6010
6308
|
exports.default = def;
|
|
@@ -6111,6 +6409,7 @@ var require_oneOf = __commonJS({
|
|
|
6111
6409
|
});
|
|
6112
6410
|
});
|
|
6113
6411
|
}
|
|
6412
|
+
__name(validateOneOf, "validateOneOf");
|
|
6114
6413
|
}
|
|
6115
6414
|
};
|
|
6116
6415
|
exports.default = def;
|
|
@@ -6192,6 +6491,7 @@ var require_if = __commonJS({
|
|
|
6192
6491
|
}, schValid);
|
|
6193
6492
|
cxt.mergeEvaluated(schCxt);
|
|
6194
6493
|
}
|
|
6494
|
+
__name(validateIf, "validateIf");
|
|
6195
6495
|
function validateClause(keyword, ifClause) {
|
|
6196
6496
|
return () => {
|
|
6197
6497
|
const schCxt = cxt.subschema({ keyword }, schValid);
|
|
@@ -6203,12 +6503,14 @@ var require_if = __commonJS({
|
|
|
6203
6503
|
cxt.setParams({ ifClause: keyword });
|
|
6204
6504
|
};
|
|
6205
6505
|
}
|
|
6506
|
+
__name(validateClause, "validateClause");
|
|
6206
6507
|
}
|
|
6207
6508
|
};
|
|
6208
6509
|
function hasSchema(it, keyword) {
|
|
6209
6510
|
const schema = it.schema[keyword];
|
|
6210
6511
|
return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
|
|
6211
6512
|
}
|
|
6513
|
+
__name(hasSchema, "hasSchema");
|
|
6212
6514
|
exports.default = def;
|
|
6213
6515
|
}
|
|
6214
6516
|
});
|
|
@@ -6275,6 +6577,7 @@ var require_applicator = __commonJS({
|
|
|
6275
6577
|
applicator.push(contains_1.default);
|
|
6276
6578
|
return applicator;
|
|
6277
6579
|
}
|
|
6580
|
+
__name(getApplicator, "getApplicator");
|
|
6278
6581
|
exports.default = getApplicator;
|
|
6279
6582
|
}
|
|
6280
6583
|
});
|
|
@@ -6319,12 +6622,15 @@ var require_format = __commonJS({
|
|
|
6319
6622
|
return codegen_1.nil;
|
|
6320
6623
|
return (0, codegen_1._)`${schemaCode} && !${format}`;
|
|
6321
6624
|
}
|
|
6625
|
+
__name(unknownFmt, "unknownFmt");
|
|
6322
6626
|
function invalidFmt() {
|
|
6323
6627
|
const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
|
|
6324
6628
|
const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
|
|
6325
6629
|
return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
|
|
6326
6630
|
}
|
|
6631
|
+
__name(invalidFmt, "invalidFmt");
|
|
6327
6632
|
}
|
|
6633
|
+
__name(validate$DataFormat, "validate$DataFormat");
|
|
6328
6634
|
function validateFormat() {
|
|
6329
6635
|
const formatDef = self2.formats[schema];
|
|
6330
6636
|
if (!formatDef) {
|
|
@@ -6345,7 +6651,9 @@ var require_format = __commonJS({
|
|
|
6345
6651
|
function unknownMsg() {
|
|
6346
6652
|
return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
|
|
6347
6653
|
}
|
|
6654
|
+
__name(unknownMsg, "unknownMsg");
|
|
6348
6655
|
}
|
|
6656
|
+
__name(unknownFormat, "unknownFormat");
|
|
6349
6657
|
function getFormat(fmtDef) {
|
|
6350
6658
|
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
6351
6659
|
const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code });
|
|
@@ -6354,6 +6662,7 @@ var require_format = __commonJS({
|
|
|
6354
6662
|
}
|
|
6355
6663
|
return ["string", fmtDef, fmt];
|
|
6356
6664
|
}
|
|
6665
|
+
__name(getFormat, "getFormat");
|
|
6357
6666
|
function validCondition() {
|
|
6358
6667
|
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
6359
6668
|
if (!schemaEnv.$async)
|
|
@@ -6362,7 +6671,9 @@ var require_format = __commonJS({
|
|
|
6362
6671
|
}
|
|
6363
6672
|
return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
|
|
6364
6673
|
}
|
|
6674
|
+
__name(validCondition, "validCondition");
|
|
6365
6675
|
}
|
|
6676
|
+
__name(validateFormat, "validateFormat");
|
|
6366
6677
|
}
|
|
6367
6678
|
};
|
|
6368
6679
|
exports.default = def;
|
|
@@ -6485,12 +6796,14 @@ var require_discriminator = __commonJS({
|
|
|
6485
6796
|
cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
|
|
6486
6797
|
gen.endIf();
|
|
6487
6798
|
}
|
|
6799
|
+
__name(validateMapping, "validateMapping");
|
|
6488
6800
|
function applyTagSchema(schemaProp) {
|
|
6489
6801
|
const _valid = gen.name("valid");
|
|
6490
6802
|
const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
|
|
6491
6803
|
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
6492
6804
|
return _valid;
|
|
6493
6805
|
}
|
|
6806
|
+
__name(applyTagSchema, "applyTagSchema");
|
|
6494
6807
|
function getMapping() {
|
|
6495
6808
|
var _a;
|
|
6496
6809
|
const oneOfMapping = {};
|
|
@@ -6516,6 +6829,7 @@ var require_discriminator = __commonJS({
|
|
|
6516
6829
|
function hasRequired({ required }) {
|
|
6517
6830
|
return Array.isArray(required) && required.includes(tagName);
|
|
6518
6831
|
}
|
|
6832
|
+
__name(hasRequired, "hasRequired");
|
|
6519
6833
|
function addMappings(sch, i) {
|
|
6520
6834
|
if (sch.const) {
|
|
6521
6835
|
addMapping(sch.const, i);
|
|
@@ -6527,13 +6841,16 @@ var require_discriminator = __commonJS({
|
|
|
6527
6841
|
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
6528
6842
|
}
|
|
6529
6843
|
}
|
|
6844
|
+
__name(addMappings, "addMappings");
|
|
6530
6845
|
function addMapping(tagValue, i) {
|
|
6531
6846
|
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
6532
6847
|
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
6533
6848
|
}
|
|
6534
6849
|
oneOfMapping[tagValue] = i;
|
|
6535
6850
|
}
|
|
6851
|
+
__name(addMapping, "addMapping");
|
|
6536
6852
|
}
|
|
6853
|
+
__name(getMapping, "getMapping");
|
|
6537
6854
|
}
|
|
6538
6855
|
};
|
|
6539
6856
|
exports.default = def;
|
|
@@ -6728,6 +7045,7 @@ var require_ajv = __commonJS({
|
|
|
6728
7045
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
6729
7046
|
}
|
|
6730
7047
|
};
|
|
7048
|
+
__name(Ajv, "Ajv");
|
|
6731
7049
|
module.exports = exports = Ajv;
|
|
6732
7050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6733
7051
|
exports.default = Ajv;
|
|
@@ -6774,6 +7092,7 @@ var require_formats = __commonJS({
|
|
|
6774
7092
|
function fmtDef(validate, compare) {
|
|
6775
7093
|
return { validate, compare };
|
|
6776
7094
|
}
|
|
7095
|
+
__name(fmtDef, "fmtDef");
|
|
6777
7096
|
exports.fullFormats = {
|
|
6778
7097
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
6779
7098
|
date: fmtDef(date, compareDate),
|
|
@@ -6836,6 +7155,7 @@ var require_formats = __commonJS({
|
|
|
6836
7155
|
function isLeapYear(year) {
|
|
6837
7156
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
6838
7157
|
}
|
|
7158
|
+
__name(isLeapYear, "isLeapYear");
|
|
6839
7159
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6840
7160
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
6841
7161
|
function date(str) {
|
|
@@ -6847,6 +7167,7 @@ var require_formats = __commonJS({
|
|
|
6847
7167
|
const day = +matches[3];
|
|
6848
7168
|
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
6849
7169
|
}
|
|
7170
|
+
__name(date, "date");
|
|
6850
7171
|
function compareDate(d1, d2) {
|
|
6851
7172
|
if (!(d1 && d2))
|
|
6852
7173
|
return void 0;
|
|
@@ -6856,6 +7177,7 @@ var require_formats = __commonJS({
|
|
|
6856
7177
|
return -1;
|
|
6857
7178
|
return 0;
|
|
6858
7179
|
}
|
|
7180
|
+
__name(compareDate, "compareDate");
|
|
6859
7181
|
var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
|
6860
7182
|
function time(str, withTimeZone) {
|
|
6861
7183
|
const matches = TIME.exec(str);
|
|
@@ -6867,6 +7189,7 @@ var require_formats = __commonJS({
|
|
|
6867
7189
|
const timeZone = matches[5];
|
|
6868
7190
|
return (hour <= 23 && minute <= 59 && second <= 59 || hour === 23 && minute === 59 && second === 60) && (!withTimeZone || timeZone !== "");
|
|
6869
7191
|
}
|
|
7192
|
+
__name(time, "time");
|
|
6870
7193
|
function compareTime(t1, t2) {
|
|
6871
7194
|
if (!(t1 && t2))
|
|
6872
7195
|
return void 0;
|
|
@@ -6882,11 +7205,13 @@ var require_formats = __commonJS({
|
|
|
6882
7205
|
return -1;
|
|
6883
7206
|
return 0;
|
|
6884
7207
|
}
|
|
7208
|
+
__name(compareTime, "compareTime");
|
|
6885
7209
|
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
6886
7210
|
function date_time(str) {
|
|
6887
7211
|
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
6888
7212
|
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1], true);
|
|
6889
7213
|
}
|
|
7214
|
+
__name(date_time, "date_time");
|
|
6890
7215
|
function compareDateTime(dt1, dt2) {
|
|
6891
7216
|
if (!(dt1 && dt2))
|
|
6892
7217
|
return void 0;
|
|
@@ -6897,27 +7222,33 @@ var require_formats = __commonJS({
|
|
|
6897
7222
|
return void 0;
|
|
6898
7223
|
return res || compareTime(t1, t2);
|
|
6899
7224
|
}
|
|
7225
|
+
__name(compareDateTime, "compareDateTime");
|
|
6900
7226
|
var NOT_URI_FRAGMENT = /\/|:/;
|
|
6901
7227
|
var URI = /^(?:[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;
|
|
6902
7228
|
function uri(str) {
|
|
6903
7229
|
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
6904
7230
|
}
|
|
7231
|
+
__name(uri, "uri");
|
|
6905
7232
|
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
6906
7233
|
function byte(str) {
|
|
6907
7234
|
BYTE.lastIndex = 0;
|
|
6908
7235
|
return BYTE.test(str);
|
|
6909
7236
|
}
|
|
7237
|
+
__name(byte, "byte");
|
|
6910
7238
|
var MIN_INT32 = -(2 ** 31);
|
|
6911
7239
|
var MAX_INT32 = 2 ** 31 - 1;
|
|
6912
7240
|
function validateInt32(value) {
|
|
6913
7241
|
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
6914
7242
|
}
|
|
7243
|
+
__name(validateInt32, "validateInt32");
|
|
6915
7244
|
function validateInt64(value) {
|
|
6916
7245
|
return Number.isInteger(value);
|
|
6917
7246
|
}
|
|
7247
|
+
__name(validateInt64, "validateInt64");
|
|
6918
7248
|
function validateNumber() {
|
|
6919
7249
|
return true;
|
|
6920
7250
|
}
|
|
7251
|
+
__name(validateNumber, "validateNumber");
|
|
6921
7252
|
var Z_ANCHOR = /[^\\]\\Z/;
|
|
6922
7253
|
function regex(str) {
|
|
6923
7254
|
if (Z_ANCHOR.test(str))
|
|
@@ -6929,6 +7260,7 @@ var require_formats = __commonJS({
|
|
|
6929
7260
|
return false;
|
|
6930
7261
|
}
|
|
6931
7262
|
}
|
|
7263
|
+
__name(regex, "regex");
|
|
6932
7264
|
}
|
|
6933
7265
|
});
|
|
6934
7266
|
|
|
@@ -6975,6 +7307,7 @@ var require_limit = __commonJS({
|
|
|
6975
7307
|
const fmt = gen.const("fmt", codegen_1._`${fmts}[${fCxt.schemaCode}]`);
|
|
6976
7308
|
cxt.fail$data(codegen_1.or(codegen_1._`typeof ${fmt} != "object"`, codegen_1._`${fmt} instanceof RegExp`, codegen_1._`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
|
6977
7309
|
}
|
|
7310
|
+
__name(validate$DataFormat, "validate$DataFormat");
|
|
6978
7311
|
function validateFormat() {
|
|
6979
7312
|
const format = fCxt.schema;
|
|
6980
7313
|
const fmtDef = self2.formats[format];
|
|
@@ -6990,16 +7323,18 @@ var require_limit = __commonJS({
|
|
|
6990
7323
|
});
|
|
6991
7324
|
cxt.fail$data(compareCode(fmt));
|
|
6992
7325
|
}
|
|
7326
|
+
__name(validateFormat, "validateFormat");
|
|
6993
7327
|
function compareCode(fmt) {
|
|
6994
7328
|
return codegen_1._`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
6995
7329
|
}
|
|
7330
|
+
__name(compareCode, "compareCode");
|
|
6996
7331
|
},
|
|
6997
7332
|
dependencies: ["format"]
|
|
6998
7333
|
};
|
|
6999
|
-
var formatLimitPlugin = (ajv) => {
|
|
7334
|
+
var formatLimitPlugin = /* @__PURE__ */ __name((ajv) => {
|
|
7000
7335
|
ajv.addKeyword(exports.formatLimitDefinition);
|
|
7001
7336
|
return ajv;
|
|
7002
|
-
};
|
|
7337
|
+
}, "formatLimitPlugin");
|
|
7003
7338
|
exports.default = formatLimitPlugin;
|
|
7004
7339
|
}
|
|
7005
7340
|
});
|
|
@@ -7014,7 +7349,7 @@ var require_dist = __commonJS({
|
|
|
7014
7349
|
var codegen_1 = require_codegen();
|
|
7015
7350
|
var fullName = new codegen_1.Name("fullFormats");
|
|
7016
7351
|
var fastName = new codegen_1.Name("fastFormats");
|
|
7017
|
-
var formatsPlugin = (ajv, opts = { keywords: true }) => {
|
|
7352
|
+
var formatsPlugin = /* @__PURE__ */ __name((ajv, opts = { keywords: true }) => {
|
|
7018
7353
|
if (Array.isArray(opts)) {
|
|
7019
7354
|
addFormats(ajv, opts, formats_1.fullFormats, fullName);
|
|
7020
7355
|
return ajv;
|
|
@@ -7025,7 +7360,7 @@ var require_dist = __commonJS({
|
|
|
7025
7360
|
if (opts.keywords)
|
|
7026
7361
|
limit_1.default(ajv);
|
|
7027
7362
|
return ajv;
|
|
7028
|
-
};
|
|
7363
|
+
}, "formatsPlugin");
|
|
7029
7364
|
formatsPlugin.get = (name, mode = "full") => {
|
|
7030
7365
|
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
7031
7366
|
const f = formats[name];
|
|
@@ -7040,6 +7375,7 @@ var require_dist = __commonJS({
|
|
|
7040
7375
|
for (const f of list)
|
|
7041
7376
|
ajv.addFormat(f, fs[f]);
|
|
7042
7377
|
}
|
|
7378
|
+
__name(addFormats, "addFormats");
|
|
7043
7379
|
module.exports = exports = formatsPlugin;
|
|
7044
7380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7045
7381
|
exports.default = formatsPlugin;
|
|
@@ -7227,12 +7563,12 @@ var require_schema = __commonJS({
|
|
|
7227
7563
|
ajv.addSchema(commonDefs);
|
|
7228
7564
|
ajv.addSchema(deviceDefs);
|
|
7229
7565
|
module.exports = {
|
|
7230
|
-
add: function add(schema) {
|
|
7566
|
+
add: /* @__PURE__ */ __name(function add(schema) {
|
|
7231
7567
|
ajv.addSchema(schema);
|
|
7232
|
-
},
|
|
7233
|
-
compile: function compile(schema) {
|
|
7568
|
+
}, "add"),
|
|
7569
|
+
compile: /* @__PURE__ */ __name(function compile(schema) {
|
|
7234
7570
|
return ajv.compile(schema);
|
|
7235
|
-
}
|
|
7571
|
+
}, "compile")
|
|
7236
7572
|
};
|
|
7237
7573
|
}
|
|
7238
7574
|
});
|
|
@@ -7279,14 +7615,14 @@ var require_switch = __commonJS({
|
|
|
7279
7615
|
// src/Errors/AppError.js
|
|
7280
7616
|
var require_AppError = __commonJS({
|
|
7281
7617
|
"src/Errors/AppError.js"(exports, module) {
|
|
7282
|
-
module.exports = class AppError extends Error {
|
|
7618
|
+
module.exports = /* @__PURE__ */ __name(class AppError extends Error {
|
|
7283
7619
|
constructor(message = "Internal Server Error", options) {
|
|
7284
7620
|
super(message, options);
|
|
7285
7621
|
this.type = this.constructor.name;
|
|
7286
7622
|
this.statusCode = 500;
|
|
7287
7623
|
Object.setPrototypeOf(this, AppError.prototype);
|
|
7288
7624
|
}
|
|
7289
|
-
};
|
|
7625
|
+
}, "AppError");
|
|
7290
7626
|
}
|
|
7291
7627
|
});
|
|
7292
7628
|
|
|
@@ -7294,13 +7630,13 @@ var require_AppError = __commonJS({
|
|
|
7294
7630
|
var require_AuthenticationError = __commonJS({
|
|
7295
7631
|
"src/Errors/AuthenticationError.js"(exports, module) {
|
|
7296
7632
|
var AppError = require_AppError();
|
|
7297
|
-
module.exports = class AuthenticationError extends AppError {
|
|
7633
|
+
module.exports = /* @__PURE__ */ __name(class AuthenticationError extends AppError {
|
|
7298
7634
|
constructor(message = "Authentication Error", options = {}) {
|
|
7299
7635
|
super(message, options);
|
|
7300
7636
|
this.statusCode = 401;
|
|
7301
7637
|
Object.setPrototypeOf(this, AuthenticationError.prototype);
|
|
7302
7638
|
}
|
|
7303
|
-
};
|
|
7639
|
+
}, "AuthenticationError");
|
|
7304
7640
|
}
|
|
7305
7641
|
});
|
|
7306
7642
|
|
|
@@ -7308,13 +7644,13 @@ var require_AuthenticationError = __commonJS({
|
|
|
7308
7644
|
var require_AuthorizationError = __commonJS({
|
|
7309
7645
|
"src/Errors/AuthorizationError.js"(exports, module) {
|
|
7310
7646
|
var AppError = require_AppError();
|
|
7311
|
-
module.exports = class AuthorizationError extends AppError {
|
|
7647
|
+
module.exports = /* @__PURE__ */ __name(class AuthorizationError extends AppError {
|
|
7312
7648
|
constructor(message = "Authorization Error", options = {}) {
|
|
7313
7649
|
super(message, options);
|
|
7314
7650
|
this.statusCode = 403;
|
|
7315
7651
|
Object.setPrototypeOf(this, AuthorizationError.prototype);
|
|
7316
7652
|
}
|
|
7317
|
-
};
|
|
7653
|
+
}, "AuthorizationError");
|
|
7318
7654
|
}
|
|
7319
7655
|
});
|
|
7320
7656
|
|
|
@@ -7322,13 +7658,13 @@ var require_AuthorizationError = __commonJS({
|
|
|
7322
7658
|
var require_DeviceCommError = __commonJS({
|
|
7323
7659
|
"src/Errors/DeviceCommError.js"(exports, module) {
|
|
7324
7660
|
var AppError = require_AppError();
|
|
7325
|
-
module.exports = class DeviceCommError extends AppError {
|
|
7661
|
+
module.exports = /* @__PURE__ */ __name(class DeviceCommError extends AppError {
|
|
7326
7662
|
constructor(message = "Device Communication Error", options = {}) {
|
|
7327
7663
|
super(message, options);
|
|
7328
7664
|
this.statusCode = 503;
|
|
7329
7665
|
Object.setPrototypeOf(this, DeviceCommError.prototype);
|
|
7330
7666
|
}
|
|
7331
|
-
};
|
|
7667
|
+
}, "DeviceCommError");
|
|
7332
7668
|
}
|
|
7333
7669
|
});
|
|
7334
7670
|
|
|
@@ -7336,13 +7672,13 @@ var require_DeviceCommError = __commonJS({
|
|
|
7336
7672
|
var require_LoginError = __commonJS({
|
|
7337
7673
|
"src/Errors/LoginError.js"(exports, module) {
|
|
7338
7674
|
var AppError = require_AppError();
|
|
7339
|
-
module.exports = class LoginError extends AppError {
|
|
7675
|
+
module.exports = /* @__PURE__ */ __name(class LoginError extends AppError {
|
|
7340
7676
|
constructor(message = "Invalid Login information provided", options = {}) {
|
|
7341
7677
|
super(message, options);
|
|
7342
7678
|
this.statusCode = 401;
|
|
7343
7679
|
Object.setPrototypeOf(this, LoginError.prototype);
|
|
7344
7680
|
}
|
|
7345
|
-
};
|
|
7681
|
+
}, "LoginError");
|
|
7346
7682
|
}
|
|
7347
7683
|
});
|
|
7348
7684
|
|
|
@@ -7350,13 +7686,13 @@ var require_LoginError = __commonJS({
|
|
|
7350
7686
|
var require_NotFoundError = __commonJS({
|
|
7351
7687
|
"src/Errors/NotFoundError.js"(exports, module) {
|
|
7352
7688
|
var AppError = require_AppError();
|
|
7353
|
-
module.exports = class NotFoundError extends AppError {
|
|
7689
|
+
module.exports = /* @__PURE__ */ __name(class NotFoundError extends AppError {
|
|
7354
7690
|
constructor(message = "Resource Not Found", options = {}) {
|
|
7355
7691
|
super(message, options);
|
|
7356
7692
|
this.statusCode = 404;
|
|
7357
7693
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
7358
7694
|
}
|
|
7359
|
-
};
|
|
7695
|
+
}, "NotFoundError");
|
|
7360
7696
|
}
|
|
7361
7697
|
});
|
|
7362
7698
|
|
|
@@ -7364,13 +7700,13 @@ var require_NotFoundError = __commonJS({
|
|
|
7364
7700
|
var require_RequestError = __commonJS({
|
|
7365
7701
|
"src/Errors/RequestError.js"(exports, module) {
|
|
7366
7702
|
var AppError = require_AppError();
|
|
7367
|
-
module.exports = class RequestError extends AppError {
|
|
7703
|
+
module.exports = /* @__PURE__ */ __name(class RequestError extends AppError {
|
|
7368
7704
|
constructor(message = "Bad Request", options = {}) {
|
|
7369
7705
|
super(message, options);
|
|
7370
7706
|
this.statusCode = 400;
|
|
7371
7707
|
Object.setPrototypeOf(this, RequestError.prototype);
|
|
7372
7708
|
}
|
|
7373
|
-
};
|
|
7709
|
+
}, "RequestError");
|
|
7374
7710
|
}
|
|
7375
7711
|
});
|
|
7376
7712
|
|
|
@@ -7378,13 +7714,13 @@ var require_RequestError = __commonJS({
|
|
|
7378
7714
|
var require_SystemCommError = __commonJS({
|
|
7379
7715
|
"src/Errors/SystemCommError.js"(exports, module) {
|
|
7380
7716
|
var AppError = require_AppError();
|
|
7381
|
-
module.exports = class SystemCommError extends AppError {
|
|
7717
|
+
module.exports = /* @__PURE__ */ __name(class SystemCommError extends AppError {
|
|
7382
7718
|
constructor(message = "System Communication Error", options = {}) {
|
|
7383
7719
|
super(message, options);
|
|
7384
7720
|
this.statusCode = 503;
|
|
7385
7721
|
Object.setPrototypeOf(this, SystemCommError.prototype);
|
|
7386
7722
|
}
|
|
7387
|
-
};
|
|
7723
|
+
}, "SystemCommError");
|
|
7388
7724
|
}
|
|
7389
7725
|
});
|
|
7390
7726
|
|
|
@@ -7392,13 +7728,13 @@ var require_SystemCommError = __commonJS({
|
|
|
7392
7728
|
var require_TokenExpiredError = __commonJS({
|
|
7393
7729
|
"src/Errors/TokenExpiredError.js"(exports, module) {
|
|
7394
7730
|
var AppError = require_AppError();
|
|
7395
|
-
module.exports = class TokenExpiredError extends AppError {
|
|
7731
|
+
module.exports = /* @__PURE__ */ __name(class TokenExpiredError extends AppError {
|
|
7396
7732
|
constructor(message = "Token Expired", options = {}) {
|
|
7397
7733
|
super(message, options);
|
|
7398
7734
|
this.statusCode = 401;
|
|
7399
7735
|
Object.setPrototypeOf(this, TokenExpiredError.prototype);
|
|
7400
7736
|
}
|
|
7401
|
-
};
|
|
7737
|
+
}, "TokenExpiredError");
|
|
7402
7738
|
}
|
|
7403
7739
|
});
|
|
7404
7740
|
|
|
@@ -7406,13 +7742,13 @@ var require_TokenExpiredError = __commonJS({
|
|
|
7406
7742
|
var require_UnprocessableRequestError = __commonJS({
|
|
7407
7743
|
"src/Errors/UnprocessableRequestError.js"(exports, module) {
|
|
7408
7744
|
var AppError = require_AppError();
|
|
7409
|
-
module.exports = class UnprocessableRequestError extends AppError {
|
|
7745
|
+
module.exports = /* @__PURE__ */ __name(class UnprocessableRequestError extends AppError {
|
|
7410
7746
|
constructor(message = "Unprocessable Request Error", options = {}) {
|
|
7411
7747
|
super(message, options);
|
|
7412
7748
|
this.statusCode = 422;
|
|
7413
7749
|
Object.setPrototypeOf(this, UnprocessableRequestError.prototype);
|
|
7414
7750
|
}
|
|
7415
|
-
};
|
|
7751
|
+
}, "UnprocessableRequestError");
|
|
7416
7752
|
}
|
|
7417
7753
|
});
|
|
7418
7754
|
|
|
@@ -7420,13 +7756,13 @@ var require_UnprocessableRequestError = __commonJS({
|
|
|
7420
7756
|
var require_ValidationError = __commonJS({
|
|
7421
7757
|
"src/Errors/ValidationError.js"(exports, module) {
|
|
7422
7758
|
var AppError = require_AppError();
|
|
7423
|
-
module.exports = class ValidationError extends AppError {
|
|
7759
|
+
module.exports = /* @__PURE__ */ __name(class ValidationError extends AppError {
|
|
7424
7760
|
constructor(message = "Validation Error", options = {}) {
|
|
7425
7761
|
super(message, options);
|
|
7426
7762
|
this.statusCode = 400;
|
|
7427
7763
|
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
7428
7764
|
}
|
|
7429
|
-
};
|
|
7765
|
+
}, "ValidationError");
|
|
7430
7766
|
}
|
|
7431
7767
|
});
|
|
7432
7768
|
|
|
@@ -7471,8 +7807,8 @@ var random, customRandom, customAlphabet, nanoid;
|
|
|
7471
7807
|
var init_index_browser = __esm({
|
|
7472
7808
|
"node_modules/nanoid/index.browser.js"() {
|
|
7473
7809
|
init_url_alphabet();
|
|
7474
|
-
random = (bytes) => crypto.getRandomValues(new Uint8Array(bytes));
|
|
7475
|
-
customRandom = (alphabet, defaultSize, getRandom) => {
|
|
7810
|
+
random = /* @__PURE__ */ __name((bytes) => crypto.getRandomValues(new Uint8Array(bytes)), "random");
|
|
7811
|
+
customRandom = /* @__PURE__ */ __name((alphabet, defaultSize, getRandom) => {
|
|
7476
7812
|
let mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1;
|
|
7477
7813
|
let step = -~(1.6 * mask * defaultSize / alphabet.length);
|
|
7478
7814
|
return (size = defaultSize) => {
|
|
@@ -7487,9 +7823,9 @@ var init_index_browser = __esm({
|
|
|
7487
7823
|
}
|
|
7488
7824
|
}
|
|
7489
7825
|
};
|
|
7490
|
-
};
|
|
7491
|
-
customAlphabet = (alphabet, size = 21) => customRandom(alphabet, size, random);
|
|
7492
|
-
nanoid = (size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
7826
|
+
}, "customRandom");
|
|
7827
|
+
customAlphabet = /* @__PURE__ */ __name((alphabet, size = 21) => customRandom(alphabet, size, random), "customAlphabet");
|
|
7828
|
+
nanoid = /* @__PURE__ */ __name((size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
7493
7829
|
byte &= 63;
|
|
7494
7830
|
if (byte < 36) {
|
|
7495
7831
|
id += byte.toString(36);
|
|
@@ -7501,7 +7837,7 @@ var init_index_browser = __esm({
|
|
|
7501
7837
|
id += "_";
|
|
7502
7838
|
}
|
|
7503
7839
|
return id;
|
|
7504
|
-
}, "");
|
|
7840
|
+
}, ""), "nanoid");
|
|
7505
7841
|
}
|
|
7506
7842
|
});
|
|
7507
7843
|
|
|
@@ -7545,7 +7881,7 @@ var require_kohost = __commonJS({
|
|
|
7545
7881
|
});
|
|
7546
7882
|
}
|
|
7547
7883
|
_setTimestamps(isNew) {
|
|
7548
|
-
const now = new Date();
|
|
7884
|
+
const now = /* @__PURE__ */ new Date();
|
|
7549
7885
|
if (isNew && this.schemaProperties.includes("createdAt") && !this.createdAt) {
|
|
7550
7886
|
this.createdAt = now;
|
|
7551
7887
|
}
|
|
@@ -7585,6 +7921,7 @@ var require_kohost = __commonJS({
|
|
|
7585
7921
|
return obj;
|
|
7586
7922
|
}
|
|
7587
7923
|
};
|
|
7924
|
+
__name(Kohost, "Kohost");
|
|
7588
7925
|
module.exports = Kohost;
|
|
7589
7926
|
}
|
|
7590
7927
|
});
|
|
@@ -7602,6 +7939,7 @@ var require_switch2 = __commonJS({
|
|
|
7602
7939
|
super(data);
|
|
7603
7940
|
}
|
|
7604
7941
|
};
|
|
7942
|
+
__name(Switch, "Switch");
|
|
7605
7943
|
Object.defineProperty(Switch.prototype, "schema", {
|
|
7606
7944
|
value: schema
|
|
7607
7945
|
});
|
|
@@ -7732,6 +8070,7 @@ var require_alarm2 = __commonJS({
|
|
|
7732
8070
|
super(data);
|
|
7733
8071
|
}
|
|
7734
8072
|
};
|
|
8073
|
+
__name(Alarm, "Alarm");
|
|
7735
8074
|
Object.defineProperty(Alarm.prototype, "schema", {
|
|
7736
8075
|
value: schema
|
|
7737
8076
|
});
|
|
@@ -7815,6 +8154,7 @@ var require_dimmer2 = __commonJS({
|
|
|
7815
8154
|
return delta;
|
|
7816
8155
|
}
|
|
7817
8156
|
};
|
|
8157
|
+
__name(Dimmer, "Dimmer");
|
|
7818
8158
|
Object.defineProperty(Dimmer.prototype, "schema", {
|
|
7819
8159
|
value: schema
|
|
7820
8160
|
});
|
|
@@ -7852,9 +8192,6 @@ var require_lock = __commonJS({
|
|
|
7852
8192
|
type: {
|
|
7853
8193
|
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/type"
|
|
7854
8194
|
},
|
|
7855
|
-
subType: {
|
|
7856
|
-
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/subType"
|
|
7857
|
-
},
|
|
7858
8195
|
supportedNotifications: {
|
|
7859
8196
|
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/supportedNotifications"
|
|
7860
8197
|
},
|
|
@@ -7862,8 +8199,11 @@ var require_lock = __commonJS({
|
|
|
7862
8199
|
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/notification"
|
|
7863
8200
|
},
|
|
7864
8201
|
state: {
|
|
7865
|
-
type: "string",
|
|
7866
|
-
enum: ["locked", "unlocked"]
|
|
8202
|
+
type: ["string", "null"],
|
|
8203
|
+
enum: ["locked", "unlocked", null]
|
|
8204
|
+
},
|
|
8205
|
+
batteryLevel: {
|
|
8206
|
+
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/batteryLevel"
|
|
7867
8207
|
},
|
|
7868
8208
|
systemData: {
|
|
7869
8209
|
$ref: "https://api.kohost.app/schemas/v3/definitions/device.json#/definitions/systemData"
|
|
@@ -7888,6 +8228,7 @@ var require_lock2 = __commonJS({
|
|
|
7888
8228
|
super(data);
|
|
7889
8229
|
}
|
|
7890
8230
|
};
|
|
8231
|
+
__name(Lock, "Lock");
|
|
7891
8232
|
Object.defineProperty(Lock.prototype, "schema", {
|
|
7892
8233
|
value: schema
|
|
7893
8234
|
});
|
|
@@ -8105,6 +8446,7 @@ var require_thermostat2 = __commonJS({
|
|
|
8105
8446
|
return delta;
|
|
8106
8447
|
}
|
|
8107
8448
|
};
|
|
8449
|
+
__name(Thermostat, "Thermostat");
|
|
8108
8450
|
Object.defineProperty(Thermostat.prototype, "schema", {
|
|
8109
8451
|
value: schema
|
|
8110
8452
|
});
|
|
@@ -8191,6 +8533,7 @@ var require_windowCovering2 = __commonJS({
|
|
|
8191
8533
|
return delta;
|
|
8192
8534
|
}
|
|
8193
8535
|
};
|
|
8536
|
+
__name(WindowCovering, "WindowCovering");
|
|
8194
8537
|
Object.defineProperty(WindowCovering.prototype, "schema", {
|
|
8195
8538
|
value: schema
|
|
8196
8539
|
});
|
|
@@ -8217,7 +8560,7 @@ var require_identification = __commonJS({
|
|
|
8217
8560
|
$id: "https://api.kohost.app/schemas/v3/identification.json",
|
|
8218
8561
|
title: "Identification",
|
|
8219
8562
|
type: "object",
|
|
8220
|
-
required: ["type", "number"
|
|
8563
|
+
required: ["type", "number"],
|
|
8221
8564
|
properties: {
|
|
8222
8565
|
id: {
|
|
8223
8566
|
$ref: "https://api.kohost.app/schemas/v3/definitions/common.json#/definitions/id"
|
|
@@ -8234,16 +8577,14 @@ var require_identification = __commonJS({
|
|
|
8234
8577
|
format: "date-time"
|
|
8235
8578
|
},
|
|
8236
8579
|
expires: {
|
|
8237
|
-
type: ["string", "object"],
|
|
8580
|
+
type: ["string", "object", "null"],
|
|
8238
8581
|
format: "date-time"
|
|
8239
8582
|
},
|
|
8240
8583
|
verified: {
|
|
8241
|
-
type: "boolean"
|
|
8242
|
-
default: false
|
|
8584
|
+
type: "boolean"
|
|
8243
8585
|
},
|
|
8244
8586
|
matched: {
|
|
8245
|
-
type: "boolean"
|
|
8246
|
-
default: false
|
|
8587
|
+
type: "boolean"
|
|
8247
8588
|
},
|
|
8248
8589
|
firstName: {
|
|
8249
8590
|
type: "string"
|
|
@@ -8277,9 +8618,10 @@ var require_identification2 = __commonJS({
|
|
|
8277
8618
|
super(data);
|
|
8278
8619
|
}
|
|
8279
8620
|
get isExpired() {
|
|
8280
|
-
return new Date(this.expirationDate) < new Date();
|
|
8621
|
+
return new Date(this.expirationDate) < /* @__PURE__ */ new Date();
|
|
8281
8622
|
}
|
|
8282
8623
|
};
|
|
8624
|
+
__name(Identification, "Identification");
|
|
8283
8625
|
Object.defineProperty(Identification.prototype, "schema", {
|
|
8284
8626
|
value: schema
|
|
8285
8627
|
});
|
|
@@ -8533,8 +8875,8 @@ __export(index_browser_exports2, {
|
|
|
8533
8875
|
var random2, customAlphabet2, nanoid2;
|
|
8534
8876
|
var init_index_browser2 = __esm({
|
|
8535
8877
|
"node_modules/nanoid/async/index.browser.js"() {
|
|
8536
|
-
random2 = async (bytes) => crypto.getRandomValues(new Uint8Array(bytes));
|
|
8537
|
-
customAlphabet2 = (alphabet, defaultSize = 21) => {
|
|
8878
|
+
random2 = /* @__PURE__ */ __name(async (bytes) => crypto.getRandomValues(new Uint8Array(bytes)), "random");
|
|
8879
|
+
customAlphabet2 = /* @__PURE__ */ __name((alphabet, defaultSize = 21) => {
|
|
8538
8880
|
let mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1;
|
|
8539
8881
|
let step = -~(1.6 * mask * defaultSize / alphabet.length);
|
|
8540
8882
|
return async (size = defaultSize) => {
|
|
@@ -8549,8 +8891,8 @@ var init_index_browser2 = __esm({
|
|
|
8549
8891
|
}
|
|
8550
8892
|
}
|
|
8551
8893
|
};
|
|
8552
|
-
};
|
|
8553
|
-
nanoid2 = async (size = 21) => {
|
|
8894
|
+
}, "customAlphabet");
|
|
8895
|
+
nanoid2 = /* @__PURE__ */ __name(async (size = 21) => {
|
|
8554
8896
|
let id = "";
|
|
8555
8897
|
let bytes = crypto.getRandomValues(new Uint8Array(size));
|
|
8556
8898
|
while (size--) {
|
|
@@ -8566,7 +8908,7 @@ var init_index_browser2 = __esm({
|
|
|
8566
8908
|
}
|
|
8567
8909
|
}
|
|
8568
8910
|
return id;
|
|
8569
|
-
};
|
|
8911
|
+
}, "nanoid");
|
|
8570
8912
|
}
|
|
8571
8913
|
});
|
|
8572
8914
|
|
|
@@ -8597,6 +8939,7 @@ var require_user2 = __commonJS({
|
|
|
8597
8939
|
return await nanoid3(len);
|
|
8598
8940
|
}
|
|
8599
8941
|
};
|
|
8942
|
+
__name(User, "User");
|
|
8600
8943
|
Object.defineProperty(User.prototype, "schema", {
|
|
8601
8944
|
value: schema
|
|
8602
8945
|
});
|
|
@@ -8673,6 +9016,7 @@ var require_courtesy2 = __commonJS({
|
|
|
8673
9016
|
super(data);
|
|
8674
9017
|
}
|
|
8675
9018
|
};
|
|
9019
|
+
__name(Courtesy, "Courtesy");
|
|
8676
9020
|
Object.defineProperty(Courtesy.prototype, "schema", {
|
|
8677
9021
|
value: schema
|
|
8678
9022
|
});
|
|
@@ -8751,6 +9095,7 @@ var require_camera2 = __commonJS({
|
|
|
8751
9095
|
super(data);
|
|
8752
9096
|
}
|
|
8753
9097
|
};
|
|
9098
|
+
__name(Camera, "Camera");
|
|
8754
9099
|
Object.defineProperty(Camera.prototype, "schema", {
|
|
8755
9100
|
value: schema
|
|
8756
9101
|
});
|
|
@@ -8811,6 +9156,7 @@ var require_motionSensor2 = __commonJS({
|
|
|
8811
9156
|
super(data);
|
|
8812
9157
|
}
|
|
8813
9158
|
};
|
|
9159
|
+
__name(MotionSensor, "MotionSensor");
|
|
8814
9160
|
Object.defineProperty(MotionSensor.prototype, "schema", {
|
|
8815
9161
|
value: schema
|
|
8816
9162
|
});
|
|
@@ -8996,6 +9342,7 @@ var require_mediaSource2 = __commonJS({
|
|
|
8996
9342
|
super(data);
|
|
8997
9343
|
}
|
|
8998
9344
|
};
|
|
9345
|
+
__name(MediaSource, "MediaSource");
|
|
8999
9346
|
Object.defineProperty(MediaSource.prototype, "schema", {
|
|
9000
9347
|
value: schema
|
|
9001
9348
|
});
|
|
@@ -9198,10 +9545,12 @@ var require_lodash = __commonJS({
|
|
|
9198
9545
|
map.set(pair[0], pair[1]);
|
|
9199
9546
|
return map;
|
|
9200
9547
|
}
|
|
9548
|
+
__name(addMapEntry, "addMapEntry");
|
|
9201
9549
|
function addSetEntry(set, value) {
|
|
9202
9550
|
set.add(value);
|
|
9203
9551
|
return set;
|
|
9204
9552
|
}
|
|
9553
|
+
__name(addSetEntry, "addSetEntry");
|
|
9205
9554
|
function arrayEach(array, iteratee) {
|
|
9206
9555
|
var index = -1, length = array ? array.length : 0;
|
|
9207
9556
|
while (++index < length) {
|
|
@@ -9211,6 +9560,7 @@ var require_lodash = __commonJS({
|
|
|
9211
9560
|
}
|
|
9212
9561
|
return array;
|
|
9213
9562
|
}
|
|
9563
|
+
__name(arrayEach, "arrayEach");
|
|
9214
9564
|
function arrayPush(array, values) {
|
|
9215
9565
|
var index = -1, length = values.length, offset = array.length;
|
|
9216
9566
|
while (++index < length) {
|
|
@@ -9218,6 +9568,7 @@ var require_lodash = __commonJS({
|
|
|
9218
9568
|
}
|
|
9219
9569
|
return array;
|
|
9220
9570
|
}
|
|
9571
|
+
__name(arrayPush, "arrayPush");
|
|
9221
9572
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
9222
9573
|
var index = -1, length = array ? array.length : 0;
|
|
9223
9574
|
if (initAccum && length) {
|
|
@@ -9228,6 +9579,7 @@ var require_lodash = __commonJS({
|
|
|
9228
9579
|
}
|
|
9229
9580
|
return accumulator;
|
|
9230
9581
|
}
|
|
9582
|
+
__name(arrayReduce, "arrayReduce");
|
|
9231
9583
|
function baseTimes(n, iteratee) {
|
|
9232
9584
|
var index = -1, result = Array(n);
|
|
9233
9585
|
while (++index < n) {
|
|
@@ -9235,9 +9587,11 @@ var require_lodash = __commonJS({
|
|
|
9235
9587
|
}
|
|
9236
9588
|
return result;
|
|
9237
9589
|
}
|
|
9590
|
+
__name(baseTimes, "baseTimes");
|
|
9238
9591
|
function getValue(object, key) {
|
|
9239
9592
|
return object == null ? void 0 : object[key];
|
|
9240
9593
|
}
|
|
9594
|
+
__name(getValue, "getValue");
|
|
9241
9595
|
function isHostObject(value) {
|
|
9242
9596
|
var result = false;
|
|
9243
9597
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -9248,6 +9602,7 @@ var require_lodash = __commonJS({
|
|
|
9248
9602
|
}
|
|
9249
9603
|
return result;
|
|
9250
9604
|
}
|
|
9605
|
+
__name(isHostObject, "isHostObject");
|
|
9251
9606
|
function mapToArray(map) {
|
|
9252
9607
|
var index = -1, result = Array(map.size);
|
|
9253
9608
|
map.forEach(function(value, key) {
|
|
@@ -9255,11 +9610,13 @@ var require_lodash = __commonJS({
|
|
|
9255
9610
|
});
|
|
9256
9611
|
return result;
|
|
9257
9612
|
}
|
|
9613
|
+
__name(mapToArray, "mapToArray");
|
|
9258
9614
|
function overArg(func, transform) {
|
|
9259
9615
|
return function(arg) {
|
|
9260
9616
|
return func(transform(arg));
|
|
9261
9617
|
};
|
|
9262
9618
|
}
|
|
9619
|
+
__name(overArg, "overArg");
|
|
9263
9620
|
function setToArray(set) {
|
|
9264
9621
|
var index = -1, result = Array(set.size);
|
|
9265
9622
|
set.forEach(function(value) {
|
|
@@ -9267,6 +9624,7 @@ var require_lodash = __commonJS({
|
|
|
9267
9624
|
});
|
|
9268
9625
|
return result;
|
|
9269
9626
|
}
|
|
9627
|
+
__name(setToArray, "setToArray");
|
|
9270
9628
|
var arrayProto = Array.prototype;
|
|
9271
9629
|
var funcProto = Function.prototype;
|
|
9272
9630
|
var objectProto = Object.prototype;
|
|
@@ -9312,12 +9670,15 @@ var require_lodash = __commonJS({
|
|
|
9312
9670
|
this.set(entry[0], entry[1]);
|
|
9313
9671
|
}
|
|
9314
9672
|
}
|
|
9673
|
+
__name(Hash, "Hash");
|
|
9315
9674
|
function hashClear() {
|
|
9316
9675
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
9317
9676
|
}
|
|
9677
|
+
__name(hashClear, "hashClear");
|
|
9318
9678
|
function hashDelete(key) {
|
|
9319
9679
|
return this.has(key) && delete this.__data__[key];
|
|
9320
9680
|
}
|
|
9681
|
+
__name(hashDelete, "hashDelete");
|
|
9321
9682
|
function hashGet(key) {
|
|
9322
9683
|
var data = this.__data__;
|
|
9323
9684
|
if (nativeCreate) {
|
|
@@ -9326,15 +9687,18 @@ var require_lodash = __commonJS({
|
|
|
9326
9687
|
}
|
|
9327
9688
|
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
9328
9689
|
}
|
|
9690
|
+
__name(hashGet, "hashGet");
|
|
9329
9691
|
function hashHas(key) {
|
|
9330
9692
|
var data = this.__data__;
|
|
9331
9693
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
9332
9694
|
}
|
|
9695
|
+
__name(hashHas, "hashHas");
|
|
9333
9696
|
function hashSet(key, value) {
|
|
9334
9697
|
var data = this.__data__;
|
|
9335
9698
|
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
9336
9699
|
return this;
|
|
9337
9700
|
}
|
|
9701
|
+
__name(hashSet, "hashSet");
|
|
9338
9702
|
Hash.prototype.clear = hashClear;
|
|
9339
9703
|
Hash.prototype["delete"] = hashDelete;
|
|
9340
9704
|
Hash.prototype.get = hashGet;
|
|
@@ -9348,9 +9712,11 @@ var require_lodash = __commonJS({
|
|
|
9348
9712
|
this.set(entry[0], entry[1]);
|
|
9349
9713
|
}
|
|
9350
9714
|
}
|
|
9715
|
+
__name(ListCache, "ListCache");
|
|
9351
9716
|
function listCacheClear() {
|
|
9352
9717
|
this.__data__ = [];
|
|
9353
9718
|
}
|
|
9719
|
+
__name(listCacheClear, "listCacheClear");
|
|
9354
9720
|
function listCacheDelete(key) {
|
|
9355
9721
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
9356
9722
|
if (index < 0) {
|
|
@@ -9364,13 +9730,16 @@ var require_lodash = __commonJS({
|
|
|
9364
9730
|
}
|
|
9365
9731
|
return true;
|
|
9366
9732
|
}
|
|
9733
|
+
__name(listCacheDelete, "listCacheDelete");
|
|
9367
9734
|
function listCacheGet(key) {
|
|
9368
9735
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
9369
9736
|
return index < 0 ? void 0 : data[index][1];
|
|
9370
9737
|
}
|
|
9738
|
+
__name(listCacheGet, "listCacheGet");
|
|
9371
9739
|
function listCacheHas(key) {
|
|
9372
9740
|
return assocIndexOf(this.__data__, key) > -1;
|
|
9373
9741
|
}
|
|
9742
|
+
__name(listCacheHas, "listCacheHas");
|
|
9374
9743
|
function listCacheSet(key, value) {
|
|
9375
9744
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
9376
9745
|
if (index < 0) {
|
|
@@ -9380,6 +9749,7 @@ var require_lodash = __commonJS({
|
|
|
9380
9749
|
}
|
|
9381
9750
|
return this;
|
|
9382
9751
|
}
|
|
9752
|
+
__name(listCacheSet, "listCacheSet");
|
|
9383
9753
|
ListCache.prototype.clear = listCacheClear;
|
|
9384
9754
|
ListCache.prototype["delete"] = listCacheDelete;
|
|
9385
9755
|
ListCache.prototype.get = listCacheGet;
|
|
@@ -9393,6 +9763,7 @@ var require_lodash = __commonJS({
|
|
|
9393
9763
|
this.set(entry[0], entry[1]);
|
|
9394
9764
|
}
|
|
9395
9765
|
}
|
|
9766
|
+
__name(MapCache, "MapCache");
|
|
9396
9767
|
function mapCacheClear() {
|
|
9397
9768
|
this.__data__ = {
|
|
9398
9769
|
"hash": new Hash(),
|
|
@@ -9400,19 +9771,24 @@ var require_lodash = __commonJS({
|
|
|
9400
9771
|
"string": new Hash()
|
|
9401
9772
|
};
|
|
9402
9773
|
}
|
|
9774
|
+
__name(mapCacheClear, "mapCacheClear");
|
|
9403
9775
|
function mapCacheDelete(key) {
|
|
9404
9776
|
return getMapData(this, key)["delete"](key);
|
|
9405
9777
|
}
|
|
9778
|
+
__name(mapCacheDelete, "mapCacheDelete");
|
|
9406
9779
|
function mapCacheGet(key) {
|
|
9407
9780
|
return getMapData(this, key).get(key);
|
|
9408
9781
|
}
|
|
9782
|
+
__name(mapCacheGet, "mapCacheGet");
|
|
9409
9783
|
function mapCacheHas(key) {
|
|
9410
9784
|
return getMapData(this, key).has(key);
|
|
9411
9785
|
}
|
|
9786
|
+
__name(mapCacheHas, "mapCacheHas");
|
|
9412
9787
|
function mapCacheSet(key, value) {
|
|
9413
9788
|
getMapData(this, key).set(key, value);
|
|
9414
9789
|
return this;
|
|
9415
9790
|
}
|
|
9791
|
+
__name(mapCacheSet, "mapCacheSet");
|
|
9416
9792
|
MapCache.prototype.clear = mapCacheClear;
|
|
9417
9793
|
MapCache.prototype["delete"] = mapCacheDelete;
|
|
9418
9794
|
MapCache.prototype.get = mapCacheGet;
|
|
@@ -9421,18 +9797,23 @@ var require_lodash = __commonJS({
|
|
|
9421
9797
|
function Stack(entries) {
|
|
9422
9798
|
this.__data__ = new ListCache(entries);
|
|
9423
9799
|
}
|
|
9800
|
+
__name(Stack, "Stack");
|
|
9424
9801
|
function stackClear() {
|
|
9425
9802
|
this.__data__ = new ListCache();
|
|
9426
9803
|
}
|
|
9804
|
+
__name(stackClear, "stackClear");
|
|
9427
9805
|
function stackDelete(key) {
|
|
9428
9806
|
return this.__data__["delete"](key);
|
|
9429
9807
|
}
|
|
9808
|
+
__name(stackDelete, "stackDelete");
|
|
9430
9809
|
function stackGet(key) {
|
|
9431
9810
|
return this.__data__.get(key);
|
|
9432
9811
|
}
|
|
9812
|
+
__name(stackGet, "stackGet");
|
|
9433
9813
|
function stackHas(key) {
|
|
9434
9814
|
return this.__data__.has(key);
|
|
9435
9815
|
}
|
|
9816
|
+
__name(stackHas, "stackHas");
|
|
9436
9817
|
function stackSet(key, value) {
|
|
9437
9818
|
var cache = this.__data__;
|
|
9438
9819
|
if (cache instanceof ListCache) {
|
|
@@ -9446,6 +9827,7 @@ var require_lodash = __commonJS({
|
|
|
9446
9827
|
cache.set(key, value);
|
|
9447
9828
|
return this;
|
|
9448
9829
|
}
|
|
9830
|
+
__name(stackSet, "stackSet");
|
|
9449
9831
|
Stack.prototype.clear = stackClear;
|
|
9450
9832
|
Stack.prototype["delete"] = stackDelete;
|
|
9451
9833
|
Stack.prototype.get = stackGet;
|
|
@@ -9461,12 +9843,14 @@ var require_lodash = __commonJS({
|
|
|
9461
9843
|
}
|
|
9462
9844
|
return result;
|
|
9463
9845
|
}
|
|
9846
|
+
__name(arrayLikeKeys, "arrayLikeKeys");
|
|
9464
9847
|
function assignValue(object, key, value) {
|
|
9465
9848
|
var objValue = object[key];
|
|
9466
9849
|
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
9467
9850
|
object[key] = value;
|
|
9468
9851
|
}
|
|
9469
9852
|
}
|
|
9853
|
+
__name(assignValue, "assignValue");
|
|
9470
9854
|
function assocIndexOf(array, key) {
|
|
9471
9855
|
var length = array.length;
|
|
9472
9856
|
while (length--) {
|
|
@@ -9476,9 +9860,11 @@ var require_lodash = __commonJS({
|
|
|
9476
9860
|
}
|
|
9477
9861
|
return -1;
|
|
9478
9862
|
}
|
|
9863
|
+
__name(assocIndexOf, "assocIndexOf");
|
|
9479
9864
|
function baseAssign(object, source) {
|
|
9480
9865
|
return object && copyObject(source, keys(source), object);
|
|
9481
9866
|
}
|
|
9867
|
+
__name(baseAssign, "baseAssign");
|
|
9482
9868
|
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
|
|
9483
9869
|
var result;
|
|
9484
9870
|
if (customizer) {
|
|
@@ -9534,16 +9920,20 @@ var require_lodash = __commonJS({
|
|
|
9534
9920
|
});
|
|
9535
9921
|
return result;
|
|
9536
9922
|
}
|
|
9923
|
+
__name(baseClone, "baseClone");
|
|
9537
9924
|
function baseCreate(proto) {
|
|
9538
9925
|
return isObject(proto) ? objectCreate(proto) : {};
|
|
9539
9926
|
}
|
|
9927
|
+
__name(baseCreate, "baseCreate");
|
|
9540
9928
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
9541
9929
|
var result = keysFunc(object);
|
|
9542
9930
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
9543
9931
|
}
|
|
9932
|
+
__name(baseGetAllKeys, "baseGetAllKeys");
|
|
9544
9933
|
function baseGetTag(value) {
|
|
9545
9934
|
return objectToString.call(value);
|
|
9546
9935
|
}
|
|
9936
|
+
__name(baseGetTag, "baseGetTag");
|
|
9547
9937
|
function baseIsNative(value) {
|
|
9548
9938
|
if (!isObject(value) || isMasked(value)) {
|
|
9549
9939
|
return false;
|
|
@@ -9551,6 +9941,7 @@ var require_lodash = __commonJS({
|
|
|
9551
9941
|
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
9552
9942
|
return pattern.test(toSource(value));
|
|
9553
9943
|
}
|
|
9944
|
+
__name(baseIsNative, "baseIsNative");
|
|
9554
9945
|
function baseKeys(object) {
|
|
9555
9946
|
if (!isPrototype(object)) {
|
|
9556
9947
|
return nativeKeys(object);
|
|
@@ -9563,6 +9954,7 @@ var require_lodash = __commonJS({
|
|
|
9563
9954
|
}
|
|
9564
9955
|
return result;
|
|
9565
9956
|
}
|
|
9957
|
+
__name(baseKeys, "baseKeys");
|
|
9566
9958
|
function cloneBuffer(buffer, isDeep) {
|
|
9567
9959
|
if (isDeep) {
|
|
9568
9960
|
return buffer.slice();
|
|
@@ -9571,35 +9963,43 @@ var require_lodash = __commonJS({
|
|
|
9571
9963
|
buffer.copy(result);
|
|
9572
9964
|
return result;
|
|
9573
9965
|
}
|
|
9966
|
+
__name(cloneBuffer, "cloneBuffer");
|
|
9574
9967
|
function cloneArrayBuffer(arrayBuffer) {
|
|
9575
9968
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
9576
9969
|
new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
|
|
9577
9970
|
return result;
|
|
9578
9971
|
}
|
|
9972
|
+
__name(cloneArrayBuffer, "cloneArrayBuffer");
|
|
9579
9973
|
function cloneDataView(dataView, isDeep) {
|
|
9580
9974
|
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
9581
9975
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
9582
9976
|
}
|
|
9977
|
+
__name(cloneDataView, "cloneDataView");
|
|
9583
9978
|
function cloneMap(map, isDeep, cloneFunc) {
|
|
9584
9979
|
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
|
|
9585
9980
|
return arrayReduce(array, addMapEntry, new map.constructor());
|
|
9586
9981
|
}
|
|
9982
|
+
__name(cloneMap, "cloneMap");
|
|
9587
9983
|
function cloneRegExp(regexp) {
|
|
9588
9984
|
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
9589
9985
|
result.lastIndex = regexp.lastIndex;
|
|
9590
9986
|
return result;
|
|
9591
9987
|
}
|
|
9988
|
+
__name(cloneRegExp, "cloneRegExp");
|
|
9592
9989
|
function cloneSet(set, isDeep, cloneFunc) {
|
|
9593
9990
|
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
|
|
9594
9991
|
return arrayReduce(array, addSetEntry, new set.constructor());
|
|
9595
9992
|
}
|
|
9993
|
+
__name(cloneSet, "cloneSet");
|
|
9596
9994
|
function cloneSymbol(symbol) {
|
|
9597
9995
|
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
9598
9996
|
}
|
|
9997
|
+
__name(cloneSymbol, "cloneSymbol");
|
|
9599
9998
|
function cloneTypedArray(typedArray, isDeep) {
|
|
9600
9999
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
9601
10000
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
9602
10001
|
}
|
|
10002
|
+
__name(cloneTypedArray, "cloneTypedArray");
|
|
9603
10003
|
function copyArray(source, array) {
|
|
9604
10004
|
var index = -1, length = source.length;
|
|
9605
10005
|
array || (array = Array(length));
|
|
@@ -9608,6 +10008,7 @@ var require_lodash = __commonJS({
|
|
|
9608
10008
|
}
|
|
9609
10009
|
return array;
|
|
9610
10010
|
}
|
|
10011
|
+
__name(copyArray, "copyArray");
|
|
9611
10012
|
function copyObject(source, props, object, customizer) {
|
|
9612
10013
|
object || (object = {});
|
|
9613
10014
|
var index = -1, length = props.length;
|
|
@@ -9618,24 +10019,29 @@ var require_lodash = __commonJS({
|
|
|
9618
10019
|
}
|
|
9619
10020
|
return object;
|
|
9620
10021
|
}
|
|
10022
|
+
__name(copyObject, "copyObject");
|
|
9621
10023
|
function copySymbols(source, object) {
|
|
9622
10024
|
return copyObject(source, getSymbols(source), object);
|
|
9623
10025
|
}
|
|
10026
|
+
__name(copySymbols, "copySymbols");
|
|
9624
10027
|
function getAllKeys(object) {
|
|
9625
10028
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
9626
10029
|
}
|
|
10030
|
+
__name(getAllKeys, "getAllKeys");
|
|
9627
10031
|
function getMapData(map, key) {
|
|
9628
10032
|
var data = map.__data__;
|
|
9629
10033
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
9630
10034
|
}
|
|
10035
|
+
__name(getMapData, "getMapData");
|
|
9631
10036
|
function getNative(object, key) {
|
|
9632
10037
|
var value = getValue(object, key);
|
|
9633
10038
|
return baseIsNative(value) ? value : void 0;
|
|
9634
10039
|
}
|
|
10040
|
+
__name(getNative, "getNative");
|
|
9635
10041
|
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
|
9636
10042
|
var getTag = baseGetTag;
|
|
9637
10043
|
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
9638
|
-
getTag = function(value) {
|
|
10044
|
+
getTag = /* @__PURE__ */ __name(function(value) {
|
|
9639
10045
|
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
9640
10046
|
if (ctorString) {
|
|
9641
10047
|
switch (ctorString) {
|
|
@@ -9652,7 +10058,7 @@ var require_lodash = __commonJS({
|
|
|
9652
10058
|
}
|
|
9653
10059
|
}
|
|
9654
10060
|
return result;
|
|
9655
|
-
};
|
|
10061
|
+
}, "getTag");
|
|
9656
10062
|
}
|
|
9657
10063
|
function initCloneArray(array) {
|
|
9658
10064
|
var length = array.length, result = array.constructor(length);
|
|
@@ -9662,9 +10068,11 @@ var require_lodash = __commonJS({
|
|
|
9662
10068
|
}
|
|
9663
10069
|
return result;
|
|
9664
10070
|
}
|
|
10071
|
+
__name(initCloneArray, "initCloneArray");
|
|
9665
10072
|
function initCloneObject(object) {
|
|
9666
10073
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
9667
10074
|
}
|
|
10075
|
+
__name(initCloneObject, "initCloneObject");
|
|
9668
10076
|
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
|
9669
10077
|
var Ctor = object.constructor;
|
|
9670
10078
|
switch (tag) {
|
|
@@ -9698,21 +10106,26 @@ var require_lodash = __commonJS({
|
|
|
9698
10106
|
return cloneSymbol(object);
|
|
9699
10107
|
}
|
|
9700
10108
|
}
|
|
10109
|
+
__name(initCloneByTag, "initCloneByTag");
|
|
9701
10110
|
function isIndex(value, length) {
|
|
9702
10111
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
9703
10112
|
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
9704
10113
|
}
|
|
10114
|
+
__name(isIndex, "isIndex");
|
|
9705
10115
|
function isKeyable(value) {
|
|
9706
10116
|
var type = typeof value;
|
|
9707
10117
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
9708
10118
|
}
|
|
10119
|
+
__name(isKeyable, "isKeyable");
|
|
9709
10120
|
function isMasked(func) {
|
|
9710
10121
|
return !!maskSrcKey && maskSrcKey in func;
|
|
9711
10122
|
}
|
|
10123
|
+
__name(isMasked, "isMasked");
|
|
9712
10124
|
function isPrototype(value) {
|
|
9713
10125
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
9714
10126
|
return value === proto;
|
|
9715
10127
|
}
|
|
10128
|
+
__name(isPrototype, "isPrototype");
|
|
9716
10129
|
function toSource(func) {
|
|
9717
10130
|
if (func != null) {
|
|
9718
10131
|
try {
|
|
@@ -9726,46 +10139,59 @@ var require_lodash = __commonJS({
|
|
|
9726
10139
|
}
|
|
9727
10140
|
return "";
|
|
9728
10141
|
}
|
|
10142
|
+
__name(toSource, "toSource");
|
|
9729
10143
|
function cloneDeep(value) {
|
|
9730
10144
|
return baseClone(value, true, true);
|
|
9731
10145
|
}
|
|
10146
|
+
__name(cloneDeep, "cloneDeep");
|
|
9732
10147
|
function eq(value, other) {
|
|
9733
10148
|
return value === other || value !== value && other !== other;
|
|
9734
10149
|
}
|
|
10150
|
+
__name(eq, "eq");
|
|
9735
10151
|
function isArguments(value) {
|
|
9736
10152
|
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
9737
10153
|
}
|
|
10154
|
+
__name(isArguments, "isArguments");
|
|
9738
10155
|
var isArray = Array.isArray;
|
|
9739
10156
|
function isArrayLike(value) {
|
|
9740
10157
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
9741
10158
|
}
|
|
10159
|
+
__name(isArrayLike, "isArrayLike");
|
|
9742
10160
|
function isArrayLikeObject(value) {
|
|
9743
10161
|
return isObjectLike(value) && isArrayLike(value);
|
|
9744
10162
|
}
|
|
10163
|
+
__name(isArrayLikeObject, "isArrayLikeObject");
|
|
9745
10164
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
9746
10165
|
function isFunction(value) {
|
|
9747
10166
|
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
9748
10167
|
return tag == funcTag || tag == genTag;
|
|
9749
10168
|
}
|
|
10169
|
+
__name(isFunction, "isFunction");
|
|
9750
10170
|
function isLength(value) {
|
|
9751
10171
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
9752
10172
|
}
|
|
10173
|
+
__name(isLength, "isLength");
|
|
9753
10174
|
function isObject(value) {
|
|
9754
10175
|
var type = typeof value;
|
|
9755
10176
|
return !!value && (type == "object" || type == "function");
|
|
9756
10177
|
}
|
|
10178
|
+
__name(isObject, "isObject");
|
|
9757
10179
|
function isObjectLike(value) {
|
|
9758
10180
|
return !!value && typeof value == "object";
|
|
9759
10181
|
}
|
|
10182
|
+
__name(isObjectLike, "isObjectLike");
|
|
9760
10183
|
function keys(object) {
|
|
9761
10184
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
9762
10185
|
}
|
|
10186
|
+
__name(keys, "keys");
|
|
9763
10187
|
function stubArray() {
|
|
9764
10188
|
return [];
|
|
9765
10189
|
}
|
|
10190
|
+
__name(stubArray, "stubArray");
|
|
9766
10191
|
function stubFalse() {
|
|
9767
10192
|
return false;
|
|
9768
10193
|
}
|
|
10194
|
+
__name(stubFalse, "stubFalse");
|
|
9769
10195
|
module.exports = cloneDeep;
|
|
9770
10196
|
}
|
|
9771
10197
|
});
|
|
@@ -9907,6 +10333,7 @@ var require_scene2 = __commonJS({
|
|
|
9907
10333
|
super(data);
|
|
9908
10334
|
}
|
|
9909
10335
|
};
|
|
10336
|
+
__name(Scene, "Scene");
|
|
9910
10337
|
Object.defineProperty(Scene.prototype, "schema", {
|
|
9911
10338
|
value: schema
|
|
9912
10339
|
});
|
|
@@ -9999,12 +10426,13 @@ var require_room2 = __commonJS({
|
|
|
9999
10426
|
return this.sources?.length > 0;
|
|
10000
10427
|
}
|
|
10001
10428
|
get occupied() {
|
|
10002
|
-
const now = new Date();
|
|
10429
|
+
const now = /* @__PURE__ */ new Date();
|
|
10003
10430
|
const lastOccupied = new Date(this.occupiedAt);
|
|
10004
10431
|
const diff = now - lastOccupied;
|
|
10005
10432
|
return diff < 60 * 60 * 1e3;
|
|
10006
10433
|
}
|
|
10007
10434
|
};
|
|
10435
|
+
__name(Room, "Room");
|
|
10008
10436
|
Object.defineProperty(Room.prototype, "schema", {
|
|
10009
10437
|
value: schema
|
|
10010
10438
|
});
|
|
@@ -10086,6 +10514,7 @@ var require_room2 = __commonJS({
|
|
|
10086
10514
|
});
|
|
10087
10515
|
return roomData;
|
|
10088
10516
|
}
|
|
10517
|
+
__name(mapRoomData, "mapRoomData");
|
|
10089
10518
|
module.exports = Room;
|
|
10090
10519
|
}
|
|
10091
10520
|
});
|
|
@@ -10222,6 +10651,7 @@ var require_reservation2 = __commonJS({
|
|
|
10222
10651
|
});
|
|
10223
10652
|
}
|
|
10224
10653
|
};
|
|
10654
|
+
__name(Reservation, "Reservation");
|
|
10225
10655
|
Object.defineProperty(Reservation.prototype, "schema", {
|
|
10226
10656
|
value: schema
|
|
10227
10657
|
});
|
|
@@ -10280,6 +10710,7 @@ var require_application2 = __commonJS({
|
|
|
10280
10710
|
super(data);
|
|
10281
10711
|
}
|
|
10282
10712
|
};
|
|
10713
|
+
__name(Application, "Application");
|
|
10283
10714
|
Object.defineProperty(Application.prototype, "schema", {
|
|
10284
10715
|
value: schema
|
|
10285
10716
|
});
|
|
@@ -10469,6 +10900,7 @@ var require_space2 = __commonJS({
|
|
|
10469
10900
|
return this.rooms.some((room) => room.occupied);
|
|
10470
10901
|
}
|
|
10471
10902
|
};
|
|
10903
|
+
__name(Space, "Space");
|
|
10472
10904
|
Object.defineProperty(Space.prototype, "schema", {
|
|
10473
10905
|
value: schema
|
|
10474
10906
|
});
|
|
@@ -10493,6 +10925,7 @@ var require_space2 = __commonJS({
|
|
|
10493
10925
|
}
|
|
10494
10926
|
return spaceData;
|
|
10495
10927
|
}
|
|
10928
|
+
__name(mapSpaceData, "mapSpaceData");
|
|
10496
10929
|
module.exports = Space;
|
|
10497
10930
|
}
|
|
10498
10931
|
});
|
|
@@ -10660,6 +11093,7 @@ var require_lodash2 = __commonJS({
|
|
|
10660
11093
|
}
|
|
10661
11094
|
return func.apply(thisArg, args);
|
|
10662
11095
|
}
|
|
11096
|
+
__name(apply, "apply");
|
|
10663
11097
|
function arrayMap(array, iteratee) {
|
|
10664
11098
|
var index = -1, length = array ? array.length : 0, result = Array(length);
|
|
10665
11099
|
while (++index < length) {
|
|
@@ -10667,6 +11101,7 @@ var require_lodash2 = __commonJS({
|
|
|
10667
11101
|
}
|
|
10668
11102
|
return result;
|
|
10669
11103
|
}
|
|
11104
|
+
__name(arrayMap, "arrayMap");
|
|
10670
11105
|
function arrayPush(array, values) {
|
|
10671
11106
|
var index = -1, length = values.length, offset = array.length;
|
|
10672
11107
|
while (++index < length) {
|
|
@@ -10674,6 +11109,7 @@ var require_lodash2 = __commonJS({
|
|
|
10674
11109
|
}
|
|
10675
11110
|
return array;
|
|
10676
11111
|
}
|
|
11112
|
+
__name(arrayPush, "arrayPush");
|
|
10677
11113
|
function arraySome(array, predicate) {
|
|
10678
11114
|
var index = -1, length = array ? array.length : 0;
|
|
10679
11115
|
while (++index < length) {
|
|
@@ -10683,11 +11119,13 @@ var require_lodash2 = __commonJS({
|
|
|
10683
11119
|
}
|
|
10684
11120
|
return false;
|
|
10685
11121
|
}
|
|
11122
|
+
__name(arraySome, "arraySome");
|
|
10686
11123
|
function baseProperty(key) {
|
|
10687
11124
|
return function(object) {
|
|
10688
11125
|
return object == null ? void 0 : object[key];
|
|
10689
11126
|
};
|
|
10690
11127
|
}
|
|
11128
|
+
__name(baseProperty, "baseProperty");
|
|
10691
11129
|
function baseSortBy(array, comparer) {
|
|
10692
11130
|
var length = array.length;
|
|
10693
11131
|
array.sort(comparer);
|
|
@@ -10696,6 +11134,7 @@ var require_lodash2 = __commonJS({
|
|
|
10696
11134
|
}
|
|
10697
11135
|
return array;
|
|
10698
11136
|
}
|
|
11137
|
+
__name(baseSortBy, "baseSortBy");
|
|
10699
11138
|
function baseTimes(n, iteratee) {
|
|
10700
11139
|
var index = -1, result = Array(n);
|
|
10701
11140
|
while (++index < n) {
|
|
@@ -10703,14 +11142,17 @@ var require_lodash2 = __commonJS({
|
|
|
10703
11142
|
}
|
|
10704
11143
|
return result;
|
|
10705
11144
|
}
|
|
11145
|
+
__name(baseTimes, "baseTimes");
|
|
10706
11146
|
function baseUnary(func) {
|
|
10707
11147
|
return function(value) {
|
|
10708
11148
|
return func(value);
|
|
10709
11149
|
};
|
|
10710
11150
|
}
|
|
11151
|
+
__name(baseUnary, "baseUnary");
|
|
10711
11152
|
function getValue(object, key) {
|
|
10712
11153
|
return object == null ? void 0 : object[key];
|
|
10713
11154
|
}
|
|
11155
|
+
__name(getValue, "getValue");
|
|
10714
11156
|
function isHostObject(value) {
|
|
10715
11157
|
var result = false;
|
|
10716
11158
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -10721,6 +11163,7 @@ var require_lodash2 = __commonJS({
|
|
|
10721
11163
|
}
|
|
10722
11164
|
return result;
|
|
10723
11165
|
}
|
|
11166
|
+
__name(isHostObject, "isHostObject");
|
|
10724
11167
|
function mapToArray(map) {
|
|
10725
11168
|
var index = -1, result = Array(map.size);
|
|
10726
11169
|
map.forEach(function(value, key) {
|
|
@@ -10728,11 +11171,13 @@ var require_lodash2 = __commonJS({
|
|
|
10728
11171
|
});
|
|
10729
11172
|
return result;
|
|
10730
11173
|
}
|
|
11174
|
+
__name(mapToArray, "mapToArray");
|
|
10731
11175
|
function overArg(func, transform) {
|
|
10732
11176
|
return function(arg) {
|
|
10733
11177
|
return func(transform(arg));
|
|
10734
11178
|
};
|
|
10735
11179
|
}
|
|
11180
|
+
__name(overArg, "overArg");
|
|
10736
11181
|
function setToArray(set) {
|
|
10737
11182
|
var index = -1, result = Array(set.size);
|
|
10738
11183
|
set.forEach(function(value) {
|
|
@@ -10740,6 +11185,7 @@ var require_lodash2 = __commonJS({
|
|
|
10740
11185
|
});
|
|
10741
11186
|
return result;
|
|
10742
11187
|
}
|
|
11188
|
+
__name(setToArray, "setToArray");
|
|
10743
11189
|
var arrayProto = Array.prototype;
|
|
10744
11190
|
var funcProto = Function.prototype;
|
|
10745
11191
|
var objectProto = Object.prototype;
|
|
@@ -10783,12 +11229,15 @@ var require_lodash2 = __commonJS({
|
|
|
10783
11229
|
this.set(entry[0], entry[1]);
|
|
10784
11230
|
}
|
|
10785
11231
|
}
|
|
11232
|
+
__name(Hash, "Hash");
|
|
10786
11233
|
function hashClear() {
|
|
10787
11234
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
10788
11235
|
}
|
|
11236
|
+
__name(hashClear, "hashClear");
|
|
10789
11237
|
function hashDelete(key) {
|
|
10790
11238
|
return this.has(key) && delete this.__data__[key];
|
|
10791
11239
|
}
|
|
11240
|
+
__name(hashDelete, "hashDelete");
|
|
10792
11241
|
function hashGet(key) {
|
|
10793
11242
|
var data = this.__data__;
|
|
10794
11243
|
if (nativeCreate) {
|
|
@@ -10797,15 +11246,18 @@ var require_lodash2 = __commonJS({
|
|
|
10797
11246
|
}
|
|
10798
11247
|
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
10799
11248
|
}
|
|
11249
|
+
__name(hashGet, "hashGet");
|
|
10800
11250
|
function hashHas(key) {
|
|
10801
11251
|
var data = this.__data__;
|
|
10802
11252
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
10803
11253
|
}
|
|
11254
|
+
__name(hashHas, "hashHas");
|
|
10804
11255
|
function hashSet(key, value) {
|
|
10805
11256
|
var data = this.__data__;
|
|
10806
11257
|
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
10807
11258
|
return this;
|
|
10808
11259
|
}
|
|
11260
|
+
__name(hashSet, "hashSet");
|
|
10809
11261
|
Hash.prototype.clear = hashClear;
|
|
10810
11262
|
Hash.prototype["delete"] = hashDelete;
|
|
10811
11263
|
Hash.prototype.get = hashGet;
|
|
@@ -10819,9 +11271,11 @@ var require_lodash2 = __commonJS({
|
|
|
10819
11271
|
this.set(entry[0], entry[1]);
|
|
10820
11272
|
}
|
|
10821
11273
|
}
|
|
11274
|
+
__name(ListCache, "ListCache");
|
|
10822
11275
|
function listCacheClear() {
|
|
10823
11276
|
this.__data__ = [];
|
|
10824
11277
|
}
|
|
11278
|
+
__name(listCacheClear, "listCacheClear");
|
|
10825
11279
|
function listCacheDelete(key) {
|
|
10826
11280
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10827
11281
|
if (index < 0) {
|
|
@@ -10835,13 +11289,16 @@ var require_lodash2 = __commonJS({
|
|
|
10835
11289
|
}
|
|
10836
11290
|
return true;
|
|
10837
11291
|
}
|
|
11292
|
+
__name(listCacheDelete, "listCacheDelete");
|
|
10838
11293
|
function listCacheGet(key) {
|
|
10839
11294
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10840
11295
|
return index < 0 ? void 0 : data[index][1];
|
|
10841
11296
|
}
|
|
11297
|
+
__name(listCacheGet, "listCacheGet");
|
|
10842
11298
|
function listCacheHas(key) {
|
|
10843
11299
|
return assocIndexOf(this.__data__, key) > -1;
|
|
10844
11300
|
}
|
|
11301
|
+
__name(listCacheHas, "listCacheHas");
|
|
10845
11302
|
function listCacheSet(key, value) {
|
|
10846
11303
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10847
11304
|
if (index < 0) {
|
|
@@ -10851,6 +11308,7 @@ var require_lodash2 = __commonJS({
|
|
|
10851
11308
|
}
|
|
10852
11309
|
return this;
|
|
10853
11310
|
}
|
|
11311
|
+
__name(listCacheSet, "listCacheSet");
|
|
10854
11312
|
ListCache.prototype.clear = listCacheClear;
|
|
10855
11313
|
ListCache.prototype["delete"] = listCacheDelete;
|
|
10856
11314
|
ListCache.prototype.get = listCacheGet;
|
|
@@ -10864,6 +11322,7 @@ var require_lodash2 = __commonJS({
|
|
|
10864
11322
|
this.set(entry[0], entry[1]);
|
|
10865
11323
|
}
|
|
10866
11324
|
}
|
|
11325
|
+
__name(MapCache, "MapCache");
|
|
10867
11326
|
function mapCacheClear() {
|
|
10868
11327
|
this.__data__ = {
|
|
10869
11328
|
"hash": new Hash(),
|
|
@@ -10871,19 +11330,24 @@ var require_lodash2 = __commonJS({
|
|
|
10871
11330
|
"string": new Hash()
|
|
10872
11331
|
};
|
|
10873
11332
|
}
|
|
11333
|
+
__name(mapCacheClear, "mapCacheClear");
|
|
10874
11334
|
function mapCacheDelete(key) {
|
|
10875
11335
|
return getMapData(this, key)["delete"](key);
|
|
10876
11336
|
}
|
|
11337
|
+
__name(mapCacheDelete, "mapCacheDelete");
|
|
10877
11338
|
function mapCacheGet(key) {
|
|
10878
11339
|
return getMapData(this, key).get(key);
|
|
10879
11340
|
}
|
|
11341
|
+
__name(mapCacheGet, "mapCacheGet");
|
|
10880
11342
|
function mapCacheHas(key) {
|
|
10881
11343
|
return getMapData(this, key).has(key);
|
|
10882
11344
|
}
|
|
11345
|
+
__name(mapCacheHas, "mapCacheHas");
|
|
10883
11346
|
function mapCacheSet(key, value) {
|
|
10884
11347
|
getMapData(this, key).set(key, value);
|
|
10885
11348
|
return this;
|
|
10886
11349
|
}
|
|
11350
|
+
__name(mapCacheSet, "mapCacheSet");
|
|
10887
11351
|
MapCache.prototype.clear = mapCacheClear;
|
|
10888
11352
|
MapCache.prototype["delete"] = mapCacheDelete;
|
|
10889
11353
|
MapCache.prototype.get = mapCacheGet;
|
|
@@ -10896,30 +11360,38 @@ var require_lodash2 = __commonJS({
|
|
|
10896
11360
|
this.add(values[index]);
|
|
10897
11361
|
}
|
|
10898
11362
|
}
|
|
11363
|
+
__name(SetCache, "SetCache");
|
|
10899
11364
|
function setCacheAdd(value) {
|
|
10900
11365
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
10901
11366
|
return this;
|
|
10902
11367
|
}
|
|
11368
|
+
__name(setCacheAdd, "setCacheAdd");
|
|
10903
11369
|
function setCacheHas(value) {
|
|
10904
11370
|
return this.__data__.has(value);
|
|
10905
11371
|
}
|
|
11372
|
+
__name(setCacheHas, "setCacheHas");
|
|
10906
11373
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
10907
11374
|
SetCache.prototype.has = setCacheHas;
|
|
10908
11375
|
function Stack(entries) {
|
|
10909
11376
|
this.__data__ = new ListCache(entries);
|
|
10910
11377
|
}
|
|
11378
|
+
__name(Stack, "Stack");
|
|
10911
11379
|
function stackClear() {
|
|
10912
11380
|
this.__data__ = new ListCache();
|
|
10913
11381
|
}
|
|
11382
|
+
__name(stackClear, "stackClear");
|
|
10914
11383
|
function stackDelete(key) {
|
|
10915
11384
|
return this.__data__["delete"](key);
|
|
10916
11385
|
}
|
|
11386
|
+
__name(stackDelete, "stackDelete");
|
|
10917
11387
|
function stackGet(key) {
|
|
10918
11388
|
return this.__data__.get(key);
|
|
10919
11389
|
}
|
|
11390
|
+
__name(stackGet, "stackGet");
|
|
10920
11391
|
function stackHas(key) {
|
|
10921
11392
|
return this.__data__.has(key);
|
|
10922
11393
|
}
|
|
11394
|
+
__name(stackHas, "stackHas");
|
|
10923
11395
|
function stackSet(key, value) {
|
|
10924
11396
|
var cache = this.__data__;
|
|
10925
11397
|
if (cache instanceof ListCache) {
|
|
@@ -10933,6 +11405,7 @@ var require_lodash2 = __commonJS({
|
|
|
10933
11405
|
cache.set(key, value);
|
|
10934
11406
|
return this;
|
|
10935
11407
|
}
|
|
11408
|
+
__name(stackSet, "stackSet");
|
|
10936
11409
|
Stack.prototype.clear = stackClear;
|
|
10937
11410
|
Stack.prototype["delete"] = stackDelete;
|
|
10938
11411
|
Stack.prototype.get = stackGet;
|
|
@@ -10948,6 +11421,7 @@ var require_lodash2 = __commonJS({
|
|
|
10948
11421
|
}
|
|
10949
11422
|
return result;
|
|
10950
11423
|
}
|
|
11424
|
+
__name(arrayLikeKeys, "arrayLikeKeys");
|
|
10951
11425
|
function assocIndexOf(array, key) {
|
|
10952
11426
|
var length = array.length;
|
|
10953
11427
|
while (length--) {
|
|
@@ -10957,6 +11431,7 @@ var require_lodash2 = __commonJS({
|
|
|
10957
11431
|
}
|
|
10958
11432
|
return -1;
|
|
10959
11433
|
}
|
|
11434
|
+
__name(assocIndexOf, "assocIndexOf");
|
|
10960
11435
|
var baseEach = createBaseEach(baseForOwn);
|
|
10961
11436
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
10962
11437
|
var index = -1, length = array.length;
|
|
@@ -10976,10 +11451,12 @@ var require_lodash2 = __commonJS({
|
|
|
10976
11451
|
}
|
|
10977
11452
|
return result;
|
|
10978
11453
|
}
|
|
11454
|
+
__name(baseFlatten, "baseFlatten");
|
|
10979
11455
|
var baseFor = createBaseFor();
|
|
10980
11456
|
function baseForOwn(object, iteratee) {
|
|
10981
11457
|
return object && baseFor(object, iteratee, keys);
|
|
10982
11458
|
}
|
|
11459
|
+
__name(baseForOwn, "baseForOwn");
|
|
10983
11460
|
function baseGet(object, path) {
|
|
10984
11461
|
path = isKey(path, object) ? [path] : castPath(path);
|
|
10985
11462
|
var index = 0, length = path.length;
|
|
@@ -10988,12 +11465,15 @@ var require_lodash2 = __commonJS({
|
|
|
10988
11465
|
}
|
|
10989
11466
|
return index && index == length ? object : void 0;
|
|
10990
11467
|
}
|
|
11468
|
+
__name(baseGet, "baseGet");
|
|
10991
11469
|
function baseGetTag(value) {
|
|
10992
11470
|
return objectToString.call(value);
|
|
10993
11471
|
}
|
|
11472
|
+
__name(baseGetTag, "baseGetTag");
|
|
10994
11473
|
function baseHasIn(object, key) {
|
|
10995
11474
|
return object != null && key in Object(object);
|
|
10996
11475
|
}
|
|
11476
|
+
__name(baseHasIn, "baseHasIn");
|
|
10997
11477
|
function baseIsEqual(value, other, customizer, bitmask, stack) {
|
|
10998
11478
|
if (value === other) {
|
|
10999
11479
|
return true;
|
|
@@ -11003,6 +11483,7 @@ var require_lodash2 = __commonJS({
|
|
|
11003
11483
|
}
|
|
11004
11484
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
|
|
11005
11485
|
}
|
|
11486
|
+
__name(baseIsEqual, "baseIsEqual");
|
|
11006
11487
|
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
|
|
11007
11488
|
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
|
|
11008
11489
|
if (!objIsArr) {
|
|
@@ -11032,6 +11513,7 @@ var require_lodash2 = __commonJS({
|
|
|
11032
11513
|
stack || (stack = new Stack());
|
|
11033
11514
|
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
|
|
11034
11515
|
}
|
|
11516
|
+
__name(baseIsEqualDeep, "baseIsEqualDeep");
|
|
11035
11517
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
11036
11518
|
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
11037
11519
|
if (object == null) {
|
|
@@ -11063,6 +11545,7 @@ var require_lodash2 = __commonJS({
|
|
|
11063
11545
|
}
|
|
11064
11546
|
return true;
|
|
11065
11547
|
}
|
|
11548
|
+
__name(baseIsMatch, "baseIsMatch");
|
|
11066
11549
|
function baseIsNative(value) {
|
|
11067
11550
|
if (!isObject(value) || isMasked(value)) {
|
|
11068
11551
|
return false;
|
|
@@ -11070,9 +11553,11 @@ var require_lodash2 = __commonJS({
|
|
|
11070
11553
|
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
11071
11554
|
return pattern.test(toSource(value));
|
|
11072
11555
|
}
|
|
11556
|
+
__name(baseIsNative, "baseIsNative");
|
|
11073
11557
|
function baseIsTypedArray(value) {
|
|
11074
11558
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
|
|
11075
11559
|
}
|
|
11560
|
+
__name(baseIsTypedArray, "baseIsTypedArray");
|
|
11076
11561
|
function baseIteratee(value) {
|
|
11077
11562
|
if (typeof value == "function") {
|
|
11078
11563
|
return value;
|
|
@@ -11085,6 +11570,7 @@ var require_lodash2 = __commonJS({
|
|
|
11085
11570
|
}
|
|
11086
11571
|
return property(value);
|
|
11087
11572
|
}
|
|
11573
|
+
__name(baseIteratee, "baseIteratee");
|
|
11088
11574
|
function baseKeys(object) {
|
|
11089
11575
|
if (!isPrototype(object)) {
|
|
11090
11576
|
return nativeKeys(object);
|
|
@@ -11097,6 +11583,7 @@ var require_lodash2 = __commonJS({
|
|
|
11097
11583
|
}
|
|
11098
11584
|
return result;
|
|
11099
11585
|
}
|
|
11586
|
+
__name(baseKeys, "baseKeys");
|
|
11100
11587
|
function baseMap(collection, iteratee) {
|
|
11101
11588
|
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
11102
11589
|
baseEach(collection, function(value, key, collection2) {
|
|
@@ -11104,6 +11591,7 @@ var require_lodash2 = __commonJS({
|
|
|
11104
11591
|
});
|
|
11105
11592
|
return result;
|
|
11106
11593
|
}
|
|
11594
|
+
__name(baseMap, "baseMap");
|
|
11107
11595
|
function baseMatches(source) {
|
|
11108
11596
|
var matchData = getMatchData(source);
|
|
11109
11597
|
if (matchData.length == 1 && matchData[0][2]) {
|
|
@@ -11113,6 +11601,7 @@ var require_lodash2 = __commonJS({
|
|
|
11113
11601
|
return object === source || baseIsMatch(object, source, matchData);
|
|
11114
11602
|
};
|
|
11115
11603
|
}
|
|
11604
|
+
__name(baseMatches, "baseMatches");
|
|
11116
11605
|
function baseMatchesProperty(path, srcValue) {
|
|
11117
11606
|
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
11118
11607
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
@@ -11122,6 +11611,7 @@ var require_lodash2 = __commonJS({
|
|
|
11122
11611
|
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
|
|
11123
11612
|
};
|
|
11124
11613
|
}
|
|
11614
|
+
__name(baseMatchesProperty, "baseMatchesProperty");
|
|
11125
11615
|
function baseOrderBy(collection, iteratees, orders) {
|
|
11126
11616
|
var index = -1;
|
|
11127
11617
|
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
|
|
@@ -11135,11 +11625,13 @@ var require_lodash2 = __commonJS({
|
|
|
11135
11625
|
return compareMultiple(object, other, orders);
|
|
11136
11626
|
});
|
|
11137
11627
|
}
|
|
11628
|
+
__name(baseOrderBy, "baseOrderBy");
|
|
11138
11629
|
function basePropertyDeep(path) {
|
|
11139
11630
|
return function(object) {
|
|
11140
11631
|
return baseGet(object, path);
|
|
11141
11632
|
};
|
|
11142
11633
|
}
|
|
11634
|
+
__name(basePropertyDeep, "basePropertyDeep");
|
|
11143
11635
|
function baseRest(func, start) {
|
|
11144
11636
|
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
11145
11637
|
return function() {
|
|
@@ -11156,6 +11648,7 @@ var require_lodash2 = __commonJS({
|
|
|
11156
11648
|
return apply(func, this, otherArgs);
|
|
11157
11649
|
};
|
|
11158
11650
|
}
|
|
11651
|
+
__name(baseRest, "baseRest");
|
|
11159
11652
|
function baseToString(value) {
|
|
11160
11653
|
if (typeof value == "string") {
|
|
11161
11654
|
return value;
|
|
@@ -11166,9 +11659,11 @@ var require_lodash2 = __commonJS({
|
|
|
11166
11659
|
var result = value + "";
|
|
11167
11660
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
11168
11661
|
}
|
|
11662
|
+
__name(baseToString, "baseToString");
|
|
11169
11663
|
function castPath(value) {
|
|
11170
11664
|
return isArray(value) ? value : stringToPath(value);
|
|
11171
11665
|
}
|
|
11666
|
+
__name(castPath, "castPath");
|
|
11172
11667
|
function compareAscending(value, other) {
|
|
11173
11668
|
if (value !== other) {
|
|
11174
11669
|
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
|
@@ -11182,6 +11677,7 @@ var require_lodash2 = __commonJS({
|
|
|
11182
11677
|
}
|
|
11183
11678
|
return 0;
|
|
11184
11679
|
}
|
|
11680
|
+
__name(compareAscending, "compareAscending");
|
|
11185
11681
|
function compareMultiple(object, other, orders) {
|
|
11186
11682
|
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
11187
11683
|
while (++index < length) {
|
|
@@ -11196,6 +11692,7 @@ var require_lodash2 = __commonJS({
|
|
|
11196
11692
|
}
|
|
11197
11693
|
return object.index - other.index;
|
|
11198
11694
|
}
|
|
11695
|
+
__name(compareMultiple, "compareMultiple");
|
|
11199
11696
|
function createBaseEach(eachFunc, fromRight) {
|
|
11200
11697
|
return function(collection, iteratee) {
|
|
11201
11698
|
if (collection == null) {
|
|
@@ -11213,6 +11710,7 @@ var require_lodash2 = __commonJS({
|
|
|
11213
11710
|
return collection;
|
|
11214
11711
|
};
|
|
11215
11712
|
}
|
|
11713
|
+
__name(createBaseEach, "createBaseEach");
|
|
11216
11714
|
function createBaseFor(fromRight) {
|
|
11217
11715
|
return function(object, iteratee, keysFunc) {
|
|
11218
11716
|
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
@@ -11225,6 +11723,7 @@ var require_lodash2 = __commonJS({
|
|
|
11225
11723
|
return object;
|
|
11226
11724
|
};
|
|
11227
11725
|
}
|
|
11726
|
+
__name(createBaseFor, "createBaseFor");
|
|
11228
11727
|
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
|
|
11229
11728
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
|
|
11230
11729
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
@@ -11267,6 +11766,7 @@ var require_lodash2 = __commonJS({
|
|
|
11267
11766
|
stack["delete"](other);
|
|
11268
11767
|
return result;
|
|
11269
11768
|
}
|
|
11769
|
+
__name(equalArrays, "equalArrays");
|
|
11270
11770
|
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
|
11271
11771
|
switch (tag) {
|
|
11272
11772
|
case dataViewTag:
|
|
@@ -11313,6 +11813,7 @@ var require_lodash2 = __commonJS({
|
|
|
11313
11813
|
}
|
|
11314
11814
|
return false;
|
|
11315
11815
|
}
|
|
11816
|
+
__name(equalByTag, "equalByTag");
|
|
11316
11817
|
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
|
11317
11818
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
|
|
11318
11819
|
if (objLength != othLength && !isPartial) {
|
|
@@ -11355,10 +11856,12 @@ var require_lodash2 = __commonJS({
|
|
|
11355
11856
|
stack["delete"](other);
|
|
11356
11857
|
return result;
|
|
11357
11858
|
}
|
|
11859
|
+
__name(equalObjects, "equalObjects");
|
|
11358
11860
|
function getMapData(map, key) {
|
|
11359
11861
|
var data = map.__data__;
|
|
11360
11862
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
11361
11863
|
}
|
|
11864
|
+
__name(getMapData, "getMapData");
|
|
11362
11865
|
function getMatchData(object) {
|
|
11363
11866
|
var result = keys(object), length = result.length;
|
|
11364
11867
|
while (length--) {
|
|
@@ -11367,13 +11870,15 @@ var require_lodash2 = __commonJS({
|
|
|
11367
11870
|
}
|
|
11368
11871
|
return result;
|
|
11369
11872
|
}
|
|
11873
|
+
__name(getMatchData, "getMatchData");
|
|
11370
11874
|
function getNative(object, key) {
|
|
11371
11875
|
var value = getValue(object, key);
|
|
11372
11876
|
return baseIsNative(value) ? value : void 0;
|
|
11373
11877
|
}
|
|
11878
|
+
__name(getNative, "getNative");
|
|
11374
11879
|
var getTag = baseGetTag;
|
|
11375
11880
|
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
11376
|
-
getTag = function(value) {
|
|
11881
|
+
getTag = /* @__PURE__ */ __name(function(value) {
|
|
11377
11882
|
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
11378
11883
|
if (ctorString) {
|
|
11379
11884
|
switch (ctorString) {
|
|
@@ -11390,7 +11895,7 @@ var require_lodash2 = __commonJS({
|
|
|
11390
11895
|
}
|
|
11391
11896
|
}
|
|
11392
11897
|
return result;
|
|
11393
|
-
};
|
|
11898
|
+
}, "getTag");
|
|
11394
11899
|
}
|
|
11395
11900
|
function hasPath(object, path, hasFunc) {
|
|
11396
11901
|
path = isKey(path, object) ? [path] : castPath(path);
|
|
@@ -11408,13 +11913,16 @@ var require_lodash2 = __commonJS({
|
|
|
11408
11913
|
var length = object ? object.length : 0;
|
|
11409
11914
|
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
11410
11915
|
}
|
|
11916
|
+
__name(hasPath, "hasPath");
|
|
11411
11917
|
function isFlattenable(value) {
|
|
11412
11918
|
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
11413
11919
|
}
|
|
11920
|
+
__name(isFlattenable, "isFlattenable");
|
|
11414
11921
|
function isIndex(value, length) {
|
|
11415
11922
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
11416
11923
|
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
11417
11924
|
}
|
|
11925
|
+
__name(isIndex, "isIndex");
|
|
11418
11926
|
function isIterateeCall(value, index, object) {
|
|
11419
11927
|
if (!isObject(object)) {
|
|
11420
11928
|
return false;
|
|
@@ -11425,6 +11933,7 @@ var require_lodash2 = __commonJS({
|
|
|
11425
11933
|
}
|
|
11426
11934
|
return false;
|
|
11427
11935
|
}
|
|
11936
|
+
__name(isIterateeCall, "isIterateeCall");
|
|
11428
11937
|
function isKey(value, object) {
|
|
11429
11938
|
if (isArray(value)) {
|
|
11430
11939
|
return false;
|
|
@@ -11435,20 +11944,25 @@ var require_lodash2 = __commonJS({
|
|
|
11435
11944
|
}
|
|
11436
11945
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
11437
11946
|
}
|
|
11947
|
+
__name(isKey, "isKey");
|
|
11438
11948
|
function isKeyable(value) {
|
|
11439
11949
|
var type = typeof value;
|
|
11440
11950
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
11441
11951
|
}
|
|
11952
|
+
__name(isKeyable, "isKeyable");
|
|
11442
11953
|
function isMasked(func) {
|
|
11443
11954
|
return !!maskSrcKey && maskSrcKey in func;
|
|
11444
11955
|
}
|
|
11956
|
+
__name(isMasked, "isMasked");
|
|
11445
11957
|
function isPrototype(value) {
|
|
11446
11958
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
11447
11959
|
return value === proto;
|
|
11448
11960
|
}
|
|
11961
|
+
__name(isPrototype, "isPrototype");
|
|
11449
11962
|
function isStrictComparable(value) {
|
|
11450
11963
|
return value === value && !isObject(value);
|
|
11451
11964
|
}
|
|
11965
|
+
__name(isStrictComparable, "isStrictComparable");
|
|
11452
11966
|
function matchesStrictComparable(key, srcValue) {
|
|
11453
11967
|
return function(object) {
|
|
11454
11968
|
if (object == null) {
|
|
@@ -11457,6 +11971,7 @@ var require_lodash2 = __commonJS({
|
|
|
11457
11971
|
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
11458
11972
|
};
|
|
11459
11973
|
}
|
|
11974
|
+
__name(matchesStrictComparable, "matchesStrictComparable");
|
|
11460
11975
|
var stringToPath = memoize(function(string) {
|
|
11461
11976
|
string = toString(string);
|
|
11462
11977
|
var result = [];
|
|
@@ -11475,6 +11990,7 @@ var require_lodash2 = __commonJS({
|
|
|
11475
11990
|
var result = value + "";
|
|
11476
11991
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
11477
11992
|
}
|
|
11993
|
+
__name(toKey, "toKey");
|
|
11478
11994
|
function toSource(func) {
|
|
11479
11995
|
if (func != null) {
|
|
11480
11996
|
try {
|
|
@@ -11488,6 +12004,7 @@ var require_lodash2 = __commonJS({
|
|
|
11488
12004
|
}
|
|
11489
12005
|
return "";
|
|
11490
12006
|
}
|
|
12007
|
+
__name(toSource, "toSource");
|
|
11491
12008
|
var sortBy = baseRest(function(collection, iteratees) {
|
|
11492
12009
|
if (collection == null) {
|
|
11493
12010
|
return [];
|
|
@@ -11504,7 +12021,7 @@ var require_lodash2 = __commonJS({
|
|
|
11504
12021
|
if (typeof func != "function" || resolver && typeof resolver != "function") {
|
|
11505
12022
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
11506
12023
|
}
|
|
11507
|
-
var memoized = function() {
|
|
12024
|
+
var memoized = /* @__PURE__ */ __name(function() {
|
|
11508
12025
|
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
11509
12026
|
if (cache.has(key)) {
|
|
11510
12027
|
return cache.get(key);
|
|
@@ -11512,61 +12029,77 @@ var require_lodash2 = __commonJS({
|
|
|
11512
12029
|
var result = func.apply(this, args);
|
|
11513
12030
|
memoized.cache = cache.set(key, result);
|
|
11514
12031
|
return result;
|
|
11515
|
-
};
|
|
12032
|
+
}, "memoized");
|
|
11516
12033
|
memoized.cache = new (memoize.Cache || MapCache)();
|
|
11517
12034
|
return memoized;
|
|
11518
12035
|
}
|
|
12036
|
+
__name(memoize, "memoize");
|
|
11519
12037
|
memoize.Cache = MapCache;
|
|
11520
12038
|
function eq(value, other) {
|
|
11521
12039
|
return value === other || value !== value && other !== other;
|
|
11522
12040
|
}
|
|
12041
|
+
__name(eq, "eq");
|
|
11523
12042
|
function isArguments(value) {
|
|
11524
12043
|
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
11525
12044
|
}
|
|
12045
|
+
__name(isArguments, "isArguments");
|
|
11526
12046
|
var isArray = Array.isArray;
|
|
11527
12047
|
function isArrayLike(value) {
|
|
11528
12048
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
11529
12049
|
}
|
|
12050
|
+
__name(isArrayLike, "isArrayLike");
|
|
11530
12051
|
function isArrayLikeObject(value) {
|
|
11531
12052
|
return isObjectLike(value) && isArrayLike(value);
|
|
11532
12053
|
}
|
|
12054
|
+
__name(isArrayLikeObject, "isArrayLikeObject");
|
|
11533
12055
|
function isFunction(value) {
|
|
11534
12056
|
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
11535
12057
|
return tag == funcTag || tag == genTag;
|
|
11536
12058
|
}
|
|
12059
|
+
__name(isFunction, "isFunction");
|
|
11537
12060
|
function isLength(value) {
|
|
11538
12061
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
11539
12062
|
}
|
|
12063
|
+
__name(isLength, "isLength");
|
|
11540
12064
|
function isObject(value) {
|
|
11541
12065
|
var type = typeof value;
|
|
11542
12066
|
return !!value && (type == "object" || type == "function");
|
|
11543
12067
|
}
|
|
12068
|
+
__name(isObject, "isObject");
|
|
11544
12069
|
function isObjectLike(value) {
|
|
11545
12070
|
return !!value && typeof value == "object";
|
|
11546
12071
|
}
|
|
12072
|
+
__name(isObjectLike, "isObjectLike");
|
|
11547
12073
|
function isSymbol(value) {
|
|
11548
12074
|
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
11549
12075
|
}
|
|
12076
|
+
__name(isSymbol, "isSymbol");
|
|
11550
12077
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
11551
12078
|
function toString(value) {
|
|
11552
12079
|
return value == null ? "" : baseToString(value);
|
|
11553
12080
|
}
|
|
12081
|
+
__name(toString, "toString");
|
|
11554
12082
|
function get(object, path, defaultValue) {
|
|
11555
12083
|
var result = object == null ? void 0 : baseGet(object, path);
|
|
11556
12084
|
return result === void 0 ? defaultValue : result;
|
|
11557
12085
|
}
|
|
12086
|
+
__name(get, "get");
|
|
11558
12087
|
function hasIn(object, path) {
|
|
11559
12088
|
return object != null && hasPath(object, path, baseHasIn);
|
|
11560
12089
|
}
|
|
12090
|
+
__name(hasIn, "hasIn");
|
|
11561
12091
|
function keys(object) {
|
|
11562
12092
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
11563
12093
|
}
|
|
12094
|
+
__name(keys, "keys");
|
|
11564
12095
|
function identity(value) {
|
|
11565
12096
|
return value;
|
|
11566
12097
|
}
|
|
12098
|
+
__name(identity, "identity");
|
|
11567
12099
|
function property(path) {
|
|
11568
12100
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
11569
12101
|
}
|
|
12102
|
+
__name(property, "property");
|
|
11570
12103
|
module.exports = sortBy;
|
|
11571
12104
|
}
|
|
11572
12105
|
});
|
|
@@ -11649,6 +12182,7 @@ var require_lodash3 = __commonJS({
|
|
|
11649
12182
|
}
|
|
11650
12183
|
return false;
|
|
11651
12184
|
}
|
|
12185
|
+
__name(arraySome, "arraySome");
|
|
11652
12186
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
11653
12187
|
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
11654
12188
|
while (fromRight ? index-- : ++index < length) {
|
|
@@ -11658,11 +12192,13 @@ var require_lodash3 = __commonJS({
|
|
|
11658
12192
|
}
|
|
11659
12193
|
return -1;
|
|
11660
12194
|
}
|
|
12195
|
+
__name(baseFindIndex, "baseFindIndex");
|
|
11661
12196
|
function baseProperty(key) {
|
|
11662
12197
|
return function(object) {
|
|
11663
12198
|
return object == null ? void 0 : object[key];
|
|
11664
12199
|
};
|
|
11665
12200
|
}
|
|
12201
|
+
__name(baseProperty, "baseProperty");
|
|
11666
12202
|
function baseTimes(n, iteratee) {
|
|
11667
12203
|
var index = -1, result = Array(n);
|
|
11668
12204
|
while (++index < n) {
|
|
@@ -11670,14 +12206,17 @@ var require_lodash3 = __commonJS({
|
|
|
11670
12206
|
}
|
|
11671
12207
|
return result;
|
|
11672
12208
|
}
|
|
12209
|
+
__name(baseTimes, "baseTimes");
|
|
11673
12210
|
function baseUnary(func) {
|
|
11674
12211
|
return function(value) {
|
|
11675
12212
|
return func(value);
|
|
11676
12213
|
};
|
|
11677
12214
|
}
|
|
12215
|
+
__name(baseUnary, "baseUnary");
|
|
11678
12216
|
function getValue(object, key) {
|
|
11679
12217
|
return object == null ? void 0 : object[key];
|
|
11680
12218
|
}
|
|
12219
|
+
__name(getValue, "getValue");
|
|
11681
12220
|
function isHostObject(value) {
|
|
11682
12221
|
var result = false;
|
|
11683
12222
|
if (value != null && typeof value.toString != "function") {
|
|
@@ -11688,6 +12227,7 @@ var require_lodash3 = __commonJS({
|
|
|
11688
12227
|
}
|
|
11689
12228
|
return result;
|
|
11690
12229
|
}
|
|
12230
|
+
__name(isHostObject, "isHostObject");
|
|
11691
12231
|
function mapToArray(map) {
|
|
11692
12232
|
var index = -1, result = Array(map.size);
|
|
11693
12233
|
map.forEach(function(value, key) {
|
|
@@ -11695,11 +12235,13 @@ var require_lodash3 = __commonJS({
|
|
|
11695
12235
|
});
|
|
11696
12236
|
return result;
|
|
11697
12237
|
}
|
|
12238
|
+
__name(mapToArray, "mapToArray");
|
|
11698
12239
|
function overArg(func, transform) {
|
|
11699
12240
|
return function(arg) {
|
|
11700
12241
|
return func(transform(arg));
|
|
11701
12242
|
};
|
|
11702
12243
|
}
|
|
12244
|
+
__name(overArg, "overArg");
|
|
11703
12245
|
function setToArray(set) {
|
|
11704
12246
|
var index = -1, result = Array(set.size);
|
|
11705
12247
|
set.forEach(function(value) {
|
|
@@ -11707,6 +12249,7 @@ var require_lodash3 = __commonJS({
|
|
|
11707
12249
|
});
|
|
11708
12250
|
return result;
|
|
11709
12251
|
}
|
|
12252
|
+
__name(setToArray, "setToArray");
|
|
11710
12253
|
var arrayProto = Array.prototype;
|
|
11711
12254
|
var funcProto = Function.prototype;
|
|
11712
12255
|
var objectProto = Object.prototype;
|
|
@@ -11750,12 +12293,15 @@ var require_lodash3 = __commonJS({
|
|
|
11750
12293
|
this.set(entry[0], entry[1]);
|
|
11751
12294
|
}
|
|
11752
12295
|
}
|
|
12296
|
+
__name(Hash, "Hash");
|
|
11753
12297
|
function hashClear() {
|
|
11754
12298
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
11755
12299
|
}
|
|
12300
|
+
__name(hashClear, "hashClear");
|
|
11756
12301
|
function hashDelete(key) {
|
|
11757
12302
|
return this.has(key) && delete this.__data__[key];
|
|
11758
12303
|
}
|
|
12304
|
+
__name(hashDelete, "hashDelete");
|
|
11759
12305
|
function hashGet(key) {
|
|
11760
12306
|
var data = this.__data__;
|
|
11761
12307
|
if (nativeCreate) {
|
|
@@ -11764,15 +12310,18 @@ var require_lodash3 = __commonJS({
|
|
|
11764
12310
|
}
|
|
11765
12311
|
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
11766
12312
|
}
|
|
12313
|
+
__name(hashGet, "hashGet");
|
|
11767
12314
|
function hashHas(key) {
|
|
11768
12315
|
var data = this.__data__;
|
|
11769
12316
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
11770
12317
|
}
|
|
12318
|
+
__name(hashHas, "hashHas");
|
|
11771
12319
|
function hashSet(key, value) {
|
|
11772
12320
|
var data = this.__data__;
|
|
11773
12321
|
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
11774
12322
|
return this;
|
|
11775
12323
|
}
|
|
12324
|
+
__name(hashSet, "hashSet");
|
|
11776
12325
|
Hash.prototype.clear = hashClear;
|
|
11777
12326
|
Hash.prototype["delete"] = hashDelete;
|
|
11778
12327
|
Hash.prototype.get = hashGet;
|
|
@@ -11786,9 +12335,11 @@ var require_lodash3 = __commonJS({
|
|
|
11786
12335
|
this.set(entry[0], entry[1]);
|
|
11787
12336
|
}
|
|
11788
12337
|
}
|
|
12338
|
+
__name(ListCache, "ListCache");
|
|
11789
12339
|
function listCacheClear() {
|
|
11790
12340
|
this.__data__ = [];
|
|
11791
12341
|
}
|
|
12342
|
+
__name(listCacheClear, "listCacheClear");
|
|
11792
12343
|
function listCacheDelete(key) {
|
|
11793
12344
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11794
12345
|
if (index < 0) {
|
|
@@ -11802,13 +12353,16 @@ var require_lodash3 = __commonJS({
|
|
|
11802
12353
|
}
|
|
11803
12354
|
return true;
|
|
11804
12355
|
}
|
|
12356
|
+
__name(listCacheDelete, "listCacheDelete");
|
|
11805
12357
|
function listCacheGet(key) {
|
|
11806
12358
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11807
12359
|
return index < 0 ? void 0 : data[index][1];
|
|
11808
12360
|
}
|
|
12361
|
+
__name(listCacheGet, "listCacheGet");
|
|
11809
12362
|
function listCacheHas(key) {
|
|
11810
12363
|
return assocIndexOf(this.__data__, key) > -1;
|
|
11811
12364
|
}
|
|
12365
|
+
__name(listCacheHas, "listCacheHas");
|
|
11812
12366
|
function listCacheSet(key, value) {
|
|
11813
12367
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11814
12368
|
if (index < 0) {
|
|
@@ -11818,6 +12372,7 @@ var require_lodash3 = __commonJS({
|
|
|
11818
12372
|
}
|
|
11819
12373
|
return this;
|
|
11820
12374
|
}
|
|
12375
|
+
__name(listCacheSet, "listCacheSet");
|
|
11821
12376
|
ListCache.prototype.clear = listCacheClear;
|
|
11822
12377
|
ListCache.prototype["delete"] = listCacheDelete;
|
|
11823
12378
|
ListCache.prototype.get = listCacheGet;
|
|
@@ -11831,6 +12386,7 @@ var require_lodash3 = __commonJS({
|
|
|
11831
12386
|
this.set(entry[0], entry[1]);
|
|
11832
12387
|
}
|
|
11833
12388
|
}
|
|
12389
|
+
__name(MapCache, "MapCache");
|
|
11834
12390
|
function mapCacheClear() {
|
|
11835
12391
|
this.__data__ = {
|
|
11836
12392
|
"hash": new Hash(),
|
|
@@ -11838,19 +12394,24 @@ var require_lodash3 = __commonJS({
|
|
|
11838
12394
|
"string": new Hash()
|
|
11839
12395
|
};
|
|
11840
12396
|
}
|
|
12397
|
+
__name(mapCacheClear, "mapCacheClear");
|
|
11841
12398
|
function mapCacheDelete(key) {
|
|
11842
12399
|
return getMapData(this, key)["delete"](key);
|
|
11843
12400
|
}
|
|
12401
|
+
__name(mapCacheDelete, "mapCacheDelete");
|
|
11844
12402
|
function mapCacheGet(key) {
|
|
11845
12403
|
return getMapData(this, key).get(key);
|
|
11846
12404
|
}
|
|
12405
|
+
__name(mapCacheGet, "mapCacheGet");
|
|
11847
12406
|
function mapCacheHas(key) {
|
|
11848
12407
|
return getMapData(this, key).has(key);
|
|
11849
12408
|
}
|
|
12409
|
+
__name(mapCacheHas, "mapCacheHas");
|
|
11850
12410
|
function mapCacheSet(key, value) {
|
|
11851
12411
|
getMapData(this, key).set(key, value);
|
|
11852
12412
|
return this;
|
|
11853
12413
|
}
|
|
12414
|
+
__name(mapCacheSet, "mapCacheSet");
|
|
11854
12415
|
MapCache.prototype.clear = mapCacheClear;
|
|
11855
12416
|
MapCache.prototype["delete"] = mapCacheDelete;
|
|
11856
12417
|
MapCache.prototype.get = mapCacheGet;
|
|
@@ -11863,30 +12424,38 @@ var require_lodash3 = __commonJS({
|
|
|
11863
12424
|
this.add(values[index]);
|
|
11864
12425
|
}
|
|
11865
12426
|
}
|
|
12427
|
+
__name(SetCache, "SetCache");
|
|
11866
12428
|
function setCacheAdd(value) {
|
|
11867
12429
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
11868
12430
|
return this;
|
|
11869
12431
|
}
|
|
12432
|
+
__name(setCacheAdd, "setCacheAdd");
|
|
11870
12433
|
function setCacheHas(value) {
|
|
11871
12434
|
return this.__data__.has(value);
|
|
11872
12435
|
}
|
|
12436
|
+
__name(setCacheHas, "setCacheHas");
|
|
11873
12437
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
11874
12438
|
SetCache.prototype.has = setCacheHas;
|
|
11875
12439
|
function Stack(entries) {
|
|
11876
12440
|
this.__data__ = new ListCache(entries);
|
|
11877
12441
|
}
|
|
12442
|
+
__name(Stack, "Stack");
|
|
11878
12443
|
function stackClear() {
|
|
11879
12444
|
this.__data__ = new ListCache();
|
|
11880
12445
|
}
|
|
12446
|
+
__name(stackClear, "stackClear");
|
|
11881
12447
|
function stackDelete(key) {
|
|
11882
12448
|
return this.__data__["delete"](key);
|
|
11883
12449
|
}
|
|
12450
|
+
__name(stackDelete, "stackDelete");
|
|
11884
12451
|
function stackGet(key) {
|
|
11885
12452
|
return this.__data__.get(key);
|
|
11886
12453
|
}
|
|
12454
|
+
__name(stackGet, "stackGet");
|
|
11887
12455
|
function stackHas(key) {
|
|
11888
12456
|
return this.__data__.has(key);
|
|
11889
12457
|
}
|
|
12458
|
+
__name(stackHas, "stackHas");
|
|
11890
12459
|
function stackSet(key, value) {
|
|
11891
12460
|
var cache = this.__data__;
|
|
11892
12461
|
if (cache instanceof ListCache) {
|
|
@@ -11900,6 +12469,7 @@ var require_lodash3 = __commonJS({
|
|
|
11900
12469
|
cache.set(key, value);
|
|
11901
12470
|
return this;
|
|
11902
12471
|
}
|
|
12472
|
+
__name(stackSet, "stackSet");
|
|
11903
12473
|
Stack.prototype.clear = stackClear;
|
|
11904
12474
|
Stack.prototype["delete"] = stackDelete;
|
|
11905
12475
|
Stack.prototype.get = stackGet;
|
|
@@ -11915,6 +12485,7 @@ var require_lodash3 = __commonJS({
|
|
|
11915
12485
|
}
|
|
11916
12486
|
return result;
|
|
11917
12487
|
}
|
|
12488
|
+
__name(arrayLikeKeys, "arrayLikeKeys");
|
|
11918
12489
|
function assocIndexOf(array, key) {
|
|
11919
12490
|
var length = array.length;
|
|
11920
12491
|
while (length--) {
|
|
@@ -11924,6 +12495,7 @@ var require_lodash3 = __commonJS({
|
|
|
11924
12495
|
}
|
|
11925
12496
|
return -1;
|
|
11926
12497
|
}
|
|
12498
|
+
__name(assocIndexOf, "assocIndexOf");
|
|
11927
12499
|
function baseGet(object, path) {
|
|
11928
12500
|
path = isKey(path, object) ? [path] : castPath(path);
|
|
11929
12501
|
var index = 0, length = path.length;
|
|
@@ -11932,12 +12504,15 @@ var require_lodash3 = __commonJS({
|
|
|
11932
12504
|
}
|
|
11933
12505
|
return index && index == length ? object : void 0;
|
|
11934
12506
|
}
|
|
12507
|
+
__name(baseGet, "baseGet");
|
|
11935
12508
|
function baseGetTag(value) {
|
|
11936
12509
|
return objectToString.call(value);
|
|
11937
12510
|
}
|
|
12511
|
+
__name(baseGetTag, "baseGetTag");
|
|
11938
12512
|
function baseHasIn(object, key) {
|
|
11939
12513
|
return object != null && key in Object(object);
|
|
11940
12514
|
}
|
|
12515
|
+
__name(baseHasIn, "baseHasIn");
|
|
11941
12516
|
function baseIsEqual(value, other, customizer, bitmask, stack) {
|
|
11942
12517
|
if (value === other) {
|
|
11943
12518
|
return true;
|
|
@@ -11947,6 +12522,7 @@ var require_lodash3 = __commonJS({
|
|
|
11947
12522
|
}
|
|
11948
12523
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
|
|
11949
12524
|
}
|
|
12525
|
+
__name(baseIsEqual, "baseIsEqual");
|
|
11950
12526
|
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
|
|
11951
12527
|
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
|
|
11952
12528
|
if (!objIsArr) {
|
|
@@ -11976,6 +12552,7 @@ var require_lodash3 = __commonJS({
|
|
|
11976
12552
|
stack || (stack = new Stack());
|
|
11977
12553
|
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
|
|
11978
12554
|
}
|
|
12555
|
+
__name(baseIsEqualDeep, "baseIsEqualDeep");
|
|
11979
12556
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
11980
12557
|
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
11981
12558
|
if (object == null) {
|
|
@@ -12007,6 +12584,7 @@ var require_lodash3 = __commonJS({
|
|
|
12007
12584
|
}
|
|
12008
12585
|
return true;
|
|
12009
12586
|
}
|
|
12587
|
+
__name(baseIsMatch, "baseIsMatch");
|
|
12010
12588
|
function baseIsNative(value) {
|
|
12011
12589
|
if (!isObject(value) || isMasked(value)) {
|
|
12012
12590
|
return false;
|
|
@@ -12014,9 +12592,11 @@ var require_lodash3 = __commonJS({
|
|
|
12014
12592
|
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
12015
12593
|
return pattern.test(toSource(value));
|
|
12016
12594
|
}
|
|
12595
|
+
__name(baseIsNative, "baseIsNative");
|
|
12017
12596
|
function baseIsTypedArray(value) {
|
|
12018
12597
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
|
|
12019
12598
|
}
|
|
12599
|
+
__name(baseIsTypedArray, "baseIsTypedArray");
|
|
12020
12600
|
function baseIteratee(value) {
|
|
12021
12601
|
if (typeof value == "function") {
|
|
12022
12602
|
return value;
|
|
@@ -12029,6 +12609,7 @@ var require_lodash3 = __commonJS({
|
|
|
12029
12609
|
}
|
|
12030
12610
|
return property(value);
|
|
12031
12611
|
}
|
|
12612
|
+
__name(baseIteratee, "baseIteratee");
|
|
12032
12613
|
function baseKeys(object) {
|
|
12033
12614
|
if (!isPrototype(object)) {
|
|
12034
12615
|
return nativeKeys(object);
|
|
@@ -12041,6 +12622,7 @@ var require_lodash3 = __commonJS({
|
|
|
12041
12622
|
}
|
|
12042
12623
|
return result;
|
|
12043
12624
|
}
|
|
12625
|
+
__name(baseKeys, "baseKeys");
|
|
12044
12626
|
function baseMatches(source) {
|
|
12045
12627
|
var matchData = getMatchData(source);
|
|
12046
12628
|
if (matchData.length == 1 && matchData[0][2]) {
|
|
@@ -12050,6 +12632,7 @@ var require_lodash3 = __commonJS({
|
|
|
12050
12632
|
return object === source || baseIsMatch(object, source, matchData);
|
|
12051
12633
|
};
|
|
12052
12634
|
}
|
|
12635
|
+
__name(baseMatches, "baseMatches");
|
|
12053
12636
|
function baseMatchesProperty(path, srcValue) {
|
|
12054
12637
|
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
12055
12638
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
@@ -12059,11 +12642,13 @@ var require_lodash3 = __commonJS({
|
|
|
12059
12642
|
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
|
|
12060
12643
|
};
|
|
12061
12644
|
}
|
|
12645
|
+
__name(baseMatchesProperty, "baseMatchesProperty");
|
|
12062
12646
|
function basePropertyDeep(path) {
|
|
12063
12647
|
return function(object) {
|
|
12064
12648
|
return baseGet(object, path);
|
|
12065
12649
|
};
|
|
12066
12650
|
}
|
|
12651
|
+
__name(basePropertyDeep, "basePropertyDeep");
|
|
12067
12652
|
function baseToString(value) {
|
|
12068
12653
|
if (typeof value == "string") {
|
|
12069
12654
|
return value;
|
|
@@ -12074,23 +12659,26 @@ var require_lodash3 = __commonJS({
|
|
|
12074
12659
|
var result = value + "";
|
|
12075
12660
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
12076
12661
|
}
|
|
12662
|
+
__name(baseToString, "baseToString");
|
|
12077
12663
|
function castPath(value) {
|
|
12078
12664
|
return isArray(value) ? value : stringToPath(value);
|
|
12079
12665
|
}
|
|
12666
|
+
__name(castPath, "castPath");
|
|
12080
12667
|
function createFind(findIndexFunc) {
|
|
12081
12668
|
return function(collection, predicate, fromIndex) {
|
|
12082
12669
|
var iterable = Object(collection);
|
|
12083
12670
|
if (!isArrayLike(collection)) {
|
|
12084
12671
|
var iteratee = baseIteratee(predicate, 3);
|
|
12085
12672
|
collection = keys(collection);
|
|
12086
|
-
predicate = function(key) {
|
|
12673
|
+
predicate = /* @__PURE__ */ __name(function(key) {
|
|
12087
12674
|
return iteratee(iterable[key], key, iterable);
|
|
12088
|
-
};
|
|
12675
|
+
}, "predicate");
|
|
12089
12676
|
}
|
|
12090
12677
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
12091
12678
|
return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0;
|
|
12092
12679
|
};
|
|
12093
12680
|
}
|
|
12681
|
+
__name(createFind, "createFind");
|
|
12094
12682
|
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
|
|
12095
12683
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
|
|
12096
12684
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
@@ -12133,6 +12721,7 @@ var require_lodash3 = __commonJS({
|
|
|
12133
12721
|
stack["delete"](other);
|
|
12134
12722
|
return result;
|
|
12135
12723
|
}
|
|
12724
|
+
__name(equalArrays, "equalArrays");
|
|
12136
12725
|
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
|
|
12137
12726
|
switch (tag) {
|
|
12138
12727
|
case dataViewTag:
|
|
@@ -12179,6 +12768,7 @@ var require_lodash3 = __commonJS({
|
|
|
12179
12768
|
}
|
|
12180
12769
|
return false;
|
|
12181
12770
|
}
|
|
12771
|
+
__name(equalByTag, "equalByTag");
|
|
12182
12772
|
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
|
|
12183
12773
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
|
|
12184
12774
|
if (objLength != othLength && !isPartial) {
|
|
@@ -12221,10 +12811,12 @@ var require_lodash3 = __commonJS({
|
|
|
12221
12811
|
stack["delete"](other);
|
|
12222
12812
|
return result;
|
|
12223
12813
|
}
|
|
12814
|
+
__name(equalObjects, "equalObjects");
|
|
12224
12815
|
function getMapData(map, key) {
|
|
12225
12816
|
var data = map.__data__;
|
|
12226
12817
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
12227
12818
|
}
|
|
12819
|
+
__name(getMapData, "getMapData");
|
|
12228
12820
|
function getMatchData(object) {
|
|
12229
12821
|
var result = keys(object), length = result.length;
|
|
12230
12822
|
while (length--) {
|
|
@@ -12233,13 +12825,15 @@ var require_lodash3 = __commonJS({
|
|
|
12233
12825
|
}
|
|
12234
12826
|
return result;
|
|
12235
12827
|
}
|
|
12828
|
+
__name(getMatchData, "getMatchData");
|
|
12236
12829
|
function getNative(object, key) {
|
|
12237
12830
|
var value = getValue(object, key);
|
|
12238
12831
|
return baseIsNative(value) ? value : void 0;
|
|
12239
12832
|
}
|
|
12833
|
+
__name(getNative, "getNative");
|
|
12240
12834
|
var getTag = baseGetTag;
|
|
12241
12835
|
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
12242
|
-
getTag = function(value) {
|
|
12836
|
+
getTag = /* @__PURE__ */ __name(function(value) {
|
|
12243
12837
|
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
12244
12838
|
if (ctorString) {
|
|
12245
12839
|
switch (ctorString) {
|
|
@@ -12256,7 +12850,7 @@ var require_lodash3 = __commonJS({
|
|
|
12256
12850
|
}
|
|
12257
12851
|
}
|
|
12258
12852
|
return result;
|
|
12259
|
-
};
|
|
12853
|
+
}, "getTag");
|
|
12260
12854
|
}
|
|
12261
12855
|
function hasPath(object, path, hasFunc) {
|
|
12262
12856
|
path = isKey(path, object) ? [path] : castPath(path);
|
|
@@ -12274,10 +12868,12 @@ var require_lodash3 = __commonJS({
|
|
|
12274
12868
|
var length = object ? object.length : 0;
|
|
12275
12869
|
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
12276
12870
|
}
|
|
12871
|
+
__name(hasPath, "hasPath");
|
|
12277
12872
|
function isIndex(value, length) {
|
|
12278
12873
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
12279
12874
|
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
12280
12875
|
}
|
|
12876
|
+
__name(isIndex, "isIndex");
|
|
12281
12877
|
function isKey(value, object) {
|
|
12282
12878
|
if (isArray(value)) {
|
|
12283
12879
|
return false;
|
|
@@ -12288,20 +12884,25 @@ var require_lodash3 = __commonJS({
|
|
|
12288
12884
|
}
|
|
12289
12885
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
12290
12886
|
}
|
|
12887
|
+
__name(isKey, "isKey");
|
|
12291
12888
|
function isKeyable(value) {
|
|
12292
12889
|
var type = typeof value;
|
|
12293
12890
|
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
12294
12891
|
}
|
|
12892
|
+
__name(isKeyable, "isKeyable");
|
|
12295
12893
|
function isMasked(func) {
|
|
12296
12894
|
return !!maskSrcKey && maskSrcKey in func;
|
|
12297
12895
|
}
|
|
12896
|
+
__name(isMasked, "isMasked");
|
|
12298
12897
|
function isPrototype(value) {
|
|
12299
12898
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
12300
12899
|
return value === proto;
|
|
12301
12900
|
}
|
|
12901
|
+
__name(isPrototype, "isPrototype");
|
|
12302
12902
|
function isStrictComparable(value) {
|
|
12303
12903
|
return value === value && !isObject(value);
|
|
12304
12904
|
}
|
|
12905
|
+
__name(isStrictComparable, "isStrictComparable");
|
|
12305
12906
|
function matchesStrictComparable(key, srcValue) {
|
|
12306
12907
|
return function(object) {
|
|
12307
12908
|
if (object == null) {
|
|
@@ -12310,6 +12911,7 @@ var require_lodash3 = __commonJS({
|
|
|
12310
12911
|
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
12311
12912
|
};
|
|
12312
12913
|
}
|
|
12914
|
+
__name(matchesStrictComparable, "matchesStrictComparable");
|
|
12313
12915
|
var stringToPath = memoize(function(string) {
|
|
12314
12916
|
string = toString(string);
|
|
12315
12917
|
var result = [];
|
|
@@ -12328,6 +12930,7 @@ var require_lodash3 = __commonJS({
|
|
|
12328
12930
|
var result = value + "";
|
|
12329
12931
|
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
12330
12932
|
}
|
|
12933
|
+
__name(toKey, "toKey");
|
|
12331
12934
|
function toSource(func) {
|
|
12332
12935
|
if (func != null) {
|
|
12333
12936
|
try {
|
|
@@ -12341,6 +12944,7 @@ var require_lodash3 = __commonJS({
|
|
|
12341
12944
|
}
|
|
12342
12945
|
return "";
|
|
12343
12946
|
}
|
|
12947
|
+
__name(toSource, "toSource");
|
|
12344
12948
|
function findLastIndex(array, predicate, fromIndex) {
|
|
12345
12949
|
var length = array ? array.length : 0;
|
|
12346
12950
|
if (!length) {
|
|
@@ -12353,12 +12957,13 @@ var require_lodash3 = __commonJS({
|
|
|
12353
12957
|
}
|
|
12354
12958
|
return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
|
|
12355
12959
|
}
|
|
12960
|
+
__name(findLastIndex, "findLastIndex");
|
|
12356
12961
|
var findLast = createFind(findLastIndex);
|
|
12357
12962
|
function memoize(func, resolver) {
|
|
12358
12963
|
if (typeof func != "function" || resolver && typeof resolver != "function") {
|
|
12359
12964
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
12360
12965
|
}
|
|
12361
|
-
var memoized = function() {
|
|
12966
|
+
var memoized = /* @__PURE__ */ __name(function() {
|
|
12362
12967
|
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
12363
12968
|
if (cache.has(key)) {
|
|
12364
12969
|
return cache.get(key);
|
|
@@ -12366,41 +12971,51 @@ var require_lodash3 = __commonJS({
|
|
|
12366
12971
|
var result = func.apply(this, args);
|
|
12367
12972
|
memoized.cache = cache.set(key, result);
|
|
12368
12973
|
return result;
|
|
12369
|
-
};
|
|
12974
|
+
}, "memoized");
|
|
12370
12975
|
memoized.cache = new (memoize.Cache || MapCache)();
|
|
12371
12976
|
return memoized;
|
|
12372
12977
|
}
|
|
12978
|
+
__name(memoize, "memoize");
|
|
12373
12979
|
memoize.Cache = MapCache;
|
|
12374
12980
|
function eq(value, other) {
|
|
12375
12981
|
return value === other || value !== value && other !== other;
|
|
12376
12982
|
}
|
|
12983
|
+
__name(eq, "eq");
|
|
12377
12984
|
function isArguments(value) {
|
|
12378
12985
|
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
|
|
12379
12986
|
}
|
|
12987
|
+
__name(isArguments, "isArguments");
|
|
12380
12988
|
var isArray = Array.isArray;
|
|
12381
12989
|
function isArrayLike(value) {
|
|
12382
12990
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
12383
12991
|
}
|
|
12992
|
+
__name(isArrayLike, "isArrayLike");
|
|
12384
12993
|
function isArrayLikeObject(value) {
|
|
12385
12994
|
return isObjectLike(value) && isArrayLike(value);
|
|
12386
12995
|
}
|
|
12996
|
+
__name(isArrayLikeObject, "isArrayLikeObject");
|
|
12387
12997
|
function isFunction(value) {
|
|
12388
12998
|
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
12389
12999
|
return tag == funcTag || tag == genTag;
|
|
12390
13000
|
}
|
|
13001
|
+
__name(isFunction, "isFunction");
|
|
12391
13002
|
function isLength(value) {
|
|
12392
13003
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
12393
13004
|
}
|
|
13005
|
+
__name(isLength, "isLength");
|
|
12394
13006
|
function isObject(value) {
|
|
12395
13007
|
var type = typeof value;
|
|
12396
13008
|
return !!value && (type == "object" || type == "function");
|
|
12397
13009
|
}
|
|
13010
|
+
__name(isObject, "isObject");
|
|
12398
13011
|
function isObjectLike(value) {
|
|
12399
13012
|
return !!value && typeof value == "object";
|
|
12400
13013
|
}
|
|
13014
|
+
__name(isObjectLike, "isObjectLike");
|
|
12401
13015
|
function isSymbol(value) {
|
|
12402
13016
|
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
12403
13017
|
}
|
|
13018
|
+
__name(isSymbol, "isSymbol");
|
|
12404
13019
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
12405
13020
|
function toFinite(value) {
|
|
12406
13021
|
if (!value) {
|
|
@@ -12413,10 +13028,12 @@ var require_lodash3 = __commonJS({
|
|
|
12413
13028
|
}
|
|
12414
13029
|
return value === value ? value : 0;
|
|
12415
13030
|
}
|
|
13031
|
+
__name(toFinite, "toFinite");
|
|
12416
13032
|
function toInteger(value) {
|
|
12417
13033
|
var result = toFinite(value), remainder = result % 1;
|
|
12418
13034
|
return result === result ? remainder ? result - remainder : result : 0;
|
|
12419
13035
|
}
|
|
13036
|
+
__name(toInteger, "toInteger");
|
|
12420
13037
|
function toNumber(value) {
|
|
12421
13038
|
if (typeof value == "number") {
|
|
12422
13039
|
return value;
|
|
@@ -12435,25 +13052,32 @@ var require_lodash3 = __commonJS({
|
|
|
12435
13052
|
var isBinary = reIsBinary.test(value);
|
|
12436
13053
|
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
12437
13054
|
}
|
|
13055
|
+
__name(toNumber, "toNumber");
|
|
12438
13056
|
function toString(value) {
|
|
12439
13057
|
return value == null ? "" : baseToString(value);
|
|
12440
13058
|
}
|
|
13059
|
+
__name(toString, "toString");
|
|
12441
13060
|
function get(object, path, defaultValue) {
|
|
12442
13061
|
var result = object == null ? void 0 : baseGet(object, path);
|
|
12443
13062
|
return result === void 0 ? defaultValue : result;
|
|
12444
13063
|
}
|
|
13064
|
+
__name(get, "get");
|
|
12445
13065
|
function hasIn(object, path) {
|
|
12446
13066
|
return object != null && hasPath(object, path, baseHasIn);
|
|
12447
13067
|
}
|
|
13068
|
+
__name(hasIn, "hasIn");
|
|
12448
13069
|
function keys(object) {
|
|
12449
13070
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
12450
13071
|
}
|
|
13072
|
+
__name(keys, "keys");
|
|
12451
13073
|
function identity(value) {
|
|
12452
13074
|
return value;
|
|
12453
13075
|
}
|
|
13076
|
+
__name(identity, "identity");
|
|
12454
13077
|
function property(path) {
|
|
12455
13078
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
12456
13079
|
}
|
|
13080
|
+
__name(property, "property");
|
|
12457
13081
|
module.exports = findLast;
|
|
12458
13082
|
}
|
|
12459
13083
|
});
|
|
@@ -12477,6 +13101,7 @@ var require_ticket2 = __commonJS({
|
|
|
12477
13101
|
return nanoid3(len);
|
|
12478
13102
|
}
|
|
12479
13103
|
};
|
|
13104
|
+
__name(Ticket, "Ticket");
|
|
12480
13105
|
Object.defineProperty(Ticket.prototype, "schema", {
|
|
12481
13106
|
value: schema
|
|
12482
13107
|
});
|
|
@@ -12585,6 +13210,7 @@ var require_gateway2 = __commonJS({
|
|
|
12585
13210
|
super(data);
|
|
12586
13211
|
}
|
|
12587
13212
|
};
|
|
13213
|
+
__name(Gateway, "Gateway");
|
|
12588
13214
|
Object.defineProperty(Gateway.prototype, "schema", {
|
|
12589
13215
|
value: schema
|
|
12590
13216
|
});
|
|
@@ -12655,6 +13281,7 @@ var require_product2 = __commonJS({
|
|
|
12655
13281
|
super(data);
|
|
12656
13282
|
}
|
|
12657
13283
|
};
|
|
13284
|
+
__name(Product, "Product");
|
|
12658
13285
|
Object.defineProperty(Product.prototype, "schema", {
|
|
12659
13286
|
value: schema
|
|
12660
13287
|
});
|
|
@@ -12732,6 +13359,7 @@ var require_discoveredDevice2 = __commonJS({
|
|
|
12732
13359
|
super(data);
|
|
12733
13360
|
}
|
|
12734
13361
|
};
|
|
13362
|
+
__name(DiscoveredDevice, "DiscoveredDevice");
|
|
12735
13363
|
Object.defineProperty(DiscoveredDevice.prototype, "schema", {
|
|
12736
13364
|
value: schema
|
|
12737
13365
|
});
|
|
@@ -12794,6 +13422,7 @@ var require_credential2 = __commonJS({
|
|
|
12794
13422
|
super(data);
|
|
12795
13423
|
}
|
|
12796
13424
|
};
|
|
13425
|
+
__name(Credential, "Credential");
|
|
12797
13426
|
Object.defineProperty(Credential.prototype, "schema", {
|
|
12798
13427
|
value: schema
|
|
12799
13428
|
});
|
|
@@ -12858,6 +13487,7 @@ var require_shortLink2 = __commonJS({
|
|
|
12858
13487
|
super(data);
|
|
12859
13488
|
}
|
|
12860
13489
|
};
|
|
13490
|
+
__name(ShortLink, "ShortLink");
|
|
12861
13491
|
Object.defineProperty(ShortLink.prototype, "schema", {
|
|
12862
13492
|
value: schema
|
|
12863
13493
|
});
|
|
@@ -12924,6 +13554,7 @@ var require_customer2 = __commonJS({
|
|
|
12924
13554
|
super(data);
|
|
12925
13555
|
}
|
|
12926
13556
|
};
|
|
13557
|
+
__name(Customer, "Customer");
|
|
12927
13558
|
Object.defineProperty(Customer.prototype, "schema", {
|
|
12928
13559
|
value: schema
|
|
12929
13560
|
});
|
|
@@ -13137,6 +13768,7 @@ var require_property2 = __commonJS({
|
|
|
13137
13768
|
super(data);
|
|
13138
13769
|
}
|
|
13139
13770
|
};
|
|
13771
|
+
__name(Property, "Property");
|
|
13140
13772
|
Object.defineProperty(Property.prototype, "schema", {
|
|
13141
13773
|
value: schema
|
|
13142
13774
|
});
|