@itwin/rpcinterface-full-stack-tests 4.1.0-dev.8 → 4.1.0-dev.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/lib/backend/BackendInit.js.map +1 -1
  2. package/lib/common/Settings.js +12 -12
  3. package/lib/common/Settings.js.map +1 -1
  4. package/lib/common/SideChannels.js.map +1 -1
  5. package/lib/dist/{_a8a9.bundled-tests.js → _0062.bundled-tests.js} +3 -3
  6. package/lib/dist/_0062.bundled-tests.js.map +1 -0
  7. package/lib/dist/bundled-tests.js +17898 -14121
  8. package/lib/dist/bundled-tests.js.map +1 -1
  9. package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js +1 -1
  10. package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
  11. package/lib/dist/{vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_3_node_modules_loaders_gl_draco_di-28f62e.bundled-tests.js → vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_7_node_modules_loaders_gl_draco_di-02c2bd.bundled-tests.js} +144 -250
  12. package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_4_7_node_modules_loaders_gl_draco_di-02c2bd.bundled-tests.js.map +1 -0
  13. package/lib/frontend/CodeSpecs.test.js.map +1 -1
  14. package/lib/frontend/DevToolsRpc.test.js.map +1 -1
  15. package/lib/frontend/Elements.test.js.map +1 -1
  16. package/lib/frontend/IModel.test.js.map +1 -1
  17. package/lib/frontend/IModelConnection.test.js.map +1 -1
  18. package/lib/frontend/Models.test.js.map +1 -1
  19. package/lib/frontend/PresentationRpc.test.js.map +1 -1
  20. package/lib/frontend/Views.test.js.map +1 -1
  21. package/lib/frontend/setup/IModelSession.js.map +1 -1
  22. package/lib/frontend/setup/TestContext.js.map +1 -1
  23. package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
  24. package/package.json +16 -23
  25. package/lib/dist/_a8a9.bundled-tests.js.map +0 -1
  26. package/lib/dist/object-storage-azure.bundled-tests.js +0 -14
  27. package/lib/dist/object-storage-azure.bundled-tests.js.map +0 -1
  28. package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_6_0_node_modules_itwin_obj-0f69b1.bundled-tests.js +0 -41881
  29. package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_6_0_node_modules_itwin_obj-0f69b1.bundled-tests.js.map +0 -1
  30. package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_3_node_modules_loaders_gl_draco_di-28f62e.bundled-tests.js.map +0 -1
  31. package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js +0 -1145
  32. package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +0 -1
