@orion-js/services 4.0.0-next.2 → 4.0.0-next.3
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/LICENSE +21 -0
- package/dist/index.cjs +177 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +182 -200
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// node_modules/.pnpm/reflect-metadata@0.1.14/node_modules/reflect-metadata/Reflect.js
|
|
5
|
-
var
|
|
6
|
-
(function(
|
|
2
|
+
var Reflect;
|
|
3
|
+
(function(Reflect2) {
|
|
7
4
|
(function(factory) {
|
|
8
5
|
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : Function("return this;")();
|
|
9
|
-
var exporter = makeExporter(
|
|
6
|
+
var exporter = makeExporter(Reflect2);
|
|
10
7
|
if (typeof root.Reflect === "undefined") {
|
|
11
|
-
root.Reflect =
|
|
8
|
+
root.Reflect = Reflect2;
|
|
12
9
|
} else {
|
|
13
10
|
exporter = makeExporter(root.Reflect, exporter);
|
|
14
11
|
}
|
|
@@ -16,34 +13,26 @@ var Reflect2;
|
|
|
16
13
|
function makeExporter(target, previous) {
|
|
17
14
|
return function(key, value) {
|
|
18
15
|
if (typeof target[key] !== "function") {
|
|
19
|
-
Object.defineProperty(target, key, {
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value
|
|
23
|
-
});
|
|
16
|
+
Object.defineProperty(target, key, { configurable: true, writable: true, value });
|
|
24
17
|
}
|
|
25
|
-
if (previous)
|
|
18
|
+
if (previous)
|
|
19
|
+
previous(key, value);
|
|
26
20
|
};
|
|
27
21
|
}
|
|
28
|
-
__name(makeExporter, "makeExporter");
|
|
29
22
|
})(function(exporter) {
|
|
30
23
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
31
24
|
var supportsSymbol = typeof Symbol === "function";
|
|
32
25
|
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
33
26
|
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
34
27
|
var supportsCreate = typeof Object.create === "function";
|
|
35
|
-
var supportsProto = {
|
|
36
|
-
__proto__: []
|
|
37
|
-
} instanceof Array;
|
|
28
|
+
var supportsProto = { __proto__: [] } instanceof Array;
|
|
38
29
|
var downLevel = !supportsCreate && !supportsProto;
|
|
39
30
|
var HashMap = {
|
|
40
31
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
41
32
|
create: supportsCreate ? function() {
|
|
42
33
|
return MakeDictionary(/* @__PURE__ */ Object.create(null));
|
|
43
34
|
} : supportsProto ? function() {
|
|
44
|
-
return MakeDictionary({
|
|
45
|
-
__proto__: null
|
|
46
|
-
});
|
|
35
|
+
return MakeDictionary({ __proto__: null });
|
|
47
36
|
} : function() {
|
|
48
37
|
return MakeDictionary({});
|
|
49
38
|
},
|
|
@@ -66,148 +55,167 @@ var Reflect2;
|
|
|
66
55
|
var Metadata = new _WeakMap();
|
|
67
56
|
function decorate(decorators, target, propertyKey, attributes) {
|
|
68
57
|
if (!IsUndefined(propertyKey)) {
|
|
69
|
-
if (!IsArray(decorators))
|
|
70
|
-
|
|
71
|
-
if (!IsObject(
|
|
72
|
-
|
|
58
|
+
if (!IsArray(decorators))
|
|
59
|
+
throw new TypeError();
|
|
60
|
+
if (!IsObject(target))
|
|
61
|
+
throw new TypeError();
|
|
62
|
+
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
63
|
+
throw new TypeError();
|
|
64
|
+
if (IsNull(attributes))
|
|
65
|
+
attributes = void 0;
|
|
73
66
|
propertyKey = ToPropertyKey(propertyKey);
|
|
74
67
|
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
75
68
|
} else {
|
|
76
|
-
if (!IsArray(decorators))
|
|
77
|
-
|
|
69
|
+
if (!IsArray(decorators))
|
|
70
|
+
throw new TypeError();
|
|
71
|
+
if (!IsConstructor(target))
|
|
72
|
+
throw new TypeError();
|
|
78
73
|
return DecorateConstructor(decorators, target);
|
|
79
74
|
}
|
|
80
75
|
}
|
|
81
|
-
__name(decorate, "decorate");
|
|
82
76
|
exporter("decorate", decorate);
|
|
83
77
|
function metadata(metadataKey, metadataValue) {
|
|
84
78
|
function decorator(target, propertyKey) {
|
|
85
|
-
if (!IsObject(target))
|
|
86
|
-
|
|
79
|
+
if (!IsObject(target))
|
|
80
|
+
throw new TypeError();
|
|
81
|
+
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
82
|
+
throw new TypeError();
|
|
87
83
|
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
88
84
|
}
|
|
89
|
-
__name(decorator, "decorator");
|
|
90
85
|
return decorator;
|
|
91
86
|
}
|
|
92
|
-
__name(metadata, "metadata");
|
|
93
87
|
exporter("metadata", metadata);
|
|
94
88
|
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
95
|
-
if (!IsObject(target))
|
|
96
|
-
|
|
89
|
+
if (!IsObject(target))
|
|
90
|
+
throw new TypeError();
|
|
91
|
+
if (!IsUndefined(propertyKey))
|
|
92
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
97
93
|
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
98
94
|
}
|
|
99
|
-
__name(defineMetadata, "defineMetadata");
|
|
100
95
|
exporter("defineMetadata", defineMetadata);
|
|
101
96
|
function hasMetadata(metadataKey, target, propertyKey) {
|
|
102
|
-
if (!IsObject(target))
|
|
103
|
-
|
|
97
|
+
if (!IsObject(target))
|
|
98
|
+
throw new TypeError();
|
|
99
|
+
if (!IsUndefined(propertyKey))
|
|
100
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
104
101
|
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
105
102
|
}
|
|
106
|
-
__name(hasMetadata, "hasMetadata");
|
|
107
103
|
exporter("hasMetadata", hasMetadata);
|
|
108
104
|
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
109
|
-
if (!IsObject(target))
|
|
110
|
-
|
|
105
|
+
if (!IsObject(target))
|
|
106
|
+
throw new TypeError();
|
|
107
|
+
if (!IsUndefined(propertyKey))
|
|
108
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
111
109
|
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
112
110
|
}
|
|
113
|
-
__name(hasOwnMetadata, "hasOwnMetadata");
|
|
114
111
|
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
115
112
|
function getMetadata(metadataKey, target, propertyKey) {
|
|
116
|
-
if (!IsObject(target))
|
|
117
|
-
|
|
113
|
+
if (!IsObject(target))
|
|
114
|
+
throw new TypeError();
|
|
115
|
+
if (!IsUndefined(propertyKey))
|
|
116
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
118
117
|
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
119
118
|
}
|
|
120
|
-
__name(getMetadata, "getMetadata");
|
|
121
119
|
exporter("getMetadata", getMetadata);
|
|
122
120
|
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
123
|
-
if (!IsObject(target))
|
|
124
|
-
|
|
121
|
+
if (!IsObject(target))
|
|
122
|
+
throw new TypeError();
|
|
123
|
+
if (!IsUndefined(propertyKey))
|
|
124
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
125
125
|
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
126
126
|
}
|
|
127
|
-
__name(getOwnMetadata, "getOwnMetadata");
|
|
128
127
|
exporter("getOwnMetadata", getOwnMetadata);
|
|
129
128
|
function getMetadataKeys(target, propertyKey) {
|
|
130
|
-
if (!IsObject(target))
|
|
131
|
-
|
|
129
|
+
if (!IsObject(target))
|
|
130
|
+
throw new TypeError();
|
|
131
|
+
if (!IsUndefined(propertyKey))
|
|
132
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
132
133
|
return OrdinaryMetadataKeys(target, propertyKey);
|
|
133
134
|
}
|
|
134
|
-
__name(getMetadataKeys, "getMetadataKeys");
|
|
135
135
|
exporter("getMetadataKeys", getMetadataKeys);
|
|
136
136
|
function getOwnMetadataKeys(target, propertyKey) {
|
|
137
|
-
if (!IsObject(target))
|
|
138
|
-
|
|
137
|
+
if (!IsObject(target))
|
|
138
|
+
throw new TypeError();
|
|
139
|
+
if (!IsUndefined(propertyKey))
|
|
140
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
139
141
|
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
140
142
|
}
|
|
141
|
-
__name(getOwnMetadataKeys, "getOwnMetadataKeys");
|
|
142
143
|
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
143
144
|
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
144
|
-
if (!IsObject(target))
|
|
145
|
-
|
|
145
|
+
if (!IsObject(target))
|
|
146
|
+
throw new TypeError();
|
|
147
|
+
if (!IsUndefined(propertyKey))
|
|
148
|
+
propertyKey = ToPropertyKey(propertyKey);
|
|
146
149
|
var metadataMap = GetOrCreateMetadataMap(
|
|
147
150
|
target,
|
|
148
151
|
propertyKey,
|
|
149
152
|
/*Create*/
|
|
150
153
|
false
|
|
151
154
|
);
|
|
152
|
-
if (IsUndefined(metadataMap))
|
|
153
|
-
|
|
154
|
-
if (metadataMap.
|
|
155
|
+
if (IsUndefined(metadataMap))
|
|
156
|
+
return false;
|
|
157
|
+
if (!metadataMap.delete(metadataKey))
|
|
158
|
+
return false;
|
|
159
|
+
if (metadataMap.size > 0)
|
|
160
|
+
return true;
|
|
155
161
|
var targetMetadata = Metadata.get(target);
|
|
156
162
|
targetMetadata.delete(propertyKey);
|
|
157
|
-
if (targetMetadata.size > 0)
|
|
163
|
+
if (targetMetadata.size > 0)
|
|
164
|
+
return true;
|
|
158
165
|
Metadata.delete(target);
|
|
159
166
|
return true;
|
|
160
167
|
}
|
|
161
|
-
__name(deleteMetadata, "deleteMetadata");
|
|
162
168
|
exporter("deleteMetadata", deleteMetadata);
|
|
163
169
|
function DecorateConstructor(decorators, target) {
|
|
164
170
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
165
171
|
var decorator = decorators[i];
|
|
166
172
|
var decorated = decorator(target);
|
|
167
173
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
168
|
-
if (!IsConstructor(decorated))
|
|
174
|
+
if (!IsConstructor(decorated))
|
|
175
|
+
throw new TypeError();
|
|
169
176
|
target = decorated;
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
return target;
|
|
173
180
|
}
|
|
174
|
-
__name(DecorateConstructor, "DecorateConstructor");
|
|
175
181
|
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
176
182
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
177
183
|
var decorator = decorators[i];
|
|
178
184
|
var decorated = decorator(target, propertyKey, descriptor);
|
|
179
185
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
180
|
-
if (!IsObject(decorated))
|
|
186
|
+
if (!IsObject(decorated))
|
|
187
|
+
throw new TypeError();
|
|
181
188
|
descriptor = decorated;
|
|
182
189
|
}
|
|
183
190
|
}
|
|
184
191
|
return descriptor;
|
|
185
192
|
}
|
|
186
|
-
__name(DecorateProperty, "DecorateProperty");
|
|
187
193
|
function GetOrCreateMetadataMap(O, P, Create) {
|
|
188
194
|
var targetMetadata = Metadata.get(O);
|
|
189
195
|
if (IsUndefined(targetMetadata)) {
|
|
190
|
-
if (!Create)
|
|
196
|
+
if (!Create)
|
|
197
|
+
return void 0;
|
|
191
198
|
targetMetadata = new _Map();
|
|
192
199
|
Metadata.set(O, targetMetadata);
|
|
193
200
|
}
|
|
194
201
|
var metadataMap = targetMetadata.get(P);
|
|
195
202
|
if (IsUndefined(metadataMap)) {
|
|
196
|
-
if (!Create)
|
|
203
|
+
if (!Create)
|
|
204
|
+
return void 0;
|
|
197
205
|
metadataMap = new _Map();
|
|
198
206
|
targetMetadata.set(P, metadataMap);
|
|
199
207
|
}
|
|
200
208
|
return metadataMap;
|
|
201
209
|
}
|
|
202
|
-
__name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
|
|
203
210
|
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
204
211
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
205
|
-
if (hasOwn2)
|
|
212
|
+
if (hasOwn2)
|
|
213
|
+
return true;
|
|
206
214
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
207
|
-
if (!IsNull(parent))
|
|
215
|
+
if (!IsNull(parent))
|
|
216
|
+
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
208
217
|
return false;
|
|
209
218
|
}
|
|
210
|
-
__name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
|
|
211
219
|
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
212
220
|
var metadataMap = GetOrCreateMetadataMap(
|
|
213
221
|
O,
|
|
@@ -215,18 +223,19 @@ var Reflect2;
|
|
|
215
223
|
/*Create*/
|
|
216
224
|
false
|
|
217
225
|
);
|
|
218
|
-
if (IsUndefined(metadataMap))
|
|
226
|
+
if (IsUndefined(metadataMap))
|
|
227
|
+
return false;
|
|
219
228
|
return ToBoolean(metadataMap.has(MetadataKey));
|
|
220
229
|
}
|
|
221
|
-
__name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
|
|
222
230
|
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
223
231
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
224
|
-
if (hasOwn2)
|
|
232
|
+
if (hasOwn2)
|
|
233
|
+
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
225
234
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
226
|
-
if (!IsNull(parent))
|
|
235
|
+
if (!IsNull(parent))
|
|
236
|
+
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
227
237
|
return void 0;
|
|
228
238
|
}
|
|
229
|
-
__name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
|
|
230
239
|
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
231
240
|
var metadataMap = GetOrCreateMetadataMap(
|
|
232
241
|
O,
|
|
@@ -234,10 +243,10 @@ var Reflect2;
|
|
|
234
243
|
/*Create*/
|
|
235
244
|
false
|
|
236
245
|
);
|
|
237
|
-
if (IsUndefined(metadataMap))
|
|
246
|
+
if (IsUndefined(metadataMap))
|
|
247
|
+
return void 0;
|
|
238
248
|
return metadataMap.get(MetadataKey);
|
|
239
249
|
}
|
|
240
|
-
__name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
|
|
241
250
|
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
242
251
|
var metadataMap = GetOrCreateMetadataMap(
|
|
243
252
|
O,
|
|
@@ -247,14 +256,16 @@ var Reflect2;
|
|
|
247
256
|
);
|
|
248
257
|
metadataMap.set(MetadataKey, MetadataValue);
|
|
249
258
|
}
|
|
250
|
-
__name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
|
|
251
259
|
function OrdinaryMetadataKeys(O, P) {
|
|
252
260
|
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
253
261
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
254
|
-
if (parent === null)
|
|
262
|
+
if (parent === null)
|
|
263
|
+
return ownKeys;
|
|
255
264
|
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
256
|
-
if (parentKeys.length <= 0)
|
|
257
|
-
|
|
265
|
+
if (parentKeys.length <= 0)
|
|
266
|
+
return ownKeys;
|
|
267
|
+
if (ownKeys.length <= 0)
|
|
268
|
+
return parentKeys;
|
|
258
269
|
var set = new _Set();
|
|
259
270
|
var keys = [];
|
|
260
271
|
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
@@ -275,7 +286,6 @@ var Reflect2;
|
|
|
275
286
|
}
|
|
276
287
|
return keys;
|
|
277
288
|
}
|
|
278
|
-
__name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
|
|
279
289
|
function OrdinaryOwnMetadataKeys(O, P) {
|
|
280
290
|
var keys = [];
|
|
281
291
|
var metadataMap = GetOrCreateMetadataMap(
|
|
@@ -284,7 +294,8 @@ var Reflect2;
|
|
|
284
294
|
/*Create*/
|
|
285
295
|
false
|
|
286
296
|
);
|
|
287
|
-
if (IsUndefined(metadataMap))
|
|
297
|
+
if (IsUndefined(metadataMap))
|
|
298
|
+
return keys;
|
|
288
299
|
var keysObj = metadataMap.keys();
|
|
289
300
|
var iterator = GetIterator(keysObj);
|
|
290
301
|
var k = 0;
|
|
@@ -307,9 +318,9 @@ var Reflect2;
|
|
|
307
318
|
k++;
|
|
308
319
|
}
|
|
309
320
|
}
|
|
310
|
-
__name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
|
|
311
321
|
function Type(x) {
|
|
312
|
-
if (x === null)
|
|
322
|
+
if (x === null)
|
|
323
|
+
return 1;
|
|
313
324
|
switch (typeof x) {
|
|
314
325
|
case "undefined":
|
|
315
326
|
return 0;
|
|
@@ -327,23 +338,18 @@ var Reflect2;
|
|
|
327
338
|
return 6;
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
|
-
__name(Type, "Type");
|
|
331
341
|
function IsUndefined(x) {
|
|
332
342
|
return x === void 0;
|
|
333
343
|
}
|
|
334
|
-
__name(IsUndefined, "IsUndefined");
|
|
335
344
|
function IsNull(x) {
|
|
336
345
|
return x === null;
|
|
337
346
|
}
|
|
338
|
-
__name(IsNull, "IsNull");
|
|
339
347
|
function IsSymbol(x) {
|
|
340
348
|
return typeof x === "symbol";
|
|
341
349
|
}
|
|
342
|
-
__name(IsSymbol, "IsSymbol");
|
|
343
350
|
function IsObject(x) {
|
|
344
351
|
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
345
352
|
}
|
|
346
|
-
__name(IsObject, "IsObject");
|
|
347
353
|
function ToPrimitive(input, PreferredType) {
|
|
348
354
|
switch (Type(input)) {
|
|
349
355
|
case 0:
|
|
@@ -363,69 +369,67 @@ var Reflect2;
|
|
|
363
369
|
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
364
370
|
if (exoticToPrim !== void 0) {
|
|
365
371
|
var result = exoticToPrim.call(input, hint);
|
|
366
|
-
if (IsObject(result))
|
|
372
|
+
if (IsObject(result))
|
|
373
|
+
throw new TypeError();
|
|
367
374
|
return result;
|
|
368
375
|
}
|
|
369
376
|
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
370
377
|
}
|
|
371
|
-
__name(ToPrimitive, "ToPrimitive");
|
|
372
378
|
function OrdinaryToPrimitive(O, hint) {
|
|
373
379
|
if (hint === "string") {
|
|
374
380
|
var toString_1 = O.toString;
|
|
375
381
|
if (IsCallable(toString_1)) {
|
|
376
382
|
var result = toString_1.call(O);
|
|
377
|
-
if (!IsObject(result))
|
|
383
|
+
if (!IsObject(result))
|
|
384
|
+
return result;
|
|
378
385
|
}
|
|
379
386
|
var valueOf = O.valueOf;
|
|
380
387
|
if (IsCallable(valueOf)) {
|
|
381
388
|
var result = valueOf.call(O);
|
|
382
|
-
if (!IsObject(result))
|
|
389
|
+
if (!IsObject(result))
|
|
390
|
+
return result;
|
|
383
391
|
}
|
|
384
392
|
} else {
|
|
385
393
|
var valueOf = O.valueOf;
|
|
386
394
|
if (IsCallable(valueOf)) {
|
|
387
395
|
var result = valueOf.call(O);
|
|
388
|
-
if (!IsObject(result))
|
|
396
|
+
if (!IsObject(result))
|
|
397
|
+
return result;
|
|
389
398
|
}
|
|
390
399
|
var toString_2 = O.toString;
|
|
391
400
|
if (IsCallable(toString_2)) {
|
|
392
401
|
var result = toString_2.call(O);
|
|
393
|
-
if (!IsObject(result))
|
|
402
|
+
if (!IsObject(result))
|
|
403
|
+
return result;
|
|
394
404
|
}
|
|
395
405
|
}
|
|
396
406
|
throw new TypeError();
|
|
397
407
|
}
|
|
398
|
-
__name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
|
|
399
408
|
function ToBoolean(argument) {
|
|
400
409
|
return !!argument;
|
|
401
410
|
}
|
|
402
|
-
__name(ToBoolean, "ToBoolean");
|
|
403
411
|
function ToString(argument) {
|
|
404
412
|
return "" + argument;
|
|
405
413
|
}
|
|
406
|
-
__name(ToString, "ToString");
|
|
407
414
|
function ToPropertyKey(argument) {
|
|
408
415
|
var key = ToPrimitive(
|
|
409
416
|
argument,
|
|
410
417
|
3
|
|
411
418
|
/* String */
|
|
412
419
|
);
|
|
413
|
-
if (IsSymbol(key))
|
|
420
|
+
if (IsSymbol(key))
|
|
421
|
+
return key;
|
|
414
422
|
return ToString(key);
|
|
415
423
|
}
|
|
416
|
-
__name(ToPropertyKey, "ToPropertyKey");
|
|
417
424
|
function IsArray(argument) {
|
|
418
425
|
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
419
426
|
}
|
|
420
|
-
__name(IsArray, "IsArray");
|
|
421
427
|
function IsCallable(argument) {
|
|
422
428
|
return typeof argument === "function";
|
|
423
429
|
}
|
|
424
|
-
__name(IsCallable, "IsCallable");
|
|
425
430
|
function IsConstructor(argument) {
|
|
426
431
|
return typeof argument === "function";
|
|
427
432
|
}
|
|
428
|
-
__name(IsConstructor, "IsConstructor");
|
|
429
433
|
function IsPropertyKey(argument) {
|
|
430
434
|
switch (Type(argument)) {
|
|
431
435
|
case 3:
|
|
@@ -436,49 +440,52 @@ var Reflect2;
|
|
|
436
440
|
return false;
|
|
437
441
|
}
|
|
438
442
|
}
|
|
439
|
-
__name(IsPropertyKey, "IsPropertyKey");
|
|
440
443
|
function GetMethod(V, P) {
|
|
441
444
|
var func = V[P];
|
|
442
|
-
if (func === void 0 || func === null)
|
|
443
|
-
|
|
445
|
+
if (func === void 0 || func === null)
|
|
446
|
+
return void 0;
|
|
447
|
+
if (!IsCallable(func))
|
|
448
|
+
throw new TypeError();
|
|
444
449
|
return func;
|
|
445
450
|
}
|
|
446
|
-
__name(GetMethod, "GetMethod");
|
|
447
451
|
function GetIterator(obj) {
|
|
448
452
|
var method = GetMethod(obj, iteratorSymbol);
|
|
449
|
-
if (!IsCallable(method))
|
|
453
|
+
if (!IsCallable(method))
|
|
454
|
+
throw new TypeError();
|
|
450
455
|
var iterator = method.call(obj);
|
|
451
|
-
if (!IsObject(iterator))
|
|
456
|
+
if (!IsObject(iterator))
|
|
457
|
+
throw new TypeError();
|
|
452
458
|
return iterator;
|
|
453
459
|
}
|
|
454
|
-
__name(GetIterator, "GetIterator");
|
|
455
460
|
function IteratorValue(iterResult) {
|
|
456
461
|
return iterResult.value;
|
|
457
462
|
}
|
|
458
|
-
__name(IteratorValue, "IteratorValue");
|
|
459
463
|
function IteratorStep(iterator) {
|
|
460
464
|
var result = iterator.next();
|
|
461
465
|
return result.done ? false : result;
|
|
462
466
|
}
|
|
463
|
-
__name(IteratorStep, "IteratorStep");
|
|
464
467
|
function IteratorClose(iterator) {
|
|
465
468
|
var f = iterator["return"];
|
|
466
|
-
if (f)
|
|
469
|
+
if (f)
|
|
470
|
+
f.call(iterator);
|
|
467
471
|
}
|
|
468
|
-
__name(IteratorClose, "IteratorClose");
|
|
469
472
|
function OrdinaryGetPrototypeOf(O) {
|
|
470
473
|
var proto = Object.getPrototypeOf(O);
|
|
471
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
472
|
-
|
|
474
|
+
if (typeof O !== "function" || O === functionPrototype)
|
|
475
|
+
return proto;
|
|
476
|
+
if (proto !== functionPrototype)
|
|
477
|
+
return proto;
|
|
473
478
|
var prototype = O.prototype;
|
|
474
479
|
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
475
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
480
|
+
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
481
|
+
return proto;
|
|
476
482
|
var constructor = prototypeProto.constructor;
|
|
477
|
-
if (typeof constructor !== "function")
|
|
478
|
-
|
|
483
|
+
if (typeof constructor !== "function")
|
|
484
|
+
return proto;
|
|
485
|
+
if (constructor === O)
|
|
486
|
+
return proto;
|
|
479
487
|
return constructor;
|
|
480
488
|
}
|
|
481
|
-
__name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
|
|
482
489
|
function CreateMapPolyfill() {
|
|
483
490
|
var cacheSentinel = {};
|
|
484
491
|
var arraySentinel = [];
|
|
@@ -491,7 +498,6 @@ var Reflect2;
|
|
|
491
498
|
this._values = values;
|
|
492
499
|
this._selector = selector;
|
|
493
500
|
}
|
|
494
|
-
__name(MapIterator2, "MapIterator");
|
|
495
501
|
MapIterator2.prototype["@@iterator"] = function() {
|
|
496
502
|
return this;
|
|
497
503
|
};
|
|
@@ -509,15 +515,9 @@ var Reflect2;
|
|
|
509
515
|
} else {
|
|
510
516
|
this._index++;
|
|
511
517
|
}
|
|
512
|
-
return {
|
|
513
|
-
value: result,
|
|
514
|
-
done: false
|
|
515
|
-
};
|
|
518
|
+
return { value: result, done: false };
|
|
516
519
|
}
|
|
517
|
-
return {
|
|
518
|
-
value: void 0,
|
|
519
|
-
done: true
|
|
520
|
-
};
|
|
520
|
+
return { value: void 0, done: true };
|
|
521
521
|
};
|
|
522
522
|
MapIterator2.prototype.throw = function(error) {
|
|
523
523
|
if (this._index >= 0) {
|
|
@@ -533,10 +533,7 @@ var Reflect2;
|
|
|
533
533
|
this._keys = arraySentinel;
|
|
534
534
|
this._values = arraySentinel;
|
|
535
535
|
}
|
|
536
|
-
return {
|
|
537
|
-
value,
|
|
538
|
-
done: true
|
|
539
|
-
};
|
|
536
|
+
return { value, done: true };
|
|
540
537
|
};
|
|
541
538
|
return MapIterator2;
|
|
542
539
|
}()
|
|
@@ -544,28 +541,27 @@ var Reflect2;
|
|
|
544
541
|
return (
|
|
545
542
|
/** @class */
|
|
546
543
|
function() {
|
|
547
|
-
function
|
|
544
|
+
function Map2() {
|
|
548
545
|
this._keys = [];
|
|
549
546
|
this._values = [];
|
|
550
547
|
this._cacheKey = cacheSentinel;
|
|
551
548
|
this._cacheIndex = -2;
|
|
552
549
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
get: /* @__PURE__ */ __name(function() {
|
|
550
|
+
Object.defineProperty(Map2.prototype, "size", {
|
|
551
|
+
get: function() {
|
|
556
552
|
return this._keys.length;
|
|
557
|
-
},
|
|
553
|
+
},
|
|
558
554
|
enumerable: true,
|
|
559
555
|
configurable: true
|
|
560
556
|
});
|
|
561
|
-
|
|
557
|
+
Map2.prototype.has = function(key) {
|
|
562
558
|
return this._find(
|
|
563
559
|
key,
|
|
564
560
|
/*insert*/
|
|
565
561
|
false
|
|
566
562
|
) >= 0;
|
|
567
563
|
};
|
|
568
|
-
|
|
564
|
+
Map2.prototype.get = function(key) {
|
|
569
565
|
var index = this._find(
|
|
570
566
|
key,
|
|
571
567
|
/*insert*/
|
|
@@ -573,7 +569,7 @@ var Reflect2;
|
|
|
573
569
|
);
|
|
574
570
|
return index >= 0 ? this._values[index] : void 0;
|
|
575
571
|
};
|
|
576
|
-
|
|
572
|
+
Map2.prototype.set = function(key, value) {
|
|
577
573
|
var index = this._find(
|
|
578
574
|
key,
|
|
579
575
|
/*insert*/
|
|
@@ -582,7 +578,7 @@ var Reflect2;
|
|
|
582
578
|
this._values[index] = value;
|
|
583
579
|
return this;
|
|
584
580
|
};
|
|
585
|
-
|
|
581
|
+
Map2.prototype.delete = function(key) {
|
|
586
582
|
var index = this._find(
|
|
587
583
|
key,
|
|
588
584
|
/*insert*/
|
|
@@ -604,28 +600,28 @@ var Reflect2;
|
|
|
604
600
|
}
|
|
605
601
|
return false;
|
|
606
602
|
};
|
|
607
|
-
|
|
603
|
+
Map2.prototype.clear = function() {
|
|
608
604
|
this._keys.length = 0;
|
|
609
605
|
this._values.length = 0;
|
|
610
606
|
this._cacheKey = cacheSentinel;
|
|
611
607
|
this._cacheIndex = -2;
|
|
612
608
|
};
|
|
613
|
-
|
|
609
|
+
Map2.prototype.keys = function() {
|
|
614
610
|
return new MapIterator(this._keys, this._values, getKey);
|
|
615
611
|
};
|
|
616
|
-
|
|
612
|
+
Map2.prototype.values = function() {
|
|
617
613
|
return new MapIterator(this._keys, this._values, getValue);
|
|
618
614
|
};
|
|
619
|
-
|
|
615
|
+
Map2.prototype.entries = function() {
|
|
620
616
|
return new MapIterator(this._keys, this._values, getEntry);
|
|
621
617
|
};
|
|
622
|
-
|
|
618
|
+
Map2.prototype["@@iterator"] = function() {
|
|
623
619
|
return this.entries();
|
|
624
620
|
};
|
|
625
|
-
|
|
621
|
+
Map2.prototype[iteratorSymbol] = function() {
|
|
626
622
|
return this.entries();
|
|
627
623
|
};
|
|
628
|
-
|
|
624
|
+
Map2.prototype._find = function(key, insert) {
|
|
629
625
|
if (this._cacheKey !== key) {
|
|
630
626
|
this._cacheIndex = this._keys.indexOf(this._cacheKey = key);
|
|
631
627
|
}
|
|
@@ -636,73 +632,64 @@ var Reflect2;
|
|
|
636
632
|
}
|
|
637
633
|
return this._cacheIndex;
|
|
638
634
|
};
|
|
639
|
-
return
|
|
635
|
+
return Map2;
|
|
640
636
|
}()
|
|
641
637
|
);
|
|
642
638
|
function getKey(key, _) {
|
|
643
639
|
return key;
|
|
644
640
|
}
|
|
645
|
-
__name(getKey, "getKey");
|
|
646
641
|
function getValue(_, value) {
|
|
647
642
|
return value;
|
|
648
643
|
}
|
|
649
|
-
__name(getValue, "getValue");
|
|
650
644
|
function getEntry(key, value) {
|
|
651
|
-
return [
|
|
652
|
-
key,
|
|
653
|
-
value
|
|
654
|
-
];
|
|
645
|
+
return [key, value];
|
|
655
646
|
}
|
|
656
|
-
__name(getEntry, "getEntry");
|
|
657
647
|
}
|
|
658
|
-
__name(CreateMapPolyfill, "CreateMapPolyfill");
|
|
659
648
|
function CreateSetPolyfill() {
|
|
660
649
|
return (
|
|
661
650
|
/** @class */
|
|
662
651
|
function() {
|
|
663
|
-
function
|
|
652
|
+
function Set2() {
|
|
664
653
|
this._map = new _Map();
|
|
665
654
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
get: /* @__PURE__ */ __name(function() {
|
|
655
|
+
Object.defineProperty(Set2.prototype, "size", {
|
|
656
|
+
get: function() {
|
|
669
657
|
return this._map.size;
|
|
670
|
-
},
|
|
658
|
+
},
|
|
671
659
|
enumerable: true,
|
|
672
660
|
configurable: true
|
|
673
661
|
});
|
|
674
|
-
|
|
662
|
+
Set2.prototype.has = function(value) {
|
|
675
663
|
return this._map.has(value);
|
|
676
664
|
};
|
|
677
|
-
|
|
665
|
+
Set2.prototype.add = function(value) {
|
|
678
666
|
return this._map.set(value, value), this;
|
|
679
667
|
};
|
|
680
|
-
|
|
668
|
+
Set2.prototype.delete = function(value) {
|
|
681
669
|
return this._map.delete(value);
|
|
682
670
|
};
|
|
683
|
-
|
|
671
|
+
Set2.prototype.clear = function() {
|
|
684
672
|
this._map.clear();
|
|
685
673
|
};
|
|
686
|
-
|
|
674
|
+
Set2.prototype.keys = function() {
|
|
687
675
|
return this._map.keys();
|
|
688
676
|
};
|
|
689
|
-
|
|
677
|
+
Set2.prototype.values = function() {
|
|
690
678
|
return this._map.values();
|
|
691
679
|
};
|
|
692
|
-
|
|
680
|
+
Set2.prototype.entries = function() {
|
|
693
681
|
return this._map.entries();
|
|
694
682
|
};
|
|
695
|
-
|
|
683
|
+
Set2.prototype["@@iterator"] = function() {
|
|
696
684
|
return this.keys();
|
|
697
685
|
};
|
|
698
|
-
|
|
686
|
+
Set2.prototype[iteratorSymbol] = function() {
|
|
699
687
|
return this.keys();
|
|
700
688
|
};
|
|
701
|
-
return
|
|
689
|
+
return Set2;
|
|
702
690
|
}()
|
|
703
691
|
);
|
|
704
692
|
}
|
|
705
|
-
__name(CreateSetPolyfill, "CreateSetPolyfill");
|
|
706
693
|
function CreateWeakMapPolyfill() {
|
|
707
694
|
var UUID_SIZE = 16;
|
|
708
695
|
var keys = HashMap.create();
|
|
@@ -710,11 +697,10 @@ var Reflect2;
|
|
|
710
697
|
return (
|
|
711
698
|
/** @class */
|
|
712
699
|
function() {
|
|
713
|
-
function
|
|
700
|
+
function WeakMap2() {
|
|
714
701
|
this._key = CreateUniqueKey();
|
|
715
702
|
}
|
|
716
|
-
|
|
717
|
-
WeakMap1.prototype.has = function(target) {
|
|
703
|
+
WeakMap2.prototype.has = function(target) {
|
|
718
704
|
var table = GetOrCreateWeakMapTable(
|
|
719
705
|
target,
|
|
720
706
|
/*create*/
|
|
@@ -722,7 +708,7 @@ var Reflect2;
|
|
|
722
708
|
);
|
|
723
709
|
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
724
710
|
};
|
|
725
|
-
|
|
711
|
+
WeakMap2.prototype.get = function(target) {
|
|
726
712
|
var table = GetOrCreateWeakMapTable(
|
|
727
713
|
target,
|
|
728
714
|
/*create*/
|
|
@@ -730,7 +716,7 @@ var Reflect2;
|
|
|
730
716
|
);
|
|
731
717
|
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
732
718
|
};
|
|
733
|
-
|
|
719
|
+
WeakMap2.prototype.set = function(target, value) {
|
|
734
720
|
var table = GetOrCreateWeakMapTable(
|
|
735
721
|
target,
|
|
736
722
|
/*create*/
|
|
@@ -739,7 +725,7 @@ var Reflect2;
|
|
|
739
725
|
table[this._key] = value;
|
|
740
726
|
return this;
|
|
741
727
|
};
|
|
742
|
-
|
|
728
|
+
WeakMap2.prototype.delete = function(target) {
|
|
743
729
|
var table = GetOrCreateWeakMapTable(
|
|
744
730
|
target,
|
|
745
731
|
/*create*/
|
|
@@ -747,10 +733,10 @@ var Reflect2;
|
|
|
747
733
|
);
|
|
748
734
|
return table !== void 0 ? delete table[this._key] : false;
|
|
749
735
|
};
|
|
750
|
-
|
|
736
|
+
WeakMap2.prototype.clear = function() {
|
|
751
737
|
this._key = CreateUniqueKey();
|
|
752
738
|
};
|
|
753
|
-
return
|
|
739
|
+
return WeakMap2;
|
|
754
740
|
}()
|
|
755
741
|
);
|
|
756
742
|
function CreateUniqueKey() {
|
|
@@ -761,31 +747,29 @@ var Reflect2;
|
|
|
761
747
|
keys[key] = true;
|
|
762
748
|
return key;
|
|
763
749
|
}
|
|
764
|
-
__name(CreateUniqueKey, "CreateUniqueKey");
|
|
765
750
|
function GetOrCreateWeakMapTable(target, create) {
|
|
766
751
|
if (!hasOwn.call(target, rootKey)) {
|
|
767
|
-
if (!create)
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
});
|
|
752
|
+
if (!create)
|
|
753
|
+
return void 0;
|
|
754
|
+
Object.defineProperty(target, rootKey, { value: HashMap.create() });
|
|
771
755
|
}
|
|
772
756
|
return target[rootKey];
|
|
773
757
|
}
|
|
774
|
-
__name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
|
|
775
758
|
function FillRandomBytes(buffer, size) {
|
|
776
|
-
for (var i = 0; i < size; ++i)
|
|
759
|
+
for (var i = 0; i < size; ++i)
|
|
760
|
+
buffer[i] = Math.random() * 255 | 0;
|
|
777
761
|
return buffer;
|
|
778
762
|
}
|
|
779
|
-
__name(FillRandomBytes, "FillRandomBytes");
|
|
780
763
|
function GenRandomBytes(size) {
|
|
781
764
|
if (typeof Uint8Array === "function") {
|
|
782
|
-
if (typeof crypto !== "undefined")
|
|
783
|
-
|
|
765
|
+
if (typeof crypto !== "undefined")
|
|
766
|
+
return crypto.getRandomValues(new Uint8Array(size));
|
|
767
|
+
if (typeof msCrypto !== "undefined")
|
|
768
|
+
return msCrypto.getRandomValues(new Uint8Array(size));
|
|
784
769
|
return FillRandomBytes(new Uint8Array(size), size);
|
|
785
770
|
}
|
|
786
771
|
return FillRandomBytes(new Array(size), size);
|
|
787
772
|
}
|
|
788
|
-
__name(GenRandomBytes, "GenRandomBytes");
|
|
789
773
|
function CreateUUID() {
|
|
790
774
|
var data = GenRandomBytes(UUID_SIZE);
|
|
791
775
|
data[6] = data[6] & 79 | 64;
|
|
@@ -793,23 +777,22 @@ var Reflect2;
|
|
|
793
777
|
var result = "";
|
|
794
778
|
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
795
779
|
var byte = data[offset];
|
|
796
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
797
|
-
|
|
780
|
+
if (offset === 4 || offset === 6 || offset === 8)
|
|
781
|
+
result += "-";
|
|
782
|
+
if (byte < 16)
|
|
783
|
+
result += "0";
|
|
798
784
|
result += byte.toString(16).toLowerCase();
|
|
799
785
|
}
|
|
800
786
|
return result;
|
|
801
787
|
}
|
|
802
|
-
__name(CreateUUID, "CreateUUID");
|
|
803
788
|
}
|
|
804
|
-
__name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
|
|
805
789
|
function MakeDictionary(obj) {
|
|
806
790
|
obj.__ = void 0;
|
|
807
791
|
delete obj.__;
|
|
808
792
|
return obj;
|
|
809
793
|
}
|
|
810
|
-
__name(MakeDictionary, "MakeDictionary");
|
|
811
794
|
});
|
|
812
|
-
})(
|
|
795
|
+
})(Reflect || (Reflect = {}));
|
|
813
796
|
|
|
814
797
|
// src/typedi.ts
|
|
815
798
|
import { Container } from "typedi";
|
|
@@ -817,7 +800,6 @@ import { Service, Inject, Container as Container2 } from "typedi";
|
|
|
817
800
|
function getInstance(service) {
|
|
818
801
|
return Container.get(service);
|
|
819
802
|
}
|
|
820
|
-
__name(getInstance, "getInstance");
|
|
821
803
|
export {
|
|
822
804
|
Container2 as Container,
|
|
823
805
|
Inject,
|