@pritzlaff/nano-app 0.0.0-stage → 0.5.1
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/AGENTS.md +66 -0
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/app/app.css +160 -0
- package/app/bundle/nano-ui.js +2553 -0
- package/app/examples/auth/example.auth.js +6 -0
- package/app/examples/auth/nano.json +46 -0
- package/app/examples/chat/example.chat.js +6 -0
- package/app/examples/chat/example.messaging.js +3 -0
- package/app/examples/chat/nano.json +115 -0
- package/app/examples/drift/example.drift.js +3 -0
- package/app/examples/drift/nano.json +31 -0
- package/app/examples/kv/example.kv.js +3 -0
- package/app/examples/nano.json +353 -0
- package/app/examples/originkey/_nano/bundle/nano-ui.js +212 -0
- package/app/examples/originkey/_nano/sandbox/boot.js +1 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-2gg2vg5g.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-5h5dssvv.js +3 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-72b5e6vd.js +17 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-87v2yejk.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-hm29e227.js +7 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-jtgk4ch8.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-mqaje7vc.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-mxgap7rs.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-qy0mwf7y.js +1 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-wanb7xw1.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-class-map.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-decorators.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-directive.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-if-defined.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-ref.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-repeat.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-style-map.js +1 -0
- package/app/examples/originkey/_nano/shared/lit.js +1 -0
- package/app/examples/originkey/_nano/shared/nano-core.js +1 -0
- package/app/examples/originkey/_nano/shared/nano-elements.js +280 -0
- package/app/examples/originkey/_nano/shared/typebox-value.js +1 -0
- package/app/examples/originkey/_nano/shared/typebox.js +1 -0
- package/app/examples/originkey/example.originkey.js +6 -0
- package/app/examples/originkey/frame.html +1 -0
- package/app/examples/originkey/nano.json +50 -0
- package/app/examples/raft/example.raft.js +30 -0
- package/app/examples/raft/nano.json +74 -0
- package/app/examples/slice/nano.json +63 -0
- package/app/examples/slice/shout.js +14 -0
- package/app/examples/template/acme.template.js +11 -0
- package/app/examples/template/index.js +194 -0
- package/app/examples/template/nano.json +32 -0
- package/app/examples/todo/example.todo.js +8 -0
- package/app/examples/todo/nano.json +77 -0
- package/app/examples/typing/nano.json +33 -0
- package/app/favicon.svg +1 -0
- package/app/index.html +152 -0
- package/app/main.js +15906 -0
- package/app/react/index.html +50 -0
- package/app/react/main.js +9 -0
- package/app/sandbox/boot.js +980 -0
- package/app/shared/chunks/nano-core-296y9rgd.js +4321 -0
- package/app/shared/chunks/nano-core-2zz7d74m.js +16 -0
- package/app/shared/chunks/nano-core-35ryhkm1.js +33 -0
- package/app/shared/chunks/nano-core-5a3r312d.js +866 -0
- package/app/shared/chunks/nano-core-89mtxedm.js +186 -0
- package/app/shared/chunks/nano-core-bf13r20v.js +77 -0
- package/app/shared/chunks/nano-core-g3414rnc.js +248 -0
- package/app/shared/chunks/nano-core-hyg0qdwg.js +547 -0
- package/app/shared/chunks/nano-core-sxgrxy03.js +53 -0
- package/app/shared/chunks/nano-core-wg5c961d.js +4564 -0
- package/app/shared/lit-class-map.js +60 -0
- package/app/shared/lit-decorators.js +228 -0
- package/app/shared/lit-directive.js +11 -0
- package/app/shared/lit-if-defined.js +10 -0
- package/app/shared/lit-ref.js +12 -0
- package/app/shared/lit-repeat.js +141 -0
- package/app/shared/lit-style-map.js +67 -0
- package/app/shared/lit.js +47 -0
- package/app/shared/nano-core.js +2348 -0
- package/app/shared/nano-elements.js +1178 -0
- package/app/shared/typebox-value.js +78 -0
- package/app/shared/typebox.js +580 -0
- package/app/shared/versions.json +6 -0
- package/bin/nano-app.ts +34 -0
- package/package.json +22 -4
- package/src/events.ts +11 -0
- package/src/serve.ts +68 -0
- package/src/watch.ts +27 -0
|
@@ -0,0 +1,4564 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./nano-core-2zz7d74m.js";
|
|
4
|
+
|
|
5
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/emit.mjs
|
|
6
|
+
var exports_emit = {};
|
|
7
|
+
__export(exports_emit, {
|
|
8
|
+
Ternary: () => Ternary,
|
|
9
|
+
Statements: () => Statements,
|
|
10
|
+
SomeAll: () => SomeAll2,
|
|
11
|
+
Some: () => Some2,
|
|
12
|
+
Return: () => Return,
|
|
13
|
+
ReduceOr: () => ReduceOr,
|
|
14
|
+
ReduceAnd: () => ReduceAnd,
|
|
15
|
+
Or: () => Or,
|
|
16
|
+
Not: () => Not,
|
|
17
|
+
New: () => New,
|
|
18
|
+
MultipleOf: () => MultipleOf,
|
|
19
|
+
Member: () => Member,
|
|
20
|
+
Keys: () => Keys2,
|
|
21
|
+
IsUndefined: () => IsUndefined2,
|
|
22
|
+
IsSymbol: () => IsSymbol2,
|
|
23
|
+
IsString: () => IsString2,
|
|
24
|
+
IsObjectNotArray: () => IsObjectNotArray2,
|
|
25
|
+
IsObject: () => IsObject2,
|
|
26
|
+
IsNumber: () => IsNumber2,
|
|
27
|
+
IsNull: () => IsNull2,
|
|
28
|
+
IsMinLength: () => IsMinLength3,
|
|
29
|
+
IsMaxLength: () => IsMaxLength3,
|
|
30
|
+
IsLessThan: () => IsLessThan2,
|
|
31
|
+
IsLessEqualThan: () => IsLessEqualThan2,
|
|
32
|
+
IsInteger: () => IsInteger2,
|
|
33
|
+
IsGreaterThan: () => IsGreaterThan2,
|
|
34
|
+
IsGreaterEqualThan: () => IsGreaterEqualThan2,
|
|
35
|
+
IsFunction: () => IsFunction2,
|
|
36
|
+
IsEqual: () => IsEqual2,
|
|
37
|
+
IsDeepEqual: () => IsDeepEqual2,
|
|
38
|
+
IsConstructor: () => IsConstructor2,
|
|
39
|
+
IsBoolean: () => IsBoolean2,
|
|
40
|
+
IsBigInt: () => IsBigInt2,
|
|
41
|
+
IsArray: () => IsArray2,
|
|
42
|
+
If: () => If,
|
|
43
|
+
HasPropertyKey: () => HasPropertyKey2,
|
|
44
|
+
Every: () => Every2,
|
|
45
|
+
Entries: () => Entries2,
|
|
46
|
+
Counted: () => Counted2,
|
|
47
|
+
Constant: () => Constant,
|
|
48
|
+
ConstDeclaration: () => ConstDeclaration,
|
|
49
|
+
Call: () => Call,
|
|
50
|
+
ArrowFunction: () => ArrowFunction,
|
|
51
|
+
ArrayLiteral: () => ArrayLiteral,
|
|
52
|
+
And: () => And
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/guard.mjs
|
|
56
|
+
var exports_guard = {};
|
|
57
|
+
__export(exports_guard, {
|
|
58
|
+
Values: () => Values,
|
|
59
|
+
Symbols: () => Symbols,
|
|
60
|
+
SomeAll: () => SomeAll,
|
|
61
|
+
Some: () => Some,
|
|
62
|
+
ShiftLeft: () => ShiftLeft,
|
|
63
|
+
Keys: () => Keys,
|
|
64
|
+
IsValueLike: () => IsValueLike,
|
|
65
|
+
IsUnsafePropertyKey: () => IsUnsafePropertyKey,
|
|
66
|
+
IsUndefined: () => IsUndefined,
|
|
67
|
+
IsSymbol: () => IsSymbol,
|
|
68
|
+
IsString: () => IsString,
|
|
69
|
+
IsObjectNotArray: () => IsObjectNotArray,
|
|
70
|
+
IsObject: () => IsObject,
|
|
71
|
+
IsNumber: () => IsNumber,
|
|
72
|
+
IsNull: () => IsNull,
|
|
73
|
+
IsMultipleOf: () => IsMultipleOf,
|
|
74
|
+
IsMinLength: () => IsMinLength2,
|
|
75
|
+
IsMaxLength: () => IsMaxLength2,
|
|
76
|
+
IsLessThan: () => IsLessThan,
|
|
77
|
+
IsLessEqualThan: () => IsLessEqualThan,
|
|
78
|
+
IsInteger: () => IsInteger,
|
|
79
|
+
IsGreaterThan: () => IsGreaterThan,
|
|
80
|
+
IsGreaterEqualThan: () => IsGreaterEqualThan,
|
|
81
|
+
IsFunction: () => IsFunction,
|
|
82
|
+
IsEqual: () => IsEqual,
|
|
83
|
+
IsDeepEqual: () => IsDeepEqual,
|
|
84
|
+
IsConstructor: () => IsConstructor,
|
|
85
|
+
IsClassInstance: () => IsClassInstance,
|
|
86
|
+
IsBoolean: () => IsBoolean,
|
|
87
|
+
IsBigInt: () => IsBigInt,
|
|
88
|
+
IsArray: () => IsArray,
|
|
89
|
+
HasPropertyKey: () => HasPropertyKey,
|
|
90
|
+
GraphemeCount: () => GraphemeCount2,
|
|
91
|
+
EveryAll: () => EveryAll,
|
|
92
|
+
Every: () => Every,
|
|
93
|
+
EntriesRegExp: () => EntriesRegExp,
|
|
94
|
+
Entries: () => Entries,
|
|
95
|
+
Counted: () => Counted,
|
|
96
|
+
CodePointCount: () => CodePointCount2
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/unicode/unicode_segment.mjs
|
|
100
|
+
function IsBetween(value, min, max) {
|
|
101
|
+
return value >= min && value <= max;
|
|
102
|
+
}
|
|
103
|
+
function IsZeroWidthJoiner(value) {
|
|
104
|
+
return value === 8205;
|
|
105
|
+
}
|
|
106
|
+
function IsRegionalIndicator(value) {
|
|
107
|
+
return IsBetween(value, 127462, 127487);
|
|
108
|
+
}
|
|
109
|
+
function IsVariationSelector(value) {
|
|
110
|
+
return IsBetween(value, 65024, 65039);
|
|
111
|
+
}
|
|
112
|
+
function IsCombiningMark(value) {
|
|
113
|
+
return IsBetween(value, 768, 879) || IsBetween(value, 6832, 6911) || IsBetween(value, 7616, 7679) || IsBetween(value, 65056, 65071);
|
|
114
|
+
}
|
|
115
|
+
function CodePointLength(value) {
|
|
116
|
+
return value > 65535 ? 2 : 1;
|
|
117
|
+
}
|
|
118
|
+
function ConsumeModifiers(value, index) {
|
|
119
|
+
while (index < value.length) {
|
|
120
|
+
const point = value.codePointAt(index);
|
|
121
|
+
if (IsCombiningMark(point) || IsVariationSelector(point)) {
|
|
122
|
+
index += CodePointLength(point);
|
|
123
|
+
} else {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return index;
|
|
128
|
+
}
|
|
129
|
+
function NextGraphemeClusterIndex(value, clusterStart) {
|
|
130
|
+
const startCP = value.codePointAt(clusterStart);
|
|
131
|
+
let clusterEnd = clusterStart + CodePointLength(startCP);
|
|
132
|
+
clusterEnd = ConsumeModifiers(value, clusterEnd);
|
|
133
|
+
while (clusterEnd < value.length - 1 && IsZeroWidthJoiner(value.codePointAt(clusterEnd))) {
|
|
134
|
+
const nextCP = value.codePointAt(clusterEnd + 1);
|
|
135
|
+
clusterEnd += 1 + CodePointLength(nextCP);
|
|
136
|
+
clusterEnd = ConsumeModifiers(value, clusterEnd);
|
|
137
|
+
}
|
|
138
|
+
if (IsRegionalIndicator(startCP) && clusterEnd < value.length && IsRegionalIndicator(value.codePointAt(clusterEnd))) {
|
|
139
|
+
clusterEnd += CodePointLength(value.codePointAt(clusterEnd));
|
|
140
|
+
}
|
|
141
|
+
return clusterEnd;
|
|
142
|
+
}
|
|
143
|
+
function GraphemeCount(value) {
|
|
144
|
+
let count = 0, index = 0;
|
|
145
|
+
while (index < value.length) {
|
|
146
|
+
index = NextGraphemeClusterIndex(value, index);
|
|
147
|
+
count++;
|
|
148
|
+
}
|
|
149
|
+
return count;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/unicode/unicode.mjs
|
|
153
|
+
function CodePointCount(value) {
|
|
154
|
+
let result = 0, index = 0, prev = 0;
|
|
155
|
+
while (index < value.length) {
|
|
156
|
+
const next = value.charCodeAt(index++) >> 10;
|
|
157
|
+
result += +((prev << 8 | next) !== 13879);
|
|
158
|
+
prev = next;
|
|
159
|
+
}
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
function IsMaxLength(value, maxLength) {
|
|
163
|
+
return value.length <= maxLength || value.length <= maxLength << 1 && CodePointCount(value) <= maxLength;
|
|
164
|
+
}
|
|
165
|
+
function IsMinLength(value, minLength) {
|
|
166
|
+
return value.length >= minLength << 1 || value.length >= minLength && CodePointCount(value) >= minLength;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/guard.mjs
|
|
170
|
+
function IsArray(value) {
|
|
171
|
+
return Array.isArray(value);
|
|
172
|
+
}
|
|
173
|
+
function IsBigInt(value) {
|
|
174
|
+
return IsEqual(typeof value, "bigint");
|
|
175
|
+
}
|
|
176
|
+
function IsBoolean(value) {
|
|
177
|
+
return IsEqual(typeof value, "boolean");
|
|
178
|
+
}
|
|
179
|
+
function IsConstructor(value) {
|
|
180
|
+
if (IsUndefined(value) || !IsFunction(value))
|
|
181
|
+
return false;
|
|
182
|
+
const result = Function.prototype.toString.call(value);
|
|
183
|
+
if (/^class\s/.test(result))
|
|
184
|
+
return true;
|
|
185
|
+
if (/\[native code\]/.test(result))
|
|
186
|
+
return true;
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
function IsFunction(value) {
|
|
190
|
+
return IsEqual(typeof value, "function");
|
|
191
|
+
}
|
|
192
|
+
function IsInteger(value) {
|
|
193
|
+
return Number.isInteger(value);
|
|
194
|
+
}
|
|
195
|
+
function IsNull(value) {
|
|
196
|
+
return IsEqual(value, null);
|
|
197
|
+
}
|
|
198
|
+
function IsNumber(value) {
|
|
199
|
+
return Number.isFinite(value);
|
|
200
|
+
}
|
|
201
|
+
function IsObjectNotArray(value) {
|
|
202
|
+
return IsObject(value) && !IsArray(value);
|
|
203
|
+
}
|
|
204
|
+
function IsObject(value) {
|
|
205
|
+
return IsEqual(typeof value, "object") && !IsNull(value);
|
|
206
|
+
}
|
|
207
|
+
function IsString(value) {
|
|
208
|
+
return IsEqual(typeof value, "string");
|
|
209
|
+
}
|
|
210
|
+
function IsSymbol(value) {
|
|
211
|
+
return IsEqual(typeof value, "symbol");
|
|
212
|
+
}
|
|
213
|
+
function IsUndefined(value) {
|
|
214
|
+
return IsEqual(value, undefined);
|
|
215
|
+
}
|
|
216
|
+
function IsEqual(left, right) {
|
|
217
|
+
return left === right;
|
|
218
|
+
}
|
|
219
|
+
function IsGreaterThan(left, right) {
|
|
220
|
+
return left > right;
|
|
221
|
+
}
|
|
222
|
+
function IsLessThan(left, right) {
|
|
223
|
+
return left < right;
|
|
224
|
+
}
|
|
225
|
+
function IsLessEqualThan(left, right) {
|
|
226
|
+
return left <= right;
|
|
227
|
+
}
|
|
228
|
+
function IsGreaterEqualThan(left, right) {
|
|
229
|
+
return left >= right;
|
|
230
|
+
}
|
|
231
|
+
function IsMultipleOf(dividend, divisor) {
|
|
232
|
+
if (IsBigInt(dividend) || IsBigInt(divisor)) {
|
|
233
|
+
return BigInt(dividend) % BigInt(divisor) === 0n;
|
|
234
|
+
}
|
|
235
|
+
const tolerance = 0.0000000001;
|
|
236
|
+
if (!IsNumber(dividend))
|
|
237
|
+
return true;
|
|
238
|
+
if (IsInteger(dividend) && 1 / divisor % 1 === 0)
|
|
239
|
+
return true;
|
|
240
|
+
const mod = dividend % divisor;
|
|
241
|
+
return Math.min(Math.abs(mod), Math.abs(mod - divisor), Math.abs(mod + divisor)) < tolerance;
|
|
242
|
+
}
|
|
243
|
+
function IsClassInstance(value) {
|
|
244
|
+
if (!IsObject(value))
|
|
245
|
+
return false;
|
|
246
|
+
const proto = globalThis.Object.getPrototypeOf(value);
|
|
247
|
+
if (IsNull(proto))
|
|
248
|
+
return false;
|
|
249
|
+
return IsEqual(typeof proto.constructor, "function") && !(IsEqual(proto.constructor, globalThis.Object) || IsEqual(proto.constructor.name, "Object"));
|
|
250
|
+
}
|
|
251
|
+
function IsValueLike(value) {
|
|
252
|
+
return IsBigInt(value) || IsBoolean(value) || IsNull(value) || IsNumber(value) || IsString(value) || IsUndefined(value);
|
|
253
|
+
}
|
|
254
|
+
function GraphemeCount2(value) {
|
|
255
|
+
return GraphemeCount(value);
|
|
256
|
+
}
|
|
257
|
+
function CodePointCount2(value) {
|
|
258
|
+
return CodePointCount(value);
|
|
259
|
+
}
|
|
260
|
+
function IsMaxLength2(value, maxLength) {
|
|
261
|
+
return IsMaxLength(value, maxLength);
|
|
262
|
+
}
|
|
263
|
+
function IsMinLength2(value, minLength) {
|
|
264
|
+
return IsMinLength(value, minLength);
|
|
265
|
+
}
|
|
266
|
+
function Every(value, offset, callback) {
|
|
267
|
+
return value.every((item, index) => index < offset || callback(item, index));
|
|
268
|
+
}
|
|
269
|
+
function EveryAll(value, offset, callback) {
|
|
270
|
+
let result = true;
|
|
271
|
+
value.forEach((item, index) => {
|
|
272
|
+
if (index >= offset && !callback(item, index))
|
|
273
|
+
result = false;
|
|
274
|
+
});
|
|
275
|
+
return result;
|
|
276
|
+
}
|
|
277
|
+
function Some(value, callback) {
|
|
278
|
+
return value.some((value2, index) => callback(value2, index));
|
|
279
|
+
}
|
|
280
|
+
function SomeAll(value, callback) {
|
|
281
|
+
let result = false;
|
|
282
|
+
value.forEach((item, index) => {
|
|
283
|
+
if (callback(item, index))
|
|
284
|
+
result = true;
|
|
285
|
+
});
|
|
286
|
+
return result;
|
|
287
|
+
}
|
|
288
|
+
function Counted(value, callback) {
|
|
289
|
+
return value.reduce((result, value2, index) => callback(value2, index) ? ++result : result, 0);
|
|
290
|
+
}
|
|
291
|
+
function ShiftLeft(array, true_, false_) {
|
|
292
|
+
return IsEqual(array.length, 0) ? false_() : true_(array[0], array.slice(1));
|
|
293
|
+
}
|
|
294
|
+
function IsUnsafePropertyKey(key) {
|
|
295
|
+
return IsEqual(key, "__proto__") || IsEqual(key, "constructor") || IsEqual(key, "prototype");
|
|
296
|
+
}
|
|
297
|
+
function HasPropertyKey(value, key) {
|
|
298
|
+
return IsUnsafePropertyKey(key) ? Object.prototype.hasOwnProperty.call(value, key) : (key in value);
|
|
299
|
+
}
|
|
300
|
+
function EntriesRegExp(value) {
|
|
301
|
+
return Keys(value).map((key) => [new RegExp(`^${key}$`), value[key]]);
|
|
302
|
+
}
|
|
303
|
+
function Entries(value) {
|
|
304
|
+
return Object.entries(value);
|
|
305
|
+
}
|
|
306
|
+
function Keys(value) {
|
|
307
|
+
return Object.getOwnPropertyNames(value);
|
|
308
|
+
}
|
|
309
|
+
function Symbols(value) {
|
|
310
|
+
return Object.getOwnPropertySymbols(value);
|
|
311
|
+
}
|
|
312
|
+
function Values(value) {
|
|
313
|
+
return Object.values(value);
|
|
314
|
+
}
|
|
315
|
+
function DeepEqualObject(left, right) {
|
|
316
|
+
if (!IsObject(right))
|
|
317
|
+
return false;
|
|
318
|
+
const keys = Keys(left);
|
|
319
|
+
return IsEqual(keys.length, Keys(right).length) && keys.every((key) => IsDeepEqual(left[key], right[key]));
|
|
320
|
+
}
|
|
321
|
+
function DeepEqualArray(left, right) {
|
|
322
|
+
return IsArray(right) && IsEqual(left.length, right.length) && left.every((_, index) => IsDeepEqual(left[index], right[index]));
|
|
323
|
+
}
|
|
324
|
+
function IsDeepEqual(left, right) {
|
|
325
|
+
return IsArray(left) ? DeepEqualArray(left, right) : IsObject(left) ? DeepEqualObject(left, right) : IsEqual(left, right);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/emit.mjs
|
|
329
|
+
var identifierRegExp = /^[\p{ID_Start}_$][\p{ID_Continue}_$\u200C\u200D]*$/u;
|
|
330
|
+
function IsIdentifier(value) {
|
|
331
|
+
return identifierRegExp.test(value);
|
|
332
|
+
}
|
|
333
|
+
function And(left, right) {
|
|
334
|
+
return `(${left} && ${right})`;
|
|
335
|
+
}
|
|
336
|
+
function Or(left, right) {
|
|
337
|
+
return `(${left} || ${right})`;
|
|
338
|
+
}
|
|
339
|
+
function Not(expr) {
|
|
340
|
+
return `!(${expr})`;
|
|
341
|
+
}
|
|
342
|
+
function IsArray2(value) {
|
|
343
|
+
return `Array.isArray(${value})`;
|
|
344
|
+
}
|
|
345
|
+
function IsBigInt2(value) {
|
|
346
|
+
return `typeof ${value} === "bigint"`;
|
|
347
|
+
}
|
|
348
|
+
function IsBoolean2(value) {
|
|
349
|
+
return `typeof ${value} === "boolean"`;
|
|
350
|
+
}
|
|
351
|
+
function IsInteger2(value) {
|
|
352
|
+
return `Number.isInteger(${value})`;
|
|
353
|
+
}
|
|
354
|
+
function IsNull2(value) {
|
|
355
|
+
return `${value} === null`;
|
|
356
|
+
}
|
|
357
|
+
function IsNumber2(value) {
|
|
358
|
+
return `Number.isFinite(${value})`;
|
|
359
|
+
}
|
|
360
|
+
function IsObjectNotArray2(value) {
|
|
361
|
+
return And(IsObject2(value), Not(IsArray2(value)));
|
|
362
|
+
}
|
|
363
|
+
function IsObject2(value) {
|
|
364
|
+
return `typeof ${value} === "object" && ${value} !== null`;
|
|
365
|
+
}
|
|
366
|
+
function IsString2(value) {
|
|
367
|
+
return `typeof ${value} === "string"`;
|
|
368
|
+
}
|
|
369
|
+
function IsSymbol2(value) {
|
|
370
|
+
return `typeof ${value} === "symbol"`;
|
|
371
|
+
}
|
|
372
|
+
function IsUndefined2(value) {
|
|
373
|
+
return `${value} === undefined`;
|
|
374
|
+
}
|
|
375
|
+
function IsFunction2(value) {
|
|
376
|
+
return `typeof ${value} === "function"`;
|
|
377
|
+
}
|
|
378
|
+
function IsConstructor2(value) {
|
|
379
|
+
return `Guard.IsConstructor(${value})`;
|
|
380
|
+
}
|
|
381
|
+
function IsEqual2(left, right) {
|
|
382
|
+
return `${left} === ${right}`;
|
|
383
|
+
}
|
|
384
|
+
function IsGreaterThan2(left, right) {
|
|
385
|
+
return `${left} > ${right}`;
|
|
386
|
+
}
|
|
387
|
+
function IsLessThan2(left, right) {
|
|
388
|
+
return `${left} < ${right}`;
|
|
389
|
+
}
|
|
390
|
+
function IsLessEqualThan2(left, right) {
|
|
391
|
+
return `${left} <= ${right}`;
|
|
392
|
+
}
|
|
393
|
+
function IsGreaterEqualThan2(left, right) {
|
|
394
|
+
return `${left} >= ${right}`;
|
|
395
|
+
}
|
|
396
|
+
function IsMinLength3(value, length) {
|
|
397
|
+
return `(${value}.length >= ${+length << 1} || (${value}.length >= ${length} && Guard.CodePointCount(${value}) >= ${length}))`;
|
|
398
|
+
}
|
|
399
|
+
function IsMaxLength3(value, length) {
|
|
400
|
+
return `(${value}.length <= ${length} || (${value}.length <= ${+length << 1} && Guard.CodePointCount(${value}) <= ${length}))`;
|
|
401
|
+
}
|
|
402
|
+
function Every2(value, offset, params, expression) {
|
|
403
|
+
return IsEqual(offset, "0") ? `${value}.every((${params[0]}, ${params[1]}) => (${expression}))` : `${value}.every((${params[0]}, ${params[1]}) => (${params[1]} < ${offset}) || (${expression}))`;
|
|
404
|
+
}
|
|
405
|
+
function Some2(value, params, expression) {
|
|
406
|
+
return `${value}.some((${params[0]}, ${params[1]}) => ${expression})`;
|
|
407
|
+
}
|
|
408
|
+
function SomeAll2(value, params, expression) {
|
|
409
|
+
return `((value) => { let result = false; value.forEach((${params[0]}, ${params[1]}) => { if (${expression}) result = true }); return result })(${value})`;
|
|
410
|
+
}
|
|
411
|
+
function Counted2(value, params, expression) {
|
|
412
|
+
return `${value}.reduce((result, ${params[0]}, ${params[1]}) => (${expression}) ? ++result : result, 0)`;
|
|
413
|
+
}
|
|
414
|
+
function Entries2(value) {
|
|
415
|
+
return `Object.entries(${value})`;
|
|
416
|
+
}
|
|
417
|
+
function Keys2(value) {
|
|
418
|
+
return `Object.getOwnPropertyNames(${value})`;
|
|
419
|
+
}
|
|
420
|
+
function HasPropertyKey2(value, key) {
|
|
421
|
+
const isProtoField = IsEqual(key, '"__proto__"') || IsEqual(key, '"constructor"');
|
|
422
|
+
return isProtoField ? `Object.prototype.hasOwnProperty.call(${value}, ${key})` : `${key} in ${value}`;
|
|
423
|
+
}
|
|
424
|
+
function IsDeepEqual2(left, right) {
|
|
425
|
+
return `Guard.IsDeepEqual(${left}, ${right})`;
|
|
426
|
+
}
|
|
427
|
+
function ArrayLiteral(elements) {
|
|
428
|
+
return `[${elements.join(", ")}]`;
|
|
429
|
+
}
|
|
430
|
+
function ArrowFunction(parameters, body) {
|
|
431
|
+
return `((${parameters.join(", ")}) => ${body})`;
|
|
432
|
+
}
|
|
433
|
+
function Call(value, arguments_) {
|
|
434
|
+
return `${value}(${arguments_.join(", ")})`;
|
|
435
|
+
}
|
|
436
|
+
function New(value, arguments_) {
|
|
437
|
+
return `new ${value}(${arguments_.join(", ")})`;
|
|
438
|
+
}
|
|
439
|
+
function Member(left, right) {
|
|
440
|
+
return `${left}${IsIdentifier(right) ? `.${right}` : `[${Constant(right)}]`}`;
|
|
441
|
+
}
|
|
442
|
+
function Constant(value) {
|
|
443
|
+
if (!IsValueLike(value))
|
|
444
|
+
throw Error("Unsupported Constant");
|
|
445
|
+
return IsString(value) ? JSON.stringify(value) : `${value}`;
|
|
446
|
+
}
|
|
447
|
+
function Ternary(condition, true_, false_) {
|
|
448
|
+
return `(${condition} ? ${true_} : ${false_})`;
|
|
449
|
+
}
|
|
450
|
+
function Statements(statements) {
|
|
451
|
+
return `{ ${statements.join("; ")}; }`;
|
|
452
|
+
}
|
|
453
|
+
function ConstDeclaration(identifier, expression) {
|
|
454
|
+
return `const ${identifier} = ${expression}`;
|
|
455
|
+
}
|
|
456
|
+
function If(condition, then) {
|
|
457
|
+
return `if(${condition}) { ${then} }`;
|
|
458
|
+
}
|
|
459
|
+
function Return(expression) {
|
|
460
|
+
return `return ${expression}`;
|
|
461
|
+
}
|
|
462
|
+
function ReduceAnd(operands) {
|
|
463
|
+
return IsEqual(operands.length, 0) ? "true" : operands.reduce((left, right) => And(left, right));
|
|
464
|
+
}
|
|
465
|
+
function ReduceOr(operands) {
|
|
466
|
+
return IsEqual(operands.length, 0) ? "false" : operands.reduce((left, right) => Or(left, right));
|
|
467
|
+
}
|
|
468
|
+
function MultipleOf(dividend, divisor) {
|
|
469
|
+
return `Guard.IsMultipleOf(${dividend}, ${divisor})`;
|
|
470
|
+
}
|
|
471
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/globals.mjs
|
|
472
|
+
var exports_globals = {};
|
|
473
|
+
__export(exports_globals, {
|
|
474
|
+
IsUint8ClampedArray: () => IsUint8ClampedArray,
|
|
475
|
+
IsUint8Array: () => IsUint8Array,
|
|
476
|
+
IsUint32Array: () => IsUint32Array,
|
|
477
|
+
IsUint16Array: () => IsUint16Array,
|
|
478
|
+
IsTypeArray: () => IsTypeArray,
|
|
479
|
+
IsString: () => IsString3,
|
|
480
|
+
IsSet: () => IsSet,
|
|
481
|
+
IsRegExp: () => IsRegExp,
|
|
482
|
+
IsNumber: () => IsNumber3,
|
|
483
|
+
IsMap: () => IsMap,
|
|
484
|
+
IsInt8Array: () => IsInt8Array,
|
|
485
|
+
IsInt32Array: () => IsInt32Array,
|
|
486
|
+
IsInt16Array: () => IsInt16Array,
|
|
487
|
+
IsFloat64Array: () => IsFloat64Array,
|
|
488
|
+
IsFloat32Array: () => IsFloat32Array,
|
|
489
|
+
IsDate: () => IsDate,
|
|
490
|
+
IsBoolean: () => IsBoolean3,
|
|
491
|
+
IsBigUint64Array: () => IsBigUint64Array,
|
|
492
|
+
IsBigInt64Array: () => IsBigInt64Array
|
|
493
|
+
});
|
|
494
|
+
function IsBoolean3(value) {
|
|
495
|
+
return value instanceof Boolean;
|
|
496
|
+
}
|
|
497
|
+
function IsNumber3(value) {
|
|
498
|
+
return value instanceof Number;
|
|
499
|
+
}
|
|
500
|
+
function IsString3(value) {
|
|
501
|
+
return value instanceof String;
|
|
502
|
+
}
|
|
503
|
+
function IsTypeArray(value) {
|
|
504
|
+
return globalThis.ArrayBuffer.isView(value);
|
|
505
|
+
}
|
|
506
|
+
function IsInt8Array(value) {
|
|
507
|
+
return value instanceof globalThis.Int8Array;
|
|
508
|
+
}
|
|
509
|
+
function IsUint8Array(value) {
|
|
510
|
+
return value instanceof globalThis.Uint8Array;
|
|
511
|
+
}
|
|
512
|
+
function IsUint8ClampedArray(value) {
|
|
513
|
+
return value instanceof globalThis.Uint8ClampedArray;
|
|
514
|
+
}
|
|
515
|
+
function IsInt16Array(value) {
|
|
516
|
+
return value instanceof globalThis.Int16Array;
|
|
517
|
+
}
|
|
518
|
+
function IsUint16Array(value) {
|
|
519
|
+
return value instanceof globalThis.Uint16Array;
|
|
520
|
+
}
|
|
521
|
+
function IsInt32Array(value) {
|
|
522
|
+
return value instanceof globalThis.Int32Array;
|
|
523
|
+
}
|
|
524
|
+
function IsUint32Array(value) {
|
|
525
|
+
return value instanceof globalThis.Uint32Array;
|
|
526
|
+
}
|
|
527
|
+
function IsFloat32Array(value) {
|
|
528
|
+
return value instanceof globalThis.Float32Array;
|
|
529
|
+
}
|
|
530
|
+
function IsFloat64Array(value) {
|
|
531
|
+
return value instanceof globalThis.Float64Array;
|
|
532
|
+
}
|
|
533
|
+
function IsBigInt64Array(value) {
|
|
534
|
+
return value instanceof globalThis.BigInt64Array;
|
|
535
|
+
}
|
|
536
|
+
function IsBigUint64Array(value) {
|
|
537
|
+
return value instanceof globalThis.BigUint64Array;
|
|
538
|
+
}
|
|
539
|
+
function IsRegExp(value) {
|
|
540
|
+
return value instanceof globalThis.RegExp;
|
|
541
|
+
}
|
|
542
|
+
function IsDate(value) {
|
|
543
|
+
return value instanceof globalThis.Date;
|
|
544
|
+
}
|
|
545
|
+
function IsSet(value) {
|
|
546
|
+
return value instanceof globalThis.Set;
|
|
547
|
+
}
|
|
548
|
+
function IsMap(value) {
|
|
549
|
+
return value instanceof globalThis.Map;
|
|
550
|
+
}
|
|
551
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/guard/index.mjs
|
|
552
|
+
var guard_default = exports_guard;
|
|
553
|
+
|
|
554
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/schema.mjs
|
|
555
|
+
function IsKind(value, kind) {
|
|
556
|
+
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.IsEqual(value["~kind"], kind);
|
|
557
|
+
}
|
|
558
|
+
function IsSchema(value) {
|
|
559
|
+
return exports_guard.IsObject(value);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/memory.mjs
|
|
563
|
+
var exports_memory = {};
|
|
564
|
+
__export(exports_memory, {
|
|
565
|
+
Update: () => Update,
|
|
566
|
+
Metrics: () => Metrics,
|
|
567
|
+
Discard: () => Discard,
|
|
568
|
+
Create: () => Create,
|
|
569
|
+
Clone: () => Clone,
|
|
570
|
+
Assign: () => Assign
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/metrics.mjs
|
|
574
|
+
var Metrics = {
|
|
575
|
+
assign: 0,
|
|
576
|
+
create: 0,
|
|
577
|
+
clone: 0,
|
|
578
|
+
discard: 0,
|
|
579
|
+
update: 0
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/settings/settings.mjs
|
|
583
|
+
var exports_settings = {};
|
|
584
|
+
__export(exports_settings, {
|
|
585
|
+
Set: () => Set2,
|
|
586
|
+
Reset: () => Reset,
|
|
587
|
+
Get: () => Get
|
|
588
|
+
});
|
|
589
|
+
var settings = {
|
|
590
|
+
immutableTypes: false,
|
|
591
|
+
maxErrors: 8,
|
|
592
|
+
maxParseErrors: 1,
|
|
593
|
+
maxInstantiationCount: 128,
|
|
594
|
+
useAcceleration: true,
|
|
595
|
+
exactOptionalPropertyTypes: false,
|
|
596
|
+
enumerableKind: false,
|
|
597
|
+
correctiveParse: false,
|
|
598
|
+
unionPrioritySort: true
|
|
599
|
+
};
|
|
600
|
+
function Reset() {
|
|
601
|
+
settings.immutableTypes = false;
|
|
602
|
+
settings.maxErrors = 8;
|
|
603
|
+
settings.maxParseErrors = 1;
|
|
604
|
+
settings.maxInstantiationCount = 128;
|
|
605
|
+
settings.useAcceleration = true;
|
|
606
|
+
settings.exactOptionalPropertyTypes = false;
|
|
607
|
+
settings.enumerableKind = false;
|
|
608
|
+
settings.correctiveParse = false;
|
|
609
|
+
settings.unionPrioritySort = true;
|
|
610
|
+
}
|
|
611
|
+
function Set2(options) {
|
|
612
|
+
for (const key of exports_guard.Keys(options)) {
|
|
613
|
+
const value = options[key];
|
|
614
|
+
if (value !== undefined) {
|
|
615
|
+
Object.defineProperty(settings, key, { value });
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function Get() {
|
|
620
|
+
return settings;
|
|
621
|
+
}
|
|
622
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/keys.mjs
|
|
623
|
+
function Keys3(value) {
|
|
624
|
+
return [...exports_guard.Keys(value), ...exports_guard.Symbols(value)];
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/finalize.mjs
|
|
628
|
+
function Freeze(value, seen) {
|
|
629
|
+
if (seen.has(value))
|
|
630
|
+
return;
|
|
631
|
+
seen.add(value);
|
|
632
|
+
for (const key of Keys3(value)) {
|
|
633
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
634
|
+
if (!descriptor || !("value" in descriptor))
|
|
635
|
+
continue;
|
|
636
|
+
if (exports_guard.IsObject(descriptor.value))
|
|
637
|
+
Freeze(descriptor.value, seen);
|
|
638
|
+
}
|
|
639
|
+
Object.freeze(value);
|
|
640
|
+
}
|
|
641
|
+
function Finalize(value) {
|
|
642
|
+
if (!exports_settings.Get().immutableTypes)
|
|
643
|
+
return value;
|
|
644
|
+
Freeze(value, new WeakSet);
|
|
645
|
+
return value;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/assign.mjs
|
|
649
|
+
function Assign(left, right) {
|
|
650
|
+
Metrics.assign += 1;
|
|
651
|
+
const result = {}, rightKeys = Keys3(right), leftKeys = Keys3(left);
|
|
652
|
+
for (const key of leftKeys) {
|
|
653
|
+
if (rightKeys.includes(key))
|
|
654
|
+
continue;
|
|
655
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));
|
|
656
|
+
}
|
|
657
|
+
for (const key of rightKeys) {
|
|
658
|
+
Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));
|
|
659
|
+
}
|
|
660
|
+
return Finalize(result);
|
|
661
|
+
}
|
|
662
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/clone.mjs
|
|
663
|
+
function Clone(value) {
|
|
664
|
+
Metrics.clone += 1;
|
|
665
|
+
const result = {};
|
|
666
|
+
for (const key of Keys3(value)) {
|
|
667
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
668
|
+
continue;
|
|
669
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
670
|
+
if (exports_guard.IsEqual(descriptor.enumerable, true)) {
|
|
671
|
+
result[key] = descriptor.value;
|
|
672
|
+
} else {
|
|
673
|
+
Object.defineProperty(result, key, descriptor);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return result;
|
|
677
|
+
}
|
|
678
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/create.mjs
|
|
679
|
+
function WithEnumerable(left, right) {
|
|
680
|
+
return { ...left, ...right };
|
|
681
|
+
}
|
|
682
|
+
function WithHidden(left, right) {
|
|
683
|
+
for (const key of Object.keys(right)) {
|
|
684
|
+
Object.defineProperty(left, key, {
|
|
685
|
+
configurable: true,
|
|
686
|
+
writable: true,
|
|
687
|
+
enumerable: false,
|
|
688
|
+
value: right[key]
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
return left;
|
|
692
|
+
}
|
|
693
|
+
function Create(hidden, enumerable, options = {}) {
|
|
694
|
+
Metrics.create += 1;
|
|
695
|
+
const withEnumerable = WithEnumerable(enumerable, options);
|
|
696
|
+
const withHidden = exports_settings.Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);
|
|
697
|
+
return Finalize(withHidden);
|
|
698
|
+
}
|
|
699
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/discard.mjs
|
|
700
|
+
function Discard(value, propertyKeys) {
|
|
701
|
+
Metrics.discard += 1;
|
|
702
|
+
const result = {};
|
|
703
|
+
for (const key of Keys3(value)) {
|
|
704
|
+
if (propertyKeys.includes(key))
|
|
705
|
+
continue;
|
|
706
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
707
|
+
Object.defineProperty(result, key, descriptor);
|
|
708
|
+
}
|
|
709
|
+
return Finalize(result);
|
|
710
|
+
}
|
|
711
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/memory/update.mjs
|
|
712
|
+
function WithCurrent(current, hiddenKeys, enumerableKeys, result) {
|
|
713
|
+
for (const key of Keys3(current)) {
|
|
714
|
+
if (exports_guard.IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))
|
|
715
|
+
continue;
|
|
716
|
+
const descriptor = Object.getOwnPropertyDescriptor(current, key);
|
|
717
|
+
Object.defineProperty(result, key, descriptor);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
function WithHidden2(hidden, keys, result) {
|
|
721
|
+
const enumerableKind = exports_settings.Get().enumerableKind;
|
|
722
|
+
for (const key of keys) {
|
|
723
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
724
|
+
continue;
|
|
725
|
+
Object.defineProperty(result, key, {
|
|
726
|
+
configurable: true,
|
|
727
|
+
writable: true,
|
|
728
|
+
enumerable: enumerableKind,
|
|
729
|
+
value: hidden[key]
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
function WithEnumerable2(enumerable, keys, result) {
|
|
734
|
+
for (const key of keys) {
|
|
735
|
+
if (exports_guard.IsUnsafePropertyKey(key))
|
|
736
|
+
continue;
|
|
737
|
+
Object.defineProperty(result, key, {
|
|
738
|
+
configurable: true,
|
|
739
|
+
enumerable: true,
|
|
740
|
+
writable: true,
|
|
741
|
+
value: enumerable[key]
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
function Update(current, hidden, enumerable) {
|
|
746
|
+
Metrics.update += 1;
|
|
747
|
+
const result = {}, hiddenKeys = Keys3(hidden), enumerableKeys = Keys3(enumerable);
|
|
748
|
+
WithCurrent(current, hiddenKeys, enumerableKeys, result);
|
|
749
|
+
WithHidden2(hidden, hiddenKeys, result);
|
|
750
|
+
WithEnumerable2(enumerable, enumerableKeys, result);
|
|
751
|
+
return Finalize(result);
|
|
752
|
+
}
|
|
753
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/deferred.mjs
|
|
754
|
+
function Deferred(action, parameters, options) {
|
|
755
|
+
return exports_memory.Create({ "~kind": "Deferred" }, { type: "deferred", action, parameters, options }, {});
|
|
756
|
+
}
|
|
757
|
+
function IsDeferred(value) {
|
|
758
|
+
return IsKind(value, "Deferred");
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/array.mjs
|
|
762
|
+
function _Array_(items, options) {
|
|
763
|
+
return exports_memory.Create({ "~kind": "Array" }, { type: "array", items }, options);
|
|
764
|
+
}
|
|
765
|
+
function IsArray3(value) {
|
|
766
|
+
return IsKind(value, "Array");
|
|
767
|
+
}
|
|
768
|
+
function ArrayOptions(type) {
|
|
769
|
+
return exports_memory.Discard(type, ["~kind", "type", "items"]);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/constructor.mjs
|
|
773
|
+
function Constructor(parameters, instanceType, options = {}) {
|
|
774
|
+
return exports_memory.Create({ "~kind": "Constructor" }, { type: "constructor", parameters, instanceType }, options);
|
|
775
|
+
}
|
|
776
|
+
function IsConstructor3(value) {
|
|
777
|
+
return IsKind(value, "Constructor");
|
|
778
|
+
}
|
|
779
|
+
function ConstructorOptions(type) {
|
|
780
|
+
return exports_memory.Discard(type, ["~kind", "type", "parameters", "instanceType"]);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/function.mjs
|
|
784
|
+
function _Function_(parameters, returnType, options = {}) {
|
|
785
|
+
return exports_memory.Create({ ["~kind"]: "Function" }, { type: "function", parameters, returnType }, options);
|
|
786
|
+
}
|
|
787
|
+
function IsFunction3(value) {
|
|
788
|
+
return IsKind(value, "Function");
|
|
789
|
+
}
|
|
790
|
+
function FunctionOptions(type) {
|
|
791
|
+
return exports_memory.Discard(type, ["~kind", "type", "parameters", "returnType"]);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/ref.mjs
|
|
795
|
+
function Ref(ref, options) {
|
|
796
|
+
return exports_memory.Create({ ["~kind"]: "Ref" }, { $ref: ref }, options);
|
|
797
|
+
}
|
|
798
|
+
function IsRef(value) {
|
|
799
|
+
return IsKind(value, "Ref");
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/generic.mjs
|
|
803
|
+
function Generic(parameters, expression) {
|
|
804
|
+
return exports_memory.Create({ "~kind": "Generic" }, { type: "generic", parameters, expression });
|
|
805
|
+
}
|
|
806
|
+
function IsGeneric(value) {
|
|
807
|
+
return IsKind(value, "Generic");
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/any.mjs
|
|
811
|
+
function Any(options) {
|
|
812
|
+
return exports_memory.Create({ ["~kind"]: "Any" }, {}, options);
|
|
813
|
+
}
|
|
814
|
+
function IsAny(value) {
|
|
815
|
+
return IsKind(value, "Any");
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/never.mjs
|
|
819
|
+
var NeverPattern = "(?!)";
|
|
820
|
+
function Never(options) {
|
|
821
|
+
return exports_memory.Create({ "~kind": "Never" }, { not: {} }, options);
|
|
822
|
+
}
|
|
823
|
+
function IsNever(value) {
|
|
824
|
+
return IsKind(value, "Never");
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs
|
|
828
|
+
function AddImmutableAction(type, options) {
|
|
829
|
+
const result = exports_memory.Update(type, { "~immutable": true }, options);
|
|
830
|
+
return result;
|
|
831
|
+
}
|
|
832
|
+
function AddImmutableInstantiate(context, state, type, options) {
|
|
833
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
834
|
+
return AddImmutableAction(instantiatedType, options);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs
|
|
838
|
+
function AddReadonlyAction(type, options) {
|
|
839
|
+
const result = exports_memory.Update(type, { "~readonly": true }, options);
|
|
840
|
+
return result;
|
|
841
|
+
}
|
|
842
|
+
function AddReadonlyInstantiate(context, state, type, options) {
|
|
843
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
844
|
+
return AddReadonlyAction(instantiatedType, options);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/_optional.mjs
|
|
848
|
+
function Optional(type) {
|
|
849
|
+
return AddOptional(type);
|
|
850
|
+
}
|
|
851
|
+
function IsOptional(value) {
|
|
852
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~optional");
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/properties.mjs
|
|
856
|
+
function RequiredArray(properties) {
|
|
857
|
+
return exports_guard.Keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
858
|
+
}
|
|
859
|
+
function PropertyKeys(properties) {
|
|
860
|
+
return exports_guard.Keys(properties);
|
|
861
|
+
}
|
|
862
|
+
function PropertyValues(properties) {
|
|
863
|
+
return exports_guard.Values(properties);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/object.mjs
|
|
867
|
+
function _Object_(properties, options = {}) {
|
|
868
|
+
const requiredKeys = RequiredArray(properties);
|
|
869
|
+
const required = requiredKeys.length > 0 ? { required: requiredKeys } : {};
|
|
870
|
+
return exports_memory.Create({ "~kind": "Object" }, { type: "object", ...required, properties }, options);
|
|
871
|
+
}
|
|
872
|
+
function IsObject3(value) {
|
|
873
|
+
return IsKind(value, "Object");
|
|
874
|
+
}
|
|
875
|
+
function ObjectOptions(type) {
|
|
876
|
+
return exports_memory.Discard(type, ["~kind", "type", "properties", "required"]);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/unknown.mjs
|
|
880
|
+
function Unknown(options) {
|
|
881
|
+
return exports_memory.Create({ ["~kind"]: "Unknown" }, {}, options);
|
|
882
|
+
}
|
|
883
|
+
function IsUnknown(value) {
|
|
884
|
+
return IsKind(value, "Unknown");
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/cyclic.mjs
|
|
888
|
+
function Cyclic($defs, $ref, options) {
|
|
889
|
+
const defs = exports_guard.Keys($defs).reduce((result, key) => {
|
|
890
|
+
return { ...result, [key]: exports_memory.Update($defs[key], {}, { $id: key }) };
|
|
891
|
+
}, {});
|
|
892
|
+
return exports_memory.Create({ ["~kind"]: "Cyclic" }, { $defs: defs, $ref }, options);
|
|
893
|
+
}
|
|
894
|
+
function IsCyclic(value) {
|
|
895
|
+
return IsKind(value, "Cyclic");
|
|
896
|
+
}
|
|
897
|
+
function CyclicOptions(type) {
|
|
898
|
+
return exports_memory.Discard(type, ["~kind", "$defs", "$ref"]);
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/unsafe.mjs
|
|
902
|
+
function Unsafe(schema) {
|
|
903
|
+
return exports_memory.Update(schema, { ["~unsafe"]: null }, {});
|
|
904
|
+
}
|
|
905
|
+
function IsUnsafe(value) {
|
|
906
|
+
return exports_guard.IsObjectNotArray(value) && exports_guard.HasPropertyKey(value, "~unsafe") && exports_guard.IsNull(value["~unsafe"]);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/arguments/arguments.mjs
|
|
910
|
+
var exports_arguments = {};
|
|
911
|
+
__export(exports_arguments, {
|
|
912
|
+
Match: () => Match
|
|
913
|
+
});
|
|
914
|
+
function Match(args, match) {
|
|
915
|
+
return match[args.length]?.(...args) ?? (() => {
|
|
916
|
+
throw Error("Invalid Arguments");
|
|
917
|
+
})();
|
|
918
|
+
}
|
|
919
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/infer.mjs
|
|
920
|
+
function Infer(...args) {
|
|
921
|
+
const [name, extends_] = exports_arguments.Match(args, {
|
|
922
|
+
2: (name2, extends_2) => [name2, extends_2, extends_2],
|
|
923
|
+
1: (name2) => [name2, Unknown(), Unknown()]
|
|
924
|
+
});
|
|
925
|
+
return exports_memory.Create({ ["~kind"]: "Infer" }, { type: "infer", name, extends: extends_ }, {});
|
|
926
|
+
}
|
|
927
|
+
function IsInfer(value) {
|
|
928
|
+
return IsKind(value, "Infer");
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/dependent.mjs
|
|
932
|
+
function Dependent(if_, then_, else_, options = {}) {
|
|
933
|
+
return exports_memory.Create({ "~kind": "Dependent" }, { if: if_, then: then_, else: else_ }, options);
|
|
934
|
+
}
|
|
935
|
+
function IsDependent(value) {
|
|
936
|
+
return IsKind(value, "Dependent");
|
|
937
|
+
}
|
|
938
|
+
function DependentOptions(type) {
|
|
939
|
+
return exports_memory.Discard(type, ["~kind", "if", "then", "else"]);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs
|
|
943
|
+
function IsTypeScriptEnumLike(value) {
|
|
944
|
+
return exports_guard.IsObjectNotArray(value);
|
|
945
|
+
}
|
|
946
|
+
function TypeScriptEnumToEnumValues(type) {
|
|
947
|
+
const keys = exports_guard.Keys(type).filter((key) => isNaN(key));
|
|
948
|
+
return keys.reduce((result, key) => [...result, type[key]], []);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/enum.mjs
|
|
952
|
+
function IsEnumValue(value) {
|
|
953
|
+
return exports_guard.IsString(value) || exports_guard.IsNumber(value);
|
|
954
|
+
}
|
|
955
|
+
function Enum(value, options) {
|
|
956
|
+
const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;
|
|
957
|
+
return exports_memory.Create({ "~kind": "Enum" }, { enum: values }, options);
|
|
958
|
+
}
|
|
959
|
+
function IsEnum(value) {
|
|
960
|
+
return IsKind(value, "Enum");
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/intersect.mjs
|
|
964
|
+
function Intersect(types, options = {}) {
|
|
965
|
+
return exports_memory.Create({ "~kind": "Intersect" }, { allOf: types }, options);
|
|
966
|
+
}
|
|
967
|
+
function IsIntersect(value) {
|
|
968
|
+
return IsKind(value, "Intersect");
|
|
969
|
+
}
|
|
970
|
+
function IntersectOptions(type) {
|
|
971
|
+
return exports_memory.Discard(type, ["~kind", "allOf"]);
|
|
972
|
+
}
|
|
973
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/environment/environment.mjs
|
|
974
|
+
var exports_environment = {};
|
|
975
|
+
__export(exports_environment, {
|
|
976
|
+
Evaluate: () => Evaluate,
|
|
977
|
+
CanEvaluate: () => CanEvaluate
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/environment/evaluate.mjs
|
|
981
|
+
var supported = undefined;
|
|
982
|
+
function TryEvaluate() {
|
|
983
|
+
try {
|
|
984
|
+
Evaluate("null")();
|
|
985
|
+
return true;
|
|
986
|
+
} catch {
|
|
987
|
+
return false;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
function CanEvaluate() {
|
|
991
|
+
if (exports_guard.IsUndefined(supported))
|
|
992
|
+
supported = TryEvaluate();
|
|
993
|
+
return supported && exports_settings.Get().useAcceleration;
|
|
994
|
+
}
|
|
995
|
+
function Evaluate(...args) {
|
|
996
|
+
return new globalThis.Function(...args);
|
|
997
|
+
}
|
|
998
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/hashing/hash.mjs
|
|
999
|
+
var exports_hash = {};
|
|
1000
|
+
__export(exports_hash, {
|
|
1001
|
+
HashCode: () => HashCode,
|
|
1002
|
+
Hash: () => Hash
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/unreachable/unreachable.mjs
|
|
1006
|
+
function Unreachable() {
|
|
1007
|
+
throw new Error("Unreachable");
|
|
1008
|
+
}
|
|
1009
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/hashing/hash.mjs
|
|
1010
|
+
function InstanceKeys(value) {
|
|
1011
|
+
const propertyKeys = new Set;
|
|
1012
|
+
let current = value;
|
|
1013
|
+
while (current && current !== Object.prototype) {
|
|
1014
|
+
for (const key of Reflect.ownKeys(current)) {
|
|
1015
|
+
if (key !== "constructor" && typeof key !== "symbol")
|
|
1016
|
+
propertyKeys.add(key);
|
|
1017
|
+
}
|
|
1018
|
+
current = Object.getPrototypeOf(current);
|
|
1019
|
+
}
|
|
1020
|
+
return [...propertyKeys];
|
|
1021
|
+
}
|
|
1022
|
+
function IsIEEE754(value) {
|
|
1023
|
+
return typeof value === "number";
|
|
1024
|
+
}
|
|
1025
|
+
var ByteMarker = {
|
|
1026
|
+
Array: 0,
|
|
1027
|
+
BigInt: 1,
|
|
1028
|
+
Boolean: 2,
|
|
1029
|
+
Date: 3,
|
|
1030
|
+
Constructor: 4,
|
|
1031
|
+
Function: 5,
|
|
1032
|
+
Null: 6,
|
|
1033
|
+
Number: 7,
|
|
1034
|
+
Object: 8,
|
|
1035
|
+
RegExp: 9,
|
|
1036
|
+
String: 10,
|
|
1037
|
+
Symbol: 11,
|
|
1038
|
+
TypeArray: 12,
|
|
1039
|
+
Undefined: 13
|
|
1040
|
+
};
|
|
1041
|
+
var A0 = 8997;
|
|
1042
|
+
var A1 = 33826;
|
|
1043
|
+
var A2 = 40164;
|
|
1044
|
+
var A3 = 52210;
|
|
1045
|
+
var F64 = new Float64Array(1);
|
|
1046
|
+
var F64In = new DataView(F64.buffer);
|
|
1047
|
+
var F64Out = new Uint8Array(F64.buffer);
|
|
1048
|
+
function FNV1A64_OP(byte) {
|
|
1049
|
+
const L0 = A0 ^ byte;
|
|
1050
|
+
const T0 = L0 * 435;
|
|
1051
|
+
const T1 = A1 * 435 + (T0 >>> 16);
|
|
1052
|
+
const T2 = A2 * 435 + (T1 >>> 16) + (L0 << 8);
|
|
1053
|
+
const T3 = A3 * 435 + (T2 >>> 16) + (A1 << 8);
|
|
1054
|
+
A0 = T0 & 65535;
|
|
1055
|
+
A1 = T1 & 65535;
|
|
1056
|
+
A2 = T2 & 65535;
|
|
1057
|
+
A3 = T3 & 65535;
|
|
1058
|
+
}
|
|
1059
|
+
function FromArray(value) {
|
|
1060
|
+
FNV1A64_OP(ByteMarker.Array);
|
|
1061
|
+
for (const item of value) {
|
|
1062
|
+
FromValue(item);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
function FromBigInt(value) {
|
|
1066
|
+
FNV1A64_OP(ByteMarker.BigInt);
|
|
1067
|
+
F64In.setBigInt64(0, value);
|
|
1068
|
+
for (const byte of F64Out) {
|
|
1069
|
+
FNV1A64_OP(byte);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
function FromBoolean(value) {
|
|
1073
|
+
FNV1A64_OP(ByteMarker.Boolean);
|
|
1074
|
+
FNV1A64_OP(value ? 1 : 0);
|
|
1075
|
+
}
|
|
1076
|
+
function FromConstructor(value) {
|
|
1077
|
+
FNV1A64_OP(ByteMarker.Constructor);
|
|
1078
|
+
FromValue(value.toString());
|
|
1079
|
+
}
|
|
1080
|
+
function FromDate(value) {
|
|
1081
|
+
FNV1A64_OP(ByteMarker.Date);
|
|
1082
|
+
FromValue(value.getTime());
|
|
1083
|
+
}
|
|
1084
|
+
function FromFunction(value) {
|
|
1085
|
+
FNV1A64_OP(ByteMarker.Function);
|
|
1086
|
+
FromValue(value.toString());
|
|
1087
|
+
}
|
|
1088
|
+
function FromNull(_value) {
|
|
1089
|
+
FNV1A64_OP(ByteMarker.Null);
|
|
1090
|
+
}
|
|
1091
|
+
function FromNumber(value) {
|
|
1092
|
+
FNV1A64_OP(ByteMarker.Number);
|
|
1093
|
+
F64In.setFloat64(0, value, true);
|
|
1094
|
+
for (const byte of F64Out) {
|
|
1095
|
+
FNV1A64_OP(byte);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
function FromObject(value) {
|
|
1099
|
+
FNV1A64_OP(ByteMarker.Object);
|
|
1100
|
+
for (const key of InstanceKeys(value).sort()) {
|
|
1101
|
+
FromValue(key);
|
|
1102
|
+
FromValue(value[key]);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
function FromRegExp(value) {
|
|
1106
|
+
FNV1A64_OP(ByteMarker.RegExp);
|
|
1107
|
+
FromString(value.toString());
|
|
1108
|
+
}
|
|
1109
|
+
var encoder = new TextEncoder;
|
|
1110
|
+
function FromString(value) {
|
|
1111
|
+
FNV1A64_OP(ByteMarker.String);
|
|
1112
|
+
for (let i = 0;i < value.length; i++) {
|
|
1113
|
+
const code = value.charCodeAt(i);
|
|
1114
|
+
if (code > 127) {
|
|
1115
|
+
for (const byte of encoder.encode(value.slice(i))) {
|
|
1116
|
+
FNV1A64_OP(byte);
|
|
1117
|
+
}
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
FNV1A64_OP(code);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
function FromSymbol(value) {
|
|
1124
|
+
FNV1A64_OP(ByteMarker.Symbol);
|
|
1125
|
+
FromValue(value.toString());
|
|
1126
|
+
}
|
|
1127
|
+
function FromTypeArray(value) {
|
|
1128
|
+
FNV1A64_OP(ByteMarker.TypeArray);
|
|
1129
|
+
const buffer = new Uint8Array(value.buffer);
|
|
1130
|
+
for (let i = 0;i < buffer.length; i++) {
|
|
1131
|
+
FNV1A64_OP(buffer[i]);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
function FromUndefined(_value) {
|
|
1135
|
+
return FNV1A64_OP(ByteMarker.Undefined);
|
|
1136
|
+
}
|
|
1137
|
+
function FromValue(value) {
|
|
1138
|
+
return exports_globals.IsTypeArray(value) ? FromTypeArray(value) : exports_globals.IsDate(value) ? FromDate(value) : exports_globals.IsRegExp(value) ? FromRegExp(value) : exports_globals.IsBoolean(value) ? FromBoolean(value.valueOf()) : exports_globals.IsString(value) ? FromString(value.valueOf()) : exports_globals.IsNumber(value) ? FromNumber(value.valueOf()) : IsIEEE754(value) ? FromNumber(value) : exports_guard.IsArray(value) ? FromArray(value) : exports_guard.IsBoolean(value) ? FromBoolean(value) : exports_guard.IsBigInt(value) ? FromBigInt(value) : exports_guard.IsConstructor(value) ? FromConstructor(value) : exports_guard.IsNull(value) ? FromNull(value) : exports_guard.IsObject(value) ? FromObject(value) : exports_guard.IsString(value) ? FromString(value) : exports_guard.IsSymbol(value) ? FromSymbol(value) : exports_guard.IsUndefined(value) ? FromUndefined(value) : exports_guard.IsFunction(value) ? FromFunction(value) : Unreachable();
|
|
1139
|
+
}
|
|
1140
|
+
function Hex(limb) {
|
|
1141
|
+
return limb.toString(16).padStart(4, "0");
|
|
1142
|
+
}
|
|
1143
|
+
function HashCode(value) {
|
|
1144
|
+
return BigInt(`0x${Hash(value)}`);
|
|
1145
|
+
}
|
|
1146
|
+
function Hash(value) {
|
|
1147
|
+
A0 = 8997, A1 = 33826, A2 = 40164, A3 = 52210;
|
|
1148
|
+
FromValue(value);
|
|
1149
|
+
return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;
|
|
1150
|
+
}
|
|
1151
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/locale/en_US.mjs
|
|
1152
|
+
function en_US(error) {
|
|
1153
|
+
switch (error.keyword) {
|
|
1154
|
+
case "additionalProperties":
|
|
1155
|
+
return "must not have additional properties";
|
|
1156
|
+
case "anyOf":
|
|
1157
|
+
return "must match a schema in anyOf";
|
|
1158
|
+
case "boolean":
|
|
1159
|
+
return "schema is false";
|
|
1160
|
+
case "const":
|
|
1161
|
+
return "must be equal to constant";
|
|
1162
|
+
case "contains":
|
|
1163
|
+
return "must contain at least 1 valid item";
|
|
1164
|
+
case "dependencies":
|
|
1165
|
+
return `must have properties ${error.params.dependencies.join(", ")} when property ${error.params.property} is present`;
|
|
1166
|
+
case "dependentRequired":
|
|
1167
|
+
return `must have properties ${error.params.dependencies.join(", ")} when property ${error.params.property} is present`;
|
|
1168
|
+
case "enum":
|
|
1169
|
+
return "must be equal to one of the allowed values";
|
|
1170
|
+
case "exclusiveMaximum":
|
|
1171
|
+
return `must be ${error.params.comparison} ${error.params.limit}`;
|
|
1172
|
+
case "exclusiveMinimum":
|
|
1173
|
+
return `must be ${error.params.comparison} ${error.params.limit}`;
|
|
1174
|
+
case "format":
|
|
1175
|
+
return `must match format "${error.params.format}"`;
|
|
1176
|
+
case "if":
|
|
1177
|
+
return `must match "${error.params.failingKeyword}" schema`;
|
|
1178
|
+
case "maxItems":
|
|
1179
|
+
return `must not have more than ${error.params.limit} items`;
|
|
1180
|
+
case "maxLength":
|
|
1181
|
+
return `must not have more than ${error.params.limit} characters`;
|
|
1182
|
+
case "maxProperties":
|
|
1183
|
+
return `must not have more than ${error.params.limit} properties`;
|
|
1184
|
+
case "maximum":
|
|
1185
|
+
return `must be ${error.params.comparison} ${error.params.limit}`;
|
|
1186
|
+
case "minItems":
|
|
1187
|
+
return `must not have fewer than ${error.params.limit} items`;
|
|
1188
|
+
case "minLength":
|
|
1189
|
+
return `must not have fewer than ${error.params.limit} characters`;
|
|
1190
|
+
case "minProperties":
|
|
1191
|
+
return `must not have fewer than ${error.params.limit} properties`;
|
|
1192
|
+
case "minimum":
|
|
1193
|
+
return `must be ${error.params.comparison} ${error.params.limit}`;
|
|
1194
|
+
case "multipleOf":
|
|
1195
|
+
return `must be multiple of ${error.params.multipleOf}`;
|
|
1196
|
+
case "not":
|
|
1197
|
+
return "must not be valid";
|
|
1198
|
+
case "oneOf":
|
|
1199
|
+
return "must match exactly one schema in oneOf";
|
|
1200
|
+
case "pattern":
|
|
1201
|
+
return `must match pattern "${error.params.pattern}"`;
|
|
1202
|
+
case "propertyNames":
|
|
1203
|
+
return `property names ${error.params.propertyNames.join(", ")} are invalid`;
|
|
1204
|
+
case "required":
|
|
1205
|
+
return `must have required properties ${error.params.requiredProperties.join(", ")}`;
|
|
1206
|
+
case "type":
|
|
1207
|
+
return typeof error.params.type === "string" ? `must be ${error.params.type}` : `must be either ${error.params.type.join(" or ")}`;
|
|
1208
|
+
case "unevaluatedItems":
|
|
1209
|
+
return "must not have unevaluated items";
|
|
1210
|
+
case "unevaluatedProperties":
|
|
1211
|
+
return "must not have unevaluated properties";
|
|
1212
|
+
case "uniqueItems":
|
|
1213
|
+
return `must not have duplicate items`;
|
|
1214
|
+
case "~refine":
|
|
1215
|
+
return error.params.message;
|
|
1216
|
+
default:
|
|
1217
|
+
return "an unknown validation error occurred";
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/system/locale/_config.mjs
|
|
1222
|
+
var locale = en_US;
|
|
1223
|
+
function Get2() {
|
|
1224
|
+
return locale;
|
|
1225
|
+
}
|
|
1226
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/_codec.mjs
|
|
1227
|
+
class EncodeBuilder {
|
|
1228
|
+
constructor(type, decode) {
|
|
1229
|
+
this.type = type;
|
|
1230
|
+
this.decode = decode;
|
|
1231
|
+
}
|
|
1232
|
+
Encode(callback) {
|
|
1233
|
+
const type = this.type;
|
|
1234
|
+
const decode = IsCodec(type) ? (value) => this.decode(type["~codec"].decode(value)) : this.decode;
|
|
1235
|
+
const encode = IsCodec(type) ? (value) => type["~codec"].encode(callback(value)) : callback;
|
|
1236
|
+
const codec = { decode, encode };
|
|
1237
|
+
return exports_memory.Update(this.type, { "~codec": codec }, {});
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
class DecodeBuilder {
|
|
1242
|
+
constructor(type) {
|
|
1243
|
+
this.type = type;
|
|
1244
|
+
}
|
|
1245
|
+
Decode(callback) {
|
|
1246
|
+
return new EncodeBuilder(this.type, callback);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
function Codec(type) {
|
|
1250
|
+
return new DecodeBuilder(type);
|
|
1251
|
+
}
|
|
1252
|
+
function Decode(type, callback) {
|
|
1253
|
+
return Codec(type).Decode(callback).Encode(() => {
|
|
1254
|
+
throw Error("Encode not implemented");
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function Encode(type, callback) {
|
|
1258
|
+
return Codec(type).Decode(() => {
|
|
1259
|
+
throw Error("Decode not implemented");
|
|
1260
|
+
}).Encode(callback);
|
|
1261
|
+
}
|
|
1262
|
+
function IsCodec(value) {
|
|
1263
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~codec") && exports_guard.IsObject(value["~codec"]) && exports_guard.HasPropertyKey(value["~codec"], "encode") && exports_guard.HasPropertyKey(value["~codec"], "decode");
|
|
1264
|
+
}
|
|
1265
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_add_immutable.mjs
|
|
1266
|
+
function AddImmutableDeferred(type, options = {}) {
|
|
1267
|
+
return Deferred("AddImmutable", [type], options);
|
|
1268
|
+
}
|
|
1269
|
+
function AddImmutable(type, options = {}) {
|
|
1270
|
+
return AddImmutableAction(type, options);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/_immutable.mjs
|
|
1274
|
+
function Immutable(type) {
|
|
1275
|
+
return AddImmutable(type);
|
|
1276
|
+
}
|
|
1277
|
+
function IsImmutable(value) {
|
|
1278
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~immutable");
|
|
1279
|
+
}
|
|
1280
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_add_readonly.mjs
|
|
1281
|
+
function AddReadonlyDeferred(type, options = {}) {
|
|
1282
|
+
return Deferred("AddReadonly", [type], options);
|
|
1283
|
+
}
|
|
1284
|
+
function AddReadonly(type, options = {}) {
|
|
1285
|
+
return AddReadonlyAction(type, options);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/_readonly.mjs
|
|
1289
|
+
function Readonly(type) {
|
|
1290
|
+
return AddReadonly(type);
|
|
1291
|
+
}
|
|
1292
|
+
function IsReadonly(value) {
|
|
1293
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~readonly");
|
|
1294
|
+
}
|
|
1295
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/_refine.mjs
|
|
1296
|
+
function RefineAdd(type, refinement) {
|
|
1297
|
+
const refinements = IsRefine(type) ? [...type["~refine"], refinement] : [refinement];
|
|
1298
|
+
return exports_memory.Update(type, { "~refine": refinements }, {});
|
|
1299
|
+
}
|
|
1300
|
+
function Refine(...args) {
|
|
1301
|
+
const [type, check, error] = exports_arguments.Match(args, {
|
|
1302
|
+
3: (type2, check2, error2) => [type2, check2, error2],
|
|
1303
|
+
2: (type2, check2) => [type2, check2, () => "Refine Error"]
|
|
1304
|
+
});
|
|
1305
|
+
return RefineAdd(type, { check, error });
|
|
1306
|
+
}
|
|
1307
|
+
function IsRefinement(value) {
|
|
1308
|
+
return exports_guard.IsObjectNotArray(value) && exports_guard.HasPropertyKey(value, "check") && exports_guard.HasPropertyKey(value, "error") && exports_guard.IsFunction(value.check) && exports_guard.IsFunction(value.error);
|
|
1309
|
+
}
|
|
1310
|
+
function IsRefine(value) {
|
|
1311
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "~refine") && exports_guard.IsArray(value["~refine"]) && exports_guard.Every(value["~refine"], 0, (value2) => IsRefinement(value2));
|
|
1312
|
+
}
|
|
1313
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/bigint.mjs
|
|
1314
|
+
var BigIntPattern = "-?(?:0|[1-9][0-9]*)n";
|
|
1315
|
+
function BigInt2(options) {
|
|
1316
|
+
return exports_memory.Create({ "~kind": "BigInt" }, { type: "bigint" }, options);
|
|
1317
|
+
}
|
|
1318
|
+
function IsBigInt3(value) {
|
|
1319
|
+
return IsKind(value, "BigInt");
|
|
1320
|
+
}
|
|
1321
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/boolean.mjs
|
|
1322
|
+
function Boolean2(options) {
|
|
1323
|
+
return exports_memory.Create({ "~kind": "Boolean" }, { type: "boolean" }, options);
|
|
1324
|
+
}
|
|
1325
|
+
function IsBoolean4(value) {
|
|
1326
|
+
return IsKind(value, "Boolean");
|
|
1327
|
+
}
|
|
1328
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/identifier.mjs
|
|
1329
|
+
function Identifier(name) {
|
|
1330
|
+
return exports_memory.Create({ "~kind": "Identifier" }, { name });
|
|
1331
|
+
}
|
|
1332
|
+
function IsIdentifier2(value) {
|
|
1333
|
+
return IsKind(value, "Identifier");
|
|
1334
|
+
}
|
|
1335
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/integer.mjs
|
|
1336
|
+
var IntegerPattern = "-?(?:0|[1-9][0-9]*)";
|
|
1337
|
+
function Integer(options) {
|
|
1338
|
+
return exports_memory.Create({ "~kind": "Integer" }, { type: "integer" }, options);
|
|
1339
|
+
}
|
|
1340
|
+
function IsInteger3(value) {
|
|
1341
|
+
return IsKind(value, "Integer");
|
|
1342
|
+
}
|
|
1343
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/literal.mjs
|
|
1344
|
+
class InvalidLiteralValue extends Error {
|
|
1345
|
+
constructor(value) {
|
|
1346
|
+
super(`Invalid Literal value`);
|
|
1347
|
+
Object.defineProperty(this, "cause", {
|
|
1348
|
+
value: { value },
|
|
1349
|
+
writable: false,
|
|
1350
|
+
configurable: false,
|
|
1351
|
+
enumerable: false
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
function LiteralTypeName(value) {
|
|
1356
|
+
return exports_guard.IsBigInt(value) ? "bigint" : exports_guard.IsBoolean(value) ? "boolean" : exports_guard.IsNumber(value) ? "number" : exports_guard.IsString(value) ? "string" : (() => {
|
|
1357
|
+
throw new InvalidLiteralValue(value);
|
|
1358
|
+
})();
|
|
1359
|
+
}
|
|
1360
|
+
function Literal(value, options) {
|
|
1361
|
+
return exports_memory.Create({ "~kind": "Literal" }, { type: LiteralTypeName(value), const: value }, options);
|
|
1362
|
+
}
|
|
1363
|
+
function IsLiteralValue(value) {
|
|
1364
|
+
return exports_guard.IsBigInt(value) || exports_guard.IsBoolean(value) || exports_guard.IsNumber(value) || exports_guard.IsString(value);
|
|
1365
|
+
}
|
|
1366
|
+
function IsLiteralBigInt(value) {
|
|
1367
|
+
return IsLiteral(value) && exports_guard.IsBigInt(value.const);
|
|
1368
|
+
}
|
|
1369
|
+
function IsLiteralBoolean(value) {
|
|
1370
|
+
return IsLiteral(value) && exports_guard.IsBoolean(value.const);
|
|
1371
|
+
}
|
|
1372
|
+
function IsLiteralNumber(value) {
|
|
1373
|
+
return IsLiteral(value) && exports_guard.IsNumber(value.const);
|
|
1374
|
+
}
|
|
1375
|
+
function IsLiteralString(value) {
|
|
1376
|
+
return IsLiteral(value) && exports_guard.IsString(value.const);
|
|
1377
|
+
}
|
|
1378
|
+
function IsLiteral(value) {
|
|
1379
|
+
return IsKind(value, "Literal");
|
|
1380
|
+
}
|
|
1381
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/null.mjs
|
|
1382
|
+
function Null(options) {
|
|
1383
|
+
return exports_memory.Create({ "~kind": "Null" }, { type: "null" }, options);
|
|
1384
|
+
}
|
|
1385
|
+
function IsNull3(value) {
|
|
1386
|
+
return IsKind(value, "Null");
|
|
1387
|
+
}
|
|
1388
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/number.mjs
|
|
1389
|
+
var NumberPattern = "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";
|
|
1390
|
+
function Number2(options) {
|
|
1391
|
+
return exports_memory.Create({ "~kind": "Number" }, { type: "number" }, options);
|
|
1392
|
+
}
|
|
1393
|
+
function IsNumber4(value) {
|
|
1394
|
+
return IsKind(value, "Number");
|
|
1395
|
+
}
|
|
1396
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/symbol.mjs
|
|
1397
|
+
function Symbol(options) {
|
|
1398
|
+
return exports_memory.Create({ "~kind": "Symbol" }, { type: "symbol" }, options);
|
|
1399
|
+
}
|
|
1400
|
+
function IsSymbol3(value) {
|
|
1401
|
+
return IsKind(value, "Symbol");
|
|
1402
|
+
}
|
|
1403
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/parameter.mjs
|
|
1404
|
+
function Parameter(...args) {
|
|
1405
|
+
const [name, extends_, equals] = exports_arguments.Match(args, {
|
|
1406
|
+
3: (name2, extends_2, equals2) => [name2, extends_2, equals2],
|
|
1407
|
+
2: (name2, extends_2) => [name2, extends_2, extends_2],
|
|
1408
|
+
1: (name2) => [name2, Unknown(), Unknown()]
|
|
1409
|
+
});
|
|
1410
|
+
return exports_memory.Create({ "~kind": "Parameter" }, { name, extends: extends_, equals }, {});
|
|
1411
|
+
}
|
|
1412
|
+
function IsParameter(value) {
|
|
1413
|
+
return IsKind(value, "Parameter");
|
|
1414
|
+
}
|
|
1415
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/string.mjs
|
|
1416
|
+
var StringPattern = ".*";
|
|
1417
|
+
function String2(options) {
|
|
1418
|
+
return exports_memory.Create({ "~kind": "String" }, { type: "string" }, options);
|
|
1419
|
+
}
|
|
1420
|
+
function IsString4(value) {
|
|
1421
|
+
return IsKind(value, "String");
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/union.mjs
|
|
1425
|
+
function Union(anyOf, options = {}) {
|
|
1426
|
+
return exports_memory.Create({ "~kind": "Union" }, { anyOf }, options);
|
|
1427
|
+
}
|
|
1428
|
+
function IsUnion(value) {
|
|
1429
|
+
return IsKind(value, "Union");
|
|
1430
|
+
}
|
|
1431
|
+
function UnionOptions(type) {
|
|
1432
|
+
return exports_memory.Discard(type, ["~kind", "anyOf"]);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/patterns/pattern.mjs
|
|
1436
|
+
function ParsePatternIntoTypes(pattern) {
|
|
1437
|
+
const parsed = Pattern(pattern);
|
|
1438
|
+
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : [];
|
|
1439
|
+
return result;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs
|
|
1443
|
+
function FromLiteral(_value) {
|
|
1444
|
+
return true;
|
|
1445
|
+
}
|
|
1446
|
+
function FromTypesReduce(types) {
|
|
1447
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType(left) ? FromTypesReduce(right) : false, () => true);
|
|
1448
|
+
}
|
|
1449
|
+
function FromTypes(types) {
|
|
1450
|
+
const result = exports_guard.IsEqual(types.length, 0) ? false : FromTypesReduce(types);
|
|
1451
|
+
return result;
|
|
1452
|
+
}
|
|
1453
|
+
function FromType(type) {
|
|
1454
|
+
return IsUnion(type) ? FromTypes(type.anyOf) : IsLiteral(type) ? FromLiteral(type.const) : false;
|
|
1455
|
+
}
|
|
1456
|
+
function IsTemplateLiteralFinite(types) {
|
|
1457
|
+
const result = FromTypes(types);
|
|
1458
|
+
return result;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/create.mjs
|
|
1462
|
+
function TemplateLiteralCreate(pattern) {
|
|
1463
|
+
return exports_memory.Create({ ["~kind"]: "TemplateLiteral" }, { type: "string", pattern }, {});
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/decode.mjs
|
|
1467
|
+
function FromLiteralPush(variants, value, result = []) {
|
|
1468
|
+
return exports_guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);
|
|
1469
|
+
}
|
|
1470
|
+
function FromLiteral2(variants, value) {
|
|
1471
|
+
return exports_guard.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value);
|
|
1472
|
+
}
|
|
1473
|
+
function FromUnion(variants, types, result = []) {
|
|
1474
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType2(variants, left)]), () => result);
|
|
1475
|
+
}
|
|
1476
|
+
function FromType2(variants, type) {
|
|
1477
|
+
const result = IsUnion(type) ? FromUnion(variants, type.anyOf) : IsLiteral(type) ? FromLiteral2(variants, type.const) : Unreachable();
|
|
1478
|
+
return result;
|
|
1479
|
+
}
|
|
1480
|
+
function DecodeFromSpan(variants, types) {
|
|
1481
|
+
return exports_guard.ShiftLeft(types, (left, right) => DecodeFromSpan(FromType2(variants, left), right), () => variants);
|
|
1482
|
+
}
|
|
1483
|
+
function VariantsToLiterals(variants) {
|
|
1484
|
+
return variants.map((variant) => Literal(variant));
|
|
1485
|
+
}
|
|
1486
|
+
function DecodeTypesAsUnion(types) {
|
|
1487
|
+
const variants = DecodeFromSpan([], types);
|
|
1488
|
+
const literals = VariantsToLiterals(variants);
|
|
1489
|
+
const result = Union(literals);
|
|
1490
|
+
return result;
|
|
1491
|
+
}
|
|
1492
|
+
function DecodeTypes(types) {
|
|
1493
|
+
return exports_guard.IsEqual(types.length, 0) ? Unreachable() : exports_guard.IsEqual(types.length, 1) && IsLiteral(types[0]) ? types[0] : DecodeTypesAsUnion(types);
|
|
1494
|
+
}
|
|
1495
|
+
function TemplateLiteralDecodeUnsafe(pattern) {
|
|
1496
|
+
const types = ParsePatternIntoTypes(pattern);
|
|
1497
|
+
const result = exports_guard.IsEqual(types.length, 0) ? String2() : IsTemplateLiteralFinite(types) ? DecodeTypes(types) : TemplateLiteralCreate(pattern);
|
|
1498
|
+
return result;
|
|
1499
|
+
}
|
|
1500
|
+
function TemplateLiteralDecode(pattern) {
|
|
1501
|
+
const decoded = TemplateLiteralDecodeUnsafe(pattern);
|
|
1502
|
+
const result = IsTemplateLiteral(decoded) ? String2() : decoded;
|
|
1503
|
+
return result;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/record_create.mjs
|
|
1507
|
+
function CreateRecord(key, value) {
|
|
1508
|
+
const type = "object";
|
|
1509
|
+
const patternProperties = { [key]: value };
|
|
1510
|
+
return exports_memory.Create({ ["~kind"]: "Record" }, { type, patternProperties });
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_any.mjs
|
|
1514
|
+
function FromAnyKey(value) {
|
|
1515
|
+
return CreateRecord(StringKey, value);
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs
|
|
1519
|
+
function FromBooleanKey(value) {
|
|
1520
|
+
return _Object_({ true: value, false: value });
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/tuple.mjs
|
|
1524
|
+
function Tuple(types, options = {}) {
|
|
1525
|
+
const [items, minItems, additionalItems] = [types, types.length, false];
|
|
1526
|
+
return exports_memory.Create({ ["~kind"]: "Tuple" }, { type: "array", additionalItems, items, minItems }, options);
|
|
1527
|
+
}
|
|
1528
|
+
function IsTuple(value) {
|
|
1529
|
+
return IsKind(value, "Tuple");
|
|
1530
|
+
}
|
|
1531
|
+
function TupleOptions(type) {
|
|
1532
|
+
return exports_memory.Discard(type, ["~kind", "type", "items", "minItems", "additionalItems"]);
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/tuple/to_object.mjs
|
|
1536
|
+
function TupleElementsToProperties(types) {
|
|
1537
|
+
const result = types.reduceRight((result2, right, index) => {
|
|
1538
|
+
return { [index]: right, ...result2 };
|
|
1539
|
+
}, {});
|
|
1540
|
+
return result;
|
|
1541
|
+
}
|
|
1542
|
+
function TupleToObject(type) {
|
|
1543
|
+
const properties = TupleElementsToProperties(type.items);
|
|
1544
|
+
const result = _Object_(properties);
|
|
1545
|
+
return result;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs
|
|
1549
|
+
function RemoveOptionalOperation(type) {
|
|
1550
|
+
return exports_memory.Discard(type, ["~optional"]);
|
|
1551
|
+
}
|
|
1552
|
+
function RemoveOptionalAction(type, options) {
|
|
1553
|
+
const result = exports_memory.Update(RemoveOptionalOperation(type), {}, options);
|
|
1554
|
+
return result;
|
|
1555
|
+
}
|
|
1556
|
+
function RemoveOptionalInstantiate(context, state, type, options) {
|
|
1557
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1558
|
+
return RemoveOptionalAction(instantiatedType, options);
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs
|
|
1562
|
+
function RemoveReadonlyOperation(type) {
|
|
1563
|
+
return exports_memory.Discard(type, ["~readonly"]);
|
|
1564
|
+
}
|
|
1565
|
+
function RemoveReadonlyAction(type, options) {
|
|
1566
|
+
const result = exports_memory.Update(RemoveReadonlyOperation(type), {}, options);
|
|
1567
|
+
return result;
|
|
1568
|
+
}
|
|
1569
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
1570
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1571
|
+
return RemoveReadonlyAction(instantiatedType, options);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/property.mjs
|
|
1575
|
+
function EvaluatePropertyIntersect(left, right) {
|
|
1576
|
+
const isReadonly = IsReadonly(left) && IsReadonly(right);
|
|
1577
|
+
const isOptional = IsOptional(left) && IsOptional(right);
|
|
1578
|
+
const evaluated = EvaluateIntersect([left, right]);
|
|
1579
|
+
const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});
|
|
1580
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
1581
|
+
}
|
|
1582
|
+
function EvaluatePropertyUnion(left, right) {
|
|
1583
|
+
const isReadonly = IsReadonly(left) || IsReadonly(right);
|
|
1584
|
+
const isOptional = IsOptional(left) || IsOptional(right);
|
|
1585
|
+
const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});
|
|
1586
|
+
const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});
|
|
1587
|
+
const property = EvaluateUnion([leftProperty, rightProperty]);
|
|
1588
|
+
return isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) : isReadonly ? AddReadonlyAction(property, {}) : isOptional ? AddOptionalAction(property, {}) : property;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/composite.mjs
|
|
1592
|
+
function CompositePropertyKey(left, right, key) {
|
|
1593
|
+
return key in left ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key] : (key in right) ? right[key] : Never();
|
|
1594
|
+
}
|
|
1595
|
+
function CompositeProperties(left, right) {
|
|
1596
|
+
const keys = new Set([...exports_guard.Keys(left), ...exports_guard.Keys(right)]);
|
|
1597
|
+
const result = [...keys].reduce((result2, key) => {
|
|
1598
|
+
return { ...result2, [key]: CompositePropertyKey(left, right, key) };
|
|
1599
|
+
}, {});
|
|
1600
|
+
return result;
|
|
1601
|
+
}
|
|
1602
|
+
function GetProperties(type) {
|
|
1603
|
+
const result = IsObject3(type) ? type.properties : IsTuple(type) ? TupleElementsToProperties(type.items) : {};
|
|
1604
|
+
return result;
|
|
1605
|
+
}
|
|
1606
|
+
function Composite(left, right) {
|
|
1607
|
+
const leftProperties = GetProperties(left);
|
|
1608
|
+
const rightProperties = GetProperties(right);
|
|
1609
|
+
const properties = CompositeProperties(leftProperties, rightProperties);
|
|
1610
|
+
const result = _Object_(properties);
|
|
1611
|
+
return result;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/narrow.mjs
|
|
1615
|
+
function NarrowCompareRule(left, right) {
|
|
1616
|
+
const result = Compare(left, right);
|
|
1617
|
+
return exports_guard.IsEqual(result, CompareResultLeftInside) ? left : exports_guard.IsEqual(result, CompareResultRightInside) ? right : exports_guard.IsEqual(result, CompareResultEqual) ? right : Never();
|
|
1618
|
+
}
|
|
1619
|
+
function CanComposite(type) {
|
|
1620
|
+
return IsObject3(type) || IsTuple(type);
|
|
1621
|
+
}
|
|
1622
|
+
function NarrowCompositeRule(left, right) {
|
|
1623
|
+
const canCompositeLeft = CanComposite(left);
|
|
1624
|
+
const canCompositeRight = CanComposite(right);
|
|
1625
|
+
return canCompositeLeft && canCompositeRight ? Composite(left, right) : canCompositeLeft && !canCompositeRight ? left : !canCompositeLeft && canCompositeRight ? right : NarrowCompareRule(left, right);
|
|
1626
|
+
}
|
|
1627
|
+
function Narrow(left, right) {
|
|
1628
|
+
return IsNever(left) ? left : IsAny(left) ? left : IsUnknown(left) ? right : IsNever(right) ? right : IsAny(right) ? right : IsUnknown(right) ? left : NarrowCompositeRule(left, right);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/distribute.mjs
|
|
1632
|
+
function ShouldEvaluate(left, right) {
|
|
1633
|
+
const result = IsUnion(left) || IsUnion(right);
|
|
1634
|
+
return result;
|
|
1635
|
+
}
|
|
1636
|
+
function DistributeOperation(left, right) {
|
|
1637
|
+
const evaluatedLeft = EvaluateType(left);
|
|
1638
|
+
const evaluatedRight = EvaluateType(right);
|
|
1639
|
+
const shouldEvaluate = ShouldEvaluate(evaluatedLeft, evaluatedRight);
|
|
1640
|
+
const result = shouldEvaluate ? EvaluateIntersect([evaluatedLeft, evaluatedRight]) : Narrow(evaluatedLeft, evaluatedRight);
|
|
1641
|
+
return result;
|
|
1642
|
+
}
|
|
1643
|
+
function DistributeType(type, types, result = []) {
|
|
1644
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(left, type)]), () => exports_guard.IsEqual(result.length, 0) ? [type] : result);
|
|
1645
|
+
}
|
|
1646
|
+
function DistributeUnion(types, distribution, result = []) {
|
|
1647
|
+
return exports_guard.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);
|
|
1648
|
+
}
|
|
1649
|
+
function Distribute(types, result = []) {
|
|
1650
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsUnion(left) ? Distribute(right, DistributeUnion(left.anyOf, result)) : Distribute(right, DistributeType(left, result)), () => result);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/exclude/operation.mjs
|
|
1654
|
+
function ExcludeType(left, right) {
|
|
1655
|
+
const check = Extends({}, left, right);
|
|
1656
|
+
const result = exports_result.IsExtendsTrueLike(check) ? [] : [left];
|
|
1657
|
+
return result;
|
|
1658
|
+
}
|
|
1659
|
+
function ExcludeUnion(left, right, result = []) {
|
|
1660
|
+
return exports_guard.ShiftLeft(left, (head, tail) => ExcludeUnion(tail, right, [...result, ...ExcludeType(head, right)]), () => result);
|
|
1661
|
+
}
|
|
1662
|
+
function ExcludeOperation(left, right) {
|
|
1663
|
+
const evaluated = EvaluateType(left);
|
|
1664
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
1665
|
+
const remaining = ExcludeUnion(canonical, right);
|
|
1666
|
+
const result = EvaluateUnion(remaining);
|
|
1667
|
+
return result;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs
|
|
1671
|
+
function EvaluateDependent(if_, then_, else_) {
|
|
1672
|
+
const intersected = EvaluateIntersect([if_, then_]);
|
|
1673
|
+
const excluded = ExcludeOperation(else_, if_);
|
|
1674
|
+
const result = EvaluateUnion([intersected, excluded]);
|
|
1675
|
+
return result;
|
|
1676
|
+
}
|
|
1677
|
+
function EvaluateEnum(values, result = []) {
|
|
1678
|
+
return exports_guard.ShiftLeft(values, (left, right) => EvaluateEnum(right, [...result, Literal(left)]), () => EvaluateUnion(result));
|
|
1679
|
+
}
|
|
1680
|
+
function EvaluateIntersect(types) {
|
|
1681
|
+
const distribution = Distribute(types);
|
|
1682
|
+
const broadend = Broaden(distribution);
|
|
1683
|
+
const result = EvaluateUnion(broadend);
|
|
1684
|
+
return result;
|
|
1685
|
+
}
|
|
1686
|
+
function EvaluateTemplateLiteral(pattern) {
|
|
1687
|
+
const evaluated = TemplateLiteralDecode(pattern);
|
|
1688
|
+
const result = EvaluateType(evaluated);
|
|
1689
|
+
return result;
|
|
1690
|
+
}
|
|
1691
|
+
function EvaluateUnion(types) {
|
|
1692
|
+
const broadend = Broaden(types);
|
|
1693
|
+
const result = EvaluateUnionFast(broadend);
|
|
1694
|
+
return result;
|
|
1695
|
+
}
|
|
1696
|
+
function EvaluateType(type) {
|
|
1697
|
+
const result = IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) : IsEnum(type) ? EvaluateEnum(type.enum) : IsIntersect(type) ? EvaluateIntersect(type.allOf) : IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) : IsUnion(type) ? EvaluateUnion(type.anyOf) : type;
|
|
1698
|
+
return result;
|
|
1699
|
+
}
|
|
1700
|
+
function EvaluateUnionFast(types) {
|
|
1701
|
+
const result = exports_guard.IsEqual(types.length, 1) ? types[0] : exports_guard.IsEqual(types.length, 0) ? Never() : Union(types);
|
|
1702
|
+
return result;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_enum.mjs
|
|
1706
|
+
function FromEnumKey(values, value) {
|
|
1707
|
+
const unionKey = EvaluateEnum(values);
|
|
1708
|
+
const result = FromKey(unionKey, value);
|
|
1709
|
+
return result;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_integer.mjs
|
|
1713
|
+
function FromIntegerKey(_key, value) {
|
|
1714
|
+
const result = CreateRecord(IntegerKey, value);
|
|
1715
|
+
return result;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs
|
|
1719
|
+
function FromIntersectKey(types, value) {
|
|
1720
|
+
const evaluatedKey = EvaluateIntersect(types);
|
|
1721
|
+
const result = FromKey(evaluatedKey, value);
|
|
1722
|
+
return result;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_literal.mjs
|
|
1726
|
+
function FromLiteralKey(key, value) {
|
|
1727
|
+
return exports_guard.IsString(key) || exports_guard.IsNumber(key) ? _Object_({ [key]: value }) : exports_guard.IsEqual(key, false) ? _Object_({ false: value }) : exports_guard.IsEqual(key, true) ? _Object_({ true: value }) : _Object_({});
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_number.mjs
|
|
1731
|
+
function FromNumberKey(_key, value) {
|
|
1732
|
+
const result = CreateRecord(NumberKey, value);
|
|
1733
|
+
return result;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_string.mjs
|
|
1737
|
+
function FromStringKey(key, value) {
|
|
1738
|
+
return exports_guard.HasPropertyKey(key, "pattern") && (exports_guard.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
|
|
1742
|
+
function FromTemplateKey(pattern, value) {
|
|
1743
|
+
const types = ParsePatternIntoTypes(pattern);
|
|
1744
|
+
const finite = IsTemplateLiteralFinite(types);
|
|
1745
|
+
const result = finite ? FromKey(EvaluateTemplateLiteral(pattern), value) : CreateRecord(pattern, value);
|
|
1746
|
+
return result;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/flatten.mjs
|
|
1750
|
+
function FlattenType(type) {
|
|
1751
|
+
const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
1752
|
+
return result;
|
|
1753
|
+
}
|
|
1754
|
+
function Flatten(types, result = []) {
|
|
1755
|
+
return exports_guard.ShiftLeft(types, (left, right) => Flatten(right, [...result, ...FlattenType(left)]), () => result);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key_union.mjs
|
|
1759
|
+
function StringOrNumberCheck(types) {
|
|
1760
|
+
return types.some((type) => IsString4(type) || IsNumber4(type) || IsInteger3(type));
|
|
1761
|
+
}
|
|
1762
|
+
function TryBuildRecord(types, value) {
|
|
1763
|
+
return exports_guard.IsEqual(StringOrNumberCheck(types), true) ? CreateRecord(StringKey, value) : undefined;
|
|
1764
|
+
}
|
|
1765
|
+
function CreateProperties(types, value) {
|
|
1766
|
+
return types.reduce((result, left) => {
|
|
1767
|
+
return IsLiteral(left) && (exports_guard.IsString(left.const) || exports_guard.IsNumber(left.const)) ? { ...result, [left.const]: value } : result;
|
|
1768
|
+
}, {});
|
|
1769
|
+
}
|
|
1770
|
+
function CreateObject(types, value) {
|
|
1771
|
+
const properties = CreateProperties(types, value);
|
|
1772
|
+
const result = _Object_(properties);
|
|
1773
|
+
return result;
|
|
1774
|
+
}
|
|
1775
|
+
function FromUnionKey(types, value) {
|
|
1776
|
+
const flattened = Flatten(types);
|
|
1777
|
+
const record = TryBuildRecord(flattened, value);
|
|
1778
|
+
return IsSchema(record) ? record : CreateObject(flattened, value);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/from_key.mjs
|
|
1782
|
+
function FromKey(key, value) {
|
|
1783
|
+
const result = IsAny(key) ? FromAnyKey(value) : IsBoolean4(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger3(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber4(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString4(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
|
|
1784
|
+
return result;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/record/instantiate.mjs
|
|
1788
|
+
function RecordAction(key, value, options) {
|
|
1789
|
+
const result = CanInstantiate([key]) ? exports_memory.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
|
|
1790
|
+
return result;
|
|
1791
|
+
}
|
|
1792
|
+
function RecordInstantiate(context, state, key, value, options) {
|
|
1793
|
+
const instantiatedKey = InstantiateType(context, state, key);
|
|
1794
|
+
const instantiatedValue = InstantiateType(context, state, value);
|
|
1795
|
+
return RecordAction(instantiatedKey, instantiatedValue, options);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/record.mjs
|
|
1799
|
+
var IntegerKey = `^${IntegerPattern}$`;
|
|
1800
|
+
var NumberKey = `^${NumberPattern}$`;
|
|
1801
|
+
var StringKey = `^${StringPattern}$`;
|
|
1802
|
+
function RecordDeferred(key, value, options = {}) {
|
|
1803
|
+
return Deferred("Record", [key, value], options);
|
|
1804
|
+
}
|
|
1805
|
+
function Record(key, value, options = {}) {
|
|
1806
|
+
return RecordAction(key, value, options);
|
|
1807
|
+
}
|
|
1808
|
+
function RecordFromPattern(pattern, value) {
|
|
1809
|
+
return CreateRecord(pattern, value);
|
|
1810
|
+
}
|
|
1811
|
+
function RecordPatternToType(pattern) {
|
|
1812
|
+
const result = exports_guard.IsEqual(pattern, StringKey) ? String2() : exports_guard.IsEqual(pattern, IntegerKey) ? Integer() : exports_guard.IsEqual(pattern, NumberKey) ? Number2() : TemplateLiteralDecodeUnsafe(pattern);
|
|
1813
|
+
return result;
|
|
1814
|
+
}
|
|
1815
|
+
function RecordPattern(type) {
|
|
1816
|
+
return exports_guard.Keys(type.patternProperties)[0];
|
|
1817
|
+
}
|
|
1818
|
+
function RecordKey(type) {
|
|
1819
|
+
const pattern = RecordPattern(type);
|
|
1820
|
+
const result = RecordPatternToType(pattern);
|
|
1821
|
+
return result;
|
|
1822
|
+
}
|
|
1823
|
+
function RecordValue(type) {
|
|
1824
|
+
return type.patternProperties[RecordPattern(type)];
|
|
1825
|
+
}
|
|
1826
|
+
function IsRecord(value) {
|
|
1827
|
+
return IsKind(value, "Record");
|
|
1828
|
+
}
|
|
1829
|
+
function RecordOptions(type) {
|
|
1830
|
+
return exports_memory.Discard(type, ["~kind", "type", "patternProperties"]);
|
|
1831
|
+
}
|
|
1832
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/rest.mjs
|
|
1833
|
+
function Rest(type) {
|
|
1834
|
+
return exports_memory.Create({ "~kind": "Rest" }, { type: "rest", items: type }, {});
|
|
1835
|
+
}
|
|
1836
|
+
function IsRest(value) {
|
|
1837
|
+
return IsKind(value, "Rest");
|
|
1838
|
+
}
|
|
1839
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/this.mjs
|
|
1840
|
+
function This(options) {
|
|
1841
|
+
return exports_memory.Create({ ["~kind"]: "This" }, { $ref: "#" }, options);
|
|
1842
|
+
}
|
|
1843
|
+
function IsThis(value) {
|
|
1844
|
+
return IsKind(value, "This");
|
|
1845
|
+
}
|
|
1846
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/undefined.mjs
|
|
1847
|
+
function Undefined(options) {
|
|
1848
|
+
return exports_memory.Create({ "~kind": "Undefined" }, { type: "undefined" }, options);
|
|
1849
|
+
}
|
|
1850
|
+
function IsUndefined3(value) {
|
|
1851
|
+
return IsKind(value, "Undefined");
|
|
1852
|
+
}
|
|
1853
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/void.mjs
|
|
1854
|
+
function Void(options) {
|
|
1855
|
+
return exports_memory.Create({ "~kind": "Void" }, { type: "void" }, options);
|
|
1856
|
+
}
|
|
1857
|
+
function IsVoid(value) {
|
|
1858
|
+
return IsKind(value, "Void");
|
|
1859
|
+
}
|
|
1860
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs
|
|
1861
|
+
function RemoveImmutableOperation(type) {
|
|
1862
|
+
return exports_memory.Discard(type, ["~immutable"]);
|
|
1863
|
+
}
|
|
1864
|
+
function RemoveImmutableAction(type, options) {
|
|
1865
|
+
const result = exports_memory.Update(RemoveImmutableOperation(type), {}, options);
|
|
1866
|
+
return result;
|
|
1867
|
+
}
|
|
1868
|
+
function RemoveImmutableInstantiate(context, state, type, options) {
|
|
1869
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1870
|
+
return RemoveImmutableAction(instantiatedType, options);
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_remove_immutable.mjs
|
|
1874
|
+
function RemoveImmutableDeferred(type, options = {}) {
|
|
1875
|
+
return Deferred("RemoveImmutable", [type], options);
|
|
1876
|
+
}
|
|
1877
|
+
function RemoveImmutable(type, options = {}) {
|
|
1878
|
+
return RemoveImmutableAction(type, options);
|
|
1879
|
+
}
|
|
1880
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_remove_readonly.mjs
|
|
1881
|
+
function RemoveReadonlyDeferred(type, options = {}) {
|
|
1882
|
+
return Deferred("RemoveReadonly", [type], options);
|
|
1883
|
+
}
|
|
1884
|
+
function RemoveReadonly(type, options = {}) {
|
|
1885
|
+
return RemoveReadonlyAction(type, options);
|
|
1886
|
+
}
|
|
1887
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_remove_optional.mjs
|
|
1888
|
+
function RemoveOptionalDeferred(type, options = {}) {
|
|
1889
|
+
return Deferred("RemoveOptional", [type], options);
|
|
1890
|
+
}
|
|
1891
|
+
function RemoveOptional(type, options = {}) {
|
|
1892
|
+
return RemoveOptionalAction(type, options);
|
|
1893
|
+
}
|
|
1894
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs
|
|
1895
|
+
function ApplyMapping(mapping, value) {
|
|
1896
|
+
return mapping(value);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs
|
|
1900
|
+
function FromLiteral3(mapping, value) {
|
|
1901
|
+
return exports_guard.IsString(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs
|
|
1905
|
+
function FromTemplateLiteral(mapping, pattern) {
|
|
1906
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
1907
|
+
const result = FromType3(mapping, evaluated);
|
|
1908
|
+
return result;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs
|
|
1912
|
+
function FromUnion2(mapping, types) {
|
|
1913
|
+
const result = types.map((type) => FromType3(mapping, type));
|
|
1914
|
+
return Union(result);
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs
|
|
1918
|
+
function FromType3(mapping, type) {
|
|
1919
|
+
return IsLiteral(type) ? FromLiteral3(mapping, type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) : IsUnion(type) ? FromUnion2(mapping, type.anyOf) : type;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/lowercase.mjs
|
|
1923
|
+
function LowercaseDeferred(type, options = {}) {
|
|
1924
|
+
return Deferred("Lowercase", [type], options);
|
|
1925
|
+
}
|
|
1926
|
+
function Lowercase(type, options = {}) {
|
|
1927
|
+
return LowercaseAction(type, options);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/uncapitalize.mjs
|
|
1931
|
+
function UncapitalizeDeferred(type, options = {}) {
|
|
1932
|
+
return Deferred("Uncapitalize", [type], options);
|
|
1933
|
+
}
|
|
1934
|
+
function Uncapitalize(type, options = {}) {
|
|
1935
|
+
return UncapitalizeAction(type, options);
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/uppercase.mjs
|
|
1939
|
+
function UppercaseDeferred(type, options = {}) {
|
|
1940
|
+
return Deferred("Uppercase", [type], options);
|
|
1941
|
+
}
|
|
1942
|
+
function Uppercase(type, options = {}) {
|
|
1943
|
+
return UppercaseAction(type, options);
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs
|
|
1947
|
+
var CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);
|
|
1948
|
+
var LowercaseMapping = (input) => input.toLowerCase();
|
|
1949
|
+
var UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);
|
|
1950
|
+
var UppercaseMapping = (input) => input.toUpperCase();
|
|
1951
|
+
function CapitalizeAction(type, options) {
|
|
1952
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType3(CapitalizeMapping, type), {}, options) : CapitalizeDeferred(type, options);
|
|
1953
|
+
return result;
|
|
1954
|
+
}
|
|
1955
|
+
function LowercaseAction(type, options) {
|
|
1956
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType3(LowercaseMapping, type), {}, options) : LowercaseDeferred(type, options);
|
|
1957
|
+
return result;
|
|
1958
|
+
}
|
|
1959
|
+
function UncapitalizeAction(type, options) {
|
|
1960
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType3(UncapitalizeMapping, type), {}, options) : UncapitalizeDeferred(type, options);
|
|
1961
|
+
return result;
|
|
1962
|
+
}
|
|
1963
|
+
function UppercaseAction(type, options) {
|
|
1964
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType3(UppercaseMapping, type), {}, options) : UppercaseDeferred(type, options);
|
|
1965
|
+
return result;
|
|
1966
|
+
}
|
|
1967
|
+
function CapitalizeInstantiate(context, state, type, options) {
|
|
1968
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1969
|
+
return CapitalizeAction(instantiatedType, options);
|
|
1970
|
+
}
|
|
1971
|
+
function LowercaseInstantiate(context, state, type, options) {
|
|
1972
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1973
|
+
return LowercaseAction(instantiatedType, options);
|
|
1974
|
+
}
|
|
1975
|
+
function UncapitalizeInstantiate(context, state, type, options) {
|
|
1976
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1977
|
+
return UncapitalizeAction(instantiatedType, options);
|
|
1978
|
+
}
|
|
1979
|
+
function UppercaseInstantiate(context, state, type, options) {
|
|
1980
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
1981
|
+
return UppercaseAction(instantiatedType, options);
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/capitalize.mjs
|
|
1985
|
+
function CapitalizeDeferred(type, options = {}) {
|
|
1986
|
+
return Deferred("Capitalize", [type], options);
|
|
1987
|
+
}
|
|
1988
|
+
function Capitalize(type, options = {}) {
|
|
1989
|
+
return CapitalizeAction(type, options);
|
|
1990
|
+
}
|
|
1991
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/conditional/instantiate.mjs
|
|
1992
|
+
function ConditionalOperation(context, state, left, right, true_, false_) {
|
|
1993
|
+
const extendsResult = Extends(context, left, right);
|
|
1994
|
+
return exports_result.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) : exports_result.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) : InstantiateType(context, state, false_);
|
|
1995
|
+
}
|
|
1996
|
+
function ConditionalAction(context, state, left, right, true_, false_, options) {
|
|
1997
|
+
const result = CanInstantiate([left, right]) ? exports_memory.Update(ConditionalOperation(context, state, left, right, true_, false_), {}, options) : ConditionalDeferred(left, right, true_, false_, options);
|
|
1998
|
+
return result;
|
|
1999
|
+
}
|
|
2000
|
+
function ConditionalInstantiate(context, state, left, right, true_, false_, options) {
|
|
2001
|
+
const instantiatedLeft = InstantiateType(context, state, left);
|
|
2002
|
+
const instantiatedRight = InstantiateType(context, state, right);
|
|
2003
|
+
return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/conditional.mjs
|
|
2007
|
+
function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
2008
|
+
return Deferred("Conditional", [left, right, true_, false_], options);
|
|
2009
|
+
}
|
|
2010
|
+
function Conditional(left, right, true_, false_, options = {}) {
|
|
2011
|
+
return ConditionalAction({}, State([], []), left, right, true_, false_, options);
|
|
2012
|
+
}
|
|
2013
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs
|
|
2014
|
+
function ConstructorParametersOperation(type) {
|
|
2015
|
+
const parameters = IsConstructor3(type) ? type["parameters"] : [];
|
|
2016
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
2017
|
+
const result = Tuple(instantiatedParameters);
|
|
2018
|
+
return result;
|
|
2019
|
+
}
|
|
2020
|
+
function ConstructorParametersAction(type, options) {
|
|
2021
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(ConstructorParametersOperation(type), {}, options) : ConstructorParametersDeferred(type, options);
|
|
2022
|
+
return result;
|
|
2023
|
+
}
|
|
2024
|
+
function ConstructorParametersInstantiate(context, state, type, options) {
|
|
2025
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2026
|
+
return ConstructorParametersAction(instantiatedType, options);
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/constructor_parameters.mjs
|
|
2030
|
+
function ConstructorParametersDeferred(type, options = {}) {
|
|
2031
|
+
return Deferred("ConstructorParameters", [type], options);
|
|
2032
|
+
}
|
|
2033
|
+
function ConstructorParameters(type, options = {}) {
|
|
2034
|
+
return ConstructorParametersAction(type, options);
|
|
2035
|
+
}
|
|
2036
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs
|
|
2037
|
+
function EvaluateAction(type, options) {
|
|
2038
|
+
const result = exports_memory.Update(EvaluateType(type), {}, options);
|
|
2039
|
+
return result;
|
|
2040
|
+
}
|
|
2041
|
+
function EvaluateInstantiate(context, state, type, options) {
|
|
2042
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2043
|
+
return EvaluateAction(instantiatedType, options);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/evaluate.mjs
|
|
2047
|
+
function EvaluateDeferred(type, options = {}) {
|
|
2048
|
+
return Deferred("Evaluate", [type], options);
|
|
2049
|
+
}
|
|
2050
|
+
function Evaluate2(type, options = {}) {
|
|
2051
|
+
return EvaluateAction(type, options);
|
|
2052
|
+
}
|
|
2053
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/exclude/instantiate.mjs
|
|
2054
|
+
function ExcludeAction(left, right, options) {
|
|
2055
|
+
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExcludeOperation(left, right), {}, options) : ExcludeDeferred(left, right, options);
|
|
2056
|
+
return result;
|
|
2057
|
+
}
|
|
2058
|
+
function ExcludeInstantiate(context, state, left, right, options) {
|
|
2059
|
+
const instantiatedLeft = InstantiateType(context, state, left);
|
|
2060
|
+
const instantiatedRight = InstantiateType(context, state, right);
|
|
2061
|
+
return ExcludeAction(instantiatedLeft, instantiatedRight, options);
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/exclude.mjs
|
|
2065
|
+
function ExcludeDeferred(left, right, options = {}) {
|
|
2066
|
+
return Deferred("Exclude", [left, right], options);
|
|
2067
|
+
}
|
|
2068
|
+
function Exclude(left, right, options = {}) {
|
|
2069
|
+
return ExcludeAction(left, right, options);
|
|
2070
|
+
}
|
|
2071
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/extract/operation.mjs
|
|
2072
|
+
function ExtractType(left, right) {
|
|
2073
|
+
const check = Extends({}, left, right);
|
|
2074
|
+
const result = exports_result.IsExtendsTrueLike(check) ? [left] : [];
|
|
2075
|
+
return result;
|
|
2076
|
+
}
|
|
2077
|
+
function ExtractUnion(left, right, result = []) {
|
|
2078
|
+
return exports_guard.ShiftLeft(left, (head, tail) => ExtractUnion(tail, right, [...result, ...ExtractType(head, right)]), () => result);
|
|
2079
|
+
}
|
|
2080
|
+
function ExtractOperation(left, right) {
|
|
2081
|
+
const evaluated = EvaluateType(left);
|
|
2082
|
+
const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];
|
|
2083
|
+
const remaining = ExtractUnion(canonical, right);
|
|
2084
|
+
const result = EvaluateUnion(remaining);
|
|
2085
|
+
return result;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/extract/instantiate.mjs
|
|
2089
|
+
function ExtractAction(left, right, options) {
|
|
2090
|
+
const result = CanInstantiate([left, right]) ? exports_memory.Update(ExtractOperation(left, right), {}, options) : ExtractDeferred(left, right, options);
|
|
2091
|
+
return result;
|
|
2092
|
+
}
|
|
2093
|
+
function ExtractInstantiate(context, state, left, right, options) {
|
|
2094
|
+
const instantiatedLeft = InstantiateType(context, state, left);
|
|
2095
|
+
const instantiatedRight = InstantiateType(context, state, right);
|
|
2096
|
+
return ExtractAction(instantiatedLeft, instantiatedRight, options);
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/extract.mjs
|
|
2100
|
+
function ExtractDeferred(left, right, options = {}) {
|
|
2101
|
+
return Deferred("Extract", [left, right], options);
|
|
2102
|
+
}
|
|
2103
|
+
function Extract(left, right, options = {}) {
|
|
2104
|
+
return ExtractAction(left, right, options);
|
|
2105
|
+
}
|
|
2106
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs
|
|
2107
|
+
function KeysToLiterals(keys) {
|
|
2108
|
+
return keys.reduce((result, left) => {
|
|
2109
|
+
return IsLiteralValue(left) ? [...result, Literal(left)] : result;
|
|
2110
|
+
}, []);
|
|
2111
|
+
}
|
|
2112
|
+
function KeysToIndexer(keys) {
|
|
2113
|
+
const literals = KeysToLiterals(keys);
|
|
2114
|
+
const result = Union(literals);
|
|
2115
|
+
return result;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/target.mjs
|
|
2119
|
+
function Resolve(defs, ref2) {
|
|
2120
|
+
return ref2 in defs ? IsRef(defs[ref2]) ? Resolve(defs, defs[ref2].$ref) : defs[ref2] : Never();
|
|
2121
|
+
}
|
|
2122
|
+
function CyclicTarget(defs, ref2) {
|
|
2123
|
+
const result = Resolve(defs, ref2);
|
|
2124
|
+
return result;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_cyclic.mjs
|
|
2128
|
+
function FromCyclic(defs, ref2) {
|
|
2129
|
+
const target = CyclicTarget(defs, ref2);
|
|
2130
|
+
const result = FromType4(target);
|
|
2131
|
+
return result;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_dependent.mjs
|
|
2135
|
+
function FromDependent(if_, then_, else_) {
|
|
2136
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
2137
|
+
const result = FromType4(evaluated);
|
|
2138
|
+
return result;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_intersect.mjs
|
|
2142
|
+
function CollapseIntersectProperties(left, right) {
|
|
2143
|
+
const leftKeys = exports_guard.Keys(left).filter((key) => !exports_guard.HasPropertyKey(right, key));
|
|
2144
|
+
const rightKeys = exports_guard.Keys(right).filter((key) => !exports_guard.HasPropertyKey(left, key));
|
|
2145
|
+
const sharedKeys = exports_guard.Keys(left).filter((key) => exports_guard.HasPropertyKey(right, key));
|
|
2146
|
+
const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});
|
|
2147
|
+
const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});
|
|
2148
|
+
const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});
|
|
2149
|
+
const unique = exports_memory.Assign(leftProperties, rightProperties);
|
|
2150
|
+
const shared = exports_memory.Assign(unique, sharedProperties);
|
|
2151
|
+
return shared;
|
|
2152
|
+
}
|
|
2153
|
+
function FromIntersect(types) {
|
|
2154
|
+
return types.reduce((result, left) => {
|
|
2155
|
+
return CollapseIntersectProperties(result, FromType4(left));
|
|
2156
|
+
}, {});
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_object.mjs
|
|
2160
|
+
function FromObject2(properties2) {
|
|
2161
|
+
return properties2;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_tuple.mjs
|
|
2165
|
+
function FromTuple(types) {
|
|
2166
|
+
const object2 = TupleToObject(Tuple(types));
|
|
2167
|
+
const result = FromType4(object2);
|
|
2168
|
+
return result;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_union.mjs
|
|
2172
|
+
function CollapseUnionProperties(left, right) {
|
|
2173
|
+
const sharedKeys = exports_guard.Keys(left).filter((key) => (key in right));
|
|
2174
|
+
const result = sharedKeys.reduce((result2, key) => {
|
|
2175
|
+
return { ...result2, [key]: EvaluatePropertyUnion(left[key], right[key]) };
|
|
2176
|
+
}, {});
|
|
2177
|
+
return result;
|
|
2178
|
+
}
|
|
2179
|
+
function ReduceVariants(types, result) {
|
|
2180
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType4(left))), () => result);
|
|
2181
|
+
}
|
|
2182
|
+
function FromUnion3(types) {
|
|
2183
|
+
return exports_guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType4(left)), () => Unreachable());
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/from_type.mjs
|
|
2187
|
+
function FromType4(type) {
|
|
2188
|
+
return IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) : IsDependent(type) ? FromDependent(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect(type.allOf) : IsUnion(type) ? FromUnion3(type.anyOf) : IsTuple(type) ? FromTuple(type.items) : IsObject3(type) ? FromObject2(type.properties) : {};
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/object/collapse.mjs
|
|
2192
|
+
function CollapseToObject(type) {
|
|
2193
|
+
const properties2 = FromType4(type);
|
|
2194
|
+
const result = _Object_(properties2);
|
|
2195
|
+
return result;
|
|
2196
|
+
}
|
|
2197
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/helpers/keys.mjs
|
|
2198
|
+
var integerKeyPattern = new RegExp("^(?:0|[1-9][0-9]*)$");
|
|
2199
|
+
function ConvertToIntegerKey(value) {
|
|
2200
|
+
const normal = `${value}`;
|
|
2201
|
+
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/from_array.mjs
|
|
2205
|
+
function NormalizeLiteral(value) {
|
|
2206
|
+
return Literal(ConvertToIntegerKey(value));
|
|
2207
|
+
}
|
|
2208
|
+
function NormalizeIndexerTypes(types) {
|
|
2209
|
+
return types.map((type) => NormalizeIndexer(type));
|
|
2210
|
+
}
|
|
2211
|
+
function NormalizeIndexer(type) {
|
|
2212
|
+
return IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) : IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) : IsLiteral(type) ? NormalizeLiteral(type.const) : type;
|
|
2213
|
+
}
|
|
2214
|
+
function FromArray2(type, indexer) {
|
|
2215
|
+
const normalizedIndexer = NormalizeIndexer(indexer);
|
|
2216
|
+
const check = Extends({}, normalizedIndexer, Number2());
|
|
2217
|
+
const result = exports_result.IsExtendsTrueLike(check) ? type : IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Number2() : Never();
|
|
2218
|
+
return result;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs
|
|
2222
|
+
function FromCyclic2(defs, ref2) {
|
|
2223
|
+
const target = CyclicTarget(defs, ref2);
|
|
2224
|
+
const result = FromType5(target);
|
|
2225
|
+
return result;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs
|
|
2229
|
+
function FromDependent2(if_, then_, else_) {
|
|
2230
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
2231
|
+
const result = FromType5(evaluated);
|
|
2232
|
+
return result;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_enum.mjs
|
|
2236
|
+
function FromEnum(values) {
|
|
2237
|
+
const evaluated = EvaluateEnum(values);
|
|
2238
|
+
const result = FromType5(evaluated);
|
|
2239
|
+
return result;
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs
|
|
2243
|
+
function FromIntersect2(types) {
|
|
2244
|
+
const evaluated = EvaluateIntersect(types);
|
|
2245
|
+
const result = FromType5(evaluated);
|
|
2246
|
+
return result;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_literal.mjs
|
|
2250
|
+
function FromLiteral4(value) {
|
|
2251
|
+
const result = [`${value}`];
|
|
2252
|
+
return result;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs
|
|
2256
|
+
function FromTemplateLiteral2(pattern) {
|
|
2257
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
2258
|
+
const result = FromType5(evaluated);
|
|
2259
|
+
return result;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_union.mjs
|
|
2263
|
+
function FromUnion4(types) {
|
|
2264
|
+
return types.reduce((result, left) => {
|
|
2265
|
+
return [...result, ...FromType5(left)];
|
|
2266
|
+
}, []);
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/from_type.mjs
|
|
2270
|
+
function FromType5(type) {
|
|
2271
|
+
return IsCyclic(type) ? FromCyclic2(type.$defs, type.$ref) : IsDependent(type) ? FromDependent2(type.if, type.then, type.else) : IsEnum(type) ? FromEnum(type.enum) : IsIntersect(type) ? FromIntersect2(type.allOf) : IsLiteral(type) ? FromLiteral4(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral2(type.pattern) : IsUnion(type) ? FromUnion4(type.anyOf) : [];
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs
|
|
2275
|
+
function ToIndexableKeys(type) {
|
|
2276
|
+
const result = FromType5(type);
|
|
2277
|
+
return result;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/this/expand_this.mjs
|
|
2281
|
+
function FromTypes2(properties2, types) {
|
|
2282
|
+
return types.map((type) => FromType6(properties2, type));
|
|
2283
|
+
}
|
|
2284
|
+
function FromType6(properties2, type) {
|
|
2285
|
+
return IsArray3(type) ? _Array_(FromType6(properties2, type.items)) : IsConstructor3(type) ? Constructor(FromTypes2(properties2, type.parameters), FromType6(properties2, type.instanceType)) : IsFunction3(type) ? _Function_(FromTypes2(properties2, type.parameters), FromType6(properties2, type.returnType)) : IsTuple(type) ? Tuple(FromTypes2(properties2, type.items)) : IsUnion(type) ? Union(FromTypes2(properties2, type.anyOf)) : IsIntersect(type) ? Intersect(FromTypes2(properties2, type.allOf)) : IsThis(type) ? _Object_(properties2) : type;
|
|
2286
|
+
}
|
|
2287
|
+
function ExpandThis(properties2, type) {
|
|
2288
|
+
const result = FromType6(properties2, type);
|
|
2289
|
+
return result;
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/from_object.mjs
|
|
2293
|
+
function IndexProperty(properties2, key) {
|
|
2294
|
+
const selectedType = key in properties2 ? properties2[key] : Never();
|
|
2295
|
+
const result = ExpandThis(properties2, selectedType);
|
|
2296
|
+
return result;
|
|
2297
|
+
}
|
|
2298
|
+
function IndexProperties(properties2, keys) {
|
|
2299
|
+
return keys.reduce((result, left) => {
|
|
2300
|
+
return [...result, IndexProperty(properties2, left)];
|
|
2301
|
+
}, []);
|
|
2302
|
+
}
|
|
2303
|
+
function FromIndexer(properties2, indexer) {
|
|
2304
|
+
const keys = ToIndexableKeys(indexer);
|
|
2305
|
+
const variants = IndexProperties(properties2, keys);
|
|
2306
|
+
const result = EvaluateUnion(variants);
|
|
2307
|
+
return result;
|
|
2308
|
+
}
|
|
2309
|
+
var NumericKeyPattern = new RegExp(IntegerKey);
|
|
2310
|
+
function NumericKeys(keys) {
|
|
2311
|
+
const result = keys.filter((key) => NumericKeyPattern.test(key));
|
|
2312
|
+
return result;
|
|
2313
|
+
}
|
|
2314
|
+
function FromIndexerNumber(properties2) {
|
|
2315
|
+
const keys = PropertyKeys(properties2);
|
|
2316
|
+
const numericKeys = NumericKeys(keys);
|
|
2317
|
+
const variants = IndexProperties(properties2, numericKeys);
|
|
2318
|
+
const result = EvaluateUnion(variants);
|
|
2319
|
+
return result;
|
|
2320
|
+
}
|
|
2321
|
+
function FromObject3(properties2, indexer) {
|
|
2322
|
+
const result = IsNumber4(indexer) ? FromIndexerNumber(properties2) : FromIndexer(properties2, indexer);
|
|
2323
|
+
return result;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs
|
|
2327
|
+
function ConvertLiteral(value) {
|
|
2328
|
+
return Literal(ConvertToIntegerKey(value));
|
|
2329
|
+
}
|
|
2330
|
+
function ArrayIndexerTypes(types) {
|
|
2331
|
+
return types.map((type) => FormatArrayIndexer(type));
|
|
2332
|
+
}
|
|
2333
|
+
function FormatArrayIndexer(type) {
|
|
2334
|
+
return IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) : IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) : IsLiteral(type) ? ConvertLiteral(type.const) : type;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs
|
|
2338
|
+
function IndexElementsWithIndexer(types, indexer) {
|
|
2339
|
+
return types.reduceRight((result, right, index) => {
|
|
2340
|
+
const check = Extends({}, Literal(index), indexer);
|
|
2341
|
+
return exports_result.IsExtendsTrueLike(check) ? [right, ...result] : result;
|
|
2342
|
+
}, []);
|
|
2343
|
+
}
|
|
2344
|
+
function FromTupleWithIndexer(types, indexer) {
|
|
2345
|
+
const formattedArrayIndexer = FormatArrayIndexer(indexer);
|
|
2346
|
+
const elements = IndexElementsWithIndexer(types, formattedArrayIndexer);
|
|
2347
|
+
return EvaluateUnionFast(elements);
|
|
2348
|
+
}
|
|
2349
|
+
function FromTupleWithoutIndexer(types) {
|
|
2350
|
+
return EvaluateUnionFast(types);
|
|
2351
|
+
}
|
|
2352
|
+
function FromTuple2(types, indexer) {
|
|
2353
|
+
return IsLiteral(indexer) && exports_guard.IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber4(indexer) || IsInteger3(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer);
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/from_type.mjs
|
|
2357
|
+
function FromType7(type, indexer) {
|
|
2358
|
+
return IsArray3(type) ? FromArray2(type.items, indexer) : IsObject3(type) ? FromObject3(type.properties, indexer) : IsTuple(type) ? FromTuple2(type.items, indexer) : Never();
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexed/instantiate.mjs
|
|
2362
|
+
function NormalizeType(type) {
|
|
2363
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
2364
|
+
return result;
|
|
2365
|
+
}
|
|
2366
|
+
function IndexAction(type, indexer, options) {
|
|
2367
|
+
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType7(NormalizeType(type), indexer), {}, options) : IndexDeferred(type, indexer, options);
|
|
2368
|
+
return result;
|
|
2369
|
+
}
|
|
2370
|
+
function IndexInstantiate(context, state, type, indexer, options) {
|
|
2371
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2372
|
+
const instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
2373
|
+
return IndexAction(instantiatedType, instantiatedIndexer, options);
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/indexed.mjs
|
|
2377
|
+
function IndexDeferred(type, indexer, options = {}) {
|
|
2378
|
+
return Deferred("Index", [type, indexer], options);
|
|
2379
|
+
}
|
|
2380
|
+
function Index(type, indexer_or_keys, options = {}) {
|
|
2381
|
+
const indexer = exports_guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
2382
|
+
return IndexAction(type, indexer, options);
|
|
2383
|
+
}
|
|
2384
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs
|
|
2385
|
+
function InstanceTypeOperation(type) {
|
|
2386
|
+
return IsConstructor3(type) ? type["instanceType"] : Never();
|
|
2387
|
+
}
|
|
2388
|
+
function InstanceTypeAction(type, options) {
|
|
2389
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(InstanceTypeOperation(type), {}, options) : InstanceTypeDeferred(type, options);
|
|
2390
|
+
return result;
|
|
2391
|
+
}
|
|
2392
|
+
function InstanceTypeInstantiate(context, state, type, options = {}) {
|
|
2393
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2394
|
+
return InstanceTypeAction(instantiatedType, options);
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/instance_type.mjs
|
|
2398
|
+
function InstanceTypeDeferred(type, options = {}) {
|
|
2399
|
+
return Deferred("InstanceType", [type], options);
|
|
2400
|
+
}
|
|
2401
|
+
function InstanceType(type, options = {}) {
|
|
2402
|
+
return InstanceTypeAction(type, options);
|
|
2403
|
+
}
|
|
2404
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/interface/instantiate.mjs
|
|
2405
|
+
function InterfaceOperation(heritage, properties2) {
|
|
2406
|
+
const result = EvaluateIntersect([...heritage, _Object_(properties2)]);
|
|
2407
|
+
return result;
|
|
2408
|
+
}
|
|
2409
|
+
function InterfaceAction(heritage, properties2, options) {
|
|
2410
|
+
const result = CanInstantiate(heritage) ? exports_memory.Update(InterfaceOperation(heritage, properties2), {}, options) : InterfaceDeferred(heritage, properties2, options);
|
|
2411
|
+
return result;
|
|
2412
|
+
}
|
|
2413
|
+
function InterfaceInstantiate(context, state, heritage, properties2, options) {
|
|
2414
|
+
const instantiatedHeritage = InstantiateTypes(context, state, heritage);
|
|
2415
|
+
const instantiatedProperties = InstantiateProperties(context, state, properties2);
|
|
2416
|
+
return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/interface.mjs
|
|
2420
|
+
function InterfaceDeferred(heritage, properties2, options = {}) {
|
|
2421
|
+
return Deferred("Interface", [heritage, properties2], options);
|
|
2422
|
+
}
|
|
2423
|
+
function IsInterfaceDeferred(value) {
|
|
2424
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "action") && exports_guard.IsEqual(value.action, "Interface");
|
|
2425
|
+
}
|
|
2426
|
+
function Interface(heritage, properties2, options = {}) {
|
|
2427
|
+
return InterfaceAction(heritage, properties2, options);
|
|
2428
|
+
}
|
|
2429
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_any.mjs
|
|
2430
|
+
function FromAny() {
|
|
2431
|
+
return Union([Number2(), String2(), Symbol()]);
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_array.mjs
|
|
2435
|
+
function FromArray3(_type) {
|
|
2436
|
+
return Number2();
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_object.mjs
|
|
2440
|
+
function FromPropertyKeys(keys) {
|
|
2441
|
+
const result = keys.reduce((result2, left) => {
|
|
2442
|
+
return IsLiteralValue(left) ? [...result2, Literal(ConvertToIntegerKey(left))] : Unreachable();
|
|
2443
|
+
}, []);
|
|
2444
|
+
return result;
|
|
2445
|
+
}
|
|
2446
|
+
function FromObject4(properties2) {
|
|
2447
|
+
const propertyKeys = exports_guard.Keys(properties2);
|
|
2448
|
+
const variants = FromPropertyKeys(propertyKeys);
|
|
2449
|
+
const result = EvaluateUnionFast(variants);
|
|
2450
|
+
return result;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_record.mjs
|
|
2454
|
+
function FromRecord(type) {
|
|
2455
|
+
return RecordKey(type);
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs
|
|
2459
|
+
function FromTuple3(types) {
|
|
2460
|
+
const result = types.map((_, index) => Literal(index));
|
|
2461
|
+
return EvaluateUnionFast(result);
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/from_type.mjs
|
|
2465
|
+
function FromType8(type) {
|
|
2466
|
+
return IsAny(type) ? FromAny() : IsArray3(type) ? FromArray3(type.items) : IsObject3(type) ? FromObject4(type.properties) : IsRecord(type) ? FromRecord(type) : IsTuple(type) ? FromTuple3(type.items) : Never();
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/keyof/instantiate.mjs
|
|
2470
|
+
function NormalizeType2(type) {
|
|
2471
|
+
const result = IsCyclic(type) || IsDependent(type) || IsIntersect(type) || IsUnion(type) ? CollapseToObject(type) : type;
|
|
2472
|
+
return result;
|
|
2473
|
+
}
|
|
2474
|
+
function KeyOfAction(type, options) {
|
|
2475
|
+
return CanInstantiate([type]) ? exports_memory.Update(FromType8(NormalizeType2(type)), {}, options) : KeyOfDeferred(type, options);
|
|
2476
|
+
}
|
|
2477
|
+
function KeyOfInstantiate(context, state, type, options) {
|
|
2478
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2479
|
+
return KeyOfAction(instantiatedType, options);
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/keyof.mjs
|
|
2483
|
+
function KeyOfDeferred(type, options = {}) {
|
|
2484
|
+
return Deferred("KeyOf", [type], options);
|
|
2485
|
+
}
|
|
2486
|
+
function KeyOf(type, options = {}) {
|
|
2487
|
+
return KeyOfAction(type, options);
|
|
2488
|
+
}
|
|
2489
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs
|
|
2490
|
+
function FromTemplateLiteral3(pattern) {
|
|
2491
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
2492
|
+
const result = FromType9(evaluated);
|
|
2493
|
+
return result;
|
|
2494
|
+
}
|
|
2495
|
+
function FromUnion5(types) {
|
|
2496
|
+
return types.reduce((result, left) => {
|
|
2497
|
+
return [...result, ...FromType9(left)];
|
|
2498
|
+
}, []);
|
|
2499
|
+
}
|
|
2500
|
+
function FromEnum2(values) {
|
|
2501
|
+
const evaluated = EvaluateEnum(values);
|
|
2502
|
+
const result = FromType9(evaluated);
|
|
2503
|
+
return result;
|
|
2504
|
+
}
|
|
2505
|
+
function FromLiteral5(value) {
|
|
2506
|
+
const result = exports_guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
2507
|
+
return result;
|
|
2508
|
+
}
|
|
2509
|
+
function FromType9(type) {
|
|
2510
|
+
const result = IsEnum(type) ? FromEnum2(type.enum) : IsLiteral(type) ? FromLiteral5(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral3(type.pattern) : IsUnion(type) ? FromUnion5(type.anyOf) : [type];
|
|
2511
|
+
return result;
|
|
2512
|
+
}
|
|
2513
|
+
function MappedVariants(type) {
|
|
2514
|
+
const result = FromType9(type);
|
|
2515
|
+
return result;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs
|
|
2519
|
+
function CanonicalAs(instantiatedAs) {
|
|
2520
|
+
const result = IsTemplateLiteral(instantiatedAs) ? EvaluateTemplateLiteral(instantiatedAs.pattern) : instantiatedAs;
|
|
2521
|
+
return result;
|
|
2522
|
+
}
|
|
2523
|
+
function MappedVariant(context, state, identifier2, variant, as, property) {
|
|
2524
|
+
const variantContext = exports_memory.Assign(context, { [identifier2["name"]]: variant });
|
|
2525
|
+
const instantiatedAs = InstantiateType(variantContext, state, as);
|
|
2526
|
+
const canonicalAs = CanonicalAs(instantiatedAs);
|
|
2527
|
+
const instantiatedProperty = InstantiateType(variantContext, state, property);
|
|
2528
|
+
return IsLiteralNumber(canonicalAs) || IsLiteralString(canonicalAs) ? { [canonicalAs.const]: instantiatedProperty } : {};
|
|
2529
|
+
}
|
|
2530
|
+
function MappedProperties(context, state, identifier2, variants, as, property) {
|
|
2531
|
+
return variants.reduce((result, left) => {
|
|
2532
|
+
return [...result, MappedVariant(context, state, identifier2, left, as, property)];
|
|
2533
|
+
}, []);
|
|
2534
|
+
}
|
|
2535
|
+
function MappedObjects(properties2) {
|
|
2536
|
+
return properties2.reduce((result, left) => {
|
|
2537
|
+
return [...result, _Object_(left)];
|
|
2538
|
+
}, []);
|
|
2539
|
+
}
|
|
2540
|
+
function MappedOperation(context, state, identifier2, type, as, property) {
|
|
2541
|
+
const variants = MappedVariants(type);
|
|
2542
|
+
const mappedProperties = MappedProperties(context, state, identifier2, variants, as, property);
|
|
2543
|
+
const mappedObjects = MappedObjects(mappedProperties);
|
|
2544
|
+
const result = EvaluateIntersect(mappedObjects);
|
|
2545
|
+
return result;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/mapped/instantiate.mjs
|
|
2549
|
+
function MappedAction(context, state, identifier2, type, as, property, options) {
|
|
2550
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(MappedOperation(context, state, identifier2, type, as, property), {}, options) : MappedDeferred(identifier2, type, as, property, options);
|
|
2551
|
+
return result;
|
|
2552
|
+
}
|
|
2553
|
+
function MappedInstantiate(context, state, identifier2, type, as, property, options) {
|
|
2554
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2555
|
+
return MappedAction(context, state, identifier2, instantiatedType, as, property, options);
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/mapped.mjs
|
|
2559
|
+
function MappedDeferred(identifier2, type, as, property, options = {}) {
|
|
2560
|
+
return Deferred("Mapped", [identifier2, type, as, property], options);
|
|
2561
|
+
}
|
|
2562
|
+
function Mapped(identifier2, type, as, property, options = {}) {
|
|
2563
|
+
return MappedAction({}, State([], []), identifier2, type, as, property, options);
|
|
2564
|
+
}
|
|
2565
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/check.mjs
|
|
2566
|
+
function FromRef(stack, context, ref2) {
|
|
2567
|
+
return stack.includes(ref2) ? true : FromType10([...stack, ref2], context, context[ref2]);
|
|
2568
|
+
}
|
|
2569
|
+
function FromProperties(stack, context, properties2) {
|
|
2570
|
+
const types = PropertyValues(properties2);
|
|
2571
|
+
return FromTypes3(stack, context, types);
|
|
2572
|
+
}
|
|
2573
|
+
function FromTypes3(stack, context, types) {
|
|
2574
|
+
return exports_guard.ShiftLeft(types, (left, right) => FromType10(stack, context, left) ? true : FromTypes3(stack, context, right), () => false);
|
|
2575
|
+
}
|
|
2576
|
+
function FromType10(stack, context, type) {
|
|
2577
|
+
return IsRef(type) ? FromRef(stack, context, type.$ref) : IsArray3(type) ? FromType10(stack, context, type.items) : IsConstructor3(type) ? FromTypes3(stack, context, [...type.parameters, type.instanceType]) : IsFunction3(type) ? FromTypes3(stack, context, [...type.parameters, type.returnType]) : IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) : IsIntersect(type) ? FromTypes3(stack, context, type.allOf) : IsObject3(type) ? FromProperties(stack, context, type.properties) : IsUnion(type) ? FromTypes3(stack, context, type.anyOf) : IsTuple(type) ? FromTypes3(stack, context, type.items) : IsRecord(type) ? FromType10(stack, context, RecordValue(type)) : false;
|
|
2578
|
+
}
|
|
2579
|
+
function CyclicCheck(stack, context, type) {
|
|
2580
|
+
const result = FromType10(stack, context, type);
|
|
2581
|
+
return result;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/candidates.mjs
|
|
2585
|
+
function ResolveCandidateKeys(context, keys) {
|
|
2586
|
+
return keys.reduce((result, left) => {
|
|
2587
|
+
return CyclicCheck([left], context, context[left]) ? [...result, left] : result;
|
|
2588
|
+
}, []);
|
|
2589
|
+
}
|
|
2590
|
+
function CyclicCandidates(context) {
|
|
2591
|
+
const keys = PropertyKeys(context);
|
|
2592
|
+
const result = ResolveCandidateKeys(context, keys);
|
|
2593
|
+
return result;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs
|
|
2597
|
+
function FromRef2(context, ref2, result) {
|
|
2598
|
+
return result.includes(ref2) ? result : (ref2 in context) ? FromType11(context, context[ref2], [...result, ref2]) : Unreachable();
|
|
2599
|
+
}
|
|
2600
|
+
function FromProperties2(context, properties2, result) {
|
|
2601
|
+
const types = PropertyValues(properties2);
|
|
2602
|
+
return FromTypes4(context, types, result);
|
|
2603
|
+
}
|
|
2604
|
+
function FromTypes4(context, types, result) {
|
|
2605
|
+
return types.reduce((result2, left) => {
|
|
2606
|
+
return FromType11(context, left, result2);
|
|
2607
|
+
}, result);
|
|
2608
|
+
}
|
|
2609
|
+
function FromType11(context, type, result) {
|
|
2610
|
+
return IsRef(type) ? FromRef2(context, type.$ref, result) : IsArray3(type) ? FromType11(context, type.items, result) : IsConstructor3(type) ? FromTypes4(context, [...type.parameters, type.instanceType], result) : IsFunction3(type) ? FromTypes4(context, [...type.parameters, type.returnType], result) : IsInterfaceDeferred(type) ? FromProperties2(context, type.parameters[1], result) : IsIntersect(type) ? FromTypes4(context, type.allOf, result) : IsObject3(type) ? FromProperties2(context, type.properties, result) : IsUnion(type) ? FromTypes4(context, type.anyOf, result) : IsTuple(type) ? FromTypes4(context, type.items, result) : IsRecord(type) ? FromType11(context, RecordValue(type), result) : result;
|
|
2611
|
+
}
|
|
2612
|
+
function CyclicDependencies(context, key, type) {
|
|
2613
|
+
const result = FromType11(context, type, [key]);
|
|
2614
|
+
return result;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs
|
|
2618
|
+
function CyclicInterface(context, heritage, properties2) {
|
|
2619
|
+
const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
|
|
2620
|
+
const instantiatedProperties = InstantiateProperties({}, State([], []), properties2);
|
|
2621
|
+
const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, _Object_(instantiatedProperties)]);
|
|
2622
|
+
return evaluatedInterface;
|
|
2623
|
+
}
|
|
2624
|
+
function CyclicDefinitions(context, dependencies) {
|
|
2625
|
+
const keys = exports_guard.Keys(context).filter((key) => dependencies.includes(key));
|
|
2626
|
+
return keys.reduce((result, key) => {
|
|
2627
|
+
const type = context[key];
|
|
2628
|
+
const instantiatedType = IsInterfaceDeferred(type) ? CyclicInterface(context, type.parameters[0], type.parameters[1]) : type;
|
|
2629
|
+
return { ...result, [key]: instantiatedType };
|
|
2630
|
+
}, {});
|
|
2631
|
+
}
|
|
2632
|
+
function InstantiateCyclic(context, ref2, type) {
|
|
2633
|
+
const dependencies = CyclicDependencies(context, ref2, type);
|
|
2634
|
+
const definitions = CyclicDefinitions(context, dependencies);
|
|
2635
|
+
const result = Cyclic(definitions, ref2);
|
|
2636
|
+
return result;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/module/instantiate.mjs
|
|
2640
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
2641
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
2642
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => cyclicKeys.includes(key));
|
|
2643
|
+
return declarationKeys.reduce((result, key) => {
|
|
2644
|
+
return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
|
|
2645
|
+
}, {});
|
|
2646
|
+
}
|
|
2647
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
2648
|
+
const declarationContext = exports_memory.Assign(context, declarations);
|
|
2649
|
+
const declarationKeys = exports_guard.Keys(declarations).filter((key) => !cyclicKeys.includes(key));
|
|
2650
|
+
return declarationKeys.reduce((result, key) => {
|
|
2651
|
+
return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
|
|
2652
|
+
}, {});
|
|
2653
|
+
}
|
|
2654
|
+
function InstantiateModule(context, declarations, options) {
|
|
2655
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
2656
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
2657
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
2658
|
+
const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
2659
|
+
return exports_memory.Update(instantiatedModule, {}, options);
|
|
2660
|
+
}
|
|
2661
|
+
function ModuleInstantiate(context, _state, declarations, options) {
|
|
2662
|
+
const instantiatedModule = InstantiateModule(context, declarations, options);
|
|
2663
|
+
return instantiatedModule;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/module.mjs
|
|
2667
|
+
function ModuleDeferred(declarations, options = {}) {
|
|
2668
|
+
return Deferred("Module", [declarations], options);
|
|
2669
|
+
}
|
|
2670
|
+
function Module(declarations, options = {}) {
|
|
2671
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
2672
|
+
}
|
|
2673
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs
|
|
2674
|
+
function NonNullableOperation(type) {
|
|
2675
|
+
const excluded = Union([Null(), Undefined()]);
|
|
2676
|
+
return ExcludeAction(type, excluded, {});
|
|
2677
|
+
}
|
|
2678
|
+
function NonNullableAction(type, options) {
|
|
2679
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(NonNullableOperation(type), {}, options) : NonNullableDeferred(type, options);
|
|
2680
|
+
return result;
|
|
2681
|
+
}
|
|
2682
|
+
function NonNullableInstantiate(context, state, type, options) {
|
|
2683
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2684
|
+
return NonNullableAction(instantiatedType, options);
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/non_nullable.mjs
|
|
2688
|
+
function NonNullableDeferred(type, options = {}) {
|
|
2689
|
+
return Deferred("NonNullable", [type], options);
|
|
2690
|
+
}
|
|
2691
|
+
function NonNullable(type, options = {}) {
|
|
2692
|
+
return NonNullableAction(type, options);
|
|
2693
|
+
}
|
|
2694
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs
|
|
2695
|
+
function ToIndexable(type) {
|
|
2696
|
+
const collapsed = CollapseToObject(type);
|
|
2697
|
+
const result = IsObject3(collapsed) ? collapsed.properties : Unreachable();
|
|
2698
|
+
return result;
|
|
2699
|
+
}
|
|
2700
|
+
|
|
2701
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/omit/from_type.mjs
|
|
2702
|
+
function FromKeys(properties2, keys) {
|
|
2703
|
+
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
2704
|
+
return keys.includes(key) ? result2 : { ...result2, [key]: properties2[key] };
|
|
2705
|
+
}, {});
|
|
2706
|
+
return result;
|
|
2707
|
+
}
|
|
2708
|
+
function FromType12(type, indexer) {
|
|
2709
|
+
const indexable = ToIndexable(type);
|
|
2710
|
+
const indexableKeys = ToIndexableKeys(indexer);
|
|
2711
|
+
const omitted = FromKeys(indexable, indexableKeys);
|
|
2712
|
+
const result = _Object_(omitted);
|
|
2713
|
+
return result;
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/omit/instantiate.mjs
|
|
2717
|
+
function OmitAction(type, indexer, options) {
|
|
2718
|
+
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType12(type, indexer), {}, options) : OmitDeferred(type, indexer, options);
|
|
2719
|
+
return result;
|
|
2720
|
+
}
|
|
2721
|
+
function OmitInstantiate(context, state, type, indexer, options) {
|
|
2722
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2723
|
+
const instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
2724
|
+
return OmitAction(instantiatedType, instantiatedIndexer, options);
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/omit.mjs
|
|
2728
|
+
function OmitDeferred(type, indexer, options = {}) {
|
|
2729
|
+
return Deferred("Omit", [type, indexer], options);
|
|
2730
|
+
}
|
|
2731
|
+
function Omit(type, indexer_or_keys, options = {}) {
|
|
2732
|
+
const indexer = exports_guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
2733
|
+
return OmitAction(type, indexer, options);
|
|
2734
|
+
}
|
|
2735
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/parameters/instantiate.mjs
|
|
2736
|
+
function ParametersOperation(type) {
|
|
2737
|
+
const parameters = IsFunction3(type) ? type["parameters"] : [];
|
|
2738
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
2739
|
+
const result = Tuple(instantiatedParameters);
|
|
2740
|
+
return result;
|
|
2741
|
+
}
|
|
2742
|
+
function ParametersAction(type, options) {
|
|
2743
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(ParametersOperation(type), {}, options) : ParametersDeferred(type, options);
|
|
2744
|
+
return result;
|
|
2745
|
+
}
|
|
2746
|
+
function ParametersInstantiate(context, state, type, options) {
|
|
2747
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2748
|
+
return ParametersAction(instantiatedType, options);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/parameters.mjs
|
|
2752
|
+
function ParametersDeferred(type, options = {}) {
|
|
2753
|
+
return Deferred("Parameters", [type], options);
|
|
2754
|
+
}
|
|
2755
|
+
function Parameters(type, options = {}) {
|
|
2756
|
+
return ParametersAction(type, options);
|
|
2757
|
+
}
|
|
2758
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs
|
|
2759
|
+
function FromCyclic3(defs, ref2) {
|
|
2760
|
+
const target = CyclicTarget(defs, ref2);
|
|
2761
|
+
const partial = FromType13(target);
|
|
2762
|
+
const result = Cyclic(exports_memory.Assign(defs, { [ref2]: partial }), ref2);
|
|
2763
|
+
return result;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_dependent.mjs
|
|
2767
|
+
function FromDependent3(if_, then_, else_) {
|
|
2768
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
2769
|
+
const result = FromType13(evaluated);
|
|
2770
|
+
return result;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_intersect.mjs
|
|
2774
|
+
function FromIntersect3(types) {
|
|
2775
|
+
const evaluated = EvaluateIntersect(types);
|
|
2776
|
+
const result = FromType13(evaluated);
|
|
2777
|
+
return result;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_union.mjs
|
|
2781
|
+
function FromUnion6(types) {
|
|
2782
|
+
const result = types.map((type) => FromType13(type));
|
|
2783
|
+
return Union(result);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_object.mjs
|
|
2787
|
+
function FromObject5(properties2) {
|
|
2788
|
+
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
2789
|
+
return { ...result2, [left]: AddOptional(properties2[left]) };
|
|
2790
|
+
}, {});
|
|
2791
|
+
const result = _Object_(mapped);
|
|
2792
|
+
return result;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/from_type.mjs
|
|
2796
|
+
function FromType13(type) {
|
|
2797
|
+
return IsCyclic(type) ? FromCyclic3(type.$defs, type.$ref) : IsDependent(type) ? FromDependent3(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect3(type.allOf) : IsUnion(type) ? FromUnion6(type.anyOf) : IsObject3(type) ? FromObject5(type.properties) : _Object_({});
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/partial/instantiate.mjs
|
|
2801
|
+
function PartialAction(type, options) {
|
|
2802
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType13(type), {}, options) : PartialDeferred(type, options);
|
|
2803
|
+
return result;
|
|
2804
|
+
}
|
|
2805
|
+
function PartialInstantiate(context, state, type, options) {
|
|
2806
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2807
|
+
return PartialAction(instantiatedType, options);
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/partial.mjs
|
|
2811
|
+
function PartialDeferred(type, options = {}) {
|
|
2812
|
+
return Deferred("Partial", [type], options);
|
|
2813
|
+
}
|
|
2814
|
+
function Partial(type, options = {}) {
|
|
2815
|
+
return PartialAction(type, options);
|
|
2816
|
+
}
|
|
2817
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/pick/from_type.mjs
|
|
2818
|
+
function FromKeys2(properties2, keys) {
|
|
2819
|
+
const result = exports_guard.Keys(properties2).reduce((result2, key) => {
|
|
2820
|
+
return keys.includes(key) ? exports_memory.Assign(result2, { [key]: properties2[key] }) : result2;
|
|
2821
|
+
}, {});
|
|
2822
|
+
return result;
|
|
2823
|
+
}
|
|
2824
|
+
function FromType14(type, indexer) {
|
|
2825
|
+
const indexable = ToIndexable(type);
|
|
2826
|
+
const keys = ToIndexableKeys(indexer);
|
|
2827
|
+
const applied = FromKeys2(indexable, keys);
|
|
2828
|
+
const result = _Object_(applied);
|
|
2829
|
+
return result;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/pick/instantiate.mjs
|
|
2833
|
+
function PickAction(type, indexer, options) {
|
|
2834
|
+
const result = CanInstantiate([type, indexer]) ? exports_memory.Update(FromType14(type, indexer), {}, options) : PickDeferred(type, indexer, options);
|
|
2835
|
+
return result;
|
|
2836
|
+
}
|
|
2837
|
+
function PickInstantiate(context, state, type, indexer, options) {
|
|
2838
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2839
|
+
const instantiatedIndexer = InstantiateType(context, state, indexer);
|
|
2840
|
+
return PickAction(instantiatedType, instantiatedIndexer, options);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/pick.mjs
|
|
2844
|
+
function PickDeferred(type, indexer, options = {}) {
|
|
2845
|
+
return Deferred("Pick", [type, indexer], options);
|
|
2846
|
+
}
|
|
2847
|
+
function Pick(type, indexer_or_keys, options = {}) {
|
|
2848
|
+
const indexer = exports_guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;
|
|
2849
|
+
return PickAction(type, indexer, options);
|
|
2850
|
+
}
|
|
2851
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs
|
|
2852
|
+
function FromArray4(type) {
|
|
2853
|
+
const result = AddImmutable(_Array_(type));
|
|
2854
|
+
return result;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs
|
|
2858
|
+
function FromCyclic4(defs, ref2) {
|
|
2859
|
+
const target = CyclicTarget(defs, ref2);
|
|
2860
|
+
const partial = FromType15(target);
|
|
2861
|
+
const result = Cyclic(exports_memory.Assign(defs, { [ref2]: partial }), ref2);
|
|
2862
|
+
return result;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs
|
|
2866
|
+
function FromDependent4(if_, then_, else_) {
|
|
2867
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
2868
|
+
const result = FromType15(evaluated);
|
|
2869
|
+
return result;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs
|
|
2873
|
+
function FromIntersect4(types) {
|
|
2874
|
+
const evaluated = EvaluateIntersect(types);
|
|
2875
|
+
const result = FromType15(evaluated);
|
|
2876
|
+
return result;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs
|
|
2880
|
+
function FromObject6(properties2) {
|
|
2881
|
+
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
2882
|
+
return { ...result2, [left]: AddReadonly(properties2[left]) };
|
|
2883
|
+
}, {});
|
|
2884
|
+
const result = _Object_(mapped);
|
|
2885
|
+
return result;
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs
|
|
2889
|
+
function FromTuple4(types) {
|
|
2890
|
+
const result = AddImmutable(Tuple(types));
|
|
2891
|
+
return result;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs
|
|
2895
|
+
function FromUnion7(types) {
|
|
2896
|
+
const result = types.map((type) => FromType15(type));
|
|
2897
|
+
return Union(result);
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs
|
|
2901
|
+
function FromType15(type) {
|
|
2902
|
+
return IsArray3(type) ? FromArray4(type.items) : IsCyclic(type) ? FromCyclic4(type.$defs, type.$ref) : IsDependent(type) ? FromDependent4(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect4(type.allOf) : IsObject3(type) ? FromObject6(type.properties) : IsTuple(type) ? FromTuple4(type.items) : IsUnion(type) ? FromUnion7(type.anyOf) : type;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs
|
|
2906
|
+
function ReadonlyObjectAction(type, options) {
|
|
2907
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType15(type), {}, options) : ReadonlyObjectDeferred(type);
|
|
2908
|
+
return result;
|
|
2909
|
+
}
|
|
2910
|
+
function ReadonlyObjectInstantiate(context, state, type, options) {
|
|
2911
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2912
|
+
return ReadonlyObjectAction(instantiatedType, options);
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/readonly_object.mjs
|
|
2916
|
+
function ReadonlyObjectDeferred(type, options = {}) {
|
|
2917
|
+
return Deferred("ReadonlyObject", [type], options);
|
|
2918
|
+
}
|
|
2919
|
+
function ReadonlyObject(type, options = {}) {
|
|
2920
|
+
return ReadonlyObjectAction(type, options);
|
|
2921
|
+
}
|
|
2922
|
+
var ReadonlyType = ReadonlyObject;
|
|
2923
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_cyclic.mjs
|
|
2924
|
+
function FromCyclic5(defs, ref2) {
|
|
2925
|
+
const target = CyclicTarget(defs, ref2);
|
|
2926
|
+
const partial = FromType16(target);
|
|
2927
|
+
const result = Cyclic(exports_memory.Assign(defs, { [ref2]: partial }), ref2);
|
|
2928
|
+
return result;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_dependent.mjs
|
|
2932
|
+
function FromDependent5(if_, then_, else_) {
|
|
2933
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
2934
|
+
const result = FromType16(evaluated);
|
|
2935
|
+
return result;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_intersect.mjs
|
|
2939
|
+
function FromIntersect5(types) {
|
|
2940
|
+
const evaluated = EvaluateIntersect(types);
|
|
2941
|
+
const result = FromType16(evaluated);
|
|
2942
|
+
return result;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_union.mjs
|
|
2946
|
+
function FromUnion8(types) {
|
|
2947
|
+
const result = types.map((type) => FromType16(type));
|
|
2948
|
+
return Union(result);
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_object.mjs
|
|
2952
|
+
function FromObject7(properties2) {
|
|
2953
|
+
const mapped = exports_guard.Keys(properties2).reduce((result2, left) => {
|
|
2954
|
+
return { ...result2, [left]: RemoveOptional(properties2[left]) };
|
|
2955
|
+
}, {});
|
|
2956
|
+
const result = _Object_(mapped);
|
|
2957
|
+
return result;
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/from_type.mjs
|
|
2961
|
+
function FromType16(type) {
|
|
2962
|
+
return IsCyclic(type) ? FromCyclic5(type.$defs, type.$ref) : IsDependent(type) ? FromDependent5(type.if, type.then, type.else) : IsIntersect(type) ? FromIntersect5(type.allOf) : IsUnion(type) ? FromUnion8(type.anyOf) : IsObject3(type) ? FromObject7(type.properties) : _Object_({});
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/required/instantiate.mjs
|
|
2966
|
+
function RequiredAction(type, options) {
|
|
2967
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(FromType16(type), {}, options) : RequiredDeferred(type, options);
|
|
2968
|
+
return result;
|
|
2969
|
+
}
|
|
2970
|
+
function RequiredInstantiate(context, state, type, options) {
|
|
2971
|
+
const instaniatedType = InstantiateType(context, state, type);
|
|
2972
|
+
return RequiredAction(instaniatedType, options);
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/required.mjs
|
|
2976
|
+
function RequiredDeferred(type, options = {}) {
|
|
2977
|
+
return Deferred("Required", [type], options);
|
|
2978
|
+
}
|
|
2979
|
+
function Required(type, options = {}) {
|
|
2980
|
+
return RequiredAction(type, options);
|
|
2981
|
+
}
|
|
2982
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/return_type/instantiate.mjs
|
|
2983
|
+
function ReturnTypeOperation(type) {
|
|
2984
|
+
return IsFunction3(type) ? type["returnType"] : Never();
|
|
2985
|
+
}
|
|
2986
|
+
function ReturnTypeAction(type, options) {
|
|
2987
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(ReturnTypeOperation(type), {}, options) : ReturnTypeDeferred(type, options);
|
|
2988
|
+
return result;
|
|
2989
|
+
}
|
|
2990
|
+
function ReturnTypeInstantiate(context, state, type, options = {}) {
|
|
2991
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
2992
|
+
return ReturnTypeAction(instantiatedType, options);
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/return_type.mjs
|
|
2996
|
+
function ReturnTypeDeferred(type, options = {}) {
|
|
2997
|
+
return Deferred("ReturnType", [type], options);
|
|
2998
|
+
}
|
|
2999
|
+
function ReturnType(type, options = {}) {
|
|
3000
|
+
return ReturnTypeAction(type, options);
|
|
3001
|
+
}
|
|
3002
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/with/instantiate.mjs
|
|
3003
|
+
function WithAction(type, options) {
|
|
3004
|
+
const result = CanInstantiate([type]) ? exports_memory.Update(type, {}, options) : WithDeferred(type, options);
|
|
3005
|
+
return result;
|
|
3006
|
+
}
|
|
3007
|
+
function WithInstantiate(context, state, type, options) {
|
|
3008
|
+
const instaniatedType = InstantiateType(context, state, type);
|
|
3009
|
+
return WithAction(instaniatedType, options);
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/with.mjs
|
|
3013
|
+
function WithDeferred(type, options) {
|
|
3014
|
+
return Deferred("With", [type, options], {});
|
|
3015
|
+
}
|
|
3016
|
+
function With(type, options) {
|
|
3017
|
+
return WithAction(type, options);
|
|
3018
|
+
}
|
|
3019
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/mapping.mjs
|
|
3020
|
+
function IntrinsicOrCall(ref2, parameters2) {
|
|
3021
|
+
return exports_guard.IsEqual(ref2, "Array") ? _Array_(parameters2[0]) : exports_guard.IsEqual(ref2, "Capitalize") ? CapitalizeDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "ConstructorParameters") ? ConstructorParametersDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Evaluate") ? EvaluateDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Exclude") ? ExcludeDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "Extract") ? ExtractDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "Index") ? IndexDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "InstanceType") ? InstanceTypeDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Lowercase") ? LowercaseDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "NonNullable") ? NonNullableDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Omit") ? OmitDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "Parameters") ? ParametersDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Partial") ? PartialDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Pick") ? PickDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "Readonly") ? ReadonlyObjectDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "KeyOf") ? KeyOfDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Record") ? RecordDeferred(parameters2[0], parameters2[1]) : exports_guard.IsEqual(ref2, "Required") ? RequiredDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "ReturnType") ? ReturnTypeDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Uncapitalize") ? UncapitalizeDeferred(parameters2[0]) : exports_guard.IsEqual(ref2, "Uppercase") ? UppercaseDeferred(parameters2[0]) : CallConstruct(Ref(ref2), parameters2);
|
|
3022
|
+
}
|
|
3023
|
+
function Unreachable2() {
|
|
3024
|
+
throw Error("Unreachable");
|
|
3025
|
+
}
|
|
3026
|
+
function DelimitedDecode(input, result = []) {
|
|
3027
|
+
return exports_guard.ShiftLeft(input, (left, right) => DelimitedDecode(right, [...result, left[1]]), () => result);
|
|
3028
|
+
}
|
|
3029
|
+
function Delimited(input) {
|
|
3030
|
+
return exports_guard.IsEqual(input.length, 3) ? [input[0], ...DelimitedDecode(input[1])] : [];
|
|
3031
|
+
}
|
|
3032
|
+
function GenericParameterExtendsEqualsMapping(input) {
|
|
3033
|
+
return Parameter(input[0], input[2], input[4]);
|
|
3034
|
+
}
|
|
3035
|
+
function GenericParameterExtendsMapping(input) {
|
|
3036
|
+
return Parameter(input[0], input[2], input[2]);
|
|
3037
|
+
}
|
|
3038
|
+
function GenericParameterEqualsMapping(input) {
|
|
3039
|
+
return Parameter(input[0], Unknown(), input[2]);
|
|
3040
|
+
}
|
|
3041
|
+
function GenericParameterIdentifierMapping(input) {
|
|
3042
|
+
return Parameter(input, Unknown(), Unknown());
|
|
3043
|
+
}
|
|
3044
|
+
function GenericParameterMapping(input) {
|
|
3045
|
+
return input;
|
|
3046
|
+
}
|
|
3047
|
+
function GenericParameterListMapping(input) {
|
|
3048
|
+
return Delimited(input);
|
|
3049
|
+
}
|
|
3050
|
+
function GenericParametersMapping(input) {
|
|
3051
|
+
return input[1];
|
|
3052
|
+
}
|
|
3053
|
+
function GenericCallArgumentListMapping(input) {
|
|
3054
|
+
return Delimited(input);
|
|
3055
|
+
}
|
|
3056
|
+
function GenericCallArgumentsMapping(input) {
|
|
3057
|
+
return input[1];
|
|
3058
|
+
}
|
|
3059
|
+
function GenericCallMapping(input) {
|
|
3060
|
+
return IntrinsicOrCall(input[0], input[1]);
|
|
3061
|
+
}
|
|
3062
|
+
function OptionalSemiColonMapping(input) {
|
|
3063
|
+
return null;
|
|
3064
|
+
}
|
|
3065
|
+
function KeywordStringMapping(input) {
|
|
3066
|
+
return String2();
|
|
3067
|
+
}
|
|
3068
|
+
function KeywordNumberMapping(input) {
|
|
3069
|
+
return Number2();
|
|
3070
|
+
}
|
|
3071
|
+
function KeywordBooleanMapping(input) {
|
|
3072
|
+
return Boolean2();
|
|
3073
|
+
}
|
|
3074
|
+
function KeywordUndefinedMapping(input) {
|
|
3075
|
+
return Undefined();
|
|
3076
|
+
}
|
|
3077
|
+
function KeywordNullMapping(input) {
|
|
3078
|
+
return Null();
|
|
3079
|
+
}
|
|
3080
|
+
function KeywordIntegerMapping(input) {
|
|
3081
|
+
return Integer();
|
|
3082
|
+
}
|
|
3083
|
+
function KeywordBigIntMapping(input) {
|
|
3084
|
+
return BigInt2();
|
|
3085
|
+
}
|
|
3086
|
+
function KeywordUnknownMapping(input) {
|
|
3087
|
+
return Unknown();
|
|
3088
|
+
}
|
|
3089
|
+
function KeywordAnyMapping(input) {
|
|
3090
|
+
return Any();
|
|
3091
|
+
}
|
|
3092
|
+
function KeywordObjectMapping(input) {
|
|
3093
|
+
return _Object_({});
|
|
3094
|
+
}
|
|
3095
|
+
function KeywordNeverMapping(input) {
|
|
3096
|
+
return Never();
|
|
3097
|
+
}
|
|
3098
|
+
function KeywordSymbolMapping(input) {
|
|
3099
|
+
return Symbol();
|
|
3100
|
+
}
|
|
3101
|
+
function KeywordVoidMapping(input) {
|
|
3102
|
+
return Void();
|
|
3103
|
+
}
|
|
3104
|
+
function KeywordThisMapping(input) {
|
|
3105
|
+
return This();
|
|
3106
|
+
}
|
|
3107
|
+
function LiteralBigIntMapping(input) {
|
|
3108
|
+
return Literal(BigInt(input));
|
|
3109
|
+
}
|
|
3110
|
+
function LiteralBooleanMapping(input) {
|
|
3111
|
+
return Literal(exports_guard.IsEqual(input, "true"));
|
|
3112
|
+
}
|
|
3113
|
+
function LiteralNumberMapping(input) {
|
|
3114
|
+
return Literal(parseFloat(input));
|
|
3115
|
+
}
|
|
3116
|
+
function LiteralStringMapping(input) {
|
|
3117
|
+
return Literal(input);
|
|
3118
|
+
}
|
|
3119
|
+
function TemplateInterpolateMapping(input) {
|
|
3120
|
+
return input[1];
|
|
3121
|
+
}
|
|
3122
|
+
function TemplateSpanMapping(input) {
|
|
3123
|
+
return Literal(input);
|
|
3124
|
+
}
|
|
3125
|
+
function TemplateBodyMapping(input) {
|
|
3126
|
+
return exports_guard.IsEqual(input.length, 3) ? [input[0], input[1], ...input[2]] : [input[0]];
|
|
3127
|
+
}
|
|
3128
|
+
function TemplateLiteralTypesMapping(input) {
|
|
3129
|
+
return input[1];
|
|
3130
|
+
}
|
|
3131
|
+
function TemplateLiteralMapping(input) {
|
|
3132
|
+
return TemplateLiteralDeferred(input);
|
|
3133
|
+
}
|
|
3134
|
+
function DependentMapping(input) {
|
|
3135
|
+
return exports_guard.IsEqual(input.length, 6) ? Dependent(input[1], input[3], input[5]) : Dependent(input[1], input[3], Unknown());
|
|
3136
|
+
}
|
|
3137
|
+
function KeyOfMapping(input) {
|
|
3138
|
+
return input.length > 0;
|
|
3139
|
+
}
|
|
3140
|
+
function IndexArrayMapping(input) {
|
|
3141
|
+
return input.reduce((result, current) => {
|
|
3142
|
+
return exports_guard.IsEqual(current.length, 3) ? [...result, [current[1]]] : [...result, []];
|
|
3143
|
+
}, []);
|
|
3144
|
+
}
|
|
3145
|
+
function ExtendsMapping(input) {
|
|
3146
|
+
return exports_guard.IsEqual(input.length, 6) ? [input[1], input[3], input[5]] : [];
|
|
3147
|
+
}
|
|
3148
|
+
function BaseMapping(input) {
|
|
3149
|
+
return exports_guard.IsArray(input) && exports_guard.IsEqual(input.length, 3) ? input[1] : input;
|
|
3150
|
+
}
|
|
3151
|
+
function WithMapping(input) {
|
|
3152
|
+
return exports_guard.IsEqual(input.length, 2) ? input[1] : [];
|
|
3153
|
+
}
|
|
3154
|
+
function FactorIndexArray(Type, indexArray) {
|
|
3155
|
+
return indexArray.reduce((result, left) => {
|
|
3156
|
+
const _left = left;
|
|
3157
|
+
return exports_guard.IsEqual(_left.length, 1) ? IndexDeferred(result, _left[0]) : exports_guard.IsEqual(_left.length, 0) ? _Array_(result) : Unreachable2();
|
|
3158
|
+
}, Type);
|
|
3159
|
+
}
|
|
3160
|
+
function FactorExtends(type, extend) {
|
|
3161
|
+
return exports_guard.IsEqual(extend.length, 3) ? ConditionalDeferred(type, extend[0], extend[1], extend[2]) : type;
|
|
3162
|
+
}
|
|
3163
|
+
function FactorWith(type, withClause) {
|
|
3164
|
+
return exports_guard.IsArray(withClause) && exports_guard.IsEqual(withClause.length, 0) ? type : WithDeferred(type, withClause);
|
|
3165
|
+
}
|
|
3166
|
+
function FactorMapping(input) {
|
|
3167
|
+
const [keyOf, type, indexArray, extend, withClause] = input;
|
|
3168
|
+
return FactorWith(keyOf ? FactorExtends(KeyOfDeferred(FactorIndexArray(type, indexArray)), extend) : FactorExtends(FactorIndexArray(type, indexArray), extend), withClause);
|
|
3169
|
+
}
|
|
3170
|
+
function ExprBinaryMapping(left, rest2) {
|
|
3171
|
+
return exports_guard.IsEqual(rest2.length, 3) ? (() => {
|
|
3172
|
+
const [operator, right, next] = rest2;
|
|
3173
|
+
const Schema = ExprBinaryMapping(right, next);
|
|
3174
|
+
if (exports_guard.IsEqual(operator, "&")) {
|
|
3175
|
+
return IsIntersect(Schema) ? Intersect([left, ...Schema.allOf]) : Intersect([left, Schema]);
|
|
3176
|
+
}
|
|
3177
|
+
if (exports_guard.IsEqual(operator, "|")) {
|
|
3178
|
+
return IsUnion(Schema) ? Union([left, ...Schema.anyOf]) : Union([left, Schema]);
|
|
3179
|
+
}
|
|
3180
|
+
Unreachable2();
|
|
3181
|
+
})() : left;
|
|
3182
|
+
}
|
|
3183
|
+
function ExprTermTailMapping(input) {
|
|
3184
|
+
return input;
|
|
3185
|
+
}
|
|
3186
|
+
function ExprTermMapping(input) {
|
|
3187
|
+
const [left, rest2] = input;
|
|
3188
|
+
return ExprBinaryMapping(left, rest2);
|
|
3189
|
+
}
|
|
3190
|
+
function ExprTailMapping(input) {
|
|
3191
|
+
return input;
|
|
3192
|
+
}
|
|
3193
|
+
function ExprMapping(input) {
|
|
3194
|
+
const [left, rest2] = input;
|
|
3195
|
+
return ExprBinaryMapping(left, rest2);
|
|
3196
|
+
}
|
|
3197
|
+
function ExprReadonlyMapping(input) {
|
|
3198
|
+
return AddImmutableDeferred(input[1]);
|
|
3199
|
+
}
|
|
3200
|
+
function ExprPipeMapping(input) {
|
|
3201
|
+
return input[1];
|
|
3202
|
+
}
|
|
3203
|
+
function GenericTypeMapping(input) {
|
|
3204
|
+
return Generic(input[0], input[2]);
|
|
3205
|
+
}
|
|
3206
|
+
function InferTypeMapping(input) {
|
|
3207
|
+
return exports_guard.IsEqual(input.length, 4) ? Infer(input[1], input[3]) : exports_guard.IsEqual(input.length, 2) ? Infer(input[1], Unknown()) : Unreachable2();
|
|
3208
|
+
}
|
|
3209
|
+
function TypeMapping(input) {
|
|
3210
|
+
return input;
|
|
3211
|
+
}
|
|
3212
|
+
function PropertyKeyNumberMapping(input) {
|
|
3213
|
+
return `${input}`;
|
|
3214
|
+
}
|
|
3215
|
+
function PropertyKeyIdentMapping(input) {
|
|
3216
|
+
return input;
|
|
3217
|
+
}
|
|
3218
|
+
function PropertyKeyQuotedMapping(input) {
|
|
3219
|
+
return input;
|
|
3220
|
+
}
|
|
3221
|
+
function PropertyKeyIndexMapping(input) {
|
|
3222
|
+
return IsInteger3(input[3]) ? IntegerKey : IsNumber4(input[3]) ? NumberKey : IsSymbol3(input[3]) ? StringKey : IsString4(input[3]) ? StringKey : Unreachable2();
|
|
3223
|
+
}
|
|
3224
|
+
function PropertyKeyMapping(input) {
|
|
3225
|
+
return input;
|
|
3226
|
+
}
|
|
3227
|
+
function ReadonlyMapping(input) {
|
|
3228
|
+
return input.length > 0;
|
|
3229
|
+
}
|
|
3230
|
+
function OptionalMapping(input) {
|
|
3231
|
+
return input.length > 0;
|
|
3232
|
+
}
|
|
3233
|
+
function PropertyMapping(input) {
|
|
3234
|
+
const [isReadonly, key, isOptional, _colon, type] = input;
|
|
3235
|
+
return {
|
|
3236
|
+
[key]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
function PropertyDelimiterMapping(input) {
|
|
3240
|
+
return input;
|
|
3241
|
+
}
|
|
3242
|
+
function PropertyListMapping(input) {
|
|
3243
|
+
return Delimited(input);
|
|
3244
|
+
}
|
|
3245
|
+
function PropertiesReduce(propertyList) {
|
|
3246
|
+
return propertyList.reduce((result, left) => {
|
|
3247
|
+
const isPatternProperties = exports_guard.HasPropertyKey(left, IntegerKey) || exports_guard.HasPropertyKey(left, NumberKey) || exports_guard.HasPropertyKey(left, StringKey);
|
|
3248
|
+
return isPatternProperties ? [result[0], exports_memory.Assign(result[1], left)] : [exports_memory.Assign(result[0], left), result[1]];
|
|
3249
|
+
}, [{}, {}]);
|
|
3250
|
+
}
|
|
3251
|
+
function PropertiesMapping(input) {
|
|
3252
|
+
return PropertiesReduce(input[1]);
|
|
3253
|
+
}
|
|
3254
|
+
function _Object_Mapping(input) {
|
|
3255
|
+
const [properties2, patternProperties] = input;
|
|
3256
|
+
const options = exports_guard.IsEqual(exports_guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
3257
|
+
return _Object_(properties2, options);
|
|
3258
|
+
}
|
|
3259
|
+
function ElementNamedMapping(input) {
|
|
3260
|
+
return exports_guard.IsEqual(input.length, 5) ? AddReadonlyDeferred(AddOptionalDeferred(input[4])) : exports_guard.IsEqual(input.length, 3) ? input[2] : exports_guard.IsEqual(input.length, 4) ? exports_guard.IsEqual(input[2], "readonly") ? AddReadonlyDeferred(input[3]) : AddOptionalDeferred(input[3]) : Unreachable2();
|
|
3261
|
+
}
|
|
3262
|
+
function ElementBaseMapping(input) {
|
|
3263
|
+
if (!exports_guard.IsArray(input) || !exports_guard.IsEqual(input.length, 3))
|
|
3264
|
+
return input;
|
|
3265
|
+
const [isReadonly, type, isOptional] = input;
|
|
3266
|
+
return isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type;
|
|
3267
|
+
}
|
|
3268
|
+
function ElementMapping(input) {
|
|
3269
|
+
return exports_guard.IsEqual(input.length, 2) ? Rest(input[1]) : exports_guard.IsEqual(input.length, 1) ? input[0] : Unreachable2();
|
|
3270
|
+
}
|
|
3271
|
+
function ElementListMapping(input) {
|
|
3272
|
+
return Delimited(input);
|
|
3273
|
+
}
|
|
3274
|
+
function _Tuple_Mapping(input) {
|
|
3275
|
+
return Tuple(input[1]);
|
|
3276
|
+
}
|
|
3277
|
+
function ParameterReadonlyOptionalMapping(input) {
|
|
3278
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[4]));
|
|
3279
|
+
}
|
|
3280
|
+
function ParameterReadonlyMapping(input) {
|
|
3281
|
+
return AddReadonlyDeferred(input[3]);
|
|
3282
|
+
}
|
|
3283
|
+
function ParameterOptionalMapping(input) {
|
|
3284
|
+
return AddOptionalDeferred(input[3]);
|
|
3285
|
+
}
|
|
3286
|
+
function ParameterTypeMapping(input) {
|
|
3287
|
+
return input[2];
|
|
3288
|
+
}
|
|
3289
|
+
function ParameterBaseMapping(input) {
|
|
3290
|
+
return input;
|
|
3291
|
+
}
|
|
3292
|
+
function ParameterMapping(input) {
|
|
3293
|
+
return exports_guard.IsEqual(input.length, 2) ? Rest(input[1]) : exports_guard.IsEqual(input.length, 1) ? input[0] : Unreachable2();
|
|
3294
|
+
}
|
|
3295
|
+
function ParameterListMapping(input) {
|
|
3296
|
+
return Delimited(input);
|
|
3297
|
+
}
|
|
3298
|
+
function _Function_Mapping(input) {
|
|
3299
|
+
return _Function_(input[1], input[4]);
|
|
3300
|
+
}
|
|
3301
|
+
function _Constructor_Mapping(input) {
|
|
3302
|
+
return Constructor(input[2], input[5]);
|
|
3303
|
+
}
|
|
3304
|
+
function ApplyReadonly(state, type) {
|
|
3305
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveReadonlyDeferred(type) : exports_guard.IsEqual(state, "add") ? AddReadonlyDeferred(type) : type;
|
|
3306
|
+
}
|
|
3307
|
+
function MappedReadonlyMapping(input) {
|
|
3308
|
+
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
3309
|
+
}
|
|
3310
|
+
function ApplyOptional(state, type) {
|
|
3311
|
+
return exports_guard.IsEqual(state, "remove") ? RemoveOptionalDeferred(type) : exports_guard.IsEqual(state, "add") ? AddOptionalDeferred(type) : type;
|
|
3312
|
+
}
|
|
3313
|
+
function MappedOptionalMapping(input) {
|
|
3314
|
+
return exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "-") ? "remove" : exports_guard.IsEqual(input.length, 2) && exports_guard.IsEqual(input[0], "+") ? "add" : exports_guard.IsEqual(input.length, 1) ? "add" : "none";
|
|
3315
|
+
}
|
|
3316
|
+
function MappedAsMapping(input) {
|
|
3317
|
+
return exports_guard.IsEqual(input.length, 2) ? [input[1]] : [];
|
|
3318
|
+
}
|
|
3319
|
+
function _Mapped_Mapping(input) {
|
|
3320
|
+
return exports_guard.IsArray(input[6]) && exports_guard.IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))) : MappedDeferred(Identifier(input[3]), input[5], Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10])));
|
|
3321
|
+
}
|
|
3322
|
+
function ReferenceMapping(input) {
|
|
3323
|
+
return Ref(input);
|
|
3324
|
+
}
|
|
3325
|
+
function WithBigIntMapping(input) {
|
|
3326
|
+
return BigInt(input);
|
|
3327
|
+
}
|
|
3328
|
+
function WithNumberMapping(input) {
|
|
3329
|
+
return parseFloat(input);
|
|
3330
|
+
}
|
|
3331
|
+
function WithBooleanMapping(input) {
|
|
3332
|
+
return exports_guard.IsEqual(input, "true");
|
|
3333
|
+
}
|
|
3334
|
+
function WithStringMapping(input) {
|
|
3335
|
+
return input;
|
|
3336
|
+
}
|
|
3337
|
+
function WithNullMapping(input) {
|
|
3338
|
+
return null;
|
|
3339
|
+
}
|
|
3340
|
+
function WithUndefinedMapping(input) {
|
|
3341
|
+
return;
|
|
3342
|
+
}
|
|
3343
|
+
function WithPropertyMapping(input) {
|
|
3344
|
+
return { [input[0]]: input[2] };
|
|
3345
|
+
}
|
|
3346
|
+
function WithPropertyListMapping(input) {
|
|
3347
|
+
return Delimited(input);
|
|
3348
|
+
}
|
|
3349
|
+
function WithObjectMappingReduce(propertyList) {
|
|
3350
|
+
return propertyList.reduce((result, left) => {
|
|
3351
|
+
return exports_memory.Assign(result, left);
|
|
3352
|
+
}, {});
|
|
3353
|
+
}
|
|
3354
|
+
function WithObjectMapping(input) {
|
|
3355
|
+
return WithObjectMappingReduce(input[1]);
|
|
3356
|
+
}
|
|
3357
|
+
function WithElementListMapping(input) {
|
|
3358
|
+
return Delimited(input);
|
|
3359
|
+
}
|
|
3360
|
+
function WithArrayMapping(input) {
|
|
3361
|
+
return input[1];
|
|
3362
|
+
}
|
|
3363
|
+
function WithValueMapping(input) {
|
|
3364
|
+
return input;
|
|
3365
|
+
}
|
|
3366
|
+
function PatternBigIntMapping(input) {
|
|
3367
|
+
return BigInt2();
|
|
3368
|
+
}
|
|
3369
|
+
function PatternStringMapping(input) {
|
|
3370
|
+
return String2();
|
|
3371
|
+
}
|
|
3372
|
+
function PatternNumberMapping(input) {
|
|
3373
|
+
return Number2();
|
|
3374
|
+
}
|
|
3375
|
+
function PatternIntegerMapping(input) {
|
|
3376
|
+
return Integer();
|
|
3377
|
+
}
|
|
3378
|
+
function PatternNeverMapping(input) {
|
|
3379
|
+
return Never();
|
|
3380
|
+
}
|
|
3381
|
+
function PatternTextMapping(input) {
|
|
3382
|
+
return Literal(input);
|
|
3383
|
+
}
|
|
3384
|
+
function PatternBaseMapping(input) {
|
|
3385
|
+
return input;
|
|
3386
|
+
}
|
|
3387
|
+
function PatternGroupMapping(input) {
|
|
3388
|
+
return Union(input[1]);
|
|
3389
|
+
}
|
|
3390
|
+
function PatternUnionMapping(input) {
|
|
3391
|
+
return input.length === 3 ? [...input[0], ...input[2]] : input.length === 1 ? [...input[0]] : [];
|
|
3392
|
+
}
|
|
3393
|
+
function PatternTermMapping(input) {
|
|
3394
|
+
return [input[0], ...input[1]];
|
|
3395
|
+
}
|
|
3396
|
+
function PatternBodyMapping(input) {
|
|
3397
|
+
return input;
|
|
3398
|
+
}
|
|
3399
|
+
function PatternMapping(input) {
|
|
3400
|
+
return input[1];
|
|
3401
|
+
}
|
|
3402
|
+
function InterfaceDeclarationHeritageListMapping(input) {
|
|
3403
|
+
return Delimited(input);
|
|
3404
|
+
}
|
|
3405
|
+
function InterfaceDeclarationHeritageMapping(input) {
|
|
3406
|
+
return exports_guard.IsEqual(input.length, 2) ? input[1] : [];
|
|
3407
|
+
}
|
|
3408
|
+
function InterfaceDeclarationGenericMapping(input) {
|
|
3409
|
+
const parameters2 = input[2];
|
|
3410
|
+
const heritage = input[3];
|
|
3411
|
+
const [properties2, patternProperties] = input[4];
|
|
3412
|
+
const options = exports_guard.IsEqual(exports_guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
3413
|
+
return { [input[1]]: Generic(parameters2, InterfaceDeferred(heritage, properties2, options)) };
|
|
3414
|
+
}
|
|
3415
|
+
function InterfaceDeclarationMapping(input) {
|
|
3416
|
+
const heritage = input[2];
|
|
3417
|
+
const [properties2, patternProperties] = input[3];
|
|
3418
|
+
const options = exports_guard.IsEqual(exports_guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };
|
|
3419
|
+
return { [input[1]]: InterfaceDeferred(heritage, properties2, options) };
|
|
3420
|
+
}
|
|
3421
|
+
function TypeAliasDeclarationGenericMapping(input) {
|
|
3422
|
+
return { [input[1]]: Generic(input[2], input[4]) };
|
|
3423
|
+
}
|
|
3424
|
+
function TypeAliasDeclarationMapping(input) {
|
|
3425
|
+
return { [input[1]]: input[3] };
|
|
3426
|
+
}
|
|
3427
|
+
function ExportKeywordMapping(input) {
|
|
3428
|
+
return null;
|
|
3429
|
+
}
|
|
3430
|
+
function ModuleDeclarationDelimiterMapping(input) {
|
|
3431
|
+
return input;
|
|
3432
|
+
}
|
|
3433
|
+
function ModuleDeclarationListMapping(input) {
|
|
3434
|
+
return Delimited(input);
|
|
3435
|
+
}
|
|
3436
|
+
function ModuleDeclarationMapping(input) {
|
|
3437
|
+
return input[1];
|
|
3438
|
+
}
|
|
3439
|
+
function ModuleMapping(input) {
|
|
3440
|
+
const [moduleDeclaration, moduleDeclarationList] = [input[0], input[1]];
|
|
3441
|
+
return ModuleDeferred(exports_memory.Assign(moduleDeclaration, PropertiesReduce(moduleDeclarationList)[0]));
|
|
3442
|
+
}
|
|
3443
|
+
function ScriptMapping(input) {
|
|
3444
|
+
return input;
|
|
3445
|
+
}
|
|
3446
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/match.mjs
|
|
3447
|
+
function IsMatch(value) {
|
|
3448
|
+
return IsEqual(value.length, 2);
|
|
3449
|
+
}
|
|
3450
|
+
function Match2(input, ok, fail) {
|
|
3451
|
+
return IsMatch(input) ? ok(input[0], input[1]) : fail();
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/take.mjs
|
|
3455
|
+
function TakeVariant(variant, input) {
|
|
3456
|
+
return IsEqual(input.indexOf(variant), 0) ? [variant, input.slice(variant.length)] : [];
|
|
3457
|
+
}
|
|
3458
|
+
function Take(variants, input) {
|
|
3459
|
+
for (let i = 0;i < variants.length; i++) {
|
|
3460
|
+
const result = TakeVariant(variants[i], input);
|
|
3461
|
+
if (IsMatch(result))
|
|
3462
|
+
return result;
|
|
3463
|
+
}
|
|
3464
|
+
return [];
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/char.mjs
|
|
3468
|
+
function Range(start, end) {
|
|
3469
|
+
return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));
|
|
3470
|
+
}
|
|
3471
|
+
var Alpha = [
|
|
3472
|
+
...Range(97, 122),
|
|
3473
|
+
...Range(65, 90)
|
|
3474
|
+
];
|
|
3475
|
+
var Zero = "0";
|
|
3476
|
+
var NonZero = Range(49, 57);
|
|
3477
|
+
var Digit = [Zero, ...NonZero];
|
|
3478
|
+
var WhiteSpace = " ";
|
|
3479
|
+
var NewLine = `
|
|
3480
|
+
`;
|
|
3481
|
+
var UnderScore = "_";
|
|
3482
|
+
var Dot = ".";
|
|
3483
|
+
var DollarSign = "$";
|
|
3484
|
+
var Hyphen = "-";
|
|
3485
|
+
|
|
3486
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/trim.mjs
|
|
3487
|
+
var LineComment = "//";
|
|
3488
|
+
var OpenComment = "/*";
|
|
3489
|
+
var CloseComment = "*/";
|
|
3490
|
+
function DiscardMultilineComment(input) {
|
|
3491
|
+
const index = input.indexOf(CloseComment);
|
|
3492
|
+
const result = IsEqual(index, -1) ? "" : input.slice(index + 2);
|
|
3493
|
+
return result;
|
|
3494
|
+
}
|
|
3495
|
+
function DiscardLineComment(input) {
|
|
3496
|
+
const index = input.indexOf(NewLine);
|
|
3497
|
+
const result = IsEqual(index, -1) ? "" : input.slice(index);
|
|
3498
|
+
return result;
|
|
3499
|
+
}
|
|
3500
|
+
function TrimStartUntilNewline(input) {
|
|
3501
|
+
return input.replace(/^[ \t\r\f\v]+/, "");
|
|
3502
|
+
}
|
|
3503
|
+
function TrimWhitespace(input) {
|
|
3504
|
+
const trimmed = TrimStartUntilNewline(input);
|
|
3505
|
+
return trimmed.startsWith(OpenComment) ? TrimWhitespace(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? TrimWhitespace(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
3506
|
+
}
|
|
3507
|
+
function Trim(input) {
|
|
3508
|
+
const trimmed = input.trimStart();
|
|
3509
|
+
return trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) : trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) : trimmed;
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/optional.mjs
|
|
3513
|
+
function Optional2(value, input) {
|
|
3514
|
+
return Match2(Take([value], input), (Optional3, Rest2) => [Optional3, Rest2], () => ["", input]);
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/internal/many.mjs
|
|
3518
|
+
function IsDiscard(discard2, input) {
|
|
3519
|
+
return discard2.includes(input);
|
|
3520
|
+
}
|
|
3521
|
+
function Many(allowed, discard2, input, result = "") {
|
|
3522
|
+
return Match2(Take(allowed, input), (Char, Rest2) => IsDiscard(discard2, Char) ? Many(allowed, discard2, Rest2, result) : Many(allowed, discard2, Rest2, `${result}${Char}`), () => [result, input]);
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/unsigned_integer.mjs
|
|
3526
|
+
function TakeNonZero(input) {
|
|
3527
|
+
return Take(NonZero, input);
|
|
3528
|
+
}
|
|
3529
|
+
var AllowedDigits = [...Digit, UnderScore];
|
|
3530
|
+
function TakeDigits(input) {
|
|
3531
|
+
return Many(AllowedDigits, [UnderScore], input);
|
|
3532
|
+
}
|
|
3533
|
+
function TakeUnsignedInteger(input) {
|
|
3534
|
+
return Match2(Take([Zero], input), (Zero2, ZeroRest) => [Zero2, ZeroRest], () => Match2(TakeNonZero(input), (NonZero2, NonZeroRest) => Match2(TakeDigits(NonZeroRest), (Digits, DigitsRest) => [`${NonZero2}${Digits}`, DigitsRest], () => []), () => []));
|
|
3535
|
+
}
|
|
3536
|
+
function UnsignedInteger(input) {
|
|
3537
|
+
return TakeUnsignedInteger(Trim(input));
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/integer.mjs
|
|
3541
|
+
function TakeSign(input) {
|
|
3542
|
+
return Optional2(Hyphen, input);
|
|
3543
|
+
}
|
|
3544
|
+
function TakeSignedInteger(input) {
|
|
3545
|
+
return Match2(TakeSign(input), (Sign, SignRest) => Match2(UnsignedInteger(SignRest), (UnsignedInteger2, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger2}`, UnsignedIntegerRest], () => []), () => []);
|
|
3546
|
+
}
|
|
3547
|
+
function Integer2(input) {
|
|
3548
|
+
return TakeSignedInteger(Trim(input));
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/bigint.mjs
|
|
3552
|
+
function TakeBigInt(input) {
|
|
3553
|
+
return Match2(Integer2(input), (Integer3, IntegerRest) => Match2(Take(["n"], IntegerRest), (_N, NRest) => [`${Integer3}`, NRest], () => []), () => []);
|
|
3554
|
+
}
|
|
3555
|
+
function BigInt3(input) {
|
|
3556
|
+
return TakeBigInt(input);
|
|
3557
|
+
}
|
|
3558
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/const.mjs
|
|
3559
|
+
function TakeConst(const_, input) {
|
|
3560
|
+
return Take([const_], input);
|
|
3561
|
+
}
|
|
3562
|
+
function Const(const_, input) {
|
|
3563
|
+
return IsEqual(const_, "") ? ["", input] : const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) : const_.startsWith(WhiteSpace) ? TakeConst(const_, input) : TakeConst(const_, Trim(input));
|
|
3564
|
+
}
|
|
3565
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/ident.mjs
|
|
3566
|
+
var Initial = [...Alpha, UnderScore, DollarSign];
|
|
3567
|
+
function TakeInitial(input) {
|
|
3568
|
+
return Take(Initial, input);
|
|
3569
|
+
}
|
|
3570
|
+
var Remaining = [...Initial, ...Digit];
|
|
3571
|
+
function TakeRemaining(input, result = "") {
|
|
3572
|
+
return Match2(Take(Remaining, input), (Remaining2, RemainingRest) => TakeRemaining(RemainingRest, `${result}${Remaining2}`), () => [result, input]);
|
|
3573
|
+
}
|
|
3574
|
+
function TakeIdent(input) {
|
|
3575
|
+
return Match2(TakeInitial(input), (Initial2, InitialRest) => Match2(TakeRemaining(InitialRest), (Remaining2, RemainingRest) => [`${Initial2}${Remaining2}`, RemainingRest], () => []), () => []);
|
|
3576
|
+
}
|
|
3577
|
+
function Ident(input) {
|
|
3578
|
+
return TakeIdent(Trim(input));
|
|
3579
|
+
}
|
|
3580
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/unsigned_number.mjs
|
|
3581
|
+
var AllowedDigits2 = [...Digit, UnderScore];
|
|
3582
|
+
function IsLeadingDot(input) {
|
|
3583
|
+
return IsMatch(Take([Dot], input));
|
|
3584
|
+
}
|
|
3585
|
+
function TakeFractional(input) {
|
|
3586
|
+
return Match2(Many(AllowedDigits2, [UnderScore], input), (Digits, DigitsRest) => IsEqual(Digits, "") ? [] : [Digits, DigitsRest], () => []);
|
|
3587
|
+
}
|
|
3588
|
+
function LeadingDot(input) {
|
|
3589
|
+
return Match2(Take([Dot], input), (Dot2, DotRest) => Match2(TakeFractional(DotRest), (Fractional, FractionalRest) => [`0${Dot2}${Fractional}`, FractionalRest], () => []), () => []);
|
|
3590
|
+
}
|
|
3591
|
+
function LeadingInteger(input) {
|
|
3592
|
+
return Match2(UnsignedInteger(input), (Integer3, IntegerRest) => Match2(Take([Dot], IntegerRest), (Dot2, DotRest) => Match2(TakeFractional(DotRest), (Fractional, FractionalRest) => [`${Integer3}${Dot2}${Fractional}`, FractionalRest], () => [`${Integer3}`, DotRest]), () => [`${Integer3}`, IntegerRest]), () => []);
|
|
3593
|
+
}
|
|
3594
|
+
function TakeUnsignedNumber(input) {
|
|
3595
|
+
return IsLeadingDot(input) ? LeadingDot(input) : LeadingInteger(input);
|
|
3596
|
+
}
|
|
3597
|
+
function UnsignedNumber(input) {
|
|
3598
|
+
return TakeUnsignedNumber(Trim(input));
|
|
3599
|
+
}
|
|
3600
|
+
|
|
3601
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/number.mjs
|
|
3602
|
+
function TakeSign2(input) {
|
|
3603
|
+
return Optional2(Hyphen, input);
|
|
3604
|
+
}
|
|
3605
|
+
function TakeSignedNumber(input) {
|
|
3606
|
+
return Match2(TakeSign2(input), (Sign, SignRest) => Match2(UnsignedNumber(SignRest), (UnsignedInteger2, UnsignedIntegerRest) => [`${Sign}${UnsignedInteger2}`, UnsignedIntegerRest], () => []), () => []);
|
|
3607
|
+
}
|
|
3608
|
+
function Number3(input) {
|
|
3609
|
+
return TakeSignedNumber(Trim(input));
|
|
3610
|
+
}
|
|
3611
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/until.mjs
|
|
3612
|
+
function TakeOne(input) {
|
|
3613
|
+
const result = IsEqual(input, "") ? [] : [input.slice(0, 1), input.slice(1)];
|
|
3614
|
+
return result;
|
|
3615
|
+
}
|
|
3616
|
+
function IsInputMatchSentinal(end, input) {
|
|
3617
|
+
return ShiftLeft(end, (left, right) => input.startsWith(left) ? true : IsInputMatchSentinal(right, input), () => false);
|
|
3618
|
+
}
|
|
3619
|
+
function Until(end, input, result = "") {
|
|
3620
|
+
return Match2(TakeOne(input), (One, Rest2) => IsInputMatchSentinal(end, input) ? [result, input] : Until(end, Rest2, `${result}${One}`), () => []);
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/span.mjs
|
|
3624
|
+
function MultiLine(start, end, input) {
|
|
3625
|
+
return Match2(Take([start], input), (_, Rest2) => Match2(Until([end], Rest2), (Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, Rest3) => [`${Until2}`, Rest3], () => []), () => []), () => []);
|
|
3626
|
+
}
|
|
3627
|
+
function SingleLine(start, end, input) {
|
|
3628
|
+
return Match2(Take([start], input), (_, Rest2) => Match2(Until([NewLine, end], Rest2), (Until2, UntilRest) => Match2(Take([end], UntilRest), (_2, EndRest) => [`${Until2}`, EndRest], () => []), () => []), () => []);
|
|
3629
|
+
}
|
|
3630
|
+
function Span(start, end, multiLine, input) {
|
|
3631
|
+
return multiLine ? MultiLine(start, end, Trim(input)) : SingleLine(start, end, Trim(input));
|
|
3632
|
+
}
|
|
3633
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/string.mjs
|
|
3634
|
+
function TakeInitial2(quotes, input) {
|
|
3635
|
+
return Take(quotes, input);
|
|
3636
|
+
}
|
|
3637
|
+
function TakeSpan(quote, input) {
|
|
3638
|
+
return Span(quote, quote, false, input);
|
|
3639
|
+
}
|
|
3640
|
+
function TakeString(quotes, input) {
|
|
3641
|
+
return Match2(TakeInitial2(quotes, input), (Initial2, InitialRest) => TakeSpan(Initial2, `${Initial2}${InitialRest}`), () => []);
|
|
3642
|
+
}
|
|
3643
|
+
function String3(quotes, input) {
|
|
3644
|
+
return TakeString(quotes, Trim(input));
|
|
3645
|
+
}
|
|
3646
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/token/until_1.mjs
|
|
3647
|
+
function Until_1(end, input) {
|
|
3648
|
+
return Match2(Until(end, input), (Until2, UntilRest) => IsEqual(Until2, "") ? [] : [Until2, UntilRest], () => []);
|
|
3649
|
+
}
|
|
3650
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/parser.mjs
|
|
3651
|
+
var If2 = (result, left, right = () => []) => result.length === 2 ? left(result) : right();
|
|
3652
|
+
var GenericParameterExtendsEquals = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const("extends", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => If2(Const("=", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [GenericParameterExtendsEqualsMapping(_0), input2]);
|
|
3653
|
+
var GenericParameterExtends = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const("extends", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterExtendsMapping(_0), input2]);
|
|
3654
|
+
var GenericParameterEquals = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const("=", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParameterEqualsMapping(_0), input2]);
|
|
3655
|
+
var GenericParameterIdentifier = (input) => If2(Ident(input), ([_0, input2]) => [GenericParameterIdentifierMapping(_0), input2]);
|
|
3656
|
+
var GenericParameter = (input) => If2(If2(GenericParameterExtendsEquals(input), ([_0, input2]) => [_0, input2], () => If2(GenericParameterExtends(input), ([_0, input2]) => [_0, input2], () => If2(GenericParameterEquals(input), ([_0, input2]) => [_0, input2], () => If2(GenericParameterIdentifier(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [GenericParameterMapping(_0), input2]);
|
|
3657
|
+
var GenericParameterList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(GenericParameter(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => GenericParameterList_0(input2, [...result, _0]), () => [result, input]);
|
|
3658
|
+
var GenericParameterList = (input) => If2(If2(If2(GenericParameter(input), ([_0, input2]) => If2(GenericParameterList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [GenericParameterListMapping(_0), input2]);
|
|
3659
|
+
var GenericParameters = (input) => If2(If2(Const("<", input), ([_0, input2]) => If2(GenericParameterList(input2), ([_1, input3]) => If2(Const(">", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericParametersMapping(_0), input2]);
|
|
3660
|
+
var GenericCallArgumentList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => GenericCallArgumentList_0(input2, [...result, _0]), () => [result, input]);
|
|
3661
|
+
var GenericCallArgumentList = (input) => If2(If2(If2(Type(input), ([_0, input2]) => If2(GenericCallArgumentList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [GenericCallArgumentListMapping(_0), input2]);
|
|
3662
|
+
var GenericCallArguments = (input) => If2(If2(Const("<", input), ([_0, input2]) => If2(GenericCallArgumentList(input2), ([_1, input3]) => If2(Const(">", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericCallArgumentsMapping(_0), input2]);
|
|
3663
|
+
var GenericCall = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(GenericCallArguments(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [GenericCallMapping(_0), input2]);
|
|
3664
|
+
var OptionalSemiColon = (input) => If2(If2(If2(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [OptionalSemiColonMapping(_0), input2]);
|
|
3665
|
+
var KeywordString = (input) => If2(Const("string", input), ([_0, input2]) => [KeywordStringMapping(_0), input2]);
|
|
3666
|
+
var KeywordNumber = (input) => If2(Const("number", input), ([_0, input2]) => [KeywordNumberMapping(_0), input2]);
|
|
3667
|
+
var KeywordBoolean = (input) => If2(Const("boolean", input), ([_0, input2]) => [KeywordBooleanMapping(_0), input2]);
|
|
3668
|
+
var KeywordUndefined = (input) => If2(Const("undefined", input), ([_0, input2]) => [KeywordUndefinedMapping(_0), input2]);
|
|
3669
|
+
var KeywordNull = (input) => If2(Const("null", input), ([_0, input2]) => [KeywordNullMapping(_0), input2]);
|
|
3670
|
+
var KeywordInteger = (input) => If2(Const("integer", input), ([_0, input2]) => [KeywordIntegerMapping(_0), input2]);
|
|
3671
|
+
var KeywordBigInt = (input) => If2(Const("bigint", input), ([_0, input2]) => [KeywordBigIntMapping(_0), input2]);
|
|
3672
|
+
var KeywordUnknown = (input) => If2(Const("unknown", input), ([_0, input2]) => [KeywordUnknownMapping(_0), input2]);
|
|
3673
|
+
var KeywordAny = (input) => If2(Const("any", input), ([_0, input2]) => [KeywordAnyMapping(_0), input2]);
|
|
3674
|
+
var KeywordObject = (input) => If2(Const("object", input), ([_0, input2]) => [KeywordObjectMapping(_0), input2]);
|
|
3675
|
+
var KeywordNever = (input) => If2(Const("never", input), ([_0, input2]) => [KeywordNeverMapping(_0), input2]);
|
|
3676
|
+
var KeywordSymbol = (input) => If2(Const("symbol", input), ([_0, input2]) => [KeywordSymbolMapping(_0), input2]);
|
|
3677
|
+
var KeywordVoid = (input) => If2(Const("void", input), ([_0, input2]) => [KeywordVoidMapping(_0), input2]);
|
|
3678
|
+
var KeywordThis = (input) => If2(Const("this", input), ([_0, input2]) => [KeywordThisMapping(_0), input2]);
|
|
3679
|
+
var TemplateInterpolate = (input) => If2(If2(Const("${", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateInterpolateMapping(_0), input2]);
|
|
3680
|
+
var TemplateSpan = (input) => If2(Until(["${", "`"], input), ([_0, input2]) => [TemplateSpanMapping(_0), input2]);
|
|
3681
|
+
var TemplateBody = (input) => If2(If2(If2(TemplateSpan(input), ([_0, input2]) => If2(TemplateInterpolate(input2), ([_1, input3]) => If2(TemplateBody(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2(If2(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2(If2(TemplateSpan(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [TemplateBodyMapping(_0), input2]);
|
|
3682
|
+
var TemplateLiteralTypes = (input) => If2(If2(Const("`", input), ([_0, input2]) => If2(TemplateBody(input2), ([_1, input3]) => If2(Const("`", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [TemplateLiteralTypesMapping(_0), input2]);
|
|
3683
|
+
var TemplateLiteral = (input) => If2(TemplateLiteralTypes(input), ([_0, input2]) => [TemplateLiteralMapping(_0), input2]);
|
|
3684
|
+
var Dependent2 = (input) => If2(If2(If2(Const("if", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const("then", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => If2(Const("else", input5), ([_4, input6]) => If2(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If2(If2(Const("if", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const("then", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [DependentMapping(_0), input2]);
|
|
3685
|
+
var LiteralBigInt = (input) => If2(BigInt3(input), ([_0, input2]) => [LiteralBigIntMapping(_0), input2]);
|
|
3686
|
+
var LiteralBoolean = (input) => If2(If2(Const("true", input), ([_0, input2]) => [_0, input2], () => If2(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [LiteralBooleanMapping(_0), input2]);
|
|
3687
|
+
var LiteralNumber = (input) => If2(Number3(input), ([_0, input2]) => [LiteralNumberMapping(_0), input2]);
|
|
3688
|
+
var LiteralString = (input) => If2(String3(["'", '"'], input), ([_0, input2]) => [LiteralStringMapping(_0), input2]);
|
|
3689
|
+
var KeyOf2 = (input) => If2(If2(If2(Const("keyof", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [KeyOfMapping(_0), input2]);
|
|
3690
|
+
var IndexArray_0 = (input, result = []) => If2(If2(If2(Const("[", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2(If2(Const("[", input), ([_0, input2]) => If2(Const("]", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => IndexArray_0(input2, [...result, _0]), () => [result, input]);
|
|
3691
|
+
var IndexArray = (input) => If2(IndexArray_0(input), ([_0, input2]) => [IndexArrayMapping(_0), input2]);
|
|
3692
|
+
var Extends2 = (input) => If2(If2(If2(Const("extends", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const("?", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => If2(Const(":", input5), ([_4, input6]) => If2(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExtendsMapping(_0), input2]);
|
|
3693
|
+
var Base = (input) => If2(If2(If2(Const("(", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2(KeywordString(input), ([_0, input2]) => [_0, input2], () => If2(KeywordNumber(input), ([_0, input2]) => [_0, input2], () => If2(KeywordBoolean(input), ([_0, input2]) => [_0, input2], () => If2(KeywordUndefined(input), ([_0, input2]) => [_0, input2], () => If2(KeywordNull(input), ([_0, input2]) => [_0, input2], () => If2(KeywordInteger(input), ([_0, input2]) => [_0, input2], () => If2(KeywordBigInt(input), ([_0, input2]) => [_0, input2], () => If2(KeywordUnknown(input), ([_0, input2]) => [_0, input2], () => If2(KeywordAny(input), ([_0, input2]) => [_0, input2], () => If2(KeywordObject(input), ([_0, input2]) => [_0, input2], () => If2(KeywordNever(input), ([_0, input2]) => [_0, input2], () => If2(KeywordSymbol(input), ([_0, input2]) => [_0, input2], () => If2(KeywordVoid(input), ([_0, input2]) => [_0, input2], () => If2(KeywordThis(input), ([_0, input2]) => [_0, input2], () => If2(LiteralBigInt(input), ([_0, input2]) => [_0, input2], () => If2(LiteralBoolean(input), ([_0, input2]) => [_0, input2], () => If2(LiteralNumber(input), ([_0, input2]) => [_0, input2], () => If2(LiteralString(input), ([_0, input2]) => [_0, input2], () => If2(TemplateLiteral(input), ([_0, input2]) => [_0, input2], () => If2(Dependent2(input), ([_0, input2]) => [_0, input2], () => If2(_Object_2(input), ([_0, input2]) => [_0, input2], () => If2(_Tuple_(input), ([_0, input2]) => [_0, input2], () => If2(_Constructor_(input), ([_0, input2]) => [_0, input2], () => If2(_Function_2(input), ([_0, input2]) => [_0, input2], () => If2(_Mapped_(input), ([_0, input2]) => [_0, input2], () => If2(GenericCall(input), ([_0, input2]) => [_0, input2], () => If2(Reference(input), ([_0, input2]) => [_0, input2], () => [])))))))))))))))))))))))))))), ([_0, input2]) => [BaseMapping(_0), input2]);
|
|
3694
|
+
var With2 = (input) => If2(If2(If2(Const("with", input), ([_0, input2]) => If2(WithObject(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithMapping(_0), input2]);
|
|
3695
|
+
var Factor = (input) => If2(If2(KeyOf2(input), ([_0, input2]) => If2(Base(input2), ([_1, input3]) => If2(IndexArray(input3), ([_2, input4]) => If2(Extends2(input4), ([_3, input5]) => If2(With2(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [FactorMapping(_0), input2]);
|
|
3696
|
+
var ExprTermTail = (input) => If2(If2(If2(Const("&", input), ([_0, input2]) => If2(Factor(input2), ([_1, input3]) => If2(ExprTermTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTermTailMapping(_0), input2]);
|
|
3697
|
+
var ExprTerm = (input) => If2(If2(Factor(input), ([_0, input2]) => If2(ExprTermTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprTermMapping(_0), input2]);
|
|
3698
|
+
var ExprTail = (input) => If2(If2(If2(Const("|", input), ([_0, input2]) => If2(ExprTerm(input2), ([_1, input3]) => If2(ExprTail(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExprTailMapping(_0), input2]);
|
|
3699
|
+
var Expr = (input) => If2(If2(ExprTerm(input), ([_0, input2]) => If2(ExprTail(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprMapping(_0), input2]);
|
|
3700
|
+
var ExprReadonly = (input) => If2(If2(Const("readonly", input), ([_0, input2]) => If2(Expr(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprReadonlyMapping(_0), input2]);
|
|
3701
|
+
var ExprPipe = (input) => If2(If2(Const("|", input), ([_0, input2]) => If2(Expr(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ExprPipeMapping(_0), input2]);
|
|
3702
|
+
var GenericType = (input) => If2(If2(GenericParameters(input), ([_0, input2]) => If2(Const("=", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [GenericTypeMapping(_0), input2]);
|
|
3703
|
+
var InferType = (input) => If2(If2(If2(Const("infer", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(Const("extends", input3), ([_2, input4]) => If2(Expr(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If2(If2(Const("infer", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [InferTypeMapping(_0), input2]);
|
|
3704
|
+
var Type = (input) => If2(If2(InferType(input), ([_0, input2]) => [_0, input2], () => If2(ExprPipe(input), ([_0, input2]) => [_0, input2], () => If2(ExprReadonly(input), ([_0, input2]) => [_0, input2], () => If2(Expr(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [TypeMapping(_0), input2]);
|
|
3705
|
+
var PropertyKeyNumber = (input) => If2(Number3(input), ([_0, input2]) => [PropertyKeyNumberMapping(_0), input2]);
|
|
3706
|
+
var PropertyKeyIdent = (input) => If2(Ident(input), ([_0, input2]) => [PropertyKeyIdentMapping(_0), input2]);
|
|
3707
|
+
var PropertyKeyQuoted = (input) => If2(String3(["'", '"'], input), ([_0, input2]) => [PropertyKeyQuotedMapping(_0), input2]);
|
|
3708
|
+
var PropertyKeyIndex = (input) => If2(If2(Const("[", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(Const(":", input3), ([_2, input4]) => If2(If2(KeywordInteger(input4), ([_02, input5]) => [_02, input5], () => If2(KeywordNumber(input4), ([_02, input5]) => [_02, input5], () => If2(KeywordString(input4), ([_02, input5]) => [_02, input5], () => If2(KeywordSymbol(input4), ([_02, input5]) => [_02, input5], () => [])))), ([_3, input5]) => If2(Const("]", input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [PropertyKeyIndexMapping(_0), input2]);
|
|
3709
|
+
var PropertyKey = (input) => If2(If2(PropertyKeyNumber(input), ([_0, input2]) => [_0, input2], () => If2(PropertyKeyIdent(input), ([_0, input2]) => [_0, input2], () => If2(PropertyKeyQuoted(input), ([_0, input2]) => [_0, input2], () => If2(PropertyKeyIndex(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [PropertyKeyMapping(_0), input2]);
|
|
3710
|
+
var Readonly2 = (input) => If2(If2(If2(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ReadonlyMapping(_0), input2]);
|
|
3711
|
+
var Optional3 = (input) => If2(If2(If2(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [OptionalMapping(_0), input2]);
|
|
3712
|
+
var Property = (input) => If2(If2(Readonly2(input), ([_0, input2]) => If2(PropertyKey(input2), ([_1, input3]) => If2(Optional3(input3), ([_2, input4]) => If2(Const(":", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [PropertyMapping(_0), input2]);
|
|
3713
|
+
var PropertyDelimiter = (input) => If2(If2(If2(Const(",", input), ([_0, input2]) => If2(Const(`
|
|
3714
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const(";", input), ([_0, input2]) => If2(Const(`
|
|
3715
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const(",", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2(If2(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2(If2(Const(`
|
|
3716
|
+
`, input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))))), ([_0, input2]) => [PropertyDelimiterMapping(_0), input2]);
|
|
3717
|
+
var PropertyList_0 = (input, result = []) => If2(If2(PropertyDelimiter(input), ([_0, input2]) => If2(Property(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => PropertyList_0(input2, [...result, _0]), () => [result, input]);
|
|
3718
|
+
var PropertyList = (input) => If2(If2(If2(Property(input), ([_0, input2]) => If2(PropertyList_0(input2), ([_1, input3]) => If2(If2(PropertyDelimiter(input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [PropertyListMapping(_0), input2]);
|
|
3719
|
+
var Properties = (input) => If2(If2(Const("{", input), ([_0, input2]) => If2(PropertyList(input2), ([_1, input3]) => If2(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PropertiesMapping(_0), input2]);
|
|
3720
|
+
var _Object_2 = (input) => If2(Properties(input), ([_0, input2]) => [_Object_Mapping(_0), input2]);
|
|
3721
|
+
var ElementNamed = (input) => If2(If2(If2(Ident(input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => If2(Const(":", input3), ([_2, input4]) => If2(Const("readonly", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_0, input2], () => If2(If2(Ident(input), ([_0, input2]) => If2(Const(":", input2), ([_1, input3]) => If2(Const("readonly", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If2(If2(Ident(input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => If2(Const(":", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [_0, input2], () => If2(If2(Ident(input), ([_0, input2]) => If2(Const(":", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [ElementNamedMapping(_0), input2]);
|
|
3722
|
+
var ElementBase = (input) => If2(If2(ElementNamed(input), ([_0, input2]) => [_0, input2], () => If2(If2(Readonly2(input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => If2(Optional3(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementBaseMapping(_0), input2]);
|
|
3723
|
+
var Element = (input) => If2(If2(If2(Const("...", input), ([_0, input2]) => If2(ElementBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(ElementBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementMapping(_0), input2]);
|
|
3724
|
+
var ElementList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(Element(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
3725
|
+
var ElementList = (input) => If2(If2(If2(Element(input), ([_0, input2]) => If2(ElementList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ElementListMapping(_0), input2]);
|
|
3726
|
+
var _Tuple_ = (input) => If2(If2(Const("[", input), ([_0, input2]) => If2(ElementList(input2), ([_1, input3]) => If2(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_Tuple_Mapping(_0), input2]);
|
|
3727
|
+
var ParameterReadonlyOptional = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => If2(Const(":", input3), ([_2, input4]) => If2(Const("readonly", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [ParameterReadonlyOptionalMapping(_0), input2]);
|
|
3728
|
+
var ParameterReadonly = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const(":", input2), ([_1, input3]) => If2(Const("readonly", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterReadonlyMapping(_0), input2]);
|
|
3729
|
+
var ParameterOptional = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => If2(Const(":", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [ParameterOptionalMapping(_0), input2]);
|
|
3730
|
+
var ParameterType = (input) => If2(If2(Ident(input), ([_0, input2]) => If2(Const(":", input2), ([_1, input3]) => If2(Type(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [ParameterTypeMapping(_0), input2]);
|
|
3731
|
+
var ParameterBase = (input) => If2(If2(ParameterReadonlyOptional(input), ([_0, input2]) => [_0, input2], () => If2(ParameterReadonly(input), ([_0, input2]) => [_0, input2], () => If2(ParameterOptional(input), ([_0, input2]) => [_0, input2], () => If2(ParameterType(input), ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [ParameterBaseMapping(_0), input2]);
|
|
3732
|
+
var Parameter2 = (input) => If2(If2(If2(Const("...", input), ([_0, input2]) => If2(ParameterBase(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(ParameterBase(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ParameterMapping(_0), input2]);
|
|
3733
|
+
var ParameterList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(Parameter2(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ParameterList_0(input2, [...result, _0]), () => [result, input]);
|
|
3734
|
+
var ParameterList = (input) => If2(If2(If2(Parameter2(input), ([_0, input2]) => If2(ParameterList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ParameterListMapping(_0), input2]);
|
|
3735
|
+
var _Function_2 = (input) => If2(If2(Const("(", input), ([_0, input2]) => If2(ParameterList(input2), ([_1, input3]) => If2(Const(")", input3), ([_2, input4]) => If2(Const("=>", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [_Function_Mapping(_0), input2]);
|
|
3736
|
+
var _Constructor_ = (input) => If2(If2(Const("new", input), ([_0, input2]) => If2(Const("(", input2), ([_1, input3]) => If2(ParameterList(input3), ([_2, input4]) => If2(Const(")", input4), ([_3, input5]) => If2(Const("=>", input5), ([_4, input6]) => If2(Type(input6), ([_5, input7]) => [[_0, _1, _2, _3, _4, _5], input7])))))), ([_0, input2]) => [_Constructor_Mapping(_0), input2]);
|
|
3737
|
+
var MappedReadonly = (input) => If2(If2(If2(Const("+", input), ([_0, input2]) => If2(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const("-", input), ([_0, input2]) => If2(Const("readonly", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const("readonly", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedReadonlyMapping(_0), input2]);
|
|
3738
|
+
var MappedOptional = (input) => If2(If2(If2(Const("+", input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const("-", input), ([_0, input2]) => If2(Const("?", input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const("?", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])))), ([_0, input2]) => [MappedOptionalMapping(_0), input2]);
|
|
3739
|
+
var MappedAs = (input) => If2(If2(If2(Const("as", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [MappedAsMapping(_0), input2]);
|
|
3740
|
+
var _Mapped_ = (input) => If2(If2(Const("{", input), ([_0, input2]) => If2(MappedReadonly(input2), ([_1, input3]) => If2(Const("[", input3), ([_2, input4]) => If2(Ident(input4), ([_3, input5]) => If2(Const("in", input5), ([_4, input6]) => If2(Type(input6), ([_5, input7]) => If2(MappedAs(input7), ([_6, input8]) => If2(Const("]", input8), ([_7, input9]) => If2(MappedOptional(input9), ([_8, input10]) => If2(Const(":", input10), ([_9, input11]) => If2(Type(input11), ([_10, input12]) => If2(OptionalSemiColon(input12), ([_11, input13]) => If2(Const("}", input13), ([_12, input14]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input14]))))))))))))), ([_0, input2]) => [_Mapped_Mapping(_0), input2]);
|
|
3741
|
+
var Reference = (input) => If2(Ident(input), ([_0, input2]) => [ReferenceMapping(_0), input2]);
|
|
3742
|
+
var WithBigInt = (input) => If2(BigInt3(input), ([_0, input2]) => [WithBigIntMapping(_0), input2]);
|
|
3743
|
+
var WithNumber = (input) => If2(Number3(input), ([_0, input2]) => [WithNumberMapping(_0), input2]);
|
|
3744
|
+
var WithBoolean = (input) => If2(If2(Const("true", input), ([_0, input2]) => [_0, input2], () => If2(Const("false", input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithBooleanMapping(_0), input2]);
|
|
3745
|
+
var WithString = (input) => If2(String3(['"', "'"], input), ([_0, input2]) => [WithStringMapping(_0), input2]);
|
|
3746
|
+
var WithNull = (input) => If2(Const("null", input), ([_0, input2]) => [WithNullMapping(_0), input2]);
|
|
3747
|
+
var WithUndefined = (input) => If2(Const("undefined", input), ([_0, input2]) => [WithUndefinedMapping(_0), input2]);
|
|
3748
|
+
var WithProperty = (input) => If2(If2(PropertyKey(input), ([_0, input2]) => If2(Const(":", input2), ([_1, input3]) => If2(WithValue(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithPropertyMapping(_0), input2]);
|
|
3749
|
+
var WithPropertyList_0 = (input, result = []) => If2(If2(PropertyDelimiter(input), ([_0, input2]) => If2(WithProperty(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithPropertyList_0(input2, [...result, _0]), () => [result, input]);
|
|
3750
|
+
var WithPropertyList = (input) => If2(If2(If2(WithProperty(input), ([_0, input2]) => If2(WithPropertyList_0(input2), ([_1, input3]) => If2(If2(PropertyDelimiter(input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithPropertyListMapping(_0), input2]);
|
|
3751
|
+
var WithObject = (input) => If2(If2(Const("{", input), ([_0, input2]) => If2(WithPropertyList(input2), ([_1, input3]) => If2(Const("}", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithObjectMapping(_0), input2]);
|
|
3752
|
+
var WithElementList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(WithValue(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => WithElementList_0(input2, [...result, _0]), () => [result, input]);
|
|
3753
|
+
var WithElementList = (input) => If2(If2(If2(WithValue(input), ([_0, input2]) => If2(WithElementList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [WithElementListMapping(_0), input2]);
|
|
3754
|
+
var WithArray = (input) => If2(If2(Const("[", input), ([_0, input2]) => If2(WithElementList(input2), ([_1, input3]) => If2(Const("]", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [WithArrayMapping(_0), input2]);
|
|
3755
|
+
var WithValue = (input) => If2(If2(WithBigInt(input), ([_0, input2]) => [_0, input2], () => If2(WithNumber(input), ([_0, input2]) => [_0, input2], () => If2(WithBoolean(input), ([_0, input2]) => [_0, input2], () => If2(WithString(input), ([_0, input2]) => [_0, input2], () => If2(WithNull(input), ([_0, input2]) => [_0, input2], () => If2(WithUndefined(input), ([_0, input2]) => [_0, input2], () => If2(WithObject(input), ([_0, input2]) => [_0, input2], () => If2(WithArray(input), ([_0, input2]) => [_0, input2], () => [])))))))), ([_0, input2]) => [WithValueMapping(_0), input2]);
|
|
3756
|
+
var PatternBigInt = (input) => If2(Const("-?(?:0|[1-9][0-9]*)n", input), ([_0, input2]) => [PatternBigIntMapping(_0), input2]);
|
|
3757
|
+
var PatternString = (input) => If2(Const(".*", input), ([_0, input2]) => [PatternStringMapping(_0), input2]);
|
|
3758
|
+
var PatternNumber = (input) => If2(Const("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", input), ([_0, input2]) => [PatternNumberMapping(_0), input2]);
|
|
3759
|
+
var PatternInteger = (input) => If2(Const("-?(?:0|[1-9][0-9]*)", input), ([_0, input2]) => [PatternIntegerMapping(_0), input2]);
|
|
3760
|
+
var PatternNever = (input) => If2(Const("(?!)", input), ([_0, input2]) => [PatternNeverMapping(_0), input2]);
|
|
3761
|
+
var PatternText = (input) => If2(Until_1(["-?(?:0|[1-9][0-9]*)n", ".*", "-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", "-?(?:0|[1-9][0-9]*)", "(?!)", "(", ")", "$", "|"], input), ([_0, input2]) => [PatternTextMapping(_0), input2]);
|
|
3762
|
+
var PatternBase = (input) => If2(If2(PatternBigInt(input), ([_0, input2]) => [_0, input2], () => If2(PatternString(input), ([_0, input2]) => [_0, input2], () => If2(PatternNumber(input), ([_0, input2]) => [_0, input2], () => If2(PatternInteger(input), ([_0, input2]) => [_0, input2], () => If2(PatternNever(input), ([_0, input2]) => [_0, input2], () => If2(PatternGroup(input), ([_0, input2]) => [_0, input2], () => If2(PatternText(input), ([_0, input2]) => [_0, input2], () => []))))))), ([_0, input2]) => [PatternBaseMapping(_0), input2]);
|
|
3763
|
+
var PatternGroup = (input) => If2(If2(Const("(", input), ([_0, input2]) => If2(PatternBody(input2), ([_1, input3]) => If2(Const(")", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternGroupMapping(_0), input2]);
|
|
3764
|
+
var PatternUnion = (input) => If2(If2(If2(PatternTerm(input), ([_0, input2]) => If2(Const("|", input2), ([_1, input3]) => If2(PatternUnion(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2(If2(PatternTerm(input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [PatternUnionMapping(_0), input2]);
|
|
3765
|
+
var PatternTerm = (input) => If2(If2(PatternBase(input), ([_0, input2]) => If2(PatternBody(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [PatternTermMapping(_0), input2]);
|
|
3766
|
+
var PatternBody = (input) => If2(If2(PatternUnion(input), ([_0, input2]) => [_0, input2], () => If2(PatternTerm(input), ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [PatternBodyMapping(_0), input2]);
|
|
3767
|
+
var Pattern = (input) => If2(If2(Const("^", input), ([_0, input2]) => If2(PatternBody(input2), ([_1, input3]) => If2(Const("$", input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [PatternMapping(_0), input2]);
|
|
3768
|
+
var InterfaceDeclarationHeritageList_0 = (input, result = []) => If2(If2(Const(",", input), ([_0, input2]) => If2(Type(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => InterfaceDeclarationHeritageList_0(input2, [...result, _0]), () => [result, input]);
|
|
3769
|
+
var InterfaceDeclarationHeritageList = (input) => If2(If2(If2(Type(input), ([_0, input2]) => If2(InterfaceDeclarationHeritageList_0(input2), ([_1, input3]) => If2(If2(Const(",", input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [InterfaceDeclarationHeritageListMapping(_0), input2]);
|
|
3770
|
+
var InterfaceDeclarationHeritage = (input) => If2(If2(If2(Const("extends", input), ([_0, input2]) => If2(InterfaceDeclarationHeritageList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [InterfaceDeclarationHeritageMapping(_0), input2]);
|
|
3771
|
+
var InterfaceDeclarationGeneric = (input) => If2(If2(Const("interface", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(GenericParameters(input3), ([_2, input4]) => If2(InterfaceDeclarationHeritage(input4), ([_3, input5]) => If2(Properties(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [InterfaceDeclarationGenericMapping(_0), input2]);
|
|
3772
|
+
var InterfaceDeclaration = (input) => If2(If2(Const("interface", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(InterfaceDeclarationHeritage(input3), ([_2, input4]) => If2(Properties(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [InterfaceDeclarationMapping(_0), input2]);
|
|
3773
|
+
var TypeAliasDeclarationGeneric = (input) => If2(If2(Const("type", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(GenericParameters(input3), ([_2, input4]) => If2(Const("=", input4), ([_3, input5]) => If2(Type(input5), ([_4, input6]) => [[_0, _1, _2, _3, _4], input6]))))), ([_0, input2]) => [TypeAliasDeclarationGenericMapping(_0), input2]);
|
|
3774
|
+
var TypeAliasDeclaration = (input) => If2(If2(Const("type", input), ([_0, input2]) => If2(Ident(input2), ([_1, input3]) => If2(Const("=", input3), ([_2, input4]) => If2(Type(input4), ([_3, input5]) => [[_0, _1, _2, _3], input5])))), ([_0, input2]) => [TypeAliasDeclarationMapping(_0), input2]);
|
|
3775
|
+
var ExportKeyword = (input) => If2(If2(If2(Const("export", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ExportKeywordMapping(_0), input2]);
|
|
3776
|
+
var ModuleDeclarationDelimiter = (input) => If2(If2(If2(Const(";", input), ([_0, input2]) => If2(Const(`
|
|
3777
|
+
`, input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [_0, input2], () => If2(If2(Const(";", input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => If2(If2(Const(`
|
|
3778
|
+
`, input), ([_0, input2]) => [[_0], input2]), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [ModuleDeclarationDelimiterMapping(_0), input2]);
|
|
3779
|
+
var ModuleDeclarationList_0 = (input, result = []) => If2(If2(ModuleDeclarationDelimiter(input), ([_0, input2]) => If2(ModuleDeclaration(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => ModuleDeclarationList_0(input2, [...result, _0]), () => [result, input]);
|
|
3780
|
+
var ModuleDeclarationList = (input) => If2(If2(If2(ModuleDeclaration(input), ([_0, input2]) => If2(ModuleDeclarationList_0(input2), ([_1, input3]) => If2(If2(ModuleDeclarationDelimiter(input3), ([_02, input4]) => [[_02], input4], () => [[], input3]), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [_0, input2], () => If2([[], input], ([_0, input2]) => [_0, input2], () => [])), ([_0, input2]) => [ModuleDeclarationListMapping(_0), input2]);
|
|
3781
|
+
var ModuleDeclaration = (input) => If2(If2(ExportKeyword(input), ([_0, input2]) => If2(If2(InterfaceDeclarationGeneric(input2), ([_02, input3]) => [_02, input3], () => If2(InterfaceDeclaration(input2), ([_02, input3]) => [_02, input3], () => If2(TypeAliasDeclarationGeneric(input2), ([_02, input3]) => [_02, input3], () => If2(TypeAliasDeclaration(input2), ([_02, input3]) => [_02, input3], () => [])))), ([_1, input3]) => If2(OptionalSemiColon(input3), ([_2, input4]) => [[_0, _1, _2], input4]))), ([_0, input2]) => [ModuleDeclarationMapping(_0), input2]);
|
|
3782
|
+
var Module2 = (input) => If2(If2(ModuleDeclaration(input), ([_0, input2]) => If2(ModuleDeclarationList(input2), ([_1, input3]) => [[_0, _1], input3])), ([_0, input2]) => [ModuleMapping(_0), input2]);
|
|
3783
|
+
var Script = (input) => If2(If2(Module2(input), ([_0, input2]) => [_0, input2], () => If2(GenericType(input), ([_0, input2]) => [_0, input2], () => If2(Type(input), ([_0, input2]) => [_0, input2], () => []))), ([_0, input2]) => [ScriptMapping(_0), input2]);
|
|
3784
|
+
|
|
3785
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/patterns/template.mjs
|
|
3786
|
+
function ParseTemplateIntoTypes(template) {
|
|
3787
|
+
const parsed = TemplateLiteralTypes(`\`${template}\``);
|
|
3788
|
+
const result = exports_guard.IsEqual(parsed.length, 2) ? parsed[0] : Unreachable();
|
|
3789
|
+
return result;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/encode.mjs
|
|
3793
|
+
function JoinString(input) {
|
|
3794
|
+
return input.join("|");
|
|
3795
|
+
}
|
|
3796
|
+
function UnwrapTemplateLiteralPattern(pattern) {
|
|
3797
|
+
return pattern.slice(1, pattern.length - 1);
|
|
3798
|
+
}
|
|
3799
|
+
function EncodeLiteral(value, right, pattern) {
|
|
3800
|
+
return EncodeTypes(right, `${pattern}${value}`);
|
|
3801
|
+
}
|
|
3802
|
+
function EncodeBigInt(right, pattern) {
|
|
3803
|
+
return EncodeTypes(right, `${pattern}${BigIntPattern}`);
|
|
3804
|
+
}
|
|
3805
|
+
function EncodeInteger(right, pattern) {
|
|
3806
|
+
return EncodeTypes(right, `${pattern}${IntegerPattern}`);
|
|
3807
|
+
}
|
|
3808
|
+
function EncodeNumber(right, pattern) {
|
|
3809
|
+
return EncodeTypes(right, `${pattern}${NumberPattern}`);
|
|
3810
|
+
}
|
|
3811
|
+
function EncodeBoolean(right, pattern) {
|
|
3812
|
+
return EncodeType(Union([Literal("false"), Literal("true")]), right, pattern);
|
|
3813
|
+
}
|
|
3814
|
+
function EncodeString(right, pattern) {
|
|
3815
|
+
return EncodeTypes(right, `${pattern}${StringPattern}`);
|
|
3816
|
+
}
|
|
3817
|
+
function EncodeTemplateLiteral(templatePattern, right, pattern) {
|
|
3818
|
+
return EncodeTypes(right, `${pattern}${UnwrapTemplateLiteralPattern(templatePattern)}`);
|
|
3819
|
+
}
|
|
3820
|
+
function EncodeTemplateLiteralDeferred(types, right, pattern) {
|
|
3821
|
+
const templateLiteral = TemplateLiteralAction(types, {});
|
|
3822
|
+
const result = EncodeType(templateLiteral, right, pattern);
|
|
3823
|
+
return result;
|
|
3824
|
+
}
|
|
3825
|
+
function EncodeEnum(values, right, pattern) {
|
|
3826
|
+
const evaluated = EvaluateEnum(values);
|
|
3827
|
+
return EncodeType(evaluated, right, pattern);
|
|
3828
|
+
}
|
|
3829
|
+
function EncodeUnion(types, right, pattern, result = []) {
|
|
3830
|
+
return exports_guard.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], "")]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));
|
|
3831
|
+
}
|
|
3832
|
+
function EncodeType(type, right, pattern) {
|
|
3833
|
+
return IsEnum(type) ? EncodeEnum(type.enum, right, pattern) : IsInteger3(type) ? EncodeInteger(right, pattern) : IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) : IsBigInt3(type) ? EncodeBigInt(right, pattern) : IsBoolean4(type) ? EncodeBoolean(right, pattern) : IsNumber4(type) ? EncodeNumber(right, pattern) : IsString4(type) ? EncodeString(right, pattern) : IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) : IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) : IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) : NeverPattern;
|
|
3834
|
+
}
|
|
3835
|
+
function EncodeTypes(types, pattern) {
|
|
3836
|
+
return exports_guard.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);
|
|
3837
|
+
}
|
|
3838
|
+
function EncodePattern(types) {
|
|
3839
|
+
const encoded = EncodeTypes(types, "");
|
|
3840
|
+
const result = `^${encoded}$`;
|
|
3841
|
+
return result;
|
|
3842
|
+
}
|
|
3843
|
+
function TemplateLiteralEncode(types) {
|
|
3844
|
+
const pattern = EncodePattern(types);
|
|
3845
|
+
const result = TemplateLiteralCreate(pattern);
|
|
3846
|
+
return result;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs
|
|
3850
|
+
function TemplateLiteralAction(types, options) {
|
|
3851
|
+
const result = CanInstantiate(types) ? exports_memory.Update(TemplateLiteralEncode(types), {}, options) : TemplateLiteralDeferred(types, options);
|
|
3852
|
+
return result;
|
|
3853
|
+
}
|
|
3854
|
+
function TemplateLiteralInstantiate(context, state, types, options) {
|
|
3855
|
+
const instantiatedTypes = InstantiateTypes(context, state, types);
|
|
3856
|
+
return TemplateLiteralAction(instantiatedTypes, options);
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/template_literal.mjs
|
|
3860
|
+
function TemplateLiteralDeferred(types, options = {}) {
|
|
3861
|
+
return Deferred("TemplateLiteral", [types], options);
|
|
3862
|
+
}
|
|
3863
|
+
function IsTemplateLiteralDeferred(value) {
|
|
3864
|
+
return IsSchema(value) && exports_guard.HasPropertyKey(value, "action") && exports_guard.IsEqual(value.action, "TemplateLiteral");
|
|
3865
|
+
}
|
|
3866
|
+
function TemplateLiteralFromTypes(types) {
|
|
3867
|
+
return TemplateLiteralAction(types, {});
|
|
3868
|
+
}
|
|
3869
|
+
function TemplateLiteralFromString(template) {
|
|
3870
|
+
const types = ParseTemplateIntoTypes(template);
|
|
3871
|
+
return TemplateLiteralFromTypes(types);
|
|
3872
|
+
}
|
|
3873
|
+
function TemplateLiteral2(input, options = {}) {
|
|
3874
|
+
const type = exports_guard.IsString(input) ? TemplateLiteralFromString(input) : TemplateLiteralFromTypes(input);
|
|
3875
|
+
return exports_memory.Update(type, {}, options);
|
|
3876
|
+
}
|
|
3877
|
+
function IsTemplateLiteral(value) {
|
|
3878
|
+
return IsKind(value, "TemplateLiteral");
|
|
3879
|
+
}
|
|
3880
|
+
|
|
3881
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/result.mjs
|
|
3882
|
+
var exports_result = {};
|
|
3883
|
+
__export(exports_result, {
|
|
3884
|
+
Match: () => Match3,
|
|
3885
|
+
IsExtendsUnion: () => IsExtendsUnion,
|
|
3886
|
+
IsExtendsTrueLike: () => IsExtendsTrueLike,
|
|
3887
|
+
IsExtendsTrue: () => IsExtendsTrue,
|
|
3888
|
+
IsExtendsFalse: () => IsExtendsFalse,
|
|
3889
|
+
ExtendsUnion: () => ExtendsUnion,
|
|
3890
|
+
ExtendsTrue: () => ExtendsTrue,
|
|
3891
|
+
ExtendsFalse: () => ExtendsFalse
|
|
3892
|
+
});
|
|
3893
|
+
function ExtendsUnion(inferred) {
|
|
3894
|
+
return exports_memory.Create({ ["~kind"]: "ExtendsUnion" }, { inferred });
|
|
3895
|
+
}
|
|
3896
|
+
function IsExtendsUnion(value) {
|
|
3897
|
+
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "inferred") && exports_guard.IsEqual(value["~kind"], "ExtendsUnion") && exports_guard.IsObject(value.inferred);
|
|
3898
|
+
}
|
|
3899
|
+
function ExtendsTrue(inferred) {
|
|
3900
|
+
return exports_memory.Create({ ["~kind"]: "ExtendsTrue" }, { inferred });
|
|
3901
|
+
}
|
|
3902
|
+
function IsExtendsTrue(value) {
|
|
3903
|
+
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "inferred") && exports_guard.IsEqual(value["~kind"], "ExtendsTrue") && exports_guard.IsObject(value.inferred);
|
|
3904
|
+
}
|
|
3905
|
+
function ExtendsFalse() {
|
|
3906
|
+
return exports_memory.Create({ ["~kind"]: "ExtendsFalse" }, {});
|
|
3907
|
+
}
|
|
3908
|
+
function IsExtendsFalse(value) {
|
|
3909
|
+
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.IsEqual(value["~kind"], "ExtendsFalse");
|
|
3910
|
+
}
|
|
3911
|
+
function IsExtendsTrueLike(value) {
|
|
3912
|
+
return IsExtendsUnion(value) || IsExtendsTrue(value);
|
|
3913
|
+
}
|
|
3914
|
+
function Match3(result, true_, false_) {
|
|
3915
|
+
return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/extends_right.mjs
|
|
3919
|
+
function ExtendsRightInfer(inferred, name, left, right) {
|
|
3920
|
+
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => ExtendsTrue(exports_memory.Assign(exports_memory.Assign(inferred, checkInferred), { [name]: left })), () => ExtendsFalse());
|
|
3921
|
+
}
|
|
3922
|
+
function ExtendsRightAny(inferred, _left) {
|
|
3923
|
+
return ExtendsTrue(inferred);
|
|
3924
|
+
}
|
|
3925
|
+
function ExtendsRightDependent(inferred, left, if_, then_, else_) {
|
|
3926
|
+
return Match3(ExtendsLeft(inferred, left, if_), (inferred2) => Match3(ExtendsLeft(inferred2, left, then_), (inferred3) => ExtendsTrue(inferred3), () => ExtendsFalse()), () => Match3(ExtendsLeft(inferred, left, else_), (inferred2) => ExtendsTrue(inferred2), () => ExtendsFalse()));
|
|
3927
|
+
}
|
|
3928
|
+
function ExtendsRightEnum(inferred, left, right) {
|
|
3929
|
+
const evaluated = EvaluateEnum(right);
|
|
3930
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
3931
|
+
}
|
|
3932
|
+
function ExtendsRightIntersect(inferred, left, right) {
|
|
3933
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsRightIntersect(inferred2, left, tail), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
3934
|
+
}
|
|
3935
|
+
function ExtendsRightTemplateLiteral(inferred, left, right) {
|
|
3936
|
+
const evaluated = EvaluateTemplateLiteral(right);
|
|
3937
|
+
return ExtendsLeft(inferred, left, evaluated);
|
|
3938
|
+
}
|
|
3939
|
+
function ExtendsRightUnion(inferred, left, right) {
|
|
3940
|
+
return exports_guard.ShiftLeft(right, (head, tail) => Match3(ExtendsLeft(inferred, left, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsRightUnion(inferred, left, tail)), () => ExtendsFalse());
|
|
3941
|
+
}
|
|
3942
|
+
function ExtendsRight(inferred, left, right) {
|
|
3943
|
+
return IsAny(right) ? ExtendsRightAny(inferred, left) : IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) : IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) : IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) : IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) : IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) : IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/any.mjs
|
|
3947
|
+
function ExtendsAny(inferred, left, right) {
|
|
3948
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsUnion(inferred);
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/array.mjs
|
|
3952
|
+
function ExtendsImmutable(left, right) {
|
|
3953
|
+
const isImmutableLeft = IsImmutable(left);
|
|
3954
|
+
const isImmutableRight = IsImmutable(right);
|
|
3955
|
+
return isImmutableLeft && isImmutableRight ? true : !isImmutableLeft && isImmutableRight ? true : isImmutableLeft && !isImmutableRight ? false : true;
|
|
3956
|
+
}
|
|
3957
|
+
function ExtendsArray(inferred, arrayLeft, left, right) {
|
|
3958
|
+
return IsArray3(right) ? ExtendsImmutable(arrayLeft, right) ? ExtendsLeft(inferred, left, right.items) : ExtendsFalse() : ExtendsRight(inferred, arrayLeft, right);
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/bigint.mjs
|
|
3962
|
+
function ExtendsBigInt(inferred, left, right) {
|
|
3963
|
+
return IsBigInt3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/boolean.mjs
|
|
3967
|
+
function ExtendsBoolean(inferred, left, right) {
|
|
3968
|
+
return IsBoolean4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/parameters.mjs
|
|
3972
|
+
function ParameterCompare(inferred, left, leftRest, right, rightRest) {
|
|
3973
|
+
const checkLeft = IsInfer(right) ? left : right;
|
|
3974
|
+
const checkRight = IsInfer(right) ? right : left;
|
|
3975
|
+
const isLeftOptional = IsOptional(left);
|
|
3976
|
+
const isRightOptional = IsOptional(right);
|
|
3977
|
+
return !isLeftOptional && isRightOptional ? ExtendsFalse() : Match3(ExtendsLeft(inferred, checkLeft, checkRight), (inferred2) => ExtendsParameters(inferred2, leftRest, rightRest), () => ExtendsFalse());
|
|
3978
|
+
}
|
|
3979
|
+
function ParameterRight(inferred, left, leftRest, rightRest) {
|
|
3980
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
3981
|
+
}
|
|
3982
|
+
function ParametersLeft(inferred, left, rightRest) {
|
|
3983
|
+
return exports_guard.ShiftLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => ExtendsTrue(inferred));
|
|
3984
|
+
}
|
|
3985
|
+
function ExtendsParameters(inferred, left, right) {
|
|
3986
|
+
return ParametersLeft(inferred, left, right);
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/return_type.mjs
|
|
3990
|
+
function ExtendsReturnType(inferred, left, right) {
|
|
3991
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsLeft(inferred, left, right);
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/constructor.mjs
|
|
3995
|
+
function ExtendsConstructor(inferred, parameters2, returnType, right) {
|
|
3996
|
+
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsConstructor3(right) ? Match3(ExtendsParameters(inferred, parameters2, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["instanceType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
3997
|
+
}
|
|
3998
|
+
|
|
3999
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/dependent.mjs
|
|
4000
|
+
function ExtendsDependent(inferred, if_, then_, else_, right) {
|
|
4001
|
+
return Match3(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));
|
|
4002
|
+
}
|
|
4003
|
+
|
|
4004
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/enum.mjs
|
|
4005
|
+
function ExtendsEnum(inferred, left, right) {
|
|
4006
|
+
const evaluated = EvaluateEnum(left);
|
|
4007
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
4008
|
+
}
|
|
4009
|
+
|
|
4010
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/function.mjs
|
|
4011
|
+
function ExtendsFunction(inferred, parameters2, returnType, right) {
|
|
4012
|
+
return IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : IsFunction3(right) ? Match3(ExtendsParameters(inferred, parameters2, right["parameters"]), (inferred2) => ExtendsReturnType(inferred2, returnType, right["returnType"]), () => ExtendsFalse()) : ExtendsFalse();
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/integer.mjs
|
|
4016
|
+
function ExtendsInteger(inferred, left, right) {
|
|
4017
|
+
return IsInteger3(right) ? ExtendsTrue(inferred) : IsNumber4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/intersect.mjs
|
|
4021
|
+
function ExtendsIntersect(inferred, left, right) {
|
|
4022
|
+
const evaluated = EvaluateIntersect(left);
|
|
4023
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/literal.mjs
|
|
4027
|
+
function ExtendsLiteralValue(inferred, left, right) {
|
|
4028
|
+
return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
4029
|
+
}
|
|
4030
|
+
function ExtendsLiteralBigInt(inferred, left, right) {
|
|
4031
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
4032
|
+
}
|
|
4033
|
+
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
4034
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
4035
|
+
}
|
|
4036
|
+
function ExtendsLiteralNumber(inferred, left, right) {
|
|
4037
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
4038
|
+
}
|
|
4039
|
+
function ExtendsLiteralString(inferred, left, right) {
|
|
4040
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
4041
|
+
}
|
|
4042
|
+
function ExtendsLiteral(inferred, left, right) {
|
|
4043
|
+
return exports_guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : exports_guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : exports_guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : exports_guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable();
|
|
4044
|
+
}
|
|
4045
|
+
|
|
4046
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/never.mjs
|
|
4047
|
+
function ExtendsNever(inferred, left, right) {
|
|
4048
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : ExtendsTrue(inferred);
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4051
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/null.mjs
|
|
4052
|
+
function ExtendsNull(inferred, left, right) {
|
|
4053
|
+
return IsNull3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4054
|
+
}
|
|
4055
|
+
|
|
4056
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/number.mjs
|
|
4057
|
+
function ExtendsNumber(inferred, left, right) {
|
|
4058
|
+
return IsNumber4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4059
|
+
}
|
|
4060
|
+
|
|
4061
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/object.mjs
|
|
4062
|
+
function ExtendsPropertyOptional(inferred, left, right) {
|
|
4063
|
+
return IsOptional(left) ? IsOptional(right) ? ExtendsTrue(inferred) : ExtendsFalse() : ExtendsTrue(inferred);
|
|
4064
|
+
}
|
|
4065
|
+
function ExtendsProperty(inferred, left, right) {
|
|
4066
|
+
return IsInfer(right) && IsNever(right.extends) ? ExtendsFalse() : Match3(ExtendsLeft(inferred, left, right), (inferred2) => ExtendsPropertyOptional(inferred2, left, right), () => ExtendsFalse());
|
|
4067
|
+
}
|
|
4068
|
+
function ExtractInferredProperties(keys, properties2) {
|
|
4069
|
+
return keys.reduce((result, key) => {
|
|
4070
|
+
return key in properties2 ? IsExtendsTrueLike(properties2[key]) ? { ...result, ...properties2[key].inferred } : Unreachable() : Unreachable();
|
|
4071
|
+
}, {});
|
|
4072
|
+
}
|
|
4073
|
+
function ExtendsPropertiesComparer(inferred, left, right) {
|
|
4074
|
+
const properties2 = {};
|
|
4075
|
+
for (const rightKey of exports_guard.Keys(right)) {
|
|
4076
|
+
properties2[rightKey] = rightKey in left ? ExtendsProperty({}, left[rightKey], right[rightKey]) : IsOptional(right[rightKey]) ? IsInfer(right[rightKey]) ? ExtendsTrue(exports_memory.Assign(inferred, { [right[rightKey].name]: right[rightKey].extends })) : ExtendsTrue(inferred) : ExtendsFalse();
|
|
4077
|
+
}
|
|
4078
|
+
const checked = exports_guard.Values(properties2).every((result) => IsExtendsTrueLike(result));
|
|
4079
|
+
const extracted = checked ? ExtractInferredProperties(exports_guard.Keys(properties2), properties2) : {};
|
|
4080
|
+
return checked ? ExtendsTrue(extracted) : ExtendsFalse();
|
|
4081
|
+
}
|
|
4082
|
+
function ExtendsProperties(inferred, left, right) {
|
|
4083
|
+
const compared = ExtendsPropertiesComparer(inferred, left, right);
|
|
4084
|
+
return IsExtendsTrueLike(compared) ? ExtendsTrue(exports_memory.Assign(inferred, compared.inferred)) : ExtendsFalse();
|
|
4085
|
+
}
|
|
4086
|
+
function ExtendsObjectToObject(inferred, left, right) {
|
|
4087
|
+
return ExtendsProperties(inferred, left, right);
|
|
4088
|
+
}
|
|
4089
|
+
function RecordMergeInferred(left, right) {
|
|
4090
|
+
return exports_guard.Keys(right).reduce((result, key) => {
|
|
4091
|
+
return {
|
|
4092
|
+
...result,
|
|
4093
|
+
[key]: exports_guard.HasPropertyKey(left, key) ? IsUnion(result[key]) ? Union([...result[key].anyOf, right[key]]) : Union([left[key], right[key]]) : right[key]
|
|
4094
|
+
};
|
|
4095
|
+
}, left);
|
|
4096
|
+
}
|
|
4097
|
+
function ExtendsRecordComparer(properties2, keys, type, result) {
|
|
4098
|
+
return exports_guard.ShiftLeft(keys, (left, right) => Match3(ExtendsLeft({}, properties2[left], type), (inferred) => ExtendsRecordComparer(properties2, right, type, RecordMergeInferred(result, inferred)), () => ExtendsFalse()), () => ExtendsTrue(result));
|
|
4099
|
+
}
|
|
4100
|
+
function ExtendsObjectToRecord(inferred, properties2, _pattern, value) {
|
|
4101
|
+
const keys = exports_guard.Keys(properties2);
|
|
4102
|
+
const result = ExtendsRecordComparer(properties2, keys, value, inferred);
|
|
4103
|
+
return result;
|
|
4104
|
+
}
|
|
4105
|
+
function ExtendsObject(inferred, left, right) {
|
|
4106
|
+
return IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) : IsObject3(right) ? ExtendsObjectToObject(inferred, left, right.properties) : ExtendsRight(inferred, _Object_(left), right);
|
|
4107
|
+
}
|
|
4108
|
+
|
|
4109
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/record.mjs
|
|
4110
|
+
function FromObject8(inferred, properties2) {
|
|
4111
|
+
return exports_guard.IsEqual(exports_guard.Keys(properties2).length, 0) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
4112
|
+
}
|
|
4113
|
+
function FromRecord2(inferred, _leftKey, leftValue, _rightKey, rightValue) {
|
|
4114
|
+
return ExtendsLeft(inferred, leftValue, rightValue);
|
|
4115
|
+
}
|
|
4116
|
+
function ExtendsRecord(inferred, leftPattern, leftValue, right) {
|
|
4117
|
+
return IsRecord(right) ? FromRecord2(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) : IsObject3(right) ? FromObject8(inferred, right.properties) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
4118
|
+
}
|
|
4119
|
+
|
|
4120
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/string.mjs
|
|
4121
|
+
function ExtendsString(inferred, left, right) {
|
|
4122
|
+
return IsString4(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4123
|
+
}
|
|
4124
|
+
|
|
4125
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/symbol.mjs
|
|
4126
|
+
function ExtendsSymbol(inferred, left, right) {
|
|
4127
|
+
return IsSymbol3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/template_literal.mjs
|
|
4131
|
+
function ExtendsTemplateLiteral(inferred, left, right) {
|
|
4132
|
+
const evaluated = EvaluateTemplateLiteral(left);
|
|
4133
|
+
return ExtendsLeft(inferred, evaluated, right);
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/inference.mjs
|
|
4137
|
+
function Inferrable(name, type) {
|
|
4138
|
+
return exports_memory.Create({ "~kind": "Inferrable" }, { name, type }, {});
|
|
4139
|
+
}
|
|
4140
|
+
function IsInferable(value) {
|
|
4141
|
+
return exports_guard.IsObject(value) && exports_guard.HasPropertyKey(value, "~kind") && exports_guard.HasPropertyKey(value, "name") && exports_guard.HasPropertyKey(value, "type") && exports_guard.IsEqual(value["~kind"], "Inferrable") && exports_guard.IsString(value.name) && exports_guard.IsObject(value.type);
|
|
4142
|
+
}
|
|
4143
|
+
function TryRestInferable(type) {
|
|
4144
|
+
return IsRest(type) ? IsInfer(type.items) ? IsArray3(type.items.extends) ? Inferrable(type.items.name, type.items.extends.items) : IsUnknown(type.items.extends) ? Inferrable(type.items.name, type.items.extends) : undefined : Unreachable() : undefined;
|
|
4145
|
+
}
|
|
4146
|
+
function TryInferable(type) {
|
|
4147
|
+
return IsInfer(type) ? Inferrable(type.name, type.extends) : undefined;
|
|
4148
|
+
}
|
|
4149
|
+
function TryInferResults(rest3, right) {
|
|
4150
|
+
const result = [];
|
|
4151
|
+
for (const head of rest3) {
|
|
4152
|
+
if (!IsExtendsTrueLike(ExtendsLeft({}, head, right)))
|
|
4153
|
+
return;
|
|
4154
|
+
result.push(head);
|
|
4155
|
+
}
|
|
4156
|
+
return result;
|
|
4157
|
+
}
|
|
4158
|
+
function InferTupleResult(inferred, name, left, right) {
|
|
4159
|
+
const results = TryInferResults(left, right);
|
|
4160
|
+
return exports_guard.IsArray(results) ? ExtendsTrue(exports_memory.Assign(inferred, { [name]: Tuple(results) })) : ExtendsFalse();
|
|
4161
|
+
}
|
|
4162
|
+
function InferUnionResult(inferred, name, left, right) {
|
|
4163
|
+
const results = TryInferResults(left, right);
|
|
4164
|
+
return exports_guard.IsArray(results) ? ExtendsTrue(exports_memory.Assign(inferred, { [name]: Union(results) })) : ExtendsFalse();
|
|
4165
|
+
}
|
|
4166
|
+
|
|
4167
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/tuple.mjs
|
|
4168
|
+
function Reverse(types) {
|
|
4169
|
+
return [...types].reverse();
|
|
4170
|
+
}
|
|
4171
|
+
function ApplyReverse(types, reversed) {
|
|
4172
|
+
return reversed ? Reverse(types) : types;
|
|
4173
|
+
}
|
|
4174
|
+
function Reversed(types) {
|
|
4175
|
+
const first = types.length > 0 ? types[0] : undefined;
|
|
4176
|
+
const inferrable = IsSchema(first) ? TryRestInferable(first) : undefined;
|
|
4177
|
+
return IsSchema(inferrable);
|
|
4178
|
+
}
|
|
4179
|
+
function ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {
|
|
4180
|
+
return Match3(ExtendsLeft(inferred, left, right), (checkInferred) => Elements(checkInferred, reversed, leftRest, rightRest), () => ExtendsFalse());
|
|
4181
|
+
}
|
|
4182
|
+
function ElementsLeft(inferred, reversed, leftRest, right, rightRest) {
|
|
4183
|
+
const inferable = TryRestInferable(right);
|
|
4184
|
+
return IsInferable(inferable) ? InferTupleResult(inferred, inferable["name"], ApplyReverse(leftRest, reversed), inferable["type"]) : exports_guard.ShiftLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => ExtendsFalse());
|
|
4185
|
+
}
|
|
4186
|
+
function ElementsRight(inferred, reversed, leftRest, rightRest) {
|
|
4187
|
+
return exports_guard.ShiftLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => exports_guard.IsEqual(leftRest.length, 0) ? ExtendsTrue(inferred) : ExtendsFalse());
|
|
4188
|
+
}
|
|
4189
|
+
function Elements(inferred, reversed, leftRest, rightRest) {
|
|
4190
|
+
return ElementsRight(inferred, reversed, leftRest, rightRest);
|
|
4191
|
+
}
|
|
4192
|
+
function ExtendsTupleToTuple(inferred, left, right) {
|
|
4193
|
+
const instantiatedRight = InstantiateElements(inferred, State([], []), right);
|
|
4194
|
+
const reversed = Reversed(instantiatedRight);
|
|
4195
|
+
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
4196
|
+
}
|
|
4197
|
+
function ExtendsTupleToArrayReduce(inferred, left, right) {
|
|
4198
|
+
for (const head of left) {
|
|
4199
|
+
const result = ExtendsLeft(inferred, head, right);
|
|
4200
|
+
if (!IsExtendsTrueLike(result))
|
|
4201
|
+
return result;
|
|
4202
|
+
inferred = result.inferred;
|
|
4203
|
+
}
|
|
4204
|
+
return ExtendsTrue(inferred);
|
|
4205
|
+
}
|
|
4206
|
+
function ExtendsTupleToArray(inferred, left, right) {
|
|
4207
|
+
const inferrable = TryInferable(right);
|
|
4208
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : ExtendsTupleToArrayReduce(inferred, left, right);
|
|
4209
|
+
}
|
|
4210
|
+
function ExtendsTuple(inferred, left, right) {
|
|
4211
|
+
const instantiatedLeft = InstantiateElements(inferred, State([], []), left);
|
|
4212
|
+
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray3(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/undefined.mjs
|
|
4216
|
+
function ExtendsUndefined(inferred, left, right) {
|
|
4217
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined3(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4218
|
+
}
|
|
4219
|
+
|
|
4220
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/union.mjs
|
|
4221
|
+
function ExtendsUnionSome(inferred, type, unionTypes) {
|
|
4222
|
+
return exports_guard.ShiftLeft(unionTypes, (head, tail) => Match3(ExtendsLeft(inferred, type, head), (inferred2) => ExtendsTrue(inferred2), () => ExtendsUnionSome(inferred, type, tail)), () => ExtendsFalse());
|
|
4223
|
+
}
|
|
4224
|
+
function ExtendsUnionLeft(inferred, left, right) {
|
|
4225
|
+
return exports_guard.ShiftLeft(left, (head, tail) => Match3(ExtendsUnionSome(inferred, head, right), (inferred2) => ExtendsUnionLeft(inferred2, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
4226
|
+
}
|
|
4227
|
+
function ExtendsUnion2(inferred, left, right) {
|
|
4228
|
+
const inferrable = TryInferable(right);
|
|
4229
|
+
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable.name, left, inferrable.type) : IsUnion(right) ? ExtendsUnionLeft(inferred, left, right.anyOf) : ExtendsUnionLeft(inferred, left, [right]);
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4232
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/unknown.mjs
|
|
4233
|
+
function ExtendsUnknown(inferred, left, right) {
|
|
4234
|
+
return IsInfer(right) ? ExtendsRight(inferred, left, right) : IsAny(right) ? ExtendsTrue(inferred) : IsUnknown(right) ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
4235
|
+
}
|
|
4236
|
+
|
|
4237
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/void.mjs
|
|
4238
|
+
function ExtendsVoid(inferred, left, right) {
|
|
4239
|
+
return IsVoid(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/extends_left.mjs
|
|
4243
|
+
function ExtendsLeft(inferred, left, right) {
|
|
4244
|
+
return IsAny(left) ? ExtendsAny(inferred, left, right) : IsArray3(left) ? ExtendsArray(inferred, left, left.items, right) : IsBigInt3(left) ? ExtendsBigInt(inferred, left, right) : IsBoolean4(left) ? ExtendsBoolean(inferred, left, right) : IsConstructor3(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) : IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) : IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) : IsFunction3(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) : IsInteger3(left) ? ExtendsInteger(inferred, left, right) : IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) : IsLiteral(left) ? ExtendsLiteral(inferred, left, right) : IsNever(left) ? ExtendsNever(inferred, left, right) : IsNull3(left) ? ExtendsNull(inferred, left, right) : IsNumber4(left) ? ExtendsNumber(inferred, left, right) : IsObject3(left) ? ExtendsObject(inferred, left.properties, right) : IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) : IsString4(left) ? ExtendsString(inferred, left, right) : IsSymbol3(left) ? ExtendsSymbol(inferred, left, right) : IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) : IsTuple(left) ? ExtendsTuple(inferred, left.items, right) : IsUndefined3(left) ? ExtendsUndefined(inferred, left, right) : IsUnion(left) ? ExtendsUnion2(inferred, left.anyOf, right) : IsUnknown(left) ? ExtendsUnknown(inferred, left, right) : IsVoid(left) ? ExtendsVoid(inferred, left, right) : ExtendsFalse();
|
|
4245
|
+
}
|
|
4246
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/cyclic/extends.mjs
|
|
4247
|
+
function FromRef3(_ref) {
|
|
4248
|
+
return Any();
|
|
4249
|
+
}
|
|
4250
|
+
function FromProperties3(properties2) {
|
|
4251
|
+
return exports_guard.Keys(properties2).reduce((result, key) => {
|
|
4252
|
+
return { ...result, [key]: FromType17(properties2[key]) };
|
|
4253
|
+
}, {});
|
|
4254
|
+
}
|
|
4255
|
+
function FromTypes5(types) {
|
|
4256
|
+
return types.reduce((result, left) => {
|
|
4257
|
+
return [...result, FromType17(left)];
|
|
4258
|
+
}, []);
|
|
4259
|
+
}
|
|
4260
|
+
function FromType17(type) {
|
|
4261
|
+
return IsRef(type) ? FromRef3(type.$ref) : IsArray3(type) ? _Array_(FromType17(type.items), ArrayOptions(type)) : IsConstructor3(type) ? Constructor(FromTypes5(type.parameters), FromType17(type.instanceType)) : IsFunction3(type) ? _Function_(FromTypes5(type.parameters), FromType17(type.returnType)) : IsIntersect(type) ? Intersect(FromTypes5(type.allOf)) : IsObject3(type) ? _Object_(FromProperties3(type.properties)) : IsRecord(type) ? Record(RecordKey(type), FromType17(RecordValue(type))) : IsUnion(type) ? Union(FromTypes5(type.anyOf)) : IsTuple(type) ? Tuple(FromTypes5(type.items)) : type;
|
|
4262
|
+
}
|
|
4263
|
+
function CyclicAnyFromParameters(defs, ref2) {
|
|
4264
|
+
return ref2 in defs ? FromType17(defs[ref2]) : Unknown();
|
|
4265
|
+
}
|
|
4266
|
+
function CyclicExtends(type) {
|
|
4267
|
+
return CyclicAnyFromParameters(type.$defs, type.$ref);
|
|
4268
|
+
}
|
|
4269
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/extends/extends.mjs
|
|
4270
|
+
function Canonical(type) {
|
|
4271
|
+
return IsCyclic(type) ? CyclicExtends(type) : IsUnsafe(type) ? Unknown() : type;
|
|
4272
|
+
}
|
|
4273
|
+
function Extends(inferred, left, right) {
|
|
4274
|
+
const canonicalLeft = Canonical(left);
|
|
4275
|
+
const canonicalRight = Canonical(right);
|
|
4276
|
+
return ExtendsLeft(inferred, canonicalLeft, canonicalRight);
|
|
4277
|
+
}
|
|
4278
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/compare.mjs
|
|
4279
|
+
var CompareResultEqual = 0;
|
|
4280
|
+
var CompareResultDisjoint = 1;
|
|
4281
|
+
var CompareResultLeftInside = 2;
|
|
4282
|
+
var CompareResultRightInside = 3;
|
|
4283
|
+
function Compare(left, right) {
|
|
4284
|
+
const extendsCheck = [Extends({}, left, right), Extends({}, right, left)];
|
|
4285
|
+
return exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultEqual : exports_result.IsExtendsTrueLike(extendsCheck[0]) && exports_result.IsExtendsFalse(extendsCheck[1]) ? CompareResultLeftInside : exports_result.IsExtendsFalse(extendsCheck[0]) && exports_result.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultRightInside : CompareResultDisjoint;
|
|
4286
|
+
}
|
|
4287
|
+
|
|
4288
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/evaluate/broaden.mjs
|
|
4289
|
+
function BroadenFilter(type, types, result = [], all = types) {
|
|
4290
|
+
return exports_guard.ShiftLeft(types, (left, right) => {
|
|
4291
|
+
const compare = Compare(type, left);
|
|
4292
|
+
return exports_guard.IsEqual(compare, CompareResultLeftInside) || exports_guard.IsEqual(compare, CompareResultEqual) ? all : exports_guard.IsEqual(compare, CompareResultDisjoint) ? BroadenFilter(type, right, [...result, left], all) : BroadenFilter(type, right, result, all);
|
|
4293
|
+
}, () => [...result, type]);
|
|
4294
|
+
}
|
|
4295
|
+
function BroadenType(type, types, result) {
|
|
4296
|
+
const evaluated = EvaluateType(type);
|
|
4297
|
+
return IsAny(evaluated) ? [evaluated] : IsUnknown(evaluated) ? [evaluated] : IsNever(evaluated) ? BroadenTypes(types, result) : IsObject3(evaluated) ? BroadenTypes(types, [...result, evaluated]) : BroadenTypes(types, BroadenFilter(evaluated, result));
|
|
4298
|
+
}
|
|
4299
|
+
function BroadenTypes(types, result = []) {
|
|
4300
|
+
return exports_guard.ShiftLeft(types, (left, right) => BroadenType(left, right, result), () => result);
|
|
4301
|
+
}
|
|
4302
|
+
function Broaden(types) {
|
|
4303
|
+
const broadened = BroadenTypes(types);
|
|
4304
|
+
const flattened = Flatten(broadened);
|
|
4305
|
+
return flattened;
|
|
4306
|
+
}
|
|
4307
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs
|
|
4308
|
+
function CollectDistributionNames(expression, result = []) {
|
|
4309
|
+
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? IsRef(expression.parameters[0]) ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]["$ref"]])) : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result)) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? IsDeferred(expression.parameters[1]) && exports_guard.IsEqual(expression.parameters[1].action, "KeyOf") && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]["$ref"]] : result : result;
|
|
4310
|
+
}
|
|
4311
|
+
function BuildDistributionArray(parameters2, names) {
|
|
4312
|
+
return parameters2.reduce((result, left) => [...result, names.includes(left.name)], []);
|
|
4313
|
+
}
|
|
4314
|
+
function ZipDistributionArray(arguments_, distributionArray, result = []) {
|
|
4315
|
+
return exports_guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => exports_guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);
|
|
4316
|
+
}
|
|
4317
|
+
function CanonicalArgument(type) {
|
|
4318
|
+
return IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) : IsEnum(type) ? EvaluateEnum(type.enum) : type;
|
|
4319
|
+
}
|
|
4320
|
+
function Expand(type) {
|
|
4321
|
+
const canonicalArgument = CanonicalArgument(type);
|
|
4322
|
+
return IsUnion(canonicalArgument) ? [...canonicalArgument.anyOf] : [canonicalArgument];
|
|
4323
|
+
}
|
|
4324
|
+
function Append(current, type) {
|
|
4325
|
+
return current.reduce((result, left) => [...result, [...left, type]], []);
|
|
4326
|
+
}
|
|
4327
|
+
function Cross(current, variants) {
|
|
4328
|
+
return variants.reduce((result, left) => {
|
|
4329
|
+
return [...result, ...Append(current, left)];
|
|
4330
|
+
}, []);
|
|
4331
|
+
}
|
|
4332
|
+
function Distribute2(zipped) {
|
|
4333
|
+
return zipped.reduce((result, left) => {
|
|
4334
|
+
return exports_guard.IsEqual(left[0], true) ? Cross(result, Expand(left[1])) : Cross(result, [left[1]]);
|
|
4335
|
+
}, [[]]);
|
|
4336
|
+
}
|
|
4337
|
+
function DistributeArguments(parameters2, arguments_, expression) {
|
|
4338
|
+
const distributionNames = CollectDistributionNames(expression);
|
|
4339
|
+
const distributionArray = BuildDistributionArray(parameters2, distributionNames);
|
|
4340
|
+
const zippedArguments = ZipDistributionArray(arguments_, distributionArray);
|
|
4341
|
+
return IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Conditional") ? Distribute2(zippedArguments) : IsDeferred(expression) && exports_guard.IsEqual(expression.action, "Mapped") ? Distribute2(zippedArguments) : [arguments_];
|
|
4342
|
+
}
|
|
4343
|
+
|
|
4344
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/call/resolve_target.mjs
|
|
4345
|
+
function FromNotResolvable() {
|
|
4346
|
+
return ["(not-resolvable)", Never()];
|
|
4347
|
+
}
|
|
4348
|
+
function FromNotGeneric() {
|
|
4349
|
+
return ["(not-generic)", Never()];
|
|
4350
|
+
}
|
|
4351
|
+
function FromGeneric(name, parameters2, expression) {
|
|
4352
|
+
return [name, Generic(parameters2, expression)];
|
|
4353
|
+
}
|
|
4354
|
+
function FromRef4(context, ref2, arguments_) {
|
|
4355
|
+
return ref2 in context ? FromType18(context, ref2, context[ref2], arguments_) : FromNotResolvable();
|
|
4356
|
+
}
|
|
4357
|
+
function FromType18(context, name, target2, arguments_) {
|
|
4358
|
+
return IsGeneric(target2) ? FromGeneric(name, target2.parameters, target2.expression) : IsRef(target2) ? FromRef4(context, target2.$ref, arguments_) : FromNotGeneric();
|
|
4359
|
+
}
|
|
4360
|
+
function ResolveTarget(context, target2, arguments_) {
|
|
4361
|
+
return FromType18(context, "(anonymous)", target2, arguments_);
|
|
4362
|
+
}
|
|
4363
|
+
|
|
4364
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs
|
|
4365
|
+
function AssertArgumentExtends(name, type, extends_) {
|
|
4366
|
+
if (IsInfer(type) || IsCall(type) || exports_result.IsExtendsTrueLike(Extends({}, type, extends_)))
|
|
4367
|
+
return;
|
|
4368
|
+
const cause = { parameter: name, expect: extends_, actual: type };
|
|
4369
|
+
throw new Error(`Argument for parameter ${name} does not satisfy constraint`, { cause });
|
|
4370
|
+
}
|
|
4371
|
+
function BindArgument(context, state, name, extends_, type) {
|
|
4372
|
+
const instantiatedArgument = InstantiateType(context, state, type);
|
|
4373
|
+
AssertArgumentExtends(name, instantiatedArgument, extends_);
|
|
4374
|
+
return exports_memory.Assign(context, { [name]: instantiatedArgument });
|
|
4375
|
+
}
|
|
4376
|
+
function BindArguments(context, state, parameterLeft, parameterRight, arguments_) {
|
|
4377
|
+
const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);
|
|
4378
|
+
const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);
|
|
4379
|
+
return exports_guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft["name"], instantiatedExtends, instantiatedEquals), state, parameterRight, []));
|
|
4380
|
+
}
|
|
4381
|
+
function BindParameters(context, state, parameters2, arguments_) {
|
|
4382
|
+
return exports_guard.ShiftLeft(parameters2, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);
|
|
4383
|
+
}
|
|
4384
|
+
function ResolveArgumentsContext(context, state, parameters2, arguments_) {
|
|
4385
|
+
return BindParameters(context, state, parameters2, arguments_);
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4388
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/call/instantiate.mjs
|
|
4389
|
+
var instantiationDepth = 0;
|
|
4390
|
+
var instantiationCount = 0;
|
|
4391
|
+
function InstantiationAssert() {
|
|
4392
|
+
if (exports_guard.IsLessThan(instantiationCount, exports_settings.Get().maxInstantiationCount))
|
|
4393
|
+
return;
|
|
4394
|
+
throw Error("Type instantiation is excessively deep and possibly infinite");
|
|
4395
|
+
}
|
|
4396
|
+
function InstantiationIncrement() {
|
|
4397
|
+
InstantiationAssert();
|
|
4398
|
+
instantiationCount++;
|
|
4399
|
+
instantiationDepth++;
|
|
4400
|
+
}
|
|
4401
|
+
function InstantiationDecrement() {
|
|
4402
|
+
instantiationDepth--;
|
|
4403
|
+
if (exports_guard.IsEqual(instantiationDepth, 0))
|
|
4404
|
+
instantiationCount = 0;
|
|
4405
|
+
}
|
|
4406
|
+
function Peek(state) {
|
|
4407
|
+
const result = exports_guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : "";
|
|
4408
|
+
return result;
|
|
4409
|
+
}
|
|
4410
|
+
function IsTailCall(state, name) {
|
|
4411
|
+
const result = exports_guard.IsEqual(Peek(state), name);
|
|
4412
|
+
return result;
|
|
4413
|
+
}
|
|
4414
|
+
function CallDispatch(context, state, target2, parameters2, expression, arguments_) {
|
|
4415
|
+
InstantiationIncrement();
|
|
4416
|
+
try {
|
|
4417
|
+
const argumentsContext = ResolveArgumentsContext(context, state, parameters2, arguments_);
|
|
4418
|
+
const returnType = InstantiateType(argumentsContext, State([...state["callstack"], target2["$ref"]], state["visited"]), expression);
|
|
4419
|
+
return InstantiateType(argumentsContext, State([], []), returnType);
|
|
4420
|
+
} finally {
|
|
4421
|
+
InstantiationDecrement();
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
function CallDistributed(context, state, target2, parameters2, expression, distributedArguments) {
|
|
4425
|
+
return distributedArguments.reduce((result, arguments_) => {
|
|
4426
|
+
const returnType = CallDispatch(context, state, target2, parameters2, expression, arguments_);
|
|
4427
|
+
return [...result, returnType];
|
|
4428
|
+
}, []);
|
|
4429
|
+
}
|
|
4430
|
+
function CallImmediate(context, state, target2, parameters2, expression, arguments_) {
|
|
4431
|
+
const distributedArguments = DistributeArguments(parameters2, arguments_, expression);
|
|
4432
|
+
const returnTypes = CallDistributed(context, state, target2, parameters2, expression, distributedArguments);
|
|
4433
|
+
const result = exports_guard.IsEqual(returnTypes.length, 1) ? returnTypes[0] : EvaluateUnion(returnTypes);
|
|
4434
|
+
return result;
|
|
4435
|
+
}
|
|
4436
|
+
function CallInstantiate(context, state, target2, arguments_) {
|
|
4437
|
+
const instantiatedArguments = InstantiateTypes(context, state, arguments_);
|
|
4438
|
+
const resolved = ResolveTarget(context, target2, arguments_);
|
|
4439
|
+
const name = resolved[0];
|
|
4440
|
+
const type = resolved[1];
|
|
4441
|
+
const result = IsGeneric(type) ? IsTailCall(state, name) ? CallConstruct(Ref(name), instantiatedArguments) : CallImmediate(context, state, Ref(name), type.parameters, type.expression, instantiatedArguments) : CallConstruct(target2, instantiatedArguments);
|
|
4442
|
+
return result;
|
|
4443
|
+
}
|
|
4444
|
+
|
|
4445
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/types/call.mjs
|
|
4446
|
+
function CallConstruct(target2, arguments_) {
|
|
4447
|
+
return exports_memory.Create({ ["~kind"]: "Call" }, { type: "call", target: target2, arguments: arguments_ }, {});
|
|
4448
|
+
}
|
|
4449
|
+
function Call2(target2, arguments_) {
|
|
4450
|
+
return CallInstantiate({}, State([], []), target2, arguments_);
|
|
4451
|
+
}
|
|
4452
|
+
function IsCall(value) {
|
|
4453
|
+
return IsKind(value, "Call");
|
|
4454
|
+
}
|
|
4455
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/ref/instantiate.mjs
|
|
4456
|
+
function RefInstantiate(context, state, type, ref2) {
|
|
4457
|
+
return state.visited.includes(ref2) ? type : (ref2 in context) ? InstantiateType(context, State(state["callstack"], [...state["visited"], ref2]), context[ref2]) : type;
|
|
4458
|
+
}
|
|
4459
|
+
|
|
4460
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/rest/spread.mjs
|
|
4461
|
+
function SpreadElement(type) {
|
|
4462
|
+
const result = IsRest(type) ? IsTuple(type.items) ? RestSpread(type.items.items) : IsInfer(type.items) ? [type] : IsRef(type.items) ? [type] : [Never()] : [type];
|
|
4463
|
+
return result;
|
|
4464
|
+
}
|
|
4465
|
+
function RestSpread(types) {
|
|
4466
|
+
const result = types.reduce((result2, left) => {
|
|
4467
|
+
return [...result2, ...SpreadElement(left)];
|
|
4468
|
+
}, []);
|
|
4469
|
+
return result;
|
|
4470
|
+
}
|
|
4471
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/instantiate.mjs
|
|
4472
|
+
function State(callstack, visited) {
|
|
4473
|
+
return { callstack, visited };
|
|
4474
|
+
}
|
|
4475
|
+
function CanInstantiate(types) {
|
|
4476
|
+
return exports_guard.ShiftLeft(types, (left, right) => IsRef(left) ? false : CanInstantiate(right), () => true);
|
|
4477
|
+
}
|
|
4478
|
+
function InstantiateProperties(context, state, properties2) {
|
|
4479
|
+
return exports_guard.Keys(properties2).reduce((result, key) => {
|
|
4480
|
+
return { ...result, [key]: InstantiateType(context, state, properties2[key]) };
|
|
4481
|
+
}, {});
|
|
4482
|
+
}
|
|
4483
|
+
function InstantiateElements(context, state, types) {
|
|
4484
|
+
const elements = InstantiateTypes(context, state, types);
|
|
4485
|
+
const result = RestSpread(elements);
|
|
4486
|
+
return result;
|
|
4487
|
+
}
|
|
4488
|
+
function InstantiateTypes(context, state, types) {
|
|
4489
|
+
return types.map((type) => InstantiateType(context, state, type));
|
|
4490
|
+
}
|
|
4491
|
+
function WithModifiers(type, instantiatedType) {
|
|
4492
|
+
const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;
|
|
4493
|
+
const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;
|
|
4494
|
+
const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;
|
|
4495
|
+
return withImmutable;
|
|
4496
|
+
}
|
|
4497
|
+
function InstantiateDeferred(context, state, action, parameters2, options) {
|
|
4498
|
+
return exports_guard.IsEqual(action, "AddImmutable") ? AddImmutableInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "RemoveImmutable") ? RemoveImmutableInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "AddReadonly") ? AddReadonlyInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "RemoveReadonly") ? RemoveReadonlyInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "AddOptional") ? AddOptionalInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "RemoveOptional") ? RemoveOptionalInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters2[0], parameters2[1], parameters2[2], parameters2[3], options) : exports_guard.IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters2[0], parameters2[1], parameters2[2], parameters2[3], options) : exports_guard.IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters2[0], parameters2[1], options) : exports_guard.IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters2[0], options) : exports_guard.IsEqual(action, "With") ? WithInstantiate(context, state, parameters2[0], parameters2[1]) : Deferred(action, parameters2, options);
|
|
4499
|
+
}
|
|
4500
|
+
function InstantiateImmediate(context, state, type) {
|
|
4501
|
+
const instantiatedType = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray3(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor3(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsFunction3(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsObject3(type) ? _Object_(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
4502
|
+
const withModifiers = WithModifiers(type, instantiatedType);
|
|
4503
|
+
return withModifiers;
|
|
4504
|
+
}
|
|
4505
|
+
function InstantiateType(context, state, type) {
|
|
4506
|
+
const result = IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : InstantiateImmediate(context, state, type);
|
|
4507
|
+
return result;
|
|
4508
|
+
}
|
|
4509
|
+
function Instantiate(context, type) {
|
|
4510
|
+
return InstantiateType(context, State([], []), type);
|
|
4511
|
+
}
|
|
4512
|
+
|
|
4513
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs
|
|
4514
|
+
function AddOptionalAction(type, options) {
|
|
4515
|
+
const result = exports_memory.Update(type, { "~optional": true }, options);
|
|
4516
|
+
return result;
|
|
4517
|
+
}
|
|
4518
|
+
function AddOptionalInstantiate(context, state, type, options) {
|
|
4519
|
+
const instantiatedType = InstantiateType(context, state, type);
|
|
4520
|
+
return AddOptionalAction(instantiatedType, options);
|
|
4521
|
+
}
|
|
4522
|
+
|
|
4523
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/action/_add_optional.mjs
|
|
4524
|
+
function AddOptionalDeferred(type, options = {}) {
|
|
4525
|
+
return Deferred("AddOptional", [type], options);
|
|
4526
|
+
}
|
|
4527
|
+
function AddOptional(type, options = {}) {
|
|
4528
|
+
return AddOptionalAction(type, options);
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/priority/priority.mjs
|
|
4532
|
+
function Comparer(left, right) {
|
|
4533
|
+
const compareResult = Compare(left, right);
|
|
4534
|
+
return exports_guard.IsEqual(compareResult, CompareResultRightInside) ? 1 : exports_guard.IsEqual(compareResult, CompareResultDisjoint) ? 1 : 0;
|
|
4535
|
+
}
|
|
4536
|
+
function Insert(type, types, result = []) {
|
|
4537
|
+
return exports_guard.ShiftLeft(types, (left, right) => exports_guard.IsEqual(Comparer(type, left), 1) ? Insert(type, right, [...result, left]) : [...result, type, ...types], () => [...result, type]);
|
|
4538
|
+
}
|
|
4539
|
+
function Sort(types, result = []) {
|
|
4540
|
+
return exports_guard.ShiftLeft(types, (left, right) => Sort(right, Insert(left, result)), () => result);
|
|
4541
|
+
}
|
|
4542
|
+
function Priority(types) {
|
|
4543
|
+
const result = Sort(types);
|
|
4544
|
+
return result;
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4547
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs
|
|
4548
|
+
function IsTemplateLiteralPattern(pattern) {
|
|
4549
|
+
const types = ParsePatternIntoTypes(pattern);
|
|
4550
|
+
const result = exports_guard.IsEqual(types.length, 0) ? false : true;
|
|
4551
|
+
return result;
|
|
4552
|
+
}
|
|
4553
|
+
// ../../node_modules/.bun/typebox@1.4.4/node_modules/typebox/build/type/script/script.mjs
|
|
4554
|
+
function Script2(...args) {
|
|
4555
|
+
const [context, input, options] = exports_arguments.Match(args, {
|
|
4556
|
+
2: (script, options2) => exports_guard.IsString(script) ? [{}, script, options2] : [script, options2, {}],
|
|
4557
|
+
3: (context2, script, options2) => [context2, script, options2],
|
|
4558
|
+
1: (script) => [{}, script, {}]
|
|
4559
|
+
});
|
|
4560
|
+
const result = Script(input);
|
|
4561
|
+
const parsed = exports_guard.IsArray(result) && exports_guard.IsEqual(result.length, 2) ? InstantiateType(context, State([], []), result[0]) : Never();
|
|
4562
|
+
return exports_memory.Update(parsed, {}, options);
|
|
4563
|
+
}
|
|
4564
|
+
export { exports_arguments, exports_guard, exports_emit, exports_globals, guard_default, Get, exports_settings, Unreachable, exports_hash, exports_environment, Get2 as Get1, exports_memory, IsKind, IsSchema, Deferred, IsDeferred, _Array_, IsArray3 as IsArray, ArrayOptions, Constructor, IsConstructor3 as IsConstructor, ConstructorOptions, _Function_, IsFunction3 as IsFunction, FunctionOptions, Ref, IsRef, Generic, IsGeneric, Any, IsAny, NeverPattern, Never, IsNever, AddOptionalDeferred, AddOptional, Optional, IsOptional, RequiredArray, PropertyKeys, PropertyValues, _Object_, IsObject3 as IsObject, ObjectOptions, Unknown, IsUnknown, Cyclic, IsCyclic, CyclicOptions, Unsafe, IsUnsafe, Infer, IsInfer, Dependent, IsDependent, DependentOptions, IsTypeScriptEnumLike, TypeScriptEnumToEnumValues, IsEnumValue, Enum, IsEnum, Intersect, IsIntersect, IntersectOptions, EncodeBuilder, DecodeBuilder, Codec, Decode, Encode, IsCodec, Immutable, IsImmutable, AddReadonlyDeferred, AddReadonly, Readonly, IsReadonly, RefineAdd, Refine, IsRefinement, IsRefine, BigIntPattern, BigInt2 as BigInt, IsBigInt3 as IsBigInt, Boolean2 as Boolean, IsBoolean4 as IsBoolean, Identifier, IsIdentifier2 as IsIdentifier, IntegerPattern, Integer, IsInteger3 as IsInteger, InvalidLiteralValue, LiteralTypeName, Literal, IsLiteralValue, IsLiteralBigInt, IsLiteralBoolean, IsLiteralNumber, IsLiteralString, IsLiteral, Null, IsNull3 as IsNull, NumberPattern, Number2 as Number, IsNumber4 as IsNumber, Symbol, IsSymbol3 as IsSymbol, Parameter, IsParameter, StringPattern, String2 as String, IsString4 as IsString, Union, IsUnion, UnionOptions, ParsePatternIntoTypes, IsTemplateLiteralFinite, TemplateLiteralCreate, TemplateLiteralDecodeUnsafe, TemplateLiteralDecode, Tuple, IsTuple, TupleOptions, EvaluatePropertyIntersect, EvaluatePropertyUnion, Composite, Narrow, Distribute, EvaluateDependent, EvaluateEnum, EvaluateIntersect, EvaluateTemplateLiteral, EvaluateUnion, EvaluateType, EvaluateUnionFast, Flatten, RecordAction, RecordInstantiate, IntegerKey, NumberKey, StringKey, RecordDeferred, Record, RecordFromPattern, RecordPatternToType, RecordPattern, RecordKey, RecordValue, IsRecord, RecordOptions, Rest, IsRest, This, IsThis, Undefined, IsUndefined3 as IsUndefined, Void, IsVoid, ParseTemplateIntoTypes, TemplateLiteralEncode, TemplateLiteralDeferred, IsTemplateLiteralDeferred, TemplateLiteralFromTypes, TemplateLiteralFromString, TemplateLiteral2 as TemplateLiteral, IsTemplateLiteral, exports_result, InterfaceAction, InterfaceInstantiate, InterfaceDeferred, IsInterfaceDeferred, Interface, CyclicCheck, CyclicCandidates, CyclicDependencies, CyclicExtends, InstantiateCyclic, CyclicTarget, Extends, CompareResultEqual, CompareResultDisjoint, CompareResultLeftInside, CompareResultRightInside, Compare, Broaden, EvaluateAction, EvaluateInstantiate, CallConstruct, Call2 as Call, IsCall, CapitalizeDeferred, Capitalize, LowercaseDeferred, Lowercase, UncapitalizeDeferred, Uncapitalize, UppercaseDeferred, Uppercase, CapitalizeAction, LowercaseAction, UncapitalizeAction, UppercaseAction, CapitalizeInstantiate, LowercaseInstantiate, UncapitalizeInstantiate, UppercaseInstantiate, ConditionalDeferred, Conditional, ConditionalAction, ConditionalInstantiate, ConstructorParametersDeferred, ConstructorParameters, ConstructorParametersAction, ConstructorParametersInstantiate, ExcludeDeferred, Exclude, ExcludeAction, ExcludeInstantiate, ExtractDeferred, Extract, ExtractAction, ExtractInstantiate, KeysToIndexer, IndexDeferred, Index, CollapseToObject, ConvertToIntegerKey, IndexAction, IndexInstantiate, InstanceTypeDeferred, InstanceType, InstanceTypeAction, InstanceTypeInstantiate, KeyOfDeferred, KeyOf, KeyOfAction, KeyOfInstantiate, MappedDeferred, Mapped, MappedAction, MappedInstantiate, ModuleInstantiate, NonNullableDeferred, NonNullable, NonNullableAction, NonNullableInstantiate, OmitDeferred, Omit, OmitAction, OmitInstantiate, ParametersDeferred, Parameters, ParametersAction, ParametersInstantiate, PartialDeferred, Partial, PartialAction, PartialInstantiate, PickDeferred, Pick, PickAction, PickInstantiate, ReadonlyObjectDeferred, ReadonlyObject, ReadonlyType, ReadonlyObjectAction, ReadonlyObjectInstantiate, RefInstantiate, RemoveOptionalDeferred, RemoveOptional, RequiredDeferred, Required, RequiredAction, RequiredInstantiate, ReturnTypeDeferred, ReturnType, ReturnTypeAction, ReturnTypeInstantiate, WithDeferred, With, WithAction, WithInstantiate, Instantiate, AddImmutableDeferred, AddImmutable, RemoveImmutableDeferred, RemoveImmutable, RemoveReadonlyDeferred, RemoveReadonly, EvaluateDeferred, Evaluate2 as Evaluate, ModuleDeferred, Module, Priority, IsTemplateLiteralPattern, Script2 as Script };
|