@visactor/vrender-core 0.17.0-alpha.2 → 0.17.0-alpha.4
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 +349 -358
- package/cjs/common/Reflect-metadata.js.map +1 -1
- package/cjs/core/stage.js +9 -6
- package/cjs/core/stage.js.map +1 -1
- package/cjs/event/event-manager.js +3 -2
- package/cjs/event/event-manager.js.map +1 -1
- package/cjs/graphic/builtin-symbol/index.js +0 -1
- package/cjs/graphic/builtin-symbol/index.js.map +1 -1
- package/cjs/graphic/builtin-symbol/rect.d.ts +2 -1
- package/cjs/graphic/builtin-symbol/rect.js +11 -6
- package/cjs/graphic/builtin-symbol/rect.js.map +1 -1
- package/cjs/graphic/richtext.js +1 -1
- package/cjs/graphic/richtext.js.map +1 -1
- package/cjs/render/contributions/render/area-render.d.ts +1 -0
- package/cjs/render/contributions/render/area-render.js +42 -5
- package/cjs/render/contributions/render/area-render.js.map +1 -1
- package/cjs/render/contributions/render/base-render.js +4 -10
- package/cjs/render/contributions/render/base-render.js.map +1 -1
- package/cjs/render/contributions/render/module.js +7 -7
- package/cjs/render/contributions/render/module.js.map +1 -1
- package/dist/index.js +131 -74
- package/dist/index.min.js +1 -1
- package/es/common/Reflect-metadata.js +349 -358
- package/es/common/Reflect-metadata.js.map +1 -1
- package/es/core/stage.js +9 -3
- package/es/core/stage.js.map +1 -1
- package/es/event/event-manager.js +3 -2
- package/es/event/event-manager.js.map +1 -1
- package/es/graphic/builtin-symbol/index.js +0 -1
- package/es/graphic/builtin-symbol/index.js.map +1 -1
- package/es/graphic/builtin-symbol/rect.d.ts +2 -1
- package/es/graphic/builtin-symbol/rect.js +9 -4
- package/es/graphic/builtin-symbol/rect.js.map +1 -1
- package/es/graphic/richtext.js +1 -1
- package/es/graphic/richtext.js.map +1 -1
- package/es/render/contributions/render/area-render.d.ts +1 -0
- package/es/render/contributions/render/area-render.js +42 -5
- package/es/render/contributions/render/area-render.js.map +1 -1
- package/es/render/contributions/render/base-render.js +2 -14
- package/es/render/contributions/render/base-render.js.map +1 -1
- package/es/render/contributions/render/module.js +21 -17
- package/es/render/contributions/render/module.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,387 +1,378 @@
|
|
|
1
|
-
let Reflect;
|
|
2
|
-
|
|
3
1
|
export default (function(Reflect) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} : function() {
|
|
28
|
-
return MakeDictionary({});
|
|
29
|
-
},
|
|
30
|
-
has: downLevel ? function(map, key) {
|
|
31
|
-
return hasOwn.call(map, key);
|
|
32
|
-
} : function(map, key) {
|
|
33
|
-
return key in map;
|
|
34
|
-
},
|
|
35
|
-
get: downLevel ? function(map, key) {
|
|
36
|
-
return hasOwn.call(map, key) ? map[key] : void 0;
|
|
37
|
-
} : function(map, key) {
|
|
38
|
-
return map[key];
|
|
39
|
-
}
|
|
40
|
-
}, 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,
|
|
41
|
-
new (usePolyfill || "function" != typeof WeakMap ? CreateWeakMapPolyfill() : WeakMap));
|
|
42
|
-
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
43
|
-
if (!IsObject(target)) throw new TypeError;
|
|
44
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
45
|
-
}
|
|
46
|
-
function hasMetadata(metadataKey, target, propertyKey) {
|
|
47
|
-
if (!IsObject(target)) throw new TypeError;
|
|
48
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
49
|
-
}
|
|
50
|
-
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
51
|
-
if (!IsObject(target)) throw new TypeError;
|
|
52
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
53
|
-
}
|
|
54
|
-
function getMetadata(metadataKey, target, propertyKey) {
|
|
55
|
-
if (!IsObject(target)) throw new TypeError;
|
|
56
|
-
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
57
|
-
}
|
|
58
|
-
function GetOrCreateMetadataMap(O, P, Create) {
|
|
59
|
-
let targetMetadata = Metadata.get(O);
|
|
60
|
-
if (IsUndefined(targetMetadata)) {
|
|
61
|
-
if (!Create) return;
|
|
62
|
-
targetMetadata = new _Map, Metadata.set(O, targetMetadata);
|
|
63
|
-
}
|
|
64
|
-
let metadataMap = targetMetadata.get(P);
|
|
65
|
-
if (IsUndefined(metadataMap)) {
|
|
66
|
-
if (!Create) return;
|
|
67
|
-
metadataMap = new _Map, targetMetadata.set(P, metadataMap);
|
|
68
|
-
}
|
|
69
|
-
return metadataMap;
|
|
70
|
-
}
|
|
71
|
-
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
72
|
-
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
|
|
73
|
-
const parent = OrdinaryGetPrototypeOf(O);
|
|
74
|
-
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
75
|
-
}
|
|
76
|
-
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
77
|
-
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
78
|
-
return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
|
|
2
|
+
var target, previous;
|
|
3
|
+
return function(exporter) {
|
|
4
|
+
const hasOwn = Object.prototype.hasOwnProperty, supportsSymbol = "function" == typeof Symbol, toPrimitiveSymbol = supportsSymbol && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", iteratorSymbol = supportsSymbol && void 0 !== Symbol.iterator ? Symbol.iterator : "@@iterator", supportsCreate = "function" == typeof Object.create, supportsProto = {
|
|
5
|
+
__proto__: []
|
|
6
|
+
} instanceof Array, downLevel = !supportsCreate && !supportsProto, HashMap = {
|
|
7
|
+
create: supportsCreate ? function() {
|
|
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];
|
|
79
25
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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));
|
|
28
|
+
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
29
|
+
if (!IsObject(target)) throw new TypeError;
|
|
30
|
+
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
31
|
+
}
|
|
32
|
+
function hasMetadata(metadataKey, target, propertyKey) {
|
|
33
|
+
if (!IsObject(target)) throw new TypeError;
|
|
34
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
35
|
+
}
|
|
36
|
+
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
37
|
+
if (!IsObject(target)) throw new TypeError;
|
|
38
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
39
|
+
}
|
|
40
|
+
function getMetadata(metadataKey, target, propertyKey) {
|
|
41
|
+
if (!IsObject(target)) throw new TypeError;
|
|
42
|
+
return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
43
|
+
}
|
|
44
|
+
function GetOrCreateMetadataMap(O, P, Create) {
|
|
45
|
+
let targetMetadata = Metadata.get(O);
|
|
46
|
+
if (IsUndefined(targetMetadata)) {
|
|
47
|
+
if (!Create) return;
|
|
48
|
+
targetMetadata = new _Map, Metadata.set(O, targetMetadata);
|
|
88
49
|
}
|
|
89
|
-
|
|
90
|
-
|
|
50
|
+
let metadataMap = targetMetadata.get(P);
|
|
51
|
+
if (IsUndefined(metadataMap)) {
|
|
52
|
+
if (!Create) return;
|
|
53
|
+
metadataMap = new _Map, targetMetadata.set(P, metadataMap);
|
|
91
54
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
55
|
+
return metadataMap;
|
|
56
|
+
}
|
|
57
|
+
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
58
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
|
|
59
|
+
const parent = OrdinaryGetPrototypeOf(O);
|
|
60
|
+
return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
61
|
+
}
|
|
62
|
+
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
63
|
+
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
64
|
+
return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
|
|
65
|
+
}
|
|
66
|
+
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
67
|
+
if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
68
|
+
const parent = OrdinaryGetPrototypeOf(O);
|
|
69
|
+
return IsNull(parent) ? void 0 : OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
70
|
+
}
|
|
71
|
+
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
72
|
+
const metadataMap = GetOrCreateMetadataMap(O, P, !1);
|
|
73
|
+
if (!IsUndefined(metadataMap)) return metadataMap.get(MetadataKey);
|
|
74
|
+
}
|
|
75
|
+
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
76
|
+
GetOrCreateMetadataMap(O, P, !0).set(MetadataKey, MetadataValue);
|
|
77
|
+
}
|
|
78
|
+
function Type(x) {
|
|
79
|
+
if (null === x) return 1;
|
|
80
|
+
switch (typeof x) {
|
|
81
|
+
case "undefined":
|
|
82
|
+
return 0;
|
|
97
83
|
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
case "boolean":
|
|
85
|
+
return 2;
|
|
100
86
|
|
|
101
|
-
|
|
102
|
-
|
|
87
|
+
case "string":
|
|
88
|
+
return 3;
|
|
103
89
|
|
|
104
|
-
|
|
105
|
-
|
|
90
|
+
case "symbol":
|
|
91
|
+
return 4;
|
|
106
92
|
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
case "number":
|
|
94
|
+
return 5;
|
|
109
95
|
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
case "object":
|
|
97
|
+
return null === x ? 1 : 6;
|
|
112
98
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function IsUndefined(x) {
|
|
118
|
-
return void 0 === x;
|
|
99
|
+
default:
|
|
100
|
+
return 6;
|
|
119
101
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
102
|
+
}
|
|
103
|
+
function IsUndefined(x) {
|
|
104
|
+
return void 0 === x;
|
|
105
|
+
}
|
|
106
|
+
function IsNull(x) {
|
|
107
|
+
return null === x;
|
|
108
|
+
}
|
|
109
|
+
function IsSymbol(x) {
|
|
110
|
+
return "symbol" == typeof x;
|
|
111
|
+
}
|
|
112
|
+
function IsObject(x) {
|
|
113
|
+
return "object" == typeof x ? null !== x : "function" == typeof x;
|
|
114
|
+
}
|
|
115
|
+
function ToPrimitive(input, PreferredType) {
|
|
116
|
+
switch (Type(input)) {
|
|
117
|
+
case 0:
|
|
118
|
+
case 1:
|
|
119
|
+
case 2:
|
|
120
|
+
case 3:
|
|
121
|
+
case 4:
|
|
122
|
+
case 5:
|
|
123
|
+
return input;
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
const hint = 3 === PreferredType ? "string" : 5 === PreferredType ? "number" : "default", exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
126
|
+
if (void 0 !== exoticToPrim) {
|
|
127
|
+
const result = exoticToPrim.call(input, hint);
|
|
128
|
+
if (IsObject(result)) throw new TypeError;
|
|
129
|
+
return result;
|
|
128
130
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return input;
|
|
131
|
+
return OrdinaryToPrimitive(input, "default" === hint ? "number" : hint);
|
|
132
|
+
}
|
|
133
|
+
function OrdinaryToPrimitive(O, hint) {
|
|
134
|
+
if ("string" === hint) {
|
|
135
|
+
const toString_1 = O.toString;
|
|
136
|
+
if (IsCallable(toString_1)) {
|
|
137
|
+
const result = toString_1.call(O);
|
|
138
|
+
if (!IsObject(result)) return result;
|
|
138
139
|
}
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
const result =
|
|
142
|
-
if (IsObject(result))
|
|
143
|
-
return result;
|
|
140
|
+
const valueOf = O.valueOf;
|
|
141
|
+
if (IsCallable(valueOf)) {
|
|
142
|
+
const result = valueOf.call(O);
|
|
143
|
+
if (!IsObject(result)) return result;
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (IsCallable(toString_1)) {
|
|
151
|
-
const result = toString_1.call(O);
|
|
152
|
-
if (!IsObject(result)) return result;
|
|
153
|
-
}
|
|
154
|
-
const valueOf = O.valueOf;
|
|
155
|
-
if (IsCallable(valueOf)) {
|
|
156
|
-
const result = valueOf.call(O);
|
|
157
|
-
if (!IsObject(result)) return result;
|
|
158
|
-
}
|
|
159
|
-
} else {
|
|
160
|
-
const valueOf = O.valueOf;
|
|
161
|
-
if (IsCallable(valueOf)) {
|
|
162
|
-
const result = valueOf.call(O);
|
|
163
|
-
if (!IsObject(result)) return result;
|
|
164
|
-
}
|
|
165
|
-
const toString_2 = O.toString;
|
|
166
|
-
if (IsCallable(toString_2)) {
|
|
167
|
-
const result = toString_2.call(O);
|
|
168
|
-
if (!IsObject(result)) return result;
|
|
169
|
-
}
|
|
145
|
+
} else {
|
|
146
|
+
const valueOf = O.valueOf;
|
|
147
|
+
if (IsCallable(valueOf)) {
|
|
148
|
+
const result = valueOf.call(O);
|
|
149
|
+
if (!IsObject(result)) return result;
|
|
170
150
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
function ToString(argument) {
|
|
177
|
-
return "" + argument;
|
|
178
|
-
}
|
|
179
|
-
function ToPropertyKey(argument) {
|
|
180
|
-
const key = ToPrimitive(argument, 3);
|
|
181
|
-
return IsSymbol(key) ? key : ToString(key);
|
|
182
|
-
}
|
|
183
|
-
function IsCallable(argument) {
|
|
184
|
-
return "function" == typeof argument;
|
|
185
|
-
}
|
|
186
|
-
function GetMethod(V, P) {
|
|
187
|
-
const func = V[P];
|
|
188
|
-
if (null != func) {
|
|
189
|
-
if (!IsCallable(func)) throw new TypeError;
|
|
190
|
-
return func;
|
|
151
|
+
const toString_2 = O.toString;
|
|
152
|
+
if (IsCallable(toString_2)) {
|
|
153
|
+
const result = toString_2.call(O);
|
|
154
|
+
if (!IsObject(result)) return result;
|
|
191
155
|
}
|
|
192
156
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
157
|
+
throw new TypeError;
|
|
158
|
+
}
|
|
159
|
+
function ToBoolean(argument) {
|
|
160
|
+
return !!argument;
|
|
161
|
+
}
|
|
162
|
+
function ToString(argument) {
|
|
163
|
+
return "" + argument;
|
|
164
|
+
}
|
|
165
|
+
function ToPropertyKey(argument) {
|
|
166
|
+
const key = ToPrimitive(argument, 3);
|
|
167
|
+
return IsSymbol(key) ? key : ToString(key);
|
|
168
|
+
}
|
|
169
|
+
function IsCallable(argument) {
|
|
170
|
+
return "function" == typeof argument;
|
|
171
|
+
}
|
|
172
|
+
function GetMethod(V, P) {
|
|
173
|
+
const func = V[P];
|
|
174
|
+
if (null != func) {
|
|
175
|
+
if (!IsCallable(func)) throw new TypeError;
|
|
176
|
+
return func;
|
|
201
177
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
return this._index >= 0 && (this._index = -1, this._keys = arraySentinel, this._values = arraySentinel),
|
|
230
|
-
{
|
|
231
|
-
value: value,
|
|
232
|
-
done: !0
|
|
178
|
+
}
|
|
179
|
+
function OrdinaryGetPrototypeOf(O) {
|
|
180
|
+
const proto = Object.getPrototypeOf(O);
|
|
181
|
+
if ("function" != typeof O || O === functionPrototype) return proto;
|
|
182
|
+
if (proto !== functionPrototype) return proto;
|
|
183
|
+
const prototype = O.prototype, prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
184
|
+
if (null == prototypeProto || prototypeProto === Object.prototype) return proto;
|
|
185
|
+
const constructor = prototypeProto.constructor;
|
|
186
|
+
return "function" != typeof constructor || constructor === O ? proto : constructor;
|
|
187
|
+
}
|
|
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
|
|
233
205
|
};
|
|
234
|
-
}, MapIterator;
|
|
235
|
-
}();
|
|
236
|
-
return function() {
|
|
237
|
-
function Map() {
|
|
238
|
-
this._keys = [], this._values = [], this._cacheKey = cacheSentinel, this._cacheIndex = -2;
|
|
239
206
|
}
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
for (let i = index + 1; i < size; i++) this._keys[i - 1] = this._keys[i], this._values[i - 1] = this._values[i];
|
|
259
|
-
return this._keys.length--, this._values.length--, key === this._cacheKey && (this._cacheKey = cacheSentinel,
|
|
260
|
-
this._cacheIndex = -2), !0;
|
|
261
|
-
}
|
|
262
|
-
return !1;
|
|
263
|
-
}, Map.prototype.clear = function() {
|
|
264
|
-
this._keys.length = 0, this._values.length = 0, this._cacheKey = cacheSentinel,
|
|
265
|
-
this._cacheIndex = -2;
|
|
266
|
-
}, Map.prototype.keys = function() {
|
|
267
|
-
return new MapIterator(this._keys, this._values, getKey);
|
|
268
|
-
}, Map.prototype.values = function() {
|
|
269
|
-
return new MapIterator(this._keys, this._values, getValue);
|
|
270
|
-
}, Map.prototype.entries = function() {
|
|
271
|
-
return new MapIterator(this._keys, this._values, getEntry);
|
|
272
|
-
}, Map.prototype["@@iterator"] = function() {
|
|
273
|
-
return this.entries();
|
|
274
|
-
}, Map.prototype[iteratorSymbol] = function() {
|
|
275
|
-
return this.entries();
|
|
276
|
-
}, Map.prototype._find = function(key, insert) {
|
|
277
|
-
return this._cacheKey !== key && (this._cacheIndex = this._keys.indexOf(this._cacheKey = key)),
|
|
278
|
-
this._cacheIndex < 0 && insert && (this._cacheIndex = this._keys.length, this._keys.push(key),
|
|
279
|
-
this._values.push(void 0)), this._cacheIndex;
|
|
280
|
-
}, Map;
|
|
281
|
-
}();
|
|
282
|
-
function getKey(key, _) {
|
|
283
|
-
return key;
|
|
284
|
-
}
|
|
285
|
-
function getValue(_, value) {
|
|
286
|
-
return value;
|
|
287
|
-
}
|
|
288
|
-
function getEntry(key, value) {
|
|
289
|
-
return [ key, value ];
|
|
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;
|
|
290
225
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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;
|
|
296
247
|
}
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}, Set.prototype[iteratorSymbol] = function() {
|
|
320
|
-
return this.keys();
|
|
321
|
-
}, Set;
|
|
322
|
-
}();
|
|
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;
|
|
323
270
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
return void 0 !== table ? HashMap.get(table, this._key) : void 0;
|
|
336
|
-
}, WeakMap.prototype.set = function(target, value) {
|
|
337
|
-
return GetOrCreateWeakMapTable(target, !0)[this._key] = value, this;
|
|
338
|
-
}, WeakMap.prototype.delete = function(target) {
|
|
339
|
-
const table = GetOrCreateWeakMapTable(target, !1);
|
|
340
|
-
return void 0 !== table && delete table[this._key];
|
|
341
|
-
}, WeakMap.prototype.clear = function() {
|
|
342
|
-
this._key = CreateUniqueKey();
|
|
343
|
-
}, WeakMap;
|
|
344
|
-
}();
|
|
345
|
-
function CreateUniqueKey() {
|
|
346
|
-
let key;
|
|
347
|
-
do {
|
|
348
|
-
key = "@@WeakMap@@" + CreateUUID();
|
|
349
|
-
} while (HashMap.has(keys, key));
|
|
350
|
-
return keys[key] = !0, key;
|
|
351
|
-
}
|
|
352
|
-
function GetOrCreateWeakMapTable(target, create) {
|
|
353
|
-
if (!hasOwn.call(target, rootKey)) {
|
|
354
|
-
if (!create) return;
|
|
355
|
-
Object.defineProperty(target, rootKey, {
|
|
356
|
-
value: HashMap.create()
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
return target[rootKey];
|
|
360
|
-
}
|
|
361
|
-
function FillRandomBytes(buffer, size) {
|
|
362
|
-
for (let i = 0; i < size; ++i) buffer[i] = 255 * Math.random() | 0;
|
|
363
|
-
return buffer;
|
|
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;
|
|
364
282
|
}
|
|
365
|
-
|
|
366
|
-
|
|
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();
|
|
367
315
|
}
|
|
368
|
-
function
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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
|
+
});
|
|
378
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;
|
|
379
350
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
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);
|
|
382
353
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
+
exporter("defineMetadata", defineMetadata), exporter("hasMetadata", hasMetadata),
|
|
370
|
+
exporter("hasOwnMetadata", hasOwnMetadata), exporter("getMetadata", getMetadata);
|
|
371
|
+
}((target = Reflect, function(key, value) {
|
|
372
|
+
"function" != typeof target[key] && Object.defineProperty(target, key, {
|
|
373
|
+
configurable: !0,
|
|
374
|
+
writable: !0,
|
|
375
|
+
value: value
|
|
376
|
+
}), previous && previous(key, value);
|
|
377
|
+
})), Reflect;
|
|
378
|
+
}({}));
|