@@ -1,1145 +0,0 @@
1
- (self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3"],{
2
-
3
- /***/ "../../common/temp/node_modules/.pnpm/reflect-metadata@0.1.13/node_modules/reflect-metadata/Reflect.js":
4
- /*!*************************************************************************************************************!*\
5
- !*** ../../common/temp/node_modules/.pnpm/reflect-metadata@0.1.13/node_modules/reflect-metadata/Reflect.js ***!
6
- \*************************************************************************************************************/
7
- /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
8
-
9
- /*! *****************************************************************************
10
- Copyright (C) Microsoft. All rights reserved.
11
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
12
- this file except in compliance with the License. You may obtain a copy of the
13
- License at http://www.apache.org/licenses/LICENSE-2.0
14
-
15
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
17
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
18
- MERCHANTABLITY OR NON-INFRINGEMENT.
19
-
20
- See the Apache Version 2.0 License for specific language governing permissions
21
- and limitations under the License.
22
- ***************************************************************************** */
23
- var Reflect;
24
- (function (Reflect) {
25
- // Metadata Proposal
26
- // https://rbuckton.github.io/reflect-metadata/
27
- (function (factory) {
28
- var root = typeof __webpack_require__.g === "object" ? __webpack_require__.g :
29
- typeof self === "object" ? self :
30
- typeof this === "object" ? this :
31
- Function("return this;")();
32
- var exporter = makeExporter(Reflect);
33
- if (typeof root.Reflect === "undefined") {
34
- root.Reflect = Reflect;
35
- }
36
- else {
37
- exporter = makeExporter(root.Reflect, exporter);
38
- }
39
- factory(exporter);
40
- function makeExporter(target, previous) {
41
- return function (key, value) {
42
- if (typeof target[key] !== "function") {
43
- Object.defineProperty(target, key, { configurable: true, writable: true, value: value });
44
- }
45
- if (previous)
46
- previous(key, value);
47
- };
48
- }
49
- })(function (exporter) {
50
- var hasOwn = Object.prototype.hasOwnProperty;
51
- // feature test for Symbol support
52
- var supportsSymbol = typeof Symbol === "function";
53
- var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
54
- var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
55
- var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support
56
- var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support
57
- var downLevel = !supportsCreate && !supportsProto;
58
- var HashMap = {
59
- // create an object in dictionary mode (a.k.a. "slow" mode in v8)
60
- create: supportsCreate
61
- ? function () { return MakeDictionary(Object.create(null)); }
62
- : supportsProto
63
- ? function () { return MakeDictionary({ __proto__: null }); }
64
- : function () { return MakeDictionary({}); },
65
- has: downLevel
66
- ? function (map, key) { return hasOwn.call(map, key); }
67
- : function (map, key) { return key in map; },
68
- get: downLevel
69
- ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; }
70
- : function (map, key) { return map[key]; },
71
- };
72
- // Load global or shim versions of Map, Set, and WeakMap
73
- var functionPrototype = Object.getPrototypeOf(Function);
74
- var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
75
- var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
76
- var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
77
- var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
78
- // [[Metadata]] internal slot
79
- // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots
80
- var Metadata = new _WeakMap();
81
- /**
82
- * Applies a set of decorators to a property of a target object.
83
- * @param decorators An array of decorators.
84
- * @param target The target object.
85
- * @param propertyKey (Optional) The property key to decorate.
86
- * @param attributes (Optional) The property descriptor for the target key.
87
- * @remarks Decorators are applied in reverse order.
88
- * @example
89
- *
90
- * class Example {
91
- * // property declarations are not part of ES6, though they are valid in TypeScript:
92
- * // static staticProperty;
93
- * // property;
94
- *
95
- * constructor(p) { }
96
- * static staticMethod(p) { }
97
- * method(p) { }
98
- * }
99
- *
100
- * // constructor
101
- * Example = Reflect.decorate(decoratorsArray, Example);
102
- *
103
- * // property (on constructor)
104
- * Reflect.decorate(decoratorsArray, Example, "staticProperty");
105
- *
106
- * // property (on prototype)
107
- * Reflect.decorate(decoratorsArray, Example.prototype, "property");
108
- *
109
- * // method (on constructor)
110
- * Object.defineProperty(Example, "staticMethod",
111
- * Reflect.decorate(decoratorsArray, Example, "staticMethod",
112
- * Object.getOwnPropertyDescriptor(Example, "staticMethod")));
113
- *
114
- * // method (on prototype)
115
- * Object.defineProperty(Example.prototype, "method",
116
- * Reflect.decorate(decoratorsArray, Example.prototype, "method",
117
- * Object.getOwnPropertyDescriptor(Example.prototype, "method")));
118
- *
119
- */
120
- function decorate(decorators, target, propertyKey, attributes) {
121
- if (!IsUndefined(propertyKey)) {
122
- if (!IsArray(decorators))
123
- throw new TypeError();
124
- if (!IsObject(target))
125
- throw new TypeError();
126
- if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
127
- throw new TypeError();
128
- if (IsNull(attributes))
129
- attributes = undefined;
130
- propertyKey = ToPropertyKey(propertyKey);
131
- return DecorateProperty(decorators, target, propertyKey, attributes);
132
- }
133
- else {
134
- if (!IsArray(decorators))
135
- throw new TypeError();
136
- if (!IsConstructor(target))
137
- throw new TypeError();
138
- return DecorateConstructor(decorators, target);
139
- }
140
- }
141
- exporter("decorate", decorate);
142
- // 4.1.2 Reflect.metadata(metadataKey, metadataValue)
143
- // https://rbuckton.github.io/reflect-metadata/#reflect.metadata
144
- /**
145
- * A default metadata decorator factory that can be used on a class, class member, or parameter.
146
- * @param metadataKey The key for the metadata entry.
147
- * @param metadataValue The value for the metadata entry.
148
- * @returns A decorator function.
149
- * @remarks
150
- * If `metadataKey` is already defined for the target and target key, the
151
- * metadataValue for that key will be overwritten.
152
- * @example
153
- *
154
- * // constructor
155
- * @Reflect.metadata(key, value)
156
- * class Example {
157
- * }
158
- *
159
- * // property (on constructor, TypeScript only)
160
- * class Example {
161
- * @Reflect.metadata(key, value)
162
- * static staticProperty;
163
- * }
164
- *
165
- * // property (on prototype, TypeScript only)
166
- * class Example {
167
- * @Reflect.metadata(key, value)
168
- * property;
169
- * }
170
- *
171
- * // method (on constructor)
172
- * class Example {
173
- * @Reflect.metadata(key, value)
174
- * static staticMethod() { }
175
- * }
176
- *
177
- * // method (on prototype)
178
- * class Example {
179
- * @Reflect.metadata(key, value)
180
- * method() { }
181
- * }
182
- *
183
- */
184
- function metadata(metadataKey, metadataValue) {
185
- function decorator(target, propertyKey) {
186
- if (!IsObject(target))
187
- throw new TypeError();
188
- if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
189
- throw new TypeError();
190
- OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
191
- }
192
- return decorator;
193
- }
194
- exporter("metadata", metadata);
195
- /**
196
- * Define a unique metadata entry on the target.
197
- * @param metadataKey A key used to store and retrieve metadata.
198
- * @param metadataValue A value that contains attached metadata.
199
- * @param target The target object on which to define metadata.
200
- * @param propertyKey (Optional) The property key for the target.
201
- * @example
202
- *
203
- * class Example {
204
- * // property declarations are not part of ES6, though they are valid in TypeScript:
205
- * // static staticProperty;
206
- * // property;
207
- *
208
- * constructor(p) { }
209
- * static staticMethod(p) { }
210
- * method(p) { }
211
- * }
212
- *
213
- * // constructor
214
- * Reflect.defineMetadata("custom:annotation", options, Example);
215
- *
216
- * // property (on constructor)
217
- * Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty");
218
- *
219
- * // property (on prototype)
220
- * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property");
221
- *
222
- * // method (on constructor)
223
- * Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod");
224
- *
225
- * // method (on prototype)
226
- * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method");
227
- *
228
- * // decorator factory as metadata-producing annotation.
229
- * function MyAnnotation(options): Decorator {
230
- * return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key);
231
- * }
232
- *
233
- */
234
- function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
235
- if (!IsObject(target))
236
- throw new TypeError();
237
- if (!IsUndefined(propertyKey))
238
- propertyKey = ToPropertyKey(propertyKey);
239
- return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
240
- }
241
- exporter("defineMetadata", defineMetadata);
242
- /**
243
- * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
244
- * @param metadataKey A key used to store and retrieve metadata.
245
- * @param target The target object on which the metadata is defined.
246
- * @param propertyKey (Optional) The property key for the target.
247
- * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
248
- * @example
249
- *
250
- * class Example {
251
- * // property declarations are not part of ES6, though they are valid in TypeScript:
252
- * // static staticProperty;
253
- * // property;
254
- *
255
- * constructor(p) { }
256
- * static staticMethod(p) { }
257
- * method(p) { }
258
- * }
259
- *
260
- * // constructor
261
- * result = Reflect.hasMetadata("custom:annotation", Example);
262
- *
263
- * // property (on constructor)
264
- * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty");
265
- *
266
- * // property (on prototype)
267
- * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property");
268
- *
269
- * // method (on constructor)
270
- * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod");
271
- *
272
- * // method (on prototype)
273
- * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method");
274
- *
275
- */
276
- function hasMetadata(metadataKey, target, propertyKey) {
277
- if (!IsObject(target))
278
- throw new TypeError();
279
- if (!IsUndefined(propertyKey))
280
- propertyKey = ToPropertyKey(propertyKey);
281
- return OrdinaryHasMetadata(metadataKey, target, propertyKey);
282
- }
283
- exporter("hasMetadata", hasMetadata);
284
- /**
285
- * Gets a value indicating whether the target object has the provided metadata key defined.
286
- * @param metadataKey A key used to store and retrieve metadata.
287
- * @param target The target object on which the metadata is defined.
288
- * @param propertyKey (Optional) The property key for the target.
289
- * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
290
- * @example
291
- *
292
- * class Example {
293
- * // property declarations are not part of ES6, though they are valid in TypeScript:
294
- * // static staticProperty;
295
- * // property;
296
- *
297
- * constructor(p) { }
298
- * static staticMethod(p) { }
299
- * method(p) { }
300
- * }
301
- *
302
- * // constructor
303
- * result = Reflect.hasOwnMetadata("custom:annotation", Example);
304
- *
305
- * // property (on constructor)
306
- * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty");
307
- *
308
- * // property (on prototype)
309
- * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property");
310
- *
311
- * // method (on constructor)
312
- * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod");
313
- *
314
- * // method (on prototype)
315
- * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method");
316
- *
317
- */
318
- function hasOwnMetadata(metadataKey, target, propertyKey) {
319
- if (!IsObject(target))
320
- throw new TypeError();
321
- if (!IsUndefined(propertyKey))
322
- propertyKey = ToPropertyKey(propertyKey);
323
- return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
324
- }
325
- exporter("hasOwnMetadata", hasOwnMetadata);
326
- /**
327
- * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
328
- * @param metadataKey A key used to store and retrieve metadata.
329
- * @param target The target object on which the metadata is defined.
330
- * @param propertyKey (Optional) The property key for the target.
331
- * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
332
- * @example
333
- *
334
- * class Example {
335
- * // property declarations are not part of ES6, though they are valid in TypeScript:
336
- * // static staticProperty;
337
- * // property;
338
- *
339
- * constructor(p) { }
340
- * static staticMethod(p) { }
341
- * method(p) { }
342
- * }
343
- *
344
- * // constructor
345
- * result = Reflect.getMetadata("custom:annotation", Example);
346
- *
347
- * // property (on constructor)
348
- * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty");
349
- *
350
- * // property (on prototype)
351
- * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property");
352
- *
353
- * // method (on constructor)
354
- * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod");
355
- *
356
- * // method (on prototype)
357
- * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method");
358
- *
359
- */
360
- function getMetadata(metadataKey, target, propertyKey) {
361
- if (!IsObject(target))
362
- throw new TypeError();
363
- if (!IsUndefined(propertyKey))
364
- propertyKey = ToPropertyKey(propertyKey);
365
- return OrdinaryGetMetadata(metadataKey, target, propertyKey);
366
- }
367
- exporter("getMetadata", getMetadata);
368
- /**
369
- * Gets the metadata value for the provided metadata key on the target object.
370
- * @param metadataKey A key used to store and retrieve metadata.
371
- * @param target The target object on which the metadata is defined.
372
- * @param propertyKey (Optional) The property key for the target.
373
- * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
374
- * @example
375
- *
376
- * class Example {
377
- * // property declarations are not part of ES6, though they are valid in TypeScript:
378
- * // static staticProperty;
379
- * // property;
380
- *
381
- * constructor(p) { }
382
- * static staticMethod(p) { }
383
- * method(p) { }
384
- * }
385
- *
386
- * // constructor
387
- * result = Reflect.getOwnMetadata("custom:annotation", Example);
388
- *
389
- * // property (on constructor)
390
- * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty");
391
- *
392
- * // property (on prototype)
393
- * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property");
394
- *
395
- * // method (on constructor)
396
- * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod");
397
- *
398
- * // method (on prototype)
399
- * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method");
400
- *
401
- */
402
- function getOwnMetadata(metadataKey, target, propertyKey) {
403
- if (!IsObject(target))
404
- throw new TypeError();
405
- if (!IsUndefined(propertyKey))
406
- propertyKey = ToPropertyKey(propertyKey);
407
- return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
408
- }
409
- exporter("getOwnMetadata", getOwnMetadata);
410
- /**
411
- * Gets the metadata keys defined on the target object or its prototype chain.
412
- * @param target The target object on which the metadata is defined.
413
- * @param propertyKey (Optional) The property key for the target.
414
- * @returns An array of unique metadata keys.
415
- * @example
416
- *
417
- * class Example {
418
- * // property declarations are not part of ES6, though they are valid in TypeScript:
419
- * // static staticProperty;
420
- * // property;
421
- *
422
- * constructor(p) { }
423
- * static staticMethod(p) { }
424
- * method(p) { }
425
- * }
426
- *
427
- * // constructor
428
- * result = Reflect.getMetadataKeys(Example);
429
- *
430
- * // property (on constructor)
431
- * result = Reflect.getMetadataKeys(Example, "staticProperty");
432
- *
433
- * // property (on prototype)
434
- * result = Reflect.getMetadataKeys(Example.prototype, "property");
435
- *
436
- * // method (on constructor)
437
- * result = Reflect.getMetadataKeys(Example, "staticMethod");
438
- *
439
- * // method (on prototype)
440
- * result = Reflect.getMetadataKeys(Example.prototype, "method");
441
- *
442
- */
443
- function getMetadataKeys(target, propertyKey) {
444
- if (!IsObject(target))
445
- throw new TypeError();
446
- if (!IsUndefined(propertyKey))
447
- propertyKey = ToPropertyKey(propertyKey);
448
- return OrdinaryMetadataKeys(target, propertyKey);
449
- }
450
- exporter("getMetadataKeys", getMetadataKeys);
451
- /**
452
- * Gets the unique metadata keys defined on the target object.
453
- * @param target The target object on which the metadata is defined.
454
- * @param propertyKey (Optional) The property key for the target.
455
- * @returns An array of unique metadata keys.
456
- * @example
457
- *
458
- * class Example {
459
- * // property declarations are not part of ES6, though they are valid in TypeScript:
460
- * // static staticProperty;
461
- * // property;
462
- *
463
- * constructor(p) { }
464
- * static staticMethod(p) { }
465
- * method(p) { }
466
- * }
467
- *
468
- * // constructor
469
- * result = Reflect.getOwnMetadataKeys(Example);
470
- *
471
- * // property (on constructor)
472
- * result = Reflect.getOwnMetadataKeys(Example, "staticProperty");
473
- *
474
- * // property (on prototype)
475
- * result = Reflect.getOwnMetadataKeys(Example.prototype, "property");
476
- *
477
- * // method (on constructor)
478
- * result = Reflect.getOwnMetadataKeys(Example, "staticMethod");
479
- *
480
- * // method (on prototype)
481
- * result = Reflect.getOwnMetadataKeys(Example.prototype, "method");
482
- *
483
- */
484
- function getOwnMetadataKeys(target, propertyKey) {
485
- if (!IsObject(target))
486
- throw new TypeError();
487
- if (!IsUndefined(propertyKey))
488
- propertyKey = ToPropertyKey(propertyKey);
489
- return OrdinaryOwnMetadataKeys(target, propertyKey);
490
- }
491
- exporter("getOwnMetadataKeys", getOwnMetadataKeys);
492
- /**
493
- * Deletes the metadata entry from the target object with the provided key.
494
- * @param metadataKey A key used to store and retrieve metadata.
495
- * @param target The target object on which the metadata is defined.
496
- * @param propertyKey (Optional) The property key for the target.
497
- * @returns `true` if the metadata entry was found and deleted; otherwise, false.
498
- * @example
499
- *
500
- * class Example {
501
- * // property declarations are not part of ES6, though they are valid in TypeScript:
502
- * // static staticProperty;
503
- * // property;
504
- *
505
- * constructor(p) { }
506
- * static staticMethod(p) { }
507
- * method(p) { }
508
- * }
509
- *
510
- * // constructor
511
- * result = Reflect.deleteMetadata("custom:annotation", Example);
512
- *
513
- * // property (on constructor)
514
- * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty");
515
- *
516
- * // property (on prototype)
517
- * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property");
518
- *
519
- * // method (on constructor)
520
- * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod");
521
- *
522
- * // method (on prototype)
523
- * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method");
524
- *
525
- */
526
- function deleteMetadata(metadataKey, target, propertyKey) {
527
- if (!IsObject(target))
528
- throw new TypeError();
529
- if (!IsUndefined(propertyKey))
530
- propertyKey = ToPropertyKey(propertyKey);
531
- var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);
532
- if (IsUndefined(metadataMap))
533
- return false;
534
- if (!metadataMap.delete(metadataKey))
535
- return false;
536
- if (metadataMap.size > 0)
537
- return true;
538
- var targetMetadata = Metadata.get(target);
539
- targetMetadata.delete(propertyKey);
540
- if (targetMetadata.size > 0)
541
- return true;
542
- Metadata.delete(target);
543
- return true;
544
- }
545
- exporter("deleteMetadata", deleteMetadata);
546
- function DecorateConstructor(decorators, target) {
547
- for (var i = decorators.length - 1; i >= 0; --i) {
548
- var decorator = decorators[i];
549
- var decorated = decorator(target);
550
- if (!IsUndefined(decorated) && !IsNull(decorated)) {
551
- if (!IsConstructor(decorated))
552
- throw new TypeError();
553
- target = decorated;
554
- }
555
- }
556
- return target;
557
- }
558
- function DecorateProperty(decorators, target, propertyKey, descriptor) {
559
- for (var i = decorators.length - 1; i >= 0; --i) {
560
- var decorator = decorators[i];
561
- var decorated = decorator(target, propertyKey, descriptor);
562
- if (!IsUndefined(decorated) && !IsNull(decorated)) {
563
- if (!IsObject(decorated))
564
- throw new TypeError();
565
- descriptor = decorated;
566
- }
567
- }
568
- return descriptor;
569
- }
570
- function GetOrCreateMetadataMap(O, P, Create) {
571
- var targetMetadata = Metadata.get(O);
572
- if (IsUndefined(targetMetadata)) {
573
- if (!Create)
574
- return undefined;
575
- targetMetadata = new _Map();
576
- Metadata.set(O, targetMetadata);
577
- }
578
- var metadataMap = targetMetadata.get(P);
579
- if (IsUndefined(metadataMap)) {
580
- if (!Create)
581
- return undefined;
582
- metadataMap = new _Map();
583
- targetMetadata.set(P, metadataMap);
584
- }
585
- return metadataMap;
586
- }
587
- // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)
588
- // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata
589
- function OrdinaryHasMetadata(MetadataKey, O, P) {
590
- var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
591
- if (hasOwn)
592
- return true;
593
- var parent = OrdinaryGetPrototypeOf(O);
594
- if (!IsNull(parent))
595
- return OrdinaryHasMetadata(MetadataKey, parent, P);
596
- return false;
597
- }
598
- // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)
599
- // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata
600
- function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
601
- var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
602
- if (IsUndefined(metadataMap))
603
- return false;
604
- return ToBoolean(metadataMap.has(MetadataKey));
605
- }
606
- // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)
607
- // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata
608
- function OrdinaryGetMetadata(MetadataKey, O, P) {
609
- var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
610
- if (hasOwn)
611
- return OrdinaryGetOwnMetadata(MetadataKey, O, P);
612
- var parent = OrdinaryGetPrototypeOf(O);
613
- if (!IsNull(parent))
614
- return OrdinaryGetMetadata(MetadataKey, parent, P);
615
- return undefined;
616
- }
617
- // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)
618
- // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata
619
- function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
620
- var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
621
- if (IsUndefined(metadataMap))
622
- return undefined;
623
- return metadataMap.get(MetadataKey);
624
- }
625
- // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)
626
- // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata
627
- function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
628
- var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);
629
- metadataMap.set(MetadataKey, MetadataValue);
630
- }
631
- // 3.1.6.1 OrdinaryMetadataKeys(O, P)
632
- // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys
633
- function OrdinaryMetadataKeys(O, P) {
634
- var ownKeys = OrdinaryOwnMetadataKeys(O, P);
635
- var parent = OrdinaryGetPrototypeOf(O);
636
- if (parent === null)
637
- return ownKeys;
638
- var parentKeys = OrdinaryMetadataKeys(parent, P);
639
- if (parentKeys.length <= 0)
640
- return ownKeys;
641
- if (ownKeys.length <= 0)
642
- return parentKeys;
643
- var set = new _Set();
644
- var keys = [];
645
- for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
646
- var key = ownKeys_1[_i];
647
- var hasKey = set.has(key);
648
- if (!hasKey) {
649
- set.add(key);
650
- keys.push(key);
651
- }
652
- }
653
- for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {
654
- var key = parentKeys_1[_a];
655
- var hasKey = set.has(key);
656
- if (!hasKey) {
657
- set.add(key);
658
- keys.push(key);
659
- }
660
- }
661
- return keys;
662
- }
663
- // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)
664
- // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys
665
- function OrdinaryOwnMetadataKeys(O, P) {
666
- var keys = [];
667
- var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);
668
- if (IsUndefined(metadataMap))
669
- return keys;
670
- var keysObj = metadataMap.keys();
671
- var iterator = GetIterator(keysObj);
672
- var k = 0;
673
- while (true) {
674
- var next = IteratorStep(iterator);
675
- if (!next) {
676
- keys.length = k;
677
- return keys;
678
- }
679
- var nextValue = IteratorValue(next);
680
- try {
681
- keys[k] = nextValue;
682
- }
683
- catch (e) {
684
- try {
685
- IteratorClose(iterator);
686
- }
687
- finally {
688
- throw e;
689
- }
690
- }
691
- k++;
692
- }
693
- }
694
- // 6 ECMAScript Data Typ0es and Values
695
- // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values
696
- function Type(x) {
697
- if (x === null)
698
- return 1 /* Null */;
699
- switch (typeof x) {
700
- case "undefined": return 0 /* Undefined */;
701
- case "boolean": return 2 /* Boolean */;
702
- case "string": return 3 /* String */;
703
- case "symbol": return 4 /* Symbol */;
704
- case "number": return 5 /* Number */;
705
- case "object": return x === null ? 1 /* Null */ : 6 /* Object */;
706
- default: return 6 /* Object */;
707
- }
708
- }
709
- // 6.1.1 The Undefined Type
710
- // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type
711
- function IsUndefined(x) {
712
- return x === undefined;
713
- }
714
- // 6.1.2 The Null Type
715
- // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type
716
- function IsNull(x) {
717
- return x === null;
718
- }
719
- // 6.1.5 The Symbol Type
720
- // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type
721
- function IsSymbol(x) {
722
- return typeof x === "symbol";
723
- }
724
- // 6.1.7 The Object Type
725
- // https://tc39.github.io/ecma262/#sec-object-type
726
- function IsObject(x) {
727
- return typeof x === "object" ? x !== null : typeof x === "function";
728
- }
729
- // 7.1 Type Conversion
730
- // https://tc39.github.io/ecma262/#sec-type-conversion
731
- // 7.1.1 ToPrimitive(input [, PreferredType])
732
- // https://tc39.github.io/ecma262/#sec-toprimitive
733
- function ToPrimitive(input, PreferredType) {
734
- switch (Type(input)) {
735
- case 0 /* Undefined */: return input;
736
- case 1 /* Null */: return input;
737
- case 2 /* Boolean */: return input;
738
- case 3 /* String */: return input;
739
- case 4 /* Symbol */: return input;
740
- case 5 /* Number */: return input;
741
- }
742
- var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default";
743
- var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
744
- if (exoticToPrim !== undefined) {
745
- var result = exoticToPrim.call(input, hint);
746
- if (IsObject(result))
747
- throw new TypeError();
748
- return result;
749
- }
750
- return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
751
- }
752
- // 7.1.1.1 OrdinaryToPrimitive(O, hint)
753
- // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive
754
- function OrdinaryToPrimitive(O, hint) {
755
- if (hint === "string") {
756
- var toString_1 = O.toString;
757
- if (IsCallable(toString_1)) {
758
- var result = toString_1.call(O);
759
- if (!IsObject(result))
760
- return result;
761
- }
762
- var valueOf = O.valueOf;
763
- if (IsCallable(valueOf)) {
764
- var result = valueOf.call(O);
765
- if (!IsObject(result))
766
- return result;
767
- }
768
- }
769
- else {
770
- var valueOf = O.valueOf;
771
- if (IsCallable(valueOf)) {
772
- var result = valueOf.call(O);
773
- if (!IsObject(result))
774
- return result;
775
- }
776
- var toString_2 = O.toString;
777
- if (IsCallable(toString_2)) {
778
- var result = toString_2.call(O);
779
- if (!IsObject(result))
780
- return result;
781
- }
782
- }
783
- throw new TypeError();
784
- }
785
- // 7.1.2 ToBoolean(argument)
786
- // https://tc39.github.io/ecma262/2016/#sec-toboolean
787
- function ToBoolean(argument) {
788
- return !!argument;
789
- }
790
- // 7.1.12 ToString(argument)
791
- // https://tc39.github.io/ecma262/#sec-tostring
792
- function ToString(argument) {
793
- return "" + argument;
794
- }
795
- // 7.1.14 ToPropertyKey(argument)
796
- // https://tc39.github.io/ecma262/#sec-topropertykey
797
- function ToPropertyKey(argument) {
798
- var key = ToPrimitive(argument, 3 /* String */);
799
- if (IsSymbol(key))
800
- return key;
801
- return ToString(key);
802
- }
803
- // 7.2 Testing and Comparison Operations
804
- // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations
805
- // 7.2.2 IsArray(argument)
806
- // https://tc39.github.io/ecma262/#sec-isarray
807
- function IsArray(argument) {
808
- return Array.isArray
809
- ? Array.isArray(argument)
810
- : argument instanceof Object
811
- ? argument instanceof Array
812
- : Object.prototype.toString.call(argument) === "[object Array]";
813
- }
814
- // 7.2.3 IsCallable(argument)
815
- // https://tc39.github.io/ecma262/#sec-iscallable
816
- function IsCallable(argument) {
817
- // NOTE: This is an approximation as we cannot check for [[Call]] internal method.
818
- return typeof argument === "function";
819
- }
820
- // 7.2.4 IsConstructor(argument)
821
- // https://tc39.github.io/ecma262/#sec-isconstructor
822
- function IsConstructor(argument) {
823
- // NOTE: This is an approximation as we cannot check for [[Construct]] internal method.
824
- return typeof argument === "function";
825
- }
826
- // 7.2.7 IsPropertyKey(argument)
827
- // https://tc39.github.io/ecma262/#sec-ispropertykey
828
- function IsPropertyKey(argument) {
829
- switch (Type(argument)) {
830
- case 3 /* String */: return true;
831
- case 4 /* Symbol */: return true;
832
- default: return false;
833
- }
834
- }
835
- // 7.3 Operations on Objects
836
- // https://tc39.github.io/ecma262/#sec-operations-on-objects
837
- // 7.3.9 GetMethod(V, P)
838
- // https://tc39.github.io/ecma262/#sec-getmethod
839
- function GetMethod(V, P) {
840
- var func = V[P];
841
- if (func === undefined || func === null)
842
- return undefined;
843
- if (!IsCallable(func))
844
- throw new TypeError();
845
- return func;
846
- }
847
- // 7.4 Operations on Iterator Objects
848
- // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects
849
- function GetIterator(obj) {
850
- var method = GetMethod(obj, iteratorSymbol);
851
- if (!IsCallable(method))
852
- throw new TypeError(); // from Call
853
- var iterator = method.call(obj);
854
- if (!IsObject(iterator))
855
- throw new TypeError();
856
- return iterator;
857
- }
858
- // 7.4.4 IteratorValue(iterResult)
859
- // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue
860
- function IteratorValue(iterResult) {
861
- return iterResult.value;
862
- }
863
- // 7.4.5 IteratorStep(iterator)
864
- // https://tc39.github.io/ecma262/#sec-iteratorstep
865
- function IteratorStep(iterator) {
866
- var result = iterator.next();
867
- return result.done ? false : result;
868
- }
869
- // 7.4.6 IteratorClose(iterator, completion)
870
- // https://tc39.github.io/ecma262/#sec-iteratorclose
871
- function IteratorClose(iterator) {
872
- var f = iterator["return"];
873
- if (f)
874
- f.call(iterator);
875
- }
876
- // 9.1 Ordinary Object Internal Methods and Internal Slots
877
- // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots
878
- // 9.1.1.1 OrdinaryGetPrototypeOf(O)
879
- // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof
880
- function OrdinaryGetPrototypeOf(O) {
881
- var proto = Object.getPrototypeOf(O);
882
- if (typeof O !== "function" || O === functionPrototype)
883
- return proto;
884
- // TypeScript doesn't set __proto__ in ES5, as it's non-standard.
885
- // Try to determine the superclass constructor. Compatible implementations
886
- // must either set __proto__ on a subclass constructor to the superclass constructor,
887
- // or ensure each class has a valid `constructor` property on its prototype that
888
- // points back to the constructor.
889
- // If this is not the same as Function.[[Prototype]], then this is definately inherited.
890
- // This is the case when in ES6 or when using __proto__ in a compatible browser.
891
- if (proto !== functionPrototype)
892
- return proto;
893
- // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.
894
- var prototype = O.prototype;
895
- var prototypeProto = prototype && Object.getPrototypeOf(prototype);
896
- if (prototypeProto == null || prototypeProto === Object.prototype)
897
- return proto;
898
- // If the constructor was not a function, then we cannot determine the heritage.
899
- var constructor = prototypeProto.constructor;
900
- if (typeof constructor !== "function")
901
- return proto;
902
- // If we have some kind of self-reference, then we cannot determine the heritage.
903
- if (constructor === O)
904
- return proto;
905
- // we have a pretty good guess at the heritage.
906
- return constructor;
907
- }
908
- // naive Map shim
909
- function CreateMapPolyfill() {
910
- var cacheSentinel = {};
911
- var arraySentinel = [];
912
- var MapIterator = /** @class */ (function () {
913
- function MapIterator(keys, values, selector) {
914
- this._index = 0;
915
- this._keys = keys;
916
- this._values = values;
917
- this._selector = selector;
918
- }
919
- MapIterator.prototype["@@iterator"] = function () { return this; };
920
- MapIterator.prototype[iteratorSymbol] = function () { return this; };
921
- MapIterator.prototype.next = function () {
922
- var index = this._index;
923
- if (index >= 0 && index < this._keys.length) {
924
- var result = this._selector(this._keys[index], this._values[index]);
925
- if (index + 1 >= this._keys.length) {
926
- this._index = -1;
927
- this._keys = arraySentinel;
928
- this._values = arraySentinel;
929
- }
930
- else {
931
- this._index++;
932
- }
933
- return { value: result, done: false };
934
- }
935
- return { value: undefined, done: true };
936
- };
937
- MapIterator.prototype.throw = function (error) {
938
- if (this._index >= 0) {
939
- this._index = -1;
940
- this._keys = arraySentinel;
941
- this._values = arraySentinel;
942
- }
943
- throw error;
944
- };
945
- MapIterator.prototype.return = function (value) {
946
- if (this._index >= 0) {
947
- this._index = -1;
948
- this._keys = arraySentinel;
949
- this._values = arraySentinel;
950
- }
951
- return { value: value, done: true };
952
- };
953
- return MapIterator;
954
- }());
955
- return /** @class */ (function () {
956
- function Map() {
957
- this._keys = [];
958
- this._values = [];
959
- this._cacheKey = cacheSentinel;
960
- this._cacheIndex = -2;
961
- }
962
- Object.defineProperty(Map.prototype, "size", {
963
- get: function () { return this._keys.length; },
964
- enumerable: true,
965
- configurable: true
966
- });
967
- Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; };
968
- Map.prototype.get = function (key) {
969
- var index = this._find(key, /*insert*/ false);
970
- return index >= 0 ? this._values[index] : undefined;
971
- };
972
- Map.prototype.set = function (key, value) {
973
- var index = this._find(key, /*insert*/ true);
974
- this._values[index] = value;
975
- return this;
976
- };
977
- Map.prototype.delete = function (key) {
978
- var index = this._find(key, /*insert*/ false);
979
- if (index >= 0) {
980
- var size = this._keys.length;
981
- for (var i = index + 1; i < size; i++) {
982
- this._keys[i - 1] = this._keys[i];
983
- this._values[i - 1] = this._values[i];
984
- }
985
- this._keys.length--;
986
- this._values.length--;
987
- if (key === this._cacheKey) {
988
- this._cacheKey = cacheSentinel;
989
- this._cacheIndex = -2;
990
- }
991
- return true;
992
- }
993
- return false;
994
- };
995
- Map.prototype.clear = function () {
996
- this._keys.length = 0;
997
- this._values.length = 0;
998
- this._cacheKey = cacheSentinel;
999
- this._cacheIndex = -2;
1000
- };
1001
- Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); };
1002
- Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); };
1003
- Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); };
1004
- Map.prototype["@@iterator"] = function () { return this.entries(); };
1005
- Map.prototype[iteratorSymbol] = function () { return this.entries(); };
1006
- Map.prototype._find = function (key, insert) {
1007
- if (this._cacheKey !== key) {
1008
- this._cacheIndex = this._keys.indexOf(this._cacheKey = key);
1009
- }
1010
- if (this._cacheIndex < 0 && insert) {
1011
- this._cacheIndex = this._keys.length;
1012
- this._keys.push(key);
1013
- this._values.push(undefined);
1014
- }
1015
- return this._cacheIndex;
1016
- };
1017
- return Map;
1018
- }());
1019
- function getKey(key, _) {
1020
- return key;
1021
- }
1022
- function getValue(_, value) {
1023
- return value;
1024
- }
1025
- function getEntry(key, value) {
1026
- return [key, value];
1027
- }
1028
- }
1029
- // naive Set shim
1030
- function CreateSetPolyfill() {
1031
- return /** @class */ (function () {
1032
- function Set() {
1033
- this._map = new _Map();
1034
- }
1035
- Object.defineProperty(Set.prototype, "size", {
1036
- get: function () { return this._map.size; },
1037
- enumerable: true,
1038
- configurable: true
1039
- });
1040
- Set.prototype.has = function (value) { return this._map.has(value); };
1041
- Set.prototype.add = function (value) { return this._map.set(value, value), this; };
1042
- Set.prototype.delete = function (value) { return this._map.delete(value); };
1043
- Set.prototype.clear = function () { this._map.clear(); };
1044
- Set.prototype.keys = function () { return this._map.keys(); };
1045
- Set.prototype.values = function () { return this._map.values(); };
1046
- Set.prototype.entries = function () { return this._map.entries(); };
1047
- Set.prototype["@@iterator"] = function () { return this.keys(); };
1048
- Set.prototype[iteratorSymbol] = function () { return this.keys(); };
1049
- return Set;
1050
- }());
1051
- }
1052
- // naive WeakMap shim
1053
- function CreateWeakMapPolyfill() {
1054
- var UUID_SIZE = 16;
1055
- var keys = HashMap.create();
1056
- var rootKey = CreateUniqueKey();
1057
- return /** @class */ (function () {
1058
- function WeakMap() {
1059
- this._key = CreateUniqueKey();
1060
- }
1061
- WeakMap.prototype.has = function (target) {
1062
- var table = GetOrCreateWeakMapTable(target, /*create*/ false);
1063
- return table !== undefined ? HashMap.has(table, this._key) : false;
1064
- };
1065
- WeakMap.prototype.get = function (target) {
1066
- var table = GetOrCreateWeakMapTable(target, /*create*/ false);
1067
- return table !== undefined ? HashMap.get(table, this._key) : undefined;
1068
- };
1069
- WeakMap.prototype.set = function (target, value) {
1070
- var table = GetOrCreateWeakMapTable(target, /*create*/ true);
1071
- table[this._key] = value;
1072
- return this;
1073
- };
1074
- WeakMap.prototype.delete = function (target) {
1075
- var table = GetOrCreateWeakMapTable(target, /*create*/ false);
1076
- return table !== undefined ? delete table[this._key] : false;
1077
- };
1078
- WeakMap.prototype.clear = function () {
1079
- // NOTE: not a real clear, just makes the previous data unreachable
1080
- this._key = CreateUniqueKey();
1081
- };
1082
- return WeakMap;
1083
- }());
1084
- function CreateUniqueKey() {
1085
- var key;
1086
- do
1087
- key = "@@WeakMap@@" + CreateUUID();
1088
- while (HashMap.has(keys, key));
1089
- keys[key] = true;
1090
- return key;
1091
- }
1092
- function GetOrCreateWeakMapTable(target, create) {
1093
- if (!hasOwn.call(target, rootKey)) {
1094
- if (!create)
1095
- return undefined;
1096
- Object.defineProperty(target, rootKey, { value: HashMap.create() });
1097
- }
1098
- return target[rootKey];
1099
- }
1100
- function FillRandomBytes(buffer, size) {
1101
- for (var i = 0; i < size; ++i)
1102
- buffer[i] = Math.random() * 0xff | 0;
1103
- return buffer;
1104
- }
1105
- function GenRandomBytes(size) {
1106
- if (typeof Uint8Array === "function") {
1107
- if (typeof crypto !== "undefined")
1108
- return crypto.getRandomValues(new Uint8Array(size));
1109
- if (typeof msCrypto !== "undefined")
1110
- return msCrypto.getRandomValues(new Uint8Array(size));
1111
- return FillRandomBytes(new Uint8Array(size), size);
1112
- }
1113
- return FillRandomBytes(new Array(size), size);
1114
- }
1115
- function CreateUUID() {
1116
- var data = GenRandomBytes(UUID_SIZE);
1117
- // mark as random - RFC 4122 § 4.4
1118
- data[6] = data[6] & 0x4f | 0x40;
1119
- data[8] = data[8] & 0xbf | 0x80;
1120
- var result = "";
1121
- for (var offset = 0; offset < UUID_SIZE; ++offset) {
1122
- var byte = data[offset];
1123
- if (offset === 4 || offset === 6 || offset === 8)
1124
- result += "-";
1125
- if (byte < 16)
1126
- result += "0";
1127
- result += byte.toString(16).toLowerCase();
1128
- }
1129
- return result;
1130
- }
1131
- }
1132
- // uses a heuristic used by v8 and chakra to force an object into dictionary mode.
1133
- function MakeDictionary(obj) {
1134
- obj.__ = undefined;
1135
- delete obj.__;
1136
- return obj;
1137
- }
1138
- });
1139
- })(Reflect || (Reflect = {}));
1140
-
1141
-
1142
- /***/ })
1143
-
1144
- }]);
1145
- //# sourceMappingURL=vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map