@visactor/vrender-core 0.20.0-alpha.4 → 0.20.1-alpha.0
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/cjs/common/Reflect-metadata.js +4 -205
- package/cjs/common/Reflect-metadata.js.map +1 -1
- package/cjs/common/shape/rect.d.ts +3 -1
- package/cjs/common/shape/rect.js +13 -8
- package/cjs/common/shape/rect.js.map +1 -1
- package/cjs/graphic/richtext/wrapper.d.ts +2 -2
- package/cjs/graphic/richtext/wrapper.js +4 -4
- package/cjs/graphic/richtext/wrapper.js.map +1 -1
- package/cjs/graphic/richtext.js +7 -6
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/render/contributions/render/area-render.js +1 -1
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js +12 -3
- package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js +1 -1
- package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
- package/cjs/render/contributions/render/group-render.js +5 -2
- package/cjs/render/contributions/render/group-render.js.map +1 -1
- package/dist/index.es.js +68 -323
- package/es/common/Reflect-metadata.js +4 -205
- package/es/common/Reflect-metadata.js.map +1 -1
- package/es/common/shape/rect.d.ts +3 -1
- package/es/common/shape/rect.js +13 -8
- package/es/common/shape/rect.js.map +1 -1
- package/es/graphic/richtext/wrapper.d.ts +2 -2
- package/es/graphic/richtext/wrapper.js +4 -4
- package/es/graphic/richtext/wrapper.js.map +1 -1
- package/es/graphic/richtext.js +7 -6
- package/es/graphic/richtext.js.map +1 -1
- package/es/render/contributions/render/area-render.js +1 -1
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/contributions/rect-contribution-render.js +11 -3
- package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
- package/es/render/contributions/render/draw-interceptor.js +2 -2
- package/es/render/contributions/render/draw-interceptor.js.map +1 -1
- package/es/render/contributions/render/group-render.js +5 -2
- package/es/render/contributions/render/group-render.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
export default (function(Reflect) {
|
|
2
2
|
var target, previous;
|
|
3
3
|
return function(exporter) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return MakeDictionary(Object.create(null));
|
|
9
|
-
} : supportsProto ? function() {
|
|
10
|
-
return MakeDictionary({
|
|
11
|
-
__proto__: null
|
|
12
|
-
});
|
|
13
|
-
} : function() {
|
|
14
|
-
return MakeDictionary({});
|
|
15
|
-
},
|
|
16
|
-
has: downLevel ? function(map, key) {
|
|
17
|
-
return hasOwn.call(map, key);
|
|
18
|
-
} : function(map, key) {
|
|
19
|
-
return key in map;
|
|
20
|
-
},
|
|
21
|
-
get: downLevel ? function(map, key) {
|
|
22
|
-
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
23
|
-
} : function(map, key) {
|
|
24
|
-
return map[key];
|
|
25
|
-
}
|
|
26
|
-
}, functionPrototype = Object.getPrototypeOf(Function), usePolyfill = "object" == typeof process && process.env && "true" === process.env.REFLECT_METADATA_USE_MAP_POLYFILL, _Map = usePolyfill || "function" != typeof Map || "function" != typeof Map.prototype.entries ? CreateMapPolyfill() : Map, Metadata = (usePolyfill || "function" != typeof Set || "function" != typeof Set.prototype.entries ? CreateSetPolyfill() : Set,
|
|
27
|
-
new (usePolyfill || "function" != typeof WeakMap ? CreateWeakMapPolyfill() : WeakMap));
|
|
4
|
+
Object.prototype.hasOwnProperty;
|
|
5
|
+
const supportsSymbol = "function" == typeof Symbol, toPrimitiveSymbol = supportsSymbol && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", functionPrototype = (supportsSymbol && void 0 !== Symbol.iterator && Symbol.iterator,
|
|
6
|
+
Object.create, Object.getPrototypeOf(Function)), _Map = ("object" == typeof process && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL,
|
|
7
|
+
Map), Metadata = (Set, new WeakMap);
|
|
28
8
|
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
29
9
|
if (!IsObject(target)) throw new TypeError;
|
|
30
10
|
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
@@ -185,187 +165,6 @@ export default (function(Reflect) {
|
|
|
185
165
|
const constructor = prototypeProto.constructor;
|
|
186
166
|
return "function" != typeof constructor || constructor === O ? proto : constructor;
|
|
187
167
|
}
|
|
188
|
-
function CreateMapPolyfill() {
|
|
189
|
-
const cacheSentinel = {}, arraySentinel = [], MapIterator = function() {
|
|
190
|
-
function MapIterator(keys, values, selector) {
|
|
191
|
-
this._index = 0, this._keys = keys, this._values = values, this._selector = selector;
|
|
192
|
-
}
|
|
193
|
-
return MapIterator.prototype["@@iterator"] = function() {
|
|
194
|
-
return this;
|
|
195
|
-
}, MapIterator.prototype[iteratorSymbol] = function() {
|
|
196
|
-
return this;
|
|
197
|
-
}, MapIterator.prototype.next = function() {
|
|
198
|
-
const index = this._index;
|
|
199
|
-
if (index >= 0 && index < this._keys.length) {
|
|
200
|
-
const result = this._selector(this._keys[index], this._values[index]);
|
|
201
|
-
return index + 1 >= this._keys.length ? (this._index = -1, this._keys = arraySentinel,
|
|
202
|
-
this._values = arraySentinel) : this._index++, {
|
|
203
|
-
value: result,
|
|
204
|
-
done: !1
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
return {
|
|
208
|
-
value: void 0,
|
|
209
|
-
done: !0
|
|
210
|
-
};
|
|
211
|
-
}, MapIterator.prototype.throw = function(error) {
|
|
212
|
-
throw this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
213
|
-
error;
|
|
214
|
-
}, MapIterator.prototype.return = function(value) {
|
|
215
|
-
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
216
|
-
{
|
|
217
|
-
value: value,
|
|
218
|
-
done: !0
|
|
219
|
-
};
|
|
220
|
-
}, MapIterator;
|
|
221
|
-
}();
|
|
222
|
-
return function() {
|
|
223
|
-
function Map() {
|
|
224
|
-
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
225
|
-
}
|
|
226
|
-
return Object.defineProperty(Map.prototype, "size", {
|
|
227
|
-
get: function() {
|
|
228
|
-
return this._keys.length;
|
|
229
|
-
},
|
|
230
|
-
enumerable: !0,
|
|
231
|
-
configurable: !0
|
|
232
|
-
}), Map.prototype.has = function(key) {
|
|
233
|
-
return this._find(key, !1) >= 0;
|
|
234
|
-
}, Map.prototype.get = function(key) {
|
|
235
|
-
const index = this._find(key, !1);
|
|
236
|
-
return index >= 0 ? this._values[index] : void 0;
|
|
237
|
-
}, Map.prototype.set = function(key, value) {
|
|
238
|
-
const index = this._find(key, !0);
|
|
239
|
-
return this._values[index] = value, this;
|
|
240
|
-
}, Map.prototype.delete = function(key) {
|
|
241
|
-
const index = this._find(key, !1);
|
|
242
|
-
if (index >= 0) {
|
|
243
|
-
const size = this._keys.length;
|
|
244
|
-
for (let i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
245
|
-
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel,
|
|
246
|
-
this._cacheIndex = -2), !0;
|
|
247
|
-
}
|
|
248
|
-
return !1;
|
|
249
|
-
}, Map.prototype.clear = function() {
|
|
250
|
-
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel,
|
|
251
|
-
this._cacheIndex = -2;
|
|
252
|
-
}, Map.prototype.keys = function() {
|
|
253
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
254
|
-
}, Map.prototype.values = function() {
|
|
255
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
256
|
-
}, Map.prototype.entries = function() {
|
|
257
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
258
|
-
}, Map.prototype["@@iterator"] = function() {
|
|
259
|
-
return this.entries();
|
|
260
|
-
}, Map.prototype[iteratorSymbol] = function() {
|
|
261
|
-
return this.entries();
|
|
262
|
-
}, Map.prototype._find = function(key, insert) {
|
|
263
|
-
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)),
|
|
264
|
-
this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key),
|
|
265
|
-
this._values.push(void 0)), this._cacheIndex;
|
|
266
|
-
}, Map;
|
|
267
|
-
}();
|
|
268
|
-
function getKey(key, _) {
|
|
269
|
-
return key;
|
|
270
|
-
}
|
|
271
|
-
function getValue(_, value) {
|
|
272
|
-
return value;
|
|
273
|
-
}
|
|
274
|
-
function getEntry(key, value) {
|
|
275
|
-
return [ key, value ];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
function CreateSetPolyfill() {
|
|
279
|
-
return function() {
|
|
280
|
-
function Set() {
|
|
281
|
-
this._map = new _Map;
|
|
282
|
-
}
|
|
283
|
-
return Object.defineProperty(Set.prototype, "size", {
|
|
284
|
-
get: function() {
|
|
285
|
-
return this._map.size;
|
|
286
|
-
},
|
|
287
|
-
enumerable: !0,
|
|
288
|
-
configurable: !0
|
|
289
|
-
}), Set.prototype.has = function(value) {
|
|
290
|
-
return this._map.has(value);
|
|
291
|
-
}, Set.prototype.add = function(value) {
|
|
292
|
-
return this._map.set(value, value), this;
|
|
293
|
-
}, Set.prototype.delete = function(value) {
|
|
294
|
-
return this._map.delete(value);
|
|
295
|
-
}, Set.prototype.clear = function() {
|
|
296
|
-
this._map.clear();
|
|
297
|
-
}, Set.prototype.keys = function() {
|
|
298
|
-
return this._map.keys();
|
|
299
|
-
}, Set.prototype.values = function() {
|
|
300
|
-
return this._map.values();
|
|
301
|
-
}, Set.prototype.entries = function() {
|
|
302
|
-
return this._map.entries();
|
|
303
|
-
}, Set.prototype["@@iterator"] = function() {
|
|
304
|
-
return this.keys();
|
|
305
|
-
}, Set.prototype[iteratorSymbol] = function() {
|
|
306
|
-
return this.keys();
|
|
307
|
-
}, Set;
|
|
308
|
-
}();
|
|
309
|
-
}
|
|
310
|
-
function CreateWeakMapPolyfill() {
|
|
311
|
-
const UUID_SIZE = 16, keys = HashMap.create(), rootKey = CreateUniqueKey();
|
|
312
|
-
return function() {
|
|
313
|
-
function WeakMap() {
|
|
314
|
-
this._key = CreateUniqueKey();
|
|
315
|
-
}
|
|
316
|
-
return WeakMap.prototype.has = function(target) {
|
|
317
|
-
const table = GetOrCreateWeakMapTable(target, !1);
|
|
318
|
-
return void 0 !== table && HashMap.has(table, this._key);
|
|
319
|
-
}, WeakMap.prototype.get = function(target) {
|
|
320
|
-
const table = GetOrCreateWeakMapTable(target, !1);
|
|
321
|
-
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
322
|
-
}, WeakMap.prototype.set = function(target, value) {
|
|
323
|
-
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
324
|
-
}, WeakMap.prototype.delete = function(target) {
|
|
325
|
-
const table = GetOrCreateWeakMapTable(target, !1);
|
|
326
|
-
return void 0 !== table && delete table[this._key];
|
|
327
|
-
}, WeakMap.prototype.clear = function() {
|
|
328
|
-
this._key = CreateUniqueKey();
|
|
329
|
-
}, WeakMap;
|
|
330
|
-
}();
|
|
331
|
-
function CreateUniqueKey() {
|
|
332
|
-
let key;
|
|
333
|
-
do {
|
|
334
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
335
|
-
} while (HashMap.has(keys, key));
|
|
336
|
-
return keys[key] = !0, key;
|
|
337
|
-
}
|
|
338
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
339
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
340
|
-
if (!create) return;
|
|
341
|
-
Object.defineProperty(target, rootKey, {
|
|
342
|
-
value: HashMap.create()
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
return target[rootKey];
|
|
346
|
-
}
|
|
347
|
-
function FillRandomBytes(buffer, size) {
|
|
348
|
-
for (let i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
349
|
-
return buffer;
|
|
350
|
-
}
|
|
351
|
-
function GenRandomBytes(size) {
|
|
352
|
-
return "function" == typeof Uint8Array ? "undefined" != typeof crypto ? crypto.getRandomValues(new Uint8Array(size)) : FillRandomBytes(new Uint8Array(size), size) : FillRandomBytes(new Array(size), size);
|
|
353
|
-
}
|
|
354
|
-
function CreateUUID() {
|
|
355
|
-
const data = GenRandomBytes(UUID_SIZE);
|
|
356
|
-
data[6] = 79 & data[6] | 64, data[8] = 191 & data[8] | 128;
|
|
357
|
-
let result = "";
|
|
358
|
-
for (let offset = 0; offset < UUID_SIZE; ++offset) {
|
|
359
|
-
const byte = data[offset];
|
|
360
|
-
4 !== offset && 6 !== offset && 8 !== offset || (result += "-"), byte < 16 && (result += "0"),
|
|
361
|
-
result += byte.toString(16).toLowerCase();
|
|
362
|
-
}
|
|
363
|
-
return result;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
function MakeDictionary(obj) {
|
|
367
|
-
return obj.__ = void 0, delete obj.__, obj;
|
|
368
|
-
}
|
|
369
168
|
exporter("defineMetadata", defineMetadata), exporter("hasMetadata", hasMetadata),
|
|
370
169
|
exporter("hasOwnMetadata", hasOwnMetadata), exporter("getMetadata", getMetadata);
|
|
371
170
|
}((target = Reflect, function(key, value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/common/Reflect-metadata.ts"],"names":[],"mappings":"AAeA,eAAe,CAAC,UAAU,OAAO;IAG/B,CAAC,UAAU,OAAO;QAChB,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAClB,SAAS,YAAY,CAAC,MAAM,EAAE,QAAQ;YACpC,OAAO,UAAU,GAAG,EAAE,KAAK;gBACzB,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;oBACrC,MA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I,CAAC,CAAC;YAChD,CAAC;YACD,SAAS,UAAU;gBACjB,MAAM,IAAI,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;gBAEvC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBAClC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBAClC,IAAI,MAAM,GAAG,EAAE,CAAC;gBAChB,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,MAAM,EAAE;oBACjD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC1B,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,EAAE;wBAChD,MAAM,IAAI,GAAG,CAAC;qBACf;oBACD,IAAI,IAAI,GAAG,EAAE,EAAE;wBACb,MAAM,IAAI,GAAG,CAAC;qBACf;oBACD,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;iBAC3C;gBACD,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;QAED,SAAS,cAAc,CAAC,GAAG;YACzB,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC;YACnB,OAAO,GAAG,CAAC,EAAE,CAAC;YACd,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","file":"Reflect-metadata.js","sourcesContent":["// @ts-nocheck\n/*! *****************************************************************************\nCopyright (C) Microsoft. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\nexport default (function (Reflect) {\n // Metadata Proposal\n // https://rbuckton.github.io/reflect-metadata/\n (function (factory) {\n const exporter = makeExporter(Reflect);\n factory(exporter);\n function makeExporter(target, previous) {\n return function (key, value) {\n if (typeof target[key] !== 'function') {\n Object.defineProperty(target, key, { configurable: true, writable: true, value: value });\n }\n if (previous) {\n previous(key, value);\n }\n };\n }\n })(function (exporter) {\n const hasOwn = Object.prototype.hasOwnProperty;\n // feature test for Symbol support\n const supportsSymbol = typeof Symbol === 'function';\n const toPrimitiveSymbol =\n supportsSymbol && typeof Symbol.toPrimitive !== 'undefined' ? Symbol.toPrimitive : '@@toPrimitive';\n const iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== 'undefined' ? Symbol.iterator : '@@iterator';\n const supportsCreate = typeof Object.create === 'function'; // feature test for Object.create support\n const supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support\n const downLevel = !supportsCreate && !supportsProto;\n const HashMap = {\n // create an object in dictionary mode (a.k.a. \"slow\" mode in v8)\n create: supportsCreate\n ? function () {\n return MakeDictionary(Object.create(null));\n }\n : supportsProto\n ? function () {\n return MakeDictionary({ __proto__: null });\n }\n : function () {\n return MakeDictionary({});\n },\n has: downLevel\n ? function (map, key) {\n return hasOwn.call(map, key);\n }\n : function (map, key) {\n return key in map;\n },\n get: downLevel\n ? function (map, key) {\n return hasOwn.call(map, key) ? map[key] : undefined;\n }\n : function (map, key) {\n return map[key];\n }\n };\n // Load global or shim versions of Map, Set, and WeakMap\n const functionPrototype = Object.getPrototypeOf(Function);\n const usePolyfill =\n typeof process === 'object' && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === 'true';\n const _Map =\n !usePolyfill && typeof Map === 'function' && typeof Map.prototype.entries === 'function'\n ? Map\n : CreateMapPolyfill();\n const _Set =\n !usePolyfill && typeof Set === 'function' && typeof Set.prototype.entries === 'function'\n ? Set\n : CreateSetPolyfill();\n const _WeakMap = !usePolyfill && typeof WeakMap === 'function' ? WeakMap : CreateWeakMapPolyfill();\n // [[Metadata]] internal slot\n // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots\n const Metadata = new _WeakMap();\n /**\n * Applies a set of decorators to a property of a target object.\n * @param decorators An array of decorators.\n * @param target The target object.\n * @param propertyKey (Optional) The property key to decorate.\n * @param attributes (Optional) The property descriptor for the target key.\n * @remarks Decorators are applied in reverse order.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Example = Reflect.decorate(decoratorsArray, Example);\n *\n * // property (on constructor)\n * Reflect.decorate(decoratorsArray, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.decorate(decoratorsArray, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Object.defineProperty(Example, \"staticMethod\",\n * Reflect.decorate(decoratorsArray, Example, \"staticMethod\",\n * Object.getOwnPropertyDescriptor(Example, \"staticMethod\")));\n *\n * // method (on prototype)\n * Object.defineProperty(Example.prototype, \"method\",\n * Reflect.decorate(decoratorsArray, Example.prototype, \"method\",\n * Object.getOwnPropertyDescriptor(Example.prototype, \"method\")));\n *\n */\n // function decorate(decorators, target, propertyKey, attributes) {\n // if (!IsUndefined(propertyKey)) {\n // if (!IsArray(decorators)) throw new TypeError();\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) throw new TypeError();\n // if (IsNull(attributes)) attributes = undefined;\n // propertyKey = ToPropertyKey(propertyKey);\n // return DecorateProperty(decorators, target, propertyKey, attributes);\n // } else {\n // if (!IsArray(decorators)) throw new TypeError();\n // if (!IsConstructor(target)) throw new TypeError();\n // return DecorateConstructor(decorators, target);\n // }\n // }\n // exporter('decorate', decorate);\n // 4.1.2 Reflect.metadata(metadataKey, metadataValue)\n // https://rbuckton.github.io/reflect-metadata/#reflect.metadata\n /**\n * A default metadata decorator factory that can be used on a class, class member, or parameter.\n * @param metadataKey The key for the metadata entry.\n * @param metadataValue The value for the metadata entry.\n * @returns A decorator function.\n * @remarks\n * If `metadataKey` is already defined for the target and target key, the\n * metadataValue for that key will be overwritten.\n * @example\n *\n * // constructor\n * @Reflect.metadata(key, value)\n * class Example {\n * }\n *\n * // property (on constructor, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticProperty;\n * }\n *\n * // property (on prototype, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * property;\n * }\n *\n * // method (on constructor)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticMethod() { }\n * }\n *\n * // method (on prototype)\n * class Example {\n * @Reflect.metadata(key, value)\n * method() { }\n * }\n *\n */\n // function metadata(metadataKey, metadataValue) {\n // function decorator(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) throw new TypeError();\n // OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n // }\n // return decorator;\n // }\n // exporter('metadata', metadata);\n /**\n * Define a unique metadata entry on the target.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param metadataValue A value that contains attached metadata.\n * @param target The target object on which to define metadata.\n * @param propertyKey (Optional) The property key for the target.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Reflect.defineMetadata(\"custom:annotation\", options, Example);\n *\n * // property (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticMethod\");\n *\n * // method (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"method\");\n *\n * // decorator factory as metadata-producing annotation.\n * function MyAnnotation(options): Decorator {\n * return (target, key?) => Reflect.defineMetadata(\"custom:annotation\", options, target, key);\n * }\n *\n */\n function defineMetadata(metadataKey, metadataValue, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n // if (!IsUndefined(propertyKey)) {\n // propertyKey = ToPropertyKey(propertyKey);\n // }\n return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n }\n exporter('defineMetadata', defineMetadata);\n /**\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryHasMetadata(metadataKey, target, propertyKey);\n }\n exporter('hasMetadata', hasMetadata);\n /**\n * Gets a value indicating whether the target object has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasOwnMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);\n }\n exporter('hasOwnMetadata', hasOwnMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function getMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryGetMetadata(metadataKey, target, propertyKey);\n }\n exporter('getMetadata', getMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n // function getOwnMetadata(metadataKey, target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);\n // }\n // exporter('getOwnMetadata', getOwnMetadata);\n /**\n * Gets the metadata keys defined on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"method\");\n *\n */\n // function getMetadataKeys(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryMetadataKeys(target, propertyKey);\n // }\n // exporter('getMetadataKeys', getMetadataKeys);\n /**\n * Gets the unique metadata keys defined on the target object.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"method\");\n *\n */\n // function getOwnMetadataKeys(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryOwnMetadataKeys(target, propertyKey);\n // }\n // exporter('getOwnMetadataKeys', getOwnMetadataKeys);\n /**\n * Deletes the metadata entry from the target object with the provided key.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata entry was found and deleted; otherwise, false.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n // function deleteMetadata(metadataKey, target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);\n // if (IsUndefined(metadataMap)) return false;\n // if (!metadataMap.delete(metadataKey)) return false;\n // if (metadataMap.size > 0) return true;\n // var targetMetadata = Metadata.get(target);\n // targetMetadata.delete(propertyKey);\n // if (targetMetadata.size > 0) return true;\n // Metadata.delete(target);\n // return true;\n // }\n // exporter('deleteMetadata', deleteMetadata);\n // function DecorateConstructor(decorators, target) {\n // for (var i = decorators.length - 1; i >= 0; --i) {\n // var decorator = decorators[i];\n // var decorated = decorator(target);\n // if (!IsUndefined(decorated) && !IsNull(decorated)) {\n // if (!IsConstructor(decorated)) throw new TypeError();\n // target = decorated;\n // }\n // }\n // return target;\n // }\n // function DecorateProperty(decorators, target, propertyKey, descriptor) {\n // for (var i = decorators.length - 1; i >= 0; --i) {\n // var decorator = decorators[i];\n // var decorated = decorator(target, propertyKey, descriptor);\n // if (!IsUndefined(decorated) && !IsNull(decorated)) {\n // if (!IsObject(decorated)) throw new TypeError();\n // descriptor = decorated;\n // }\n // }\n // return descriptor;\n // }\n function GetOrCreateMetadataMap(O, P, Create) {\n // console.count('GetOrCreateMetadataMap');\n let targetMetadata = Metadata.get(O);\n if (IsUndefined(targetMetadata)) {\n if (!Create) {\n return undefined;\n }\n targetMetadata = new _Map();\n Metadata.set(O, targetMetadata);\n }\n let metadataMap = targetMetadata.get(P);\n if (IsUndefined(metadataMap)) {\n if (!Create) {\n return undefined;\n }\n metadataMap = new _Map();\n targetMetadata.set(P, metadataMap);\n }\n return metadataMap;\n }\n // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata\n function OrdinaryHasMetadata(MetadataKey, O, P) {\n const hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) {\n return true;\n }\n const parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent)) {\n return OrdinaryHasMetadata(MetadataKey, parent, P);\n }\n return false;\n }\n // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata\n function OrdinaryHasOwnMetadata(MetadataKey, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap)) {\n return false;\n }\n return ToBoolean(metadataMap.has(MetadataKey));\n }\n // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata\n function OrdinaryGetMetadata(MetadataKey, O, P) {\n const hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) {\n return OrdinaryGetOwnMetadata(MetadataKey, O, P);\n }\n const parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent)) {\n return OrdinaryGetMetadata(MetadataKey, parent, P);\n }\n return undefined;\n }\n // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata\n function OrdinaryGetOwnMetadata(MetadataKey, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap)) {\n return undefined;\n }\n return metadataMap.get(MetadataKey);\n }\n // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata\n function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);\n metadataMap.set(MetadataKey, MetadataValue);\n }\n // 3.1.6.1 OrdinaryMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys\n // function OrdinaryMetadataKeys(O, P) {\n // var ownKeys = OrdinaryOwnMetadataKeys(O, P);\n // var parent = OrdinaryGetPrototypeOf(O);\n // if (parent === null) return ownKeys;\n // var parentKeys = OrdinaryMetadataKeys(parent, P);\n // if (parentKeys.length <= 0) return ownKeys;\n // if (ownKeys.length <= 0) return parentKeys;\n // var set = new _Set();\n // var keys = [];\n // for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {\n // var key = ownKeys_1[_i];\n // var hasKey = set.has(key);\n // if (!hasKey) {\n // set.add(key);\n // keys.push(key);\n // }\n // }\n // for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {\n // var key = parentKeys_1[_a];\n // var hasKey = set.has(key);\n // if (!hasKey) {\n // set.add(key);\n // keys.push(key);\n // }\n // }\n // return keys;\n // }\n // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys\n // function OrdinaryOwnMetadataKeys(O, P) {\n // var keys = [];\n // var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n // if (IsUndefined(metadataMap)) return keys;\n // var keysObj = metadataMap.keys();\n // var iterator = GetIterator(keysObj);\n // var k = 0;\n // while (true) {\n // var next = IteratorStep(iterator);\n // if (!next) {\n // keys.length = k;\n // return keys;\n // }\n // var nextValue = IteratorValue(next);\n // try {\n // keys[k] = nextValue;\n // } catch (e) {\n // try {\n // IteratorClose(iterator);\n // } finally {\n // throw e;\n // }\n // }\n // k++;\n // }\n // }\n // 6 ECMAScript Data Typ0es and Values\n // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values\n function Type(x) {\n if (x === null) {\n return 1 /* Null */;\n }\n switch (typeof x) {\n case 'undefined':\n return 0 /* Undefined */;\n case 'boolean':\n return 2 /* Boolean */;\n case 'string':\n return 3 /* String */;\n case 'symbol':\n return 4 /* Symbol */;\n case 'number':\n return 5 /* Number */;\n case 'object':\n return x === null ? 1 /* Null */ : 6 /* Object */;\n default:\n return 6 /* Object */;\n }\n }\n // 6.1.1 The Undefined Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type\n function IsUndefined(x) {\n return x === undefined;\n }\n // 6.1.2 The Null Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type\n function IsNull(x) {\n return x === null;\n }\n // 6.1.5 The Symbol Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type\n function IsSymbol(x) {\n return typeof x === 'symbol';\n }\n // 6.1.7 The Object Type\n // https://tc39.github.io/ecma262/#sec-object-type\n function IsObject(x) {\n return typeof x === 'object' ? x !== null : typeof x === 'function';\n }\n // 7.1 Type Conversion\n // https://tc39.github.io/ecma262/#sec-type-conversion\n // 7.1.1 ToPrimitive(input [, PreferredType])\n // https://tc39.github.io/ecma262/#sec-toprimitive\n function ToPrimitive(input, PreferredType) {\n switch (Type(input)) {\n case 0 /* Undefined */:\n return input;\n case 1 /* Null */:\n return input;\n case 2 /* Boolean */:\n return input;\n case 3 /* String */:\n return input;\n case 4 /* Symbol */:\n return input;\n case 5 /* Number */:\n return input;\n }\n const hint =\n PreferredType === 3 /* String */ ? 'string' : PreferredType === 5 /* Number */ ? 'number' : 'default';\n const exoticToPrim = GetMethod(input, toPrimitiveSymbol);\n if (exoticToPrim !== undefined) {\n const result = exoticToPrim.call(input, hint);\n if (IsObject(result)) {\n throw new TypeError();\n }\n return result;\n }\n return OrdinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n }\n // 7.1.1.1 OrdinaryToPrimitive(O, hint)\n // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive\n function OrdinaryToPrimitive(O, hint) {\n if (hint === 'string') {\n const toString_1 = O.toString;\n if (IsCallable(toString_1)) {\n const result = toString_1.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n const valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n const result = valueOf.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n } else {\n const valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n const result = valueOf.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n const toString_2 = O.toString;\n if (IsCallable(toString_2)) {\n const result = toString_2.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n }\n throw new TypeError();\n }\n // 7.1.2 ToBoolean(argument)\n // https://tc39.github.io/ecma262/2016/#sec-toboolean\n function ToBoolean(argument) {\n return !!argument;\n }\n // 7.1.12 ToString(argument)\n // https://tc39.github.io/ecma262/#sec-tostring\n function ToString(argument) {\n return '' + argument;\n }\n // 7.1.14 ToPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-topropertykey\n function ToPropertyKey(argument) {\n const key = ToPrimitive(argument, 3 /* String */);\n if (IsSymbol(key)) {\n return key;\n }\n return ToString(key);\n }\n // 7.2 Testing and Comparison Operations\n // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations\n // 7.2.2 IsArray(argument)\n // https://tc39.github.io/ecma262/#sec-isarray\n // function IsArray(argument) {\n // return Array.isArray\n // ? Array.isArray(argument)\n // : argument instanceof Object\n // ? argument instanceof Array\n // : Object.prototype.toString.call(argument) === '[object Array]';\n // }\n // 7.2.3 IsCallable(argument)\n // https://tc39.github.io/ecma262/#sec-iscallable\n function IsCallable(argument) {\n // NOTE: This is an approximation as we cannot check for [[Call]] internal method.\n return typeof argument === 'function';\n }\n // 7.2.4 IsConstructor(argument)\n // https://tc39.github.io/ecma262/#sec-isconstructor\n // function IsConstructor(argument) {\n // // NOTE: This is an approximation as we cannot check for [[Construct]] internal method.\n // return typeof argument === 'function';\n // }\n // 7.2.7 IsPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-ispropertykey\n // function IsPropertyKey(argument) {\n // switch (Type(argument)) {\n // case 3 /* String */:\n // return true;\n // case 4 /* Symbol */:\n // return true;\n // default:\n // return false;\n // }\n // }\n // 7.3 Operations on Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-objects\n // 7.3.9 GetMethod(V, P)\n // https://tc39.github.io/ecma262/#sec-getmethod\n function GetMethod(V, P) {\n const func = V[P];\n if (func === undefined || func === null) {\n return undefined;\n }\n if (!IsCallable(func)) {\n throw new TypeError();\n }\n return func;\n }\n // 7.4 Operations on Iterator Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects\n // function GetIterator(obj) {\n // var method = GetMethod(obj, iteratorSymbol);\n // if (!IsCallable(method)) throw new TypeError(); // from Call\n // var iterator = method.call(obj);\n // if (!IsObject(iterator)) throw new TypeError();\n // return iterator;\n // }\n // // 7.4.4 IteratorValue(iterResult)\n // // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue\n // function IteratorValue(iterResult) {\n // return iterResult.value;\n // }\n // // 7.4.5 IteratorStep(iterator)\n // // https://tc39.github.io/ecma262/#sec-iteratorstep\n // function IteratorStep(iterator) {\n // var result = iterator.next();\n // return result.done ? false : result;\n // }\n // // 7.4.6 IteratorClose(iterator, completion)\n // // https://tc39.github.io/ecma262/#sec-iteratorclose\n // function IteratorClose(iterator) {\n // var f = iterator['return'];\n // if (f) f.call(iterator);\n // }\n // 9.1 Ordinary Object Internal Methods and Internal Slots\n // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots\n // 9.1.1.1 OrdinaryGetPrototypeOf(O)\n // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof\n function OrdinaryGetPrototypeOf(O) {\n const proto = Object.getPrototypeOf(O);\n if (typeof O !== 'function' || O === functionPrototype) {\n return proto;\n }\n // TypeScript doesn't set __proto__ in ES5, as it's non-standard.\n // Try to determine the superclass constructor. Compatible implementations\n // must either set __proto__ on a subclass constructor to the superclass constructor,\n // or ensure each class has a valid `constructor` property on its prototype that\n // points back to the constructor.\n // If this is not the same as Function.[[Prototype]], then this is definately inherited.\n // This is the case when in ES6 or when using __proto__ in a compatible browser.\n if (proto !== functionPrototype) {\n return proto;\n }\n // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.\n const prototype = O.prototype;\n const prototypeProto = prototype && Object.getPrototypeOf(prototype);\n if (prototypeProto == null || prototypeProto === Object.prototype) {\n return proto;\n }\n // If the constructor was not a function, then we cannot determine the heritage.\n const constructor = prototypeProto.constructor;\n if (typeof constructor !== 'function') {\n return proto;\n }\n // If we have some kind of self-reference, then we cannot determine the heritage.\n if (constructor === O) {\n return proto;\n }\n // we have a pretty good guess at the heritage.\n return constructor;\n }\n // naive Map shim\n function CreateMapPolyfill() {\n const cacheSentinel = {};\n const arraySentinel = [];\n const MapIterator = /** @class */ (function () {\n function MapIterator(keys, values, selector) {\n this._index = 0;\n this._keys = keys;\n this._values = values;\n this._selector = selector;\n }\n MapIterator.prototype['@@iterator'] = function () {\n return this;\n };\n MapIterator.prototype[iteratorSymbol] = function () {\n return this;\n };\n MapIterator.prototype.next = function () {\n const index = this._index;\n if (index >= 0 && index < this._keys.length) {\n const result = this._selector(this._keys[index], this._values[index]);\n if (index + 1 >= this._keys.length) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n } else {\n this._index++;\n }\n return { value: result, done: false };\n }\n return { value: undefined, done: true };\n };\n MapIterator.prototype.throw = function (error) {\n if (this._index >= 0) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n }\n throw error;\n };\n MapIterator.prototype.return = function (value) {\n if (this._index >= 0) {\n this._index = -1;\n this._keys = arraySentinel;\n this._values = arraySentinel;\n }\n return { value: value, done: true };\n };\n return MapIterator;\n })();\n return /** @class */ (function () {\n function Map() {\n this._keys = [];\n this._values = [];\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n }\n Object.defineProperty(Map.prototype, 'size', {\n get: function () {\n return this._keys.length;\n },\n enumerable: true,\n configurable: true\n });\n Map.prototype.has = function (key) {\n return this._find(key, /*insert*/ false) >= 0;\n };\n Map.prototype.get = function (key) {\n const index = this._find(key, /*insert*/ false);\n return index >= 0 ? this._values[index] : undefined;\n };\n Map.prototype.set = function (key, value) {\n const index = this._find(key, /*insert*/ true);\n this._values[index] = value;\n return this;\n };\n Map.prototype.delete = function (key) {\n const index = this._find(key, /*insert*/ false);\n if (index >= 0) {\n const size = this._keys.length;\n for (let i = index + 1; i < size; i++) {\n this._keys[i - 1] = this._keys[i];\n this._values[i - 1] = this._values[i];\n }\n this._keys.length--;\n this._values.length--;\n if (key === this._cacheKey) {\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n }\n return true;\n }\n return false;\n };\n Map.prototype.clear = function () {\n this._keys.length = 0;\n this._values.length = 0;\n this._cacheKey = cacheSentinel;\n this._cacheIndex = -2;\n };\n Map.prototype.keys = function () {\n return new MapIterator(this._keys, this._values, getKey);\n };\n Map.prototype.values = function () {\n return new MapIterator(this._keys, this._values, getValue);\n };\n Map.prototype.entries = function () {\n return new MapIterator(this._keys, this._values, getEntry);\n };\n Map.prototype['@@iterator'] = function () {\n return this.entries();\n };\n Map.prototype[iteratorSymbol] = function () {\n return this.entries();\n };\n Map.prototype._find = function (key, insert) {\n if (this._cacheKey !== key) {\n this._cacheIndex = this._keys.indexOf((this._cacheKey = key));\n }\n if (this._cacheIndex < 0 && insert) {\n this._cacheIndex = this._keys.length;\n this._keys.push(key);\n this._values.push(undefined);\n }\n return this._cacheIndex;\n };\n return Map;\n })();\n function getKey(key, _) {\n return key;\n }\n function getValue(_, value) {\n return value;\n }\n function getEntry(key, value) {\n return [key, value];\n }\n }\n // naive Set shim\n function CreateSetPolyfill() {\n return /** @class */ (function () {\n function Set() {\n this._map = new _Map();\n }\n Object.defineProperty(Set.prototype, 'size', {\n get: function () {\n return this._map.size;\n },\n enumerable: true,\n configurable: true\n });\n Set.prototype.has = function (value) {\n return this._map.has(value);\n };\n Set.prototype.add = function (value) {\n return this._map.set(value, value), this;\n };\n Set.prototype.delete = function (value) {\n return this._map.delete(value);\n };\n Set.prototype.clear = function () {\n this._map.clear();\n };\n Set.prototype.keys = function () {\n return this._map.keys();\n };\n Set.prototype.values = function () {\n return this._map.values();\n };\n Set.prototype.entries = function () {\n return this._map.entries();\n };\n Set.prototype['@@iterator'] = function () {\n return this.keys();\n };\n Set.prototype[iteratorSymbol] = function () {\n return this.keys();\n };\n return Set;\n })();\n }\n // naive WeakMap shim\n function CreateWeakMapPolyfill() {\n const UUID_SIZE = 16;\n const keys = HashMap.create();\n const rootKey = CreateUniqueKey();\n return /** @class */ (function () {\n function WeakMap() {\n this._key = CreateUniqueKey();\n }\n WeakMap.prototype.has = function (target) {\n const table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? HashMap.has(table, this._key) : false;\n };\n WeakMap.prototype.get = function (target) {\n const table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? HashMap.get(table, this._key) : undefined;\n };\n WeakMap.prototype.set = function (target, value) {\n const table = GetOrCreateWeakMapTable(target, /*create*/ true);\n table[this._key] = value;\n return this;\n };\n WeakMap.prototype.delete = function (target) {\n const table = GetOrCreateWeakMapTable(target, /*create*/ false);\n return table !== undefined ? delete table[this._key] : false;\n };\n WeakMap.prototype.clear = function () {\n // NOTE: not a real clear, just makes the previous data unreachable\n this._key = CreateUniqueKey();\n };\n return WeakMap;\n })();\n function CreateUniqueKey() {\n let key;\n do {\n key = '@@WeakMap@@' + CreateUUID();\n } while (HashMap.has(keys, key));\n keys[key] = true;\n return key;\n }\n function GetOrCreateWeakMapTable(target, create) {\n if (!hasOwn.call(target, rootKey)) {\n if (!create) {\n return undefined;\n }\n Object.defineProperty(target, rootKey, { value: HashMap.create() });\n }\n return target[rootKey];\n }\n function FillRandomBytes(buffer, size) {\n for (let i = 0; i < size; ++i) {\n buffer[i] = (Math.random() * 0xff) | 0;\n }\n return buffer;\n }\n function GenRandomBytes(size) {\n if (typeof Uint8Array === 'function') {\n if (typeof crypto !== 'undefined') {\n return crypto.getRandomValues(new Uint8Array(size));\n }\n // @ts-ignore\n // if (typeof msCrypto !== 'undefined') return msCrypto.getRandomValues(new Uint8Array(size));\n return FillRandomBytes(new Uint8Array(size), size);\n }\n return FillRandomBytes(new Array(size), size);\n }\n function CreateUUID() {\n const data = GenRandomBytes(UUID_SIZE);\n // mark as random - RFC 4122 § 4.4\n data[6] = (data[6] & 0x4f) | 0x40;\n data[8] = (data[8] & 0xbf) | 0x80;\n let result = '';\n for (let offset = 0; offset < UUID_SIZE; ++offset) {\n const byte = data[offset];\n if (offset === 4 || offset === 6 || offset === 8) {\n result += '-';\n }\n if (byte < 16) {\n result += '0';\n }\n result += byte.toString(16).toLowerCase();\n }\n return result;\n }\n }\n // uses a heuristic used by v8 and chakra to force an object into dictionary mode.\n function MakeDictionary(obj) {\n obj.__ = undefined;\n delete obj.__;\n return obj;\n }\n });\n\n return Reflect;\n})({});\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/common/Reflect-metadata.ts"],"names":[],"mappings":"AAeA,eAAe,CAAC,UAAU,OAAO;IAG/B,CAAC,UAA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I,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACrB,MAAM,IAAI,SAAS,EAAE,CAAC;aACvB;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QA+BD,SAAS,sBAAsB,CAAC,CAAC;YAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,iBAAiB,EAAE;gBACtD,OAAO,KAAK,CAAC;aACd;YAQD,IAAI,KAAK,KAAK,iBAAiB,EAAE;gBAC/B,OAAO,KAAK,CAAC;aACd;YAED,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;YAC9B,MAAM,cAAc,GAAG,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YACrE,IAAI,cAAc,IAAI,IAAI,IAAI,cAAc,KAAK,MAAM,CAAC,SAAS,EAAE;gBACjE,OAAO,KAAK,CAAC;aACd;YAED,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC;YAC/C,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE;gBACrC,OAAO,KAAK,CAAC;aACd;YAED,IAAI,WAAW,KAAK,CAAC,EAAE;gBACrB,OAAO,KAAK,CAAC;aACd;YAED,OAAO,WAAW,CAAC;QACrB,CAAC;QAED,SAAS,cAAc,CAAC,GAAG;YACzB,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC;YACnB,OAAO,GAAG,CAAC,EAAE,CAAC;YACd,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","file":"Reflect-metadata.js","sourcesContent":["// @ts-nocheck\n/*! *****************************************************************************\nCopyright (C) Microsoft. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\nexport default (function (Reflect) {\n // Metadata Proposal\n // https://rbuckton.github.io/reflect-metadata/\n (function (factory) {\n const exporter = makeExporter(Reflect);\n factory(exporter);\n function makeExporter(target, previous) {\n return function (key, value) {\n if (typeof target[key] !== 'function') {\n Object.defineProperty(target, key, { configurable: true, writable: true, value: value });\n }\n if (previous) {\n previous(key, value);\n }\n };\n }\n })(function (exporter) {\n const hasOwn = Object.prototype.hasOwnProperty;\n // feature test for Symbol support\n const supportsSymbol = typeof Symbol === 'function';\n const toPrimitiveSymbol =\n supportsSymbol && typeof Symbol.toPrimitive !== 'undefined' ? Symbol.toPrimitive : '@@toPrimitive';\n const iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== 'undefined' ? Symbol.iterator : '@@iterator';\n const supportsCreate = typeof Object.create === 'function'; // feature test for Object.create support\n const supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support\n const downLevel = !supportsCreate && !supportsProto;\n const HashMap = {\n // create an object in dictionary mode (a.k.a. \"slow\" mode in v8)\n create: supportsCreate\n ? function () {\n return MakeDictionary(Object.create(null));\n }\n : supportsProto\n ? function () {\n return MakeDictionary({ __proto__: null });\n }\n : function () {\n return MakeDictionary({});\n },\n has: downLevel\n ? function (map, key) {\n return hasOwn.call(map, key);\n }\n : function (map, key) {\n return key in map;\n },\n get: downLevel\n ? function (map, key) {\n return hasOwn.call(map, key) ? map[key] : undefined;\n }\n : function (map, key) {\n return map[key];\n }\n };\n // Load global or shim versions of Map, Set, and WeakMap\n const functionPrototype = Object.getPrototypeOf(Function);\n const usePolyfill =\n typeof process === 'object' && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === 'true';\n const _Map = Map;\n const _Set = Set;\n const _WeakMap = WeakMap;\n // [[Metadata]] internal slot\n // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots\n const Metadata = new _WeakMap();\n /**\n * Applies a set of decorators to a property of a target object.\n * @param decorators An array of decorators.\n * @param target The target object.\n * @param propertyKey (Optional) The property key to decorate.\n * @param attributes (Optional) The property descriptor for the target key.\n * @remarks Decorators are applied in reverse order.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Example = Reflect.decorate(decoratorsArray, Example);\n *\n * // property (on constructor)\n * Reflect.decorate(decoratorsArray, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.decorate(decoratorsArray, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Object.defineProperty(Example, \"staticMethod\",\n * Reflect.decorate(decoratorsArray, Example, \"staticMethod\",\n * Object.getOwnPropertyDescriptor(Example, \"staticMethod\")));\n *\n * // method (on prototype)\n * Object.defineProperty(Example.prototype, \"method\",\n * Reflect.decorate(decoratorsArray, Example.prototype, \"method\",\n * Object.getOwnPropertyDescriptor(Example.prototype, \"method\")));\n *\n */\n // function decorate(decorators, target, propertyKey, attributes) {\n // if (!IsUndefined(propertyKey)) {\n // if (!IsArray(decorators)) throw new TypeError();\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) throw new TypeError();\n // if (IsNull(attributes)) attributes = undefined;\n // propertyKey = ToPropertyKey(propertyKey);\n // return DecorateProperty(decorators, target, propertyKey, attributes);\n // } else {\n // if (!IsArray(decorators)) throw new TypeError();\n // if (!IsConstructor(target)) throw new TypeError();\n // return DecorateConstructor(decorators, target);\n // }\n // }\n // exporter('decorate', decorate);\n // 4.1.2 Reflect.metadata(metadataKey, metadataValue)\n // https://rbuckton.github.io/reflect-metadata/#reflect.metadata\n /**\n * A default metadata decorator factory that can be used on a class, class member, or parameter.\n * @param metadataKey The key for the metadata entry.\n * @param metadataValue The value for the metadata entry.\n * @returns A decorator function.\n * @remarks\n * If `metadataKey` is already defined for the target and target key, the\n * metadataValue for that key will be overwritten.\n * @example\n *\n * // constructor\n * @Reflect.metadata(key, value)\n * class Example {\n * }\n *\n * // property (on constructor, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticProperty;\n * }\n *\n * // property (on prototype, TypeScript only)\n * class Example {\n * @Reflect.metadata(key, value)\n * property;\n * }\n *\n * // method (on constructor)\n * class Example {\n * @Reflect.metadata(key, value)\n * static staticMethod() { }\n * }\n *\n * // method (on prototype)\n * class Example {\n * @Reflect.metadata(key, value)\n * method() { }\n * }\n *\n */\n // function metadata(metadataKey, metadataValue) {\n // function decorator(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) throw new TypeError();\n // OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n // }\n // return decorator;\n // }\n // exporter('metadata', metadata);\n /**\n * Define a unique metadata entry on the target.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param metadataValue A value that contains attached metadata.\n * @param target The target object on which to define metadata.\n * @param propertyKey (Optional) The property key for the target.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * Reflect.defineMetadata(\"custom:annotation\", options, Example);\n *\n * // property (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticProperty\");\n *\n * // property (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"property\");\n *\n * // method (on constructor)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example, \"staticMethod\");\n *\n * // method (on prototype)\n * Reflect.defineMetadata(\"custom:annotation\", options, Example.prototype, \"method\");\n *\n * // decorator factory as metadata-producing annotation.\n * function MyAnnotation(options): Decorator {\n * return (target, key?) => Reflect.defineMetadata(\"custom:annotation\", options, target, key);\n * }\n *\n */\n function defineMetadata(metadataKey, metadataValue, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n // if (!IsUndefined(propertyKey)) {\n // propertyKey = ToPropertyKey(propertyKey);\n // }\n return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);\n }\n exporter('defineMetadata', defineMetadata);\n /**\n * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryHasMetadata(metadataKey, target, propertyKey);\n }\n exporter('hasMetadata', hasMetadata);\n /**\n * Gets a value indicating whether the target object has the provided metadata key defined.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.hasOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function hasOwnMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);\n }\n exporter('hasOwnMetadata', hasOwnMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object or its prototype chain.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n function getMetadata(metadataKey, target, propertyKey) {\n if (!IsObject(target)) {\n throw new TypeError();\n }\n if (!IsUndefined(propertyKey)) {\n propertyKey = ToPropertyKey(propertyKey);\n }\n return OrdinaryGetMetadata(metadataKey, target, propertyKey);\n }\n exporter('getMetadata', getMetadata);\n /**\n * Gets the metadata value for the provided metadata key on the target object.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns The metadata value for the metadata key if found; otherwise, `undefined`.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n // function getOwnMetadata(metadataKey, target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);\n // }\n // exporter('getOwnMetadata', getOwnMetadata);\n /**\n * Gets the metadata keys defined on the target object or its prototype chain.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getMetadataKeys(Example.prototype, \"method\");\n *\n */\n // function getMetadataKeys(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryMetadataKeys(target, propertyKey);\n // }\n // exporter('getMetadataKeys', getMetadataKeys);\n /**\n * Gets the unique metadata keys defined on the target object.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns An array of unique metadata keys.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.getOwnMetadataKeys(Example);\n *\n * // property (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.getOwnMetadataKeys(Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.getOwnMetadataKeys(Example.prototype, \"method\");\n *\n */\n // function getOwnMetadataKeys(target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // return OrdinaryOwnMetadataKeys(target, propertyKey);\n // }\n // exporter('getOwnMetadataKeys', getOwnMetadataKeys);\n /**\n * Deletes the metadata entry from the target object with the provided key.\n * @param metadataKey A key used to store and retrieve metadata.\n * @param target The target object on which the metadata is defined.\n * @param propertyKey (Optional) The property key for the target.\n * @returns `true` if the metadata entry was found and deleted; otherwise, false.\n * @example\n *\n * class Example {\n * // property declarations are not part of ES6, though they are valid in TypeScript:\n * // static staticProperty;\n * // property;\n *\n * constructor(p) { }\n * static staticMethod(p) { }\n * method(p) { }\n * }\n *\n * // constructor\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example);\n *\n * // property (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticProperty\");\n *\n * // property (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"property\");\n *\n * // method (on constructor)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example, \"staticMethod\");\n *\n * // method (on prototype)\n * result = Reflect.deleteMetadata(\"custom:annotation\", Example.prototype, \"method\");\n *\n */\n // function deleteMetadata(metadataKey, target, propertyKey) {\n // if (!IsObject(target)) throw new TypeError();\n // if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);\n // var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false);\n // if (IsUndefined(metadataMap)) return false;\n // if (!metadataMap.delete(metadataKey)) return false;\n // if (metadataMap.size > 0) return true;\n // var targetMetadata = Metadata.get(target);\n // targetMetadata.delete(propertyKey);\n // if (targetMetadata.size > 0) return true;\n // Metadata.delete(target);\n // return true;\n // }\n // exporter('deleteMetadata', deleteMetadata);\n // function DecorateConstructor(decorators, target) {\n // for (var i = decorators.length - 1; i >= 0; --i) {\n // var decorator = decorators[i];\n // var decorated = decorator(target);\n // if (!IsUndefined(decorated) && !IsNull(decorated)) {\n // if (!IsConstructor(decorated)) throw new TypeError();\n // target = decorated;\n // }\n // }\n // return target;\n // }\n // function DecorateProperty(decorators, target, propertyKey, descriptor) {\n // for (var i = decorators.length - 1; i >= 0; --i) {\n // var decorator = decorators[i];\n // var decorated = decorator(target, propertyKey, descriptor);\n // if (!IsUndefined(decorated) && !IsNull(decorated)) {\n // if (!IsObject(decorated)) throw new TypeError();\n // descriptor = decorated;\n // }\n // }\n // return descriptor;\n // }\n function GetOrCreateMetadataMap(O, P, Create) {\n // console.count('GetOrCreateMetadataMap');\n let targetMetadata = Metadata.get(O);\n if (IsUndefined(targetMetadata)) {\n if (!Create) {\n return undefined;\n }\n targetMetadata = new _Map();\n Metadata.set(O, targetMetadata);\n }\n let metadataMap = targetMetadata.get(P);\n if (IsUndefined(metadataMap)) {\n if (!Create) {\n return undefined;\n }\n metadataMap = new _Map();\n targetMetadata.set(P, metadataMap);\n }\n return metadataMap;\n }\n // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata\n function OrdinaryHasMetadata(MetadataKey, O, P) {\n const hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) {\n return true;\n }\n const parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent)) {\n return OrdinaryHasMetadata(MetadataKey, parent, P);\n }\n return false;\n }\n // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata\n function OrdinaryHasOwnMetadata(MetadataKey, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap)) {\n return false;\n }\n return ToBoolean(metadataMap.has(MetadataKey));\n }\n // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata\n function OrdinaryGetMetadata(MetadataKey, O, P) {\n const hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);\n if (hasOwn) {\n return OrdinaryGetOwnMetadata(MetadataKey, O, P);\n }\n const parent = OrdinaryGetPrototypeOf(O);\n if (!IsNull(parent)) {\n return OrdinaryGetMetadata(MetadataKey, parent, P);\n }\n return undefined;\n }\n // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata\n function OrdinaryGetOwnMetadata(MetadataKey, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n if (IsUndefined(metadataMap)) {\n return undefined;\n }\n return metadataMap.get(MetadataKey);\n }\n // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata\n function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {\n const metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true);\n metadataMap.set(MetadataKey, MetadataValue);\n }\n // 3.1.6.1 OrdinaryMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys\n // function OrdinaryMetadataKeys(O, P) {\n // var ownKeys = OrdinaryOwnMetadataKeys(O, P);\n // var parent = OrdinaryGetPrototypeOf(O);\n // if (parent === null) return ownKeys;\n // var parentKeys = OrdinaryMetadataKeys(parent, P);\n // if (parentKeys.length <= 0) return ownKeys;\n // if (ownKeys.length <= 0) return parentKeys;\n // var set = new _Set();\n // var keys = [];\n // for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {\n // var key = ownKeys_1[_i];\n // var hasKey = set.has(key);\n // if (!hasKey) {\n // set.add(key);\n // keys.push(key);\n // }\n // }\n // for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) {\n // var key = parentKeys_1[_a];\n // var hasKey = set.has(key);\n // if (!hasKey) {\n // set.add(key);\n // keys.push(key);\n // }\n // }\n // return keys;\n // }\n // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P)\n // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys\n // function OrdinaryOwnMetadataKeys(O, P) {\n // var keys = [];\n // var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false);\n // if (IsUndefined(metadataMap)) return keys;\n // var keysObj = metadataMap.keys();\n // var iterator = GetIterator(keysObj);\n // var k = 0;\n // while (true) {\n // var next = IteratorStep(iterator);\n // if (!next) {\n // keys.length = k;\n // return keys;\n // }\n // var nextValue = IteratorValue(next);\n // try {\n // keys[k] = nextValue;\n // } catch (e) {\n // try {\n // IteratorClose(iterator);\n // } finally {\n // throw e;\n // }\n // }\n // k++;\n // }\n // }\n // 6 ECMAScript Data Typ0es and Values\n // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values\n function Type(x) {\n if (x === null) {\n return 1 /* Null */;\n }\n switch (typeof x) {\n case 'undefined':\n return 0 /* Undefined */;\n case 'boolean':\n return 2 /* Boolean */;\n case 'string':\n return 3 /* String */;\n case 'symbol':\n return 4 /* Symbol */;\n case 'number':\n return 5 /* Number */;\n case 'object':\n return x === null ? 1 /* Null */ : 6 /* Object */;\n default:\n return 6 /* Object */;\n }\n }\n // 6.1.1 The Undefined Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type\n function IsUndefined(x) {\n return x === undefined;\n }\n // 6.1.2 The Null Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type\n function IsNull(x) {\n return x === null;\n }\n // 6.1.5 The Symbol Type\n // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type\n function IsSymbol(x) {\n return typeof x === 'symbol';\n }\n // 6.1.7 The Object Type\n // https://tc39.github.io/ecma262/#sec-object-type\n function IsObject(x) {\n return typeof x === 'object' ? x !== null : typeof x === 'function';\n }\n // 7.1 Type Conversion\n // https://tc39.github.io/ecma262/#sec-type-conversion\n // 7.1.1 ToPrimitive(input [, PreferredType])\n // https://tc39.github.io/ecma262/#sec-toprimitive\n function ToPrimitive(input, PreferredType) {\n switch (Type(input)) {\n case 0 /* Undefined */:\n return input;\n case 1 /* Null */:\n return input;\n case 2 /* Boolean */:\n return input;\n case 3 /* String */:\n return input;\n case 4 /* Symbol */:\n return input;\n case 5 /* Number */:\n return input;\n }\n const hint =\n PreferredType === 3 /* String */ ? 'string' : PreferredType === 5 /* Number */ ? 'number' : 'default';\n const exoticToPrim = GetMethod(input, toPrimitiveSymbol);\n if (exoticToPrim !== undefined) {\n const result = exoticToPrim.call(input, hint);\n if (IsObject(result)) {\n throw new TypeError();\n }\n return result;\n }\n return OrdinaryToPrimitive(input, hint === 'default' ? 'number' : hint);\n }\n // 7.1.1.1 OrdinaryToPrimitive(O, hint)\n // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive\n function OrdinaryToPrimitive(O, hint) {\n if (hint === 'string') {\n const toString_1 = O.toString;\n if (IsCallable(toString_1)) {\n const result = toString_1.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n const valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n const result = valueOf.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n } else {\n const valueOf = O.valueOf;\n if (IsCallable(valueOf)) {\n const result = valueOf.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n const toString_2 = O.toString;\n if (IsCallable(toString_2)) {\n const result = toString_2.call(O);\n if (!IsObject(result)) {\n return result;\n }\n }\n }\n throw new TypeError();\n }\n // 7.1.2 ToBoolean(argument)\n // https://tc39.github.io/ecma262/2016/#sec-toboolean\n function ToBoolean(argument) {\n return !!argument;\n }\n // 7.1.12 ToString(argument)\n // https://tc39.github.io/ecma262/#sec-tostring\n function ToString(argument) {\n return '' + argument;\n }\n // 7.1.14 ToPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-topropertykey\n function ToPropertyKey(argument) {\n const key = ToPrimitive(argument, 3 /* String */);\n if (IsSymbol(key)) {\n return key;\n }\n return ToString(key);\n }\n // 7.2 Testing and Comparison Operations\n // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations\n // 7.2.2 IsArray(argument)\n // https://tc39.github.io/ecma262/#sec-isarray\n // function IsArray(argument) {\n // return Array.isArray\n // ? Array.isArray(argument)\n // : argument instanceof Object\n // ? argument instanceof Array\n // : Object.prototype.toString.call(argument) === '[object Array]';\n // }\n // 7.2.3 IsCallable(argument)\n // https://tc39.github.io/ecma262/#sec-iscallable\n function IsCallable(argument) {\n // NOTE: This is an approximation as we cannot check for [[Call]] internal method.\n return typeof argument === 'function';\n }\n // 7.2.4 IsConstructor(argument)\n // https://tc39.github.io/ecma262/#sec-isconstructor\n // function IsConstructor(argument) {\n // // NOTE: This is an approximation as we cannot check for [[Construct]] internal method.\n // return typeof argument === 'function';\n // }\n // 7.2.7 IsPropertyKey(argument)\n // https://tc39.github.io/ecma262/#sec-ispropertykey\n // function IsPropertyKey(argument) {\n // switch (Type(argument)) {\n // case 3 /* String */:\n // return true;\n // case 4 /* Symbol */:\n // return true;\n // default:\n // return false;\n // }\n // }\n // 7.3 Operations on Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-objects\n // 7.3.9 GetMethod(V, P)\n // https://tc39.github.io/ecma262/#sec-getmethod\n function GetMethod(V, P) {\n const func = V[P];\n if (func === undefined || func === null) {\n return undefined;\n }\n if (!IsCallable(func)) {\n throw new TypeError();\n }\n return func;\n }\n // 7.4 Operations on Iterator Objects\n // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects\n // function GetIterator(obj) {\n // var method = GetMethod(obj, iteratorSymbol);\n // if (!IsCallable(method)) throw new TypeError(); // from Call\n // var iterator = method.call(obj);\n // if (!IsObject(iterator)) throw new TypeError();\n // return iterator;\n // }\n // // 7.4.4 IteratorValue(iterResult)\n // // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue\n // function IteratorValue(iterResult) {\n // return iterResult.value;\n // }\n // // 7.4.5 IteratorStep(iterator)\n // // https://tc39.github.io/ecma262/#sec-iteratorstep\n // function IteratorStep(iterator) {\n // var result = iterator.next();\n // return result.done ? false : result;\n // }\n // // 7.4.6 IteratorClose(iterator, completion)\n // // https://tc39.github.io/ecma262/#sec-iteratorclose\n // function IteratorClose(iterator) {\n // var f = iterator['return'];\n // if (f) f.call(iterator);\n // }\n // 9.1 Ordinary Object Internal Methods and Internal Slots\n // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots\n // 9.1.1.1 OrdinaryGetPrototypeOf(O)\n // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof\n function OrdinaryGetPrototypeOf(O) {\n const proto = Object.getPrototypeOf(O);\n if (typeof O !== 'function' || O === functionPrototype) {\n return proto;\n }\n // TypeScript doesn't set __proto__ in ES5, as it's non-standard.\n // Try to determine the superclass constructor. Compatible implementations\n // must either set __proto__ on a subclass constructor to the superclass constructor,\n // or ensure each class has a valid `constructor` property on its prototype that\n // points back to the constructor.\n // If this is not the same as Function.[[Prototype]], then this is definately inherited.\n // This is the case when in ES6 or when using __proto__ in a compatible browser.\n if (proto !== functionPrototype) {\n return proto;\n }\n // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.\n const prototype = O.prototype;\n const prototypeProto = prototype && Object.getPrototypeOf(prototype);\n if (prototypeProto == null || prototypeProto === Object.prototype) {\n return proto;\n }\n // If the constructor was not a function, then we cannot determine the heritage.\n const constructor = prototypeProto.constructor;\n if (typeof constructor !== 'function') {\n return proto;\n }\n // If we have some kind of self-reference, then we cannot determine the heritage.\n if (constructor === O) {\n return proto;\n }\n // we have a pretty good guess at the heritage.\n return constructor;\n }\n // uses a heuristic used by v8 and chakra to force an object into dictionary mode.\n function MakeDictionary(obj) {\n obj.__ = undefined;\n delete obj.__;\n return obj;\n }\n });\n\n return Reflect;\n})({});\n"]}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { IContext2d, ICustomPath2D } from '../../interface';
|
|
2
|
-
|
|
2
|
+
type IEdgeCb = (x1: number, y1: number, x2: number, y2: number) => void;
|
|
3
|
+
export declare function createRectPath(path: ICustomPath2D | IContext2d, x: number, y: number, width: number, height: number, rectCornerRadius: number | number[], edgeCb?: IEdgeCb[]): void | ICustomPath2D | IContext2d;
|
|
4
|
+
export {};
|
package/es/common/shape/rect.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isNumber, arrayEqual, pi, abs } from "@visactor/vutils";
|
|
|
2
2
|
|
|
3
3
|
const halfPi = pi / 2;
|
|
4
4
|
|
|
5
|
-
export function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
5
|
+
export function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
|
|
6
6
|
let cornerRadius;
|
|
7
7
|
if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height),
|
|
8
8
|
isNumber(rectCornerRadius, !0)) cornerRadius = [ rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius ]; else if (Array.isArray(rectCornerRadius)) {
|
|
@@ -29,23 +29,28 @@ export function createRectPath(path, x, y, width, height, rectCornerRadius) {
|
|
|
29
29
|
} else cornerRadius = [ 0, 0, 0, 0 ];
|
|
30
30
|
if (width < 0 || cornerRadius[0] + cornerRadius[1] + cornerRadius[2] + cornerRadius[3] < 1e-12) return path.rect(x, y, width, height);
|
|
31
31
|
const [leftTop, rightTop, rightBottom, leftBottom] = [ [ x, y ], [ x + width, y ], [ x + width, y + height ], [ x, y + height ] ], maxCornerRadius = Math.min(width / 2, height / 2), _cornerRadius = [ Math.min(maxCornerRadius, cornerRadius[0]), Math.min(maxCornerRadius, cornerRadius[1]), Math.min(maxCornerRadius, cornerRadius[2]), Math.min(maxCornerRadius, cornerRadius[3]) ], leftTopPoint1 = [ leftTop[0] + _cornerRadius[0], leftTop[1] ], leftTopPoint2 = [ leftTop[0], leftTop[1] + _cornerRadius[0] ], rightTopPoint1 = [ rightTop[0] - _cornerRadius[1], rightTop[1] ], rightTopPoint2 = [ rightTop[0], rightTop[1] + _cornerRadius[1] ], rightBottomPoint1 = [ rightBottom[0] - _cornerRadius[2], rightBottom[1] ], rightBottomPoint2 = [ rightBottom[0], rightBottom[1] - _cornerRadius[2] ], leftBottomPoint1 = [ leftBottom[0] + _cornerRadius[3], leftBottom[1] ], leftBottomPoint2 = [ leftBottom[0], leftBottom[1] - _cornerRadius[3] ];
|
|
32
|
-
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), path.lineTo(rightTopPoint1[0], rightTopPoint1[1]),
|
|
32
|
+
if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]),
|
|
33
33
|
!arrayEqual(rightTopPoint1, rightTopPoint2)) {
|
|
34
|
+
edgeCb && edgeCb[0] && path.moveTo(rightTopPoint1[0], rightTopPoint1[1]);
|
|
34
35
|
const centerX = rightTopPoint1[0], centerY = rightTopPoint1[1] + _cornerRadius[1];
|
|
35
36
|
path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
|
|
36
37
|
}
|
|
37
|
-
if (
|
|
38
|
+
if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint2[0], rightTopPoint2[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]),
|
|
39
|
+
!arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
|
|
38
40
|
const centerX = rightBottomPoint2[0] - _cornerRadius[2], centerY = rightBottomPoint2[1];
|
|
41
|
+
edgeCb && edgeCb[1] && path.moveTo(rightBottomPoint2[0], rightBottomPoint2[1]),
|
|
39
42
|
path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
|
|
40
43
|
}
|
|
41
|
-
if (
|
|
44
|
+
if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]),
|
|
45
|
+
!arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
|
|
42
46
|
const centerX = leftBottomPoint1[0], centerY = leftBottomPoint1[1] - _cornerRadius[3];
|
|
43
|
-
path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
|
|
47
|
+
edgeCb && edgeCb[2] && path.moveTo(leftBottomPoint1[0], leftBottomPoint1[1]), path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
|
|
44
48
|
}
|
|
45
|
-
if (
|
|
49
|
+
if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint2[0], leftBottomPoint2[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]),
|
|
50
|
+
!arrayEqual(leftTopPoint1, leftTopPoint2)) {
|
|
46
51
|
const centerX = leftTopPoint1[0], centerY = leftTopPoint1[1] + _cornerRadius[0];
|
|
47
|
-
path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
52
|
+
edgeCb && edgeCb[3] && path.moveTo(leftTopPoint2[0], leftTopPoint2[1]), path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
|
|
48
53
|
}
|
|
49
|
-
return path.closePath(), path;
|
|
54
|
+
return !edgeCb && path.closePath(), path;
|
|
50
55
|
}
|
|
51
56
|
//# sourceMappingURL=rect.js.map
|